]>
git.saurik.com Git - wxWidgets.git/blob - src/common/buttoncmn.cpp
1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: common/buttoncmn.cpp
3 // Purpose: wxMenu and wxMenuBar methods common to all ports
4 // Author: Vaclav Slavik
8 // Copyright: (c) Vaclav Slavik, 2004
9 // Licence: wxWindows licence
10 ///////////////////////////////////////////////////////////////////////////////
12 // ============================================================================
14 // ============================================================================
16 // ----------------------------------------------------------------------------
18 // ----------------------------------------------------------------------------
20 #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
21 #pragma implementation "buttonbase.h"
24 // For compilers that support precompilation, includes "wx.h".
25 #include "wx/wxprec.h"
33 #include "wx/button.h"
35 #if !defined(__WXGTK20__) || defined(__WXUNIVERSAL__)
36 bool wxButtonBase::CreateStock(wxWindow
*parent
,
39 const wxString
& descriptiveLabel
,
42 const wxValidator
& validator
,
46 #if !defined(__WXMAC__) && !defined(__WXCOCOA__)
47 wxUnusedVar(descriptiveLabel
);
48 #else // defined(__WXMAC__) || defined(__WXCOCOA__)
49 if (!descriptiveLabel
.empty())
51 label
= descriptiveLabel
;
56 label
= wxGetStockItemLabel(stock
);
59 return wxStaticCast(this, wxButton
)->Create(parent
, id
, label
,
61 style
, validator
, name
);
65 #endif // wxUSE_BUTTON