Home | Trees | Index | Help |
|
---|
Package pywm :: Class window |
|
This class wraps an X window in a form where your python window manager code can manipulate it.
You can subclass this, and pass your subclass into your window manager constructor. This will cause all created windows to be built with your custom window class.Method Summary | |
---|---|
You should not instantiate windows yourself. | |
__repr__(self)
| |
Brings this window to the top, and makes it the active window | |
Closes the window | |
Brings this window to the top, and makes it the active window | |
Call this to return the current setting of the window's title bar | |
Returns x, y size of the screen as a tuple | |
Arguments: | |
Centre the window on the screen | |
Moves the window to the right (east) position | |
Moves the window to the top (north) position | |
Moves the window to the top right (northeast) position | |
Moves the window to the top (north) position | |
Moves the window to the top (north) position | |
Moves the window to the bottom right (southeast) position | |
Moves the window to the top (north) position | |
Moves the window to the top (north) position | |
Grow from the center by dw, dh | |
Grow from the bottom by 'dh' pizels. | |
Grow to the left by 'dw' pizels. | |
Grow to the right by 'dw' pizels. | |
Grow from the top by 'dh' pizels. | |
height(self)
| |
Hides the window off the screen. | |
Iconises this window | |
Calling lock on a window prevents that window from being affected by zooming and panning functions | |
Lowers this window | |
Moves window down Arg - dy - is amount to move by, defaults to self.moveIncrement | |
Moves window left. | |
Move the window relative to its present position | |
Moves window right. | |
Moves window up. | |
on_resize(self,
x,
y,
w,
h)
| |
Gets or sets the window position | |
Raises this window | |
Resizes the window according to how. | |
Resizes window relative to its present size. | |
Sets the window border mode. | |
Shrink from the center by dw, dh | |
Shrink from the bottom by 'dh' pizels. | |
Shrink from the left by 'dw' pizels. | |
Shrink from the right by 'dw' pizels. | |
Shrink from the top by 'dh' pizels. | |
Gets or sets the window size | |
Toggles between existing and maximum size | |
Toggles the height between current and maximum | |
Toggles the height between current and maximum | |
UnHides the window back onto the screen. | |
Calling unlock on a window makes that window susceptible to moving and resizing via zooming and panning functions. | |
width(self)
|
Class Variable Summary | |
---|---|
int |
moveIncrement = 40 |
int |
sizeIncrement = 40 |
Method Details |
---|
__init__(self,
hWin,
wm)
You should not instantiate windows yourself. This constructor gets
called when the WM engine detects that a window has been created (or a
previously known window has been restored into view).
|
activate(self)Brings this window to the top, and makes it the active window |
close(self)Closes the window |
deactivate(self)Brings this window to the top, and makes it the active window |
getname(self)Call this to return the current setting of the window's title bar |
getScreenSize(self)Returns x, y size of the screen as a tuple |
go(self, direction)Arguments:
|
goCentre(self)Centre the window on the screen |
goEast(self)Moves the window to the right (east) position |
goNorth(self)Moves the window to the top (north) position |
goNorthEast(self)Moves the window to the top right (northeast) position |
goNorthWest(self)Moves the window to the top (north) position |
goSouth(self)Moves the window to the top (north) position |
goSouthEast(self)Moves the window to the bottom right (southeast) position |
goSouthWest(self)Moves the window to the top (north) position |
goWest(self)Moves the window to the top (north) position |
grow(self, dw=None, dh=None)Grow from the center by dw, dh Arguments:
|
growBottom(self, dh=None)Grow from the bottom by 'dh' pizels. Default self.sizeIncrement |
growLeft(self, dw=None)Grow to the left by 'dw' pizels. Default self.sizeIncrement |
growRight(self, dw=None)Grow to the right by 'dw' pizels. Default self.sizeIncrement |
growTop(self, dh=None)Grow from the top by 'dh' pizels. Default self.sizeIncrement |
hide(self)Hides the window off the screen. Note - this will trigger an 'on_destroy' callback, so watch for this in your callback |
iconise(self)Iconises this window |
lock(self)Calling lock on a window prevents that window from being affected by zooming and panning functions |
lower(self)Lowers this window |
moveDown(self, dy=None)Moves window down Arg - dy - is amount to move by, defaults to self.moveIncrement |
moveLeft(self, dx=None)Moves window left. Arg - dx - is amount to move by, defaults to self.moveIncrement |
moveRel(self, dx=0, dy=0)Move the window relative to its present position Args: dx, dy - if either of these are None, don't move on that axis. |
moveRight(self, dx=None)Moves window right. Arg - dx - is amount to move by, defaults to self.moveIncrement |
moveUp(self, dy=None)Moves window up. Arg - dy - is amount to move by, defaults to self.moveIncrement |
position(self, x=None, y=None)Gets or sets the window position Call with no arguments to fetch the position as a tuple Call with x,y to set the window position |
raise_(self)Raises this window |
resize(self, how)Resizes the window according to how. Argument:
|
resizeRel(self, dw=0, dh=0)Resizes window relative to its present size. Arguments:
|
setborder(self, mode='normal')Sets the window border mode. Argument - mode:
|
shrink(self, dw=None, dh=None)Shrink from the center by dw, dh Arguments:
|
shrinkBottom(self, dh=None)Shrink from the bottom by 'dh' pizels. Default self.sizeIncrement |
shrinkLeft(self, dw=None)Shrink from the left by 'dw' pizels. Default self.sizeIncrement |
shrinkRight(self, dw=None)Shrink from the right by 'dw' pizels. Default self.sizeIncrement |
shrinkTop(self, dh=None)Shrink from the top by 'dh' pizels. Default self.sizeIncrement |
size(self, w=None, h=None)Gets or sets the window size Call with no arguments to fetch the position as a tuple Call with x,y to set the window position |
toggleMax(self)Toggles between existing and maximum size |
toggleMaxHeight(self)Toggles the height between current and maximum |
toggleMaxWidth(self)Toggles the height between current and maximum |
unhide(self)UnHides the window back onto the screen. Note - this will trigger an 'on_create' callback, so watch for this in your callback |
unlock(self)Calling unlock on a window makes that window susceptible to moving and resizing via zooming and panning functions. This is the default state when the window gets created. |
Class Variable Details |
---|
moveIncrement
|
sizeIncrement
|
Home | Trees | Index | Help |
|
---|
Generated by Epydoc 2.1 on Mon Feb 27 15:47:09 2006 | http://epydoc.sf.net |