summaryrefslogtreecommitdiff
path: root/Ivy/IvySynchroWnd.h
diff options
context:
space:
mode:
authorfcolin2007-02-01 13:03:26 +0000
committerfcolin2007-02-01 13:03:26 +0000
commitcf45b7b1b3cecc0f225e74efbf73c26ed0598956 (patch)
tree4b2875b2aa0a9a6b7c102cd17a203954817b760a /Ivy/IvySynchroWnd.h
parent62aca5b9f103f6b8a12e2c1925abb02caa946907 (diff)
downloadivy-cplusplus-cf45b7b1b3cecc0f225e74efbf73c26ed0598956.zip
ivy-cplusplus-cf45b7b1b3cecc0f225e74efbf73c26ed0598956.tar.gz
ivy-cplusplus-cf45b7b1b3cecc0f225e74efbf73c26ed0598956.tar.bz2
ivy-cplusplus-cf45b7b1b3cecc0f225e74efbf73c26ed0598956.tar.xz
Utilisateur : Fcolin Date : 16/06/00 Heure : 10:14 Créé (vss 1)
Diffstat (limited to 'Ivy/IvySynchroWnd.h')
-rw-r--r--Ivy/IvySynchroWnd.h97
1 files changed, 97 insertions, 0 deletions
diff --git a/Ivy/IvySynchroWnd.h b/Ivy/IvySynchroWnd.h
new file mode 100644
index 0000000..d497f4a
--- /dev/null
+++ b/Ivy/IvySynchroWnd.h
@@ -0,0 +1,97 @@
+#if !defined(AFX_SYNCHROWND_H__ECAC808C_3B4D_11D3_8A1E_00A0245B298A__INCLUDED_)
+#define AFX_SYNCHROWND_H__ECAC808C_3B4D_11D3_8A1E_00A0245B298A__INCLUDED_
+
+#if _MSC_VER > 1000
+#pragma once
+#endif // _MSC_VER > 1000
+// SynchroWnd.h : header file
+//
+
+/////////////////////////////////////////////////////////////////////////////
+// IvySynchroWnd window
+
+#include "IvyApplication.h"
+
+class IvySynchroWnd //: public CWnd
+{
+// Construction
+public:
+ IvySynchroWnd();
+
+// Attributes
+public:
+
+// Operations
+public:
+ void PostMessageCB (IvyMessageCallback *target, IvyApplication *app, int argc, const char **argv );
+ void PostApplicationConnectedCB( IvyApplicationCallback *target, IvyApplication *app);
+ void PostApplicationDisconnectedCB( IvyApplicationCallback *target, IvyApplication *app);
+
+// Overrides
+ // ClassWizard generated virtual function overrides
+ //{{AFX_VIRTUAL(IvySynchroWnd)
+ //}}AFX_VIRTUAL
+
+// Implementation
+public:
+ virtual ~IvySynchroWnd();
+protected:
+ HWND m_hWnd;
+
+protected:
+ // Unique instance of this class
+ static IvySynchroWnd *m_synchro;
+ // Generated message map functions
+ static LRESULT CALLBACK WindowProc(
+ HWND hwnd, // handle to window
+ UINT uMsg, // message identifier
+ WPARAM wParam, // first message parameter
+ LPARAM lParam // second message parameter
+ );
+
+protected:
+
+ LRESULT OnMessageCB(WPARAM wParam, LPARAM lParam);
+ LRESULT OnApplicationConnectedCB(WPARAM wParam, LPARAM lParam);
+ LRESULT OnApplicationDisconnectedCB(WPARAM wParam, LPARAM lParam);
+ friend class IvySynchronousMessageCallback;
+ friend class IvySynchronousApplicationCallback;
+
+};
+class IvySynchronousCallback
+{
+protected:
+ IvyApplication *app;
+ static IvySynchroWnd *m_synchro;
+ friend class Ivy;
+};
+class IvySynchronousMessageCallback: public IvySynchronousCallback, public IvyMessageCallback
+{
+public:
+ IvySynchronousMessageCallback( IvyMessageCallback *cb );
+ virtual void OnMessage (IvyApplication *app, int argc, const char **argv );
+
+protected:
+ IvyMessageCallback *target;
+ int argc;
+ char **argv;
+
+ friend class IvySynchroWnd;
+};
+class IvySynchronousApplicationCallback: public IvySynchronousCallback, public IvyApplicationCallback
+{
+public:
+ IvySynchronousApplicationCallback( IvyApplicationCallback *cb );
+ virtual void OnApplicationConnected (IvyApplication *app);
+ virtual void OnApplicationDisconnected (IvyApplication *app);
+protected:
+ IvyApplicationCallback *target;
+
+ friend class IvySynchroWnd;
+};
+/////////////////////////////////////////////////////////////////////////////
+
+//{{AFX_INSERT_LOCATION}}
+// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
+
+#endif // !defined(AFX_SYNCHROWND_H__ECAC808C_3B4D_11D3_8A1E_00A0245B298A__INCLUDED_)