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
|
2004-05-23 20:53:33 +00:00
|
|
|
// 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
|
|
|
{
|
2007-04-09 11:18:54 +00:00
|
|
|
public:
|
2001-10-22 05:11:09 +00:00
|
|
|
inline wxButton() {}
|
|
|
|
inline wxButton( wxWindow* pParent
|
|
|
|
,wxWindowID vId
|
2004-08-30 14:42:51 +00:00
|
|
|
,const wxString& rsLabel = wxEmptyString
|
2001-10-22 05:11:09 +00:00
|
|
|
,const wxPoint& rPos = wxDefaultPosition
|
|
|
|
,const wxSize& rSize = wxDefaultSize
|
|
|
|
,long lStyle = 0
|
|
|
|
,const wxValidator& rValidator = wxDefaultValidator
|
|
|
|
,const wxString& rsName = wxButtonNameStr
|
|
|
|
)
|
|
|
|
{
|
|
|
|
Create( pParent
|
|
|
|
,vId
|
|
|
|
,rsLabel
|
|
|
|
,rPos
|
|
|
|
,rSize
|
|
|
|
,lStyle
|
|
|
|
,rValidator
|
|
|
|
,rsName
|
|
|
|
);
|
|
|
|
}
|
1999-07-29 05:11:30 +00:00
|
|
|
|
2001-10-22 05:11:09 +00:00
|
|
|
bool Create( wxWindow* pParent
|
|
|
|
,wxWindowID vId
|
2004-08-30 14:42:51 +00:00
|
|
|
,const wxString& rsLabel = wxEmptyString
|
2001-10-22 05:11:09 +00:00
|
|
|
,const wxPoint& rPos = wxDefaultPosition
|
|
|
|
,const wxSize& rSize = wxDefaultSize
|
|
|
|
,long lStyle = 0
|
|
|
|
,const wxValidator& rValidator = wxDefaultValidator
|
|
|
|
,const wxString& rsName = wxButtonNameStr
|
|
|
|
);
|
2007-04-08 22:18:35 +00:00
|
|
|
|
2001-10-22 05:11:09 +00:00
|
|
|
virtual ~wxButton();
|
1999-08-02 16:39:18 +00:00
|
|
|
|
2007-04-09 11:18:54 +00:00
|
|
|
virtual wxWindow *SetDefault();
|
|
|
|
|
2001-10-22 05:11:09 +00:00
|
|
|
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);
|
2002-05-13 18:10:59 +00:00
|
|
|
void SetTmpDefault(void);
|
|
|
|
void UnsetTmpDefault(void);
|
|
|
|
|
2002-08-30 21:20:42 +00:00
|
|
|
static void SetDefaultStyle( wxButton* pButton
|
|
|
|
,bool bOn
|
|
|
|
);
|
2002-05-13 18:10:59 +00:00
|
|
|
|
2002-02-22 23:30:31 +00:00
|
|
|
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
|
|
|
|