-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.py
25 lines (20 loc) · 828 Bytes
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
from gi.repository import Gtk
from SmartTE.Widgets import EditorWindow, FileToolbar, FormattingToolbar, FormattableTextBuffer, FormattableTextView
window = EditorWindow.EditorWindow()
filebar = FileToolbar.FileToolbar()
formbar = FormattingToolbar.FormattingToolbar()
notebook = Gtk.Notebook()
vbox = Gtk.VBox()
notebook.set_tab_pos(Gtk.PositionType.TOP)
notebook.append_page(filebar, filebar.label)
notebook.append_page(formbar, formbar.label)
scroll = Gtk.ScrolledWindow(None, None)
textview = FormattableTextView.FormattableTextView()
textview.set_buffer(FormattableTextBuffer.FormattableTextBuffer())
scroll.add(textview)
scroll.set_policy(Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC)
vbox.pack_start(notebook, False, True, 0)
vbox.pack_start(scroll, True, True, 0)
window.add(vbox)
window.show_all()
Gtk.main()