X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b3c861501a451503b31c075ccb59d16b0ae01e99..1ab48408d13344ff0e46bd397d7dc89889e48fba:/include/wx/dfb/window.h diff --git a/include/wx/dfb/window.h b/include/wx/dfb/window.h index 98b10a49c8..e6c2796cf2 100644 --- a/include/wx/dfb/window.h +++ b/include/wx/dfb/window.h @@ -15,7 +15,7 @@ // headers // --------------------------------------------------------------------------- -#include "wx/dfb/ifacehelpers.h" +#include "wx/dfb/dfbptr.h" wxDFB_DECLARE_INTERFACE(IDirectFBSurface); struct wxDFBWindowEvent; @@ -23,6 +23,9 @@ struct wxDFBWindowEvent; class WXDLLIMPEXP_CORE wxFont; class WXDLLIMPEXP_CORE wxTopLevelWindowDFB; +class wxOverlayImpl; +class wxDfbOverlaysList; + // --------------------------------------------------------------------------- // wxWindow // --------------------------------------------------------------------------- @@ -75,7 +78,7 @@ public: virtual void Clear(); virtual void Freeze(); virtual void Thaw(); - bool IsFrozen() const { return m_frozenness > 0; } + virtual bool IsFrozen() const { return m_frozenness > 0; } virtual bool SetCursor(const wxCursor &cursor); virtual bool SetFont(const wxFont &font) { m_font = font; return true; } @@ -102,13 +105,15 @@ public: // -------------------------- // Returns DirectFB surface used for rendering of this window - IDirectFBSurfacePtr GetDfbSurface(); + wxIDirectFBSurfacePtr GetDfbSurface(); // returns toplevel window the window belongs to wxTopLevelWindowDFB *GetTLW() const { return m_tlw; } void OnInternalIdle(); + virtual bool IsDoubleBuffered() const { return true; } + protected: // implement the base class pure virtuals virtual void DoClientToScreen(int *x, int *y) const; @@ -132,7 +137,7 @@ protected: // return DFB surface used to render this window (will be assigned to // m_surface if the window is visible) - virtual IDirectFBSurfacePtr ObtainDfbSurface() const; + virtual wxIDirectFBSurfacePtr ObtainDfbSurface() const; // this method must be called when window's position, size or visibility // changes; it resets m_surface so that ObtainDfbSurface has to be called @@ -140,11 +145,23 @@ protected: void InvalidateDfbSurface(); // called by parent to render (part of) the window - void PaintWindow(const wxRect& rect, bool eraseBackground); + void PaintWindow(const wxRect& rect); + + // paint window's overlays (if any) on top of window's surface + void PaintOverlays(const wxRect& rect); - // implementation of Refresh() - void DoRefreshWindow(bool eraseBack = true); - virtual void DoRefreshRect(const wxRect& rect, bool eraseBack = true); + // refreshes the entire window (including non-client areas) + void DoRefreshWindow(); + // refreshes given rectangle of the window (in window, _not_ client coords) + virtual void DoRefreshRect(const wxRect& rect); + // refreshes given rectangle; unlike RefreshRect(), the argument is in + // window, not client, coords and unlike DoRefreshRect() and like Refresh(), + // does nothing if the window is hidden or frozen + void RefreshWindowRect(const wxRect& rect); + + // add/remove overlay for this window + void AddOverlay(wxOverlayImpl *overlay); + void RemoveOverlay(wxOverlayImpl *overlay); // DirectFB events handling void HandleKeyEvent(const wxDFBWindowEvent& event_); @@ -153,7 +170,7 @@ private: // common part of all ctors void Init(); // counterpart to SetFocus - void KillFocus(); + void DFBKillFocus(); protected: // toplevel window (i.e. DirectFB window) this window belongs to @@ -161,7 +178,7 @@ protected: private: // subsurface of TLW's surface covered by this window - IDirectFBSurfacePtr m_surface; + wxIDirectFBSurfacePtr m_surface; // position of the window (relative to the parent, not used by wxTLW, so // don't access it directly) @@ -170,12 +187,16 @@ private: // number of calls to Freeze() minus number of calls to Thaw() unsigned m_frozenness; + // overlays for this window (or NULL if it doesn't have any) + wxDfbOverlaysList *m_overlays; + friend class wxTopLevelWindowDFB; // for HandleXXXEvent + friend class wxOverlayImpl; // for Add/RemoveOverlay + friend class wxWindowDC; // for PaintOverlays DECLARE_DYNAMIC_CLASS(wxWindowDFB) DECLARE_NO_COPY_CLASS(wxWindowDFB) DECLARE_EVENT_TABLE() }; - #endif // _WX_DFB_WINDOW_H_