Adapted wxGTK to wxMSW's notion of region setting.
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
This commit is contained in:
@@ -159,7 +159,7 @@ int DBTree::OnPopulate()
|
||||
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
|
||||
|
@@ -1,5 +1,13 @@
|
||||
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
|
||||
|
@@ -897,14 +897,18 @@ void MyCanvas::DrawRegions(wxDC& dc)
|
||||
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 );
|
||||
|
||||
region = wxRegion( 120,30,100,270 );
|
||||
dc.SetClippingRegion( region );
|
||||
dc.SetClippingRegion( 20,20,100,100 );
|
||||
|
||||
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 );
|
||||
|
@@ -21,6 +21,7 @@
|
||||
#include <math.h> // for floating-point functions
|
||||
|
||||
#include <gdk/gdk.h>
|
||||
#include <gdk/gdkx.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -153,10 +154,6 @@ static GdkGC* wxGetPoolGC( GdkWindow *window, wxPoolGCType type )
|
||||
{
|
||||
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;
|
||||
}
|
||||
@@ -986,6 +983,7 @@ bool wxWindowDC::DoBlit( wxCoord xdest, wxCoord ydest, wxCoord width, wxCoord he
|
||||
|
||||
/* 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
|
||||
@@ -1028,10 +1026,21 @@ bool wxWindowDC::DoBlit( wxCoord xdest, wxCoord ydest, wxCoord width, wxCoord he
|
||||
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 );
|
||||
|
||||
if (srcDC->GetWindow() == GDK_ROOT_PARENT())
|
||||
gdk_gc_set_subwindow( m_penGC, GDK_CLIP_BY_CHILDREN );
|
||||
|
||||
/* scale image */
|
||||
|
||||
wxImage image( bitmap );
|
||||
@@ -1048,11 +1057,17 @@ bool wxWindowDC::DoBlit( wxCoord xdest, wxCoord ydest, wxCoord width, wxCoord he
|
||||
}
|
||||
else
|
||||
{
|
||||
/* 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 );
|
||||
|
||||
if (srcDC->GetWindow() == GDK_ROOT_PARENT())
|
||||
gdk_gc_set_subwindow( m_penGC, GDK_CLIP_BY_CHILDREN );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1635,8 +1650,11 @@ void wxWindowDC::DoSetClippingRegion( wxCoord x, wxCoord y, wxCoord width, wxCoo
|
||||
rect.width = XLOG2DEVREL(width);
|
||||
rect.height = YLOG2DEVREL(height);
|
||||
|
||||
m_currentClippingRegion.Clear();
|
||||
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 );
|
||||
@@ -1665,8 +1683,11 @@ void wxWindowDC::DoSetClippingRegionAsRegion( const wxRegion ®ion )
|
||||
|
||||
if (!m_window) return;
|
||||
|
||||
m_currentClippingRegion.Clear();
|
||||
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 );
|
||||
@@ -1686,8 +1707,10 @@ void wxWindowDC::DestroyClippingRegion()
|
||||
|
||||
m_currentClippingRegion.Clear();
|
||||
|
||||
#if USE_PAINT_REGION
|
||||
if (!m_paintClippingRegion.IsEmpty())
|
||||
m_currentClippingRegion.Union( m_paintClippingRegion );
|
||||
#endif
|
||||
|
||||
if (!m_window) return;
|
||||
|
||||
|
@@ -21,6 +21,7 @@
|
||||
#include <math.h> // for floating-point functions
|
||||
|
||||
#include <gdk/gdk.h>
|
||||
#include <gdk/gdkx.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -153,10 +154,6 @@ static GdkGC* wxGetPoolGC( GdkWindow *window, wxPoolGCType type )
|
||||
{
|
||||
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;
|
||||
}
|
||||
@@ -986,6 +983,7 @@ bool wxWindowDC::DoBlit( wxCoord xdest, wxCoord ydest, wxCoord width, wxCoord he
|
||||
|
||||
/* 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
|
||||
@@ -1028,10 +1026,21 @@ bool wxWindowDC::DoBlit( wxCoord xdest, wxCoord ydest, wxCoord width, wxCoord he
|
||||
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 );
|
||||
|
||||
if (srcDC->GetWindow() == GDK_ROOT_PARENT())
|
||||
gdk_gc_set_subwindow( m_penGC, GDK_CLIP_BY_CHILDREN );
|
||||
|
||||
/* scale image */
|
||||
|
||||
wxImage image( bitmap );
|
||||
@@ -1048,11 +1057,17 @@ bool wxWindowDC::DoBlit( wxCoord xdest, wxCoord ydest, wxCoord width, wxCoord he
|
||||
}
|
||||
else
|
||||
{
|
||||
/* 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 );
|
||||
|
||||
if (srcDC->GetWindow() == GDK_ROOT_PARENT())
|
||||
gdk_gc_set_subwindow( m_penGC, GDK_CLIP_BY_CHILDREN );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1635,8 +1650,11 @@ void wxWindowDC::DoSetClippingRegion( wxCoord x, wxCoord y, wxCoord width, wxCoo
|
||||
rect.width = XLOG2DEVREL(width);
|
||||
rect.height = YLOG2DEVREL(height);
|
||||
|
||||
m_currentClippingRegion.Clear();
|
||||
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 );
|
||||
@@ -1665,8 +1683,11 @@ void wxWindowDC::DoSetClippingRegionAsRegion( const wxRegion ®ion )
|
||||
|
||||
if (!m_window) return;
|
||||
|
||||
m_currentClippingRegion.Clear();
|
||||
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 );
|
||||
@@ -1686,8 +1707,10 @@ void wxWindowDC::DestroyClippingRegion()
|
||||
|
||||
m_currentClippingRegion.Clear();
|
||||
|
||||
#if USE_PAINT_REGION
|
||||
if (!m_paintClippingRegion.IsEmpty())
|
||||
m_currentClippingRegion.Union( m_paintClippingRegion );
|
||||
#endif
|
||||
|
||||
if (!m_window) return;
|
||||
|
||||
|
Reference in New Issue
Block a user