]> git.saurik.com Git - wxWidgets.git/blame - include/wx/msw/combo.h
Further wxAUI commits
[wxWidgets.git] / include / wx / msw / combo.h
CommitLineData
a340b80d
VZ
1/////////////////////////////////////////////////////////////////////////////
2// Name: wx/msw/combo.h
a57d600f 3// Purpose: wxComboCtrl class
a340b80d
VZ
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
a57d600f
VZ
16// determine whether there is native wxComboCtrl, so make sure you
17// use it in all native wxComboCtrls.
a340b80d 18
a57d600f 19#if wxUSE_COMBOCTRL
a340b80d
VZ
20
21// ----------------------------------------------------------------------------
a57d600f 22// Native wxComboCtrl
a340b80d
VZ
23// ----------------------------------------------------------------------------
24
25// Define this only if native implementation includes all features
26#define wxCOMBOCONTROL_FULLY_FEATURED
27
7c982668
PC
28extern WXDLLIMPEXP_DATA_CORE(const wxChar) wxComboBoxNameStr[];
29
a57d600f 30class WXDLLEXPORT wxComboCtrl : public wxComboCtrlBase
a340b80d
VZ
31{
32public:
33 // ctors and such
a57d600f 34 wxComboCtrl() : wxComboCtrlBase() { Init(); }
a340b80d 35
a57d600f 36 wxComboCtrl(wxWindow *parent,
a340b80d
VZ
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)
a57d600f 44 : wxComboCtrlBase()
a340b80d
VZ
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
a57d600f 60 virtual ~wxComboCtrl();
a340b80d
VZ
61
62 virtual void DrawFocusBackground( wxDC& dc, const wxRect& rect, int flags );
63
a57d600f 64 static int GetFeatures() { return wxComboCtrlFeatures::All; }
a340b80d
VZ
65
66protected:
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
77private:
78 void Init();
79
80 DECLARE_EVENT_TABLE()
81
a57d600f 82 DECLARE_DYNAMIC_CLASS(wxComboCtrl)
a340b80d
VZ
83};
84
85
a57d600f 86#endif // wxUSE_COMBOCTRL
a340b80d
VZ
87#endif
88 // _WX_COMBOCONTROL_H_