1999-07-29 01:11:30 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: button.h
|
|
|
|
// Purpose: wxButton class
|
1999-10-13 18:34:18 -04:00
|
|
|
// Author: David Webster
|
1999-07-29 01:11:30 -04:00
|
|
|
// Modified by:
|
1999-10-13 18:34:18 -04:00
|
|
|
// Created: 10/13/99
|
1999-07-29 01:11:30 -04:00
|
|
|
// RCS-ID: $Id$
|
1999-10-13 18:34:18 -04:00
|
|
|
// Copyright: (c) David Webster
|
|
|
|
// Licence: wxWindows licence
|
1999-07-29 01:11:30 -04: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,
|
1999-11-08 00:18:15 -05:00
|
|
|
#if wxUSE_VALIDATORS
|
1999-07-29 01:11:30 -04:00
|
|
|
const wxValidator& validator = wxDefaultValidator,
|
1999-11-08 00:18:15 -05:00
|
|
|
#endif
|
1999-07-29 01:11:30 -04: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 00:18:15 -05:00
|
|
|
#if wxUSE_VALIDATORS
|
1999-07-29 01:11:30 -04:00
|
|
|
const wxValidator& validator = wxDefaultValidator,
|
1999-11-08 00:18:15 -05:00
|
|
|
#endif
|
1999-07-29 01:11:30 -04:00
|
|
|
const wxString& name = wxButtonNameStr);
|
|
|
|
|
1999-08-02 12:39:18 -04:00
|
|
|
virtual ~wxButton();
|
|
|
|
|
1999-07-29 01:11:30 -04:00
|
|
|
virtual void SetDefault();
|
1999-08-02 12:39:18 -04:00
|
|
|
|
|
|
|
static wxSize GetDefaultSize();
|
|
|
|
|
1999-07-29 01:11:30 -04:00
|
|
|
virtual void Command(wxCommandEvent& event);
|
1999-10-13 18:34:18 -04: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-20 20:03:00 -05:00
|
|
|
virtual wxSize DoGetBestSize() const;
|
1999-07-29 01:11:30 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|
|
|
|
// _WX_BUTTON_H_
|