KWWidgets
|
00001 /*========================================================================= 00002 00003 Module: $RCSfile: vtkKWWidgetWithScrollbarsSubclass.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 vtkKWListBoxWithScrollbars - a vtkKWListBox associated to two vtkKWScrollbar's 00015 // .SECTION Description 00016 // This composite widget provides horizontal and vertical scrolling 00017 // capabilities to a core widget. They can be enabled or disabled separately. 00018 // As a subclass of vtkKWWidgetWithScrollbars, it inherits methods to 00019 // retrieve the scrollbars and set their visibility and layout. 00020 // @ingroup kwwidgets_autogenerated_widget_with_scrollbars_group 00021 // .SECTION Note 00022 // This class and the corresponding code were 00023 // \subpage kwwidgets_autogenerated_page "generated automatically" by 00024 // instantiating the <tt>Templates/vtkKWWidgetWithScrollbarsSubclass.h.in</tt> 00025 // and <tt>Templates/vtkKWWidgetWithScrollbarsSubclass.cxx.in</tt> files for 00026 // the type vtkKWListBox. Classes related to the same template can be found 00027 // in the \ref kwwidgets_autogenerated_widget_with_scrollbars_group section. 00028 // .SECTION See Also 00029 // vtkKWWidgetWithScrollbars vtkKWListBox 00030 00031 #ifndef __vtkKWListBoxWithScrollbars_h 00032 #define __vtkKWListBoxWithScrollbars_h 00033 00034 #include "vtkKWWidgetWithScrollbars.h" 00035 00036 class vtkKWScrollbar; 00037 class vtkKWListBox; 00038 00039 class KWWidgets_EXPORT vtkKWListBoxWithScrollbars : public vtkKWWidgetWithScrollbars 00040 { 00041 public: 00042 static vtkKWListBoxWithScrollbars* New(); 00043 vtkTypeRevisionMacro(vtkKWListBoxWithScrollbars,vtkKWWidgetWithScrollbars); 00044 void PrintSelf(ostream& os, vtkIndent indent); 00045 00046 // Description: 00047 // Get the vtkKWListBox for which we addded the scrollbars 00048 virtual vtkKWListBox* GetWidget(); 00049 00050 // Description: 00051 // Update the "enable" state of the object and its internal parts. 00052 // Depending on different Ivars (this->Enabled, the application's 00053 // Limited Edition Mode, etc.), the "enable" state of the object is updated 00054 // and propagated to its internal parts/subwidgets. This will, for example, 00055 // enable/disable parts of the widget UI, enable/disable the visibility 00056 // of 3D widgets, etc. 00057 virtual void UpdateEnableState(); 00058 00059 protected: 00060 vtkKWListBoxWithScrollbars(); 00061 ~vtkKWListBoxWithScrollbars(); 00062 00063 // Description: 00064 // Create the widget. 00065 virtual void CreateWidget(); 00066 00067 // Description: 00068 // Internal widget 00069 vtkKWListBox *Widget; 00070 00071 // Description: 00072 // Create scrollbars and associate the scrollbars to a widget by 00073 // setting up the callbacks between both instances. 00074 // Re-implemented to set the associated now that we know the internal widget 00075 virtual void CreateHorizontalScrollbar(); 00076 virtual void CreateVerticalScrollbar(); 00077 00078 // Description: 00079 // Pack. 00080 virtual void Pack(); 00081 00082 private: 00083 vtkKWListBoxWithScrollbars(const vtkKWListBoxWithScrollbars&); // Not implemented 00084 void operator=(const vtkKWListBoxWithScrollbars&); // Not implemented 00085 }; 00086 00087 #endif