Pro.UI — User-interface API for views, dialogs and workspaces

Overview

The Pro.UI module contains the user-interface API to create views, dialogs and workspaces.

Common Dialogs

Common dialogs are a simple way to interact with the user for basic operations.

This is simple message box:

from Pro.UI import *

proContext().msgBox(MBIconInfo, "Hello, world!")

Note

Before Cerbero Suite 5.0 and Cerbero Engine 2.0 the icons for the ProContext.msgBox() method were defined in the Pro.Core module.

The following code asks the user which file to open:

from Pro.UI import *

fname = proContext().getOpenFileName("Select a file...")
if fname:
    print(fname)

Retrieving the location where to save a file is almost identical:

from Pro.UI import *

fname = proContext().getSaveFileName("Save as...")
if fname:
    print(fname)

The following code asks the user to select a folder:

from Pro.UI import *

fname = proContext().getExistingDirectory("Select a folder...")
if fname:
    print(fname)

Asking for a text value:

from Pro.UI import *

text = ProInput.askText("Insert a text value...")
if text:
    print(text)

Hint

Many methods of the ProInput class support history keys. When a key is specified, a history of the last inserted values is automatically created.

Asking for a numeric value:

from Pro.UI import *

i = ProInput.askValue("Insert a number between 1 and 100", "", 1, 100)
if i != None:
    print(i)

Asking for an item in a list of values:

from Pro.Core import NTStringList
from Pro.UI import *

items = NTStringList()
for item in ("a", "b", "c"):
    items.append(item)

i = ProInput.askList(items, "Choose an item...")
if i != -1:
    print(items.at(i))

Sometimes it’s necessary to retrieve aggregate information from the user such as a list of parameters or settings. For these cases ProContext.askParams() can be used as explained in the next paragraph.

See also ProContext and ProInput.

Parameters & Settings

When aggregate information such as parameters or settings have to be retrieved from the user, ProContext.askParams() can be used. This method creates a property editor dialog which supports various type of fields.

An example:

from Pro.Core import *
from Pro.UI import *

# the schema of the property editor
xml = """
<peditor title="Settings">
  <section label="General">
    <property id="0" label="Name" type="edit" value="object" />
    <property id="1" label="Size" type="static" value="(0,0)">
        <property id="2" label="Width" type="integer" value="0" signed="false" radix="10" align="0" maxbits="16" />
        <property id="3" label="Height" type="integer" value="0" signed="false" radix="10" align="0" maxbits="16" />
    </property>
  </section>

  <section label="Options">
    <property id="4" label="Word wrap" type="check" value="false" />
    <property id="5" label="Syntax" type="combo" value="1">
      <list>
        <i>JavaScript</i>
        <i>C++</i>
        <i>Pascal</i>
      </list>
    </property>
  </section>

  <section label="Files">
    <property id="6" label="Open file" type="open-file" value="C:\\test.txt" />
    <property id="7" label="Save file" type="save-file" value="C:\\test2.txt" />
    <property id="8" label="Select directory" type="open-directory" value="C:\\temp" />
  </section>

  <section label="Content">
    <property id="9" label="Text" type="text">
        <value>This \tis a\nsample text</value>
    </property>
  </section>

  <section id="20" label="Numbers">
    <property id="10" label="Base address" type="integer" value="401000" signed="false" radix="16" align="8" />
    <property id="11" label="Char" type="integer" value="127" signed="true" radix="10" align="0" maxbits="8" />
  </section>

</peditor>"""

def updateSize(pe):
    sz = "(" + str(pe.getValue(2)) + "," + str(pe.getValue(3)) + ")"
    pe.setValue(1, sz)

# the callback for the property editor
def paramsCallback(pe, id, userdata):
    print("changed: " + str(id) + " value: " + str(pe.getValue(id)))
    if id == ProPropertyEditor.Notification_Init:
        updateSize(pe)
    elif id == 2 or id == 3:
        updateSize(pe)
        pe.setValue(0, "test2")
        pe.setValue(5, 2)
        pe.setValue(10, 0x2000)
    elif id == 4:
        b = not pe.isVisible(20)
        pe.setVisible(20, b)
        # set or clear some errors to demonstrate how it works
        if not b:
            errors = NTIntList()
            for e in (6, 7):
                errors.append(e)
            pe.setErrors(errors)
        else:
            pe.clearErrors()
    return True

# show a property editor dialog
params = proContext().askParams(xml, "Test", paramsCallback, None)
# print out the returned values
it = params.iterator()
while it.hasNext():
    it.next()
    print("key:", str(it.key()), "value:", str(it.value()))

If a key is passed to ProContext.askParams(), the state of the property dialog is automatically saved and restored, with the exception of multi-line text fields.

See also ProContext.askParams() and ProPropertyEditor.

Simple Views

When presenting basic data like text or hex data to the user, it is not always necessary to use callbacks.

In the following example some hex data is shown to the user in a hex view:

from Pro.Core import *
from Pro.UI import *

c = NTContainer()
c.setData(b"Hello, world!")

ctx = proContext()
hv = ctx.createView(ProView.Type_Hex, "Title")
hv.setData(c)
ctx.addView(hv)

The same is true when the data is returned from Pro.Core.ScanProvider._scanViewData() or Pro.Core.ScanProvider._formatViewData(). For instance, to show a structure to the user it’s sufficient to set it in Pro.Core.ScanViewData.data and call Pro.Core.ScanViewData.setViews() with Pro.Core.SCANVIEW_TABLE:

def _scanViewData(self, xml, dnode, sdata):
   if sdata.type == CT_MetaData:
       s = self.obj.SomeStructure()
       sdata.data.setData(s)
       sdata.setViews(SCANVIEW_TABLE)
       return True
   return False

The same procedure is applicable to text and hex data.

Whenever the view that has to be presented to the user is not trivial, a custom view is the solution!

Custom Views

Custom views are views created from an XML schema and can contain any kind of sub-view. Sub-views can be placed in layouts, splitters, tab controls or groups.

The way custom views are notified from their various sub-views is by a callback mechanism. Every sub-view has an associated id and a set of defined notifications for its type.

The following is a simple example which creates a horizontal splitter which contains a table and a text view. The text view changes its contents based on the currently selected table item.

from Pro.Core import NTStringList
from Pro.UI import *

def customViewCallback(cv, ud, code, view, data):
    if code == pvnInit:
        t = cv.getView(1)
        labels = NTStringList()
        labels.append("Label")
        t.setColumnCount(1)
        t.setRowCount(10)
        t.setColumnLabels(labels)
        t.setColumnCWidth(0, 30)
        return 1
    elif code == pvnGetTableRow:
        vid = view.id()
        if vid == 1:
            data.setText(0, str(data.row))
    elif code == pvnRowSelected:
        vid = view.id()
        if vid == 1:
            e = cv.getView(2)
            e.setText(str(data.row))
    return 0

def customViewDemo():
    ctx = proContext()
    v = ctx.createView(ProView.Type_Custom, "Custom view demo")
    user_data = None
    v.setup("<ui><hs><table id='1'/><text id='2'/></hs></ui>", customViewCallback, user_data)
    ctx.addView(v)

customViewDemo()

The same example can be expressed in a more class-oriented way by using the user data parameter of the static callback to obtain the instance of the object.

from Pro.Core import NTStringList
from Pro.UI import *

class CustomView:

    @staticmethod
    def callback(cv, self, code, view, data):
        if code == pvnInit:
            t = cv.getView(1)
            labels = NTStringList()
            labels.append("Label")
            t.setColumnCount(1)
            t.setRowCount(10)
            t.setColumnLabels(labels)
            t.setColumnCWidth(0, 30)
            return 1
        elif code == pvnGetTableRow:
            vid = view.id()
            if vid == 1:
                data.setText(0, str(data.row))
        elif code == pvnRowSelected:
            vid = view.id()
            if vid == 1:
                e = cv.getView(2)
                e.setText(str(data.row))
        return 0

    def show(self):
        ctx = proContext()
        v = ctx.createView(ProView.Type_Custom, "Custom view demo")
        v.setup("<ui><hs><table id='1'/><text id='2'/></hs></ui>", self.callback, self)
        ctx.addView(v)

cv = CustomView()
cv.show()

The first argument of the callback function represents the custom view instance (ProCustomView). The second argument is the user data specified when calling ProCustomView.setup(). The third argument is the notification code (e.g., pvnInit). The fourth argument is the view from which the notification originated. This argument is None if the notification wasn’t sent by a sub-view. Finally, the fifth argument contains I/O data associated with a particular notification code (e.g., pvnCheckChangedData is the data structure associated to the pvnCheckChanged notification code). This argument is None if no data is associated to the notification code.

These are the available types of containers for sub-views:

  • hlayout/hl - Horizontal layout.

  • vlayout/vl - Vertical layout.

  • glayout/gl - Grid layout. (Available since Cerbero Suite 5.1 and Cerbero Engine 2.1.)

  • hsplitter/hs - Horizontal splitter.

  • vsplitter/vs - Horizontal splitter.

  • tab - Tab container (See ProTabBar).

  • group - Group container (See ProGroupBox).

Layout containers support the following attributes:

  • align - The alignment of the layout. This must be a dash (-) separated list of the following possible values: hcenter, vcenter, center, top, left, bottom and right.

  • margin - The margin in pixels of the layout.

  • spacing - The spacing in pixels between the sub-views in the layout.

Additionally, the children of grid layouts support the following attributes:

  • row - The row where the child is placed inside of the grid layout.

  • col - The column where the child is placed inside of the grid layout.

  • rowspan - The row span of the child inside of the grid layout. If not specified, defaults to 1.

  • colspan - The column span of the child inside of the grid layout. If not specified, defaults to 1.

If the children of the grid layout do not specify the row and col attributes, then the grid layout automatically places the children according to their order in the XML schema. Grid layouts support two additional node types to place the children:

  • nl - Increases the current row and resets the current column of the grid layout.

  • sp - Increases the current column of the grid layout.

Splitter containers support the following attributes:

  • sizes - The initial sizes in pixels for the sub-views in the splitter. This must be a dash (-) separated list.

  • csizes - The initial sizes in characters for the sub-views in the splitter. This must be a dash (-) separated list.

Note

Initial sizes for sub-views in a splitter container are indicative. They might not be respected.

Tab containers support the following attributes:

  • index - The initial index of the tab container.

  • titles - The titles of the tabs. This must be a semi-colon (;) separated list.

  • loc - The location of the tab bar. Possible values are: top, left, bottom and right. If not specified, it defaults to top.

Group containers support the following attributes:

  • layout - The layout of the group container. Possible values are: horizontal, h, vertical and v.

  • title - The title of the group container.

Containers can have an associate id, but it is not mandatory.

Hint

All containers can be nested: a layout may contain another layout, a group container may contain a layout and so on.

These are the types of available sub-views with their specific attributes:

  • btn - Button control (See ProPushButton). Available attributes are:

    • text - The text of the button.

  • carbon - Carbon disassembly view (See ProCarbonView).

  • celltable - Cell table view (See ProCellTableView).

  • check - Check-box control (See ProCheckBox). Available attributes are:

    • text - The text of the check-box.

    • checked - If true, the initial state of the check-box is checked.

  • combo - Combo control (See ProComboBox). Available attributes are:

    • edit - If true, the combo control is editable.

    • text - The text of an editable combo control.

  • hex - Hex view (See ProHexView).

  • label - Label control (See ProLabel). The value of the XML node represents the text of the label. Available attributes are:

    • select - If true, the label text is selectable.

    • wrap - If true, the label is word wrapped.

    • margin - The margin in pixels of the label text.

    • align - The alignment of the label text. This must be a dash (-) separated list of the following possible values: hcenter, vcenter, center, top, left, bottom and right.

  • media - Media view (See ProMediaView).

  • out - Output view (See ProView). Available attributes are:

    • readonly - If true, the output view is read-only.

    • linenr - If true, the output view shows the line number.

    • hline - If true, the output view highlights the current line.

    • hword - If true, the output view highlights the current word.

    • wrap - If true, the output view wraps text.

  • pie - Pie view (See ProView).

  • plot - Plot view (See ProPlotView).

  • progbar - Progress-bar control (See ProProgressBar).

  • sqltable - SQLite table view (See ProTableView).

  • table - Table view (See ProTableView).

  • text - Text view (See ProTextView). Available attributes are:

    • readonly - If true, the text view is read-only.

    • linenr - If true, the text view shows the line number.

    • hline - If true, the text view highlights the current line.

    • hword - If true, the text view highlights the current word.

    • wrap - If true, the text view wraps text.

  • tline - Text line control (See ProTextLine).

  • tree - Tree view (See ProTreeView).

Apart from their specific attributes, all sub-views support the following common attributes:

  • width - The preferred width of the view in pixels.

  • height - The preferred height of the view in pixels.

  • min-width - The minimum width of the view in pixels.

  • min-height - The minimum height of the view in pixels.

  • max-width - The maximum width of the view in pixels.

  • max-height - The maximum height of the view in pixels.

  • fixed-width - The fixed width of the view in pixels.

  • fixed-height - The fixed height of the view in pixels.

  • cwidth - The preferred width of the view in characters.

  • cheight - The preferred height of the view in characters.

  • min-cwidth - The minimum width of the view in characters.

  • min-cheight - The minimum height of the view in characters.

  • max-cwidth - The maximum width of the view in characters.

  • max-cheight - The maximum height of the view in characters.

  • fixed-cwidth - The fixed width of the view in characters.

  • fixed-cheight - The fixed height of the view in characters.

  • wfixed - If true, sets the horizontal size policy of the view to fixed.

  • hfixed - If true, sets the vertical size policy of the view to fixed.

  • bold - If true, sets the font of the view to bold.

  • italic - If true, sets the font of the view to italic.

  • focus - If true, sets the initial focus to the view.

  • hint - The tool-tip of the view.

Some sub-views also support the following attributes:

  • bgcolor - The color of the view specified as a hex value. This attribute is supported by the ui, btn, check and label UI elements.

Hint

Code examples for specific views and controls may be found under their class documentation. More examples of custom views can be found in the open source modules shipped with the application.

Dialogs

Dialogs are created around custom views:

from Pro.Core import *
from Pro.UI import *

c = NTContainer()
c.setData(b"Hello, world!")

ctx = proContext()
hv = ctx.createView(ProView.Type_Hex, "Title")
hv.setData(c)

dlg = ctx.createDialog(hv)
dlg.show()

The callback of the embedded custom view receives the notifications originating from the dialog (e.g., pvnShowDialog or pvnCloseDialog).

See also ProContext.createDialog() and ProDialog.

Workspaces

Entire workspaces with menus, tool-bars and dock views can be created from the SDK.

Important

Only one workspace at a time should exists in a process. This is a current limitation of working with workspaces. Therefore, when creating a workspace, as in the following example, it should be done from the context of a logic provider.

An example:

from Pro.Core import *
from Pro.UI import *

def cb(ws, ud, code, view, data):
    if code == pvnInit:
        print("hello world!")
        ws.restoreAppearance()
    elif code == pvnClose:
        print("bye world!")
    elif code == pvnExecuteAction:
        print(data.cmd)
        if data.cmd == 0:
            view = proContext().createView(ProView.Type_Hex, "testview")
            dock = ws.createDock(view, "testdock", "Test dock")
            ws.addDock(dock)
        elif data.cmd == 1:
            ws.saveLayout("d1")
            proContext().msgBox(MBIconInfo, "Saved", "Layout saved")
    return 0

def init():
    ctx = proContext()
    ws = ctx.createWorkspace("Test")
    ws.setup(cb, None)
    ws.setTitle("Test Workspace")
    ws.addStdToolBar(ws.StdToolBar_Run)
    ws.addStdToolBar(ws.StdToolBar_Views)
    ws.addStdToolBar(ws.StdToolBar_CmdLine)
    tbar = ws.addToolBar("test_tbar", "Test ToolBar")
    menu = ws.menuBar().addMenu("&File")
    for i in range(5):
        a = ws.addAction(i, "action " + str(i), "", i)
        tbar.addAction(a)
        menu.addAction(a)
        if i == 2:
            tbar.addSeparator()
            menu.addSeparator()
    for i in range(2):
        view = ctx.createView(ProView.Type_Text, "view" + str(i))
        dock = ws.createDock(view, "d" + str(i), "Test dock " + str(i))
        ws.addDock(dock)
    dock = ws.createStdDock(ws.StdDock_Output)
    ws.addDock(dock)
    ws.show()
    return False

The configuration lines for the logic provider used for the example above are the following:

[Workspace]
descr = Workspace Test
group = Example
file = ws.py
init = init

See also ProContext.createWorkspace() and ProWorkspace.

Module API

Pro.UI module API.

Attributes:

MBIconErr

Error icon for a message box.

MBIconInfo

Information icon for a message box.

MBIconWarn

Warning icon for a message box.

MBOkCancel

Ok-Cancel buttons for a message box.

MBYesNo

Yes-No buttons for a message box.

ProAllToolBarAreas

All tool-bar areas.

ProBottomToolBarArea

Bottom tool-bar area.

ProColor_Custom

Theme based custom color.

ProColor_Error

Theme based error color.

ProColor_Special

Theme based special color.

ProColor_Unreferenced

Theme based unreferenced color.

ProColor_Used

Theme based used color.

ProLeftToolBarArea

Left tool-bar area.

ProNoToolBarArea

Invalid tool-bar area.

ProRightToolBarArea

Right tool-bar area.

ProTopToolBarArea

Top tool-bar area.

PubIcon_Add

Identifier for the ‘add’ icon.

PubIcon_AddBookmark

Identifier for the ‘add bookmark’ icon.

PubIcon_AddColor

Identifier for the ‘add color’ icon.

PubIcon_AddFileToReport

Identifier for the ‘add file to report’ icon.

PubIcon_AddStructure

Identifier for the ‘add structure’ icon.

PubIcon_AddressBook

Identifier for the ‘address book’ icon.

PubIcon_Attachment

Identifier for the ‘attachment’ icon.

PubIcon_BlueFlag

Identifier for the ‘blue flag’ icon.

PubIcon_Bookmarks

Identifier for the ‘bookmarks’ icon.

PubIcon_BookmarksPresent

Identifier for the ‘bookmarks present’ icon.

PubIcon_Brush

Identifier for the ‘brush’ icon.

PubIcon_Bulb

Identifier for the ‘light bulb’ icon.

PubIcon_Carbon

Identifier for the ‘Carbon’ icon.

PubIcon_CarbonAdd

Identifier for the ‘Carbon add’ icon.

PubIcon_Certificate

Identifier for the ‘certificate’ icon.

PubIcon_Class

Identifier for the ‘code class’ icon.

PubIcon_Color

Identifier for the ‘color’ icon.

PubIcon_Computer

Identifier for the ‘computer’ icon.

PubIcon_Copy

Identifier for the ‘copy’ icon.

PubIcon_Debug

Identifier for the ‘debug’ icon.

PubIcon_Delete

Identifier for the ‘delete’ icon.

PubIcon_Dir

Identifier for the ‘directory’ icon.

PubIcon_Download

Identifier for the ‘download’ icon.

PubIcon_Drive

Identifier for the ‘hard-drive’ icon.

PubIcon_EditBookmark

Identifier for the ‘edit bookmark’ icon.

PubIcon_Enum

Identifier for the ‘code enumerator’ icon.

PubIcon_False

Identifier for the ‘false’ icon.

PubIcon_Filter

Identifier for the ‘filter’ icon.

PubIcon_Find

Identifier for the ‘find’ icon.

PubIcon_FullScreen

Identifier for the ‘full-screen’ icon.

PubIcon_Function

Identifier for the ‘code function’ icon.

PubIcon_FunctionPrivate

Identifier for the ‘code private function’ icon.

PubIcon_FunctionProtected

Identifier for the ‘code protected function’ icon.

PubIcon_Geo

Identifier for the ‘geo-location’ icon.

PubIcon_GhidraNativeUI

Identifier for the ‘Ghidra native UI’ icon.

PubIcon_GlobalBookmarks

Identifier for the ‘global bookmarks’ icon.

PubIcon_GlobalBookmarksPresent

Identifier for the ‘global bookmarks present’ icon.

PubIcon_GlobalNotes

Identifier for the ‘global notes’ icon.

PubIcon_GlobalNotesPresent

Identifier for the ‘global notes present’ icon.

PubIcon_GoToReport

Identifier for the ‘go to report’ icon.

PubIcon_GreenFlag

Identifier for the ‘green flag’ icon.

PubIcon_Hammer

Identifier for the ‘hammer tool’ icon.

PubIcon_HdrMgr

Identifier for the ‘Header Manager’ icon.

PubIcon_HeaderManager

Identifier for the ‘Header Manager’ icon.

PubIcon_Hex

Identifier for the ‘hex’ icon.

PubIcon_HexAdd

Identifier for the ‘hex add’ icon.

PubIcon_Install

Identifier for the ‘installation’ icon.

PubIcon_Item

Identifier for the ‘item’ icon.

PubIcon_Item2

Identifier for the ‘item 2’ icon.

PubIcon_JSDbg

Identifier for the ‘JavaScript Debugger’ icon.

PubIcon_Key

Identifier for the ‘key’ icon.

PubIcon_Layout

Identifier for the ‘layout’ icon.

PubIcon_LayoutTable

Identifier for the ‘layout table’ icon.

PubIcon_Namespace

Identifier for the ‘code namespace’ icon.

PubIcon_NavigationBack

Identifier for the ‘navigation back’ icon.

PubIcon_NavigationForth

Identifier for the ‘navigation forward’ icon.

PubIcon_New

Identifier for the ‘new’ icon.

PubIcon_NewAppInstance

Identifier for the ‘new application instance’ icon.

PubIcon_NewGhidraNativeUI

Identifier for the ‘new Ghidra native UI’ icon.

PubIcon_Notes

Identifier for the ‘notes’ icon.

PubIcon_NotesPresent

Identifier for the ‘notes present’ icon.

PubIcon_Open

Identifier for the ‘open’ icon.

PubIcon_Package

Identifier for the ‘package’ icon.

PubIcon_Preview

Identifier for the ‘preview’ icon.

PubIcon_Question

Identifier for the ‘question’ icon.

PubIcon_Raw

Identifier for the ‘raw data’ icon.

PubIcon_RedFlag

Identifier for the ‘red flag’ icon.

PubIcon_Redo

Identifier for the ‘redo’ icon.

PubIcon_Refresh

Identifier for the ‘refresh’ icon.

PubIcon_Report

Identifier for the ‘report’ icon.

PubIcon_ResetLayout

Identifier for the ‘reset layout’ icon.

PubIcon_Roots

Identifier for the ‘roots’ icon.

PubIcon_Run

Identifier for the ‘run’ icon.

PubIcon_RunAction

Identifier for the ‘run action’ icon.

PubIcon_RunScript

Identifier for the ‘run script’ icon.

PubIcon_Save

Identifier for the ‘save’ icon.

PubIcon_SaveLayout

Identifier for the ‘save layout’ icon.

PubIcon_SaveProject

Identifier for the ‘save project’ icon.

PubIcon_SaveReport

Identifier for the ‘save report’ icon.

PubIcon_Scan

Identifier for the ‘scan’ icon.

PubIcon_ScanActive

Identifier for the ‘scan active’ icon.

PubIcon_ScanAdd

Identifier for the ‘scan add’ icon.

PubIcon_ScanHand

Identifier for the ‘scan hand’ icon.

PubIcon_ScriptEditorAdd

Identifier for the ‘script editor add’ icon.

PubIcon_Shell

Identifier for the ‘shell’ icon.

PubIcon_SingleView

Identifier for the ‘single view’ icon.

PubIcon_Stats

Identifier for the ‘stats’ icon.

PubIcon_Table

Identifier for the ‘table’ icon.

PubIcon_Text

Identifier for the ‘text’ icon.

PubIcon_TextAdd

Identifier for the ‘text add’ icon.

PubIcon_Tool

Identifier for the ‘tool’ icon.

PubIcon_TrashEmpty

Identifier for the ‘trash empty’ icon.

PubIcon_Tree

Identifier for the ‘tree’ icon.

PubIcon_True

Identifier for the ‘true’ icon.

PubIcon_UAC

Identifier for the ‘User Account Control’ icon.

PubIcon_Undo

Identifier for the ‘undo’ icon.

PubIcon_Variable

Identifier for the ‘code variable’ icon.

PubIcon_VariablePrivate

Identifier for the ‘code private variable’ icon.

PubIcon_VariableProtected

Identifier for the ‘code protected variable’ icon.

PubIcon_Warning

Identifier for the ‘warning’ icon.

PubIcon_Web

Identifier for the ‘web’ icon.

PubIcon_Window

Identifier for the ‘window’ icon.

PubIcon_Windows

Identifier for the ‘windows’ icon.

PubIcon_YellowFlag

Identifier for the ‘yellow flag’ icon.

pvnButtonClicked

Notification for when a button is clicked.

pvnCarbonDebugSymbolsLoaded

Notification to inform the dependent views of a Carbon disassembly view that debug symbols were loaded.

pvnCellTableColumnCount

Notification to retrieve the number of columns in a cell table item.

pvnCellTableGetHeader

Notification to retrieve the label of a cell table view header.

pvnCellTableGetItem

Notification to retrieve the data of a cell table item.

pvnCellTableItemActivated

Notification for when an item is activated in a cell table view.

pvnCellTableRowCount

Notification to retrieve the number of rows in a cell table item.

pvnCellTableSelectionChanged

Notification for when the selection of a cell table view has changed.

pvnCheckChanged

Notification for when the status of a check box has changed.

pvnClose

Notification for when a custom view is destroyed.

pvnCloseDialog

Notification for when a dialog box is closed.

pvnComboIndexChanged

Notification for when the current item in a combo box is changed.

pvnComboTextChanged

Notification for when the text in an editable combo box is changed.

pvnContextMenu

Notification for a context menu request.

pvnCtrlReset

Notification for control reset.

pvnCtrlSetup

Notification for control initialization.

pvnCustomTreeItemActivated

Notification for when an item of a custom tree view was activated.

pvnCustomTreeItemExpanded

Notification for when an item of a custom tree view was expanded.

pvnCustomTreeRowSelected

Notification for when the selected row has changed in a custom tree view.

pvnExecuteAction

Notification for the execution of a UI action.

pvnGetCustomTreeRow

Notification to retrieve the data for a row of a custom tree view.

pvnGetTableRow

Notification to retrieve the data for a table view row.

pvnGetTableToolTip

Notification to retrieve the tool-tip data for a table view item.

pvnGetTreeRow

Notification used to retrieve the data for a row of a Pro.Core.CFFDB tree view.

pvnHexRangeColor

This notification is not yet exposed to the Python SDK.

pvnIdle

Notification for when a custom view is processing idle notifications.

pvnInit

Notification for when a custom view is initialized.

pvnItemActivated

Notification for when an item is activated in a table view.

pvnItemSelected

Notification for when an item is selected in a table view.

pvnPlotPointSelected

Notification for a point selection in ProPlotView.

pvnRangeColor

This notification is not yet exposed to the Python SDK.

pvnRangeDescription

This notification is not yet exposed to the Python SDK.

pvnRangeValues

This notification is not yet exposed to the Python SDK.

pvnRowSelected

Notification for when a row is selected in a ProTableView.

pvnSaveMainSettings

This notification is sent to settings UI hooks to inform them that the user has saved the settings.

pvnShow

Notification for when a custom view is shown to the user.

pvnShowDialog

Notification for when a dialog box is first shown to the user.

pvnTabChanged

Notification for a tab change in ProTabBar.

pvnTextLineEdited

Notification for when the text is changed in a text line control.

pvnTreeColumnCount

Notification used to retrieve the number child columns for an item of a custom tree view.

pvnTreeIndex

Notification used to retrieve the index information for an item of a custom tree view.

pvnTreeItemActivated

Notification for when an item of a Pro.Core.CFFDB tree view was activated.

pvnTreeItemExpanded

Notification for when an item of a Pro.Core.CFFDB tree view was expanded.

pvnTreeItemSelected

This notification is not yet exposed to the Python SDK.

pvnTreeParent

Notification used to retrieve the parent index information for an item of a custom tree view.

pvnTreeRowCount

Notification used to retrieve the number child rows for an item of a custom tree view.

pvnTreeRowSelected

Notification for when the selected row has changed in a Pro.Core.CFFDB tree view.

Classes:

ProAlign()

This class contains alignment constants.

ProCarbonView()

This class represents a Carbon disassembly view.

ProCarbonViewRange()

This class represents a range in a Carbon disassembly view.

ProCellTableIndex()

This class represent the index of an item in a cell table view.

ProCellTableIndexList()

List of ProCellTableIndex elements.

ProCellTableIndexListIt(obj)

Iterator class for ProCellTableIndexList.

ProCellTableView()

This class represents a cell table view.

ProCheckBox()

This class represents a check box control.

ProClipboard()

This class allows access to the system clipboard.

ProComboBox()

This class represents a combo box control.

ProContext()

This class provides functionality for the current UI context.

ProCustomView()

This class represents a custom view.

ProDialog()

This class represents a dialog.

ProDock()

This class represent a dock view of a workspace.

ProGroupBox()

This class represents a group box control.

ProHexView()

This class represents a hex view.

ProInput()

This class provides additional common dialogs to those provided by ProContext.

ProLabel()

This class represents a label control.

ProMediaView()

This class represents a media view.

ProMenu()

This class represents a UI menu.

ProMenuBar()

This class represents a menu-bar.

ProPDBDownloadOptions()

This class contains the options to download PDB files.

ProPlotView()

This class represents a plot view.

ProProgressBar()

This class represents a progress bar control.

ProPropertyEditor()

This class represents a property editor dialog.

ProPushButton()

This class represents a button control.

ProTabBar()

This class represents a tab bar.

ProTableView()

This class represents a table view.

ProTextBrowserView()

This class represents a text browser.

ProTextLine()

This class represents a text line control.

ProTextView()

This class represents a text view.

ProToolBar()

This class represents a tool-bar.

ProTreeIndex()

This class represents an index of a custom tree view.

ProTreeView()

This class represents a tree view.

ProUIAction()

This class represents a UI action.

ProUIPoint(x, y)

This class contains the coordinates of a UI point.

ProUIRect(x, y, w, h)

This class contains the coordinates of a UI rect.

ProUISize(w, h)

This class contains the coordinates of a UI size.

ProView()

This is the base class for every view and control.

ProWait()

This class provides the UI implementation of Pro.Core.NTIWait in the shape of a wait dialog.

ProWorkspace()

This class represents a UI workspace.

pvnCellTableGetHeaderData()

This class contains the data associated to pvnCellTableGetHeader.

pvnCellTableGetItemData()

This class contains the data associated to pvnCellTableGetItem.

pvnCellTableItemActivatedData()

This class contains the data associated to pvnCellTableItemActivated.

pvnCheckChangedData()

This class contains the data associated to pvnCheckChanged.

pvnComboIndexChangedData()

This class contains the data associated to pvnComboIndexChanged.

pvnCommonRowData()

Base class for other UI notification classes.

pvnContextMenuData()

This class contains the data associated to pvnContextMenu.

pvnCustomTreeItemActivatedData()

This class contains the data associated to pvnCustomTreeItemActivated.

pvnCustomTreeItemExpandedData()

This class contains the data associated to pvnCustomTreeItemExpanded.

pvnCustomTreeRowSelectedData()

This class contains the data associated to pvnCustomTreeRowSelected.

pvnExecuteActionData()

This class contains the data associated to pvnExecuteAction.

pvnGetCustomTreeRowData()

This class contains the data associated to pvnGetCustomTreeRow.

pvnGetTableRowData()

This class contains the data associated to pvnGetTableRow.

pvnGetTableToolTipData()

This class contains the data associated to pvnGetTableToolTip.

pvnGetTreeRowData()

This class contains the data associated to pvnGetTreeRow.

pvnItemActivatedData()

This class contains the data associated to pvnItemActivated.

pvnItemSelectedData()

This class contains the data associated to pvnItemSelected.

pvnPlotPointSelectedData()

This class contains the data associated to pvnPlotPointSelected.

pvnRowSelectedData()

This class contains the data associated to pvnRowSelected.

pvnTabChangedData()

This class contains the data associated to pvnTabChanged.

pvnTreeColumnCountData()

This class contains the data associated to pvnTreeColumnCount.

pvnTreeIndexData()

This class contains the data associated to pvnTreeIndex.

pvnTreeItemActivatedData()

This class contains the data associated to pvnTreeItemActivated.

pvnTreeItemExpandedData()

This class contains the data associated to pvnTreeItemExpanded.

pvnTreeParentData()

This class contains the data associated to pvnTreeParent.

pvnTreeRowCountData()

This class contains the data associated to pvnTreeRowCount.

pvnTreeRowSelectedData()

This class contains the data associated to pvnTreeRowSelected.

Functions:

proAddPublicIcon(path)

Adds an icon to the list of public icons.

proAddPublicIconFromFile(fname)

Adds the icon associated to a file to the list of public icons.

proContext()

Returns the global ProContext instance.

proGetSpecialColor(color)

Retrieves the value of a special color.

proRemovePublicIcon(iid)

Frees a public icon which was loaded using proAddPublicIcon() or proAddPublicIconFromFile().

MBIconErr: Final[int]

Error icon for a message box.

See also ProContext.msgBox().

MBIconInfo: Final[int]

Information icon for a message box.

See also ProContext.msgBox().

MBIconWarn: Final[int]

Warning icon for a message box.

See also ProContext.msgBox().

MBOkCancel: Final[int]

Ok-Cancel buttons for a message box.

See also ProContext.msgBox().

MBYesNo: Final[int]

Yes-No buttons for a message box.

See also ProContext.msgBox().

class ProAlign

This class contains alignment constants.

Attributes:

Bottom

Bottom alignment.

Center

Center alignment.

HCenter

Horizontal center alignment.

Left

Left alignment.

Right

Right alignment.

Top

Top alignment.

VCenter

Vertical center alignment.

Bottom: Final[int]

Bottom alignment.

Center: Final[int]

Center alignment.

This is a combination of HCenter and VCenter.

HCenter: Final[int]

Horizontal center alignment.

Left: Final[int]

Left alignment.

Right: Final[int]

Right alignment.

Top: Final[int]

Top alignment.

VCenter: Final[int]

Vertical center alignment.

ProAllToolBarAreas: Final[int]

All tool-bar areas.

See also meth:ProWorkspace.addToolBar.

ProBottomToolBarArea: Final[int]

Bottom tool-bar area.

See also meth:ProWorkspace.addToolBar.

class ProCarbonView

Bases: Pro.UI.ProView

This class represents a Carbon disassembly view.

The notifications for this view are:

See also ProContext.createView and ProCustomView.

Methods:

addLoaderAction(cmd, label[, shortcut, icon])

Adds a UI action from the side of the Carbon loader.

cursorAddress()

Returns the cursor address and position if successful; otherwise returns (INVALID_STREAM_OFFSET, INVALID_STREAM_OFFSET).

fromCarbonUIContext(uictx)

Retrieves a Carbon disassembly view from a Carbon UI context.

getCarbon()

Returns the current Carbon instance.

getSelectedRange(range)

Gets the selected range.

goToModule()

Shows the module dialog box.

openMemoryView()

Opens the memory dependent view.

setCarbon(c)

Sets the current Carbon instance.

setCursorAddress(address[, position])

Sets the cursor address and position.

setSelectedRange(range)

Sets the selected range.

addLoaderAction(cmd: int, label: str, shortcut: str = str(), icon: int = - 1)Pro.UI.ProUIAction

Adds a UI action from the side of the Carbon loader.

When the UI action is executed, the loader will be informed through Pro.Carbon.CarbonLoader.executeAction().

Parameters
  • cmd (int) – The identifier for the UI action.

  • label (str) – The text for the action.

  • shortcut (str) – The shortcut for the action (e.g. Ctrl+K)

  • icon (int) – The icon identifier. This can be a predefined icon (e.g., PubIcon_Text) or a custom icon (see proAddPublicIcon()).

Returns

Returns the UI action if successful; otherwise returns an invalid UI action.

Return type

ProUIAction

See also Pro.Carbon.CarbonLoader.executeAction() and ProUIAction.

cursorAddress()tuple
Returns

Returns the cursor address and position if successful; otherwise returns (INVALID_STREAM_OFFSET, INVALID_STREAM_OFFSET).

Return type

int

See also setCursorAddress().

static fromCarbonUIContext(uictx: CarbonUIContext)ProCarbonView

Retrieves a Carbon disassembly view from a Carbon UI context.

Parameters

uictx (CarbonUIContext) – The Carbon UI context.

Returns

Returns a Carbon view if successful; otherwise returns an invalid view.

Return type

ProCarbonView

See also Pro.Carbon.CarbonUIContext and Pro.Carbon.CarbonLoader.

getCarbon()Carbon
Returns

Returns the current Carbon instance.

Return type

Carbon

See also setCarbon() and Pro.Carbon.Carbon.

getSelectedRange(range: Pro.UI.ProCarbonViewRange)bool

Gets the selected range.

Parameters

range (ProCarbonViewRange) – The selected range.

Returns

Returns True if successful; otherwise returns False.

Return type

bool

See also ProView.hasSelection(), setSelectedRange() and ProCarbonViewRange.

goToModule()None

Shows the module dialog box.

openMemoryView()None

Opens the memory dependent view.

setCarbon(c: Carbon)None

Sets the current Carbon instance.

Parameters

c (Carbon) – The Carbon instance to display in the view.

See also getCarbon() and Pro.Carbon.Carbon.

setCursorAddress(address: int, position: Optional[int] = None)None

Sets the cursor address and position.

Parameters
  • address (int) – The address to set.

  • position (Optional[int]) – The position to set.

See also cursorAddress().

setSelectedRange(range: Pro.UI.ProCarbonViewRange)None

Sets the selected range.

Parameters

range (ProCarbonViewRange) – The range to select.

See also getSelectedRange() and ProCarbonViewRange.

class ProCarbonViewRange

This class represents a range in a Carbon disassembly view.

See also ProCarbonView.

Attributes:

end_addr

The end address of the range.

end_pos

The end position of the range.

start_addr

The start address of the range.

start_pos

The start position of the range.

end_addr

The end address of the range.

See also start_addr.

end_pos

The end position of the range.

See also start_pos.

start_addr

The start address of the range.

See also end_addr.

start_pos

The start position of the range.

See also end_pos.

class ProCellTableIndex

This class represent the index of an item in a cell table view.

See also ProCellTableView.

Attributes:

column

The column of the item.

row

The row of the item.

Methods:

isValid()

Returns True if the index is valid; otherwise returns False.

column

The column of the item.

See also row.

isValid()bool
Returns

Returns True if the index is valid; otherwise returns False.

Return type

bool

row

The row of the item.

See also column.

class ProCellTableIndexList

List of ProCellTableIndex elements.

Methods:

append(value)

Inserts value at the end of the list.

at(i)

Returns the item at index position i in the list.

clear()

Removes all items from the list.

contains(value)

Checks the presence of an element in the list.

count(value)

Returns the number of occurrences of value in the list.

indexOf(value[, start])

Searches for an element in the list.

insert(i, value)

Inserts value at index position i in the list.

isEmpty()

Checks whether the list is empty.

iterator()

Creates an iterator for the list.

removeAll(value)

Removes all occurrences of value in the list and returns the number of entries removed.

removeAt(i)

Removes the item at index position i.

reserve(alloc)

Reserve space for alloc elements.

size()

Returns the number of items in the list.

takeAt(i)

Removes the item at index position i and returns it.

append(value: Pro.UI.ProCellTableIndex)None

Inserts value at the end of the list.

Parameters

value (ProCellTableIndex) – The value to add to the list.

See also insert().

at(i: int)Pro.UI.ProCellTableIndex

Returns the item at index position i in the list. i must be a valid index position in the list (i.e., 0 <= i < size()).

Parameters

i (int) – The index of the element to return.

Returns

Returns the requested element.

Return type

ProCellTableIndex

clear()None

Removes all items from the list.

contains(value: Pro.UI.ProCellTableIndex)bool

Checks the presence of an element in the list.

Parameters

value (ProCellTableIndex) – The value to check for.

Returns

Returns True if the list contains an occurrence of value; otherwise returns False.

Return type

bool

See also indexOf() and count().

count(value: Pro.UI.ProCellTableIndex)int

Returns the number of occurrences of value in the list.

Parameters

value (ProCellTableIndex) – The value to count.

Returns

Returns the number of occurrences.

Return type

int

See also indexOf() and contains().

indexOf(value: Pro.UI.ProCellTableIndex, start: int = 0)int

Searches for an element in the list.

Parameters
  • value (ProCellTableIndex) – The value to search for.

  • start (int) – The start index.

Returns

Returns the index position of the first occurrence of value in the list. Returns -1 if no item was found.

Return type

int

See also contains().

insert(i: int, value: Pro.UI.ProCellTableIndex)None

Inserts value at index position i in the list. If i is 0, the value is prepended to the list. If i is size(), the value is appended to the list.

Parameters
  • i (int) – The position at which to add the value.

  • value (ProCellTableIndex) – The value to add.

See also append() and removeAt().

isEmpty()bool

Checks whether the list is empty.

Returns

Returns True if the list contains no items; otherwise returns False.

Return type

bool

See also size().

iterator()Pro.UI.ProCellTableIndexListIt

Creates an iterator for the list.

Returns

Returns the iterator.

Return type

ProCellTableIndexListIt

removeAll(value: Pro.UI.ProCellTableIndex)int

Removes all occurrences of value in the list and returns the number of entries removed.

Parameters

value (ProCellTableIndex) – The value to remove from the list.

Returns

Returns the number of entries removed.

Return type

int

See also removeAt().

removeAt(i: int)None

Removes the item at index position i. i must be a valid index position in the list (i.e., 0 <= i < size()).

Parameters

i (int) – The index of the item to remove.

See also removeAll().

reserve(alloc: int)None

Reserve space for alloc elements. Calling this method doesn’t change the size of the list.

Parameters

alloc (int) – The amount of elements to reserve space for.

size()int
Returns

Returns the number of items in the list.

Return type

int

See also isEmpty().

takeAt(i: int)Pro.UI.ProCellTableIndex

Removes the item at index position i and returns it. i must be a valid index position in the list (i.e., 0 <= i < size()).

Parameters

i (int) – The index of the element to remove from the list.

Returns

Returns the removed element. If you don’t use the return value, removeAt() is more efficient.

Return type

ProCellTableIndex

See also removeAt().

class ProCellTableIndexListIt(obj: Pro.UI.ProCellTableIndexList)

Iterator class for ProCellTableIndexList.

Parameters

obj (ProCellTableIndexList) – The object to iterate over.

Methods:

hasNext()

Returns True if there is at least one item ahead of the iterator, i.e. the iterator is not at the back of the container; otherwise returns False.

hasPrevious()

Returns True if there is at least one item behind the iterator, i.e. the iterator is not at the front of the container; otherwise returns False.

next()

Returns the next item and advances the iterator by one position.

previous()

Returns the previous item and moves the iterator back by one position.

toBack()

Moves the iterator to the back of the container (after the last item).

toFront()

Moves the iterator to the front of the container (before the first item).

hasNext()bool
Returns

Returns True if there is at least one item ahead of the iterator, i.e. the iterator is not at the back of the container; otherwise returns False.

Return type

bool

See also hasPrevious() and next().

hasPrevious()bool
Returns

Returns True if there is at least one item behind the iterator, i.e. the iterator is not at the front of the container; otherwise returns False.

Return type

bool

See also hasNext() and previous().

next()Pro.UI.ProCellTableIndex
Returns

Returns the next item and advances the iterator by one position.

Return type

ProCellTableIndex

See also hasNext() and previous().

previous()Pro.UI.ProCellTableIndex
Returns

Returns the previous item and moves the iterator back by one position.

Return type

ProCellTableIndex

See also hasPrevious() and next().

toBack()None

Moves the iterator to the back of the container (after the last item).

See also toFront() and previous().

toFront()None

Moves the iterator to the front of the container (before the first item).

See also toBack() and next().

class ProCellTableView

Bases: Pro.UI.ProView

This class represents a cell table view.

Hint

The difference with ProTableView is that table views are optimized for having many rows and a limited number of columns, while cell table views are not as fast as table views, but they can have as many columns as rows.

The notifications for this view are:

See also ProCustomView and ProTableView.

Attributes:

Data_BackgroundColor

Item background color request type.

Data_EditText

Item editable text request type.

Data_Font

Item font options request type.

Data_Icon

Item icon request type.

Data_Text

Item text request type.

Data_TextAlignment

Item text alignment request type.

Data_TextColor

Item text color request type.

Font_Bold

Bold font option.

Font_Italic

Italic font option.

Font_Underline

Underline font option.

Methods:

beginInsertColumns(first, last)

Begins a column insertion operation.

beginInsertRows(first, last)

Begins a row insertion operation.

beginRemoveColumns(first, last)

Begins a column removal operation.

beginRemoveRows(first, last)

Begins a row removal operation.

canGoBack()

Returns True if it’s possible to go back the previous position; otherwise returns False.

columnCount()

Returns the number of columns in the table.

enableNavigationHistory([max_queue_size])

Enables the navigation history for the table.

endInsertColumns()

Ends a column insertion operation.

endInsertRows()

Ends a row insertion operation.

endRemoveColumns()

Ends a column removal operation.

endRemoveRows()

Ends a row removal operation.

getColumnWidth(col)

Retrieves the width of a column.

getCurrentIndex()

Returns the current item if any; otherwise returns an invalid index.

getHorizontalPosition()

Returns the horizontal scroll-bar position.

getItemText(idx_or_row[, column])

Retrieves the text of an item.

getSelectedIndexes()

Returns a list of the currently selected items if any; otherwise returns an empty list.

getVerticalPosition()

Returns the vertical scroll-bar position.

goBack()

Goes back to the previous position in the navigation history.

refresh()

Refreshes the contents of the table.

rowCount()

Returns the number of rows in the table.

setCellHeightInLines(n)

Sets the cell height in lines.

setColumnCWidth(col, cw)

Sets the width of a column in characters.

setColumnWidth(col, w)

Sets the width of a column in pixels.

setCurrentIndex(idx_or_row[, …])

Sets the current item.

setDefaultCellCWidth(cw)

Sets the default cell width in characters.

setDefaultCellWidth(w)

Sets the default cell width in pixels.

setFixedFont()

Sets the standard fixed font as font for the table.

setHorizontalPosition(pos)

Sets the horizontal scroll-bar position.

setVerticalPosition(pos)

Sets the vertical scroll-bar position.

Data_BackgroundColor: Final[int]

Item background color request type.

See also pvnCellTableGetItem.

Data_EditText: Final[int]

Item editable text request type.

See also pvnCellTableGetItem.

Data_Font: Final[int]

Item font options request type.

See also pvnCellTableGetItem.

Data_Icon: Final[int]

Item icon request type.

See also pvnCellTableGetItem.

Data_Text: Final[int]

Item text request type.

See also pvnCellTableGetItem.

Data_TextAlignment: Final[int]

Item text alignment request type.

See also pvnCellTableGetItem.

Data_TextColor: Final[int]

Item text color request type.

See also pvnCellTableGetItem.

Font_Bold: Final[int]

Bold font option.

See also pvnCellTableGetItemData.setFontOptions().

Font_Italic: Final[int]

Italic font option.

See also pvnCellTableGetItemData.setFontOptions().

Font_Underline: Final[int]

Underline font option.

See also pvnCellTableGetItemData.setFontOptions().

beginInsertColumns(first: int, last: int)None

Begins a column insertion operation.

Parameters
  • first (int) – The index of the first column to insert.

  • last (int) – The index of the last column to insert.

See also endInsertColumns() and beginRemoveColumns().

beginInsertRows(first: int, last: int)None

Begins a row insertion operation.

Parameters
  • first (int) – The index of the first row to insert.

  • last (int) – The index of the last row to insert.

See also endInsertRows() and beginRemoveRows().

beginRemoveColumns(first: int, last: int)None

Begins a column removal operation.

Parameters
  • first (int) – The index of the first column to remove.

  • last (int) – The index of the last column to remove.

See also endRemoveColumns() and beginInsertColumns().

beginRemoveRows(first: int, last: int)None

Begins a row removal operation.

Parameters
  • first (int) – The index of the first row to remove.

  • last (int) – The index of the last row to remove.

See also endRemoveRows() and beginInsertRows().

canGoBack()bool
Returns

Returns True if it’s possible to go back the previous position; otherwise returns False.

Return type

bool

See also goBack() and enableNavigationHistory().

columnCount()int

Returns the number of columns in the table.

Internally this method uses pvnCellTableColumnCount to retrieve the number of columns.

Returns

Returns the number of columns.

Return type

int

See also pvnCellTableColumnCount and rowCount().

enableNavigationHistory(max_queue_size: int = 200)None

Enables the navigation history for the table.

Parameters

max_queue_size (int) – The maximum size of the navigation history.

See also canGoBack() and goBack().

endInsertColumns()None

Ends a column insertion operation.

See also beginInsertColumns().

endInsertRows()None

Ends a row insertion operation.

See also beginInsertRows().

endRemoveColumns()None

Ends a column removal operation.

See also beginRemoveColumns().

endRemoveRows()None

Ends a row removal operation.

See also beginRemoveRows().

getColumnWidth(col: int)int

Retrieves the width of a column.

Parameters

col (int) – The column for which to retrieve the width.

Returns

Returns the column width.

Return type

int

See also setColumnWidth().

getCurrentIndex()Pro.UI.ProCellTableIndex
Returns

Returns the current item if any; otherwise returns an invalid index.

Return type

ProCellTableIndex

See also setCurrentIndex() and ProCellTableIndex.

getHorizontalPosition()int
Returns

Returns the horizontal scroll-bar position.

Return type

int

See also setHorizontalPosition() and getVerticalPosition().

getItemText(idx_or_row: Union[Pro.UI.ProCellTableIndex, int], column: Optional[int] = None)str

Retrieves the text of an item.

Internally this method uses pvnCellTableGetItem with Data_EditText to retrieve the text of the item.

Parameters
  • idx_or_row (Union[ProCellTableIndex, int]) – The index or the row of the item.

  • column (Optional[int]) – The column of the item.

Returns

Returns the text of the item if successful; otherwise returns an empty string.

Return type

str

See also pvnCellTableGetItem.

getSelectedIndexes()Pro.UI.ProCellTableIndexList
Returns

Returns a list of the currently selected items if any; otherwise returns an empty list.

Return type

ProCellTableIndexList

See also ProCellTableIndexList, ProCellTableIndex and setCurrentIndex().

getVerticalPosition()int
Returns

Returns the vertical scroll-bar position.

Return type

int

See also setVerticalPosition() and getHorizontalPosition().

goBack()None

Goes back to the previous position in the navigation history.

Important

Before calling this method, it is necessary to enable navigation history by calling enableNavigationHistory().

See also canGoBack() and enableNavigationHistory().

refresh()None

Refreshes the contents of the table.

rowCount()int

Returns the number of rows in the table.

Internally this method uses pvnCellTableRowCount to retrieve the number of rows.

Returns

Returns the number of rows.

Return type

int

See also pvnCellTableRowCount and columnCount().

setCellHeightInLines(n: int)None

Sets the cell height in lines.

Parameters

n (int) – The number of lines.

See also setDefaultCellCWidth().

setColumnCWidth(col: int, cw: int)None

Sets the width of a column in characters.

Parameters
  • col (int) – The column to resize.

  • cw (int) – The width to set.

See also setColumnWidth() and setDefaultCellCWidth().

setColumnWidth(col: int, w: int)None

Sets the width of a column in pixels.

Parameters
  • col (int) – The column to resize.

  • w (int) – The width to set.

See also getColumnWidth(), setColumnCWidth() and setDefaultCellWidth().

setCurrentIndex(idx_or_row: Union[Pro.UI.ProCellTableIndex, int], column_or_select: Union[bool, int] = True, ensure_visible_or_select: bool = True, ensure_visible: bool = True)None

Sets the current item.

Parameters
  • idx_or_row (Union[ProCellTableIndex, int]) – The index or the row of the item.

  • column_or_select (Union[bool, int]) – The selection status or the column of the item.

  • ensure_visible_or_select (bool) – The selection status or ensure visible argument.

  • ensure_visible (bool) – If True, ensures the visibility of the item.

See also getCurrentIndex() and ProCellTableIndex.

setDefaultCellCWidth(cw: int)None

Sets the default cell width in characters.

Parameters

cw (int) – The width to set.

See also setDefaultCellWidth() and setColumnCWidth().

setDefaultCellWidth(w: int)None

Sets the default cell width in pixels.

Parameters

w (int) – The width to set.

See also setDefaultCellCWidth() and setColumnWidth().

setFixedFont()None

Sets the standard fixed font as font for the table.

setHorizontalPosition(pos: int)None

Sets the horizontal scroll-bar position.

Parameters

pos (int) – The position to set.

See also getHorizontalPosition() and setVerticalPosition().

setVerticalPosition(pos: int)None

Sets the vertical scroll-bar position.

Parameters

pos (int) – The position to set.

See also getVerticalPosition() and setHorizontalPosition().

class ProCheckBox

Bases: Pro.UI.ProView

This class represents a check box control.

The notifications for this control are:

  • pvnCheckChanged - Emitted when the checked status of the check box changes.

See also ProCustomView.

Methods:

isChecked()

Returns True if the check box is checked; otherwise returns False.

setChecked(b)

Sets the checked status of the check-box.

setText(txt)

Sets the text of the check-box.

text()

Returns the text of the check box.

isChecked()bool
Returns

Returns True if the check box is checked; otherwise returns False.

Return type

bool

See also setChecked().

setChecked(b: bool)None

Sets the checked status of the check-box.

Parameters

b (bool) – The status to set.

See also isChecked().

setText(txt: str)None

Sets the text of the check-box.

Parameters

txt (str) – The text to set.

See also text().

text()str
Returns

Returns the text of the check box.

Return type

str

See also setText().

class ProClipboard

This class allows access to the system clipboard.

Methods:

getText()

Returns the text stored in the clipboard if available; otherwise returns an empty string.

setText(s)

Sets the text stored in the clipboard.

static getText()str
Returns

Returns the text stored in the clipboard if available; otherwise returns an empty string.

Return type

str

See also setText().

static setText(s: str)None

Sets the text stored in the clipboard.

Parameters

s (str) – The text to set.

See also getText().

ProColor_Custom: Final[int]

Theme based custom color.

See also proGetSpecialColor().

ProColor_Error: Final[int]

Theme based error color.

See also proGetSpecialColor().

ProColor_Special: Final[int]

Theme based special color.

See also proGetSpecialColor().

ProColor_Unreferenced: Final[int]

Theme based unreferenced color.

See also proGetSpecialColor().

ProColor_Used: Final[int]

Theme based used color.

See also proGetSpecialColor().

class ProComboBox

Bases: Pro.UI.ProView

This class represents a combo box control.

The notifications for this control are:

See also ProCustomView.

Methods:

addItem(text)

Adds an item to the combo box.

addItems(items)

Adds a list of items to the combo box.

count()

Returns the number of items in the combo box.

currentIndex()

Returns the index of the currently selected item if successful; otherwise returns -1.

editText()

Retrieves the text of the combo box.

isEditable()

Returns True if the combo box is editable; otherwise returns False.

itemText(i)

Retrieves the text of an item in the combo box.

maxVisibleItems()

Returns the maximum number of items visible when the drop-down button of the combo box is clicked.

removeItem(i)

Removes an item from the combo box.

setCurrentIndex(i)

Sets the currently selected item.

setEditText(text)

Sets the text of the combo box.

setEditable(b)

Makes the combo box editable.

setMaxVisibleItems(n)

Sets the maximum number of items visible when the drop-down button of the combo box is clicked.

addItem(text: str)None

Adds an item to the combo box.

Parameters

text (str) – The text of the item to add.

See also addItems() and removeItem().

addItems(items: Pro.Core.NTStringList)None

Adds a list of items to the combo box.

Parameters

items (NTStringList) – The list of items to add.

See also Pro.Core.NTStringList, addItems() and removeItem().

count()int
Returns

Returns the number of items in the combo box.

Return type

int

See also currentIndex() and addItem().

currentIndex()int
Returns

Returns the index of the currently selected item if successful; otherwise returns -1.

Return type

int

See also setCurrentIndex() and editText().

editText()str

Retrieves the text of the combo box.

To use this method, the combo box must be editable (see setEditable()).

Returns

Returns the combo box text.

Return type

str

See also setEditText(), setEditable() and isEditable().

isEditable()bool
Returns

Returns True if the combo box is editable; otherwise returns False.

Return type

bool

See also setEditable(), editText() and setEditText().

itemText(i: int)str

Retrieves the text of an item in the combo box.

Parameters

i (int) – The index of the item.

Returns

Returns the item text if successful; otherwise returns an empty string.

Return type

str

See also editText() and addItem().

maxVisibleItems()int
Returns

Returns the maximum number of items visible when the drop-down button of the combo box is clicked.

Return type

int

See also setMaxVisibleItems().

removeItem(i: int)None

Removes an item from the combo box.

Parameters

i (int) – The index of the item to remove.

See also addItem() and addItems().

setCurrentIndex(i: int)None

Sets the currently selected item.

Parameters

i (int) – The index of the item to select.

See also currentIndex() and addItem().

setEditText(text: str)None

Sets the text of the combo box.

To use this method, the combo box must be editable (see setEditable()).

Parameters

text (str) – The text to set.

See also editText(), setEditable() and isEditable().

setEditable(b: bool)None

Makes the combo box editable.

Parameters

b (bool) – If True, makes the combo box editable; otherwise makes the combo box read-only.

See also editText(), setEditText() and isEditable().

setMaxVisibleItems(n: int)None

Sets the maximum number of items visible when the drop-down button of the combo box is clicked.

Parameters

n (int) – The number of visible items.

See also maxVisibleItems().

class ProContext

Bases: Pro.Core.ProCoreContext

This class provides functionality for the current UI context.

The global instance of this class can be retrieved by calling proContext().

See also proContext().

Attributes:

HexJumpBehavior_Auto

Automatically decides whether to jump using the current analysis view or to open a new one.

HexJumpBehavior_InPlace

Jumps to the hex view using the current analysis view.

HexJumpBehavior_Mask

Mask for the hex jump behaviour.

HexJumpBehavior_OpenNew

Jumps to the hex view in a newly opened analysis view.

HexJumpType_Default

Jumps to the default hex view.

HexJumpType_Mask

Mask for the hex jump type.

HexJumpType_Raw

Jumps to the raw hex view.

Methods:

addView(view[, switch_to])

Adds a view to the current workspace.

askParams(xml[, key, cb, ud])

Shows a property editor dialog.

createDialog(view)

Creates a dialog from a custom view.

createView(type, title[, flags, icon])

Creates a view.

createViewFromWidget(widget)

Creates a view from a Qt widget.

createWorkspace(name[, version])

Creates a workspace.

findView(title)

Finds a view by its title.

fromView(view)

Retrieves the context from a view.

getCurrentAnalysisView()

Returns the view of the current analysis view if any; otherwise returns an invalid view.

getCurrentView()

Returns the current view if any; otherwise returns an invalid view.

getCurrentWorkspace()

Returns the current workspace if available; otherwise returns an invalid workspace.

getExistingDirectory([title, dir])

Asks the user to select a directory.

getOpenFileName([title, dir, filter])

Asks the user to select a file.

getPDBDownloadOptions(opt)

Retrieves the options for downloading PDB files.

getSaveFileName([title, dir, filter])

Asks the user where to save a file.

hexJump(offset[, flags])

Jumps to a specified position in the main hex view for the file being analyzed.

makeFileTitle(prefix)

Creates a view title from the currently open file.

msgBox(type, caption[, title])

Shows a message box to the user.

openDirectoryInFileManager(path)

Opens a directory using the system file manager.

openURL(url)

Opens a URL using the system web-browser.

startWait(label[, flags])

Shows a wait-dialog.

HexJumpBehavior_Auto: Final[int]

Automatically decides whether to jump using the current analysis view or to open a new one.

See also hexJump(), HexJumpBehavior_InPlace and HexJumpBehavior_OpenNew.

HexJumpBehavior_InPlace: Final[int]

Jumps to the hex view using the current analysis view.

See also hexJump(), HexJumpBehavior_Auto and HexJumpBehavior_OpenNew.

HexJumpBehavior_Mask: Final[int]

Mask for the hex jump behaviour.

See also hexJump(), HexJumpBehavior_Auto, HexJumpBehavior_InPlace and HexJumpBehavior_OpenNew.

HexJumpBehavior_OpenNew: Final[int]

Jumps to the hex view in a newly opened analysis view.

See also hexJump(), HexJumpBehavior_Auto and HexJumpBehavior_InPlace.

HexJumpType_Default: Final[int]

Jumps to the default hex view.

See also hexJump() and HexJumpType_Raw.

HexJumpType_Mask: Final[int]

Mask for the hex jump type.

See also hexJump(), HexJumpType_Default and HexJumpType_Raw.

HexJumpType_Raw: Final[int]

Jumps to the raw hex view.

See also hexJump() and HexJumpType_Default.

addView(view: Pro.UI.ProView, switch_to: bool = True)bool

Adds a view to the current workspace.

Parameters
  • view (ProView) – The view to add.

  • switch_to (bool) – If True, sets the focus to the added view.

Returns

Returns True if successful; otherwise returns False.

Return type

bool

See also createView() and ProView.

askParams(xml: str, key: str = str(), cb: Optional[object] = None, ud: Optional[object] = None)Pro.Core.NTIntVariantHash

Shows a property editor dialog.

Parameters
  • xml (str) – The XML schema used to create the property dialog (see ProPropertyEditor).

  • key (str) – The unique key for the settings. If this value is specified, the values for the property editor are saved and restored automatically.

  • cb (Optional[object]) – The callback for the property editor dialog.

  • ud (Optional[object]) – The user data which is passed to the callback.

Returns

Returns the values of the fields if successful; otherwise returns an empty Pro.Core.NTIntVariantHash.

Return type

NTIntVariantHash

See also ProPropertyEditor.

createDialog(view: Pro.UI.ProView)Pro.UI.ProDialog

Creates a dialog from a custom view.

Parameters

view (ProView) – The child custom view.

Returns

Returns the created dialog.

Return type

ProDialog

See also ProDialog and ProCustomView.

createView(type: int, title: str, flags: int = 0, icon: int = - 1)Pro.UI.ProView

Creates a view.

Parameters
  • type (int) – The type of view to create (e.g., ProView.Type_Text).

  • title (str) – The title of the view.

  • flags (int) – Reserved for future use.

  • icon (int) – The icon of the view (e.g., PubIcon_Text).

Returns

Returns the created view if successful; otherwise returns an invalid view.

Return type

ProView

See also addView() and ProView.

createViewFromWidget(widget: object)Pro.UI.ProView

Creates a view from a Qt widget.

This method was implemented to work with PySide and is now obsolete.

Parameters

widget (object) – The Qt widget.

Returns

Returns the created view if successful; otherwise returns an invalid view.

Return type

ProView

See also ProView.fromWidget() and createView().

createWorkspace(name: str, version: int = 0)Pro.UI.ProWorkspace

Creates a workspace.

Parameters
  • name (str) – The name of the workspace. This must be a unique name, since the settings of the workspace will be saved under this name.

  • version (int) – The version of the workspace. This version is used to decide whether the appearance of the workspace can be restored or not.

Returns

Returns the created workspace.

Return type

ProWorkspace

See also ProWorkspace.

findView(title: str)Pro.UI.ProView

Finds a view by its title.

Parameters

title (str) – The title of the view to find.

Returns

Returns the view if present; otherwise returns an invalid view.

Return type

ProView

See also ProView.

static fromView(view: Pro.UI.ProView)Pro.UI.ProContext

Retrieves the context from a view.

Parameters

view (ProView) – The view for which to retrieve the context.

Returns

Returns the context.

Return type

ProContext

getCurrentAnalysisView()Pro.UI.ProView
Returns

Returns the view of the current analysis view if any; otherwise returns an invalid view.

Return type

ProView

Available since Cerbero Suite 5.1 and Cerbero Engine 2.1.

See also getCurrentView() and ProView.

getCurrentView()Pro.UI.ProView
Returns

Returns the current view if any; otherwise returns an invalid view.

Return type

ProView

See also getCurrentAnalysisView() and ProView.

getCurrentWorkspace()Pro.UI.ProWorkspace
Returns

Returns the current workspace if available; otherwise returns an invalid workspace.

Return type

ProWorkspace

See also ProWorkspace.

getExistingDirectory(title: str = str(), dir: str = str())str

Asks the user to select a directory.

Parameters
  • title (str) – The title of the dialog.

  • dir (str) – The initial folder.

Returns

Returns the directory name if successful; otherwise returns an empty string.

Return type

str

See also getOpenFileName() and getSaveFileName().

getOpenFileName(title: str = str(), dir: str = str(), filter: str = str())str

Asks the user to select a file.

Parameters
  • title (str) – The title of the dialog.

  • dir (str) – The initial file or directory.

  • filter (str) – The file extension filter (e.g. "Text files (*.txt)").

Returns

Returns the file name if successful; otherwise returns an empty string.

Return type

str

See also getSaveFileName() and getExistingDirectory().

getPDBDownloadOptions(opt: Pro.UI.ProPDBDownloadOptions)bool

Retrieves the options for downloading PDB files.

Parameters

opt (ProPDBDownloadOptions) – The options to retrieve.

Returns

Returns True if successful; otherwise returns False.

Return type

bool

See also ProPDBDownloadOptions and Pro.Core.PDBAssociationInfo.

getSaveFileName(title: str = str(), dir: str = str(), filter: str = str())str

Asks the user where to save a file.

Parameters
  • title (str) – The title of the dialog.

  • dir (str) – The initial file or directory.

  • filter (str) – The file extension filter (e.g. "Text files (*.txt)").

Returns

Returns the file name if successful; otherwise returns an empty string.

Return type

str

See also getOpenFileName() and getExistingDirectory().

hexJump(offset: int, flags: int = 0)None

Jumps to a specified position in the main hex view for the file being analyzed.

Note

This method works only if called from the context of the analysis workspace.

Parameters
  • offset (int) – The offset at which to jump.

  • flags (int) – The options for the jump (e.g., HexJumpBehavior_OpenNew).

See also HexJumpBehavior_OpenNew and HexJumpType_Raw.

makeFileTitle(prefix: str)str

Creates a view title from the currently open file.

Parameters

prefix (str) – The prefix which comes before the name of the file.

Returns

Returns the created view title.

Return type

str

See also createView() and addView().

msgBox(type: int, caption: str, title: str = str())int

Shows a message box to the user.

If the UI is not available, a message is printed to the output.

Parameters
  • type (int) – The options for the message box (e.g., MBIconInfo).

  • caption (str) – The caption of the message box.

  • title (str) – The title of the message box.

Returns

Returns 1 if either the OK or Yes button have been pressed; otherwise returns 0. Alternatively, always returns 1 if the UI is not available.

Return type

int

See also MBIconInfo, MBIconWarn, MBYesNo and MBOkCancel.

openDirectoryInFileManager(path: str)None

Opens a directory using the system file manager.

Parameters

path (str) – The path of the directory to open.

See also openURL().

openURL(url: str)None

Opens a URL using the system web-browser.

Parameters

url (str) – The URL to open.

Available since Cerbero Suite 5.6 and Cerbero Engine 2.6.

See also openDirectoryInFileManager().

startWait(label: str, flags: int = 0)Pro.UI.ProWait

Shows a wait-dialog.

ProWait is the UI implementation of Pro.Core.NTIWait.

Parameters
Returns

Returns the handle to the created wait-dialog.

Return type

ProWait

See also Pro.Core.NTIWait.

class ProCustomView

Bases: Pro.UI.ProView

This class represents a custom view.

The notifications for this view are:

  • pvnInit - Emitted when the custom view is initialized.

  • pvnClose - Emitted when the custom view is destroyed.

  • pvnShow - Emitted when the custom view is shown to the user.

  • pvnIdle - Emitted when the custom view is processing idle notifications.

See also ProContext.createView().

Methods:

getView(id)

Retrieves a child view by its identifier.

setup(utf8[, cb, ud])

Initializes a custom view from a UI XML layout and sets its callback.

startIdleNotifications()

Starts the processing of idle notifications.

stopIdleNotifications()

Stops the processing of idle notifications.

getView(id: int)Pro.UI.ProView

Retrieves a child view by its identifier.

Parameters

id (int) – The child view identifier.

Returns

Returns the requested view if successful; otherwise returns an invalid view.

Return type

ProView

See also ProView.isValid().

setup(utf8: str, cb: Optional[object] = None, ud: Optional[object] = None)bool

Initializes a custom view from a UI XML layout and sets its callback.

Parameters
  • utf8 (str) – The UI XML layout.

  • cb (object) – The callback of the custom view.

  • ud (object) – The user data passed to the callback.

Returns

Returns True if successful; otherwise returns False.

Return type

bool

startIdleNotifications()None

Starts the processing of idle notifications.

Available since Cerbero Suite 5.2 and Cerbero Engine 2.2.

See also ProCustomView.stopIdleNotifications() and pvnIdle.

stopIdleNotifications()None

Stops the processing of idle notifications.

Available since Cerbero Suite 5.2 and Cerbero Engine 2.2.

See also ProCustomView.startIdleNotifications() and pvnIdle.

class ProDialog

Bases: Pro.UI.ProView

This class represents a dialog.

Dialogs are created around custom views:

from Pro.Core import *
from Pro.UI import *

c = NTContainer()
c.setData(b"Hello, world!")

ctx = proContext()
hv = ctx.createView(ProView.Type_Hex, "Title")
hv.setData(c)

dlg = ctx.createDialog(hv)
dlg.show()

The notifications for this view are:

Hint

The callback of the embedded custom view receives the notifications originating from the dialog.

See also ProContext.createDialog() and ProDialog.

Methods:

fromView(v)

Retrieves the dialog in which the specified view is contained.

show()

Shows the dialogs.

static fromView(v: Pro.UI.ProView)Pro.UI.ProDialog

Retrieves the dialog in which the specified view is contained.

Parameters

v (ProView) – The child view of the dialog.

Returns

Returns the parent dialog if successful; otherwise returns an invalid dialog.

Return type

ProDialog

show()int

Shows the dialogs.

Returns

Returns the return code of the dialog.

Return type

int

class ProDock

Bases: Pro.UI.ProView

This class represent a dock view of a workspace.

See also ProWorkspace.createDock() and ProWorkspace.createStdDock().

class ProGroupBox

Bases: Pro.UI.ProView

This class represents a group box control.

Available since Cerbero Suite 5.5 and Cerbero Engine 2.5.

See also ProCustomView.

Methods:

getGroupTitle()

Returns the title of the group box.

setGroupTitle(title)

Sets the title of the group box.

getGroupTitle()str
Returns

Returns the title of the group box.

Return type

str

See also setGroupTitle().

setGroupTitle(title: str)None

Sets the title of the group box.

Parameters

title (str) – The group box title.

See also getGroupTitle().

class ProHexView

Bases: Pro.UI.ProView

This class represents a hex view.

See also ProContext.createView() and ProCustomView.

Methods:

addressToOffset(address)

Converts an address to an offset.

getCurrentOffset()

Returns the current offset.

getCursorColumn()

Retrieves the cursor column.

getCursorOffset()

Returns the offset of the cursor if successful; otherwise returns Pro.Core.INVALID_STREAM_OFFSET.

getData()

Returns the data displayed by the hex view.

getSelectedRange()

Returns the selected range.

getSize()

Returns the size of the data displayed by the hex view.

layoutName()

Returns the name of the associated layout if available; otherwise returns an empty string.

offsetToAddress(offset)

Converts an offset to an address.

readBytes(offset, size)

Reads a range of data from the hex view.

setAnalysisDelta(delta)

Sets the analysis delta.

setBytes(bytes)

Sets the bytes to display in the hex view.

setCurrentOffset(offset)

Sets the current offset of the hex view.

setCursorOffset(offset[, column])

Sets the cursor offset and the column.

setData(data)

Sets the data to display in the hex view.

setDataResizable(b)

Sets whether or not the data displayed by the hex view is resizable.

setEditable(b)

Sets whether or not the data displayed by the hex view is editable.

setFileName(fname[, readonly])

Sets the file to display in the hex view.

setLayoutName(name)

Sets the associated layout.

setSelectedRange(offset, size)

Sets the selected range.

addressToOffset(address: int)int

Converts an address to an offset.

This method is to be used when the hex view displays non-contiguous data.

Parameters

address (int) – The address to convert.

Returns

Returns the converted offset if successful; otherwise returns Pro.Core.INVALID_STREAM_OFFSET.

Return type

int

See also offsetToAddress().

getCurrentOffset()int
Returns

Returns the current offset.

Return type

int

See also setCurrentOffset().

getCursorColumn()int

Retrieves the cursor column.

Available values are:

  • 1 - Offset column.

  • 2 - Hex column.

  • 3 - Ascii column.

Returns

Returns the cursor column.

Return type

int

See also getCursorOffset().

getCursorOffset()int
Returns

Returns the offset of the cursor if successful; otherwise returns Pro.Core.INVALID_STREAM_OFFSET.

Return type

int

See also getCursorColumn() and setCursorOffset().

getData()Pro.Core.NTContainer
Returns

Returns the data displayed by the hex view.

Return type

NTContainer

See also setData() and Pro.Core.NTContainer.

getSelectedRange()Pro.Core.NTOffsetRange
Returns

Returns the selected range.

Return type

NTOffsetRange

See also ProView.hasSelection() and setSelectedRange().

getSize()int
Returns

Returns the size of the data displayed by the hex view.

Return type

int

See also getData().

layoutName()str
Returns

Returns the name of the associated layout if available; otherwise returns an empty string.

Return type

str

See also setLayoutName() and Pro.Core.Layout.

offsetToAddress(offset: int)int

Converts an offset to an address.

This method is to be used when the hex view displays non-contiguous data.

Parameters

offset (int) – The offset to convert.

Returns

Returns the converted address if successful; otherwise returns Pro.Core.INVALID_STREAM_OFFSET.

Return type

int

See also addressToOffset().

readBytes(offset: int, size: int)bytes

Reads a range of data from the hex view.

Parameters
  • offset (int) – The start offset of the range to read.

  • size (int) – The size of the range to read.

Returns

Returns the requested bytes if successful; otherwise returns an empty bytes object.

Return type

bytes

See also getData().

setAnalysisDelta(delta: int)None

Sets the analysis delta.

When a hex view is shown inside of an analysis view (see Pro.Core.ScanProvider._scanViewData() and Pro.Core.ScanProvider._formatViewData()) and displays a portion of the file being analyzed, this method can be called to let the view know that the displayed data is a portion of the main file/object.

The delta represents the start offset of the displayed data relative to the file/object being analyzed.

By calling this function, the hex view will automatically allow the loading of embedded child objects.

Parameters

delta (int) – The start offset of the data relative to the file/object being analyzed.

See also Pro.Core.ScanProvider._scanViewData() and Pro.Core.ScanProvider._formatViewData().

setBytes(bytes: bytes)bool

Sets the bytes to display in the hex view.

This is a convenience function which internally calls setData().

Parameters

bytes (bytes) – The bytes to display.

Returns

Returns True if successful; otherwise returns False.

Return type

bool

See also setData().

setCurrentOffset(offset: int)None

Sets the current offset of the hex view.

Parameters

offset (int) – The offset to set.

See also getCurrentOffset().

setCursorOffset(offset: int, column: int = - 1)None

Sets the cursor offset and the column.

If the column is not specified, this method will preserve the current column.

Possible values for the column are:

  • 1 - Offset column.

  • 2 - Hex column.

  • 3 - Ascii column.

Parameters
  • offset (int) – The offset to set.

  • column (int) – The column to set.

See also getCursorOffset().

setData(data: Pro.Core.NTContainer)None

Sets the data to display in the hex view.

Parameters

data (NTContainer) – The data to display.

See also getData(), setBytes(), setFileName() and Pro.Core.NTContainer.

setDataResizable(b: bool)None

Sets whether or not the data displayed by the hex view is resizable.

By default the data is not resizable.

Parameters

b (bool) – If True, the data will be resizable; otherwise it will not be resizable.

See also setData() and setEditable().

setEditable(b: bool)None

Sets whether or not the data displayed by the hex view is editable.

By default the data is not editable.

Parameters

b (bool) – If True, the data will be editable; otherwise it will be read-only.

See also setData() and setDataResizable().

setFileName(fname: str, readonly: bool = True)bool

Sets the file to display in the hex view.

This is a convenience function which internally calls setData().

Parameters
  • fname (str) – The name of the file to display.

  • readonly (bool) – If True, the file will not be editable; otherwise it will be editable.

Returns

Returns True if successful; otherwise returns False.

Return type

bool

See also setData().

setLayoutName(name: str)None

Sets the associated layout.

Parameters

name (str) – The name of the layout to set.

See also layoutName() and Pro.Core.Layout.

setSelectedRange(offset: int, size: int)bool

Sets the selected range.

Parameters
  • offset (int) – The start offset of the range.

  • size (int) – The size of the range.

Returns

Returns True if successful; otherwise returns False.

Return type

bool

See also getSelectedRange() and ProView.hasSelection().

class ProInput

This class provides additional common dialogs to those provided by ProContext.

See also ProContext.

Methods:

askList(list, title[, deflt, label])

Asks the user to choose an item from a list of provided items.

askText(title[, text, label, history_name])

Asks the user to insert a text value.

askTextEx(dflt, title[, text, label, …])

Asks the user to insert a text value.

askValue(title[, label, min, max, history_name])

Asks the user to insert a numeric value.

askValueEx(deflt, radix, title[, label, …])

Asks the user to insert a numeric value.

static askList(list: Pro.Core.NTStringList, title: str, deflt: int = - 1, label: str = str())int

Asks the user to choose an item from a list of provided items.

Example:

from Pro.Core import NTStringList
from Pro.UI import *

items = NTStringList()
for item in ("a", "b", "c"):
    items.append(item)

i = ProInput.askList(items, "Choose an item...")
if i != -1:
    print(items.at(i))
Parameters
  • list (NTStringList) – The list of items to choose from.

  • title (str) – The title of the dialog.

  • deflt (int) – The index of the initially selected item.

  • label (str) – The label of the dialog. Reserved for future use.

Returns

Returns the index of the selected item if successful; otherwise returns -1.

Return type

int

static askText(title: str, text: str = str(), label: str = str(), history_name: str = str())Optional[str]

Asks the user to insert a text value.

Hint

The difference between askText() and askTextEx() is that with the latter it is possible to specify a default value.

Parameters
  • title (str) – The title of the dialog.

  • text (str) – The text of the dialog. Reserved for future use.

  • label (str) – The label of the dialog. Reserved for future use.

  • history_name (str) – The history key for the value.

Returns

Returns the inserted text if successful; otherwise returns None.

Return type

Union[str, None]

See also askTextEx().

static askTextEx(dflt: str, title: str, text: str = str(), label: str = str(), history_name: str = str())Optional[str]

Asks the user to insert a text value.

Hint

The difference between askText() and askTextEx() is that with the latter it is possible to specify a default value.

Parameters
  • dflt (str) – The default input value.

  • title (str) – The title of the dialog.

  • text (str) – The text of the dialog. Reserved for future use.

  • label (str) – The label of the dialog. Reserved for future use.

  • history_name (str) – The history key for the value.

Returns

Returns the inserted text if successful; otherwise returns None.

Return type

Union[str, None]

See also askText().

static askValue(title: str, label: str = str(), min: int = int(), max: int = int(), history_name: str = str())Optional[int]

Asks the user to insert a numeric value.

Hint

The difference between askValue() and askValueEx() is that with the latter it is possible to specify a default value and the radix of the value.

Parameters
  • title (str) – The title of the dialog.

  • label (str) – The label of the dialog. Reserved for future use.

  • min (int) – The minimum allowed input value.

  • max (int) – The maximum allowed input value.

  • history_name (str) – The history key for the value.

Returns

Returns the inserted value if successful; otherwise returns None.

Return type

Union[int, None]

See also askValueEx().

static askValueEx(deflt: int, radix: int, title: str, label: str = str(), min: int = int(), max: int = int(), history_name: str = str())Optional[int]

Asks the user to insert a numeric value.

Hint

The difference between askValue() and askValueEx() is that with the latter it is possible to specify a default value and the radix of the value.

Parameters
  • deflt (int) – The default input value.

  • radix (int) – The radix of the value.

  • title (str) – The title of the dialog.

  • label (str) – The label of the dialog. Reserved for future use.

  • min (int) – The minimum allowed input value.

  • max (int) – The maximum allowed input value.

  • history_name (str) – The history key for the value.

Returns

Returns the inserted value if successful; otherwise returns None.

Return type

Union[int, None]

See also askValue().

class ProLabel

Bases: Pro.UI.ProView

This class represents a label control.

Available since Cerbero Suite 5.1 and Cerbero Engine 2.1.

See also ProCustomView.

Methods:

setAlignment(alignment)

Sets the alignment for the contents of the label.

setIconSize(size)

Sets the size of the icon.

setLabelIcon(icon)

Sets the icon for the label.

setText(txt)

Sets the text of the label.

text()

Returns the text of the label.

setAlignment(alignment: int)None

Sets the alignment for the contents of the label.

Parameters

alignment (int) – The alignment to set (see ProAlign).

See also ProAlign.

setIconSize(size: Pro.UI.ProUISize)None

Sets the size of the icon.

Parameters

size (ProUISize) – The icon size.

See also setLabelIcon().

setLabelIcon(icon: int)None

Sets the icon for the label.

Parameters

icon (int) – The icon identifier. This can be a predefined icon (e.g., PubIcon_Text) or a custom icon (see proAddPublicIcon()).

See also setIconSize() and proAddPublicIcon().

setText(txt: str)None

Sets the text of the label.

Parameters

txt (str) – The text to set.

See also text().

text()str
Returns

Returns the text of the label.

Return type

str

See also setText().

ProLeftToolBarArea: Final[int]

Left tool-bar area.

See also meth:ProWorkspace.addToolBar.

class ProMediaView

Bases: Pro.UI.ProView

This class represents a media view.

The purpose of media views is to present images in a safe way to the user.

See also ProCustomView.

Attributes:

MediaType_Image

Image media type.

MediaType_Unknown

Unknown media type.

Methods:

addImageFromBytes(bytes[, format])

Adds an image to the view from a byte-array.

addImageFromFile(fname[, format])

Adds an image to the view from a file.

isReady()

Returns True if the view is ready to be presented to the user; otherwise returns False.

mediaType()

Returns the current media type (e.g., MediaType_Image).

setReady(b)

Marks the view ready to be presented to the user.

MediaType_Image: Final[int]

Image media type.

See also mediaType().

MediaType_Unknown: Final[int]

Unknown media type.

See also mediaType().

addImageFromBytes(bytes: bytes, format: str = str())bool

Adds an image to the view from a byte-array.

Parameters
  • bytes (bytes) – The byte-array containing the image.

  • format (str) – The format of the image.

Returns

Returns True if successful; otherwise returns False.

Return type

bool

See also addImageFromFile().

addImageFromFile(fname: str, format: str = str())bool

Adds an image to the view from a file.

Parameters
  • fname (str) – The file name of the image.

  • format (str) – The format of the image.

Returns

Returns True if successful; otherwise returns False.

Return type

bool

See also addImageFromBytes().

isReady()bool
Returns

Returns True if the view is ready to be presented to the user; otherwise returns False.

Return type

bool

See also setReady().

mediaType()int
Returns

Returns the current media type (e.g., MediaType_Image).

Return type

int

setReady(b: bool)None

Marks the view ready to be presented to the user.

Parameters

b (bool) – If True, marks the view ready to be presented to the user.

See also isReady().

class ProMenu

This class represents a UI menu.

See also pvnContextMenu, ProMenuBar and ProUIAction.

Methods:

addAction(action)

Adds a UI action to the menu.

addCopyAction(action)

Adds a copy action to the menu.

addSeparator()

Adds a separator to the menu.

isNull()

Returns True if the menu is invalid; otherwise returns False.

addAction(action: Pro.UI.ProUIAction)None

Adds a UI action to the menu.

Parameters

action (ProUIAction) – The action to add.

See also addSeparator() and addCopyAction().

addCopyAction(action: Pro.UI.ProUIAction)None

Adds a copy action to the menu.

The characteristics of copy actions is that they are grouped together with the default copy action of the view.

Parameters

action (ProUIAction) – The action to add.

See also addAction() and addSeparator().

addSeparator()None

Adds a separator to the menu.

See also addAction() and addCopyAction().

isNull()bool
Returns

Returns True if the menu is invalid; otherwise returns False.

Return type

bool

class ProMenuBar

This class represents a menu-bar.

Only workspaces can have menu-bars (see ProWorkspace).

See also ProWorkspace, ProMenu and ProUIAction.

Methods:

addAction(action)

Adds a UI action to the menu-bar.

addMenu(title)

Adds a sub-menu to the menu-bar.

addSeparator()

Adds a separator to the menu-bar.

clear()

Clears the menu-bar.

isNull()

Returns True if the menu-bar is invalid; otherwise returns False.

addAction(action: Pro.UI.ProUIAction)None

Adds a UI action to the menu-bar.

Parameters

action (ProUIAction) – The action to add.

See also addSeparator() and addMenu().

addMenu(title: str)Pro.UI.ProMenu

Adds a sub-menu to the menu-bar.

Parameters

title (str) – The title of the sub-menu.

Returns

Returns the sub-menu.

Return type

ProMenu

See also addAction() and addSeparator().

addSeparator()None

Adds a separator to the menu-bar.

See also addAction() and addMenu().

clear()None

Clears the menu-bar.

isNull()bool
Returns

Returns True if the menu-bar is invalid; otherwise returns False.

Return type

bool

ProNoToolBarArea: Final[int]

Invalid tool-bar area.

See also meth:ProWorkspace.addToolBar.

class ProPDBDownloadOptions

This class contains the options to download PDB files.

See also ProContext.getPDBDownloadOptions() and Pro.Core.PDBAssociationInfo.

Attributes:

path

The download path for the PDB files.

server

The server from which to retrieve the PDB files.

path

The download path for the PDB files.

server

The server from which to retrieve the PDB files.

class ProPlotView

Bases: Pro.UI.ProView

This class represents a plot view.

The notifications for this view are:

See also ProCustomView.

Attributes:

FileSize

Scale type for file sizes.

xBottom

Bottom axis.

xTop

Top axis.

yLeft

Left axis.

yRight

Right axis.

Methods:

addCurve(x, y)

Adds a curve to the plot.

enablePointSelection([b])

Enables point selection.

getPlotTitle()

Returns the title of the plot.

setAxisScale(axis, min, max[, step, type])

Sets up the scale and type of an axis.

setPlotTitle(title)

Sets the title of the plot.

FileSize: Final[int]

Scale type for file sizes.

See also setAxisScale().

addCurve(x: Pro.Core.NTDoubleVector, y: Pro.Core.NTDoubleVector)None

Adds a curve to the plot.

Parameters

See also setAxisScale().

enablePointSelection(b: bool = True)None

Enables point selection.

If enabled, the associated custom view callback receives pvnPlotPointSelected notifications.

Parameters

b (bool) – If True, enables point selection.

See also pvnPlotPointSelected.

getPlotTitle()str
Returns

Returns the title of the plot.

Return type

str

See also setPlotTitle().

setAxisScale(axis: int, min: float, max: float, step: float = 0, type: int = 0)None

Sets up the scale and type of an axis.

Parameters
  • axis (int) – The axis to set up (e.g., xBottom).

  • min (float) – The minimum size.

  • max (float) – The maximum size.

  • step (float) – The step size.

  • type (int) – The type of the scale (e.g., FileSize).

See also addCurve().

setPlotTitle(title: str)None

Sets the title of the plot.

Parameters

title (str) – The title to set.

See also getPlotTitle().

xBottom: Final[int]

Bottom axis.

See also setAxisScale().

xTop: Final[int]

Top axis.

See also setAxisScale().

yLeft: Final[int]

Left axis.

See also setAxisScale().

yRight: Final[int]

Right axis.

See also setAxisScale().

class ProProgressBar

Bases: Pro.UI.ProView

This class represents a progress bar control.

Available since Cerbero Suite 5.2 and Cerbero Engine 2.2.

See also ProCustomView.

Methods:

isTextVisible()

Returns True if the text of the progress bar is visible; otherwise returns False.

setRange(minimum, maximum)

Sets the range of the progress bar.

setTextVisible(visible)

Sets the visibility of the progress bar text.

setValue(value)

Sets the current value of the progress bar.

text()

Returns the text of the progress bar.

isTextVisible()bool
Returns

Returns True if the text of the progress bar is visible; otherwise returns False.

Return type

bool

See also setTextVisible().

setRange(minimum: int, maximum: int)None

Sets the range of the progress bar.

Parameters
  • minimum (int) – The minimum value of the progress bar. Defaults to 0.

  • maximum (int) – The maximum value of the progress bar. Defaults to 100.

See also setValue().

setTextVisible(visible: bool)None

Sets the visibility of the progress bar text.

Parameters

visible (bool) – If True, makes the progress bar text visible; otherwise hides the text.

See also isTextVisible().

setValue(value: int)None

Sets the current value of the progress bar.

Parameters

value (int) – The value to set.

See also setRange().

text()str
Returns

Returns the text of the progress bar.

Return type

str

class ProPropertyEditor

Bases: Pro.UI.ProView

This class represents a property editor dialog.

The property editor dialog is shown by calling ProContext.askParams().

Example:

from Pro.Core import *
from Pro.UI import *

# the schema of the property editor
xml = """
<peditor title="Settings">
  <section label="General">
    <property id="0" label="Name" type="edit" value="object" />
    <property id="1" label="Size" type="static" value="(0,0)">
        <property id="2" label="Width" type="integer" value="0" signed="false" radix="10" align="0" maxbits="16" />
        <property id="3" label="Height" type="integer" value="0" signed="false" radix="10" align="0" maxbits="16" />
    </property>
  </section>

  <section label="Options">
    <property id="4" label="Word wrap" type="check" value="false" />
    <property id="5" label="Syntax" type="combo" value="1">
      <list>
        <i>JavaScript</i>
        <i>C++</i>
        <i>Pascal</i>
      </list>
    </property>
  </section>

  <section label="Files">
    <property id="6" label="Open file" type="open-file" value="C:\\test.txt" />
    <property id="7" label="Save file" type="save-file" value="C:\\test2.txt" />
    <property id="8" label="Select directory" type="open-directory" value="C:\\temp" />
  </section>

  <section label="Content">
    <property id="9" label="Text" type="text">
        <value>This \tis a\nsample text</value>
    </property>
  </section>

  <section id="20" label="Numbers">
    <property id="10" label="Base address" type="integer" value="401000" signed="false" radix="16" align="8" />
    <property id="11" label="Char" type="integer" value="127" signed="true" radix="10" align="0" maxbits="8" />
  </section>

</peditor>"""

def updateSize(pe):
    sz = "(" + str(pe.getValue(2)) + "," + str(pe.getValue(3)) + ")"
    pe.setValue(1, sz)

# the callback for the property editor
def paramsCallback(pe, id, userdata):
    print("changed: " + str(id) + " value: " + str(pe.getValue(id)))
    if id == ProPropertyEditor.Notification_Init:
        updateSize(pe)
    elif id == 2 or id == 3:
        updateSize(pe)
        pe.setValue(0, "test2")
        pe.setValue(5, 2)
        pe.setValue(10, 0x2000)
    elif id == 4:
        b = not pe.isVisible(20)
        pe.setVisible(20, b)
        # set or clear some errors to demonstrate how it works
        if not b:
            errors = NTIntList()
            for e in (6, 7):
                errors.append(e)
            pe.setErrors(errors)
        else:
            pe.clearErrors()
    return True

# show a property editor dialog
params = proContext().askParams(xml, "Test", paramsCallback, None)
# print out the returned values
it = params.iterator()
while it.hasNext():
    it.next()
    print("key:", str(it.key()), "value:", str(it.value()))

See also ProContext.askParams().

Attributes:

Notification_Close

Closing notification code.

Notification_Init

Initialization notification code.

Notification_MultiEditSetup

Multi-line text view setup notification code.

Notification_PreInit

This notification code is reserved for future use.

Methods:

clearErrors()

Clears the errors set by setErrors().

currentMultiEditId()

Returns the id of the multi-line text view presented to the user.

currentMultiEditView()

Returns the multi-line text view presented to the user.

getStringValue(id)

Retrieves the value of a field as a string.

getValue(id)

Retrieves the value of a field.

isEnabled(id)

Returns the enabled status of a field of the property editor.

isVisible(id)

Returns the visibility status of a field of the property editor.

setEnabled(id, b)

Sets the enabled status for a field of the property editor.

setErrors(ids)

Sets the errors for the property editor.

setExtensions(id, ext)

Sets the allowed file extensions for an open/save file field.

setStringValue(id, value)

Sets the value of a field of the property editor as a string.

setValue(id, value)

Sets the value of a field of the property editor.

setVisible(id, b)

Sets the visibility of a field of the property editor.

Notification_Close: Final[int]

Closing notification code.

See also Notification_Init.

Notification_Init: Final[int]

Initialization notification code.

See also Notification_Close.

Notification_MultiEditSetup: Final[int]

Multi-line text view setup notification code.

Available since Cerbero Suite 5.4 and Cerbero Engine 2.4.

See also currentMultiEditId() and currentMultiEditView().

Notification_PreInit: Final[int]

This notification code is reserved for future use.

See also Notification_Init and Notification_Close.

clearErrors()None

Clears the errors set by setErrors().

See also setErrors().

currentMultiEditId()int
Returns

Returns the id of the multi-line text view presented to the user.

Return type

int

Available since Cerbero Suite 5.4 and Cerbero Engine 2.4.

See also Notification_MultiEditSetup and currentMultiEditView().

currentMultiEditView()Pro.UI.ProView
Returns

Returns the multi-line text view presented to the user.

Return type

ProView

Available since Cerbero Suite 5.4 and Cerbero Engine 2.4.

See also Notification_MultiEditSetup and currentMultiEditId().

getStringValue(id: int)Optional[str]

Retrieves the value of a field as a string.

Parameters

id (int) – The id of the field for which to retrieve the value.

Returns

Returns the value of the field if successful; otherwise returns None.

Return type

Union[str, None]

See also setStringValue() and getValue().

getValue(id: int)Optional[Union[int, float, bool, bytes, str]]

Retrieves the value of a field.

Parameters

id (int) – The id of the field for which to retrieve the value.

Returns

Returns the value of the field if successful; otherwise returns None.

Return type

BasicType

See also setValue() and getStringValue().

isEnabled(id: int)bool

Returns the enabled status of a field of the property editor.

Parameters

id (int) – The id of the field.

Returns

Returns True if the field is enabled; otherwise returns False.

Return type

bool

See also setEnabled() and isVisible().

isVisible(id: int)bool

Returns the visibility status of a field of the property editor.

Parameters

id (int) – The id of the field.

Returns

Returns True if the field is visible; otherwise returns False.

Return type

bool

See also setVisible() and isEnabled().

setEnabled(id: int, b: bool)None

Sets the enabled status for a field of the property editor.

Parameters
  • id (int) – The id of the field for which to set the enabled status.

  • b (bool) – If False, disables the field.

See also isEnabled() and setVisible().

setErrors(ids: Pro.Core.NTIntList)None

Sets the errors for the property editor.

This method highlights the specified fields with the default error color.

Parameters

ids (NTIntList) – The list of field ids to highlight with the error color.

See also clearErrors().

setExtensions(id: int, ext: str)None

Sets the allowed file extensions for an open/save file field.

Parameters
  • id (int) – The id of the open/save file field.

  • ext (str) – The allowed extensions (e.g., "Images (*.png *.jpg *.bmp)").

See also setValue().

setStringValue(id: int, value: str)bool

Sets the value of a field of the property editor as a string.

Parameters
  • id (int) – The id of the field for which to set the value.

  • value (str) – The value to set.

Returns

Returns True if successful; otherwise returns False.

Return type

bool

See also getStringValue() and setValue().

setValue(id: int, value: Optional[Union[int, float, bool, bytes, str]])bool

Sets the value of a field of the property editor.

Parameters
  • id (int) – The id of the field for which to set the value.

  • value (BasicType) – The value to set.

Returns

Returns True if successful; otherwise returns False.

Return type

bool

See also getValue() and setStringValue().

setVisible(id: int, b: bool)None

Sets the visibility of a field of the property editor.

Parameters
  • id (int) – The id of the field for which to set the visibility.

  • b (bool) – If False, hides the field.

See also isVisible() and setEnabled().

class ProPushButton

Bases: Pro.UI.ProView

This class represents a button control.

The notifications for this control are:

See also ProCustomView().

Methods:

setButtonIcon(icon)

Sets the icon for the button.

setText(txt)

Sets the button text.

text()

Returns the button text.

setButtonIcon(icon: int)None

Sets the icon for the button.

Parameters

icon (int) – The icon identifier. This can be a predefined icon (e.g., PubIcon_Text) or a custom icon (see proAddPublicIcon()).

Available since Cerbero Suite 5.0 and Cerbero Engine 2.0.

See also proAddPublicIcon().

setText(txt: str)None

Sets the button text.

Parameters

txt (str) – The button text.

See also text().

text()str
Returns

Returns the button text.

Return type

str

See also setText().

ProRightToolBarArea: Final[int]

Right tool-bar area.

See also meth:ProWorkspace.addToolBar.

class ProTabBar

Bases: Pro.UI.ProView

This class represents a tab bar.

The notifications for this control are:

Available since Cerbero Suite 5.0 and Cerbero Engine 2.0.

See also ProCustomView.

Methods:

currentTab()

Returns the index of the current tab.

setCurrentTab(i)

Sets the index of the current tab.

currentTab()int
Returns

Returns the index of the current tab.

Return type

int

See also setCurrentTab().

setCurrentTab(i: int)None

Sets the index of the current tab.

Parameters

i (int) – The tab index.

See also currentTab().

class ProTableView

Bases: Pro.UI.ProView

This class represents a table view.

Hint

The difference with ProCellTableView is that table views are optimized for having many rows and a limited number of columns, while cell table views are not as fast as table views, but they can have as many columns as rows.

The notifications for this view are:

See also ProCustomView and ProCellTableView.

Methods:

displayFlags(fl, value, title)

Shows the flags dialog box for a specific value.

getColumnCount()

Returns the number of columns in the table.

getColumnDelta()

Returns the column delta.

getColumnLabels()

Returns the column labels.

getColumnWidth(col)

Retrieves the width of a column.

getItemText(row, column)

Retrieves the text of a table item.

getPosition()

Returns the vertical scroll position of the table.

getRowCount()

Returns the number of rows in the table.

getSQLColumns()

Retrieves the SQL columns displayed by the table which were specified when setSQLTable() was called.

getSQLCondition()

Retrieves the SQL condition used to filter the rows displayed by the table which was specified when setSQLTable() was called.

getSQLTable()

Returns the currently selected SQL table if any; otherwise returns an empty string.

getSelectedColumn()

Returns the selected column if successful; otherwise returns Pro.Core.INVALID_STREAM_OFFSET.

getSelectedRow()

Returns the selected row if successful; otherwise returns Pro.Core.INVALID_STREAM_OFFSET.

getSelectedText()

Returns the text of the selected item if any; otherwise returns None.

getStruct()

Returns the structure displayed by the table if present; otherwise returns an invalid structure.

isSQLTableView()

Returns True if this is a SQL table view; otherwise returns False.

setColumnCWidth(col, cw)

Sets the width of a column in characters.

setColumnCount(columns)

Sets the column count for the table.

setColumnDelta(cd)

Sets the number of initial reserved columns.

setColumnLabels(labels)

Sets the labels for the columns of the table.

setColumnWidth(col, w)

Sets the width of a column in pixels.

setPosition(pos)

Sets the vertical scroll position of the table.

setRowCount(rows)

Sets the row count for the table.

setSQLTable(table[, columns, condition])

Specifies the SQL table to display in the table.

setSQLTableSelectVisible(b)

Sets whether the control to choose which table to display from the database is visible to the user.

setSQLite3Object(obj)

Sets a SQLite3 object instance as the database of the table view.

setSelectedRow(row[, ensure_visible])

Sets the selected row.

setSelection(row, column[, ensure_visible])

Sets the current item selection.

setStruct(s[, mcount])

Sets the structure to be displayed by the table.

updateColumnsWidth()

Resizes the columns according to the width of their labels.

displayFlags(fl: Pro.Core.CFFFlags, value: int, title: str)None

Shows the flags dialog box for a specific value.

Parameters
  • fl (CFFFlags) – The flags information structure.

  • value (int) – The flag value.

  • title (str) – The title of the dialog box.

See also Pro.Core.CFFFlags.

getColumnCount()int
Returns

Returns the number of columns in the table.

Return type

int

See also setColumnCount() and getRowCount().

getColumnDelta()int
Returns

Returns the column delta.

Return type

int

See also setColumnDelta().

getColumnLabels()Pro.Core.NTStringList
Returns

Returns the column labels.

Return type

NTStringList

See also setColumnLabels() and Pro.Core.NTStringList.

getColumnWidth(col: int)int

Retrieves the width of a column.

Parameters

col (int) – The column index.

Returns

Returns the column width if successful; otherwise returns 0.

Return type

int

See also setColumnWidth() and setColumnCWidth().

getItemText(row: int, column: int)str

Retrieves the text of a table item.

Parameters
  • row (int) – The table item row.

  • column (int) – The table item column.

Returns

Returns the table item text if successful; otherwise returns an empty string.

Return type

str

getPosition()int
Returns

Returns the vertical scroll position of the table.

Return type

int

See also setPosition().

getRowCount()int
Returns

Returns the number of rows in the table.

Return type

int

See also setRowCount() and getColumnCount().

getSQLColumns()str

Retrieves the SQL columns displayed by the table which were specified when setSQLTable() was called.

Important

This method can only be called on SQL table views.

Returns

Returns the SQL columns string.

Return type

str

See also setSQLTable() and getSQLCondition().

getSQLCondition()str

Retrieves the SQL condition used to filter the rows displayed by the table which was specified when setSQLTable() was called.

Important

This method can only be called on SQL table views.

Returns

Returns the SQL condition string.

Return type

str

See also setSQLTable() and getSQLColumns().

getSQLTable()str
Returns

Returns the currently selected SQL table if any; otherwise returns an empty string.

Return type

str

See also setSQLTable() and setSQLTableSelectVisible().

getSelectedColumn()int
Returns

Returns the selected column if successful; otherwise returns Pro.Core.INVALID_STREAM_OFFSET.

Return type

int

See also getSelectedRow(), setSelection() and setSelectedRow().

getSelectedRow()int
Returns

Returns the selected row if successful; otherwise returns Pro.Core.INVALID_STREAM_OFFSET.

Return type

int

See also getSelectedColumn(), setSelection() and setSelectedRow().

getSelectedText()Optional[str]
Returns

Returns the text of the selected item if any; otherwise returns None.

Return type

bool

See also ProView.hasSelection(), getSelectedColumn() and getSelectedRow().

getStruct()Pro.Core.CFFStruct
Returns

Returns the structure displayed by the table if present; otherwise returns an invalid structure.

Return type

CFFStruct

See also setStruct() and Pro.Core.CFFStruct.

isSQLTableView()bool
Returns

Returns True if this is a SQL table view; otherwise returns False.

Return type

bool

See also setSQLite3Object() and setSQLTable().

setColumnCWidth(col: int, cw: int)None

Sets the width of a column in characters.

Parameters
  • col (int) – The column index.

  • cw (int) – The width to set.

See also setColumnWidth(), getColumnWidth() and updateColumnsWidth().

setColumnCount(columns: int)None

Sets the column count for the table.

Parameters

columns (int) – The number of columns to set.

See also getColumnCount() and setRowCount().

setColumnDelta(cd: int)None

Sets the number of initial reserved columns.

When used in conjunction with setStruct(), this method reserves a number of initial columns for own use. This is especially useful when the Pro.Core.CFFStruct instance represents an array of structures: by calling this method it is possible to show additional information in the initial columns of the table.

Parameters

cd (int) – The number of columns to reserver for own use.

See also setStruct().

setColumnLabels(labels: Pro.Core.NTStringList)None

Sets the labels for the columns of the table.

Parameters

labels (NTStringList) – The column labels to set.

See also getColumnLabels(), updateColumnsWidth() and Pro.Core.NTStringList.

setColumnWidth(col: int, w: int)None

Sets the width of a column in pixels.

Parameters
  • col (int) – The column index.

  • w (int) – The width to set.

See also setColumnCWidth(), getColumnWidth() and updateColumnsWidth().

setPosition(pos: int)None

Sets the vertical scroll position of the table.

Parameters

pos (int) – The position to set.

See also getPosition().

setRowCount(rows: int)None

Sets the row count for the table.

Parameters

rows (int) – The number of rows to set.

See also getRowCount() and setColumnCount().

setSQLTable(table: str, columns: str = str(), condition: str = str())bool

Specifies the SQL table to display in the table.

Important

This method can only be called on SQL table views.

Parameters
  • table (str) – The table to display.

  • columns (str) – The columns to display. The column names must be comma-separated.

  • condition (str) – The SQL condition to filter the rows to display.

Returns

Returns True if successful; otherwise returns False.

Return type

bool

See also setSQLTableSelectVisible() and setSQLite3Object().

setSQLTableSelectVisible(b: bool)None

Sets whether the control to choose which table to display from the database is visible to the user.

Important

This method can only be called on SQL table views.

Parameters

b (bool) – If True, shows the table choose control to the user. By default, the control is hidden.

See also setSQLTable() and setSQLite3Object().

setSQLite3Object(obj: Pro.Core.CFFObject)None

Sets a SQLite3 object instance as the database of the table view.

Important

This method can only be called on SQL table views.

Parameters

obj (CFFObject) – The SQLite3 object instance.

See also setSQLTableSelectVisible() and setSQLTable().

setSelectedRow(row: int, ensure_visible: bool = True)None

Sets the selected row.

The difference with setSelection() is that this method doesn’t change the focused column.

Parameters
  • row (int) – The row to select.

  • ensure_visible (bool) – If True, ensures that the row is visible.

See also setSelection(), getSelectedRow() and getSelectedColumn().

setSelection(row: int, column: int, ensure_visible: bool = True)None

Sets the current item selection.

Parameters
  • row (int) – The row of the item to select.

  • column (int) – The column of the item to select.

  • ensure_visible (bool) – If True, ensures that the item is visible.

See also setSelectedRow(), getSelectedRow() and getSelectedColumn().

setStruct(s: Pro.Core.CFFStruct, mcount: int = - 1)None

Sets the structure to be displayed by the table.

The Pro.Core.CFFStruct() can represent both a single structure as well as an array of structures.

Parameters
  • s (CFFStruct) – The structure or array of structures to display.

  • mcount (int) – The maximum of entries to show in case of an array of structures.

See also getStruct(), Pro.Core.CFFStruct and setColumnDelta().

updateColumnsWidth()None

Resizes the columns according to the width of their labels.

See also setColumnLabels().

class ProTextBrowserView

Bases: Pro.UI.ProView

This class represents a text browser.

The methods of this class are not yet exposed to the SDK.

See also ProCustomView.

class ProTextLine

Bases: Pro.UI.ProView

This class represents a text line control.

The notifications for this control are:

See also ProCustomView.

Methods:

setText(text)

Sets the text of the control.

text()

Returns the text of the control.

setText(text: str)None

Sets the text of the control.

Parameters

text (str) – The text to set.

See also text().

text()str
Returns

Returns the text of the control.

Return type

str

See also setText().

class ProTextView

Bases: Pro.UI.ProView

This class represents a text view.

See also ProContext.createView() and ProCustomView.

Methods:

disasmOptions()

Returns the current disassembly options for the view (e.g., Pro.Core.DisasmOpt_Opcodes).

getCursorPosition()

Returns the position of the text cursor.

getSelectedText()

Returns the selected text if successful; otherwise returns None.

getSelectionSize()

Returns the size of the selected text.

getSelectionStart()

Returns the start position of the selected text.

getText()

Returns the text of the view if successful; otherwise returns None.

setCursorPosition(pos)

Sets the position of the text cursor.

setDisasmOptions(options)

Sets the current disassembly options for the view.

setLanguage(name)

Sets the highlighting rules for the text.

setSelectedText(text)

Inserts text at the current cursor position and replaces selected text.

setSelection(pos, size)

Sets the text selection.

setText(text_or_text_stream)

Sets the text of the view.

setUndoableText(text)

Sets the text of the view.

disasmOptions()int
Returns

Returns the current disassembly options for the view (e.g., Pro.Core.DisasmOpt_Opcodes).

Return type

int

See also setDisasmOptions().

getCursorPosition()int
Returns

Returns the position of the text cursor.

Return type

int

See also setCursorPosition().

getSelectedText()Optional[str]
Returns

Returns the selected text if successful; otherwise returns None.

Return type

Union[str, None]

See also setSelectedText() and setSelection().

getSelectionSize()int
Returns

Returns the size of the selected text.

Return type

int

See also getSelectionStart(), setSelection() and ProView.hasSelection().

getSelectionStart()int
Returns

Returns the start position of the selected text.

Return type

int

See also getSelectionSize(), setSelection() and ProView.hasSelection().

getText()Optional[str]
Returns

Returns the text of the view if successful; otherwise returns None.

Return type

Union[str, None]

See also getSelectedText(), setText() and setUndoableText().

setCursorPosition(pos: int)None

Sets the position of the text cursor.

Parameters

pos (int) – The position to set.

See also getCursorPosition().

setDisasmOptions(options: int)None

Sets the current disassembly options for the view.

Parameters

options (int) – The disassembly options to set (e.g., Pro.Core.DisasmOpt_Opcodes).

See also disasmOptions().

setLanguage(name: str)None

Sets the highlighting rules for the text.

Currently supported languages are:

  • ActionScript2 - Highlighting for Adobe ActionScript2.

  • ActionScript3 - Highlighting for Adobe ActionScript3.

  • C/C++ - Highlighting for both C and C++.

  • Dalvik - Highlighting for Android Dalvik byte-code.

  • JavaByteCode - Highlighting for Java byte-code.

  • JavaScript - Highlighting for JavaScript.

  • Lua - Highlighting for Lua.

  • MachODyld - Highlighting for Mach-O dyld byte-code.

  • MSIL - Highlighting for .NET MSIL byte-code.

  • Python - Highlighting for Python.

  • TrueType - Highlighting for TrueType font byte-code.

  • Type1 - Highlighting for Type1 font byte-code.

  • VBA - Highlighting for VBA and VBS.

  • x86/64 - Highlighting for x86 and x64 assembly.

  • XML - Highlighting for XML.

Parameters

name (str) – The name of the language.

setSelectedText(text: str)bool

Inserts text at the current cursor position and replaces selected text.

Parameters

text (str) – The text to insert.

Returns

Returns True if successful; otherwise returns False.

Return type

bool

See also getSelectedText(), setText() and setUndoableText().

setSelection(pos: int, size: int)None

Sets the text selection.

Parameters
  • pos (int) – The start position of the selection.

  • size (int) – The size of the selection.

See also ProView.hasSelection(), getSelectionStart() and getSelectionSize().

setText(text_or_text_stream: Union[Pro.Core.NTTextStringBuffer, str])bool

Sets the text of the view.

Contrary to setUndoableText(), this operation is not undoable.

Parameters

text_or_text_stream (Union[NTTextStringBuffer, str]) – The text to set.

Returns

Returns True if successful; otherwise returns False.

Return type

bool

See also getText(), setSelectedText() and setUndoableText().

setUndoableText(text: str)bool

Sets the text of the view.

The user can undo this operation.

Parameters

text (str) – The text to set.

Returns

Returns True if successful; otherwise returns False.

Return type

bool

See also getText(), setText() and setUndoableText().

class ProToolBar

This class represents a tool-bar.

Only workspaces can have tool-bars (see ProWorkspace).

See also ProWorkspace, ProUIAction and ProMenuBar.

Methods:

addAction(action)

Adds a UI action to the tool-bar.

addSeparator()

Adds a separator to the tool-bar.

isNull()

Returns True if the tool-bar is invalid; otherwise returns False.

addAction(action: Pro.UI.ProUIAction)None

Adds a UI action to the tool-bar.

Parameters

action (ProUIAction) – The action to add.

See also addSeparator().

addSeparator()None

Adds a separator to the tool-bar.

See also addAction().

isNull()bool
Returns

Returns True if the tool-bar is invalid; otherwise returns False.

Return type

bool

ProTopToolBarArea: Final[int]

Top tool-bar area.

See also meth:ProWorkspace.addToolBar.

class ProTreeIndex

This class represents an index of a custom tree view.

See also ProTreeView.

Attributes:

column

The column of the tree index.

id

The identifier of the tree index.

row

The row of the tree index.

Methods:

isValid()

Returns True if the index is valid; otherwise returns False.

column

The column of the tree index.

See also row and id.

id

The identifier of the tree index.

This is a user-defined 32-bit unsigned integer.

See also row and column.

isValid()bool
Returns

Returns True if the index is valid; otherwise returns False.

Return type

bool

row

The row of the tree index.

See also column and id.

class ProTreeView

Bases: Pro.UI.ProView

This class represents a tree view.

There are two ways to create a tree view: either from a Pro.Core.CFFDB or it can be a custom tree view.

In custom tree views the relationship between parent and child nodes of the tree must be handled by the callback of the view, while when constructing the tree view from a Pro.Core.CFFDB this logic is handled automatically.

The notifications for custom tree views are:

The notifications for tree views built from a Pro.Core.CFFDB are:

The following is an advanced example of a custom tree view:

from Pro.UI import *

def viewCallback(cv, tree_child_count, code, view, data):
    if code == pvnInit:
        # tree
        t = cv.getView(1)
        t.enableExpansionNotifications(True)
        return 1
    elif code == pvnTreeRowCount:
        # root?
        if not data.isValid():
            return 10
        # children of root items
        elif data.id == 0:
            return tree_child_count[data.row]
        return 0
    elif code == pvnTreeColumnCount:
        # root?
        if not data.isValid():
            return 1
        # children of root items
        elif data.id == 0:
            return 1
        return 0
    elif code == pvnTreeIndex:
        # root item?
        if not data.pidx.isValid():
            data.setItemId(0)
            return 1
        # child of root item
        elif data.pidx.id == 0:
            data.setItemId(data.pidx.row + 1)
            return 1
        return 0
    elif code == pvnTreeParent:
        if data.idx.id > 0:
            data.setParentIndex(data.idx.id - 1, 0, 0)
            return 1
        return 0
    elif code == pvnGetCustomTreeRow:
        if data.id == 0:
            data.setText(0, "parent")
        else:
            data.setText(0, "child")
    elif code == pvnCustomTreeRowSelected:
        if data:
            # data contains row, column, id
            print("selected tree item " + str(data.id))
    elif code == pvnCustomTreeItemExpanded:
        print("tree item expanded")
        # change number of children of root items
        if data.id == 0 and tree_child_count[data.row] == 1:
            t = cv.getView(1)
            t.rowsRemovalStart(data, 0, 0)
            tree_child_count[data.row] = 0
            t.rowsRemovalEnd()
            t.rowsInsertionStart(data, 0, 9)
            tree_child_count[data.row] = 10
            t.rowsInsertionEnd()
    return 0

ctx = proContext()
cv = ctx.createView(ProView.Type_Custom, "Test")
tree_child_count = [1] * 10
cv.setup("<ui><vlayout margin='0'><tree id='1'/></vlayout></ui>", viewCallback, tree_child_count)
ctx.addView(cv)

In the code a tree view with ten root nodes is created. Every root node has a single child node. When a root node is expanded, its child node is deleted and replaced with ten child nodes. The purpose of the example is to demonstrate the functionality of a dynamic custom tree view.

See also ProCustomView() and Pro.Core.CFFDB.

Methods:

collapseAll()

Collapses all the nodes of the tree view.

enableExpansionNotifications([b])

Regulates the emission of node expansion notifications.

expandAll()

Expands all the nodes of the tree view.

getColumnLabels()

Returns the column labels.

getColumnWidth(col)

Retrieves the width of a column.

getCustomSelectedIndex()

Returns the selected index of a custom tree view if successful; otherwise returns an invalid index.

getDB()

Returns the Pro.Core.CFFDB instance if available; otherwise returns an invalid Pro.Core.CFFDB.

getSelectedIndex()

Returns the Pro.Core.CFFDB index of the selected tree node if successful; otherwise returns Pro.Core.CFFDBInvalidIndex.

parentIndex(idx)

Retrieves the parent index of an item in a custom tree view.

rowsInsertionEnd()

Ends a row insertion operation in a custom tree.

rowsInsertionStart(pidx, first, last)

Starts a row insertion operation in a custom tree

rowsRemovalEnd()

Ends a row removal operation in a custom tree.

rowsRemovalStart(pidx, first, last)

Starts a row removal operation in a custom tree

setColumnCWidth(col, cw)

Sets the width of a column in characters.

setColumnLabels(labels)

Sets the column labels.

setColumnWidth(col, w)

Sets the width of a column in pixels.

setCustomExpanded(idx, expand[, levels])

Expands or collapses a node in a custom tree view.

setCustomSelectedIndex(idx)

Selects an item in a custom tree view.

setDB(db)

Initializes the tree view using a Pro.Core.CFFDB instance.

setExpanded(idx, expand[, levels])

Expands or collapses a node in a Pro.Core.CFFDB tree view.

setSelectedIndex(idx)

Selects an item in a Pro.Core.CFFDB tree view.

collapseAll()None

Collapses all the nodes of the tree view.

See also expandAll().

enableExpansionNotifications(b: bool = True)None

Regulates the emission of node expansion notifications.

Parameters

b (bool) – If True, expansion notifications are emitted; otherwise expansion notifications are not emitted.

See also pvnCustomTreeItemExpanded and pvnTreeItemExpanded.

expandAll()None

Expands all the nodes of the tree view.

See also collapseAll().

getColumnLabels()Pro.Core.NTStringList
Returns

Returns the column labels.

Return type

NTStringList

See also setColumnLabels() and Pro.Core.NTStringList.

getColumnWidth(col: int)int

Retrieves the width of a column.

Parameters

col (int) – The index of the column.

Returns

Returns the column with in pixels if successful; otherwise returns 0.

Return type

int

See also setColumnWidth() and setColumnCWidth().

getCustomSelectedIndex()Pro.UI.ProTreeIndex
Returns

Returns the selected index of a custom tree view if successful; otherwise returns an invalid index.

Return type

ProTreeIndex

See also setCustomSelectedIndex(), ProTreeIndex and ProView.hasSelection().

getDB()Pro.Core.CFFDB
Returns

Returns the Pro.Core.CFFDB instance if available; otherwise returns an invalid Pro.Core.CFFDB.

Return type

CFFDB

See also setDB() and Pro.Core.CFFDB.

getSelectedIndex()int
Returns

Returns the Pro.Core.CFFDB index of the selected tree node if successful; otherwise returns Pro.Core.CFFDBInvalidIndex.

Return type

int

See also setSelectedIndex(), Pro.Core.CFFDB and ProView.hasSelection().

parentIndex(idx: Pro.UI.ProTreeIndex)Pro.UI.ProTreeIndex

Retrieves the parent index of an item in a custom tree view.

Parameters

idx (ProTreeIndex) – The index for which to retrieve the parent index.

Returns

Returns the parent index.

Return type

ProTreeIndex

See also setSelectedIndex().

rowsInsertionEnd()None

Ends a row insertion operation in a custom tree.

See also rowsInsertionStart().

rowsInsertionStart(pidx: Pro.UI.ProTreeIndex, first: int, last: int)None

Starts a row insertion operation in a custom tree

Parameters
  • pidx (ProTreeIndex) – The index of the parent item.

  • first (int) – The index of the first row to be inserted.

  • last (int) – The index of the last row to be inserted.

See also rowsInsertionEnd().

rowsRemovalEnd()None

Ends a row removal operation in a custom tree.

See also rowsRemovalStart().

rowsRemovalStart(pidx: Pro.UI.ProTreeIndex, first: int, last: int)None

Starts a row removal operation in a custom tree

Parameters
  • pidx (ProTreeIndex) – The index of the parent item.

  • first (int) – The index of the first row to be removed.

  • last (int) – The index of the last row to be removed.

See also rowsRemovalEnd().

setColumnCWidth(col: int, cw: int)None

Sets the width of a column in characters.

Parameters
  • col (int) – The column index.

  • cw (int) – The width to set.

See also setColumnWidth() and getColumnWidth().

setColumnLabels(labels: Pro.Core.NTStringList)None

Sets the column labels.

Parameters

labels (NTStringList) – The column labels to set.

See also getColumnLabels().

setColumnWidth(col: int, w: int)None

Sets the width of a column in pixels.

Parameters
  • col (int) – The column index.

  • w (int) – The width to set.

See also setColumnCWidth() and getColumnWidth().

setCustomExpanded(idx: Pro.UI.ProTreeIndex, expand: bool, levels: Optional[int] = None)None

Expands or collapses a node in a custom tree view.

Optionally expands child levels of the specified node.

Parameters
  • idx (ProTreeIndex) – The index of the item to expand.

  • expand (bool) – If True, expands the node; otherwise collapses it.

  • levels (Optional[int]) – The number of child node levels to expand.

See also expandAll() and collapseAll().

setCustomSelectedIndex(idx: Pro.UI.ProTreeIndex)None

Selects an item in a custom tree view.

Parameters

idx (ProTreeIndex) – The index of item to select.

See also getCustomSelectedIndex(), ProTreeIndex and ProView.hasSelection().

setDB(db: Pro.Core.CFFDB)None

Initializes the tree view using a Pro.Core.CFFDB instance.

Parameters

db (CFFDB) – The Pro.Core.CFFDB instance.

See also getDB() and Pro.Core.CFFDB.

setExpanded(idx: int, expand: bool, levels: Optional[int] = None)None

Expands or collapses a node in a Pro.Core.CFFDB tree view.

Optionally expands child levels of the specified node.

Parameters
  • idx (int) – The Pro.Core.CFFDB index of the tree node to expand.

  • expand (bool) – If True, expands the node; otherwise collapses it.

  • levels (Optional[int]) – The number of child node levels to expand.

See also expandAll() and collapseAll().

setSelectedIndex(idx: int)None

Selects an item in a Pro.Core.CFFDB tree view.

Parameters

idx (int) – The Pro.Core.CFFDB index of the tree node to select.

See also getSelectedIndex(), Pro.Core.CFFDB and ProView.hasSelection().

class ProUIAction

This class represents a UI action.

A UI action can be associated to a view, menu or tool-bar.

Important

UI actions must not be confused with actions in the context of extensions!

Moreover, the view which created a UI action should delete it when it’s no longer used by calling free().

See also ProView.addAction().

Methods:

free()

Deletes the action.

getText()

Returns the text of the action.

isChecked()

Returns True if the action is checked; otherwise returns False.

isNull()

Returns True if the action is invalid; otherwise returns False.

setCheckable(b)

Sets the checkable status of the action.

setChecked(b)

Sets the checked status of the action.

setEnabled(b)

Sets the enabled status of the action.

setIcon(icon)

Sets the icon of the action.

setShortcut(shortcut)

Sets the keyboard shortcut for the action (e.g.

setText(text)

Sets the text of the action.

setVisible(b)

Sets the visibility of the action.

free()None

Deletes the action.

getText()str
Returns

Returns the text of the action.

Return type

str

See also setText().

isChecked()bool
Returns

Returns True if the action is checked; otherwise returns False.

Return type

bool

See also setChecked() and setCheckable().

isNull()bool
Returns

Returns True if the action is invalid; otherwise returns False.

Return type

bool

setCheckable(b: bool)None

Sets the checkable status of the action.

Parameters

b (bool) – If True, the action becomes checkable.

See also setChecked() and isChecked().

setChecked(b: bool)None

Sets the checked status of the action.

Hint

An action must be checkable before setting its checked status (see setCheckable()).

Parameters

b (bool) – If True, the action becomes checked.

See also isChecked() and setCheckable().

setEnabled(b: bool)None

Sets the enabled status of the action.

Parameters

b (bool) – If False, the action is disabled.

setIcon(icon: int)None

Sets the icon of the action.

Parameters

icon (int) – The icon identifier. This can be a predefined icon (e.g., PubIcon_Text) or a custom icon (see proAddPublicIcon()).

See also proAddPublicIcon().

setShortcut(shortcut: str)None

Sets the keyboard shortcut for the action (e.g. Ctrl+K).

Parameters

shortcut (str) – The keyboard shortcut.

setText(text: str)None

Sets the text of the action.

Parameters

text (str) – The text to set.

See also getText().

setVisible(b: bool)None

Sets the visibility of the action.

Parameters

b (bool) – If False, the action is hidden.

class ProUIPoint(x: Optional[int] = None, y: Optional[int] = None)

This class contains the coordinates of a UI point.

Parameters
  • x (Optional[int]) – The x coordinate of the point.

  • y (Optional[int]) – The y coordinate of the point.

See also ProUISize and ProUIRect.

Methods:

fromBytes(b)

Converts a byte-array into a UI point.

toBytes()

Converts the UI point into a byte-array.

Attributes:

x

The x coordinate of the point.

y

The y coordinate of the point.

static fromBytes(b: bytes)Pro.UI.ProUIPoint

Converts a byte-array into a UI point.

Parameters

b (bytes) – The byte-array.

Returns

Returns the UI point if successful; otherwise returns a null UI point.

Return type

ProUIPoint

See also toBytes().

toBytes()bytes

Converts the UI point into a byte-array.

Returns

Returns the converted UI point.

Return type

bytes

See also fromBytes().

x

The x coordinate of the point.

See also y.

y

The y coordinate of the point.

See also x.

class ProUIRect(x: Optional[int] = None, y: Optional[int] = None, w: Optional[int] = None, h: Optional[int] = None)

This class contains the coordinates of a UI rect.

Parameters
  • x (Optional[int]) – The x coordinate of the rect.

  • y (Optional[int]) – The y coordinate of the rect.

  • w (Optional[int]) – The width of the rect.

  • h (Optional[int]) – The height of the rect.

See also ProUIPoint and ProUISize.

Methods:

fromBytes(b)

Converts a byte-array into a UI rect.

isEmpty()

Returns True if the rect is empty; otherwise returns False.

toBytes()

Converts the UI rect into a byte-array.

Attributes:

h

The height of the rect.

w

The width of the rect.

x

The x coordinate of the rect.

y

The y coordinate of the rect.

static fromBytes(b: bytes)Pro.UI.ProUIRect

Converts a byte-array into a UI rect.

Parameters

b (bytes) – The byte-array.

Returns

Returns the UI rect if successful; otherwise returns an empty UI rect.

Return type

ProUIRect

See also toBytes().

h

The height of the rect.

isEmpty()bool
Returns

Returns True if the rect is empty; otherwise returns False.

Return type

bool

toBytes()bytes

Converts the UI rect into a byte-array.

Returns

Returns the converted UI rect.

Return type

bytes

See also fromBytes().

w

The width of the rect.

x

The x coordinate of the rect.

y

The y coordinate of the rect.

class ProUISize(w: Optional[int] = None, h: Optional[int] = None)

This class contains the coordinates of a UI size.

Parameters
  • w (Optional[int]) – The width of the size.

  • h (Optional[int]) – The height of the size.

See also ProUIPoint and ProUIRect.

Methods:

fromBytes(b)

Converts a byte-array into a UI size.

isEmpty()

Returns True if the size is empty; otherwise returns False.

toBytes()

Converts the UI size into a byte-array.

Attributes:

h

The height of the size.

w

The width of the size.

static fromBytes(b: bytes)Pro.UI.ProUISize

Converts a byte-array into a UI size.

Parameters

b (bytes) – The byte-array.

Returns

Returns the UI size if successful; otherwise returns an empty UI size.

Return type

ProUISize

See also toBytes().

h

The height of the size.

isEmpty()bool
Returns

Returns True if the size is empty; otherwise returns False.

Return type

bool

toBytes()bytes

Converts the UI size into a byte-array.

Returns

Returns the converted UI size.

Return type

bytes

See also fromBytes().

w

The width of the size.

class ProView

This is the base class for every view and control.

To create a new view ProContext.createView() must be used.

Hint

While some views can be created directly from ProContext.createView() (e.g., Type_Hex), the majority of sub-views and controls are only available in the context of custom views (Type_Custom).

The generic notifications that all view types may emit are:

See also ProContext.createView(), Type_Custom and ProCustomView.

Attributes:

Type_Carbon

Creates a Carbon disassembly view.

Type_CellTable

Creates a cell table view.

Type_Custom

Creates a custom view.

Type_Hex

Creates a hex view.

Type_Media

Creates a media view.

Type_Plot

Creates a plot view.

Type_SqlTable

Creates a SQLite table view.

Type_Table

Creates a table view.

Type_Text

Creates a text view.

Type_TextBrowser

Creates a text browser view.

Type_Tree

Creates a tree view.

Methods:

addAction(cmd, label[, shortcut, icon])

Adds a UI action to the view.

addDependentView(view)

Adds a view as dependent from this view.

clear()

Clears the view.

close([r])

Closes the view.

closeDependentView(view)

Closes a dependent view.

contextualHeaderDescription()

Returns the description of the contextual header if available; otherwise returns an empty string.

contextualHeaderFileName()

Returns the file name of the contextual header if available; otherwise returns an empty string.

ensureVisible([switch_to])

Ensures the visibility of the view.

fromWidget(widget)

Creates a view from a Qt widget.

getBgColor()

Returns the background color of the view.

getGeometry()

Returns the geometry of the view.

getName()

Returns the name of the view.

getTitle()

Returns the title of the view.

getTypeName()

Returns the internal type name of the view if any; otherwise returns an empty string.

hasFocus()

Returns True if the view is focused; otherwise returns False.

hasSelection()

Returns True if the view has a selection; otherwise returns False.

id()

Returns the unique identifier of the view.

isEnabled()

Returns True if the view is enabled; otherwise returns False.

isMaximized()

Returns True if the view is maximized; otherwise returns False.

isValid()

Returns True if the view is valid; otherwise returns False.

isVisible()

Returns True if the view is visible; otherwise returns False.

setBold(b)

Sets the bold property of the view font.

setEnabled(b)

Sets the enabled status of the view.

setFocus()

Sets the focus to the view.

setGeometry(rc)

Sets the geometry of the view.

setIcon(icon)

Sets the icon of the view.

setItalic(b)

Sets the italic property of the view font.

setName(name)

Sets the name of the view.

setTitle(title)

Sets the title of the view.

setTypeName(type_name)

Sets the internal type name of the view.

setVisible(b)

Sets the visibility of the view.

showMaximized()

Shows the view as maximized.

showNormal()

Shows the view in its normal geometry.

toWidget()

Converts the view to a Qt widget.

tryToFindWindowTitle([dflt])

Tries to find the top-level title for the current view.

type()

Returns the type of the view (e.g. Type_Text).

update()

Redraws the view.

Type_Carbon: Final[int]

Creates a Carbon disassembly view.

See also ProContext.createView() and ProCarbonView.

Type_CellTable: Final[int]

Creates a cell table view.

See also ProContext.createView() and ProCellTableView.

Type_Custom: Final[int]

Creates a custom view.

See also ProContext.createView() and ProCustomView.

Type_Hex: Final[int]

Creates a hex view.

See also ProContext.createView() and ProHexView.

Type_Media: Final[int]

Creates a media view.

See also ProContext.createView() and ProMediaView.

Type_Plot: Final[int]

Creates a plot view.

See also ProContext.createView() and ProPlotView.

Type_SqlTable: Final[int]

Creates a SQLite table view.

See also ProContext.createView() and ProTableView.

Type_Table: Final[int]

Creates a table view.

See also ProContext.createView() and ProTableView.

Type_Text: Final[int]

Creates a text view.

See also ProContext.createView() and ProTextView.

Type_TextBrowser: Final[int]

Creates a text browser view.

See also ProContext.createView() and ProTextBrowserView.

Type_Tree: Final[int]

Creates a tree view.

See also ProContext.createView() and ProTreeView.

addAction(cmd: int, label: str, shortcut: str = str(), icon: int = - 1)Pro.UI.ProUIAction

Adds a UI action to the view.

Parameters
  • cmd (int) – The custom identifier for the action.

  • label (str) – The text for the action.

  • shortcut (str) – The shortcut for the action (e.g. Ctrl+K).

  • icon (int) – The icon for the action. This can be a predefined icon (e.g., PubIcon_Text) or a custom icon (see proAddPublicIcon()).

Returns

Returns a UI action if successful; otherwise returns an invalid UI action.

Return type

ProUIAction

See also ProUIAction.free() and ProUIAction.

addDependentView(view: Pro.UI.ProView)None

Adds a view as dependent from this view.

When the parent view is cleared or destroyed, the dependent view is also destroyed.

Note

Not all views support dependent views. At the moment only hex views (ProHexView) and Carbon disassembly views (ProCarbonView) support dependent views. In the future more parent view types will be supported.

Parameters

view (ProView) – The view to add and to make dependent from this view.

See also closeDependentView() and ProContext.addView().

clear()None

Clears the view.

close(r: int = 0)None

Closes the view.

If the view is the direct child of a dialog box, then it closes the dialog box and sets the return code.

Parameters

r (int) – The return code for the dialog box.

See also ProContext.addView() and ProDialog.

closeDependentView(view: Pro.UI.ProView)None

Closes a dependent view.

Parameters

view (ProView) – The dependent view to close.

See also addDependentView().

contextualHeaderDescription()str
Returns

Returns the description of the contextual header if available; otherwise returns an empty string.

Return type

str

Available since Cerbero Suite 5.1 and Cerbero Engine 2.1.

See also contextualHeaderFileName().

contextualHeaderFileName()str
Returns

Returns the file name of the contextual header if available; otherwise returns an empty string.

Return type

str

Available since Cerbero Suite 5.1 and Cerbero Engine 2.1.

See also contextualHeaderDescription().

ensureVisible(switch_to: bool = True)None

Ensures the visibility of the view.

Parameters

switch_to (bool) – If True, switches the focus to the view.

See also isVisible() and setEnabled().

static fromWidget(widget: object)Pro.UI.ProView

Creates a view from a Qt widget.

This method was implemented to work with PySide and is now obsolete.

Parameters

widget (object) – The Qt widget.

Returns

Returns the created view if successful; otherwise returns an invalid view.

Return type

ProView

See also ProContext.createViewFromWidget() and ProContext.createView().

getBgColor()int
Returns

Returns the background color of the view.

Return type

int

getGeometry()Pro.UI.ProUIRect
Returns

Returns the geometry of the view.

Return type

ProUIRect

See also setGeometry() and isMaximized().

getName()str
Returns

Returns the name of the view.

Return type

str

See also setName().

getTitle()str
Returns

Returns the title of the view.

Return type

str

See also setTitle().

getTypeName()str
Returns

Returns the internal type name of the view if any; otherwise returns an empty string.

Return type

str

Available since Cerbero Suite 5.1 and Cerbero Engine 2.1.

See also setTypeName().

hasFocus()bool
Returns

Returns True if the view is focused; otherwise returns False.

Return type

bool

See also setFocus() and ensureVisible().

hasSelection()bool
Returns

Returns True if the view has a selection; otherwise returns False.

Return type

bool

id()int

Returns the unique identifier of the view.

This identifier is used in the context of custom views (ProCustomView) to identify the view.

Returns

Returns the identifier of the view.

Return type

int

See also ProCustomView.

isEnabled()bool
Returns

Returns True if the view is enabled; otherwise returns False.

Return type

bool

See also setEnabled() and isVisible().

isMaximized()bool
Returns

Returns True if the view is maximized; otherwise returns False.

Return type

bool

See also showMaximized() and getGeometry().

isValid()bool
Returns

Returns True if the view is valid; otherwise returns False.

Return type

bool

isVisible()bool
Returns

Returns True if the view is visible; otherwise returns False.

Return type

bool

See also setVisible() and ensureVisible().

setBold(b: bool)None

Sets the bold property of the view font.

Parameters

b (bool) – If True, the view font becomes bold.

Available since Cerbero Suite 5.1 and Cerbero Engine 2.1.

See also setItalic().

setEnabled(b: bool)None

Sets the enabled status of the view.

Parameters

b (bool) – If True, enables the view; otherwise disables the view.

See also isEnabled() and ensureVisible().

setFocus()None

Sets the focus to the view.

See also hasFocus() and ensureVisible().

setGeometry(rc: Pro.UI.ProUIRect)None

Sets the geometry of the view.

Parameters

rc (ProUIRect) – The geometry to set.

See also getGeometry() and isMaximized().

setIcon(icon: int)None

Sets the icon of the view.

Parameters

icon (int) – The icon identifier. This can be a predefined icon (e.g., PubIcon_Text) or a custom icon (see proAddPublicIcon()).

See also proAddPublicIcon().

setItalic(b: bool)None

Sets the italic property of the view font.

Parameters

b (bool) – If True, the view font becomes italic.

Available since Cerbero Suite 5.1 and Cerbero Engine 2.1.

See also setBold().

setName(name: str)None

Sets the name of the view.

Parameters

name (str) – The name to set.

See also getName().

setTitle(title: str)None

Sets the title of the view.

Parameters

title (str) – The title to set.

See also getTitle().

setTypeName(type_name: str)None

Sets the internal type name of the view.

The type name is cleared when the view is reset.

Hint

The purpose of this property is to make a view identifiable to external code.

Parameters

type_name (str) – The type name to set.

Available since Cerbero Suite 5.1 and Cerbero Engine 2.1.

See also getTypeName().

setVisible(b: bool)None

Sets the visibility of the view.

Parameters

b (bool) – If True, shows the view; otherwise hides the view.

See also isVisible() and ensureVisible().

showMaximized()None

Shows the view as maximized.

Hint

This method is works only for top-level windows.

See also isMaximized() and showNormal().

showNormal()None

Shows the view in its normal geometry.

Hint

This method is works only for top-level windows.

See also isMaximized() and showMaximized().

toWidget()object

Converts the view to a Qt widget.

This method was implemented to work with PySide and is now obsolete.

Returns

Returns the Qt widget if successful; otherwise returns None.

Return type

object

See also fromWidget().

tryToFindWindowTitle(dflt: str = str())str

Tries to find the top-level title for the current view.

Parameters

dflt (str) – The string to return in case a top-level title couldn’t be found.

Returns

Returns the top-level title if available; otherwise returns dflt.

Return type

str

type()SViewType
Returns

Returns the type of the view (e.g. Type_Text).

Return type

SViewType

See also ProContext.createView().

update()None

Redraws the view.

class ProWait

Bases: Pro.Core.NTIWait

This class provides the UI implementation of Pro.Core.NTIWait in the shape of a wait dialog.

See also ProContext.startWait() and Pro.Core.NTIWait.

class ProWorkspace

Bases: Pro.UI.ProView

This class represents a UI workspace.

Contrary to dialogs, workspace feature menu-bars, tool-bars and dock views

Important

Only one workspace at a time should exists in a process. This is a current limitation of working with workspaces. Therefore, when creating a workspace, as in the following example, it should be done from the context of a logic provider.

See also ProContext.createWorkspace().

Attributes:

StdActions_Layouts

Standard actions for layouts.

StdActions_Run

Standard run actions.

StdActions_Views

Standard actions for views.

StdDock_Output

Standard output view dock.

StdToolBar_CmdLine

Standard command-line tool-bar.

StdToolBar_Layouts

Standard tool-bar for layouts.

StdToolBar_Run

Standard run tool-bar.

StdToolBar_Views

Standard tool-bar for views.

Methods:

addDock(dock[, switch_to, curtab])

Adds a dock view to the workspace.

addStdActions(type)

Adds a set of standard UI actions to the workspace.

addStdToolBar(type)

Adds a standard tool-bar to the workspace.

addToolBar(name, title[, current_area])

Adds a tool-bar to the workspace.

addView(view[, switch_to, curtab])

Adds a view to the workspace.

createDock(view, name, title[, icon])

Creates a dock view from a specified view.

createStdDock(type)

Creates a standard dock view.

getLayout([dflt_focus_name])

Retrieves the layout of the dock views in the workspace.

menuBar()

Returns the menu-bar of the workspace.

restoreAppearance([initial_layout])

Restores the appearance of the workspace.

saveLayout([dflt_focus_name])

Saves the layout of the dock views in the workspace.

setup([cb, ud])

Sets the callback for the workspace.

show()

Shows the workspace.

StdActions_Layouts: Final[int]

Standard actions for layouts.

See also addStdActions().

StdActions_Run: Final[int]

Standard run actions.

See also addStdActions().

StdActions_Views: Final[int]

Standard actions for views.

See also addStdActions().

StdDock_Output: Final[int]

Standard output view dock.

See also createStdDock().

StdToolBar_CmdLine: Final[int]

Standard command-line tool-bar.

See also addStdToolBar().

StdToolBar_Layouts: Final[int]

Standard tool-bar for layouts.

See also addStdToolBar().

StdToolBar_Run: Final[int]

Standard run tool-bar.

See also addStdToolBar().

StdToolBar_Views: Final[int]

Standard tool-bar for views.

See also addStdToolBar().

addDock(dock: Pro.UI.ProDock, switch_to: bool = True, curtab: bool = False)None

Adds a dock view to the workspace.

Parameters
  • dock (ProDock) – The dock view to add.

  • switch_to (bool) – If True, switches the focus to the dock view to add.

  • curtab (bool) – If True, tabifies the dock view to add the currently focused dock view.

See also createDock() and createStdDock().

addStdActions(type: int)None

Adds a set of standard UI actions to the workspace.

Parameters

type (int) – The type of standard UI actions to add (e.g., StdActions_Views).

See also ProView.addAction(), addStdToolBar() and createStdDock().

addStdToolBar(type: int)Pro.UI.ProToolBar

Adds a standard tool-bar to the workspace.

Parameters

type (int) – The type of standard tool-bar to add (e.g., StdToolBar_Views).

Returns

Returns the standard tool-bar if successful; otherwise returns an invalid tool-bar.

Return type

ProToolBar

See also addToolBar(), addStdActions() and createStdDock().

addToolBar(name: str, title: str, current_area: ProToolBarArea = ProTopToolBarArea)ProToolBar

Adds a tool-bar to the workspace.

Parameters
  • name (str) – The name of the tool-bar.

  • title (str) – The title of the tool-bar.

  • current_area (ProToolBarArea) – The area of the workspace where to add the tool-bar (e.g., ProTopToolBarArea).

Returns

Returns the standard tool-bar if successful; otherwise returns an invalid tool-bar.

Return type

ProToolBar

See also addStdToolBar().

addView(view: Pro.UI.ProView, switch_to: bool = True, curtab: bool = False)Pro.UI.ProDock

Adds a view to the workspace.

Parameters
  • view (ProView) – The view to add.

  • switch_to (bool) – If True, switches the focus to the view to add.

  • curtab (bool) – If True, tabifies the view to add the currently focused view.

Returns

Returns the parent dock view.

Return type

ProDock

See also createDock() and addDock().

createDock(view: Pro.UI.ProView, name: str, title: str, icon: int = - 1)Pro.UI.ProDock

Creates a dock view from a specified view.

Parameters
  • view (ProView) – The child view.

  • name (str) – The name of the dock view. This name will be used when saving and restoring the layout of the workspace. This should be an alphanumeric name. If the name starts with a sharp character (#), the dock view will be hidden and not destroyed when closed by the user.

  • title (str) – The title of the dock view.

  • icon (int) – The icon of the dock view (e.g., PubIcon_Text).

Returns

Returns the created dock view.

Return type

ProDock

See also addDock() and createStdDock().

createStdDock(type: int)Pro.UI.ProDock

Creates a standard dock view.

Parameters

type (int) – The type of standard dock view (e.g., StdDock_Output).

Returns

Returns the created dock view if successful; otherwise returns an invalid dock view.

Return type

ProDock

See also addDock() and createDock().

getLayout(dflt_focus_name: str = str())bytes

Retrieves the layout of the dock views in the workspace.

Parameters

dflt_focus_name (str) – The name of the dock view which should obtain the focus when the layout is restored.

Returns

Returns the layout of the dock views.

Return type

bytes

See also restoreAppearance() and saveLayout().

menuBar()Pro.UI.ProMenuBar
Returns

Returns the menu-bar of the workspace.

Return type

ProMenuBar

See also ProMenuBar.

restoreAppearance(initial_layout: bytes = bytes())None

Restores the appearance of the workspace.

Parameters

initial_layout (bytes) – The initial layout of the dock views.

Hint

Developers can retrieve the layout of the dock views using getLayout().

The initial_layout parameter is available since Cerbero Suite 5.0 and Cerbero Engine 2.0.

See also getLayout() and saveLayout().

saveLayout(dflt_focus_name: str = str())None

Saves the layout of the dock views in the workspace.

Parameters

dflt_focus_name (str) – The name of the dock view which should obtain the focus when the layout is restored.

See also restoreAppearance() and getLayout().

setup(cb: Optional[object] = None, ud: Optional[object] = None)bool

Sets the callback for the workspace.

Parameters
  • cb (object) – The callback.

  • ud (object) – The user-data passed to the callback.

Returns

Returns True if successful; otherwise returns False.

Return type

bool

See also ProContext.createWorkspace() and show().

show()None

Shows the workspace.

See also ProContext.createWorkspace() and setup().

PubIcon_Add: Final[int]

Identifier for the ‘add’ icon.

See also proAddPublicIcon().

PubIcon_AddBookmark: Final[int]

Identifier for the ‘add bookmark’ icon.

See also proAddPublicIcon().

PubIcon_AddColor: Final[int]

Identifier for the ‘add color’ icon.

See also proAddPublicIcon().

PubIcon_AddFileToReport: Final[int]

Identifier for the ‘add file to report’ icon.

Available since Cerbero Suite 5.6 and Cerbero Engine 2.6.

See also proAddPublicIcon().

PubIcon_AddStructure: Final[int]

Identifier for the ‘add structure’ icon.

See also proAddPublicIcon().

PubIcon_AddressBook: Final[int]

Identifier for the ‘address book’ icon.

See also proAddPublicIcon().

PubIcon_Attachment: Final[int]

Identifier for the ‘attachment’ icon.

See also proAddPublicIcon().

PubIcon_BlueFlag: Final[int]

Identifier for the ‘blue flag’ icon.

See also proAddPublicIcon().

PubIcon_Bookmarks: Final[int]

Identifier for the ‘bookmarks’ icon.

See also proAddPublicIcon().

PubIcon_BookmarksPresent: Final[int]

Identifier for the ‘bookmarks present’ icon.

See also proAddPublicIcon().

PubIcon_Brush: Final[int]

Identifier for the ‘brush’ icon.

See also proAddPublicIcon().

PubIcon_Bulb: Final[int]

Identifier for the ‘light bulb’ icon.

See also proAddPublicIcon().

PubIcon_Carbon: Final[int]

Identifier for the ‘Carbon’ icon.

See also proAddPublicIcon().

PubIcon_CarbonAdd: Final[int]

Identifier for the ‘Carbon add’ icon.

See also proAddPublicIcon().

PubIcon_Certificate: Final[int]

Identifier for the ‘certificate’ icon.

Available since Cerbero Suite 5.1 and Cerbero Engine 2.1.

See also proAddPublicIcon().

PubIcon_Class: Final[int]

Identifier for the ‘code class’ icon.

See also proAddPublicIcon().

PubIcon_Color: Final[int]

Identifier for the ‘color’ icon.

See also proAddPublicIcon().

PubIcon_Computer: Final[int]

Identifier for the ‘computer’ icon.

Available since Cerbero Suite 5.1 and Cerbero Engine 2.1.

See also proAddPublicIcon().

PubIcon_Copy: Final[int]

Identifier for the ‘copy’ icon.

See also proAddPublicIcon().

PubIcon_Debug: Final[int]

Identifier for the ‘debug’ icon.

See also proAddPublicIcon().

PubIcon_Delete: Final[int]

Identifier for the ‘delete’ icon.

See also proAddPublicIcon().

PubIcon_Dir: Final[int]

Identifier for the ‘directory’ icon.

See also proAddPublicIcon().

PubIcon_Download: Final[int]

Identifier for the ‘download’ icon.

See also proAddPublicIcon().

PubIcon_Drive: Final[int]

Identifier for the ‘hard-drive’ icon.

See also proAddPublicIcon().

PubIcon_EditBookmark: Final[int]

Identifier for the ‘edit bookmark’ icon.

See also proAddPublicIcon().

PubIcon_Enum: Final[int]

Identifier for the ‘code enumerator’ icon.

See also proAddPublicIcon().

PubIcon_False: Final[int]

Identifier for the ‘false’ icon.

See also proAddPublicIcon().

PubIcon_Filter: Final[int]

Identifier for the ‘filter’ icon.

See also proAddPublicIcon().

PubIcon_Find: Final[int]

Identifier for the ‘find’ icon.

See also proAddPublicIcon().

PubIcon_FullScreen: Final[int]

Identifier for the ‘full-screen’ icon.

See also proAddPublicIcon().

PubIcon_Function: Final[int]

Identifier for the ‘code function’ icon.

See also proAddPublicIcon().

PubIcon_FunctionPrivate: Final[int]

Identifier for the ‘code private function’ icon.

See also proAddPublicIcon().

PubIcon_FunctionProtected: Final[int]

Identifier for the ‘code protected function’ icon.

See also proAddPublicIcon().

PubIcon_Geo: Final[int]

Identifier for the ‘geo-location’ icon.

See also proAddPublicIcon().

PubIcon_GhidraNativeUI: Final[int]

Identifier for the ‘Ghidra native UI’ icon.

See also proAddPublicIcon().

PubIcon_GlobalBookmarks: Final[int]

Identifier for the ‘global bookmarks’ icon.

See also proAddPublicIcon().

PubIcon_GlobalBookmarksPresent: Final[int]

Identifier for the ‘global bookmarks present’ icon.

See also proAddPublicIcon().

PubIcon_GlobalNotes: Final[int]

Identifier for the ‘global notes’ icon.

See also proAddPublicIcon().

PubIcon_GlobalNotesPresent: Final[int]

Identifier for the ‘global notes present’ icon.

See also proAddPublicIcon().

PubIcon_GoToReport: Final[int]

Identifier for the ‘go to report’ icon.

See also proAddPublicIcon().

PubIcon_GreenFlag: Final[int]

Identifier for the ‘green flag’ icon.

See also proAddPublicIcon().

PubIcon_Hammer: Final[int]

Identifier for the ‘hammer tool’ icon.

See also proAddPublicIcon().

PubIcon_HdrMgr: Final[int]

Identifier for the ‘Header Manager’ icon.

See also proAddPublicIcon().

PubIcon_HeaderManager: Final[int]

Identifier for the ‘Header Manager’ icon.

See also proAddPublicIcon().

PubIcon_Hex: Final[int]

Identifier for the ‘hex’ icon.

See also proAddPublicIcon().

PubIcon_HexAdd: Final[int]

Identifier for the ‘hex add’ icon.

See also proAddPublicIcon().

PubIcon_Install: Final[int]

Identifier for the ‘installation’ icon.

Available since Cerbero Suite 5.3 and Cerbero Engine 2.3.

See also proAddPublicIcon().

PubIcon_Item: Final[int]

Identifier for the ‘item’ icon.

See also proAddPublicIcon().

PubIcon_Item2: Final[int]

Identifier for the ‘item 2’ icon.

See also proAddPublicIcon().

PubIcon_JSDbg: Final[int]

Identifier for the ‘JavaScript Debugger’ icon.

See also proAddPublicIcon().

PubIcon_Key: Final[int]

Identifier for the ‘key’ icon.

See also proAddPublicIcon().

PubIcon_Layout: Final[int]

Identifier for the ‘layout’ icon.

See also proAddPublicIcon().

PubIcon_LayoutTable: Final[int]

Identifier for the ‘layout table’ icon.

See also proAddPublicIcon().

PubIcon_Namespace: Final[int]

Identifier for the ‘code namespace’ icon.

See also proAddPublicIcon().

PubIcon_NavigationBack: Final[int]

Identifier for the ‘navigation back’ icon.

See also proAddPublicIcon().

PubIcon_NavigationForth: Final[int]

Identifier for the ‘navigation forward’ icon.

See also proAddPublicIcon().

PubIcon_New: Final[int]

Identifier for the ‘new’ icon.

See also proAddPublicIcon().

PubIcon_NewAppInstance: Final[int]

Identifier for the ‘new application instance’ icon.

See also proAddPublicIcon().

PubIcon_NewGhidraNativeUI: Final[int]

Identifier for the ‘new Ghidra native UI’ icon.

See also proAddPublicIcon().

PubIcon_Notes: Final[int]

Identifier for the ‘notes’ icon.

See also proAddPublicIcon().

PubIcon_NotesPresent: Final[int]

Identifier for the ‘notes present’ icon.

See also proAddPublicIcon().

PubIcon_Open: Final[int]

Identifier for the ‘open’ icon.

See also proAddPublicIcon().

PubIcon_Package: Final[int]

Identifier for the ‘package’ icon.

Available since Cerbero Suite 5.1 and Cerbero Engine 2.1.

See also proAddPublicIcon().

PubIcon_Preview: Final[int]

Identifier for the ‘preview’ icon.

See also proAddPublicIcon().

PubIcon_Question: Final[int]

Identifier for the ‘question’ icon.

See also proAddPublicIcon().

PubIcon_Raw: Final[int]

Identifier for the ‘raw data’ icon.

See also proAddPublicIcon().

PubIcon_RedFlag: Final[int]

Identifier for the ‘red flag’ icon.

See also proAddPublicIcon().

PubIcon_Redo: Final[int]

Identifier for the ‘redo’ icon.

See also proAddPublicIcon().

PubIcon_Refresh: Final[int]

Identifier for the ‘refresh’ icon.

See also proAddPublicIcon().

PubIcon_Report: Final[int]

Identifier for the ‘report’ icon.

See also proAddPublicIcon().

PubIcon_ResetLayout: Final[int]

Identifier for the ‘reset layout’ icon.

See also proAddPublicIcon().

PubIcon_Roots: Final[int]

Identifier for the ‘roots’ icon.

See also proAddPublicIcon().

PubIcon_Run: Final[int]

Identifier for the ‘run’ icon.

See also proAddPublicIcon().

PubIcon_RunAction: Final[int]

Identifier for the ‘run action’ icon.

See also proAddPublicIcon().

PubIcon_RunScript: Final[int]

Identifier for the ‘run script’ icon.

See also proAddPublicIcon().

PubIcon_Save: Final[int]

Identifier for the ‘save’ icon.

See also proAddPublicIcon().

PubIcon_SaveLayout: Final[int]

Identifier for the ‘save layout’ icon.

See also proAddPublicIcon().

PubIcon_SaveProject: Final[int]

Identifier for the ‘save project’ icon.

See also proAddPublicIcon().

PubIcon_SaveReport: Final[int]

Identifier for the ‘save report’ icon.

See also proAddPublicIcon().

PubIcon_Scan: Final[int]

Identifier for the ‘scan’ icon.

See also proAddPublicIcon().

PubIcon_ScanActive: Final[int]

Identifier for the ‘scan active’ icon.

See also proAddPublicIcon().

PubIcon_ScanAdd: Final[int]

Identifier for the ‘scan add’ icon.

See also proAddPublicIcon().

PubIcon_ScanHand: Final[int]

Identifier for the ‘scan hand’ icon.

See also proAddPublicIcon().

PubIcon_ScriptEditorAdd: Final[int]

Identifier for the ‘script editor add’ icon.

See also proAddPublicIcon().

PubIcon_Shell: Final[int]

Identifier for the ‘shell’ icon.

See also proAddPublicIcon().

PubIcon_SingleView: Final[int]

Identifier for the ‘single view’ icon.

See also proAddPublicIcon().

PubIcon_Stats: Final[int]

Identifier for the ‘stats’ icon.

See also proAddPublicIcon().

PubIcon_Table: Final[int]

Identifier for the ‘table’ icon.

See also proAddPublicIcon().

PubIcon_Text: Final[int]

Identifier for the ‘text’ icon.

See also proAddPublicIcon().

PubIcon_TextAdd: Final[int]

Identifier for the ‘text add’ icon.

See also proAddPublicIcon().

PubIcon_Tool: Final[int]

Identifier for the ‘tool’ icon.

See also proAddPublicIcon().

PubIcon_TrashEmpty: Final[int]

Identifier for the ‘trash empty’ icon.

See also proAddPublicIcon().

PubIcon_Tree: Final[int]

Identifier for the ‘tree’ icon.

See also proAddPublicIcon().

PubIcon_True: Final[int]

Identifier for the ‘true’ icon.

See also proAddPublicIcon().

PubIcon_UAC: Final[int]

Identifier for the ‘User Account Control’ icon.

See also proAddPublicIcon().

PubIcon_Undo: Final[int]

Identifier for the ‘undo’ icon.

See also proAddPublicIcon().

PubIcon_Variable: Final[int]

Identifier for the ‘code variable’ icon.

See also proAddPublicIcon().

PubIcon_VariablePrivate: Final[int]

Identifier for the ‘code private variable’ icon.

See also proAddPublicIcon().

PubIcon_VariableProtected: Final[int]

Identifier for the ‘code protected variable’ icon.

See also proAddPublicIcon().

PubIcon_Warning: Final[int]

Identifier for the ‘warning’ icon.

See also proAddPublicIcon().

PubIcon_Web: Final[int]

Identifier for the ‘web’ icon.

See also proAddPublicIcon().

PubIcon_Window: Final[int]

Identifier for the ‘window’ icon.

See also proAddPublicIcon().

PubIcon_Windows: Final[int]

Identifier for the ‘windows’ icon.

See also proAddPublicIcon().

PubIcon_YellowFlag: Final[int]

Identifier for the ‘yellow flag’ icon.

See also proAddPublicIcon().

proAddPublicIcon(path: str)int

Adds an icon to the list of public icons.

Note

Once a public icon is no longer needed, it should be freed by calling proRemovePublicIcon().

Parameters

path (str) – The file name of the icon to add.

Returns

Returns the unique identifier of the public icon if successful; otherwise returns -1.

Return type

int

See also proRemovePublicIcon() and proAddPublicIconFromFile().

proAddPublicIconFromFile(fname: str)int

Adds the icon associated to a file to the list of public icons.

Note

Once a public icon is no longer needed, it should be freed by calling proRemovePublicIcon().

Parameters

fname (str) – The name of the file whose icon is to be added.

Returns

Returns the unique identifier of the public icon if successful; otherwise returns -1.

Return type

int

See also proRemovePublicIcon() and proAddPublicIcon().

proContext()Pro.UI.ProContext
Returns

Returns the global ProContext instance.

Return type

ProContext

See also ProContext.

proGetSpecialColor(color: int)int

Retrieves the value of a special color.

Parameters

color (int) – The color to retrieve (e.g., ProColor_Special).

Returns

Returns the requested color.

Return type

int

Available since Cerbero Suite 5.4 and Cerbero Engine 2.4.

See also ProColor_Special, ProColor_Error, ProColor_Custom, ProColor_Used and ProColor_Unreferenced.

proRemovePublicIcon(iid: int)None

Frees a public icon which was loaded using proAddPublicIcon() or proAddPublicIconFromFile().

Parameters

iid (int) – The unique identifier of the icon to free.

See also proAddPublicIcon() and proAddPublicIconFromFile().

pvnButtonClicked: Final[int]

Notification for when a button is clicked.

See also ProPushButton.

pvnCarbonDebugSymbolsLoaded: Final[int]

Notification to inform the dependent views of a Carbon disassembly view that debug symbols were loaded.

See also ProCarbonView.

pvnCellTableColumnCount: Final[int]

Notification to retrieve the number of columns in a cell table item.

The handler of this notification must return the number of columns in the cell table view.

See also ProCellTableView.

pvnCellTableGetHeader: Final[int]

Notification to retrieve the label of a cell table view header.

The associated data is pvnCellTableGetHeaderData.

See also pvnCellTableGetHeaderData and ProCellTableView.

class pvnCellTableGetHeaderData

This class contains the data associated to pvnCellTableGetHeader.

See also ProTabBar.

Attributes:

horizontal

If True, the request is for the horizontal header of the cell table view; otherwise it’s for the vertical header.

i

The index of the requested header section.

Methods:

setText(t)

Sets the text of the requested header section.

text()

Returns the text of requested header section.

horizontal

If True, the request is for the horizontal header of the cell table view; otherwise it’s for the vertical header.

i

The index of the requested header section.

setText(t: str)None

Sets the text of the requested header section.

Parameters

t (str) – The text to set.

See also text().

text()str
Returns

Returns the text of requested header section.

Return type

str

See also setText().

pvnCellTableGetItem: Final[int]

Notification to retrieve the data of a cell table item.

The associated data is pvnCellTableGetItemData.

See also pvnCellTableGetItemData and ProCellTableView.

class pvnCellTableGetItemData

This class contains the data associated to pvnCellTableGetItem.

See also ProCellTableView.

Attributes:

column

The column of the item.

row

The row of the item.

type

The type of data requested (e.g.

Methods:

setColor(color)

Sets the requested item color.

setFontOptions(opt)

Sets the item font options.

setIcon(icon)

Sets the item icon.

setText(t)

Sets the item text.

setTextAlignment(align)

Sets the item text.