Made Julian's gc_include_inferior hack a bit less radical.
Small addition to changes.txt,
Compile fix to dbbrowse sample. Still crashes upon startup.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6432
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
Temp2 = ((ct_BrowserDB->pTableInf+x)->pColInf+y)->PkTableName;
if (Temp2 == "")
Temp2 = _("None");
Temp2 = ((ct_BrowserDB->pTableInf+x)->pColInf+y)->PkTableName;
if (Temp2 == "")
Temp2 = _("None");
- Temp2.Printf(_("This Primary Key is used in the following Tables : %s"),Temp2);
+ Temp2.Printf(_("This Primary Key is used in the following Tables : %s"),Temp2.c_str());
Funkt = AppendItem(Docu,Temp2,TreeIc_DocClosed,TreeIc_DocOpen,new DBTreeData("KEY"));
}
else
Funkt = AppendItem(Docu,Temp2,TreeIc_DocClosed,TreeIc_DocOpen,new DBTreeData("KEY"));
}
else
12th March '2000: wxWindows 2.1.14 released
12th March '2000: wxWindows 2.1.14 released
+
+
+Added support for pipes and a stream class to get data
+out of them.
+
+Added memory file system (so you can save html pages with
+images in memory).
+
Added wxDragImage class for dragging easily images.
The DEB and RPM packages now conform better to various
Added wxDragImage class for dragging easily images.
The DEB and RPM packages now conform better to various
dc.SetPen( *wxTRANSPARENT_PEN );
dc.DrawRectangle( 10,10,310,310 );
dc.SetPen( *wxTRANSPARENT_PEN );
dc.DrawRectangle( 10,10,310,310 );
- wxRegion region( 20,20,100,270 );
- dc.SetClippingRegion( region );
+ dc.SetClippingRegion( 20,20,100,270 );
dc.SetBrush( *wxRED_BRUSH );
dc.DrawRectangle( 10,10,310,310 );
dc.SetBrush( *wxRED_BRUSH );
dc.DrawRectangle( 10,10,310,310 );
+
+ dc.SetClippingRegion( 20,20,100,100 );
- region = wxRegion( 120,30,100,270 );
- dc.SetClippingRegion( region );
+ dc.SetBrush( *wxCYAN_BRUSH );
+ dc.DrawRectangle( 10,10,310,310 );
+
+ dc.DestroyClippingRegion();
+ dc.SetClippingRegion( 120,30,100,270 );
dc.SetBrush( *wxGREY_BRUSH );
dc.DrawRectangle( 10,10,310,310 );
dc.SetBrush( *wxGREY_BRUSH );
dc.DrawRectangle( 10,10,310,310 );
#include <math.h> // for floating-point functions
#include <gdk/gdk.h>
#include <math.h> // for floating-point functions
#include <gdk/gdk.h>
#include <gtk/gtk.h>
//-----------------------------------------------------------------------------
#include <gtk/gtk.h>
//-----------------------------------------------------------------------------
{
wxGCPool[i].m_gc = gdk_gc_new( window );
gdk_gc_set_exposures( wxGCPool[i].m_gc, FALSE );
{
wxGCPool[i].m_gc = gdk_gc_new( window );
gdk_gc_set_exposures( wxGCPool[i].m_gc, FALSE );
- // This allows you to e.g. copy from the screen
- // without clipping the windows on it.
- gdk_gc_set_subwindow( wxGCPool[i].m_gc,
- GDK_INCLUDE_INFERIORS );
wxGCPool[i].m_type = type;
wxGCPool[i].m_used = FALSE;
}
wxGCPool[i].m_type = type;
wxGCPool[i].m_used = FALSE;
}
int old_logical_func = m_logicalFunction;
SetLogicalFunction( logical_func );
int old_logical_func = m_logicalFunction;
SetLogicalFunction( logical_func );
if (use_bitmap_method)
{
/* scale/translate bitmap size */
if (use_bitmap_method)
{
/* scale/translate bitmap size */
/* Draw XPixmap or XBitmap, depending on what the wxBitmap contains. For
drawing a mono-bitmap (XBitmap) we use the current text GC */
/* Draw XPixmap or XBitmap, depending on what the wxBitmap contains. For
drawing a mono-bitmap (XBitmap) we use the current text GC */
if (is_mono)
gdk_draw_bitmap( m_window, m_textGC, use_bitmap.GetBitmap(), xsrc, ysrc, xx, yy, ww, hh );
else
if (is_mono)
gdk_draw_bitmap( m_window, m_textGC, use_bitmap.GetBitmap(), xsrc, ysrc, xx, yy, ww, hh );
else
for a different implementation of the same problem. */
wxBitmap bitmap( width, height );
for a different implementation of the same problem. */
wxBitmap bitmap( width, height );
- gdk_window_copy_area( bitmap.GetPixmap(), m_penGC, 0, 0,
+
+ /* We have to use the srcDC's GC as it might be a
+ wxScreenDC and we only have the GDK_INCLUDE_INFERIORS
+ flag set there. */
+
+ if (srcDC->GetWindow() == GDK_ROOT_PARENT())
+ gdk_gc_set_subwindow( m_penGC, GDK_INCLUDE_INFERIORS );
+
+ gdk_window_copy_area( bitmap.GetPixmap(), srcDC->m_penGC, 0, 0,
srcDC->GetWindow(),
xsrc, ysrc, width, height );
srcDC->GetWindow(),
xsrc, ysrc, width, height );
+ if (srcDC->GetWindow() == GDK_ROOT_PARENT())
+ gdk_gc_set_subwindow( m_penGC, GDK_CLIP_BY_CHILDREN );
+
/* scale image */
wxImage image( bitmap );
/* scale image */
wxImage image( bitmap );
- /* no scaling and not a memory dc with a mask either */
+ /* No scaling and not a memory dc with a mask either */
+
+ if (srcDC->GetWindow() == GDK_ROOT_PARENT())
+ gdk_gc_set_subwindow( m_penGC, GDK_INCLUDE_INFERIORS );
gdk_window_copy_area( m_window, m_penGC, xx, yy,
srcDC->GetWindow(),
xsrc, ysrc, width, height );
gdk_window_copy_area( m_window, m_penGC, xx, yy,
srcDC->GetWindow(),
xsrc, ysrc, width, height );
+
+ if (srcDC->GetWindow() == GDK_ROOT_PARENT())
+ gdk_gc_set_subwindow( m_penGC, GDK_CLIP_BY_CHILDREN );
rect.width = XLOG2DEVREL(width);
rect.height = YLOG2DEVREL(height);
rect.width = XLOG2DEVREL(width);
rect.height = YLOG2DEVREL(height);
- m_currentClippingRegion.Clear();
- m_currentClippingRegion.Union( rect );
+ if (!m_currentClippingRegion.IsEmpty())
+ m_currentClippingRegion.Intersect( rect );
+ else
+ m_currentClippingRegion.Union( rect );
+
#if USE_PAINT_REGION
if (!m_paintClippingRegion.IsEmpty())
m_currentClippingRegion.Intersect( m_paintClippingRegion );
#if USE_PAINT_REGION
if (!m_paintClippingRegion.IsEmpty())
m_currentClippingRegion.Intersect( m_paintClippingRegion );
- m_currentClippingRegion.Clear();
- m_currentClippingRegion.Union( region );
+ if (!m_currentClippingRegion.IsEmpty())
+ m_currentClippingRegion.Intersect( region );
+ else
+ m_currentClippingRegion.Union( region );
+
#if USE_PAINT_REGION
if (!m_paintClippingRegion.IsEmpty())
m_currentClippingRegion.Intersect( m_paintClippingRegion );
#if USE_PAINT_REGION
if (!m_paintClippingRegion.IsEmpty())
m_currentClippingRegion.Intersect( m_paintClippingRegion );
m_currentClippingRegion.Clear();
m_currentClippingRegion.Clear();
if (!m_paintClippingRegion.IsEmpty())
m_currentClippingRegion.Union( m_paintClippingRegion );
if (!m_paintClippingRegion.IsEmpty())
m_currentClippingRegion.Union( m_paintClippingRegion );
#include <math.h> // for floating-point functions
#include <gdk/gdk.h>
#include <math.h> // for floating-point functions
#include <gdk/gdk.h>
#include <gtk/gtk.h>
//-----------------------------------------------------------------------------
#include <gtk/gtk.h>
//-----------------------------------------------------------------------------
{
wxGCPool[i].m_gc = gdk_gc_new( window );
gdk_gc_set_exposures( wxGCPool[i].m_gc, FALSE );
{
wxGCPool[i].m_gc = gdk_gc_new( window );
gdk_gc_set_exposures( wxGCPool[i].m_gc, FALSE );
- // This allows you to e.g. copy from the screen
- // without clipping the windows on it.
- gdk_gc_set_subwindow( wxGCPool[i].m_gc,
- GDK_INCLUDE_INFERIORS );
wxGCPool[i].m_type = type;
wxGCPool[i].m_used = FALSE;
}
wxGCPool[i].m_type = type;
wxGCPool[i].m_used = FALSE;
}
int old_logical_func = m_logicalFunction;
SetLogicalFunction( logical_func );
int old_logical_func = m_logicalFunction;
SetLogicalFunction( logical_func );
if (use_bitmap_method)
{
/* scale/translate bitmap size */
if (use_bitmap_method)
{
/* scale/translate bitmap size */
/* Draw XPixmap or XBitmap, depending on what the wxBitmap contains. For
drawing a mono-bitmap (XBitmap) we use the current text GC */
/* Draw XPixmap or XBitmap, depending on what the wxBitmap contains. For
drawing a mono-bitmap (XBitmap) we use the current text GC */
if (is_mono)
gdk_draw_bitmap( m_window, m_textGC, use_bitmap.GetBitmap(), xsrc, ysrc, xx, yy, ww, hh );
else
if (is_mono)
gdk_draw_bitmap( m_window, m_textGC, use_bitmap.GetBitmap(), xsrc, ysrc, xx, yy, ww, hh );
else
for a different implementation of the same problem. */
wxBitmap bitmap( width, height );
for a different implementation of the same problem. */
wxBitmap bitmap( width, height );
- gdk_window_copy_area( bitmap.GetPixmap(), m_penGC, 0, 0,
+
+ /* We have to use the srcDC's GC as it might be a
+ wxScreenDC and we only have the GDK_INCLUDE_INFERIORS
+ flag set there. */
+
+ if (srcDC->GetWindow() == GDK_ROOT_PARENT())
+ gdk_gc_set_subwindow( m_penGC, GDK_INCLUDE_INFERIORS );
+
+ gdk_window_copy_area( bitmap.GetPixmap(), srcDC->m_penGC, 0, 0,
srcDC->GetWindow(),
xsrc, ysrc, width, height );
srcDC->GetWindow(),
xsrc, ysrc, width, height );
+ if (srcDC->GetWindow() == GDK_ROOT_PARENT())
+ gdk_gc_set_subwindow( m_penGC, GDK_CLIP_BY_CHILDREN );
+
/* scale image */
wxImage image( bitmap );
/* scale image */
wxImage image( bitmap );
- /* no scaling and not a memory dc with a mask either */
+ /* No scaling and not a memory dc with a mask either */
+
+ if (srcDC->GetWindow() == GDK_ROOT_PARENT())
+ gdk_gc_set_subwindow( m_penGC, GDK_INCLUDE_INFERIORS );
gdk_window_copy_area( m_window, m_penGC, xx, yy,
srcDC->GetWindow(),
xsrc, ysrc, width, height );
gdk_window_copy_area( m_window, m_penGC, xx, yy,
srcDC->GetWindow(),
xsrc, ysrc, width, height );
+
+ if (srcDC->GetWindow() == GDK_ROOT_PARENT())
+ gdk_gc_set_subwindow( m_penGC, GDK_CLIP_BY_CHILDREN );
rect.width = XLOG2DEVREL(width);
rect.height = YLOG2DEVREL(height);
rect.width = XLOG2DEVREL(width);
rect.height = YLOG2DEVREL(height);
- m_currentClippingRegion.Clear();
- m_currentClippingRegion.Union( rect );
+ if (!m_currentClippingRegion.IsEmpty())
+ m_currentClippingRegion.Intersect( rect );
+ else
+ m_currentClippingRegion.Union( rect );
+
#if USE_PAINT_REGION
if (!m_paintClippingRegion.IsEmpty())
m_currentClippingRegion.Intersect( m_paintClippingRegion );
#if USE_PAINT_REGION
if (!m_paintClippingRegion.IsEmpty())
m_currentClippingRegion.Intersect( m_paintClippingRegion );
- m_currentClippingRegion.Clear();
- m_currentClippingRegion.Union( region );
+ if (!m_currentClippingRegion.IsEmpty())
+ m_currentClippingRegion.Intersect( region );
+ else
+ m_currentClippingRegion.Union( region );
+
#if USE_PAINT_REGION
if (!m_paintClippingRegion.IsEmpty())
m_currentClippingRegion.Intersect( m_paintClippingRegion );
#if USE_PAINT_REGION
if (!m_paintClippingRegion.IsEmpty())
m_currentClippingRegion.Intersect( m_paintClippingRegion );
m_currentClippingRegion.Clear();
m_currentClippingRegion.Clear();
if (!m_paintClippingRegion.IsEmpty())
m_currentClippingRegion.Union( m_paintClippingRegion );
if (!m_paintClippingRegion.IsEmpty())
m_currentClippingRegion.Union( m_paintClippingRegion );