]> git.lyx.org Git - lyx.git/blob - src/frontends/gtk/Dialogs.C
fix math fonts with LyX/Mac
[lyx.git] / src / frontends / gtk / Dialogs.C
1 /**
2  * \file xforms/Dialogs.C
3  * This file is part of LyX, the document processor.
4  * Licence details can be found in the file COPYING.
5  *
6  * \author Angus Leeming
7  *
8  * Full author contact details are available in file CREDITS.
9  */
10
11 #include <config.h>
12
13 #include "Dialogs.h"
14 #include "Dialog.h"
15
16 #include "Tooltips.h"
17
18 #include "ControlAboutlyx.h"
19 #include "ControlBibtex.h"
20 #include "ControlBox.h"
21 #include "ControlBranch.h"
22 #include "ControlChanges.h"
23 #include "ControlCharacter.h"
24 #include "ControlCitation.h"
25 #include "ControlCommand.h"
26 #include "ControlDocument.h"
27 #include "ControlErrorList.h"
28 #include "ControlERT.h"
29 #include "ControlExternal.h"
30 #include "ControlFloat.h"
31 #include "ControlGraphics.h"
32 #include "ControlInclude.h"
33 #include "ControlLog.h"
34 #include "ControlMath.h"
35 #include "ControlNote.h"
36 #include "ControlParagraph.h"
37 #include "ControlPreamble.h"
38 #include "ControlPrefs.h"
39 #include "ControlPrint.h"
40 #include "ControlRef.h"
41 #include "ControlSearch.h"
42 #include "ControlSendto.h"
43 #include "ControlShowFile.h"
44 #include "ControlSpellchecker.h"
45 #include "ControlTabular.h"
46 #include "ControlTabularCreate.h"
47 #include "ControlTexinfo.h"
48 #include "ControlToc.h"
49 #include "ControlVSpace.h"
50 #include "ControlWrap.h"
51
52 #include "GAboutlyx.h"
53 #include "GText.h"
54 #include "GMathDelim.h"
55 #include "FormBibitem.h"
56 #include "FormBibtex.h"
57 #include "FormBox.h"
58 #include "FormBranch.h"
59 #include "GChanges.h"
60 #include "GCharacter.h"
61 #include "FormCitation.h"
62 #include "FormDocument.h"
63 #include "GErrorList.h"
64 #include "FormERT.h"
65 #include "FormExternal.h"
66 #include "FormFloat.h"
67 #include "FormGraphics.h"
68 #include "FormInclude.h"
69 #include "GLog.h"
70 #include "GMathPanel.h"
71 #include "FormMathsBitmap.h"
72 #include "GMathsMatrix.h"
73 #include "FormMathsSpace.h"
74 #include "FormMathsStyle.h"
75 #include "FormNote.h"
76 #include "GParagraph.h"
77 #include "FormPreamble.h"
78 #include "FormPreferences.h"
79 #include "GPrint.h"
80 #include "FormRef.h"
81 #include "GSearch.h"
82 #include "FormSendto.h"
83 #include "FormTabular.h"
84 #include "GTexinfo.h"
85 #include "GShowFile.h"
86 #include "GSpellchecker.h"
87 #include "GTableCreate.h"
88 #include "GToc.h"
89 #include "GUrl.h"
90 #include "FormVSpace.h"
91 #include "FormWrap.h"
92
93 #ifdef HAVE_LIBAIKSAURUS
94 #include "ControlThesaurus.h"
95 #include "FormThesaurus.h"
96 #endif
97
98 #include "xformsBC.h"
99 #include "ButtonController.h"
100
101 #include "arrows.xbm"
102 #include "bop.xbm"
103 #include "brel.xbm"
104 #include "deco.xbm"
105 #include "dots.xbm"
106 #include "greek.xbm"
107 #include "misc.xbm"
108 #include "varsz.xbm"
109
110 #include "ams_misc.xbm"
111 #include "ams_arrows.xbm"
112 #include "ams_rel.xbm"
113 #include "ams_nrel.xbm"
114 #include "ams_ops.xbm"
115
116 #include <boost/assert.hpp>
117 #include <vector>
118
119 using std::string;
120
121 using namespace lyx::frontend;
122
123 namespace {
124
125 FormMathsBitmap * createFormBitmap(Dialog & parent, string const & title,
126                                    char const * const * data, int size)
127 {
128         char const * const * const end = data + size;
129         return new FormMathsBitmap(parent, title, std::vector<string>(data, end));
130 }
131
132
133 char const * const dialognames[] = {
134 "aboutlyx", "bibitem", "bibtex", "box", "branch", "changes", "character",
135 "citation", "document", "errorlist" , "ert", "external", "file",
136 "findreplace", "float", "graphics", "include", "index", "label", "log",
137 "mathpanel", "mathaccents", "matharrows", "mathoperators", "mathrelations",
138 "mathgreek", "mathmisc", "mathdots", "mathbigoperators", "mathamsmisc",
139 "mathamsarrows", "mathamsrelations", "mathamsnegatedrelations",
140 "mathamsoperators", "mathdelimiter", "mathmatrix", "mathspace", "mathstyle",
141 "note", "paragraph", "preamble", "prefs", "print", "ref", "sendto",
142 "spellchecker", "tabular", "tabularcreate", "texinfo",
143
144 #ifdef HAVE_LIBAIKSAURUS
145 "thesaurus",
146 #endif
147
148 "toc", "url", "vspace", "wrap" };
149
150 char const * const * const end_dialognames =
151         dialognames + (sizeof(dialognames) / sizeof(char *));
152
153 struct cmpCStr {
154         cmpCStr(char const * name) : name_(name) {}
155         bool operator()(char const * other) {
156                 return strcmp(other, name_) == 0;
157         }
158 private:
159         char const * name_;
160 };
161
162 } // namespace anon
163
164
165 bool Dialogs::isValidName(string const & name) const
166 {
167         return std::find_if(dialognames, end_dialognames,
168                             cmpCStr(name.c_str())) != end_dialognames;
169 }
170
171
172 Dialogs::DialogPtr Dialogs::build(string const & name)
173 {
174         BOOST_ASSERT(isValidName(name));
175
176         DialogPtr dialog(new Dialog(lyxview_, name));
177         dialog->bc().view(new xformsBC(dialog->bc()));
178
179         if (name == "aboutlyx") {
180                 dialog->bc().view(new GBC(dialog->bc()));
181                 dialog->setController(new ControlAboutlyx(*dialog));
182                 dialog->setView(new GAboutlyx(*dialog));
183                 dialog->bc().bp(new OkCancelPolicy);
184         } else if (name == "bibitem") {
185                 dialog->setController(new ControlCommand(*dialog, name));
186                 dialog->setView(new FormBibitem(*dialog));
187                 dialog->bc().bp(new OkCancelReadOnlyPolicy);
188         } else if (name == "bibtex") {
189                 dialog->setController(new ControlBibtex(*dialog));
190                 dialog->setView(new FormBibtex(*dialog));
191                 dialog->bc().bp(new NoRepeatedApplyReadOnlyPolicy);
192         } else if (name == "box") {
193                 dialog->setController(new ControlBox(*dialog));
194                 dialog->setView(new FormBox(*dialog));
195                 dialog->bc().bp(new OkApplyCancelReadOnlyPolicy);
196         } else if (name == "changes") {
197                 dialog->bc().view(new GBC(dialog->bc()));
198                 dialog->setController(new ControlChanges(*dialog));
199                 dialog->setView(new GChanges(*dialog));
200                 dialog->bc().bp(new NoRepeatedApplyReadOnlyPolicy);
201         } else if (name == "character") {
202                 dialog->bc().view(new GBC(dialog->bc()));
203                 dialog->setController(new ControlCharacter(*dialog));
204                 dialog->setView(new GCharacter(*dialog));
205                 dialog->bc().bp(new OkApplyCancelReadOnlyPolicy);
206         } else if (name == "citation") {
207                 dialog->setController(new ControlCitation(*dialog));
208                 dialog->setView(new FormCitation(*dialog));
209                 dialog->bc().bp(new NoRepeatedApplyReadOnlyPolicy);
210         } else if (name == "document") {
211                 dialog->setController(new ControlDocument(*dialog));
212                 dialog->setView(new FormDocument(*dialog));
213                 dialog->bc().bp(new NoRepeatedApplyReadOnlyPolicy);
214         } else if (name == "errorlist") {
215                 dialog->bc().view(new GBC(dialog->bc()));
216                 dialog->setController(new ControlErrorList(*dialog));
217                 dialog->setView(new GErrorList(*dialog));
218                 dialog->bc().bp(new NoRepeatedApplyReadOnlyPolicy);
219         } else if (name == "ert") {
220                 dialog->setController(new ControlERT(*dialog));
221                 dialog->setView(new FormERT(*dialog));
222                 dialog->bc().bp(new NoRepeatedApplyReadOnlyPolicy);
223         } else if (name == "external") {
224                 dialog->setController(new ControlExternal(*dialog));
225                 dialog->setView(new FormExternal(*dialog));
226                 dialog->bc().bp(new NoRepeatedApplyReadOnlyPolicy);
227         } else if (name == "file") {
228                 dialog->bc().view(new GBC(dialog->bc()));
229                 dialog->setController(new ControlShowFile(*dialog));
230                 dialog->setView(new GShowFile(*dialog));
231                 dialog->bc().bp(new OkCancelPolicy);
232         } else if (name == "findreplace") {
233                 dialog->bc().view(new GBC(dialog->bc()));
234                 dialog->setController(new ControlSearch(*dialog));
235                 dialog->setView(new GSearch(*dialog));
236                 dialog->bc().bp(new NoRepeatedApplyReadOnlyPolicy);
237         } else if (name == "float") {
238                 dialog->setController(new ControlFloat(*dialog));
239                 dialog->setView(new FormFloat(*dialog));
240                 dialog->bc().bp(new NoRepeatedApplyReadOnlyPolicy);
241         } else if (name == "graphics") {
242                 dialog->setController(new ControlGraphics(*dialog));
243                 dialog->setView(new FormGraphics(*dialog));
244                 dialog->bc().bp(new NoRepeatedApplyReadOnlyPolicy);
245         } else if (name == "include") {
246                 dialog->setController(new ControlInclude(*dialog));
247                 dialog->setView(new FormInclude(*dialog));
248                 dialog->bc().bp(new OkApplyCancelReadOnlyPolicy);
249         } else if (name == "index") {
250                 dialog->bc().view(new GBC(dialog->bc()));
251                 dialog->setController(new ControlCommand(*dialog, name));
252                 dialog->setView(new GText(*dialog,
253                                           _("Index"), _("Keyword:|#K")));
254                 dialog->bc().bp(new NoRepeatedApplyReadOnlyPolicy);
255         } else if (name == "label") {
256                 dialog->bc().view(new GBC(dialog->bc()));
257                 dialog->setController(new ControlCommand(*dialog, name));
258                 dialog->setView(new GText(*dialog,
259                                           _("Label"), _("Label:|#L")));
260                 dialog->bc().bp(new NoRepeatedApplyReadOnlyPolicy);
261         } else if (name == "log") {
262                 dialog->bc().view(new GBC(dialog->bc()));
263                 dialog->setController(new ControlLog(*dialog));
264                 dialog->setView(new GLog(*dialog));
265                 dialog->bc().bp(new OkCancelPolicy);
266
267         } else if (name == "mathpanel") {
268                 dialog->bc().view(new GBC(dialog->bc()));
269                 dialog->setController(new ControlMath(*dialog));
270                 dialog->setView(new GMathPanel(*dialog));
271                 dialog->bc().bp(new IgnorantPolicy);
272
273         } else if (name == "mathaccents") {
274                 FormMathsBitmap * bitmap =
275                         createFormBitmap(*dialog, _("Maths Decorations & Accents"),
276                                          latex_deco, nr_latex_deco);
277                 bitmap->addBitmap(
278                         BitmapStore(12, 3, 4, deco1_width, deco1_height, deco1_bits, true));
279                 bitmap->addBitmap(
280                         BitmapStore(10, 4, 3, deco2_width, deco2_height, deco2_bits, true));
281
282                 dialog->setController(new ControlMath(*dialog));
283                 dialog->setView(bitmap);
284                 dialog->bc().bp(new IgnorantPolicy);
285
286         } else if (name == "matharrows") {
287                 FormMathsBitmap * bitmap =
288                         createFormBitmap(*dialog, _("Arrows"), latex_arrow, nr_latex_arrow);
289                 bitmap->addBitmap(
290                         BitmapStore(20, 5, 4, arrow_width,  arrow_height,  arrow_bits, true));
291                 bitmap->addBitmap(
292                         BitmapStore(7,  2, 4, larrow_width, larrow_height, larrow_bits, false));
293                 bitmap->addBitmap(
294                         BitmapStore(4,  2, 2, darrow_width,  darrow_height, darrow_bits, true));
295
296                 dialog->setController(new ControlMath(*dialog));
297                 dialog->setView(bitmap);
298                 dialog->bc().bp(new IgnorantPolicy);
299
300         } else if (name == "mathoperators") {
301                 FormMathsBitmap * bitmap =
302                         createFormBitmap(*dialog, _("Binary Ops"),
303                                          latex_bop, nr_latex_bop);
304                 bitmap->addBitmap(
305                         BitmapStore(31, 4, 8, bop_width, bop_height, bop_bits, true));
306
307                 dialog->setController(new ControlMath(*dialog));
308                 dialog->setView(bitmap);
309                 dialog->bc().bp(new IgnorantPolicy);
310
311         } else if (name == "mathrelations") {
312                 FormMathsBitmap * bitmap =
313                         createFormBitmap(*dialog, _("Binary Relations"),
314                                          latex_brel, nr_latex_brel);
315                 bitmap->addBitmap(
316                         BitmapStore(35, 4, 9, brel_width, brel_height, brel_bits, true));
317
318                 dialog->setController(new ControlMath(*dialog));
319                 dialog->setView(bitmap);
320                 dialog->bc().bp(new IgnorantPolicy);
321
322         } else if (name == "mathgreek") {
323                 FormMathsBitmap * bitmap =
324                         createFormBitmap(*dialog, _("Greek"),
325                                          latex_greek, nr_latex_greek);
326                 bitmap->addBitmap(
327                         BitmapStore(11, 6, 2, Greek_width, Greek_height, Greek_bits, true));
328                 bitmap->addBitmap(
329                         BitmapStore(28, 7, 4, greek_width, greek_height, greek_bits, true));
330
331                 dialog->setController(new ControlMath(*dialog));
332                 dialog->setView(bitmap);
333                 dialog->bc().bp(new IgnorantPolicy);
334
335         } else if (name == "mathmisc") {
336                 FormMathsBitmap * bitmap =
337                         createFormBitmap(*dialog, _("Misc"),
338                                          latex_misc, nr_latex_misc);
339                 bitmap->addBitmap(
340                         BitmapStore(29, 5, 6, misc_width, misc_height, misc_bits, true));
341                 bitmap->addBitmap(
342                         BitmapStore(5, 5, 1, misc4_width, misc4_height, misc4_bits, true));
343                 bitmap->addBitmap(
344                         BitmapStore(6, 3, 2, misc2_width, misc2_height, misc2_bits, false));
345                 bitmap->addBitmap(
346                         BitmapStore(4, 2, 2, misc3_width, misc3_height, misc3_bits, true));
347
348                 dialog->setController(new ControlMath(*dialog));
349                 dialog->setView(bitmap);
350                 dialog->bc().bp(new IgnorantPolicy);
351
352         } else if (name == "mathdots") {
353                 FormMathsBitmap * bitmap =
354                         createFormBitmap(*dialog, _("Dots"),
355                                          latex_dots, nr_latex_dots);
356                 bitmap->addBitmap(
357                         BitmapStore(4, 4, 1, dots_width, dots_height, dots_bits, true));
358
359                 dialog->setController(new ControlMath(*dialog));
360                 dialog->setView(bitmap);
361                 dialog->bc().bp(new IgnorantPolicy);
362
363         } else if (name == "mathbigoperators") {
364                 FormMathsBitmap * bitmap =
365                         createFormBitmap(*dialog, _("Big Operators"),
366                                          latex_varsz, nr_latex_varsz);
367                 bitmap->addBitmap(
368                         BitmapStore(14, 3, 5, varsz_width, varsz_height, varsz_bits, true));
369
370                 dialog->setController(new ControlMath(*dialog));
371                 dialog->setView(bitmap);
372                 dialog->bc().bp(new IgnorantPolicy);
373
374         } else if (name == "mathamsmisc") {
375                 FormMathsBitmap * bitmap =
376                         createFormBitmap(*dialog, _("AMS Misc"),
377                                          latex_ams_misc, nr_latex_ams_misc);
378                 bitmap->addBitmap(
379                         BitmapStore(9, 5, 2, ams1_width, ams1_height, ams1_bits, true));
380                 bitmap->addBitmap(
381                         BitmapStore(26, 3, 9, ams7_width, ams7_height, ams7_bits, true));
382
383                 dialog->setController(new ControlMath(*dialog));
384                 dialog->setView(bitmap);
385                 dialog->bc().bp(new IgnorantPolicy);
386
387         } else if (name == "mathamsarrows") {
388                 FormMathsBitmap * bitmap =
389                         createFormBitmap(*dialog, _("AMS Arrows"),
390                                          latex_ams_arrows, nr_latex_ams_arrows);
391                 bitmap->addBitmap(
392                         BitmapStore(32, 3, 11, ams2_width, ams2_height, ams2_bits, true));
393                 bitmap->addBitmap(
394                         BitmapStore(6, 3, 2, ams3_width, ams3_height, ams3_bits, true));
395
396                 dialog->setController(new ControlMath(*dialog));
397                 dialog->setView(bitmap);
398                 dialog->bc().bp(new IgnorantPolicy);
399
400         } else if (name == "mathamsrelations") {
401                 FormMathsBitmap * bitmap =
402                         createFormBitmap(*dialog, _("AMS Relations"),
403                                          latex_ams_rel, nr_latex_ams_rel);
404                 bitmap->addBitmap(
405                         BitmapStore(66, 6, 11, ams_rel_width, ams_rel_height, ams_rel_bits, true));
406
407                 dialog->setController(new ControlMath(*dialog));
408                 dialog->setView(bitmap);
409                 dialog->bc().bp(new IgnorantPolicy);
410
411         } else if (name == "mathamsnegatedrelations") {
412                 FormMathsBitmap * bitmap =
413                         createFormBitmap(*dialog, _("AMS Negated Rel"),
414                                          latex_ams_nrel, nr_latex_ams_nrel);
415                 bitmap->addBitmap(
416                         BitmapStore(51, 6, 9, ams_nrel_width, ams_nrel_height, ams_nrel_bits, true));
417
418                 dialog->setController(new ControlMath(*dialog));
419                 dialog->setView(bitmap);
420                 dialog->bc().bp(new IgnorantPolicy);
421
422         } else if (name == "mathamsoperators") {
423                 FormMathsBitmap * bitmap =
424                         createFormBitmap(*dialog, _("AMS Operators"),
425                                          latex_ams_ops, nr_latex_ams_ops);
426                 bitmap->addBitmap(
427                         BitmapStore(23, 3, 8, ams_ops_width, ams_ops_height, ams_ops_bits, true));
428
429                 dialog->setController(new ControlMath(*dialog));
430                 dialog->setView(bitmap);
431                 dialog->bc().bp(new IgnorantPolicy);
432
433         } else if (name == "mathdelimiter") {
434                 dialog->bc().view(new GBC(dialog->bc()));
435                 dialog->setController(new ControlMath(*dialog));
436                 dialog->setView(new GMathDelim(*dialog));
437                 dialog->bc().bp(new OkApplyCancelReadOnlyPolicy);
438         } else if (name == "mathmatrix") {
439                 dialog->bc().view(new GBC(dialog->bc()));
440                 dialog->setController(new ControlMath(*dialog));
441                 dialog->setView(new GMathsMatrix(*dialog));
442                 dialog->bc().bp(new OkCancelReadOnlyPolicy);
443         } else if (name == "mathspace") {
444                 dialog->setController(new ControlMath(*dialog));
445                 dialog->setView(new FormMathsSpace(*dialog));
446                 dialog->bc().bp(new IgnorantPolicy);
447         } else if (name == "mathstyle") {
448                 dialog->setController(new ControlMath(*dialog));
449                 dialog->setView(new FormMathsStyle(*dialog));
450                 dialog->bc().bp(new IgnorantPolicy);
451         } else if (name == "note") {
452                 dialog->setController(new ControlNote(*dialog));
453                 dialog->setView(new FormNote(*dialog));
454                 dialog->bc().bp(new OkApplyCancelReadOnlyPolicy);
455         } else if (name == "branch") {
456                 dialog->setController(new ControlBranch(*dialog));
457                 dialog->setView(new FormBranch(*dialog));
458                 dialog->bc().bp(new OkApplyCancelReadOnlyPolicy);
459         } else if (name == "paragraph") {
460                 dialog->bc().view(new GBC(dialog->bc()));
461                 dialog->setController(new ControlParagraph(*dialog));
462                 dialog->setView(new GParagraph(*dialog));
463                 dialog->bc().bp(new OkApplyCancelReadOnlyPolicy);
464         } else if (name == "preamble") {
465                 dialog->setController(new ControlPreamble(*dialog));
466                 dialog->setView(new FormPreamble(*dialog));
467                 dialog->bc().bp(new OkApplyCancelPolicy);
468         } else if (name == "prefs") {
469                 dialog->setController(new ControlPrefs(*dialog));
470                 dialog->setView(new FormPreferences(*dialog));
471                 dialog->bc().bp(new PreferencesPolicy);
472         } else if (name == "print") {
473                 dialog->bc().view(new GBC(dialog->bc()));
474                 dialog->setController(new ControlPrint(*dialog));
475                 dialog->setView(new GPrint(*dialog));
476                 dialog->bc().bp(new OkCancelPolicy);
477         } else if (name == "ref") {
478                 dialog->setController(new ControlRef(*dialog));
479                 dialog->setView(new FormRef(*dialog));
480                 dialog->bc().bp(new NoRepeatedApplyReadOnlyPolicy);
481         } else if (name == "sendto") {
482                 dialog->setController(new ControlSendto(*dialog));
483                 dialog->setView(new FormSendto(*dialog));
484                 dialog->bc().bp(new OkApplyCancelPolicy);
485         } else if (name == "spellchecker") {
486                 dialog->bc().view(new GBC(dialog->bc()));
487                 dialog->setController(new ControlSpellchecker(*dialog));
488                 dialog->setView(new GSpellchecker(*dialog));
489                 dialog->bc().bp(new NoRepeatedApplyReadOnlyPolicy);
490         } else if (name == "tabular") {
491                 dialog->setController(new ControlTabular(*dialog));
492                 dialog->setView(new FormTabular(*dialog));
493                 dialog->bc().bp(new NoRepeatedApplyReadOnlyPolicy);
494         } else if (name == "tabularcreate") {
495                 dialog->bc().view(new GBC(dialog->bc()));
496                 dialog->setController(new ControlTabularCreate(*dialog));
497                 dialog->setView(new GTableCreate(*dialog));
498                 dialog->bc().bp(new IgnorantPolicy);
499         } else if (name == "texinfo") {
500                 dialog->bc().view(new GBC(dialog->bc()));
501                 dialog->setController(new ControlTexinfo(*dialog));
502                 dialog->setView(new GTexinfo(*dialog));
503                 dialog->bc().bp(new OkCancelPolicy);
504 #ifdef HAVE_LIBAIKSAURUS
505         } else if (name == "thesaurus") {
506                 dialog->setController(new ControlThesaurus(*dialog));
507                 dialog->setView(new FormThesaurus(*dialog));
508                 dialog->bc().bp(new OkApplyCancelReadOnlyPolicy);
509 #endif
510         } else if (name == "toc") {
511                 dialog->bc().view(new GBC(dialog->bc()));
512                 dialog->setController(new ControlToc(*dialog));
513                 dialog->setView(new GToc(*dialog));
514                 dialog->bc().bp(new OkCancelPolicy);
515         } else if (name == "url") {
516                 dialog->bc().view(new GBC(dialog->bc()));
517                 dialog->setController(new ControlCommand(*dialog, name));
518                 dialog->setView(new GUrl(*dialog));
519                 dialog->bc().bp(new NoRepeatedApplyReadOnlyPolicy);
520         } else if (name == "vspace") {
521                 dialog->setController(new ControlVSpace(*dialog));
522                 dialog->setView(new FormVSpace(*dialog));
523                 dialog->bc().bp(new OkApplyCancelReadOnlyPolicy);
524         } else if (name == "wrap") {
525                 dialog->setController(new ControlWrap(*dialog));
526                 dialog->setView(new FormWrap(*dialog));
527                 dialog->bc().bp(new NoRepeatedApplyReadOnlyPolicy);
528         }
529
530         return dialog;
531 }
532
533
534 void Dialogs::toggleTooltips()
535 {
536         Tooltips::toggleEnabled();
537 }
538
539
540 /// Are the tooltips on or off?
541 bool Dialogs::tooltipsEnabled()
542 {
543         return Tooltips::enabled();
544 }