]> git.saurik.com Git - wxWidgets.git/blob - include/wx/os2/choice.h
added UnsetVirtualSize()
[wxWidgets.git] / include / wx / os2 / choice.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: choice.h
3 // Purpose: wxChoice 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_CHOICE_H_
13 #define _WX_CHOICE_H_
14
15 // Choice item
16 class WXDLLEXPORT wxChoice: public wxChoiceBase
17 {
18 DECLARE_DYNAMIC_CLASS(wxChoice)
19
20 public:
21 // ctors
22 inline wxChoice() { }
23
24 inline wxChoice( wxWindow* pParent
25 ,wxWindowID vId
26 ,const wxPoint& rPos = wxDefaultPosition
27 ,const wxSize& rSize = wxDefaultSize
28 ,int n = 0
29 ,const wxString asChoices[] = NULL
30 ,long lStyle = 0
31 ,const wxValidator& rValidator = wxDefaultValidator
32 ,const wxString& rsName = wxChoiceNameStr
33 )
34 {
35 Create( pParent
36 ,vId
37 ,rPos
38 ,rSize
39 ,n
40 ,asChoices
41 ,lStyle
42 ,rValidator
43 ,rsName
44 );
45 }
46
47 inline wxChoice( wxWindow* pParent
48 ,wxWindowID vId
49 ,const wxPoint& rPos
50 ,const wxSize& rSize
51 ,const wxArrayString& asChoices
52 ,long lStyle = 0
53 ,const wxValidator& rValidator = wxDefaultValidator
54 ,const wxString& rsName = wxChoiceNameStr
55 )
56 {
57 Create( pParent
58 ,vId
59 ,rPos
60 ,rSize
61 ,asChoices
62 ,lStyle
63 ,rValidator
64 ,rsName
65 );
66 }
67
68 bool Create( wxWindow* pParent
69 ,wxWindowID vId
70 ,const wxPoint& rPos = wxDefaultPosition
71 ,const wxSize& rSize = wxDefaultSize
72 ,int n = 0
73 ,const wxString asChoices[] = NULL
74 ,long lStyle = 0
75 ,const wxValidator& rValidator = wxDefaultValidator
76 ,const wxString& rsName = wxChoiceNameStr
77 );
78
79 bool Create( wxWindow* pParent
80 ,wxWindowID vId
81 ,const wxPoint& rPos
82 ,const wxSize& rSize
83 ,const wxArrayString& asChoices
84 ,long lStyle = 0
85 ,const wxValidator& rValidator = wxDefaultValidator
86 ,const wxString& rsName = wxChoiceNameStr
87 );
88
89 //
90 // Implement base class virtuals
91 //
92 virtual int DoAppend(const wxString& rsItem);
93 virtual int DoInsert(const wxString& rsItem, int pos);
94 virtual void Delete(int n);
95 virtual void Clear(void);
96
97 virtual int GetCount(void) const;
98 virtual int GetSelection(void) const ;
99 virtual void SetSelection(int n);
100
101 virtual int FindString(const wxString& rsStr) const;
102 virtual wxString GetString(int n) const ;
103 virtual void SetString( int n
104 ,const wxString& rsStr
105 );
106
107 //
108 // OS2 only
109 //
110 virtual bool OS2Command( WXUINT uParam
111 ,WXWORD wId
112 );
113 MRESULT OS2WindowProc( WXUINT uMsg
114 ,WXWPARAM wParam
115 ,WXLPARAM lParam
116 );
117
118 protected:
119 virtual void DoSetItemClientData( int n
120 ,void* pClientData
121 );
122 virtual void* DoGetItemClientData(int n) const;
123 virtual void DoSetItemClientObject( int n
124 ,wxClientData* pClientData
125 );
126 virtual wxClientData* DoGetItemClientObject(int n) const;
127 virtual wxSize DoGetBestSize(void) const;
128 virtual void DoSetSize( int nX
129 ,int nY
130 ,int nWidth
131 ,int nHeight
132 ,int nsizeFlags = wxSIZE_AUTO
133 );
134 void Free(void);
135 }; // end of CLASS wxChoice
136
137 #endif // _WX_CHOICE_H_