SessionExplorer Class Reference
[Services]

A window that displays all items in the current session. More...

#include <SessionExplorer.h>

Inheritance diagram for SessionExplorer:

Inheritance graph

List of all members.

Public Types

enum  ItemViewTypeEnum { WINDOW_ITEMS, ANIMATION_ITEMS, ELEMENT_ITEMS, PLUGIN_ITEMS }
typedef EnumWrapper
< ItemViewTypeEnum
ItemViewType

Public Member Functions

virtual void setItemViewType (ItemViewType itemView)=0
virtual ItemViewType getItemViewType () const =0
virtual void setSelectedSessionItems (const std::vector< SessionItem * > &selectedItems)=0
virtual std::vector
< SessionItem * > 
getSelectedSessionItems () const =0
template<typename T>
std::vector< T * > getSelectedSessionItems () const
virtual SessionItemgetCurrentSessionItem () const =0
virtual void setSelectedSessionItems (ItemViewType itemView, const std::vector< SessionItem * > &selectedItems)=0
virtual std::vector
< SessionItem * > 
getSelectedSessionItems (ItemViewType itemView) const =0
virtual SessionItemgetCurrentSessionItem (ItemViewType itemView) const =0
virtual void expandSessionItem (SessionItem *pItem)=0
virtual void collapseSessionItem (SessionItem *pItem)=0
virtual bool isSessionItemExpanded (SessionItem *pItem) const =0
virtual std::list
< ContextMenuAction
getContextMenuActions () const =0

Static Public Member Functions

static const std::string & signalItemViewTypeChanged ()
static const std::string & signalAboutToShowSessionItemContextMenu ()

Protected Member Functions

virtual ~SessionExplorer ()


Detailed Description

A window that displays all items in the current session.

The session explorer window contains a tab widget that contains tree views displaying all session items in the current session. The available views in the window are defined by the SessionExplorer::ItemViewType enum.

The tree view contained on each tab shows the relationship of session items to other session items. The contents of each tree view are updated automatically.

This subclass of Subject will notify upon the following conditions:

See also:
DockWindow, SessionItem

Definition at line 43 of file SessionExplorer.h.


Member Typedef Documentation

The EnumWrapper contains a given enum value and provides a isValid() method which returns true if the contained enum value is valid.

Please see How To Use EnumWrapper for more information. The wrapped enum values are SessionExplorer::ItemViewTypeEnum.

Definition at line 70 of file SessionExplorer.h.


Member Enumeration Documentation

Defines the various tree views displaying different types of session items in the session explorer.

The session explorer window contains tabs that each display a tree view of session items. This enum defines the available views and which session items are displayed. To change the active view, call setItemViewType(). The user changes the active view by clicking on a new tab in the session explorer window.

Enumerator:
WINDOW_ITEMS  Displays toolbars, dock windows, and workspace windows and their contents.

ANIMATION_ITEMS  Displays all animation controllers and their animations.

ELEMENT_ITEMS  Displays data elements and their children.

PLUGIN_ITEMS  Displays all modules, plug-ins, and currently running plug-in instances.

Definition at line 56 of file SessionExplorer.h.


Constructor & Destructor Documentation

virtual SessionExplorer::~SessionExplorer (  )  [protected, virtual]

The session explorer cannot be destroyed directly.

It is destroyed automatically on application shutdown.

Definition at line 309 of file SessionExplorer.h.


Member Function Documentation

static const std::string& SessionExplorer::signalItemViewTypeChanged (  )  [static]

Emitted with boost::any<SessionExplorer::ItemViewType> when the current tree view tab changes in the session explorer window.

See also:
setItemViewType()

Definition at line 78 of file SessionExplorer.h.

static const std::string& SessionExplorer::signalAboutToShowSessionItemContextMenu (  )  [static]

Emitted with boost::any<ContextMenu*> when the user right-clicks on a session item in the window to invoke a context menu.

This signal provides a means by which an object can be notified when a context menu is invoked by the user clicking on an item in the session explorer. To receive notification for when a context menu is invoked when the user clicks on any session item, attach to the DesktopServices::signalAboutToShowContextMenu() signal instead.

This signal is emitted after the DesktopServices::signalAboutToShowContextMenu() signal is emitted and after the signalAboutToShowContextMenu() signal is emitted, but before the context menu is shown to give attached objects a chance to add or modify the context menu of the selected session item(s) that will be displayed to the user.

Objects that attach to the DesktopServices::signalAboutToShowContextMenu() signal may also need to attach to this signal if they are interested in the selected item(s) in the session explorer.

The ContextMenu pointer value is guaranteed to be non-NULL.

See also:
Context menu calling sequence

Definition at line 106 of file SessionExplorer.h.

virtual void SessionExplorer::setItemViewType ( ItemViewType  itemView  )  [pure virtual]

Sets the current tree view tab in the session explorer window.

Parameters:
itemView The tree view type to display.
Subject Notifications:
This method will notify signalItemViewTypeChanged() with boost::any<SessionExplorer::ItemViewType> if the current tab changes.

virtual ItemViewType SessionExplorer::getItemViewType (  )  const [pure virtual]

Returns the current tree view tab in the session explorer window.

Returns:
The tree view type on the currently displayed tab.

virtual void SessionExplorer::setSelectedSessionItems ( const std::vector< SessionItem * > &  selectedItems  )  [pure virtual]

Sets the selected session items on the current view tab.

Parameters:
selectedItems The session items to select. If the vector is empty, all session items in the current view are unselected.

virtual std::vector<SessionItem*> SessionExplorer::getSelectedSessionItems (  )  const [pure virtual]

Returns the selected session items on the current view tab.

This is a convenience method that calls getItemViewType() and then getSelectedSessionItems(ItemViewType).

Returns:
The selected session items on the current view. If the returned vector is empty, no session items are selected.
See also:
getCurrentSessionItem()

template<typename T>
std::vector<T*> SessionExplorer::getSelectedSessionItems (  )  const

Returns the selected session items of a specified type on the current view tab.

This is a convenience method that gets all selected session items on the current view and filters the returned items based on the specified type.

Returns:
The selected session items of the specified type on the current view. If the returned vector is empty, no session items of the specified type are selected. The pointers in the returned vector are guaranteed to be non-NULL.
See also:
getCurrentSessionItem()

Definition at line 164 of file SessionExplorer.h.

virtual SessionItem* SessionExplorer::getCurrentSessionItem (  )  const [pure virtual]

Returns the current session item on the current view tab.

This is a convenience method that calls getItemViewType() and then getCurrentSessionItem(ItemViewType).

Returns:
The current session item on the current view. NULL is returned if no session item is current in the tree view.
See also:
getSelectedSessionItems()

virtual void SessionExplorer::setSelectedSessionItems ( ItemViewType  itemView,
const std::vector< SessionItem * > &  selectedItems 
) [pure virtual]

Sets the selected session items on a given view tab.

Parameters:
itemView The view in which to select the session items.
selectedItems The session items to select. If the vector is empty, all session items in the given view are unselected.

virtual std::vector<SessionItem*> SessionExplorer::getSelectedSessionItems ( ItemViewType  itemView  )  const [pure virtual]

Returns the selected session items on a given view tab.

This method returns the currently selected session items on the given view tab, which may be different than the current session item.

Parameters:
itemView The view in which to get the selected session items.
Returns:
The selected session items. If the returned vector is empty, no session items are selected on the given view tab.
See also:
getCurrentSessionItem(ItemViewType)

virtual SessionItem* SessionExplorer::getCurrentSessionItem ( ItemViewType  itemView  )  const [pure virtual]

Returns the current session item on a given view tab.

This method returns the current session item on the given view tab, which may be different than the selected session items. The current item is identified in the tree view by a focus rectangle.

Parameters:
itemView The view in which to get the current session item.
Returns:
The current session item on the given view. NULL is returned if no session item is current in the tree view.
See also:
getSelectedSessionItems(ItemViewType)

virtual void SessionExplorer::expandSessionItem ( SessionItem pItem  )  [pure virtual]

Expands a given session item on the current view tab.

This method expands the node in the tree view for the given session item to display its children. This method does nothing if the session item is not displayed in the current tree view or if the session item has no child items.

Parameters:
pItem The session item to expand in the view.
See also:
collapseSessionItem()

virtual void SessionExplorer::collapseSessionItem ( SessionItem pItem  )  [pure virtual]

Collapes a given session item on the current view tab.

This method collapses the node in the tree view for the given session item to hide its children. This method does nothing if the session item is not displayed in the current tree view or if the session item has no child items.

Parameters:
pItem The session item to collapse in the view.
See also:
expandSessionItem()

virtual bool SessionExplorer::isSessionItemExpanded ( SessionItem pItem  )  const [pure virtual]

Queries whether a given session item is expanded on the current view tab.

This method collapses the node in the tree view for the given session item to hide its children. This method does nothing if the session item is not displayed in the current tree view or if the session item has no child items.

Parameters:
pItem The session item in the view to query for its expanded state.
Returns:
Returns true if the given session item is expanded in the current view and its children are displayed; otherwise returns false.
See also:
expandSessionItem(), collapseSessionItem()

virtual std::list<ContextMenuAction> SessionExplorer::getContextMenuActions (  )  const [pure virtual]

Returns the context menu actions available for this session item.

Returns:
The list of context menu actions that should be displayed when the user right-clicks on a widget displaying or containing the session item.
See also:
ContextMenuAction

Default Implementation:
The default implementation returns the context menu actions listed here. If the user has clicked on a session item in the current tree view, the actions returned by this method are not displayed, but rather the actions for the selected session item(s) are displayed instead. These default actions can be removed or additional actions can be added by attaching to the signalAboutToShowContextMenu() signal. To override the default actions of the selected session item(s) attach to the signalAboutToShowSessionItemContextMenu() signal instead.

Implements DockWindow.


Software Development Kit - Opticks 4.9.0 Build 16218