Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | Related Pages

ShellWindow Class Reference

The main GTK GUI window. It handles user input, output, command history view, and variables view. More...

Inheritance diagram for ShellWindow:

Inheritance graph
[legend]
Collaboration diagram for ShellWindow:

Collaboration graph
[legend]
List of all members.

Public Member Functions

void UnselectAllCommands ()
 Unselects all commands and shows the lastest used commands.
string GetAndSelectNthCommand (int commandNumber)
 Get an old command from the command history store.

Private Member Functions

internal ShellWindow (Shell shell, GtkGui gtkGui)
void MakeMenu ()
void OnOpenMenu (object sender, EventArgs args)
void OnSaveAsMenu (object sender, EventArgs args)
void OnQuitMenu (object sender, EventArgs args)
void OnPathMenu (object sender, EventArgs args)
void OnSettingsWindowDestroyed (object sender, EventArgs e)
void OnAboutMenu (object sender, EventArgs args)
void AfterRun ()
 Function that is called after the Application.Run() call.
void MakeSourceEditor ()
 Construct the source editor SourceView.
void MakeOutputTextView ()
 Sets an "end"-TextMark and redirects output streams to the outputTextView.
internal void OnOutputEvent ()
internal void OnErrorOutput ()
internal void MakeOutput (ThreadProxy proxy, TextTag tag)
void MakeInfoNotebook ()
 Makes the contents for the info-notebook (tabbed widget).
void RecallWindowSize ()
 Recalls the window size from the Config class and adjustes the position if the window borders is beyond the screen.
void RecallPanes ()
 Recall the pane sizes from the Config class.
void RecallNotebook ()
 Recalls the active page.
void MakeCommandHistory ()
 Makes the columns in the command history tab.
internal void OnCommandAddedEvent ()
internal void OnNewCommandHistoryEvent ()
internal void OnWindowResizeEvent (object o, EventArgs args)
internal void OnVerticalMoveHandleEvent (object o, MoveHandleArgs args)
internal void OnInfoSwitchPageEvent (object o, SwitchPageArgs args)
internal void OnWindowDeleteEvent (object o, DeleteEventArgs args)
internal void Quit ()
 Should be called when we need to exit the application.
internal void OnExecButtonEvent (object o, EventArgs args)
internal void ExecButtonThread ()
internal void ResensitiveExecButton ()
internal void OnCursorChangedEvent (object o, EventArgs args)

Private Attributes

ThreadProxy outputProxy
ThreadProxy errorOutputProxy
Gtk.TextMark endMark
TextTag normalOutputTag
TextTag errorOutputTag
ThreadProxy commandAdded
Gtk.Window shellWindow
SourceEditorWidget commandSourceEditor
Gtk.ScrolledWindow commandScrolledWindow
Gtk.TextView outputTextView
TreeView historyTable
Gtk.Notebook infoNotebook
Gtk.VPaned verticalPane
Gtk.HPaned horizontalPane
Gtk.Button executeButton
Gtk.ImageMenuItem newMenu
Gtk.ImageMenuItem openMenu
Gtk.ImageMenuItem saveMenu
Gtk.ImageMenuItem saveAsMenu
Gtk.MenuItem projectSettingsMenu
Gtk.ImageMenuItem quitMenu
Gtk.ImageMenuItem cutMenu
Gtk.ImageMenuItem copyMenu
Gtk.ImageMenuItem pasteMenu
Gtk.ImageMenuItem deleteMenu
Gtk.MenuItem showGeneratedSourceMenu
Gtk.MenuItem aboutMenu
Window projectSettingsWindow
TreeStore _store
Shell _shell
GtkGui _gtkGui
Pango.FontDescription fontDescription

Detailed Description

The main GTK GUI window. It handles user input, output, command history view, and variables view.

Todo:
Make sure that commandSourceEditor has the focus most of the time. But glade-2 focusTarget and CanFocus properties do not seem to work as I would expect. Also see MakeOutputTextView function for trying to recieve events awhen the outputTextView is focused. But this do not seem to work either.


Constructor & Destructor Documentation

internal ShellWindow::ShellWindow Shell  shell,
GtkGui  gtkGui
[inline, private]
 


Member Function Documentation

void ShellWindow::AfterRun  )  [inline, private]
 

Function that is called after the Application.Run() call.

internal void ShellWindow::ExecButtonThread  )  [inline, private]
 

Todo:
Do not consider what happens if Quit is called while the execbuttonthread are executing.

string ShellWindow::GetAndSelectNthCommand int  commandNumber  )  [inline]
 

Get an old command from the command history store.

Parameters:
commandNumber Which command. 0 = youngest.

Implements CommandHistoryStore.

void ShellWindow::MakeCommandHistory  )  [inline, private]
 

Makes the columns in the command history tab.

void ShellWindow::MakeInfoNotebook  )  [inline, private]
 

Makes the contents for the info-notebook (tabbed widget).

void ShellWindow::MakeMenu  )  [inline, private]
 

Todo:
To do the cut/copy/paste/delete menu, find some suitable example on the internet. Maybe ask GTK-sharp list for info.

internal void ShellWindow::MakeOutput ThreadProxy  proxy,
TextTag  tag
[inline, private]
 

void ShellWindow::MakeOutputTextView  )  [inline, private]
 

Sets an "end"-TextMark and redirects output streams to the outputTextView.

void ShellWindow::MakeSourceEditor  )  [inline, private]
 

Construct the source editor SourceView.

void ShellWindow::OnAboutMenu object  sender,
EventArgs  args
[inline, private]
 

internal void ShellWindow::OnCommandAddedEvent  )  [inline, private]
 

internal void ShellWindow::OnCursorChangedEvent object  o,
EventArgs  args
[inline, private]
 

internal void ShellWindow::OnErrorOutput  )  [inline, private]
 

internal void ShellWindow::OnExecButtonEvent object  o,
EventArgs  args
[inline, private]
 

internal void ShellWindow::OnInfoSwitchPageEvent object  o,
SwitchPageArgs  args
[inline, private]
 

internal void ShellWindow::OnNewCommandHistoryEvent  )  [inline, private]
 

void ShellWindow::OnOpenMenu object  sender,
EventArgs  args
[inline, private]
 

internal void ShellWindow::OnOutputEvent  )  [inline, private]
 

void ShellWindow::OnPathMenu object  sender,
EventArgs  args
[inline, private]
 

void ShellWindow::OnQuitMenu object  sender,
EventArgs  args
[inline, private]
 

void ShellWindow::OnSaveAsMenu object  sender,
EventArgs  args
[inline, private]
 

void ShellWindow::OnSettingsWindowDestroyed object  sender,
EventArgs  e
[inline, private]
 

internal void ShellWindow::OnVerticalMoveHandleEvent object  o,
MoveHandleArgs  args
[inline, private]
 

Todo:
Figure why it do not catch any events.

internal void ShellWindow::OnWindowDeleteEvent object  o,
DeleteEventArgs  args
[inline, private]
 

internal void ShellWindow::OnWindowResizeEvent object  o,
EventArgs  args
[inline, private]
 

Todo:
Figure out why this eventhandler is called so many times. Propably need to email mono-devel list. Have email gtk-sharp devel list.

internal void ShellWindow::Quit  )  [inline, private]
 

Should be called when we need to exit the application.

Todo:
Lines below needs to be removed when we figure out the OnVerticalMoveHandleEvent-stuff.

void ShellWindow::RecallNotebook  )  [inline, private]
 

Recalls the active page.

void ShellWindow::RecallPanes  )  [inline, private]
 

Recall the pane sizes from the Config class.

Todo:
Do not work properly. The problem is that the window resizing does not occur emiediately, so we have to wait for it to occur before we can set the pane position properly. This properly do not happen before Application.Run() are calle.

void ShellWindow::RecallWindowSize  )  [inline, private]
 

Recalls the window size from the Config class and adjustes the position if the window borders is beyond the screen.

internal void ShellWindow::ResensitiveExecButton  )  [inline, private]
 

void ShellWindow::UnselectAllCommands  )  [inline]
 

Unselects all commands and shows the lastest used commands.

Implements CommandHistoryStore.


Member Data Documentation

GtkGui ShellWindow::_gtkGui [private]
 

Shell ShellWindow::_shell [private]
 

TreeStore ShellWindow::_store [private]
 

Gtk.MenuItem ShellWindow::aboutMenu [private]
 

ThreadProxy ShellWindow::commandAdded [private]
 

Gtk.ScrolledWindow ShellWindow::commandScrolledWindow [private]
 

SourceEditorWidget ShellWindow::commandSourceEditor [private]
 

Gtk.ImageMenuItem ShellWindow::copyMenu [private]
 

Gtk.ImageMenuItem ShellWindow::cutMenu [private]
 

Gtk.ImageMenuItem ShellWindow::deleteMenu [private]
 

Gtk.TextMark ShellWindow::endMark [private]
 

ThreadProxy ShellWindow::errorOutputProxy [private]
 

TextTag ShellWindow::errorOutputTag [private]
 

Gtk.Button ShellWindow::executeButton [private]
 

Pango.FontDescription ShellWindow::fontDescription [private]
 

Initial value:

                Pango.FontDescription.FromString("monospace 10")
Todo:
The font used should not be hardcoded.
Todo:
Consider if we should use the same font in all of the application.

TreeView ShellWindow::historyTable [private]
 

Gtk.HPaned ShellWindow::horizontalPane [private]
 

Gtk.Notebook ShellWindow::infoNotebook [private]
 

Gtk.ImageMenuItem ShellWindow::newMenu [private]
 

TextTag ShellWindow::normalOutputTag [private]
 

Gtk.ImageMenuItem ShellWindow::openMenu [private]
 

ThreadProxy ShellWindow::outputProxy [private]
 

Gtk.TextView ShellWindow::outputTextView [private]
 

Gtk.ImageMenuItem ShellWindow::pasteMenu [private]
 

Gtk.MenuItem ShellWindow::projectSettingsMenu [private]
 

Window ShellWindow::projectSettingsWindow [private]
 

Gtk.ImageMenuItem ShellWindow::quitMenu [private]
 

Gtk.ImageMenuItem ShellWindow::saveAsMenu [private]
 

Gtk.ImageMenuItem ShellWindow::saveMenu [private]
 

Gtk.Window ShellWindow::shellWindow [private]
 

Gtk.MenuItem ShellWindow::showGeneratedSourceMenu [private]
 

Gtk.VPaned ShellWindow::verticalPane [private]
 


The documentation for this class was generated from the following file: SourceForge.net Logo