]> git.saurik.com Git - wxWidgets.git/blame - include/wx/msw/choice.h
*** empty log message ***
[wxWidgets.git] / include / wx / msw / choice.h
CommitLineData
2bda0e17
KB
1/////////////////////////////////////////////////////////////////////////////
2// Name: choice.h
3// Purpose: wxChoice class
4// Author: Julian Smart
8d99be5f 5// Modified by: Vadim Zeitlin to derive from wxChoiceBase
2bda0e17
KB
6// Created: 01/02/97
7// RCS-ID: $Id$
bbcdf8bc 8// Copyright: (c) Julian Smart
8d99be5f 9// Licence: wxWindows licence
2bda0e17
KB
10/////////////////////////////////////////////////////////////////////////////
11
bbcdf8bc
JS
12#ifndef _WX_CHOICE_H_
13#define _WX_CHOICE_H_
2bda0e17
KB
14
15#ifdef __GNUG__
8d99be5f 16 #pragma interface "choice.h"
2bda0e17
KB
17#endif
18
8d99be5f 19// ----------------------------------------------------------------------------
2bda0e17 20// Choice item
8d99be5f
VZ
21// ----------------------------------------------------------------------------
22
23class WXDLLEXPORT wxChoice : public wxChoiceBase
2bda0e17 24{
bfc6fde4
VZ
25 DECLARE_DYNAMIC_CLASS(wxChoice)
26
27public:
8d99be5f
VZ
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)
bfc6fde4
VZ
39 {
40 Create(parent, id, pos, size, n, choices, style, validator, name);
41 }
42
8d99be5f
VZ
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);
bfc6fde4
VZ
54 virtual void Delete(int n);
55 virtual void Clear();
8d99be5f
VZ
56
57 virtual int GetCount() const;
58 virtual int GetSelection() const;
bfc6fde4 59 virtual void SetSelection(int n);
bfc6fde4 60
8d99be5f
VZ
61 virtual int FindString(const wxString& s) const;
62 virtual wxString GetString(int n) const;
bfc6fde4 63
8d99be5f 64 // MSW only
bfc6fde4 65 virtual bool MSWCommand(WXUINT param, WXWORD id);
bfc6fde4 66 long MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam);
bbcdf8bc
JS
67
68protected:
8d99be5f
VZ
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;
bbcdf8bc 73
8d99be5f 74 // MSW implementation
4438caf4 75 virtual wxSize DoGetBestSize();
bfc6fde4 76 virtual void DoSetSize(int x, int y,
4438caf4
VZ
77 int width, int height,
78 int sizeFlags = wxSIZE_AUTO);
2bda0e17
KB
79};
80
8d99be5f 81#endif // _WX_CHOICE_H_