+ ///
+ int scroll() const { return 0; }
+ ///
+ enum CollapseStatus {
+ Collapsed,
+ Inlined,
+ Open
+ };
+ ///
+ virtual void setStatus(LCursor &, CollapseStatus) {}
+protected:
+ InsetBase() {}
+ InsetBase(InsetBase const &) {}
+ /** The real dispatcher.
+ * Gets normally called from LCursor::dispatch(). LCursor::dispatch()
+ * assumes the common case of 'LFUN handled, need update'.
+ * This has to be overriden by calling LCursor::undispatched() or
+ * LCursor::noUpdate() if appropriate.
+ * If you need to call the dispatch method of some inset directly
+ * you may have to explicitly request an update at that place. Don't
+ * do it in doDispatch(), since that causes nested updates when
+ * called from LCursor::dispatch(), and these can lead to crashes.
+ * \sa getStatus
+ */
+ virtual void doDispatch(LCursor & cur, FuncRequest & cmd);
+
+ /// Cached dimensions of the inset.
+ mutable Dimension dim_;
+private:
+ virtual std::auto_ptr<InsetBase> doClone() const = 0;