Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TPieEditor.h
Go to the documentation of this file.
1// @(#)root/ged:$Id$
2// Author: Guido Volpi 04/10/2007
3
4/*************************************************************************
5 * Copyright (C) 1995-2002, 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_TPieEditor
13#define ROOT_TPieEditor
14
15
16#include "TGedFrame.h"
17
18class TPie;
19class TGButtonGroup;
20class TGTextEntry;
21class TGCheckButton;
22class TGRadioButton;
23class TGNumberEntry;
24class TGColorSelect;
26class TGComboBox;
27
28class TPieEditor : public TGedFrame {
29
30protected:
31 char fDrawShape; ///< Shape of the Graph (simple, smooth, bar)
32 TGTextEntry *fTitle; ///< Contains the title of the graph
33 Int_t fTitlePrec; ///< font precision level
34 TPie *fPie; ///< Pie object
35 TGButtonGroup *fgr; ///< Group the Radiobuttons:
36 TGRadioButton *fLblDirH; ///< Draw slice's labels horizontal
37 TGRadioButton *fLblDirR; ///< Draw slice's labels radial to the piechart
38 TGRadioButton *fLblDirT; ///< Draw slice's labels tangential to the piechart's circle
39 TGLayoutHints *fShape1lh; ///< layout-hints for fShape1
40 TGCheckButton *fOutlineOnOff; ///< set piechart outline visible/unvisible
41 TGCheckButton *fIs3D; ///< set if is enabled the pseudo-3d mode
42 TGNumberEntry *f3DHeight; ///< set the 3D tickness
43 TGNumberEntry *f3DAngle; ///< set the pseudo 3D angle
44 TGColorSelect *fColorSelect; ///< font color selector
46 TGComboBox *fSizeCombo; ///< font size
47
48 virtual void ConnectSignals2Slots();
49
51
52public:
53 TPieEditor(const TGWindow *p = nullptr,
54 Int_t width = 140, Int_t height = 30,
55 UInt_t options = kChildFrame,
57 ~TPieEditor() override;
58 void SetModel(TObject* ) override;
59 void ActivateBaseClassEditors(TClass*) override;
60
61 // slots related to graph attributes
62 virtual void DoShape();
63 virtual void DoMarkerOnOff(Bool_t on);
64 virtual void DoTitle(const char *text);
65 virtual void DoGraphLineWidth();
66 virtual void DoChange3DAngle();
67 virtual void DoTextChange();
68
69 ClassDefOverride(TPieEditor,0) // piechart editor
70};
71#endif
@ kChildFrame
Definition GuiTypes.h:379
ULong_t Pixel_t
Pixel value.
Definition GuiTypes.h:40
#define ClassDefOverride(name, id)
Definition Rtypes.h:341
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
Option_t Option_t TPoint TPoint const char text
TClass instances represent classes, structs and namespaces in the ROOT type system.
Definition TClass.h:81
Organizes TGButton widgets in a group.
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.
A combobox (also known as a drop down listbox) allows the selection of one item out of a list of item...
Definition TGComboBox.h:47
The TGFontTypeComboBox is user callable and it creates a combobox for selecting the font.
Definition TGComboBox.h:178
A subclasses of TGWindow, and is used as base class for some simple widgets (buttons,...
Definition TGFrame.h:80
static Pixel_t GetDefaultFrameBackground()
Get default frame background.
Definition TGFrame.cxx:683
This class describes layout hints used by the layout classes.
Definition TGLayout.h:50
TGNumberEntry is a number entry input widget with up/down buttons.
Selects different options.
Definition TGButton.h:321
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
Mother of all ROOT objects.
Definition TObject.h:41
Implements GUI for pie-chart attributes.
Definition TPieEditor.h:28
void ActivateBaseClassEditors(TClass *) override
Exclude TAttTextEditor from this interface.
Int_t fTitlePrec
font precision level
Definition TPieEditor.h:33
TGRadioButton * fLblDirH
Draw slice's labels horizontal.
Definition TPieEditor.h:36
TGNumberEntry * f3DAngle
set the pseudo 3D angle
Definition TPieEditor.h:43
virtual void DoTextChange()
Change text.
TPie * fPie
Pie object.
Definition TPieEditor.h:34
TGColorSelect * fColorSelect
font color selector
Definition TPieEditor.h:44
char fDrawShape
Shape of the Graph (simple, smooth, bar)
Definition TPieEditor.h:31
virtual void ConnectSignals2Slots()
Connect signals to slots.
virtual void DoChange3DAngle()
Slot for setting the 3D angle.
TGNumberEntry * f3DHeight
set the 3D tickness
Definition TPieEditor.h:42
TGCheckButton * fIs3D
set if is enabled the pseudo-3d mode
Definition TPieEditor.h:41
virtual void DoMarkerOnOff(Bool_t on)
Slot for setting markers as visible/invisible.
virtual void DoGraphLineWidth()
Slot connected to the graph line width.
void SetModel(TObject *) override
Pick up the used values of graph attributes.
TGLayoutHints * fShape1lh
layout-hints for fShape1
Definition TPieEditor.h:39
static TGComboBox * BuildFontSizeComboBox(TGFrame *, Int_t)
Create text size combo box.
TGRadioButton * fLblDirT
Draw slice's labels tangential to the piechart's circle.
Definition TPieEditor.h:38
TGRadioButton * fLblDirR
Draw slice's labels radial to the piechart.
Definition TPieEditor.h:37
TGComboBox * fSizeCombo
font size
Definition TPieEditor.h:46
TGButtonGroup * fgr
Group the Radiobuttons:
Definition TPieEditor.h:35
TGTextEntry * fTitle
Contains the title of the graph.
Definition TPieEditor.h:32
TGCheckButton * fOutlineOnOff
set piechart outline visible/unvisible
Definition TPieEditor.h:40
TGFontTypeComboBox * fTypeCombo
font style
Definition TPieEditor.h:45
virtual void DoShape()
Slot connected to the draw options.
virtual void DoTitle(const char *text)
Slot for setting the graph title.
~TPieEditor() override
Destructor of pie editor.
Draw a Pie Chart,.
Definition TPie.h:23