Move Dialogs::redrawGUI to frontends/Dialogs.C from all those guis.

Move Dialogs::initialiseGraphics to GUIRunTime.
xforms works, qt2 and gnome not tested.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3654 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Angus Leeming 2002-03-04 10:51:40 +00:00
parent a4ab05529a
commit 356caadd6d
16 changed files with 100 additions and 52 deletions

View File

@ -1,3 +1,8 @@
2002-03-04 Angus Leeming <a.leeming@ic.ac.uk>
* Dialogs.h:
* GUIRunTime.h (initialiseGraphics): moved to GUIRunTime.
2002-03-02 Lars Gullik Bjønnes <larsbj@birdstep.com>
* Toolbar.[Ch] (setLayout): layout as string

View File

@ -23,6 +23,10 @@
#include "Dialogs.h"
#include "support/LAssert.h"
// Signal enabling all visible dialogs to be redrawn if so desired.
// E.g., when the GUI colours have been remapped.
SigC::Signal0<void> Dialogs::redrawGUI;
void Dialogs::add(DialogBase * ptr)
{
lyx::Assert(ptr);

View File

@ -63,11 +63,6 @@ public:
Dialogs(LyXView *);
//@}
/** Called bu the graphics cache to connect the approriate frontend
* image loading routines to the LyX kernel.
*/
static void initialiseGraphics();
/** Redraw all visible dialogs because, for example, the GUI colours
have been re-mapped. */
static SigC::Signal0<void> redrawGUI;

View File

@ -39,6 +39,10 @@ public:
///
static
LyXView * createMainView(int w, int h);
/** Called bu the graphics cache to connect the approriate frontend
* image loading routines to the LyX kernel.
*/
static void initialiseGraphics();
/* the following entries are X11 specific and should eventually go away */
/// The display on which LyX is running

View File

@ -1,3 +1,9 @@
2002-03-04 Angus Leeming <a.leeming@ic.ac.uk>
* Dialogs.C (redrawGUI): removed to frontends/Dialogs.C
* GUIRunTime.C (initialiseGraphics): new static method
2002-03-02 Lars Gullik Bjønnes <larsbj@birdstep.com>
* Makefile.am: get rid of LYX_LIBS

View File

@ -64,10 +64,6 @@
#include "FormMinipage.h"
*/
// Signal enabling all visible dialogs to be redrawn if so desired.
// E.g., when the GUI colours have been remapped.
SigC::Signal0<void> Dialogs::redrawGUI;
Dialogs::Dialogs(LyXView * lv)
{
add(new GUIUrl<FormUrl, gnomeBC>(*lv, *this));

View File

@ -21,6 +21,8 @@
#include <gnome--/main.h>
#include <glade/glade.h>
#include "graphics/GraphicsImageXPM.h"
using std::endl;
// I keep these here so that it will be processed as early in
@ -128,6 +130,19 @@ LyXView * GUIRunTime::createMainView(int w, int h)
}
// Called bu the graphics cache to connect the approriate frontend
// image loading routines to the LyX kernel.
void GUIRunTime::initialiseGraphics()
{
using namespace grfx;
using SigC::slot;
// connect the image loader based on the XPM library
GImage::newImage.connect(slot(&GImageXPM::newImage));
GImage::loadableFormats.connect(slot(&GImageXPM::loadableFormats));
}
Display * GUIRunTime::x11Display()
{
return fl_get_display();

View File

@ -1,3 +1,10 @@
2002-03-04 Angus Leeming <a.leeming@ic.ac.uk>
* Dialogs.C (redrawGUI): removed to frontends/Dialogs.C
* Dialogs.C:
* GUIRunTime.C (initialiseGraphics): moved to GUIRunTime.
2002-03-02 Lars Gullik Bjønnes <larsbj@birdstep.com>
* Makefile.am: get rid of LYX_LIBS

View File

@ -80,14 +80,8 @@
#include "xforms/FormShowFile.h"
#include "xforms/FormTabular.h"
#include "graphics/GraphicsImageXPM.h"
#include "GUI.h"
// this makes no real sense for Qt2
SigC::Signal0<void> Dialogs::redrawGUI;
Dialogs::Dialogs(LyXView * lv)
{
// dialogs that have been converted to new scheme
@ -129,16 +123,3 @@ Dialogs::Dialogs(LyXView * lv)
// dialogs by a simple connection here.
hideAll.connect(hideBufferDependent.slot());
}
// Called bu the graphics cache to connect the approriate frontend
// image loading routines to the LyX kernel.
void Dialogs::initialiseGraphics()
{
using namespace grfx;
using SigC::slot;
// connect the image loader based on the XPM library
GImage::newImage.connect(slot(&GImageXPM::newImage));
GImage::loadableFormats.connect(slot(&GImageXPM::loadableFormats));
}

View File

@ -19,6 +19,7 @@
#include "XFormsView.h"
#include "GUIRunTime.h"
#include "debug.h"
#include "graphics/GraphicsImageXPM.h"
#include FORMS_H_LOCATION
@ -90,6 +91,19 @@ LyXView * GUIRunTime::createMainView(int w, int h)
}
// Called bu the graphics cache to connect the approriate frontend
// image loading routines to the LyX kernel.
void GUIRunTime::initialiseGraphics()
{
using namespace grfx;
using SigC::slot;
// connect the image loader based on the XPM library
GImage::newImage.connect(slot(&GImageXPM::newImage));
GImage::loadableFormats.connect(slot(&GImageXPM::loadableFormats));
}
Display * GUIRunTime::x11Display()
{
//return p.device()->x11Display();

View File

@ -1,3 +1,10 @@
2002-03-04 Angus Leeming <a.leeming@ic.ac.uk>
* Dialogs.C (redrawGUI): removed to frontends/Dialogs.C
* Dialogs.C:
* GUIRunTime.C (initialiseGraphics): moved to GUIRunTime.
2002-03-04 Angus Leeming <a.leeming@ic.ac.uk>
* FormDocument.C (build): add a std:: qualifier to remove_if.

View File

@ -81,12 +81,6 @@
#include "FormPreferences.h"
#include "FormTabular.h"
#include "graphics/GraphicsImageXPM.h"
//#include "xformsGraphicsImage.h"
// Signal enabling all visible dialogs to be redrawn if so desired.
// E.g., when the GUI colours have been remapped.
SigC::Signal0<void> Dialogs::redrawGUI;
Dialogs::Dialogs(LyXView * lv)
{
@ -130,18 +124,3 @@ Dialogs::Dialogs(LyXView * lv)
// dialogs by a simple connection here.
hideAll.connect(hideBufferDependent.slot());
}
// Called bu the graphics cache to connect the approriate frontend
// image loading routines to the LyX kernel.
void Dialogs::initialiseGraphics()
{
using namespace grfx;
using SigC::slot;
// connect the image loader based on the XPM library
GImage::newImage.connect(slot(&GImageXPM::newImage));
GImage::loadableFormats.connect(slot(&GImageXPM::loadableFormats));
// connect the image loader based on the xforms library
// GImage::newImage.connect(slot(&xformsGImage::newImage));
// GImage::loadableFormats.connect(slot(&xformsGImage::loadableFormats));
}

View File

@ -19,6 +19,12 @@
#include "XFormsView.h"
#include "debug.h"
//#if (FL_REVISION >= 89 && FL_FIXLEVEL >= 6)
//#include "xformsGImage.h"
//#else
#include "graphics/GraphicsImageXPM.h"
//#endif
// I keep these here so that it will be processed as early in
// the compilation process as possible.
#if !defined(FL_REVISION) || FL_REVISION < 88 || FL_VERSION != 0
@ -125,6 +131,26 @@ LyXView * GUIRunTime::createMainView(int w, int h)
}
// Called bu the graphics cache to connect the approriate frontend
// image loading routines to the LyX kernel.
void GUIRunTime::initialiseGraphics()
{
using namespace grfx;
using SigC::slot;
//#if (FL_REVISION >= 89 && FL_FIXLEVEL >= 6)
// connect the image loader based on the xforms library
// GImage::newImage.connect(slot(&xformsGImage::newImage));
// GImage::loadableFormats.connect(slot(&xformsGImage::loadableFormats));
//#else
// connect the image loader based on the XPM library
GImage::newImage.connect(slot(&GImageXPM::newImage));
GImage::loadableFormats.connect(slot(&GImageXPM::loadableFormats));
//#endif
}
Display * GUIRunTime::x11Display()
{
return fl_get_display();

View File

@ -201,6 +201,10 @@ libxforms_la_SOURCES = \
xformsBC.C \
xformsBC.h
# xformsGImage.C \
# xformsGImage.h
# These still have to be added. Sooner or later. ARRae-20000411
# GUI_defaults.C \
# GUI_initialize.C \

View File

@ -1,3 +1,8 @@
2002-03-04 Angus Leeming <a.leeming@ic.ac.uk>
* GraphicsCache.C: change associated with move of initialiseGraphics
to GUIRuntime.
2002-02-28 Angus Leeming <a.leeming@ic.ac.uk>
* GraphicsParams.[Ch]:

View File

@ -18,7 +18,7 @@
#include "GraphicsImage.h"
#include "GraphicsParams.h"
#include "insets/insetgraphics.h"
#include "frontends/Dialogs.h"
#include "frontends/GUIRunTime.h"
namespace grfx {
@ -28,7 +28,7 @@ GCache & GCache::get()
static bool start = true;
if (start) {
start = false;
Dialogs::initialiseGraphics();
GUIRunTime::initialiseGraphics();
}
// Now return the cache