KWWidgets
|
00001 /*========================================================================= 00002 00003 Module: $RCSfile: vtkKWWidgetSetSubclass.h.in,v $ 00004 00005 Copyright (c) Kitware, Inc. 00006 All rights reserved. 00007 See Copyright.txt or http://www.kitware.com/Copyright.htm for details. 00008 00009 This software is distributed WITHOUT ANY WARRANTY; without even 00010 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00011 PURPOSE. See the above copyright notice for more information. 00012 00013 =========================================================================*/ 00014 // .NAME vtkKWComboBoxSet - a concrete set of vtkKWComboBox 00015 // .SECTION Description 00016 // A composite widget to conveniently store, allocate, create and pack a 00017 // set of vtkKWComboBox. 00018 // Each vtkKWComboBox is created, removed or queried based 00019 // on a unique ID provided by the user (ids are *not* handled by the class 00020 // since it is likely that they will be defined as enum's or #define by 00021 // the user for easier retrieval). 00022 // As a subclass of vtkKWWidgetSet, it inherits methods to set the widgets 00023 // visibility individually, set the layout parameters, and query each widget. 00024 // Widgets are packed (gridded) in the order they were added. 00025 // @ingroup kwwidgets_autogenerated_widget_set_group 00026 // .SECTION Note 00027 // This class and the corresponding code were 00028 // \subpage kwwidgets_autogenerated_page "generated automatically" by 00029 // instantiating the <tt>Templates/vtkKWWidgetSetSubclass.h.in</tt> 00030 // and <tt>Templates/vtkKWWidgetSetSubclass.cxx.in</tt> files for 00031 // the type vtkKWComboBox. Classes related to the same template can be found 00032 // in the \ref kwwidgets_autogenerated_widget_set_group section. 00033 // .SECTION See Also 00034 // vtkKWWidgetSet vtkKWComboBox 00035 00036 #ifndef __vtkKWComboBoxSet_h 00037 #define __vtkKWComboBoxSet_h 00038 00039 #include "vtkKWWidgetSet.h" 00040 00041 class vtkKWComboBox; 00042 00043 class KWWidgets_EXPORT vtkKWComboBoxSet : public vtkKWWidgetSet 00044 { 00045 public: 00046 static vtkKWComboBoxSet* New(); 00047 vtkTypeRevisionMacro(vtkKWComboBoxSet,vtkKWWidgetSet); 00048 void PrintSelf(ostream& os, vtkIndent indent); 00049 00050 // Description: 00051 // Add a vtkKWComboBox to the end of the set. 00052 // The id has to be unique among the set. 00053 // Return a pointer to the vtkKWComboBox, or NULL on error. 00054 virtual vtkKWComboBox* AddWidget(int id); 00055 00056 // Description: 00057 // Insert a vtkKWComboBox at a specific position in the set. 00058 // The id has to be unique among the set. 00059 // Return a pointer to the vtkKWComboBox, or NULL on error. 00060 virtual vtkKWComboBox* InsertWidget(int id, int pos); 00061 00062 // Description: 00063 // Get a vtkKWComboBox from the set, given its unique id. 00064 // Return a pointer to the vtkKWComboBox, or NULL on error. 00065 virtual vtkKWComboBox* GetWidget(int id); 00066 00067 protected: 00068 vtkKWComboBoxSet() {}; 00069 ~vtkKWComboBoxSet() {}; 00070 00071 // Helper methods 00072 00073 virtual vtkKWWidget* AllocateAndCreateWidget(); 00074 00075 private: 00076 vtkKWComboBoxSet(const vtkKWComboBoxSet&); // Not implemented 00077 void operator=(const vtkKWComboBoxSet&); // Not implemented 00078 }; 00079 00080 #endif