You can subscribe to this list here.
| 2008 |
Jan
|
Feb
|
Mar
(58) |
Apr
(100) |
May
(92) |
Jun
(12) |
Jul
|
Aug
|
Sep
(5) |
Oct
(1) |
Nov
(26) |
Dec
(29) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2009 |
Jan
(31) |
Feb
(20) |
Mar
(1) |
Apr
|
May
(5) |
Jun
(10) |
Jul
|
Aug
(2) |
Sep
|
Oct
(2) |
Nov
|
Dec
(1) |
| 2010 |
Jan
(1) |
Feb
(1) |
Mar
|
Apr
(36) |
May
(10) |
Jun
|
Jul
(38) |
Aug
(2) |
Sep
|
Oct
|
Nov
|
Dec
|
| 2011 |
Jan
|
Feb
(6) |
Mar
(8) |
Apr
|
May
|
Jun
|
Jul
(14) |
Aug
(56) |
Sep
|
Oct
|
Nov
|
Dec
|
| 2012 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(13) |
Dec
(2) |
| 2013 |
Jan
(30) |
Feb
|
Mar
(43) |
Apr
(28) |
May
|
Jun
|
Jul
(2) |
Aug
|
Sep
|
Oct
(10) |
Nov
(2) |
Dec
|
| 2014 |
Jan
|
Feb
(2) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: <pst...@us...> - 2013-03-20 16:01:51
|
Revision: 993
http://sourceforge.net/p/jazzplusplus/code/993
Author: pstieber
Date: 2013-03-20 16:01:48 +0000 (Wed, 20 Mar 2013)
Log Message:
-----------
1. Wrapped a line longer than 80 columns.
2. Translated a comment.
Modified Paths:
--------------
trunk/jazz/src/ControlEdit.cpp
Modified: trunk/jazz/src/ControlEdit.cpp
===================================================================
--- trunk/jazz/src/ControlEdit.cpp 2013-03-20 15:59:26 UTC (rev 992)
+++ trunk/jazz/src/ControlEdit.cpp 2013-03-20 16:01:48 UTC (rev 993)
@@ -74,7 +74,8 @@
//(void) new wxMessage(panel, (char *)label);
//panel->NewLine();
- // PORTING: changed the calls a bit so it would compile, need to remake the layout and do the event bindings
+ // PORTING: changed the calls a bit so it would compile,
+ // need to remake the layout and do the event bindings
ctrlmode = 0; // Edit seems stupid to me.
@@ -97,8 +98,7 @@
//(void)new wxButton(panel, (wxFunction)Bars, "Bars");
}
ctrlmode = 0;
- // ab hier dient ctrlmode zur Unterscheidung zwischen
- // Apply und Edit.
+ // ctrlmode is used to distinguish between Apply and Edit.
edit = new JZArrayEdit((wxFrame *)mpPianoWindow, array, x+dx, y, w - dx, h, 0);
edit->SetLabel(label);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <pst...@us...> - 2013-03-20 15:59:29
|
Revision: 992
http://sourceforge.net/p/jazzplusplus/code/992
Author: pstieber
Date: 2013-03-20 15:59:26 +0000 (Wed, 20 Mar 2013)
Log Message:
-----------
Updated help usage.
Modified Paths:
--------------
trunk/jazz/src/Audio.cpp
trunk/jazz/src/Dialogs/CleanupDialog.cpp
trunk/jazz/src/Dialogs/DeleteDialog.cpp
trunk/jazz/src/Dialogs/EndOfTrackDialog.cpp
trunk/jazz/src/Dialogs/LengthDialog.cpp
trunk/jazz/src/Dialogs/MeterChangeDialog.cpp
trunk/jazz/src/Dialogs/MidiChannelDialog.cpp
trunk/jazz/src/Dialogs/PitchWheelDialog.cpp
trunk/jazz/src/Dialogs/QuantizeDialog.cpp
trunk/jazz/src/Dialogs/SearchAndReplaceDialog.cpp
trunk/jazz/src/Dialogs/SetTempoDialog.cpp
trunk/jazz/src/Dialogs/SnapDialog.cpp
trunk/jazz/src/Dialogs/SysexDialog.cpp
trunk/jazz/src/Dialogs/TextDialog.cpp
trunk/jazz/src/Dialogs/TransposeDialog.cpp
trunk/jazz/src/Dialogs/VelocityDialog.cpp
trunk/jazz/src/Dialogs.cpp
trunk/jazz/src/Harmony.cpp
trunk/jazz/src/PianoFrame.cpp
trunk/jazz/src/PianoWindow.cpp
trunk/jazz/src/SampleDialog.cpp
trunk/jazz/src/SampleFrame.cpp
trunk/jazz/src/SampleWindow.cpp
trunk/jazz/src/Track.cpp
trunk/jazz/src/TrackFrame.cpp
Modified: trunk/jazz/src/Audio.cpp
===================================================================
--- trunk/jazz/src/Audio.cpp 2013-03-20 15:56:17 UTC (rev 991)
+++ trunk/jazz/src/Audio.cpp 2013-03-20 15:59:26 UTC (rev 992)
@@ -762,7 +762,7 @@
void OnHelp()
{
- gpHelpInstance->ShowTopic("Global Settings");
+ JZHelp::Instance().ShowTopic("Global Settings");
}
void OnOk()
@@ -1341,7 +1341,7 @@
//-----------------------------------------------------------------------------
void JZSamplesDlg::OnHelpButton()
{
- gpHelpInstance->ShowTopic("Sample Settings");
+ JZHelp::Instance().ShowTopic("Sample Settings");
}
//-----------------------------------------------------------------------------
Modified: trunk/jazz/src/Dialogs/CleanupDialog.cpp
===================================================================
--- trunk/jazz/src/Dialogs/CleanupDialog.cpp 2013-03-20 15:56:17 UTC (rev 991)
+++ trunk/jazz/src/Dialogs/CleanupDialog.cpp 2013-03-20 15:59:26 UTC (rev 992)
@@ -152,5 +152,5 @@
//-----------------------------------------------------------------------------
void JZCleanupDialog::OnHelp(wxCommandEvent& Event)
{
- gpHelpInstance->ShowTopic("Cleanup");
+ JZHelp::Instance().ShowTopic("Cleanup");
}
Modified: trunk/jazz/src/Dialogs/DeleteDialog.cpp
===================================================================
--- trunk/jazz/src/Dialogs/DeleteDialog.cpp 2013-03-20 15:56:17 UTC (rev 991)
+++ trunk/jazz/src/Dialogs/DeleteDialog.cpp 2013-03-20 15:59:26 UTC (rev 992)
@@ -89,5 +89,5 @@
//-----------------------------------------------------------------------------
void JZDeleteDialog::OnHelp(wxCommandEvent& Event)
{
- gpHelpInstance->ShowTopic("Delete");
+ JZHelp::Instance().ShowTopic("Delete");
}
Modified: trunk/jazz/src/Dialogs/EndOfTrackDialog.cpp
===================================================================
--- trunk/jazz/src/Dialogs/EndOfTrackDialog.cpp 2013-03-20 15:56:17 UTC (rev 991)
+++ trunk/jazz/src/Dialogs/EndOfTrackDialog.cpp 2013-03-20 15:59:26 UTC (rev 992)
@@ -114,5 +114,5 @@
//-----------------------------------------------------------------------------
void JZEndOfTrackDialog::OnHelp(wxCommandEvent& Event)
{
- gpHelpInstance->ShowTopic("Template");
+ JZHelp::Instance().ShowTopic("Template");
}
Modified: trunk/jazz/src/Dialogs/LengthDialog.cpp
===================================================================
--- trunk/jazz/src/Dialogs/LengthDialog.cpp 2013-03-20 15:56:17 UTC (rev 991)
+++ trunk/jazz/src/Dialogs/LengthDialog.cpp 2013-03-20 15:59:26 UTC (rev 992)
@@ -246,5 +246,5 @@
//-----------------------------------------------------------------------------
void JZLengthDialog::OnHelp(wxCommandEvent& Event)
{
- gpHelpInstance->ShowTopic("Length");
+ JZHelp::Instance().ShowTopic("Length");
}
Modified: trunk/jazz/src/Dialogs/MeterChangeDialog.cpp
===================================================================
--- trunk/jazz/src/Dialogs/MeterChangeDialog.cpp 2013-03-20 15:56:17 UTC (rev 991)
+++ trunk/jazz/src/Dialogs/MeterChangeDialog.cpp 2013-03-20 15:59:26 UTC (rev 992)
@@ -78,5 +78,5 @@
//-----------------------------------------------------------------------------
void JZMeterChangeDialog::OnHelp(wxCommandEvent& Event)
{
- gpHelpInstance->ShowTopic("Meterchange");
+ JZHelp::Instance().ShowTopic("Meterchange");
}
Modified: trunk/jazz/src/Dialogs/MidiChannelDialog.cpp
===================================================================
--- trunk/jazz/src/Dialogs/MidiChannelDialog.cpp 2013-03-20 15:56:17 UTC (rev 991)
+++ trunk/jazz/src/Dialogs/MidiChannelDialog.cpp 2013-03-20 15:59:26 UTC (rev 992)
@@ -135,5 +135,5 @@
//-----------------------------------------------------------------------------
void JZMidiChannelDialog::OnHelp(wxCommandEvent& Event)
{
- gpHelpInstance->ShowTopic("Set MIDI Channel");
+ JZHelp::Instance().ShowTopic("Set MIDI Channel");
}
Modified: trunk/jazz/src/Dialogs/PitchWheelDialog.cpp
===================================================================
--- trunk/jazz/src/Dialogs/PitchWheelDialog.cpp 2013-03-20 15:56:17 UTC (rev 991)
+++ trunk/jazz/src/Dialogs/PitchWheelDialog.cpp 2013-03-20 15:59:26 UTC (rev 992)
@@ -83,5 +83,5 @@
//-----------------------------------------------------------------------------
void JZPitchWheelDialog::OnHelp(wxCommandEvent& Event)
{
- gpHelpInstance->ShowTopic("Pitch Wheel Dialog");
+ JZHelp::Instance().ShowTopic("Pitch Wheel Dialog");
}
Modified: trunk/jazz/src/Dialogs/QuantizeDialog.cpp
===================================================================
--- trunk/jazz/src/Dialogs/QuantizeDialog.cpp 2013-03-20 15:56:17 UTC (rev 991)
+++ trunk/jazz/src/Dialogs/QuantizeDialog.cpp 2013-03-20 15:59:26 UTC (rev 992)
@@ -230,5 +230,5 @@
//-----------------------------------------------------------------------------
void JZQuantizeDialog::OnHelp(wxCommandEvent& Event)
{
- gpHelpInstance->ShowTopic("Quantize");
+ JZHelp::Instance().ShowTopic("Quantize");
}
Modified: trunk/jazz/src/Dialogs/SearchAndReplaceDialog.cpp
===================================================================
--- trunk/jazz/src/Dialogs/SearchAndReplaceDialog.cpp 2013-03-20 15:56:17 UTC (rev 991)
+++ trunk/jazz/src/Dialogs/SearchAndReplaceDialog.cpp 2013-03-20 15:59:26 UTC (rev 992)
@@ -129,5 +129,5 @@
//-----------------------------------------------------------------------------
void JZSearchAndReplaceDialog::OnHelp(wxCommandEvent& Event)
{
- gpHelpInstance->ShowTopic("Search Replace");
+ JZHelp::Instance().ShowTopic("Search Replace");
}
Modified: trunk/jazz/src/Dialogs/SetTempoDialog.cpp
===================================================================
--- trunk/jazz/src/Dialogs/SetTempoDialog.cpp 2013-03-20 15:56:17 UTC (rev 991)
+++ trunk/jazz/src/Dialogs/SetTempoDialog.cpp 2013-03-20 15:59:26 UTC (rev 992)
@@ -139,5 +139,5 @@
//-----------------------------------------------------------------------------
void JZSetTempoDialog::OnHelp(wxCommandEvent& Event)
{
- gpHelpInstance->ShowTopic("Set Tempo Dialog");
+ JZHelp::Instance().ShowTopic("Set Tempo Dialog");
}
Modified: trunk/jazz/src/Dialogs/SnapDialog.cpp
===================================================================
--- trunk/jazz/src/Dialogs/SnapDialog.cpp 2013-03-20 15:56:17 UTC (rev 991)
+++ trunk/jazz/src/Dialogs/SnapDialog.cpp 2013-03-20 15:59:26 UTC (rev 992)
@@ -131,5 +131,5 @@
//-----------------------------------------------------------------------------
void JZSnapDialog::OnHelp(wxCommandEvent& Event)
{
- gpHelpInstance->ShowTopic("Snap");
+ JZHelp::Instance().ShowTopic("Snap");
}
Modified: trunk/jazz/src/Dialogs/SysexDialog.cpp
===================================================================
--- trunk/jazz/src/Dialogs/SysexDialog.cpp 2013-03-20 15:56:17 UTC (rev 991)
+++ trunk/jazz/src/Dialogs/SysexDialog.cpp 2013-03-20 15:59:26 UTC (rev 992)
@@ -205,5 +205,5 @@
//-----------------------------------------------------------------------------
void JZSysexDialog::OnHelp(wxCommandEvent& Event)
{
- gpHelpInstance->ShowTopic("Sysex Dialog");
+ JZHelp::Instance().ShowTopic("Sysex Dialog");
}
Modified: trunk/jazz/src/Dialogs/TextDialog.cpp
===================================================================
--- trunk/jazz/src/Dialogs/TextDialog.cpp 2013-03-20 15:56:17 UTC (rev 991)
+++ trunk/jazz/src/Dialogs/TextDialog.cpp 2013-03-20 15:59:26 UTC (rev 992)
@@ -130,5 +130,5 @@
//-----------------------------------------------------------------------------
void JZTextDialog::OnHelp(wxCommandEvent& Event)
{
- gpHelpInstance->ShowTopic("Text Dialog");
+ JZHelp::Instance().ShowTopic("Text Dialog");
}
Modified: trunk/jazz/src/Dialogs/TransposeDialog.cpp
===================================================================
--- trunk/jazz/src/Dialogs/TransposeDialog.cpp 2013-03-20 15:56:17 UTC (rev 991)
+++ trunk/jazz/src/Dialogs/TransposeDialog.cpp 2013-03-20 15:59:26 UTC (rev 992)
@@ -171,5 +171,5 @@
//-----------------------------------------------------------------------------
void JZTransposeDialog::OnHelp(wxCommandEvent& Event)
{
- gpHelpInstance->ShowTopic("Transpose");
+ JZHelp::Instance().ShowTopic("Transpose");
}
Modified: trunk/jazz/src/Dialogs/VelocityDialog.cpp
===================================================================
--- trunk/jazz/src/Dialogs/VelocityDialog.cpp 2013-03-20 15:56:17 UTC (rev 991)
+++ trunk/jazz/src/Dialogs/VelocityDialog.cpp 2013-03-20 15:59:26 UTC (rev 992)
@@ -225,5 +225,5 @@
//-----------------------------------------------------------------------------
void JZVelocityDialog::OnHelp(wxCommandEvent& Event)
{
- gpHelpInstance->ShowTopic("Velocity");
+ JZHelp::Instance().ShowTopic("Velocity");
}
Modified: trunk/jazz/src/Dialogs.cpp
===================================================================
--- trunk/jazz/src/Dialogs.cpp 2013-03-20 15:56:17 UTC (rev 991)
+++ trunk/jazz/src/Dialogs.cpp 2013-03-20 15:59:26 UTC (rev 992)
@@ -87,7 +87,7 @@
//-----------------------------------------------------------------------------
//void JZShiftDlg::OnHelp()
//{
-// gpHelpInstance->ShowTopic("Shift");
+// JZHelp::Instance().ShowTopic("Shift");
//}
//-----------------------------------------------------------------------------
@@ -180,7 +180,7 @@
void JZSeqLengthDlg::OnHelp()
{
- gpHelpInstance->ShowTopic("SeqLength");
+ JZHelp::Instance().ShowTopic("SeqLength");
}
@@ -224,7 +224,7 @@
void JZMidiDelayDlg::OnHelp()
{
- gpHelpInstance->ShowTopic("MidiDelay");
+ JZHelp::Instance().ShowTopic("MidiDelay");
}
@@ -310,7 +310,7 @@
//void JZEventDlg::OnHelp()
//{
-// gpHelpInstance->ShowTopic("Piano Window");
+// JZHelp::Instance().ShowTopic("Piano Window");
//}
// -------------------------------- Play track ---------------------------
Modified: trunk/jazz/src/Harmony.cpp
===================================================================
--- trunk/jazz/src/Harmony.cpp 2013-03-20 15:56:17 UTC (rev 991)
+++ trunk/jazz/src/Harmony.cpp 2013-03-20 15:59:26 UTC (rev 992)
@@ -387,7 +387,7 @@
}
void OnHelp()
{
- gpHelpInstance->ShowTopic("Harmony browser");
+ JZHelp::Instance().ShowTopic("Harmony browser");
}
};
#endif
@@ -1889,7 +1889,7 @@
void JZHarmonyBrowserContextDlg::OnHelp()
{
- gpHelpInstance->ShowTopic("Edit chord");
+ JZHelp::Instance().ShowTopic("Edit chord");
}
@@ -2380,7 +2380,7 @@
//-----------------------------------------------------------------------------
void JZHarmonyBrowserFrame::OnHelp(wxCommandEvent& Event)
{
-// gpHelpInstance->ShowTopic("Harmony browser");
+ JZHelp::Instance().ShowTopic("Harmony browser");
}
//-----------------------------------------------------------------------------
Modified: trunk/jazz/src/PianoFrame.cpp
===================================================================
--- trunk/jazz/src/PianoFrame.cpp 2013-03-20 15:56:17 UTC (rev 991)
+++ trunk/jazz/src/PianoFrame.cpp 2013-03-20 15:59:26 UTC (rev 992)
@@ -581,7 +581,7 @@
void JZVisibleDlg::OnHelp()
{
- gpHelpInstance->ShowTopic("Events");
+ JZHelp::Instance().ShowTopic("Events");
}
Modified: trunk/jazz/src/PianoWindow.cpp
===================================================================
--- trunk/jazz/src/PianoWindow.cpp 2013-03-20 15:56:17 UTC (rev 991)
+++ trunk/jazz/src/PianoWindow.cpp 2013-03-20 15:59:26 UTC (rev 992)
@@ -1171,7 +1171,7 @@
switch (Id)
{
case ID_HELP_PIANO_WINDOW:
- gpHelpInstance->ShowTopic("Piano Window");
+ JZHelp::Instance().ShowTopic("Piano Window");
break;
}
}
Modified: trunk/jazz/src/SampleDialog.cpp
===================================================================
--- trunk/jazz/src/SampleDialog.cpp 2013-03-20 15:56:17 UTC (rev 991)
+++ trunk/jazz/src/SampleDialog.cpp 2013-03-20 15:59:26 UTC (rev 992)
@@ -671,8 +671,8 @@
break;
case SYN_HELP:
- gpHelpInstance->ShowTopic("{Additive Synthesis");
- break;
+ JZHelp::Instance().ShowTopic("{Additive Synthesis");
+ break;
}
}
@@ -921,7 +921,7 @@
void JZReverbForm::OnHelp()
{
- gpHelpInstance->ShowTopic("Reverb");
+ JZHelp::Instance().ShowTopic("Reverb");
}
@@ -1038,7 +1038,7 @@
void JZShifterForm::OnHelp()
{
- gpHelpInstance->ShowTopic("Pitch shifter");
+ JZHelp::Instance().ShowTopic("Pitch shifter");
}
@@ -1149,7 +1149,7 @@
void JZSplFilterForm::OnHelp()
{
- gpHelpInstance->ShowTopic("Filter");
+ JZHelp::Instance().ShowTopic("Filter");
}
@@ -1259,7 +1259,7 @@
void JZWahSettingsForm::OnHelp()
{
- gpHelpInstance->ShowTopic("Settings");
+ JZHelp::Instance().ShowTopic("Settings");
}
void JZWahSettingsForm::OnOk()
@@ -1307,7 +1307,7 @@
void JZSplPitchForm::OnHelp()
{
- gpHelpInstance->ShowTopic("Settings");
+ JZHelp::Instance().ShowTopic("Settings");
}
@@ -1390,7 +1390,7 @@
void JZChorusForm::OnHelp()
{
- gpHelpInstance->ShowTopic("Chorus");
+ JZHelp::Instance().ShowTopic("Chorus");
}
// -----------------------------------------------------------------------
@@ -1473,7 +1473,7 @@
void JZStretcherForm::OnHelp()
{
- gpHelpInstance->ShowTopic("Time Stretcher");
+ JZHelp::Instance().ShowTopic("Time Stretcher");
}
Modified: trunk/jazz/src/SampleFrame.cpp
===================================================================
--- trunk/jazz/src/SampleFrame.cpp 2013-03-20 15:56:17 UTC (rev 991)
+++ trunk/jazz/src/SampleFrame.cpp 2013-03-20 15:59:26 UTC (rev 992)
@@ -782,9 +782,9 @@
}
break;
- case MEN_HELP:
- gpHelpInstance->ShowTopic("Sample Editor");
- break;
+ case MEN_HELP:
+ JZHelp::Instance().ShowTopic("Sample Editor");
+ break;
default:
break;
Modified: trunk/jazz/src/SampleWindow.cpp
===================================================================
--- trunk/jazz/src/SampleWindow.cpp 2013-03-20 15:56:17 UTC (rev 991)
+++ trunk/jazz/src/SampleWindow.cpp 2013-03-20 15:59:26 UTC (rev 992)
@@ -136,7 +136,7 @@
}
void OnHelp()
{
- gpHelpInstance->ShowTopic("Settings");
+ JZHelp::Instance().ShowTopic("Settings");
}
private:
JZSampleFrame& mpSampleFrame;
@@ -521,5 +521,3 @@
playpos->StartListen(fr_smpl, to_smpl);
}
}
-
-
Modified: trunk/jazz/src/Track.cpp
===================================================================
--- trunk/jazz/src/Track.cpp 2013-03-20 15:56:17 UTC (rev 991)
+++ trunk/jazz/src/Track.cpp 2013-03-20 15:59:26 UTC (rev 992)
@@ -1670,7 +1670,7 @@
void JZTrackDlg::OnHelp()
{
- gpHelpInstance->ShowTopic("Trackname, midi channel etc");
+ JZHelp::Instance().ShowTopic("Trackname, midi channel etc");
}
void JZTrackDlg::OnOk()
Modified: trunk/jazz/src/TrackFrame.cpp
===================================================================
--- trunk/jazz/src/TrackFrame.cpp 2013-03-20 15:56:17 UTC (rev 991)
+++ trunk/jazz/src/TrackFrame.cpp 2013-03-20 15:59:26 UTC (rev 992)
@@ -28,6 +28,7 @@
#include "Dialogs/SynthesizerSettingsDialog.h"
#include "Globals.h"
#include "Harmony.h"
+#include "Help.h"
#include "JazzPlusPlusApplication.h"
#include "Player.h"
#include "Project.h"
@@ -814,7 +815,7 @@
//-----------------------------------------------------------------------------
void JZTrackFrame::OnHelpContents(wxCommandEvent& Event)
{
- ::wxGetApp().DisplayHelpContents();
+ JZHelp::Instance().DisplayHelpContents();
}
//-----------------------------------------------------------------------------
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <pst...@us...> - 2013-03-20 15:56:20
|
Revision: 991
http://sourceforge.net/p/jazzplusplus/code/991
Author: pstieber
Date: 2013-03-20 15:56:17 +0000 (Wed, 20 Mar 2013)
Log Message:
-----------
Updated help and enabled its use.
Modified Paths:
--------------
trunk/jazz/src/Dialogs/FilterDialog.cpp
trunk/jazz/src/Dialogs/KeyOnDialog.cpp
trunk/jazz/src/Dialogs/MetronomeSettingsDialog.cpp
trunk/jazz/src/Dialogs/ShiftDialog.cpp
trunk/jazz/src/Dialogs/SynthesizerSettingsDialog.cpp
trunk/jazz/src/Dialogs/TrackDialog.cpp
trunk/jazz/src/GuitarFrame.cpp
Modified: trunk/jazz/src/Dialogs/FilterDialog.cpp
===================================================================
--- trunk/jazz/src/Dialogs/FilterDialog.cpp 2013-03-20 15:46:01 UTC (rev 990)
+++ trunk/jazz/src/Dialogs/FilterDialog.cpp 2013-03-20 15:56:17 UTC (rev 991)
@@ -21,6 +21,7 @@
#include "FilterDialog.h"
#include "../Filter.h"
+#include "../Help.h"
#include "IntegerEdit.h"
#include <wx/button.h>
@@ -533,5 +534,5 @@
//-----------------------------------------------------------------------------
void JZFilterDialog::OnHelp(wxCommandEvent& Event)
{
-// gpHelpInstance->ShowTopic("Filter Dialog");
+ JZHelp::Instance().ShowTopic("Filter Dialog");
}
Modified: trunk/jazz/src/Dialogs/KeyOnDialog.cpp
===================================================================
--- trunk/jazz/src/Dialogs/KeyOnDialog.cpp 2013-03-20 15:46:01 UTC (rev 990)
+++ trunk/jazz/src/Dialogs/KeyOnDialog.cpp 2013-03-20 15:56:17 UTC (rev 991)
@@ -22,6 +22,7 @@
#include "../Events.h"
#include "../Globals.h"
+#include "../Help.h"
#include "../KeyStringConverters.h"
#include "../Knob.h"
#include "../Project.h"
@@ -277,5 +278,5 @@
//-----------------------------------------------------------------------------
void JZKeyOnDialog::OnHelp(wxCommandEvent& Event)
{
-// gpHelpInstance->ShowTopic("Key On Dialog");
+ JZHelp::Instance().ShowTopic("Key On Dialog");
}
Modified: trunk/jazz/src/Dialogs/MetronomeSettingsDialog.cpp
===================================================================
--- trunk/jazz/src/Dialogs/MetronomeSettingsDialog.cpp 2013-03-20 15:46:01 UTC (rev 990)
+++ trunk/jazz/src/Dialogs/MetronomeSettingsDialog.cpp 2013-03-20 15:56:17 UTC (rev 991)
@@ -22,6 +22,7 @@
#include "../Configuration.h"
#include "../Globals.h"
+#include "../Help.h"
#include "../Knob.h"
#include "../Metronome.h"
#include "../Resources.h"
@@ -264,5 +265,5 @@
//-----------------------------------------------------------------------------
void JZMetronomeSettingsDialog::OnHelp(wxCommandEvent& Event)
{
-// gpHelpInstance->ShowTopic("Metronome Settings");
+ JZHelp::Instance().ShowTopic("Metronome Settings");
}
Modified: trunk/jazz/src/Dialogs/ShiftDialog.cpp
===================================================================
--- trunk/jazz/src/Dialogs/ShiftDialog.cpp 2013-03-20 15:46:01 UTC (rev 990)
+++ trunk/jazz/src/Dialogs/ShiftDialog.cpp 2013-03-20 15:56:17 UTC (rev 991)
@@ -22,6 +22,7 @@
#include "../Command.h"
#include "../Filter.h"
+#include "../Help.h"
#include "../ProjectManager.h"
#include <wx/button.h>
@@ -124,5 +125,5 @@
//-----------------------------------------------------------------------------
void JZShiftDialog::OnHelp(wxCommandEvent& Event)
{
-// gpHelpInstance->ShowTopic("Shift Dialog");
+ JZHelp::Instance().ShowTopic("Shift Dialog");
}
Modified: trunk/jazz/src/Dialogs/SynthesizerSettingsDialog.cpp
===================================================================
--- trunk/jazz/src/Dialogs/SynthesizerSettingsDialog.cpp 2013-03-20 15:46:01 UTC (rev 990)
+++ trunk/jazz/src/Dialogs/SynthesizerSettingsDialog.cpp 2013-03-20 15:56:17 UTC (rev 991)
@@ -22,6 +22,7 @@
#include "../Configuration.h"
#include "../Globals.h"
+#include "../Help.h"
#include <wx/button.h>
#include <wx/listbox.h>
@@ -167,5 +168,5 @@
//-----------------------------------------------------------------------------
void JZSynthesizerDialog::OnHelp(wxCommandEvent& Event)
{
-// gpHelpInstance->ShowTopic("Synthesizer Type Settings");
+ JZHelp::Instance().ShowTopic("Synthesizer Type Settings");
}
Modified: trunk/jazz/src/Dialogs/TrackDialog.cpp
===================================================================
--- trunk/jazz/src/Dialogs/TrackDialog.cpp 2013-03-20 15:46:01 UTC (rev 990)
+++ trunk/jazz/src/Dialogs/TrackDialog.cpp 2013-03-20 15:56:17 UTC (rev 991)
@@ -22,6 +22,7 @@
#include "../Configuration.h"
#include "../Globals.h"
+#include "../Help.h"
#include "../Knob.h"
#include "../Resources.h"
#include "../Track.h"
@@ -232,5 +233,5 @@
//-----------------------------------------------------------------------------
void JZTrackDialog::OnHelp(wxCommandEvent& Event)
{
-// gpHelpInstance->ShowTopic("Track Dialog");
+ JZHelp::Instance().ShowTopic("Track Dialog");
}
Modified: trunk/jazz/src/GuitarFrame.cpp
===================================================================
--- trunk/jazz/src/GuitarFrame.cpp 2013-03-20 15:46:01 UTC (rev 990)
+++ trunk/jazz/src/GuitarFrame.cpp 2013-03-20 15:56:17 UTC (rev 991)
@@ -24,6 +24,7 @@
#include "GuitarWindow.h"
#include "GuitarSettingsDialog.h"
+#include "Help.h"
#include "ProjectManager.h"
#include "Resources.h"
@@ -128,7 +129,7 @@
//-----------------------------------------------------------------------------
void JZGuitarFrame::OnHelp(wxCommandEvent& event)
{
-// gpHelpInstance->ShowTopic("Guitar board");
+ JZHelp::Instance().ShowTopic("Guitar board");
}
//-----------------------------------------------------------------------------
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <pst...@us...> - 2013-03-20 15:46:13
|
Revision: 990
http://sourceforge.net/p/jazzplusplus/code/990
Author: pstieber
Date: 2013-03-20 15:46:01 +0000 (Wed, 20 Mar 2013)
Log Message:
-----------
Added resource IDs for the rhythm generator frame.
Modified Paths:
--------------
trunk/jazz/src/Resources.h
Modified: trunk/jazz/src/Resources.h
===================================================================
--- trunk/jazz/src/Resources.h 2013-03-20 15:44:32 UTC (rev 989)
+++ trunk/jazz/src/Resources.h 2013-03-20 15:46:01 UTC (rev 990)
@@ -110,8 +110,14 @@
#define ID_TOOLS_HARMONY_BROWSER (wxID_HIGHEST + 95)
#define ID_TOOLS_RHYTHM_GENERATOR (wxID_HIGHEST + 96)
-#define ID_HELP_PIANO_WINDOW (wxID_HIGHEST + 100)
+#define ID_INSTRUMENT_ADD (wxID_HIGHEST + 100)
+#define ID_INSTRUMENT_DELETE (wxID_HIGHEST + 101)
+#define ID_INSTRUMENT_UP (wxID_HIGHEST + 102)
+#define ID_INSTRUMENT_DOWN (wxID_HIGHEST + 103)
+#define ID_INSTRUMENT_GENERATE (wxID_HIGHEST + 104)
+#define ID_HELP_PIANO_WINDOW (wxID_HIGHEST + 108)
+
#define MEN_CLEAR (wxID_HIGHEST + 110)
#define ID_VIEW_SETTINGS (wxID_HIGHEST + 120)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <pst...@us...> - 2013-03-20 15:44:35
|
Revision: 989
http://sourceforge.net/p/jazzplusplus/code/989
Author: pstieber
Date: 2013-03-20 15:44:32 +0000 (Wed, 20 Mar 2013)
Log Message:
-----------
1. Removed the version member functions.
2. Moved the help code to the JZHelp Singleton and added
appropriate calls to the JZHelp class.
Modified Paths:
--------------
trunk/jazz/src/JazzPlusPlusApplication.cpp
trunk/jazz/src/JazzPlusPlusApplication.h
Modified: trunk/jazz/src/JazzPlusPlusApplication.cpp
===================================================================
--- trunk/jazz/src/JazzPlusPlusApplication.cpp 2013-03-20 15:43:14 UTC (rev 988)
+++ trunk/jazz/src/JazzPlusPlusApplication.cpp 2013-03-20 15:44:32 UTC (rev 989)
@@ -23,6 +23,7 @@
#include "JazzPlusPlusApplication.h"
#include "Globals.h"
+#include "Help.h"
#include "Project.h"
#include "ProjectManager.h"
#include "TrackFrame.h"
@@ -49,11 +50,9 @@
#include <wx/stdpaths.h>
#include <wx/fileconf.h>
-#include <wx/filedlg.h>
#include <wx/image.h>
#include <wx/msgdlg.h>
-#include <fstream>
#include <vector>
using namespace std;
@@ -63,10 +62,6 @@
// This is the JazzPlusPlus application class definition.
//*****************************************************************************
//-----------------------------------------------------------------------------
-//-----------------------------------------------------------------------------
-wxString JZJazzPlusPlusApplication::mHelpFileName = "jazz.hhp";
-
-//-----------------------------------------------------------------------------
// Description:
// Create a new application object using the wxWidgets macro. This macro
// will allow wxWidgets to create the application object during program
@@ -81,8 +76,7 @@
JZJazzPlusPlusApplication::JZJazzPlusPlusApplication()
: wxApp(),
mpProject(0),
- mpTrackFrame(0),
- mHelp(wxHF_DEFAULT_STYLE | wxHF_OPEN_FILES)
+ mpTrackFrame(0)
{
#ifdef _MSC_VER
// When using the Microsoft C++ compiler in debug mode, each heap allocation
@@ -157,95 +151,12 @@
// Show it and tell the application that it's our main window
SetTopWindow(mpTrackFrame);
- ConfigureHelp();
+ JZHelp::Instance().ConfigureHelp();
return true;
}
//-----------------------------------------------------------------------------
-//-----------------------------------------------------------------------------
-void JZJazzPlusPlusApplication::ConfigureHelp()
-{
- wxConfigBase* pConfig = wxConfigBase::Get();
-
- // Let the help system store the Jazz++ help configuration info.
- mHelp.UseConfig(pConfig);
-
- // This code should be distributed with a HelpFiles subdirectory under
- // the directory the executable is stored in on Windows and under the
- // ${prefix}/shared/${appname} on Linux.
- wxString HelpFileDirectoryGuess =
- wxStandardPaths::Get().GetDataDir() +
- wxFileName::GetPathSeparator() +
- "HelpFiles" +
- wxFileName::GetPathSeparator();
-
- // Attempt to obtain the path to the help file from configuration data.
- wxString HelpFilePath;
- bool WasHelpPathRead = false;
- if (pConfig)
- {
- WasHelpPathRead = pConfig->Read(
- "/Paths/Help",
- &HelpFilePath,
- HelpFileDirectoryGuess);
- }
-
- // Construct a full file name.
- wxString HelpFileNameAndPath = HelpFilePath + mHelpFileName;
-
- // Test for the existence of the help file.
- bool HelpFileFound = false;
- ifstream Is;
- Is.open(HelpFileNameAndPath.mb_str());
- if (!Is)
- {
- // Ask the user to find the help file.
- if (FindAndRegisterHelpFilePath(HelpFilePath))
- {
- HelpFileNameAndPath = HelpFilePath + mHelpFileName;
-
- // Try one more time.
- Is.close();
- Is.clear();
- Is.open(HelpFileNameAndPath.mb_str());
- if (!Is)
- {
- wxString Message = "Failed to add the Jazz++ book " + mHelpFileName;
- ::wxMessageBox(Message);
- }
- else
- {
- HelpFileFound = true;
- }
- }
- }
- else
- {
- HelpFileFound = true;
- }
-
- // GetUserDataDir returns the directory for the user-dependent application
- // data files. The value is $HOME/.appname on Linux,
- // c:\Documents and Settings\username\Application Data\appname on
- // Windows, and ~/Library/Application Support/appname on the Mac.
- // The cached version of the help file will be placed in this location.
- mHelp.SetTempDir(wxStandardPaths::Get().GetUserDataDir());
-
- if (HelpFileFound)
- {
- // Add the Jazz++ help file the the help system.
- mHelp.AddBook(HelpFileNameAndPath);
-
- if (!WasHelpPathRead && pConfig)
- {
- // Register the help path.
- pConfig->Write("/Paths/Help", HelpFilePath);
- }
- }
-}
-
-//-----------------------------------------------------------------------------
// Description:
// This function checks to see if the user's Jazz++ configuration directory
// files exist and creates the directory and copies default versions if they
@@ -337,74 +248,12 @@
}
//-----------------------------------------------------------------------------
-// Description:
-// This function walks the user through a top-level help file search. If
-// the help file is found, create a configuration entry so the code can find
-// the help file path the next time the application starts.
-//
-// Outputs:
-// wxString& HelpFilePath:
-// A user-selected path to the help file. The calling code should check
-// to insure the help file is actually in this path.
//-----------------------------------------------------------------------------
-bool JZJazzPlusPlusApplication::FindAndRegisterHelpFilePath(
- wxString& HelpFilePath) const
-{
- wxString Message;
- Message =
- "Unable to find " + mHelpFileName + "\n" +
- "Would you like to locate this file?";
- int Response = ::wxMessageBox(
- Message,
- "Cannnot Find Help File",
- wxOK | wxCANCEL);
-
- if (Response == wxOK)
- {
- // Use an open dialog to find the help file.
- wxFileDialog OpenDialog(
- 0,
- "Open the Help File",
- HelpFilePath,
- mHelpFileName,
- "*.hhp",
- wxFD_OPEN);
-
- if (OpenDialog.ShowModal() == wxID_OK)
- {
- // Generate a string that contains a path to the help file.
- wxString TempHelpFilePath;
- TempHelpFilePath = ::wxPathOnly(OpenDialog.GetPath());
- TempHelpFilePath += ::wxFileName::GetPathSeparator();
-
- wxConfigBase* pConfig = wxConfigBase::Get();
- if (pConfig)
- {
- pConfig->Write("/Paths/Help", TempHelpFilePath);
- }
-
- // Return the user selected help file path.
- HelpFilePath = TempHelpFilePath;
-
- return true;
- }
- }
-
- return false;
-}
-
-//-----------------------------------------------------------------------------
-//-----------------------------------------------------------------------------
int JZJazzPlusPlusApplication::OnExit()
{
delete mpProject;
- // GetFrame returns NULL if there is no help frame active.
- if (mHelp.GetFrame())
- {
- // Close the help frame; this will cause the config data to get written.
- mHelp.GetFrame()->Close(true);
- }
+ JZHelp::Instance().CloseHelp();
// Prevent reported leaks from the configuration class.
delete wxConfigBase::Set(0);
@@ -420,21 +269,3 @@
{
return mpTrackFrame;
}
-
-//-----------------------------------------------------------------------------
-// Description:
-// Display the table of contents for Jazz++ help.
-//-----------------------------------------------------------------------------
-void JZJazzPlusPlusApplication::DisplayHelpContents() const
-{
- mHelp.DisplayContents();
-}
-
-//-----------------------------------------------------------------------------
-// Description:
-// Provide context sensitive help for Jazz++.
-//-----------------------------------------------------------------------------
-void JZJazzPlusPlusApplication::GetHelp(const wxString& TopicString) const
-{
- mHelp.DisplaySection(TopicString);
-}
Modified: trunk/jazz/src/JazzPlusPlusApplication.h
===================================================================
--- trunk/jazz/src/JazzPlusPlusApplication.h 2013-03-20 15:43:14 UTC (rev 988)
+++ trunk/jazz/src/JazzPlusPlusApplication.h 2013-03-20 15:44:32 UTC (rev 989)
@@ -23,7 +23,6 @@
#pragma once
#include <wx/app.h>
-#include <wx/html/helpctrl.h>
class JZProject;
class JZTrackFrame;
@@ -60,115 +59,17 @@
// A pointer to the application's main frame.
JZTrackFrame* GetMainFrame() const;
- void DisplayHelpContents() const;
-
- void GetHelp(const wxString& TopicString) const;
-
- // Description:
- // This function returns the application's major version number.
- //
- // Returns:
- // int:
- // The application's major version number.
- int GetMajorVersion() const;
-
- // Description:
- // This function returns the application's minor version number.
- //
- // Returns:
- // int:
- // The application's minor version number.
- int GetMinorVersion() const;
-
- // Description:
- // This function returns the application's build number.
- //
- // Returns:
- // int:
- // The application's build number.
- int GetBuildNumber() const;
-
private:
- void ConfigureHelp();
-
void InsureConfigurationFileExistence() const;
- bool FindAndRegisterHelpFilePath(wxString& HelpFilePath) const;
-
private:
- static wxString mHelpFileName;
-
JZProject* mpProject;
JZTrackFrame* mpTrackFrame;
-
- mutable wxHtmlHelpController mHelp;
};
-DECLARE_APP(JZJazzPlusPlusApplication)
-
//*****************************************************************************
-// Description:
-// These are the Jazz++ application class inline member functions.
//*****************************************************************************
-//-----------------------------------------------------------------------------
-// Description:
-// This function returns the application's major version number.
-// Version 1 was the MFC version developed on the Phase II ONR SBIR.
-//
-// Ver Date Description
-// 4 ? Unknown for all prior versions. Might be filled in by
-// looking at old commit messages.
-// 5 1/21/2008 Start of the Jazz++ development revival.
-//
-// Returns:
-// int:
-// The application's major version number.
-//-----------------------------------------------------------------------------
-inline
-int JZJazzPlusPlusApplication::GetMajorVersion() const
-{
- return 5;
-}
-
-//-----------------------------------------------------------------------------
-// Description:
-// This function returns the application's minor version number.
-//
-// Ver Date Description
-// ? ? Unknown for all prior versions. Might be filled in by
-// looking at old commit messages.
-// 3 1/21/2008 Major refactoring here to get the code compiling with
-// wxWidgets 2.8.7 and recent compilers including Visual Studio
-// .NET 2005 and GCC 4.
-// 4 9/1/2008 Updated to wxWidgets version 2.8.8.
-//
-// Returns:
-// int:
-// The application's minor version number.
-//-----------------------------------------------------------------------------
-inline
-int JZJazzPlusPlusApplication::GetMinorVersion() const
-{
- return 4;
-}
-
-//-----------------------------------------------------------------------------
-// Description:
-// This function returns the application's build number.
-//
-// Ver Date Description
-// ? ? Unknown for all prior versions. Might be filled in by
-// looking at old commit messages.
-// 11 1/21/2008 See minor version 3.
-// 12 9/1/2008 See minor version 4.
-// 13 3/17/2013 Fixed closing while recording and/or playing back.
-// 14 3/17/2013 Added "Visit Web Site..." button to the about dialog.
-//-----------------------------------------------------------------------------
-inline
-int JZJazzPlusPlusApplication::GetBuildNumber() const
-{
- return 14;
-}
+DECLARE_APP(JZJazzPlusPlusApplication)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <pst...@us...> - 2013-03-20 15:43:18
|
Revision: 988
http://sourceforge.net/p/jazzplusplus/code/988
Author: pstieber
Date: 2013-03-20 15:43:14 +0000 (Wed, 20 Mar 2013)
Log Message:
-----------
Removed the global instance of JZHelp.
Modified Paths:
--------------
trunk/jazz/src/Globals.cpp
trunk/jazz/src/Globals.h
Modified: trunk/jazz/src/Globals.cpp
===================================================================
--- trunk/jazz/src/Globals.cpp 2013-03-20 15:39:07 UTC (rev 987)
+++ trunk/jazz/src/Globals.cpp 2013-03-20 15:43:14 UTC (rev 988)
@@ -22,7 +22,6 @@
#include "Globals.h"
-#include "Help.h"
#include "NamedValue.h"
#include "Player.h"
#include "Project.h"
@@ -39,8 +38,6 @@
JZPlayer* gpMidiPlayer = 0;
-JZHelp* gpHelpInstance = 0;
-
map<int, string> gLimitSteps;
vector<pair<string, int> > gModes;
Modified: trunk/jazz/src/Globals.h
===================================================================
--- trunk/jazz/src/Globals.h 2013-03-20 15:39:07 UTC (rev 987)
+++ trunk/jazz/src/Globals.h 2013-03-20 15:43:14 UTC (rev 988)
@@ -33,7 +33,6 @@
class JZSong;
class JZSynthesizer;
class JZPlayer;
-class JZHelp;
class JZProject;
class JZRhythmGeneratorFrame;
class JZTrackFrame;
@@ -50,7 +49,6 @@
extern JZSong* gpSong;
extern JZSynthesizer* gpSynth;
extern JZPlayer* gpMidiPlayer;
-extern JZHelp* gpHelpInstance;
extern std::map<int, std::string> gLimitSteps;
extern std::vector<std::pair<std::string, int> > gModes;
extern const int gScaleChromatic;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <pst...@us...> - 2013-03-20 15:39:11
|
Revision: 987
http://sourceforge.net/p/jazzplusplus/code/987
Author: pstieber
Date: 2013-03-20 15:39:07 +0000 (Wed, 20 Mar 2013)
Log Message:
-----------
Updated to use the new help and version code.
Modified Paths:
--------------
trunk/jazz/src/AboutDialog.cpp
Modified: trunk/jazz/src/AboutDialog.cpp
===================================================================
--- trunk/jazz/src/AboutDialog.cpp 2013-03-20 15:37:45 UTC (rev 986)
+++ trunk/jazz/src/AboutDialog.cpp 2013-03-20 15:39:07 UTC (rev 987)
@@ -22,7 +22,8 @@
#include "AboutDialog.h"
-#include "JazzPlusPlusApplication.h"
+#include "JazzPlusPlusVersion.h"
+#include "Help.h"
#include "Resources.h"
#include <wx/button.h>
@@ -67,12 +68,10 @@
wxString LocaleString = wxLocale::GetSystemEncodingName();
wxString VersionString;
- const JZJazzPlusPlusApplication& JazzApplication = ::wxGetApp();
-
VersionString
- << JazzApplication.GetMajorVersion()
- << '.' << JazzApplication.GetMinorVersion()
- << '.' << JazzApplication.GetBuildNumber();
+ << JZJazzPlusPlusVersion::Instance().GetMajorVersion()
+ << '.' << JZJazzPlusPlusVersion::Instance().GetMinorVersion()
+ << '.' << JZJazzPlusPlusVersion::Instance().GetBuildNumber();
// Indicate the wxWidgets version used in the build.
wxString InformationString = "Jazz++ uses ";
@@ -201,5 +200,5 @@
//-----------------------------------------------------------------------------
void JZAboutDialog::OnHelp(wxCommandEvent& Event)
{
- ::wxGetApp().DisplayHelpContents();
+ JZHelp::Instance().DisplayHelpContents();
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <pst...@us...> - 2013-03-20 15:37:48
|
Revision: 986
http://sourceforge.net/p/jazzplusplus/code/986
Author: pstieber
Date: 2013-03-20 15:37:45 +0000 (Wed, 20 Mar 2013)
Log Message:
-----------
Added the new version header file.
Modified Paths:
--------------
trunk/jazz/src/Makefile.am
trunk/jazz/vc9/JazzPlusPlus-VC9.vcproj
Modified: trunk/jazz/src/Makefile.am
===================================================================
--- trunk/jazz/src/Makefile.am 2013-03-20 15:36:05 UTC (rev 985)
+++ trunk/jazz/src/Makefile.am 2013-03-20 15:37:45 UTC (rev 986)
@@ -274,6 +274,7 @@
HarmonyP.h \
Help.h \
JazzPlusPlusApplication.h \
+JazzPlusPlusVersion.h \
KeyStringConverters.h \
Mapper.h \
MeasureChoice.h \
Modified: trunk/jazz/vc9/JazzPlusPlus-VC9.vcproj
===================================================================
--- trunk/jazz/vc9/JazzPlusPlus-VC9.vcproj 2013-03-20 15:36:05 UTC (rev 985)
+++ trunk/jazz/vc9/JazzPlusPlus-VC9.vcproj 2013-03-20 15:37:45 UTC (rev 986)
@@ -654,6 +654,10 @@
>
</File>
<File
+ RelativePath="..\src\JazzPlusPlusVersion.h"
+ >
+ </File>
+ <File
RelativePath="..\src\KeyStringConverters.cpp"
>
</File>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <pst...@us...> - 2013-03-20 15:36:13
|
Revision: 985
http://sourceforge.net/p/jazzplusplus/code/985
Author: pstieber
Date: 2013-03-20 15:36:05 +0000 (Wed, 20 Mar 2013)
Log Message:
-----------
1. Made the help class a Singleton for global access instead of using a
global instance.
2. Moved functions for finding, registering, and using the help file from
the application class to this class.
Modified Paths:
--------------
trunk/jazz/src/Help.cpp
trunk/jazz/src/Help.h
Modified: trunk/jazz/src/Help.cpp
===================================================================
--- trunk/jazz/src/Help.cpp 2013-03-20 15:33:33 UTC (rev 984)
+++ trunk/jazz/src/Help.cpp 2013-03-20 15:36:05 UTC (rev 985)
@@ -22,9 +22,12 @@
#include "Help.h"
+#include <wx/filedlg.h>
#include <wx/html/helpctrl.h>
+#include <wx/msgdlg.h>
+#include <wx/stdpaths.h>
-#include <iostream>
+#include <fstream>
using namespace std;
@@ -34,34 +37,187 @@
//*****************************************************************************
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
-JZHelp::JZHelp(const char* pHelpFleName)
- : mpHelp(0),
- mHelpFile(pHelpFleName)
+wxString JZHelp::mHelpFileName = "jazz.hhp";
+
+//-----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
+JZHelp::JZHelp()
+ : mpHelp(0)
{
- mpHelp = new wxHtmlHelpController();
- mpHelp->Initialize(mHelpFile);
- cout << "JZHelp::JZHelp " << mHelpFile << endl;
+ mpHelp = new wxHtmlHelpController(wxHF_DEFAULT_STYLE | wxHF_OPEN_FILES);
}
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
JZHelp::~JZHelp()
{
+ CloseHelp();
delete mpHelp;
}
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
-void JZHelp::ShowTopic(const char* pTopic)
+void JZHelp::ShowTopic(const wxString& TopicString)
{
- mpHelp->LoadFile(mHelpFile.c_str());
- mpHelp->KeywordSearch(pTopic);
+ mpHelp->LoadFile(mHelpFileName);
+ mpHelp->KeywordSearch(TopicString);
}
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
-void JZHelp::DisplayContents()
+void JZHelp::DisplayHelpContents()
{
- mpHelp->LoadFile(mHelpFile.c_str());
+ mpHelp->LoadFile(mHelpFileName);
mpHelp->DisplayContents();
}
+
+//-----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
+void JZHelp::CloseHelp()
+{
+ // GetFrame returns NULL if there is no help frame active.
+ if (mpHelp->GetFrame())
+ {
+ // Close the help frame; this will cause the config data to get written.
+ mpHelp->GetFrame()->Close(true);
+ }
+}
+
+//-----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
+void JZHelp::ConfigureHelp()
+{
+ wxConfigBase* pConfig = wxConfigBase::Get();
+
+ // Let the help system store the Jazz++ help configuration info.
+ mpHelp->UseConfig(pConfig);
+
+ // This code should be distributed with a HelpFiles subdirectory under
+ // the directory the executable is stored in on Windows and under the
+ // ${prefix}/shared/${appname} on Linux.
+ wxString HelpFileDirectoryGuess =
+ wxStandardPaths::Get().GetDataDir() +
+ wxFileName::GetPathSeparator() +
+ "HelpFiles" +
+ wxFileName::GetPathSeparator();
+
+ // Attempt to obtain the path to the help file from configuration data.
+ wxString HelpFilePath;
+ bool WasHelpPathRead = false;
+ if (pConfig)
+ {
+ WasHelpPathRead = pConfig->Read(
+ "/Paths/Help",
+ &HelpFilePath,
+ HelpFileDirectoryGuess);
+ }
+
+ // Construct a full file name.
+ wxString HelpFileNameAndPath = HelpFilePath + mHelpFileName;
+
+ // Test for the existence of the help file.
+ bool HelpFileFound = false;
+ ifstream Is;
+ Is.open(HelpFileNameAndPath.mb_str());
+ if (!Is)
+ {
+ // Ask the user to find the help file.
+ if (FindAndRegisterHelpFilePath(HelpFilePath))
+ {
+ HelpFileNameAndPath = HelpFilePath + mHelpFileName;
+
+ // Try one more time.
+ Is.close();
+ Is.clear();
+ Is.open(HelpFileNameAndPath.mb_str());
+ if (!Is)
+ {
+ wxString Message = "Failed to add the Jazz++ book " + mHelpFileName;
+ ::wxMessageBox(Message);
+ }
+ else
+ {
+ HelpFileFound = true;
+ }
+ }
+ }
+ else
+ {
+ HelpFileFound = true;
+ }
+
+ // GetUserDataDir returns the directory for the user-dependent application
+ // data files. The value is $HOME/.appname on Linux,
+ // c:\Documents and Settings\username\Application Data\appname on
+ // Windows, and ~/Library/Application Support/appname on the Mac.
+ // The cached version of the help file will be placed in this location.
+ mpHelp->SetTempDir(wxStandardPaths::Get().GetUserDataDir());
+
+ if (HelpFileFound)
+ {
+ // Add the Jazz++ help file the the help system.
+ mpHelp->AddBook(HelpFileNameAndPath);
+
+ if (!WasHelpPathRead && pConfig)
+ {
+ // Register the help path.
+ pConfig->Write("/Paths/Help", HelpFilePath);
+ }
+ }
+}
+
+//-----------------------------------------------------------------------------
+// Description:
+// This function walks the user through a top-level help file search. If
+// the help file is found, create a configuration entry so the code can find
+// the help file path the next time the application starts.
+//
+// Outputs:
+// wxString& HelpFilePath:
+// A user-selected path to the help file. The calling code should check
+// to insure the help file is actually in this path.
+//-----------------------------------------------------------------------------
+bool JZHelp::FindAndRegisterHelpFilePath(wxString& HelpFilePath) const
+{
+ wxString Message;
+ Message =
+ "Unable to find " + mHelpFileName + "\n" +
+ "Would you like to locate this file?";
+ int Response = ::wxMessageBox(
+ Message,
+ "Cannnot Find Help File",
+ wxOK | wxCANCEL);
+
+ if (Response == wxOK)
+ {
+ // Use an open dialog to find the help file.
+ wxFileDialog OpenDialog(
+ 0,
+ "Open the Help File",
+ HelpFilePath,
+ mHelpFileName,
+ "*.hhp",
+ wxFD_OPEN);
+
+ if (OpenDialog.ShowModal() == wxID_OK)
+ {
+ // Generate a string that contains a path to the help file.
+ wxString TempHelpFilePath;
+ TempHelpFilePath = ::wxPathOnly(OpenDialog.GetPath());
+ TempHelpFilePath += ::wxFileName::GetPathSeparator();
+
+ wxConfigBase* pConfig = wxConfigBase::Get();
+ if (pConfig)
+ {
+ pConfig->Write("/Paths/Help", TempHelpFilePath);
+ }
+
+ // Return the user selected help file path.
+ HelpFilePath = TempHelpFilePath;
+
+ return true;
+ }
+ }
+
+ return false;
+}
Modified: trunk/jazz/src/Help.h
===================================================================
--- trunk/jazz/src/Help.h 2013-03-20 15:33:33 UTC (rev 984)
+++ trunk/jazz/src/Help.h 2013-03-20 15:36:05 UTC (rev 985)
@@ -35,17 +35,36 @@
{
public:
- JZHelp(const char* pHelpFleName);
+ static JZHelp& Instance();
- ~JZHelp();
+ void ConfigureHelp();
- void ShowTopic(const char* pTopic);
+ void ShowTopic(const wxString& TopicString);
- void DisplayContents();
+ void DisplayHelpContents();
+ void CloseHelp();
+
private:
+ JZHelp();
+
+ ~JZHelp();
+
+ bool FindAndRegisterHelpFilePath(wxString& HelpFilePath) const;
+
+ private:
+
+ static wxString mHelpFileName;
+
wxHtmlHelpController* mpHelp;
+};
- wxString mHelpFile;
-};
+//*****************************************************************************
+//*****************************************************************************
+inline
+JZHelp& JZHelp::Instance()
+{
+ static JZHelp JazzHelp;
+ return JazzHelp;
+}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <pst...@us...> - 2013-03-20 15:33:36
|
Revision: 984
http://sourceforge.net/p/jazzplusplus/code/984
Author: pstieber
Date: 2013-03-20 15:33:33 +0000 (Wed, 20 Mar 2013)
Log Message:
-----------
Created a separate version class.
Added Paths:
-----------
trunk/jazz/src/JazzPlusPlusVersion.h
Added: trunk/jazz/src/JazzPlusPlusVersion.h
===================================================================
--- trunk/jazz/src/JazzPlusPlusVersion.h (rev 0)
+++ trunk/jazz/src/JazzPlusPlusVersion.h 2013-03-20 15:33:33 UTC (rev 984)
@@ -0,0 +1,128 @@
+//*****************************************************************************
+// The JAZZ++ Midi Sequencer
+//
+// Copyright (C) 2013 Peter J. Stieber, all rights reserved.
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+//*****************************************************************************
+
+#pragma once
+
+//*****************************************************************************
+//*****************************************************************************
+class JZJazzPlusPlusVersion
+{
+ public:
+
+ static const JZJazzPlusPlusVersion& Instance();
+
+ // Description:
+ // This function returns the application's major version number.
+ //
+ // Returns:
+ // int:
+ // The application's major version number.
+ static int GetMajorVersion();
+
+ // Description:
+ // This function returns the application's minor version number.
+ //
+ // Returns:
+ // int:
+ // The application's minor version number.
+ static int GetMinorVersion();
+
+ // Description:
+ // This function returns the application's build number.
+ //
+ // Returns:
+ // int:
+ // The application's build number.
+ static int GetBuildNumber();
+};
+
+
+//*****************************************************************************
+// Description:
+// These are the Jazz++ application class inline member functions.
+//*****************************************************************************
+//-----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
+inline
+const JZJazzPlusPlusVersion& JZJazzPlusPlusVersion::Instance()
+{
+ static JZJazzPlusPlusVersion JazzPlusPlusVersion;
+ return JazzPlusPlusVersion;
+}
+
+//-----------------------------------------------------------------------------
+// Description:
+// This function returns the application's major version number.
+// Version 1 was the MFC version developed on the Phase II ONR SBIR.
+//
+// Ver Date Description
+// 4 ? Unknown for all prior versions. Might be filled in by
+// looking at old commit messages.
+// 5 1/21/2008 Start of the Jazz++ development revival.
+//
+// Returns:
+// int:
+// The application's major version number.
+//-----------------------------------------------------------------------------
+inline
+int JZJazzPlusPlusVersion::GetMajorVersion()
+{
+ return 5;
+}
+
+//-----------------------------------------------------------------------------
+// Description:
+// This function returns the application's minor version number.
+//
+// Ver Date Description
+// ? ? Unknown for all prior versions. Might be filled in by
+// looking at old commit messages.
+// 3 1/21/2008 Major refactoring here to get the code compiling with
+// wxWidgets 2.8.7 and recent compilers including Visual Studio
+// .NET 2005 and GCC 4.
+// 4 9/1/2008 Updated to wxWidgets version 2.8.8.
+//
+// Returns:
+// int:
+// The application's minor version number.
+//-----------------------------------------------------------------------------
+inline
+int JZJazzPlusPlusVersion::GetMinorVersion()
+{
+ return 4;
+}
+
+//-----------------------------------------------------------------------------
+// Description:
+// This function returns the application's build number.
+//
+// Ver Date Description
+// ? ? Unknown for all prior versions. Might be filled in by
+// looking at old commit messages.
+// 11 1/21/2008 See minor version 3.
+// 12 9/1/2008 See minor version 4.
+// 13 3/17/2013 Fixed closing while recording and/or playing back.
+// 14 3/17/2013 Added "Visit Web Site..." button to the about dialog.
+//-----------------------------------------------------------------------------
+inline
+int JZJazzPlusPlusVersion::GetBuildNumber()
+{
+ return 14;
+}
Property changes on: trunk/jazz/src/JazzPlusPlusVersion.h
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <pst...@us...> - 2013-03-19 18:13:10
|
Revision: 983
http://sourceforge.net/p/jazzplusplus/code/983
Author: pstieber
Date: 2013-03-19 18:13:04 +0000 (Tue, 19 Mar 2013)
Log Message:
-----------
Fixed fouled up project settings. The project was setup to compile headers.
Modified Paths:
--------------
trunk/jazz/vc11/JazzPlusPlus-VC11.vcxproj
trunk/jazz/vc11/JazzPlusPlus-VC11.vcxproj.filters
Modified: trunk/jazz/vc11/JazzPlusPlus-VC11.vcxproj
===================================================================
--- trunk/jazz/vc11/JazzPlusPlus-VC11.vcxproj 2013-03-18 19:43:45 UTC (rev 982)
+++ trunk/jazz/vc11/JazzPlusPlus-VC11.vcxproj 2013-03-19 18:13:04 UTC (rev 983)
@@ -409,8 +409,8 @@
<ClInclude Include="..\src\Dialogs.h" />
<ClInclude Include="..\src\Dialogs\AudioSettingsDialog.h" />
<ClInclude Include="..\src\Dialogs\SamplesDialog.h" />
- <ClCompile Include="..\src\DrumEnums.h" />
- <ClCompile Include="..\src\DrumUtilities.h" />
+ <ClInclude Include="..\src\DrumEnums.h" />
+ <ClInclude Include="..\src\DrumUtilities.h" />
<ClInclude Include="..\src\DynamicArray.h" />
<ClInclude Include="..\src\ErrorMessage.h" />
<ClInclude Include="..\src\EventFrame.h" />
Modified: trunk/jazz/vc11/JazzPlusPlus-VC11.vcxproj.filters
===================================================================
--- trunk/jazz/vc11/JazzPlusPlus-VC11.vcxproj.filters 2013-03-18 19:43:45 UTC (rev 982)
+++ trunk/jazz/vc11/JazzPlusPlus-VC11.vcxproj.filters 2013-03-19 18:13:04 UTC (rev 983)
@@ -164,8 +164,6 @@
<ClInclude Include="..\src\Configuration.h" />
<ClInclude Include="..\src\ControlEdit.h" />
<ClInclude Include="..\src\Dialogs.h" />
- <ClCompile Include="..\src\DrumEnums.h" />
- <ClCompile Include="..\src\DrumUtilities.h" />
<ClInclude Include="..\src\DynamicArray.h" />
<ClInclude Include="..\src\ErrorMessage.h" />
<ClInclude Include="..\src\EventFrame.h" />
@@ -316,6 +314,8 @@
<ClInclude Include="..\src\Dialogs\QuantizeDialog.h">
<Filter>Dialog Source Files</Filter>
</ClInclude>
+ <ClInclude Include="..\src\DrumUtilities.h" />
+ <ClInclude Include="..\src\DrumEnums.h" />
</ItemGroup>
<ItemGroup>
<None Include="..\src\Makefile.am" />
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <pst...@us...> - 2013-03-18 19:43:47
|
Revision: 982
http://sourceforge.net/p/jazzplusplus/code/982
Author: pstieber
Date: 2013-03-18 19:43:45 +0000 (Mon, 18 Mar 2013)
Log Message:
-----------
Removed some old utility scripts.
Removed Paths:
-------------
trunk/jazz/scripts/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <pst...@us...> - 2013-03-18 19:11:46
|
Revision: 981
http://sourceforge.net/p/jazzplusplus/code/981
Author: pstieber
Date: 2013-03-18 19:11:43 +0000 (Mon, 18 Mar 2013)
Log Message:
-----------
Added the start of a Code::Blocks build for mingw.
Added Paths:
-----------
trunk/jazz/codeblocks-mingw/
trunk/jazz/codeblocks-mingw/Jazz++.workspace
trunk/jazz/codeblocks-mingw/JazzPlusPlus.cbp
trunk/jazz/portmidi/pm_win/portmidi-mingw.cbp
trunk/jazz/portmidi/porttime/porttime-mingw.cbp
Added: trunk/jazz/codeblocks-mingw/Jazz++.workspace
===================================================================
--- trunk/jazz/codeblocks-mingw/Jazz++.workspace (rev 0)
+++ trunk/jazz/codeblocks-mingw/Jazz++.workspace 2013-03-18 19:11:43 UTC (rev 981)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
+<CodeBlocks_workspace_file>
+ <Workspace title="Jazz++">
+ <Project filename="JazzPlusPlus-mingw.cbp" active="1" />
+ <Project filename="..\portmidi\pm_win\portmidi-mingw.cbp" />
+ <Project filename="..\portmidi\porttime\porttime-mingw.cbp" />
+ <Project filename="..\..\cb_wx_test\cb_wx_test.cbp" />
+ </Workspace>
+</CodeBlocks_workspace_file>
Added: trunk/jazz/codeblocks-mingw/JazzPlusPlus.cbp
===================================================================
--- trunk/jazz/codeblocks-mingw/JazzPlusPlus.cbp (rev 0)
+++ trunk/jazz/codeblocks-mingw/JazzPlusPlus.cbp 2013-03-18 19:11:43 UTC (rev 981)
@@ -0,0 +1,328 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
+<CodeBlocks_project_file>
+ <FileVersion major="1" minor="6" />
+ <Project>
+ <Option title="Jazz++" />
+ <Option pch_mode="2" />
+ <Option compiler="gnu_gcc" />
+ <Build>
+ <Target title="Debug">
+ <Option output="bin\Debug\Jazz++" prefix_auto="1" extension_auto="1" />
+ <Option object_output="obj\Debug\" />
+ <Option type="0" />
+ <Option compiler="gnu_gcc" />
+ <Option projectLinkerOptionsRelation="2" />
+ <Compiler>
+ <Add option="-Wall" />
+ <Add option="-g" />
+ <Add directory="C:\wx\2.8\lib\gcc_lib\msw" />
+ </Compiler>
+ <ResourceCompiler>
+ <Add directory="C:\wx\2.8\lib\gcc_lib\msw" />
+ </ResourceCompiler>
+ <Linker>
+ <Add library="libwxmsw28.a" />
+ <Add library="libwxpng.a" />
+ <Add library="libwxjpeg.a" />
+ <Add library="libwxtiff.a" />
+ <Add library="libwxzlib.a" />
+ <Add library="libwxexpatd.a" />
+ <Add library="..\portmidi\pm_win\Debug MinGW Win32\libportmidi.a" />
+ <Add library="..\portmidi\porttime\Debug MinGW Win32\libporttime.a" />
+ <Add directory="C:\wx\2.8\lib\gcc_lib" />
+ </Linker>
+ </Target>
+ <Target title="Release">
+ <Option output="bin\Release\Jazz++" prefix_auto="1" extension_auto="1" />
+ <Option object_output="obj\Release\" />
+ <Option type="0" />
+ <Option compiler="gnu_gcc" />
+ <Option projectLinkerOptionsRelation="2" />
+ <Compiler>
+ <Add option="-O2" />
+ <Add option="-Wall" />
+ <Add directory="C:\wx\2.8\lib\gcc_lib\msw" />
+ </Compiler>
+ <ResourceCompiler>
+ <Add directory="C:\wx\2.8\lib\gcc_lib\msw" />
+ </ResourceCompiler>
+ <Linker>
+ <Add option="-s" />
+ <Add library="libwxmsw28.a" />
+ <Add library="libwxpng.a" />
+ <Add library="libwxjpeg.a" />
+ <Add library="libwxtiff.a" />
+ <Add library="libwxzlib.a" />
+ <Add library="libwxexpat.a" />
+ <Add library="..\portmidi\pm_win\Release MinGW Win32\libportmidi.a" />
+ <Add library="..\portmidi\porttime\Release MinGW Win32\libporttime.a" />
+ <Add directory="C:\wx\2.8\lib\gcc_lib" />
+ </Linker>
+ </Target>
+ </Build>
+ <Compiler>
+ <Add option="-pipe" />
+ <Add option="-mthreads" />
+ <Add option='[[if (PLATFORM == PLATFORM_MSW && (GetCompilerFactory().GetCompilerVersionString(_T("gcc")) >= _T("4.0.0"))) print(_T("-Wno-attributes"));]]' />
+ <Add option="-Winvalid-pch" />
+ <Add option="-include wxWidgets.h" />
+ <Add option="-D__GNUWIN32__" />
+ <Add option="-D__WXMSW__" />
+ <Add directory="C:\wx\2.8\include" />
+ <Add directory="C:\wx\2.8\contrib\include" />
+ <Add directory="..\src" />
+ <Add directory="..\src\mswin" />
+ <Add directory="..\src\DeprecatedWx" />
+ <Add directory="..\src\Dialogs" />
+ </Compiler>
+ <ResourceCompiler>
+ <Add directory="C:\wx\2.8\include" />
+ </ResourceCompiler>
+ <Linker>
+ <Add library="libkernel32.a" />
+ <Add library="libuser32.a" />
+ <Add library="libgdi32.a" />
+ <Add library="libwinspool.a" />
+ <Add library="libcomdlg32.a" />
+ <Add library="libadvapi32.a" />
+ <Add library="libshell32.a" />
+ <Add library="libole32.a" />
+ <Add library="liboleaut32.a" />
+ <Add library="libuuid.a" />
+ <Add library="libcomctl32.a" />
+ <Add library="libwsock32.a" />
+ <Add library="libodbc32.a" />
+ <Add library="libwinmm.a" />
+ </Linker>
+ <Unit filename="..\src\AboutDialog.cpp" />
+ <Unit filename="..\src\AboutDialog.h" />
+ <Unit filename="..\src\AlsaDriver.cpp">
+ <Option target="<{~None~}>" />
+ </Unit>
+ <Unit filename="..\src\AlsaDriver.h">
+ <Option target="<{~None~}>" />
+ </Unit>
+ <Unit filename="..\src\AlsaPlayer.cpp">
+ <Option target="<{~None~}>" />
+ </Unit>
+ <Unit filename="..\src\AlsaPlayer.h">
+ <Option target="<{~None~}>" />
+ </Unit>
+ <Unit filename="..\src\AlsaThru.cpp">
+ <Option target="<{~None~}>" />
+ </Unit>
+ <Unit filename="..\src\AlsaThru.h">
+ <Option target="<{~None~}>" />
+ </Unit>
+ <Unit filename="..\src\AsciiMidiFile.cpp" />
+ <Unit filename="..\src\AsciiMidiFile.h" />
+ <Unit filename="..\src\Audio.cpp" />
+ <Unit filename="..\src\Audio.h" />
+ <Unit filename="..\src\AudioDriver.cpp">
+ <Option target="<{~None~}>" />
+ </Unit>
+ <Unit filename="..\src\AudioDriver.h" />
+ <Unit filename="..\src\ClockDialog.cpp" />
+ <Unit filename="..\src\ClockDialog.h" />
+ <Unit filename="..\src\Command.cpp" />
+ <Unit filename="..\src\Command.h" />
+ <Unit filename="..\src\Configuration.cpp" />
+ <Unit filename="..\src\Configuration.h" />
+ <Unit filename="..\src\ControlEdit.cpp" />
+ <Unit filename="..\src\ControlEdit.h" />
+ <Unit filename="..\src\DeprecatedStringUtils.cpp" />
+ <Unit filename="..\src\DeprecatedStringUtils.h" />
+ <Unit filename="..\src\DeprecatedWx\prop.cpp" />
+ <Unit filename="..\src\DeprecatedWx\prop.h" />
+ <Unit filename="..\src\DeprecatedWx\propform.cpp" />
+ <Unit filename="..\src\DeprecatedWx\propform.h" />
+ <Unit filename="..\src\DeprecatedWx\proplist.cpp" />
+ <Unit filename="..\src\DeprecatedWx\proplist.h" />
+ <Unit filename="..\src\DeprecatedWx\setup.h" />
+ <Unit filename="..\src\Dialogs.cpp" />
+ <Unit filename="..\src\Dialogs.h" />
+ <Unit filename="..\src\Dialogs\KeyOnDialog.cpp" />
+ <Unit filename="..\src\Dialogs\KeyOnDialog.h" />
+ <Unit filename="..\src\Dialogs\MetronomeSettingsDialog.cpp" />
+ <Unit filename="..\src\Dialogs\MetronomeSettingsDialog.h" />
+ <Unit filename="..\src\Dialogs\SynthesizerSettingsDialog.cpp" />
+ <Unit filename="..\src\Dialogs\SynthesizerSettingsDialog.h" />
+ <Unit filename="..\src\Dialogs\TrackDialog.cpp" />
+ <Unit filename="..\src\Dialogs\TrackDialog.h" />
+ <Unit filename="..\src\Dialogs\copyDialog.cpp">
+ <Option compile="0" />
+ <Option link="0" />
+ </Unit>
+ <Unit filename="..\src\Dialogs\copyDialog.h" />
+ <Unit filename="..\src\Dialogs\copyright.cpp">
+ <Option compile="0" />
+ <Option link="0" />
+ </Unit>
+ <Unit filename="..\src\Dialogs\copyright.h" />
+ <Unit filename="..\src\Dialogs\midiDelay.xrc" />
+ <Unit filename="..\src\Dialogs\midiThruDialog.cpp">
+ <Option compile="0" />
+ <Option link="0" />
+ </Unit>
+ <Unit filename="..\src\Dialogs\midiThruDialog.h" />
+ <Unit filename="..\src\Dialogs\midiTiming.cpp">
+ <Option compile="0" />
+ <Option link="0" />
+ </Unit>
+ <Unit filename="..\src\Dialogs\midiTiming.h" />
+ <Unit filename="..\src\Dialogs\sequenceLength.xrc" />
+ <Unit filename="..\src\Dialogs\songSettings.cpp">
+ <Option compile="0" />
+ <Option link="0" />
+ </Unit>
+ <Unit filename="..\src\Dialogs\songSettings.h" />
+ <Unit filename="..\src\Dialogs\velocity.xrc" />
+ <Unit filename="..\src\Dialogs\windowSettings.xrc" />
+ <Unit filename="..\src\DynamicArray.cpp" />
+ <Unit filename="..\src\DynamicArray.h" />
+ <Unit filename="..\src\ErrorMessage.cpp" />
+ <Unit filename="..\src\ErrorMessage.h" />
+ <Unit filename="..\src\EventWindow.cpp" />
+ <Unit filename="..\src\EventWindow.h" />
+ <Unit filename="..\src\Events.cpp" />
+ <Unit filename="..\src\Events.h" />
+ <Unit filename="..\src\FileSelector.cpp" />
+ <Unit filename="..\src\FileSelector.h" />
+ <Unit filename="..\src\Filter.cpp" />
+ <Unit filename="..\src\Filter.h" />
+ <Unit filename="..\src\FindFile.cpp" />
+ <Unit filename="..\src\FindFile.h" />
+ <Unit filename="..\src\FrequencyTable.cpp" />
+ <Unit filename="..\src\FrequencyTable.h" />
+ <Unit filename="..\src\GetOptionIndex.cpp" />
+ <Unit filename="..\src\GetOptionIndex.h" />
+ <Unit filename="..\src\Globals.cpp" />
+ <Unit filename="..\src\Globals.h" />
+ <Unit filename="..\src\GuitarFrame.cpp" />
+ <Unit filename="..\src\GuitarFrame.h" />
+ <Unit filename="..\src\GuitarSettings.cpp" />
+ <Unit filename="..\src\GuitarSettings.h" />
+ <Unit filename="..\src\GuitarSettingsDialog.cpp" />
+ <Unit filename="..\src\GuitarSettingsDialog.h" />
+ <Unit filename="..\src\GuitarWindow.cpp" />
+ <Unit filename="..\src\GuitarWindow.h" />
+ <Unit filename="..\src\Harmony.cpp" />
+ <Unit filename="..\src\Harmony.h" />
+ <Unit filename="..\src\HarmonyBrowserAnalyzer.cpp" />
+ <Unit filename="..\src\HarmonyBrowserAnalyzer.h" />
+ <Unit filename="..\src\HarmonyP.cpp" />
+ <Unit filename="..\src\HarmonyP.h" />
+ <Unit filename="..\src\Help.cpp" />
+ <Unit filename="..\src\Help.h" />
+ <Unit filename="..\src\JazzPlusPlusApplication.cpp" />
+ <Unit filename="..\src\JazzPlusPlusApplication.h" />
+ <Unit filename="..\src\KeyDialog.cpp" />
+ <Unit filename="..\src\KeyDialog.h" />
+ <Unit filename="..\src\KeyStringConverters.cpp" />
+ <Unit filename="..\src\KeyStringConverters.h" />
+ <Unit filename="..\src\Knob.cpp" />
+ <Unit filename="..\src\Knob.h" />
+ <Unit filename="..\src\Mapper.cpp" />
+ <Unit filename="..\src\Mapper.h" />
+ <Unit filename="..\src\MeasureChoice.cpp" />
+ <Unit filename="..\src\MeasureChoice.h" />
+ <Unit filename="..\src\Metronome.cpp" />
+ <Unit filename="..\src\Metronome.h" />
+ <Unit filename="..\src\MidiDeviceDialog.cpp" />
+ <Unit filename="..\src\MidiDeviceDialog.h" />
+ <Unit filename="..\src\MouseAction.cpp" />
+ <Unit filename="..\src\MouseAction.h" />
+ <Unit filename="..\src\NamedChoice.cpp" />
+ <Unit filename="..\src\NamedChoice.h" />
+ <Unit filename="..\src\NamedValue.cpp" />
+ <Unit filename="..\src\NamedValue.h" />
+ <Unit filename="..\src\NamedValueChoice.cpp" />
+ <Unit filename="..\src\NamedValueChoice.h" />
+ <Unit filename="..\src\PianoFrame.cpp" />
+ <Unit filename="..\src\PianoFrame.h" />
+ <Unit filename="..\src\PianoWindow.cpp" />
+ <Unit filename="..\src\PianoWindow.h" />
+ <Unit filename="..\src\Player.cpp" />
+ <Unit filename="..\src\Player.h" />
+ <Unit filename="..\src\PortMidiPlayer.cpp" />
+ <Unit filename="..\src\PortMidiPlayer.h" />
+ <Unit filename="..\src\Project.cpp" />
+ <Unit filename="..\src\Project.h" />
+ <Unit filename="..\src\ProjectManager.cpp" />
+ <Unit filename="..\src\ProjectManager.h" />
+ <Unit filename="..\src\PropertyListDialog.cpp" />
+ <Unit filename="..\src\PropertyListDialog.h" />
+ <Unit filename="..\src\Random.cpp" />
+ <Unit filename="..\src\Random.h" />
+ <Unit filename="..\src\RecordingInfo.cpp" />
+ <Unit filename="..\src\RecordingInfo.h" />
+ <Unit filename="..\src\Rectangle.cpp" />
+ <Unit filename="..\src\Rectangle.h" />
+ <Unit filename="..\src\ResourceDialog.cpp" />
+ <Unit filename="..\src\ResourceDialog.h" />
+ <Unit filename="..\src\Resources.h" />
+ <Unit filename="..\src\Rhythm.cpp" />
+ <Unit filename="..\src\Rhythm.h" />
+ <Unit filename="..\src\Sample.cpp" />
+ <Unit filename="..\src\Sample.h" />
+ <Unit filename="..\src\SampleCommand.cpp" />
+ <Unit filename="..\src\SampleCommand.h" />
+ <Unit filename="..\src\SampleDialog.cpp" />
+ <Unit filename="..\src\SampleDialog.h" />
+ <Unit filename="..\src\SampleWindow.cpp" />
+ <Unit filename="..\src\SampleWindow.h" />
+ <Unit filename="..\src\SelectControllerDialog.cpp" />
+ <Unit filename="..\src\SelectControllerDialog.h" />
+ <Unit filename="..\src\Signal2.cpp" />
+ <Unit filename="..\src\Signal2.h" />
+ <Unit filename="..\src\SignalInterface.h" />
+ <Unit filename="..\src\SliderWindow.cpp" />
+ <Unit filename="..\src\SliderWindow.h" />
+ <Unit filename="..\src\Song.cpp" />
+ <Unit filename="..\src\Song.h" />
+ <Unit filename="..\src\StandardFile.cpp" />
+ <Unit filename="..\src\StandardFile.h" />
+ <Unit filename="..\src\StringReadWrite.cpp" />
+ <Unit filename="..\src\StringReadWrite.h" />
+ <Unit filename="..\src\StringUtilities.cpp" />
+ <Unit filename="..\src\StringUtilities.h" />
+ <Unit filename="..\src\Synth.cpp" />
+ <Unit filename="..\src\Synth.h" />
+ <Unit filename="..\src\ToolBar.cpp" />
+ <Unit filename="..\src\ToolBar.h" />
+ <Unit filename="..\src\Track.cpp" />
+ <Unit filename="..\src\Track.h" />
+ <Unit filename="..\src\TrackFrame.cpp" />
+ <Unit filename="..\src\TrackFrame.h" />
+ <Unit filename="..\src\TrackWindow.cpp" />
+ <Unit filename="..\src\TrackWindow.h" />
+ <Unit filename="..\src\WxWidgets.h">
+ <Option compile="1" />
+ <Option weight="0" />
+ </Unit>
+ <Unit filename="..\src\commands\copyCommand.cpp">
+ <Option compile="0" />
+ <Option link="0" />
+ </Unit>
+ <Unit filename="..\src\commands\copyCommand.h" />
+ <Unit filename="..\src\gui\trackwinEnum.h" />
+ <Unit filename="..\src\midinet.h" />
+ <Unit filename="..\src\mswin\WindowsAudioInterface.cpp" />
+ <Unit filename="..\src\mswin\WindowsAudioInterface.h" />
+ <Unit filename="..\src\mswin\WindowsConsole.cpp" />
+ <Unit filename="..\src\mswin\WindowsConsole.h" />
+ <Unit filename="..\src\mswin\WindowsMidiInterface.cpp" />
+ <Unit filename="..\src\mswin\WindowsMidiInterface.h" />
+ <Unit filename="..\src\mswin\WindowsPlayer.cpp" />
+ <Unit filename="..\src\mswin\WindowsPlayer.h" />
+ <Unit filename="..\src\mswin\config.h" />
+ <Unit filename="..\src\mswin\jazz.rc">
+ <Option compilerVar="WINDRES" />
+ </Unit>
+ <Extensions>
+ <code_completion />
+ <envvars />
+ <debugger />
+ </Extensions>
+ </Project>
+</CodeBlocks_project_file>
Added: trunk/jazz/portmidi/pm_win/portmidi-mingw.cbp
===================================================================
--- trunk/jazz/portmidi/pm_win/portmidi-mingw.cbp (rev 0)
+++ trunk/jazz/portmidi/pm_win/portmidi-mingw.cbp 2013-03-18 19:11:43 UTC (rev 981)
@@ -0,0 +1,80 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
+<CodeBlocks_project_file>
+ <FileVersion major="1" minor="6" />
+ <Project>
+ <Option title="portmidi" />
+ <Option pch_mode="2" />
+ <Option compiler="gnu_gcc" />
+ <Build>
+ <Target title="Debug MinGW Win32">
+ <Option output=".\Debug MinGW Win32\libportmidi" prefix_auto="1" extension_auto="1" />
+ <Option working_dir="" />
+ <Option object_output=".\Debug MinGW Win32\obj" />
+ <Option type="2" />
+ <Option compiler="gnu_gcc" />
+ <Option createDefFile="1" />
+ <Compiler>
+ <Add option="-W" />
+ <Add option="-Wall" />
+ <Add option="-g" />
+ <Add option="-DWIN32" />
+ <Add option="-D_DEBUG" />
+ <Add directory="..\pm_common" />
+ <Add directory="..\porttime" />
+ <Add directory="..\pm_win" />
+ </Compiler>
+ <ResourceCompiler>
+ <Add directory="..\pm_common" />
+ <Add directory="..\porttime" />
+ <Add directory="..\pm_win" />
+ </ResourceCompiler>
+ </Target>
+ <Target title="Release MinGW Win32">
+ <Option output=".\Release MinGW Win32\libportmidi" prefix_auto="1" extension_auto="1" />
+ <Option working_dir="" />
+ <Option object_output=".\Release MinGW Win32\obj" />
+ <Option type="2" />
+ <Option compiler="gnu_gcc" />
+ <Option createDefFile="1" />
+ <Compiler>
+ <Add option="-O2" />
+ <Add option="-W" />
+ <Add option="-Wall" />
+ <Add option="-DWIN32" />
+ <Add directory="..\pm_common" />
+ <Add directory="..\porttime" />
+ <Add directory="..\pm_win" />
+ </Compiler>
+ <ResourceCompiler>
+ <Add directory="..\pm_common" />
+ <Add directory="..\porttime" />
+ <Add directory="..\pm_win" />
+ </ResourceCompiler>
+ </Target>
+ </Build>
+ <VirtualTargets>
+ <Add alias="#All" targets="Debug MinGW Win32;Release MinGW Win32;" />
+ </VirtualTargets>
+ <Unit filename="..\pm_common\pminternal.h" />
+ <Unit filename="..\pm_common\pmutil.c">
+ <Option compilerVar="CC" />
+ </Unit>
+ <Unit filename="..\pm_common\pmutil.h" />
+ <Unit filename="..\pm_common\portmidi.c">
+ <Option compilerVar="CC" />
+ </Unit>
+ <Unit filename="..\pm_common\portmidi.h" />
+ <Unit filename="pmwin.c">
+ <Option compilerVar="CC" />
+ </Unit>
+ <Unit filename="pmwinmm.c">
+ <Option compilerVar="CC" />
+ </Unit>
+ <Unit filename="pmwinmm.h" />
+ <Extensions>
+ <code_completion />
+ <envvars />
+ <debugger />
+ </Extensions>
+ </Project>
+</CodeBlocks_project_file>
Added: trunk/jazz/portmidi/porttime/porttime-mingw.cbp
===================================================================
--- trunk/jazz/portmidi/porttime/porttime-mingw.cbp (rev 0)
+++ trunk/jazz/portmidi/porttime/porttime-mingw.cbp 2013-03-18 19:11:43 UTC (rev 981)
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
+<CodeBlocks_project_file>
+ <FileVersion major="1" minor="6" />
+ <Project>
+ <Option title="porttime" />
+ <Option pch_mode="2" />
+ <Option compiler="gnu_gcc" />
+ <Build>
+ <Target title="Release MinGW Win32">
+ <Option output=".\Release MinGW Win32\libporttime" prefix_auto="1" extension_auto="1" />
+ <Option working_dir="" />
+ <Option object_output="Release MinGW Win32\obj" />
+ <Option type="2" />
+ <Option compiler="gnu_gcc" />
+ <Option createDefFile="1" />
+ <Compiler>
+ <Add option="-O2" />
+ <Add option="-W" />
+ <Add option="-DWIN32" />
+ <Add option="-DNDEBUG" />
+ </Compiler>
+ </Target>
+ <Target title="Debug MinGW Win32">
+ <Option output=".\Debug MinGW Win32\libporttime" prefix_auto="1" extension_auto="1" />
+ <Option working_dir="" />
+ <Option object_output="Debug MinGW Win32\obj" />
+ <Option type="2" />
+ <Option compiler="gnu_gcc" />
+ <Option createDefFile="1" />
+ <Compiler>
+ <Add option="-W" />
+ <Add option="-Wall" />
+ <Add option="-g" />
+ <Add option="-DWIN32" />
+ <Add option="-DDEBUG" />
+ </Compiler>
+ </Target>
+ </Build>
+ <VirtualTargets>
+ <Add alias="#All" targets="Release MinGW Win32;Debug MinGW Win32;" />
+ </VirtualTargets>
+ <Unit filename="porttime.c">
+ <Option compilerVar="CC" />
+ </Unit>
+ <Unit filename="porttime.h" />
+ <Unit filename="ptwinmm.c">
+ <Option compilerVar="CC" />
+ </Unit>
+ <Extensions>
+ <code_completion />
+ <envvars />
+ <debugger />
+ </Extensions>
+ </Project>
+</CodeBlocks_project_file>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <pst...@us...> - 2013-03-18 19:09:40
|
Revision: 980
http://sourceforge.net/p/jazzplusplus/code/980
Author: pstieber
Date: 2013-03-18 19:09:37 +0000 (Mon, 18 Mar 2013)
Log Message:
-----------
Added a Jazz++ initialization file for a Roland TD-20 drum kit with
an expansion board.
Added Paths:
-----------
trunk/jazz/conf/Roland-TD-20-DrumSets.jzi
trunk/jazz/conf/Roland-TD-20.jzi
Added: trunk/jazz/conf/Roland-TD-20-DrumSets.jzi
===================================================================
--- trunk/jazz/conf/Roland-TD-20-DrumSets.jzi (rev 0)
+++ trunk/jazz/conf/Roland-TD-20-DrumSets.jzi 2013-03-18 19:09:37 UTC (rev 980)
@@ -0,0 +1,15 @@
+# Drumsets for a Roland TD-20 synthesizer
+
+# Names for the program change events that select different drumsets on
+# a drum track.
+.drumsets
+
+0 1 Standard Drums
+8 9 Room Set
+16 17 Power Set
+24 25 Electronic Set
+25 26 TR-808 Set
+32 33 Jazz Set
+40 41 Brush Set
+48 49 Orchestra Set
+64 65 Studio Kit
Added: trunk/jazz/conf/Roland-TD-20.jzi
===================================================================
--- trunk/jazz/conf/Roland-TD-20.jzi (rev 0)
+++ trunk/jazz/conf/Roland-TD-20.jzi 2013-03-18 19:09:37 UTC (rev 980)
@@ -0,0 +1,5 @@
+.synth_type GS
+.include gsdrmset.jzi
+.include gmdrmnam.jzi
+.include gsvoices.jzi
+.include ctrlnam.jzi
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <pst...@us...> - 2013-03-18 19:05:03
|
Revision: 979
http://sourceforge.net/p/jazzplusplus/code/979
Author: pstieber
Date: 2013-03-18 19:05:00 +0000 (Mon, 18 Mar 2013)
Log Message:
-----------
1. Updated to use wxDC& instead of 2xDC*.
2. Changed C-style comments to C++ inline comments.
3. Replaced mpPianoWindow->mpSnapSel->IsSelected() with
mpPianoWindow->AreEventsSelected(). This allowed a change
in the scope of mpSnapSel from public to protected.
Modified Paths:
--------------
trunk/jazz/src/ControlEdit.cpp
trunk/jazz/src/ControlEdit.h
Modified: trunk/jazz/src/ControlEdit.cpp
===================================================================
--- trunk/jazz/src/ControlEdit.cpp 2013-03-18 19:02:18 UTC (rev 978)
+++ trunk/jazz/src/ControlEdit.cpp 2013-03-18 19:05:00 UTC (rev 979)
@@ -248,12 +248,11 @@
}
-/*void JZCtrlEditBase::Revert(wxButton &but, wxCommandEvent& event)
-{
- JZControlPanel *panel = (JZControlPanel *)but.GetParent();
- panel->edit->OnRevert();
-}
-*/
+//void JZCtrlEditBase::Revert(wxButton &but, wxCommandEvent& event)
+//{
+// JZControlPanel *panel = (JZControlPanel *)but.GetParent();
+// panel->edit->OnRevert();
+//}
void JZCtrlEditBase::OnApply()
@@ -381,7 +380,7 @@
// SN++ Has 3 Modes (bars_state) 0: no Bars, 1,2: draw Bars
// av: called by JZArrayEdit::OnPaint
-void JZCtrlEditBase::DrawBars(wxDC* dc)
+void JZCtrlEditBase::DrawBars(wxDC& Dc)
{
JZBarInfo BarInfo(*mpPianoWindow->GetProject());
BarInfo.SetClock(from_clock);
@@ -394,14 +393,14 @@
{
gclk = BarInfo.GetClock();
x = mpPianoWindow->Clock2x(gclk-from_clock);
- edit->DrawBarLine(dc, x - x_off);
+ edit->DrawBarLine(Dc, x - x_off);
if (bars_state == 2)
{
for (ii = 0; ii < BarInfo.GetCountsPerBar(); ++ii)
{
gclk += BarInfo.GetTicksPerBar() / BarInfo.GetCountsPerBar();
x = mpPianoWindow->Clock2x(gclk-from_clock);
- edit->DrawBarLine(dc, x - x_off);
+ edit->DrawBarLine(Dc, x - x_off);
}
}
BarInfo.Next();
@@ -514,7 +513,7 @@
{
// SN++ Falls im PianoWin Events selektiert sind, werden nur diese
// Events geaendert
- if (!mpPianoWindow->mpSnapSel->IsSelected())
+ if (!mpPianoWindow->AreEventsSelected())
{
return (pEvent->IsKeyOn() != 0);
}
@@ -545,7 +544,7 @@
JZEventIterator iter(track);
- if (mpPianoWindow->mpSnapSel->IsSelected())
+ if (mpPianoWindow->AreEventsSelected())
{
from_clk = mpPianoWindow->GetFilter()->GetFromClock();
to_clk = mpPianoWindow->GetFilter()->GetToClock();
@@ -563,7 +562,7 @@
// SN++ Falls im PianoWin Events selektiert sind, werden nur diese
// Events geaendert
if (
- !mpPianoWindow->mpSnapSel->IsSelected() ||
+ !mpPianoWindow->AreEventsSelected() ||
mpPianoWindow->GetFilter()->IsSelected(pEvent))
{
@@ -615,7 +614,7 @@
// SN++ Falls im PianoWin Events selektiert sind, werden nur diese
// Events geaendert
- if (!mpPianoWindow->mpSnapSel->IsSelected())
+ if (!mpPianoWindow->AreEventsSelected())
{
return pEvent->IsKeyPressure() != 0;
}
@@ -649,7 +648,7 @@
JZEvent* pEvent;
// SN++ Apply works only if some events are selected !!
- if (!mpPianoWindow->mpSnapSel->IsSelected())
+ if (!mpPianoWindow->AreEventsSelected())
{
OnRevert();
return;
@@ -660,7 +659,7 @@
JZEventIterator iter(track);
- if (mpPianoWindow->mpSnapSel->IsSelected())
+ if (mpPianoWindow->AreEventsSelected())
{
from_clk = mpPianoWindow->GetFilter()->GetFromClock();
to_clk = mpPianoWindow->GetFilter()->GetToClock();
@@ -681,7 +680,7 @@
while (pEvent)
{
if (
- !mpPianoWindow->mpSnapSel->IsSelected() ||
+ !mpPianoWindow->AreEventsSelected() ||
mpPianoWindow->GetFilter()->IsSelected(pEvent))
{
JZKeyPressureEvent* pKeyPressure = pEvent->IsKeyPressure();
@@ -701,7 +700,7 @@
while (pEvent)
{
if (
- !mpPianoWindow->mpSnapSel->IsSelected() ||
+ !mpPianoWindow->AreEventsSelected() ||
mpPianoWindow->GetFilter()->IsSelected(pEvent))
{
pKeyOn = pEvent->IsKeyOn();
@@ -749,7 +748,7 @@
while (pEvent)
{
if (
- !mpPianoWindow->mpSnapSel->IsSelected() ||
+ !mpPianoWindow->AreEventsSelected() ||
mpPianoWindow->GetFilter()->IsSelected(pEvent))
{
if (pEvent->IsKeyPressure())
Modified: trunk/jazz/src/ControlEdit.h
===================================================================
--- trunk/jazz/src/ControlEdit.h 2013-03-18 19:02:18 UTC (rev 978)
+++ trunk/jazz/src/ControlEdit.h 2013-03-18 19:05:00 UTC (rev 979)
@@ -140,7 +140,7 @@
// SN++
static void Edit(wxButton &but, wxCommandEvent& event);
static void Bars(wxButton &but, wxCommandEvent& event);
- void DrawBars(wxDC* dc);
+ void DrawBars(wxDC& Dc);
};
class JZPitchEdit : public JZCtrlEditBase
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <pst...@us...> - 2013-03-18 19:02:21
|
Revision: 978
http://sourceforge.net/p/jazzplusplus/code/978
Author: pstieber
Date: 2013-03-18 19:02:18 +0000 (Mon, 18 Mar 2013)
Log Message:
-----------
Replaced the JZTrackWindow data members
int mBarCount;
int mBarX[eMaxBars];
with
std::vector<int> mBarX;
This removed the 200 measure limit.
Modified Paths:
--------------
trunk/jazz/src/TrackWindow.cpp
trunk/jazz/src/TrackWindow.h
Modified: trunk/jazz/src/TrackWindow.cpp
===================================================================
--- trunk/jazz/src/TrackWindow.cpp 2013-03-18 19:00:06 UTC (rev 977)
+++ trunk/jazz/src/TrackWindow.cpp 2013-03-18 19:02:18 UTC (rev 978)
@@ -80,7 +80,7 @@
mStateWidth(),
mPatchX(0),
mPatchWidth(0),
- mBarCount(0),
+ mBarX(),
mCounterMode(eCmProgram),
mNumberMode(eNmMidiChannel),
mpFixedFont(0),
@@ -637,7 +637,7 @@
BarInfo.SetClock(mFromClock);
- mBarCount = 0;
+ mBarX.clear();
int Intro = gpProject->GetIntroLength();
LocalDc.SetPen(*wxGREY_PEN);
while (1)
@@ -682,12 +682,9 @@
}
// x-coordinate for MouseAction->Snap()
- if (mBarCount < eMaxBars)
- {
- mBarX[mBarCount++] = x;
-//DEBUG LocalDc.SetPen(*wxRED_PEN);
-//DEBUG LocalDc.DrawLine(x, 0, x, mCanvasHeight);
- }
+ mBarX.push_back(x);
+//DEBUG LocalDc.SetPen(*wxRED_PEN);
+//DEBUG LocalDc.DrawLine(x, 0, x, mCanvasHeight);
}
BarInfo.Next();
}
@@ -1176,7 +1173,7 @@
//-----------------------------------------------------------------------------
//int JZTrackWindow::x2xBar(int x)
//{
-// for (int i = 1; i < mBarCount; ++i)
+// for (int i = 1; i < mBarX.size(); ++i)
// {
// if (x < mBarX[i])
// {
@@ -1190,7 +1187,7 @@
//-----------------------------------------------------------------------------
//int JZTrackWindow::x2wBar(int x)
//{
-// for (int i = 1; i < mBarCount; ++i)
+// for (int i = 1; i < mBarX.size(); ++i)
// {
// if (x < mBarX[i])
// {
@@ -1436,7 +1433,7 @@
//-----------------------------------------------------------------------------
void JZTrackWindow::SnapSelectionStart(wxMouseEvent& MouseEvent)
{
- mpSnapSel->SetXSnap(mBarCount, mBarX, mScrolledX);
+ mpSnapSel->SetXSnap(mBarX, mScrolledX);
mpSnapSel->SetYSnap(
TrackIndex2y(mFromLine),
mEventsY + mEventsHeight + mScrolledY,
Modified: trunk/jazz/src/TrackWindow.h
===================================================================
--- trunk/jazz/src/TrackWindow.h 2013-03-18 19:00:06 UTC (rev 977)
+++ trunk/jazz/src/TrackWindow.h 2013-03-18 19:02:18 UTC (rev 978)
@@ -55,11 +55,6 @@
{
public:
- enum TELimits
- {
- eMaxBars = 200
- };
-
JZTrackWindow(
wxFrame* pParent,
JZProject* pProject,
@@ -169,8 +164,7 @@
int mStateX, mStateWidth;
int mPatchX, mPatchWidth;
- int mBarCount;
- int mBarX[eMaxBars];
+ std::vector<int> mBarX;
TECounterModes mCounterMode;
TENumberModes mNumberMode;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <pst...@us...> - 2013-03-18 19:00:11
|
Revision: 977
http://sourceforge.net/p/jazzplusplus/code/977
Author: pstieber
Date: 2013-03-18 19:00:06 +0000 (Mon, 18 Mar 2013)
Log Message:
-----------
1. Made JZEventWindow::AreEventsSelected constant.
2. Made JZEventWindow::mpSnapSel protected.
3. Fixed a bug in JZEventWindow::OnMouseEvent. The prior version
was inadvertently deleting the mpSnapSel data member.
Modified Paths:
--------------
trunk/jazz/src/EventWindow.cpp
trunk/jazz/src/EventWindow.h
Modified: trunk/jazz/src/EventWindow.cpp
===================================================================
--- trunk/jazz/src/EventWindow.cpp 2013-03-18 18:57:43 UTC (rev 976)
+++ trunk/jazz/src/EventWindow.cpp 2013-03-18 19:00:06 UTC (rev 977)
@@ -118,7 +118,7 @@
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
-bool JZEventWindow::AreEventsSelected()
+bool JZEventWindow::AreEventsSelected() const
{
return mpSnapSel->IsSelected();
}
@@ -585,8 +585,11 @@
// inefficient, invalidate rect first instead.
Refresh();
}
+ else
+ {
+ delete mpMouseAction;
+ }
- delete mpMouseAction;
mpMouseAction = 0;
}
}
Modified: trunk/jazz/src/EventWindow.h
===================================================================
--- trunk/jazz/src/EventWindow.h 2013-03-18 18:57:43 UTC (rev 976)
+++ trunk/jazz/src/EventWindow.h 2013-03-18 19:00:06 UTC (rev 977)
@@ -50,7 +50,7 @@
// WARNING: non-constant access.
JZProject* GetProject() const;
- bool AreEventsSelected();
+ bool AreEventsSelected() const;
bool EventsSelected(const wxString& Message) const;
@@ -117,10 +117,12 @@
void OnMouseEvent(wxMouseEvent& MouseEvent);
- public:
+ protected:
JZSnapSelection* mpSnapSel;
+ public:
+
JZFilter* mpFilter;
JZMouseAction* mpMouseAction;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <pst...@us...> - 2013-03-18 18:57:46
|
Revision: 976
http://sourceforge.net/p/jazzplusplus/code/976
Author: pstieber
Date: 2013-03-18 18:57:43 +0000 (Mon, 18 Mar 2013)
Log Message:
-----------
Replaced data members for X snap locations with a local std::vector<int>.
Modified Paths:
--------------
trunk/jazz/src/PianoWindow.cpp
trunk/jazz/src/PianoWindow.h
Modified: trunk/jazz/src/PianoWindow.cpp
===================================================================
--- trunk/jazz/src/PianoWindow.cpp 2013-03-18 18:56:00 UTC (rev 975)
+++ trunk/jazz/src/PianoWindow.cpp 2013-03-18 18:57:43 UTC (rev 976)
@@ -668,7 +668,6 @@
: JZEventWindow(pPianoFrame, pProject, Position, Size),
mpPianoFrame(pPianoFrame),
mPlayClock(-1),
- mSnapCount(0),
mPasteBuffer(),
mpTrack(0),
mTrackIndex(0),
@@ -2014,22 +2013,16 @@
//-----------------------------------------------------------------------------
void JZPianoWindow::SnapSelectionStart(wxMouseEvent& MouseEvent)
{
- mSnapCount = 0;
int clk = SnapClock(mFromClock, false);
int qnt = SnapClocks();
- while (clk <= mToClock && mSnapCount < eMaxSnaps)
+ vector<int> XSnaps;
+ while (clk <= mToClock)
{
- mSnapsX[mSnapCount++] = Clock2x(clk);
+ XSnaps.push_back(Clock2x(clk));
clk += qnt;
}
- if (mSnapCount < eMaxSnaps)
- {
- mpSnapSel->SetXSnap(mSnapCount, mSnapsX, 0);
- }
- else
- {
- mpSnapSel->SetXSnap(0, 0, 0);
- }
+ mpSnapSel->SetXSnap(XSnaps, 0);
+
mpSnapSel->SetYSnap(
mFromLine * mTrackHeight + mTopInfoHeight,
mEventsY + mEventsHeight,
Modified: trunk/jazz/src/PianoWindow.h
===================================================================
--- trunk/jazz/src/PianoWindow.h 2013-03-18 18:56:00 UTC (rev 975)
+++ trunk/jazz/src/PianoWindow.h 2013-03-18 18:57:43 UTC (rev 976)
@@ -206,15 +206,8 @@
int mPlayClock;
- enum TESizes
- {
- eMaxSnaps = 500
- };
+ public:
- int mSnapCount;
-
- int mSnapsX[eMaxSnaps];
-
JZEventArray mPasteBuffer;
public:
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <pst...@us...> - 2013-03-18 18:56:03
|
Revision: 975
http://sourceforge.net/p/jazzplusplus/code/975
Author: pstieber
Date: 2013-03-18 18:56:00 +0000 (Mon, 18 Mar 2013)
Log Message:
-----------
Updated JZSnapSelection vector processing to use std::vector instead of
C-style arrays.
Modified Paths:
--------------
trunk/jazz/src/MouseAction.cpp
trunk/jazz/src/MouseAction.h
Modified: trunk/jazz/src/MouseAction.cpp
===================================================================
--- trunk/jazz/src/MouseAction.cpp 2013-03-18 18:54:14 UTC (rev 974)
+++ trunk/jazz/src/MouseAction.cpp 2013-03-18 18:56:00 UTC (rev 975)
@@ -397,7 +397,7 @@
{
if (!mXCoordinates.empty())
{
- SnapToVector(x, mXCoordinates, ScrolledX, Up);
+ SnapToXVector(x, ScrolledX, Up);
}
else if (mXStep)
{
@@ -406,7 +406,7 @@
if (!mYCoordinates.empty())
{
- SnapToVector(y, mYCoordinates, ScrolledY, Up);
+ SnapToYVector(y, ScrolledY, Up);
}
else if (mYStep)
{
@@ -416,24 +416,32 @@
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
-void JZSnapSelection::SetXSnap(int XCount, int* pXVector, int ScrolledX)
+void JZSnapSelection::SetXSnap(const vector<int>& XVector, int ScrolledX)
{
mXCoordinates.clear();
- for (int i = 0; i < XCount; ++i)
+ for (
+ vector<int>::const_iterator iXValue = XVector.begin();
+ iXValue != XVector.end();
+ ++iXValue)
{
- mXCoordinates.push_back(pXVector[i] + ScrolledX);
+ const int& XValue = *iXValue;
+ mXCoordinates.push_back(XValue + ScrolledX);
}
mXStep = 0;
}
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
-void JZSnapSelection::SetYSnap(int YCount, int* pYVector, int ScrolledY)
+void JZSnapSelection::SetYSnap(const vector<int>& YVector, int ScrolledY)
{
mYCoordinates.clear();
- for (int i = 0; i < YCount; ++i)
+ for (
+ vector<int>::const_iterator iYValue = YVector.begin();
+ iYValue != YVector.end();
+ ++iYValue)
{
- mXCoordinates.push_back(pYVector[i] + ScrolledY);
+ const int& YValue = *iYValue;
+ mYCoordinates.push_back(YValue + ScrolledY);
}
mYStep = 0;
}
@@ -460,35 +468,62 @@
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
-void JZSnapSelection::SnapToVector(
+void JZSnapSelection::SnapToXVector(
int& Coordinate,
- vector<int> Vector,
int Scrolled,
- bool Up)
+ bool Up) const
{
//DEBUG cout << "In: " << Coordinate;
- for (unsigned i = 0; i < Vector.size(); ++i)
+ for (unsigned i = 0; i < mXCoordinates.size(); ++i)
{
- if (Vector[i] > Coordinate)
+ if (mXCoordinates[i] > Coordinate)
{
if (Up || i == 0)
{
- Coordinate = Vector[i];
+ Coordinate = mXCoordinates[i];
}
else
{
- Coordinate = Vector[i - 1];
+ Coordinate = mXCoordinates[i - 1];
}
//DEBUG cout << " Out: " << Coordinate << endl;
return;
}
}
//DEBUG cout << " Out: " << Coordinate << endl;
- Coordinate = Vector[Vector.size() - 1];
+ Coordinate = mXCoordinates[mXCoordinates.size() - 1];
}
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
+void JZSnapSelection::SnapToYVector(
+ int& Coordinate,
+ int Scrolled,
+ bool Up) const
+{
+//DEBUG cout << "In: " << Coordinate;
+ for (unsigned i = 0; i < mYCoordinates.size(); ++i)
+ {
+ if (mYCoordinates[i] > Coordinate)
+ {
+ if (Up || i == 0)
+ {
+ Coordinate = mYCoordinates[i];
+ }
+ else
+ {
+ Coordinate = mYCoordinates[i - 1];
+ }
+//DEBUG cout << " Out: " << Coordinate << endl;
+ return;
+ }
+ }
+//DEBUG cout << " Out: " << Coordinate << endl;
+ Coordinate = mYCoordinates[mYCoordinates.size() - 1];
+}
+
+//-----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
void JZSnapSelection::SnapMod(
int& Coordinate,
int Min,
Modified: trunk/jazz/src/MouseAction.h
===================================================================
--- trunk/jazz/src/MouseAction.h 2013-03-18 18:54:14 UTC (rev 974)
+++ trunk/jazz/src/MouseAction.h 2013-03-18 18:56:00 UTC (rev 975)
@@ -257,9 +257,9 @@
int ScrolledY,
bool Up);
- void SetXSnap(int XCount, int* pXVector, int ScrolledX);
+ void SetXSnap(const std::vector<int>& XVector, int ScrolledX);
- void SetYSnap(int YCount, int* pYVector, int ScrolledY);
+ void SetYSnap(const std::vector<int>& YVector, int ScrolledY);
void SetXSnap(int XMin, int XMax, int XStep);
@@ -267,12 +267,10 @@
private:
- static void SnapToVector(
- int& Coordinate,
- std::vector<int> Vector,
- int Scrolled,
- bool Up);
+ void SnapToXVector(int& Coordinate, int Scrolled, bool Up) const;
+ void SnapToYVector(int& Coordinate, int Scrolled, bool Up) const;
+
static void SnapMod(
int& Coordinate,
int Min,
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <pst...@us...> - 2013-03-18 18:54:17
|
Revision: 974
http://sourceforge.net/p/jazzplusplus/code/974
Author: pstieber
Date: 2013-03-18 18:54:14 +0000 (Mon, 18 Mar 2013)
Log Message:
-----------
1. Used JZEventWindow::AreEventsSelected() instead of
gpTrackWindow->mpSnapSel->IsSelected().
2. Updated some variable names and fixed line wrap.
Modified Paths:
--------------
trunk/jazz/src/Harmony.cpp
Modified: trunk/jazz/src/Harmony.cpp
===================================================================
--- trunk/jazz/src/Harmony.cpp 2013-03-18 18:51:59 UTC (rev 973)
+++ trunk/jazz/src/Harmony.cpp 2013-03-18 18:54:14 UTC (rev 974)
@@ -1426,11 +1426,13 @@
wxMessageBox("define a chord sequence first", "error", wxOK);
return;
}
- if (gpTrackWindow->EventsSelected("please select destination range in track window"))
+ if (
+ gpTrackWindow->EventsSelected(
+ "please select destination range in track window"))
{
wxBeginBusyCursor();
- JZHarmonyBrowserAnalyzer analyzer(mSequence, mSequenceCount);
- analyzer.Transpose(gpTrackWindow->mpFilter, transpose_res);
+ JZHarmonyBrowserAnalyzer HarmonyBrowserAnalyzer(mSequence, mSequenceCount);
+ HarmonyBrowserAnalyzer.Transpose(gpTrackWindow->mpFilter, transpose_res);
wxEndBusyCursor();
}
}
@@ -1494,11 +1496,16 @@
break;
case MEN_ANALYZE:
- if (gpTrackWindow->EventsSelected("please select source range in track window"))
+ if (
+ gpTrackWindow->EventsSelected(
+ "please select source range in track window"))
{
wxBeginBusyCursor();
- JZHarmonyBrowserAnalyzer analyzer(mSequence, (int)SEQMAX);
- mSequenceCount = analyzer.Analyze(gpTrackWindow->mpFilter, analyze_res);
+ JZHarmonyBrowserAnalyzer
+ HarmonyBrowserAnalyzer(mSequence, (int)SEQMAX);
+ mSequenceCount = HarmonyBrowserAnalyzer.Analyze(
+ gpTrackWindow->mpFilter,
+ analyze_res);
Refresh();
wxEndBusyCursor();
}
@@ -1520,13 +1527,14 @@
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
-JZHarmonyBrowserAnalyzer * JZHarmonyBrowserCanvas::GetAnalyzer()
+JZHarmonyBrowserAnalyzer* JZHarmonyBrowserCanvas::GetAnalyzer()
{
- if (mSequenceCount > 0 && gpTrackWindow->mpSnapSel->IsSelected())
+ if (mSequenceCount > 0 && gpTrackWindow->AreEventsSelected())
{
- JZHarmonyBrowserAnalyzer *analyzer = new JZHarmonyBrowserAnalyzer(mSequence, mSequenceCount);
- analyzer->Init(gpTrackWindow->mpFilter, transpose_res);
- return analyzer;
+ JZHarmonyBrowserAnalyzer* pHarmonyBrowserAnalyzer =
+ new JZHarmonyBrowserAnalyzer(mSequence, mSequenceCount);
+ pHarmonyBrowserAnalyzer->Init(gpTrackWindow->mpFilter, transpose_res);
+ return pHarmonyBrowserAnalyzer;
}
return 0;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <pst...@us...> - 2013-03-18 18:52:02
|
Revision: 973
http://sourceforge.net/p/jazzplusplus/code/973
Author: pstieber
Date: 2013-03-18 18:51:59 +0000 (Mon, 18 Mar 2013)
Log Message:
-----------
1. Updated to use wxDC& instead of wxDC*.
2. Renamed JZArrayEdit::style_bits to mStyleBits.
3. Made some cosmetic indentation changes.
4. Made stack client DCs instead of heap.
5. Put curly brackets around for/if blocks.
6. Updated some comments.
Modified Paths:
--------------
trunk/jazz/src/Random.cpp
trunk/jazz/src/Random.h
Modified: trunk/jazz/src/Random.cpp
===================================================================
--- trunk/jazz/src/Random.cpp 2013-03-18 18:47:25 UTC (rev 972)
+++ trunk/jazz/src/Random.cpp 2013-03-18 18:51:59 UTC (rev 973)
@@ -260,7 +260,14 @@
// length of tickmark line
#define TICK_LINE 0
-JZArrayEdit::JZArrayEdit(wxFrame *frame, JZRndArray &ar, int xx, int yy, int ww, int hh, int sty)
+JZArrayEdit::JZArrayEdit(
+ wxFrame *frame,
+ JZRndArray &ar,
+ int xx,
+ int yy,
+ int ww,
+ int hh,
+ int StyleBits)
: wxScrolledWindow(frame, wxID_ANY, wxPoint(xx, yy), wxSize(ww, hh)),
mArray(ar),
n(ar.n),
@@ -272,7 +279,7 @@
enabled = 1;
dragging = 0;
index = -1;
- style_bits = sty;
+ mStyleBits = StyleBits;
xmin = 0;
xmax = n;
@@ -284,17 +291,17 @@
int tw, th;
- wxDC *dc = new wxClientDC(this);
- dc->SetFont(*wxSMALL_FONT);
- dc->GetTextExtent("123", &tw, &th);
+ wxClientDC Dc(this);
+ Dc.SetFont(*wxSMALL_FONT);
+ Dc.GetTextExtent("123", &tw, &th);
- if (style_bits & ARED_XTICKS)
+ if (mStyleBits & ARED_XTICKS)
{
// leave space for bottomline
h -= (int)th;
}
- if (style_bits & (ARED_MINMAX | ARED_YTICKS))
+ if (mStyleBits & (ARED_MINMAX | ARED_YTICKS))
{
// leave space to display min / max
x = (int)(tw + TICK_LINE);
@@ -319,13 +326,12 @@
int tw, th;
- wxClientDC* dc=new wxClientDC(this);
- dc->GetTextExtent("123", &tw, &th);
- delete dc;
+ wxClientDC Dc(this);
+ Dc.GetTextExtent("123", &tw, &th);
- if (style_bits & ARED_XTICKS)
+ if (mStyleBits & ARED_XTICKS)
h -= (int)th;
- if (style_bits & (ARED_MINMAX | ARED_YTICKS))
+ if (mStyleBits & (ARED_MINMAX | ARED_YTICKS))
{
x = (int)(tw + TICK_LINE);
w -= (int)(tw + TICK_LINE);
@@ -337,13 +343,13 @@
{
}
-void JZArrayEdit::DrawBar(wxDC *dc, int i, int black)
+void JZArrayEdit::DrawBar(wxDC& Dc, int i, int black)
{
- if (style_bits & ARED_LINES)
+ if (mStyleBits & ARED_LINES)
{
if (!black)
{
- dc->SetPen(*wxWHITE_PEN);
+ Dc.SetPen(*wxWHITE_PEN);
}
JZMapper XMap(0, n, 0, w);
@@ -356,23 +362,25 @@
// draw line to prev position
int x0 = (int)XMap.XToY(i - 0.5);
int y0 = (int)YMap.XToY(mArray[i-1]);
- dc->DrawLine(x0, y0, x1, y1);
+ Dc.DrawLine(x0, y0, x1, y1);
}
if (i < n-1)
{
// draw line to next position
int x2 = (int)XMap.XToY(i + 1.5);
int y2 = (int)YMap.XToY(mArray[i+1]);
- dc->DrawLine(x1, y1, x2, y2);
+ Dc.DrawLine(x1, y1, x2, y2);
}
if (!black)
- dc->SetPen(*wxBLACK_PEN);
+ {
+ Dc.SetPen(*wxBLACK_PEN);
+ }
return;
}
int gap = 0;
- if (style_bits & ARED_GAP)
+ if (mStyleBits & ARED_GAP)
{
gap = w / n / 6;
if (!gap && w / n > 3)
@@ -384,7 +392,7 @@
xbar = x + i * w / n + gap;
hbar = h * (mArray[i] - nul) / (max - min);
- if (style_bits & ARED_BLOCKS)
+ if (mStyleBits & ARED_BLOCKS)
{
/*
ybar = ynul - hbar;
@@ -425,15 +433,17 @@
if (!black)
{
- dc->SetBrush(*wxWHITE_BRUSH);
- dc->SetPen(*wxWHITE_PEN);
+ Dc.SetBrush(*wxWHITE_BRUSH);
+ Dc.SetPen(*wxWHITE_PEN);
}
if (wbar && hbar)
- dc->DrawRectangle(xbar, ybar, wbar, hbar);
+ {
+ Dc.DrawRectangle(xbar, ybar, wbar, hbar);
+ }
if (!black)
{
- dc->SetBrush(*wxBLACK_BRUSH);
- dc->SetPen(*wxBLACK_PEN);
+ Dc.SetBrush(*wxBLACK_BRUSH);
+ Dc.SetPen(*wxBLACK_PEN);
}
}
@@ -451,18 +461,19 @@
return buf;
}
-void JZArrayEdit::DrawXTicks(wxDC* dc)
+void JZArrayEdit::DrawXTicks(wxDC& Dc)
{
int tw, th;
- if (!(style_bits & ARED_XTICKS))
+ if (!(mStyleBits & ARED_XTICKS))
+ {
return;
+ }
+ Dc.SetFont(*wxSMALL_FONT);
- dc->SetFont(*wxSMALL_FONT);
-
// compute tickmark x-distance
- dc->GetTextExtent("-123", &tw, &th);
+ Dc.GetTextExtent("-123", &tw, &th);
int max_labels = (int)(w / (tw + tw/2));
if (max_labels > 0)
{
@@ -473,30 +484,30 @@
{
const char *buf = GetXText(val);
//sprintf(buf, "%d", val);
- dc->GetTextExtent((char *)buf, &tw, &th);
+ Dc.GetTextExtent((char *)buf, &tw, &th);
float yy = y + h;
float xx = x + w * (val - xmin) / (xmax - xmin + 1);
xx -= tw/2; // center text
xx += 0.5 * w / n; // middle of bar
- dc->DrawText(buf, (int)xx, (int)yy);
- //dc->DrawLine(x - TICK_LINE, yy, x, yy);
+ Dc.DrawText(buf, (int)xx, (int)yy);
+ //Dc.DrawLine(x - TICK_LINE, yy, x, yy);
}
}
- dc->SetFont(*wxNORMAL_FONT);
+ Dc.SetFont(*wxNORMAL_FONT);
}
-void JZArrayEdit::DrawYTicks(wxDC* dc)
+void JZArrayEdit::DrawYTicks(wxDC& Dc)
{
- dc->SetFont(*wxSMALL_FONT);
+ Dc.SetFont(*wxSMALL_FONT);
- if (style_bits & ARED_YTICKS)
+ if (mStyleBits & ARED_YTICKS)
{
// compute tickmark y-distance
int tw, th;
- dc->GetTextExtent("-123", &tw, &th);
+ Dc.GetTextExtent("-123", &tw, &th);
int max_labels = (int)(h / (th + th/2));
if (max_labels > 0)
{
@@ -507,88 +518,98 @@
{
const char *buf = GetYText(val);
//sprintf(buf, "%d", val);
- dc->GetTextExtent((char *)buf, &tw, &th);
+ Dc.GetTextExtent((char *)buf, &tw, &th);
float yy = y + h - h * (val - min) / (max - min) - th/2;
- dc->DrawText(buf, x - tw - TICK_LINE, (int)yy);
- //dc->DrawLine(x - TICK_LINE, yy, x, yy);
+ Dc.DrawText(buf, x - tw - TICK_LINE, (int)yy);
+ //Dc.DrawLine(x - TICK_LINE, yy, x, yy);
}
}
}
- else if (style_bits & ARED_MINMAX)
+ else if (mStyleBits & ARED_MINMAX)
{
// min/max
int tw, th;
char buf[20];
sprintf(buf, "%d", max);
- dc->GetTextExtent(buf, &tw, &th);
- dc->DrawText(buf, x - tw, y);
+ Dc.GetTextExtent(buf, &tw, &th);
+ Dc.DrawText(buf, x - tw, y);
sprintf(buf, "%d", min);
- dc->GetTextExtent(buf, &tw, &th);
- dc->DrawText(buf, x - tw, y + h - th);
+ Dc.GetTextExtent(buf, &tw, &th);
+ Dc.DrawText(buf, x - tw, y + h - th);
}
- dc->SetFont(*wxNORMAL_FONT);
+ Dc.SetFont(*wxNORMAL_FONT);
}
-void JZArrayEdit::DrawLabel(wxDC* dc)
+void JZArrayEdit::DrawLabel(wxDC& Dc)
{
- dc->SetFont(*wxSMALL_FONT);
+ Dc.SetFont(*wxSMALL_FONT);
if (!mLabel.empty())
{
- dc->DrawText(mLabel.c_str(), x + 5, y + 2);
+ Dc.DrawText(mLabel.c_str(), x + 5, y + 2);
}
- dc->SetFont(*wxNORMAL_FONT);
+ Dc.SetFont(*wxNORMAL_FONT);
}
-void JZArrayEdit::OnDraw(wxDC& indc)
+void JZArrayEdit::OnDraw(wxDC& Dc)
{
int i;
- wxDC *dc = &indc; //just lazy...
// surrounding rectangle
- dc->Clear();
+ Dc.Clear();
if (enabled)
- dc->SetBrush(*wxWHITE_BRUSH);
+ {
+ Dc.SetBrush(*wxWHITE_BRUSH);
+ }
else
- dc->SetBrush(*wxGREY_BRUSH);
- dc->SetPen(*wxBLACK_PEN);
+ {
+ Dc.SetBrush(*wxGREY_BRUSH);
+ }
+
+ Dc.SetPen(*wxBLACK_PEN);
if (w && h)
- dc->DrawRectangle(x, y, w, h);
+ {
+ Dc.DrawRectangle(x, y, w, h);
+ }
// sliders
- dc->SetBrush(*wxBLACK_BRUSH);
- for (i = 0; i < n; i++)
- DrawBar(dc, i, 1);
+ Dc.SetBrush(*wxBLACK_BRUSH);
+ for (i = 0; i < n; ++i)
+ {
+ DrawBar(Dc, i, 1);
+ }
- DrawXTicks(dc);
- DrawLabel(dc);
- DrawYTicks(dc);
- DrawNull(dc);
+ DrawXTicks(Dc);
+ DrawLabel(Dc);
+ DrawYTicks(Dc);
+ DrawNull(Dc);
if (draw_bars)
- draw_bars->DrawBars(dc);
+ {
+ draw_bars->DrawBars(Dc);
+ }
}
-void JZArrayEdit::DrawNull(wxDC* dc)
+void JZArrayEdit::DrawNull(wxDC& Dc)
{
- dc->SetPen(*wxCYAN_PEN);
+ Dc.SetPen(*wxCYAN_PEN);
// draw y-null line
if (min < nul && nul < max)
- dc->DrawLine(x, ynul, x+w, ynul);
+ Dc.DrawLine(x, ynul, x+w, ynul);
// draw x-null line
if (xmin < 0 && 0 < xmax)
{
int x0 = w * (0 - xmin) / (xmax - xmin);
- dc->DrawLine(x0, y, x0, y + h);
+ Dc.DrawLine(x0, y, x0, y + h);
}
- dc->SetPen(*wxBLACK_PEN);
+ Dc.SetPen(*wxBLACK_PEN);
}
@@ -621,44 +642,46 @@
index = Index(MouseEvent);
}
+ wxClientDC Dc(this); // PORTING this is evil and shoud go
+
int val = nul;
if (MouseEvent.LeftIsDown())
{
int ex, ey;
MouseEvent.GetPosition(&ex, &ey);
+
+#if 0
+ {
+ // in msw ex,ey are 65536 for negative values!
+ char buf[500];
+ sprintf(buf, "x %4.0f, y %4.0f, sh %d", ex, ey, MouseEvent.ShiftDown());
+ Dc.DrawText(buf, 50, 50);
+ }
+#endif
+
// $blk$ val = (int)( (y + h - (short)ey) * (max - min) / h + min);
val = (int)( (double)(y + h - ey) * (max - min) / h + min + 0.5);
val = val > max ? max : val;
val = val < min ? min : val;
}
-#if 0
- {
- // in msw ex,ey are 65536 for negative values!
- wxDC *dc = new wxClientDC(this);//GetDC();
- char buf[500];
- sprintf(buf, "x %4.0f, y %4.0f, sh %d", ex, ey, MouseEvent.ShiftDown());
- dc->DrawText(buf, 50, 50);
- }
-#endif
- wxDC *dc = new wxClientDC(this); // PORTING this is evil and shoud go
if (MouseEvent.ShiftDown())
{
int k;
for (k = 0; k < n; k++)
{
- DrawBar(dc, k, 0);
+ DrawBar(Dc, k, 0);
mArray[k] = val;
- DrawBar(dc, k, 1);
+ DrawBar(Dc, k, 1);
}
}
else if (MouseEvent.ControlDown())
{
- DrawBar(dc, index, 0);
+ DrawBar(Dc, index, 0);
mArray[index] = val;
- DrawBar(dc, index, 1);
+ DrawBar(Dc, index, 1);
}
else
{
@@ -667,20 +690,20 @@
if (i < index)
for (; i <= index; i++)
{
- DrawBar(dc, i, 0);
+ DrawBar(Dc, i, 0);
mArray[i] = val;
- DrawBar(dc, i, 1);
+ DrawBar(Dc, i, 1);
}
else
for (; i >= index; i--)
{
- DrawBar(dc, i, 0);
+ DrawBar(Dc, i, 0);
mArray[i] = val;
- DrawBar(dc, i, 1);
+ DrawBar(Dc, i, 1);
}
index = k;
}
- delete dc;
+
return 0;
}
@@ -702,10 +725,9 @@
#endif
dragging = 0;
index = -1;
-// wxDC *dc = new wxClientDC(this); // PORTING this is evil and shoud go
-// DrawLabel(dc);
-// DrawNull(dc);
-// delete dc;
+// wxClientDC Dc(this); // PORTING this is evil and shoud go
+// DrawLabel(Dc);
+// DrawNull(Dc);
Refresh();
return 0;
}
@@ -747,16 +769,15 @@
ynul = y + h - h * (nul - min) / (max - min);
}
-void JZArrayEdit::DrawBarLine (wxDC *dc, int xx)
+void JZArrayEdit::DrawBarLine(wxDC& Dc, int xx)
{
- // wxDC *dc = new wxClientDC(this);//GetDC();
- // fprintf(stderr,"x: %ld, xx: %ld\n",x,xx);
+// cerr << "x: " << x << " xx: " << xx << endl;
if (xx > x && xx + 1 < x + w)
- {
- dc->SetPen (*wxLIGHT_GREY_PEN);
- dc->DrawLine (xx, y + 1, xx, y + h - 2);
- dc->SetPen (*wxBLACK_PEN);
- }
+ {
+ Dc.SetPen(*wxLIGHT_GREY_PEN);
+ Dc.DrawLine(xx, y + 1, xx, y + h - 2);
+ Dc.SetPen(*wxBLACK_PEN);
+ }
}
@@ -768,8 +789,8 @@
int yy,
int ww,
int hh,
- int sty)
- : JZArrayEdit(parent, Array, xx, yy, ww, hh, sty)
+ int StyleBits)
+ : JZArrayEdit(parent, Array, xx, yy, ww, hh, StyleBits)
{
steps_per_count = 4;
count_per_bar = 4;
@@ -786,20 +807,19 @@
}
-void JZRhyArrayEdit::DrawXTicks(wxDC* dc)
+void JZRhyArrayEdit::DrawXTicks(wxDC& Dc)
{
- if (!(style_bits & ARED_RHYTHM))
+ if (!(mStyleBits & ARED_RHYTHM))
{
- JZArrayEdit::DrawXTicks(dc);
+ JZArrayEdit::DrawXTicks(Dc);
return;
}
char buf[20];
int tw, th;
+ Dc.SetFont(*wxSMALL_FONT);
- dc->SetFont(*wxSMALL_FONT);
-
// tick marks
assert(steps_per_count && count_per_bar && n_bars);
int i;
@@ -809,10 +829,9 @@
sprintf(buf, "%d", mark);
int yy = y + h;
int xx = (int)(x + (i + 0.5) * w / n);
- dc->GetTextExtent(buf, &tw, &th);
+ Dc.GetTextExtent(buf, &tw, &th);
xx -= (int)(tw/2.0);
- dc->DrawText(buf, xx, yy);
+ Dc.DrawText(buf, xx, yy);
}
- dc->SetFont(*wxNORMAL_FONT);
+ Dc.SetFont(*wxNORMAL_FONT);
}
-
Modified: trunk/jazz/src/Random.h
===================================================================
--- trunk/jazz/src/Random.h 2013-03-18 18:47:25 UTC (rev 972)
+++ trunk/jazz/src/Random.h 2013-03-18 18:51:59 UTC (rev 973)
@@ -143,7 +143,7 @@
{
}
- virtual void DrawBars(wxDC* pDc) = 0;
+ virtual void DrawBars(wxDC& Dc) = 0;
};
@@ -153,7 +153,7 @@
// paint position
int x, y, w, h, ynul;
- void DrawBar(wxDC *dc, int i, int black);
+ void DrawBar(wxDC& Dc, int i, int black);
int dragging; // Dragging-Event valid
int index; // ctrl down: drag this one
@@ -166,14 +166,14 @@
// array size is mapped to this range for x-tick marks
int xmin, xmax;
- virtual void DrawXTicks(wxDC* dc);
- virtual void DrawYTicks(wxDC* dc);
- virtual void DrawLabel(wxDC* dc);
- virtual void DrawNull(wxDC* dc);
- int Index(wxMouseEvent& MouseEvent);
+ virtual void DrawXTicks(wxDC& Dc);
+ virtual void DrawYTicks(wxDC& Dc);
+ virtual void DrawLabel(wxDC& Dc);
+ virtual void DrawNull(wxDC& Dc);
+ int Index(wxMouseEvent& MouseEvent);
- int enabled;
- int style_bits;
+ int enabled;
+ int mStyleBits;
virtual const char *GetXText(int xval); // Text for x-tickmarks
virtual const char *GetYText(int yval); // Text for y-tickmarks
@@ -187,11 +187,11 @@
int yy,
int ww,
int hh,
- int style_bits = (ARED_GAP | ARED_XTICKS));
+ int StyleBits = (ARED_GAP | ARED_XTICKS));
virtual ~JZArrayEdit();
- virtual void OnDraw(wxDC& indc);
+ virtual void OnDraw(wxDC& Dc);
virtual void OnSize(wxSizeEvent& event);
virtual void OnMouseEvent(wxMouseEvent& MouseEvent);
virtual int Dragging(wxMouseEvent& MouseEvent);
@@ -200,15 +200,15 @@
virtual void SetLabel(char const *llabel);
void Enable(int enable = 1);
- void SetStyle(int style)
+ void SetStyle(int StyleBits)
{
- style_bits = style;
+ mStyleBits = StyleBits;
}
// min and max value in array (both values inclusive)
void SetYMinMax(int min, int max);
// for display x-axis only, does not resize the array (both values inclusive)
void SetXMinMax(int xmin, int xmax);
- void DrawBarLine (wxDC *dc, int xx);
+ void DrawBarLine (wxDC& Dc, int xx);
void SetDrawBars(JZArrayEditDrawBars *x)
{
draw_bars = x;
@@ -233,13 +233,13 @@
int yy,
int ww,
int hh,
- int style_bits = (ARED_GAP | ARED_XTICKS | ARED_RHYTHM));
+ int StyleBits = (ARED_GAP | ARED_XTICKS | ARED_RHYTHM));
void SetMeter(int steps_per_count, int count_per_bar, int n_bars);
protected:
- virtual void DrawXTicks(wxDC* dc);
+ virtual void DrawXTicks(wxDC& Dc);
private:
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <pst...@us...> - 2013-03-18 18:47:28
|
Revision: 972
http://sourceforge.net/p/jazzplusplus/code/972
Author: pstieber
Date: 2013-03-18 18:47:25 +0000 (Mon, 18 Mar 2013)
Log Message:
-----------
Added a space.
Modified Paths:
--------------
trunk/jazz/src/Knob.cpp
Modified: trunk/jazz/src/Knob.cpp
===================================================================
--- trunk/jazz/src/Knob.cpp 2013-03-18 18:46:08 UTC (rev 971)
+++ trunk/jazz/src/Knob.cpp 2013-03-18 18:47:25 UTC (rev 972)
@@ -74,7 +74,7 @@
//*****************************************************************************
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
-BEGIN_EVENT_TABLE(JZKnob,wxControl)
+BEGIN_EVENT_TABLE(JZKnob, wxControl)
EVT_SIZE(JZKnob::OnSize)
EVT_ERASE_BACKGROUND(JZKnob::OnEraseBackground)
EVT_PAINT(JZKnob::OnPaint)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <pst...@us...> - 2013-03-18 18:46:10
|
Revision: 971
http://sourceforge.net/p/jazzplusplus/code/971
Author: pstieber
Date: 2013-03-18 18:46:08 +0000 (Mon, 18 Mar 2013)
Log Message:
-----------
Added the ArrayControl source.
Modified Paths:
--------------
trunk/jazz/src/Makefile.am
Modified: trunk/jazz/src/Makefile.am
===================================================================
--- trunk/jazz/src/Makefile.am 2013-03-18 18:45:02 UTC (rev 970)
+++ trunk/jazz/src/Makefile.am 2013-03-18 18:46:08 UTC (rev 971)
@@ -11,6 +11,7 @@
AlsaDriver.cpp \
AlsaPlayer.cpp \
AlsaThru.cpp \
+ArrayControl.cpp \
AsciiMidiFile.cpp \
Audio.cpp \
AudioDriver.cpp \
@@ -111,6 +112,7 @@
jazz_SOURCES = \
AboutDialog.cpp \
+ArrayControl.cpp \
AsciiMidiFile.cpp \
Audio.cpp \
Command.cpp \
@@ -215,6 +217,7 @@
AlsaDriver.h \
AlsaPlayer.h \
AlsaThru.h \
+ArrayControl.h \
AsciiMidiFile.h \
Audio.h \
AudioDriver.h \
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <pst...@us...> - 2013-03-18 18:45:05
|
Revision: 970
http://sourceforge.net/p/jazzplusplus/code/970
Author: pstieber
Date: 2013-03-18 18:45:02 +0000 (Mon, 18 Mar 2013)
Log Message:
-----------
Started adding a new control to alter arrays.
Added Paths:
-----------
trunk/jazz/src/ArrayControl.cpp
trunk/jazz/src/ArrayControl.h
Added: trunk/jazz/src/ArrayControl.cpp
===================================================================
--- trunk/jazz/src/ArrayControl.cpp (rev 0)
+++ trunk/jazz/src/ArrayControl.cpp 2013-03-18 18:45:02 UTC (rev 970)
@@ -0,0 +1,110 @@
+#include "ArrayControl.h"
+
+#include "Random.h"
+
+#include <wx/dcclient.h>
+
+//*****************************************************************************
+// Description:
+// This is the array control class definition.
+//*****************************************************************************
+//-----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
+BEGIN_EVENT_TABLE(JZArrayControl, wxControl)
+ EVT_SIZE(JZArrayControl::OnSize)
+ EVT_PAINT(JZArrayControl::OnPaint)
+END_EVENT_TABLE()
+
+//-----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
+JZArrayControl::JZArrayControl(
+ wxWindow* pParent,
+ wxWindowID Id,
+ const JZRndArray& RandomArray,
+ const wxPoint& Position,
+ const wxSize& Size,
+ long WindowStyle,
+ const wxValidator& Validator,
+ const wxString& Name)
+ : wxControl(),
+ mpRandomArray(0)
+{
+ mpRandomArray = new JZRndArray(RandomArray);
+
+ Create(
+ pParent,
+ Id,
+ RandomArray,
+ Position,
+ Size,
+ WindowStyle,
+ Validator,
+ Name);
+}
+
+//-----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
+JZArrayControl::~JZArrayControl()
+{
+ delete mpRandomArray;
+}
+
+//-----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
+void JZArrayControl::Create(
+ wxWindow* pParent,
+ wxWindowID Id,
+ const JZRndArray& RandomArray,
+ const wxPoint& Position,
+ const wxSize& Size,
+ long WindowStyle,
+ const wxValidator& Validator,
+ const wxString& Name)
+{
+ wxControl::Create(
+ pParent,
+ Id,
+ Position,
+ Size,
+ WindowStyle | wxNO_BORDER,
+ Validator,
+ Name);
+
+ SetInitialSize(Size);
+
+ *mpRandomArray = RandomArray;
+}
+
+//-----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
+void JZArrayControl::OnSize(wxSizeEvent& SizeEvent)
+{
+ int Width = SizeEvent.GetSize().GetWidth();
+ int Height = SizeEvent.GetSize().GetHeight();
+
+ SizeEvent.Skip();
+
+ wxClientDC Dc(this);
+
+ int TextWidth, TextHeight;
+ Dc.GetTextExtent("123", &TextWidth, &TextHeight);
+
+#if 0
+ if (mStyleBits & ARED_XTICKS)
+ {
+ Height -= TextHeight;
+ }
+ if (mStyleBits & (ARED_MINMAX | ARED_YTICKS))
+ {
+ x = (int)(TextWidth + TICK_LINE);
+ Width -= (int)(TextWidth + TICK_LINE);
+ }
+ ynul = y + height - Height * (nul - min) / (max - min);
+#endif
+}
+
+//-----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
+void JZArrayControl::OnPaint(wxPaintEvent& Event)
+{
+}
Property changes on: trunk/jazz/src/ArrayControl.cpp
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/jazz/src/ArrayControl.h
===================================================================
--- trunk/jazz/src/ArrayControl.h (rev 0)
+++ trunk/jazz/src/ArrayControl.h 2013-03-18 18:45:02 UTC (rev 970)
@@ -0,0 +1,46 @@
+#pragma once
+
+#include <wx/control.h>
+
+class JZRndArray;
+
+//*****************************************************************************
+//*****************************************************************************
+class JZArrayControl : public wxControl
+{
+ public:
+
+ JZArrayControl(
+ wxWindow* pParent,
+ wxWindowID Id,
+ const JZRndArray& RandomArray,
+ const wxPoint& Position = wxDefaultPosition,
+ const wxSize& Size = wxSize(40, 40),
+ long WindowStyle = wxNO_BORDER,
+ const wxValidator& Validator = wxDefaultValidator,
+ const wxString& Name = wxT("arraycontrol"));
+
+ virtual ~JZArrayControl();
+
+ void Create(
+ wxWindow* pParent,
+ wxWindowID Id,
+ const JZRndArray& RandomArray,
+ const wxPoint& Position = wxDefaultPosition,
+ const wxSize& Size = wxSize(40, 40),
+ long WindowStyle = wxNO_BORDER,
+ const wxValidator& Validator = wxDefaultValidator,
+ const wxString& Name = wxT("arraycontrol"));
+
+ private:
+
+ void OnSize(wxSizeEvent& Event);
+
+ void OnPaint(wxPaintEvent& Event);
+
+ private:
+
+ JZRndArray* mpRandomArray;
+
+ DECLARE_EVENT_TABLE()
+};
Property changes on: trunk/jazz/src/ArrayControl.h
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <pst...@us...> - 2013-03-18 18:44:03
|
Revision: 969
http://sourceforge.net/p/jazzplusplus/code/969
Author: pstieber
Date: 2013-03-18 18:44:01 +0000 (Mon, 18 Mar 2013)
Log Message:
-----------
Added the ArrayControl source.
Modified Paths:
--------------
trunk/jazz/vc9/JazzPlusPlus-VC9.vcproj
Modified: trunk/jazz/vc9/JazzPlusPlus-VC9.vcproj
===================================================================
--- trunk/jazz/vc9/JazzPlusPlus-VC9.vcproj 2013-03-17 23:18:10 UTC (rev 968)
+++ trunk/jazz/vc9/JazzPlusPlus-VC9.vcproj 2013-03-18 18:44:01 UTC (rev 969)
@@ -426,6 +426,14 @@
Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat;h;hpp;hxx;hm;inl"
>
<File
+ RelativePath="..\src\ArrayControl.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\src\ArrayControl.h"
+ >
+ </File>
+ <File
RelativePath="..\src\AsciiMidiFile.cpp"
>
</File>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|