Package conduit :: Package gtkui :: Module Canvas :: Class Canvas
[hide private]

Class Canvas

source code


This class manages many objects

Instance Methods [hide private]
 
__init__(self, parentWindow, typeConverter, syncManager, dataproviderMenu, conduitMenu, msg)
Draws an empty canvas of the appropriate size
source code
 
_do_hint(self, msgarea, respid) source code
 
_make_hint(self, hint, timeout=4) source code
 
_show_hint(self, conduitCanvasItem, dataproviderCanvasItem, newItem) source code
 
_update_for_theme(self, *args) source code
 
_setup_popup_menus(self, dataproviderPopupXML, conduitPopupXML)
Sets up the popup menus and their callbacks
source code
 
_delete_welcome(self) source code
 
_create_welcome(self) source code
 
_maybe_show_welcome(self)
Adds a friendly welcome to the canvas.
source code
 
_get_child_conduit_canvas_items(self) source code
 
_get_child_dataprovider_canvas_items(self) source code
 
_canvas_resized(self, widget, allocation) source code
 
_on_conduit_button_press(self, view, target, event)
Handle button clicks on conduits
source code
 
_on_dataprovider_button_press(self, view, target, event)
Handle button clicks
source code
int
_get_bottom_of_conduits_coord(self)
Gets the Y coordinate at the bottom of all visible conduits
source code
 
_get_minimum_canvas_size(self, allocH=None) source code
 
_remove_overlap(self)
Moves the ConduitCanvasItems to stop them overlapping visually
source code
 
on_conduit_removed(self, sender, conduitRemoved) source code
 
on_conduit_added(self, sender, conduitAdded)
Creates a ConduitCanvasItem for the new conduit
source code
 
on_dataprovider_removed(self, sender, dataproviderRemoved, conduitCanvasItem) source code
 
on_dataprovider_added(self, sender, dataproviderAdded, conduitCanvasItem)
Creates a DataProviderCanvasItem for the new dataprovider and adds it to the canvas
source code
 
get_sync_set(self) source code
 
set_sync_set(self, syncSet) source code
 
on_drag_motion(self, wid, context, x, y, time) source code
 
on_delete_conduit_clicked(self, widget)
Delete a conduit and all its associated dataproviders
source code
 
on_refresh_conduit_clicked(self, widget)
Refresh the selected conduit
source code
 
on_synchronize_conduit_clicked(self, widget)
Synchronize the selected conduit
source code
 
on_delete_dataprovider_clicked(self, widget)
Delete the selected dataprovider
source code
 
on_configure_dataprovider_clicked(self, widget)
Calls the configure method on the selected dataprovider
source code
 
on_refresh_dataprovider_clicked(self, widget)
Refreshes a single dataprovider
source code
 
on_two_way_sync_toggle(self, widget)
Enables or disables two way sync on dataproviders.
source code
 
on_slow_sync_toggle(self, widget)
Enables or disables slow sync of dataproviders.
source code
 
on_auto_sync_toggle(self, widget)
Enables or disables slow sync of dataproviders.
source code
 
on_policy_toggle(self, widget, policyName, policyValue) source code
 
add_dataprovider_to_canvas(self, key, dataproviderWrapper, x, y)
Adds a new dataprovider to the Canvas
source code
 
clear_canvas(self) source code

Inherited from _StyleMixin: get_gtk_style, get_style_color_int_rgb, get_style_color_int_rgba, get_style_color_rgb, get_style_color_rgba

Inherited from _StyleMixin (private): _get_colors_and_state

Class Variables [hide private]
  DND_TARGETS = [('conduit/element-name', 0, 0)]
  WELCOME_MESSAGE = _("Drag a Data Provider here to continue")
Method Details [hide private]

_setup_popup_menus(self, dataproviderPopupXML, conduitPopupXML)

source code 
Sets up the popup menus and their callbacks
Parameters:
  • conduitPopupXML (gtk.glade.XML) - The menu which is popped up when the user right clicks on a conduit
  • dataproviderPopupXML (gtk.glade.XML) - The menu which is popped up when the user right clicks on a dataprovider

_maybe_show_welcome(self)

source code 
Adds a friendly welcome to the canvas. Only does so only if there are no conduits, otherwise it would just get in the way.

_on_dataprovider_button_press(self, view, target, event)

source code 
Handle button clicks
Parameters:

_get_bottom_of_conduits_coord(self)

source code 
Gets the Y coordinate at the bottom of all visible conduits
Returns: int
A coordinate (postivive down) from the canvas origin

add_dataprovider_to_canvas(self, key, dataproviderWrapper, x, y)

source code 
Adds a new dataprovider to the Canvas
Parameters:
  • module (conduit.Module.ModuleWrapper.) - The dataprovider wrapper to add to the canvas
  • x (int) - The x location on the canvas to place the module widget
  • y (int) - The y location on the canvas to place the module widget
Returns:
The conduit that the dataprovider was added to