37 Int_t GetUnID(
void) {
return ++nID; }
50 ~SplitButtonTest()
override;
53 void DoSplit(
Bool_t split);
55 void HandleMenu(
Int_t id);
64 Connect(
"CloseWindow()",
"SplitButtonTest",
this,
"DoExit()");
72 fPopMenu->AddEntry(
"Button &1", ID_1);
73 fPopMenu->AddEntry(
"Button &2", ID_2);
74 fPopMenu->DisableEntry(ID_2);
75 fPopMenu->AddEntry(
"Button &3", ID_3);
76 fPopMenu->AddSeparator();
82 fPopMenu->AddEntry(
"En&try with really really long name", ID_4);
83 fPopMenu->AddEntry(
"&Exit", ID_5);
87 fMButton->Connect(
"ItemClicked(Int_t)",
"SplitButtonTest",
this,
"HandleMenu(Int_t)");
91 fCButton->
Connect(
"Toggled(Bool_t)",
"SplitButtonTest",
this,
"DoSplit(Bool_t)");
97 fEButton->
Connect(
"Toggled(Bool_t)",
"SplitButtonTest",
this,
"DoEnable(Bool_t)");
105 SetWindowName(
"SplitButton Test");
107 Resize(GetDefaultSize());
111SplitButtonTest::~SplitButtonTest()
117void SplitButtonTest::DoExit()
128void SplitButtonTest::DoSplit(
Bool_t split)
130 fMButton->SetSplit(split);
133void SplitButtonTest::DoEnable(
Bool_t on)
141void SplitButtonTest::HandleMenu(
Int_t id)
148 case ID_1: std::cout <<
"Button 1 was activated" << std::endl;
break;
149 case ID_2: std::cout <<
"Button 2 was activated" << std::endl;
break;
150 case ID_3: std::cout <<
"Button 3 was activated" << std::endl;
break;
151 case ID_4: std::cout <<
"Button with a really really long name was activated" << std::endl;
break;
152 case ID_5: DoExit();
break;
155void splitbuttonTest()
157 new SplitButtonTest(
gClient->GetRoot(), 100, 100);
#define ClassDefOverride(name, id)
R__EXTERN TApplication * gApplication
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 TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize MapSubwindows
virtual void Terminate(Int_t status=0)
Terminate the application by call TSystem::Exit() unless application has been told to return from Run...
virtual void AddFrame(TGFrame *f, TGLayoutHints *l=nullptr)
Add frame to the composite frame using the specified layout hints.
A composite frame that layout their children in horizontal way.
TGHotString is a string with a "hot" character underlined.
This class describes layout hints used by the layout classes.
Defines top level windows that interact with the system Window Manager.
A composite frame that layout their children in vertical way.
ROOT GUI Window base class.
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.