2009-01-17 05:43:43 -05:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
2011-03-19 20:14:35 -04:00
|
|
|
// Name: wx/osx/button.h
|
2009-01-17 05:43:43 -05:00
|
|
|
// Purpose: wxButton class
|
|
|
|
// Author: Stefan Csomor
|
|
|
|
// Modified by:
|
|
|
|
// Created: 1998-01-01
|
|
|
|
// Copyright: (c) Stefan Csomor
|
|
|
|
// Licence: wxWindows licence
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2009-06-20 23:01:53 -04:00
|
|
|
#ifndef _WX_OSX_BUTTON_H_
|
|
|
|
#define _WX_OSX_BUTTON_H_
|
2009-01-17 05:43:43 -05:00
|
|
|
|
|
|
|
#include "wx/control.h"
|
|
|
|
#include "wx/gdicmn.h"
|
|
|
|
|
|
|
|
// Pushbutton
|
2009-06-20 23:01:53 -04:00
|
|
|
class WXDLLIMPEXP_CORE wxButton : public wxButtonBase
|
2009-01-17 05:43:43 -05:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
wxButton() {}
|
|
|
|
wxButton(wxWindow *parent,
|
|
|
|
wxWindowID id,
|
|
|
|
const wxString& label = wxEmptyString,
|
|
|
|
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 = wxEmptyString,
|
|
|
|
const wxPoint& pos = wxDefaultPosition,
|
|
|
|
const wxSize& size = wxDefaultSize,
|
|
|
|
long style = 0,
|
|
|
|
const wxValidator& validator = wxDefaultValidator,
|
|
|
|
const wxString& name = wxButtonNameStr);
|
|
|
|
|
2009-06-19 19:24:51 -04:00
|
|
|
virtual void SetLabel(const wxString& label);
|
2009-01-17 05:43:43 -05:00
|
|
|
virtual wxWindow *SetDefault();
|
|
|
|
virtual void Command(wxCommandEvent& event);
|
|
|
|
|
|
|
|
// osx specific event handling common for all osx-ports
|
2009-06-20 23:01:53 -04:00
|
|
|
|
2009-01-23 03:40:26 -05:00
|
|
|
virtual bool OSXHandleClicked( double timestampsec );
|
2009-01-17 05:43:43 -05:00
|
|
|
|
2012-10-27 21:08:32 -04:00
|
|
|
#if wxOSX_USE_COCOA
|
2012-11-04 18:50:28 -05:00
|
|
|
void OSXUpdateAfterLabelChange(const wxString& label);
|
2012-10-27 21:08:32 -04:00
|
|
|
#endif
|
|
|
|
|
2009-01-17 05:43:43 -05:00
|
|
|
protected:
|
2015-04-23 07:49:01 -04:00
|
|
|
wxDECLARE_DYNAMIC_CLASS(wxButton);
|
2009-01-17 05:43:43 -05:00
|
|
|
};
|
|
|
|
|
2009-06-20 23:01:53 -04:00
|
|
|
#endif // _WX_OSX_BUTTON_H_
|