1998-09-18 10:19:10 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
2006-07-25 14:31:55 +00:00
|
|
|
// Name: wx/motif/bmpbuttn.h
|
1998-09-18 10:19:10 +00:00
|
|
|
// Purpose: wxBitmapButton class
|
|
|
|
// Author: Julian Smart
|
|
|
|
// Modified by:
|
|
|
|
// Created: 17/09/98
|
|
|
|
// Copyright: (c) Julian Smart
|
2006-07-25 14:31:55 +00:00
|
|
|
// Licence: wxWindows licence
|
1998-09-18 10:19:10 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef _WX_BMPBUTTN_H_
|
|
|
|
#define _WX_BMPBUTTN_H_
|
|
|
|
|
2003-03-27 19:40:32 +00:00
|
|
|
#include "wx/motif/bmpmotif.h"
|
|
|
|
|
1998-09-18 10:19:10 +00:00
|
|
|
#define wxDEFAULT_BUTTON_MARGIN 4
|
|
|
|
|
2008-03-26 15:06:00 +00:00
|
|
|
class WXDLLIMPEXP_CORE wxBitmapButton: public wxBitmapButtonBase
|
1998-09-18 10:19:10 +00:00
|
|
|
{
|
2002-02-05 16:34:33 +00:00
|
|
|
public:
|
|
|
|
wxBitmapButton();
|
2006-09-05 20:47:48 +00:00
|
|
|
virtual ~wxBitmapButton();
|
2003-03-16 08:50:21 +00:00
|
|
|
wxBitmapButton(wxWindow *parent, wxWindowID id, const wxBitmap& bitmap,
|
2002-02-05 16:34:33 +00:00
|
|
|
const wxPoint& pos = wxDefaultPosition,
|
|
|
|
const wxSize& size = wxDefaultSize, long style = wxBU_AUTODRAW,
|
|
|
|
const wxValidator& validator = wxDefaultValidator,
|
|
|
|
const wxString& name = wxButtonNameStr)
|
|
|
|
{
|
|
|
|
Create(parent, id, bitmap, pos, size, style, validator, name);
|
|
|
|
}
|
2006-07-25 14:31:55 +00:00
|
|
|
|
2002-02-05 16:34:33 +00:00
|
|
|
bool Create(wxWindow *parent, wxWindowID id, const wxBitmap& bitmap,
|
|
|
|
const wxPoint& pos = wxDefaultPosition,
|
|
|
|
const wxSize& size = wxDefaultSize, long style = wxBU_AUTODRAW,
|
|
|
|
const wxValidator& validator = wxDefaultValidator,
|
|
|
|
const wxString& name = wxButtonNameStr);
|
2006-07-25 14:31:55 +00:00
|
|
|
|
2002-02-05 16:34:33 +00:00
|
|
|
// Implementation
|
|
|
|
virtual void ChangeBackgroundColour();
|
2006-07-25 14:31:55 +00:00
|
|
|
|
2002-02-05 16:34:33 +00:00
|
|
|
protected:
|
2009-06-14 22:55:24 +00:00
|
|
|
virtual wxSize DoGetBestSize() const;
|
|
|
|
|
|
|
|
virtual void DoSetBitmap(const wxBitmap& bitmap, State which);
|
|
|
|
virtual void OnSetBitmap();
|
|
|
|
|
|
|
|
// original bitmaps may be different from the ones we were initialized with
|
|
|
|
// if they were changed to reflect button background colour
|
|
|
|
wxBitmap m_bitmapsOriginal[State_Max];
|
2003-03-27 19:40:32 +00:00
|
|
|
|
|
|
|
wxBitmapCache m_bitmapCache;
|
|
|
|
|
2002-02-05 16:34:33 +00:00
|
|
|
WXPixmap m_insensPixmap;
|
2009-06-14 22:55:24 +00:00
|
|
|
|
|
|
|
DECLARE_DYNAMIC_CLASS(wxBitmapButton)
|
1998-09-18 10:19:10 +00:00
|
|
|
};
|
|
|
|
|
2009-06-14 22:55:24 +00:00
|
|
|
#endif // _WX_BMPBUTTN_H_
|