00001 /*========================================================================= 00002 00003 Module: $RCSfile: vtkKWRadioButtonSet.h,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 vtkKWRadioButtonSet - a concrete set of vtkKWRadioButton 00015 // .SECTION Description 00016 // A composite widget to conveniently store, allocate, create and pack a 00017 // set of vtkKWRadioButton. 00018 // Each vtkKWRadioButton 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 // .SECTION See Also 00026 // vtkKWWidgetSet 00027 00028 #ifndef __vtkKWRadioButtonSet_h 00029 #define __vtkKWRadioButtonSet_h 00030 00031 #include "vtkKWWidgetSet.h" 00032 00033 class vtkKWRadioButton; 00034 00035 class KWWidgets_EXPORT vtkKWRadioButtonSet : public vtkKWWidgetSet 00036 { 00037 public: 00038 static vtkKWRadioButtonSet* New(); 00039 vtkTypeRevisionMacro(vtkKWRadioButtonSet,vtkKWWidgetSet); 00040 void PrintSelf(ostream& os, vtkIndent indent); 00041 00042 // Description: 00043 // Add a vtkKWRadioButton to the set. 00044 // The id has to be unique among the set. 00045 // Return a pointer to the vtkKWRadioButton, or NULL on error. 00046 virtual vtkKWRadioButton* AddWidget(int id); 00047 00048 // Description: 00049 // Insert a vtkKWRadioButton at a specific position in the set. 00050 // The id has to be unique among the set. 00051 // Return a pointer to the vtkKWRadioButton, or NULL on error. 00052 virtual vtkKWRadioButton* InsertWidget(int id, int pos); 00053 00054 // Description: 00055 // Get a vtkKWRadioButton from the set, given its unique id. 00056 // Return a pointer to the vtkKWRadioButton, or NULL on error. 00057 virtual vtkKWRadioButton* GetWidget(int id); 00058 00059 protected: 00060 vtkKWRadioButtonSet() {}; 00061 ~vtkKWRadioButtonSet() {}; 00062 00063 // Helper methods 00064 00065 virtual vtkKWWidget* AllocateAndCreateWidget(); 00066 virtual vtkKWWidget* InsertWidgetInternal(int id, int pos); 00067 00068 private: 00069 vtkKWRadioButtonSet(const vtkKWRadioButtonSet&); // Not implemented 00070 void operator=(const vtkKWRadioButtonSet&); // Not implemented 00071 }; 00072 00073 #endif