91 "Enacapsulated PostScript",
"*.eps",
94 "ASImage XML",
"*.xml",
122 void ConnectButtonSignals();
126 void Add(
const char *argname,
const char *value,
const char *
type);
143 fWidgets =
new TList();
153 ConnectButtonSignals();
165 TGuiBldMenuDialog::~TGuiBldMenuDialog()
176 void TGuiBldMenuDialog::ConnectButtonSignals()
178 fOK->Connect(
"Pressed()",
"TGuiBldDragManager", gGuiBldDragManager,
"DoDialogOK()");
180 fCancel->Connect(
"Pressed()",
"TGuiBldDragManager", gGuiBldDragManager,
"DoDialogCancel()");
186 void TGuiBldMenuDialog::ApplyMethod()
189 fObject->Execute(fMethod->GetName(), params);
197 static char params[1024];
210 TIter next(fWidgets);
213 while ((obj = next())) {
221 const char *
data = 0;
229 if (selfobjpos == nparam-1) {
230 if (params[0]) strlcat(params,
",", 1024-strlen(params));
232 strlcat(params, param, 1024-strlen(params));
235 if (params[0]) strlcat(params,
",", 1024-strlen(params));
237 if (!strncmp(type,
"char*", 5))
238 snprintf(param, 255,
"\"%s\"", data);
240 strlcpy(param, data,
sizeof(param));
242 strlcpy(param,
"0",
sizeof(param));
244 strlcat(params, param, 1024-strlen(params));
248 if (selfobjpos == nparam) {
249 if (params[0]) strlcat(params,
",", 1024-strlen(params));
251 strlcat(params, param, 1024-strlen(params));
267 ret +=
" [default: ";
286 t->
Connect(
"ReturnPressed()",
"TGuiBldDragManager", gGuiBldDragManager,
"DoDialogOK()");
299 void TGuiBldMenuDialog::CloseWindow()
307 void TGuiBldMenuDialog::Build()
310 Int_t selfobjpos = -1;
312 TIter next(fMethod->GetListOfMethodArgs());
317 if (selfobjpos != argpos) {
319 const char *argname = arg_name.
Data();
322 const char *charstar =
"char*";
326 strlcpy(basictype, datatype->
GetTypeName(),
sizeof(basictype));
330 Warning(
"Dialog",
"data type is not basic type, assuming (int)");
331 strlcpy(basictype,
"int",
sizeof(basictype));
334 if (strchr(argname,
'*')) {
335 strlcat(basictype,
"*", 32-strlen(basictype));
345 if (!strncmp(basictype,
"char*", 5)) {
348 if (tdefval && strlen(tdefval))
349 strlcpy(val, tdefval,
sizeof(val));
350 }
else if (!strncmp(basictype,
"float", 5) ||
351 !strncmp(basictype,
"double", 6)) {
355 }
else if (!strncmp(basictype,
"char", 4) ||
356 !strncmp(basictype,
"bool", 4) ||
357 !strncmp(basictype,
"int", 3) ||
358 !strncmp(basictype,
"long", 4) ||
359 !strncmp(basictype,
"short", 5)) {
370 Warning(
"Dialog",
"option menu not yet implemented");
374 Add(argname, val, type);
380 if (tval) strlcpy(val, tval,
sizeof(val));
381 Add(argname, val, type);
390 UInt_t width = 0, height = 0;
397 height = fOK->GetDefaultHeight();
398 width =
TMath::Max(width, fOK->GetDefaultWidth());
410 fWidgets->Add(fCancel);
411 height = fCancel->GetDefaultHeight();
412 width =
TMath::Max(width, fCancel->GetDefaultWidth());
420 hf->
Resize((width + 20) * 3, height);
429 void TGuiBldMenuDialog::Popup()
446 SetWMSize(width, height);
447 SetWMSizeHints(width, height, width, height, 0, 0);
473 if (!gGuiBldDragManager || gGuiBldDragManager->
IsStopped() ||
474 !
gClient->IsEditable())
return 0;
476 dst = src = child =
gVirtualX->GetDefaultRootWindow();
478 while (child && dst) {
481 gVirtualX->TranslateCoordinates(src, dst, xx, yy, xx, yy, child);
510 gClient->NeedRedraw(fe->fFrame);
518 const char * ,
const char * )
523 class TGuiBldDragManagerGrid {
534 TGuiBldDragManagerGrid();
535 ~TGuiBldDragManagerGrid();
537 void SetStep(
UInt_t step);
543 ULong_t TGuiBldDragManagerGrid::fgPixel = 0;
544 TGGC *TGuiBldDragManagerGrid::fgBgnd = 0;
549 TGuiBldDragManagerGrid::TGuiBldDragManagerGrid()
564 TGuiBldDragManagerGrid::~TGuiBldDragManagerGrid()
566 fWindow =
gClient->GetWindowById(fWinId);
569 fWindow->SetBackgroundPixmap(0);
570 fWindow->SetBackgroundColor(((
TGFrame*)fWindow)->GetBackground());
585 void TGuiBldDragManagerGrid::SetStep(
UInt_t step)
592 fWinId = fWindow->GetId();
601 void TGuiBldDragManagerGrid::InitBgnd()
616 fgBgnd->SetForeground(fgPixel);
622 void TGuiBldDragManagerGrid::InitPixmap()
628 fPixmap =
gVirtualX->CreatePixmap(
gClient->GetDefaultRoot()->GetId(), fgStep, fgStep);
629 gVirtualX->FillRectangle(fPixmap, fgBgnd->GetGC(), 0, 0, fgStep, fgStep);
633 fgStep - 1, fgStep - 1, 1, 1);
646 fWindow =
gClient->GetWindowById(fWinId);
648 if (fWindow && (fWindow !=
gClient->GetRoot())) {
649 fWindow->SetBackgroundPixmap(0);
650 fWindow->SetBackgroundColor(((
TGFrame*)fWindow)->GetBackground());
659 fWinId = fWindow->GetId();
660 fWindow->SetBackgroundPixmap(fPixmap);
667 class TGuiBldDragManagerRepeatTimer :
public TTimer {
680 class TGGrabRect :
public TGFrame {
734 gVirtualX->ChangeWindowAttributes(fId, &attr);
742 fClient->GetColorByName(
"black", back);
751 SetBackgroundPixmap(fPixmap);
766 class TGAroundFrame :
public TGFrame {
776 TGAroundFrame::TGAroundFrame() :
TGFrame(
gClient->GetDefaultRoot(), 1, 1,
784 gVirtualX->ChangeWindowAttributes(fId, &attr);
786 fClient->GetColorByName(
"blue", blue);
787 SetBackgroundColor(blue);
792 class TGuiBldDragManagerPimpl {
803 TGuiBldDragManagerGrid *fGrid;
808 Int_t fGrabX, fGrabY;
810 Int_t fLastPopupAction;
821 TList *fFrameMenuTrash;
830 for (i = 0; i <8; i++) {
833 for (i = 0; i <4; i++) {
834 fAroundFrame[i] =
new TGAroundFrame();
837 fFrameMenuTrash =
new TList();
846 fX0 = fY0 = fX = fY = fXf = fYf = fGrabX = fGrabY = 0;
853 fGrabListPosition = 0;
857 fSpacePressedFrame = 0;
859 fFrameMenuTrash->
Delete();
863 ~TGuiBldDragManagerPimpl() {
865 for (i = 0; i <8; i++) {
868 for (i = 0; i <4; i++) {
869 delete fAroundFrame[i];
874 fFrameMenuTrash->
Delete();
875 delete fFrameMenuTrash;
899 gGuiBldDragManager =
this;
900 fPimpl =
new TGuiBldDragManagerPimpl(
this);
927 fName =
"Gui Builder Drag Manager";
963 gGuiBldDragManager = 0;
984 TList *methodList = IsA()->GetListOfMethods();
985 TIter next(methodList);
989 while ((method = (
TMethod*) next())) {
1008 fPimpl->fGrid =
new TGuiBldDragManagerGrid();
1025 fPimpl->fGrid->SetStep(step);
1108 if (
fPimpl->fGrab && (gid !=
fPimpl->fGrab->GetId())) {
1111 gid =
fPimpl->fGrab->GetId();
1132 for (
int i = 0; i < 8; i++) {
1133 if (
fPimpl->fGrabRect[i]->GetId() ==
event->fWindow) {
1171 if (
fStop || !frame) {
1193 str +=
" cannot be editted.";
1199 if (frame != comp) {
1227 str +=
"can not be selected";
1239 static Int_t x, x0,
y, y0, xx, yy;
1260 str +=
" Press SpaceBar to unselect the frame.";
1261 if (
IsFixedSize(frame)) str +=
" This frame cannot be resized.";
1282 fPimpl->fGrab->RequestFocus();
1385 str +=
" is grabbed";
1409 str +=
fPimpl->fGrab->GetName();
1410 str +=
" ungrabbed";
1423 while (parent && (parent !=
gClient->GetDefaultRoot())) {
1446 dst = src = child = w;
1451 gVirtualX->TranslateCoordinates(src, dst, x, y, x, y, child);
1478 if (
fPimpl->fPlacePopup) {
1487 if (now-was < 100) {
1507 fPimpl->fGrab->GetHeight()-2)) {
1538 fPimpl->fAroundFrame[0]->MoveResize(x-3, y-3, frame->
GetWidth()+6, 2);
1539 fPimpl->fAroundFrame[0]->MapRaised();
1541 fPimpl->fAroundFrame[1]->MapRaised();
1543 fPimpl->fAroundFrame[2]->MapRaised();
1544 fPimpl->fAroundFrame[3]->MoveResize(x-3, y-3, 2, frame->
GetHeight()+6);
1545 fPimpl->fAroundFrame[3]->MapRaised();
1547 for (
int i = 0; i < 4; i++)
fPimpl->fAroundFrame[i]->UnmapWindow();
1572 fPimpl->fGrabRect[i]->Move(x, y);
1573 fPimpl->fGrabRect[i]->MapRaised();
1584 if (
fStop || !win || (win == gw)) {
1604 fPimpl->fPlane->ChangeOptions(
fPimpl->fPlane->GetOptions() & ~kRaisedFrame);
1608 fPimpl->fPlane->ChangeOptions(opt | kRaisedFrame);
1634 static Int_t gy = 0;
1635 static Int_t gx = 0;
1636 static UInt_t gstate = 0;
1650 if (
fPimpl->fRepeatTimer) {
1652 fPimpl->fRepeatTimer->Reset();
1653 fPimpl->fRepeatTimer->Remove();
1708 fPimpl->fButtonPressed) {
1763 if (!
fPimpl->fSpacePressedFrame) {
1769 context_fr =
fPimpl->fSpacePressedFrame;
1779 fPimpl->fX0 =
event->fXRoot;
1780 fPimpl->fY0 =
event->fYRoot;
1784 fPimpl->fClickFrame = frame;
1798 if (frame ==
fPimpl->fGrab) {
1809 fPimpl->fX =
event->fXRoot;
1810 fPimpl->fY =
event->fYRoot;
1825 if (frame ==
fPimpl->fGrab) {
1868 event->fXRoot,
event->fYRoot,
1870 fPimpl->fX =
event->fXRoot;
1871 fPimpl->fY =
event->fYRoot;
1884 if (
fStop || !frame) {
1972 gMenuDialog->RaiseWindow();
1984 win =
event->fWindow;
2003 switch (event->
fType) {
2027 static Long_t gLastClick = 0;
2028 static UInt_t gLastButton = 0;
2029 static Int_t gDbx = 0;
2030 static Int_t gDby = 0;
2032 if ((event->
fTime - gLastClick < 350) &&
2033 (event->
fCode == gLastButton) &&
2044 }
else if (!(event->
fState & 0xFF)) {
2058 gDbw =
event->fWindow;
2059 gLastClick =
event->fTime;
2060 gLastButton =
event->fCode;
2061 gDbx =
event->fXRoot;
2062 gDby =
event->fYRoot;
2180 gMenuDialog->RaiseWindow();
2217 event->fUser[0] = fr->
GetId();
2255 event->fUser[0] = w->
GetId();
2274 !
fPimpl->fGrab->IsEditable()) {
2326 event->fWindow = parent->
GetId();
2329 return ((
TGFrame*)w)->HandleKey(event);
2333 fPimpl->fSpacePressedFrame = 0;
2346 gVirtualX->LookupString(event, tmp,
sizeof(tmp), keysym);
2350 switch ((
EKeySym)keysym & ~0x20) {
2365 if (
fPimpl->fClickFrame && !
fPimpl->fClickFrame->IsEditable()) {
2465 }
else if (
fPimpl->fGrab) {
2513 Int_t x0, y0, xx, yy;
2517 if (!newfr || !newfr->
GetId() || !oldfr || !oldfr->
GetId())
return;
2522 x0 = x0 < 0 ? 0 : x0;
2523 y0 = y0 < 0 ? 0 : y0;
2540 if ((frame->
GetX() >= x0) && (frame->
GetY() >= y0) &&
2544 if (frame ==
fPimpl->fGrab) {
2551 frame->
GetX(), frame->
GetY(), xx, yy, c);
2587 if ((el->fFrame->GetX() >= x0) && (el->fFrame->GetY() >= y0) &&
2588 (el->fFrame->GetX() + (
Int_t)el->fFrame->GetWidth() <=
x) &&
2589 (el->fFrame->GetY() + (
Int_t)el->fFrame->GetHeight() <=
y)) {
2590 list->
Add(el->fFrame);
2637 if (
fStop || !cont) {
2647 w = w < 100 ? 100 : w;
2648 h = h < 100 ? 100 :
h;
2757 TString str =
"Grab action performed.";
2758 str +=
" Press Cntrl-Return to Drop grabbed frames.";
2759 str +=
" Presss Return for TCanvas Grab";
2763 }
else if (on &&
fPimpl->fGrab) {
2835 if ((fr->
GetX() >= x0) && (fr->
GetY() >= y0) &&
2845 else fr->
Move(x0, y0);
2859 else fr->
Move(x0, y0);
2922 str +=
fPimpl->fGrab->GetName();
2923 str +=
" cannot be deleted";
2969 if ((fr->
GetX() >= x0) && (fr->
GetY() >= y0) &&
3020 if (
fStop || !frame) {
3039 if (frame ==
fPimpl->fGrab) {
3076 fPimpl->fGrab->GetWidth(),
3077 fPimpl->fGrab->GetHeight());
3122 str +=
fPimpl->fGrab->GetName();
3123 str +=
" copied to clipboard";
3152 if (!
fPimpl->fReplaceOn) {
3207 str +=
fPimpl->fGrab->GetName();
3208 str +=
" replaced by ";
3219 fPimpl->fGrab->DestroyWindow();
3305 if (!file || !file[0]) {
3330 main->
SaveSource(fname.
Data(), file ?
"keep_names quiet" :
"keep_names");
3436 static Int_t canResize(TGFrame *frame, Int_t x, Int_t y, UInt_t &w, UInt_t &h)
3438 if (frame->InheritsFrom(TGCompositeFrame::Class())) return 0;
3440 TGCompositeFrame *comp = (TGCompositeFrame*)frame;
3442 TIter next(comp->GetList());
3444 Int_t d = gGuiBldDragManager->GetGridStep();
3447 while ((fe = (TGFrameElement*)next())) {
3448 if (x + fe->fFrame->GetX() + fe->fFrame->GetWidth() > w) {
3449 w = fe->fFrame->GetX() + x + fe->fFrame->GetWidth();
3452 if (y + fe->fFrame->GetY() + fe->fFrame->GetHeight() > h) {
3453 h = fe->fFrame->GetY() + y + fe->fFrame->GetHeight();
3502 switch (
fPimpl->fResizeType) {
3504 if ((((
int)fr->
GetWidth() >
x) || (x < 0)) &&
3507 if (fr->
GetY() + y < 2) {
3510 if (fr->
GetX() + x < 2) {
3533 if ((x > 0) && (((int)fr->
GetHeight() >
y) || (y < 0))) {
3535 if (fr->
GetY() + y < 2) {
3561 if (fr->
GetY() + y < 2) {
3573 if ((((
int)fr->
GetWidth() >
x) || (x < 0)) && (y > 0)) {
3575 if (fr->
GetX() + x < 2) {
3598 if ((x > 0) && (y > 0)) {
3602 h = fr->
GetY() + h > hp ? hp - fr->
GetY() :
h;
3603 w = fr->
GetX() + w > wp ? wp - fr->
GetX() : w;
3628 if (fr->
GetX() + x < 2) {
3706 Bool_t move = (x > 0) && (y > 0) && ((x +
fPimpl->fGrab->GetWidth()) < (w - 0)) &&
3707 ((y +
fPimpl->fGrab->GetHeight()) < (h - 30));
3711 if (!move && !
gVirtualX->InheritsFrom(
"TGX11")) {
3716 fPimpl->fGrab->Move(x, y);
3722 str +=
fPimpl->fGrab->GetName();
3723 str +=
" is moved to absolute position ";
3757 if (
fStop || !comp) {
3821 if (w && (w !=
gVirtualX->GetDefaultRootWindow())) {
3841 if ((comp !=
fPimpl->fGrab) && (x >= 0) && (y >= 0) &&
3894 static Int_t gy =
event->fYRoot;
3895 static Int_t gx =
event->fXRoot;
3915 fPimpl->fX =
event->fXRoot;
3916 fPimpl->fY =
event->fYRoot;
3966 x = x > x0 ? x0 :
x;
3967 y = y > y0 ? y0 :
y;
3984 frame->
Resize(w < grid ? grid : w, h < grid ? grid : h);
3987 frame->
Resize(w < grid ? 15*grid : w, h < grid ? 30*grid : h);
3989 frame->
Resize(w < grid ? 30*grid : w, h < grid ? 15*grid : h);
3991 else frame->
Resize(w < 2*grid ? 2*grid : w, h < 2*grid ? 2*grid : h);
4028 frame = ((
TGCanvas*)frame)->GetContainer();
4060 if ((x == x0) || ( y==y0 ))
return;
4063 x0 = x0 < 0 ? 0 : x0;
4073 y0 = y0 < 0 ? 0 : y0;
4092 xswap ?
x : x0, yswap ?
y : y0,
4095 xswap ? x0 :
x, yswap ? y0 :
y,
4111 TString str =
"Lasso drawn. Align frames inside or presss Return key to grab frames.";
4128 if (
fPimpl->fPlane && (
fPimpl->fPlane->GetId() ==
event->fWindow)) {
4180 if (
fPimpl->fPlane && (
fPimpl->fPlane->GetId() ==
event->fWindow)) {
4270 if (
fPimpl->fSpacePressedFrame) {
4273 mov =
fPimpl->fSpacePressedFrame;
4275 fPimpl->fSpacePressedFrame = 0;
4296 fPimpl->fRepeatTimer->Reset();
4358 fPimpl->fSpacePressedFrame = 0;
4457 str +=
" dropped into ";
4461 str +=
" at position ";
4468 if (parent && (parent ==
fPimpl->fGrabParent) &&
fPimpl->fGrabListPosition &&
4489 fPimpl->fGrabListPosition = 0;
4563 }
else if (d.
fWidth > 10) {
4573 root->SetLayoutBroken(
kFALSE);
4585 }
else if (d.
fWidth > 10) {
4602 root->SetEditable(
kTRUE);
4626 if (
fPimpl->fRepeatTimer) {
4627 fPimpl->fRepeatTimer->Reset();
4638 if (
fPimpl->fRepeatTimer) {
4639 fPimpl->fRepeatTimer->Remove();
4691 fPimpl->fLastPopupAction = act;
4887 fEditor->
Connect(
"UpdateSelected(TGFrame*)",
"TGuiBldDragManager",
this,
4888 "HandleUpdateSelected(TGFrame*)");
4918 fPimpl->fGrab->SetFrameElement(el);
4930 fPimpl->fGrab->SetFrameElement(el);
4964 if (
fPimpl->fGrid->fgStep > 1) {
4965 fPimpl->fGrid->SetStep(1);
4983 x = fe->fFrame->GetX();
4984 y = fe->fFrame->GetY();
4985 w = fe->fFrame->GetWidth();
4986 h = fe->fFrame->GetHeight();
4989 fe->fFrame->MoveResize(x, y, w, h);
5064 if (
fPimpl->fGrabRectHidden) {
5073 for (i = 0; i < 8; i++)
fPimpl->fGrabRect[i]->UnmapWindow();
5074 for (i = 0; i < 4; i++)
fPimpl->fAroundFrame[i]->UnmapWindow();
5146 str +=
" layout cannot be broken";
5156 str += (frame->
IsLayoutBroken() ?
" Disable Layout" :
" Enable Layout");
5192 str +=
" Vertical Layout ON";
5203 str +=
" Horizontal Layout ON";
5271 if (p1 ==
kNPOS)
return "";
5275 if (p2 ==
kNPOS)
return "";
5277 return in(p1, p2-p1);
5294 while ((bc = (
TBaseClass*)nextBaseClass())) {
5295 if (!bc->GetClassPointer()) {
5311 if (!menu || !
object) {
5320 TClass *cl =
object->IsA();
5323 while ((method = (
TMethod*) next())) {
5346 if (!menu || !
object) {
5350 TList *menuItemList;
5363 menuItemList =
object->IsA()->GetMenuList();
5364 TIter nextItem(menuItemList);
5370 switch (menuItem->
GetType()) {
5376 methodList =
new TList;
5377 object->IsA()->GetMenuItems(methodList);
5379 TIter next(methodList);
5381 while ((method = (
TMethod*) next())) {
5382 if (classPtr != method->
GetClass()) {
5404 fPimpl->fFrameMenuTrash->Add(r);
5409 const char *
name = it->fOptName;
5415 fPimpl->fFrameMenuTrash->Add(t);
5432 fPimpl->fFrameMenuTrash->Add(t);
5455 fPimpl->fFrameMenuTrash->Add(t);
5461 const char* menuItemTitle = menuItem->
GetTitle();
5462 if (strlen(menuItemTitle)==0) menuItemTitle = menuItem->
GetFunctionName();
5489 if (!me || !
fPimpl->fMenuObject) {
5497 str2.
Form(
"((TGuiBldDragManager*)0x%lx)->%s((%s*)0x%lx)", (
ULong_t)
this, method->
GetName(),
5505 gMenuDialog->Popup();
5531 fPimpl->fFrameMenuTrash->Delete();
5532 gMenuDialog->DeleteWindow();
5542 gMenuDialog->ApplyMethod();
5553 gMenuDialog->ApplyMethod();
5577 fPimpl->fClickFrame = frame;
5597 fFrameMenu->
Connect(
"Activated(Int_t)",
"TGuiBldDragManager",
this,
"DoClassMenu(Int_t)");
5683 const char *label = (frame->
IsLayoutBroken() ?
"Allow Layout\tCtrl+B" :
5684 "Break Layout\tCtrl+B");
5728 fPimpl->fSaveGrab = frame;
5734 fFrameMenu->
Connect(
"Activated(Int_t)",
"TGuiBldDragManager",
this,
"HandleAction(Int_t)");
5774 fLassoMenu->
Connect(
"Activated(Int_t)",
"TGuiBldDragManager",
this,
"HandleAction(Int_t)");
5802 for (i = 0; i < 10; i++) {
5805 for (i = 0; i < 10; i++) {
5860 cd->
Connect(
"ColorSelected(Pixel_t)",
"TGFrame", fr,
"ChangeBackground(Pixel_t)");
5874 cd->
Connect(
"ColorSelected(Pixel_t)",
"TGCompositeFrame", fr,
5875 "ChangeSubframesBackground(Pixel_t)");
5896 cd->
Connect(
"ColorSelected(Pixel_t)",
"TGGroupFrame", fr,
"SetTextColor(Pixel_t)");
5924 fd->
Connect(
"FontSelected(char*)",
"TGGroupFrame", fr,
"SetTextFont(char*)");
5925 fd->
Connect(
"ColorSelected(Pixel_t)",
"TGGroupFrame", fr,
"SetTextColor(Pixel_t)");
5954 fd->
Connect(
"FontSelected(char*)",
"TGTextButton", fr,
"SetFont(char*)");
5955 fd->
Connect(
"ColorSelected(Pixel_t)",
"TGTextButton", fr,
"SetTextColor(Pixel_t)");
5956 fd->
Connect(
"AlignSelected(Int_t)",
"TGTextButton", fr,
"SetTextJustify(Int_t)");
5978 cd->
Connect(
"ColorSelected(Pixel_t)",
"TGTextButton", fr,
"SetTextColor(Pixel_t)");
6047 cd->
Connect(
"ColorSelected(Pixel_t)",
"TGFrame", fr,
"ChangeBackground(Pixel_t)");
6048 cd->
Connect(
"ColorSelected(Pixel_t)",
"TGScrollBar", fr->
GetHScrollbar(),
"ChangeBackground(Pixel_t)");
6049 cd->
Connect(
"ColorSelected(Pixel_t)",
"TGScrollBar", fr->
GetVScrollbar(),
"ChangeBackground(Pixel_t)");
6068 "ChangeBackground(Pixel_t)");
6073 cd->
Connect(
"ColorSelected(Pixel_t)",
"TGLBEntry", se,
6074 "SetBackgroundColor(Pixel_t)");
6080 cd->
Connect(
"ColorSelected(Pixel_t)",
"TGTextEntry", te,
6081 "SetBackgroundColor(Pixel_t)");
6121 fd->
Connect(
"FontSelected(char*)",
"TGLabel", fr,
"SetTextFont(char*)");
6122 fd->
Connect(
"ColorSelected(Pixel_t)",
"TGLabel", fr,
"SetTextColor(Pixel_t)");
6123 fd->
Connect(
"AlignSelected(Int_t)",
"TGLabel", fr,
"SetTextJustify(Int_t)");
6146 cd->
Connect(
"ColorSelected(Pixel_t)",
"TGLabel", fr,
"SetTextColor(Pixel_t)");
6163 cd->
Connect(
"ColorSelected(Pixel_t)",
"TGListBox", fr,
"ChangeBackground(Pixel_t)");
6181 cd->
Connect(
"ColorSelected(Pixel_t)",
"TGProgressBar", fr,
"SetBarColor(Pixel_t)");
6203 cd->
Connect(
"ColorSelected(Pixel_t)",
"TGProgressBar", fr,
6204 "SetForegroundColor(Pixel_t)");
6221 cd->
Connect(
"ColorSelected(Pixel_t)",
"TGTextEntry", fr,
"SetTextColor(Pixel_t)");
6245 fd->
Connect(
"FontSelected(char*)",
"TGTextEntry", fr,
"SetFont(char*)");
6246 fd->
Connect(
"ColorSelected(Pixel_t)",
"TGTextEntry", fr,
"SetTextColor(Pixel_t)");
6252 int tw, max_ascent, max_descent;
6260 gVirtualX->GetFontProperties(fs, max_ascent, max_descent);
6261 fr->
Resize(tw + 8, max_ascent + max_descent + 7);
virtual void AddMacro(const char *macro, TImage *img)
Add macro to "User's Macros" section Input img must be static - do not delete it. ...
virtual void Init()
Initialization.
virtual TGDimension GetDefaultSize() const
std::cout << fWidth << "x" << fHeight << std::endl;
virtual const char * BaseName(const char *pathname)
Base name of a file name. Base name of /user/root is root.
virtual const char * GetName() const
Returns name of object.
virtual Bool_t AccessPathName(const char *path, EAccessMode mode=kFileExists)
Returns FALSE if one can access a file using the specified access mode.
virtual void Resize(UInt_t w=0, UInt_t h=0)
Resize the frame.
static const char * gImageTypes[]
virtual void SetFont(TGFont *font)
Set font.
virtual TGTextEntry * GetTextEntry() const
ErrorHandlerFunc_t SetErrorHandler(ErrorHandlerFunc_t newhandler)
Set an errorhandler function. Returns the old handler.
TList * GetListOfBases()
Return list containing the TBaseClass(es) of a class.
virtual void MapSubwindows()
virtual int GetPid()
Get process id.
static const char * gSaveMacroTypes[]
virtual UInt_t GetEditDisabled() const
void HandleCut()
Handle cut action.
TMethodCall * GetterMethod(TClass *cl=0)
Return a TMethodCall method responsible for getting the value of data member.
void SelectFrame(TGFrame *frame, Bool_t add=kFALSE)
Grab/Select frame.
Int_t GetBorderWidth() const
virtual void Delete(Option_t *option="")
Remove all objects from the list AND delete all heap based objects.
Bool_t IsEventsDisabled(TGWindow *f) const
TString GetTypeName()
Get basic type of typedef, e,g.
TGFont * FindFont(FontStruct_t font) const
Find font based on its font struct. Returns 0 if font is not found.
Bool_t HandleMotion(Event_t *)
Handle motion event.
virtual UInt_t GetOptions() const
Bool_t IsEmbedded() const
Int_t GetEndDragX() const
Return the current X coordinate of the dragged frame.
void SetRoot(TGWindow *root=0)
Sets the current root (i.e.
TGCompositeFrame * FindCompositeFrame(Window_t id)
Find the first composite parent of window.
const Mask_t kButton2Mask
virtual void MoveResize(Int_t x, Int_t y, UInt_t w=0, UInt_t h=0)
Move and/or resize the frame.
Bool_t IsFixedW(TGWindow *f) const
void ChangeProperties(TGLabel *)
Edit properties via font selection dialog.
This class defines toggling facility for both - object's method or variables.
Pixel_t GetBarColor() const
TGFrame * GetSelected() const
Return the current grabbed/selected frame.
void ChangeImage(TGIcon *)
Invoke file dialog to assign a new image.
TGFontPool * GetFontPool() const
TGCompositeFrame * FindLayoutFrame(TGFrame *f)
Helper to find a frame which can be layouted.
Collectable string class.
void AddInput(UInt_t emask)
Add events specified in the emask to the events the frame should handle.
virtual Bool_t HandleKey(Event_t *)
void CheckTargetUnderGrab()
Look for the drop target under grabbed/selected frame while moving.
void UngrabFrame()
Ungrab/Unselect selected/grabbed frame.
const Mask_t kKeyShiftMask
void DeleteFrame(TGFrame *frame)
Delete frame.
Int_t GetTextJustify() const
All ROOT classes may have RTTI (run time type identification) support added.
void SetWindowName(const char *name=0)
Set window name. This is typically done via the window manager.
Bool_t IsMoveWaiting() const
Waits for either the mouse move from the given initial ButtonPress location or for the mouse button t...
const TGWindow * GetRoot() const
Returns current root (i.e.
UInt_t GetGridStep()
Return the grid step.
void PutToCanvas(TGCompositeFrame *cont)
Create a new TGCanvas and place container into it.
void SetForeground(Pixel_t v)
Set foreground color.
static Bool_t IsParentOfGrab(Window_t id, const TGWindow *grab)
Helper for IsPointVisible.
TGFrame * FindMdiFrame(TGFrame *in)
Return a pointer to the parent mdi frame.
Bool_t Save(const char *file="")
Save an editted frame to the file.
static Pixel_t GetWhitePixel()
Get white pixel value.
Pixel_t GetTextColor() const
static TGColorDialog * fgGlobalColorDialog
static TGColorDialog * GetGlobalColorDialog(Bool_t create=kTRUE)
Return pointer to global color dialog.
void UnmapAllPopups()
Unmap all popups.
Bool_t HandleButtonRelease(Event_t *)
Handle button release event.
virtual Int_t GetEntries() const
virtual TObject * Last() const
Return the last object in the list. Returns 0 when list is empty.
virtual Bool_t HandleDragEnter(TGFrame *)
Handle drag enter event.
virtual void SetContainer(TGFrame *f)
const TGResourcePool * GetResourcePool() const
static void MapGlobalDialog(TGMainFrame *dialog, TGFrame *fr)
Map dialog and place it relative to selected frame.
virtual void SetImage(const char *img)
Set icon image.
const TGPicture * SetIconPixmap(const char *iconName)
Set window icon pixmap by name.
void DrawGrabRect(Int_t i, Int_t x, Int_t y)
Helper method to draw grab rectangle at position x,y.
TList * GetOptions() const
Returns list of options - list of TOptionListItems.
Ssiz_t Index(const char *pat, Ssiz_t i=0, ECaseCompare cmp=kExact) const
Bool_t HandleTimerEvent(Event_t *ev, TTimer *t)
Handle timer events or events coming from the recorder.
virtual void SetAction(TGuiBldAction *act)
Bool_t CanChangeLayoutOrder(TGWindow *w) const
kTRUE - if it's possible to change layout order in the parent's layout of window w ...
R__EXTERN Atom_t gWM_DELETE_WINDOW
void ChangeSelected(TGFrame *f)
Inform outside wold that selected frame was changed.
friend class TGuiBldDragManagerRepeatTimer
void SetCursorType(Int_t cur)
Set cursor for selcted/grabbed frame.
Bool_t IsFixedLayout(TGWindow *f) const
TGMdiMainFrame * GetMdiMain() const
void HandleGrid()
Switch on/of grid drawn.
TGFrame * InEditable(Window_t id)
Return a pointer to the parent window (which is being editted)
Short_t Min(Short_t a, Short_t b)
virtual const char * DirName(const char *pathname)
Return the directory name in pathname.
Bool_t Drop()
Drop grabbed frame.
virtual UInt_t GetDefaultHeight() const
Bool_t HandleConfigureNotify(Event_t *)
Resize events.
Each ROOT method (see TMethod) has a linked list of its arguments.
An abstract interface to image processing library.
Type GetType(const std::string &Name)
EGEventType GetWaitForEvent() const
virtual void EnableAlign(Bool_t on=kTRUE)
Enable/disable align combobox.
void CreatePropertyEditor()
Create widget property editor (it could be located outside of guibuilder)
TGFrame * GetContainer() const
TGWindow * GetResizableParent(TGWindow *p)
Find parent frame which can be resized.
virtual TGFrame * ExecuteAction()
Execute an action.
TGGC * FindGC(const TGGC *gc)
Find graphics context. Returns 0 in case gc is not found.
TList * GetListOfPopups() const
void HandleLayoutOrder(Bool_t forward=kTRUE)
Change layout order.
UInt_t GetTextLength() const
const char * GetTypeName() const
Get type of method argument, e.g.
void SetIconName(const char *name)
Set window icon name. This is typically done via the window manager.
virtual TDataMember * FindDataMember()
Tries to guess DataMember from comment string and Method's name <==(only if 1 Argument!).
static Bool_t containBaseClass(const char *somestring, TClass *cl)
Helper.
void WaitForUnmap(TGWindow *w)
Wait for window to be unmapped.
void HandleReturn(Bool_t on=kFALSE)
Handling of return/enter key pressing.
virtual void Layout()
Layout the elements of the composite frame.
R__EXTERN TVirtualDragManager * gDragManager
void UnregisterWindow(TGWindow *w)
Remove a TGWindow from the list of windows.
Bool_t CheckTargetAtPoint(Int_t x, Int_t y)
Helper. Look for the drop target under grabbed/selected frame while moving.
void SetLassoDrawn(Bool_t on)
Set lasso drawn flag.
void AddDialogMethods(TGPopupMenu *menu, TObject *object)
Add DIALOG entries to the selected frame popup menu.
static TString FindMenuIconName(TString &in)
Return a name of icon.
virtual void SetEditable(Bool_t)
virtual void RemoveFrame(TGFrame *f)
Remove frame from composite frame.
virtual const char * UnixPathName(const char *unixpathname)
Convert from a Unix pathname to a local pathname.
FontStruct_t GetFontStruct() const
void AddClassMenuMethods(TGPopupMenu *menu, TObject *object)
Add entries with class //*MENU* methods.
void CloneEditable()
Create a frame which is the same as currently editted frame.
TRootGuiBuilder * fBuilder
void ChangeSelected(TGFrame *)
Change selected frame.
void RemoveFrame(TGFrame *)
Remove a frame.
void SetPropertyEditor(TGuiBldEditor *e)
Helper method.
virtual void Toggle()
Toggles the Values and State of this object and connected data!
Bool_t EndDrag()
End dragging.
void SetBackground(Pixel_t v)
Set background color.
virtual int Unlink(const char *name)
Unlink, i.e. remove, a file.
virtual const char * ClassName() const
Returns name of class to which the object belongs.
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString...
void HandleDelete(Bool_t crop=kFALSE)
Handle delete or crop action.
Bool_t HandleButtonPress(Event_t *)
Handle button press 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.
void FreePicture(const TGPicture *pic)
Free picture resource.
virtual Bool_t IsLayoutBroken() const
virtual void SetCurrentColor(Pixel_t col)
Change current color.
Bool_t IsPointVisible(Int_t x, Int_t y)
Helper function for IsSelectedWindow method.
virtual void FromWindow(Drawable_t, Int_t=0, Int_t=0, UInt_t=0, UInt_t=0)
static double p2(double t, double a, double b, double c)
virtual void ReparentWindow(const TGWindow *p, Int_t x=0, Int_t y=0)
Reparent window, make p the new parent and position the window at position (x,y) in new parent...
virtual UInt_t Integer(UInt_t imax)
Returns a random integer on [ 0, imax-1 ].
virtual void SetName(const char *name)
Bool_t CheckDragResize(Event_t *event)
Check resize type event.
Bool_t IsFixedSize(TGWindow *f) const
void AddText(Int_t pos, const char *text)
Bool_t EndsWith(const char *pat, ECaseCompare cmp=kExact) const
Return true if string ends with the specified string.
void Snap2Grid()
Draw grid on editable frame and restore background on previuosly editted one.
TGuiBldEditor * GetEditor() const
static constexpr double L
int main(int argc, char **argv)
virtual const TGWindow * GetMainFrame() const
Returns top level main frame.
void ToGrid(Int_t &x, Int_t &y)
Return grid coordinates which are close to given.
virtual TList * GetList() const
virtual Bool_t GetState()
Returns the state of Toggle according to its current value and fOnValue, returns true if they match...
void SetClassHints(const char *className, const char *resourceName)
Set the windows class and resource name.
void Reset1()
Reset some parameters.
void ChangeBarColor(TGProgressBar *)
Set progress bar color via TGColorDialog.
void EnableLassoButtons(Bool_t on=kTRUE)
Enable toolbar buttons for alignment.
virtual const char * GetCommentString()
Returns a comment string from the class declaration.
virtual const char * TempDirectory() const
Return a user configured or systemwide directory to create temporary files in.
Bool_t IsUndocked() const
void DoDialogOK()
Process dialog OK button pressed.
UInt_t GetBufferLength() const
static ULong_t RGB2Pixel(Int_t r, Int_t g, Int_t b)
Convert r,g,b to graphics system dependent pixel value.
virtual void RequestFocus()
TGViewPort * GetViewPort() const
TGTextBuffer * GetBuffer() const
virtual Bool_t SaveProject(Event_t *event=0)
Save selected project.
void TimerEvent(Event_t *ev)
void WaitFor(TGWindow *w)
Wait for window to be destroyed.
virtual ~TGuiBldDragManager()
Destructor.
Bool_t HandleClientMessage(Event_t *)
Handle client message.
virtual void UpdateStatusBar(const char *text=0)
Update information shown on the status bar.
void DropCanvas(TGCanvas *canvas)
Drop canvas container.
virtual Bool_t IsExecutable() const
Bool_t HandleButton(Event_t *)
Handle button event occured in some ROOT frame.
virtual TGListBox * GetListBox() const
virtual void SetOnValue(Long_t lon)
const Mask_t kButtonPressMask
virtual void MoveResize(Int_t x, Int_t y, UInt_t w, UInt_t h)
Move the MDI window at position x, y and set size to w, h.
void DrawLasso()
Draw lasso for allocation new object.
const Mask_t kKeyPressMask
const Mask_t kButton3Mask
Bool_t Connect(const char *signal, const char *receiver_class, void *receiver, const char *slot)
Non-static method is used to connect from the signal of this object to the receiver slot...
void HandleAction(Int_t act)
Main handler of actions.
const TString & GetString() const
Bool_t HandleDoubleClick(Event_t *)
Mouse double click handler (never should happen)
void CreateListOfDialogs()
Create a list of dialog methods.
virtual TTime Now()
Get current time in milliseconds since 0:00 Jan 1 1995.
virtual Bool_t HandleDragLeave(TGFrame *)
virtual void SetLayoutBroken(Bool_t on=kTRUE)
Set broken layout. No Layout method is called.
Bool_t HandleExpose(Event_t *)
Handle repaint event.
virtual TObject * First() const
Return the first object in the list. Returns 0 when list is empty.
TGMdiFrame * GetCurrent() const
Return pointer on current (active) MDI child window.
virtual UInt_t GetDefaultWidth() const
Bool_t SetCurrent(TGMdiFrameList *newcurrent)
Set current (active) MDI child window (by frame list).
R__EXTERN TSystem * gSystem
const Mask_t kWASaveUnder
Bool_t IsEditable() const
Pixel_t GetForeground() const
virtual void MapSubwindows()
Map all canvas sub windows.
Bool_t HandleKey(Event_t *)
Handle key event.
virtual TGDimension GetDefaultSize() const
std::cout << fWidth << "x" << fHeight << std::endl;
Basic data type descriptor (datatype information is obtained from CINT).
void SwitchEditable(TGFrame *frame)
Switch editable.
Bool_t IsEditDisabled(TGWindow *f) const
void SwitchLayout()
Switch Horizontal/Vertical layout of selected/grabbed composite frame.
void Compact(Bool_t global=kTRUE)
Layout and Resize frame.
virtual TObject * Remove(TObject *obj)
Remove object from the list.
void HandlePaste()
Handle paste action.
virtual Bool_t InheritsFrom(const char *classname) const
Returns kTRUE if object inherits from class "classname".
virtual const char * GetName() const
Return unique name, used in SavePrimitive methods.
virtual TObject * Before(const TObject *obj) const
Returns the object before object obj.
TList * GetFramesInside(Int_t x0, Int_t y0, Int_t x, Int_t y)
Return the list of frames inside of some area.
Bool_t IsPasteFrameExist()
Return kTRUE if paste frame exist.
virtual void CloseWindow()
Close and delete main frame.
virtual void CloseWindow()
Close GUI builder via window manager "Close" button.
void Form(const char *fmt,...)
Formats a string using a printf style format descriptor.
Bool_t CanCompact(TGWindow *w) const
kTRUE is frame could be compacted/"layouted"
void SetEditable(Bool_t on=kTRUE)
Grab server.
TGHScrollBar * GetHScrollbar() const
virtual Bool_t IsLayoutBroken() const
Bool_t IsFixedH(TGWindow *f) const
virtual void ChangeOptions(UInt_t options)
Change composite frame options. Options is an OR of the EFrameTypes.
void GetParameters(TFitEditor::FuncParams_t &pars, TF1 *func)
Stores the parameters of the given function into pars.
virtual UInt_t GetDefaultWidth() const
Handles synchronous and a-synchronous timer events.
void RaiseMdiFrame(TGFrame *in)
Raise guibuilder's mdi frame.
void HandleAlignment(Int_t to, Bool_t lineup=kFALSE)
Align frames located inside lasso area.
static TGFontDialog * GetGlobalFontDialog()
Create global font dialog.
virtual Pixel_t GetBackground() const
GContext_t GetNormGC() const
The ROOT global object gROOT contains a list of all defined classes.
Bool_t SaveFrame(const char *file=0)
Save composite frame as macro.
virtual TObject * After(const TObject *obj) const
Returns the object after object obj.
static double p1(double t, double a, double b)
void DeleteMenuDialog()
Delete dialog and trash.
virtual Bool_t HandleDragMotion(TGFrame *)
void Reset(Detail::TBranchProxy *x)
TGuiBldAction * GetAction() const
void Warning(const char *location, const char *msgfmt,...)
static const TGGC & GetBlackGC()
Get black graphics context.
R__EXTERN TRandom * gRandom
static TGFontDialog * fgGlobalFontDialog
void EnableEditButtons(Bool_t on=kTRUE)
Enable/disable toolbar buttons according to the selected frame.
Long_t Property() const
Set TObject::fBits and fStreamerType to cache information about the class.
void DoDialogApply()
Process dialog Apply button pressed.
void SetColor(Int_t ix, Pixel_t color)
Set color at index ix of color entries.
virtual Bool_t IsEditable() const
static constexpr double ms
static TString CreateArgumentTitle(TMethodArg *argument)
Create a string describing method argument.
Each class (see TClass) has a linked list of its base class(es).
virtual void Move(Int_t x, Int_t y)
Move frame.
char * StrDup(const char *str)
Duplicate the string str.
TGuiBldDragManagerPimpl * fPimpl
virtual void SetImagePath(const char *path)
Set directory where image is located.
Bool_t IsGrabDisabled(TGWindow *f) const
TDataMember * GetDataMember() const
Returns TDataMember pointed by this methodarg.
void HandleReplace()
Handle replace.
virtual void SetColor(Pixel_t color)
Set color.
const char * GetText() const
static ULong_t Number2Pixel(Int_t ci)
Static method that given a color index number, returns the corresponding pixel value.
virtual UInt_t GetDefaultHeight() const
FontStruct_t GetFontStruct() const
Bool_t HandleEvent(Event_t *)
Handle all events.
virtual void Update()
Update gui builder.
void ChangePicture(TGPictureButton *)
Invoke file dialog to assign a new picture.
void DeletePropertyEditor()
Delete widget property editor.
void Add(THist< DIMENSIONS, PRECISION_TO, STAT_TO... > &to, const THist< DIMENSIONS, PRECISION_FROM, STAT_FROM... > &from)
Add two histograms.
virtual Bool_t IsEmpty() const
virtual void SetToggledObject(TObject *obj, TMethod *anymethod)
Initializes it to toggle an object's datamember using this object's method.
void ResetWaitFor(TGWindow *w)
reset waiting
virtual void SetEditDisabled(UInt_t on=1)
Set edit disable flag for this frame and subframes.
FontStruct_t GetFontStruct() const
virtual Bool_t IsEditable() const
Return kTRUE if frame is being edited.
virtual void SetCleanup(Int_t mode=kLocalCleanup)
Turn on automatic cleanup of child frames in dtor.
virtual void HandleMenu(Int_t id)
Handle menu items.
virtual Long_t Calc(const char *line, EErrorCode *error=0)=0
TGMdiFrame * FindEditableMdiFrame(const TGWindow *win)
Find the editable frame.
TGUndockedFrame * GetUndocked() const
virtual void RaiseWindow()
const TGPicture * GetPicture(const char *name)
Get picture from the picture pool.
virtual void SetEditable(Bool_t)
Bool_t HandleDestroyNotify(Event_t *)
Handle destroy notify.
const Mask_t kWAOverrideRedirect
static RooMathCoreReg dummy
virtual Bool_t IsMapped()
Returns kTRUE if window is mapped on screen, kFALSE otherwise.
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
virtual Bool_t HandleButton(Event_t *)
static constexpr double s
Bool_t Disconnect(const char *signal=0, void *receiver=0, const char *slot=0)
Disconnects signal of this object from slot of receiver.
you should not use this method at all Int_t Int_t Double_t Double_t Double_t e
TGColorPalette * GetCustomPalette() const
void forward(const LAYERDATA &prevLayerData, LAYERDATA &currLayerData)
apply the weights (and functions) in forward direction of the DNN
virtual void SetCleanup(Int_t=kLocalCleanup)
Bool_t RecognizeGesture(Event_t *, TGFrame *frame=0)
Recognize what was done when mouse button pressed.
EMenuItemKind IsMenuItem() const
Int_t GetEndDragY() const
Returns the current Y coordinate of the dragged frame.
virtual void AddFrame(TGFrame *f, TGLayoutHints *l=0)
Add frame to the composite frame using the specified layout hints.
TGFrame * GetEditableParent(TGFrame *f)
Return the parent frame which can be editted.
static TClass * GetClass(const char *name, Bool_t load=kTRUE, Bool_t silent=kFALSE)
Static method returning pointer to TClass of the specified class name.
void PlaceFrame(TGFrame *, TGLayoutHints *)
Put created frame at position of the last mouse click.
const TGWindow * GetParent() const
static TGuiBldMenuDialog * gMenuDialog
TGMdiTitleBar * GetTitleBar() const
virtual void AddAfter(const TObject *after, TObject *obj)
Insert object after object after in the list.
void HighlightCompositeFrame(Window_t)
Raise composite frame when mouse is moving over it.
Bool_t StartDrag(TGFrame *src, Int_t x, Int_t y)
Start dragging.
Mother of all ROOT objects.
TGGCPool * GetGCPool() const
virtual Bool_t HandleDoubleClick(Event_t *)
virtual TGLayoutManager * GetLayoutManager() const
virtual void UnmapWindow()
virtual void SetEditDisabled(UInt_t on=kEditDisable)
const char * GetDefault() const
Get default value of method argument.
void SetWMPosition(Int_t x, Int_t y)
Give the window manager a window position hint.
void SetGridStep(UInt_t step)
Set the grid step.
void SetFrameElement(TGFrameElement *fe)
GContext_t GetNormGC() const
static TGPopupMenu * CreatePopup()
Return style popup menu.
static TGuiBldDragManager * gGuiBldDragManager
GContext_t GetNormGC() const
void DrawGrabRectangles(TGWindow *win=0)
Draw small grab rectangles around grabbed/selected/frame.
virtual Bool_t HandleDragDrop(TGFrame *, Int_t, Int_t, TGLayoutHints *)
FontStruct_t GetFontStruct() const
virtual Bool_t IsEditable() const
void DoRedraw()
Redraw the editted window.
virtual Bool_t NewProject(TString type="")
Create a new project.
virtual void Add(TObject *obj)
static TGuiBuilder * Instance()
return an instance of TGuiBuilder object
void HandleButon3Pressed(Event_t *, TGFrame *frame=0)
Handle 3d mouse pressed (popup context menu)
virtual void AddTimer(TTimer *t)
Add timer to list of system timers.
virtual void SetLayoutBroken(Bool_t=kTRUE)
void Execute(const char *, const char *, int *=0)
Execute method on this object with the given parameter string, e.g.
int GetBuffer(PyObject *pyobject, char tc, int size, void *&buf, Bool_t check=kTRUE)
Retrieve a linear buffer pointer from the given pyobject.
Bool_t IsSelectedVisible()
Return kTRUE if grabbed/selected frame is not overlapped by other windows.
Short_t Max(Short_t a, Short_t b)
void HandleCopy(Bool_t brk_layout=kTRUE)
Handle copy.
Each ROOT class (see TClass) has a linked list of methods.
const TGWindow * GetDefaultRoot() const
Returns the root (i.e.
void DoClassMenu(Int_t)
Process a method chosen via frame context menu.
you should not use this method at all Int_t Int_t Double_t Double_t Double_t Int_t Double_t Double_t Double_t Double_t b
void ChangeBackgroundColor(TGListBox *)
Set background color for list box entries.
virtual Bool_t OpenProject(Event_t *event=0)
Open new gui builder project.
Bool_t HandleSelection(Event_t *)
not used yet.
void SetWMSize(UInt_t w, UInt_t h)
Give the window manager a window size hint.
TGFrameElement * GetFrameElement() const
TClass * GetClass() const
void HideGrabRectangles()
Hide/Unmap grab rectangles.
void NeedRedraw(TGWindow *w, Bool_t force=kFALSE)
Set redraw flags.
Bool_t CanChangeLayout(TGWindow *w) const
kTRUE - if it's possible to switch disable/enable layout
friend class TGuiBldMenuDialog
static TImage * Open(const char *file, EImageFileTypes type=kUnknown)
Open a specified image file.
void GrabFrame(TGFrame *frame)
grab frame (see SelectFrame)
TGFrame * GetBtnEnableParent(TGFrame *fr)
Return a parent which can handle button evevents.
void ReparentFrames(TGFrame *newfr, TGCompositeFrame *oldfr)
Reparent frames.
const Mask_t kKeyControlMask
static Window_t GetWindowFromPoint(Int_t x, Int_t y)
Helper. Return a window located at point x,y (in screen coordinates)
static TImage * Create()
Create an image.
TGDockableFrame * GetToolDock() const
R__EXTERN TInterpreter * gCling
virtual void SetEditable(Bool_t on=kTRUE)
Switch ON/OFF edit mode.
virtual Int_t GetSize() const
static TGGC * GetPopupHlghtGC()
Return background GC for highlighted popup menu entry.
void ChangeTextColor(TGGroupFrame *)
Change text color via color selection dialog.
void SetMWMHints(UInt_t value, UInt_t funcs, UInt_t input)
Set decoration style for MWM-compatible wm (mwm, ncdwm, fvwm?).
virtual void SetAlign(Int_t align)
Set align.
void DoResize()
handle resize
void HandleUpdateSelected(TGFrame *)
When selected frame was changed by guibuilder editor -> update its appearence.
virtual void ChangeSelected(TGFrame *f)
Set selected frame.
virtual char * ConcatFileName(const char *dir, const char *name)
Concatenate a directory and a file name. User must delete returned string.
void DoReplace(TGFrame *frame)
Replace frame (doesn't work yet properly)
virtual void SaveSource(const char *filename="Rootappl.C", Option_t *option="")
Save the GUI main frame widget in a C++ macro file.
Int_t GetStrartDragX() const
Return the X coordinate where drag started.
Bool_t HandleTimer(TTimer *)
The main event loop is originated here It repeadeatly queries pointer state and position on the scree...
const Mask_t kButton1Mask
virtual void ChangeOptions(UInt_t options)
Change frame options. Options is an OR of the EFrameTypes.
Int_t GetStrartDragY() const
Return the Y coordinate where drag started.
static const TGGC & GetShadowGC()
Get shadow color graphics context.
virtual void SetEditable(Bool_t on=kTRUE)
TGVScrollBar * GetVScrollbar() const
Bool_t HandleSelectionRequest(Event_t *)
not used yet.
static const TGGC & GetBckgndGC()
Get background color graphics context.
void Menu4Frame(TGFrame *, Int_t x, Int_t y)
Create and place context menu for selected frame.
void Menu4Lasso(Int_t x, Int_t y)
Create context menu for lasso actions.
void DoDialogCancel()
Process dialog Cancel button pressed.
static void GuiBldErrorHandler(Int_t, Bool_t, const char *, const char *)
Our own error handler (not used yet)
static void layoutFrame(TGFrame *frame)
Helper to layout.
R__EXTERN Atom_t gROOT_MESSAGE
void DoMove()
Handle move.
virtual const char * GetTitle() const
Returns title of object.
virtual void SetWindowName(const char *name=0)
Set window name.
const char * GetSignature()
Return signature of function.
void CloseMenus()
Helper to close all menus.
TGFrame * GetMovableParent(TGWindow *p)
Find parent frame which can be dragged.
void SetTime(Long_t milliSec)
virtual TGLBEntry * GetSelectedEntry() const
void ChangeTextFont(TGGroupFrame *)
Change text font via font selection dialog.
Int_t GetTextJustify() const
Bool_t IgnoreEvent(Event_t *e)
Return kTRUE if event is rejected for processing by drag manager.
void BreakLayout()
Disable/Enable layout for selected/grabbed composite frame.
const char * Data() const
TGWindow * GetWindowById(Window_t sw) const
Find a TGWindow via its handle. If window is not found return 0.
static constexpr double g
Bool_t Cancel(Bool_t delSrc)
Do cancel action.