]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/msw/combobox.h
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_
16 #pragma interface "combobox.h"
19 #include "wx/choice.h"
23 // ----------------------------------------------------------------------------
25 // ----------------------------------------------------------------------------
27 class WXDLLEXPORT wxComboBox
: public wxChoice
29 DECLARE_DYNAMIC_CLASS(wxComboBox
)
34 wxComboBox(wxWindow
*parent
, wxWindowID id
,
35 const wxString
& value
= wxEmptyString
,
36 const wxPoint
& pos
= wxDefaultPosition
,
37 const wxSize
& size
= wxDefaultSize
,
38 int n
= 0, const wxString choices
[] = NULL
,
40 const wxValidator
& validator
= wxDefaultValidator
,
41 const wxString
& name
= wxComboBoxNameStr
)
43 Create(parent
, id
, value
, pos
, size
, n
, choices
, style
, validator
, name
);
46 bool Create(wxWindow
*parent
,
48 const wxString
& value
= wxEmptyString
,
49 const wxPoint
& pos
= wxDefaultPosition
,
50 const wxSize
& size
= wxDefaultSize
,
52 const wxString choices
[] = NULL
,
54 const wxValidator
& validator
= wxDefaultValidator
,
55 const wxString
& name
= wxComboBoxNameStr
);
57 // List functions: see wxChoice
59 // Text field functions
60 wxString
GetValue() const { return GetLabel(); }
61 virtual void SetValue(const wxString
& value
);
63 // Clipboard operations
67 virtual void SetInsertionPoint(long pos
);
68 virtual void SetInsertionPointEnd();
69 virtual long GetInsertionPoint() const;
70 virtual long GetLastPosition() const;
71 virtual void Replace(long from
, long to
, const wxString
& value
);
72 virtual void Remove(long from
, long to
);
73 virtual void SetSelection(int n
) { wxChoice::SetSelection(n
); }
74 virtual void SetSelection(long from
, long to
);
75 virtual void SetEditable(bool editable
);
77 // implementation only from now on
78 virtual bool MSWCommand(WXUINT param
, WXWORD id
);
79 bool MSWProcessEditMsg(WXUINT msg
, WXWPARAM wParam
, WXLPARAM lParam
);
80 virtual WXHBRUSH
OnCtlColor(WXHDC pDC
, WXHWND pWnd
, WXUINT nCtlColor
,
81 WXUINT message
, WXWPARAM wParam
, WXLPARAM lParam
);
83 WXHWND
GetEditHWND() const;
86 #endif // wxUSE_COMBOBOX