WX_IMPLEMENT_COCOA_OWNER(wxButton,NSButton,NSControl,NSView)
bool wxButton::Create(wxWindow *parent, wxWindowID winid,
WX_IMPLEMENT_COCOA_OWNER(wxButton,NSButton,NSControl,NSView)
bool wxButton::Create(wxWindow *parent, wxWindowID winid,
const wxSize& size, long style,
const wxValidator& validator, const wxString& name)
{
const wxSize& size, long style,
const wxValidator& validator, const wxString& name)
{
if(!CreateControl(parent,winid,pos,size,style,validator,name))
return false;
if(!CreateControl(parent,winid,pos,size,style,validator,name))
return false;
- wxLogDebug("Created control with id=%d",GetId());
- NSRect cocoaRect = NSMakeRect(10,10,20,20);
+ wxLogTrace(wxTRACE_COCOA,wxT("Created control with id=%d"),GetId());
// NOTE: YES we want to release this (to match the alloc).
// DoAddChild(this) will retain us again since addSubView doesn't.
[m_cocoaNSView release];
[GetNSButton() setBezelStyle:NSRoundedBezelStyle];
// NOTE: YES we want to release this (to match the alloc).
// DoAddChild(this) will retain us again since addSubView doesn't.
[m_cocoaNSView release];
[GetNSButton() setBezelStyle:NSRoundedBezelStyle];
wxCommandEvent event(wxEVT_COMMAND_BUTTON_CLICKED, GetId());
InitCommandEvent(event); // event.SetEventObject(this);
Command(event);
wxCommandEvent event(wxEVT_COMMAND_BUTTON_CLICKED, GetId());
InitCommandEvent(event); // event.SetEventObject(this);
Command(event);