X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Finsets%2Finsetcollapsable.h;h=0fe13d317a44ca02694d81d35dce7b79230facd7;hb=3c8aba3b556871fb1100a2f98cd93d5d4e3f70c9;hp=1dedc0f65298c27acc12dd5c3746fed47f7c967a;hpb=23f2fead49b48ccf8c961d441bbd48d841c7ab6e;p=lyx.git diff --git a/src/insets/insetcollapsable.h b/src/insets/insetcollapsable.h index 1dedc0f652..0fe13d317a 100644 --- a/src/insets/insetcollapsable.h +++ b/src/insets/insetcollapsable.h @@ -4,7 +4,7 @@ * * LyX, The Document Processor * - * Copyright (C) 2000 The LyX Team. + * Copyright 2000 The LyX Team. * *====================================================== */ @@ -34,11 +34,16 @@ public: /// static int const TEXT_TO_BOTTOM_OFFSET = 2; /// + explicit InsetCollapsable(Buffer *); /// ~InsetCollapsable() {} /// - Inset * Clone(); + Inset * Clone() const; + /// + void Read(LyXLex &); + /// + void Write(std::ostream &) const; /// int ascent(Painter &, LyXFont const &) const; /// @@ -66,7 +71,9 @@ public: /// void setLabelFont(LyXFont & f) { labelfont = f; } /// - void setAutoCollapse(bool f) { autocolapse = f; } + void setAutoCollapse(bool f) { autocollapse = f; } + /// + int getMaxWidth(Painter & pain, UpdatableInset const *) const; protected: /// @@ -79,6 +86,8 @@ protected: void draw_collapsed(Painter & pain, const LyXFont &, int , float &) const; /// void UpdateLocal(BufferView *, bool); + /// + int getMaxTextWidth(Painter & pain, UpdatableInset const *, int x=0) const; /// bool collapsed; @@ -91,11 +100,12 @@ private: /// LyXFont labelfont; /// - bool autocolapse; + bool autocollapse; /// mutable int - top_baseline, top_x, - button_x; + button_length, button_top_y, button_bottom_y; + /// + int widthOffset; }; #endif