# ApplicationFramework
TKCAF
TPrsStd

# TPrsStd_AISPresentation Class Reference

An attribute to associate an
AIS_InteractiveObject to a label in an AIS viewer.
This attribute works in collaboration with TPrsStd_AISViewer.
Note that all the Set... and Unset... attribute
methods as well as the query methods for
visualization attributes and the HasOwn... test
methods are shortcuts to the respective
AIS_InteractiveObject settings.
.

`#include <TPrsStd_AISPresentation.hxx>`

Inheritance diagram for TPrsStd_AISPresentation:

[legend]

## Public Member Functions

Standard_EXPORT | TPrsStd_AISPresentation ()
Standard_EXPORT void | SetDisplayed (const Standard_Boolean B)
Standard_EXPORT void | Display (const Standard_Boolean update=Standard_False)
| Display presentation of object in AIS viewer. If <update> = True then AISObject is recomputed and all the visualization settings are applied .
Standard_EXPORT void | Erase (const Standard_Boolean remove=Standard_False)
| Removes the presentation of this AIS presentation attribute from the TPrsStd_AISViewer. If remove is true, this AIS presentation attribute is removed from the interactive context. .
Standard_EXPORT void | Update ()
| Recompute presentation of object and apply the visualization settings .
Standard_EXPORT Standard_GUID | GetDriverGUID () const
Standard_EXPORT void | SetDriverGUID (const Standard_GUID &guid)
Standard_EXPORT Standard_Boolean | IsDisplayed () const
| Returns true if this AIS presentation attribute is displayed. .
Standard_EXPORT Handle_AIS_InteractiveObject | GetAIS () const
| Returns AIS_InteractiveObject stored in the presentation attribute .
Standard_EXPORT Graphic3d_NameOfMaterial | Material () const
| Returns the material setting for this presentation attribute. .
Standard_EXPORT void | SetMaterial (const Graphic3d_NameOfMaterial aName)
| Sets the material aName for this presentation attribute. .
Standard_EXPORT Standard_Boolean | HasOwnMaterial () const
| Returns true if this presentation attribute already has a material setting. .
Standard_EXPORT void | UnsetMaterial ()
| Removes the material setting from this presentation attribute. .
Standard_EXPORT void | SetTransparency (const Standard_Real aValue=0.6)
| Sets the transparency value aValue for this presentation attribute. This value is 0.6 by default. .
Standard_EXPORT Standard_Real | Transparency () const
Standard_EXPORT Standard_Boolean | HasOwnTransparency () const
| Returns true if this presentation attribute already has a transparency setting. .
Standard_EXPORT void | UnsetTransparency ()
| Removes the transparency setting from this presentation attribute. .
Standard_EXPORT Quantity_NameOfColor | Color () const
Standard_EXPORT void | SetColor (const Quantity_NameOfColor aColor)
| Sets the color aColor for this presentation attribute. .
Standard_EXPORT Standard_Boolean | HasOwnColor () const
| Returns true if this presentation attribute already has a color setting. .
Standard_EXPORT void | UnsetColor ()
| Removes the color setting from this presentation attribute. .
Standard_EXPORT Standard_Real | Width () const
Standard_EXPORT void | SetWidth (const Standard_Real aWidth)
| Sets the width aWidth for this presentation attribute. .
Standard_EXPORT Standard_Boolean | HasOwnWidth () const
| Returns true if this presentation attribute already has a width setting. .
Standard_EXPORT void | UnsetWidth ()
| Removes the width setting from this presentation attribute. .
Standard_EXPORT Standard_Integer | Mode () const
Standard_EXPORT void | SetMode (const Standard_Integer theMode)
Standard_EXPORT Standard_Boolean | HasOwnMode () const
Standard_EXPORT void | UnsetMode ()
Standard_EXPORT Standard_Integer | SelectionMode () const
Standard_EXPORT void | SetSelectionMode (const Standard_Integer theSelectionMode)
Standard_EXPORT Standard_Boolean | HasOwnSelectionMode () const
Standard_EXPORT void | UnsetSelectionMode ()
Standard_EXPORT const Standard_GUID & | ID () const
| Returns the ID of the attribute. .
Standard_EXPORT Handle_TDF_Attribute | NewEmpty () const
| Returns an new empty attribute from the good end type. It is used by the copy algorithm. .
Standard_EXPORT void | Restore (const Handle(TDF_Attribute)&with)
| Restores the backuped contents from <anattribute> into this one. It is used when aborting a transaction. .
Standard_EXPORT void | Paste (const Handle(TDF_Attribute)&into, const Handle(TDF_RelocationTable)&RT) const

This method is different from the "Copy" one,
because it is used when copying an attribute from
a source structure into a target structure. This
method may paste the contents of <me> into
<intoattribute>.
The given pasted attribute can be full or empty of
its contents. But don't make a NEW! Just set the
contents!
It is possible to use <arelocationtable> to
get/set the relocation value of a source
attribute.
.

virtual Standard_EXPORT Handle_TDF_Attribute | BackupCopy () const
| Copies the attribute contents into a new other attribute. It is used by Backup(). .
virtual Standard_EXPORT void | AfterAddition ()
| Something to do after adding an Attribute to a label. .
virtual Standard_EXPORT void | BeforeRemoval ()
| Something to do before removing an Attribute from a label. .
virtual Standard_EXPORT void | BeforeForget ()
| Something to do before forgetting an Attribute to a label. .
virtual Standard_EXPORT void | AfterResume ()
| Something to do after resuming an Attribute from a label. .
virtual Standard_EXPORT Standard_Boolean | BeforeUndo (const Handle(TDF_AttributeDelta)&anAttDelta, const Standard_Boolean forceIt=Standard_False)
| Something to do before applying <anattdelta>. The returned status says if AfterUndo has been performed (true) or if this callback must be called once again further (false). If <forceit> is set to true, the method MUST perform and return true. Does nothing by default and returns true. .
virtual Standard_EXPORT Standard_Boolean | AfterUndo (const Handle(TDF_AttributeDelta)&anAttDelta, const Standard_Boolean forceIt=Standard_False)
| update AIS viewer according to delta
Standard_EXPORT const | Handle (Standard_Type)&DynamicType() const

## Static Public Member Functions

static Standard_EXPORT const Standard_GUID & | GetID ()
| Returns the GUID for TPrsStd_AISPresentation attributes. .
static Standard_EXPORT Handle_TPrsStd_AISPresentation | Set (const TDF_Label &L, const Standard_GUID &driver)
| Creates or retrieves the presentation attribute on the label L, and sets the GUID driver. .
static Standard_EXPORT void | Unset (const TDF_Label &L)
| Delete (if exist) the presentation attribute associated to the label <l>. .
static Standard_EXPORT Handle_TPrsStd_AISPresentation | Set (const Handle(TDF_Attribute)&master)
| Creates or retrieves the AISPresentation attribute attached to master. The GUID of the driver will be the GUID of master. master is the attribute you want to display. .

## Private Member Functions

Standard_EXPORT void | AISUpdate ()
| Updates AIS_InteractiveObject stored in the attribute and applies the visualization settings .
Standard_EXPORT void | AISDisplay ()
| Displays AIS_InteractiveObject stored in the attribute .
Standard_EXPORT void | AISErase (const Standard_Boolean remove=Standard_False)
| Erases AIS_InteractiveObject stored in the attribute in the viewer; If <remove> = True then AISObject is removed from AIS_InteractiveContext instead of simple erasing in the viewer .

## Private Attributes

Standard_GUID | myDriverGUID
Standard_Real | myTransparency
Quantity_NameOfColor | myColor
Graphic3d_NameOfMaterial | myMaterial
Standard_Real | myWidth
Standard_Integer | myMode
Standard_Integer | mySelectionMode
Standard_Boolean | isDisplayed
Standard_Boolean | hasOwnColor
Standard_Boolean | hasOwnMaterial
Standard_Boolean | hasOwnTransparency
Standard_Boolean | hasOwnWidth
Standard_Boolean | hasOwnMode
Standard_Boolean | hasOwnSelectionMode
Handle_AIS_InteractiveObject | myAIS

## Constructor & Destructor Documentation

Standard_EXPORT TPrsStd_AISPresentation::TPrsStd_AISPresentation | ( |  | ) |

## Member Function Documentation

virtual Standard_EXPORT void TPrsStd_AISPresentation::AfterAddition | ( |  | ) | `[virtual]`

| Reimplemented from TDF_Attribute.

virtual Standard_EXPORT void TPrsStd_AISPresentation::AfterResume | ( |  | ) | `[virtual]`

| Reimplemented from TDF_Attribute.

virtual Standard_EXPORT Standard_Boolean TPrsStd_AISPresentation::AfterUndo | ( | const Handle(TDF_AttributeDelta)& | anAttDelta,
|  | const Standard_Boolean | forceIt = `Standard_False`
| ) | `[virtual]`

| Reimplemented from TDF_Attribute.

Standard_EXPORT void TPrsStd_AISPresentation::AISDisplay | ( |  | ) | `[private]`

Standard_EXPORT void TPrsStd_AISPresentation::AISErase | ( | const Standard_Boolean | remove = `Standard_False` | ) | `[private]`

Standard_EXPORT void TPrsStd_AISPresentation::AISUpdate | ( |  | ) | `[private]`

virtual Standard_EXPORT Handle_TDF_Attribute TPrsStd_AISPresentation::BackupCopy | ( |  | ) | const`[virtual]`

| Reimplemented from TDF_Attribute.

virtual Standard_EXPORT void TPrsStd_AISPresentation::BeforeForget | ( |  | ) | `[virtual]`

| Reimplemented from TDF_Attribute.

virtual Standard_EXPORT void TPrsStd_AISPresentation::BeforeRemoval | ( |  | ) | `[virtual]`

| Reimplemented from TDF_Attribute.

virtual Standard_EXPORT Standard_Boolean TPrsStd_AISPresentation::BeforeUndo | ( | const Handle(TDF_AttributeDelta)& | anAttDelta,
|  | const Standard_Boolean | forceIt = `Standard_False`
| ) | `[virtual]`

| Reimplemented from TDF_Attribute.

Standard_EXPORT Quantity_NameOfColor TPrsStd_AISPresentation::Color | ( |  | ) | const

Standard_EXPORT void TPrsStd_AISPresentation::Display | ( | const Standard_Boolean | update = `Standard_False` | ) |

Standard_EXPORT void TPrsStd_AISPresentation::Erase | ( | const Standard_Boolean | remove = `Standard_False` | ) |

Standard_EXPORT Handle_AIS_InteractiveObject TPrsStd_AISPresentation::GetAIS | ( |  | ) | const

Standard_EXPORT Standard_GUID TPrsStd_AISPresentation::GetDriverGUID | ( |  | ) | const

static Standard_EXPORT const Standard_GUID& TPrsStd_AISPresentation::GetID | ( |  | ) | `[static]`

Standard_EXPORT const TPrsStd_AISPresentation::Handle | ( | Standard_Type |  | ) | const

| Reimplemented from TDF_Attribute.

Standard_EXPORT Standard_Boolean TPrsStd_AISPresentation::HasOwnColor | ( |  | ) | const

Standard_EXPORT Standard_Boolean TPrsStd_AISPresentation::HasOwnMaterial | ( |  | ) | const

Standard_EXPORT Standard_Boolean TPrsStd_AISPresentation::HasOwnMode | ( |  | ) | const

Standard_EXPORT Standard_Boolean TPrsStd_AISPresentation::HasOwnSelectionMode | ( |  | ) | const

Standard_EXPORT Standard_Boolean TPrsStd_AISPresentation::HasOwnTransparency | ( |  | ) | const

Standard_EXPORT Standard_Boolean TPrsStd_AISPresentation::HasOwnWidth | ( |  | ) | const

Standard_EXPORT const Standard_GUID& TPrsStd_AISPresentation::ID | ( |  | ) | const`[virtual]`

| Implements TDF_Attribute.

Standard_EXPORT Standard_Boolean TPrsStd_AISPresentation::IsDisplayed | ( |  | ) | const

Standard_EXPORT Graphic3d_NameOfMaterial TPrsStd_AISPresentation::Material | ( |  | ) | const

Standard_EXPORT Standard_Integer TPrsStd_AISPresentation::Mode | ( |  | ) | const

Standard_EXPORT Handle_TDF_Attribute TPrsStd_AISPresentation::NewEmpty | ( |  | ) | const`[virtual]`

| Implements TDF_Attribute.

Standard_EXPORT void TPrsStd_AISPresentation::Paste | ( | const Handle(TDF_Attribute)& | into,
|  | const Handle(TDF_RelocationTable)& | RT
| ) | const`[virtual]`

| Implements TDF_Attribute.

Standard_EXPORT void TPrsStd_AISPresentation::Restore | ( | const Handle(TDF_Attribute)& | with | ) | `[virtual]`

| Implements TDF_Attribute.

Standard_EXPORT Standard_Integer TPrsStd_AISPresentation::SelectionMode | ( |  | ) | const

static Standard_EXPORT Handle_TPrsStd_AISPresentation TPrsStd_AISPresentation::Set | ( | const Handle(TDF_Attribute)& | master | ) | `[static]`

static Standard_EXPORT Handle_TPrsStd_AISPresentation TPrsStd_AISPresentation::Set | ( | const TDF_Label & | L,
|  | const Standard_GUID & | driver
| ) | `[static]`

Standard_EXPORT void TPrsStd_AISPresentation::SetColor | ( | const Quantity_NameOfColor | aColor | ) |

Standard_EXPORT void TPrsStd_AISPresentation::SetDisplayed | ( | const Standard_Boolean | B | ) |

Standard_EXPORT void TPrsStd_AISPresentation::SetDriverGUID | ( | const Standard_GUID & | guid | ) |

Standard_EXPORT void TPrsStd_AISPresentation::SetMaterial | ( | const Graphic3d_NameOfMaterial | aName | ) |

Standard_EXPORT void TPrsStd_AISPresentation::SetMode | ( | const Standard_Integer | theMode | ) |

Standard_EXPORT void TPrsStd_AISPresentation::SetSelectionMode | ( | const Standard_Integer | theSelectionMode | ) |

Standard_EXPORT void TPrsStd_AISPresentation::SetTransparency | ( | const Standard_Real | aValue = `0.6` | ) |

Standard_EXPORT void TPrsStd_AISPresentation::SetWidth | ( | const Standard_Real | aWidth | ) |

Standard_EXPORT Standard_Real TPrsStd_AISPresentation::Transparency | ( |  | ) | const

static Standard_EXPORT void TPrsStd_AISPresentation::Unset | ( | const TDF_Label & | L | ) | `[static]`

Standard_EXPORT void TPrsStd_AISPresentation::UnsetColor | ( |  | ) |

Standard_EXPORT void TPrsStd_AISPresentation::UnsetMaterial | ( |  | ) |

Standard_EXPORT void TPrsStd_AISPresentation::UnsetMode | ( |  | ) |

Standard_EXPORT void TPrsStd_AISPresentation::UnsetSelectionMode | ( |  | ) |

Standard_EXPORT void TPrsStd_AISPresentation::UnsetTransparency | ( |  | ) |

Standard_EXPORT void TPrsStd_AISPresentation::UnsetWidth | ( |  | ) |

Standard_EXPORT void TPrsStd_AISPresentation::Update | ( |  | ) |

Standard_EXPORT Standard_Real TPrsStd_AISPresentation::Width | ( |  | ) | const

## Field Documentation

Standard_Boolean TPrsStd_AISPresentation::hasOwnColor`[private]`

Standard_Boolean TPrsStd_AISPresentation::hasOwnMaterial`[private]`

Standard_Boolean TPrsStd_AISPresentation::hasOwnMode`[private]`

Standard_Boolean TPrsStd_AISPresentation::hasOwnSelectionMode`[private]`

Standard_Boolean TPrsStd_AISPresentation::hasOwnTransparency`[private]`

Standard_Boolean TPrsStd_AISPresentation::hasOwnWidth`[private]`

Standard_Boolean TPrsStd_AISPresentation::isDisplayed`[private]`

Handle_AIS_InteractiveObject TPrsStd_AISPresentation::myAIS`[private]`

Quantity_NameOfColor TPrsStd_AISPresentation::myColor`[private]`

Standard_GUID TPrsStd_AISPresentation::myDriverGUID`[private]`

Graphic3d_NameOfMaterial TPrsStd_AISPresentation::myMaterial`[private]`

Standard_Integer TPrsStd_AISPresentation::myMode`[private]`

Standard_Integer TPrsStd_AISPresentation::mySelectionMode`[private]`

Standard_Real TPrsStd_AISPresentation::myTransparency`[private]`

Standard_Real TPrsStd_AISPresentation::myWidth`[private]`

The documentation for this class was generated from the following file:

- TPrsStd_AISPresentation.hxx