GUI Library Functions
uiFileSBGetDir
int uiFileSBGetDir(char*)
Description
Memory-Management
Caveats
Top
uiFileSBRemove
int uiFileSBRemove(void)
Description
Removes the file selection box window.
Memory-Management
Caveats
Top
uiFileSBSetDir
int uiFileSBSetDir(char*)
Description
Memory-Management
Caveats
Top
uiFileSBShow
int uiFileSBShow(int,
char*, char*, char*, int(*)(char*))
int
mode |
i |
mode; An OR-ed (added) combination of:
* 0 - Default: no options, ok works, no multiselect, sole
* focus off
* 1 - enable VX custom options
* 2 - disable ok button (the caller is responsible for
* form destruction)
* 4 - enable multiselect (double clicking list items
* won't destroy the form, but the OK button will.
* Mode 2 takes priority over this mode, you can't do
* both)
* 8 - sole focus on
* 16 - file save instead of file open(NT only)
* 32 - prompt before overwriting an existing file(NT only)
* 64 - set initial filename to the last active filename
|
char
*title |
i |
title
|
char
*dir |
i |
directory; Uses File Manager's default path
if set to NULL
|
char
*filter |
i |
filter. Only single extension is supported on Motif.
Filters with multiple extensions format are converted
to "*.*".
Multiple extensions is not supported on Motif.
The filter may contain pairs of filter
strings. The first string in the pair describes the
filter and the second string indicates the file
extension. Multiple extensions may be specified using
';' as the delimiter. The string pairs are separated
with '|' character.
|
int
(*func)(char*) |
o |
function
|
Description
Creates file selection box window.
Memory-Management
Caveats
Top
uiFormItemCnt
int uiFormItemCnt(char*,
int, int*)
char
*form |
i |
form name
|
int
field |
i |
form field id
|
int
*cnt |
o |
no. of items associated with field
|
Description
Get the number of items associated with a field. This is
primarily for querying the no. of items associated with a
w_list, w_opt, w_btn, w_tree, w_combo, w_tab, and w_table widgets.
Memory-Management
Caveats
Top
uiFormItemDel
int uiFormItemDel(char*,
int, int)
char
*form |
i |
form name
|
int
field |
i |
form field id
|
int
item |
i |
form item id
|
Description
Delete an item from a field.
Only "w_list", "w_tree", and "w_combo" widgets are supported.
For "w_list" and "w_combo", a value of 1 removes the first item;
a value of 2 removes the second item; and so on.
For "w_tree", the item must be the index passed back as the last argument
to uiTreeItemAdd().
A value of -1 deletes all items.
Memory-Management
Caveats
Top
uiFormItemGet
int uiFormItemGet(char*,
int, int, int*, char*)
char
*form |
i |
form name
|
int
field |
i |
form field id
|
int
item |
i |
form item id
|
int
*isOn |
o |
1-item is ON, 0-item is OFF
|
char
*data |
o |
field item data in ascii format
|
Description
Get the contents of the specified item of the specified field.
The "isOn" flag applies to "item 0" of the "w_txt_btn" widget, items of
the w_list, w_opt, w_tree, w_combo, and w_tab widgets.
Memory-Management
Caveats
Top
uiFormItemSet
int uiFormItemSet(char*,
int, int, int, char*)
char
*form |
i |
form name
|
int
field |
i |
form field id
|
int
item |
i |
form item id
|
int
isOn |
i |
1-item is ON, 0-item is OFF
|
char
*data |
i |
field item data in ascii format
|
Description
Set the contents and status of the specified item of the specified field.
For the w_list widget "item" specifies the position of the new item in
the list. A value of 1 makes the new item the first item on the list;
a value of 2 makes it the second item; and so on. A value of 0 makes the
new item the last item in the list.
For the w_combo widget "item" specifies the position of the new item in
the list. A value of 1 makes the new item the first item on the list;
a value of 2 makes it the second item; and so on. A value of -1 makes the
new item the last item in the combo.
The "isOn" flag applies to "item 0" of the "w_txt_btn" widget, items of
the w_list, w_opt, w_tree, w_combo, and w_tab widgets.
Memory-Management
Caveats
Top
uiFormItemState
int uiFormItemState(char*,
int, int, int)
char
*form |
i |
form name
|
int
field |
i |
field id
|
int
item |
i |
item number;
An item number of <0 disables
the
container
widget
and
all
its
children
</pre>
|
int
state |
i |
state; 0-V_UiEnable or 1-V_UiDisable
|
Description
Set the sensitivity state of a field.
Memory-Management
Caveats
Top
uiFormKill
int uiFormKill(char*)
Description
Un-display the specified form. Destroy it if it isn't flagged as
"persistent".
Memory-Management
Caveats
Top
uiFormShow
int uiFormShow(char*)
Description
Compose (if it doesn't already exist in memory) and display the
specified form. If the form doesn't already exist, call
UiFormGetTpl(char *name, VsUiForm *tpl) to retrieve the template (tpl)
of the form specified by "name".
Call form.fn(V_UiCmdInit,NULL) to tell the application to initialize the
form.
If the "Reset" button is pushed, call form.fn(V_UiCmdReset,NULL) without
taking down the form.
If the "Apply" button is pushed, call form.fn(V_UiCmdApply,NULL) to tell
the application to evaluate the form without taking the form down.
If the "Ok" button is pushed, call form.fn(V_UiCmdOkay,NULL) to tell the
application to evaluate the form and to take the form down.
(let the application take the form down so that it has a chance
to read the form's data before the form is destroyed?).
If the "Cancel" button is pushed, call form.fn(V_UiCmdCancel,NULL) and take
the form down automatically.
Memory-Management
Caveats
Top
uiFormStateGet
int uiFormStateGet(char*,
int*, int*)
char
*name |
i |
form name
|
int
*create |
o |
form create state; 0-not created, 1-created
|
int
*display |
o |
form display state; 0-not displayed, 1-displayed
|
Description
An inquiry function that determine whether form is created and/or displayed.
Memory-Management
Caveats
Top
uiFormTitleSet
int uiFormTitleSet(char*,
char*)
char
*name |
i |
form name
|
char
*title |
i |
form title
|
Description
Sets the form title.
Memory-Management
Caveats
Top
uiFormWait
int uiFormWait(char*,
int*)
char
*name |
i |
form name
|
int
*btn |
o |
V_UiCmdOkay, V_UiCmdApply, V_UiCmdCancel
|
Description
Do the same thing as UiFormShow(), but go into a loop waiting for
Ok, Accept or Cancel. Don't allow those buttons to invoke the
form callback function (form.fn) automatically. Instead, output
an integer indicating which button was pushed. Allow "Reset"
and "Help" to do their normal thing.
Memory-Management
Caveats
Top
uiGetOpt
int uiGetOpt(int,
int, char*, int*)
int
optTyp |
i |
option type; 1=display "Continue"
2=display "Yes" and "No"
3=display "Yes", "No", "Cancel"
4=display "Yes", "Yes All", "No", "Cancel"
|
int
defBtn |
i |
index of the default button (1-4)
|
char
*msgStr |
i |
Message string
|
int
*option |
o |
option selected,
"Yes All"=2, "Continue"=1, "Yes"=1, "No"=0, "Cancel"=-1
|
Description
Memory-Management
Caveats
Top
uiGetReply
int uiGetReply(char*,
char*, char**)
char
*msgStr |
i |
Message string
|
char
*defStr |
i |
default string
|
char
**replyStr |
o |
response string
|
Description
Dialog box used for gathering information from user.
Memory-Management
Calling routine is responsible for freeing up the area allocated for
"replyStr".
Caveats
Top
uiTextAppend
int uiTextAppend(char*,
int, char*)
char
*sName |
i |
shell name
|
int
field |
i |
field number
|
char
*string |
i |
text string
|
Description
Appends string to text widget.
Memory-Management
Caveats
Top
Return to VX CAD/CAM Index