// This file is generated by WOK (CPPExt). // Please do not edit this file; modify original file instead. // The copyright and license terms as defined for the original file apply to // this header file considered to be the "object code" form of the original source. #ifndef _WNT_Window_HeaderFile #define _WNT_Window_HeaderFile #ifndef _Standard_HeaderFile #include #endif #ifndef _Standard_DefineHandle_HeaderFile #include #endif #ifndef _Handle_WNT_Window_HeaderFile #include #endif #ifndef _Standard_Integer_HeaderFile #include #endif #ifndef _Handle_WNT_WClass_HeaderFile #include #endif #ifndef _Aspect_Handle_HeaderFile #include #endif #ifndef _Standard_Boolean_HeaderFile #include #endif #ifndef _WNT_WindowData_HeaderFile #include #endif #ifndef _WNT_TypeOfImage_HeaderFile #include #endif #ifndef _Handle_WNT_ImageManager_HeaderFile #include #endif #ifndef _Handle_WNT_Icon_HeaderFile #include #endif #ifndef _Standard_Address_HeaderFile #include #endif #ifndef _Aspect_Window_HeaderFile #include #endif #ifndef _Handle_WNT_GraphicDevice_HeaderFile #include #endif #ifndef _Standard_CString_HeaderFile #include #endif #ifndef _WNT_Dword_HeaderFile #include #endif #ifndef _Quantity_Parameter_HeaderFile #include #endif #ifndef _Quantity_NameOfColor_HeaderFile #include #endif #ifndef _Aspect_FillMethod_HeaderFile #include #endif #ifndef _Aspect_GradientFillMethod_HeaderFile #include #endif #ifndef _Aspect_TypeOfResize_HeaderFile #include #endif #ifndef _Standard_Real_HeaderFile #include #endif #ifndef _Handle_Aspect_PixMap_HeaderFile #include #endif #ifndef _Quantity_Ratio_HeaderFile #include #endif class WNT_WClass; class WNT_ImageManager; class WNT_Icon; class Aspect_WindowDefinitionError; class Aspect_WindowError; class WNT_WDriver; class WNT_IconBox; class WNT_PixMap; class WNT_GraphicDevice; class Aspect_Background; class Quantity_Color; class Aspect_GradientBackground; class Aspect_PixMap; //! This class defines Windows NT window
//! Warning: The position and size for the creation of the window
//! are defined in Device Screen Unit (DSU)
//! floating [0,1] space.
class WNT_Window : public Aspect_Window { public: //! Creates a Window defined by his Center and his Size
//! in DSU from the Parent Window. If is 0 then
//! creates a window without parent.
//! Creation of an WNT_Window automatically determines the
//! smaller dimension of the screen (usually the height)
//! and parametrises it as 1.0.
//! The smaller dimension of the window is limited to 1.0
//! We can give a value greater than 1.0 to the larger
//! dimension.
//! No matter how large the values passed in argument, the
//! window is automatically limited to the maximum size of
//! the screen.
//! The ratio of width to height of a conventional screen is
//! of the order of 1.3.
//! Trigger: Raises WindowDefinitionError if the Position out of the
//! Screen Space or the window creation failed.
Standard_EXPORT WNT_Window(const Handle(WNT_GraphicDevice)& aDevice,const Standard_CString aTitle,const Handle(WNT_WClass)& aClass,const WNT_Dword& aStyle = 0,const Quantity_Parameter Xc = 0.5,const Quantity_Parameter Yc = 0.5,const Quantity_Parameter aWidth = 0.5,const Quantity_Parameter aHeight = 0.5,const Quantity_NameOfColor aBackColor = Quantity_NOC_MATRAGRAY,const Aspect_Handle aParent = 0,const Aspect_Handle aMenu = 0,const Standard_Address aClientStruct = 0); //! Creates a Window defined by his position and size
//! in pixles from the Parent Window.
//! Trigger: Raises WindowDefinitionError if the Position out of the
//! Screen Space or the window creation failed.
Standard_EXPORT WNT_Window(const Handle(WNT_GraphicDevice)& theDevice,const Standard_CString theTitle,const Handle(WNT_WClass)& theClass,const WNT_Dword& theStyle,const Standard_Integer thePxLeft,const Standard_Integer thePxTop,const Standard_Integer thePxWidth,const Standard_Integer thePxHeight,const Quantity_NameOfColor theBackColor = Quantity_NOC_MATRAGRAY,const Aspect_Handle theParent = 0,const Aspect_Handle theMenu = 0,const Standard_Address theClientStruct = 0); //! Creates a Window based on the existing window handle.
//! This handle equals ( aPart1 << 16 ) + aPart2.
Standard_EXPORT WNT_Window(const Handle(WNT_GraphicDevice)& aDevice,const Aspect_Handle aHandle,const Quantity_NameOfColor aBackColor = Quantity_NOC_MATRAGRAY); //! Creates a Window based on the existing window .
Standard_EXPORT WNT_Window(const Handle(WNT_GraphicDevice)& aDevice,const Standard_Integer aPart1,const Standard_Integer aPart2,const Quantity_NameOfColor aBackColor = Quantity_NOC_MATRAGRAY); //! Destroies the Window and all resourses attached to it.
Standard_EXPORT virtual void Destroy() ; ~WNT_Window() { Destroy(); } //! Modifies the window background.
Standard_EXPORT virtual void SetBackground(const Aspect_Background& Background) ; //! Modifies the window background.
Standard_EXPORT virtual void SetBackground(const Quantity_NameOfColor BackColor) ; //! Modifies the window background.
Standard_EXPORT virtual void SetBackground(const Quantity_Color& color) ; //! Modifies the window background.
Standard_EXPORT void SetBackground(const Aspect_Handle aBackPixmap) ; //! Loads the window background from an image file
//! defined with a supported format XWD,GIF or BMP
//! and returns TRUE if the operation is successfull.
//! Category: Methods to modify the class definition
Standard_EXPORT Standard_Boolean SetBackground(const Standard_CString aName,const Aspect_FillMethod aMethod = Aspect_FM_CENTERED) ; //! Modifies the window gradient background.
//! Warning: the gradient background colours is ignored when the quality
//! of this window is TRANSPARENT.
Standard_EXPORT virtual void SetBackground(const Aspect_GradientBackground& Background) ; //! Modifies the window gradient background.
//! Warning: the gradient background colours are ignored when the quality
//! of this window is TRANSPARENT.
Standard_EXPORT void SetBackground(const Quantity_Color& aCol1,const Quantity_Color& aCol2,const Aspect_GradientFillMethod aMethod = Aspect_GFM_HOR) ; //! Sets cursor for ENTIRE WINDOW CLASS to which
//! the Window belongs.
Standard_EXPORT void SetCursor(const Aspect_Handle aCursor) const; //! Sets icon for window
Standard_EXPORT void SetIcon(const Aspect_Handle anIcon,const Standard_CString aName = 0) ; //! Sets name for window's icon
Standard_EXPORT void SetIconName(const Standard_CString aName) ; //! Activates/Deactivates the Double Buffering capability
//! for this window.
//! Warning: Double Buffering is always DISABLE by default.
//! Trigger: Raises if BackingStore () isn't allowed for this Window
Standard_EXPORT virtual void SetDoubleBuffer(const Standard_Boolean DBmode) ; //! Flushes all graphics to the screen and Swap the Double
//! buffer if Enable
//! Trigger: Raises if Something is WRONG at Drawing Time.
Standard_EXPORT virtual void Flush() const; //! Opens the window .
Standard_EXPORT virtual void Map() const; //! Opens a window according to .
//! This method is specific to Windows NT.
//! can be one of SW_xxx constants defined
//! in . See documentation.
Standard_EXPORT void Map(const Standard_Integer aMapMode) const; //! Closes the window .
Standard_EXPORT virtual void Unmap() const; //! Applies the resizing to the window .
Standard_EXPORT virtual Aspect_TypeOfResize DoResize() const; //! Apply the mapping change to the window
//! and returns TRUE if the window is mapped at screen.
Standard_EXPORT virtual Standard_Boolean DoMapping() const; //! Clears the Window in the Background color.
Standard_EXPORT virtual void Clear() const; //! Clears the Window Area defined by his center and PIXEL
//! size in the Background color
//! Trigger: Raises if Window is not defined properly
Standard_EXPORT virtual void ClearArea(const Standard_Integer Xc,const Standard_Integer Yc,const Standard_Integer Width,const Standard_Integer Height) const; //! Restores The Window from the BackingStored Window
//! See BackingStore () method.
Standard_EXPORT virtual void Restore() const; //! Restores The Window Area defined by his center
//! and PIXEL size from the BackingStored Window
//! See BackingStore () method.
Standard_EXPORT virtual void RestoreArea(const Standard_Integer Xc,const Standard_Integer Yc,const Standard_Integer Width,const Standard_Integer Height) const; //! Dumps the Window to an XWD,GIF or BMP filei with
//! an optional gamma correction value according to the graphic system.
//! and returns TRUE if the dump occurs normaly.
//! Trigger: Raises if Window is not defined properly
Standard_EXPORT virtual Standard_Boolean Dump(const Standard_CString aFilename,const Standard_Real aGammaValue = 1.0) const; //! Dumps the Window Area defined by his center and PIXEL size
//! to an image file with an optional gamma correction value
//! and returns TRUE if the dump occurs normaly.
//! Trigger: Raises if Window is not defined properly
//! or the area is out of the Window.
Standard_EXPORT virtual Standard_Boolean DumpArea(const Standard_CString aFilename,const Standard_Integer Xc,const Standard_Integer Yc,const Standard_Integer Width,const Standard_Integer Height,const Standard_Real aGammaValue = 1.0) const; //! dump the full contents of the window to a pixmap.
Standard_EXPORT virtual Handle_Aspect_PixMap ToPixMap() const; //! Loads the XWD file to this Window.
//! Returns TRUE if the loading occurs normaly.
//! Warning: Note that the Window is enlarged automatically
//! when the image size is too large for this window.
//! Trigger: Raises if Window is not defined properly
Standard_EXPORT virtual Standard_Boolean Load(const Standard_CString aFilename) const; //! Loads the XWD file to Window Area defined by his center
//! and PIXEL size.
//! Returns TRUE if the loading occurs normaly.
//! Warning: Note that the Image is zoomed automatically
//! when the image size is too large for this window area.
//! Trigger: Raises if Window is not defined properly
//! or the area is out of the Window.
Standard_EXPORT virtual Standard_Boolean LoadArea(const Standard_CString aFilename,const Standard_Integer Xc,const Standard_Integer Yc,const Standard_Integer Width,const Standard_Integer Height) const; //! Sets format of the image file created by Dump or
//! DumpArea methods.
Standard_EXPORT void SetOutputFormat(const WNT_TypeOfImage aFormat) ; //! Changes variables due to window position.
Standard_EXPORT void SetPos(const Standard_Integer X,const Standard_Integer Y,const Standard_Integer X1,const Standard_Integer Y1) ; //! Sets user defined flags in the extra window data area.
//! Supported flags WDF_* are listed in InterfaceGraphic_WNT.hxx
//! In particular, the window backround can be turned off using this method.
Standard_EXPORT void SetFlags(const Standard_Integer aFlags) ; //! Reset specified flags in the extra window data area.
//! Supported flags WDF_* are listed in InterfaceGraphic_WNT.hxx
//! In particular, the window backround can be turned on using this method.
Standard_EXPORT void ResetFlags(const Standard_Integer aFlags) ; //! Returns the BackingStore capability for this Window.
//! If Answer is True Exposure can be recovered by
//! Restore RestoreArea methods.
//! If Answer is False, Application must Redraw the
//! exposed area.
Standard_EXPORT virtual Standard_Boolean BackingStore() const; //! Returns the DoubleBuffer state.
virtual Standard_Boolean DoubleBuffer() const; //! Returns True if the window is opened
//! and False if the window is closed.
Standard_EXPORT virtual Standard_Boolean IsMapped() const; //! Returns The Window RATIO equal to the physical
//! WIDTH/HEIGHT dimensions.
Standard_EXPORT virtual Quantity_Ratio Ratio() const; //! Returns The Window POSITION in DSU
Standard_EXPORT virtual void Position(Quantity_Parameter& X1,Quantity_Parameter& Y1,Quantity_Parameter& X2,Quantity_Parameter& Y2) const; //! Returns The Window POSITION in PIXEL
Standard_EXPORT virtual void Position(Standard_Integer& X1,Standard_Integer& Y1,Standard_Integer& X2,Standard_Integer& Y2) const; //! Returns The Window SIZE in DSU
Standard_EXPORT virtual void Size(Quantity_Parameter& Width,Quantity_Parameter& Height) const; //! Returns The Window SIZE in PIXEL
Standard_EXPORT virtual void Size(Standard_Integer& Width,Standard_Integer& Height) const; //! Returns The Window SIZE in MM
Standard_EXPORT virtual void MMSize(Standard_Real& Width,Standard_Real& Height) const; //! Returns the DSU value depending of the PIXEL value.
Standard_EXPORT virtual Quantity_Parameter Convert(const Standard_Integer PV) const; //! Returns the PIXEL value depending of the DSU value.
Standard_EXPORT virtual Standard_Integer Convert(const Quantity_Parameter DV) const; //! Returns the DSU position depending of the PIXEL position.
Standard_EXPORT virtual void Convert(const Standard_Integer PX,const Standard_Integer PY,Quantity_Parameter& DX,Quantity_Parameter& DY) const; //! Returns the PIXEL position depending of the DSU position.
Standard_EXPORT virtual void Convert(const Quantity_Parameter DX,const Quantity_Parameter DY,Standard_Integer& PX,Standard_Integer& PY) const; //! Returns the Windows NT handle of the created window .
Aspect_Handle HWindow() const; //! Returns the Windows NT handle parent of the created window .
Aspect_Handle HParentWindow() const; //! Returns the Windows NT double buffer pixmap handle
//! of the created window .
//! If BackingStore () is permitted.
Aspect_Handle HPixmap() const; //! Returns address of the window procedure.
Standard_Address WndProc() const; //! Returns ImageManager of the Window.
Handle_WNT_ImageManager ImageManager() const; friend class WNT_WDriver; friend class WNT_IconBox; friend class WNT_PixMap; DEFINE_STANDARD_RTTI(WNT_Window) protected: Standard_Integer aXLeft; Standard_Integer aYTop; Standard_Integer aXRight; Standard_Integer aYBottom; Handle_WNT_WClass myWClass; Aspect_Handle myHWindow; Aspect_Handle myHParentWindow; Aspect_Handle myHPixmap; Standard_Boolean myDoubleBuffer; WNT_WindowData myExtraData; WNT_TypeOfImage myFormat; Handle_WNT_ImageManager myImages; Handle_WNT_Icon myIcon; Standard_Address myWndProc; Standard_Address myUsrData; private: //! private method
Standard_EXPORT void doCreate(const Handle(WNT_GraphicDevice)& aDevice,const Aspect_Handle aHandle,const Quantity_NameOfColor aBackColor = Quantity_NOC_MATRAGRAY) ; }; #include // other Inline functions and methods (like "C++: function call" methods) #endif