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