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