]> git.saurik.com Git - wxWidgets.git/blame - include/wx/choice.h
Added simple instructions and autogen.mk to rebuild configure script.
[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$
77ffb593 8// Copyright: (c) wxWidgets team
65571936 9// Licence: wxWindows licence
8d99be5f
VZ
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
12028905 19#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
1b68e0b5 20 #pragma interface "choicebase.h"
8d99be5f
VZ
21#endif
22
2ecf902b
WS
23#include "wx/defs.h"
24
1e6feb95
VZ
25#if wxUSE_CHOICE
26
6c8a980f 27#include "wx/ctrlsub.h" // the base class
8d99be5f
VZ
28
29// ----------------------------------------------------------------------------
30// global data
31// ----------------------------------------------------------------------------
32
16cba29d 33extern WXDLLEXPORT_DATA(const wxChar*) wxChoiceNameStr;
8d99be5f
VZ
34
35// ----------------------------------------------------------------------------
36// wxChoice allows to select one of a non-modifiable list of strings
37// ----------------------------------------------------------------------------
38
6c8a980f 39class WXDLLEXPORT wxChoiceBase : public wxControlWithItems
8d99be5f
VZ
40{
41public:
6463b9f5 42 wxChoiceBase() { }
05689a13 43 virtual ~wxChoiceBase();
8d99be5f 44
fc7a2a60
VZ
45 // all generic methods are in wxControlWithItems
46
3fc2f8c6 47 // set/get the number of columns in the control (as they're not supported on
8d99be5f
VZ
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);
fc7a2a60
VZ
54
55private:
56 DECLARE_NO_COPY_CLASS(wxChoiceBase)
8d99be5f
VZ
57};
58
59// ----------------------------------------------------------------------------
60// include the platform-dependent class definition
61// ----------------------------------------------------------------------------
62
926592a8
VS
63#if defined(__WXUNIVERSAL__)
64 #include "wx/univ/choice.h"
9b141468 65#elif defined(__SMARTPHONE__) && defined(__WXWINCE__)
1550d5f8 66 #include "wx/msw/wince/choicece.h"
926592a8 67#elif defined(__WXMSW__)
8d99be5f 68 #include "wx/msw/choice.h"
2049ba38 69#elif defined(__WXMOTIF__)
8d99be5f 70 #include "wx/motif/choice.h"
2049ba38 71#elif defined(__WXGTK__)
8d99be5f 72 #include "wx/gtk/choice.h"
34138703 73#elif defined(__WXMAC__)
8d99be5f 74 #include "wx/mac/choice.h"
e64df9bc
DE
75#elif defined(__WXCOCOA__)
76 #include "wx/cocoa/choice.h"
1777b9bb
DW
77#elif defined(__WXPM__)
78 #include "wx/os2/choice.h"
c801d85f
KB
79#endif
80
1e6feb95
VZ
81#endif // wxUSE_CHOICE
82
c801d85f 83#endif
34138703 84 // _WX_CHOICE_H_BASE_