]>
Commit | Line | Data |
---|---|---|
1 | ///////////////////////////////////////////////////////////////////////////// | |
2 | // Name: combobox.h | |
3 | // Purpose: wxComboBox class | |
4 | // Author: Julian Smart | |
5 | // Modified by: | |
6 | // Created: 01/02/97 | |
7 | // RCS-ID: $Id$ | |
8 | // Copyright: (c) Julian Smart and Markus Holzem | |
9 | // Licence: wxWindows license | |
10 | ///////////////////////////////////////////////////////////////////////////// | |
11 | ||
12 | #ifndef __COMBOBOXH__ | |
13 | #define __COMBOBOXH__ | |
14 | ||
15 | #ifdef __GNUG__ | |
16 | #pragma interface "combobox.h" | |
17 | #endif | |
18 | ||
19 | #include "wx/choice.h" | |
20 | ||
21 | #if USE_COMBOBOX | |
22 | ||
23 | WXDLLEXPORT_DATA(extern const char*) wxComboBoxNameStr; | |
24 | WXDLLEXPORT_DATA(extern const char*) wxEmptyString; | |
25 | ||
26 | // Combobox item | |
27 | class WXDLLEXPORT wxComboBox: public wxChoice | |
28 | { | |
29 | DECLARE_DYNAMIC_CLASS(wxComboBox) | |
30 | ||
31 | public: | |
32 | inline wxComboBox(void) {} | |
33 | ||
34 | inline wxComboBox(wxWindow *parent, const wxWindowID id, | |
35 | const wxString& value = wxEmptyString, | |
36 | const wxPoint& pos = wxDefaultPosition, | |
37 | const wxSize& size = wxDefaultSize, | |
38 | const int n = 0, const wxString choices[] = NULL, | |
39 | const long style = 0, | |
40 | const wxValidator& validator = wxDefaultValidator, | |
41 | const wxString& name = wxComboBoxNameStr) | |
42 | { | |
43 | Create(parent, id, value, pos, size, n, choices, style, validator, name); | |
44 | } | |
45 | ||
46 | bool Create(wxWindow *parent, const wxWindowID id, | |
47 | const wxString& value = wxEmptyString, | |
48 | const wxPoint& pos = wxDefaultPosition, | |
49 | const wxSize& size = wxDefaultSize, | |
50 | const int n = 0, const wxString choices[] = NULL, | |
51 | const long style = 0, | |
52 | const wxValidator& validator = wxDefaultValidator, | |
53 | const wxString& name = wxComboBoxNameStr); | |
54 | ||
55 | // List functions: see wxChoice | |
56 | ||
57 | // Text field functions | |
58 | virtual wxString GetValue(void) const ; | |
59 | virtual void SetValue(const wxString& value); | |
60 | ||
61 | // Clipboard operations | |
62 | virtual void Copy(void); | |
63 | virtual void Cut(void); | |
64 | virtual void Paste(void); | |
65 | virtual void SetInsertionPoint(const long pos); | |
66 | virtual void SetInsertionPointEnd(void); | |
67 | virtual long GetInsertionPoint(void) const ; | |
68 | virtual long GetLastPosition(void) const ; | |
69 | virtual void Replace(const long from, const long to, const wxString& value); | |
70 | virtual void Remove(const long from, const long to); | |
71 | virtual void SetSelection(const long from, const long to); | |
72 | virtual void SetEditable(const bool editable); | |
73 | ||
74 | virtual bool MSWCommand(const WXUINT param, const WXWORD id); | |
75 | }; | |
76 | ||
77 | #endif // USE_COMBOBOX | |
78 | #endif | |
79 | // __COMBOBOXH__ |