From cb5c32cbb03ecdc9a7fa479511d1adf04a935d52 Mon Sep 17 00:00:00 2001 From: Angus Leeming Date: Tue, 23 Oct 2001 09:03:17 +0000 Subject: [PATCH] =?UTF-8?q?J=EF=BF=BDrgen=20Spitzm=EF=BF=BDller's=20change?= =?UTF-8?q?s=20to=20the=20graphics=20dialog.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@2916 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/frontends/xforms/FormGraphics.C | 23 ++++++++++++++++++++- src/frontends/xforms/FormGraphics.h | 12 ----------- src/frontends/xforms/form_graphics.C | 6 ++++-- src/frontends/xforms/forms/form_graphics.fd | 8 +++---- 4 files changed, 30 insertions(+), 19 deletions(-) diff --git a/src/frontends/xforms/FormGraphics.C b/src/frontends/xforms/FormGraphics.C index 11051e81ae..66de72a4bd 100644 --- a/src/frontends/xforms/FormGraphics.C +++ b/src/frontends/xforms/FormGraphics.C @@ -32,7 +32,28 @@ using std::endl; -static double const tol = 1.0e-08; +namespace { + +// Zero test for double precision numbers +double const tol = 1.0e-08; + +// The maximum digits for the image scale +int const SCALE_MAXDIGITS = 3; + +// The maximum digits for the image width +int const WIDTH_MAXDIGITS = 3; + +// The maximum digits for the image height +int const HEIGHT_MAXDIGITS = 3; + +// The max characters in the rotation angle (minus sign and 3 digits) +int const ROTATE_MAXCHARS = 4; + +// The maximum characters in a filename. +int const FILENAME_MAXCHARS = 1024; + +} // namespace anon + typedef FormCB > base_class; diff --git a/src/frontends/xforms/FormGraphics.h b/src/frontends/xforms/FormGraphics.h index 35244c0ec4..0faa35eebe 100644 --- a/src/frontends/xforms/FormGraphics.h +++ b/src/frontends/xforms/FormGraphics.h @@ -42,23 +42,11 @@ private: /// Filter the inputs on callback from xforms virtual ButtonPolicy::SMInput input(FL_OBJECT *, long); - /// The maximum digits for the image scale - static const int SCALE_MAXDIGITS = 3; - /// The maximum digits for the image width - static const int WIDTH_MAXDIGITS = 3; - /// The maximum digits for the image height - static const int HEIGHT_MAXDIGITS = 3; - /// The max characters in the rotation angle (minus sign and 3 digits) - static const int ROTATE_MAXCHARS = 4; - /// The maximum characters in a filename. - static const int FILENAME_MAXCHARS = 1024; - /// Verify that the input is correct. If not disable ok/apply buttons. ButtonPolicy::SMInput checkInput(); /// Fdesign generated method FD_form_graphics * build_graphics(); - }; diff --git a/src/frontends/xforms/form_graphics.C b/src/frontends/xforms/form_graphics.C index 80715ee33e..d97e7faf0a 100644 --- a/src/frontends/xforms/form_graphics.C +++ b/src/frontends/xforms/form_graphics.C @@ -47,7 +47,8 @@ FD_form_graphics * FormGraphics::build_graphics() } 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_CHOICE2, 180, 80, 65, 30, ""); + fdui->choice_width_units = obj = fl_add_choice(FL_NORMAL_CHOICE, 180, 80, 65, 30, ""); + fl_set_object_boxtype(obj, FL_FRAME_BOX); fl_set_object_callback(obj, C_FormBaseInputCB, 0); { char const * const dummy = N_("Height|#H"); @@ -56,7 +57,8 @@ FD_form_graphics * FormGraphics::build_graphics() } 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_CHOICE2, 180, 120, 65, 30, ""); + fdui->choice_height_units = obj = fl_add_choice(FL_NORMAL_CHOICE, 180, 120, 65, 30, ""); + fl_set_object_boxtype(obj, FL_FRAME_BOX); fl_set_object_callback(obj, C_FormBaseInputCB, 0); { char const * const dummy = N_("Scale|#S"); diff --git a/src/frontends/xforms/forms/form_graphics.fd b/src/frontends/xforms/forms/form_graphics.fd index fc29bcf166..b5cfa137cc 100644 --- a/src/frontends/xforms/forms/form_graphics.fd +++ b/src/frontends/xforms/forms/form_graphics.fd @@ -104,9 +104,9 @@ argument: 0 -------------------- class: FL_CHOICE -type: NORMAL_CHOICE2 +type: NORMAL_CHOICE box: 180 80 65 30 -boxtype: FL_UP_BOX +boxtype: FL_FRAME_BOX colors: FL_COL1 FL_BLACK alignment: FL_ALIGN_LEFT style: FL_NORMAL_STYLE @@ -140,9 +140,9 @@ argument: 0 -------------------- class: FL_CHOICE -type: NORMAL_CHOICE2 +type: NORMAL_CHOICE box: 180 120 65 30 -boxtype: FL_UP_BOX +boxtype: FL_FRAME_BOX colors: FL_COL1 FL_BLACK alignment: FL_ALIGN_LEFT style: FL_NORMAL_STYLE