2002-03-11 17:00:41 +00:00
|
|
|
/**
|
2003-03-26 12:43:48 +00:00
|
|
|
* \file xforms/Dialogs.C
|
2002-09-05 15:14:23 +00:00
|
|
|
* This file is part of LyX, the document processor.
|
|
|
|
* Licence details can be found in the file COPYING.
|
2000-11-13 10:35:02 +00:00
|
|
|
*
|
2002-12-01 22:59:25 +00:00
|
|
|
* \author Angus Leeming
|
2002-09-05 14:10:50 +00:00
|
|
|
*
|
|
|
|
* Full author contact details are available in file CREDITS
|
2000-11-13 10:35:02 +00:00
|
|
|
*/
|
|
|
|
|
2000-06-12 11:55:12 +00:00
|
|
|
#include <config.h>
|
2001-03-15 13:37:04 +00:00
|
|
|
|
2003-03-26 12:41:27 +00:00
|
|
|
#include "Dialogs.h"
|
|
|
|
#include "Dialog.h"
|
|
|
|
|
|
|
|
#include "Tooltips.h"
|
|
|
|
|
|
|
|
#include "ControlAboutlyx.h"
|
|
|
|
#include "ControlBibtex.h"
|
|
|
|
#include "ControlChanges.h"
|
|
|
|
#include "ControlCharacter.h"
|
|
|
|
#include "ControlCitation.h"
|
|
|
|
#include "ControlCommand.h"
|
2003-05-13 21:15:48 +00:00
|
|
|
#include "ControlErrorList.h"
|
2003-03-26 12:41:27 +00:00
|
|
|
#include "ControlERT.h"
|
|
|
|
#include "ControlExternal.h"
|
|
|
|
#include "ControlFloat.h"
|
|
|
|
#include "ControlGraphics.h"
|
|
|
|
#include "ControlInclude.h"
|
|
|
|
#include "ControlLog.h"
|
2003-06-17 12:53:35 +00:00
|
|
|
#include "ControlMath.h"
|
2003-03-26 12:41:27 +00:00
|
|
|
#include "ControlMinipage.h"
|
|
|
|
#include "ControlParagraph.h"
|
|
|
|
#include "ControlRef.h"
|
|
|
|
#include "ControlShowFile.h"
|
|
|
|
#include "ControlTabular.h"
|
|
|
|
#include "ControlTabularCreate.h"
|
2003-06-19 17:16:12 +00:00
|
|
|
#include "ControlTexinfo.h"
|
2003-03-26 12:41:27 +00:00
|
|
|
#include "ControlToc.h"
|
|
|
|
#include "ControlVCLog.h"
|
|
|
|
#include "ControlWrap.h"
|
|
|
|
|
|
|
|
#include "FormAboutlyx.h"
|
|
|
|
#include "FormBibitem.h"
|
|
|
|
#include "FormBibtex.h"
|
|
|
|
#include "FormChanges.h"
|
|
|
|
#include "FormCharacter.h"
|
|
|
|
#include "FormCitation.h"
|
2003-05-13 21:15:48 +00:00
|
|
|
#include "FormErrorList.h"
|
2003-03-26 12:41:27 +00:00
|
|
|
#include "FormERT.h"
|
|
|
|
#include "FormExternal.h"
|
|
|
|
#include "FormFloat.h"
|
|
|
|
#include "FormGraphics.h"
|
|
|
|
#include "FormInclude.h"
|
|
|
|
#include "FormLog.h"
|
2003-06-17 12:53:35 +00:00
|
|
|
#include "FormMathsPanel.h"
|
2003-06-17 12:15:58 +00:00
|
|
|
#include "FormMathsBitmap.h"
|
2003-06-17 10:30:38 +00:00
|
|
|
#include "FormMathsDelim.h"
|
|
|
|
#include "FormMathsMatrix.h"
|
|
|
|
#include "FormMathsSpace.h"
|
|
|
|
#include "FormMathsStyle.h"
|
2003-03-26 12:41:27 +00:00
|
|
|
#include "FormMinipage.h"
|
|
|
|
#include "FormParagraph.h"
|
|
|
|
#include "FormRef.h"
|
|
|
|
#include "FormTabular.h"
|
2003-06-19 17:16:12 +00:00
|
|
|
#include "FormTexinfo.h"
|
2003-03-26 12:41:27 +00:00
|
|
|
#include "FormShowFile.h"
|
|
|
|
#include "FormTabularCreate.h"
|
|
|
|
#include "FormText.h"
|
|
|
|
#include "FormToc.h"
|
|
|
|
#include "FormUrl.h"
|
|
|
|
#include "FormVCLog.h"
|
|
|
|
#include "FormWrap.h"
|
|
|
|
|
|
|
|
#ifdef HAVE_LIBAIKSAURUS
|
|
|
|
#include "ControlThesaurus.h"
|
|
|
|
#include "FormThesaurus.h"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include "xformsBC.h"
|
2003-03-10 03:13:28 +00:00
|
|
|
#include "ButtonController.h"
|
2002-08-15 17:48:53 +00:00
|
|
|
|
2003-06-17 12:15:58 +00:00
|
|
|
#include "arrows.xbm"
|
|
|
|
#include "bop.xbm"
|
|
|
|
#include "brel.xbm"
|
|
|
|
#include "deco.xbm"
|
|
|
|
#include "dots.xbm"
|
|
|
|
#include "greek.xbm"
|
|
|
|
#include "misc.xbm"
|
|
|
|
#include "varsz.xbm"
|
|
|
|
|
|
|
|
#include "ams_misc.xbm"
|
|
|
|
#include "ams_arrows.xbm"
|
|
|
|
#include "ams_rel.xbm"
|
|
|
|
#include "ams_nrel.xbm"
|
|
|
|
#include "ams_ops.xbm"
|
|
|
|
|
|
|
|
#include <vector>
|
|
|
|
|
2002-08-15 17:48:53 +00:00
|
|
|
|
2003-03-26 12:41:27 +00:00
|
|
|
namespace {
|
|
|
|
|
2003-06-17 12:15:58 +00:00
|
|
|
FormMathsBitmap * createFormBitmap(Dialog & parent, string const & title,
|
|
|
|
char const * const * data, int size)
|
|
|
|
{
|
|
|
|
char const * const * const end = data + size;
|
|
|
|
return new FormMathsBitmap(parent, title, std::vector<string>(data, end));
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2003-06-19 17:16:12 +00:00
|
|
|
char const * const dialognames[] = { "aboutlyx", "bibitem", "bibtex", "changes",
|
2003-06-17 10:30:38 +00:00
|
|
|
"character", "citation", "error", "errorlist" , "ert", "external", "file",
|
2003-06-19 17:16:12 +00:00
|
|
|
"float", "graphics", "include", "index", "label", "latexlog", "mathpanel",
|
2003-06-17 12:15:58 +00:00
|
|
|
"mathaccents", "matharrows", "mathoperators", "mathrelations", "mathgreek",
|
|
|
|
"mathmisc", "mathdots", "mathbigoperators", "mathamsmisc",
|
|
|
|
"mathamsarrows", "mathamsrelations", "mathamsnegatedrelations", "mathamsoperators",
|
2003-06-17 10:30:38 +00:00
|
|
|
"mathdelimiter", "mathmatrix", "mathspace", "mathstyle",
|
2003-06-19 17:16:12 +00:00
|
|
|
"minipage", "paragraph", "ref", "tabular", "tabularcreate", "texinfo",
|
2003-03-26 12:41:27 +00:00
|
|
|
|
|
|
|
#ifdef HAVE_LIBAIKSAURUS
|
|
|
|
"thesaurus",
|
|
|
|
#endif
|
|
|
|
|
|
|
|
"toc", "url", "vclog", "wrap" };
|
|
|
|
|
|
|
|
char const * const * const end_dialognames =
|
|
|
|
dialognames + (sizeof(dialognames) / sizeof(char *));
|
|
|
|
|
|
|
|
struct cmpCStr {
|
|
|
|
cmpCStr(char const * name) : name_(name) {}
|
|
|
|
bool operator()(char const * other) {
|
|
|
|
return strcmp(other, name_) == 0;
|
|
|
|
}
|
|
|
|
private:
|
|
|
|
char const * name_;
|
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace anon
|
|
|
|
|
|
|
|
|
|
|
|
bool Dialogs::isValidName(string const & name) const
|
2002-08-15 17:48:53 +00:00
|
|
|
{
|
2003-05-14 09:17:22 +00:00
|
|
|
return std::find_if(dialognames, end_dialognames,
|
2003-03-26 12:41:27 +00:00
|
|
|
cmpCStr(name.c_str())) != end_dialognames;
|
2002-08-15 17:48:53 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2003-03-26 12:41:27 +00:00
|
|
|
Dialog * Dialogs::build(string const & name)
|
2002-08-15 17:48:53 +00:00
|
|
|
{
|
2003-03-26 12:41:27 +00:00
|
|
|
if (!isValidName(name))
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
Dialog * dialog = new Dialog(lyxview_, name);
|
|
|
|
dialog->bc().view(new xformsBC(dialog->bc()));
|
|
|
|
|
2003-06-19 17:16:12 +00:00
|
|
|
if (name == "aboutlyx") {
|
2003-03-26 12:41:27 +00:00
|
|
|
dialog->setController(new ControlAboutlyx(*dialog));
|
|
|
|
dialog->setView(new FormAboutlyx(*dialog));
|
|
|
|
dialog->bc().bp(new OkCancelPolicy);
|
|
|
|
} else if (name == "bibitem") {
|
|
|
|
dialog->setController(new ControlCommand(*dialog, name));
|
|
|
|
dialog->setView(new FormBibitem(*dialog));
|
|
|
|
dialog->bc().bp(new OkCancelReadOnlyPolicy);
|
|
|
|
} else if (name == "bibtex") {
|
|
|
|
dialog->setController(new ControlBibtex(*dialog));
|
|
|
|
dialog->setView(new FormBibtex(*dialog));
|
|
|
|
dialog->bc().bp(new NoRepeatedApplyReadOnlyPolicy);
|
|
|
|
} else if (name == "character") {
|
|
|
|
dialog->setController(new ControlCharacter(*dialog));
|
|
|
|
dialog->setView(new FormCharacter(*dialog));
|
|
|
|
dialog->bc().bp(new OkApplyCancelReadOnlyPolicy);
|
|
|
|
} else if (name == "changes") {
|
|
|
|
dialog->setController(new ControlChanges(*dialog));
|
|
|
|
dialog->setView(new FormChanges(*dialog));
|
|
|
|
dialog->bc().bp(new NoRepeatedApplyReadOnlyPolicy);
|
|
|
|
} else if (name == "citation") {
|
|
|
|
dialog->setController(new ControlCitation(*dialog));
|
|
|
|
dialog->setView(new FormCitation(*dialog));
|
|
|
|
dialog->bc().bp(new NoRepeatedApplyReadOnlyPolicy);
|
2003-05-13 21:15:48 +00:00
|
|
|
} else if (name == "errorlist") {
|
|
|
|
dialog->setController(new ControlErrorList(*dialog));
|
|
|
|
dialog->setView(new FormErrorList(*dialog));
|
|
|
|
dialog->bc().bp(new NoRepeatedApplyReadOnlyPolicy);
|
2003-03-26 12:41:27 +00:00
|
|
|
} else if (name == "ert") {
|
|
|
|
dialog->setController(new ControlERT(*dialog));
|
|
|
|
dialog->setView(new FormERT(*dialog));
|
|
|
|
dialog->bc().bp(new NoRepeatedApplyReadOnlyPolicy);
|
|
|
|
} else if (name == "external") {
|
|
|
|
dialog->setController(new ControlExternal(*dialog));
|
|
|
|
dialog->setView(new FormExternal(*dialog));
|
2003-06-04 09:16:29 +00:00
|
|
|
dialog->bc().bp(new NoRepeatedApplyReadOnlyPolicy);
|
2003-03-26 12:41:27 +00:00
|
|
|
} else if (name == "file") {
|
|
|
|
dialog->setController(new ControlShowFile(*dialog));
|
|
|
|
dialog->setView(new FormShowFile(*dialog));
|
|
|
|
dialog->bc().bp(new OkCancelPolicy);
|
|
|
|
} else if (name == "float") {
|
|
|
|
dialog->setController(new ControlFloat(*dialog));
|
|
|
|
dialog->setView(new FormFloat(*dialog));
|
|
|
|
dialog->bc().bp(new NoRepeatedApplyReadOnlyPolicy);
|
|
|
|
} else if (name == "graphics") {
|
|
|
|
dialog->setController(new ControlGraphics(*dialog));
|
|
|
|
dialog->setView(new FormGraphics(*dialog));
|
|
|
|
dialog->bc().bp(new NoRepeatedApplyReadOnlyPolicy);
|
|
|
|
} else if (name == "include") {
|
|
|
|
dialog->setController(new ControlInclude(*dialog));
|
|
|
|
dialog->setView(new FormInclude(*dialog));
|
|
|
|
dialog->bc().bp(new OkApplyCancelReadOnlyPolicy);
|
|
|
|
} else if (name == "index") {
|
|
|
|
dialog->setController(new ControlCommand(*dialog, name));
|
|
|
|
dialog->setView(new FormText(*dialog,
|
|
|
|
_("Index"), _("Keyword:|#K")));
|
|
|
|
dialog->bc().bp(new NoRepeatedApplyReadOnlyPolicy);
|
|
|
|
} else if (name == "label") {
|
|
|
|
dialog->setController(new ControlCommand(*dialog, name));
|
|
|
|
dialog->setView(new FormText(*dialog,
|
|
|
|
_("Label"), _("Label:|#L")));
|
|
|
|
dialog->bc().bp(new NoRepeatedApplyReadOnlyPolicy);
|
2003-06-19 17:16:12 +00:00
|
|
|
} else if (name == "latexlog") {
|
2003-03-26 12:41:27 +00:00
|
|
|
dialog->setController(new ControlLog(*dialog));
|
|
|
|
dialog->setView(new FormLog(*dialog));
|
|
|
|
dialog->bc().bp(new OkCancelPolicy);
|
2003-06-17 12:15:58 +00:00
|
|
|
|
2003-06-17 13:16:25 +00:00
|
|
|
} else if (name == "mathpanel") {
|
2003-06-17 12:53:35 +00:00
|
|
|
dialog->setController(new ControlMath(*dialog));
|
|
|
|
dialog->setView(new FormMathsPanel(*dialog));
|
|
|
|
dialog->bc().bp(new IgnorantPolicy);
|
|
|
|
|
2003-06-17 12:15:58 +00:00
|
|
|
} else if (name == "mathaccents") {
|
|
|
|
FormMathsBitmap * bitmap =
|
|
|
|
createFormBitmap(*dialog, _("Maths Decorations & Accents"),
|
|
|
|
latex_deco, nr_latex_deco);
|
|
|
|
bitmap->addBitmap(
|
|
|
|
BitmapStore(12, 3, 4, deco1_width, deco1_height, deco1_bits, true));
|
|
|
|
bitmap->addBitmap(
|
|
|
|
BitmapStore(10, 4, 3, deco2_width, deco2_height, deco2_bits, true));
|
|
|
|
|
2003-06-17 12:53:35 +00:00
|
|
|
dialog->setController(new ControlMath(*dialog));
|
2003-06-17 12:15:58 +00:00
|
|
|
dialog->setView(bitmap);
|
|
|
|
dialog->bc().bp(new IgnorantPolicy);
|
|
|
|
|
|
|
|
} else if (name == "matharrows") {
|
|
|
|
FormMathsBitmap * bitmap =
|
|
|
|
createFormBitmap(*dialog, _("Arrows"), latex_arrow, nr_latex_arrow);
|
|
|
|
bitmap->addBitmap(
|
|
|
|
BitmapStore(20, 5, 4, arrow_width, arrow_height, arrow_bits, true));
|
|
|
|
bitmap->addBitmap(
|
|
|
|
BitmapStore(7, 2, 4, larrow_width, larrow_height, larrow_bits, false));
|
|
|
|
bitmap->addBitmap(
|
|
|
|
BitmapStore(4, 2, 2, darrow_width, darrow_height, darrow_bits, true));
|
|
|
|
|
2003-06-17 12:53:35 +00:00
|
|
|
dialog->setController(new ControlMath(*dialog));
|
2003-06-17 12:15:58 +00:00
|
|
|
dialog->setView(bitmap);
|
|
|
|
dialog->bc().bp(new IgnorantPolicy);
|
|
|
|
|
|
|
|
} else if (name == "mathoperators") {
|
|
|
|
FormMathsBitmap * bitmap =
|
|
|
|
createFormBitmap(*dialog, _("Binary Ops"),
|
|
|
|
latex_bop, nr_latex_bop);
|
|
|
|
bitmap->addBitmap(
|
|
|
|
BitmapStore(31, 4, 8, bop_width, bop_height, bop_bits, true));
|
|
|
|
|
2003-06-17 12:53:35 +00:00
|
|
|
dialog->setController(new ControlMath(*dialog));
|
2003-06-17 12:15:58 +00:00
|
|
|
dialog->setView(bitmap);
|
|
|
|
dialog->bc().bp(new IgnorantPolicy);
|
|
|
|
|
|
|
|
} else if (name == "mathrelations") {
|
|
|
|
FormMathsBitmap * bitmap =
|
|
|
|
createFormBitmap(*dialog, _("Binary Relations"),
|
|
|
|
latex_brel, nr_latex_brel);
|
|
|
|
bitmap->addBitmap(
|
|
|
|
BitmapStore(35, 4, 9, brel_width, brel_height, brel_bits, true));
|
|
|
|
|
2003-06-17 12:53:35 +00:00
|
|
|
dialog->setController(new ControlMath(*dialog));
|
2003-06-17 12:15:58 +00:00
|
|
|
dialog->setView(bitmap);
|
|
|
|
dialog->bc().bp(new IgnorantPolicy);
|
|
|
|
|
|
|
|
} else if (name == "mathgreek") {
|
|
|
|
FormMathsBitmap * bitmap =
|
|
|
|
createFormBitmap(*dialog, _("Greek"),
|
|
|
|
latex_greek, nr_latex_greek);
|
|
|
|
bitmap->addBitmap(
|
|
|
|
BitmapStore(11, 6, 2, Greek_width, Greek_height, Greek_bits, true));
|
|
|
|
bitmap->addBitmap(
|
|
|
|
BitmapStore(28, 7, 4, greek_width, greek_height, greek_bits, true));
|
|
|
|
|
2003-06-17 12:53:35 +00:00
|
|
|
dialog->setController(new ControlMath(*dialog));
|
2003-06-17 12:15:58 +00:00
|
|
|
dialog->setView(bitmap);
|
|
|
|
dialog->bc().bp(new IgnorantPolicy);
|
|
|
|
|
|
|
|
} else if (name == "mathmisc") {
|
|
|
|
FormMathsBitmap * bitmap =
|
|
|
|
createFormBitmap(*dialog, _("Misc"),
|
|
|
|
latex_misc, nr_latex_misc);
|
|
|
|
bitmap->addBitmap(
|
|
|
|
BitmapStore(29, 5, 6, misc_width, misc_height, misc_bits, true));
|
|
|
|
bitmap->addBitmap(
|
|
|
|
BitmapStore(5, 5, 1, misc4_width, misc4_height, misc4_bits, true));
|
|
|
|
bitmap->addBitmap(
|
|
|
|
BitmapStore(6, 3, 2, misc2_width, misc2_height, misc2_bits, false));
|
|
|
|
bitmap->addBitmap(
|
|
|
|
BitmapStore(4, 2, 2, misc3_width, misc3_height, misc3_bits, true));
|
|
|
|
|
2003-06-17 12:53:35 +00:00
|
|
|
dialog->setController(new ControlMath(*dialog));
|
2003-06-17 12:15:58 +00:00
|
|
|
dialog->setView(bitmap);
|
|
|
|
dialog->bc().bp(new IgnorantPolicy);
|
|
|
|
|
|
|
|
} else if (name == "mathdots") {
|
|
|
|
FormMathsBitmap * bitmap =
|
|
|
|
createFormBitmap(*dialog, _("Dots"),
|
|
|
|
latex_dots, nr_latex_dots);
|
|
|
|
bitmap->addBitmap(
|
|
|
|
BitmapStore(4, 4, 1, dots_width, dots_height, dots_bits, true));
|
|
|
|
|
2003-06-17 12:53:35 +00:00
|
|
|
dialog->setController(new ControlMath(*dialog));
|
2003-06-17 12:15:58 +00:00
|
|
|
dialog->setView(bitmap);
|
|
|
|
dialog->bc().bp(new IgnorantPolicy);
|
|
|
|
|
|
|
|
} else if (name == "mathbigoperators") {
|
|
|
|
FormMathsBitmap * bitmap =
|
|
|
|
createFormBitmap(*dialog, _("Big Operators"),
|
|
|
|
latex_varsz, nr_latex_varsz);
|
|
|
|
bitmap->addBitmap(
|
|
|
|
BitmapStore(14, 3, 5, varsz_width, varsz_height, varsz_bits, true));
|
|
|
|
|
2003-06-17 12:53:35 +00:00
|
|
|
dialog->setController(new ControlMath(*dialog));
|
2003-06-17 12:15:58 +00:00
|
|
|
dialog->setView(bitmap);
|
|
|
|
dialog->bc().bp(new IgnorantPolicy);
|
|
|
|
|
|
|
|
} else if (name == "mathamsmisc") {
|
|
|
|
FormMathsBitmap * bitmap =
|
|
|
|
createFormBitmap(*dialog, _("AMS Misc"),
|
|
|
|
latex_ams_misc, nr_latex_ams_misc);
|
|
|
|
bitmap->addBitmap(
|
|
|
|
BitmapStore(9, 5, 2, ams1_width, ams1_height, ams1_bits, true));
|
|
|
|
bitmap->addBitmap(
|
|
|
|
BitmapStore(26, 3, 9, ams7_width, ams7_height, ams7_bits, true));
|
|
|
|
|
2003-06-17 12:53:35 +00:00
|
|
|
dialog->setController(new ControlMath(*dialog));
|
2003-06-17 12:15:58 +00:00
|
|
|
dialog->setView(bitmap);
|
|
|
|
dialog->bc().bp(new IgnorantPolicy);
|
|
|
|
|
|
|
|
} else if (name == "mathamsarrows") {
|
|
|
|
FormMathsBitmap * bitmap =
|
|
|
|
createFormBitmap(*dialog, _("AMS Arrows"),
|
|
|
|
latex_ams_arrows, nr_latex_ams_arrows);
|
|
|
|
bitmap->addBitmap(
|
|
|
|
BitmapStore(32, 3, 11, ams2_width, ams2_height, ams2_bits, true));
|
|
|
|
bitmap->addBitmap(
|
|
|
|
BitmapStore(6, 3, 2, ams3_width, ams3_height, ams3_bits, true));
|
|
|
|
|
2003-06-17 12:53:35 +00:00
|
|
|
dialog->setController(new ControlMath(*dialog));
|
2003-06-17 12:15:58 +00:00
|
|
|
dialog->setView(bitmap);
|
|
|
|
dialog->bc().bp(new IgnorantPolicy);
|
|
|
|
|
|
|
|
} else if (name == "mathamsrelations") {
|
|
|
|
FormMathsBitmap * bitmap =
|
|
|
|
createFormBitmap(*dialog, _("AMS Relations"),
|
|
|
|
latex_ams_rel, nr_latex_ams_rel);
|
|
|
|
bitmap->addBitmap(
|
|
|
|
BitmapStore(66, 6, 11, ams_rel_width, ams_rel_height, ams_rel_bits, true));
|
|
|
|
|
2003-06-17 12:53:35 +00:00
|
|
|
dialog->setController(new ControlMath(*dialog));
|
2003-06-17 12:15:58 +00:00
|
|
|
dialog->setView(bitmap);
|
|
|
|
dialog->bc().bp(new IgnorantPolicy);
|
|
|
|
|
|
|
|
} else if (name == "mathamsnegatedrelations") {
|
|
|
|
FormMathsBitmap * bitmap =
|
|
|
|
createFormBitmap(*dialog, _("AMS Negated Rel"),
|
|
|
|
latex_ams_nrel, nr_latex_ams_nrel);
|
|
|
|
bitmap->addBitmap(
|
|
|
|
BitmapStore(51, 6, 9, ams_nrel_width, ams_nrel_height, ams_nrel_bits, true));
|
|
|
|
|
2003-06-17 12:53:35 +00:00
|
|
|
dialog->setController(new ControlMath(*dialog));
|
2003-06-17 12:15:58 +00:00
|
|
|
dialog->setView(bitmap);
|
|
|
|
dialog->bc().bp(new IgnorantPolicy);
|
|
|
|
|
|
|
|
} else if (name == "mathamsoperators") {
|
|
|
|
FormMathsBitmap * bitmap =
|
|
|
|
createFormBitmap(*dialog, _("AMS Operators"),
|
|
|
|
latex_ams_ops, nr_latex_ams_ops);
|
|
|
|
bitmap->addBitmap(
|
|
|
|
BitmapStore(23, 3, 8, ams_ops_width, ams_ops_height, ams_ops_bits, true));
|
|
|
|
|
2003-06-17 12:53:35 +00:00
|
|
|
dialog->setController(new ControlMath(*dialog));
|
2003-06-17 12:15:58 +00:00
|
|
|
dialog->setView(bitmap);
|
|
|
|
dialog->bc().bp(new IgnorantPolicy);
|
|
|
|
|
2003-06-17 10:30:38 +00:00
|
|
|
} else if (name == "mathdelimiter") {
|
2003-06-17 12:53:35 +00:00
|
|
|
dialog->setController(new ControlMath(*dialog));
|
2003-06-17 10:30:38 +00:00
|
|
|
dialog->setView(new FormMathsDelim(*dialog));
|
|
|
|
dialog->bc().bp(new OkApplyCancelReadOnlyPolicy);
|
|
|
|
} else if (name == "mathmatrix") {
|
2003-06-17 12:53:35 +00:00
|
|
|
dialog->setController(new ControlMath(*dialog));
|
2003-06-17 10:30:38 +00:00
|
|
|
dialog->setView(new FormMathsMatrix(*dialog));
|
|
|
|
dialog->bc().bp(new OkApplyCancelReadOnlyPolicy);
|
|
|
|
} else if (name == "mathspace") {
|
2003-06-17 12:53:35 +00:00
|
|
|
dialog->setController(new ControlMath(*dialog));
|
2003-06-17 10:30:38 +00:00
|
|
|
dialog->setView(new FormMathsSpace(*dialog));
|
|
|
|
dialog->bc().bp(new IgnorantPolicy);
|
|
|
|
} else if (name == "mathstyle") {
|
2003-06-17 12:53:35 +00:00
|
|
|
dialog->setController(new ControlMath(*dialog));
|
2003-06-17 10:30:38 +00:00
|
|
|
dialog->setView(new FormMathsStyle(*dialog));
|
|
|
|
dialog->bc().bp(new IgnorantPolicy);
|
2003-03-26 12:41:27 +00:00
|
|
|
} else if (name == "minipage") {
|
|
|
|
dialog->setController(new ControlMinipage(*dialog));
|
|
|
|
dialog->setView(new FormMinipage(*dialog));
|
|
|
|
dialog->bc().bp(new NoRepeatedApplyReadOnlyPolicy);
|
|
|
|
} else if (name == "paragraph") {
|
|
|
|
dialog->setController(new ControlParagraph(*dialog));
|
|
|
|
dialog->setView(new FormParagraph(*dialog));
|
|
|
|
dialog->bc().bp(new OkApplyCancelReadOnlyPolicy);
|
|
|
|
} else if (name == "ref") {
|
|
|
|
dialog->setController(new ControlRef(*dialog));
|
|
|
|
dialog->setView(new FormRef(*dialog));
|
|
|
|
dialog->bc().bp(new NoRepeatedApplyReadOnlyPolicy);
|
|
|
|
} else if (name == "tabular") {
|
|
|
|
dialog->setController(new ControlTabular(*dialog));
|
|
|
|
dialog->setView(new FormTabular(*dialog));
|
|
|
|
dialog->bc().bp(new NoRepeatedApplyReadOnlyPolicy);
|
|
|
|
} else if (name == "tabularcreate") {
|
|
|
|
dialog->setController(new ControlTabularCreate(*dialog));
|
|
|
|
dialog->setView(new FormTabularCreate(*dialog));
|
|
|
|
dialog->bc().bp(new IgnorantPolicy);
|
2003-06-19 17:16:12 +00:00
|
|
|
} else if (name == "texinfo") {
|
|
|
|
dialog->setController(new ControlTexinfo(*dialog));
|
|
|
|
dialog->setView(new FormTexinfo(*dialog));
|
|
|
|
dialog->bc().bp(new OkCancelPolicy);
|
2003-03-26 12:41:27 +00:00
|
|
|
#ifdef HAVE_LIBAIKSAURUS
|
|
|
|
} else if (name == "thesaurus") {
|
|
|
|
dialog->setController(new ControlThesaurus(*dialog));
|
|
|
|
dialog->setView(new FormThesaurus(*dialog));
|
|
|
|
dialog->bc().bp(new OkApplyCancelReadOnlyPolicy);
|
|
|
|
#endif
|
|
|
|
} else if (name == "toc") {
|
|
|
|
dialog->setController(new ControlToc(*dialog));
|
|
|
|
dialog->setView(new FormToc(*dialog));
|
|
|
|
dialog->bc().bp(new OkCancelPolicy);
|
|
|
|
} else if (name == "url") {
|
|
|
|
dialog->setController(new ControlCommand(*dialog, name));
|
|
|
|
dialog->setView(new FormUrl(*dialog));
|
|
|
|
dialog->bc().bp(new NoRepeatedApplyReadOnlyPolicy);
|
|
|
|
} else if (name == "vclog") {
|
|
|
|
dialog->setController(new ControlVCLog(*dialog));
|
|
|
|
dialog->setView(new FormVCLog(*dialog));
|
|
|
|
dialog->bc().bp(new OkCancelPolicy);
|
|
|
|
} else if (name == "wrap") {
|
|
|
|
dialog->setController(new ControlWrap(*dialog));
|
|
|
|
dialog->setView(new FormWrap(*dialog));
|
|
|
|
dialog->bc().bp(new NoRepeatedApplyReadOnlyPolicy);
|
|
|
|
}
|
|
|
|
|
|
|
|
return dialog;
|
2002-08-15 17:48:53 +00:00
|
|
|
}
|
2002-08-16 20:07:39 +00:00
|
|
|
|
|
|
|
|
2003-03-26 12:41:27 +00:00
|
|
|
void Dialogs::toggleTooltips()
|
|
|
|
{
|
|
|
|
Tooltips::toggleEnabled();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// Are the tooltips on or off?
|
|
|
|
bool Dialogs::tooltipsEnabled()
|
|
|
|
{
|
|
|
|
return Tooltips::enabled();
|
|
|
|
}
|