Added wxToggleBitmapButton (it compiles).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26131 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -13,11 +13,14 @@
|
||||
#ifndef _WX_GTK_TOGGLEBUTTON_H_
|
||||
#define _WX_GTK_TOGGLEBUTTON_H_
|
||||
|
||||
#include "wx/bitmap.h"
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// classes
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class wxToggleButton;
|
||||
class wxToggleBitmapButton;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// global data
|
||||
@@ -25,6 +28,59 @@ class wxToggleButton;
|
||||
|
||||
extern const wxChar *wxCheckBoxNameStr;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxToggleBitmapButton
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class wxToggleBitmapButton: public wxControl
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
wxToggleBitmapButton() {}
|
||||
wxToggleBitmapButton(wxWindow *parent,
|
||||
wxWindowID id,
|
||||
const wxBitmap& label,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxCheckBoxNameStr)
|
||||
{
|
||||
Create(parent, id, label, pos, size, style, validator, name);
|
||||
}
|
||||
|
||||
// Create the control
|
||||
bool Create(wxWindow *parent,
|
||||
wxWindowID id,
|
||||
const wxBitmap& label,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize, long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxCheckBoxNameStr);
|
||||
|
||||
// Get/set the value
|
||||
void SetValue(bool state);
|
||||
bool GetValue() const;
|
||||
|
||||
// Set the label
|
||||
void SetLabel(const wxBitmap& label);
|
||||
bool Enable(bool enable = TRUE);
|
||||
|
||||
|
||||
// implementation
|
||||
bool m_blockEvent;
|
||||
wxBitmap m_bitmap;
|
||||
|
||||
void OnSetBitmap();
|
||||
void ApplyWidgetStyle();
|
||||
bool IsOwnGtkWindow(GdkWindow *window);
|
||||
|
||||
virtual void OnInternalIdle();
|
||||
virtual wxSize DoGetBestSize() const;
|
||||
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS(wxToggleBitmapButton)
|
||||
};
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxToggleButton
|
||||
//-----------------------------------------------------------------------------
|
||||
|
Reference in New Issue
Block a user