37 Int_t GetUnID(
void) {
return ++nID ; }
51 virtual ~SplitButtonTest() ;
54 void DoSplit(
Bool_t split) ;
56 void HandleMenu(
Int_t id) ;
66 Connect(
"CloseWindow()",
"SplitButtonTest",
this,
"DoExit()") ;
74 fPopMenu->AddEntry(
"Button &1", ID_1);
75 fPopMenu->AddEntry(
"Button &2", ID_2);
76 fPopMenu->DisableEntry(ID_2);
77 fPopMenu->AddEntry(
"Button &3", ID_3);
78 fPopMenu->AddSeparator();
82 fPopMenu, IDs.GetUnID());
85 fPopMenu->AddEntry(
"En&try with really really long name", ID_4);
86 fPopMenu->AddEntry(
"&Exit", ID_5);
90 fMButton->Connect(
"ItemClicked(Int_t)",
"SplitButtonTest",
this,
96 fCButton->
Connect(
"Toggled(Bool_t)",
"SplitButtonTest",
this,
"DoSplit(Bool_t)");
104 fEButton->
Connect(
"Toggled(Bool_t)",
"SplitButtonTest",
this,
"DoEnable(Bool_t)");
113 SetWindowName(
"SplitButton Test") ;
115 Resize(GetDefaultSize()) ;
120SplitButtonTest::~SplitButtonTest()
126void SplitButtonTest::DoExit()
137void SplitButtonTest::DoSplit(
Bool_t split)
139 fMButton->SetSplit(split);
142void SplitButtonTest::DoEnable(
Bool_t on)
150void SplitButtonTest::HandleMenu(
Int_t id)
158 std::cout <<
"Button 1 was activated" << std::endl;
161 std::cout <<
"Button 2 was activated" << std::endl;
164 std::cout <<
"Button 3 was activated" << std::endl;
167 std::cout <<
"Button with a really really long name was activated"
175void splitbuttonTest()
177 new SplitButtonTest(
gClient->GetRoot(),100,100);
#define ClassDef(name, id)
R__EXTERN TApplication * gApplication
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=0)
Add frame to the composite frame using the specified layout hints.
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.