# TextView Support Tasks

|  |  |  |  | Task Summary | Owner
|  |  |  |  | BTextView |
|  |  |  |  | BTextControl |

|  |  |  |  | Task Details
BTextView Class
|  |  |  |  | BTextView(BRect frame, const char* name, BRect textRect, uint32 resizeMask, uint32 flags = B_WILL_DRAW | B_PULSE_NEEDED);
|  |  |  |  | BTextView(BRect frame, const char* name, BRect textRect, const BFont* initialFont, const rgb_color* initialColor, uint32 resizeMask, uint32 flags);
|  |  |  |  | BTextView(BMessage* data);
|  |  |  |  | virtual ~BTextView();
|  |  |  |  | static BArchivable* Instantiate(BMessage* data);
|  |  |  |  | virtual status_t Archive(BMessage* data, bool deep = true) const;
|  |  |  |  | virtual void AttachedToWindow();
|  |  |  |  | virtual void DetachedFromWindow();
|  |  |  |  | virtual void Draw(BRect inRect);
|  |  |  |  | virtual void MouseDown(BPoint where);
|  |  |  |  | virtual void MouseUp(BPoint where);
|  |  |  |  | virtual void MouseMoved(BPoint where, uint32 code, const BMessage* message);
|  |  |  |  | virtual void WindowActivated(bool state);
|  |  |  |  | virtual void KeyDown(const char* bytes, int32 numBytes);
|  |  |  |  | virtual void Pulse();
|  |  |  |  | virtual void FrameResized(float width, float height);
|  |  |  |  | virtual void MakeFocus(bool focusState = true);
|  |  |  |  | virtual void MessageReceived(BMessage* message);
|  |  |  |  | virtual BHandler* ResolveSpecifier(BMessage* message, int32 index, BMessage* specifier, int32 form, const char* property);
|  |  |  |  | virtual status_t GetSupportedSuites(BMessage* data);
|  |  |  |  | virtual status_t Perform(perform_code d, void* arg);
|  |  |  |  | void SetText(const char* inText, const text_run_array* inRuns = NULL);
|  |  |  |  | void SetText(const char* inText, int32 inLength, const text_run_array* inRuns = NULL);
|  |  |  |  | void SetText(BFile* inFile, int32 startOffset, int32 inLength, const text_run_array* inRuns = NULL);
|  |  |  |  | void Insert(const char* inText, const text_run_array* inRuns = NULL);
|  |  |  |  | void Insert(const char* inText, int32 inLength, const text_run_array* inRuns = NULL);
|  |  |  |  | void Insert(int32 startOffset, const char* inText, int32 inLength, const text_run_array* inRuns = NULL);
|  |  |  |  | void Delete();
|  |  |  |  | void Delete(int32 startOffset, int32 endOffset);
|  |  |  |  | const char* Text() const;
|  |  |  |  | int32 TextLength() const;
|  |  |  |  | void GetText(int32 offset, int32 length, char* buffer) const;
|  |  |  |  | uchar ByteAt(int32 offset) const;
|  |  |  |  | int32 CountLines() const;
|  |  |  |  | int32 CurrentLine() const;
|  |  |  |  | void GoToLine(int32 lineNum);
|  |  |  |  | virtual void Cut(BClipboard* clipboard);
|  |  |  |  | virtual void Copy(BClipboard* clipboard);
|  |  |  |  | virtual void Paste(BClipboard* clipboard);
|  |  |  |  | void Clear();
|  |  |  |  | virtual bool AcceptsPaste(BClipboard* clipboard);
|  |  |  |  | virtual bool AcceptsDrop(const BMessage* inMessage);
|  |  |  |  | virtual void Select(int32 startOffset, int32 endOffset);
|  |  |  |  | void SelectAll();
|  |  |  |  | void GetSelection(int32* outStart, int32* outEnd) const;
|  |  |  |  | void SetFontAndColor(const BFont* inFont, uint32 inMode = B_FONT_ALL, const rgb_color* inColor = NULL);
|  |  |  |  | void SetFontAndColor(int32 startOffset, int32 endOffset, const BFont* inFont, uint32 inMode = B_FONT_ALL, const rgb_color* inColor = NULL);
|  |  |  |  | void GetFontAndColor(int32 inOffset, BFont* outFont, rgb_color* outColor = NULL) const;
|  |  |  |  | void GetFontAndColor(BFont* outFont, uint32* outMode, rgb_color* outColor = NULL, bool* outEqColor = NULL) const;
|  |  |  |  | void SetRunArray(int32 startOffset, int32 endOffset, const text_run_array* inRuns);
|  |  |  |  | text_run_array* RunArray(int32 startOffset, int32 endOffset, int32* outSize = NULL) const;
|  |  |  |  | int32 LineAt(int32 offset) const;
|  |  |  |  | int32 LineAt(BPoint point) const;
|  |  |  |  | BPoint PointAt(int32 inOffset, float* outHeight = NULL) const;
|  |  |  |  | int32 OffsetAt(BPoint point) const;
|  |  |  |  | int32 OffsetAt(int32 line) const;
|  |  |  |  | virtual void FindWord(int32 inOffset, int32* outFromOffset, int32* outToOffset);
|  |  |  |  | virtual bool CanEndLine(int32 offset);
|  |  |  |  | float LineWidth(int32 lineNum = 0) const;
|  |  |  |  | float LineHeight(int32 lineNum = 0) const;
|  |  |  |  | float TextHeight(int32 startLine, int32 endLine) const;
|  |  |  |  | void GetTextRegion(int32 startOffset, int32 endOffset, BRegion* outRegion) const;
|  |  |  |  | virtual void ScrollToOffset(int32 inOffset);
|  |  |  |  | void ScrollToSelection();
|  |  |  |  | void Highlight(int32 startOffset, int32 endOffset);
|  |  |  |  | void SetTextRect(BRect rect);
|  |  |  |  | BRect TextRect() const;
|  |  |  |  | void SetStylable(bool stylable);
|  |  |  |  | bool IsStylable() const;
|  |  |  |  | void SetTabWidth(float width);
|  |  |  |  | float TabWidth() const;
|  |  |  |  | void MakeSelectable(bool selectable = true);
|  |  |  |  | bool IsSelectable() const;
|  |  |  |  | void MakeEditable(bool editable = true);
|  |  |  |  | bool IsEditable() const;
|  |  |  |  | void SetWordWrap(bool wrap);
|  |  |  |  | bool DoesWordWrap() const;
|  |  |  |  | void SetMaxBytes(int32 max);
|  |  |  |  | int32 MaxBytes() const;
|  |  |  |  | void DisallowChar(uint32 aChar);
|  |  |  |  | void AllowChar(uint32 aChar);
|  |  |  |  | void SetAlignment(alignment flag);
|  |  |  |  | alignment Alignment() const;
|  |  |  |  | void SetAutoindent(bool state);
|  |  |  |  | bool DoesAutoindent() const;
|  |  |  |  | void SetColorSpace(color_space colors);
|  |  |  |  | color_space ColorSpace() const;
|  |  |  |  | void MakeResizable(bool resize, BView* resizeView = NULL);
|  |  |  |  | bool IsResizable() const;
|  |  |  |  | void SetDoesUndo(bool undo);
|  |  |  |  | bool DoesUndo() const;
|  |  |  |  | void HideTyping(bool enabled);
|  |  |  |  | bool IsTypingHidden(void) const;
|  |  |  |  | virtual void ResizeToPreferred();
|  |  |  |  | virtual void GetPreferredSize(float* width, float* height);
|  |  |  |  | virtual void AllAttached();
|  |  |  |  | virtual void AllDetached();
|  |  |  |  | static void* FlattenRunArray(const text_run_array* inArray, int32* outSize = NULL);
|  |  |  |  | static text_run_array* UnflattenRunArray(const void *data, int32* outSize = NULL);
|  |  |  |  | virtual void InsertText(const char* inText, int32 inLength, int32 inOffset, const text_run_array* inRuns);
|  |  |  |  | virtual void DeleteText(int32 fromOffset, int32 toOffset);
|  |  |  |  | virtual void Undo(BClipboard* clipboard);
|  |  |  |  | undo_state UndoState(bool* isRedo) const;
|  |  |  |  | virtual void GetDragParameters(BMessage* drag, BBitmap** bitmap, BPoint* point, BHandler** handler);
BTextControl Class
|  |  |  |  | BTextControl(BRect frame, const char* name, const char* label, const char* initial_text, BMessage* message, uint32 rmask = B_FOLLOW_LEFT | B_FOLLOW_TOP, uint32 flags = B_WILL_DRAW | B_NAVIGABLE);
|  |  |  |  | BTextControl(BMessage* data);
|  |  |  |  | virtual ~BTextControl();
|  |  |  |  | static BArchivable* Instantiate(BMessage* data);
|  |  |  |  | virtual status_t Archive(BMessage* data, bool deep = true) const;
|  |  |  |  | virtual void SetText(const char* text);
|  |  |  |  | const char* Text() const;
|  |  |  |  | virtual void SetValue(int32 value);
|  |  |  |  | virtual status_t Invoke(BMessage* msg = NULL);
|  |  |  |  | BTextView* TextView() const;
|  |  |  |  | virtual void SetModificationMessage(BMessage* message);
|  |  |  |  | BMessage* ModificationMessage() const;
|  |  |  |  | virtual void SetAlignment(alignment label, alignment text);
|  |  |  |  | void GetAlignment(alignment* label, alignment* text) const;
|  |  |  |  | virtual void SetDivider(float dividing_line);
|  |  |  |  | float Divider() const;
|  |  |  |  | virtual void Draw(BRect updateRect);
|  |  |  |  | virtual void MouseDown(BPoint where);
|  |  |  |  | virtual void AttachedToWindow();
|  |  |  |  | virtual void MakeFocus(bool focusState = true);
|  |  |  |  | virtual void SetEnabled(bool state);
|  |  |  |  | virtual void FrameMoved(BPoint new_position);
|  |  |  |  | virtual void FrameResized(float new_width, float new_height);
|  |  |  |  | virtual void WindowActivated(bool active);
|  |  |  |  | virtual void GetPreferredSize(float* width, float* height);
|  |  |  |  | virtual void ResizeToPreferred();
|  |  |  |  | virtual void MessageReceived(BMessage* msg);
|  |  |  |  | virtual BHandler* ResolveSpecifier(BMessage* msg, int32 index, BMessage* specifier, int32 form, const char* property);
|  |  |  |  | virtual void MouseUp(BPoint pt);
|  |  |  |  | virtual void MouseMoved(BPoint pt, uint32 code, const BMessage* msg);
|  |  |  |  | virtual void DetachedFromWindow();
|  |  |  |  | virtual void AllAttached();
|  |  |  |  | virtual void AllDetached();
|  |  |  |  | virtual status_t GetSupportedSuites(BMessage* data);
|  |  |  |  | virtual void SetFlags(uint32 flags);

Legend
| Functional Spec
| Use Cases
| Unit Tests
| Technical Spec
| Implementation
| Completed

The OpenBeOS project is hosted by:

Copyright © 2001-2002 OpenBeOS Project