Stop using wxBU_AUTODRAW in wxWidgets code
This style bit is obsolete and doesn't do anything, so remove confusing references to it.
This commit is contained in:
@@ -25,7 +25,7 @@
|
|||||||
#define wxBU_BOTTOM 0x0200
|
#define wxBU_BOTTOM 0x0200
|
||||||
#define wxBU_ALIGN_MASK ( wxBU_LEFT | wxBU_TOP | wxBU_RIGHT | wxBU_BOTTOM )
|
#define wxBU_ALIGN_MASK ( wxBU_LEFT | wxBU_TOP | wxBU_RIGHT | wxBU_BOTTOM )
|
||||||
|
|
||||||
// These two flags are obsolete
|
// These two flags are obsolete and have no effect any longer.
|
||||||
#define wxBU_NOAUTODRAW 0x0000
|
#define wxBU_NOAUTODRAW 0x0000
|
||||||
#define wxBU_AUTODRAW 0x0004
|
#define wxBU_AUTODRAW 0x0004
|
||||||
|
|
||||||
|
@@ -73,7 +73,7 @@ public:
|
|||||||
wxWindowID id = wxID_CONTEXT_HELP,
|
wxWindowID id = wxID_CONTEXT_HELP,
|
||||||
const wxPoint& pos = wxDefaultPosition,
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
const wxSize& size = wxDefaultSize,
|
const wxSize& size = wxDefaultSize,
|
||||||
long style = wxBU_AUTODRAW)
|
long style = 0)
|
||||||
{
|
{
|
||||||
Create(parent, id, pos, size, style);
|
Create(parent, id, pos, size, style);
|
||||||
}
|
}
|
||||||
@@ -83,7 +83,7 @@ public:
|
|||||||
wxWindowID id = wxID_CONTEXT_HELP,
|
wxWindowID id = wxID_CONTEXT_HELP,
|
||||||
const wxPoint& pos = wxDefaultPosition,
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
const wxSize& size = wxDefaultSize,
|
const wxSize& size = wxDefaultSize,
|
||||||
long style = wxBU_AUTODRAW);
|
long style = 0);
|
||||||
|
|
||||||
|
|
||||||
void OnContextHelp(wxCommandEvent& event);
|
void OnContextHelp(wxCommandEvent& event);
|
||||||
|
@@ -24,7 +24,7 @@ public:
|
|||||||
const wxBitmap& bitmap,
|
const wxBitmap& bitmap,
|
||||||
const wxPoint& pos = wxDefaultPosition,
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
const wxSize& size = wxDefaultSize,
|
const wxSize& size = wxDefaultSize,
|
||||||
long style = wxBU_AUTODRAW,
|
long style = 0,
|
||||||
const wxValidator& validator = wxDefaultValidator,
|
const wxValidator& validator = wxDefaultValidator,
|
||||||
const wxString& name = wxButtonNameStr)
|
const wxString& name = wxButtonNameStr)
|
||||||
{
|
{
|
||||||
@@ -38,7 +38,7 @@ public:
|
|||||||
const wxBitmap& bitmap,
|
const wxBitmap& bitmap,
|
||||||
const wxPoint& pos = wxDefaultPosition,
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
const wxSize& size = wxDefaultSize,
|
const wxSize& size = wxDefaultSize,
|
||||||
long style = wxBU_AUTODRAW,
|
long style = 0,
|
||||||
const wxValidator& validator = wxDefaultValidator,
|
const wxValidator& validator = wxDefaultValidator,
|
||||||
const wxString& name = wxButtonNameStr);
|
const wxString& name = wxButtonNameStr);
|
||||||
|
|
||||||
|
@@ -22,7 +22,7 @@ public:
|
|||||||
virtual ~wxBitmapButton();
|
virtual ~wxBitmapButton();
|
||||||
wxBitmapButton(wxWindow *parent, wxWindowID id, const wxBitmap& bitmap,
|
wxBitmapButton(wxWindow *parent, wxWindowID id, const wxBitmap& bitmap,
|
||||||
const wxPoint& pos = wxDefaultPosition,
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
const wxSize& size = wxDefaultSize, long style = wxBU_AUTODRAW,
|
const wxSize& size = wxDefaultSize, long style = 0,
|
||||||
const wxValidator& validator = wxDefaultValidator,
|
const wxValidator& validator = wxDefaultValidator,
|
||||||
const wxString& name = wxButtonNameStr)
|
const wxString& name = wxButtonNameStr)
|
||||||
{
|
{
|
||||||
@@ -31,7 +31,7 @@ public:
|
|||||||
|
|
||||||
bool Create(wxWindow *parent, wxWindowID id, const wxBitmap& bitmap,
|
bool Create(wxWindow *parent, wxWindowID id, const wxBitmap& bitmap,
|
||||||
const wxPoint& pos = wxDefaultPosition,
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
const wxSize& size = wxDefaultSize, long style = wxBU_AUTODRAW,
|
const wxSize& size = wxDefaultSize, long style = 0,
|
||||||
const wxValidator& validator = wxDefaultValidator,
|
const wxValidator& validator = wxDefaultValidator,
|
||||||
const wxString& name = wxButtonNameStr);
|
const wxString& name = wxButtonNameStr);
|
||||||
|
|
||||||
|
@@ -25,7 +25,7 @@ public:
|
|||||||
const wxBitmap& bitmap,
|
const wxBitmap& bitmap,
|
||||||
const wxPoint& pos = wxDefaultPosition,
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
const wxSize& size = wxDefaultSize,
|
const wxSize& size = wxDefaultSize,
|
||||||
long style = wxBU_AUTODRAW,
|
long style = 0,
|
||||||
const wxValidator& validator = wxDefaultValidator,
|
const wxValidator& validator = wxDefaultValidator,
|
||||||
const wxString& name = wxButtonNameStr)
|
const wxString& name = wxButtonNameStr)
|
||||||
{
|
{
|
||||||
@@ -37,7 +37,7 @@ public:
|
|||||||
const wxBitmap& bitmap,
|
const wxBitmap& bitmap,
|
||||||
const wxPoint& pos = wxDefaultPosition,
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
const wxSize& size = wxDefaultSize,
|
const wxSize& size = wxDefaultSize,
|
||||||
long style = wxBU_AUTODRAW,
|
long style = 0,
|
||||||
const wxValidator& validator = wxDefaultValidator,
|
const wxValidator& validator = wxDefaultValidator,
|
||||||
const wxString& name = wxButtonNameStr);
|
const wxString& name = wxButtonNameStr);
|
||||||
|
|
||||||
|
@@ -24,7 +24,7 @@ public:
|
|||||||
|
|
||||||
wxBitmapButton(wxWindow *parent, wxWindowID id, const wxBitmap& bitmap,
|
wxBitmapButton(wxWindow *parent, wxWindowID id, const wxBitmap& bitmap,
|
||||||
const wxPoint& pos = wxDefaultPosition,
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
const wxSize& size = wxDefaultSize, long style = wxBU_AUTODRAW,
|
const wxSize& size = wxDefaultSize, long style = 0,
|
||||||
const wxValidator& validator = wxDefaultValidator,
|
const wxValidator& validator = wxDefaultValidator,
|
||||||
const wxString& name = wxButtonNameStr)
|
const wxString& name = wxButtonNameStr)
|
||||||
{
|
{
|
||||||
@@ -33,7 +33,7 @@ public:
|
|||||||
|
|
||||||
bool Create(wxWindow *parent, wxWindowID id, const wxBitmap& bitmap,
|
bool Create(wxWindow *parent, wxWindowID id, const wxBitmap& bitmap,
|
||||||
const wxPoint& pos = wxDefaultPosition,
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
const wxSize& size = wxDefaultSize, long style = wxBU_AUTODRAW,
|
const wxSize& size = wxDefaultSize, long style = 0,
|
||||||
const wxValidator& validator = wxDefaultValidator,
|
const wxValidator& validator = wxDefaultValidator,
|
||||||
const wxString& name = wxButtonNameStr);
|
const wxString& name = wxButtonNameStr);
|
||||||
|
|
||||||
|
@@ -13,7 +13,7 @@
|
|||||||
|
|
||||||
#define wxBU_EXACTFIT 0x0001
|
#define wxBU_EXACTFIT 0x0001
|
||||||
#define wxBU_NOTEXT 0x0002
|
#define wxBU_NOTEXT 0x0002
|
||||||
#define wxBU_AUTODRAW 0x0004
|
#define wxBU_AUTODRAW 0x0004 ///< Obsolete, has no effect.
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -83,7 +83,7 @@ public:
|
|||||||
const wxBitmap& bitmap,
|
const wxBitmap& bitmap,
|
||||||
const wxPoint& pos = wxDefaultPosition,
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
const wxSize& size = wxDefaultSize,
|
const wxSize& size = wxDefaultSize,
|
||||||
long style = wxBU_AUTODRAW,
|
long style = 0,
|
||||||
const wxValidator& validator = wxDefaultValidator,
|
const wxValidator& validator = wxDefaultValidator,
|
||||||
const wxString& name = wxButtonNameStr);
|
const wxString& name = wxButtonNameStr);
|
||||||
|
|
||||||
@@ -95,7 +95,7 @@ public:
|
|||||||
const wxBitmap& bitmap,
|
const wxBitmap& bitmap,
|
||||||
const wxPoint& pos = wxDefaultPosition,
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
const wxSize& size = wxDefaultSize,
|
const wxSize& size = wxDefaultSize,
|
||||||
long style = wxBU_AUTODRAW,
|
long style = 0,
|
||||||
const wxValidator& validator = wxDefaultValidator,
|
const wxValidator& validator = wxDefaultValidator,
|
||||||
const wxString& name = wxButtonNameStr);
|
const wxString& name = wxButtonNameStr);
|
||||||
|
|
||||||
|
@@ -271,7 +271,7 @@ public:
|
|||||||
wxWindowID id = wxID_CONTEXT_HELP,
|
wxWindowID id = wxID_CONTEXT_HELP,
|
||||||
const wxPoint& pos = wxDefaultPosition,
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
const wxSize& size = wxDefaultSize,
|
const wxSize& size = wxDefaultSize,
|
||||||
long style = wxBU_AUTODRAW);
|
long style = 0);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@@ -389,7 +389,7 @@ void wxButtonToolBar::DoLayout()
|
|||||||
if (!tool->GetButton())
|
if (!tool->GetButton())
|
||||||
{
|
{
|
||||||
wxBitmapButton* bmpButton = new wxBitmapButton(this, tool->GetId(), tool->GetNormalBitmap(), wxPoint(tool->m_x, tool->m_y), wxDefaultSize,
|
wxBitmapButton* bmpButton = new wxBitmapButton(this, tool->GetId(), tool->GetNormalBitmap(), wxPoint(tool->m_x, tool->m_y), wxDefaultSize,
|
||||||
wxBU_AUTODRAW|wxBORDER_NONE);
|
wxBORDER_NONE);
|
||||||
if (!tool->GetShortHelp().empty())
|
if (!tool->GetShortHelp().empty())
|
||||||
bmpButton->SetLabel(tool->GetShortHelp());
|
bmpButton->SetLabel(tool->GetShortHelp());
|
||||||
|
|
||||||
|
@@ -50,7 +50,7 @@ bool wxGenericColourButton::Create( wxWindow *parent, wxWindowID id,
|
|||||||
|
|
||||||
// create this button
|
// create this button
|
||||||
if (!wxBitmapButton::Create( parent, id, m_bitmap, pos,
|
if (!wxBitmapButton::Create( parent, id, m_bitmap, pos,
|
||||||
size, style | wxBU_AUTODRAW, validator, name ))
|
size, style, validator, name ))
|
||||||
{
|
{
|
||||||
wxFAIL_MSG( wxT("wxGenericColourButton creation failed") );
|
wxFAIL_MSG( wxT("wxGenericColourButton creation failed") );
|
||||||
return false;
|
return false;
|
||||||
|
@@ -44,7 +44,7 @@ wxObject *wxBitmapButtonXmlHandler::DoCreateResource()
|
|||||||
GetID(),
|
GetID(),
|
||||||
GetBitmap(wxT("bitmap"), wxART_BUTTON),
|
GetBitmap(wxT("bitmap"), wxART_BUTTON),
|
||||||
GetPosition(), GetSize(),
|
GetPosition(), GetSize(),
|
||||||
GetStyle(wxT("style"), wxBU_AUTODRAW),
|
GetStyle(wxT("style")),
|
||||||
wxDefaultValidator,
|
wxDefaultValidator,
|
||||||
GetName());
|
GetName());
|
||||||
if (GetBool(wxT("default"), 0))
|
if (GetBool(wxT("default"), 0))
|
||||||
|
@@ -148,7 +148,7 @@ void GUIFrame::AddPanel_1()
|
|||||||
m_radioBtn2->SetToolTip( _("wxRadioButton") );
|
m_radioBtn2->SetToolTip( _("wxRadioButton") );
|
||||||
fgSizer1->Add( m_radioBtn2, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 20 );
|
fgSizer1->Add( m_radioBtn2, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 20 );
|
||||||
|
|
||||||
m_bpButton1 = new wxBitmapButton( m_panel1, wxID_ANY, wxBitmap( wxT("bitmaps/wxwin32x32.png"), wxBITMAP_TYPE_ANY ), wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW );
|
m_bpButton1 = new wxBitmapButton( m_panel1, wxID_ANY, wxBitmap( wxT("bitmaps/wxwin32x32.png"), wxBITMAP_TYPE_ANY ), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
m_bpButton1->SetToolTip( _("wxBitmapButton") );
|
m_bpButton1->SetToolTip( _("wxBitmapButton") );
|
||||||
m_bpButton1->SetToolTip( _("wxBitmapButton") );
|
m_bpButton1->SetToolTip( _("wxBitmapButton") );
|
||||||
fgSizer1->Add( m_bpButton1, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 20 );
|
fgSizer1->Add( m_bpButton1, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 20 );
|
||||||
|
Reference in New Issue
Block a user