/** * @file XTPControlComboBoxGalleryPopupBar.h * * @copyright * (c) 1998-2025 Codejock Software, All Rights Reserved. * * This source file is the property of Codejock Software and must not be * redistributed by any means without the explicit written permission of * Codejock Software. * * The use of this source code is governed by the terms and conditions specified * in the Toolkit Pro license agreement. Codejock Software grants you, as a * single software developer, the limited right to use this software on one * computer only. * * Contact Information: * support@codejock.com * http://www.codejock.com * */ /** @cond */ #if !defined(__XTPCONTROLCOMBOBOXGALLERYPOPUPBAR_H__) # define __XTPCONTROLCOMBOBOXGALLERYPOPUPBAR_H__ /** @endcond */ # if _MSC_VER >= 1000 # pragma once # endif // _MSC_VER >= 1000 # include "Common/Base/Diagnostic/XTPDisableNoisyWarnings.h" /** * @brief * CXTPControlComboBoxPopupBar object. */ class _XTP_EXT_CLASS CXTPControlComboBoxGalleryPopupBar : public CXTPControlComboBoxPopupBar { /** @cond */ DECLARE_XTP_COMMANDBAR(CXTPControlComboBoxGalleryPopupBar) /** @endcond */ protected: /** * @brief * Constructs a CXTPControlComboBoxGalleryPopupBar object. */ CXTPControlComboBoxGalleryPopupBar(); public: /** * @brief * Creates a pop-up bar object. * @param pCommandBars Points to a CXTPCommandBars object. * @return * A pointer to a CXTPControlComboBoxGalleryPopupBar object. */ static CXTPControlComboBoxGalleryPopupBar* AFX_CDECL CreateComboBoxGalleryPopupBar(CXTPCommandBars* pCommandBars); protected: /** @cond */ DECLARE_MESSAGE_MAP() BOOL SetTrackingMode(int bMode, BOOL bSelectFirst, BOOL bKeyboard); BOOL OnHookKeyDown(UINT nChar, LPARAM lParam); CXTPControlGallery* GetGalleryItem() const; //{{AFX_VIRUAL(CXTPControlComboBoxList) virtual int GetCurSel() const { return GetGalleryItem()->GetSelectedItem(); } virtual int FindString(int nStartAfter, LPCTSTR lpszItem) const { return GetGalleryItem()->FindItem(nStartAfter, lpszItem, FALSE); } virtual int FindStringExact(int nIndexStart, LPCTSTR lpsz) const { return GetGalleryItem()->FindItem(nIndexStart, lpsz, TRUE); } virtual int SetTopIndex(int nIndex) { return GetGalleryItem()->SetTopIndex(nIndex); } virtual void SetCurSel(int nIndex) { GetGalleryItem()->SetSelectedItem(nIndex); } virtual void GetText(int nIndex, CString& rString) const { rString = GetGalleryItem()->GetItemCaption(nIndex); } virtual int GetCount() const { return GetGalleryItem()->GetItemCount(); } //}}AFX_VIRUAL //{{AFX_MSG(CXTPControlComboBoxList) void OnLButtonUp(UINT nFlags, CPoint point); //}}AFX_MSG /** @endcond */ }; /** @cond */ # include "Common/Base/Diagnostic/XTPEnableNoisyWarnings.h" #endif // #if !defined(__XTPCONTROLCOMBOBOXGALLERYPOPUPBAR_H__) /** @endcond */