]> git.mxchange.org Git - simgear.git/blobdiff - simgear/canvas/layout/LayoutItem.hxx
canvas::NasalWidget: check for empty setGeometry callback.
[simgear.git] / simgear / canvas / layout / LayoutItem.hxx
index 18e56b9284aa5394a7645d0b1390a0690997eec7..bd3fb70c5f862d031cabbfc37fd9fd8ac315c471 100644 (file)
@@ -43,6 +43,9 @@ namespace canvas
   {
     public:
 
+      /** Maximum item size (indicating no limit) */
+      static const SGVec2i MAX_SIZE;
+
       LayoutItem();
       virtual ~LayoutItem();
 
@@ -61,6 +64,10 @@ namespace canvas
        */
       SGVec2i maximumSize() const;
 
+      virtual bool hasHeightForWidth() const;
+      virtual int heightForWidth(int w) const;
+      virtual int minimumHeightForWidth(int w) const;
+
       /**
        * Mark all cached data as invalid and require it to be recalculated.
        */
@@ -93,7 +100,7 @@ namespace canvas
       CanvasPtr getCanvas() const;
 
       /**
-       * Set the parent layout item (usally this is a layout).
+       * Set the parent layout item (usually this is a layout).
        */
       void setParent(const LayoutItemWeakRef& parent);
 
@@ -102,6 +109,9 @@ namespace canvas
        */
       LayoutItemRef getParent() const;
 
+      /// Called before item is removed from a layout
+      virtual void onRemove() {}
+
     protected:
 
       friend class Canvas;