mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 21:21:32 +00:00
* insettext.C (frame_x,y,w,h): replace member with automatic variables
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7505 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
19f83569df
commit
82910986f7
@ -19,6 +19,8 @@
|
||||
|
||||
* insettext.C (localDispatch): merge cases with default branch
|
||||
|
||||
* insettext.C (frame_x,y,w,h): replace member with automatic variables
|
||||
|
||||
2003-08-04 André Pönitz <poenitz@gmx.net>
|
||||
|
||||
* insettext.[Ch] (updateLocal): remove 'what' argument by assuimng it
|
||||
|
@ -173,7 +173,6 @@ void InsetText::init(InsetText const * ins)
|
||||
drawTextYOffset = 0;
|
||||
locked = false;
|
||||
old_par = paragraphs.end();
|
||||
last_drawn_width = -1;
|
||||
sstate.cursor.par(paragraphs.end());
|
||||
in_insetAllowed = false;
|
||||
}
|
||||
@ -321,9 +320,6 @@ void InsetText::draw(PainterInfo & pi, int x, int baseline) const
|
||||
top_baseline = baseline;
|
||||
top_y = baseline - dim_.asc;
|
||||
|
||||
if (last_drawn_width != dim_.wid)
|
||||
last_drawn_width = dim_.wid;
|
||||
|
||||
if (the_locking_inset && cpar() == inset_par && cpos() == inset_pos) {
|
||||
inset_x = cix() - x + drawTextXOffset;
|
||||
inset_y = ciy() + drawTextYOffset;
|
||||
@ -363,16 +359,16 @@ void InsetText::draw(PainterInfo & pi, int x, int baseline) const
|
||||
|
||||
void InsetText::drawFrame(Painter & pain, int x) const
|
||||
{
|
||||
static int const ttoD2 = TEXT_TO_INSET_OFFSET / 2;
|
||||
frame_x = x + ttoD2;
|
||||
frame_y = top_baseline - dim_.asc + ttoD2;
|
||||
frame_w = dim_.wid - TEXT_TO_INSET_OFFSET;
|
||||
frame_h = dim_.asc + dim_.des - TEXT_TO_INSET_OFFSET;
|
||||
int const ttoD2 = TEXT_TO_INSET_OFFSET / 2;
|
||||
int const frame_x = x + ttoD2;
|
||||
int const frame_y = top_baseline - dim_.asc + ttoD2;
|
||||
int const frame_w = dim_.wid - TEXT_TO_INSET_OFFSET;
|
||||
int const frame_h = dim_.asc + dim_.des - TEXT_TO_INSET_OFFSET;
|
||||
pain.rectangle(frame_x, frame_y, frame_w, frame_h, frame_color);
|
||||
}
|
||||
|
||||
|
||||
void InsetText::updateLocal(BufferView * bv, bool mark_dirty)
|
||||
void InsetText::updateLocal(BufferView * bv, bool /*mark_dirty*/)
|
||||
{
|
||||
if (!bv)
|
||||
return;
|
||||
@ -381,15 +377,11 @@ void InsetText::updateLocal(BufferView * bv, bool mark_dirty)
|
||||
collapseParagraphs(bv);
|
||||
|
||||
text_.partialRebreak();
|
||||
bool flag = mark_dirty || text_.selection.set();
|
||||
if (!text_.selection.set())
|
||||
text_.selection.cursor = text_.cursor;
|
||||
|
||||
bv->fitCursor();
|
||||
|
||||
if (flag)
|
||||
bv->updateInset();
|
||||
|
||||
bv->updateInset();
|
||||
bv->owner()->view_state_changed();
|
||||
bv->owner()->updateMenubar();
|
||||
bv->owner()->updateToolbar();
|
||||
|
@ -308,8 +308,6 @@ private:
|
||||
UpdatableInset * the_locking_inset;
|
||||
///
|
||||
mutable ParagraphList::iterator old_par;
|
||||
///
|
||||
mutable int last_drawn_width;
|
||||
|
||||
/// some funny 'temporarily saved state'
|
||||
mutable TextCursor sstate;
|
||||
@ -317,10 +315,6 @@ private:
|
||||
///
|
||||
// to remember old painted frame dimensions to clear it on the right spot!
|
||||
///
|
||||
mutable int frame_x;
|
||||
mutable int frame_y;
|
||||
mutable int frame_w;
|
||||
mutable int frame_h;
|
||||
mutable bool in_insetAllowed;
|
||||
///
|
||||
// these are used to check for mouse movement in Motion selection code
|
||||
|
Loading…
Reference in New Issue
Block a user