#include "shapefile.h"
#include <string>
#include <vector>
#define __FNTYPE_COUNT__ 0x0084 |
#define __FNTYPE_NIL__ 0x0000 |
#define __HOOKTYPE_COUNT__ 0x0012 |
Do not use. For internal use only.
#define __HOOKTYPE_NIL__ 0x0000 |
Invalid value.
#define __MAPSTATE_COUNT__ 0x0015 |
Do not use. For internal use only.
#define __MAPSTATE_NIL__ 0x0000 |
Invalid value.
#define __MENUITEMTYPE_COUNT__ 0x0008 |
Do not use. For internal use only.
#define __MENUITEMTYPE_NIL__ 0x0000 |
Invalid value.
#define __PENSTYLE_COUNT__ 0x0005 |
Do not use. For internal use only.
#define ATTRIBUTETYPE_BOOL 4 |
Boolean attribute.
#define ATTRIBUTETYPE_DATE 3 |
Date attribute.
#define ATTRIBUTETYPE_DOUBLE 2 |
Double precision floating point attribute.
#define ATTRIBUTETYPE_INT 1 |
Integer attribute.
#define ATTRIBUTETYPE_PRIMARYKEY 0x80000000 |
Indicates this attribute is part of a primary key.
#define ATTRIBUTETYPE_STRING 0 |
String attribute.
#define FNTYPE_DATAPAGE_GETHWND 0x0070 |
#define FNTYPE_DATAPAGE_REMOVE 0x006F |
#define FNTYPE_JAVASCRIPT_CALLFUNCTION 0x0058 |
#define FNTYPE_JAVASCRIPT_CLOSE 0x0059 |
#define FNTYPE_JAVASCRIPT_RUN 0x0057 |
#define FNTYPE_MAP_CENTERMAP 0x003A |
#define FNTYPE_MAP_DPTOGP 0x0014 |
#define FNTYPE_MAP_DRAW 0x0017 |
#define FNTYPE_MAP_GETBOUNDS 0x0011 |
#define FNTYPE_MAP_GETHWND 0x0015 |
#define FNTYPE_MAP_GETINTERACTIONSTATE 0x003E |
#define FNTYPE_MAP_GETVIEWSIZE 0x0012 |
#define FNTYPE_MAP_GPTODP 0x0013 |
#define FNTYPE_MAP_REPAINT 0x0016 |
#define FNTYPE_MAP_SETINTERACTIONSTATE 0x003F |
#define FNTYPE_MAP_ZOOM 0x003B |
#define FNTYPE_MAP_ZOOMTOEXTENT 0x003D |
#define FNTYPE_MAP_ZOOMTOSELECTION 0x003C |
#define FNTYPE_MENUITEM_SETENABLED 0x004E |
#define FNTYPE_RECORDSET_BOF 0x0038 |
#define FNTYPE_RECORDSET_CLOSE 0x0039 |
#define FNTYPE_RECORDSET_EOF 0x0037 |
#define FNTYPE_RECORDSET_FIRST 0x0034 |
#define FNTYPE_RECORDSET_GET 0x0036 |
#define FNTYPE_RECORDSET_GETCOUNT 0x0041 |
#define FNTYPE_RECORDSET_LAST 0x0035 |
#define FNTYPE_RECORDSET_NEXT 0x0032 |
#define FNTYPE_RECORDSET_PREV 0x0033 |
#define FNTYPE_SHAPE_GETATTRIBUTE 0x0030 |
#define FNTYPE_SHAPE_GETBOUNDS 0x002F |
#define FNTYPE_SHAPE_GETCLOSESTPOINT 0x0080 |
#define FNTYPE_SHAPE_GETCOORDINATE 0x007C |
#define FNTYPE_SHAPE_GETCOORDINATECOUNT 0x007B |
#define FNTYPE_SHAPE_GETPARTCOUNT 0x007A |
#define FNTYPE_SHAPE_GETSHAPEBYTES 0x0031 |
#define FNTYPE_SHAPE_GETSHAPETYPE 0x002E |
#define FNTYPE_SHAPE_ISSELECTED 0x002C |
#define FNTYPE_SHAPE_SELECT 0x002D |
#define FNTYPE_SHAPE_SETATTRIBUTE 0x0047 |
#define FNTYPE_SHAPE_SETATTRIBUTES 0x0064 |
#define FNTYPE_SHAPEUP_ADDHOOK 0x0001 |
#define FNTYPE_SHAPEUP_ALLOCATE 0x0074 |
#define FNTYPE_SHAPEUP_ALLOCATESTATUSBARPANE 0x004A |
#define FNTYPE_SHAPEUP_BEGINPROGRESS 0x004F |
#define FNTYPE_SHAPEUP_DEALLOCATE 0x0075 |
#define FNTYPE_SHAPEUP_ENDPROGRESS 0x0051 |
#define FNTYPE_SHAPEUP_GETACTIVEWORKSPACE 0x0007 |
#define FNTYPE_SHAPEUP_GETERRORDESCRIPTION 0x0004 |
#define FNTYPE_SHAPEUP_GETVERSION 0x0076 |
#define FNTYPE_SHAPEUP_GETWORKSPACE 0x0006 |
#define FNTYPE_SHAPEUP_GETWORKSPACECOUNT 0x0005 |
#define FNTYPE_SHAPEUP_HASJAVASCRIPTSUPPORT 0x005A |
#define FNTYPE_SHAPEUP_ISVALIDHANDLE 0x005C |
#define FNTYPE_SHAPEUP_RELEASESTATUSBARPANE 0x004B |
#define FNTYPE_SHAPEUP_REMOVEALLHOOKS 0x0003 |
#define FNTYPE_SHAPEUP_REMOVEHOOK 0x0002 |
#define FNTYPE_SHAPEUP_SETPROGRESS 0x0050 |
#define FNTYPE_SHAPEUP_SETSTATUSBARPANEINFO 0x0008 |
#define FNTYPE_SHAPEUP_SETSTATUSBARTEXT 0x0069 |
#define FNTYPE_SHAPEUP_WANTUPDATE 0x005B |
#define FNTYPE_THEME_ADDATTRIBUTE 0x0053 |
#define FNTYPE_THEME_ADDSHAPE 0x0018 |
#define FNTYPE_THEME_BATCHADDSHAPE 0x0063 |
#define FNTYPE_THEME_CLEARSELECTION 0x0071 |
#define FNTYPE_THEME_DELETEATTRIBUTE 0x0054 |
#define FNTYPE_THEME_DELETESHAPE 0x001A |
#define FNTYPE_THEME_GETATTRIBUTECOUNT 0x001F |
#define FNTYPE_THEME_GETATTRIBUTEINDEX 0x007D |
#define FNTYPE_THEME_GETATTRIBUTENAME 0x0046 |
#define FNTYPE_THEME_GETATTRIBUTETYPE 0x0077 |
#define FNTYPE_THEME_GETBOUNDS 0x0024 |
#define FNTYPE_THEME_GETCOMMENT 0x005F |
#define FNTYPE_THEME_GETFILLCOLOR 0x0065 |
#define FNTYPE_THEME_GETFONT 0x002A |
#define FNTYPE_THEME_GETINFOTIP 0x0029 |
#define FNTYPE_THEME_GETINTERSECTINGSHAPES 0x0026 |
#define FNTYPE_THEME_GETNAME 0x001D |
#define FNTYPE_THEME_GETPENCOLOR 0x0061 |
#define FNTYPE_THEME_GETPENSTYLE 0x0081 |
#define FNTYPE_THEME_GETPENWIDTH 0x0067 |
#define FNTYPE_THEME_GETSELECTEDSHAPES 0x0028 |
#define FNTYPE_THEME_GETSELECTEDSHAPESINRECT 0x0052 |
#define FNTYPE_THEME_GETSELECTIONCOUNT 0x0027 |
#define FNTYPE_THEME_GETSHAPE 0x0021 |
#define FNTYPE_THEME_GETSHAPECOUNT 0x0020 |
#define FNTYPE_THEME_GETSHAPEFROMINDEX 0x0022 |
#define FNTYPE_THEME_GETSHAPESBYQUERY 0x002B |
#define FNTYPE_THEME_GETSHAPESINRECT 0x0040 |
#define FNTYPE_THEME_GETSHAPETYPE 0x0023 |
#define FNTYPE_THEME_INVERTSELECTION 0x007F |
#define FNTYPE_THEME_ISREADONLY 0x001C |
#define FNTYPE_THEME_ISSELECTED 0x001B |
#define FNTYPE_THEME_ISVISIBLE 0x004C |
#define FNTYPE_THEME_LOOKUPWORKSPACE 0x0049 |
#define FNTYPE_THEME_RECALCBOUNDS 0x0025 |
#define FNTYPE_THEME_REPLACESHAPEDATA 0x0019 |
#define FNTYPE_THEME_SELECT 0x0072 |
#define FNTYPE_THEME_SETATTRIBUTECOMMENT 0x0083 |
#define FNTYPE_THEME_SETCOMMENT 0x0060 |
#define FNTYPE_THEME_SETFILLCOLOR 0x0066 |
#define FNTYPE_THEME_SETNAME 0x001E |
#define FNTYPE_THEME_SETPENCOLOR 0x0062 |
#define FNTYPE_THEME_SETPENSTYLE 0x0082 |
#define FNTYPE_THEME_SETPENWIDTH 0x0068 |
#define FNTYPE_THEME_SETRASTERIMAGE 0x006B |
#define FNTYPE_THEME_SETSERIALDATA 0x006D |
#define FNTYPE_TOOLBAR_CREATE 0x0042 |
#define FNTYPE_TOOLBAR_GETBUTTONCOUNT 0x0043 |
#define FNTYPE_TOOLBAR_ISVISIBLE 0x0079 |
#define FNTYPE_TOOLBAR_SETBUTTONCHECKED 0x0045 |
#define FNTYPE_TOOLBAR_SETBUTTONENABLED 0x0044 |
#define FNTYPE_WORKSPACE_ADDDATAPAGE 0x006E |
#define FNTYPE_WORKSPACE_BROWSETHEME 0x0010 |
#define FNTYPE_WORKSPACE_CLEARSELECTION 0x0073 |
#define FNTYPE_WORKSPACE_CREATENEWTHEME 0x000C |
#define FNTYPE_WORKSPACE_CREATENEWTHEMEFROMSELECTION 0x007E |
#define FNTYPE_WORKSPACE_GETBOUNDS 0x000D |
#define FNTYPE_WORKSPACE_GETCOMMENT 0x005D |
#define FNTYPE_WORKSPACE_GETMAPWINDOW 0x0009 |
#define FNTYPE_WORKSPACE_GETSELECTEDTHEME 0x0055 |
#define FNTYPE_WORKSPACE_GETSELECTEDTHEMES 0x004D |
#define FNTYPE_WORKSPACE_GETSELECTIONCOUNT 0x0078 |
#define FNTYPE_WORKSPACE_GETTHEME 0x000B |
#define FNTYPE_WORKSPACE_GETTHEMECOUNT 0x000A |
#define FNTYPE_WORKSPACE_ISACTIVE 0x000F |
#define FNTYPE_WORKSPACE_LOADJAVASCRIPT 0x0056 |
#define FNTYPE_WORKSPACE_LOG 0x000E |
#define FNTYPE_WORKSPACE_REFRESH 0x0048 |
#define FNTYPE_WORKSPACE_REMOVETHEME 0x006A |
#define FNTYPE_WORKSPACE_SETCOMMENT 0x005E |
#define FNTYPE_WORKSPACE_SETSERIALDATA 0x006C |
#define HOOKTYPE_DESERIALIZE 0x000E |
args is of type SUDeserializeHookData*.
#define HOOKTYPE_FILEFORMATHANDLER 0x000D |
args is of type SUFileFormatHandlerHookData*.
#define HOOKTYPE_IDLE 0x0002 |
args is of type SUHookData*.
#define HOOKTYPE_JAVASCRIPTINVOKE 0x0010 |
args is of type SUJavaScriptInvokeHookData*.
#define HOOKTYPE_LAYERSELCHANGE 0x0011 |
args is of type SUHookData*.
#define HOOKTYPE_LBUTTONDOWN 0x0007 |
args is of type SUMouseHookData*.
#define HOOKTYPE_LBUTTONUP 0x0008 |
args is of type SUMouseHookData*.
#define HOOKTYPE_MENUITEM 0x000A |
args is of type SUMenuItemHookData*.
#define HOOKTYPE_MOUSEMOVE 0x0003 |
args is of type SUMouseHookData*.
#define HOOKTYPE_POSTDRAW 0x0001 |
args is of type SUHookData*.
#define HOOKTYPE_PRECLOSEWORKSPACE 0x0005 |
args is of type SUHookData*.
#define HOOKTYPE_PREREMOVESHAPE 0x000B |
args is of type SUPreRemoveShapeHookData*.
#define HOOKTYPE_PREREMOVETHEME 0x0006 |
args is of type SUPreRemoveThemeHookData*.
#define HOOKTYPE_SHAPESELCHANGE 0x0004 |
args is of type SUShapeSelChangeHookData*.
#define HOOKTYPE_TOOLBARBUTTON 0x0009 |
args is of type SUToolBarButtonHookData*.
#define HOOKTYPE_WANTUPDATE 0x000C |
args is of type SUHookData*.
#define HOOKTYPE_WORKSPACEREADY 0x000F |
args is of type SUHookData*.
#define JSIHDF_DEFAULT 0x00000000 |
Default value.
#define JSIHDF_TREATRETURNASSINGLEVALUE 0x00000001 |
Used to indicate that there is only one returned value, and that it should not be treated as an Array in JavaScript.
#define MAPSTATE_ADDINGVERTEX 0x0010 |
Adding new vertex in progress. Read-only state.
#define MAPSTATE_ADDVERTEX 0x000F |
Add new vertex mode enabled.
#define MAPSTATE_ADJUSTINGVERTEX 0x000E |
Adjusting vertex in progress. Read-only state.
#define MAPSTATE_ADJUSTVERTEX 0x000D |
Adjust vertex mode enabled.
#define MAPSTATE_CIRCLESELECT 0x0004 |
Circle select mode enabled.
#define MAPSTATE_CIRCLESELECTTRACKING 0x0005 |
Cirlce selection in progress. Read-only state.
#define MAPSTATE_CUSTOM 0x00FF |
Indicates that another GPI has set a map state. This is a read-only state.
#define MAPSTATE_DRAWING 0x000C |
Drawing mode enabled.
#define MAPSTATE_MEASURING 0x000B |
Measuring mode enabled.
#define MAPSTATE_PAN 0x0006 |
Panning mode enabled.
#define MAPSTATE_PANNING 0x0007 |
Panning in progress. Read-only state.
#define MAPSTATE_PLUGINSTATEFIRST 0x0100 |
First available custom GPI state
#define MAPSTATE_PLUGINSTATELAST 0x01FF |
Last available custom GPI state
#define MAPSTATE_POLYGONSELECT 0x0011 |
Polygon selection mode enabled.
#define MAPSTATE_POLYGONSELECTTRACKING 0x0012 |
Polygon selection in progress. Read-only state.
#define MAPSTATE_RECTSELECT 0x0002 |
Rectangle select mode enabled.
#define MAPSTATE_RECTSELECTTRACKING 0x0003 |
Rectangle selection in progress. Read-only state.
#define MAPSTATE_SINGLESELECT 0x0001 |
Single select mode enabled.
#define MAPSTATE_SPLITOBJECT 0x0013 |
Split object mode enabled.
#define MAPSTATE_SPLITTINGOBJECT 0x0014 |
Splitting object in progress. Read-only state.
#define MAPSTATE_ZOOMIN 0x0008 |
Zoom in mode enabled.
#define MAPSTATE_ZOOMINTRACKING 0x0009 |
Zomming in progress. Read-only state.
#define MAPSTATE_ZOOMOUT 0x000A |
Zoom out mode enabled.
#define MENUITEMTYPE_ADDNEWLAYER 0x0001 |
Used when a new layer can be constructed without an external data source. E.g. Use this for layers created from a selection of objects in another theme.
#define MENUITEMTYPE_ADVANCEDEDIT 0x0004 |
Used to add an item in the Edit | Advanced Edit sub-menu.
#define MENUITEMTYPE_ADVANCEDSELECTION 0x0003 |
Used to add an item in the Edit | Advanced Selection sub-menu.
#define MENUITEMTYPE_COPYSPECIAL 0x0007 |
Used to add an item in the Edit | Copy Special sub-menu.
#define MENUITEMTYPE_EXPORTLAYER 0x0005 |
Used to add an item in the Theme | Export dialog.
#define MENUITEMTYPE_LOADLAYER 0x0002 |
Used when a new layer can be constructed from an external data source.
#define MENUITEMTYPE_TOOLS 0x0006 |
Used to add an item in the Tools menu.
#define PENSTYLE_DASH 1 |
A dashed line.
#define PENSTYLE_DASHDOT 3 |
A dash/dot line.
#define PENSTYLE_DASHDOTDOT 4 |
A das/dot/dot line.
#define PENSTYLE_DOT 2 |
A dotted line.
#define PENSTYLE_SOLID 0 |
A solid drawn line.
#define SHAPEUP_API_VERSION 100 |
This should be returned by the function fnVersion()
#define SURESULT_E_BUFFEROVERFLOW 106 |
#define SURESULT_E_ILLEGALPARAM 101 |
#define SURESULT_E_INDEXOUTOFBOUNDS 104 |
#define SURESULT_E_INVALIDHANDLE 100 |
#define SURESULT_E_INVALIDQUERY 107 |
#define SURESULT_E_NOSUCHERROR 3 |
#define SURESULT_E_NOTIMPLEMENTED 2 |
#define SURESULT_E_OUTOFRESOURCES 109 |
#define SURESULT_E_PERMISSIONDENIED 105 |
#define SURESULT_E_SCRIPTERROR 110 |
#define SURESULT_E_UNEXPECTEDSHAPETYPE 103 |
#define SURESULT_E_UNKNOWNHOOKTYPE 108 |
#define SURESULT_E_UNSUPPORTEDSHAPETYPE 102 |
#define SURESULT_FALSE 1 |
#define SURESULT_OK 0 |
typedef enum tagDataType DataType |
typedef void(__cdecl *) PFNSETTINGS() |
typedef struct tagSUAddFileFormatHandlerHookData SUAddFileFormatHandlerHookData |
typedef struct tagSUAddJavaScriptInvokeHookData SUAddJavaScriptInvokeHookData |
typedef struct tagSUAddMenuItemHookData SUAddMenuItemHookData |
typedef struct tagSUARGAddAttribute SUARGAddAttribute |
typedef struct tagSUARGAddDataPage SUARGAddDataPage |
typedef struct tagSUARGAddHook SUARGAddHook |
typedef struct tagSUARGAddShape SUARGAddShape |
typedef struct tagSUARGAllocate SUARGAllocate |
typedef struct tagSUARGAllocateStatusBarPane SUARGAllocateStatusBarPane |
typedef struct tagSUARGBatchAddShape SUARGBatchAddShape |
typedef struct tagSUARGBeginProgress SUARGBeginProgress |
typedef struct tagSUARGBrowseTheme SUARGBrowseTheme |
typedef struct tagSUARGCreateNewTheme SUARGCreateNewTheme |
typedef struct tagSUARGCreateToolBar SUARGCreateToolBar |
typedef struct tagSUARGDeleteAttribute SUARGDeleteAttribute |
typedef struct tagSUARGDeleteShape SUARGDeleteShape |
typedef struct tagSUARGDPtoGP SUARGDPtoGP |
typedef struct tagSUARGDraw SUARGDraw |
typedef struct tagSUARGGetAttribute SUARGGetAttribute |
typedef struct tagSUARGGetAttributeIndex SUARGGetAttributeIndex |
typedef struct tagSUARGGetAttributeType SUARGGetAttributeType |
typedef struct tagSUARGGetBOOL SUARGGetBOOL |
typedef struct tagSUARGGetBounds SUARGGetBounds |
typedef struct tagSUARGGetClosestPoint SUARGGetClosestPoint |
typedef struct tagSUARGGetColor SUARGGetColor |
typedef struct tagSUARGGetCoordinate SUARGGetCoordinate |
typedef struct tagSUARGGetDWORD SUARGGetDWORD |
typedef struct tagSUARGGetErrorDescription SUARGGetErrorDescription |
typedef struct tagSUARGGetFont SUARGGetFont |
typedef struct tagSUARGGetHandle SUARGGetHandle |
typedef struct tagSUARGGetHandleByIndex SUARGGetHandleByIndex |
typedef struct tagSUARGGetHWND SUARGGetHWND |
typedef struct tagSUARGGetInfoTip SUARGGetInfoTip |
typedef struct tagSUARGGetInteractionState SUARGGetInteractionState |
typedef struct tagSUARGGetIntersectingShapes SUARGGetIntersectingShapes |
typedef struct tagSUARGGetShapeBytes SUARGGetShapeBytes |
typedef struct tagSUARGGetShapesByQuery SUARGGetShapesByQuery |
typedef struct tagSUARGGetShapesInRect SUARGGetShapesInRect |
typedef struct tagSUARGGetShapeType SUARGGetShapeType |
typedef struct tagSUARGGetSize SUARGGetSize |
typedef struct tagSUARGGetText SUARGGetText |
typedef struct tagSUARGGetTextByIndex SUARGGetTextByIndex |
typedef struct tagSUARGGetUnsigned SUARGGetUnsigned |
typedef struct tagSUARGGetUnsignedByIndex SUARGGetUnsignedByIndex |
typedef struct tagSUARGGetWorkspace SUARGGetWorkspace |
typedef struct tagSUARGGPtoDP SUARGGPtoDP |
typedef struct tagSUARGIsShapeSelected SUARGIsShapeSelected |
typedef struct tagSUARGJSCallFunction SUARGJSCallFunction |
typedef struct tagSUARGLoadJavaScript SUARGLoadJavaScript |
typedef struct tagSUARGLog SUARGLog |
typedef struct tagSUARGRemoveHook SUARGRemoveHook |
typedef struct tagSUARGRemoveTheme SUARGRemoveTheme |
typedef struct tagSUARGRepaint SUARGRepaint |
typedef struct tagSUARGReplaceShapeData SUARGReplaceShapeData |
typedef struct tagSUARGSelectShape SUARGSelectShape |
typedef struct tagSUARGSetAttribute SUARGSetAttribute |
typedef struct tagSUARGSetAttributes SUARGSetAttributes |
typedef struct tagSUARGSetBOOL SUARGSetBOOL |
typedef struct tagSUARGSetButtonBOOL SUARGSetButtonBOOL |
typedef struct tagSUARGSetColor SUARGSetColor |
typedef struct tagSUARGSetDouble SUARGSetDouble |
typedef struct tagSUARGSetDWORD SUARGSetDWORD |
typedef struct tagSUARGSetFloat SUARGSetFloat |
typedef struct tagSUARGSetInteractionState SUARGSetInteractionState |
typedef struct tagSUARGSetPoint SUARGSetPoint |
typedef struct tagSUARGSetRasterImage SUARGSetRasterImage |
typedef struct tagSUARGSetSerialData SUARGSetSerialData |
typedef struct tagSUARGSetStatusBarPaneInfo SUARGSetStatusBarPaneInfo |
typedef struct tagSUARGSetText SUARGSetText |
typedef struct tagSUARGSetTextByIndex SUARGSetTextByIndex |
typedef struct tagSUARGSetUnsigned SUARGSetUnsigned |
typedef struct tagSUARGWantUpdate SUARGWantUpdate |
typedef struct tagSUARGZoomToExtent SUARGZoomToExtent |
typedef struct tagSUARGZoomToSelection SUARGZoomToSelection |
typedef struct tagSUDeserializeHookData SUDeserializeHookData |
typedef struct tagSUExport SUExport |
typedef struct tagSUFileFormatHandlerHookData SUFileFormatHandlerHookData |
typedef HANDLE SUHANDLE |
typedef struct tagSUHookData SUHookData |
typedef SURESULT(__cdecl *) SUHOOKFUNC(SUHANDLE hWorkspace, int hookType, SUHookData *args) |
typedef struct tagSUImport SUImport |
typedef struct tagSUJavaScriptArgument SUJavaScriptArgument |
typedef struct tagSUJavaScriptInvokeHookData SUJavaScriptInvokeHookData |
This is an example of how to construct the return values.
// Let's return 2 values, a shape and a string, to the calling JavaScript // (Error handling omitted for simplicity) SUJavaScriptInvokeHookData *args; // From the hook function SUHANDLE hWorkspace; // From the hook function args->retc = 2; ShapeUp_Allocate(sizeof(SUJavaScriptArgument) * args->retc, (void**)&args->rets); args->rets[0].type = DT_SUHANDLE; args->rets[0].handleVal = SUWorkspace(hWorkspace).GetTheme(0).GetShape(0); args->rets[1].type = DT_STRING; args->rets[1].stringVal = ShapeUp_DuplicateString("A string");
The following return values are supported:
typedef struct tagSUMenuItemHookData SUMenuItemHookData |
typedef struct tagSUMouseHookData SUMouseHookData |
typedef struct tagSUPreRemoveShapeHookData SUPreRemoveShapeHookData |
typedef struct tagSUPreRemoveThemeHookData SUPreRemoveThemeHookData |
typedef HRESULT SURESULT |
typedef struct tagSUShapeSelChangeHookData SUShapeSelChangeHookData |
typedef struct tagSUToolBarButtonHookData SUToolBarButtonHookData |
enum tagDataType |
Retrievs the window handle to the ShapeUp map window.
hDataPage | is the SUHANDLE to the custom data page. | |
hWnd | is a pointer to a HWND that will receive the data page window handle. |
Removes a custom data page for a workspace. A data page is an addition to the four native data pages supplied by ShapeUp: Attributes, Coordinates, Statistics and Bookmarks.
A custom data page can be used to display any windows control as a child.
hDataPage | is an SUHANDLE to the data page to remove. |
const GUID* __cdecl fnGUID | ( | ) |
Identifies this plug-in. E.g. used for plug-in invokation from JavaScript. Make sure this function returns a newly generated GUID for this plug-in.
This is the main plug-in function. This function is called after the plug-in was loaded to allow the plug-in to hook up into the ShapeUp main executable.
export | is a pointer to the ShapeUp API SUExport struct which in turn has an import member which must be initiallised. |
void __cdecl fnTerminate | ( | ) |
This function is called by ShapeUp just before the plug-in is unloaded. Perform any necessary clean-up here. A plug-in is normally not unloaded until ShapeUp terminates, but it might be possible for the user to unload plugins manually anytime during a ShapeUp session, and thus, clean-up should be taken seriously.
size_t __cdecl fnVersion | ( | ) |
This function should return the version of the ShapeUp API used when building the plug-in. This is the defined value SHAPEUP_API_VERSION. The plug-in shuld just return this constant.
Executes a specified funcion in a ShapeUp JavaScript.
hJavaScript | is the SUHANDLE to the JavaScript to execute. | |
name | is a null-terminated string containing the name of the function to execute. Names are case sensitive. |
Closes a ShapeUp JavaScript.
hJavaScript | is the SUHANDLE to the JavaScript to close. |
Executes a ShapeUp JavaScript.
hJavaScript | is the SUHANDLE to the JavaScript to execute. |
Centers the ShapeUp map window around a point.
hMap | is the SUHANDLE to the ShapeUp map. | |
x | is the new center point east-west component. | |
y | is the new center point north-south component. |
Converts a device point to a geographical point.
hMap | is the SUHANDLE to the ShapeUp map. | |
dpx | is an int that contains the east-west value to convert. | |
dpy | is an int that contains the north-south value to convert. | |
gpx | is a pointer to a double that will receive the east-west value. | |
gpy | is a pointer to a double that will receive the north-south value. |
SURESULT Map_Draw | ( | SUHANDLE | hMap, | |
HDC | hdc, | |||
size_t | iw, | |||
size_t | ih, | |||
double | x, | |||
double | y, | |||
double | gw, | |||
double | gh | |||
) | [inline] |
Draws a ShapeUp workspace to an external Windows device context.
hMap | is the SUHANDLE to the ShapeUp map. | |
hdc | is a handle to the target Windows device context. | |
iw | is the width in device units of the image to draw. | |
ih | is the height in device units of the image to draw. | |
x | is the center point east-west component. | |
y | is the center point north-south component. | |
gw | is the east-west geographical extent. | |
gh | is the north-south geographical extent. |
SURESULT Map_GetBounds | ( | SUHANDLE | hMap, | |
double * | xmin, | |||
double * | ymin, | |||
double * | xmax, | |||
double * | ymax | |||
) | [inline] |
Gets the map's bounding box.
hMap | is the SUHANDLE to the ShapeUp map to query. | |
xmin | is a pointer to a double that will receive the west-most value. | |
ymin | is a pointer to a double that will receive the south-most value. | |
xmax | is a pointer to a double that will receive the east-most value. | |
ymax | is a pointer to a double that will receive the north-most value. |
Retrievs the window handle to the ShapeUp map window.
hMap | is the SUHANDLE to the ShapeUp map to query. | |
hWnd | is a pointer to a HWND that will receive the map window handle. |
Retrieves the current map interaction state. The interaction state is a value indicating what the user is about to do, or is doing, in the map. This is in short the state of the mutual exclusive toolbar buttons like select, rectangle select, circle select, etc. This can be used to add new states to the map.
hMap | is the SUHANDLE to the ShapeUp map to query. | |
state | is a pointer to an unsigned long that will receive the current map interaction state. |
Gets the map's view size in device units.
hMap | is the SUHANDLE to the ShapeUp map to query. | |
width | is a pointer to a size_t that will receive the width in device units. | |
height | is a pointer to a size_t that will receive the height in device units. |
Converts a geographical point to a device point.
hMap | is the SUHANDLE to the ShapeUp map. | |
gpx | is a double that contains the east-west value to convert. | |
gpy | is a double that contains the north-south value to convert. | |
dpx | is a pointer to an int that will receive the east-west value. | |
dpy | is a pointer to an int that will receive the north-south value. |
Forces a repaint of the ShapeUp map window.
hMap | is the SUHANDLE to the ShapeUp map to refresh. | |
bFullRedraw | if true, all map objects are redrawn, and if false, the background buffer is used to paint the map objects and only the top items are redrawn. |
Sets a new map interaction state. The interaction state is a value indicating what the user is about to do, or is doing, in the map. This is in short the state of the mutual exclusive toolbar buttons like select, rectangle select, circle select, etc. This can be used to add new states to the map.
hMap | is the SUHANDLE to the ShapeUp map. | |
state | is an unsigned long containing the new map interaction state. Note: Not all map states defined can be set. Check MAPSTATE for more info. |
Zooms the map.
hMap | is the SUHANDLE to the ShapeUp map. | |
factor | is the factor used to zoom the map. 0.0 < factor < 1.0 zooms in, and 1.0 < factor zooms out. |
Zooms the map to fit the entire workspace, or to fit a specified theme.
hMap | is the SUHANDLE to the ShapeUp map. | |
hTheme | is the SUHANDLE to the ShapeUp theme to fit. If this parameter is NULL, the map will zoom to fit the entire workspace. |
Zooms the map to fit the selection in a specified theme.
hMap | is the SUHANDLE to the ShapeUp map. | |
hTheme | is the SUHANDLE to the ShapeUp theme that contains the selection. |
Enables or disables a ShapeUp menu item.
hMenuItem | is the SUHANDLE to the menu item to change. | |
bEnabled | is the new enabled state. |
Checks if the recordset cursor is moved before the first element.
hRecordset | is an SUHANDLE to the recordset. | |
bof | is a pointer to a BOOL that will receive the beginning-of-file state. |
Closes a ShapeUp recordset. It is important to close all retrieved recordsets to avoid resource leaks.
hRecordset | is an SUHANDLE to the recordset. |
Checks if the recordset cursor is moved past the last element.
hRecordset | is an SUHANDLE to the recordset. | |
eof | is a pointer to a BOOL that will receive the end-of-file state. |
Moves a ShapeUp recordset cursor to the first item.
hRecordset | is an SUHANDLE to the recordset. |
Get an element from a ShapeUp recordset at the current cursor position.
hRecordset | is an SUHANDLE to the recordset. | |
handle | is a pointer to an SUHANDLE that will receive a handle to an object defined in the recordset. |
Retrieves the number of item in a ShapeUp recordset.
hRecordset | is an SUHANDLE to the recordset. | |
count | is a pointer to size_t that will receive the item count. |
Moves a ShapeUp recordset cursor to the last item.
hRecordset | is an SUHANDLE to the recordset. |
Advances a ShapeUp recordset to the next item.
hRecordset | is an SUHANDLE to the recordset. |
Steps a ShapeUp recordset to the previous item.
hRecordset | is an SUHANDLE to the recordset. |
SURESULT Shape_GetAttribute | ( | SUHANDLE | hShape, | |
SUHANDLE | hTheme, | |||
size_t | column, | |||
char * | buffer, | |||
size_t * | bufferSize | |||
) | [inline] |
Retrieves an attribute for a shape within a theme.
This function can be used in a two step process. First it's used to query ShapeUp for the buffer size needed to fit the text, then the actual text can be fetched.
To query for the buffer size, set buffer to NULL, and let bufferSize point to a size_t that will receive the value. The size returned includes space for the null termination of the string. Allocate a proper character buffer and call the function again with this buffer and the returned bufferSize.
hShape | is an SUHANDLE to the shape to query. | |
hTheme | is an SUHANDLE to the theme containing the shape. | |
column | is the zero-based index of the attribute to query. | |
buffer | is a pointer to a character buffer that will receive the text. | |
bufferSize | is a pointer to a size_t indicates the size of the buffer. |
SURESULT Shape_GetBounds | ( | SUHANDLE | hShape, | |
double * | xmin, | |||
double * | ymin, | |||
double * | xmax, | |||
double * | ymax | |||
) | [inline] |
Gets a shape's bounding box.
hShape | is the SUHANDLE to the shape to query. | |
xmin | is a pointer to a double that will receive the west-most value. This parameter might be NULL if it's of no interest. | |
ymin | is a pointer to a double that will receive the south-most value. This parameter might be NULL if it's of no interest. | |
xmax | is a pointer to a double that will receive the east-most value. This parameter might be NULL if it's of no interest. | |
ymax | is a pointer to a double that will receive the north-most value. This parameter might be NULL if it's of no interest. |
SURESULT Shape_GetClosestPoint | ( | SUHANDLE | hShape, | |
double | refx, | |||
double | refy, | |||
double * | closestx, | |||
double * | closesty | |||
) | [inline] |
Gets the coordinate of this shape closest to a reference point.
hShape | is the SUHANDLE to the shape to query. | |
refx | [in] = reference point x value. | |
refy | [in] = reference point y value. | |
closestx | [out] = the coordinate on this shape closest to ref x value. | |
closesty | [out] = the coordinate on this shape closest to ref y value. |
SURESULT Shape_GetCoordinate | ( | SUHANDLE | hShape, | |
size_t | part, | |||
size_t | coordIndex, | |||
double * | x, | |||
double * | y, | |||
double * | z | |||
) | [inline] |
Gets the count of all parts in this shape.
hShape | is the SUHANDLE to the shape to query. | |
part | is the zero based index of the part in this shape to query. | |
coordIndex | is zero based index of the coordinate in the specified part. | |
x | [out] is a pointer to an double that will receive the x value. This value can be set to NULL if it's of no interest. | |
y | [out] is a pointer to an double that will receive the y value. This value can be set to NULL if it's of no interest. | |
z | [out] is a pointer to an double that will receive the z value. This value can be set to NULL if it's of no interest. |
Gets the count of all parts in this shape.
hShape | is the SUHANDLE to the shape to query. | |
part | is the zero based index of the part in this shape to query. | |
count | is a pointer to an unsigned int that will receive the count value. |
Gets the count of all parts in this shape.
hShape | is the SUHANDLE to the shape to query. | |
count | is a pointer to an unsigned int that will receive the count value. |
SURESULT Shape_GetShapeBytes | ( | SUHANDLE | hShape, | |
unsigned char * | buffer, | |||
size_t * | bufferSize | |||
) | [inline] |
Retrieves underlying shape byte buffer for a shape. The resulting buffer can be casted to pointer to a CShapeRecord.
This function can be used in a two step process. First it's used to query ShapeUp for the buffer size needed to fit the data, then the actual data can be fetched.
To query for the buffer size, set buffer to NULL, and let bufferSize point to a size_t that will receive the value. The size returned includes space for the null termination of the string. Allocate a proper character buffer and call the function again with this buffer and the returned bufferSize.
hShape | is an SUHANDLE to the shape to query. | |
buffer | is a pointer to a byte buffer that will receive the data. | |
bufferSize | is a pointer to a size_t indicates the size of the buffer. |
Retrieves the type of this shape.
hShape | is an SUHANDLE to the shape to query. | |
type | is a pointer to a ShapeType that will receive the shapes's type. |
Determines if a shape is selected within a given theme.
hShape | is an SUHANDLE to the shape to query. | |
hTheme | is an SUHANDLE to the theme containing the shape. | |
selected | is a pointer to a BOOL that will receive the selected state. |
Changes the selection state of a shape in a given theme.
hShape | is an SUHANDLE to the shape to select. | |
hTheme | is an SUHANDLE to the theme containing the shape. | |
select | is a BOOL that contains the new selection state. |
SURESULT Shape_SetAttribute | ( | SUHANDLE | hShape, | |
SUHANDLE | hTheme, | |||
size_t | column, | |||
const char * | data | |||
) | [inline] |
Sets an attribute value of a shape within a theme.
hShape | is an SUHANDLE to the shape to query. | |
hTheme | is an SUHANDLE to the theme containing the shape. | |
column | is the zero-based index of the attribute. | |
data | is a null-terminated string that contains the new value. |
SURESULT Shape_SetAttributes | ( | SUHANDLE | hShape, | |
SUHANDLE | hTheme, | |||
size_t | count, | |||
const char * | data[] | |||
) | [inline] |
Sets multiple attribute values of a shape within a theme.
hShape | is an SUHANDLE to the shape to query. | |
hTheme | is an SUHANDLE to the theme containing the shape. | |
count | is the number of attribute values in data. | |
data | is an array of null-terminated strings that contains the new values. The data array may contain fewer attributes than the theme can handle. To avoid affecting an attribute value, set the appropriate field to NULL. To clear an attribute, set the field to an empty string, "". |
SURESULT ShapeUp_AddAdvancedEditHook | ( | unsigned long | userData, | |
const char * | menuString, | |||
const char * | menuDescr, | |||
void * | pReserved, | |||
SUHANDLE * | hMenuItem | |||
) | [inline] |
Adds a menu item in the Edit | Advanced Edit sub-menu. This hook should be used if the plug-in can be used to edit object data.
userData | is a user specific value that will be sent to the hook function when the event occurs. | |
menuString | is the text that will be displayed in the menu. | |
menuDescr | is a one-line text describing what the menu item does. | |
pReserved | is not used, and must be set to NULL. | |
hMenuItem | is a pointer to a SUHANDLE that will receive a handle to the added menu item. This parameter might be set to NULL if the plug-in has no interest in changing its state (enable/disable/...). |
SURESULT ShapeUp_AddAdvancedSelectionHook | ( | unsigned long | userData, | |
const char * | menuString, | |||
const char * | menuDescr, | |||
void * | pReserved, | |||
SUHANDLE * | hMenuItem | |||
) | [inline] |
Adds a menu item in the Edit | Advanced Selection sub-menu. This hook should be used if the plug-in can be used to select objects.
userData | is a user specific value that will be sent to the hook function when the event occurs. | |
menuString | is the text that will be displayed in the menu. | |
menuDescr | is a one-line text describing what the menu item does. | |
pReserved | is not used, and must be set to NULL. | |
hMenuItem | is a pointer to a SUHANDLE that will receive a handle to the added menu item. This parameter might be set to NULL if the plug-in has no interest in changing its state (enable/disable/...). |
SURESULT ShapeUp_AddCopySpecialHook | ( | unsigned long | userData, | |
const char * | menuString, | |||
const char * | menuDescr, | |||
void * | pReserved, | |||
SUHANDLE * | hMenuItem | |||
) | [inline] |
Adds a menu item in the Edit | Copy Special sub-menu. This hook should be used if the plug-in can copy objects in a special format and place the content on the Clipboard.
userData | is a user specific value that will be sent to the hook function when the event occurs. | |
menuString | is the text that will be displayed in the menu. | |
menuDescr | is a one-line text describing what the menu item does. | |
pReserved | is not used, and must be set to NULL. | |
hMenuItem | is a pointer to a SUHANDLE that will receive a handle to the added menu item. This parameter might be set to NULL if the plug-in has no interest in changing its state (enable/disable/...). |
SURESULT ShapeUp_AddDeserializeHook | ( | unsigned long | userData | ) | [inline] |
This hook ensures the plugin gets called when a ShapeUp workspace file is loaded, if the file contains data that were previously stored by this plug-in. If that is the case, the hook funktion will be called for the workspace or individual themes within it where applicable.
The hTheme SUHANDLE of the SUDeserializeHookData will be NULL if the workspace is deserialized, and contain a valid theme SUHANDLE if a theme is deserialized.
userData | is a user specific value that will be sent to the hook function when the event occurs. |
SURESULT ShapeUp_AddExportLayerHook | ( | unsigned long | userData, | |
const char * | menuString, | |||
const char * | menuDescr, | |||
void * | pReserved, | |||
SUHANDLE * | hMenuItem | |||
) | [inline] |
Adds an item in the Theme | Export dialog. This hook should be used if the plug-in can be used to export object data.
Even though the export options are not in a menu directly, the added hook can be handled from the plug-in as if it was a menu item. If the menu item is set disabled, it will not end up in the exporter list. This should be used if the current selection is not exportable by the plug-in.
userData | is a user specific value that will be sent to the hook function when the event occurs. | |
menuString | is the text that will be displayed in the menu. | |
menuDescr | is a one-line text describing what the menu item does. | |
pReserved | is not used, and must be set to NULL. | |
hMenuItem | is a pointer to a SUHANDLE that will receive a handle to the added menu item. This parameter might be set to NULL if the plug-in has no interest in changing its state (enable/disable/...). |
SURESULT ShapeUp_AddFileFormatHandlerHook | ( | unsigned long | userData, | |
const char * | filterdescription, | |||
const char * | pattern | |||
) | [inline] |
Extends the ShapeUp File Open dialog with new file fomats. This hook can be used if the plug-in acts as a loader for data stored on file.
userData | is a user specific value that will be sent to the hook function when the event occurs. | |
filterdescription | is the text that will be displayed in the file dialog file type combo box, e.g "Text files (*.txt)". | |
pattern | is the pattern for files that can be handeled, e.g "*.txt", or multiple filters separated by ';', e.g "*.txt;*.log". |
SURESULT ShapeUp_AddIdleHook | ( | unsigned long | userData | ) | [inline] |
Adds a hook for notifications when ShapeUp is idle. This can be used to let the plug-in update its menu items or toolbar buttons states.
userData | is a user specific value that will be sent to the hook function when the event occurs. |
SURESULT ShapeUp_AddJavaScriptInvokeHook | ( | unsigned long | userData, | |
const char * | properties[], | |||
const char * | methods[] | |||
) | [inline] |
This hook is called when a JavaScript is invoking the plug-in. It supports multiple arguments as well as multiple return values to and from the plug-in.
userData | is a user specific value that will be sent to the hook function when the event occurs. | |
properties | is an array of strings containing property names exposed by this GPI. The last element in this array must be NULL. If no properties are exposed, this parameter may be set to NULL. | |
methods | is an array of strings containing method names exposed by this GPI. The last element in this array must be NULL. If no methods are exposed, this parameter may be set to NULL. |
SURESULT ShapeUp_AddLayerSelectionChangedHook | ( | unsigned long | userData | ) | [inline] |
This hook is called when the layer selection changes.
userData | is a user specific value that will be sent to the hook function when the event occurs. |
SURESULT ShapeUp_AddLButtonDownHook | ( | unsigned long | userData | ) | [inline] |
Adds a hook for notifications when the left mouse button is pressed within the ShapeUp map.
userData | is a user specific value that will be sent to the hook function when the event occurs. |
SURESULT ShapeUp_AddLButtonUpHook | ( | unsigned long | userData | ) | [inline] |
Adds a hook for notifications when the left mouse button is released within the ShapeUp map.
userData | is a user specific value that will be sent to the hook function when the event occurs. |
SURESULT ShapeUp_AddLoadLayerHook | ( | unsigned long | userData, | |
const char * | menuString, | |||
const char * | menuDescr, | |||
void * | pReserved, | |||
SUHANDLE * | hMenuItem | |||
) | [inline] |
Adds a menu item in the Insert | Add Theme From sub-menu. This hook should be used if the plug-in creates a new layer using external data sources. This is equivalent to the old ShapeUp loader plug-ins.
userData | is a user specific value that will be sent to the hook function when the event occurs. | |
menuString | is the text that will be displayed in the menu. | |
menuDescr | is a one-line text describing what the menu item does. | |
pReserved | is not used, and must be set to NULL. | |
hMenuItem | is a pointer to a SUHANDLE that will receive a handle to the added menu item. This parameter might be set to NULL if the plug-in has no interest in changing its state (enable/disable/...). |
SURESULT ShapeUp_AddMouseMoveHook | ( | unsigned long | userData | ) | [inline] |
Adds a hook for notifications when the mouse is moved within the ShapeUp map.
userData | is a user specific value that will be sent to the hook function when the event occurs. |
SURESULT ShapeUp_AddNewLayerHook | ( | unsigned long | userData, | |
const char * | menuString, | |||
const char * | menuDescr, | |||
void * | pReserved, | |||
SUHANDLE * | hMenuItem | |||
) | [inline] |
Adds a menu item in the Insert | New Theme sub-menu. This hook should be used if the plug-in creates a new layer not using external data sources.
userData | is a user specific value that will be sent to the hook function when the event occurs. | |
menuString | is the text that will be displayed in the menu. | |
menuDescr | is a one-line text describing what the menu item does. | |
pReserved | is not used, and must be set to NULL. | |
hMenuItem | is a pointer to a SUHANDLE that will receive a handle to the added menu item. This parameter might be set to NULL if the plug-in has no interest in changing its state (enable/disable/...). |
SURESULT ShapeUp_AddPostDrawHook | ( | unsigned long | userData | ) | [inline] |
Adds a hook for notifications when ShapeUp has drawn the map. This can be used to let the plug-in overlay its own graphics.
userData | is a user specific value that will be sent to the hook function when the event occurs. |
SURESULT ShapeUp_AddRemoveLayerHook | ( | unsigned long | userData | ) | [inline] |
Adds a hook for notifications when a theme is about to be removed.
userData | is a user specific value that will be sent to the hook function when the event occurs. |
SURESULT ShapeUp_AddRemoveShapeHook | ( | unsigned long | userData | ) | [inline] |
Adds a hook for notifications when a shape is about to be removed. If an entire theme is removed, there will not be individual notifications for each shape.
userData | is a user specific value that will be sent to the hook function when the event occurs. |
SURESULT ShapeUp_AddShapeSelectionChangedHook | ( | unsigned long | userData | ) | [inline] |
This hook is called when the shape selection changes.
userData | is a user specific value that will be sent to the hook function when the event occurs. |
SURESULT ShapeUp_AddSimpleHook_Helper | ( | int | ht, | |
unsigned long | ud, | |||
void * | args | |||
) | [inline] |
Helper function for internal use.
ht | is the HOOKTYPE value. | |
ud | is the user data. | |
args | is a pointer to the hook specific data. |
SURESULT ShapeUp_AddToolBarButtonHook | ( | unsigned long | userData | ) | [inline] |
Adds a hook for notifications when the user selects one of the plug-ins toolbar buttons.
userData | is a user specific value that will be sent to the hook function when the event occurs. |
SURESULT ShapeUp_AddToolsHook | ( | unsigned long | userData, | |
const char * | menuString, | |||
const char * | menuDescr, | |||
void * | pReserved, | |||
SUHANDLE * | hMenuItem | |||
) | [inline] |
Adds a menu item in the Tools menu.
userData | is a user specific value that will be sent to the hook function when the event occurs. | |
menuString | is the text that will be displayed in the menu. | |
menuDescr | is a one-line text describing what the menu item does. | |
pReserved | is not used, and must be set to NULL. | |
hMenuItem | is a pointer to a SUHANDLE that will receive a handle to the added menu item. This parameter might be set to NULL if the plug-in has no interest in changing its state (enable/disable/...). |
SURESULT ShapeUp_AddWorkspaceReadyHook | ( | unsigned long | userData | ) | [inline] |
This hook is called when a new workspace is created, after any serialization has taken place, or after a new empty workspace has been created.
userData | is a user specific value that will be sent to the hook function when the event occurs. |
SURESULT ShapeUp_Allocate | ( | size_t | count, | |
void ** | bytes | |||
) | [inline] |
Allocates a memory buffer. This function should be used where a data buffer is handed over from the plug-in to ShapeUp.
count | is the number of bytes to allocate. | |
bytes | is the address of a pointer that will receive the allocated buffer. |
Allocates a pane in the ShapeUp status bar. The ShapeUp status bar is a limited resource. Use sparingly. When an allocated pane is not needed anymore, it should be released with a call to ShapeUp_ReleaseStatusBarPane().
width | is the requested width in device units of the new pane. | |
hStatusPane | is a pointer to a SUHANDLE that will receive the pane handle. |
SURESULT ShapeUp_BeginProgress | ( | const char * | title, | |
float | progress, | |||
SUHANDLE * | hProgress | |||
) | [inline] |
Initiates a ShapeUp progress bar session. The ShapeUp progress bar is shown in the left corner of the ShapeUp status bar, and can be used to show the progress of lengthy operations. When the progress bar is not used anymore, it must be released with a call to ShapeUp_EndProgress().
title | is a null terminated string of text to be displayed to the left of the progress bar. May be NULL to show no text. | |
progress | is the initial value of the progress. Usually 0. | |
hProgress | is a pointer to an SUHANDLE that will receive the progress bar handle. |
SURESULT ShapeUp_Deallocate | ( | void * | bytes | ) | [inline] |
Dellocates a memory buffer previously allocated by ShapeUp_Allocate().
bytes | is the buffer to release. |
char * ShapeUp_DuplicateString | ( | const char * | str | ) | [inline] |
Allocates a memory buffer using ShapeUp_Allocate(), and copies a given string to it. A string created with this function needs to be deallocated by a call to ShapeUp_Deallocate(), or it should be sent into one of the ShapeUp API functions that explicitly sais it will clean-up the string.
str | is the string to duplicate. |
Releases the ShapeUp progress bar previously allocated with a call to ShapeUp_BeginProgress(). A call to this function invalidates the hProgress handle.
hProgress | is the SUHANDLE to the progress bar. |
Asks ShapeUp for the workspace currently active.
hWorkspace | is a pointer to a SUHANDLE that will receive a handle to the workspace. |
SURESULT ShapeUp_GetErrorDescription | ( | SURESULT | errCode, | |
char * | buffer, | |||
size_t * | bufferSize | |||
) | [inline] |
Translates a SURESULT value into a human readable string.
This function can be used in a two step process. First it's used to query ShapeUp for the buffer size needed to fit the message, then the actual message can be fetched.
To query for the buffer size, set buffer to NULL, and let bufferSize point to a size_t that will receive the value. The size returned includes space for the null termination of the string. Allocate a proper character buffer and call the function again with this buffer and the returned bufferSize.
errCode | is the SURESULT value to translate. | |
buffer | is a pointer to a character buffer that will receive the text. | |
bufferSize | is a pointer to a size_t indicates the size of the buffer. |
SURESULT ShapeUp_GetVersion | ( | char * | buffer, | |
size_t * | bufferSize | |||
) | [inline] |
Returns the current version of ShapeUp as a string. This is the same string as can be seen in the Help | About dialog.
This function can be used in a two step process. First it's used to query ShapeUp for the buffer size needed to fit the version string, then the actual text can be fetched.
To query for the buffer size, set buffer to NULL, and let bufferSize point to a size_t that will receive the value. The size returned includes space for the null termination of the string. Allocate a proper character buffer and call the function again with this buffer and the returned bufferSize.
buffer | is a pointer to a character buffer that will receive the text. | |
bufferSize | is a pointer to a size_t indicates the size of the buffer. |
Asks ShapeUp for a specific workspace by index.
index | is a pointer to a size_t that will receive the count value. | |
hWorkspace | is a pointer to a SUHANDLE that will receive a handle to the workspace. |
SURESULT ShapeUp_GetWorkspaceCount | ( | size_t * | count | ) | [inline] |
Asks ShapeUp for the number of workspaces currently opened.
count | is a pointer to a size_t that will receive the count value. |
SURESULT ShapeUp_HasJavaScriptSupport | ( | BOOL * | support | ) | [inline] |
Asks ShapeUp if it has JavaScript support, i.e. if the Mozilla SpiderMonkey js32.dll is present.
support | is a pointer to a BOOL that will receive the value. |
Asks ShapeUp if the supplied handle is a valid one.
handle | is the handle to test. | |
valid | is a pointer to a BOOL that will receive the value. |
Releases a pane in the ShapeUp status bar previously allocated by a call to ShapeUp_AllocateStatusBarPane(). A call to this function invalidates the hStatusPane handle.
hStatusPane | is a SUHANDLE to the pane to release. |
SURESULT ShapeUp_RemoveAllHooks | ( | ) | [inline] |
Removes all removable hooks. Not all hooks are removable. Don't use.
SURESULT ShapeUp_RemoveHook_Helper | ( | int | hookType | ) | [inline] |
Helper function for internal use.
hookType | is the HOOKTYPE value. |
SURESULT ShapeUp_RemoveLayerSelectionChangedHook | ( | ) | [inline] |
Removes the notification hook set by an earlier call to ShapeUp_AddLayerSelectionChangedHook().
SURESULT ShapeUp_RemoveMouseMoveHook | ( | ) | [inline] |
Removes the mouse move notification hook set by an earlier call to ShapeUp_AddMouseMoveHook().
SURESULT ShapeUp_RemoveShapeSelectionChangedHook | ( | ) | [inline] |
Removes the notification hook set by an earlier call to ShapeUp_AddShapeSelectionChangedHook().
Sets the progress of the ShapeUp progress bar.
hProgress | is the SUHANDLE to the progress bar. | |
progress | is the value of the progress. 0 <= progress <= 1. |
SURESULT ShapeUp_SetStatusBarPaneInfo | ( | SUHANDLE | hStatusPane, | |
const char * | text, | |||
HICON | hIcon, | |||
void * | pReserved | |||
) | [inline] |
Sets information in an allocated pane in the ShapeUp status bar.
hStatusPane | is a handle to the status bar pane. | |
text | is a pointer to a null terminated string to be displayed. May be NULL to clear the current text. | |
hIcon | is a handle to an icon to be displayed. May be NULL to clear the current icon. | |
pReserved | is fur future use, must be NULL. |
SURESULT ShapeUp_SetStatusBarText | ( | const char * | text | ) | [inline] |
Sets informational text in the ShapeUp status bar.
text | is a pointer to a null terminated string to be displayed. May be NULL to clear the current text. |
SURESULT ShapeUp_WantUpdate | ( | unsigned long | userData | ) | [inline] |
Requests a synchronised call from ShapeUp.
If a plug-in is running a separate thread, that thread is not allowed to call any of the ShapeUp API functions except ShapeUp_WantUpdate(). The plug-in then has to wait for its hook function to get called in which it may access all ShapeUp API functions.
userData | is a user specific value that will be sent to the hook function when the syncronised call occurs. |
SURESULT Theme_AddAttribute | ( | SUHANDLE | hTheme, | |
unsigned long | type, | |||
const char * | name, | |||
const char * | defaultval, | |||
size_t * | index | |||
) | [inline] |
Adds a new attribute to a ShapeUp theme.
hTheme | is the SUHANDLE to the theme. | |
type | is the ATTRIBUTETYPE of the new attribute. | |
name | is null-terminated string containing the name of the new attribute. This parameter cannot be NULL nor an empty string. | |
defaultval | is null-terminated string containing a default value of the new attribute. This parameter might be NULL. | |
index | is a pointer to a size_t that will receive the zero-based index of the added attribute. This parameter might be NULL if it's of no interest. |
SURESULT Theme_AddAttribute | ( | SUHANDLE | hTheme, | |
unsigned long | type, | |||
const char * | name, | |||
size_t * | index | |||
) | [inline] |
SURESULT Theme_AddShape | ( | SUHANDLE | hTheme, | |
const CShapeRecord * | shapeData, | |||
SUHANDLE * | hShape | |||
) | [inline] |
Adds a copy of a new shape object to a theme.
hTheme | is the SUHANDLE to the ShapeUp theme. | |
shapeData | is a pointer to the new shape object to add. | |
hShape | is a pointer to a SUHANDLE that will receive a handle to the new shape object. |
Turns off indexing and other time consuming tasks when calling Theme_AddShape(). Use this if many shapes should be added at once. After the shapes have been added, call Theme_BatchAddShapeEnd() to turn the features back on again.
hTheme | is the SUHANDLE to the ShapeUp theme. |
Turns on indexing and other tasks after calling Theme_AddShape().
hTheme | is the SUHANDLE to the ShapeUp theme. |
Clears the current shape selection in a theme.
Deletes an attribute from a ShapeUp theme.
hTheme | is the SUHANDLE to the theme. | |
index | is the zero-based index of the attribute to delete. |
Deletes a shape within a ShapeUp theme. After this operation, the hShape handle will be invalid.
hTheme | is the SUHANDLE to the ShapeUp theme containing the shape object to delete. | |
hShape | is a SUHANDLE to the shape object to delete. |
Retrieves the number of attributes in a ShapeUp theme.
hTheme | is the SUHANDLE to the theme to query. | |
count | is a pointer to size_t that will receive the attribute count. |
Retrieves the index of a named attribute in a ShapeUp theme.
hTheme | is the SUHANDLE to the theme to query. | |
name | is a null-terminated string containing the name of the attribute to query. | |
index | is a pointer to a size_t which will receive the index value. |
SURESULT Theme_GetAttributeName | ( | SUHANDLE | hTheme, | |
size_t | column, | |||
char * | buffer, | |||
size_t * | bufferSize | |||
) | [inline] |
Retrieves the name of an attribute in a ShapeUp theme.
This function can be used in a two step process. First it's used to query ShapeUp for the buffer size needed to fit the name, then the actual name can be fetched.
To query for the buffer size, set buffer to NULL, and let bufferSize point to a size_t that will receive the value. The size returned includes space for the null termination of the string. Allocate a proper character buffer and call the function again with this buffer and the returned bufferSize.
hTheme | is the SUHANDLE to the theme to query. | |
column | is the zero-based index of the attribute to query. | |
buffer | is a pointer to a character buffer that will receive the text. | |
bufferSize | is a pointer to a size_t indicates the size of the buffer. |
Retrieves the type of an attribute in a ShapeUp theme.
hTheme | is the SUHANDLE to the theme to query. | |
column | is the zero-based index of the attribute to query. | |
type | is a pointer to an unsigned long which will receive the type value. |
SURESULT Theme_GetBounds | ( | SUHANDLE | hTheme, | |
double * | xmin, | |||
double * | ymin, | |||
double * | xmax, | |||
double * | ymax | |||
) | [inline] |
Gets the themes's bounding box.
hTheme | is the SUHANDLE to the ShapeUp theme to query. | |
xmin | is a pointer to a double that will receive the west-most value. This parameter might be NULL if it's of no interest. | |
ymin | is a pointer to a double that will receive the south-most value. This parameter might be NULL if it's of no interest. | |
xmax | is a pointer to a double that will receive the east-most value. This parameter might be NULL if it's of no interest. | |
ymax | is a pointer to a double that will receive the north-most value. This parameter might be NULL if it's of no interest. |
Retrieves a theme's comment.
This function can be used in a two step process. First it's used to query ShapeUp for the buffer size needed to fit the comment, then the actual comment can be fetched.
To query for the buffer size, set buffer to NULL, and let bufferSize point to a size_t that will receive the value. The size returned includes space for the null termination of the string. Allocate a proper character buffer and call the function again with this buffer and the returned bufferSize.
hTheme | is the SUHANDLE to the theme to query. | |
buffer | is a pointer to a character buffer that will receive the text. | |
bufferSize | is a pointer to a size_t indicates the size of the buffer. |
Gets a theme's fill color.
hTheme | is the SUHANDLE to the theme. | |
clr | is a pointer to a COLORREF value that will receive the current fill color. |
Retrieves font information used for labels from a ShapeUp theme.
hTheme | is the SUHANDLE to the theme to query. | |
font | is a pointer to a LOGFON struct that will receive the font properties. This parameter might be NULL if it's of no interest. | |
clr | is a pointer to a COLORREF that will receive the text color. This parameter might be NULL if it's of no interest. |
SURESULT Theme_GetInfoTip | ( | SUHANDLE | hTheme, | |
SUHANDLE | hShape, | |||
char * | buffer, | |||
size_t * | bufferSize | |||
) | [inline] |
Retrieves the translated InfoTip of a shape in a ShapeUp theme.
This function can be used in a two step process. First it's used to query ShapeUp for the buffer size needed to fit the text, then the actual text can be fetched.
To query for the buffer size, set buffer to NULL, and let bufferSize point to a size_t that will receive the value. The size returned includes space for the null termination of the string. Allocate a proper character buffer and call the function again with this buffer and the returned bufferSize.
hTheme | is the SUHANDLE to the theme containing the shape. | |
hShape | is the SUHANDLE to the shape to query. | |
buffer | is a pointer to a character buffer that will receive the text. | |
bufferSize | is a pointer to a size_t indicates the size of the buffer. |
SURESULT Theme_GetIntersectingShapes | ( | SUHANDLE | hTheme, | |
SUHANDLE | hShape, | |||
SUHANDLE * | hRecordset | |||
) | [inline] |
Gets all shapes from a theme intersecting a specific shape. If the shape indicated by hShape is in the searched theme, hTheme, that shape will not be included in the result.
IMPORTANT: Retrieved recordsets must be closed by a call to Recordset_Close().
hTheme | is the SUHANDLE to the theme to query. | |
hShape | is the SUHANDLE to the shape that will be used for intersection tests. | |
hRecordset | is a pointer to an SUHANDLE that will receive a handle to a recordset containing the intersecting shapes. |
Retrieves the name of a ShapeUp theme.
This function can be used in a two step process. First it's used to query ShapeUp for the buffer size needed to fit the name, then the actual name can be fetched.
To query for the buffer size, set buffer to NULL, and let bufferSize point to a size_t that will receive the value. The size returned includes space for the null termination of the string. Allocate a proper character buffer and call the function again with this buffer and the returned bufferSize.
hTheme | is the SUHANDLE to the theme to query. | |
buffer | is a pointer to a character buffer that will receive the text. | |
bufferSize | is a pointer to a size_t indicates the size of the buffer. |
Gets a theme's pen color.
hTheme | is the SUHANDLE to the theme. | |
clr | is a pointer to a COLORREF value that will receive the current pen color. |
Gets a theme's pen style.
hTheme | is the SUHANDLE to the theme. | |
style | is a pointer to a size_t value that will receive the current pen style. |
Gets a theme's pen width.
hTheme | is the SUHANDLE to the theme. | |
width | is a pointer to a size_t value that will receive the current pen width. |
Gets all selected shapes from a ShapeUp theme.
IMPORTANT: Retrieved recordsets must be closed by a call to Recordset_Close().
hTheme | is the SUHANDLE to the theme to query. | |
hRecordset | is a pointer to an SUHANDLE that will receive a handle to a recordset containing the selected shapes. |
SURESULT Theme_GetSelectedShapesInRect | ( | SUHANDLE | hTheme, | |
double | xmin, | |||
double | ymin, | |||
double | xmax, | |||
double | ymax, | |||
BOOL | bPartInRectOk, | |||
SUHANDLE * | hRecordset | |||
) | [inline] |
Gets all selected shapes from a theme contained in or intersecting a rectangle.
IMPORTANT: Retrieved recordsets must be closed by a call to Recordset_Close().
hTheme | is the SUHANDLE to the theme to query. | |
xmin | is the west-most bound of the rectangle. | |
ymin | is the south-most bound of the rectangle. | |
xmax | is the east-most bound of the rectangle. | |
ymax | is the north-most bound of the rectangle. | |
bPartInRectOk | if true, this function returns a recordset containing all selected shapes that intersects the specified rectangle. If false, it will return all selected shapes that are contained in the rectangle. | |
hRecordset | is a pointer to an SUHANDLE that will receive a handle to a recordset containing the resulting shapes. |
Retrieves the number of selected shape objects in a ShapeUp theme.
hTheme | is the SUHANDLE to the theme to query. | |
count | is a pointer to size_t that will receive the selected shape object count. |
Gets a shape from a theme.
hTheme | is the SUHANDLE to the theme to query. | |
nIndex | is the zero-based index of the shape whithin the theme. | |
hShape | is a pointer to an SUHANDLE that will receive the shape handle. |
Retrieves the number of shape objects in a ShapeUp theme.
hTheme | is the SUHANDLE to the theme to query. | |
count | is a pointer to size_t that will receive the shape object count. |
Gets a shape from a theme looking it up by its internal index identifier.
hTheme | is the SUHANDLE to the theme to query. | |
nIndex | is the shape's internal index identifier. | |
hShape | is a pointer to an SUHANDLE that will receive the shape handle. |
SURESULT Theme_GetShapesByQuery | ( | SUHANDLE | hTheme, | |
const char * | where, | |||
SUHANDLE * | hRecordset | |||
) | [inline] |
Gets all selected shapes from a theme matching attributes.
IMPORTANT: Retrieved recordsets must be closed by a call to Recordset_Close().
hTheme | is the SUHANDLE to the theme to query. | |
where | is a null-terminated string containing a SQL-like where statement, as can be found in the ShapeUp Query Dialog, to use for matching. | |
hRecordset | is a pointer to an SUHANDLE that will receive a handle to a recordset containing the matching shapes. |
SURESULT Theme_GetShapesInRect | ( | SUHANDLE | hTheme, | |
double | xmin, | |||
double | ymin, | |||
double | xmax, | |||
double | ymax, | |||
BOOL | bPartInRectOk, | |||
SUHANDLE * | hRecordset | |||
) | [inline] |
Gets all shapes from a theme contained in or intersecting a rectangle.
IMPORTANT: Retrieved recordsets must be closed by a call to Recordset_Close().
hTheme | is the SUHANDLE to the theme to query. | |
xmin | is the west-most bound of the rectangle. | |
ymin | is the south-most bound of the rectangle. | |
xmax | is the east-most bound of the rectangle. | |
ymax | is the north-most bound of the rectangle. | |
bPartInRectOk | if true, this function returns a recordset containing all shapes that intersects the specified rectangle. If false, it will return all shapes that are contained in the rectangle. | |
hRecordset | is a pointer to an SUHANDLE that will receive a handle to a recordset containing the resulting shapes. |
Retrieves the type of shapes this theme contains.
hTheme | is the SUHANDLE to the theme to query. | |
type | is a pointer to a ShapeType that will receive the theme's shape type. |
Inverts the current selection in a theme.
hTheme | is the SUHANDLE to the theme. |
Determines if a theme is read-only.
hTheme | is the SUHANDLE to the ShapeUp theme to query. | |
readonly | is a pointer to a BOOL that will receive the read-only state. |
Determines if a theme is selected.
hTheme | is the SUHANDLE to the ShapeUp theme to query. | |
selected | is a pointer to a BOOL that will receive the selected state. |
Determines if a theme is visible.
hTheme | is the SUHANDLE to the ShapeUp theme to query. | |
visible | is a pointer to a BOOL that will receive the visibility state. |
Retrievs the workspace containing the ShapeUp theme.
hTheme | is the SUHANDLE to a theme. | |
hWorkspace | is a pointer to an SUHANDLE that will receive a handle to the hosting workspace. |
Recalculates a themes's bounding box. This function needs to be called after the geometry of a contained object is changed.
hTheme | is the SUHANDLE to the ShapeUp theme to update. |
SURESULT Theme_ReplaceShapeData | ( | SUHANDLE | hTheme, | |
SUHANDLE | hShape, | |||
const CShapeRecord * | shapeData | |||
) | [inline] |
Replaces the geometry of a shape object in a theme with a new geometry.
hTheme | is the SUHANDLE to the ShapeUp theme. | |
hShape | is a SUHANDLE to the shape object to replace. | |
shapeData | is a pointer to the new shape object to insert. |
Selects a theme.
hTheme | is the SUHANDLE to the theme. | |
select | is true if selecting and false if deselecting. |
Sets an attribute's comment.
hTheme | is the SUHANDLE to the theme. | |
index | is the zero-based index of the attribute. | |
buffer | is a null-terminated string that contains the new comment. Use NULL to clear the comment. |
Sets a theme's comment.
hTheme | is the SUHANDLE to the theme. | |
buffer | is a null-terminated string that contains the new comment. |
Sets a theme's fill color.
hTheme | is the SUHANDLE to the theme. | |
clr | is a COLORREF value for the new color. |
Sets the name of a ShapeUp theme.
hTheme | is the SUHANDLE to the theme. | |
buffer | is a null-terminated string that contains the new name. |
Sets a theme's pen color.
hTheme | is the SUHANDLE to the theme. | |
clr | is a COLORREF value for the new color. |
Sets a theme's pen style.
hTheme | is the SUHANDLE to the theme. | |
style | is a size_t value for the new pen style. |
Sets a theme's pen width.
hTheme | is the SUHANDLE to the theme. | |
width | is a size_t value for the new pen width. |
SURESULT Theme_SetRasterImage | ( | SUHANDLE | hTheme, | |
HBITMAP | hbm, | |||
double | west, | |||
double | south, | |||
double | east, | |||
double | north, | |||
const char * | sourceHint | |||
) | [inline] |
Sets a raster themes image data.
hTheme | is the SUHANDLE to the theme. | |
hbm | is a handle to a Windows bitmap. ShapeUp will take ownership of the bitmap and destroy it when its no longer needed. | |
west | is the western boudary of the raster. | |
south | is the southern boudary of the raster. | |
east | is the eastern boudary of the raster. | |
north | is the northern boudary of the raster. | |
sourceHint | is a description of where the data came from. E.g. if loaded from a file, this could be the file name. This parameter is informational only, and may be NULL. If supplied, it is displayed in the ShapeUp statistical view. |
Sets data to be serialized with a theme. This function can be called at any time setting new data. However, when this function is called, any old data is discarded and fully replaced with the new.
This data can later be restored from a ShapeUp workspace file when it is loaded, if the plug-in has set up a deserialize hook using the ShapeUp_AddDeserializeHook call.
hTheme | is the SUHANDLE to the theme. | |
byteCount | is the size of the bytes array. | |
bytes | is a pointer to a byte sequence containing the data to be serialized. |
SURESULT ToolBar_Create | ( | HINSTANCE | hInstResource, | |
LPCTSTR | lpszResourceName, | |||
const char * | name, | |||
SUHANDLE * | hToolbar | |||
) | [inline] |
Creates a new ShapeUp toolbar.
hInstResource | is plug-in (DLL) resource instance from where ShapeUp loads te toolbar resource. | |
lpszResourceName | is resource identifier of the toolbar to load. | |
name | is a null terminated string containing the name of the new toolbar. E.g. this name is used in the View | Plug-in Toolbars and should be on the form "<MYNAME> Toolbar". | |
hToolbar | is a pointer to an SUHANDLE that will receive the toolbar handle. |
Retrieves the number of buttons in a ShapeUp toolbar.
hToolbar | is the SUHANDLE to the toolbar to query. | |
count | is a pointer to size_t that will receive the toolbar button count. |
Checks if this toolbar is visible or not.
hToolbar | is the SUHANDLE to the toolbar to query. | |
visible | is a pointer to BOOL that will receive the toolbar state. |
Checkes or unchecks a ShapeUp toolbar button.
hToolbar | is the SUHANDLE to the toolbar containing the button. | |
nID | is the command ID of the button. | |
bChecked | is the new checked state. |
Enables or disables a ShapeUp toolbar button.
hToolbar | is the SUHANDLE to the toolbar containing the button. | |
nID | is the command ID of the button. | |
bEnabled | is the new enabled state. |
SURESULT Workspace_AddDataPage | ( | SUHANDLE | hWorkspace, | |
const char * | name, | |||
HWND * | page, | |||
SUHANDLE * | hDataPage | |||
) | [inline] |
Creates a new custom data page for a workspace. A data page is an addition to the four native data pages supplied by ShapeUp: Attributes, Coordinates, Statistics and Bookmarks.
A custom data page can be used to display any windows control as a child.
hWorkspace | is the SUHANDLE to the workspace. | |
name | is the name of the new data page. This name is displayed in the view menu as well as in the Quick Tabs. | |
page | is a pointer to a windows handle to be used as the parent of the new the new child control. This parameter might be NULL. | |
hDataPage | is a SUHANDLE that will identify the created data page. This parameter might be NULL. |
SURESULT Workspace_BrowseTheme | ( | SUHANDLE | hWorkspace, | |
const char * | title, | |||
SUHANDLE * | hTheme | |||
) | [inline] |
Opens ShapeUp's theme selection dialog and lets the user select a theme.
hWorkspace | is the SUHANDLE to the workspace containing the themes. | |
title | is a null-terminated string containing the title for the dialog. Might be NULL if default title "Select Theme" is ok. | |
hTheme | is a pointer to an SUHANDLE that will receive the theme handle. This handle will be NULL if the user presses cancel. |
Deselects all themes in a workspace.
hWorkspace | is the SUHANDLE to the workspace. |
SURESULT Workspace_CreateNewTheme | ( | SUHANDLE | hWorkspace, | |
ShapeType | type, | |||
const char * | name, | |||
SUHANDLE * | hTheme | |||
) | [inline] |
Creates a new theme of specified sort in a ShapeUp workspace.
hWorkspace | is a SUHANDLE to the workspace to add the new theme in. | |
type | is the type of objects this theme should contain. | |
name | is a null-terminated string used as the themes initial name. This parameter might be NULL to get default naming. | |
hTheme | is a pointer to an SUHANDLE that will receive a handle to the new theme. |
SURESULT Workspace_CreateNewThemeFromSelection | ( | SUHANDLE | hWorkspace, | |
SUHANDLE | hSourceTheme, | |||
const char * | name, | |||
SUHANDLE * | hTheme | |||
) | [inline] |
Creates a new theme based on the selection in a source theme in this workspace.
hWorkspace | is a SUHANDLE to the workspace to add the new theme in. | |
hSourceTheme | is the theme containing selected shapes to be copied. | |
name | is a null-terminated string used as the themes initial name. This parameter might be NULL to get default naming. | |
hTheme | is a pointer to an SUHANDLE that will receive a handle to the new theme. |
SURESULT Workspace_GetBounds | ( | SUHANDLE | hWorkspace, | |
double * | xmin, | |||
double * | ymin, | |||
double * | xmax, | |||
double * | ymax | |||
) | [inline] |
Gets the workspace's bounding box.
hWorkspace | is the SUHANDLE to the workspace to query. | |
xmin | is a pointer to a double that will receive the west-most value. This parameter might be NULL if it's of no interest. | |
ymin | is a pointer to a double that will receive the south-most value. This parameter might be NULL if it's of no interest. | |
xmax | is a pointer to a double that will receive the east-most value. This parameter might be NULL if it's of no interest. | |
ymax | is a pointer to a double that will receive the north-most value. This parameter might be NULL if it's of no interest. |
Retrieves a workspace's comment.
This function can be used in a two step process. First it's used to query ShapeUp for the buffer size needed to fit the comment, then the actual comment can be fetched.
To query for the buffer size, set buffer to NULL, and let bufferSize point to a size_t that will receive the value. The size returned includes space for the null termination of the string. Allocate a proper character buffer and call the function again with this buffer and the returned bufferSize.
hWorkspace | is the SUHANDLE to the workspace to query. | |
buffer | is a pointer to a character buffer that will receive the text. | |
bufferSize | is a pointer to a size_t indicates the size of the buffer. |
Retrieves the ShapeUp map window associated with a workspace.
hWorkspace | is the workspace to query. | |
hMap | is a pointer to an SUHANDLE that will receive the map window handle. |
Retrieves a single selected theme in a ShapeUp workspace. If there is exactly one selected theme, this theme will be retrieved, otherwise the function returns a NULL hTheme handle.
This function is a shortcut to check for and get a single selected theme supplied since many operations needs just one selected theme. To get all selected themes use Workspace_GetSelectedThemes().
hWorkspace | is the SUHANDLE to the workspace to query. | |
hTheme | is a pointer to an SUHANDLE that will receive the theme handle, or it will receive a NULL handle if there is more or less than one (1) selected theme. |
Retrieves all selected themes in a ShapeUp workspace. The result is in the form of a ShapeUp recordset containing ShapeUp theme handles.
hWorkspace | is the SUHANDLE to the workspace to query. | |
hRecordset | is a pointer to an SUHANDLE that will receive the recordset handle. |
Retrieves the number of selected themes in a ShapeUp workspace.
hWorkspace | is the SUHANDLE to the workspace to query. | |
count | is a pointer to size_t that will receive the selected theme count. |
Retrieves a theme at a specified index in a ShapeUp workspace.
hWorkspace | is the SUHANDLE to the workspace to query. | |
nIndex | is zero-based index for the theme. | |
hTheme | is a pointer to an SUHANDLE that will receive the theme handle. |
Retrieves the number of themes in a ShapeUp workspace.
hWorkspace | is the SUHANDLE to the workspace to query. | |
count | is a pointer to size_t that will receive the theme count. |
Retrieves the active state of a ShapeUp workspace. A ShapeUp workspace is considered active if it has the input focus.
hWorkspace | is the SUHANDLE to the workspace to query. | |
active | is a pointer to a BOOL that will receive the active state. |
SURESULT Workspace_LoadJavaScript | ( | SUHANDLE | hWorkspace, | |
const char * | file, | |||
SUHANDLE * | hJavaScript | |||
) | [inline] |
Loads a JavaScript.
hWorkspace | is the SUHANDLE to the workspace that will become the target of the JavaScript. | |
file | is a null-terminated string containing the file name of the JavaScript. | |
hJavaScript | is a pointer to an SUHANDLE that will receive the JavaScript handle. |
Writes a text to a workspace's console window. It does not end the text with a new line. If a new line is required the character '\n' should be supplied in the text.
hWorkspace | is the SUHANDLE to the workspace that contains the console. | |
line | is a null-terminated string to be sent to the console window. |
Forces the entire workspace to update its user interface components, such as the legend view, map view and data view.
hWorkspace | is the SUHANDLE to the workspace to refresh. |
Removes a theme from a workspace.
hWorkspace | is the SUHANDLE to the workspace. | |
hTheme | is the SUHANDLE to the theme to remove. | |
ok | is a pointer to a BOOL that will receive the success of the operation. |
Sets a workspace's comment.
hWorkspace | is the SUHANDLE to the workspace. | |
buffer | is a null-terminated string that contains the new comment. |
SURESULT Workspace_SetSerialData | ( | SUHANDLE | hWorkspace, | |
size_t | byteCount, | |||
const void * | bytes | |||
) | [inline] |
Sets data to be serialized with a workspace. This function can be called at any time setting new data. However, when this function is called, any old data is discarded and fully replaced with the new.
This data can later be restored from a ShapeUp workspace file when it is loaded, if the plug-in has set up a deserialize hook using the ShapeUp_AddDeserializeHook call.
hWorkspace | is the SUHANDLE to the workspace. | |
byteCount | is the size of the bytes array. | |
bytes | is a pointer to a byte sequence containing the data to be serialized. |