135 "ROOT macros",
"*.C",
155 :
TGWindow(
p, 0, 0,
w,
h, 0, 0, 0, 0, 0, options)
186 wattr.fBackgroundPixel = back;
236 gVirtualX->GetWindowAttributes(
id, attributes);
457 switch (event->
fType) {
496 fgDbx =
event->fXRoot;
497 fgDby =
event->fYRoot;
498 fgDbw =
event->fWindow;
520 fgDbx =
event->fXRoot;
521 fgDby =
event->fYRoot;
522 fgDbw =
event->fWindow;
647 event.fWindow =
w->GetId();
648 event.fUser[0] =
msg;
649 event.fUser[1] =
parm1;
650 event.fUser[2] =
parm2;
795 std::cout <<
" x=" <<
fX <<
" y=" <<
fY;
796 std::cout <<
" w=" <<
fWidth <<
" h=" <<
fHeight << std::endl;
969 el->fFrame->SetFrameElement(0);
971 el->fFrame->DestroyWindow();
976 (
el->fLayout->References() > 0)) {
977 el->fLayout->RemoveReference();
978 if (!
el->fLayout->References()) {
979 el->fLayout->fFE = 0;
999 Error(
"SetLayoutManager",
"no layout manager specified");
1027 el->fFrame->SetEditDisabled(set);
1089 if (!
fList)
return 0;
1095 if (
el->fFrame ==
f)
1133 if (
el->fLayout)
el->fLayout->RemoveReference();
1148 if (
el->fLayout)
el->fLayout->RemoveReference();
1149 f->SetFrameElement(0);
1173 el->fFrame->MapSubwindows();
1189 el->fFrame->UnmapWindow();
1203 el->fFrame->MapWindow();
1274 el->fFrame->Print(
tab.Data());
1289 el->fFrame->SetBackgroundColor(back);
1305 if (!
fList)
return this;
1314 f =
el->fFrame->GetFrameFromPoint(
x -
el->fFrame->GetX(),
1315 y -
el->fFrame->GetY());
1328 if (
child ==
this) {
1343 fx =
x -
el->fFrame->GetX();
1344 fy =
y -
el->fFrame->GetY();
1346 }
else if (
el->fFrame->IsComposite()) {
1348 x -
el->fFrame->GetX(),
y -
el->fFrame->GetY(),
fx,
fy))
1562 if (
fname.EndsWith(
".C")) {
1567 if (
fname.EndsWith(
"gif")) {
1569 }
else if (
fname.EndsWith(
".png")) {
1571 }
else if (
fname.EndsWith(
".jpg")) {
1573 }
else if (
fname.EndsWith(
".tiff")) {
1575 }
else if (
fname.EndsWith(
".xpm")) {
1577 }
else if (
fname.EndsWith(
".bmp")) {
1590 Error(
"SaveFrameAsCodeOrImage",
"File cannot be saved with this extension");
1610 if (
m->fKeyCode == event->
fCode) {
1612 if (
w->HandleKey(event))
return kTRUE;
1639 list =
main->GetBindList();
1728 Emit(
"CloseWindow()");
1747 event.fWindow =
GetId();
1843 Warning(
"SetIconPixmap",
"Failed to set window icon from xpm array.");
2003 if (!
gVirtualX->InheritsFrom(
"TGWin32")) {
2162 gc->SetForeground(color);
2223 Int_t x,
y,
l, t,
r,
b,
gl,
gr, sep,
max_ascent,
max_descent;
2255 gr =
gl +
tw + (sep << 1);
2306 Warning(
"SetTitle",
"title cannot be 0, try \"\"");
2322 Error(
"SetTitle",
"title cannot be 0, try \"\"");
2387 if ( event->
fY > 0 &&
2419 if ( event->
fY > 0 &&
2446 if ( event->
fY > 0 &&
2478 out <<
"\n ULong_t ucolor; // will reflect user color changes\n";
2487 out <<
" gClient->GetColorByName(\"" <<
ucolorname <<
"\", ucolor);\n";
2520 if (str.Length() > 0)
2527 str =
"kChildFrame";
2555 if (
hints.Length() == 0)
hints =
"kMWMDecorAll";
2556 else hints +=
" | kMWMDecorAll";
2559 if (
hints.Length() == 0)
hints =
"kMWMDecorBorder";
2560 else hints +=
" | kMWMDecorBorder";
2563 if (
hints.Length() == 0)
hints =
"kMWMDecorResizeH";
2564 else hints +=
" | kMWMDecorResizeH";
2567 if (
hints.Length() == 0)
hints =
"kMWMDecorTitle";
2568 else hints +=
" | kMWMDecorTitle";
2571 if (
hints.Length() == 0)
hints =
"kMWMDecorMenu";
2572 else hints +=
" | kMWMDecorMenu";
2575 if (
hints.Length() == 0)
hints =
"kMWMDecorMinimize";
2576 else hints +=
" | kMWMDecorMinimize";
2579 if (
hints.Length() == 0)
hints =
"kMWMDecorMaximize";
2580 else hints +=
" | kMWMDecorMaximize";
2596 if (
hints.Length() == 0)
hints =
"kMWMFuncAll";
2597 else hints +=
" | kMWMFuncAll";
2600 if (
hints.Length() == 0)
hints =
"kMWMFuncResize";
2601 else hints +=
" | kMWMFuncResize";
2604 if (
hints.Length() == 0)
hints =
"kMWMFuncMove";
2605 else hints +=
" | kMWMFuncMove";
2608 if (
hints.Length() == 0)
hints =
"kMWMFuncMinimize";
2609 else hints +=
" | kMWMFuncMinimize";
2612 if (
hints.Length() == 0)
hints =
"kMWMFuncMaximize";
2613 else hints +=
" | kMWMFuncMaximize";
2616 if (
hints.Length() == 0)
hints =
"kMWMFuncClose";
2617 else hints +=
" | kMWMFuncClose";
2647 out <<
" " <<
GetName() <<
"->SetLayoutBroken(kTRUE);\n";
2662 if ((!(
el->fState &
kIsVisible)) && (
el->fFrame->GetParent() !=
this))
2667 if (
el->fFrame->InheritsFrom(
"TGVSplitter")) {
2671 }
else if (
el->fFrame->InheritsFrom(
"TGHSplitter")) {
2676 el->fFrame->SavePrimitive(out,
option);
2677 out <<
" " <<
GetName() <<
"->AddFrame(" <<
el->fFrame->GetName();
2678 el->fLayout->SavePrimitive(out,
option);
2681 out <<
" " <<
el->fFrame->GetName() <<
"->MoveResize(" <<
el->fFrame->GetX() <<
"," <<
el->fFrame->GetY()
2682 <<
"," <<
el->fFrame->GetWidth() <<
"," <<
el->fFrame->GetHeight() <<
");\n";
2690 out <<
" " <<
vsplit->GetName() <<
"->SetFrame(" <<
vsplit->GetFrame()->GetName();
2692 out <<
",kTRUE);\n";
2694 out <<
",kFALSE);\n";
2698 out <<
" " <<
hsplit->GetName() <<
"->SetFrame(" <<
hsplit->GetFrame()->GetName();
2700 out <<
",kTRUE);\n";
2702 out <<
",kFALSE);\n";
2724 if ((
signal_name ==
"ColorSelected(unsigned long)") &&
el->fFrame->InheritsFrom(
"TGColorSelect"))
2755 out <<
"\n // composite frame\n";
2756 out <<
" TGCompositeFrame *" <<
GetName() <<
" = new TGCompositeFrame(" <<
fParent->GetName() <<
"," <<
GetWidth()
2760 out <<
" " <<
GetName() <<
"->SetName(\"" <<
GetName() <<
"\");\n";
2768 out <<
" " <<
GetName() <<
"->SetLayoutManager(";
2788 gROOT->ResetClassSaved();
2796 if (
c1==
c2)
continue;
2798 c3 =
c2->GetBaseClass(
c1);
2809 ilist->SetName(
"ListOfIncludes");
2821 iname =
c2->GetDeclFileName();
2827 while (*
iname !=
'.') {
2840 if (!
ilist->FindObject(
"TGDockableFrame"))
2842 if (!
ilist->FindObject(
"TG3DLine"))
2871 out.open(
ff.Data(), std::ios::out);
2873 Error(
"SaveSource",
"cannot open file: %s",
ff.Data());
2879 ilist = (
TList *)
gROOT->GetListOfSpecials()->FindObject(
"ListOfIncludes");
2888 out <<
"// Mainframe macro generated from application: "<<
gApplication->
Argv(0) << std::endl;
2889 out <<
"// By ROOT version "<<
gROOT->GetVersion() <<
" on "<<t.
AsSQLString()<< std::endl;
2894 out <<
"#include \"" <<
inc->GetString() <<
".h\"\n";
2895 if (
strstr(
inc->GetString(),
"TRootEmbeddedCanvas"))
2896 out <<
"#include \"TCanvas.h\"\n";
2898 out <<
"\n#include \"Riostream.h\"\n\n";
2906 out <<
"void " <<
sname <<
"()" << std::endl;
2907 out <<
"{"<< std::endl;
2914 lSlots->SetName(
"ListOfSlots");
2926 out <<
" " <<
GetName() <<
"->SetMWMHints(";
2953 out <<
" " <<
GetName()<<
"->MapSubwindows();" << std::endl;
2957 out <<
" " <<
fhidden->GetName() <<
"->UnmapWindow();" << std::endl;
2966 if (
lm->InheritsFrom(
"TGXYLayout"))
2970 out <<
" " <<
GetName()<<
"->Resize("<<
GetName()<<
"->GetDefaultSize());" << std::endl;
2974 out <<
" " <<
GetName()<<
"->MapWindow();" <<std::endl;
2977 if ((
fWMX != -1) || (
fWMY != -1)) {
2984 out <<
"} " << std::endl;
3002 if (
rb -
lb > 1 &&
eq == -1) {
3006 out <<
"void " << s << std::endl;
3007 out <<
"{" << std::endl;
3008 s =
slobj->GetString();
3010 out <<
" std::cout << " <<
quote <<
"Slot " << s <<
quote
3012 <<
" << std::endl; " << std::endl;
3016 out <<
"void " << s << std::endl;
3017 out <<
"{" << std::endl;
3018 out <<
" std::cout << " <<
quote <<
"Slot " << s
3019 <<
quote <<
" << std::endl; " << std::endl;
3021 out <<
"void " <<
slobj->GetString() << std::endl;
3022 out <<
"{" << std::endl;
3023 out <<
" std::cout << " <<
quote <<
"Slot " <<
slobj->GetString()
3024 <<
quote <<
" << std::endl; " << std::endl;
3027 out <<
"}" << std::endl;
3029 gROOT->GetListOfSpecials()->Remove(
sl);
3039 gROOT->ResetClassSaved();
3054 out <<
"\n // main frame\n";
3055 out <<
" TGMainFrame *" <<
GetName() <<
" = new TGMainFrame(gClient->GetRoot(), 5, 5, "
3058 out <<
" " <<
GetName() <<
"->SetName(\"" <<
GetName() <<
"\");" << std::endl;
3066 out <<
" " <<
GetName() <<
"->SetLayoutManager(";
3081 out <<
" " <<
GetName() <<
"->MapSubwindows();\n";
3083 out <<
" " <<
GetName() <<
"->MapWindow();\n";
3094 out <<
"\n // horizontal frame\n";
3095 out <<
" TGHorizontalFrame *" <<
GetName() <<
" = new TGHorizontalFrame(" <<
fParent->GetName() <<
","
3099 out <<
" " <<
GetName() <<
"->SetName(\"" <<
GetName() <<
"\");\n";
3107 out <<
" " <<
GetName() <<
"->SetLayoutManager(";
3123 out <<
"\n // vertical frame\n";
3124 out <<
" TGVerticalFrame *" <<
GetName() <<
" = new TGVerticalFrame(" <<
fParent->GetName() <<
"," <<
GetWidth()
3128 out <<
" " <<
GetName() <<
"->SetName(\"" <<
GetName() <<
"\");\n";
3136 out <<
" " <<
GetName() <<
"->SetLayoutManager(";
3152 out <<
" TGFrame *" <<
GetName() <<
" = new TGFrame("<<
fParent->GetName()
3156 out <<
" " <<
GetName() <<
"->SetName(\"" <<
GetName() <<
"\");\n";
3178 parFont.Form(
"ufont->GetFontStruct()");
3184 parGC.Form(
"uGC->GetGC()");
3191 out <<
"\n // \"" <<
GetTitle() <<
"\" group frame\n";
3192 out <<
" TGGroupFrame *" <<
GetName() <<
" = new TGGroupFrame(" <<
fParent->GetName() <<
", \""
3213 out <<
" " <<
GetName() <<
"->SetName(\"" <<
GetName() <<
"\");\n";
3216 out <<
" " <<
GetName() <<
"->SetTitlePos(TGGroupFrame::" << (
GetTitlePos() == 0 ?
"kCenter" :
"kRight")
3222 out <<
" " <<
GetName() <<
"->SetLayoutManager(";
3244 gROOT->ResetClassSaved();
3251 if (
c1==
c2)
continue;
3253 c3 =
c2->GetBaseClass(
c1);
3264 ilist->SetName(
"ListOfIncludes");
3276 iname =
c2->GetDeclFileName();
3282 while (*
iname !=
'.') {
3318 out.open(
ff.Data(), std::ios::out);
3320 Error(
"SaveSource",
"cannot open file: %s",
ff.Data());
3326 ilist = (
TList *)
gROOT->GetListOfSpecials()->FindObject(
"ListOfIncludes");
3335 out <<
"// Dialog macro generated from application: "<<
gApplication->
Argv(0) << std::endl;
3336 out <<
"// By ROOT version "<<
gROOT->GetVersion() <<
" on "<<t.
AsSQLString()<< std::endl;
3339 out << std::endl << std::endl;
3343 out <<
"#include \"" <<
inc->GetString() <<
".h\"\n";
3344 if (
strstr(
inc->GetString(),
"TRootEmbeddedCanvas"))
3345 out <<
"#include \"TCanvas.h\"\n";
3347 out <<
"\n#include \"Riostream.h\"\n\n";
3355 out <<
"void " <<
sname <<
"()" << std::endl;
3359 out <<
"{"<< std::endl;
3365 lSlots->SetName(
"ListOfSlots");
3378 out <<
" " <<
GetName() <<
"->SetMWMHints(";
3387 if ((
fWMX != -1) || (
fWMY != -1)) {
3388 out <<
" "<<
GetName()<<
"->SetWMPosition("<<
fWMX<<
","<<
fWMY<<
");"<<std::endl;
3407 if ((
fWMX != -1) || (
fWMY != -1)) {
3411 out <<
" " <<
GetName()<<
"->MapSubwindows();" << std::endl;
3415 out <<
" " <<
fhidden->GetName() <<
"->UnmapWindow();" << std::endl;
3423 if (
lm->InheritsFrom(
"TGXYLayout"))
3427 out <<
" " <<
GetName()<<
"->Resize("<<
GetName()<<
"->GetDefaultSize());" << std::endl;
3431 out <<
" " <<
GetName()<<
"->MapWindow();" <<std::endl;
3432 if (!
usexy) out <<
" " <<
GetName()<<
"->Resize();" << std::endl;
3433 out <<
"} " << std::endl;
3451 if (
rb -
lb > 1 &&
eq == -1) {
3455 out <<
"void " << s << std::endl;
3456 out <<
"{" << std::endl;
3457 s =
slobj->GetString();
3459 out <<
" std::cout << " <<
quote <<
"Slot " << s <<
quote
3461 <<
" << std::endl; " << std::endl;
3465 out <<
"void " << s << std::endl;
3466 out <<
"{" << std::endl;
3467 out <<
" std::cout << " <<
quote <<
"Slot " << s
3468 <<
quote <<
" << std::endl; " << std::endl;
3470 out <<
"void " <<
slobj->GetString() << std::endl;
3471 out <<
"{" << std::endl;
3472 out <<
" std::cout << " <<
quote <<
"Slot " <<
slobj->GetString()
3473 <<
quote <<
" << std::endl; " << std::endl;
3476 out <<
"}" << std::endl;
3478 gROOT->GetListOfSpecials()->Remove(
sl);
3489 gROOT->ResetClassSaved();
3497 out <<
"\n // transient frame\n";
3498 out <<
" TGTransientFrame *" <<
GetName() <<
" = new TGTransientFrame(gClient->GetRoot(),0"
3502 out <<
" " <<
GetName() <<
"->SetName(\"" <<
GetName() <<
"\");\n";
3510 out <<
" " <<
GetName() <<
"->SetLayoutManager(";
Handle_t Pixmap_t
Pixmap handle.
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
Handle_t Window_t
Window handle.
const Mask_t kWABackPixel
const Mask_t kAnyModifier
ULong_t Time_t
Event time.
Handle_t GContext_t
Graphics context handle.
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
const Mask_t kButtonReleaseMask
ULong_t Pixel_t
Pixel value.
ULongptr_t Handle_t
Generic resource handle.
Handle_t FontStruct_t
Pointer to font structure.
size_t size(const MatrixT &matrix)
retrieve the size of a square matrix
bool Bool_t
Boolean (0=false, 1=true) (bool)
int Int_t
Signed integer 4 bytes (int)
long Longptr_t
Integer large enough to hold a pointer (platform-dependent)
unsigned long ULong_t
Unsigned long integer 4 bytes (unsigned long). Size depends on architecture.
long Long_t
Signed long integer 4 bytes (long). Size depends on architecture.
unsigned int UInt_t
Unsigned integer 4 bytes (unsigned int)
float Float_t
Float 4 bytes (float)
constexpr UInt_t kMaxUInt
const char Option_t
Option string (const char)
R__EXTERN TApplication * gApplication
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
void Error(const char *location, const char *msgfmt,...)
Use this function in case an error occurred.
Int_t gErrorIgnoreLevel
errors with level below this value will be ignored. Default is kUnset.
void Warning(const char *location, const char *msgfmt,...)
Use this function in warning situations.
R__EXTERN TGDNDManager * gDNDManager
TList * gListOfHiddenFrames
static const char * gSaveMacroTypes[]
winID h TVirtualViewer3D TVirtualGLPainter p
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void input
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t hmin
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char filename
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t hmax
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t wmin
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t r
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t child
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void on
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void value
Option_t Option_t SetTextFont
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void funcs
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void SetWMPosition
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t winc
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t modifier
Option_t Option_t TPoint TPoint const char mode
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t type
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t wmax
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t hinc
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void gc
R__EXTERN TGuiBuilder * gGuiBuilder
char * Form(const char *fmt,...)
Formats a string in a circular formatting buffer.
R__EXTERN TSystem * gSystem
R__EXTERN TVirtualDragManager * gDragManager
R__EXTERN Atom_t gROOT_MESSAGE
R__EXTERN Atom_t gWM_DELETE_WINDOW
TClass instances represent classes, structs and namespaces in the ROOT type system.
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.).
Bool_t HandleDragDrop(TGFrame *frame, Int_t x, Int_t y, TGLayoutHints *lo) override
Handle drop event.
TGDimension GetDefaultSize() const override
std::cout << fWidth << "x" << fHeight << std::endl;
~TGCompositeFrame() override
Delete a composite frame.
virtual TGFrameElement * FindFrameElement(TGFrame *f) const
Find frame-element holding frame f.
TGLayoutManager * fLayoutManager
layout manager
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 void AddFrame(TGFrame *f, TGLayoutHints *l=nullptr)
Add frame to the composite frame using the specified layout hints.
UInt_t GetDefaultWidth() const override
TGFrame * GetFrameFromPoint(Int_t x, Int_t y) override
Get frame located at specified point.
Int_t GetState(TGFrame *f) const
Get state of sub frame.
void Print(Option_t *option="") const override
Print all frames in this composite frame.
Bool_t HandleDragMotion(TGFrame *) override
Handle drag motion event.
virtual TGLayoutManager * GetLayoutManager() const
Bool_t HandleSelection(Event_t *) override
Bool_t HandleDragEnter(TGFrame *) override
Handle drag enter event.
virtual void Cleanup()
Cleanup and delete all objects contained in this composite frame.
Bool_t HandleDragLeave(TGFrame *) override
Handle drag leave event.
Int_t fMustCleanup
cleanup mode (see EFrameCleanup)
virtual void SavePrimitiveSubframes(std::ostream &out, Option_t *option="")
Auxiliary protected method used to save subframes.
void MapSubwindows() override
Map all sub windows that are part of the composite frame.
UInt_t GetDefaultHeight() const override
TGCompositeFrame(const TGCompositeFrame &)=delete
virtual Bool_t TranslateCoordinates(TGFrame *child, Int_t x, Int_t y, Int_t &fx, Int_t &fy)
Translate coordinates to child frame.
void Layout() override
Layout the elements of the composite frame.
Bool_t HandleMotion(Event_t *) override
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
Bool_t IsEditable() const override
Return kTRUE if frame is being edited.
void SetCleanup(Int_t mode=kLocalCleanup) override
Turn on automatic cleanup of child frames in dtor.
Bool_t IsLayoutBroken() const override
Bool_t HandleButton(Event_t *) override
Bool_t IsArranged(TGFrame *f) const
Get state of sub frame.
virtual void RemoveFrame(TGFrame *f)
Remove frame from composite frame.
void SetEditable(Bool_t on=kTRUE) override
Switch ON/OFF edit mode.
static TGLayoutHints * fgDefaultHints
void SavePrimitive(std::ostream &out, Option_t *option="") override
Save a composite frame widget as a C++ statement(s) on output stream out.
void SetEditDisabled(UInt_t on=1) override
Set edit disable flag for this frame and subframes.
virtual void RemoveAll()
Remove all frames from composite frame.
void ChangeOptions(UInt_t options) override
Change composite frame options. Options is an OR of the EFrameTypes.
virtual void HideFrame(TGFrame *f)
Hide sub frame.
Bool_t IsVisible(TGFrame *f) const
Get state of sub frame.
void SetLayoutBroken(Bool_t on=kTRUE) override
Set broken layout. No Layout method is called.
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.
Encapsulate fonts used in the GUI system.
FontStruct_t GetFontStruct() const
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.
~TGFrame() override
Destructor.
virtual void StartGuiBuilding(Bool_t on=kTRUE)
Go into GUI building mode.
Bool_t IsEditable() const override
void MoveResize(Int_t x, Int_t y, UInt_t w=0, UInt_t h=0) override
Move and/or resize 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 *)
void Resize(UInt_t w=0, UInt_t h=0) override
Resize the frame.
UInt_t fMinHeight
minimal frame height
void RemoveInput(UInt_t emask)
Remove events specified in emask from the events the frame should handle.
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.
void ReparentWindow(const TGWindow *p, Int_t x=0, Int_t y=0) override
Reparent window, make p the new parent and position the window at position (x,y) in new parent.
void SavePrimitive(std::ostream &out, Option_t *option="") override
Save a frame widget as a C++ statement(s) on output stream out.
virtual void DrawBorder()
Draw frame border.
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
void SetBackgroundColor(Pixel_t back) override
Set background color (override from TGWindow base class).
static const TGGC * fgShadowGC
Bool_t HandleEvent(Event_t *event) override
Handle all frame events.
static Pixel_t fgDefaultSelectedBackground
UInt_t fMinWidth
minimal frame width
void DoRedraw() override
Redraw the frame.
void MapWindow() override
map window
virtual Pixel_t GetForeground() const
Return frame foreground color.
static const TGGC & GetHilightGC()
Get highlight color graphics context.
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.
void Move(Int_t x, Int_t y) override
Move frame.
TClass * IsA() const override
static const TGGC * fgBlackGC
static UInt_t fgUserColor
virtual void DeleteWindow()
Delete window.
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 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 Bool_t HandleSelectionRequest(Event_t *)
virtual Bool_t HandleSelection(Event_t *)
void Print(Option_t *option="") const override
Print window id.
virtual Bool_t HandleButton(Event_t *)
virtual Bool_t HandleMotion(Event_t *)
virtual Bool_t HandleClientMessage(Event_t *event)
Handle a client message.
TString SaveCtorArgs(std::ostream &out, UInt_t dflt_options=kChildFrame, Bool_t check_white_pixel=kFALSE)
Return options and custom color as constructor args Used in the SavePrimitive methods,...
virtual Pixel_t GetBackground() const
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)
Bool_t Contains(Int_t x, Int_t y) const
static const TGGC & GetWhiteGC()
Get white graphics context.
static Pixel_t fgWhitePixel
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
static Pixel_t fgDefaultFrameBackground
Encapsulate a graphics context used in the low level graphics.
void SavePrimitive(std::ostream &out, Option_t *option="") override
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.
static const TGGC * fgDefaultGC
TGGroupFrame(const TGGroupFrame &)=delete
Int_t fTitlePos
OPTION={GetMethod="GetTitlePos";SetMethod="SetTitlePos";Items=(-1="Left",0="Center",...
static const TGFont * fgDefaultFont
void DrawBorder() override
Draw border of around the group frame.
TGDimension GetDefaultSize() const override
Returns default size.
TClass * IsA() const override
void DoRedraw() override
Redraw 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.
~TGGroupFrame() override
Delete a group frame.
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
const char * GetTitle() const override
Returns title of object.
virtual void SetTitle(TGString *title)
Set or change title of the group frame.
A composite frame that layout their children in horizontal way.
void SavePrimitive(std::ostream &out, Option_t *option="") override
Save a horizontal frame widget as a C++ statement(s) on output stream out.
This class describes layout hints used by the layout classes.
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.
UInt_t fWMHeightInc
WM height increments.
Bool_t HandleMotion(Event_t *event) override
Handle mouse motion events.
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.
TString GetMWMfuncString() const
used in SaveSource()
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
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.
~TGMainFrame() override
TGMainFrame destructor.
Bool_t HandleButton(Event_t *event) override
Handle mouse button events.
Bool_t HandleClientMessage(Event_t *event) override
Handle client messages sent to this frame.
TString fWindowName
window name
UInt_t fWMHeight
WM height.
TList * fBindList
list with key bindings
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()
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
void SetWindowName(const char *name=nullptr) override
Set window name. This is typically done via the window manager.
TString GetMWMvalueString() const
used in SaveSource()
Bool_t HandleKey(Event_t *event) override
Handle keyboard events.
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
Bool_t HandleSelection(Event_t *event) override
Handle primary selection event.
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
const char * GetIconName() const override
Returns mime type name of object.
void SavePrimitive(std::ostream &out, Option_t *option="") override
Save a main frame widget 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.
Bool_t HandleSelectionRequest(Event_t *event) override
Handle selection request event.
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.
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.
void SaveSource(const char *filename="Rootdlog.C", Option_t *option="") override
Save the GUI transient frame widget in a C++ macro file.
TGTransientFrame(const TGTransientFrame &)=delete
virtual void CenterOnParent(Bool_t croot=kTRUE, EPlacement pos=kCenter)
Position transient frame centered relative to the parent frame.
void SavePrimitive(std::ostream &out, Option_t *option="") override
Save a transient frame widget as a C++ statement(s) on output stream out.
Bool_t HandleButton(Event_t *event) override
Handle mouse button event in vertical splitter.
Bool_t HandleDoubleClick(Event_t *) override
Handle double click mouse event in splitter.
void SavePrimitive(std::ostream &out, Option_t *option="") override
Save a vertical frame widget as a C++ statement(s) on output stream out.
ROOT GUI Window base class.
virtual const TGWindow * GetMainFrame() const
Returns top level main frame.
virtual void Move(Int_t x, Int_t y)
Move the window.
static Int_t fgCounter
counter of created windows in SavePrimitive
void Print(Option_t *option="") const override
Print window id.
virtual UInt_t GetEditDisabled() const
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 void SetWindowName(const char *name=nullptr)
Set window name.
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
const char * GetName() const override
Return unique name, used in SavePrimitive methods.
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.
void Clear(Option_t *option="") override
Remove all objects from the list.
void Add(TObject *obj) override
TObject * Remove(TObject *obj) override
Remove object from the list.
void Delete(Option_t *option="") override
Remove all objects from the list AND delete all heap based objects.
Collectable string class.
Monitors objects for deletion and reflects the deletion by reverting the internal pointer to zero.
R__ALWAYS_INLINE Bool_t TestBit(UInt_t f) const
virtual const char * ClassName() const
Returns name of class to which the object belongs.
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
virtual Bool_t InheritsFrom(const char *classname) const
Returns kTRUE if object inherits from class "classname".
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
TQConnection class is an internal class, used in the object communication mechanism.
void Emit(const char *signal, const T &arg)
Activate signal with single parameter.
TString & Insert(Ssiz_t pos, const char *s)
TString & ReplaceSpecialCppChars()
Find special characters which are typically used in printf() calls and replace them by appropriate es...
Ssiz_t First(char c) const
Find first occurrence of a character c.
TString & Remove(Ssiz_t pos)
TString & Append(const char *cs)
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString.
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
virtual const char * UnixPathName(const char *unixpathname)
Convert from a local pathname to a Unix pathname.
virtual const char * BaseName(const char *pathname)
Base name of a file name. Base name of /user/root is root.
static void SingleShot(Int_t milliSec, const char *receiver_class, void *receiver, const char *method)
This static function calls a slot after a given time interval.
virtual void SetPasteFrame(TGFrame *f)
static TVirtualDragManager * Instance()
Load plugin and create drag manager object.
virtual Bool_t HandleEvent(Event_t *)
virtual void SetEditable(Bool_t)
R__ALWAYS_INLINE bool HasBeenDeleted(const TObject *obj)
Check if the TObject's memory has been deleted.
EGEventType fType
of event (see EGEventType)
Int_t fY
pointer x, y coordinates in event window
Handle_t fHandle
general resource handle (used for atoms or windows)
Int_t fFormat
Next fields only used by kClientMessageEvent.
UInt_t fHeight
width and height of exposed area
Window_t fWindow
window reported event is relative to
UInt_t fState
key or button mask
Int_t fYRoot
coordinates relative to root
Time_t fTime
time event event occurred in ms
UInt_t fCode
key or button code
Longptr_t fUser[5]
5 longs can be used by client message events NOTE: only [0], [1] and [2] may be used.
Graphics context structure.
Attributes that can be used when creating or changing a window.
Window attributes that can be inquired.
Long_t fYourEventMask
my event mask
Int_t fHeight
width and height of window
Int_t fBorderWidth
border width of window
Int_t fY
location of window