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
|
|
|
|
2000-07-24 13:53:19 +00:00
|
|
|
#ifdef __GNUG__
|
|
|
|
#pragma interface
|
|
|
|
#endif
|
|
|
|
|
1999-10-02 16:21:10 +00:00
|
|
|
#include <csignal>
|
|
|
|
|
|
|
|
#include "LString.h"
|
2000-10-02 00:55:02 +00:00
|
|
|
#include <boost/utility.hpp>
|
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
|
|
|
|
2000-08-07 20:58:24 +00:00
|
|
|
///
|
1999-10-02 16:21:10 +00:00
|
|
|
extern string system_lyxdir;
|
2000-08-07 20:58:24 +00:00
|
|
|
///
|
1999-10-02 16:21:10 +00:00
|
|
|
extern string user_lyxdir;
|
2000-08-07 20:58:24 +00:00
|
|
|
///
|
1999-10-02 16:21:10 +00:00
|
|
|
extern string system_tempdir;
|
2000-08-07 20:58:24 +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.
|
|
|
|
*/
|
2001-04-17 14:00:20 +00:00
|
|
|
class LyX : boost::noncopyable {
|
1999-09-27 18:44:28 +00:00
|
|
|
public:
|
|
|
|
/// the only allowed constructor
|
1999-12-10 00:07:59 +00:00
|
|
|
LyX(int * argc, char * argv[]); // constructor
|
2000-08-07 20:58:24 +00:00
|
|
|
/// Always is useful a destructor
|
1999-09-27 18:44:28 +00:00
|
|
|
~LyX();
|
|
|
|
|
|
|
|
///
|
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:
|
|
|
|
/// does this user start lyx for the first time?
|
|
|
|
bool first_start;
|
|
|
|
///
|
1999-12-10 00:07:59 +00:00
|
|
|
string batch_command;
|
1999-09-27 18:44:28 +00:00
|
|
|
///
|
|
|
|
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);
|
2000-07-24 21:49:58 +00:00
|
|
|
/** Search for and read the LyXRC file name, return
|
|
|
|
true if successfull.
|
|
|
|
*/
|
|
|
|
bool ReadRcFile(string const & name);
|
2000-07-24 13:53:19 +00:00
|
|
|
/// Read the ui file `name'
|
|
|
|
void ReadUIFile(string const & name);
|
2000-10-10 12:36:36 +00:00
|
|
|
/// Read the languages file `name'
|
2001-04-06 13:32:46 +00:00
|
|
|
void ReadLanguagesFile(string const & name);
|
2000-10-10 12:36:36 +00:00
|
|
|
/// Read the encodings file `name'
|
|
|
|
void ReadEncodingsFile(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
|