MainWindow Class Reference

The main window of gvectors. More...

#include <main.h>

List of all members.

Public Member Functions

 MainWindow ()

Private Member Functions

Glib::ustring tabcounter_str () const
 Returns the tab counter as string.
NTabcreate_new_tab ()
 Creates a new tab.
void setup_window ()
 Setup the main window.
void setup_menu_icons ()
 Setup the menu icons.
void setup_menu ()
 Setup the menu.
void setup_filters ()
 Setup the file filters.
void file_save_dialog (const Glib::ustring &t)
 Create a save dialog.
void menu_save_sensitive (bool yesno)
 Set menu items sensitive/insensitive.
bool close ()
 Close the main window.
bool on_delete_event (GdkEventAny *wdc)
 Gdk delete event handler.
void on_action_file_quit ()
 (Menu action) quit.
void on_action_file_new ()
 (Menu action) new.
void on_action_file_load ()
 (Menu action) file load.
void on_action_file_save ()
 (Menu action) file save.
void on_action_file_save_as ()
 (Menu action) file save as.
void on_action_file_close ()
 (Menu action) close.
void on_action_vectors_new ()
 (Menu action) new vector.
void on_action_vectors_add ()
 (Menu action) add child to a vector.
void on_action_vectors_edit ()
 (Menu action) edit vector.
void on_action_vectors_remove ()
 (Menu action) remove vector.
void on_action_vectors_connecting ()
 (Menu action) connecting two vectors.
void on_action_vectors_middle ()
 (Menu action) middle of two vectors.
void on_action_vectors_cross ()
 (Menu action) create the cross product of two vectors.
void on_action_vectors_invert ()
 (Menu action) invert the vector.
void on_action_help_about ()
 (Menu action) show about dialog.
void on_notebook_switch_page (GtkNotebookPage *page, guint page_num)
 Signal handler invoked when switching notebook pages.
void on_notebook_tab_modified (const NTab &wdc, bool modified)
 Signal handler invoked when modifying tabs.
void set_sensitive_vectors_none_selected ()
 Set sensitivity of menu items if only one tree item is selected.
void set_sensitive_vectors_one_selected ()
 Set sensitivity of menu items if one tree item is selected.
void set_sensitive_vectors_two_selected ()
 Set sensitivity of menu items if two tree items are selected.
void set_sensitive_vectors_several_selected ()
 Set sensitivity of menu items if more than two tree items are selected.
NTabget_current_tab ()
 Returns the tab currently selected.
void show_status (const Glib::ustring &stat)
 Shows the message provided.
void clear_status ()
 Pop all messages from the status bar.

Private Attributes

int tabcounter
 Counts the tab opened.
Gtk::Statusbar statbar
 The status bar.
Gtk::VBox vb
Glib::RefPtr< Gtk::ActionGroup > ac_mainmenu
Glib::RefPtr< Gtk::UIManager > ui_manager
NoteBook nb
 The notebook.
ExtFileFilter filter_xml
 The extended file filter for xml files.
ExtFileFilter filter_binary
 The extended file filter for binary files.


Detailed Description

The main window of gvectors.

This class creates the main window of gvectors.


Constructor & Destructor Documentation

MainWindow::MainWindow (  ) 


Member Function Documentation

Glib::ustring MainWindow::tabcounter_str (  )  const [private]

Returns the tab counter as string.

NTab * MainWindow::create_new_tab (  )  [private]

Creates a new tab.

void MainWindow::setup_window (  )  [private]

Setup the main window.

void MainWindow::setup_menu_icons (  )  [private]

Setup the menu icons.

void MainWindow::setup_menu (  )  [private]

Setup the menu.

void MainWindow::setup_filters (  )  [private]

Setup the file filters.

void MainWindow::file_save_dialog ( const Glib::ustring &  t  )  [private]

Create a save dialog.

void MainWindow::menu_save_sensitive ( bool  yesno  )  [private]

Set menu items sensitive/insensitive.

bool MainWindow::close (  )  [private]

Close the main window.

If modified tabs exist, it prompts the user whether or not he really wants to quit.

Returns:
If the user wants really to quit or no modified tabs exist it returns true. If the user cancels it returns false.

bool MainWindow::on_delete_event ( GdkEventAny *  wdc  )  [private]

Gdk delete event handler.

void MainWindow::on_action_file_quit (  )  [private]

(Menu action) quit.

void MainWindow::on_action_file_new (  )  [private]

(Menu action) new.

void MainWindow::on_action_file_load (  )  [private]

(Menu action) file load.

void MainWindow::on_action_file_save (  )  [private]

(Menu action) file save.

It displays the file save dialog if no filename is set in the VectorTV, else it simply calls NTab::save().

void MainWindow::on_action_file_save_as (  )  [private]

(Menu action) file save as.

void MainWindow::on_action_file_close (  )  [private]

(Menu action) close.

void MainWindow::on_action_vectors_new (  )  [private]

(Menu action) new vector.

void MainWindow::on_action_vectors_add (  )  [private]

(Menu action) add child to a vector.

void MainWindow::on_action_vectors_edit (  )  [private]

(Menu action) edit vector.

void MainWindow::on_action_vectors_remove (  )  [private]

(Menu action) remove vector.

void MainWindow::on_action_vectors_connecting (  )  [private]

(Menu action) connecting two vectors.

void MainWindow::on_action_vectors_middle (  )  [private]

(Menu action) middle of two vectors.

void MainWindow::on_action_vectors_cross (  )  [private]

(Menu action) create the cross product of two vectors.

void MainWindow::on_action_vectors_invert (  )  [private]

(Menu action) invert the vector.

void MainWindow::on_action_help_about (  )  [private]

(Menu action) show about dialog.

void MainWindow::on_notebook_switch_page ( GtkNotebookPage *  page,
guint  page_num 
) [private]

Signal handler invoked when switching notebook pages.

void MainWindow::on_notebook_tab_modified ( const NTab wdc,
bool  modified 
) [private]

Signal handler invoked when modifying tabs.

void MainWindow::set_sensitive_vectors_none_selected (  )  [private]

Set sensitivity of menu items if only one tree item is selected.

void MainWindow::set_sensitive_vectors_one_selected (  )  [private]

Set sensitivity of menu items if one tree item is selected.

void MainWindow::set_sensitive_vectors_two_selected (  )  [private]

Set sensitivity of menu items if two tree items are selected.

void MainWindow::set_sensitive_vectors_several_selected (  )  [private]

Set sensitivity of menu items if more than two tree items are selected.

NTab * MainWindow::get_current_tab (  )  [private]

Returns the tab currently selected.

void MainWindow::show_status ( const Glib::ustring &  stat  )  [private]

Shows the message provided.

Parameters:
stat the message to be displayed in the status bar.

void MainWindow::clear_status (  )  [private]

Pop all messages from the status bar.


Member Data Documentation

int MainWindow::tabcounter [private]

Counts the tab opened.

Counts the tab opened.

Gtk::Statusbar MainWindow::statbar [private]

The status bar.

The status bar.

Gtk::VBox MainWindow::vb [private]

Glib::RefPtr<Gtk::ActionGroup> MainWindow::ac_mainmenu [private]

Glib::RefPtr<Gtk::UIManager> MainWindow::ui_manager [private]

NoteBook MainWindow::nb [private]

The notebook.

The notebook used to provide the "workspace" of gvectors.

ExtFileFilter MainWindow::filter_xml [private]

The extended file filter for xml files.

The extended file filter for xml files (*.xvs).

ExtFileFilter MainWindow::filter_binary [private]

The extended file filter for binary files.

The extended file filter for binary files (*.bvs).


The documentation for this class was generated from the following files:
Generated on Tue Sep 11 01:14:32 2007 for gvectors by  doxygen 1.4.7