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

vtkKWPopupButton.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Module:    $RCSfile: vtkKWPopupButton.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 vtkKWPopupButton - a button that triggers a popup
00015 // .SECTION Description
00016 // The vtkKWPopupButton class creates a push button that
00017 // will popup a window. User widgets should be inserted inside
00018 // the PopupFrame ivar.
00019 
00020 #ifndef __vtkKWPopupButton_h
00021 #define __vtkKWPopupButton_h
00022 
00023 #include "vtkKWPushButton.h"
00024 
00025 class vtkKWFrame;
00026 class vtkKWTopLevel;
00027 
00028 class KWWidgets_EXPORT vtkKWPopupButton : public vtkKWPushButton
00029 {
00030 public:
00031   static vtkKWPopupButton* New();
00032   vtkTypeRevisionMacro(vtkKWPopupButton, vtkKWPushButton);
00033   void PrintSelf(ostream& os, vtkIndent indent);
00034 
00035   // Description:
00036   // Access to sub-widgets.
00037   // The PopupFrame widget is the place to put your own sub-widgets.
00038   vtkGetObjectMacro(PopupTopLevel, vtkKWTopLevel);
00039   vtkGetObjectMacro(PopupFrame, vtkKWFrame);
00040   vtkGetObjectMacro(PopupCloseButton, vtkKWPushButton);
00041 
00042   // Description:
00043   // Set the popup title.
00044   virtual void SetPopupTitle(const char* title);
00045 
00046   // Description:
00047   // Update the "enable" state of the object and its internal parts.
00048   // Depending on different Ivars (this->Enabled, the application's 
00049   // Limited Edition Mode, etc.), the "enable" state of the object is updated
00050   // and propagated to its internal parts/subwidgets. This will, for example,
00051   // enable/disable parts of the widget UI, enable/disable the visibility
00052   // of 3D widgets, etc.
00053   virtual void UpdateEnableState();
00054 
00055   // Description:
00056   // Specifies a command to associate with the widget. This command is 
00057   // typically invoked when the popup is withdrawn.
00058   // The 'object' argument is the object that will have the method called on
00059   // it. The 'method' argument is the name of the method to be called and any
00060   // arguments in string form. If the object is NULL, the method is still
00061   // evaluated as a simple command. 
00062   virtual void SetWithdrawCommand(vtkObject *object, const char* command);
00063 
00064   // Description:
00065   // Callbacks. Internal, do not use.
00066   virtual void DisplayPopupCallback();
00067   virtual void WithdrawPopupCallback();
00068 
00069 protected:
00070   vtkKWPopupButton();
00071   ~vtkKWPopupButton();
00072 
00073   // Description:
00074   // Create the widget.
00075   virtual void CreateWidget();
00076 
00077   vtkKWTopLevel   *PopupTopLevel;
00078   vtkKWFrame      *PopupFrame;
00079   vtkKWPushButton *PopupCloseButton;
00080 
00081   char* WithdrawCommand;
00082   virtual void InvokeWithdrawCommand();
00083 
00084   virtual void Bind();
00085   virtual void UnBind();
00086 
00087 private:
00088   vtkKWPopupButton(const vtkKWPopupButton&); // Not implemented
00089   void operator=(const vtkKWPopupButton&); // Not implemented
00090 };
00091 
00092 #endif
00093 

Generated on Mon Aug 16 2010 18:58:46 for KWWidgets by  doxygen 1.7.1