]> git.lyx.org Git - lyx.git/blob - src/frontends/xforms/Dialogs.C
Move connection of the image loader signals to the frontends.
[lyx.git] / src / frontends / xforms / Dialogs.C
1 /* This file is part of
2  * ======================================================
3  *
4  *           LyX, The Document Processor
5  *
6  *           Copyright 1995 Matthias Ettrich
7  *           Copyright 1995-2001 The LyX Team.
8  *
9  * ======================================================
10  */
11
12 #include <config.h>
13
14 #ifdef __GNUG__
15 #pragma implementation
16 #endif
17
18 #include "Dialogs.h"
19
20 #include "GUI.h"
21 #include "xformsBC.h"
22
23 #include "combox.h"       // needed for clean destruction of boost::scoped_ptr
24 #include "form_aboutlyx.h"
25 #include "form_bibitem.h"
26 #include "form_bibtex.h"
27 #include "form_browser.h"
28 #include "form_character.h"
29 #include "form_citation.h"
30 #include "form_error.h"
31 #include "form_ert.h"
32 #include "form_external.h"
33 #include "form_float.h"
34 #include "form_forks.h"
35 #include "form_graphics.h"
36 #include "form_include.h"
37 #include "form_index.h"
38 #include "form_minipage.h"
39 #include "form_preamble.h"
40 #include "form_print.h"
41 #include "form_ref.h"
42 #include "form_search.h"
43 #include "form_spellchecker.h"
44 #include "form_tabular_create.h"
45 #include "form_texinfo.h"
46 #include "form_thesaurus.h"
47 #include "form_toc.h"
48 #include "form_url.h"
49
50 #include "FormAboutlyx.h"
51 #include "FormBibitem.h"
52 #include "FormBibtex.h"
53 #include "FormCharacter.h"
54 #include "FormCitation.h"
55 #include "FormError.h"
56 #include "FormERT.h"
57 #include "FormExternal.h"
58 #include "FormFloat.h"
59 #include "FormForks.h"
60 #include "FormGraphics.h"
61 #include "FormInclude.h"
62 #include "FormIndex.h"
63 #include "FormLog.h"
64 #include "FormMinipage.h"
65 #include "FormPreamble.h"
66 #include "FormPrint.h"
67 #include "FormRef.h"
68 #include "FormSearch.h"
69 #include "FormShowFile.h"
70 #include "FormSpellchecker.h"
71 #include "FormTabularCreate.h"
72 #include "FormTexinfo.h" 
73 #include "FormThesaurus.h" 
74 #include "FormToc.h"
75 #include "FormUrl.h"
76 #include "FormVCLog.h"
77
78 #include "FormDocument.h"
79 #include "FormMathsPanel.h"
80 #include "FormParagraph.h"
81 #include "FormPreferences.h"
82 #include "FormTabular.h"
83
84 #include "graphics/GraphicsImageXPM.h"
85 //#include "xformsGraphicsImage.h"
86
87 // Signal enabling all visible dialogs to be redrawn if so desired.
88 // E.g., when the GUI colours have been remapped.
89 SigC::Signal0<void> Dialogs::redrawGUI;
90
91 Dialogs::Dialogs(LyXView * lv)
92 {
93         add(new GUIAboutlyx<FormAboutlyx, xformsBC>(*lv, *this));
94         add(new GUIBibitem<FormBibitem, xformsBC>(*lv, *this));
95         add(new GUIBibtex<FormBibtex, xformsBC>(*lv, *this));
96         add(new GUICharacter<FormCharacter, xformsBC>(*lv, *this));
97         add(new GUICitation<FormCitation, xformsBC>(*lv, *this));
98         add(new GUIError<FormError, xformsBC>(*lv, *this));
99         add(new GUIERT<FormERT, xformsBC>(*lv, *this));
100         add(new GUIExternal<FormExternal, xformsBC>(*lv, *this));
101         add(new GUIForks<FormForks, xformsBC>(*lv, *this));
102         add(new GUIGraphics<FormGraphics, xformsBC>(*lv, *this));
103         add(new GUIInclude<FormInclude, xformsBC>(*lv, *this));
104         add(new GUIIndex<FormIndex, xformsBC>(*lv, *this));
105         add(new GUILog<FormLog, xformsBC>(*lv, *this));
106         add(new GUIMinipage<FormMinipage, xformsBC>(*lv, *this));
107         add(new GUIFloat<FormFloat, xformsBC>(*lv, *this));
108         add(new GUIPreamble<FormPreamble, xformsBC>(*lv, *this));
109         add(new GUIPrint<FormPrint, xformsBC>(*lv, *this));
110         add(new GUIRef<FormRef, xformsBC>(*lv, *this));
111         add(new GUISearch<FormSearch, xformsBC>(*lv, *this));
112         add(new GUIShowFile<FormShowFile, xformsBC>(*lv, *this));
113         add(new GUISpellchecker<FormSpellchecker, xformsBC>(*lv, *this));
114         add(new GUITabularCreate<FormTabularCreate, xformsBC>(*lv, *this));
115 #ifdef HAVE_LIBAIKSAURUS
116         add(new GUIThesaurus<FormThesaurus, xformsBC>(*lv, *this));
117 #endif
118         add(new GUITexinfo<FormTexinfo, xformsBC>(*lv, *this));
119         add(new GUIToc<FormToc, xformsBC>(*lv, *this));
120         add(new GUIUrl<FormUrl, xformsBC>(*lv, *this));
121         add(new GUIVCLog<FormVCLog, xformsBC>(*lv, *this));
122
123         add(new FormDocument(lv, this));
124         add(new FormMathsPanel(lv, this));
125         add(new FormParagraph(lv, this));
126         add(new FormPreferences(lv, this));
127         add(new FormTabular(lv, this));
128         
129         // reduce the number of connections needed in
130         // dialogs by a simple connection here.
131         hideAll.connect(hideBufferDependent.slot());
132 }
133
134 // Called bu the graphics cache to connect the approriate frontend
135 // image loading routines to the LyX kernel.
136 void Dialogs::initialiseGraphics()
137 {
138         using namespace grfx;
139         using SigC::slot;
140     
141         // connect the image loader based on the XPM library
142         GImage::newImage.connect(slot(&GImageXPM::newImage));
143         GImage::loadableFormats.connect(slot(&GImageXPM::loadableFormats));
144         // connect the image loader based on the xforms library
145 //      GImage::newImage.connect(slot(&xformsGImage::newImage));
146 //      GImage::loadableFormats.connect(slot(&xformsGImage::loadableFormats));
147 }