]> git.saurik.com Git - wxWidgets.git/blame_incremental - include/wx/os2/choice.h
don't do anything in SetWindowMenu() if we're setting the same menu as we already...
[wxWidgets.git] / include / wx / os2 / choice.h
... / ...
CommitLineData
1/////////////////////////////////////////////////////////////////////////////
2// Name: wx/os2/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// ----------------------------------------------------------------------------
16// Choice item
17// ----------------------------------------------------------------------------
18
19class WXDLLIMPEXP_CORE wxChoice: public wxChoiceBase
20{
21 DECLARE_DYNAMIC_CLASS(wxChoice)
22
23public:
24 // ctors
25 inline wxChoice() { }
26 virtual ~wxChoice();
27
28 inline wxChoice( wxWindow* pParent
29 ,wxWindowID vId
30 ,const wxPoint& rPos = wxDefaultPosition
31 ,const wxSize& rSize = wxDefaultSize
32 ,int n = 0
33 ,const wxString asChoices[] = NULL
34 ,long lStyle = 0
35 ,const wxValidator& rValidator = wxDefaultValidator
36 ,const wxString& rsName = wxChoiceNameStr
37 )
38 {
39 Create( pParent
40 ,vId
41 ,rPos
42 ,rSize
43 ,n
44 ,asChoices
45 ,lStyle
46 ,rValidator
47 ,rsName
48 );
49 }
50
51 inline wxChoice( wxWindow* pParent
52 ,wxWindowID vId
53 ,const wxPoint& rPos
54 ,const wxSize& rSize
55 ,const wxArrayString& asChoices
56 ,long lStyle = 0
57 ,const wxValidator& rValidator = wxDefaultValidator
58 ,const wxString& rsName = wxChoiceNameStr
59 )
60 {
61 Create( pParent
62 ,vId
63 ,rPos
64 ,rSize
65 ,asChoices
66 ,lStyle
67 ,rValidator
68 ,rsName
69 );
70 }
71
72 bool Create( wxWindow* pParent
73 ,wxWindowID vId
74 ,const wxPoint& rPos = wxDefaultPosition
75 ,const wxSize& rSize = wxDefaultSize
76 ,int n = 0
77 ,const wxString asChoices[] = NULL
78 ,long lStyle = 0
79 ,const wxValidator& rValidator = wxDefaultValidator
80 ,const wxString& rsName = wxChoiceNameStr
81 );
82
83 bool Create( wxWindow* pParent
84 ,wxWindowID vId
85 ,const wxPoint& rPos
86 ,const wxSize& rSize
87 ,const wxArrayString& asChoices
88 ,long lStyle = 0
89 ,const wxValidator& rValidator = wxDefaultValidator
90 ,const wxString& rsName = wxChoiceNameStr
91 );
92
93 //
94 // Implement base class virtuals
95 //
96 virtual void DoDeleteOneItem(unsigned int n);
97 virtual void DoClear(void);
98
99 virtual unsigned int GetCount() const;
100 virtual int GetSelection(void) const;
101 virtual void SetSelection(int n);
102
103 virtual wxString GetString(unsigned int n) const;
104 virtual void SetString(unsigned int n, const wxString& rsStr);
105
106 //
107 // OS2 only
108 //
109 virtual bool OS2Command( WXUINT uParam
110 ,WXWORD wId
111 );
112 MRESULT OS2WindowProc( WXUINT uMsg
113 ,WXWPARAM wParam
114 ,WXLPARAM lParam
115 );
116
117protected:
118 virtual int DoInsertItems(const wxArrayStringsAdapter& items,
119 unsigned int pos,
120 void **clientData,
121 wxClientDataType type);
122
123 virtual void DoSetItemClientData(unsigned int n, void* pClientData);
124 virtual void* DoGetItemClientData(unsigned int n) const;
125 virtual wxSize DoGetBestSize(void) const;
126 virtual void DoSetSize( int nX
127 ,int nY
128 ,int nWidth
129 ,int nHeight
130 ,int nsizeFlags = wxSIZE_AUTO
131 );
132 void Free(void);
133}; // end of CLASS wxChoice
134
135#endif // _WX_CHOICE_H_