00001
00002
00003
00004
00005
00006
00007
00008 #include "TApplication.h"
00009 #include "TCanvas.h"
00010 #include "TLine.h"
00011 #include "TPaveLabel.h"
00012
00013 int main(int argc, char **argv)
00014 {
00015 TApplication theApp("App", &argc, argv);
00016
00017 TCanvas *c = new TCanvas("c", "The Hello Canvas", 400, 400);
00018
00019 TPaveLabel *hello = new TPaveLabel(0.2,0.4,0.8,0.6,"Hello World");
00020 hello->Draw();
00021 TPaveLabel *quit = new TPaveLabel(0.2,0.2,0.8,0.3,"Close via menu File/Quit");
00022 quit->Draw();
00023 c->Update();
00024
00025
00026
00027
00028 theApp.Run(kTRUE);
00029
00030 TLine *l = new TLine(0.1,0.2,0.5,0.9);
00031 l->Draw();
00032 quit->SetLabel("Select File/Quit again to exit app");
00033 c->Update();
00034
00035
00036 theApp.Run();
00037
00038 return 0;
00039 }