]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/msw/combo.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/msw/combo.h
3 // Purpose: wxComboCtrl class
4 // Author: Jaakko Salli
6 // Created: Apr-30-2006
8 // Copyright: (c) Jaakko Salli
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 #ifndef _WX_COMBOCONTROL_H_
13 #define _WX_COMBOCONTROL_H_
15 // NB: Definition of _WX_COMBOCONTROL_H_ is used in wx/generic/combo.h to
16 // determine whether there is native wxComboCtrl, so make sure you
17 // use it in all native wxComboCtrls.
21 #if !defined(__WXWINCE__) && wxUSE_TIMER
23 #define wxUSE_COMBOCTRL_POPUP_ANIMATION 1
25 #define wxUSE_COMBOCTRL_POPUP_ANIMATION 0
29 // ----------------------------------------------------------------------------
31 // ----------------------------------------------------------------------------
33 // Define this only if native implementation includes all features
34 #define wxCOMBOCONTROL_FULLY_FEATURED
36 extern WXDLLIMPEXP_DATA_CORE(const wxChar
) wxComboBoxNameStr
[];
38 class WXDLLEXPORT wxComboCtrl
: public wxComboCtrlBase
42 wxComboCtrl() : wxComboCtrlBase() { Init(); }
44 wxComboCtrl(wxWindow
*parent
,
45 wxWindowID id
= wxID_ANY
,
46 const wxString
& value
= wxEmptyString
,
47 const wxPoint
& pos
= wxDefaultPosition
,
48 const wxSize
& size
= wxDefaultSize
,
50 const wxValidator
& validator
= wxDefaultValidator
,
51 const wxString
& name
= wxComboBoxNameStr
)
56 (void)Create(parent
, id
, value
, pos
, size
, style
, validator
, name
);
59 bool Create(wxWindow
*parent
,
60 wxWindowID id
= wxID_ANY
,
61 const wxString
& value
= wxEmptyString
,
62 const wxPoint
& pos
= wxDefaultPosition
,
63 const wxSize
& size
= wxDefaultSize
,
65 const wxValidator
& validator
= wxDefaultValidator
,
66 const wxString
& name
= wxComboBoxNameStr
);
68 virtual ~wxComboCtrl();
70 virtual void PrepareBackground( wxDC
& dc
, const wxRect
& rect
, int flags
) const;
71 virtual bool IsKeyPopupToggle(const wxKeyEvent
& event
) const;
73 static int GetFeatures() { return wxComboCtrlFeatures::All
; }
75 #if wxUSE_COMBOCTRL_POPUP_ANIMATION
76 virtual bool AnimateShow( const wxRect
& rect
, int flags
);
77 void OnTimerEvent( wxTimerEvent
& event
);
83 virtual void OnResize();
84 virtual wxCoord
GetNativeTextIndent() const;
85 virtual void OnThemeChange();
88 void OnPaintEvent( wxPaintEvent
& event
);
89 void OnMouseEvent( wxMouseEvent
& event
);
94 #if wxUSE_COMBOCTRL_POPUP_ANIMATION
95 // Popup animation related
96 wxLongLong m_animStart
;
102 DECLARE_EVENT_TABLE()
104 DECLARE_DYNAMIC_CLASS(wxComboCtrl
)
108 #endif // wxUSE_COMBOCTRL
110 // _WX_COMBOCONTROL_H_