92 if (
fList->GetEntries() <= 1) {
145 static int id = 1000;
386 TString outtext =
b->GetText()->GetString();
387 Int_t hotpos =
b->GetText()->GetHotPos();
388 if ((hotpos > 0) && (hotpos < outtext.
Length()))
389 outtext.
Insert(hotpos - 1,
"&");
391 out <<
"\n // \"" << outtext <<
"\" shutter item \n";
392 out <<
" TGShutterItem *" <<
GetName() <<
" = new TGShutterItem(" <<
fParent->GetName() <<
", new TGHotString(\""
396 if (option && strstr(option,
"keep_names"))
397 out <<
" " <<
GetName() <<
"->SetName(\"" <<
GetName() <<
"\");\n";
405 <<
"->GetContainer();\n";
409 el->fFrame->SavePrimitive(out, option);
411 el->fLayout->SavePrimitive(out, option);
421 out <<
"\n // shutter\n";
427 out <<
" " <<
GetName() <<
"->SetDefaultSize(";
430 if (option && strstr(option,
"keep_names"))
431 out <<
" " <<
GetName() <<
"->SetName(\"" <<
GetName() <<
"\");\n";
439 el->fFrame->SavePrimitive(out, option);
440 out <<
" " <<
GetName() <<
"->AddItem(" << el->fFrame->GetName();
int Int_t
Signed integer 4 bytes (int).
long Longptr_t
Integer large enough to hold a pointer (platform-dependent).
unsigned int UInt_t
Unsigned integer 4 bytes (unsigned int).
bool Bool_t
Boolean (0=false, 1=true) (bool).
const char Option_t
Option string (const char).
A frame containing two scrollbars (a horizontal and a vertical) and a viewport.
void SetScrolling(Int_t scrolling)
Set scrolling policy.
TGLayoutManager * fLayoutManager
layout manager
virtual void AddFrame(TGFrame *f, TGLayoutHints *l=nullptr)
Add frame to the composite frame using the specified layout hints.
virtual TList * GetList() const
Int_t MustCleanup() const override
void MapSubwindows() override
Map all sub windows that are part of the composite frame.
TGCompositeFrame(const TGCompositeFrame &)=delete
virtual void ShowFrame(TGFrame *f)
Show sub frame.
TList * fList
container of frame elements
virtual void RemoveFrame(TGFrame *f)
Remove frame from composite frame.
virtual void HideFrame(TGFrame *f)
Hide sub frame.
void MoveResize(Int_t x, Int_t y, UInt_t w=0, UInt_t h=0) override
Move and/or resize the frame.
TGFrame(const TGFrame &)=delete
UInt_t fHeight
frame height
virtual UInt_t GetDefaultHeight() const
Int_t fBorderWidth
frame border width
TGFrameElement * GetFrameElement() const
static Pixel_t GetDefaultFrameBackground()
Get default frame background.
virtual UInt_t GetOptions() const
TString GetOptionString() const
Returns a frame option string - used in SavePrimitive().
TGHotString is a string with a "hot" character underlined.
This class describes layout hints used by the layout classes.
TGClient * fClient
Connection to display server.
void SavePrimitive(std::ostream &out, Option_t *option="") override
Save a shutter item widget as a C++ statement(s) on output stream out.
TGLayoutHints * fL2
positioning hints
TGFrame * fContainer
container in canvas containing shutter items
~TGShutterItem() override
Clan up shutter item.
TGCanvas * fCanvas
canvas of shutter item
TGButton * GetButton() const
TGButton * fButton
shutter item button
TGShutterItem(const TGShutterItem &)=delete
TGFrame * GetContainer() const
virtual void AddItem(TGShutterItem *item)
Add shutter item to shutter frame.
virtual void RemovePage()
Remove selected page.
TGShutterItem * fClosingItem
Item closing down.
TGDimension GetDefaultSize() const override
Return the default / minimal size of the widget.
TTimer * fTimer
Timer for animation.
Bool_t ProcessMessage(Longptr_t cmd, Longptr_t parm1, Longptr_t parm2) override
Handle shutter messages.
TGShutterItem * GetItem(const char *name)
returns a shutter item by name (name is hot string of shutter item)
void SavePrimitive(std::ostream &out, Option_t *option="") override
Save a shutter widget as a C++ statement(s) on output stream out.
UInt_t fDefHeight
Default height.
TGShutterItem * fSelectedItem
Item currently open.
virtual void EnableItem(const char *name, Bool_t on=kTRUE)
Disable/enbale shutter item.
virtual void SetSelectedItem(TGShutterItem *item)
Set item to be the currently open shutter item.
TGShutter(const TGShutter &)=delete
TList * fTrash
Items that need to be cleaned up.
Int_t fHeightIncrement
Height delta.
virtual void SetDefaultSize(UInt_t w, UInt_t h)
Set the default / minimal size of the widget.
void Layout() override
Layout shutter items.
Int_t fClosingHeight
Closing items current height.
virtual void Selected(TGShutterItem *item)
TGShutterItem * GetSelectedItem() const
Int_t fClosingHadScrollbar
Closing item had a scroll bar.
~TGShutter() override
Cleanup shutter widget.
virtual TGShutterItem * AddPage(const char *item="Page")
Add new page (shutter item).
virtual void RenamePage(const char *name)
Rename selected page.
UInt_t fDefWidth
Default width.
Bool_t HandleTimer(TTimer *t) override
Shutter item animation.
virtual void RemoveItem(const char *name)
Remove item from shutter.
Yield an action as soon as it is clicked.
virtual void SetText(TGHotString *new_label)
Set new button text.
TString GetString() const
TGVerticalFrame(const TGWindow *p=nullptr, UInt_t w=1, UInt_t h=1, UInt_t options=kChildFrame, Pixel_t back=GetDefaultFrameBackground())
ROOT GUI Window base class.
const TGWindow * fParent
Parent window.
@ kEditDisableLayout
window layout cannot be edited
@ kEditDisableBtnEnable
window can handle mouse button events
@ kEditDisableGrab
window grab cannot be edited
virtual void DestroyWindow()
destroy window
const char * GetName() const override
Return unique name, used in SavePrimitive methods.
UInt_t fEditDisabled
flags used for "guibuilding"
TString & Insert(Ssiz_t pos, const char *s)
TString & ReplaceSpecialCppChars()
Find special characters which are typically used in printf() calls and replace them by appropriate es...
const char * Data() const
Handles synchronous and a-synchronous timer events.