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