mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-14 13:30:48 +03:00
0030619: Draw Harness, ViewerTest - add continuous rendering option to vrepaint command
Aspect_Window::InvalidateContent() - added new virtual method for invalidating window content using platform-specific API. TKDraw, tkLoop() on Window platform has been changed so that to prevent continuous input window events blocking terminal input (e.g. in case if processing events is not fast enough or if another continuously sends new events). TKViewerTest, on X11 platform has been fixed a message processing so that to avoid messages being not processed. Added aggregation of Exposer and ConfigureNotify events. Fixed aggregation MotionNotify events.
This commit is contained in:
@@ -30,6 +30,8 @@
|
||||
#include <Aspect_TypeOfResize.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
#include <Aspect_Drawable.hxx>
|
||||
|
||||
class Aspect_DisplayConnection;
|
||||
class Aspect_WindowDefinitionError;
|
||||
class Aspect_WindowError;
|
||||
class Aspect_Background;
|
||||
@@ -43,70 +45,80 @@ class Aspect_Window : public Standard_Transient
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
|
||||
//! Modifies the window background.
|
||||
Standard_EXPORT void SetBackground (const Aspect_Background& ABack);
|
||||
|
||||
//! Modifies the window background.
|
||||
Standard_EXPORT void SetBackground (const Quantity_Color& color);
|
||||
|
||||
|
||||
//! Modifies the window gradient background.
|
||||
Standard_EXPORT void SetBackground (const Aspect_GradientBackground& ABackground);
|
||||
|
||||
|
||||
//! Modifies the window gradient background.
|
||||
Standard_EXPORT void SetBackground (const Quantity_Color& theFirstColor, const Quantity_Color& theSecondColor, const Aspect_GradientFillMethod theFillMethod);
|
||||
|
||||
|
||||
//! Opens the window <me>.
|
||||
Standard_EXPORT virtual void Map() const = 0;
|
||||
|
||||
|
||||
//! Closes the window <me>.
|
||||
Standard_EXPORT virtual void Unmap() const = 0;
|
||||
|
||||
|
||||
//! Apply the resizing to the window <me>.
|
||||
Standard_EXPORT virtual Aspect_TypeOfResize DoResize() const = 0;
|
||||
|
||||
|
||||
//! Apply the mapping change to the window <me>.
|
||||
//! and returns TRUE if the window is mapped at screen.
|
||||
Standard_EXPORT virtual Standard_Boolean DoMapping() const = 0;
|
||||
|
||||
|
||||
//! Returns the window background.
|
||||
Standard_EXPORT Aspect_Background Background() const;
|
||||
|
||||
|
||||
//! Returns the current image background fill mode.
|
||||
Standard_EXPORT Aspect_FillMethod BackgroundFillMethod() const;
|
||||
|
||||
|
||||
//! Returns the window gradient background.
|
||||
Standard_EXPORT Aspect_GradientBackground GradientBackground() const;
|
||||
|
||||
|
||||
//! Returns True if the window <me> is opened
|
||||
//! and False if the window is closed.
|
||||
Standard_EXPORT virtual Standard_Boolean IsMapped() const = 0;
|
||||
|
||||
|
||||
//! Returns True if the window <me> is virtual
|
||||
Standard_EXPORT Standard_Boolean IsVirtual() const;
|
||||
|
||||
|
||||
//! Setup the virtual state
|
||||
Standard_EXPORT void SetVirtual (const Standard_Boolean theVirtual);
|
||||
|
||||
|
||||
//! Returns The Window RATIO equal to the physical
|
||||
//! WIDTH/HEIGHT dimensions
|
||||
Standard_EXPORT virtual Standard_Real Ratio() const = 0;
|
||||
|
||||
|
||||
//! Returns The Window POSITION in PIXEL
|
||||
Standard_EXPORT virtual void Position (Standard_Integer& X1, Standard_Integer& Y1, Standard_Integer& X2, Standard_Integer& Y2) const = 0;
|
||||
|
||||
|
||||
//! Returns The Window SIZE in PIXEL
|
||||
Standard_EXPORT virtual void Size (Standard_Integer& Width, Standard_Integer& Height) const = 0;
|
||||
|
||||
|
||||
//! Returns native Window handle (HWND on Windows, Window with Xlib, and so on)
|
||||
Standard_EXPORT virtual Aspect_Drawable NativeHandle() const = 0;
|
||||
|
||||
|
||||
//! Returns parent of native Window handle (HWND on Windows, Window with Xlib, and so on)
|
||||
Standard_EXPORT virtual Aspect_Drawable NativeParentHandle() const = 0;
|
||||
|
||||
//! Returns native Window FB config (GLXFBConfig on Xlib)
|
||||
Standard_EXPORT virtual Aspect_FBConfig NativeFBConfig() const = 0;
|
||||
|
||||
//! Invalidate entire window content.
|
||||
//!
|
||||
//! Implementation is expected to allow calling this method from non-GUI thread,
|
||||
//! e.g. by queuing exposure event into window message queue or in other thread-safe manner.
|
||||
//!
|
||||
//! Optional display argument should be passed when called from non-GUI thread
|
||||
//! on platforms implementing thread-unsafe connections to display.
|
||||
//! NULL can be passed instead otherwise.
|
||||
virtual void InvalidateContent (const Handle(Aspect_DisplayConnection)& theDisp) { (void )theDisp; }
|
||||
|
||||
DEFINE_STANDARD_RTTIEXT(Aspect_Window,Standard_Transient)
|
||||
|
||||
protected:
|
||||
|
Reference in New Issue
Block a user