mac cleanup
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@50112 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -7202,7 +7202,7 @@ void wxGrid::SetCurrentCell( const wxGridCellCoords& coords )
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !(defined(__WXMAC__) && wxMAC_USE_CORE_GRAPHICS)
|
#if !defined(__WXMAC__)
|
||||||
wxClientDC dc( m_gridWin );
|
wxClientDC dc( m_gridWin );
|
||||||
PrepareDC( dc );
|
PrepareDC( dc );
|
||||||
#endif
|
#endif
|
||||||
@@ -7228,7 +7228,7 @@ void wxGrid::SetCurrentCell( const wxGridCellCoords& coords )
|
|||||||
// Otherwise refresh redraws the highlight!
|
// Otherwise refresh redraws the highlight!
|
||||||
m_currentCellCoords = coords;
|
m_currentCellCoords = coords;
|
||||||
|
|
||||||
#if defined(__WXMAC__) && wxMAC_USE_CORE_GRAPHICS
|
#if defined(__WXMAC__)
|
||||||
m_gridWin->Refresh(true /*, & r */);
|
m_gridWin->Refresh(true /*, & r */);
|
||||||
#else
|
#else
|
||||||
DrawGridCellArea( dc, cells );
|
DrawGridCellArea( dc, cells );
|
||||||
@@ -7240,7 +7240,7 @@ void wxGrid::SetCurrentCell( const wxGridCellCoords& coords )
|
|||||||
m_currentCellCoords = coords;
|
m_currentCellCoords = coords;
|
||||||
|
|
||||||
wxGridCellAttr *attr = GetCellAttr( coords );
|
wxGridCellAttr *attr = GetCellAttr( coords );
|
||||||
#if !(defined(__WXMAC__) && wxMAC_USE_CORE_GRAPHICS)
|
#if !defined(__WXMAC__)
|
||||||
DrawCellHighlight( dc, attr );
|
DrawCellHighlight( dc, attr );
|
||||||
#endif
|
#endif
|
||||||
attr->DecRef();
|
attr->DecRef();
|
||||||
@@ -7813,7 +7813,6 @@ void wxGrid::DrawAllGridLines( wxDC& dc, const wxRegion & WXUNUSED(reg) )
|
|||||||
int rightCol = GetColPos( internalXToCol(right) );
|
int rightCol = GetColPos( internalXToCol(right) );
|
||||||
int bottomRow = internalYToRow(bottom);
|
int bottomRow = internalYToRow(bottom);
|
||||||
|
|
||||||
#if !defined(__WXMAC__) || wxMAC_USE_CORE_GRAPHICS
|
|
||||||
wxRegion clippedcells(0, 0, cw, ch);
|
wxRegion clippedcells(0, 0, cw, ch);
|
||||||
|
|
||||||
int i, j, cell_rows, cell_cols;
|
int i, j, cell_rows, cell_cols;
|
||||||
@@ -7841,30 +7840,6 @@ void wxGrid::DrawAllGridLines( wxDC& dc, const wxRegion & WXUNUSED(reg) )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
wxRegion clippedcells( left, top, right - left, bottom - top );
|
|
||||||
|
|
||||||
int i, j, cell_rows, cell_cols;
|
|
||||||
wxRect rect;
|
|
||||||
|
|
||||||
for (j=topRow; j<=bottomRow; j++)
|
|
||||||
{
|
|
||||||
for (i=leftCol; i<=rightCol; i++)
|
|
||||||
{
|
|
||||||
GetCellSize( j, i, &cell_rows, &cell_cols );
|
|
||||||
if ((cell_rows > 1) || (cell_cols > 1))
|
|
||||||
{
|
|
||||||
rect = CellToRect(j, i);
|
|
||||||
clippedcells.Subtract(rect);
|
|
||||||
}
|
|
||||||
else if ((cell_rows < 0) || (cell_cols < 0))
|
|
||||||
{
|
|
||||||
rect = CellToRect(j + cell_rows, i + cell_cols);
|
|
||||||
clippedcells.Subtract(rect);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
dc.SetClippingRegion( clippedcells );
|
dc.SetClippingRegion( clippedcells );
|
||||||
|
|
||||||
|
@@ -15,7 +15,7 @@
|
|||||||
#pragma hdrstop
|
#pragma hdrstop
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if wxUSE_HELP && !defined(__WXWINCE__) && (!defined(__WXMAC__) || defined(__WXMAC_OSX__))
|
#if wxUSE_HELP && !defined(__WXWINCE__)
|
||||||
|
|
||||||
#ifndef WX_PRECOMP
|
#ifndef WX_PRECOMP
|
||||||
#include "wx/list.h"
|
#include "wx/list.h"
|
||||||
|
@@ -1415,7 +1415,7 @@ bool wxListLineData::SetAttributes(wxDC *dc,
|
|||||||
#ifdef __WXMAC__
|
#ifdef __WXMAC__
|
||||||
{
|
{
|
||||||
if (m_owner->HasFocus()
|
if (m_owner->HasFocus()
|
||||||
#ifdef __WXMAC__
|
#if !defined(__WXUNIVERSAL__)
|
||||||
&& IsControlActive( (ControlRef)m_owner->GetHandle() )
|
&& IsControlActive( (ControlRef)m_owner->GetHandle() )
|
||||||
#endif
|
#endif
|
||||||
)
|
)
|
||||||
@@ -1479,7 +1479,7 @@ void wxListLineData::Draw( wxDC *dc )
|
|||||||
{
|
{
|
||||||
int flags = wxCONTROL_SELECTED;
|
int flags = wxCONTROL_SELECTED;
|
||||||
if (m_owner->HasFocus()
|
if (m_owner->HasFocus()
|
||||||
#ifdef __WXMAC__
|
#if defined( __WXMAC__ ) && !defined(__WXUNIVERSAL__)
|
||||||
&& IsControlActive( (ControlRef)m_owner->GetHandle() )
|
&& IsControlActive( (ControlRef)m_owner->GetHandle() )
|
||||||
#endif
|
#endif
|
||||||
)
|
)
|
||||||
@@ -5021,7 +5021,6 @@ bool wxGenericListCtrl::Create(wxWindow *parent,
|
|||||||
|
|
||||||
m_mainWin = new wxListMainWindow( this, wxID_ANY, wxPoint(0, 0), size, style );
|
m_mainWin = new wxListMainWindow( this, wxID_ANY, wxPoint(0, 0), size, style );
|
||||||
|
|
||||||
#ifdef __WXMAC_CARBON__
|
|
||||||
// Human Interface Guidelines ask us for a special font in this case
|
// Human Interface Guidelines ask us for a special font in this case
|
||||||
if ( GetWindowVariant() == wxWINDOW_VARIANT_NORMAL )
|
if ( GetWindowVariant() == wxWINDOW_VARIANT_NORMAL )
|
||||||
{
|
{
|
||||||
@@ -5029,13 +5028,11 @@ bool wxGenericListCtrl::Create(wxWindow *parent,
|
|||||||
font.MacCreateThemeFont( kThemeViewsFont );
|
font.MacCreateThemeFont( kThemeViewsFont );
|
||||||
SetFont( font );
|
SetFont( font );
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
if ( InReportView() )
|
if ( InReportView() )
|
||||||
{
|
{
|
||||||
CreateHeaderWindow();
|
CreateHeaderWindow();
|
||||||
|
|
||||||
#ifdef __WXMAC_CARBON__
|
|
||||||
if (m_headerWin)
|
if (m_headerWin)
|
||||||
{
|
{
|
||||||
wxFont font;
|
wxFont font;
|
||||||
@@ -5043,7 +5040,6 @@ bool wxGenericListCtrl::Create(wxWindow *parent,
|
|||||||
m_headerWin->SetFont( font );
|
m_headerWin->SetFont( font );
|
||||||
CalculateAndSetHeaderHeight();
|
CalculateAndSetHeaderHeight();
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
if ( HasFlag(wxLC_NO_HEADER) )
|
if ( HasFlag(wxLC_NO_HEADER) )
|
||||||
// VZ: why do we create it at all then?
|
// VZ: why do we create it at all then?
|
||||||
|
@@ -666,7 +666,7 @@ wxRendererGeneric::DrawItemSelectionRect(wxWindow * WXUNUSED(win),
|
|||||||
|
|
||||||
dc.SetBrush(brush);
|
dc.SetBrush(brush);
|
||||||
if ((flags & wxCONTROL_CURRENT) && (flags & wxCONTROL_FOCUSED)
|
if ((flags & wxCONTROL_CURRENT) && (flags & wxCONTROL_FOCUSED)
|
||||||
#ifdef __WXMAC__
|
#if defined( __WXMAC__ ) && !defined(__WXUNIVERSAL__)
|
||||||
&& IsControlActive( (ControlRef)win->GetHandle() )
|
&& IsControlActive( (ControlRef)win->GetHandle() )
|
||||||
#endif
|
#endif
|
||||||
)
|
)
|
||||||
|
@@ -213,8 +213,10 @@ void wxSplitterWindow::OnMouseEvent(wxMouseEvent& event)
|
|||||||
// following the mouse movement while it drags the sash, without it we only
|
// following the mouse movement while it drags the sash, without it we only
|
||||||
// draw the sash at the new position but only resize the windows when the
|
// draw the sash at the new position but only resize the windows when the
|
||||||
// dragging is finished
|
// dragging is finished
|
||||||
#if defined( __WXMAC__ ) && defined(TARGET_API_MAC_OSX) && TARGET_API_MAC_OSX == 1
|
#if defined( __WXMAC__ )
|
||||||
bool isLive = true ; // FIXME: why?
|
// FIXME : this should be usable also with no live update, but then this
|
||||||
|
// currently is not visible
|
||||||
|
bool isLive = true;
|
||||||
#else
|
#else
|
||||||
bool isLive = HasFlag(wxSP_LIVE_UPDATE);
|
bool isLive = HasFlag(wxSP_LIVE_UPDATE);
|
||||||
#endif
|
#endif
|
||||||
|
@@ -790,7 +790,7 @@ void wxGenericTreeCtrl::Init()
|
|||||||
|
|
||||||
m_lastOnSame = false;
|
m_lastOnSame = false;
|
||||||
|
|
||||||
#ifdef __WXMAC_CARBON__
|
#ifdef __WXMAC__
|
||||||
m_normalFont.MacCreateThemeFont( kThemeViewsFont ) ;
|
m_normalFont.MacCreateThemeFont( kThemeViewsFont ) ;
|
||||||
#else
|
#else
|
||||||
m_normalFont = wxSystemSettings::GetFont( wxSYS_DEFAULT_GUI_FONT );
|
m_normalFont = wxSystemSettings::GetFont( wxSYS_DEFAULT_GUI_FONT );
|
||||||
@@ -2250,7 +2250,7 @@ void wxGenericTreeCtrl::PaintItem(wxGenericTreeItem *item, wxDC& dc)
|
|||||||
{
|
{
|
||||||
int flags = wxCONTROL_SELECTED;
|
int flags = wxCONTROL_SELECTED;
|
||||||
if (m_hasFocus
|
if (m_hasFocus
|
||||||
#ifdef __WXMAC__
|
#if defined( __WXMAC__ ) && !defined(__WXUNIVERSAL__)
|
||||||
&& IsControlActive( (ControlRef)GetHandle() )
|
&& IsControlActive( (ControlRef)GetHandle() )
|
||||||
#endif
|
#endif
|
||||||
)
|
)
|
||||||
@@ -2390,7 +2390,7 @@ void wxGenericTreeCtrl::PaintLevel( wxGenericTreeItem *item, wxDC &dc, int level
|
|||||||
|
|
||||||
wxColour colText;
|
wxColour colText;
|
||||||
if ( item->IsSelected()
|
if ( item->IsSelected()
|
||||||
#ifdef __WXMAC__
|
#if defined( __WXMAC__ ) && !defined(__WXUNIVERSAL__)
|
||||||
// On wxMac, if the tree doesn't have the focus we draw an empty
|
// On wxMac, if the tree doesn't have the focus we draw an empty
|
||||||
// rectangle, so we want to make sure that the text is visible
|
// rectangle, so we want to make sure that the text is visible
|
||||||
// against the normal background, not the highlightbackground, so
|
// against the normal background, not the highlightbackground, so
|
||||||
|
Reference in New Issue
Block a user