// Name: src/gtk1/dcclient.cpp
// Purpose:
// Author: Robert Roebling
-// RCS-ID: $Id$
// Copyright: (c) 1998 Robert Roebling, Chris Breeze
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
gint width,
gint height)
{
- wxCHECK_RET( drawable, _T("NULL drawable in gdk_wx_draw_bitmap") );
- wxCHECK_RET( src, _T("NULL src in gdk_wx_draw_bitmap") );
- wxCHECK_RET( gc, _T("NULL gc in gdk_wx_draw_bitmap") );
+ wxCHECK_RET( drawable, wxT("NULL drawable in gdk_wx_draw_bitmap") );
+ wxCHECK_RET( src, wxT("NULL src in gdk_wx_draw_bitmap") );
+ wxCHECK_RET( gc, wxT("NULL gc in gdk_wx_draw_bitmap") );
GdkWindowPrivate *drawable_private;
GdkWindowPrivate *src_private;
void wxWindowDCImpl::DoGetSize( int* width, int* height ) const
{
- wxCHECK_RET( m_owner, _T("GetSize() doesn't work without window") );
+ wxCHECK_RET( m_owner, wxT("GetSize() doesn't work without window") );
m_owner->GetSize(width, height);
}
CalcBoundingBox (x, y);
}
-void wxWindowDCImpl::DoDrawLines( int n, wxPoint points[], wxCoord xoffset, wxCoord yoffset )
+void wxWindowDCImpl::DoDrawLines( int n, const wxPoint points[], wxCoord xoffset, wxCoord yoffset )
{
wxCHECK_RET( IsOk(), wxT("invalid window dc") );
delete[] gpts;
}
-void wxWindowDCImpl::DoDrawPolygon( int n, wxPoint points[], wxCoord xoffset, wxCoord yoffset, wxPolygonFillMode WXUNUSED(fillStyle) )
+void wxWindowDCImpl::DoDrawPolygon( int n, const wxPoint points[], wxCoord xoffset, wxCoord yoffset, wxPolygonFillMode WXUNUSED(fillStyle) )
{
wxCHECK_RET( IsOk(), wxT("invalid window dc") );
{
wxCHECK_RET( IsOk(), wxT("invalid window dc") );
- wxCHECK_RET( bitmap.Ok(), wxT("invalid bitmap") );
+ wxCHECK_RET( bitmap.IsOk(), wxT("invalid bitmap") );
bool is_mono = (bitmap.GetBitmap() != NULL);
if (srcDC->m_isMemDC)
{
- if (!memDC->m_selected.Ok()) return false;
+ if (!memDC->m_selected.IsOk()) return false;
is_mono = (memDC->m_selected.GetDepth() == 1);
m_pen = pen;
- if (!m_pen.Ok()) return;
+ if (!m_pen.IsOk()) return;
if (!m_window) return;
m_brush = brush;
- if (!m_brush.Ok()) return;
+ if (!m_brush.IsOk()) return;
if (!m_window) return;
gdk_gc_set_fill( m_brushGC, GDK_SOLID );
- if ((m_brush.GetStyle() == wxSTIPPLE) && (m_brush.GetStipple()->Ok()))
+ if ((m_brush.GetStyle() == wxSTIPPLE) && (m_brush.GetStipple()->IsOk()))
{
if (m_brush.GetStipple()->GetPixmap())
{
m_backgroundBrush = brush;
- if (!m_backgroundBrush.Ok()) return;
+ if (!m_backgroundBrush.IsOk()) return;
if (!m_window) return;
gdk_gc_set_fill( m_bgGC, GDK_SOLID );
- if ((m_backgroundBrush.GetStyle() == wxSTIPPLE) && (m_backgroundBrush.GetStipple()->Ok()))
+ if ((m_backgroundBrush.GetStyle() == wxSTIPPLE) && (m_backgroundBrush.GetStipple()->IsOk()))
{
if (m_backgroundBrush.GetStipple()->GetPixmap())
{
// don't set m_textForegroundColour to an invalid colour as we'd crash
// later then (we use m_textForegroundColour.GetColor() without checking
// in a few places)
- if ( !col.Ok() || (m_textForegroundColour == col) )
+ if ( !col.IsOk() || (m_textForegroundColour == col) )
return;
m_textForegroundColour = col;
wxCHECK_RET( IsOk(), wxT("invalid window dc") );
// same as above
- if ( !col.Ok() || (m_textBackgroundColour == col) )
+ if ( !col.IsOk() || (m_textBackgroundColour == col) )
return;
m_textBackgroundColour = col;
wxGTKDCImpl::ComputeScaleAndOrigin();
// if scale has changed call SetPen to recalulate the line width
- if ( wxRealPoint(m_scaleX, m_scaleY) != origScale && m_pen.Ok() )
+ if ( wxRealPoint(m_scaleX, m_scaleY) != origScale && m_pen.IsOk() )
{
// this is a bit artificial, but we need to force wxDC to think the pen
// has changed
wxClientDCImpl::wxClientDCImpl(wxDC *owner, wxWindow *win)
: wxWindowDCImpl(owner, win)
{
- wxCHECK_RET( win, _T("NULL window in wxClientDCImpl::wxClientDCImpl") );
+ wxCHECK_RET( win, wxT("NULL window in wxClientDCImpl::wxClientDCImpl") );
#ifdef __WXUNIVERSAL__
wxPoint ptOrigin = win->GetClientAreaOrigin();
void wxClientDCImpl::DoGetSize(int *width, int *height) const
{
- wxCHECK_RET( m_owner, _T("GetSize() doesn't work without window") );
+ wxCHECK_RET( m_owner, wxT("GetSize() doesn't work without window") );
m_owner->GetClientSize( width, height );
}