2008-03-08 08:52:38 -05:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: dcscreen.h
|
2008-03-10 11:24:38 -04:00
|
|
|
// Purpose: interface of wxScreenDC
|
2008-03-08 08:52:38 -05:00
|
|
|
// Author: wxWidgets team
|
|
|
|
// RCS-ID: $Id$
|
2010-07-13 09:29:13 -04:00
|
|
|
// Licence: wxWindows licence
|
2008-03-08 08:52:38 -05:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
/**
|
|
|
|
@class wxScreenDC
|
2008-03-08 09:43:31 -05:00
|
|
|
|
2008-04-19 04:12:58 -04:00
|
|
|
A wxScreenDC can be used to paint on the screen. This should normally be
|
|
|
|
constructed as a temporary stack object; don't store a wxScreenDC object.
|
2008-03-08 09:43:31 -05:00
|
|
|
|
2008-03-08 08:52:38 -05:00
|
|
|
@library{wxcore}
|
|
|
|
@category{dc}
|
2008-03-08 09:43:31 -05:00
|
|
|
|
2008-03-10 11:24:38 -04:00
|
|
|
@see wxDC, wxMemoryDC, wxPaintDC, wxClientDC, wxWindowDC
|
2008-03-08 08:52:38 -05:00
|
|
|
*/
|
|
|
|
class wxScreenDC : public wxDC
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
/**
|
|
|
|
Constructor.
|
|
|
|
*/
|
|
|
|
wxScreenDC();
|
|
|
|
|
|
|
|
/**
|
|
|
|
Use this in conjunction with StartDrawingOnTop().
|
2008-04-19 04:12:58 -04:00
|
|
|
|
|
|
|
This function destroys the temporary window created to implement on-top
|
|
|
|
drawing (X only).
|
2008-03-08 08:52:38 -05:00
|
|
|
*/
|
2008-09-27 07:21:10 -04:00
|
|
|
static bool EndDrawingOnTop();
|
2008-03-08 08:52:38 -05:00
|
|
|
|
|
|
|
/**
|
2008-04-19 04:12:58 -04:00
|
|
|
Use this in conjunction with EndDrawingOnTop() to ensure that drawing
|
|
|
|
to the screen occurs on top of existing windows. Without this, some
|
|
|
|
window systems (such as X) only allow drawing to take place underneath
|
2008-03-08 08:52:38 -05:00
|
|
|
other windows.
|
2008-04-19 04:12:58 -04:00
|
|
|
|
|
|
|
This version of StartDrawingOnTop() is used to specify that the area
|
|
|
|
that will be drawn on coincides with the given window. It is
|
|
|
|
recommended that an area of the screen is specified with
|
|
|
|
StartDrawingOnTop(wxRect*) because with large regions, flickering
|
|
|
|
effects are noticeable when destroying the temporary transparent window
|
|
|
|
used to implement this feature.
|
|
|
|
|
|
|
|
You might use this function when implementing a drag feature, for
|
|
|
|
example as in the wxSplitterWindow implementation.
|
2008-03-20 09:45:17 -04:00
|
|
|
|
2008-03-08 08:52:38 -05:00
|
|
|
@remarks This function is probably obsolete since the X implementations
|
2008-04-19 04:12:58 -04:00
|
|
|
allow drawing directly on the screen now. However, the fact
|
|
|
|
that this function allows the screen to be refreshed
|
|
|
|
afterwards, may be useful to some applications.
|
2008-03-08 08:52:38 -05:00
|
|
|
*/
|
2008-09-27 07:21:10 -04:00
|
|
|
static bool StartDrawingOnTop(wxWindow* window);
|
2008-04-19 04:12:58 -04:00
|
|
|
/**
|
|
|
|
Use this in conjunction with EndDrawingOnTop() to ensure that drawing
|
|
|
|
to the screen occurs on top of existing windows. Without this, some
|
|
|
|
window systems (such as X) only allow drawing to take place underneath
|
|
|
|
other windows.
|
|
|
|
|
|
|
|
This version of StartDrawingOnTop() is used to specify an area of the
|
|
|
|
screen which is to be drawn on. If @NULL is passed, the whole screen is
|
|
|
|
available. It is recommended that an area of the screen is specified
|
|
|
|
with this function rather than with StartDrawingOnTop(wxWindow*),
|
|
|
|
because with large regions, flickering effects are noticeable when
|
|
|
|
destroying the temporary transparent window used to implement this
|
|
|
|
feature.
|
|
|
|
|
|
|
|
You might use this function when implementing a drag feature, for
|
|
|
|
example as in the wxSplitterWindow implementation.
|
|
|
|
|
|
|
|
@remarks This function is probably obsolete since the X implementations
|
|
|
|
allow drawing directly on the screen now. However, the fact
|
|
|
|
that this function allows the screen to be refreshed
|
|
|
|
afterwards, may be useful to some applications.
|
|
|
|
*/
|
2008-09-27 07:21:10 -04:00
|
|
|
static bool StartDrawingOnTop(wxRect* rect = NULL);
|
2008-03-08 08:52:38 -05:00
|
|
|
};
|
2008-03-10 11:24:38 -04:00
|
|
|
|