1999-07-29 05:11:30 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: button.h
|
|
|
|
// Purpose: wxButton class
|
1999-10-13 22:34:18 +00:00
|
|
|
// Author: David Webster
|
1999-07-29 05:11:30 +00:00
|
|
|
// Modified by:
|
1999-10-13 22:34:18 +00:00
|
|
|
// Created: 10/13/99
|
1999-07-29 05:11:30 +00:00
|
|
|
// RCS-ID: $Id$
|
1999-10-13 22:34:18 +00:00
|
|
|
// Copyright: (c) David Webster
|
|
|
|
// Licence: wxWindows licence
|
1999-07-29 05:11:30 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef _WX_BUTTON_H_
|
|
|
|
#define _WX_BUTTON_H_
|
|
|
|
|
|
|
|
#include "wx/control.h"
|
|
|
|
|
|
|
|
WXDLLEXPORT_DATA(extern const char*) wxButtonNameStr;
|
|
|
|
|
|
|
|
// Pushbutton
|
2001-07-06 21:45:11 +00:00
|
|
|
class WXDLLEXPORT wxButton: public wxButtonBase
|
1999-07-29 05:11:30 +00:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
inline wxButton() {}
|
|
|
|
inline wxButton(wxWindow *parent, wxWindowID id, const wxString& label,
|
|
|
|
const wxPoint& pos = wxDefaultPosition,
|
|
|
|
const wxSize& size = wxDefaultSize, long style = 0,
|
1999-11-08 05:18:15 +00:00
|
|
|
#if wxUSE_VALIDATORS
|
1999-07-29 05:11:30 +00:00
|
|
|
const wxValidator& validator = wxDefaultValidator,
|
1999-11-08 05:18:15 +00:00
|
|
|
#endif
|
1999-07-29 05:11:30 +00:00
|
|
|
const wxString& name = wxButtonNameStr)
|
|
|
|
{
|
|
|
|
Create(parent, id, label, pos, size, style, validator, name);
|
|
|
|
}
|
|
|
|
|
|
|
|
bool Create(wxWindow *parent, wxWindowID id, const wxString& label,
|
|
|
|
const wxPoint& pos = wxDefaultPosition,
|
|
|
|
const wxSize& size = wxDefaultSize, long style = 0,
|
1999-11-08 05:18:15 +00:00
|
|
|
#if wxUSE_VALIDATORS
|
1999-07-29 05:11:30 +00:00
|
|
|
const wxValidator& validator = wxDefaultValidator,
|
1999-11-08 05:18:15 +00:00
|
|
|
#endif
|
1999-07-29 05:11:30 +00:00
|
|
|
const wxString& name = wxButtonNameStr);
|
|
|
|
|
1999-08-02 16:39:18 +00:00
|
|
|
virtual ~wxButton();
|
|
|
|
|
1999-07-29 05:11:30 +00:00
|
|
|
virtual void SetDefault();
|
1999-08-02 16:39:18 +00:00
|
|
|
|
|
|
|
static wxSize GetDefaultSize();
|
|
|
|
|
1999-07-29 05:11:30 +00:00
|
|
|
virtual void Command(wxCommandEvent& event);
|
1999-10-13 22:34:18 +00:00
|
|
|
virtual bool OS2Command(WXUINT param, WXWORD id);
|
|
|
|
virtual WXHBRUSH OnCtlColor(WXHDC pDC,
|
|
|
|
WXHWND pWnd,
|
|
|
|
WXUINT nCtlColor,
|
|
|
|
WXUINT message,
|
|
|
|
WXWPARAM wParam,
|
|
|
|
WXLPARAM lParam);
|
|
|
|
protected:
|
|
|
|
// send a notification event, return TRUE if processed
|
|
|
|
bool SendClickEvent();
|
|
|
|
|
1999-11-21 01:03:00 +00:00
|
|
|
virtual wxSize DoGetBestSize() const;
|
2001-07-06 21:45:11 +00:00
|
|
|
private:
|
|
|
|
DECLARE_DYNAMIC_CLASS(wxButton)
|
1999-07-29 05:11:30 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|
|
|
|
// _WX_BUTTON_H_
|