]>
Commit | Line | Data |
---|---|---|
0e320a79 DW |
1 | ///////////////////////////////////////////////////////////////////////////// |
2 | // Name: combobox.h | |
3 | // Purpose: wxComboBox class | |
37f214d5 | 4 | // Author: David Webster |
0e320a79 | 5 | // Modified by: |
37f214d5 | 6 | // Created: 10/13/99 |
0e320a79 | 7 | // RCS-ID: $Id$ |
37f214d5 | 8 | // Copyright: (c) David Webster |
65571936 | 9 | // Licence: wxWindows licence |
0e320a79 DW |
10 | ///////////////////////////////////////////////////////////////////////////// |
11 | ||
12 | #ifndef _WX_COMBOBOX_H_ | |
13 | #define _WX_COMBOBOX_H_ | |
14 | ||
0e320a79 DW |
15 | #include "wx/choice.h" |
16 | ||
37f214d5 DW |
17 | #if wxUSE_COMBOBOX |
18 | ||
0e320a79 | 19 | // Combobox item |
fb49f3b3 | 20 | class WXDLLEXPORT wxComboBox : public wxChoice |
0e320a79 | 21 | { |
0e320a79 DW |
22 | |
23 | public: | |
24 | inline wxComboBox() {} | |
25 | ||
fb49f3b3 DW |
26 | inline wxComboBox( wxWindow* pParent |
27 | ,wxWindowID vId | |
28 | ,const wxString& rsValue = wxEmptyString | |
29 | ,const wxPoint& rPos = wxDefaultPosition | |
30 | ,const wxSize& rSize = wxDefaultSize | |
31 | ,int n = 0 | |
32 | ,const wxString asChoices[] = NULL | |
33 | ,long lStyle = 0 | |
fb49f3b3 | 34 | ,const wxValidator& rValidator = wxDefaultValidator |
fb49f3b3 DW |
35 | ,const wxString& rsName = wxComboBoxNameStr |
36 | ) | |
37 | { | |
38 | Create( pParent | |
39 | ,vId | |
40 | ,rsValue | |
41 | ,rPos | |
42 | ,rSize | |
43 | ,n | |
44 | ,asChoices | |
45 | ,lStyle | |
fb49f3b3 | 46 | ,rValidator |
fb49f3b3 DW |
47 | ,rsName |
48 | ); | |
49 | } | |
0e320a79 | 50 | |
584ad2a3 MB |
51 | inline wxComboBox( wxWindow* pParent |
52 | ,wxWindowID vId | |
53 | ,const wxString& rsValue | |
54 | ,const wxPoint& rPos | |
55 | ,const wxSize& rSize | |
56 | ,const wxArrayString& asChoices | |
57 | ,long lStyle = 0 | |
58 | ,const wxValidator& rValidator = wxDefaultValidator | |
59 | ,const wxString& rsName = wxComboBoxNameStr | |
60 | ) | |
61 | { | |
62 | Create( pParent | |
63 | ,vId | |
64 | ,rsValue | |
65 | ,rPos | |
66 | ,rSize | |
67 | ,asChoices | |
68 | ,lStyle | |
69 | ,rValidator | |
70 | ,rsName | |
71 | ); | |
72 | } | |
73 | ||
fb49f3b3 DW |
74 | bool Create( wxWindow* pParent |
75 | ,wxWindowID vId | |
76 | ,const wxString& rsValue = wxEmptyString | |
77 | ,const wxPoint& rPos = wxDefaultPosition | |
78 | ,const wxSize& rSize = wxDefaultSize | |
79 | ,int n = 0 | |
80 | ,const wxString asChoices[] = NULL | |
81 | ,long lStyle = 0 | |
fb49f3b3 | 82 | ,const wxValidator& rValidator = wxDefaultValidator |
fb49f3b3 DW |
83 | ,const wxString& rsName = wxComboBoxNameStr |
84 | ); | |
0e320a79 | 85 | |
584ad2a3 MB |
86 | bool Create( wxWindow* pParent |
87 | ,wxWindowID vId | |
88 | ,const wxString& rsValue | |
89 | ,const wxPoint& rPos | |
90 | ,const wxSize& rSize | |
91 | ,const wxArrayString& asChoices | |
92 | ,long lStyle = 0 | |
93 | ,const wxValidator& rValidator = wxDefaultValidator | |
94 | ,const wxString& rsName = wxComboBoxNameStr | |
95 | ); | |
96 | ||
fb49f3b3 | 97 | // |
37f214d5 | 98 | // List functions: see wxChoice |
fb49f3b3 | 99 | // |
331f1e07 SN |
100 | virtual wxString GetValue(void) const; |
101 | virtual void SetValue(const wxString& rsValue); | |
37f214d5 | 102 | |
fb49f3b3 | 103 | // |
37f214d5 | 104 | // Clipboard operations |
fb49f3b3 | 105 | // |
37f214d5 DW |
106 | virtual void Copy(); |
107 | virtual void Cut(); | |
108 | virtual void Paste(); | |
37f214d5 | 109 | |
fb49f3b3 DW |
110 | virtual void SetInsertionPoint(long lPos); |
111 | virtual void SetInsertionPointEnd(void); | |
112 | virtual long GetInsertionPoint(void) const; | |
7d8268a1 | 113 | virtual wxTextPos GetLastPosition(void) const; |
fb49f3b3 DW |
114 | virtual void Replace( long lFrom |
115 | ,long lTo | |
116 | ,const wxString& rsValue | |
117 | ); | |
118 | virtual void Remove( long lFrom | |
119 | ,long lTo | |
120 | ); | |
121 | inline virtual void SetSelection(int n) { wxChoice::SetSelection(n); } | |
122 | virtual void SetSelection( long lFrom | |
123 | ,long lTo | |
124 | ); | |
125 | virtual void SetEditable(bool bEditable); | |
126 | ||
127 | virtual bool OS2Command( WXUINT uParam | |
128 | ,WXWORD wId | |
129 | ); | |
130 | bool ProcessEditMsg( WXUINT uMsg | |
131 | ,WXWPARAM wParam | |
132 | ,WXLPARAM lParam | |
133 | ); | |
0e320a79 | 134 | |
fb49f3b3 DW |
135 | private: |
136 | DECLARE_DYNAMIC_CLASS(wxComboBox) | |
137 | }; // end of CLASS wxComboBox | |
0e320a79 | 138 | |
37f214d5 | 139 | #endif // wxUSE_COMBOBOX |
0e320a79 DW |
140 | #endif |
141 | // _WX_COMBOBOX_H_ |