ScreenletThemes are simple storages that allow loading files as
svg-handles within a theme-directory. Each Screenlet can have its own
theme-directory. It is up to the Screenlet-developer if he wants to let
his Screenlet support themes or not. Themes are turned off by default -
if your Screenlet uses Themes, just set the attribute 'theme_name' to the
name of the theme's dir you want to use. TODO: remove
dict-inheritance
new empty dictionary
|
__init__(self,
path)
x.__init__(...) initializes x; see help(type(x)) for signature |
source code
|
|
|
|
|
|
|
apply_option_overrides(self,
screenlet)
Apply this theme's overridden options to the given Screenlet. |
source code
|
|
|
|
check_entry(self,
filename)
Checks if a file with filename is loaded in this theme. |
source code
|
|
|
|
|
|
|
|
|
|
| draw_text(self,
ctx,
text,
x,
y,
font,
size,
width,
allignment,
weight=0,
ellipsize=<enum PANGO_ELLIPSIZE_NONE of type PangoEllipsizeMode>) |
source code
|
|
|
|
| draw_circle(self,
ctx,
x,
y,
width,
height,
fill=True) |
source code
|
|
|
|
| draw_line(self,
ctx,
start_x,
start_y,
end_x,
end_y,
line_width=1,
close=False,
preserve=False) |
source code
|
|
|
|
| draw_rectangle(self,
ctx,
x,
y,
width,
height,
fill=True) |
source code
|
|
|
|
| draw_rounded_rectangle(self,
ctx,
x,
y,
rounded_angle,
width,
height,
fill=True) |
source code
|
|
|
|
|
|
|
|
|
|
| draw_scaled_image(self,
ctx,
x,
y,
pix,
w,
h) |
source code
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
has_overrides(self)
Check if this theme contains overrides for options. |
source code
|
|
|
|
load_conf(self,
filename)
Load a config-file from this theme's dir and save vars in list. |
source code
|
|
|
|
load_svg(self,
filename)
Load an SVG-file into this theme and reference it as ref_name. |
source code
|
|
|
|
load_png(self,
filename)
Load a PNG-file into this theme and reference it as ref_name. |
source code
|
|
|
|
|
|
|
reload(self)
Re-Load all files in the theme's path. |
source code
|
|
|
|
free(self)
Deletes the Theme's contents and frees all rsvg-handles. |
source code
|
|
|
|
render(self,
ctx,
name)
Render an image from within this theme to the given context. |
source code
|
|
|
|
| render_png_colorized(self,
ctx,
name,
color) |
source code
|
|
|
Inherited from dict:
__cmp__,
__contains__,
__delitem__,
__eq__,
__ge__,
__getattribute__,
__getitem__,
__gt__,
__iter__,
__le__,
__len__,
__lt__,
__ne__,
__new__,
__repr__,
__setitem__,
__sizeof__,
clear,
copy,
fromkeys,
get,
has_key,
items,
iteritems,
iterkeys,
itervalues,
keys,
pop,
popitem,
setdefault,
update,
values,
viewitems,
viewkeys,
viewvalues
Inherited from object:
__delattr__,
__format__,
__reduce__,
__reduce_ex__,
__setattr__,
__str__,
__subclasshook__
|