]> git.saurik.com Git - wxWidgets.git/blob - include/wx/msw/combobox.h
correct (working) version of wxString
[wxWidgets.git] / include / wx / msw / combobox.h
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, wxWindowID id,
35 const wxString& value = wxEmptyString,
36 const wxPoint& pos = wxDefaultPosition,
37 const wxSize& size = wxDefaultSize,
38 int n = 0, const wxString choices[] = NULL,
39 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, wxWindowID id,
47 const wxString& value = wxEmptyString,
48 const wxPoint& pos = wxDefaultPosition,
49 const wxSize& size = wxDefaultSize,
50 int n = 0, const wxString choices[] = NULL,
51 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(long pos);
66 virtual void SetInsertionPointEnd(void);
67 virtual long GetInsertionPoint(void) const ;
68 virtual long GetLastPosition(void) const ;
69 virtual void Replace(long from, long to, const wxString& value);
70 virtual void Remove(long from, long to);
71 virtual void SetSelection(long from, long to);
72 virtual void SetEditable(bool editable);
73
74 virtual bool MSWCommand(WXUINT param, WXWORD id);
75 };
76
77 #endif // USE_COMBOBOX
78 #endif
79 // __COMBOBOXH__