1999-09-27 18:44:28 +00:00
|
|
|
// -*- C++ -*-
|
|
|
|
/* This file is part of
|
|
|
|
* ======================================================
|
|
|
|
*
|
|
|
|
* LyX, The Document Processor
|
|
|
|
*
|
2000-03-07 01:14:37 +00:00
|
|
|
* Copyright 1995 Matthias Ettrich
|
2001-05-30 13:53:44 +00:00
|
|
|
* Copyright 1995-2001 The LyX Team.
|
1999-09-27 18:44:28 +00:00
|
|
|
*
|
1999-11-15 12:01:38 +00:00
|
|
|
* ====================================================== */
|
1999-09-27 18:44:28 +00:00
|
|
|
|
1999-11-15 12:01:38 +00:00
|
|
|
#ifndef LYX_GUI_H
|
|
|
|
#define LYX_GUI_H
|
1999-09-27 18:44:28 +00:00
|
|
|
|
2000-10-02 00:55:02 +00:00
|
|
|
#include <boost/utility.hpp>
|
2000-08-07 20:58:24 +00:00
|
|
|
|
1999-09-27 18:44:28 +00:00
|
|
|
#ifdef __GNUG__
|
|
|
|
#pragma interface
|
|
|
|
#endif
|
|
|
|
|
|
|
|
class LyXView;
|
|
|
|
class LyX;
|
|
|
|
class Buffer;
|
|
|
|
|
|
|
|
/**
|
2000-08-07 20:58:24 +00:00
|
|
|
This class is going to be the entry point to {\em all} GUI funcionality.
|
|
|
|
From this object will all the things going on be initiated. However I
|
|
|
|
have not clearly figured out how this class is going to be, suggestions
|
|
|
|
are welcome. (Lgb)
|
|
|
|
*/
|
2001-04-17 14:00:20 +00:00
|
|
|
class LyXGUI : boost::noncopyable {
|
1999-09-27 18:44:28 +00:00
|
|
|
public:
|
2000-08-07 20:58:24 +00:00
|
|
|
/** The only constructor allowed.
|
|
|
|
If gui is false, LyX will operate in non-X mode
|
|
|
|
*/
|
|
|
|
LyXGUI(LyX * owner, int * argc, char * argv[], bool gui);
|
1999-09-27 18:44:28 +00:00
|
|
|
///
|
|
|
|
~LyXGUI();
|
|
|
|
|
|
|
|
/**
|
2000-08-07 20:58:24 +00:00
|
|
|
This functions starts the ball. For XForms it runs a loop of
|
|
|
|
fl_check_forms(). For QT this will probably be .exec().
|
|
|
|
*/
|
1999-09-27 18:44:28 +00:00
|
|
|
void runTime();
|
|
|
|
/** This will take care of the initializaton done after the
|
2000-08-07 20:58:24 +00:00
|
|
|
main initialization.
|
|
|
|
*/
|
1999-09-27 18:44:28 +00:00
|
|
|
void init();
|
2000-08-07 20:58:24 +00:00
|
|
|
|
2000-04-28 11:18:04 +00:00
|
|
|
/// Register the buffer with the first found LyXView in lyxViews
|
2000-08-07 20:58:24 +00:00
|
|
|
void regBuf(Buffer *);
|
|
|
|
|
2000-04-28 11:18:04 +00:00
|
|
|
/// Access to (first?) LyXView
|
|
|
|
LyXView * getLyXView() const;
|
|
|
|
|
1999-09-27 18:44:28 +00:00
|
|
|
private:
|
|
|
|
///
|
|
|
|
void setDefaults();
|
|
|
|
///
|
|
|
|
void create_forms();
|
2000-08-07 20:58:24 +00:00
|
|
|
|
1999-09-27 18:44:28 +00:00
|
|
|
/// The LyX that owns this GUI.
|
2000-08-07 20:58:24 +00:00
|
|
|
LyX * _owner;
|
2000-04-17 14:00:18 +00:00
|
|
|
///
|
2000-08-07 20:58:24 +00:00
|
|
|
LyXView * lyxViews; // or something so that several views
|
2000-04-17 14:00:18 +00:00
|
|
|
// on the same time can be allowed.
|
1999-09-27 18:44:28 +00:00
|
|
|
/// Do we have a gui?
|
|
|
|
bool gui;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|