CListView Class Reference

Implements a customized TreeView interface. More...

#include <clistview.h>

List of all members.

Public Member Functions

 CListView ()
 Default constructor.
void clear ()
 Clear all data in this list.
void append_toplevel_text (const Glib::ustring &text)
 Append top-level text to this list.
void append_child_text (const Glib::ustring &parent, const Glib::ustring &id, const Glib::ustring &text, const Glib::RefPtr< Gtk::TextBuffer > &buffer)
 Append text as child of a parent node.
void delete_toplevel_text (const Glib::ustring &text)
 Remove a top-level text element.
void select_block (const Glib::ustring &block, Gtk::TreeRow *row)
 Activate a text block and emit the display_buffer signal.
BufferMap get_buffers () const
 Get the buffers present in the list.
std::map
< Glib::ustring,
Glib::ustring > 
get_buffer_descriptions ()
 Get buffer descriptions for this list Map parameter 1 is the buffer ID; parameter 2 is the actual description.
sigc::signal< void,
Glib::ustring,
Glib::RefPtr
< Gtk::TextBuffer > > 
signal_display_buffer () const
 Signal to request buffer to be displayed.
sigc::signal< void,
Glib::ustring, bool,
CListView * > 
signal_add_text_block () const
 Signal to request adding a new text block.
sigc::signal< void,
Gtk::TreeModel::iterator > 
signal_select () const
 Signal to request a selection change.

Static Public Member Functions

static Glib::RefPtr
< Gtk::TextBuffer > 
create_buffer ()
 Create a buffer ready for use in this list.

Private Member Functions

void on_selection_changed ()
void on_add_text_block ()
void on_delete_text_block ()
void on_edit_description ()
void on_follow_goto ()
virtual bool on_button_press_event (GdkEventButton *e)

Private Attributes

sigc::signal< void,
Glib::ustring,
Glib::RefPtr
< Gtk::TextBuffer > > 
m_DisplayBufferSignal
 Signal object to request buffer to be displayed.
sigc::signal< void,
Gtk::TreeModel::iterator > 
m_SelectSignal
 Signal object to request a row be selected.
sigc::signal< void,
Glib::ustring, bool,
CListView * > 
m_AddBlockSignal
 Signal object to request adding a new text block.
Gtk::Menu m_ContextMenu
Glib::RefPtr
< Gtk::TreeStore > 
m_Model
ColumnRec m_ColumnRec
BufferMap m_Buffers
 Map of buffers.

Classes

class  ColumnRec


Detailed Description

Implements a customized TreeView interface.

Normally, GTK's list widget provides the usual functions and API needed to take care of most editor requirements. This class extends that API with custom functions that deal specifically with the editor's unique needs for handling text block nodes, descriptions, and everything else.


Member Function Documentation

Glib::RefPtr< Gtk::TextBuffer > CListView::create_buffer (  )  [static]

Create a buffer ready for use in this list.

All text blocks should be created using this function, as it also configures the buffer to use styling tags and whatnot.

Returns:
The text block

void CListView::append_toplevel_text ( const Glib::ustring &  text  ) 

Append top-level text to this list.

Parameters:
text The text to append

void CListView::append_child_text ( const Glib::ustring &  parent,
const Glib::ustring &  id,
const Glib::ustring &  text,
const Glib::RefPtr< Gtk::TextBuffer > &  buffer 
)

Append text as child of a parent node.

Parameters:
parent The ID of the parent node
id The ID of the new node
text The description of the node
buffer The text block to associate with this node

void CListView::delete_toplevel_text ( const Glib::ustring &  text  ) 

Remove a top-level text element.

Parameters:
text The text node to remove

void CListView::select_block ( const Glib::ustring &  block,
Gtk::TreeRow *  row 
)

Activate a text block and emit the display_buffer signal.

Parameters:
block Either the ID or full text of block
row GTK row pointing to the block

BufferMap CListView::get_buffers (  )  const [inline]

Get the buffers present in the list.

Returns:
The map of buffers

std::map< Glib::ustring, Glib::ustring > CListView::get_buffer_descriptions (  ) 

Get buffer descriptions for this list Map parameter 1 is the buffer ID; parameter 2 is the actual description.

Returns:
The map of buffer descriptions


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