1998-05-20 14:01:55 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
2006-01-23 02:28:01 +00:00
|
|
|
// Name: wx/gtk1/bmpbutton.h
|
1998-05-20 14:01:55 +00:00
|
|
|
// Purpose:
|
|
|
|
// Author: Robert Roebling
|
1998-10-24 17:12:05 +00:00
|
|
|
// Copyright: (c) 1998 Robert Roebling
|
2004-05-23 20:53:33 +00:00
|
|
|
// Licence: wxWindows licence
|
1998-05-20 14:01:55 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef __BMPBUTTONH__
|
|
|
|
#define __BMPBUTTONH__
|
|
|
|
|
2001-06-26 20:59:19 +00:00
|
|
|
// ----------------------------------------------------------------------------
|
1998-05-20 14:01:55 +00:00
|
|
|
// wxBitmapButton
|
2001-06-26 20:59:19 +00:00
|
|
|
// ----------------------------------------------------------------------------
|
1998-05-20 14:01:55 +00:00
|
|
|
|
2005-08-02 22:58:06 +00:00
|
|
|
class WXDLLIMPEXP_CORE wxBitmapButton: public wxBitmapButtonBase
|
1998-05-28 17:44:04 +00:00
|
|
|
{
|
1998-11-15 17:57:55 +00:00
|
|
|
public:
|
2002-05-04 11:57:39 +00:00
|
|
|
wxBitmapButton() { Init(); }
|
|
|
|
|
2001-06-26 20:59:19 +00:00
|
|
|
wxBitmapButton(wxWindow *parent,
|
|
|
|
wxWindowID id,
|
|
|
|
const wxBitmap& bitmap,
|
|
|
|
const wxPoint& pos = wxDefaultPosition,
|
|
|
|
const wxSize& size = wxDefaultSize,
|
2018-07-21 12:42:06 +00:00
|
|
|
long style = 0,
|
2001-06-26 20:59:19 +00:00
|
|
|
const wxValidator& validator = wxDefaultValidator,
|
|
|
|
const wxString& name = wxButtonNameStr)
|
1999-10-11 10:05:36 +00:00
|
|
|
{
|
2002-05-04 11:57:39 +00:00
|
|
|
Init();
|
|
|
|
|
1999-10-11 10:05:36 +00:00
|
|
|
Create(parent, id, bitmap, pos, size, style, validator, name);
|
|
|
|
}
|
2002-05-04 11:57:39 +00:00
|
|
|
|
2001-06-26 20:59:19 +00:00
|
|
|
bool Create(wxWindow *parent,
|
|
|
|
wxWindowID id,
|
|
|
|
const wxBitmap& bitmap,
|
|
|
|
const wxPoint& pos = wxDefaultPosition,
|
|
|
|
const wxSize& size = wxDefaultSize,
|
2018-07-21 12:42:06 +00:00
|
|
|
long style = 0,
|
2001-06-26 20:59:19 +00:00
|
|
|
const wxValidator& validator = wxDefaultValidator,
|
|
|
|
const wxString& name = wxButtonNameStr);
|
|
|
|
|
1999-10-11 10:05:36 +00:00
|
|
|
void SetLabel( const wxString &label );
|
|
|
|
virtual void SetLabel( const wxBitmap& bitmap ) { SetBitmapLabel(bitmap); }
|
2001-06-26 21:29:16 +00:00
|
|
|
|
2002-05-04 11:57:39 +00:00
|
|
|
virtual bool Enable(bool enable = TRUE);
|
|
|
|
|
1999-11-22 19:44:25 +00:00
|
|
|
// implementation
|
|
|
|
// --------------
|
2001-06-26 21:29:16 +00:00
|
|
|
|
2009-03-03 09:20:11 +00:00
|
|
|
void GTKSetHasFocus();
|
|
|
|
void GTKSetNotFocus();
|
1999-10-11 10:05:36 +00:00
|
|
|
void StartSelect();
|
|
|
|
void EndSelect();
|
2004-06-14 17:34:00 +00:00
|
|
|
void DoApplyWidgetStyle(GtkRcStyle *style);
|
2001-06-26 21:29:16 +00:00
|
|
|
|
2002-05-04 11:57:39 +00:00
|
|
|
bool m_hasFocus:1;
|
|
|
|
bool m_isSelected:1;
|
2001-06-26 21:29:16 +00:00
|
|
|
|
2000-07-15 19:51:35 +00:00
|
|
|
protected:
|
2001-06-26 20:59:19 +00:00
|
|
|
virtual void OnSetBitmap();
|
2004-10-18 13:13:39 +00:00
|
|
|
virtual wxSize DoGetBestSize() const;
|
2000-07-15 19:51:35 +00:00
|
|
|
|
2002-05-04 11:57:39 +00:00
|
|
|
void Init();
|
|
|
|
|
1999-10-11 10:05:36 +00:00
|
|
|
private:
|
2015-04-23 11:49:01 +00:00
|
|
|
wxDECLARE_DYNAMIC_CLASS(wxBitmapButton);
|
1998-05-28 17:44:04 +00:00
|
|
|
};
|
1998-11-15 17:57:55 +00:00
|
|
|
|
1998-05-20 14:01:55 +00:00
|
|
|
#endif // __BMPBUTTONH__
|