// 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_GraphicDevice_HeaderFile #define _WNT_GraphicDevice_HeaderFile #ifndef _Standard_HeaderFile #include #endif #ifndef _Standard_DefineHandle_HeaderFile #include #endif #ifndef _Handle_WNT_GraphicDevice_HeaderFile #include #endif #ifndef _Quantity_Length_HeaderFile #include #endif #ifndef _Standard_Integer_HeaderFile #include #endif #ifndef _Aspect_Handle_HeaderFile #include #endif #ifndef _Standard_Address_HeaderFile #include #endif #ifndef _WNT_ColorRef_HeaderFile #include #endif #ifndef _Standard_Boolean_HeaderFile #include #endif #ifndef _Aspect_GraphicDevice_HeaderFile #include #endif #ifndef _WNT_Long_HeaderFile #include #endif #ifndef _Handle_Aspect_ColorMap_HeaderFile #include #endif #ifndef _Handle_WNT_HColorTable_HeaderFile #include #endif #ifndef _Handle_Aspect_GraphicDriver_HeaderFile #include #endif class Aspect_GraphicDeviceDefinitionError; class Aspect_BadAccess; class WNT_Window; class Quantity_Color; class Aspect_ColorMap; class WNT_HColorTable; class Aspect_GraphicDriver; //! This class defines Windows NT display device.
//! A Graphic Device defines color management. Windows can run in three
//! different color modes depending of the installed graphic board:
//! - Low color resolution which allows us to use 16 predefined pure
//! colors for drawing lines and unlimited number of dithered colors
//! for window's background, solid filled areas etc. Here Graphic Device
//! will approximate requested colors by existing ones for line colors
//! ( really this approximation is doing by Windows ). A dithering
//! technique will be used for window's backgrounds, solid fills etc.
//! ( this is doing by WIndows also ). A dithering techique will be use
//! for solid fill.
//! - Medium color resolution which requires a Windows palette manager.
//! This mode takes after X window system's PseudoColor Visual. The
//! application can create a LOGICAL PALETTE to represent 20 reserved
//! by Windows colors and 236 programmable ones. It's possible to reserve
//! odd entries in the palette for highlighting purposes ( but real
//! technique is not the same as in X window system - see Windows manual ).
//! It's possible to create several logical palettes. To do it create
//! other GraphicDevice but in this case color "flicking" is possible.
//! - High color resolution. Here 65 536 or 16 777 216 colors are available.
//! Any color we like will be exactly displayed on the screen, but
//! highlighting technique is not available. This mode often called
//! TrueColor but it's not the same as X window TrueColor.
//! A Graphic Device also defines physical dimensions of the screen.
class WNT_GraphicDevice : public Aspect_GraphicDevice { public: //! Creates a GraphicDevice and logical palette.
//! Builds an OpenGL colorcube on that palette depending
//! of the aColorCube flag and hardware.
//! Warning: Raises if createion of the logical palette failed.
Standard_EXPORT WNT_GraphicDevice(const Standard_Boolean aColorCube = Standard_False,const Aspect_Handle aDevContext = 0); //! same as previous one (to provide access form CCL)
Standard_EXPORT WNT_GraphicDevice(const Standard_Boolean aColorCube,const Standard_Integer aDevContext); //! Destroies all ressources attached to the GraphicDevice.
Standard_EXPORT virtual void Destroy() ; ~WNT_GraphicDevice() { Destroy(); } //! Returns the color value in form specific to Windows NT.
//! Sets the color values in the logical palette if the
//! hardware supports it. If in this case there are not
//! free cell in the logical palette then this method will
//! search for nearest color in the palette.
//! If is True then sets a highlight color.
Standard_EXPORT WNT_ColorRef SetColor(const Quantity_Color& aColor,const Standard_Boolean aHighlight = Standard_False) ; //! See above
Standard_EXPORT virtual WNT_ColorRef SetColor(const Standard_Integer aRed,const Standard_Integer aGreen,const Standard_Integer aBlue,const Standard_Boolean aHighlight = Standard_False) ; //! Color allocation for images.
Standard_EXPORT virtual void SetColor(const WNT_Long& aPixel) ; //! Returns the color value in form specific to WIndows NT
//! in the . See SetColor method.
//! Warning: The dimensions and index ranges of the and
//! must be the same;
Standard_EXPORT void MapColors(const Handle(Aspect_ColorMap)& aColorMap,Handle(WNT_HColorTable)& aColorTable) ; //! Returns logical palette handle attached to the
//! GraphicDevice.
Aspect_Handle HPalette() const; //! Returns the Display size in PIXEL
void DisplaySize(Standard_Integer& aWidth,Standard_Integer& aHeight) const; //! Returns the Display size in working units units
void DisplaySize(Quantity_Length& aWidth,Quantity_Length& aHeight) const; //! Returns True if hardware is palette-compatible.
Standard_Boolean IsPaletteDevice() const; //! Returns number of available colors.
Standard_Integer NumColors() const; //! Returns highlight color.
WNT_ColorRef HighlightColor() const; //! Dummy method
Standard_EXPORT virtual Handle_Aspect_GraphicDriver GraphicDriver() const; friend class WNT_Window; DEFINE_STANDARD_RTTI(WNT_GraphicDevice) protected: Standard_EXPORT void Init(const Standard_Boolean aColorCube,const Aspect_Handle aDevContext) ; Quantity_Length myMWidth; Quantity_Length myMHeight; Standard_Integer myWidth; Standard_Integer myHeight; Standard_Integer myNumColors; Standard_Integer myFreeIndex; Aspect_Handle myPalette; Standard_Address myLogPal; WNT_ColorRef myHighlightColor; Standard_Boolean myOpenGLPalette; private: }; #include // other Inline functions and methods (like "C++: function call" methods) #endif