~registry/dolphin-emu/triforce

« back to all changes in this revision

Viewing changes to Externals/wxWidgets3/src/gtk/bmpbuttn.cpp

  • Committer: Sérgio Benjamim
  • Date: 2015-02-13 05:54:40 UTC
  • Revision ID: sergio_br2@yahoo.com.br-20150213055440-ey2rt3sjpy27km78
Dolphin Triforce branch from code.google, commit b957980 (4.0-315).

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/////////////////////////////////////////////////////////////////////////////
 
2
// Name:        src/gtk/bmpbuttn.cpp
 
3
// Purpose:
 
4
// Author:      Robert Roebling
 
5
// Copyright:   (c) 1998 Robert Roebling
 
6
// Licence:     wxWindows licence
 
7
/////////////////////////////////////////////////////////////////////////////
 
8
 
 
9
// For compilers that support precompilation, includes "wx.h".
 
10
#include "wx/wxprec.h"
 
11
 
 
12
#if wxUSE_BMPBUTTON
 
13
 
 
14
#include "wx/bmpbuttn.h"
 
15
 
 
16
bool wxBitmapButton::Create(wxWindow *parent,
 
17
                            wxWindowID id,
 
18
                            const wxBitmap& bitmap,
 
19
                            const wxPoint& pos,
 
20
                            const wxSize& size,
 
21
                            long style,
 
22
                            const wxValidator& validator,
 
23
                            const wxString& name)
 
24
{
 
25
    if ( !wxBitmapButtonBase::Create(parent, id, pos, size, style,
 
26
                                     validator, name) )
 
27
        return false;
 
28
 
 
29
    if ( bitmap.IsOk() )
 
30
    {
 
31
        SetBitmapLabel(bitmap);
 
32
 
 
33
        // we need to adjust the size after setting the bitmap as it may be too
 
34
        // big for the default button size
 
35
        SetInitialSize(size);
 
36
    }
 
37
 
 
38
    return true;
 
39
}
 
40
#endif // wxUSE_BMPBUTTON