Esempio n. 1
0
 def __init__(self, table, column, row, expected_cell_map):
     Widget.__init__(self, table)
     self.table = table
     self.column = column
     self.row = row
     self.expected_cell = expected_cell_map
     self.find_search_region()
Esempio n. 2
0
 def __init__(self, parent, name, group=None, selected=False):
     Widget.__init__(self, parent, name)
     self.group = group
     self.selected = selected
     if group:
         key = self.group_key()
         if key not in radio_groups:
             radio_groups[key] = []
         radio_groups[key].append(self)
Esempio n. 3
0
 def __init__(self, parent, source_widget, name=None):
     if not name:
         name = to_snakecase(self.__class__.__name__)
     Widget.__init__(self, parent, name)
     # Note: source_widget must have a selected attribute.
     #       eg, a radio button
     self.source_widget = source_widget
     self.widgets = []
     self.add_widget_methods()
     self.contains()
Esempio n. 4
0
 def __init__(self, table, name):
     Widget.__init__(self, table, name)
     self.table = table
     # create a button for the column header
     # FIXME: It is assumed that all tables have headers in
     #        order to function correctly.
     self.header = Button(self, "__header__")
     self.header_region = None
     self.scrolls_from_left = None
     self.cell = {}
     self.load_expected_cells()
Esempio n. 5
0
    def __init__(self, parent, name):
        Widget.__init__(self, parent, name)

        # create a virtual widget to hold our buttons
        # TODO: is it worth it to create a Scrollbar widget?
        self._scrollbar = Widget(self, "__scrollbar__")
        # create the 4 directional scrollbar buttons
        self._top_button = Button(self._scrollbar, "top")
        self._bottom_button = Button(self._scrollbar, "bottom")
        self._left_button = Button(self._scrollbar, "left")
        self._right_button = Button(self._scrollbar, "right")
Esempio n. 6
0
 def __init__(self, table, index, scrolls_from_top, page_index):
     Widget.__init__(self, table)
     self.table = table
     self.index = index
     self.page_index = page_index
     # FIXME: instead of requiring the page_index be passed,
     #        derive it
     #if index < self.table.rows_per_page:
     #    self.page_index = index
     #else:
     #    self.page_index = self.table.rows_per_page - 1
     self.scrolls_from_top = scrolls_from_top