Logo ROOT  
Reference Guide
Loading...
Searching...
No Matches
TEveWindowEditor.cxx
Go to the documentation of this file.
1// @(#)root/eve:$Id$
2// Author: Matevz Tadel 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
12#include "TEveWindowEditor.h"
13#include "TEveWindow.h"
14
15#include "TGButton.h"
16
17/** \class TEveWindowEditor
18\ingroup TEve
19GUI editor for TEveWindow.
20*/
21
22
23////////////////////////////////////////////////////////////////////////////////
24/// Constructor.
25
27 UInt_t options, Pixel_t back) :
28 TGedFrame(p, width, height, options | kVerticalFrame, back),
29 fM(nullptr),
30 fShowTitleBar(nullptr)
31{
32 MakeTitle("TEveWindow");
33
34 fShowTitleBar = new TGCheckButton(this, "Show title-bar");
35 AddFrame(fShowTitleBar); // new TGLayoutHints());
36 fShowTitleBar->Connect("Clicked()", "TEveWindowEditor", this,
37 "DoShowTitleBar()");
38}
39
40////////////////////////////////////////////////////////////////////////////////
41/// Set model object.
42
44{
45 fM = dynamic_cast<TEveWindow*>(obj);
46
47 fShowTitleBar->SetState(fM->GetShowTitleBar() ? kButtonDown : kButtonUp);
48}
49
50////////////////////////////////////////////////////////////////////////////////
51/// Slot for ShowTitleBar.
52
54{
55 fM->SetShowTitleBar(fShowTitleBar->IsOn());
56 Update();
57}
@ kVerticalFrame
Definition GuiTypes.h:382
ULong_t Pixel_t
Pixel value.
Definition GuiTypes.h:41
int Int_t
Signed integer 4 bytes (int).
Definition RtypesCore.h:59
unsigned int UInt_t
Unsigned integer 4 bytes (unsigned int).
Definition RtypesCore.h:60
@ kButtonDown
Definition TGButton.h:54
@ kButtonUp
Definition TGButton.h:53
TEveWindowEditor(const TEveWindowEditor &)
void SetModel(TObject *obj) override
Set model object.
TGCheckButton * fShowTitleBar
void DoShowTitleBar()
Slot for ShowTitleBar.
Abstract base-class for representing eve-windows.
Definition TEveWindow.h:210
Selects different options.
Definition TGButton.h:264
virtual void AddFrame(TGFrame *f, TGLayoutHints *l=nullptr)
Add frame to the composite frame using the specified layout hints.
Definition TGFrame.cxx:1109
ROOT GUI Window base class.
Definition TGWindow.h:23
TGedFrame(const TGedFrame &)=delete
virtual void MakeTitle(const char *title)
Create attribute frame title.
Definition TGedFrame.cxx:94
virtual void Update()
Update the current pad when an attribute is changed via GUI.
Definition TGedFrame.cxx:71
Mother of all ROOT objects.
Definition TObject.h:42