Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TEveTriangleSetEditor.cxx
Go to the documentation of this file.
1// @(#)root/eve:$Id$
2// Authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 2007
3
4/*************************************************************************
5 * Copyright (C) 1995-2007, 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
13#include "TEveTriangleSet.h"
14
15#include "TGWidget.h"
16#include "TGLabel.h"
17
18/** \class TEveTriangleSetEditor
19\ingroup TEve
20Editor for TEveTriangleSet class.
21*/
22
23
24////////////////////////////////////////////////////////////////////////////////
25/// Constructor.
26
28 UInt_t options, Pixel_t back) :
29 TGedFrame(p, width, height, options | kVerticalFrame, back),
30 fM (nullptr),
31 fInfo (nullptr)
32{
33 MakeTitle("TEveTriangleSet");
34
35 fInfo = new TGLabel(this);
38}
39
40////////////////////////////////////////////////////////////////////////////////
41/// Set model object.
42
44{
45 fM = dynamic_cast<TEveTriangleSet*>(obj);
46
47 fInfo->SetText(Form("Vertices: %d, Triangles: %d", fM->GetNVerts(), fM->GetNTrings()));
48}
@ kVerticalFrame
Definition GuiTypes.h:381
ULong_t Pixel_t
Pixel value.
Definition GuiTypes.h:40
@ kLHintsNormal
Definition TGLayout.h:32
@ kLHintsExpandX
Definition TGLayout.h:30
@ kTextLeft
Definition TGWidget.h:23
winID h TVirtualViewer3D TVirtualGLPainter p
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
char * Form(const char *fmt,...)
Formats a string in a circular formatting buffer.
Definition TString.cxx:2495
TEveTriangleSetEditor(const TEveTriangleSetEditor &)
void SetModel(TObject *obj) override
Set model object.
Made from a list of vertices and a list of triangles (triplets of vertex indices).
Int_t GetNTrings() const
Int_t GetNVerts() const
virtual void AddFrame(TGFrame *f, TGLayoutHints *l=nullptr)
Add frame to the composite frame using the specified layout hints.
Definition TGFrame.cxx:1109
This class handles GUI labels.
Definition TGLabel.h:24
void SetTextJustify(Int_t tmode)
Set text justification.
Definition TGLabel.cxx:395
virtual void SetText(TGString *newText)
Set new text in label.
Definition TGLabel.cxx:179
This class describes layout hints used by the layout classes.
Definition TGLayout.h:50
ROOT GUI Window base class.
Definition TGWindow.h:23
Base frame for implementing GUI - a service class.
Definition TGedFrame.h:27
virtual void MakeTitle(const char *title)
Create attribute frame title.
Definition TGedFrame.cxx:94
Mother of all ROOT objects.
Definition TObject.h:41