|
ROOT
Reference Guide |
|
Go to the documentation of this file.
120 "ROOT macros",
"*.C",
147 :
TGWindow(p, 0, 0, w,
h, 0, 0, 0, 0, 0, options)
228 gVirtualX->GetWindowAttributes(
id, attributes);
449 switch (event->
fType) {
488 fgDbx =
event->fXRoot;
489 fgDby =
event->fYRoot;
490 fgDbw =
event->fWindow;
512 fgDbx =
event->fXRoot;
513 fgDby =
event->fYRoot;
514 fgDbw =
event->fWindow;
639 event.fWindow = w->
GetId();
640 event.fUser[0] = msg;
641 event.fUser[1] = parm1;
642 event.fUser[2] = parm2;
787 std::cout <<
" x=" <<
fX <<
" y=" <<
fY;
788 std::cout <<
" w=" <<
fWidth <<
" h=" <<
fHeight << std::endl;
991 Error(
"SetLayoutManager",
"no layout manager specified");
1081 if (!
fList)
return 0;
1141 f->SetFrameElement(0);
1297 if (!
fList)
return this;
1320 if (child ==
this) {
1334 if (el->
fFrame == child) {
1526 main->SaveSource(fname.
Data(),
"");
1531 }
else if (fname.
EndsWith(
".png")) {
1533 }
else if (fname.
EndsWith(
".jpg")) {
1535 }
else if (fname.
EndsWith(
".tiff")) {
1537 }
else if (fname.
EndsWith(
".xpm")) {
1556 repeat_save = (retval ==
kMBRetry);
1559 }
while (repeat_save);
1576 if (
m->fKeyCode == event->
fCode) {
1586 gVirtualX->LookupString(event, str,
sizeof(str), keysym);
1588 if ((keysym & ~0x20) ==
kKey_S) {
1605 list =
main->GetBindList();
1627 if (
m->fKeyCode == (
UInt_t) keycode) {
1694 Emit(
"CloseWindow()");
1713 event.fWindow =
GetId();
1807 Warning(
"SetIconPixmap",
"Failed to set window icon from xpm array.");
1821 gVirtualX->SetClassHints(
fId, (
char *)className, (
char *)resourceName);
1877 gVirtualX->SetWMSizeHints(
fId, wmin, hmin, wmax, hmax, winc, hinc);
1966 x,
y, ax, ay, wdummy);
1967 if (!
gVirtualX->InheritsFrom(
"TGWin32")) {
1970 else if (ax +
fWidth + 10 > dw)
1975 else if (ay +
fHeight + 50 > dh)
2048 int max_ascent, max_descent;
2067 int max_ascent, max_descent;
2187 Int_t x,
y,
l, t,
r,
b, gl,
gr,
sep, max_ascent, max_descent;
2193 t = (max_ascent + max_descent + 2) >> 1;
2219 gr = gl + tw + (
sep << 1);
2270 Warning(
"SetTitle",
"title cannot be 0, try \"\"");
2286 Error(
"SetTitle",
"title cannot be 0, try \"\"");
2351 if ( event->
fY > 0 &&
2352 event->
fY <= (
Int_t) this->GetHeight() ) {
2383 if ( event->
fY > 0 &&
2384 event->
fY <= (
Int_t) this->GetHeight() ) {
2410 if ( event->
fY > 0 &&
2411 event->
fY <= (
Int_t) this->GetHeight() ) {
2447 out <<
" ULong_t ucolor; // will reflect user color changes" << std::endl;
2450 if (option && !strcmp(option,
"slider"))
2456 out <<
" gClient->GetColorByName(" << quote << ucolorname << quote
2457 <<
",ucolor);" << std::endl;
2470 options =
"kChildFrame";
2473 if (options.
Length() == 0) options =
"kMainFrame";
2474 else options +=
" | kMainFrame";
2477 if (options.
Length() == 0) options =
"kVerticalFrame";
2478 else options +=
" | kVerticalFrame";
2481 if (options.
Length() == 0) options =
"kHorizontalFrame";
2482 else options +=
" | kHorizontalFrame";
2485 if (options.
Length() == 0) options =
"kSunkenFrame";
2486 else options +=
" | kSunkenFrame";
2489 if (options.
Length() == 0) options =
"kRaisedFrame";
2490 else options +=
" | kRaisedFrame";
2493 if (options.
Length() == 0) options =
"kDoubleBorder";
2494 else options +=
" | kDoubleBorder";
2497 if (options.
Length() == 0) options =
"kFitWidth";
2498 else options +=
" | kFitWidth";
2501 if (options.
Length() == 0) options =
"kFixedWidth";
2502 else options +=
" | kFixedWidth";
2505 if (options.
Length() == 0) options =
"kFitHeight";
2506 else options +=
" | kFitHeight";
2509 if (options.
Length() == 0) options =
"kFixedHeight";
2510 else options +=
" | kFixedHeight";
2513 if (options.
Length() == 0) options =
"kOwnBackground";
2514 else options +=
" | kOwnBackground";
2517 if (options.
Length() == 0) options =
"kTransientFrame";
2518 else options +=
" | kTransientFrame";
2521 if (options.
Length() == 0) options =
"kTempFrame";
2522 else options +=
" | kTempFrame";
2537 if (hints.
Length() == 0) hints =
"kMWMDecorAll";
2538 else hints +=
" | kMWMDecorAll";
2541 if (hints.
Length() == 0) hints =
"kMWMDecorBorder";
2542 else hints +=
" | kMWMDecorBorder";
2545 if (hints.
Length() == 0) hints =
"kMWMDecorResizeH";
2546 else hints +=
" | kMWMDecorResizeH";
2549 if (hints.
Length() == 0) hints =
"kMWMDecorTitle";
2550 else hints +=
" | kMWMDecorTitle";
2553 if (hints.
Length() == 0) hints =
"kMWMDecorMenu";
2554 else hints +=
" | kMWMDecorMenu";
2557 if (hints.
Length() == 0) hints =
"kMWMDecorMinimize";
2558 else hints +=
" | kMWMDecorMinimize";
2561 if (hints.
Length() == 0) hints =
"kMWMDecorMaximize";
2562 else hints +=
" | kMWMDecorMaximize";
2578 if (hints.
Length() == 0) hints =
"kMWMFuncAll";
2579 else hints +=
" | kMWMFuncAll";
2582 if (hints.
Length() == 0) hints =
"kMWMFuncResize";
2583 else hints +=
" | kMWMFuncResize";
2586 if (hints.
Length() == 0) hints =
"kMWMFuncMove";
2587 else hints +=
" | kMWMFuncMove";
2590 if (hints.
Length() == 0) hints =
"kMWMFuncMinimize";
2591 else hints +=
" | kMWMFuncMinimize";
2594 if (hints.
Length() == 0) hints =
"kMWMFuncMaximize";
2595 else hints +=
" | kMWMFuncMaximize";
2598 if (hints.
Length() == 0) hints =
"kMWMFuncClose";
2599 else hints +=
" | kMWMFuncClose";
2612 if (
fMWMInput == 0) hints =
"kMWMInputModeless";
2614 if (
fMWMInput == 1) hints =
"kMWMInputPrimaryApplicationModal";
2616 if (
fMWMInput == 2) hints =
"kMWMInputSystemModal";
2618 if (
fMWMInput == 3) hints =
"kMWMInputFullApplicationModal";
2629 out <<
" " <<
GetName() <<
"->SetLayoutBroken(kTRUE);" << std::endl;
2641 TString signal_name, slot_name;
2668 out <<
");"<< std::endl;
2673 out <<
");" << std::endl;
2682 if (vsplit->
GetLeft()) out <<
",kTRUE);" << std::endl;
2683 else out <<
",kFALSE);"<< std::endl;
2688 if (hsplit->
GetAbove()) out <<
",kTRUE);" << std::endl;
2689 else out <<
",kFALSE);"<< std::endl;
2699 if (!signalslist)
continue;
2704 signal_name = connlist->
GetName();
2709 slot_name.
Remove(eq, rb-eq);
2710 out <<
" " << el->
fFrame->
GetName() <<
"->Connect(" << quote << signal_name
2711 << quote <<
", 0, 0, " << quote << slot_name << quote <<
");" << std::endl;
2713 TList *lsl = (
TList *)
gROOT->GetListOfSpecials()->FindObject(
"ListOfSlots");
2737 out << std::endl <<
" // composite frame" << std::endl;
2738 out <<
" TGCompositeFrame *";
2744 out <<
");" << std::endl;
2751 if (option && strstr(option,
"keep_names"))
2752 out <<
" " <<
GetName() <<
"->SetName(\"" <<
GetName() <<
"\");" << std::endl;
2765 out <<
" " <<
GetName() <<
"->SetLayoutManager(";
2767 out <<
");"<< std::endl;
2792 while ((
c2 = (
TClass *)nextc2())) {
2793 if (
c1==
c2)
continue;
2795 c3 =
c2->GetBaseClass(
c1);
2806 ilist->
SetName(
"ListOfIncludes");
2807 gROOT->GetListOfSpecials()->Add(ilist);
2812 while ((
c2 = (
TClass *)nextdo())) {
2818 iname =
c2->GetDeclFileName();
2819 if (iname[0] && strstr(iname,
".h")) {
2820 const char *lastsl = strrchr(iname,
'/');
2821 if (lastsl) iname = lastsl + 1;
2822 char *tname =
new char[strlen(iname)+1];
2824 while (*iname !=
'.') {
2836 if (strstr(tname,
"TRootCanvas")) {
2852 TString ff = filename && strlen(filename) ? filename :
"Rootappl.C";
2856 Int_t lenfname = strlen(fname);
2857 char *sname =
new char[lenfname+1];
2860 while ((*fname !=
'.') && (i < lenfname)) {
2868 out.open(ff.
Data(), std::ios::out);
2870 Error(
"SaveSource",
"cannot open file: %s", ff.
Data());
2877 ilist = (
TList *)
gROOT->GetListOfSpecials()->FindObject(
"ListOfIncludes");
2886 out <<
"// Mainframe macro generated from application: "<<
gApplication->
Argv(0) << std::endl;
2887 out <<
"// By ROOT version "<<
gROOT->GetVersion() <<
" on "<<t.
AsSQLString()<< std::endl;
2892 out <<
"#ifndef ROOT_" << inc->
GetString() << std::endl;
2893 out <<
"#include " << quote << inc->
GetString() <<
".h" << quote << std::endl;
2894 out <<
"#endif" << std::endl;
2895 if (strstr(inc->
GetString(),
"TRootEmbeddedCanvas")) {
2896 out <<
"#ifndef ROOT_TCanvas" << std::endl;
2897 out <<
"#include " << quote <<
"TCanvas.h" << quote << std::endl;
2898 out <<
"#endif" << std::endl;
2901 out << std::endl <<
"#include " << quote <<
"Riostream.h" << quote << std::endl;
2903 gROOT->GetListOfSpecials()->Remove(ilist);
2910 out <<
"void " << sname <<
"()" << std::endl;
2911 out <<
"{"<< std::endl;
2918 lSlots->
SetName(
"ListOfSlots");
2919 gROOT->GetListOfSpecials()->Add(lSlots);
2925 << quote <<
"," << quote <<
fResourceName << quote <<
");" << std::endl;
2930 out <<
" " <<
GetName() <<
"->SetMWMHints(";
2957 out <<
" " <<
GetName()<<
"->MapSubwindows();" << std::endl;
2961 while ((fhidden = (
TGFrame*)nexth())) {
2962 out <<
" " <<fhidden->
GetName()<<
"->UnmapWindow();" << std::endl;
2976 out <<
" " <<
GetName()<<
"->Resize("<<
GetName()<<
"->GetDefaultSize());" << std::endl;
2980 out <<
" " <<
GetName()<<
"->MapWindow();" <<std::endl;
2983 if ((
fWMX != -1) || (
fWMY != -1)) {
2990 out <<
"} " << std::endl;
2993 TList *sl = (
TList *)
gROOT->GetListOfSpecials()->FindObject(
"ListOfSlots");
3008 if (rb - lb > 1 && eq == -1) {
3012 out <<
"void " <<
s << std::endl;
3013 out <<
"{" << std::endl;
3016 out <<
" std::cout << " << quote <<
"Slot " <<
s << quote
3017 <<
" <<" << p <<
" << " << quote <<
")" << quote
3018 <<
" << std::endl; " << std::endl;
3021 s.Remove(eq, rb-eq);
3022 out <<
"void " <<
s << std::endl;
3023 out <<
"{" << std::endl;
3024 out <<
" std::cout << " << quote <<
"Slot " <<
s
3025 << quote <<
" << std::endl; " << std::endl;
3027 out <<
"void " << slobj->
GetString() << std::endl;
3028 out <<
"{" << std::endl;
3029 out <<
" std::cout << " << quote <<
"Slot " << slobj->
GetString()
3030 << quote <<
" << std::endl; " << std::endl;
3033 out <<
"}" << std::endl;
3035 gROOT->GetListOfSpecials()->Remove(sl);
3065 out << std::endl <<
" // main frame" << std::endl;
3066 out <<
" TGMainFrame *";
3067 out <<
GetName() <<
" = new TGMainFrame(gClient->GetRoot(),10,10,"
3069 if (option && strstr(option,
"keep_names"))
3070 out <<
" " <<
GetName() <<
"->SetName(\"" <<
GetName() <<
"\");" << std::endl;
3083 out <<
" " <<
GetName() <<
"->SetLayoutManager(";
3085 out <<
");"<< std::endl;
3092 << quote <<
");" << std::endl;
3095 out <<
" "<<
GetName()<<
"->SetIconName("<<quote<<
GetIconName()<<quote<<
");"<<std::endl;
3099 << quote <<
");" << std::endl;
3110 out << std::endl <<
" // horizontal frame" << std::endl;
3111 out <<
" TGHorizontalFrame *";
3117 out <<
");" << std::endl;
3124 if (option && strstr(option,
"keep_names"))
3125 out <<
" " <<
GetName() <<
"->SetName(\"" <<
GetName() <<
"\");" << std::endl;
3138 out <<
" " <<
GetName() <<
"->SetLayoutManager(";
3140 out <<
");"<< std::endl;
3153 out << std::endl <<
" // vertical frame" << std::endl;
3154 out <<
" TGVerticalFrame *";
3160 out <<
");" << std::endl;
3167 if (option && strstr(option,
"keep_names"))
3168 out <<
" " <<
GetName() <<
"->SetName(\"" <<
GetName() <<
"\");" << std::endl;
3181 out <<
" " <<
GetName() <<
"->SetLayoutManager(";
3183 out <<
");"<< std::endl;
3196 out <<
" TGFrame *";
3202 out <<
");" << std::endl;
3209 if (option && strstr(option,
"keep_names"))
3210 out <<
" " <<
GetName() <<
"->SetName(\"" <<
GetName() <<
"\");" << std::endl;
3225 parFont.
Form(
"%s::GetDefaultFontStruct()",IsA()->
GetName());
3228 parGC.
Form(
"%s::GetDefaultGC()()",IsA()->
GetName());
3234 parFont.
Form(
"ufont->GetFontStruct()");
3240 parGC.
Form(
"uGC->GetGC()");
3246 out << std::endl <<
" // " << quote <<
GetTitle() << quote <<
" group frame" << std::endl;
3247 out <<
" TGGroupFrame *";
3249 <<
"," << quote <<
GetTitle() << quote;
3255 out <<
");" << std::endl;
3268 if (option && strstr(option,
"keep_names"))
3269 out <<
" " <<
GetName() <<
"->SetName(\"" <<
GetName() <<
"\");" << std::endl;
3272 out <<
" " <<
GetName() <<
"->SetTitlePos(";
3274 out <<
"TGGroupFrame::kCenter);" << std::endl;
3276 out <<
"TGGroupFrame::kRight);" << std::endl;
3281 out <<
" " <<
GetName() <<
"->SetLayoutManager(";
3285 out <<
");"<< std::endl;
3311 while ((
c2 = (
TClass *)nextc2())) {
3312 if (
c1==
c2)
continue;
3314 c3 =
c2->GetBaseClass(
c1);
3325 ilist->
SetName(
"ListOfIncludes");
3326 gROOT->GetListOfSpecials()->Add(ilist);
3331 while ((
c2 = (
TClass *)nextdo())) {
3337 iname =
c2->GetDeclFileName();
3338 if (iname[0] && strstr(iname,
".h")) {
3339 const char *lastsl = strrchr(iname,
'/');
3340 if (lastsl) iname = lastsl + 1;
3341 char *tname =
new char[strlen(iname)+1];
3343 while (*iname !=
'.') {
3363 TString ff = filename && strlen(filename) ? filename :
"Rootdlog.C";
3367 Int_t lenfname = strlen(fname);
3368 char *sname =
new char[lenfname+1];
3371 while ((*fname !=
'.') && (i < lenfname)) {
3379 out.open(ff.
Data(), std::ios::out);
3381 Error(
"SaveSource",
"cannot open file: %s", ff.
Data());
3388 ilist = (
TList *)
gROOT->GetListOfSpecials()->FindObject(
"ListOfIncludes");
3397 out <<
"// Dialog macro generated from application: "<<
gApplication->
Argv(0) << std::endl;
3398 out <<
"// By ROOT version "<<
gROOT->GetVersion() <<
" on "<<t.
AsSQLString()<< std::endl;
3401 out <<
"#if !defined( __CINT__) || defined (__MAKECINT__)" << std::endl << std::endl;
3405 out <<
"#ifndef ROOT_"<< inc->
GetString() << std::endl;
3406 out <<
"#include "<< quote << inc->
GetString() <<
".h"<< quote << std::endl;
3407 out <<
"#endif" << std::endl;
3408 if (strstr(inc->
GetString(),
"TRootEmbeddedCanvas")) {
3409 out <<
"#ifndef ROOT_TCanvas"<< std::endl;
3410 out <<
"#include "<< quote <<
"TCanvas.h"<< quote << std::endl;
3411 out <<
"#endif" << std::endl;
3414 out << std::endl <<
"#include " << quote <<
"Riostream.h" << quote << std::endl;
3415 out << std::endl <<
"#endif" << std::endl;
3417 gROOT->GetListOfSpecials()->Remove(ilist);
3424 out <<
"void " << sname <<
"()" << std::endl;
3428 out <<
"{"<< std::endl;
3434 lSlots->
SetName(
"ListOfSlots");
3435 gROOT->GetListOfSpecials()->Add(lSlots);
3447 out <<
" " <<
GetName() <<
"->SetMWMHints(";
3456 if ((
fWMX != -1) || (
fWMY != -1)) {
3457 out <<
" "<<
GetName()<<
"->SetWMPosition("<<
fWMX<<
","<<
fWMY<<
");"<<std::endl;
3476 if ((
fWMX != -1) || (
fWMY != -1)) {
3480 out <<
" " <<
GetName()<<
"->MapSubwindows();" << std::endl;
3484 while ((fhidden = (
TGFrame*)nexth())) {
3485 out <<
" " <<fhidden->
GetName()<<
"->UnmapWindow();" << std::endl;
3498 out <<
" " <<
GetName()<<
"->Resize("<<
GetName()<<
"->GetDefaultSize());" << std::endl;
3502 out <<
" " <<
GetName()<<
"->MapWindow();" <<std::endl;
3503 if (!usexy) out <<
" " <<
GetName()<<
"->Resize();" << std::endl;
3504 out <<
"} " << std::endl;
3507 TList *sl = (
TList *)
gROOT->GetListOfSpecials()->FindObject(
"ListOfSlots");
3522 if (rb - lb > 1 && eq == -1) {
3526 out <<
"void " <<
s << std::endl;
3527 out <<
"{" << std::endl;
3530 out <<
" std::cout << " << quote <<
"Slot " <<
s << quote
3531 <<
" <<" << p <<
" << " << quote <<
")" << quote
3532 <<
" << std::endl; " << std::endl;
3535 s.Remove(eq, rb-eq);
3536 out <<
"void " <<
s << std::endl;
3537 out <<
"{" << std::endl;
3538 out <<
" std::cout << " << quote <<
"Slot " <<
s
3539 << quote <<
" << std::endl; " << std::endl;
3541 out <<
"void " << slobj->
GetString() << std::endl;
3542 out <<
"{" << std::endl;
3543 out <<
" std::cout << " << quote <<
"Slot " << slobj->
GetString()
3544 << quote <<
" << std::endl; " << std::endl;
3547 out <<
"}" << std::endl;
3549 gROOT->GetListOfSpecials()->Remove(sl);
3573 out << std::endl <<
" // transient frame" << std::endl;
3574 out <<
" TGTransientFrame *";
3575 out <<
GetName()<<
" = new TGTransientFrame(gClient->GetRoot(),0"
3578 if (option && strstr(option,
"keep_names"))
3579 out <<
" " <<
GetName() <<
"->SetName(\"" <<
GetName() <<
"\");" << std::endl;
3592 out <<
" " <<
GetName() <<
"->SetLayoutManager(";
3594 out <<
");"<< std::endl;
3601 << quote <<
");" << std::endl;
3604 out <<
" "<<
GetName()<<
"->SetIconName("<<quote<<
GetIconName()<<quote<<
");"<<std::endl;
3608 << 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
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.
virtual Bool_t HandleFocusChange(Event_t *)
UInt_t GetDisplayWidth() const
Get display width.
Handle_t Pixmap_t
Pixmap handle.
R__ALWAYS_INLINE Bool_t TestBit(UInt_t f) const
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 tranzient frame widget in a C++ macro file.
virtual void ChangeSubframesBackground(Pixel_t back)
Change background color for this frame and all subframes.
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)
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.
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
Returns MWM function hints as a string - used in SavePrimitive().
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
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.
virtual Bool_t HandleSelection(Event_t *)
Graphics context structure.
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.
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.
EInitialState fWMInitState
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.
static Pixel_t fgWhitePixel
virtual ~TGFrame()
Destructor.
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.
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...
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.
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)
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="")
Auxilary protected method used to save subframes.
TList * GetListOfSignals() const
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)
void SetRoot(TGWindow *root=nullptr)
Sets the current root (i.e.
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.
Handle_t fHandle
general resource handle (used for atoms or windows)
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 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
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.
virtual void DoRedraw()
Redraw the group frame.
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
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 main(int argc, char **argv)
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.
void SaveUserColor(std::ostream &out, Option_t *)
Save a user color in a C++ macro file - used in SavePrimitive().
TGMainFrame(const TGMainFrame &)=delete
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.
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
virtual void WriteImage(const char *, EImageFileTypes=TImage::kUnknown)
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save a primitive 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
Returns MWM input mode hints as a string - used in SavePrimitive().
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.
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.
const TGWindow * GetParent() const
R__EXTERN Int_t gErrorIgnoreLevel
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
Returns MWM decoration hints as a string - used in SavePrimitive().
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.
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
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.
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
static Pixel_t GetDefaultSelectedBackground()
Get default selected frame background.
TGGroupFrame(const TGGroupFrame &)=delete
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
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.
static const TGGC & GetWhiteGC()
Get white graphics context.
virtual void SetCleanup(Int_t mode=kLocalCleanup)
Turn on automatic cleanup of child frames in dtor.
static const TGGC * fgBckgndGC
void RemoveInput(UInt_t emask)
Remove events specified in emask from the events the frame should handle.
TObject * GetObject() const
Bool_t Drag(Int_t x_root, Int_t y_root, Atom_t action, Time_t timestamp)
Process drag event.
static Pixel_t fgDefaultSelectedBackground
virtual void SetDragType(Int_t type)
SetDragType.
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.
virtual Bool_t HandleMotion(Event_t *)
virtual void Layout()
Layout the elements of the composite frame.
ULong_t Time_t
Event time.
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.
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.
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
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.
virtual void DoRedraw()
Redraw the frame.
const char * GetWindowName() const