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
This commit is contained in:
Angus Leeming 2002-01-30 14:55:27 +00:00
parent 1d97d2cc80
commit e1f75fc571
6 changed files with 795 additions and 768 deletions

View File

@ -1,3 +1,13 @@
2002-01-29 Jürgen Spitzmüller <j.spitzmueller@gmx.de>
* 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 <a.leeming@ic.ac.uk>
* FormMathsSpace.h (space_):

View File

@ -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();
}

View File

@ -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<FD_form_size> size_;
///
boost::scoped_ptr<FD_form_bbox> bbox_;
///
boost::scoped_ptr<FD_form_special> special_;
};

View File

@ -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)));
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_("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);
{
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_("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_TOP);
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_("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_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_callback(obj, C_FormBaseInputCB, 0);
fdui->choice_bb_y1 = obj = fl_add_choice(FL_NORMAL_CHOICE, 220, 125, 45, 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_("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_lsize(obj, FL_NORMAL_SIZE);
fl_set_object_callback(obj, C_FormBaseInputCB, 0);
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_("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);
{
char const * const dummy = N_("Width|#w");
fdui->input_lyxwidth = obj = fl_add_input(FL_NORMAL_INPUT, 315, 145, 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_lyxwidth = obj = fl_add_choice(FL_NORMAL_CHOICE, 405, 145, 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_lyxheight = obj = fl_add_input(FL_NORMAL_INPUT, 315, 185, 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, 185, 60, 30, "");
fl_set_object_boxtype(obj, FL_FRAME_BOX);
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, "");
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)));
fl_set_button_shortcut(obj, scex(_(dummy)), 1);
}
fl_set_object_callback(obj, C_FormBaseInputCB, 0);
fl_set_button(obj, 1);
{
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)));
fl_set_button_shortcut(obj, scex(_(dummy)), 1);
}
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)));
fl_set_button_shortcut(obj, scex(_(dummy)), 1);
}
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)));
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();
{
char const * const dummy = N_("Default|#D");
fdui->button_default = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 15, 10, 30, 30, idex(_(dummy)));
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_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_("On/Off|#O");
fdui->button_wh = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 15, 40, 30, 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_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_("On/Off|#n");
fdui->button_scale = obj = fl_add_checkbutton(FL_RADIO_BUTTON, 15, 155, 30, 30, idex(_(dummy)));
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);
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)));
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);
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_("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_("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_("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);
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_("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_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_("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_("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);
{
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_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();

View File

@ -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();

File diff suppressed because it is too large Load Diff