mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-26 22:17:41 +00:00
cleanups
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21498 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
be85a6fcb5
commit
4aa5f6cd2d
@ -88,8 +88,6 @@ InsetCollapsable::InsetCollapsable(BufferParams const & bp,
|
||||
InsetCollapsable::InsetCollapsable(InsetCollapsable const & rhs)
|
||||
: InsetText(rhs),
|
||||
button_dim(rhs.button_dim),
|
||||
topx(rhs.topx),
|
||||
topbaseline(rhs.topbaseline),
|
||||
layout_(rhs.layout_),
|
||||
labelstring_(rhs.labelstring_),
|
||||
status_(rhs.status_),
|
||||
@ -325,7 +323,7 @@ void InsetCollapsable::draw(PainterInfo & pi, int x, int y) const
|
||||
pi.pain.line(xx1, y + desc - 4,
|
||||
xx1, y + desc,
|
||||
layout_->labelfont.color());
|
||||
if (internalStatus() == Open)
|
||||
if (status_ == Open)
|
||||
pi.pain.line(xx1, y + desc,
|
||||
xx2, y + desc,
|
||||
layout_->labelfont.color());
|
||||
@ -511,7 +509,7 @@ void InsetCollapsable::doDispatch(Cursor & cur, FuncRequest & cmd)
|
||||
if (geometry() == Corners ||
|
||||
geometry() == SubLabel ||
|
||||
geometry() == NoButton) {
|
||||
if (internalStatus() == Open)
|
||||
if (status_ == Open)
|
||||
setStatus(cur, Collapsed);
|
||||
else
|
||||
setStatus(cur, Open);
|
||||
@ -562,7 +560,7 @@ void InsetCollapsable::doDispatch(Cursor & cur, FuncRequest & cmd)
|
||||
else if (cmd.argument() == "close")
|
||||
setStatus(cur, Collapsed);
|
||||
else if (cmd.argument() == "toggle" || cmd.argument().empty())
|
||||
if (internalStatus() == Open) {
|
||||
if (status_ == Open) {
|
||||
setStatus(cur, Collapsed);
|
||||
if (geometry() == ButtonOnly)
|
||||
cur.top().forwardPos();
|
||||
|
@ -154,10 +154,6 @@ protected:
|
||||
///
|
||||
virtual void doDispatch(Cursor & cur, FuncRequest & cmd);
|
||||
///
|
||||
Dimension dimensionCollapsed() const;
|
||||
///
|
||||
Box const & buttonDim() const;
|
||||
///
|
||||
void edit(Cursor & cur, bool left);
|
||||
///
|
||||
Inset * editXY(Cursor & cur, int x, int y);
|
||||
@ -167,20 +163,16 @@ protected:
|
||||
virtual void resetParagraphsFont();
|
||||
|
||||
protected:
|
||||
///
|
||||
mutable Box button_dim;
|
||||
///
|
||||
mutable int topx;
|
||||
///
|
||||
mutable int topbaseline;
|
||||
///
|
||||
InsetLayout const * layout_;
|
||||
///
|
||||
CollapseStatus internalStatus() const { return status_; }
|
||||
private:
|
||||
///
|
||||
Dimension dimensionCollapsed() const;
|
||||
///
|
||||
docstring labelstring_;
|
||||
///
|
||||
mutable Box button_dim;
|
||||
///
|
||||
mutable CollapseStatus status_;
|
||||
/// a substatus of the Open status, determined automatically in metrics
|
||||
mutable bool openinlined_;
|
||||
@ -190,9 +182,6 @@ private:
|
||||
bool mouse_hover_;
|
||||
};
|
||||
|
||||
// A helper function that pushes the cursor out of the inset.
|
||||
void leaveInset(Cursor & cur, Inset const & in);
|
||||
|
||||
} // namespace lyx
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user