resize/redraw changes

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4451 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
John Levon 2002-06-21 02:58:54 +00:00
parent 1cadf458e3
commit cc780330cc
7 changed files with 25 additions and 15 deletions

View File

@ -1,3 +1,13 @@
2002-06-21 John Levon <moz@compsoc.man.ac.uk>
* QContentPane.C: restore calls to workAreaResize()
* QLyXKeySym.h: tidy
* QWorkArea.h: remove redraw()
* QWorkArea.C: remove resize()
2002-06-20 John Levon <moz@compsoc.man.ac.uk>
* guiapi.C: createIndex() changed

View File

@ -136,7 +136,7 @@ void QContentPane::resizeEvent(QResizeEvent *)
}
pixmap_->resize(width(), height());
// FIXME wa_->workAreaResize();
wa_->workAreaResize();
}
@ -144,9 +144,7 @@ void QContentPane::paintEvent(QPaintEvent * e)
{
if (!pixmap_.get()) {
pixmap_.reset(new QPixmap(width(), height()));
// FIXME: hmm. We do this to get an /initial/
// painting. So it's wrong.
// FIXME wa_->workAreaResize();
wa_->workAreaResize();
return;
}

View File

@ -27,18 +27,21 @@ class QLyXKeySym : public LyXKeySym {
public:
QLyXKeySym();
virtual ~QLyXKeySym() {}
/// delayed constructor
void set(int key, QString const & text);
/// set from a LyX symbolic name
virtual void init(string const & symbolname);
virtual ~QLyXKeySym() {}
/// Is this a valid key?
virtual bool isOK() const;
/// Is this a modifier key only?
virtual bool isModifier() const;
/// return the LyX symbolic name
virtual string getSymbolName() const;
/**
@ -51,7 +54,13 @@ public:
virtual bool operator==(LyXKeySym const & k) const;
private:
/// the Qt sym value
int key_;
/**
* The generated text from the symbol. This will only be
* filled when the QLyXKeySym is used to pass a key press
* event, not when stored in a kbsequence etc.
*/
QString text_;
};

View File

@ -70,12 +70,6 @@ QWorkArea::~QWorkArea()
}
void QWorkArea::resize(int xpos, int ypos, int width, int height)
{
setGeometry(xpos, ypos, width, height);
}
void QWorkArea::setScrollbarParams(int h, int pos, int line_h)
{
// do what cursor movement does (some grey)

View File

@ -48,8 +48,6 @@ public:
virtual int workWidth() const { return content_->width(); }
/// return the height of the content pane
virtual int workHeight() const { return content_->height(); }
/// FIXME: makes no sense ?
virtual void redraw() const { }
///
virtual void setScrollbarParams(int height, int pos, int line_height);

View File

@ -136,6 +136,8 @@ void QScreen::hideCursor()
void QScreen::expose(int x, int y, int exp_width, int exp_height)
{
lyxerr[Debug::GUI] << "expose " << exp_width << "x" << exp_height
<< "+" << x << "+" << y << endl;
owner_.getContent()->update(x, y, exp_width, exp_height);
}

View File

@ -286,7 +286,6 @@ void LyXScreen::redraw(LyXText * text, BufferView * bv)
cursor_visible_ = false;
bv->showCursor();
}
}