+ /**
+ * Returns the preferred height for the given width @a w.
+ *
+ * The default implementation returns -1, indicating that the preferred
+ * height is independent of the given width.
+ *
+ * Reimplement this function for items supporting height for width.
+ *
+ * @note Do not take margins into account, as this is already handled
+ * before calling this function.
+ *
+ * @see hasHeightForWidth()
+ */
+ virtual int heightForWidthImpl(int w) const;
+
+ /**
+ * Returns the minimum height for the given width @a w.
+ *
+ * The default implementation returns -1, indicating that the minimum
+ * height is independent of the given width.
+ *
+ * Reimplement this function for items supporting height for width.
+ *
+ * @note Do not take margins into account, as this is already handled
+ * before calling this function.
+ *
+ * @see hasHeightForWidth()
+ */
+ virtual int minimumHeightForWidthImpl(int w) const;
+
+ /**
+ * @return whether the visibility has changed.
+ */
+ void setVisibleInternal(bool visible);
+
+ virtual void contentsRectChanged(const SGRecti& rect) {};
+
+ virtual void visibilityChanged(bool visible) {}
+
+ /**
+ * Allow calling the protected setVisibleImpl from derived classes
+ */
+ static void callSetVisibleInternal(LayoutItem* item, bool visible);
+