]> git.saurik.com Git - wxWidgets.git/blob - include/wx/msw/combo.h
added wxPowerEvent; moved power functions stubs to common/powercmn.cpp
[wxWidgets.git] / include / wx / msw / combo.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/msw/combo.h
3 // Purpose: wxComboCtrl class
4 // Author: Jaakko Salli
5 // Modified by:
6 // Created: Apr-30-2006
7 // RCS-ID: $Id$
8 // Copyright: (c) Jaakko Salli
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
11
12 #ifndef _WX_COMBOCONTROL_H_
13 #define _WX_COMBOCONTROL_H_
14
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.
18
19 #if wxUSE_COMBOCTRL
20
21 // ----------------------------------------------------------------------------
22 // Native wxComboCtrl
23 // ----------------------------------------------------------------------------
24
25 // Define this only if native implementation includes all features
26 #define wxCOMBOCONTROL_FULLY_FEATURED
27
28 extern WXDLLIMPEXP_DATA_CORE(const wxChar) wxComboBoxNameStr[];
29
30 class WXDLLEXPORT wxComboCtrl : public wxComboCtrlBase
31 {
32 public:
33 // ctors and such
34 wxComboCtrl() : wxComboCtrlBase() { Init(); }
35
36 wxComboCtrl(wxWindow *parent,
37 wxWindowID id = wxID_ANY,
38 const wxString& value = wxEmptyString,
39 const wxPoint& pos = wxDefaultPosition,
40 const wxSize& size = wxDefaultSize,
41 long style = 0,
42 const wxValidator& validator = wxDefaultValidator,
43 const wxString& name = wxComboBoxNameStr)
44 : wxComboCtrlBase()
45 {
46 Init();
47
48 (void)Create(parent, id, value, pos, size, style, validator, name);
49 }
50
51 bool Create(wxWindow *parent,
52 wxWindowID id = wxID_ANY,
53 const wxString& value = wxEmptyString,
54 const wxPoint& pos = wxDefaultPosition,
55 const wxSize& size = wxDefaultSize,
56 long style = 0,
57 const wxValidator& validator = wxDefaultValidator,
58 const wxString& name = wxComboBoxNameStr);
59
60 virtual ~wxComboCtrl();
61
62 virtual void DrawFocusBackground( wxDC& dc, const wxRect& rect, int flags );
63
64 static int GetFeatures() { return wxComboCtrlFeatures::All; }
65
66 protected:
67
68 // customization
69 virtual void OnResize();
70 virtual wxCoord GetNativeTextIndent() const;
71 virtual void OnThemeChange();
72
73 // event handlers
74 void OnPaintEvent( wxPaintEvent& event );
75 void OnMouseEvent( wxMouseEvent& event );
76
77 private:
78 void Init();
79
80 DECLARE_EVENT_TABLE()
81
82 DECLARE_DYNAMIC_CLASS(wxComboCtrl)
83 };
84
85
86 #endif // wxUSE_COMBOCTRL
87 #endif
88 // _WX_COMBOCONTROL_H_