]> git.saurik.com Git - wxWidgets.git/blame - src/common/buttoncmn.cpp
Fix for the undocumented holes in spiner sizes.
[wxWidgets.git] / src / common / buttoncmn.cpp
CommitLineData
401e3b6e
VS
1///////////////////////////////////////////////////////////////////////////////
2// Name: common/buttoncmn.cpp
3// Purpose: wxMenu and wxMenuBar methods common to all ports
4// Author: Vaclav Slavik
5// Modified by:
6// Created: 2004-08-15
7// RCS-ID: $Id$
8// Copyright: (c) Vaclav Slavik, 2004
9// Licence: wxWindows licence
10///////////////////////////////////////////////////////////////////////////////
11
12// ============================================================================
13// declarations
14// ============================================================================
15
16// ----------------------------------------------------------------------------
17// headers
18// ----------------------------------------------------------------------------
19
20#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
21 #pragma implementation "buttonbase.h"
22#endif
23
24// For compilers that support precompilation, includes "wx.h".
25#include "wx/wxprec.h"
26
27#ifdef __BORLANDC__
28 #pragma hdrstop
29#endif
30
31#if wxUSE_BUTTON
32
33#include "wx/button.h"
34
35#ifndef __WXGTK20__
36bool wxButtonBase::CreateStock(wxWindow *parent,
37 wxWindowID id,
38 wxStockItemID stock,
39 const wxString& descriptiveLabel,
40 const wxPoint& pos,
41 long style,
42 const wxValidator& validator,
43 const wxString& name)
44{
45 wxString label;
b31ce224
WS
46#if !defined(__WXMAC__) && !defined(__WXCOCOA__)
47 wxUnusedVar(descriptiveLabel);
48#else // defined(__WXMAC__) || defined(__WXCOCOA__)
401e3b6e
VS
49 if (!descriptiveLabel.empty())
50 {
51 label = descriptiveLabel;
52 }
53 else
54#endif
55 {
56 label = wxGetStockItemLabel(stock);
57 }
58
59 return wxStaticCast(this, wxButton)->Create(parent, id, label,
60 pos, wxDefaultSize,
61 style, validator, name);
62}
63#endif
64
65#endif // wxUSE_BUTTON