Home

PART_CONTEXT Class Reference
[Scheme Toolkit Support]

The PART_CONTEXT object. More...

#include <part_ctx.hxx>

Inheritance diagram for PART_CONTEXT:

Inheritance graph
[legend]
Collaboration diagram for PART_CONTEXT:

Collaboration graph
[legend]

List of all members.

Public Member Functions

virtual void Activate ()=0
 Make this the active PART_CONTEXT.
virtual void add (ENTITY *ent, logical displayable=TRUE)=0
 Add an ENTITY to this PART_CONTEXT.
virtual void AddRenderingObject (RenderingObject *)=0
 Add the given RenderingObject to every rendering manager's view.
virtual logical contains_view (const SchemeView &)=0
 Does this PART_CONTEXT contain the given SchemeView?
virtual logical get_auto_display ()=0
 Display entities when they are added to the PART_CONTEXT?
virtual scm_pick_managerGetPickManager ()=0
 Get the pick manager associated with this PART_CONTEXT.
virtual void modified (ENTITY *ent, logical)=0
 Update an ENTITY to this PART_CONTEXT when it has been modified.
virtual PARTPart ()=0
 Returns the PART associated with this PART_CONTEXT.
virtual void refresh (logical update_sils=FALSE)=0
 Refresh the view(s) associated with this PART_CONTEXT.
virtual void remove (ENTITY *ent)=0
 Remove an ENTITY from this PART_CONTEXT.
virtual void RemoveRenderingObject (RenderingObject *)=0
 Remove the given RenderingObject from every rendering manager's view.
virtual void set_auto_display (logical onoff)=0
 Control if entities are displayed when they are added to the PART_CONTEXT.
virtual ~PART_CONTEXT ()
 Virtual destructor.


Detailed Description

The PART_CONTEXT object.


Role: This is a pure virtual base class. Hence, it can only be derived from. Since this is within our Scheme code, it is meant as an example of how to provide a means of connecting a PART with the underlying rendering component.

The PART_CONTEXT class creates an association between a PART and the display of the PART. It contains a PART which keeps track of a collection of ENTITIES which define the PART. The PART_CONTEXT class is an example of a way to manage PART with the display.

For example, Scheme was originally written based on GI. For this, we implemented the GI_PART_CONTEXT class, which is derived from PART_CONTEXT. More recently, Scheme added support for HOOPS. For this, we implemented the HA_PART_CONTEXT, which is derived from PART_CONTEXT. (Note that GI_PART_CONTEXT and HA_PART_CONTEXT are not documented, as they are simply implementations of this pure virtual base class, which is documented.)

While a PART_CONTEXT is not required for interfacing the PART to the underlying rendering component, the PART_CONTEXT class is a good example of how to do so. The PART_CONTEXT has the entity callback functions to the PART, so the rendering component gets notified of entity events, such as entity creation, deletion, updating, and rollback, etc. When an entity is added to the PART, it gets passed to the PART_CONTEXT, which in turn passes it on to all of its rendering contexts and views. PART_CONTEXT maintains a flag regarding whether or not to display entities from the PART.

See also:
active_part_context, get_part_context, PART, RenderingObject, scm_pick_manager

Constructor & Destructor Documentation

virtual PART_CONTEXT::~PART_CONTEXT (  )  [inline, virtual]

Virtual destructor.


Member Function Documentation

virtual void PART_CONTEXT::Activate (  )  [pure virtual]

Make this the active PART_CONTEXT.

virtual void PART_CONTEXT::add ( ENTITY ent,
logical  displayable = TRUE 
) [pure virtual]

Add an ENTITY to this PART_CONTEXT.

virtual void PART_CONTEXT::AddRenderingObject ( RenderingObject  )  [pure virtual]

Add the given RenderingObject to every rendering manager's view.

virtual logical PART_CONTEXT::contains_view ( const SchemeView &   )  [pure virtual]

Does this PART_CONTEXT contain the given SchemeView?

virtual logical PART_CONTEXT::get_auto_display (  )  [pure virtual]

Display entities when they are added to the PART_CONTEXT?

virtual scm_pick_manager* PART_CONTEXT::GetPickManager (  )  [pure virtual]

Get the pick manager associated with this PART_CONTEXT.

virtual void PART_CONTEXT::modified ( ENTITY ent,
logical   
) [pure virtual]

Update an ENTITY to this PART_CONTEXT when it has been modified.

virtual PART* PART_CONTEXT::Part (  )  [pure virtual]

Returns the PART associated with this PART_CONTEXT.

virtual void PART_CONTEXT::refresh ( logical  update_sils = FALSE  )  [pure virtual]

Refresh the view(s) associated with this PART_CONTEXT.

virtual void PART_CONTEXT::remove ( ENTITY ent  )  [pure virtual]

Remove an ENTITY from this PART_CONTEXT.

virtual void PART_CONTEXT::RemoveRenderingObject ( RenderingObject  )  [pure virtual]

Remove the given RenderingObject from every rendering manager's view.

virtual void PART_CONTEXT::set_auto_display ( logical  onoff  )  [pure virtual]

Control if entities are displayed when they are added to the PART_CONTEXT.