def __init__(self, **kwargs): ScrollableView.__init__(self, **kwargs) # Each panel is a list of TopqueryLabels self.panels = [] self.currently_displayed = 0 self.font = Font("Courier", 13)
def __init__(self, num_rows, num_columns, cell_size, **kwds): ScrollableView.__init__(self) self._num_rows = num_rows self._num_columns = num_columns self._cell_size = cell_size self._update_extent() self.set(**kwds)
def __init__(self, *args, **kwargs): ScrollableView.__init__(self, *args, **kwargs) Display.__init__(self) self.background_color = PyGUI_rgb(1, 1, 1) # the backing cache (only needed if we are on OS_X) if backing_is_on: self.__backing_cache = weakref.WeakKeyDictionary() # set up a standard size self.extent = (50, 50) # ---- event handling # the mouseover view self.__mouseoverview_ref = None self.__mouseoverviews = weakref.WeakSet() # the last view where the mouse went down (drag origin view) self.__mousedownview_ref = None # the mouse position self.__mousepos = (0, 0) # is the mouse being dragged? self.__mousedragging = False
def __init__(self): ScrollableView.__init__(self) self.text = "_root.onMouseDown = function () {\n\ttrace('Hi');\n};" self.font = Font('Courier', 16) self.selecting = False self.lexer = ActionScriptLexer() self.cursorpos = 0 self.scursorpos = 0 self.selection = (0, 0) self.formatter = PyGUIFormatter() # self.filter = NameHighlightFilter( self.filter = EverythingHighlightFilter( names=['trace'], tokentype=Token.Keyword, names2=['_root', '_global'], tokentype2=Token.Name.Builtin, names3=[ '_alpha', 'blendMode', 'cacheAsBitmap', '_currentframe', '_droptarget', 'enabled', 'filters', 'focusEnabled', '_focusRect', 'forceSmoothing', '_framesloaded', '_height', '_highquality', 'hitArea', '_lockroot', 'menu', 'opaqueBackground', '_parent', '_quality', '_rotation', 'scale9Grid', 'scrollRect', '_soundbuftime', 'tabChildren', 'tabEnabled', 'tabIndex', '_target', 'totalframes', 'trackAsMenu', 'transform', '_url', 'useHandCursor', '_visible', '_width', '_x', '_xmouse', '_xscale', '_y', '_ymouse', '_yscale' ], tokentype3=Token.Name.Variable.Class) self.extent = (self.width, self.height) # Not working - no idea why - disabled to add speed self.lexer.add_filter(self.filter)
def __init__(self, pagenum, status, crop_button=None, *args, **kw): ScrollableView.__init__(self, *args, **kw) self.pagenum = pagenum self.crop_button = crop_button self.selection = None self.status = status self.status_info = dict(mouse=None, selection=None)
def __init__( self, grid_array, **kwds ): ''' Constructor ''' #call the parent constructor ScrollableView.__init__( self, **kwds ) self._grid = custom_grid.Custom_Grid( grid_array ) self.width = self._grid.width + 20 self.place( self._grid ) self.set_extent( (self._grid.width, self._grid.height) )
def __init__(self, **kwds): ScrollableView.__init__(self, **kwds) self.extent = (1000, 1000)
def __init__( self, player_list, player_keys, **kwds ): """This method is the constructor for the object.""" #call the parent constructor ScrollableView.__init__( self, **kwds ) # Create list of player rows player_rows = [] # get the list of player names player_names = player_list.keys( ) # put the list in alphabetical order player_names.sort( ) # Iterate through the list of players getting their data for name in player_names: current_row = [] # Just a list of Labels, not a Row player = player_list[name] current_row = player.Fill_Data( current_row ) player_rows.append( current_row ) #end for #The player list will be displayed in tabular format self._scrolling_grid_view =\ Scrolling_Grid_View( grid_array = player_rows, scrolling = "v" ) # Create a list of the labels for headers and line them up with the grid label_row = [] #create labels for the header information num_cols = min( len(player_keys), self._scrolling_grid_view.get_num_cols() ) for i in range( 0, num_cols ): header_label = Label( player_keys[i], font = Font( style = ["bold"] ) ) # If player grid column is wider than current label if self._scrolling_grid_view.get_col_width( i ) > header_label.width: # Set column width to match grid header_label.width = self._scrolling_grid_view.get_col_width( i ) else: self._scrolling_grid_view.set_col_width( i, header_label.width ) # end if grid column is wider label_row.append( header_label ) #end loop through player keys # Place the column headers in the player frame self._header_row = Row( label_row ) self.place( self._header_row, left = 0, top = 0 ) # Set the height and width of the grid based on the dimensions of the # other components self._scrolling_grid_view.height = self.height - self._header_row.height self._scrolling_grid_view.width = max( self._scrolling_grid_view.width, self.width - 2 ) # Set extent of scrolling to accommodate the entire grid self.set_extent( (self._scrolling_grid_view.width, self.height) ) # Put the grid into the frame self.place( self._scrolling_grid_view, top = self._header_row, sticky = 'nsew' )
def __init__(self, model, extent, scrolling): ScrollableView.__init__(self) self.model = model self.extent = extent self.scrolling = scrolling self.menu_width = 50
def __init__(self): ScrollableView.__init__(self) self.text = "_root.onMouseDown = function () {\n\ttrace('Hi');\n};" self.font = Font("Courier", 16) self.selecting = False self.lexer = ActionScriptLexer() self.cursorpos = 0 self.scursorpos = 0 self.selection = (0, 0) self.formatter = PyGUIFormatter() # self.filter = NameHighlightFilter( self.filter = EverythingHighlightFilter( names=["trace"], tokentype=Token.Keyword, names2=["_root", "_global"], tokentype2=Token.Name.Builtin, names3=[ "_alpha", "blendMode", "cacheAsBitmap", "_currentframe", "_droptarget", "enabled", "filters", "focusEnabled", "_focusRect", "forceSmoothing", "_framesloaded", "_height", "_highquality", "hitArea", "_lockroot", "menu", "opaqueBackground", "_parent", "_quality", "_rotation", "scale9Grid", "scrollRect", "_soundbuftime", "tabChildren", "tabEnabled", "tabIndex", "_target", "totalframes", "trackAsMenu", "transform", "_url", "useHandCursor", "_visible", "_width", "_x", "_xmouse", "_xscale", "_y", "_ymouse", "_yscale", ], tokentype3=Token.Name.Variable.Class, ) self.extent = (self.width, self.height) # Not working - no idea why - disabled to add speed self.lexer.add_filter(self.filter)