]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/msw/combobox.h
f47d004cb6bae5e730fbd085992e3a90b6c98d87
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/msw/combobox.h
3 // Purpose: wxComboBox class
4 // Author: Julian Smart
8 // Copyright: (c) Julian Smart
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 #ifndef _WX_COMBOBOX_H_
13 #define _WX_COMBOBOX_H_
15 #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
16 #pragma interface "combobox.h"
19 #include "wx/choice.h"
23 // ----------------------------------------------------------------------------
25 // ----------------------------------------------------------------------------
27 class WXDLLEXPORT wxComboBox
: public wxChoice
32 wxComboBox(wxWindow
*parent
, wxWindowID id
,
33 const wxString
& value
= wxEmptyString
,
34 const wxPoint
& pos
= wxDefaultPosition
,
35 const wxSize
& size
= wxDefaultSize
,
36 int n
= 0, const wxString choices
[] = NULL
,
38 const wxValidator
& validator
= wxDefaultValidator
,
39 const wxString
& name
= wxComboBoxNameStr
)
41 Create(parent
, id
, value
, pos
, size
, n
, choices
, style
, validator
, name
);
43 wxComboBox(wxWindow
*parent
, wxWindowID id
,
44 const wxString
& value
,
47 const wxArrayString
& choices
,
49 const wxValidator
& validator
= wxDefaultValidator
,
50 const wxString
& name
= wxComboBoxNameStr
)
52 Create(parent
, id
, value
, pos
, size
, choices
, style
, validator
, name
);
55 bool Create(wxWindow
*parent
,
57 const wxString
& value
= wxEmptyString
,
58 const wxPoint
& pos
= wxDefaultPosition
,
59 const wxSize
& size
= wxDefaultSize
,
61 const wxString choices
[] = NULL
,
63 const wxValidator
& validator
= wxDefaultValidator
,
64 const wxString
& name
= wxComboBoxNameStr
);
65 bool Create(wxWindow
*parent
,
67 const wxString
& value
,
70 const wxArrayString
& choices
,
72 const wxValidator
& validator
= wxDefaultValidator
,
73 const wxString
& name
= wxComboBoxNameStr
);
75 // List functions: see wxChoice
77 // Text field functions
78 wxString
GetValue() const { return GetLabel(); }
79 virtual void SetValue(const wxString
& value
);
81 // Clipboard operations
85 virtual void SetInsertionPoint(long pos
);
86 virtual void SetInsertionPointEnd();
87 virtual long GetInsertionPoint() const;
88 virtual long GetLastPosition() const;
89 virtual void Replace(long from
, long to
, const wxString
& value
);
90 virtual void Remove(long from
, long to
);
91 virtual void SetSelection(int n
) { wxChoice::SetSelection(n
); }
92 virtual void SetSelection(long from
, long to
);
93 virtual void SetEditable(bool editable
);
95 // implementation only from now on
96 virtual bool MSWCommand(WXUINT param
, WXWORD id
);
97 bool MSWProcessEditMsg(WXUINT msg
, WXWPARAM wParam
, WXLPARAM lParam
);
98 virtual WXHBRUSH
OnCtlColor(WXHDC pDC
, WXHWND pWnd
, WXUINT nCtlColor
,
99 WXUINT message
, WXWPARAM wParam
, WXLPARAM lParam
);
101 WXHWND
GetEditHWND() const;
104 DECLARE_DYNAMIC_CLASS_NO_COPY(wxComboBox
)
107 #endif // wxUSE_COMBOBOX