]> git.saurik.com Git - wxWidgets.git/blame_incremental - include/wx/os2/choice.h
Made widgets sample take up less space
[wxWidgets.git] / include / wx / os2 / choice.h
... / ...
CommitLineData
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
16class WXDLLEXPORT wxChoice: public wxChoiceBase
17{
18 DECLARE_DYNAMIC_CLASS(wxChoice)
19
20public:
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#if wxUSE_VALIDATORS
32 ,const wxValidator& rValidator = wxDefaultValidator
33#endif
34 ,const wxString& rsName = wxChoiceNameStr
35 )
36 {
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 );
49 }
50
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
58#if wxUSE_VALIDATORS
59 ,const wxValidator& rValidator = wxDefaultValidator
60#endif
61 ,const wxString& rsName = wxChoiceNameStr
62 );
63
64 //
65 // Implement base class virtuals
66 //
67 virtual int DoAppend(const wxString& rsItem);
68 virtual void Delete(int n);
69 virtual void Clear(void);
70
71 virtual int GetCount(void) const;
72 virtual int GetSelection(void) const ;
73 virtual void SetSelection(int n);
74
75 virtual int FindString(const wxString& rsStr) const;
76 virtual wxString GetString(int n) const ;
77 virtual void SetString( int n
78 ,const wxString& rsStr
79 );
80
81 //
82 // OS2 only
83 //
84 virtual bool OS2Command( WXUINT uParam
85 ,WXWORD wId
86 );
87 MRESULT OS2WindowProc( WXUINT uMsg
88 ,WXWPARAM wParam
89 ,WXLPARAM lParam
90 );
91
92protected:
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
110
111#endif // _WX_CHOICE_H_