adjust_size_request


Description:

[ NoWrapper ]
public virtual void adjust_size_request (Orientation orientation, ref int minimum_size, ref int natural_size)

Convert an initial size request from a widget's SizeRequestMode virtual method implementations into a size request to be used by parent containers in laying out the widget.

adjust_size_request adjusts from a child widget's original request to what a parent container should use for layout. The for_size argument will be -1 if the request should not be for a particular size in the opposing orientation, i.e. if the request is not height-for-width or width-for-height. If for_size is greater than -1, it is the proposed allocation in the opposing orientation that we need the request for. Implementations of adjust_size_request should chain up to the default implementation, which applies Widget’s margin properties and imposes any values from set_size_request. Chaining up should be last, after your subclass adjusts the request, so Widget can apply constraints and add the margin properly.