reduce #includes

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20363 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
André Pönitz 2007-09-19 22:37:22 +00:00
parent 72fe3d9fc1
commit 978f65391e
16 changed files with 38 additions and 61 deletions

View File

@ -17,7 +17,6 @@
#include "BiblioInfo.h"
#include "TextClass.h"
#include "TextClassPtr.h"
#include "paper.h"
#include "insets/InsetQuotes.h"
@ -106,7 +105,7 @@ public:
///by modules.
TextClass const & getTextClass() const;
///Returns a pointer to the TextClass currently in use: the BaseClass
///as modified by modules. (See \file TextClassPtr.h for the typedef.)
///as modified by modules. (See \file TextClass.h for the typedef.)
TextClassPtr getTextClassPtr() const;
///Set the LyX TextClass---layout file---this document is using.
///This does NOT call makeTextClass() and so should be used with

View File

@ -30,7 +30,6 @@
#include "LyXFunc.h"
#include "LyXRC.h"
#include "Text.h"
#include "TextClassPtr.h"
#include "TextClassList.h"
#include "Paragraph.h"
#include "paragraph_funcs.h"

View File

@ -15,7 +15,7 @@
#define CUTANDPASTE_H
#include "support/docstring.h"
#include "TextClassPtr.h"
#include "TextClass.h"
#include <vector>

View File

@ -23,12 +23,14 @@
#include "LyXFunc.h"
#include "BranchList.h"
#include "Buffer.h"
#include "buffer_funcs.h"
#include "Buffer.h"
#include "BufferList.h"
#include "BufferParams.h"
#include "BufferView.h"
#include "bufferview_funcs.h"
#include "BufferView.h"
#include "callback.h"
#include "Color.h"
#include "Cursor.h"
#include "CutAndPaste.h"
#include "debug.h"
@ -45,21 +47,20 @@
#include "Intl.h"
#include "KeyMap.h"
#include "Language.h"
#include "Color.h"
#include "Session.h"
#include "LyX.h"
#include "callback.h"
#include "Lexer.h"
#include "LyXAction.h"
#include "lyxfind.h"
#include "Lexer.h"
#include "LyX.h"
#include "LyXRC.h"
#include "Row.h"
#include "Server.h"
#include "TextClassList.h"
#include "LyXVC.h"
#include "Paragraph.h"
#include "ParIterator.h"
#include "ParagraphParameters.h"
#include "ParIterator.h"
#include "Row.h"
#include "Server.h"
#include "Session.h"
#include "TextClassList.h"
#include "ToolbarBackend.h"
#include "Undo.h"
#include "insets/InsetBox.h"

View File

@ -17,7 +17,7 @@
#include "KeySequence.h"
#include "lfuns.h"
#include "TextClassPtr.h"
#include "TextClass.h"
#include "support/docstring.h"

View File

@ -254,7 +254,6 @@ liblyxcore_la_SOURCES = \
Text3.cpp \
TextClass.cpp \
TextClass.h \
TextClass_ptr.h \
TextClassList.cpp \
TextClassList.h \
TextMetrics.cpp \

View File

@ -16,7 +16,6 @@
#include "support/FileName.h"
#include "support/socktools.h"
#include "LyXFunc.h"
#include <boost/shared_ptr.hpp>
@ -27,6 +26,7 @@
namespace lyx {
class LyXDataSocket;
class LyXFunc;
/** Sockets can be in two states: listening and connected.

View File

@ -275,6 +275,12 @@ private:
/// convert page sides option to text 1 or 2
std::ostream & operator<<(std::ostream & os, TextClass::PageSides p);
/** Shared pointer for possibly modular layout. Needed so that paste,
* for example, will still be able to retain the pointer, even when
* the buffer itself is closed.
*/
typedef boost::shared_ptr<TextClass> TextClassPtr;
} // namespace lyx

View File

@ -1,28 +0,0 @@
// -*- C++ -*-
/**
* \file TextClass_ptr.h
* This file is part of LyX, the document processor.
* Licence details can be found in the file COPYING.
*
* \author Richard Heck
*
* Full author contact details are available in file CREDITS.
*/
#ifndef TEXTCLASS_PTR_H
#define TEXTCLASS_PTR_H
#include <boost/shared_ptr.hpp>
namespace lyx {
class TextClass;
/** Shared pointer for possibly modular layout. Needed so that paste,
* for example, will still be able to retain the pointer, even when
* the buffer itself is closed.
*/
typedef boost::shared_ptr<TextClass> TextClassPtr;
}
#endif

View File

@ -14,9 +14,7 @@
#define LYXVIEW_H
#include "frontends/Application.h"
#include "frontends/Toolbars.h"
#include "LyXFunc.h"
#include "support/docstring.h"
#include <boost/signal.hpp>
#include <boost/signals/trackable.hpp>
@ -33,13 +31,15 @@ class Buffer;
class BufferView;
class FuncRequest;
class Inset;
class LyXFunc;
class Timeout;
class ToolbarInfo;
namespace frontend {
class Dialogs;
class WorkArea;
class Toolbar;
class Toolbars;
/**
* LyXView - main LyX window
@ -110,7 +110,7 @@ public:
/// show busy cursor
virtual void busy(bool) = 0;
virtual Toolbars::ToolbarPtr makeToolbar(ToolbarInfo const & tbinfo, bool newline) = 0;
virtual Toolbar * makeToolbar(ToolbarInfo const & tbinfo, bool newline) = 0;
//@{ generic accessor functions

View File

@ -316,7 +316,7 @@ void Toolbars::clearLayoutList()
void Toolbars::add(ToolbarInfo const & tbinfo, bool newline)
{
ToolbarPtr tb_ptr = owner_.makeToolbar(tbinfo, newline);
ToolbarPtr tb_ptr(owner_.makeToolbar(tbinfo, newline));
toolbars_[tbinfo.name] = tb_ptr;
if (tbinfo.flags & ToolbarInfo::ON)

View File

@ -23,7 +23,7 @@
#ifndef TOOLBARS_H
#define TOOLBARS_H
#include "TextClassPtr.h"
#include "TextClass.h"
#include "ToolbarBackend.h"
#include "Session.h"

View File

@ -11,8 +11,6 @@
#include <config.h>
#include <boost/current_function.hpp>
// Qt defines a macro 'signals' that clashes with a boost namespace.
// All is well if the namespace is visible first.
#include "GuiView.h"
@ -21,6 +19,7 @@
#include "GuiPopupMenu.h"
#include "GuiMenubar.h"
#include "qt_helpers.h"
#include "LyXFunc.h"
#include "MenuBackend.h"
#include "support/lstrings.h"
@ -51,7 +50,7 @@ GuiPopupMenu::GuiPopupMenu(GuiMenubar * owner,
void GuiPopupMenu::updateView()
{
LYXERR(Debug::GUI) << BOOST_CURRENT_FUNCTION << endl;
LYXERR(Debug::GUI) << "GuiPopupMenu::updateView()" << endl;
LYXERR(Debug::GUI) << "\tTriggered menu: " << to_utf8(name_) << endl;
clear();

View File

@ -20,8 +20,9 @@
#include "FuncRequest.h"
#include "FuncStatus.h"
#include "gettext.h"
#include "LyXFunc.h"
#include "IconPalette.h"
#include "LyXFunc.h"
#include "ToolbarBackend.h"
#include "GuiView.h"
#include "GuiCommandBuffer.h"
@ -30,10 +31,11 @@
#include "Action.h"
#include "qt_helpers.h"
#include "InsertTableWidget.h"
#include "support/filetools.h"
#include "support/lstrings.h"
#include "controllers/ControlMath.h"
#include "ToolbarBackend.h"
#include <QComboBox>
#include <QToolBar>

View File

@ -774,7 +774,7 @@ void GuiViewBase::busy(bool yes)
}
Toolbars::ToolbarPtr GuiViewBase::makeToolbar(ToolbarInfo const & tbinfo, bool newline)
Toolbar * GuiViewBase::makeToolbar(ToolbarInfo const & tbinfo, bool newline)
{
GuiToolbar * toolBar = new GuiToolbar(tbinfo, *this);
@ -817,7 +817,7 @@ Toolbars::ToolbarPtr GuiViewBase::makeToolbar(ToolbarInfo const & tbinfo, bool n
toolBar->move(tbinfo.posx, tbinfo.posy);
*/
return Toolbars::ToolbarPtr(toolBar);
return toolBar;
}

View File

@ -64,7 +64,7 @@ public:
virtual void saveGeometry();
virtual void busy(bool);
/// add toolbar, if newline==true, add a toolbar break before the toolbar
Toolbars::ToolbarPtr makeToolbar(ToolbarInfo const & tbinfo, bool newline);
Toolbar * makeToolbar(ToolbarInfo const & tbinfo, bool newline);
virtual void updateStatusBar();
virtual void message(docstring const & str);
virtual void clearMessage();