cosmetics + move frontends/* to frontend namespace.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19553 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Abdelrazak Younes 2007-08-14 09:54:59 +00:00
parent 7ef45b8610
commit 32268e2632
29 changed files with 109 additions and 95 deletions

View File

@ -38,6 +38,7 @@ using support::bformat;
using support::changeExtension;
using support::FileName;
using support::makeDisplayPath;
using frontend::LyXView;
bool Importer::Import(LyXView * lv, FileName const & filename,

View File

@ -22,14 +22,17 @@ namespace lyx {
namespace support { class FileName; }
class LyXView;
class ErrorList;
class Format;
namespace frontend {
class LyXView;
}
class Importer {
public:
///
static bool Import(LyXView * lv, support::FileName const & filename,
static bool Import(frontend::LyXView * lv, support::FileName const & filename,
std::string const & format, ErrorList & errorList);
///

View File

@ -70,6 +70,20 @@
#include <string>
#include <vector>
using std::endl;
using std::for_each;
using std::map;
using std::make_pair;
using std::string;
using std::vector;
#ifndef CXX_GLOBAL_CSTD
using std::exit;
using std::signal;
using std::system;
#endif
namespace fs = boost::filesystem;
namespace lyx {
@ -89,23 +103,11 @@ using support::package;
using support::prependEnvPath;
using support::rtrim;
using support::Systemcall;
using frontend::LyXView;
namespace Alert = frontend::Alert;
namespace os = support::os;
namespace fs = boost::filesystem;
using std::endl;
using std::for_each;
using std::map;
using std::make_pair;
using std::string;
using std::vector;
#ifndef CXX_GLOBAL_CSTD
using std::exit;
using std::signal;
using std::system;
#endif
/// are we using the GUI at all?

View File

@ -33,7 +33,6 @@ class Inset;
class LyXFunc;
class Server;
class ServerSocket;
class LyXView;
class Messages;
class Mover;
class Movers;
@ -42,7 +41,10 @@ class KeyMap;
extern bool use_gui;
namespace frontend { class Application; }
namespace frontend {
class Application;
class LyXView;
}
/// initial startup
class LyX : boost::noncopyable {
@ -96,7 +98,7 @@ public:
void setGuiLanguage(std::string const & language);
///
LyXView * newLyXView();
frontend::LyXView * newLyXView();
/** redraw \c inset in all the BufferViews in which it is currently
* visible. If successful return a pointer to the owning Buffer.

View File

@ -118,6 +118,8 @@ namespace lyx {
using bv_funcs::freefont2string;
using frontend::LyXView;
using support::absolutePath;
using support::addName;
using support::addPath;

View File

@ -30,8 +30,10 @@ class FuncRequest;
class FuncStatus;
class KeySymbol;
class Text;
class LyXView;
namespace frontend {
class LyXView;
}
/** This class encapsulates all the LyX command operations.
This is the class of the LyX's "high level event handler".
@ -48,7 +50,7 @@ public:
void dispatch(FuncRequest const &);
///
void setLyXView(LyXView * lv);
void setLyXView(frontend::LyXView * lv);
///
void initKeySequences(KeyMap * kb);
@ -86,7 +88,7 @@ private:
BufferView * view() const;
///
LyXView * lyx_view_;
frontend::LyXView * lyx_view_;
/// the last character added to the key sequence, in UCS4 encoded form
char_type encoded_last_key;

View File

@ -71,6 +71,10 @@
#include <clocale>
#include <sstream>
using std::endl;
using std::string;
using std::istringstream;
using std::ostringstream;
namespace lyx {
@ -83,14 +87,9 @@ using cap::replaceSelection;
using support::isStrUnsignedInt;
using support::token;
using std::endl;
using std::string;
using std::istringstream;
using std::ostringstream;
namespace frontend {
extern docstring current_layout;
}
namespace {
@ -896,7 +895,7 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd)
break;
}
bool change_layout = (current_layout != layout);
bool change_layout = (frontend::current_layout != layout);
if (!change_layout && cur.selection() &&
cur.selBegin().pit() != cur.selEnd().pit())
@ -904,7 +903,7 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd)
pit_type spit = cur.selBegin().pit();
pit_type epit = cur.selEnd().pit() + 1;
while (spit != epit) {
if (pars_[spit].layout()->name() != current_layout) {
if (pars_[spit].layout()->name() != frontend::current_layout) {
change_layout = true;
break;
}

View File

@ -66,7 +66,7 @@ using std::ios;
using std::istream_iterator;
using boost::shared_ptr;
namespace fs = boost::filesystem;
namespace lyx {
@ -87,9 +87,9 @@ using support::split;
using support::Systemcall;
using support::tempName;
using support::unlink;
using frontend::LyXView;
namespace Alert = frontend::Alert;
namespace fs = boost::filesystem;
// this should be static, but I need it in Buffer.cpp
bool quitting; // flag, that we are quitting the program

View File

@ -18,7 +18,10 @@ namespace lyx {
class Buffer;
class BufferView;
namespace frontend {
class LyXView;
}
///
extern bool quitting;
@ -37,7 +40,7 @@ void insertPlaintextFile(BufferView * bv, std::string const & f, bool asParagrap
docstring const getContentsOfPlaintextFile(BufferView * bv,
std::string const & f, bool asParagraph);
///
void reconfigure(LyXView & lv);
void reconfigure(frontend::LyXView & lv);
} // namespace lyx

View File

@ -18,7 +18,6 @@
namespace lyx {
class BufferView;
class LyXView;
class Color_color;
struct RGBColor;
@ -27,6 +26,7 @@ namespace frontend {
class Clipboard;
class FontLoader;
class Gui;
class LyXView;
class Selection;
/// The main application class

View File

@ -25,8 +25,7 @@ using std::string;
namespace lyx {
using lyx::frontend::Dialog;
namespace frontend {
Dialogs::Dialogs(LyXView & lyxview)
: lyxview_(lyxview), in_show_(false)
@ -218,5 +217,5 @@ void Dialogs::checkStatus()
}
}
} // namespace frontend
} // namespace lyx

View File

@ -21,9 +21,11 @@
namespace lyx {
class Inset;
class LyXView;
namespace frontend { class Dialog; }
namespace frontend {
class Dialog;
class LyXView;
/** Container of all dialogs.
*/
@ -98,9 +100,9 @@ private:
///
bool isValidName(std::string const & name) const;
///
frontend::Dialog * find_or_build(std::string const & name);
Dialog * find_or_build(std::string const & name);
///
typedef boost::shared_ptr<frontend::Dialog> DialogPtr;
typedef boost::shared_ptr<Dialog> DialogPtr;
///
DialogPtr build(std::string const & name);
@ -119,6 +121,7 @@ private:
boost::signals::connection connection_;
};
} // namespace frontend
} // namespace lyx
#endif

View File

@ -21,11 +21,11 @@
namespace lyx {
class LyXView;
class BufferView;
namespace frontend {
class LyXView;
class WorkArea;

View File

@ -12,6 +12,7 @@
#include <config.h>
#include "LyXView.h"
#include "Dialogs.h"
#include "Toolbars.h"
#include "Menubar.h"
@ -47,8 +48,6 @@
#include <boost/bind.hpp>
namespace lyx {
#ifdef HAVE_SYS_TIME_H
# include <sys/time.h>
#endif
@ -56,21 +55,20 @@ namespace lyx {
# include <unistd.h>
#endif
using frontend::WorkArea;
using std::endl;
using std::string;
namespace lyx {
using support::bformat;
using support::FileName;
using support::makeDisplayPath;
using support::onlyFilename;
using std::endl;
using std::string;
using lyx::frontend::ControlCommandBuffer;
namespace frontend {
docstring current_layout;
LyXView::LyXView(int id)
: work_area_(0),
toolbars_(new Toolbars(*this)),
@ -530,5 +528,5 @@ Buffer const * const LyXView::updateInset(Inset const * inset) const
return buffer_ptr;
}
} // namespace frontend
} // namespace lyx

View File

@ -29,22 +29,20 @@ namespace lyx {
namespace support { class FileName; }
class Buffer;
class Inset;
class Menubar;
class BufferView;
class Dialogs;
class LyXFunc;
class Font;
class Timeout;
class Buffer;
class BufferView;
class FuncRequest;
class Inset;
class LyXFunc;
class Timeout;
namespace frontend {
class WorkArea;
class ControlCommandBuffer;
} // namespace frontend
class ControlCommandBuffer;
class Dialogs;
class Menubar;
class WorkArea;
/**
* LyXView - main LyX window
@ -75,13 +73,13 @@ public:
std::vector<int> const & workAreaIds() const { return work_area_ids_; }
/// FIXME: rename to setCurrentWorkArea()
void setWorkArea(frontend::WorkArea * work_area);
void setWorkArea(WorkArea * work_area);
/// return the current WorkArea (the one that has the focus).
frontend::WorkArea const * currentWorkArea() const;
WorkArea const * currentWorkArea() const;
/// FIXME: This non-const access is needed because of
/// a mis-designed \c ControlSpellchecker.
frontend::WorkArea * currentWorkArea();
WorkArea * currentWorkArea();
/**
* This is called after the concrete view has been created.
@ -293,7 +291,7 @@ protected:
/// view's command buffer controller
// this has to be declared _after_ lyxfunc_ as its initialization depends
// on it!
typedef boost::scoped_ptr<frontend::ControlCommandBuffer>
typedef boost::scoped_ptr<ControlCommandBuffer>
CommandBufferPtr;
CommandBufferPtr const controlcommand_;
@ -303,6 +301,7 @@ private:
std::vector<int> work_area_ids_;
};
} // namespace frontend
} // namespace lyx
#endif // LYXVIEW_H

View File

@ -17,6 +17,7 @@
namespace lyx {
namespace frontend {
/**
* The LyX GUI independent menubar class
@ -32,6 +33,7 @@ public:
virtual void update() = 0;
};
} // namespace frontend
} // namespace lyx
#endif // MENUBAR_H

View File

@ -25,11 +25,11 @@
#include "LyX.h"
namespace lyx {
using std::endl;
using std::string;
namespace lyx {
namespace frontend {
Toolbars::Toolbars(LyXView & owner)
: owner_(owner),
@ -375,5 +375,5 @@ void layoutSelected(LyXView & lv, docstring const & name)
<< endl;
}
} // namespace frontend
} // namespace lyx

View File

@ -24,12 +24,14 @@
#define TOOLBARS_H
#include "ToolbarBackend.h"
#include <boost/shared_ptr.hpp>
#include <map>
#include "Session.h"
#include <boost/shared_ptr.hpp>
#include <map>
namespace lyx {
namespace frontend {
class LyXView;
@ -158,6 +160,7 @@ private:
void layoutSelected(LyXView & lv, docstring const & name);
} // namespace frontend
} // namespace lyx
#endif // NOT TOOLBARS_H

View File

@ -27,10 +27,10 @@ namespace lyx {
class BufferView;
class FuncRequest;
class LyXView;
namespace frontend {
class LyXView;
class Painter;
/// types of cursor in work area

View File

@ -20,11 +20,10 @@
namespace lyx {
namespace frontend {
class LyXView;
namespace frontend {
/**
* ControlCommandBuffer
*

View File

@ -26,10 +26,11 @@ namespace lyx {
class InsetGraphics;
class InsetGraphicsParams;
class LyXView;
namespace frontend {
class LyXView;
/** A controller for Graphics dialogs.
*/
class ControlGraphics : public Dialog::Controller {

View File

@ -21,12 +21,10 @@
#include <boost/scoped_ptr.hpp>
namespace lyx {
class LyXView;
namespace frontend {
class ButtonController;
class LyXView;
/** \c Dialog collects the different parts of a Model-Controller-View
* split of a generic dialog together.

View File

@ -19,10 +19,11 @@ namespace lyx {
class Buffer;
class BufferView;
class FuncRequest;
class LyXView;
namespace frontend {
class LyXView;
/** \c Kernel is a wrapper making the LyX kernel available to the dialog.
* (Ie, it provides an interface to the Model part of the Model-Controller-
* View split.

View File

@ -99,7 +99,8 @@
using std::string;
using namespace lyx::frontend;
namespace lyx {
namespace frontend {
namespace {
@ -133,9 +134,6 @@ private:
} // namespace anon
namespace lyx {
bool Dialogs::isValidName(string const & name) const
{
return std::find_if(dialognames, end_dialognames,
@ -272,7 +270,7 @@ Dialogs::DialogPtr Dialogs::build(string const & name)
dialog->bc().bp(new OkApplyCancelPolicy);
} else if (name == "ref") {
// full qualification because qt4 has also a ControlRef type
dialog->setController(new lyx::frontend::ControlRef(*dialog));
dialog->setController(new ControlRef(*dialog));
dialog->setView(new QRef(*dialog));
dialog->bc().bp(new NoRepeatedApplyReadOnlyPolicy);
} else if (name == "sendto") {
@ -342,5 +340,5 @@ bool Dialogs::tooltipsEnabled()
return false;
}
} // namespace frontend
} // namespace lyx

View File

@ -19,13 +19,12 @@
#include <map>
class LyXView;
namespace lyx {
namespace frontend {
class GuiWorkArea;
class GuiView;
class LyXView;
/**
* The GuiImplementation class is the interface to all Qt4 components.

View File

@ -15,23 +15,24 @@
#include "frontends/Menubar.h"
#include "QLPopupMenu.h"
#include <map>
#include <boost/scoped_ptr.hpp>
#include <QObject>
#include <QMenuBar>
#include "QLPopupMenu.h"
namespace lyx {
class LyXView;
class MenuBackend;
class Menu;
class MenuItem;
namespace lyx {
namespace frontend {
class GuiView;
class LyXView;
class QLMenubar : public QObject, public Menubar {
Q_OBJECT

View File

@ -17,11 +17,13 @@
#define QLTOOLBAR_H
#include "frontends/Toolbars.h"
#include <boost/scoped_ptr.hpp>
#include "Session.h"
#include <QToolBar>
#include <boost/scoped_ptr.hpp>
#include <vector>
#include "Session.h"
class QComboBox;

View File

@ -23,7 +23,6 @@
namespace lyx {
class Dialogs;
class RenderGraphic;
class LaTeXFeatures;

View File

@ -16,8 +16,6 @@
#include "debug.h"
#include "LyX.h"
#include "frontends/Dialogs.h"
namespace lyx {