ROOT logo
// @(#)root/gviz3d:$Id: TStructNodeEditor.h 30023 2009-09-02 17:57:16Z brun $
// Author: Tomasz Sosnicki   18/09/09

/*************************************************************************
* Copyright (C) 1995-2009, Rene Brun and Fons Rademakers.               *
* All rights reserved.                                                  *
*                                                                       *
* For the licensing terms see $ROOTSYS/LICENSE.                         *
* For the list of contributors see $ROOTSYS/README/CREDITS.             *
*************************************************************************/

#ifndef ROOT_TStructNodeEditor
#define ROOT_TStructNodeEditor

#include <TGedFrame.h>

class TList;
class TStructNode;
class TStructNodeProperty;
class TGNumberEntry;
class TGLabel;
class TGTextEntry;
class TGColorSelect;
class TGCheckButton;

class TStructNodeEditor : public TGedFrame {

protected:
   TList               *fColors;                // Pointer to list with class colors 
   TStructNode         *fNode;                  // Pointer to node which is edited
   TGNumberEntry       *fMaxObjectsNumberEntry; // Sets maximum number of nodes on scene
   TGNumberEntry       *fMaxLevelsNumberEntry;  // Sets maximum number of visible levels on scene
   TGLabel             *fTypeName;              // Label with name of type
   TGLabel             *fNodeNameLabel;         // Label with name of node
   TGTextEntry         *fNameEntry;             // Text entry with name of property
   TGColorSelect       *fColorSelect;           // Control to selec a color
   TStructNodeProperty *fSelectedPropert;       // Pointer to property associated with node
   TGTextButton        *fDefaultButton;         // Resets color to default
   TGTextButton        *fApplyButton;           // Apply changes button
   TGCheckButton       *fAutoRefesh;           // Condition for auto update

   TStructNodeProperty* FindNodeProperty(TStructNode* node);
   TStructNodeProperty* GetDefaultProperty();
   void                 Init();

public:
   TStructNodeEditor(TList* colors, const TGWindow *p = 0, Int_t width = 140, Int_t height = 30,
      UInt_t options = kChildFrame, Pixel_t back = GetDefaultFrameBackground());
   ~TStructNodeEditor(); 

   void  ApplyButtonSlot();
   void  AutoRefreshButtonSlot(Bool_t on);
   void  ColorSelectedSlot(Pixel_t color);
   void  DefaultButtonSlot();
   void  MaxLevelsValueSetSlot(Long_t);
   void  MaxObjectsValueSetSlot(Long_t);
   void  SetModel(TObject* obj);
   void  Update(Bool_t resetCamera);
   void  Update();

   ClassDef(TStructNodeEditor,1) // GUI fo editing TStructNode
};
#endif // ROOT_TStructNodeEditor

 TStructNodeEditor.h:1
 TStructNodeEditor.h:2
 TStructNodeEditor.h:3
 TStructNodeEditor.h:4
 TStructNodeEditor.h:5
 TStructNodeEditor.h:6
 TStructNodeEditor.h:7
 TStructNodeEditor.h:8
 TStructNodeEditor.h:9
 TStructNodeEditor.h:10
 TStructNodeEditor.h:11
 TStructNodeEditor.h:12
 TStructNodeEditor.h:13
 TStructNodeEditor.h:14
 TStructNodeEditor.h:15
 TStructNodeEditor.h:16
 TStructNodeEditor.h:17
 TStructNodeEditor.h:18
 TStructNodeEditor.h:19
 TStructNodeEditor.h:20
 TStructNodeEditor.h:21
 TStructNodeEditor.h:22
 TStructNodeEditor.h:23
 TStructNodeEditor.h:24
 TStructNodeEditor.h:25
 TStructNodeEditor.h:26
 TStructNodeEditor.h:27
 TStructNodeEditor.h:28
 TStructNodeEditor.h:29
 TStructNodeEditor.h:30
 TStructNodeEditor.h:31
 TStructNodeEditor.h:32
 TStructNodeEditor.h:33
 TStructNodeEditor.h:34
 TStructNodeEditor.h:35
 TStructNodeEditor.h:36
 TStructNodeEditor.h:37
 TStructNodeEditor.h:38
 TStructNodeEditor.h:39
 TStructNodeEditor.h:40
 TStructNodeEditor.h:41
 TStructNodeEditor.h:42
 TStructNodeEditor.h:43
 TStructNodeEditor.h:44
 TStructNodeEditor.h:45
 TStructNodeEditor.h:46
 TStructNodeEditor.h:47
 TStructNodeEditor.h:48
 TStructNodeEditor.h:49
 TStructNodeEditor.h:50
 TStructNodeEditor.h:51
 TStructNodeEditor.h:52
 TStructNodeEditor.h:53
 TStructNodeEditor.h:54
 TStructNodeEditor.h:55
 TStructNodeEditor.h:56
 TStructNodeEditor.h:57
 TStructNodeEditor.h:58
 TStructNodeEditor.h:59
 TStructNodeEditor.h:60
 TStructNodeEditor.h:61
 TStructNodeEditor.h:62
 TStructNodeEditor.h:63
 TStructNodeEditor.h:64