]> git.saurik.com Git - wxWidgets.git/blob - src/common/buttoncmn.cpp
fixes bug when closing mdi frame with >5 children
[wxWidgets.git] / src / common / buttoncmn.cpp
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__
36 bool 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;
46 #if defined(__WXMAC__) || defined(__WXCOCOA__)
47 if (!descriptiveLabel.empty())
48 {
49 label = descriptiveLabel;
50 }
51 else
52 #endif
53 {
54 label = wxGetStockItemLabel(stock);
55 }
56
57 return wxStaticCast(this, wxButton)->Create(parent, id, label,
58 pos, wxDefaultSize,
59 style, validator, name);
60 }
61 #endif
62
63 #endif // wxUSE_BUTTON