1998-09-18 10:19:10 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: button.h
|
|
|
|
// Purpose: wxButton class
|
|
|
|
// Author: Julian Smart
|
|
|
|
// Modified by:
|
|
|
|
// Created: 17/09/98
|
|
|
|
// RCS-ID: $Id$
|
|
|
|
// Copyright: (c) Julian Smart
|
2004-05-23 20:53:33 +00:00
|
|
|
// Licence: wxWindows licence
|
1998-09-18 10:19:10 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef _WX_BUTTON_H_
|
|
|
|
#define _WX_BUTTON_H_
|
|
|
|
|
2003-08-09 12:38:21 +00:00
|
|
|
#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
|
2002-02-05 16:34:33 +00:00
|
|
|
#pragma interface "button.h"
|
1998-09-18 10:19:10 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
// Pushbutton
|
2003-03-10 21:39:01 +00:00
|
|
|
class WXDLLEXPORT wxButton: public wxButtonBase
|
1998-09-18 10:19:10 +00:00
|
|
|
{
|
1999-07-23 21:03:02 +00:00
|
|
|
DECLARE_DYNAMIC_CLASS(wxButton)
|
2002-02-05 16:34:33 +00:00
|
|
|
|
1999-07-23 21:03:02 +00:00
|
|
|
public:
|
|
|
|
wxButton() { }
|
|
|
|
wxButton(wxWindow *parent,
|
2002-02-05 16:34:33 +00:00
|
|
|
wxWindowID id,
|
2004-08-30 14:42:51 +00:00
|
|
|
const wxString& label = wxEmptyString,
|
2002-02-05 16:34:33 +00:00
|
|
|
const wxPoint& pos = wxDefaultPosition,
|
|
|
|
const wxSize& size = wxDefaultSize, long style = 0,
|
|
|
|
const wxValidator& validator = wxDefaultValidator,
|
|
|
|
const wxString& name = wxButtonNameStr)
|
1999-07-23 21:03:02 +00:00
|
|
|
{
|
|
|
|
Create(parent, id, label, pos, size, style, validator, name);
|
|
|
|
}
|
2002-02-05 16:34:33 +00:00
|
|
|
|
2004-08-30 14:42:51 +00:00
|
|
|
bool Create(wxWindow *parent, wxWindowID id,
|
|
|
|
const wxString& label = wxEmptyString,
|
2002-02-05 16:34:33 +00:00
|
|
|
const wxPoint& pos = wxDefaultPosition,
|
|
|
|
const wxSize& size = wxDefaultSize, long style = 0,
|
|
|
|
const wxValidator& validator = wxDefaultValidator,
|
|
|
|
const wxString& name = wxButtonNameStr);
|
|
|
|
|
1999-07-23 21:03:02 +00:00
|
|
|
virtual void SetDefault();
|
|
|
|
virtual void Command(wxCommandEvent& event);
|
2002-02-05 16:34:33 +00:00
|
|
|
|
1999-08-02 04:19:49 +00:00
|
|
|
static wxSize GetDefaultSize();
|
|
|
|
|
1999-07-23 21:03:02 +00:00
|
|
|
// Implementation
|
2003-03-02 10:09:25 +00:00
|
|
|
private:
|
|
|
|
virtual wxSize DoGetBestSize() const;
|
2004-05-02 08:14:39 +00:00
|
|
|
wxSize OldGetBestSize() const;
|
2003-03-02 10:09:25 +00:00
|
|
|
void SetDefaultShadowThicknessAndResize();
|
1998-09-18 10:19:10 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|
2002-02-05 16:34:33 +00:00
|
|
|
// _WX_BUTTON_H_
|