Source: midimountain/mvcMain.h


Annotated List
Files
Globals
Hierarchy
Index
//=============================================================================
//  model view control MAIN definition
//=============================================================================
// Author  : Adrian Meyer
// Version : 0.2.1
// Log     :
//=============================================================================
// 09.03.2000 building class
// 20.03.2000 add widget list
// 24.03.2000 change to TMvcBase, help about, file handling
// 26.03.2000 open file, view song properties
// 27.03.2000 added track properties, event list, validate gui
// 29.03.2000 added track selection, apply selection
// 30.03.2000 event list callbacks
// 04.04.2000 event properties
// 09.04.2000 current view added
// 28.08.2000 message hook for midi classes added
// 31.08.2000 title of main window
//            new and save file added
// 01.09.2000 general message queue
// 11.09.2000 marker list added
// 12.09.2000 time signature list added
// 13.09.2000 key signature list added
// 24.11.2000 goto top/end added
// 12.02.2001 start/stop playback
// 15.02.2001 lock for messaging (open files)
// 21.02.2001 adding controller view
// 27.02.2001 dumping language file
// 05.03.2001 adding midi device options
//            adding TMidiIO, TMidiPlayback
// 29.03.2001 build language menu
// 03.04.2001 translate GUI
// 20.07.2001 adding midi mapper
//============================================================================
// to do   :
//=============================================================================
#include <gtk/gtk.h>
#include <iostream.h>
#include <stdio.h>
#include <string.h>
#include <stlini.h>

#include "glade_interface.h"
#include "glade_support.h"

#include <mvcBase.h>
#include <mvcMainView.h>
#include <mvcMessageBox.h>
#include <mvcSongProperties.h>
#include <mvcTrackProperties.h>
#include <mvcEventProperties.h>
#include <mvcEventList.h>
#include <mvcMarkerList.h>
#include <mvcTimeSignatureList.h>
#include <mvcKeySignatureList.h>
#include <mvcPianoRoll.h>
#include <mvcSetupMidiDevices.h>

#include <mcSequence.h>
#include <mcIO.h>
#include <mcPlayback.h>
#include <mcMapper.h>
#include <mcStatics.h>

#ifndef __MVCMAIN__
#define __MVCMAIN__
class TMvcMain: public TMvcBase
{
  private:
		INIFile fConfFile;                                // conf file for midi mountain
    GSList *fLanguageMenuList;										  	// group for languages

    GtkWidget* wndMain;                               // main window
    int fCurrentView;                                 // current notebook view
    TMidiSequence* fSequence;                         // midi sequence
    TMidiIO* fIO;                                     // midi IO
    TMidiPlayback* fPlayback;                         // midi playback
    TMidiMapper* fMapper;															// midi mapper

    bool fTrackListFlag;                              // react to changes in tracklist
    bool fSequenceFlag;                               // react to changes in sequence
    bool fMessageLock;                                // lock for messaging

    int fLastTrack;                                   // last edited track id
    GtkWidget *fFileDialog;                           // file dialog

  public:
    TMvcMain( char* aWorkPath );
    ~TMvcMain( void );

    TMvcMainView* fMainView;                          // main view
    TMvcMessageBox* msg;                              // message box
    TMvcSongProperties* fSongProperties;              // song properties
    TMvcTrackProperties* fTrackProperties;            // track properties
    TMvcEventList* fEventList;                        // event list control
    TMvcMarkerList* fMarkerList;                      // marker list control
    TMvcTimeSignatureList* fTimeSignatureList;        // time signature list control
    TMvcKeySignatureList* fKeySignatureList;          // key signature list control
    TMvcPianoRoll* fPianoRoll;                        // piano roll
    TMvcSetupMidiDevices* fSetupMidiDevices;          // midi deviceptions

    TMidiEvent* GetSelectedEvent( void );             // read first selected event

    void SetTitle( void );                            // set title of window

    TMidiSequence* GetSequence( void );               // read sequence
    TMidiIO* GetIO( void );                           // read IO
    TMidiMapper* GetMapper( void );                   // read device mapper

    void NewFile( void );                             // new file
    void OpenFile( char* aFileName );                 // open a file
    void SaveFile( char* aFileName );                 // save a file

    void AddTrack( void );                            // add new track
    void DeleteTrack( void );                         // delete track

    void SetData( void );                             // set data to gui
    void ValidateGui( void );                         // validate gui
    GtkWidget* GetWidget( void );                     // read main widget

    int GetCurrentView( void );                       // write view
    void SetCurrentView( int aView );                 // read view

    void SetLastTrack( int aLastTrack );              // set last touched track
    int GetLastTrack( void );                         // read last touched track

    void MCMessage( TMidiBase* aMidiBase, sMCMessage* aMCMessage );

    GtkWidget* GetFileDialog( void );                 // read file dialog

    void Resize( void );                              // resize main window
    void Play( GtkWidget* tmpWidget );                // start or stop playback
	  long GetPlayPosition( void );                     // read play position
    void PlayTimer( void );                           // play timer called

    void DumpLanguage( char* aFileName );             // dump language file
		void BuildLanguageMenu( void );                   // build language menu
    void SetLanguage( char* aLanguageFileName );      // set other language
};
#endif

Generated by: root@castle on Fri Jul 20 00:33:17 2001, using kdoc 2.0a36.