]> git.lyx.org Git - lyx.git/commitdiff
Herbert's latest "graphic5" patch (with the zippedFile stuff commented out),
authorAngus Leeming <leeming@lyx.org>
Mon, 4 Feb 2002 15:36:45 +0000 (15:36 +0000)
committerAngus Leeming <leeming@lyx.org>
Mon, 4 Feb 2002 15:36:45 +0000 (15:36 +0000)
his one-line fix to updateWidgetsFromLengthString,
a tiny bug fix of my own.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3480 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/xforms/ChangeLog
src/frontends/xforms/FormGraphics.C
src/frontends/xforms/FormGraphics.h
src/frontends/xforms/form_graphics.C
src/frontends/xforms/form_graphics.h
src/frontends/xforms/forms/form_graphics.fd
src/frontends/xforms/xforms_helpers.C
src/insets/ChangeLog
src/insets/insetgraphics.C
src/insets/insetgraphicsParams.C
src/insets/insetgraphicsParams.h

index 09e08562c15d8ea93d4d8c32c2dc90ea663b4768..2720cb1738e45ce35d49bec63ff3013ef6c22332 100644 (file)
@@ -1,3 +1,16 @@
+2002-02-03  Herbert Voss  <voss@lyx.org>
+
+       * xforms_helpers.C: fix bug with unit "%" in 
+       updateWidgetsFromLengthString(...)
+
+2002-02-02  Herbert Voss  <voss@lyx.org>
+
+       * FormGraphic.C: fix bug with filename, rearrange the code,
+       delete choice "referencePoint" which is only possible for
+       rotatebox
+       * forms/form_graphics.fd: position options in a logical way,
+       add folder and scale for LyXView
+
 2002-02-01  Angus Leeming  <a.leeming@ic.ac.uk>
 
        * FormGraphics.C (apply, update): respect the new DEFAULT state of
 2002-02-01  Angus Leeming  <a.leeming@ic.ac.uk>
 
        * FormGraphics.C (apply, update): respect the new DEFAULT state of
index 68cb4f662f82c3f2962e629be9621c056a8bb078..594087e67c4a816a5a92e2a890085770619f39c6 100644 (file)
@@ -9,6 +9,7 @@
  *
  * \file FormGraphics.C
  * \author Baruch Even, baruch.even@writeme.com
  *
  * \file FormGraphics.C
  * \author Baruch Even, baruch.even@writeme.com
+ * \author Herbert Voss, voss@perce.de
  */
 
 #include <config.h> 
  */
 
 #include <config.h> 
@@ -58,7 +59,6 @@ void FormGraphics::redraw()
                fl_redraw_form(form());
        else
                return;
                fl_redraw_form(form());
        else
                return;
-
        FL_FORM * outer_form = fl_get_active_folder(dialog_->tabFolder);
        if (outer_form && outer_form->visible)
                fl_redraw_form(outer_form);
        FL_FORM * outer_form = fl_get_active_folder(dialog_->tabFolder);
        if (outer_form && outer_form->visible)
                fl_redraw_form(outer_form);
@@ -71,29 +71,46 @@ void FormGraphics::build()
 
         // Manage the ok, apply, restore and cancel/close buttons
        bc().setOK(dialog_->button_ok);
 
         // Manage the ok, apply, restore and cancel/close buttons
        bc().setOK(dialog_->button_ok);
-//     bc().setApply(dialog_->button_apply);
        bc().setCancel(dialog_->button_cancel);
        bc().setRestore(dialog_->button_restore);
        bc().setCancel(dialog_->button_cancel);
        bc().setRestore(dialog_->button_restore);
+       bc().setRestore(dialog_->button_help);
 
        // the file section
        file_.reset(build_file());
 
        fl_set_input_return (file_->input_filename, FL_RETURN_CHANGED);
        fl_set_input_return (file_->input_subcaption, FL_RETURN_CHANGED);
 
        // the file section
        file_.reset(build_file());
 
        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_lyxwidth, FL_RETURN_CHANGED);
-       fl_set_input_return (file_->input_lyxheight, FL_RETURN_CHANGED);
+       fl_set_input_return (file_->input_rotate_angle, FL_RETURN_CHANGED);
        fl_set_input_maxchars(file_->input_filename,  FILENAME_MAXCHARS);
        fl_set_input_maxchars(file_->input_filename,  FILENAME_MAXCHARS);
+       fl_set_input_maxchars(file_->input_rotate_angle, ROTATE_MAXCHARS);
+       fl_set_input_filter(file_->input_rotate_angle, fl_float_filter);
 
 
-       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);
+       string const choice_origin = 
+           "center|"                                   // c
+           "leftTop|leftBottom|leftBaseline|"          // lt lb lB
+           "centerTop|centerBottom|centerBaseline|"    // ct cb cB
+           "rightTop|rightBottom|rightBaseline";       // rt rb rB
+       fl_addto_choice(file_->choice_origin, choice_origin.c_str());
 
        bc().addReadOnly(file_->button_browse);
        bc().addReadOnly(file_->check_subcaption);
 
        bc().addReadOnly(file_->button_browse);
        bc().addReadOnly(file_->check_subcaption);
-       bc().addReadOnly(file_->choice_display);
+       bc().addReadOnly(file_->button_clip);
+       bc().addReadOnly(file_->button_draft);
+
+       // the lyxview section
+       lyxview_.reset(build_lyxview());
+
+       fl_set_input_return (lyxview_->input_lyxwidth, FL_RETURN_CHANGED);
+       fl_set_input_return (lyxview_->input_lyxheight, FL_RETURN_CHANGED);
+       fl_set_input_return (lyxview_->input_lyxscale, FL_RETURN_CHANGED);
+
+       fl_addto_choice(lyxview_->choice_width_lyxwidth, choice_Length_WithUnit.c_str());
+       fl_addto_choice(lyxview_->choice_width_lyxheight, choice_Length_WithUnit.c_str());
+       fl_addto_choice(lyxview_->choice_display,
+               _(" Default | Monochrome | Grayscale | Color | Do not display "));
+       fl_set_choice(lyxview_->choice_display, 1);
+
+       bc().addReadOnly(lyxview_->choice_display);
 
        // the size section
        size_.reset(build_size());
 
        // the size section
        size_.reset(build_size());
@@ -123,37 +140,21 @@ void FormGraphics::build()
        fl_set_input_return (bbox_->input_bb_x1, FL_RETURN_CHANGED);
        fl_set_input_return (bbox_->input_bb_y1, FL_RETURN_CHANGED);
 
        fl_set_input_return (bbox_->input_bb_x1, FL_RETURN_CHANGED);
        fl_set_input_return (bbox_->input_bb_y1, 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());
        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());
-
+       bc().addReadOnly(bbox_->button_getBB);
 
        // the rotate section
        special_.reset(build_special());
 
 
        // the rotate section
        special_.reset(build_special());
 
-       fl_set_input_return (special_->input_rotate_angle, FL_RETURN_CHANGED);
-
-       string const choice_origin = 
-           "default|"                                  // not important
-           "leftTop|leftBottom|leftBaseline|"          // lt lb lB
-           "center|"                                   // c
-           "centerTop|centerBottom|centerBaseline|"    // ct cb cB
-           "rightTop|rightBottom|rightBaseline|"       // rt rb rB
-           "referencePoint";                           // special
-       fl_addto_choice(special_->choice_origin, choice_origin.c_str());
-
        fl_set_input_return (special_->input_special, FL_RETURN_CHANGED);
        fl_set_input_return (special_->input_special, FL_RETURN_CHANGED);
-       fl_set_input_maxchars(special_->input_rotate_angle, ROTATE_MAXCHARS);
-       fl_set_input_filter(special_->input_rotate_angle, fl_float_filter);
 
        // add the different tabfolders
        fl_addto_tabfolder(dialog_->tabFolder, _("File"), file_->form);
 
        // add the different tabfolders
        fl_addto_tabfolder(dialog_->tabFolder, _("File"), file_->form);
+       fl_addto_tabfolder(dialog_->tabFolder, _("LyXView"), lyxview_->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);
        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);
@@ -164,39 +165,28 @@ void FormGraphics::apply()
 {
        // Create the parameters structure and fill the data from the dialog.
        InsetGraphicsParams & igp = controller().params();
 {
        // Create the parameters structure and fill the data from the dialog.
        InsetGraphicsParams & igp = controller().params();
+       // the file section
        igp.filename = getStringFromInput(file_->input_filename);
        igp.filename = getStringFromInput(file_->input_filename);
-       if (!controller().bbChanged)            // different to the original one?
-           igp.bb = string();                  // don't write anything     
-       else {
-           string bb;
-           if (getStringFromInput(bbox_->input_bb_x0).empty())
-               bb = "0 ";
-           else
-               bb = getLengthFromWidgets(bbox_->input_bb_x0,
-                       bbox_->choice_bb_x0)+" ";
-           if (getStringFromInput(bbox_->input_bb_y0).empty())
-               bb += "0 ";
-           else
-               bb += (getLengthFromWidgets(bbox_->input_bb_y0,
-                       bbox_->choice_bb_y0)+" ");
-           if (getStringFromInput(bbox_->input_bb_x1).empty())
-               bb += "0 ";
-           else
-               bb += (getLengthFromWidgets(bbox_->input_bb_x1,
-                       bbox_->choice_bb_x1)+" ");
-           if (getStringFromInput(bbox_->input_bb_y1).empty())
-               bb += "0 ";
-           else
-               bb += (getLengthFromWidgets(bbox_->input_bb_y1,
-                       bbox_->choice_bb_y1)+" ");
-           igp.bb = bb;
-       }
-       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);
        igp.subcaption = fl_get_button(file_->check_subcaption);
        igp.subcaptionText = getStringFromInput(file_->input_subcaption);
+       igp.rotateAngle =
+               strToDbl(getStringFromInput(file_->input_rotate_angle));
+       while (igp.rotateAngle < 0.0 || igp.rotateAngle > 360.0) {
+               if (igp.rotateAngle < 0.0) {
+                       igp.rotateAngle += 360.0;
+               } else if (igp.rotateAngle > 360.0) {
+                       igp.rotateAngle -= 360.0;
+               }
+       }
+       if (fl_get_choice(file_->choice_origin) > 0)
+           igp.rotateOrigin = fl_get_choice_text(file_->choice_origin);
+       else
+           igp.rotateOrigin = string();
+       igp.scale = strToInt(getStringFromInput(size_->input_scale));
+       igp.keepAspectRatio = fl_get_button(size_->check_aspectratio);
 
 
-       switch (fl_get_choice(file_->choice_display)) {
+       // the lyxview section
+       switch (fl_get_choice(lyxview_->choice_display)) {
        case 1:
                igp.display = InsetGraphicsParams::DEFAULT;             
                break;
        case 1:
                igp.display = InsetGraphicsParams::DEFAULT;             
                break;
@@ -213,7 +203,14 @@ void FormGraphics::apply()
                igp.display = InsetGraphicsParams::NONE;                
                break;
        }
                igp.display = InsetGraphicsParams::NONE;                
                break;
        }
+       igp.lyxwidth = LyXLength(getLengthFromWidgets(lyxview_->input_lyxwidth,
+               lyxview_->choice_width_lyxwidth));
+       igp.lyxheight = LyXLength(getLengthFromWidgets(lyxview_->input_lyxheight,
+               lyxview_->choice_width_lyxheight));
 
 
+       // the size section
+       igp.draft = fl_get_button(file_->button_draft);
+       igp.clip = fl_get_button(file_->button_clip);
        if (fl_get_button(size_->button_default))
            igp.size_type = InsetGraphicsParams::DEFAULT_SIZE;
        else if (fl_get_button(size_->button_wh))
        if (fl_get_button(size_->button_default))
            igp.size_type = InsetGraphicsParams::DEFAULT_SIZE;
        else if (fl_get_button(size_->button_wh))
@@ -224,98 +221,88 @@ void FormGraphics::apply()
                size_->choice_width_units));
        igp.height = LyXLength(getLengthFromWidgets(size_->input_height,
                size_->choice_height_units));
                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(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));
-       while (igp.rotateAngle < 0.0 || igp.rotateAngle > 360.0) {
-               if (igp.rotateAngle < 0.0) {
-                       igp.rotateAngle += 360.0;
-               } else if (igp.rotateAngle > 360.0) {
-                       igp.rotateAngle -= 360.0;
-               }
+       // the bb section
+       if (!controller().bbChanged)            // different to the original one?
+           igp.bb = string();                  // don't write anything     
+       else {
+           string bb;
+           if (getStringFromInput(bbox_->input_bb_x0).empty())
+               bb = "0 ";
+           else
+               bb = getLengthFromWidgets(bbox_->input_bb_x0,
+                       bbox_->choice_bb_x0)+" ";
+           if (getStringFromInput(bbox_->input_bb_y0).empty())
+               bb += "0 ";
+           else
+               bb += (getLengthFromWidgets(bbox_->input_bb_y0,
+                       bbox_->choice_bb_y0)+" ");
+           if (getStringFromInput(bbox_->input_bb_x1).empty())
+               bb += "0 ";
+           else
+               bb += (getLengthFromWidgets(bbox_->input_bb_x1,
+                       bbox_->choice_bb_x1)+" ");
+           if (getStringFromInput(bbox_->input_bb_y1).empty())
+               bb += "0 ";
+           else
+               bb += (getLengthFromWidgets(bbox_->input_bb_y1,
+                       bbox_->choice_bb_y1)+" ");
+           igp.bb = bb;
        }
        }
-       if (fl_get_choice(special_->choice_origin) > 0)
-           igp.rotateOrigin = fl_get_choice_text(special_->choice_origin);
-       else
-           igp.rotateOrigin = string();
+
+       // the special section
        igp.special = getStringFromInput(special_->input_special);
        igp.special = getStringFromInput(special_->input_special);
-       igp.testInvariant();
 }
 
 
 }
 
 
-void FormGraphics::update()
-{      string unit = "cm";
+void FormGraphics::update() {  
+       string unit = "cm";
        if (lyxrc.default_papersize < 3)
            unit = "in";
        string const defaultUnit = string(unit); 
        // Update dialog with details from inset
        InsetGraphicsParams & igp = controller().params();
        if (lyxrc.default_papersize < 3)
            unit = "in";
        string const defaultUnit = string(unit); 
        // Update dialog with details from inset
        InsetGraphicsParams & igp = controller().params();
+
+       // the file section
        fl_set_input(file_->input_filename, igp.filename.c_str());
        fl_set_input(file_->input_filename, igp.filename.c_str());
-       // set the bounding box values, if exists. First we need the whole
-       // path, because the controller knows nothing about the doc-dir
-       lyxerr << "GraphicsUpdate::BoundingBox = " << igp.bb << "\n";
-       controller().bbChanged = false;
-       if (igp.bb.empty()) {
-           string const fileWithAbsPath = MakeAbsPath(igp.filename, OnlyPath(igp.filename));   
-           string bb = controller().readBB(fileWithAbsPath);
-           lyxerr << "file::BoundingBox = " << bb << "\n";
-           if (!bb.empty()) {          
-               // get the values from the file
-               // in this case we always have the point-unit
-               fl_set_input(bbox_->input_bb_x0, token(bb,' ',0).c_str());
-               fl_set_input(bbox_->input_bb_y0, token(bb,' ',1).c_str());
-               fl_set_input(bbox_->input_bb_x1, token(bb,' ',2).c_str());
-               fl_set_input(bbox_->input_bb_y1, token(bb,' ',3).c_str());
-           }
-       } else {                                // get the values from the inset
-           controller().bbChanged = true;
-           LyXLength anyLength;
-           anyLength = LyXLength(token(igp.bb,' ',0));
-           updateWidgetsFromLength(bbox_->input_bb_x0,
-                       bbox_->choice_bb_x0,anyLength,"pt");
-           anyLength = LyXLength(token(igp.bb,' ',1));
-           updateWidgetsFromLength(bbox_->input_bb_y0,
-                       bbox_->choice_bb_y0,anyLength,"pt");
-           anyLength = LyXLength(token(igp.bb,' ',2));
-           updateWidgetsFromLength(bbox_->input_bb_x1,
-                       bbox_->choice_bb_x1,anyLength,"pt");
-           anyLength = LyXLength(token(igp.bb,' ',3));
-           updateWidgetsFromLength(bbox_->input_bb_y1,
-                       bbox_->choice_bb_y1,anyLength,"pt");
-       }
-       // Update the draft and clip mode
-       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));
        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));
+       fl_set_input(file_->input_rotate_angle,
+                    tostr(igp.rotateAngle).c_str());
+       if (igp.rotateOrigin.empty())
+           fl_set_choice(file_->choice_origin,0);
+       else
+           fl_set_choice_text(file_->choice_origin,igp.rotateOrigin.c_str());
+       fl_set_button(file_->button_draft, igp.draft);
+       fl_set_button(file_->button_clip, igp.clip);
 
 
+       // the lyxview section
        switch (igp.display) {
        case InsetGraphicsParams::DEFAULT:
        switch (igp.display) {
        case InsetGraphicsParams::DEFAULT:
-               fl_set_choice(file_->choice_display, 1);
+               fl_set_choice(lyxview_->choice_display, 1);
                break;
        case InsetGraphicsParams::MONOCHROME:
                break;
        case InsetGraphicsParams::MONOCHROME:
-               fl_set_choice(file_->choice_display, 2);
+               fl_set_choice(lyxview_->choice_display, 2);
                break;
        case InsetGraphicsParams::GRAYSCALE:
                break;
        case InsetGraphicsParams::GRAYSCALE:
-               fl_set_choice(file_->choice_display, 3);
+               fl_set_choice(lyxview_->choice_display, 3);
                break;
        case InsetGraphicsParams::COLOR:
                break;
        case InsetGraphicsParams::COLOR:
-               fl_set_choice(file_->choice_display, 4);
+               fl_set_choice(lyxview_->choice_display, 4);
                break;
        case InsetGraphicsParams::NONE:
                break;
        case InsetGraphicsParams::NONE:
-               fl_set_choice(file_->choice_display, 5);
+               fl_set_choice(lyxview_->choice_display, 5);
                break;
        }
                break;
        }
+       updateWidgetsFromLength(lyxview_->input_lyxwidth,
+               lyxview_->choice_width_lyxwidth, igp.lyxwidth,defaultUnit);
+       updateWidgetsFromLength(lyxview_->input_lyxheight,
+               lyxview_->choice_width_lyxheight, igp.lyxheight,defaultUnit);
 
 
+       // the size section
+       // Update the draft and clip mode
        updateWidgetsFromLength(size_->input_width,
                size_->choice_width_units,igp.width,defaultUnit);
        updateWidgetsFromLength(size_->input_height,
        updateWidgetsFromLength(size_->input_width,
                size_->choice_width_units,igp.width,defaultUnit);
        updateWidgetsFromLength(size_->input_height,
@@ -351,18 +338,42 @@ void FormGraphics::update()
            }
        }
        fl_set_button(size_->check_aspectratio, igp.keepAspectRatio);
            }
        }
        fl_set_button(size_->check_aspectratio, igp.keepAspectRatio);
-       // now the lyx-internally viewsize
-       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());
-       if (igp.rotateOrigin.empty())
-           fl_set_choice(special_->choice_origin,0);
-       else
-           fl_set_choice_text(special_->choice_origin,igp.rotateOrigin.c_str());
+       
+       // the bb section               
+       // set the bounding box values, if exists. First we need the whole
+       // path, because the controller knows nothing about the doc-dir
+       lyxerr << "GraphicsUpdate::BoundingBox = " << igp.bb << "\n";
+       controller().bbChanged = false;
+       if (igp.bb.empty()) {
+           string const fileWithAbsPath = MakeAbsPath(igp.filename, OnlyPath(igp.filename));   
+           string bb = controller().readBB(fileWithAbsPath);
+           lyxerr << "file::BoundingBox = " << bb << "\n";
+           if (!bb.empty()) {          
+               // get the values from the file
+               // in this case we always have the point-unit
+               fl_set_input(bbox_->input_bb_x0, token(bb,' ',0).c_str());
+               fl_set_input(bbox_->input_bb_y0, token(bb,' ',1).c_str());
+               fl_set_input(bbox_->input_bb_x1, token(bb,' ',2).c_str());
+               fl_set_input(bbox_->input_bb_y1, token(bb,' ',3).c_str());
+           }
+       } else {                                // get the values from the inset
+           controller().bbChanged = true;
+           LyXLength anyLength;
+           anyLength = LyXLength(token(igp.bb,' ',0));
+           updateWidgetsFromLength(bbox_->input_bb_x0,
+                       bbox_->choice_bb_x0,anyLength,"pt");
+           anyLength = LyXLength(token(igp.bb,' ',1));
+           updateWidgetsFromLength(bbox_->input_bb_y0,
+                       bbox_->choice_bb_y0,anyLength,"pt");
+           anyLength = LyXLength(token(igp.bb,' ',2));
+           updateWidgetsFromLength(bbox_->input_bb_x1,
+                       bbox_->choice_bb_x1,anyLength,"pt");
+           anyLength = LyXLength(token(igp.bb,' ',3));
+           updateWidgetsFromLength(bbox_->input_bb_y1,
+                       bbox_->choice_bb_y1,anyLength,"pt");
+       }
+
+       // the special section
        fl_set_input(special_->input_special, igp.special.c_str());
 }
 
        fl_set_input(special_->input_special, igp.special.c_str());
 }
 
@@ -440,19 +451,15 @@ ButtonPolicy::SMInput FormGraphics::input(FL_OBJECT * ob, long)
        invalid = invalid || !isValid(bbox_->input_bb_y1);
        invalid = invalid || !isValid(size_->input_width);
        invalid = invalid || !isValid(size_->input_height);
        invalid = invalid || !isValid(bbox_->input_bb_y1);
        invalid = invalid || !isValid(size_->input_width);
        invalid = invalid || !isValid(size_->input_height);
-       invalid = invalid || !isValid(file_->input_lyxwidth);
-       invalid = invalid || !isValid(file_->input_lyxheight);
+       invalid = invalid || !isValid(lyxview_->input_lyxwidth);
+       invalid = invalid || !isValid(lyxview_->input_lyxheight);
 
        // deactivate OK/ Apply buttons and
        // spit out warnings if invalid
 
        // deactivate OK/ Apply buttons and
        // spit out warnings if invalid
-       if (ob == bbox_->input_bb_x0
-                       || ob == bbox_->input_bb_x1
-                       || ob == bbox_->input_bb_y0
-                       || ob == bbox_->input_bb_y1
-                       || ob == size_->input_width
-                       || ob == size_->input_height
-                       || ob == file_->input_lyxwidth
-                       || ob == file_->input_lyxheight) {
+       if (ob == bbox_->input_bb_x0 || ob == bbox_->input_bb_x1 || 
+           ob == bbox_->input_bb_y0 || ob == bbox_->input_bb_y1 || 
+           ob == size_->input_width || ob == size_->input_height || 
+           ob == lyxview_->input_lyxwidth || ob == lyxview_->input_lyxheight) {
                if (invalid) {
                        fl_set_object_label(dialog_->text_warning,
                                _("Warning: Invalid Length!"));
                if (invalid) {
                        fl_set_object_label(dialog_->text_warning,
                                _("Warning: Invalid Length!"));
@@ -463,25 +470,6 @@ ButtonPolicy::SMInput FormGraphics::input(FL_OBJECT * ob, long)
                }
        }
 
                }
        }
 
-       return checkInput();
-}
-
-
-ButtonPolicy::SMInput FormGraphics::checkInput()
-{
-       // 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;
-       // We verify now that there is a filename, it exists, it's a file
-       // and it's readable.
-       string filename = getStringFromInput(file_->input_filename);
-       FileInfo file(filename);
-       if (filename.empty() || !file.isOK() || !file.exist()
-                           || !file.isRegular() || !file.readable()
-          )
-               activate = ButtonPolicy::SMI_INVALID;
-
-       return activate;
+       return ButtonPolicy::SMI_VALID;
 }
 
 }
 
index e14eb8222832a24afa617165df0525d74a083cc7..c304a8cdd6ab29ebe9d9806aa9168efbb9bbf2c2 100644 (file)
@@ -28,6 +28,7 @@
 class ControlGraphics;
 struct FD_form_graphics;
 struct FD_form_file;
 class ControlGraphics;
 struct FD_form_graphics;
 struct FD_form_file;
+struct FD_form_lyxview;
 struct FD_form_size;
 struct FD_form_bbox;
 struct FD_form_special;
 struct FD_form_size;
 struct FD_form_bbox;
 struct FD_form_special;
@@ -55,14 +56,13 @@ private:
        /// 
        void help();
 
        /// 
        void help();
 
-       /// Verify that the input is correct. If not disable ok/apply buttons.
-       ButtonPolicy::SMInput checkInput();
-
        /// Fdesign generated method
        FD_form_graphics * build_graphics();
        ///
        FD_form_file * build_file();
        ///
        /// Fdesign generated method
        FD_form_graphics * build_graphics();
        ///
        FD_form_file * build_file();
        ///
+       FD_form_lyxview * build_lyxview();
+       ///
        FD_form_size * build_size();
        ///
        FD_form_bbox * build_bbox();
        FD_form_size * build_size();
        ///
        FD_form_bbox * build_bbox();
@@ -72,6 +72,8 @@ private:
        /// Real GUI implementation.
        boost::scoped_ptr<FD_form_file> file_;
        ///
        /// Real GUI implementation.
        boost::scoped_ptr<FD_form_file> file_;
        ///
+       boost::scoped_ptr<FD_form_lyxview> lyxview_;
+       ///
        boost::scoped_ptr<FD_form_size> size_;
        ///
        boost::scoped_ptr<FD_form_bbox> bbox_;
        boost::scoped_ptr<FD_form_size> size_;
        ///
        boost::scoped_ptr<FD_form_bbox> bbox_;
index 4a2784b31f91fa653da3e6c18532c562f0319557..df70023259ae47b555ded9c2f24eb43c5f8131fc 100644 (file)
@@ -96,54 +96,63 @@ FD_form_file * FormGraphics::build_file()
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
     fl_set_object_callback(obj, C_FormBaseInputCB, 0);
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
     fl_set_object_callback(obj, C_FormBaseInputCB, 0);
-  obj = fl_add_labelframe(FL_ENGRAVED_FRAME, 15, 65, 460, 95, _("Screen Display"));
+  obj = fl_add_labelframe(FL_ENGRAVED_FRAME, 15, 50, 460, 50, _("Subfigure"));
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
+    fl_set_object_lstyle(obj, FL_BOLD_STYLE);
   {
   {
-    char const * const dummy = N_("Show:|#o");
-    fdui->choice_display = obj = fl_add_choice(FL_NORMAL_CHOICE, 85, 80, 160, 30, idex(_(dummy)));
+    char const * const dummy = N_("Subfigure|#S");
+    fdui->check_subcaption = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 20, 60, 30, 30, idex(_(dummy)));
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
-    fl_set_object_boxtype(obj, FL_FRAME_BOX);
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
+    fl_set_object_lalign(obj, FL_ALIGN_RIGHT);
     fl_set_object_callback(obj, C_FormBaseInputCB, 0);
   {
     fl_set_object_callback(obj, C_FormBaseInputCB, 0);
   {
-    char const * const dummy = N_("Width:|#w");
-    fdui->input_lyxwidth = obj = fl_add_input(FL_NORMAL_INPUT, 85, 120, 95, 30, idex(_(dummy)));
+    char const * const dummy = N_("Title:|#T");
+    fdui->input_subcaption = obj = fl_add_input(FL_NORMAL_INPUT, 180, 60, 280, 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);
     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);
+  obj = fl_add_labelframe(FL_ENGRAVED_FRAME, 15, 110, 460, 60, _("Rotation"));
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+    fl_set_object_lstyle(obj, FL_BOLD_STYLE);
   {
   {
-    char const * const dummy = N_("Height:|#h");
-    fdui->input_lyxheight = obj = fl_add_input(FL_NORMAL_INPUT, 315, 120, 85, 30, idex(_(dummy)));
+    char const * const dummy = N_("Angle:|#n");
+    fdui->input_rotate_angle = obj = fl_add_input(FL_INT_INPUT, 105, 130, 72, 28, 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);
     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, "");
+  obj = fl_add_text(FL_NORMAL_TEXT, 175, 130, 66, 30, _("degrees"));
+    fl_set_object_lsize(obj, FL_NORMAL_SIZE);
+    fl_set_object_lalign(obj, FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
+  {
+    char const * const dummy = N_("Origin:|#O");
+    fdui->choice_origin = obj = fl_add_choice(FL_NORMAL_CHOICE, 340, 130, 118, 28, idex(_(dummy)));
+    fl_set_button_shortcut(obj, scex(_(dummy)), 1);
+  }
     fl_set_object_boxtype(obj, FL_FRAME_BOX);
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
     fl_set_object_callback(obj, C_FormBaseInputCB, 0);
     fl_set_object_boxtype(obj, FL_FRAME_BOX);
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
     fl_set_object_callback(obj, C_FormBaseInputCB, 0);
-  obj = fl_add_labelframe(FL_ENGRAVED_FRAME, 15, 175, 460, 50, _("Sub figure"));
+  obj = fl_add_labelframe(FL_ENGRAVED_FRAME, 15, 180, 460, 50, _("Options"));
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
+    fl_set_object_lstyle(obj, FL_BOLD_STYLE);
   {
   {
-    char const * const dummy = N_("Subfigure|#S");
-    fdui->check_subcaption = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 20, 185, 30, 30, idex(_(dummy)));
+    char const * const dummy = N_("clip to bounding box|#b");
+    fdui->button_clip = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 145, 190, 30, 30, idex(_(dummy)));
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
     fl_set_object_lalign(obj, FL_ALIGN_RIGHT);
     fl_set_object_callback(obj, C_FormBaseInputCB, 0);
   {
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
     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, 180, 185, 280, 30, idex(_(dummy)));
+    char const * const dummy = N_("draft mode|#m");
+    fdui->button_draft = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 20, 190, 30, 30, idex(_(dummy)));
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
+    fl_set_object_lalign(obj, FL_ALIGN_RIGHT);
     fl_set_object_callback(obj, C_FormBaseInputCB, 0);
   fl_end_form();
 
     fl_set_object_callback(obj, C_FormBaseInputCB, 0);
   fl_end_form();
 
@@ -169,13 +178,14 @@ FD_form_size * FormGraphics::build_size()
   fdui->form->u_vdata = this;
   obj = fl_add_box(FL_FLAT_BOX, 0, 0, 505, 235, "");
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
   fdui->form->u_vdata = this;
   obj = fl_add_box(FL_FLAT_BOX, 0, 0, 505, 235, "");
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-  obj = fl_add_labelframe(FL_ENGRAVED_FRAME, 15, 15, 455, 205, _("Size"));
+  obj = fl_add_labelframe(FL_ENGRAVED_FRAME, 15, 10, 470, 210, _("Size"));
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
+    fl_set_object_lstyle(obj, FL_BOLD_STYLE);
 
   fdui->radio_size = fl_bgn_group();
   {
     char const * const dummy = N_("Default|#D");
 
   fdui->radio_size = fl_bgn_group();
   {
     char const * const dummy = N_("Default|#D");
-    fdui->button_default = obj = fl_add_round3dbutton(FL_RADIO_BUTTON, 80, 30, 30, 30, idex(_(dummy)));
+    fdui->button_default = obj = fl_add_round3dbutton(FL_RADIO_BUTTON, 50, 20, 30, 30, idex(_(dummy)));
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_color(obj, FL_COL1, FL_YELLOW);
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_color(obj, FL_COL1, FL_YELLOW);
@@ -184,7 +194,7 @@ FD_form_size * FormGraphics::build_size()
     fl_set_object_callback(obj, C_FormBaseInputCB, 0);
   {
     char const * const dummy = N_("Custom|#C");
     fl_set_object_callback(obj, C_FormBaseInputCB, 0);
   {
     char const * const dummy = N_("Custom|#C");
-    fdui->button_wh = obj = fl_add_round3dbutton(FL_RADIO_BUTTON, 80, 65, 30, 30, idex(_(dummy)));
+    fdui->button_wh = obj = fl_add_round3dbutton(FL_RADIO_BUTTON, 50, 80, 30, 30, idex(_(dummy)));
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_color(obj, FL_COL1, FL_YELLOW);
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_color(obj, FL_COL1, FL_YELLOW);
@@ -193,7 +203,7 @@ FD_form_size * FormGraphics::build_size()
     fl_set_object_callback(obj, C_FormBaseInputCB, 0);
   {
     char const * const dummy = N_("Scale|#S");
     fl_set_object_callback(obj, C_FormBaseInputCB, 0);
   {
     char const * const dummy = N_("Scale|#S");
-    fdui->button_scale = obj = fl_add_round3dbutton(FL_RADIO_BUTTON, 80, 145, 30, 30, idex(_(dummy)));
+    fdui->button_scale = obj = fl_add_round3dbutton(FL_RADIO_BUTTON, 50, 175, 30, 30, idex(_(dummy)));
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_color(obj, FL_COL1, FL_YELLOW);
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_color(obj, FL_COL1, FL_YELLOW);
@@ -204,40 +214,40 @@ FD_form_size * FormGraphics::build_size()
 
   {
     char const * const dummy = N_("Width:|#W");
 
   {
     char const * const dummy = N_("Width:|#W");
-    fdui->input_width = obj = fl_add_input(FL_NORMAL_INPUT, 270, 65, 85, 30, idex(_(dummy)));
+    fdui->input_width = obj = fl_add_input(FL_NORMAL_INPUT, 325, 80, 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);
     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, 360, 65, 60, 30, "");
+  fdui->choice_width_units = obj = fl_add_choice(FL_NORMAL_CHOICE, 415, 80, 60, 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);
   {
     char const * const dummy = N_("Height:|#H");
     fl_set_object_boxtype(obj, FL_FRAME_BOX);
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
     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, 270, 100, 85, 30, idex(_(dummy)));
+    fdui->input_height = obj = fl_add_input(FL_NORMAL_INPUT, 325, 115, 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);
     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, 360, 100, 60, 30, "");
+  fdui->choice_height_units = obj = fl_add_choice(FL_NORMAL_CHOICE, 415, 115, 60, 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);
   {
     fl_set_object_boxtype(obj, FL_FRAME_BOX);
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
     fl_set_object_callback(obj, C_FormBaseInputCB, 0);
   {
-    char const * const dummy = N_("Factor:|#F");
-    fdui->input_scale = obj = fl_add_input(FL_NORMAL_INPUT, 270, 145, 85, 30, idex(_(dummy)));
+    char const * const dummy = N_("Value:|#V");
+    fdui->input_scale = obj = fl_add_input(FL_NORMAL_INPUT, 325, 175, 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
     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, 360, 145, 25, 30, _("%"));
+  obj = fl_add_text(FL_NORMAL_TEXT, 420, 175, 25, 30, _("%"));
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
     fl_set_object_lalign(obj, FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
   {
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
     fl_set_object_lalign(obj, FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
   {
-    char const * const dummy = N_("keep aspect ratio|#k");
-    fdui->check_aspectratio = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 270, 185, 30, 30, idex(_(dummy)));
+    char const * const dummy = N_("keep aspectratio|#k");
+    fdui->check_aspectratio = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 85, 115, 30, 30, idex(_(dummy)));
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
@@ -322,24 +332,41 @@ FD_form_bbox * FormGraphics::build_bbox()
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
     fl_set_object_callback(obj, C_FormBaseInputCB, 0);
   {
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
     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, 260, 145, 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, 135, 160, 220, 30, idex(_(dummy)));
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_lalign(obj, FL_ALIGN_RIGHT);
     fl_set_object_callback(obj, C_FormBaseInputCB, 0);
     fl_set_object_callback(obj, C_FormBaseInputCB, 0);
-  {
-    char const * const dummy = N_("draft mode|#d");
-    fdui->button_draft = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 260, 180, 30, 30, idex(_(dummy)));
-    fl_set_button_shortcut(obj, scex(_(dummy)), 1);
-  }
+  fl_end_form();
+
+  fdui->form->fdui = fdui;
+
+  return fdui;
+}
+/*---------------------------------------*/
+
+FD_form_special::~FD_form_special()
+{
+  if ( form->visible ) fl_hide_form( form );
+  fl_free_form( form );
+}
+
+
+FD_form_special * FormGraphics::build_special()
+{
+  FL_OBJECT *obj;
+  FD_form_special *fdui = new FD_form_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, "");
+    fl_set_object_lsize(obj, FL_NORMAL_SIZE);
+  obj = fl_add_labelframe(FL_ENGRAVED_FRAME, 15, 15, 455, 70, _("Special Options"));
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    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, 30, 160, 220, 30, idex(_(dummy)));
+    char const * const dummy = N_("LaTeX Options:|#L");
+    fdui->input_special = obj = fl_add_input(FL_NORMAL_INPUT, 190, 40, 265, 30, idex(_(dummy)));
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
@@ -352,51 +379,88 @@ FD_form_bbox * FormGraphics::build_bbox()
 }
 /*---------------------------------------*/
 
 }
 /*---------------------------------------*/
 
-FD_form_special::~FD_form_special()
+FD_form_lyxview::~FD_form_lyxview()
 {
   if ( form->visible ) fl_hide_form( form );
   fl_free_form( form );
 }
 
 
 {
   if ( form->visible ) fl_hide_form( form );
   fl_free_form( form );
 }
 
 
-FD_form_special * FormGraphics::build_special()
+FD_form_lyxview * FormGraphics::build_lyxview()
 {
   FL_OBJECT *obj;
 {
   FL_OBJECT *obj;
-  FD_form_special *fdui = new FD_form_special;
+  FD_form_lyxview *fdui = new FD_form_lyxview;
 
   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, "");
 
   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, 470, 205, _("Screen Display"));
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-  obj = fl_add_labelframe(FL_ENGRAVED_FRAME, 15, 15, 455, 75, _("Rotation"));
+    fl_set_object_lstyle(obj, FL_BOLD_STYLE);
+  {
+    char const * const dummy = N_("Show:|#o");
+    fdui->choice_display = obj = fl_add_choice(FL_NORMAL_CHOICE, 30, 45, 100, 30, idex(_(dummy)));
+    fl_set_button_shortcut(obj, scex(_(dummy)), 1);
+  }
+    fl_set_object_boxtype(obj, FL_FRAME_BOX);
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
+    fl_set_object_lalign(obj, FL_ALIGN_TOP_LEFT);
+    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
   {
   {
-    char const * const dummy = N_("Angle:|#n");
-    fdui->input_rotate_angle = obj = fl_add_input(FL_INT_INPUT, 125, 40, 70, 30, idex(_(dummy)));
+    char const * const dummy = N_("Width:|#w");
+    fdui->input_lyxwidth = obj = fl_add_input(FL_NORMAL_INPUT, 305, 70, 90, 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);
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
     fl_set_object_callback(obj, C_FormBaseInputCB, 0);
-  obj = fl_add_text(FL_NORMAL_TEXT, 200, 40, 80, 30, _("degrees"));
+  fdui->choice_width_lyxwidth = obj = fl_add_choice(FL_NORMAL_CHOICE, 410, 70, 60, 30, "");
+    fl_set_object_boxtype(obj, FL_FRAME_BOX);
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
-    fl_set_object_lalign(obj, FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
-  obj = fl_add_labelframe(FL_ENGRAVED_FRAME, 15, 105, 455, 70, _("Special Options"));
+    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, 305, 110, 90, 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, 410, 110, 60, 30, "");
+    fl_set_object_boxtype(obj, FL_FRAME_BOX);
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
+    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
   {
   {
-    char const * const dummy = N_("LaTeX Options:|#L");
-    fdui->input_special = obj = fl_add_input(FL_NORMAL_INPUT, 190, 130, 265, 30, idex(_(dummy)));
+    char const * const dummy = N_("Value:|#V");
+    fdui->input_lyxscale = obj = fl_add_input(FL_NORMAL_INPUT, 305, 175, 90, 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);
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
     fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+ fl_bgn_group();
+  obj = fl_add_round3dbutton(FL_RADIO_BUTTON, 205, 20, 30, 30, "Default|#D");
+    fl_set_object_color(obj, FL_COL1, FL_YELLOW);
+    fl_set_object_lsize(obj, FL_NORMAL_SIZE);
+    fl_set_object_lalign(obj, FL_ALIGN_LEFT);
+    fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+  obj = fl_add_round3dbutton(FL_RADIO_BUTTON, 205, 70, 30, 30, "Custom|#C");
+    fl_set_object_color(obj, FL_COL1, FL_YELLOW);
+    fl_set_object_lsize(obj, FL_NORMAL_SIZE);
+    fl_set_object_lalign(obj, FL_ALIGN_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_CHOICE, 335, 40, 115, 30, idex(_(dummy)));
+    char const * const dummy = N_("Scale|#S");
+    fdui->button_lyxscale = obj = fl_add_round3dbutton(FL_RADIO_BUTTON, 205, 175, 30, 30, idex(_(dummy)));
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
     fl_set_button_shortcut(obj, scex(_(dummy)), 1);
   }
-    fl_set_object_boxtype(obj, FL_FRAME_BOX);
+    fl_set_object_color(obj, FL_COL1, FL_YELLOW);
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
+    fl_set_object_lalign(obj, FL_ALIGN_LEFT);
     fl_set_object_callback(obj, C_FormBaseInputCB, 0);
     fl_set_object_callback(obj, C_FormBaseInputCB, 0);
+  fl_end_group();
+
+  // xgettext:no-c-format
+  obj = fl_add_text(FL_NORMAL_TEXT, 410, 175, 25, 30, _("%"));
+    fl_set_object_lsize(obj, FL_NORMAL_SIZE);
+    fl_set_object_lalign(obj, FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
   fl_end_form();
 
   fdui->form->fdui = fdui;
   fl_end_form();
 
   fdui->form->fdui = fdui;
index dbe8b48a0785828cb6d206a0dcbe7f0bfebf9944..3855ff5ac5c0000a117e100b51136445c60ac020 100644 (file)
@@ -18,6 +18,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);
 
+extern  "C" void C_FormBaseInputCB(FL_OBJECT *, long);
+
 
 /**** Forms and Objects ****/
 struct FD_form_graphics {
 
 /**** Forms and Objects ****/
 struct FD_form_graphics {
@@ -37,13 +39,12 @@ struct FD_form_file {
        FL_FORM *form;
        FL_OBJECT *input_filename;
        FL_OBJECT *button_browse;
        FL_FORM *form;
        FL_OBJECT *input_filename;
        FL_OBJECT *button_browse;
-       FL_OBJECT *choice_display;
-       FL_OBJECT *input_lyxwidth;
-       FL_OBJECT *choice_width_lyxwidth;
-       FL_OBJECT *input_lyxheight;
-       FL_OBJECT *choice_width_lyxheight;
        FL_OBJECT *check_subcaption;
        FL_OBJECT *input_subcaption;
        FL_OBJECT *check_subcaption;
        FL_OBJECT *input_subcaption;
+       FL_OBJECT *input_rotate_angle;
+       FL_OBJECT *choice_origin;
+       FL_OBJECT *button_clip;
+       FL_OBJECT *button_draft;
 };
 struct FD_form_size {
        ~FD_form_size();
 };
 struct FD_form_size {
        ~FD_form_size();
@@ -72,17 +73,25 @@ struct FD_form_bbox {
        FL_OBJECT *choice_bb_y0;
        FL_OBJECT *input_bb_y1;
        FL_OBJECT *choice_bb_y1;
        FL_OBJECT *choice_bb_y0;
        FL_OBJECT *input_bb_y1;
        FL_OBJECT *choice_bb_y1;
-       FL_OBJECT *button_clip;
-       FL_OBJECT *button_draft;
        FL_OBJECT *button_getBB;
 };
 struct FD_form_special {
        ~FD_form_special();
 
        FL_FORM *form;
        FL_OBJECT *button_getBB;
 };
 struct FD_form_special {
        ~FD_form_special();
 
        FL_FORM *form;
-       FL_OBJECT *input_rotate_angle;
        FL_OBJECT *input_special;
        FL_OBJECT *input_special;
-       FL_OBJECT *choice_origin;
+};
+struct FD_form_lyxview {
+       ~FD_form_lyxview();
+
+       FL_FORM *form;
+       FL_OBJECT *choice_display;
+       FL_OBJECT *input_lyxwidth;
+       FL_OBJECT *choice_width_lyxwidth;
+       FL_OBJECT *input_lyxheight;
+       FL_OBJECT *choice_width_lyxheight;
+       FL_OBJECT *input_lyxscale;
+       FL_OBJECT *button_lyxscale;
 };
 
 #endif /* FD_form_graphics_h_ */
 };
 
 #endif /* FD_form_graphics_h_ */
index 57eb1baba99773e3e25842114a43f5824f7aea55..6a892567890c7795b29cabc03e121a4b13636669 100644 (file)
@@ -3,7 +3,7 @@ Magic: 13000
 Internal Form Definition File
     (do not change)
 
 Internal Form Definition File
     (do not change)
 
-Number of forms: 5
+Number of forms: 6
 Unit of measure: FL_COORD_PIXEL
 SnapGrid: 5
 
 Unit of measure: FL_COORD_PIXEL
 SnapGrid: 5
 
@@ -143,7 +143,7 @@ argument:
 Name: form_file
 Width: 505
 Height: 235
 Name: form_file
 Width: 505
 Height: 235
-Number of Objects: 12
+Number of Objects: 13
 
 --------------------
 class: FL_BOX
 
 --------------------
 class: FL_BOX
@@ -202,14 +202,14 @@ argument: 0
 --------------------
 class: FL_LABELFRAME
 type: ENGRAVED_FRAME
 --------------------
 class: FL_LABELFRAME
 type: ENGRAVED_FRAME
-box: 15 65 460 95
+box: 15 50 460 50
 boxtype: FL_NO_BOX
 colors: FL_BLACK FL_COL1
 alignment: FL_ALIGN_TOP_LEFT
 boxtype: FL_NO_BOX
 colors: FL_BLACK FL_COL1
 alignment: FL_ALIGN_TOP_LEFT
-style: FL_NORMAL_STYLE
+style: FL_BOLD_STYLE
 size: FL_NORMAL_SIZE
 lcol: FL_BLACK
 size: FL_NORMAL_SIZE
 lcol: FL_BLACK
-label: Screen Display
+label: Subfigure
 shortcut: 
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 shortcut: 
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
@@ -218,106 +218,124 @@ callback:
 argument: 
 
 --------------------
 argument: 
 
 --------------------
-class: FL_CHOICE
-type: NORMAL_CHOICE
-box: 85 80 160 30
-boxtype: FL_FRAME_BOX
-colors: FL_COL1 FL_BLACK
-alignment: FL_ALIGN_LEFT
+class: FL_CHECKBUTTON
+type: PUSH_BUTTON
+box: 20 60 30 30
+boxtype: FL_NO_BOX
+colors: FL_COL1 FL_YELLOW
+alignment: FL_ALIGN_RIGHT
 style: FL_NORMAL_STYLE
 size: FL_NORMAL_SIZE
 lcol: FL_BLACK
 style: FL_NORMAL_STYLE
 size: FL_NORMAL_SIZE
 lcol: FL_BLACK
-label: Show:|#o
+label: Subfigure|#S
 shortcut: 
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 shortcut: 
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
-name: choice_display
+name: check_subcaption
 callback: C_FormBaseInputCB
 argument: 0
 
 --------------------
 class: FL_INPUT
 type: NORMAL_INPUT
 callback: C_FormBaseInputCB
 argument: 0
 
 --------------------
 class: FL_INPUT
 type: NORMAL_INPUT
-box: 85 120 95 30
+box: 180 60 280 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
 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: Title:|#T
 shortcut: 
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 shortcut: 
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
-name: input_lyxwidth
+name: input_subcaption
 callback: C_FormBaseInputCB
 argument: 0
 
 --------------------
 callback: C_FormBaseInputCB
 argument: 0
 
 --------------------
-class: FL_CHOICE
-type: NORMAL_CHOICE
-box: 185 120 60 30
-boxtype: FL_FRAME_BOX
-colors: FL_COL1 FL_BLACK
-alignment: FL_ALIGN_LEFT
-style: FL_NORMAL_STYLE
+class: FL_LABELFRAME
+type: ENGRAVED_FRAME
+box: 15 110 460 60
+boxtype: FL_NO_BOX
+colors: FL_BLACK FL_COL1
+alignment: FL_ALIGN_TOP_LEFT
+style: FL_BOLD_STYLE
 size: FL_NORMAL_SIZE
 lcol: FL_BLACK
 size: FL_NORMAL_SIZE
 lcol: FL_BLACK
-label: 
+label: Rotation
 shortcut: 
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 shortcut: 
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
-name: choice_width_lyxwidth
-callback: C_FormBaseInputCB
-argument: 0
+name: 
+callback: 
+argument: 
 
 --------------------
 class: FL_INPUT
 
 --------------------
 class: FL_INPUT
-type: NORMAL_INPUT
-box: 315 120 85 30
+type: INT_INPUT
+box: 105 130 72 28
 boxtype: FL_DOWN_BOX
 colors: FL_COL1 FL_MCOL
 alignment: FL_ALIGN_LEFT
 style: FL_NORMAL_STYLE
 size: FL_NORMAL_SIZE
 lcol: FL_BLACK
 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: Angle:|#n
 shortcut: 
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 shortcut: 
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
-name: input_lyxheight
+name: input_rotate_angle
 callback: C_FormBaseInputCB
 argument: 0
 
 callback: C_FormBaseInputCB
 argument: 0
 
+--------------------
+class: FL_TEXT
+type: NORMAL_TEXT
+box: 175 130 66 30
+boxtype: FL_FLAT_BOX
+colors: FL_COL1 FL_MCOL
+alignment: FL_ALIGN_LEFT|FL_ALIGN_INSIDE
+style: FL_NORMAL_STYLE
+size: FL_NORMAL_SIZE
+lcol: FL_BLACK
+label: degrees
+shortcut: 
+resize: FL_RESIZE_ALL
+gravity: FL_NoGravity FL_NoGravity
+name: 
+callback: 
+argument: 
+
 --------------------
 class: FL_CHOICE
 type: NORMAL_CHOICE
 --------------------
 class: FL_CHOICE
 type: NORMAL_CHOICE
-box: 405 120 60 30
+box: 340 130 118 28
 boxtype: FL_FRAME_BOX
 colors: FL_COL1 FL_BLACK
 alignment: FL_ALIGN_LEFT
 style: FL_NORMAL_STYLE
 size: FL_NORMAL_SIZE
 lcol: FL_BLACK
 boxtype: FL_FRAME_BOX
 colors: FL_COL1 FL_BLACK
 alignment: FL_ALIGN_LEFT
 style: FL_NORMAL_STYLE
 size: FL_NORMAL_SIZE
 lcol: FL_BLACK
-label: 
+label: Origin:|#O
 shortcut: 
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 shortcut: 
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
-name: choice_width_lyxheight
+name: choice_origin
 callback: C_FormBaseInputCB
 argument: 0
 
 --------------------
 class: FL_LABELFRAME
 type: ENGRAVED_FRAME
 callback: C_FormBaseInputCB
 argument: 0
 
 --------------------
 class: FL_LABELFRAME
 type: ENGRAVED_FRAME
-box: 15 175 460 50
+box: 15 180 460 50
 boxtype: FL_NO_BOX
 colors: FL_BLACK FL_COL1
 alignment: FL_ALIGN_TOP_LEFT
 boxtype: FL_NO_BOX
 colors: FL_BLACK FL_COL1
 alignment: FL_ALIGN_TOP_LEFT
-style: FL_NORMAL_STYLE
+style: FL_BOLD_STYLE
 size: FL_NORMAL_SIZE
 lcol: FL_BLACK
 size: FL_NORMAL_SIZE
 lcol: FL_BLACK
-label: Sub figure
+label: Options
 shortcut: 
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 shortcut: 
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
@@ -328,36 +346,36 @@ argument:
 --------------------
 class: FL_CHECKBUTTON
 type: PUSH_BUTTON
 --------------------
 class: FL_CHECKBUTTON
 type: PUSH_BUTTON
-box: 20 185 30 30
+box: 145 190 30 30
 boxtype: FL_NO_BOX
 colors: FL_COL1 FL_YELLOW
 alignment: FL_ALIGN_RIGHT
 style: FL_NORMAL_STYLE
 size: FL_NORMAL_SIZE
 lcol: FL_BLACK
 boxtype: FL_NO_BOX
 colors: FL_COL1 FL_YELLOW
 alignment: FL_ALIGN_RIGHT
 style: FL_NORMAL_STYLE
 size: FL_NORMAL_SIZE
 lcol: FL_BLACK
-label: Subfigure|#S
+label: clip to bounding box|#b
 shortcut: 
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 shortcut: 
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
-name: check_subcaption
+name: button_clip
 callback: C_FormBaseInputCB
 argument: 0
 
 --------------------
 callback: C_FormBaseInputCB
 argument: 0
 
 --------------------
-class: FL_INPUT
-type: NORMAL_INPUT
-box: 180 185 280 30
-boxtype: FL_DOWN_BOX
-colors: FL_COL1 FL_MCOL
-alignment: FL_ALIGN_LEFT
+class: FL_CHECKBUTTON
+type: PUSH_BUTTON
+box: 20 190 30 30
+boxtype: FL_NO_BOX
+colors: FL_COL1 FL_YELLOW
+alignment: FL_ALIGN_RIGHT
 style: FL_NORMAL_STYLE
 size: FL_NORMAL_SIZE
 lcol: FL_BLACK
 style: FL_NORMAL_STYLE
 size: FL_NORMAL_SIZE
 lcol: FL_BLACK
-label: Title:|#T
+label: draft mode|#m
 shortcut: 
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 shortcut: 
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
-name: input_subcaption
+name: button_draft
 callback: C_FormBaseInputCB
 argument: 0
 
 callback: C_FormBaseInputCB
 argument: 0
 
@@ -388,11 +406,11 @@ argument:
 --------------------
 class: FL_LABELFRAME
 type: ENGRAVED_FRAME
 --------------------
 class: FL_LABELFRAME
 type: ENGRAVED_FRAME
-box: 15 15 455 205
+box: 15 10 470 210
 boxtype: FL_NO_BOX
 colors: FL_BLACK FL_COL1
 alignment: FL_ALIGN_TOP_LEFT
 boxtype: FL_NO_BOX
 colors: FL_BLACK FL_COL1
 alignment: FL_ALIGN_TOP_LEFT
-style: FL_NORMAL_STYLE
+style: FL_BOLD_STYLE
 size: FL_NORMAL_SIZE
 lcol: FL_BLACK
 label: Size
 size: FL_NORMAL_SIZE
 lcol: FL_BLACK
 label: Size
@@ -406,7 +424,7 @@ argument:
 --------------------
 class: FL_BEGIN_GROUP
 type: 0
 --------------------
 class: FL_BEGIN_GROUP
 type: 0
-box: 0 0 0
+box: 0 10 10 0
 boxtype: FL_NO_BOX
 colors: FL_COL1 FL_MCOL
 alignment: FL_ALIGN_CENTER
 boxtype: FL_NO_BOX
 colors: FL_COL1 FL_MCOL
 alignment: FL_ALIGN_CENTER
@@ -424,7 +442,7 @@ argument:
 --------------------
 class: FL_ROUND3DBUTTON
 type: RADIO_BUTTON
 --------------------
 class: FL_ROUND3DBUTTON
 type: RADIO_BUTTON
-box: 80 30 30 30
+box: 50 20 30 30
 boxtype: FL_NO_BOX
 colors: FL_COL1 FL_YELLOW
 alignment: FL_ALIGN_RIGHT
 boxtype: FL_NO_BOX
 colors: FL_COL1 FL_YELLOW
 alignment: FL_ALIGN_RIGHT
@@ -442,7 +460,7 @@ argument: 0
 --------------------
 class: FL_ROUND3DBUTTON
 type: RADIO_BUTTON
 --------------------
 class: FL_ROUND3DBUTTON
 type: RADIO_BUTTON
-box: 80 65 30 30
+box: 50 80 30 30
 boxtype: FL_NO_BOX
 colors: FL_COL1 FL_YELLOW
 alignment: FL_ALIGN_RIGHT
 boxtype: FL_NO_BOX
 colors: FL_COL1 FL_YELLOW
 alignment: FL_ALIGN_RIGHT
@@ -460,7 +478,7 @@ argument: 0
 --------------------
 class: FL_ROUND3DBUTTON
 type: RADIO_BUTTON
 --------------------
 class: FL_ROUND3DBUTTON
 type: RADIO_BUTTON
-box: 80 145 30 30
+box: 50 175 30 30
 boxtype: FL_NO_BOX
 colors: FL_COL1 FL_YELLOW
 alignment: FL_ALIGN_RIGHT
 boxtype: FL_NO_BOX
 colors: FL_COL1 FL_YELLOW
 alignment: FL_ALIGN_RIGHT
@@ -496,7 +514,7 @@ argument:
 --------------------
 class: FL_INPUT
 type: NORMAL_INPUT
 --------------------
 class: FL_INPUT
 type: NORMAL_INPUT
-box: 270 65 85 30
+box: 325 80 85 30
 boxtype: FL_DOWN_BOX
 colors: FL_COL1 FL_MCOL
 alignment: FL_ALIGN_LEFT
 boxtype: FL_DOWN_BOX
 colors: FL_COL1 FL_MCOL
 alignment: FL_ALIGN_LEFT
@@ -514,7 +532,7 @@ argument: 0
 --------------------
 class: FL_CHOICE
 type: NORMAL_CHOICE
 --------------------
 class: FL_CHOICE
 type: NORMAL_CHOICE
-box: 360 65 60 30
+box: 415 80 60 30
 boxtype: FL_FRAME_BOX
 colors: FL_COL1 FL_BLACK
 alignment: FL_ALIGN_LEFT
 boxtype: FL_FRAME_BOX
 colors: FL_COL1 FL_BLACK
 alignment: FL_ALIGN_LEFT
@@ -532,7 +550,7 @@ argument: 0
 --------------------
 class: FL_INPUT
 type: NORMAL_INPUT
 --------------------
 class: FL_INPUT
 type: NORMAL_INPUT
-box: 270 100 85 30
+box: 325 115 85 30
 boxtype: FL_DOWN_BOX
 colors: FL_COL1 FL_MCOL
 alignment: FL_ALIGN_LEFT
 boxtype: FL_DOWN_BOX
 colors: FL_COL1 FL_MCOL
 alignment: FL_ALIGN_LEFT
@@ -550,7 +568,7 @@ argument: 0
 --------------------
 class: FL_CHOICE
 type: NORMAL_CHOICE
 --------------------
 class: FL_CHOICE
 type: NORMAL_CHOICE
-box: 360 100 60 30
+box: 415 115 60 30
 boxtype: FL_FRAME_BOX
 colors: FL_COL1 FL_BLACK
 alignment: FL_ALIGN_LEFT
 boxtype: FL_FRAME_BOX
 colors: FL_COL1 FL_BLACK
 alignment: FL_ALIGN_LEFT
@@ -568,14 +586,14 @@ argument: 0
 --------------------
 class: FL_INPUT
 type: NORMAL_INPUT
 --------------------
 class: FL_INPUT
 type: NORMAL_INPUT
-box: 270 145 85 30
+box: 325 175 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
 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: Factor:|#F
+label: Value:|#V
 shortcut: 
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 shortcut: 
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
@@ -586,7 +604,7 @@ argument: 0
 --------------------
 class: FL_TEXT
 type: NORMAL_TEXT
 --------------------
 class: FL_TEXT
 type: NORMAL_TEXT
-box: 360 145 25 30
+box: 420 175 25 30
 boxtype: FL_FLAT_BOX
 colors: FL_COL1 FL_MCOL
 alignment: FL_ALIGN_LEFT|FL_ALIGN_INSIDE
 boxtype: FL_FLAT_BOX
 colors: FL_COL1 FL_MCOL
 alignment: FL_ALIGN_LEFT|FL_ALIGN_INSIDE
@@ -604,14 +622,14 @@ argument:
 --------------------
 class: FL_CHECKBUTTON
 type: PUSH_BUTTON
 --------------------
 class: FL_CHECKBUTTON
 type: PUSH_BUTTON
-box: 270 185 30 30
+box: 85 115 30 30
 boxtype: FL_NO_BOX
 colors: FL_COL1 FL_YELLOW
 alignment: FL_ALIGN_RIGHT
 style: FL_NORMAL_STYLE
 size: FL_NORMAL_SIZE
 lcol: FL_BLACK
 boxtype: FL_NO_BOX
 colors: FL_COL1 FL_YELLOW
 alignment: FL_ALIGN_RIGHT
 style: FL_NORMAL_STYLE
 size: FL_NORMAL_SIZE
 lcol: FL_BLACK
-label: keep aspect ratio|#k
+label: keep aspectratio|#k
 shortcut: 
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 shortcut: 
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
@@ -623,7 +641,7 @@ argument: 0
 Name: form_bbox
 Width: 505
 Height: 235
 Name: form_bbox
 Width: 505
 Height: 235
-Number of Objects: 15
+Number of Objects: 13
 
 --------------------
 class: FL_BOX
 
 --------------------
 class: FL_BOX
@@ -841,46 +859,10 @@ name: choice_bb_y1
 callback: C_FormBaseInputCB
 argument: 0
 
 callback: C_FormBaseInputCB
 argument: 0
 
---------------------
-class: FL_CHECKBUTTON
-type: PUSH_BUTTON
-box: 260 145 30 30
-boxtype: FL_NO_BOX
-colors: FL_COL1 FL_YELLOW
-alignment: FL_ALIGN_RIGHT
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_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_CHECKBUTTON
-type: PUSH_BUTTON
-box: 260 180 30 30
-boxtype: FL_NO_BOX
-colors: FL_COL1 FL_YELLOW
-alignment: FL_ALIGN_RIGHT
-style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
-lcol: FL_BLACK
-label: draft mode|#d
-shortcut: 
-resize: FL_RESIZE_ALL
-gravity: FL_NoGravity FL_NoGravity
-name: button_draft
-callback: C_FormBaseInputCB
-argument: 0
-
 --------------------
 class: FL_BUTTON
 type: NORMAL_BUTTON
 --------------------
 class: FL_BUTTON
 type: NORMAL_BUTTON
-box: 30 160 220 30
+box: 135 160 220 30
 boxtype: FL_UP_BOX
 colors: FL_COL1 FL_COL1
 alignment: FL_ALIGN_CENTER
 boxtype: FL_UP_BOX
 colors: FL_COL1 FL_COL1
 alignment: FL_ALIGN_CENTER
@@ -899,7 +881,7 @@ argument: 0
 Name: form_special
 Width: 505
 Height: 235
 Name: form_special
 Width: 505
 Height: 235
-Number of Objects: 7
+Number of Objects: 3
 
 --------------------
 class: FL_BOX
 
 --------------------
 class: FL_BOX
@@ -922,14 +904,14 @@ argument:
 --------------------
 class: FL_LABELFRAME
 type: ENGRAVED_FRAME
 --------------------
 class: FL_LABELFRAME
 type: ENGRAVED_FRAME
-box: 15 15 455 75
+box: 15 15 455 70
 boxtype: FL_NO_BOX
 colors: FL_BLACK FL_COL1
 alignment: FL_ALIGN_TOP_LEFT
 style: FL_NORMAL_STYLE
 size: FL_NORMAL_SIZE
 lcol: FL_BLACK
 boxtype: FL_NO_BOX
 colors: FL_BLACK FL_COL1
 alignment: FL_ALIGN_TOP_LEFT
 style: FL_NORMAL_STYLE
 size: FL_NORMAL_SIZE
 lcol: FL_BLACK
-label: Rotation
+label: Special Options
 shortcut: 
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 shortcut: 
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
@@ -939,33 +921,39 @@ argument:
 
 --------------------
 class: FL_INPUT
 
 --------------------
 class: FL_INPUT
-type: INT_INPUT
-box: 125 40 70 30
+type: NORMAL_INPUT
+box: 190 40 265 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
 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: Angle:|#n
+label: LaTeX Options:|#L
 shortcut: 
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 shortcut: 
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
-name: input_rotate_angle
+name: input_special
 callback: C_FormBaseInputCB
 argument: 0
 
 callback: C_FormBaseInputCB
 argument: 0
 
+=============== FORM ===============
+Name: form_lyxview
+Width: 505
+Height: 235
+Number of Objects: 14
+
 --------------------
 --------------------
-class: FL_TEXT
-type: NORMAL_TEXT
-box: 200 40 80 30
+class: FL_BOX
+type: FLAT_BOX
+box: 0 0 505 235
 boxtype: FL_FLAT_BOX
 boxtype: FL_FLAT_BOX
-colors: FL_COL1 FL_MCOL
-alignment: FL_ALIGN_LEFT|FL_ALIGN_INSIDE
+colors: FL_COL1 FL_COL1
+alignment: FL_ALIGN_CENTER
 style: FL_NORMAL_STYLE
 style: FL_NORMAL_STYLE
-size: FL_NORMAL_SIZE
+size: FL_DEFAULT_SIZE
 lcol: FL_BLACK
 lcol: FL_BLACK
-label: degrees
+label: 
 shortcut: 
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 shortcut: 
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
@@ -976,14 +964,14 @@ argument:
 --------------------
 class: FL_LABELFRAME
 type: ENGRAVED_FRAME
 --------------------
 class: FL_LABELFRAME
 type: ENGRAVED_FRAME
-box: 15 105 455 70
+box: 15 10 470 205
 boxtype: FL_NO_BOX
 colors: FL_BLACK FL_COL1
 alignment: FL_ALIGN_TOP_LEFT
 boxtype: FL_NO_BOX
 colors: FL_BLACK FL_COL1
 alignment: FL_ALIGN_TOP_LEFT
-style: FL_NORMAL_STYLE
+style: FL_BOLD_STYLE
 size: FL_NORMAL_SIZE
 lcol: FL_BLACK
 size: FL_NORMAL_SIZE
 lcol: FL_BLACK
-label: Special Options
+label: Screen Display
 shortcut: 
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 shortcut: 
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
@@ -991,41 +979,221 @@ name:
 callback: 
 argument: 
 
 callback: 
 argument: 
 
+--------------------
+class: FL_CHOICE
+type: NORMAL_CHOICE
+box: 30 45 100 30
+boxtype: FL_FRAME_BOX
+colors: FL_COL1 FL_BLACK
+alignment: FL_ALIGN_TOP_LEFT
+style: FL_NORMAL_STYLE
+size: FL_NORMAL_SIZE
+lcol: FL_BLACK
+label: Show:|#o
+shortcut: 
+resize: FL_RESIZE_ALL
+gravity: FL_NoGravity FL_NoGravity
+name: choice_display
+callback: C_FormBaseInputCB
+argument: 0
+
 --------------------
 class: FL_INPUT
 type: NORMAL_INPUT
 --------------------
 class: FL_INPUT
 type: NORMAL_INPUT
-box: 190 130 265 30
+box: 305 70 90 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
 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: LaTeX Options:|#L
+label: Width:|#w
 shortcut: 
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 shortcut: 
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
-name: input_special
+name: input_lyxwidth
 callback: C_FormBaseInputCB
 argument: 0
 
 --------------------
 class: FL_CHOICE
 type: NORMAL_CHOICE
 callback: C_FormBaseInputCB
 argument: 0
 
 --------------------
 class: FL_CHOICE
 type: NORMAL_CHOICE
-box: 335 40 115 30
+box: 410 70 60 30
 boxtype: FL_FRAME_BOX
 colors: FL_COL1 FL_BLACK
 alignment: FL_ALIGN_LEFT
 style: FL_NORMAL_STYLE
 size: FL_NORMAL_SIZE
 lcol: FL_BLACK
 boxtype: FL_FRAME_BOX
 colors: FL_COL1 FL_BLACK
 alignment: FL_ALIGN_LEFT
 style: FL_NORMAL_STYLE
 size: FL_NORMAL_SIZE
 lcol: FL_BLACK
-label: Origin:|#O
+label: 
 shortcut: 
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 shortcut: 
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
-name: choice_origin
+name: choice_width_lyxwidth
+callback: C_FormBaseInputCB
+argument: 0
+
+--------------------
+class: FL_INPUT
+type: NORMAL_INPUT
+box: 305 110 90 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
+shortcut: 
+resize: FL_RESIZE_ALL
+gravity: FL_NoGravity FL_NoGravity
+name: input_lyxheight
+callback: C_FormBaseInputCB
+argument: 0
+
+--------------------
+class: FL_CHOICE
+type: NORMAL_CHOICE
+box: 410 110 60 30
+boxtype: FL_FRAME_BOX
+colors: FL_COL1 FL_BLACK
+alignment: FL_ALIGN_LEFT
+style: FL_NORMAL_STYLE
+size: FL_NORMAL_SIZE
+lcol: FL_BLACK
+label: 
+shortcut: 
+resize: FL_RESIZE_ALL
+gravity: FL_NoGravity FL_NoGravity
+name: choice_width_lyxheight
 callback: C_FormBaseInputCB
 argument: 0
 
 callback: C_FormBaseInputCB
 argument: 0
 
+--------------------
+class: FL_INPUT
+type: NORMAL_INPUT
+box: 305 175 90 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: Value:|#V
+shortcut: 
+resize: FL_RESIZE_ALL
+gravity: FL_NoGravity FL_NoGravity
+name: input_lyxscale
+callback: C_FormBaseInputCB
+argument: 0
+
+--------------------
+class: FL_BEGIN_GROUP
+type: 0
+box: 0 10 10 0
+boxtype: FL_NO_BOX
+colors: FL_COL1 FL_MCOL
+alignment: FL_ALIGN_CENTER
+style: FL_NORMAL_STYLE
+size: FL_NORMAL_SIZE
+lcol: FL_BLACK
+label: 
+shortcut: 
+resize: FL_RESIZE_ALL
+gravity: FL_NoGravity FL_NoGravity
+name: 
+callback: 
+argument: 
+
+--------------------
+class: FL_ROUND3DBUTTON
+type: RADIO_BUTTON
+box: 205 20 30 30
+boxtype: FL_NO_BOX
+colors: FL_COL1 FL_YELLOW
+alignment: FL_ALIGN_LEFT
+style: FL_NORMAL_STYLE
+size: FL_NORMAL_SIZE
+lcol: FL_BLACK
+label: Default|#D
+shortcut: 
+resize: FL_RESIZE_ALL
+gravity: FL_NoGravity FL_NoGravity
+name: 
+callback: C_FormBaseInputCB
+argument: 0
+
+--------------------
+class: FL_ROUND3DBUTTON
+type: RADIO_BUTTON
+box: 205 70 30 30
+boxtype: FL_NO_BOX
+colors: FL_COL1 FL_YELLOW
+alignment: FL_ALIGN_LEFT
+style: FL_NORMAL_STYLE
+size: FL_NORMAL_SIZE
+lcol: FL_BLACK
+label: Custom|#C
+shortcut: 
+resize: FL_RESIZE_ALL
+gravity: FL_NoGravity FL_NoGravity
+name: 
+callback: C_FormBaseInputCB
+argument: 0
+
+--------------------
+class: FL_ROUND3DBUTTON
+type: RADIO_BUTTON
+box: 205 175 30 30
+boxtype: FL_NO_BOX
+colors: FL_COL1 FL_YELLOW
+alignment: FL_ALIGN_LEFT
+style: FL_NORMAL_STYLE
+size: FL_NORMAL_SIZE
+lcol: FL_BLACK
+label: Scale|#S
+shortcut: 
+resize: FL_RESIZE_ALL
+gravity: FL_NoGravity FL_NoGravity
+name: button_lyxscale
+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
+style: FL_NORMAL_STYLE
+size: FL_NORMAL_SIZE
+lcol: FL_BLACK
+label: 
+shortcut: 
+resize: FL_RESIZE_ALL
+gravity: FL_NoGravity FL_NoGravity
+name: 
+callback: 
+argument: 
+
+--------------------
+class: FL_TEXT
+type: NORMAL_TEXT
+box: 410 175 25 30
+boxtype: FL_FLAT_BOX
+colors: FL_COL1 FL_MCOL
+alignment: FL_ALIGN_LEFT|FL_ALIGN_INSIDE
+style: FL_NORMAL_STYLE
+size: FL_NORMAL_SIZE
+lcol: FL_BLACK
+label: %
+shortcut: 
+resize: FL_RESIZE_ALL
+gravity: FL_NoGravity FL_NoGravity
+name: 
+callback: 
+argument: 
+
 ==============================
 --------------------
 ==============================
 --------------------
index 4525e091482db11009691a2be37e657b19b949f5..c2c47902f46e28e6018f641f76d70e563783c6e8 100644 (file)
@@ -212,11 +212,12 @@ void updateWidgetsFromLengthString(FL_OBJECT * input, FL_OBJECT * choice,
        }
 
        // The unit is presumed to begin at the first char a-z
        }
 
        // The unit is presumed to begin at the first char a-z
+       // or with the char '%'
        string const tmp = lowercase(strip(frontStrip(str)));
 
        string::const_iterator p = tmp.begin();
        for (; p != tmp.end(); ++p) {
        string const tmp = lowercase(strip(frontStrip(str)));
 
        string::const_iterator p = tmp.begin();
        for (; p != tmp.end(); ++p) {
-               if (*p >= 'a' && *p <= 'z')
+               if ((*p >= 'a' && *p <= 'z') || *p == '%')
                        break;
        }
 
                        break;
        }
 
index 13dce25c8a14031adddce5b175cba9a44958ba66..393afd0b5eb163734c46bf10f84cc9d078f5436f 100644 (file)
@@ -1,3 +1,18 @@
+2002-02-04  Angus Leeming  <a.leeming@ic.ac.uk>
+
+       * insetgraphicsParams.C (init): set display to DEFAULT.
+       No longer #include "lyxrc.h".
+
+2002-02-04  Angus Leeming  <a.leeming@ic.ac.uk>
+
+       * insetgraphics.C (readFigInset): comment out the "zippedFile" stuff
+       for now (so that the code compiles).
+
+2002-02-02  Herbert Voss  <voss@lyx.org>
+
+       * insetgraphic.C: delete inVariant() and some minor changes
+       * insetgraphicsParams.[C]:
+
 2002-02-01  Angus Leeming  <a.leeming@ic.ac.uk>
 
        * insetgraphics.C (updateInset): if params.display == DEFAULT,
 2002-02-01  Angus Leeming  <a.leeming@ic.ac.uk>
 
        * insetgraphics.C (updateInset): if params.display == DEFAULT,
index 803a81f99eedc646a22ec50f0e910812b96f5c9d..8640ca9a234a3dd8f9125183030e742771cb8d3e 100644 (file)
@@ -367,7 +367,7 @@ void InsetGraphics::readInsetGraphics(Buffer const * buf, LyXLex & lex)
        }
 }
 
        }
 }
 
-
+// FormatVersion < 1.0  (LyX < 1.2)
 void InsetGraphics::readFigInset(Buffer const * buf, LyXLex & lex)
 {
        std::vector<string> const oldUnits =
 void InsetGraphics::readFigInset(Buffer const * buf, LyXLex & lex)
 {
        std::vector<string> const oldUnits =
@@ -540,7 +540,11 @@ string const InsetGraphics::prepareFile(Buffer const *buf) const
        //
        // Get the extension (format) of the original file.
        // we handle it like a virtual one, so we can have
        //
        // Get the extension (format) of the original file.
        // we handle it like a virtual one, so we can have
-       // different extensions with the same type
+       // different extensions with the same type.
+       // if it's a zipped one, than let LaTeX do the rest!!!
+       //if (zippedFile(params.filename))      
+       //    return params.filename;
+       // now we have unzipped files
        string const extension = getExtFromContents(params.filename);
        // Are we creating a PDF or a PS file?
        // (Should actually mean, are we usind latex or pdflatex).
        string const extension = getExtFromContents(params.filename);
        // Are we creating a PDF or a PS file?
        // (Should actually mean, are we usind latex or pdflatex).
index 870f8d18dd9c8ad2e5115ae77c908c144b85f837..e1f9f856574f0794496a2cebdd5fc13fdc787b67 100644 (file)
@@ -17,8 +17,6 @@
 #endif 
 
 #include "insetgraphicsParams.h"
 #endif 
 
 #include "insetgraphicsParams.h"
-
-#include "lyxrc.h"
 #include "support/translator.h"
 #include "support/filetools.h"
 #include "support/lyxlib.h"
 #include "support/translator.h"
 #include "support/filetools.h"
 #include "support/lyxlib.h"
@@ -99,14 +97,7 @@ void InsetGraphicsParams::init()
        bb = string();                  // bounding box
        draft = false;                  // draft mode
        clip = false;                   // clip image
        bb = string();                  // bounding box
        draft = false;                  // draft mode
        clip = false;                   // clip image
-       if (lyxrc.display_graphics == "mono") 
-           display = MONOCHROME;
-       else if (lyxrc.display_graphics == "gray") 
-           display = GRAYSCALE;
-       else if (lyxrc.display_graphics == "color") 
-           display = COLOR;
-       else
-           display = NONE;
+       display = DEFAULT;
        subcaption = false;             // subfigure
        width = LyXLength();            // set to 0pt
        height = LyXLength();
        subcaption = false;             // subfigure
        width = LyXLength();            // set to 0pt
        height = LyXLength();
@@ -118,8 +109,6 @@ void InsetGraphicsParams::init()
        rotateOrigin = "center";        // 
        rotateAngle = 0.0;              // in degrees
        special = string();             // userdefined stuff
        rotateOrigin = "center";        // 
        rotateAngle = 0.0;              // in degrees
        special = string();             // userdefined stuff
-
-       testInvariant();
 }
 
 void InsetGraphicsParams::copy(InsetGraphicsParams const & igp)
 }
 
 void InsetGraphicsParams::copy(InsetGraphicsParams const & igp)
@@ -141,27 +130,6 @@ void InsetGraphicsParams::copy(InsetGraphicsParams const & igp)
        rotateOrigin = igp.rotateOrigin;
        rotateAngle = igp.rotateAngle;
        special = igp.special;
        rotateOrigin = igp.rotateOrigin;
        rotateAngle = igp.rotateAngle;
        special = igp.special;
-
-       testInvariant();
-}
-
-void InsetGraphicsParams::testInvariant() const
-{
-       // Filename might be empty (when the dialog is first created).
-       // Assert(!filename.empty());
-       lyx::Assert(display == DEFAULT ||
-              display == COLOR ||
-              display == MONOCHROME ||
-              display == GRAYSCALE ||
-              display == NONE
-             );
-       // Angle is in degrees and ranges -360 < angle < 360
-       // The reason for this is that in latex there is a meaning for the
-       // different angles and they are not necessarliy interchangeable,
-       // it depends on the rotation origin.
-       lyx::Assert(rotateAngle < 360.0);
-       lyx::Assert(rotateAngle > -360.0);
-
 }
 
 bool operator==(InsetGraphicsParams const & left,
 }
 
 bool operator==(InsetGraphicsParams const & left,
index 7cf32bf02c144d821ab40ee389ac24386d4624c1..deca6e002ba6403a86bea66113a58cce8350b3fe 100644 (file)
@@ -85,8 +85,6 @@ struct InsetGraphicsParams
        void Write(Buffer const * buf, ostream & os) const;
        /// If the token belongs to our parameters, read it.
        bool Read(Buffer const * buf, LyXLex & lex, string const & token);
        void Write(Buffer const * buf, ostream & os) const;
        /// If the token belongs to our parameters, read it.
        bool Read(Buffer const * buf, LyXLex & lex, string const & token);
-       /// Test the struct to make sure that all the options have legal values.
-       void testInvariant() const;
 
 private:
        /// Initialize the object to a default status.
 
 private:
        /// Initialize the object to a default status.