KWWidgets
vtkKWPopupFrame.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Module:    $RCSfile: vtkKWPopupFrame.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 vtkKWPopupFrame - a popup frame
00015 // .SECTION Description
00016 // A class that provides a frame that can be collapsed as a popup button.
00017 
00018 #ifndef __vtkKWPopupFrame_h
00019 #define __vtkKWPopupFrame_h
00020 
00021 #include "vtkKWCompositeWidget.h"
00022 
00023 class vtkKWFrameWithLabel;
00024 class vtkKWPopupButton;
00025 
00026 class KWWidgets_EXPORT vtkKWPopupFrame : public vtkKWCompositeWidget
00027 {
00028 public:
00029   static vtkKWPopupFrame* New();
00030   vtkTypeRevisionMacro(vtkKWPopupFrame,vtkKWCompositeWidget);
00031   void PrintSelf(ostream& os, vtkIndent indent);
00032 
00033   // Description:
00034   // Display the frame as a popup. This has to be called before Create().
00035   vtkSetMacro(PopupMode, int);
00036   vtkGetMacro(PopupMode, int);
00037   vtkBooleanMacro(PopupMode, int);
00038   
00039   // Description:
00040   // Access to sub-widgets
00041   vtkGetObjectMacro(PopupButton, vtkKWPopupButton);
00042   vtkGetObjectMacro(Frame, vtkKWFrameWithLabel);
00043 
00044   // Description:
00045   // Update the "enable" state of the object and its internal parts.
00046   // Depending on different Ivars (this->Enabled, the application's 
00047   // Limited Edition Mode, etc.), the "enable" state of the object is updated
00048   // and propagated to its internal parts/subwidgets. This will, for example,
00049   // enable/disable parts of the widget UI, enable/disable the visibility
00050   // of 3D widgets, etc.
00051   virtual void UpdateEnableState();
00052 
00053 protected:
00054   vtkKWPopupFrame();
00055   ~vtkKWPopupFrame();
00056 
00057   // Description:
00058   // Create the widget.
00059   virtual void CreateWidget();
00060 
00061   // GUI
00062 
00063   int                     PopupMode;
00064 
00065   vtkKWPopupButton        *PopupButton;
00066   vtkKWFrameWithLabel       *Frame;
00067 
00068 private:
00069   vtkKWPopupFrame(const vtkKWPopupFrame&); // Not implemented
00070   void operator=(const vtkKWPopupFrame&); // Not Implemented
00071 };
00072 
00073 #endif