git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67230
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
36 files changed:
// the 'true' OS level control for this wxWindow
wxOSXWidgetImpl* GetPeer() const { return m_peer ; }
// the 'true' OS level control for this wxWindow
wxOSXWidgetImpl* GetPeer() const { return m_peer ; }
+ void SetPeer(wxOSXWidgetImpl* peer);
#if wxOSX_USE_COCOA_OR_IPHONE
// the NSView or NSWindow of this window: can be used for both child and
#if wxOSX_USE_COCOA_OR_IPHONE
// the NSView or NSWindow of this window: can be used for both child and
wxList m_subControls;
// the peer object, allowing for cleaner API support
wxList m_subControls;
// the peer object, allowing for cleaner API support
- wxOSXWidgetImpl * m_peer ;
unsigned timeout);
private:
unsigned timeout);
private:
+ wxOSXWidgetImpl * m_peer ;
// common part of all ctors
void Init();
// common part of all ctors
void Init();
m_macIsUserPane = false;
wxControl::Create(parent, winID, pos, size, style , validator , name);
#if wxOSX_USE_CARBON
m_macIsUserPane = false;
wxControl::Create(parent, winID, pos, size, style , validator , name);
#if wxOSX_USE_CARBON
- m_peer = new wxMacControl(this);
+ SetPeer(new wxMacControl(this));
- HIWebViewCreate( m_peer->GetControlRefAddr() );
+ HIWebViewCreate( GetPeer()->GetControlRefAddr() );
- m_webView = (WebView*) HIWebViewGetWebView( m_peer->GetControlRef() );
+ m_webView = (WebView*) HIWebViewGetWebView( GetPeer()->GetControlRef() );
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_3
if ( UMAGetSystemVersion() >= 0x1030 )
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_3
if ( UMAGetSystemVersion() >= 0x1030 )
- HIViewChangeFeatures( m_peer->GetControlRef() , kHIViewIsOpaque , 0 ) ;
+ HIViewChangeFeatures( GetPeer()->GetControlRef() , kHIViewIsOpaque , 0 ) ;
- InstallControlEventHandler( m_peer->GetControlRef() , GetwxWebKitCtrlEventHandlerUPP(),
+ InstallControlEventHandler( GetPeer()->GetControlRef() , GetwxWebKitCtrlEventHandlerUPP(),
GetEventTypeCount(eventList), eventList, this,
(EventHandlerRef *)&m_webKitCtrlEventHandler);
#else
NSRect r = wxOSXGetFrameForControl( this, pos , size ) ;
m_webView = [[WebView alloc] initWithFrame:r frameName:@"webkitFrame" groupName:@"webkitGroup"];
GetEventTypeCount(eventList), eventList, this,
(EventHandlerRef *)&m_webKitCtrlEventHandler);
#else
NSRect r = wxOSXGetFrameForControl( this, pos , size ) ;
m_webView = [[WebView alloc] initWithFrame:r frameName:@"webkitFrame" groupName:@"webkitGroup"];
- m_peer = new wxWidgetCocoaImpl( this, m_webView );
+ SetPeer(new wxWidgetCocoaImpl( this, m_webView ));
#endif
MacPostControlCreate(pos, size);
#if wxOSX_USE_CARBON
#endif
MacPostControlCreate(pos, size);
#if wxOSX_USE_CARBON
- HIViewSetVisible( m_peer->GetControlRef(), true );
+ HIViewSetVisible( GetPeer()->GetControlRef(), true );
#endif
[m_webView setHidden:false];
#endif
[m_webView setHidden:false];
// and this tripped me up at first. But in fact, what we want is the root view, because we need to
// make the y origin relative to the very top of the window, not its contents, since we later flip
// the y coordinate for Cocoa.
// and this tripped me up at first. But in fact, what we want is the root view, because we need to
// make the y origin relative to the very top of the window, not its contents, since we later flip
// the y coordinate for Cocoa.
- HIViewConvertRect (&rect, m_peer->GetControlRef(),
+ HIViewConvertRect (&rect, GetPeer()->GetControlRef(),
HIViewGetRoot( (WindowRef) MacGetTopLevelWindowRef() ) );
x = (int)rect.origin.x;
HIViewGetRoot( (WindowRef) MacGetTopLevelWindowRef() ) );
x = (int)rect.origin.x;
void wxWebKitCtrl::MacVisibilityChanged(){
#if defined(__WXMAC__) && wxOSX_USE_CARBON
void wxWebKitCtrl::MacVisibilityChanged(){
#if defined(__WXMAC__) && wxOSX_USE_CARBON
- bool isHidden = !IsControlVisible( m_peer->GetControlRef());
+ bool isHidden = !IsControlVisible( GetPeer()->GetControlRef());
if (!isHidden)
[(WebView*)m_webView display];
if (!isHidden)
[(WebView*)m_webView display];
m_bitmaps[State_Normal] = bitmap;
m_bitmaps[State_Normal] = bitmap;
- m_peer = wxWidgetImpl::CreateBitmapButton( this, parent, id, bitmap, pos, size, style, GetExtraStyle() );
+ SetPeer(wxWidgetImpl::CreateBitmapButton( this, parent, id, bitmap, pos, size, style, GetExtraStyle() ));
MacPostControlCreate( pos, size );
MacPostControlCreate( pos, size );
m_labelOrig =
m_label = label ;
m_labelOrig =
m_label = label ;
- m_peer = wxWidgetImpl::CreateButton( this, parent, id, label, pos, size, style, GetExtraStyle() );
+ SetPeer(wxWidgetImpl::CreateButton( this, parent, id, label, pos, size, style, GetExtraStyle() ));
MacPostControlCreate( pos, size );
MacPostControlCreate( pos, size );
m_bitmaps[which] = bitmap;
if ( which == State_Normal )
m_bitmaps[which] = bitmap;
if ( which == State_Normal )
- m_peer->SetBitmap(bitmap);
+ GetPeer()->SetBitmap(bitmap);
else if ( which == State_Pressed )
{
else if ( which == State_Pressed )
{
- wxButtonImpl* bi = dynamic_cast<wxButtonImpl*> (m_peer);
+ wxButtonImpl* bi = dynamic_cast<wxButtonImpl*> (GetPeer());
if ( bi )
bi->SetPressedBitmap(bitmap);
}
if ( bi )
bi->SetPressedBitmap(bitmap);
}
void wxButton::DoSetBitmapPosition(wxDirection dir)
{
void wxButton::DoSetBitmapPosition(wxDirection dir)
{
- m_peer->SetBitmapPosition(dir);
+ GetPeer()->SetBitmapPosition(dir);
if ( !wxButtonBase::DoSetLabelMarkup(markup) )
return false;
if ( !wxButtonBase::DoSetLabelMarkup(markup) )
return false;
- m_peer->SetLabelMarkup(markup);
+ GetPeer()->SetLabelMarkup(markup);
btnOldDefault->GetPeer()->SetDefaultButton( false );
}
btnOldDefault->GetPeer()->SetDefaultButton( false );
}
- m_peer->SetDefaultButton( true );
+ GetPeer()->SetDefaultButton( true );
return btnOldDefault;
}
void wxButton::Command (wxCommandEvent & WXUNUSED(event))
{
return btnOldDefault;
}
void wxButton::Command (wxCommandEvent & WXUNUSED(event))
{
- m_peer->PerformClick() ;
+ GetPeer()->PerformClick() ;
// ProcessCommand(event);
}
void wxButton::OnEnterWindow( wxMouseEvent& WXUNUSED(event))
{
if ( DoGetBitmap( State_Current ).IsOk() )
// ProcessCommand(event);
}
void wxButton::OnEnterWindow( wxMouseEvent& WXUNUSED(event))
{
if ( DoGetBitmap( State_Current ).IsOk() )
- m_peer->SetBitmap( DoGetBitmap( State_Current ) );
+ GetPeer()->SetBitmap( DoGetBitmap( State_Current ) );
}
void wxButton::OnLeaveWindow( wxMouseEvent& WXUNUSED(event))
{
if ( DoGetBitmap( State_Current ).IsOk() )
}
void wxButton::OnLeaveWindow( wxMouseEvent& WXUNUSED(event))
{
if ( DoGetBitmap( State_Current ).IsOk() )
- m_peer->SetBitmap( DoGetBitmap( State_Normal ) );
+ GetPeer()->SetBitmap( DoGetBitmap( State_Normal ) );
}
bool wxButton::OSXHandleClicked( double WXUNUSED(timestampsec) )
}
bool wxButton::OSXHandleClicked( double WXUNUSED(timestampsec) )
if ( !wxControl::Create(parent, id, pos, size, style, validator, name) )
return false;
if ( !wxControl::Create(parent, id, pos, size, style, validator, name) )
return false;
- m_peer = wxWidgetImpl::CreateDisclosureTriangle(this, parent, id, label, pos, size, style, GetExtraStyle() );
+ SetPeer(wxWidgetImpl::CreateDisclosureTriangle(this, parent, id, label, pos, size, style, GetExtraStyle() ));
MacPostControlCreate( pos, size );
// passing the text in the param doesn't seem to work, so lets do it again
MacPostControlCreate( pos, size );
// passing the text in the param doesn't seem to work, so lets do it again
void wxDisclosureTriangle::SetOpen( bool open )
{
void wxDisclosureTriangle::SetOpen( bool open )
{
- m_peer->SetValue( open ? 1 : 0 );
+ GetPeer()->SetValue( open ? 1 : 0 );
}
bool wxDisclosureTriangle::IsOpen() const
{
}
bool wxDisclosureTriangle::IsOpen() const
{
- return m_peer->GetValue() == 1;
+ return GetPeer()->GetValue() == 1;
}
bool wxDisclosureTriangle::OSXHandleClicked( double WXUNUSED(timestampsec) )
}
bool wxDisclosureTriangle::OSXHandleClicked( double WXUNUSED(timestampsec) )
#if wxOSX_USE_CARBON
Rect bestsize = { 0 , 0 , 0 , 0 } ;
#if wxOSX_USE_CARBON
Rect bestsize = { 0 , 0 , 0 , 0 } ;
- m_peer->GetBestRect( &bestsize ) ;
+ GetPeer()->GetBestRect( &bestsize ) ;
int wBtn;
if ( EmptyRect( &bestsize ) || ( GetWindowStyle() & wxBU_EXACTFIT) )
int wBtn;
if ( EmptyRect( &bestsize ) || ( GetWindowStyle() & wxBU_EXACTFIT) )
Point bounds;
ControlFontStyleRec controlFont;
Point bounds;
ControlFontStyleRec controlFont;
- OSStatus err = m_peer->GetData<ControlFontStyleRec>( kControlEntireControl, kControlFontStyleTag, &controlFont );
+ OSStatus err = GetPeer()->GetData<ControlFontStyleRec>( kControlEntireControl, kControlFontStyleTag, &controlFont );
verify_noerr( err );
// GetThemeTextDimensions will cache strings and the documentation
verify_noerr( err );
// GetThemeTextDimensions will cache strings and the documentation
void wxControl::OnKeyDown( wxKeyEvent &WXUNUSED(event) )
{
void wxControl::OnKeyDown( wxKeyEvent &WXUNUSED(event) )
{
- if ( m_peer == NULL || !m_peer->IsOk() )
+ if ( GetPeer() == NULL || !GetPeer()->IsOk() )
return;
#if wxOSX_USE_CARBON
return;
#if wxOSX_USE_CARBON
GetEventParameter( (EventRef)wxTheApp->MacGetCurrentEvent(), kEventParamKeyMacCharCodes, typeChar, NULL, sizeof(char), NULL, &charCode );
GetEventParameter( (EventRef)wxTheApp->MacGetCurrentEvent(), kEventParamKeyModifiers, typeUInt32, NULL, sizeof(UInt32), NULL, &modifiers );
GetEventParameter( (EventRef)wxTheApp->MacGetCurrentEvent(), kEventParamKeyMacCharCodes, typeChar, NULL, sizeof(char), NULL, &charCode );
GetEventParameter( (EventRef)wxTheApp->MacGetCurrentEvent(), kEventParamKeyModifiers, typeUInt32, NULL, sizeof(UInt32), NULL, &modifiers );
- m_peer->HandleKey( keyCode, charCode, modifiers );
+ GetPeer()->HandleKey( keyCode, charCode, modifiers );
err = SetHasScrollBars( (style & wxHSCROLL) != 0 , true );
#if 0
// shouldn't be necessary anymore under 10.2
err = SetHasScrollBars( (style & wxHSCROLL) != 0 , true );
#if 0
// shouldn't be necessary anymore under 10.2
- m_peer->SetData( kControlNoPart, kControlDataBrowserIncludesFrameAndFocusTag, (Boolean)false );
- m_peer->SetNeedsFocusRect( true );
+ GetPeer()->SetData( kControlNoPart, kControlDataBrowserIncludesFrameAndFocusTag, (Boolean)false );
+ GetPeer()->SetNeedsFocusRect( true );
if ( !wxWindow::Create(parent, id, pos, size, style & ~(wxHSCROLL | wxVSCROLL), name) )
return false;
m_dbImpl = new wxMacDataBrowserListCtrlControl( this, pos, size, style );
if ( !wxWindow::Create(parent, id, pos, size, style & ~(wxHSCROLL | wxVSCROLL), name) )
return false;
m_dbImpl = new wxMacDataBrowserListCtrlControl( this, pos, size, style );
MacPostControlCreate( pos, size );
MacPostControlCreate( pos, size );
- InstallControlEventHandler( m_peer->GetControlRef() , GetwxMacListCtrlEventHandlerUPP(),
+ InstallControlEventHandler( GetPeer()->GetControlRef() , GetwxMacListCtrlEventHandlerUPP(),
GetEventTypeCount(eventList), eventList, this,
(EventHandlerRef *)&m_macListCtrlEventHandler);
GetEventTypeCount(eventList), eventList, this,
(EventHandlerRef *)&m_macListCtrlEventHandler);
HIPoint hipoint= { adjustedPt.x , adjustedPt.y } ;
HIViewPartCode outPart = 0 ;
HIPoint hipoint= { adjustedPt.x , adjustedPt.y } ;
HIViewPartCode outPart = 0 ;
- OSStatus err = HIViewGetPartHit( m_peer->GetControlRef(), &hipoint, &outPart );
+ OSStatus err = HIViewGetPartHit( GetPeer()->GetControlRef(), &hipoint, &outPart );
- int max = m_peer->GetMaximum() ;
+ int max = GetPeer()->GetMaximum() ;
if ( outPart == 0 && max > 0 )
{
// this is a hack, as unfortunately a hit on an already selected tab returns 0,
// so we have to go some extra miles to make sure we select something different
// and try again ..
if ( outPart == 0 && max > 0 )
{
// this is a hack, as unfortunately a hit on an already selected tab returns 0,
// so we have to go some extra miles to make sure we select something different
// and try again ..
- int val = m_peer->GetValue() ;
+ int val = GetPeer()->GetValue() ;
int maxval = max ;
if ( max == 1 )
{
int maxval = max ;
if ( max == 1 )
{
- m_peer->SetMaximum( 2 ) ;
+ GetPeer()->SetMaximum( 2 ) ;
maxval = 2 ;
}
if ( val == 1 )
maxval = 2 ;
}
if ( val == 1 )
- m_peer->SetValue( maxval ) ;
+ GetPeer()->SetValue( maxval ) ;
- m_peer->SetValue( 1 ) ;
+ GetPeer()->SetValue( 1 ) ;
- err = HIViewGetPartHit( m_peer->GetControlRef(), &hipoint, &outPart );
+ err = HIViewGetPartHit( GetPeer()->GetControlRef(), &hipoint, &outPart );
- m_peer->SetValue( val ) ;
+ GetPeer()->SetValue( val ) ;
- m_peer->SetMaximum( 1 ) ;
+ GetPeer()->SetMaximum( 1 ) ;
}
if ( outPart >= 1 && outPart <= countPages )
}
if ( outPart >= 1 && outPart <= countPages )
Rect bestsize = { 0 , 0 , 0 , 0 } ;
// try the built-in best size if available
Rect bestsize = { 0 , 0 , 0 , 0 } ;
// try the built-in best size if available
- Boolean former = m_peer->GetData<Boolean>( kControlStaticTextIsMultilineTag);
- m_peer->SetData( kControlStaticTextIsMultilineTag, (Boolean)0 );
- m_peer->GetBestRect( &bestsize ) ;
- m_peer->SetData( kControlStaticTextIsMultilineTag, former );
+ Boolean former = GetPeer()->GetData<Boolean>( kControlStaticTextIsMultilineTag);
+ GetPeer()->SetData( kControlStaticTextIsMultilineTag, (Boolean)0 );
+ GetPeer()->GetBestRect( &bestsize ) ;
+ GetPeer()->SetData( kControlStaticTextIsMultilineTag, former );
if ( !EmptyRect( &bestsize ) )
{
bounds.h = bestsize.right - bestsize.left ;
if ( !EmptyRect( &bestsize ) )
{
bounds.h = bestsize.right - bestsize.left ;
{
#if wxOSX_USE_CARBON
ControlFontStyleRec controlFont;
{
#if wxOSX_USE_CARBON
ControlFontStyleRec controlFont;
- OSStatus err = m_peer->GetData<ControlFontStyleRec>( kControlEntireControl, kControlFontStyleTag, &controlFont );
+ OSStatus err = GetPeer()->GetData<ControlFontStyleRec>( kControlEntireControl, kControlFontStyleTag, &controlFont );
verify_noerr( err );
#if wxOSX_USE_ATSU_TEXT
verify_noerr( err );
#if wxOSX_USE_ATSU_TEXT
SetAutomaticControlDragTrackingEnabledForWindow( tlw, true );
SetAutomaticControlDragTrackingEnabledForWindow( tlw, true );
- m_peer->Move(0,0,0,0 );
+ GetPeer()->Move(0,0,0,0 );
SetSize( wxSIZE_AUTO_WIDTH, 0 );
SetSize( wxSIZE_AUTO_WIDTH, 0 );
- m_peer->SetVisibility( false );
+ GetPeer()->SetVisibility( false );
wxToolBarBase::Show( false );
}
}
wxToolBarBase::Show( false );
}
}
ChangeWindowAttributes( tlw, 0, kWindowToolbarButtonAttribute );
MacUninstallNativeToolbar();
ChangeWindowAttributes( tlw, 0, kWindowToolbarButtonAttribute );
MacUninstallNativeToolbar();
- m_peer->SetVisibility( true );
+ GetPeer()->SetVisibility( true );
m_labelOrig = m_label = label ;
WXValidateStyle( &style );
m_labelOrig = m_label = label ;
WXValidateStyle( &style );
- m_peer = wxWidgetImpl::CreateCheckBox( this, parent, id, label, pos, size, style, GetExtraStyle() ) ;
+ SetPeer(wxWidgetImpl::CreateCheckBox( this, parent, id, label, pos, size, style, GetExtraStyle() )) ;
MacPostControlCreate(pos, size) ;
MacPostControlCreate(pos, size) ;
wxCheckBoxState wxCheckBox::DoGet3StateValue() const
{
wxCheckBoxState wxCheckBox::DoGet3StateValue() const
{
- return (wxCheckBoxState)m_peer->GetValue() ;
+ return (wxCheckBoxState)GetPeer()->GetValue() ;
}
void wxCheckBox::DoSet3StateValue(wxCheckBoxState val)
{
}
void wxCheckBox::DoSet3StateValue(wxCheckBoxState val)
{
- m_peer->SetValue( val ) ;
+ GetPeer()->SetValue( val ) ;
}
bool wxCheckBox::OSXHandleClicked( double WXUNUSED(timestampsec) )
}
bool wxCheckBox::OSXHandleClicked( double WXUNUSED(timestampsec) )
bool sendEvent = true;
wxCheckBoxState newState = Get3StateValue();
bool sendEvent = true;
wxCheckBoxState newState = Get3StateValue();
- if ( !m_peer->ButtonClickDidStateChange() )
+ if ( !GetPeer()->ButtonClickDidStateChange() )
{
wxCheckBoxState origState ;
{
wxCheckBoxState origState ;
m_popUpMenu = new wxMenu();
m_popUpMenu->SetNoEventsMode(true);
m_popUpMenu = new wxMenu();
m_popUpMenu->SetNoEventsMode(true);
- m_peer = wxWidgetImpl::CreateChoice( this, parent, id, m_popUpMenu, pos, size, style, GetExtraStyle() );
+ SetPeer(wxWidgetImpl::CreateChoice( this, parent, id, m_popUpMenu, pos, size, style, GetExtraStyle() ));
MacPostControlCreate( pos, size );
MacPostControlCreate( pos, size );
AssignNewItemClientData(idx, clientData, i, type);
}
AssignNewItemClientData(idx, clientData, i, type);
}
- m_peer->SetMaximum( GetCount() );
+ GetPeer()->SetMaximum( GetCount() );
m_strings.RemoveAt( n ) ;
m_datas.RemoveAt( n ) ;
m_strings.RemoveAt( n ) ;
m_datas.RemoveAt( n ) ;
- m_peer->SetMaximum( GetCount() ) ;
+ GetPeer()->SetMaximum( GetCount() ) ;
m_strings.Empty() ;
m_datas.Empty() ;
m_strings.Empty() ;
m_datas.Empty() ;
- m_peer->SetMaximum( 0 ) ;
+ GetPeer()->SetMaximum( 0 ) ;
}
// ----------------------------------------------------------------------------
}
// ----------------------------------------------------------------------------
// ----------------------------------------------------------------------------
int wxChoice::GetSelection() const
{
// ----------------------------------------------------------------------------
int wxChoice::GetSelection() const
{
- return m_peer->GetValue();
+ return GetPeer()->GetValue();
}
void wxChoice::SetSelection( int n )
{
}
void wxChoice::SetSelection( int n )
{
+ GetPeer()->SetValue( n );
}
// ----------------------------------------------------------------------------
}
// ----------------------------------------------------------------------------
return wxSize( 23 , 23 ) ;
wxRect r ;
return wxSize( 23 , 23 ) ;
wxRect r ;
- m_peer->GetBestRect(&r);
+ GetPeer()->GetBestRect(&r);
wxSize sz = r.GetSize();
sz.x = sz.x + MacGetLeftBorderSize() +
wxSize sz = r.GetSize();
sz.x = sz.x + MacGetLeftBorderSize() +
m_peer = new wxMacControl( this );
OSStatus err = CreateTabsControl(
MAC_WXHWND(parent->MacGetTopLevelWindowRef()), &bounds,
m_peer = new wxMacControl( this );
OSStatus err = CreateTabsControl(
MAC_WXHWND(parent->MacGetTopLevelWindowRef()), &bounds,
- tabsize, tabstyle, 0, NULL, m_peer->GetControlRefAddr() );
+ tabsize, tabstyle, 0, NULL, GetPeer()->GetControlRefAddr() );
verify_noerr( err );
#endif
*/
verify_noerr( err );
#endif
*/
[tlw setToolbar:(NSToolbar*) m_macToolbar];
[(NSToolbar*) m_macToolbar setVisible:YES];
[tlw setToolbar:(NSToolbar*) m_macToolbar];
[(NSToolbar*) m_macToolbar setVisible:YES];
- m_peer->Move(0,0,0,0 );
+ GetPeer()->Move(0,0,0,0 );
SetSize( wxSIZE_AUTO_WIDTH, 0 );
SetSize( wxSIZE_AUTO_WIDTH, 0 );
- m_peer->SetVisibility( false );
+ GetPeer()->SetVisibility( false );
wxToolBarBase::Show( false );
}
}
wxToolBarBase::Show( false );
}
}
bResult = true;
[(NSToolbar*) m_macToolbar setVisible:NO];
MacUninstallNativeToolbar();
bResult = true;
[(NSToolbar*) m_macToolbar setVisible:NO];
MacUninstallNativeToolbar();
- m_peer->SetVisibility( true );
+ GetPeer()->SetVisibility( true );
wxASSERT_MSG( !(style & wxCB_SORT),
"wxCB_SORT not currently supported by wxOSX/Cocoa");
wxASSERT_MSG( !(style & wxCB_SORT),
"wxCB_SORT not currently supported by wxOSX/Cocoa");
- m_peer = wxWidgetImpl::CreateComboBox( this, parent, id, NULL, pos, size, style, GetExtraStyle() );
+ SetPeer(wxWidgetImpl::CreateComboBox( this, parent, id, NULL, pos, size, style, GetExtraStyle() ));
MacPostControlCreate( pos, size );
MacPostControlCreate( pos, size );
AssignNewItemClientData(idx, clientData, i, type);
}
AssignNewItemClientData(idx, clientData, i, type);
}
- m_peer->SetMaximum( GetCount() );
+ GetPeer()->SetMaximum( GetCount() );
wxComboWidgetImpl* wxComboBox::GetComboPeer() const
{
wxComboWidgetImpl* wxComboBox::GetComboPeer() const
{
- return dynamic_cast<wxComboWidgetImpl*> (m_peer);
+ return dynamic_cast<wxComboWidgetImpl*> (GetPeer());
}
#endif // wxUSE_COMBOBOX && wxOSX_USE_COCOA
}
#endif // wxUSE_COMBOBOX && wxOSX_USE_COCOA
{
if (!(wxControl::Create(parent,id,pos,size,style,validator,name)))
return false;
{
if (!(wxControl::Create(parent,id,pos,size,style,validator,name)))
return false;
- m_peer = ::CreateDataView(this,parent,id,pos,size,style,GetExtraStyle());
+ SetPeer(::CreateDataView(this,parent,id,pos,size,style,GetExtraStyle()));
MacPostControlCreate(pos,size);
MacPostControlCreate(pos,size);
- m_peer = wxWidgetImpl::CreateGauge( this, parent, id, GetValue() , 0, GetRange(), pos, size, style, GetExtraStyle() );
+ SetPeer(wxWidgetImpl::CreateGauge( this, parent, id, GetValue() , 0, GetRange(), pos, size, style, GetExtraStyle() ));
MacPostControlCreate( pos, size );
MacPostControlCreate( pos, size );
// we are going via the base class in case there is
// some change behind the values by it
wxGaugeBase::SetRange( r ) ;
// we are going via the base class in case there is
// some change behind the values by it
wxGaugeBase::SetRange( r ) ;
- if ( m_peer )
- m_peer->SetMaximum( GetRange() ) ;
+ if ( GetPeer() )
+ GetPeer()->SetMaximum( GetRange() ) ;
}
void wxGauge::SetValue(int pos)
}
void wxGauge::SetValue(int pos)
// some change behind the values by it
wxGaugeBase::SetValue( pos ) ;
// some change behind the values by it
wxGaugeBase::SetValue( pos ) ;
- if ( m_peer )
- m_peer->SetValue( GetValue() ) ;
+ if ( GetPeer() )
+ GetPeer()->SetValue( GetValue() ) ;
}
int wxGauge::GetValue() const
}
int wxGauge::GetValue() const
+ GetPeer()->PulseGauge();
else
m_strings.unsorted = new wxArrayString;
else
m_strings.unsorted = new wxArrayString;
- m_peer = wxWidgetImpl::CreateListBox( this, parent, id, pos, size, style, GetExtraStyle() );
+ SetPeer(wxWidgetImpl::CreateListBox( this, parent, id, pos, size, style, GetExtraStyle() ));
MacPostControlCreate( pos, size );
MacPostControlCreate( pos, size );
m_blockEvents = false;
// make sure no native events get sent to a object in destruction
m_blockEvents = false;
// make sure no native events get sent to a object in destruction
if ( IsSorted() )
delete m_strings.sorted;
if ( IsSorted() )
delete m_strings.sorted;
bool wxMenu::DoInsertOrAppend(wxMenuItem *pItem, size_t pos)
{
wxASSERT_MSG( pItem != NULL, wxT("can't append NULL item to the menu") );
bool wxMenu::DoInsertOrAppend(wxMenuItem *pItem, size_t pos)
{
wxASSERT_MSG( pItem != NULL, wxT("can't append NULL item to the menu") );
- m_peer->InsertOrAppend( pItem, pos );
+ GetPeer()->InsertOrAppend( pItem, pos );
if ( pItem->IsSeparator() )
{
if ( pItem->IsSeparator() )
{
wxOSXMenuRemoveItem(m_hMenu , pos );
*/
wxOSXMenuRemoveItem(m_hMenu , pos );
*/
- m_peer->Remove( item );
+ GetPeer()->Remove( item );
// and from internal data structures
return wxMenuBase::DoRemove(item);
}
// and from internal data structures
return wxMenuBase::DoRemove(item);
}
void wxMenu::SetTitle(const wxString& label)
{
m_title = label ;
void wxMenu::SetTitle(const wxString& label)
{
m_title = label ;
- m_peer->SetTitle( wxStripMenuCodes( label ) );
+ GetPeer()->SetTitle( wxStripMenuCodes( label ) );
}
bool wxMenu::ProcessCommand(wxCommandEvent & event)
}
bool wxMenu::ProcessCommand(wxCommandEvent & event)
- m_peer->SetBitmap( m_bitmap );
+ GetPeer()->SetBitmap( m_bitmap );
return ;
if ( IsCheckable() && IsChecked() )
return ;
if ( IsCheckable() && IsChecked() )
+ GetPeer()->Check( true );
- m_peer->Check( false );
+ GetPeer()->Check( false );
- m_peer->Enable( IsEnabled() );
+ GetPeer()->Enable( IsEnabled() );
}
void wxMenuItem::UpdateItemText()
}
void wxMenuItem::UpdateItemText()
}
wxAcceleratorEntry *entry = wxAcceleratorEntry::Create( m_text ) ;
}
wxAcceleratorEntry *entry = wxAcceleratorEntry::Create( m_text ) ;
- m_peer->SetLabel( text, entry );
+ GetPeer()->SetLabel( text, entry );
name
);
wxNonOwnedWindowImpl::Associate( m_nowpeer->GetWXWindow() , m_nowpeer ) ;
name
);
wxNonOwnedWindowImpl::Associate( m_nowpeer->GetWXWindow() , m_nowpeer ) ;
- m_peer = wxWidgetImpl::CreateContentView(this);
+ SetPeer(wxWidgetImpl::CreateContentView(this));
DoSetWindowVariant( m_windowVariant ) ;
DoSetWindowVariant( m_windowVariant ) ;
m_nowpeer = wxNonOwnedWindowImpl::CreateNonOwnedWindow(this, GetParent(), nativeWindow );
m_isNativeWindowWrapper = true;
wxNonOwnedWindowImpl::Associate( m_nowpeer->GetWXWindow() , m_nowpeer ) ;
m_nowpeer = wxNonOwnedWindowImpl::CreateNonOwnedWindow(this, GetParent(), nativeWindow );
m_isNativeWindowWrapper = true;
wxNonOwnedWindowImpl::Associate( m_nowpeer->GetWXWindow() , m_nowpeer ) ;
- m_peer = wxWidgetImpl::CreateContentView(this);
+ SetPeer(wxWidgetImpl::CreateContentView(this));
}
void wxNonOwnedWindow::UnsubclassWin()
}
void wxNonOwnedWindow::UnsubclassWin()
wxNonOwnedWindowImpl::RemoveAssociations(m_nowpeer) ;
wxDELETE(m_nowpeer);
wxNonOwnedWindowImpl::RemoveAssociations(m_nowpeer) ;
wxDELETE(m_nowpeer);
m_isNativeWindowWrapper = false;
}
m_isNativeWindowWrapper = false;
}
// inner area, while the content area extends under the translucent
// status bar, therefore we use the content view's area
#ifdef __WXOSX_IPHONE__
// inner area, while the content area extends under the translucent
// status bar, therefore we use the content view's area
#ifdef __WXOSX_IPHONE__
- m_peer->GetContentArea(left, top, w, h);
+ GetPeer()->GetContentArea(left, top, w, h);
#else
m_nowpeer->GetContentArea(left, top, w, h);
#endif
#else
m_nowpeer->GetContentArea(left, top, w, h);
#endif
if ( !wxNotebookBase::Create( parent, id, pos, size, style, name ) )
return false;
if ( !wxNotebookBase::Create( parent, id, pos, size, style, name ) )
return false;
- m_peer = wxWidgetImpl::CreateTabView(this,parent, id, pos, size, style, GetExtraStyle() );
+ SetPeer(wxWidgetImpl::CreateTabView(this,parent, id, pos, size, style, GetExtraStyle() ));
MacPostControlCreate( pos, size );
MacPostControlCreate( pos, size );
m_selection++;
// while this still is the same page showing, we need to update the tabs
m_selection++;
// while this still is the same page showing, we need to update the tabs
- m_peer->SetValue( m_selection + 1 ) ;
+ GetPeer()->SetValue( m_selection + 1 ) ;
}
DoSetSelectionAfterInsertion(nPage, bSelect);
}
DoSetSelectionAfterInsertion(nPage, bSelect);
HIPoint hipoint= { adjustedPt.x , adjustedPt.y } ;
HIViewPartCode outPart = 0 ;
HIPoint hipoint= { adjustedPt.x , adjustedPt.y } ;
HIViewPartCode outPart = 0 ;
- OSStatus err = HIViewGetPartHit( m_peer->GetControlRef(), &hipoint, &outPart );
+ OSStatus err = HIViewGetPartHit( GetPeer()->GetControlRef(), &hipoint, &outPart );
- int max = m_peer->GetMaximum() ;
+ int max = GetPeer()->GetMaximum() ;
if ( outPart == 0 && max > 0 )
{
// this is a hack, as unfortunately a hit on an already selected tab returns 0,
// so we have to go some extra miles to make sure we select something different
// and try again ..
if ( outPart == 0 && max > 0 )
{
// this is a hack, as unfortunately a hit on an already selected tab returns 0,
// so we have to go some extra miles to make sure we select something different
// and try again ..
- int val = m_peer->GetValue() ;
+ int val = GetPeer()->GetValue() ;
int maxval = max ;
if ( max == 1 )
{
int maxval = max ;
if ( max == 1 )
{
- m_peer->SetMaximum( 2 ) ;
+ GetPeer()->SetMaximum( 2 ) ;
maxval = 2 ;
}
if ( val == 1 )
maxval = 2 ;
}
if ( val == 1 )
- m_peer->SetValue( maxval ) ;
+ GetPeer()->SetValue( maxval ) ;
- m_peer->SetValue( 1 ) ;
+ GetPeer()->SetValue( 1 ) ;
- err = HIViewGetPartHit( m_peer->GetControlRef(), &hipoint, &outPart );
+ err = HIViewGetPartHit( GetPeer()->GetControlRef(), &hipoint, &outPart );
- m_peer->SetValue( val ) ;
+ GetPeer()->SetValue( val ) ;
- m_peer->SetMaximum( 1 ) ;
+ GetPeer()->SetMaximum( 1 ) ;
}
if ( outPart >= 1 && outPart <= countPages )
}
if ( outPart >= 1 && outPart <= countPages )
//
void wxNotebook::MacSetupTabs()
{
//
void wxNotebook::MacSetupTabs()
{
- m_peer->SetupTabs(*this);
+ GetPeer()->SetupTabs(*this);
- m_peer->SetValue( m_selection + 1 ) ;
+ GetPeer()->SetValue( m_selection + 1 ) ;
}
bool wxNotebook::OSXHandleClicked( double WXUNUSED(timestampsec) )
{
bool status = false ;
}
bool wxNotebook::OSXHandleClicked( double WXUNUSED(timestampsec) )
{
bool status = false ;
- SInt32 newSel = m_peer->GetValue() - 1 ;
+ SInt32 newSel = GetPeer()->GetValue() - 1 ;
if ( newSel != m_selection )
{
wxBookCtrlEvent changing(
if ( newSel != m_selection )
{
wxBookCtrlEvent changing(
- m_peer->SetValue( m_selection + 1 ) ;
+ GetPeer()->SetValue( m_selection + 1 ) ;
m_labelOrig = m_label = label;
m_labelOrig = m_label = label;
- m_peer = wxWidgetImpl::CreateGroupBox( this, parent, id, label, pos, size, style, GetExtraStyle() );
+ SetPeer(wxWidgetImpl::CreateGroupBox( this, parent, id, label, pos, size, style, GetExtraStyle() ));
for (i = 0; i < n; i++)
{
for (i = 0; i < n; i++)
{
m_labelOrig = m_label = label;
m_labelOrig = m_label = label;
- m_peer = wxWidgetImpl::CreateRadioButton( this, parent, id, label, pos, size, style, GetExtraStyle() );
+ SetPeer(wxWidgetImpl::CreateRadioButton( this, parent, id, label, pos, size, style, GetExtraStyle() ));
MacPostControlCreate( pos, size );
MacPostControlCreate( pos, size );
void wxRadioButton::SetValue(bool val)
{
wxRadioButton *cycle;
void wxRadioButton::SetValue(bool val)
{
wxRadioButton *cycle;
- if (m_peer->GetValue() == val)
+ if (GetPeer()->GetValue() == val)
- m_peer->SetValue( val );
+ GetPeer()->SetValue( val );
if (val)
{
cycle = this->NextInCycle();
if (val)
{
cycle = this->NextInCycle();
bool wxRadioButton::GetValue() const
{
bool wxRadioButton::GetValue() const
{
- return m_peer->GetValue() != 0;
+ return GetPeer()->GetValue() != 0;
}
void wxRadioButton::Command(wxCommandEvent& event)
}
void wxRadioButton::Command(wxCommandEvent& event)
bool wxRadioButton::OSXHandleClicked( double WXUNUSED(timestampsec) )
{
bool wxRadioButton::OSXHandleClicked( double WXUNUSED(timestampsec) )
{
- if ( !m_peer->ButtonClickDidStateChange() )
+ if ( !GetPeer()->ButtonClickDidStateChange() )
{
// if already set -> no action
if (GetValue())
{
// if already set -> no action
if (GetValue())
if ( !wxControl::Create( parent, id, pos, size, style, validator, name ) )
return false;
if ( !wxControl::Create( parent, id, pos, size, style, validator, name ) )
return false;
- m_peer = wxWidgetImpl::CreateScrollBar( this, parent, id, pos, size, style, GetExtraStyle() );
+ SetPeer(wxWidgetImpl::CreateScrollBar( this, parent, id, pos, size, style, GetExtraStyle() ));
MacPostControlCreate( pos, size );
MacPostControlCreate( pos, size );
void wxScrollBar::SetThumbPosition( int viewStart )
{
void wxScrollBar::SetThumbPosition( int viewStart )
{
- m_peer->SetScrollThumb( viewStart, m_viewSize );
+ GetPeer()->SetScrollThumb( viewStart, m_viewSize );
}
int wxScrollBar::GetThumbPosition() const
{
}
int wxScrollBar::GetThumbPosition() const
{
- return m_peer->GetValue();
+ return GetPeer()->GetValue();
}
void wxScrollBar::SetScrollbar( int position,
}
void wxScrollBar::SetScrollbar( int position,
int range1 = wxMax( (m_objectSize - m_viewSize), 0 );
int range1 = wxMax( (m_objectSize - m_viewSize), 0 );
- m_peer->SetMaximum( range1 );
- m_peer->SetScrollThumb( position, m_viewSize );
+ GetPeer()->SetMaximum( range1 );
+ GetPeer()->SetScrollThumb( position, m_viewSize );
}
void wxScrollBar::Command( wxCommandEvent& event )
}
void wxScrollBar::Command( wxCommandEvent& event )
bool wxScrollBar::OSXHandleClicked( double WXUNUSED(timestampsec) )
{
bool wxScrollBar::OSXHandleClicked( double WXUNUSED(timestampsec) )
{
- int new_pos = m_peer->GetValue();
+ int new_pos = GetPeer()->GetValue();
wxScrollEvent event( wxEVT_SCROLL_THUMBRELEASE, m_windowId );
if ( m_windowStyle & wxHORIZONTAL )
wxScrollEvent event( wxEVT_SCROLL_THUMBRELEASE, m_windowId );
if ( m_windowStyle & wxHORIZONTAL )
void wxScrollBar::TriggerScrollEvent( wxEventType scrollEvent )
{
void wxScrollBar::TriggerScrollEvent( wxEventType scrollEvent )
{
- int position = m_peer->GetValue();
+ int position = GetPeer()->GetValue();
- int maxPos = m_peer->GetMaximum();
+ int maxPos = GetPeer()->GetMaximum();
int nScrollInc = 0;
if ( scrollEvent == wxEVT_SCROLL_LINEUP )
int nScrollInc = 0;
if ( scrollEvent == wxEVT_SCROLL_LINEUP )
if ( !wxControl::Create(parent, id, pos, size, style, validator, name) )
return false;
if ( !wxControl::Create(parent, id, pos, size, style, validator, name) )
return false;
- m_peer = wxWidgetImpl::CreateSlider( this, parent, id, value, minValue, maxValue, pos, size, style, GetExtraStyle() );
+ SetPeer(wxWidgetImpl::CreateSlider( this, parent, id, value, minValue, maxValue, pos, size, style, GetExtraStyle() ));
if (style & wxSL_VERTICAL)
// Forces SetSize to use the proper width
if (style & wxSL_VERTICAL)
// Forces SetSize to use the proper width
int wxSlider::GetValue() const
{
// We may need to invert the value returned by the widget
int wxSlider::GetValue() const
{
// We may need to invert the value returned by the widget
- return ValueInvertOrNot( m_peer->GetValue() ) ;
+ return ValueInvertOrNot( GetPeer()->GetValue() ) ;
}
void wxSlider::SetValue(int value)
}
void wxSlider::SetValue(int value)
}
// We only invert for the setting of the actual native widget
}
// We only invert for the setting of the actual native widget
- m_peer->SetValue( ValueInvertOrNot( value ) );
+ GetPeer()->SetValue( ValueInvertOrNot( value ) );
}
void wxSlider::SetRange(int minValue, int maxValue)
}
void wxSlider::SetRange(int minValue, int maxValue)
m_rangeMin = minValue;
m_rangeMax = maxValue;
m_rangeMin = minValue;
m_rangeMax = maxValue;
- m_peer->SetMinimum( m_rangeMin );
- m_peer->SetMaximum( m_rangeMax );
+ GetPeer()->SetMinimum( m_rangeMin );
+ GetPeer()->SetMaximum( m_rangeMax );
if (m_macMinimumStatic)
{
if (m_macMinimumStatic)
{
{
// Whatever the native value is, we may need to invert it for calling
// SetValue and putting the possibly inverted value in the event
{
// Whatever the native value is, we may need to invert it for calling
// SetValue and putting the possibly inverted value in the event
- int value = ValueInvertOrNot( m_peer->GetValue() );
+ int value = ValueInvertOrNot( GetPeer()->GetValue() );
if (GetWindowStyle() & wxSL_VERTICAL)
// If vertical, use current value
if (GetWindowStyle() & wxSL_VERTICAL)
// If vertical, use current value
- text.Printf(wxT("%d"), (int)m_peer->GetValue());
+ text.Printf(wxT("%d"), (int)GetPeer()->GetValue());
else
// Use max so that the current value doesn't drift as centering would need to change
text.Printf(wxT("%d"), m_rangeMax);
else
// Use max so that the current value doesn't drift as centering would need to change
text.Printf(wxT("%d"), m_rangeMax);
if (!parent)
return false;
if (!parent)
return false;
- m_peer = wxWidgetImpl::CreateSpinButton( this , parent, id, 0, m_min, m_max, pos, size,
- style, GetExtraStyle() );
+ SetPeer(wxWidgetImpl::CreateSpinButton( this , parent, id, 0, m_min, m_max, pos, size,
+ style, GetExtraStyle() ));
MacPostControlCreate( pos, size );
MacPostControlCreate( pos, size );
void wxSpinButton::SetValue( int val )
{
void wxSpinButton::SetValue( int val )
{
- m_peer->SetValue( val );
+ GetPeer()->SetValue( val );
}
int wxSpinButton::GetValue() const
{
}
int wxSpinButton::GetValue() const
{
- return m_peer->GetValue();
+ return GetPeer()->GetValue();
}
void wxSpinButton::SetRange(int minVal, int maxVal)
{
m_min = minVal;
m_max = maxVal;
}
void wxSpinButton::SetRange(int minVal, int maxVal)
{
m_min = minVal;
m_max = maxVal;
- m_peer->SetMaximum( maxVal );
- m_peer->SetMinimum( minVal );
+ GetPeer()->SetMaximum( maxVal );
+ GetPeer()->SetMinimum( minVal );
}
void wxSpinButton::SendThumbTrackEvent()
}
void wxSpinButton::SendThumbTrackEvent()
- m_peer->SetValue( newValue );
+ GetPeer()->SetValue( newValue );
// always send a thumbtrack event
SendThumbTrackEvent() ;
// always send a thumbtrack event
SendThumbTrackEvent() ;
wxSearchWidgetImpl* wxSearchCtrl::GetSearchPeer() const
{
wxSearchWidgetImpl* wxSearchCtrl::GetSearchPeer() const
{
- return dynamic_cast<wxSearchWidgetImpl*> (m_peer);
+ return dynamic_cast<wxSearchWidgetImpl*> (GetPeer());
}
wxSearchCtrl::~wxSearchCtrl()
}
wxSearchCtrl::~wxSearchCtrl()
- m_peer = wxWidgetImpl::CreateSearchControl( this, GetParent(), GetId(), value, pos, size, style, GetExtraStyle() );
+ SetPeer(wxWidgetImpl::CreateSearchControl( this, GetParent(), GetId(), value, pos, size, style, GetExtraStyle() ));
MacPostControlCreate(pos, size) ;
MacPostControlCreate(pos, size) ;
m_labelOrig = m_label = label;
m_labelOrig = m_label = label;
- m_peer = wxWidgetImpl::CreateGroupBox( this, parent, id, label, pos, size, style, GetExtraStyle() );
+ SetPeer(wxWidgetImpl::CreateGroupBox( this, parent, id, label, pos, size, style, GetExtraStyle() ));
MacPostControlCreate( pos, size );
MacPostControlCreate( pos, size );
style, wxDefaultValidator, name) )
return false;
style, wxDefaultValidator, name) )
return false;
- m_peer = wxWidgetImpl::CreateStaticLine( this, parent, id, pos, size, style, GetExtraStyle() );
+ SetPeer(wxWidgetImpl::CreateStaticLine( this, parent, id, pos, size, style, GetExtraStyle() ));
MacPostControlCreate(pos,size) ;
MacPostControlCreate(pos,size) ;
if ( !wxControl::Create( parent, id, pos, size, style, wxDefaultValidator, name ) )
return false;
if ( !wxControl::Create( parent, id, pos, size, style, wxDefaultValidator, name ) )
return false;
- m_peer = wxWidgetImpl::CreateStaticText( this, parent, id, label, pos, size, style, GetExtraStyle() );
+ SetPeer(wxWidgetImpl::CreateStaticText( this, parent, id, label, pos, size, style, GetExtraStyle() ));
MacPostControlCreate( pos, size );
MacPostControlCreate( pos, size );
void wxStaticText::DoSetLabel(const wxString& label)
{
m_label = RemoveMnemonics(label);
void wxStaticText::DoSetLabel(const wxString& label)
{
m_label = RemoveMnemonics(label);
- m_peer->SetLabel(m_label , GetFont().GetEncoding() );
+ GetPeer()->SetLabel(m_label , GetFont().GetEncoding() );
}
#if wxUSE_MARKUP && wxOSX_USE_COCOA
}
#if wxUSE_MARKUP && wxOSX_USE_COCOA
if ( !wxStaticTextBase::DoSetLabelMarkup(markup) )
return false;
if ( !wxStaticTextBase::DoSetLabelMarkup(markup) )
return false;
- m_peer->SetLabelMarkup(markup);
+ GetPeer()->SetLabelMarkup(markup);
- m_peer = wxWidgetImpl::CreateTextControl( this, GetParent(), GetId(), str, pos, size, style, GetExtraStyle() );
+ SetPeer(wxWidgetImpl::CreateTextControl( this, GetParent(), GetId(), str, pos, size, style, GetExtraStyle() ));
MacPostControlCreate(pos, size) ;
MacPostControlCreate(pos, size) ;
m_labelOrig = m_label = label ;
m_labelOrig = m_label = label ;
- m_peer = wxWidgetImpl::CreateToggleButton( this, parent, id, label, pos, size, style, GetExtraStyle() ) ;
+ SetPeer(wxWidgetImpl::CreateToggleButton( this, parent, id, label, pos, size, style, GetExtraStyle() )) ;
MacPostControlCreate(pos,size) ;
MacPostControlCreate(pos,size) ;
void wxToggleButton::SetValue(bool val)
{
void wxToggleButton::SetValue(bool val)
{
- m_peer->SetValue( val ) ;
+ GetPeer()->SetValue( val ) ;
}
bool wxToggleButton::GetValue() const
{
}
bool wxToggleButton::GetValue() const
{
- return m_peer->GetValue() ;
+ return GetPeer()->GetValue() ;
}
void wxToggleButton::Command(wxCommandEvent & event)
}
void wxToggleButton::Command(wxCommandEvent & event)
if ( !wxControl::Create(parent, id, pos, size, style, validator, name) )
return false;
if ( !wxControl::Create(parent, id, pos, size, style, validator, name) )
return false;
- m_peer = wxWidgetImpl::CreateBitmapToggleButton( this, parent, id, label, pos, size, style, GetExtraStyle() ) ;
+ SetPeer(wxWidgetImpl::CreateBitmapToggleButton( this, parent, id, label, pos, size, style, GetExtraStyle() ));
MacPostControlCreate(pos,size) ;
MacPostControlCreate(pos,size) ;
void wxBitmapToggleButton::SetValue(bool val)
{
void wxBitmapToggleButton::SetValue(bool val)
{
- m_peer->SetValue( val ) ;
+ GetPeer()->SetValue( val ) ;
}
bool wxBitmapToggleButton::GetValue() const
{
}
bool wxBitmapToggleButton::GetValue() const
{
- return m_peer->GetValue() ;
+ return GetPeer()->GetValue() ;
}
void wxBitmapToggleButton::Command(wxCommandEvent & event)
}
void wxBitmapToggleButton::Command(wxCommandEvent & event)
+void wxWindowMac::SetPeer(wxOSXWidgetImpl* peer)
+{
+ wxDELETE(m_peer);
+ // todo event check handlers
+ m_peer = peer;
+}
+
// ---------------------------------------------------------------------------
// Utility Routines to move between different coordinate systems
// ---------------------------------------------------------------------------
// ---------------------------------------------------------------------------
// Utility Routines to move between different coordinate systems
// ---------------------------------------------------------------------------