From 25e82b07459282a13ac1fd00a9b58ba595c7b6a0 Mon Sep 17 00:00:00 2001 From: Angus Leeming Date: Tue, 5 Feb 2002 20:36:12 +0000 Subject: [PATCH] =?utf8?q?J=EF=BF=BDrgen's=20first=20go=20at=20tooltips=20?= =?utf8?q?etc...?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3491 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/frontends/controllers/ChangeLog | 4 + src/frontends/controllers/ControlTexinfo.C | 5 - src/frontends/controllers/ControlTexinfo.h | 2 - src/frontends/xforms/ChangeLog | 8 ++ src/frontends/xforms/FormBibtex.C | 44 ++++++ src/frontends/xforms/FormBibtex.h | 4 + src/frontends/xforms/FormCitation.C | 149 ++++++++++++++++++++ src/frontends/xforms/FormCitation.h | 6 + src/frontends/xforms/FormTexinfo.C | 138 +++++++++--------- src/frontends/xforms/FormTexinfo.h | 9 +- src/frontends/xforms/form_bibtex.C | 17 ++- src/frontends/xforms/form_bibtex.h | 1 + src/frontends/xforms/form_citation.C | 15 +- src/frontends/xforms/form_citation.h | 1 + src/frontends/xforms/form_texinfo.C | 15 +- src/frontends/xforms/form_texinfo.h | 1 - src/frontends/xforms/forms/form_bibtex.fd | 52 +++++-- src/frontends/xforms/forms/form_citation.fd | 50 ++++++- src/frontends/xforms/forms/form_texinfo.fd | 46 +++--- 19 files changed, 425 insertions(+), 142 deletions(-) diff --git a/src/frontends/controllers/ChangeLog b/src/frontends/controllers/ChangeLog index 5b5bf2d3fe..39c51336e3 100644 --- a/src/frontends/controllers/ChangeLog +++ b/src/frontends/controllers/ChangeLog @@ -1,3 +1,7 @@ +2002-02-05 Juergen Spitzmueller + + * ControlTexInfo.[Ch]: Removed Help functions. + 2002-02-01 John Levon * ControlSpellchecker.C: clear any selection left diff --git a/src/frontends/controllers/ControlTexinfo.C b/src/frontends/controllers/ControlTexinfo.C index 361f5a0cd8..19a2291a34 100644 --- a/src/frontends/controllers/ControlTexinfo.C +++ b/src/frontends/controllers/ControlTexinfo.C @@ -123,8 +123,3 @@ void ControlTexinfo::viewFile(string const filename) const lv_.getDialogs()->showFile(filename); } - -void ControlTexinfo::help() const -{ - lv_.getDialogs()->showFile(i18nLibFileSearch("help","Texinfo.hlp")); -} diff --git a/src/frontends/controllers/ControlTexinfo.h b/src/frontends/controllers/ControlTexinfo.h index 72b7c5ab32..849e41fd62 100644 --- a/src/frontends/controllers/ControlTexinfo.h +++ b/src/frontends/controllers/ControlTexinfo.h @@ -33,8 +33,6 @@ public: /// void viewFile(string const filename) const; /// - void help() const; - /// void rescanStyles() const; /// void runTexhash() const; diff --git a/src/frontends/xforms/ChangeLog b/src/frontends/xforms/ChangeLog index 23365fc1d5..769b89767b 100644 --- a/src/frontends/xforms/ChangeLog +++ b/src/frontends/xforms/ChangeLog @@ -11,6 +11,14 @@ * FormGraphic.C: cosmetic changes to the layout. Delete the help button +2002-02-05 Juergen Spitzmueller + + * forms/form.texinfo.fd: delete help button, add text_info + * forms/form.citation.fd,form.bibtex.fd: add text_info + * FormTexinfo.[Ch]: Delete Help mechanism, add tooltips and help messages. + * FormCitation.[Ch],FormBibtex.[Ch]: add tooltips and help messages (actually + no tooltips in Bibtex). + 2002-02-05 Angus Leeming * FormBase.[Ch]: You want tooltips too? You got 'em. Verified as diff --git a/src/frontends/xforms/FormBibtex.C b/src/frontends/xforms/FormBibtex.C index 591a33068b..a80c97818d 100644 --- a/src/frontends/xforms/FormBibtex.C +++ b/src/frontends/xforms/FormBibtex.C @@ -19,7 +19,9 @@ #include "form_bibtex.h" #include "gettext.h" #include "debug.h" +#include "xforms_helpers.h" #include "helper_funcs.h" +#include "support/LAssert.h" #include "support/lstrings.h" #include "support/filetools.h" @@ -47,6 +49,13 @@ void FormBibtex::build() bc().addReadOnly(dialog_->style_browse); bc().addReadOnly(dialog_->style); bc().addReadOnly(dialog_->radio_bibtotoc); + + // set up the feedback mechanism + setPrehandler(dialog_->database_browse); + setPrehandler(dialog_->database); + setPrehandler(dialog_->style_browse); + setPrehandler(dialog_->style); + setPrehandler(dialog_->radio_bibtotoc); } @@ -172,3 +181,38 @@ void FormBibtex::apply() controller().params().setOptions(bibstyle); } } + +void FormBibtex::clear_feedback() +{ + fl_set_object_label(dialog_->text_info, ""); + fl_redraw_object(dialog_->text_info); +} + +void FormBibtex::feedback(FL_OBJECT * ob) +{ + lyx::Assert(ob); + + string str; + + if (ob == dialog_->database) { + str = N_("The database you want to cite from. Insert it without the default extension \".bib\". If you insert it with the browser, LyX strips the extension. Several databases must be separated by a comma: \"natbib, books\"."); + + } else if (ob == dialog_->database_browse) { + str = _("Browse your directory for BibTeX databases."); + + } else if (ob == dialog_->style) { + str = _("The BibTeX style to use (only one allowed). Insert it without the default extension \".bst\" and without path. Most of the bibstyles are stored in $TEXMF/bibtex/bst. $TEXMF is the root dir of the local TeX tree. In \"Help->TeX Info\" you can list all installed styles."); + + } else if (ob == dialog_->style_browse) { + str = _("Browse your directory for BibTeX stylefiles."); + + } else if (ob == dialog_->radio_bibtotoc) { + str = _("Activate this option if you want the bibliography to appear in the Table of Contents (which doesn't happen by default)."); + } + + str = formatted(_(str), dialog_->text_info->w-10, FL_SMALL_SIZE); + + fl_set_object_label(dialog_->text_info, str.c_str()); + fl_set_object_lsize(dialog_->text_info, FL_SMALL_SIZE); + fl_redraw_object(dialog_->text_info); +} diff --git a/src/frontends/xforms/FormBibtex.h b/src/frontends/xforms/FormBibtex.h index 66a3241e77..8f9326af96 100644 --- a/src/frontends/xforms/FormBibtex.h +++ b/src/frontends/xforms/FormBibtex.h @@ -37,6 +37,10 @@ private: virtual void update(); /// Filter the inputs on callback from xforms virtual ButtonPolicy::SMInput input(FL_OBJECT *, long); + /// tooltips + void feedback(FL_OBJECT *); + /// + void clear_feedback(); /// Fdesign generated method FD_form_bibtex * build_bibtex(); diff --git a/src/frontends/xforms/FormCitation.C b/src/frontends/xforms/FormCitation.C index ac5ad5ccd3..0a34f3f75d 100644 --- a/src/frontends/xforms/FormCitation.C +++ b/src/frontends/xforms/FormCitation.C @@ -24,6 +24,7 @@ #include "FormCitation.h" #include "form_citation.h" #include "gettext.h" +#include "support/LAssert.h" #include "support/lstrings.h" #include "helper_funcs.h" #include "xforms_helpers.h" @@ -169,6 +170,39 @@ void FormCitation::build() bc().addReadOnly(dialog_->input_after); bc().addReadOnly(dialog_->button_full_author_list); bc().addReadOnly(dialog_->button_force_uppercase); + + //set up the feedback mechanism + setPrehandler(dialog_->button_add); + setPrehandler(dialog_->button_del); + setPrehandler(dialog_->button_up); + setPrehandler(dialog_->button_down); + setPrehandler(dialog_->browser_cite); + setPrehandler(dialog_->browser_bib); + setPrehandler(dialog_->browser_info); + setPrehandler(dialog_->choice_style); + setPrehandler(dialog_->input_before); + setPrehandler(dialog_->input_after); + setPrehandler(dialog_->button_full_author_list); + setPrehandler(dialog_->button_force_uppercase); + setPrehandler(dialog_->input_search); + setPrehandler(dialog_->button_search_case); + setPrehandler(dialog_->button_search_type); + + //set up the tooltip mechanism + setTooltipHandler(dialog_->button_add); + setTooltipHandler(dialog_->button_del); + setTooltipHandler(dialog_->button_up); + setTooltipHandler(dialog_->button_down); + setTooltipHandler(dialog_->choice_style); + setTooltipHandler(dialog_->input_before); + setTooltipHandler(dialog_->input_after); + setTooltipHandler(dialog_->button_full_author_list); + setTooltipHandler(dialog_->button_force_uppercase); + setTooltipHandler(dialog_->input_search); + setTooltipHandler(dialog_->button_search_case); + setTooltipHandler(dialog_->button_search_type); + setTooltipHandler(dialog_->button_previous); + setTooltipHandler(dialog_->button_next); } @@ -459,3 +493,118 @@ void FormCitation::setCiteButtons(State status) const setEnabled(dialog_->button_up, activate_up); setEnabled(dialog_->button_down, activate_down); } + +string const FormCitation::getTooltip(FL_OBJECT * ob) +{ + string str; + + if (ob == dialog_->button_add) { + str = N_("Add entry"); + + } else if (ob == dialog_->button_del) { + str = _("Delete entry"); + + } else if (ob == dialog_->button_up) { + str = _("Move entry up"); + + } else if (ob == dialog_->button_down) { + str = _("Move entry down"); + + } else if (ob == dialog_->choice_style) { + str = N_("Natbib Citation Style"); + + } else if (ob == dialog_->button_full_author_list) { + str = N_("List all authors"); + + } else if (ob == dialog_->button_force_uppercase) { + str = N_("Author Name begins with uppercase"); + + } else if (ob == dialog_->input_before) { + str = N_("Optional text before"); + + } else if (ob == dialog_->input_after) { + str = N_("Optional text after"); + + } else if (ob == dialog_->input_search) { + str = N_("Search the database"); + + } else if (ob == dialog_->button_search_case) { + str = N_("Case sensitive search"); + + } else if (ob == dialog_->button_search_type) { + str = N_("Use Regular Expressions."); + + } else if (ob == dialog_->button_previous) { + str = N_("Search Backwards"); + + } else if (ob == dialog_->button_next) { + str = N_("Search Forwards"); + } + + return str; +} + +void FormCitation::clear_feedback() +{ + fl_set_object_label(dialog_->text_info, ""); + fl_redraw_object(dialog_->text_info); +} + +void FormCitation::feedback(FL_OBJECT * ob) +{ + lyx::Assert(ob); + + string str; + + if (ob == dialog_->button_add) { + str = N_("Add the selected entry to the current citation reference."); + + } else if (ob == dialog_->button_del) { + str = N_("Delete the selected entry from the current citation reference."); + + } else if (ob == dialog_->button_up) { + str = N_("Move the selected entry upwards (in the current list)."); + + } else if (ob == dialog_->button_down) { + str = N_("Move the selected entry downwards (in the current list)."); + + } else if (ob == dialog_->browser_cite) { + str = N_("The entries which will be cited. Select them with the arrow buttons from the right browser window."); + + } else if (ob == dialog_->browser_bib) { + str = N_("All entries in the database you have loaded (via \"Insert->Lists&TOC->BibTex Reference\"). Move the ones you want to cite with the arrow buttons into the left browser window."); + + } else if (ob == dialog_->browser_info) { + str = N_("Information about the selected entry"); + + } else if (ob == dialog_->choice_style) { + str = N_("Here you may select how the citation label should look inside the text (Natbib)."); + + } else if (ob == dialog_->button_full_author_list) { + str = N_("Activate if you want to print all authors in a reference with more than three authors, and not \" et.al.\" (Natbib)."); + + } else if (ob == dialog_->button_force_uppercase) { + str = N_("Activate if you want to print the first character of the author name as uppercase (\"Van Gogh\", not \"van Gogh\". Useful at the beginning of sentences (Natbib)."); + + } else if (ob == dialog_->input_before) { + str = N_("Optional text which appears before the citation reference, e.g. \"see \""); + + } else if (ob == dialog_->input_after) { + str = N_("Optional text which appears after the citation reference, e.g. \"pp. 12\""); + + } else if (ob == dialog_->input_search) { + str = N_("Search your database (all fields will be searched)."); + + } else if (ob == dialog_->button_search_case) { + str = N_("Activate if you want to have case sensitive search: \"bibtex\" finds \"bibtex\", but not \"BibTeX\"."); + + } else if (ob == dialog_->button_search_type) { + str = N_("Activate if you want to enter Regular Expressions."); + } + + str = formatted(_(str), dialog_->text_info->w-10, FL_SMALL_SIZE); + + fl_set_object_label(dialog_->text_info, str.c_str()); + fl_set_object_lsize(dialog_->text_info, FL_SMALL_SIZE); + fl_redraw_object(dialog_->text_info); +} diff --git a/src/frontends/xforms/FormCitation.h b/src/frontends/xforms/FormCitation.h index cef3dc4edb..ea308900a0 100644 --- a/src/frontends/xforms/FormCitation.h +++ b/src/frontends/xforms/FormCitation.h @@ -51,6 +51,12 @@ private: virtual void update(); /// Filter the inputs on callback from xforms virtual ButtonPolicy::SMInput input(FL_OBJECT *, long); + /// tooltips + string const getTooltip(FL_OBJECT *); + /// + void feedback(FL_OBJECT *); + /// + void clear_feedback(); /// Fdesign generated method FD_form_citation * build_citation(); diff --git a/src/frontends/xforms/FormTexinfo.C b/src/frontends/xforms/FormTexinfo.C index 8a3abec274..80f586b04c 100644 --- a/src/frontends/xforms/FormTexinfo.C +++ b/src/frontends/xforms/FormTexinfo.C @@ -22,41 +22,11 @@ #include "xforms_helpers.h" #include "support/LAssert.h" -namespace { - -// C function wrapper, required by xforms. -extern "C" -int C_FormTexinfoFeedbackCB(FL_OBJECT * ob, int event, - FL_Coord, FL_Coord, int, void *) -{ - // Note that the return value is important in the pre-emptive handler. - // Don't return anything other than 0. - - lyx::Assert(ob); - // Don't Assert this one, as it can happen quite reasonably when things - // are being deleted in the d-tor. - //Assert(ob->form); - if (!ob->form) return 0; - - FormTexinfo * pre = - static_cast(ob->form->u_vdata); - pre->feedbackCB(ob, event); - return 0; -} - -void setPreHandler(FL_OBJECT * ob) -{ - lyx::Assert(ob); - fl_set_object_prehandler(ob, C_FormTexinfoFeedbackCB); -} - -} // namespace anon - typedef FormCB > base_class; FormTexinfo::FormTexinfo(ControlTexinfo & c) - : base_class(c, _("TeX Infos")), - warningPosted(false), activeStyle(ControlTexinfo::cls) + : base_class(c, _("LaTeX Information")), + activeStyle(ControlTexinfo::cls) {} @@ -68,24 +38,31 @@ void FormTexinfo::build() { fl_set_button(dialog_->button_fullPath, 1); updateStyles(ControlTexinfo::cls); - setPreHandler(dialog_->button_rescan); - setPreHandler(dialog_->button_view); - setPreHandler(dialog_->button_texhash); - setPreHandler(dialog_->button_fullPath); - setPreHandler(dialog_->browser); - setPreHandler(dialog_->radio_cls); - setPreHandler(dialog_->radio_sty); - setPreHandler(dialog_->radio_bst); - setPreHandler(dialog_->message); - setPreHandler(dialog_->help); + setPrehandler(dialog_->button_rescan); + setPrehandler(dialog_->button_view); + setPrehandler(dialog_->button_texhash); + setPrehandler(dialog_->button_fullPath); + setPrehandler(dialog_->browser); + setPrehandler(dialog_->radio_cls); + setPrehandler(dialog_->radio_sty); + setPrehandler(dialog_->radio_bst); + setPrehandler(dialog_->message); + + setTooltipHandler(dialog_->button_rescan); + setTooltipHandler(dialog_->button_view); + setTooltipHandler(dialog_->button_texhash); + setTooltipHandler(dialog_->button_fullPath); + setTooltipHandler(dialog_->browser); + setTooltipHandler(dialog_->radio_cls); + setTooltipHandler(dialog_->radio_sty); + setTooltipHandler(dialog_->radio_bst); + setTooltipHandler(dialog_->message); } ButtonPolicy::SMInput FormTexinfo::input(FL_OBJECT * ob, long) { - if (ob == dialog_->help) { - controller().help(); - } else if (ob == dialog_->radio_cls) { + if (ob == dialog_->radio_cls) { updateStyles(ControlTexinfo::cls); } else if (ob == dialog_->radio_sty) { @@ -138,29 +115,42 @@ void FormTexinfo::updateStyles(ControlTexinfo::texFileSuffix whichStyle) } -// preemptive handler for feedback messages -void FormTexinfo::feedbackCB(FL_OBJECT * ob, int event) +void FormTexinfo::clear_feedback() { - lyx::Assert(ob); + fl_set_object_label(dialog_->message, ""); + fl_redraw_object(dialog_->message); +} - switch (event) { - case FL_ENTER: - warningPosted = false; - feedback(ob); - break; - case FL_LEAVE: - if (!warningPosted) { - fl_set_object_label(dialog_->message, ""); - fl_redraw_object(dialog_->message); - } - break; +string const FormTexinfo::getTooltip(FL_OBJECT * ob) +{ + string str; + + if (ob == dialog_->radio_cls) { + str = N_(""); + + } else if (ob == dialog_->radio_sty) { + str = _(""); + + } else if (ob == dialog_->radio_bst) { + str = _(""); + + } else if (ob == dialog_->button_rescan) { + str = _("Rescan File List"); + + } else if (ob == dialog_->button_fullPath) { + str = _("Show Full Path or not"); + + } else if (ob == dialog_->button_texhash) { + str = _(""); + + } else if (ob == dialog_->button_view) { + str = N_("View Content of the File"); - default: - break; } -} + return str; +} void FormTexinfo::feedback(FL_OBJECT * ob) { @@ -168,20 +158,32 @@ void FormTexinfo::feedback(FL_OBJECT * ob) string str; - if (ob == dialog_->button_rescan) { - str = _("starts rescan ..."); + if (ob == dialog_->radio_cls) { + str = N_("Shows the installed LaTeX Document classes. Remember, that these classes are only available in LyX if a corresponding LyX layout file exists!"); + + } else if (ob == dialog_->radio_sty) { + str = _("Shows the installed LaTeX style files, which are available in LyX by default, like \"babel\" or through \\usepackage{} in LaTeX preamble."); + + } else if (ob == dialog_->radio_bst) { + str = _("Shows the installed style files for BibTeX. They can be loaded through insert->Lists&Toc->BibTeX Reference->Style."); + + } else if (ob == dialog_->button_rescan) { + str = _("Runs the script \"TexFiles.sh\" to build new file lists."); } else if (ob == dialog_->button_fullPath) { - str = _("View full path or only file name"); + str = _("View full path or only file name. Full path is needed to view the contents of a file."); } else if (ob == dialog_->button_texhash) { - str = _("starts texhash and rescan..."); + str = _("Runs the script \"texhash\" which builds the a new LaTeX tree. Needed if you install a new TeX class or style. To execute it, you need the write permissions for the tex-dirs, often /var/lib/texmf and other."); } else if (ob == dialog_->button_view) { - str = _("views a selected file"); + str = N_("Shows the contents of the marked file. Only possible in full path mode."); } - + + str = formatted(_(str), dialog_->message->w-10, FL_SMALL_SIZE); + fl_set_object_label(dialog_->message, str.c_str()); + fl_set_object_lsize(dialog_->message, FL_SMALL_SIZE); fl_redraw_object(dialog_->message); } diff --git a/src/frontends/xforms/FormTexinfo.h b/src/frontends/xforms/FormTexinfo.h index 0dc8090694..b514a3ea61 100644 --- a/src/frontends/xforms/FormTexinfo.h +++ b/src/frontends/xforms/FormTexinfo.h @@ -24,9 +24,6 @@ public: /// FormTexinfo(ControlTexinfo &); - /// preemptive handler for feedback messages - void feedbackCB(FL_OBJECT *, int); - private: /// not needed virtual void apply() {} @@ -37,14 +34,16 @@ private: /// Filter the inputs on callback from xforms virtual ButtonPolicy::SMInput input(FL_OBJECT *, long); /// + string const getTooltip(FL_OBJECT *); + /// void feedback(FL_OBJECT *); /// + void clear_feedback(); + /// void updateStyles(ControlTexinfo::texFileSuffix); /// Fdesign generated method FD_form_texinfo * build_texinfo(); /// - bool warningPosted; - /// ControlTexinfo::texFileSuffix activeStyle; }; diff --git a/src/frontends/xforms/form_bibtex.C b/src/frontends/xforms/form_bibtex.C index 2cb9d195b4..0fc718c6d7 100644 --- a/src/frontends/xforms/form_bibtex.C +++ b/src/frontends/xforms/form_bibtex.C @@ -22,9 +22,9 @@ FD_form_bibtex * FormBibtex::build_bibtex() FL_OBJECT *obj; FD_form_bibtex *fdui = new FD_form_bibtex; - fdui->form = fl_bgn_form(FL_NO_BOX, 450, 170); + fdui->form = fl_bgn_form(FL_NO_BOX, 450, 215); fdui->form->u_vdata = this; - obj = fl_add_box(FL_UP_BOX, 0, 0, 450, 170, ""); + obj = fl_add_box(FL_UP_BOX, 0, 0, 450, 215, ""); { char const * const dummy = N_("Database:|#D"); fdui->database = obj = fl_add_input(FL_NORMAL_INPUT, 90, 10, 245, 30, idex(_(dummy))); @@ -32,19 +32,19 @@ FD_form_bibtex * FormBibtex::build_bibtex() } fl_set_object_lsize(obj, FL_NORMAL_SIZE); fl_set_object_callback(obj, C_FormBaseInputCB, 0); - fdui->button_ok = obj = fl_add_button(FL_RETURN_BUTTON, 250, 130, 90, 30, _("OK")); + fdui->button_ok = obj = fl_add_button(FL_RETURN_BUTTON, 250, 120, 90, 30, _("OK")); fl_set_object_lsize(obj, FL_NORMAL_SIZE); fl_set_object_callback(obj, C_FormBaseOKCB, 3); { char const * const dummy = N_("Cancel|^["); - fdui->button_cancel = obj = fl_add_button(FL_NORMAL_BUTTON, 350, 130, 90, 30, idex(_(dummy))); + fdui->button_cancel = obj = fl_add_button(FL_NORMAL_BUTTON, 350, 120, 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_FormBaseCancelCB, 2); { char const * const dummy = N_("Style:|#S"); - fdui->style = obj = fl_add_input(FL_NORMAL_INPUT, 90, 50, 245, 30, idex(_(dummy))); + fdui->style = obj = fl_add_input(FL_NORMAL_INPUT, 90, 45, 245, 30, idex(_(dummy))); fl_set_button_shortcut(obj, scex(_(dummy)), 1); } fl_set_object_lsize(obj, FL_NORMAL_SIZE); @@ -57,16 +57,19 @@ FD_form_bibtex * FormBibtex::build_bibtex() fl_set_object_callback(obj, C_FormBaseInputCB, 0); { char const * const dummy = N_("Browse...|#r"); - fdui->style_browse = obj = fl_add_button(FL_NORMAL_BUTTON, 340, 50, 100, 30, idex(_(dummy))); + fdui->style_browse = obj = fl_add_button(FL_NORMAL_BUTTON, 340, 45, 100, 30, idex(_(dummy))); fl_set_button_shortcut(obj, scex(_(dummy)), 1); } fl_set_object_callback(obj, C_FormBaseInputCB, 0); { char const * const dummy = N_("Add bibliography to TOC|#A"); - fdui->radio_bibtotoc = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 90, 90, 30, 30, idex(_(dummy))); + fdui->radio_bibtotoc = obj = fl_add_checkbutton(FL_PUSH_BUTTON, 90, 80, 30, 30, idex(_(dummy))); fl_set_button_shortcut(obj, scex(_(dummy)), 1); } fl_set_object_callback(obj, C_FormBaseInputCB, 0); + fdui->text_info = obj = fl_add_text(FL_NORMAL_TEXT, 10, 166, 431, 42, ""); + fl_set_object_lalign(obj, FL_ALIGN_LEFT|FL_ALIGN_INSIDE); + obj = fl_add_frame(FL_ENGRAVED_FRAME, 10, 159, 429, 1, ""); fl_end_form(); fdui->form->fdui = fdui; diff --git a/src/frontends/xforms/form_bibtex.h b/src/frontends/xforms/form_bibtex.h index 4ec2b78783..faff54787f 100644 --- a/src/frontends/xforms/form_bibtex.h +++ b/src/frontends/xforms/form_bibtex.h @@ -22,6 +22,7 @@ struct FD_form_bibtex { FL_OBJECT *database_browse; FL_OBJECT *style_browse; FL_OBJECT *radio_bibtotoc; + FL_OBJECT *text_info; }; #endif /* FD_form_bibtex_h_ */ diff --git a/src/frontends/xforms/form_citation.C b/src/frontends/xforms/form_citation.C index 166afb2060..21c18d0a9d 100644 --- a/src/frontends/xforms/form_citation.C +++ b/src/frontends/xforms/form_citation.C @@ -22,9 +22,9 @@ FD_form_citation * FormCitation::build_citation() FL_OBJECT *obj; FD_form_citation *fdui = new FD_form_citation; - fdui->form = fl_bgn_form(FL_NO_BOX, 680, 440); + fdui->form = fl_bgn_form(FL_NO_BOX, 680, 480); fdui->form->u_vdata = this; - fdui->box = obj = fl_add_box(FL_UP_BOX, 0, 0, 680, 440, ""); + fdui->box = obj = fl_add_box(FL_UP_BOX, 0, 0, 680, 480, ""); fl_set_object_lsize(obj, FL_NORMAL_SIZE); { char const * const dummy = N_("Inset keys|#I"); @@ -164,19 +164,19 @@ FD_form_citation * FormCitation::build_citation() 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, 10, 400, 100, 30, idex(_(dummy))); + fdui->button_restore = obj = fl_add_button(FL_NORMAL_BUTTON, 10, 395, 100, 30, idex(_(dummy))); fl_set_button_shortcut(obj, scex(_(dummy)), 1); } fl_set_object_lsize(obj, FL_NORMAL_SIZE); 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, 360, 400, 90, 30, _("OK")); + fdui->button_ok = obj = fl_add_button(FL_RETURN_BUTTON, 360, 395, 90, 30, _("OK")); fl_set_object_lsize(obj, FL_NORMAL_SIZE); fl_set_object_gravity(obj, FL_SouthEast, FL_SouthEast); fl_set_object_callback(obj, C_FormBaseOKCB, 0); { char const * const dummy = N_("Apply|#A"); - fdui->button_apply = obj = fl_add_button(FL_NORMAL_BUTTON, 470, 400, 90, 30, idex(_(dummy))); + fdui->button_apply = obj = fl_add_button(FL_NORMAL_BUTTON, 470, 395, 90, 30, idex(_(dummy))); fl_set_button_shortcut(obj, scex(_(dummy)), 1); } fl_set_object_lsize(obj, FL_NORMAL_SIZE); @@ -184,12 +184,15 @@ FD_form_citation * FormCitation::build_citation() fl_set_object_callback(obj, C_FormBaseApplyCB, 0); { char const * const dummy = N_("Cancel|^["); - fdui->button_cancel = obj = fl_add_button(FL_NORMAL_BUTTON, 580, 400, 90, 30, idex(_(dummy))); + fdui->button_cancel = obj = fl_add_button(FL_NORMAL_BUTTON, 580, 395, 90, 30, idex(_(dummy))); fl_set_button_shortcut(obj, scex(_(dummy)), 1); } fl_set_object_lsize(obj, FL_NORMAL_SIZE); fl_set_object_gravity(obj, FL_SouthEast, FL_SouthEast); fl_set_object_callback(obj, C_FormBaseCancelCB, 0); + fdui->text_info = obj = fl_add_text(FL_NORMAL_TEXT, 10, 440, 660, 30, ""); + fl_set_object_lalign(obj, FL_ALIGN_LEFT|FL_ALIGN_INSIDE); + obj = fl_add_frame(FL_ENGRAVED_FRAME, 10, 430, 660, 1, ""); fl_end_form(); fdui->form->fdui = fdui; diff --git a/src/frontends/xforms/form_citation.h b/src/frontends/xforms/form_citation.h index 828287e8d6..fc1b066d2f 100644 --- a/src/frontends/xforms/form_citation.h +++ b/src/frontends/xforms/form_citation.h @@ -41,6 +41,7 @@ struct FD_form_citation { FL_OBJECT *button_ok; FL_OBJECT *button_apply; FL_OBJECT *button_cancel; + FL_OBJECT *text_info; }; #endif /* FD_form_citation_h_ */ diff --git a/src/frontends/xforms/form_texinfo.C b/src/frontends/xforms/form_texinfo.C index a52c6d14a0..49ba2371fc 100644 --- a/src/frontends/xforms/form_texinfo.C +++ b/src/frontends/xforms/form_texinfo.C @@ -26,7 +26,7 @@ FD_form_texinfo * FormTexinfo::build_texinfo() fdui->form->u_vdata = this; obj = fl_add_box(FL_UP_BOX, 0, 0, 513, 394, ""); fl_set_object_lstyle(obj, FL_FIXED_STYLE); - fdui->browser = obj = fl_add_browser(FL_HOLD_BROWSER, 15, 12, 324, 290, ""); + fdui->browser = obj = fl_add_browser(FL_HOLD_BROWSER, 15, 12, 324, 241, ""); fl_set_object_lalign(obj, FL_ALIGN_TOP); fl_set_object_lstyle(obj, FL_FIXED_STYLE); fl_set_object_gravity(obj, FL_NorthWest, FL_SouthEast); @@ -92,18 +92,12 @@ FD_form_texinfo * FormTexinfo::build_texinfo() fl_set_object_lalign(obj, FL_ALIGN_RIGHT); fl_set_object_gravity(obj, FL_NorthEast, FL_NorthEast); fl_set_object_callback(obj, C_FormBaseInputCB, 2); - fdui->message = obj = fl_add_text(FL_NORMAL_TEXT, 15, 313, 481, 31, ""); - fl_set_object_lsize(obj, FL_NORMAL_SIZE); + fdui->message = obj = fl_add_text(FL_NORMAL_TEXT, 14, 323, 482, 56, ""); fl_set_object_lalign(obj, FL_ALIGN_LEFT|FL_ALIGN_INSIDE); fl_set_object_gravity(obj, FL_SouthWest, FL_SouthEast); - fdui->help = obj = fl_add_button(FL_NORMAL_BUTTON, 10, 353, 90, 30, _("Help")); - fl_set_button_shortcut(obj, _("H"), 1); - fl_set_object_lsize(obj, FL_NORMAL_SIZE); - fl_set_object_gravity(obj, FL_SouthWest, FL_SouthWest); - fl_set_object_callback(obj, C_FormBaseInputCB, 0); { char const * const dummy = N_("Run Texhash|#T"); - fdui->button_texhash = obj = fl_add_button(FL_NORMAL_BUTTON, 188, 353, 135, 30, idex(_(dummy))); + fdui->button_texhash = obj = fl_add_button(FL_NORMAL_BUTTON, 15, 271, 135, 30, idex(_(dummy))); fl_set_button_shortcut(obj, scex(_(dummy)), 1); } fl_set_object_lsize(obj, FL_NORMAL_SIZE); @@ -111,12 +105,13 @@ FD_form_texinfo * FormTexinfo::build_texinfo() fl_set_object_callback(obj, C_FormBaseInputCB, 0); { char const * const dummy = N_("Close|^[^M"); - fdui->button_close = obj = fl_add_button(FL_NORMAL_BUTTON, 410, 353, 90, 30, idex(_(dummy))); + fdui->button_close = obj = fl_add_button(FL_NORMAL_BUTTON, 408, 272, 90, 30, idex(_(dummy))); fl_set_button_shortcut(obj, scex(_(dummy)), 1); } fl_set_object_lsize(obj, FL_NORMAL_SIZE); fl_set_object_gravity(obj, FL_SouthEast, FL_SouthEast); fl_set_object_callback(obj, C_FormBaseCancelCB, 0); + obj = fl_add_frame(FL_ENGRAVED_FRAME, 13, 312, 485, 1, ""); fl_end_form(); fdui->form->fdui = fdui; diff --git a/src/frontends/xforms/form_texinfo.h b/src/frontends/xforms/form_texinfo.h index 4ac6b99e55..2147aa09f0 100644 --- a/src/frontends/xforms/form_texinfo.h +++ b/src/frontends/xforms/form_texinfo.h @@ -22,7 +22,6 @@ struct FD_form_texinfo { FL_OBJECT *button_view; FL_OBJECT *button_fullPath; FL_OBJECT *message; - FL_OBJECT *help; FL_OBJECT *button_texhash; FL_OBJECT *button_close; }; diff --git a/src/frontends/xforms/forms/form_bibtex.fd b/src/frontends/xforms/forms/form_bibtex.fd index b72161b90d..39c87242a4 100644 --- a/src/frontends/xforms/forms/form_bibtex.fd +++ b/src/frontends/xforms/forms/form_bibtex.fd @@ -10,13 +10,13 @@ SnapGrid: 1 =============== FORM =============== Name: form_bibtex Width: 450 -Height: 170 -Number of Objects: 8 +Height: 215 +Number of Objects: 10 -------------------- class: FL_BOX type: UP_BOX -box: 0 0 450 170 +box: 0 0 450 215 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER @@ -52,7 +52,7 @@ argument: 0 -------------------- class: FL_BUTTON type: RETURN_BUTTON -box: 250 130 90 30 +box: 250 120 90 30 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER @@ -70,7 +70,7 @@ argument: 3 -------------------- class: FL_BUTTON type: NORMAL_BUTTON -box: 350 130 90 30 +box: 350 120 90 30 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER @@ -88,7 +88,7 @@ argument: 2 -------------------- class: FL_INPUT type: NORMAL_INPUT -box: 90 50 245 30 +box: 90 45 245 30 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_LEFT @@ -124,7 +124,7 @@ argument: 0 -------------------- class: FL_BUTTON type: NORMAL_BUTTON -box: 340 50 100 30 +box: 340 45 100 30 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER @@ -142,7 +142,7 @@ argument: 0 -------------------- class: FL_CHECKBUTTON type: PUSH_BUTTON -box: 90 90 30 30 +box: 90 80 30 30 boxtype: FL_NO_BOX colors: FL_COL1 FL_YELLOW alignment: FL_ALIGN_CENTER @@ -157,5 +157,41 @@ name: radio_bibtotoc callback: C_FormBaseInputCB argument: 0 +-------------------- +class: FL_TEXT +type: NORMAL_TEXT +box: 10 166 431 42 +boxtype: FL_FLAT_BOX +colors: FL_COL1 FL_MCOL +alignment: FL_ALIGN_LEFT|FL_ALIGN_INSIDE +style: FL_NORMAL_STYLE +size: FL_DEFAULT_SIZE +lcol: FL_BLACK +label: +shortcut: +resize: FL_RESIZE_ALL +gravity: FL_NoGravity FL_NoGravity +name: text_info +callback: +argument: + +-------------------- +class: FL_FRAME +type: ENGRAVED_FRAME +box: 10 159 429 1 +boxtype: FL_NO_BOX +colors: FL_BLACK FL_COL1 +alignment: FL_ALIGN_CENTER +style: FL_NORMAL_STYLE +size: FL_DEFAULT_SIZE +lcol: FL_BLACK +label: +shortcut: +resize: FL_RESIZE_ALL +gravity: FL_NoGravity FL_NoGravity +name: +callback: +argument: + ============================== create_the_forms diff --git a/src/frontends/xforms/forms/form_citation.fd b/src/frontends/xforms/forms/form_citation.fd index e20d90d38b..d0a287ae3e 100644 --- a/src/frontends/xforms/forms/form_citation.fd +++ b/src/frontends/xforms/forms/form_citation.fd @@ -9,13 +9,13 @@ Unit of measure: FL_COORD_PIXEL =============== FORM =============== Name: form_citation Width: 680 -Height: 440 -Number of Objects: 25 +Height: 480 +Number of Objects: 27 -------------------- class: FL_BOX type: UP_BOX -box: 0 0 680 440 +box: 0 0 680 480 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER @@ -393,7 +393,7 @@ argument: 0 -------------------- class: FL_BUTTON type: NORMAL_BUTTON -box: 10 400 100 30 +box: 10 395 100 30 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER @@ -411,7 +411,7 @@ argument: 0 -------------------- class: FL_BUTTON type: RETURN_BUTTON -box: 360 400 90 30 +box: 360 395 90 30 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER @@ -429,7 +429,7 @@ argument: 0 -------------------- class: FL_BUTTON type: NORMAL_BUTTON -box: 470 400 90 30 +box: 470 395 90 30 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER @@ -447,7 +447,7 @@ argument: 0 -------------------- class: FL_BUTTON type: NORMAL_BUTTON -box: 580 400 90 30 +box: 580 395 90 30 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER @@ -462,5 +462,41 @@ name: button_cancel callback: C_FormBaseCancelCB argument: 0 +-------------------- +class: FL_TEXT +type: NORMAL_TEXT +box: 10 440 660 30 +boxtype: FL_FLAT_BOX +colors: FL_COL1 FL_MCOL +alignment: FL_ALIGN_LEFT|FL_ALIGN_INSIDE +style: FL_NORMAL_STYLE +size: FL_DEFAULT_SIZE +lcol: FL_BLACK +label: +shortcut: +resize: FL_RESIZE_ALL +gravity: FL_NoGravity FL_NoGravity +name: text_info +callback: +argument: + +-------------------- +class: FL_FRAME +type: ENGRAVED_FRAME +box: 10 430 660 1 +boxtype: FL_NO_BOX +colors: FL_BLACK FL_COL1 +alignment: FL_ALIGN_CENTER +style: FL_NORMAL_STYLE +size: FL_DEFAULT_SIZE +lcol: FL_BLACK +label: +shortcut: +resize: FL_RESIZE_ALL +gravity: FL_NoGravity FL_NoGravity +name: +callback: +argument: + ============================== create_the_forms diff --git a/src/frontends/xforms/forms/form_texinfo.fd b/src/frontends/xforms/forms/form_texinfo.fd index 8fa94d9041..e9007b9744 100644 --- a/src/frontends/xforms/forms/form_texinfo.fd +++ b/src/frontends/xforms/forms/form_texinfo.fd @@ -34,7 +34,7 @@ argument: -------------------- class: FL_BROWSER type: HOLD_BROWSER -box: 15 12 324 290 +box: 15 12 324 241 boxtype: FL_DOWN_BOX colors: FL_COL1 FL_YELLOW alignment: FL_ALIGN_TOP @@ -197,12 +197,12 @@ argument: 2 -------------------- class: FL_TEXT type: NORMAL_TEXT -box: 15 313 481 31 +box: 14 323 482 56 boxtype: FL_FLAT_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_LEFT|FL_ALIGN_INSIDE style: FL_NORMAL_STYLE -size: FL_NORMAL_SIZE +size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: @@ -215,25 +215,7 @@ argument: -------------------- class: FL_BUTTON type: NORMAL_BUTTON -box: 10 353 90 30 -boxtype: FL_UP_BOX -colors: FL_COL1 FL_COL1 -alignment: FL_ALIGN_CENTER -style: FL_NORMAL_STYLE -size: FL_NORMAL_SIZE -lcol: FL_BLACK -label: Help -shortcut: H -resize: FL_RESIZE_ALL -gravity: FL_SouthWest FL_SouthWest -name: help -callback: C_FormBaseInputCB -argument: 0 - --------------------- -class: FL_BUTTON -type: NORMAL_BUTTON -box: 188 353 135 30 +box: 15 271 135 30 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER @@ -251,7 +233,7 @@ argument: 0 -------------------- class: FL_BUTTON type: NORMAL_BUTTON -box: 410 353 90 30 +box: 408 272 90 30 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER @@ -266,5 +248,23 @@ name: button_close callback: C_FormBaseCancelCB argument: 0 +-------------------- +class: FL_FRAME +type: ENGRAVED_FRAME +box: 13 312 485 1 +boxtype: FL_NO_BOX +colors: FL_BLACK FL_COL1 +alignment: FL_ALIGN_CENTER +style: FL_NORMAL_STYLE +size: FL_DEFAULT_SIZE +lcol: FL_BLACK +label: +shortcut: +resize: FL_RESIZE_ALL +gravity: FL_NoGravity FL_NoGravity +name: +callback: +argument: + ============================== create_the_form -- 2.39.5