97 "Encapsulated PostScript",
"*.eps",
100 "ASImage XML",
"*.xml",
132 void Add(
const char *argname,
const char *
value,
const char *
type);
203 static char params[1024];
219 while ((obj = next())) {
227 const char *
data = 0;
235 if (selfobjpos == nparam-1) {
236 if (params[0]) strlcat(params,
",", 1024-strlen(params));
238 strlcat(params, param, 1024-strlen(params));
241 if (params[0]) strlcat(params,
",", 1024-strlen(params));
243 if (!strncmp(
type,
"char*", 5))
246 strlcpy(param,
data,
sizeof(param));
248 strlcpy(param,
"0",
sizeof(param));
250 strlcat(params, param, 1024-strlen(params));
254 if (selfobjpos == nparam) {
255 if (params[0]) strlcat(params,
",", 1024-strlen(params));
257 strlcat(params, param, 1024-strlen(params));
273 ret +=
" [default: ";
316 Int_t selfobjpos = -1;
323 if (selfobjpos != argpos) {
325 const char *argname = arg_name.
Data();
328 const char *charstar =
"char*";
332 strlcpy(basictype, datatype->
GetTypeName(),
sizeof(basictype));
336 Warning(
"Dialog",
"data type is not basic type, assuming (int)");
337 strlcpy(basictype,
"int",
sizeof(basictype));
340 if (strchr(argname,
'*')) {
341 strlcat(basictype,
"*", 32-strlen(basictype));
351 if (!strncmp(basictype,
"char*", 5)) {
354 if (tdefval && strlen(tdefval))
355 strlcpy(val, tdefval,
sizeof(val));
356 }
else if (!strncmp(basictype,
"float", 5) ||
357 !strncmp(basictype,
"double", 6)) {
361 }
else if (!strncmp(basictype,
"char", 4) ||
362 !strncmp(basictype,
"bool", 4) ||
363 !strncmp(basictype,
"int", 3) ||
364 !strncmp(basictype,
"long", 4) ||
365 !strncmp(basictype,
"short", 5)) {
368 snprintf(val, 255,
"%zi", (
size_t)ldefval);
373 if (
m->GetOptions()) {
374 Warning(
"Dialog",
"option menu not yet implemented");
383 if (tval) strlcpy(val, tval,
sizeof(val));
476 !
gClient->IsEditable())
return 0;
480 while (
child && dst) {
520 const char * ,
const char * )
745 gc->SetBackground(back);
746 gc->SetForeground(back);
832 for (i = 0; i <8; i++) {
835 for (i = 0; i <4; i++) {
867 for (i = 0; i <8; i++) {
870 for (i = 0; i <4; i++) {
929 fName =
"Gui Builder Drag Manager";
987 TIter next(methodList);
991 while ((method = (
TMethod*) next())) {
1134 for (
int i = 0; i < 8; i++) {
1173 if (
fStop || !frame) {
1195 str +=
" cannot be edited.";
1201 if (frame != comp) {
1229 str +=
"can not be selected";
1241 static Int_t x, x0,
y, y0, xx, yy;
1262 str +=
" Press SpaceBar to unselect the frame.";
1263 if (
IsFixedSize(frame)) str +=
" This frame cannot be resized.";
1387 str +=
" is grabbed";
1412 str +=
" ungrabbed";
1425 while (parent && (parent !=
gClient->GetDefaultRoot())) {
1426 if (parent->
GetId() ==
id) {
1489 if (now-was < 100) {
1592 if (!
w || (
w ==
fPimpl->
fPlane) ||
w->GetEditDisabled() ||
w->IsEditable() ||
1636 static Int_t gy = 0;
1637 static Int_t gx = 0;
1638 static UInt_t gstate = 0;
1886 if (
fStop || !frame) {
1986 win =
event->fWindow;
2005 switch (
event->fType) {
2029 static Long_t gLastClick = 0;
2030 static UInt_t gLastButton = 0;
2031 static Int_t gDbx = 0;
2032 static Int_t gDby = 0;
2034 if ((
event->fTime - gLastClick < 350) &&
2035 (
event->fCode == gLastButton) &&
2038 (
event->fWindow == gDbw)) {
2046 }
else if (!(
event->fState & 0xFF)) {
2050 return w->HandleDoubleClick(
event);
2060 gDbw =
event->fWindow;
2061 gLastClick =
event->fTime;
2062 gLastButton =
event->fCode;
2063 gDbx =
event->fXRoot;
2064 gDby =
event->fYRoot;
2219 event->fUser[0] = fr->
GetId();
2257 event->fUser[0] =
w->GetId();
2328 event->fWindow = parent->
GetId();
2352 switch ((
EKeySym)keysym & ~0x20) {
2515 Int_t x0, y0, xx, yy;
2519 if (!newfr || !newfr->
GetId() || !oldfr || !oldfr->
GetId())
return;
2524 x0 = x0 < 0 ? 0 : x0;
2525 y0 = y0 < 0 ? 0 : y0;
2542 if ((frame->
GetX() >= x0) && (frame->
GetY() >= y0) &&
2553 frame->
GetX(), frame->
GetY(), xx, yy,
c);
2639 if (
fStop || !cont) {
2649 w =
w < 100 ? 100 :
w;
2650 h =
h < 100 ? 100 :
h;
2759 TString str =
"Grab action performed.";
2760 str +=
" Press Cntrl-Return to Drop grabbed frames.";
2761 str +=
" Press Return for TCanvas Grab";
2837 if ((fr->
GetX() >= x0) && (fr->
GetY() >= y0) &&
2847 else fr->
Move(x0, y0);
2861 else fr->
Move(x0, y0);
2925 str +=
" cannot be deleted";
2971 if ((fr->
GetX() >= x0) && (fr->
GetY() >= y0) &&
3022 if (
fStop || !frame) {
3125 str +=
" copied to clipboard";
3210 str +=
" replaced by ";
3281 f->Resize(
f->GetWidth() + 10,
f->GetHeight() + 10);
3326 main->SetWMSizeHints(
main->GetDefaultWidth(),
main->GetDefaultHeight(), 10000, 10000, 0, 0);
3331 if (
gVirtualX->InheritsFrom(
"TGX11"))
main->SetIconPixmap(
"bld_rgb.xpm");
3332 main->SaveSource(fname.
Data(),
file ?
"keep_names quiet" :
"keep_names");
3350 main->RaiseWindow();
3439static Int_t canResize(TGFrame *frame, Int_t x, Int_t y, UInt_t &w, UInt_t &h)
3441 if (frame->InheritsFrom(TGCompositeFrame::Class())) return 0;
3443 TGCompositeFrame *comp = (TGCompositeFrame*)frame;
3445 TIter next(comp->GetList());
3447 Int_t d = gGuiBldDragManager->GetGridStep();
3450 while ((fe = (TGFrameElement*)next())) {
3451 if (x + fe->fFrame->GetX() + fe->fFrame->GetWidth() > w) {
3452 w = fe->fFrame->GetX() + x + fe->fFrame->GetWidth();
3455 if (y + fe->fFrame->GetY() + fe->fFrame->GetHeight() > h) {
3456 h = fe->fFrame->GetY() + y + fe->fFrame->GetHeight();
3507 if ((((
int)fr->
GetWidth() >
x) || (
x < 0)) &&
3510 if (fr->
GetY() +
y < 2) {
3513 if (fr->
GetX() +
x < 2) {
3536 if ((
x > 0) && (((
int)fr->
GetHeight() >
y) || (
y < 0))) {
3538 if (fr->
GetY() +
y < 2) {
3564 if (fr->
GetY() +
y < 2) {
3576 if ((((
int)fr->
GetWidth() >
x) || (
x < 0)) && (
y > 0)) {
3578 if (fr->
GetX() +
x < 2) {
3601 if ((
x > 0) && (
y > 0)) {
3631 if (fr->
GetX() +
x < 2) {
3714 if (!move && !
gVirtualX->InheritsFrom(
"TGX11")) {
3726 str +=
" is moved to absolute position ";
3760 if (
fStop || !comp) {
3824 if (
w && (
w !=
gVirtualX->GetDefaultRootWindow())) {
3897 static Int_t gy =
event->fYRoot;
3898 static Int_t gx =
event->fXRoot;
3903 ((
event->fYRoot == gy) && (
event->fXRoot == gx))) {
3969 x =
x > x0 ? x0 :
x;
3970 y =
y > y0 ? y0 :
y;
3987 frame->
Resize(
w < grid ? grid :
w,
h < grid ? grid :
h);
3990 frame->
Resize(
w < grid ? 15*grid :
w,
h < grid ? 30*grid :
h);
3992 frame->
Resize(
w < grid ? 30*grid :
w,
h < grid ? 15*grid :
h);
3994 else frame->
Resize(
w < 2*grid ? 2*grid :
w,
h < 2*grid ? 2*grid :
h);
4031 frame = ((
TGCanvas*)frame)->GetContainer();
4063 if ((
x == x0) || (
y==y0 ))
return;
4066 x0 = x0 < 0 ? 0 : x0;
4076 y0 = y0 < 0 ? 0 : y0;
4095 xswap ?
x : x0, yswap ?
y : y0,
4098 xswap ? x0 :
x, yswap ? y0 :
y,
4114 TString str =
"Lasso drawn. Align frames inside or press Return key to grab frames.";