mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-29 21:05:12 +00:00
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:
parent
6718758100
commit
eff9b6b7c9
@ -29,7 +29,7 @@ FL_OBJECT * figinset_canvas;
|
|||||||
|
|
||||||
// needed to make the c++ compiler find the correct version of abs.
|
// needed to make the c++ compiler find the correct version of abs.
|
||||||
// This is at least true for g++.
|
// This is at least true for g++.
|
||||||
using std::abs;
|
//using std::abs;
|
||||||
|
|
||||||
static inline
|
static inline
|
||||||
void waitForX()
|
void waitForX()
|
||||||
|
@ -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();
|
|
||||||
}
|
|
@ -6,8 +6,6 @@
|
|||||||
*
|
*
|
||||||
* Copyright 2000 The LyX Team.
|
* Copyright 2000 The LyX Team.
|
||||||
*
|
*
|
||||||
* @author Jürgen Vigna
|
|
||||||
*
|
|
||||||
* ====================================================== */
|
* ====================================================== */
|
||||||
|
|
||||||
#ifndef GUIRUNTIME_H
|
#ifndef GUIRUNTIME_H
|
||||||
@ -20,24 +18,16 @@
|
|||||||
class LyXView;
|
class LyXView;
|
||||||
|
|
||||||
/** The LyX GUI independent guiruntime class
|
/** 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 {
|
class GUIRunTime {
|
||||||
public:
|
public:
|
||||||
///
|
///
|
||||||
GUIRunTime();
|
static
|
||||||
///
|
|
||||||
~GUIRunTime();
|
|
||||||
///
|
|
||||||
void processEvents();
|
void processEvents();
|
||||||
///
|
///
|
||||||
|
static
|
||||||
void runTime();
|
void runTime();
|
||||||
|
|
||||||
struct Pimpl;
|
|
||||||
friend struct Pimpl;
|
|
||||||
|
|
||||||
private:
|
|
||||||
///
|
|
||||||
Pimpl * pimpl_;
|
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
@ -14,7 +14,6 @@ libfrontends_la_SOURCES=\
|
|||||||
ButtonPolicies.h \
|
ButtonPolicies.h \
|
||||||
Dialogs.h \
|
Dialogs.h \
|
||||||
DialogBase.h \
|
DialogBase.h \
|
||||||
GUIRunTime.C \
|
|
||||||
GUIRunTime.h \
|
GUIRunTime.h \
|
||||||
Liason.C \
|
Liason.C \
|
||||||
Liason.h \
|
Liason.h \
|
||||||
|
@ -3,9 +3,7 @@
|
|||||||
*
|
*
|
||||||
* LyX, The Document Processor
|
* LyX, The Document Processor
|
||||||
*
|
*
|
||||||
* Copyright (C) 2000 The LyX Team.
|
* Copyright 2000 The LyX Team.
|
||||||
*
|
|
||||||
* @author Jürgen Vigna
|
|
||||||
*
|
*
|
||||||
*======================================================*/
|
*======================================================*/
|
||||||
|
|
||||||
@ -17,7 +15,7 @@
|
|||||||
|
|
||||||
#include FORMS_H_LOCATION
|
#include FORMS_H_LOCATION
|
||||||
|
|
||||||
#include "GUIRunTime_pimpl.h"
|
#include "GUIRunTime.h"
|
||||||
#include "debug.h"
|
#include "debug.h"
|
||||||
|
|
||||||
#include <gnome--/main.h>
|
#include <gnome--/main.h>
|
||||||
@ -26,18 +24,18 @@ using std::endl;
|
|||||||
|
|
||||||
extern bool finished;
|
extern bool finished;
|
||||||
|
|
||||||
void GUIRunTime::Pimpl::processEvents()
|
void GUIRunTime::processEvents()
|
||||||
{
|
{
|
||||||
while(Gnome::Main::instance()->events_pending())
|
while(Gnome::Main::instance()->events_pending())
|
||||||
Gnome::Main::instance()->iteration(FALSE);
|
Gnome::Main::instance()->iteration(FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void GUIRunTime::Pimpl::runTime()
|
void GUIRunTime::runTime()
|
||||||
{
|
{
|
||||||
XEvent ev;
|
XEvent ev;
|
||||||
while (!finished) {
|
while (!finished) {
|
||||||
Pimpl::processEvents();
|
processEvents();
|
||||||
if (fl_check_forms() == FL_EVENT) {
|
if (fl_check_forms() == FL_EVENT) {
|
||||||
lyxerr << "LyX: This shouldn't happen..." << endl;
|
lyxerr << "LyX: This shouldn't happen..." << endl;
|
||||||
fl_XNextEvent(&ev);
|
fl_XNextEvent(&ev);
|
@ -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
|
|
@ -32,8 +32,7 @@ LYXDATADIRS =
|
|||||||
#ETAGS_ARGS = --lang=c++
|
#ETAGS_ARGS = --lang=c++
|
||||||
libgnome_la_SOURCES = \
|
libgnome_la_SOURCES = \
|
||||||
Dialogs.C \
|
Dialogs.C \
|
||||||
GUIRunTime_pimpl.C \
|
GUIRunTime.C \
|
||||||
GUIRunTime_pimpl.h \
|
|
||||||
FormCopyright.C \
|
FormCopyright.C \
|
||||||
FormCopyright.h \
|
FormCopyright.h \
|
||||||
FormPrint.C \
|
FormPrint.C \
|
||||||
|
@ -3,11 +3,9 @@
|
|||||||
*
|
*
|
||||||
* LyX, The Document Processor
|
* LyX, The Document Processor
|
||||||
*
|
*
|
||||||
* Copyright (C) 2000 The LyX Team.
|
* Copyright 2000 The LyX Team.
|
||||||
*
|
*
|
||||||
* @author Jürgen Vigna
|
* ====================================================== */
|
||||||
*
|
|
||||||
*======================================================*/
|
|
||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
|
||||||
@ -15,7 +13,7 @@
|
|||||||
#pragma implementation
|
#pragma implementation
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "GUIRunTime_pimpl.h"
|
#include "GUIRunTime.h"
|
||||||
#include "debug.h"
|
#include "debug.h"
|
||||||
|
|
||||||
#include <kapp.h>
|
#include <kapp.h>
|
||||||
@ -27,22 +25,21 @@ using std::endl;
|
|||||||
extern bool finished;
|
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;
|
XEvent ev;
|
||||||
while (!finished) {
|
while (!finished) {
|
||||||
Pimpl::processEvents();
|
processEvents();
|
||||||
if (fl_check_forms() == FL_EVENT) {
|
if (fl_check_forms() == FL_EVENT) {
|
||||||
lyxerr << "LyX: This shouldn't happen..." << endl;
|
lyxerr << "LyX: This shouldn't happen..." << endl;
|
||||||
fl_XNextEvent(&ev);
|
fl_XNextEvent(&ev);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -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
|
|
@ -42,8 +42,7 @@ LYXDATADIRS = dlg
|
|||||||
ETAGS_ARGS = --lang=c++
|
ETAGS_ARGS = --lang=c++
|
||||||
libkde_la_SOURCES = \
|
libkde_la_SOURCES = \
|
||||||
Dialogs.C \
|
Dialogs.C \
|
||||||
GUIRunTime_pimpl.C \
|
GUIRunTime.C \
|
||||||
GUIRunTime_pimpl.h \
|
|
||||||
FormCopyright.C \
|
FormCopyright.C \
|
||||||
FormCopyright.h \
|
FormCopyright.h \
|
||||||
formcopyrightdialog.C \
|
formcopyrightdialog.C \
|
||||||
@ -79,7 +78,7 @@ dist-hook:
|
|||||||
# add a dependency for every moc file to be full portable
|
# add a dependency for every moc file to be full portable
|
||||||
# I've added a key binding to emacs for this.
|
# 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
|
formcopyrightdialog_moc.C: formcopyrightdialog.h
|
||||||
$(MOC) formcopyrightdialog.h -o formcopyrightdialog_moc.C
|
$(MOC) formcopyrightdialog.h -o formcopyrightdialog_moc.C
|
||||||
|
|
||||||
|
@ -3,9 +3,7 @@
|
|||||||
*
|
*
|
||||||
* LyX, The Document Processor
|
* LyX, The Document Processor
|
||||||
*
|
*
|
||||||
* Copyright (C) 2000 The LyX Team.
|
* Copyright 2000 The LyX Team.
|
||||||
*
|
|
||||||
* @author Jürgen Vigna
|
|
||||||
*
|
*
|
||||||
*======================================================*/
|
*======================================================*/
|
||||||
|
|
||||||
@ -16,7 +14,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include FORMS_H_LOCATION
|
#include FORMS_H_LOCATION
|
||||||
#include "GUIRunTime_pimpl.h"
|
#include "GUIRunTime.h"
|
||||||
#include "debug.h"
|
#include "debug.h"
|
||||||
|
|
||||||
using std::endl;
|
using std::endl;
|
||||||
@ -24,7 +22,7 @@ using std::endl;
|
|||||||
extern bool finished;
|
extern bool finished;
|
||||||
|
|
||||||
|
|
||||||
void GUIRunTime::Pimpl::processEvents()
|
void GUIRunTime::processEvents()
|
||||||
{
|
{
|
||||||
XEvent ev;
|
XEvent ev;
|
||||||
|
|
||||||
@ -35,7 +33,7 @@ void GUIRunTime::Pimpl::processEvents()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void GUIRunTime::Pimpl::runTime()
|
void GUIRunTime::runTime()
|
||||||
{
|
{
|
||||||
XEvent ev;
|
XEvent ev;
|
||||||
while (!finished) {
|
while (!finished) {
|
@ -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
|
|
@ -13,8 +13,7 @@ ETAGS_ARGS = --lang=c++
|
|||||||
libxforms_la_SOURCES = \
|
libxforms_la_SOURCES = \
|
||||||
ButtonController.h \
|
ButtonController.h \
|
||||||
Dialogs.C \
|
Dialogs.C \
|
||||||
GUIRunTime_pimpl.C \
|
GUIRunTime.C \
|
||||||
GUIRunTime_pimpl.h \
|
|
||||||
FormCitation.C \
|
FormCitation.C \
|
||||||
FormCitation.h \
|
FormCitation.h \
|
||||||
form_citation.C \
|
form_citation.C \
|
||||||
|
@ -564,8 +564,7 @@ void LyXGUI::runTime()
|
|||||||
{
|
{
|
||||||
if (!gui) return;
|
if (!gui) return;
|
||||||
|
|
||||||
GUIRunTime grt;
|
GUIRunTime::runTime();
|
||||||
grt.runTime();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -201,9 +201,11 @@ void updateAllVisibleBufferRelatedDialogs()
|
|||||||
if (fd_form_paragraph_extra->form_paragraph_extra->visible) {
|
if (fd_form_paragraph_extra->form_paragraph_extra->visible) {
|
||||||
UpdateParagraphExtra();
|
UpdateParagraphExtra();
|
||||||
}
|
}
|
||||||
|
#ifndef NEW_TABULAR
|
||||||
if (fd_form_table_options->form_table_options->visible) {
|
if (fd_form_table_options->form_table_options->visible) {
|
||||||
UpdateLayoutTable(1); // just like a right mouse click
|
UpdateLayoutTable(1); // just like a right mouse click
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
if (fd_form_bullet) {
|
if (fd_form_bullet) {
|
||||||
if (fd_form_bullet->form_bullet->visible) {
|
if (fd_form_bullet->form_bullet->visible) {
|
||||||
updateBulletForm();
|
updateBulletForm();
|
||||||
|
@ -262,10 +262,6 @@ int LyXFunc::processKeySym(KeySym keysym, unsigned int state)
|
|||||||
lyxerr << "Key ["
|
lyxerr << "Key ["
|
||||||
<< action << "]["
|
<< action << "]["
|
||||||
<< buf << "]"
|
<< buf << "]"
|
||||||
#if 0
|
|
||||||
<< "["
|
|
||||||
<< num_bytes << "]"
|
|
||||||
#endif
|
|
||||||
<< endl;
|
<< endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -301,12 +297,7 @@ int LyXFunc::processKeySym(KeySym keysym, unsigned int state)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#if 0
|
|
||||||
else
|
|
||||||
if (action == LFUN_SELFINSERT) {
|
|
||||||
argument = s_r[0];
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
bool tmp_sc = show_sc;
|
bool tmp_sc = show_sc;
|
||||||
show_sc = false;
|
show_sc = false;
|
||||||
Dispatch(action, argument.c_str());
|
Dispatch(action, argument.c_str());
|
||||||
|
@ -39,7 +39,7 @@ class BufferView;
|
|||||||
|
|
||||||
// I dare you to try this one too. It is ortogonal with NEW_INSETS so you
|
// I dare you to try this one too. It is ortogonal with NEW_INSETS so you
|
||||||
// can try both or just one of them.
|
// 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
|
/// A LyXParagraph holds all text, attributes and insets in a text paragraph
|
||||||
class LyXParagraph {
|
class LyXParagraph {
|
||||||
|
12
src/text2.C
12
src/text2.C
@ -1376,7 +1376,11 @@ void LyXText::MeltFootnoteEnvironment(BufferView * bview)
|
|||||||
tmppar->next->MakeSameLayout(cursor.par());
|
tmppar->next->MakeSameLayout(cursor.par());
|
||||||
|
|
||||||
// first the end
|
// first the end
|
||||||
if ((!tmppar->GetLayout() && !tmppar->table)
|
if ((!tmppar->GetLayout()
|
||||||
|
#ifndef NEW_TABULAR
|
||||||
|
&& !tmppar->table
|
||||||
|
#endif
|
||||||
|
)
|
||||||
|| (tmppar->Next()
|
|| (tmppar->Next()
|
||||||
&& (!tmppar->Next()->Last()
|
&& (!tmppar->Next()->Last()
|
||||||
|| tmppar->Next()->HasSameLayout(tmppar)))) {
|
|| 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
|
/* if there is no space between the text and the footnote, so we insert
|
||||||
* a blank
|
* a blank
|
||||||
* (only if the previous par and the footnotepar are not empty!) */
|
* (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)) {
|
|| firsttmppar->HasSameLayout(firsttmppar->next)) {
|
||||||
if (firsttmppar->size()
|
if (firsttmppar->size()
|
||||||
&& !firsttmppar->IsSeparator(firsttmppar->size() - 1)
|
&& !firsttmppar->IsSeparator(firsttmppar->size() - 1)
|
||||||
|
Loading…
Reference in New Issue
Block a user