Public Member Functions | Protected Member Functions | List of all members
BTextView Class Reference

Displays and manipulates styled text. More...

Inherits BView.

Public Member Functions

 BTextView (BRect frame, const char *name, BRect textRect, uint32 resizeMask, uint32 flags=B_WILL_DRAW|B_PULSE_NEEDED)
 Creates a new BTextView object. More...
 
 BTextView (BRect frame, const char *name, BRect textRect, const BFont *initialFont, const rgb_color *initialColor, uint32 resizeMask, uint32 flags)
 Creates a new BTextView object and sets the initial font and color. More...
 
 BTextView (const char *name, uint32 flags=B_WILL_DRAW|B_PULSE_NEEDED)
 Creates a BTextView object, dynamic layout version. More...
 
 BTextView (const char *name, const BFont *initialFont, const rgb_color *initialColor, uint32 flags)
 Creates a new BTextView object and sets the initial font and color, dynamic layout version. More...
 
 BTextView (BMessage *archive)
 Creates a BTextView object from the passed in archive. More...
 
virtual ~BTextView ()
 Frees the memory allocated and destroys the object. More...
 
virtual void GetPreferredSize (float *_width, float *_height)
 Fill out the preferred width and height of the view into the _width and _height parameters. More...
 
virtual status_t GetSupportedSuites (BMessage *data)
 Reports the suites of messages and specifiers that derived classes understand. More...
 
virtual void MakeFocus (bool focus=true)
 Highlight or unhighlight the selection when the text view acquires or loses its focus state. More...
 
virtual BSize MaxSize ()
 Return the maximum size of the view. More...
 
virtual BSize MinSize ()
 Return the minimum size of the view. More...
 
virtual status_t Perform (perform_code code, void *data)
 Perform some action. (Internal Method) More...
 
virtual BSize PreferredSize ()
 Return the preferred size of the view. More...
 
virtual void ResizeToPreferred ()
 Resizes the view to its preferred size keeping the position of the left top corner constant. More...
 
virtual BHandlerResolveSpecifier (BMessage *message, int32 index, BMessage *specifier, int32 form, const char *property)
 Determine the proper handler for a scripting message. More...
 
Hook Methods
virtual void AttachedToWindow ()
 Hook method called when the text view is added to the view hierarchy. More...
 
virtual void DetachedFromWindow ()
 Hook method that is called when the text view is removed from the view hierarchy. More...
 
virtual void Draw (BRect updateRect)
 Hook method called to draw the contents of the text view. More...
 
virtual void MouseDown (BPoint where)
 Hook method that is called when a mouse button is pushed down while the cursor is contained in the view. More...
 
virtual void MouseUp (BPoint where)
 Hook method that is called when a mouse button is released while the cursor is contained in the view. More...
 
virtual void MouseMoved (BPoint where, uint32 code, const BMessage *dragMessage)
 Hook method that is called whenever the mouse cursor enters, exits or moves inside the view. More...
 
virtual void WindowActivated (bool active)
 Hook method that is called when the window becomes the active window or gives up that status. More...
 
virtual void KeyDown (const char *bytes, int32 numBytes)
 Hook method that is called when a key is pressed while the view is the focus view of the active window. More...
 
virtual void Pulse ()
 Hook method that is called at a set interval. More...
 
virtual void FrameResized (float newWidth, float newHeight)
 Hook method that is called when the frame is resized. More...
 
virtual void MessageReceived (BMessage *message)
 Hook method called with a message is received by the text view. More...
 
virtual void AllAttached ()
 Similar to AttachedToWindow() but this method is triggered after all child views have already been attached to a window. More...
 
virtual void AllDetached ()
 Similar to AttachedToWindow() but this method is triggered after all child views have already been detached from a window. More...
 
SetText

The BTextView doesn't keep a reference to the text buffer, file, or runs array you pass in, you can delete them after SetText() returns.

If the BTextView supports multiple character styles and a text_run_array is passed in it will be used to set the font and color formats of the new text.

If the BTextView does not support multiple character styles, then the text_run_array parameter is ignored.

See also
IsStylable()
void SetText (const char *text, const text_run_array *runs=NULL)
 Copies text from the text buffer replacing any text currently set in the BTextView with the font and color formats set by runs. More...
 
void SetText (const char *text, int32 length, const text_run_array *runs=NULL)
 Copies text from the text buffer up to length characters replacing any text currently set in the BTextView with the font and color formats set by runs. More...
 
void SetText (BFile *file, int32 offset, int32 length, const text_run_array *runs=NULL)
 Copies text from the file starting at the given offset up to length characters replacing any text currently set in the BTextView with the font and color formats set by runs. More...
 
Insert

The BTextView doesn't keep a reference to the text buffer or runs array you pass in, you can delete them after Insert() returns.

If the BTextView supports multiple character styles and a text_run_array is passed in it will be used to set the font and color formats of the new text.

If the BTextView does not support multiple character styles, then the text_run_array parameter is ignored.

See also
IsStylable()
void Insert (const char *text, const text_run_array *runs=NULL)
 Inserts text from the text buffer at the end of the BTextView with the font and color formats set by runs. More...
 
void Insert (const char *text, int32 length, const text_run_array *runs=NULL)
 Inserts text from the text buffer up to length characters at the end of the BTextView with the font and color formats set by runs. More...
 
void Insert (int32 offset, const char *text, int32 length, const text_run_array *runs=NULL)
 Inserts text starting at the given offset from the text buffer up to length characters into the BTextView with the font and color formats set by runs. More...
 
Delete
void Delete ()
 Deletes the text within the current selection. More...
 
void Delete (int32 startOffset, int32 endOffset)
 Deletes the text enclosed within the given offsets. More...
 
Text Information
const char * Text () const
 Returns the BTextView text as a byte array. More...
 
int32 TextLength () const
 Returns the text length of the BTextView text. More...
 
void GetText (int32 offset, int32 length, char *buffer) const
 Fills out buffer with the text of the BTextView starting at offset and grabbing at most length bytes. More...
 
uint8 ByteAt (int32 offset) const
 Returns the character at the given offset. More...
 
int32 CountLines () const
 Returns the number of lines that the BTextView object contains. More...
 
int32 CurrentLine () const
 Returns the index of the current line. More...
 
void GoToLine (int32 lineNumber)
 Moves the caret to the specified line. More...
 
Clipboard
virtual void Cut (BClipboard *clipboard)
 Moves the current selection to the clipboard. More...
 
virtual void Copy (BClipboard *clipboard)
 Copies the current selection to the clipboard. More...
 
virtual void Paste (BClipboard *clipboard)
 Copy the text contained in the clipboard to the BTextView. More...
 
virtual bool AcceptsPaste (BClipboard *clipboard)
 Returns whether or not the BTextView can accept the clipboard data. More...
 
virtual bool AcceptsDrop (const BMessage *message)
 Returns whether or not the BTextView can accept the dropped message data. More...
 
Selection
void Clear ()
 Deletes the currently selected text. More...
 
virtual void Select (int32 startOffset, int32 endOffset)
 Selects the text contained within the given offsets. More...
 
void SelectAll ()
 Selects all text contained in the BTextView. More...
 
void GetSelection (int32 *_start, int32 *_end) const
 Fills out _start and _end with the start and end offsets of the current selection. More...
 
text_run_arrayRunArray (int32 startOffset, int32 endOffset, int32 *_size=NULL) const
 Returns a text_run_array for the text within the given offsets. More...
 
int32 LineAt (int32 offset) const
 Returns the line number of the character at the given offset. More...
 
int32 LineAt (BPoint point) const
 Returns the line number for the passed point. More...
 
BPoint PointAt (int32 offset, float *_height=NULL) const
 Returns the location of the character at the given offset. More...
 
int32 OffsetAt (BPoint point) const
 Returns the offset at the passed in point. More...
 
int32 OffsetAt (int32 line) const
 Returns the offset of the given line. More...
 
virtual void FindWord (int32 offset, int32 *_fromOffset, int32 *_toOffset)
 Fills out _fromOffset and _toOffset for a sequence of character that qualifies as a word starting at offset. More...
 
virtual bool CanEndLine (int32 offset)
 Returns whether or not the character at the given offset can be the last character of a line. More...
 
float LineWidth (int32 lineNumber=0) const
 Returns the width of the line at the given lineNumber. More...
 
float LineHeight (int32 lineNumber=0) const
 Returns the height of the line at the given lineNumber. More...
 
float TextHeight (int32 startLine, int32 endLine) const
 Returns the height of the text enclosed within the given lines. More...
 
void Highlight (int32 startOffset, int32 endOffset)
 Highlight the text enclosed within the given offsets. More...
 
Scrolling
virtual void ScrollToOffset (int32 offset)
 Scrolls the text so that the character at offset is visible. More...
 
void ScrollToSelection ()
 Scrolls the text so that the character that begins the selection is visible. More...
 
TextRect
void SetTextRect (BRect rect)
 Sets the object's text frame to the passed in rect. More...
 
BRect TextRect () const
 Returns the BTextView's text frame. More...
 
Insets
void SetInsets (float left, float top, float right, float bottom)
 Sets the insets within the bounds for the object's text frame. More...
 
void GetInsets (float *_left, float *_top, float *_right, float *_bottom) const
 Fills out the parameters with the objects's text insets. More...
 
Stylable
void SetStylable (bool stylable)
 Sets whether or not the object accepts multiple font styles. More...
 
bool IsStylable () const
 Returns whether or not the object accepts multiple font styles. More...
 
Tab Width
void SetTabWidth (float width)
 Sets the distance between tab stops in pixels. More...
 
float TabWidth () const
 Returns the tab width of the BTextView. More...
 
Selectable State
void MakeSelectable (bool selectable=true)
 Sets whether or not the text is selectable. More...
 
bool IsSelectable () const
 Returns whether or not the text is selectable. More...
 
Editable State
void MakeEditable (bool editable=true)
 Sets whether or not the text is editable. More...
 
bool IsEditable () const
 Returns whether or not the text is editable. More...
 
Word Wrap
void SetWordWrap (bool wrap)
 Activate or deactivate word wrapping mode. More...
 
bool DoesWordWrap () const
 Returns whether or not word wrapping is activated. More...
 
Max Bytes
void SetMaxBytes (int32 max)
 Sets the maximum number of bytes that the BTextView can contain. More...
 
int32 MaxBytes () const
 Returns the maximum number of bytes that the BTextView can contain. More...
 
Character Filtering
void DisallowChar (uint32 character)
 Adds the character to the disallowed characters list. More...
 
void AllowChar (uint32 character)
 Removes the character from the disallowed characters list. More...
 
Alignment
void SetAlignment (alignment align)
 Sets the way text is aligned within the frame. More...
 
alignment Alignment () const
 Returns the current text alignment. More...
 
Autoindent
void SetAutoindent (bool state)
 Sets whether or not new lines of text are automatically indented. More...
 
bool DoesAutoindent () const
 Returns whether or not automatic indenting is active. More...
 
Color Space
void SetColorSpace (color_space colors)
 Set the color space of the offscreen BBitmap object. More...
 
color_space ColorSpace () const
 Returns the colorspace set to the offscreen BBitmap object. More...
 
Resizable
void MakeResizable (bool resize, BView *resizeView=NULL)
 Activates and deactivates automatic resizing. More...
 
bool IsResizable () const
 Returns whether or not the object is resizable. More...
 
Undo State
void SetDoesUndo (bool undo)
 Enables and disables the undo mechanism. More...
 
bool DoesUndo () const
 Returns whether or not the undo mechanism is enabled. More...
 
Hide Typing
void HideTyping (bool enabled)
 Enables and disables type hiding. More...
 
bool IsTypingHidden () const
 Returns whether or not typing is hidden. More...
 
- Public Member Functions inherited from BView
 BView (const char *name, uint32 flags, BLayout *layout=NULL)
 Layout constructor. More...
 
 BView (BRect frame, const char *name, uint32 resizingMode, uint32 flags)
 Standard constructor. More...
 
 BView (BMessage *archive)
 Archive constructor. More...
 
virtual ~BView ()
 Destructor method. More...
 
BRect Bounds () const
 Returns the view's frame rectangle in the view's coordinate system. More...
 
uint32 Flags () const
 Return the view flags set in the constructor or by SetFlags(). More...
 
void Flush () const
 Flushes the attached window's connection to App Server. More...
 
BRect Frame () const
 Returns the view's frame rectangle in the parent's coordinate system. More...
 
virtual void Hide ()
 Hides the view without removing it from the view hierarchy. More...
 
bool IsFocus () const
 Returns whether or not the view is the window's current focus view. More...
 
bool IsHidden () const
 Returns whether or not the view is hidden. More...
 
bool IsHidden (const BView *looking_from) const
 Returns whether or not the view is hidden from the perspective of lookingFrom. More...
 
bool IsPrinting () const
 Returns whether or not the view is drawing to a printer. More...
 
BPoint LeftTop () const
 Returns the left top corner point. More...
 
uint32 ResizingMode () const
 Returns the resizing mode flags mask set in the constructor or by SetResizingMode(). More...
 
virtual void SetFlags (uint32 flags)
 Sets the view flags to the flags mask. More...
 
virtual void SetResizingMode (uint32 mode)
 Sets the resizing mode of the view according to the mode mask. More...
 
void SetViewCursor (const BCursor *cursor, bool sync=true)
 Assigns cursor to the view. More...
 
virtual void Show ()
 Shows the view making it visible. More...
 
void Sync () const
 Synchronizes the attached window's connection to App Server. More...
 
BWindowWindow () const
 Returns the window the view is attached to. More...
 
void AddChild (BView *child, BView *before=NULL)
 Adds child to the view hierarchy immediately before before. More...
 
bool AddChild (BLayoutItem *child)
 Add the child layout item to the view hierarchy. More...
 
bool RemoveChild (BView *child)
 Removes child from the view hierarchy. More...
 
int32 CountChildren () const
 Returns the number of child views that this view has. More...
 
BViewChildAt (int32 index) const
 Returns a pointer to the child view found at index. More...
 
BViewNextSibling () const
 Returns a pointer to the next sibling view. More...
 
BViewPreviousSibling () const
 Returns a pointer to the previous sibling view. More...
 
bool RemoveSelf ()
 Removes the view and all child views from the view hierarchy. More...
 
BViewFindView (const char *name) const
 Returns the view in the view hierarchy with the specified name. More...
 
BViewParent () const
 Returns a pointer to the view's parent. More...
 
void ConvertToScreen (BPoint *point) const
 Convert point to the screen's coordinate system in place. More...
 
BPoint ConvertToScreen (BPoint point) const
 Returns point converted to the screen's coordinate system. More...
 
void ConvertFromScreen (BPoint *point) const
 Convert point from the screen's coordinate system to the view's coordinate system in place. More...
 
BPoint ConvertFromScreen (BPoint point) const
 Returns point converted from the screen's coordinate system to the view's coordinate system. More...
 
void ConvertToScreen (BRect *rect) const
 Convert rect to the screen's coordinate system in place. More...
 
BRect ConvertToScreen (BRect rect) const
 Returns rect converted to the screen's coordinate system. More...
 
void ConvertFromScreen (BRect *rect) const
 Convert rect from the screen's coordinate system to the view's coordinate system in place. More...
 
BRect ConvertFromScreen (BRect rect) const
 Returns rect converted from the screen's coordinate system to the view's coordinate system. More...
 
void ConvertToParent (BPoint *point) const
 Convert point to the parent's coordinate system in place. More...
 
BPoint ConvertToParent (BPoint point) const
 Returns point converted to the parent's coordinate system. More...
 
void ConvertFromParent (BPoint *point) const
 Convert point from the parent's coordinate system to the view's coordinate system in place. More...
 
BPoint ConvertFromParent (BPoint point) const
 Returns point converted from the parent's coordinate system to the view's coordinate system. More...
 
void ConvertToParent (BRect *rect) const
 Convert rect to the parent's coordinate system in place. More...
 
BRect ConvertToParent (BRect rect) const
 Returns rect converted to the parent's coordinate system. More...
 
void ConvertFromParent (BRect *rect) const
 Convert rect from the parent's coordinate system to the view's coordinate system in place. More...
 
BRect ConvertFromParent (BRect rect) const
 Returns rect converted from the parent's coordinate system to the view's coordinate system. More...
 
void GetClippingRegion (BRegion *region) const
 Fill out region with the view's clipping region. More...
 
virtual void ConstrainClippingRegion (BRegion *region)
 Set the clipping region the region restricting the area that the view can draw in. More...
 
void ClipToPicture (BPicture *picture, BPoint where=B_ORIGIN, bool sync=true)
 Intersects the current clipping region of the view with the pixels of picture. More...
 
void ClipToInversePicture (BPicture *picture, BPoint where=B_ORIGIN, bool sync=true)
 Intersects the current clipping region of the view with the pixels outside of picture. More...
 
virtual void SetDrawingMode (drawing_mode mode)
 Sets the drawing mode of the view. More...
 
drawing_mode DrawingMode () const
 Return the current drawing_mode. More...
 
void SetBlendingMode (source_alpha srcAlpha, alpha_function alphaFunc)
 Set the blending mode which controls how transparency is used. More...
 
void GetBlendingMode (source_alpha *srcAlpha, alpha_function *alphaFunc) const
 Fill out srcAlpha and alphaFunc with the alpha mode and alpha function of the view. More...
 
virtual void SetPenSize (float size)
 Set the pen size to size. More...
 
float PenSize () const
 Return the current pen size. More...
 
bool HasDefaultColors () const
 Tests if the view has any colors set. More...
 
bool HasSystemColors () const
 Tests if the view is using system "panel" colors. B_PANEL_BACKGROUND_COLOR for ViewUIColor() B_PANEL_BACKGROUND_COLOR for LowUIColor() B_PANEL_TEXT_COLOR for HighUIColor() More...
 
void AdoptParentColors ()
 Attempts to use the colors of any parent view. Will adopt view, low, and high colors. Should be called in AttachedToWindow() or AllAttached(). More...
 
void AdoptSystemColors ()
 Instructs view to use standard system "panel" colors. B_PANEL_BACKGROUND_COLOR for ViewUIColor() B_PANEL_BACKGROUND_COLOR for LowUIColor() B_PANEL_TEXT_COLOR for HighUIColor() More...
 
void AdoptViewColors (BView *view)
 Attempts to use the colors of a given view. Will adopt view, low, and high colors. More...
 
virtual void SetViewColor (rgb_color color)
 Set the view color of the view. More...
 
void SetViewColor (uchar red, uchar green, uchar blue, uchar alpha=255)
 Set the view color of the view. More...
 
rgb_color ViewColor () const
 Return the current view color. More...
 
void SetViewUIColor (color_which which, float tint=B_NO_TINT)
 Set the view color of the view to a system constant. The color will update live with user changes. More...
 
color_which ViewUIColor (float *tint=NULL) const
 Return the current view color constant being used. More...
 
virtual void SetHighColor (rgb_color color)
 Set the high color of the view. More...
 
void SetHighColor (uchar red, uchar green, uchar blue, uchar alpha=255)
 Set the high color of the view. More...
 
rgb_color HighColor () const
 Return the current high color. More...
 
void SetHighUIColor (color_which which, float tint=B_NO_TINT)
 Set the high color of the view to a system constant. The color will update live with user changes. More...
 
color_which HighUIColor (float *tint=NULL) const
 Return the current high color constant being used. More...
 
virtual void SetLowColor (rgb_color color)
 Set the low color of the view. More...
 
void SetLowColor (uchar red, uchar green, uchar blue, uchar alpha=255)
 Set the low color of the view. More...
 
rgb_color LowColor () const
 Return the current low color. More...
 
void SetLowUIColor (color_which which, float tint=B_NO_TINT)
 Set the low color of the view to a system constant. The color will update live with user changes. More...
 
color_which LowUIColor (float *tint=NULL) const
 Return the current low color constant being used. More...
 
void SetLineMode (cap_mode lineCap, join_mode lineJoin, float miterLimit=B_DEFAULT_MITER_LIMIT)
 Set line mode to use PostScript-style line cap and join modes. More...
 
join_mode LineJoinMode () const
 Returns the current line join mode. More...
 
cap_mode LineCapMode () const
 Returns the current line cap mode. More...
 
float LineMiterLimit () const
 Returns the miter limit used for B_MITER_JOIN join mode. More...
 
void SetOrigin (BPoint where)
 Sets the origin in the view's coordinate system. More...
 
void SetOrigin (float x, float y)
 Sets the origin in the view's coordinate system. More...
 
BPoint Origin () const
 Returns the origin point in the view's coordinate system. More...
 
void PushState ()
 Saves the drawing state to the stack. More...
 
void PopState ()
 Restores the drawing state from the stack. More...
 
void MovePenTo (BPoint pt)
 Move the pen to point in the view's coordinate system. More...
 
void MovePenTo (float x, float y)
 Move the pen to the point specified by x and y in the view's coordinate system. More...
 
void MovePenBy (float x, float y)
 Move the pen by x pixels horizontally and y pixels vertically. More...
 
BPoint PenLocation () const
 Return the current pen location as a BPoint object. More...
 
virtual void SetFont (const BFont *font, uint32 mask=B_FONT_ALL)
 Set the font of the view. More...
 
void GetFont (BFont *font) const
 Fill out font with the font set to the view. More...
 
void TruncateString (BString *in_out, uint32 mode, float width) const
 Truncate string with truncation mode mode so that it is no wider than width set in the view's font. More...
 
float StringWidth (const char *string) const
 Return the width of string set in the font of the view. More...
 
float StringWidth (const char *string, int32 length) const
 Return the width of string set in the font of the view up to length characters. More...
 
void GetStringWidths (char *stringArray[], int32 lengthArray[], int32 numStrings, float widthArray[]) const
 Fill out widths of the strings in stringArray set in the font of the view into widthArray. More...
 
void SetFontSize (float size)
 Set the size of the view's font to size. More...
 
void ForceFontAliasing (bool enable)
 Turn anti-aliasing on and off when printing. More...
 
void GetFontHeight (font_height *height) const
 Fill out the font_height struct with the view font. More...
 
void SetScale (float scale) const
 Sets the scale of the coordinate system the view uses for drawing. More...
 
float Scale () const
 Return the current drawing scale. More...
 
void SetViewBitmap (const BBitmap *bitmap, BRect srcRect, BRect dstRect, uint32 followFlags=B_FOLLOW_LEFT_TOP, uint32 options=B_TILE_BITMAP)
 Sets the background bitmap of the view. More...
 
void SetViewBitmap (const BBitmap *bitmap, uint32 followFlags=B_FOLLOW_LEFT_TOP, uint32 options=B_TILE_BITMAP)
 Sets the background bitmap of the view. More...
 
void ClearViewBitmap ()
 Clears the background bitmap of the view if it has one. More...
 
status_t SetViewOverlay (const BBitmap *overlay, BRect srcRect, BRect dstRect, rgb_color *colorKey, uint32 followFlags=B_FOLLOW_LEFT_TOP, uint32 options=0)
 Sets the overlay bitmap of the view. More...
 
status_t SetViewOverlay (const BBitmap *overlay, rgb_color *colorKey, uint32 followFlags=B_FOLLOW_LEFT_TOP, uint32 options=0)
 Sets the overlay bitmap of the view. More...
 
void ClearViewOverlay ()
 Clears the overlay bitmap of the view if it has one. More...
 
void StrokeLine (BPoint toPoint, ::pattern pattern=B_SOLID_HIGH)
 Stroke a line from the current pen location to the point toPoint. More...
 
void StrokeLine (BPoint start, BPoint end, ::pattern pattern=B_SOLID_HIGH)
 Stroke a line from point start to point end. More...
 
void BeginLineArray (int32 count)
 Begin a line array of up to count lines. More...
 
void AddLine (BPoint start, BPoint end, rgb_color color)
 Add a line to the line array drawn from start to end. More...
 
void EndLineArray ()
 End the line array drawing the lines. More...
 
void StrokePolygon (const BPolygon *polygon, bool closed=true, ::pattern pattern=B_SOLID_HIGH)
 Stroke a polygon shape. More...
 
void StrokePolygon (const BPoint *pointArray, int32 numPoints, bool closed=true, ::pattern pattern=B_SOLID_HIGH)
 Stroke a polygon shape made up of points specified by pointArray. More...
 
void StrokePolygon (const BPoint *pointArray, int32 numPoints, BRect bounds, bool closed=true, ::pattern pattern=B_SOLID_HIGH)
 Stroke a polygon shape made up of points specified by pointArray inscribed by bounds. More...
 
void FillPolygon (const BPolygon *polygon, ::pattern pattern=B_SOLID_HIGH)
 Fill a polygon shape. More...
 
void FillPolygon (const BPoint *pointArray, int32 numPoints, ::pattern pattern=B_SOLID_HIGH)
 Fill a polygon shape made up of points specified by pointArray. More...
 
void FillPolygon (const BPoint *pointArray, int32 numPoints, BRect bounds, ::pattern pattern=B_SOLID_HIGH)
 Fill a polygon shape made up of points specified by pointArray inscribed by bounds. More...
 
void FillPolygon (const BPolygon *polygon, const BGradient &gradient)
 Fill a polygon shape with the specified gradient pattern. More...
 
void FillPolygon (const BPoint *pointArray, int32 numPoints, const BGradient &gradient)
 Fill a polygon shape made up of points specified by pointArray with the specified gradient pattern. More...
 
void FillPolygon (const BPoint *pointArray, int32 numPoints, BRect bounds, const BGradient &gradient)
 Fill a polygon shape made up of points specified by pointArray inscribed by bounds with the specified gradient pattern. More...
 
void StrokeTriangle (BPoint point1, BPoint point2, BPoint point3, BRect bounds, ::pattern pattern=B_SOLID_HIGH)
 Stroke the triangle specified by points point1, point2, and point3 and enclosed by bounds. More...
 
void StrokeTriangle (BPoint point1, BPoint point2, BPoint point3, ::pattern pattern=B_SOLID_HIGH)
 Stroke the triangle specified by points point1, point2, and point3. More...
 
void FillTriangle (BPoint point1, BPoint point2, BPoint point3, ::pattern pattern=B_SOLID_HIGH)
 Fill the triangle specified by points point1, point2, and point3. More...
 
void FillTriangle (BPoint point1, BPoint point2, BPoint point3, BRect bounds, ::pattern pattern=B_SOLID_HIGH)
 Fill the triangle specified by points point1, point2, and point3 and enclosed by bounds. More...
 
void FillTriangle (BPoint point1, BPoint point2, BPoint point3, const BGradient &gradient)
 Fill the triangle specified by points point1, point2, and point3 with the specified gradient pattern. More...
 
void FillTriangle (BPoint point1, BPoint point2, BPoint point3, BRect bounds, const BGradient &gradient)
 Fill the triangle specified by points point1, point2, and point3 and enclosed by bounds with the specified gradient pattern. More...
 
void StrokeRect (BRect rect, ::pattern pattern=B_SOLID_HIGH)
 Stroke the rectangle specified by rect. More...
 
void FillRect (BRect rect, ::pattern pattern=B_SOLID_HIGH)
 Fill the rectangle specified by rect. More...
 
void FillRect (BRect rect, const BGradient &gradient)
 Fill the rectangle specified by rect with the specified gradient pattern. More...
 
void FillRegion (BRegion *rectegion, ::pattern pattern=B_SOLID_HIGH)
 Fill region. More...
 
void FillRegion (BRegion *rectegion, const BGradient &gradient)
 Fill region with the specified gradient pattern. More...
 
void InvertRect (BRect rect)
 Inverts the colors within rect. More...
 
void StrokeRoundRect (BRect rect, float xRadius, float yRadius, ::pattern pattern=B_SOLID_HIGH)
 Stroke the rounded rectangle with horizontal radius xRadius and vertical radius yRadius. More...
 
void FillRoundRect (BRect rect, float xRadius, float yRadius, ::pattern pattern=B_SOLID_HIGH)
 Fill the rounded rectangle with horizontal radius xRadius and vertical radius yRadius. More...
 
void FillRoundRect (BRect rect, float xRadius, float yRadius, const BGradient &gradient)
 Fill the rounded rectangle with horizontal radius xRadius and vertical radius yRadius with the specified gradient pattern. More...
 
void StrokeEllipse (BPoint center, float xRadius, float yRadius, ::pattern pattern=B_SOLID_HIGH)
 Stroke the outline of an ellipse starting at center with a horizontal radius of xRadius and a vertical radius of yRadius. More...
 
void StrokeEllipse (BRect rect, ::pattern pattern=B_SOLID_HIGH)
 Stroke the outline of an ellipse inscribed within rect. More...
 
void FillEllipse (BPoint center, float xRadius, float yRadius, ::pattern pattern=B_SOLID_HIGH)
 Fill an ellipse starting at center with a horizontal radius of xRadius and a vertical radius of yRadius. More...
 
void FillEllipse (BRect rect, ::pattern pattern=B_SOLID_HIGH)
 Fill an ellipse inscribed within rect. More...
 
void FillEllipse (BPoint center, float xRadius, float yRadius, const BGradient &gradient)
 Fill an ellipse with the specified gradient pattern starting at center with a horizontal radius of xRadius and a vertical radius of yRadius. More...
 
void FillEllipse (BRect rect, const BGradient &gradient)
 Fill an ellipse with the specified gradient pattern inscribed within rect. More...
 
void StrokeArc (BPoint center, float xRadius, float yRadius, float startAngle, float arcAngle, ::pattern pattern=B_SOLID_HIGH)
 Stroke the outline of an arc starting at center with a horizontal radius of xRadius and a vertical radius of yRadius starting at startAngle and drawing arcAngle degrees. More...
 
void StrokeArc (BRect rect, float startAngle, float arcAngle, ::pattern pattern=B_SOLID_HIGH)
 Stroke the outline of an arc inscribed within rect starting at startAngle and drawing arcAngle degrees. More...
 
void FillArc (BPoint center, float xRadius, float yRadius, float startAngle, float arcAngle, ::pattern pattern=B_SOLID_HIGH)
 Fill an arc starting at center with a horizontal radius of xRadius and a vertical radius of yRadius starting at startAngle and drawing arcAngle degrees. More...
 
void FillArc (BRect rect, float startAngle, float arcAngle, ::pattern pattern=B_SOLID_HIGH)
 Fill an arc inscribed within rect starting at startAngle and drawing arcAngle degrees. More...
 
void FillArc (BPoint center, float xRadius, float yRadius, float startAngle, float arcAngle, const BGradient &gradient)
 Fill an arc with the specified gradient pattern starting at center with a horizontal radius of xRadius and a vertical radius of yRadius starting at startAngle and drawing arcAngle degrees. More...
 
void FillArc (BRect rect, float startAngle, float arcAngle, const BGradient &gradient)
 Fill an arc with the specified gradient pattern inscribed within rect starting at startAngle and drawing arcAngle degrees. More...
 
void StrokeBezier (BPoint *controlPoints, ::pattern pattern=B_SOLID_HIGH)
 Stroke a bezier curve. More...
 
void FillBezier (BPoint *controlPoints, ::pattern pattern=B_SOLID_HIGH)
 Fill a bezier curve. More...
 
void FillBezier (BPoint *controlPoints, const BGradient &gradient)
 Fill a bezier curve. More...
 
void StrokeShape (BShape *shape, ::pattern pattern=B_SOLID_HIGH)
 Stroke shape. More...
 
void FillShape (BShape *shape, ::pattern pattern=B_SOLID_HIGH)
 Fill shape. More...
 
void FillShape (BShape *shape, const BGradient &gradient)
 Fill shape with the specified gradient pattern. More...
 
void CopyBits (BRect src, BRect dst)
 Copy the bits from the src rectangle to the dst rectangle in the view's coordinate system. More...
 
void DrawBitmapAsync (const BBitmap *aBitmap, BRect bitmapRect, BRect viewRect, uint32 options)
 Draws bitmap on the view within viewRect asynchronously. More...
 
void DrawBitmapAsync (const BBitmap *aBitmap, BRect bitmapRect, BRect viewRect)
 Draws bitmap on the view within viewRect asynchronously. More...
 
void DrawBitmapAsync (const BBitmap *aBitmap, BRect viewRect)
 Draws bitmap on the view within viewRect asynchronously. More...
 
void DrawBitmapAsync (const BBitmap *aBitmap, BPoint where)
 Draws bitmap on the view offset by where asynchronously. More...
 
void DrawBitmapAsync (const BBitmap *aBitmap)
 Draws bitmap on the view asynchronously. More...
 
void DrawBitmap (const BBitmap *aBitmap, BRect bitmapRect, BRect viewRect, uint32 options)
 brief Draws bitmap on the view within viewRect. More...
 
void DrawBitmap (const BBitmap *aBitmap, BRect bitmapRect, BRect viewRect)
 Draws bitmap on the view within viewRect. More...
 
void DrawBitmap (const BBitmap *aBitmap, BRect viewRect)
 Draws bitmap on the view within viewRect. More...
 
void DrawBitmap (const BBitmap *aBitmap, BPoint where)
 Draws bitmap on the view offset by where. More...
 
void DrawBitmap (const BBitmap *aBitmap)
 Draws bitmap on the view. More...
 
void DrawChar (char aChar)
 Draws character c onto to the view at the current pen position. More...
 
void DrawChar (char aChar, BPoint location)
 Draws character c at the specified location in the view. More...
 
void DrawString (const char *string, escapement_delta *delta=NULL)
 Draw string onto the view at the current pen position. More...
 
void DrawString (const char *string, BPoint location, escapement_delta *delta=NULL)
 Draw string onto the view at the specified location in the view. More...
 
void DrawString (const char *string, int32 length, escapement_delta *delta=NULL)
 Draw string up to length characters onto the view at the current pen position. More...
 
void DrawString (const char *string, int32 length, BPoint location, escapement_delta *delta=0L)
 Draw string up to length characters onto the view at the specified location in the view. More...
 
void DrawString (const char *string, const BPoint *locations, int32 locationCount)
 Draw string locationCount times at the specified locations. More...
 
void DrawString (const char *string, int32 length, const BPoint *locations, int32 locationCount)
 Draw string up to length characters locationCount times at the specified locations. More...
 
void Invalidate (BRect invalRect)
 Sends a message to App Server to redraw the portion of the view specified by invalRect. More...
 
void Invalidate (const BRegion *invalRegion)
 Sends a message to App Server to redraw the portion of the view specified by region. More...
 
void Invalidate ()
 Sends a message to App Server to redraw the view. More...
 
void DelayedInvalidate (bigtime_t delay)
 Sends a message to App Server to redraw the entire view after a certain, minimum, delay. Repeated calls to this method may be merged, but the view is guaranteed to be redrawn after the delay given in the first call of this method. More...
 
void DelayedInvalidate (bigtime_t delay, BRect invalRect)
 Sends a message to App Server to redraw the portion of the view specified by invalRect after a certain, minimum, delay. Repeated calls to this method may be merged, but the invalidated rect is guaranteed to be redrawn after the minimum delay given by the first call of this method. More...
 
void SetDiskMode (char *filename, long offset)
 Unimplemented. More...
 
void BeginPicture (BPicture *a_picture)
 Begins sending drawing instructions to picture. More...
 
void AppendToPicture (BPicture *a_picture)
 Appends drawing instructions to picture without clearing it first. More...
 
BPictureEndPicture ()
 Ends the drawing instruction recording session and returns the BPicture object passed to BeginPicture() or AppendToPicture(). More...
 
void DrawPicture (const BPicture *a_picture)
 Draws the picture at the view's current pen position. More...
 
void DrawPicture (const BPicture *a_picture, BPoint where)
 Draws the picture at the location in the view specified by where. More...
 
void DrawPicture (const char *filename, long offset, BPoint where)
 Draws the picture from the file specified by filename offset by offset bytes at the location in the view specified by where. More...
 
void DrawPictureAsync (const BPicture *a_picture)
 Draws the picture at the view's current pen position. More...
 
void DrawPictureAsync (const BPicture *a_picture, BPoint where)
 Draws the picture at the location in the view specified by where. More...
 
void DrawPictureAsync (const char *filename, long offset, BPoint where)
 Draws the picture from the file specified by filename offset by offset bytes at the location in the view specified by where. More...
 
void MoveBy (float dh, float dv)
 Moves the view deltaX pixels horizontally and deltaY pixels vertically in the parent view's coordinate system. More...
 
void MoveTo (BPoint where)
 Move the view to the location specified by where in the parent view's coordinate system. More...
 
void MoveTo (float x, float y)
 Move the view to the coordinates specified by x in the horizontal dimension and y in the vertical dimension in the parent view's coordinate system. More...
 
void ResizeBy (float dh, float dv)
 Resize the view by deltaWidth horizontally and deltaHeight vertically without moving the top left corner of the view. More...
 
void ResizeTo (float width, float height)
 Resize the view to the specified width and height. More...
 
void ResizeTo (BSize size)
 Resize the view to the dimension specified by size. More...
 
virtual status_t AllUnarchived (const BMessage *archive)
 Hook method called when all views have been unarchived. More...
 
virtual status_t AllArchived (BMessage *archive) const
 Hook method called when all views have been archived. More...
 
virtual void KeyUp (const char *bytes, int32 numBytes)
 Hook method called when a keyboard key is released. More...
 
virtual void FrameMoved (BPoint newPosition)
 Hook method called when the view is moved. More...
 
virtual void TargetedByScrollView (BScrollView *scrollView)
 Hook method called when the view becomes the target of scrollView. More...
 
virtual void DrawAfterChildren (BRect updateRect)
 Perform any drawing that needs to be done after child view have already been drawn. More...
 
void BeginRectTracking (BRect startRect, uint32 style=B_TRACK_WHOLE_RECT)
 Displays an outline rectangle on the view and initiates tracking. More...
 
void EndRectTracking ()
 Ends tracking removing the outline rectangle from the view. More...
 
void GetMouse (BPoint *location, uint32 *buttons, bool checkMessageQueue=true)
 Fills out the cursor location and the current state of the mouse buttons. More...
 
void DragMessage (BMessage *message, BRect dragRect, BHandler *replyTo=NULL)
 Initiates a drag-and-drop session. More...
 
void DragMessage (BMessage *message, BBitmap *bitmap, BPoint offset, BHandler *replyTo=NULL)
 Initiates a drag-and-drop session of an image. More...
 
void DragMessage (BMessage *message, BBitmap *bitmap, drawing_mode dragMode, BPoint offset, BHandler *replyTo=NULL)
 Initiates a drag-and-drop session of an image with drawing_mode set by dragMode. More...
 
status_t SetEventMask (uint32 mask, uint32 options=0)
 Sets whether or not the view can accept mouse and keyboard events when not in focus. More...
 
uint32 EventMask ()
 Returns the current event mask. More...
 
status_t SetMouseEventMask (uint32 mask, uint32 options=0)
 Sets whether or not the view can accept mouse and keyboard events when not in focus from within MouseDown() until the following MouseUp() event. More...
 
void ScrollBy (float dh, float dv)
 Scroll the view by deltaX horizontally and deltaY vertically. More...
 
virtual void ScrollTo (BPoint where)
 Scroll the view to the point specified by where. More...
 
BScrollBarScrollBar (orientation direction) const
 Returns the BScrollBar object that has the BView set as its target. More...
 
void SetExplicitMinSize (BSize size)
 Set this view's min size, to be used by MinSize(). More...
 
void SetExplicitMaxSize (BSize size)
 Set this view's max size, to be used by MaxSize(). More...
 
void SetExplicitPreferredSize (BSize size)
 Set this view's preferred size, to be used by PreferredSize(). More...
 
void SetExplicitAlignment (BAlignment alignment)
 Set this view's alignment, to be used by Alignment(). More...
 
void InvalidateLayout (bool descendants=false)
 Invalidate layout. More...
 
virtual void SetLayout (BLayout *layout)
 Sets the layout of the view. More...
 
BLayoutGetLayout () const
 Get the layout of the view. More...
 
void EnableLayoutInvalidation ()
 Enable layout invalidation. More...
 
void DisableLayoutInvalidation ()
 Disable layout invalidation. More...
 
bool IsLayoutInvalidationDisabled ()
 Returns whether or not layout invalidation is disabled. More...
 
bool IsLayoutValid () const
 Returns whether or not the layout is valid. More...
 
void ResetLayoutInvalidation ()
 Service call for BView derived classes re-enabling InvalidateLayout() notifications. More...
 
void Layout (bool force)
 Layout the view. More...
 
void Relayout ()
 Relayout the view. More...
 
void SetToolTip (const char *text)
 Set the tool tip of the view to text. More...
 
void SetToolTip (BToolTip *tip)
 Set the tool tip of the view to the tip object. More...
 
BToolTipToolTip () const
 Return the tool tip set to the view or NULL if not set. More...
 
void ShowToolTip (BToolTip *tip=NULL)
 Show the tool tip at the current mouse position. More...
 
void HideToolTip ()
 Hide the view's tool tip. More...
 
- Public Member Functions inherited from BHandler
 BHandler (const char *name=NULL)
 Construct a new handler with a name. More...
 
virtual ~BHandler ()
 Free the filters of this handler, as well as the list of observers. More...
 
 BHandler (BMessage *data)
 Construct a handler from an archived message. More...
 
BLooperLooper () const
 Return a pointer to the looper that this handler is associated with. More...
 
void SetName (const char *name)
 Set or change the name of this handler. More...
 
const char * Name () const
 Return the name of this handler. More...
 
virtual void SetNextHandler (BHandler *handler)
 Set the next handler in the chain that the message is passed on to if this handler cannot process it. More...
 
BHandlerNextHandler () const
 Return the next hander in the chain to which the message is passed on. More...
 
virtual void AddFilter (BMessageFilter *filter)
 Add filter as a prerequisite to this handler. More...
 
virtual bool RemoveFilter (BMessageFilter *filter)
 Remove filter from the filter list. More...
 
virtual void SetFilterList (BList *filters)
 Set the internal list of filters to filters. More...
 
BListFilterList ()
 Return a pointer to the list of filters. More...
 
bool LockLooper ()
 Lock the looper associated with this handler. More...
 
status_t LockLooperWithTimeout (bigtime_t timeout)
 Lock the looper associated with this handler, with a time out value. More...
 
void UnlockLooper ()
 Unlock the looper. More...
 
status_t StartWatching (BMessenger target, uint32 what)
 Subscribe this handler to watch a specific state change of a target. More...
 
status_t StartWatchingAll (BMessenger target)
 Subscribe this handler to watch a target for all events. More...
 
status_t StopWatching (BMessenger target, uint32 what)
 Unsubscribe this handler from watching a specific state. More...
 
status_t StopWatchingAll (BMessenger target)
 Unsubscribe this handler from watching all states. More...
 
status_t StartWatching (BHandler *observer, uint32 what)
 Subscribe an observer for a specific state change of this handler. More...
 
status_t StartWatchingAll (BHandler *observer)
 Subscribe an observer for a all state changes. More...
 
status_t StopWatching (BHandler *observer, uint32 what)
 Unsubscribe an observer from watching a specific state. More...
 
status_t StopWatchingAll (BHandler *observer)
 Unsubscribe an observer from watching all states. More...
 
virtual void SendNotices (uint32 what, const BMessage *notice=NULL)
 Emit a state change to the observers. More...
 
bool IsWatched () const
 Check if there are any observers watching this handler. More...
 
- Public Member Functions inherited from BArchivable
 BArchivable (BMessage *from)
 Constructor. Does important behind-the-scenes work in the unarchiving process. More...
 
 BArchivable ()
 Constructor. Does nothing. More...
 
virtual ~BArchivable ()
 Destructor. Does nothing. More...
 

Protected Member Functions

virtual void DoLayout ()
 Layout view within the layout context. More...
 
virtual void LayoutInvalidated (bool descendants)
 Hook method called when the layout is invalidated. More...
 
- Protected Member Functions inherited from BView
status_t ScrollWithMouseWheelDelta (BScrollBar *, float)
 Handle the scroll wheel changing over scrollbars. More...
 
virtual bool GetToolTipAt (BPoint point, BToolTip **_tip)
 Point _tip with the view's tool tip. More...
 

Archiving

virtual status_t Archive (BMessage *archive, bool deep=true) const
 Archives the object into the data message. More...
 
static BArchivableInstantiate (BMessage *archive)
 Instantiates a BTextView object from the passed in archive. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from BView
static BArchivableInstantiate (BMessage *archive)
 Creates a new BView object from the data message. More...
 
- Static Public Member Functions inherited from BHandler
static BArchivableInstantiate (BMessage *data)
 Static method to instantiate a handler from an archived message. More...
 
- Static Public Member Functions inherited from BArchivable
static BArchivableInstantiate (BMessage *archive)
 Static member to restore objects from messages. More...
 

Detailed Description

Displays and manipulates styled text.

Since
BeOS R3

Constructor & Destructor Documentation

◆ BTextView() [1/5]

BTextView::BTextView ( BRect  frame,
const char *  name,
BRect  textRect,
uint32  resizeMask,
uint32  flags = B_WILL_DRAW | B_PULSE_NEEDED 
)

Creates a new BTextView object.

Parameters
frameThe frame rectangle of the view.
nameThe name of the view.
textRectThe area of the text within the view.
resizeMaskResizing mask, passed to BView.
flagsflags passed to BView, B_FRAME_EVENTS, B_PULSE_NEEDED and B_INPUT_METHOD_AWARE are always set.
Since
BeOS R3

◆ BTextView() [2/5]

BTextView::BTextView ( BRect  frame,
const char *  name,
BRect  textRect,
const BFont initialFont,
const rgb_color *  initialColor,
uint32  resizeMask,
uint32  flags 
)

Creates a new BTextView object and sets the initial font and color.

Parameters
frameThe BTextView frame rectangle.
nameThe name of the object.
textRectThe area of the text within the BTextView object.
initialFontThe text font to display.
initialColorThe text color to display.
resizeMaskResizing mask, passed to BView.
flagsflags passed to BView, B_FRAME_EVENTS, B_PULSE_NEEDED and B_INPUT_METHOD_AWARE are always set.
Since
BeOS R3

◆ BTextView() [3/5]

BTextView::BTextView ( const char *  name,
uint32  flags = B_WILL_DRAW | B_PULSE_NEEDED 
)

Creates a BTextView object, dynamic layout version.

Parameters
nameThe name of the object.
flagsflags passed to BView, B_FRAME_EVENTS, B_PULSE_NEEDED and B_INPUT_METHOD_AWARE are always set.
Since
Haiku R1

◆ BTextView() [4/5]

BTextView::BTextView ( const char *  name,
const BFont initialFont,
const rgb_color *  initialColor,
uint32  flags 
)

Creates a new BTextView object and sets the initial font and color, dynamic layout version.

Parameters
nameThe name of the object.
initialFontThe text font to display.
initialColorThe text color to display.
flagsflags passed to BView, B_FRAME_EVENTS, B_PULSE_NEEDED and B_INPUT_METHOD_AWARE are always set.
Since
Haiku R1

◆ BTextView() [5/5]

BTextView::BTextView ( BMessage archive)

Creates a BTextView object from the passed in archive.

Parameters
archiveThe BMessage object from which the object is created.
Since
BeOS R3

◆ ~BTextView()

BTextView::~BTextView ( )
virtual

Frees the memory allocated and destroys the object.

Since
BeOS R3

Member Function Documentation

◆ AcceptsDrop()

bool BTextView::AcceptsDrop ( const BMessage message)
virtual

Returns whether or not the BTextView can accept the dropped message data.

Returns
true if the BTextView can accept the dropped message data, false otherwise.
Since
BeOS R3

◆ AcceptsPaste()

bool BTextView::AcceptsPaste ( BClipboard clipboard)
virtual

Returns whether or not the BTextView can accept the clipboard data.

Returns
true if the BTextView can accept the pasted clipboard data, false otherwise.
Since
BeOS R3

◆ Alignment()

alignment BTextView::Alignment ( ) const

Returns the current text alignment.

Returns
The current alignment flag.
See also
SetAlignment()
Since
BeOS R3

◆ AllAttached()

void BTextView::AllAttached ( )
virtual

Similar to AttachedToWindow() but this method is triggered after all child views have already been attached to a window.

Since
BeOS R3

Reimplemented from BView.

◆ AllDetached()

void BTextView::AllDetached ( )
virtual

Similar to AttachedToWindow() but this method is triggered after all child views have already been detached from a window.

Since
BeOS R3

Reimplemented from BView.

◆ AllowChar()

void BTextView::AllowChar ( uint32  character)

Removes the character from the disallowed characters list.

After this method returns, the character will be accepted by the textview.

Parameters
characterThe character to allow.
See also
DisallowChar()
Since
BeOS R3

◆ Archive()

status_t BTextView::Archive ( BMessage data,
bool  deep = true 
) const
virtual

Archives the object into the data message.

Parameters
dataA pointer to the BMessage object to archive the object into.
deepWhether or not to archive child views as well.
Returns
A status code, B_OK if everything went well or an error code otherwise.
Return values
B_OKThe object was archived.
B_NO_MEMORYRan out of memory while archiving the object.
Since
BeOS R3

Reimplemented from BView.

◆ AttachedToWindow()

void BTextView::AttachedToWindow ( )
virtual

Hook method called when the text view is added to the view hierarchy.

Sets the pulse rate to 2 per second and adjust scrollbars if needed.

Since
BeOS R3

Reimplemented from BView.

◆ ByteAt()

uchar BTextView::ByteAt ( int32  offset) const

Returns the character at the given offset.

Parameters
offsetThe offset to the desired character.
Returns
The character at the given offset.
Since
BeOS R3

◆ CanEndLine()

bool BTextView::CanEndLine ( int32  offset)
virtual

Returns whether or not the character at the given offset can be the last character of a line.

Parameters
offsetThe offset of the character.
Returns
true if the character can be the last character of a line, false otherwise.
Since
BeOS R3

◆ Clear()

void BTextView::Clear ( )

Deletes the currently selected text.

Since
BeOS R4

◆ ColorSpace()

color_space BTextView::ColorSpace ( ) const

Returns the colorspace set to the offscreen BBitmap object.

Returns
The colorspace of the offscreen BBitmap object.
See also
SetColorSpace()
Since
BeOS R3

◆ Copy()

void BTextView::Copy ( BClipboard clipboard)
virtual

Copies the current selection to the clipboard.

Parameters
clipboardThe clipboard object to copy the selected text to.
Since
BeOS R3

◆ CountLines()

int32 BTextView::CountLines ( ) const

Returns the number of lines that the BTextView object contains.

Returns
The number of lines contained in the BTextView object.
Since
BeOS R3

◆ CurrentLine()

int32 BTextView::CurrentLine ( ) const

Returns the index of the current line.

Returns
The index of the current line.
Since
BeOS R3

◆ Cut()

void BTextView::Cut ( BClipboard clipboard)
virtual

Moves the current selection to the clipboard.

Parameters
clipboardThe clipboard object to move the text to.
Since
BeOS R3

◆ Delete() [1/2]

void BTextView::Delete ( )

Deletes the text within the current selection.

Since
BeOS R3

◆ Delete() [2/2]

void BTextView::Delete ( int32  startOffset,
int32  endOffset 
)

Deletes the text enclosed within the given offsets.

Parameters
startOffsetThe offset where the text to delete starts.
endOffsetThe offset where the text to delete ends.
Since
BeOS R3

◆ DetachedFromWindow()

void BTextView::DetachedFromWindow ( )
virtual

Hook method that is called when the text view is removed from the view hierarchy.

Since
BeOS R3

Reimplemented from BView.

◆ DisallowChar()

void BTextView::DisallowChar ( uint32  character)

Adds the character to the disallowed characters list.

After this method returns, the character won't be accepted by the textview anymore.

Parameters
characterThe character to disallow.
See also
AllowChar()
Since
BeOS R3

◆ DoesAutoindent()

bool BTextView::DoesAutoindent ( ) const

Returns whether or not automatic indenting is active.

Returns
true if automatic indenting is activated, false otherwise.
See also
SetAutoindent()
Since
BeOS R3

◆ DoesUndo()

bool BTextView::DoesUndo ( ) const

Returns whether or not the undo mechanism is enabled.

Returns
true if undo is enabled, false otherwise.
See also
SetDoesUndo()
Since
BeOS R3

◆ DoesWordWrap()

bool BTextView::DoesWordWrap ( ) const

Returns whether or not word wrapping is activated.

Returns
true if word wrapping is activated, false is word wrapping if not activated.
See also
SetWordWrap()
Since
BeOS R3

◆ DoLayout()

virtual void BTextView::DoLayout ( )
protectedvirtual

Layout view within the layout context.

Remarks
This is only meaningful if the view is part of a BLayout.
Since
Haiku R1

Reimplemented from BView.

◆ Draw()

void BTextView::Draw ( BRect  updateRect)
virtual

Hook method called to draw the contents of the text view.

Parameters
updateRectThe rectangular area to draw.
Since
BeOS R3

Reimplemented from BView.

◆ FindWord()

void BTextView::FindWord ( int32  offset,
int32 *  _fromOffset,
int32 *  _toOffset 
)
virtual

Fills out _fromOffset and _toOffset for a sequence of character that qualifies as a word starting at offset.

A word is a sequence of characters that the user can select by double- clicking.

Parameters
offsetThe offset where to start looking.
_fromOffsetA pointer to an integer to write the starting offset.
_toOffsetA pointer to an integer to write the ending offset.
Since
BeOS R3

◆ FrameResized()

void BTextView::FrameResized ( float  newWidth,
float  newHeight 
)
virtual

Hook method that is called when the frame is resized.

This method updates any associated scrollbars.

Parameters
newWidthThe new width of the view.
newHeightThe new height of the view.
Since
BeOS R3

Reimplemented from BView.

◆ GetInsets()

void BTextView::GetInsets ( float *  _left,
float *  _top,
float *  _right,
float *  _bottom 
) const

Fills out the parameters with the objects's text insets.

Parameters
_leftA pointer to set to the frame's left inset.
_topA pointer to set to the frame's top inset.
_rightA pointer to set to the frame's right inset.
_bottomA pointer to set to the frame's bottom inset.
Since
BeOS R3

◆ GetPreferredSize()

virtual void BTextView::GetPreferredSize ( float *  _width,
float *  _height 
)
virtual

Fill out the preferred width and height of the view into the _width and _height parameters.

Derived classes should override this method to set the preferred size of object.

Remarks
Either the _width or _height parameter may be set to NULL if you only want to get the other one.
Parameters
[out]_widthPointer to a float to store the width of the view.
[out]_heightPointer to a float to store the height of the view.
Since
BeOS R3

Reimplemented from BView.

◆ GetSelection()

void BTextView::GetSelection ( int32 *  _start,
int32 *  _end 
) const

Fills out _start and _end with the start and end offsets of the current selection.

Parameters
_startA pointer to an int32 to contain the selection's start offset.
_endA pointer to an int32 to contain the selection's end offset.
See also
Select()
Since
BeOS R3

◆ GetSupportedSuites()

virtual status_t BTextView::GetSupportedSuites ( BMessage data)
virtual

Reports the suites of messages and specifiers that derived classes understand.

Since
BeOS R3

Reimplemented from BView.

◆ GetText()

BTextView::GetText ( int32  offset,
int32  length,
char *  buffer 
) const

Fills out buffer with the text of the BTextView starting at offset and grabbing at most length bytes.

You must provide a buffer that is large enough to hold at least length bytes.

Parameters
offsetWhere to start grabbing text from.
lengthThe number of bytes of text to grab.
bufferA buffer to write the text to.
See also
BString::GetString(int32 offset, int32 length, char* buffer)
Since
BeOS R3

◆ GoToLine()

void BTextView::GoToLine ( int32  index)

Moves the caret to the specified line.

Parameters
indexThe index of the line.
Since
BeOS R3

◆ HideTyping()

void BTextView::HideTyping ( bool  enabled)

Enables and disables type hiding.

Parameters
enabledPass in true to enable type hiding, false to disable it.
Since
BeOS R5

◆ Highlight()

void BTextView::Highlight ( int32  startOffset,
int32  endOffset 
)

Highlight the text enclosed within the given offsets.

Parameters
startOffsetThe start offset of the text to highlight.
endOffsetThe end offset of the text to highlight.
Since
BeOS R3

◆ Insert() [1/3]

void BTextView::Insert ( const char *  text,
const text_run_array runs = NULL 
)

Inserts text from the text buffer at the end of the BTextView with the font and color formats set by runs.

Parameters
textThe text to insert.
runsThe text styling to set, can be NULL.
Since
BeOS R3

◆ Insert() [2/3]

void BTextView::Insert ( const char *  text,
int32  length,
const text_run_array runs = NULL 
)

Inserts text from the text buffer up to length characters at the end of the BTextView with the font and color formats set by runs.

Parameters
textThe text to insert.
lengthThe number of bytes of text to insert.
runsThe text styling to use, can be NULL.
Since
BeOS R3

◆ Insert() [3/3]

void BTextView::Insert ( int32  offset,
const char *  text,
int32  length,
const text_run_array runs = NULL 
)

Inserts text starting at the given offset from the text buffer up to length characters into the BTextView with the font and color formats set by runs.

Parameters
offsetThe position to start inserting text.
textThe text to set.
lengthThe number of bytes of text to insert.
runsThe text styling to use, can be NULL.
Since
BeOS R3

◆ Instantiate()

BArchivable * BTextView::Instantiate ( BMessage archive)
static

Instantiates a BTextView object from the passed in archive.

Parameters
archiveThe BMessage object that the object is created from.
Returns
A new BTextView object as a BArchivable.
Since
BeOS R3

◆ IsEditable()

bool BTextView::IsEditable ( ) const

Returns whether or not the text is editable.

Returns
true if the text is editable, false if the text is not editable.
See also
MakeEditable()
Since
BeOS R3

◆ IsResizable()

bool BTextView::IsResizable ( ) const

Returns whether or not the object is resizable.

Returns
true if the object is resizable, false otherwise.
See also
MakeResizable()
Since
BeOS R3

◆ IsSelectable()

bool BTextView::IsSelectable ( ) const

Returns whether or not the text is selectable.

Returns
true if the text is selectable, false if the text is not selectable.
See also
MakeSelectable()
Since
BeOS R3

◆ IsStylable()

bool BTextView::IsStylable ( ) const

Returns whether or not the object accepts multiple font styles.

Returns
true if the object is accepts multiple font styles, false otherwise.
See also
SetStylable()
Since
BeOS R3

◆ IsTypingHidden()

bool BTextView::IsTypingHidden ( ) const

Returns whether or not typing is hidden.

Returns
true if typing is hidden, false otherwise.
See also
HideTyping()
Since
BeOS R5

◆ KeyDown()

void BTextView::KeyDown ( const char *  bytes,
int32  numBytes 
)
virtual

Hook method that is called when a key is pressed while the view is the focus view of the active window.

Parameters
bytesThe bytes of the key combination pressed.
numBytesThe number of bytes in bytes.
Since
BeOS R3

Reimplemented from BView.

◆ LayoutInvalidated()

virtual void BTextView::LayoutInvalidated ( bool  descendants)
protectedvirtual

Hook method called when the layout is invalidated.

Parameters
descendantsWhether or not child views have also been invalidated.
Since
Haiku R1

Reimplemented from BView.

◆ LineAt() [1/2]

int32 BTextView::LineAt ( int32  offset) const

Returns the line number of the character at the given offset.

Parameters
offsetThe offset of the wanted character.
Returns
The line number of the character at the given offset.
Since
BeOS R3

◆ LineAt() [2/2]

int32 BTextView::LineAt ( BPoint  point) const

Returns the line number for the passed point.

Parameters
pointThe point to get the line number of.
Returns
The line number for the passed in point.
Since
BeOS R3

◆ LineHeight()

float BTextView::LineHeight ( int32  lineNumber = 0) const

Returns the height of the line at the given lineNumber.

Parameters
lineNumberThe index of the line to get the height of, 0-indexed.
Returns
The height of the line at the given lineNumber as a float.
Since
BeOS R3

◆ LineWidth()

float BTextView::LineWidth ( int32  lineNumber = 0) const

Returns the width of the line at the given lineNumber.

Parameters
lineNumberThe index of the line to get the width of, 0-indexed.
Returns
The width of the line at the given lineNumber as a float.
Since
BeOS R3

◆ MakeEditable()

void BTextView::MakeEditable ( bool  editable = true)

Sets whether or not the text is editable.

Parameters
editablePass in true to set the text to be editable, false to set the object to be not editable.
Since
BeOS R3

◆ MakeFocus()

void BTextView::MakeFocus ( bool  focus = true)
virtual

Highlight or unhighlight the selection when the text view acquires or loses its focus state.

The focus view handles selections and KeyDown events when the the attached window is active. There can be only one focus view at a time per window.

When called with focus set to true this method first calls MakeFocus() on the previously focused view with focus set to false.

The focus doesn't automatically change when MouseDown() is called so calling MakeFocus() is the only way to make a view the focus view of a window. Classes derived from BView that can display the current selection, or that can accept pasted data should call MakeFocus() in their MouseDown() method to update the focus view of the window on click.

If the view isn't attached to a window this method has no effect.

Parameters
focustrue to set focus, false to remove it.
Since
BeOS R3

Reimplemented from BView.

◆ MakeResizable()

void BTextView::MakeResizable ( bool  resize,
BView resizeView = NULL 
)

Activates and deactivates automatic resizing.

The resizing mechanism is alternative to BView resizing. The container view (the one passed to this function) should not automatically resize itself when the parent is resized.

Parameters
resizePass in true to set the the BTextView to automatically resize itself, false to disable automatic resizing.
resizeViewThe BTextView object's parent view that resizes itself.
Since
BeOS R3

◆ MakeSelectable()

void BTextView::MakeSelectable ( bool  selectable = true)

Sets whether or not the text is selectable.

Parameters
selectablePass in true to set the text to be selectable, false to set the text to be not selectable.
Since
BeOS R3

◆ MaxBytes()

int32 BTextView::MaxBytes ( ) const

Returns the maximum number of bytes that the BTextView can contain.

Returns
the maximum number of bytes that the BTextView can contain.
See also
SetMaxBytes()
Since
BeOS R3

◆ MaxSize()

virtual BSize BTextView::MaxSize ( )
virtual

Return the maximum size of the view.

Remarks
This is only meaningful if the view is part of a BLayout.
Returns
The maximum size of the view as a BSize.
See also
BAbstractLayout::MaxSize()
Since
Haiku R1

Reimplemented from BView.

◆ MessageReceived()

void BTextView::MessageReceived ( BMessage message)
virtual

Hook method called with a message is received by the text view.

Parameters
messageThe message received by the associated looper.
See also
BHandler::MessageReceived()
Since
BeOS R3

Reimplemented from BView.

◆ MinSize()

virtual BSize BTextView::MinSize ( )
virtual

Return the minimum size of the view.

Remarks
This is only meaningful if the view is part of a BLayout.
Returns
The minimum size of the view as a BSize.
See also
BAbstractLayout::MinSize()
Since
Haiku R1

Reimplemented from BView.

◆ MouseDown()

void BTextView::MouseDown ( BPoint  where)
virtual

Hook method that is called when a mouse button is pushed down while the cursor is contained in the view.

Parameters
whereThe point on the screen where to mouse pointer is when the mouse button is pressed.
Since
BeOS R3

Reimplemented from BView.

◆ MouseMoved()

void BTextView::MouseMoved ( BPoint  where,
uint32  code,
const BMessage dragMessage 
)
virtual

Hook method that is called whenever the mouse cursor enters, exits or moves inside the view.

Parameters
whereThe new location of the mouse in the view's coordinate system.
codeOne of the following:
  • B_ENTERED_VIEW The cursor has just entered the view.
  • B_INSIDE_VIEW The cursor is inside the view.
  • B_EXITED_VIEW The cursor has left the view's bounds. This only gets sent if the scope of the mouse events that the view can receive has been expanded by SetEventMask() or SetMouseEventMask().
  • B_OUTSIDE_VIEW The cursor is outside the view. This only gets sent if the scope of the mouse events that the view can receive has been expanded by SetEventMask() or SetMouseEventMask().
dragMessageIf a drag-and-drop operation is taking place this is a pointer to a BMessage that holds the drag information, otherwise the pointer is NULL.
See also
SetEventMask(), SetMouseEventMask()
DragMessage()
Since
BeOS R3

Reimplemented from BView.

◆ MouseUp()

void BTextView::MouseUp ( BPoint  where)
virtual

Hook method that is called when a mouse button is released while the cursor is contained in the view.

This method stops asynchronous mouse tracking.

Parameters
whereThe point on the screen where to mouse pointer is when the mouse button is released.
Since
BeOS R3

Reimplemented from BView.

◆ OffsetAt() [1/2]

int32 BTextView::OffsetAt ( BPoint  point) const

Returns the offset at the passed in point.

Parameters
pointThe desired point.
Returns
The offset for the passed in point.
Since
BeOS R3

◆ OffsetAt() [2/2]

int32 BTextView::OffsetAt ( int32  line) const

Returns the offset of the given line.

Parameters
lineA line number.
Returns
The offset of the passed line.
Since
BeOS R3

◆ Paste()

void BTextView::Paste ( BClipboard clipboard)
virtual

Copy the text contained in the clipboard to the BTextView.

Parameters
clipboardA pointer to the clipboard.
Since
BeOS R3

◆ Perform()

virtual status_t BTextView::Perform ( perform_code  code,
void *  _data 
)
virtual

Perform some action. (Internal Method)

The following perform codes are recognized:

  • PERFORM_CODE_MIN_SIZE:
  • PERFORM_CODE_MAX_SIZE:
  • PERFORM_CODE_PREFERRED_SIZE:
  • PERFORM_CODE_LAYOUT_ALIGNMENT:
  • PERFORM_CODE_HAS_HEIGHT_FOR_WIDTH:
  • PERFORM_CODE_GET_HEIGHT_FOR_WIDTH:
  • PERFORM_CODE_SET_LAYOUT:
  • PERFORM_CODE_INVALIDATE_LAYOUT:
  • PERFORM_CODE_DO_LAYOUT:
  • PERFORM_CODE_GET_TOOL_TIP_AT:
  • PERFORM_CODE_ALL_UNARCHIVED:
  • PERFORM_CODE_ALL_ARCHIVED:
Parameters
codeThe perform code.
_dataA pointer to store some data.
Returns
A status code.
Since
Haiku R1

Reimplemented from BView.

◆ PointAt()

BPoint BTextView::PointAt ( int32  offset,
float *  _height = NULL 
) const

Returns the location of the character at the given offset.

Parameters
offsetThe offset of the character.
_heightA pointer to write the height of the character.
Returns
A BPoint object set to the location of the character.
Since
BeOS R3

◆ PreferredSize()

virtual BSize BTextView::PreferredSize ( )
virtual

Return the preferred size of the view.

Remarks
This is only meaningful if the view is part of a BLayout.
Returns
The preferred size of the view as a BSize.
See also
BAbstractLayout::PreferredSize()
Since
Haiku R1

Reimplemented from BView.

◆ Pulse()

void BTextView::Pulse ( )
virtual

Hook method that is called at a set interval.

This method is used to make the I-beam cursor blink.

An action is performed each time the App Server calls the Pulse() method. The pulse rate is set by SetPulseRate(). You can implement Pulse() to do anything you want. The default version does nothing. The pulse granularity is no better than once per 100,000 microseconds.

See also
SetPulseRate()
Since
BeOS R3

Reimplemented from BView.

◆ ResizeToPreferred()

virtual void BTextView::ResizeToPreferred ( )
virtual

Resizes the view to its preferred size keeping the position of the left top corner constant.

Warning
It is not recommended to use this method for views that are part of a BLayout.
Since
BeOS R3

Reimplemented from BView.

◆ ResolveSpecifier()

BHandler * BTextView::ResolveSpecifier ( BMessage message,
int32  index,
BMessage specifier,
int32  what,
const char *  property 
)
virtual

Determine the proper handler for a scripting message.

Parameters
messageThe scripting message to determine the handler.
indexThe index of the specifier.
specifierThe message which contains the specifier.
whatThe 'what' field of the specifier message.
propertyThe name of the target property.
Returns
A pointer to the proper BHandler for the given scripting message.
Since
BeOS R3

Reimplemented from BView.

◆ RunArray()

text_run_array * BTextView::RunArray ( int32  startOffset,
int32  endOffset,
int32 *  _size = NULL 
) const

Returns a text_run_array for the text within the given offsets.

The returned text_run_array belongs to the caller, so you must free it once you no longer need it.

Parameters
startOffsetThe text start offset.
endOffsetThe text end offset.
_sizeA pointer to an int32 to fill out the run array size.
Returns
A text_run_array for the text in the given offsets.
See also
SetRunArray()
Since
BeOS R3

◆ ScrollToOffset()

void BTextView::ScrollToOffset ( int32  offset)
virtual

Scrolls the text so that the character at offset is visible.

Parameters
offsetThe offset of the character to scroll to.
Since
BeOS R3

◆ ScrollToSelection()

void BTextView::ScrollToSelection ( )

Scrolls the text so that the character that begins the selection is visible.

Since
BeOS R3

◆ Select()

void BTextView::Select ( int32  startOffset,
int32  endOffset 
)
virtual

Selects the text contained within the given offsets.

Parameters
startOffsetThe offset where the text to select starts.
endOffsetThe offset where the text to select ends.
Since
BeOS R3

◆ SelectAll()

void BTextView::SelectAll ( )

Selects all text contained in the BTextView.

See also
Select()
Since
BeOS R3

◆ SetAlignment()

void BTextView::SetAlignment ( alignment  flag)

Sets the way text is aligned within the frame.

Choices are:

  • B_ALIGN_LEFT
  • B_ALIGN_RIGHT
  • B_ALIGN_CENTER
Parameters
flagThe text alignment to set.
Since
BeOS R3

◆ SetAutoindent()

void BTextView::SetAutoindent ( bool  state)

Sets whether or not new lines of text are automatically indented.

Parameters
statePass in true to automatically indent the text, false to turn off automatic text indenting.
Since
BeOS R3

◆ SetColorSpace()

void BTextView::SetColorSpace ( color_space  colors)

Set the color space of the offscreen BBitmap object.

Parameters
colorsThe colorspace to set on the offscreen BBitmap object.
Since
BeOS R3

◆ SetDoesUndo()

void BTextView::SetDoesUndo ( bool  undo)

Enables and disables the undo mechanism.

Parameters
undoPass in true to enable the undo mechanism, false to disable it.
Since
BeOS R3

◆ SetInsets()

void BTextView::SetInsets ( float  left,
float  top,
float  right,
float  bottom 
)

Sets the insets within the bounds for the object's text frame.

Note
Insets cannot be negative, will result in 0 inset.
Parameters
leftThe left inset to set.
topThe top inset to set.
rightThe right inset to set.
bottomThe bottom inset to set.
Since
Haiku R1

◆ SetMaxBytes()

void BTextView::SetMaxBytes ( int32  max)

Sets the maximum number of bytes that the BTextView can contain.

Parameters
maxThe maximum number of bytes to set.
Since
BeOS R3

◆ SetStylable()

void BTextView::SetStylable ( bool  stylable)

Sets whether or not the object accepts multiple font styles.

Parameters
stylabletrue to accept multiple font styles, false to NOT accept multiple font styles.
Since
BeOS R3

◆ SetTabWidth()

void BTextView::SetTabWidth ( float  width)

Sets the distance between tab stops in pixels.

Parameters
widthThe distance in pixel between tab stops to set.
Since
BeOS R3

◆ SetText() [1/3]

void BTextView::SetText ( const char *  text,
const text_run_array runs = NULL 
)

Copies text from the text buffer replacing any text currently set in the BTextView with the font and color formats set by runs.

Parameters
textThe text to set.
runsSet the font and color formats of the new text if provided. Only applies if the BTextView permits multiple character formats.
Since
BeOS R3

◆ SetText() [2/3]

void BTextView::SetText ( const char *  text,
int32  length,
const text_run_array runs = NULL 
)

Copies text from the text buffer up to length characters replacing any text currently set in the BTextView with the font and color formats set by runs.

text must be at least length characters long. length may be set to 0 to clear the text from the BTextView.

Parameters
textThe text to set.
lengthThe maximum number of bytes of text to use.
runsSet the font and color formats of the new text if provided. Only applies if the BTextView permits multiple character formats.
Since
BeOS R3

◆ SetText() [3/3]

void BTextView::SetText ( BFile file,
int32  offset,
int32  length,
const text_run_array runs = NULL 
)

Copies text from the file starting at the given offset up to length characters replacing any text currently set in the BTextView with the font and color formats set by runs.

Parameters
fileThe file to set the text from.
offsetThe position in the file to start reading text.
lengthThe number of bytes of text to read from the file.
runsSet the font and color formats of the new text if provided. Only applies if the BTextView permits multiple character formats.
Since
BeOS R3

◆ SetTextRect()

void BTextView::SetTextRect ( BRect  rect)

Sets the object's text frame to the passed in rect.

Parameters
rectA BRect object to set the text frame to.
Since
BeOS R3

◆ SetWordWrap()

void BTextView::SetWordWrap ( bool  wrap)

Activate or deactivate word wrapping mode.

Parameters
wrapPass in true to turn on word wrapping mode, false to turn off word wrapping mode.
Since
BeOS R3

◆ TabWidth()

float BTextView::TabWidth ( ) const

Returns the tab width of the BTextView.

Returns
The tab width of the BTextView.
See also
SetTabWidth()
Since
BeOS R3

◆ Text()

const char * BTextView::Text ( ) const

Returns the BTextView text as a byte array.

Warning
It is possible that the BTextView object had to do some operations on the text to be able to return it as a C string. If you need to call Text() repeatedly, you'd better use GetText() instead.
Returns
A pointer to the text as a byte array.
Since
BeOS R3

◆ TextHeight()

float BTextView::TextHeight ( int32  startLine,
int32  endLine 
) const

Returns the height of the text enclosed within the given lines.

Parameters
startLineThe index of the starting line.
endLineThe index of the ending line.
Returns
The height height of the text enclosed within the given lines as a float.
Since
BeOS R3

◆ TextLength()

int32 BTextView::TextLength ( ) const

Returns the text length of the BTextView text.

Returns
The text length of the BTextView text.
Since
BeOS R3

◆ TextRect()

BRect BTextView::TextRect ( ) const

Returns the BTextView's text frame.

Returns
The BTextView's text frame.
See also
SetTextRect()
Since
BeOS R3

◆ WindowActivated()

void BTextView::WindowActivated ( bool  active)
virtual

Hook method that is called when the window becomes the active window or gives up that status.

Parameters
activetrue when the window becomes activated, false when the window becomes deactivated.
Since
BeOS R3

Reimplemented from BView.