]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/msw/combobox.h
52e8a9d6dbc590f196f13645620716a216e89a47
1 /////////////////////////////////////////////////////////////////////////////
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
, wxWindowID id
,
50 const wxString
& value
= wxEmptyString
,
51 const wxPoint
& pos
= wxDefaultPosition
,
52 const wxSize
& size
= wxDefaultSize
,
53 int n
= 0, const wxString choices
[] = NULL
,
55 const wxValidator
& validator
= wxDefaultValidator
,
56 const wxString
& name
= wxComboBoxNameStr
);
58 // List functions: see wxChoice
60 // Text field functions
61 wxString
GetValue() const { return GetLabel(); }
62 virtual void SetValue(const wxString
& value
);
64 // Clipboard operations
68 virtual void SetInsertionPoint(long pos
);
69 virtual void SetInsertionPointEnd();
70 virtual long GetInsertionPoint() const;
71 virtual long GetLastPosition() const;
72 virtual void Replace(long from
, long to
, const wxString
& value
);
73 virtual void Remove(long from
, long to
);
74 virtual void SetSelection(int n
) { wxChoice::SetSelection(n
); }
75 virtual void SetSelection(long from
, long to
);
76 virtual void SetEditable(bool editable
);
78 virtual bool MSWCommand(WXUINT param
, WXWORD id
);
81 virtual void DoSetSize(int x
, int y
,
82 int width
, int height
,
83 int sizeFlags
= wxSIZE_AUTO
);
86 #endif // wxUSE_COMBOBOX