Example #1
0
func newTags() *tags {
	t := new(tags)

	t.table, _ = gtk.TextTagTableNew()

	outgoingUser, _ := gtk.TextTagNew("outgoingUser")
	outgoingUser.SetProperty("foreground", "#3465a4")

	incomingUser, _ := gtk.TextTagNew("incomingUser")
	incomingUser.SetProperty("foreground", "#a40000")

	outgoingText, _ := gtk.TextTagNew("outgoingText")
	outgoingText.SetProperty("foreground", "#555753")

	incomingText, _ := gtk.TextTagNew("incomingText")

	statusText, _ := gtk.TextTagNew("statusText")
	statusText.SetProperty("foreground", "#4e9a06")

	t.table.Add(outgoingUser)
	t.table.Add(incomingUser)
	t.table.Add(outgoingText)
	t.table.Add(incomingText)
	t.table.Add(statusText)

	return t
}
Example #2
0
func (*RealGtk) TextTagNew(name string) (gtki.TextTag, error) {
	return wrapTextTag(gtk.TextTagNew(name))
}