def _next_set(self): """ Handles the 'next' event being fired. """ inn(self.demo_file.demo, "dispose")() self.ui.dispose() self.demo_file = self.ui = None self._process_file()
def _modified_set ( self ): """ Handles the 'modified' facet being changed. """ # Discard any optional cached values: del self._cached # Notify the owner (if any) that we have been modified: inn( self.owner ).set( modified = self )
def item_at ( self, x, y ): """ Returns the topmost item (if any) containing the point specified by (*x*,*y*). """ for item in reversed( self.content ): if item.visible and (item.opacity > 0.0): result = inn( item, 'item_at' )( x, y ) if result is not None: return result return None
def slide_remove ( self ): """ Handles a slide being removed from the canvas. """ inn( self.header ).remove() inn( self.footer ).remove() handler = getattr( self, '_slide_transition_' + self.slide_transition ) items = [] for item in self.body_content: item.halt_animated_facets() if item.visible: animation = handler( item ) if animation is not None: items.append( animation ) else: item.remove() if len( items ) > 0: self.animation = ConcurrentAnimation( items = items ).run() # Clean up any objects created by code attached to the slide: if len( self.objects ) > 0: self.editor.export_object( DummyObject() ) for object in self.objects: inn( object, 'dispose' )() del self.objects[:]
def remove ( self ): """ Removes the object from its owner. """ inn( self.owner ).remove( self )
def _bitmap_modified ( self ): """ Handles the current image bitmap being modified. """ self._scale = self._scaled_image = None inn( self.adapter ).refresh()
def _editor_modified ( self ): """ Handles some value that affects the editor appearance being modified. """ inn( self.adapter ).refresh()
def _canvas_set ( self, old, new ): """ Handles the 'canvas' facet being changed. """ inn( old ).set( owner = None ) inn( new ).set( owner = self, bounds = self.content_bounds ) self.controller = new
def resize ( self, event ): """ Handles the control being resized. """ super( DrawableCanvasControl, self ).resize( event ) inn( self.canvas ).set( bounds = self.content_bounds )
def paint_content ( self, g ): """ Paints the content of the window into the device context specified by *g*. """ inn( self.canvas ).draw( g )
def _item_at ( self, x, y ): """ Returns the topmost canvas item (if any) containing the point specified by (*x*,*y*). """ return (inn( self.canvas ).item_at( x, y ) or self.canvas)
def closed(self, info, is_ok): """ Closes the view. """ object = info.object inn(object.demo, "dispose")() del object.demo
def run_code ( self ): """ Runs any code associated with the current slide. """ inn( self.display_slide ).run_code()