FLTK Utility Library and Widget Collection (FLU): Flu_Chat_Buffer class Reference

Main Page | Class Hierarchy | Class List | File List | Class Members

# Flu_Chat_Buffer Class Reference

A class for drawing text messages in the style of a "chat buffer". More...

`#include <Flu_Chat_Buffer.h>`

List of all members.

## Public Member Functions
| Flu_Chat_Buffer (int x, int y, int w, int h, const char *label=0)
| Normal FLTK widget constructor.
virtual | ~Flu_Chat_Buffer ()
| Default destructor.
void | addSystemMessage (const char *msg)
| Add a system message to the chat buffer using the system font and color.
void | addRemoteMessage (const char *handle, const char *msg)
| Add a message from a remote person to the chat buffer using the remote font and color.
void | addLocalMessage (const char *handle, const char *msg)
| Add a message from a local person to the chat buffer using the local font and color.
void | clear (int maximumLines=500)
| Clear the contents of the buffer and set the maximum number of lines it can contain to maximumLines.
void | setSystemStyle (Fl_Font f, Fl_Color c)
| Set the font and color to use when printing system messages.
void | setRemoteHandleStyle (Fl_Font f, Fl_Color c)
| Set the font and color to use when printing the handle from a remote message.
void | setLocalHandleStyle (Fl_Font f, Fl_Color c)
| Set the font and color to use when printing the handle from a local message.
void | setRemoteMessageStyle (Fl_Font f, Fl_Color c)
| Set the font and color to use when printing a remote message.
*void | setLocalMessageStyle (Fl_Font f, Fl_Color c)
virtual void | resize (int x, int y, int w, int h)
| FLTK resize of this widget.
## Protected Member Functions
void | scrollbarCB ()
virtual void | draw ()
void | _addMessage (char type, char *handle, char *msg)
void | _computeMessageFootprint ()
## Static Protected Member Functions
void | _scrollbarCB (Fl_Widget *w, void *arg)
## Protected Attributes
Fl_Font | systemFont
Fl_Font | remoteHandleFont
Fl_Font | localHandleFont
Fl_Font | remoteMessageFont
Fl_Font | localMessageFont
Fl_Color | systemColor
Fl_Color | remoteHandleColor
Fl_Color | localHandleColor
Fl_Color | remoteMessageColor
Fl_Color | localMessageColor
MessageInfo * | buffer
int | maxLines
int | totalLines
int | currentLine
bool | recomputeFootprint
Fl_Scrollbar * | scrollbar

## Detailed Description

A class for drawing text messages in the style of a "chat buffer".

This class is pretty much only useful for chatting.

## Member Function Documentation

void Flu_Chat_Buffer::setLocalHandleStyle | ( | Fl_Font | f,
|  | Fl_Color | c
| ) | `[inline]`

| Set the font and color to use when printing the handle from a local message. Default is FL_HELVETICA_BOLD, FL_BLUE

* void Flu_Chat_Buffer::setLocalMessageStyle | ( | Fl_Font | f,
|  | Fl_Color | c
| ) | `[inline]`

| Set the font and color to use when printing a local message Default is FL_HELVETICA, FL_BLUE

void Flu_Chat_Buffer::setRemoteHandleStyle | ( | Fl_Font | f,
|  | Fl_Color | c
| ) | `[inline]`

| Set the font and color to use when printing the handle from a remote message. Default is FL_HELVETICA_BOLD, FL_RED

void Flu_Chat_Buffer::setRemoteMessageStyle | ( | Fl_Font | f,
|  | Fl_Color | c
| ) | `[inline]`

| Set the font and color to use when printing a remote message. Default is FL_HELVETICA, FL_RED

void Flu_Chat_Buffer::setSystemStyle | ( | Fl_Font | f,
|  | Fl_Color | c
| ) | `[inline]`

| Set the font and color to use when printing system messages. Default is FL_HELVETICA_ITALIC, FL_BLACK

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

- Flu_Chat_Buffer.h