'static not in the beginning of the decl' warnings fixed
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3702 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
077968ca5e
commit
7d5af6fa6b
@ -124,9 +124,9 @@ wxWindowDC::wxWindowDC( wxWindow *window )
|
||||
if (!m_window)
|
||||
{
|
||||
/* don't report problems */
|
||||
m_ok = TRUE;
|
||||
m_ok = TRUE;
|
||||
|
||||
return;
|
||||
return;
|
||||
}
|
||||
|
||||
if (window->m_wxwindow)
|
||||
@ -189,10 +189,10 @@ void wxWindowDC::DoCrossHair( long x, long y )
|
||||
long xx = XLOG2DEV(x);
|
||||
long yy = YLOG2DEV(y);
|
||||
if (m_window)
|
||||
{
|
||||
{
|
||||
gdk_draw_line( m_window, m_penGC, 0, yy, XLOG2DEVREL(w), yy );
|
||||
gdk_draw_line( m_window, m_penGC, xx, 0, xx, YLOG2DEVREL(h) );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -305,7 +305,7 @@ void wxWindowDC::DoDrawLines( int n, wxPoint points[], long xoffset, long yoffse
|
||||
long y1 = YLOG2DEV(points[i].y + yoffset); // oh, what a waste
|
||||
long y2 = YLOG2DEV(points[i+1].y + yoffset);
|
||||
|
||||
if (m_window)
|
||||
if (m_window)
|
||||
gdk_draw_line( m_window, m_penGC, x1, y1, x2, y2 );
|
||||
|
||||
CalcBoundingBox( points[i+1].x + xoffset, points[i+1].y + yoffset );
|
||||
@ -441,7 +441,7 @@ void wxWindowDC::DoDrawRoundedRectangle( long x, long y, long width, long height
|
||||
gdk_draw_arc( m_window, m_penGC, FALSE, xx+ww-dd, yy, dd, dd, 0, 90*64 );
|
||||
gdk_draw_arc( m_window, m_penGC, FALSE, xx+ww-dd, yy+hh-dd, dd, dd, 270*64, 90*64 );
|
||||
gdk_draw_arc( m_window, m_penGC, FALSE, xx, yy+hh-dd, dd, dd, 180*64, 90*64 );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// this ignores the radius
|
||||
@ -880,10 +880,10 @@ void wxWindowDC::SetPen( const wxPen &pen )
|
||||
width = (int)w;
|
||||
}
|
||||
|
||||
const static char dotted[] = {1, 1};
|
||||
const static char short_dashed[] = {2, 2};
|
||||
const static char long_dashed[] = {2, 4};
|
||||
const static char dotted_dashed[] = {3, 3, 1, 3};
|
||||
static const char dotted[] = {1, 1};
|
||||
static const char short_dashed[] = {2, 2};
|
||||
static const char long_dashed[] = {2, 4};
|
||||
static const char dotted_dashed[] = {3, 3, 1, 3};
|
||||
|
||||
// We express dash pattern in pen width unit, so we are
|
||||
// independent of zoom factor and so on...
|
||||
@ -894,52 +894,52 @@ void wxWindowDC::SetPen( const wxPen &pen )
|
||||
switch (m_pen.GetStyle())
|
||||
{
|
||||
case wxUSER_DASH:
|
||||
{
|
||||
lineStyle = GDK_LINE_ON_OFF_DASH;
|
||||
{
|
||||
lineStyle = GDK_LINE_ON_OFF_DASH;
|
||||
req_nb_dash = m_pen.GetDashCount();
|
||||
req_dash = m_pen.GetDash();
|
||||
break;
|
||||
}
|
||||
}
|
||||
case wxDOT:
|
||||
{
|
||||
lineStyle = GDK_LINE_ON_OFF_DASH;
|
||||
{
|
||||
lineStyle = GDK_LINE_ON_OFF_DASH;
|
||||
req_nb_dash = 2;
|
||||
req_dash = dotted;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case wxLONG_DASH:
|
||||
{
|
||||
lineStyle = GDK_LINE_ON_OFF_DASH;
|
||||
{
|
||||
lineStyle = GDK_LINE_ON_OFF_DASH;
|
||||
req_nb_dash = 2;
|
||||
req_dash = long_dashed;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case wxSHORT_DASH:
|
||||
{
|
||||
lineStyle = GDK_LINE_ON_OFF_DASH;
|
||||
{
|
||||
lineStyle = GDK_LINE_ON_OFF_DASH;
|
||||
req_nb_dash = 2;
|
||||
req_dash = short_dashed;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case wxDOT_DASH:
|
||||
{
|
||||
// lineStyle = GDK_LINE_DOUBLE_DASH;
|
||||
lineStyle = GDK_LINE_ON_OFF_DASH;
|
||||
{
|
||||
// lineStyle = GDK_LINE_DOUBLE_DASH;
|
||||
lineStyle = GDK_LINE_ON_OFF_DASH;
|
||||
req_nb_dash = 4;
|
||||
req_dash = dotted_dashed;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case wxTRANSPARENT:
|
||||
case wxSTIPPLE:
|
||||
case wxTRANSPARENT:
|
||||
case wxSTIPPLE:
|
||||
case wxSOLID:
|
||||
default:
|
||||
{
|
||||
lineStyle = GDK_LINE_SOLID;
|
||||
default:
|
||||
{
|
||||
lineStyle = GDK_LINE_SOLID;
|
||||
req_dash = (wxDash*)NULL;
|
||||
req_nb_dash = 0;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
#if (GTK_MINOR_VERSION > 0)
|
||||
@ -950,13 +950,13 @@ void wxWindowDC::SetPen( const wxPen &pen )
|
||||
{
|
||||
for (int i = 0; i < req_nb_dash; i++)
|
||||
real_req_dash[i] = req_dash[i] * width;
|
||||
gdk_gc_set_dashes( m_penGC, 0, real_req_dash, req_nb_dash );
|
||||
gdk_gc_set_dashes( m_penGC, 0, real_req_dash, req_nb_dash );
|
||||
delete[] real_req_dash;
|
||||
}
|
||||
else
|
||||
{
|
||||
// No Memory. We use non-scaled dash pattern...
|
||||
gdk_gc_set_dashes( m_penGC, 0, (char*)req_dash, req_nb_dash );
|
||||
gdk_gc_set_dashes( m_penGC, 0, (char*)req_dash, req_nb_dash );
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@ -1003,15 +1003,15 @@ void wxWindowDC::SetBrush( const wxBrush &brush )
|
||||
if ((m_brush.GetStyle() == wxSTIPPLE) && (m_brush.GetStipple()->Ok()))
|
||||
{
|
||||
if (m_brush.GetStipple()->GetPixmap())
|
||||
{
|
||||
{
|
||||
gdk_gc_set_fill( m_brushGC, GDK_TILED );
|
||||
gdk_gc_set_tile( m_brushGC, m_brush.GetStipple()->GetPixmap() );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
{
|
||||
gdk_gc_set_fill( m_brushGC, GDK_STIPPLED );
|
||||
gdk_gc_set_stipple( m_brushGC, m_brush.GetStipple()->GetBitmap() );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (IS_HATCH(m_brush.GetStyle()))
|
||||
@ -1048,15 +1048,15 @@ void wxWindowDC::SetBackground( const wxBrush &brush )
|
||||
if ((m_backgroundBrush.GetStyle() == wxSTIPPLE) && (m_backgroundBrush.GetStipple()->Ok()))
|
||||
{
|
||||
if (m_backgroundBrush.GetStipple()->GetPixmap())
|
||||
{
|
||||
{
|
||||
gdk_gc_set_fill( m_bgGC, GDK_TILED );
|
||||
gdk_gc_set_tile( m_bgGC, m_backgroundBrush.GetStipple()->GetPixmap() );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
{
|
||||
gdk_gc_set_fill( m_bgGC, GDK_STIPPLED );
|
||||
gdk_gc_set_stipple( m_bgGC, m_backgroundBrush.GetStipple()->GetBitmap() );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (IS_HATCH(m_backgroundBrush.GetStyle()))
|
||||
@ -1084,22 +1084,22 @@ void wxWindowDC::SetLogicalFunction( int function )
|
||||
case wxCLEAR: mode = GDK_CLEAR; break;
|
||||
case wxSET: mode = GDK_SET; break;
|
||||
case wxOR_INVERT: mode = GDK_OR_INVERT; break;
|
||||
case wxSRC_AND:
|
||||
case wxSRC_AND:
|
||||
case wxAND: mode = GDK_AND; break;
|
||||
case wxSRC_OR:
|
||||
case wxSRC_OR:
|
||||
case wxOR: mode = GDK_OR; break;
|
||||
case wxEQUIV: mode = GDK_EQUIV; break;
|
||||
case wxNAND: mode = GDK_NAND; break;
|
||||
case wxAND_INVERT: mode = GDK_AND_INVERT; break;
|
||||
case wxCOPY: mode = GDK_COPY; break;
|
||||
case wxNO_OP: mode = GDK_NOOP; break;
|
||||
case wxSRC_INVERT: mode = GDK_COPY_INVERT; break;
|
||||
case wxCOPY: mode = GDK_COPY; break;
|
||||
case wxNO_OP: mode = GDK_NOOP; break;
|
||||
case wxSRC_INVERT: mode = GDK_COPY_INVERT; break;
|
||||
#endif
|
||||
default:
|
||||
{
|
||||
wxFAIL_MSG( _T("unsupported logical function") );
|
||||
break;
|
||||
}
|
||||
{
|
||||
wxFAIL_MSG( _T("unsupported logical function") );
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
m_logicalFunction = function;
|
||||
|
@ -124,9 +124,9 @@ wxWindowDC::wxWindowDC( wxWindow *window )
|
||||
if (!m_window)
|
||||
{
|
||||
/* don't report problems */
|
||||
m_ok = TRUE;
|
||||
m_ok = TRUE;
|
||||
|
||||
return;
|
||||
return;
|
||||
}
|
||||
|
||||
if (window->m_wxwindow)
|
||||
@ -189,10 +189,10 @@ void wxWindowDC::DoCrossHair( long x, long y )
|
||||
long xx = XLOG2DEV(x);
|
||||
long yy = YLOG2DEV(y);
|
||||
if (m_window)
|
||||
{
|
||||
{
|
||||
gdk_draw_line( m_window, m_penGC, 0, yy, XLOG2DEVREL(w), yy );
|
||||
gdk_draw_line( m_window, m_penGC, xx, 0, xx, YLOG2DEVREL(h) );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -305,7 +305,7 @@ void wxWindowDC::DoDrawLines( int n, wxPoint points[], long xoffset, long yoffse
|
||||
long y1 = YLOG2DEV(points[i].y + yoffset); // oh, what a waste
|
||||
long y2 = YLOG2DEV(points[i+1].y + yoffset);
|
||||
|
||||
if (m_window)
|
||||
if (m_window)
|
||||
gdk_draw_line( m_window, m_penGC, x1, y1, x2, y2 );
|
||||
|
||||
CalcBoundingBox( points[i+1].x + xoffset, points[i+1].y + yoffset );
|
||||
@ -441,7 +441,7 @@ void wxWindowDC::DoDrawRoundedRectangle( long x, long y, long width, long height
|
||||
gdk_draw_arc( m_window, m_penGC, FALSE, xx+ww-dd, yy, dd, dd, 0, 90*64 );
|
||||
gdk_draw_arc( m_window, m_penGC, FALSE, xx+ww-dd, yy+hh-dd, dd, dd, 270*64, 90*64 );
|
||||
gdk_draw_arc( m_window, m_penGC, FALSE, xx, yy+hh-dd, dd, dd, 180*64, 90*64 );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// this ignores the radius
|
||||
@ -880,10 +880,10 @@ void wxWindowDC::SetPen( const wxPen &pen )
|
||||
width = (int)w;
|
||||
}
|
||||
|
||||
const static char dotted[] = {1, 1};
|
||||
const static char short_dashed[] = {2, 2};
|
||||
const static char long_dashed[] = {2, 4};
|
||||
const static char dotted_dashed[] = {3, 3, 1, 3};
|
||||
static const char dotted[] = {1, 1};
|
||||
static const char short_dashed[] = {2, 2};
|
||||
static const char long_dashed[] = {2, 4};
|
||||
static const char dotted_dashed[] = {3, 3, 1, 3};
|
||||
|
||||
// We express dash pattern in pen width unit, so we are
|
||||
// independent of zoom factor and so on...
|
||||
@ -894,52 +894,52 @@ void wxWindowDC::SetPen( const wxPen &pen )
|
||||
switch (m_pen.GetStyle())
|
||||
{
|
||||
case wxUSER_DASH:
|
||||
{
|
||||
lineStyle = GDK_LINE_ON_OFF_DASH;
|
||||
{
|
||||
lineStyle = GDK_LINE_ON_OFF_DASH;
|
||||
req_nb_dash = m_pen.GetDashCount();
|
||||
req_dash = m_pen.GetDash();
|
||||
break;
|
||||
}
|
||||
}
|
||||
case wxDOT:
|
||||
{
|
||||
lineStyle = GDK_LINE_ON_OFF_DASH;
|
||||
{
|
||||
lineStyle = GDK_LINE_ON_OFF_DASH;
|
||||
req_nb_dash = 2;
|
||||
req_dash = dotted;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case wxLONG_DASH:
|
||||
{
|
||||
lineStyle = GDK_LINE_ON_OFF_DASH;
|
||||
{
|
||||
lineStyle = GDK_LINE_ON_OFF_DASH;
|
||||
req_nb_dash = 2;
|
||||
req_dash = long_dashed;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case wxSHORT_DASH:
|
||||
{
|
||||
lineStyle = GDK_LINE_ON_OFF_DASH;
|
||||
{
|
||||
lineStyle = GDK_LINE_ON_OFF_DASH;
|
||||
req_nb_dash = 2;
|
||||
req_dash = short_dashed;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case wxDOT_DASH:
|
||||
{
|
||||
// lineStyle = GDK_LINE_DOUBLE_DASH;
|
||||
lineStyle = GDK_LINE_ON_OFF_DASH;
|
||||
{
|
||||
// lineStyle = GDK_LINE_DOUBLE_DASH;
|
||||
lineStyle = GDK_LINE_ON_OFF_DASH;
|
||||
req_nb_dash = 4;
|
||||
req_dash = dotted_dashed;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case wxTRANSPARENT:
|
||||
case wxSTIPPLE:
|
||||
case wxTRANSPARENT:
|
||||
case wxSTIPPLE:
|
||||
case wxSOLID:
|
||||
default:
|
||||
{
|
||||
lineStyle = GDK_LINE_SOLID;
|
||||
default:
|
||||
{
|
||||
lineStyle = GDK_LINE_SOLID;
|
||||
req_dash = (wxDash*)NULL;
|
||||
req_nb_dash = 0;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
#if (GTK_MINOR_VERSION > 0)
|
||||
@ -950,13 +950,13 @@ void wxWindowDC::SetPen( const wxPen &pen )
|
||||
{
|
||||
for (int i = 0; i < req_nb_dash; i++)
|
||||
real_req_dash[i] = req_dash[i] * width;
|
||||
gdk_gc_set_dashes( m_penGC, 0, real_req_dash, req_nb_dash );
|
||||
gdk_gc_set_dashes( m_penGC, 0, real_req_dash, req_nb_dash );
|
||||
delete[] real_req_dash;
|
||||
}
|
||||
else
|
||||
{
|
||||
// No Memory. We use non-scaled dash pattern...
|
||||
gdk_gc_set_dashes( m_penGC, 0, (char*)req_dash, req_nb_dash );
|
||||
gdk_gc_set_dashes( m_penGC, 0, (char*)req_dash, req_nb_dash );
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@ -1003,15 +1003,15 @@ void wxWindowDC::SetBrush( const wxBrush &brush )
|
||||
if ((m_brush.GetStyle() == wxSTIPPLE) && (m_brush.GetStipple()->Ok()))
|
||||
{
|
||||
if (m_brush.GetStipple()->GetPixmap())
|
||||
{
|
||||
{
|
||||
gdk_gc_set_fill( m_brushGC, GDK_TILED );
|
||||
gdk_gc_set_tile( m_brushGC, m_brush.GetStipple()->GetPixmap() );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
{
|
||||
gdk_gc_set_fill( m_brushGC, GDK_STIPPLED );
|
||||
gdk_gc_set_stipple( m_brushGC, m_brush.GetStipple()->GetBitmap() );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (IS_HATCH(m_brush.GetStyle()))
|
||||
@ -1048,15 +1048,15 @@ void wxWindowDC::SetBackground( const wxBrush &brush )
|
||||
if ((m_backgroundBrush.GetStyle() == wxSTIPPLE) && (m_backgroundBrush.GetStipple()->Ok()))
|
||||
{
|
||||
if (m_backgroundBrush.GetStipple()->GetPixmap())
|
||||
{
|
||||
{
|
||||
gdk_gc_set_fill( m_bgGC, GDK_TILED );
|
||||
gdk_gc_set_tile( m_bgGC, m_backgroundBrush.GetStipple()->GetPixmap() );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
{
|
||||
gdk_gc_set_fill( m_bgGC, GDK_STIPPLED );
|
||||
gdk_gc_set_stipple( m_bgGC, m_backgroundBrush.GetStipple()->GetBitmap() );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (IS_HATCH(m_backgroundBrush.GetStyle()))
|
||||
@ -1084,22 +1084,22 @@ void wxWindowDC::SetLogicalFunction( int function )
|
||||
case wxCLEAR: mode = GDK_CLEAR; break;
|
||||
case wxSET: mode = GDK_SET; break;
|
||||
case wxOR_INVERT: mode = GDK_OR_INVERT; break;
|
||||
case wxSRC_AND:
|
||||
case wxSRC_AND:
|
||||
case wxAND: mode = GDK_AND; break;
|
||||
case wxSRC_OR:
|
||||
case wxSRC_OR:
|
||||
case wxOR: mode = GDK_OR; break;
|
||||
case wxEQUIV: mode = GDK_EQUIV; break;
|
||||
case wxNAND: mode = GDK_NAND; break;
|
||||
case wxAND_INVERT: mode = GDK_AND_INVERT; break;
|
||||
case wxCOPY: mode = GDK_COPY; break;
|
||||
case wxNO_OP: mode = GDK_NOOP; break;
|
||||
case wxSRC_INVERT: mode = GDK_COPY_INVERT; break;
|
||||
case wxCOPY: mode = GDK_COPY; break;
|
||||
case wxNO_OP: mode = GDK_NOOP; break;
|
||||
case wxSRC_INVERT: mode = GDK_COPY_INVERT; break;
|
||||
#endif
|
||||
default:
|
||||
{
|
||||
wxFAIL_MSG( _T("unsupported logical function") );
|
||||
break;
|
||||
}
|
||||
{
|
||||
wxFAIL_MSG( _T("unsupported logical function") );
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
m_logicalFunction = function;
|
||||
|
Loading…
Reference in New Issue
Block a user