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