/*=========================================================================

  Module:    $RCSfile: vtkKWWidgetSetSubclass.h.in,v $

  Copyright (c) Kitware, Inc.
  All rights reserved.
  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.

     This software is distributed WITHOUT ANY WARRANTY; without even
     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
     PURPOSE.  See the above copyright notice for more information.

=========================================================================*/
// .NAME @WidgetType@Set - a concrete set of @WidgetType@
// .SECTION Description
// A composite widget to conveniently store, allocate, create and pack a 
// set of @WidgetType@. 
// Each @WidgetType@ 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).
// As a subclass of vtkKWWidgetSet, it inherits methods to set the widgets
// visibility individually, set the layout parameters, and query each widget.
// Widgets are packed (gridded) in the order they were added.
// @ingroup kwwidgets_autogenerated_widget_set_group
// .SECTION Note
// This class and the corresponding code were 
// \subpage kwwidgets_autogenerated_page "generated automatically" by
// instantiating the <tt>Templates/vtkKWWidgetSetSubclass.h.in</tt>
// and <tt>Templates/vtkKWWidgetSetSubclass.cxx.in</tt> files for 
// the type @WidgetType@. Classes related to the same template can be found
// in the \ref kwwidgets_autogenerated_widget_set_group section.
// .SECTION See Also
// vtkKWWidgetSet @WidgetType@

#ifndef __@WidgetType@Set_h
#define __@WidgetType@Set_h

#include "vtkKWWidgetSet.h"

class @WidgetType@;

class KWWidgets_EXPORT @WidgetType@Set : public vtkKWWidgetSet
{
public:
  static @WidgetType@Set* New();
  vtkTypeRevisionMacro(@WidgetType@Set,vtkKWWidgetSet);
  void PrintSelf(ostream& os, vtkIndent indent);

  // Description:
  // Add a @WidgetType@ to the end of the set.
  // The id has to be unique among the set.
  // Return a pointer to the @WidgetType@, or NULL on error.
  virtual @WidgetType@* AddWidget(int id);

  // Description:
  // Insert a @WidgetType@ at a specific position in the set.
  // The id has to be unique among the set.
  // Return a pointer to the @WidgetType@, or NULL on error.
  virtual @WidgetType@* InsertWidget(int id, int pos);

  // Description:
  // Get a @WidgetType@ from the set, given its unique id.
  // Return a pointer to the @WidgetType@, or NULL on error.
  virtual @WidgetType@* GetWidget(int id);

protected:
  @WidgetType@Set() {};
  ~@WidgetType@Set() {};

  // Helper methods

  virtual vtkKWWidget* AllocateAndCreateWidget();

private:
  @WidgetType@Set(const @WidgetType@Set&); // Not implemented
  void operator=(const @WidgetType@Set&); // Not implemented
};

#endif
