def __init__(self, *args, **kwargs): BitmapScroller.__init__(self, *args, **kwargs) p = get_image_path("icons/hand.ico") self.hand_cursor = wx.Cursor(p, wx.BITMAP_TYPE_ICO, 16, 16) p = get_image_path("icons/hand_closed.ico") self.hand_closed_cursor = wx.Cursor(p, wx.BITMAP_TYPE_ICO, 16, 16) self.forced_cursor = None self.set_mouse_mode( self.default_mouse_handler) # dummy initial mouse handler self.default_pan_mode = SelectMode(self) self.batch = None
def __init__(self, parent, linked_base, *args, **kwargs): BitmapScroller.__init__(self, parent, linked_base, rect_select=True, *args, **kwargs) MouseControllerMixin.__init__(self, SelectMode) self.level_builder = None self.trigger_root = None self.cached_screen = None self.valid_level = False self.force_refresh = True self.screen_state = None self.trigger_state = None self.bytes_per_row = 40 * 4
def get_image(self): if self.segment_viewer.valid_jumpman_segment: override = self.mouse_mode.get_image_override() if override is not None: return override if self.valid_level: self.compute_image() else: self.bad_image() bitimage = BitmapScroller.get_image(self) return bitimage self.mouse_mode.draw_extra_objects(self.level_builder, self.segment, self.segment_viewer.segment) bitimage = BitmapScroller.get_image(self) self.mouse_mode.draw_overlay(bitimage) return bitimage
def create_contents(self, parent): control = BitmapScroller(parent, self.task, size=(64, 500)) return control
def process_left_up(self, evt): BitmapScroller.on_left_up( self.canvas, evt ) # can't use self.canvas directly because it has an overridded method on_left_down
def create_control(cls, parent, linked_base): return BitmapScroller(parent, linked_base, size=(64,500))
def get_rendered_image(self, segment=None): return BitmapScroller.get_image(self, segment)