TextBoxEditor Class Reference

Widget that allows for editing a character's textbox dialogue. More...

#include <textboxeditor.h>

List of all members.

Public Types

enum  Format { FORMAT_PLAIN = 0, FORMAT_BLUE, FORMAT_DATE, FORMAT_TESTIMONY_TITLE }
 Predefined formats for text.

Public Member Functions

 TextBoxEditor ()
 Default constructor.
void set_text (int line, const Glib::ustring &text)
 Set text for a given line.
void set_format (const Format &format)
 Set the format to use for text.

Private Member Functions

virtual bool on_expose_event (GdkEventExpose *e)
virtual bool on_motion_notify_event (GdkEventMotion *e)
void draw_line (Cairo::RefPtr< Cairo::Context > cr, const std::string &text, int x, int y)

Private Attributes

Cairo::RefPtr
< Cairo::ImageSurface > 
m_BG
Format m_Format
 Record of text format.
int m_TextHeight
 Largest height of a line of text.
int m_MouseX
 X-coordinate of mouse.
int m_MouseY
 Y-coordinate of mouse.
std::map< int,
Glib::ustring > 
m_Text
 Map of lines of text.


Detailed Description

Widget that allows for editing a character's textbox dialogue.

In order to provide a good tool for users to insert formatted dialogue, a preview should be shown. This widget draws up to three lines of text, and sizes them so they look as though they were drawn in the player.


Member Function Documentation

void TextBoxEditor::set_text ( int  line,
const Glib::ustring &  text 
)

Set text for a given line.

Parameters:
line The line number, a value between [1,3], inclusive
text The text to set

void TextBoxEditor::set_format ( const Format format  )  [inline]

Set the format to use for text.

Parameters:
format A predefined format


The documentation for this class was generated from the following files:
Generated on Fri Feb 22 22:34:19 2008 for Phoenix Wright Case Editor API by  doxygen 1.5.3