mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-06 00:10:59 +00:00
Prepare the way for resizable tabfolders if the xforms version is
up to the task. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@6749 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
46d403a3c8
commit
e93988314d
@ -1,3 +1,13 @@
|
||||
2003-04-09 Angus Leeming <leeming@lyx.org>
|
||||
|
||||
* FormAboutlyx.C:
|
||||
* FormDocument.C:
|
||||
* FormGraphics.C:
|
||||
* FormPreferences.C:
|
||||
* FormTabular.C:
|
||||
* forms/form_preferences.fd: prepare the way for resizable
|
||||
tabfolders if the xforms version is up to the task.
|
||||
|
||||
2003-04-09 John Levon <levon@movementarian.org>
|
||||
|
||||
* Toolbar_pimpl.C:
|
||||
|
@ -23,11 +23,21 @@
|
||||
|
||||
#include FORMS_H_LOCATION
|
||||
|
||||
namespace {
|
||||
|
||||
#if FL_VERSION == 0 || (FL_REVISION == 0 && FL_FIXLEVEL < 2)
|
||||
bool const scalableTabfolders = false;
|
||||
#else
|
||||
bool const scalableTabfolders = true;
|
||||
#endif
|
||||
|
||||
} // namespace anon
|
||||
|
||||
|
||||
typedef FormController<ControlAboutlyx, FormView<FD_aboutlyx> > base_class;
|
||||
|
||||
FormAboutlyx::FormAboutlyx(Dialog & parent)
|
||||
: base_class(parent, _("About LyX"), false)
|
||||
: base_class(parent, _("About LyX"), scalableTabfolders)
|
||||
{}
|
||||
|
||||
|
||||
@ -63,7 +73,11 @@ void FormAboutlyx::build()
|
||||
|
||||
fl_add_browser_line(license_->browser_license, cs.str().c_str());
|
||||
|
||||
// stack tabs
|
||||
// Enable the tabfolder to be rescaled correctly.
|
||||
if (scalableTabfolders)
|
||||
fl_set_tabfolder_autofit(dialog_->tabfolder, FL_FIT);
|
||||
|
||||
// Stack tabs
|
||||
fl_addto_tabfolder(dialog_->tabfolder, _("Version"),
|
||||
version_->form);
|
||||
fl_addto_tabfolder(dialog_->tabfolder, _("Credits"),
|
||||
@ -71,9 +85,6 @@ void FormAboutlyx::build()
|
||||
fl_addto_tabfolder(dialog_->tabfolder, _("License"),
|
||||
license_->form);
|
||||
|
||||
// work-around xforms bug re update of folder->x, folder->y coords.
|
||||
setPrehandler(dialog_->tabfolder);
|
||||
|
||||
// Manage the cancel/close button
|
||||
bcview().setCancel(dialog_->button_close);
|
||||
}
|
||||
|
@ -48,10 +48,21 @@ using std::bind2nd;
|
||||
using std::vector;
|
||||
|
||||
|
||||
namespace {
|
||||
|
||||
#if FL_VERSION == 0 || (FL_REVISION == 0 && FL_FIXLEVEL < 2)
|
||||
bool const scalableTabfolders = false;
|
||||
#else
|
||||
bool const scalableTabfolders = true;
|
||||
#endif
|
||||
|
||||
} // namespace anon
|
||||
|
||||
|
||||
typedef FormCB<ControlDocument, FormDB<FD_document> > base_class;
|
||||
|
||||
FormDocument::FormDocument()
|
||||
: base_class(_("Document Layout"), false),
|
||||
: base_class(_("Document Layout"), scalableTabfolders),
|
||||
ActCell(0), Confirmed(0),
|
||||
current_bullet_panel(0), current_bullet_depth(0), fbullet(0)
|
||||
{}
|
||||
@ -322,6 +333,11 @@ void FormDocument::build()
|
||||
fl_set_bmtable_pixmap_file(bullets_->bmtable_panel, 6, 6,
|
||||
bmtablefile.c_str());
|
||||
|
||||
// Enable the tabfolder to be rescaled correctly.
|
||||
if (scalableTabfolders)
|
||||
fl_set_tabfolder_autofit(dialog_->tabfolder, FL_FIT);
|
||||
|
||||
// Stack tabs
|
||||
fl_addto_tabfolder(dialog_->tabfolder,_("Document"),
|
||||
class_->form);
|
||||
fl_addto_tabfolder(dialog_->tabfolder,_("Paper"),
|
||||
@ -333,9 +349,6 @@ void FormDocument::build()
|
||||
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 "
|
||||
|
@ -52,13 +52,19 @@ int const FILENAME_MAXCHARS = 1024;
|
||||
|
||||
string defaultUnit("cm");
|
||||
|
||||
#if FL_VERSION == 0 || (FL_REVISION == 0 && FL_FIXLEVEL < 2)
|
||||
bool const scalableTabfolders = false;
|
||||
#else
|
||||
bool const scalableTabfolders = true;
|
||||
#endif
|
||||
|
||||
} // namespace anon
|
||||
|
||||
|
||||
typedef FormController<ControlGraphics, FormView<FD_graphics> > base_class;
|
||||
|
||||
FormGraphics::FormGraphics(Dialog & parent)
|
||||
: base_class(parent, _("Graphics"), false)
|
||||
: base_class(parent, _("Graphics"), scalableTabfolders)
|
||||
{}
|
||||
|
||||
|
||||
@ -257,14 +263,15 @@ void FormGraphics::build()
|
||||
"graphicx-package and not mentioned in the gui's tabfolders.");
|
||||
tooltips().init(extra_->input_special, str);
|
||||
|
||||
// add the different tabfolders
|
||||
// Enable the tabfolder to be rescaled correctly.
|
||||
if (scalableTabfolders)
|
||||
fl_set_tabfolder_autofit(dialog_->tabfolder, FL_FIT);
|
||||
|
||||
// Stack tabs
|
||||
fl_addto_tabfolder(dialog_->tabfolder, _("File"), file_->form);
|
||||
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;
|
||||
|
@ -101,13 +101,20 @@ string const X11hexname(RGBColor const & col)
|
||||
return STRCONV(ostr.str());
|
||||
}
|
||||
|
||||
#if FL_VERSION == 0 || (FL_REVISION == 0 && FL_FIXLEVEL < 2)
|
||||
bool const scalableTabfolders = false;
|
||||
#else
|
||||
bool const scalableTabfolders = true;
|
||||
#endif
|
||||
|
||||
} // namespace anon
|
||||
|
||||
|
||||
typedef FormCB<ControlPrefs, FormDB<FD_preferences> > base_class;
|
||||
|
||||
|
||||
FormPreferences::FormPreferences()
|
||||
: base_class(_("Preferences"), false),
|
||||
: base_class(_("Preferences"), scalableTabfolders),
|
||||
colors_(*this), converters_(*this), inputs_misc_(*this),
|
||||
formats_(*this), interface_(*this), language_(*this),
|
||||
lnf_misc_(*this), identity_(*this), outputs_misc_(*this),
|
||||
@ -196,6 +203,28 @@ void FormPreferences::build()
|
||||
screen_fonts_.build();
|
||||
spelloptions_.build();
|
||||
|
||||
// Enable the tabfolders to be rescaled correctly.
|
||||
if (scalableTabfolders) {
|
||||
FL_OBJECT * folder = dialog_->tabfolder_prefs;
|
||||
fl_set_tabfolder_autofit(folder, FL_FIT);
|
||||
|
||||
folder = look_n_feel_tab_->tabfolder_inner;
|
||||
fl_set_tabfolder_autofit(folder, FL_FIT);
|
||||
|
||||
folder = converters_tab_->tabfolder_inner;
|
||||
fl_set_tabfolder_autofit(folder, FL_FIT);
|
||||
|
||||
folder = inputs_tab_->tabfolder_inner;
|
||||
fl_set_tabfolder_autofit(folder, FL_FIT);
|
||||
|
||||
folder = outputs_tab_->tabfolder_inner;
|
||||
fl_set_tabfolder_autofit(folder, FL_FIT);
|
||||
|
||||
folder = lang_opts_tab_->tabfolder_inner;
|
||||
fl_set_tabfolder_autofit(folder, FL_FIT);
|
||||
}
|
||||
|
||||
// Stack tabs
|
||||
// Now add them to the tabfolder
|
||||
fl_addto_tabfolder(dialog_->tabfolder_prefs,
|
||||
_("Look & Feel"),
|
||||
@ -263,13 +292,6 @@ void FormPreferences::build()
|
||||
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);
|
||||
}
|
||||
|
||||
|
||||
|
@ -35,10 +35,21 @@ using std::vector;
|
||||
using std::bind2nd;
|
||||
|
||||
|
||||
namespace {
|
||||
|
||||
#if FL_VERSION == 0 || (FL_REVISION == 0 && FL_FIXLEVEL < 2)
|
||||
bool const scalableTabfolders = false;
|
||||
#else
|
||||
bool const scalableTabfolders = true;
|
||||
#endif
|
||||
|
||||
} // namespace anon
|
||||
|
||||
|
||||
typedef FormController<ControlTabular, FormView<FD_tabular> > base_class;
|
||||
|
||||
FormTabular::FormTabular(Dialog & parent)
|
||||
: base_class(parent, _("Edit table settings")),
|
||||
: base_class(parent, _("Edit table settings"), scalableTabfolders),
|
||||
closing_(false), actCell_(-1)
|
||||
{
|
||||
}
|
||||
@ -111,6 +122,11 @@ void FormTabular::build()
|
||||
|
||||
longtable_options_.reset(build_tabular_longtable(this));
|
||||
|
||||
// Enable the tabfolder to be rescaled correctly.
|
||||
if (scalableTabfolders)
|
||||
fl_set_tabfolder_autofit(dialog_->tabfolder, FL_FIT);
|
||||
|
||||
// Stack tabs
|
||||
fl_addto_tabfolder(dialog_->tabfolder, _("Tabular"),
|
||||
tabular_options_->form);
|
||||
fl_addto_tabfolder(dialog_->tabfolder, _("Column/Row"),
|
||||
@ -120,9 +136,6 @@ void FormTabular::build()
|
||||
fl_addto_tabfolder(dialog_->tabfolder, _("LongTable"),
|
||||
longtable_options_->form);
|
||||
|
||||
// work-around xforms bug re update of folder->x, folder->y coords.
|
||||
setPrehandler(dialog_->tabfolder);
|
||||
|
||||
// FIXME: addReadOnly everything
|
||||
}
|
||||
|
||||
|
@ -43,7 +43,7 @@ size: FL_NORMAL_SIZE
|
||||
lcol: FL_BLACK
|
||||
label:
|
||||
shortcut:
|
||||
resize: FL_RESIZE_NONE
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: tabfolder_prefs
|
||||
callback:
|
||||
@ -193,7 +193,7 @@ size: FL_DEFAULT_SIZE
|
||||
lcol: FL_BLACK
|
||||
label:
|
||||
shortcut:
|
||||
resize: FL_RESIZE_NONE
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: tabfolder_inner
|
||||
callback:
|
||||
|
@ -33,11 +33,13 @@ using std::pair;
|
||||
using std::vector;
|
||||
using std::make_pair;
|
||||
|
||||
|
||||
bool isActive(FL_OBJECT * ob)
|
||||
{
|
||||
return ob && ob->active > 0;
|
||||
}
|
||||
|
||||
|
||||
std::pair<string, string> parse_shortcut(string const & str)
|
||||
{
|
||||
string::size_type i = str.find_first_of("&");
|
||||
|
Loading…
Reference in New Issue
Block a user