]> git.saurik.com Git - wxWidgets.git/blob - include/wx/os2/combobox.h
1. wxImageHandler::DoCanRead() introduced to solve the virtual function name
[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 const wxValidator& validator = wxDefaultValidator,
37 const wxString& name = wxComboBoxNameStr)
38 {
39 Create(parent, id, value, pos, size, n, choices, style, validator, name);
40 }
41
42 bool Create(wxWindow *parent, wxWindowID id,
43 const wxString& value = wxEmptyString,
44 const wxPoint& pos = wxDefaultPosition,
45 const wxSize& size = wxDefaultSize,
46 int n = 0, const wxString choices[] = NULL,
47 long style = 0,
48 const wxValidator& validator = wxDefaultValidator,
49 const wxString& name = wxComboBoxNameStr);
50
51 // List functions: see wxChoice
52
53 wxString GetValue() const { return GetLabel(); }
54 virtual void SetValue(const wxString& value);
55
56 // Clipboard operations
57 virtual void Copy();
58 virtual void Cut();
59 virtual void Paste();
60 virtual void SetInsertionPoint(long pos);
61 virtual void SetInsertionPointEnd();
62 virtual long GetInsertionPoint() const;
63 virtual long GetLastPosition() const;
64 virtual void Replace(long from, long to, const wxString& value);
65 virtual void Remove(long from, long to);
66 virtual void SetSelection(int n) { wxChoice::SetSelection(n); }
67 virtual void SetSelection(long from, long to);
68 virtual void SetEditable(bool editable);
69
70 virtual bool OS2Command(WXUINT param, WXWORD id);
71
72 protected:
73 virtual void DoSetSize(int x, int y,
74 int width, int height,
75 int sizeFlags = wxSIZE_AUTO);
76 };
77
78 #endif // wxUSE_COMBOBOX
79 #endif
80 // _WX_COMBOBOX_H_