Add _ViewWidth(), _ViewHeight(), _TextWidth(), _TextHeight()

private convenience methods to calculate the text view width and
height with insets and the text rect width and height without
insets respectively.

Also add _ViewRect() and _TextRect() methods for completeness,
but they are not currently used.

Change-Id: I0582bc93a0a3a6820bbb2262a1d726457309ab9f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7162
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
This commit is contained in:
John Scipione
2023-12-08 10:14:14 +00:00
committed by Adrien Destugues
parent 2af0f027cb
commit 64a2e73375
2 changed files with 75 additions and 10 deletions
+8
View File
@@ -418,6 +418,14 @@ private:
void _UpdateInsets(const BRect& rect);
float _ViewWidth();
float _ViewHeight();
BRect _ViewRect();
float _TextWidth();
float _TextHeight();
BRect _TextRect();
private:
BPrivate::TextGapBuffer* fText;
LineBuffer* fLines;