resolve the layout.h <=> Layout.h conflict

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18099 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
André Pönitz 2007-04-29 22:04:32 +00:00
parent bdcf34ae9c
commit 757d5d67ac
9 changed files with 152 additions and 172 deletions

View File

@ -15,7 +15,6 @@
#define LYX_LAYOUT_H #define LYX_LAYOUT_H
#include "Font.h" #include "Font.h"
#include "layout.h"
#include "Spacing.h" #include "Spacing.h"
#include "support/docstring.h" #include "support/docstring.h"
@ -27,6 +26,146 @@ namespace lyx {
class Lexer; class Lexer;
class TextClass; class TextClass;
/// The different output types
enum OutputType {
///
LATEX = 1,
///
DOCBOOK,
///
LITERATE
};
/// The different margin types
enum LYX_MARGIN_TYPE {
///
MARGIN_MANUAL = 1,
///
MARGIN_FIRST_DYNAMIC,
///
MARGIN_DYNAMIC,
///
MARGIN_STATIC,
///
MARGIN_RIGHT_ADDRESS_BOX
};
///
enum LyXAlignment {
///
LYX_ALIGN_NONE = 0,
///
LYX_ALIGN_BLOCK = 1,
///
LYX_ALIGN_LEFT = 2,
///
LYX_ALIGN_RIGHT = 4,
///
LYX_ALIGN_CENTER = 8,
///
LYX_ALIGN_LAYOUT = 16,
///
LYX_ALIGN_SPECIAL = 32
};
///
inline
void operator|=(LyXAlignment & la1, LyXAlignment la2) {
la1 = static_cast<LyXAlignment>(la1 | la2);
}
/// The different LaTeX-Types
enum LYX_LATEX_TYPES {
///
LATEX_PARAGRAPH = 1,
///
LATEX_COMMAND,
///
LATEX_ENVIRONMENT,
///
LATEX_ITEM_ENVIRONMENT,
///
LATEX_BIB_ENVIRONMENT,
///
LATEX_LIST_ENVIRONMENT
};
/// The different title types
enum LYX_TITLE_LATEX_TYPES {
///
TITLE_COMMAND_AFTER = 1,
///
TITLE_ENVIRONMENT
};
/// The different label types
enum LYX_LABEL_TYPES {
///
LABEL_NO_LABEL,
///
LABEL_MANUAL,
///
LABEL_BIBLIO,
///
LABEL_TOP_ENVIRONMENT,
///
LABEL_CENTERED_TOP_ENVIRONMENT,
// the flushright labels following now must start with LABEL_STATIC
///
LABEL_STATIC,
///
LABEL_SENSITIVE,
///
LABEL_COUNTER,
///
LABEL_ENUMERATE,
///
LABEL_ITEMIZE
};
///
enum LYX_END_LABEL_TYPES {
///
END_LABEL_NO_LABEL,
///
END_LABEL_BOX,
///
END_LABEL_FILLED_BOX,
///
END_LABEL_STATIC,
///
END_LABEL_ENUM_FIRST = END_LABEL_NO_LABEL,
///
END_LABEL_ENUM_LAST = END_LABEL_STATIC
};
/* Fix labels are printed flushright, manual labels flushleft.
* MARGIN_MANUAL and MARGIN_FIRST_DYNAMIC are *only* for LABEL_MANUAL,
* MARGIN_DYNAMIC and MARGIN_STATIC are *not* for LABEL_MANUAL.
* This seems a funny restriction, but I think other combinations are
* not needed, so I will not change it yet.
* Correction: MARGIN_FIRST_DYNAMIC also usable with LABEL_STATIC
*/
/* There is a parindent and a parskip. Which one is used depends on the
* paragraph_separation-flag of the text-object.
* BUT: parindent is only thrown away, if a parskip is defined! So if you
* want a space between the paragraphs and a parindent at the same time,
* you should set parskip to zero and use topsep, parsep and bottomsep.
*
* The standard layout is an exception: its parindent is only set, if the
* previous paragraph is standard too. Well, this is LateX and it is good!
*/
/// ///
class Layout { class Layout {
public: public:

View File

@ -17,7 +17,7 @@
#include "Bidi.h" #include "Bidi.h"
#include "DispatchResult.h" #include "DispatchResult.h"
#include "Font.h" #include "Font.h"
#include "layout.h" #include "Layout.h"
#include "lyxlayout_ptr_fwd.h" #include "lyxlayout_ptr_fwd.h"
#include "ParagraphList.h" #include "ParagraphList.h"

View File

@ -159,7 +159,8 @@ lyx_SOURCES = \
LaTeXFeatures.cpp \ LaTeXFeatures.cpp \
LaTeXFeatures.h \ LaTeXFeatures.h \
LaTeX.h \ LaTeX.h \
layout.h \ Layout.cpp \
Layout.h \
Length.cpp \ Length.cpp \
Length.h \ Length.h \
lengthcommon.cpp \ lengthcommon.cpp \
@ -177,8 +178,6 @@ lyx_SOURCES = \
LyXFunc.cpp \ LyXFunc.cpp \
LyXFunc.h \ LyXFunc.h \
LyX.h \ LyX.h \
Layout.cpp \
Layout.h \
lyxlayout_ptr_fwd.h \ lyxlayout_ptr_fwd.h \
LyXRC.cpp \ LyXRC.cpp \
LyXRC.h \ LyXRC.h \

View File

@ -14,7 +14,7 @@
#ifndef PARAGRAPHPARAMETERS_H #ifndef PARAGRAPHPARAMETERS_H
#define PARAGRAPHPARAMETERS_H #define PARAGRAPHPARAMETERS_H
#include "layout.h" #include "Layout.h"
#include "Length.h" #include "Length.h"
#include "Spacing.h" #include "Spacing.h"

View File

@ -13,7 +13,7 @@
#define CONTROLPARAGRAPH_H #define CONTROLPARAGRAPH_H
#include "Dialog.h" #include "Dialog.h"
#include "layout.h" // for LyXAlignment #include "Layout.h" // for LyXAlignment
namespace lyx { namespace lyx {

View File

@ -18,7 +18,6 @@
#include "debug.h" #include "debug.h"
#include "ParagraphParameters.h" #include "ParagraphParameters.h"
#include "Spacing.h" #include "Spacing.h"
#include "layout.h"
#include "controllers/ControlParagraph.h" #include "controllers/ControlParagraph.h"
#include "controllers/frontend_helpers.h" #include "controllers/frontend_helpers.h"

View File

@ -15,11 +15,13 @@
#include "QDialogView.h" #include "QDialogView.h"
#include <map> #include "Layout.h"
#include "ui/ParagraphUi.h"
#include <QDialog> #include <QDialog>
#include <QCloseEvent> #include <QCloseEvent>
#include "layout.h"
#include "ui/ParagraphUi.h" #include <map>
namespace lyx { namespace lyx {
namespace frontend { namespace frontend {

View File

@ -1,159 +0,0 @@
// -*- C++ -*-
/**
* \file layout.h
* This file is part of LyX, the document processor.
* Licence details can be found in the file COPYING.
*
* \author Lars Gullik Bjønnes
* \author Jean-Marc Lasgouttes
*
* Full author contact details are available in file CREDITS.
*/
#ifndef LAYOUT_H
#define LAYOUT_H
namespace lyx {
/// The different output types
enum OutputType {
///
LATEX = 1,
///
DOCBOOK,
///
LITERATE
};
/// The different margin types
enum LYX_MARGIN_TYPE {
///
MARGIN_MANUAL = 1,
///
MARGIN_FIRST_DYNAMIC,
///
MARGIN_DYNAMIC,
///
MARGIN_STATIC,
///
MARGIN_RIGHT_ADDRESS_BOX
};
///
enum LyXAlignment {
///
LYX_ALIGN_NONE = 0,
///
LYX_ALIGN_BLOCK = 1,
///
LYX_ALIGN_LEFT = 2,
///
LYX_ALIGN_RIGHT = 4,
///
LYX_ALIGN_CENTER = 8,
///
LYX_ALIGN_LAYOUT = 16,
///
LYX_ALIGN_SPECIAL = 32
};
///
inline
void operator|=(LyXAlignment & la1, LyXAlignment la2) {
la1 = static_cast<LyXAlignment>(la1 | la2);
}
/// The different LaTeX-Types
enum LYX_LATEX_TYPES {
///
LATEX_PARAGRAPH = 1,
///
LATEX_COMMAND,
///
LATEX_ENVIRONMENT,
///
LATEX_ITEM_ENVIRONMENT,
///
LATEX_BIB_ENVIRONMENT,
///
LATEX_LIST_ENVIRONMENT
};
/// The different title types
enum LYX_TITLE_LATEX_TYPES {
///
TITLE_COMMAND_AFTER = 1,
///
TITLE_ENVIRONMENT
};
/// The different label types
enum LYX_LABEL_TYPES {
///
LABEL_NO_LABEL,
///
LABEL_MANUAL,
///
LABEL_BIBLIO,
///
LABEL_TOP_ENVIRONMENT,
///
LABEL_CENTERED_TOP_ENVIRONMENT,
// the flushright labels following now must start with LABEL_STATIC
///
LABEL_STATIC,
///
LABEL_SENSITIVE,
///
LABEL_COUNTER,
///
LABEL_ENUMERATE,
///
LABEL_ITEMIZE
};
///
enum LYX_END_LABEL_TYPES {
///
END_LABEL_NO_LABEL,
///
END_LABEL_BOX,
///
END_LABEL_FILLED_BOX,
///
END_LABEL_STATIC,
///
END_LABEL_ENUM_FIRST = END_LABEL_NO_LABEL,
///
END_LABEL_ENUM_LAST = END_LABEL_STATIC
};
/* Fix labels are printed flushright, manual labels flushleft.
* MARGIN_MANUAL and MARGIN_FIRST_DYNAMIC are *only* for LABEL_MANUAL,
* MARGIN_DYNAMIC and MARGIN_STATIC are *not* for LABEL_MANUAL.
* This seems a funny restriction, but I think other combinations are
* not needed, so I will not change it yet.
* Correction: MARGIN_FIRST_DYNAMIC also usable with LABEL_STATIC
*/
/* There is a parindent and a parskip. Which one is used depends on the
* paragraph_separation-flag of the text-object.
* BUT: parindent is only thrown away, if a parskip is defined! So if you
* want a space between the paragraphs and a parindent at the same time,
* you should set parskip to zero and use topsep, parsep and bottomsep.
*
* The standard layout is an exception: its parindent is only set, if the
* previous paragraph is standard too. Well, this is LateX and it is good!
*/
} // namespace lyx
#endif

View File

@ -14,9 +14,9 @@
#include "tex2lyx.h" #include "tex2lyx.h"
#include "layout.h" #include "Layout.h"
#include "TextClass.h"
#include "Lexer.h" #include "Lexer.h"
#include "TextClass.h"
#include "support/filetools.h" #include "support/filetools.h"
#include "support/lstrings.h" #include "support/lstrings.h"