New wxDC hierarchy

wxTE_PASWORD


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1092 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling
1998-12-01 12:55:09 +00:00
parent 5b6ec9803a
commit ec758a20a2
16 changed files with 752 additions and 608 deletions

View File

@@ -79,12 +79,12 @@ void gdk_draw_bitmap (GdkDrawable *drawable,
}
//-----------------------------------------------------------------------------
// wxPaintDC
// wxWindowDC
//-----------------------------------------------------------------------------
IMPLEMENT_DYNAMIC_CLASS(wxPaintDC,wxDC)
IMPLEMENT_DYNAMIC_CLASS(wxWindowDC,wxDC)
wxPaintDC::wxPaintDC(void)
wxWindowDC::wxWindowDC(void)
{
m_penGC = (GdkGC *) NULL;
m_brushGC = (GdkGC *) NULL;
@@ -94,7 +94,7 @@ wxPaintDC::wxPaintDC(void)
m_isMemDC = FALSE;
}
wxPaintDC::wxPaintDC( wxWindow *window )
wxWindowDC::wxWindowDC( wxWindow *window )
{
m_penGC = (GdkGC *) NULL;
m_brushGC = (GdkGC *) NULL;
@@ -125,24 +125,24 @@ wxPaintDC::wxPaintDC( wxWindow *window )
gdk_gc_set_clip_region( m_bgGC, update.GetRegion() );
}
wxPaintDC::~wxPaintDC(void)
wxWindowDC::~wxWindowDC(void)
{
Destroy();
}
void wxPaintDC::FloodFill( long WXUNUSED(x1), long WXUNUSED(y1),
void wxWindowDC::FloodFill( long WXUNUSED(x1), long WXUNUSED(y1),
wxColour *WXUNUSED(col), int WXUNUSED(style) )
{
wxFAIL_MSG( "wxPaintDC::FloodFill not implemented" );
wxFAIL_MSG( "wxWindowDC::FloodFill not implemented" );
}
bool wxPaintDC::GetPixel( long WXUNUSED(x1), long WXUNUSED(y1), wxColour *WXUNUSED(col) ) const
bool wxWindowDC::GetPixel( long WXUNUSED(x1), long WXUNUSED(y1), wxColour *WXUNUSED(col) ) const
{
wxFAIL_MSG( "wxPaintDC::GetPixel not implemented" );
wxFAIL_MSG( "wxWindowDC::GetPixel not implemented" );
return FALSE;
}
void wxPaintDC::DrawLine( long x1, long y1, long x2, long y2 )
void wxWindowDC::DrawLine( long x1, long y1, long x2, long y2 )
{
if (!Ok()) return;
@@ -156,7 +156,7 @@ void wxPaintDC::DrawLine( long x1, long y1, long x2, long y2 )
CalcBoundingBox(x2, y2);
}
void wxPaintDC::CrossHair( long x, long y )
void wxWindowDC::CrossHair( long x, long y )
{
if (!Ok()) return;
@@ -172,7 +172,7 @@ void wxPaintDC::CrossHair( long x, long y )
}
}
void wxPaintDC::DrawArc( long x1, long y1, long x2, long y2, double xc, double yc )
void wxWindowDC::DrawArc( long x1, long y1, long x2, long y2, double xc, double yc )
{
if (!Ok()) return;
@@ -222,7 +222,7 @@ void wxPaintDC::DrawArc( long x1, long y1, long x2, long y2, double xc, double y
CalcBoundingBox (x2, y2);
}
void wxPaintDC::DrawEllipticArc( long x, long y, long width, long height, double sa, double ea )
void wxWindowDC::DrawEllipticArc( long x, long y, long width, long height, double sa, double ea )
{
if (!Ok()) return;
@@ -247,7 +247,7 @@ void wxPaintDC::DrawEllipticArc( long x, long y, long width, long height, double
CalcBoundingBox (x + width, y + height);
}
void wxPaintDC::DrawPoint( long x, long y )
void wxWindowDC::DrawPoint( long x, long y )
{
if (!Ok()) return;
@@ -257,7 +257,7 @@ void wxPaintDC::DrawPoint( long x, long y )
CalcBoundingBox (x, y);
}
void wxPaintDC::DrawLines( int n, wxPoint points[], long xoffset, long yoffset )
void wxWindowDC::DrawLines( int n, wxPoint points[], long xoffset, long yoffset )
{
if (!Ok()) return;
@@ -278,7 +278,7 @@ void wxPaintDC::DrawLines( int n, wxPoint points[], long xoffset, long yoffset )
}
}
void wxPaintDC::DrawLines( wxList *points, long xoffset, long yoffset )
void wxWindowDC::DrawLines( wxList *points, long xoffset, long yoffset )
{
if (!Ok()) return;
@@ -305,7 +305,7 @@ void wxPaintDC::DrawLines( wxList *points, long xoffset, long yoffset )
}
}
void wxPaintDC::DrawPolygon( int n, wxPoint points[], long xoffset, long yoffset, int WXUNUSED(fillStyle) )
void wxWindowDC::DrawPolygon( int n, wxPoint points[], long xoffset, long yoffset, int WXUNUSED(fillStyle) )
{
if (!Ok()) return;
@@ -339,7 +339,7 @@ void wxPaintDC::DrawPolygon( int n, wxPoint points[], long xoffset, long yoffset
delete[] gdkpoints;
}
void wxPaintDC::DrawPolygon( wxList *lines, long xoffset, long yoffset, int WXUNUSED(fillStyle))
void wxWindowDC::DrawPolygon( wxList *lines, long xoffset, long yoffset, int WXUNUSED(fillStyle))
{
if (!Ok()) return;
@@ -380,7 +380,7 @@ void wxPaintDC::DrawPolygon( wxList *lines, long xoffset, long yoffset, int WXUN
delete[] gdkpoints;
}
void wxPaintDC::DrawRectangle( long x, long y, long width, long height )
void wxWindowDC::DrawRectangle( long x, long y, long width, long height )
{
if (!Ok()) return;
@@ -406,7 +406,7 @@ void wxPaintDC::DrawRectangle( long x, long y, long width, long height )
CalcBoundingBox( x + width, y + height );
}
void wxPaintDC::DrawRoundedRectangle( long x, long y, long width, long height, double radius )
void wxWindowDC::DrawRoundedRectangle( long x, long y, long width, long height, double radius )
{
if (!Ok()) return;
@@ -475,7 +475,7 @@ void wxPaintDC::DrawRoundedRectangle( long x, long y, long width, long height, d
CalcBoundingBox( x + width, y + height );
}
void wxPaintDC::DrawEllipse( long x, long y, long width, long height )
void wxWindowDC::DrawEllipse( long x, long y, long width, long height )
{
if (!Ok()) return;
@@ -498,12 +498,12 @@ void wxPaintDC::DrawEllipse( long x, long y, long width, long height )
CalcBoundingBox( x + width, y + height );
}
bool wxPaintDC::CanDrawBitmap(void) const
bool wxWindowDC::CanDrawBitmap(void) const
{
return TRUE;
}
void wxPaintDC::DrawIcon( const wxIcon &icon, long x, long y, bool useMask )
void wxWindowDC::DrawIcon( const wxIcon &icon, long x, long y, bool useMask )
{
if (!Ok()) return;
@@ -536,7 +536,7 @@ void wxPaintDC::DrawIcon( const wxIcon &icon, long x, long y, bool useMask )
CalcBoundingBox( x + width, y + height );
}
bool wxPaintDC::Blit( long xdest, long ydest, long width, long height,
bool wxWindowDC::Blit( long xdest, long ydest, long width, long height,
wxDC *source, long xsrc, long ysrc, int WXUNUSED(logical_func), bool useMask )
{
if (!Ok()) return FALSE;
@@ -633,7 +633,7 @@ bool wxPaintDC::Blit( long xdest, long ydest, long width, long height,
return TRUE;
}
void wxPaintDC::DrawText( const wxString &text, long x, long y, bool WXUNUSED(use16) )
void wxWindowDC::DrawText( const wxString &text, long x, long y, bool WXUNUSED(use16) )
{
if (!Ok()) return;
@@ -670,12 +670,12 @@ void wxPaintDC::DrawText( const wxString &text, long x, long y, bool WXUNUSED(us
CalcBoundingBox (x, y);
}
bool wxPaintDC::CanGetTextExtent(void) const
bool wxWindowDC::CanGetTextExtent(void) const
{
return TRUE;
}
void wxPaintDC::GetTextExtent( const wxString &string, long *width, long *height,
void wxWindowDC::GetTextExtent( const wxString &string, long *width, long *height,
long *descent, long *externalLeading,
wxFont *theFont, bool WXUNUSED(use16) )
{
@@ -691,7 +691,7 @@ void wxPaintDC::GetTextExtent( const wxString &string, long *width, long *height
if (externalLeading) (*externalLeading) = 0; // ??
}
long wxPaintDC::GetCharWidth(void)
long wxWindowDC::GetCharWidth(void)
{
if (!Ok()) return 0;
@@ -699,7 +699,7 @@ long wxPaintDC::GetCharWidth(void)
return long(gdk_string_width( font, "H" ) / m_scaleX);
}
long wxPaintDC::GetCharHeight(void)
long wxWindowDC::GetCharHeight(void)
{
if (!Ok()) return 0;
@@ -707,7 +707,7 @@ long wxPaintDC::GetCharHeight(void)
return long((font->ascent + font->descent) / m_scaleY);
}
void wxPaintDC::Clear(void)
void wxWindowDC::Clear(void)
{
if (!Ok()) return;
@@ -723,14 +723,14 @@ void wxPaintDC::Clear(void)
}
}
void wxPaintDC::SetFont( const wxFont &font )
void wxWindowDC::SetFont( const wxFont &font )
{
if (!Ok()) return;
m_font = font;
}
void wxPaintDC::SetPen( const wxPen &pen )
void wxWindowDC::SetPen( const wxPen &pen )
{
if (!Ok()) return;
@@ -786,7 +786,7 @@ void wxPaintDC::SetPen( const wxPen &pen )
gdk_gc_set_foreground( m_penGC, m_pen.GetColour().GetColor() );
}
void wxPaintDC::SetBrush( const wxBrush &brush )
void wxWindowDC::SetBrush( const wxBrush &brush )
{
if (!Ok()) return;
@@ -825,7 +825,7 @@ void wxPaintDC::SetBrush( const wxBrush &brush )
// CMB 21/7/98: Added SetBackground. Sets background brush
// for Clear() and bg colour for shapes filled with cross-hatch brush
void wxPaintDC::SetBackground( const wxBrush &brush )
void wxWindowDC::SetBackground( const wxBrush &brush )
{
if (!Ok()) return;
@@ -865,7 +865,7 @@ void wxPaintDC::SetBackground( const wxBrush &brush )
}
}
void wxPaintDC::SetLogicalFunction( int function )
void wxWindowDC::SetLogicalFunction( int function )
{
if (m_logicalFunction == function) return;
GdkFunction mode = GDK_COPY;
@@ -881,7 +881,7 @@ void wxPaintDC::SetLogicalFunction( int function )
gdk_gc_set_function( m_textGC, mode );
}
void wxPaintDC::SetTextForeground( const wxColour &col )
void wxWindowDC::SetTextForeground( const wxColour &col )
{
if (!Ok()) return;
@@ -894,7 +894,7 @@ void wxPaintDC::SetTextForeground( const wxColour &col )
gdk_gc_set_foreground( m_textGC, m_textForegroundColour.GetColor() );
}
void wxPaintDC::SetTextBackground( const wxColour &col )
void wxWindowDC::SetTextBackground( const wxColour &col )
{
if (!Ok()) return;
@@ -907,7 +907,7 @@ void wxPaintDC::SetTextBackground( const wxColour &col )
gdk_gc_set_background( m_textGC, m_textBackgroundColour.GetColor() );
}
void wxPaintDC::SetBackgroundMode( int mode )
void wxWindowDC::SetBackgroundMode( int mode )
{
m_backgroundMode = mode;
@@ -920,11 +920,11 @@ void wxPaintDC::SetBackgroundMode( int mode )
}
}
void wxPaintDC::SetPalette( const wxPalette& WXUNUSED(palette) )
void wxWindowDC::SetPalette( const wxPalette& WXUNUSED(palette) )
{
}
void wxPaintDC::SetClippingRegion( long x, long y, long width, long height )
void wxWindowDC::SetClippingRegion( long x, long y, long width, long height )
{
wxDC::SetClippingRegion( x, y, width, height );
@@ -939,7 +939,7 @@ void wxPaintDC::SetClippingRegion( long x, long y, long width, long height )
gdk_gc_set_clip_rectangle( m_bgGC, &rect );
}
void wxPaintDC::DestroyClippingRegion(void)
void wxWindowDC::DestroyClippingRegion(void)
{
wxDC::DestroyClippingRegion();
@@ -949,7 +949,7 @@ void wxPaintDC::DestroyClippingRegion(void)
gdk_gc_set_clip_rectangle( m_bgGC, (GdkRectangle *) NULL );
}
void wxPaintDC::SetUpDC(void)
void wxWindowDC::SetUpDC(void)
{
Destroy();
m_ok = TRUE;
@@ -994,7 +994,7 @@ void wxPaintDC::SetUpDC(void)
}
}
void wxPaintDC::Destroy(void)
void wxWindowDC::Destroy(void)
{
if (m_penGC) gdk_gc_unref( m_penGC );
m_penGC = (GdkGC*) NULL;
@@ -1006,7 +1006,7 @@ void wxPaintDC::Destroy(void)
m_bgGC = (GdkGC*) NULL;
}
GdkWindow *wxPaintDC::GetWindow(void)
GdkWindow *wxWindowDC::GetWindow(void)
{
return m_window;
}
@@ -1126,7 +1126,7 @@ static void wx_spline_draw_point_array(wxDC *dc)
}
}
void wxPaintDC::DrawSpline( wxList *points )
void wxWindowDC::DrawSpline( wxList *points )
{
wxPoint *p;
double cx1, cy1, cx2, cy2, cx3, cy3, cx4, cy4;
@@ -1175,3 +1175,37 @@ void wxPaintDC::DrawSpline( wxList *points )
wx_spline_draw_point_array( this );
}
//-----------------------------------------------------------------------------
// wxPaintDC
//-----------------------------------------------------------------------------
IMPLEMENT_DYNAMIC_CLASS(wxPaintDC,wxWindowDC)
wxPaintDC::wxPaintDC(void)
: wxWindowDC()
{
}
wxPaintDC::wxPaintDC( wxWindow *win )
: wxWindowDC( win )
{
}
//-----------------------------------------------------------------------------
// wxClientDC
//-----------------------------------------------------------------------------
IMPLEMENT_DYNAMIC_CLASS(wxClientDC,wxWindowDC)
wxClientDC::wxClientDC(void)
: wxWindowDC()
{
}
wxClientDC::wxClientDC( wxWindow *win )
: wxWindowDC( win )
{
}