More tests in erase sample.

Added wxControlStr to data.cpp.
  Fixed scrolling for window with a border. The
    area which was copied was off by the border
    width sometimes.
  Added two more AddTool() variants to wxToolBar
    when used with universal. It compiles now,
    but doesn't work...


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14386 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling
2002-02-24 11:06:55 +00:00
parent d063802fcf
commit e88be8c942
4 changed files with 68 additions and 13 deletions

View File

@@ -171,7 +171,7 @@ END_EVENT_TABLE()
MyCanvas::MyCanvas( MyFrame *parent )
: wxScrolledWindow( parent, -1, wxDefaultPosition, wxDefaultSize,
wxScrolledWindowStyle|wxNO_FULL_REPAINT_ON_RESIZE )
wxScrolledWindowStyle|wxNO_FULL_REPAINT_ON_RESIZE|wxSUNKEN_BORDER )
{
SetScrollbars( 10, 10, 40, 100, 0, 0 );
}
@@ -180,6 +180,17 @@ void MyCanvas::OnPaint( wxPaintEvent &event )
{
wxPaintDC dc(this);
PrepareDC( dc );
wxRegionIterator upd( GetUpdateRegion() );
while (upd)
{
wxLogDebug( "Paint: %d %d %d %d", upd.GetX(), upd.GetY(), upd.GetWidth(), upd.GetHeight() );
upd ++;
}
dc.SetPen( *wxWHITE_PEN );
for (int i = 0; i < 20; i += 2)
dc.DrawLine( i,i, i+100,i );
wxRegion region( 110, 110, 80, 80 );
wxRegion hole( 130, 130, 40, 1 );
@@ -189,7 +200,7 @@ void MyCanvas::OnPaint( wxPaintEvent &event )
dc.SetBrush( *wxRED_BRUSH );
dc.DrawRectangle( 100, 100, 200, 200 );
dc.DestroyClipingRegion();
dc.DestroyClippingRegion();
dc.SetPen( *wxTRANSPARENT_PEN );