Main Page   Compound List   File List   Compound Members   File Members  

wtboard.h File Reference

Go to the source code of this file.

Compounds

struct  __WTBOARDDATANODE
struct  __WTBOARDDATANODELIST
struct  __WTBOARDDATASTROKE
struct  __WTBOARDDOCUMENT
struct  __WTBOARDPAGE
struct  __WTBOARDRECEIVER

Defines

#define WTB_MAX_X   32000
#define WTB_MAX_Y   32000
#define WTB_THRESHOLD   (WTB_MAX_X/3200)
#define WTB_TOOL_PEN   1
#define WTB_TOOL_ERASER   2
#define WTB_CALLBACK_STROKEGENERATED   11
#define WTB_CALLBACK_NEWDOCOPENED   12
#define WTB_CALLBACK_STROKEONCREATE   13
#define WTB_CALLBACK_STROKEONDELETE   14
#define WTB_CALLBACK_STROKEDELETED   15
#define WTB_CALLBACK_UPDATE_PEN_POS   16
#define WTB_CALLBACK_BROWSED_TOPAGE   17

Typedefs

typedef __WTBOARDDATANODE WTBOARDDATANODE
typedef __WTBOARDDATASTROKE WTBOARDDATASTROKE
typedef __WTBOARDPAGE WTBOARDPAGE
typedef __WTBOARDDOCUMENT WTBOARDDOCUMENT
typedef __WTBOARDRECEIVER WTBOARDRECEIVER
typedef __WTBOARDDATANODELIST WTBOARDDATANODELIST
typedef BOOL(* WTB_HookPtr )(UINT msg, DWORD dwParam1, DWORD dwParam2, DWORD dwSrcClass)

Functions

void WTBSetCallback (WTB_HookPtr hook, DWORD dwSrcClass)
BOOL WTBInitialize (HINSTANCE hInstance)
BOOL WTBUninitialize ()
void WTBLButtonDown (float *boardpos, int texture_size)
void WTBMouseMove (float *boardpos, int texture_size)
void WTBLButtonUp (float *boardpos, int texture_size)
BOOL WTBIsReceiverVisible ()
void WTBShowReceiver (BOOL bShow)
WTBOARDDOCUMENTWTBAttachDocToReceiver (WTBOARDDOCUMENT *pDoc)
WTBOARDDOCUMENTWTBDetachDocFromReceiver ()
WTBOARDDOCUMENTWTBNewDocument ()
int WTBRemoveEmptyPages (WTBOARDDOCUMENT *pDoc)
WTBOARDDOCUMENTWTBLoadDocument (LPCSTR lpcsFileName)
BOOL WTBSaveDocument (WTBOARDDOCUMENT *pDoc, LPCSTR lpcsFileName)
void WTBCloseDocument (WTBOARDDOCUMENT *pDoc)
WTBOARDPAGEWTBInsPage (WTBOARDDOCUMENT *pDoc, BOOL bNotify)
WTBOARDPAGEWTBNewPage (WTBOARDDOCUMENT *pDoc, BOOL bNotify)
WTBOARDPAGEWTBFindPage (WTBOARDDOCUMENT *pDoc, UINT nPageID)
BOOL WTBBrowseToPage (WTBOARDDOCUMENT *pDoc, WTBOARDPAGE *pPage, BOOL bNotify)
BOOL WTBBrowseToNextPage (WTBOARDDOCUMENT *pDoc)
BOOL WTBBrowseToPrevPage (WTBOARDDOCUMENT *pDoc)
BOOL WTBClearPage (WTBOARDDOCUMENT *pDoc, WTBOARDPAGE *pPage)
BOOL WTBDeletePage (WTBOARDDOCUMENT *pDoc, WTBOARDPAGE *pPage)
WTBOARDDATASTROKEWTBNewStroke (WTBOARDPAGE *pPage, WTBOARDDATANODELIST *pList, BOOL bNotify)
WTBOARDDATASTROKEWTBNewStrokeFromArray (WTBOARDPAGE *pPage, UINT nStrokeID, COLORREF StrokeColor, UINT nNodeCount, WTBOARDDATANODE *pNodeArray, BOOL bNotify)
WTBOARDDATASTROKEWTBFindStroke (WTBOARDPAGE *pPage, UINT nStrokeID)
void WTBSetStrokeColor (WTBOARDDATASTROKE *pStroke, COLORREF clr)
void WTBSetTool (short tool_id)
COLORREF WTBGetStrokeColor (WTBOARDDATASTROKE *pStroke)
BOOL WTBDeleteStroke (WTBOARDPAGE *pPage, WTBOARDDATASTROKE *pStroke, BOOL bNotify)
WTBOARDDATANODELISTWTBAddNodeToList (WTBOARDDATANODELIST *pList, unsigned short x, unsigned short y, unsigned char p)
void WTBDeleteNodeList (WTBOARDDATANODELIST *pList)
void WTBGenerateStrokeFromNodeList (WTBOARDDATASTROKE *pStroke, WTBOARDDATANODELIST *pList)

Variables

WTBOARDRECEIVER g_wtBoardReceiver


Detailed Description

Date:
2002/08 (created)
Author:
David Yuheng Zhao - www.ministars.com , Lars Pettersson - www.handwritten.net , Magnus Andersson
This file contains datastructure and function declarations for the whiteboard VASE plugin.

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 WTB_CALLBACK_BROWSED_TOPAGE   17
 

param1 = Pointer to pPage

#define WTB_CALLBACK_NEWDOCOPENED   12
 

param1 = Pointer to pdoc

#define WTB_CALLBACK_STROKEDELETED   15
 

param1 = id of stroke to del

#define WTB_CALLBACK_STROKEGENERATED   11
 

Message when new stroke added param1 = pointer to stroke param2 = id

#define WTB_CALLBACK_STROKEONCREATE   13
 

param1 = pointer to stroke Return false to abort

#define WTB_CALLBACK_STROKEONDELETE   14
 

param1 = id of stroke to del Return false to abort

#define WTB_CALLBACK_UPDATE_PEN_POS   16
 

Param1 = x, param2 = y

#define WTB_MAX_X   32000
 

The maximum x position of a WTBDATANODE - this format is used for storing data on to file

#define WTB_MAX_Y   32000
 

The maximum y position of a WTBDATANODE - this format is used for storing data on to file

#define WTB_THRESHOLD   (WTB_MAX_X/3200)
 

The threshold used to add nodes to a stroke. If nodes are to close they will not be added

#define WTB_TOOL_ERASER   2
 

Defining the eraser tool

#define WTB_TOOL_PEN   1
 

Defining the pen tool


Typedef Documentation

typedef BOOL(* WTB_HookPtr)(UINT msg, DWORD dwParam1, DWORD dwParam2, DWORD dwSrcClass)
 

Set call back function for notification

typedef struct __WTBOARDDATANODE WTBOARDDATANODE
 

One node of a pen stroke

typedef struct __WTBOARDDATANODELIST WTBOARDDATANODELIST
 

List of nodes used to build the WTBOARDSTROKE, which after that is erased

typedef struct __WTBOARDDATASTROKE WTBOARDDATASTROKE
 

One pen stroke

typedef struct __WTBOARDDOCUMENT WTBOARDDOCUMENT
 

The whiteboard document

typedef struct __WTBOARDPAGE WTBOARDPAGE
 

Defines one page with pointers to a list of strokes

typedef struct __WTBOARDRECEIVER WTBOARDRECEIVER
 

The receiver attaches to a physical, well, a virtual whiteboard


Function Documentation

WTBOARDDATANODELIST* WTBAddNodeToList WTBOARDDATANODELIST   pList,
unsigned short    x,
unsigned short    y,
unsigned char    p
 

Add one node to the stroke currently being buildt Input pList can be null, then a new list will be generated

WTBOARDDOCUMENT* WTBAttachDocToReceiver WTBOARDDOCUMENT   pDoc
 

Present the WTBOARDDOCUMENT in the wtboard receiver window

BOOL WTBBrowseToNextPage WTBOARDDOCUMENT   pDoc
 

Change to next page

BOOL WTBBrowseToPage WTBOARDDOCUMENT   pDoc,
WTBOARDPAGE   pPage,
BOOL    bNotify
 

Change page

BOOL WTBBrowseToPrevPage WTBOARDDOCUMENT   pDoc
 

Change to previous page

BOOL WTBClearPage WTBOARDDOCUMENT   pDoc,
WTBOARDPAGE   pPage
 

Clear the page from strokes and update its view

void WTBCloseDocument WTBOARDDOCUMENT   pDoc
 

Close the whiteboard document

void WTBDeleteNodeList WTBOARDDATANODELIST   pList
 

Erase the node list

BOOL WTBDeletePage WTBOARDDOCUMENT   pDoc,
WTBOARDPAGE   pPage
 

Remove a page from a whiteboard document

BOOL WTBDeleteStroke WTBOARDPAGE   pPage,
WTBOARDDATASTROKE   pStroke,
BOOL    bNotify
 

Delete a stroke

WTBOARDDOCUMENT* WTBDetachDocFromReceiver  
 

Remove the WTBOARDDOCUMENT from the wtboard receiver window

WTBOARDPAGE* WTBFindPage WTBOARDDOCUMENT   pDoc,
UINT    nPageID
 

Using the page id and a WTBOARDDOCUMENT return the page or null

WTBOARDDATASTROKE* WTBFindStroke WTBOARDPAGE   pPage,
UINT    nStrokeID
 

Finds a stroke on the current page

void WTBGenerateStrokeFromNodeList WTBOARDDATASTROKE   pStroke,
WTBOARDDATANODELIST   pList
 

Add the list of nodes to the stroke pStroke

COLORREF WTBGetStrokeColor WTBOARDDATASTROKE   pStroke
 

Get stroke color

BOOL WTBInitialize HINSTANCE    hInstance
 

Initialize the wtboard window. By creating a hidden wtboard window

Parameters:
hInstance 

WTBOARDPAGE* WTBInsPage WTBOARDDOCUMENT   pDoc,
BOOL    bNotify
 

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

WTBOARDDOCUMENT* WTBLoadDocument LPCSTR    lpcsFileName
 

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

WTBOARDDOCUMENT* WTBNewDocument  
 

Create a new whiteboard document structure

Returns :
a whiteboard document

WTBOARDPAGE* WTBNewPage WTBOARDDOCUMENT   pDoc,
BOOL    bNotify
 

Create a page in a whiteboard document

add a new page after the active page

WTBOARDDATASTROKE* WTBNewStroke WTBOARDPAGE   pPage,
WTBOARDDATANODELIST   pList,
BOOL    bNotify
 

Adds a stroke to the current page

WTBOARDDATASTROKE* WTBNewStrokeFromArray WTBOARDPAGE   pPage,
UINT    nStrokeID,
COLORREF    StrokeColor,
UINT    nNodeCount,
WTBOARDDATANODE   pNodeArray,
BOOL    bNotify
 

Creates a WTBOARDDATASTROKE from an array of WTBOARDDATANODE

int WTBRemoveEmptyPages WTBOARDDOCUMENT   pDoc
 

Remove empty pages in a document

Parameters:
pDoc  document to have its empty pages removed
Returns :
number of pages removed

BOOL WTBSaveDocument WTBOARDDOCUMENT   pDoc,
LPCSTR    lpcsFileName
 

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:
hook 
dwSrcClass 

void WTBSetStrokeColor WTBOARDDATASTROKE   pStroke,
COLORREF    clr
 

Set stroke color

void WTBSetTool short    tool_id
 

Set pen or eraser as current tool

void WTBShowReceiver BOOL    bShow
 

Make the wtboard receiver window visible

BOOL WTBUninitialize  
 

Close the wtboard window


Variable Documentation

WTBOARDRECEIVER g_wtBoardReceiver  
 

document


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