# Visualization
TKV2d
AIS2D

# AIS2D_LocalContext Class Reference

defines a specific context for selection: One can
loads InteractiveObjects with a mode to be
activated associate InteractiveObjects with a
set of temporary selectable Objects

`#include <AIS2D_LocalContext.hxx>`

## Public Member Functions

Standard_EXPORT | AIS2D_LocalContext ()
| Constructor By Default, the displayed objects are automatically loaded. .
Standard_EXPORT | AIS2D_LocalContext (const Handle(AIS2D_InteractiveContext)&aCtx, const Standard_Integer anIndex, const Standard_Boolean LoadDisplayed=Standard_True, const Standard_Boolean AcceptStdModes=Standard_True, const Standard_Boolean AcceptErase=Standard_False)
| Constructor .
Standard_EXPORT Standard_Boolean | Display (const Handle(AIS2D_InteractiveObject)&anIObj, const Standard_Integer DisplayMode=0, const Standard_Boolean AllowDecomp=Standard_True, const Standard_Integer ActivationMode=0)
Standard_EXPORT Standard_Boolean | Load (const Handle(AIS2D_InteractiveObject)&anIObj, const Standard_Boolean AllowDecomp=Standard_True, const Standard_Integer ActivationMode=0)
Standard_EXPORT Standard_Boolean | Erase (const Handle(AIS2D_InteractiveObject)&anIObj)
Standard_EXPORT Standard_Boolean | Remove (const Handle(AIS2D_InteractiveObject)&aSelObj)
Standard_EXPORT void | LoadContextObjects ()
Standard_EXPORT void | UnloadContextObjects ()
Standard_EXPORT void | Terminate ()
Standard_EXPORT void | Clear (const AIS2D_ClearMode aType=AIS2D_CM_All)
| according to <atype>, clears the different parts of the selector (filters, modeof activation, objects...)
Standard_EXPORT void | HighlightPicked (const Standard_Boolean UpdateVwr=Standard_True)
Standard_EXPORT void | UnhighlightPicked (const Standard_Boolean UpdateVwr=Standard_True)
Standard_EXPORT void | UpdateSelected (const Standard_Boolean UpdateVwr=Standard_True)
Standard_EXPORT void | SetSelected (const Handle(AIS2D_InteractiveObject)&anIObj, const Standard_Boolean UpdateVwr=Standard_True)
| useful to update selection with objects coming from Collector or stack
Standard_EXPORT void | AddOrRemoveSelected (const Handle(AIS2D_InteractiveObject)&anIObj, const Standard_Boolean UpdateVwr=Standard_True)
| useful to update selection with objects coming from Collector or stack
Standard_EXPORT Standard_Boolean | IsSelected (const Handle(AIS2D_InteractiveObject)&anIObj) const
Standard_EXPORT Handle_AIS2D_InteractiveObject | SelectedIO () const
Standard_EXPORT void | SetDisplayPriority (const Handle(AIS2D_InteractiveObject)&anIObj, const Standard_Integer Prior)
Standard_EXPORT Standard_Integer | DisplayedObjects (TColStd_MapOfTransient &theMapToFill) const
Standard_EXPORT Standard_Boolean | IsDisplayed (const Handle(AIS2D_InteractiveObject)&anIObj) const
Standard_EXPORT Standard_Boolean | IsDisplayed (const Handle(AIS2D_InteractiveObject)&anIObj, const Standard_Integer aMode) const
Standard_EXPORT void | Unhighlight (const Handle(AIS2D_InteractiveObject)&anIObj)
Standard_EXPORT Standard_Boolean | IsHighlight (const Handle(AIS2D_InteractiveObject)&anIObj) const
Standard_EXPORT Standard_Boolean | IsHighlight (const Handle(AIS2D_InteractiveObject)&anIObj, Standard_Boolean &WithColor, Quantity_NameOfColor &HiCol) const
Standard_EXPORT Standard_Boolean | IsIn (const Handle(AIS2D_InteractiveObject)&anIObj) const
Standard_EXPORT void | SubIntensityOn (const Handle(AIS2D_InteractiveObject)&anIObj)
Standard_EXPORT void | SubIntensityOff (const Handle(AIS2D_InteractiveObject)&anIObj)
Standard_EXPORT Standard_Boolean | UnhighLastDetect (const Handle(V2d_View)&aView)
Standard_EXPORT AIS2D_StatusOfDetection | MoveTo (const Standard_Integer Xpix, const Standard_Integer Ypix, const Handle(V2d_View)&aView)
Standard_EXPORT AIS2D_StatusOfPick | Select (const Standard_Boolean UpdateVwr=Standard_True)
Standard_EXPORT AIS2D_StatusOfPick | ShiftSelect (const Standard_Boolean UpdateVwr=Standard_True)
Standard_EXPORT void | ClearSelected (const Standard_Boolean UpdateVwr=Standard_True)
Standard_EXPORT const | Handle (Standard_Type)&DynamicType() const

## Private Member Functions

Standard_EXPORT void | ClearObjects ()
Standard_EXPORT void | ClearDetected ()
Standard_EXPORT Standard_Boolean | IsValidForSelection (const Handle(AIS2D_InteractiveObject)&anIObj) const
Standard_EXPORT void | DrawObject (const Handle(AIS2D_InteractiveObject)&anObj, const Standard_Integer aDispMode)
Standard_EXPORT Standard_Integer | DetectedIndex ()
Standard_EXPORT const Handle_AIS2D_LocalStatus & | Status (const Handle(AIS2D_InteractiveObject)&anObject) const

## Private Attributes

Handle_AIS2D_InteractiveContext | myICTX
AIS2D_DataMapOfLocStat | myActiveObjects
Handle_AIS2D_InteractiveObject | myLastPicked
Handle_AIS2D_InteractiveObject | myLastinMain
Handle_Graphic2d_Primitive | myLastSelPrim
Handle_Graphic2d_Primitive | myLastPickPrim
Standard_Integer | myLastPickElInd
Standard_Integer | myLastSelElInd
Standard_Boolean | myLoadDisplayed
Standard_Boolean | myAcceptStdMode
Standard_Boolean | myAcceptErase
TColStd_ListOfInteger | myListOfStdMode
Standard_Boolean | myAutoHighlight
Standard_Integer | myLastIndex
Standard_Integer | myLastGood
TColStd_SequenceOfInteger | myDetectedSeq
Standard_Integer | myCurDetected
Standard_Boolean | myResetDetect

## Friends

Standard_EXPORT Standard_Boolean | AIS2D_InteractiveContext::KeepTemporary (const Handle(AIS2D_InteractiveObject)&anIObj, const Standard_Integer InWhichLocal)
| Changes the status of a temporary object it will be -- kept at the neutral point, i.e. put in the list of displayed objects, with its temporary attributes (displaymode,selection mode) returns true if done -- inWhichLocal means that gives the local context in which <aniobj> is displayed. By default, -1 means the last opened one .

## Constructor & Destructor Documentation

Standard_EXPORT AIS2D_LocalContext::AIS2D_LocalContext | ( |  | ) |

Standard_EXPORT AIS2D_LocalContext::AIS2D_LocalContext | ( | const Handle(AIS2D_InteractiveContext)& | aCtx,
|  | const Standard_Integer | anIndex,
|  | const Standard_Boolean | LoadDisplayed = `Standard_True`,
|  | const Standard_Boolean | AcceptStdModes = `Standard_True`,
|  | const Standard_Boolean | AcceptErase = `Standard_False`
| ) |

## Member Function Documentation

Standard_EXPORT void AIS2D_LocalContext::AddOrRemoveSelected | ( | const Handle(AIS2D_InteractiveObject)& | anIObj,
|  | const Standard_Boolean | UpdateVwr = `Standard_True`
| ) |

Standard_EXPORT void AIS2D_LocalContext::Clear | ( | const AIS2D_ClearMode | aType = `AIS2D_CM_All` | ) |

Standard_EXPORT void AIS2D_LocalContext::ClearDetected | ( |  | ) | `[private]`

Standard_EXPORT void AIS2D_LocalContext::ClearObjects | ( |  | ) | `[private]`

Standard_EXPORT void AIS2D_LocalContext::ClearSelected | ( | const Standard_Boolean | UpdateVwr = `Standard_True` | ) |

Standard_EXPORT Standard_Integer AIS2D_LocalContext::DetectedIndex | ( |  | ) | `[private]`

Standard_EXPORT Standard_Boolean AIS2D_LocalContext::Display | ( | const Handle(AIS2D_InteractiveObject)& | anIObj,
|  | const Standard_Integer | DisplayMode = `0`,
|  | const Standard_Boolean | AllowDecomp = `Standard_True`,
|  | const Standard_Integer | ActivationMode = `0`
| ) |

Standard_EXPORT Standard_Integer AIS2D_LocalContext::DisplayedObjects | ( | TColStd_MapOfTransient & | theMapToFill | ) | const

Standard_EXPORT void AIS2D_LocalContext::DrawObject | ( | const Handle(AIS2D_InteractiveObject)& | anObj,
|  | const Standard_Integer | aDispMode
| ) | `[private]`

Standard_EXPORT Standard_Boolean AIS2D_LocalContext::Erase | ( | const Handle(AIS2D_InteractiveObject)& | anIObj | ) |

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

Standard_EXPORT void AIS2D_LocalContext::HighlightPicked | ( | const Standard_Boolean | UpdateVwr = `Standard_True` | ) |

Standard_EXPORT Standard_Boolean AIS2D_LocalContext::IsDisplayed | ( | const Handle(AIS2D_InteractiveObject)& | anIObj,
|  | const Standard_Integer | aMode
| ) | const

Standard_EXPORT Standard_Boolean AIS2D_LocalContext::IsDisplayed | ( | const Handle(AIS2D_InteractiveObject)& | anIObj | ) | const

Standard_EXPORT Standard_Boolean AIS2D_LocalContext::IsHighlight | ( | const Handle(AIS2D_InteractiveObject)& | anIObj,
|  | Standard_Boolean & | WithColor,
|  | Quantity_NameOfColor & | HiCol
| ) | const

Standard_EXPORT Standard_Boolean AIS2D_LocalContext::IsHighlight | ( | const Handle(AIS2D_InteractiveObject)& | anIObj | ) | const

Standard_EXPORT Standard_Boolean AIS2D_LocalContext::IsIn | ( | const Handle(AIS2D_InteractiveObject)& | anIObj | ) | const

Standard_EXPORT Standard_Boolean AIS2D_LocalContext::IsSelected | ( | const Handle(AIS2D_InteractiveObject)& | anIObj | ) | const

Standard_EXPORT Standard_Boolean AIS2D_LocalContext::IsValidForSelection | ( | const Handle(AIS2D_InteractiveObject)& | anIObj | ) | const`[private]`

Standard_EXPORT Standard_Boolean AIS2D_LocalContext::Load | ( | const Handle(AIS2D_InteractiveObject)& | anIObj,
|  | const Standard_Boolean | AllowDecomp = `Standard_True`,
|  | const Standard_Integer | ActivationMode = `0`
| ) |

Standard_EXPORT void AIS2D_LocalContext::LoadContextObjects | ( |  | ) |

Standard_EXPORT AIS2D_StatusOfDetection AIS2D_LocalContext::MoveTo | ( | const Standard_Integer | Xpix,
|  | const Standard_Integer | Ypix,
|  | const Handle(V2d_View)& | aView
| ) |

Standard_EXPORT Standard_Boolean AIS2D_LocalContext::Remove | ( | const Handle(AIS2D_InteractiveObject)& | aSelObj | ) |

Standard_EXPORT AIS2D_StatusOfPick AIS2D_LocalContext::Select | ( | const Standard_Boolean | UpdateVwr = `Standard_True` | ) |

Standard_EXPORT Handle_AIS2D_InteractiveObject AIS2D_LocalContext::SelectedIO | ( |  | ) | const

Standard_EXPORT void AIS2D_LocalContext::SetDisplayPriority | ( | const Handle(AIS2D_InteractiveObject)& | anIObj,
|  | const Standard_Integer | Prior
| ) |

Standard_EXPORT void AIS2D_LocalContext::SetSelected | ( | const Handle(AIS2D_InteractiveObject)& | anIObj,
|  | const Standard_Boolean | UpdateVwr = `Standard_True`
| ) |

Standard_EXPORT AIS2D_StatusOfPick AIS2D_LocalContext::ShiftSelect | ( | const Standard_Boolean | UpdateVwr = `Standard_True` | ) |

Standard_EXPORT const Handle_AIS2D_LocalStatus& AIS2D_LocalContext::Status | ( | const Handle(AIS2D_InteractiveObject)& | anObject | ) | const`[private]`

Standard_EXPORT void AIS2D_LocalContext::SubIntensityOff | ( | const Handle(AIS2D_InteractiveObject)& | anIObj | ) |

Standard_EXPORT void AIS2D_LocalContext::SubIntensityOn | ( | const Handle(AIS2D_InteractiveObject)& | anIObj | ) |

Standard_EXPORT void AIS2D_LocalContext::Terminate | ( |  | ) |

Standard_EXPORT Standard_Boolean AIS2D_LocalContext::UnhighLastDetect | ( | const Handle(V2d_View)& | aView | ) |

Standard_EXPORT void AIS2D_LocalContext::Unhighlight | ( | const Handle(AIS2D_InteractiveObject)& | anIObj | ) |

Standard_EXPORT void AIS2D_LocalContext::UnhighlightPicked | ( | const Standard_Boolean | UpdateVwr = `Standard_True` | ) |

Standard_EXPORT void AIS2D_LocalContext::UnloadContextObjects | ( |  | ) |

Standard_EXPORT void AIS2D_LocalContext::UpdateSelected | ( | const Standard_Boolean | UpdateVwr = `Standard_True` | ) |

## Friends And Related Function Documentation

Standard_EXPORT Standard_Boolean AIS2D_InteractiveContext::KeepTemporary | ( | const Handle(AIS2D_InteractiveObject)& | anIObj,
|  | const Standard_Integer | InWhichLocal
| ) | `[friend]`

## Field Documentation

Standard_Boolean AIS2D_LocalContext::myAcceptErase `[private]`

Standard_Boolean AIS2D_LocalContext::myAcceptStdMode `[private]`

AIS2D_DataMapOfLocStat AIS2D_LocalContext::myActiveObjects `[private]`

Standard_Boolean AIS2D_LocalContext::myAutoHighlight `[private]`

Standard_Integer AIS2D_LocalContext::myCurDetected `[private]`

TColStd_SequenceOfInteger AIS2D_LocalContext::myDetectedSeq `[private]`

Handle_AIS2D_InteractiveContext AIS2D_LocalContext::myICTX `[private]`

Standard_Integer AIS2D_LocalContext::myLastGood `[private]`

Standard_Integer AIS2D_LocalContext::myLastIndex `[private]`

Handle_AIS2D_InteractiveObject AIS2D_LocalContext::myLastinMain `[private]`

Handle_AIS2D_InteractiveObject AIS2D_LocalContext::myLastPicked `[private]`

Standard_Integer AIS2D_LocalContext::myLastPickElInd `[private]`

Handle_Graphic2d_Primitive AIS2D_LocalContext::myLastPickPrim `[private]`

Standard_Integer AIS2D_LocalContext::myLastSelElInd `[private]`

Handle_Graphic2d_Primitive AIS2D_LocalContext::myLastSelPrim `[private]`

TColStd_ListOfInteger AIS2D_LocalContext::myListOfStdMode `[private]`

Standard_Boolean AIS2D_LocalContext::myLoadDisplayed `[private]`

Standard_Boolean AIS2D_LocalContext::myResetDetect `[private]`

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

- AIS2D_LocalContext.hxx