135 "ROOT macros",
"*.C",
162 :
TGWindow(p, 0, 0, w,
h, 0, 0, 0, 0, 0, options)
243 gVirtualX->GetWindowAttributes(
id, attributes);
464 switch (
event->fType) {
474 if ((
event->fWidth < 32768) && (
event->fHeight < 32768)){
503 fgDbx =
event->fXRoot;
504 fgDby =
event->fYRoot;
505 fgDbw =
event->fWindow;
527 fgDbx =
event->fXRoot;
528 fgDby =
event->fYRoot;
529 fgDbw =
event->fWindow;
654 event.fWindow = w->
GetId();
655 event.fUser[0] = msg;
656 event.fUser[1] = parm1;
657 event.fUser[2] = parm2;
802 std::cout <<
" x=" <<
fX <<
" y=" <<
fY;
803 std::cout <<
" w=" <<
fWidth <<
" h=" <<
fHeight << std::endl;
1006 Error(
"SetLayoutManager",
"no layout manager specified");
1096 if (!
fList)
return 0;
1156 f->SetFrameElement(0);
1312 if (!
fList)
return this;
1335 if (child ==
this) {
1349 if (el->
fFrame == child) {
1551 repeat_save = (retval ==
kMBRetry);
1553 }
while (repeat_save);
1571 main->SaveSource(fname.
Data(),
"");
1576 }
else if (fname.
EndsWith(
".png")) {
1578 }
else if (fname.
EndsWith(
".jpg")) {
1580 }
else if (fname.
EndsWith(
".tiff")) {
1582 }
else if (fname.
EndsWith(
".xpm")) {
1595 Error(
"SaveFrameAsCodeOrImage",
"File cannot be saved with this extension");
1615 if (
m->fKeyCode ==
event->fCode) {
1627 if ((keysym & ~0x20) ==
kKey_S) {
1644 list =
main->GetBindList();
1666 if (
m->fKeyCode == (
UInt_t) keycode) {
1733 Emit(
"CloseWindow()");
1752 event.fWindow =
GetId();
1846 Warning(
"SetIconPixmap",
"Failed to set window icon from xpm array.");
1860 gVirtualX->SetClassHints(
fId, (
char *)className, (
char *)resourceName);
1916 gVirtualX->SetWMSizeHints(
fId, wmin, hmin, wmax, hmax, winc, hinc);
2005 x,
y, ax, ay, wdummy);
2006 if (!
gVirtualX->InheritsFrom(
"TGWin32")) {
2009 else if (ax +
fWidth + 10 > dw)
2014 else if (ay +
fHeight + 50 > dh)
2087 int max_ascent, max_descent;
2106 int max_ascent, max_descent;
2226 Int_t x,
y,
l, t,
r,
b, gl,
gr, sep, max_ascent, max_descent;
2232 t = (max_ascent + max_descent + 2) >> 1;
2245 UInt_t rr = 5 + (sep << 1) + tw;
2258 gr = gl + tw + (sep << 1);
2309 Warning(
"SetTitle",
"title cannot be 0, try \"\"");
2325 Error(
"SetTitle",
"title cannot be 0, try \"\"");
2390 if (
event->fY > 0 &&
2422 if (
event->fY > 0 &&
2449 if (
event->fY > 0 &&
2481 if (
gROOT->ClassSaved(TGFrame::Class())) {
2486 out <<
" ULong_t ucolor; // will reflect user color changes" << std::endl;
2489 if (option && !strcmp(option,
"slider"))
2495 out <<
" gClient->GetColorByName(" << quote << ucolorname << quote
2496 <<
",ucolor);" << std::endl;
2509 options =
"kChildFrame";
2512 if (options.
Length() == 0) options =
"kMainFrame";
2513 else options +=
" | kMainFrame";
2516 if (options.
Length() == 0) options =
"kVerticalFrame";
2517 else options +=
" | kVerticalFrame";
2520 if (options.
Length() == 0) options =
"kHorizontalFrame";
2521 else options +=
" | kHorizontalFrame";
2524 if (options.
Length() == 0) options =
"kSunkenFrame";
2525 else options +=
" | kSunkenFrame";
2528 if (options.
Length() == 0) options =
"kRaisedFrame";
2529 else options +=
" | kRaisedFrame";
2532 if (options.
Length() == 0) options =
"kDoubleBorder";
2533 else options +=
" | kDoubleBorder";
2536 if (options.
Length() == 0) options =
"kFitWidth";
2537 else options +=
" | kFitWidth";
2540 if (options.
Length() == 0) options =
"kFixedWidth";
2541 else options +=
" | kFixedWidth";
2544 if (options.
Length() == 0) options =
"kFitHeight";
2545 else options +=
" | kFitHeight";
2548 if (options.
Length() == 0) options =
"kFixedHeight";
2549 else options +=
" | kFixedHeight";
2552 if (options.
Length() == 0) options =
"kOwnBackground";
2553 else options +=
" | kOwnBackground";
2556 if (options.
Length() == 0) options =
"kTransientFrame";
2557 else options +=
" | kTransientFrame";
2560 if (options.
Length() == 0) options =
"kTempFrame";
2561 else options +=
" | kTempFrame";
2576 if (hints.
Length() == 0) hints =
"kMWMDecorAll";
2577 else hints +=
" | kMWMDecorAll";
2580 if (hints.
Length() == 0) hints =
"kMWMDecorBorder";
2581 else hints +=
" | kMWMDecorBorder";
2584 if (hints.
Length() == 0) hints =
"kMWMDecorResizeH";
2585 else hints +=
" | kMWMDecorResizeH";
2588 if (hints.
Length() == 0) hints =
"kMWMDecorTitle";
2589 else hints +=
" | kMWMDecorTitle";
2592 if (hints.
Length() == 0) hints =
"kMWMDecorMenu";
2593 else hints +=
" | kMWMDecorMenu";
2596 if (hints.
Length() == 0) hints =
"kMWMDecorMinimize";
2597 else hints +=
" | kMWMDecorMinimize";
2600 if (hints.
Length() == 0) hints =
"kMWMDecorMaximize";
2601 else hints +=
" | kMWMDecorMaximize";
2617 if (hints.
Length() == 0) hints =
"kMWMFuncAll";
2618 else hints +=
" | kMWMFuncAll";
2621 if (hints.
Length() == 0) hints =
"kMWMFuncResize";
2622 else hints +=
" | kMWMFuncResize";
2625 if (hints.
Length() == 0) hints =
"kMWMFuncMove";
2626 else hints +=
" | kMWMFuncMove";
2629 if (hints.
Length() == 0) hints =
"kMWMFuncMinimize";
2630 else hints +=
" | kMWMFuncMinimize";
2633 if (hints.
Length() == 0) hints =
"kMWMFuncMaximize";
2634 else hints +=
" | kMWMFuncMaximize";
2637 if (hints.
Length() == 0) hints =
"kMWMFuncClose";
2638 else hints +=
" | kMWMFuncClose";
2651 if (
fMWMInput == 0) hints =
"kMWMInputModeless";
2653 if (
fMWMInput == 1) hints =
"kMWMInputPrimaryApplicationModal";
2655 if (
fMWMInput == 2) hints =
"kMWMInputSystemModal";
2657 if (
fMWMInput == 3) hints =
"kMWMInputFullApplicationModal";
2668 out <<
" " <<
GetName() <<
"->SetLayoutBroken(kTRUE);" << std::endl;
2680 TString signal_name, slot_name;
2707 out <<
");"<< std::endl;
2712 out <<
");" << std::endl;
2721 if (vsplit->
GetLeft()) out <<
",kTRUE);" << std::endl;
2722 else out <<
",kFALSE);"<< std::endl;
2727 if (hsplit->
GetAbove()) out <<
",kTRUE);" << std::endl;
2728 else out <<
",kFALSE);"<< std::endl;
2738 if (!signalslist)
continue;
2743 signal_name = connlist->
GetName();
2748 slot_name.
Remove(eq, rb-eq);
2749 out <<
" " << el->
fFrame->
GetName() <<
"->Connect(" << quote << signal_name
2750 << quote <<
", 0, 0, " << quote << slot_name << quote <<
");" << std::endl;
2776 out << std::endl <<
" // composite frame" << std::endl;
2777 out <<
" TGCompositeFrame *";
2783 out <<
");" << std::endl;
2790 if (option && strstr(option,
"keep_names"))
2791 out <<
" " <<
GetName() <<
"->SetName(\"" <<
GetName() <<
"\");" << std::endl;
2804 out <<
" " <<
GetName() <<
"->SetLayoutManager(";
2806 out <<
");"<< std::endl;
2831 while ((
c2 = (
TClass *)nextc2())) {
2832 if (
c1==
c2)
continue;
2834 c3 =
c2->GetBaseClass(
c1);
2845 ilist->
SetName(
"ListOfIncludes");
2846 gROOT->GetListOfSpecials()->Add(ilist);
2851 while ((
c2 = (
TClass *)nextdo())) {
2853 if (bc->
TestBitNumber(k) == 0 &&
c2->InheritsFrom(TGObject::Class()) == 1) {
2857 iname =
c2->GetDeclFileName();
2858 if (iname[0] && strstr(iname,
".h")) {
2859 const char *lastsl = strrchr(iname,
'/');
2860 if (lastsl) iname = lastsl + 1;
2861 char *tname =
new char[strlen(iname)+1];
2863 while (*iname !=
'.') {
2875 if (strstr(tname,
"TRootCanvas")) {
2891 TString ff = filename && strlen(filename) ? filename :
"Rootappl.C";
2895 Int_t lenfname = strlen(fname);
2896 char *sname =
new char[lenfname+1];
2899 while ((*fname !=
'.') && (i < lenfname)) {
2907 out.open(ff.
Data(), std::ios::out);
2909 Error(
"SaveSource",
"cannot open file: %s", ff.
Data());
2925 out <<
"// Mainframe macro generated from application: "<<
gApplication->
Argv(0) << std::endl;
2926 out <<
"// By ROOT version "<<
gROOT->GetVersion() <<
" on "<<t.
AsSQLString()<< std::endl;
2931 out <<
"#ifndef ROOT_" << inc->
GetString() << std::endl;
2932 out <<
"#include " << quote << inc->
GetString() <<
".h" << quote << std::endl;
2933 out <<
"#endif" << std::endl;
2934 if (strstr(inc->
GetString(),
"TRootEmbeddedCanvas")) {
2935 out <<
"#ifndef ROOT_TCanvas" << std::endl;
2936 out <<
"#include " << quote <<
"TCanvas.h" << quote << std::endl;
2937 out <<
"#endif" << std::endl;
2940 out << std::endl <<
"#include " << quote <<
"Riostream.h" << quote << std::endl;
2949 out <<
"void " << sname <<
"()" << std::endl;
2950 out <<
"{"<< std::endl;
2957 lSlots->
SetName(
"ListOfSlots");
2958 gROOT->GetListOfSpecials()->Add(lSlots);
2964 << quote <<
"," << quote <<
fResourceName << quote <<
");" << std::endl;
2969 out <<
" " <<
GetName() <<
"->SetMWMHints(";
2996 out <<
" " <<
GetName()<<
"->MapSubwindows();" << std::endl;
3000 while ((fhidden = (
TGFrame*)nexth())) {
3001 out <<
" " <<fhidden->
GetName()<<
"->UnmapWindow();" << std::endl;
3015 out <<
" " <<
GetName()<<
"->Resize("<<
GetName()<<
"->GetDefaultSize());" << std::endl;
3019 out <<
" " <<
GetName()<<
"->MapWindow();" <<std::endl;
3022 if ((
fWMX != -1) || (
fWMY != -1)) {
3029 out <<
"} " << std::endl;
3047 if (rb - lb > 1 && eq == -1) {
3051 out <<
"void " << s << std::endl;
3052 out <<
"{" << std::endl;
3055 out <<
" std::cout << " << quote <<
"Slot " << s << quote
3056 <<
" <<" << p <<
" << " << quote <<
")" << quote
3057 <<
" << std::endl; " << std::endl;
3061 out <<
"void " << s << std::endl;
3062 out <<
"{" << std::endl;
3063 out <<
" std::cout << " << quote <<
"Slot " << s
3064 << quote <<
" << std::endl; " << std::endl;
3066 out <<
"void " << slobj->
GetString() << std::endl;
3067 out <<
"{" << std::endl;
3068 out <<
" std::cout << " << quote <<
"Slot " << slobj->
GetString()
3069 << quote <<
" << std::endl; " << std::endl;
3072 out <<
"}" << std::endl;
3104 out << std::endl <<
" // main frame" << std::endl;
3105 out <<
" TGMainFrame *";
3106 out <<
GetName() <<
" = new TGMainFrame(gClient->GetRoot(),10,10,"
3108 if (option && strstr(option,
"keep_names"))
3109 out <<
" " <<
GetName() <<
"->SetName(\"" <<
GetName() <<
"\");" << std::endl;
3122 out <<
" " <<
GetName() <<
"->SetLayoutManager(";
3124 out <<
");"<< std::endl;
3131 << quote <<
");" << std::endl;
3134 out <<
" "<<
GetName()<<
"->SetIconName("<<quote<<
GetIconName()<<quote<<
");"<<std::endl;
3138 << quote <<
");" << std::endl;
3149 out << std::endl <<
" // horizontal frame" << std::endl;
3150 out <<
" TGHorizontalFrame *";
3156 out <<
");" << std::endl;
3163 if (option && strstr(option,
"keep_names"))
3164 out <<
" " <<
GetName() <<
"->SetName(\"" <<
GetName() <<
"\");" << std::endl;
3177 out <<
" " <<
GetName() <<
"->SetLayoutManager(";
3179 out <<
");"<< std::endl;
3192 out << std::endl <<
" // vertical frame" << std::endl;
3193 out <<
" TGVerticalFrame *";
3199 out <<
");" << std::endl;
3206 if (option && strstr(option,
"keep_names"))
3207 out <<
" " <<
GetName() <<
"->SetName(\"" <<
GetName() <<
"\");" << std::endl;
3220 out <<
" " <<
GetName() <<
"->SetLayoutManager(";
3222 out <<
");"<< std::endl;
3235 out <<
" TGFrame *";
3241 out <<
");" << std::endl;
3248 if (option && strstr(option,
"keep_names"))
3249 out <<
" " <<
GetName() <<
"->SetName(\"" <<
GetName() <<
"\");" << std::endl;
3264 parFont.
Form(
"%s::GetDefaultFontStruct()",IsA()->
GetName());
3267 parGC.
Form(
"%s::GetDefaultGC()()",IsA()->
GetName());
3273 parFont.
Form(
"ufont->GetFontStruct()");
3279 parGC.
Form(
"uGC->GetGC()");
3285 out << std::endl <<
" // " << quote <<
GetTitle() << quote <<
" group frame" << std::endl;
3286 out <<
" TGGroupFrame *";
3288 <<
"," << quote <<
GetTitle() << quote;
3294 out <<
");" << std::endl;
3307 if (option && strstr(option,
"keep_names"))
3308 out <<
" " <<
GetName() <<
"->SetName(\"" <<
GetName() <<
"\");" << std::endl;
3311 out <<
" " <<
GetName() <<
"->SetTitlePos(";
3313 out <<
"TGGroupFrame::kCenter);" << std::endl;
3315 out <<
"TGGroupFrame::kRight);" << std::endl;
3320 out <<
" " <<
GetName() <<
"->SetLayoutManager(";
3324 out <<
");"<< std::endl;
3350 while ((
c2 = (
TClass *)nextc2())) {
3351 if (
c1==
c2)
continue;
3353 c3 =
c2->GetBaseClass(
c1);
3364 ilist->
SetName(
"ListOfIncludes");
3365 gROOT->GetListOfSpecials()->Add(ilist);
3370 while ((
c2 = (
TClass *)nextdo())) {
3372 if (bc->
TestBitNumber(k) == 0 &&
c2->InheritsFrom(TGObject::Class()) == 1) {
3376 iname =
c2->GetDeclFileName();
3377 if (iname[0] && strstr(iname,
".h")) {
3378 const char *lastsl = strrchr(iname,
'/');
3379 if (lastsl) iname = lastsl + 1;
3380 char *tname =
new char[strlen(iname)+1];
3382 while (*iname !=
'.') {
3402 TString ff = filename && strlen(filename) ? filename :
"Rootdlog.C";
3406 Int_t lenfname = strlen(fname);
3407 char *sname =
new char[lenfname+1];
3410 while ((*fname !=
'.') && (i < lenfname)) {
3418 out.open(ff.
Data(), std::ios::out);
3420 Error(
"SaveSource",
"cannot open file: %s", ff.
Data());
3436 out <<
"// Dialog macro generated from application: "<<
gApplication->
Argv(0) << std::endl;
3437 out <<
"// By ROOT version "<<
gROOT->GetVersion() <<
" on "<<t.
AsSQLString()<< std::endl;
3440 out <<
"#if !defined( __CINT__) || defined (__MAKECINT__)" << std::endl << std::endl;
3444 out <<
"#ifndef ROOT_"<< inc->
GetString() << std::endl;
3445 out <<
"#include "<< quote << inc->
GetString() <<
".h"<< quote << std::endl;
3446 out <<
"#endif" << std::endl;
3447 if (strstr(inc->
GetString(),
"TRootEmbeddedCanvas")) {
3448 out <<
"#ifndef ROOT_TCanvas"<< std::endl;
3449 out <<
"#include "<< quote <<
"TCanvas.h"<< quote << std::endl;
3450 out <<
"#endif" << std::endl;
3453 out << std::endl <<
"#include " << quote <<
"Riostream.h" << quote << std::endl;
3454 out << std::endl <<
"#endif" << std::endl;
3463 out <<
"void " << sname <<
"()" << std::endl;
3467 out <<
"{"<< std::endl;
3473 lSlots->
SetName(
"ListOfSlots");
3474 gROOT->GetListOfSpecials()->Add(lSlots);
3486 out <<
" " <<
GetName() <<
"->SetMWMHints(";
3495 if ((
fWMX != -1) || (
fWMY != -1)) {
3496 out <<
" "<<
GetName()<<
"->SetWMPosition("<<
fWMX<<
","<<
fWMY<<
");"<<std::endl;
3515 if ((
fWMX != -1) || (
fWMY != -1)) {
3519 out <<
" " <<
GetName()<<
"->MapSubwindows();" << std::endl;
3523 while ((fhidden = (
TGFrame*)nexth())) {
3524 out <<
" " <<fhidden->
GetName()<<
"->UnmapWindow();" << std::endl;
3537 out <<
" " <<
GetName()<<
"->Resize("<<
GetName()<<
"->GetDefaultSize());" << std::endl;
3541 out <<
" " <<
GetName()<<
"->MapWindow();" <<std::endl;
3542 if (!usexy) out <<
" " <<
GetName()<<
"->Resize();" << std::endl;
3543 out <<
"} " << std::endl;
3561 if (rb - lb > 1 && eq == -1) {
3565 out <<
"void " << s << std::endl;
3566 out <<
"{" << std::endl;
3569 out <<
" std::cout << " << quote <<
"Slot " << s << quote
3570 <<
" <<" << p <<
" << " << quote <<
")" << quote
3571 <<
" << std::endl; " << std::endl;
3575 out <<
"void " << s << std::endl;
3576 out <<
"{" << std::endl;
3577 out <<
" std::cout << " << quote <<
"Slot " << s
3578 << quote <<
" << std::endl; " << std::endl;
3580 out <<
"void " << slobj->
GetString() << std::endl;
3581 out <<
"{" << std::endl;
3582 out <<
" std::cout << " << quote <<
"Slot " << slobj->
GetString()
3583 << quote <<
" << std::endl; " << std::endl;
3586 out <<
"}" << std::endl;
3612 out << std::endl <<
" // transient frame" << std::endl;
3613 out <<
" TGTransientFrame *";
3614 out <<
GetName()<<
" = new TGTransientFrame(gClient->GetRoot(),0"
3617 if (option && strstr(option,
"keep_names"))
3618 out <<
" " <<
GetName() <<
"->SetName(\"" <<
GetName() <<
"\");" << std::endl;
3631 out <<
" " <<
GetName() <<
"->SetLayoutManager(";
3633 out <<
");"<< std::endl;
3640 << quote <<
");" << std::endl;
3643 out <<
" "<<
GetName()<<
"->SetIconName("<<quote<<
GetIconName()<<quote<<
");"<<std::endl;
3647 << quote <<
");" << std::endl;
const Mask_t kButtonPressMask
Handle_t FontH_t
Font handle (as opposed to Font_t which is an index)
const Mask_t kExposureMask
const Mask_t kWAEventMask
const Mask_t kWABackPixel
const Mask_t kAnyModifier
Handle_t Pixmap_t
Pixmap handle.
ULong_t Time_t
Event time.
EInitialState
Initial window mapping state.
const Mask_t kPointerMotionMask
const Mask_t kKeyControlMask
const Mask_t kKeyMod2Mask
typically mod on numeric keys
const Mask_t kStructureNotifyMask
Handle_t GContext_t
Graphics context handle.
const Mask_t kButtonReleaseMask
Handle_t FontStruct_t
Pointer to font structure.
ULong_t Pixel_t
Pixel value.
Handle_t Window_t
Window handle.
ULongptr_t Handle_t
Generic resource handle.
size_t size(const MatrixT &matrix)
retrieve the size of a square matrix
R__EXTERN TApplication * gApplication
void Error(const char *location, const char *msgfmt,...)
Use this function in case an error occurred.
R__EXTERN Int_t gErrorIgnoreLevel
void Warning(const char *location, const char *msgfmt,...)
Use this function in warning situations.
R__EXTERN TGDNDManager * gDNDManager
TList * gListOfHiddenFrames
static const char * gSaveMacroTypes[]
R__EXTERN TGuiBuilder * gGuiBuilder
char * Form(const char *fmt,...)
R__EXTERN TSystem * gSystem
R__EXTERN TVirtualDragManager * gDragManager
R__EXTERN Atom_t gROOT_MESSAGE
R__EXTERN Atom_t gWM_DELETE_WINDOW
Bool_t TestBitNumber(UInt_t bitnumber) const
void SetBitNumber(UInt_t bitnumber, Bool_t value=kTRUE)
TClass instances represent classes, structs and namespaces in the ROOT type system.
virtual const char * GetName() const
Return name of this collection.
void SetName(const char *name)
static ULong_t RGB2Pixel(Int_t r, Int_t g, Int_t b)
Convert r,g,b to graphics system dependent pixel value.
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...
static const char * PixelAsHexString(ULong_t pixel)
Convert machine dependent pixel value (obtained via RGB2Pixel or via Number2Pixel() or via TColor::Ge...
This class stores the date and time with a precision of one second in an unsigned 32 bit word (950130...
const char * AsSQLString() const
Return the date & time in SQL compatible string format, like: 1997-01-15 20:16:28.
const TGWindow * GetDefaultRoot() const
Returns the root (i.e.
Bool_t IsEditable() const
const TGWindow * GetRoot() const
Returns current root (i.e.
TGFont * GetFont(const char *font, Bool_t fixedDefault=kTRUE)
Get a font from the font pool.
const TGResourcePool * GetResourcePool() const
UInt_t GetDisplayHeight() const
Get display height.
const TGPicture * GetPicture(const char *name)
Get picture from the picture pool.
TGGCPool * GetGCPool() const
void SetRoot(TGWindow *root=nullptr)
Sets the current root (i.e.
Bool_t IsEditDisabled() const
Returns kTRUE if edit/guibuilding is forbidden.
void NeedRedraw(TGWindow *w, Bool_t force=kFALSE)
Set redraw flags.
UInt_t GetDisplayWidth() const
Get display width.
The base class for composite widgets (menu bars, list boxes, etc.).
virtual TGFrameElement * FindFrameElement(TGFrame *f) const
Find frame-element holding frame f.
virtual Bool_t HandleDragEnter(TGFrame *)
Handle drag enter event.
TGLayoutManager * fLayoutManager
layout manager
virtual void SetLayoutBroken(Bool_t on=kTRUE)
Set broken layout. No Layout method is called.
virtual void ChangeSubframesBackground(Pixel_t back)
Change background color for this frame and all subframes.
virtual void SetLayoutManager(TGLayoutManager *l)
Set the layout manager for the composite frame.
virtual Bool_t HandleDragMotion(TGFrame *)
Handle drag motion event.
virtual Bool_t HandleDragDrop(TGFrame *frame, Int_t x, Int_t y, TGLayoutHints *lo)
Handle drop event.
virtual Bool_t HandleButton(Event_t *)
Int_t GetState(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 AddFrame(TGFrame *f, TGLayoutHints *l=0)
Add frame to the composite frame using the specified layout hints.
virtual TGLayoutManager * GetLayoutManager() const
virtual Bool_t HandleSelection(Event_t *)
virtual void SetEditable(Bool_t on=kTRUE)
Switch ON/OFF edit mode.
virtual void Cleanup()
Cleanup and delete all objects contained in this composite frame.
virtual void Layout()
Layout the elements of the composite frame.
virtual Bool_t IsLayoutBroken() const
Int_t fMustCleanup
cleanup mode (see EFrameCleanup)
virtual void SavePrimitiveSubframes(std::ostream &out, Option_t *option="")
Auxiliary protected method used to save subframes.
virtual void ChangeOptions(UInt_t options)
Change composite frame options. Options is an OR of the EFrameTypes.
virtual void SetCleanup(Int_t mode=kLocalCleanup)
Turn on automatic cleanup of child frames in dtor.
TGCompositeFrame(const TGCompositeFrame &)=delete
virtual TGDimension GetDefaultSize() const
std::cout << fWidth << "x" << fHeight << std::endl;
virtual Bool_t TranslateCoordinates(TGFrame *child, Int_t x, Int_t y, Int_t &fx, Int_t &fy)
Translate coordinates to child frame.
virtual void MapSubwindows()
Map all sub windows that are part of the composite frame.
Bool_t fLayoutBroken
no layout manager is used
Bool_t fMapSubwindows
kTRUE - map subwindows
virtual void ShowFrame(TGFrame *f)
Show sub frame.
TList * fList
container of frame elements
virtual ~TGCompositeFrame()
Delete a composite frame.
virtual void SetEditDisabled(UInt_t on=1)
Set edit disable flag for this frame and subframes.
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save a composite frame widget as a C++ statement(s) on output stream out.
Bool_t IsArranged(TGFrame *f) const
Get state of sub frame.
virtual Bool_t HandleMotion(Event_t *)
virtual void RemoveFrame(TGFrame *f)
Remove frame from composite frame.
virtual Bool_t IsEditable() const
Return kTRUE if frame is being edited.
static TGLayoutHints * fgDefaultHints
virtual void Print(Option_t *option="") const
Print all frames in this composite frame.
virtual void RemoveAll()
Remove all frames from composite frame.
virtual Bool_t HandleDragLeave(TGFrame *)
Handle drag leave event.
virtual void HideFrame(TGFrame *f)
Hide sub frame.
Bool_t IsVisible(TGFrame *f) const
Get state of sub frame.
Bool_t HandleSelectionRequest(Event_t *event)
Handle selection request event.
Bool_t HandleClientMessage(Event_t *event)
Handle DND related client messages.
Bool_t HandleSelection(Event_t *event)
Handle selection event.
Bool_t IsDragging() const
void SetMainFrame(TGFrame *main)
static Atom_t GetDNDSelection()
Bool_t Drag(Int_t x_root, Int_t y_root, Atom_t action, Time_t timestamp)
Process drag event.
TGFrame * GetMainFrame() const
static Atom_t GetDNDActionCopy()
This class creates a file selection dialog.
char * fFilename
selected file name
const char ** fFileTypes
file types used to filter selectable files
char * fIniDir
on input: initial directory, on output: new directory
Bool_t fOverwrite
if true overwrite the file with existing name on save
void SetIniDir(const char *inidir)
Set directory name.
Encapsulate fonts used in the GUI system.
FontStruct_t GetFontStruct() const
virtual void SavePrimitive(std::ostream &out, Option_t *="")
Save the used font as a C++ statement(s) on output stream out.
A subclasses of TGWindow, and is used as base class for some simple widgets (buttons,...
virtual void ChangeOptions(UInt_t options)
Change frame options. Options is an OR of the EFrameTypes.
virtual Bool_t HandleSelectionClear(Event_t *)
virtual TGDimension GetDefaultSize() const
std::cout << fWidth << "x" << fHeight << std::endl;
static Pixel_t GetDefaultSelectedBackground()
Get default selected frame background.
void AddInput(UInt_t emask)
Add events specified in the emask to the events the frame should handle.
static const TGGC * fgWhiteGC
virtual Int_t GetDragType() const
Returns drag source type.
virtual void StartGuiBuilding(Bool_t on=kTRUE)
Go into GUI building mode.
virtual void DoRedraw()
Redraw the frame.
static const TGGC & GetBlackGC()
Get black graphics context.
static Pixel_t GetBlackPixel()
Get black pixel value.
UInt_t fOptions
frame options
virtual Bool_t HandleConfigureNotify(Event_t *event)
This event is generated when the frame is resized.
virtual Bool_t HandleDoubleClick(Event_t *)
UInt_t fMinHeight
minimal frame height
void RemoveInput(UInt_t emask)
Remove events specified in emask from the events the frame should handle.
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.
virtual Bool_t HandleKey(Event_t *)
TGFrame(const TGFrame &)=delete
static Pixel_t GetWhitePixel()
Get white pixel value.
UInt_t fHeight
frame height
virtual Bool_t HandleColormapChange(Event_t *)
virtual void SetDropType(Int_t type)
SetDropType.
virtual void SetDragType(Int_t type)
SetDragType.
virtual void DrawBorder()
Draw frame border.
virtual void Print(Option_t *option="") const
Print window id.
static const TGGC * fgBckgndGC
virtual Bool_t ProcessMessage(Longptr_t, Longptr_t, Longptr_t)
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.
Int_t fBorderWidth
frame border width
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save a frame widget as a C++ statement(s) on output stream out.
static const TGGC * fgShadowGC
static Pixel_t fgDefaultSelectedBackground
UInt_t fMinWidth
minimal frame width
virtual ~TGFrame()
Destructor.
virtual Pixel_t GetForeground() const
Return frame foreground color.
TGFrameElement * GetFrameElement() const
static const TGGC & GetHilightGC()
Get highlight color graphics context.
virtual void SetBackgroundColor(Pixel_t back)
Set background color (override from TGWindow base class).
static UInt_t fgLastButton
TGFrameElement * fFE
pointer to frame element
static Pixel_t GetDefaultFrameBackground()
Get default frame background.
virtual Int_t GetDropType() const
Returns drop target type.
Int_t fDNDState
EDNDFlags.
static Time_t GetLastClick()
Get time of last mouse click.
static const TGGC * fgBlackGC
static UInt_t fgUserColor
virtual void DeleteWindow()
Delete window.
virtual TGFrame * GetFrameFromPoint(Int_t x, Int_t y)
virtual UInt_t GetOptions() const
TString GetOptionString() const
Returns a frame option string - used in SavePrimitive().
static Time_t fgLastClick
virtual Bool_t HandleFocusChange(Event_t *)
virtual Bool_t IsComposite() const
virtual void ChangeBackground(Pixel_t back)
Change frame background color.
UInt_t fMaxWidth
maximal frame width
virtual void SendMessage(const TGWindow *w, Longptr_t msg, Longptr_t parm1, Longptr_t parm2)
Send message (i.e.
virtual void ProcessedConfigure(Event_t *event)
static const TGGC & GetShadowGC()
Get shadow color graphics context.
virtual void Move(Int_t x, Int_t y)
Move frame.
virtual Bool_t HandleSelectionRequest(Event_t *)
virtual void Resize(UInt_t w=0, UInt_t h=0)
Resize the frame.
virtual Bool_t HandleSelection(Event_t *)
virtual Bool_t HandleButton(Event_t *)
virtual Bool_t HandleMotion(Event_t *)
void SetFrameElement(TGFrameElement *fe)
virtual void SetCleanup(Int_t=kLocalCleanup)
virtual Bool_t IsEditable() const
virtual Bool_t HandleClientMessage(Event_t *event)
Handle a client message.
virtual Pixel_t GetBackground() const
virtual void MoveResize(Int_t x, Int_t y, UInt_t w=0, UInt_t h=0)
Move and/or resize the frame.
UInt_t fEventMask
currently active event mask
UInt_t fMaxHeight
maximal frame height
virtual Bool_t HandleCrossing(Event_t *)
virtual void ProcessedEvent(Event_t *event)
virtual Bool_t HandleEvent(Event_t *event)
Handle all frame events.
Bool_t Contains(Int_t x, Int_t y) const
virtual void MapWindow()
map window
static const TGGC & GetWhiteGC()
Get white graphics context.
static Pixel_t fgWhitePixel
virtual void MapSubwindows()
map sub windows
void SaveUserColor(std::ostream &out, Option_t *)
Save a user color in a C++ macro file - used in SavePrimitive().
Pixel_t fBackground
frame background color
static Pixel_t fgBlackPixel
static const TGGC & GetBckgndGC()
Get background color graphics context.
static const TGGC * fgHilightGC
virtual void UnmapWindow()
unmap window
static Pixel_t fgDefaultFrameBackground
TGGC * GetGC(GCValues_t *values, Bool_t rw=kFALSE)
Get the best matching graphics context depending on values.
void FreeGC(const TGGC *gc)
Delete graphics context if it is not used anymore.
TGGC * FindGC(const TGGC *gc)
Find graphics context. Returns 0 in case gc is not found.
Encapsulate a graphics context used in the low level graphics.
void SavePrimitive(std::ostream &out, Option_t *option="")
Save graphics context info as a C++ statement(s) on output stream out.
void SetFont(FontH_t v)
Set font.
void SetForeground(Pixel_t v)
Set foreground color.
const GCValues_t * GetAttributes() const
A composite frame with a border and a title.
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save a group frame widget as a C++ statement(s) on output stream out.
TGString * fText
title text
Bool_t fHasOwnFont
kTRUE - font defined locally, kFALSE - globally
static const TGGC & GetDefaultGC()
Return default graphics context in use.
virtual ~TGGroupFrame()
Delete a group frame.
static const TGGC * fgDefaultGC
TGGroupFrame(const TGGroupFrame &)=delete
virtual void DoRedraw()
Redraw the group frame.
Int_t fTitlePos
OPTION={GetMethod="GetTitlePos";SetMethod="SetTitlePos";Items=(-1="Left",0="Center",...
static const TGFont * fgDefaultFont
virtual const char * GetTitle() const
Returns title of object.
virtual TGDimension GetDefaultSize() const
Returns default size.
virtual void DrawBorder()
Draw border of around the group frame.
FontStruct_t fFontStruct
title fontstruct
virtual void SetTextFont(const char *fontName, Bool_t local=kTRUE)
Changes text font specified by name.
GContext_t fNormGC
title graphics context
static FontStruct_t GetDefaultFontStruct()
Return default font structure in use.
Bool_t HasOwnFont() const
Returns kTRUE if text attributes are unique, returns kFALSE if text attributes are shared (global).
virtual void SetTextColor(Pixel_t color, Bool_t local=kTRUE)
Changes text color.
Int_t GetTitlePos() const
virtual void SetTitle(TGString *title)
Set or change title of the group frame.
const TGFrame * GetFrame() const
A composite frame that layout their children in horizontal way.
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save a horizontal frame widget as a C++ statement(s) on output stream out.
This class describes layout hints used by the layout classes.
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save layout hints as a C++ statement(s) on output stream out.
Defines top level windows that interact with the system Window Manager.
void GetWMSizeHints(UInt_t &wmin, UInt_t &hmin, UInt_t &wmax, UInt_t &hmax, UInt_t &winc, UInt_t &hinc) const
TGMainFrame(const TGMainFrame &)=delete
UInt_t fWMWidthInc
WM width increments.
virtual Bool_t HandleSelectionRequest(Event_t *event)
Handle selection request event.
UInt_t fWMHeightInc
WM height increments.
virtual Bool_t SaveFrameAsCodeOrImage()
Opens dialog window allowing user to save the frame contents as a ROOT macro or as an image.
virtual void SaveSource(const char *filename="Rootappl.C", Option_t *option="")
Save the GUI main frame widget in a C++ macro file.
virtual Bool_t HandleClientMessage(Event_t *event)
Handle client messages sent to this frame.
TString GetMWMfuncString() const
used in SaveSource()
const char * GetIconName() const
Returns mime type name of object.
void DontCallClose()
Typically call this method in the slot connected to the CloseWindow() signal to prevent the calling o...
UInt_t fWMMinHeight
WM min height.
void GetWMPosition(Int_t &x, Int_t &y) const
virtual Bool_t HandleButton(Event_t *event)
Handle mouse button events.
UInt_t fWMMinWidth
WM min width.
TString fResourceName
WM resource name.
UInt_t fMWMValue
MWM decoration hints.
void GetWMSize(UInt_t &w, UInt_t &h) const
Atom_t * fDNDTypeList
handles DND types
virtual void SendCloseMessage()
Send close message to self.
void GetMWMHints(UInt_t &value, UInt_t &funcs, UInt_t &input) const
void SetClassHints(const char *className, const char *resourceName)
Set the windows class and resource name.
virtual void CloseWindow()
Close and delete main frame.
TString fIconPixmap
icon pixmap name
UInt_t fWMMaxWidth
WM max width.
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save a main frame widget as a C++ statement(s) on output stream out.
TString fWindowName
window name
virtual Bool_t HandleSelection(Event_t *event)
Handle primary selection event.
UInt_t fWMHeight
WM height.
TList * fBindList
list with key bindings
virtual ~TGMainFrame()
TGMainFrame destructor.
UInt_t fWMMaxHeight
WM max height.
void SetWMState(EInitialState state)
Set the initial state of the window. Either kNormalState or kIconicState.
virtual Bool_t BindKey(const TGWindow *w, Int_t keycode, Int_t modifier) const
Bind key to a window.
UInt_t fMWMFuncs
MWM functions.
EInitialState fWMInitState
WM initial state.
void SetIconName(const char *name)
Set window icon name. This is typically done via the window manager.
TString GetMWMinpString() const
used in SaveSource()
virtual Bool_t HandleKey(Event_t *event)
Handle keyboard events.
void SetWMSize(UInt_t w, UInt_t h)
Give the window manager a window size hint.
TString fClassName
WM class name.
void SetWMPosition(Int_t x, Int_t y)
Give the window manager a window position hint.
TString fIconName
icon name
TString GetMWMvalueString() const
used in SaveSource()
void SetMWMHints(UInt_t value, UInt_t funcs, UInt_t input)
Set decoration style for MWM-compatible wm (mwm, ncdwm, fvwm?).
const char * GetWindowName() const
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.
const char * GetIconPixmap() const
virtual Bool_t HandleMotion(Event_t *event)
Handle mouse motion events.
virtual void RemoveBind(const TGWindow *w, Int_t keycode, Int_t modifier) const
Remove key binding.
void SetWindowName(const char *name=0)
Set window name. This is typically done via the window manager.
const TGPicture * SetIconPixmap(const char *iconName)
Set window icon pixmap by name.
UInt_t fMWMInput
MWM input modes.
TGClient * fClient
Connection to display server.
Handle_t fId
X11/Win32 Window identifier.
The TGPicture class implements pictures and icons used in the different GUI elements and widgets.
Pixmap_t GetPicture() const
TGGCPool * GetGCPool() const
TGString wraps a TString and adds some graphics routines like drawing, size of string on screen depen...
const char * GetString() const
virtual void Draw(Drawable_t id, GContext_t gc, Int_t x, Int_t y)
Draw string.
Yield an action as soon as it is clicked.
Defines transient windows that typically are used for dialogs windows.
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save a transient frame widget as a C++ statement(s) on output stream out.
TGTransientFrame(const TGTransientFrame &)=delete
virtual void SaveSource(const char *filename="Rootdlog.C", Option_t *option="")
Save the GUI transient frame widget in a C++ macro file.
virtual void CenterOnParent(Bool_t croot=kTRUE, EPlacement pos=kCenter)
Position transient frame centered relative to the parent frame.
virtual Bool_t HandleButton(Event_t *event)
Handle mouse button event in vertical splitter.
virtual Bool_t HandleDoubleClick(Event_t *)
Handle double click mouse event in splitter.
const TGFrame * GetFrame() const
A composite frame that layout their children in vertical way.
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save a vertical frame widget as a C++ statement(s) on output stream out.
ROOT GUI Window base class.
virtual void SetWindowName(const char *name=0)
Set window name.
virtual const TGWindow * GetMainFrame() const
Returns top level main frame.
virtual void Move(Int_t x, Int_t y)
Move the window.
virtual const char * GetName() const
Return unique name, used in SavePrimitive methods.
virtual void Print(Option_t *option="") const
Print window id.
static Int_t fgCounter
counter of created windows in SavePrimitive
virtual UInt_t GetEditDisabled() const
virtual void SetEditDisabled(UInt_t on=kEditDisable)
virtual Bool_t HandleExpose(Event_t *event)
virtual void SetName(const char *name)
const TGWindow * fParent
Parent window.
@ kEditDisableLayout
window layout cannot be edited
@ kEditDisable
disable edit of this window
virtual void MoveResize(Int_t x, Int_t y, UInt_t w, UInt_t h)
Move and resize the window.
virtual Bool_t IsMapSubwindows() const
virtual void DestroyWindow()
destroy window
const TGWindow * GetParent() const
virtual void Resize(UInt_t w, UInt_t h)
Resize the window.
virtual void SetBackgroundColor(Pixel_t color)
set background color
virtual void RaiseWindow()
raise window
virtual void MapSubwindows()
map sub windows
UInt_t fEditDisabled
flags used for "guibuilding"
An abstract interface to image processing library.
static TImage * Create()
Create an image.
virtual Bool_t SetImageBuffer(char **, EImageFileTypes=TImage::kPng)
virtual void FromWindow(Drawable_t, Int_t=0, Int_t=0, UInt_t=0, UInt_t=0)
virtual void WriteImage(const char *, EImageFileTypes=TImage::kUnknown)
virtual Pixmap_t GetPixmap()
virtual void Add(TObject *obj)
virtual TObject * Remove(TObject *obj)
Remove object from the list.
virtual TObject * FindObject(const char *name) const
Find an object in this list using its name.
virtual TObject * Last() const
Return the last object in the list. Returns 0 when list is empty.
virtual void Delete(Option_t *option="")
Remove all objects from the list AND delete all heap based objects.
virtual void Clear(Option_t *option="")
Remove all objects from the list.
Collectable string class.
const TString & GetString() const
Monitors objects for deletion and reflects the deletion by reverting the internal pointer to zero.
TObject * GetObject() const
R__ALWAYS_INLINE Bool_t TestBit(UInt_t f) const
virtual const char * ClassName() const
Returns name of class to which the object belongs.