]> git.lyx.org Git - features.git/commitdiff
make NEW_TABULAR default, some GUIRunTime changes
authorLars Gullik Bjønnes <larsbj@gullik.org>
Tue, 22 Aug 2000 18:28:11 +0000 (18:28 +0000)
committerLars Gullik Bjønnes <larsbj@gullik.org>
Tue, 22 Aug 2000 18:28:11 +0000 (18:28 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@983 a592a061-630c-0410-9148-cb99ea01b6c8

21 files changed:
src/WorkArea.C
src/frontends/GUIRunTime.C [deleted file]
src/frontends/GUIRunTime.h
src/frontends/Makefile.am
src/frontends/gnome/GUIRunTime.C [new file with mode: 0644]
src/frontends/gnome/GUIRunTime_pimpl.C [deleted file]
src/frontends/gnome/GUIRunTime_pimpl.h [deleted file]
src/frontends/gnome/Makefile.am
src/frontends/kde/GUIRunTime.C [new file with mode: 0644]
src/frontends/kde/GUIRunTime_pimpl.C [deleted file]
src/frontends/kde/GUIRunTime_pimpl.h [deleted file]
src/frontends/kde/Makefile.am
src/frontends/xforms/GUIRunTime.C [new file with mode: 0644]
src/frontends/xforms/GUIRunTime_pimpl.C [deleted file]
src/frontends/xforms/GUIRunTime_pimpl.h [deleted file]
src/frontends/xforms/Makefile.am
src/lyx_gui.C
src/lyx_gui_misc.C
src/lyxfunc.C
src/lyxparagraph.h
src/text2.C

index ca9bd91de144b5a0bfe1d53981fc39e69f94fab0..83f343228cbabbf7edab49c9c7358a4659604e9e 100644 (file)
@@ -29,7 +29,7 @@ FL_OBJECT * figinset_canvas;
 
 // needed to make the c++ compiler find the correct version of abs.
 // This is at least true for g++.
-using std::abs;
+//using std::abs;
 
 static inline
 void waitForX()
diff --git a/src/frontends/GUIRunTime.C b/src/frontends/GUIRunTime.C
deleted file mode 100644 (file)
index e3e6d0a..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-/* This file is part of
- * ====================================================== 
- * 
- *           LyX, The Document Processor
- *
- *           Copyright 2000 The LyX Team.
- *
- *           @author Jürgen Vigna
- *
- * ====================================================== */
-
-
-#include <config.h>
-
-#ifdef __GNUG__
-#pragma implementation
-#endif
-
-#include "GUIRunTime.h"
-#include "GUIRunTime_pimpl.h"
-
-GUIRunTime::GUIRunTime()
-{
-       pimpl_ = new Pimpl;
-}
-
-
-GUIRunTime::~GUIRunTime()
-{
-       delete pimpl_;
-}
-
-
-void GUIRunTime::processEvents()
-{
-       pimpl_->processEvents();
-}
-
-
-void GUIRunTime::runTime() 
-{
-       pimpl_->runTime();
-}
index fcf0289be18c4479991b5204d309ce9bf77131a2..42f6ec10a795d9716e3a467bb6e6198f2fc7f1ea 100644 (file)
@@ -6,8 +6,6 @@
  *
  *           Copyright 2000 The LyX Team.
  *
- *           @author Jürgen Vigna
- *
  * ====================================================== */
 
 #ifndef GUIRUNTIME_H
 class LyXView;
 
 /** The LyX GUI independent guiruntime class
-  The GUI interface is implemented in the corresponding GUIRunTime_pimpl class.
-  */
+    The GUI interface is implemented in the corresponding
+    frontends GUIRunTime.C file.
+*/
 class GUIRunTime {
 public:
-    ///
-    GUIRunTime();
-    ///
-    ~GUIRunTime();
-    ///
-    void processEvents();
-    ///
-    void runTime();
-       
-    struct Pimpl;
-    friend struct Pimpl;
-    
-private:
-    ///
-    Pimpl * pimpl_;
+       ///
+       static
+       void processEvents();
+       ///
+       static
+       void runTime();
 };
 #endif
index bf382d6ee8396725a5b19e183e6f5723a54f779b..2f826473b160b7b7e3ae94e9beb5df70cf057f17 100644 (file)
@@ -14,7 +14,6 @@ libfrontends_la_SOURCES=\
        ButtonPolicies.h \
        Dialogs.h \
        DialogBase.h \
-       GUIRunTime.C \
        GUIRunTime.h \
        Liason.C \
        Liason.h \
diff --git a/src/frontends/gnome/GUIRunTime.C b/src/frontends/gnome/GUIRunTime.C
new file mode 100644 (file)
index 0000000..24b53c2
--- /dev/null
@@ -0,0 +1,44 @@
+/* This file is part of
+ * ======================================================
+ * 
+ *           LyX, The Document Processor
+ *      
+ *           Copyright 2000 The LyX Team.
+ *
+ *======================================================*/
+
+#include <config.h>
+
+#ifdef __GNUG__
+#pragma implementation
+#endif
+
+#include FORMS_H_LOCATION
+
+#include "GUIRunTime.h"
+#include "debug.h"
+
+#include <gnome--/main.h>
+
+using std::endl;
+
+extern bool finished;
+
+void GUIRunTime::processEvents() 
+{
+       while(Gnome::Main::instance()->events_pending())
+               Gnome::Main::instance()->iteration(FALSE);
+}
+
+
+void GUIRunTime::runTime()
+{
+       XEvent ev;
+       while (!finished) {
+               processEvents();
+               if (fl_check_forms() == FL_EVENT) {
+                       lyxerr << "LyX: This shouldn't happen..." << endl;
+                       fl_XNextEvent(&ev);
+               }
+       }
+}
diff --git a/src/frontends/gnome/GUIRunTime_pimpl.C b/src/frontends/gnome/GUIRunTime_pimpl.C
deleted file mode 100644 (file)
index 47f6158..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-/* This file is part of
- * ======================================================
- * 
- *           LyX, The Document Processor
- *      
- *           Copyright (C) 2000 The LyX Team.
- *
- *           @author Jürgen Vigna
- *
- *======================================================*/
-
-#include <config.h>
-
-#ifdef __GNUG__
-#pragma implementation
-#endif
-
-#include FORMS_H_LOCATION
-
-#include "GUIRunTime_pimpl.h"
-#include "debug.h"
-
-#include <gnome--/main.h>
-
-using std::endl;
-
-extern bool finished;
-
-void GUIRunTime::Pimpl::processEvents() 
-{
-    while(Gnome::Main::instance()->events_pending())
-       Gnome::Main::instance()->iteration(FALSE);
-}
-
-
-void GUIRunTime::Pimpl::runTime()
-{
-       XEvent ev;
-       while (!finished) {
-               Pimpl::processEvents();
-               if (fl_check_forms() == FL_EVENT) {
-                       lyxerr << "LyX: This shouldn't happen..." << endl;
-                       fl_XNextEvent(&ev);
-               }
-       }
-}
diff --git a/src/frontends/gnome/GUIRunTime_pimpl.h b/src/frontends/gnome/GUIRunTime_pimpl.h
deleted file mode 100644 (file)
index 46b976d..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-// -*- C++ -*-
-/* This file is part of
- * ======================================================
- * 
- *           LyX, The Document Processor
- *
- *           Copyright 2000 The LyX Team.
- *
- *           @author Jürgen Vigna
- *
- * ====================================================== */
-
-#ifndef GUIRUNTIME_PIMPL_H
-#define GUIRUNTIME_PIMPL_H
-
-#ifdef __GNUG__
-#pragma interface
-#endif
-
-#include "frontends/GUIRunTime.h"
-
-/*
- *    The GUI interface for runtime GUI stuff.
- */
-struct GUIRunTime::Pimpl {
-public:
-    ///
-    static void processEvents();
-    ///
-    static void runTime();
-};
-#endif
index 280099b148368ebec0457b368d6ff39fb69fab21..b15999872abbbe8eaffeceb2ccaec6494225e93a 100644 (file)
@@ -32,8 +32,7 @@ LYXDATADIRS =
 #ETAGS_ARGS = --lang=c++
 libgnome_la_SOURCES = \
        Dialogs.C \
-       GUIRunTime_pimpl.C \
-       GUIRunTime_pimpl.h \
+       GUIRunTime.C \
        FormCopyright.C \
        FormCopyright.h \
        FormPrint.C \
diff --git a/src/frontends/kde/GUIRunTime.C b/src/frontends/kde/GUIRunTime.C
new file mode 100644 (file)
index 0000000..1228e00
--- /dev/null
@@ -0,0 +1,45 @@
+/* This file is part of
+ * ======================================================
+ * 
+ *           LyX, The Document Processor
+ *      
+ *           Copyright 2000 The LyX Team.
+ *
+ * ====================================================== */
+
+#include <config.h>
+
+#ifdef __GNUG__
+#pragma implementation
+#endif
+
+#include "GUIRunTime.h"
+#include "debug.h"
+
+#include <kapp.h>
+
+#include FORMS_H_LOCATION
+
+using std::endl;
+
+extern bool finished;
+
+
+void GUIRunTime::processEvents() 
+{
+       kapp->processEvents();
+}
+
+
+void GUIRunTime::runTime()
+{
+       // We still use xforms event handler as the main one...
+       XEvent ev;
+       while (!finished) {
+               processEvents();
+               if (fl_check_forms() == FL_EVENT) {
+                       lyxerr << "LyX: This shouldn't happen..." << endl;
+                       fl_XNextEvent(&ev);
+               }
+       }
+}
diff --git a/src/frontends/kde/GUIRunTime_pimpl.C b/src/frontends/kde/GUIRunTime_pimpl.C
deleted file mode 100644 (file)
index bb0afcc..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-/* This file is part of
- * ======================================================
- * 
- *           LyX, The Document Processor
- *      
- *           Copyright (C) 2000 The LyX Team.
- *
- *           @author Jürgen Vigna
- *
- *======================================================*/
-
-#include <config.h>
-
-#ifdef __GNUG__
-#pragma implementation
-#endif
-
-#include "GUIRunTime_pimpl.h"
-#include "debug.h"
-
-#include <kapp.h>
-
-#include FORMS_H_LOCATION
-
-using std::endl;
-
-extern bool finished;
-
-
-void GUIRunTime::Pimpl::processEvents() 
-{
-    kapp->processEvents();
-}
-
-
-void GUIRunTime::Pimpl::runTime()
-{
-       // We still use xforms event handler as te main one...
-       XEvent ev;
-       while (!finished) {
-               Pimpl::processEvents();
-               if (fl_check_forms() == FL_EVENT) {
-                       lyxerr << "LyX: This shouldn't happen..." << endl;
-                       fl_XNextEvent(&ev);
-               }
-       }
-}
-
diff --git a/src/frontends/kde/GUIRunTime_pimpl.h b/src/frontends/kde/GUIRunTime_pimpl.h
deleted file mode 100644 (file)
index 3d6d0a2..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-// -*- C++ -*-
-/* This file is part of
- * ======================================================
- * 
- *           LyX, The Document Processor
- *
- *           Copyright 2000 The LyX Team.
- *
- *           @author Jürgen Vigna
- *
- * ====================================================== */
-
-#ifndef GUIRUNTIME_PIMPL_H
-#define GUIRUNTIME_PIMPL_H
-
-#ifdef __GNUG__
-#pragma interface
-#endif
-
-#include "frontends/GUIRunTime.h"
-
-/**
-   The GUI interface for runtime GUI stuff.
-*/
-struct GUIRunTime::Pimpl {
-public:
-    ///
-    static void processEvents();
-    ///
-    static void runTime();
-};
-#endif
index c6a06c51d5f22716fa00e5c2343a04aa3f02f856..f2ae6f3b8202078ee11ccb1f9879e053a4ef508c 100644 (file)
@@ -42,8 +42,7 @@ LYXDATADIRS = dlg
 ETAGS_ARGS = --lang=c++
 libkde_la_SOURCES = \
        Dialogs.C \
-       GUIRunTime_pimpl.C \
-       GUIRunTime_pimpl.h \
+       GUIRunTime.C \
        FormCopyright.C \
        FormCopyright.h \
        formcopyrightdialog.C \
@@ -79,7 +78,7 @@ dist-hook:
 # add a dependency for every moc file to be full portable
 # I've added a key binding to emacs for this. 
 
-formcopyrightdialog.C:formcopyrightdialog_moc.C
+formcopyrightdialog.C: formcopyrightdialog_moc.C
 formcopyrightdialog_moc.C: formcopyrightdialog.h
        $(MOC) formcopyrightdialog.h -o formcopyrightdialog_moc.C
 
diff --git a/src/frontends/xforms/GUIRunTime.C b/src/frontends/xforms/GUIRunTime.C
new file mode 100644 (file)
index 0000000..b7763ba
--- /dev/null
@@ -0,0 +1,46 @@
+/* This file is part of
+ * ======================================================
+ * 
+ *           LyX, The Document Processor
+ *      
+ *           Copyright 2000 The LyX Team.
+ *
+ *======================================================*/
+
+#include <config.h>
+
+#ifdef __GNUG__
+#pragma implementation
+#endif
+
+#include FORMS_H_LOCATION
+#include "GUIRunTime.h"
+#include "debug.h"
+
+using std::endl;
+
+extern bool finished;
+
+
+void GUIRunTime::processEvents() 
+{
+    XEvent ev;
+
+    if (fl_do_forms() == FL_EVENT) {
+       lyxerr << "LyX: This shouldn't happen..." << endl;
+       fl_XNextEvent(&ev);
+    }
+}
+
+
+void GUIRunTime::runTime()
+{
+       XEvent ev;
+       while (!finished) {
+               if (fl_check_forms() == FL_EVENT) {
+                       lyxerr << "LyX: This shouldn't appen..." << endl;
+                       fl_XNextEvent(&ev);
+               }
+       }
+}
+
diff --git a/src/frontends/xforms/GUIRunTime_pimpl.C b/src/frontends/xforms/GUIRunTime_pimpl.C
deleted file mode 100644 (file)
index 71911e8..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-/* This file is part of
- * ======================================================
- * 
- *           LyX, The Document Processor
- *      
- *           Copyright (C) 2000 The LyX Team.
- *
- *           @author Jürgen Vigna
- *
- *======================================================*/
-
-#include <config.h>
-
-#ifdef __GNUG__
-#pragma implementation
-#endif
-
-#include FORMS_H_LOCATION
-#include "GUIRunTime_pimpl.h"
-#include "debug.h"
-
-using std::endl;
-
-extern bool finished;
-
-
-void GUIRunTime::Pimpl::processEvents() 
-{
-    XEvent ev;
-
-    if (fl_do_forms() == FL_EVENT) {
-       lyxerr << "LyX: This shouldn't happen..." << endl;
-       fl_XNextEvent(&ev);
-    }
-}
-
-
-void GUIRunTime::Pimpl::runTime()
-{
-       XEvent ev;
-       while (!finished) {
-               if (fl_check_forms() == FL_EVENT) {
-                       lyxerr << "LyX: This shouldn't appen..." << endl;
-                       fl_XNextEvent(&ev);
-               }
-       }
-}
-
diff --git a/src/frontends/xforms/GUIRunTime_pimpl.h b/src/frontends/xforms/GUIRunTime_pimpl.h
deleted file mode 100644 (file)
index 3d6d0a2..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-// -*- C++ -*-
-/* This file is part of
- * ======================================================
- * 
- *           LyX, The Document Processor
- *
- *           Copyright 2000 The LyX Team.
- *
- *           @author Jürgen Vigna
- *
- * ====================================================== */
-
-#ifndef GUIRUNTIME_PIMPL_H
-#define GUIRUNTIME_PIMPL_H
-
-#ifdef __GNUG__
-#pragma interface
-#endif
-
-#include "frontends/GUIRunTime.h"
-
-/**
-   The GUI interface for runtime GUI stuff.
-*/
-struct GUIRunTime::Pimpl {
-public:
-    ///
-    static void processEvents();
-    ///
-    static void runTime();
-};
-#endif
index 7e72aae09cdf3685ea7458e7a7f3596f5e597bb2..4f4b415ec1380a7800ed3f17742df3fbb22d6cb4 100644 (file)
@@ -13,8 +13,7 @@ ETAGS_ARGS = --lang=c++
 libxforms_la_SOURCES = \
        ButtonController.h \
        Dialogs.C \
-       GUIRunTime_pimpl.C \
-       GUIRunTime_pimpl.h \
+       GUIRunTime.C \
        FormCitation.C \
        FormCitation.h \
        form_citation.C \
index f432f5363d47a8aa4debcec0bc24297f4e6a5d45..04d4c32f1c4aa13a90e084e63e745d23638462d8 100644 (file)
@@ -564,8 +564,7 @@ void LyXGUI::runTime()
 {
        if (!gui) return;
 
-       GUIRunTime grt;
-       grt.runTime();
+       GUIRunTime::runTime();
 }
 
 
index bbeea7c3dbe1a56b64b3d20b725352c2fb6eb07f..1379eea4b3719416af18e0b5e9f587a91247856a 100644 (file)
@@ -201,9 +201,11 @@ void updateAllVisibleBufferRelatedDialogs()
        if (fd_form_paragraph_extra->form_paragraph_extra->visible) {
                UpdateParagraphExtra();
        }
+#ifndef NEW_TABULAR
        if (fd_form_table_options->form_table_options->visible) {
                UpdateLayoutTable(1); // just like a right mouse click
        }
+#endif
        if (fd_form_bullet) {
                if (fd_form_bullet->form_bullet->visible) {
                        updateBulletForm();
index b5fed2e3a4c1f9070710fbb8bf304102fb6b2a07..ea555cff61e8bfed8ae7fcaad3ec832bce113610 100644 (file)
@@ -262,10 +262,6 @@ int LyXFunc::processKeySym(KeySym keysym, unsigned int state)
                lyxerr << "Key ["
                       << action << "]["
                       << buf << "]"
-#if 0
-                      << "["
-                      << num_bytes << "]"
-#endif
                       << endl;
        }
 
@@ -301,12 +297,7 @@ int LyXFunc::processKeySym(KeySym keysym, unsigned int state)
                        return 0;
                }
        }
-#if 0
-       else
-               if (action == LFUN_SELFINSERT) {
-                       argument = s_r[0];
-               }
-#endif
+
         bool tmp_sc = show_sc;
        show_sc = false;
        Dispatch(action, argument.c_str());
index 31589a68bf8391c4bae81b45d9be048a6c97602a..b868eb88111f44d6a7134006abda2de819201c3d 100644 (file)
@@ -39,7 +39,7 @@ class BufferView;
 
 // I dare you to try this one too. It is ortogonal with NEW_INSETS so you
 // can try both or just one of them.
-//#define NEW_TABULAR 1
+#define NEW_TABULAR 1
 
 /// A LyXParagraph holds all text, attributes and insets in a text paragraph
 class LyXParagraph  {
index 9542fc6a3b0226a404d5f86436615dab249f601a..f2d5876271b9c893568cc9d97e6e3dc1ed909ef5 100644 (file)
@@ -1376,7 +1376,11 @@ void LyXText::MeltFootnoteEnvironment(BufferView * bview)
                tmppar->next->MakeSameLayout(cursor.par());
 
        // first the end
-       if ((!tmppar->GetLayout() && !tmppar->table)
+       if ((!tmppar->GetLayout()
+#ifndef NEW_TABULAR
+            && !tmppar->table
+#endif
+               )
            || (tmppar->Next()
                && (!tmppar->Next()->Last()
                    || tmppar->Next()->HasSameLayout(tmppar)))) {
@@ -1393,7 +1397,11 @@ void LyXText::MeltFootnoteEnvironment(BufferView * bview)
        /* if there is no space between the text and the footnote, so we insert
         * a blank 
         * (only if the previous par and the footnotepar are not empty!) */
-       if ((!firsttmppar->next->GetLayout() && !firsttmppar->next->table)
+       if ((!firsttmppar->next->GetLayout()
+#ifndef NEW_TABULAR
+            && !firsttmppar->next->table
+#endif
+               )
            || firsttmppar->HasSameLayout(firsttmppar->next)) {
                if (firsttmppar->size()
                    && !firsttmppar->IsSeparator(firsttmppar->size() - 1)