]> 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 740ccd1a97034d29bf9661ccfbf87353698a4255..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.
        */
@@ -102,6 +109,9 @@ namespace canvas
        */
       LayoutItemRef getParent() const;
 
+      /// Called before item is removed from a layout
+      virtual void onRemove() {}
+
     protected:
 
       friend class Canvas;