]>
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) wxWindows 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 wxChoiceBase::wxChoiceBase()
45 wxChoiceBase::~wxChoiceBase()
47 // this destructor is required for Darwin
50 // ----------------------------------------------------------------------------
52 // ----------------------------------------------------------------------------
54 bool wxChoiceBase::SetStringSelection(const wxString
& s
)
56 int sel
= FindString(s
);
57 wxCHECK_MSG( sel
!= -1, FALSE
,
58 wxT("invalid string in wxChoice::SetStringSelection") );
65 // ----------------------------------------------------------------------------
67 // ----------------------------------------------------------------------------
69 void wxChoiceBase::Command(wxCommandEvent
& event
)
71 SetSelection(event
.m_commandInt
);
72 (void)ProcessEvent(event
);
75 #endif // wxUSE_CHOICE