Base class for a line layout (either vertical or horizontal) This class is made to ease the creation of Tool in Python. It manages all the 'FBLayout' region stuff (no need to use FBAddRegionParam anymore!). Generally you just Add a Control to the layout specifying some parameters. There are 2 kinds of Add: Add with fixed size and AddRelative which ensure the control Added will occupy a 'percentage' of the available space AFTER the fixed space has been assigned.
Classes | |
class | ControlDesc |
Public Member Functions | |
def | __init__ |
def | Add |
def | AddRelative |
def | Remove |
def | RemoveAll |
Public Attributes | |
controls | |
ratio | |
allocatedsize | |
floworientation | |
default_space |
def __init__ | ( | self, | |
floworientation | |||
) |
Reimplemented in FBHBoxLayout, and FBVBoxLayout.
def Add | ( | self, | |
control, | |||
size, | |||
customparams | |||
) |
Add a control to layout specifying its FIXED size. customparams: space: space between previous control width: fixed width if layout is vertical based height: fixed height if layout is horizontal based.
def AddRelative | ( | self, | |
control, | |||
ratio = 1.0 , |
|||
customparams | |||
) |
Add a control to layout specifying its RATIO. This means the control will be assigned a size based on the space left when all FIXED size have been allocated. customparams: space: space between prev control width: fixed width if layout is vertical based height: fixed height if layout is horizontal based.
def Remove | ( | self, | |
control | |||
) |
Remove a control from the layout.
def RemoveAll | ( | self | ) |
Remove all controls from layout
Reimplemented in FBHBoxLayout, and FBVBoxLayout.