1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-29 14:00:49 +03:00

0024002: Overall code and build procedure refactoring -- automatic

Automatic upgrade of OCCT code by command "occt_upgrade . -nocdl":
- WOK-generated header files from inc and sources from drv are moved to src
- CDL files removed
- All packages are converted to nocdlpack
This commit is contained in:
abv
2015-07-12 07:42:38 +03:00
parent 543a996496
commit 42cf5bc1ca
15354 changed files with 623957 additions and 509844 deletions

View File

@@ -1,529 +0,0 @@
-- Created by: NW,JPB,CAL
-- Copyright (c) 1991-1999 Matra Datavision
-- Copyright (c) 1999-2014 OPEN CASCADE SAS
--
-- This file is part of Open CASCADE Technology software library.
--
-- This library is free software; you can redistribute it and/or modify it under
-- the terms of the GNU Lesser General Public License version 2.1 as published
-- by the Free Software Foundation, with special exception defined in the file
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-- distribution for complete text of the license and disclaimer of any warranty.
--
-- Alternatively, this file may be used under the terms of Open CASCADE
-- commercial license or contractual agreement.
package Aspect
---Version:
---Purpose: This package contains the group of graphic elements common
-- to different types of visualisers. It allows the description
-- of a screen background, a window, an edge, and groups of
-- graphic attributes that can be used in describing 2D
-- and 3D objects.
---Keywords: Window, Aspect, FillArea, Line, Marker, Edge
-- Highlight, Hatch, Background, GradientBackground, Color map,
-- Type map, Width map, Font map
---Warning:
---References:
uses
TCollection,
TColStd,
TShort,
Quantity,
TColQuantity,
Resource,
MMgt
is
---------------------------
-- Category: Imported types
---------------------------
imported FStream;
-- waiting for RBA creating this class in Standard ...
imported IFStream;
-- G002A study
imported CLayer2d;
---Category: Imported types
primitive Handle;
primitive Drawable;
primitive Display;
primitive RenderingContext;
imported GraphicCallbackProc;
-- 22-03-04 OCC4895 SAN High-level interface for controlling polygon offsets
imported PolygonOffsetMode;
-----------------------
-- Category: Exceptions
-----------------------
exception AspectLineDefinitionError inherits OutOfRange;
---Category: Exceptions
exception AspectFillAreaDefinitionError inherits OutOfRange;
---Category: Exceptions
exception AspectMarkerDefinitionError inherits OutOfRange;
---Category: Exceptions
exception BadAccess inherits DomainError;
---Category: Exceptions
exception IdentDefinitionError inherits OutOfRange;
---Category: Exceptions
exception WindowDefinitionError inherits OutOfRange;
---Category: The exceptions
exception WindowError inherits OutOfRange;
---Category: The exceptions
exception DriverDefinitionError inherits OutOfRange;
---Category: The exceptions
exception GraphicDeviceDefinitionError inherits OutOfRange;
---Category: The exceptions
exception DisplayConnectionDefinitionError inherits OutOfRange;
---Category: The exceptions
---------------------------
-- Category: Classes Aspect
---------------------------
deferred class AspectLine;
---Category: Classes Aspect
deferred class AspectMarker;
---Category: Classes Aspect
deferred class AspectFillArea;
---Category: Classes Aspect
--------------------
-- Category: Classes
--------------------
class Background;
---Category: Classes
class GradientBackground;
---Category: Classes
class GenId;
---Category: Classes
deferred class Window;
---Category: Classes
deferred class Grid;
class RectangularGrid;
class CircularGrid;
deferred class ColorScale;
imported transient class DisplayConnection;
-------------------------
-- Category: Enumerations
-------------------------
enumeration HatchStyle is HS_HORIZONTAL,
HS_HORIZONTAL_WIDE,
HS_VERTICAL,
HS_VERTICAL_WIDE,
HS_DIAGONAL_45,
HS_DIAGONAL_45_WIDE,
HS_DIAGONAL_135,
HS_DIAGONAL_135_WIDE,
HS_GRID,
HS_GRID_WIDE,
HS_GRID_DIAGONAL,
HS_GRID_DIAGONAL_WIDE
end HatchStyle;
---Purpose: Definition of all available hatch styles.
--
-- HS_HORIZONTAL
-- HS_HORIZONTAL_WIDE
-- HS_VERTICAL
-- HS_VERTICAL_WIDE
-- HS_DIAGONAL_45
-- HS_DIAGONAL_45_WIDE
-- HS_DIAGONAL_135
-- HS_DIAGONAL_135_WIDE
-- HS_GRID
-- HS_GRID_WIDE
-- HS_GRID_DIAGONAL
-- HS_GRID_DIAGONAL_WIDE
--
---Category: Enumerations
enumeration InteriorStyle is IS_EMPTY,
IS_HOLLOW,
IS_HATCH,
IS_SOLID,
IS_HIDDENLINE,
IS_POINT
end InteriorStyle;
---Purpose: Definition of interior types for primitive
-- faces.
--
-- IS_EMPTY no interior.
-- IS_HOLLOW display the boundaries of the surface.
-- IS_HATCH display hatched with a hatch style.
-- IS_SOLID display the interior entirely filled.
-- IS_HIDDENLINE display in hidden lines removed.
-- IS_POINT display only vertices.
--
---Category: Enumerations
enumeration TypeOfConstraint is TOC_BOTTOM_LEFT,
TOC_BOTTOM_RIGHT,
TOC_TOP_LEFT,
TOC_TOP_RIGHT
end TypeOfConstraint;
---Purpose: Definition of the attachment for the layers
--
---Category: Enumerations
enumeration TypeOfDrawMode is TODM_REPLACE,
TODM_ERASE,
TODM_XOR,
TODM_XORLIGHT
end TypeOfDrawMode;
---Purpose: Definition of the draw modes
--
---Category: Enumerations
enumeration TypeOfEdge is TOE_VISIBLE,
TOE_INVISIBLE
end TypeOfEdge;
---Purpose: Definition of edge visibility
--
-- TOE_VISIBLE Edge is displayed
-- TOE_INVISIBLE Edge is not displayed
--
---Category: Enumerations
enumeration TypeOfHighlightMethod is TOHM_COLOR,
TOHM_BOUNDBOX
end TypeOfHighlightMethod;
---Purpose: Definition of a highlight method
--
-- TOHM_COLOR drawn in the highlight color
-- (default white)
-- TOHM_BOUNDBOX enclosed by the boundary box
-- (default white)
--
---Category: Enumerations
enumeration TypeOfLine is TOL_SOLID,
TOL_DASH,
TOL_DOT,
TOL_DOTDASH,
TOL_USERDEFINED
end TypeOfLine;
---Purpose: Definition of line types
--
-- TOL_SOLID continuous
-- TOL_DASH dashed 2.0,1.0 (MM)
-- TOL_DOT dotted 0.2,0.5 (MM)
-- TOL_DOTDASH mixed 10.0,1.0,2.0,1.0 (MM)
-- TOL_USERDEFINED defined by Users
---Category: Enumerations
enumeration WidthOfLine is WOL_THIN,
WOL_MEDIUM,
WOL_THICK,
WOL_VERYTHICK,
WOL_USERDEFINED
end WidthOfLine;
---Purpose: Definition of line types
--
-- WOL_THIN thin line (1 pixel width)
-- WOL_MEDIUM medium width of 0.5 MM
-- WOL_THICK thick width of 0.7 MM
-- WOL_VERYTHICK very thick width of 1.5 MM
-- WOL_USERDEFINED defined by Users
---Category: Enumerations
enumeration TypeOfStyleText is TOST_NORMAL,
TOST_ANNOTATION
end TypeOfStyleText;
---Purpose: Define the style of the text.
--
-- TOST_NORMAL Default text. The text is displayed like any other graphic object.
-- This text can be hidden by another object that is nearest from the
-- point of view.
-- TOST_ANNOTATION The text is always visible. The texte is displayed
-- over the other object according to the priority.
---Category: Enumerations
enumeration TypeOfDisplayText is TODT_NORMAL,
TODT_SUBTITLE,
TODT_DEKALE,
TODT_BLEND,
TODT_DIMENSION
end TypeOfDisplayText;
---Purpose: Define the display type of the text.
--
-- TODT_NORMAL Default display. Text only.
-- TODT_SUBTITLE There is a subtitle under the text.
-- TODT_DEKALE The text is displayed with a 3D style.
-- TODT_BLEND The text is displayed in XOR.
-- TODT_DIMENSION Dimension line under text will be invisible.
---Category: Enumerations
enumeration TypeOfMarker is TOM_POINT,
TOM_PLUS,
TOM_STAR,
TOM_X,
TOM_O,
TOM_O_POINT,
TOM_O_PLUS,
TOM_O_STAR,
TOM_O_X,
TOM_RING1,
TOM_RING2,
TOM_RING3,
TOM_BALL,
TOM_USERDEFINED
end TypeOfMarker;
---Purpose: Definition of types of markers
--
-- TOM_POINT point .
-- TOM_PLUS plus +
-- TOM_STAR star *
-- TOM_X cross x
-- TOM_O circle O
-- TOM_O_POINT a point in a circle
-- TOM_O_PLUS a plus in a circle
-- TOM_O_STAR a star in a circle
-- TOM_O_X a cross in a circle
-- TOM_RING1 a large ring
-- TOM_RING2 a medium ring
-- TOM_RING3 a small ring
-- TOM_BALL a ball with 1 color and different saturations
-- TOM_USERDEFINED defined by Users
--
---Category: Enumerations
enumeration TypeOfUpdate is TOU_ASAP,
TOU_WAIT
end TypeOfUpdate;
---Purpose: Definition of screen refresh mode
--
-- TOU_ASAP as soon as possible
-- TOU_WAIT on demand (Update)
--
---Category: Enumerations
enumeration TypeOfDeflection is TOD_RELATIVE,
TOD_ABSOLUTE
end TypeOfDeflection;
---Purpose: Defines if the maximal chordial deflection used when
-- drawing an object is absolute or relative to the size
-- of the object.
enumeration TypeOfResize is TOR_UNKNOWN,
TOR_NO_BORDER,
TOR_TOP_BORDER,
TOR_RIGHT_BORDER,
TOR_BOTTOM_BORDER,
TOR_LEFT_BORDER,
TOR_TOP_AND_RIGHT_BORDER,
TOR_RIGHT_AND_BOTTOM_BORDER,
TOR_BOTTOM_AND_LEFT_BORDER,
TOR_LEFT_AND_TOP_BORDER
end TypeOfResize;
---Purpose: Defines the type of Resize Window method applied
-- by the user.
enumeration TypeOfPrimitive is
TOP_UNKNOWN,
TOP_POLYLINE,
TOP_POLYGON,
TOP_SEGMENTS,
TOP_ARCS,
TOP_POLYARCS,
TOP_POINTS,
TOP_MARKERS
end TypeOfPrimitive;
---Purpose:
enumeration GridDrawMode is GDM_Lines,
GDM_Points,
GDM_None
end GridDrawMode;
---Purpose: Defines the grid draw mode. The grid may be drawn
-- by using lines or points.
enumeration GridType is GT_Rectangular,
GT_Circular
end GridType;
---Purpose: Defines the grid type : Rectangular or Circular.
enumeration TypeOfTriedronEcho is TOTE_NONE,
TOTE_ORIGIN,
TOTE_AXIS_X,
TOTE_AXIS_Y,
TOTE_AXIS_Z,
TOTE_TEXT_X,
TOTE_TEXT_Y,
TOTE_TEXT_Z,
TOTE_01,
TOTE_02,
TOTE_03,
TOTE_04,
TOTE_05,
TOTE_06,
TOTE_07,
TOTE_08,
TOTE_09,
TOTE_10
end TypeOfTriedronEcho;
---Purpose: Definition of the Triedron echo zone to highlight
--
-- TOTE_NONE no echo zone
-- TOTE_ORIGIN a box on origin of the Triedron
-- TOTE_AXIS_X highlights the X axis
-- TOTE_AXIS_Y highlights the Y axis
-- TOTE_AXIS_Z highlights the Z axis
-- TOTE_TEXT_X highlights the X character
-- TOTE_TEXT_Y highlights the Y character
-- TOTE_TEXT_Z highlights the Z character
-- TOTE_01 to TOTE_10 not yet implemented.
---Category: The enumerations
enumeration TypeOfTriedronPosition is TOTP_CENTER,
TOTP_LEFT_LOWER,
TOTP_LEFT_UPPER,
TOTP_RIGHT_LOWER,
TOTP_RIGHT_UPPER,
TOTP_01,
TOTP_02,
TOTP_03,
TOTP_04,
TOTP_05,
TOTP_06,
TOTP_07,
TOTP_08,
TOTP_09,
TOTP_10
end TypeOfTriedronPosition;
---Purpose: Definition of the Triedron position in the views
--
-- TOTP_CENTER at the center of the view
-- TOTP_LEFT_LOWER at the left lower corner
-- TOTP_LEFT_UPPER at the left upper corner
-- TOTP_RIGHT_LOWER at the right lower corner
-- TOTP_RIGHT_UPPER at the right upper corner
-- TOTP_01 to TOTP_10 not yet implemented.
---Category: The enumerations
enumeration TypeOfLayer is TOL_OVERLAY,
TOL_UNDERLAY
end TypeOfLayer;
---Purpose: Modes of drawing for the objects in a layer
--
-- TOL_OVERLAY, the graphic of the layer is draw
-- after the 3d graphic.
-- TOL_UNDERLAY, the graphic of the layer is draw
-- before the 3d graphic.
---Category: The enumerations
enumeration TypeOfFacingModel is TOFM_BOTH_SIDE,
TOFM_BACK_SIDE,
TOFM_FRONT_SIDE
end TypeOfFacingModel;
enumeration FillMethod is
FM_NONE,
FM_CENTERED,
FM_TILED,
FM_STRETCH
end FillMethod;
---Purpose: Defines the fill methods to
-- write bitmaps in a window.
enumeration GradientFillMethod is
GFM_NONE,
GFM_HOR,
GFM_VER,
GFM_DIAG1,
GFM_DIAG2,
GFM_CORNER1,
GFM_CORNER2,
GFM_CORNER3,
GFM_CORNER4
end GradientFillMethod;
---Purpose: Defines the fill methods to
-- write gradient background in a window.
enumeration TypeOfColorScaleData is
TOCSD_AUTO,
TOCSD_USER
end TypeOfColorScaleData;
---Purpose: Defines the using type of colors and labels
enumeration TypeOfColorScalePosition is
TOCSP_NONE,
TOCSP_LEFT,
TOCSP_RIGHT,
TOCSP_CENTER
end TypeOfColorScalePosition;
---Purpose: Defines the type of position for color scale labels
enumeration TypeOfColorScaleOrientation is
TOCSO_NONE,
TOCSO_LEFT,
TOCSO_RIGHT,
TOCSO_CENTER
end TypeOfColorScaleOrientation;
---Purpose: Defines the type of color scale orientation
enumeration PrintAlgo is
PA_STRETCH,
PA_TILE
end PrintAlgo;
---Purpose: Defines print algorithm
-- Aspect_PrintAlgo:
-- 1) PA_STRETCH - Stretch offscreen printing frame
-- if its dimensions are smaller than
-- the printer's printing area dimensions;
-- This algorithm is more reliable as it
-- works on any hardware and is recommended
-- to be used with average printing resolutions,
-- as it more RAM memory dependent than PA_TILE;
-- Stretching is performend using bicubic interpolation
-- algorithm from FreeImage library if OCCT is built
-- with FreeImage support, otherwise Windows API
-- StretchBlt() function in STRETCH_HALFTONE mode
-- is used;
-- 2) PA_TILE - If the offscreen printing frame dimensions
-- are smaller than the printer's printing
-- area dimensions - use multiple printing
-- frames to cover the whole printing area
enumeration XAtom is
XA_DELETE_WINDOW
end XAtom;
---Purpose: Defines custom identifiers(atoms) for X window custom named properties
---------------------------------
-- Category: Instantiated classes
---------------------------------
imported SequenceOfColor;
end Aspect;

View File

@@ -1,210 +0,0 @@
-- Created on: 1991-11-04
-- Created by: NW,JPB,CAL
-- Copyright (c) 1991-1999 Matra Datavision
-- Copyright (c) 1999-2014 OPEN CASCADE SAS
--
-- This file is part of Open CASCADE Technology software library.
--
-- This library is free software; you can redistribute it and/or modify it under
-- the terms of the GNU Lesser General Public License version 2.1 as published
-- by the Free Software Foundation, with special exception defined in the file
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-- distribution for complete text of the license and disclaimer of any warranty.
--
-- Alternatively, this file may be used under the terms of Open CASCADE
-- commercial license or contractual agreement.
-- Modified: 15/01/98 ; FMN : Ajout Hidden Line
-- 08/01/03 ; SAV : Added method and field to control back face interior
-- color
deferred class AspectFillArea from Aspect
---Purpose: Group of attributes for the FACE primitives.
-- The attributes are:
-- * type of interior
-- * type of hatch
-- * interior colour
-- * border colour
-- * type of border
-- * thickness of border
-- when the value of the group is modified, all graphic
-- objects using this group are modified.
inherits
TShared
uses
Color from Quantity,
HatchStyle from Aspect,
InteriorStyle from Aspect,
TypeOfLine from Aspect
raises
AspectFillAreaDefinitionError from Aspect
is
Initialize;
---Level: Public
---Purpose: Initialise the constructor
-- of Graphic3d_AspectFillArea3d.
--
-- default values :
--
-- InteriorStyle = Aspect_IS_EMPTY;
-- InteriorColor = Quantity_NOC_CYAN1;
-- EdgeColor = Quantity_NOC_WHITE;
-- EdgeType = Aspect_TOL_SOLID;
-- EdgeWidth = 1.0;
-- HatchStyle = Aspect_HS_VERTICAL;
Initialize ( InteriorStyle : InteriorStyle from Aspect;
InteriorColor : Color from Quantity;
EdgeColor : Color from Quantity;
EdgeLineType : TypeOfLine from Aspect;
EdgeLineWidth : Real from Standard )
---Level: Public
---Purpose: Initialise the values for the constructor of
-- Graphic3d_AspectFillArea3d.
--
-- InteriorStyle :
-- IS_EMPTY no interior.
-- IS_HOLLOW display the boundaries of the surface.
-- IS_HATCH display hatched with a hatch style.
-- IS_SOLID display the interior entirely filled.
--
-- EdgeLineType :
-- TOL_SOLID continuous
-- TOL_DASH dashed
-- TOL_DOT dotted
-- TOL_DOTDASH mixed
--
-- default values :
-- HatchStyle = Aspect_HS_VERTICAL;
--
-- Warning: Raises AspectFillAreaDefinitionError if the
-- width is a negative value.
raises AspectFillAreaDefinitionError from Aspect;
---------------------------------------------------
-- Category: Methods to modify the class definition
---------------------------------------------------
SetEdgeColor ( me : mutable;
AColor : Color from Quantity );
---Level: Public
---Purpose: Modifies the colour of the edge of the face
---Category: Methods to modify the class definition
SetEdgeLineType ( me : mutable;
AType : TypeOfLine from Aspect );
---Level: Public
---Purpose: Modifies the edge line type
---Category: Methods to modify the class definition
SetEdgeWidth ( me : mutable;
AWidth : Real from Standard )
---Level: Public
---Purpose: Modifies the edge thickness
--
-- Category: Methods to modify the class definition
--
-- Warning: Raises AspectFillAreaDefinitionError if the
-- width is a negative value.
raises AspectFillAreaDefinitionError from Aspect;
SetHatchStyle ( me : mutable;
AStyle : HatchStyle from Aspect );
---Level: Public
---Purpose: Modifies the hatch type used when InteriorStyle
-- is IS_HATCH
---Category: Methods to modify the class definition
SetInteriorColor ( me : mutable;
AColor : Color from Quantity );
---Level: Public
---Purpose: Modifies the colour of the interior of the face
---Category: Methods to modify the class definition
SetBackInteriorColor( me : mutable; color : Color from Quantity );
---Level: Public
---Purpose: Modifies the colour of the interior of the back face
---Category: Methods to modify the class definition
SetInteriorStyle ( me : mutable;
AStyle : InteriorStyle from Aspect );
---Level: Public
---Purpose: Modifies the interior type used for rendering
--
-- InteriorStyle : IS_EMPTY no interior
-- IS_HOLLOW display the boundaries of the surface
-- IS_HATCH display hatching
-- IS_SOLID display interior entirely filled
--
---Category: Methods to modify the class definition
----------------------------
-- Category: Inquire methods
----------------------------
HatchStyle ( me )
returns HatchStyle from Aspect;
---Level: Public
---Purpose: Returns the hatch type used when InteriorStyle
-- is IS_HATCH
---Category: Inquire methods
Values ( me;
AStyle : out InteriorStyle from Aspect;
AIntColor : out Color from Quantity;
AEdgeColor : out Color from Quantity;
AType : out TypeOfLine from Aspect;
AWidth : out Real from Standard );
Values ( me;
AStyle : out InteriorStyle from Aspect;
AIntColor : out Color from Quantity;
BackIntColor : out Color from Quantity;
AEdgeColor : out Color from Quantity;
AType : out TypeOfLine from Aspect;
AWidth : out Real from Standard );
---Level: Public
---Purpose: Returns the current values of the <me> group.
---Category: Inquire methods
--
fields
--
-- Class : Aspect_AspectFillArea
--
-- Purpose : Declaration of specific variables in the context of
-- drawing faces
--
-- Reminder : The drawing context of a face is defined by:
-- - the interior style and color of the face
-- - the style, color and thickness of the face edge
--
-- the interior
MyInteriorStyle : InteriorStyle from Aspect;
MyInteriorColor : Color from Quantity;
MyBackInteriorColor : Color from Quantity;
-- the edge
MyEdgeColor : Color from Quantity;
MyEdgeType : TypeOfLine from Aspect;
MyEdgeWidth : Real from Standard;
-- the hatch
MyHatchStyle : HatchStyle from Aspect;
end AspectFillArea;

View File

@@ -14,50 +14,37 @@
// commercial license or contractual agreement.
// Modified: 15/01/98 ; FMN : Ajout Hidden Line
//-Version
//-Design Declaration of variables specific to the context
// of tracing facets
//-Warning Context of tracing facets id defined by:
// - the style of the interior of the facet
// - the style of the border of the facet
// - the color
//-References
//-Language C++ 2.0
//-Declarations
// for the class
#include <Aspect_AspectFillArea.ixx>
#include <Aspect_AspectFillArea.hxx>
#include <Aspect_AspectFillAreaDefinitionError.hxx>
#include <Quantity_Color.hxx>
#include <Standard_Type.hxx>
//-Aliases
//-Global data definitions
// -- interior
// MyInteriorStyle : InteriorStyle;
// MyInteriorColor : Color;
// -- border
// MyEdgeColor : Color;
// MyEdgeType : TypeOfLine;
// MyEdgeWidth : Standard_Real;
// -- shading
// MyHatchStyle : HatchStyle;
//-Constructors
//-Destructors
//-Methods, in order
Aspect_AspectFillArea::Aspect_AspectFillArea () {
MyInteriorStyle = Aspect_IS_EMPTY;

View File

@@ -0,0 +1,158 @@
// Created on: 1991-11-04
// Created by: NW,JPB,CAL
// Copyright (c) 1991-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _Aspect_AspectFillArea_HeaderFile
#define _Aspect_AspectFillArea_HeaderFile
#include <Standard.hxx>
#include <Standard_Type.hxx>
#include <Aspect_InteriorStyle.hxx>
#include <Quantity_Color.hxx>
#include <Aspect_TypeOfLine.hxx>
#include <Standard_Real.hxx>
#include <Aspect_HatchStyle.hxx>
#include <MMgt_TShared.hxx>
class Aspect_AspectFillAreaDefinitionError;
class Quantity_Color;
class Aspect_AspectFillArea;
DEFINE_STANDARD_HANDLE(Aspect_AspectFillArea, MMgt_TShared)
//! Group of attributes for the FACE primitives.
//! The attributes are:
//! * type of interior
//! * type of hatch
//! * interior colour
//! * border colour
//! * type of border
//! * thickness of border
//! when the value of the group is modified, all graphic
//! objects using this group are modified.
class Aspect_AspectFillArea : public MMgt_TShared
{
public:
//! Modifies the colour of the edge of the face
Standard_EXPORT void SetEdgeColor (const Quantity_Color& AColor);
//! Modifies the edge line type
Standard_EXPORT void SetEdgeLineType (const Aspect_TypeOfLine AType);
//! Modifies the edge thickness
//!
//! Category: Methods to modify the class definition
//!
//! Warning: Raises AspectFillAreaDefinitionError if the
//! width is a negative value.
Standard_EXPORT void SetEdgeWidth (const Standard_Real AWidth);
//! Modifies the hatch type used when InteriorStyle
//! is IS_HATCH
Standard_EXPORT void SetHatchStyle (const Aspect_HatchStyle AStyle);
//! Modifies the colour of the interior of the face
Standard_EXPORT void SetInteriorColor (const Quantity_Color& AColor);
//! Modifies the colour of the interior of the back face
Standard_EXPORT void SetBackInteriorColor (const Quantity_Color& color);
//! Modifies the interior type used for rendering
//!
//! InteriorStyle : IS_EMPTY no interior
//! IS_HOLLOW display the boundaries of the surface
//! IS_HATCH display hatching
//! IS_SOLID display interior entirely filled
Standard_EXPORT void SetInteriorStyle (const Aspect_InteriorStyle AStyle);
//! Returns the hatch type used when InteriorStyle
//! is IS_HATCH
Standard_EXPORT Aspect_HatchStyle HatchStyle() const;
Standard_EXPORT void Values (Aspect_InteriorStyle& AStyle, Quantity_Color& AIntColor, Quantity_Color& AEdgeColor, Aspect_TypeOfLine& AType, Standard_Real& AWidth) const;
//! Returns the current values of the <me> group.
Standard_EXPORT void Values (Aspect_InteriorStyle& AStyle, Quantity_Color& AIntColor, Quantity_Color& BackIntColor, Quantity_Color& AEdgeColor, Aspect_TypeOfLine& AType, Standard_Real& AWidth) const;
DEFINE_STANDARD_RTTI(Aspect_AspectFillArea,MMgt_TShared)
protected:
//! Initialise the constructor
//! of Graphic3d_AspectFillArea3d.
//!
//! default values :
//!
//! InteriorStyle = Aspect_IS_EMPTY;
//! InteriorColor = Quantity_NOC_CYAN1;
//! EdgeColor = Quantity_NOC_WHITE;
//! EdgeType = Aspect_TOL_SOLID;
//! EdgeWidth = 1.0;
//! HatchStyle = Aspect_HS_VERTICAL;
Standard_EXPORT Aspect_AspectFillArea();
//! Initialise the values for the constructor of
//! Graphic3d_AspectFillArea3d.
//!
//! InteriorStyle :
//! IS_EMPTY no interior.
//! IS_HOLLOW display the boundaries of the surface.
//! IS_HATCH display hatched with a hatch style.
//! IS_SOLID display the interior entirely filled.
//!
//! EdgeLineType :
//! TOL_SOLID continuous
//! TOL_DASH dashed
//! TOL_DOT dotted
//! TOL_DOTDASH mixed
//!
//! default values :
//! HatchStyle = Aspect_HS_VERTICAL;
//!
//! Warning: Raises AspectFillAreaDefinitionError if the
//! width is a negative value.
Standard_EXPORT Aspect_AspectFillArea(const Aspect_InteriorStyle InteriorStyle, const Quantity_Color& InteriorColor, const Quantity_Color& EdgeColor, const Aspect_TypeOfLine EdgeLineType, const Standard_Real EdgeLineWidth);
private:
Aspect_InteriorStyle MyInteriorStyle;
Quantity_Color MyInteriorColor;
Quantity_Color MyBackInteriorColor;
Quantity_Color MyEdgeColor;
Aspect_TypeOfLine MyEdgeType;
Standard_Real MyEdgeWidth;
Aspect_HatchStyle MyHatchStyle;
};
#endif // _Aspect_AspectFillArea_HeaderFile

View File

@@ -0,0 +1,36 @@
// Created by: NW,JPB,CAL
// Copyright (c) 1991-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _Aspect_AspectFillAreaDefinitionError_HeaderFile
#define _Aspect_AspectFillAreaDefinitionError_HeaderFile
#include <Standard_Type.hxx>
#include <Standard_DefineException.hxx>
#include <Standard_SStream.hxx>
#include <Standard_OutOfRange.hxx>
class Aspect_AspectFillAreaDefinitionError;
DEFINE_STANDARD_HANDLE(Aspect_AspectFillAreaDefinitionError, Standard_OutOfRange)
#if !defined No_Exception && !defined No_Aspect_AspectFillAreaDefinitionError
#define Aspect_AspectFillAreaDefinitionError_Raise_if(CONDITION, MESSAGE) \
if (CONDITION) Aspect_AspectFillAreaDefinitionError::Raise(MESSAGE);
#else
#define Aspect_AspectFillAreaDefinitionError_Raise_if(CONDITION, MESSAGE)
#endif
DEFINE_STANDARD_EXCEPTION(Aspect_AspectFillAreaDefinitionError, Standard_OutOfRange)
#endif // _Aspect_AspectFillAreaDefinitionError_HeaderFile

View File

@@ -1,125 +0,0 @@
-- Created by: NW,JPB,CAL
-- Copyright (c) 1991-1999 Matra Datavision
-- Copyright (c) 1999-2014 OPEN CASCADE SAS
--
-- This file is part of Open CASCADE Technology software library.
--
-- This library is free software; you can redistribute it and/or modify it under
-- the terms of the GNU Lesser General Public License version 2.1 as published
-- by the Free Software Foundation, with special exception defined in the file
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-- distribution for complete text of the license and disclaimer of any warranty.
--
-- Alternatively, this file may be used under the terms of Open CASCADE
-- commercial license or contractual agreement.
deferred class AspectLine from Aspect
inherits
TShared
---Purpose: This class allows the definition of a group
-- of attributes for the LINE primitive
-- The attributes are:
-- * Colour
-- * Type
-- * Thickness
-- When any value of the group is modified
-- all graphic objects using the group are modified.
uses
Color from Quantity,
TypeOfLine from Aspect
raises
AspectLineDefinitionError from Aspect
is
Initialize;
---Level: Public
---Purpose: Initialise the constructor for Graphic3d_AspectLine3d.
--
-- Default values :
-- Color = Quantity_NOC_YELLOW;
-- Type = Aspect_TOL_SOLID;
-- Width = 1.0;
--
Initialize ( AColor : Color from Quantity;
AType : TypeOfLine from Aspect;
AWidth : Real from Standard )
---Level: Public
---Purpose: Initialise the values for the
-- constructor of Graphic3d_AspectLine3d.
--
raises AspectLineDefinitionError from Aspect;
-- if the width is a negative value.
---------------------------------------------------
-- Category: Methods to modify the class definition
---------------------------------------------------
SetColor ( me : mutable;
AColor : Color from Quantity );
---Level: Public
---Purpose: Modifies the colour of <me>.
---Category: Methods to modify the class definition
SetType ( me : mutable;
AType : TypeOfLine from Aspect );
---Level: Public
---Purpose: Modifies the type of <me>.
---Category: Methods to modify the class definition
SetWidth ( me : mutable;
AWidth : Real from Standard )
---Level: Public
---Purpose: Modifies the thickness of <me>.
-- Category: Methods to modify the class definition
-- Warning: Raises AspectLineDefinitionError if the
-- width is a negative value.
raises AspectLineDefinitionError from Aspect;
----------------------------
-- Category: Inquire methods
----------------------------
Values ( me;
AColor : out Color from Quantity;
AType : out TypeOfLine from Aspect;
AWidth : out Real from Standard );
---Level: Public
---Purpose: Returns the current values of the group <me>.
---Category: Inquire methods
--
fields
--
-- Class : Aspect_AspectLine
--
-- Purpose : Declaration of variables specific to
-- drawing lines
--
-- Reminder : A line drawing context is defined by:
-- - the colour
-- - the type
-- - the thickness
--
-- the colour
MyColor : Color from Quantity;
-- the type
MyType : TypeOfLine from Aspect;
-- the thickness
MyWidth : Real from Standard;
end AspectLine;

View File

@@ -14,43 +14,33 @@
// commercial license or contractual agreement.
//-Version
//-Design Declaration of variables specific to the context
// of line tracing
//-Warning A context of line tracing is defined by :
// - the color
// - the type of line
// - the thickness
//-References
//-Language C++ 2.0
//-Declarations
// for the class
#include <Aspect_AspectLine.ixx>
#include <Aspect_AspectLine.hxx>
#include <Aspect_AspectLineDefinitionError.hxx>
#include <Quantity_Color.hxx>
#include <Standard_Type.hxx>
//-Aliases
//-Global data definitions
// -- color
// MyColor : Color;
// -- type of line
// MyType : TypeOfLine;
// -- thickness
// MyWidth : Standard_Real;
//-Constructors
//-Destructors
//-Methods, in order
Aspect_AspectLine::Aspect_AspectLine () {
MyColor = Quantity_NOC_YELLOW;

View File

@@ -0,0 +1,100 @@
// Created by: NW,JPB,CAL
// Copyright (c) 1991-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _Aspect_AspectLine_HeaderFile
#define _Aspect_AspectLine_HeaderFile
#include <Standard.hxx>
#include <Standard_Type.hxx>
#include <Quantity_Color.hxx>
#include <Aspect_TypeOfLine.hxx>
#include <Standard_Real.hxx>
#include <MMgt_TShared.hxx>
class Aspect_AspectLineDefinitionError;
class Quantity_Color;
class Aspect_AspectLine;
DEFINE_STANDARD_HANDLE(Aspect_AspectLine, MMgt_TShared)
//! This class allows the definition of a group
//! of attributes for the LINE primitive
//! The attributes are:
//! * Colour
//! * Type
//! * Thickness
//! When any value of the group is modified
//! all graphic objects using the group are modified.
class Aspect_AspectLine : public MMgt_TShared
{
public:
//! Modifies the colour of <me>.
Standard_EXPORT void SetColor (const Quantity_Color& AColor);
//! Modifies the type of <me>.
Standard_EXPORT void SetType (const Aspect_TypeOfLine AType);
//! Modifies the thickness of <me>.
//! Category: Methods to modify the class definition
//! Warning: Raises AspectLineDefinitionError if the
//! width is a negative value.
Standard_EXPORT void SetWidth (const Standard_Real AWidth);
//! Returns the current values of the group <me>.
Standard_EXPORT void Values (Quantity_Color& AColor, Aspect_TypeOfLine& AType, Standard_Real& AWidth) const;
DEFINE_STANDARD_RTTI(Aspect_AspectLine,MMgt_TShared)
protected:
//! Initialise the constructor for Graphic3d_AspectLine3d.
//!
//! Default values :
//! Color = Quantity_NOC_YELLOW;
//! Type = Aspect_TOL_SOLID;
//! Width = 1.0;
Standard_EXPORT Aspect_AspectLine();
//! Initialise the values for the
//! constructor of Graphic3d_AspectLine3d.
Standard_EXPORT Aspect_AspectLine(const Quantity_Color& AColor, const Aspect_TypeOfLine AType, const Standard_Real AWidth);
private:
Quantity_Color MyColor;
Aspect_TypeOfLine MyType;
Standard_Real MyWidth;
};
#endif // _Aspect_AspectLine_HeaderFile

View File

@@ -0,0 +1,36 @@
// Created by: NW,JPB,CAL
// Copyright (c) 1991-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _Aspect_AspectLineDefinitionError_HeaderFile
#define _Aspect_AspectLineDefinitionError_HeaderFile
#include <Standard_Type.hxx>
#include <Standard_DefineException.hxx>
#include <Standard_SStream.hxx>
#include <Standard_OutOfRange.hxx>
class Aspect_AspectLineDefinitionError;
DEFINE_STANDARD_HANDLE(Aspect_AspectLineDefinitionError, Standard_OutOfRange)
#if !defined No_Exception && !defined No_Aspect_AspectLineDefinitionError
#define Aspect_AspectLineDefinitionError_Raise_if(CONDITION, MESSAGE) \
if (CONDITION) Aspect_AspectLineDefinitionError::Raise(MESSAGE);
#else
#define Aspect_AspectLineDefinitionError_Raise_if(CONDITION, MESSAGE)
#endif
DEFINE_STANDARD_EXCEPTION(Aspect_AspectLineDefinitionError, Standard_OutOfRange)
#endif // _Aspect_AspectLineDefinitionError_HeaderFile

View File

@@ -1,128 +0,0 @@
-- Created on: 1991-09-02
-- Created by: NW,JPB,CAL
-- Copyright (c) 1991-1999 Matra Datavision
-- Copyright (c) 1999-2014 OPEN CASCADE SAS
--
-- This file is part of Open CASCADE Technology software library.
--
-- This library is free software; you can redistribute it and/or modify it under
-- the terms of the GNU Lesser General Public License version 2.1 as published
-- by the Free Software Foundation, with special exception defined in the file
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-- distribution for complete text of the license and disclaimer of any warranty.
--
-- Alternatively, this file may be used under the terms of Open CASCADE
-- commercial license or contractual agreement.
deferred class AspectMarker from Aspect
inherits
TShared
---Purpose: This class allows the definition of a group
-- of attributes for the primitive MARKER.
-- the attributes are:
-- * Colour
-- * Type
-- * Scale factor
-- When any value of the group is modified
-- all graphic objects using the group are modified
uses
Color from Quantity,
TypeOfMarker from Aspect
raises
AspectMarkerDefinitionError from Aspect
is
Initialize;
---Level: Public
---Purpose: Initialise the constructor for Graphic3d_AspectMarker3d.
--
-- defaults values :
--
-- Color = Quantity_NOC_YELLOW;
-- Type = Aspect_TOM_X;
-- Scale = 1.0;
Initialize ( AColor : Color from Quantity;
AType : TypeOfMarker from Aspect;
AScale : Real from Standard )
---Level: Public
---Purpose: Initialise the values for the
-- constructor of Graphic3d_AspectMarker3d.
-- Warning: Raises AspectMarkerDefinitionError if the
-- scale is a negative value.
raises AspectMarkerDefinitionError from Aspect;
---------------------------------------------------
-- Category: Methods to modify the class definition
---------------------------------------------------
SetColor ( me : mutable;
AColor : Color from Quantity );
---Level: Public
---Purpose: Modifies the colour of <me>.
---Category: Methods to modify the class definition
SetScale ( me : mutable;
AScale : Real from Standard )
---Level: Public
---Purpose: Modifies the scale factor of <me>.
-- Marker type Aspect_TOM_POINT is not affected
-- by the marker size scale factor. It is always
-- the smallest displayable dot.
-- Warning: Raises AspectMarkerDefinitionError if the
-- scale is a negative value.
raises AspectMarkerDefinitionError from Aspect;
SetType ( me : mutable;
AType : TypeOfMarker from Aspect );
---Level: Public
---Purpose: Modifies the type of marker <me>.
---Category: Methods to modify the class definition
----------------------------
-- Category: Inquire methods
----------------------------
Values ( me;
AColor : out Color from Quantity;
AType : out TypeOfMarker from Aspect;
AScale : out Real from Standard );
---Level: Public
---Purpose: Returns the current values of the group <me>.
---Category: Inquire methods
--
fields
--
-- Class : Aspect_AspectMarker
--
-- Purpose : Declaration of variables specific to the context of
-- drawing markers
--
-- Reminder : A drawing context for markers is defined by :
-- - the colour
-- - the type
-- - the scale
--
-- the colour
MyColor : Color from Quantity;
-- the type
MyType : TypeOfMarker from Aspect;
-- the scale
MyScale : Real from Standard;
end AspectMarker;

View File

@@ -14,43 +14,33 @@
// commercial license or contractual agreement.
//-Version
//-Design Declaration of variables specific to the context
// of tracing of markers
//-Warning Context of tracing of markers is defined by :
// - the color
// - the type
// - the scale
//-References
//-Language C++ 2.0
//-Declarations
// for the class
#include <Aspect_AspectMarker.ixx>
#include <Aspect_AspectMarker.hxx>
#include <Aspect_AspectMarkerDefinitionError.hxx>
#include <Quantity_Color.hxx>
#include <Standard_Type.hxx>
//-Aliases
//-Global data definitions
// -- color
// MyColor : Color;
// -- type
// MyType : TypeOfMarker;
// -- scale
// MyScale : Standard_Real;
//-Constructors
//-Destructors
//-Methods, in order
Aspect_AspectMarker::Aspect_AspectMarker () {
MyColor = Quantity_NOC_YELLOW;

View File

@@ -0,0 +1,106 @@
// Created on: 1991-09-02
// Created by: NW,JPB,CAL
// Copyright (c) 1991-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _Aspect_AspectMarker_HeaderFile
#define _Aspect_AspectMarker_HeaderFile
#include <Standard.hxx>
#include <Standard_Type.hxx>
#include <Quantity_Color.hxx>
#include <Aspect_TypeOfMarker.hxx>
#include <Standard_Real.hxx>
#include <MMgt_TShared.hxx>
class Aspect_AspectMarkerDefinitionError;
class Quantity_Color;
class Aspect_AspectMarker;
DEFINE_STANDARD_HANDLE(Aspect_AspectMarker, MMgt_TShared)
//! This class allows the definition of a group
//! of attributes for the primitive MARKER.
//! the attributes are:
//! * Colour
//! * Type
//! * Scale factor
//! When any value of the group is modified
//! all graphic objects using the group are modified
class Aspect_AspectMarker : public MMgt_TShared
{
public:
//! Modifies the colour of <me>.
Standard_EXPORT void SetColor (const Quantity_Color& AColor);
//! Modifies the scale factor of <me>.
//! Marker type Aspect_TOM_POINT is not affected
//! by the marker size scale factor. It is always
//! the smallest displayable dot.
//! Warning: Raises AspectMarkerDefinitionError if the
//! scale is a negative value.
Standard_EXPORT void SetScale (const Standard_Real AScale);
//! Modifies the type of marker <me>.
Standard_EXPORT void SetType (const Aspect_TypeOfMarker AType);
//! Returns the current values of the group <me>.
Standard_EXPORT void Values (Quantity_Color& AColor, Aspect_TypeOfMarker& AType, Standard_Real& AScale) const;
DEFINE_STANDARD_RTTI(Aspect_AspectMarker,MMgt_TShared)
protected:
//! Initialise the constructor for Graphic3d_AspectMarker3d.
//!
//! defaults values :
//!
//! Color = Quantity_NOC_YELLOW;
//! Type = Aspect_TOM_X;
//! Scale = 1.0;
Standard_EXPORT Aspect_AspectMarker();
//! Initialise the values for the
//! constructor of Graphic3d_AspectMarker3d.
//! Warning: Raises AspectMarkerDefinitionError if the
//! scale is a negative value.
Standard_EXPORT Aspect_AspectMarker(const Quantity_Color& AColor, const Aspect_TypeOfMarker AType, const Standard_Real AScale);
private:
Quantity_Color MyColor;
Aspect_TypeOfMarker MyType;
Standard_Real MyScale;
};
#endif // _Aspect_AspectMarker_HeaderFile

View File

@@ -0,0 +1,36 @@
// Created by: NW,JPB,CAL
// Copyright (c) 1991-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _Aspect_AspectMarkerDefinitionError_HeaderFile
#define _Aspect_AspectMarkerDefinitionError_HeaderFile
#include <Standard_Type.hxx>
#include <Standard_DefineException.hxx>
#include <Standard_SStream.hxx>
#include <Standard_OutOfRange.hxx>
class Aspect_AspectMarkerDefinitionError;
DEFINE_STANDARD_HANDLE(Aspect_AspectMarkerDefinitionError, Standard_OutOfRange)
#if !defined No_Exception && !defined No_Aspect_AspectMarkerDefinitionError
#define Aspect_AspectMarkerDefinitionError_Raise_if(CONDITION, MESSAGE) \
if (CONDITION) Aspect_AspectMarkerDefinitionError::Raise(MESSAGE);
#else
#define Aspect_AspectMarkerDefinitionError_Raise_if(CONDITION, MESSAGE)
#endif
DEFINE_STANDARD_EXCEPTION(Aspect_AspectMarkerDefinitionError, Standard_OutOfRange)
#endif // _Aspect_AspectMarkerDefinitionError_HeaderFile

View File

@@ -1,76 +0,0 @@
-- Created on: 1991-10-02
-- Created by: NW,JPB,CAL
-- Copyright (c) 1991-1999 Matra Datavision
-- Copyright (c) 1999-2014 OPEN CASCADE SAS
--
-- This file is part of Open CASCADE Technology software library.
--
-- This library is free software; you can redistribute it and/or modify it under
-- the terms of the GNU Lesser General Public License version 2.1 as published
-- by the Free Software Foundation, with special exception defined in the file
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-- distribution for complete text of the license and disclaimer of any warranty.
--
-- Alternatively, this file may be used under the terms of Open CASCADE
-- commercial license or contractual agreement.
class Background from Aspect
---Purpose: This class allows the definition of
-- a window background.
uses
Color from Quantity
is
Create
returns Background from Aspect;
---Level: Public
---Purpose: Creates a window background.
-- Default color : NOC_MATRAGRAY.
Create ( AColor : Color from Quantity )
returns Background from Aspect;
---Level: Public
---Purpose: Creates a window background with the colour <AColor>.
---------------------------------------------------
-- Category: Methods to modify the class definition
---------------------------------------------------
SetColor ( me : in out;
AColor : Color from Quantity );
---Level: Public
---Purpose: Modifies the colour of the window background <me>.
---Category: Methods to modify the class definition
----------------------------
-- Category: Inquire methods
----------------------------
Color ( me )
returns Color from Quantity;
---Level: Public
---Purpose: Returns the colour of the window background <me>.
---Category: Inquire methods
--
fields
--
-- Class : Aspect_Background
--
-- Purpose : Declaration of variables specific to the window
-- background.
--
-- Reminder : A background is defined by one colour
--
-- the colour associated with the window background
MyColor : Color from Quantity;
end Background;

View File

@@ -14,33 +14,23 @@
// commercial license or contractual agreement.
//-Version
//-Design Declaration des variables specifiques aux fonds d'ecran.
//-Warning Un fond d'ecran est defini par une couleur.
//-References
//-Language C++ 2.0
//-Declarations
// for the class
#include <Aspect_Background.ixx>
#include <Aspect_Background.hxx>
#include <Quantity_Color.hxx>
//-Aliases
//-Global data definitions
// -- la couleur associee au fond d'ecran
// MyColor : Color;
//-Constructors
//-Destructors
//-Methods, in order
Aspect_Background::Aspect_Background () {
Quantity_Color MatraGray (Quantity_NOC_MATRAGRAY);

View File

@@ -0,0 +1,74 @@
// Created on: 1991-10-02
// Created by: NW,JPB,CAL
// Copyright (c) 1991-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _Aspect_Background_HeaderFile
#define _Aspect_Background_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <Quantity_Color.hxx>
class Quantity_Color;
//! This class allows the definition of
//! a window background.
class Aspect_Background
{
public:
DEFINE_STANDARD_ALLOC
//! Creates a window background.
//! Default color : NOC_MATRAGRAY.
Standard_EXPORT Aspect_Background();
//! Creates a window background with the colour <AColor>.
Standard_EXPORT Aspect_Background(const Quantity_Color& AColor);
//! Modifies the colour of the window background <me>.
Standard_EXPORT void SetColor (const Quantity_Color& AColor);
//! Returns the colour of the window background <me>.
Standard_EXPORT Quantity_Color Color() const;
protected:
private:
Quantity_Color MyColor;
};
#endif // _Aspect_Background_HeaderFile

View File

@@ -0,0 +1,36 @@
// Created by: NW,JPB,CAL
// Copyright (c) 1991-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _Aspect_BadAccess_HeaderFile
#define _Aspect_BadAccess_HeaderFile
#include <Standard_Type.hxx>
#include <Standard_DefineException.hxx>
#include <Standard_SStream.hxx>
#include <Standard_DomainError.hxx>
class Aspect_BadAccess;
DEFINE_STANDARD_HANDLE(Aspect_BadAccess, Standard_DomainError)
#if !defined No_Exception && !defined No_Aspect_BadAccess
#define Aspect_BadAccess_Raise_if(CONDITION, MESSAGE) \
if (CONDITION) Aspect_BadAccess::Raise(MESSAGE);
#else
#define Aspect_BadAccess_Raise_if(CONDITION, MESSAGE)
#endif
DEFINE_STANDARD_EXCEPTION(Aspect_BadAccess, Standard_DomainError)
#endif // _Aspect_BadAccess_HeaderFile

View File

@@ -1,27 +0,0 @@
-- Created on: 1997-04-17
-- Created by: Stephane Callegari
-- Copyright (c) 1997-1999 Matra Datavision
-- Copyright (c) 1999-2014 OPEN CASCADE SAS
--
-- This file is part of Open CASCADE Technology software library.
--
-- This library is free software; you can redistribute it and/or modify it under
-- the terms of the GNU Lesser General Public License version 2.1 as published
-- by the Free Software Foundation, with special exception defined in the file
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-- distribution for complete text of the license and disclaimer of any warranty.
--
-- Alternatively, this file may be used under the terms of Open CASCADE
-- commercial license or contractual agreement.
-- 03-06-98 BGN: (S3553) portage MFT sur NT.
@ifnotdefined ( %Aspect_CMPLRS_EDL) then
@set %Aspect_CMPLRS_EDL = "";
@if ( %Station == "wnt" ) then
--- @set %CModeOpt = "-Zi -O2 -DNDEBUG -G5 -Oi";
@string %CMPLRS_CXX_Options = %CMPLRS_CXX_Options " -D_AFXDLL ";
@endif;
@endif;

View File

@@ -1,95 +0,0 @@
-- Created on: 1995-03-17
-- Created by: Mister rmi
-- Copyright (c) 1995-1999 Matra Datavision
-- Copyright (c) 1999-2014 OPEN CASCADE SAS
--
-- This file is part of Open CASCADE Technology software library.
--
-- This library is free software; you can redistribute it and/or modify it under
-- the terms of the GNU Lesser General Public License version 2.1 as published
-- by the Free Software Foundation, with special exception defined in the file
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-- distribution for complete text of the license and disclaimer of any warranty.
--
-- Alternatively, this file may be used under the terms of Open CASCADE
-- commercial license or contractual agreement.
class CircularGrid from Aspect
inherits Grid from Aspect
uses
PlaneAngle, Length from Quantity
raises
NegativeValue,NullValue,NumericError from Standard
is
Create(aRadiusStep: Length from Quantity;
aDivisionNumber: Integer from Standard;
XOrigin: Length from Quantity = 0;
anYOrigin: Length from Quantity = 0;
aRotationAngle: PlaneAngle from Quantity = 0)
returns CircularGrid from Aspect;
---Purpose: creates a new grid. By default this grid is not
-- active.
---Category: grid definition methods
SetRadiusStep(me: mutable; aStep: Length from Quantity)
---Purpose: defines the x step of the grid.
raises NegativeValue,NullValue from Standard
---Warning: raises an exception if <aStep> is not strictly positive.
is static;
SetDivisionNumber(me: mutable; aNumber: Integer from Standard)
---Purpose: defines the step of the grid.
raises NegativeValue,NullValue from Standard
---Warning: raises an exception if <aNumber> is not strictly positive.
is static;
SetGridValues(me: mutable; XOrigin, YOrigin: Length from Quantity;
RadiusStep: Length from Quantity;
DivisionNumber: Integer from Standard;
RotationAngle: PlaneAngle from Quantity)
raises NegativeValue,NullValue from Standard
---Warning: raises an exception if <RadiusStep> is not strictly positive.
---Warning: raises an exception if <DivisionNumber> is not strictly positive.
is static;
---Category: Pick methods
--
Compute(me; X,Y: Length from Quantity; gridX, gridY : out Length from Quantity)
---Purpose: returns the point of the grid the closest to the point X,Y
is static;
---Category: inquire methods
RadiusStep(me) returns Length from Quantity
---Purpose: returns the x step of the grid.
is static;
DivisionNumber(me) returns Integer from Standard
---Purpose: returns the x step of the grid.
is static;
---Category: private methods.
Init(me: mutable)
is redefined static;
fields
myRadiusStep: Length from Quantity;
myDivisionNumber: Integer from Standard;
myAlpha: Real from Standard;
myA1,myB1: Real from Standard;
end CircularGrid from Aspect;

View File

@@ -13,9 +13,13 @@
// Modified 23/02/98 : FMN ; Remplacement PI par Standard_PI
#include <Aspect_CircularGrid.ixx>
#include <Aspect_CircularGrid.hxx>
#include <Aspect_Grid.hxx>
#include <Standard_NegativeValue.hxx>
#include <Standard_NullValue.hxx>
#include <Standard_NumericError.hxx>
#include <Standard_Type.hxx>
Aspect_CircularGrid::Aspect_CircularGrid
(const Quantity_Length aRadiusStep,
const Standard_Integer aDivisionNumber,

View File

@@ -0,0 +1,94 @@
// Created on: 1995-03-17
// Created by: Mister rmi
// Copyright (c) 1995-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _Aspect_CircularGrid_HeaderFile
#define _Aspect_CircularGrid_HeaderFile
#include <Standard.hxx>
#include <Standard_Type.hxx>
#include <Quantity_Length.hxx>
#include <Standard_Integer.hxx>
#include <Standard_Real.hxx>
#include <Aspect_Grid.hxx>
#include <Quantity_PlaneAngle.hxx>
class Standard_NegativeValue;
class Standard_NullValue;
class Standard_NumericError;
class Aspect_CircularGrid;
DEFINE_STANDARD_HANDLE(Aspect_CircularGrid, Aspect_Grid)
class Aspect_CircularGrid : public Aspect_Grid
{
public:
//! creates a new grid. By default this grid is not
//! active.
Standard_EXPORT Aspect_CircularGrid(const Quantity_Length aRadiusStep, const Standard_Integer aDivisionNumber, const Quantity_Length XOrigin = 0, const Quantity_Length anYOrigin = 0, const Quantity_PlaneAngle aRotationAngle = 0);
//! defines the x step of the grid.
Standard_EXPORT void SetRadiusStep (const Quantity_Length aStep);
//! defines the step of the grid.
Standard_EXPORT void SetDivisionNumber (const Standard_Integer aNumber);
Standard_EXPORT void SetGridValues (const Quantity_Length XOrigin, const Quantity_Length YOrigin, const Quantity_Length RadiusStep, const Standard_Integer DivisionNumber, const Quantity_PlaneAngle RotationAngle);
//! returns the point of the grid the closest to the point X,Y
Standard_EXPORT void Compute (const Quantity_Length X, const Quantity_Length Y, Quantity_Length& gridX, Quantity_Length& gridY) const;
//! returns the x step of the grid.
Standard_EXPORT Quantity_Length RadiusStep() const;
//! returns the x step of the grid.
Standard_EXPORT Standard_Integer DivisionNumber() const;
Standard_EXPORT void Init() Standard_OVERRIDE;
DEFINE_STANDARD_RTTI(Aspect_CircularGrid,Aspect_Grid)
protected:
private:
Quantity_Length myRadiusStep;
Standard_Integer myDivisionNumber;
Standard_Real myAlpha;
Standard_Real myA1;
Standard_Real myB1;
};
#endif // _Aspect_CircularGrid_HeaderFile

View File

@@ -1,338 +0,0 @@
-- Created on: 2004-06-22
-- Created by: STV
-- Copyright (c) 2004-2014 OPEN CASCADE SAS
--
-- This file is part of Open CASCADE Technology software library.
--
-- This library is free software; you can redistribute it and/or modify it under
-- the terms of the GNU Lesser General Public License version 2.1 as published
-- by the Free Software Foundation, with special exception defined in the file
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-- distribution for complete text of the license and disclaimer of any warranty.
--
-- Alternatively, this file may be used under the terms of Open CASCADE
-- commercial license or contractual agreement.
deferred class ColorScale from Aspect inherits TShared from MMgt
---Purpose: Defines a color scale for viewer.
uses
TypeOfColorScaleData from Aspect,
TypeOfColorScalePosition from Aspect,
SequenceOfColor from Aspect,
Color from Quantity,
AsciiString from TCollection,
ExtendedString from TCollection,
SequenceOfExtendedString from TColStd
is
---Category: Public
FindColor( me; theValue : Real from Standard;
theColor : in out Color from Quantity ) returns Boolean from Standard;
---Purpose: Calculate color according passed value; returns true if value is in range or false, if isn't
FindColor( myclass; theValue : Real from Standard;
theMin, theMax : Real from Standard;
theColorsCount : Integer from Standard;
theColor : in out Color from Quantity ) returns Boolean from Standard;
GetMin(me)
returns Real from Standard;
---Purpose: Returns minimal value of color scale;
GetMax(me)
returns Real from Standard;
---Purpose: Returns maximal value of color scale;
GetRange(me; theMin : in out Real from Standard;
theMax : in out Real from Standard);
---Purpose: Returns minimal and maximal values of color scale;
GetLabelType(me)
returns TypeOfColorScaleData from Aspect;
---Purpose: Returns the type of labels;
--- Aspect_TOCSD_AUTO - labels as boundary values for intervals
--- Aspect_TOCSD_USER - user specified label is used
GetColorType(me)
returns TypeOfColorScaleData from Aspect;
---Purpose: Returns the type of colors;
--- Aspect_TOCSD_AUTO - value between Red and Blue
--- Aspect_TOCSD_USER - user specified color from color map
GetNumberOfIntervals(me)
returns Integer from Standard;
---Purpose: Returns the number of color scale intervals;
GetTitle(me)
returns ExtendedString from TCollection;
---Purpose: Returns the color scale title string;
GetFormat(me)
returns AsciiString from TCollection;
---Purpose: Returns the format for numbers.
-- The same like format for function printf().
-- Used if GetLabelType() is TOCSD_AUTO;
GetLabel(me; theIndex : Integer from Standard)
returns ExtendedString from TCollection;
---Purpose: Returns the user specified label with index <anIndex>.
-- Returns empty string if label not defined.
GetColor(me; theIndex : Integer from Standard)
returns Color from Quantity;
---Purpose: Returns the user specified color from color map with index <anIndex>.
-- Returns default color if index out of range in color map.
GetLabels(me; theLabels : in out SequenceOfExtendedString from TColStd);
---Purpose: Returns the user specified labels.
GetColors(me; theColors : in out SequenceOfColor from Aspect);
---Purpose: Returns the user specified colors.
GetLabelPosition(me)
returns TypeOfColorScalePosition from Aspect;
---Purpose: Returns the position of labels concerning color filled rectangles.
GetTitlePosition(me)
returns TypeOfColorScalePosition from Aspect;
---Purpose: Returns the position of color scale title.
IsReversed(me)
returns Boolean from Standard;
---Purpose: Returns true if the labels and colors used in reversed order.
IsLabelAtBorder(me)
returns Boolean from Standard;
---Purpose: Returns true if the labels placed at border of color filled rectangles.
SetMin(me : mutable; theMin : Real from Standard);
---Purpose: Sets the minimal value of color scale.
SetMax(me : mutable; theMax : Real from Standard);
---Purpose: Sets the maximal value of color scale.
SetRange(me : mutable; theMin : Real from Standard;
theMax : Real from Standard);
---Purpose: Sets the minimal and maximal value of color scale.
SetLabelType(me : mutable; theType : TypeOfColorScaleData from Aspect);
---Purpose: Sets the type of labels.
-- Aspect_TOCSD_AUTO - labels as boundary values for intervals
-- Aspect_TOCSD_USER - user specified label is used
SetColorType(me : mutable; theType : TypeOfColorScaleData from Aspect);
---Purpose: Sets the type of colors.
-- Aspect_TOCSD_AUTO - value between Red and Blue
-- Aspect_TOCSD_USER - user specified color from color map
SetNumberOfIntervals(me : mutable; theNum : Integer from Standard);
---Purpose: Sets the number of color scale intervals.
SetTitle(me : mutable; theTitle : ExtendedString from TCollection);
---Purpose: Sets the color scale title string.
SetFormat(me : mutable; theFormat : AsciiString from TCollection);
---Purpose: Sets the color scale auto label format specification.
SetLabel(me : mutable; theLabel : ExtendedString from TCollection;
anIndex : Integer from Standard = -1);
---Purpose: Sets the color scale label at index. Index started from 1.
SetColor(me : mutable; theColor : Color from Quantity;
theIndex : Integer from Standard = -1);
---Purpose: Sets the color scale color at index. Index started from 1.
SetLabels(me : mutable; theSeq : SequenceOfExtendedString from TColStd);
---Purpose: Sets the color scale labels.
SetColors(me : mutable; theSeq : SequenceOfColor from Aspect);
---Purpose: Sets the color scale colors.
SetLabelPosition(me : mutable; thePos : TypeOfColorScalePosition from Aspect);
---Purpose: Sets the color scale labels position concerning color filled rectangles.
SetTitlePosition(me : mutable; thePos : TypeOfColorScalePosition from Aspect);
---Purpose: Sets the color scale title position.
SetReversed(me : mutable; theReverse : Boolean from Standard);
---Purpose: Sets true if the labels and colors used in reversed order.
SetLabelAtBorder(me : mutable; theOn : Boolean from Standard);
---Purpose: Sets true if the labels placed at border of color filled rectangles.
--- Size and position management
--- Size and position are values relative to view size (between 0 and 1)
GetSize(me; theWidth : in out Real from Standard;
theHeight : in out Real from Standard);
---Purpose: Returns the size of color scale.
GetWidth(me)
returns Real from Standard;
---Purpose: Returns the width of color scale.
GetHeight(me)
returns Real from Standard;
---Purpose: Returns the height of color scale.
SetSize(me : mutable; theWidth : Real from Standard;
theHeight : Real from Standard);
---Purpose: Sets the size of color scale.
SetWidth(me : mutable; theWidth : Real from Standard);
---Purpose: Sets the width of color scale.
SetHeight(me : mutable; theHeight : Real from Standard);
---Purpose: Sets the height of color scale.
GetPosition(me; theX : in out Real from Standard;
theY : in out Real from Standard);
---Purpose: Returns the position of color scale.
GetXPosition(me)
returns Real from Standard;
---Purpose: Returns the X position of color scale.
GetYPosition(me)
returns Real from Standard;
---Purpose: Returns the height of color scale.
SetPosition(me : mutable; theX : Real from Standard;
theY : Real from Standard);
---Purpose: Sets the position of color scale.
SetXPosition(me : mutable; theX : Real from Standard);
---Purpose: Sets the X position of color scale.
SetYPosition(me : mutable; theY : Real from Standard);
---Purpose: Sets the Y position of color scale.
GetTextHeight(me)
returns Integer from Standard;
---Purpose: Returns the height of text of color scale.
SetTextHeight(me: mutable; theHeight : Integer from Standard);
---Purpose: Sets the height of text of color scale.
---Category: Protected
Initialize
returns ColorScale from Aspect
is protected;
---Purpose: Default constructor.
SizeHint(me; theWidth : in out Integer from Standard;
theHeight : in out Integer from Standard)
is protected;
---Purpose: Returns the size of color scale.
-- @param theWidth [out] the width of color scale.
-- @param theHeight [out] the height of color scale.
UpdateColorScale(me : mutable)
is virtual protected;
---Purpose: updates color scale parameters.
DrawScale(me : mutable; theBgColor : Color from Quantity;
theX, theY, theWidth, theHeight : Integer from Standard)
is protected;
---Purpose: Draws color scale.
-- @param theBgColor [in] background color
-- @param theX [in] the X coordinate of color scale position.
-- @param theY [in] the Y coordinate of color scale position.
-- @param theWidth [in] the width of color scale.
-- @param theHeight [in] the height of color scale.
BeginPaint(me : mutable)
returns Boolean from Standard
is virtual protected;
EndPaint(me : mutable)
returns Boolean from Standard
is virtual protected;
PaintRect(me : mutable; theX, theY, theWidth, theHeight : Integer from Standard;
theColor : Color from Quantity;
theFilled : Boolean from Standard = Standard_False)
is deferred;
---Purpose: Draws a rectangle.
-- @param theX [in] the X coordinate of rectangle position.
-- @param theY [in] the Y coordinate of rectangle position.
-- @param theWidth [in] the width of rectangle.
-- @param theHeight [in] the height of rectangle.
-- @param theColor [in] the color of rectangle.
-- @param theFilled [in] defines if rectangle must be filled.
PaintText(me : mutable; theText : ExtendedString from TCollection;
theX, theY : Integer from Standard;
theColor : Color from Quantity)
is deferred;
---Purpose: Draws a text.
-- @param theText [in] the text to draw.
-- @param theX [in] the X coordinate of text position.
-- @param theY [in] the Y coordinate of text position.
-- @param theColor [in] the color of text.
TextWidth(me; theText : ExtendedString from TCollection)
returns Integer from Standard
is deferred;
---Purpose: Returns the width of text.
-- @param theText [in] the text of which to calculate width.
TextHeight(me; theText : ExtendedString from TCollection)
returns Integer from Standard
is deferred;
---Purpose: Returns the height of text.
-- @param theText [in] the text of which to calculate height.
---Category: Private
Format(me)
returns AsciiString from TCollection
is private;
---Purpose: Returns the format of text.
GetNumber(me; theIndex : Integer from Standard)
returns Real from Standard
is private;
---Purpose: Returns the value of given interval.
HueFromValue(myclass; theValue : Integer from Standard;
theMin : Integer from Standard;
theMax : Integer from Standard)
returns Integer from Standard
is private;
---Purpose: Returns the color's hue for the given value in the given interval.
-- @param theValue [in] the current value of interval.
-- @param theMin [in] the min value of interval.
-- @param theMax [in] the max value of interval.
fields
myMin, myMax : Real from Standard;
myTitle : ExtendedString from TCollection;
myFormat : AsciiString from TCollection;
myInterval : Integer from Standard;
myColorType : TypeOfColorScaleData from Aspect;
myLabelType : TypeOfColorScaleData from Aspect;
myAtBorder : Boolean from Standard;
myReversed : Boolean from Standard;
myColors : SequenceOfColor from Aspect;
myLabels : SequenceOfExtendedString from TColStd;
myLabelPos : TypeOfColorScalePosition from Aspect;
myTitlePos : TypeOfColorScalePosition from Aspect;
myXPos, myYPos : Real from Standard;
myWidth, myHeight : Real from Standard;
myTextHeight : Integer from Standard;
end ColorScale;

View File

@@ -13,20 +13,19 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <Aspect_ColorScale.ixx>
#include <Aspect_ColorScale.hxx>
#include <Aspect_SequenceOfColor.hxx>
#include <Aspect_TypeOfColorScaleData.hxx>
#include <Aspect_TypeOfColorScalePosition.hxx>
#include <Precision.hxx>
#include <Quantity_Color.hxx>
#include <Standard_Type.hxx>
#include <TCollection_AsciiString.hxx>
#include <TCollection_ExtendedString.hxx>
#include <TColStd_SequenceOfExtendedString.hxx>
#include <Precision.hxx>
#include <stdio.h>
Aspect_ColorScale::Aspect_ColorScale()
: MMgt_TShared(),
myMin( 0.0 ),

View File

@@ -0,0 +1,302 @@
// Created on: 2004-06-22
// Created by: STV
// Copyright (c) 2004-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _Aspect_ColorScale_HeaderFile
#define _Aspect_ColorScale_HeaderFile
#include <Standard.hxx>
#include <Standard_Type.hxx>
#include <Standard_Real.hxx>
#include <TCollection_ExtendedString.hxx>
#include <TCollection_AsciiString.hxx>
#include <Standard_Integer.hxx>
#include <Aspect_TypeOfColorScaleData.hxx>
#include <Standard_Boolean.hxx>
#include <Aspect_SequenceOfColor.hxx>
#include <TColStd_SequenceOfExtendedString.hxx>
#include <Aspect_TypeOfColorScalePosition.hxx>
#include <MMgt_TShared.hxx>
class Quantity_Color;
class TCollection_ExtendedString;
class TCollection_AsciiString;
class Aspect_ColorScale;
DEFINE_STANDARD_HANDLE(Aspect_ColorScale, MMgt_TShared)
//! Defines a color scale for viewer.
class Aspect_ColorScale : public MMgt_TShared
{
public:
//! Calculate color according passed value; returns true if value is in range or false, if isn't
Standard_EXPORT Standard_Boolean FindColor (const Standard_Real theValue, Quantity_Color& theColor) const;
Standard_EXPORT static Standard_Boolean FindColor (const Standard_Real theValue, const Standard_Real theMin, const Standard_Real theMax, const Standard_Integer theColorsCount, Quantity_Color& theColor);
//! Returns minimal value of color scale;
Standard_EXPORT Standard_Real GetMin() const;
//! Returns maximal value of color scale;
Standard_EXPORT Standard_Real GetMax() const;
//! Returns minimal and maximal values of color scale;
Standard_EXPORT void GetRange (Standard_Real& theMin, Standard_Real& theMax) const;
//! Returns the type of labels;
//! Aspect_TOCSD_AUTO - labels as boundary values for intervals
//! Aspect_TOCSD_USER - user specified label is used
Standard_EXPORT Aspect_TypeOfColorScaleData GetLabelType() const;
//! Returns the type of colors;
//! Aspect_TOCSD_AUTO - value between Red and Blue
//! Aspect_TOCSD_USER - user specified color from color map
Standard_EXPORT Aspect_TypeOfColorScaleData GetColorType() const;
//! Returns the number of color scale intervals;
Standard_EXPORT Standard_Integer GetNumberOfIntervals() const;
//! Returns the color scale title string;
Standard_EXPORT TCollection_ExtendedString GetTitle() const;
//! Returns the format for numbers.
//! The same like format for function printf().
//! Used if GetLabelType() is TOCSD_AUTO;
Standard_EXPORT TCollection_AsciiString GetFormat() const;
//! Returns the user specified label with index <anIndex>.
//! Returns empty string if label not defined.
Standard_EXPORT TCollection_ExtendedString GetLabel (const Standard_Integer theIndex) const;
//! Returns the user specified color from color map with index <anIndex>.
//! Returns default color if index out of range in color map.
Standard_EXPORT Quantity_Color GetColor (const Standard_Integer theIndex) const;
//! Returns the user specified labels.
Standard_EXPORT void GetLabels (TColStd_SequenceOfExtendedString& theLabels) const;
//! Returns the user specified colors.
Standard_EXPORT void GetColors (Aspect_SequenceOfColor& theColors) const;
//! Returns the position of labels concerning color filled rectangles.
Standard_EXPORT Aspect_TypeOfColorScalePosition GetLabelPosition() const;
//! Returns the position of color scale title.
Standard_EXPORT Aspect_TypeOfColorScalePosition GetTitlePosition() const;
//! Returns true if the labels and colors used in reversed order.
Standard_EXPORT Standard_Boolean IsReversed() const;
//! Returns true if the labels placed at border of color filled rectangles.
Standard_EXPORT Standard_Boolean IsLabelAtBorder() const;
//! Sets the minimal value of color scale.
Standard_EXPORT void SetMin (const Standard_Real theMin);
//! Sets the maximal value of color scale.
Standard_EXPORT void SetMax (const Standard_Real theMax);
//! Sets the minimal and maximal value of color scale.
Standard_EXPORT void SetRange (const Standard_Real theMin, const Standard_Real theMax);
//! Sets the type of labels.
//! Aspect_TOCSD_AUTO - labels as boundary values for intervals
//! Aspect_TOCSD_USER - user specified label is used
Standard_EXPORT void SetLabelType (const Aspect_TypeOfColorScaleData theType);
//! Sets the type of colors.
//! Aspect_TOCSD_AUTO - value between Red and Blue
//! Aspect_TOCSD_USER - user specified color from color map
Standard_EXPORT void SetColorType (const Aspect_TypeOfColorScaleData theType);
//! Sets the number of color scale intervals.
Standard_EXPORT void SetNumberOfIntervals (const Standard_Integer theNum);
//! Sets the color scale title string.
Standard_EXPORT void SetTitle (const TCollection_ExtendedString& theTitle);
//! Sets the color scale auto label format specification.
Standard_EXPORT void SetFormat (const TCollection_AsciiString& theFormat);
//! Sets the color scale label at index. Index started from 1.
Standard_EXPORT void SetLabel (const TCollection_ExtendedString& theLabel, const Standard_Integer anIndex = -1);
//! Sets the color scale color at index. Index started from 1.
Standard_EXPORT void SetColor (const Quantity_Color& theColor, const Standard_Integer theIndex = -1);
//! Sets the color scale labels.
Standard_EXPORT void SetLabels (const TColStd_SequenceOfExtendedString& theSeq);
//! Sets the color scale colors.
Standard_EXPORT void SetColors (const Aspect_SequenceOfColor& theSeq);
//! Sets the color scale labels position concerning color filled rectangles.
Standard_EXPORT void SetLabelPosition (const Aspect_TypeOfColorScalePosition thePos);
//! Sets the color scale title position.
Standard_EXPORT void SetTitlePosition (const Aspect_TypeOfColorScalePosition thePos);
//! Sets true if the labels and colors used in reversed order.
Standard_EXPORT void SetReversed (const Standard_Boolean theReverse);
//! Sets true if the labels placed at border of color filled rectangles.
Standard_EXPORT void SetLabelAtBorder (const Standard_Boolean theOn);
//! Returns the size of color scale.
Standard_EXPORT void GetSize (Standard_Real& theWidth, Standard_Real& theHeight) const;
//! Returns the width of color scale.
Standard_EXPORT Standard_Real GetWidth() const;
//! Returns the height of color scale.
Standard_EXPORT Standard_Real GetHeight() const;
//! Sets the size of color scale.
Standard_EXPORT void SetSize (const Standard_Real theWidth, const Standard_Real theHeight);
//! Sets the width of color scale.
Standard_EXPORT void SetWidth (const Standard_Real theWidth);
//! Sets the height of color scale.
Standard_EXPORT void SetHeight (const Standard_Real theHeight);
//! Returns the position of color scale.
Standard_EXPORT void GetPosition (Standard_Real& theX, Standard_Real& theY) const;
//! Returns the X position of color scale.
Standard_EXPORT Standard_Real GetXPosition() const;
//! Returns the height of color scale.
Standard_EXPORT Standard_Real GetYPosition() const;
//! Sets the position of color scale.
Standard_EXPORT void SetPosition (const Standard_Real theX, const Standard_Real theY);
//! Sets the X position of color scale.
Standard_EXPORT void SetXPosition (const Standard_Real theX);
//! Sets the Y position of color scale.
Standard_EXPORT void SetYPosition (const Standard_Real theY);
//! Returns the height of text of color scale.
Standard_EXPORT Standard_Integer GetTextHeight() const;
//! Sets the height of text of color scale.
Standard_EXPORT void SetTextHeight (const Standard_Integer theHeight);
//! Draws a rectangle.
//! @param theX [in] the X coordinate of rectangle position.
//! @param theY [in] the Y coordinate of rectangle position.
//! @param theWidth [in] the width of rectangle.
//! @param theHeight [in] the height of rectangle.
//! @param theColor [in] the color of rectangle.
//! @param theFilled [in] defines if rectangle must be filled.
Standard_EXPORT virtual void PaintRect (const Standard_Integer theX, const Standard_Integer theY, const Standard_Integer theWidth, const Standard_Integer theHeight, const Quantity_Color& theColor, const Standard_Boolean theFilled = Standard_False) = 0;
//! Draws a text.
//! @param theText [in] the text to draw.
//! @param theX [in] the X coordinate of text position.
//! @param theY [in] the Y coordinate of text position.
//! @param theColor [in] the color of text.
Standard_EXPORT virtual void PaintText (const TCollection_ExtendedString& theText, const Standard_Integer theX, const Standard_Integer theY, const Quantity_Color& theColor) = 0;
//! Returns the width of text.
//! @param theText [in] the text of which to calculate width.
Standard_EXPORT virtual Standard_Integer TextWidth (const TCollection_ExtendedString& theText) const = 0;
//! Returns the height of text.
//! @param theText [in] the text of which to calculate height.
Standard_EXPORT virtual Standard_Integer TextHeight (const TCollection_ExtendedString& theText) const = 0;
DEFINE_STANDARD_RTTI(Aspect_ColorScale,MMgt_TShared)
protected:
//! Default constructor.
Standard_EXPORT Aspect_ColorScale();
//! Returns the size of color scale.
//! @param theWidth [out] the width of color scale.
//! @param theHeight [out] the height of color scale.
Standard_EXPORT void SizeHint (Standard_Integer& theWidth, Standard_Integer& theHeight) const;
//! updates color scale parameters.
Standard_EXPORT virtual void UpdateColorScale();
//! Draws color scale.
//! @param theBgColor [in] background color
//! @param theX [in] the X coordinate of color scale position.
//! @param theY [in] the Y coordinate of color scale position.
//! @param theWidth [in] the width of color scale.
//! @param theHeight [in] the height of color scale.
Standard_EXPORT void DrawScale (const Quantity_Color& theBgColor, const Standard_Integer theX, const Standard_Integer theY, const Standard_Integer theWidth, const Standard_Integer theHeight);
Standard_EXPORT virtual Standard_Boolean BeginPaint();
Standard_EXPORT virtual Standard_Boolean EndPaint();
private:
//! Returns the format of text.
Standard_EXPORT TCollection_AsciiString Format() const;
//! Returns the value of given interval.
Standard_EXPORT Standard_Real GetNumber (const Standard_Integer theIndex) const;
//! Returns the color's hue for the given value in the given interval.
//! @param theValue [in] the current value of interval.
//! @param theMin [in] the min value of interval.
//! @param theMax [in] the max value of interval.
Standard_EXPORT static Standard_Integer HueFromValue (const Standard_Integer theValue, const Standard_Integer theMin, const Standard_Integer theMax);
Standard_Real myMin;
Standard_Real myMax;
TCollection_ExtendedString myTitle;
TCollection_AsciiString myFormat;
Standard_Integer myInterval;
Aspect_TypeOfColorScaleData myColorType;
Aspect_TypeOfColorScaleData myLabelType;
Standard_Boolean myAtBorder;
Standard_Boolean myReversed;
Aspect_SequenceOfColor myColors;
TColStd_SequenceOfExtendedString myLabels;
Aspect_TypeOfColorScalePosition myLabelPos;
Aspect_TypeOfColorScalePosition myTitlePos;
Standard_Real myXPos;
Standard_Real myYPos;
Standard_Real myWidth;
Standard_Real myHeight;
Standard_Integer myTextHeight;
};
#endif // _Aspect_ColorScale_HeaderFile

View File

@@ -0,0 +1,36 @@
// Created by: NW,JPB,CAL
// Copyright (c) 1991-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _Aspect_DisplayConnectionDefinitionError_HeaderFile
#define _Aspect_DisplayConnectionDefinitionError_HeaderFile
#include <Standard_Type.hxx>
#include <Standard_DefineException.hxx>
#include <Standard_SStream.hxx>
#include <Standard_OutOfRange.hxx>
class Aspect_DisplayConnectionDefinitionError;
DEFINE_STANDARD_HANDLE(Aspect_DisplayConnectionDefinitionError, Standard_OutOfRange)
#if !defined No_Exception && !defined No_Aspect_DisplayConnectionDefinitionError
#define Aspect_DisplayConnectionDefinitionError_Raise_if(CONDITION, MESSAGE) \
if (CONDITION) Aspect_DisplayConnectionDefinitionError::Raise(MESSAGE);
#else
#define Aspect_DisplayConnectionDefinitionError_Raise_if(CONDITION, MESSAGE)
#endif
DEFINE_STANDARD_EXCEPTION(Aspect_DisplayConnectionDefinitionError, Standard_OutOfRange)
#endif // _Aspect_DisplayConnectionDefinitionError_HeaderFile

View File

@@ -0,0 +1,36 @@
// Created by: NW,JPB,CAL
// Copyright (c) 1991-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _Aspect_DriverDefinitionError_HeaderFile
#define _Aspect_DriverDefinitionError_HeaderFile
#include <Standard_Type.hxx>
#include <Standard_DefineException.hxx>
#include <Standard_SStream.hxx>
#include <Standard_OutOfRange.hxx>
class Aspect_DriverDefinitionError;
DEFINE_STANDARD_HANDLE(Aspect_DriverDefinitionError, Standard_OutOfRange)
#if !defined No_Exception && !defined No_Aspect_DriverDefinitionError
#define Aspect_DriverDefinitionError_Raise_if(CONDITION, MESSAGE) \
if (CONDITION) Aspect_DriverDefinitionError::Raise(MESSAGE);
#else
#define Aspect_DriverDefinitionError_Raise_if(CONDITION, MESSAGE)
#endif
DEFINE_STANDARD_EXCEPTION(Aspect_DriverDefinitionError, Standard_OutOfRange)
#endif // _Aspect_DriverDefinitionError_HeaderFile

View File

@@ -0,0 +1,29 @@
// Created by: NW,JPB,CAL
// Copyright (c) 1991-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _Aspect_FillMethod_HeaderFile
#define _Aspect_FillMethod_HeaderFile
//! Defines the fill methods to
//! write bitmaps in a window.
enum Aspect_FillMethod
{
Aspect_FM_NONE,
Aspect_FM_CENTERED,
Aspect_FM_TILED,
Aspect_FM_STRETCH
};
#endif // _Aspect_FillMethod_HeaderFile

View File

@@ -1,79 +0,0 @@
-- Created on: 1992-05-13
-- Created by: NW,JPB,CAL
-- Copyright (c) 1992-1999 Matra Datavision
-- Copyright (c) 1999-2014 OPEN CASCADE SAS
--
-- This file is part of Open CASCADE Technology software library.
--
-- This library is free software; you can redistribute it and/or modify it under
-- the terms of the GNU Lesser General Public License version 2.1 as published
-- by the Free Software Foundation, with special exception defined in the file
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-- distribution for complete text of the license and disclaimer of any warranty.
--
-- Alternatively, this file may be used under the terms of Open CASCADE
-- commercial license or contractual agreement.
class GenId from Aspect
---Purpose: This class permits the creation and control of integer identifiers.
uses
ListOfInteger from TColStd
raises
IdentDefinitionError from Aspect
is
Create
returns GenId from Aspect;
---Purpose: Creates an available set of identifiers with the lower bound 0 and the upper bound INT_MAX / 2.
Create (theLow, theUpper : Integer from Standard)
returns GenId from Aspect
---Purpose: Creates an available set of identifiers with specified range.
-- Raises IdentDefinitionError if theUpper is less than theLow.
raises IdentDefinitionError from Aspect;
Free (me : in out);
---Level: Internal
---Purpose: Free all identifiers - make the whole range available again.
Free (me : in out;
theId : Integer from Standard);
---Purpose: Free specified identifier. Warning - method has no protection against double-freeing!
HasFree (me)
returns Boolean from Standard;
---Purpose: Returns true if there are available identifiers in range.
Available (me)
returns Integer from Standard;
---Purpose: Returns the number of available identifiers.
Lower (me)
returns Integer from Standard;
---Purpose: Returns the lower identifier in range.
Next (me : in out)
returns Integer from Standard
---Purpose: Returns the next available identifier.
-- Warning: Raises IdentDefinitionError if all identifiers are busy.
raises IdentDefinitionError from Aspect;
Upper (me)
returns Integer from Standard;
---Purpose: Returns the upper identifier in range.
fields
myFreeCount : Integer from Standard; -- the current number of available identifiers in range, excluding freed numbers
myLength : Integer from Standard; -- the number of identifiers
myLowerBound : Integer from Standard; -- the lower limit for identifiers
myUpperBound : Integer from Standard; -- the upper limit for identifiers
myFreeIds : ListOfInteger from TColStd; -- to save free identifiers
end GenId;

View File

@@ -14,7 +14,9 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <Aspect_GenId.ixx>
#include <Aspect_GenId.hxx>
#include <Aspect_IdentDefinitionError.hxx>
// =======================================================================
// function : Aspect_GenId

View File

@@ -0,0 +1,95 @@
// Created on: 1992-05-13
// Created by: NW,JPB,CAL
// Copyright (c) 1992-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _Aspect_GenId_HeaderFile
#define _Aspect_GenId_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <Standard_Integer.hxx>
#include <TColStd_ListOfInteger.hxx>
#include <Standard_Boolean.hxx>
class Aspect_IdentDefinitionError;
//! This class permits the creation and control of integer identifiers.
class Aspect_GenId
{
public:
DEFINE_STANDARD_ALLOC
//! Creates an available set of identifiers with the lower bound 0 and the upper bound INT_MAX / 2.
Standard_EXPORT Aspect_GenId();
//! Creates an available set of identifiers with specified range.
//! Raises IdentDefinitionError if theUpper is less than theLow.
Standard_EXPORT Aspect_GenId(const Standard_Integer theLow, const Standard_Integer theUpper);
//! Free all identifiers - make the whole range available again.
Standard_EXPORT void Free();
//! Free specified identifier. Warning - method has no protection against double-freeing!
Standard_EXPORT void Free (const Standard_Integer theId);
//! Returns true if there are available identifiers in range.
Standard_EXPORT Standard_Boolean HasFree() const;
//! Returns the number of available identifiers.
Standard_EXPORT Standard_Integer Available() const;
//! Returns the lower identifier in range.
Standard_EXPORT Standard_Integer Lower() const;
//! Returns the next available identifier.
//! Warning: Raises IdentDefinitionError if all identifiers are busy.
Standard_EXPORT Standard_Integer Next();
//! Returns the upper identifier in range.
Standard_EXPORT Standard_Integer Upper() const;
protected:
private:
Standard_Integer myFreeCount;
Standard_Integer myLength;
Standard_Integer myLowerBound;
Standard_Integer myUpperBound;
TColStd_ListOfInteger myFreeIds;
};
#endif // _Aspect_GenId_HeaderFile

View File

@@ -1,89 +0,0 @@
-- Created on: 2010-05-21
-- Created by: PAUL SUPRYATKIN
-- Copyright (c) 2010-2014 OPEN CASCADE SAS
--
-- This file is part of Open CASCADE Technology software library.
--
-- This library is free software; you can redistribute it and/or modify it under
-- the terms of the GNU Lesser General Public License version 2.1 as published
-- by the Free Software Foundation, with special exception defined in the file
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-- distribution for complete text of the license and disclaimer of any warranty.
--
-- Alternatively, this file may be used under the terms of Open CASCADE
-- commercial license or contractual agreement.
class GradientBackground from Aspect
inherits Background from Aspect
---Purpose: This class allows the definition of
-- a window gradient background.
uses
Color from Quantity,
GradientFillMethod from Aspect
is
Create
returns GradientBackground from Aspect;
---Level: Public
---Purpose: Creates a window gradient background.
-- Default colors : Quantity_NOC_BLACK.
-- Default fill method : Aspect_GFM_NONE
Create ( AColor1 : Color from Quantity;
AColor2 : Color from Quantity;
AMethod : GradientFillMethod from Aspect = Aspect_GFM_HOR)
returns GradientBackground from Aspect;
---Level: Public
---Purpose: Creates a window gradient background with colours <AColor1, AColor2>.
---------------------------------------------------
-- Category: Methods to modify the class definition
---------------------------------------------------
SetColors ( me : in out;
AColor1 : Color from Quantity ;
AColor2 : Color from Quantity ;
AMethod : GradientFillMethod from Aspect = Aspect_GFM_HOR
);
---Level: Public
---Purpose: Modifies the colours of the window gradient background <me>.
---Category: Methods to modify the class definition
----------------------------
-- Category: Inquire methods
----------------------------
Colors ( me;
AColor1 : out Color from Quantity;
AColor2 : out Color from Quantity
);
---Level: Public
---Purpose: Returns colours of the window gradient background <me>.
---Category: Inquire methods
BgGradientFillMethod( me ) returns GradientFillMethod from Aspect;
---Level: Public
---Purpose: Returns the current gradient background fill mode.
fields
--
-- Class : Aspect_GradientBackground
--
-- Purpose : Declaration of variables specific to the window
-- gradient background.
--
-- Reminder : A Gradient background is defined by two colours
--
-- the colour associated with the window background
MyColor2 : Color from Quantity;
MyGradientMethod : GradientFillMethod from Aspect;
end GradientBackground ;

View File

@@ -0,0 +1,80 @@
// Created on: 2010-05-21
// Created by: PAUL SUPRYATKIN
// Copyright (c) 2010-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _Aspect_GradientBackground_HeaderFile
#define _Aspect_GradientBackground_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <Quantity_Color.hxx>
#include <Aspect_GradientFillMethod.hxx>
#include <Aspect_Background.hxx>
class Quantity_Color;
//! This class allows the definition of
//! a window gradient background.
class Aspect_GradientBackground : public Aspect_Background
{
public:
DEFINE_STANDARD_ALLOC
//! Creates a window gradient background.
//! Default colors : Quantity_NOC_BLACK.
//! Default fill method : Aspect_GFM_NONE
Standard_EXPORT Aspect_GradientBackground();
//! Creates a window gradient background with colours <AColor1, AColor2>.
Standard_EXPORT Aspect_GradientBackground(const Quantity_Color& AColor1, const Quantity_Color& AColor2, const Aspect_GradientFillMethod AMethod = Aspect_GFM_HOR);
//! Modifies the colours of the window gradient background <me>.
Standard_EXPORT void SetColors (const Quantity_Color& AColor1, const Quantity_Color& AColor2, const Aspect_GradientFillMethod AMethod = Aspect_GFM_HOR);
//! Returns colours of the window gradient background <me>.
Standard_EXPORT void Colors (Quantity_Color& AColor1, Quantity_Color& AColor2) const;
//! Returns the current gradient background fill mode.
Standard_EXPORT Aspect_GradientFillMethod BgGradientFillMethod() const;
protected:
private:
Quantity_Color MyColor2;
Aspect_GradientFillMethod MyGradientMethod;
};
#endif // _Aspect_GradientBackground_HeaderFile

View File

@@ -0,0 +1,34 @@
// Created by: NW,JPB,CAL
// Copyright (c) 1991-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _Aspect_GradientFillMethod_HeaderFile
#define _Aspect_GradientFillMethod_HeaderFile
//! Defines the fill methods to
//! write gradient background in a window.
enum Aspect_GradientFillMethod
{
Aspect_GFM_NONE,
Aspect_GFM_HOR,
Aspect_GFM_VER,
Aspect_GFM_DIAG1,
Aspect_GFM_DIAG2,
Aspect_GFM_CORNER1,
Aspect_GFM_CORNER2,
Aspect_GFM_CORNER3,
Aspect_GFM_CORNER4
};
#endif // _Aspect_GradientFillMethod_HeaderFile

View File

@@ -0,0 +1,36 @@
// Created by: NW,JPB,CAL
// Copyright (c) 1991-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _Aspect_GraphicDeviceDefinitionError_HeaderFile
#define _Aspect_GraphicDeviceDefinitionError_HeaderFile
#include <Standard_Type.hxx>
#include <Standard_DefineException.hxx>
#include <Standard_SStream.hxx>
#include <Standard_OutOfRange.hxx>
class Aspect_GraphicDeviceDefinitionError;
DEFINE_STANDARD_HANDLE(Aspect_GraphicDeviceDefinitionError, Standard_OutOfRange)
#if !defined No_Exception && !defined No_Aspect_GraphicDeviceDefinitionError
#define Aspect_GraphicDeviceDefinitionError_Raise_if(CONDITION, MESSAGE) \
if (CONDITION) Aspect_GraphicDeviceDefinitionError::Raise(MESSAGE);
#else
#define Aspect_GraphicDeviceDefinitionError_Raise_if(CONDITION, MESSAGE)
#endif
DEFINE_STANDARD_EXCEPTION(Aspect_GraphicDeviceDefinitionError, Standard_OutOfRange)
#endif // _Aspect_GraphicDeviceDefinitionError_HeaderFile

View File

@@ -1,174 +0,0 @@
-- Created on: 1995-03-02
-- Created by: Jean-Louis Frenkel
-- Copyright (c) 1995-1999 Matra Datavision
-- Copyright (c) 1999-2014 OPEN CASCADE SAS
--
-- This file is part of Open CASCADE Technology software library.
--
-- This library is free software; you can redistribute it and/or modify it under
-- the terms of the GNU Lesser General Public License version 2.1 as published
-- by the Free Software Foundation, with special exception defined in the file
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-- distribution for complete text of the license and disclaimer of any warranty.
--
-- Alternatively, this file may be used under the terms of Open CASCADE
-- commercial license or contractual agreement.
deferred class Grid from Aspect
inherits TShared from MMgt
uses
PlaneAngle, Length from Quantity,
GridDrawMode from Aspect,
Color from Quantity
is
Initialize(anXOrigin: Length from Quantity = 0.0;
anYOrigin: Length from Quantity = 0.0;
aRotationAngle: PlaneAngle from Quantity = 0;
aColor: Color from Quantity = Quantity_NOC_GRAY50;
aTenthColor: Color from Quantity = Quantity_NOC_GRAY70);
---Purpose: creates a new grid. By default this grid is not
-- active.
---Category: grid definition methods
SetXOrigin(me: mutable; anOrigin: Length from Quantity)
is static;
---Level: Public
---Purpose: defines the x Origin of the grid.
SetYOrigin(me: mutable; anOrigin: Length from Quantity)
is static;
---Level: Public
---Purpose: defines the y Origin of the grid.
SetRotationAngle(me: mutable; anAngle: PlaneAngle from Quantity)
is static;
---Level: Public
---Purpose: defines the orientation of the the grid.
Rotate(me: mutable; anAngle: PlaneAngle from Quantity)
is static;
---Level: Public
---Purpose: Rotate the grid from a relative angle.
Translate(me: mutable; aDx, aDy: Length from Quantity)
is static;
---Level: Public
---Purpose: Translate the grid from a relative distance.
SetColors ( me : mutable;
aColor : Color from Quantity;
aTenthColor : Color from Quantity )
is virtual;
---Level: Public
---Purpose: Change the colors of the grid
---Category: Pick methods
--
Hit(me; X,Y: Length from Quantity; gridX, gridY : out Length from Quantity)
is static;
---Level: Public
---Purpose: returns the point of the grid the closest to the point X,Y
-- if the grid is active. If the grid is not active returns
-- X,Y.
Compute(me; X,Y: Length from Quantity; gridX, gridY : out Length from Quantity)
is deferred;
---Level: Internal
---Purpose: returns the point of the grid the closest to the point X,Y
---Category: Managment methods.
Activate(me: mutable)
is static;
---Level: Public
---Purpose: activates the grid. The Hit method will return
-- gridx and gridx computed according to the steps
-- of the grid.
Deactivate(me: mutable)
is static;
---Level: Public
---Purpose: deactivates the grid. The hit method will return
-- gridx and gridx as the enter value X & Y.
---Category: inquire methods
XOrigin(me) returns Length from Quantity
is static;
---Level: Public
---Purpose: returns the x Origin of the grid.
YOrigin(me) returns Length from Quantity
is static;
---Level: Public
---Purpose: returns the x Origin of the grid.
RotationAngle(me) returns PlaneAngle from Quantity
is static;
---Level: Public
---Purpose: returns the x Angle of the grid.
IsActive(me) returns Boolean from Standard
is static;
---Level: Public
---Purpose: Returns TRUE when the grid is active.
Colors(me ; aColor,aTenthColor: out Color from Quantity)
is static;
---Level: Public
---Purpose: Returns the colors of the grid.
---Category: display methods
SetDrawMode(me: mutable; aDrawMode: GridDrawMode from Aspect)
is static;
---Level: Public
---Purpose: Change the grid aspect.
DrawMode(me) returns GridDrawMode from Aspect
is static;
---Level: Public
---Purpose: Returns the grid aspect.
Display(me: mutable)
is virtual;
---Level: Public
---Purpose: Display the grid at screen.
Erase(me)
is virtual;
---Level: Public
---Purpose: Erase the grid from screen.
IsDisplayed(me)
returns Boolean from Standard
is virtual;
---Level: Public
---Purpose: Returns TRUE when the grid is displayed at screen.
UpdateDisplay(me: mutable)
is virtual protected;
---Level: Internal
---Purpose: Updates the grid parameters.
Init(me: mutable)
is deferred;
---Level: Internal
fields
myRotationAngle: PlaneAngle from Quantity is protected;
myXOrigin: Length from Quantity is protected;
myYOrigin: Length from Quantity is protected;
myColor: Color from Quantity is protected;
myTenthColor: Color from Quantity is protected;
myIsActive :Boolean from Standard;
myDrawMode: GridDrawMode from Aspect;
end Grid from Aspect;

View File

@@ -11,8 +11,10 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <Aspect_Grid.ixx>
#include <Aspect_Grid.hxx>
#include <Quantity_Color.hxx>
#include <Standard_Type.hxx>
Aspect_Grid::Aspect_Grid(
const Quantity_Length anXOrigin,

146
src/Aspect/Aspect_Grid.hxx Normal file
View File

@@ -0,0 +1,146 @@
// Created on: 1995-03-02
// Created by: Jean-Louis Frenkel
// Copyright (c) 1995-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _Aspect_Grid_HeaderFile
#define _Aspect_Grid_HeaderFile
#include <Standard.hxx>
#include <Standard_Type.hxx>
#include <Quantity_PlaneAngle.hxx>
#include <Quantity_Length.hxx>
#include <Quantity_Color.hxx>
#include <Standard_Boolean.hxx>
#include <Aspect_GridDrawMode.hxx>
#include <MMgt_TShared.hxx>
class Quantity_Color;
class Aspect_Grid;
DEFINE_STANDARD_HANDLE(Aspect_Grid, MMgt_TShared)
class Aspect_Grid : public MMgt_TShared
{
public:
//! defines the x Origin of the grid.
Standard_EXPORT void SetXOrigin (const Quantity_Length anOrigin);
//! defines the y Origin of the grid.
Standard_EXPORT void SetYOrigin (const Quantity_Length anOrigin);
//! defines the orientation of the the grid.
Standard_EXPORT void SetRotationAngle (const Quantity_PlaneAngle anAngle);
//! Rotate the grid from a relative angle.
Standard_EXPORT void Rotate (const Quantity_PlaneAngle anAngle);
//! Translate the grid from a relative distance.
Standard_EXPORT void Translate (const Quantity_Length aDx, const Quantity_Length aDy);
//! Change the colors of the grid
Standard_EXPORT virtual void SetColors (const Quantity_Color& aColor, const Quantity_Color& aTenthColor);
//! returns the point of the grid the closest to the point X,Y
//! if the grid is active. If the grid is not active returns
//! X,Y.
Standard_EXPORT void Hit (const Quantity_Length X, const Quantity_Length Y, Quantity_Length& gridX, Quantity_Length& gridY) const;
//! returns the point of the grid the closest to the point X,Y
Standard_EXPORT virtual void Compute (const Quantity_Length X, const Quantity_Length Y, Quantity_Length& gridX, Quantity_Length& gridY) const = 0;
//! activates the grid. The Hit method will return
//! gridx and gridx computed according to the steps
//! of the grid.
Standard_EXPORT void Activate();
//! deactivates the grid. The hit method will return
//! gridx and gridx as the enter value X & Y.
Standard_EXPORT void Deactivate();
//! returns the x Origin of the grid.
Standard_EXPORT Quantity_Length XOrigin() const;
//! returns the x Origin of the grid.
Standard_EXPORT Quantity_Length YOrigin() const;
//! returns the x Angle of the grid.
Standard_EXPORT Quantity_PlaneAngle RotationAngle() const;
//! Returns TRUE when the grid is active.
Standard_EXPORT Standard_Boolean IsActive() const;
//! Returns the colors of the grid.
Standard_EXPORT void Colors (Quantity_Color& aColor, Quantity_Color& aTenthColor) const;
//! Change the grid aspect.
Standard_EXPORT void SetDrawMode (const Aspect_GridDrawMode aDrawMode);
//! Returns the grid aspect.
Standard_EXPORT Aspect_GridDrawMode DrawMode() const;
//! Display the grid at screen.
Standard_EXPORT virtual void Display();
//! Erase the grid from screen.
Standard_EXPORT virtual void Erase() const;
//! Returns TRUE when the grid is displayed at screen.
Standard_EXPORT virtual Standard_Boolean IsDisplayed() const;
Standard_EXPORT virtual void Init() = 0;
DEFINE_STANDARD_RTTI(Aspect_Grid,MMgt_TShared)
protected:
//! creates a new grid. By default this grid is not
//! active.
Standard_EXPORT Aspect_Grid(const Quantity_Length anXOrigin = 0.0, const Quantity_Length anYOrigin = 0.0, const Quantity_PlaneAngle aRotationAngle = 0, const Quantity_Color& aColor = Quantity_NOC_GRAY50, const Quantity_Color& aTenthColor = Quantity_NOC_GRAY70);
//! Updates the grid parameters.
Standard_EXPORT virtual void UpdateDisplay();
Quantity_PlaneAngle myRotationAngle;
Quantity_Length myXOrigin;
Quantity_Length myYOrigin;
Quantity_Color myColor;
Quantity_Color myTenthColor;
private:
Standard_Boolean myIsActive;
Aspect_GridDrawMode myDrawMode;
};
#endif // _Aspect_Grid_HeaderFile

View File

@@ -0,0 +1,28 @@
// Created by: NW,JPB,CAL
// Copyright (c) 1991-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _Aspect_GridDrawMode_HeaderFile
#define _Aspect_GridDrawMode_HeaderFile
//! Defines the grid draw mode. The grid may be drawn
//! by using lines or points.
enum Aspect_GridDrawMode
{
Aspect_GDM_Lines,
Aspect_GDM_Points,
Aspect_GDM_None
};
#endif // _Aspect_GridDrawMode_HeaderFile

View File

@@ -0,0 +1,26 @@
// Created by: NW,JPB,CAL
// Copyright (c) 1991-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _Aspect_GridType_HeaderFile
#define _Aspect_GridType_HeaderFile
//! Defines the grid type : Rectangular or Circular.
enum Aspect_GridType
{
Aspect_GT_Rectangular,
Aspect_GT_Circular
};
#endif // _Aspect_GridType_HeaderFile

View File

@@ -0,0 +1,49 @@
// Created by: NW,JPB,CAL
// Copyright (c) 1991-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _Aspect_HatchStyle_HeaderFile
#define _Aspect_HatchStyle_HeaderFile
//! Definition of all available hatch styles.
//!
//! HS_HORIZONTAL
//! HS_HORIZONTAL_WIDE
//! HS_VERTICAL
//! HS_VERTICAL_WIDE
//! HS_DIAGONAL_45
//! HS_DIAGONAL_45_WIDE
//! HS_DIAGONAL_135
//! HS_DIAGONAL_135_WIDE
//! HS_GRID
//! HS_GRID_WIDE
//! HS_GRID_DIAGONAL
//! HS_GRID_DIAGONAL_WIDE
enum Aspect_HatchStyle
{
Aspect_HS_HORIZONTAL,
Aspect_HS_HORIZONTAL_WIDE,
Aspect_HS_VERTICAL,
Aspect_HS_VERTICAL_WIDE,
Aspect_HS_DIAGONAL_45,
Aspect_HS_DIAGONAL_45_WIDE,
Aspect_HS_DIAGONAL_135,
Aspect_HS_DIAGONAL_135_WIDE,
Aspect_HS_GRID,
Aspect_HS_GRID_WIDE,
Aspect_HS_GRID_DIAGONAL,
Aspect_HS_GRID_DIAGONAL_WIDE
};
#endif // _Aspect_HatchStyle_HeaderFile

View File

@@ -0,0 +1,36 @@
// Created by: NW,JPB,CAL
// Copyright (c) 1991-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _Aspect_IdentDefinitionError_HeaderFile
#define _Aspect_IdentDefinitionError_HeaderFile
#include <Standard_Type.hxx>
#include <Standard_DefineException.hxx>
#include <Standard_SStream.hxx>
#include <Standard_OutOfRange.hxx>
class Aspect_IdentDefinitionError;
DEFINE_STANDARD_HANDLE(Aspect_IdentDefinitionError, Standard_OutOfRange)
#if !defined No_Exception && !defined No_Aspect_IdentDefinitionError
#define Aspect_IdentDefinitionError_Raise_if(CONDITION, MESSAGE) \
if (CONDITION) Aspect_IdentDefinitionError::Raise(MESSAGE);
#else
#define Aspect_IdentDefinitionError_Raise_if(CONDITION, MESSAGE)
#endif
DEFINE_STANDARD_EXCEPTION(Aspect_IdentDefinitionError, Standard_OutOfRange)
#endif // _Aspect_IdentDefinitionError_HeaderFile

View File

@@ -0,0 +1,38 @@
// Created by: NW,JPB,CAL
// Copyright (c) 1991-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _Aspect_InteriorStyle_HeaderFile
#define _Aspect_InteriorStyle_HeaderFile
//! Definition of interior types for primitive
//! faces.
//!
//! IS_EMPTY no interior.
//! IS_HOLLOW display the boundaries of the surface.
//! IS_HATCH display hatched with a hatch style.
//! IS_SOLID display the interior entirely filled.
//! IS_HIDDENLINE display in hidden lines removed.
//! IS_POINT display only vertices.
enum Aspect_InteriorStyle
{
Aspect_IS_EMPTY,
Aspect_IS_HOLLOW,
Aspect_IS_HATCH,
Aspect_IS_SOLID,
Aspect_IS_HIDDENLINE,
Aspect_IS_POINT
};
#endif // _Aspect_InteriorStyle_HeaderFile

View File

@@ -0,0 +1,43 @@
// Created by: NW,JPB,CAL
// Copyright (c) 1991-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _Aspect_PrintAlgo_HeaderFile
#define _Aspect_PrintAlgo_HeaderFile
//! Defines print algorithm
//! Aspect_PrintAlgo:
//! 1) PA_STRETCH - Stretch offscreen printing frame
//! if its dimensions are smaller than
//! the printer's printing area dimensions;
//! This algorithm is more reliable as it
//! works on any hardware and is recommended
//! to be used with average printing resolutions,
//! as it more RAM memory dependent than PA_TILE;
//! Stretching is performend using bicubic interpolation
//! algorithm from FreeImage library if OCCT is built
//! with FreeImage support, otherwise Windows API
//! StretchBlt() function in STRETCH_HALFTONE mode
//! is used;
//! 2) PA_TILE - If the offscreen printing frame dimensions
//! are smaller than the printer's printing
//! area dimensions - use multiple printing
//! frames to cover the whole printing area
enum Aspect_PrintAlgo
{
Aspect_PA_STRETCH,
Aspect_PA_TILE
};
#endif // _Aspect_PrintAlgo_HeaderFile

View File

@@ -1,122 +0,0 @@
-- Created on: 1995-03-02
-- Created by: Jean-Louis Frenkel
-- Copyright (c) 1995-1999 Matra Datavision
-- Copyright (c) 1999-2014 OPEN CASCADE SAS
--
-- This file is part of Open CASCADE Technology software library.
--
-- This library is free software; you can redistribute it and/or modify it under
-- the terms of the GNU Lesser General Public License version 2.1 as published
-- by the Free Software Foundation, with special exception defined in the file
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-- distribution for complete text of the license and disclaimer of any warranty.
--
-- Alternatively, this file may be used under the terms of Open CASCADE
-- commercial license or contractual agreement.
class RectangularGrid from Aspect
inherits Grid from Aspect
uses
PlaneAngle, Length from Quantity
raises
NegativeValue,NullValue,NumericError from Standard
is
Create(aXStep, aYStep: Length from Quantity;
anXOrigin: Length from Quantity = 0;
anYOrigin: Length from Quantity = 0;
aFirstAngle: PlaneAngle from Quantity = 0;
aSecondAngle: PlaneAngle from Quantity = 0;
aRotationAngle: PlaneAngle from Quantity = 0)
returns RectangularGrid from Aspect
---Purpose: creates a new grid. By default this grid is not
-- active.
-- The first angle is given relatively to the horizontal.
-- The second angle is given relatively to the vertical.
raises NumericError from Standard;
---Warning: raises NumericError from Standard if the two
-- networks are parallel.
---Category: grid definition methods
SetXStep(me: mutable; aStep: Length from Quantity)
---Purpose: defines the x step of the grid.
raises NegativeValue,NullValue from Standard
---Warning: raises an exception is the step is not strictly positive.
is static;
SetYStep(me: mutable; aStep: Length from Quantity)
---Purpose: defines the y step of the grid.
raises NegativeValue,NullValue from Standard
---Warning: raises an exception is the step is not strictly positive.
is static;
SetAngle(me: mutable; anAngle1: PlaneAngle from Quantity;
anAngle2: PlaneAngle from Quantity)
---Purpose: defines the angle of the second network
-- the fist angle is given relatively to the horizontal.
-- the second angle is given relatively to the vertical.
raises NumericError from Standard
---Warning: raises NumericError from Standard if the two
-- line networks are parallel.
is static;
SetGridValues(me: mutable; XOrigin, YOrigin: Length from Quantity;
XStep, YStep: Length from Quantity;
RotationAngle: PlaneAngle from Quantity)
is static;
---Category: Pick methods
--
Compute(me; X,Y: Length from Quantity; gridX, gridY : out Length from Quantity)
---Purpose: returns the point of the grid the closest to the point X,Y
is static;
---Category: inquire methods
XStep(me) returns Length from Quantity
---Purpose: returns the x step of the grid.
is static;
YStep(me) returns Length from Quantity
---Purpose: returns the x step of the grid.
is static;
FirstAngle(me) returns PlaneAngle from Quantity
---Purpose: returns the x Angle of the grid, relatively to the horizontal.
is static;
SecondAngle(me) returns PlaneAngle from Quantity
---Purpose: returns the y Angle of the grid, relatively to the vertical.
is static;
---Category: private methods.
Init(me: mutable)
is redefined static;
CheckAngle(me;alpha,beta: PlaneAngle from Quantity)
returns Boolean from Standard
is static private;
fields
myXStep: Length from Quantity;
myYStep: Length from Quantity;
myFirstAngle: PlaneAngle from Quantity;
mySecondAngle: PlaneAngle from Quantity;
a1,b1,c1: Real from Standard;
a2,b2,c2: Real from Standard;
end RectangularGrid from Aspect;

View File

@@ -13,8 +13,11 @@
// Modified 23/02/98 : FMN ; Remplacement PI par Standard_PI
#include <Aspect_RectangularGrid.ixx>
#include <Aspect_RectangularGrid.hxx>
#include <Standard_NegativeValue.hxx>
#include <Standard_NullValue.hxx>
#include <Standard_NumericError.hxx>
#include <Standard_Type.hxx>
Aspect_RectangularGrid::Aspect_RectangularGrid(
const Quantity_Length aXStep,

View File

@@ -0,0 +1,114 @@
// Created on: 1995-03-02
// Created by: Jean-Louis Frenkel
// Copyright (c) 1995-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _Aspect_RectangularGrid_HeaderFile
#define _Aspect_RectangularGrid_HeaderFile
#include <Standard.hxx>
#include <Standard_Type.hxx>
#include <Quantity_Length.hxx>
#include <Quantity_PlaneAngle.hxx>
#include <Standard_Real.hxx>
#include <Aspect_Grid.hxx>
#include <Standard_Boolean.hxx>
class Standard_NegativeValue;
class Standard_NullValue;
class Standard_NumericError;
class Aspect_RectangularGrid;
DEFINE_STANDARD_HANDLE(Aspect_RectangularGrid, Aspect_Grid)
class Aspect_RectangularGrid : public Aspect_Grid
{
public:
//! creates a new grid. By default this grid is not
//! active.
//! The first angle is given relatively to the horizontal.
//! The second angle is given relatively to the vertical.
Standard_EXPORT Aspect_RectangularGrid(const Quantity_Length aXStep, const Quantity_Length aYStep, const Quantity_Length anXOrigin = 0, const Quantity_Length anYOrigin = 0, const Quantity_PlaneAngle aFirstAngle = 0, const Quantity_PlaneAngle aSecondAngle = 0, const Quantity_PlaneAngle aRotationAngle = 0);
//! defines the x step of the grid.
Standard_EXPORT void SetXStep (const Quantity_Length aStep);
//! defines the y step of the grid.
Standard_EXPORT void SetYStep (const Quantity_Length aStep);
//! defines the angle of the second network
//! the fist angle is given relatively to the horizontal.
//! the second angle is given relatively to the vertical.
Standard_EXPORT void SetAngle (const Quantity_PlaneAngle anAngle1, const Quantity_PlaneAngle anAngle2);
Standard_EXPORT void SetGridValues (const Quantity_Length XOrigin, const Quantity_Length YOrigin, const Quantity_Length XStep, const Quantity_Length YStep, const Quantity_PlaneAngle RotationAngle);
//! returns the point of the grid the closest to the point X,Y
Standard_EXPORT void Compute (const Quantity_Length X, const Quantity_Length Y, Quantity_Length& gridX, Quantity_Length& gridY) const;
//! returns the x step of the grid.
Standard_EXPORT Quantity_Length XStep() const;
//! returns the x step of the grid.
Standard_EXPORT Quantity_Length YStep() const;
//! returns the x Angle of the grid, relatively to the horizontal.
Standard_EXPORT Quantity_PlaneAngle FirstAngle() const;
//! returns the y Angle of the grid, relatively to the vertical.
Standard_EXPORT Quantity_PlaneAngle SecondAngle() const;
Standard_EXPORT void Init() Standard_OVERRIDE;
DEFINE_STANDARD_RTTI(Aspect_RectangularGrid,Aspect_Grid)
protected:
private:
Standard_EXPORT Standard_Boolean CheckAngle (const Quantity_PlaneAngle alpha, const Quantity_PlaneAngle beta) const;
Quantity_Length myXStep;
Quantity_Length myYStep;
Quantity_PlaneAngle myFirstAngle;
Quantity_PlaneAngle mySecondAngle;
Standard_Real a1;
Standard_Real b1;
Standard_Real c1;
Standard_Real a2;
Standard_Real b2;
Standard_Real c2;
};
#endif // _Aspect_RectangularGrid_HeaderFile

View File

@@ -0,0 +1,26 @@
// Created by: NW,JPB,CAL
// Copyright (c) 1991-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _Aspect_TypeOfColorScaleData_HeaderFile
#define _Aspect_TypeOfColorScaleData_HeaderFile
//! Defines the using type of colors and labels
enum Aspect_TypeOfColorScaleData
{
Aspect_TOCSD_AUTO,
Aspect_TOCSD_USER
};
#endif // _Aspect_TypeOfColorScaleData_HeaderFile

View File

@@ -0,0 +1,28 @@
// Created by: NW,JPB,CAL
// Copyright (c) 1991-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _Aspect_TypeOfColorScaleOrientation_HeaderFile
#define _Aspect_TypeOfColorScaleOrientation_HeaderFile
//! Defines the type of color scale orientation
enum Aspect_TypeOfColorScaleOrientation
{
Aspect_TOCSO_NONE,
Aspect_TOCSO_LEFT,
Aspect_TOCSO_RIGHT,
Aspect_TOCSO_CENTER
};
#endif // _Aspect_TypeOfColorScaleOrientation_HeaderFile

View File

@@ -0,0 +1,28 @@
// Created by: NW,JPB,CAL
// Copyright (c) 1991-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _Aspect_TypeOfColorScalePosition_HeaderFile
#define _Aspect_TypeOfColorScalePosition_HeaderFile
//! Defines the type of position for color scale labels
enum Aspect_TypeOfColorScalePosition
{
Aspect_TOCSP_NONE,
Aspect_TOCSP_LEFT,
Aspect_TOCSP_RIGHT,
Aspect_TOCSP_CENTER
};
#endif // _Aspect_TypeOfColorScalePosition_HeaderFile

View File

@@ -0,0 +1,28 @@
// Created by: NW,JPB,CAL
// Copyright (c) 1991-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _Aspect_TypeOfConstraint_HeaderFile
#define _Aspect_TypeOfConstraint_HeaderFile
//! Definition of the attachment for the layers
enum Aspect_TypeOfConstraint
{
Aspect_TOC_BOTTOM_LEFT,
Aspect_TOC_BOTTOM_RIGHT,
Aspect_TOC_TOP_LEFT,
Aspect_TOC_TOP_RIGHT
};
#endif // _Aspect_TypeOfConstraint_HeaderFile

View File

@@ -0,0 +1,28 @@
// Created by: NW,JPB,CAL
// Copyright (c) 1991-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _Aspect_TypeOfDeflection_HeaderFile
#define _Aspect_TypeOfDeflection_HeaderFile
//! Defines if the maximal chordial deflection used when
//! drawing an object is absolute or relative to the size
//! of the object.
enum Aspect_TypeOfDeflection
{
Aspect_TOD_RELATIVE,
Aspect_TOD_ABSOLUTE
};
#endif // _Aspect_TypeOfDeflection_HeaderFile

View File

@@ -0,0 +1,35 @@
// Created by: NW,JPB,CAL
// Copyright (c) 1991-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _Aspect_TypeOfDisplayText_HeaderFile
#define _Aspect_TypeOfDisplayText_HeaderFile
//! Define the display type of the text.
//!
//! TODT_NORMAL Default display. Text only.
//! TODT_SUBTITLE There is a subtitle under the text.
//! TODT_DEKALE The text is displayed with a 3D style.
//! TODT_BLEND The text is displayed in XOR.
//! TODT_DIMENSION Dimension line under text will be invisible.
enum Aspect_TypeOfDisplayText
{
Aspect_TODT_NORMAL,
Aspect_TODT_SUBTITLE,
Aspect_TODT_DEKALE,
Aspect_TODT_BLEND,
Aspect_TODT_DIMENSION
};
#endif // _Aspect_TypeOfDisplayText_HeaderFile

View File

@@ -0,0 +1,28 @@
// Created by: NW,JPB,CAL
// Copyright (c) 1991-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _Aspect_TypeOfDrawMode_HeaderFile
#define _Aspect_TypeOfDrawMode_HeaderFile
//! Definition of the draw modes
enum Aspect_TypeOfDrawMode
{
Aspect_TODM_REPLACE,
Aspect_TODM_ERASE,
Aspect_TODM_XOR,
Aspect_TODM_XORLIGHT
};
#endif // _Aspect_TypeOfDrawMode_HeaderFile

View File

@@ -0,0 +1,29 @@
// Created by: NW,JPB,CAL
// Copyright (c) 1991-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _Aspect_TypeOfEdge_HeaderFile
#define _Aspect_TypeOfEdge_HeaderFile
//! Definition of edge visibility
//!
//! TOE_VISIBLE Edge is displayed
//! TOE_INVISIBLE Edge is not displayed
enum Aspect_TypeOfEdge
{
Aspect_TOE_VISIBLE,
Aspect_TOE_INVISIBLE
};
#endif // _Aspect_TypeOfEdge_HeaderFile

View File

@@ -0,0 +1,27 @@
// Created by: NW,JPB,CAL
// Copyright (c) 1991-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _Aspect_TypeOfFacingModel_HeaderFile
#define _Aspect_TypeOfFacingModel_HeaderFile
enum Aspect_TypeOfFacingModel
{
Aspect_TOFM_BOTH_SIDE,
Aspect_TOFM_BACK_SIDE,
Aspect_TOFM_FRONT_SIDE
};
#endif // _Aspect_TypeOfFacingModel_HeaderFile

View File

@@ -0,0 +1,31 @@
// Created by: NW,JPB,CAL
// Copyright (c) 1991-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _Aspect_TypeOfHighlightMethod_HeaderFile
#define _Aspect_TypeOfHighlightMethod_HeaderFile
//! Definition of a highlight method
//!
//! TOHM_COLOR drawn in the highlight color
//! (default white)
//! TOHM_BOUNDBOX enclosed by the boundary box
//! (default white)
enum Aspect_TypeOfHighlightMethod
{
Aspect_TOHM_COLOR,
Aspect_TOHM_BOUNDBOX
};
#endif // _Aspect_TypeOfHighlightMethod_HeaderFile

View File

@@ -0,0 +1,31 @@
// Created by: NW,JPB,CAL
// Copyright (c) 1991-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _Aspect_TypeOfLayer_HeaderFile
#define _Aspect_TypeOfLayer_HeaderFile
//! Modes of drawing for the objects in a layer
//!
//! TOL_OVERLAY, the graphic of the layer is draw
//! after the 3d graphic.
//! TOL_UNDERLAY, the graphic of the layer is draw
//! before the 3d graphic.
enum Aspect_TypeOfLayer
{
Aspect_TOL_OVERLAY,
Aspect_TOL_UNDERLAY
};
#endif // _Aspect_TypeOfLayer_HeaderFile

View File

@@ -0,0 +1,35 @@
// Created by: NW,JPB,CAL
// Copyright (c) 1991-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _Aspect_TypeOfLine_HeaderFile
#define _Aspect_TypeOfLine_HeaderFile
//! Definition of line types
//!
//! TOL_SOLID continuous
//! TOL_DASH dashed 2.0,1.0 (MM)
//! TOL_DOT dotted 0.2,0.5 (MM)
//! TOL_DOTDASH mixed 10.0,1.0,2.0,1.0 (MM)
//! TOL_USERDEFINED defined by Users
enum Aspect_TypeOfLine
{
Aspect_TOL_SOLID,
Aspect_TOL_DASH,
Aspect_TOL_DOT,
Aspect_TOL_DOTDASH,
Aspect_TOL_USERDEFINED
};
#endif // _Aspect_TypeOfLine_HeaderFile

View File

@@ -0,0 +1,53 @@
// Created by: NW,JPB,CAL
// Copyright (c) 1991-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _Aspect_TypeOfMarker_HeaderFile
#define _Aspect_TypeOfMarker_HeaderFile
//! Definition of types of markers
//!
//! TOM_POINT point .
//! TOM_PLUS plus +
//! TOM_STAR star *
//! TOM_X cross x
//! TOM_O circle O
//! TOM_O_POINT a point in a circle
//! TOM_O_PLUS a plus in a circle
//! TOM_O_STAR a star in a circle
//! TOM_O_X a cross in a circle
//! TOM_RING1 a large ring
//! TOM_RING2 a medium ring
//! TOM_RING3 a small ring
//! TOM_BALL a ball with 1 color and different saturations
//! TOM_USERDEFINED defined by Users
enum Aspect_TypeOfMarker
{
Aspect_TOM_POINT,
Aspect_TOM_PLUS,
Aspect_TOM_STAR,
Aspect_TOM_X,
Aspect_TOM_O,
Aspect_TOM_O_POINT,
Aspect_TOM_O_PLUS,
Aspect_TOM_O_STAR,
Aspect_TOM_O_X,
Aspect_TOM_RING1,
Aspect_TOM_RING2,
Aspect_TOM_RING3,
Aspect_TOM_BALL,
Aspect_TOM_USERDEFINED
};
#endif // _Aspect_TypeOfMarker_HeaderFile

View File

@@ -0,0 +1,32 @@
// Created by: NW,JPB,CAL
// Copyright (c) 1991-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _Aspect_TypeOfPrimitive_HeaderFile
#define _Aspect_TypeOfPrimitive_HeaderFile
enum Aspect_TypeOfPrimitive
{
Aspect_TOP_UNKNOWN,
Aspect_TOP_POLYLINE,
Aspect_TOP_POLYGON,
Aspect_TOP_SEGMENTS,
Aspect_TOP_ARCS,
Aspect_TOP_POLYARCS,
Aspect_TOP_POINTS,
Aspect_TOP_MARKERS
};
#endif // _Aspect_TypeOfPrimitive_HeaderFile

View File

@@ -0,0 +1,35 @@
// Created by: NW,JPB,CAL
// Copyright (c) 1991-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _Aspect_TypeOfResize_HeaderFile
#define _Aspect_TypeOfResize_HeaderFile
//! Defines the type of Resize Window method applied
//! by the user.
enum Aspect_TypeOfResize
{
Aspect_TOR_UNKNOWN,
Aspect_TOR_NO_BORDER,
Aspect_TOR_TOP_BORDER,
Aspect_TOR_RIGHT_BORDER,
Aspect_TOR_BOTTOM_BORDER,
Aspect_TOR_LEFT_BORDER,
Aspect_TOR_TOP_AND_RIGHT_BORDER,
Aspect_TOR_RIGHT_AND_BOTTOM_BORDER,
Aspect_TOR_BOTTOM_AND_LEFT_BORDER,
Aspect_TOR_LEFT_AND_TOP_BORDER
};
#endif // _Aspect_TypeOfResize_HeaderFile

View File

@@ -0,0 +1,32 @@
// Created by: NW,JPB,CAL
// Copyright (c) 1991-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _Aspect_TypeOfStyleText_HeaderFile
#define _Aspect_TypeOfStyleText_HeaderFile
//! Define the style of the text.
//!
//! TOST_NORMAL Default text. The text is displayed like any other graphic object.
//! This text can be hidden by another object that is nearest from the
//! point of view.
//! TOST_ANNOTATION The text is always visible. The texte is displayed
//! over the other object according to the priority.
enum Aspect_TypeOfStyleText
{
Aspect_TOST_NORMAL,
Aspect_TOST_ANNOTATION
};
#endif // _Aspect_TypeOfStyleText_HeaderFile

View File

@@ -0,0 +1,52 @@
// Created by: NW,JPB,CAL
// Copyright (c) 1991-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _Aspect_TypeOfTriedronEcho_HeaderFile
#define _Aspect_TypeOfTriedronEcho_HeaderFile
//! Definition of the Triedron echo zone to highlight
//!
//! TOTE_NONE no echo zone
//! TOTE_ORIGIN a box on origin of the Triedron
//! TOTE_AXIS_X highlights the X axis
//! TOTE_AXIS_Y highlights the Y axis
//! TOTE_AXIS_Z highlights the Z axis
//! TOTE_TEXT_X highlights the X character
//! TOTE_TEXT_Y highlights the Y character
//! TOTE_TEXT_Z highlights the Z character
//! TOTE_01 to TOTE_10 not yet implemented.
enum Aspect_TypeOfTriedronEcho
{
Aspect_TOTE_NONE,
Aspect_TOTE_ORIGIN,
Aspect_TOTE_AXIS_X,
Aspect_TOTE_AXIS_Y,
Aspect_TOTE_AXIS_Z,
Aspect_TOTE_TEXT_X,
Aspect_TOTE_TEXT_Y,
Aspect_TOTE_TEXT_Z,
Aspect_TOTE_01,
Aspect_TOTE_02,
Aspect_TOTE_03,
Aspect_TOTE_04,
Aspect_TOTE_05,
Aspect_TOTE_06,
Aspect_TOTE_07,
Aspect_TOTE_08,
Aspect_TOTE_09,
Aspect_TOTE_10
};
#endif // _Aspect_TypeOfTriedronEcho_HeaderFile

View File

@@ -0,0 +1,46 @@
// Created by: NW,JPB,CAL
// Copyright (c) 1991-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _Aspect_TypeOfTriedronPosition_HeaderFile
#define _Aspect_TypeOfTriedronPosition_HeaderFile
//! Definition of the Triedron position in the views
//!
//! TOTP_CENTER at the center of the view
//! TOTP_LEFT_LOWER at the left lower corner
//! TOTP_LEFT_UPPER at the left upper corner
//! TOTP_RIGHT_LOWER at the right lower corner
//! TOTP_RIGHT_UPPER at the right upper corner
//! TOTP_01 to TOTP_10 not yet implemented.
enum Aspect_TypeOfTriedronPosition
{
Aspect_TOTP_CENTER,
Aspect_TOTP_LEFT_LOWER,
Aspect_TOTP_LEFT_UPPER,
Aspect_TOTP_RIGHT_LOWER,
Aspect_TOTP_RIGHT_UPPER,
Aspect_TOTP_01,
Aspect_TOTP_02,
Aspect_TOTP_03,
Aspect_TOTP_04,
Aspect_TOTP_05,
Aspect_TOTP_06,
Aspect_TOTP_07,
Aspect_TOTP_08,
Aspect_TOTP_09,
Aspect_TOTP_10
};
#endif // _Aspect_TypeOfTriedronPosition_HeaderFile

View File

@@ -0,0 +1,29 @@
// Created by: NW,JPB,CAL
// Copyright (c) 1991-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _Aspect_TypeOfUpdate_HeaderFile
#define _Aspect_TypeOfUpdate_HeaderFile
//! Definition of screen refresh mode
//!
//! TOU_ASAP as soon as possible
//! TOU_WAIT on demand (Update)
enum Aspect_TypeOfUpdate
{
Aspect_TOU_ASAP,
Aspect_TOU_WAIT
};
#endif // _Aspect_TypeOfUpdate_HeaderFile

View File

@@ -1,15 +0,0 @@
-- Created by: bgn - Creation - 03-06-98
-- Copyright (c) 1999-2014 OPEN CASCADE SAS
--
-- This file is part of Open CASCADE Technology software library.
--
-- This library is free software; you can redistribute it and/or modify it under
-- the terms of the GNU Lesser General Public License version 2.1 as published
-- by the Free Software Foundation, with special exception defined in the file
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-- distribution for complete text of the license and disclaimer of any warranty.
--
-- Alternatively, this file may be used under the terms of Open CASCADE
-- commercial license or contractual agreement.
@set %WOKSteps_UseSourceInclude = "";

View File

@@ -0,0 +1,35 @@
// Created by: NW,JPB,CAL
// Copyright (c) 1991-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _Aspect_WidthOfLine_HeaderFile
#define _Aspect_WidthOfLine_HeaderFile
//! Definition of line types
//!
//! WOL_THIN thin line (1 pixel width)
//! WOL_MEDIUM medium width of 0.5 MM
//! WOL_THICK thick width of 0.7 MM
//! WOL_VERYTHICK very thick width of 1.5 MM
//! WOL_USERDEFINED defined by Users
enum Aspect_WidthOfLine
{
Aspect_WOL_THIN,
Aspect_WOL_MEDIUM,
Aspect_WOL_THICK,
Aspect_WOL_VERYTHICK,
Aspect_WOL_USERDEFINED
};
#endif // _Aspect_WidthOfLine_HeaderFile

View File

@@ -1,175 +0,0 @@
-- Created by: NW,JPB,CAL
-- Copyright (c) 1991-1999 Matra Datavision
-- Copyright (c) 1999-2014 OPEN CASCADE SAS
--
-- This file is part of Open CASCADE Technology software library.
--
-- This library is free software; you can redistribute it and/or modify it under
-- the terms of the GNU Lesser General Public License version 2.1 as published
-- by the Free Software Foundation, with special exception defined in the file
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-- distribution for complete text of the license and disclaimer of any warranty.
--
-- Alternatively, this file may be used under the terms of Open CASCADE
-- commercial license or contractual agreement.
deferred class Window from Aspect
---Purpose: Defines a window.
inherits
TShared from MMgt
uses
Background from Aspect,
Drawable from Aspect,
GradientBackground from Aspect,
TypeOfResize from Aspect,
FillMethod from Aspect,
GradientFillMethod from Aspect,
Handle from Aspect,
Ratio from Quantity,
Parameter from Quantity,
NameOfColor from Quantity,
Color from Quantity,
AsciiString from TCollection
raises
WindowDefinitionError from Aspect,
WindowError from Aspect
is
Initialize;
---Level: Public
---Purpose: Initializes the datas of a Window.
---------------------------------------------------
-- Category: Methods to modify the class definition
---------------------------------------------------
SetBackground ( me : mutable;
ABack : Background from Aspect );
---Level: Public
---Purpose: Modifies the window background.
---Category: Methods to modify the class definition
SetBackground ( me : mutable ;
theNameOfColor : NameOfColor from Quantity );
---Level: Public
---Purpose: Modifies the window background from a Named Color.
---Category: Methods to modify the class definition
SetBackground ( me : mutable; color : Color from Quantity );
---Level: Public
---Purpose: Modifies the window background.
---Category: Methods to modify the class definition
SetBackground( me: mutable;
ABackground: GradientBackground from Aspect);
---Level: Public
---Purpose: Modifies the window gradient background.
---Category: Methods to modify the class definition
SetBackground( me: mutable;
theFirstColor: Color from Quantity;
theSecondColor: Color from Quantity;
theFillMethod: GradientFillMethod from Aspect);
---Level: Public
---Purpose: Modifies the window gradient background.
---Category: Methods to modify the class definition
Map ( me )
raises WindowError from Aspect is deferred;
---Level: Public
---Purpose: Opens the window <me>.
---Category: Methods to modify the class definition
Unmap ( me )
raises WindowError from Aspect is deferred;
---Level: Public
---Purpose: Closes the window <me>.
---Category: Methods to modify the class definition
DoResize ( me ) returns TypeOfResize from Aspect
raises WindowError from Aspect is deferred;
---Level: Advanced
---Purpose: Apply the resizing to the window <me>.
---Category: Methods to modify the class definition
DoMapping ( me ) returns Boolean from Standard
raises WindowError from Aspect is deferred;
---Level: Advanced
---Purpose: Apply the mapping change to the window <me>.
-- and returns TRUE if the window is mapped at screen.
---Category: Methods to modify the class definition
Destroy ( me : mutable )
raises WindowError from Aspect is deferred;
---Level: Advanced
---Purpose: Destroy the Window
---Category: Methods to modify the class definition
----------------------------
-- Category: Inquire methods
----------------------------
Background ( me ) returns Background from Aspect;
---Level: Public
---Purpose: Returns the window background.
---Category: Inquire methods
BackgroundFillMethod( me ) returns FillMethod from Aspect;
---Level: Public
---Purpose: Returns the current image background fill mode.
GradientBackground ( me ) returns GradientBackground from Aspect;
---Level: Public
---Purpose: Returns the window gradient background.
IsMapped ( me ) returns Boolean from Standard is deferred;
---Level: Public
---Purpose: Returns True if the window <me> is opened
-- and False if the window is closed.
---Category: Inquire methods
IsVirtual ( me ) returns Boolean from Standard;
---Level: Public
---Purpose: Returns True if the window <me> is virtual
---Category: Inquire methods
SetVirtual ( me : mutable;
theVirtual : Boolean from Standard );
---Level: Public
---Purpose: Setup the virtual state
---Category: Inquire methods
Ratio ( me ) returns Ratio from Quantity is deferred;
---Level: Public
---Purpose: Returns The Window RATIO equal to the physical
-- WIDTH/HEIGHT dimensions
---Category: Inquire methods
Position ( me ;
X1, Y1, X2, Y2 : out Integer from Standard )
is deferred;
---Level: Public
---Purpose: Returns The Window POSITION in PIXEL
---Category: Inquire methods
Size ( me ;
Width, Height : out Integer from Standard )
is deferred;
---Level: Public
---Purpose: Returns The Window SIZE in PIXEL
---Category: Inquire methods
NativeHandle ( me ) returns Drawable from Aspect is deferred;
---Purpose: Returns native Window handle (HWND on Windows, Window with Xlib, and so on)
NativeParentHandle ( me ) returns Drawable from Aspect is deferred;
---Purpose: Returns parent of native Window handle (HWND on Windows, Window with Xlib, and so on)
fields
MyBackground : Background from Aspect is protected;
MyGradientBackground : GradientBackground from Aspect is protected;
MyBackgroundFillMethod : FillMethod from Aspect is protected;
MyIsVirtual : Boolean from Standard is protected;
end Window;

View File

@@ -15,31 +15,26 @@
// Modified: GG 28/11/00 G002
// Add BackgroundImage() and BackgroundFillMethod() methods
//-Version
//-Design Creation d'une fenetre
//-Warning
//-References
//-Language C++ 2.0
//-Declarations
// for the class
#include <Aspect_Window.ixx>
#include <Aspect_Background.hxx>
#include <Aspect_GradientBackground.hxx>
#include <Aspect_Window.hxx>
#include <Aspect_WindowDefinitionError.hxx>
#include <Aspect_WindowError.hxx>
#include <Quantity_Color.hxx>
#include <Standard_Type.hxx>
//-Aliases
//-Global data definitions
//-Destructors
//-Constructors
Aspect_Window::Aspect_Window()
: MyBackground(),
MyGradientBackground(),

View File

@@ -0,0 +1,146 @@
// Created by: NW,JPB,CAL
// Copyright (c) 1991-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _Aspect_Window_HeaderFile
#define _Aspect_Window_HeaderFile
#include <Standard.hxx>
#include <Standard_Type.hxx>
#include <Aspect_Background.hxx>
#include <Aspect_GradientBackground.hxx>
#include <Aspect_FillMethod.hxx>
#include <Standard_Boolean.hxx>
#include <MMgt_TShared.hxx>
#include <Quantity_NameOfColor.hxx>
#include <Aspect_GradientFillMethod.hxx>
#include <Aspect_TypeOfResize.hxx>
#include <Quantity_Ratio.hxx>
#include <Standard_Integer.hxx>
#include <Aspect_Drawable.hxx>
class Aspect_WindowDefinitionError;
class Aspect_WindowError;
class Aspect_Background;
class Quantity_Color;
class Aspect_GradientBackground;
class Aspect_Window;
DEFINE_STANDARD_HANDLE(Aspect_Window, MMgt_TShared)
//! Defines a window.
class Aspect_Window : public MMgt_TShared
{
public:
//! Modifies the window background.
Standard_EXPORT void SetBackground (const Aspect_Background& ABack);
//! Modifies the window background from a Named Color.
Standard_EXPORT void SetBackground (const Quantity_NameOfColor theNameOfColor);
//! 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;
//! Destroy the Window
Standard_EXPORT virtual void Destroy() = 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 Quantity_Ratio 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;
DEFINE_STANDARD_RTTI(Aspect_Window,MMgt_TShared)
protected:
//! Initializes the datas of a Window.
Standard_EXPORT Aspect_Window();
Aspect_Background MyBackground;
Aspect_GradientBackground MyGradientBackground;
Aspect_FillMethod MyBackgroundFillMethod;
Standard_Boolean MyIsVirtual;
private:
};
#endif // _Aspect_Window_HeaderFile

View File

@@ -0,0 +1,36 @@
// Created by: NW,JPB,CAL
// Copyright (c) 1991-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _Aspect_WindowDefinitionError_HeaderFile
#define _Aspect_WindowDefinitionError_HeaderFile
#include <Standard_Type.hxx>
#include <Standard_DefineException.hxx>
#include <Standard_SStream.hxx>
#include <Standard_OutOfRange.hxx>
class Aspect_WindowDefinitionError;
DEFINE_STANDARD_HANDLE(Aspect_WindowDefinitionError, Standard_OutOfRange)
#if !defined No_Exception && !defined No_Aspect_WindowDefinitionError
#define Aspect_WindowDefinitionError_Raise_if(CONDITION, MESSAGE) \
if (CONDITION) Aspect_WindowDefinitionError::Raise(MESSAGE);
#else
#define Aspect_WindowDefinitionError_Raise_if(CONDITION, MESSAGE)
#endif
DEFINE_STANDARD_EXCEPTION(Aspect_WindowDefinitionError, Standard_OutOfRange)
#endif // _Aspect_WindowDefinitionError_HeaderFile

View File

@@ -0,0 +1,36 @@
// Created by: NW,JPB,CAL
// Copyright (c) 1991-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _Aspect_WindowError_HeaderFile
#define _Aspect_WindowError_HeaderFile
#include <Standard_Type.hxx>
#include <Standard_DefineException.hxx>
#include <Standard_SStream.hxx>
#include <Standard_OutOfRange.hxx>
class Aspect_WindowError;
DEFINE_STANDARD_HANDLE(Aspect_WindowError, Standard_OutOfRange)
#if !defined No_Exception && !defined No_Aspect_WindowError
#define Aspect_WindowError_Raise_if(CONDITION, MESSAGE) \
if (CONDITION) Aspect_WindowError::Raise(MESSAGE);
#else
#define Aspect_WindowError_Raise_if(CONDITION, MESSAGE)
#endif
DEFINE_STANDARD_EXCEPTION(Aspect_WindowError, Standard_OutOfRange)
#endif // _Aspect_WindowError_HeaderFile

View File

@@ -0,0 +1,27 @@
// Created by: NW,JPB,CAL
// Copyright (c) 1991-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _Aspect_XAtom_HeaderFile
#define _Aspect_XAtom_HeaderFile
//! Defines custom identifiers(atoms) for X window custom named properties
//!
//! Category: Instantiated classes
enum Aspect_XAtom
{
Aspect_XA_DELETE_WINDOW
};
#endif // _Aspect_XAtom_HeaderFile

View File

@@ -1,17 +1,74 @@
EXTERNLIB
Aspect_WOKSteps.edl
Aspect_CMPLRS.edl
Aspect_AspectFillArea.cxx
Aspect_AspectFillArea.hxx
Aspect_AspectFillAreaDefinitionError.hxx
Aspect_AspectLine.cxx
Aspect_AspectLine.hxx
Aspect_AspectLineDefinitionError.hxx
Aspect_AspectMarker.cxx
Aspect_AspectMarker.hxx
Aspect_AspectMarkerDefinitionError.hxx
Aspect_Background.cxx
Aspect_Background.hxx
Aspect_BadAccess.hxx
Aspect_CircularGrid.cxx
Aspect_CircularGrid.hxx
Aspect_CLayer2d.hxx
Aspect_Handle.hxx
Aspect_XWD.hxx
Aspect_Units.hxx
Aspect_RenderingContext.hxx
Aspect_GraphicCallbackProc.hxx
Aspect_Display.hxx
Aspect_Drawable.hxx
Aspect_PolygonOffsetMode.hxx
Aspect_GradientBackground.cxx
Aspect_ColorScale.cxx
Aspect_ColorScale.hxx
Aspect_Convert.hxx
Aspect_DisplayConnection.hxx
Aspect_Display.hxx
Aspect_DisplayConnection.cxx
Aspect_DisplayConnection.hxx
Aspect_DisplayConnectionDefinitionError.hxx
Aspect_Drawable.hxx
Aspect_DriverDefinitionError.hxx
Aspect_FillMethod.hxx
Aspect_GenId.cxx
Aspect_GenId.hxx
Aspect_GradientBackground.cxx
Aspect_GradientBackground.hxx
Aspect_GradientFillMethod.hxx
Aspect_GraphicCallbackProc.hxx
Aspect_GraphicDeviceDefinitionError.hxx
Aspect_Grid.cxx
Aspect_Grid.hxx
Aspect_GridDrawMode.hxx
Aspect_GridType.hxx
Aspect_Handle.hxx
Aspect_HatchStyle.hxx
Aspect_IdentDefinitionError.hxx
Aspect_InteriorStyle.hxx
Aspect_PolygonOffsetMode.hxx
Aspect_PrintAlgo.hxx
Aspect_RectangularGrid.cxx
Aspect_RectangularGrid.hxx
Aspect_RenderingContext.hxx
Aspect_SequenceOfColor.hxx
Aspect_TypeOfColorScaleData.hxx
Aspect_TypeOfColorScaleOrientation.hxx
Aspect_TypeOfColorScalePosition.hxx
Aspect_TypeOfConstraint.hxx
Aspect_TypeOfDeflection.hxx
Aspect_TypeOfDisplayText.hxx
Aspect_TypeOfDrawMode.hxx
Aspect_TypeOfEdge.hxx
Aspect_TypeOfFacingModel.hxx
Aspect_TypeOfHighlightMethod.hxx
Aspect_TypeOfLayer.hxx
Aspect_TypeOfLine.hxx
Aspect_TypeOfMarker.hxx
Aspect_TypeOfPrimitive.hxx
Aspect_TypeOfResize.hxx
Aspect_TypeOfStyleText.hxx
Aspect_TypeOfTriedronEcho.hxx
Aspect_TypeOfTriedronPosition.hxx
Aspect_TypeOfUpdate.hxx
Aspect_Units.hxx
Aspect_WidthOfLine.hxx
Aspect_Window.cxx
Aspect_Window.hxx
Aspect_WindowDefinitionError.hxx
Aspect_WindowError.hxx
Aspect_XAtom.hxx
Aspect_XWD.hxx
EXTERNLIB