git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6379
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
during the drag (for example, highlight an item as in the dragimag sample), first call Hide,
update the screen, call Move, and then call Show.
during the drag (for example, highlight an item as in the dragimag sample), first call Hide,
update the screen, call Move, and then call Show.
+You can drag within one window, or you can use full-screen dragging
+either across the whole screen, or just restricted to one area
+of the screen to save resources. If you want the user to drag between
+two windows, then you will need to use full-screen dragging.
+
Please see {\tt samples/dragimag} for an example.
\wxheading{Derived from}
Please see {\tt samples/dragimag} for an example.
\wxheading{Derived from}
by cutting down on the area under consideration, and it can also make a visual difference
since the drag is clipped to this area.}
by cutting down on the area under consideration, and it can also make a visual difference
since the drag is clipped to this area.}
-{\bf Please note:} full screen dragging only works on Windows at present,
-because on Motif and GTK, the wxScreenDC used to implement full screen dragging only looks at the X root window and not
-the windows on top, when copying from the screen to the backing bitmap.
-Suggestions for solving this one are welcome!
-
\membersection{wxDragImage::EndDrag}\label{wxdragimageenddrag}
\func{bool}{EndDrag}{\void}
\membersection{wxDragImage::EndDrag}\label{wxdragimageenddrag}
\func{bool}{EndDrag}{\void}
{
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;
}
{
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;
}
gcvalues.foreground = BlackPixel (display, DefaultScreen (display));
gcvalues.background = WhitePixel (display, DefaultScreen (display));
gcvalues.graphics_exposures = False;
gcvalues.foreground = BlackPixel (display, DefaultScreen (display));
gcvalues.background = WhitePixel (display, DefaultScreen (display));
gcvalues.graphics_exposures = False;
+ gcvalues.subwindow_mode = IncludeInferiors;
gcvalues.line_width = 1;
m_gc = (WXGC) XCreateGC (display, RootWindow (display, DefaultScreen (display)),
gcvalues.line_width = 1;
m_gc = (WXGC) XCreateGC (display, RootWindow (display, DefaultScreen (display)),
- GCForeground | GCBackground | GCGraphicsExposures | GCLineWidth,
+ GCForeground | GCBackground | GCGraphicsExposures | GCLineWidth | GCSubwindowMode,
&gcvalues);
if (m_window->GetBackingPixmap())
{
m_gcBacking = (WXGC) XCreateGC (display, RootWindow (display,
DefaultScreen (display)),
&gcvalues);
if (m_window->GetBackingPixmap())
{
m_gcBacking = (WXGC) XCreateGC (display, RootWindow (display,
DefaultScreen (display)),
- GCForeground | GCBackground | GCGraphicsExposures | GCLineWidth,
+ GCForeground | GCBackground | GCGraphicsExposures | GCLineWidth | GCSubwindowMode,
gcvalues.foreground = BlackPixel (display, DefaultScreen (display));
gcvalues.background = WhitePixel (display, DefaultScreen (display));
gcvalues.graphics_exposures = False;
gcvalues.foreground = BlackPixel (display, DefaultScreen (display));
gcvalues.background = WhitePixel (display, DefaultScreen (display));
gcvalues.graphics_exposures = False;
+ gcvalues.subwindow_mode = IncludeInferiors;
gcvalues.line_width = 1;
m_gc = (WXGC) XCreateGC (display, RootWindow (display, DefaultScreen (display)),
gcvalues.line_width = 1;
m_gc = (WXGC) XCreateGC (display, RootWindow (display, DefaultScreen (display)),
- GCForeground | GCBackground | GCGraphicsExposures | GCLineWidth,
+ GCForeground | GCBackground | GCGraphicsExposures | GCLineWidth | GCSubwindowMode,
&gcvalues);
m_backgroundPixel = (int) gcvalues.background;
&gcvalues);
m_backgroundPixel = (int) gcvalues.background;
gcvalues.foreground = BlackPixel (display, DefaultScreen (display));
gcvalues.background = WhitePixel (display, DefaultScreen (display));
gcvalues.graphics_exposures = False;
gcvalues.foreground = BlackPixel (display, DefaultScreen (display));
gcvalues.background = WhitePixel (display, DefaultScreen (display));
gcvalues.graphics_exposures = False;
+ gcvalues.subwindow_mode = IncludeInferiors;
gcvalues.line_width = 1;
m_gc = (WXGC) XCreateGC (display, RootWindow (display, DefaultScreen (display)),
gcvalues.line_width = 1;
m_gc = (WXGC) XCreateGC (display, RootWindow (display, DefaultScreen (display)),
- GCForeground | GCBackground | GCGraphicsExposures | GCLineWidth,
+ GCForeground | GCBackground | GCGraphicsExposures | GCLineWidth | GCSubwindowMode,
&gcvalues);
m_backgroundPixel = (int) gcvalues.background;
&gcvalues);
m_backgroundPixel = (int) gcvalues.background;
gcvalues.foreground = BlackPixel (display, DefaultScreen (display));
gcvalues.background = WhitePixel (display, DefaultScreen (display));
gcvalues.graphics_exposures = False;
gcvalues.foreground = BlackPixel (display, DefaultScreen (display));
gcvalues.background = WhitePixel (display, DefaultScreen (display));
gcvalues.graphics_exposures = False;
+ gcvalues.subwindow_mode = IncludeInferiors;
gcvalues.line_width = 1;
m_gc = (WXGC) XCreateGC (display, RootWindow (display, DefaultScreen (display)),
gcvalues.line_width = 1;
m_gc = (WXGC) XCreateGC (display, RootWindow (display, DefaultScreen (display)),
- GCForeground | GCBackground | GCGraphicsExposures | GCLineWidth,
+ GCForeground | GCBackground | GCGraphicsExposures | GCLineWidth | GCSubwindowMode,
&gcvalues);
m_backgroundPixel = (int) gcvalues.background;
&gcvalues);
m_backgroundPixel = (int) gcvalues.background;