]> git.saurik.com Git - wxWidgets.git/blob - include/wx/msw/combo.h
allow adjusting the combo button size (patch 1489452)
[wxWidgets.git] / include / wx / msw / combo.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/msw/combo.h
3 // Purpose: wxComboControl 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 wxComboControl, so make sure you
17 // use it in all native wxComboControls.
18
19 #if wxUSE_COMBOCONTROL
20
21 // ----------------------------------------------------------------------------
22 // Native wxComboControl
23 // ----------------------------------------------------------------------------
24
25 // Define this only if native implementation includes all features
26 #define wxCOMBOCONTROL_FULLY_FEATURED
27
28 class WXDLLEXPORT wxComboControl : public wxComboControlBase
29 {
30 public:
31 // ctors and such
32 wxComboControl() : wxComboControlBase() { Init(); }
33
34 wxComboControl(wxWindow *parent,
35 wxWindowID id = wxID_ANY,
36 const wxString& value = wxEmptyString,
37 const wxPoint& pos = wxDefaultPosition,
38 const wxSize& size = wxDefaultSize,
39 long style = 0,
40 const wxValidator& validator = wxDefaultValidator,
41 const wxString& name = wxComboBoxNameStr)
42 : wxComboControlBase()
43 {
44 Init();
45
46 (void)Create(parent, id, value, pos, size, style, validator, name);
47 }
48
49 bool Create(wxWindow *parent,
50 wxWindowID id = wxID_ANY,
51 const wxString& value = wxEmptyString,
52 const wxPoint& pos = wxDefaultPosition,
53 const wxSize& size = wxDefaultSize,
54 long style = 0,
55 const wxValidator& validator = wxDefaultValidator,
56 const wxString& name = wxComboBoxNameStr);
57
58 virtual ~wxComboControl();
59
60 virtual void DrawFocusBackground( wxDC& dc, const wxRect& rect, int flags );
61
62 static int GetFeatures() { return wxComboControlFeatures::All; }
63
64 protected:
65
66 // customization
67 virtual void OnResize();
68 virtual wxCoord GetNativeTextIndent() const;
69 virtual void OnThemeChange();
70
71 // event handlers
72 void OnPaintEvent( wxPaintEvent& event );
73 void OnMouseEvent( wxMouseEvent& event );
74
75 private:
76 void Init();
77
78 DECLARE_EVENT_TABLE()
79
80 DECLARE_DYNAMIC_CLASS(wxComboControl)
81 };
82
83
84 #endif // wxUSE_COMBOCONTROL
85 #endif
86 // _WX_COMBOCONTROL_H_