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