]> git.saurik.com Git - wxWidgets.git/blob - include/wx/msw/choice.h
wxUSE_GIF instead of wxUSE_LIBGIF
[wxWidgets.git] / include / wx / msw / choice.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: choice.h
3 // Purpose: wxChoice class
4 // Author: Julian Smart
5 // Modified by: Vadim Zeitlin to derive from wxChoiceBase
6 // Created: 01/02/97
7 // RCS-ID: $Id$
8 // Copyright: (c) Julian Smart
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
11
12 #ifndef _WX_CHOICE_H_
13 #define _WX_CHOICE_H_
14
15 #ifdef __GNUG__
16 #pragma interface "choice.h"
17 #endif
18
19 // ----------------------------------------------------------------------------
20 // Choice item
21 // ----------------------------------------------------------------------------
22
23 class WXDLLEXPORT wxChoice : public wxChoiceBase
24 {
25 DECLARE_DYNAMIC_CLASS(wxChoice)
26
27 public:
28 // ctors
29 wxChoice() { }
30
31 wxChoice(wxWindow *parent,
32 wxWindowID id,
33 const wxPoint& pos = wxDefaultPosition,
34 const wxSize& size = wxDefaultSize,
35 int n = 0, const wxString choices[] = NULL,
36 long style = 0,
37 const wxValidator& validator = wxDefaultValidator,
38 const wxString& name = wxChoiceNameStr)
39 {
40 Create(parent, id, pos, size, n, choices, style, validator, name);
41 }
42
43 bool Create(wxWindow *parent,
44 wxWindowID id,
45 const wxPoint& pos = wxDefaultPosition,
46 const wxSize& size = wxDefaultSize,
47 int n = 0, const wxString choices[] = NULL,
48 long style = 0,
49 const wxValidator& validator = wxDefaultValidator,
50 const wxString& name = wxChoiceNameStr);
51
52 // implement base class pure virtuals
53 virtual void DoAppend(const wxString& item);
54 virtual void Delete(int n);
55 virtual void Clear();
56
57 virtual int GetCount() const;
58 virtual int GetSelection() const;
59 virtual void SetSelection(int n);
60
61 virtual int FindString(const wxString& s) const;
62 virtual wxString GetString(int n) const;
63
64 // MSW only
65 virtual bool MSWCommand(WXUINT param, WXWORD id);
66 long MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam);
67
68 protected:
69 virtual void DoSetClientData( int n, void* clientData );
70 virtual void* DoGetClientData( int n ) const;
71 virtual void DoSetClientObject( int n, wxClientData* clientData );
72 virtual wxClientData* DoGetClientObject( int n ) const;
73
74 // MSW implementation
75 virtual wxSize DoGetBestSize();
76 virtual void DoSetSize(int x, int y,
77 int width, int height,
78 int sizeFlags = wxSIZE_AUTO);
79 };
80
81 #endif // _WX_CHOICE_H_