]> git.saurik.com Git - wxWidgets.git/blame - include/wx/msw/combo.h
Include wx/msw/wrap*.h according to pch support (with other minor cleaning).
[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 61
118f5fbd 62 virtual void PrepareBackground( wxDC& dc, const wxRect& rect, int flags ) const;
b445b6a7 63 virtual bool IsKeyPopupToggle(const wxKeyEvent& event) const;
a340b80d 64
a57d600f 65 static int GetFeatures() { return wxComboCtrlFeatures::All; }
a340b80d
VZ
66
67protected:
68
69 // customization
70 virtual void OnResize();
71 virtual wxCoord GetNativeTextIndent() const;
72 virtual void OnThemeChange();
73
74 // event handlers
75 void OnPaintEvent( wxPaintEvent& event );
76 void OnMouseEvent( wxMouseEvent& event );
77
78private:
79 void Init();
80
81 DECLARE_EVENT_TABLE()
82
a57d600f 83 DECLARE_DYNAMIC_CLASS(wxComboCtrl)
a340b80d
VZ
84};
85
86
a57d600f 87#endif // wxUSE_COMBOCTRL
a340b80d
VZ
88#endif
89 // _WX_COMBOCONTROL_H_