+2002-10-03 Angus Leeming <leeming@lyx.org>
+
+ * FeedbackController.C (PrehandlerCB): re-compute the folder->x,
+ folder->y coords of a tabfolder when the mouse enters the folder.
+ This works around an xforms bug that manifests itslf as tooltips
+ appearing in their original position after the dialog has been
+ moved aside.
+
+ * FormAboutlyx.C (build):
+ * FormDocument.C (build):
+ * FormGraphics.C (build):
+ * FormPreferences.C (build):
+ * FormTabular.C (build): set the prehandler for tabfolders.
+
+ * form_graphics.fd: move the edge of the tabfolder in by 5 pixels
+ to ensure that the tabfolder prehandler is called.
+
2002-10-03 Angus Leeming <leeming@lyx.org>
* lyx_gui.C (start): ev.xany.type is of type 'int' so print it as a
void FeedbackController::PrehandlerCB(FL_OBJECT * ob, int event, int key)
{
- if (event == FL_PUSH && key == 2 && ob->objclass == FL_INPUT) {
+ lyx::Assert(ob);
+
+ if (ob->objclass == FL_INPUT && event == FL_PUSH && key == 2) {
// Trigger an input event when pasting in an xforms input object
// using the middle mouse button.
InputCB(ob, 0);
+
+ // This is very odd:
+ // event == FL_LEAVE when the mouse enters the folder and
+ // event == FL_ENTER are it leaves!
+ } else if (ob->objclass == FL_TABFOLDER && event == FL_LEAVE) {
+ // This prehandler is used to work-around an xforms bug.
+ // It updates the form->x, form->y coords of the active
+ // tabfolder when the mouse enters.
+ FL_FORM * const form = fl_get_active_folder(ob);
+ Window win = fl_prepare_form_window(form, 0, 0, "Folder");
+ if (win) {
+ FL_Coord w, h;
+ fl_get_wingeometry(win, &(form->x), &(form->y), &w, &h);
+ }
} else if (message_widget_ &&
(event == FL_ENTER || event == FL_LEAVE)) {
fl_addto_tabfolder(dialog_->tabfolder,_("Credits"),
credits_->form);
+ // work-around xforms bug re update of folder->x, folder->y coords.
+ setPrehandler(dialog_->tabfolder);
+
// Manage the cancel/close button
bc().setCancel(dialog_->button_close);
}
options_->form);
fbullet = fl_addto_tabfolder(dialog_->tabfolder,_("Bullets"),
bullets_->form);
+
+ // work-around xforms bug re update of folder->x, folder->y coords.
+ setPrehandler(dialog_->tabfolder);
+
if ((XpmVersion < 4) || (XpmVersion == 4 && XpmRevision < 7)) {
lyxerr << _("Your version of libXpm is older than 4.7.\n"
"The `bullet' tab of the document dialog "
fl_addto_tabfolder(dialog_->tabfolder, _("Bounding Box"), bbox_->form);
fl_addto_tabfolder(dialog_->tabfolder, _("Extra"), extra_->form);
+ // work-around xforms bug re update of folder->x, folder->y coords.
+ setPrehandler(dialog_->tabfolder);
+
// set the right default unit
switch (lyxrc.default_papersize) {
case BufferParams::PAPER_DEFAULT: break;
fl_addto_tabfolder(lang_opts_tab_->tabfolder_inner,
_("Language"),
language_.dialog()->form);
+
+ // work-around xforms bug re update of folder->x, folder->y coords.
+ setPrehandler(look_n_feel_tab_->tabfolder_inner);
+ setPrehandler(converters_tab_->tabfolder_inner);
+ setPrehandler(inputs_tab_->tabfolder_inner);
+ setPrehandler(outputs_tab_->tabfolder_inner);
+ setPrehandler(lang_opts_tab_->tabfolder_inner);
}
fl_addto_tabfolder(dialog_->tabfolder, _("LongTable"),
longtable_options_->form);
+ // work-around xforms bug re update of folder->x, folder->y coords.
+ setPrehandler(dialog_->tabfolder);
+
// Create the contents of the unit choices
// Don't include the "%" terms...
vector<string> units_vec = getLatexUnits();
--------------------
class: FL_TABFOLDER
type: TOP_TABFOLDER
-box: 0 5 400 260
+box: 0 10 400 255
boxtype: FL_FRAME_BOX
colors: FL_COL1 FL_COL1
alignment: FL_ALIGN_TOP_LEFT