]> git.saurik.com Git - wxWidgets.git/commitdiff
Removed some debug code.
authorRobert Roebling <robert@roebling.de>
Tue, 22 Feb 2000 00:01:03 +0000 (00:01 +0000)
committerRobert Roebling <robert@roebling.de>
Tue, 22 Feb 2000 00:01:03 +0000 (00:01 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6197 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/generic/listctrl.cpp
src/gtk/dcclient.cpp
src/gtk/window.cpp
src/gtk1/dcclient.cpp
src/gtk1/window.cpp

index 8e582c5b55a735859d7a0c8203271fa8e750b470..4c9d73e2ed004bd7db0165ac292e5b228bff9cf6 100644 (file)
@@ -342,6 +342,7 @@ void wxListLineData::CalculateSize( wxDC *dc, int spacing )
                 if (s.IsNull()) s = "H";
                 wxCoord lw,lh;
                 dc->GetTextExtent( s, &lw, &lh );
+                if (lh < 15) lh = 15;
                 item->SetSize( item->GetWidth(), lh );
                 m_bound_all.width += lw;
                 m_bound_all.height = lh;
@@ -440,6 +441,7 @@ void wxListLineData::SetPosition( wxDC *dc, int x, int y, int window_width )
         {
             wxCoord lw,lh;
             dc->GetTextExtent( "H", &lw, &lh );
+            if (lh < 15) lh = 15;
             m_bound_all.x = 0;
             m_bound_all.y -= 0;
             m_bound_all.height = lh+3;
@@ -456,6 +458,7 @@ void wxListLineData::SetPosition( wxDC *dc, int x, int y, int window_width )
                 if (s.IsEmpty()) s = wxT("H");
                 wxCoord lw,lh;
                 dc->GetTextExtent( s, &lw, &lh );
+                if (lh < 15) lh = 15;
                 m_bound_label.width = lw;
                 m_bound_label.height = lh;
                 if (item->HasImage())
@@ -676,7 +679,6 @@ void wxListLineData::DoDraw( wxDC *dc, bool hilight, bool paintBG )
         while (node)
         {
             wxListItemData *item = (wxListItemData*)node->Data();
-            dc->SetClippingRegion( item->GetX(), item->GetY(), item->GetWidth()-3, item->GetHeight() );
             int x = item->GetX();
             if (item->HasImage())
             {
@@ -685,9 +687,10 @@ void wxListLineData::DoDraw( wxDC *dc, bool hilight, bool paintBG )
                 m_owner->GetImageSize( item->GetImage(), x, y );
                 x += item->GetX() + 5;
             }
+            dc->SetClippingRegion( item->GetX(), item->GetY(), item->GetWidth()-3, item->GetHeight() );
             if (item->HasText())
             {
-                dc->DrawText( item->GetText(), x, item->GetY() );
+                dc->DrawText( item->GetText(), x, item->GetY()+1 );
             }
             dc->DestroyClippingRegion();
             node = node->Next();
@@ -883,9 +886,9 @@ void wxListHeaderWindow::OnPaint( wxPaintEvent &WXUNUSED(event) )
         dc.SetPen( *wxWHITE_PEN );
 
         DoDrawRect( &dc, x, y, cw, h-2 );
-//        dc.SetClippingRegion( x, y, cw-5, h-4 );
+        dc.SetClippingRegion( x, y, cw-5, h-4 );
         dc.DrawText( item.m_text, x+4, y+3 );
-//        dc.DestroyClippingRegion();
+        dc.DestroyClippingRegion();
         x += item.m_width;
 #if wxUSE_GENERIC_LIST_EXTENSIONS
         if (dc.LogicalToDeviceX(x) > w+5) break;
index c636ae89908a9ef5edde542e81a00dc77cca64c3..92b9da81b3ec2ab74e337091fe44503315a605c9 100644 (file)
@@ -667,6 +667,14 @@ void wxWindowDC::DoDrawBitmap( const wxBitmap &bitmap,
                 gdk_gc_set_fill( gc, GDK_OPAQUE_STIPPLED );
                 gdk_gc_set_stipple( gc, mask );
                 gdk_draw_rectangle( new_mask, gc, TRUE, 0, 0, ww, hh );
+/*                
+                gdk_gc_set_clip_mask( m_brushGC, NULL );
+                gdk_gc_set_clip_mask( m_textGC, NULL );
+                SetBrush( *wxRED_BRUSH );
+                DrawRectangle( 70, 0, 70, 1000 );
+                gdk_draw_bitmap( m_window, m_textGC, new_mask, 0, 0, 100, 5, ww, hh );
+                gdk_draw_bitmap( m_window, m_textGC, mask, 0, 0, 80, 5, ww, hh );
+*/                
                 gdk_gc_unref( gc );
             }
         
index a08961fed878cb4c48f245ee229a0ec1ce04258a..47eefa20ddadf5a78757c40aafc66c3bb16aa9c8 100644 (file)
@@ -612,6 +612,7 @@ static void gtk_window_expose_callback( GtkWidget *WXUNUSED(widget), GdkEventExp
 {
     DEBUG_MAIN_THREAD
 
+/*
     if (win->GetName() == wxT("columntitles"))
     {
         wxPrintf( wxT("OnExpose from ") );
@@ -622,6 +623,7 @@ static void gtk_window_expose_callback( GtkWidget *WXUNUSED(widget), GdkEventExp
                                          (int)gdk_event->area.width,
                                          (int)gdk_event->area.height );
     }
+*/
                                 
     win->GetUpdateRegion().Union( gdk_event->area.x,
                                   gdk_event->area.y,
@@ -661,6 +663,7 @@ static void gtk_window_draw_callback( GtkWidget *WXUNUSED(widget),
     if ((rect->x == 0) && (rect->y == 0) && (rect->width <= 1) && (rect->height <= 1))
         return;
 
+/*
     if (win->GetName() == wxT("columntitles"))
     {
         wxPrintf( wxT("OnDraw from ") );
@@ -671,6 +674,7 @@ static void gtk_window_draw_callback( GtkWidget *WXUNUSED(widget),
                                          (int)rect->width,
                                          (int)rect->height );
     }
+*/
                                 
     win->GetUpdateRegion().Union( rect->x, rect->y,
                                   rect->width, rect->height );
index c636ae89908a9ef5edde542e81a00dc77cca64c3..92b9da81b3ec2ab74e337091fe44503315a605c9 100644 (file)
@@ -667,6 +667,14 @@ void wxWindowDC::DoDrawBitmap( const wxBitmap &bitmap,
                 gdk_gc_set_fill( gc, GDK_OPAQUE_STIPPLED );
                 gdk_gc_set_stipple( gc, mask );
                 gdk_draw_rectangle( new_mask, gc, TRUE, 0, 0, ww, hh );
+/*                
+                gdk_gc_set_clip_mask( m_brushGC, NULL );
+                gdk_gc_set_clip_mask( m_textGC, NULL );
+                SetBrush( *wxRED_BRUSH );
+                DrawRectangle( 70, 0, 70, 1000 );
+                gdk_draw_bitmap( m_window, m_textGC, new_mask, 0, 0, 100, 5, ww, hh );
+                gdk_draw_bitmap( m_window, m_textGC, mask, 0, 0, 80, 5, ww, hh );
+*/                
                 gdk_gc_unref( gc );
             }
         
index a08961fed878cb4c48f245ee229a0ec1ce04258a..47eefa20ddadf5a78757c40aafc66c3bb16aa9c8 100644 (file)
@@ -612,6 +612,7 @@ static void gtk_window_expose_callback( GtkWidget *WXUNUSED(widget), GdkEventExp
 {
     DEBUG_MAIN_THREAD
 
+/*
     if (win->GetName() == wxT("columntitles"))
     {
         wxPrintf( wxT("OnExpose from ") );
@@ -622,6 +623,7 @@ static void gtk_window_expose_callback( GtkWidget *WXUNUSED(widget), GdkEventExp
                                          (int)gdk_event->area.width,
                                          (int)gdk_event->area.height );
     }
+*/
                                 
     win->GetUpdateRegion().Union( gdk_event->area.x,
                                   gdk_event->area.y,
@@ -661,6 +663,7 @@ static void gtk_window_draw_callback( GtkWidget *WXUNUSED(widget),
     if ((rect->x == 0) && (rect->y == 0) && (rect->width <= 1) && (rect->height <= 1))
         return;
 
+/*
     if (win->GetName() == wxT("columntitles"))
     {
         wxPrintf( wxT("OnDraw from ") );
@@ -671,6 +674,7 @@ static void gtk_window_draw_callback( GtkWidget *WXUNUSED(widget),
                                          (int)rect->width,
                                          (int)rect->height );
     }
+*/
                                 
     win->GetUpdateRegion().Union( rect->x, rect->y,
                                   rect->width, rect->height );