1998-05-20 10:01:55 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
2006-01-22 21:28:01 -05:00
|
|
|
// Name: wx/gtk1/button.h
|
1998-05-20 10:01:55 -04:00
|
|
|
// Purpose:
|
|
|
|
// Author: Robert Roebling
|
1998-10-24 13:12:05 -04:00
|
|
|
// Copyright: (c) 1998 Robert Roebling
|
2004-05-23 16:53:33 -04:00
|
|
|
// Licence: wxWindows licence
|
1998-05-20 10:01:55 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef __GTKBUTTONH__
|
|
|
|
#define __GTKBUTTONH__
|
|
|
|
|
|
|
|
#include "wx/defs.h"
|
|
|
|
#include "wx/object.h"
|
|
|
|
#include "wx/list.h"
|
|
|
|
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
// wxButton
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
2005-08-02 18:58:06 -04:00
|
|
|
class WXDLLIMPEXP_CORE wxButton: public wxButtonBase
|
1998-05-20 10:01:55 -04:00
|
|
|
{
|
1999-10-11 06:05:36 -04:00
|
|
|
public:
|
1998-11-06 03:50:52 -05:00
|
|
|
wxButton();
|
2004-08-30 10:42:51 -04:00
|
|
|
wxButton(wxWindow *parent, wxWindowID id,
|
|
|
|
const wxString& label = wxEmptyString,
|
1998-08-14 06:07:38 -04:00
|
|
|
const wxPoint& pos = wxDefaultPosition,
|
|
|
|
const wxSize& size = wxDefaultSize, long style = 0,
|
|
|
|
const wxValidator& validator = wxDefaultValidator,
|
2019-10-22 06:34:29 -04:00
|
|
|
const wxString& name = wxASCII_STR(wxButtonNameStr))
|
1998-08-14 06:07:38 -04:00
|
|
|
{
|
2004-08-15 11:56:56 -04:00
|
|
|
Create(parent, id, label, pos, size, style, validator, name);
|
1998-08-14 06:07:38 -04:00
|
|
|
}
|
2004-08-15 11:56:56 -04:00
|
|
|
|
2002-06-04 14:09:20 -04:00
|
|
|
virtual ~wxButton();
|
|
|
|
|
2004-08-30 10:42:51 -04:00
|
|
|
bool Create(wxWindow *parent, wxWindowID id,
|
|
|
|
const wxString& label = wxEmptyString,
|
1998-08-14 06:07:38 -04:00
|
|
|
const wxPoint& pos = wxDefaultPosition,
|
|
|
|
const wxSize& size = wxDefaultSize, long style = 0,
|
|
|
|
const wxValidator& validator = wxDefaultValidator,
|
2019-10-22 06:34:29 -04:00
|
|
|
const wxString& name = wxASCII_STR(wxButtonNameStr));
|
2002-06-04 14:09:20 -04:00
|
|
|
|
2007-04-08 18:18:35 -04:00
|
|
|
virtual wxWindow *SetDefault();
|
2002-06-04 14:09:20 -04:00
|
|
|
virtual void SetLabel( const wxString &label );
|
|
|
|
virtual bool Enable( bool enable = TRUE );
|
1999-07-04 09:50:13 -04:00
|
|
|
|
1999-11-22 14:44:25 -05:00
|
|
|
// implementation
|
|
|
|
// --------------
|
2002-06-04 14:09:20 -04:00
|
|
|
|
2004-06-14 13:34:00 -04:00
|
|
|
void DoApplyWidgetStyle(GtkRcStyle *style);
|
2002-12-04 09:11:26 -05:00
|
|
|
bool IsOwnGtkWindow( GdkWindow *window );
|
2002-06-04 14:09:20 -04:00
|
|
|
|
2003-12-02 22:24:47 -05:00
|
|
|
// Since this wxButton doesn't derive from wxButtonBase (why?) we need
|
|
|
|
// to override this here too...
|
|
|
|
virtual bool ShouldInheritColours() const { return false; }
|
2006-01-22 21:28:01 -05:00
|
|
|
|
2004-05-06 13:26:25 -04:00
|
|
|
static wxVisualAttributes
|
|
|
|
GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
|
|
|
|
|
2000-01-04 08:02:27 -05:00
|
|
|
protected:
|
|
|
|
virtual wxSize DoGetBestSize() const;
|
|
|
|
|
1999-10-11 06:05:36 -04:00
|
|
|
private:
|
2015-04-23 07:49:01 -04:00
|
|
|
wxDECLARE_DYNAMIC_CLASS(wxButton);
|
1998-05-20 10:01:55 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // __GTKBUTTONH__
|