]> git.saurik.com Git - wxWidgets.git/blob - include/wx/os2/combobox.h
Motif compilation fix
[wxWidgets.git] / include / wx / os2 / combobox.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: combobox.h
3 // Purpose: wxComboBox class
4 // Author: David Webster
5 // Modified by:
6 // Created: 10/13/99
7 // RCS-ID: $Id$
8 // Copyright: (c) David Webster
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
11
12 #ifndef _WX_COMBOBOX_H_
13 #define _WX_COMBOBOX_H_
14
15 #include "wx/choice.h"
16
17 #if wxUSE_COMBOBOX
18
19 WXDLLEXPORT_DATA(extern const char*) wxComboBoxNameStr;
20 WXDLLEXPORT_DATA(extern const char*) wxEmptyString;
21
22 // Combobox item
23 class WXDLLEXPORT wxComboBox: public wxChoice
24 {
25 DECLARE_DYNAMIC_CLASS(wxComboBox)
26
27 public:
28 inline wxComboBox() {}
29
30 inline wxComboBox(wxWindow *parent, wxWindowID id,
31 const wxString& value = wxEmptyString,
32 const wxPoint& pos = wxDefaultPosition,
33 const wxSize& size = wxDefaultSize,
34 int n = 0, const wxString choices[] = NULL,
35 long style = 0,
36 #if wxUSE_VALIDATORS
37 # if defined(__VISAGECPP__)
38 const wxValidator* validator = wxDefaultValidator,
39 # else
40 const wxValidator& validator = wxDefaultValidator,
41 # endif
42 #endif
43 const wxString& name = wxComboBoxNameStr)
44 {
45 Create(parent, id, value, pos, size, n, choices, style, validator, name);
46 }
47
48 bool Create(wxWindow *parent, wxWindowID id,
49 const wxString& value = wxEmptyString,
50 const wxPoint& pos = wxDefaultPosition,
51 const wxSize& size = wxDefaultSize,
52 int n = 0, const wxString choices[] = NULL,
53 long style = 0,
54 #if wxUSE_VALIDATORS
55 # if defined(__VISAGECPP__)
56 const wxValidator* validator = wxDefaultValidator,
57 # else
58 const wxValidator& validator = wxDefaultValidator,
59 # endif
60 #endif
61 const wxString& name = wxComboBoxNameStr);
62
63 // List functions: see wxChoice
64
65 wxString GetValue() const { return GetLabel(); }
66 virtual void SetValue(const wxString& value);
67
68 // Clipboard operations
69 virtual void Copy();
70 virtual void Cut();
71 virtual void Paste();
72 virtual void SetInsertionPoint(long pos);
73 virtual void SetInsertionPointEnd();
74 virtual long GetInsertionPoint() const;
75 virtual long GetLastPosition() const;
76 virtual void Replace(long from, long to, const wxString& value);
77 virtual void Remove(long from, long to);
78 virtual void SetSelection(int n) { wxChoice::SetSelection(n); }
79 virtual void SetSelection(long from, long to);
80 virtual void SetEditable(bool editable);
81
82 virtual bool OS2Command(WXUINT param, WXWORD id);
83
84 protected:
85 virtual void DoSetSize(int x, int y,
86 int width, int height,
87 int sizeFlags = wxSIZE_AUTO);
88 };
89
90 #endif // wxUSE_COMBOBOX
91 #endif
92 // _WX_COMBOBOX_H_