示例#1
0
func new_view(v *backend.View) {
	log4go.Debug("new_view entered")
	defer log4go.Debug("new_view exited")
	qw := wnds[v.Window()]
	w := newQLimeView(v)
	v.Settings().Set("syntax", "../../3rdparty/bundles/GoSublime/GoSublime.tmLanguage")

	w.SetSizev(600, 400)
	// w := qt5.NewWidget()
	sa := qt5.NewScrollArea()
	sa.SetWidget(w)
	qw.tw.AddTab(sa, v.Buffer().Name(), nil)
}
示例#2
0
func new_window(w *backend.Window) {
	log4go.Debug("new_window entered")
	defer log4go.Debug("new_window exited")
	qw := qt5.NewWidget()
	qw.Show()
	qw.SetSizev(600, 400)
	tw := qt5.NewTabWidget()
	lbox := qt5.NewVBoxLayout()
	lbox.AddWidget(tw)
	c := newQLimeView(backend.GetEditor().Console())
	sa := qt5.NewScrollArea()
	sa.SetWidget(c)
	lbox.AddWidget(sa)
	qw.SetLayout(lbox)
	wnds[w] = QLimeWindow{tw, w}
}