aboutsummaryrefslogtreecommitdiff
path: root/vendor/maunium.net/go/tview/doc.go
diff options
context:
space:
mode:
authorTulir Asokan <tulir@maunium.net>2018-04-30 10:55:37 +0300
committerTulir Asokan <tulir@maunium.net>2018-04-30 10:55:37 +0300
commite48ff5bea4725d39818f24fa76b5ae74971f23a3 (patch)
tree549b8688ef59f7096a20544cd01ad75ec111c0e4 /vendor/maunium.net/go/tview/doc.go
parent576bab9e2e9589942d4cac8742fa1b54e8b237f9 (diff)
Update dependencies
Diffstat (limited to 'vendor/maunium.net/go/tview/doc.go')
-rw-r--r--vendor/maunium.net/go/tview/doc.go42
1 files changed, 41 insertions, 1 deletions
diff --git a/vendor/maunium.net/go/tview/doc.go b/vendor/maunium.net/go/tview/doc.go
index 101dcd5..ccaaaf1 100644
--- a/vendor/maunium.net/go/tview/doc.go
+++ b/vendor/maunium.net/go/tview/doc.go
@@ -77,13 +77,53 @@ applies to almost everything from box titles, list text, form item labels, to
table cells. In a TextView, this functionality has to be switched on explicitly.
See the TextView documentation for more information.
+Color tags may contain not just the foreground (text) color but also the
+background color and additional flags. In fact, the full definition of a color
+tag is as follows:
+
+ [<foreground>:<background>:<flags>]
+
+Each of the three fields can be left blank and trailing fields can be ommitted.
+(Empty square brackets "[]", however, are not considered color tags.) Colors
+that are not specified will be left unchanged. A field with just a dash ("-")
+means "reset to default".
+
+You can specify the following flags (some flags may not be supported by your
+terminal):
+
+ l: blink
+ b: bold
+ d: dim
+ r: reverse (switch foreground and background color)
+ u: underline
+
+Examples:
+
+ [yellow]Yellow text
+ [yellow:red]Yellow text on red background
+ [:red]Red background, text color unchanged
+ [yellow::u]Yellow text underlined
+ [::bl]Bold, blinking text
+ [::-]Colors unchanged, flags reset
+ [-]Reset foreground color
+ [-:-:-]Reset everything
+ [:]No effect
+ []Not a valid color tag, will print square brackets as they are
+
In the rare event that you want to display a string such as "[red]" or
"[#00ff1a]" without applying its effect, you need to put an opening square
-bracket before the closing square bracket. Examples:
+bracket before the closing square bracket. Note that the text inside the
+brackets will be matched less strictly than region or colors tags. I.e. any
+character that may be used in color or region tags will be recognized. Examples:
[red[] will be output as [red]
["123"[] will be output as ["123"]
[#6aff00[[] will be output as [#6aff00[]
+ [a#"[[[] will be output as [a#"[[]
+ [] will be output as [] (see color tags above)
+ [[] will be output as [[] (not an escaped tag)
+
+You can use the Escape() function to insert brackets automatically where needed.
Styles