Wnd
Popup a message box.
BwApiWndMessageBox
Popup a message box.
Python
BwApi.WndMessageBox(message, msgBoxType)
C++
BwApiWndMessageBox(message, msgBoxType, cmdId);
C#
BwApi.WndMessageBox(message, msgBoxType);
Parameters
Param | Variable | Description |
In | message | Message in the popup message box. |
In | msgBoxType | Type of the message box. |
Out | cmdId | The command ID chosen by the user. |
---
BwApiWndFileDialog
Popup a file/folder dialog.
Python
BwApi.WndFileDialog(openFile, selectFolder, defaultExtension, defaultFileName, initFolder, filterList)
C++
BwApiWndFileDialog(openFile, selectFolder, defaultExtension, defaultFileName, initFolder, filterList, path);
C#
BwApi.WndFileDialog(openFile, selectFolder, defaultExtension, defaultFileName, initFolder, filterList);
Parameters
Param | Variable | Description |
In | openFile | Boolean 1 = open file, 0 = save file. |
In | selectFolder | Boolean 1 = select a folder, 0 = select a file. |
In | defaultExtension | Default file extension. |
In | defaultFileName | Default file name. |
In | initFolder | The default folder to open. |
In | filterList | A string to represent the extensions filter list. The string should be in pairs of description and extension - "description1,ext1;ext3|description2,ext2..." i.e. "Vstitcher Garment,vsgx|Packed Garment,vsp|JPEG,jpeg;jpg". |
Out | path | Path to the selected file/folder. |
Note: If the path is empty it means the user clicked cancel or X.
---
BwApiWndDialogShow
Popup a dialog.
Python
BwApi.WndDialogShow(mode, outputPath, callbackObj, callBackID)
C++
BwApiWndDialogShow(mode, outputPath, callbackObj, callBackID);
C#
BwApi.WndDialogShow(mode, outputPath, callbackObj, callBackID);
Parameters
Param | Variable | Description |
In | mode | The dialog to preset (see BwApiDialogMode for supported dialogs). |
In | outputPath | If the dialog should output content of any type this parameter will represent the output folder for that content. |
In | callbackObj | Class derived from BwApiCallbackBase. The callback will be used to get the dialog's output data including the user's selection. |
In | callBackID | Integer value to be sent to the callback (callbackId parameter). |
---
BwApiWndHTMLCreateUrl
Open a UI window from a given URL.
Python
BwApi.WndHTMLCreateUrl(url, title, styleJson, wndRect)
C++
BwApiWndHTMLCreateUrl(url, title, styleJson, wndRect, wndHandlerId);
C#
BwApi.WndHTMLCreateUrl(url, title, styleJson, wndRect);
Parameters
Param | Variable | Description |
In | url | URL path to HTML. |
In | title | Title of the window. |
In | styleJson | Window style JSON object as string containing all window style information (see style_window.json schema). |
In | wndRect | Define the location and size of the window |
Out | wndHandlerId | Window ID handler. |
Note: If not in user action mode, Will return BW_API_ERROR_USER_ACTION_ONLY error. i.e. The user clicked on a menu item.
---
BwApiWndHTMLCreateHtml
Open a UI window with HTML content.
Python
BwApi.WndHTMLCreateHtml(html, title, styleJson, wndRect)
C++
BwApiWndHTMLCreateHtml(html, title, styleJson, wndRect, wndHandlerId);
C#
BwApi.WndHTMLCreateHtml(html, title, styleJson, wndRect);
Parameters
Param | Variable | Description |
In | html | HTML string. |
In | title | Title of the window. |
In | styleJson | Window style JSON object as string containing all window style information (see style_window.json schema). |
In | wndRect | Define the location and size of the window |
Out | wndHandlerId | Window ID handler. |
Note: If not in user action mode, Will return BW_API_ERROR_USER_ACTION_ONLY error. i.e. The user clicked on a menu item.
---
BwApiWndHTMLMessageSend
Python
BwApi.WndHTMLMessageSend()
C++
BwApiWndHTMLMessageSend();
C#
BwApi.WndHTMLMessageSend();
---
BwApiWndHTMLMessageSend
Send a message to the window handle.
Python
BwApi.WndHTMLMessageSend(wndHandleId, msg)
C++
BwApiWndHTMLMessageSend(wndHandleId, msg);
C#
BwApi.WndHTMLMessageSend(wndHandleId, msg);
Parameters
Param | Variable | Description |
In | wndHandleId | The handle ID in the system. |
In | msg | The message to send. |
---
BwApiWndHTMLClose
Close an existing window.
Python
BwApi.WndHTMLClose(wndHandleId)
C++
BwApiWndHTMLClose(wndHandleId);
C#
BwApi.WndHTMLClose(wndHandleId);
Parameters
Param | Variable | Description |
In | wndHandleId | The handle ID in the system. |
---
BwApiWndHTMLMinimize
Minimize an existing window.
Python
BwApi.WndHTMLMinimize(wndHandleId)
C++
BwApiWndHTMLMinimize(wndHandleId);
C#
BwApi.WndHTMLMinimize(wndHandleId);
Parameters
Param | Variable | Description |
In | wndHandleId | The handle ID in the system. |
---
BwApiWndHTMLSetFocus
Focus on an existing window.
Python
BwApi.WndHTMLSetFocus(wndHandleId)
C++
BwApiWndHTMLSetFocus(wndHandleId);
C#
BwApi.WndHTMLSetFocus(wndHandleId);
Parameters
Param | Variable | Description |
In | wndHandleId | The handle ID in the system. |
---
BwApiWndHTMLWindowPositionGet
Get a window position.
Python
BwApi.WndHTMLWindowPositionGet(wndHandleId)
C++
BwApiWndHTMLWindowPositionGet(wndHandleId, wndRect);
C#
BwApi.WndHTMLWindowPositionGet(wndHandleId);
Parameters
Param | Variable | Description |
In | wndHandleId | The handle ID in the system. |
Out | wndRect | The rect of the window. |
---
BwApiWndHTMLEventRegister
Register a plugin for specific HTML event type.
Python
BwApi.WndHTMLEventRegister(wndHandleId, eventType, callbackObj, callBackID)
C++
BwApiWndHTMLEventRegister(wndHandleId, eventType, callbackObj, callBackID);
C#
BwApi.WndHTMLEventRegister(wndHandleId, eventType, callbackObj, callBackID);
Parameters
Param | Variable | Description |
In | wndHandleId | The handle ID in the system. |
In | eventType | The event type to register to (see BwApiHTMLEventType enum). |
In | callbackObj | Class derived from BwApi.CallbackBase. |
In | callBackID | long value to be sent to the callback. |
Note: If register to BW_API_EVENT_HTML_CLOSE the calling fucntion can prevent the window from closing if the return value is 1, otherwise return 0 value to close the window.
---