debian/tmp/usr/include/KWWidgets/vtkKWWidgetWithScrollbars.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Module:    $RCSfile: vtkKWWidgetWithScrollbars.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 vtkKWWidgetWithScrollbars - an abstract class for composite widgets associated to two vtkKWScrollbar's
00015 // .SECTION Description
00016 // This provide a boilerplate for a composite widget associated to a horizontal
00017 // and vertical scrollbars.
00018 //
00019 // Be aware that most subclasses of vtkKWWidgetWithScrollbars are 
00020 // generated automatically out of the vtkKWWidgetWithScrollbarsSubclass 
00021 // template located in the Templates directory. Therefore, even though the
00022 // source code for those vtkKWWidgetWithScrollbars subclasses does not exist 
00023 // in the KWWidgets repository, they are still generated automatically and 
00024 // documented in the API online; check the vtkKWWidgetWithScrollbars API 
00025 // online for its subclasses, as well as the \subpage 
00026 // kwwidgets_autogenerated_page page. Classes related
00027 // to the same template can be found in the 
00028 // \ref kwwidgets_autogenerated_widget_with_scrollbars_group section.
00029 // .SECTION See Also
00030 // vtkKWCanvasWithScrollbars vtkKWListBoxWithScrollbars vtkKWMultiColumnListWithScrollbars vtkKWTextWithScrollbars vtkKWTreeWithScrollbars
00031 
00032 #ifndef __vtkKWWidgetWithScrollbars_h
00033 #define __vtkKWWidgetWithScrollbars_h
00034 
00035 #include "vtkKWCompositeWidget.h"
00036 
00037 class vtkKWScrollbar;
00038 
00039 class KWWidgets_EXPORT vtkKWWidgetWithScrollbars : public vtkKWCompositeWidget
00040 {
00041 public:
00042   vtkTypeRevisionMacro(vtkKWWidgetWithScrollbars,vtkKWCompositeWidget);
00043   void PrintSelf(ostream& os, vtkIndent indent);
00044 
00045   // Description:
00046   // Set/Get the vertical scrollbar visibility (default to On).
00047   virtual void SetVerticalScrollbarVisibility(int val);
00048   vtkGetMacro(VerticalScrollbarVisibility, int);
00049   vtkBooleanMacro(VerticalScrollbarVisibility, int);
00050 
00051   // Description:
00052   // Set/Get the horizontal scrollbar visibility (default to On).
00053   virtual void SetHorizontalScrollbarVisibility(int val);
00054   vtkGetMacro(HorizontalScrollbarVisibility, int);
00055   vtkBooleanMacro(HorizontalScrollbarVisibility, int);
00056 
00057   // Description:
00058   // Access the internal scrollbars.
00059   vtkGetObjectMacro(VerticalScrollbar, vtkKWScrollbar);
00060   vtkGetObjectMacro(HorizontalScrollbar, vtkKWScrollbar);
00061 
00062   // Description:
00063   // Update the "enable" state of the object and its internal parts.
00064   // Depending on different Ivars (this->Enabled, the application's 
00065   // Limited Edition Mode, etc.), the "enable" state of the object is updated
00066   // and propagated to its internal parts/subwidgets. This will, for example,
00067   // enable/disable parts of the widget UI, enable/disable the visibility
00068   // of 3D widgets, etc.
00069   virtual void UpdateEnableState();
00070 
00071 protected:
00072   vtkKWWidgetWithScrollbars();
00073   ~vtkKWWidgetWithScrollbars();
00074 
00075   // Description:
00076   // Create the widget.
00077   virtual void CreateWidget();
00078 
00079   // Description:
00080   // Scrollbar visibility flags
00081   int VerticalScrollbarVisibility;
00082   int HorizontalScrollbarVisibility;
00083 
00084   // Description:
00085   // Scrollbars
00086   vtkKWScrollbar *VerticalScrollbar;
00087   vtkKWScrollbar *HorizontalScrollbar;
00088 
00089   // Description:
00090   // Create scrollbars and associate the scrollbars to a widget by
00091   // setting up the callbacks between both instances.
00092   // The associated *has* to be made for this class to work, but
00093   // since we do not know the internal widget at that point, it is up
00094   // to the subclass to reimplement both Create*Scrollbar() methods
00095   // and have them simply call the super and the Associate*Scrollbar() 
00096   // methods with the internal argument as parameter.
00097   virtual void CreateHorizontalScrollbar();
00098   virtual void CreateVerticalScrollbar();
00099   virtual void AssociateHorizontalScrollbarToWidget(vtkKWCoreWidget *widget);
00100   virtual void AssociateVerticalScrollbarToWidget(vtkKWCoreWidget *widget);
00101 
00102   // Description:
00103   // Pack or repack the widget. This should be implemented by subclasses,
00104   // but a convenience function PackScrollbarsWithWidget() can be
00105   // called from the subclass just as easily.
00106   virtual void Pack() = 0;
00107   virtual void PackScrollbarsWithWidget(vtkKWWidget *widget);
00108 
00109 private:
00110 
00111   vtkKWWidgetWithScrollbars(const vtkKWWidgetWithScrollbars&); // Not implemented
00112   void operator=(const vtkKWWidgetWithScrollbars&); // Not implemented
00113 };
00114 
00115 #endif