Point localOrigin ;
Rect clipRect ;
- WindowRef window ;
+ WindowRef window = MacGetRootWindow() ;
wxWindow *win ;
- GetParent()->MacGetPortParams( &localOrigin , &clipRect , &window , &win ) ;
+ int lx , ly ;
+ lx = ly = 0 ;
+ MacWindowToRootWindow( &lx , &ly ) ;
+ localOrigin.v = ly ;
+ localOrigin.h = lx ;
+
+// GetParent()->MacGetPortParams( &localOrigin , &clipRect , &window , &win ) ;
- Rect toolbarrect = { m_y + localOrigin.v , m_x + localOrigin.h ,
- m_y + m_height + localOrigin.v , m_x + m_width + localOrigin.h} ;
+ Rect toolbarrect = { localOrigin.v ,localOrigin.h ,
+ m_height + localOrigin.v , m_width + localOrigin.h} ;
ControlFontStyleRec controlstyle ;
controlstyle.flags = kControlUseFontMask ;
Rect clipRect ;
WindowRef window ;
wxWindow *win ;
+ int lx , ly ;
+ lx = ly = 0 ;
+ MacWindowToRootWindow( &lx , &ly ) ;
+ localOrigin.v = ly ;
+ localOrigin.h = lx ;
- GetParent()->MacGetPortParams( &localOrigin , &clipRect , &window , &win ) ;
+// GetParent()->MacGetPortParams( &localOrigin , &clipRect , &window , &win ) ;
- Rect toolbarrect = { m_y + localOrigin.v , m_x + localOrigin.h ,
- m_y + m_height + localOrigin.v , m_x + m_width + localOrigin.h} ;
+ Rect toolbarrect = { localOrigin.v ,localOrigin.h ,
+ m_height + localOrigin.v , m_width + localOrigin.h} ;
ControlFontStyleRec controlstyle ;
controlstyle.flags = kControlUseFontMask ;
int maxHeight = 0 ;
int toolcount = 0 ;
{
- WindowRef rootwindow = MacGetRootWindow() ;
- wxWindow* wxrootwindow = wxFindWinFromMacWindow( rootwindow ) ;
- ::SetThemeWindowBackground( rootwindow , kThemeBrushDialogBackgroundActive , false ) ;
- wxMacDrawingHelper focus( wxrootwindow ) ;
+ WindowRef rootwindow = MacGetRootWindow() ;
while (node)
{
wxToolBarTool *tool = (wxToolBarTool *)node->Data();
node = node->Next();
}
- if ( wxrootwindow->IsKindOf( CLASSINFO( wxDialog ) ) )
- {
- }
- else
- {
- ::SetThemeWindowBackground( rootwindow , kThemeBrushDocumentWindowBackground , false ) ;
- }
}
if ( GetWindowStyleFlag() & wxTB_HORIZONTAL )
void wxToolBar::OnPaint(wxPaintEvent& event)
{
- Point localOrigin ;
- Rect clipRect ;
- WindowRef window ;
- wxWindow *win ;
-
- GetParent()->MacGetPortParams( &localOrigin , &clipRect , &window , &win ) ;
- if ( window && win )
+ wxPaintDC dc(this) ;
+ wxMacPortSetter helper(&dc) ;
+
+ Rect toolbarrect = { dc.YLOG2DEVMAC(0) , dc.XLOG2DEVMAC(0) ,
+ dc.YLOG2DEVMAC(m_height) , dc.XLOG2DEVMAC(m_width) } ;
+ UMADrawThemePlacard( &toolbarrect , IsEnabled() ? kThemeStateActive : kThemeStateInactive) ;
{
- wxMacDrawingHelper help( win ) ;
- // the mac control manager always assumes to have the origin at 0,0
- bool hasTabBehind = false ;
- wxWindow* parent = GetParent() ;
- while ( parent )
- {
- if( parent->IsTopLevel() )
- {
-// ::SetThemeWindowBackground( win->MacGetWindowData()->m_macWindow , kThemeBrushDialogBackgroundActive , false ) ;
- break ;
- }
-
- if( parent->IsKindOf( CLASSINFO( wxNotebook ) ) || parent->IsKindOf( CLASSINFO( wxTabCtrl ) ))
- {
- if ( ((wxControl*)parent)->GetMacControl() )
- SetUpControlBackground( ((wxControl*)parent)->GetMacControl() , -1 , true ) ;
- break ;
- }
-
- parent = parent->GetParent() ;
- }
-
- Rect toolbarrect = { m_y + localOrigin.v , m_x + localOrigin.h ,
- m_y + localOrigin.v + m_height , m_x + localOrigin.h + m_width } ;
-
- UMADrawThemePlacard( &toolbarrect , IsEnabled() ? kThemeStateActive : kThemeStateInactive) ;
+ int index = 0 ;
+ for ( index = 0 ; index < m_macToolHandles.Count() ; ++index )
{
- int index = 0 ;
- for ( index = 0 ; index < m_macToolHandles.Count() ; ++index )
+ if ( m_macToolHandles[index] )
{
- if ( m_macToolHandles[index] )
- {
- UMADrawControl( (ControlHandle) m_macToolHandles[index] ) ;
- }
+ UMADrawControl( (ControlHandle) m_macToolHandles[index] ) ;
}
}
-// ::SetThemeWindowBackground( win->MacGetWindowData()->m_macWindow , win->MacGetWindowData()->m_macWindowBackgroundTheme , false ) ;
}
}