]>
Commit | Line | Data |
---|---|---|
1 | ///////////////////////////////////////////////////////////////////////////// | |
2 | // Name: dcscreen.h | |
3 | // Purpose: interface of wxScreenDC | |
4 | // Author: wxWidgets team | |
5 | // RCS-ID: $Id$ | |
6 | // Licence: wxWindows license | |
7 | ///////////////////////////////////////////////////////////////////////////// | |
8 | ||
9 | /** | |
10 | @class wxScreenDC | |
11 | @wxheader{dcscreen.h} | |
12 | ||
13 | A wxScreenDC can be used to paint on the screen. This should normally be | |
14 | constructed as a temporary stack object; don't store a wxScreenDC object. | |
15 | ||
16 | @library{wxcore} | |
17 | @category{dc} | |
18 | ||
19 | @see wxDC, wxMemoryDC, wxPaintDC, wxClientDC, wxWindowDC | |
20 | */ | |
21 | class wxScreenDC : public wxDC | |
22 | { | |
23 | public: | |
24 | /** | |
25 | Constructor. | |
26 | */ | |
27 | wxScreenDC(); | |
28 | ||
29 | /** | |
30 | Use this in conjunction with StartDrawingOnTop(). | |
31 | ||
32 | This function destroys the temporary window created to implement on-top | |
33 | drawing (X only). | |
34 | */ | |
35 | bool EndDrawingOnTop(); | |
36 | ||
37 | /** | |
38 | Use this in conjunction with EndDrawingOnTop() to ensure that drawing | |
39 | to the screen occurs on top of existing windows. Without this, some | |
40 | window systems (such as X) only allow drawing to take place underneath | |
41 | other windows. | |
42 | ||
43 | This version of StartDrawingOnTop() is used to specify that the area | |
44 | that will be drawn on coincides with the given window. It is | |
45 | recommended that an area of the screen is specified with | |
46 | StartDrawingOnTop(wxRect*) because with large regions, flickering | |
47 | effects are noticeable when destroying the temporary transparent window | |
48 | used to implement this feature. | |
49 | ||
50 | You might use this function when implementing a drag feature, for | |
51 | example as in the wxSplitterWindow implementation. | |
52 | ||
53 | @remarks This function is probably obsolete since the X implementations | |
54 | allow drawing directly on the screen now. However, the fact | |
55 | that this function allows the screen to be refreshed | |
56 | afterwards, may be useful to some applications. | |
57 | */ | |
58 | bool StartDrawingOnTop(wxWindow* window); | |
59 | /** | |
60 | Use this in conjunction with EndDrawingOnTop() to ensure that drawing | |
61 | to the screen occurs on top of existing windows. Without this, some | |
62 | window systems (such as X) only allow drawing to take place underneath | |
63 | other windows. | |
64 | ||
65 | This version of StartDrawingOnTop() is used to specify an area of the | |
66 | screen which is to be drawn on. If @NULL is passed, the whole screen is | |
67 | available. It is recommended that an area of the screen is specified | |
68 | with this function rather than with StartDrawingOnTop(wxWindow*), | |
69 | because with large regions, flickering effects are noticeable when | |
70 | destroying the temporary transparent window used to implement this | |
71 | feature. | |
72 | ||
73 | You might use this function when implementing a drag feature, for | |
74 | example as in the wxSplitterWindow implementation. | |
75 | ||
76 | @remarks This function is probably obsolete since the X implementations | |
77 | allow drawing directly on the screen now. However, the fact | |
78 | that this function allows the screen to be refreshed | |
79 | afterwards, may be useful to some applications. | |
80 | */ | |
81 | bool StartDrawingOnTop(wxRect* rect = NULL); | |
82 | }; | |
83 |