Planeshift
Public Member Functions | Protected Member Functions | Protected Attributes

pawsMultiLineTextBox Class Reference

#include <pawstextbox.h>

List of all members.

Public Member Functions

void Draw ()
 Draws the widget and all of it's children.
const char * GetText ()
virtual bool OnGainFocus (bool=true)
 Changes hasFocus to TRUE and reports status to parent.
virtual bool OnMouseDown (int button, int modifiers, int x, int y)
 Manage mouse down event to test for and apply window changes.
bool OnScroll (int direction, pawsScrollBar *widget)
 Called whenever a window is scrolled.
virtual void OnUpdateData (const char *dataname, PAWSData &data)
 pawsMultiLineTextBox (const pawsMultiLineTextBox &origin)
 pawsMultiLineTextBox ()
bool PostSetup ()
 This is called after the widget and all of it's children have been created.
void Resize ()
 Resize a widget based on it's parent's size.
void SetText (const char *text)
bool Setup (iDocumentNode *node)
 Setup this widget.
virtual ~pawsMultiLineTextBox ()

Protected Member Functions

pawsScrollBarGetScrollBar ()
 checks for a child of type pawsScrollBar.
void OrganizeText (const char *text)

Protected Attributes

size_t canDrawLines
csArray< csString > lines
 The text, broken into separate lines by OrganizeText()
int maxHeight
int maxWidth
pawsScrollBarscrollBar
size_t startLine
csString text
 The text for this box.
bool usingScrollBar

Detailed Description

Definition at line 613 of file pawstextbox.h.


Constructor & Destructor Documentation

pawsMultiLineTextBox::pawsMultiLineTextBox ( )
pawsMultiLineTextBox::pawsMultiLineTextBox ( const pawsMultiLineTextBox origin)
virtual pawsMultiLineTextBox::~pawsMultiLineTextBox ( ) [virtual]

Member Function Documentation

void pawsMultiLineTextBox::Draw ( ) [virtual]

Draws the widget and all of it's children.

Remarks:
Uses clipping rect of it's parent to define drawing area. If the drawing area defined is empty it returns.

Reimplemented from pawsWidget.

Reimplemented in pawsDocumentView.

pawsScrollBar* pawsMultiLineTextBox::GetScrollBar ( ) [protected]

checks for a child of type pawsScrollBar.

Returns:
pawsScrollBar* pointer to child or NULL
const char* pawsMultiLineTextBox::GetText ( ) [inline]

Definition at line 626 of file pawstextbox.h.

virtual bool pawsMultiLineTextBox::OnGainFocus ( bool  = true) [inline, virtual]

Changes hasFocus to TRUE and reports status to parent.

Returns:
bool
Remarks:
Acts recursively on it's parents. If the widget cannot be focused, this function needs be overridden.

Reimplemented from pawsWidget.

Definition at line 635 of file pawstextbox.h.

virtual bool pawsMultiLineTextBox::OnMouseDown ( int  button,
int  modifiers,
int  x,
int  y 
) [virtual]

Manage mouse down event to test for and apply window changes.

Parameters:
buttonType of button: 1 resizable or movable, 2 context menu or config window.
modifiersUsed with PAWS_CONSTRUCTION.
xUsed to test for resize.
yUsed to test for resize.
Returns:
bool TRUE if movable or resizable.
Remarks:
calls OnMouseDown on it's parent.

Reimplemented from pawsWidget.

bool pawsMultiLineTextBox::OnScroll ( int  scrollDirection,
pawsScrollBar widget 
) [virtual]

Called whenever a window is scrolled.

Parameters:
scrollDirectionThe direction to move.
widgetThe scrollbar widget being manipulated.
Returns:
bool Parent's result or FALSE if no parent.

Reimplemented from pawsWidget.

virtual void pawsMultiLineTextBox::OnUpdateData ( const char *  dataname,
PAWSData data 
) [virtual]

Reimplemented from pawsWidget.

void pawsMultiLineTextBox::OrganizeText ( const char *  text) [protected]
bool pawsMultiLineTextBox::PostSetup ( ) [virtual]

This is called after the widget and all of it's children have been created.

Remarks:
This can be useful for widgets that want to get pointers to some of it's children for quick access.

Reimplemented from pawsWidget.

void pawsMultiLineTextBox::Resize ( ) [virtual]

Resize a widget based on it's parent's size.

Reimplemented from pawsWidget.

Reimplemented in pawsDocumentView.

void pawsMultiLineTextBox::SetText ( const char *  text)

Reimplemented in pawsDocumentView.

bool pawsMultiLineTextBox::Setup ( iDocumentNode *  ) [virtual]

Setup this widget.

Reimplemented from pawsWidget.


Member Data Documentation

Definition at line 659 of file pawstextbox.h.

csArray<csString> pawsMultiLineTextBox::lines [protected]

The text, broken into separate lines by OrganizeText()

Definition at line 654 of file pawstextbox.h.

Definition at line 662 of file pawstextbox.h.

Definition at line 661 of file pawstextbox.h.

Definition at line 663 of file pawstextbox.h.

size_t pawsMultiLineTextBox::startLine [protected]

Definition at line 657 of file pawstextbox.h.

csString pawsMultiLineTextBox::text [protected]

The text for this box.

Definition at line 652 of file pawstextbox.h.

Definition at line 660 of file pawstextbox.h.


The documentation for this class was generated from the following file: