int cvxComboCurrentItem ( const char* sForm, /* I: form name */ int fldId, /* I: field id */ int *curIdx /* O: current index */ ) /* DESCRIPTION Get the item index in the combobox widget of a form. Return 1 if the API failed, else 0. */ ________________________________________________________________________________ int cvxComboSetCurrentItem ( const char* sForm, /* I: form name */ int field, /* I: field number */ int item /* I: index */ ) /* DESCRIPTION: Set the id of current selected item. Return 1 if error else 0. */ ________________________________________________________________________________ void cvxFieldCaretSet ( char *Form, /* I: GUI form name */ int idField, /* I: field id */ int Position /* I: character position numbered from zero (-1 to set caret at end) */ ) /* DESCRIPTION: Sets the position of the text caret (i.e. cursor) in the text string associated with the specified GUI form field. */ ________________________________________________________________________________ void cvxFieldClear ( char *Form, /* I: GUI form name */ int idField /* I: field id */ ) /* DESCRIPTION: Deletes all text items contained in the specified "w_list", or "w_combo" field. Input "OptForm" to apply this function to an "Options" form. */ ________________________________________________________________________________ void cvxFieldDisable ( char *Form, /* I: GUI form name */ int idField /* I: field id */ ) /* DESCRIPTION: Disable the specified GUI form field. Input "OptForm" to apply this function to an "Options" form. */ ________________________________________________________________________________ void cvxFieldEnable ( char *Form, /* I: GUI form name */ int idField /* I: field id */ ) /* DESCRIPTION: Enable the specified GUI form field. Input "OptForm" to apply this function to an "Options" form. */ ________________________________________________________________________________ int cvxFieldEnableGet ( char *Form, /* I: GUI form name */ int idField /* I: field id */ ) /* DESCRIPTION: Get the enable state of the specified form field. Input "OptForm" to apply this function to an "Options" form. Returns 1 if the field is enable, else 0. */ ________________________________________________________________________________ void cvxFieldFocusSet ( char *Form, /* I: GUI form name */ int idField /* I: field id */ ) /* DESCRIPTION: If possible, sets the focus for user input to the specified field of the specified form. If this function does not work, especially for a command form displayed in the ZW3D Manager area, try calling VxApiEventString("@@idField"), where "idField" is the actual integer value of the variable "idField". For example, if "idField=3", call VxApiEventString("@@3"). */ ________________________________________________________________________________ void cvxFieldImageSet ( char *Form, /* I: GUI form name */ int idField, /* I: label field id */ char *Image /* I: image file name */ ) /* DESCRIPTION: Assigns the specified image to the specified label field. ZW3D looks in the default search paths for the image file. See cvxPathFind(). Input "OptForm" to apply this function to an "Options" form. */ ________________________________________________________________________________ int cvxFieldInitFont ( const char *Form, /* I: GUI form name */ int idField, /* I: id of form field for font combo box */ const char *Name, /* I: name of default font, may be NULL */ int hasZwFont /* I:judge if fonts have ZW fonts.1:include ZW fonts,0:no ZW fonts */ ) /* DESCRIPTION: Initializes an input field for selecting a font. This function is intended for use when initializing a form. It can be called during initialization of a GUI form or from the "init_after" callback function of an "Options" form. It is assumed the form has an option (integer) field "idField" that has a combo box widget. Any prior contents of the combo box list are discarded, and the combo box list is filled with the names of fonts currently available on the local computer. If "Name" is a non-empty string that matches the name of one of those fonts, that font becomes the default selection in the combo box. To apply this function to an "Options" form, input "OptForm" as the value of the "Form" argument. It is recommended that the form's field "idField" should reference the global variable "VgRdTxtFont" to hold the index of the selected item. This will synchronize the default font selection with the font selection fields in native ZW3D commands. This function updates "VgRdTxtFont" if a match to "Name" is found. If "Name" does not match any font name, the current value of "VgRdTxtFont" selects the default item in the combo box list. Returns 1 if function fails; 0 if it succeeds. When working with an "Options" form, the usual practice for managing a font input field is to use an option field having a combo box for the font names, and to use a hidden text field in the form's data container to hold the name of the selected font. In the form's "init_after" callback, call this function with the contents of the hidden field as the "Name" argument. In the form's "function" callback, query the combo box for the text of the selected item, save the text to the hidden field, and use the text wherever the font name is needed. If the combo box cannot be queried because the "Options" form is not active (such as during regeneration), use whatever text was previously saved in the hidden field as the font name. For example, an "init_after" callback might include this snippet of code to initialize a font selection combo box in field 5, with a hidden text field 4 that might contain the name of a previously selected font (the data container is specified by "idData"). Note that the font name will be an empty string if field 4 does not exist: svxData dataFontName; cvxDataGet(idData, 4, &dataFontName); cvxFieldInitFont("OptForm", 5, dataFontName.Text); The command's "function" callback might include this snippet to get the font name: svxData dataFontIndex, dataFontName; char font[sizeof(dataFontName.Text)]; // Get previously saved font name (will be an empty string if // hidden field 4 does not exist) and index of selected font. if (cvxDataGet(idData, 4, &dataFontName)) dataFontName.isText = 1; if (cvxDataGet(idData, 5, &dataFontIndex) return 1; // Look up name of selected font. cvxItemGet("OptForm", 5, (int)dataFontIndex.Num, font); if (strlen(font) > 0) strcpy(dataFontName.Text, font); // Replace contents of hidden field with selected font name. cvxDataDel(idData, 4); cvxDataSet(idData, 4, dataFontName); cvxDataToFeature(idData, 0, 1); */ ________________________________________________________________________________ void cvxFieldNumItems ( char *Form, /* I: GUI form name */ int idField, /* I: field id */ int *NumItems /* O: number of items associated with the field */ ) /* DESCRIPTION: Gets the number of items associated with a field. This is primarily for querying the number of items associated with a w_list, w_opt, w_btn, w_tree, w_combo, w_tab, or w_table widget. Input "OptForm" to apply this function to an "Options" form. */ ________________________________________________________________________________ void cvxFilterItemApply ( const char *panelName, /* I: entity pick filter panel */ const char *filterItem /* I: Filter item name */ ) /* DESCRIPTION: Apply the specified filter item to the current command's field. Make sure that "FilterItem" could be found. If the specified panel is current pick panel, update the ui of pick tool. Otherwise, just apply the filter item. */ ________________________________________________________________________________ void cvxFormActiveField ( int *idField /* O: active field id */ ) /* DESCRIPTION: Outputs the ID of the active field of the active template-driven GUI form. Outputs "idField = 0" if the active field cannot be determined. */ ________________________________________________________________________________ int cvxFormAdjustSize ( const char* Form /* I: form name */ ) /* DESCRIPTION: Auto adjust the form size when its children are changed (hidden or modified). Return 1 if function fails; 0 if it succeeds. */ ________________________________________________________________________________ void cvxFormCallback ( vxName Name, /* I: function name */ void *Function /* I: function pointer */ ) /* DESCRIPTION: Registers a pointer to a callback function referenced by name in the definition of a GUI form template field (e.g. "callback=MyCallback"). Function pointers should be registered in the "Init" function called when your library is dynamically loaded by ZW3D at runtime. The callback function should be of the following type: int Callback(char *FormName, int idField, int idItem) If developer wants to unload the DLL plug in file dynamically. It is a MUST to run cvxCmdFuncUnload() in the exit function. */ ________________________________________________________________________________ int cvxFormCreate ( char *Form, /* I: GUI form name */ int Display /* I: 1 to display form after it is created; else 0 */ ) /* DESCRIPTION: Creates the specified form in memory and displays it if requested. Returns 1 if error; else 0. */ ________________________________________________________________________________ int cvxFormDataGet ( char *Form, /* I: GUI form name */ char **Data /* O: GUI data encoded in a null-terminated string */ ) /* DESCRIPTION: Encodes the data associated with the specified GUI form in a null-terminated ascii string. Memory for the output string is allocated by this function and should be deallocated by the calling procedure. Only field items numbered 1 or more are encoded. The string has the following format: Version,FormName,Field_Id,ItemCnt,IsOn,ItemData,IsOn,ItemData..., Field_Id,ItemCnt,... It is assumed no item exceeds 1024 bytes in its text-encoded form. If a field is flagged with the "is_distance" option, the text string associated with it is converted from user to database units if the string contains a constant value. Returns 1 if error, else 0. */ ________________________________________________________________________________ int cvxFormDataSet ( char *Form, /* I: GUI form name */ char *Data /* I: GUI data encoded in a null-terminated string */ ) /* DESCRIPTION: Uses the data encoded in "text" to initialize the specified GUI form. See cvxFormDataGet(). Returns 1 if error, else 0. */ ________________________________________________________________________________ int cvxFormFieldGetCallback ( const char* form, /* I: form name */ int iField, /* I: field */ void** callback /* O: callback function */ ) /* DESCRIPTION: Get callback function of specified field. return 1 if error. */ ________________________________________________________________________________ int cvxFormFieldVisSet ( const char *form, /* I: form name */ int field, /* I: field id */ int state /* I: (1/0)visible or not */ ) /* DESCRIPTION: Set the visibility of the specified field in the form. Returns 1 if error, else 0. */ ________________________________________________________________________________ void cvxFormFunc ( vxName Name, /* I: function name */ void *Function, /* I: function pointer */ double Code /* I: ZW3D licensing code or 0.0 */ ) /* DESCRIPTION: Registers a function referenced by the "function=" field in a GUI form template definition. Callback functions should be registered in the "Init" function called when your library is dynamically loaded by ZW3D at runtime. The function should be the following type: int FormFunction(int FormAction, int *UnusedInteger) See evxFormAction for possible values of "int FormAction". See the "Gui Forms" section of the API documentation for a description of how to define a GUI form using a text-based template. If developer wants to unload the DLL plug in file dynamically. It is a MUST to run cvxCmdFuncUnload() in the exit function. */ ________________________________________________________________________________ int cvxFormGetSize ( const char* Form, /* I: form name */ int *Width, /* O: width of the form */ int *Height /* O: height of the form */ ) /* DESCRIPTION: Get the size of specified GUI form. Return 1 if function fails; 0 if it succeeds. */ ________________________________________________________________________________ void cvxFormHide ( char *Form /* I: GUI form name */ ) /* DESCRIPTION: Hide the specified GUI form. */ ________________________________________________________________________________ int cvxFormInqFld ( vxName Name, /* I: template name */ int *Count, /* O: number of template fields */ svxTplFld **Fields /* O: list of template fields */ ) /* DESCRIPTION: Gets abbreviated information about the fields associated with a GUI form template. The calling procedure MUST deallocate the output list. Returns 1 if function fails; 0 if it succeeds. */ ________________________________________________________________________________ void cvxFormKill ( char *Form /* I: GUI form name */ ) /* DESCRIPTION: Kills (i.e. cancel and undisplay) the specified GUI form. Input "OptForm" to apply this function to an "Options" form. */ ________________________________________________________________________________ void cvxFormLogKill ( char *Form /* I: form name */ ) /* DESCRIPTION: Log specified form, the form will be auto kill when root object exit. */ ________________________________________________________________________________ void cvxFormRefresh ( char *Form /* I: GUI form name */ ) /* DESCRIPTION: Refreshes display of the specified GUI form. Input "OptForm" to apply this function to the active "Options" form. */ ________________________________________________________________________________ int cvxFormResize ( char* Form, /* I: form name */ int Width, /* I: width of the form */ int Height /* I: height of the form */ ) /* DESCRIPTION: Set the size of specified form. Return 1 if function fails; 0 if it succeeds. */ ________________________________________________________________________________ void cvxFormShow ( char *Form /* I: GUI form name */ ) /* DESCRIPTION: Shows (i.e. display) the specified GUI form. Input "OptForm" to apply this function to an "Options" form. */ ________________________________________________________________________________ int cvxFormState ( char *Form /* I: GUI form name */ ) /* DESCRIPTION: Returns 0 if the specified form has not been created in memory. Returns 1 if the form is created but not displayed. Returns 2 if the form is created and displayed. */ ________________________________________________________________________________ void cvxFormTitleGet ( char *Form, /* I: GUI form name */ int NumBytes, /* I: number of bytes of memory referenced by "Title" */ char *Title /* I: form title (null-terminated text string) */ ) /* DESCRIPTION: Gets the specified form's caption title (if it has one) and stores it as a null-terminated string in the memory referenced by "Title". If the string is longer than "NumBytes", it is truncated. */ ________________________________________________________________________________ void cvxFormTitleSet ( char *Form, /* I: GUI form name */ char *Title /* I: form title (null-terminated text string) */ ) /* DESCRIPTION: Assigns the specified text to the specified form's title bar. */ ________________________________________________________________________________ void cvxFormUpdate ( int idField /* I: field id */ ) /* DESCRIPTION: Updates the specified field of the active "Options" form to display the numeric input associated with the corresponding field of the form's data container (i.e. VDATA). */ ________________________________________________________________________________ int cvxFormWait ( char *Form /* I: GUI form name (null-terminated ascii string) */ ) /* DESCRIPTION: This function displays the specified GUI form and waits for the user to press the "Okay", "Apply" or "Cancel" button on the form. It returns 0 if the user pressed "Cancel", 1 if the user pressed "Okay" or 2 if the user pressed "Apply". If you want to cause another widget on the form to cause cvxFormWait() to return, attach a callback function that invokes cvxFormWaitExit() to the widget. Whatever integer value is passed to cvxFormWaitExit() will be returned by this function. If "Okay" or "Cancel" are pressed, the GUI form is automatically undisplayed. If this functions returns because the user pressed "Apply" or because cvxFormWaitExit() was called, the GUI form remains displayed until the calling application undisplays it using cvxFormKill(). Note that cvxFormKill() can be applied to a form that has already been undisplayed without any bad consequences. */ ________________________________________________________________________________ void cvxFormWaitExit ( int ReturnValue /* I: integer value to pass to cvxFormWait () */ ) /* When a GUI form is displayed with cvxFormWait(), invoking this function will cause cvxFormWait() to exit and return the integer value passed to this function. Ordinarily, this function would be invoked from a callback function associated with the form actively displayed by cvxFormWait(). */ ________________________________________________________________________________ void cvxItemAdd ( char *Form, /* I: GUI form name */ int idField, /* I: field id */ char *Text /* I; item text */ ) /* DESCRIPTION: Adds a new item to the end of the list associated with the specified "w_list" or "w_combo" field. Input "OptForm" to apply this function to an "Options" form. */ ________________________________________________________________________________ void cvxItemCbxSet ( char *Form, /* I: GUI form name */ int idField, /* I: field id */ int idItem, /* I: item id */ int isOn /* I; is on or not */ ) /* DESCRIPTION: This function is similar to cvxItemSet, the difference is, this function is only for checkbox control. If the field is list widget,add a checkbox for the item. RETURN: N/A. */ ________________________________________________________________________________ void cvxItemDel ( char *Form, /* I: GUI form name */ int idField, /* I: field id */ int idItem /* I: item id */ ) /* DESCRIPTION: Deletes the specified item from the specified "w_list" or "w_combo" field. Input "OptForm" to apply this function to an "Options" form. */ ________________________________________________________________________________ void cvxItemFind ( char *Form, /* I: GUI form name */ int idField, /* I: field id */ char *Text, /* I: item text */ int *idItem /* O: item id */ ) /* DESCRIPTION: Searches the specified "w_list" or "w_combo" field for the specified text and outputs the corresponding item id. "idItem" is set to zero if the specified text is not found. */ ________________________________________________________________________________ void cvxItemGet ( char *Form, /* I: GUI form name */ int idField, /* I: field id */ int idItem, /* I: item id */ char *Text /* I/O: item text */ ) /* DESCRIPTION: Gets the text string associated with the specified item of the specified field. It is assumed that "Text" references sufficient memory to hold the output string. See cvxItemSet() for the meaning of "idItem" for each field type. Input "OptForm" to apply this function to an "Options" form. */ ________________________________________________________________________________ int cvxItemGetCheckState ( char *Form, /* I: GUI form name */ int idField, /* I: field id */ int idItem, /* I: item id */ int *checkState /* O: 0:Unchecked, 1:PartiallyChecked, 2:Checked */ ) /* DESCRIPTION: Get item check state of list Widget or tree view. Return 0 if success else 1. */ ________________________________________________________________________________ void cvxItemModify ( const char *Form, /* I: GUI form name */ int idField, /* I: field id */ int idItem, /* I: item id */ const char *Text /* I; item text */ ) /* DESCRIPTION: Modifies the text associated with the specified item. See cvxItemSet() for the meaning of "idItem" for each field type. If the field is a w_list, this function changes the item's icon (if Text is recognized as the path to an image file) or it changes the item's text (if Text is not an image file path) without otherwise re-initializing the item as cvxItemSet() would do. A typical use for this function is to augment cvxItemAdd() or cvxItemSet() to create a list item that has both text and an icon: specify the path to the icon image file as the Text argument using one of the latter two functions, then call this function to add text to the item. For all other field types, this function is the same as cvxItemSet(). Input "OptForm" as the form name to apply this function to an "Options" form. */ ________________________________________________________________________________ void cvxItemSelect ( char *Form, /* I: GUI form name */ int idField, /* I: field id */ int idItem /* I: item id */ ) /* DESCRIPTION: Selects the specified item. Input "OptForm" to apply this function to an "Options" form. */ ________________________________________________________________________________ void cvxItemSelectText ( char *Form, /* I: GUI form name */ int idField, /* I: field id */ char *Text /* I: item text */ ) /* DESCRIPTION: Selects the specified item. Input "OptForm" to apply this function to an "Options" form. */ ________________________________________________________________________________ void cvxItemSelected ( char *Form, /* I: GUI form name */ int idField, /* I: field id */ int *idItem /* O: item id */ ) /* DESCRIPTION: Outputs the id of the item currently selected in the specified field. Items are numbered from 1. Outputs 0 if there isn't a selected item. Input "OptForm" to apply this function to an "Options" form. */ ________________________________________________________________________________ void cvxItemSet ( char *Form, /* I: GUI form name */ int idField, /* I: field id */ int idItem, /* I: item id */ char *Text /* I; item text */ ) /* DESCRIPTION: Sets the text associated with the specified item. The meaning of "idItem" for each field type is documented below: "w_num" field: item 0 = label; item 1 = numeric input area; "w_slider" field: item 0 = label item 1 = slider value item 2 = text input field "w_slider" field: item 0 = label item 1 = slider value item 2 = text input field "w_txt_in" field: item 0 = label item 1 = text input field "w_txt_out" field: item 0 = label item 1 = text output area "w_txt_btn" field: item 0 = toggle item 1 = button (0 if no toggle) item 2 = text input area (1 if no toggle) "w_txt_lbl" field: item 0 = toggle button item 1 = label (0 if no toggle) item 2 = text input area (1 if no toggle) "w_list" field: item 0 = label item N = Nth item in scrolling list "w_opt" field: item 0 = label item N = Nth option button "w_color" field: item 0 = label item 1 = color box (r:g:b) "w_combo" field: item 0 = label item N = Nth item in combo list Input "OptForm" to apply this function to an "Options" form. See also cvxItemModify(). */ ________________________________________________________________________________ void cvxItemStateGet ( char *Form, /* I: GUI form name */ int idField, /* I: field id */ int idItem, /* I: item id */ int *isOn /* O: 1 if item is ON; 0 if it is OFF */ ) /* DESCRIPTION: Gets the ON/OFF status of a GUI item. Input "OptForm" to apply this function to an "Options" form. */ ________________________________________________________________________________ void cvxItemStateSet ( char *Form, /* I: GUI form name */ int idField, /* I: field id */ int idItem, /* I: item id */ int isOn /* I: 1 if item is ON; 0 if it is OFF */ ) /* DESCRIPTION: Gets the ON/OFF status of a GUI item. Input "OptForm" to apply this function to an "Options" form. */ ________________________________________________________________________________ int cvxListCallbackParamGet ( const char* form, /* I: form name */ int idField, /* I: field id */ svxListCallBackParam* param /* O: param */ ) /* DESCRIPTION: Get callback parameters for the list widget when the callback function being invoked, the interface should be used in the callback function. NOTE: To use the function, you should add a property of type string-list with the property name "eventsEnabled" and add the property value "dbl_clk" to the list widget control in UI file. return 1 if error,else 0. */ ________________________________________________________________________________ int cvxListItemToolTipGet ( const char *form, /* I: form name */ int field, /* I: field id */ int row, /* I: item row */ char *toolTip, /* O: tooltip */ int size /* I: size of tooltip */ ) /* DESCRIPTION: Get the tooltip of specified row item for listWdiget. RETURN: Return 0 if success else 1. */ ________________________________________________________________________________ int cvxListItemToolTipSet ( const char *form, /* I: form name */ int field, /* I: field id */ int row, /* I: item row */ const char *toolTip /* I: tooltip */ ) /* DESCRIPTION: Set the tooltip for specified row item of listWdiget. RETURN: Return 0 if success else 1. */ ________________________________________________________________________________ int cvxPopupDefine ( const char* name /* I: popup menu name */ ) /* DESCRIPTION: Determine if the specified pop up menu exists. Get the popup menu name through using "$report" or viewing the configuration file(ZW3D/Settings/). return 0 if the popup menu exists, return 1 if not */ ________________________________________________________________________________ int cvxPopupItemActionGet ( const char* name, /* I: menu name */ int item, /* I: menu item */ char* Action, /* O: action name */ int nByte /* I: size of Action */ ) /* DESCRIPTION: Get item action name by specified menu name and menu item. Get the popup menu name through using "$report" or viewing the configuration file(ZW3D/Settings/). Returns 1 if error, else 0. */ ________________________________________________________________________________ int cvxPopupItemCheckedGet ( const char* name, /* I: menu name */ int group, /* I: menu group */ int item, /* I: menu item */ int* Check /* O: checked state */ ) /* DESCRIPTION: Get the action's checked state. Menu item must have the "GroupItem" attribute to call this interface. Only one of the checked properties of all actions in a group can be true. Get the popup menu name through using "$report" or viewing the configuration file(ZW3D/Settings/). Returns 1 if error, else 0. */ ________________________________________________________________________________ int cvxPopupItemInsert ( const char* name, /* I: menu name */ int index, /* I: index in the menu */ const char* Label, /* I: label name */ const char* Action /* I: action name */ ) /* DESCRIPTION: Insert specified popup item. Get the popup menu name through using "$report" or viewing the configuration file(ZW3D/Settings/). If this menu is NULL, "index" = -1. If this menu is not NULL, "index" >=0 Returns 1 if error, else 0. */ ________________________________________________________________________________ int cvxPopupItemIsExist ( const char* name, /* I: menu name */ const char* action /* I: action name */ ) /* DESCRITPION: Check if special menu item is exist. Get the popup menu name through using "$report" or viewing the configuration file(ZW3D/Settings/). Returns 1 if exist, else 0. */ ________________________________________________________________________________ int cvxPopupItemLabelGet ( const char* name, /* I: menu name */ int item, /* I: menu item */ char* Label, /* O: Label name */ int nByte /* I: size of Label */ ) /* DESCRIPTION: Get the menu item label name. Get the popup menu name through using "$report" or viewing the configuration file(ZW3D/Settings/). Returns 1 if error, else 0. */ ________________________________________________________________________________ int cvxPopupItemRemove ( const char* name, /* I: menu name */ int index /* I: index in the menu */ ) /* DESCRIPTION: Remove specified popup item. If index = -1, remove all. Get the popup menu name through using "$report" or viewing the configuration file(ZW3D/Settings/). Returns 1 if error, else 0. */ ________________________________________________________________________________ int cvxPopupItemSetAction ( const char* name, /* I: menu name */ int index, /* I: action index */ const char* Action /* I: action script */ ) /* DESCRIPTION: Set the action of menu specified item This interface cannot change the action label. The "index" can't be less than 0. Get the popup menu name through using "$report" or viewing the configuration file(ZW3D/Settings/). Returns 1 if error, else 0. */ ________________________________________________________________________________ int cvxPopupItemSetCheckedByAction ( const char* name, /* I: menu name */ const char* action, /* I: action name */ int checked /* I: action's checked state */ ) /* DESCRITPION: Set the action's checked state of quick bar, popup bar according to the specified menu name and action name. Get the popup menu name through using "$report" or viewing the configuration file(ZW3D/Settings/). RETURN: Returns 1 if error, else 0. */ ________________________________________________________________________________ int cvxPopupItemSetEnabledByAction ( const char* name, /* I: menu name */ const char* action, /* I: action name */ int enabled /* I: action state */ ) /* DESCRITPION: Set the action state of quick bar, popup bar according to the specified menu name and action name. Get the popup menu name through using "$report" or viewing the configuration file(ZW3D/Settings/). RETURN: Returns 1 if error, else 0. */ ________________________________________________________________________________ int cvxPopupItemSetVisibleByAction ( const char* name, /* I: menu name */ const char* action, /* I: action name */ int visible /* I: action visibility */ ) /* DESCRITPION: Set the action visibility of quick bar, popup bar according to the specified menu name and action name. Get the popup menu name through using "$report" or viewing the configuration file(ZW3D/Settings/). RETURN: Returns 1 if error, else 0. */ ________________________________________________________________________________ int cvxPopupItemVisibleGet ( const char* name, /* I: menu name */ int item, /* I: menu item */ int* Visible /* O: visible state */ ) /* DESCRIPTION: Get the action's visible state. Get the popup menu name through using "$report" or viewing the configuration file(ZW3D/Settings/). Returns 1 if error, else 0. */ ________________________________________________________________________________ int cvxPopupMenuCnt ( const char* Name, /* I: menu name */ int* cnt /* O: count of actions */ ) /* DESCRIPTION: Get count of menu actions. Get the popup menu name through using "$report" or viewing the configuration file(ZW3D/Settings/). Return 0 if success else 1. */ ________________________________________________________________________________ int cvxPopupSetVisible ( const char *sName, /* I: popup menu name */ int visible /* I: visible or not */ ) /* DESCRIPTION: Set the visible state for the specified pop up menu. Get the popup menu name through using "$report" or viewing the configuration file(ZW3D/Settings/). Returns 1 if error, else 0. */ ________________________________________________________________________________ int cvxPopupShow ( const char *sName /* I: popup menu name */ ) /* DESCRIPTION: Show the specified popup menu. Get the popup menu name through using "$report" or viewing the configuration file(ZW3D/Settings/). Returns: 1 is error, 2 is error, and popupBar is not find. 0 is success. */ ________________________________________________________________________________ int cvxPopupSubMenuActionsRemove ( const char* Name, /* I: menu name */ const char* Sub, /* I: sub-menu name */ int iFirst, /* I: index in the sub-menu */ int iLast /* I: index in the sub-menu */ ) /* DESCRIPTION: Remove action from specific sub-menu in menu. If iLast = -1 and iFirst = 0, remove all. If iLast = iFirst = -1, remove all. The function of this interface is similar to cvxPopupSubMenuItemRemove. Get the popup menu name through using "$report" or viewing the configuration file(ZW3D/Settings/). Return 0 if success else 1. */ ________________________________________________________________________________ int cvxPopupSubMenuCnt ( const char* Name, /* I: menu name */ const char* Sub, /* I: sub-menu name */ int* cnt /* O: count of actions */ ) /* DESCRIPTION: Get count of sub-menu actions. Get the popup menu name through using "$report" or viewing the configuration file(ZW3D/Settings/). Return 0 if success else 1. */ ________________________________________________________________________________ int cvxPopupSubMenuItemInsert ( const char* Name, /* I: menu name */ const char* Sub, /* I: sub-menu name */ int index, /* I: index in the sub-menu */ const char* ActName, /* I: action name of item */ const char* Label, /* I: label of item */ const char* Script, /* I: action of the item */ const char* Icon /* I: icon of item */ ) /* DESCRIPTION: Insert a item to specific sub-menu in menu. Get the popup menu name through using "$report" or viewing the configuration file(ZW3D/Settings/). If index = -1, it is inserted lase, otherwise it is inserted before index. Return 0 if success else 1. */ ________________________________________________________________________________ int cvxPopupSubMenuItemRemove ( const char* Name, /* I: menu name */ const char* Sub, /* I: sub-menu name */ int index /* I: index in the sub-menu */ ) /* DESCRIPTION: Remove a item from specific sub-menu in menu. The function of this interface is similar to cvxPopupSubMenuActionsRemove. If index = -1, remove all. Get the popup menu name through using "$report" or viewing the configuration file(ZW3D/Settings/). Return 0 if success else 1. */ ________________________________________________________________________________ int cvxPopupSubMenuSeparatorInsert ( const char* Name, /* I: menu name */ const char* Sub /* I: sub-menu name */ ) /* DESCRIPTION: Insert a separator to specific sub-menu in menu. This interface can only insert separator at the end of the sub-menu. If there is no "action" after the separator, the separator is not displayed. Get the popup menu name through using "$report" or viewing the configuration file(ZW3D/Settings/). Return 0 if success else 1. */ ________________________________________________________________________________ int cvxPopupSubMenuSetVisible ( const char* name, /* I: popup menu name */ const char* sub, /* I: popup sub-menu name */ int visible /* I: visible or not */ ) /* DESCRIPTION: Set the visible state for the specified pop up sub-menu. Get the popup menu name through using "$report" or viewing the configuration file(ZW3D/Settings/). Return 0 if success else 1. */ ________________________________________________________________________________ int cvxPopupUpdate ( const char* Name /* I: menu name */ ) /* DESCRIPTION: Update the specified pop up menu. Get the popup menu name through using "$report" or viewing the configuration file(ZW3D/Settings/). Returns 1 if error, else 0. */ ________________________________________________________________________________ void cvxRibbonSetStatus ( int enable /* I: 1: enable the ribbon. 0: disable the ribbon */ ) /* DESCRIPTION: Enable or disable the ribbon. */ ________________________________________________________________________________ int cvxTableAtSet ( char *Form, /* I: GUI form name */ int idTable, /* I: table field id */ svxTableAt *At /* I: table attributes */ ) /* DESCRIPTION: Applies the attributes specified in "At" to the GUI table identified by "Form" and "idTable". Returns 1 if error, else 0. */ ________________________________________________________________________________ void cvxTableCallBackParamFree ( svxTableCallBackParam *param /* I: address of pointer to be Free */ ) /* DESCRIPTION: Frees memory for struct svxTableCallBackParam pointer. Sets pointer to NULL if memory was freed successfully. */ ________________________________________________________________________________ int cvxTableCallBackParamGet ( const char *form, /* I: form name */ int idTable, /* I: filed id */ svxTableCallBackParam *param /* O: assigned with table cell callback function parameter pointer*/ ) /* DESCRIPTION: Get callback parameters for the table widget when the callback function being invoked. For specific usage, please refer to the case TableSet in ApiExample. The function will allocate memory to "param", please call cvxTableCallBackParamFree function to free memory. Return 1 if error, else 0. */ ________________________________________________________________________________ void cvxTableCellEnableSet ( const char* Form, /* I: GUI form name */ int idTable, /* I: table field id */ int Row, /* I: table row (>=0) */ int Col, /* I: table column (>=0) */ int State /* I: 0 - disable, 1 - enable, 2 - enable & editable */ ) /* DESCRIPTION: change a cell in table which was specified by VmUiItem2RC(item, iRow, iCol) to "selectable" . */ ________________________________________________________________________________ int cvxTableCellTextGet ( char *Form, /* I: GUI form name */ int idTable, /* I: table field id */ int Row, /* I: table row (>=0) */ int Col, /* I: table column (>=0) */ char*text, /* O: text to get */ int nBytes /* I: string size of text */ ) /* DESCRIPTION: Get the text of the table cell identified by "Row" and "Col". Returns 1 if error, else 0. */ ________________________________________________________________________________ int cvxTableCellTextSet ( char *Form, /* I: GUI form name */ int idTable, /* I: table field id */ int Row, /* I: table row (>=0) */ int Col, /* I: table column (>=0) */ char*text /* I: text to set */ ) /* DESCRIPTION: Set the text of the table cell identified by "Row" and "Col". Returns 1 if error, else 0. */ ________________________________________________________________________________ int cvxTableCellTextSet2 ( const char* Form, /* I: GUI form name */ int idTable, /* I: table field id */ int Row, /* I: table row (>=0) */ int Col, /* I: table column (>=0) */ char* Text, /* I: null-terminated, cell text, it will be ignored when it is NULL */ char* Image /* I: null-terminated, image, it will be ignored when it is NULL*/ ) /* DESCRIPTION: Set the text and image of the table cell identified by "Row" and "Col". Returns 1 if error, else 0. */ ________________________________________________________________________________ int cvxTableCellTipGet ( const char* Form, /* I: GUI form name */ int idTable, /* I: table field id */ int Row, /* I: table row (>=-1) */ int Col, /* I: table column (>=-1) */ char* tip, /* O: tooltip string */ int nBytes /* I: max size of tooltip string */ ) /* DESCRIPTION: Get the tooltip of the table cell identified by "Row" and "Col". note that the row and column can not both be -1. */ ________________________________________________________________________________ void cvxTableCellTipSet ( const char* Form, /* I: GUI form name */ int idTable, /* I: table field id */ int Row, /* I: table row (>=-1) */ int Col, /* I: table column (>=-1) */ const char* tip /* I: tooltip string */ ) /* DESCRIPTION: Set the tooltip of the table cell identified by "Row" and "Col". note that the row and column can not both be -1. */ ________________________________________________________________________________ int cvxTableCheckSet ( const char* Form, /* I: GUI form name */ int idTable, /* I: table field id */ int Row, /* I: table row (>=0) */ int Col, /* I: table column (>=0) */ int Check /* I: 1-check, 0-uncheck */ ) /* DESCRIPTION: Makes the table cell identified by "Row" and "Col" a check box specified by variable check. Returns 1 if error, else 0. */ ________________________________________________________________________________ int cvxTableColCnt ( const char* Form, /* I: GUI form name */ int idTable /* I: table field id */ ) /* DESCRIPTION: Return the column count the specified table. */ ________________________________________________________________________________ int cvxTableColInsert ( const char* Form, /* I: GUI form name */ int idTable, /* I: table field id */ int Col /* I: Column id (>=0) */ ) /* DESCRIPTION: Insert a column to table. Returns 1 if error, else 0. */ ________________________________________________________________________________ int cvxTableColRemove ( const char* Form, /* I: GUI form name */ int idTable, /* I: table field id */ int Col /* I: Column id (>=0) */ ) /* DESCRIPTION: Remove a column from table. Returns 1 if error, else 0. */ ________________________________________________________________________________ int cvxTableColorGet ( const char* Form, /* I: GUI form name */ int idTable, /* I: table field id */ int Row, /* I: table row (>=0) */ int Col, /* I: table column (>=0) */ svxColor* Color, /* O: true color, such as RGB(255,0,0) */ int* ClrIdx, /* O: index color (V_COLOR_NULL ~ V_COLOR_LAST) */ unsigned char* Type /* O: color type: 0-true color, 1-index color */ ) /* DESCRIPTION: Get the color of the table cell identified by "Row" and "Col". Returns 1 if error, else 0. */ ________________________________________________________________________________ int cvxTableColorSet ( const char* Form, /* I: GUI form name */ int idTable, /* I: table field id */ int Row, /* I: table row (>=0) */ int Col, /* I: table column (>=0) */ const svxColor* Color, /* I: true color, such as RGB(255,0,0) */ int ClrIdx, /* I: index color (V_COLOR_NULL ~ V_COLOR_LAST) */ unsigned char Type /* I: color type: 0-true color, 1-index color */ ) /* DESCRIPTION: Makes the table cell identified by "Row" and "Col" a color type editor. Returns 1 if error, else 0. */ ________________________________________________________________________________ int cvxTableComboGet ( const char* Form, /* I: GUI form name */ int idTable, /* I: table field id */ int Row, /* I: table row (>=0) */ int Col, /* I: table column (>=0) */ int* Index, /* O: Selected index */ char* Text, /* O: Selected text */ int nBytes /* I: string size of Text */ ) /* DESCRIPTION: Get the data for the specified table cell defined as combo box or indexed combo box or editable combo box. Returns 1 if error, else 0. */ ________________________________________________________________________________ int cvxTableComboSet ( char *Form, /* I: GUI form name */ int idTable, /* I: table field id */ int Row, /* I: table row (>=0) */ int Col, /* I: table column (>=0) */ char *Options /* I: null-terminated, comma-delimited list of text labels */ ) /* DESCRIPTION: Makes the table cell identified by "Row" and "Col" a combo box of options specified by the input list of comma-delimited text labels. Options: each option is separated by ',' ("1,2,3"). Returns 1 if error, else 0. */ ________________________________________________________________________________ int cvxTableComboSet2 ( const char* Form, /* I: GUI form name */ int idTable, /* I: table field id */ int Row, /* I: table row (>=0) */ int Col, /* I: table column (>=0) */ char *Options, /* I: null-terminated, comma-delimited list of text labels */ char *Images /* I: null-terminated, comma-delimited list of image, it will be ignored when it is NULL */ ) /* DESCRIPTION: Makes the table cell identified by "Row" and "Col" a combo box of options specified by the input list of comma-delimited text labels and images. Options: each option is separated by ',' ("1,2,3"). Images: each image is separated by ',' ("A.png,B.png,C.png"). Returns 1 if error, else 0. */ ________________________________________________________________________________ int cvxTableComboSetOption ( const char* Form, /* I: GUI form name */ int idTable, /* I: table field id */ int Row, /* I: table row (>=0) */ int Col, /* I: table column (>=0) */ int Index, /* I: Option index */ char* IdxText /* I: null-terminated, Option text */ ) /* DESCRIPTION: Set the option index for the specified table cell defined as combo box or indexed combo box or editable combo box. If variable Index is not equal to -1, variable IdxText can be empty, and when variable Index equals -1, set variable IdxText to the selected text. Returns 1 if error, else 0. */ ________________________________________________________________________________ int cvxTableDateGet ( const char* Form, /* I: GUI form name */ int idTable, /* I: table field id */ int Row, /* I: table row (>=0) */ int Col, /* I: table column (>=0) */ int* Date, /* O: Date to get (time in seconds elapsed since 00:00:00 Jan 1, 1970) */ evxDateType* DateType /* O: Date type to get */ ) /* DESCRIPTION: Get the date of the table cell identified by "Row" and "Col". Returns 1 if error, else 0. */ ________________________________________________________________________________ int cvxTableDateSet ( const char* Form, /* I: GUI form name */ int idTable, /* I: table field id */ int Row, /* I: table row (>=0) */ int Col, /* I: table column (>=0) */ int Date, /* I: Date to set (time in seconds elapsed since 00:00:00 Jan 1, 1970) */ evxDateType DateType /* I: Date type to set */ ) /* DESCRIPTION: Makes the table cell identified by "Row" and "Col" a date editor. Returns 1 if error, else 0. */ ________________________________________________________________________________ int cvxTableGetSelRange ( const char* Form, /* I: GUI form name */ int idTable, /* I: table field id */ int *RangeCnt, /* O: number of ranges */ svxRectangle **SelRange /* O: selected range left: left column right: right column top: top row bottom: bottom row */ ) /* DESCRIPTION: Get selected range of the table, The calling procedure MUST deallocate the output list with cvxMemFree. Returns 1 if error, else 0. */ ________________________________________________________________________________ int cvxTableIndexComboSet ( char *Form, /* I: GUI form name */ int idTable, /* I: table field id */ int Row, /* I: table row (>=0) */ int Col, /* I: table column (>=0) */ char *Options /* I: null-terminated, comma-delimited list of text labels */ ) /* DESCRIPTION: Makes the table cell identified by "Row" and "Col" a indexed combo box of options specified by the input list of comma-delimited text labels. Options: each option is separated by ',' ("1,2,3"). Returns 1 if error, else 0. */ ________________________________________________________________________________ int cvxTableIndexComboSet2 ( const char* Form, /* I: GUI form name */ int idTable, /* I: table field id */ int Row, /* I: table row (>=0) */ int Col, /* I: table column (>=0) */ char *Options, /* I: null-terminated, comma-delimited list of text labels */ char *Images /* I: null-terminated, comma-delimited list of image, it will be ignored when it is NULL */ ) /* DESCRIPTION: Makes the table cell identified by "Row" and "Col" a indexed combo box of options specified by the input list of comma-delimited text labels and images. Options: each option is separated by ',' ("1,2,3"). Images: each image is separated by ',' ("A.png,B.png,C.png"). Returns 1 if error, else 0. */ ________________________________________________________________________________ int cvxTableInputComboSet ( char *Form, /* I: GUI form name */ int idTable, /* I: table field id */ int Row, /* I: table row (>=0) */ int Col, /* I: table column (>=0) */ char *Options /* I: null-terminated, comma-delimited list of text labels */ ) /* DESCRIPTION: Makes the table cell identified by "Row" and "Col" a editable combo box of options specified by the input list of comma-delimited text labels. Options: each option is separated by ',' ("1,2,3"). Returns 1 if error, else 0. */ ________________________________________________________________________________ int cvxTableInputComboSet2 ( const char* Form, /* I: GUI form name */ int idTable, /* I: table field id */ int Row, /* I: table row (>=0) */ int Col, /* I: table column (>=0) */ char *Options, /* I: null-terminated, comma-delimited list of text labels */ char *Images /* I: null-terminated, comma-delimited list of image it will be ignored when it is NULL*/ ) /* DESCRIPTION: Makes the table cell identified by "Row" and "Col" a editable combo box of options specified by the input list of comma-delimited text labels and images. Options: each option is separated by ',' ("1,2,3"). Images: each image is separated by ',' ("A.png,B.png,C.png"). Returns 1 if error, else 0. */ ________________________________________________________________________________ int cvxTableIsCheck ( const char* Form, /* I: GUI form name */ int idTable, /* I: table field id */ int Row, /* I: table row (>=0) */ int Col /* I: table column (>=0) */ ) /* DESCRIPTION: Get check state of the table cell identified by "Row" and "Col" defined as check box. Returns 1 if checked, else 0. */ ________________________________________________________________________________ int cvxTableNumGet ( const char* Form, /* I: GUI form name */ int idTable, /* I: table field id */ int Row, /* I: table row (>=0) */ int Col, /* I: table column (>=0) */ char* Num, /* O: Number to get */ int Bytes /* I: String size of Num */ ) /* DESCRIPTION: Get number of the table cell identified by "Row" and "Col". Returns 1 if error, else 0. */ ________________________________________________________________________________ int cvxTableNumSet ( const char* Form, /* I: GUI form name */ int idTable, /* I: table field id */ int Row, /* I: table row (>=0) */ int Col, /* I: table column (>=0) */ const char* Num /* I: null-terminated, number value*/ ) /* DESCRIPTION: Makes the table cell identified by "Row" and "Col" a number editor. Returns 1 if error, else 0. */ ________________________________________________________________________________ int cvxTableRowCnt ( const char* Form, /* I: GUI form name */ int idTable /* I: table field id */ ) /* DESCRIPTION: Return the row count the specified table. */ ________________________________________________________________________________ int cvxTableRowInsert ( const char* Form, /* I: GUI form name */ int idTable, /* I: table field id */ int Row /* I: Row id (>=0) */ ) /* DESCRIPTION: Insert a row to table. Returns 1 if error, else 0. */ ________________________________________________________________________________ int cvxTableRowRemove ( const char* Form, /* I: GUI form name */ int idTable, /* I: table field id */ int Row /* I: Row id (>=0) */ ) /* DESCRIPTION: Remove a row from table. Returns 1 if error, else 0. */ ________________________________________________________________________________ int cvxTableSetSelRange ( const char* Form, /* I: GUI form name */ int idTable, /* I: table field id */ svxRectangle *SelRange, /* I: select range left: left column right: right column top: top row bottom: bottom row */ int bSelect /* I: select the range or not,1 for select */ ) /* DESCRIPTION: Set selected range of the table. Returns 1 if error, else 0. */ ________________________________________________________________________________ int cvxTableSizeSet ( char *Form, /* I: GUI form name */ int idTable, /* I: table field id */ int NumRow, /* I: number of rows (0 to ignore) */ int NumCol /* I: number of columns (0 to ignore) */ ) /* DESCRIPTION: Sets the number of rows and columns in the specified table. Returns 1 if error, else 0. */ ________________________________________________________________________________ int cvxTableTypeGet ( const char* Form, /* I: GUI form name */ int idTable, /* I: table field id */ int Row, /* I: table row (>=0) */ int Col, /* I: table column (>=0) */ evxTableCellType* Type /* O: Table cell type */ ) /* DESCRIPTION: Get the type of the table cell identified by "Row" and "Col". Returns 1 if error, else 0. */ ________________________________________________________________________________ int cvxTableUnselectAll ( const char* Form, /* I: GUI form name */ int idTable /* I: table field id */ ) /* DESCRIPTION: Unselect all items */ ________________________________________________________________________________ void cvxTableVisSet ( char *Form, /* I: GUI form name */ int idTable, /* I: table field id */ int Row, /* I: table row (>=0) */ int Col /* I: table column (>=0) */ ) /* DESCRIPTION: Makes sure the table cell identified by "Row" and "Col" is visible within a table that may scroll vertically or horizontally beyond the limits of the display area on its parent form. */ ________________________________________________________________________________ int cvxTreeAddItem ( const char *form, /* I: form name */ int field, /* I: field number */ int parentId, /* I: Parent node id, if without parent, assign 0 */ int siblingId, /* I: Prev sibling node id, if without previous node, assign VX_INSERT_LAST */ const char *label, /* I: Node label text */ int imgIdx, /* I: Index of the item's expanded image in the imagelist */ int folderIdx, /* I: Index of the item's collapsed image in the imagelist */ evxTreeItemType nodeType, /* I: Node type */ int dbIdx, /* I: Object index in database */ int itemflag, /* I: evxTreeItemFlag */ int *outNodeId, /* O: new added node's id */ const char *iconName /* I: icon name*/ ) /* DESCRIPTION: Add a node with specified informations to the tree widget. Returns 1 if error, else 0. */ ________________________________________________________________________________ int cvxTreeAutoResizeColumn ( const char *form, /* I: form name */ int field, /* I: field number */ int col /* I: column (-1 to resize all columns) */ ) /* DESCRIPTION: Resize the width of the special column to show their contents completely. Return 1 if error, else 0. */ ________________________________________________________________________________ void cvxTreeCollapseAll ( const char *form, /* I: form name */ int field /* I: field number */ ) /* DESCRIPTION: Collapse all the nodes of the tree. */ ________________________________________________________________________________ int cvxTreeDeleteItem ( const char *form, /* I: form name */ int field, /* I: field id */ int id /* I: node to be deleted (-1 to delete all nodes) */ ) /* DESCRIPTION: Delete specified tree node and its descendants. if id is VX_INVALID_ITEM, then delete all. Returns 1 if error, else 0. */ ________________________________________________________________________________ int cvxTreeDeleteSubItem ( const char *form, /* I: form name */ int field, /* I: field id */ int id /* I: node to be deleted */ ) /* DESCRIPTION: Delete specified node's descendants. if id is INVALID_TNODE_ID, return directly. Return 1 if error, else 0. */ ________________________________________________________________________________ int cvxTreeEditItemByComboBox ( const char* form, /* I: form name */ int field, /* I: field id*/ int id, /* I: tree item id*/ int col, /* I: column */ const char *Options, /* I: null-terminated, comma-delimited list of text labels (NULL to ignore) */ const char *Images, /* I: null-terminated, comma-delimited list of image (NULL to ignore) */ int curIndex /* I: the current index of combobox */ ) /* DESCRIPTION: Makes the cell identified by "id" and "col" a indexed combo box of options specified by the input list of comma-delimited text labels and images. Options: each option is separated by ',' ("1,2,3"). Images: each image is separated by ',' ("A.png,B.png,C.png"). Return 1 if error, else 0. */ ________________________________________________________________________________ int cvxTreeEditItemByLineEdit ( const char *form, /* I: form name */ int field, /* I: field number */ int id, /* I: tree node id */ int col, /* I: column */ const char *defaultLabel /* I: default text when editing */ ) /* DESCRIPTION: Activate the specified node to edit by a line edit. Returns 1 if error, else 0. */ ________________________________________________________________________________ void cvxTreeExpandAll ( const char *form, /* I: form name */ int field /* I: field number */ ) /* DESCRIPTION: Expand all the nodes of the tree. */ ________________________________________________________________________________ int cvxTreeExpandItem ( const char *form, /* I: form name */ int field, /* I: field number */ int id, /* I: tree node id */ int option /* I: status (1 to expand, 2 to collapse, 3 to toggle) */ ) /* DESCRIPTION: Set expand status of specified tree node. Return 1 if error, else 0. */ ________________________________________________________________________________ int cvxTreeGetCbParam ( const char *form, /* I: form name */ int field, /* I: filed id */ int itemId, /* I: item id */ svxTreeCbParam *cbp /* O: assigned with tree callback function parameter pointer */ ) /* DESCRIPTION: Get callback parameters for the tree widget when the callback function being invoked. Returns 1 if error, else 0. */ ________________________________________________________________________________ int cvxTreeGetChildItem ( const char *form, /* I: form name */ int field, /* I: field id */ int id, /* I: parent node id */ int index, /* I: index of node, 0 based */ int *child_id /* O: first child node id */ ) /* DESCRIPTION: Get the nth(index) child item of the specified node from the tree widget. If the node has no child node or index is not valid, child_id will be VX_INVALID_ITEM. Returns 1 if error, else 0. */ ________________________________________________________________________________ int cvxTreeGetChildrenCount ( const char *form, /* I: form name */ int field, /* I: field id */ int id, /* I: parent node id */ int *count /* O: count of the child nodes */ ) /* DESCRIPTION: Get the count of the child nodes for the specified node from the tree widget. Returns 1 if error, else 0. */ ________________________________________________________________________________ int cvxTreeGetColumnCount ( const char* form, /* I: form name */ int field /* I: field id */ ) /* DESCRIPTION: This function get the number of columns displayed in the specified tree widget. Return the number of columns. */ ________________________________________________________________________________ int cvxTreeGetColumnWidth ( const char* form, /* I: form name */ int field, /* I: field number */ int col /* I: column to get */ ) /* DESCRIPTION: Get the width of the given column. Return the width of the given column. */ ________________________________________________________________________________ int cvxTreeGetDBIdByItem ( const char *form, /* I: form name */ int field, /* I: field id */ int id, /* I: tree node id */ int *objectIndex /* O: object index in database matched to node */ ) /* DESCRIPTION: Get object index in database which the specified node is associated to. Returns 1 if error, else 0. */ ________________________________________________________________________________ int cvxTreeGetDescendants ( const char *form, /* I: form name */ int field, /* I: form field id */ int isAll, /* I: 1-all descendants, 0-only children */ int parent, /* I: parent id */ int *num, /* O: number of nodes */ int **ids /* O: node IDs */ ) /* DESCRIPTION: Get all descendants or only children of the specified parent node. The calling procedure MUST deallocate the output list. Returns 1 if error, else 0. */ ________________________________________________________________________________ evxTreeCheckState cvxTreeGetItemCheckState ( const char *form, /* I: form name */ int field, /* I: field number */ int id /* I: tree node id */ ) /* DESCRIPTION: Get check state of the tree node identified by id defined as check box. Returns 1 if checked, else 0. */ ________________________________________________________________________________ int cvxTreeGetItemFlag ( const char *form, /* I: form name */ int field, /* I: field number */ int id, /* I: tree node id */ int *flag /* O: tree node flag (evxTreeItemFlag) */ ) /* DESCRIPTION: Get flag of the specified node. Return 1 if error, else 0. */ ________________________________________________________________________________ void cvxTreeGetItemTextByColumn ( const char* form, /* I: form name */ int field, /* I: field id*/ int id, /* I: tree item id*/ int col, /* I: column */ char* text, /* O: column text */ int size /* I: column text size */ ) /* DESCRIPTION: Get the cell item text of the specified column of the tree node. Returns 1 if error, else 0. */ ________________________________________________________________________________ int cvxTreeGetNextSiblingItem ( const char *form, /* I: form name */ int field, /* I: field number */ int id, /* I: tree node id */ int *nextId /* O: next sibling node id */ ) /* DESCRIPTION: Get next sibling node. Returns 1 if error, else 0. */ ________________________________________________________________________________ int cvxTreeGetParentItem ( const char *form, /* I: form name */ int field, /* I: field id */ int id, /* I: tree node id */ int *parent_id /* O: parent node id */ ) /* DESCRIPTION: Get the parent node id for the specified tree node. Returns 1 if error, else 0. */ ________________________________________________________________________________ int cvxTreeGetPrevSiblingItem ( const char *form, /* I: form name */ int field, /* I: field number */ int id, /* I: tree node id */ int *prevId /* O: previous sibling node id */ ) /* DESCRIPTION: Get previous sibling node. Returns 1 if error, else 0. */ ________________________________________________________________________________ int cvxTreeGetSelectedItems ( const char *form, /* I: form name */ int field, /* I: field number */ int *numNodes, /* O: number of nodes */ int **idListPtr /* O: IDs of selected nodes */ ) /* DESCRIPTION: Get all of the current selected nodes of the tree widget. The calling procedure MUST deallocate the output list. Returns 1 if error, else 0. */ ________________________________________________________________________________ int cvxTreeHeaderGetSize ( const char *name, /* I: form name */ int field, /* I: the item id */ int *width, /* O: width of the item */ int *height /* O: height of the item */ ) /* DESCRIPTION: This function gets the header size of the specified tree widget. Returns 1 if error, else 0. */ ________________________________________________________________________________ int cvxTreeIsColumnHidden ( const char* form, /* I: form name */ int field, /* I: field number */ int col /* I: column to query */ ) /* DESCRIPTION: Get visible state of the specified column. Return 1 if the column is hidden, else return 0. */ ________________________________________________________________________________ int cvxTreeIsItemSelected ( const char *form, /* I: form name */ int field, /* I: filed id */ int id /* I: node to be checked */ ) /* DESCRIPTION: Judge whether the tree node is selected. Returns 1 if the node is selected, else 0. */ ________________________________________________________________________________ int cvxTreeItemIsExpand ( const char *form, /* I: form name */ int field, /* I: field number */ int id /* I: tree node id */ ) /* DESCRIPTION: Check whether the specified node is expanded. Return 1 if the node is expanded, else 0. */ ________________________________________________________________________________ int cvxTreeItemsCount ( const char* form, /* I: form name */ int field /* I: field id */ ) /* DESCRIPTION: This function gets and return the total nodes of tree in the specified tree widget, including children nodes. */ ________________________________________________________________________________ int cvxTreeMoveItems ( const char *form, /* I: form name */ int field, /* I: field number */ int numNodes, /* I: number of nodes moved */ int *ids, /* I: list of nodes moved */ int insParentId, /* I: destination node's parent. If none, pass with 0 */ int siblingId /* I: destination node's prev sibling, if insert as first child, pass with VX_INSERT_FIRST, if insert as last child, pass with VX_INSERT_LAST */ ) /* DESCRIPTION: Move tree nodes to the specified position with all its descendants. Returns 1 if error, else 0. */ ________________________________________________________________________________ int cvxTreeSelectItem ( const char *form, /* I: form name */ int field, /* I: field id */ int id /* I: tree node id */ ) /* DESCRIPTION: This function is to select the specified node of the tree widget. Returns 1 if error, else 0. */ ________________________________________________________________________________ void cvxTreeSetColumnCount ( const char* form, /* I: form name */ int field, /* I: field id */ int count /* O: count */ ) /* DESCRIPTION: This function sets the number of columns displayed in the specified tree widget. */ ________________________________________________________________________________ void cvxTreeSetColumnHidden ( const char* form, /* I: form name */ int field, /* I: field number */ int col, /* I: column to set */ int hide /* I: whether to hide the column (1 to hide, 0 to show) */ ) /* DESCRIPTION: Hide or show the specified column. */ ________________________________________________________________________________ void cvxTreeSetColumnWidth ( const char* form, /* I: form name */ int field, /* I: field number */ int col, /* I: column to set */ int width /* I: width */ ) /* DESCRIPTION: Set the width of the given column to the width specified. */ ________________________________________________________________________________ void cvxTreeSetHeaderIcon ( const char* name, /* I: form name */ int field, /* I: field number */ int section, /* I: section of tree header*/ const char* icon /* I: tree header icon name */ ) /* DESCRIPTION: Set the icon of tree header according to specified section. This interface is used for the widget TreeView. */ ________________________________________________________________________________ void cvxTreeSetHeaderText ( const char* form, /* I: form name */ int field, /* I: field id*/ int col, /* I: column */ const char* text /* I: text */ ) /* DESCRIPTION: This function sets the label for the header of the specified column of the tree widget. */ ________________________________________________________________________________ int cvxTreeSetHeaderTextAlignment ( const char *form, /* I: form name */ int field, /* I: field number */ int col, /* I: column to set */ evxAlignFlag align /* I: alignment flag */ ) /* DESCRIPTION: This function sets the tree view header text alignment by column index. Returns 1 if error, else 0. */ ________________________________________________________________________________ void cvxTreeSetItemCheckState ( const char *form, /* I: form name */ int field, /* I: field number */ int id, /* I: tree node id */ evxTreeCheckState checkState,/* I: check state*/ int extToChild /* I: flag to set children nodes check state*/ ) /* DESCRIPTION: Set check state of the tree node identified by id defined as check box. */ ________________________________________________________________________________ int cvxTreeSetItemCheckable ( const char *form, /* I: form name */ int field, /* I: field number */ int id, /* I: tree node id */ int checkable /* I: checkable */ ) /* DESCRIPTION: Set the checkable state of the specified tree node. Returns 1 if error, else 0. */ ________________________________________________________________________________ int cvxTreeSetItemFlag ( const char *form, /* I: form name */ int field, /* I: field number */ int count, /* I: number of nodes to set */ int *ids, /* I: tree node ids */ int flag /* I: tree node flag (evxTreeItemFlag) */ ) /* DESCRIPTION: Set the specified nodes' flags. Return 1 if error, else 0. */ ________________________________________________________________________________ int cvxTreeSetItemIconNameByColumn ( const char *form, /* I: form name */ int field, /* I: field number */ int id, /* I: tree node id */ int col, /* I: column to set */ const char* iconName /* I: icon name without extension name */ ) /* DESCRIPTION: Set the cell item (the specified column of the specified tree node) icon by name. Returns 1 if error, else 0. */ ________________________________________________________________________________ int cvxTreeSetItemTextByColumn ( const char* form, /* I: form name */ int field, /* I: field id */ int id, /* I: tree item id */ int col, /* I: column */ const char* text /* I: column text */ ) /* DESCRIPTION: Set the cell item text for the specified column of the specified tree node. Returns 1 if error, else 0. */ ________________________________________________________________________________ int cvxTreeSetItemTextColor ( const char* form, /* I: form name */ int field, /* I: field id*/ int id, /* I: tree item id*/ int col, /* I: column id (-1 to set whole row) */ svxColor* color /* I: color */ ) /* DESCRIPTION: Set text's RGB color of specified cell. Return 1 if error, else 0. */ ________________________________________________________________________________ int cvxTreeSetSelectionBehavior ( const char *form, /* I: form name */ int field, /* I: field number */ int behavior /* I: tree view control selection behavior */ ) /* DESCRIPTION: This function sets the tree view control selection behavior. behavior 0 for select items, 1 for select rows, and 2 for select columns. Returns 1 if error, else 0. */ ________________________________________________________________________________ int cvxTreeSetSelectionMode ( const char *form, /* I: form name */ int field, /* I: field number */ int mode /* I: tree view control selection mode 0: No selection; 1: Single selection; 2: Multiple selection; 3: Extended selection; 4: Contiguous selection */ ) /* DESCRIPTION: This function sets the selection mode of a tree widget. Returns 1 if error, else 0. */ ________________________________________________________________________________ int cvxTreeUnselectAll ( const char *form, /* I: form name */ int field /* I: field id */ ) /* DESCRIPTION: This function is to unselect all highlighted nodes of the tree widget. Returns 1 if error, else 0. */ ________________________________________________________________________________