1998-05-20 10:01:55 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
2002-06-04 14:09:20 -04:00
|
|
|
// Name: wx/gtk/button.h
|
1998-05-20 10:01:55 -04:00
|
|
|
// Purpose:
|
|
|
|
// Author: Robert Roebling
|
1998-10-26 05:56:58 -05:00
|
|
|
// Id: $Id$
|
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
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2006-08-30 01:55:56 -04:00
|
|
|
#ifndef _WX_GTK_BUTTON_H_
|
|
|
|
#define _WX_GTK_BUTTON_H_
|
1998-05-20 10:01:55 -04:00
|
|
|
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
// 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,
|
|
|
|
const wxString& name = wxButtonNameStr)
|
|
|
|
{
|
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,
|
|
|
|
const wxString& name = 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-05-06 13:26:25 -04:00
|
|
|
static wxVisualAttributes
|
|
|
|
GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
|
|
|
|
|
2006-02-08 16:47:09 -05:00
|
|
|
// helper to allow access to protected member from GTK callback
|
|
|
|
void MoveWindow(int x, int y, int width, int height) { DoMoveWindow(x, y, width, height); }
|
|
|
|
|
2000-01-04 08:02:27 -05:00
|
|
|
protected:
|
|
|
|
virtual wxSize DoGetBestSize() const;
|
2006-08-25 08:59:28 -04:00
|
|
|
virtual void DoApplyWidgetStyle(GtkRcStyle *style);
|
|
|
|
|
|
|
|
virtual GdkWindow *GTKGetWindow(wxArrayGdkWindows& windows) const;
|
2000-01-04 08:02:27 -05:00
|
|
|
|
1999-10-11 06:05:36 -04:00
|
|
|
private:
|
|
|
|
DECLARE_DYNAMIC_CLASS(wxButton)
|
1998-05-20 10:01:55 -04:00
|
|
|
};
|
|
|
|
|
2006-08-30 01:55:56 -04:00
|
|
|
#endif // _WX_GTK_BUTTON_H_
|