8 #include <wx/listctrl.h>
10 //--------------------------------------------------------------------
12 class pComboCtrl_AutoComplete
;
13 //--------------------------------------------------------------------
15 //--------------------------------------------------------------------
16 class ComboBoxAutoComplete
: public wxControl
19 ComboBoxAutoComplete(wxWindow
* _parent
, wxWindowID id
= wxID_ANY
, bool _b_insensitive
= true , const wxString
& value
= wxString(), const wxPoint
& pos
= wxDefaultPosition
, const wxSize
& size
= wxDefaultSize
, int more_style
= 0 );
20 ~ComboBoxAutoComplete();
22 virtual bool IsShownOnScreen()const;
23 virtual wxSize
DoGetBestSize()const;
25 bool Set_Value( const wxString
& that
);
27 void Add(const wxString
& _choice
, void* data
= NULL
);
28 void Set_Choices(const wxArrayString
& _choices
, void** _datas
= NULL
);
29 void* Remove(const wxString
& _choice
);
31 bool Selection_IsAMatch();
33 wxString
Get_Value()const;
34 void* GetSelection_Data();
36 const std::vector
<void*>& Get_All_Datas();
39 pListViewPopup
* thePopup
;
40 pComboCtrl_AutoComplete
* theCombo
;
42 void DoSetSize(int x
, int y
,
43 int width
, int height
,
45 void Evt_Size(wxSizeEvent
& evt
);
50 //--------------------------------------
51 BEGIN_DECLARE_EVENT_TYPES()
52 DECLARE_EVENT_TYPE(wxEVT_COMBOBOXAUTOCOMPLETE_CHANGE
, 7778)
53 DECLARE_EVENT_TYPE(wxEVT_COMBOBOXAUTOCOMPLETE_VALID
, 7878)
54 END_DECLARE_EVENT_TYPES()
57 #ifndef EVT_COMBOBOXAUTOCOMPLETE_CHANGE
58 #define EVT_COMBOBOXAUTOCOMPLETE_CHANGE(id, fn) \
59 DECLARE_EVENT_TABLE_ENTRY( \
60 wxEVT_COMBOBOXAUTOCOMPLETE_CHANGE, id, wxID_ANY, \
61 (wxObjectEventFunction)(wxEventFunction) wxStaticCastEvent( wxCommandEventFunction, &fn ), \
67 #ifndef EVT_COMBOBOXAUTOCOMPLETE_VALID
68 #define EVT_COMBOBOXAUTOCOMPLETE_VALID(id, fn) \
69 DECLARE_EVENT_TABLE_ENTRY( \
70 wxEVT_COMBOBOXAUTOCOMPLETE_VALID, id, wxID_ANY, \
71 (wxObjectEventFunction)(wxEventFunction) wxStaticCastEvent( wxCommandEventFunction, &fn ), \