]>
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 license 
  10 ///////////////////////////////////////////////////////////////////////////// 
  12 // ============================================================================ 
  14 // ============================================================================ 
  16 // ---------------------------------------------------------------------------- 
  18 // ---------------------------------------------------------------------------- 
  21     #pragma implementation "choicebase.h" 
  24 // For compilers that support precompilation, includes "wx.h". 
  25 #include "wx/wxprec.h" 
  32     #include "wx/choice.h" 
  35 // ============================================================================ 
  37 // ============================================================================ 
  39 // ---------------------------------------------------------------------------- 
  41 // ---------------------------------------------------------------------------- 
  43 bool wxChoiceBase::SetStringSelection(const wxString
& s
) 
  45     int sel 
= FindString(s
); 
  46     wxCHECK_MSG( sel 
!= -1, FALSE
, 
  47                  wxT("invalid string in wxChoice::SetStringSelection") ); 
  54 // ---------------------------------------------------------------------------- 
  56 // ---------------------------------------------------------------------------- 
  58 void wxChoiceBase::Command(wxCommandEvent
& event
) 
  60     SetSelection(event
.m_commandInt
); 
  61     (void)ProcessEvent(event
);