]>
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
*) wxComboBoxNameStr
;
24 WXDLLEXPORT_DATA(extern const wxChar
*) wxEmptyString
;
26 // ----------------------------------------------------------------------------
28 // ----------------------------------------------------------------------------
30 class WXDLLEXPORT wxComboBox
: public wxChoice
32 DECLARE_DYNAMIC_CLASS(wxComboBox
)
37 wxComboBox(wxWindow
*parent
, wxWindowID id
,
38 const wxString
& value
= wxEmptyString
,
39 const wxPoint
& pos
= wxDefaultPosition
,
40 const wxSize
& size
= wxDefaultSize
,
41 int n
= 0, const wxString choices
[] = NULL
,
43 const wxValidator
& validator
= wxDefaultValidator
,
44 const wxString
& name
= wxComboBoxNameStr
)
46 Create(parent
, id
, value
, pos
, size
, n
, choices
, style
, validator
, name
);
49 bool Create(wxWindow
*parent
,
51 const wxString
& value
= wxEmptyString
,
52 const wxPoint
& pos
= wxDefaultPosition
,
53 const wxSize
& size
= wxDefaultSize
,
55 const wxString choices
[] = NULL
,
57 const wxValidator
& validator
= wxDefaultValidator
,
58 const wxString
& name
= wxComboBoxNameStr
);
60 // List functions: see wxChoice
62 // Text field functions
63 wxString
GetValue() const { return GetLabel(); }
64 virtual void SetValue(const wxString
& value
);
66 // Clipboard operations
70 virtual void SetInsertionPoint(long pos
);
71 virtual void SetInsertionPointEnd();
72 virtual long GetInsertionPoint() const;
73 virtual long GetLastPosition() const;
74 virtual void Replace(long from
, long to
, const wxString
& value
);
75 virtual void Remove(long from
, long to
);
76 virtual void SetSelection(int n
) { wxChoice::SetSelection(n
); }
77 virtual void SetSelection(long from
, long to
);
78 virtual void SetEditable(bool editable
);
80 // implementation only from now on
81 virtual bool MSWCommand(WXUINT param
, WXWORD id
);
82 bool MSWProcessEditMsg(WXUINT msg
, WXWPARAM wParam
, WXLPARAM lParam
);
83 virtual WXHBRUSH
OnCtlColor(WXHDC pDC
, WXHWND pWnd
, WXUINT nCtlColor
,
84 WXUINT message
, WXWPARAM wParam
, WXLPARAM lParam
);
86 WXHWND
GetEditHWND() const;
89 virtual void DoMoveWindow(int x
, int y
, int width
, int height
);
90 virtual wxSize
DoGetBestSize() const;
93 #endif // wxUSE_COMBOBOX