Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

GUI/Widgets/vtkKWTree.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003 Copyright (c) 1998-2003 Kitware Inc. 469 Clifton Corporate Parkway,
00004 Clifton Park, NY, 12065, USA.
00005 All rights reserved.
00006 
00007 Redistribution and use in source and binary forms, with or without
00008 modification, are permitted provided that the following conditions are met:
00009 
00010  * Redistributions of source code must retain the above copyright notice,
00011    this list of conditions and the following disclaimer.
00012 
00013  * Redistributions in binary form must reproduce the above copyright notice,
00014    this list of conditions and the following disclaimer in the documentation
00015    and/or other materials provided with the distribution.
00016 
00017  * Neither the name of Kitware nor the names of any contributors may be used
00018    to endorse or promote products derived from this software without specific
00019    prior written permission.
00020 
00021  * Modified source versions must be plainly marked as such, and must not be
00022    misrepresented as being the original software.
00023 
00024 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
00025 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00026 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00027 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
00028 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00029 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00030 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00031 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00032 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00033 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00034 
00035 =========================================================================*/
00042 #ifndef __vtkKWTree_h
00043 #define __vtkKWTree_h
00044 
00045 #include "vtkKWCoreWidget.h"
00046 
00047 class KWWIDGETS_EXPORT vtkKWTree : public vtkKWCoreWidget
00048 {
00049 public:
00050   static vtkKWTree* New();
00051   vtkTypeRevisionMacro(vtkKWTree,vtkKWCoreWidget);
00052   void PrintSelf(ostream& os, vtkIndent indent);
00053 
00055   virtual void Create(vtkKWApplication *app);
00056 
00058   virtual void SetSelectionToNode(const char *node);
00059 
00061   virtual void ClearSelection();
00062 
00064   virtual const char* GetSelection();
00065 
00067   virtual int HasSelection();
00068 
00070 
00076   virtual void AddNode(const char *parent,
00077                        const char *node,
00078                        const char *text = NULL,
00079                        const char *data = NULL,
00080                        int is_open = 0,
00081                        int is_selectable = 1);
00083 
00085   virtual void SeeNode(const char *node);
00086 
00088 
00089   virtual void OpenNode(const char *node);
00090   virtual void CloseNode(const char *node);
00091   virtual int IsNodeOpen(const char *node);
00093 
00095 
00096   virtual void OpenFirstNode();
00097   virtual void CloseFirstNode();
00099 
00101 
00102   virtual void OpenTree(const char *node);
00103   virtual void CloseTree(const char *node);
00105 
00107   virtual int HasNode(const char *node);
00108 
00110   virtual void DeleteAllNodes();
00111 
00113   virtual const char* GetNodeChildren(const char *node);
00114 
00116   virtual const char* GetNodeParent(const char *node);
00117 
00119 
00120   virtual const char* GetNodeUserData(const char *node);
00121   virtual void SetNodeUserData(const char *node, const char *data);
00122   virtual const char* GetNodeText(const char *node);
00123   virtual void SetNodeText(const char *node, const char *text);
00124   virtual int GetNodeSelectableFlag(const char *node);
00125   virtual void SetNodeSelectableFlag(const char *node, int flag);
00126   virtual const char* GetNodeFont(const char *node);
00127   virtual void SetNodeFont(const char *node, const char *font);
00128   virtual void SetNodeFontWeightToBold(const char *node);
00129   virtual void SetNodeFontWeightToNormal(const char *node);
00130   virtual void SetNodeFontSlantToItalic(const char *node);
00131   virtual void SetNodeFontSlantToRoman(const char *node);
00133 
00135 
00136   virtual void SetWidth(int);
00137   virtual int GetWidth();
00138   virtual void SetHeight(int);
00139   virtual int GetHeight();
00141 
00143 
00145   vtkBooleanMacro(RedrawOnIdle, int);
00146   virtual void SetRedrawOnIdle(int);
00147   virtual int GetRedrawOnIdle();
00149 
00151 
00153   vtkBooleanMacro(SelectionFill, int);
00154   virtual void SetSelectionFill(int);
00155   virtual int GetSelectionFill();
00157 
00159 
00160   virtual void GetSelectionBackgroundColor(double *r, double *g, double *b);
00161   virtual double* GetSelectionBackgroundColor();
00162   virtual void SetSelectionBackgroundColor(double r, double g, double b);
00163   virtual void SetSelectionBackgroundColor(double rgb[3])
00164     { this->SetSelectionBackgroundColor(rgb[0], rgb[1], rgb[2]); };
00165   virtual void GetSelectionForegroundColor(double *r, double *g, double *b);
00166   virtual double* GetSelectionForegroundColor();
00167   virtual void SetSelectionForegroundColor(double r, double g, double b);
00168   virtual void SetSelectionForegroundColor(double rgb[3])
00169     { this->SetSelectionForegroundColor(rgb[0], rgb[1], rgb[2]); };
00171   
00174   virtual void SetOpenCommand(vtkObject *obj, const char *method);
00175 
00178   virtual void SetCloseCommand(vtkObject *obj, const char *method);
00179 
00181 
00184   virtual void SetBindText(
00185     const char *event, vtkObject *obj, const char *method);
00187 
00189 
00192   virtual void SetDoubleClickOnNodeCommand(
00193     vtkObject *obj, const char *method);
00194   virtual void SetSingleClickOnNodeCommand(
00195     vtkObject *obj, const char *method);
00197  
00199 
00200   virtual void SetSelectionChangedCommand(
00201     vtkObject *obj, const char *method);
00203 
00210   virtual void UpdateEnableState();
00211 
00212 protected:
00213   vtkKWTree() {};
00214   ~vtkKWTree() {};
00215 
00216 private:
00217   vtkKWTree(const vtkKWTree&); // Not implemented
00218   void operator=(const vtkKWTree&); // Not implemented
00219 };
00220 
00221 #endif

Generated on Tue May 30 12:31:44 2006 for ParaView by doxygen 1.3.5