summaryrefslogtreecommitdiff
path: root/Bus
diff options
context:
space:
mode:
authorfcolin2007-02-01 13:10:30 +0000
committerfcolin2007-02-01 13:10:30 +0000
commit799c15a132c2d53310bd6741f82aebdcada656bd (patch)
treee4f3d4d2605387f176cceb0ddc8a0c1ef20ebe7b /Bus
parent076f6b093019adbb659c245d0b2a8380cf511d1c (diff)
downloadivy-cplusplus-799c15a132c2d53310bd6741f82aebdcada656bd.zip
ivy-cplusplus-799c15a132c2d53310bd6741f82aebdcada656bd.tar.gz
ivy-cplusplus-799c15a132c2d53310bd6741f82aebdcada656bd.tar.bz2
ivy-cplusplus-799c15a132c2d53310bd6741f82aebdcada656bd.tar.xz
Utilisateur : Fcolin Date : 12/03/99 Heure : 18:52 Archivé dans $/Bus/Test (vss 3)
Diffstat (limited to 'Bus')
-rw-r--r--Bus/IvyProbe/IvyProbeDlg.cpp36
1 files changed, 20 insertions, 16 deletions
diff --git a/Bus/IvyProbe/IvyProbeDlg.cpp b/Bus/IvyProbe/IvyProbeDlg.cpp
index be948ac..2112270 100644
--- a/Bus/IvyProbe/IvyProbeDlg.cpp
+++ b/Bus/IvyProbe/IvyProbeDlg.cpp
@@ -211,13 +211,11 @@ HCURSOR CTestDlg::OnQueryDragIcon()
void CTestDlg::OnStart()
{
UpdateData(TRUE);
- bus = new Bus( "TEST NT", m_busnumber,"TEST NT READY",new BusApplicationCallbackOf<CTestDlg>(this, ApplicationCallback));
- BusMessageCallbackOf<CTestDlg> *fader;
- fader = new BusMessageCallbackOf<CTestDlg>(this, FaderCallback );
-
- bus->BindMsg("^MIDICS10:fader([0-7]) value=([0-9]+)",fader);
- bus->BindMsg("^MIDICS10:knob([0-5]) value=([0-9]+)",fader);
- bus->BindMsg("(.*)",new BusMessageCallbackOf<CTestDlg>(this, BusCallback ));
+ bus = new Bus( "TEST NT", m_busnumber,"TEST NT READY",this);
+
+ bus->BindMsg("^MIDICS10:fader([0-7]) value=([0-9]+)", BUS_CALLBACK_OF(CTestDlg, FaderCallback));
+ bus->BindMsg("^MIDICS10:knob([0-5]) value=([0-9]+)", BUS_CALLBACK_OF(CTestDlg, FaderCallback));
+ bus->BindMsg("(.*)", BUS_CALLBACK_OF(CTestDlg, BusCallback ));
//bus->BindMsg("^S( A=([0-9]+))?( B=([0-9]+))?",cb);
bus->start();
@@ -228,14 +226,14 @@ void CTestDlg::BusCallback(BusApplication *app, int argc, const char **argv)
int i;
CString text;
TRACE(" Called function args:");
- m_text.SetSel( -1, -1, TRUE );
+// m_text.SetSel( -1, -1, FALSE );
text.Format("Bus callback %d args\r\n",argc );
- m_text.ReplaceSel( text );
+// m_text.ReplaceSel( text );
for ( i = 0; i < argc; i++ )
{
- m_text.SetSel( -1, -1, TRUE );
+// m_text.SetSel( -1, -1, FALSE );
text.Format("Bus callback arg%d '%s'\r\n",i, argv[i] );
- m_text.ReplaceSel( text );
+// m_text.ReplaceSel( text );
TRACE(" '%s'",argv[i]);
}
TRACE("\n");
@@ -290,19 +288,25 @@ UpdateData(FALSE);
}
-void CTestDlg::DirectCallback(BusApplication *app, int id, const char *arg)
+void CTestDlg::OnDirectMessage(BusApplication *app, int id, const char *arg)
{
TRACE("Direct Msg Receive %d, %s\n",id,arg );
}
-void CTestDlg::ApplicationCallback(BusApplication *app, int event)
+void CTestDlg::OnApplicationConnected(BusApplication *app)
{
CString text;
- m_text.SetSel( -1, -1, TRUE );
- text.Format("Application: %s %s\r\n",(LPCSTR)(app->GetName()), event ? "bye" : "ready" );
+ m_text.SetSel( -1, -1, FALSE );
+ text.Format("Application: %s ready\r\n",(LPCSTR)(app->GetName()) );
+ m_text.ReplaceSel( text );
+}
+void CTestDlg::OnApplicationDisconnected(BusApplication *app)
+{
+ CString text;
+ m_text.SetSel( -1, -1, FALSE );
+ text.Format("Application: %s bye\r\n",(LPCSTR)(app->GetName()) );
m_text.ReplaceSel( text );
}
-
void CTestDlg::OnVScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar)
{