+2000-10-05 Angus Leeming <a.leeming@ic.ac.uk>
+
+ * src/BufferView_pimpl.C (buffer): only need one the
+ updateBufferDependent signal to be emitted once! Moved to the end of
+ the method to allow bv_->text to be updated first.
+
+ * src/frontends/xforms/FormBase.[Ch]: replaced the two signals uSignal_
+ and hSignal_ with Dialogs * and BufferDependency variables.
+ New Buffer * parent_, initialised when the dialog is launched. Used to
+ check whether to update() or hide() dialog in the new, private
+ updateOrHide() method that is connected to the updateBufferDependent
+ signal. Daughter classes dictate what to do using the
+ ChangedBufferAction enum, passed to the c-tor.
+
+ * src/frontends/xforms/FormCitation.C:
+ * src/frontends/xforms/FormCommand.C:
+ * src/frontends/xforms/FormCopyright.C:
+ * src/frontends/xforms/FormDocument.C:
+ * src/frontends/xforms/FormError.C:
+ * src/frontends/xforms/FormIndex.C:
+ * src/frontends/xforms/FormPreferences.C:
+ * src/frontends/xforms/FormPrint.C:
+ * src/frontends/xforms/FormRef.C:
+ * src/frontends/xforms/FormToc.C:
+ * src/frontends/xforms/FormUrl.C (c-tor): modified call to FormBase
+ c-tor.
+
+ * src/frontends/xforms/FormCommand.[Ch] (c-tor) passed a
+ ChangedBufferAction enum.
+
+ * src/frontends/xforms/FormParagraph.[Ch]
+ * src/frontends/xforms/forms/form_paragraph.fd: now derived from
+ FormBase.
+
+ * src/frontends/xforms/FormToc.h (updateOrHide): override default
+ behaviour. Calls update() only.
+
2000-10-06 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
* lib/bind/cua.bind: fix a bit.
delete screen_;
screen_ = 0;
- // Similarly, buffer-dependent dialogs should be updated.
- owner_->getDialogs()->updateBufferDependent();
-
// If we are closing the buffer, use the first buffer as current
if (!buffer_) {
buffer_ = bufferlist.first();
owner_->updateMenubar();
owner_->updateToolbar();
redraw();
- owner_->getDialogs()->updateBufferDependent();
bv_->insetWakeup();
} else {
lyxerr[Debug::INFO] << " No Buffer!" << endl;
owner_->updateLayoutChoice();
owner_->getMiniBuffer()->Init();
owner_->updateWindowTitle();
+ // Similarly, buffer-dependent dialogs should be updated or hidden.
+ // This should go here because some dialogs (ToC) require bv_->text.
+ owner_->getDialogs()->updateBufferDependent();
}
#include "Dialogs.h"
#include "FormBase.h"
+#include "LyXView.h"
#include "xform_macros.h"
C_RETURNCB (FormBase, WMHideCB)
C_GENERICCB(FormBase, RestoreCB)
-FormBase::FormBase(LyXView * lv, Dialogs * d, BufferDependency bd, string const & t,
+FormBase::FormBase(LyXView * lv, Dialogs * d, string const & t,
+ BufferDependency bd, ChangedBufferAction cba,
ButtonPolicy * bp, char const * close, char const * cancel)
: dialogIsOpen(false), lv_(lv), bc_(bp, cancel, close),
- u_(0), h_(0), title(t), bp_(bp)
-{
- switch( bd ) {
- case BUFFER_DEPENDENT:
- hSignal_ = &d->hideBufferDependent;
- uSignal_ = &d->updateBufferDependent;
- break;
- case BUFFER_INDEPENDENT:
- hSignal_ = &d->hideAll;
- uSignal_ = 0;
- break;
- }
-}
+ d_(d), bd_(bd), cba_(cba), parent_(0), u_(0), h_(0), title(t), bp_(bp)
+{}
FormBase::~FormBase()
C_FormBaseWMHideCB, 0);
}
+ parent_ = lv_->buffer();
+
fl_freeze_form( form() );
update(); // make sure its up-to-date
fl_unfreeze_form( form() );
// free up the dialog for another inset
dialogIsOpen = false;
+ parent_ = 0;
clearStore();
}
void FormBase::connect()
{
- if ( uSignal_ ) {
- u_ = uSignal_->connect(slot(this, &FormBase::update));
+ switch( bd_ ) {
+ case BUFFER_DEPENDENT:
+ u_ = d_->updateBufferDependent.
+ connect(slot(this, &FormBase::updateOrHide));
+ h_ = d_->hideBufferDependent.
+ connect(slot(this, &FormBase::hide));
+ break;
+ case BUFFER_INDEPENDENT:
+ h_ = d_->hideAll.connect(slot(this, &FormBase::hide));
+ break;
}
- h_ = hSignal_->connect(slot(this, &FormBase::hide));
}
}
+void FormBase::updateOrHide()
+{
+ if( cba_ == UPDATE )
+ update();
+ else if( parent_ == lv_->buffer() )
+ update();
+ else
+ hide();
+}
+
+
int FormBase::WMHideCB(FL_FORM * form, void *)
{
// Ensure that the signals (u and h) are disconnected even if the
#include "ButtonController.h"
#include "gettext.h"
+class Buffer;
class Dialogs;
class LyXView;
#pragma interface
#endif
-#ifdef SIGC_CXX_NAMESPACES
-using SigC::Signal0;
-#endif
-
/** This class is an XForms GUI base class
@author Angus Leeming
*/
///
BUFFER_INDEPENDENT
};
+ ///
+ enum ChangedBufferAction {
+ ///
+ UPDATE,
+ ///
+ HIDE
+ };
/** Constructor.
- #FormBase(lv, d, BUFFER_DEPENDENT, _("DialogName"), new ButtonPolicy)#
+ #FormBase(lv, d, _("DialogName"), BUFFER_DEPENDENT, new ButtonPolicy)#
*/
- FormBase(LyXView *, Dialogs *, BufferDependency, string const &,
+ FormBase(LyXView *, Dialogs *, string const &,
+ BufferDependency, ChangedBufferAction,
ButtonPolicy * bp = new OkApplyCancelReadOnlyPolicy,
char const * close = N_("Close"),
char const * cancel = N_("Cancel"));
///
static void RestoreCB(FL_OBJECT *, long);
-protected:
+protected: // methods
/// Create the dialog if necessary, update it and display it.
void show();
/// Hide the dialog.
/// Pointer to the actual instantiation of xform's form
virtual FL_FORM * form() const = 0;
- /// block opening of form twice at the same time
+private: // methods
+ /// method connected to updateBufferDependent signal.
+ void updateOrHide();
+
+protected: // data
+ /// block opening of form twice at the same time.
bool dialogIsOpen;
/** Which LyXFunc do we use?
We could modify Dialogs to have a visible LyXFunc* instead and
save a couple of bytes per dialog.
*/
LyXView * lv_;
- /// Useable even in derived-class's const functions
+ /// Useable even in derived-class's const functions.
mutable ButtonController bc_;
-private:
- /// Hide signal
- Signal0<void> * hSignal_;
- /// Update signal
- Signal0<void> * uSignal_;
+private: // data
+ /// Used so we can get at the signals we have to connect to.
+ Dialogs * d_;
+ /// flag whether dialog is buffer dependent or not.
+ BufferDependency const bd_;
+ /// flag whether to hide or update on updateBufferDependent signal.
+ ChangedBufferAction const cba_;
+ /// stores parent buffer when popup was launched.
+ Buffer * parent_;
/// Update connection.
Connection u_;
/// Hide connection.
static int min_wform;
FormCitation::FormCitation(LyXView * lv, Dialogs * d)
- : FormCommand(lv, d, _("Citation")), dialog_(0)
+ : FormCommand(lv, d, _("Citation"), HIDE), dialog_(0)
{
// let the dialog be shown
// These are permanent connections so we won't bother
#include "FormCommand.h"
FormCommand::FormCommand( LyXView * lv, Dialogs * d, string const & t,
- ButtonPolicy * bp )
- : FormBase( lv, d, BUFFER_DEPENDENT, t, bp ),
+ ChangedBufferAction cba, ButtonPolicy * bp )
+ : FormBase( lv, d, t, BUFFER_DEPENDENT, cba, bp ),
inset_(0), ih_(0)
{}
public:
/// Constructor
FormCommand( LyXView *, Dialogs *, string const &,
+ ChangedBufferAction,
ButtonPolicy * bp = new OkCancelReadOnlyPolicy );
protected:
#include "FormCopyright.h"
FormCopyright::FormCopyright( LyXView * lv, Dialogs * d )
- : FormBase( lv, d, BUFFER_INDEPENDENT, _("Copyright and Warranty") ),
+ : FormBase( lv, d, _("Copyright and Warranty"),
+ BUFFER_INDEPENDENT, HIDE ),
dialog_(0)
{
// let the dialog be shown
#define USE_CLASS_COMBO 1
FormDocument::FormDocument(LyXView * lv, Dialogs * d)
- : FormBase(lv, d, BUFFER_DEPENDENT, _("Document Layout"),
+ : FormBase(lv, d, _("Document Layout"), BUFFER_DEPENDENT, UPDATE,
new NoRepeatedApplyReadOnlyPolicy),
dialog_(0), paper_(0), class_(0), language_(0), options_(0),
bullets_(0), current_bullet_panel(0), current_bullet_depth(0),
static int minh, minw;
FormError::FormError( LyXView * lv, Dialogs * d )
- : FormBase( lv, d, BUFFER_DEPENDENT, _("LaTeX Error") ),
+ : FormBase( lv, d, _("LaTeX Error"), BUFFER_DEPENDENT, HIDE ),
dialog_(0), ih_(0), message_("")
{
// let the dialog be shown
#include "lyxfunc.h"
FormIndex::FormIndex(LyXView * lv, Dialogs * d)
- : FormCommand(lv, d, _("Index")), minh(0), minw(0), dialog_(0)
+ : FormCommand(lv, d, _("Index"), HIDE), minh(0), minw(0), dialog_(0)
{
// let the dialog be shown
// These are permanent connections so we won't bother
#pragma implementation
#endif
-#include "lyx_gui_misc.h"
-#include "gettext.h"
#include FORMS_H_LOCATION
-#include XPM_H_LOCATION
#include "FormParagraph.h"
#include "form_paragraph.h"
-#include "xform_macros.h"
#include "Dialogs.h"
-#include "ButtonController.h"
#include "Liason.h"
#include "LyXView.h"
-#include "BufferView.h"
#include "buffer.h"
#include "lyxtext.h"
-#ifdef SIGC_CXX_NAMESPACES
-using SigC::slot;
-#endif
-
#ifdef CXX_WORKING_NAMESPACES
using Liason::setMinibuffer;
#endif
-C_RETURNCB(FormParagraph, WMHideCB)
-C_GENERICCB(FormParagraph, InputCB)
-C_GENERICCB(FormParagraph, OKCB)
-C_GENERICCB(FormParagraph, ApplyCB)
-C_GENERICCB(FormParagraph, CancelCB)
-C_GENERICCB(FormParagraph, RestoreCB)
-C_GENERICCB(FormParagraph, VSpaceCB)
-
FormParagraph::FormParagraph(LyXView * lv, Dialogs * d)
- : dialog_(0), general_(0), extra_(0),
- lv_(lv), d_(d), u_(0), h_(0),
- status(POPUP_UNMODIFIED),
-// this will leak till converted to use FormBase
- bc_(new ButtonController(new NoRepeatedApplyReadOnlyPolicy,
- _("Cancel"),
- _("Close")))
+ : FormBase(lv, d, _("Paragraph Layout"), BUFFER_DEPENDENT, UPDATE,
+ new NoRepeatedApplyReadOnlyPolicy),
+ dialog_(0), general_(0), extra_(0)
{
// let the popup be shown
// This is a permanent connection so we won't bother
FormParagraph::~FormParagraph()
{
- free();
- delete bc_;
+ delete general_;
+ delete extra_;
+ delete dialog_;
+}
+
+
+FL_FORM * FormParagraph::form() const
+{
+ if (dialog_) return dialog_->form;
+ return 0;
}
dialog_ = build_tabbed_paragraph();
// manage the restore, ok, apply and cancel/close buttons
- bc_->setOK(dialog_->button_ok);
- bc_->setApply(dialog_->button_apply);
- bc_->setCancel(dialog_->button_cancel);
- bc_->setUndoAll(dialog_->button_restore);
- bc_->refresh();
+ bc_.setOK(dialog_->button_ok);
+ bc_.setApply(dialog_->button_apply);
+ bc_.setCancel(dialog_->button_cancel);
+ bc_.setUndoAll(dialog_->button_restore);
+ bc_.refresh();
// the general paragraph data form
general_ = build_paragraph_general();
fl_set_input_return(general_->input_space_below, FL_RETURN_CHANGED);
fl_set_input_return(general_->input_labelwidth, FL_RETURN_CHANGED);
- bc_->addReadOnly (general_->radio_align_right);
- bc_->addReadOnly (general_->radio_align_left);
- bc_->addReadOnly (general_->radio_align_block);
- bc_->addReadOnly (general_->radio_align_center);
- bc_->addReadOnly (general_->check_lines_top);
- bc_->addReadOnly (general_->check_lines_bottom);
- bc_->addReadOnly (general_->choice_space_above);
- bc_->addReadOnly (general_->input_space_above);
- bc_->addReadOnly (general_->check_space_above);
- bc_->addReadOnly (general_->choice_space_below);
- bc_->addReadOnly (general_->input_space_below);
- bc_->addReadOnly (general_->check_space_below);
- bc_->addReadOnly (general_->check_noindent);
- bc_->addReadOnly (general_->input_labelwidth);
+ bc_.addReadOnly (general_->radio_align_right);
+ bc_.addReadOnly (general_->radio_align_left);
+ bc_.addReadOnly (general_->radio_align_block);
+ bc_.addReadOnly (general_->radio_align_center);
+ bc_.addReadOnly (general_->check_lines_top);
+ bc_.addReadOnly (general_->check_lines_bottom);
+ bc_.addReadOnly (general_->choice_space_above);
+ bc_.addReadOnly (general_->input_space_above);
+ bc_.addReadOnly (general_->check_space_above);
+ bc_.addReadOnly (general_->choice_space_below);
+ bc_.addReadOnly (general_->input_space_below);
+ bc_.addReadOnly (general_->check_space_below);
+ bc_.addReadOnly (general_->check_noindent);
+ bc_.addReadOnly (general_->input_labelwidth);
// the document class form
extra_ = build_paragraph_extra();
fl_set_input_return(extra_->input_pextra_width, FL_RETURN_CHANGED);
fl_set_input_return(extra_->input_pextra_widthp, FL_RETURN_CHANGED);
- bc_->addReadOnly (extra_->radio_pextra_indent);
- bc_->addReadOnly (extra_->radio_pextra_minipage);
- bc_->addReadOnly (extra_->radio_pextra_floatflt);
+ bc_.addReadOnly (extra_->radio_pextra_indent);
+ bc_.addReadOnly (extra_->radio_pextra_minipage);
+ bc_.addReadOnly (extra_->radio_pextra_floatflt);
// now make them fit together
- fl_set_form_atclose(dialog_->form, C_FormParagraphWMHideCB, 0);
fl_addto_tabfolder(dialog_->tabbed_folder,_("General"), general_->form);
fl_addto_tabfolder(dialog_->tabbed_folder,_("Extra"), extra_->form);
}
-void FormParagraph::show()
-{
- if (!dialog_)
- build();
-
- update(); // make sure its up-to-date
- if (dialog_->form->visible) {
- fl_raise_form(dialog_->form);
- } else {
- fl_show_form(dialog_->form, FL_PLACE_MOUSE | FL_FREE_SIZE,
- FL_TRANSIENT, _("Paragraph Layout"));
- u_ = d_->updateBufferDependent.connect(
- slot(this, &FormParagraph::update));
- h_ = d_->hideBufferDependent.connect(
- slot(this, &FormParagraph::hide));
- }
-}
-
-
-void FormParagraph::hide()
-{
- if (dialog_->form->visible) {
- fl_hide_form(dialog_->form);
- u_.disconnect();
- h_.disconnect();
- }
-}
-
-
void FormParagraph::apply()
{
if (!lv_->view()->available() || !dialog_)
}
+void FormParagraph::update()
+{
+ if (!dialog_)
+ return;
+
+ general_update();
+ extra_update();
+}
+
+
void FormParagraph::general_apply()
{
VSpace space_top, space_bottom;
}
-void FormParagraph::cancel()
-{
-}
-
-
-void FormParagraph::update()
-{
- if (!dialog_)
- return;
-
- general_update();
- extra_update();
-}
-
-
void FormParagraph::general_update()
{
if (!general_)
fl_set_object_lcol(extra_->radio_pextra_middle, FL_INACTIVE);
fl_deactivate_object(extra_->radio_pextra_bottom);
fl_set_object_lcol(extra_->radio_pextra_bottom, FL_INACTIVE);
- CheckParagraphInput(extra_->radio_pextra_indent, 0);
+ input(extra_->radio_pextra_indent, 0);
} else if (par->pextra_type == LyXParagraph::PEXTRA_MINIPAGE) {
fl_set_button(extra_->radio_pextra_indent, 0);
fl_set_button(extra_->radio_pextra_minipage, 1);
fl_set_object_lcol(extra_->radio_pextra_middle, FL_BLACK);
fl_activate_object(extra_->radio_pextra_bottom);
fl_set_object_lcol(extra_->radio_pextra_bottom, FL_BLACK);
- CheckParagraphInput(extra_->radio_pextra_minipage, 0);
+ input(extra_->radio_pextra_minipage, 0);
} else if (par->pextra_type == LyXParagraph::PEXTRA_FLOATFLT) {
fl_set_button(extra_->radio_pextra_indent, 0);
fl_set_button(extra_->radio_pextra_minipage, 0);
fl_set_object_lcol(extra_->radio_pextra_middle, FL_INACTIVE);
fl_deactivate_object(extra_->radio_pextra_bottom);
fl_set_object_lcol(extra_->radio_pextra_bottom, FL_INACTIVE);
- CheckParagraphInput(extra_->radio_pextra_floatflt, 0);
+ input(extra_->radio_pextra_floatflt, 0);
} else {
fl_set_button(extra_->radio_pextra_indent, 0);
fl_set_button(extra_->radio_pextra_minipage, 0);
fl_set_object_lcol(extra_->radio_pextra_middle, FL_INACTIVE);
fl_deactivate_object(extra_->radio_pextra_bottom);
fl_set_object_lcol(extra_->radio_pextra_bottom, FL_INACTIVE);
- CheckParagraphInput(0, 0);
+ input(0, 0);
}
fl_hide_object(dialog_->text_warning);
}
-void FormParagraph::free()
-{
- if (dialog_) {
- hide();
- if (general_) {
-// fl_free_form(general_->form);
- delete general_;
- general_ = 0;
- }
- if (extra_) {
-// fl_free_form(extra_->form);
- delete extra_;
- extra_ = 0;
- }
-// fl_free_form(dialog_->form);
- delete dialog_;
- dialog_ = 0;
- }
-}
-
-
-int FormParagraph::WMHideCB(FL_FORM * form, void *)
-{
- // Ensure that the signals (u and h) are disconnected even if the
- // window manager is used to close the popup.
- FormParagraph * pre = static_cast<FormParagraph*>(form->u_vdata);
- pre->hide();
- pre->bc_->hide();
- return FL_CANCEL;
-}
-
-
-void FormParagraph::OKCB(FL_OBJECT * ob, long)
-{
- FormParagraph * pre = static_cast<FormParagraph*>(ob->form->u_vdata);
- pre->apply();
- pre->hide();
- pre->bc_->ok();
-}
-
-
-void FormParagraph::ApplyCB(FL_OBJECT * ob, long)
-{
- FormParagraph * pre = static_cast<FormParagraph*>(ob->form->u_vdata);
- pre->apply();
- pre->bc_->apply();
-}
-
-
-void FormParagraph::CancelCB(FL_OBJECT * ob, long)
-{
- FormParagraph * pre = static_cast<FormParagraph*>(ob->form->u_vdata);
- pre->cancel();
- pre->hide();
- pre->bc_->cancel();
-}
-
-
-void FormParagraph::RestoreCB(FL_OBJECT * ob, long)
-{
- FormParagraph * pre = static_cast<FormParagraph*>(ob->form->u_vdata);
- pre->update();
- pre->bc_->undoAll();
-}
-
-
-void FormParagraph::InputCB(FL_OBJECT * ob, long)
-{
- FormParagraph * pre = static_cast<FormParagraph*>(ob->form->u_vdata);
- pre->bc_->valid(pre->CheckParagraphInput(ob,0));
-}
-
-
-void FormParagraph::VSpaceCB(FL_OBJECT * ob, long)
-{
- FormParagraph * pre = static_cast<FormParagraph*>(ob->form->u_vdata);
- pre->bc_->valid(pre->CheckParagraphInput(ob,0));
-}
-
-
-bool FormParagraph::CheckParagraphInput(FL_OBJECT * ob, long)
+bool FormParagraph::input(FL_OBJECT * ob, long)
{
bool ret = true;
}
return ret;
}
+
#ifndef FORM_PARAGRAPH_H
#define FORM_PARAGRAPH_H
-#include "DialogBase.h"
-#include <boost/utility.hpp>
-#include <vector>
+#include "FormBase.h"
#ifdef __GNUG_
#pragma interface
#endif
-class LyXView;
-class Dialogs;
-class NoRepeatedApplyReadOnlyPolicy;
-//template <class x> class ButtonController;
-class ButtonController;
struct FD_form_tabbed_paragraph;
struct FD_form_paragraph_general;
struct FD_form_paragraph_extra;
-#ifdef SIGC_CXX_NAMESPACES
-using SigC::Connection;
-#endif
-
/** This class provides an XForms implementation of the FormParagraph Popup.
- The table-layout-form here changes values for latex-tabulars
*/
-class FormParagraph : public DialogBase, public noncopyable {
+class FormParagraph : public FormBase {
public:
- FormParagraph(LyXView *, Dialogs *);
- ~FormParagraph();
- ///
- static int WMHideCB(FL_FORM *, void *);
- static void OKCB(FL_OBJECT *, long);
- static void ApplyCB(FL_OBJECT *, long);
- static void CancelCB(FL_OBJECT *, long);
- static void RestoreCB(FL_OBJECT *, long);
- static void InputCB(FL_OBJECT *, long);
- static void VSpaceCB(FL_OBJECT *, long);
- ///
- enum EnumPopupStatus {
- ///
- POPUP_UNMODIFIED,
///
- POPUP_MODIFIED,
+ FormParagraph(LyXView *, Dialogs *);
///
- POPUP_READONLY
- };
+ ~FormParagraph();
private:
- /// Create the popup if necessary, update it and display it.
- void show();
- /// Hide the popup.
- void hide();
- /// Update the popup.
- void update();
- ///
- void general_update();
- ///
- void extra_update();
- /// Apply from popup
- void apply();
- ///
- void general_apply();
- ///
- void extra_apply();
- /// Cancel from popup
- void cancel();
- /// Build the popup
- void build();
- /// Explicitly free the popup.
- void free();
- ///
- bool CheckParagraphInput(FL_OBJECT * ob, long);
+ /// Build the popup
+ void build();
+ /// Apply from popup
+ void apply();
+ /// Update the popup.
+ void update();
+ /// Filter the inputs on callback from xforms
+ virtual bool input(FL_OBJECT * ob, long);
+ ///
+ virtual FL_FORM * form() const;
+
+ ///
+ void general_update();
+ ///
+ void extra_update();
+ ///
+ void general_apply();
+ ///
+ void extra_apply();
- /// Typedefinitions from the fdesign produced Header file
- FD_form_tabbed_paragraph * build_tabbed_paragraph();
- ///
- FD_form_paragraph_general * build_paragraph_general();
- ///
- FD_form_paragraph_extra * build_paragraph_extra();
+ /// Typedefinitions from the fdesign produced Header file
+ FD_form_tabbed_paragraph * build_tabbed_paragraph();
+ ///
+ FD_form_paragraph_general * build_paragraph_general();
+ ///
+ FD_form_paragraph_extra * build_paragraph_extra();
- /// Real GUI implementation.
- FD_form_tabbed_paragraph * dialog_;
- ///
- FD_form_paragraph_general * general_;
- ///
- FD_form_paragraph_extra * extra_;
- /// Which LyXView do we belong to?
- LyXView * lv_;
- ///
- Dialogs * d_;
- /// Update connection.
- Connection u_;
- /// Hide connection.
- Connection h_;
- /// has form contents changed? Used to control OK/Apply
- EnumPopupStatus status;
- ///
- ButtonController/*<NoRepeatedApplyReadOnlyPolicy>*/ * bc_;
+ /// Real GUI implementation.
+ FD_form_tabbed_paragraph * dialog_;
+ ///
+ FD_form_paragraph_general * general_;
+ ///
+ FD_form_paragraph_extra * extra_;
};
#endif
FormPreferences::FormPreferences(LyXView * lv, Dialogs * d)
- : FormBase(lv, d, BUFFER_INDEPENDENT, _("Preferences"), new PreferencesPolicy),
+ : FormBase(lv, d, _("Preferences"),
+ BUFFER_INDEPENDENT, HIDE, new PreferencesPolicy),
dialog_(0), outputs_tab_(0), look_n_feel_tab_(0), inputs_tab_(0),
lnf_general_(0), screen_fonts_(0), interface_fonts_(0),
printer_(0), paths_(0), minw_(0), minh_(0)
FormPrint::FormPrint(LyXView * lv, Dialogs * d)
- : FormBase(lv, d, BUFFER_DEPENDENT, _("Print"), new OkApplyCancelPolicy),
+ : FormBase(lv, d, _("Print"),
+ BUFFER_DEPENDENT, HIDE, new OkApplyCancelPolicy),
dialog_(0), target_(2), order_(2), which_(3)
{
// let the dialog be shown
static int formh;
FormRef::FormRef(LyXView * lv, Dialogs * d)
- : FormCommand(lv, d, _("Reference")), toggle(GOBACK), dialog_(0)
+ : FormCommand(lv, d, _("Reference"), HIDE), toggle(GOBACK), dialog_(0)
{
// let the dialog be shown
// These are permanent connections so we won't bother
#include "support/lstrings.h"
FormToc::FormToc(LyXView * lv, Dialogs * d)
- : FormCommand(lv, d, _("Table of Contents")), dialog_(0)
+ : FormCommand(lv, d, _("Table of Contents"), UPDATE), dialog_(0)
{
// let the dialog be shown
// These are permanent connections so we won't bother
#include "lyxfunc.h"
FormUrl::FormUrl(LyXView * lv, Dialogs * d)
- : FormCommand(lv, d, _("Url")), minh(0), minw(0), dialog_(0)
+ : FormCommand(lv, d, _("Url"), HIDE), minh(0), minw(0), dialog_(0)
{
// let the dialog be shown
// These are permanent connections so we won't bother
resize: FL_RESIZE_X
gravity: FL_West FL_East
name: input_labelwidth
-callback: C_FormParagraphInputCB
+callback: C_FormBaseInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: check_lines_top
-callback: C_FormParagraphInputCB
+callback: C_FormBaseInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: check_lines_bottom
-callback: C_FormParagraphInputCB
+callback: C_FormBaseInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: check_pagebreaks_top
-callback: C_FormParagraphInputCB
+callback: C_FormBaseInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: check_pagebreaks_bottom
-callback: C_FormParagraphInputCB
+callback: C_FormBaseInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: check_noindent
-callback: C_FormParagraphInputCB
+callback: C_FormBaseInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: radio_align_right
-callback: C_FormParagraphInputCB
+callback: C_FormBaseInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: radio_align_left
-callback: C_FormParagraphInputCB
+callback: C_FormBaseInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: radio_align_block
-callback: C_FormParagraphInputCB
+callback: C_FormBaseInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: radio_align_center
-callback: C_FormParagraphInputCB
+callback: C_FormBaseInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: input_space_above
-callback: C_FormParagraphVSpaceCB
+callback: C_FormBaseInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: input_space_below
-callback: C_FormParagraphVSpaceCB
+callback: C_FormBaseInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: choice_space_above
-callback: C_FormParagraphVSpaceCB
+callback: C_FormBaseInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: choice_space_below
-callback: C_FormParagraphVSpaceCB
+callback: C_FormBaseInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: check_space_above
-callback: C_FormParagraphInputCB
+callback: C_FormBaseInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: check_space_below
-callback: C_FormParagraphInputCB
+callback: C_FormBaseInputCB
argument: 0
=============== FORM ===============
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: input_pextra_width
-callback: C_FormParagraphInputCB
+callback: C_FormBaseInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: input_pextra_widthp
-callback: C_FormParagraphInputCB
+callback: C_FormBaseInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: radio_pextra_top
-callback: C_FormParagraphInputCB
+callback: C_FormBaseInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: radio_pextra_middle
-callback: C_FormParagraphInputCB
+callback: C_FormBaseInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: radio_pextra_bottom
-callback: C_FormParagraphInputCB
+callback: C_FormBaseInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: radio_pextra_hfill
-callback: C_FormParagraphInputCB
+callback: C_FormBaseInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: radio_pextra_startmp
-callback: C_FormParagraphInputCB
+callback: C_FormBaseInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: radio_pextra_indent
-callback: C_FormParagraphInputCB
+callback: C_FormBaseInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: radio_pextra_minipage
-callback: C_FormParagraphInputCB
+callback: C_FormBaseInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: radio_pextra_floatflt
-callback: C_FormParagraphInputCB
+callback: C_FormBaseInputCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: button_cancel
-callback: C_FormParagraphCancelCB
+callback: C_FormBaseCancelCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: button_apply
-callback: C_FormParagraphApplyCB
+callback: C_FormBaseApplyCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: button_ok
-callback: C_FormParagraphOKCB
+callback: C_FormBaseOKCB
argument: 0
--------------------
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
name: button_restore
-callback: C_FormParagraphRestoreCB
+callback: C_FormBaseRestoreCB
argument: 0
--------------------