]>
git.saurik.com Git - wxWidgets.git/blob - src/qt/choice.cpp
1 /////////////////////////////////////////////////////////////////////////////
4 // Author: Robert Roebling
7 // Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
13 #pragma implementation "choice.h"
16 #include "wx/choice.h"
18 //-----------------------------------------------------------------------------
20 //-----------------------------------------------------------------------------
22 //-----------------------------------------------------------------------------
24 IMPLEMENT_DYNAMIC_CLASS(wxChoice
,wxControl
)
26 wxChoice::wxChoice(void)
30 wxChoice::wxChoice( wxWindow
*parent
, wxWindowID id
,
31 const wxPoint
&pos
, const wxSize
&size
,
32 int n
, const wxString choices
[],
33 long style
, const wxString
&name
)
35 Create( parent
, id
, pos
, size
, n
, choices
, style
, name
);
38 bool wxChoice::Create( wxWindow
*parent
, wxWindowID id
,
39 const wxPoint
&pos
, const wxSize
&size
,
40 int n
, const wxString choices
[],
41 long style
, const wxString
&name
)
46 void wxChoice::Append( const wxString
&WXUNUSED(item
) )
50 void wxChoice::Clear(void)
54 int wxChoice::FindString( const wxString
&WXUNUSED(string
) ) const
59 int wxChoice::GetColumns(void) const
64 int wxChoice::GetSelection(void)
69 wxString
wxChoice::GetString( int WXUNUSED(n
) ) const
74 wxString
wxChoice::GetStringSelection(void) const
79 int wxChoice::Number(void) const
84 void wxChoice::SetColumns( int WXUNUSED(n
) )
88 void wxChoice::SetSelection( int WXUNUSED(n
) )
92 void wxChoice::SetStringSelection( const wxString
&string
)
94 int n
= FindString( string
);
95 if (n
!= -1) SetSelection( n
);