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
|
2004-05-23 16:53:33 -04:00
|
|
|
// Licence: wxWindows licence
|
1999-07-29 01:11:30 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef _WX_BUTTON_H_
|
|
|
|
#define _WX_BUTTON_H_
|
|
|
|
|
|
|
|
#include "wx/control.h"
|
|
|
|
|
|
|
|
// Pushbutton
|
2001-07-06 17:45:11 -04:00
|
|
|
class WXDLLEXPORT wxButton: public wxButtonBase
|
1999-07-29 01:11:30 -04:00
|
|
|
{
|
2007-04-09 07:18:54 -04:00
|
|
|
public:
|
2001-10-22 01:11:09 -04:00
|
|
|
inline wxButton() {}
|
|
|
|
inline wxButton( wxWindow* pParent
|
|
|
|
,wxWindowID vId
|
2004-08-30 10:42:51 -04:00
|
|
|
,const wxString& rsLabel = wxEmptyString
|
2001-10-22 01:11:09 -04: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 01:11:30 -04:00
|
|
|
|
2001-10-22 01:11:09 -04:00
|
|
|
bool Create( wxWindow* pParent
|
|
|
|
,wxWindowID vId
|
2004-08-30 10:42:51 -04:00
|
|
|
,const wxString& rsLabel = wxEmptyString
|
2001-10-22 01:11:09 -04:00
|
|
|
,const wxPoint& rPos = wxDefaultPosition
|
|
|
|
,const wxSize& rSize = wxDefaultSize
|
|
|
|
,long lStyle = 0
|
|
|
|
,const wxValidator& rValidator = wxDefaultValidator
|
|
|
|
,const wxString& rsName = wxButtonNameStr
|
|
|
|
);
|
2007-04-08 18:18:35 -04:00
|
|
|
|
2001-10-22 01:11:09 -04:00
|
|
|
virtual ~wxButton();
|
1999-08-02 12:39:18 -04:00
|
|
|
|
2007-04-09 07:18:54 -04:00
|
|
|
virtual wxWindow *SetDefault();
|
|
|
|
|
2001-10-22 01:11:09 -04: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 12:39:18 -04:00
|
|
|
|
2001-10-22 01:11:09 -04:00
|
|
|
virtual MRESULT WindowProc( WXUINT uMsg
|
|
|
|
,WXWPARAM wParam
|
|
|
|
,WXLPARAM lParam
|
|
|
|
);
|
1999-08-02 12:39:18 -04:00
|
|
|
|
1999-10-13 18:34:18 -04:00
|
|
|
protected:
|
|
|
|
|
2002-02-22 18:30:31 -05:00
|
|
|
bool SendClickEvent(void);
|
2002-05-13 14:10:59 -04:00
|
|
|
void SetTmpDefault(void);
|
|
|
|
void UnsetTmpDefault(void);
|
|
|
|
|
2002-08-30 17:20:42 -04:00
|
|
|
static void SetDefaultStyle( wxButton* pButton
|
|
|
|
,bool bOn
|
|
|
|
);
|
2002-05-13 14:10:59 -04:00
|
|
|
|
2002-02-22 18:30:31 -05:00
|
|
|
virtual wxSize DoGetBestSize(void) const;
|
|
|
|
virtual WXDWORD OS2GetStyle( long style
|
|
|
|
,WXDWORD* exstyle
|
|
|
|
) const;
|
2001-07-06 17:45:11 -04:00
|
|
|
private:
|
|
|
|
DECLARE_DYNAMIC_CLASS(wxButton)
|
2001-10-22 01:11:09 -04:00
|
|
|
}; // end of CLASS wxButton
|
1999-07-29 01:11:30 -04:00
|
|
|
|
|
|
|
#endif
|
|
|
|
// _WX_BUTTON_H_
|
2001-10-22 01:11:09 -04:00
|
|
|
|