vtkKWWidgetSet Class Reference

an abstract set of a specific type of vtkKWWidget More...

#include <vtkKWWidgetSet.h>

Inheritance diagram for vtkKWWidgetSet:
Inheritance graph
[legend]
Collaboration diagram for vtkKWWidgetSet:
Collaboration graph
[legend]

List of all members.

Public Types

typedef vtkKWCompositeWidget Superclass

Public Member Functions

virtual const char * GetClassName ()
virtual int IsA (const char *type)
void PrintSelf (ostream &os, vtkIndent indent)
virtual int GetNumberOfWidgets ()
virtual int GetIdOfNthWidget (int rank)
virtual int HasWidget (int id)
virtual int GetWidgetPosition (int id)
virtual void DeleteAllWidgets ()
virtual void UpdateEnableState ()



virtual void HideWidget (int id)
virtual void ShowWidget (int id)
virtual int GetWidgetVisibility (int id)
virtual void SetWidgetVisibility (int id, int flag)
virtual int GetNumberOfVisibleWidgets ()
virtual int GetIdOfNthVisibleWidget (int rank)
virtual void SetWidgetsVisibility (int nb_ids, int *ids, int *flags)
virtual void SetPackHorizontally (int)
virtual void PackHorizontallyOn ()
virtual void PackHorizontallyOff ()
virtual int GetPackHorizontally ()
virtual void SetMaximumNumberOfWidgetsInPackingDirection (int)
virtual int GetMaximumNumberOfWidgetsInPackingDirection ()
virtual void SetWidgetsPadX (int)
virtual int GetWidgetsPadX ()
virtual void SetWidgetsPadY (int)
virtual int GetWidgetsPadY ()
virtual void SetWidgetsInternalPadX (int)
virtual int GetWidgetsInternalPadX ()
virtual void SetWidgetsInternalPadY (int)
virtual int GetWidgetsInternalPadY ()
virtual void SetExpandWidgets (int)
virtual void ExpandWidgetsOn ()
virtual void ExpandWidgetsOff ()
virtual int GetExpandWidgets ()
virtual void SetUniformColumns (int)
virtual void UniformColumnsOn ()
virtual void UniformColumnsOff ()
virtual int GetUniformColumns ()
virtual void SetUniformRows (int)
virtual void UniformRowsOn ()
virtual void UniformRowsOff ()
virtual int GetUniformRows ()

Static Public Member Functions

static int IsTypeOf (const char *type)
static vtkKWWidgetSetSafeDownCast (vtkObject *o)

Protected Member Functions

 vtkKWWidgetSet ()
 ~vtkKWWidgetSet ()
virtual void CreateWidget ()
virtual vtkKWWidgetAllocateAndCreateWidget ()=0
virtual vtkKWWidgetGetWidgetInternal (int id)
virtual vtkKWWidgetInsertWidgetInternal (int id, int pos)
virtual void Pack ()

Protected Attributes

int PackHorizontally
int MaximumNumberOfWidgetsInPackingDirection
int WidgetsPadX
int WidgetsPadY
int WidgetsInternalPadX
int WidgetsInternalPadY
int ExpandWidgets
int UniformColumns
int UniformRows
vtkKWWidgetSetInternals * Internals

Detailed Description

an abstract set of a specific type of vtkKWWidget

This class is a composite widget that can be used to conveniently allocate, store and layout a set of widgets of the same type. Each widget is created, removed or queried based on a unique ID provided by the user (ids are *not* handled by the class since it is likely that they will be defined as enum's or define by the user for easier retrieval). Widgets are packed (gridded) in the order they were added to the set.

IMPORTANT: this is an abstract superclass, it can not be used as-is. A subclass of vtkKWWidgetSet is tailored for a *specific* type of widget (see vtkKWPushButtonSet, which is a set of vtkKWPushButton); it can not be used to store or layout a set of heterogeneous widgets.

This class acts as a container of widgets of the same type; the main point of this container is not to provide a layout mechanism, but to make it a little more convenient to create and allocate a whole bunch of widgets of the same type without explicitly declaring a pointer to each and everyone of them. Say, if you need ten buttons, and you do not want to make 10 calls to vtkKWPushButton::New(), 10 calls to vtkKWPushButton::Create(), and 10 calls to vtkKWPushButton::Delete(): just create one instance of a vtkKWPushButtonSet, then call vtkKWPushButtonSet::AddWidget to automatically allocate and create an instance of a vtkKWPushButton. This widget will be packed in a grid fashion with the other widgets in the set, as a bonus. Widgets that are added, allocated and created that way are automatically de-allocated when the vtkKWWidgetSet instance is deleted.

Be aware that the pretty much all subclasses of vtkKWWidgetSet are generated automatically out of the vtkKWWidgetSetSubclass template located in the Templates directory. Therefore, even though the source code for those vtkKWWidgetSet subclasses does not exist in the KWWidgets repository, they are still generated automatically and documented in the API online; check the vtkKWWidgetSet API online for its subclasses, as well as the KWWidgets Auto-Generated Classes page. Classes related to the same template can be found in the KWWidgets Auto-Generated Classes: Widget Set section. Subclasses need to implement AllocateAndCreateWidget

See also:
vtkKWCheckButtonSet vtkKWComboBoxSet vtkKWEntrySet vtkKWLabelSet vtkKWLabelWithLabelSet vtkKWPushButtonSet vtkKWScaleSet vtkKWScaleWithEntrySet vtkKWSpinBoxSet

Definition at line 65 of file vtkKWWidgetSet.h.


Member Typedef Documentation


Constructor & Destructor Documentation

vtkKWWidgetSet::vtkKWWidgetSet (  )  [protected]
vtkKWWidgetSet::~vtkKWWidgetSet (  )  [protected]

Member Function Documentation

virtual const char* vtkKWWidgetSet::GetClassName (  )  [virtual]
static int vtkKWWidgetSet::IsTypeOf ( const char *  type  )  [static]
virtual int vtkKWWidgetSet::IsA ( const char *  type  )  [virtual]
static vtkKWWidgetSet* vtkKWWidgetSet::SafeDownCast ( vtkObject o  )  [static]
void vtkKWWidgetSet::PrintSelf ( ostream &  os,
vtkIndent  indent 
) [virtual]
virtual int vtkKWWidgetSet::GetNumberOfWidgets (  )  [virtual]

Get the number of widget in the set.

virtual int vtkKWWidgetSet::GetIdOfNthWidget ( int  rank  )  [virtual]

Retrieve the id of the n-th widget (-1 if not found)

virtual int vtkKWWidgetSet::HasWidget ( int  id  )  [virtual]

Check if a widget is in the set, given its unique id. Return 1 if exists, 0 otherwise.

virtual int vtkKWWidgetSet::GetWidgetPosition ( int  id  )  [virtual]

Retrieve the position in the set the widget was inserted at. Return pos if exists, -1 otherwise

virtual void vtkKWWidgetSet::HideWidget ( int  id  )  [virtual]

Hide/show a widget, given its unique id. Get the number of visible widget in the set. Since the changing the widget visibility will trigger an expensive call to Pack(), one can use SetWidgetsVisibility to change the visibility of many widgets in a single call.

virtual void vtkKWWidgetSet::ShowWidget ( int  id  )  [virtual]

Hide/show a widget, given its unique id. Get the number of visible widget in the set. Since the changing the widget visibility will trigger an expensive call to Pack(), one can use SetWidgetsVisibility to change the visibility of many widgets in a single call.

virtual int vtkKWWidgetSet::GetWidgetVisibility ( int  id  )  [virtual]

Hide/show a widget, given its unique id. Get the number of visible widget in the set. Since the changing the widget visibility will trigger an expensive call to Pack(), one can use SetWidgetsVisibility to change the visibility of many widgets in a single call.

virtual void vtkKWWidgetSet::SetWidgetVisibility ( int  id,
int  flag 
) [virtual]

Hide/show a widget, given its unique id. Get the number of visible widget in the set. Since the changing the widget visibility will trigger an expensive call to Pack(), one can use SetWidgetsVisibility to change the visibility of many widgets in a single call.

virtual int vtkKWWidgetSet::GetNumberOfVisibleWidgets (  )  [virtual]

Hide/show a widget, given its unique id. Get the number of visible widget in the set. Since the changing the widget visibility will trigger an expensive call to Pack(), one can use SetWidgetsVisibility to change the visibility of many widgets in a single call.

virtual int vtkKWWidgetSet::GetIdOfNthVisibleWidget ( int  rank  )  [virtual]

Hide/show a widget, given its unique id. Get the number of visible widget in the set. Since the changing the widget visibility will trigger an expensive call to Pack(), one can use SetWidgetsVisibility to change the visibility of many widgets in a single call.

virtual void vtkKWWidgetSet::SetWidgetsVisibility ( int  nb_ids,
int *  ids,
int *  flags 
) [virtual]

Hide/show a widget, given its unique id. Get the number of visible widget in the set. Since the changing the widget visibility will trigger an expensive call to Pack(), one can use SetWidgetsVisibility to change the visibility of many widgets in a single call.

virtual void vtkKWWidgetSet::DeleteAllWidgets (  )  [virtual]

Delete all widgets.

virtual void vtkKWWidgetSet::SetPackHorizontally ( int   )  [virtual]

Set the packing direction to be horizontal (default is vertical).

virtual void vtkKWWidgetSet::PackHorizontallyOn (  )  [virtual]

Hide/show a widget, given its unique id. Get the number of visible widget in the set. Since the changing the widget visibility will trigger an expensive call to Pack(), one can use SetWidgetsVisibility to change the visibility of many widgets in a single call.

virtual void vtkKWWidgetSet::PackHorizontallyOff (  )  [virtual]

Hide/show a widget, given its unique id. Get the number of visible widget in the set. Since the changing the widget visibility will trigger an expensive call to Pack(), one can use SetWidgetsVisibility to change the visibility of many widgets in a single call.

virtual int vtkKWWidgetSet::GetPackHorizontally (  )  [virtual]

Hide/show a widget, given its unique id. Get the number of visible widget in the set. Since the changing the widget visibility will trigger an expensive call to Pack(), one can use SetWidgetsVisibility to change the visibility of many widgets in a single call.

virtual void vtkKWWidgetSet::SetMaximumNumberOfWidgetsInPackingDirection ( int   )  [virtual]

Set the maximum number of widgets that will be packed in the packing direction (i.e. horizontally or vertically). For example, if set to 3 and the packing direction is horizontal, the layout ends up as 3 columns of widgets. The default is 0, i.e. all widgets are packed along the same direction.

virtual int vtkKWWidgetSet::GetMaximumNumberOfWidgetsInPackingDirection (  )  [virtual]

Hide/show a widget, given its unique id. Get the number of visible widget in the set. Since the changing the widget visibility will trigger an expensive call to Pack(), one can use SetWidgetsVisibility to change the visibility of many widgets in a single call.

virtual void vtkKWWidgetSet::SetWidgetsPadX ( int   )  [virtual]

Set/Get the padding that will be applied around each widget. (default to 0).

virtual int vtkKWWidgetSet::GetWidgetsPadX (  )  [virtual]

Hide/show a widget, given its unique id. Get the number of visible widget in the set. Since the changing the widget visibility will trigger an expensive call to Pack(), one can use SetWidgetsVisibility to change the visibility of many widgets in a single call.

virtual void vtkKWWidgetSet::SetWidgetsPadY ( int   )  [virtual]

Hide/show a widget, given its unique id. Get the number of visible widget in the set. Since the changing the widget visibility will trigger an expensive call to Pack(), one can use SetWidgetsVisibility to change the visibility of many widgets in a single call.

virtual int vtkKWWidgetSet::GetWidgetsPadY (  )  [virtual]

Hide/show a widget, given its unique id. Get the number of visible widget in the set. Since the changing the widget visibility will trigger an expensive call to Pack(), one can use SetWidgetsVisibility to change the visibility of many widgets in a single call.

virtual void vtkKWWidgetSet::SetWidgetsInternalPadX ( int   )  [virtual]

Set/Get the internal padding that will be left around each widget. This space is added inside the widget border. (default to 0).

virtual int vtkKWWidgetSet::GetWidgetsInternalPadX (  )  [virtual]

Hide/show a widget, given its unique id. Get the number of visible widget in the set. Since the changing the widget visibility will trigger an expensive call to Pack(), one can use SetWidgetsVisibility to change the visibility of many widgets in a single call.

virtual void vtkKWWidgetSet::SetWidgetsInternalPadY ( int   )  [virtual]

Hide/show a widget, given its unique id. Get the number of visible widget in the set. Since the changing the widget visibility will trigger an expensive call to Pack(), one can use SetWidgetsVisibility to change the visibility of many widgets in a single call.

virtual int vtkKWWidgetSet::GetWidgetsInternalPadY (  )  [virtual]

Hide/show a widget, given its unique id. Get the number of visible widget in the set. Since the changing the widget visibility will trigger an expensive call to Pack(), one can use SetWidgetsVisibility to change the visibility of many widgets in a single call.

virtual void vtkKWWidgetSet::SetExpandWidgets ( int   )  [virtual]

Set the layout to allow the widgets to expand automatically within the set.

virtual void vtkKWWidgetSet::ExpandWidgetsOn (  )  [virtual]

Hide/show a widget, given its unique id. Get the number of visible widget in the set. Since the changing the widget visibility will trigger an expensive call to Pack(), one can use SetWidgetsVisibility to change the visibility of many widgets in a single call.

virtual void vtkKWWidgetSet::ExpandWidgetsOff (  )  [virtual]

Hide/show a widget, given its unique id. Get the number of visible widget in the set. Since the changing the widget visibility will trigger an expensive call to Pack(), one can use SetWidgetsVisibility to change the visibility of many widgets in a single call.

virtual int vtkKWWidgetSet::GetExpandWidgets (  )  [virtual]

Hide/show a widget, given its unique id. Get the number of visible widget in the set. Since the changing the widget visibility will trigger an expensive call to Pack(), one can use SetWidgetsVisibility to change the visibility of many widgets in a single call.

virtual void vtkKWWidgetSet::SetUniformColumns ( int   )  [virtual]

Set/Get if the column/row layout should be uniform (enforce same size).

virtual void vtkKWWidgetSet::UniformColumnsOn (  )  [virtual]

Hide/show a widget, given its unique id. Get the number of visible widget in the set. Since the changing the widget visibility will trigger an expensive call to Pack(), one can use SetWidgetsVisibility to change the visibility of many widgets in a single call.

virtual void vtkKWWidgetSet::UniformColumnsOff (  )  [virtual]

Hide/show a widget, given its unique id. Get the number of visible widget in the set. Since the changing the widget visibility will trigger an expensive call to Pack(), one can use SetWidgetsVisibility to change the visibility of many widgets in a single call.

virtual int vtkKWWidgetSet::GetUniformColumns (  )  [virtual]

Hide/show a widget, given its unique id. Get the number of visible widget in the set. Since the changing the widget visibility will trigger an expensive call to Pack(), one can use SetWidgetsVisibility to change the visibility of many widgets in a single call.

virtual void vtkKWWidgetSet::SetUniformRows ( int   )  [virtual]

Hide/show a widget, given its unique id. Get the number of visible widget in the set. Since the changing the widget visibility will trigger an expensive call to Pack(), one can use SetWidgetsVisibility to change the visibility of many widgets in a single call.

virtual void vtkKWWidgetSet::UniformRowsOn (  )  [virtual]

Hide/show a widget, given its unique id. Get the number of visible widget in the set. Since the changing the widget visibility will trigger an expensive call to Pack(), one can use SetWidgetsVisibility to change the visibility of many widgets in a single call.

virtual void vtkKWWidgetSet::UniformRowsOff (  )  [virtual]

Hide/show a widget, given its unique id. Get the number of visible widget in the set. Since the changing the widget visibility will trigger an expensive call to Pack(), one can use SetWidgetsVisibility to change the visibility of many widgets in a single call.

virtual int vtkKWWidgetSet::GetUniformRows (  )  [virtual]

Hide/show a widget, given its unique id. Get the number of visible widget in the set. Since the changing the widget visibility will trigger an expensive call to Pack(), one can use SetWidgetsVisibility to change the visibility of many widgets in a single call.

virtual void vtkKWWidgetSet::UpdateEnableState (  )  [virtual]

Update the "enable" state of the object and its internal parts. Depending on different Ivars (this->Enabled, the application's Limited Edition Mode, etc.), the "enable" state of the object is updated and propagated to its internal parts/subwidgets. This will, for example, enable/disable parts of the widget UI, enable/disable the visibility of 3D widgets, etc.

Reimplemented from vtkKWWidget.

virtual void vtkKWWidgetSet::CreateWidget (  )  [protected, virtual]

Create the widget.

Reimplemented from vtkKWCompositeWidget.

virtual vtkKWWidget* vtkKWWidgetSet::AllocateAndCreateWidget (  )  [protected, pure virtual]
virtual vtkKWWidget* vtkKWWidgetSet::GetWidgetInternal ( int  id  )  [protected, virtual]
virtual vtkKWWidget* vtkKWWidgetSet::InsertWidgetInternal ( int  id,
int  pos 
) [protected, virtual]

Reimplemented in vtkKWRadioButtonSet.

virtual void vtkKWWidgetSet::Pack (  )  [protected, virtual]

Pack the widgets


Member Data Documentation

Definition at line 174 of file vtkKWWidgetSet.h.

Definition at line 175 of file vtkKWWidgetSet.h.

int vtkKWWidgetSet::WidgetsPadX [protected]

Definition at line 176 of file vtkKWWidgetSet.h.

int vtkKWWidgetSet::WidgetsPadY [protected]

Definition at line 177 of file vtkKWWidgetSet.h.

Definition at line 178 of file vtkKWWidgetSet.h.

Definition at line 179 of file vtkKWWidgetSet.h.

Definition at line 180 of file vtkKWWidgetSet.h.

Definition at line 181 of file vtkKWWidgetSet.h.

int vtkKWWidgetSet::UniformRows [protected]

Definition at line 182 of file vtkKWWidgetSet.h.

vtkKWWidgetSetInternals* vtkKWWidgetSet::Internals [protected]

PIMPL Encapsulation for STL containers

Reimplemented from vtkKWCoreWidget.

Definition at line 191 of file vtkKWWidgetSet.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on Tue Apr 27 02:39:08 2010 for KWWidgets by  doxygen 1.6.1