Main Page   Compound List   File List   Compound Members   File Members  

vpiwhiteboard.h

00001 
00038 #pragma once
00039 
00040 #include "..\whiteboardproject\include\vpiclass.h"
00041 #include "..\whiteboardproject\include\vpiexport.h"
00042 
00043 
00044 // For Wintab library
00045 #include "..\whiteboardproject\include\wintab.h"
00046 #define PACKETDATA      (PK_X | PK_Y | PK_BUTTONS | PK_NORMAL_PRESSURE | \
00047 PK_ORIENTATION | PK_CURSOR)
00048 #define PACKETMODE      0
00049 #include "..\whiteboardproject\include\pktdef.h"
00050 extern "C" {
00051     #include "wtboard.h"
00052 }
00053 
00054 
00055 CVrt32  *vrt;
00056 
00057 #define TEXTURE_SIZE 512
00058 
00059 HANDLE hInstance;
00060 
00063 class vpiWhiteboard: public vpiClass
00064 {
00065 public:
00067     VRT_Node *n_board; 
00069     VRT_Geometry *g_board;
00071     VRT_Htx t_board;
00073     VRT_HPlg p_board;
00075     unsigned char texels[TEXTURE_SIZE * TEXTURE_SIZE * 4];
00077     float width,height;
00079     int pointer_to_show;
00081     VRT_Node *n_pointer;
00083     VRT_Geometry *g_pointer;
00084     
00086     WTBOARDDOCUMENT* pDoc;
00088     WTBOARDPAGE* pPage;
00089 
00091     void InitSharedData(int netid);
00093     void HandleSharedDataUpdate(void *in);
00094 
00095     void Render(bool bForce=false);
00097     bool m_bShowPenPosDirty;
00099     bool m_bRenderDirty;
00100 
00101     void PosWTBToClient(POINT* p, RECT* prcClient);
00102     void PressureGlobalToClient(unsigned char* p, int widthmin, int widthmax);
00103 
00106     unsigned char* m_pSharedStroke;
00108     unsigned char* m_pSharedCmd;
00110     COLORREF* m_pSharedClrCurrent;
00112     UINT* m_pSharedCurrentPage;
00114     BOOL* m_pSharedIsWtBusy;
00116     BOOL* m_pSharedIsUpdatingClients;
00118     POINT* m_pSharedPenPos;
00119 
00120 public:
00121     vpiWhiteboard(void);
00122     
00126     virtual void Init(char *name, vpiContext *vpictx, VRT_Context *pvrtctx, 
00127         VRT_Node *parent, char **params, int pnetworkid);
00128     
00132     virtual void ProcessMessage(char *sender, char *message, void *usrdata);
00133     
00137     virtual void Interaction(int action, int keyboard_key, float *ray, 
00138         int *mousepos, MSG msg);
00139     
00143     virtual void Focus();
00144     
00148     virtual void LostFocus();
00149     
00153     virtual void Close();
00154 
00155 private:
00157     HFONT font;
00159     BITMAP bm;
00161     HBITMAP hBitmap;
00163     HBITMAP hOldBmp;
00165     HDC hBitmapDC;
00167     HBRUSH brush;
00169     RECT rectClient; 
00170     void FullScreen();
00171 
00172 public:
00173     void SendOneStroke(WTBOARDPAGE* pPage, WTBOARDDATASTROKE*pStroke);
00174     void SendAllPages();
00175     void UpdatePenPos();
00176     void UpdateClientDocuments(bool isShowActivePage=false);
00177 };
00178 
00179 

Generated on Mon Sep 9 21:01:17 2002 for vpiWhiteboard by doxygen1.2.17