1 /////////////////////////////////////////////////////////////////////////////
2 // Name: common/choiccmn.cpp
3 // Purpose: common (to all ports) wxChoice functions
4 // Author: Vadim Zeitlin
8 // Copyright: (c) wxWidgets team
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 // ============================================================================
14 // ============================================================================
16 // ----------------------------------------------------------------------------
18 // ----------------------------------------------------------------------------
20 #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
21 #pragma implementation "choicebase.h"
24 // For compilers that support precompilation, includes "wx.h".
25 #include "wx/wxprec.h"
34 #include "wx/choice.h"
37 // ============================================================================
39 // ============================================================================
41 // ----------------------------------------------------------------------------
43 // ----------------------------------------------------------------------------
45 bool wxChoiceBase
::SetStringSelection(const wxString
& s
)
47 int sel
= FindString(s
);
48 wxCHECK_MSG( sel
!= -1, false,
49 wxT("invalid string in wxChoice::SetStringSelection") );
56 // ----------------------------------------------------------------------------
58 // ----------------------------------------------------------------------------
60 void wxChoiceBase
::Command(wxCommandEvent
& event
)
62 SetSelection(event
.m_commandInt
);
63 (void)ProcessEvent(event
);
66 #endif // wxUSE_CHOICE