Public Member Functions | List of all members
minx.layout.full.full Class Reference

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...

Detailed Description

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.

Constructor & Destructor Documentation

def minx.layout.full.full.__init__ (   self,
  r = None 

Create a full layout object.

mThe main window manager object.
pThe layout's parent minxlib.window.
rThe 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.

Member Function Documentation

def minx.layout.full.full.configure_request (   self,

Configure request handler.

nThe minxlib.window to be configured.
xx-coordinate of window's top-left corner.
yy-coordinate of window's top-left corner.
wWindow width.
hWindow height.
Tuple containing new geometry.

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,

Focus-in notification.

wThe 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,

Resize top-level window before it gets mapped to screen.

wThe 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,

Reparent notification.

wThe 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,

Focus-out notification.

wThe unfocused minxlib.window.

When a window loses the input focus, resize it to account for potentially new border size.