KWWidgets
debian/tmp/usr/include/KWWidgets/vtkKWPushButtonWithMenu.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Module:    $RCSfile: vtkKWPushButtonWithMenu.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 vtkKWPushButtonWithMenu - PushButton with left mouse bound to menu.
00015 // .SECTION Description
00016 // vtkKWPushButtonWithMenu was created for the reset view.  The menu
00017 // will change the behavior of the button.
00018 
00019 #ifndef __vtkKWPushButtonWithMenu_h
00020 #define __vtkKWPushButtonWithMenu_h
00021 
00022 #include "vtkKWCompositeWidget.h"
00023 
00024 class vtkKWMenu;
00025 class vtkKWPushButton;
00026 class vtkKWMenuButton;
00027 
00028 class KWWidgets_EXPORT vtkKWPushButtonWithMenu : public vtkKWCompositeWidget
00029 {
00030 public:
00031   static vtkKWPushButtonWithMenu* New();
00032   vtkTypeRevisionMacro(vtkKWPushButtonWithMenu, vtkKWCompositeWidget);
00033   void PrintSelf(ostream& os, vtkIndent indent);
00034 
00035   // Description: 
00036   // Get internal objects.
00037   virtual vtkKWMenu* GetMenu();
00038   vtkGetObjectMacro(MenuButton, vtkKWMenuButton);
00039   vtkGetObjectMacro(PushButton, vtkKWPushButton);
00040   
00041   // Description:
00042   // Update the "enable" state of the object and its internal parts.
00043   // Depending on different Ivars (this->Enabled, the application's 
00044   // Limited Edition Mode, etc.), the "enable" state of the object is updated
00045   // and propagated to its internal parts/subwidgets. This will, for example,
00046   // enable/disable parts of the widget UI, enable/disable the visibility
00047   // of 3D widgets, etc.
00048   virtual void UpdateEnableState();
00049 
00050 protected:
00051   vtkKWPushButtonWithMenu();
00052   ~vtkKWPushButtonWithMenu();
00053   
00054   // Description:
00055   // Create the widget.
00056   virtual void CreateWidget();
00057     
00058   vtkKWMenuButton *MenuButton;
00059   vtkKWPushButton *PushButton;
00060 
00061 private:
00062   vtkKWPushButtonWithMenu(const vtkKWPushButtonWithMenu&); // Not implemented
00063   void operator=(const vtkKWPushButtonWithMenu&); // Not implemented
00064 };
00065 
00066 #endif
00067