mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 13:18:28 +00:00
small fixes, silence debug msgs, move some functions
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@650 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
fe4e2a84c6
commit
c93e59102c
11
ChangeLog
11
ChangeLog
@ -1,3 +1,14 @@
|
||||
2000-04-12 Lars Gullik Bjønnes <larsbj@lyx.org>
|
||||
|
||||
* src/lyxfunc.C (Dispatch): make PARAGRAPH_SPACING compile with
|
||||
strstream too.
|
||||
|
||||
* src/bufferview_funcs.[Ch]: two new files, moved several of the
|
||||
methods from lyx_cb.here.
|
||||
|
||||
* src/lyx_cb.C: in addition to the above; removed input_prohibited
|
||||
it was not used.
|
||||
|
||||
2000-04-11 Lars Gullik Bjønnes <larsbj@lyx.org>
|
||||
|
||||
* src/lyx_cb.[Ch]: made several functions take a BufferView* arg
|
||||
|
@ -17,7 +17,7 @@
|
||||
#include "lyxfunc.h"
|
||||
#include "minibuffer.h"
|
||||
#include "font.h"
|
||||
#include "lyx_cb.h"
|
||||
#include "bufferview_funcs.h"
|
||||
#include "TextCache.h"
|
||||
#include "bufferlist.h"
|
||||
#include "insets/insetbib.h"
|
||||
@ -29,8 +29,11 @@
|
||||
using std::pair;
|
||||
using std::endl;
|
||||
|
||||
/* the selection possible is needed, that only motion events are
|
||||
* used, where the bottom press event was on the drawing area too */
|
||||
bool selection_possible = false;
|
||||
|
||||
extern BufferList bufferlist;
|
||||
extern bool selection_possible;
|
||||
extern char ascii_type;
|
||||
|
||||
extern void sigchldhandler(pid_t pid, int * status);
|
||||
|
@ -11,7 +11,8 @@
|
||||
#include "lyx_gui_misc.h"
|
||||
#include "support/syscall.h"
|
||||
#include "gettext.h"
|
||||
#include "lyx_cb.h"
|
||||
//#include "lyx_cb.h"
|
||||
#include "bufferview_funcs.h"
|
||||
|
||||
extern FD_form_sendto * fd_form_sendto;
|
||||
extern BufferView * current_view;
|
||||
|
@ -75,6 +75,8 @@ lyx_SOURCES = \
|
||||
bufferlist.h \
|
||||
bufferparams.C \
|
||||
bufferparams.h \
|
||||
bufferview_funcs.C \
|
||||
bufferview_funcs.h \
|
||||
bullet_forms.C \
|
||||
bullet_forms.h \
|
||||
bullet_forms_cb.C \
|
||||
|
@ -44,7 +44,8 @@
|
||||
#include "lyxlex.h"
|
||||
#include "tex-strings.h"
|
||||
#include "layout.h"
|
||||
#include "lyx_cb.h"
|
||||
//#include "lyx_cb.h"
|
||||
#include "bufferview_funcs.h"
|
||||
#include "minibuffer.h"
|
||||
#include "lyxfont.h"
|
||||
#include "version.h"
|
||||
@ -118,8 +119,6 @@ static const float LYX_FORMAT = 2.16;
|
||||
|
||||
extern int tex_code_break_column;
|
||||
|
||||
extern void FreeUpdateTimer();
|
||||
|
||||
|
||||
Buffer::Buffer(string const & file, bool ronly)
|
||||
{
|
||||
|
@ -31,6 +31,7 @@
|
||||
#include "lyxrc.h"
|
||||
#include "lyxtext.h"
|
||||
#include "lyx_cb.h"
|
||||
#include "bufferview_funcs.h"
|
||||
#include "gettext.h"
|
||||
#include "LyXView.h"
|
||||
#include "vc-backend.h"
|
||||
|
@ -58,7 +58,8 @@
|
||||
#include "support/lyxlib.h"
|
||||
#include "Painter.h"
|
||||
#include "font.h"
|
||||
#include "lyx_cb.h"
|
||||
//#include "lyx_cb.h"
|
||||
#include "bufferview_funcs.h"
|
||||
|
||||
using std::ostream;
|
||||
using std::istream;
|
||||
|
391
src/lyx_cb.C
391
src/lyx_cb.C
@ -15,45 +15,35 @@
|
||||
#include <iostream>
|
||||
|
||||
#include "LString.h"
|
||||
#include "support/lstrings.h"
|
||||
#include "lyx_main.h"
|
||||
#include FORMS_H_LOCATION
|
||||
#include "lyx.h"
|
||||
#include "layout_forms.h"
|
||||
#include "bullet_forms.h"
|
||||
#include "print_form.h"
|
||||
#include "form1.h"
|
||||
#include "spellchecker.h"
|
||||
#include "version.h"
|
||||
#include "lyx_main.h"
|
||||
#include "lyx_cb.h"
|
||||
#include "credits.h"
|
||||
#include "insets/insetref.h"
|
||||
#include "insets/insetquotes.h"
|
||||
#include "insets/insetlabel.h"
|
||||
#include "insets/figinset.h"
|
||||
#include "lyxfunc.h"
|
||||
#include "latexoptions.h"
|
||||
#include "lyxfont.h"
|
||||
#include "minibuffer.h"
|
||||
#include "combox.h"
|
||||
#include "bufferlist.h"
|
||||
#include "support/filetools.h"
|
||||
#include "support/path.h"
|
||||
#include "filedlg.h"
|
||||
#include "lyx_gui_misc.h"
|
||||
#include "LyXView.h"
|
||||
#include "BufferView.h"
|
||||
#include "lastfiles.h"
|
||||
#include "bufferview_funcs.h"
|
||||
#include "support/FileInfo.h"
|
||||
#include "debug.h"
|
||||
#include "support/syscall.h"
|
||||
#include "support/lyxlib.h"
|
||||
#include "support/filetools.h"
|
||||
#include "support/path.h"
|
||||
#include "lyxserver.h"
|
||||
#include "FontLoader.h"
|
||||
#include "lyxrc.h"
|
||||
#include "lyxtext.h"
|
||||
#include "gettext.h"
|
||||
#include "layout.h"
|
||||
#include "language.h"
|
||||
#include "CutAndPaste.h"
|
||||
|
||||
using std::ifstream;
|
||||
@ -100,15 +90,6 @@ char ascii_type; /* for selection notify callbacks */
|
||||
|
||||
bool scrolling = false;
|
||||
|
||||
char updatetimer = 0;
|
||||
|
||||
/* whether the work area should get callbacks */
|
||||
bool input_prohibited = false;
|
||||
|
||||
/* the selection possible is needed, that only motion events are
|
||||
* used, where the bottom press event was on the drawing area too */
|
||||
bool selection_possible = false;
|
||||
|
||||
// This is used to make the dreaded font toggle problem hopefully go
|
||||
// away. Definitely not the best solution, but I think it sorta works.
|
||||
bool toggleall = true;
|
||||
@ -196,82 +177,12 @@ void ShowMessage(Buffer * buf,
|
||||
}
|
||||
}
|
||||
|
||||
// How should this actually work? Should it prohibit input in all BufferViews,
|
||||
// or just in the current one? If "just the current one", then it should be
|
||||
// placed in BufferView. If "all BufferViews" then LyXGUI (I think) should
|
||||
// run "ProhibitInput" on all LyXViews which will run prohibitInput on all
|
||||
// BufferViews. Or is it perhaps just the (input in) BufferViews in the
|
||||
// current LyxView that should be prohibited (Lgb) (This applies to
|
||||
// "AllowInput" as well.)
|
||||
void ProhibitInput(BufferView * bv)
|
||||
{
|
||||
input_prohibited = true;
|
||||
bv->hideCursor();
|
||||
|
||||
static Cursor cursor;
|
||||
static bool cursor_undefined = true;
|
||||
|
||||
if (cursor_undefined){
|
||||
cursor = XCreateFontCursor(fl_display, XC_watch);
|
||||
XFlush(fl_display);
|
||||
cursor_undefined = false;
|
||||
}
|
||||
|
||||
/* set the cursor to the watch for all forms and the canvas */
|
||||
XDefineCursor(fl_display, bv->owner()->getForm()->window,
|
||||
cursor);
|
||||
if (fd_form_paragraph->form_paragraph->visible)
|
||||
XDefineCursor(fl_display,
|
||||
fd_form_paragraph->form_paragraph->window,
|
||||
cursor);
|
||||
if (fd_form_character->form_character->visible)
|
||||
XDefineCursor(fl_display,
|
||||
fd_form_character->form_character->window,
|
||||
cursor);
|
||||
|
||||
XFlush(fl_display);
|
||||
fl_deactivate_all_forms();
|
||||
}
|
||||
|
||||
|
||||
// Should find a way to move this into BufferView.C
|
||||
void SetXtermCursor(Window win)
|
||||
{
|
||||
static Cursor cursor;
|
||||
static bool cursor_undefined = true;
|
||||
if (cursor_undefined){
|
||||
cursor = XCreateFontCursor(fl_display, XC_xterm);
|
||||
XFlush(fl_display);
|
||||
cursor_undefined = false;
|
||||
}
|
||||
XDefineCursor(fl_display, win, cursor);
|
||||
XFlush(fl_display);
|
||||
}
|
||||
|
||||
|
||||
void AllowInput(BufferView * bv)
|
||||
{
|
||||
input_prohibited = false;
|
||||
|
||||
/* reset the cursor from the watch for all forms and the canvas */
|
||||
|
||||
XUndefineCursor(fl_display, bv->owner()->getForm()->window);
|
||||
if (fd_form_paragraph->form_paragraph->visible)
|
||||
XUndefineCursor(fl_display,
|
||||
fd_form_paragraph->form_paragraph->window);
|
||||
if (fd_form_character->form_character->visible)
|
||||
XUndefineCursor(fl_display,
|
||||
fd_form_character->form_character->window);
|
||||
|
||||
// What to do about this? (Lgb)
|
||||
if (bv->belowMouse())
|
||||
SetXtermCursor(bv->owner()->getForm()->window);
|
||||
|
||||
XFlush(fl_display);
|
||||
fl_activate_all_forms();
|
||||
}
|
||||
// only called from this file, LyXView and LyXFunc
|
||||
char updatetimer = 0;
|
||||
|
||||
|
||||
// only called from BufferView_pimpl and LyXFunc
|
||||
void FreeUpdateTimer()
|
||||
{
|
||||
/* a real free timer would be better but I don't know
|
||||
@ -280,6 +191,7 @@ void FreeUpdateTimer()
|
||||
}
|
||||
|
||||
|
||||
// Only called from LyXFunc
|
||||
void SetUpdateTimer(float time)
|
||||
{
|
||||
fl_set_timer(current_view->owner()->getMainForm()->timer_update, time);
|
||||
@ -806,6 +718,7 @@ bool AskOverwrite(Buffer * buffer, string const & s)
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
void MenuMakeLaTeX(Buffer * buffer)
|
||||
{
|
||||
// Why care about this?
|
||||
@ -927,6 +840,7 @@ void MenuPrint(Buffer * buffer)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void MenuMakeHTML(Buffer * buffer)
|
||||
{
|
||||
// First, create LaTeX file
|
||||
@ -956,6 +870,7 @@ void MenuMakeHTML(Buffer * buffer)
|
||||
|
||||
}
|
||||
|
||||
|
||||
void MenuMakeHTML_LinuxDoc(Buffer * buffer)
|
||||
{
|
||||
// First, create LinuxDoc file
|
||||
@ -1007,6 +922,7 @@ void MenuMakeHTML_DocBook(Buffer * buffer)
|
||||
|
||||
}
|
||||
|
||||
|
||||
void MenuExport(Buffer * buffer, string const & extyp)
|
||||
{
|
||||
// latex
|
||||
@ -1327,19 +1243,6 @@ void MenuPasteSelection(char at)
|
||||
}
|
||||
|
||||
|
||||
// candidate for move to BufferView
|
||||
void Foot(BufferView * bv)
|
||||
{
|
||||
if (!bv->available())
|
||||
return;
|
||||
|
||||
bv->owner()->getMiniBuffer()
|
||||
->Set(_("Inserting Footnote..."));
|
||||
bv->hideCursor();
|
||||
bv->update(-2);
|
||||
bv->text->InsertFootnoteEnvironment(LyXParagraph::FOOTNOTE);
|
||||
bv->update(1);
|
||||
}
|
||||
|
||||
|
||||
// candidate for move to LyXView
|
||||
@ -2072,246 +1975,6 @@ void MenuLayoutSave()
|
||||
}
|
||||
|
||||
|
||||
/* -------> These CB's use ToggleFree() as the (one and only?) font-changer.
|
||||
They also show the current font state. */
|
||||
|
||||
static
|
||||
void ToggleAndShow(BufferView *, LyXFont const &);
|
||||
|
||||
|
||||
void FontSize(BufferView * bv, string const & size)
|
||||
{
|
||||
LyXFont font(LyXFont::ALL_IGNORE);
|
||||
font.setGUISize(size);
|
||||
ToggleAndShow(bv, font);
|
||||
}
|
||||
|
||||
|
||||
void Emph(BufferView * bv)
|
||||
{
|
||||
LyXFont font(LyXFont::ALL_IGNORE);
|
||||
font.setEmph(LyXFont::TOGGLE);
|
||||
ToggleAndShow(bv, font);
|
||||
}
|
||||
|
||||
|
||||
void Noun(BufferView * bv)
|
||||
{
|
||||
LyXFont font(LyXFont::ALL_IGNORE);
|
||||
font.setNoun(LyXFont::TOGGLE);
|
||||
ToggleAndShow(bv, font);
|
||||
}
|
||||
|
||||
|
||||
void Bold(BufferView * bv)
|
||||
{
|
||||
LyXFont font(LyXFont::ALL_IGNORE);
|
||||
font.setSeries(LyXFont::BOLD_SERIES);
|
||||
ToggleAndShow(bv, font);
|
||||
}
|
||||
|
||||
|
||||
void Underline(BufferView * bv)
|
||||
{
|
||||
LyXFont font(LyXFont::ALL_IGNORE);
|
||||
font.setUnderbar(LyXFont::TOGGLE);
|
||||
ToggleAndShow(bv, font);
|
||||
}
|
||||
|
||||
|
||||
void Code(BufferView * bv)
|
||||
{
|
||||
LyXFont font(LyXFont::ALL_IGNORE);
|
||||
font.setFamily(LyXFont::TYPEWRITER_FAMILY); // no good
|
||||
ToggleAndShow(bv, font);
|
||||
}
|
||||
|
||||
|
||||
void Sans(BufferView * bv)
|
||||
{
|
||||
LyXFont font(LyXFont::ALL_IGNORE);
|
||||
font.setFamily(LyXFont::SANS_FAMILY);
|
||||
ToggleAndShow(bv, font);
|
||||
}
|
||||
|
||||
|
||||
void Roman(BufferView * bv)
|
||||
{
|
||||
LyXFont font(LyXFont::ALL_IGNORE);
|
||||
font.setFamily(LyXFont::ROMAN_FAMILY);
|
||||
ToggleAndShow(bv, font);
|
||||
}
|
||||
|
||||
|
||||
void Tex(BufferView * bv)
|
||||
{
|
||||
LyXFont font(LyXFont::ALL_IGNORE);
|
||||
font.setLatex (LyXFont::TOGGLE);
|
||||
ToggleAndShow(bv, font);
|
||||
}
|
||||
|
||||
void Lang(BufferView * bv, string const & l)
|
||||
{
|
||||
LyXFont font(LyXFont::ALL_IGNORE);
|
||||
Languages::iterator lit = languages.find(l);
|
||||
if (lit != languages.end()) {
|
||||
font.setLanguage(&(*lit).second);
|
||||
ToggleAndShow(bv, font);
|
||||
} else
|
||||
WriteAlert(_("Error! unknown language"),l);
|
||||
}
|
||||
|
||||
|
||||
void StyleReset(BufferView * bv)
|
||||
{
|
||||
LyXFont font(LyXFont::ALL_INHERIT, ignore_language);
|
||||
ToggleAndShow(bv, font);
|
||||
}
|
||||
|
||||
|
||||
/* -------> Returns the current font and depth by printing a message. In the
|
||||
* future perhaps we could try to implement a callback to the button-bar.
|
||||
* That is, `light' the bold button when the font is currently bold, etc.
|
||||
*/
|
||||
string CurrentState(BufferView * bv)
|
||||
{
|
||||
string state;
|
||||
if (bv->available()) {
|
||||
// I think we should only show changes from the default
|
||||
// font. (Asger)
|
||||
Buffer * buffer = bv->buffer();
|
||||
LyXFont font = bv->text->real_current_font;
|
||||
LyXFont defaultfont = textclasslist.TextClass(buffer->
|
||||
params.textclass).defaultfont();
|
||||
font.reduce(defaultfont);
|
||||
state = _("Font: ") + font.stateText();
|
||||
// The paragraph depth
|
||||
int depth = bv->text->GetDepth();
|
||||
if (depth > 0)
|
||||
state += string(_(", Depth: ")) + tostr(depth);
|
||||
// The paragraph spacing, but only if different from
|
||||
// buffer spacing.
|
||||
if (!bv->text->cursor.par->spacing.isDefault()) {
|
||||
Spacing::Space cur_space =
|
||||
bv->text->cursor.par->spacing.getSpace();
|
||||
state += _(", Spacing: ");
|
||||
switch (cur_space) {
|
||||
case Spacing::Single:
|
||||
state += _("Single");
|
||||
break;
|
||||
case Spacing::Onehalf:
|
||||
state += _("Onehalf");
|
||||
break;
|
||||
case Spacing::Double:
|
||||
state += _("Double");
|
||||
break;
|
||||
case Spacing::Other:
|
||||
state += _("Other (");
|
||||
state += tostr(bv->text->cursor.par->spacing.getValue());
|
||||
state += ")";
|
||||
break;
|
||||
case Spacing::Default:
|
||||
// should never happen, do nothing
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return state;
|
||||
}
|
||||
|
||||
|
||||
|
||||
// candidate for move to BufferView
|
||||
/* -------> Does the actual toggle job of the XxxCB() calls above.
|
||||
* Also shows the current font state.
|
||||
*/
|
||||
static
|
||||
void ToggleAndShow(BufferView * bv, LyXFont const & font)
|
||||
{
|
||||
if (bv->available()) {
|
||||
bv->hideCursor();
|
||||
bv->update(-2);
|
||||
if (bv->the_locking_inset)
|
||||
bv->the_locking_inset->SetFont(bv, font, toggleall);
|
||||
else
|
||||
bv->text->ToggleFree(font, toggleall);
|
||||
bv->update(1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// candidate for move to BufferView
|
||||
void Margin(BufferView * bv)
|
||||
{
|
||||
if (bv->available()) {
|
||||
bv->owner()->getMiniBuffer()->Set(_("Inserting margin note..."));
|
||||
bv->hideCursor();
|
||||
bv->update(-2);
|
||||
bv->text->InsertFootnoteEnvironment(LyXParagraph::MARGIN);
|
||||
bv->update(1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void Figure()
|
||||
{
|
||||
if (fd_form_figure->form_figure->visible) {
|
||||
fl_raise_form(fd_form_figure->form_figure);
|
||||
} else {
|
||||
fl_show_form(fd_form_figure->form_figure,
|
||||
FL_PLACE_MOUSE, FL_FULLBORDER,
|
||||
_("Insert Figure"));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void Table()
|
||||
{
|
||||
if (fd_form_table->form_table->visible) {
|
||||
fl_raise_form(fd_form_table->form_table);
|
||||
} else {
|
||||
fl_show_form(fd_form_table->form_table,
|
||||
FL_PLACE_MOUSE, FL_FULLBORDER,
|
||||
_("Insert Table"));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// candidate for move to BufferView
|
||||
void Melt(BufferView * bv)
|
||||
{
|
||||
if (!bv->available()) return;
|
||||
|
||||
bv->owner()->getMiniBuffer()->Set(_("Melt"));
|
||||
bv->hideCursor();
|
||||
bv->beforeChange();
|
||||
bv->update(-2);
|
||||
bv->text->MeltFootnoteEnvironment();
|
||||
bv->update(1);
|
||||
}
|
||||
|
||||
|
||||
// candidate for move to BufferView
|
||||
// Change environment depth.
|
||||
// if decInc >= 0, increment depth
|
||||
// if decInc < 0, decrement depth
|
||||
void changeDepth(BufferView * bv, int decInc)
|
||||
{
|
||||
if (!bv->available()) return;
|
||||
|
||||
bv->hideCursor();
|
||||
bv->update(-2);
|
||||
if (decInc >= 0)
|
||||
bv->text->IncDepth();
|
||||
else
|
||||
bv->text->DecDepth();
|
||||
bv->update(1);
|
||||
bv->owner()->getMiniBuffer()
|
||||
->Set(_("Changed environment depth"
|
||||
" (in possible range, maybe not)"));
|
||||
}
|
||||
|
||||
|
||||
// This is both GUI and LyXFont dependent. Don't know where to put it. (Asger)
|
||||
// Well, it's mostly GUI dependent, so I guess it will stay here. (Asger)
|
||||
LyXFont UserFreeFont()
|
||||
@ -2400,10 +2063,6 @@ LyXFont UserFreeFont()
|
||||
}
|
||||
|
||||
|
||||
void Free(BufferView * bv)
|
||||
{
|
||||
ToggleAndShow(bv, UserFreeFont());
|
||||
}
|
||||
|
||||
|
||||
/* callbacks for form form_title */
|
||||
@ -3253,6 +2912,30 @@ extern "C" void PrintOKCB(FL_OBJECT * ob, long data)
|
||||
}
|
||||
|
||||
|
||||
void Figure()
|
||||
{
|
||||
if (fd_form_figure->form_figure->visible) {
|
||||
fl_raise_form(fd_form_figure->form_figure);
|
||||
} else {
|
||||
fl_show_form(fd_form_figure->form_figure,
|
||||
FL_PLACE_MOUSE, FL_FULLBORDER,
|
||||
_("Insert Figure"));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void Table()
|
||||
{
|
||||
if (fd_form_table->form_table->visible) {
|
||||
fl_raise_form(fd_form_table->form_table);
|
||||
} else {
|
||||
fl_show_form(fd_form_table->form_table,
|
||||
FL_PLACE_MOUSE, FL_FULLBORDER,
|
||||
_("Insert Table"));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* callbacks for form form_figure */
|
||||
extern "C" void FigureApplyCB(FL_OBJECT *, long)
|
||||
{
|
||||
|
52
src/lyx_cb.h
52
src/lyx_cb.h
@ -2,62 +2,14 @@
|
||||
#ifndef LYX_CB_H
|
||||
#define LYX_CB_H
|
||||
|
||||
#include FORMS_H_LOCATION
|
||||
|
||||
#include "LString.h"
|
||||
|
||||
class Inset;
|
||||
class BufferView;
|
||||
|
||||
///
|
||||
extern bool quitting;
|
||||
extern bool toggleall;
|
||||
|
||||
// When still false after reading lyxrc, warn user
|
||||
//about failing \bind_file command. RVDK_PATCH_5
|
||||
extern bool BindFileSet;
|
||||
|
||||
///
|
||||
extern void Foot(BufferView *);
|
||||
///
|
||||
extern void Emph(BufferView *);
|
||||
///
|
||||
extern void Bold(BufferView *);
|
||||
///
|
||||
extern void Noun(BufferView *);
|
||||
///
|
||||
extern void Margin(BufferView *);
|
||||
///
|
||||
extern void Figure();
|
||||
///
|
||||
extern void Lang(BufferView *, string const &);
|
||||
///
|
||||
extern void Table();
|
||||
///
|
||||
extern void Melt(BufferView *);
|
||||
///
|
||||
extern void Tex(BufferView *);
|
||||
///
|
||||
extern void changeDepth(BufferView *, int);
|
||||
///
|
||||
extern void Free(BufferView *);
|
||||
///
|
||||
extern void ProhibitInput(BufferView *);
|
||||
///
|
||||
extern void AllowInput(BufferView *);
|
||||
///
|
||||
extern void Code(BufferView *);
|
||||
///
|
||||
extern void Sans(BufferView *);
|
||||
///
|
||||
extern void Roman(BufferView *);
|
||||
///
|
||||
extern void StyleReset(BufferView *);
|
||||
///
|
||||
extern void Underline(BufferView *);
|
||||
///
|
||||
extern void FontSize(BufferView *, string const &);
|
||||
///
|
||||
extern string CurrentState(BufferView *);
|
||||
extern LyXFont UserFreeFont();
|
||||
|
||||
#endif
|
||||
|
||||
|
@ -31,6 +31,7 @@
|
||||
#include "sp_form.h"
|
||||
#include "insets/insetindex.h"
|
||||
#include "LyXView.h"
|
||||
#include "bufferview_funcs.h"
|
||||
|
||||
using std::pair;
|
||||
using std::make_pair;
|
||||
|
@ -412,7 +412,7 @@ string LyXFont::stateText() const
|
||||
//if (buf.empty())
|
||||
// ost << _("Default");
|
||||
unsigned int opos = ost.tellp();
|
||||
lyxerr << "Opos: " << opos << endl;
|
||||
//lyxerr << "Opos: " << opos << endl;
|
||||
if (opos == 0)
|
||||
ost << _("Default") << ", ";
|
||||
ost << _("Language: ") << _(language()->display.c_str());
|
||||
|
@ -78,6 +78,7 @@ using std::istringstream;
|
||||
#include "WorkArea.h"
|
||||
#include "lyxfr1.h"
|
||||
#include "menus.h"
|
||||
#include "bufferview_funcs.h"
|
||||
|
||||
using std::pair;
|
||||
using std::endl;
|
||||
@ -1956,14 +1957,19 @@ string LyXFunc::Dispatch(int ac,
|
||||
cur_value = par->spacing.getValue();
|
||||
}
|
||||
|
||||
lyxerr << "all spacing arguments: " << argument << endl;
|
||||
#ifdef HAVE_SSTREAM
|
||||
istringstream istr(argument);
|
||||
#else
|
||||
istrstream istr(argument.c_str());
|
||||
#endif
|
||||
string tmp;
|
||||
istr >> tmp;
|
||||
lyxerr << "spacing = " << tmp << endl;
|
||||
Spacing::Space new_spacing = cur_spacing;
|
||||
float new_value = cur_value;
|
||||
if (tmp == "single") {
|
||||
if (tmp.empty()) {
|
||||
lyxerr << "Missing argument to `paragraph-spacing'"
|
||||
<< endl;
|
||||
} else if (tmp == "single") {
|
||||
new_spacing = Spacing::Single;
|
||||
} else if (tmp == "onehalf") {
|
||||
new_spacing = Spacing::Onehalf;
|
||||
|
@ -45,6 +45,7 @@
|
||||
#include "gettext.h"
|
||||
#include "layout.h"
|
||||
#include "lyx_cb.h"
|
||||
#include "bufferview_funcs.h"
|
||||
|
||||
using std::vector;
|
||||
using std::endl;
|
||||
|
@ -520,8 +520,8 @@ LyXParagraph::~LyXParagraph()
|
||||
// ale970302
|
||||
delete bibkey;
|
||||
//
|
||||
lyxerr << "LyXParagraph::paragraph_id = "
|
||||
<< LyXParagraph::paragraph_id << endl;
|
||||
//lyxerr << "LyXParagraph::paragraph_id = "
|
||||
// << LyXParagraph::paragraph_id << endl;
|
||||
}
|
||||
|
||||
|
||||
|
@ -1273,7 +1273,7 @@ void LyXText::SetHeightOfRow(Row * row_ptr) const
|
||||
} else {
|
||||
spacing_val = bparams->spacing.getValue();
|
||||
}
|
||||
lyxerr << "spacing_val = " << spacing_val << endl;
|
||||
//lyxerr << "spacing_val = " << spacing_val << endl;
|
||||
|
||||
int maxasc = int(lyxfont::maxAscent(font) *
|
||||
layout.spacing.getValue() *
|
||||
|
Loading…
Reference in New Issue
Block a user