]> git.saurik.com Git - wxWidgets.git/blob - include/wx/os2/combobox.h
no changes
[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 // Combobox item
20 class WXDLLEXPORT wxComboBox : public wxChoice
21 {
22
23 public:
24 inline wxComboBox() {}
25
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
34 #if wxUSE_VALIDATORS
35 ,const wxValidator& rValidator = wxDefaultValidator
36 #endif
37 ,const wxString& rsName = wxComboBoxNameStr
38 )
39 {
40 Create( pParent
41 ,vId
42 ,rsValue
43 ,rPos
44 ,rSize
45 ,n
46 ,asChoices
47 ,lStyle
48 #if wxUSE_VALIDATORS
49 ,rValidator
50 #endif
51 ,rsName
52 );
53 }
54
55 bool Create( wxWindow* pParent
56 ,wxWindowID vId
57 ,const wxString& rsValue = wxEmptyString
58 ,const wxPoint& rPos = wxDefaultPosition
59 ,const wxSize& rSize = wxDefaultSize
60 ,int n = 0
61 ,const wxString asChoices[] = NULL
62 ,long lStyle = 0
63 #if wxUSE_VALIDATORS
64 ,const wxValidator& rValidator = wxDefaultValidator
65 #endif
66 ,const wxString& rsName = wxComboBoxNameStr
67 );
68
69 //
70 // List functions: see wxChoice
71 //
72 inline wxString GetValue(void) const { return GetLabel(); }
73 virtual void SetValue(const wxString& rsValue);
74
75 //
76 // Clipboard operations
77 //
78 virtual void Copy();
79 virtual void Cut();
80 virtual void Paste();
81
82 virtual void SetInsertionPoint(long lPos);
83 virtual void SetInsertionPointEnd(void);
84 virtual long GetInsertionPoint(void) const;
85 virtual long GetLastPosition(void) const;
86 virtual void Replace( long lFrom
87 ,long lTo
88 ,const wxString& rsValue
89 );
90 virtual void Remove( long lFrom
91 ,long lTo
92 );
93 inline virtual void SetSelection(int n) { wxChoice::SetSelection(n); }
94 virtual void SetSelection( long lFrom
95 ,long lTo
96 );
97 virtual void SetEditable(bool bEditable);
98
99 virtual bool OS2Command( WXUINT uParam
100 ,WXWORD wId
101 );
102 bool ProcessEditMsg( WXUINT uMsg
103 ,WXWPARAM wParam
104 ,WXLPARAM lParam
105 );
106
107 protected:
108 virtual void DoSetSize( int nX
109 ,int nY
110 ,int nWidth
111 ,int nHeight
112 ,int nSizeFlags = wxSIZE_AUTO
113 );
114 private:
115 DECLARE_DYNAMIC_CLASS(wxComboBox)
116 }; // end of CLASS wxComboBox
117
118 #endif // wxUSE_COMBOBOX
119 #endif
120 // _WX_COMBOBOX_H_