2002-03-09 Angus Leeming <a.leeming@ic.ac.uk>
+ * FeedbackController.C: improve a comment.
+
+ * FormFiledialog.C: whitespace change.
+
+ * FormBibitem.C (build):
+ * FormBibtex.C (build):
+ * FormCitation.C (build):
+ * FormDocument.C (build):
+ * FormExternal.C (build):
+ * FormGraphics.C (build):
+ * FormInclude.C (build):
+ * FormIndex.C (build):
+ * FormMathsMatrix.C (build):
+ * FormMinipage.C (build):
+ * FormParagraph.C (build):
+ * FormPrint.C (build):
+ * FormRef.C (build):
+ * FormSendto.C (build):
+ * FormSpellchecker.C (build):
+ * FormTabular.C (build):
+ * FormThesaurus.C (build):
+ * FormUrl.C (build): invoke setPrehandler for all FL_INPUT objects.
+ Means that pasting with the middle mouse button will activate the
+ Ok, Apply buttons.
+
* FeedbackController.C (MessageCB): fix crash by removing
Assert(message_widget_) and returning silently in this case.
Can happen quite justifiably.
/* A common interface for posting feedback messages to a message widget in
* xforms.
* Derive FormBase and FormBaseDeprecated from it, so daughter classes of
- * either can interface tooltips in the same way.
+ * either can use the same interface.
*/
#include <config.h>
fl_set_input_return(dialog_->key, FL_RETURN_CHANGED);
fl_set_input_return(dialog_->label, FL_RETURN_CHANGED);
+ setPrehandler(dialog_->key);
+ setPrehandler(dialog_->label);
+
// Manage the ok, apply, restore and cancel/close buttons
bc().setOK(dialog_->button_ok);
bc().setCancel(dialog_->button_cancel);
fl_set_input_return(dialog_->database, FL_RETURN_CHANGED);
fl_set_input_return(dialog_->style, FL_RETURN_CHANGED);
+ setPrehandler(dialog_->database);
+ setPrehandler(dialog_->style);
+
// Manage the ok, apply, restore and cancel/close buttons
bc().setOK(dialog_->button_ok);
bc().setCancel(dialog_->button_cancel);
fl_set_button(dialog_->button_search_case, 0);
fl_set_button(dialog_->button_search_type, 0);
+ setPrehandler(dialog_->input_search);
+ setPrehandler(dialog_->input_before);
+ setPrehandler(dialog_->input_after);
+
// Manage the ok, apply, restore and cancel/close buttons
bc().setOK(dialog_->button_ok);
bc().setApply(dialog_->button_apply);
fl_set_input_return(paper_->input_head_sep, FL_RETURN_CHANGED);
fl_set_input_return(paper_->input_foot_skip, FL_RETURN_CHANGED);
+ setPrehandler(paper_->input_custom_width);
+ setPrehandler(paper_->input_custom_height);
+ setPrehandler(paper_->input_top_margin);
+ setPrehandler(paper_->input_bottom_margin);
+ setPrehandler(paper_->input_inner_margin);
+ setPrehandler(paper_->input_outer_margin);
+ setPrehandler(paper_->input_head_height);
+ setPrehandler(paper_->input_head_sep);
+ setPrehandler(paper_->input_foot_skip);
// Create the contents of the unit choices
// Don't include the "%" terms...
fl_set_input_return(class_->input_doc_skip, FL_RETURN_CHANGED);
fl_set_input_return(class_->input_doc_spacing, FL_RETURN_CHANGED);
+ setPrehandler(class_->input_doc_extra);
+ setPrehandler(class_->input_doc_skip);
+ setPrehandler(class_->input_doc_spacing);
+
// Set input filters on doc spacing to make it accept only
// unsigned numbers.
fl_set_input_filter(class_->input_doc_spacing, fl_unsigned_float_filter);
// the document options form
options_.reset(build_doc_options());
fl_set_input_return(options_->input_float_placement, FL_RETURN_CHANGED);
+ setPrehandler(options_->input_float_placement);
+
fl_set_counter_bounds(options_->slider_secnumdepth,-2,5);
fl_set_counter_bounds(options_->slider_tocdepth,-1,5);
fl_set_counter_step(options_->slider_secnumdepth,1,1);
" normal | large | Large | LARGE | huge | Huge"));
fl_set_choice(bullets_->choice_bullet_size, 1);
fl_set_input_return(bullets_->input_bullet_latex, FL_RETURN_CHANGED);
+ setPrehandler(bullets_->input_bullet_latex);
fl_set_input_maxchars(bullets_->input_bullet_latex, 80);
bc().addReadOnly (bullets_->bmtable_bullet_panel);
string const choice =
" " + getStringFromVector(controller().getTemplates(), " | ") + " ";
fl_addto_choice(dialog_->choice_template, choice.c_str());
- fl_set_input_return (dialog_->input_filename, FL_RETURN_CHANGED);
+
+ fl_set_input_return (dialog_->input_filename, FL_RETURN_CHANGED);
+ fl_set_input_return (dialog_->input_parameters, FL_RETURN_CHANGED);
+
+ setPrehandler(dialog_->input_filename);
+ setPrehandler(dialog_->input_parameters);
bc().setOK(dialog_->button_ok);
bc().setApply(dialog_->button_apply);
C_LyXFileDlg_FileDlgCB, 12);
fl_set_object_callback(pFileDlgForm->User2,
C_LyXFileDlg_FileDlgCB, 13);
-
+
// Make sure pressing the close box doesn't crash LyX. (RvdK)
fl_set_form_atclose(pFileDlgForm->form,
C_LyXFileDlg_CancelCB, 0);
fl_set_input_maxchars(file_->input_rotate_angle, ROTATE_MAXCHARS);
fl_set_input_filter(file_->input_rotate_angle, fl_float_filter);
+ setPrehandler(file_->input_filename);
+ setPrehandler(file_->input_subcaption);
+ setPrehandler(file_->input_rotate_angle);
+
string const choice_origin =
"center|" // c
"leftTop|leftBottom|leftBaseline|" // lt lb lB
fl_set_input_return (lyxview_->input_lyxheight, FL_RETURN_CHANGED);
fl_set_input_return (lyxview_->input_lyxscale, FL_RETURN_CHANGED);
+ setPrehandler(lyxview_->input_lyxwidth);
+ setPrehandler(lyxview_->input_lyxheight);
+ setPrehandler(lyxview_->input_lyxscale);
+
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_set_input_return (size_->input_width, FL_RETURN_CHANGED);
fl_set_input_return (size_->input_height, FL_RETURN_CHANGED);
+ setPrehandler(size_->input_scale);
+ setPrehandler(size_->input_width);
+ setPrehandler(size_->input_height);
+
fl_set_input_maxchars(size_->input_scale, SCALE_MAXDIGITS);
fl_set_input_maxchars(size_->input_width, WIDTH_MAXDIGITS);
fl_set_input_maxchars(size_->input_height, HEIGHT_MAXDIGITS);
fl_set_input_filter(bbox_->input_bb_x0, fl_unsigned_float_filter);
fl_set_input_filter(bbox_->input_bb_y0, fl_unsigned_float_filter);
fl_set_input_filter(bbox_->input_bb_x1, fl_unsigned_float_filter);
+ fl_set_input_filter(bbox_->input_bb_y1, fl_unsigned_float_filter);
+
+ setPrehandler(bbox_->input_bb_x0);
+ setPrehandler(bbox_->input_bb_y0);
+ setPrehandler(bbox_->input_bb_x1);
+ setPrehandler(bbox_->input_bb_y1);
string const bb_units = "pt|cm|in";
fl_addto_choice(bbox_->choice_bb_units, bb_units.c_str());
special_.reset(build_special());
fl_set_input_return (special_->input_special, FL_RETURN_CHANGED);
+ setPrehandler(special_->input_special);
// add the different tabfolders
fl_addto_tabfolder(dialog_->tabFolder, _("File"), file_->form);
dialog_.reset(build_include());
fl_set_input_return(dialog_->input_filename, FL_RETURN_CHANGED);
+ setPrehandler(dialog_->input_filename);
// Manage the ok and cancel buttons
bc().setOK(dialog_->button_ok);
dialog_.reset(build_index());
fl_set_input_return(dialog_->input_key, FL_RETURN_CHANGED);
+ setPrehandler(dialog_->input_key);
// Manage the ok, apply, restore and cancel/close buttons
bc().setOK(dialog_->button_ok);
dialog_->input_halign->u_vdata = this;
fl_set_input_filter(dialog_->input_halign,
C_FormMathsMatrixAlignFilter);
+ setPrehandler(dialog_->input_halign);
bc().setOK(dialog_->button_ok);
bc().setApply(dialog_->button_apply);
dialog_.reset(build_minipage());
fl_set_input_return(dialog_->input_width, FL_RETURN_CHANGED);
+ setPrehandler(dialog_->input_width);
string const choice = getStringFromVector(getLatexUnits(), "|");
fl_addto_choice(dialog_->choice_width_units, subst(choice, "%", "%%").c_str());
fl_set_input_return(dialog_->input_linespacing, FL_RETURN_CHANGED);
fl_set_input_filter(dialog_->input_linespacing, fl_unsigned_float_filter);
+ setPrehandler(dialog_->input_space_above);
+ setPrehandler(dialog_->input_space_below);
+ setPrehandler(dialog_->input_labelwidth);
+ setPrehandler(dialog_->input_linespacing);
+
// Create the contents of the unit choices
// Don't include the "%" terms...
#warning A bit dangerous... (Lgb)
fl_set_input_filter(dialog_->input_count,
fl_unsigned_int_filter);
+ setPrehandler(dialog_->input_printer);
+ setPrehandler(dialog_->input_file);
+ setPrehandler(dialog_->input_from_page);
+ setPrehandler(dialog_->input_to_page);
+ setPrehandler(dialog_->input_count);
+
// what limits (if any) make sense for these?
fl_set_input_maxchars(dialog_->input_printer, 255);
fl_set_input_maxchars(dialog_->input_file, 255);
// Force the user to use the browser to change refs.
fl_deactivate_object(dialog_->input_ref);
- // Manage the ok and cancel/close buttons
+ fl_set_input_return(dialog_->input_name, FL_RETURN_CHANGED);
+ fl_set_input_return(dialog_->input_ref, FL_RETURN_CHANGED);
+
+ setPrehandler(dialog_->input_name);
+ setPrehandler(dialog_->input_ref);
+
+ // Manage the ok and cancel/close buttons
bc().setOK(dialog_->button_ok);
bc().setApply(dialog_->button_apply);
bc().setCancel(dialog_->button_cancel);
dialog_.reset(build_sendto());
fl_set_input_return(dialog_->input_command, FL_RETURN_CHANGED);
+ setPrehandler(dialog_->input_command);
// Manage the ok, apply, restore and cancel/close buttons
bc().setOK(dialog_->button_ok);
fl_set_browser_dblclick_callback(dialog_->browser,
C_FormBaseInputCB, 2);
+ fl_set_input_return(dialog_->input, FL_RETURN_CHANGED);
+ setPrehandler(dialog_->input);
+
// Manage the buttons
bc().setCancel(dialog_->done);
bc().addReadOnly(dialog_->replace);
void FormTabular::build()
{
dialog_.reset(build_tabular());
+
+ setPrehandler(dialog_->input_tabular_column);
+ setPrehandler(dialog_->input_tabular_row);
+
tabular_options_.reset(build_tabular_options());
column_options_.reset(build_column_options());
cell_options_.reset(build_cell_options());
FL_RETURN_END);
fl_set_input_return(column_options_->input_special_alignment,
FL_RETURN_END);
+
+ setPrehandler(column_options_->input_column_width);
+ setPrehandler(column_options_->input_special_alignment);
+
fl_set_input_return(cell_options_->input_mcolumn_width,
FL_RETURN_END);
fl_set_input_return(cell_options_->input_special_multialign,
FL_RETURN_END);
+ setPrehandler(cell_options_->input_mcolumn_width);
+ setPrehandler(cell_options_->input_special_multialign);
+
fl_addto_tabfolder(dialog_->tabFolder, _("Tabular"),
tabular_options_->form);
fl_addto_tabfolder(dialog_->tabFolder, _("Column/Row"),
void FormThesaurus::build()
{
dialog_.reset(build_thesaurus());
+
+ fl_set_input_return(dialog_->input_entry, FL_RETURN_CHANGED);
+ fl_set_input_return(dialog_->input_replace, FL_RETURN_CHANGED);
+
+ setPrehandler(dialog_->input_entry);
+ setPrehandler(dialog_->input_replace);
// Manage the ok, apply and cancel/close buttons
bc().setCancel(dialog_->button_close);
fl_set_input_return(dialog_->name, FL_RETURN_CHANGED);
fl_set_input_return(dialog_->url, FL_RETURN_CHANGED);
+ setPrehandler(dialog_->name);
+ setPrehandler(dialog_->url);
+
// Manage the ok, apply, restore and cancel/close buttons
bc().setOK(dialog_->button_ok);
bc().setApply(dialog_->button_apply);