X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/20671963efabd70a208b415c4734ee813b9eb439..472eec8a0391538e4dcf7f7c6c4f4d44c8383616:/include/wx/dfb/window.h diff --git a/include/wx/dfb/window.h b/include/wx/dfb/window.h index f5bc1b15b2..2fc0544cd2 100644 --- a/include/wx/dfb/window.h +++ b/include/wx/dfb/window.h @@ -20,8 +20,11 @@ wxDFB_DECLARE_INTERFACE(IDirectFBSurface); struct wxDFBWindowEvent; -class WXDLLIMPEXP_CORE wxFont; -class WXDLLIMPEXP_CORE wxTopLevelWindowDFB; +class WXDLLIMPEXP_FWD_CORE wxFont; +class WXDLLIMPEXP_FWD_CORE wxNonOwnedWindow; + +class wxOverlayImpl; +class wxDfbOverlaysList; // --------------------------------------------------------------------------- // wxWindow @@ -72,10 +75,9 @@ public: virtual void Refresh(bool eraseBackground = true, const wxRect *rect = (const wxRect *) NULL); virtual void Update(); - 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; } @@ -105,10 +107,12 @@ public: wxIDirectFBSurfacePtr GetDfbSurface(); // returns toplevel window the window belongs to - wxTopLevelWindowDFB *GetTLW() const { return m_tlw; } + wxNonOwnedWindow *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; @@ -142,10 +146,21 @@ protected: // called by parent to render (part of) the window void PaintWindow(const wxRect& rect); + // paint window's overlays (if any) on top of window's surface + void PaintOverlays(const wxRect& rect); + // 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_); @@ -154,11 +169,11 @@ 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 - wxTopLevelWindowDFB *m_tlw; + wxNonOwnedWindow *m_tlw; private: // subsurface of TLW's surface covered by this window @@ -171,7 +186,12 @@ private: // number of calls to Freeze() minus number of calls to Thaw() unsigned m_frozenness; - friend class wxTopLevelWindowDFB; // for HandleXXXEvent + // overlays for this window (or NULL if it doesn't have any) + wxDfbOverlaysList *m_overlays; + + friend class wxNonOwnedWindow; // for HandleXXXEvent + friend class wxOverlayImpl; // for Add/RemoveOverlay + friend class wxWindowDC; // for PaintOverlays DECLARE_DYNAMIC_CLASS(wxWindowDFB) DECLARE_NO_COPY_CLASS(wxWindowDFB)