File: overlay.h

package info (click to toggle)
wxwidgets3.0 3.0.5.1%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 120,464 kB
  • sloc: cpp: 896,633; makefile: 52,303; ansic: 21,971; sh: 5,713; python: 2,940; xml: 1,534; perl: 264; javascript: 33
file content (66 lines) | stat: -rw-r--r-- 1,495 bytes parent folder | download | duplicates (10)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
/////////////////////////////////////////////////////////////////////////////
// Name:        wx/private/overlay.h
// Purpose:     wxOverlayImpl declaration
// Author:      Stefan Csomor
// Modified by:
// Created:     2006-10-20
// Copyright:   (c) wxWidgets team
// Licence:     wxWindows licence
/////////////////////////////////////////////////////////////////////////////

#ifndef _WX_PRIVATE_OVERLAY_H_
#define _WX_PRIVATE_OVERLAY_H_

#include "wx/overlay.h"

#ifdef wxHAS_NATIVE_OVERLAY

#if defined(__WXMAC__)
    #include "wx/osx/carbon/private/overlay.h"
#elif defined(__WXDFB__)
    #include "wx/dfb/private/overlay.h"
#else
    #error "unknown native wxOverlay implementation"
#endif

#else // !wxHAS_NATIVE_OVERLAY

#include "wx/bitmap.h"

class WXDLLIMPEXP_FWD_CORE wxWindow;

// generic implementation of wxOverlay
class wxOverlayImpl
{
public:
    wxOverlayImpl();
    ~wxOverlayImpl();


    // clears the overlay without restoring the former state
    // to be done eg when the window content has been changed and repainted
    void Reset();

    // returns true if it has been setup
    bool IsOk();

    void Init(wxDC* dc, int x , int y , int width , int height);

    void BeginDrawing(wxDC* dc);

    void EndDrawing(wxDC* dc);

    void Clear(wxDC* dc);

private:
    wxBitmap m_bmpSaved ;
    int m_x ;
    int m_y ;
    int m_width ;
    int m_height ;
    wxWindow* m_window ;
};

#endif // wxHAS_NATIVE_OVERLAY/!wxHAS_NATIVE_OVERLAY

#endif // _WX_PRIVATE_OVERLAY_H_