• Main Page
  • Classes
  • Files
  • Directories
  • File List
  • File Members

vtkKWCheckButtonWithPopupFrame.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Module:    $RCSfile: vtkKWCheckButtonWithPopupFrame.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 vtkKWCheckButtonWithPopupFrame - a popup frame + checkbutton
00015 // .SECTION Description
00016 // A class that provides a checkbutton and a (popup) frame. In popup mode
00017 // the checkbutton is visible on the left of the popup button that will
00018 // display the frame. In normal mode, the checkbutton is the first item
00019 // packed in the frame.
00020 
00021 #ifndef __vtkKWCheckButtonWithPopupFrame_h
00022 #define __vtkKWCheckButtonWithPopupFrame_h
00023 
00024 #include "vtkKWPopupFrame.h"
00025 
00026 class vtkKWCheckButton;
00027 
00028 class KWWidgets_EXPORT vtkKWCheckButtonWithPopupFrame : public vtkKWPopupFrame
00029 {
00030 public:
00031   static vtkKWCheckButtonWithPopupFrame* New();
00032   vtkTypeRevisionMacro(vtkKWCheckButtonWithPopupFrame,vtkKWPopupFrame);
00033   void PrintSelf(ostream& os, vtkIndent indent);
00034 
00035   // Description:
00036   // Automatically disable the popup button when the checkbutton is not 
00037   // checked.
00038   virtual void SetDisablePopupButtonWhenNotChecked(int);
00039   vtkBooleanMacro(DisablePopupButtonWhenNotChecked, int);
00040   vtkGetMacro(DisablePopupButtonWhenNotChecked, int);
00041 
00042   // Description:
00043   // Access to sub-widgets
00044   vtkGetObjectMacro(CheckButton, vtkKWCheckButton);
00045 
00046   // Description:
00047   // Update the GUI according to the value of the ivars
00048   virtual void Update();
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   // Description:
00060   // Callbacks. Internal, do not use.
00061   virtual void CheckButtonCallback(int state);
00062 
00063 protected:
00064   vtkKWCheckButtonWithPopupFrame();
00065   ~vtkKWCheckButtonWithPopupFrame();
00066 
00067   // Description:
00068   // Create the widget.
00069   virtual void CreateWidget();
00070 
00071   // GUI
00072 
00073   int                     DisablePopupButtonWhenNotChecked;
00074 
00075   vtkKWCheckButton        *CheckButton;
00076 
00077   // Get the value that should be used to set the checkbutton state
00078   // (i.e. depending on the value this checkbutton is supposed to reflect,
00079   // for example, an annotation visibility).
00080   // This does *not* return the state of the widget.
00081   virtual int GetCheckButtonState() { return 0; };
00082 
00083 private:
00084   vtkKWCheckButtonWithPopupFrame(const vtkKWCheckButtonWithPopupFrame&); // Not implemented
00085   void operator=(const vtkKWCheckButtonWithPopupFrame&); // Not Implemented
00086 };
00087 
00088 #endif

Generated on Sat Dec 11 2010 02:07:57 for KWWidgets by  doxygen 1.7.2