]>
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 WXDLLEXPORT_DATA(extern const wxChar
*) wxEmptyString
;
25 // ----------------------------------------------------------------------------
27 // ----------------------------------------------------------------------------
29 class WXDLLEXPORT wxComboBox
: public wxChoice
31 DECLARE_DYNAMIC_CLASS(wxComboBox
)
36 wxComboBox(wxWindow
*parent
, wxWindowID id
,
37 const wxString
& value
= wxEmptyString
,
38 const wxPoint
& pos
= wxDefaultPosition
,
39 const wxSize
& size
= wxDefaultSize
,
40 int n
= 0, const wxString choices
[] = NULL
,
42 const wxValidator
& validator
= wxDefaultValidator
,
43 const wxString
& name
= wxComboBoxNameStr
)
45 Create(parent
, id
, value
, pos
, size
, n
, choices
, style
, validator
, name
);
48 bool Create(wxWindow
*parent
,
50 const wxString
& value
= wxEmptyString
,
51 const wxPoint
& pos
= wxDefaultPosition
,
52 const wxSize
& size
= wxDefaultSize
,
54 const wxString choices
[] = NULL
,
56 const wxValidator
& validator
= wxDefaultValidator
,
57 const wxString
& name
= wxComboBoxNameStr
);
59 // List functions: see wxChoice
61 // Text field functions
62 wxString
GetValue() const { return GetLabel(); }
63 virtual void SetValue(const wxString
& value
);
65 // Clipboard operations
69 virtual void SetInsertionPoint(long pos
);
70 virtual void SetInsertionPointEnd();
71 virtual long GetInsertionPoint() const;
72 virtual long GetLastPosition() const;
73 virtual void Replace(long from
, long to
, const wxString
& value
);
74 virtual void Remove(long from
, long to
);
75 virtual void SetSelection(int n
) { wxChoice::SetSelection(n
); }
76 virtual void SetSelection(long from
, long to
);
77 virtual void SetEditable(bool editable
);
79 // implementation only from now on
80 virtual bool MSWCommand(WXUINT param
, WXWORD id
);
81 bool MSWProcessEditMsg(WXUINT msg
, WXWPARAM wParam
, WXLPARAM lParam
);
82 virtual WXHBRUSH
OnCtlColor(WXHDC pDC
, WXHWND pWnd
, WXUINT nCtlColor
,
83 WXUINT message
, WXWPARAM wParam
, WXLPARAM lParam
);
85 WXHWND
GetEditHWND() const;
88 #endif // wxUSE_COMBOBOX