]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/palmos/choice.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/palmos/choice.h
3 // Purpose: wxChoice class
4 // Author: William Osborne - minimal working wxPalmOS port
8 // Copyright: (c) William Osborne
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
15 // ----------------------------------------------------------------------------
17 // ----------------------------------------------------------------------------
19 class WXDLLEXPORT wxChoice
: public wxChoiceBase
26 wxChoice(wxWindow
*parent
,
28 const wxPoint
& pos
= wxDefaultPosition
,
29 const wxSize
& size
= wxDefaultSize
,
30 int n
= 0, const wxString choices
[] = NULL
,
32 const wxValidator
& validator
= wxDefaultValidator
,
33 const wxString
& name
= wxChoiceNameStr
)
35 Create(parent
, id
, pos
, size
, n
, choices
, style
, validator
, name
);
37 wxChoice(wxWindow
*parent
,
41 const wxArrayString
& choices
,
43 const wxValidator
& validator
= wxDefaultValidator
,
44 const wxString
& name
= wxChoiceNameStr
)
46 Create(parent
, id
, pos
, size
, choices
, style
, validator
, name
);
49 bool Create(wxWindow
*parent
,
51 const wxPoint
& pos
= wxDefaultPosition
,
52 const wxSize
& size
= wxDefaultSize
,
53 int n
= 0, const wxString choices
[] = NULL
,
55 const wxValidator
& validator
= wxDefaultValidator
,
56 const wxString
& name
= wxChoiceNameStr
);
57 bool Create(wxWindow
*parent
,
61 const wxArrayString
& choices
,
63 const wxValidator
& validator
= wxDefaultValidator
,
64 const wxString
& name
= wxChoiceNameStr
);
66 // implement base class pure virtuals
67 virtual int DoAppend(const wxString
& item
);
68 virtual int DoInsert(const wxString
& item
, int pos
);
69 virtual void Delete(int n
);
72 virtual int GetCount() const;
73 virtual int GetSelection() const;
74 virtual void SetSelection(int n
);
76 virtual wxString
GetString(int n
) const;
77 virtual void SetString(int n
, const wxString
& s
);
80 virtual bool MSWCommand(WXUINT param
, WXWORD id
);
81 WXLRESULT
MSWWindowProc(WXUINT nMsg
, WXWPARAM wParam
, WXLPARAM lParam
);
84 virtual void DoMoveWindow(int x
, int y
, int width
, int height
);
85 virtual void DoSetItemClientData( int n
, void* clientData
);
86 virtual void* DoGetItemClientData( int n
) const;
87 virtual void DoSetItemClientObject( int n
, wxClientData
* clientData
);
88 virtual wxClientData
* DoGetItemClientObject( int n
) const;
91 virtual wxSize
DoGetBestSize() const;
92 virtual void DoGetSize(int *w
, int *h
) const;
93 virtual void DoSetSize(int x
, int y
,
94 int width
, int height
,
95 int sizeFlags
= wxSIZE_AUTO
);
97 virtual bool MSWShouldPreProcessMessage(WXMSG
*pMsg
);
99 virtual WXDWORD
MSWGetStyle(long style
, WXDWORD
*exstyle
) const;
101 // update the height of the drop down list to fit the number of items we
102 // have (without changing the visible height)
103 void UpdateVisibleHeight();
105 // create and initialize the control
106 bool CreateAndInit(wxWindow
*parent
, wxWindowID id
,
109 int n
, const wxString choices
[],
111 const wxValidator
& validator
,
112 const wxString
& name
);
114 // free all memory we have (used by Clear() and dtor)
117 DECLARE_DYNAMIC_CLASS_NO_COPY(wxChoice
)
120 #endif // _WX_CHOICE_H_