EditorWindow Class Reference

A big window for editing tracks in. More...

#include <EditorWindow.h>

Inheritance diagram for EditorWindow:

Window List of all members.

Public Member Functions

 EditorWindow (bool show_guide, std::string filename=std::string())
 Create and show the editor window.
virtual ~EditorWindow ()
 EditorWindow (EditorWindow &source)
 Copy constructor.

Protected Member Functions

void assemble_ui ()
 Assemble widgets and menu and toolbar items.
void on_action_file_new ()
void on_action_file_open ()
void on_action_file_save ()
void on_action_file_save_as ()
void on_action_file_test ()
void on_action_file_quit ()
void on_action_edit_undo ()
void on_action_edit_redo ()
void on_action_edit_cut ()
void on_action_edit_copy ()
void on_action_edit_paste ()
void on_action_edit_select_all ()
void on_action_edit_delete ()
void on_action_edit_lighting ()
void on_action_view_zoom_in ()
void on_action_view_zoom_out ()
void on_action_view_zoom_to_fit ()
void on_action_view_top ()
void on_action_view_front ()
void on_action_view_side ()
void on_action_view_new_window ()
void on_action_help_guide ()
void on_action_help_wiki ()
void on_action_help_about ()
void on_theme_picked (std::string filename)
 theme picked
void on_lighting_changed ()
 Change from m_lighting_window.
void on_command_run ()
 Update after a change in the document.
void on_view_command (boost::shared_ptr< Document::DocumentDelta > delta)
 Change the document using a command generated by a view.
void on_view_preview_command (boost::shared_ptr< Document::DocumentDelta > delta)
 Preview a change to the document using a command generated by a view.
void on_view_preview_cancel ()
 Reset the document when a previewed command is not wanted.
virtual bool on_delete_event (GdkEventAny *event)
 Confirm when closing the window with unsaved changes.
bool check_clear_document ()
 Check if it is OK to clear the document.
void load_theme (std::string filename)
 load a theme from a URI
void show_editor ()
 show / activate controls for after a theme is picked or file is loaded.
void open_file (std::string filename)
 Open a track file.

Protected Attributes

Gtk::VBox m_box
 main box for menu bar, toolbar, work area, and status bar.
Gtk::Statusbar m_status_bar
 status bar
Glib::RefPtr< Gtk::ActionGroup > m_ref_action_group
Glib::RefPtr< Gtk::UIManager > m_ref_ui_manager
Glib::RefPtr< Gtk::ToggleAction > m_ref_action_guide
NewForm m_new_form
 Form asking for a theme that appears when a new track is created.
EditorGuide m_guide
 The bar that displays usage tips.
LightingWindow m_lighting_window
 Extra window for displaying the light settings.
Viewport m_viewport_top
boost::shared_ptr< Track::Themem_theme
boost::shared_ptr< Document::Documentm_document
bool filename_set
 false if the filename has not been picked, true if it has.
std::string filename
 filename for the open document.
std::string theme_filename
 filename for the theme
std::string accel_filename
 Filename for saving customised keyboard accelerators.
bool m_guide_preference

Detailed Description

A big window for editing tracks in.

It creates a top level window, managed by the users Window manager. There is menus, a toolbar, a status bar, and a place to edit the track in the middle.

Definition at line 37 of file EditorWindow.h.

Constructor & Destructor Documentation

EditorWindow::EditorWindow ( bool  show_guide,
std::string  filename = std::string() 

Create and show the editor window.

show_guide True iff the guide should be displayed.
filename The file name of the track to open, or the empty string if none.

Definition at line 31 of file EditorWindow.cpp.

EditorWindow::~EditorWindow (  )  [virtual]

Definition at line 294 of file EditorWindow.cpp.

EditorWindow::EditorWindow ( EditorWindow source  ) 

Copy constructor.

The new window will work on the same document as source, but have a different view of it.

source The window to share with.

Definition at line 265 of file EditorWindow.cpp.

Member Function Documentation

void EditorWindow::assemble_ui (  )  [protected]

Assemble widgets and menu and toolbar items.

make icons for top/front/side

Definition at line 61 of file EditorWindow.cpp.

bool EditorWindow::check_clear_document (  )  [protected]

Check if it is OK to clear the document.

If the document has unsaved changes, this asks the user for the result. If the user agrees but wishes to save first, the document is saved and true is called.

The document is not cleared.
true if the document is cleared, false if you shuoldn't do it.

Definition at line 748 of file EditorWindow.cpp.

void EditorWindow::load_theme ( std::string  filename  )  [protected]

load a theme from a URI

Definition at line 802 of file EditorWindow.cpp.

void EditorWindow::on_action_edit_copy (  )  [protected]

Definition at line 560 of file EditorWindow.cpp.

void EditorWindow::on_action_edit_cut (  )  [protected]

Definition at line 555 of file EditorWindow.cpp.

void EditorWindow::on_action_edit_delete (  )  [protected]

Definition at line 575 of file EditorWindow.cpp.

void EditorWindow::on_action_edit_lighting (  )  [protected]

Definition at line 580 of file EditorWindow.cpp.

void EditorWindow::on_action_edit_paste (  )  [protected]

Definition at line 565 of file EditorWindow.cpp.

void EditorWindow::on_action_edit_redo (  )  [protected]

Definition at line 550 of file EditorWindow.cpp.

void EditorWindow::on_action_edit_select_all (  )  [protected]

Definition at line 570 of file EditorWindow.cpp.

void EditorWindow::on_action_edit_undo (  )  [protected]

Definition at line 545 of file EditorWindow.cpp.

void EditorWindow::on_action_file_new (  )  [protected]

Definition at line 306 of file EditorWindow.cpp.

void EditorWindow::on_action_file_open (  )  [protected]

Definition at line 343 of file EditorWindow.cpp.

void EditorWindow::on_action_file_quit (  )  [protected]

Definition at line 539 of file EditorWindow.cpp.

void EditorWindow::on_action_file_save (  )  [protected]

Definition at line 447 of file EditorWindow.cpp.

void EditorWindow::on_action_file_save_as (  )  [protected]

Definition at line 480 of file EditorWindow.cpp.

void EditorWindow::on_action_file_test (  )  [protected]

Definition at line 498 of file EditorWindow.cpp.

void EditorWindow::on_action_help_about (  )  [protected]

Definition at line 650 of file EditorWindow.cpp.

void EditorWindow::on_action_help_guide (  )  [protected]

Definition at line 623 of file EditorWindow.cpp.

void EditorWindow::on_action_help_wiki (  )  [protected]

Definition at line 629 of file EditorWindow.cpp.

void EditorWindow::on_action_view_front (  )  [protected]

Definition at line 607 of file EditorWindow.cpp.

void EditorWindow::on_action_view_new_window (  )  [protected]

Definition at line 617 of file EditorWindow.cpp.

void EditorWindow::on_action_view_side (  )  [protected]

Definition at line 612 of file EditorWindow.cpp.

void EditorWindow::on_action_view_top (  )  [protected]

Definition at line 602 of file EditorWindow.cpp.

void EditorWindow::on_action_view_zoom_in (  )  [protected]

Definition at line 587 of file EditorWindow.cpp.

void EditorWindow::on_action_view_zoom_out (  )  [protected]

Definition at line 592 of file EditorWindow.cpp.

void EditorWindow::on_action_view_zoom_to_fit (  )  [protected]

Definition at line 597 of file EditorWindow.cpp.

void EditorWindow::on_command_run (  )  [protected]

Update after a change in the document.

Definition at line 709 of file EditorWindow.cpp.

bool EditorWindow::on_delete_event ( GdkEventAny *  event  )  [protected, virtual]

Confirm when closing the window with unsaved changes.

Definition at line 736 of file EditorWindow.cpp.

void EditorWindow::on_lighting_changed (  )  [protected]

Change from m_lighting_window.

Definition at line 698 of file EditorWindow.cpp.

void EditorWindow::on_theme_picked ( std::string  filename  )  [protected]

theme picked

Definition at line 676 of file EditorWindow.cpp.

void EditorWindow::on_view_command ( boost::shared_ptr< Document::DocumentDelta delta  )  [protected]

Change the document using a command generated by a view.

Definition at line 721 of file EditorWindow.cpp.

void EditorWindow::on_view_preview_cancel (  )  [protected]

Reset the document when a previewed command is not wanted.

Definition at line 731 of file EditorWindow.cpp.

void EditorWindow::on_view_preview_command ( boost::shared_ptr< Document::DocumentDelta delta  )  [protected]

Preview a change to the document using a command generated by a view.

Definition at line 726 of file EditorWindow.cpp.

void EditorWindow::open_file ( std::string  filename  )  [protected]

Open a track file.

Definition at line 362 of file EditorWindow.cpp.

void EditorWindow::show_editor (  )  [protected]

show / activate controls for after a theme is picked or file is loaded.

Definition at line 810 of file EditorWindow.cpp.

Member Data Documentation

std::string EditorWindow::accel_filename [protected]

Filename for saving customised keyboard accelerators.

Definition at line 160 of file EditorWindow.h.

std::string EditorWindow::filename [protected]

filename for the open document.

Definition at line 154 of file EditorWindow.h.

bool EditorWindow::filename_set [protected]

false if the filename has not been picked, true if it has.

Definition at line 151 of file EditorWindow.h.

Gtk::VBox EditorWindow::m_box [protected]

main box for menu bar, toolbar, work area, and status bar.

Definition at line 58 of file EditorWindow.h.

boost::shared_ptr<Document::Document> EditorWindow::m_document [protected]

Definition at line 148 of file EditorWindow.h.

EditorGuide EditorWindow::m_guide [protected]

The bar that displays usage tips.

Definition at line 70 of file EditorWindow.h.

bool EditorWindow::m_guide_preference [protected]

Definition at line 162 of file EditorWindow.h.

LightingWindow EditorWindow::m_lighting_window [protected]

Extra window for displaying the light settings.

Definition at line 73 of file EditorWindow.h.

NewForm EditorWindow::m_new_form [protected]

Form asking for a theme that appears when a new track is created.

Definition at line 67 of file EditorWindow.h.

Glib::RefPtr<Gtk::ActionGroup> EditorWindow::m_ref_action_group [protected]

Definition at line 62 of file EditorWindow.h.

Glib::RefPtr<Gtk::ToggleAction> EditorWindow::m_ref_action_guide [protected]

Definition at line 64 of file EditorWindow.h.

Glib::RefPtr<Gtk::UIManager> EditorWindow::m_ref_ui_manager [protected]

Definition at line 63 of file EditorWindow.h.

Gtk::Statusbar EditorWindow::m_status_bar [protected]

status bar

Definition at line 60 of file EditorWindow.h.

boost::shared_ptr<Track::Theme> EditorWindow::m_theme [protected]

Definition at line 147 of file EditorWindow.h.

Viewport EditorWindow::m_viewport_top [protected]

Definition at line 75 of file EditorWindow.h.

std::string EditorWindow::theme_filename [protected]

filename for the theme

Definition at line 157 of file EditorWindow.h.

The documentation for this class was generated from the following files:
Get Racer at SourceForge.net. Fast, secure and Free Open Source software downloads

Generated at Mon Sep 6 00:41:16 2010 by Doxygen version 1.4.7 for Racer version svn335.