Main Page Compound List File List Compound Members File Members
wtboard.c File Reference
#include <windows.h>
#include <limits.h>
#include <stdio.h>
#include <Commdlg.h>
#include <math.h>
#include "..\whiteboardproject\include\wintab.h"
#include "..\whiteboardproject\include\pktdef.h"
#include "wtboard.h"
|
Defines |
#define | PACKETDATA |
#define | PACKETMODE 0 |
#define | PKT_SIZE_BUFFER 1000 |
Functions |
typedef | UINT (API *WTINFO)(UINT |
void | _WTBPosGlobalToClient (POINT *p, RECT *prcClient) |
void | _WTBPressureGlobalToClient (unsigned char *p, int widthmin, int widthmax) |
void | WTBSetCallback (WTB_HookPtr hook, DWORD dwSrcClass) |
void | WTBLButtonDown (float *boardpos, int texture_size) |
void | WTBMouseMove (float *boardpos, int texture_size) |
void | WTBLButtonUp (float *boardpos, int texture_size) |
LRESULT FAR PASCAL | WTBoardWndProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) |
BOOL | WTBInitialize (HINSTANCE hInstance) |
BOOL | WTBUninitialize () |
BOOL | WTBIsReceiverVisible () |
void | WTBShowReceiver (BOOL bShow) |
WTBOARDDOCUMENT * | WTBAttachDocToReceiver (WTBOARDDOCUMENT *pDoc) |
WTBOARDDOCUMENT * | WTBDetachDocFromReceiver () |
WTBOARDDOCUMENT * | WTBNewDocument () |
int | WTBRemoveEmptyPages (WTBOARDDOCUMENT *pDoc) |
WTBOARDDOCUMENT * | WTBLoadDocument (LPCSTR lpcsFileName) |
BOOL | WTBSaveDocument (WTBOARDDOCUMENT *pDoc, LPCSTR lpcsFileName) |
void | _WTBFreeDocumentPages (WTBOARDDOCUMENT *pDoc, WTBOARDPAGE *pPage) |
void | WTBCloseDocument (WTBOARDDOCUMENT *pDoc) |
WTBOARDPAGE * | WTBInsPage (WTBOARDDOCUMENT *pDoc, BOOL bNotify) |
WTBOARDPAGE * | WTBNewPage (WTBOARDDOCUMENT *pDoc, BOOL bNotify) |
WTBOARDPAGE * | WTBFindPage (WTBOARDDOCUMENT *pDoc, UINT nPageID) |
BOOL | WTBBrowseToPage (WTBOARDDOCUMENT *pDoc, WTBOARDPAGE *pPage, BOOL bNotify) |
BOOL | WTBBrowseToNextPage (WTBOARDDOCUMENT *pDoc) |
BOOL | WTBBrowseToPrevPage (WTBOARDDOCUMENT *pDoc) |
void | _WTBFreePageStrokes (WTBOARDPAGE *pPage, WTBOARDDATASTROKE *pStroke) |
BOOL | WTBClearPage (WTBOARDDOCUMENT *pDoc, WTBOARDPAGE *pPage) |
BOOL | WTBDeletePage (WTBOARDDOCUMENT *pDoc, WTBOARDPAGE *pPage) |
WTBOARDDATASTROKE * | WTBNewStroke (WTBOARDPAGE *pPage, WTBOARDDATANODELIST *pList, BOOL bNotify) |
WTBOARDDATASTROKE * | WTBNewStrokeFromArray (WTBOARDPAGE *pPage, UINT nStrokeID, COLORREF StrokeColor, UINT nNodeCount, WTBOARDDATANODE *pNodeArray, BOOL bNotify) |
WTBOARDDATASTROKE * | WTBFindStroke (WTBOARDPAGE *pPage, UINT nStrokeID) |
void | WTBSetTool (short tool_id) |
void | WTBSetStrokeColor (WTBOARDDATASTROKE *pStroke, COLORREF clr) |
COLORREF | WTBGetStrokeColor (WTBOARDDATASTROKE *pStroke) |
BOOL | WTBDeleteStroke (WTBOARDPAGE *pPage, WTBOARDDATASTROKE *pStroke, BOOL bNotify) |
WTBOARDDATANODELIST * | WTBAddNodeToList (WTBOARDDATANODELIST *pList, unsigned short x, unsigned short y, unsigned char p) |
void | WTBDeleteNodeList (WTBOARDDATANODELIST *pList) |
int | _WTBGetListNodeCount (WTBOARDDATANODELIST *pList) |
void | WTBGenerateStrokeFromNodeList (WTBOARDDATASTROKE *pStroke, WTBOARDDATANODELIST *pList) |
Variables |
WTBOARDRECEIVER | g_wtBoardReceiver |
WTB_HookPtr | g_wtBoardHookPtr = NULL |
DWORD | g_wtBoardHookSrc = 0 |
HINSTANCE | ghWintab |
typedef | UINT |
typedef | LPVOID |
PACKET | pkt [PKT_SIZE_BUFFER] |
Detailed Description
- Date:
-
2001/10/08 (created)
- Author:
-
David Yuheng Zhao - www.ministars.com , Lars Winkler Pettersson - www.handwritten.net , Magnus Andersson
This file contains function definitions for winTab enabled whiteboard.
Copyright (c) 2001,2002 Stefan Seipel, Department of Information Technology, Uppsala University
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Define Documentation
#define PKT_SIZE_BUFFER 1000
|
|
|
The size buffer which WinTab packets are read to - buffer is used to optimize for performation - the buffer used by the wintab/wacom device |
Function Documentation
|
Clear a whiteboard document |
|
Clear the page from strokes |
|
Get the size of the node list |
void _WTBPosGlobalToClient |
( |
POINT * |
p, |
|
|
RECT * |
prcClient |
|
) |
|
|
|
Convert the global coordinate system to the one used with the whiteboard - Parameters:
-
|
void _WTBPressureGlobalToClient |
( |
unsigned char * |
p, |
|
|
int |
widthmin, |
|
|
int |
widthmax |
|
) |
|
|
|
Use the pressure to set a local width of a stroke drawn on the virtual whiteboard - Parameters:
-
|
typedef UINT |
( |
API * |
WTINFO |
) |
|
|
|
Used for loading the wacom board... |
|
Add one node to the stroke currently being buildt Input pList can be null, then a new list will be generated |
|
Present the WTBOARDDOCUMENT in the wtboard receiver window |
|
Clear the page from strokes and update its view |
|
Close the whiteboard document |
|
Remove a page from a whiteboard document |
|
Remove the WTBOARDDOCUMENT from the wtboard receiver window |
|
Using the page id and a WTBOARDDOCUMENT return the page or null |
|
Finds a stroke on the current page |
|
Add the list of nodes to the stroke pStroke |
BOOL WTBInitialize |
( |
HINSTANCE |
hInstance |
) |
|
|
|
Initialize the wtboard window. By creating a hidden wtboard window - Parameters:
-
|
|
Create a page in a whiteboard document
position it in the before active page |
BOOL WTBIsReceiverVisible |
( |
|
) |
|
|
|
Check if the wtboard receiver window is visible |
void WTBLButtonDown |
( |
float * |
boardpos, |
|
|
int |
texture_size |
|
) |
|
|
|
Starts registring a stroke when the left mouse button is pressed - Parameters:
-
boardpos |
the texel position on the whiteboard where a stroke starts |
texture_size |
the size of the texture on which strokes are rendered |
|
void WTBLButtonUp |
( |
float * |
boardpos, |
|
|
int |
texture_size |
|
) |
|
|
|
Ends a registration of a stroke when left mouse button is released - Parameters:
-
boardpos |
the texel position on the whiteboard where a stroke starts |
texture_size |
the size of the texture on which strokes are rendered |
|
|
Open a whiteboard document stored on file - Parameters:
-
lpcsFileName |
the name of the stored file |
- Returns :
-
a whiteboard document
|
void WTBMouseMove |
( |
float * |
boardpos, |
|
|
int |
texture_size |
|
) |
|
|
|
Adds nodes to a stroke as long as the left mouse button is down and the mouse is moved. - Parameters:
-
boardpos |
the texel position on the whiteboard where a stroke starts |
texture_size |
the size of the texture on which strokes are rendered |
|
|
Create a new whiteboard document structure
- Returns :
-
a whiteboard document
|
|
Create a page in a whiteboard document
add a new page after the active page |
|
Adds a stroke to the current page |
|
Creates a WTBOARDDATASTROKE from an array of WTBOARDDATANODE |
LRESULT FAR PASCAL WTBoardWndProc |
( |
HWND |
hwnd, |
|
|
UINT |
message, |
|
|
WPARAM |
wParam, |
|
|
LPARAM |
lParam |
|
) |
|
|
|
------------------------------------------------------------------------- The message loop for the window - Parameters:
-
hwnd |
|
message |
|
wParam |
|
lParam |
|
|
|
Remove empty pages in a document - Parameters:
-
pDoc |
document to have its empty pages removed |
- Returns :
-
number of pages removed
|
|
Save a whiteboard document to file - Parameters:
-
pDoc |
the document to store |
lpcsFileName |
the name of the file |
- Returns :
-
a whiteboard document
|
void WTBSetCallback |
( |
WTB_HookPtr |
hook, |
|
|
DWORD |
dwSrcClass |
|
) |
|
|
|
Callback funktion to vpiwhiteboard - Parameters:
-
|
void WTBSetTool |
( |
short |
tool_id |
) |
|
|
|
Set pen or eraser as current tool |
void WTBShowReceiver |
( |
BOOL |
bShow |
) |
|
|
|
Make the wtboard receiver window visible |
Variable Documentation
DWORD g_wtBoardHookSrc = 0
|
|
PACKET pkt[PKT_SIZE_BUFFER]
|
|
Generated on Mon Sep 9 21:01:17 2002 for vpiWhiteboard by
1.2.17