]> git.saurik.com Git - wxWidgets.git/blame - include/wx/gtk1/choice.h
Fixes for long to wxCoord
[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__
9abe166a 14 #pragma interface "choice.h"
c801d85f
KB
15#endif
16
c801d85f
KB
17//-----------------------------------------------------------------------------
18// wxChoice
19//-----------------------------------------------------------------------------
20
9abe166a 21class wxChoice : public wxChoiceBase
c801d85f 22{
fd0eed64 23public:
29006414
VZ
24 wxChoice();
25 wxChoice( wxWindow *parent, wxWindowID id,
26 const wxPoint& pos = wxDefaultPosition,
27 const wxSize& size = wxDefaultSize,
28 int n = 0, const wxString choices[] = (const wxString *) NULL,
29 long style = 0,
30 const wxValidator& validator = wxDefaultValidator,
31 const wxString& name = wxChoiceNameStr )
32 {
33 Create(parent, id, pos, size, n, choices, style, validator, name);
34 }
35 ~wxChoice();
36 bool Create( wxWindow *parent, wxWindowID id,
37 const wxPoint& pos = wxDefaultPosition,
38 const wxSize& size = wxDefaultSize,
39 int n = 0, const wxString choices[] = (wxString *) NULL,
40 long style = 0,
41 const wxValidator& validator = wxDefaultValidator,
42 const wxString& name = wxChoiceNameStr );
c801d85f 43
9abe166a 44 // implement base class pure virtuals
29006414 45 void Delete(int n);
9abe166a
VZ
46 void Clear();
47
48 int GetSelection() const;
49 void SetSelection( int n );
29006414 50
9abe166a 51 virtual int GetCount() const;
29006414 52 int FindString( const wxString &string ) const;
29006414 53 wxString GetString( int n ) const;
29006414
VZ
54
55 // implementation
d6538e2c 56 wxList m_clientList;
29006414 57
953704c1
RR
58 void DisableEvents();
59 void EnableEvents();
29006414
VZ
60 void AppendCommon( const wxString &item );
61 void ApplyWidgetStyle();
738f9e5a 62
9abe166a
VZ
63protected:
64 virtual int DoAppend(const wxString& item);
65
66 virtual void DoSetClientData( int n, void* clientData );
67 virtual void* DoGetClientData( int n ) const;
68 virtual void DoSetClientObject( int n, wxClientData* clientData );
69 virtual wxClientData* DoGetClientObject( int n ) const;
70
d6538e2c
RR
71 // the above virtuals hide these virtuals in wxChoiceBase
72 virtual void DoSetClientData(void* clientData )
73 { wxWindowBase::DoSetClientData(clientData); };
74 virtual void* DoGetClientData() const
75 { return(wxWindowBase::DoGetClientData()); };
76 virtual void DoSetClientObject( wxClientData* clientData )
77 { wxWindowBase::DoSetClientObject(clientData); };
78 virtual wxClientData* DoGetClientObject() const
79 { return(wxWindowBase::DoGetClientObject()); };
80
738f9e5a
RR
81private:
82 DECLARE_DYNAMIC_CLASS(wxChoice)
c801d85f
KB
83};
84
ce4169a4 85
c801d85f 86#endif // __GTKCHOICEH__