Create an NSView in leiu of a radio box
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@19776 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -12,6 +12,8 @@
|
|||||||
#include "wx/app.h"
|
#include "wx/app.h"
|
||||||
#include "wx/radiobox.h"
|
#include "wx/radiobox.h"
|
||||||
|
|
||||||
|
#import <AppKit/NSView.h>
|
||||||
|
|
||||||
IMPLEMENT_DYNAMIC_CLASS(wxRadioBox, wxControl)
|
IMPLEMENT_DYNAMIC_CLASS(wxRadioBox, wxControl)
|
||||||
BEGIN_EVENT_TABLE(wxRadioBox, wxControl)
|
BEGIN_EVENT_TABLE(wxRadioBox, wxControl)
|
||||||
END_EVENT_TABLE()
|
END_EVENT_TABLE()
|
||||||
@@ -28,7 +30,8 @@ bool wxRadioBox::Create(wxWindow *parent, wxWindowID winid,
|
|||||||
{
|
{
|
||||||
if(!CreateControl(parent,winid,pos,size,style,validator,name))
|
if(!CreateControl(parent,winid,pos,size,style,validator,name))
|
||||||
return false;
|
return false;
|
||||||
m_cocoaNSView = NULL;
|
SetNSView([[NSView alloc] initWithFrame: NSMakeRect(10,10,20,20)]);
|
||||||
|
[m_cocoaNSView release];
|
||||||
if(m_parent)
|
if(m_parent)
|
||||||
m_parent->CocoaAddChild(this);
|
m_parent->CocoaAddChild(this);
|
||||||
return true;
|
return true;
|
||||||
@@ -37,6 +40,7 @@ bool wxRadioBox::Create(wxWindow *parent, wxWindowID winid,
|
|||||||
wxRadioBox::~wxRadioBox()
|
wxRadioBox::~wxRadioBox()
|
||||||
{
|
{
|
||||||
CocoaRemoveFromParent();
|
CocoaRemoveFromParent();
|
||||||
|
SetNSView(NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
// selection
|
// selection
|
||||||
|
Reference in New Issue
Block a user