Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TStructNodeEditor.h
Go to the documentation of this file.
1// @(#)root/gviz3d:$Id$
2// Author: Tomasz Sosnicki 18/09/09
3
4/*************************************************************************
5* Copyright (C) 1995-2009, Rene Brun and Fons Rademakers. *
6* All rights reserved. *
7* *
8* For the licensing terms see $ROOTSYS/LICENSE. *
9* For the list of contributors see $ROOTSYS/README/CREDITS. *
10*************************************************************************/
11
12#ifndef ROOT_TStructNodeEditor
13#define ROOT_TStructNodeEditor
14
15#include <TGedFrame.h>
16
17class TList;
18class TStructNode;
20class TGNumberEntry;
21class TGLabel;
22class TGTextEntry;
23class TGColorSelect;
24class TGCheckButton;
25
27
28protected:
29 TList *fColors; // Pointer to list with class colors
30 TStructNode *fNode; // Pointer to node which is edited
31 TGNumberEntry *fMaxObjectsNumberEntry; // Sets maximum number of nodes on scene
32 TGNumberEntry *fMaxLevelsNumberEntry; // Sets maximum number of visible levels on scene
33 TGLabel *fTypeName; // Label with name of type
34 TGLabel *fNodeNameLabel; // Label with name of node
35 TGTextEntry *fNameEntry; // Text entry with name of property
36 TGColorSelect *fColorSelect; // Control to selec a color
37 TStructNodeProperty *fSelectedPropert; // Pointer to property associated with node
38 TGTextButton *fDefaultButton; // Resets color to default
39 TGTextButton *fApplyButton; // Apply changes button
40 TGCheckButton *fAutoRefesh; // Condition for auto update
41
44 void Init();
45
46public:
47 TStructNodeEditor(TList* colors, const TGWindow *p = nullptr, Int_t width = 140, Int_t height = 30,
49 ~TStructNodeEditor() override;
50
51 void ApplyButtonSlot();
53 void ColorSelectedSlot(Pixel_t color);
54 void DefaultButtonSlot();
57 void SetModel(TObject* obj) override;
58 void Update(Bool_t resetCamera);
59 void Update() override;
60
61 ClassDefOverride(TStructNodeEditor, 0); // GUI fo editing TStructNode
62};
63#endif // ROOT_TStructNodeEditor
64
@ kChildFrame
Definition GuiTypes.h:379
ULong_t Pixel_t
Pixel value.
Definition GuiTypes.h:40
long Long_t
Definition RtypesCore.h:54
winID h TVirtualViewer3D TVirtualGLPainter p
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void on
Option_t Option_t width
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t height
Color * colors
Definition X3DBuffer.c:21
Selects different options.
Definition TGButton.h:264
Like a checkbutton but instead of the check mark there is color area with a little down arrow.
static Pixel_t GetDefaultFrameBackground()
Get default frame background.
Definition TGFrame.cxx:683
This class handles GUI labels.
Definition TGLabel.h:24
TGNumberEntry is a number entry input widget with up/down buttons.
Yield an action as soon as it is clicked.
Definition TGButton.h:142
A TGTextEntry is a one line text input widget.
Definition TGTextEntry.h:24
ROOT GUI Window base class.
Definition TGWindow.h:23
Base frame for implementing GUI - a service class.
Definition TGedFrame.h:27
A doubly linked list.
Definition TList.h:38
Mother of all ROOT objects.
Definition TObject.h:41
TGColorSelect * fColorSelect
void MaxLevelsValueSetSlot(Long_t)
Emmited when user changes maximum number of levels.
TStructNodeProperty * GetDefaultProperty()
Returns property with default color.
void MaxObjectsValueSetSlot(Long_t)
Emmited when user changes maximum number of objects.
void DefaultButtonSlot()
Slot for Defaulf button. Sets color of class to default.
~TStructNodeEditor() override
Destructor of node editor.
TGNumberEntry * fMaxLevelsNumberEntry
void AutoRefreshButtonSlot(Bool_t on)
Activated when user chage condition.
void ColorSelectedSlot(Pixel_t color)
Slot connected to the fill area color.
void SetModel(TObject *obj) override
Pick up the used node attributes.
TGNumberEntry * fMaxObjectsNumberEntry
TStructNodeProperty * fSelectedPropert
TGCheckButton * fAutoRefesh
TGTextEntry * fNameEntry
TGTextButton * fApplyButton
TGTextButton * fDefaultButton
ClassDefOverride(TStructNodeEditor, 0)
void Update() override
Signal emmited when color or other property like number of level is changed without camera reset.
TStructNodeProperty * FindNodeProperty(TStructNode *node)
Retruns property associated to the class of given node "node".
void Init()
Enables button and fields.
void ApplyButtonSlot()
ApplyButton Slot. Activated when user press Apply button. Sets properties of a node.