KWWidgets
vtkKWTclInteractor.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Module:    $RCSfile: vtkKWTclInteractor.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 vtkKWTclInteractor - a KW version of interactor.tcl
00015 // .SECTION Description
00016 // A widget to interactively execute Tcl commands
00017 
00018 #ifndef __vtkKWTclInteractor_h
00019 #define __vtkKWTclInteractor_h
00020 
00021 #include "vtkKWTopLevel.h"
00022 
00023 class vtkKWFrame;
00024 class vtkKWPushButton;
00025 class vtkKWEntry;
00026 class vtkKWLabel;
00027 class vtkKWTextWithScrollbars;
00028 
00029 class KWWidgets_EXPORT vtkKWTclInteractor : public vtkKWTopLevel
00030 {
00031 public:
00032   static vtkKWTclInteractor* New();
00033   vtkTypeRevisionMacro(vtkKWTclInteractor, vtkKWTopLevel);
00034   void PrintSelf(ostream& os, vtkIndent indent);
00035   
00036   // Description:
00037   // Append text to the display window. Can be used for sending
00038   // debugging information to the command prompt when no standard
00039   // output is available.
00040   virtual void AppendText(const char* text);
00041 
00042   // Description:
00043   // Update the "enable" state of the object and its internal parts.
00044   // Depending on different Ivars (this->Enabled, the application's 
00045   // Limited Edition Mode, etc.), the "enable" state of the object is updated
00046   // and propagated to its internal parts/subwidgets. This will, for example,
00047   // enable/disable parts of the widget UI, enable/disable the visibility
00048   // of 3D widgets, etc.
00049   virtual void UpdateEnableState();
00050 
00051   // Description:
00052   // Specifies the font to use when drawing text inside the widget. 
00053   // You can use predefined font names (e.g. 'system'), or you can specify
00054   // a set of font attributes with a platform-independent name, for example,
00055   // 'times 12 bold'. In this example, the font is specified with a three
00056   // element list: the first element is the font family, the second is the
00057   // size, the third is a list of style parameters (normal, bold, roman, 
00058   // italic, underline, overstrike). Example: 'times 12 {bold italic}'.
00059   // The Times, Courier and Helvetica font families are guaranteed to exist
00060   // and will be matched to the corresponding (closest) font on your system.
00061   // If you are familiar with the X font names specification, you can also
00062   // describe the font that way (say, '*times-medium-r-*-*-12*').
00063   virtual void SetFont(const char *font);
00064   virtual const char* GetFont();
00065 
00066   // Description:
00067   // Callbacks. Internal, do not use.
00068   virtual void EvaluateCallback();
00069   virtual void DownCallback();
00070   virtual void UpCallback();
00071 
00072 protected:
00073   vtkKWTclInteractor();
00074   ~vtkKWTclInteractor();
00075 
00076   // Description:
00077   // Create the widget.
00078   virtual void CreateWidget();
00079   
00080   vtkKWFrame      *ButtonFrame;
00081   vtkKWPushButton *DismissButton;
00082   vtkKWFrame      *CommandFrame;
00083   vtkKWLabel      *CommandLabel;
00084   vtkKWEntry      *CommandEntry;
00085   vtkKWTextWithScrollbars *DisplayText;
00086   
00087   int TagNumber;
00088   int CommandIndex;
00089 
00090 private:
00091   vtkKWTclInteractor(const vtkKWTclInteractor&); // Not implemented
00092   void operator=(const vtkKWTclInteractor&); // Not implemented
00093 };
00094 
00095 #endif
00096