117 "ROOT macros",
"*.C",
144 :
TGWindow(p, 0, 0, w, h, 0, 0, 0, 0, 0, options)
225 gVirtualX->GetWindowAttributes(
id, attributes);
446 switch (event->
fType) {
456 if ((event->
fWidth < 32768) && (
event->fHeight < 32768)){
485 fgDbx =
event->fXRoot;
486 fgDby =
event->fYRoot;
487 fgDbw =
event->fWindow;
509 fgDbx =
event->fXRoot;
510 fgDby =
event->fYRoot;
511 fgDbw =
event->fWindow;
577 if (x !=
fX || y !=
fY) {
636 event.fWindow = w->
GetId();
637 event.fUser[0] = msg;
638 event.fUser[1] = parm1;
639 event.fUser[2] = parm2;
784 std::cout <<
" x=" <<
fX <<
" y=" <<
fY;
785 std::cout <<
" w=" <<
fWidth <<
" h=" <<
fHeight << std::endl;
988 Error(
"SetLayoutManager",
"no layout manager specified");
1010 if (
set == kEditDisable) {
1078 if (!
fList)
return 0;
1294 if (!
fList)
return this;
1317 if (child ==
this) {
1331 if (el->
fFrame == child) {
1528 }
else if (fname.
EndsWith(
".png")) {
1530 }
else if (fname.
EndsWith(
".jpg")) {
1532 }
else if (fname.
EndsWith(
".tiff")) {
1534 }
else if (fname.
EndsWith(
".xpm")) {
1553 repeat_save = (retval ==
kMBRetry);
1556 }
while (repeat_save);
1572 while ((m = (
TGMapKey *) next())) {
1583 gVirtualX->LookupString(event, str,
sizeof(str), keysym);
1585 if ((keysym & ~0x20) ==
kKey_S) {
1623 while ((m = (
TGMapKey *) next())) {
1691 Emit(
"CloseWindow()");
1710 event.fWindow =
GetId();
1804 Warning(
"SetIconPixmap",
"Failed to set window icon from xpm array.");
1818 gVirtualX->SetClassHints(
fId, (
char *)className, (
char *)resourceName);
1874 gVirtualX->SetWMSizeHints(
fId, wmin, hmin, wmax, hmax, winc, hinc);
1963 x,
y, ax, ay, wdummy);
1966 else if (ax +
fWidth + 10 > dw)
1971 else if (ay +
fHeight + 50 > dh)
2043 int max_ascent, max_descent;
2062 int max_ascent, max_descent;
2182 Int_t x,
y,
l, t,
r,
b, gl,
gr,
sep, max_ascent, max_descent;
2188 t = (max_ascent + max_descent + 2) >> 1;
2201 UInt_t rr = 5 + (sep << 1) + tw;
2214 gr = gl + tw + (sep << 1);
2265 Warning(
"SetTitle",
"title cannot be 0, try \"\"");
2281 Error(
"SetTitle",
"title cannot be 0, try \"\"");
2346 if ( event->
fY > 0 &&
2347 event->
fY <= (
Int_t) this->GetHeight() ) {
2378 if ( event->
fY > 0 &&
2379 event->
fY <= (
Int_t) this->GetHeight() ) {
2405 if ( event->
fY > 0 &&
2406 event->
fY <= (
Int_t) this->GetHeight() ) {
2442 out <<
" ULong_t ucolor; // will reflect user color changes" << std::endl;
2445 if (option && !strcmp(option,
"slider"))
2451 out <<
" gClient->GetColorByName(" << quote << ucolorname << quote
2452 <<
",ucolor);" << std::endl;
2465 options =
"kChildFrame";
2468 if (options.
Length() == 0) options =
"kMainFrame";
2469 else options +=
" | kMainFrame";
2472 if (options.
Length() == 0) options =
"kVerticalFrame";
2473 else options +=
" | kVerticalFrame";
2476 if (options.
Length() == 0) options =
"kHorizontalFrame";
2477 else options +=
" | kHorizontalFrame";
2480 if (options.
Length() == 0) options =
"kSunkenFrame";
2481 else options +=
" | kSunkenFrame";
2484 if (options.
Length() == 0) options =
"kRaisedFrame";
2485 else options +=
" | kRaisedFrame";
2488 if (options.
Length() == 0) options =
"kDoubleBorder";
2489 else options +=
" | kDoubleBorder";
2492 if (options.
Length() == 0) options =
"kFitWidth";
2493 else options +=
" | kFitWidth";
2496 if (options.
Length() == 0) options =
"kFixedWidth";
2497 else options +=
" | kFixedWidth";
2500 if (options.
Length() == 0) options =
"kFitHeight";
2501 else options +=
" | kFitHeight";
2504 if (options.
Length() == 0) options =
"kFixedHeight";
2505 else options +=
" | kFixedHeight";
2508 if (options.
Length() == 0) options =
"kOwnBackground";
2509 else options +=
" | kOwnBackground";
2512 if (options.
Length() == 0) options =
"kTransientFrame";
2513 else options +=
" | kTransientFrame";
2516 if (options.
Length() == 0) options =
"kTempFrame";
2517 else options +=
" | kTempFrame";
2532 if (hints.
Length() == 0) hints =
"kMWMDecorAll";
2533 else hints +=
" | kMWMDecorAll";
2536 if (hints.
Length() == 0) hints =
"kMWMDecorBorder";
2537 else hints +=
" | kMWMDecorBorder";
2540 if (hints.
Length() == 0) hints =
"kMWMDecorResizeH";
2541 else hints +=
" | kMWMDecorResizeH";
2544 if (hints.
Length() == 0) hints =
"kMWMDecorTitle";
2545 else hints +=
" | kMWMDecorTitle";
2548 if (hints.
Length() == 0) hints =
"kMWMDecorMenu";
2549 else hints +=
" | kMWMDecorMenu";
2552 if (hints.
Length() == 0) hints =
"kMWMDecorMinimize";
2553 else hints +=
" | kMWMDecorMinimize";
2556 if (hints.
Length() == 0) hints =
"kMWMDecorMaximize";
2557 else hints +=
" | kMWMDecorMaximize";
2573 if (hints.
Length() == 0) hints =
"kMWMFuncAll";
2574 else hints +=
" | kMWMFuncAll";
2577 if (hints.
Length() == 0) hints =
"kMWMFuncResize";
2578 else hints +=
" | kMWMFuncResize";
2581 if (hints.
Length() == 0) hints =
"kMWMFuncMove";
2582 else hints +=
" | kMWMFuncMove";
2585 if (hints.
Length() == 0) hints =
"kMWMFuncMinimize";
2586 else hints +=
" | kMWMFuncMinimize";
2589 if (hints.
Length() == 0) hints =
"kMWMFuncMaximize";
2590 else hints +=
" | kMWMFuncMaximize";
2593 if (hints.
Length() == 0) hints =
"kMWMFuncClose";
2594 else hints +=
" | kMWMFuncClose";
2607 if (fMWMInput == 0) hints =
"kMWMInputModeless";
2609 if (fMWMInput == 1) hints =
"kMWMInputPrimaryApplicationModal";
2611 if (fMWMInput == 2) hints =
"kMWMInputSystemModal";
2613 if (fMWMInput == 3) hints =
"kMWMInputFullApplicationModal";
2624 out <<
" " <<
GetName() <<
"->SetLayoutBroken(kTRUE);" << std::endl;
2636 TString signal_name, slot_name;
2663 out <<
");"<< std::endl;
2668 out <<
");" << std::endl;
2677 if (vsplit->
GetLeft()) out <<
",kTRUE);" << std::endl;
2678 else out <<
",kFALSE);"<< std::endl;
2683 if (hsplit->
GetAbove()) out <<
",kTRUE);" << std::endl;
2684 else out <<
",kFALSE);"<< std::endl;
2694 if (!signalslist)
continue;
2699 signal_name = connlist->
GetName();
2704 slot_name.
Remove(eq, rb-eq);
2705 out <<
" " << el->
fFrame->
GetName() <<
"->Connect(" << quote << signal_name
2706 << quote <<
", 0, 0, " << quote << slot_name << quote <<
");" << std::endl;
2708 TList *lsl = (
TList *)
gROOT->GetListOfSpecials()->FindObject(
"ListOfSlots");
2732 out << std::endl <<
" // composite frame" << std::endl;
2733 out <<
" TGCompositeFrame *";
2739 out <<
");" << std::endl;
2746 if (option && strstr(option,
"keep_names"))
2747 out <<
" " <<
GetName() <<
"->SetName(\"" <<
GetName() <<
"\");" << std::endl;
2760 out <<
" " <<
GetName() <<
"->SetLayoutManager(";
2762 out <<
");"<< std::endl;
2781 while((c1 = (
TClass *)nextc1())) {
2787 while ((c2 = (
TClass *)nextc2())) {
2788 if (c1==c2)
continue;
2801 ilist->
SetName(
"ListOfIncludes");
2802 gROOT->GetListOfSpecials()->Add(ilist);
2807 while ((c2 = (
TClass *)nextdo())) {
2814 if (iname[0] && strstr(iname,
".h")) {
2815 const char *lastsl = strrchr(iname,
'/');
2816 if (lastsl) iname = lastsl + 1;
2817 char *tname =
new char[strlen(iname)+1];
2819 while (*iname !=
'.') {
2831 if (strstr(tname,
"TRootCanvas")) {
2847 TString ff = filename && strlen(filename) ? filename :
"Rootappl.C";
2851 Int_t lenfname = strlen(fname);
2852 char *sname =
new char[lenfname+1];
2855 while ((*fname !=
'.') && (i < lenfname)) {
2863 out.open(ff.
Data(), std::ios::out);
2865 Error(
"SaveSource",
"cannot open file: %s", ff.
Data());
2872 ilist = (
TList *)
gROOT->GetListOfSpecials()->FindObject(
"ListOfIncludes");
2881 out <<
"// Mainframe macro generated from application: "<<
gApplication->
Argv(0) << std::endl;
2882 out <<
"// By ROOT version "<<
gROOT->GetVersion() <<
" on "<<t.
AsSQLString()<< std::endl;
2887 out <<
"#ifndef ROOT_" << inc->
GetString() << std::endl;
2888 out <<
"#include " << quote << inc->
GetString() <<
".h" << quote << std::endl;
2889 out <<
"#endif" << std::endl;
2890 if (strstr(inc->
GetString(),
"TRootEmbeddedCanvas")) {
2891 out <<
"#ifndef ROOT_TCanvas" << std::endl;
2892 out <<
"#include " << quote <<
"TCanvas.h" << quote << std::endl;
2893 out <<
"#endif" << std::endl;
2896 out << std::endl <<
"#include " << quote <<
"Riostream.h" << quote << std::endl;
2898 gROOT->GetListOfSpecials()->Remove(ilist);
2905 out <<
"void " << sname <<
"()" << std::endl;
2906 out <<
"{"<< std::endl;
2909 gListOfHiddenFrames->
Clear();
2913 lSlots->
SetName(
"ListOfSlots");
2914 gROOT->GetListOfSpecials()->Add(lSlots);
2918 if (strlen(fClassName) || strlen(fResourceName)) {
2919 out <<
" " <<
GetName() <<
"->SetClassHints(" << quote << fClassName
2920 << quote <<
"," << quote << fResourceName << quote <<
");" << std::endl;
2923 GetMWMHints(fMWMValue, fMWMFuncs, fMWMInput);
2924 if (fMWMValue || fMWMFuncs || fMWMInput) {
2925 out <<
" " <<
GetName() <<
"->SetMWMHints(";
2926 out << GetMWMvalueString() <<
"," << std::endl;
2928 out << GetMWMfuncString() <<
"," << std::endl;
2930 out << GetMWMinpString() <<
");"<< std::endl;
2938 GetWMSize(fWMWidth, fWMHeight);
2939 if (fWMWidth !=
UInt_t(-1) || fWMHeight !=
UInt_t(-1)) {
2940 out <<
" "<<
GetName()<<
"->SetWMSize("<<fWMWidth<<
","<<fWMHeight<<
");"<<std::endl;
2943 GetWMSizeHints(fWMMinWidth, fWMMinHeight, fWMMaxWidth, fWMMaxHeight, fWMWidthInc, fWMHeightInc);
2944 if (fWMMinWidth !=
UInt_t(-1) || fWMMinHeight !=
UInt_t(-1) ||
2945 fWMMaxWidth !=
UInt_t(-1) || fWMMaxHeight !=
UInt_t(-1) ||
2946 fWMWidthInc !=
UInt_t(-1) || fWMHeightInc !=
UInt_t(-1)) {
2947 out <<
" "<<
GetName()<<
"->SetWMSizeHints("<<fWMMinWidth<<
","<<fWMMinHeight
2948 <<
","<<fWMMaxWidth<<
","<<fWMMaxHeight
2949 <<
","<<fWMWidthInc<<
","<<fWMHeightInc <<
");"<<std::endl;
2952 out <<
" " <<
GetName()<<
"->MapSubwindows();" << std::endl;
2954 TIter nexth(gListOfHiddenFrames);
2956 while ((fhidden = (
TGFrame*)nexth())) {
2957 out <<
" " <<fhidden->
GetName()<<
"->UnmapWindow();" << std::endl;
2961 gListOfHiddenFrames->
Clear();
2971 out <<
" " <<
GetName()<<
"->Resize("<<
GetName()<<
"->GetDefaultSize());" << std::endl;
2975 out <<
" " <<
GetName()<<
"->MapWindow();" <<std::endl;
2977 GetWMPosition(fWMX, fWMY);
2978 if ((fWMX != -1) || (fWMY != -1)) {
2979 out <<
" "<<
GetName()<<
"->Move("<<fWMX<<
","<<fWMY<<
");"<<std::endl;
2985 out <<
"} " << std::endl;
2988 TList *sl = (
TList *)
gROOT->GetListOfSpecials()->FindObject(
"ListOfSlots");
3003 if (rb - lb > 1 && eq == -1) {
3007 out <<
"void " << s << std::endl;
3008 out <<
"{" << std::endl;
3011 out <<
" std::cout << " << quote <<
"Slot " << s << quote
3012 <<
" <<" << p <<
" << " << quote <<
")" << quote
3013 <<
" << std::endl; " << std::endl;
3017 out <<
"void " << s << std::endl;
3018 out <<
"{" << std::endl;
3019 out <<
" std::cout << " << quote <<
"Slot " << s
3020 << quote <<
" << std::endl; " << std::endl;
3022 out <<
"void " << slobj->
GetString() << std::endl;
3023 out <<
"{" << std::endl;
3024 out <<
" std::cout << " << quote <<
"Slot " << slobj->
GetString()
3025 << quote <<
" << std::endl; " << std::endl;
3028 out <<
"}" << std::endl;
3030 gROOT->GetListOfSpecials()->Remove(sl);
3041 while((c1=(
TClass*)nextc1())) {
3060 out << std::endl <<
" // main frame" << std::endl;
3061 out <<
" TGMainFrame *";
3062 out <<
GetName() <<
" = new TGMainFrame(gClient->GetRoot(),10,10," 3064 if (option && strstr(option,
"keep_names"))
3065 out <<
" " <<
GetName() <<
"->SetName(\"" <<
GetName() <<
"\");" << std::endl;
3078 out <<
" " <<
GetName() <<
"->SetLayoutManager(";
3080 out <<
");"<< std::endl;
3085 if (strlen(fWindowName)) {
3086 out <<
" " <<
GetName() <<
"->SetWindowName(" << quote << GetWindowName()
3087 << quote <<
");" << std::endl;
3089 if (strlen(fIconName)) {
3090 out <<
" "<<
GetName()<<
"->SetIconName("<<quote<<
GetIconName()<<quote<<
");"<<std::endl;
3092 if (strlen(fIconPixmap)) {
3093 out <<
" " <<
GetName() <<
"->SetIconPixmap(" << quote << GetIconPixmap()
3094 << quote <<
");" << std::endl;
3105 out << std::endl <<
" // horizontal frame" << std::endl;
3106 out <<
" TGHorizontalFrame *";
3112 out <<
");" << std::endl;
3119 if (option && strstr(option,
"keep_names"))
3120 out <<
" " <<
GetName() <<
"->SetName(\"" <<
GetName() <<
"\");" << std::endl;
3133 out <<
" " <<
GetName() <<
"->SetLayoutManager(";
3135 out <<
");"<< std::endl;
3148 out << std::endl <<
" // vertical frame" << std::endl;
3149 out <<
" TGVerticalFrame *";
3155 out <<
");" << std::endl;
3162 if (option && strstr(option,
"keep_names"))
3163 out <<
" " <<
GetName() <<
"->SetName(\"" <<
GetName() <<
"\");" << std::endl;
3176 out <<
" " <<
GetName() <<
"->SetLayoutManager(";
3178 out <<
");"<< std::endl;
3191 out <<
" TGFrame *";
3197 out <<
");" << std::endl;
3204 if (option && strstr(option,
"keep_names"))
3205 out <<
" " <<
GetName() <<
"->SetName(\"" <<
GetName() <<
"\");" << std::endl;
3220 parFont.
Form(
"%s::GetDefaultFontStruct()",IsA()->
GetName());
3223 parGC.
Form(
"%s::GetDefaultGC()()",IsA()->
GetName());
3225 if ((GetDefaultFontStruct() != fFontStruct) || (GetDefaultGC()() != fNormGC)) {
3226 TGFont *ufont =
gClient->GetResourcePool()->GetFontPool()->FindFont(fFontStruct);
3229 parFont.
Form(
"ufont->GetFontStruct()");
3232 TGGC *userGC =
gClient->GetResourcePool()->GetGCPool()->FindGC(fNormGC);
3235 parGC.
Form(
"uGC->GetGC()");
3241 out << std::endl <<
" // " << quote <<
GetTitle() << quote <<
" group frame" << std::endl;
3242 out <<
" TGGroupFrame *";
3244 <<
"," << quote <<
GetTitle() << quote;
3247 if (fFontStruct == GetDefaultFontStruct()) {
3248 if (fNormGC == GetDefaultGC()()) {
3250 out <<
");" << std::endl;
3263 if (option && strstr(option,
"keep_names"))
3264 out <<
" " <<
GetName() <<
"->SetName(\"" <<
GetName() <<
"\");" << std::endl;
3266 if (GetTitlePos() != -1)
3267 out <<
" " <<
GetName() <<
"->SetTitlePos(";
3268 if (GetTitlePos() == 0)
3269 out <<
"TGGroupFrame::kCenter);" << std::endl;
3270 if (GetTitlePos() == 1)
3271 out <<
"TGGroupFrame::kRight);" << std::endl;
3276 out <<
" " <<
GetName() <<
"->SetLayoutManager(";
3280 out <<
");"<< std::endl;
3300 while((c1 = (
TClass *)nextc1())) {
3306 while ((c2 = (
TClass *)nextc2())) {
3307 if (c1==c2)
continue;
3320 ilist->
SetName(
"ListOfIncludes");
3321 gROOT->GetListOfSpecials()->Add(ilist);
3326 while ((c2 = (
TClass *)nextdo())) {
3333 if (iname[0] && strstr(iname,
".h")) {
3334 const char *lastsl = strrchr(iname,
'/');
3335 if (lastsl) iname = lastsl + 1;
3336 char *tname =
new char[strlen(iname)+1];
3338 while (*iname !=
'.') {
3358 TString ff = filename && strlen(filename) ? filename :
"Rootdlog.C";
3362 Int_t lenfname = strlen(fname);
3363 char *sname =
new char[lenfname+1];
3366 while ((*fname !=
'.') && (i < lenfname)) {
3374 out.open(ff.
Data(), std::ios::out);
3376 Error(
"SaveSource",
"cannot open file: %s", ff.
Data());
3383 ilist = (
TList *)
gROOT->GetListOfSpecials()->FindObject(
"ListOfIncludes");
3392 out <<
"// Dialog macro generated from application: "<<
gApplication->
Argv(0) << std::endl;
3393 out <<
"// By ROOT version "<<
gROOT->GetVersion() <<
" on "<<t.
AsSQLString()<< std::endl;
3396 out <<
"#if !defined( __CINT__) || defined (__MAKECINT__)" << std::endl << std::endl;
3400 out <<
"#ifndef ROOT_"<< inc->
GetString() << std::endl;
3401 out <<
"#include "<< quote << inc->
GetString() <<
".h"<< quote << std::endl;
3402 out <<
"#endif" << std::endl;
3403 if (strstr(inc->
GetString(),
"TRootEmbeddedCanvas")) {
3404 out <<
"#ifndef ROOT_TCanvas"<< std::endl;
3405 out <<
"#include "<< quote <<
"TCanvas.h"<< quote << std::endl;
3406 out <<
"#endif" << std::endl;
3409 out << std::endl <<
"#include " << quote <<
"Riostream.h" << quote << std::endl;
3410 out << std::endl <<
"#endif" << std::endl;
3412 gROOT->GetListOfSpecials()->Remove(ilist);
3419 out <<
"void " << sname <<
"()" << std::endl;
3423 out <<
"{"<< std::endl;
3425 gListOfHiddenFrames->
Clear();
3429 lSlots->
SetName(
"ListOfSlots");
3430 gROOT->GetListOfSpecials()->Add(lSlots);
3434 if (strlen(fClassName) || strlen(fResourceName)) {
3435 out<<
" "<<
GetName()<<
"->SetClassHints("<<quote<<fClassName<<quote
3436 <<
"," <<quote<<fResourceName<<quote
3440 GetMWMHints(fMWMValue, fMWMFuncs, fMWMInput);
3441 if (fMWMValue || fMWMFuncs || fMWMInput) {
3442 out <<
" " <<
GetName() <<
"->SetMWMHints(";
3443 out << GetMWMvalueString() <<
"," << std::endl;
3445 out << GetMWMfuncString() <<
"," << std::endl;
3447 out << GetMWMinpString() <<
");"<< std::endl;
3450 GetWMPosition(fWMX, fWMY);
3451 if ((fWMX != -1) || (fWMY != -1)) {
3452 out <<
" "<<
GetName()<<
"->SetWMPosition("<<fWMX<<
","<<fWMY<<
");"<<std::endl;
3455 GetWMSize(fWMWidth, fWMHeight);
3456 if (fWMWidth !=
UInt_t(-1) || fWMHeight !=
UInt_t(-1)) {
3457 out <<
" "<<
GetName()<<
"->SetWMSize("<<fWMWidth<<
","<<fWMHeight<<
");"<<std::endl;
3460 GetWMSizeHints(fWMMinWidth,fWMMinHeight,fWMMaxWidth,fWMMaxHeight,fWMWidthInc,fWMHeightInc);
3461 if (fWMMinWidth !=
UInt_t(-1) || fWMMinHeight !=
UInt_t(-1) ||
3462 fWMMaxWidth !=
UInt_t(-1) || fWMMaxHeight !=
UInt_t(-1) ||
3463 fWMWidthInc !=
UInt_t(-1) || fWMHeightInc !=
UInt_t(-1)) {
3465 out <<
" "<<
GetName()<<
"->SetWMSizeHints("<<fWMMinWidth<<
","<<fWMMinHeight
3466 <<
","<<fWMMaxWidth<<
","<<fWMMaxHeight <<
","<<fWMWidthInc<<
","<<fWMHeightInc
3470 GetWMPosition(fWMX, fWMY);
3471 if ((fWMX != -1) || (fWMY != -1)) {
3472 out <<
" "<<
GetName()<<
"->Move("<<fWMX<<
","<<fWMY<<
");"<<std::endl;
3475 out <<
" " <<
GetName()<<
"->MapSubwindows();" << std::endl;
3477 TIter nexth(gListOfHiddenFrames);
3479 while ((fhidden = (
TGFrame*)nexth())) {
3480 out <<
" " <<fhidden->
GetName()<<
"->UnmapWindow();" << std::endl;
3483 gListOfHiddenFrames->
Clear();
3493 out <<
" " <<
GetName()<<
"->Resize("<<
GetName()<<
"->GetDefaultSize());" << std::endl;
3497 out <<
" " <<
GetName()<<
"->MapWindow();" <<std::endl;
3498 if (!usexy) out <<
" " <<
GetName()<<
"->Resize();" << std::endl;
3499 out <<
"} " << std::endl;
3502 TList *sl = (
TList *)
gROOT->GetListOfSpecials()->FindObject(
"ListOfSlots");
3517 if (rb - lb > 1 && eq == -1) {
3521 out <<
"void " << s << std::endl;
3522 out <<
"{" << std::endl;
3525 out <<
" std::cout << " << quote <<
"Slot " << s << quote
3526 <<
" <<" << p <<
" << " << quote <<
")" << quote
3527 <<
" << std::endl; " << std::endl;
3531 out <<
"void " << s << std::endl;
3532 out <<
"{" << std::endl;
3533 out <<
" std::cout << " << quote <<
"Slot " << s
3534 << quote <<
" << std::endl; " << std::endl;
3536 out <<
"void " << slobj->
GetString() << std::endl;
3537 out <<
"{" << std::endl;
3538 out <<
" std::cout << " << quote <<
"Slot " << slobj->
GetString()
3539 << quote <<
" << std::endl; " << std::endl;
3542 out <<
"}" << std::endl;
3544 gROOT->GetListOfSpecials()->Remove(sl);
3556 while((c1=(
TClass*)nextc1())) {
3568 out << std::endl <<
" // transient frame" << std::endl;
3569 out <<
" TGTransientFrame *";
3570 out <<
GetName()<<
" = new TGTransientFrame(gClient->GetRoot(),0" 3573 if (option && strstr(option,
"keep_names"))
3574 out <<
" " <<
GetName() <<
"->SetName(\"" <<
GetName() <<
"\");" << std::endl;
3587 out <<
" " <<
GetName() <<
"->SetLayoutManager(";
3589 out <<
");"<< std::endl;
3594 if (strlen(fWindowName)) {
3595 out <<
" " <<
GetName() <<
"->SetWindowName(" << quote << GetWindowName()
3596 << quote <<
");" << std::endl;
3598 if (strlen(fIconName)) {
3599 out <<
" "<<
GetName()<<
"->SetIconName("<<quote<<
GetIconName()<<quote<<
");"<<std::endl;
3601 if (strlen(fIconPixmap)) {
3602 out <<
" " <<
GetName() <<
"->SetIconPixmap(" << quote << GetIconPixmap()
3603 << quote <<
");" << std::endl;
virtual void HideFrame(TGFrame *f)
Hide sub frame.
virtual TGDimension GetDefaultSize() const
std::cout << fWidth << "x" << fHeight << std::endl;
virtual const char * BaseName(const char *pathname)
Base name of a file name. Base name of /user/root is root.
virtual Bool_t HandleDragMotion(TGFrame *)
Handle drag motion event.
Bool_t IsEditDisabled() const
Returns kTRUE if edit/guibuilding is forbidden.
virtual void Resize(UInt_t w=0, UInt_t h=0)
Resize the frame.
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save a group frame widget as a C++ statement(s) on output stream out.
virtual void MapSubwindows()
TGLayoutManager * fLayoutManager
Int_t GetState(TGFrame *f) const
Get state of sub frame.
virtual UInt_t GetEditDisabled() const
virtual void Delete(Option_t *option="")
Remove all objects from the list AND delete all heap based objects.
virtual Bool_t ProcessMessage(Long_t, Long_t, Long_t)
virtual UInt_t GetOptions() const
void SetRoot(TGWindow *root=0)
Sets the current root (i.e.
const char * GetDeclFileName() const
virtual void MoveResize(Int_t x, Int_t y, UInt_t w=0, UInt_t h=0)
Move and/or resize the frame.
Bool_t HandleSelection(Event_t *event)
Handle selection event.
R__EXTERN Int_t gErrorIgnoreLevel
static const TGGC & GetDefaultGC()
Return default graphics context in use.
virtual Bool_t HandleButton(Event_t *)
static const TGGC * fgBlackGC
EInitialState fWMInitState
virtual void Print(Option_t *option="") const
Print all frames in this composite frame.
Collectable string class.
virtual void StartGuiBuilding(Bool_t on=kTRUE)
Go into GUI building mode.
void AddInput(UInt_t emask)
Add events specified in the emask to the events the frame should handle.
virtual Bool_t HandleKey(Event_t *)
virtual Bool_t HandleDoubleClick(Event_t *)
Handle double click mouse event in splitter.
virtual void CenterOnParent(Bool_t croot=kTRUE, EPlacement pos=kCenter)
Position transient frame centered relative to the parent frame.
virtual Bool_t HandleKey(Event_t *event)
Handle keyboard events.
void SetWindowName(const char *name=0)
Set window name. This is typically done via the window manager.
virtual const char * GetIconName() const
Returns mime type name of object.
TString GetMWMfuncString() const
Returns MWM function hints as a string - used in SavePrimitive().
const TGWindow * GetRoot() const
Returns current root (i.e.
static UInt_t fgUserColor
virtual Bool_t HandleClientMessage(Event_t *event)
Handle client messages sent to this frame.
void SetForeground(Pixel_t v)
Set foreground color.
virtual void Print(Option_t *option="") const
Print window id.
static const TGGC & GetHilightGC()
Get highlight color graphics context.
virtual void WriteImage(const char *, EImageFileTypes=TImage::kUnknown)
static Pixel_t GetWhitePixel()
Get white pixel value.
virtual void SetDropType(Int_t type)
SetDropType.
virtual TGDimension GetDefaultSize() const
Returns default size.
virtual TObject * Last() const
Return the last object in the list. Returns 0 when list is empty.
virtual Bool_t HandleDragEnter(TGFrame *)
Handle drag enter event.
const TGResourcePool * GetResourcePool() const
virtual void MapSubwindows()
const TGPicture * SetIconPixmap(const char *iconName)
Set window icon pixmap by name.
virtual Bool_t TranslateCoordinates(TGFrame *child, Int_t x, Int_t y, Int_t &fx, Int_t &fy)
Translate coordinates to child frame.
R__ALWAYS_INLINE Bool_t TestBit(UInt_t f) const
virtual void DrawBorder()
Draw frame border.
TGMainFrame(const TGMainFrame &)
R__EXTERN Atom_t gWM_DELETE_WINDOW
static Atom_t GetDNDSelection()
virtual Bool_t HandleSelection(Event_t *event)
Handle primary selection event.
virtual void SetLayoutManager(TGLayoutManager *l)
Set the layout manager for the composite frame.
static Pixel_t fgWhitePixel
static void SingleShot(Int_t milliSec, const char *receiver_class, void *receiver, const char *method)
This static function calls a slot after a given time interval.
virtual void SetTextColor(Pixel_t color, Bool_t local=kTRUE)
Changes text color.
virtual void ShowFrame(TGFrame *f)
Show sub frame.
virtual void RemoveAll()
Remove all frames from composite frame.
static Pixel_t fgDefaultSelectedBackground
void SetMainFrame(TGFrame *main)
virtual Bool_t IsComposite() const
An abstract interface to image processing library.
R__EXTERN TApplication * gApplication
virtual Bool_t HandleColormapChange(Event_t *)
TGGC * FindGC(const TGGC *gc)
Find graphics context. Returns 0 in case gc is not found.
static const TGGC * fgShadowGC
virtual Bool_t IsMapSubwindows() const
void SetIconName(const char *name)
Set window icon name. This is typically done via the window manager.
TString & Insert(Ssiz_t pos, const char *s)
void DontCallClose()
Typically call this method in the slot connected to the CloseWindow() signal to prevent the calling o...
Bool_t IsDragging() const
virtual void SavePrimitive(std::ostream &out, Option_t *="")
Save the used font as a C++ statement(s) on output stream out.
virtual void Layout()
Layout the elements of the composite frame.
R__EXTERN TVirtualDragManager * gDragManager
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save a transient frame widget as a C++ statement(s) on output stream out.
virtual Bool_t HandleEvent(Event_t *event)
Handle all frame events.
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
virtual Pixmap_t GetPixmap()
static Atom_t GetDNDActionCopy()
virtual TObject * FindObject(const char *name) const
Delete a TObjLink object.
virtual void SetEditable(Bool_t)
virtual void RemoveFrame(TGFrame *f)
Remove frame from composite frame.
virtual const char * UnixPathName(const char *unixpathname)
Convert from a Unix pathname to a local pathname.
R__EXTERN TGDNDManager * gDNDManager
static const char * PixelAsHexString(ULong_t pixel)
Convert machine dependent pixel value (obtained via RGB2Pixel or via Number2Pixel() or via TColor::Ge...
const Mask_t kPointerMotionMask
virtual void DoRedraw()
Redraw the frame.
virtual void ChangeBackground(Pixel_t back)
Change frame background color.
virtual Bool_t HandleCrossing(Event_t *)
UInt_t GetDisplayWidth() const
Get display width.
virtual const char * ClassName() const
Returns name of class to which the object belongs.
virtual ~TGCompositeFrame()
Delete a composite frame.
Bool_t IsVisible(TGFrame *f) const
Get state of sub frame.
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString...
const TGFrame * GetFrame() const
static UInt_t fgLastButton
static const TGGC * fgBckgndGC
virtual Bool_t HandleDragLeave(TGFrame *)
Handle drag leave event.
static Pixel_t GetDefaultFrameBackground()
Get default frame background.
Bool_t Contains(Int_t x, Int_t y) const
Bool_t HasOwnFont() const
Returns kTRUE if text attributes are unique, returns kFALSE if text attributes are shared (global)...
TGTransientFrame(const TGTransientFrame &)
void SetWMSizeHints(UInt_t wmin, UInt_t hmin, UInt_t wmax, UInt_t hmax, UInt_t winc, UInt_t hinc)
Give the window manager minimum and maximum size hints.
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save a horizontal frame widget as a C++ statement(s) on output stream out.
virtual Bool_t IsLayoutBroken() const
virtual ~TGGroupFrame()
Delete a group frame.
virtual void FromWindow(Drawable_t, Int_t=0, Int_t=0, UInt_t=0, UInt_t=0)
virtual ~TGMainFrame()
TGMainFrame destructor.
virtual void ReparentWindow(const TGWindow *p, Int_t x=0, Int_t y=0)
Reparent window, make p the new parent and position the window at position (x,y) in new parent...
TGCompositeFrame(const TGCompositeFrame &)
virtual Pixel_t GetForeground() const
Return frame foreground color.
static Pixel_t fgBlackPixel
virtual void SetName(const char *name)
Bool_t HandleClientMessage(Event_t *event)
Handle DND related client messages.
Bool_t EndsWith(const char *pat, ECaseCompare cmp=kExact) const
Return true if string ends with the specified string.
virtual Bool_t HandleExpose(Event_t *event)
static Time_t fgLastClick
int main(int argc, char **argv)
virtual void SendMessage(const TGWindow *w, Long_t msg, Long_t parm1, Long_t parm2)
Send message (i.e.
virtual void SetDragType(Int_t type)
SetDragType.
virtual const TGWindow * GetMainFrame() const
Returns top level main frame.
virtual void SetBackgroundColor(Pixel_t back)
Set background color (override from TGWindow base class).
void SetClassHints(const char *className, const char *resourceName)
Set the windows class and resource name.
virtual Bool_t BindKey(const TGWindow *w, Int_t keycode, Int_t modifier) const
Bind key to a window.
Ssiz_t First(char c) const
Find first occurrence of a character c.
static const TGFont * fgDefaultFont
Bool_t TestBitNumber(UInt_t bitnumber) const
virtual Bool_t HandleSelectionRequest(Event_t *)
virtual void Print(Option_t *option="") const
Print window id.
static ULong_t RGB2Pixel(Int_t r, Int_t g, Int_t b)
Convert r,g,b to graphics system dependent pixel value.
const GCValues_t * GetAttributes() const
virtual Bool_t HandleMotion(Event_t *event)
Handle mouse motion events.
object has not been deleted
virtual TGFrame * GetFrameFromPoint(Int_t x, Int_t y)
TClass * GetBaseClass(const char *classname)
Return pointer to the base class "classname".
const Mask_t kButtonPressMask
Pixmap_t GetPicture() const
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save a main frame widget as a C++ statement(s) on output stream out.
void SetFont(FontH_t v)
Set font.
const TString & GetString() const
Bool_t IsArranged(TGFrame *f) const
Get state of sub frame.
virtual TGFrame * GetFrameFromPoint(Int_t x, Int_t y)
Get frame located at specified point.
virtual void Resize(UInt_t w, UInt_t h)
Resize the window.
virtual void SendCloseMessage()
Send close message to self.
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save a frame widget as a C++ statement(s) on output stream out.
virtual void SetLayoutBroken(Bool_t on=kTRUE)
Set broken layout. No Layout method is called.
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save a vertical frame widget as a C++ statement(s) on output stream out.
static const TGGC * fgHilightGC
virtual void ProcessedEvent(Event_t *event)
const Mask_t kWAEventMask
virtual void SavePrimitiveSubframes(std::ostream &out, Option_t *option="")
Auxilary protected method used to save subframes.
R__EXTERN TSystem * gSystem
Bool_t IsEditable() const
virtual Bool_t HandleMotion(Event_t *)
virtual TGDimension GetDefaultSize() const
std::cout << fWidth << "x" << fHeight << std::endl;
void RemoveInput(UInt_t emask)
Remove events specified in emask from the events the frame should handle.
TQConnection class is an internal class, used in the object communication mechanism.
static const TGGC & GetWhiteGC()
Get white graphics context.
virtual void SetTextFont(const char *fontName, Bool_t local=kTRUE)
Changes text font specified by name.
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save a primitive as a C++ statement(s) on output stream "out".
virtual TObject * Remove(TObject *obj)
Remove object from the list.
static TVirtualDragManager * Instance()
Load plugin and create drag manager object.
virtual Bool_t InheritsFrom(const char *classname) const
Returns kTRUE if object inherits from class "classname".
virtual Int_t GetDropType() const
Returns drop target type.
virtual const char * GetName() const
Return unique name, used in SavePrimitive methods.
const Mask_t kExposureMask
virtual Bool_t HandleFocusChange(Event_t *)
static TGLayoutHints * fgDefaultHints
virtual void CloseWindow()
Close and delete main frame.
const char * AsSQLString() const
Return the date & time in SQL compatible string format, like: 1997-01-15 20:16:28.
void Form(const char *fmt,...)
Formats a string using a printf style format descriptor.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
char * Form(const char *fmt,...)
virtual void ChangeOptions(UInt_t options)
Change composite frame options. Options is an OR of the EFrameTypes.
virtual void SaveSource(const char *filename="Rootdlog.C", Option_t *option="")
Save the GUI tranzient frame widget in a C++ macro file.
TString GetMWMvalueString() const
Returns MWM decoration hints as a string - used in SavePrimitive().
virtual Pixel_t GetBackground() const
The ROOT global object gROOT contains a list of all defined classes.
virtual void DrawBorder()
Draw border of around the group frame.
static Pixel_t fgDefaultFrameBackground
UInt_t References() const
Bool_t InheritsFrom(const char *cl) const
Return kTRUE if this class inherits from a class with name "classname".
static const TGGC * fgDefaultGC
void SetName(const char *name)
static const TGGC & GetBlackGC()
Get black graphics context.
virtual Bool_t HandleButton(Event_t *event)
Handle mouse button event in vertical splitter.
virtual Bool_t HandleDragDrop(TGFrame *frame, Int_t x, Int_t y, TGLayoutHints *lo)
Handle drop event.
virtual Bool_t IsEditable() const
virtual Bool_t HandleSelectionClear(Event_t *)
virtual void Move(Int_t x, Int_t y)
Move frame.
char * StrDup(const char *str)
Duplicate the string str.
const char * GetString() const
R__EXTERN TGuiBuilder * gGuiBuilder
virtual Bool_t HandleMotion(Event_t *)
virtual Bool_t HandleConfigureNotify(Event_t *event)
This event is generated when the frame is resized.
virtual void Move(Int_t x, Int_t y)
Move the window.
TString & Remove(Ssiz_t pos)
void SavePrimitive(std::ostream &out, Option_t *option="")
Save graphics context info as a C++ statement(s) on output stream out.
virtual void SetEditDisabled(UInt_t on=1)
Set edit disable flag for this frame and subframes.
const Mask_t kStructureNotifyMask
virtual Bool_t IsEditable() const
Return kTRUE if frame is being edited.
virtual void SetCleanup(Int_t mode=kLocalCleanup)
Turn on automatic cleanup of child frames in dtor.
virtual void ChangeSubframesBackground(Pixel_t back)
Change background color for this frame and all subframes.
const Mask_t kButtonReleaseMask
virtual Bool_t HandleSelection(Event_t *)
virtual void RaiseWindow()
const TGPicture * GetPicture(const char *name)
Get picture from the picture pool.
static const char * gSaveMacroTypes[]
static Time_t GetLastClick()
Get time of last mouse click.
FontStruct_t GetFontStruct() const
virtual Bool_t HandleClientMessage(Event_t *event)
Handle a client message.
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
virtual Bool_t HandleButton(Event_t *)
static constexpr double s
virtual void SetCleanup(Int_t=kLocalCleanup)
virtual void AddFrame(TGFrame *f, TGLayoutHints *l=0)
Add frame to the composite frame using the specified layout hints.
const char * GetName() const override
Returns name of connection (aka name of slot)
virtual void Clear(Option_t *option="")
Remove all objects from the list.
UInt_t GetDisplayHeight() const
Get display height.
const TGWindow * GetParent() const
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save a composite frame widget as a C++ statement(s) on output stream out.
virtual void MapSubwindows()
Map all sub windows that are part of the composite frame.
TList * GetListOfSignals() const
Bool_t Drag(Int_t x_root, Int_t y_root, Atom_t action, Time_t timestamp)
Process drag event.
virtual ~TGFrame()
Destructor.
TString GetMWMinpString() const
Returns MWM input mode hints as a string - used in SavePrimitive().
virtual void MoveResize(Int_t x, Int_t y, UInt_t w, UInt_t h)
Move and resize the window.
TGGCPool * GetGCPool() const
virtual Bool_t HandleDoubleClick(Event_t *)
virtual const char * GetTitle() const
Returns title of object.
virtual void RemoveBind(const TGWindow *w, Int_t keycode, Int_t modifier) const
Remove key binding.
virtual TGLayoutManager * GetLayoutManager() const
virtual void UnmapWindow()
virtual void SetBackgroundColor(Pixel_t color)
virtual void SetEditDisabled(UInt_t on=kEditDisable)
virtual TGFrameElement * FindFrameElement(TGFrame *f) const
Find frame-element holding frame f.
void SetWMPosition(Int_t x, Int_t y)
Give the window manager a window position hint.
static FontStruct_t GetDefaultFontStruct()
Return default font structure in use.
void SetFrameElement(TGFrameElement *fe)
const TGFrame * GetFrame() const
virtual Bool_t SaveFrameAsCodeOrImage()
Opens dialog window allowing user to save the frame contents as a ROOT macro or as an image...
virtual void ProcessedConfigure(Event_t *event)
virtual void Add(TObject *obj)
TGFrame * GetMainFrame() const
virtual void SetPasteFrame(TGFrame *f)
virtual Bool_t HandleButton(Event_t *event)
Handle mouse button events.
virtual void SetTitle(TGString *title)
Set or change title of the group frame.
virtual Bool_t HandleSelectionRequest(Event_t *event)
Handle selection request event.
const TGWindow * GetDefaultRoot() const
Returns the root (i.e.
you should not use this method at all Int_t Int_t Double_t Double_t Double_t Int_t Double_t Double_t Double_t Double_t b
void SetWMSize(UInt_t w, UInt_t h)
Give the window manager a window size hint.
TGFrameElement * GetFrameElement() const
TList * GetBindList() const
void NeedRedraw(TGWindow *w, Bool_t force=kFALSE)
Set redraw flags.
void SaveUserColor(std::ostream &out, Option_t *)
Save a user color in a C++ macro file - used in SavePrimitive().
TString GetOptionString() const
Returns a frame option string - used in SavePrimitive().
const Mask_t kWABackPixel
TGGroupFrame(const TGGroupFrame &)
Bool_t HandleSelectionRequest(Event_t *event)
Handle selection request event.
void Emit(const char *signal, const T &arg)
Activate signal with single parameter.
const Mask_t kKeyControlMask
static TImage * Create()
Create an image.
virtual void SetEditable(Bool_t on=kTRUE)
Switch ON/OFF edit mode.
virtual void Draw3dRectangle(UInt_t type, Int_t x, Int_t y, UInt_t w, UInt_t h)
Draw 3D rectangle on the frame border.
static const TGGC * fgWhiteGC
virtual void Cleanup()
Cleanup and delete all objects contained in this composite frame.
virtual void DeleteWindow()
Delete window.
Monitors objects for deletion and reflects the deletion by reverting the internal pointer to zero...
virtual Bool_t HandleEvent(Event_t *)
const Mask_t kAnyModifier
void SetMWMHints(UInt_t value, UInt_t funcs, UInt_t input)
Set decoration style for MWM-compatible wm (mwm, ncdwm, fvwm?).
TList * gListOfHiddenFrames
virtual void SaveSource(const char *filename="Rootappl.C", Option_t *option="")
Save the GUI main frame widget in a C++ macro file.
virtual void ChangeOptions(UInt_t options)
Change frame options. Options is an OR of the EFrameTypes.
virtual void DoRedraw()
Redraw the group frame.
void SetBitNumber(UInt_t bitnumber, Bool_t value=kTRUE)
static const TGGC & GetShadowGC()
Get shadow color graphics context.
static const TGGC & GetBckgndGC()
Get background color graphics context.
virtual Bool_t SetImageBuffer(char **, EImageFileTypes=TImage::kPng)
static Pixel_t GetBlackPixel()
Get black pixel value.
TObject * GetObject() const
static Pixel_t GetDefaultSelectedBackground()
Get default selected frame background.
virtual Int_t GetDragType() const
Returns drag source type.
virtual void DestroyWindow()
static void Pixel2RGB(ULong_t pixel, Int_t &r, Int_t &g, Int_t &b)
Convert machine dependent pixel value (obtained via RGB2Pixel or via Number2Pixel() or via TColor::Ge...
TGFont * GetFont(const char *font, Bool_t fixedDefault=kTRUE)
Get a font from the font pool.
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.
virtual Bool_t HandleSelection(Event_t *)
virtual const char * GetName() const
Return name of this collection.
R__EXTERN Atom_t gROOT_MESSAGE
void FreeGC(const TGGC *gc)
Delete graphics context if it is not used anymore.
virtual void Draw(Drawable_t id, GContext_t gc, Int_t x, Int_t y)
Draw string.
This class stores the date and time with a precision of one second in an unsigned 32 bit word (950130...
virtual void SetWindowName(const char *name=0)
Set window name.
TGGC * GetGC(GCValues_t *values, Bool_t rw=kFALSE)
Get the best matching graphics context depending on values.
TGGCPool * GetGCPool() const
void SetWMState(EInitialState state)
Set the initial state of the window. Either kNormalState or kIconicState.
const char * Data() const
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save a primitive as a C++ statement(s) on output stream "out".
static constexpr double g