make NEW_TABULAR default, some GUIRunTime changes

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@983 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Lars Gullik Bjønnes 2000-08-22 18:28:11 +00:00
parent 6718758100
commit eff9b6b7c9
18 changed files with 48 additions and 208 deletions

View 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()

View File

@ -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();
}

View File

@ -6,8 +6,6 @@
*
* Copyright 2000 The LyX Team.
*
* @author Jürgen Vigna
*
* ====================================================== */
#ifndef GUIRUNTIME_H
@ -20,24 +18,16 @@
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

View File

@ -14,7 +14,6 @@ libfrontends_la_SOURCES=\
ButtonPolicies.h \
Dialogs.h \
DialogBase.h \
GUIRunTime.C \
GUIRunTime.h \
Liason.C \
Liason.h \

View File

@ -3,9 +3,7 @@
*
* LyX, The Document Processor
*
* Copyright (C) 2000 The LyX Team.
*
* @author Jürgen Vigna
* Copyright 2000 The LyX Team.
*
*======================================================*/
@ -17,7 +15,7 @@
#include FORMS_H_LOCATION
#include "GUIRunTime_pimpl.h"
#include "GUIRunTime.h"
#include "debug.h"
#include <gnome--/main.h>
@ -26,18 +24,18 @@ using std::endl;
extern bool finished;
void GUIRunTime::Pimpl::processEvents()
void GUIRunTime::processEvents()
{
while(Gnome::Main::instance()->events_pending())
Gnome::Main::instance()->iteration(FALSE);
while(Gnome::Main::instance()->events_pending())
Gnome::Main::instance()->iteration(FALSE);
}
void GUIRunTime::Pimpl::runTime()
void GUIRunTime::runTime()
{
XEvent ev;
while (!finished) {
Pimpl::processEvents();
processEvents();
if (fl_check_forms() == FL_EVENT) {
lyxerr << "LyX: This shouldn't happen..." << endl;
fl_XNextEvent(&ev);

View File

@ -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

View 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 \

View File

@ -3,11 +3,9 @@
*
* LyX, The Document Processor
*
* Copyright (C) 2000 The LyX Team.
* Copyright 2000 The LyX Team.
*
* @author Jürgen Vigna
*
*======================================================*/
* ====================================================== */
#include <config.h>
@ -15,7 +13,7 @@
#pragma implementation
#endif
#include "GUIRunTime_pimpl.h"
#include "GUIRunTime.h"
#include "debug.h"
#include <kapp.h>
@ -27,22 +25,21 @@ using std::endl;
extern bool finished;
void GUIRunTime::Pimpl::processEvents()
void GUIRunTime::processEvents()
{
kapp->processEvents();
kapp->processEvents();
}
void GUIRunTime::Pimpl::runTime()
void GUIRunTime::runTime()
{
// We still use xforms event handler as te main one...
// We still use xforms event handler as the main one...
XEvent ev;
while (!finished) {
Pimpl::processEvents();
processEvents();
if (fl_check_forms() == FL_EVENT) {
lyxerr << "LyX: This shouldn't happen..." << endl;
fl_XNextEvent(&ev);
}
}
}

View File

@ -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

View 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

View File

@ -3,9 +3,7 @@
*
* LyX, The Document Processor
*
* Copyright (C) 2000 The LyX Team.
*
* @author Jürgen Vigna
* Copyright 2000 The LyX Team.
*
*======================================================*/
@ -16,7 +14,7 @@
#endif
#include FORMS_H_LOCATION
#include "GUIRunTime_pimpl.h"
#include "GUIRunTime.h"
#include "debug.h"
using std::endl;
@ -24,7 +22,7 @@ using std::endl;
extern bool finished;
void GUIRunTime::Pimpl::processEvents()
void GUIRunTime::processEvents()
{
XEvent ev;
@ -35,7 +33,7 @@ void GUIRunTime::Pimpl::processEvents()
}
void GUIRunTime::Pimpl::runTime()
void GUIRunTime::runTime()
{
XEvent ev;
while (!finished) {

View File

@ -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

View 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 \

View File

@ -564,8 +564,7 @@ void LyXGUI::runTime()
{
if (!gui) return;
GUIRunTime grt;
grt.runTime();
GUIRunTime::runTime();
}

View 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();

View 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());

View 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 {

View 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)