From 4a90549b66413725ad68da6e5e449d80e2010a14 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Sat, 19 May 2012 06:21:37 +0000 Subject: [PATCH] Add interface and simple docs doe wxOverlay and wxDCOverlay. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71493 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- interface/wx/overlay.h | 68 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 interface/wx/overlay.h diff --git a/interface/wx/overlay.h b/interface/wx/overlay.h new file mode 100644 index 0000000000..7131de2900 --- /dev/null +++ b/interface/wx/overlay.h @@ -0,0 +1,68 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: overlay.h +// Purpose: interface of wxOverlay +// Author: wxWidgets team +// RCS-ID: $Id$ +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +/** + @class wxOverlay + + Creates an overlay over an existing window, allowing for manipulations like + rubberbanding, etc. On wxOSX the overlay is implemented with native + platform APIs, on the other platforms it is simulated using wxMemoryDC. + + @library{wxcore} + + @see wxDCOverlay, wxDC + */ +class wxOverlay +{ +public: + wxOverlay(); + ~wxOverlay(); + + /** + Clears the overlay without restoring the former state. To be done, for + example, when the window content has been changed and repainted. + */ + void Reset(); +}; + + + +/** + @class wxDCOverlay + + Connects an overlay with a drawing DC. + + @library{wxcore} + + @see wxOverlay, wxDC + + */ +class wxDCOverlay +{ +public: + /** + Connects this overlay to the corresponding drawing dc, if the overlay is + not initialized yet this call will do so. + */ + wxDCOverlay(wxOverlay &overlay, wxDC *dc, int x , int y , int width , int height); + + /** + Convenience wrapper that behaves the same using the entire area of the dc. + */ + wxDCOverlay(wxOverlay &overlay, wxDC *dc); + + /** + Removes the connection between the overlay and the dc. + */ + virtual ~wxDCOverlay(); + + /** + Clears the layer, restoring the state at the last init. + */ + void Clear(); +}; -- 2.45.2