``TerminalView`: add new APIs: #widthInChars` and `#heightInChars` jv
authorJan Vrany <jan.vrany@fit.cvut.cz>
Mon, 20 May 2019 13:58:11 +0100
branchjv
changeset 6067 f0e51145a4ec
parent 6066 fc59a1fcfdcd
child 6068 5e8b7ee23889
``TerminalView`: add new APIs: #widthInChars` and `#heightInChars`
TerminalView.st
--- a/TerminalView.st	Mon May 20 13:55:48 2019 +0100
+++ b/TerminalView.st	Mon May 20 13:58:11 2019 +0100
@@ -522,6 +522,12 @@
     "Modified: / 28.1.2002 / 20:56:11 / micha"
 !
 
+heightInChars
+    ^ nFullLinesShown
+
+    "Created: / 20-05-2019 / 13:33:17 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
 inStream
     "return the stream, which gets all input data (i.e. keyboard input)"
 
@@ -616,6 +622,12 @@
     shellTerminateAction := aBlock.
 
     "Created: / 12.6.1998 / 17:02:58 / cg"
+!
+
+widthInChars
+    ^  innerWidth // gc font width.
+
+    "Created: / 20-05-2019 / 13:33:23 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
 !TerminalView methodsFor:'accessing - behavior'!