J�rgen's first go at tooltips etc...

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3491 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Angus Leeming 2002-02-05 20:36:12 +00:00
parent aeba607310
commit 25e82b0745
19 changed files with 428 additions and 145 deletions

View File

@ -1,3 +1,7 @@
2002-02-05 Juergen Spitzmueller <j.spitzmueller@gmx.de>
* ControlTexInfo.[Ch]: Removed Help functions.
2002-02-01 John Levon <moz@compsoc.man.ac.uk>
* ControlSpellchecker.C: clear any selection left

View File

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

View File

@ -33,8 +33,6 @@ public:
///
void viewFile(string const filename) const;
///
void help() const;
///
void rescanStyles() const;
///
void runTexhash() const;

View File

@ -11,6 +11,14 @@
* FormGraphic.C: cosmetic changes to the layout. Delete
the help button
2002-02-05 Juergen Spitzmueller <j.spitzmueller@gmx.de>
* 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 <a.leeming@ic.ac.uk>
* FormBase.[Ch]: You want tooltips too? You got 'em. Verified as

View File

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

View File

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

View File

@ -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 \"<First Author> 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 <Ref>\"");
} 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);
}

View File

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

View File

@ -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<FormTexinfo*>(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<ControlTexinfo, FormDB<FD_form_texinfo> > 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,50 +115,75 @@ 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);
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;
default:
break;
}
fl_set_object_label(dialog_->message, "");
fl_redraw_object(dialog_->message);
}
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");
}
return str;
}
void FormTexinfo::feedback(FL_OBJECT * ob)
{
lyx::Assert(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{<the stylefile>} 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);
}

View File

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

View File

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

View File

@ -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_ */

View File

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

View File

@ -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_ */

View File

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

View File

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

View File

@ -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

View File

@ -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

View File

@ -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