96 "Encapsulated PostScript",
"*.eps",
99 "ASImage XML",
"*.xml",
131 void Add(
const char *argname,
const char *value,
const char *type);
202 static char params[1024];
218 while ((obj = next())) {
225 const char *type = str->GetString().
Data();
226 const char *data = 0;
229 data = ((
TGTextEntry *) obj)->GetBuffer()->GetString();
234 if (selfobjpos == nparam-1) {
235 if (params[0]) strlcat(params,
",", 1024-strlen(params));
237 strlcat(params, param, 1024-strlen(params));
240 if (params[0]) strlcat(params,
",", 1024-strlen(params));
242 if (!strncmp(type,
"char*", 5))
243 snprintf(param, 255,
"\"%s\"", data);
245 strlcpy(param, data,
sizeof(param));
247 strlcpy(param,
"0",
sizeof(param));
249 strlcat(params, param, 1024-strlen(params));
253 if (selfobjpos == nparam) {
254 if (params[0]) strlcat(params,
",", 1024-strlen(params));
256 strlcat(params, param, 1024-strlen(params));
272 ret +=
" [default: ";
288 b->AddText(0, value);
315 Int_t selfobjpos = -1;
322 if (selfobjpos != argpos) {
324 const char *argname = arg_name.
Data();
327 const char *charstar =
"char*";
331 strlcpy(basictype, datatype->
GetTypeName(),
sizeof(basictype));
335 Warning(
"Dialog",
"data type is not basic type, assuming (int)");
336 strlcpy(basictype,
"int",
sizeof(basictype));
339 if (strchr(argname,
'*')) {
340 strlcat(basictype,
"*", 32-strlen(basictype));
345 if (
m &&
m->GetterMethod(
fObject->IsA())) {
350 if (!strncmp(basictype,
"char*", 5)) {
352 m->GetterMethod()->Execute(
fObject,
"", &tdefval);
353 if (tdefval && strlen(tdefval))
354 strlcpy(val, tdefval,
sizeof(val));
355 }
else if (!strncmp(basictype,
"float", 5) ||
356 !strncmp(basictype,
"double", 6)) {
358 m->GetterMethod()->Execute(
fObject,
"", ddefval);
360 }
else if (!strncmp(basictype,
"char", 4) ||
361 !strncmp(basictype,
"bool", 4) ||
362 !strncmp(basictype,
"int", 3) ||
363 !strncmp(basictype,
"long", 4) ||
364 !strncmp(basictype,
"short", 5)) {
366 m->GetterMethod()->Execute(
fObject,
"", ldefval);
367 snprintf(val, 255,
"%zi", (
size_t)ldefval);
372 if (
m->GetOptions()) {
373 Warning(
"Dialog",
"option menu not yet implemented");
376 Add(argname, val, type);
382 if (tval) strlcpy(val, tval,
sizeof(val));
383 Add(argname, val, type);
392 UInt_t width = 0, height = 0;
399 width = std::max(width,
fOK->GetDefaultWidth());
412 height =
fCancel->GetDefaultHeight();
413 width = std::max(width,
fCancel->GetDefaultWidth());
421 hf->
Resize((width + 20) * 3, height);
475 !
gClient->IsEditable())
return 0;
477 dst = src = child =
gVirtualX->GetDefaultRootWindow();
479 while (child && dst) {
482 gVirtualX->TranslateCoordinates(src, dst, xx, yy, xx, yy, child);
519 const char * ,
const char * )
570 fWindow->SetBackgroundPixmap(0);
650 fWindow->SetBackgroundPixmap(0);
743 fClient->GetColorByName(
"black", back);
744 gc->SetBackground(back);
745 gc->SetForeground(back);
787 fClient->GetColorByName(
"blue", blue);
831 for (i = 0; i <8; i++) {
834 for (i = 0; i <4; i++) {
866 for (i = 0; i <8; i++) {
869 for (i = 0; i <4; i++) {
925 fName =
"Gui Builder Drag Manager";
931 fClient->UnregisterWindow(
this);
983 TIter next(methodList);
987 while ((method = (
TMethod*) next())) {
989 if (str.Contains(
"*DIALOG")) {
1023 fPimpl->fGrid->SetStep(step);
1060 while (!parent || (parent !=
fClient->GetDefaultRoot()->GetId())) {
1061 if (parent ==
fClient->GetRoot()->GetId()) {
1082 while (!parent || (parent !=
fClient->GetDefaultRoot()->GetId())) {
1106 if (
fPimpl->fGrab && (gid !=
fPimpl->fGrab->GetId())) {
1109 gid =
fPimpl->fGrab->GetId();
1111 if (
fClient->IsEditable() && (rid !=
fClient->GetRoot()->GetId())) {
1114 rid =
fClient->GetRoot()->GetId();
1130 for (
int i = 0; i < 8; i++) {
1169 if (
fStop || !frame) {
1191 str +=
" cannot be edited.";
1192 fBuilder->UpdateStatusBar(str.Data());
1197 if (frame != comp) {
1225 str +=
"can not be selected";
1226 fBuilder->UpdateStatusBar(str.Data());
1237 static Int_t x, x0,
y, y0, xx, yy;
1248 fClient->GetDefaultRoot()->GetId(),
1258 str +=
" Press SpaceBar to unselect the frame.";
1259 if (
IsFixedSize(frame)) str +=
" This frame cannot be resized.";
1261 fBuilder->UpdateStatusBar(str.Data());
1267 fClient->GetDefaultRoot()->GetId(),
1271 fPimpl->fX0 = x0 = std::min(x0, xx);
1273 fPimpl->fY0 = y0 = std::min(y0, yy);
1280 fPimpl->fGrab->RequestFocus();
1348 fClient->GetDefaultRoot()->GetId(),
1383 str +=
" is grabbed";
1385 fBuilder->UpdateStatusBar(str.Data());
1407 str +=
fPimpl->fGrab->GetName();
1408 str +=
" ungrabbed";
1409 fBuilder->UpdateStatusBar(str.Data());
1421 while (parent && (parent !=
gClient->GetDefaultRoot())) {
1422 if (parent->
GetId() ==
id) {
1444 dst = src = child = w;
1449 gVirtualX->TranslateCoordinates(src, dst,
x,
y,
x,
y, child);
1470 if (mdi && (mdi !=
fBuilder->GetMdiMain()->GetCurrent())) {
1476 if (
fPimpl->fPlacePopup) {
1485 if (now-was < 100) {
1505 fPimpl->fGrab->GetHeight()-2)) {
1525 if (!frame || !
fClient->IsEditable() ||
fPimpl->fPlacePopup) {
1537 fPimpl->fAroundFrame[0]->MapRaised();
1539 fPimpl->fAroundFrame[1]->MapRaised();
1541 fPimpl->fAroundFrame[2]->MapRaised();
1543 fPimpl->fAroundFrame[3]->MapRaised();
1545 for (
int i = 0; i < 4; i++)
fPimpl->fAroundFrame[i]->UnmapWindow();
1571 fPimpl->fGrabRect[i]->MapRaised();
1582 if (
fStop || !win || (win == gw)) {
1588 if (!w || (w ==
fPimpl->fPlane) || w->GetEditDisabled() || w->IsEditable() ||
1613 fBuilder->UpdateStatusBar(str.Data());
1632 static Int_t gy = 0;
1633 static Int_t gx = 0;
1634 static UInt_t gstate = 0;
1648 if (
fPimpl->fRepeatTimer) {
1650 fPimpl->fRepeatTimer->Reset();
1651 fPimpl->fRepeatTimer->Remove();
1706 fPimpl->fButtonPressed) {
1746 !frame || !
fClient->IsEditable()) {
1761 if (!
fPimpl->fSpacePressedFrame) {
1767 context_fr =
fPimpl->fSpacePressedFrame;
1777 fPimpl->fX0 =
event->fXRoot;
1778 fPimpl->fY0 =
event->fYRoot;
1782 fPimpl->fClickFrame = frame;
1796 if (frame ==
fPimpl->fGrab) {
1807 fPimpl->fX =
event->fXRoot;
1808 fPimpl->fY =
event->fYRoot;
1823 if (frame ==
fPimpl->fGrab) {
1868 fPimpl->fX =
event->fXRoot;
1869 fPimpl->fY =
event->fYRoot;
1882 if (
fStop || !frame) {
1982 win =
event->fWindow;
2001 switch (event->
fType) {
2025 static Long_t gLastClick = 0;
2026 static UInt_t gLastButton = 0;
2027 static Int_t gDbx = 0;
2028 static Int_t gDby = 0;
2030 if ((event->
fTime - gLastClick < 350) &&
2031 (event->
fCode == gLastButton) &&
2032 (std::abs(event->
fXRoot - gDbx) < 6) &&
2033 (std::abs(event->
fYRoot - gDby) < 6) &&
2042 }
else if (!(event->
fState & 0xFF)) {
2046 return w->HandleDoubleClick(event);
2056 gDbw =
event->fWindow;
2057 gLastClick =
event->fTime;
2058 gLastButton =
event->fCode;
2059 gDbx =
event->fXRoot;
2060 gDby =
event->fYRoot;
2131 while (parent && (parent !=
fClient->GetDefaultRoot())) {
2184 fBuilder->GetToolDock()->IsUndocked()) {
2185 fBuilder->GetToolDock()->GetUndocked()->RaiseWindow();
2215 event->fUser[0] = fr->
GetId();
2253 event->fUser[0] = w->GetId();
2272 !
fPimpl->fGrab->IsEditable()) {
2314 return ((
TGFrame*)w)->HandleKey(event);
2324 event->fWindow = parent->
GetId();
2327 return ((
TGFrame*)w)->HandleKey(event);
2331 fPimpl->fSpacePressedFrame = 0;
2344 gVirtualX->LookupString(event, tmp,
sizeof(tmp), keysym);
2348 switch ((
EKeySym)keysym & ~0x20) {
2363 if (
fPimpl->fClickFrame && !
fPimpl->fClickFrame->IsEditable()) {
2463 }
else if (
fPimpl->fGrab) {
2511 Int_t x0, y0, xx, yy;
2515 if (!newfr || !newfr->
GetId() || !oldfr || !oldfr->
GetId())
return;
2520 x0 = x0 < 0 ? 0 : x0;
2521 y0 = y0 < 0 ? 0 : y0;
2538 if ((frame->
GetX() >= x0) && (frame->
GetY() >= y0) &&
2542 if (frame ==
fPimpl->fGrab) {
2549 frame->
GetX(), frame->
GetY(), xx, yy,
c);
2578 x0 = std::min(xx,
x);
x = std::max(xx,
x);
2579 y0 = std::min(yy,
y);
y = std::max(yy,
y);
2591 if (list->IsEmpty()) {
2625 fBuilder->UpdateStatusBar(str.Data());
2635 if (
fStop || !cont) {
2645 w = w < 100 ? 100 : w;
2646 h =
h < 100 ? 100 :
h;
2660 fBuilder->UpdateStatusBar(
"Grab action performed. Press Cntrl-Return to Drop grabbed frame.");
2739 x0 = std::min(xx,
x);
x = std::max(xx,
x);
2740 y0 = std::min(yy,
y);
y = std::max(yy,
y);
2755 TString str =
"Grab action performed.";
2756 str +=
" Press Cntrl-Return to Drop grabbed frames.";
2757 str +=
" Press Return for TCanvas Grab";
2758 fBuilder->UpdateStatusBar(str.Data());
2761 }
else if (on &&
fPimpl->fGrab) {
2767 fBuilder->UpdateStatusBar(
"Drop action disabled");
2784 fBuilder->UpdateStatusBar(
"Drop action performed");
2818 x0 = std::min(xx,
x);
x = std::max(xx,
x);
2819 y0 = std::min(yy,
y);
y = std::max(yy,
y);
2833 if ((fr->
GetX() >= x0) && (fr->
GetY() >= y0) &&
2843 else fr->
Move(x0, y0);
2857 else fr->
Move(x0, y0);
2920 str +=
fPimpl->fGrab->GetName();
2921 str +=
" cannot be deleted";
2924 fBuilder->UpdateStatusBar(str.Data());
2933 fClient->GetDefaultRoot()->GetId(),
2954 x0 = std::min(xx,
x);
x = std::max(xx,
x);
2955 y0 = std::min(yy,
y);
y = std::max(yy,
y);
2967 if ((fr->
GetX() >= x0) && (fr->
GetY() >= y0) &&
3009 fBuilder->UpdateStatusBar(crop ?
"Crop action performed" :
"Delete action performed");
3018 if (
fStop || !frame) {
3037 if (frame ==
fPimpl->fGrab) {
3041 fClient->UnregisterWindow(frame);
3074 fPimpl->fGrab->GetWidth(),
3075 fPimpl->fGrab->GetHeight());
3120 str +=
fPimpl->fGrab->GetName();
3121 str +=
" copied to clipboard";
3122 fBuilder->UpdateStatusBar(str.Data());
3150 if (!
fPimpl->fReplaceOn) {
3184 fBuilder->UpdateStatusBar(
"Paste action performed");
3205 str +=
fPimpl->fGrab->GetName();
3206 str +=
" replaced by ";
3210 fBuilder->UpdateStatusBar(str.Data());
3217 fPimpl->fGrab->DestroyWindow();
3270 const char *s =
gSystem->PrependPathName(tmpfile, temp);
3277 f->Resize(
f->GetWidth() + 10,
f->GetHeight() + 10);
3303 if (!file || !file[0]) {
3322 main->SetWMSizeHints(
main->GetDefaultWidth(),
main->GetDefaultHeight(), 10000, 10000, 0, 0);
3327 if (
gVirtualX->InheritsFrom(
"TGX11"))
main->SetIconPixmap(
"bld_rgb.xpm");
3328 main->SaveSource(fname.
Data(), file ?
"keep_names quiet" :
"keep_names");
3346 main->RaiseWindow();
3435static Int_t canResize(TGFrame *frame, Int_t x, Int_t y, UInt_t &w, UInt_t &h)
3437 if (frame->InheritsFrom(TGCompositeFrame::Class())) return 0;
3439 TGCompositeFrame *comp = (TGCompositeFrame*)frame;
3441 TIter next(comp->GetList());
3443 Int_t d = gGuiBldDragManager->GetGridStep();
3446 while ((fe = (TGFrameElement*)next())) {
3447 if (x + fe->fFrame->GetX() + fe->fFrame->GetWidth() > w) {
3448 w = fe->fFrame->GetX() + x + fe->fFrame->GetWidth();
3451 if (y + fe->fFrame->GetY() + fe->fFrame->GetHeight() > h) {
3452 h = fe->fFrame->GetY() + y + fe->fFrame->GetHeight();
3501 switch (
fPimpl->fResizeType) {
3503 if ((((
int)fr->
GetWidth() >
x) || (
x < 0)) &&
3506 if (fr->
GetY() +
y < 2) {
3509 if (fr->
GetX() +
x < 2) {
3532 if ((
x > 0) && (((
int)fr->
GetHeight() >
y) || (
y < 0))) {
3534 if (fr->
GetY() +
y < 2) {
3560 if (fr->
GetY() +
y < 2) {
3572 if ((((
int)fr->
GetWidth() >
x) || (
x < 0)) && (
y > 0)) {
3574 if (fr->
GetX() +
x < 2) {
3597 if ((
x > 0) && (
y > 0)) {
3602 w = fr->
GetX() + w > wp ? wp - fr->
GetX() : w;
3627 if (fr->
GetX() +
x < 2) {
3669 fBuilder->UpdateStatusBar(str.Data());
3705 Bool_t move = (
x > 0) && (
y > 0) && ((
x +
fPimpl->fGrab->GetWidth()) < (w - 0)) &&
3706 ((
y +
fPimpl->fGrab->GetHeight()) < (
h - 30));
3710 if (!move && !
gVirtualX->InheritsFrom(
"TGX11")) {
3721 str +=
fPimpl->fGrab->GetName();
3722 str +=
" is moved to absolute position ";
3724 fBuilder->UpdateStatusBar(str.Data());
3741 while (p && (p !=
fClient->GetDefaultRoot()) &&
3756 if (
fStop || !comp) {
3768 if (
fBuilder->GetMdiMain()->GetCurrent() != comp) {
3820 if (w && (w !=
gVirtualX->GetDefaultRootWindow())) {
3821 win =
fClient->GetWindowById(w);
3840 if ((comp !=
fPimpl->fGrab) && (
x >= 0) && (
y >= 0) &&
3893 static Int_t gy =
event->fYRoot;
3894 static Int_t gx =
event->fXRoot;
3914 fPimpl->fX =
event->fXRoot;
3915 fPimpl->fY =
event->fYRoot;
3965 x =
x > x0 ? x0 :
x;
3966 y =
y > y0 ? y0 :
y;
3983 frame->
Resize(w < grid ? grid : w,
h < grid ? grid :
h);
3986 frame->
Resize(w < grid ? 15*grid : w,
h < grid ? 30*grid :
h);
3988 frame->
Resize(w < grid ? 30*grid : w,
h < grid ? 15*grid :
h);
3990 else frame->
Resize(w < 2*grid ? 2*grid : w,
h < 2*grid ? 2*grid :
h);
4023 fBuilder->UpdateStatusBar(str.Data());
4027 frame = ((
TGCanvas*)frame)->GetContainer();
4059 if ((
x == x0) || (
y==y0 ))
return;
4062 x0 = x0 < 0 ? 0 : x0;
4072 y0 = y0 < 0 ? 0 : y0;
4091 xswap ?
x : x0, yswap ?
y : y0,
4094 xswap ? x0 :
x, yswap ? y0 :
y,
4110 TString str =
"Lasso drawn. Align frames inside or press Return key to grab frames.";
4111 fBuilder->UpdateStatusBar(str.Data());
4132 if (!root || (root ==
fClient->GetDefaultRoot())) {
4223 while (parent && (parent !=
fClient->GetDefaultRoot())) {
4245 while (parent && (parent !=
fClient->GetDefaultRoot())) {
4269 if (
fPimpl->fSpacePressedFrame) {
4272 mov =
fPimpl->fSpacePressedFrame;
4274 fPimpl->fSpacePressedFrame = 0;
4295 fPimpl->fRepeatTimer->Reset();
4357 fPimpl->fSpacePressedFrame = 0;
4408 (w !=
fClient->GetDefaultRoot())) {
4425 }
else if (parent && frame && (parent !=
fClient->GetDefaultRoot()) ) {
4437 if (parent && frame && (parent !=
fClient->GetDefaultRoot())) {
4456 str +=
" dropped into ";
4460 str +=
" at position ";
4462 fBuilder->UpdateStatusBar(str.Data());
4467 if (parent && (parent ==
fPimpl->fGrabParent) &&
fPimpl->fGrabListPosition &&
4488 fPimpl->fGrabListPosition = 0;
4560 if ((
d.fWidth > 10) && (
d.fHeight > 10)) {
4562 }
else if (
d.fWidth > 10) {
4564 }
else if (
d.fHeight > 10) {
4582 if ((
d.fWidth > 10) && (
d.fHeight > 10)) {
4584 }
else if (
d.fWidth > 10) {
4586 }
else if (
d.fHeight > 10) {
4616 if ((gon == on) && (
fClient->GetRoot() == gw)) {
4620 gon = on; gw =
fClient->GetRoot();
4625 if (
fPimpl->fRepeatTimer) {
4626 fPimpl->fRepeatTimer->Reset();
4637 if (
fPimpl->fRepeatTimer) {
4638 fPimpl->fRepeatTimer->Remove();
4669 if (on &&
fClient->IsEditable()) {
4690 fPimpl->fLastPopupAction = act;
4886 fEditor->Connect(
"UpdateSelected(TGFrame*)",
"TGuiBldDragManager",
this,
4887 "HandleUpdateSelected(TGFrame*)");
4917 fPimpl->fGrab->SetFrameElement(el);
4929 fPimpl->fGrab->SetFrameElement(el);
4959 if (!root || (root ==
fClient->GetDefaultRoot())) {
4963 if (
fPimpl->fGrid->fgStep > 1) {
4964 fPimpl->fGrid->SetStep(1);
4966 fBuilder->UpdateStatusBar(
"Grid switched OFF");
4972 fBuilder->UpdateStatusBar(
"Grid switched ON");
5006 const TGWindow *parent =
f->GetParent();
5009 while (parent && (parent !=
fClient->GetDefaultRoot())) {
5027 if (
f->GetParent() &&
5063 if (
fPimpl->fGrabRectHidden) {
5072 for (i = 0; i < 8; i++)
fPimpl->fGrabRect[i]->UnmapWindow();
5073 for (i = 0; i < 4; i++)
fPimpl->fAroundFrame[i]->UnmapWindow();
5145 str +=
" layout cannot be broken";
5146 fBuilder->UpdateStatusBar(str.Data());
5155 str += (frame->
IsLayoutBroken() ?
" Disable Layout" :
" Enable Layout");
5156 fBuilder->UpdateStatusBar(str.Data());
5191 str +=
" Vertical Layout ON";
5192 fBuilder->UpdateStatusBar(str.Data());
5202 str +=
" Horizontal Layout ON";
5203 fBuilder->UpdateStatusBar(str.Data());
5249 if (!fr || (fr ==
fClient->GetDefaultRoot())) {
5255 while (parent && (parent !=
fClient->GetDefaultRoot())) {
5270 if (p1 ==
kNPOS)
return "";
5274 if (p2 ==
kNPOS)
return "";
5276 return in(p1, p2-p1);
5286 if (str.Contains(cl->
GetName())) {
5293 while ((bc = (
TBaseClass*)nextBaseClass())) {
5310 if (!menu || !
object) {
5322 while ((method = (
TMethod*) next())) {
5345 if (!menu || !
object) {
5349 TList *menuItemList;
5363 TIter nextItem(menuItemList);
5369 switch (menuItem->
GetType()) {
5375 methodList =
new TList;
5378 TIter next(methodList);
5380 while ((method = (
TMethod*) next())) {
5381 if (classPtr != method->
GetClass()) {
5400 if (
m->GetterMethod()) {
5403 fPimpl->fFrameMenuTrash->Add(
r);
5404 TIter nxt(
m->GetOptions());
5414 fPimpl->fFrameMenuTrash->Add(t);
5418 if (t->
GetState())
r->CheckEntryByData(t);
5431 fPimpl->fFrameMenuTrash->Add(t);
5454 fPimpl->fFrameMenuTrash->Add(t);
5460 const char* menuItemTitle = menuItem->
GetTitle();
5461 if (strlen(menuItemTitle)==0) menuItemTitle = menuItem->
GetFunctionName();
5488 if (!me || !
fPimpl->fMenuObject) {
5494 if (str.Contains(
"*DIALOG")) {
5496 str2.
Form(
"((TGuiBldDragManager*)0x%zx)->%s((%s*)0x%zx)", (
size_t)
this, method->
GetName(),
5497 fPimpl->fMenuObject->ClassName(), (
size_t)
fPimpl->fMenuObject);
5530 fPimpl->fFrameMenuTrash->Delete();
5576 fPimpl->fClickFrame = frame;
5596 fFrameMenu->Connect(
"Activated(Int_t)",
"TGuiBldDragManager",
this,
"DoClassMenu(Int_t)");
5608 0,
fClient->GetPicture(
"bld_paste.png"));
5611 0,
fClient->GetPicture(
"bld_compact.png"));
5613 0,
fClient->GetPicture(
"bld_grid.png"));
5615 0,
fClient->GetPicture(
"bld_save.png"));
5617 0,
fClient->GetPicture(
"bld_stop.png"));
5642 0,
fClient->GetPicture(
"bld_cut.png"));
5646 0,
fClient->GetPicture(
"bld_copy.png"));
5651 0,
fClient->GetPicture(
"bld_paste.png"));
5656 0,
fClient->GetPicture(
"bld_delete.png"));
5661 0,
fClient->GetPicture(
"bld_crop.png"));
5673 0,
fClient->GetPicture(
"bld_paste.png"));
5682 const char *label = (frame->
IsLayoutBroken() ?
"Allow Layout\tCtrl+B" :
5683 "Break Layout\tCtrl+B");
5685 0,
fClient->GetPicture(
"bld_break.png"));
5692 0,
fClient->GetPicture(
"bld_compact.png"));
5695 0,
fClient->GetPicture(
"bld_compact.png"));
5704 0,
fClient->GetPicture(
"bld_hbox.png"));
5707 0,
fClient->GetPicture(
"bld_vbox.png"));
5724 0,
fClient->GetPicture(
"bld_grid.png"));
5727 fPimpl->fSaveGrab = frame;
5729 0,
fClient->GetPicture(
"bld_save.png"));
5733 fFrameMenu->Connect(
"Activated(Int_t)",
"TGuiBldDragManager",
this,
"HandleAction(Int_t)");
5760 0,
fClient->GetPicture(
"bld_delete.png"));
5762 0,
fClient->GetPicture(
"bld_crop.png"));
5765 0,
fClient->GetPicture(
"bld_AlignLeft.png"));
5767 0,
fClient->GetPicture(
"bld_AlignRight.png"));
5769 0,
fClient->GetPicture(
"bld_AlignTop.png"));
5771 0,
fClient->GetPicture(
"bld_AlignBtm.png"));
5773 fLassoMenu->Connect(
"Activated(Int_t)",
"TGuiBldDragManager",
this,
"HandleAction(Int_t)");
5801 for (i = 0; i < 10; i++) {
5804 for (i = 0; i < 10; i++) {
5859 cd->
Connect(
"ColorSelected(Pixel_t)",
"TGFrame", fr,
"ChangeBackground(Pixel_t)");
5873 cd->
Connect(
"ColorSelected(Pixel_t)",
"TGCompositeFrame", fr,
5874 "ChangeSubframesBackground(Pixel_t)");
5895 cd->
Connect(
"ColorSelected(Pixel_t)",
"TGGroupFrame", fr,
"SetTextColor(Pixel_t)");
5923 fd->
Connect(
"FontSelected(char*)",
"TGGroupFrame", fr,
"SetTextFont(char*)");
5924 fd->
Connect(
"ColorSelected(Pixel_t)",
"TGGroupFrame", fr,
"SetTextColor(Pixel_t)");
5953 fd->
Connect(
"FontSelected(char*)",
"TGTextButton", fr,
"SetFont(char*)");
5954 fd->
Connect(
"ColorSelected(Pixel_t)",
"TGTextButton", fr,
"SetTextColor(Pixel_t)");
5955 fd->
Connect(
"AlignSelected(Int_t)",
"TGTextButton", fr,
"SetTextJustify(Int_t)");
5977 cd->
Connect(
"ColorSelected(Pixel_t)",
"TGTextButton", fr,
"SetTextColor(Pixel_t)");
6027 if (tmp)
fClient->FreePicture(tmp);
6033 if (tmp)
fClient->FreePicture(tmp);
6046 cd->
Connect(
"ColorSelected(Pixel_t)",
"TGFrame", fr,
"ChangeBackground(Pixel_t)");
6047 cd->
Connect(
"ColorSelected(Pixel_t)",
"TGScrollBar", fr->
GetHScrollbar(),
"ChangeBackground(Pixel_t)");
6048 cd->
Connect(
"ColorSelected(Pixel_t)",
"TGScrollBar", fr->
GetVScrollbar(),
"ChangeBackground(Pixel_t)");
6067 "ChangeBackground(Pixel_t)");
6072 cd->
Connect(
"ColorSelected(Pixel_t)",
"TGLBEntry", se,
6073 "SetBackgroundColor(Pixel_t)");
6079 cd->
Connect(
"ColorSelected(Pixel_t)",
"TGTextEntry", te,
6080 "SetBackgroundColor(Pixel_t)");
6120 fd->
Connect(
"FontSelected(char*)",
"TGLabel", fr,
"SetTextFont(char*)");
6121 fd->
Connect(
"ColorSelected(Pixel_t)",
"TGLabel", fr,
"SetTextColor(Pixel_t)");
6122 fd->
Connect(
"AlignSelected(Int_t)",
"TGLabel", fr,
"SetTextJustify(Int_t)");
6145 cd->
Connect(
"ColorSelected(Pixel_t)",
"TGLabel", fr,
"SetTextColor(Pixel_t)");
6162 cd->
Connect(
"ColorSelected(Pixel_t)",
"TGListBox", fr,
"ChangeBackground(Pixel_t)");
6180 cd->
Connect(
"ColorSelected(Pixel_t)",
"TGProgressBar", fr,
"SetBarColor(Pixel_t)");
6202 cd->
Connect(
"ColorSelected(Pixel_t)",
"TGProgressBar", fr,
6203 "SetForegroundColor(Pixel_t)");
6220 cd->
Connect(
"ColorSelected(Pixel_t)",
"TGTextEntry", fr,
"SetTextColor(Pixel_t)");
6237 TGFont *font =
fClient->GetResourcePool()->GetFontPool()->FindFont(fs);
6244 fd->
Connect(
"FontSelected(char*)",
"TGTextEntry", fr,
"SetFont(char*)");
6245 fd->
Connect(
"ColorSelected(Pixel_t)",
"TGTextEntry", fr,
"SetTextColor(Pixel_t)");
6251 int tw, max_ascent, max_descent;
6259 gVirtualX->GetFontProperties(fs, max_ascent, max_descent);
6260 fr->
Resize(tw + 8, max_ascent + max_descent + 7);
const Mask_t kWAOverrideRedirect
const Mask_t kButtonPressMask
const Mask_t kWASaveUnder
Handle_t Pixmap_t
Pixmap handle.
const Mask_t kKeyPressMask
const Mask_t kButton1Mask
const Mask_t kKeyShiftMask
const Mask_t kKeyControlMask
const Mask_t kButton3Mask
const Mask_t kButton2Mask
Handle_t FontStruct_t
Pointer to font structure.
ULong_t Pixel_t
Pixel value.
Handle_t Window_t
Window handle.
int Int_t
Signed integer 4 bytes (int).
long Longptr_t
Integer large enough to hold a pointer (platform-dependent).
unsigned int UInt_t
Unsigned integer 4 bytes (unsigned int).
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.
bool Bool_t
Boolean (0=false, 1=true) (bool).
double Double_t
Double 8 bytes.
constexpr Ssiz_t kNPOS
The equivalent of std::string::npos for the ROOT class TString.
long long Long64_t
Portable signed long integer 8 bytes.
float Float_t
Float 4 bytes (float).
void Warning(const char *location, const char *msgfmt,...)
Use this function in warning situations.
ErrorHandlerFunc_t SetErrorHandler(ErrorHandlerFunc_t newhandler)
Set an errorhandler function. Returns the old handler.
static const char * gSaveMacroTypes[]
@ kMWMInputFullApplicationModal
static Bool_t containBaseClass(const char *somestring, TClass *cl)
Helper.
static TString CreateArgumentTitle(TMethodArg *argument)
Create a string describing method argument.
static Window_t GetWindowFromPoint(Int_t x, Int_t y)
Helper. Return a window located at point x,y (in screen coordinates).
static TGuiBldDragManager * gGuiBldDragManager
static TGuiBldMenuDialog * gMenuDialog
static TString FindMenuIconName(TString &in)
Return a name of icon.
static void GuiBldErrorHandler(Int_t, Bool_t, const char *, const char *)
Our own error handler (not used yet).
static const char * gImageTypes[]
static void layoutFrame(TGFrame *frame)
Helper to layout.
static Bool_t IsParentOfGrab(Window_t id, const TGWindow *grab)
Helper for IsPointVisible.
externTInterpreter * gCling
externTVirtualDragManager * gDragManager
externAtom_t gROOT_MESSAGE
externAtom_t gWM_DELETE_WINDOW
Each class (see TClass) has a linked list of its base class(es).
TClass * GetClassPointer(Bool_t load=kTRUE)
Get pointer to the base class TClass.
TClass instances represent classes, structs and namespaces in the ROOT type system.
TList * GetMenuList() const
Return the list of menu items associated with the class.
TMethod * GetMethodWithPrototype(const char *method, const char *proto, Bool_t objectIsConst=kFALSE, ROOT::EFunctionMatchMode mode=ROOT::kConversionMatch)
Find the method with a given prototype.
TList * GetListOfMethods(Bool_t load=kTRUE)
Return list containing the TMethods of a class.
TList * GetListOfBases()
Return list containing the TBaseClass(es) of a class.
Long_t Property() const override
Returns the properties of the TClass as a bit field stored as a Long_t value.
void GetMenuItems(TList *listitems)
Returns list of methods accessible by context menu.
TClass * IsA() const override
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.
virtual Int_t GetEntries() const
virtual Bool_t IsEmpty() const
virtual Int_t GetSize() const
Return the capacity of the collection, i.e.
static ULong_t RGB2Pixel(Int_t r, Int_t g, Int_t b)
static ULong_t Number2Pixel(Int_t ci)
All ROOT classes may have RTTI (run time type identification) support added.
Basic data type descriptor (datatype information is obtained from CINT).
TString GetTypeName()
Get basic type of typedef, e,g.: "class TDirectory*" -> "TDirectory".
const char * GetSignature()
Return signature of function.
~TGAroundFrame() override
A frame containing two scrollbars (a horizontal and a vertical) and a viewport.
virtual void SetContainer(TGFrame *f)
TGFrame * GetContainer() const
TGVScrollBar * GetVScrollbar() const
TGViewPort * GetViewPort() const
void MapSubwindows() override
Map all canvas sub windows.
TGHScrollBar * GetHScrollbar() const
A full featured color selection dialog.
virtual void SetCurrentColor(Pixel_t col)
Change current color.
A combobox (also known as a drop down listbox) allows the selection of one item out of a list of item...
virtual TGLBEntry * GetSelectedEntry() const
virtual TGTextEntry * GetTextEntry() const
virtual TGListBox * GetListBox() const
The base class for composite widgets (menu bars, list boxes, etc.).
TGDimension GetDefaultSize() const override
std::cout << fWidth << "x" << fHeight << std::endl;
virtual void AddFrame(TGFrame *f, TGLayoutHints *l=nullptr)
Add frame to the composite frame using the specified layout hints.
virtual TList * GetList() const
UInt_t GetDefaultWidth() const override
virtual TGLayoutManager * GetLayoutManager() const
Bool_t HandleDragEnter(TGFrame *) override
Handle drag enter event.
void MapSubwindows() override
Map all sub windows that are part of the composite frame.
UInt_t GetDefaultHeight() const override
void Layout() override
Layout the elements of the composite frame.
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
virtual void RemoveFrame(TGFrame *f)
Remove frame from composite frame.
void SetEditable(Bool_t on=kTRUE) override
Switch ON/OFF edit mode.
void SetEditDisabled(UInt_t on=1) override
Set edit disable flag for this frame and subframes.
void ChangeOptions(UInt_t options) override
Change composite frame options. Options is an OR of the EFrameTypes.
void SetLayoutBroken(Bool_t on=kTRUE) override
Set broken layout. No Layout method is called.
This class creates a file selection dialog.
char * fFilename
selected file name
const char ** fFileTypes
file types used to filter selectable files
char * fIniDir
on input: initial directory, on output: new directory
Bool_t fOverwrite
if true overwrite the file with existing name on save
void SetIniDir(const char *inidir)
Set directory name.
Font selection dialog, allowing to select one in the list of available fonts in the system.
virtual void SetAlign(Int_t align)
Set align.
virtual void SetFont(TGFont *font)
Set font.
virtual void EnableAlign(Bool_t on=kTRUE)
Enable/disable align combobox.
virtual void SetColor(Pixel_t color)
Set color.
Encapsulate fonts used in the GUI system.
A subclasses of TGWindow, and is used as base class for some simple widgets (buttons,...
virtual TGDimension GetDefaultSize() const
std::cout << fWidth << "x" << fHeight << std::endl;
void AddInput(UInt_t emask)
Add events specified in the emask to the events the frame should handle.
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.
virtual Bool_t IsLayoutBroken() const
static const TGGC & GetBlackGC()
Get black graphics context.
void Resize(UInt_t w=0, UInt_t h=0) override
Resize the frame.
Int_t GetBorderWidth() const
virtual Bool_t HandleKey(Event_t *)
TGFrame(const TGFrame &)=delete
static Pixel_t GetWhitePixel()
Get white pixel value.
virtual UInt_t GetDefaultWidth() const
virtual UInt_t GetDefaultHeight() const
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 SetBackgroundColor(Pixel_t back) override
Set background color (override from TGWindow base class).
void MapWindow() override
map window
TGFrameElement * GetFrameElement() const
virtual void SetLayoutBroken(Bool_t=kTRUE)
void Move(Int_t x, Int_t y) override
Move frame.
TClass * IsA() const override
virtual UInt_t GetOptions() const
void UnmapWindow() override
unmap window
static const TGGC & GetShadowGC()
Get shadow color graphics context.
virtual Bool_t HandleButton(Event_t *)
void SetFrameElement(TGFrameElement *fe)
virtual void SetCleanup(Int_t=kLocalCleanup)
void MapSubwindows() override
map sub windows
virtual Pixel_t GetBackground() const
virtual Bool_t HandleDragDrop(TGFrame *, Int_t, Int_t, TGLayoutHints *)
void SetEditable(Bool_t) override
static const TGGC & GetBckgndGC()
Get background color graphics context.
void MapRaised() override
map raised
Encapsulate a graphics context used in the low level graphics.
Pixel_t GetForeground() const
TGGrabRect(Int_t type)
ctor.
Bool_t HandleButton(Event_t *ev) override
Handle button press event.
A composite frame with a border and a title.
FontStruct_t GetFontStruct() const
GContext_t GetNormGC() const
A composite frame that layout their children in horizontal way.
This class handles GUI icons.
virtual void SetImage(const char *img)
Set icon image.
virtual void SetImagePath(const char *path)
Set directory where image is located.
This class handles GUI labels.
FontStruct_t GetFontStruct() const
Int_t GetTextJustify() const
GContext_t GetNormGC() const
This class describes layout hints used by the layout classes.
TClass * IsA() const override
A listbox is a box, possibly with scrollbar, containing entries.
virtual void SaveSource(const char *filename="Rootappl.C", Option_t *option="")
Save the GUI main frame widget in a C++ macro file.
void SetClassHints(const char *className, const char *resourceName)
Set the windows class and resource name.
void SetIconName(const char *name)
Set window icon name. This is typically done via the window manager.
void SetWMSize(UInt_t w, UInt_t h)
Give the window manager a window size hint.
void SetWMPosition(Int_t x, Int_t y)
Give the window manager a window position hint.
void SetWindowName(const char *name=nullptr) override
Set window name. This is typically done via the window manager.
void SetMWMHints(UInt_t value, UInt_t funcs, UInt_t input)
Set decoration style for MWM-compatible wm (mwm, ncdwm, fvwm?).
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 TGPicture * SetIconPixmap(const char *iconName)
Set window icon pixmap by name.
This file contains all different MDI frame decoration classes.
TGMdiTitleBar * GetTitleBar() const
void MoveResize(Int_t x, Int_t y, UInt_t w, UInt_t h) override
Move the MDI window at position x, y and set size to w, h.
This file contains the TGMdiFrame class.
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.
The classes in this file implement progress bars.
Pixel_t GetBarColor() const
GContext_t GetNormGC() const
A text buffer is used in several widgets, like TGTextEntry, TGFileDialog, etc.
UInt_t GetBufferLength() const
UInt_t GetTextLength() const
Yield an action as soon as it is clicked.
FontStruct_t GetFontStruct() const
Int_t GetTextJustify() const
A TGTextEntry is a one line text input widget.
TGTextBuffer * GetBuffer() const
const char * GetText() const
FontStruct_t GetFontStruct() const
Pixel_t GetTextColor() const
TGTransientFrame(const TGTransientFrame &)=delete
ROOT GUI Window base class.
virtual const TGWindow * GetMainFrame() const
Returns top level main frame.
virtual UInt_t GetEditDisabled() const
virtual void SetBackgroundPixmap(Pixmap_t pixmap)
set background pixmap
virtual void RequestFocus()
request focus
virtual void SetEditable(Bool_t on=kTRUE)
@ kEditDisableBtnEnable
window can handle mouse button events
@ kEditDisableGrab
window grab cannot be edited
@ kEditDisable
disable edit of this window
@ kEditDisableKeyEnable
window can handle keyboard events
virtual void SetWindowName(const char *name=nullptr)
Set window name.
const TGWindow * GetParent() const
TString fName
name of the window used in SavePrimitive()
const char * GetName() const override
Return unique name, used in SavePrimitive methods.
void SetStep(UInt_t step)
Set the grid step.
TGuiBldDragManagerGrid()
Create a grid background for the selected window.
void Draw()
Draw grid over edited frame.
void InitPixmap()
Create grid background pixmap.
void InitBgnd()
Create grid background.
~TGuiBldDragManagerGrid()
ctor.
TGFrame * fAroundFrame[4]
TGGrabRect * fGrabRect[8]
TGuiBldDragManagerGrid * fGrid
friend class TGuiBldDragManager
TGFrameElement * fGrabListPosition
const TGWindow * fGrabParent
TGFrame * fSpacePressedFrame
TGuiBldDragManagerPimpl(TGuiBldDragManager *m)
TGuiBldDragManager * fManager
~TGuiBldDragManagerPimpl()
TGLayoutHints * fGrabLayout
TGuiBldDragManager * fManager
Bool_t Notify() override
This method must be overridden to handle object notification (the base implementation is no-op).
TGuiBldDragManagerRepeatTimer(TGuiBldDragManager *m, Long_t ms)
Drag and drop manager used by the ROOT GUI Builder.
TGFrame * GetEditableParent(TGFrame *f)
Return the parent frame which can be edited.
void ChangeSelected(TGFrame *f)
Inform outside wold that selected frame was changed.
Bool_t HandleEvent(Event_t *) override
Handle all events.
Bool_t EndDrag() override
End dragging.
void HandleAction(Int_t act)
Main handler of actions.
Bool_t IsFixedH(TGWindow *f) const
void DoDialogCancel()
Process dialog Cancel button pressed.
void DeleteMenuDialog()
Delete dialog and trash.
void SetCursorType(Int_t cur)
Set cursor for selected/grabbed frame.
void SwitchLayout()
Switch Horizontal/Vertical layout of selected/grabbed composite frame.
void ChangeImage(TGIcon *)
Invoke file dialog to assign a new image.
void DoClassMenu(Int_t)
Process a method chosen via frame context menu.
Bool_t IsMoveWaiting() const
Waits for either the mouse move from the given initial ButtonPress location or for the mouse button t...
void ChangeTextFont(TGGroupFrame *)
Change text font via font selection dialog.
Bool_t CheckDragResize(Event_t *event)
Check resize type event.
void SelectFrame(TGFrame *frame, Bool_t add=kFALSE)
Grab/Select frame.
TGFrame * InEditable(Window_t id)
Return a pointer to the parent window (which is being edited).
Bool_t CanChangeLayoutOrder(TGWindow *w) const
kTRUE - if it's possible to change layout order in the parent's layout of window w
Bool_t Cancel(Bool_t delSrc) override
Do cancel action.
void HandlePaste()
Handle paste action.
void Snap2Grid()
Draw grid on editable frame and restore background on previously edited one.
Bool_t IsPointVisible(Int_t x, Int_t y)
Helper function for IsSelectedWindow method.
void PutToCanvas(TGCompositeFrame *cont)
Create a new TGCanvas and place container into it.
void CheckTargetUnderGrab()
Look for the drop target under grabbed/selected frame while moving.
friend class TRootGuiBuilder
void HideGrabRectangles()
Hide/Unmap grab rectangles.
Int_t GetEndDragX() const override
Return the current X coordinate of the dragged frame.
void CreatePropertyEditor()
Create widget property editor (it could be located outside of guibuilder).
void SetGridStep(UInt_t step)
Set the grid step.
friend class TGuiBldMenuDialog
Bool_t HandleButton(Event_t *) override
Handle button event occurred in some ROOT frame.
void Compact(Bool_t global=kTRUE)
Layout and Resize frame.
void DrawLasso()
Draw lasso for allocation new object.
void Menu4Frame(TGFrame *, Int_t x, Int_t y)
Create and place context menu for selected frame.
friend class TGuiBldDragManagerRepeatTimer
void RaiseMdiFrame(TGFrame *in)
Raise guibuilder's mdi frame.
void DeleteFrame(TGFrame *frame)
Delete frame.
void DoDialogApply()
Process dialog Apply button pressed.
void DoMove()
Handle move.
Bool_t IgnoreEvent(Event_t *e) override
Return kTRUE if event is rejected for processing by drag manager.
void ChangeBarColor(TGProgressBar *)
Set progress bar color via TGColorDialog.
void HandleDelete(Bool_t crop=kFALSE)
Handle delete or crop action.
void Menu4Lasso(Int_t x, Int_t y)
Create context menu for lasso actions.
Int_t GetEndDragY() const override
Returns the current Y coordinate of the dragged frame.
void ReparentFrames(TGFrame *newfr, TGCompositeFrame *oldfr)
Reparent frames.
Bool_t HandleExpose(Event_t *) override
Handle repaint event.
void HandleLayoutOrder(Bool_t forward=kTRUE)
Change layout order.
void CloneEditable()
Create a frame which is the same as currently edited frame.
void HandleReplace()
Handle replace.
void DoDialogOK()
Process dialog OK button pressed.
TList * GetFramesInside(Int_t x0, Int_t y0, Int_t x, Int_t y)
Return the list of frames inside of some area.
void DoResize()
handle resize
Int_t GetStrartDragX() const override
Return the X coordinate where drag started.
Int_t GetStrartDragY() const override
Return the Y coordinate where drag started.
TGCompositeFrame * FindCompositeFrame(Window_t id)
Find the first composite parent of window.
Bool_t HandleButtonPress(Event_t *)
Handle button press event.
void HandleButon3Pressed(Event_t *, TGFrame *frame=nullptr)
Handle 3d mouse pressed (popup context menu).
void TimerEvent(Event_t *ev)
void HandleAlignment(Int_t to, Bool_t lineup=kFALSE)
Align frames located inside lasso area.
Bool_t SaveFrame(const char *file=nullptr)
Save composite frame as macro.
void SwitchEditable(TGFrame *frame)
Switch editable.
void DrawGrabRect(Int_t i, Int_t x, Int_t y)
Helper method to draw grab rectangle at position x,y.
void SetEditable(Bool_t on=kTRUE) override
Grab server.
void UnmapAllPopups()
Unmap all popups.
void ChangePicture(TGPictureButton *)
Invoke file dialog to assign a new picture.
Bool_t IsEditDisabled(TGWindow *f) const
TGFrame * FindMdiFrame(TGFrame *in)
Return a pointer to the parent mdi frame.
Bool_t HandleTimerEvent(Event_t *ev, TTimer *t) override
Handle timer events or events coming from the recorder.
void ChangeBackgroundColor(TGListBox *)
Set background color for list box entries.
Bool_t HandleSelectionRequest(Event_t *) override
not used yet.
TGuiBldDragManagerPimpl * fPimpl
Bool_t CanCompact(TGWindow *w) const
kTRUE is frame could be compacted/"laid out"
void CloseMenus()
Helper to close all menus.
void GrabFrame(TGFrame *frame)
grab frame (see SelectFrame)
void AddClassMenuMethods(TGPopupMenu *menu, TObject *object)
Add entries with class //*MENU* methods.
void HandleCopy(Bool_t brk_layout=kTRUE)
Handle copy.
void ToGrid(Int_t &x, Int_t &y)
Return grid coordinates which are close to given.
void CreateListOfDialogs()
Create a list of dialog methods.
static TGFontDialog * fgGlobalFontDialog
void SetLassoDrawn(Bool_t on)
Set lasso drawn flag.
Bool_t IsFixedW(TGWindow *f) const
void HandleCut()
Handle cut action.
TGWindow * GetResizableParent(TGWindow *p)
Find parent frame which can be resized.
Bool_t Drop() override
Drop grabbed frame.
static void MapGlobalDialog(TGMainFrame *dialog, TGFrame *fr)
Map dialog and place it relative to selected frame.
void HandleReturn(Bool_t on=kFALSE)
Handling of return/enter key pressing.
UInt_t GetGridStep()
Return the grid step.
Bool_t HandleButtonRelease(Event_t *)
Handle button release event.
static TGFontDialog * GetGlobalFontDialog()
Create global font dialog.
void Reset1()
Reset some parameters.
Bool_t HandleDestroyNotify(Event_t *)
Handle destroy notify.
Bool_t HandleClientMessage(Event_t *) override
Handle client message.
Bool_t HandleSelection(Event_t *) override
not used yet.
void PlaceFrame(TGFrame *, TGLayoutHints *)
Put created frame at position of the last mouse click.
Bool_t IsFixedLayout(TGWindow *f) const
Bool_t HandleTimer(TTimer *) override
The main event loop is originated here It repeatedly queries pointer state and position on the screen...
void SetPropertyEditor(TGuiBldEditor *e)
Helper method.
Bool_t CheckTargetAtPoint(Int_t x, Int_t y)
Helper. Look for the drop target under grabbed/selected frame while moving.
TGFrame * GetMovableParent(TGWindow *p)
Find parent frame which can be dragged.
Bool_t HandleMotion(Event_t *) override
Handle motion event.
void DrawGrabRectangles(TGWindow *win=nullptr)
Draw small grab rectangles around grabbed/selected/frame.
static TGColorDialog * fgGlobalColorDialog
void DoRedraw() override
Redraw the edited window.
Bool_t IsFixedSize(TGWindow *f) const
~TGuiBldDragManager() override
Destructor.
void HighlightCompositeFrame(Window_t)
Raise composite frame when mouse is moving over it.
Bool_t HandleConfigureNotify(Event_t *) override
Resize events.
void DoReplace(TGFrame *frame)
Replace frame (doesn't work yet properly).
friend class TGuiBldEditor
Bool_t StartDrag(TGFrame *src, Int_t x, Int_t y) override
Start dragging.
void HandleGrid()
Switch on/of grid drawn.
Bool_t CanChangeLayout(TGWindow *w) const
kTRUE - if it's possible to switch disable/enable layout
Bool_t Save(const char *file="")
Save an edited frame to the file.
void BreakLayout()
Disable/Enable layout for selected/grabbed composite frame.
Bool_t IsPasteFrameExist()
Return kTRUE if paste frame exist.
void UngrabFrame()
Ungrab/Unselect selected/grabbed frame.
Bool_t HandleKey(Event_t *) override
Handle key event.
TRootGuiBuilder * fBuilder
void DropCanvas(TGCanvas *canvas)
Drop canvas container.
void ChangeProperties(TGLabel *)
Edit properties via font selection dialog.
Bool_t IsEventsDisabled(TGWindow *f) const
void AddDialogMethods(TGPopupMenu *menu, TObject *object)
Add DIALOG entries to the selected frame popup menu.
Bool_t IsSelectedVisible()
Return kTRUE if grabbed/selected frame is not overlapped by other windows.
Bool_t RecognizeGesture(Event_t *, TGFrame *frame=nullptr)
Recognize what was done when mouse button pressed.
void DeletePropertyEditor()
Delete widget property editor.
static TGColorDialog * GetGlobalColorDialog(Bool_t create=kTRUE)
Return pointer to global color dialog.
TGCompositeFrame * FindLayoutFrame(TGFrame *f)
Helper to find a frame which can be laid out.
TGFrame * GetBtnEnableParent(TGFrame *fr)
Return a parent which can handle button events.
TGFrame * GetSelected() const
Return the current grabbed/selected frame.
void HandleUpdateSelected(TGFrame *)
When selected frame was changed by guibuilder editor -> update its appearance.
Bool_t IsGrabDisabled(TGWindow *f) const
void ChangeTextColor(TGGroupFrame *)
Change text color via color selection dialog.
Bool_t HandleDoubleClick(Event_t *) override
Mouse double click handler (never should happen).
static TGuiBuilder * Instance()
return an instance of TGuiBuilder object
An abstract interface to image processing library.
static TImage * Open(const char *file, EImageFileTypes type=kUnknown)
Open a specified image file.
static TImage * Create()
Create an image.
virtual void FromWindow(Drawable_t, Int_t=0, Int_t=0, UInt_t=0, UInt_t=0)
void AddAfter(const TObject *after, TObject *obj) override
Insert object after object after in the list.
TObject * After(const TObject *obj) const override
Returns the object after object obj.
TObject * Before(const TObject *obj) const override
Returns the object before object obj.
void Add(TObject *obj) override
TObject * Remove(TObject *obj) override
Remove object from the list.
TObject * Last() const override
Return the last object in the list. Returns 0 when list is empty.
TObject * First() const override
Return the first object in the list. Returns 0 when list is empty.
TClass * IsA() const override
Each ROOT method (see TMethod) has a linked list of its arguments.
const char * GetDefault() const
Get default value of method argument.
const char * GetTypeName() const
Get type of method argument, e.g.: "class TDirectory*" -> "TDirectory" Result needs to be used or cop...
TDataMember * GetDataMember() const
Returns TDataMember pointed by this methodarg.
Each ROOT class (see TClass) has a linked list of methods.
virtual const char * GetCommentString()
Returns a comment string from the class declaration.
virtual TDataMember * FindDataMember()
Tries to guess DataMember from comment string and Method's name <==(only if 1 Argument!...
TClass * GetClass() const
EMenuItemKind IsMenuItem() const
TClass * IsA() const override
const char * GetName() const override
Returns name of object.
const char * GetTitle() const override
Returns title of object.
Collectable string class.
Mother of all ROOT objects.
virtual const char * ClassName() const
Returns name of class to which the object belongs.
virtual Bool_t InheritsFrom(const char *classname) const
Returns kTRUE if object inherits from class "classname".
virtual TClass * IsA() const
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.
Bool_t Disconnect(const char *signal=nullptr, void *receiver=nullptr, const char *slot=nullptr)
Disconnects signal of this object from slot of receiver.
static TGGC * GetPopupHlghtGC()
Return background GC for highlighted popup menu entry.
static TGPopupMenu * CreatePopup()
Return style popup menu.
Bool_t EndsWith(const char *pat, ECaseCompare cmp=kExact) const
Return true if string ends with the specified string.
const char * Data() const
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString.
void Form(const char *fmt,...)
Formats a string using a printf style format descriptor.
Ssiz_t Index(const char *pat, Ssiz_t i=0, ECaseCompare cmp=kExact) const
Handles synchronous and a-synchronous timer events.
void Reset()
Reset the timer.
void SetTime(Long_t milliSec)
TTimer(const TTimer &)=delete
This class defines toggling facility for both - object's method or variables.
virtual void Toggle()
Toggles the Values and State of this object and connected data!
virtual void SetOnValue(Long_t lon)
virtual void SetToggledObject(TObject *obj, TMethod *anymethod)
Initializes it to toggle an object's datamember using this object's method.
virtual Bool_t GetState()
Returns the state of Toggle according to its current value and fOnValue, returns true if they match.
EDragType fDragType
dragging type
TGFrame * fSource
frame being dragged
Bool_t fMoveWaiting
kTRUE if source is clicked but not moved
Bool_t fDragging
in dragging mode?
TGFrame * fTarget
drop target
TVirtualDragManager()
Constructor.
Bool_t fPasting
paste action is in progress
virtual void Init()
Initialization.
TGFrame * fFrameUnder
frame under drag
int main(int argc, char **argv)
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.
Int_t fCount
if non-zero, at least this many more exposes
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.
Attributes that can be used when creating or changing a window.
Bool_t fOverrideRedirect
boolean value for override-redirect
Mask_t fMask
bit mask specifying which fields are valid
Bool_t fSaveUnder
should bits under be saved (popups)?