]> git.saurik.com Git - wxWidgets.git/blame - include/wx/os2/choice.h
Automatically adjust toolbar's tool size if the provided bitmaps
[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
53a2db12 19class WXDLLIMPEXP_CORE 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 //
a236aa20
VZ
96 virtual void DoDeleteOneItem(unsigned int n);
97 virtual void DoClear(void);
37f214d5 98
aa61d352
VZ
99 virtual unsigned int GetCount() const;
100 virtual int GetSelection(void) const;
fb49f3b3 101 virtual void SetSelection(int n);
37f214d5 102
aa61d352
VZ
103 virtual wxString GetString(unsigned int n) const;
104 virtual void SetString(unsigned int n, const wxString& rsStr);
0e320a79 105
fb49f3b3 106 //
dcd307ee 107 // OS2 only
fb49f3b3
DW
108 //
109 virtual bool OS2Command( WXUINT uParam
110 ,WXWORD wId
111 );
112 MRESULT OS2WindowProc( WXUINT uMsg
113 ,WXWPARAM wParam
114 ,WXLPARAM lParam
115 );
0e320a79
DW
116
117protected:
a236aa20
VZ
118 virtual int DoInsertItems(const wxArrayStringsAdapter& items,
119 unsigned int pos,
120 void **clientData,
121 wxClientDataType type);
122
0934d91c 123 virtual void DoSetItemClientData(unsigned int n, void* pClientData);
aa61d352 124 virtual void* DoGetItemClientData(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_