00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
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&);
00218 void operator=(const vtkKWTree&);
00219 };
00220
00221 #endif