aduiListBox.h 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. //////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Copyright 2015 Autodesk, Inc. All rights reserved.
  4. //
  5. // Use of this software is subject to the terms of the Autodesk license
  6. // agreement provided at the time of installation or download, or which
  7. // otherwise accompanies this software in either electronic or hard copy form.
  8. //
  9. //////////////////////////////////////////////////////////////////////////////
  10. #ifndef _aduiListBox_h
  11. #define _aduiListBox_h
  12. #pragma pack (push, 8)
  13. #pragma once
  14. #ifndef _ADESK_MAC_
  15. /////////////////////////////////////////////////////////////////////////////
  16. // CAdUiListBox window
  17. #pragma warning(push)
  18. #pragma warning(disable : 4275)
  19. class ADUI_PORT CAdUiListBox : public CListBox {
  20. DECLARE_DYNAMIC(CAdUiListBox);
  21. public:
  22. CAdUiListBox ();
  23. virtual ~CAdUiListBox ();
  24. // Misc.
  25. protected:
  26. CPoint m_lastMousePoint;
  27. int m_tipItem;
  28. CRect m_tipRect;
  29. public:
  30. virtual void GetContentExtent (
  31. int item, LPCTSTR text, int& width, int& height
  32. );
  33. int GetItemAtPoint (CPoint& p);
  34. void GetTextExtent (LPCTSTR text, int& width, int& height);
  35. BOOL IsOwnerDraw ();
  36. // AdUi message handlers
  37. protected:
  38. CWnd *m_aduiParent;
  39. virtual ADUI_REPLY DoAdUiMessage (
  40. ADUI_NOTIFY notifyCode, UINT controlId, LPARAM lParam
  41. );
  42. virtual void OnDrawTip (CDC& dc);
  43. virtual BOOL OnDrawTipText (CAdUiDrawTipText& dtt);
  44. virtual ADUI_REPLY OnGetTipSupport (CPoint& p);
  45. virtual BOOL OnGetTipRect (CRect& r);
  46. virtual BOOL OnGetTipText (CString& text);
  47. virtual BOOL OnHitTipRect (CPoint& p);
  48. public:
  49. CWnd *GetAdUiParent ();
  50. void SetAdUiParent (CWnd *w);
  51. // Subclassed ComboLBox support
  52. protected:
  53. BOOL m_bComboBoxDraw;
  54. CAdUiComboBox *m_pComboBox;
  55. public:
  56. CAdUiComboBox *GetComboBox ();
  57. void SetComboBox (CAdUiComboBox *control);
  58. BOOL GetComboBoxDraw ();
  59. void SetComboBoxDraw (BOOL comboBoxDraw);
  60. // ClassWizard-controlled
  61. public:
  62. //{{AFX_VIRTUAL(CAdUiListBox)
  63. virtual int CompareItem(LPCOMPAREITEMSTRUCT lpCompareItemStruct);
  64. virtual void DeleteItem(LPDELETEITEMSTRUCT lpDeleteItemStruct);
  65. virtual void DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct);
  66. virtual void MeasureItem(LPMEASUREITEMSTRUCT lpMeasureItemStruct);
  67. //}}AFX_VIRTUAL
  68. protected:
  69. //{{AFX_MSG(CAdUiListBox)
  70. afx_msg LRESULT OnAdUiMessage (WPARAM wParam, LPARAM lParam);
  71. afx_msg void OnDestroy();
  72. afx_msg void OnMouseMove(UINT nFlags, CPoint point);
  73. //}}AFX_MSG
  74. DECLARE_MESSAGE_MAP()
  75. };
  76. #pragma warning(pop)
  77. #endif //_ADESK_MAC_
  78. /////////////////////////////////////////////////////////////////////////////
  79. //{{AFX_INSERT_LOCATION}}
  80. // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
  81. #pragma pack (pop)
  82. #endif
  83. /////////////////////////////////////////////////////////////////////////////