MainWindow Class Reference

The central window for the editor. More...

#include <mainwindow.h>

List of all members.

Public Member Functions

 MainWindow ()
 Default constructor.
Case::Caseget_case ()
 Get a pointer to the single case object.
BufferMap get_case_buffers () const
 Get the buffers used in this case.

Private Member Functions

void construct ()
 Build the window's UI.
bool check_case_element (const Glib::ustring &element, int amount)
 Check to see if there are enough elements of a case.
void create_trigger_submenu (Gtk::Menu *menu)
 Create the trigger submenu Internal function to create and populate the "Insert Trigger" submenu.
void set_menuitem_icon (const Glib::ustring &path, const Gtk::StockID &id)
 Set an icon for a menu item.
bool process_load_case (const Glib::ustring &path)
 Process and handle a loaded case from file.
bool process_export (const Glib::ustring &path)
 Process and configure a case, then export it.
void on_new ()
 Handler for creating a new case.
void on_save ()
 Handler to save a case.
void on_save_as ()
 Handler to save a case under a new file.
void on_export ()
 Handler to export a case.
void on_quick_export (const Glib::ustring &path)
 Handler to conveniently export a case.
void on_open ()
 Handler to open a case.
void on_open_recent (const Glib::ustring &path)
 Handler to open a recent case file.
void on_quit ()
 Handler to quit the editor.
void on_edit_find_in_blocks ()
 Handler to find text in blocks.
void on_script_insert_dialogue ()
 Handler to add formatted dialogue to script.
void on_script_insert_trigger (const Glib::ustring &trigger)
 Handler to insert a trigger into block.
void on_script_change_text_color ()
 Handler to change the text color.
void on_script_change_text_speed ()
 Handler to change text speed.
void on_case_add_char ()
 Handler to add character.
void on_case_browse_chars ()
 Handler to browse characters.
void on_case_manage_testimonies ()
 Handler to manage testimonies.
void on_case_edit_locations ()
 Handler to edit locations.
void on_case_edit_overview ()
 Handler to edit case overview information.
void on_case_change_initial_block ()
 Handler to change initial case text block.
void on_case_customize ()
 Handler to customize case elements.
void on_assets_manage_audio ()
 Handler to manage audio assets.
void on_assets_manage_bg ()
 Handler to manage background assets.
void on_assets_manage_evidence ()
 Handler to manage evidence assets.
void on_assets_manage_images ()
 Handler to manage images assets.
void on_tools_sprite_editor ()
 Handler to display sprite editor.
void on_help_about ()
 Handler to display info about this application.

Private Attributes

Glib::RefPtr
< Gtk::ActionGroup > 
m_ActionGroup
Glib::RefPtr
< Gtk::UIManager > 
m_UIManager
Gtk::Menu * m_RecentMenu
Gtk::Statusbar * m_Statusbar
 Status bar in window.
ScriptWidgetm_ScriptWidget
 Instance of ScriptWidget.
IconManager m_IconMgr
 Instance of IconManager.
Gtk::Menu * m_QExportMenu
 Pointer to quick export menu.
SpriteEditor m_SprEditor
 Instance of SpriteEditor.
Case::Case m_Case
 Internal case data.
bool m_Saved
 Flag whether or not the case was already saved.
Glib::ustring m_SavePath
 Path to automatically save case to.
std::vector< StringPair > m_RecentFiles
 Vector of recent files.


Detailed Description

The central window for the editor.

This is the main window that displays all of the editor's components, along with the usual menus and implementations of basic functionality.


Member Function Documentation

Case::Case* MainWindow::get_case (  )  [inline]

Get a pointer to the single case object.

Returns:
A pointer to the internal Case

BufferMap MainWindow::get_case_buffers (  )  const [inline]

Get the buffers used in this case.

Returns:
Map of buffers

bool MainWindow::check_case_element ( const Glib::ustring &  element,
int  amount 
) [private]

Check to see if there are enough elements of a case.

This function will check the given element, and determine if there is at least amount of it.
Valid elements are: characters, locations, evidence, blocks, audio, images, and testimonies

Warning:
If element is not one of the above strings, then an exception is thrown
Parameters:
element The element of a case
amount Amount of element to check
Returns:
true if check passes, false otherwise

void MainWindow::create_trigger_submenu ( Gtk::Menu *  menu  )  [private]

Create the trigger submenu Internal function to create and populate the "Insert Trigger" submenu.

Parameters:
menu A pointer to the parent menu

void MainWindow::set_menuitem_icon ( const Glib::ustring &  path,
const Gtk::StockID &  id 
) [private]

Set an icon for a menu item.

Parameters:
path GTK valid path to the menu item
id Stock icon ID to set

bool MainWindow::process_load_case ( const Glib::ustring &  path  )  [private]

Process and handle a loaded case from file.

Parameters:
path Path to case file
Returns:
true if everything is fine, false otherwise

bool MainWindow::process_export ( const Glib::ustring &  path  )  [private]

Process and configure a case, then export it.

Parameters:
path Path to export the case to
Returns:
true if export was successful, false otherwise

void MainWindow::on_quick_export ( const Glib::ustring &  path  )  [private]

Handler to conveniently export a case.

Parameters:
path The path to export the case to

void MainWindow::on_open_recent ( const Glib::ustring &  path  )  [private]

Handler to open a recent case file.

Parameters:
path Path to the case file


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