2023-03-26 06:07:35 +00:00
|
|
|
# Python imports
|
|
|
|
|
|
|
|
# Lib imports
|
|
|
|
import gi
|
|
|
|
gi.require_version('Gtk', '3.0')
|
|
|
|
from gi.repository import Gtk
|
|
|
|
|
|
|
|
# Application imports
|
2023-10-29 01:18:50 +00:00
|
|
|
from ..widgets.separator_widget import Separator
|
2023-10-28 19:43:50 +00:00
|
|
|
from ..widgets.miniview_widget import MiniViewWidget
|
|
|
|
from ..widgets.base.notebook.editor_notebook import EditorNotebook
|
2023-03-26 06:07:35 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
2023-10-07 19:51:12 +00:00
|
|
|
class EditorsPaned(Gtk.Paned):
|
2023-03-26 06:07:35 +00:00
|
|
|
def __init__(self):
|
2023-10-07 19:51:12 +00:00
|
|
|
super(EditorsPaned, self).__init__()
|
2023-03-26 06:07:35 +00:00
|
|
|
|
|
|
|
self._setup_styling()
|
|
|
|
self._setup_signals()
|
|
|
|
self._subscribe_to_events()
|
|
|
|
self._load_widgets()
|
|
|
|
|
2023-10-07 22:19:14 +00:00
|
|
|
self.show()
|
2023-03-26 06:07:35 +00:00
|
|
|
|
|
|
|
|
|
|
|
def _setup_styling(self):
|
|
|
|
self.set_wide_handle(True)
|
|
|
|
|
|
|
|
def _setup_signals(self):
|
|
|
|
...
|
|
|
|
|
|
|
|
def _subscribe_to_events(self):
|
|
|
|
...
|
|
|
|
|
|
|
|
def _load_widgets(self):
|
|
|
|
self.add1(EditorNotebook())
|
|
|
|
self.add2(EditorNotebook())
|
2023-10-07 19:51:12 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class EditorsContainer(Gtk.Box):
|
|
|
|
def __init__(self):
|
|
|
|
super(EditorsContainer, self).__init__()
|
|
|
|
|
|
|
|
self._setup_styling()
|
|
|
|
self._setup_signals()
|
|
|
|
self._subscribe_to_events()
|
|
|
|
self._load_widgets()
|
|
|
|
|
2023-10-07 22:19:14 +00:00
|
|
|
self.show()
|
2023-10-07 19:51:12 +00:00
|
|
|
|
|
|
|
|
|
|
|
def _setup_styling(self):
|
2023-10-07 22:19:14 +00:00
|
|
|
...
|
2023-10-07 19:51:12 +00:00
|
|
|
|
|
|
|
def _setup_signals(self):
|
|
|
|
...
|
|
|
|
|
|
|
|
def _subscribe_to_events(self):
|
|
|
|
...
|
|
|
|
|
|
|
|
def _load_widgets(self):
|
2023-11-05 21:57:08 +00:00
|
|
|
miniview = MiniViewWidget()
|
2023-10-29 01:18:50 +00:00
|
|
|
self.add(Separator("separator_left"))
|
2023-10-07 19:51:12 +00:00
|
|
|
self.add(EditorsPaned())
|
2023-10-29 01:18:50 +00:00
|
|
|
self.add(Separator("separator_right"))
|
2023-11-05 21:57:08 +00:00
|
|
|
self.add(miniview)
|