Remove trailing spaces
This commit is contained in:
@@ -987,7 +987,7 @@ public:
|
|||||||
*/
|
*/
|
||||||
void SetTextColour(const wxColour& colText);
|
void SetTextColour(const wxColour& colText);
|
||||||
|
|
||||||
|
|
||||||
void MergeWith(wxGridCellAttr *mergefrom);
|
void MergeWith(wxGridCellAttr *mergefrom);
|
||||||
|
|
||||||
void SetSize(int num_rows, int num_cols);
|
void SetSize(int num_rows, int num_cols);
|
||||||
@@ -4551,7 +4551,7 @@ public:
|
|||||||
*/
|
*/
|
||||||
void SetRowAttr(int row, wxGridCellAttr* attr);
|
void SetRowAttr(int row, wxGridCellAttr* attr);
|
||||||
|
|
||||||
|
|
||||||
wxArrayInt CalcRowLabelsExposed( const wxRegion& reg );
|
wxArrayInt CalcRowLabelsExposed( const wxRegion& reg );
|
||||||
wxArrayInt CalcColLabelsExposed( const wxRegion& reg );
|
wxArrayInt CalcColLabelsExposed( const wxRegion& reg );
|
||||||
wxGridCellCoordsArray CalcCellsExposed( const wxRegion& reg );
|
wxGridCellCoordsArray CalcCellsExposed( const wxRegion& reg );
|
||||||
@@ -4697,7 +4697,7 @@ public:
|
|||||||
|
|
||||||
|
|
||||||
virtual void DrawCellHighlight( wxDC& dc, const wxGridCellAttr *attr );
|
virtual void DrawCellHighlight( wxDC& dc, const wxGridCellAttr *attr );
|
||||||
|
|
||||||
virtual void DrawRowLabels( wxDC& dc, const wxArrayInt& rows );
|
virtual void DrawRowLabels( wxDC& dc, const wxArrayInt& rows );
|
||||||
virtual void DrawRowLabel( wxDC& dc, int row );
|
virtual void DrawRowLabel( wxDC& dc, int row );
|
||||||
|
|
||||||
@@ -4722,9 +4722,9 @@ public:
|
|||||||
|
|
||||||
void SetCellHighlightColour( const wxColour& );
|
void SetCellHighlightColour( const wxColour& );
|
||||||
void SetCellHighlightPenWidth(int width);
|
void SetCellHighlightPenWidth(int width);
|
||||||
void SetCellHighlightROPenWidth(int width);
|
void SetCellHighlightROPenWidth(int width);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
/**
|
/**
|
||||||
Returns @true if this grid has support for cell attributes.
|
Returns @true if this grid has support for cell attributes.
|
||||||
|
@@ -3898,7 +3898,7 @@ void wxAuiManager::Render(wxDC* dc)
|
|||||||
|
|
||||||
void wxAuiManager::Repaint(wxDC* dc)
|
void wxAuiManager::Repaint(wxDC* dc)
|
||||||
{
|
{
|
||||||
#ifdef __WXMAC__
|
#ifdef __WXMAC__
|
||||||
if ( dc == NULL )
|
if ( dc == NULL )
|
||||||
{
|
{
|
||||||
m_frame->Refresh() ;
|
m_frame->Refresh() ;
|
||||||
|
@@ -1107,20 +1107,20 @@ void wxGCDCImpl::DoDrawRotatedText(const wxString& text, wxCoord x, wxCoord y,
|
|||||||
if ( (angle == 0.0) && m_font.IsOk() )
|
if ( (angle == 0.0) && m_font.IsOk() )
|
||||||
{
|
{
|
||||||
DoDrawText(text, x, y);
|
DoDrawText(text, x, y);
|
||||||
|
|
||||||
// Bounding box already updated by DoDrawText(), no need to do it again.
|
// Bounding box already updated by DoDrawText(), no need to do it again.
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get extent of whole text.
|
// Get extent of whole text.
|
||||||
wxCoord w, h, heightLine;
|
wxCoord w, h, heightLine;
|
||||||
GetOwner()->GetMultiLineTextExtent(text, &w, &h, &heightLine);
|
GetOwner()->GetMultiLineTextExtent(text, &w, &h, &heightLine);
|
||||||
|
|
||||||
// Compute the shift for the origin of the next line.
|
// Compute the shift for the origin of the next line.
|
||||||
const double rad = wxDegToRad(angle);
|
const double rad = wxDegToRad(angle);
|
||||||
const double dx = heightLine * sin(rad);
|
const double dx = heightLine * sin(rad);
|
||||||
const double dy = heightLine * cos(rad);
|
const double dy = heightLine * cos(rad);
|
||||||
|
|
||||||
// Draw all text line by line
|
// Draw all text line by line
|
||||||
const wxArrayString lines = wxSplit(text, '\n', '\0');
|
const wxArrayString lines = wxSplit(text, '\n', '\0');
|
||||||
for ( size_t lineNum = 0; lineNum < lines.size(); lineNum++ )
|
for ( size_t lineNum = 0; lineNum < lines.size(); lineNum++ )
|
||||||
@@ -1132,15 +1132,15 @@ void wxGCDCImpl::DoDrawRotatedText(const wxString& text, wxCoord x, wxCoord y,
|
|||||||
else
|
else
|
||||||
m_graphicContext->DrawText( lines[lineNum], x + wxRound(lineNum*dx), y + wxRound(lineNum*dy), wxDegToRad(angle ), m_graphicContext->CreateBrush(m_textBackgroundColour) );
|
m_graphicContext->DrawText( lines[lineNum], x + wxRound(lineNum*dx), y + wxRound(lineNum*dy), wxDegToRad(angle ), m_graphicContext->CreateBrush(m_textBackgroundColour) );
|
||||||
}
|
}
|
||||||
|
|
||||||
// call the bounding box by adding all four vertices of the rectangle
|
// call the bounding box by adding all four vertices of the rectangle
|
||||||
// containing the text to it (simpler and probably not slower than
|
// containing the text to it (simpler and probably not slower than
|
||||||
// determining which of them is really topmost/leftmost/...)
|
// determining which of them is really topmost/leftmost/...)
|
||||||
|
|
||||||
// "upper left" and "upper right"
|
// "upper left" and "upper right"
|
||||||
CalcBoundingBox(x, y);
|
CalcBoundingBox(x, y);
|
||||||
CalcBoundingBox(x + wxCoord(w*cos(rad)), y - wxCoord(w*sin(rad)));
|
CalcBoundingBox(x + wxCoord(w*cos(rad)), y - wxCoord(w*sin(rad)));
|
||||||
|
|
||||||
// "bottom left" and "bottom right"
|
// "bottom left" and "bottom right"
|
||||||
x += (wxCoord)(h*sin(rad));
|
x += (wxCoord)(h*sin(rad));
|
||||||
y += (wxCoord)(h*cos(rad));
|
y += (wxCoord)(h*cos(rad));
|
||||||
@@ -1254,7 +1254,7 @@ wxCoord wxGCDCImpl::GetCharHeight(void) const
|
|||||||
void wxGCDCImpl::Clear(void)
|
void wxGCDCImpl::Clear(void)
|
||||||
{
|
{
|
||||||
wxCHECK_RET( IsOk(), wxT("wxGCDC(cg)::Clear - invalid DC") );
|
wxCHECK_RET( IsOk(), wxT("wxGCDC(cg)::Clear - invalid DC") );
|
||||||
|
|
||||||
if ( m_backgroundBrush.IsOk() )
|
if ( m_backgroundBrush.IsOk() )
|
||||||
{
|
{
|
||||||
m_graphicContext->SetBrush( m_backgroundBrush );
|
m_graphicContext->SetBrush( m_backgroundBrush );
|
||||||
|
@@ -2292,7 +2292,7 @@ void wxGenericTreeCtrl::ScrollTo(const wxTreeItemId &item)
|
|||||||
// update the control before scrolling it
|
// update the control before scrolling it
|
||||||
if (m_dirty)
|
if (m_dirty)
|
||||||
{
|
{
|
||||||
#if defined( __WXMSW__ )
|
#if defined( __WXMSW__ )
|
||||||
Update();
|
Update();
|
||||||
#elif defined(__WXMAC__)
|
#elif defined(__WXMAC__)
|
||||||
Update();
|
Update();
|
||||||
@@ -2301,7 +2301,7 @@ void wxGenericTreeCtrl::ScrollTo(const wxTreeItemId &item)
|
|||||||
DoDirtyProcessing();
|
DoDirtyProcessing();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
wxGenericTreeItem *gitem = (wxGenericTreeItem*) item.m_pItem;
|
wxGenericTreeItem *gitem = (wxGenericTreeItem*) item.m_pItem;
|
||||||
|
|
||||||
int itemY = gitem->GetY();
|
int itemY = gitem->GetY();
|
||||||
@@ -2320,7 +2320,7 @@ void wxGenericTreeCtrl::ScrollTo(const wxTreeItemId &item)
|
|||||||
itemY += itemHeight - clientHeight;
|
itemY += itemHeight - clientHeight;
|
||||||
|
|
||||||
// because itemY below will be divided by PIXELS_PER_UNIT it may
|
// because itemY below will be divided by PIXELS_PER_UNIT it may
|
||||||
// be rounded down, with the result of the item still only being
|
// be rounded down, with the result of the item still only being
|
||||||
// partially visible, so make sure we are rounding up
|
// partially visible, so make sure we are rounding up
|
||||||
itemY += PIXELS_PER_UNIT - 1;
|
itemY += PIXELS_PER_UNIT - 1;
|
||||||
}
|
}
|
||||||
|
@@ -1270,7 +1270,7 @@ wxWinVersion wxGetWinVersion()
|
|||||||
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 10:
|
case 10:
|
||||||
return wxWinVersion_10;
|
return wxWinVersion_10;
|
||||||
}
|
}
|
||||||
|
@@ -149,7 +149,7 @@ bool wxMacCarbonPrinterDC::StartDoc( wxPrinterDC* dc , const wxString& message
|
|||||||
if (m_err == noErr)
|
if (m_err == noErr)
|
||||||
useDefaultResolution = true;
|
useDefaultResolution = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Ignore errors which may occur while retrieving the resolution and just
|
// Ignore errors which may occur while retrieving the resolution and just
|
||||||
// use the default one.
|
// use the default one.
|
||||||
if ( useDefaultResolution )
|
if ( useDefaultResolution )
|
||||||
|
@@ -1352,7 +1352,7 @@ public:
|
|||||||
virtual bool SetAntialiasMode(wxAntialiasMode antialias) wxOVERRIDE;
|
virtual bool SetAntialiasMode(wxAntialiasMode antialias) wxOVERRIDE;
|
||||||
|
|
||||||
virtual bool SetInterpolationQuality(wxInterpolationQuality interpolation) wxOVERRIDE;
|
virtual bool SetInterpolationQuality(wxInterpolationQuality interpolation) wxOVERRIDE;
|
||||||
|
|
||||||
virtual bool SetCompositionMode(wxCompositionMode op) wxOVERRIDE;
|
virtual bool SetCompositionMode(wxCompositionMode op) wxOVERRIDE;
|
||||||
|
|
||||||
virtual void BeginLayer(wxDouble opacity) wxOVERRIDE;
|
virtual void BeginLayer(wxDouble opacity) wxOVERRIDE;
|
||||||
@@ -1392,15 +1392,15 @@ public:
|
|||||||
|
|
||||||
// draws a path by first filling and then stroking
|
// draws a path by first filling and then stroking
|
||||||
virtual void DrawPath( const wxGraphicsPath &path, wxPolygonFillMode fillStyle = wxODDEVEN_RULE ) wxOVERRIDE;
|
virtual void DrawPath( const wxGraphicsPath &path, wxPolygonFillMode fillStyle = wxODDEVEN_RULE ) wxOVERRIDE;
|
||||||
|
|
||||||
// paints a transparent rectangle (only useful for bitmaps or windows)
|
// paints a transparent rectangle (only useful for bitmaps or windows)
|
||||||
virtual void ClearRectangle(wxDouble x, wxDouble y, wxDouble w, wxDouble h) wxOVERRIDE;
|
virtual void ClearRectangle(wxDouble x, wxDouble y, wxDouble w, wxDouble h) wxOVERRIDE;
|
||||||
|
|
||||||
virtual bool ShouldOffset() const wxOVERRIDE
|
virtual bool ShouldOffset() const wxOVERRIDE
|
||||||
{
|
{
|
||||||
if ( !m_enableOffset )
|
if ( !m_enableOffset )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
int penwidth = 0 ;
|
int penwidth = 0 ;
|
||||||
if ( !m_pen.IsNull() )
|
if ( !m_pen.IsNull() )
|
||||||
{
|
{
|
||||||
@@ -1428,10 +1428,10 @@ public:
|
|||||||
virtual void DrawBitmap( const wxGraphicsBitmap &bmp, wxDouble x, wxDouble y, wxDouble w, wxDouble h ) wxOVERRIDE;
|
virtual void DrawBitmap( const wxGraphicsBitmap &bmp, wxDouble x, wxDouble y, wxDouble w, wxDouble h ) wxOVERRIDE;
|
||||||
|
|
||||||
virtual void DrawIcon( const wxIcon &icon, wxDouble x, wxDouble y, wxDouble w, wxDouble h ) wxOVERRIDE;
|
virtual void DrawIcon( const wxIcon &icon, wxDouble x, wxDouble y, wxDouble w, wxDouble h ) wxOVERRIDE;
|
||||||
|
|
||||||
// fast convenience methods
|
// fast convenience methods
|
||||||
|
|
||||||
|
|
||||||
virtual void DrawRectangle( wxDouble x, wxDouble y, wxDouble w, wxDouble h ) wxOVERRIDE;
|
virtual void DrawRectangle( wxDouble x, wxDouble y, wxDouble w, wxDouble h ) wxOVERRIDE;
|
||||||
|
|
||||||
void SetNativeContext( CGContextRef cg );
|
void SetNativeContext( CGContextRef cg );
|
||||||
@@ -1617,7 +1617,7 @@ void wxMacCoreGraphicsContext::Flush()
|
|||||||
bool wxMacCoreGraphicsContext::EnsureIsValid()
|
bool wxMacCoreGraphicsContext::EnsureIsValid()
|
||||||
{
|
{
|
||||||
CheckInvariants();
|
CheckInvariants();
|
||||||
|
|
||||||
if ( !m_cgContext )
|
if ( !m_cgContext )
|
||||||
{
|
{
|
||||||
if (m_invisible)
|
if (m_invisible)
|
||||||
@@ -1729,7 +1729,7 @@ bool wxMacCoreGraphicsContext::SetInterpolationQuality(wxInterpolationQuality in
|
|||||||
{
|
{
|
||||||
if (!EnsureIsValid())
|
if (!EnsureIsValid())
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
if (m_interpolation == interpolation)
|
if (m_interpolation == interpolation)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
@@ -1944,7 +1944,7 @@ void wxMacCoreGraphicsContext::Clip( const wxRegion ®ion )
|
|||||||
// allow usage as measuring context
|
// allow usage as measuring context
|
||||||
// wxASSERT_MSG( m_cgContext != NULL, "Needs a valid context for clipping" );
|
// wxASSERT_MSG( m_cgContext != NULL, "Needs a valid context for clipping" );
|
||||||
#endif
|
#endif
|
||||||
CheckInvariants();
|
CheckInvariants();
|
||||||
}
|
}
|
||||||
|
|
||||||
// clips drawings to the rect
|
// clips drawings to the rect
|
||||||
@@ -1969,7 +1969,7 @@ void wxMacCoreGraphicsContext::Clip( wxDouble x, wxDouble y, wxDouble w, wxDoubl
|
|||||||
// wxFAIL_MSG( "Needs a valid context for clipping" );
|
// wxFAIL_MSG( "Needs a valid context for clipping" );
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
CheckInvariants();
|
CheckInvariants();
|
||||||
}
|
}
|
||||||
|
|
||||||
// resets the clipping to original extent
|
// resets the clipping to original extent
|
||||||
@@ -2002,7 +2002,7 @@ void wxMacCoreGraphicsContext::ResetClip()
|
|||||||
// wxFAIL_MSG( "Needs a valid context for clipping" );
|
// wxFAIL_MSG( "Needs a valid context for clipping" );
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
CheckInvariants();
|
CheckInvariants();
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxMacCoreGraphicsContext::GetClipBox(wxDouble* x, wxDouble* y, wxDouble* w, wxDouble* h)
|
void wxMacCoreGraphicsContext::GetClipBox(wxDouble* x, wxDouble* y, wxDouble* w, wxDouble* h)
|
||||||
@@ -2056,7 +2056,7 @@ void wxMacCoreGraphicsContext::StrokePath( const wxGraphicsPath &path )
|
|||||||
((wxMacCoreGraphicsPenData*)m_pen.GetRefData())->Apply(this);
|
((wxMacCoreGraphicsPenData*)m_pen.GetRefData())->Apply(this);
|
||||||
CGContextAddPath( m_cgContext , (CGPathRef) path.GetNativePath() );
|
CGContextAddPath( m_cgContext , (CGPathRef) path.GetNativePath() );
|
||||||
CGContextStrokePath( m_cgContext );
|
CGContextStrokePath( m_cgContext );
|
||||||
|
|
||||||
CheckInvariants();
|
CheckInvariants();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2111,7 +2111,7 @@ void wxMacCoreGraphicsContext::DrawPath( const wxGraphicsPath &path , wxPolygonF
|
|||||||
|
|
||||||
CGContextAddPath( m_cgContext , (CGPathRef) path.GetNativePath() );
|
CGContextAddPath( m_cgContext , (CGPathRef) path.GetNativePath() );
|
||||||
CGContextDrawPath( m_cgContext , mode );
|
CGContextDrawPath( m_cgContext , mode );
|
||||||
|
|
||||||
CheckInvariants();
|
CheckInvariants();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2143,7 +2143,7 @@ void wxMacCoreGraphicsContext::FillPath( const wxGraphicsPath &path , wxPolygonF
|
|||||||
else
|
else
|
||||||
CGContextFillPath( m_cgContext );
|
CGContextFillPath( m_cgContext );
|
||||||
}
|
}
|
||||||
|
|
||||||
CheckInvariants();
|
CheckInvariants();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2263,7 +2263,7 @@ void wxMacCoreGraphicsContext::DrawBitmap( const wxGraphicsBitmap &bmp, wxDouble
|
|||||||
wxMacDrawCGImage( m_cgContext , &r , image );
|
wxMacDrawCGImage( m_cgContext , &r , image );
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
CheckInvariants();
|
CheckInvariants();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2281,7 +2281,7 @@ void wxMacCoreGraphicsContext::DrawIcon( const wxIcon &icon, wxDouble x, wxDoubl
|
|||||||
wxOSXDrawNSImage( m_cgContext, &r, icon.GetImage());
|
wxOSXDrawNSImage( m_cgContext, &r, icon.GetImage());
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
CheckInvariants();
|
CheckInvariants();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2318,9 +2318,9 @@ void wxMacCoreGraphicsContext::DoDrawText( const wxString &str, wxDouble x, wxDo
|
|||||||
|
|
||||||
wxCFDictionaryRef fontattr(wxCFRetain(fref->OSXGetCTFontAttributes()));
|
wxCFDictionaryRef fontattr(wxCFRetain(fref->OSXGetCTFontAttributes()));
|
||||||
wxCFMutableDictionaryRef inlinefontattr;
|
wxCFMutableDictionaryRef inlinefontattr;
|
||||||
|
|
||||||
bool setColorsInLine = false;
|
bool setColorsInLine = false;
|
||||||
|
|
||||||
// if we emulate boldness the stroke color is not taken from the current context
|
// if we emulate boldness the stroke color is not taken from the current context
|
||||||
// therefore we have to set it explicitly
|
// therefore we have to set it explicitly
|
||||||
if ( fontattr.GetValue(kCTStrokeWidthAttributeName) != NULL)
|
if ( fontattr.GetValue(kCTStrokeWidthAttributeName) != NULL)
|
||||||
@@ -2331,7 +2331,7 @@ void wxMacCoreGraphicsContext::DoDrawText( const wxString &str, wxDouble x, wxDo
|
|||||||
inlinefontattr.SetValue(kCTForegroundColorAttributeName,col);
|
inlinefontattr.SetValue(kCTForegroundColorAttributeName,col);
|
||||||
inlinefontattr.SetValue(kCTStrokeColorAttributeName,col);
|
inlinefontattr.SetValue(kCTStrokeColorAttributeName,col);
|
||||||
}
|
}
|
||||||
|
|
||||||
wxCFRef<CFAttributedStringRef> attrtext( CFAttributedStringCreate(kCFAllocatorDefault, text, setColorsInLine ? inlinefontattr : fontattr ) );
|
wxCFRef<CFAttributedStringRef> attrtext( CFAttributedStringCreate(kCFAllocatorDefault, text, setColorsInLine ? inlinefontattr : fontattr ) );
|
||||||
wxCFRef<CTLineRef> line( CTLineCreateWithAttributedString(attrtext) );
|
wxCFRef<CTLineRef> line( CTLineCreateWithAttributedString(attrtext) );
|
||||||
|
|
||||||
@@ -2352,7 +2352,7 @@ void wxMacCoreGraphicsContext::DoDrawText( const wxString &str, wxDouble x, wxDo
|
|||||||
CGFloat width = CTLineGetTypographicBounds(line, NULL, NULL, NULL);
|
CGFloat width = CTLineGetTypographicBounds(line, NULL, NULL, NULL);
|
||||||
|
|
||||||
CGPoint points[] = { {0.0, -2.0}, {width, -2.0} };
|
CGPoint points[] = { {0.0, -2.0}, {width, -2.0} };
|
||||||
|
|
||||||
CGContextSetStrokeColorWithColor(m_cgContext, col);
|
CGContextSetStrokeColorWithColor(m_cgContext, col);
|
||||||
CGContextSetShouldAntialias(m_cgContext, false);
|
CGContextSetShouldAntialias(m_cgContext, false);
|
||||||
CGContextSetLineWidth(m_cgContext, 1.0);
|
CGContextSetLineWidth(m_cgContext, 1.0);
|
||||||
@@ -2417,7 +2417,7 @@ void wxMacCoreGraphicsContext::GetTextExtent( const wxString &str, wxDouble *wid
|
|||||||
wxMacCoreGraphicsFontData* fref = (wxMacCoreGraphicsFontData*)m_font.GetRefData();
|
wxMacCoreGraphicsFontData* fref = (wxMacCoreGraphicsFontData*)m_font.GetRefData();
|
||||||
|
|
||||||
wxCFStringRef text(strToMeasure, wxLocale::GetSystemEncoding() );
|
wxCFStringRef text(strToMeasure, wxLocale::GetSystemEncoding() );
|
||||||
|
|
||||||
wxCFRef<CFAttributedStringRef> attrtext( CFAttributedStringCreate(kCFAllocatorDefault, text, fref->OSXGetCTFontAttributes() ) );
|
wxCFRef<CFAttributedStringRef> attrtext( CFAttributedStringCreate(kCFAllocatorDefault, text, fref->OSXGetCTFontAttributes() ) );
|
||||||
wxCFRef<CTLineRef> line( CTLineCreateWithAttributedString(attrtext) );
|
wxCFRef<CTLineRef> line( CTLineCreateWithAttributedString(attrtext) );
|
||||||
|
|
||||||
@@ -2436,7 +2436,7 @@ void wxMacCoreGraphicsContext::GetTextExtent( const wxString &str, wxDouble *wid
|
|||||||
if ( externalLeading )
|
if ( externalLeading )
|
||||||
*externalLeading = l;
|
*externalLeading = l;
|
||||||
|
|
||||||
CheckInvariants();
|
CheckInvariants();
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxMacCoreGraphicsContext::GetPartialTextExtents(const wxString& text, wxArrayDouble& widths) const
|
void wxMacCoreGraphicsContext::GetPartialTextExtents(const wxString& text, wxArrayDouble& widths) const
|
||||||
@@ -2479,7 +2479,7 @@ void wxMacCoreGraphicsContext::ClearRectangle( wxDouble x, wxDouble y, wxDouble
|
|||||||
{
|
{
|
||||||
if (!EnsureIsValid())
|
if (!EnsureIsValid())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
CGRect rect = CGRectMake( (CGFloat) x , (CGFloat) y , (CGFloat) w , (CGFloat) h );
|
CGRect rect = CGRectMake( (CGFloat) x , (CGFloat) y , (CGFloat) w , (CGFloat) h );
|
||||||
CGContextClearRect(m_cgContext, rect);
|
CGContextClearRect(m_cgContext, rect);
|
||||||
}
|
}
|
||||||
@@ -2489,10 +2489,10 @@ void wxMacCoreGraphicsContext::DrawRectangle( wxDouble x, wxDouble y, wxDouble w
|
|||||||
if (!EnsureIsValid())
|
if (!EnsureIsValid())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (m_composition == wxCOMPOSITION_DEST)
|
if (m_composition == wxCOMPOSITION_DEST)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// when using shading, we have to go back to drawing paths
|
// when using shading, we have to go back to drawing paths
|
||||||
if ( !m_brush.IsNull() && ((wxMacCoreGraphicsBrushData*)m_brush.GetRefData())->IsShading() )
|
if ( !m_brush.IsNull() && ((wxMacCoreGraphicsBrushData*)m_brush.GetRefData())->IsShading() )
|
||||||
{
|
{
|
||||||
wxGraphicsContext::DrawRectangle( x,y,w,h );
|
wxGraphicsContext::DrawRectangle( x,y,w,h );
|
||||||
@@ -2505,7 +2505,7 @@ void wxMacCoreGraphicsContext::DrawRectangle( wxDouble x, wxDouble y, wxDouble w
|
|||||||
((wxMacCoreGraphicsBrushData*)m_brush.GetRefData())->Apply(this);
|
((wxMacCoreGraphicsBrushData*)m_brush.GetRefData())->Apply(this);
|
||||||
CGContextFillRect(m_cgContext, rect);
|
CGContextFillRect(m_cgContext, rect);
|
||||||
}
|
}
|
||||||
|
|
||||||
wxQuartzOffsetHelper helper( m_cgContext , ShouldOffset() );
|
wxQuartzOffsetHelper helper( m_cgContext , ShouldOffset() );
|
||||||
if ( !m_pen.IsNull() )
|
if ( !m_pen.IsNull() )
|
||||||
{
|
{
|
||||||
|
@@ -110,7 +110,7 @@ void wxStatusBarMac::InitColours()
|
|||||||
wxColour bg = wxSystemSettings::GetColour(wxSYS_COLOUR_APPWORKSPACE);
|
wxColour bg = wxSystemSettings::GetColour(wxSYS_COLOUR_APPWORKSPACE);
|
||||||
m_textActive = wxSystemSettings::GetColour(wxSYS_COLOUR_BTNTEXT);
|
m_textActive = wxSystemSettings::GetColour(wxSYS_COLOUR_BTNTEXT);
|
||||||
m_textInactive = wxSystemSettings::GetColour(wxSYS_COLOUR_GRAYTEXT);
|
m_textInactive = wxSystemSettings::GetColour(wxSYS_COLOUR_GRAYTEXT);
|
||||||
|
|
||||||
if ( bg.Red() < 128 )
|
if ( bg.Red() < 128 )
|
||||||
{
|
{
|
||||||
// dark mode appearance
|
// dark mode appearance
|
||||||
|
@@ -1427,7 +1427,7 @@ void wxPropertyGrid::RegainColours()
|
|||||||
wxColour capForeCol = wxPGAdjustColour(m_colCapBack,colDec,5000,5000,true);
|
wxColour capForeCol = wxPGAdjustColour(m_colCapBack,colDec,5000,5000,true);
|
||||||
if (wxPGGetColAvg(m_colCapBack) < 100)
|
if (wxPGGetColAvg(m_colCapBack) < 100)
|
||||||
capForeCol = wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOWTEXT );
|
capForeCol = wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOWTEXT );
|
||||||
|
|
||||||
m_colCapFore = capForeCol;
|
m_colCapFore = capForeCol;
|
||||||
m_categoryDefaultCell.GetData()->SetFgCol(capForeCol);
|
m_categoryDefaultCell.GetData()->SetFgCol(capForeCol);
|
||||||
}
|
}
|
||||||
|
@@ -159,7 +159,7 @@ void wxQtDCImpl::SetPen(const wxPen& pen)
|
|||||||
void wxQtDCImpl::SetBrush(const wxBrush& brush)
|
void wxQtDCImpl::SetBrush(const wxBrush& brush)
|
||||||
{
|
{
|
||||||
m_brush = brush;
|
m_brush = brush;
|
||||||
|
|
||||||
if (brush.GetStyle() == wxBRUSHSTYLE_STIPPLE_MASK_OPAQUE)
|
if (brush.GetStyle() == wxBRUSHSTYLE_STIPPLE_MASK_OPAQUE)
|
||||||
{
|
{
|
||||||
// Use a monochrome mask: use foreground color for the mask
|
// Use a monochrome mask: use foreground color for the mask
|
||||||
@@ -190,7 +190,7 @@ void wxQtDCImpl::SetBrush(const wxBrush& brush)
|
|||||||
void wxQtDCImpl::SetBackground(const wxBrush& brush)
|
void wxQtDCImpl::SetBackground(const wxBrush& brush)
|
||||||
{
|
{
|
||||||
m_backgroundBrush = brush;
|
m_backgroundBrush = brush;
|
||||||
|
|
||||||
if (m_qtPainter->isActive())
|
if (m_qtPainter->isActive())
|
||||||
m_qtPainter->setBackground(brush.GetHandle());
|
m_qtPainter->setBackground(brush.GetHandle());
|
||||||
}
|
}
|
||||||
@@ -375,7 +375,7 @@ void wxQtDCImpl::Clear()
|
|||||||
{
|
{
|
||||||
int width, height;
|
int width, height;
|
||||||
DoGetSize(&width, &height);
|
DoGetSize(&width, &height);
|
||||||
|
|
||||||
m_qtPainter->eraseRect(QRect(0, 0, width, height));
|
m_qtPainter->eraseRect(QRect(0, 0, width, height));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -486,7 +486,7 @@ bool wxQtDCImpl::DoGetPixel(wxCoord x, wxCoord y, wxColour *col) const
|
|||||||
if ( col )
|
if ( col )
|
||||||
{
|
{
|
||||||
wxCHECK_MSG( m_qtImage != NULL, false, "This DC doesn't support GetPixel()" );
|
wxCHECK_MSG( m_qtImage != NULL, false, "This DC doesn't support GetPixel()" );
|
||||||
|
|
||||||
QColor pixel = m_qtImage->pixel( x, y );
|
QColor pixel = m_qtImage->pixel( x, y );
|
||||||
col->Set( pixel.red(), pixel.green(), pixel.blue(), pixel.alpha() );
|
col->Set( pixel.red(), pixel.green(), pixel.blue(), pixel.alpha() );
|
||||||
|
|
||||||
@@ -519,7 +519,7 @@ void wxQtDCImpl::DoDrawArc(wxCoord x1, wxCoord y1,
|
|||||||
qreal penWidth = m_qtPainter->pen().width();
|
qreal penWidth = m_qtPainter->pen().width();
|
||||||
qreal lenRadius = l1.length() - penWidth / 2;
|
qreal lenRadius = l1.length() - penWidth / 2;
|
||||||
QPointF centerToCorner( lenRadius, lenRadius );
|
QPointF centerToCorner( lenRadius, lenRadius );
|
||||||
|
|
||||||
QRect rectangle = QRectF( center - centerToCorner, center + centerToCorner ).toRect();
|
QRect rectangle = QRectF( center - centerToCorner, center + centerToCorner ).toRect();
|
||||||
|
|
||||||
// Calculate the angles
|
// Calculate the angles
|
||||||
@@ -530,7 +530,7 @@ void wxQtDCImpl::DoDrawArc(wxCoord x1, wxCoord y1,
|
|||||||
{
|
{
|
||||||
spanAngle = -spanAngle;
|
spanAngle = -spanAngle;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( spanAngle == 0 )
|
if ( spanAngle == 0 )
|
||||||
m_qtPainter->drawEllipse( rectangle );
|
m_qtPainter->drawEllipse( rectangle );
|
||||||
else
|
else
|
||||||
@@ -578,7 +578,7 @@ void wxQtDCImpl::DoDrawRoundedRectangle(wxCoord x, wxCoord y,
|
|||||||
y += penWidth / 2;
|
y += penWidth / 2;
|
||||||
width -= penWidth;
|
width -= penWidth;
|
||||||
height -= penWidth;
|
height -= penWidth;
|
||||||
|
|
||||||
m_qtPainter->drawRoundedRect( x, y, width, height, radius, radius );
|
m_qtPainter->drawRoundedRect( x, y, width, height, radius, radius );
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -591,7 +591,7 @@ void wxQtDCImpl::DoDrawEllipse(wxCoord x, wxCoord y,
|
|||||||
y += penWidth / 2;
|
y += penWidth / 2;
|
||||||
width -= penWidth;
|
width -= penWidth;
|
||||||
height -= penWidth;
|
height -= penWidth;
|
||||||
|
|
||||||
if ( m_pen.IsNonTransparent() )
|
if ( m_pen.IsNonTransparent() )
|
||||||
{
|
{
|
||||||
// Save pen/brush
|
// Save pen/brush
|
||||||
@@ -620,7 +620,7 @@ void wxQtDCImpl::DoCrossHair(wxCoord x, wxCoord y)
|
|||||||
int left, top, right, bottom;
|
int left, top, right, bottom;
|
||||||
inv.map( w, h, &right, &bottom );
|
inv.map( w, h, &right, &bottom );
|
||||||
inv.map( 0, 0, &left, &top );
|
inv.map( 0, 0, &left, &top );
|
||||||
|
|
||||||
m_qtPainter->drawLine( left, y, right, y );
|
m_qtPainter->drawLine( left, y, right, y );
|
||||||
m_qtPainter->drawLine( x, top, x, bottom );
|
m_qtPainter->drawLine( x, top, x, bottom );
|
||||||
}
|
}
|
||||||
@@ -636,18 +636,18 @@ void wxQtDCImpl::DoDrawBitmap(const wxBitmap &bmp, wxCoord x, wxCoord y,
|
|||||||
QPixmap pix = *bmp.GetHandle();
|
QPixmap pix = *bmp.GetHandle();
|
||||||
if (pix.depth() == 1) {
|
if (pix.depth() == 1) {
|
||||||
//Monochrome bitmap, draw using text fore/background
|
//Monochrome bitmap, draw using text fore/background
|
||||||
|
|
||||||
//Save pen/brush
|
//Save pen/brush
|
||||||
QBrush savedBrush = m_qtPainter->background();
|
QBrush savedBrush = m_qtPainter->background();
|
||||||
QPen savedPen = m_qtPainter->pen();
|
QPen savedPen = m_qtPainter->pen();
|
||||||
|
|
||||||
//Use text colors
|
//Use text colors
|
||||||
m_qtPainter->setBackground(QBrush(m_textBackgroundColour.GetQColor()));
|
m_qtPainter->setBackground(QBrush(m_textBackgroundColour.GetQColor()));
|
||||||
m_qtPainter->setPen(QPen(m_textForegroundColour.GetQColor()));
|
m_qtPainter->setPen(QPen(m_textForegroundColour.GetQColor()));
|
||||||
|
|
||||||
//Draw
|
//Draw
|
||||||
m_qtPainter->drawPixmap(x, y, pix);
|
m_qtPainter->drawPixmap(x, y, pix);
|
||||||
|
|
||||||
//Restore saved settings
|
//Restore saved settings
|
||||||
m_qtPainter->setBackground(savedBrush);
|
m_qtPainter->setBackground(savedBrush);
|
||||||
m_qtPainter->setPen(savedPen);
|
m_qtPainter->setPen(savedPen);
|
||||||
@@ -668,11 +668,11 @@ void wxQtDCImpl::DoDrawText(const wxString& text, wxCoord x, wxCoord y)
|
|||||||
// Disable logical function
|
// Disable logical function
|
||||||
QPainter::CompositionMode savedOp = m_qtPainter->compositionMode();
|
QPainter::CompositionMode savedOp = m_qtPainter->compositionMode();
|
||||||
m_qtPainter->setCompositionMode( QPainter::CompositionMode_SourceOver );
|
m_qtPainter->setCompositionMode( QPainter::CompositionMode_SourceOver );
|
||||||
|
|
||||||
if (m_backgroundMode == wxSOLID)
|
if (m_backgroundMode == wxSOLID)
|
||||||
{
|
{
|
||||||
m_qtPainter->setBackgroundMode(Qt::OpaqueMode);
|
m_qtPainter->setBackgroundMode(Qt::OpaqueMode);
|
||||||
|
|
||||||
//Save pen/brush
|
//Save pen/brush
|
||||||
QBrush savedBrush = m_qtPainter->background();
|
QBrush savedBrush = m_qtPainter->background();
|
||||||
|
|
||||||
@@ -700,7 +700,7 @@ void wxQtDCImpl::DoDrawRotatedText(const wxString& text,
|
|||||||
{
|
{
|
||||||
if (m_backgroundMode == wxSOLID)
|
if (m_backgroundMode == wxSOLID)
|
||||||
m_qtPainter->setBackgroundMode(Qt::OpaqueMode);
|
m_qtPainter->setBackgroundMode(Qt::OpaqueMode);
|
||||||
|
|
||||||
//Move and rotate (reverse angle direction in Qt and wx)
|
//Move and rotate (reverse angle direction in Qt and wx)
|
||||||
m_qtPainter->translate(x, y);
|
m_qtPainter->translate(x, y);
|
||||||
m_qtPainter->rotate(-angle);
|
m_qtPainter->rotate(-angle);
|
||||||
@@ -715,19 +715,19 @@ void wxQtDCImpl::DoDrawRotatedText(const wxString& text,
|
|||||||
if (m_backgroundMode == wxSOLID)
|
if (m_backgroundMode == wxSOLID)
|
||||||
{
|
{
|
||||||
m_qtPainter->setBackgroundMode(Qt::OpaqueMode);
|
m_qtPainter->setBackgroundMode(Qt::OpaqueMode);
|
||||||
|
|
||||||
//Save pen/brush
|
//Save pen/brush
|
||||||
QBrush savedBrush = m_qtPainter->background();
|
QBrush savedBrush = m_qtPainter->background();
|
||||||
|
|
||||||
//Use text colors
|
//Use text colors
|
||||||
m_qtPainter->setBackground(QBrush(m_textBackgroundColour.GetQColor()));
|
m_qtPainter->setBackground(QBrush(m_textBackgroundColour.GetQColor()));
|
||||||
|
|
||||||
//Draw
|
//Draw
|
||||||
m_qtPainter->drawText(x, y, 1, 1, Qt::TextDontClip, wxQtConvertString(text));
|
m_qtPainter->drawText(x, y, 1, 1, Qt::TextDontClip, wxQtConvertString(text));
|
||||||
|
|
||||||
//Restore saved settings
|
//Restore saved settings
|
||||||
m_qtPainter->setBackground(savedBrush);
|
m_qtPainter->setBackground(savedBrush);
|
||||||
|
|
||||||
m_qtPainter->setBackgroundMode(Qt::TransparentMode);
|
m_qtPainter->setBackgroundMode(Qt::TransparentMode);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -749,9 +749,9 @@ bool wxQtDCImpl::DoBlit(wxCoord xdest, wxCoord ydest,
|
|||||||
wxCoord WXUNUSED(ysrcMask) )
|
wxCoord WXUNUSED(ysrcMask) )
|
||||||
{
|
{
|
||||||
wxQtDCImpl *implSource = (wxQtDCImpl*)source->GetImpl();
|
wxQtDCImpl *implSource = (wxQtDCImpl*)source->GetImpl();
|
||||||
|
|
||||||
QImage *qtSource = implSource->GetQImage();
|
QImage *qtSource = implSource->GetQImage();
|
||||||
|
|
||||||
// Not a CHECK on purpose
|
// Not a CHECK on purpose
|
||||||
if ( !qtSource )
|
if ( !qtSource )
|
||||||
return false;
|
return false;
|
||||||
@@ -763,7 +763,7 @@ bool wxQtDCImpl::DoBlit(wxCoord xdest, wxCoord ydest,
|
|||||||
// Change logical function
|
// Change logical function
|
||||||
wxRasterOperationMode savedMode = GetLogicalFunction();
|
wxRasterOperationMode savedMode = GetLogicalFunction();
|
||||||
SetLogicalFunction( rop );
|
SetLogicalFunction( rop );
|
||||||
|
|
||||||
m_qtPainter->drawImage( QRect( xdest, ydest, width, height ),
|
m_qtPainter->drawImage( QRect( xdest, ydest, width, height ),
|
||||||
qtSourceConverted,
|
qtSourceConverted,
|
||||||
QRect( xsrc, ysrc, width, height ) );
|
QRect( xsrc, ysrc, width, height ) );
|
||||||
@@ -806,7 +806,7 @@ void wxQtDCImpl::DoDrawPolygon(int n, const wxPoint points[],
|
|||||||
}
|
}
|
||||||
|
|
||||||
Qt::FillRule fill = (fillStyle == wxWINDING_RULE) ? Qt::WindingFill : Qt::OddEvenFill;
|
Qt::FillRule fill = (fillStyle == wxWINDING_RULE) ? Qt::WindingFill : Qt::OddEvenFill;
|
||||||
|
|
||||||
m_qtPainter->translate(xoffset, yoffset);
|
m_qtPainter->translate(xoffset, yoffset);
|
||||||
m_qtPainter->drawPolygon(qtPoints, fill);
|
m_qtPainter->drawPolygon(qtPoints, fill);
|
||||||
// Reset transform
|
// Reset transform
|
||||||
|
@@ -242,7 +242,7 @@ bool wxRichTextCtrl::Create( wxWindow* parent, wxWindowID id, const wxString& va
|
|||||||
const wxValidator& validator, const wxString& name)
|
const wxValidator& validator, const wxString& name)
|
||||||
{
|
{
|
||||||
style |= wxVSCROLL;
|
style |= wxVSCROLL;
|
||||||
|
|
||||||
// If read-only, the programmer probably wants to retain dialog keyboard navigation.
|
// If read-only, the programmer probably wants to retain dialog keyboard navigation.
|
||||||
// If you don't, then pass wxWANTS_CHARS explicitly.
|
// If you don't, then pass wxWANTS_CHARS explicitly.
|
||||||
if ((style & wxTE_READONLY) == 0)
|
if ((style & wxTE_READONLY) == 0)
|
||||||
@@ -2180,7 +2180,7 @@ bool wxRichTextCtrl::MoveRight(int noPositions, int flags)
|
|||||||
SetFocusObject(actualContainer, false /* don't set caret position yet */);
|
SetFocusObject(actualContainer, false /* don't set caret position yet */);
|
||||||
bool caretLineStart = true;
|
bool caretLineStart = true;
|
||||||
long caretPosition = FindCaretPositionForCharacterPosition(newPos, hitTest, actualContainer, caretLineStart);
|
long caretPosition = FindCaretPositionForCharacterPosition(newPos, hitTest, actualContainer, caretLineStart);
|
||||||
|
|
||||||
SelectNone();
|
SelectNone();
|
||||||
|
|
||||||
SetCaretPosition(caretPosition, caretLineStart);
|
SetCaretPosition(caretPosition, caretLineStart);
|
||||||
@@ -2511,7 +2511,7 @@ bool wxRichTextCtrl::StartCellSelection(wxRichTextTable* table, wxRichTextParagr
|
|||||||
SetFocusObject(newCell, false /* don't set caret and clear selection */);
|
SetFocusObject(newCell, false /* don't set caret and clear selection */);
|
||||||
MoveCaret(-1, false);
|
MoveCaret(-1, false);
|
||||||
SetDefaultStyleToCursorStyle();
|
SetDefaultStyleToCursorStyle();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3001,7 +3001,7 @@ void wxRichTextCtrl::SetupScrollbars(bool atTop, bool fromOnPaint)
|
|||||||
doSetScrollbars = false;
|
doSetScrollbars = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
m_lastWindowSize = windowSize;
|
m_lastWindowSize = windowSize;
|
||||||
m_setupScrollbarsCount ++;
|
m_setupScrollbarsCount ++;
|
||||||
if (m_setupScrollbarsCount > 32000)
|
if (m_setupScrollbarsCount > 32000)
|
||||||
|
Reference in New Issue
Block a user