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"
|
|
|
|
|
|
|
|
// Pushbutton
|
2001-07-06 21:45:11 +00:00
|
|
|
class WXDLLEXPORT wxButton: public wxButtonBase
|
1999-07-29 05:11:30 +00:00
|
|
|
{
|
|
|
|
public:
|
2001-10-22 05:11:09 +00:00
|
|
|
inline wxButton() {}
|
|
|
|
inline wxButton( wxWindow* pParent
|
|
|
|
,wxWindowID vId
|
|
|
|
,const wxString& rsLabel
|
|
|
|
,const wxPoint& rPos = wxDefaultPosition
|
|
|
|
,const wxSize& rSize = wxDefaultSize
|
|
|
|
,long lStyle = 0
|
1999-11-08 05:18:15 +00:00
|
|
|
#if wxUSE_VALIDATORS
|
2001-10-22 05:11:09 +00:00
|
|
|
,const wxValidator& rValidator = wxDefaultValidator
|
1999-11-08 05:18:15 +00:00
|
|
|
#endif
|
2001-10-22 05:11:09 +00:00
|
|
|
,const wxString& rsName = wxButtonNameStr
|
|
|
|
)
|
|
|
|
{
|
|
|
|
Create( pParent
|
|
|
|
,vId
|
|
|
|
,rsLabel
|
|
|
|
,rPos
|
|
|
|
,rSize
|
|
|
|
,lStyle
|
|
|
|
#if wxUSE_VALIDATORS
|
|
|
|
,rValidator
|
|
|
|
#endif
|
|
|
|
,rsName
|
|
|
|
);
|
|
|
|
}
|
1999-07-29 05:11:30 +00:00
|
|
|
|
2001-10-22 05:11:09 +00:00
|
|
|
bool Create( wxWindow* pParent
|
|
|
|
,wxWindowID vId
|
|
|
|
,const wxString& rsLabel
|
|
|
|
,const wxPoint& rPos = wxDefaultPosition
|
|
|
|
,const wxSize& rSize = wxDefaultSize
|
|
|
|
,long lStyle = 0
|
1999-11-08 05:18:15 +00:00
|
|
|
#if wxUSE_VALIDATORS
|
2001-10-22 05:11:09 +00:00
|
|
|
,const wxValidator& rValidator = wxDefaultValidator
|
1999-11-08 05:18:15 +00:00
|
|
|
#endif
|
2001-10-22 05:11:09 +00:00
|
|
|
,const wxString& rsName = wxButtonNameStr
|
|
|
|
);
|
1999-07-29 05:11:30 +00:00
|
|
|
|
2001-10-22 05:11:09 +00:00
|
|
|
virtual ~wxButton();
|
1999-08-02 16:39:18 +00:00
|
|
|
|
2001-10-22 05:11:09 +00:00
|
|
|
virtual void SetDefault(void);
|
|
|
|
static wxSize GetDefaultSize(void);
|
|
|
|
virtual void Command(wxCommandEvent& rEvent);
|
|
|
|
virtual bool OS2Command( WXUINT uParam
|
|
|
|
,WXWORD vId
|
|
|
|
);
|
|
|
|
virtual WXHBRUSH OnCtlColor( WXHDC hDC
|
|
|
|
,WXHWND hWnd
|
|
|
|
,WXUINT uCtlColor
|
|
|
|
,WXUINT uMessage
|
|
|
|
,WXWPARAM wParam
|
|
|
|
,WXLPARAM lParam
|
|
|
|
);
|
|
|
|
void MakeOwnerDrawn(void);
|
1999-08-02 16:39:18 +00:00
|
|
|
|
2001-10-22 05:11:09 +00:00
|
|
|
virtual MRESULT WindowProc( WXUINT uMsg
|
|
|
|
,WXWPARAM wParam
|
|
|
|
,WXLPARAM lParam
|
|
|
|
);
|
1999-08-02 16:39:18 +00:00
|
|
|
|
1999-10-13 22:34:18 +00:00
|
|
|
protected:
|
|
|
|
|
2002-02-22 23:30:31 +00:00
|
|
|
bool SendClickEvent(void);
|
|
|
|
virtual wxSize DoGetBestSize(void) const;
|
|
|
|
virtual WXDWORD OS2GetStyle( long style
|
|
|
|
,WXDWORD* exstyle
|
|
|
|
) const;
|
2001-07-06 21:45:11 +00:00
|
|
|
private:
|
|
|
|
DECLARE_DYNAMIC_CLASS(wxButton)
|
2001-10-22 05:11:09 +00:00
|
|
|
}; // end of CLASS wxButton
|
1999-07-29 05:11:30 +00:00
|
|
|
|
|
|
|
#endif
|
|
|
|
// _WX_BUTTON_H_
|
2001-10-22 05:11:09 +00:00
|
|
|
|