]> git.lyx.org Git - lyx.git/commitdiff
Forgotten files ;-)
authorAngus Leeming <leeming@lyx.org>
Sat, 26 Jul 2003 00:17:21 +0000 (00:17 +0000)
committerAngus Leeming <leeming@lyx.org>
Sat, 26 Jul 2003 00:17:21 +0000 (00:17 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7363 a592a061-630c-0410-9148-cb99ea01b6c8

src/tex2lyx/Spacing.h [new file with mode: 0644]
src/tex2lyx/gettext.C [new file with mode: 0644]
src/tex2lyx/gettext.h [new file with mode: 0644]
src/tex2lyx/lyxfont.C [new file with mode: 0644]
src/tex2lyx/lyxfont.h [new file with mode: 0644]

diff --git a/src/tex2lyx/Spacing.h b/src/tex2lyx/Spacing.h
new file mode 100644 (file)
index 0000000..6138139
--- /dev/null
@@ -0,0 +1,29 @@
+// -*- C++ -*-
+/**
+ *  \file Spacing.h
+ * This file is part of LyX, the document processor.
+ * Licence details can be found in the file COPYING.
+ *
+ *  \author Angus Leeming
+ *
+ *  Full author contact details are available in file CREDITS
+ */
+
+#ifndef SPACING_H
+#define SPACING_H
+
+class Spacing {
+public:
+       ///
+       enum Space {
+               Single,
+               Onehalf,
+               Double,
+               Other,
+               Default
+       };
+
+       void set(Spacing::Space, float = 1.0) {}
+};
+
+#endif // NOT SPACING_H
diff --git a/src/tex2lyx/gettext.C b/src/tex2lyx/gettext.C
new file mode 100644 (file)
index 0000000..22a98a9
--- /dev/null
@@ -0,0 +1,23 @@
+/**
+ * \file gettext.C
+ * 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
+ */
+
+#include <config.h>
+
+#include "gettext.h"
+
+string const _(string const & str)
+{
+       return str;
+}
+
+
+void locale_init()
+{}
diff --git a/src/tex2lyx/gettext.h b/src/tex2lyx/gettext.h
new file mode 100644 (file)
index 0000000..2b4b351
--- /dev/null
@@ -0,0 +1,25 @@
+// -*- C++ -*-
+/**
+ * \file gettext.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 GETTEXT_H
+#define GETTEXT_H
+
+#include "LString.h"
+
+///
+string const _(string const &);
+
+#define N_(str) (str)              // for detecting static strings
+
+///
+void locale_init();
+
+#endif
diff --git a/src/tex2lyx/lyxfont.C b/src/tex2lyx/lyxfont.C
new file mode 100644 (file)
index 0000000..f58fe16
--- /dev/null
@@ -0,0 +1,50 @@
+/**
+ *  \file lyxfont.C
+ *  This file is part of LyX, the document processor.
+ *  Licence details can be found in the file COPYING.
+ *
+ *  \author Angus Leeming
+ *
+ *  Full author contact details are available in file CREDITS
+ */
+
+#include <config.h>
+
+#include "lyxfont.h"
+#include "lyxlex.h"
+#include "support/lstrings.h"
+
+using namespace lyx::support;
+
+
+LyXFont & LyXFont::lyxRead(LyXLex & lex)
+{
+       bool error = false;
+       bool finished = false;
+       while (!finished && lex.isOK() && !error) {
+               lex.next();
+               string const tok = ascii_lowercase(lex.getString());
+
+               if (tok.empty()) {
+                       continue;
+               } else if (tok == "endfont") {
+                       finished = true;
+               } else if (tok == "family") {
+                       lex.next();
+               } else if (tok == "series") {
+                       lex.next();
+               } else if (tok == "shape") {
+                       lex.next();
+               } else if (tok == "size") {
+                       lex.next();
+               } else if (tok == "misc") {
+                       lex.next();
+               } else if (tok == "color") {
+                       lex.next();
+               } else {
+                       lex.printError("Unknown tag `$$Token'");
+                       error = true;
+               }
+       }
+       return *this;
+}
diff --git a/src/tex2lyx/lyxfont.h b/src/tex2lyx/lyxfont.h
new file mode 100644 (file)
index 0000000..1f7bd5a
--- /dev/null
@@ -0,0 +1,33 @@
+// -*- C++ -*-
+/**
+ *  \file lyxfont.h
+ * This file is part of LyX, the document processor.
+ * Licence details can be found in the file COPYING.
+ *
+ *  \author Angus Leeming
+ *
+ *  Full author contact details are available in file CREDITS
+ */
+
+#ifndef LYXFONT_H
+#define LYXFONT_H
+
+class LyXLex;
+
+class LyXFont {
+public:
+       /// Trick to overload constructor and make it megafast
+       enum FONT_INIT1 { ALL_INHERIT };
+       enum FONT_INIT3 { ALL_SANE };
+
+       LyXFont() {}
+       explicit LyXFont(LyXFont::FONT_INIT1) {}
+       explicit LyXFont(LyXFont::FONT_INIT3) {}
+
+       LyXFont & lyxRead(LyXLex &);
+
+       LyXFont & realize(LyXFont const &) { return *this; }
+       bool resolved() const { return true; }
+};
+
+#endif // NOT LYXFONT_H