Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | Related Pages

wftk::MultiLineEdit Class Reference

multi-line text box for user input More...

#include <multilineedit.h>

Inheritance diagram for wftk::MultiLineEdit:

wftk::LineEdit wftk::Widget wftk::ScreenArea wftk::Terminal List of all members.

Public Types

enum  tag_t {
  START_TAG = 127, END_TAG = 126, FONT_TAG = 124, IMAGE_TAG = 123,
  LINK_TAG = 122
}
 Markup tags for text formatting / link embedding: in c-strings you may use the octal encodings: . More...


Public Member Functions

 MultiLineEdit (const std::string &text="", const Font &font=Font(), bool readonly=true, bool fill=false)
 Constructor.

void setWrapping (bool flag)
 Control word-wrap behaviour.

void setMaxLinesToStore (unsigned n)
 Set scrollback size.

virtual void addText (const std::string &)
 append text to this widget

void newline ()
 start a new line on the text output area

unsigned visibleLines () const
 return the number of visible lines

void setMarkupColor (unsigned index, const Color &fontCol)
 keep the current markup font, but change its color

void setMarkupFont (unsigned index, const Font &font)
void setImage (unsigned index, Surface::Resource *surface)
 Set background image from a Resource.

void setImage (unsigned index, const Surface &surface)
 Set background image from a Surface.

void setImage (unsigned index, const std::string &)
 Set background image from a named resource.

virtual bool buttonEvent (Mouse::Button, bool, const Point &)
 mouse-click handler function


Public Attributes

SigC::Signal1< void, unsigned > linkActivated
 signal emitted when a link markup is hovered


Protected Member Functions

virtual void setPackingInfo ()
 recalculate the object's prefered size

virtual void handleResize (Uint16 w, Uint16 h)
 Calculate new shape for shaped widgets, call to setShape() after a resize.

void breakText (std::string &, std::vector< std::string > &, unsigned)
void renderTextLines (const std::vector< std::string > &)

Protected Attributes

unsigned maxLinesToStore_

Detailed Description

multi-line text box for user input


Member Enumeration Documentation

enum wftk::MultiLineEdit::tag_t
 

Markup tags for text formatting / link embedding: in c-strings you may use the octal encodings: .

Enumeration values:
START_TAG  Start markup.
END_TAG  End markup.
FONT_TAG  Change font inline.
IMAGE_TAG  Insert an image (Surface) inline.
LINK_TAG  Insert an inline link.


Constructor & Destructor Documentation

wftk::MultiLineEdit::MultiLineEdit const std::string &  text = "",
const Font font = Font(),
bool  readonly = true,
bool  fill = false
[explicit]
 

Constructor.

Parameters:
text Initial text for this widget. Defaults to empty string.
font Initial font for this widget. Defaults to wftk system font.
readonly boolean flag to lock / unlock direct text input
fill boolean flag, if true then this widget will expand to fill all available space


Member Function Documentation

void wftk::MultiLineEdit::renderTextLines const std::vector< std::string > &  lines  )  [protected]
 

while (itr != lines[n].end())


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

Generated Thu Mar 18 20:06:05 2004.
Copyright © 1998-2003 by the respective authors.

This document is licensed under the terms of the GNU Free Documentation License and may be freely distributed under the conditions given by this license.