Package elisa :: Package plugins :: Package good :: Package pigment :: Module pigment_context :: Class PigmentContext
[hide private]
[frames] | no frames]

Class PigmentContext

source code


Context based on Pigment. Creates a Pigment viewport and associates a Pigment canvas to it. It takes care of the viewport resizes and subsequent regenerations.

Nested Classes [hide private]

Inherited from core.component.Component: __metaclass__

Instance Methods [hide private]
 
initialize(self)
Initialize various variables internal to the Component.
source code
 
_gtk_window_delete_event_cb(self, *args) source code
 
aspect_ratio_changed(self, old_aspect_ratio, new_aspect_ratio)
DOCME
source code
 
clean(self)
Perform some cleanups and save the Component config back to application's config.
source code
 
context_handle__set(self, context_handle) source code
 
context_handle__get(self) source code
 
_compiz_check(self) source code
 
_get_screen_size_from_ratio(self, config_screen_ratio) source code
 
_get_pixel_aspect_ratio(self, screen_aspect_ratio) source code
 
_configure_callback(self, viewport, event) source code
 
_resize_canvas(self) source code
 
_motion_notify_callback(self, viewport, event) source code
 
_hide_cursor(self) source code
 
theme_changed(self, old_theme, new_theme)
DOCME
source code

Inherited from base_components.context.Context: __init__, aspect_ratio__get, aspect_ratio__set

Inherited from core.component.Component: load_config, save_config

Inherited from extern.log.log.Loggable: debug, doLog, error, info, log, logFunction, logObjectName, warning, warningFailure

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Static Methods [hide private]

Inherited from core.component.Component: __classinit__

Class Variables [hide private]
dict default_config = {'screen_ratio': 'auto', 'touchscreen': '0', ...
used when nothing found in Application's config
dict config_doc = {'screen_ratio': 'The ratio of the screen. This i...
documentation for each option of the default configuration.
string name = 'pigment_context'
Component's name

Inherited from core.component.Component: checked, id, plugin

Inherited from extern.log.log.Loggable: logCategory

Instance Variables [hide private]
dictionary master_drawables = {}
dictionary of master drawables used for improved theme management based on Pigment cloning keys: theme icons values: master drawables

Inherited from base_components.context.Context: aspect_ratio, viewport_handle

Inherited from core.component.Component: config, path

Properties [hide private]
any context_handle
first object to add to the viewport (eg.

Inherited from object: __class__

Method Details [hide private]

initialize(self)

source code 

Initialize various variables internal to the Component.

This method is called by the plugin_registry after the component's config has been loaded.

Override this method if you need to perform some initializations that would normally go in Component's constructor but can't be done there because they require access to the component's config.
Overrides: core.component.Component.initialize
(inherited documentation)

aspect_ratio_changed(self, old_aspect_ratio, new_aspect_ratio)

source code 
DOCME
Overrides: base_components.context.Context.aspect_ratio_changed
(inherited documentation)

clean(self)

source code 
Perform some cleanups and save the Component config back to application's config. This method should be called by the elisa.core.manager.Manager holding the component reference when it stops itself.
Overrides: core.component.Component.clean
(inherited documentation)

theme_changed(self, old_theme, new_theme)

source code 
DOCME
Overrides: base_components.context.Context.theme_changed
(inherited documentation)

Class Variable Details [hide private]

default_config

used when nothing found in Application's config
Type:
dict
Value:
{'screen_ratio': 'auto',
 'touchscreen': '0',
 'use_gtk': '0',
 'window_width': '0'}

config_doc

documentation for each option of the default configuration. Keys should be same as the ones in default_config and values should be strings
Type:
dict
Value:
{'screen_ratio': 'The ratio of the screen. This is a string containing\
 a relation value, separated by a colon (:). Common values are 16:9, 4\
:3, 16:10, but it could be any other, too. You can have special values\
 : mm, based on screen size in milimeters, sr, based on window manager\
 resolution, or auto. auto will use mm special value.',
 'touchscreen': 'If set to 1, the mouse behaviour will be adapted for \
touchscreen equipped hardware.',
 'window_width': 'Here you can set the width in pixels the window shou\
...

Property Details [hide private]

context_handle

first object to add to the viewport (eg. Pigment group, GTK Box, etc.)
Get Method:
elisa.plugins.good.pigment.pigment_context.PigmentContext.context_handle__get(self)
Set Method:
elisa.plugins.good.pigment.pigment_context.PigmentContext.context_handle__set(self, context_handle)
Delete Method:
'frontend'