12#include "GUIWndCtrlBase.h"
27 class FL_EXPORT
CGUIComboBox :
public CComboBox,
public CGUIWndCtrlBase
205 static void SetBackgroundColor(COLORREF clr);
206 static COLORREF GetBackgroundColor();
208 static void SetBorderColorActive(COLORREF clr);
209 static COLORREF GetBorderColorActive();
212 virtual void PreSubclassWindow()
override;
213 virtual void DrawBackground(Gdiplus::Graphics* pG);
214 virtual void DrawArrow(Gdiplus::Graphics* pG);
215 virtual void DrawText(Gdiplus::Graphics* pG);
217 void SetHookForListbox();
218 void DestroyToolTipWnd();
219 void CreateToolTipWnd();
220 static void HandleListboxMouseMove(
CGUIComboBox* pCombo, CListBox* pList, UINT uFlag, CPoint point);
221 static void HandleOnTimer(UINT nIDEvent);
222 static void HandleOnPaint();
223 static BOOL OnTrackMouseEvent(HWND hWnd, DWORD dwFlags);
225 static LRESULT CALLBACK HookListboxWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam);
226 static LRESULT CALLBACK HookTipWndProc(HWND hWnd, UINT message, WPARAM wp, LPARAM lp);
229 Gdiplus::Color m_crComboboxRect;
230 Gdiplus::Color m_crButtonRect;
231 Gdiplus::Color m_crArrow;
232 Gdiplus::Color m_crBorder;
233 Gdiplus::Color m_crText;
236 int32_t m_i32BtnSize;
237 int32_t m_i32PrevSel;
239 static COLORREF m_clrBk;
240 static COLORREF m_clrBorderActive;
242 BOOL m_bCursorOnComboBox;
244 BOOL m_bDroppedState;
245 BOOL m_bDroppedStatePrev;
246 bool m_bEnableToolTipOnListBox;
248 CMap<int32_t, int32_t, CString, const wchar_t*> m_mapTipTexts;
249 CRect m_rcDropDownBtn;
251 CUIntArray m_arrDisabledItems;
253 static int m_i32OriginalSel;
254 static CWnd m_tipWnd;
255 static CFont m_fontToolTip;
256 static uint32_t m_u32DelayTime;
257 static BOOL m_bMouseCursorEntered;
259 static CMap<HWND, HWND, WNDPROC, WNDPROC&> m_mapWndProc;
260 static CMap<HWND, HWND, CGUIComboBox*, CGUIComboBox*&> m_mapCombo;
261 static int32_t m_i32ComboBoxCreationCount;
264 DECLARE_MESSAGE_MAP()
265 afx_msg
void OnPaint();
266 afx_msg
void OnLButtonDown(UINT nFlags, CPoint point);
267 afx_msg
void OnLButtonUp(UINT nFlags, CPoint point);
268 afx_msg
void OnMouseHover(UINT nFlags, CPoint point);
269 afx_msg
void OnMouseLeave();
270 afx_msg
void OnMouseMove(UINT nFlags, CPoint point);
271 afx_msg BOOL OnCbnKillfocus();
272 afx_msg
void OnSetFocus(CWnd* pOldWnd);
273 afx_msg
void OnKillFocus(CWnd* pNewWnd);
274 afx_msg BOOL OnCbnDropdown();
275 afx_msg BOOL OnCbnCloseup();
276 afx_msg BOOL OnCbnSelchange();
277 afx_msg BOOL OnCbnEditChange();
278 afx_msg HBRUSH OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor);
279 afx_msg BOOL OnEraseBkgnd(CDC* pDC);
280 afx_msg
int OnCreate(LPCREATESTRUCT lpCreateStruct);
281 afx_msg
void OnSize(UINT nType,
int cx,
int cy);
282 afx_msg
void OnEnable(BOOL bEnable);
ComboBox class.
Definition GUIComboBox.h:28
virtual int32_t GetBtnSize() const
Gets the button size of the combo box.
virtual int SetCurSel(int nSelect)
Specifies the currently selected value.
virtual CEdit * GetEditBox() const
Retrieves the edit box control of the combo box.
virtual int32_t GetPrevSel() const
Gets previously selected values.
virtual bool IsToolTipOnListBoxEnabled() const
Checks whether tooltips are currently enabled for the list box of the combo box.
CGUIComboBox()
Default constructor.
virtual void SetBtnSize(int32_t i32Size)
Specify the button size of the combo box.
virtual void SetDroppedState(BOOL bState)
Function to set drop-down status of combo box.
virtual ~CGUIComboBox()
Default destructor.
static uint32_t GetToolTipDelay()
Returns the currently set tooltip delay time.
virtual void EnableToolTipOnListBox(bool bEnable=true)
Enables or disables the tooltip functionality for the list box of the combo box. When enabled,...
virtual void SetToolTipText(int32_t i32Index, const wchar_t *pWCsTipText)
Sets the tooltip text for a specific item.
virtual CListBox * GetListBox() const
Retrieves the list box control of the combo box.
virtual BOOL GetDroppedState() const
Function to get drop-down status of combo box.
static void SetToolTipDelay(uint32_t u32Delay)
Sets the delay time before the tooltip is displayed.
virtual int SetPrevSel(int nSelect)
Functions that store previously selected values.
virtual void SetDropDownHeight(int itemsToShow)
Specify drop-down height of combo box.