From: Angus Leeming Date: Wed, 30 Jan 2002 14:55:27 +0000 (+0000) Subject: J�rgen S's patch to the graphics dialog. X-Git-Tag: 1.6.10~19940 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=e1f75fc571621e96514c54cf8d678464d4b35afb;p=lyx.git J�rgen S's patch to the graphics dialog. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3455 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/frontends/xforms/ChangeLog b/src/frontends/xforms/ChangeLog index 639fb3626e..46389f4659 100644 --- a/src/frontends/xforms/ChangeLog +++ b/src/frontends/xforms/ChangeLog @@ -1,3 +1,13 @@ +2002-01-29 Jürgen Spitzmüller + + * forms/form_graphics.fd: Change the dialog to look similar as + the nice QT2-Version (added tabfolder "Bounding Box", rearrangements); + added text_warning field.. + + * FormGraphics.[Ch]: Handle the Rearrangements. + Add input filters and warnings concerning invalid inputs. + Recognize the lyxrc-settings of display_graphics. + 2002-01-29 Angus Leeming * FormMathsSpace.h (space_): diff --git a/src/frontends/xforms/FormGraphics.C b/src/frontends/xforms/FormGraphics.C index 81a51d3eb9..c040b3bda4 100644 --- a/src/frontends/xforms/FormGraphics.C +++ b/src/frontends/xforms/FormGraphics.C @@ -80,23 +80,20 @@ void FormGraphics::build() fl_set_input_return (file_->input_filename, FL_RETURN_CHANGED); fl_set_input_return (file_->input_subcaption, FL_RETURN_CHANGED); - fl_set_input_return (file_->input_bbx0, FL_RETURN_CHANGED); - fl_set_input_return (file_->input_bby0, FL_RETURN_CHANGED); - fl_set_input_return (file_->input_bbx1, FL_RETURN_CHANGED); - fl_set_input_return (file_->input_bby1, FL_RETURN_CHANGED); + fl_set_input_return (file_->input_lyxwidth, FL_RETURN_CHANGED); + fl_set_input_return (file_->input_lyxheight, FL_RETURN_CHANGED); fl_set_input_maxchars(file_->input_filename, FILENAME_MAXCHARS); - string const bb_units = "pt|cm|in"; - fl_addto_choice(file_->choice_bb_x0, bb_units.c_str()); - fl_addto_choice(file_->choice_bb_y0, bb_units.c_str()); - fl_addto_choice(file_->choice_bb_x1, bb_units.c_str()); - fl_addto_choice(file_->choice_bb_y1, bb_units.c_str()); + fl_addto_choice(file_->choice_width_lyxwidth, choice_Length_All.c_str()); + fl_addto_choice(file_->choice_width_lyxheight, choice_Length_All.c_str()); + fl_addto_choice(file_->choice_display, + _(" Default | Monochrome | Grayscale | Color | Do not display ")); + //FIXME: This does not work (always set to monochrome by default. Why? JSpitzm) + fl_set_choice(file_->choice_display, 1); bc().addReadOnly(file_->button_browse); bc().addReadOnly(file_->check_subcaption); - bc().addReadOnly(file_->button_getBB); - bc().addReadOnly(file_->button_clip); - bc().addReadOnly(file_->button_draft); + bc().addReadOnly(file_->choice_display); // the size section size_.reset(build_size()); @@ -104,30 +101,38 @@ void FormGraphics::build() fl_set_input_return (size_->input_scale, FL_RETURN_CHANGED); fl_set_input_return (size_->input_width, FL_RETURN_CHANGED); fl_set_input_return (size_->input_height, FL_RETURN_CHANGED); - fl_set_input_return (size_->input_lyxwidth, FL_RETURN_CHANGED); - fl_set_input_return (size_->input_lyxheight, FL_RETURN_CHANGED); fl_set_input_maxchars(size_->input_scale, SCALE_MAXDIGITS); fl_set_input_maxchars(size_->input_width, WIDTH_MAXDIGITS); fl_set_input_maxchars(size_->input_height, HEIGHT_MAXDIGITS); fl_set_input_filter(size_->input_scale, fl_unsigned_float_filter); - fl_set_input_filter(size_->input_width, fl_unsigned_float_filter); - fl_set_input_filter(size_->input_height, fl_unsigned_float_filter); fl_addto_choice(size_->choice_width_units, choice_Length_All.c_str()); fl_addto_choice(size_->choice_height_units, choice_Length_All.c_str()); - fl_addto_choice(size_->choice_width_lyxwidth, choice_Length_All.c_str()); - fl_addto_choice(size_->choice_width_lyxheight, choice_Length_All.c_str()); bc().addReadOnly(size_->button_default); bc().addReadOnly(size_->button_wh); bc().addReadOnly(size_->button_scale); bc().addReadOnly(size_->check_aspectratio); - bc().addReadOnly(size_->radio_check_display); - bc().addReadOnly(size_->radio_display_mono); - bc().addReadOnly(size_->radio_display_gray); - bc().addReadOnly(size_->radio_display_color); + + // the bounding box selection + bbox_.reset(build_bbox()); + fl_set_input_return (bbox_->input_bbx0, FL_RETURN_CHANGED); + fl_set_input_return (bbox_->input_bby0, FL_RETURN_CHANGED); + fl_set_input_return (bbox_->input_bbx1, FL_RETURN_CHANGED); + fl_set_input_return (bbox_->input_bby1, FL_RETURN_CHANGED); + + bc().addReadOnly(bbox_->button_getBB); + bc().addReadOnly(bbox_->button_clip); + bc().addReadOnly(bbox_->button_draft); + + string const bb_units = "pt|cm|in"; + fl_addto_choice(bbox_->choice_bb_x0, bb_units.c_str()); + fl_addto_choice(bbox_->choice_bb_y0, bb_units.c_str()); + fl_addto_choice(bbox_->choice_bb_x1, bb_units.c_str()); + fl_addto_choice(bbox_->choice_bb_y1, bb_units.c_str()); + // the rotate section special_.reset(build_special()); @@ -148,9 +153,10 @@ void FormGraphics::build() fl_set_input_filter(special_->input_rotate_angle, fl_float_filter); // add the different tabfolders - fl_addto_tabfolder(dialog_->tabFolder, _("Filename"), file_->form); - fl_addto_tabfolder(dialog_->tabFolder, _("Image size"), size_->form); - fl_addto_tabfolder(dialog_->tabFolder, _("Special"), special_->form); + fl_addto_tabfolder(dialog_->tabFolder, _("File"), file_->form); + fl_addto_tabfolder(dialog_->tabFolder, _("Size"), size_->form); + fl_addto_tabfolder(dialog_->tabFolder, _("Bounding Box"), bbox_->form); + fl_addto_tabfolder(dialog_->tabFolder, _("Extras"), special_->form); } @@ -163,36 +169,50 @@ void FormGraphics::apply() igp.bb = string(); // don't write anything else { string bb; - if (getStringFromInput(file_->input_bbx0).empty()) + if (getStringFromInput(bbox_->input_bbx0).empty()) bb = "0 "; else - bb = getLengthFromWidgets(file_->input_bbx0,file_->choice_bb_x0)+" "; - if (getStringFromInput(file_->input_bby0).empty()) + bb = getLengthFromWidgets(bbox_->input_bbx0, + bbox_->choice_bb_x0)+" "; + if (getStringFromInput(bbox_->input_bby0).empty()) bb += "0 "; else - bb += (getLengthFromWidgets(file_->input_bby0,file_->choice_bb_y0)+" "); - if (getStringFromInput(file_->input_bbx1).empty()) + bb += (getLengthFromWidgets(bbox_->input_bby0, + bbox_->choice_bb_y0)+" "); + if (getStringFromInput(bbox_->input_bbx1).empty()) bb += "0 "; else - bb += (getLengthFromWidgets(file_->input_bbx1,file_->choice_bb_x1)+" "); - if (getStringFromInput(file_->input_bby1).empty()) + bb += (getLengthFromWidgets(bbox_->input_bbx1, + bbox_->choice_bb_x1)+" "); + if (getStringFromInput(bbox_->input_bby1).empty()) bb += "0 "; else - bb += (getLengthFromWidgets(file_->input_bby1,file_->choice_bb_y1)+" "); + bb += (getLengthFromWidgets(bbox_->input_bby1, + bbox_->choice_bb_y1)+" "); igp.bb = bb; } - igp.draft = fl_get_button(file_->button_draft); - igp.clip = fl_get_button(file_->button_clip); + igp.draft = fl_get_button(bbox_->button_draft); + igp.clip = fl_get_button(bbox_->button_clip); igp.subcaption = fl_get_button(file_->check_subcaption); igp.subcaptionText = getStringFromInput(file_->input_subcaption); - if (fl_get_button(size_->radio_check_display)) { - igp.display = InsetGraphicsParams::NONE; - } else if (fl_get_button(size_->radio_display_mono)) { + // use preferences settings if choice is set to default + if (fl_get_choice(file_->choice_display) == 1) { + if (lyxrc.display_graphics == "mono") + igp.display = InsetGraphicsParams::MONOCHROME; + else if (lyxrc.display_graphics == "gray") + igp.display = InsetGraphicsParams::GRAYSCALE; + else if (lyxrc.display_graphics == "color") + igp.display = InsetGraphicsParams::COLOR; + else if (lyxrc.display_graphics == "no") + igp.display = InsetGraphicsParams::NONE; + } else if (fl_get_choice(file_->choice_display) == 2) { igp.display = InsetGraphicsParams::MONOCHROME; - } else if (fl_get_button(size_->radio_display_gray)) { + } else if (fl_get_choice(file_->choice_display) == 3) { igp.display = InsetGraphicsParams::GRAYSCALE; - } else if (fl_get_button(size_->radio_display_color)) { + } else if (fl_get_choice(file_->choice_display) == 4) { igp.display = InsetGraphicsParams::COLOR; + } else if (fl_get_choice(file_->choice_display) == 5) { + igp.display = InsetGraphicsParams::NONE; } if (fl_get_button(size_->button_default)) igp.size_type = InsetGraphicsParams::DEFAULT_SIZE; @@ -200,12 +220,16 @@ void FormGraphics::apply() igp.size_type = InsetGraphicsParams::WH; else igp.size_type = InsetGraphicsParams::SCALE; - igp.width = LyXLength(getLengthFromWidgets(size_->input_width,size_->choice_width_units)); - igp.height = LyXLength(getLengthFromWidgets(size_->input_height,size_->choice_height_units)); + igp.width = LyXLength(getLengthFromWidgets(size_->input_width, + size_->choice_width_units)); + igp.height = LyXLength(getLengthFromWidgets(size_->input_height, + size_->choice_height_units)); igp.scale = strToInt(getStringFromInput(size_->input_scale)); igp.keepAspectRatio = fl_get_button(size_->check_aspectratio); - igp.lyxwidth = LyXLength(getLengthFromWidgets(size_->input_lyxwidth,size_->choice_width_lyxwidth)); - igp.lyxheight = LyXLength(getLengthFromWidgets(size_->input_lyxheight,size_->choice_width_lyxheight)); + igp.lyxwidth = LyXLength(getLengthFromWidgets(file_->input_lyxwidth, + file_->choice_width_lyxwidth)); + igp.lyxheight = LyXLength(getLengthFromWidgets(file_->input_lyxheight, + file_->choice_width_lyxheight)); igp.rotateAngle = strToDbl(getStringFromInput(special_->input_rotate_angle)); @@ -244,51 +268,58 @@ void FormGraphics::update() if (!bb.empty()) { // get the values from the file // in this case we always have the point-unit - fl_set_input(file_->input_bbx0, token(bb,' ',0).c_str()); - fl_set_input(file_->input_bby0, token(bb,' ',1).c_str()); - fl_set_input(file_->input_bbx1, token(bb,' ',2).c_str()); - fl_set_input(file_->input_bby1, token(bb,' ',3).c_str()); + fl_set_input(bbox_->input_bbx0, token(bb,' ',0).c_str()); + fl_set_input(bbox_->input_bby0, token(bb,' ',1).c_str()); + fl_set_input(bbox_->input_bbx1, token(bb,' ',2).c_str()); + fl_set_input(bbox_->input_bby1, token(bb,' ',3).c_str()); } } else { // get the values from the inset controller().bbChanged = true; LyXLength anyLength; anyLength = LyXLength(token(igp.bb,' ',0)); - updateWidgetsFromLength(file_->input_bbx0,file_->choice_bb_x0,anyLength,"pt"); + updateWidgetsFromLength(bbox_->input_bbx0, + bbox_->choice_bb_x0,anyLength,"pt"); anyLength = LyXLength(token(igp.bb,' ',1)); - updateWidgetsFromLength(file_->input_bby0,file_->choice_bb_y0,anyLength,"pt"); + updateWidgetsFromLength(bbox_->input_bby0, + bbox_->choice_bb_y0,anyLength,"pt"); anyLength = LyXLength(token(igp.bb,' ',2)); - updateWidgetsFromLength(file_->input_bbx1,file_->choice_bb_x1,anyLength,"pt"); + updateWidgetsFromLength(bbox_->input_bbx1, + bbox_->choice_bb_x1,anyLength,"pt"); anyLength = LyXLength(token(igp.bb,' ',3)); - updateWidgetsFromLength(file_->input_bby1,file_->choice_bb_y1,anyLength,"pt"); + updateWidgetsFromLength(bbox_->input_bby1, + bbox_->choice_bb_y1,anyLength,"pt"); } // Update the draft and clip mode - fl_set_button(file_->button_draft, igp.draft); - fl_set_button(file_->button_clip, igp.clip); + fl_set_button(bbox_->button_draft, igp.draft); + fl_set_button(bbox_->button_clip, igp.clip); // Update the subcaption check button and input field fl_set_button(file_->check_subcaption, igp.subcaption); fl_set_input(file_->input_subcaption, igp.subcaptionText.c_str()); setEnabled(file_->input_subcaption, fl_get_button(file_->check_subcaption)); + switch (igp.display) { case InsetGraphicsParams::NONE: { // dont't display - fl_set_button(size_->radio_check_display, 1); + fl_set_choice(file_->choice_display, 5); break; } case InsetGraphicsParams::MONOCHROME: { - fl_set_button(size_->radio_display_mono, 1); + fl_set_choice(file_->choice_display, 2); break; } case InsetGraphicsParams::GRAYSCALE: { - fl_set_button(size_->radio_display_gray, 1); + fl_set_choice(file_->choice_display, 3); break; } case InsetGraphicsParams::COLOR: { - fl_set_button(size_->radio_display_color, 1); + fl_set_choice(file_->choice_display, 4); break; } } - updateWidgetsFromLength(size_->input_width,size_->choice_width_units,igp.width,defaultUnit); - updateWidgetsFromLength(size_->input_height,size_->choice_height_units,igp.height,defaultUnit); + updateWidgetsFromLength(size_->input_width, + size_->choice_width_units,igp.width,defaultUnit); + updateWidgetsFromLength(size_->input_height, + size_->choice_height_units,igp.height,defaultUnit); fl_set_input(size_->input_scale, tostr(igp.scale).c_str()); switch (igp.size_type) { case InsetGraphicsParams::DEFAULT_SIZE: { @@ -319,10 +350,12 @@ void FormGraphics::update() break; } } - fl_set_button(size_->check_aspectratio,igp.keepAspectRatio); + fl_set_button(size_->check_aspectratio, igp.keepAspectRatio); // now the lyx-internally viewsize - updateWidgetsFromLength(size_->input_lyxwidth,size_->choice_width_lyxwidth,igp.lyxwidth,defaultUnit); - updateWidgetsFromLength(size_->input_lyxheight,size_->choice_width_lyxheight,igp.lyxheight,defaultUnit); + updateWidgetsFromLength(file_->input_lyxwidth, + file_->choice_width_lyxwidth, igp.lyxwidth,defaultUnit); + updateWidgetsFromLength(file_->input_lyxheight, + file_->choice_width_lyxheight, igp.lyxheight,defaultUnit); // Update the rotate angle and special commands fl_set_input(special_->input_rotate_angle, tostr(igp.rotateAngle).c_str()); @@ -344,10 +377,10 @@ ButtonPolicy::SMInput FormGraphics::input(FL_OBJECT * ob, long) fl_set_input(file_->input_filename, out_name.c_str()); } } else if (!controller().bbChanged && - ((ob == file_->input_bbx0) || (ob == file_->input_bby0) || - (ob == file_->input_bbx1) || (ob == file_->input_bby1) || - (ob == file_->choice_bb_x0) || (ob == file_->choice_bb_y0) || - (ob == file_->choice_bb_x1) || (ob == file_->choice_bb_y1))) { + ((ob == bbox_->input_bbx0) || (ob == bbox_->input_bby0) || + (ob == bbox_->input_bbx1) || (ob == bbox_->input_bby1) || + (ob == bbox_->choice_bb_x0) || (ob == bbox_->choice_bb_y0) || + (ob == bbox_->choice_bb_x1) || (ob == bbox_->choice_bb_y1))) { controller().bbChanged = true; } else if (ob == size_->button_default) { setEnabled(size_->input_width, 0); @@ -370,22 +403,69 @@ ButtonPolicy::SMInput FormGraphics::input(FL_OBJECT * ob, long) } else if (ob == file_->check_subcaption) { setEnabled(file_->input_subcaption, fl_get_button(file_->check_subcaption)); - } else if (ob == file_->button_getBB) { + } else if (ob == bbox_->button_getBB) { string const filename = getStringFromInput(file_->input_filename); if (!filename.empty()) { string const fileWithAbsPath = MakeAbsPath(filename, OnlyPath(filename)); string bb = controller().readBB(fileWithAbsPath); lyxerr << "getBB::BoundingBox = " << bb << "\n"; if (!bb.empty()) { - fl_set_input(file_->input_bbx0, token(bb,' ',0).c_str()); - fl_set_input(file_->input_bby0, token(bb,' ',1).c_str()); - fl_set_input(file_->input_bbx1, token(bb,' ',2).c_str()); - fl_set_input(file_->input_bby1, token(bb,' ',3).c_str()); + fl_set_input(bbox_->input_bbx0, token(bb,' ',0).c_str()); + fl_set_input(bbox_->input_bby0, token(bb,' ',1).c_str()); + fl_set_input(bbox_->input_bbx1, token(bb,' ',2).c_str()); + fl_set_input(bbox_->input_bby1, token(bb,' ',3).c_str()); } controller().bbChanged = false; } } else if (ob == dialog_->button_help) { controller().help(); + } + // Put verifications that the dialog shows some sane values, + // if not disallow clicking on ok/apply. + // Possibly use a label in the bottom of the dialog to give the reason. + ButtonPolicy::SMInput activate = ButtonPolicy::SMI_VALID; + + string input; + bool invalid = false; + + // check if the input is valid + input = fl_get_input(bbox_->input_bbx0); + invalid = !input.empty() && !isValidLength(input) && !isStrDbl(input); + input = fl_get_input(bbox_->input_bbx1); + invalid = invalid || (!input.empty() && !isValidLength(input) && !isStrDbl(input)); + input = fl_get_input(bbox_->input_bby0); + invalid = invalid || (!input.empty() && !isValidLength(input) && !isStrDbl(input)); + input = fl_get_input(bbox_->input_bby1); + invalid = invalid || (!input.empty() && !isValidLength(input) && !isStrDbl(input)); + input = fl_get_input(size_->input_width); + invalid = invalid || !input.empty() && (!isValidLength(input) && !isStrDbl(input)); + input = fl_get_input(size_->input_height); + invalid = invalid || !input.empty() && (!isValidLength(input) && !isStrDbl(input)); + input = fl_get_input(file_->input_lyxwidth); + invalid = invalid || (!input.empty() && !isValidLength(input) && !isStrDbl(input)); + input = fl_get_input(file_->input_lyxheight); + invalid = invalid || (!input.empty() && !isValidLength(input) && !isStrDbl(input)); + + // deactivate OK/ Apply buttons and + // spit out warnings if invalid + if (ob == bbox_->input_bbx0 + || ob == bbox_->input_bbx1 + || ob == bbox_->input_bby0 + || ob == bbox_->input_bby1 + || ob == size_->input_width + || ob == size_->input_height + || ob == file_->input_lyxwidth + || ob == file_->input_lyxheight) { + if (invalid) { + fl_set_object_label(dialog_->text_warning, + _("Warning: Invalid Length!")); + fl_show_object(dialog_->text_warning); + activate = ButtonPolicy::SMI_INVALID; + } else { + fl_hide_object(dialog_->text_warning); + activate = ButtonPolicy::SMI_VALID; + } + return activate; } return checkInput(); } diff --git a/src/frontends/xforms/FormGraphics.h b/src/frontends/xforms/FormGraphics.h index 211665bcce..e14eb82228 100644 --- a/src/frontends/xforms/FormGraphics.h +++ b/src/frontends/xforms/FormGraphics.h @@ -29,6 +29,7 @@ class ControlGraphics; struct FD_form_graphics; struct FD_form_file; struct FD_form_size; +struct FD_form_bbox; struct FD_form_special; /** This class provides an XForms implementation of the Graphics Dialog. @@ -64,6 +65,8 @@ private: /// FD_form_size * build_size(); /// + FD_form_bbox * build_bbox(); + /// FD_form_special * build_special(); /// Real GUI implementation. @@ -71,6 +74,8 @@ private: /// boost::scoped_ptr size_; /// + boost::scoped_ptr bbox_; + /// boost::scoped_ptr special_; }; diff --git a/src/frontends/xforms/form_graphics.C b/src/frontends/xforms/form_graphics.C index 0f2bb4ddd8..049a2cea7f 100644 --- a/src/frontends/xforms/form_graphics.C +++ b/src/frontends/xforms/form_graphics.C @@ -22,33 +22,36 @@ FD_form_graphics * FormGraphics::build_graphics() FL_OBJECT *obj; FD_form_graphics *fdui = new FD_form_graphics; - fdui->form = fl_bgn_form(FL_NO_BOX, 510, 320); + fdui->form = fl_bgn_form(FL_NO_BOX, 510, 360); fdui->form->u_vdata = this; - obj = fl_add_box(FL_FLAT_BOX, 0, 0, 510, 320, ""); + obj = fl_add_box(FL_FLAT_BOX, 0, 0, 510, 360, ""); fdui->tabFolder = obj = fl_add_tabfolder(FL_TOP_TABFOLDER, 10, 5, 490, 270, _("Tabbed folder")); fl_set_object_resize(obj, FL_RESIZE_ALL); { char const * const dummy = N_("Help|#H"); - fdui->button_help = obj = fl_add_button(FL_NORMAL_BUTTON, 440, 280, 60, 30, idex(_(dummy))); + fdui->button_help = obj = fl_add_button(FL_NORMAL_BUTTON, 435, 320, 65, 30, idex(_(dummy))); fl_set_button_shortcut(obj, scex(_(dummy)), 1); } fl_set_object_lsize(obj, FL_NORMAL_SIZE); fl_set_object_callback(obj, C_FormBaseInputCB, 0); { char const * const dummy = N_("Restore|#R"); - fdui->button_restore = obj = fl_add_button(FL_NORMAL_BUTTON, 135, 280, 75, 30, idex(_(dummy))); + fdui->button_restore = obj = fl_add_button(FL_NORMAL_BUTTON, 120, 320, 95, 30, idex(_(dummy))); fl_set_button_shortcut(obj, scex(_(dummy)), 1); } fl_set_object_gravity(obj, FL_SouthWest, FL_SouthWest); fl_set_object_callback(obj, C_FormBaseRestoreCB, 0); - fdui->button_ok = obj = fl_add_button(FL_RETURN_BUTTON, 10, 280, 75, 30, _("Ok")); + fdui->button_ok = obj = fl_add_button(FL_RETURN_BUTTON, 10, 320, 75, 30, _("Ok")); fl_set_object_callback(obj, C_FormBaseOKCB, 0); { char const * const dummy = N_("Cancel|^["); - fdui->button_cancel = obj = fl_add_button(FL_NORMAL_BUTTON, 260, 280, 75, 30, idex(_(dummy))); + fdui->button_cancel = obj = fl_add_button(FL_NORMAL_BUTTON, 245, 320, 85, 30, idex(_(dummy))); fl_set_button_shortcut(obj, scex(_(dummy)), 1); } fl_set_object_callback(obj, C_FormBaseCancelCB, 0); + fdui->text_warning = obj = fl_add_text(FL_NORMAL_TEXT, 10, 280, 485, 35, ""); + fl_set_object_lalign(obj, FL_ALIGN_LEFT|FL_ALIGN_INSIDE); + fl_set_object_lstyle(obj, FL_BOLD_STYLE); fl_end_form(); fdui->form->fdui = fdui; @@ -74,10 +77,9 @@ FD_form_file * FormGraphics::build_file() obj = fl_add_box(FL_FLAT_BOX, 0, 0, 505, 235, ""); { char const * const dummy = N_("File|#F"); - fdui->input_filename = obj = fl_add_input(FL_NORMAL_INPUT, 85, 10, 270, 30, idex(_(dummy))); + fdui->input_filename = obj = fl_add_input(FL_NORMAL_INPUT, 75, 10, 285, 30, idex(_(dummy))); fl_set_button_shortcut(obj, scex(_(dummy)), 1); } - fl_set_object_lstyle(obj, FL_BOLD_STYLE); fl_set_object_callback(obj, C_FormBaseInputCB, 0); { char const * const dummy = N_("Browse...|#B"); @@ -85,85 +87,48 @@ FD_form_file * FormGraphics::build_file() fl_set_button_shortcut(obj, scex(_(dummy)), 1); } fl_set_object_callback(obj, C_FormBaseInputCB, 0); - obj = fl_add_labelframe(FL_ENGRAVED_FRAME, 15, 50, 260, 115, _("Bounding Box")); - fl_set_object_lstyle(obj, FL_BOLD_STYLE); + obj = fl_add_labelframe(FL_ENGRAVED_FRAME, 15, 175, 460, 50, _("Subfigure")); { - char const * const dummy = N_("xLeftBottom|#x"); - fdui->input_bbx0 = obj = fl_add_input(FL_NORMAL_INPUT, 25, 75, 50, 30, idex(_(dummy))); - fl_set_button_shortcut(obj, scex(_(dummy)), 1); - } - fl_set_object_lalign(obj, FL_ALIGN_TOP_LEFT); - fl_set_object_callback(obj, C_FormBaseInputCB, 0); - { - char const * const dummy = N_("yLeftBottom|#y"); - fdui->input_bby0 = obj = fl_add_input(FL_NORMAL_INPUT, 160, 75, 50, 30, idex(_(dummy))); - fl_set_button_shortcut(obj, scex(_(dummy)), 1); - } - fl_set_object_lalign(obj, FL_ALIGN_TOP_LEFT); - fl_set_object_callback(obj, C_FormBaseInputCB, 0); - { - char const * const dummy = N_("xRightTop|#R"); - fdui->input_bbx1 = obj = fl_add_input(FL_NORMAL_INPUT, 25, 125, 50, 30, idex(_(dummy))); - fl_set_button_shortcut(obj, scex(_(dummy)), 1); - } - fl_set_object_lalign(obj, FL_ALIGN_TOP); - fl_set_object_callback(obj, C_FormBaseInputCB, 0); - { - char const * const dummy = N_("yRightTop|#T"); - fdui->input_bby1 = obj = fl_add_input(FL_NORMAL_INPUT, 160, 125, 50, 30, idex(_(dummy))); - fl_set_button_shortcut(obj, scex(_(dummy)), 1); - } - fl_set_object_lalign(obj, FL_ALIGN_TOP_LEFT); - fl_set_object_callback(obj, C_FormBaseInputCB, 0); - { - char const * const dummy = N_("clip to bounding box|#c"); - fdui->button_clip = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 290, 100, 30, 30, idex(_(dummy))); + char const * const dummy = N_("Subfigure|#S"); + fdui->check_subcaption = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 20, 185, 30, 30, idex(_(dummy))); fl_set_button_shortcut(obj, scex(_(dummy)), 1); } fl_set_object_lalign(obj, FL_ALIGN_RIGHT); fl_set_object_callback(obj, C_FormBaseInputCB, 0); - obj = fl_add_labelframe(FL_ENGRAVED_FRAME, 15, 165, 465, 60, _("Subfigure")); - fl_set_object_lstyle(obj, FL_BOLD_STYLE); { - char const * const dummy = N_("On/Off|#O"); - fdui->check_subcaption = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 15, 180, 30, 30, idex(_(dummy))); + char const * const dummy = N_("Title:|#T"); + fdui->input_subcaption = obj = fl_add_input(FL_NORMAL_INPUT, 180, 185, 280, 30, idex(_(dummy))); fl_set_button_shortcut(obj, scex(_(dummy)), 1); } - fl_set_object_lalign(obj, FL_ALIGN_RIGHT); fl_set_object_callback(obj, C_FormBaseInputCB, 0); { - char const * const dummy = N_("Title|#T"); - fdui->input_subcaption = obj = fl_add_input(FL_NORMAL_INPUT, 110, 185, 330, 30, idex(_(dummy))); + char const * const dummy = N_("Show:|#o"); + fdui->choice_display = obj = fl_add_choice(FL_NORMAL_CHOICE, 85, 80, 160, 30, idex(_(dummy))); fl_set_button_shortcut(obj, scex(_(dummy)), 1); } - fl_set_object_lalign(obj, FL_ALIGN_TOP); + fl_set_object_boxtype(obj, FL_FRAME_BOX); fl_set_object_callback(obj, C_FormBaseInputCB, 0); - obj = fl_add_labelframe(FL_ENGRAVED_FRAME, 285, 50, 195, 115, _("Options")); { - char const * const dummy = N_("draft mode|#D"); - fdui->button_draft = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 290, 125, 30, 30, idex(_(dummy))); + char const * const dummy = N_("Width:|#w"); + fdui->input_lyxwidth = obj = fl_add_input(FL_NORMAL_INPUT, 85, 120, 95, 30, idex(_(dummy))); fl_set_button_shortcut(obj, scex(_(dummy)), 1); } - fl_set_object_lalign(obj, FL_ALIGN_RIGHT); - fl_set_object_callback(obj, C_FormBaseInputCB, 0); - fdui->choice_bb_x0 = obj = fl_add_choice(FL_NORMAL_CHOICE, 80, 75, 50, 30, ""); - fl_set_object_boxtype(obj, FL_FRAME_BOX); - fl_set_object_callback(obj, C_FormBaseInputCB, 0); - fdui->choice_bb_y0 = obj = fl_add_choice(FL_NORMAL_CHOICE, 220, 75, 45, 30, ""); - fl_set_object_boxtype(obj, FL_FRAME_BOX); - fl_set_object_callback(obj, C_FormBaseInputCB, 0); - fdui->choice_bb_x1 = obj = fl_add_choice(FL_NORMAL_CHOICE, 80, 125, 50, 30, ""); - fl_set_object_boxtype(obj, FL_FRAME_BOX); + fl_set_object_lsize(obj, FL_NORMAL_SIZE); fl_set_object_callback(obj, C_FormBaseInputCB, 0); - fdui->choice_bb_y1 = obj = fl_add_choice(FL_NORMAL_CHOICE, 220, 125, 45, 30, ""); + fdui->choice_width_lyxwidth = obj = fl_add_choice(FL_NORMAL_CHOICE, 185, 120, 60, 30, ""); fl_set_object_boxtype(obj, FL_FRAME_BOX); fl_set_object_callback(obj, C_FormBaseInputCB, 0); { - char const * const dummy = N_("Get BB from file|#G"); - fdui->button_getBB = obj = fl_add_button(FL_NORMAL_BUTTON, 295, 65, 170, 25, idex(_(dummy))); + char const * const dummy = N_("Height:|#h"); + fdui->input_lyxheight = obj = fl_add_input(FL_NORMAL_INPUT, 315, 120, 85, 30, idex(_(dummy))); fl_set_button_shortcut(obj, scex(_(dummy)), 1); } + fl_set_object_lsize(obj, FL_NORMAL_SIZE); + fl_set_object_callback(obj, C_FormBaseInputCB, 0); + fdui->choice_width_lyxheight = obj = fl_add_choice(FL_NORMAL_CHOICE, 405, 120, 60, 30, ""); + fl_set_object_boxtype(obj, FL_FRAME_BOX); fl_set_object_callback(obj, C_FormBaseInputCB, 0); + obj = fl_add_labelframe(FL_ENGRAVED_FRAME, 15, 65, 460, 95, _("Screen Display")); fl_end_form(); fdui->form->fdui = fdui; @@ -187,123 +152,158 @@ FD_form_size * FormGraphics::build_size() fdui->form = fl_bgn_form(FL_NO_BOX, 505, 235); fdui->form->u_vdata = this; obj = fl_add_box(FL_FLAT_BOX, 0, 0, 505, 235, ""); - obj = fl_add_labelframe(FL_ENGRAVED_FRAME, 15, 10, 225, 30, _("LaTeX")); - fl_set_object_lstyle(obj, FL_BOLD_STYLE); { - char const * const dummy = N_("Width|#W"); - fdui->input_width = obj = fl_add_input(FL_NORMAL_INPUT, 80, 80, 85, 30, idex(_(dummy))); + char const * const dummy = N_("Width:|#W"); + fdui->input_width = obj = fl_add_input(FL_NORMAL_INPUT, 270, 65, 85, 30, idex(_(dummy))); fl_set_button_shortcut(obj, scex(_(dummy)), 1); } fl_set_object_lsize(obj, FL_NORMAL_SIZE); fl_set_object_callback(obj, C_FormBaseInputCB, 0); - fdui->choice_width_units = obj = fl_add_choice(FL_NORMAL_CHOICE, 170, 80, 60, 30, ""); + fdui->choice_width_units = obj = fl_add_choice(FL_NORMAL_CHOICE, 360, 65, 60, 30, ""); fl_set_object_boxtype(obj, FL_FRAME_BOX); fl_set_object_callback(obj, C_FormBaseInputCB, 0); { - char const * const dummy = N_("Height|#H"); - fdui->input_height = obj = fl_add_input(FL_NORMAL_INPUT, 80, 120, 85, 30, idex(_(dummy))); + char const * const dummy = N_("Height:|#H"); + fdui->input_height = obj = fl_add_input(FL_NORMAL_INPUT, 270, 100, 85, 30, idex(_(dummy))); fl_set_button_shortcut(obj, scex(_(dummy)), 1); } fl_set_object_lsize(obj, FL_NORMAL_SIZE); fl_set_object_callback(obj, C_FormBaseInputCB, 0); - fdui->choice_height_units = obj = fl_add_choice(FL_NORMAL_CHOICE, 170, 120, 60, 30, ""); + fdui->choice_height_units = obj = fl_add_choice(FL_NORMAL_CHOICE, 360, 100, 60, 30, ""); fl_set_object_boxtype(obj, FL_FRAME_BOX); fl_set_object_callback(obj, C_FormBaseInputCB, 0); { - char const * const dummy = N_("Scale|#S"); - fdui->input_scale = obj = fl_add_input(FL_NORMAL_INPUT, 80, 185, 85, 30, idex(_(dummy))); + char const * const dummy = N_("Factor:|#F"); + fdui->input_scale = obj = fl_add_input(FL_NORMAL_INPUT, 270, 150, 85, 30, idex(_(dummy))); fl_set_button_shortcut(obj, scex(_(dummy)), 1); } fl_set_object_lsize(obj, FL_NORMAL_SIZE); fl_set_object_callback(obj, C_FormBaseInputCB, 0); // xgettext:no-c-format - obj = fl_add_text(FL_NORMAL_TEXT, 170, 185, 25, 30, _("%")); + obj = fl_add_text(FL_NORMAL_TEXT, 360, 150, 25, 30, _("%")); fl_set_object_lalign(obj, FL_ALIGN_LEFT|FL_ALIGN_INSIDE); - obj = fl_add_labelframe(FL_ENGRAVED_FRAME, 255, 10, 230, 215, _("LyX Screen")); - fl_set_object_lstyle(obj, FL_BOLD_STYLE); + + fdui->radio_size = fl_bgn_group(); { - char const * const dummy = N_("Width|#w"); - fdui->input_lyxwidth = obj = fl_add_input(FL_NORMAL_INPUT, 315, 145, 85, 30, idex(_(dummy))); + char const * const dummy = N_("Default|#D"); + fdui->button_default = obj = fl_add_round3dbutton(FL_RADIO_BUTTON, 80, 30, 30, 30, idex(_(dummy))); fl_set_button_shortcut(obj, scex(_(dummy)), 1); } - fl_set_object_lsize(obj, FL_NORMAL_SIZE); - fl_set_object_callback(obj, C_FormBaseInputCB, 0); - fdui->choice_width_lyxwidth = obj = fl_add_choice(FL_NORMAL_CHOICE, 405, 145, 60, 30, ""); - fl_set_object_boxtype(obj, FL_FRAME_BOX); + fl_set_object_color(obj, FL_COL1, FL_YELLOW); + fl_set_object_lalign(obj, FL_ALIGN_RIGHT); fl_set_object_callback(obj, C_FormBaseInputCB, 0); { - char const * const dummy = N_("Height|#h"); - fdui->input_lyxheight = obj = fl_add_input(FL_NORMAL_INPUT, 315, 185, 85, 30, idex(_(dummy))); + char const * const dummy = N_("Custom|#C"); + fdui->button_wh = obj = fl_add_round3dbutton(FL_RADIO_BUTTON, 80, 65, 30, 30, idex(_(dummy))); fl_set_button_shortcut(obj, scex(_(dummy)), 1); } - fl_set_object_lsize(obj, FL_NORMAL_SIZE); + fl_set_object_color(obj, FL_COL1, FL_YELLOW); + fl_set_object_lalign(obj, FL_ALIGN_RIGHT); fl_set_object_callback(obj, C_FormBaseInputCB, 0); - fdui->choice_width_lyxheight = obj = fl_add_choice(FL_NORMAL_CHOICE, 405, 185, 60, 30, ""); - fl_set_object_boxtype(obj, FL_FRAME_BOX); + { + char const * const dummy = N_("Scale|#S"); + fdui->button_scale = obj = fl_add_round3dbutton(FL_RADIO_BUTTON, 80, 155, 30, 30, idex(_(dummy))); + fl_set_button_shortcut(obj, scex(_(dummy)), 1); + } + fl_set_object_color(obj, FL_COL1, FL_YELLOW); + fl_set_object_lalign(obj, FL_ALIGN_RIGHT); fl_set_object_callback(obj, C_FormBaseInputCB, 0); - obj = fl_add_frame(FL_ENGRAVED_FRAME, 15, 40, 225, 120, ""); - obj = fl_add_frame(FL_ENGRAVED_FRAME, 15, 160, 225, 65, ""); + fl_end_group(); - fdui->radio_display = fl_bgn_group(); { - char const * const dummy = N_("Don't display|#D"); - fdui->radio_check_display = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 260, 20, 30, 30, idex(_(dummy))); + char const * const dummy = N_("keep aspectratio|#k"); + fdui->check_aspectratio = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 270, 185, 30, 30, idex(_(dummy))); fl_set_button_shortcut(obj, scex(_(dummy)), 1); } + fl_set_object_lalign(obj, FL_ALIGN_RIGHT); fl_set_object_callback(obj, C_FormBaseInputCB, 0); - fl_set_button(obj, 1); + obj = fl_add_labelframe(FL_ENGRAVED_FRAME, 15, 15, 455, 205, _("Size")); + fl_end_form(); + + fdui->form->fdui = fdui; + + return fdui; +} +/*---------------------------------------*/ + +FD_form_bbox::~FD_form_bbox() +{ + if ( form->visible ) fl_hide_form( form ); + fl_free_form( form ); +} + + +FD_form_bbox * FormGraphics::build_bbox() +{ + FL_OBJECT *obj; + FD_form_bbox *fdui = new FD_form_bbox; + + fdui->form = fl_bgn_form(FL_NO_BOX, 505, 235); + fdui->form->u_vdata = this; + obj = fl_add_box(FL_UP_BOX, 0, 0, 505, 235, ""); { - char const * const dummy = N_("in Grayscale|#G"); - fdui->radio_display_gray = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 260, 75, 30, 30, idex(_(dummy))); + char const * const dummy = N_("Left Bottom:|#L"); + fdui->input_bbx0 = obj = fl_add_input(FL_NORMAL_INPUT, 120, 60, 50, 30, idex(_(dummy))); fl_set_button_shortcut(obj, scex(_(dummy)), 1); } fl_set_object_callback(obj, C_FormBaseInputCB, 0); + fdui->choice_bb_x0 = obj = fl_add_choice(FL_NORMAL_CHOICE, 175, 60, 50, 30, ""); + fl_set_object_boxtype(obj, FL_FRAME_BOX); + fl_set_object_callback(obj, C_FormBaseInputCB, 0); { - char const * const dummy = N_("in Color|#C"); - fdui->radio_display_color = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 260, 105, 30, 30, idex(_(dummy))); + char const * const dummy = N_("Right Top:|#R"); + fdui->input_bbx1 = obj = fl_add_input(FL_NORMAL_INPUT, 120, 100, 50, 30, idex(_(dummy))); fl_set_button_shortcut(obj, scex(_(dummy)), 1); } fl_set_object_callback(obj, C_FormBaseInputCB, 0); + fdui->choice_bb_x1 = obj = fl_add_choice(FL_NORMAL_CHOICE, 175, 100, 50, 30, ""); + fl_set_object_boxtype(obj, FL_FRAME_BOX); + fl_set_object_callback(obj, C_FormBaseInputCB, 0); { - char const * const dummy = N_("in Monochrome|#M"); - fdui->radio_display_mono = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 260, 45, 30, 30, idex(_(dummy))); + char const * const dummy = N_("Left Bottom:|#f"); + fdui->input_bby0 = obj = fl_add_input(FL_NORMAL_INPUT, 325, 60, 50, 30, idex(_(dummy))); fl_set_button_shortcut(obj, scex(_(dummy)), 1); } fl_set_object_callback(obj, C_FormBaseInputCB, 0); - fl_end_group(); - - - fdui->radio_size = fl_bgn_group(); + fdui->choice_bb_y0 = obj = fl_add_choice(FL_NORMAL_CHOICE, 380, 60, 45, 30, ""); + fl_set_object_boxtype(obj, FL_FRAME_BOX); + fl_set_object_callback(obj, C_FormBaseInputCB, 0); { - char const * const dummy = N_("Default|#D"); - fdui->button_default = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 15, 10, 30, 30, idex(_(dummy))); + char const * const dummy = N_("Right Top:|#T"); + fdui->input_bby1 = obj = fl_add_input(FL_NORMAL_INPUT, 325, 100, 50, 30, idex(_(dummy))); fl_set_button_shortcut(obj, scex(_(dummy)), 1); } - fl_set_object_lalign(obj, FL_ALIGN_RIGHT); fl_set_object_callback(obj, C_FormBaseInputCB, 0); + fdui->choice_bb_y1 = obj = fl_add_choice(FL_NORMAL_CHOICE, 380, 100, 45, 30, ""); + fl_set_object_boxtype(obj, FL_FRAME_BOX); + fl_set_object_callback(obj, C_FormBaseInputCB, 0); + obj = fl_add_text(FL_NORMAL_TEXT, 120, 30, 35, 25, _("X")); + fl_set_object_lalign(obj, FL_ALIGN_LEFT|FL_ALIGN_INSIDE); + fl_set_object_lstyle(obj, FL_BOLD_STYLE); + obj = fl_add_text(FL_NORMAL_TEXT, 325, 30, 30, 25, _("Y")); + fl_set_object_lalign(obj, FL_ALIGN_LEFT|FL_ALIGN_INSIDE); + fl_set_object_lstyle(obj, FL_BOLD_STYLE); { - char const * const dummy = N_("On/Off|#O"); - fdui->button_wh = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 15, 40, 30, 30, idex(_(dummy))); + char const * const dummy = N_("draft mode|#d"); + fdui->button_draft = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 295, 180, 30, 30, idex(_(dummy))); fl_set_button_shortcut(obj, scex(_(dummy)), 1); } fl_set_object_lalign(obj, FL_ALIGN_RIGHT); fl_set_object_callback(obj, C_FormBaseInputCB, 0); { - char const * const dummy = N_("On/Off|#n"); - fdui->button_scale = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 15, 155, 30, 30, idex(_(dummy))); + char const * const dummy = N_("clip to bounding box|#c"); + fdui->button_clip = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 295, 145, 30, 30, idex(_(dummy))); fl_set_button_shortcut(obj, scex(_(dummy)), 1); } fl_set_object_lalign(obj, FL_ALIGN_RIGHT); fl_set_object_callback(obj, C_FormBaseInputCB, 0); - fl_end_group(); - { - char const * const dummy = N_("keep aspectratio|#k"); - fdui->check_aspectratio = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 100, 40, 30, 30, idex(_(dummy))); + char const * const dummy = N_("Get bounding box from file|#G"); + fdui->button_getBB = obj = fl_add_button(FL_NORMAL_BUTTON, 45, 160, 170, 30, idex(_(dummy))); fl_set_button_shortcut(obj, scex(_(dummy)), 1); } - fl_set_object_lalign(obj, FL_ALIGN_RIGHT); fl_set_object_callback(obj, C_FormBaseInputCB, 0); + obj = fl_add_labelframe(FL_ENGRAVED_FRAME, 20, 25, 455, 195, _("Bounding Box")); fl_end_form(); fdui->form->fdui = fdui; @@ -327,33 +327,28 @@ FD_form_special * FormGraphics::build_special() fdui->form = fl_bgn_form(FL_NO_BOX, 505, 235); fdui->form->u_vdata = this; obj = fl_add_box(FL_FLAT_BOX, 0, 0, 505, 235, ""); - obj = fl_add_labelframe(FL_ENGRAVED_FRAME, 15, 15, 255, 65, _("Rotation")); - fl_set_object_lstyle(obj, FL_BOLD_STYLE); + obj = fl_add_labelframe(FL_ENGRAVED_FRAME, 15, 15, 455, 75, _("Rotation")); { - char const * const dummy = N_("Angle|#n"); - fdui->input_rotate_angle = obj = fl_add_input(FL_INT_INPUT, 25, 40, 70, 30, idex(_(dummy))); + char const * const dummy = N_("Angle:|#n"); + fdui->input_rotate_angle = obj = fl_add_input(FL_INT_INPUT, 125, 40, 70, 30, idex(_(dummy))); fl_set_button_shortcut(obj, scex(_(dummy)), 1); } - fl_set_object_lalign(obj, FL_ALIGN_TOP_LEFT); fl_set_object_callback(obj, C_FormBaseInputCB, 0); - obj = fl_add_text(FL_NORMAL_TEXT, 100, 45, 45, 25, _("degrees")); + obj = fl_add_text(FL_NORMAL_TEXT, 200, 45, 45, 25, _("degrees")); fl_set_object_lalign(obj, FL_ALIGN_LEFT|FL_ALIGN_INSIDE); - obj = fl_add_labelframe(FL_ENGRAVED_FRAME, 275, 15, 205, 65, _("Special Options")); - fl_set_object_lstyle(obj, FL_BOLD_STYLE); + obj = fl_add_labelframe(FL_ENGRAVED_FRAME, 15, 105, 455, 70, _("Special Options")); { - char const * const dummy = N_("Userdefined LaTeX-Options|#U"); - fdui->input_special = obj = fl_add_input(FL_NORMAL_INPUT, 285, 42, 180, 27, idex(_(dummy))); + char const * const dummy = N_("User defined LaTeX Options:|#U"); + fdui->input_special = obj = fl_add_input(FL_NORMAL_INPUT, 190, 130, 265, 30, idex(_(dummy))); fl_set_button_shortcut(obj, scex(_(dummy)), 1); } - fl_set_object_lalign(obj, FL_ALIGN_TOP_LEFT); fl_set_object_callback(obj, C_FormBaseInputCB, 0); { - char const * const dummy = N_("Origin|#O"); - fdui->choice_origin = obj = fl_add_choice(FL_NORMAL_CHOICE2, 150, 40, 115, 30, idex(_(dummy))); + char const * const dummy = N_("Origin:|#O"); + fdui->choice_origin = obj = fl_add_choice(FL_NORMAL_CHOICE, 335, 40, 115, 30, idex(_(dummy))); fl_set_button_shortcut(obj, scex(_(dummy)), 1); } fl_set_object_boxtype(obj, FL_FRAME_BOX); - fl_set_object_lalign(obj, FL_ALIGN_TOP_LEFT); fl_set_object_callback(obj, C_FormBaseInputCB, 0); fl_end_form(); diff --git a/src/frontends/xforms/form_graphics.h b/src/frontends/xforms/form_graphics.h index c6a42a1aec..c74591eb1c 100644 --- a/src/frontends/xforms/form_graphics.h +++ b/src/frontends/xforms/form_graphics.h @@ -16,6 +16,8 @@ extern "C" void C_FormBaseInputCB(FL_OBJECT *, long); extern "C" void C_FormBaseInputCB(FL_OBJECT *, long); +extern "C" void C_FormBaseInputCB(FL_OBJECT *, long); + /**** Forms and Objects ****/ struct FD_form_graphics { @@ -27,6 +29,7 @@ struct FD_form_graphics { FL_OBJECT *button_restore; FL_OBJECT *button_ok; FL_OBJECT *button_cancel; + FL_OBJECT *text_warning; }; struct FD_form_file { ~FD_form_file(); @@ -34,19 +37,13 @@ struct FD_form_file { FL_FORM *form; FL_OBJECT *input_filename; FL_OBJECT *button_browse; - FL_OBJECT *input_bbx0; - FL_OBJECT *input_bby0; - FL_OBJECT *input_bbx1; - FL_OBJECT *input_bby1; - FL_OBJECT *button_clip; FL_OBJECT *check_subcaption; FL_OBJECT *input_subcaption; - FL_OBJECT *button_draft; - FL_OBJECT *choice_bb_x0; - FL_OBJECT *choice_bb_y0; - FL_OBJECT *choice_bb_x1; - FL_OBJECT *choice_bb_y1; - FL_OBJECT *button_getBB; + FL_OBJECT *choice_display; + FL_OBJECT *input_lyxwidth; + FL_OBJECT *choice_width_lyxwidth; + FL_OBJECT *input_lyxheight; + FL_OBJECT *choice_width_lyxheight; }; struct FD_form_size { ~FD_form_size(); @@ -57,21 +54,28 @@ struct FD_form_size { FL_OBJECT *input_height; FL_OBJECT *choice_height_units; FL_OBJECT *input_scale; - FL_OBJECT *input_lyxwidth; - FL_OBJECT *choice_width_lyxwidth; - FL_OBJECT *input_lyxheight; - FL_OBJECT *choice_width_lyxheight; - FL_OBJECT *radio_display; - FL_OBJECT *radio_check_display; - FL_OBJECT *radio_display_gray; - FL_OBJECT *radio_display_color; - FL_OBJECT *radio_display_mono; FL_OBJECT *radio_size; FL_OBJECT *button_default; FL_OBJECT *button_wh; FL_OBJECT *button_scale; FL_OBJECT *check_aspectratio; }; +struct FD_form_bbox { + ~FD_form_bbox(); + + FL_FORM *form; + FL_OBJECT *input_bbx0; + FL_OBJECT *choice_bb_x0; + FL_OBJECT *input_bbx1; + FL_OBJECT *choice_bb_x1; + FL_OBJECT *input_bby0; + FL_OBJECT *choice_bb_y0; + FL_OBJECT *input_bby1; + FL_OBJECT *choice_bb_y1; + FL_OBJECT *button_draft; + FL_OBJECT *button_clip; + FL_OBJECT *button_getBB; +}; struct FD_form_special { ~FD_form_special(); diff --git a/src/frontends/xforms/forms/form_graphics.fd b/src/frontends/xforms/forms/form_graphics.fd index e966747cb3..856ec6570b 100644 --- a/src/frontends/xforms/forms/form_graphics.fd +++ b/src/frontends/xforms/forms/form_graphics.fd @@ -3,20 +3,20 @@ Magic: 13000 Internal Form Definition File (do not change) -Number of forms: 4 +Number of forms: 5 Unit of measure: FL_COORD_PIXEL SnapGrid: 5 =============== FORM =============== Name: form_graphics Width: 510 -Height: 320 -Number of Objects: 6 +Height: 360 +Number of Objects: 7 -------------------- class: FL_BOX type: FLAT_BOX -box: 0 0 510 320 +box: 0 0 510 360 boxtype: FL_FLAT_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER @@ -52,7 +52,7 @@ argument: -------------------- class: FL_BUTTON type: NORMAL_BUTTON -box: 440 280 60 30 +box: 435 320 65 30 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER @@ -70,7 +70,7 @@ argument: 0 -------------------- class: FL_BUTTON type: NORMAL_BUTTON -box: 135 280 75 30 +box: 120 320 95 30 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER @@ -88,7 +88,7 @@ argument: 0 -------------------- class: FL_BUTTON type: RETURN_BUTTON -box: 10 280 75 30 +box: 10 320 75 30 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER @@ -106,7 +106,7 @@ argument: 0 -------------------- class: FL_BUTTON type: NORMAL_BUTTON -box: 260 280 75 30 +box: 245 320 85 30 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER @@ -121,11 +121,29 @@ name: button_cancel callback: C_FormBaseCancelCB argument: 0 +-------------------- +class: FL_TEXT +type: NORMAL_TEXT +box: 10 280 485 35 +boxtype: FL_FLAT_BOX +colors: FL_COL1 FL_MCOL +alignment: FL_ALIGN_LEFT|FL_ALIGN_INSIDE +style: FL_BOLD_STYLE +size: FL_DEFAULT_SIZE +lcol: FL_BLACK +label: +shortcut: +resize: FL_RESIZE_ALL +gravity: FL_NoGravity FL_NoGravity +name: text_warning +callback: +argument: + =============== FORM =============== Name: form_file Width: 505 Height: 235 -Number of Objects: 19 +Number of Objects: 12 -------------------- class: FL_BOX @@ -148,11 +166,11 @@ argument: -------------------- class: FL_INPUT type: NORMAL_INPUT -box: 85 10 270 30 +box: 75 10 285 30 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_LEFT -style: FL_BOLD_STYLE +style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: File|#F @@ -184,121 +202,13 @@ argument: 0 -------------------- class: FL_LABELFRAME type: ENGRAVED_FRAME -box: 15 50 260 115 +box: 15 175 460 50 boxtype: FL_NO_BOX colors: FL_BLACK FL_COL1 alignment: FL_ALIGN_TOP_LEFT -style: FL_BOLD_STYLE -size: FL_DEFAULT_SIZE -lcol: FL_BLACK -label: Bounding Box -shortcut: -resize: FL_RESIZE_ALL -gravity: FL_NoGravity FL_NoGravity -name: -callback: -argument: 0 - --------------------- -class: FL_INPUT -type: NORMAL_INPUT -box: 25 75 50 30 -boxtype: FL_DOWN_BOX -colors: FL_COL1 FL_MCOL -alignment: FL_ALIGN_TOP_LEFT -style: FL_NORMAL_STYLE -size: FL_DEFAULT_SIZE -lcol: FL_BLACK -label: xLeftBottom|#x -shortcut: -resize: FL_RESIZE_ALL -gravity: FL_NoGravity FL_NoGravity -name: input_bbx0 -callback: C_FormBaseInputCB -argument: 0 - --------------------- -class: FL_INPUT -type: NORMAL_INPUT -box: 160 75 50 30 -boxtype: FL_DOWN_BOX -colors: FL_COL1 FL_MCOL -alignment: FL_ALIGN_TOP_LEFT -style: FL_NORMAL_STYLE -size: FL_DEFAULT_SIZE -lcol: FL_BLACK -label: yLeftBottom|#y -shortcut: -resize: FL_RESIZE_ALL -gravity: FL_NoGravity FL_NoGravity -name: input_bby0 -callback: C_FormBaseInputCB -argument: 0 - --------------------- -class: FL_INPUT -type: NORMAL_INPUT -box: 25 125 50 30 -boxtype: FL_DOWN_BOX -colors: FL_COL1 FL_MCOL -alignment: FL_ALIGN_TOP -style: FL_NORMAL_STYLE -size: FL_DEFAULT_SIZE -lcol: FL_BLACK -label: xRightTop|#R -shortcut: -resize: FL_RESIZE_ALL -gravity: FL_NoGravity FL_NoGravity -name: input_bbx1 -callback: C_FormBaseInputCB -argument: 0 - --------------------- -class: FL_INPUT -type: NORMAL_INPUT -box: 160 125 50 30 -boxtype: FL_DOWN_BOX -colors: FL_COL1 FL_MCOL -alignment: FL_ALIGN_TOP_LEFT -style: FL_NORMAL_STYLE -size: FL_DEFAULT_SIZE -lcol: FL_BLACK -label: yRightTop|#T -shortcut: -resize: FL_RESIZE_ALL -gravity: FL_NoGravity FL_NoGravity -name: input_bby1 -callback: C_FormBaseInputCB -argument: 0 - --------------------- -class: FL_CHECKBUTTON -type: PUSH_BUTTON -box: 290 100 30 30 -boxtype: FL_NO_BOX -colors: FL_COL1 FL_YELLOW -alignment: FL_ALIGN_RIGHT style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK -label: clip to bounding box|#c -shortcut: -resize: FL_RESIZE_ALL -gravity: FL_NoGravity FL_NoGravity -name: button_clip -callback: C_FormBaseInputCB -argument: 0 - --------------------- -class: FL_LABELFRAME -type: ENGRAVED_FRAME -box: 15 165 465 60 -boxtype: FL_NO_BOX -colors: FL_BLACK FL_COL1 -alignment: FL_ALIGN_TOP_LEFT -style: FL_BOLD_STYLE -size: FL_DEFAULT_SIZE -lcol: FL_BLACK label: Subfigure shortcut: resize: FL_RESIZE_ALL @@ -310,14 +220,14 @@ argument: -------------------- class: FL_CHECKBUTTON type: PUSH_BUTTON -box: 15 180 30 30 +box: 20 185 30 30 boxtype: FL_NO_BOX colors: FL_COL1 FL_YELLOW alignment: FL_ALIGN_RIGHT style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK -label: On/Off|#O +label: Subfigure|#S shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity @@ -328,14 +238,14 @@ argument: 0 -------------------- class: FL_INPUT type: NORMAL_INPUT -box: 110 185 330 30 +box: 180 185 280 30 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_MCOL -alignment: FL_ALIGN_TOP +alignment: FL_ALIGN_LEFT style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK -label: Title|#T +label: Title:|#T shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity @@ -344,63 +254,45 @@ callback: C_FormBaseInputCB argument: 0 -------------------- -class: FL_LABELFRAME -type: ENGRAVED_FRAME -box: 285 50 195 115 -boxtype: FL_NO_BOX -colors: FL_BLACK FL_COL1 -alignment: FL_ALIGN_TOP_LEFT -style: FL_NORMAL_STYLE -size: FL_DEFAULT_SIZE -lcol: FL_BLACK -label: Options -shortcut: -resize: FL_RESIZE_ALL -gravity: FL_NoGravity FL_NoGravity -name: -callback: -argument: 0 - --------------------- -class: FL_CHECKBUTTON -type: PUSH_BUTTON -box: 290 125 30 30 -boxtype: FL_NO_BOX -colors: FL_COL1 FL_YELLOW -alignment: FL_ALIGN_RIGHT +class: FL_CHOICE +type: NORMAL_CHOICE +box: 85 80 160 30 +boxtype: FL_FRAME_BOX +colors: FL_COL1 FL_BLACK +alignment: FL_ALIGN_LEFT style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK -label: draft mode|#D +label: Show:|#o shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity -name: button_draft +name: choice_display callback: C_FormBaseInputCB argument: 0 -------------------- -class: FL_CHOICE -type: NORMAL_CHOICE -box: 80 75 50 30 -boxtype: FL_FRAME_BOX -colors: FL_COL1 FL_BLACK +class: FL_INPUT +type: NORMAL_INPUT +box: 85 120 95 30 +boxtype: FL_DOWN_BOX +colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_LEFT style: FL_NORMAL_STYLE -size: FL_DEFAULT_SIZE +size: FL_NORMAL_SIZE lcol: FL_BLACK -label: +label: Width:|#w shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity -name: choice_bb_x0 +name: input_lyxwidth callback: C_FormBaseInputCB argument: 0 -------------------- class: FL_CHOICE type: NORMAL_CHOICE -box: 220 75 45 30 +box: 185 120 60 30 boxtype: FL_FRAME_BOX colors: FL_COL1 FL_BLACK alignment: FL_ALIGN_LEFT @@ -411,32 +303,32 @@ label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity -name: choice_bb_y0 +name: choice_width_lyxwidth callback: C_FormBaseInputCB argument: 0 -------------------- -class: FL_CHOICE -type: NORMAL_CHOICE -box: 80 125 50 30 -boxtype: FL_FRAME_BOX -colors: FL_COL1 FL_BLACK +class: FL_INPUT +type: NORMAL_INPUT +box: 315 120 85 30 +boxtype: FL_DOWN_BOX +colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_LEFT style: FL_NORMAL_STYLE -size: FL_DEFAULT_SIZE +size: FL_NORMAL_SIZE lcol: FL_BLACK -label: +label: Height:|#h shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity -name: choice_bb_x1 +name: input_lyxheight callback: C_FormBaseInputCB argument: 0 -------------------- class: FL_CHOICE type: NORMAL_CHOICE -box: 220 125 45 30 +box: 405 120 60 30 boxtype: FL_FRAME_BOX colors: FL_COL1 FL_BLACK alignment: FL_ALIGN_LEFT @@ -447,33 +339,33 @@ label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity -name: choice_bb_y1 +name: choice_width_lyxheight callback: C_FormBaseInputCB argument: 0 -------------------- -class: FL_BUTTON -type: NORMAL_BUTTON -box: 295 65 170 25 -boxtype: FL_UP_BOX -colors: FL_COL1 FL_COL1 -alignment: FL_ALIGN_CENTER +class: FL_LABELFRAME +type: ENGRAVED_FRAME +box: 15 65 460 95 +boxtype: FL_NO_BOX +colors: FL_BLACK FL_COL1 +alignment: FL_ALIGN_TOP_LEFT style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK -label: Get BB from file|#G +label: Screen Display shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity -name: button_getBB -callback: C_FormBaseInputCB -argument: 0 +name: +callback: +argument: =============== FORM =============== Name: form_size Width: 505 Height: 235 -Number of Objects: 27 +Number of Objects: 14 -------------------- class: FL_BOX @@ -493,35 +385,17 @@ name: callback: argument: --------------------- -class: FL_LABELFRAME -type: ENGRAVED_FRAME -box: 15 10 225 30 -boxtype: FL_NO_BOX -colors: FL_BLACK FL_COL1 -alignment: FL_ALIGN_TOP_LEFT -style: FL_BOLD_STYLE -size: FL_DEFAULT_SIZE -lcol: FL_BLACK -label: LaTeX -shortcut: -resize: FL_RESIZE_ALL -gravity: FL_NoGravity FL_NoGravity -name: -callback: -argument: - -------------------- class: FL_INPUT type: NORMAL_INPUT -box: 80 80 85 30 +box: 270 65 85 30 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_LEFT style: FL_NORMAL_STYLE size: FL_NORMAL_SIZE lcol: FL_BLACK -label: Width|#W +label: Width:|#W shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity @@ -532,7 +406,7 @@ argument: 0 -------------------- class: FL_CHOICE type: NORMAL_CHOICE -box: 170 80 60 30 +box: 360 65 60 30 boxtype: FL_FRAME_BOX colors: FL_COL1 FL_BLACK alignment: FL_ALIGN_LEFT @@ -550,14 +424,14 @@ argument: 0 -------------------- class: FL_INPUT type: NORMAL_INPUT -box: 80 120 85 30 +box: 270 100 85 30 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_LEFT style: FL_NORMAL_STYLE size: FL_NORMAL_SIZE lcol: FL_BLACK -label: Height|#H +label: Height:|#H shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity @@ -568,7 +442,7 @@ argument: 0 -------------------- class: FL_CHOICE type: NORMAL_CHOICE -box: 170 120 60 30 +box: 360 100 60 30 boxtype: FL_FRAME_BOX colors: FL_COL1 FL_BLACK alignment: FL_ALIGN_LEFT @@ -586,14 +460,14 @@ argument: 0 -------------------- class: FL_INPUT type: NORMAL_INPUT -box: 80 185 85 30 +box: 270 150 85 30 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_LEFT style: FL_NORMAL_STYLE size: FL_NORMAL_SIZE lcol: FL_BLACK -label: Scale|#S +label: Factor:|#F shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity @@ -604,7 +478,7 @@ argument: 0 -------------------- class: FL_TEXT type: NORMAL_TEXT -box: 170 185 25 30 +box: 360 150 25 30 boxtype: FL_FLAT_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_LEFT|FL_ALIGN_INSIDE @@ -620,84 +494,84 @@ callback: argument: -------------------- -class: FL_LABELFRAME -type: ENGRAVED_FRAME -box: 255 10 230 215 +class: FL_BEGIN_GROUP +type: 0 +box: 0 0 0 0 boxtype: FL_NO_BOX -colors: FL_BLACK FL_COL1 -alignment: FL_ALIGN_TOP_LEFT -style: FL_BOLD_STYLE +colors: FL_COL1 FL_MCOL +alignment: FL_ALIGN_CENTER +style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK -label: LyX Screen +label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity -name: +name: radio_size callback: argument: -------------------- -class: FL_INPUT -type: NORMAL_INPUT -box: 315 145 85 30 -boxtype: FL_DOWN_BOX -colors: FL_COL1 FL_MCOL -alignment: FL_ALIGN_LEFT +class: FL_ROUND3DBUTTON +type: RADIO_BUTTON +box: 80 30 30 30 +boxtype: FL_NO_BOX +colors: FL_COL1 FL_YELLOW +alignment: FL_ALIGN_RIGHT style: FL_NORMAL_STYLE -size: FL_NORMAL_SIZE +size: FL_DEFAULT_SIZE lcol: FL_BLACK -label: Width|#w +label: Default|#D shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity -name: input_lyxwidth +name: button_default callback: C_FormBaseInputCB argument: 0 -------------------- -class: FL_CHOICE -type: NORMAL_CHOICE -box: 405 145 60 30 -boxtype: FL_FRAME_BOX -colors: FL_COL1 FL_BLACK -alignment: FL_ALIGN_LEFT +class: FL_ROUND3DBUTTON +type: RADIO_BUTTON +box: 80 65 30 30 +boxtype: FL_NO_BOX +colors: FL_COL1 FL_YELLOW +alignment: FL_ALIGN_RIGHT style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK -label: +label: Custom|#C shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity -name: choice_width_lyxwidth +name: button_wh callback: C_FormBaseInputCB argument: 0 -------------------- -class: FL_INPUT -type: NORMAL_INPUT -box: 315 185 85 30 -boxtype: FL_DOWN_BOX -colors: FL_COL1 FL_MCOL -alignment: FL_ALIGN_LEFT +class: FL_ROUND3DBUTTON +type: RADIO_BUTTON +box: 80 155 30 30 +boxtype: FL_NO_BOX +colors: FL_COL1 FL_YELLOW +alignment: FL_ALIGN_RIGHT style: FL_NORMAL_STYLE -size: FL_NORMAL_SIZE +size: FL_DEFAULT_SIZE lcol: FL_BLACK -label: Height|#h +label: Scale|#S shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity -name: input_lyxheight +name: button_scale callback: C_FormBaseInputCB argument: 0 -------------------- -class: FL_CHOICE -type: NORMAL_CHOICE -box: 405 185 60 30 -boxtype: FL_FRAME_BOX -colors: FL_COL1 FL_BLACK -alignment: FL_ALIGN_LEFT +class: FL_END_GROUP +type: 0 +box: 0 0 0 0 +boxtype: FL_NO_BOX +colors: FL_COL1 FL_MCOL +alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK @@ -705,21 +579,39 @@ label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity -name: choice_width_lyxheight +name: +callback: +argument: + +-------------------- +class: FL_CHECKBUTTON +type: PUSH_BUTTON +box: 270 185 30 30 +boxtype: FL_NO_BOX +colors: FL_COL1 FL_YELLOW +alignment: FL_ALIGN_RIGHT +style: FL_NORMAL_STYLE +size: FL_DEFAULT_SIZE +lcol: FL_BLACK +label: keep aspectratio|#k +shortcut: +resize: FL_RESIZE_ALL +gravity: FL_NoGravity FL_NoGravity +name: check_aspectratio callback: C_FormBaseInputCB argument: 0 -------------------- -class: FL_FRAME +class: FL_LABELFRAME type: ENGRAVED_FRAME -box: 15 40 225 120 +box: 15 15 455 205 boxtype: FL_NO_BOX colors: FL_BLACK FL_COL1 -alignment: FL_ALIGN_CENTER +alignment: FL_ALIGN_TOP_LEFT style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK -label: +label: Size shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity @@ -727,12 +619,18 @@ name: callback: argument: +=============== FORM =============== +Name: form_bbox +Width: 505 +Height: 235 +Number of Objects: 15 + -------------------- -class: FL_FRAME -type: ENGRAVED_FRAME -box: 15 160 225 65 -boxtype: FL_NO_BOX -colors: FL_BLACK FL_COL1 +class: FL_BOX +type: UP_BOX +box: 0 0 505 235 +boxtype: FL_UP_BOX +colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE @@ -746,103 +644,102 @@ callback: argument: -------------------- -class: FL_BEGIN_GROUP -type: 0 -box: 0 10 10 0 -boxtype: FL_NO_BOX +class: FL_INPUT +type: NORMAL_INPUT +box: 120 60 50 30 +boxtype: FL_DOWN_BOX colors: FL_COL1 FL_MCOL -alignment: FL_ALIGN_CENTER +alignment: FL_ALIGN_LEFT style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK -label: +label: Left Bottom:|#L shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity -name: radio_display -callback: -argument: +name: input_bbx0 +callback: C_FormBaseInputCB +argument: 0 -------------------- -class: FL_CHECKBUTTON -type: RADIO_BUTTON -box: 260 20 30 30 -boxtype: FL_NO_BOX -colors: FL_COL1 FL_YELLOW -alignment: FL_ALIGN_CENTER +class: FL_CHOICE +type: NORMAL_CHOICE +box: 175 60 50 30 +boxtype: FL_FRAME_BOX +colors: FL_COL1 FL_BLACK +alignment: FL_ALIGN_LEFT style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK -label: Don't display|#D +label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity -name: radio_check_display +name: choice_bb_x0 callback: C_FormBaseInputCB argument: 0 - value: 1 -------------------- -class: FL_CHECKBUTTON -type: RADIO_BUTTON -box: 260 75 30 30 -boxtype: FL_NO_BOX -colors: FL_COL1 FL_YELLOW -alignment: FL_ALIGN_CENTER +class: FL_INPUT +type: NORMAL_INPUT +box: 120 100 50 30 +boxtype: FL_DOWN_BOX +colors: FL_COL1 FL_MCOL +alignment: FL_ALIGN_LEFT style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK -label: in Grayscale|#G +label: Right Top:|#R shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity -name: radio_display_gray +name: input_bbx1 callback: C_FormBaseInputCB argument: 0 -------------------- -class: FL_CHECKBUTTON -type: RADIO_BUTTON -box: 260 105 30 30 -boxtype: FL_NO_BOX -colors: FL_COL1 FL_YELLOW -alignment: FL_ALIGN_CENTER +class: FL_CHOICE +type: NORMAL_CHOICE +box: 175 100 50 30 +boxtype: FL_FRAME_BOX +colors: FL_COL1 FL_BLACK +alignment: FL_ALIGN_LEFT style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK -label: in Color|#C +label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity -name: radio_display_color +name: choice_bb_x1 callback: C_FormBaseInputCB argument: 0 -------------------- -class: FL_CHECKBUTTON -type: RADIO_BUTTON -box: 260 45 30 30 -boxtype: FL_NO_BOX -colors: FL_COL1 FL_YELLOW -alignment: FL_ALIGN_CENTER +class: FL_INPUT +type: NORMAL_INPUT +box: 325 60 50 30 +boxtype: FL_DOWN_BOX +colors: FL_COL1 FL_MCOL +alignment: FL_ALIGN_LEFT style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK -label: in Monochrome|#M +label: Left Bottom:|#f shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity -name: radio_display_mono +name: input_bby0 callback: C_FormBaseInputCB argument: 0 -------------------- -class: FL_END_GROUP -type: 0 -box: 0 0 0 0 -boxtype: FL_NO_BOX -colors: FL_COL1 FL_MCOL -alignment: FL_ALIGN_CENTER +class: FL_CHOICE +type: NORMAL_CHOICE +box: 380 60 45 30 +boxtype: FL_FRAME_BOX +colors: FL_COL1 FL_BLACK +alignment: FL_ALIGN_LEFT style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK @@ -850,117 +747,153 @@ label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity -name: -callback: -argument: +name: choice_bb_y0 +callback: C_FormBaseInputCB +argument: 0 -------------------- -class: FL_BEGIN_GROUP -type: 0 -box: 0 10 10 0 -boxtype: FL_NO_BOX +class: FL_INPUT +type: NORMAL_INPUT +box: 325 100 50 30 +boxtype: FL_DOWN_BOX colors: FL_COL1 FL_MCOL -alignment: FL_ALIGN_CENTER +alignment: FL_ALIGN_LEFT style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK -label: +label: Right Top:|#T shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity -name: radio_size -callback: -argument: +name: input_bby1 +callback: C_FormBaseInputCB +argument: 0 -------------------- -class: FL_CHECKBUTTON -type: RADIO_BUTTON -box: 15 10 30 30 -boxtype: FL_NO_BOX -colors: FL_COL1 FL_YELLOW -alignment: FL_ALIGN_RIGHT +class: FL_CHOICE +type: NORMAL_CHOICE +box: 380 100 45 30 +boxtype: FL_FRAME_BOX +colors: FL_COL1 FL_BLACK +alignment: FL_ALIGN_LEFT style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK -label: Default|#D +label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity -name: button_default +name: choice_bb_y1 callback: C_FormBaseInputCB argument: 0 +-------------------- +class: FL_TEXT +type: NORMAL_TEXT +box: 120 30 35 25 +boxtype: FL_FLAT_BOX +colors: FL_COL1 FL_MCOL +alignment: FL_ALIGN_LEFT|FL_ALIGN_INSIDE +style: FL_BOLD_STYLE +size: FL_DEFAULT_SIZE +lcol: FL_BLACK +label: X +shortcut: +resize: FL_RESIZE_ALL +gravity: FL_NoGravity FL_NoGravity +name: +callback: +argument: + +-------------------- +class: FL_TEXT +type: NORMAL_TEXT +box: 325 30 30 25 +boxtype: FL_FLAT_BOX +colors: FL_COL1 FL_MCOL +alignment: FL_ALIGN_LEFT|FL_ALIGN_INSIDE +style: FL_BOLD_STYLE +size: FL_DEFAULT_SIZE +lcol: FL_BLACK +label: Y +shortcut: +resize: FL_RESIZE_ALL +gravity: FL_NoGravity FL_NoGravity +name: +callback: +argument: + -------------------- class: FL_CHECKBUTTON -type: RADIO_BUTTON -box: 15 40 30 30 +type: PUSH_BUTTON +box: 295 180 30 30 boxtype: FL_NO_BOX colors: FL_COL1 FL_YELLOW alignment: FL_ALIGN_RIGHT style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK -label: On/Off|#O +label: draft mode|#d shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity -name: button_wh +name: button_draft callback: C_FormBaseInputCB argument: 0 -------------------- class: FL_CHECKBUTTON -type: RADIO_BUTTON -box: 15 155 30 30 +type: PUSH_BUTTON +box: 295 145 30 30 boxtype: FL_NO_BOX colors: FL_COL1 FL_YELLOW alignment: FL_ALIGN_RIGHT style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK -label: On/Off|#n +label: clip to bounding box|#c shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity -name: button_scale +name: button_clip callback: C_FormBaseInputCB argument: 0 -------------------- -class: FL_END_GROUP -type: 0 -box: 0 0 0 0 -boxtype: FL_NO_BOX -colors: FL_COL1 FL_MCOL +class: FL_BUTTON +type: NORMAL_BUTTON +box: 45 160 170 30 +boxtype: FL_UP_BOX +colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK -label: +label: Get bounding box from file|#G shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity -name: -callback: -argument: +name: button_getBB +callback: C_FormBaseInputCB +argument: 0 -------------------- -class: FL_CHECKBUTTON -type: PUSH_BUTTON -box: 100 40 30 30 +class: FL_LABELFRAME +type: ENGRAVED_FRAME +box: 20 25 455 195 boxtype: FL_NO_BOX -colors: FL_COL1 FL_YELLOW -alignment: FL_ALIGN_RIGHT +colors: FL_BLACK FL_COL1 +alignment: FL_ALIGN_TOP_LEFT style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK -label: keep aspectratio|#k +label: Bounding Box shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity -name: check_aspectratio -callback: C_FormBaseInputCB -argument: 0 +name: +callback: +argument: =============== FORM =============== Name: form_special @@ -989,11 +922,11 @@ argument: -------------------- class: FL_LABELFRAME type: ENGRAVED_FRAME -box: 15 15 255 65 +box: 15 15 455 75 boxtype: FL_NO_BOX colors: FL_BLACK FL_COL1 alignment: FL_ALIGN_TOP_LEFT -style: FL_BOLD_STYLE +style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Rotation @@ -1007,14 +940,14 @@ argument: -------------------- class: FL_INPUT type: INT_INPUT -box: 25 40 70 30 +box: 125 40 70 30 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_MCOL -alignment: FL_ALIGN_TOP_LEFT +alignment: FL_ALIGN_LEFT style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK -label: Angle|#n +label: Angle:|#n shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity @@ -1025,7 +958,7 @@ argument: 0 -------------------- class: FL_TEXT type: NORMAL_TEXT -box: 100 45 45 25 +box: 200 45 45 25 boxtype: FL_FLAT_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_LEFT|FL_ALIGN_INSIDE @@ -1043,11 +976,11 @@ argument: -------------------- class: FL_LABELFRAME type: ENGRAVED_FRAME -box: 275 15 205 65 +box: 15 105 455 70 boxtype: FL_NO_BOX colors: FL_BLACK FL_COL1 alignment: FL_ALIGN_TOP_LEFT -style: FL_BOLD_STYLE +style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: Special Options @@ -1061,14 +994,14 @@ argument: -------------------- class: FL_INPUT type: NORMAL_INPUT -box: 285 42 180 27 +box: 190 130 265 30 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_MCOL -alignment: FL_ALIGN_TOP_LEFT +alignment: FL_ALIGN_LEFT style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK -label: Userdefined LaTeX-Options|#U +label: User defined LaTeX Options:|#U shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity @@ -1078,15 +1011,15 @@ argument: 0 -------------------- class: FL_CHOICE -type: NORMAL_CHOICE2 -box: 150 40 115 30 +type: NORMAL_CHOICE +box: 335 40 115 30 boxtype: FL_FRAME_BOX colors: FL_COL1 FL_BLACK -alignment: FL_ALIGN_TOP_LEFT +alignment: FL_ALIGN_LEFT style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK -label: Origin|#O +label: Origin:|#O shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity