Maptitude GISDK Help |
Sets default menus, toolbars, and macros.
In Version 2016 added SQL Server Connect Macro as a default macro.
SetDefaults(array defaults)
Argument |
Contents |
defaults |
A series of name-value pairs as described below |
Name |
Type |
Contents |
Menu |
String |
The name of the default menu |
Toolbar |
String |
The name of the default toolbar |
Activate |
String |
The name of the default activate macro |
Close |
String |
The name of the default close macro |
Done |
String |
The name of the default done macro |
Context Menu |
String |
The name of the default context menu |
Map Menu |
String |
The name of the default map menu |
Map Toolbar |
String |
The name of the default map toolbar |
Map Activate |
String |
The name of the default map activate macro |
Map Close |
String |
The name of the default map close macro |
Map Scale |
String |
The name of the default map scale change macro |
Map Context Menu |
String |
The name of the default map context menu |
Map Annotation Menu |
String |
The name of the default map single annotation menu |
Map Annotations Menu |
String |
The name of the default map multiple annotations menu |
Editor Menu |
String |
The name of the default editor menu |
Editor Toolbar |
String |
The name of the default editor toolbar |
Editor Activate |
String |
The name of the default editor activate macro |
Editor Close |
String |
The name of the default editor close macro |
Editor Selection |
String |
The name of the default editor selection macro |
Editor Highlight |
String |
The name of the default editor highlight macro |
Editor Cell Menu |
String |
The name of the default editor cell menu |
Editor Column Menu |
String |
The name of the default editor column menu |
Editor Row Menu |
String |
The name of the default editor row menu |
Editor Range Menu |
String |
The name of the default editor range menu |
Editor Background Menu |
String |
The name of the default editor background menu |
Layout Menu |
String |
The name of the default layout menu |
Layout Toolbar |
String |
The name of the default layout toolbar |
Layout Activate |
String |
The name of the default layout activate macro |
Layout Close |
String |
The name of the default layout close macro |
Layout Context Menu |
String |
The name of the default layout context menu |
Layout Ruler Menu |
String |
The name of the default layout ruler menu |
Layout Annotation Menu |
String |
The name of the default layout single annotation menu |
Layout Annotations Menu |
String |
The name of the default layout multiple annotations menu |
Layout Framed Annotation Menu |
String |
The name of the default layout framed annotation menu |
Layout Container Menu |
String |
The name of the default layout container menu |
Figure Menu |
String |
The name of the default figure menu |
Figure Toolbar |
String |
The name of the default figure toolbar |
Figure Activate |
String |
The name of the default figure activation macro |
Figure Close |
String |
The name of the default figure close macro |
Figure Click |
String |
The name of the default figure click macro |
Figure Context Menu |
String |
The name of the default figure context menu |
Info Menu |
String |
The name of the default info context menu |
Legend Menu |
String |
The name of the default legend context menu |
Oracle Connect Macro |
String |
The name of the macro called when the program attempts to make a connection to an Oracle database |
SQL Server Connect Macro |
String |
The name of the macro called when the program attempts to make a connection to a SQL Server database |
One call to SetDefaults() should exist in the interface macro of every custom GISDK application.
The system-wide defaults (Menu, Toolbar, Activate Macro, and Close Macro) apply to all windows, including the frame window.
The defaults that are specific to a particular window type (e.g., Map Toolbar, Editor Close) override the system-wide defaults for windows of the specified type.
All of these defaults can be overridden for an individual window. See the appropriate create or open functions for details.
Activate macros run whenever a window becomes active. The frame window activates automatically when the last remaining map, editor, or layout window closes.
Close macros run when the user chooses Close from a window's system menu or double-clicks the window's close box.
The context menu is the popup menu associated with right mouse clicks. The context can depend on the window or the state/selection of objects in the window. For example, the Figure Context Menu always pops up when the user right-clicks in the figure window. The Editor Column Menu pops up when the user right-clicks in an editor where a column is selected.
The Oracle Connect Macro option takes one argument, the name of the Oracle service to which the connection is being made, and should return a string in the format "username|password"; see the second example.
The SQL Server Connect Macro option takes one argument, the name of the SQL Server service to which the connection is being made, and should return a string in the format "username|password"; see the third example.
SetDefaults({{"Menu", "default file menu"},{"Toolbar", "default system toolbar"}})
//call during initialization
SetDefaults({{"Oracle Connect Macro", "get oracle user"}})
...
Macro "get oracle user" (service)
//get user name & password
RunDBox("oracle login", &username, &password)
Return(username + "|" + password)
endMacro
//call during initialization
SetDefaults({{"SQL Server Connect Macro", "get SQL Server user"}})
...
Macro "get SQL Server user" (service)
//get user name & password
RunDBox("SQL Server login", &username, &password)
Return(username + "|" + password)
endMacro
Function |
Summary |
Creates a new editor window |
|
Creates a new figure window |
|
Creates a new layout window |
|
Creates a new, empty map window |
©2025 Caliper Corporation | www.caliper.com |