# IRsStackPanelViewDecorator Interface Reference

Inherits IUnknown.

List of all members.

## Public Member Functions
HRESULT | SetPanelsContainer ([in] IRsPanelObjContainer *pPanels)
HRESULT | GetPanelsContainer ([out, retval] IRsPanelObjContainer **ppPanels)
HRESULT | AddPanel ([in] BSTR bsRootNodeName,[in] BSTR bsTitle,[in] RtUlong uAspect,[in] RtPanelViewType uType,[in] RtBool bShowAspectBtn)
HRESULT | RemoveType ([in] RtPanelViewType uType)
HRESULT | InitializeViewControl ([in] IRsStackPanelView *pViewControl)
HRESULT | DeactivateViewControl (void)
HRESULT | RedrawView ([in] RtBool bEnableRedraw)
HRESULT | GetPanelScanner ([out, retval] IRsPanelScanner **ppPanelScanner)
HRESULT | OnResizeView ([in] LPCRECT pNewRect)
HRESULT | GetPanelsRect ([out, retval] RECT *pPanelsRect)
HRESULT | UpdatePanelsRect (void)
HRESULT | SwitchExpandStateByPos ([in] POINT ptPosition)
HRESULT | ClosePanelByPos ([in] POINT ptPosition)
HRESULT | ClosePanelByScreenPos ([in] POINT ptPosition)
HRESULT | UpdateAspectByPos ([in] POINT ptPosition)
HRESULT | ClosePanelByName ([in] BSTR bszPanelName)
HRESULT | Invalidate ()
HRESULT | SetDraggedItem ([in] POINT ptPosition)
HRESULT | GetDraggedPanel ([out, retval] IRsPanelObj **ppPanel)
HRESULT | GetPanelUnderPoint ([in] POINT pt,[out, retval] IRsPanelObj **ppPanel)
HRESULT | GetDockInfoInRect ([in] POINT pntCursor,[in] IRsNode *pDockingNode,[out] RECT *pDockRect,[out] BSTR *pDockCommand)
## Properties
RtUlong * | AddMode`[get]`
RtUlong | AddMode`[set]`
BSTR | PivotRoot`[set]`
BSTR * | PivotRoot`[get]`
RtUlong | PivotIndex`[set]`
RtUlong * | PivotIndex`[get]`

## Detailed Description

The IRsStackPanelViewDecorator interface provides methods for working with panel objects in stack view like adding removing, resizing etc.

## Member Function Documentation

HRESULT IRsStackPanelViewDecorator::SetPanelsContainer | ( | [in] IRsPanelObjContainer * | pPanels | ) |

Set panel's container to stack panel view decorator.

Parameters:

  | pPanels | [in] Parameter contains new panel objects array.

HRESULT IRsStackPanelViewDecorator::GetPanelsContainer | ( | [out, retval] IRsPanelObjContainer ** | ppPanels | ) |

Get panel's container of stack panel view decorator.

Returns:
  ppPanels [out, retval] Pointer to interface that retrieve actual panel object container, that contain all panels of stack view.

HRESULT IRsStackPanelViewDecorator::AddPanel | ( | [in] BSTR | bsRootNodeName,
|  | [in] BSTR | bsTitle,
|  | [in] RtUlong | uAspect,
|  | [in] RtPanelViewType | uType,
|  | [in] RtBool | bShowAspectBtn |
| ) |  |  |

Add panel to stack panel view.

Parameters:

  | bsRootNodeName | [in] Root of node that will be attached to added panel object.
  | bsTitle | [in] Title of panel object. If string is empty as title is used name of attached node.
  | uAspect | [in] Current aspect.
  | uType | [in] Panel view type.
  | bShowAspectBtn | [in] Set aspect button visible if true, or hide if false.

HRESULT IRsStackPanelViewDecorator::RemoveType | ( | [in] RtPanelViewType | uType | ) |

Removes all panels of specified panel view type from stack panel view.

Parameters:

  | uType | [in] The panel view type. All panels of this type will be removed.

HRESULT IRsStackPanelViewDecorator::InitializeViewControl | ( | [in] IRsStackPanelView * | pViewControl | ) |

Initialize stack view control.

Parameters:

  | pViewControl | [in] Initial stack view control.

HRESULT IRsStackPanelViewDecorator::DeactivateViewControl | ( | void |  | ) |

Deactivate view control.

HRESULT IRsStackPanelViewDecorator::RedrawView | ( | [in] RtBool | bEnableRedraw | ) |

Method sets redraw on and off.

- If redraw is turned on, stack view control is automatically redrawn.

Parameters:

  | bEnableRedraw | [in] If true, redraw is set to on, if false redraw is set to off.

HRESULT IRsStackPanelViewDecorator::GetPanelScanner | ( | [out, retval] IRsPanelScanner ** | ppPanelScanner | ) |

Call this method to retrieve panel's scanner object.

Returns:
  ppPanelScanner [out, retval] Retrieved scanner object.

HRESULT IRsStackPanelViewDecorator::OnResizeView | ( | [in] LPCRECT | pNewRect | ) |

Handle resize of view control.

Parameters:

  | pNewRect | [in] Parameter is not used.

HRESULT IRsStackPanelViewDecorator::GetPanelsRect | ( | [out, retval] RECT * | pPanelsRect | ) |

Gets bounding rectangle of panels in stack view.

Parameters:

  | pPanelsRect | [out, retval] Pointer to a variable of type RECT that retrieves bounding rectangle of panels in stack view coordinates.

HRESULT IRsStackPanelViewDecorator::UpdatePanelsRect | ( | void |  | ) |

Update bounding rectangle of panels.

HRESULT IRsStackPanelViewDecorator::SwitchExpandStateByPos | ( | [in] POINT | ptPosition | ) |

Switch expand state of panel specified by its position.

Parameters:

  | ptPosition | [in] Position of panel object in stack view coordinates.

HRESULT IRsStackPanelViewDecorator::ClosePanelByPos | ( | [in] POINT | ptPosition | ) |

Close panel specified by its position.

Parameters:

  | ptPosition | [in] Position of panel object in stack view coordinates.

HRESULT IRsStackPanelViewDecorator::ClosePanelByScreenPos | ( | [in] POINT | ptPosition | ) |

Close panel specified by its position in screen coordinates.

Parameters:

  | ptPosition | [in] Position of panel object in screen coordinates.

HRESULT IRsStackPanelViewDecorator::UpdateAspectByPos | ( | [in] POINT | ptPosition | ) |

Update aspect of panel specified by its position.

Parameters:

  | ptPosition | [in] Position of panel object in stack view coordinates.

HRESULT IRsStackPanelViewDecorator::ClosePanelByName | ( | [in] BSTR | bszPanelName | ) |

Close panel specified by its name.

Parameters:

  | bszPanelName | [in] Root of panel node attached to panel that will be closed.

HRESULT IRsStackPanelViewDecorator::Invalidate | ( |  | ) |

Close all panels that doesn't exist and recalculate rectangles of existing panels.

HRESULT IRsStackPanelViewDecorator::SetDraggedItem | ( | [in] POINT | ptPosition | ) |

Set panel specified by its position as dragged.

Parameters:

  | ptPosition | [in] Position of panel object in stack view coordinates.

HRESULT IRsStackPanelViewDecorator::GetDraggedPanel | ( | [out, retval] IRsPanelObj ** | ppPanel | ) |

Call this method to retrieve dragged panel.

- If no panel is dragged return S_FALSE.

Returns:
  ppPanel [out, retval] Retrieved dragged panel object.

HRESULT IRsStackPanelViewDecorator::GetPanelUnderPoint | ( | [in] POINT | pt,
|  | [out, retval] IRsPanelObj ** | ppPanel |
| ) |  |  |

Call this method to retrieve panel under point.

- If no panel is under point return S_FALSE.

Parameters:

  | pt[in] | Reference point in screen coordinates.

Returns:
  ppPanel [out, retval] Retrieved panel object under point.

HRESULT IRsStackPanelViewDecorator::GetDockInfoInRect | ( | [in] POINT | pntCursor,
|  | [in] IRsNode * | pDockingNode,
|  | [out] RECT * | pDockRect,
|  | [out] BSTR * | pDockCommand |
| ) |  |  |

Call this method to get dock info.

Parameters:

  | pntCursor | [in] Cursor position in screen coordinates.
  | pDockingNode | [in] Docking frame window node.
  | pDockRect | [out] Rectangle of panel under cursor. Or rectangle of stack view without panels. In virtual screen coordinates.
  | pDockCommand | [out] Pointer retrieves command that should be execute for docking.

Returns:
  S_OK if found panel under cursor.

  S_FALSE if stack view is empty of there is no panel under cursor.

## Property Documentation

RtUlong* IRsStackPanelViewDecorator::AddMode`[get]`

Get decorator addition mode.

Returns:
  pVal [out, retval] Pointer to a variable of type RtUlong, that retrieves actual add mode flags. See list of possible flags:
  - SPVDAM_ADD Add panel.
  - SPVDAM_TOP Can`t be used with SPVDAM_BOTTOM.
  - SPVDAM_BOTTOM Can`t be used with SPVDAM_TOP.
  - SPVDAM_REPLACE Replace panel, set referenced panel with SetSecPanelRoot().
  - SPVDAM_INSERT Insert after (if SPVDAM_BOTTOM) or before (with SPVDAM_TOP) panel obj., set referenced panel with SetSecPanelRoot().
  - SPVDAM_REMOVEALL Remove all panels.
  - SPVDAM_UNIQUE Allow only one copy of node in stack.
  - SPVDAM_UNIQUE_ASPECT Allow more copies of node in stack, but not with same active aspect.
  - SPVDAM_SWITCH_ASPECT Find node and swich aspect.
  - SPVDAM_MOVE Find node and move by additional flags (SPVDAM_TOP / SPVDAM_BOTTOM).
  - SPVDAM_REMOVETYPE Remove other panels of same group.
  - SPVDAM_RESETSCROLLBAR Reset stack view scroll bar position on 0.
  - SPVDAM_REMOVE_ON_OPEN If panel will be opened, remove all panels with that type.
  - SPVDAM_INSERT_AFTER same as (SPVDAM_INSERT | SPVDAM_BOTTOM).
  - SPVDAM_MOVE_TOP same as (SPVDAM_MOVE | SPVDAM_TOP).
  - SPVDAM_MOVE_BOTTOM same as (SPVDAM_MOVE | SPVDAM_BOTTOM).
  - SPVDAM_ADD_TOP same as (SPVDAM_ADD | SPVDAM_TOP).
  - SPVDAM_ADD_BOTTOM same as (SPVDAM_ADD | SPVDAM_BOTTOM).
  - SPVDAM_REPLACE_BYTYPE same as (SPVDAM_INSERT | SPVDAM_REMOVETYPE).
  - SPVDAM_DEFAULT same as (SPVDAM_REPLACE_BYTYPE).
  - SPVDAM_SINGLE same as (SPVDAM_ADD_TOP | SPVDAM_REMOVEALL).
  - SPVDAM_REFRESH same as (SPVDAM_ADD | SPVDAM_UNIQUE | SPVDAM_REMOVE_ON_OPEN).

RtUlong IRsStackPanelViewDecorator::AddMode`[set]`

Set decorator addition mode.

Parameters:

  | newVal | [in] New add mode. See list of possible flags: SPVDAM_ADD Add panel. SPVDAM_TOP Can`t be used with SPVDAM_BOTTOM. SPVDAM_BOTTOM Can`t be used with SPVDAM_TOP. SPVDAM_REPLACE Replace panel, which root is similar with pivot root. SPVDAM_INSERT Insert after (use SPVDAM_BOTTOM) or before (use SPVDAM_TOP) panel object, which root is similar with pivot root. SPVDAM_REMOVEALL Remove all panels. SPVDAM_UNIQUE Allow only one copy of node in stack. SPVDAM_UNIQUE_ASPECT Allow more copies of node in stack, but not with same active aspect. SPVDAM_SWITCH_ASPECT Find node and switch aspect. SPVDAM_MOVE Find node and move it by additional flags. (SPVDAM_TOP - on top of stack view, SPVDAM_BOTTOM - on bottom of stack view). SPVDAM_REMOVETYPE Remove other panels of same group. SPVDAM_RESETSCROLLBAR Reset stack view scroll bar position on 0. SPVDAM_REMOVE_ON_OPEN If panel will be opened, remove all panels with that type. SPVDAM_PIVOTBYPOS Pivot will by find by its position, as default is pivot position equal 0. SPVDAM_INSERT_AFTER same as (SPVDAM_INSERT | SPVDAM_BOTTOM). SPVDAM_MOVE_TOP same as (SPVDAM_MOVE | SPVDAM_TOP). SPVDAM_MOVE_BOTTOM same as (SPVDAM_MOVE | SPVDAM_BOTTOM). SPVDAM_ADD_TOP same as (SPVDAM_ADD | SPVDAM_TOP). SPVDAM_ADD_BOTTOM same as (SPVDAM_ADD | SPVDAM_BOTTOM). SPVDAM_REPLACE_BYTYPE same as (SPVDAM_INSERT | SPVDAM_REMOVETYPE). SPVDAM_DEFAULT same as (SPVDAM_REPLACE_BYTYPE). SPVDAM_SINGLE same as (SPVDAM_ADD_TOP | SPVDAM_REMOVEALL). SPVDAM_REFRESH same as (SPVDAM_ADD | SPVDAM_UNIQUE | SPVDAM_REMOVE_ON_OPEN).

See also:
  put_PivotRoot

BSTR IRsStackPanelViewDecorator::PivotRoot`[set]`

Set root of decorator's pivot.

- Pivot is panel that is used as reference panel for insert and replace kind of panel addition.

Parameters:

  | newVal | [in] Root of pivot panel object.

See also:
  AddMode.

BSTR* IRsStackPanelViewDecorator::PivotRoot`[get]`

Get root of decorator's pivot.

- Pivot is panel that is used as reference panel for insert and replace kind of panel addition.

Returns:
  pVal [out, retval] Root of panel node, which is used as pivot, for operations like insert and replace.
  - For example: if add mode is sets contain.

See also:
  AddMode.

RtUlong IRsStackPanelViewDecorator::PivotIndex`[set]`

Set index of decorator's pivot.

- Pivot is panel that is used as reference panel for insert and replace kind of panel addition.

Parameters:

  | newVal | [in] Index of pivot panel object.

See also:
  AddMode.

RtUlong* IRsStackPanelViewDecorator::PivotIndex`[get]`

Get index of decorator's pivot.

- Pivot is panel that is used as reference panel for insert and replace kind of panel addition.
- To use pivot index for this operations use flag SPVDAM_PIVOTBYPOS.

Returns:
  pVal [out, retval] Index of panel node, which is used as pivot, for operation like insert and replace.
  - For example: if add mode is sets contain

See also:
  AddMode.