***************************** wx.IndividualLayoutConstraint ***************************** Inheritance diagram for `wx.IndividualLayoutConstraint`: | .. inheritance-diagram:: wx.IndividualLayoutConstraint | Description =========== Objects of this class are stored in the `wx.LayoutConstraint `_ class as one of eight possible constraints that a window can be involved in. Constraints are initially set to have the relationship `wx.Unconstrained`, which means that their values should be calculated by looking at known constraints. .. seealso:: `wx.LayoutConstraints `_, `wx.Window.SetConstraints `_ Constraint Flags ^^^^^^^^^^^^^^^^ The Edge specifies the type of edge or dimension of a window. ==================== ============================== Edges Description ==================== ============================== ``wx.Left`` The left edge. ``wx.Top`` The top edge. ``wx.Right`` The right edge. ``wx.Bottom`` The bottom edge. ``wx.CentreX`` The x-coordinate of the centre of the window. ``wx.CentreY`` The y-coordinate of the centre of the window. ==================== ============================== | The Relationship specifies the relationship that this edge or dimension has with another specified edge or dimension. Normally, the user doesn't use these directly because functions such as `Below <#Below>`_ and `RightOf <#RightOf>`_ are a convenience for using the more general `Set <#Set>`_ function. ==================== ============================== Relationships Description ==================== ============================== ``wx.Unconstrained`` The edge or dimension is unconstrained (the default for edges.) ``wx.AsIs`` The edge or dimension is to be taken from the current window position or size (the default for dimensions.) ``wx.Above`` The edge should be above another edge. ``wx.Below`` The edge should be below another edge. ``wx.LeftOf`` The edge should be to the left of another edge. ``wx.RightOf`` The edge should be to the right of another edge. ``wx.SameAs`` The edge or dimension should be the same as another edge or dimension. ``wx.PercentOf`` The edge or dimension should be a percentage of another edge or dimension. ``wx.Absolute`` The edge or dimension should be a given absolute value. ==================== ============================== Derived From ^^^^^^^^^^^^^ * `wx.Object `_ Methods Summary ^^^^^^^^^^^^^^^ * `__init__ <#__init__>`_ * `Above <#Above>`_ * `Absolute <#Absolute>`_ * `AsIs <#AsIs>`_ * `Below <#Below>`_ * `GetDone <#GetDone>`_ * `GetEdge <#GetEdge>`_ * `GetMargin <#GetMargin>`_ * `GetMyEdge <#GetMyEdge>`_ * `GetOtherEdge <#GetOtherEdge>`_ * `GetOtherWindow <#GetOtherWindow>`_ * `GetPercent <#GetPercent>`_ * `GetRelationship <#GetRelationship>`_ * `GetValue <#GetValue>`_ * `LeftOf <#LeftOf>`_ * `PercentOf <#PercentOf>`_ * `ResetIfWin <#ResetIfWin>`_ * `RightOf <#RightOf>`_ * `SameAs <#SameAs>`_ * `SatisfyConstraint <#SatisfyConstraint>`_ * `Set <#Set>`_ * `SetDone <#SetDone>`_ * `SetEdge <#SetEdge>`_ * `SetMargin <#SetMargin>`_ * `SetRelationship <#SetRelationship>`_ * `SetValue <#SetValue>`_ * `Unconstrained <#Unconstrained>`_ Properties Summary ^^^^^^^^^^^^^^^^^^ * `Done <#Done>`_ * `Margin <#Margin>`_ * `MyEdge <#MyEdge>`_ * `OtherEdge <#OtherEdge>`_ * `OtherWindow <#OtherWindow>`_ * `Percent <#Percent>`_ * `Relationship <#Relationship>`_ * `Value <#Value>`_ Class API ========= Methods ^^^^^^^ .. method:: __init__() `No docstrings available for this method.` -------- .. method:: Above(otherWin, margin=0) Constrains this edge to be above the given window, with an optional margin. Implicitly, this is relative to the top edge of the other window. **Parameters:** * `otherWin` (`wx.Window `_) * `margin` (int) -------- .. method:: Absolute(value) Constrains this edge or dimension to be the given absolute value. **Parameters:** * `value` (int) -------- .. method:: AsIs() Sets this edge or constraint to be whatever the window's value is at the moment. If either of the width and height constraints are *as is*, the window will not be resized, but moved instead. This is important when considering panel items which are intended to have a default size, such as a button, which may take its size from the size of the button label. -------- .. method:: Below(otherWin, margin=0) Constrains this edge to be below the given window, with an optional margin. Implicitly, this is relative to the bottom edge of the other window. **Parameters:** * `otherWin` (`wx.Window `_) * `margin` (int) -------- .. method:: GetDone() `No docstrings available for this method.` -------- .. method:: GetEdge(which, thisWin, other) Get the value of this edge or dimension, or if this is not determinable, -1. **Parameters:** * `which` (int) * `thisWin` (`wx.Window `_) * `other` (`wx.Window `_) | **Returns:** `int` -------- .. method:: GetMargin() `No docstrings available for this method.` -------- .. method:: GetMyEdge() `No docstrings available for this method.` -------- .. method:: GetOtherEdge() `No docstrings available for this method.` -------- .. method:: GetOtherWindow() `No docstrings available for this method.` -------- .. method:: GetPercent() `No docstrings available for this method.` -------- .. method:: GetRelationship() `No docstrings available for this method.` -------- .. method:: GetValue() `No docstrings available for this method.` -------- .. method:: LeftOf(otherWin, margin=0) Constrains this edge to be to the left of the given window, with an optional margin. Implicitly, this is relative to the left edge of the other window. **Parameters:** * `otherWin` (`wx.Window `_) * `margin` (int) -------- .. method:: PercentOf(otherWin, edge, per) Constrains this edge or dimension to be to a percentage of the given window, with an optional margin. **Parameters:** * `otherWin` (`wx.Window `_) * `edge` (int) * `per` (int) -------- .. method:: ResetIfWin(otherW) Reset constraint if it mentions `otherW`. **Parameters:** * `otherW` (`wx.Window `_) | **Returns:** `bool` -------- .. method:: RightOf(otherWin, margin=0) Constrains this edge to be to the right of the given window, with an optional margin. Implicitly, this is relative to the right edge of the other window. **Parameters:** * `otherWin` (`wx.Window `_) * `margin` (int) -------- .. method:: SameAs(otherWin) Constrains this edge or dimension to be to the same as the edge of the given window, with an optional margin. **Parameters:** * `otherWin` (`wx.Window `_) -------- .. method:: SatisfyConstraint(constraints, win) Try to satisfy constraint. **Parameters:** * `constraints` (`wx.LayoutConstraints `_) * `win` (`wx.Window `_) | **Returns:** `bool` -------- .. method:: Set(rel) Sets the properties of the constraint. Normally called by one of the convenience functions such as `Above <#Above>`_, `RightOf <#RightOf>`_, `SameAs <#SameAs>`_. **Parameters:** * `rel` (int) -------- .. method:: SetDone(d) | **Parameters:** * `d` (bool) -------- .. method:: SetEdge(which) | **Parameters:** * `which` (int) -------- .. method:: SetMargin(m) | **Parameters:** * `m` (int) -------- .. method:: SetRelationship(r) | **Parameters:** * `r` (int) -------- .. method:: SetValue(v) | **Parameters:** * `v` (int) -------- .. method:: Unconstrained() Sets this edge or dimension to be unconstrained, that is, dependent on other edges and dimensions from which this value can be deduced. -------- Properties ^^^^^^^^^^ .. attribute:: Done See `GetDone <#GetDone>`_ and `SetDone <#SetDone>`_ .. attribute:: Margin See `GetMargin <#GetMargin>`_ and `SetMargin <#SetMargin>`_ .. attribute:: MyEdge See `GetMyEdge <#GetMyEdge>`_ .. attribute:: OtherEdge See `GetOtherEdge <#GetOtherEdge>`_ .. attribute:: OtherWindow See `GetOtherWindow <#GetOtherWindow>`_ .. attribute:: Percent See `GetPercent <#GetPercent>`_ .. attribute:: Relationship See `GetRelationship <#GetRelationship>`_ and `SetRelationship <#SetRelationship>`_ .. attribute:: Value See `GetValue <#GetValue>`_ and `SetValue <#SetValue>`_