small stuff

less debug output


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7344 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
André Pönitz 2003-07-22 15:12:04 +00:00
parent a45815184b
commit 172c868068
6 changed files with 22 additions and 9 deletions

View File

@ -26,8 +26,8 @@
#include "debug.h"
#include "rowpainter.h"
#include "insets/updatableinset.h"
#include "mathed/formulabase.h"
#include "lyx_gui.h"
#include "metricsinfo.h"
// Splash screen-specific stuff
#include "lyxfont.h"
@ -147,8 +147,8 @@ void LyXScreen::showCursor(BufferView & bv)
Cursor_Shape shape = BAR_SHAPE;
LyXText const & text = *bv.getLyXText();
LyXFont const & realfont(text.real_current_font);
BufferParams const & bp(bv.buffer()->params);
LyXFont const & realfont = text.real_current_font;
BufferParams const & bp = bv.buffer()->params;
bool const samelang = realfont.language() == bp.language;
bool const isrtl = realfont.isVisibleRightToLeft();
@ -453,6 +453,16 @@ void LyXScreen::drawFromTo(LyXText * text, BufferView * bv,
hideCursor();
#if 0
// some day it should look like that:
// redo metrics
Dimension dim;
LyXFont font;
MetricsInfo mi(bv, font, workarea().workWidth());
text->metrics(mi, dim);
#endif
// draw it
RowList::iterator const rend = text->rows().end();
while (rit != rend && y < y2) {
paintRows(*bv, *text, rit, y + yo, xo, y + topy);

View File

@ -1950,6 +1950,8 @@ void InsetText::resizeLyXText(BufferView * bv, bool force) const
text_.init(bv);
restoreLyXTextState();
// seems to be unneeded
#if 1
if (the_locking_inset) {
inset_x = cix(bv) - top_x + drawTextXOffset;
inset_y = ciy() + drawTextYOffset;
@ -1963,6 +1965,7 @@ void InsetText::resizeLyXText(BufferView * bv, bool force) const
} else {
need_update |= FULL;
}
#endif
}

View File

@ -24,7 +24,7 @@ public:
///
Row();
///
Row(ParagraphList::iterator pit, lyx::pos_type po);
Row(ParagraphList::iterator pit, lyx::pos_type pos);
///
void par(ParagraphList::iterator pit);
///
@ -70,7 +70,7 @@ private:
ParagraphList::iterator pit_;
///
lyx::pos_type pos_;
/** what is missing to a full row can be negative.
/** what is missing to a full row. Can be negative.
Needed for hfills, flushright, block etc. */
mutable int fill_;
///

View File

@ -475,7 +475,7 @@ public:
int singleWidth(ParagraphList::iterator pit,
lyx::pos_type pos, char c) const;
/// rebuild row cache
void rebuildRows();
void rebuildRows(ParagraphList::iterator pit);
/// return the color of the canvas
LColor::color backgroundColor() const;

View File

@ -306,8 +306,8 @@ void RowPainter::paintChars(pos_type & vpos, bool hebrew, bool arabic)
}
// Draw text and set the new x position
lyxerr << "paint row: yo_ " << yo_ << " baseline: " << row_->baseline()
<< "\n";
//lyxerr << "paint row: yo_ " << yo_ << " baseline: " << row_->baseline()
// << "\n";
pain_.text(int(x_), yo_ + row_->baseline(), str, orig_font);
x_ += font_metrics::width(str, orig_font);
}

View File

@ -697,7 +697,7 @@ void LyXText::fullRebreak()
void LyXText::metrics(MetricsInfo & mi, Dimension & dim)
{
lyxerr << "LyXText::metrics: width: " << mi.base.textwidth << "\n";
//lyxerr << "LyXText::metrics: width: " << mi.base.textwidth << "\n";
// rebuild row cache
rowlist_.clear();