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
|
|
|
|
class WXDLLEXPORT wxButton: public wxControl
|
|
|
|
{
|
|
|
|
DECLARE_DYNAMIC_CLASS(wxButton)
|
|
|
|
public:
|
|
|
|
inline wxButton() {}
|
|
|
|
inline wxButton(wxWindow *parent, wxWindowID id, const wxString& label,
|
|
|
|
const wxPoint& pos = wxDefaultPosition,
|
|
|
|
const wxSize& size = wxDefaultSize, long style = 0,
|
|
|
|
const wxValidator& validator = wxDefaultValidator,
|
|
|
|
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,
|
|
|
|
const wxValidator& validator = wxDefaultValidator,
|
|
|
|
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();
|
|
|
|
|
|
|
|
virtual wxSize DoGetBestSize();
|
1999-07-29 05:11:30 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|
|
|
|
// _WX_BUTTON_H_
|