|
ROOT
Reference Guide |
|
Go to the documentation of this file.
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) {
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) {
1541 main->SaveSource(fname.
Data(),
"");
1546 }
else if (fname.
EndsWith(
".png")) {
1548 }
else if (fname.
EndsWith(
".jpg")) {
1550 }
else if (fname.
EndsWith(
".tiff")) {
1552 }
else if (fname.
EndsWith(
".xpm")) {
1571 repeat_save = (retval ==
kMBRetry);
1574 }
while (repeat_save);
1591 if (
m->fKeyCode == event->
fCode) {
1601 gVirtualX->LookupString(event, str,
sizeof(str), keysym);
1603 if ((keysym & ~0x20) ==
kKey_S) {
1620 list =
main->GetBindList();
1642 if (
m->fKeyCode == (
UInt_t) keycode) {
1709 Emit(
"CloseWindow()");
1728 event.fWindow =
GetId();
1822 Warning(
"SetIconPixmap",
"Failed to set window icon from xpm array.");
1836 gVirtualX->SetClassHints(
fId, (
char *)className, (
char *)resourceName);
1892 gVirtualX->SetWMSizeHints(
fId, wmin, hmin, wmax, hmax, winc, hinc);
1981 x,
y, ax, ay, wdummy);
1982 if (!
gVirtualX->InheritsFrom(
"TGWin32")) {
1985 else if (ax +
fWidth + 10 > dw)
1990 else if (ay +
fHeight + 50 > dh)
2063 int max_ascent, max_descent;
2082 int max_ascent, max_descent;
2202 Int_t x,
y,
l, t,
r,
b, gl,
gr,
sep, max_ascent, max_descent;
2208 t = (max_ascent + max_descent + 2) >> 1;
2234 gr = gl + tw + (
sep << 1);
2285 Warning(
"SetTitle",
"title cannot be 0, try \"\"");
2301 Error(
"SetTitle",
"title cannot be 0, try \"\"");
2366 if ( event->
fY > 0 &&
2367 event->
fY <= (
Int_t) this->GetHeight() ) {
2398 if ( event->
fY > 0 &&
2399 event->
fY <= (
Int_t) this->GetHeight() ) {
2425 if ( event->
fY > 0 &&
2426 event->
fY <= (
Int_t) this->GetHeight() ) {
2462 out <<
" ULong_t ucolor; // will reflect user color changes" << std::endl;
2465 if (option && !strcmp(option,
"slider"))
2471 out <<
" gClient->GetColorByName(" << quote << ucolorname << quote
2472 <<
",ucolor);" << std::endl;
2485 options =
"kChildFrame";
2488 if (options.
Length() == 0) options =
"kMainFrame";
2489 else options +=
" | kMainFrame";
2492 if (options.
Length() == 0) options =
"kVerticalFrame";
2493 else options +=
" | kVerticalFrame";
2496 if (options.
Length() == 0) options =
"kHorizontalFrame";
2497 else options +=
" | kHorizontalFrame";
2500 if (options.
Length() == 0) options =
"kSunkenFrame";
2501 else options +=
" | kSunkenFrame";
2504 if (options.
Length() == 0) options =
"kRaisedFrame";
2505 else options +=
" | kRaisedFrame";
2508 if (options.
Length() == 0) options =
"kDoubleBorder";
2509 else options +=
" | kDoubleBorder";
2512 if (options.
Length() == 0) options =
"kFitWidth";
2513 else options +=
" | kFitWidth";
2516 if (options.
Length() == 0) options =
"kFixedWidth";
2517 else options +=
" | kFixedWidth";
2520 if (options.
Length() == 0) options =
"kFitHeight";
2521 else options +=
" | kFitHeight";
2524 if (options.
Length() == 0) options =
"kFixedHeight";
2525 else options +=
" | kFixedHeight";
2528 if (options.
Length() == 0) options =
"kOwnBackground";
2529 else options +=
" | kOwnBackground";
2532 if (options.
Length() == 0) options =
"kTransientFrame";
2533 else options +=
" | kTransientFrame";
2536 if (options.
Length() == 0) options =
"kTempFrame";
2537 else options +=
" | kTempFrame";
2552 if (hints.
Length() == 0) hints =
"kMWMDecorAll";
2553 else hints +=
" | kMWMDecorAll";
2556 if (hints.
Length() == 0) hints =
"kMWMDecorBorder";
2557 else hints +=
" | kMWMDecorBorder";
2560 if (hints.
Length() == 0) hints =
"kMWMDecorResizeH";
2561 else hints +=
" | kMWMDecorResizeH";
2564 if (hints.
Length() == 0) hints =
"kMWMDecorTitle";
2565 else hints +=
" | kMWMDecorTitle";
2568 if (hints.
Length() == 0) hints =
"kMWMDecorMenu";
2569 else hints +=
" | kMWMDecorMenu";
2572 if (hints.
Length() == 0) hints =
"kMWMDecorMinimize";
2573 else hints +=
" | kMWMDecorMinimize";
2576 if (hints.
Length() == 0) hints =
"kMWMDecorMaximize";
2577 else hints +=
" | kMWMDecorMaximize";
2593 if (hints.
Length() == 0) hints =
"kMWMFuncAll";
2594 else hints +=
" | kMWMFuncAll";
2597 if (hints.
Length() == 0) hints =
"kMWMFuncResize";
2598 else hints +=
" | kMWMFuncResize";
2601 if (hints.
Length() == 0) hints =
"kMWMFuncMove";
2602 else hints +=
" | kMWMFuncMove";
2605 if (hints.
Length() == 0) hints =
"kMWMFuncMinimize";
2606 else hints +=
" | kMWMFuncMinimize";
2609 if (hints.
Length() == 0) hints =
"kMWMFuncMaximize";
2610 else hints +=
" | kMWMFuncMaximize";
2613 if (hints.
Length() == 0) hints =
"kMWMFuncClose";
2614 else hints +=
" | kMWMFuncClose";
2627 if (
fMWMInput == 0) hints =
"kMWMInputModeless";
2629 if (
fMWMInput == 1) hints =
"kMWMInputPrimaryApplicationModal";
2631 if (
fMWMInput == 2) hints =
"kMWMInputSystemModal";
2633 if (
fMWMInput == 3) hints =
"kMWMInputFullApplicationModal";
2644 out <<
" " <<
GetName() <<
"->SetLayoutBroken(kTRUE);" << std::endl;
2656 TString signal_name, slot_name;
2683 out <<
");"<< std::endl;
2688 out <<
");" << std::endl;
2697 if (vsplit->
GetLeft()) out <<
",kTRUE);" << std::endl;
2698 else out <<
",kFALSE);"<< std::endl;
2703 if (hsplit->
GetAbove()) out <<
",kTRUE);" << std::endl;
2704 else out <<
",kFALSE);"<< std::endl;
2714 if (!signalslist)
continue;
2719 signal_name = connlist->
GetName();
2724 slot_name.
Remove(eq, rb-eq);
2725 out <<
" " << el->
fFrame->
GetName() <<
"->Connect(" << quote << signal_name
2726 << quote <<
", 0, 0, " << quote << slot_name << quote <<
");" << std::endl;
2728 TList *lsl = (
TList *)
gROOT->GetListOfSpecials()->FindObject(
"ListOfSlots");
2752 out << std::endl <<
" // composite frame" << std::endl;
2753 out <<
" TGCompositeFrame *";
2759 out <<
");" << std::endl;
2766 if (option && strstr(option,
"keep_names"))
2767 out <<
" " <<
GetName() <<
"->SetName(\"" <<
GetName() <<
"\");" << std::endl;
2780 out <<
" " <<
GetName() <<
"->SetLayoutManager(";
2782 out <<
");"<< std::endl;
2807 while ((
c2 = (
TClass *)nextc2())) {
2808 if (
c1==
c2)
continue;
2810 c3 =
c2->GetBaseClass(
c1);
2821 ilist->
SetName(
"ListOfIncludes");
2822 gROOT->GetListOfSpecials()->Add(ilist);
2827 while ((
c2 = (
TClass *)nextdo())) {
2833 iname =
c2->GetDeclFileName();
2834 if (iname[0] && strstr(iname,
".h")) {
2835 const char *lastsl = strrchr(iname,
'/');
2836 if (lastsl) iname = lastsl + 1;
2837 char *tname =
new char[strlen(iname)+1];
2839 while (*iname !=
'.') {
2851 if (strstr(tname,
"TRootCanvas")) {
2867 TString ff = filename && strlen(filename) ? filename :
"Rootappl.C";
2871 Int_t lenfname = strlen(fname);
2872 char *sname =
new char[lenfname+1];
2875 while ((*fname !=
'.') && (i < lenfname)) {
2883 out.open(ff.
Data(), std::ios::out);
2885 Error(
"SaveSource",
"cannot open file: %s", ff.
Data());
2892 ilist = (
TList *)
gROOT->GetListOfSpecials()->FindObject(
"ListOfIncludes");
2901 out <<
"// Mainframe macro generated from application: "<<
gApplication->
Argv(0) << std::endl;
2902 out <<
"// By ROOT version "<<
gROOT->GetVersion() <<
" on "<<t.
AsSQLString()<< std::endl;
2907 out <<
"#ifndef ROOT_" << inc->
GetString() << std::endl;
2908 out <<
"#include " << quote << inc->
GetString() <<
".h" << quote << std::endl;
2909 out <<
"#endif" << std::endl;
2910 if (strstr(inc->
GetString(),
"TRootEmbeddedCanvas")) {
2911 out <<
"#ifndef ROOT_TCanvas" << std::endl;
2912 out <<
"#include " << quote <<
"TCanvas.h" << quote << std::endl;
2913 out <<
"#endif" << std::endl;
2916 out << std::endl <<
"#include " << quote <<
"Riostream.h" << quote << std::endl;
2918 gROOT->GetListOfSpecials()->Remove(ilist);
2925 out <<
"void " << sname <<
"()" << std::endl;
2926 out <<
"{"<< std::endl;
2933 lSlots->
SetName(
"ListOfSlots");
2934 gROOT->GetListOfSpecials()->Add(lSlots);
2940 << quote <<
"," << quote <<
fResourceName << quote <<
");" << std::endl;
2945 out <<
" " <<
GetName() <<
"->SetMWMHints(";
2972 out <<
" " <<
GetName()<<
"->MapSubwindows();" << std::endl;
2976 while ((fhidden = (
TGFrame*)nexth())) {
2977 out <<
" " <<fhidden->
GetName()<<
"->UnmapWindow();" << std::endl;
2991 out <<
" " <<
GetName()<<
"->Resize("<<
GetName()<<
"->GetDefaultSize());" << std::endl;
2995 out <<
" " <<
GetName()<<
"->MapWindow();" <<std::endl;
2998 if ((
fWMX != -1) || (
fWMY != -1)) {
3005 out <<
"} " << std::endl;
3008 TList *sl = (
TList *)
gROOT->GetListOfSpecials()->FindObject(
"ListOfSlots");
3023 if (rb - lb > 1 && eq == -1) {
3027 out <<
"void " <<
s << std::endl;
3028 out <<
"{" << std::endl;
3031 out <<
" std::cout << " << quote <<
"Slot " <<
s << quote
3032 <<
" <<" << p <<
" << " << quote <<
")" << quote
3033 <<
" << std::endl; " << std::endl;
3036 s.Remove(eq, rb-eq);
3037 out <<
"void " <<
s << std::endl;
3038 out <<
"{" << std::endl;
3039 out <<
" std::cout << " << quote <<
"Slot " <<
s
3040 << quote <<
" << std::endl; " << std::endl;
3042 out <<
"void " << slobj->
GetString() << std::endl;
3043 out <<
"{" << std::endl;
3044 out <<
" std::cout << " << quote <<
"Slot " << slobj->
GetString()
3045 << quote <<
" << std::endl; " << std::endl;
3048 out <<
"}" << std::endl;
3050 gROOT->GetListOfSpecials()->Remove(sl);
3080 out << std::endl <<
" // main frame" << std::endl;
3081 out <<
" TGMainFrame *";
3082 out <<
GetName() <<
" = new TGMainFrame(gClient->GetRoot(),10,10,"
3084 if (option && strstr(option,
"keep_names"))
3085 out <<
" " <<
GetName() <<
"->SetName(\"" <<
GetName() <<
"\");" << std::endl;
3098 out <<
" " <<
GetName() <<
"->SetLayoutManager(";
3100 out <<
");"<< std::endl;
3107 << quote <<
");" << std::endl;
3110 out <<
" "<<
GetName()<<
"->SetIconName("<<quote<<
GetIconName()<<quote<<
");"<<std::endl;
3114 << quote <<
");" << std::endl;
3125 out << std::endl <<
" // horizontal frame" << std::endl;
3126 out <<
" TGHorizontalFrame *";
3132 out <<
");" << std::endl;
3139 if (option && strstr(option,
"keep_names"))
3140 out <<
" " <<
GetName() <<
"->SetName(\"" <<
GetName() <<
"\");" << std::endl;
3153 out <<
" " <<
GetName() <<
"->SetLayoutManager(";
3155 out <<
");"<< std::endl;
3168 out << std::endl <<
" // vertical frame" << std::endl;
3169 out <<
" TGVerticalFrame *";
3175 out <<
");" << std::endl;
3182 if (option && strstr(option,
"keep_names"))
3183 out <<
" " <<
GetName() <<
"->SetName(\"" <<
GetName() <<
"\");" << std::endl;
3196 out <<
" " <<
GetName() <<
"->SetLayoutManager(";
3198 out <<
");"<< std::endl;
3211 out <<
" TGFrame *";
3217 out <<
");" << std::endl;
3224 if (option && strstr(option,
"keep_names"))
3225 out <<
" " <<
GetName() <<
"->SetName(\"" <<
GetName() <<
"\");" << std::endl;
3240 parFont.
Form(
"%s::GetDefaultFontStruct()",IsA()->
GetName());
3243 parGC.
Form(
"%s::GetDefaultGC()()",IsA()->
GetName());
3249 parFont.
Form(
"ufont->GetFontStruct()");
3255 parGC.
Form(
"uGC->GetGC()");
3261 out << std::endl <<
" // " << quote <<
GetTitle() << quote <<
" group frame" << std::endl;
3262 out <<
" TGGroupFrame *";
3264 <<
"," << quote <<
GetTitle() << quote;
3270 out <<
");" << std::endl;
3283 if (option && strstr(option,
"keep_names"))
3284 out <<
" " <<
GetName() <<
"->SetName(\"" <<
GetName() <<
"\");" << std::endl;
3287 out <<
" " <<
GetName() <<
"->SetTitlePos(";
3289 out <<
"TGGroupFrame::kCenter);" << std::endl;
3291 out <<
"TGGroupFrame::kRight);" << std::endl;
3296 out <<
" " <<
GetName() <<
"->SetLayoutManager(";
3300 out <<
");"<< std::endl;
3326 while ((
c2 = (
TClass *)nextc2())) {
3327 if (
c1==
c2)
continue;
3329 c3 =
c2->GetBaseClass(
c1);
3340 ilist->
SetName(
"ListOfIncludes");
3341 gROOT->GetListOfSpecials()->Add(ilist);
3346 while ((
c2 = (
TClass *)nextdo())) {
3352 iname =
c2->GetDeclFileName();
3353 if (iname[0] && strstr(iname,
".h")) {
3354 const char *lastsl = strrchr(iname,
'/');
3355 if (lastsl) iname = lastsl + 1;
3356 char *tname =
new char[strlen(iname)+1];
3358 while (*iname !=
'.') {
3378 TString ff = filename && strlen(filename) ? filename :
"Rootdlog.C";
3382 Int_t lenfname = strlen(fname);
3383 char *sname =
new char[lenfname+1];
3386 while ((*fname !=
'.') && (i < lenfname)) {
3394 out.open(ff.
Data(), std::ios::out);
3396 Error(
"SaveSource",
"cannot open file: %s", ff.
Data());
3403 ilist = (
TList *)
gROOT->GetListOfSpecials()->FindObject(
"ListOfIncludes");
3412 out <<
"// Dialog macro generated from application: "<<
gApplication->
Argv(0) << std::endl;
3413 out <<
"// By ROOT version "<<
gROOT->GetVersion() <<
" on "<<t.
AsSQLString()<< std::endl;
3416 out <<
"#if !defined( __CINT__) || defined (__MAKECINT__)" << std::endl << std::endl;
3420 out <<
"#ifndef ROOT_"<< inc->
GetString() << std::endl;
3421 out <<
"#include "<< quote << inc->
GetString() <<
".h"<< quote << std::endl;
3422 out <<
"#endif" << std::endl;
3423 if (strstr(inc->
GetString(),
"TRootEmbeddedCanvas")) {
3424 out <<
"#ifndef ROOT_TCanvas"<< std::endl;
3425 out <<
"#include "<< quote <<
"TCanvas.h"<< quote << std::endl;
3426 out <<
"#endif" << std::endl;
3429 out << std::endl <<
"#include " << quote <<
"Riostream.h" << quote << std::endl;
3430 out << std::endl <<
"#endif" << std::endl;
3432 gROOT->GetListOfSpecials()->Remove(ilist);
3439 out <<
"void " << sname <<
"()" << std::endl;
3443 out <<
"{"<< std::endl;
3449 lSlots->
SetName(
"ListOfSlots");
3450 gROOT->GetListOfSpecials()->Add(lSlots);
3462 out <<
" " <<
GetName() <<
"->SetMWMHints(";
3471 if ((
fWMX != -1) || (
fWMY != -1)) {
3472 out <<
" "<<
GetName()<<
"->SetWMPosition("<<
fWMX<<
","<<
fWMY<<
");"<<std::endl;
3491 if ((
fWMX != -1) || (
fWMY != -1)) {
3495 out <<
" " <<
GetName()<<
"->MapSubwindows();" << std::endl;
3499 while ((fhidden = (
TGFrame*)nexth())) {
3500 out <<
" " <<fhidden->
GetName()<<
"->UnmapWindow();" << std::endl;
3513 out <<
" " <<
GetName()<<
"->Resize("<<
GetName()<<
"->GetDefaultSize());" << std::endl;
3517 out <<
" " <<
GetName()<<
"->MapWindow();" <<std::endl;
3518 if (!usexy) out <<
" " <<
GetName()<<
"->Resize();" << std::endl;
3519 out <<
"} " << std::endl;
3522 TList *sl = (
TList *)
gROOT->GetListOfSpecials()->FindObject(
"ListOfSlots");
3537 if (rb - lb > 1 && eq == -1) {
3541 out <<
"void " <<
s << std::endl;
3542 out <<
"{" << std::endl;
3545 out <<
" std::cout << " << quote <<
"Slot " <<
s << quote
3546 <<
" <<" << p <<
" << " << quote <<
")" << quote
3547 <<
" << std::endl; " << std::endl;
3550 s.Remove(eq, rb-eq);
3551 out <<
"void " <<
s << std::endl;
3552 out <<
"{" << std::endl;
3553 out <<
" std::cout << " << quote <<
"Slot " <<
s
3554 << quote <<
" << std::endl; " << std::endl;
3556 out <<
"void " << slobj->
GetString() << std::endl;
3557 out <<
"{" << std::endl;
3558 out <<
" std::cout << " << quote <<
"Slot " << slobj->
GetString()
3559 << quote <<
" << std::endl; " << std::endl;
3562 out <<
"}" << std::endl;
3564 gROOT->GetListOfSpecials()->Remove(sl);
3588 out << std::endl <<
" // transient frame" << std::endl;
3589 out <<
" TGTransientFrame *";
3590 out <<
GetName()<<
" = new TGTransientFrame(gClient->GetRoot(),0"
3593 if (option && strstr(option,
"keep_names"))
3594 out <<
" " <<
GetName() <<
"->SetName(\"" <<
GetName() <<
"\");" << std::endl;
3607 out <<
" " <<
GetName() <<
"->SetLayoutManager(";
3609 out <<
");"<< std::endl;
3616 << quote <<
");" << std::endl;
3619 out <<
" "<<
GetName()<<
"->SetIconName("<<quote<<
GetIconName()<<quote<<
");"<<std::endl;
3623 << quote <<
");" << std::endl;
virtual void SetWindowName(const char *name=0)
Set window name.
virtual TGDimension GetDefaultSize() const
std::cout << fWidth << "x" << fHeight << std::endl;
TList * gListOfHiddenFrames
EGEventType fType
of event (see EGEventType)
const TGWindow * GetDefaultRoot() const
Returns the root (i.e.
static Pixel_t GetBlackPixel()
Get black pixel value.
UInt_t fState
key or button mask
Defines transient windows that typically are used for dialogs windows.
UInt_t fWMMinHeight
WM min height.
virtual Bool_t HandleEvent(Event_t *)
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save a primitive as a C++ statement(s) on output stream "out".
Int_t fY
pointer x, y coordinates in event window
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.
ROOT GUI Window base class.
TString fResourceName
WM resource name.
virtual Bool_t HandleFocusChange(Event_t *)
UInt_t GetDisplayWidth() const
Get display width.
Handle_t Pixmap_t
Pixmap handle.
Int_t fTitlePos
OPTION={GetMethod="GetTitlePos";SetMethod="SetTitlePos";Items=(-1="Left",0="Center",...
R__ALWAYS_INLINE Bool_t TestBit(UInt_t f) const
Defines top level windows that interact with the system Window Manager.
Long_t fEventMask
set of events that should be saved
static Pixel_t fgBlackPixel
virtual Bool_t HandleMotion(Event_t *)
virtual void SaveSource(const char *filename="Rootdlog.C", Option_t *option="")
Save the GUI transient frame widget in a C++ macro file.
virtual void ChangeSubframesBackground(Pixel_t back)
Change background color for this frame and all subframes.
static Int_t fgCounter
counter of created windows in SavePrimitive
virtual void ChangeOptions(UInt_t options)
Change frame options. Options is an OR of the EFrameTypes.
virtual TGLayoutManager * GetLayoutManager() const
virtual void SetCleanup(Int_t=kLocalCleanup)
The TGPicture class implements pictures and icons used in the different GUI elements and widgets.
const Mask_t kAnyModifier
virtual void SetBackgroundColor(Pixel_t back)
Set background color (override from TGWindow base class).
const GCValues_t * GetAttributes() const
virtual void SaveSource(const char *filename="Rootappl.C", Option_t *option="")
Save the GUI main frame widget in a C++ macro file.
static Time_t fgLastClick
UInt_t References() const
TGGCPool * GetGCPool() const
Bool_t HandleSelectionRequest(Event_t *event)
Handle selection request event.
TGTransientFrame(const TGTransientFrame &)=delete
virtual Bool_t HandleDragLeave(TGFrame *)
Handle drag leave event.
static Atom_t GetDNDSelection()
const Mask_t kPointerMotionMask
void SetIconName(const char *name)
Set window icon name. This is typically done via the window manager.
static TImage * Create()
Create an image.
TGGCPool * GetGCPool() const
virtual const char * BaseName(const char *pathname)
Base name of a file name. Base name of /user/root is root.
virtual void RaiseWindow()
raise window
virtual void SetTextFont(const char *fontName, Bool_t local=kTRUE)
Changes text font specified by name.
UInt_t fWMHeightInc
WM height increments.
virtual TObject * FindObject(const char *name) const
Find an object in this list using its name.
const TGPicture * SetIconPixmap(const char *iconName)
Set window icon pixmap by name.
virtual void Delete(Option_t *option="")
Remove all objects from the list AND delete all heap based objects.
const char * Data() const
ULong_t Pixel_t
Pixel value.
Handle_t FontH_t
Font handle (as opposed to Font_t which is an index)
Bool_t HandleClientMessage(Event_t *event)
Handle DND related client messages.
char * Form(const char *fmt,...)
virtual TGFrame * GetFrameFromPoint(Int_t x, Int_t y)
Get frame located at specified point.
UInt_t fHeight
width and height of exposed area
virtual void SetPasteFrame(TGFrame *f)
void SavePrimitive(std::ostream &out, Option_t *option="")
Save graphics context info as a C++ statement(s) on output stream out.
virtual Bool_t SetImageBuffer(char **, EImageFileTypes=TImage::kPng)
virtual Bool_t HandleSelectionClear(Event_t *)
Handle_t FontStruct_t
Pointer to font structure.
virtual Bool_t HandleEvent(Event_t *event)
Handle all frame events.
virtual TGFrame * GetFrameFromPoint(Int_t x, Int_t y)
const char * GetIconName() const
Returns mime type name of object.
virtual void SetEditable(Bool_t on=kTRUE)
Switch ON/OFF edit mode.
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save a vertical frame widget as a C++ statement(s) on output stream out.
TString GetMWMfuncString() const
used in SaveSource()
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
@ kEditDisableLayout
window layout cannot be edited
virtual Bool_t HandleButton(Event_t *event)
Handle mouse button event in vertical splitter.
static const TGGC * fgShadowGC
virtual Bool_t ProcessMessage(Long_t, Long_t, Long_t)
virtual void Cleanup()
Cleanup and delete all objects contained in this composite frame.
UInt_t fWMHeight
WM height.
virtual Bool_t HandleSelection(Event_t *)
Graphics context structure.
@ kEditDisable
disable edit of this window
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save a frame widget as a C++ statement(s) on output stream out.
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.
static const TGFont * fgDefaultFont
Window attributes that can be inquired.
UInt_t fOptions
frame options
Yield an action as soon as it is clicked.
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save a composite frame widget as a C++ statement(s) on output stream out.
static constexpr double s
virtual void SetDropType(Int_t type)
SetDropType.
Bool_t IsEditable() const
void DontCallClose()
Typically call this method in the slot connected to the CloseWindow() signal to prevent the calling o...
virtual Bool_t HandleButton(Event_t *)
virtual ~TGMainFrame()
TGMainFrame destructor.
Bool_t HandleSelection(Event_t *event)
Handle selection event.
R__EXTERN TVirtualDragManager * gDragManager
virtual Bool_t HandleSelection(Event_t *)
virtual void ProcessedEvent(Event_t *event)
const TString & GetString() const
Int_t GetTitlePos() const
virtual Bool_t HandleButton(Event_t *)
Int_t fFormat
Next fields only used by kClientMessageEvent.
static Time_t GetLastClick()
Get time of last mouse click.
void SetIniDir(const char *inidir)
Set directory name.
Int_t fDNDState
EDNDFlags.
EInitialState fWMInitState
WM initial state.
static UInt_t fgUserColor
virtual TGFrameElement * FindFrameElement(TGFrame *f) const
Find frame-element holding frame f.
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
An abstract interface to image processing library.
Bool_t EndsWith(const char *pat, ECaseCompare cmp=kExact) const
Return true if string ends with the specified string.
virtual void SetLayoutBroken(Bool_t on=kTRUE)
Set broken layout. No Layout method is called.
virtual Int_t GetDropType() const
Returns drop target type.
virtual void SetEditDisabled(UInt_t on=1)
Set edit disable flag for this frame and subframes.
virtual Bool_t HandleDragMotion(TGFrame *)
Handle drag motion event.
virtual Bool_t BindKey(const TGWindow *w, Int_t keycode, Int_t modifier) const
Bind key to a window.
UInt_t fWMWidthInc
WM width increments.
static Pixel_t fgWhitePixel
virtual ~TGFrame()
Destructor.
Int_t fMustCleanup
cleanup mode (see EFrameCleanup)
virtual TObject * Last() const
Return the last object in the list. Returns 0 when list is empty.
Bool_t TestBitNumber(UInt_t bitnumber) const
void SetWindowName(const char *name=0)
Set window name. This is typically done via the window manager.
virtual Bool_t HandleDoubleClick(Event_t *)
static Pixel_t GetDefaultFrameBackground()
Get default frame background.
UInt_t fMaxWidth
maximal frame width
ULong_t fBackgroundPixel
background pixel
virtual Int_t GetDragType() const
Returns drag source type.
R__EXTERN TGuiBuilder * gGuiBuilder
static const char * PixelAsHexString(ULong_t pixel)
Convert machine dependent pixel value (obtained via RGB2Pixel or via Number2Pixel() or via TColor::Ge...
A composite frame that layout their children in horizontal way.
virtual Pixel_t GetBackground() const
TQConnection class is an internal class, used in the object communication mechanism.
virtual UInt_t GetEditDisabled() const
const TGResourcePool * GetResourcePool() const
static Pixel_t fgDefaultFrameBackground
TGFrame * GetMainFrame() const
virtual Bool_t HandleSelectionRequest(Event_t *)
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString.
UInt_t fMaxHeight
maximal frame height
virtual Bool_t IsMapSubwindows() const
virtual TGDimension GetDefaultSize() const
std::cout << fWidth << "x" << fHeight << std::endl;
static const TGGC & GetBlackGC()
Get black graphics context.
virtual Pixel_t GetForeground() const
Return frame foreground color.
virtual void DrawBorder()
Draw frame border.
virtual Bool_t IsEditable() const
const Mask_t kButtonPressMask
Mask_t fMask
bit mask specifying which fields are valid
virtual void MapSubwindows()
map sub windows
virtual Bool_t HandleExpose(Event_t *event)
virtual Bool_t InheritsFrom(const char *classname) const
Returns kTRUE if object inherits from class "classname".
virtual void ProcessedConfigure(Event_t *event)
UInt_t fMinWidth
minimal frame width
TGGC * GetGC(GCValues_t *values, Bool_t rw=kFALSE)
Get the best matching graphics context depending on values.
virtual void MapWindow()
map window
virtual Bool_t HandleSelection(Event_t *event)
Handle primary selection event.
void FreeGC(const TGGC *gc)
Delete graphics context if it is not used anymore.
virtual void SavePrimitiveSubframes(std::ostream &out, Option_t *option="")
Auxiliary protected method used to save subframes.
TList * GetListOfSignals() const
TList * fList
container of frame elements
virtual void SetTitle(TGString *title)
Set or change title of the group frame.
Int_t fBorderWidth
border width of window
Int_t fHeight
width and height of window
TString GetOptionString() const
Returns a frame option string - used in SavePrimitive().
virtual UInt_t GetOptions() const
static const char * gSaveMacroTypes[]
const TGFrame * GetFrame() const
virtual void DestroyWindow()
destroy window
Handle_t GContext_t
Graphics context handle.
virtual Bool_t HandleKey(Event_t *)
Collectable string class.
static const TGGC * fgBlackGC
static const TGGC * fgWhiteGC
virtual Bool_t HandleClientMessage(Event_t *event)
Handle a client message.
void AddInput(UInt_t emask)
Add events specified in the emask to the events the frame should handle.
void Form(const char *fmt,...)
Formats a string using a printf style format descriptor.
static const TGGC & GetHilightGC()
Get highlight color graphics context.
virtual Bool_t IsEditable() const
Return kTRUE if frame is being edited.
virtual void DeleteWindow()
Delete window.
virtual void ChangeOptions(UInt_t options)
Change composite frame options. Options is an OR of the EFrameTypes.
virtual void ChangeBackground(Pixel_t back)
Change frame background color.
static Atom_t GetDNDActionCopy()
const char * GetName() const override
Returns name of connection (aka name of slot)
virtual void SetName(const char *name)
Bool_t fOverwrite
if true overwrite the file with existing name on save
void SetRoot(TGWindow *root=nullptr)
Sets the current root (i.e.
UInt_t fWMMaxHeight
WM max height.
virtual void Print(Option_t *option="") const
Print all frames in this composite frame.
Monitors objects for deletion and reflects the deletion by reverting the internal pointer to zero.
virtual void SendCloseMessage()
Send close message to self.
void SetClassHints(const char *className, const char *resourceName)
Set the windows class and resource name.
virtual Bool_t HandleDragDrop(TGFrame *frame, Int_t x, Int_t y, TGLayoutHints *lo)
Handle drop event.
UInt_t fWMMinWidth
WM min width.
Handle_t fHandle
general resource handle (used for atoms or windows)
GContext_t fNormGC
title graphics context
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...
UInt_t fMinHeight
minimal frame height
UInt_t fMWMInput
MWM input modes.
UInt_t GetDisplayHeight() const
Get display height.
virtual Bool_t HandleMotion(Event_t *event)
Handle mouse motion events.
void GetMWMHints(UInt_t &value, UInt_t &funcs, UInt_t &input) const
TString fIconName
icon name
size_t size(const MatrixT &matrix)
retrieve the size of a square matrix
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
virtual const char * GetName() const
Return unique name, used in SavePrimitive methods.
const char * AsSQLString() const
Return the date & time in SQL compatible string format, like: 1997-01-15 20:16:28.
virtual void MapSubwindows()
Map all sub windows that are part of the composite frame.
A composite frame that layout their children in vertical way.
virtual void DoRedraw()
Redraw the group frame.
Encapsulate a graphics context used in the low level graphics.
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.
Bool_t HasOwnFont() const
Returns kTRUE if text attributes are unique, returns kFALSE if text attributes are shared (global).
virtual void Resize(UInt_t w=0, UInt_t h=0)
Resize the frame.
R__EXTERN Atom_t gWM_DELETE_WINDOW
Handle_t fId
X11/Win32 Window identifier.
TString & Remove(Ssiz_t pos)
virtual Bool_t TranslateCoordinates(TGFrame *child, Int_t x, Int_t y, Int_t &fx, Int_t &fy)
Translate coordinates to child frame.
UInt_t fCode
key or button code
Bool_t IsDragging() const
virtual void SendMessage(const TGWindow *w, Long_t msg, Long_t parm1, Long_t parm2)
Send message (i.e.
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save a main frame widget as a C++ statement(s) on output stream out.
virtual void Print(Option_t *option="") const
Print window id.
virtual void HideFrame(TGFrame *f)
Hide sub frame.
Int_t fBorderWidth
frame border width
const Mask_t kButtonReleaseMask
Ssiz_t First(char c) const
Find first occurrence of a character c.
virtual void RemoveAll()
Remove all frames from composite frame.
This class describes layout hints used by the layout classes.
void SaveUserColor(std::ostream &out, Option_t *)
Save a user color in a C++ macro file - used in SavePrimitive().
TGMainFrame(const TGMainFrame &)=delete
A composite frame with a border and a title.
R__EXTERN TApplication * gApplication
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.
const TGPicture * GetPicture(const char *name)
Get picture from the picture pool.
TString fIconPixmap
icon pixmap name
Handle_t Window_t
Window handle.
virtual void MapSubwindows()
map sub windows
static FontStruct_t GetDefaultFontStruct()
Return default font structure in use.
void SetMainFrame(TGFrame *main)
void GetWMPosition(Int_t &x, Int_t &y) const
virtual void Print(Option_t *option="") const
Print window id.
virtual void SetBackgroundColor(Pixel_t color)
set background color
TGFrameElement * fFE
pointer to frame element
virtual void WriteImage(const char *, EImageFileTypes=TImage::kUnknown)
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save layout hints as a C++ statement(s) on output stream out.
virtual void CloseWindow()
Close and delete main frame.
virtual Bool_t HandleCrossing(Event_t *)
Int_t fY
location of window
virtual void RemoveFrame(TGFrame *f)
Remove frame from composite frame.
static const TGGC & GetBckgndGC()
Get background color graphics context.
TString GetMWMinpString() const
used in SaveSource()
static const TGGC * fgHilightGC
R__EXTERN Atom_t gROOT_MESSAGE
virtual void SetLayoutManager(TGLayoutManager *l)
Set the layout manager for the composite frame.
virtual TGDimension GetDefaultSize() const
Returns default size.
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.
Window_t fWindow
window reported event is relative to
R__EXTERN TGDNDManager * gDNDManager
Int_t fYRoot
coordinates relative to root
Bool_t Contains(Int_t x, Int_t y) const
static UInt_t fgLastButton
virtual Bool_t SaveFrameAsCodeOrImage()
Opens dialog window allowing user to save the frame contents as a ROOT macro or as an image.
Bool_t fLayoutBroken
no layout manager is used
static TVirtualDragManager * Instance()
Load plugin and create drag manager object.
TGFrame(const TGFrame &)=delete
R__EXTERN TSystem * gSystem
const Mask_t kWAEventMask
const Mask_t kKeyControlMask
Bool_t IsEditDisabled() const
Returns kTRUE if edit/guibuilding is forbidden.
virtual Bool_t HandleSelectionRequest(Event_t *event)
Handle selection request event.
void GetWMSize(UInt_t &w, UInt_t &h) const
void SetWMSize(UInt_t w, UInt_t h)
Give the window manager a window size hint.
char * fIniDir
on input: initial directory, on output: new directory
Bool_t fMapSubwindows
kTRUE - map subwindows
const TGWindow * GetParent() const
R__EXTERN Int_t gErrorIgnoreLevel
const char ** fFileTypes
file types used to filter selectable files
void NeedRedraw(TGWindow *w, Bool_t force=kFALSE)
Set redraw flags.
const Mask_t kExposureMask
const char * GetIconPixmap() const
const Mask_t kWABackPixel
virtual Bool_t IsLayoutBroken() const
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save a horizontal frame widget as a C++ statement(s) on output stream out.
virtual void UnmapWindow()
unmap window
@ kNotDeleted
object has not been deleted
static TGLayoutHints * fgDefaultHints
virtual const char * UnixPathName(const char *unixpathname)
Convert from a local pathname to a Unix pathname.
virtual TObject * Remove(TObject *obj)
Remove object from the list.
virtual Bool_t IsComposite() const
TString GetMWMvalueString() const
used in SaveSource()
TGClient * fClient
Connection to display server.
virtual void MoveResize(Int_t x, Int_t y, UInt_t w=0, UInt_t h=0)
Move and/or resize the frame.
virtual const TGWindow * GetMainFrame() const
Returns top level main frame.
Bool_t IsArranged(TGFrame *f) const
Get state of sub frame.
virtual void CenterOnParent(Bool_t croot=kTRUE, EPlacement pos=kCenter)
Position transient frame centered relative to the parent frame.
FontStruct_t fFontStruct
title fontstruct
TClass instances represent classes, structs and namespaces in the ROOT type system.
virtual void DrawBorder()
Draw border of around the group frame.
Pixmap_t GetPicture() const
virtual void Resize(UInt_t w, UInt_t h)
Resize the window.
virtual void Move(Int_t x, Int_t y)
Move frame.
virtual void SetTextColor(Pixel_t color, Bool_t local=kTRUE)
Changes text color.
void SetMWMHints(UInt_t value, UInt_t funcs, UInt_t input)
Set decoration style for MWM-compatible wm (mwm, ncdwm, fvwm?).
Int_t GetState(TGFrame *f) const
Get state of sub frame.
void SetName(const char *name)
void SetForeground(Pixel_t v)
Set foreground color.
Time_t fTime
time event event occurred in ms
static const TGGC * fgDefaultGC
TGLayoutManager * fLayoutManager
layout manager
Bool_t IsVisible(TGFrame *f) const
Get state of sub frame.
virtual void Add(TObject *obj)
virtual void Move(Int_t x, Int_t y)
Move the window.
ULong_t Handle_t
Generic resource handle.
void SetBitNumber(UInt_t bitnumber, Bool_t value=kTRUE)
virtual void SetEditDisabled(UInt_t on=kEditDisable)
virtual Bool_t HandleDoubleClick(Event_t *)
Handle double click mouse event in splitter.
virtual Bool_t HandleConfigureNotify(Event_t *event)
This event is generated when the frame is resized.
virtual Bool_t HandleButton(Event_t *event)
Handle mouse button events.
Long_t fYourEventMask
my event mask
virtual void SetEditable(Bool_t)
virtual Pixmap_t GetPixmap()
virtual void Clear(Option_t *option="")
Remove all objects from the list.
virtual Bool_t HandleDragEnter(TGFrame *)
Handle drag enter event.
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save a group frame widget as a C++ statement(s) on output stream out.
Atom_t * fDNDTypeList
handles DND types
virtual void Draw(Drawable_t id, GContext_t gc, Int_t x, Int_t y)
Draw string.
static Pixel_t GetWhitePixel()
Get white pixel value.
virtual const char * GetTitle() const
Returns title of object.
TGFont * GetFont(const char *font, Bool_t fixedDefault=kTRUE)
Get a font from the font pool.
static const TGGC & GetShadowGC()
Get shadow color graphics context.
const char * GetString() const
UInt_t fMWMFuncs
MWM functions.
Bool_t fHasOwnFont
kTRUE - font defined locally, kFALSE - globally
static Pixel_t GetDefaultSelectedBackground()
Get default selected frame background.
TGGroupFrame(const TGGroupFrame &)=delete
UInt_t fWMMaxWidth
WM max width.
virtual void SavePrimitive(std::ostream &out, Option_t *="")
Save the used font as a C++ statement(s) on output stream out.
virtual void RemoveBind(const TGWindow *w, Int_t keycode, Int_t modifier) const
Remove key binding.
virtual ~TGGroupFrame()
Delete a group frame.
This class stores the date and time with a precision of one second in an unsigned 32 bit word (950130...
TGGC * FindGC(const TGGC *gc)
Find graphics context. Returns 0 in case gc is not found.
virtual void FromWindow(Drawable_t, Int_t=0, Int_t=0, UInt_t=0, UInt_t=0)
FontStruct_t GetFontStruct() const
const Mask_t kStructureNotifyMask
TList * fBindList
list with key bindings
TGCompositeFrame(const TGCompositeFrame &)=delete
EInitialState
Initial window mapping state.
static ULong_t RGB2Pixel(Int_t r, Int_t g, Int_t b)
Convert r,g,b to graphics system dependent pixel value.
TString fWindowName
window name
static const TGGC & GetWhiteGC()
Get white graphics context.
virtual void SetCleanup(Int_t mode=kLocalCleanup)
Turn on automatic cleanup of child frames in dtor.
UInt_t fHeight
frame height
static const TGGC * fgBckgndGC
void RemoveInput(UInt_t emask)
Remove events specified in emask from the events the frame should handle.
Pixel_t fBackground
frame background color
TObject * GetObject() const
Encapsulate fonts used in the GUI system.
UInt_t fEditDisabled
flags used for "guibuilding"
TGString * fText
title text
Bool_t Drag(Int_t x_root, Int_t y_root, Atom_t action, Time_t timestamp)
Process drag event.
UInt_t fEventMask
currently active event mask
static Pixel_t fgDefaultSelectedBackground
virtual void SetDragType(Int_t type)
SetDragType.
The base class for composite widgets (menu bars, list boxes, etc.).
const TGWindow * GetRoot() const
Returns current root (i.e.
static const TGGC & GetDefaultGC()
Return default graphics context in use.
virtual const char * GetName() const
Return name of this collection.
virtual const char * ClassName() const
Returns name of class to which the object belongs.
virtual void AddFrame(TGFrame *f, TGLayoutHints *l=0)
Add frame to the composite frame using the specified layout hints.
void GetWMSizeHints(UInt_t &wmin, UInt_t &hmin, UInt_t &wmax, UInt_t &hmax, UInt_t &winc, UInt_t &hinc) const
Long_t fUser[5]
5 longs can be used by client message events NOTE: only [0], [1] and [2] may be used.
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save a transient frame widget as a C++ statement(s) on output stream out.
TGString wraps a TString and adds some graphics routines like drawing, size of string on screen depen...
virtual Bool_t HandleMotion(Event_t *)
virtual void Layout()
Layout the elements of the composite frame.
ULong_t Time_t
Event time.
TString fClassName
WM class name.
void SetWMState(EInitialState state)
Set the initial state of the window. Either kNormalState or kIconicState.
void SetFont(FontH_t v)
Set font.
void SetFrameElement(TGFrameElement *fe)
virtual void ShowFrame(TGFrame *f)
Show sub frame.
UInt_t fMWMValue
MWM decoration hints.
virtual Bool_t HandleColormapChange(Event_t *)
virtual void MoveResize(Int_t x, Int_t y, UInt_t w, UInt_t h)
Move and resize the window.
const TGWindow * fParent
Parent window.
virtual Bool_t HandleKey(Event_t *event)
Handle keyboard events.
void SetWMPosition(Int_t x, Int_t y)
Give the window manager a window position hint.
virtual ~TGCompositeFrame()
Delete a composite frame.
const TGFrame * GetFrame() const
void Emit(const char *signal, const T &arg)
Activate signal with single parameter.
TGFrameElement * GetFrameElement() const
int main(int argc, char *argv[])
This class creates a file selection dialog.
virtual void StartGuiBuilding(Bool_t on=kTRUE)
Go into GUI building mode.
virtual Bool_t HandleClientMessage(Event_t *event)
Handle client messages sent to this frame.
Attributes that can be used when creating or changing a window.
char * fFilename
selected file name
virtual void DoRedraw()
Redraw the frame.
const char * GetWindowName() const