~s-cecilio/lenmus/v5.3

« back to all changes in this revision

Viewing changes to src/app/lenmus_document_canvas.cpp

  • Committer: cecilios
  • Date: 2012-07-05 18:23:21 UTC
  • Revision ID: svn-v4:2587a929-2f0e-0410-ae78-fe6f687d5efe:branches/TRY-5.0:706
fix cmakelist

Show diffs side-by-side

added added

removed removed

Lines of Context:
33
33
//lomse
34
34
#include <lomse_shapes.h>
35
35
#include <lomse_ldp_exporter.h>
36
 
#include <lomse_lmd_exporter.h>
37
36
#include <lomse_score_player.h>
38
37
#include <lomse_midi_table.h>
39
38
#include <lomse_player_gui.h>
118
117
            play_pause();
119
118
            return;
120
119
 
121
 
        case k_stop_playback_event:
122
120
        default:
123
121
            play_stop();
124
122
            return;
137
135
 
138
136
    //initialize with default options
139
137
    bool fVisualTracking = true;
140
 
    long nMM = pPlayerGui->get_metronome_mm();
 
138
    bool fCountOff = false;
 
139
    int playMode = k_play_normal_instrument;
 
140
    long nMM = 60;
 
141
    if (pPlayerGui)
 
142
    {
 
143
        fCountOff = pPlayerGui->get_countoff();
 
144
        playMode = pPlayerGui->get_play_mode();
 
145
        nMM = long( pPlayerGui->get_metronome_mm() );
 
146
    }
141
147
 
142
 
    pPlayer->play(fVisualTracking, nMM, m_pInteractor);
 
148
    pPlayer->play(fVisualTracking, fCountOff, playMode, nMM, m_pInteractor);
143
149
}
144
150
 
145
151
//---------------------------------------------------------------------------------------
298
304
    m_pInteractor->add_event_handler(k_update_window_event, this, wrapper_update_window);
299
305
    m_pInteractor->add_event_handler(k_do_play_score_event, this, wrapper_play_score);
300
306
    m_pInteractor->add_event_handler(k_pause_score_event, this, wrapper_play_score);
301
 
    m_pInteractor->add_event_handler(k_stop_playback_event, this, wrapper_play_score);
302
307
 
303
308
    //set viewport and scale
304
309
    m_fFirstPaint = true;
1149
1154
    dlg.ShowModal();
1150
1155
}
1151
1156
 
1152
 
//---------------------------------------------------------------------------------------
1153
 
void DocumentWindow::debug_display_lmd_source()
1154
 
{
1155
 
    LmdExporter exporter;
1156
 
    exporter.set_score_format(LmdExporter::k_format_lmd);
1157
 
    string source = exporter.get_source( m_pDoc->get_imodoc() );
1158
 
    DlgDebug dlg(this, _T("Generated source code"), to_wx_string(source));
1159
 
    dlg.ShowModal();
1160
 
}
1161
 
 
1162
1157
 
1163
1158
}   //namespace lenmus