Exemplo n.º 1
0
    def __init__(self, parent, editor_context, table=None):
        """
        :param parent:
        :param structerui.editor.context.EditorContext editor_context:
        :param table:
        :return:
        """
        if table is None:
            table = ListTable(editor_context)

        GridBase.__init__(self, parent, table)

        gridmovers.GridRowMover(self)
        self.Bind(gridmovers.EVT_GRID_ROW_MOVE, self.__OnRowMove, self)
Exemplo n.º 2
0
    def __init__(self, parent, editor_context, table=None):
        """
        :param parent:
        :param structerui.editor.context.EditorContext editor_context:
        :param table:
        :return:
        """
        if table is None:
            table = ListTable(editor_context)

        GridBase.__init__(self, parent, table)

        gridmovers.GridRowMover(self)
        self.Bind(gridmovers.EVT_GRID_ROW_MOVE, self.__OnRowMove, self)
Exemplo n.º 3
0
    def get_actions(self):
        """
        :return:
        :rtype: list[GridAction]
        """
        actions = [
            GridAction(hotkey.LIST_INSERT_HEAD, self.insert_head,
                       "Insert Head", "icons/insert_head.png"),
            GridAction(hotkey.LIST_APPEND_TAIL, self._append, "Append Row",
                       "icons/append_row.png"),
            GridAction(hotkey.LIST_INSERT, self.insert, "Insert Row",
                       "icons/insert_row.png"),
            GridAction(hotkey.LIST_DELETE, self.delete, "Delete Row",
                       "icons/delete_row.png"),
            GridAction(hotkey.LIST_SELECT_ROWS, self._select_rows,
                       "Select Rows", "icons/select_rows.png"),
            GridAction(hotkey.LIST_SELECT_COLS, self._select_cols,
                       "Select Columns", "icons/select_cols.png"),
            GridAction(hotkey.LIST_CUT, self._cut, "Cut Rows",
                       "icons/cut_rows.png"),
            GridAction(hotkey.LIST_INSERT_COPIED, self.insert_copied,
                       "Insert Rows", "icons/insert_rows.png"),
            GridAction(hotkey.LIST_APPEND_COPIED_TAIL, self.append_copied,
                       "Append Rows", "icons/append_rows.png"),
            GridAction(hotkey.FLATTEN_EDITOR, self.show_flatten_editor,
                       "Flatten Editor", "icons/flatten_editor.png",
                       self.check_flatten_editor)
        ]

        return GridBase.get_actions(self) + actions
Exemplo n.º 4
0
    def get_actions(self):
        """
        :return:
        :rtype: list[GridAction]
        """
        actions = [GridAction(hotkey.LIST_INSERT_HEAD, self.insert_head, "Insert Head", "icons/insert_head.png"),
                   GridAction(hotkey.LIST_APPEND_TAIL, self._append, "Append Row", "icons/append_row.png"),
                   GridAction(hotkey.LIST_INSERT, self.insert, "Insert Row", "icons/insert_row.png"),
                   GridAction(hotkey.LIST_DELETE, self.delete, "Delete Row", "icons/delete_row.png"),

                   GridAction(hotkey.LIST_SELECT_ROWS, self._select_rows, "Select Rows", "icons/select_rows.png"),
                   GridAction(hotkey.LIST_SELECT_COLS, self._select_cols, "Select Columns", "icons/select_cols.png"),
                   GridAction(hotkey.LIST_CUT, self._cut, "Cut Rows", "icons/cut_rows.png"),
                   GridAction(hotkey.LIST_INSERT_COPIED, self.insert_copied, "Insert Rows", "icons/insert_rows.png"),
                   GridAction(hotkey.LIST_APPEND_COPIED_TAIL, self.append_copied, "Append Rows",
                              "icons/append_rows.png"),
                   GridAction(hotkey.FLATTEN_EDITOR, self.show_flatten_editor, "Flatten Editor",
                              "icons/flatten_editor.png", self.check_flatten_editor)
                   ]

        return GridBase.get_actions(self) + actions