]> git.saurik.com Git - wxWidgets.git/blame - include/wx/palmos/choice.h
Remove now unused header. Forward declaration is enough for wxBookCtrl and wxNotebook.
[wxWidgets.git] / include / wx / palmos / choice.h
CommitLineData
ffecfa5a 1/////////////////////////////////////////////////////////////////////////////
e1d63b79 2// Name: wx/palmos/choice.h
ffecfa5a 3// Purpose: wxChoice class
e1d63b79 4// Author: William Osborne - minimal working wxPalmOS port
ffecfa5a
JS
5// Modified by:
6// Created: 10/13/04
e1d63b79 7// RCS-ID: $Id$
ffecfa5a
JS
8// Copyright: (c) William Osborne
9// Licence: wxWindows licence
10/////////////////////////////////////////////////////////////////////////////
11
12#ifndef _WX_CHOICE_H_
13#define _WX_CHOICE_H_
14
ffecfa5a
JS
15// ----------------------------------------------------------------------------
16// Choice item
17// ----------------------------------------------------------------------------
18
19class WXDLLEXPORT wxChoice : public wxChoiceBase
20{
21public:
22 // ctors
23 wxChoice() { }
24 virtual ~wxChoice();
25
26 wxChoice(wxWindow *parent,
27 wxWindowID id,
28 const wxPoint& pos = wxDefaultPosition,
29 const wxSize& size = wxDefaultSize,
30 int n = 0, const wxString choices[] = NULL,
31 long style = 0,
32 const wxValidator& validator = wxDefaultValidator,
33 const wxString& name = wxChoiceNameStr)
34 {
35 Create(parent, id, pos, size, n, choices, style, validator, name);
36 }
37 wxChoice(wxWindow *parent,
38 wxWindowID id,
39 const wxPoint& pos,
40 const wxSize& size,
41 const wxArrayString& choices,
42 long style = 0,
43 const wxValidator& validator = wxDefaultValidator,
44 const wxString& name = wxChoiceNameStr)
45 {
46 Create(parent, id, pos, size, choices, style, validator, name);
47 }
48
49 bool Create(wxWindow *parent,
50 wxWindowID id,
51 const wxPoint& pos = wxDefaultPosition,
52 const wxSize& size = wxDefaultSize,
53 int n = 0, const wxString choices[] = NULL,
54 long style = 0,
55 const wxValidator& validator = wxDefaultValidator,
56 const wxString& name = wxChoiceNameStr);
57 bool Create(wxWindow *parent,
58 wxWindowID id,
59 const wxPoint& pos,
60 const wxSize& size,
61 const wxArrayString& choices,
62 long style = 0,
63 const wxValidator& validator = wxDefaultValidator,
64 const wxString& name = wxChoiceNameStr);
65
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);
70 virtual void Clear();
71
72 virtual int GetCount() const;
73 virtual int GetSelection() const;
74 virtual void SetSelection(int n);
75
76 virtual int FindString(const wxString& s) const;
77 virtual wxString GetString(int n) const;
78 virtual void SetString(int n, const wxString& s);
79
80 // MSW only
81 virtual bool MSWCommand(WXUINT param, WXWORD id);
82 WXLRESULT MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam);
ffecfa5a
JS
83
84protected:
85 virtual void DoMoveWindow(int x, int y, int width, int height);
86 virtual void DoSetItemClientData( int n, void* clientData );
87 virtual void* DoGetItemClientData( int n ) const;
88 virtual void DoSetItemClientObject( int n, wxClientData* clientData );
89 virtual wxClientData* DoGetItemClientObject( int n ) const;
90
91 // MSW implementation
92 virtual wxSize DoGetBestSize() const;
93 virtual void DoGetSize(int *w, int *h) const;
94 virtual void DoSetSize(int x, int y,
95 int width, int height,
96 int sizeFlags = wxSIZE_AUTO);
97
98 virtual bool MSWShouldPreProcessMessage(WXMSG *pMsg);
99
100 virtual WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) const;
101
102 // update the height of the drop down list to fit the number of items we
103 // have (without changing the visible height)
104 void UpdateVisibleHeight();
105
106 // create and initialize the control
107 bool CreateAndInit(wxWindow *parent, wxWindowID id,
108 const wxPoint& pos,
109 const wxSize& size,
110 int n, const wxString choices[],
111 long style,
112 const wxValidator& validator,
113 const wxString& name);
114
115 // free all memory we have (used by Clear() and dtor)
116 void Free();
117
118 DECLARE_DYNAMIC_CLASS_NO_COPY(wxChoice)
119};
120
121#endif // _WX_CHOICE_H_