Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members

Frame Class Reference

Main window frame class. More...

#include <Frame.h>

List of all members.

Public Member Functions

 Frame (const wxString &title)
 Constructor.

 ~Frame ()
 Destructor.

void OnClose (wxCloseEvent &event)
 Close window event handler.

void OnQuit (wxCommandEvent &WXUNUSED(event))
 'Quit' menu item event handler

void OnAbout (wxCommandEvent &WXUNUSED(event))
 'About' menu item event handler

void OnTips (wxCommandEvent &WXUNUSED(event))
 'Tips of the day' menu item event handler

void OnNew (wxCommandEvent &WXUNUSED(event))
 'New' menu item event handler

void OnOpen (wxCommandEvent &WXUNUSED(event))
 'Open' menu item event handler

void OnSave (wxCommandEvent &WXUNUSED(event))
 'Save' menu item event handler

void OnSaveAs (wxCommandEvent &WXUNUSED(event))
 'Save as' menu item event handler

void OnRevert (wxCommandEvent &WXUNUSED(event))
 'Revert' menu item event handler

void OnRender (wxCommandEvent &WXUNUSED(event))
 'Render' menu item event handler

void OnAdd (wxCommandEvent &WXUNUSED(event))
 'Add' menu item event handler

void OnImport (wxCommandEvent &WXUNUSED(event))
 'Import' menu item event handler

void OnSettings (wxCommandEvent &WXUNUSED(event))
 'Settings' menu item event handler

void OnPlay (wxCommandEvent &WXUNUSED(event))
 Play button click event handler.

void OnPause (wxCommandEvent &WXUNUSED(event))
 Pause button click event handler.

void OnStop (wxCommandEvent &WXUNUSED(event))
 Stop button click event handler.

void OnZoomIn (wxCommandEvent &WXUNUSED(event))
 Zoom In button click event handler.

void OnZoomOut (wxCommandEvent &WXUNUSED(event))
 Zoom Out button click event handler.

bool SaveDlg ()
 Save dialog.

bool SaveAsDlg ()
 Save As dialog.

void OnTimer (wxTimerEvent &event)
 Timer event handler.

void ShowTips (const bool force)
 Show Tip of the day window.

void Update ()
 Trigger update.

enum status_t ChooseLoader (wxFile *file, const wxString &filename, Loader **ld)
 Choose apropriate loader for a file.


Private Member Functions

bool load (const wxString &fname)
 Load project dialog.

bool save (const wxString &fname)
 Save project dialog.


Private Attributes

Areaarea
 Waveform area.

Controlscontrols
 Controls area.

wxTimer * timer
 Redraw timer.

wxSplitterWindow * split
 Area splitter.

wxMenuBar * menuBar
 Main menu.

wxMenu * menuFile
 File menu.

wxMenu * menuEdit
 Edit menu.

wxMenu * menuTracks
 Tracks menu.

wxMenu * menuOptions
 Options menu.

wxMenu * menuHelp
 Help menu.

wxBitmapButton * playBut
 Play button.

wxBitmapButton * pauseBut
 Pause button.

wxBitmapButton * stopBut
 Stop button.

wxBitmapButton * recordBut
 Record button.

wxBitmapButton * zoomInBut
 Zoom In button.

wxBitmapButton * zoomOutBut
 Zoom Out button.

wxToolBar * toolBar
 Window toolbar.


Detailed Description

Main window frame class.

The main application window, handling primarily all user's interaction with the application.


Constructor & Destructor Documentation

Frame::Frame const wxString &  title  ) 
 

Constructor.

Create the application main window.

Parameters:
title Window caption.

Frame::~Frame  ) 
 

Destructor.

Save window position and cleanup.


Member Function Documentation

enum status_t Frame::ChooseLoader wxFile *  file,
const wxString &  filename,
Loader **  ld
 

Choose apropriate loader for a file.

Iterates thought the list of available loaders and picks the first one that recognizes the format of 'file'.

This method has some visual feedback and that's the reason why it is also used by the non-visual ways of choosing loaders.

Parameters:
file File to find a match for.
filename Original filename of the file.
ld Loader matching the file.
Returns:
Status of the match.

bool Frame::load const wxString &  fname  )  [private]
 

Load project dialog.

Checks whether a file given by its filename is a valid project file and then loads the project from it.

Parameters:
fname Filename.

void Frame::OnAbout wxCommandEvent &  WXUNUSED(event)  ) 
 

'About' menu item event handler

Shows the About dialog.

void Frame::OnAdd wxCommandEvent &  WXUNUSED(event)  ) 
 

'Add' menu item event handler

void Frame::OnClose wxCloseEvent &  event  ) 
 

Close window event handler.

Executed when the user wants to close the main application window. Checks and asks for any usaved data to save.

Parameters:
event Event data.

void Frame::OnImport wxCommandEvent &  WXUNUSED(event)  ) 
 

'Import' menu item event handler

Adds a new track (from a wave file) to the project.

void Frame::OnNew wxCommandEvent &  WXUNUSED(event)  ) 
 

'New' menu item event handler

Creates a new empty project and asks for saving any previously unsaved data.

void Frame::OnOpen wxCommandEvent &  WXUNUSED(event)  ) 
 

'Open' menu item event handler

Opens a project from file and asks for saving any previously unsaved data.

void Frame::OnPause wxCommandEvent &  WXUNUSED(event)  ) 
 

Pause button click event handler.

Pauses (or resumes previously paused) playback.

void Frame::OnPlay wxCommandEvent &  WXUNUSED(event)  ) 
 

Play button click event handler.

Starts playback from the beginning of the project.

void Frame::OnQuit wxCommandEvent &  WXUNUSED(event)  ) 
 

'Quit' menu item event handler

Closes the window.

void Frame::OnRender wxCommandEvent &  WXUNUSED(event)  ) 
 

'Render' menu item event handler

void Frame::OnRevert wxCommandEvent &  WXUNUSED(event)  ) 
 

'Revert' menu item event handler

Reverts the current project from last saved file.

void Frame::OnSave wxCommandEvent &  WXUNUSED(event)  ) 
 

'Save' menu item event handler

Saves the current project to file.

void Frame::OnSaveAs wxCommandEvent &  WXUNUSED(event)  ) 
 

'Save as' menu item event handler

Saves the current project to a file with a given name

void Frame::OnSettings wxCommandEvent &  WXUNUSED(event)  ) 
 

'Settings' menu item event handler

Shows the main configuration dialog.

void Frame::OnStop wxCommandEvent &  WXUNUSED(event)  ) 
 

Stop button click event handler.

Stops project playack.

void Frame::OnTimer wxTimerEvent &  event  ) 
 

Timer event handler.

In case the cursor has moved since last redraw, redraw the cursor.

Parameters:
event Event data.

void Frame::OnTips wxCommandEvent &  WXUNUSED(event)  ) 
 

'Tips of the day' menu item event handler

Shows the Tips of the day dialog.

void Frame::OnZoomIn wxCommandEvent &  WXUNUSED(event)  ) 
 

Zoom In button click event handler.

Zooms the waveform visualization in.

void Frame::OnZoomOut wxCommandEvent &  WXUNUSED(event)  ) 
 

Zoom Out button click event handler.

Zooms the waveform visualization out.

bool Frame::save const wxString &  fname  )  [private]
 

Save project dialog.

Creates a file 'fname' and stores the current project to it.

Parameters:
fname Filename.

bool Frame::SaveAsDlg  ) 
 

Save As dialog.

Show the save as dialog and save project.

Returns:
True if saved

bool Frame::SaveDlg  ) 
 

Save dialog.

Show the save dialog and save project.

Returns:
True if saved

void Frame::ShowTips const bool  force  ) 
 

Show Tip of the day window.

Display Tip of the day dialog.

Parameters:
force Display the dialog even if the user previously unchecked to see the tips.

void Frame::Update  ) 
 

Trigger update.

Triggers update to both waveform and controls areas.


Member Data Documentation

Area* Frame::area [private]
 

Waveform area.

Controls* Frame::controls [private]
 

Controls area.

wxMenuBar* Frame::menuBar [private]
 

Main menu.

wxMenu* Frame::menuEdit [private]
 

Edit menu.

wxMenu* Frame::menuFile [private]
 

File menu.

wxMenu* Frame::menuHelp [private]
 

Help menu.

wxMenu* Frame::menuOptions [private]
 

Options menu.

wxMenu* Frame::menuTracks [private]
 

Tracks menu.

wxBitmapButton* Frame::pauseBut [private]
 

Pause button.

wxBitmapButton* Frame::playBut [private]
 

Play button.

wxBitmapButton* Frame::recordBut [private]
 

Record button.

wxSplitterWindow* Frame::split [private]
 

Area splitter.

wxBitmapButton* Frame::stopBut [private]
 

Stop button.

wxTimer* Frame::timer [private]
 

Redraw timer.

wxToolBar* Frame::toolBar [private]
 

Window toolbar.

wxBitmapButton* Frame::zoomInBut [private]
 

Zoom In button.

wxBitmapButton* Frame::zoomOutBut [private]
 

Zoom Out button.


The documentation for this class was generated from the following files:
Generated on Wed Jul 28 17:17:42 2004 for FinalMix by doxygen 1.3.5