1999-09-27 18:44:28 +00:00
|
|
|
// -*- C++ -*-
|
|
|
|
/* This file is part of
|
1999-11-15 12:01:38 +00:00
|
|
|
* ======================================================
|
1999-09-27 18:44:28 +00:00
|
|
|
*
|
|
|
|
* LyX, The Document Processor
|
|
|
|
*
|
2000-02-04 09:38:32 +00:00
|
|
|
* Copyright 1995 Matthias Ettrich
|
|
|
|
* Copyright 1995-2000 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
|
|
|
|
|
|
|
/* This is the declaration of the LyX class, there should only
|
|
|
|
* exist _one_ instance of this in the application. */
|
|
|
|
|
1999-10-02 16:21:10 +00:00
|
|
|
#ifndef LYX_MAIN_H
|
|
|
|
#define LYX_MAIN_H
|
1999-09-27 18:44:28 +00:00
|
|
|
|
1999-10-02 16:21:10 +00:00
|
|
|
#include <csignal>
|
|
|
|
|
|
|
|
#include "LString.h"
|
1999-09-27 18:44:28 +00:00
|
|
|
|
|
|
|
class LyXGUI;
|
|
|
|
class LyXRC;
|
|
|
|
class LastFiles;
|
|
|
|
class Buffer;
|
2000-05-10 11:50:11 +00:00
|
|
|
class kb_keymap;
|
1999-10-02 16:21:10 +00:00
|
|
|
|
|
|
|
extern string system_lyxdir;
|
|
|
|
extern string user_lyxdir;
|
|
|
|
extern string system_tempdir;
|
1999-09-27 18:44:28 +00:00
|
|
|
|
2000-02-04 09:38:32 +00:00
|
|
|
extern LastFiles * lastfiles; /* we should hopefully be able to move this
|
1999-09-27 18:44:28 +00:00
|
|
|
* inside the LyX class */
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
This is the main LyX object it encapsulates most of the other objects.
|
|
|
|
*/
|
2000-02-04 09:38:32 +00:00
|
|
|
class LyX {
|
1999-09-27 18:44:28 +00:00
|
|
|
public:
|
|
|
|
/**@name Constructors and Deconstructors */
|
|
|
|
//@{
|
|
|
|
/// the only allowed constructor
|
1999-12-10 00:07:59 +00:00
|
|
|
LyX(int * argc, char * argv[]); // constructor
|
1999-09-27 18:44:28 +00:00
|
|
|
// Always is useful a destructor
|
|
|
|
~LyX();
|
|
|
|
//@}
|
|
|
|
|
|
|
|
/**@name Pointers to... */
|
|
|
|
//@{
|
|
|
|
///
|
2000-02-04 09:38:32 +00:00
|
|
|
LyXGUI * lyxGUI; // should be only one of this
|
1999-09-27 18:44:28 +00:00
|
|
|
//@}
|
|
|
|
private:
|
|
|
|
/**@name Constructors and Deconstructors */
|
|
|
|
//@{
|
|
|
|
/// not allowed
|
1999-12-10 00:07:59 +00:00
|
|
|
LyX(const LyX &) {} // not allowed
|
1999-09-27 18:44:28 +00:00
|
|
|
/// not allowed
|
1999-12-10 00:07:59 +00:00
|
|
|
LyX() {} // not allowed
|
1999-09-27 18:44:28 +00:00
|
|
|
//@}
|
|
|
|
|
|
|
|
/**@name Private variables */
|
|
|
|
//@{
|
|
|
|
/// does this user start lyx for the first time?
|
|
|
|
bool first_start;
|
|
|
|
///
|
1999-12-10 00:07:59 +00:00
|
|
|
string batch_command;
|
2000-06-13 10:33:57 +00:00
|
|
|
///
|
|
|
|
// struct sigaction act_; // seems to be unused
|
1999-09-27 18:44:28 +00:00
|
|
|
//@}
|
|
|
|
/**@name Private Members */
|
|
|
|
//@{
|
|
|
|
///
|
|
|
|
void runtime();
|
|
|
|
///
|
2000-03-20 16:37:50 +00:00
|
|
|
void init(int * argc, char * argv[], bool);
|
1999-09-27 18:44:28 +00:00
|
|
|
///
|
2000-05-10 11:50:11 +00:00
|
|
|
void defaultKeyBindings(kb_keymap * kbmap);
|
|
|
|
///
|
|
|
|
void deadKeyBindings(kb_keymap * kbmap);
|
|
|
|
///
|
2000-05-29 15:29:50 +00:00
|
|
|
void queryUserLyXDir(bool explicit_userdir);
|
1999-09-27 18:44:28 +00:00
|
|
|
///
|
1999-10-02 16:21:10 +00:00
|
|
|
void ReadRcFile(string const & name);
|
1999-09-27 18:44:28 +00:00
|
|
|
///
|
2000-02-04 09:38:32 +00:00
|
|
|
bool easyParse(int * argc, char * argv[]);
|
1999-09-27 18:44:28 +00:00
|
|
|
//@}
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|