]> git.saurik.com Git - wxWidgets.git/blame - include/wx/os2/choice.h
Added reparenting helper classes to help apps to grab the windows
[wxWidgets.git] / include / wx / os2 / choice.h
CommitLineData
0e320a79
DW
1/////////////////////////////////////////////////////////////////////////////
2// Name: choice.h
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
DW
8// Copyright: (c) David Webster
9// Licence: wxWindows licence
0e320a79
DW
10/////////////////////////////////////////////////////////////////////////////
11
12#ifndef _WX_CHOICE_H_
13#define _WX_CHOICE_H_
14
0e320a79 15// Choice item
409c9842 16class WXDLLEXPORT wxChoice: public wxChoiceBase
0e320a79
DW
17{
18 DECLARE_DYNAMIC_CLASS(wxChoice)
19
dcd307ee
DW
20public:
21 // ctors
22 inline wxChoice() { }
0e320a79 23
fb49f3b3
DW
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
57c4d796 31#if wxUSE_VALIDATORS
fb49f3b3 32 ,const wxValidator& rValidator = wxDefaultValidator
57c4d796 33#endif
fb49f3b3
DW
34 ,const wxString& rsName = wxChoiceNameStr
35 )
dcd307ee 36 {
fb49f3b3
DW
37 Create( pParent
38 ,vId
39 ,rPos
40 ,rSize
41 ,n
42 ,asChoices
43 ,lStyle
44#if wxUSE_VALIDATORS
45 ,rValidator
46#endif
47 ,rsName
48 );
dcd307ee 49 }
0e320a79 50
fb49f3b3
DW
51 bool Create( wxWindow* pParent
52 ,wxWindowID vId
53 ,const wxPoint& rPos = wxDefaultPosition
54 ,const wxSize& rSize = wxDefaultSize
55 ,int n = 0
56 ,const wxString asChoices[] = NULL
57 ,long lStyle = 0
57c4d796 58#if wxUSE_VALIDATORS
fb49f3b3 59 ,const wxValidator& rValidator = wxDefaultValidator
57c4d796 60#endif
fb49f3b3
DW
61 ,const wxString& rsName = wxChoiceNameStr
62 );
0e320a79 63
fb49f3b3 64 //
dcd307ee 65 // Implement base class virtuals
fb49f3b3
DW
66 //
67 virtual int DoAppend(const wxString& rsItem);
68 virtual void Delete(int n);
69 virtual void Clear(void);
37f214d5 70
fb49f3b3
DW
71 virtual int GetCount(void) const;
72 virtual int GetSelection(void) const ;
73 virtual void SetSelection(int n);
37f214d5 74
fb49f3b3 75 virtual int FindString(const wxString& rsStr) const;
dcd307ee 76 virtual wxString GetString(int n) const ;
fb49f3b3
DW
77 virtual void SetString( int n
78 ,const wxString& rsStr
79 );
0e320a79 80
fb49f3b3 81 //
dcd307ee 82 // OS2 only
fb49f3b3
DW
83 //
84 virtual bool OS2Command( WXUINT uParam
85 ,WXWORD wId
86 );
87 MRESULT OS2WindowProc( WXUINT uMsg
88 ,WXWPARAM wParam
89 ,WXLPARAM lParam
90 );
0e320a79
DW
91
92protected:
fb49f3b3
DW
93 virtual void DoSetItemClientData( int n
94 ,void* pClientData
95 );
96 virtual void* DoGetItemClientData(int n) const;
97 virtual void DoSetItemClientObject( int n
98 ,wxClientData* pClientData
99 );
100 virtual wxClientData* DoGetItemClientObject(int n) const;
101 virtual wxSize DoGetBestSize(void) const;
102 virtual void DoSetSize( int nX
103 ,int nY
104 ,int nWidth
105 ,int nHeight
106 ,int nsizeFlags = wxSIZE_AUTO
107 );
108 void Free(void);
109}; // end of CLASS wxChoice
0e320a79 110
37f214d5 111#endif // _WX_CHOICE_H_