]> git.saurik.com Git - wxWidgets.git/blame - include/wx/gtk1/choice.h
don't try to build shared library on platforms not supporting it
[wxWidgets.git] / include / wx / gtk1 / choice.h
CommitLineData
c801d85f
KB
1/////////////////////////////////////////////////////////////////////////////
2// Name: choice.h
3// Purpose:
4// Author: Robert Roebling
dbf858b5 5// Id: $Id$
01111366 6// Copyright: (c) 1998 Robert Roebling
29006414 7// Licence: wxWindows licence
c801d85f
KB
8/////////////////////////////////////////////////////////////////////////////
9
c801d85f
KB
10#ifndef __GTKCHOICEH__
11#define __GTKCHOICEH__
12
13#ifdef __GNUG__
14#pragma interface
15#endif
16
17#include "wx/defs.h"
ce4169a4 18
c801d85f
KB
19#include "wx/object.h"
20#include "wx/list.h"
21#include "wx/control.h"
22
23//-----------------------------------------------------------------------------
24// classes
25//-----------------------------------------------------------------------------
26
27class wxChoice;
28
29//-----------------------------------------------------------------------------
30// global data
31//-----------------------------------------------------------------------------
32
b2158ed0 33extern const wxChar *wxChoiceNameStr;
c801d85f
KB
34
35//-----------------------------------------------------------------------------
36// wxChoice
37//-----------------------------------------------------------------------------
38
29006414 39class wxChoice : public wxControl
c801d85f 40{
fd0eed64 41public:
29006414
VZ
42 wxChoice();
43 wxChoice( wxWindow *parent, wxWindowID id,
44 const wxPoint& pos = wxDefaultPosition,
45 const wxSize& size = wxDefaultSize,
46 int n = 0, const wxString choices[] = (const wxString *) NULL,
47 long style = 0,
48 const wxValidator& validator = wxDefaultValidator,
49 const wxString& name = wxChoiceNameStr )
50 {
51 Create(parent, id, pos, size, n, choices, style, validator, name);
52 }
53 ~wxChoice();
54 bool Create( wxWindow *parent, wxWindowID id,
55 const wxPoint& pos = wxDefaultPosition,
56 const wxSize& size = wxDefaultSize,
57 int n = 0, const wxString choices[] = (wxString *) NULL,
58 long style = 0,
59 const wxValidator& validator = wxDefaultValidator,
60 const wxString& name = wxChoiceNameStr );
c801d85f 61
29006414
VZ
62 void Append( const wxString &item );
63 void Append( const wxString &item, void* clientData );
64 void Append( const wxString &item, wxClientData* clientData );
65
66 void SetClientData( int n, void* clientData );
67 void* GetClientData( int n );
68 void SetClientObject( int n, wxClientData* clientData );
69 wxClientData* GetClientObject( int n );
70
0de9b5b2
RR
71 void SetClientObject( wxClientData *data ) { wxControl::SetClientObject( data ); }
72 wxClientData *GetClientObject() const { return wxControl::GetClientObject(); }
73 void SetClientData( void *data ) { wxControl::SetClientData( data ); }
74 void *GetClientData() const { return wxControl::GetClientData(); }
75
29006414
VZ
76 void Clear();
77 void Delete(int n);
78
79 int FindString( const wxString &string ) const;
80 int GetColumns() const;
81 int GetSelection();
82 wxString GetString( int n ) const;
83 wxString GetStringSelection() const;
84 int Number() const;
85 void SetColumns( int n = 1 );
86 void SetSelection( int n );
87 void SetStringSelection( const wxString &string );
88
89 // implementation
90
91 wxList m_clientDataList;
92 wxList m_clientObjectList;
93
953704c1
RR
94 void DisableEvents();
95 void EnableEvents();
29006414
VZ
96 void AppendCommon( const wxString &item );
97 void ApplyWidgetStyle();
738f9e5a
RR
98
99private:
100 DECLARE_DYNAMIC_CLASS(wxChoice)
c801d85f
KB
101};
102
ce4169a4 103
c801d85f 104#endif // __GTKCHOICEH__