wxWidgets/include/wx/dfb/nonownedwnd.h
Vadim Zeitlin 3f66f6a5b3 Remove all lines containing cvs/svn "$Id$" keyword.
This keyword is not expanded by Git which means it's not replaced with the
correct revision value in the releases made using git-based scripts and it's
confusing to have lines with unexpanded "$Id$" in the released files. As
expanding them with Git is not that simple (it could be done with git archive
and export-subst attribute) and there are not many benefits in having them in
the first place, just remove all these lines.

If nothing else, this will make an eventual transition to Git simpler.

Closes #14487.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74602 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-26 16:02:46 +00:00

126 lines
3.9 KiB
C++

///////////////////////////////////////////////////////////////////////////////
// Name: wx/dfb/nonownedwnd.h
// Purpose: declares wxNonOwnedWindow class
// Author: Vaclav Slavik
// Modified by:
// Created: 2006-12-24
// Copyright: (c) 2006 TT-Solutions
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
#ifndef _WX_DFB_NONOWNEDWND_H_
#define _WX_DFB_NONOWNEDWND_H_
#include "wx/window.h"
#include "wx/dfb/dfbptr.h"
wxDFB_DECLARE_INTERFACE(IDirectFBWindow);
class wxDfbQueuedPaintRequests;
struct wxDFBWindowEvent;
class wxDFBEventsHandler;
//-----------------------------------------------------------------------------
// wxNonOwnedWindow
//-----------------------------------------------------------------------------
// This class represents "non-owned" window. A window is owned by another
// window if it has a parent and is positioned within the parent. For example,
// wxFrame is non-owned, because even though it can have a parent, it's
// location is independent of it. This class is for internal use only, it's
// the base class for wxTopLevelWindow and wxPopupWindow.
class WXDLLIMPEXP_CORE wxNonOwnedWindow : public wxNonOwnedWindowBase
{
public:
// construction
wxNonOwnedWindow() { Init(); }
wxNonOwnedWindow(wxWindow *parent,
wxWindowID id,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
const wxString& name = wxPanelNameStr)
{
Init();
Create(parent, id, pos, size, style, name);
}
bool Create(wxWindow *parent,
wxWindowID id,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
const wxString& name = wxPanelNameStr);
virtual ~wxNonOwnedWindow();
// implement base class pure virtuals
virtual bool Show(bool show = true);
virtual void Update();
virtual void Raise();
virtual void Lower();
// implementation from now on
// --------------------------
void OnInternalIdle();
wxIDirectFBWindowPtr GetDirectFBWindow() const { return m_dfbwin; }
// Returns true if some invalidated area of the TLW is currently being
// painted
bool IsPainting() const { return m_isPainting; }
protected:
// common part of all ctors
void Init();
virtual wxIDirectFBSurfacePtr ObtainDfbSurface() const;
// overridden wxWindow methods
virtual void DoGetPosition(int *x, int *y) const;
virtual void DoGetSize(int *width, int *height) const;
virtual void DoMoveWindow(int x, int y, int width, int height);
virtual void DoRefreshRect(const wxRect& rect);
// sets DirectFB keyboard focus to this toplevel window (note that DFB
// focus is different from wx: only shown TLWs can have it and not any
// wxWindows as in wx
void SetDfbFocus();
// overridden in wxTopLevelWindowDFB, there's no common handling for wxTLW
// and wxPopupWindow to be done here
virtual void HandleFocusEvent(const wxDFBWindowEvent& WXUNUSED(event_)) {}
private:
// do queued painting in idle time
void HandleQueuedPaintRequests();
// DirectFB events handling
static void HandleDFBWindowEvent(const wxDFBWindowEvent& event_);
protected:
// did we sent wxSizeEvent at least once?
bool m_sizeSet:1;
// window's opacity (0: transparent, 255: opaque)
wxByte m_opacity;
// interface to the underlying DirectFB window
wxIDirectFBWindowPtr m_dfbwin;
private:
// invalidated areas of the TLW that need repainting
wxDfbQueuedPaintRequests *m_toPaint;
// are we currently painting some area of this TLW?
bool m_isPainting;
friend class wxDFBEventsHandler; // for HandleDFBWindowEvent
friend class wxWindowDFB; // for SetDfbFocus
};
#endif // _WX_DFB_NONOWNEDWND_H_