1998-09-18 06:19:10 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
2006-07-25 10:31:55 -04:00
|
|
|
// Name: wx/motif/bmpbuttn.h
|
1998-09-18 06:19:10 -04:00
|
|
|
// Purpose: wxBitmapButton class
|
|
|
|
// Author: Julian Smart
|
|
|
|
// Modified by:
|
|
|
|
// Created: 17/09/98
|
|
|
|
// Copyright: (c) Julian Smart
|
2006-07-25 10:31:55 -04:00
|
|
|
// Licence: wxWindows licence
|
1998-09-18 06:19:10 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef _WX_BMPBUTTN_H_
|
|
|
|
#define _WX_BMPBUTTN_H_
|
|
|
|
|
2003-03-27 14:40:32 -05:00
|
|
|
#include "wx/motif/bmpmotif.h"
|
|
|
|
|
1998-09-18 06:19:10 -04:00
|
|
|
#define wxDEFAULT_BUTTON_MARGIN 4
|
|
|
|
|
2008-03-26 11:06:00 -04:00
|
|
|
class WXDLLIMPEXP_CORE wxBitmapButton: public wxBitmapButtonBase
|
1998-09-18 06:19:10 -04:00
|
|
|
{
|
2002-02-05 11:34:33 -05:00
|
|
|
public:
|
|
|
|
wxBitmapButton();
|
2006-09-05 16:47:48 -04:00
|
|
|
virtual ~wxBitmapButton();
|
2003-03-16 03:50:21 -05:00
|
|
|
wxBitmapButton(wxWindow *parent, wxWindowID id, const wxBitmap& bitmap,
|
2002-02-05 11:34:33 -05: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 10:31:55 -04:00
|
|
|
|
2002-02-05 11:34:33 -05: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 10:31:55 -04:00
|
|
|
|
2002-02-05 11:34:33 -05:00
|
|
|
// Implementation
|
|
|
|
virtual void ChangeBackgroundColour();
|
2006-07-25 10:31:55 -04:00
|
|
|
|
2002-02-05 11:34:33 -05:00
|
|
|
protected:
|
2009-06-14 18:55:24 -04: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 14:40:32 -05:00
|
|
|
|
|
|
|
wxBitmapCache m_bitmapCache;
|
|
|
|
|
2002-02-05 11:34:33 -05:00
|
|
|
WXPixmap m_insensPixmap;
|
2009-06-14 18:55:24 -04:00
|
|
|
|
2015-04-23 07:49:01 -04:00
|
|
|
wxDECLARE_DYNAMIC_CLASS(wxBitmapButton);
|
1998-09-18 06:19:10 -04:00
|
|
|
};
|
|
|
|
|
2009-06-14 18:55:24 -04:00
|
|
|
#endif // _WX_BMPBUTTN_H_
|