mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
iport tabular and prefs to MVC
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@5635 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
127a0419fd
commit
3c17b21cf0
@ -1,3 +1,16 @@
|
||||
2002-11-15 John Levon <levon@movementarian.org>
|
||||
|
||||
* Dialogs2.C:
|
||||
* Dialogs_impl.h:
|
||||
* FormPreferences.h:
|
||||
* FormPreferences.C:
|
||||
* FormTabular.h:
|
||||
* FormTabular.C:
|
||||
* forms/form_preferences.fd:
|
||||
* forms/form_tabular.fd: port tabular and prefs to MVC
|
||||
|
||||
* FormBase.h: make hide() virtual for prefs
|
||||
|
||||
2002-11-08 Angus Leeming <aleem@pneumon.bg.ic.ac.uk>
|
||||
|
||||
* xforms_resize.[Ch]: sigh. Hack the "get scaling" part of
|
||||
|
@ -177,7 +177,7 @@ void Dialogs::showPreamble()
|
||||
|
||||
void Dialogs::showPreferences()
|
||||
{
|
||||
pimpl_->preferences.show();
|
||||
pimpl_->preferences.controller().show();
|
||||
}
|
||||
|
||||
|
||||
@ -219,13 +219,13 @@ void Dialogs::showSpellchecker()
|
||||
|
||||
void Dialogs::showTabular(InsetTabular * it)
|
||||
{
|
||||
pimpl_->tabular.showInset(it);
|
||||
pimpl_->tabular.controller().showInset(it);
|
||||
}
|
||||
|
||||
|
||||
void Dialogs::updateTabular(InsetTabular * it)
|
||||
{
|
||||
pimpl_->tabular.updateInset(it);
|
||||
pimpl_->tabular.controller().updateInset(it);
|
||||
}
|
||||
|
||||
|
||||
|
@ -118,6 +118,7 @@
|
||||
#include "FormPreamble.h"
|
||||
#include "forms/form_preamble.h"
|
||||
|
||||
#include "ControlPrefs.h"
|
||||
#include "FormPreferences.h"
|
||||
#include "forms/form_preferences.h"
|
||||
|
||||
@ -141,6 +142,7 @@
|
||||
#include "FormSpellchecker.h"
|
||||
#include "forms/form_spellchecker.h"
|
||||
|
||||
#include "ControlTabular.h"
|
||||
#include "FormTabular.h"
|
||||
#include "forms/form_tabular.h"
|
||||
|
||||
@ -232,7 +234,8 @@ ParagraphDialog;
|
||||
typedef GUI<ControlPreamble, FormPreamble, NoRepeatedApplyReadOnlyPolicy, xformsBC>
|
||||
PreambleDialog;
|
||||
|
||||
typedef FormPreferences PreferencesDialog;
|
||||
typedef GUI<ControlPrefs, FormPreferences, OkApplyCancelPolicy, xformsBC>
|
||||
PreferencesDialog;
|
||||
|
||||
typedef GUI<ControlPrint, FormPrint, OkApplyCancelPolicy, xformsBC>
|
||||
PrintDialog;
|
||||
@ -249,7 +252,8 @@ SendtoDialog;
|
||||
typedef GUI<ControlSpellchecker, FormSpellchecker, NoRepeatedApplyReadOnlyPolicy, xformsBC>
|
||||
SpellcheckerDialog;
|
||||
|
||||
typedef FormTabular TabularDialog;
|
||||
typedef GUI<ControlTabular, FormTabular, NoRepeatedApplyReadOnlyPolicy, xformsBC>
|
||||
TabularDialog;
|
||||
|
||||
typedef GUI<ControlTabularCreate, FormTabularCreate, OkApplyCancelReadOnlyPolicy, xformsBC>
|
||||
TabularCreateDialog;
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -18,7 +18,7 @@
|
||||
#pragma interface
|
||||
#endif
|
||||
|
||||
#include "FormBaseDeprecated.h"
|
||||
#include "FormBase.h"
|
||||
#include "Color.h" // NamedColor
|
||||
#include "xforms_helpers.h" // XformColor
|
||||
|
||||
@ -27,6 +27,8 @@
|
||||
#include FORMS_H_LOCATION
|
||||
#include <utility> // pair
|
||||
|
||||
class ControlPrefs;
|
||||
|
||||
class Combox;
|
||||
class Dialogs;
|
||||
class LyXView;
|
||||
@ -50,14 +52,11 @@ struct FD_preferences_spelloptions;
|
||||
/** This class provides an XForms implementation of the FormPreferences Dialog.
|
||||
The preferences dialog allows users to set/save their preferences.
|
||||
*/
|
||||
class FormPreferences : public FormBaseBI {
|
||||
class FormPreferences : public FormCB<ControlPrefs, FormDB<FD_preferences> > {
|
||||
public:
|
||||
///
|
||||
FormPreferences(LyXView &, Dialogs &);
|
||||
FormPreferences();
|
||||
|
||||
private:
|
||||
/// Pointer to the actual instantiation of the ButtonController.
|
||||
virtual xformsBC & bc();
|
||||
/** Redraw the form (on receipt of a Signal indicating, for example,
|
||||
that the xforms colours have been re-mapped). */
|
||||
virtual void redraw();
|
||||
@ -65,26 +64,15 @@ private:
|
||||
virtual void update();
|
||||
/// Hide the dialog.
|
||||
virtual void hide();
|
||||
/// OK (Save) from dialog
|
||||
virtual void ok();
|
||||
/// Apply from dialog
|
||||
virtual void apply();
|
||||
/// Filter the inputs -- return true if entries are valid
|
||||
virtual bool input(FL_OBJECT *, long);
|
||||
virtual ButtonPolicy::SMInput input(FL_OBJECT *, long);
|
||||
/// Build the dialog
|
||||
virtual void build();
|
||||
/// Pointer to the actual instantiation of the xforms form.
|
||||
virtual FL_FORM * form() const;
|
||||
/// control which feedback message is output
|
||||
string const getFeedback(FL_OBJECT *);
|
||||
///
|
||||
void browse(FL_OBJECT * input,
|
||||
string const & title, string const & pattern,
|
||||
std::pair<string,string> const & dir1= std::make_pair(string(),string()),
|
||||
std::pair<string,string> const & dir2 = std::make_pair(string(),string()));
|
||||
|
||||
/// Real GUI implementation.
|
||||
boost::scoped_ptr<FD_preferences> dialog_;
|
||||
|
||||
/// Converters tabfolder
|
||||
boost::scoped_ptr<FD_preferences_inner_tab> converters_tab_;
|
||||
/// reLyX and other import/input stuff
|
||||
@ -246,13 +234,13 @@ private:
|
||||
///
|
||||
FD_preferences_inputs_misc const * dialog();
|
||||
///
|
||||
void apply() const;
|
||||
void apply(LyXRC & rc) const;
|
||||
///
|
||||
void build();
|
||||
///
|
||||
string const feedback(FL_OBJECT const * const) const;
|
||||
///
|
||||
void update();
|
||||
void update(LyXRC const & rc);
|
||||
|
||||
private:
|
||||
///
|
||||
@ -271,7 +259,7 @@ private:
|
||||
///
|
||||
FD_preferences_interface const * dialog();
|
||||
///
|
||||
void apply() const;
|
||||
void apply(LyXRC & rc) const;
|
||||
///
|
||||
void build();
|
||||
///
|
||||
@ -279,7 +267,7 @@ private:
|
||||
///
|
||||
bool input(FL_OBJECT const * const);
|
||||
///
|
||||
void update();
|
||||
void update(LyXRC const & rc);
|
||||
|
||||
private:
|
||||
///
|
||||
@ -298,7 +286,7 @@ private:
|
||||
///
|
||||
FD_preferences_language const * dialog();
|
||||
///
|
||||
void apply(); // not const because calls update()
|
||||
void apply(LyXRC & rc); // not const because calls update()
|
||||
///
|
||||
void build();
|
||||
///
|
||||
@ -306,7 +294,7 @@ private:
|
||||
///
|
||||
bool input(FL_OBJECT const * const);
|
||||
///
|
||||
void update();
|
||||
void update(LyXRC const & rc);
|
||||
///
|
||||
static void ComboCB(int, void *, Combox *);
|
||||
|
||||
@ -331,13 +319,13 @@ private:
|
||||
///
|
||||
FD_preferences_lnf_misc const * dialog();
|
||||
///
|
||||
void apply() const;
|
||||
void apply(LyXRC & rc) const;
|
||||
///
|
||||
void build();
|
||||
///
|
||||
string const feedback(FL_OBJECT const * const) const;
|
||||
///
|
||||
void update();
|
||||
void update(LyXRC const & rc);
|
||||
|
||||
private:
|
||||
///
|
||||
@ -356,13 +344,13 @@ private:
|
||||
///
|
||||
FD_preferences_outputs_misc const * dialog();
|
||||
///
|
||||
void apply() const;
|
||||
void apply(LyXRC & rc) const;
|
||||
///
|
||||
void build();
|
||||
///
|
||||
string const feedback(FL_OBJECT const * const) const;
|
||||
///
|
||||
void update();
|
||||
void update(LyXRC const & rc);
|
||||
|
||||
private:
|
||||
///
|
||||
@ -381,7 +369,7 @@ private:
|
||||
///
|
||||
FD_preferences_paths const * dialog();
|
||||
///
|
||||
void apply();
|
||||
void apply(LyXRC & rc);
|
||||
///
|
||||
void build();
|
||||
///
|
||||
@ -389,7 +377,7 @@ private:
|
||||
///
|
||||
bool input(FL_OBJECT const * const);
|
||||
///
|
||||
void update();
|
||||
void update(LyXRC const & rc);
|
||||
|
||||
private:
|
||||
///
|
||||
@ -408,13 +396,13 @@ private:
|
||||
///
|
||||
FD_preferences_printer const * dialog();
|
||||
///
|
||||
void apply() const;
|
||||
void apply(LyXRC & rc) const;
|
||||
///
|
||||
void build();
|
||||
///
|
||||
string const feedback(FL_OBJECT const * const) const;
|
||||
///
|
||||
void update();
|
||||
void update(LyXRC const & rc);
|
||||
|
||||
private:
|
||||
///
|
||||
@ -433,7 +421,7 @@ private:
|
||||
///
|
||||
FD_preferences_screen_fonts const * dialog();
|
||||
///
|
||||
void apply() const;
|
||||
void apply(LyXRC & rc) const;
|
||||
///
|
||||
void build();
|
||||
///
|
||||
@ -441,7 +429,7 @@ private:
|
||||
///
|
||||
bool input();
|
||||
///
|
||||
void update();
|
||||
void update(LyXRC const & rc);
|
||||
|
||||
private:
|
||||
///
|
||||
@ -460,7 +448,7 @@ private:
|
||||
///
|
||||
FD_preferences_spelloptions const * dialog();
|
||||
///
|
||||
void apply(); // not const because calls update()!
|
||||
void apply(LyXRC & rc); // not const because calls update()!
|
||||
///
|
||||
void build();
|
||||
///
|
||||
@ -468,7 +456,7 @@ private:
|
||||
///
|
||||
bool input(FL_OBJECT const * const);
|
||||
///
|
||||
void update();
|
||||
void update(LyXRC const & rc);
|
||||
|
||||
private:
|
||||
///
|
||||
@ -524,15 +512,6 @@ private:
|
||||
///
|
||||
RGBColor col;
|
||||
};
|
||||
/// The ButtonController
|
||||
ButtonController<PreferencesPolicy, xformsBC> bc_;
|
||||
};
|
||||
|
||||
|
||||
inline
|
||||
xformsBC & FormPreferences::bc()
|
||||
{
|
||||
return bc_;
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif // FORMPREFERENCES_H
|
||||
|
@ -14,35 +14,34 @@
|
||||
#pragma implementation
|
||||
#endif
|
||||
|
||||
#include "debug.h"
|
||||
|
||||
#include <vector>
|
||||
#include <algorithm>
|
||||
|
||||
#include "ControlTabular.h"
|
||||
#include "xformsBC.h"
|
||||
#include "insets/insettabular.h"
|
||||
|
||||
#include "FormTabular.h"
|
||||
#include "forms/form_tabular.h"
|
||||
#include "frontends/LyXView.h"
|
||||
#include "buffer.h"
|
||||
#include "debug.h"
|
||||
#include "xforms_helpers.h"
|
||||
#include "lyxrc.h" // to set the default length values
|
||||
#include "gettext.h"
|
||||
#include "lyxrc.h"
|
||||
#include "helper_funcs.h"
|
||||
#include "input_validators.h"
|
||||
|
||||
#include "insets/insettabular.h"
|
||||
|
||||
#include "support/lstrings.h"
|
||||
|
||||
#include <boost/bind.hpp>
|
||||
|
||||
#include <functional>
|
||||
#include FORMS_H_LOCATION
|
||||
|
||||
|
||||
using std::vector;
|
||||
using std::bind2nd;
|
||||
using std::remove_if;
|
||||
|
||||
|
||||
FormTabular::FormTabular(LyXView & lv, Dialogs & d)
|
||||
: FormInset(lv, d, _("Tabular Layout")),
|
||||
inset_(0), actCell_(-1), closing_(false)
|
||||
typedef FormCB<ControlTabular, FormDB<FD_tabular> > base_class;
|
||||
|
||||
FormTabular::FormTabular()
|
||||
: base_class(_("Edit table settings")),
|
||||
closing_(false), actCell_(-1)
|
||||
{
|
||||
}
|
||||
|
||||
@ -60,51 +59,6 @@ void FormTabular::redraw()
|
||||
}
|
||||
|
||||
|
||||
FL_FORM * FormTabular::form() const
|
||||
{
|
||||
if (dialog_.get())
|
||||
return dialog_->form;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
void FormTabular::disconnect()
|
||||
{
|
||||
inset_ = 0;
|
||||
FormInset::disconnect();
|
||||
}
|
||||
|
||||
|
||||
void FormTabular::showInset(InsetTabular * inset)
|
||||
{
|
||||
if (inset == 0) return;
|
||||
|
||||
// If connected to another inset, disconnect from it.
|
||||
if (inset_ != inset) {
|
||||
ih_.disconnect();
|
||||
ih_ = inset->hideDialog.connect(boost::bind(&FormTabular::hide, this));
|
||||
inset_ = inset;
|
||||
}
|
||||
|
||||
show();
|
||||
}
|
||||
|
||||
|
||||
void FormTabular::updateInset(InsetTabular * inset)
|
||||
{
|
||||
if (inset == 0 || inset_ == 0) return;
|
||||
|
||||
// If connected to another inset, disconnect from it.
|
||||
if (inset_ != inset) {
|
||||
ih_.disconnect();
|
||||
ih_ = inset->hideDialog.connect(boost::bind(&FormTabular::hide, this));
|
||||
inset_ = inset;
|
||||
}
|
||||
|
||||
update();
|
||||
}
|
||||
|
||||
|
||||
void FormTabular::build()
|
||||
{
|
||||
dialog_.reset(build_tabular(this));
|
||||
@ -170,6 +124,8 @@ void FormTabular::build()
|
||||
|
||||
// work-around xforms bug re update of folder->x, folder->y coords.
|
||||
setPrehandler(dialog_->tabfolder);
|
||||
|
||||
// FIXME: addReadOnly everything
|
||||
}
|
||||
|
||||
|
||||
@ -177,17 +133,16 @@ void FormTabular::update()
|
||||
{
|
||||
if (closing_)
|
||||
return;
|
||||
|
||||
if (!inset_ || !inset_->tabular.get())
|
||||
return;
|
||||
|
||||
LyXTabular * tabular = inset_->tabular.get();
|
||||
|
||||
LyXTabular * tabular = controller().tabular();
|
||||
InsetTabular * inset = controller().inset();
|
||||
|
||||
int align;
|
||||
char buf[12];
|
||||
LyXLength pwidth;
|
||||
string special;
|
||||
|
||||
int cell = inset_->getActCell();
|
||||
int cell = inset->getActCell();
|
||||
actCell_ = cell;
|
||||
int column = tabular->column_of_cell(cell) + 1;
|
||||
clearMessage();
|
||||
@ -253,13 +208,13 @@ void FormTabular::update()
|
||||
|
||||
special = tabular->GetAlignSpecial(cell, LyXTabular::SET_SPECIAL_MULTI);
|
||||
fl_set_input(cell_options_->input_special_multialign, special.c_str());
|
||||
bool const metric = lyxrc.default_papersize > BufferParams::PAPER_EXECUTIVEPAPER;
|
||||
bool const metric(controller().metric());
|
||||
string const default_unit = metric ? "cm" : "in";
|
||||
updateWidgetsFromLength(cell_options_->input_mcolumn_width,
|
||||
cell_options_->choice_value_mcolumn_width,
|
||||
pwidth, default_unit);
|
||||
|
||||
if (!lv_.buffer()->isReadonly()) {
|
||||
if (bc().bp().isReadOnly()) {
|
||||
setEnabled(cell_options_->input_special_multialign, true);
|
||||
setEnabled(cell_options_->input_mcolumn_width, true);
|
||||
setEnabled(cell_options_->choice_value_mcolumn_width, true);
|
||||
@ -335,7 +290,7 @@ void FormTabular::update()
|
||||
special = tabular->GetAlignSpecial(cell, LyXTabular::SET_SPECIAL_COLUMN);
|
||||
fl_set_input(column_options_->input_special_alignment, special.c_str());
|
||||
|
||||
bool const isReadonly = lv_.buffer()->isReadonly();
|
||||
bool const isReadonly = bc().bp().isReadOnly();
|
||||
setEnabled(column_options_->input_special_alignment, !isReadonly);
|
||||
|
||||
pwidth = tabular->GetColumnPWidth(cell);
|
||||
@ -506,22 +461,21 @@ void FormTabular::update()
|
||||
}
|
||||
|
||||
|
||||
bool FormTabular::input(FL_OBJECT * ob, long)
|
||||
ButtonPolicy::SMInput FormTabular::input(FL_OBJECT * ob, long)
|
||||
{
|
||||
if (!inset_)
|
||||
return false;
|
||||
|
||||
int s;
|
||||
LyXTabular::Feature num = LyXTabular::LAST_ACTION;
|
||||
string special;;
|
||||
string special;
|
||||
|
||||
int cell = inset_->getActCell();
|
||||
InsetTabular * inset(controller().inset());
|
||||
LyXTabular * tabular(controller().tabular());
|
||||
|
||||
int cell = inset->getActCell();
|
||||
|
||||
// ugly hack to auto-apply the stuff that hasn't been
|
||||
// yet. don't let this continue to exist ...
|
||||
if (ob == dialog_->button_close) {
|
||||
closing_ = true;
|
||||
LyXTabular * tabular = inset_->tabular.get();
|
||||
string str1 =
|
||||
getLengthFromWidgets(column_options_->input_column_width,
|
||||
column_options_->choice_value_column_width);
|
||||
@ -548,38 +502,41 @@ bool FormTabular::input(FL_OBJECT * ob, long)
|
||||
str2 = tabular->GetAlignSpecial(cell, LyXTabular::SET_SPECIAL_MULTI);
|
||||
if (str1 != str2)
|
||||
input(cell_options_->input_special_multialign, 0);
|
||||
|
||||
closing_ = false;
|
||||
ok();
|
||||
return true;
|
||||
controller().OKButton();
|
||||
return ButtonPolicy::SMI_VALID;
|
||||
}
|
||||
|
||||
if (actCell_ != cell) {
|
||||
update();
|
||||
postWarning(_("Wrong Cursor position, updated window"));
|
||||
return false;
|
||||
return ButtonPolicy::SMI_VALID;
|
||||
}
|
||||
|
||||
// No point in processing directives that you can't do anything with
|
||||
// anyhow, so exit now if the buffer is read-only.
|
||||
if (lv_.buffer()->isReadonly()) {
|
||||
if (bc().bp().isReadOnly()) {
|
||||
update();
|
||||
return false;
|
||||
return ButtonPolicy::SMI_VALID;
|
||||
}
|
||||
|
||||
if ((ob == column_options_->input_column_width) ||
|
||||
(ob == column_options_->choice_value_column_width)) {
|
||||
string const str =
|
||||
getLengthFromWidgets(column_options_->input_column_width,
|
||||
column_options_->choice_value_column_width);
|
||||
inset_->tabularFeatures(lv_.view().get(), LyXTabular::SET_PWIDTH, str);
|
||||
controller().set(LyXTabular::SET_PWIDTH, str);
|
||||
|
||||
//check if the input is valid
|
||||
string const input = getString(column_options_->input_column_width);
|
||||
if (!input.empty() && !isValidLength(input) && !isStrDbl(input)) {
|
||||
postWarning(_("Invalid Length (valid example: 10mm)"));
|
||||
return false;
|
||||
return ButtonPolicy::SMI_INVALID;
|
||||
}
|
||||
|
||||
update(); // update for alignment
|
||||
return true;
|
||||
return ButtonPolicy::SMI_VALID;
|
||||
}
|
||||
|
||||
if ((ob == cell_options_->input_mcolumn_width) ||
|
||||
@ -587,16 +544,16 @@ bool FormTabular::input(FL_OBJECT * ob, long)
|
||||
string const str =
|
||||
getLengthFromWidgets(cell_options_->input_mcolumn_width,
|
||||
cell_options_->choice_value_mcolumn_width);
|
||||
inset_->tabularFeatures(lv_.view().get(), LyXTabular::SET_MPWIDTH, str);
|
||||
controller().set(LyXTabular::SET_MPWIDTH, str);
|
||||
|
||||
//check if the input is valid
|
||||
string const input = getString(cell_options_->input_mcolumn_width);
|
||||
if (!input.empty() && !isValidLength(input) && !isStrDbl(input)) {
|
||||
postWarning(_("Invalid Length (valid example: 10mm)"));
|
||||
return false;
|
||||
return ButtonPolicy::SMI_INVALID;
|
||||
}
|
||||
update(); // update for alignment
|
||||
return true;
|
||||
return ButtonPolicy::SMI_VALID;
|
||||
}
|
||||
|
||||
if (ob == tabular_options_->button_append_row)
|
||||
@ -697,13 +654,14 @@ bool FormTabular::input(FL_OBJECT * ob, long)
|
||||
else if (ob == cell_options_->radio_valign_center)
|
||||
num = LyXTabular::M_VALIGN_CENTER;
|
||||
else
|
||||
return false;
|
||||
return ButtonPolicy::SMI_VALID;
|
||||
|
||||
inset_->tabularFeatures(lv_.view().get(), num, special);
|
||||
controller().set(num, special);
|
||||
update();
|
||||
|
||||
return true;
|
||||
return ButtonPolicy::SMI_VALID;
|
||||
}
|
||||
|
||||
|
||||
int FormTabular::checkLongtableOptions(FL_OBJECT * ob, string & special)
|
||||
{
|
||||
|
@ -19,9 +19,10 @@
|
||||
#pragma interface
|
||||
#endif
|
||||
|
||||
#include "FormInset.h"
|
||||
#include "FormBase.h"
|
||||
|
||||
class InsetTabular;
|
||||
class ControlTabular;
|
||||
struct FD_tabular;
|
||||
struct FD_tabular_options;
|
||||
struct FD_tabular_column;
|
||||
@ -31,38 +32,28 @@ struct FD_tabular_longtable;
|
||||
/** This class provides an XForms implementation of the FormTabular Dialog.
|
||||
The tabular dialog allows users to set/save their tabular.
|
||||
*/
|
||||
class FormTabular : public FormInset {
|
||||
class FormTabular : public FormCB<ControlTabular, FormDB<FD_tabular> > {
|
||||
public:
|
||||
/// #FormTabular x(LyXFunc ..., Dialogs ...);#
|
||||
FormTabular(LyXView &, Dialogs &);
|
||||
|
||||
/// Slot launching dialog to an existing inset
|
||||
void showInset(InsetTabular *);
|
||||
/// Slot launching dialog to an existing inset
|
||||
void updateInset(InsetTabular *);
|
||||
FormTabular();
|
||||
|
||||
private:
|
||||
/// Pointer to the actual instantiation of the ButtonController.
|
||||
virtual xformsBC & bc();
|
||||
/** Redraw the form (on receipt of a Signal indicating, for example,
|
||||
that the xforms colours have been re-mapped). */
|
||||
virtual void redraw();
|
||||
/// Disconnect signals. Also perform any necessary housekeeping.
|
||||
virtual void disconnect();
|
||||
|
||||
/// not used
|
||||
virtual void apply() {}
|
||||
/// Update dialog before showing it
|
||||
virtual void update();
|
||||
/// Build the dialog
|
||||
virtual void build();
|
||||
/// Filter the inputs
|
||||
virtual bool input(FL_OBJECT *, long);
|
||||
/// Pointer to the actual instantiation of the xforms form
|
||||
virtual FL_FORM * form() const;
|
||||
virtual ButtonPolicy::SMInput input(FL_OBJECT *, long);
|
||||
|
||||
///
|
||||
virtual int checkLongtableOptions(FL_OBJECT *, string &);
|
||||
|
||||
/// Real GUI implementation.
|
||||
boost::scoped_ptr<FD_tabular> dialog_;
|
||||
///
|
||||
boost::scoped_ptr<FD_tabular_options> tabular_options_;
|
||||
///
|
||||
@ -72,20 +63,11 @@ private:
|
||||
///
|
||||
boost::scoped_ptr<FD_tabular_longtable> longtable_options_;
|
||||
|
||||
/// pointer to the inset passed through showInset
|
||||
InsetTabular * inset_;
|
||||
///
|
||||
bool closing_;
|
||||
|
||||
///
|
||||
int actCell_;
|
||||
/// The ButtonController
|
||||
ButtonController<OkCancelReadOnlyPolicy, xformsBC> bc_;
|
||||
/// if we are applying stuff during a close of the dialog
|
||||
bool closing_;
|
||||
};
|
||||
|
||||
|
||||
inline
|
||||
xformsBC & FormTabular::bc()
|
||||
{
|
||||
return bc_;
|
||||
}
|
||||
#endif
|
||||
#endif // FORMTABULAR_H
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -64,7 +64,7 @@ shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: button_close
|
||||
callback: C_FormBaseDeprecatedInputCB
|
||||
callback: C_FormBaseInputCB
|
||||
argument: 0
|
||||
|
||||
--------------------
|
||||
@ -160,7 +160,7 @@ shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: button_append_column
|
||||
callback: C_FormBaseDeprecatedInputCB
|
||||
callback: C_FormBaseInputCB
|
||||
argument: 0
|
||||
|
||||
--------------------
|
||||
@ -178,7 +178,7 @@ shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: button_delete_column
|
||||
callback: C_FormBaseDeprecatedInputCB
|
||||
callback: C_FormBaseInputCB
|
||||
argument: 0
|
||||
|
||||
--------------------
|
||||
@ -196,7 +196,7 @@ shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: button_append_row
|
||||
callback: C_FormBaseDeprecatedInputCB
|
||||
callback: C_FormBaseInputCB
|
||||
argument: 0
|
||||
|
||||
--------------------
|
||||
@ -214,7 +214,7 @@ shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: button_delete_row
|
||||
callback: C_FormBaseDeprecatedInputCB
|
||||
callback: C_FormBaseInputCB
|
||||
argument: 0
|
||||
|
||||
--------------------
|
||||
@ -232,7 +232,7 @@ shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: button_set_borders
|
||||
callback: C_FormBaseDeprecatedInputCB
|
||||
callback: C_FormBaseInputCB
|
||||
argument: 0
|
||||
|
||||
--------------------
|
||||
@ -250,7 +250,7 @@ shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: button_unset_borders
|
||||
callback: C_FormBaseDeprecatedInputCB
|
||||
callback: C_FormBaseInputCB
|
||||
argument: 0
|
||||
|
||||
--------------------
|
||||
@ -268,7 +268,7 @@ shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: check_longtable
|
||||
callback: C_FormBaseDeprecatedInputCB
|
||||
callback: C_FormBaseInputCB
|
||||
argument: 0
|
||||
|
||||
--------------------
|
||||
@ -286,7 +286,7 @@ shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: check_rotate_tabular
|
||||
callback: C_FormBaseDeprecatedInputCB
|
||||
callback: C_FormBaseInputCB
|
||||
argument: 0
|
||||
|
||||
--------------------
|
||||
@ -418,7 +418,7 @@ shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: input_column_width
|
||||
callback: C_FormBaseDeprecatedInputCB
|
||||
callback: C_FormBaseInputCB
|
||||
argument: 0
|
||||
|
||||
--------------------
|
||||
@ -436,7 +436,7 @@ shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: check_border_top
|
||||
callback: C_FormBaseDeprecatedInputCB
|
||||
callback: C_FormBaseInputCB
|
||||
argument: 0
|
||||
|
||||
--------------------
|
||||
@ -454,7 +454,7 @@ shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: check_border_bottom
|
||||
callback: C_FormBaseDeprecatedInputCB
|
||||
callback: C_FormBaseInputCB
|
||||
argument: 0
|
||||
|
||||
--------------------
|
||||
@ -472,7 +472,7 @@ shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: check_border_left
|
||||
callback: C_FormBaseDeprecatedInputCB
|
||||
callback: C_FormBaseInputCB
|
||||
argument: 0
|
||||
|
||||
--------------------
|
||||
@ -490,7 +490,7 @@ shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: check_border_right
|
||||
callback: C_FormBaseDeprecatedInputCB
|
||||
callback: C_FormBaseInputCB
|
||||
argument: 0
|
||||
|
||||
--------------------
|
||||
@ -526,7 +526,7 @@ shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: radio_align_left
|
||||
callback: C_FormBaseDeprecatedInputCB
|
||||
callback: C_FormBaseInputCB
|
||||
argument: 0
|
||||
value: 1
|
||||
|
||||
@ -545,7 +545,7 @@ shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: radio_align_right
|
||||
callback: C_FormBaseDeprecatedInputCB
|
||||
callback: C_FormBaseInputCB
|
||||
argument: 0
|
||||
|
||||
--------------------
|
||||
@ -563,7 +563,7 @@ shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: radio_align_center
|
||||
callback: C_FormBaseDeprecatedInputCB
|
||||
callback: C_FormBaseInputCB
|
||||
argument: 0
|
||||
|
||||
--------------------
|
||||
@ -617,7 +617,7 @@ shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: radio_valign_top
|
||||
callback: C_FormBaseDeprecatedInputCB
|
||||
callback: C_FormBaseInputCB
|
||||
argument: 0
|
||||
value: 1
|
||||
|
||||
@ -636,7 +636,7 @@ shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: radio_valign_center
|
||||
callback: C_FormBaseDeprecatedInputCB
|
||||
callback: C_FormBaseInputCB
|
||||
argument: 0
|
||||
|
||||
--------------------
|
||||
@ -654,7 +654,7 @@ shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: radio_valign_bottom
|
||||
callback: C_FormBaseDeprecatedInputCB
|
||||
callback: C_FormBaseInputCB
|
||||
argument: 0
|
||||
|
||||
--------------------
|
||||
@ -690,7 +690,7 @@ shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: input_special_alignment
|
||||
callback: C_FormBaseDeprecatedInputCB
|
||||
callback: C_FormBaseInputCB
|
||||
argument: 0
|
||||
|
||||
--------------------
|
||||
@ -708,7 +708,7 @@ shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: choice_value_column_width
|
||||
callback: C_FormBaseDeprecatedInputCB
|
||||
callback: C_FormBaseInputCB
|
||||
argument: 0
|
||||
|
||||
--------------------
|
||||
@ -858,7 +858,7 @@ shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: check_border_top
|
||||
callback: C_FormBaseDeprecatedInputCB
|
||||
callback: C_FormBaseInputCB
|
||||
argument: 0
|
||||
|
||||
--------------------
|
||||
@ -876,7 +876,7 @@ shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: check_border_bottom
|
||||
callback: C_FormBaseDeprecatedInputCB
|
||||
callback: C_FormBaseInputCB
|
||||
argument: 0
|
||||
|
||||
--------------------
|
||||
@ -894,7 +894,7 @@ shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: check_border_left
|
||||
callback: C_FormBaseDeprecatedInputCB
|
||||
callback: C_FormBaseInputCB
|
||||
argument: 0
|
||||
|
||||
--------------------
|
||||
@ -912,7 +912,7 @@ shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: check_border_right
|
||||
callback: C_FormBaseDeprecatedInputCB
|
||||
callback: C_FormBaseInputCB
|
||||
argument: 0
|
||||
|
||||
--------------------
|
||||
@ -948,7 +948,7 @@ shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: radio_align_left
|
||||
callback: C_FormBaseDeprecatedInputCB
|
||||
callback: C_FormBaseInputCB
|
||||
argument: 0
|
||||
value: 1
|
||||
|
||||
@ -967,7 +967,7 @@ shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: radio_align_right
|
||||
callback: C_FormBaseDeprecatedInputCB
|
||||
callback: C_FormBaseInputCB
|
||||
argument: 0
|
||||
|
||||
--------------------
|
||||
@ -985,7 +985,7 @@ shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: radio_align_center
|
||||
callback: C_FormBaseDeprecatedInputCB
|
||||
callback: C_FormBaseInputCB
|
||||
argument: 0
|
||||
|
||||
--------------------
|
||||
@ -1039,7 +1039,7 @@ shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: radio_valign_top
|
||||
callback: C_FormBaseDeprecatedInputCB
|
||||
callback: C_FormBaseInputCB
|
||||
argument: 0
|
||||
value: 1
|
||||
|
||||
@ -1058,7 +1058,7 @@ shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: radio_valign_center
|
||||
callback: C_FormBaseDeprecatedInputCB
|
||||
callback: C_FormBaseInputCB
|
||||
argument: 0
|
||||
|
||||
--------------------
|
||||
@ -1076,7 +1076,7 @@ shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: radio_valign_bottom
|
||||
callback: C_FormBaseDeprecatedInputCB
|
||||
callback: C_FormBaseInputCB
|
||||
argument: 0
|
||||
|
||||
--------------------
|
||||
@ -1112,7 +1112,7 @@ shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: input_mcolumn_width
|
||||
callback: C_FormBaseDeprecatedInputCB
|
||||
callback: C_FormBaseInputCB
|
||||
argument: 0
|
||||
|
||||
--------------------
|
||||
@ -1130,7 +1130,7 @@ shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: input_special_multialign
|
||||
callback: C_FormBaseDeprecatedInputCB
|
||||
callback: C_FormBaseInputCB
|
||||
argument: 0
|
||||
|
||||
--------------------
|
||||
@ -1148,7 +1148,7 @@ shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: check_multicolumn
|
||||
callback: C_FormBaseDeprecatedInputCB
|
||||
callback: C_FormBaseInputCB
|
||||
argument: 0
|
||||
|
||||
--------------------
|
||||
@ -1166,7 +1166,7 @@ shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: check_useminipage
|
||||
callback: C_FormBaseDeprecatedInputCB
|
||||
callback: C_FormBaseInputCB
|
||||
argument: 0
|
||||
|
||||
--------------------
|
||||
@ -1184,7 +1184,7 @@ shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: check_rotate_cell
|
||||
callback: C_FormBaseDeprecatedInputCB
|
||||
callback: C_FormBaseInputCB
|
||||
argument: 0
|
||||
|
||||
--------------------
|
||||
@ -1202,7 +1202,7 @@ shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: choice_value_mcolumn_width
|
||||
callback: C_FormBaseDeprecatedInputCB
|
||||
callback: C_FormBaseInputCB
|
||||
argument: 0
|
||||
|
||||
--------------------
|
||||
@ -1352,7 +1352,7 @@ shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: check_lt_firsthead
|
||||
callback: C_FormBaseDeprecatedInputCB
|
||||
callback: C_FormBaseInputCB
|
||||
argument: 0
|
||||
|
||||
--------------------
|
||||
@ -1370,7 +1370,7 @@ shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: check_lt_head
|
||||
callback: C_FormBaseDeprecatedInputCB
|
||||
callback: C_FormBaseInputCB
|
||||
argument: 0
|
||||
|
||||
--------------------
|
||||
@ -1388,7 +1388,7 @@ shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: check_lt_foot
|
||||
callback: C_FormBaseDeprecatedInputCB
|
||||
callback: C_FormBaseInputCB
|
||||
argument: 0
|
||||
|
||||
--------------------
|
||||
@ -1406,7 +1406,7 @@ shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: check_lt_lastfoot
|
||||
callback: C_FormBaseDeprecatedInputCB
|
||||
callback: C_FormBaseInputCB
|
||||
argument: 0
|
||||
|
||||
--------------------
|
||||
@ -1424,7 +1424,7 @@ shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: check_lt_newpage
|
||||
callback: C_FormBaseDeprecatedInputCB
|
||||
callback: C_FormBaseInputCB
|
||||
argument: 0
|
||||
|
||||
--------------------
|
||||
@ -1442,7 +1442,7 @@ shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: check_head_2border_above
|
||||
callback: C_FormBaseDeprecatedInputCB
|
||||
callback: C_FormBaseInputCB
|
||||
argument: 0
|
||||
|
||||
--------------------
|
||||
@ -1460,7 +1460,7 @@ shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: check_head_2border_below
|
||||
callback: C_FormBaseDeprecatedInputCB
|
||||
callback: C_FormBaseInputCB
|
||||
argument: 0
|
||||
|
||||
--------------------
|
||||
@ -1550,7 +1550,7 @@ shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: check_1head_2border_above
|
||||
callback: C_FormBaseDeprecatedInputCB
|
||||
callback: C_FormBaseInputCB
|
||||
argument: 0
|
||||
|
||||
--------------------
|
||||
@ -1568,7 +1568,7 @@ shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: check_foot_2border_above
|
||||
callback: C_FormBaseDeprecatedInputCB
|
||||
callback: C_FormBaseInputCB
|
||||
argument: 0
|
||||
|
||||
--------------------
|
||||
@ -1586,7 +1586,7 @@ shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: check_lastfoot_2border_above
|
||||
callback: C_FormBaseDeprecatedInputCB
|
||||
callback: C_FormBaseInputCB
|
||||
argument: 0
|
||||
|
||||
--------------------
|
||||
@ -1604,7 +1604,7 @@ shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: check_1head_2border_below
|
||||
callback: C_FormBaseDeprecatedInputCB
|
||||
callback: C_FormBaseInputCB
|
||||
argument: 0
|
||||
|
||||
--------------------
|
||||
@ -1622,7 +1622,7 @@ shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: check_foot_2border_below
|
||||
callback: C_FormBaseDeprecatedInputCB
|
||||
callback: C_FormBaseInputCB
|
||||
argument: 0
|
||||
|
||||
--------------------
|
||||
@ -1640,7 +1640,7 @@ shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: check_lastfoot_2border_below
|
||||
callback: C_FormBaseDeprecatedInputCB
|
||||
callback: C_FormBaseInputCB
|
||||
argument: 0
|
||||
|
||||
--------------------
|
||||
@ -1658,7 +1658,7 @@ shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: check_1head_empty
|
||||
callback: C_FormBaseDeprecatedInputCB
|
||||
callback: C_FormBaseInputCB
|
||||
argument: 0
|
||||
|
||||
--------------------
|
||||
@ -1676,7 +1676,7 @@ shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: check_lastfoot_empty
|
||||
callback: C_FormBaseDeprecatedInputCB
|
||||
callback: C_FormBaseInputCB
|
||||
argument: 0
|
||||
|
||||
--------------------
|
||||
|
Loading…
Reference in New Issue
Block a user