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()) ;
120 SplitButtonTest::~SplitButtonTest()
126 void SplitButtonTest::DoExit()
137 void SplitButtonTest::DoSplit(
Bool_t split)
139 fMButton->SetSplit(split);
142 void SplitButtonTest::DoEnable(
Bool_t on)
150 void 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" 175 void splitbuttonTest()
177 new SplitButtonTest(
gClient->GetRoot(),100,100);
virtual void Terminate(Int_t status=0)
Terminate the application by call TSystem::Exit() unless application has been told to return from Run...
R__EXTERN TApplication * gApplication
#define ClassDef(name, id)
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...
virtual void AddFrame(TGFrame *f, TGLayoutHints *l=0)
Add frame to the composite frame using the specified layout hints.