]> git.saurik.com Git - wxWidgets.git/blame_incremental - 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
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
28extern WXDLLIMPEXP_DATA_CORE(const wxChar) wxComboBoxNameStr[];
29
30class WXDLLEXPORT wxComboCtrl : public wxComboCtrlBase
31{
32public:
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 PrepareBackground( wxDC& dc, const wxRect& rect, int flags ) const;
63 virtual bool IsKeyPopupToggle(const wxKeyEvent& event) const;
64
65 static int GetFeatures() { return wxComboCtrlFeatures::All; }
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
83 DECLARE_DYNAMIC_CLASS(wxComboCtrl)
84};
85
86
87#endif // wxUSE_COMBOCTRL
88#endif
89 // _WX_COMBOCONTROL_H_