OCC Main Page | Visualization | Toolkits | Packages | Class Hierarchy | Data Structures | File List | Data Fields | Globals

Visualization
TKV2d
V2d


V2d_Viewer Class Reference

This class defines a 2D viewer which manages one
2D view at least and the attributes of this view (ex: ColorMap, etc.).
.

#include <V2d_Viewer.hxx>

Inheritance diagram for V2d_Viewer:

Inheritance graph
[legend]

Public Member Functions

Standard_EXPORT V2d_Viewer (const Handle(Aspect_GraphicDevice)&aGraphicDevice, const Standard_ExtString aName, const Standard_CString aDomain="")
 Constructs a viewer object defined by the graphic
device aGraphicDevice that determines the screen
attributes, a default view and the name aName.
.
Standard_EXPORT V2d_Viewer (const Handle(Aspect_GraphicDevice)&aGraphicDevice, const Handle(Graphic2d_View)&aView, const Standard_ExtString aName, const Standard_CString aDomain="")
 Constructs a viewer object defined by the graphic
device aGraphicDevice that determines the screen
attributes, the first view aView and the name aName.
.
Standard_EXPORT void AddView (const Handle(V2d_View)&aView)
 Adds another 2D view to the viewer.
.
Standard_EXPORT void RemoveView (const Handle(V2d_View)&aView)
 Removes the view aView from the viewer.
.
Standard_EXPORT void Update ()
 Updates the display of all views of the viewer.
.
Standard_EXPORT void UpdateNew ()
 Updates the most recent changes in all the active views of the viewer.
.
Standard_EXPORT void SetColorMap (const Handle(Aspect_ColorMap)&aColorMap)
 Replaces the default color map of the viewer with the
new color map aColorMap.
.
Standard_EXPORT void SetTypeMap (const Handle(Aspect_TypeMap)&aTypeMap)
 Replaces the default type map of the viewer with the
new type map aTypeMap.
.
Standard_EXPORT void SetWidthMap (const Handle(Aspect_WidthMap)&aWidthMap)
 Replaces the default width map of the viewer with the
new width map aWidthMap.
.
Standard_EXPORT void SetFontMap (const Handle(Aspect_FontMap)&aFontMap, const Standard_Boolean useMFT=Standard_True)
 Replaces the default font map of the viewer with the
new font map aFontMap. When useMFT is equal to
Standard_True, MDTV fonts are used instead of system fonts.
.
Standard_EXPORT void SetMarkMap (const Handle(Aspect_MarkMap)&aMarkMap)
 Replaces the default mark map of the viewer with the
new mark map aMarkMap.
.
Standard_EXPORT Handle_Aspect_ColorMap ColorMap () const
 Returns the active color map of the viewer.
.
Standard_EXPORT Handle_Aspect_TypeMap TypeMap () const
 Returns the active type map of the viewer.
.
Standard_EXPORT Handle_Aspect_WidthMap WidthMap () const
 Returns the active width map of the viewer.
.
Standard_EXPORT Handle_Aspect_FontMap FontMap () const
 Returns the active font map for the viewer.
.
Standard_EXPORT Handle_Aspect_MarkMap MarkMap () const
 Returns the active mark map of the viewer.
.
Standard_EXPORT Standard_Boolean UseMFT () const
 Returns True when the viewer uses MFT fonts
instead of system fonts.
.
Standard_EXPORT Handle_Graphic2d_View View () const
 Returns the first view of the viewer.
.
Standard_EXPORT Standard_Integer InitializeColor (const Quantity_NameOfColor aColor)
 Creates a color in the color map of the driver if
the color does not yes exist.
Returns the index of the color in the modified color map.
.
Standard_EXPORT void InitActiveViews ()
 initializes an iteration on the active views.

Standard_EXPORT Standard_Boolean MoreActiveViews () const
 returns true if there are more active view(s) to return.

Standard_EXPORT void NextActiveViews ()
 Go to the next active view
(if there is not, ActiveView will raise an exception)
.
Standard_EXPORT Handle_V2d_View ActiveView () const
 Returns the current view from the activated views.
.
Standard_EXPORT Standard_Boolean IsEmpty () const
 Returns True when no more secondary views exist in the viewer.
.
Standard_EXPORT Aspect_GridType GridType () const
 returns the current grid type.

Standard_EXPORT void Hit (const Quantity_Length X, const Quantity_Length Y, Quantity_Length &gx, Quantity_Length &gy) const
 returns the point (gx,gy) according to the grid.

Standard_EXPORT void ActivateGrid (const Aspect_GridType aGridType, const Aspect_GridDrawMode aGridDrawMode)
Standard_EXPORT void DeactivateGrid ()
Standard_EXPORT Standard_Boolean IsActive () const
 Returns True when a grid is active in the viewer.
.
Standard_EXPORT void RectangularGridValues (Quantity_Length &XOrigin, Quantity_Length &YOrigin, Quantity_Length &XStep, Quantity_Length &YStep, Quantity_PlaneAngle &RotationAngle) const
 Returns the parameters of the current rectangular grid.
.
Standard_EXPORT void SetRectangularGridValues (const Quantity_Length XOrigin, const Quantity_Length YOrigin, const Quantity_Length XStep, const Quantity_Length YStep, const Quantity_PlaneAngle RotationAngle)
 Sets the rectangular grid:
- XOrigin, YOrigin define the point of origin of the grid,
- XStep defines the interval between two vertical lines,
- YStep defines the interval between two horizontal lines,
- RotationAngle defines the rotation angle of the grid.
.
Standard_EXPORT void CircularGridValues (Quantity_Length &XOrigin, Quantity_Length &YOrigin, Quantity_Length &RadiusStep, Standard_Integer &DivisionNumber, Quantity_PlaneAngle &RotationAngle) const
 Returns the parameters of the current circular grid.
.
Standard_EXPORT void SetCircularGridValues (const Quantity_Length XOrigin, const Quantity_Length YOrigin, const Quantity_Length RadiusStep, const Standard_Integer DivisionNumber, const Quantity_PlaneAngle RotationAngle)
 Sets the circular grid:
- XOrigin, YOrigin specify the origin of the grid,
- RadiusStep defines the interval between two circles,
- DivisionNumber determines the section number of half a circle,
- RotationAngle defines the rotation angle of the grid.
.
Standard_EXPORT void SetGridColor (const Quantity_Color &color1, const Quantity_Color &color2)
Standard_EXPORT const Handle (Standard_Type)&DynamicType() const

Private Member Functions

Standard_EXPORT Handle_Aspect_Grid Grid () const
Standard_EXPORT Standard_Integer HitPointMarkerIndex () const
Standard_EXPORT Standard_Integer HitPointColor () const
Standard_EXPORT Standard_Integer CoordinatesColor () const
Standard_EXPORT void Init ()

Private Attributes

Handle_Aspect_ColorMap myColorMap
Handle_Aspect_TypeMap myTypeMap
Handle_Aspect_WidthMap myWidthMap
Handle_Aspect_FontMap myFontMap
Handle_Aspect_MarkMap myMarkMap
Handle_Graphic2d_View myGraphicView
TColStd_ListOfTransient myViews
TColStd_ListIteratorOfListOfTransient myViewsIterator
Handle_V2d_RectangularGrid myRGrid
Handle_V2d_CircularGrid myCGrid
Standard_Integer myHitPointMarkerIndex
Standard_Integer myHitPointColorIndex
Standard_Integer myCoordinatesColorIndex
Aspect_GridType myGridType
Standard_Boolean myUseMFT

Constructor & Destructor Documentation

Standard_EXPORT V2d_Viewer::V2d_Viewer const Handle(Aspect_GraphicDevice)&  aGraphicDevice,
const Standard_ExtString  aName,
const Standard_CString  aDomain = ""
 

Standard_EXPORT V2d_Viewer::V2d_Viewer const Handle(Aspect_GraphicDevice)&  aGraphicDevice,
const Handle(Graphic2d_View)&  aView,
const Standard_ExtString  aName,
const Standard_CString  aDomain = ""
 


Member Function Documentation

Standard_EXPORT void V2d_Viewer::ActivateGrid const Aspect_GridType  aGridType,
const Aspect_GridDrawMode  aGridDrawMode
 

Standard_EXPORT Handle_V2d_View V2d_Viewer::ActiveView  )  const
 

Standard_EXPORT void V2d_Viewer::AddView const Handle(V2d_View)&  aView  ) 
 

Standard_EXPORT void V2d_Viewer::CircularGridValues Quantity_Length &  XOrigin,
Quantity_Length &  YOrigin,
Quantity_Length &  RadiusStep,
Standard_Integer &  DivisionNumber,
Quantity_PlaneAngle &  RotationAngle
const
 

Standard_EXPORT Handle_Aspect_ColorMap V2d_Viewer::ColorMap  )  const
 

Standard_EXPORT Standard_Integer V2d_Viewer::CoordinatesColor  )  const [private]
 

Standard_EXPORT void V2d_Viewer::DeactivateGrid  ) 
 

Standard_EXPORT Handle_Aspect_FontMap V2d_Viewer::FontMap  )  const
 

Standard_EXPORT Handle_Aspect_Grid V2d_Viewer::Grid  )  const [private]
 

Standard_EXPORT Aspect_GridType V2d_Viewer::GridType  )  const
 

Standard_EXPORT const V2d_Viewer::Handle Standard_Type   )  const
 

Reimplemented from Viewer_Viewer.

Standard_EXPORT void V2d_Viewer::Hit const Quantity_Length  X,
const Quantity_Length  Y,
Quantity_Length &  gx,
Quantity_Length &  gy
const
 

Standard_EXPORT Standard_Integer V2d_Viewer::HitPointColor  )  const [private]
 

Standard_EXPORT Standard_Integer V2d_Viewer::HitPointMarkerIndex  )  const [private]
 

Standard_EXPORT void V2d_Viewer::Init  )  [private]
 

Standard_EXPORT void V2d_Viewer::InitActiveViews  ) 
 

Standard_EXPORT Standard_Integer V2d_Viewer::InitializeColor const Quantity_NameOfColor  aColor  ) 
 

Standard_EXPORT Standard_Boolean V2d_Viewer::IsActive  )  const
 

Standard_EXPORT Standard_Boolean V2d_Viewer::IsEmpty  )  const
 

Standard_EXPORT Handle_Aspect_MarkMap V2d_Viewer::MarkMap  )  const
 

Standard_EXPORT Standard_Boolean V2d_Viewer::MoreActiveViews  )  const
 

Standard_EXPORT void V2d_Viewer::NextActiveViews  ) 
 

Standard_EXPORT void V2d_Viewer::RectangularGridValues Quantity_Length &  XOrigin,
Quantity_Length &  YOrigin,
Quantity_Length &  XStep,
Quantity_Length &  YStep,
Quantity_PlaneAngle &  RotationAngle
const
 

Standard_EXPORT void V2d_Viewer::RemoveView const Handle(V2d_View)&  aView  ) 
 

Standard_EXPORT void V2d_Viewer::SetCircularGridValues const Quantity_Length  XOrigin,
const Quantity_Length  YOrigin,
const Quantity_Length  RadiusStep,
const Standard_Integer  DivisionNumber,
const Quantity_PlaneAngle  RotationAngle
 

Standard_EXPORT void V2d_Viewer::SetColorMap const Handle(Aspect_ColorMap)&  aColorMap  ) 
 

Standard_EXPORT void V2d_Viewer::SetFontMap const Handle(Aspect_FontMap)&  aFontMap,
const Standard_Boolean  useMFT = Standard_True
 

Standard_EXPORT void V2d_Viewer::SetGridColor const Quantity_Color &  color1,
const Quantity_Color &  color2
 

Standard_EXPORT void V2d_Viewer::SetMarkMap const Handle(Aspect_MarkMap)&  aMarkMap  ) 
 

Standard_EXPORT void V2d_Viewer::SetRectangularGridValues const Quantity_Length  XOrigin,
const Quantity_Length  YOrigin,
const Quantity_Length  XStep,
const Quantity_Length  YStep,
const Quantity_PlaneAngle  RotationAngle
 

Standard_EXPORT void V2d_Viewer::SetTypeMap const Handle(Aspect_TypeMap)&  aTypeMap  ) 
 

Standard_EXPORT void V2d_Viewer::SetWidthMap const Handle(Aspect_WidthMap)&  aWidthMap  ) 
 

Standard_EXPORT Handle_Aspect_TypeMap V2d_Viewer::TypeMap  )  const
 

Standard_EXPORT void V2d_Viewer::Update  )  [virtual]
 

Implements Viewer_Viewer.

Standard_EXPORT void V2d_Viewer::UpdateNew  ) 
 

Standard_EXPORT Standard_Boolean V2d_Viewer::UseMFT  )  const
 

Standard_EXPORT Handle_Graphic2d_View V2d_Viewer::View  )  const
 

Standard_EXPORT Handle_Aspect_WidthMap V2d_Viewer::WidthMap  )  const
 


Field Documentation

Handle_V2d_CircularGrid V2d_Viewer::myCGrid [private]
 

Handle_Aspect_ColorMap V2d_Viewer::myColorMap [private]
 

Standard_Integer V2d_Viewer::myCoordinatesColorIndex [private]
 

Handle_Aspect_FontMap V2d_Viewer::myFontMap [private]
 

Handle_Graphic2d_View V2d_Viewer::myGraphicView [private]
 

Aspect_GridType V2d_Viewer::myGridType [private]
 

Standard_Integer V2d_Viewer::myHitPointColorIndex [private]
 

Standard_Integer V2d_Viewer::myHitPointMarkerIndex [private]
 

Handle_Aspect_MarkMap V2d_Viewer::myMarkMap [private]
 

Handle_V2d_RectangularGrid V2d_Viewer::myRGrid [private]
 

Handle_Aspect_TypeMap V2d_Viewer::myTypeMap [private]
 

Standard_Boolean V2d_Viewer::myUseMFT [private]
 

TColStd_ListOfTransient V2d_Viewer::myViews [private]
 

TColStd_ListIteratorOfListOfTransient V2d_Viewer::myViewsIterator [private]
 

Handle_Aspect_WidthMap V2d_Viewer::myWidthMap [private]
 


The documentation for this class was generated from the following file:
Generated on Mon Aug 25 13:56:24 2008 for OpenCASCADE by  doxygen 1.4.1