Layout to occupy full area of parent window. More...
Public Member Functions | |
def | __init__ |
Create a full layout object. More... | |
def | reparented |
Reparent notification. More... | |
def | configure_request |
Configure request handler. More... | |
def | map_request |
Resize top-level window before it gets mapped to screen. More... | |
def | focused |
Focus-in notification. More... | |
def | unfocused |
Focus-out notification. More... | |
Layout to occupy full area of parent window.
This layout resizes all the windows it manages so that they occupy the entire area of the layout's parent window. Obviously, this strategy means that only one application window will be visible at a time.
def minx.layout.full.full.__init__ | ( | self, | |
m, | |||
p, | |||
r = None |
|||
) |
Create a full layout object.
m | The main window manager object. |
p | The layout's parent minxlib.window. |
r | The rectangle within parent window assigned to this layout. |
When you create a full layout object, you should supply the main window manager object so that the layout can access the X server connection, any config settings it needs, etc. Additionally, the layout needs to know its parent window.
The optional parameter r specifies the rectangle within the parent window that the layout will occupy. If it is not supplied, the layout will occupy the entire area of the parent window. If it is given, it should be a tuple containing four integers, the first two of which are the x and y coordinates of the layout's target area's top-left corner and the remaining two are the rectangle's width and height.
Since Minx layouts are X windows, this constructor will create a child window of the specified parent, set appropriate properties to mark it as a layout, set the event mask, etc.
def minx.layout.full.full.configure_request | ( | self, | |
n, | |||
x, | |||
y, | |||
w, | |||
h | |||
) |
Configure request handler.
n | The minxlib.window to be configured. |
x | x-coordinate of window's top-left corner. |
y | y-coordinate of window's top-left corner. |
w | Window width. |
h | Window height. |
This layout resizes the windows it manages to always occupy the entire area available to the layout. Thus, in response to a configure request for one of its windows, it will return the layout's geometry (adjusted to take into account the target window's border width).
def minx.layout.full.full.focused | ( | self, | |
w | |||
) |
Focus-in notification.
w | The focused minxlib.window. |
When a window receives the input focus, resize it to account for potentially new border size.
def minx.layout.full.full.map_request | ( | self, | |
w | |||
) |
Resize top-level window before it gets mapped to screen.
w | The minxlib.window to be mapped. |
Before the full layout maps a window, it will compare the window's geometry against its own. If the two don't match, it will resize the window to make it fill the layout's entire area.
def minx.layout.full.full.reparented | ( | self, | |
w | |||
) |
Reparent notification.
w | The minxlib.window that was reparented. |
When this layout manages a window, in the resulting reparent notification, we ensure that the size of the managed window w matches the size of the layout itself.
def minx.layout.full.full.unfocused | ( | self, | |
w | |||
) |
Focus-out notification.
w | The unfocused minxlib.window. |
When a window loses the input focus, resize it to account for potentially new border size.