103 }
else if (
fMode == 2) {
128 TString newTitle(
"Imported from canvas ");
144 gClient->GetColorByName(
"#FF0000", red);
188 Connect(
"CloseWindow()",
"TStyleDialog",
this,
"DoCloseWindow()");
189 fName->
Connect(
"TextChanged(const char *)",
"TStyleDialog",
this,
"DoUpdate()");
190 fOK->
Connect(
"Clicked()",
"TStyleDialog",
this,
"DoOK()");
191 fCancel->
Connect(
"Clicked()",
"TStyleDialog",
this,
"DoCancel()");
273 gROOT->GetListOfStyles()->Add(tmpStyle);
ULong_t Pixel_t
Pixel value.
Option_t Option_t TPoint TPoint const char mode
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t SetWMSizeHints
R__EXTERN TVirtualMutex * gROOTMutex
R__EXTERN TStyle * gStyle
#define R__LOCKGUARD(mutex)
void UseCurrentStyle() override
Force a copy of current style for all objects in canvas.
virtual void AddFrame(TGFrame *f, TGLayoutHints *l=nullptr)
Add frame to the composite frame using the specified layout hints.
UInt_t GetDefaultWidth() const override
void MapSubwindows() override
Map all sub windows that are part of the composite frame.
UInt_t GetDefaultHeight() const override
void SetCleanup(Int_t mode=kLocalCleanup) override
Turn on automatic cleanup of child frames in dtor.
void Resize(UInt_t w=0, UInt_t h=0) override
Resize the frame.
void MapWindow() override
map window
A composite frame that layout their children in horizontal way.
This class handles GUI labels.
virtual void SetTextColor(Pixel_t color, Bool_t global=kFALSE)
Changes text color.
virtual void SetText(TGString *newText)
Set new text in label.
This class describes layout hints used by the layout classes.
virtual void SendCloseMessage()
Send close message to self.
void SetWindowName(const char *name=nullptr) override
Set window name. This is typically done via the window manager.
Yield an action as soon as it is clicked.
A TGTextEntry is a one line text input widget.
const char * GetText() const
void SetEnabled(Bool_t flag=kTRUE)
Defines transient windows that typically are used for dialogs windows.
virtual void CenterOnParent(Bool_t croot=kTRUE, EPlacement pos=kCenter)
Position transient frame centered relative to the parent frame.
TObject * After(const TObject *obj) const override
Returns the object after object obj.
void Add(TObject *obj) override
TObject * Remove(TObject *obj) override
Remove object from the list.
TObject * First() const override
Return the first object in the list. Returns 0 when list is empty.
virtual void SetTitle(const char *title="")
Set the title of the TNamed.
const char * GetName() const override
Returns name of object.
const char * GetTitle() const override
Returns title of object.
virtual void SetName(const char *name)
Set the name of the TNamed.
Mother of all ROOT objects.
const char * GetName() const override
Returns name of object.
Bool_t Connect(const char *signal, const char *receiver_class, void *receiver, const char *slot)
Non-static method is used to connect from the signal of this object to the receiver slot.
Bool_t Disconnect(const char *signal=nullptr, void *receiver=nullptr, const char *slot=nullptr)
Disconnects signal of this object from slot of receiver.
const char * Data() const
void Form(const char *fmt,...)
Formats a string using a printf style format descriptor.
This small class is useful to ask the user for a name and a title, in order to rename a style,...
void DoCancel()
Slot called when the Cancel button is clicked.
TList * fTrashListLayout
to avoid memory leak
void DoOK()
Slot called when the OK button is clicked.
~TStyleDialog() override
Destructor.
TStyleDialog(TStyleManager *sm, TStyle *cur, Int_t mode, TVirtualPad *currentPad=nullptr)
Constructor.
Int_t fMode
1=new, 2=rename, 3=import
TGTextEntry * fTitle
TStyle title text entry.
void DoCloseWindow()
Slot called when the window is closed via the window manager.
TVirtualPad * fCurPad
current pad from which to import
TList * fTrashListFrame
to avoid memory leak
TStyle * fCurStyle
style to copy or to rename
TGTextButton * fOK
save button
TGTextEntry * fName
TStyle name text entry.
TGTextButton * fCancel
cancel button
TStyleManager * fStyleManager
parent style manager
TGLabel * fTitleLabel
title label
TGLabel * fNameLabel
name label
void DoUpdate()
Slot called every time the name is changed.
TGLabel * fWarnLabel
label for warnings
This class provides a Graphical User Interface to manage styles in ROOT.
void SetLastChoice(Bool_t choice)
TStyle objects may be created to define special styles.
void SetIsReading(Bool_t reading=kTRUE)
Sets the fIsReading member to reading (default=kTRUE).
TVirtualPad is an abstract base class for the Pad and Canvas classes.
virtual TCanvas * GetCanvas() const =0