]>
git.saurik.com Git - wxWidgets.git/blob - src/common/choiccmn.cpp
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: wxWidgets 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 wxChoiceBase::~wxChoiceBase()
43 // this destructor is required for Darwin
46 // ----------------------------------------------------------------------------
48 // ----------------------------------------------------------------------------
50 bool wxChoiceBase::SetStringSelection(const wxString
& s
)
52 int sel
= FindString(s
);
53 wxCHECK_MSG( sel
!= -1, FALSE
,
54 wxT("invalid string in wxChoice::SetStringSelection") );
61 // ----------------------------------------------------------------------------
63 // ----------------------------------------------------------------------------
65 void wxChoiceBase::Command(wxCommandEvent
& event
)
67 SetSelection(event
.m_commandInt
);
68 (void)ProcessEvent(event
);
71 #endif // wxUSE_CHOICE