]>
Commit | Line | Data |
---|---|---|
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 DW |
15 | WXDLLEXPORT_DATA(extern const char*) wxChoiceNameStr; |
16 | ||
17 | // Choice item | |
409c9842 | 18 | class WXDLLEXPORT wxChoice: public wxChoiceBase |
0e320a79 DW |
19 | { |
20 | DECLARE_DYNAMIC_CLASS(wxChoice) | |
21 | ||
dcd307ee DW |
22 | public: |
23 | // ctors | |
24 | inline wxChoice() { } | |
0e320a79 | 25 | |
dcd307ee DW |
26 | inline wxChoice(wxWindow *parent, wxWindowID id, |
27 | const wxPoint& pos = wxDefaultPosition, | |
28 | const wxSize& size = wxDefaultSize, | |
29 | int n = 0, const wxString choices[] = NULL, | |
30 | long style = 0, | |
31 | const wxValidator& validator = wxDefaultValidator, | |
32 | const wxString& name = wxChoiceNameStr) | |
33 | { | |
34 | Create(parent, id, pos, size, n, choices, style, validator, name); | |
35 | } | |
0e320a79 | 36 | |
dcd307ee DW |
37 | bool Create(wxWindow *parent, wxWindowID id, |
38 | const wxPoint& pos = wxDefaultPosition, | |
39 | const wxSize& size = wxDefaultSize, | |
40 | int n = 0, const wxString choices[] = NULL, | |
41 | long style = 0, | |
42 | const wxValidator& validator = wxDefaultValidator, | |
43 | const wxString& name = wxChoiceNameStr); | |
0e320a79 | 44 | |
dcd307ee DW |
45 | // Implement base class virtuals |
46 | virtual int DoAppend(const wxString& item); | |
47 | virtual void Delete(int n); | |
48 | virtual void Clear(); | |
37f214d5 | 49 | |
dcd307ee DW |
50 | virtual int GetCount() const; |
51 | virtual int GetSelection() const ; | |
52 | virtual void SetSelection(int n); | |
37f214d5 | 53 | |
dcd307ee DW |
54 | virtual int FindString(const wxString& s) const; |
55 | virtual wxString GetString(int n) const ; | |
56 | virtual void SetString(int n, const wxString& s); | |
0e320a79 | 57 | |
dcd307ee DW |
58 | // OS2 only |
59 | virtual bool OS2Command(WXUINT param, WXWORD id); | |
60 | MRESULT OS2WindowProc(HWND hwnd, WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam); | |
0e320a79 DW |
61 | |
62 | protected: | |
dcd307ee DW |
63 | virtual void DoSetItemClientData( int n, void* clientData ); |
64 | virtual void* DoGetItemClientData( int n ) const; | |
65 | virtual void DoSetItemClientObject( int n, wxClientData* clientData ); | |
66 | virtual wxClientData* DoGetItemClientObject( int n ) const; | |
37f214d5 DW |
67 | |
68 | // OS2 implementation | |
69 | virtual wxSize DoGetBestSize(); | |
70 | virtual void DoSetSize(int x, int y, | |
71 | int width, int height, | |
72 | int sizeFlags = wxSIZE_AUTO); | |
73 | private: | |
74 | // Virtual function hiding supression | |
dcd307ee | 75 | /* |
37f214d5 DW |
76 | inline virtual void DoSetClientData( void *data ) |
77 | { wxWindowBase::DoSetClientData(data); } | |
78 | inline virtual void DoSetClientObject( wxClientData *data ) | |
79 | { wxWindowBase::DoSetClientObject(data); } | |
80 | inline virtual wxClientData *DoGetClientObject() const | |
81 | { return(wxWindowBase::DoGetClientObject());} | |
82 | inline virtual void *DoGetClientData() const | |
83 | { return(wxWindowBase::DoGetClientData());} | |
dcd307ee | 84 | */ |
0e320a79 DW |
85 | }; |
86 | ||
37f214d5 | 87 | #endif // _WX_CHOICE_H_ |