]> git.saurik.com Git - wxWidgets.git/blame - include/wx/choice.h
compilation fix (sorry!)
[wxWidgets.git] / include / wx / choice.h
CommitLineData
8d99be5f
VZ
1/////////////////////////////////////////////////////////////////////////////
2// Name: wx/choice.h
3// Purpose: wxChoice class interface
4// Author: Vadim Zeitlin
5// Modified by:
6// Created: 26.07.99
7// RCS-ID: $Id$
8// Copyright: (c) wxWindows team
9// Licence: wxWindows licence
10/////////////////////////////////////////////////////////////////////////////
11
34138703
JS
12#ifndef _WX_CHOICE_H_BASE_
13#define _WX_CHOICE_H_BASE_
c801d85f 14
8d99be5f
VZ
15// ----------------------------------------------------------------------------
16// headers
17// ----------------------------------------------------------------------------
18
19#ifdef __GNUG__
1b68e0b5 20 #pragma interface "choicebase.h"
8d99be5f
VZ
21#endif
22
6c8a980f 23#include "wx/ctrlsub.h" // the base class
8d99be5f
VZ
24
25// ----------------------------------------------------------------------------
26// global data
27// ----------------------------------------------------------------------------
28
29WXDLLEXPORT_DATA(extern const wxChar*) wxChoiceNameStr;
30
31// ----------------------------------------------------------------------------
32// wxChoice allows to select one of a non-modifiable list of strings
33// ----------------------------------------------------------------------------
34
6c8a980f 35class WXDLLEXPORT wxChoiceBase : public wxControlWithItems
8d99be5f
VZ
36{
37public:
6c8a980f 38 // all generic methods are in wxControlWithItems
8d99be5f 39
6c8a980f
VZ
40 // single selection logic
41 virtual void SetSelection(int n) = 0;
42 virtual bool SetStringSelection(const wxString& s);
8d99be5f 43
6c8a980f
VZ
44 // don't override this
45 virtual void Select(int n) { SetSelection(n); }
8d99be5f
VZ
46
47 // set/get the number of columns in the control (as they're not supporte on
48 // most platforms, they do nothing by default)
49 virtual void SetColumns(int WXUNUSED(n) = 1 ) { }
50 virtual int GetColumns() const { return 1 ; }
51
6c8a980f
VZ
52 // emulate selecting the item event.GetInt()
53 void Command(wxCommandEvent& event);
54
8d99be5f
VZ
55};
56
57// ----------------------------------------------------------------------------
58// include the platform-dependent class definition
59// ----------------------------------------------------------------------------
60
2049ba38 61#if defined(__WXMSW__)
8d99be5f 62 #include "wx/msw/choice.h"
2049ba38 63#elif defined(__WXMOTIF__)
8d99be5f 64 #include "wx/motif/choice.h"
2049ba38 65#elif defined(__WXGTK__)
8d99be5f 66 #include "wx/gtk/choice.h"
b4e76e0d 67#elif defined(__WXQT__)
8d99be5f 68 #include "wx/qt/choice.h"
34138703 69#elif defined(__WXMAC__)
8d99be5f 70 #include "wx/mac/choice.h"
1777b9bb
DW
71#elif defined(__WXPM__)
72 #include "wx/os2/choice.h"
34138703 73#elif defined(__WXSTUBS__)
8d99be5f 74 #include "wx/stubs/choice.h"
c801d85f
KB
75#endif
76
77#endif
34138703 78 // _WX_CHOICE_H_BASE_