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