2008-03-08 08:52:38 -05:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: dcclient.h
|
2008-04-19 04:12:58 -04:00
|
|
|
// Purpose: interface of wxClientDC and wxPaintDC
|
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 wxPaintDC
|
2008-03-08 09:43:31 -05:00
|
|
|
|
2008-03-08 08:52:38 -05:00
|
|
|
A wxPaintDC must be constructed if an application wishes to paint on the
|
2008-04-19 04:12:58 -04:00
|
|
|
client area of a window from within an EVT_PAINT() event handler. This
|
|
|
|
should normally be constructed as a temporary stack object; don't store a
|
|
|
|
wxPaintDC object. If you have an EVT_PAINT() handler, you @e must create a
|
|
|
|
wxPaintDC object within it even if you don't actually use it.
|
2008-03-08 09:43:31 -05:00
|
|
|
|
2008-04-19 04:12:58 -04:00
|
|
|
Using wxPaintDC within your EVT_PAINT() handler is important because it
|
|
|
|
automatically sets the clipping area to the damaged area of the window.
|
|
|
|
Attempts to draw outside this area do not appear.
|
2008-03-08 09:43:31 -05:00
|
|
|
|
2008-04-19 04:12:58 -04:00
|
|
|
To draw on a window from outside your EVT_PAINT() handler, construct a
|
|
|
|
wxClientDC object.
|
2008-03-08 09:43:31 -05:00
|
|
|
|
2008-04-19 04:12:58 -04:00
|
|
|
To draw on the whole window including decorations, construct a wxWindowDC
|
|
|
|
object (Windows only).
|
2008-03-08 09:43:31 -05:00
|
|
|
|
2008-06-21 13:17:00 -04:00
|
|
|
A wxPaintDC object is initialized to use the same font and colours as the
|
|
|
|
window it is associated with.
|
|
|
|
|
2008-03-08 08:52:38 -05:00
|
|
|
@library{wxcore}
|
|
|
|
@category{dc}
|
2008-03-08 09:43:31 -05:00
|
|
|
|
2008-04-19 04:12:58 -04:00
|
|
|
@see wxDC, wxClientDC, wxMemoryDC, wxWindowDC, wxScreenDC
|
2008-03-08 08:52:38 -05:00
|
|
|
*/
|
|
|
|
class wxPaintDC : public wxWindowDC
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
/**
|
|
|
|
Constructor. Pass a pointer to the window on which you wish to paint.
|
|
|
|
*/
|
|
|
|
wxPaintDC(wxWindow* window);
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2008-03-10 11:24:38 -04:00
|
|
|
|
2008-03-08 08:52:38 -05:00
|
|
|
/**
|
|
|
|
@class wxClientDC
|
2008-03-08 09:43:31 -05:00
|
|
|
|
2008-03-08 08:52:38 -05:00
|
|
|
A wxClientDC must be constructed if an application wishes to paint on the
|
2008-04-19 04:12:58 -04:00
|
|
|
client area of a window from outside an EVT_PAINT() handler. This should
|
|
|
|
normally be constructed as a temporary stack object; don't store a
|
|
|
|
wxClientDC object.
|
2008-03-08 09:43:31 -05:00
|
|
|
|
2008-04-19 04:12:58 -04:00
|
|
|
To draw on a window from within an EVT_PAINT() handler, construct a
|
|
|
|
wxPaintDC object instead.
|
2008-03-08 09:43:31 -05:00
|
|
|
|
2008-04-19 04:12:58 -04:00
|
|
|
To draw on the whole window including decorations, construct a wxWindowDC
|
|
|
|
object (Windows only).
|
2008-03-08 09:43:31 -05:00
|
|
|
|
2008-06-21 13:17:00 -04:00
|
|
|
A wxClientDC object is initialized to use the same font and colours as the
|
|
|
|
window it is associated with.
|
|
|
|
|
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, wxWindowDC, wxScreenDC
|
2008-03-08 08:52:38 -05:00
|
|
|
*/
|
|
|
|
class wxClientDC : public wxWindowDC
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
/**
|
|
|
|
Constructor. Pass a pointer to the window on which you wish to paint.
|
|
|
|
*/
|
|
|
|
wxClientDC(wxWindow* window);
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2008-03-10 11:24:38 -04:00
|
|
|
|
2008-03-08 08:52:38 -05:00
|
|
|
/**
|
|
|
|
@class wxWindowDC
|
2008-03-08 09:43:31 -05:00
|
|
|
|
2008-03-08 08:52:38 -05:00
|
|
|
A wxWindowDC must be constructed if an application wishes to paint on the
|
2008-04-19 04:12:58 -04:00
|
|
|
whole area of a window (client and decorations). This should normally be
|
|
|
|
constructed as a temporary stack object; don't store a wxWindowDC object.
|
2008-03-08 09:43:31 -05:00
|
|
|
|
2008-04-19 04:12:58 -04:00
|
|
|
To draw on a window from inside an EVT_PAINT() handler, construct a
|
|
|
|
wxPaintDC object instead.
|
2008-03-08 09:43:31 -05:00
|
|
|
|
2008-04-19 04:12:58 -04:00
|
|
|
To draw on the client area of a window from outside an EVT_PAINT() handler,
|
|
|
|
construct a wxClientDC object.
|
2008-03-08 09:43:31 -05:00
|
|
|
|
2008-06-21 13:17:00 -04:00
|
|
|
A wxWindowDC object is initialized to use the same font and colours as the
|
|
|
|
window it is associated with.
|
|
|
|
|
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, wxScreenDC
|
2008-03-08 08:52:38 -05:00
|
|
|
*/
|
|
|
|
class wxWindowDC : public wxDC
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
/**
|
|
|
|
Constructor. Pass a pointer to the window on which you wish to paint.
|
|
|
|
*/
|
|
|
|
wxWindowDC(wxWindow* window);
|
|
|
|
};
|
2008-03-10 11:24:38 -04:00
|
|
|
|