]> git.saurik.com Git - wxWidgets.git/blame - include/wx/os2/choice.h
Removed no longer needed "DECLARE_EVENT_TABLE()" completing the previous change.
[wxWidgets.git] / include / wx / os2 / choice.h
CommitLineData
0e320a79 1/////////////////////////////////////////////////////////////////////////////
853dcc57 2// Name: wx/os2/choice.h
0e320a79 3// Purpose: wxChoice class
37f214d5 4// Author: David Webster
0e320a79 5// Modified by:
37f214d5 6// Created: 10/13/99
0e320a79 7// RCS-ID: $Id$
37f214d5 8// Copyright: (c) David Webster
65571936 9// Licence: wxWindows licence
0e320a79
DW
10/////////////////////////////////////////////////////////////////////////////
11
12#ifndef _WX_CHOICE_H_
13#define _WX_CHOICE_H_
14
0934d91c 15// ----------------------------------------------------------------------------
0e320a79 16// Choice item
0934d91c
SN
17// ----------------------------------------------------------------------------
18
409c9842 19class WXDLLEXPORT wxChoice: public wxChoiceBase
0e320a79
DW
20{
21 DECLARE_DYNAMIC_CLASS(wxChoice)
22
dcd307ee
DW
23public:
24 // ctors
1ebd017e 25 inline wxChoice() { }
0934d91c 26 virtual ~wxChoice();
0e320a79 27
fb49f3b3
DW
28 inline wxChoice( wxWindow* pParent
29 ,wxWindowID vId
30 ,const wxPoint& rPos = wxDefaultPosition
31 ,const wxSize& rSize = wxDefaultSize
32 ,int n = 0
33 ,const wxString asChoices[] = NULL
34 ,long lStyle = 0
fb49f3b3 35 ,const wxValidator& rValidator = wxDefaultValidator
fb49f3b3
DW
36 ,const wxString& rsName = wxChoiceNameStr
37 )
dcd307ee 38 {
fb49f3b3
DW
39 Create( pParent
40 ,vId
41 ,rPos
42 ,rSize
43 ,n
44 ,asChoices
45 ,lStyle
fb49f3b3 46 ,rValidator
fb49f3b3
DW
47 ,rsName
48 );
dcd307ee 49 }
0e320a79 50
584ad2a3
MB
51 inline wxChoice( wxWindow* pParent
52 ,wxWindowID vId
53 ,const wxPoint& rPos
54 ,const wxSize& rSize
55 ,const wxArrayString& asChoices
56 ,long lStyle = 0
57 ,const wxValidator& rValidator = wxDefaultValidator
58 ,const wxString& rsName = wxChoiceNameStr
59 )
60 {
61 Create( pParent
62 ,vId
63 ,rPos
64 ,rSize
65 ,asChoices
66 ,lStyle
67 ,rValidator
68 ,rsName
69 );
70 }
71
fb49f3b3
DW
72 bool Create( wxWindow* pParent
73 ,wxWindowID vId
74 ,const wxPoint& rPos = wxDefaultPosition
75 ,const wxSize& rSize = wxDefaultSize
76 ,int n = 0
77 ,const wxString asChoices[] = NULL
78 ,long lStyle = 0
fb49f3b3 79 ,const wxValidator& rValidator = wxDefaultValidator
fb49f3b3
DW
80 ,const wxString& rsName = wxChoiceNameStr
81 );
0e320a79 82
584ad2a3
MB
83 bool Create( wxWindow* pParent
84 ,wxWindowID vId
85 ,const wxPoint& rPos
86 ,const wxSize& rSize
87 ,const wxArrayString& asChoices
88 ,long lStyle = 0
89 ,const wxValidator& rValidator = wxDefaultValidator
90 ,const wxString& rsName = wxChoiceNameStr
91 );
92
fb49f3b3 93 //
dcd307ee 94 // Implement base class virtuals
fb49f3b3 95 //
aa61d352 96 virtual void Delete(unsigned int n);
fb49f3b3 97 virtual void Clear(void);
37f214d5 98
aa61d352
VZ
99 virtual unsigned int GetCount() const;
100 virtual int GetSelection(void) const;
1ebd017e 101 virtual int GetCurrentSelection(void) const { return GetSelection(); }
fb49f3b3 102 virtual void SetSelection(int n);
37f214d5 103
aa61d352
VZ
104 virtual wxString GetString(unsigned int n) const;
105 virtual void SetString(unsigned int n, const wxString& rsStr);
0e320a79 106
fb49f3b3 107 //
dcd307ee 108 // OS2 only
fb49f3b3
DW
109 //
110 virtual bool OS2Command( WXUINT uParam
111 ,WXWORD wId
112 );
113 MRESULT OS2WindowProc( WXUINT uMsg
114 ,WXWPARAM wParam
115 ,WXLPARAM lParam
116 );
0e320a79
DW
117
118protected:
0934d91c
SN
119 virtual int DoAppend(const wxString& rsItem);
120 virtual int DoInsert(const wxString& rsItem, unsigned int pos);
121 virtual void DoSetItemClientData(unsigned int n, void* pClientData);
aa61d352
VZ
122 virtual void* DoGetItemClientData(unsigned int n) const;
123 virtual void DoSetItemClientObject(unsigned int n, wxClientData* pClientData);
124 virtual wxClientData* DoGetItemClientObject(unsigned int n) const;
fb49f3b3
DW
125 virtual wxSize DoGetBestSize(void) const;
126 virtual void DoSetSize( int nX
127 ,int nY
128 ,int nWidth
129 ,int nHeight
130 ,int nsizeFlags = wxSIZE_AUTO
131 );
132 void Free(void);
133}; // end of CLASS wxChoice
0e320a79 134
37f214d5 135#endif // _WX_CHOICE_H_