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.

Layout containers can include special items:

  • spacer - A layout item to introduce space between items,s. Available attributes are:

    • size - The size of the spacer.

    • expand - If true, expands the spacer to take all available space.

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.

  • fline - Filter control (See ProFilterLine).

  • fs - File system view (See ProFileSystemView).

  • 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).

  • seditor - Script editor view (See ProScriptEditorView).

    • lang - The scripting language.

    • ext - The default extension for the script files. Multiple extensions can be specified separated by semi-colon (;).

  • 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.

  • textbr - Text browser view (See ProTextBrowserView). Available attributes are:

    • hline - If true or always, the text browser highlights the current line. If false or never, the text browser doesn’t highlight the current line. If nofocus, the text browser highlights the current line only when not focused.

    • linenr - If true, the text browser shows the line number. Line numbers are available only when displaying raw data.

    • wrap - The amount of characters allowed on a single line.

  • 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.

PRO_TEXT_BROWSER_MARKER

Escape code for ProTextBrowserView line.

PRO_TEXT_BROWSER_MAX_LINE_ID

Maximum id for a ProTextBrowserView line.

PRO_TEXT_BROWSER_MAX_LINE_POS

Maximum position in a ProTextBrowserView line.

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.

ProTextBrowserCode_AltEscape

Code for a ProTextBrowserView line.

ProTextBrowserCode_BGColor

Code for a ProTextBrowserView line.

ProTextBrowserCode_Bold

Code for a ProTextBrowserView line.

ProTextBrowserCode_Default

Code for a ProTextBrowserView line.

ProTextBrowserCode_Escape

Code for a ProTextBrowserView line.

ProTextBrowserCode_HighlightEnd

Code for a ProTextBrowserView line.

ProTextBrowserCode_HighlightStart

Code for a ProTextBrowserView line.

ProTextBrowserCode_HyperLinkEnd

Code for a ProTextBrowserView line.

ProTextBrowserCode_HyperLinkStart

Code for a ProTextBrowserView line.

ProTextBrowserCode_LineInfo

Code for a ProTextBrowserView line.

ProTextBrowserCode_LineMarker

Code for a ProTextBrowserView line.

ProTextBrowserCode_LineNumber

Code for a ProTextBrowserView line.

ProTextBrowserCode_SelectionEnd

Code for a ProTextBrowserView line.

ProTextBrowserCode_SelectionStart

Code for a ProTextBrowserView line.

ProTextBrowserCode_TextColor

Code for a ProTextBrowserView line.

ProTextBrowserLineHighlightPolicy_Always

Line highlight policy for ProTextBrowserView.

ProTextBrowserLineHighlightPolicy_Never

Line highlight policy for ProTextBrowserView.

ProTextBrowserLineHighlightPolicy_NoFocus

Line highlight policy for ProTextBrowserView.

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_Calculator

Identifier for the ‘calculator’ 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_ClassPrivate

Identifier for the ‘private code class’ icon.

PubIcon_ClassProtected

Identifier for the ‘protected code class’ icon.

PubIcon_Clock

Identifier for the ‘clock’ 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_DirLink

Identifier for the ‘directory link’ 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_FastText

Identifier for the ‘fast text’ icon.

PubIcon_File

Identifier for the ‘file’ icon.

PubIcon_FileInfo

Identifier for the ‘file info’ icon.

PubIcon_FileLink

Identifier for the ‘file link’ 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_Home

Identifier for the ‘home’ 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_Minus

Identifier for the ‘minus’ icon.

PubIcon_Namespace

Identifier for the ‘code namespace’ icon.

PubIcon_NavigationBack

Identifier for the ‘navigation back’ icon.

PubIcon_NavigationDown

Identifier for the ‘navigation down’ icon.

PubIcon_NavigationForth

Identifier for the ‘navigation forward’ icon.

PubIcon_NavigationUp

Identifier for the ‘arrow up’ 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_Play

Identifier for the ‘play’ 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_Settings

Identifier for the ‘settings’ icon.

PubIcon_Shell

Identifier for the ‘shell’ icon.

PubIcon_SingleView

Identifier for the ‘single view’ icon.

PubIcon_Star

Identifier for the ‘star’ icon.

PubIcon_StarGray

Identifier for the ‘gray star’ icon.

PubIcon_Stats

Identifier for the ‘stats’ icon.

PubIcon_Table

Identifier for the ‘table’ icon.

PubIcon_Task

Identifier for the ‘task’ 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.

pvnCmdLineEntered

Notification for when a command is entered into a custom command line interpreter.

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.

pvnDrop

Notification for when a drop event.

pvnExecuteAction

Notification for the execution of a UI action.

pvnFilterLineFilter

Notification for when a filter action is triggered by a filter line control.

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.

pvnMenuAboutToShow

Notification for when a menu is about to be shown in a workspace.

pvnOwnerViewClosed

Notification for when an owner view is closed.

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.

pvnScriptEditorViewAutoComplete

Notification for an auto-completion request in ProScriptEditorView.

pvnScriptEditorViewRunScript

Notification for when a script is run in ProScriptEditorView.

pvnScriptEditorViewTitleUpdate

Notification for when a script editor view updates its title.

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.

pvnTextBrowserClosestLine

Notification to retrieve the closest line id in a ProTextBrowserView.

pvnTextBrowserGetLine

Notification to retrieve the line in a ProTextBrowserView.

pvnTextBrowserHyperLinkActivated

Notification sent when a hyper-link is activated in a ProTextBrowserView.

pvnTextBrowserLastLine

Notification to retrieve the last line id in a ProTextBrowserView.

pvnTextBrowserLineCount

Notification to retrieve the line count in a ProTextBrowserView.

pvnTextBrowserNextLine

Notification to retrieve the next line id in a ProTextBrowserView.

pvnTextBrowserPrevLine

Notification to retrieve the previous line id in a ProTextBrowserView.

pvnTextBrowserWheelScroll

Notification for when the scroll wheel is moved in a ProTextBrowserView.

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.

ProCommandLineInterpreter()

This class contains the information needed to add a command line interpreter to a workspace.

ProContext()

This class provides functionality for the current UI context.

ProCustomView()

This class represents a custom view.

ProDelayedWait()

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

ProDialog()

This class represents a dialog.

ProDock()

This class represent a dock view of a workspace.

ProDockList()

List of ProDock elements.

ProDockListIt(obj)

Iterator class for ProDockList.

ProFileInfoView()

This class represents a file info view.

ProFileSystemView()

This class represents a file system view.

ProFilterLine()

This class represents a filter control.

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.

ProInputProcessInfo()

This class contains the information returned by ProInput.askProcess().

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.

ProScriptEditorView()

This class represents a script editor.

ProTabBar()

This class represents a tab bar.

ProTableView()

This class represents a table view.

ProTextBrowserColors()

This class contains the base colors for a ProTextBrowserView.

ProTextBrowserHyperLink()

This class contains the data of a ProTextBrowserView hyper-link.

ProTextBrowserParser()

This class can be used to parse custom text lines built using ProTextBrowserStringBuilder.

ProTextBrowserRange()

This class represents a range of text in ProTextBrowserView.

ProTextBrowserStringBuilder()

This class must be used to create custom text lines for ProTextBrowserView.

ProTextBrowserView()

This class represents a text browser.

ProTextLine()

This class represents a text line control.

ProTextView()

This class represents a text view.

ProTheme()

This class represents a graphical theme.

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.

pvnCmdLineEnteredData()

This class contains the data associated to pvnCmdLineEntered.

pvnComboIndexChangedData()

This class contains the data associated to pvnComboIndexChanged.

pvnCommonRowData()

Base class for other UI notification classes.

pvnCommonTextBrowserLineIdData()

This class is derived by other classes to retrieve line id information.

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.

pvnDropData()

This class contains the data associated to pvnDrop.

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.

pvnMenuAboutToShowData()

This class contains the data associated to pvnMenuAboutToShow.

pvnPlotPointSelectedData()

This class contains the data associated to pvnPlotPointSelected.

pvnRowSelectedData()

This class contains the data associated to pvnRowSelected.

pvnScriptEditorViewAutoCompleteData()

This class contains the data associated to pvnScriptEditorViewAutoComplete.

pvnTabChangedData()

This class contains the data associated to pvnTabChanged.

pvnTextBrowserClosestLineData()

This class contains the data associated to pvnTextBrowserClosestLine.

pvnTextBrowserGetLineData()

This class contains the data associated to pvnTextBrowserGetLine.

pvnTextBrowserHyperLinkActivatedData()

This class contains the data associated to pvnTextBrowserHyperLinkActivated.

pvnTextBrowserLastLineData()

This class contains the data associated to pvnTextBrowserLastLine.

pvnTextBrowserLineCountData()

This class contains the data associated to pvnTextBrowserLineCount.

pvnTextBrowserNextLineData()

This class contains the data associated to pvnTextBrowserNextLine.

pvnTextBrowserPrevLineData()

This class contains the data associated to pvnTextBrowserPrevLine.

pvnTextBrowserWheelScrollData()

This class contains the data associated to pvnTextBrowserWheelScroll.

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.

proHighlightingNameFromFileName(fname)

Deduces the syntax highlight rules from the extension of the specified file name.

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().

PRO_TEXT_BROWSER_MARKER: Final[int]

Escape code for ProTextBrowserView line.

PRO_TEXT_BROWSER_MAX_LINE_ID: Final[int]

Maximum id for a ProTextBrowserView line.

PRO_TEXT_BROWSER_MAX_LINE_POS: Final[int]

Maximum position in a ProTextBrowserView line.

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.

getSelectedText()

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

goToModule()

Shows the module dialog box.

openMemoryView()

Opens the memory dependent view.

resetSelection()

Resets the selection.

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(), resetSelection() and ProCarbonViewRange.

getSelectedText()str
Returns

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

Return type

str

Available since Cerbero Suite 7.4 and Cerbero Engine 4.4.

See also getSelectedRange() and setSelectedRange().

goToModule()None

Shows the module dialog box.

openMemoryView()None

Opens the memory dependent view.

resetSelection()None

Resets the selection.

Available since Cerbero Suite 7.4 and Cerbero Engine 4.4.

See also getSelectedRange() and setSelectedRange().

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(), resetSelection() 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.

Data_ToolTip

Item tool-tip 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.

isGridVisibile()

Returns True if the table grid is visible; otherwise returns False.

isHorizontalHeaderVisible()

Returns True if the horizontal header is visible; otherwise returns False.

isLastColumnStretched()

Returns True if the last column is automatically stretched; otherwise returns False.

isVerticalHeaderVisible()

Returns True if the vertical header is visible; otherwise returns False.

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.

setGridVisible(visible)

Sets the visibility of the table grid.

setHorizontalHeaderVisible(b)

Sets the visibility of the horizontal header.

setHorizontalPosition(pos)

Sets the horizontal scroll-bar position.

setRowSelection(b)

Sets whether row selection is enabled.

setStretchLastColumn(b)

Sets whether the last column is automatically stretched.

setVerticalHeaderVisible(b)

Sets the visibility of the vertical header.

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.

Data_ToolTip: Final[int]

Item tool-tip request type.

Available since Cerbero Suite 7.1 and Cerbero Engine 4.1.

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().

isGridVisibile()bool
Returns

Returns True if the table grid is visible; otherwise returns False.

Return type

bool

Available since Cerbero Suite 7.4 and Cerbero Engine 7.4.

See also setGridVisible().

isHorizontalHeaderVisible()bool
Returns

Returns True if the horizontal header is visible; otherwise returns False.

Return type

bool

Available since Cerbero Suite 7.4 and Cerbero Engine 7.4.

See also setHorizontalHeaderVisible() and isVerticalHeaderVisible().

isLastColumnStretched()bool
Returns

Returns True if the last column is automatically stretched; otherwise returns False.

Return type

bool

Available since Cerbero Suite 7.4 and Cerbero Engine 7.4.

See also setStretchLastColumn().

isVerticalHeaderVisible()bool
Returns

Returns True if the vertical header is visible; otherwise returns False.

Return type

bool

Available since Cerbero Suite 7.4 and Cerbero Engine 7.4.

See also setVerticalHeaderVisible() and isHorizontalHeaderVisible().

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.

setGridVisible(visible: bool)None

Sets the visibility of the table grid.

Parameters

visible (bool) – If True shows the table grid; otherwise hides it.

Available since Cerbero Suite 7.4 and Cerbero Engine 7.4.

See also isGridVisibile().

setHorizontalHeaderVisible(b: bool)None

Sets the visibility of the horizontal header.

Parameters

b (bool) – If True shows the horizontal header; otherwise hides it.

Available since Cerbero Suite 7.4 and Cerbero Engine 7.4.

See also isHorizontalHeaderVisible() and setVerticalHeaderVisible().

setHorizontalPosition(pos: int)None

Sets the horizontal scroll-bar position.

Parameters

pos (int) – The position to set.

See also getHorizontalPosition() and setVerticalPosition().

setRowSelection(b: bool)None

Sets whether row selection is enabled.

Parameters

b (bool) – If True enables row selection; otherwise disables it.

setStretchLastColumn(b: bool)None

Sets whether the last column is automatically stretched.

Parameters

b (bool) – If True enables auto-stretching of the last column; otherwise disables it.

Available since Cerbero Suite 7.4 and Cerbero Engine 7.4.

See also isLastColumnStretched().

setVerticalHeaderVisible(b: bool)None

Sets the visibility of the vertical header.

Parameters

b (bool) – If True shows the vertical header; otherwise hides it.

Available since Cerbero Suite 7.4 and Cerbero Engine 7.4.

See also isVerticalHeaderVisible() and setHorizontalHeaderVisible().

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.

clearItems()

Clears the list of combo box items.

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.

insertItem(i, text)

Inserts an item into 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, addItem() and removeItem().

clearItems()None

Clears the list of combo box items.

Available since Cerbero Suite 7.4 and Cerbero Engine 4.4.

See also addItem(), 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().

insertItem(i: int, text: str)None

Inserts an item into the combo box.

Parameters
  • i (int) – The index of the item to insert.

  • text (str) – The text of the item to insert.

Available since Cerbero Suite 7.4 and Cerbero Engine 4.4.

See also addItem(), addItems() and removeItem().

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 ProCommandLineInterpreter

This class contains the information needed to add a command line interpreter to a workspace.

Available since Cerbero Suite 6.4 and Cerbero Engine 3.4.

See also ProWorkspace.addCommandLineInterpreter().

Attributes:

history

The history for the command line interpreter.

label

The label visible to the user for the command line interpreter.

language

The syntax highlighting to be used for the command line interpreter.

name

The name of the command line interpreter.

placeholder

The place-holder text for the command line intepreter.

history

The history for the command line interpreter.

label

The label visible to the user for the command line interpreter.

language

The syntax highlighting to be used for the command line interpreter.

name

The name of the command line interpreter.

placeholder

The place-holder text for the command line intepreter.

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().

Methods:

addView(view[, switch_to])

Adds a view to the current workspace.

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

Shows a property editor dialog.

createDialog(view[, width, height])

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.

getCurrentTopLevelView()

Returns the view of the current top level 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[, size])

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

isAllMediaAllowed()

Returns True if all media previews have been allowed by the user in the current workspace; otherwise returns False.

isMainWindowVisible()

Returns True if the main window is visible; otherwise returns False.

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.

setMainWindowVisible(visible)

Sets the visibility of the main window.

startDelayedWait(label[, flags, delay])

Displays a wait-dialog after a specified delay.

startWait(label[, flags])

Displays a wait-dialog.

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, width: int = 0, height: int = 0)Pro.UI.ProDialog

Creates a dialog from a custom view.

Parameters
  • view (ProView) – The child custom view.

  • width (int) – If not zero, specifies the initial width of the dialog. A negative value specifies the width in characters.

  • height (int) – If not zero, specifies the initial height of the dialog. A negative value specifies the height in characters.

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(), getCurrentTopLevelView() and ProView.

getCurrentTopLevelView()Pro.UI.ProView
Returns

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

Return type

ProView

Available since Cerbero Suite 7.4 and Cerbero Engine 7.4.

See also getCurrentView(), getCurrentAnalysisView() and ProView.

getCurrentView()Pro.UI.ProView
Returns

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

Return type

ProView

See also getCurrentTopLevelView(), 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, size: int = 0)None

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

Important

This method works only if called from the context of the analysis workspace and should be called only by actions or analysis views. Analysis views should check the return value of ProView.isNonOrphanedAnalysisView() to avoid jumping to the wrong data.

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

  • size (int) – The number of bytes to select.

isAllMediaAllowed()bool
Returns

Returns True if all media previews have been allowed by the user in the current workspace; otherwise returns False.

Return type

bool

Available since Cerbero Suite 7.8 and Cerbero Engine 4.8.

See also ProMediaView.

isMainWindowVisible()bool
Returns

Returns True if the main window is visible; otherwise returns False.

Return type

bool

Available since Cerbero Suite 7.4 and Cerbero Engine 4.4.

See also setMainWindowVisible().

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().

setMainWindowVisible(visible: bool)None

Sets the visibility of the main window.

Warning

This method is meant to be used only from within the init function of a logic provider.

Parameters

visible (bool) – If True shows the main window; otherwise hides it.

Available since Cerbero Suite 7.4 and Cerbero Engine 4.4.

See also isMainWindowVisible().

startDelayedWait(label: str, flags: int = 0, delay: int = 300)Pro.UI.ProDelayedWait

Displays a wait-dialog after a specified delay.

This method is useful for avoiding wait-dialogs during operations that could potentially complete quickly.

Important

This method should not be used if another wait-dialog might be presented during the operation. In such cases, startWait() must be used, because delayed wait-dialogs do not support nesting.

Parameters
  • label (str) – The label for the wait-dialog.

  • flags (int) – The flags (e.g., Pro.Core.NTIWait.NoProgress).

  • delay (int) – The delay before the wait-dialog appears, in milliseconds.

Returns

Returns the handle to the created wait-dialog.

Return type

ProDelayedWait

Available since Cerbero Suite 8.1 and Cerbero Engine 5.1.

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

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

Displays 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 and startDelayedWait().

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 ProDelayedWait

Bases: Pro.Core.NTIWait

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

Available since Cerbero Suite 8.1 and Cerbero Engine 5.1.

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

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().

Methods:

dockView()

Returns the view contained in the dock if any; otherwise returns an invalid view.

dockView()Pro.UI.ProView
Returns

Returns the view contained in the dock if any; otherwise returns an invalid view.

Return type

ProView

Available since Cerbero Suite 7.4 and Cerbero Engine 7.4.

class ProDockList

List of ProDock 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.ProDock)None

Inserts value at the end of the list.

Parameters

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

See also insert().

at(i: int)Pro.UI.ProDock

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

ProDock

clear()None

Removes all items from the list.

contains(value: Pro.UI.ProDock)bool

Checks the presence of an element in the list.

Parameters

value (ProDock) – 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.ProDock)int

Returns the number of occurrences of value in the list.

Parameters

value (ProDock) – The value to count.

Returns

Returns the number of occurrences.

Return type

int

See also indexOf() and contains().

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

Searches for an element in the list.

Parameters
  • value (ProDock) – 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.ProDock)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 (ProDock) – 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.ProDockListIt

Creates an iterator for the list.

Returns

Returns the iterator.

Return type

ProDockListIt

removeAll(value: Pro.UI.ProDock)int

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

Parameters

value (ProDock) – 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.ProDock

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

ProDock

See also removeAt().

class ProDockListIt(obj: Pro.UI.ProDockList)

Iterator class for ProDockList.

Parameters

obj (ProDockList) – 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.ProDock
Returns

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

Return type

ProDock

See also hasNext() and previous().

previous()Pro.UI.ProDock
Returns

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

Return type

ProDock

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 ProFileInfoView

Bases: Pro.UI.ProView

This class represents a file info view.

Available since Cerbero Suite 7.1 and Cerbero Engine 4.1.

See also ProView.createView(), ProFileSystemView and ProCustomView.

Methods:

computeHash(name)

Computes a cryptographic hash for the current entry if not already computed; otherwise returns the already computed hash.

currentTab()

Returns the name of the current tab.

currentView()

Returns the current view.

getEntryPath()

Returns the path of the current entry.

getFS()

Returns the file system instance if available; otherwise returns an invalid Pro.Core.CFSInstance() instance.

getFileData()

Returns the already retrieved data of the current entry.

getFileEntry()

Returns the current entry.

hasSmallInterface()

Returns True if the interface is small; otherwise returns False.

isQuickLaunchVisible()

Returns True if quick launch is visible; otherwise returns False.

setCurrentTab(name)

Sets the current tab.

setFS(fs_or_obj)

Sets the file system to display.

setFileEntry(entry)

Sets the current entry.

setFileName(name)

Sets the current entry from a file on disk.

setQuickLaunchVisible([b])

Sets whether the quick launch is available.

setSmallInterface([b])

Sets whether the small interface should be used.

computeHash(name: str)str

Computes a cryptographic hash for the current entry if not already computed; otherwise returns the already computed hash.

Supported hashes are: md5 sha1, sha256, sha384, sha512, sha3_224, sha3_256, sha3_384, sha3_512, rmd128, rmd160 and wpool.

Parameters

name (str) – The name of the hash to compute.

Returns

Returns the hash string if successful; otherwise returns an empty string.

Return type

str

currentTab()str
Returns

Returns the name of the current tab.

Return type

str

See also setCurrentTab() and currentView().

currentView()Pro.UI.ProView
Returns

Returns the current view.

Return type

ProView

See also setCurrentTab().

getEntryPath()str
Returns

Returns the path of the current entry.

Return type

str

See also getFileEntry().

getFS()Pro.Core.CFSInstance
Returns

Returns the file system instance if available; otherwise returns an invalid Pro.Core.CFSInstance() instance.

Return type

CFSInstance

Available since Cerbero Suite 7.4 and Cerbero Engine 4.4.

See also setFS().

getFileData()Pro.Core.NTContainer
Returns

Returns the already retrieved data of the current entry.

Return type

NTContainer

See also getFileEntry().

getFileEntry()Pro.Core.CFSEntry
Returns

Returns the current entry.

Return type

CFSEntry

See also setFileEntry() and getFileData().

hasSmallInterface()bool
Returns

Returns True if the interface is small; otherwise returns False.

Return type

bool

See also setSmallInterface().

isQuickLaunchVisible()bool
Returns

Returns True if quick launch is visible; otherwise returns False.

Return type

bool

See also setQuickLaunchVisible().

setCurrentTab(name: str)None

Sets the current tab.

Parameters

name (str) – The name of the tab.

See also currentTab().

setFS(fs_or_obj: Union[Pro.Core.CFFObject, Pro.Core.CFSInstance])None

Sets the file system to display.

Warning

When passing CFFObject, only a weak reference is created to the original object. The original object must not be freed before the file system view is closed or reset.

Parameters

fs_or_obj (Union[CFFObject, CFSInstance]) – The file system to display.

Available since Cerbero Suite 7.4 and Cerbero Engine 4.4.

See also getFS().

setFileEntry(entry: Pro.Core.CFSEntry)None

Sets the current entry.

Parameters

entry (CFSEntry) – The entry.

See also getFileEntry() and setFileName().

setFileName(name: str)None

Sets the current entry from a file on disk.

Note

This method is a wrapper for setFileEntry().

Parameters

name (str) – The file name.

See also setFileEntry().

setQuickLaunchVisible(b: bool = True)None

Sets whether the quick launch is available.

Parameters

b (bool) – If True, makes quick launch available; otherwise makes it unavailable.

See also isQuickLaunchVisible().

setSmallInterface(b: bool = True)None

Sets whether the small interface should be used.

Parameters

b (bool) – If True, uses the small interface; otherwise uses the default interface.

See also hasSmallInterface().

class ProFileSystemView

Bases: Pro.UI.ProView

This class represents a file system view.

In the following example a file system interface is created and shown in a file system view:

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

class MyCFSEntry(CFSEntryInterface):

    def __init__(self, name):
        super(MyCFSEntry, self).__init__()
        self.name = name
        if name.startswith("Dir"):
            self.SetType(CFSEntry.Directory)

    def Name(self):
        return self.name

    def Data(self, wo):
        if self.Type() != CFSEntry.File:
            return NTContainer()
        c = NTContainer()
        c.setData(b"Hello, World!")
        return c

class MyCFSList(CFSListInterface):

    def __init__(self):
        super(MyCFSList, self).__init__()
        self.entries = ["Dir1", "Dir2", "File1", "File2", "File3"]

    def Count(self):
        return len(self.entries)

    def At(self, i):
        if i < 0 or i >= len(self.entries):
            return CFSEntry()
        return CFSEntry(MyCFSEntry(self.entries[i]).__disown__())

class MyCFSInterface(CFSInterface):

    def __init__(self):
        super(MyCFSInterface, self).__init__()

    def FSRootDirectory(self):
        return "/"

    def NewFSList(self, path):
        if path != "/":
            return CFSList()
        return CFSList(MyCFSList().__disown__())

def newFileSystemView():
    ctx = proContext()
    view = ctx.createView(ProView.Type_FS, "File system view")
    fs = CFSInstance(MyCFSInterface().__disown__())
    view.setFS(fs)
    ctx.addView(view)

newFileSystemView()

Available since Cerbero Suite 7.0 and Cerbero Engine 4.0.

See also ProView.createView() and ProCustomView.

Methods:

getCurrentPath()

Returns the current path.

getFS()

Returns the file system instance if available; otherwise returns an invalid Pro.Core.CFSInstance() instance.

getFileInfoView()

Returns the internal ProFileInfoView instance.

getSelectedFile()

Returns the currently selected file name if available; otherwise returns an empty string.

getSelectedFileEntry()

Returns the currently selected file entry if available; otherwise returns an invalid CFSEntry.

getSelectedFilePath()

Returns the currently selected file path if available; otherwise returns an empty string.

setCurrentPath(path)

Sets the current path.

setFS(fs_or_obj)

Sets the file system to display.

setSelectedFile(fname)

Selects a specified file.

setSelectedFilePath(fpath)

Selects a file by specifying its full path.

getCurrentPath()str
Returns

Returns the current path.

Return type

str

See also setCurrentPath().

getFS()Pro.Core.CFSInstance
Returns

Returns the file system instance if available; otherwise returns an invalid Pro.Core.CFSInstance() instance.

Return type

CFSInstance

Available since Cerbero Suite 7.4 and Cerbero Engine 4.4.

See also setFS().

getFileInfoView()Pro.UI.ProFileInfoView
Returns

Returns the internal ProFileInfoView instance.

Return type

ProFileInfoView

Available since Cerbero Suite 7.1 and Cerbero Engine 4.1.

See also ProFileInfoView.

getSelectedFile()str
Returns

Returns the currently selected file name if available; otherwise returns an empty string.

Return type

str

See also setSelectedFile() and getSelectedFileEntry().

getSelectedFileEntry()Pro.Core.CFSEntry
Returns

Returns the currently selected file entry if available; otherwise returns an invalid CFSEntry.

Return type

CFSEntry

See also getSelectedFile().

getSelectedFilePath()str
Returns

Returns the currently selected file path if available; otherwise returns an empty string.

Return type

str

See also setSelectedFilePath().

setCurrentPath(path: str)bool

Sets the current path.

Parameters

path (str) – The path to set.

Returns

Returns True if successful; otherwise returns False.

Return type

bool

See also getCurrentPath().

setFS(fs_or_obj: Union[Pro.Core.CFFObject, Pro.Core.CFSInstance])None

Sets the file system to display.

Warning

When passing CFFObject, only a weak reference is created to the original object. The original object must not be freed before the file system view is closed or reset.

Parameters

fs_or_obj (Union[CFFObject, CFSInstance]) – The file system to display.

See also getFS().

setSelectedFile(fname: str)bool

Selects a specified file.

Parameters

fname (str) – The name of the file to select.

Returns

Returns True if successful; otherwise returns False.

Return type

bool

See also getSelectedFile().

setSelectedFilePath(fpath: str)bool

Selects a file by specifying its full path.

Parameters

fpath (str) – The file path to select.

Returns

Returns True if successful; otherwise returns False.

Return type

bool

See also getSelectedFilePath().

class ProFilterLine

Bases: Pro.UI.ProView

This class represents a filter control.

This control can automatically filter elements in a ProCellTableView and ProTreeView.

The notifications for this control are:

Available since Cerbero Suite 7.2 and Cerbero Engine 4.2.

See also ProCustomView.

Methods:

filter()

Filters again the elements.

getFilterText()

Returns the current text of the filter control.

isMatch(text)

Check whether the specified input text matches the current filter.

setFilterText(text)

Sets the text of the filter control.

setViewToFilter(view)

Sets the associated view to filter.

filter()None

Filters again the elements.

Hint

This method should be called when the items of the associated view have changed.

getFilterText()str
Returns

Returns the current text of the filter control.

Return type

str

See also setFilterText().

isMatch(text: str)bool

Check whether the specified input text matches the current filter.

Parameters

text (str) – The input text.

Returns

Returns True if the input text matches; otherwise returns False.

Return type

bool

Available since Cerbero Suite 7.5 and Cerbero Engine 4.5.

setFilterText(text: str)None

Sets the text of the filter control.

Parameters

text (str) – The text to set.

See also getFilterText().

setViewToFilter(view: Pro.UI.ProView)None

Sets the associated view to filter.

Parameters

view (ProView) – The view to filter.

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.

analysisDelta()

Returns the analysis delta if present; otherwise returns Pro.Core.INVALID_STREAM_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.

hasAnalysisDelta()

Returns True if an analysis delta is present; otherwise returns False.

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.

setDefaultHexLayout()

Sets the default hex layout.

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.

setSmallHexLayout()

Sets the small hex layout.

setUndoable(b)

Sets whether or not the editing operations performed within the hex view can be undone.

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().

analysisDelta()int
Returns

Returns the analysis delta if present; otherwise returns Pro.Core.INVALID_STREAM_OFFSET.

Return type

int

Available since Cerbero Suite 7.3 and Cerbero Engine 4.3.

See also setAnalysisDelta() and hasAnalysisDelta().

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().

hasAnalysisDelta()bool
Returns

Returns True if an analysis delta is present; otherwise returns False.

Return type

bool

Available since Cerbero Suite 7.3 and Cerbero Engine 4.3.

See also setAnalysisDelta() and analysisDelta().

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 hasAnalysisDelta(), analysisDelta(), 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().

setDefaultHexLayout()None

Sets the default hex layout.

Available since Cerbero Suite 7.2 and Cerbero Engine 4.2.

See also setSmallHexLayout().

setEditable(b: bool)None

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

By default the data is not editable.

Important

Even when editing is allowed, the underlying data is not modified unless undo operations are disabled via setUndoable().

Parameters

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

See also setData(), setDataResizable() and setUndoable().

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().

setSmallHexLayout()None

Sets the small hex layout.

Available since Cerbero Suite 7.2 and Cerbero Engine 4.2.

See also setDefaultHexLayout().

setUndoable(b: bool)None

Sets whether or not the editing operations performed within the hex view can be undone.

Important

By default all operation in a hex view can be undone. Disabling undo operations results in the underlying data being directly overwritten when on edit.

Parameters

b (bool) – If True, the operations can be undone; otherwise the operations can’t be undone..

Available since Cerbero Suite 6.4 and Cerbero Engine 3.4.

See also setEditable().

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.

askProcess([include_modules, only_accessible])

Asks the user to select a process.

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 askProcess(include_modules: bool = True, only_accessible: bool = True)Pro.UI.ProInputProcessInfo

Asks the user to select a process.

Important

This method is not available on Mac systems.

Parameters
  • include_modules (bool) – If True, includes per-process modules in the list.

  • only_accessible (bool) – If True, only processes that can be opened for read-access are included in the list.

Returns

Returns the selected process information if successful; otherwise returns an invalid ProInputProcessInfo instance.

Return type

ProInputProcessInfo

Available since Cerbero Suite 6.4 and Cerbero Engine 3.4.

See also ProInputProcessInfo.

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 ProInputProcessInfo

This class contains the information returned by ProInput.askProcess().

Available since Cerbero Suite 6.4 and Cerbero Engine 3.4.

See also ProInput.askProcess().

Attributes:

base

The base of the selected range.

label

The label of the selected item.

pid

The id of the selected process.

size

The size of selected range.

Methods:

hasRange()

Returns True if the instance contains a specific range; otherwise returns False.

isValid()

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

base

The base of the selected range.

See also hasRange().

hasRange()bool
Returns

Returns True if the instance contains a specific range; otherwise returns False.

Return type

bool

isValid()bool
Returns

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

Return type

bool

label

The label of the selected item.

pid

The id of the selected process.

size

The size of selected range.

See also hasRange().

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.

isAllowed()

Returns True if the media is allowed; otherwise returns False.

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).

setAllowed(b)

Sets whether the media is allowed to be shown.

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().

isAllowed()bool
Returns

Returns True if the media is allowed; otherwise returns False.

Return type

bool

Available since Cerbero Suite 7.7 and Cerbero Engine 4.7.

See also setAllowed().

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

setAllowed(b: bool)None

Sets whether the media is allowed to be shown.

Parameters

b (bool) – If True, sets the media to be allowed.

Available since Cerbero Suite 7.7 and Cerbero Engine 4.7.

See also isAllowed().

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.

addFavoriteActions()

Adds favorite actions to the menu.

addSeparator()

Adds a separator to the menu.

clear()

Clears all menu items.

free()

Deletes the menu.

getTitle()

Returns the title of the menu if any; otherwise returns an empty string.

isNull()

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

setTitle(title)

Sets the title of the menu.

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().

addFavoriteActions()None

Adds favorite actions to the menu.

Available since Cerbero Suite 8.0 and Cerbero Engine 5.0.

addSeparator()None

Adds a separator to the menu.

See also addAction() and addCopyAction().

clear()None

Clears all menu items.

Available since Cerbero Suite 7.4 and Cerbero Engine 4.4.

free()None

Deletes the menu.

Available since Cerbero Suite 7.4 and Cerbero Engine 4.4.

getTitle()str
Returns

Returns the title of the menu if any; otherwise returns an empty string.

Return type

str

Available since Cerbero Suite 7.4 and Cerbero Engine 7.4.

See also setTitle().

isNull()bool
Returns

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

Return type

bool

setTitle(title: str)None

Sets the title of the menu.

Parameters

title (str) – The title to set.

Available since Cerbero Suite 7.4 and Cerbero Engine 4.4.

See also getTitle().

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:

getButtonIconSize()

Returns the icon size of the button.

isFlat()

Returns True if the button is flat; otherwise returns False.

setButtonIcon(icon)

Sets the icon for the button.

setButtonIconSize(size)

Sets the icon size for the button.

setFlat(b)

Sets the whether the button is flat.

setMenu(menu)

Sets the menu for the button.

setText(txt)

Sets the button text.

text()

Returns the button text.

getButtonIconSize()Pro.UI.ProUISize
Returns

Returns the icon size of the button.

Return type

ProUISize

Available since Cerbero Suite 7.6 and Cerbero Engine 4.6.

See also setButtonIconSize().

isFlat()bool
Returns

Returns True if the button is flat; otherwise returns False.

Return type

bool

Available since Cerbero Suite 7.6 and Cerbero Engine 4.6.

See also setFlat().

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().

setButtonIconSize(size: Pro.UI.ProUISize)None

Sets the icon size for the button.

Parameters

size (ProUISize) – The icon size.

Available since Cerbero Suite 7.6 and Cerbero Engine 4.6.

See also getButtonIconSize().

setFlat(b: bool)None

Sets the whether the button is flat.

Parameters

b (bool) – If True, makes the button flat.

Available since Cerbero Suite 7.6 and Cerbero Engine 4.6.

See also isFlat().

setMenu(menu: Pro.UI.ProMenu)None

Sets the menu for the button.

Parameters

menu (ProMenu) – The menu.

Available since Cerbero Suite 7.4 and Cerbero Engine 4.4.

See also ProView.addMenu() and ProMenu.

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 ProScriptEditorView

Bases: Pro.UI.ProView

This class represents a script editor.

The notifications for this control are:

Available since Cerbero Suite 7.3 and Cerbero Engine 4.3.

See also ProCustomView.

Methods:

getEditorText()

Returns the text of the editor.

hasUnsavedChanges()

Returns True if there are unsaved changes; otherwise returns False.

isEditorEmpty()

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

isFile()

Returns True if the current script is a file; otherwise returns False.

openScript(name)

Opens an internal script.

openScriptFile(fname)

Opens a script from disk.

runScript()

Runs the current script.

save([no_name])

Saves the current script.

saveAs()

Saves the current script with a name chosen by the user.

saveScriptAs(fname)

Saves the script to disk.

scriptName()

Returns the name of the script.

setEditorText(text)

Sets the text of the editor.

shortScriptName()

Returns the short name of the script.

getEditorText()str
Returns

Returns the text of the editor.

Return type

str

See also setEditorText().

hasUnsavedChanges()bool
Returns

Returns True if there are unsaved changes; otherwise returns False.

Return type

bool

See also isEditorEmpty().

isEditorEmpty()bool
Returns

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

Return type

bool

See also hasUnsavedChanges().

isFile()bool
Returns

Returns True if the current script is a file; otherwise returns False.

Return type

bool

openScript(name: str)bool

Opens an internal script.

Parameters

name (str) – The name of the internal script to open.

Returns

Returns True if successful; otherwise returns False.

Return type

bool

See also openScriptFile(), save() and saveAs().

openScriptFile(fname: str)bool

Opens a script from disk.

Parameters

fname (str) – The file name of the script to open.

Returns

Returns True if successful; otherwise returns False.

Return type

bool

See also openScript(), save() and saveAs().

runScript()None

Runs the current script.

save(no_name: bool = True)bool

Saves the current script.

Parameters

no_name (bool) – If True, the method will revert to saveAs() if the changes were not previously saved; otherwise the method will fail.

Returns

Returns True if successful; otherwise returns False.

Return type

bool

See also saveAs(), saveScriptAs() and openScript().

saveAs()bool

Saves the current script with a name chosen by the user.

Returns

Returns True if successful; otherwise returns False.

Return type

bool

See also save(), saveScriptAs() and openScript().

saveScriptAs(fname: str)bool

Saves the script to disk.

Parameters

fname (str) – The file name of the script.

Returns

Returns True if successful; otherwise returns False.

Return type

bool

See also saveAs(), save() and openScriptFile().

scriptName()str
Returns

Returns the name of the script.

Return type

str

See also shortScriptName().

setEditorText(text: str)None

Sets the text of the editor.

Parameters

text (str) – The text to set.

See also getEditorText().

shortScriptName()str
Returns

Returns the short name of the script.

Return type

str

See also scriptName().

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[, restore_state])

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, restore_state: bool = False)None

Sets the row count for the table.

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

  • restore_state (bool) – If True, the current position and selection is not changed.

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().

ProTextBrowserCode_AltEscape: Final[int]

Code for a ProTextBrowserView line.

ProTextBrowserCode_BGColor: Final[int]

Code for a ProTextBrowserView line.

ProTextBrowserCode_Bold: Final[int]

Code for a ProTextBrowserView line.

ProTextBrowserCode_Default: Final[int]

Code for a ProTextBrowserView line.

ProTextBrowserCode_Escape: Final[int]

Code for a ProTextBrowserView line.

ProTextBrowserCode_HighlightEnd: Final[int]

Code for a ProTextBrowserView line.

ProTextBrowserCode_HighlightStart: Final[int]

Code for a ProTextBrowserView line.

ProTextBrowserCode_HyperLinkEnd: Final[int]

Code for a ProTextBrowserView line.

ProTextBrowserCode_HyperLinkStart: Final[int]

Code for a ProTextBrowserView line.

ProTextBrowserCode_LineInfo: Final[int]

Code for a ProTextBrowserView line.

ProTextBrowserCode_LineMarker: Final[int]

Code for a ProTextBrowserView line.

ProTextBrowserCode_LineNumber: Final[int]

Code for a ProTextBrowserView line.

Available since Cerbero Suite 7.0 and Cerbero Engine 4.0.

ProTextBrowserCode_SelectionEnd: Final[int]

Code for a ProTextBrowserView line.

ProTextBrowserCode_SelectionStart: Final[int]

Code for a ProTextBrowserView line.

ProTextBrowserCode_TextColor: Final[int]

Code for a ProTextBrowserView line.

class ProTextBrowserColors

This class contains the base colors for a ProTextBrowserView.

See also ProTextBrowserView.getColors(), ProTextBrowserView.setColors() and ProTextBrowserView.loadCarbonTheme().

Attributes:

background

32-bit unsigned integer which represents the background color.

cursor

32-bit unsigned integer which represents the cursor color.

highlight

32-bit unsigned integer which represents the highlight background color.

highlight_text

32-bit unsigned integer which represents the highlight text color.

line_highlight

32-bit unsigned integer which represents the line highlight background color.

selection

32-bit unsigned integer which represents the selection background color.

selection_text

32-bit unsigned integer which represents the selection text color.

text

32-bit unsigned integer which represents the text color.

background

32-bit unsigned integer which represents the background color.

See also Pro.Core.ntRgb().

cursor

32-bit unsigned integer which represents the cursor color.

See also Pro.Core.ntRgb().

highlight

32-bit unsigned integer which represents the highlight background color.

See also Pro.Core.ntRgb().

highlight_text

32-bit unsigned integer which represents the highlight text color.

See also Pro.Core.ntRgb().

line_highlight

32-bit unsigned integer which represents the line highlight background color.

See also Pro.Core.ntRgb().

selection

32-bit unsigned integer which represents the selection background color.

See also Pro.Core.ntRgb().

selection_text

32-bit unsigned integer which represents the selection text color.

See also Pro.Core.ntRgb().

text

32-bit unsigned integer which represents the text color.

See also Pro.Core.ntRgb().

This class contains the data of a ProTextBrowserView hyper-link.

See also ProTextBrowserView.

Methods:

clear()

Clears the data.

Attributes:

data

An unsigned 64-bit integer representing the data of the hyper-link.

type

An unsigned 8-bit integer representing the type of hyper-link.

clear()None

Clears the data.

data

An unsigned 64-bit integer representing the data of the hyper-link.

type

An unsigned 8-bit integer representing the type of hyper-link.

ProTextBrowserLineHighlightPolicy_Always: Final[int]

Line highlight policy for ProTextBrowserView.

See also ProTextBrowserView.setLineHighlightPolicy().

ProTextBrowserLineHighlightPolicy_Never: Final[int]

Line highlight policy for ProTextBrowserView.

See also ProTextBrowserView.setLineHighlightPolicy().

ProTextBrowserLineHighlightPolicy_NoFocus: Final[int]

Line highlight policy for ProTextBrowserView.

See also ProTextBrowserView.setLineHighlightPolicy().

class ProTextBrowserParser

This class can be used to parse custom text lines built using ProTextBrowserStringBuilder.

A code example:

from Pro.UI import *

class Parser(ProTextBrowserParser):

    def __init__(self):
        super(Parser, self).__init__()

    def visitText(self, text):
        print(text)
        return 0

    def visitCode(self, code, data):
        print(code, data)
        return 0

b = ProTextBrowserStringBuilder()
b.setTextColor(0, 0, 180)
b.append("This is line number ")
b.setTextColor(180, 0, 0)
b.append(str(1) + " ")
b.setTextColor(0, 180, 0)
b.beginHyperLink(1, 0)
b.append("This is a hyper-link.")
b.endHyperLink()

p = Parser()
p.parse(b.buffer)

Available since Cerbero Suite 7.0 and Cerbero Engine 4.0.

See also ProTextBrowserStringBuilder.

Methods:

charCount(s)

Counts the characters in a line.

endPos(l)

Calculates the end position for a multi-line.

extractLineNumber(s)

Extracts the line number from an input line.

findLineMarker(l, marker)

In a multi-line returns the index of the line containing a line marker.

parse(buf[, len])

Parses a line built using ProTextBrowserStringBuilder.

stripTextCodes(l_or_s)

Strips all codes from a single or multi-line and returns the text-only version.

visitCode(code, data)

This method can be overridden and is called by parse() when a data chunk is encountered in the parsed line.

visitText(text)

This method can be overridden and is called by parse() when a text chunk is encountered in the parsed line.

static charCount(s: TBString)int

Counts the characters in a line.

Parameters

s (TBString) – The input line.

Returns

Returns the number of characters contained in the input line.

Return type

int

static endPos(l: NTByteArrayList)TextLinePos

Calculates the end position for a multi-line.

Parameters

l (NTByteArrayList) – The input multi-line.

Returns

Returns the calculated end position.

Return type

TextLinePos

static extractLineNumber(s: TBString)TextLineId

Extracts the line number from an input line.

Parameters

s (TBString) – The input line.

Returns

Returns the extracted line number if successful; otherwise returns PRO_TEXT_BROWSER_MAX_LINE_ID.

Return type

TextLineId

static findLineMarker(l: Pro.Core.NTByteArrayList, marker: int)int

In a multi-line returns the index of the line containing a line marker.

Parameters
  • l (NTByteArrayList) – The multi-line.

  • marker (int) – The marker to find.

Returns

Returns the line index if successful; otherwise returns -1.

Return type

int

parse(buf: Union[TBString, str], len: Optional[int] = None)int

Parses a line built using ProTextBrowserStringBuilder.

Parameters
  • buf (Union[TBString, str]) – The input

  • len (Optional[int]) – The optional length of the data to parse.

Returns

Returns the value returned by either visitText() or visitCode(); otherwise returns 0.

Return type

int

See also visitText(), visitCode() and ProTextBrowserStringBuilder.

static stripTextCodes(l_or_s: Union[NTByteArrayList, TBString])Union[NTByteArrayList, TBString]

Strips all codes from a single or multi-line and returns the text-only version.

Parameters

l_or_s (Union[NTByteArrayList, TBString]) – The single or multi-line.

Returns

Returns the text-only version of the input.

Return type

Union[NTByteArrayList, TBString]

visitCode(code: int, data: int)int

This method can be overridden and is called by parse() when a data chunk is encountered in the parsed line.

Parameters
  • code (int) – The data code.

  • data (int) – The data associated with the data code.

Returns

Returns 0 to continue the parsing of the line; otherwise stops the parsing and parse() returns the same value returned by this method.

Return type

int

See also visitText() and parse().

visitText(text: str)int

This method can be overridden and is called by parse() when a text chunk is encountered in the parsed line.

Parameters

text (str) – The text chunk.

Returns

Returns 0 to continue the parsing of the line; otherwise stops the parsing and parse() returns the same value returned by this method.

Return type

int

See also visitCode() and parse().

class ProTextBrowserRange

This class represents a range of text in ProTextBrowserView.

See also ProTextBrowserView.

Methods:

clearRange()

Clears the range.

order()

Orders the range.

toString()

Returns the range as a printable string.

Attributes:

end_line

The id of the end line.

end_pos

The end position.

start_line

The id of the start line.

start_pos

The start position.

clearRange()None

Clears the range.

end_line

The id of the end line.

end_pos

The end position.

order()None

Orders the range.

start_line

The id of the start line.

start_pos

The start position.

toString()str
Returns

Returns the range as a printable string.

Return type

str

class ProTextBrowserStringBuilder

This class must be used to create custom text lines for ProTextBrowserView.

See also ProTextBrowserView, ProTextBrowserView.setLines(), pvnTextBrowserGetLine and ProTextBrowserParser.

Methods:

addLineMarker(marker)

Adds a line marker.

addLineNumber(n)

Adds a line number.

append(c_or_s[, len])

Appends a string or character.

beginHyperLink(type, data)

Starts a hyper-link.

clear()

Clears the contents without causing memory allocations.

endHyperLink()

Ends a hyper-link.

getBuffer()

Returns the resulting line buffer.

isEmpty()

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

pad(n)

Pads the line.

padOrSpace(n)

Either pads or adds a space to the line.

pad_or_space(n)

Either pads or adds a space to the line.

rpad(n)

Adds relative padding to the line.

setBgColor(r_or_rgb[, g, b])

Sets the background color.

setBold()

Makes the text bold.

setDefault()

Makes the text the default style.

setTextColor(r_or_rgb[, g, b])

Sets the text color.

Attributes:

buffer

The resulting line buffer.

char_count

The current character count.

addLineMarker(marker: int)None

Adds a line marker.

Parameters

marker (int) – The marker to add.

addLineNumber(n: TextLineId)None

Adds a line number.

Parameters

n (TextLineId) – The line number to add.

Available since Cerbero Suite 7.0 and Cerbero Engine 4.0.

append(c_or_s: Union[int, str], len: int = - 1)None

Appends a string or character.

Parameters

c_or_s (Union[int, str]) – The string or character to append.

Starts a hyper-link.

Parameters
  • type (TextBrowserHyperLinkType) – The unsigned 8-bit hyper-link type.

  • data (TextBrowserHyperLinkData) – The unsigned 64-bit hyper-link data.

See also endHyperLink().

buffer

The resulting line buffer.

char_count

The current character count.

clear()None

Clears the contents without causing memory allocations.

Available since Cerbero Suite 7.0 and Cerbero Engine 4.0.

Ends a hyper-link.

See also beginHyperLink().

getBuffer()TBString
Returns

Returns the resulting line buffer.

Return type

TBString

Available since Cerbero Suite 7.0 and Cerbero Engine 4.0.

See also buffer.

isEmpty()bool
Returns

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

Return type

bool

Available since Cerbero Suite 7.0 and Cerbero Engine 4.0.

pad(n: int)None

Pads the line.

Parameters

n (int) – The amount of padding.

See also pad_or_space() and rpad().

padOrSpace(n: int)None

Either pads or adds a space to the line.

Parameters

n (int) – The amount of padding.

Available since Cerbero Suite 7.0 and Cerbero Engine 4.0.

See also pad() and rpad().

pad_or_space(n: int)None

Either pads or adds a space to the line.

Note

This method is equivalent to padOrSpace().

Parameters

n (int) – The amount of padding.

See also pad() and rpad().

rpad(n: int)None

Adds relative padding to the line.

Note

This is equivalent to pad(char_count + n).

Parameters

n (int) – The amount of relative padding.

See also pad() and pad_or_space().

setBgColor(r_or_rgb: int, g: Optional[int] = None, b: Optional[int] = None)None

Sets the background color.

Parameters
  • r_or_rgb (int) – Either the unsigned 32-bit RGB value or the amount of red.

  • g (Optional[int]) – The amount of green.

  • b (Optional[int]) – The amount of blue

See also setTextColor() and Pro.Core.ntRgb().

setBold()None

Makes the text bold.

See also setDefault().

setDefault()None

Makes the text the default style.

See also setBold().

setTextColor(r_or_rgb: int, g: Optional[int] = None, b: Optional[int] = None)None

Sets the text color.

Parameters
  • r_or_rgb (int) – Either the unsigned 32-bit RGB value or the amount of red.

  • g (Optional[int]) – The amount of green.

  • b (Optional[int]) – The amount of blue

See also setBgColor() and Pro.Core.ntRgb().

class ProTextBrowserView

Bases: Pro.UI.ProView

This class represents a text browser.

The notifications for this control are:

To display plain text, setPlainText() can be called. To display custom lines without having to handle UI notifications, setLines() can be called.

The following is an example of a text browser displaying user provided custom lines:

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

class CustomView:

    @staticmethod
    def callback(cv, self, code, view, data):
        if code == pvnInit:
            t = cv.getView(1)
            t.showCustomLines()
            return 1
        elif code == pvnTextBrowserLineCount:
            vid = view.id()
            if vid == 1:
                data.setCount(100)
        elif code == pvnTextBrowserGetLine:
            vid = view.id()
            if vid == 1:
                b = ProTextBrowserStringBuilder()
                b.setTextColor(0, 0, 180)
                b.append("This is line number ")
                b.setTextColor(180, 0, 0)
                b.append(str(data.id + 1) + " ")
                b.setTextColor(0, 180, 0)
                b.beginHyperLink(1, 0)
                b.append("This is a hyper-link.")
                b.endHyperLink()
                data.setLine(b.buffer)
        elif code == pvnTextBrowserHyperLinkActivated:
            vid = view.id()
            if vid == 1:
                proContext().msgBox(MBIconInfo, "Hyper-link activated!")
        return 0

    def show(self):
        ctx = proContext()
        v = ctx.createView(ProView.Type_Custom, "Text Browser Demo")
        v.setup("<ui><vl margin='0'><textbr id='1'/></vl></ui>", self.callback, self)
        ctx.addView(v)

cv = CustomView()
cv.show()

Available since Cerbero Suite 6.0 and Cerbero Engine 3.0.

See also ProCustomView.

Attributes:

CustomLines_Sparse

Option for showCustomLines().

Methods:

currentLine()

Returns a tuple containing the current line and position.

cursorLine()

Returns a tuple containing the cursor line and position.

enableHorizontalScrollBar(enable)

Sets whether the horizontal scroll-bar is enabled.

enableVerticalScrollBar(enable)

Sets whether the vertical scroll-bar is enabled.

getColors()

Returns the basic colors of the text browser.

getData()

Returns the raw text data of the view.

getLineHighlightPolicy()

Returns the line highlight policy (e.g., ProTextBrowserLineHighlightPolicy_Always).

getSelectedRange(range)

Retrieves the selected text range information.

getSelectedText()

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

getText()

Retrieves the text of the view.

getTextTags()

Returns the text tags if available; otherwise returns an invalid Pro.Core.NTTextTags() instance.

getTextWrap()

Retrieves the amount of characters allowed on a single line.

hasData()

Returns True if the text browser has data; otherwise returns False.

hyperLinkFollowAction()

Returns the UI action used to follow hyper-links.

isHorizontalScrollBarEnabled()

Returns True if the horizontal scroll-bar is enabled; otherwise returns False.

isVerticalScrollBarEnabled()

Returns True if the vertical scroll-bar is enabled; otherwise returns False.

loadCarbonTheme(theme)

Loads the basic colors for the text browser from a Carbon theme.

maxLineCharacters()

Returns the maximum number of characters which can be displayed on a single line.

maxVisibleLineLength()

Returns the maximum number of characters which are visible horizontally.

maxVisibleLines()

Returns the maximum number of visible lines.

resetSelection()

Resets the selection.

setColors(colors)

Sets the basic colors of the text browser.

setCurrentLine(id[, pos])

Sets the current line.

setCursorLine(id[, pos])

Sets the cursor line.

setData(data[, language, encoding])

Sets the raw text data of the text view.

setDisassemblyFont([b])

Sets whether the view uses the disassembly font.

setLineHighlightPolicy(policy)

Sets the line highlight policy.

setLines(lines)

Sets the custom lines of the text browser.

setPlainText(text_or_text_stream[, language])

Sets the plain text of the text browser.

setSelectedRange(range)

Sets the selected text range.

setStatusBarVisible(b)

Sets the visibility of the status bar.

setTextTags(tags)

Sets the text tags of the text browser view.

setTextWrap(wrap)

Sets the amount of characters allowed on a single line.

showCustomLines([options])

Displays custom lines retrieved using UI notifications.

CustomLines_Sparse: Final[int]

Option for showCustomLines().

Specifies that the displayed lines may not be sequential.

See also showCustomLines().

currentLine()tuple
Returns

Returns a tuple containing the current line and position.

Return type

tuple[int, int]

See also setCurrentLine() and cursorLine().

cursorLine()tuple
Returns

Returns a tuple containing the cursor line and position.

Return type

tuple[int, int]

See also setCursorLine() and currentLine().

enableHorizontalScrollBar(enable: bool)None

Sets whether the horizontal scroll-bar is enabled.

Parameters

enable (bool) – If True, enables the scroll-bar; otherwise disables it.

Available since Cerbero Suite 6.4 and Cerbero Engine 3.4.

See also isHorizontalScrollBarEnabled().

enableVerticalScrollBar(enable: bool)None

Sets whether the vertical scroll-bar is enabled.

Parameters

enable (bool) – If True, enables the scroll-bar; otherwise disables it.

Available since Cerbero Suite 6.4 and Cerbero Engine 3.4.

See also isVerticalScrollBarEnabled().

getColors()Pro.UI.ProTextBrowserColors
Returns

Returns the basic colors of the text browser.

Return type

ProTextBrowserColors

See also setColors().

getData()Pro.Core.NTContainer
Returns

Returns the raw text data of the view.

Return type

NTContainer

See also setData() and setPlainText().

getLineHighlightPolicy()int
Returns

Returns the line highlight policy (e.g., ProTextBrowserLineHighlightPolicy_Always).

Return type

int

See also setLineHighlightPolicy().

getSelectedRange(range: Pro.UI.ProTextBrowserRange)bool

Retrieves the selected text range information.

Parameters

range (ProTextBrowserRange) – The range to retrieve.

Returns

Returns True if successful; otherwise returns False.

Return type

bool

See also setSelectedRange() and resetSelection().

getSelectedText()str
Returns

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

Return type

str

See also setSelectedRange().

getText()str

Retrieves the text of the view.

Warning

The returned text can be incomplete in case of large amounts of text. This method should not be used for such cases.

Returns

Returns the text of the view if successful; otherwise returns a partial amount of text.

Return type

str

Available since Cerbero Suite 7.0 and Cerbero Engine 4.0.

See also getData().

getTextTags()Pro.Core.NTTextTags
Returns

Returns the text tags if available; otherwise returns an invalid Pro.Core.NTTextTags() instance.

Return type

NTTextTags

Available since Cerbero Suite 7.6 and Cerbero Engine 4.6.

See also setTextTags().

getTextWrap()int

Retrieves the amount of characters allowed on a single line.

Important

Text wrapping occurs only when either setData() or setPlainText() are used to set the contents of the view.

Returns

Returns the amount of characters allowed on a single line.

Return type

int

Available since Cerbero Suite 7.0 and Cerbero Engine 4.0.

See also setTextWrap().

hasData()bool
Returns

Returns True if the text browser has data; otherwise returns False.

Return type

bool

Available since Cerbero Suite 7.6 and Cerbero Engine 4.6.

See also setData() and setPlainText().

hyperLinkFollowAction()Pro.UI.ProUIAction
Returns

Returns the UI action used to follow hyper-links.

Return type

ProUIAction

See also ProUIAction.

isHorizontalScrollBarEnabled()bool
Returns

Returns True if the horizontal scroll-bar is enabled; otherwise returns False.

Return type

bool

Available since Cerbero Suite 6.4 and Cerbero Engine 3.4.

See also enableHorizontalScrollBar().

isVerticalScrollBarEnabled()bool
Returns

Returns True if the vertical scroll-bar is enabled; otherwise returns False.

Return type

bool

Available since Cerbero Suite 6.4 and Cerbero Engine 3.4.

See also enableVerticalScrollBar().

loadCarbonTheme(theme: Pro.UI.ProTheme)None

Loads the basic colors for the text browser from a Carbon theme.

Parameters

theme (ProTheme) – The Carbon theme.

See also setColors().

maxLineCharacters()int
Returns

Returns the maximum number of characters which can be displayed on a single line.

Return type

int

See also maxVisibleLineLength() and maxVisibleLines().

maxVisibleLineLength()int
Returns

Returns the maximum number of characters which are visible horizontally.

Return type

int

See also maxLineCharacters() and maxVisibleLines().

maxVisibleLines()int
Returns

Returns the maximum number of visible lines.

Return type

int

See also maxLineCharacters() and maxVisibleLineLength().

resetSelection()None

Resets the selection.

See also getSelectedRange() and setSelectedRange().

setColors(colors: Pro.UI.ProTextBrowserColors)None

Sets the basic colors of the text browser.

Parameters

colors (ProTextBrowserColors) – The colors to set.

setCurrentLine(id: TextLineId, pos: Optional[TextLinePos] = None)None

Sets the current line.

Parameters
  • id (TextLineId) – The line id.

  • pos (Optional[TextLinePos]) – The line position.

See also currentLine() and setCursorLine().

setCursorLine(id: TextLineId, pos: Optional[TextLinePos] = None)None

Sets the cursor line.

Parameters
  • id (TextLineId) – The line id.

  • pos (Optional[TextLinePos]) – The line position.

See also cursorLine() and setCurrentLine().

setData(data: Pro.Core.NTContainer, language: str = str(), encoding: str = str())bool

Sets the raw text data of the text view.

Note

If the encoding is not specified, the view automatically deduces the encoding using advanced heuristics.

Currently supported languages are:

  • ActionScript2 - Highlighting for Adobe ActionScript2.

  • ActionScript3 - Highlighting for Adobe ActionScript3.

  • C# - Highlighting for C#.

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

  • CSS - Highlighting for CSS.

  • Dalvik - Highlighting for Android Dalvik byte-code.

  • Dart - Highlighting for Dart.

  • Go - Highlighting for Go.

  • Java - Highlighting for Java.

  • JavaByteCode - Highlighting for Java byte-code.

  • JavaScript - Highlighting for JavaScript.

  • JSON - Highlighting for JSON.

  • Julia - Highlighting for Julia.

  • Kotlin - Highlighting for Kotlin.

  • Lua - Highlighting for Lua.

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

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

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

  • Perl - Highlighting for Perl.

  • PHP - Highlighting for PHP.

  • PowerShell - Highlighting for PowerShell.

  • Python - Highlighting for Python.

  • R - Highlighting for R.

  • Ruby - Highlighting for Ruby.

  • Rust - Highlighting for Rust.

  • Scala - Highlighting for Scala.

  • Shell - Highlighting for BASH.

  • SQL - Highlighting for SQL.

  • Swift - Highlighting for Swift.

  • TrueType - Highlighting for TrueType font byte-code.

  • Type1 - Highlighting for Type1 font byte-code.

  • TypeScript - Highlighting for TypeScript.

  • VBA - Highlighting for VBA and VBS.

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

  • XML - Highlighting for XML.

  • YARA - Highlighting for YARA rules.

Parameters
  • data (NTContainer) – The raw text data.

  • language (str) – The highlighting rules of the text.

  • encoding (str) – The encoding of the text.

Returns

Returns True if successful; otherwise returns False.

Return type

bool

Available since Cerbero Suite 7.0 and Cerbero Engine 4.0.

See also getData(), setPlainText() and proHighlightingNameFromFileName().

setDisassemblyFont(b: bool = True)None

Sets whether the view uses the disassembly font.

Parameters

b (bool) – If True, sets the disassembly font; otherwise sets the regular font.

Available since Cerbero Suite 7.0 and Cerbero Engine 4.0.

setLineHighlightPolicy(policy: int)None

Sets the line highlight policy.

Parameters

policy (int) – The policy to set (e.g., ProTextBrowserLineHighlightPolicy_Always).

See also getLineHighlightPolicy().

setLines(lines: Pro.Core.NTByteArrayList)None

Sets the custom lines of the text browser.

Hint

Each line in the list must have been created using ProTextBrowserStringBuilder.

Parameters

lines (NTByteArrayList) – The custom lines.

See also setPlainText() and showCustomLines().

setPlainText(text_or_text_stream: Union[Pro.Core.NTTextBuffer, str], language: str = str())None

Sets the plain text of the text browser.

Note

Internally this function calls setData().

Currently supported languages are:

  • ActionScript2 - Highlighting for Adobe ActionScript2.

  • ActionScript3 - Highlighting for Adobe ActionScript3.

  • C# - Highlighting for C#.

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

  • CSS - Highlighting for CSS.

  • Dalvik - Highlighting for Android Dalvik byte-code.

  • Dart - Highlighting for Dart.

  • Go - Highlighting for Go.

  • Java - Highlighting for Java.

  • JavaByteCode - Highlighting for Java byte-code.

  • JavaScript - Highlighting for JavaScript.

  • JSON - Highlighting for JSON.

  • Julia - Highlighting for Julia.

  • Kotlin - Highlighting for Kotlin.

  • Lua - Highlighting for Lua.

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

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

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

  • Perl - Highlighting for Perl.

  • PHP - Highlighting for PHP.

  • PowerShell - Highlighting for PowerShell.

  • Python - Highlighting for Python.

  • R - Highlighting for R.

  • Ruby - Highlighting for Ruby.

  • Rust - Highlighting for Rust.

  • Scala - Highlighting for Scala.

  • Shell - Highlighting for BASH.

  • SQL - Highlighting for SQL.

  • Swift - Highlighting for Swift.

  • TrueType - Highlighting for TrueType font byte-code.

  • Type1 - Highlighting for Type1 font byte-code.

  • TypeScript - Highlighting for TypeScript.

  • VBA - Highlighting for VBA and VBS.

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

  • XML - Highlighting for XML.

  • YARA - Highlighting for YARA rules.

Parameters
  • text_or_text_stream (Union[NTTextBuffer, str]) – The text to set.

  • language (str) – The highlighting rules of the text.

See also setData(), proHighlightingNameFromFileName(), setLines() and showCustomLines().

setSelectedRange(range: Pro.UI.ProTextBrowserRange)None

Sets the selected text range.

Parameters

range (ProTextBrowserRange) – The range of text to select.

See also getSelectedRange() and resetSelection().

setStatusBarVisible(b: bool)None

Sets the visibility of the status bar.

Parameters

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

setTextTags(tags: Pro.Core.NTTextTags)None

Sets the text tags of the text browser view.

Parameters

tags (NTTextTags) – The text tags.

Available since Cerbero Suite 7.6 and Cerbero Engine 4.6.

See also getTextTags().

setTextWrap(wrap: int)None

Sets the amount of characters allowed on a single line.

Important

Text wrapping occurs only when either setData() or setPlainText() are used to set the contents of the view.

Parameters

wrap (int) – The amount of characters allowed on a single line.

Available since Cerbero Suite 7.0 and Cerbero Engine 4.0.

See also getTextWrap().

showCustomLines(options: int = 0)None

Displays custom lines retrieved using UI notifications.

Parameters

options (int) – The options for the custom lines (e.g., CustomLines_Sparse).

See also setPlainText() and setLines().

class ProTextLine

Bases: Pro.UI.ProView

This class represents a text line control.

The notifications for this control are:

See also ProCustomView.

Methods:

isClearButtonEnabled()

Returns True if the clear button is enabled; otherwise returns False.

placeholderText()

Returns the place-holder text of the control.

setClearButtonEnabled(b)

Sets whether the clear button is enabled.

setPlaceholderText(text)

Sets the place-holder text of the control.

setText(text)

Sets the text of the control.

text()

Returns the text of the control.

isClearButtonEnabled()bool
Returns

Returns True if the clear button is enabled; otherwise returns False.

Return type

bool

Available since Cerbero Suite 7.3 and Cerbero Engine 4.3.

See also setClearButtonEnabled().

placeholderText()str
Returns

Returns the place-holder text of the control.

Return type

str

Available since Cerbero Suite 5.7 and Cerbero Engine 2.7.

See also setPlaceholderText().

setClearButtonEnabled(b: bool)None

Sets whether the clear button is enabled.

Parameters

b (bool) – If True, enables the clear button; otherwise disables it.

Available since Cerbero Suite 7.3 and Cerbero Engine 4.3.

See also isClearButtonEnabled().

setPlaceholderText(text: str)None

Sets the place-holder text of the control.

Parameters

text (str) – The text to set.

Available since Cerbero Suite 5.7 and Cerbero Engine 2.7.

See also placeholderText().

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# - Highlighting for C#.

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

  • CSS - Highlighting for CSS.

  • Dalvik - Highlighting for Android Dalvik byte-code.

  • Dart - Highlighting for Dart.

  • Go - Highlighting for Go.

  • Java - Highlighting for Java.

  • JavaByteCode - Highlighting for Java byte-code.

  • JavaScript - Highlighting for JavaScript.

  • JSON - Highlighting for JSON.

  • Julia - Highlighting for Julia.

  • Kotlin - Highlighting for Kotlin.

  • Lua - Highlighting for Lua.

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

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

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

  • Perl - Highlighting for Perl.

  • PHP - Highlighting for PHP.

  • PowerShell - Highlighting for PowerShell.

  • Python - Highlighting for Python.

  • R - Highlighting for R.

  • Ruby - Highlighting for Ruby.

  • Rust - Highlighting for Rust.

  • Scala - Highlighting for Scala.

  • Shell - Highlighting for BASH.

  • SQL - Highlighting for SQL.

  • Swift - Highlighting for Swift.

  • TrueType - Highlighting for TrueType font byte-code.

  • Type1 - Highlighting for Type1 font byte-code.

  • TypeScript - Highlighting for TypeScript.

  • VBA - Highlighting for VBA and VBS.

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

  • XML - Highlighting for XML.

  • YARA - Highlighting for YARA rules.

Parameters

name (str) – The name of the language.

See also proHighlightingNameFromFileName().

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.NTTextBuffer, 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 ProTheme

This class represents a graphical theme.

Available since Cerbero Suite 6.0 and Cerbero Engine 3.0.

Methods:

availableCarbonThemes()

Returns the list of available Carbon themes.

availableThemes()

Returns the list of available application themes.

cssColor(name[, defval])

Retrieves a color from the theme as a CSS color value.

isNull()

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

isValid()

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

load(theme_name)

Loads an application theme.

loadCarbon(theme_name)

Loads a Carbon theme.

rgb(name[, defcol])

Retrieves a color from the theme as an unsigned 32-bit RGB color value.

setTheme(theme)

Sets the application theme.

themeName()

Returns the name of the theme if valid; otherwise returns an empty string.

value(name[, defval])

Retrieves an entry from the theme.

static availableCarbonThemes()Pro.Core.NTStringList
Returns

Returns the list of available Carbon themes.

Return type

NTStringList

See also availableThemes().

static availableThemes()Pro.Core.NTStringList
Returns

Returns the list of available application themes.

Return type

NTStringList

See also availableCarbonThemes().

cssColor(name: str, defval: str = str())str

Retrieves a color from the theme as a CSS color value.

Parameters
  • name (str) – The name of the color entry.

  • defval (str) – The default value returned if the color entry is missing.

Returns

Returns the requested color if successful; otherwise returns defval.

Return type

str

See also rgb() and value().

isNull()bool
Returns

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

Return type

bool

See also isValid().

isValid()bool
Returns

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

Return type

bool

See also isNull().

static load(theme_name: str)Pro.UI.ProTheme

Loads an application theme.

Parameters

theme_name (str) – The name of the theme.

Returns

Returns the theme if successful; otherwise returns an invalid ProTheme instance.

Return type

ProTheme

See also loadCarbon() and setTheme().

static loadCarbon(theme_name: str)Pro.UI.ProTheme

Loads a Carbon theme.

Parameters

theme_name (str) – The name of the Carbon theme.

Returns

Returns the theme if successful; otherwise returns an invalid ProTheme instance.

Return type

ProTheme

See also load().

rgb(name: str, defcol: int = 0)int

Retrieves a color from the theme as an unsigned 32-bit RGB color value.

Parameters
  • name (str) – The name of the color entry.

  • defcol (int) – The default value returned if the color entry is missing.

Returns

Returns the requested color if successful; otherwise returns defcol.

Return type

int

See also cssColor() and value().

static setTheme(theme: Pro.UI.ProTheme)None

Sets the application theme.

Parameters

theme (ProTheme) – The theme.

themeName()str
Returns

Returns the name of the theme if valid; otherwise returns an empty string.

Return type

str

See also isValid() and isNull().

value(name: str, defval: str = str())str

Retrieves an entry from the theme.

Parameters
  • name (str) – The name of the entry.

  • defval (str) – The default value returned if the entry is missing.

Returns

Returns the requested entry if successful; otherwise returns defval.

Return type

str

See also rgb() and cssColor().

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.

setExpandAllEnabled(b)

Sets whether the expand all command is available.

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() and setExpandAllEnabled().

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.

setExpandAllEnabled(b: bool)None

Sets whether the expand all command is available.

Parameters

b (bool) – If True, enables the expand all command; otherwise disables it.

Available since Cerbero Suite 7.2 and Cerbero Engine 4.2.

See also expandAll().

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(), collapseAll() and setExpandAllEnabled().

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.

getMenu()

Returns the menu of the action if any; otherwise returns an invalid menu.

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.

setMenu(menu)

Sets the menu 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.

getMenu()Pro.UI.ProMenu
Returns

Returns the menu of the action if any; otherwise returns an invalid menu.

Return type

ProMenu

Available since Cerbero Suite 7.4 and Cerbero Engine 4.4.

See also setMenu().

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().

setMenu(menu: Pro.UI.ProMenu)None

Sets the menu of the action.

Parameters

menu (ProMenu) – The menu to set.

Available since Cerbero Suite 7.4 and Cerbero Engine 4.4.

See also getMenu().

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_FS

Creates a file system view.

Type_FileInfo

Creates a file info 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[, notify_only])

Adds a view as dependent from this view.

addMenu([title])

Adds a menu to the view.

clear()

Clears the view.

close([r])

Closes the view.

closeDependentView(view)

Closes or notifies 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.

isAnalysisView()

Returns True if the view belongs to an analysis view; otherwise returns False.

isEnabled()

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

isMaximized()

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

isNonOrphanedAnalysisView()

Returns True if view belongs to an analysis view that belongs to the current root; 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_FS: Final[int]

Creates a file system view.

Available since Cerbero Suite 7.0 and Cerbero Engine 4.0.

See also ProContext.createView() and ProFileSystemView.

Type_FileInfo: Final[int]

Creates a file info view.

Available since Cerbero Suite 7.1 and Cerbero Engine 4.1.

See also ProContext.createView() and ProFileInfoView.

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, notify_only: bool = False)None

Adds a view as dependent from this view.

When the owner view is cleared or destroyed, the dependent view is destroyed or notified, depending on the value of notify_only.

Important

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

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

  • notify_only (bool) – If True, the dependent view will be sent the pvnOwnerViewClosed notification when the owner view is closed instead of being closed; otherwise the dependent view is closed.

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

addMenu(title: str = str())Pro.UI.ProMenu

Adds a menu to the view.

Hint

The returned menu can be set as the child menu of other actions using ProUIAction.setMenu() or as the menu for push buttons using ProPushButton.setMenu().

Parameters

title (str) – The title of the menu.

Returns

Returns the new menu.

Return type

ProMenu

Available since Cerbero Suite 7.4 and Cerbero Engine 4.4.

See also ProUIAction.setMenu().

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 or notifies 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.

isAnalysisView()bool
Returns

Returns True if the view belongs to an analysis view; otherwise returns False.

Return type

bool

Available since Cerbero Suite 7.3 and Cerbero Engine 4.3.

See also isNonOrphanedAnalysisView().

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().

isNonOrphanedAnalysisView()bool
Returns

Returns True if view belongs to an analysis view that belongs to the current root; otherwise returns False.

Return type

bool

Available since Cerbero Suite 7.3 and Cerbero Engine 4.3.

See also isAnalysisView().

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.

The extra notifications for workspaces are:

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.

StdMenus_Actions

Standard actions top menu item.

StdMenus_Help

Standard help top menu item.

StdMenus_Views

Standard views top menu item.

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:

acceptDrops()

Returns True if the workspace accepts drop events; otherwise returns False.

addCommandLineInterpreter(intr)

Adds a customer command line interpreter to the workspace.

addDock(dock[, switch_to, curtab])

Adds a dock view to the workspace.

addStdActions(type)

Adds a set of standard UI actions to the workspace.

addStdMenu(type)

Adds a standard top menu item.

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.

dockList()

Returns the list of docks available in the workspace.

findDock(name)

Finds dock view by its name.

getLayout([dflt_focus_name])

Retrieves the layout of the dock views in the workspace.

menuBar()

Returns the menu-bar of the workspace.

notifyMenuAboutToShow(menu[, notify])

Sets whether show notifications should be sent for a specific menu.

restoreAppearance([initial_layout])

Restores the appearance of the workspace.

saveLayout([dflt_focus_name])

Saves the layout of the dock views in the workspace.

setAcceptDrops(b)

Sets whether the workspace accepts drop events.

setCurrentCommandLineInterpreter(name)

Sets the current command line interpreter.

setDefaultCommandLineInterpreter(name)

Sets the current command line interpreter if the user hasn’t already set one.

setDefaultTabTargetName(name[, is_prefix])

Sets the name of the dock to which other docks are automatically tabbed.

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().

StdMenus_Actions: Final[int]

Standard actions top menu item.

See also addStdMenu().

StdMenus_Help: Final[int]

Standard help top menu item.

See also addStdMenu().

StdMenus_Views: Final[int]

Standard views top menu item.

See also addStdMenu().

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().

acceptDrops()bool
Returns

Returns True if the workspace accepts drop events; otherwise returns False.

Return type

bool

Available since Cerbero Suite 7.4 and Cerbero Engine 4.4.

See also setAcceptDrops().

addCommandLineInterpreter(intr: Pro.UI.ProCommandLineInterpreter)None

Adds a customer command line interpreter to the workspace.

Parameters

intr (ProCommandLineInterpreter) – The initialization information for the command line interpreter.

Available since Cerbero Suite 6.4 and Cerbero Engine 3.4.

See also ProCommandLineInterpreter, setCurrentCommandLineInterpreter() and pvnCmdLineEntered.

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(), createStdDock() and setDefaultTabTargetName().

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().

addStdMenu(type: int)Pro.UI.ProMenu

Adds a standard top menu item.

Parameters

type (int) – The type of standard top menu item to add (e.g., StdMenus_Views).

Returns

Returns a valid menu if successful; otherwise returns an invalid menu.

Return type

ProMenu

Available since Cerbero Suite 7.0 and Cerbero Engine 4.0.

See also menuBar(), ProMenuBar and ProMenu.

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().

dockList()Pro.UI.ProDockList
Returns

Returns the list of docks available in the workspace.

Return type

ProDockList

Available since Cerbero Suite 7.4 and Cerbero Engine 7.4.

See also findDock() and ProDock.

findDock(name: str)Pro.UI.ProDock

Finds dock view by its name.

Parameters

name (str) – The name of the dock view to find.

Returns

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

Return type

ProDock

Available since Cerbero Suite 6.4 and Cerbero Engine 3.4.

See also dockList() and ProDock.

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.

notifyMenuAboutToShow(menu: Pro.UI.ProMenu, notify: bool = True)None

Sets whether show notifications should be sent for a specific menu.

Parameters

Available since Cerbero Suite 7.4 and Cerbero Engine 7.4.

See also pvnMenuAboutToShow and pvnMenuAboutToShowData.

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().

setAcceptDrops(b: bool)None

Sets whether the workspace accepts drop events.

Parameters

b (bool) – If True enables drop events; otherwise disables them.

Available since Cerbero Suite 7.4 and Cerbero Engine 4.4.

See also acceptDrops().

setCurrentCommandLineInterpreter(name: str)None

Sets the current command line interpreter.

Parameters

name (str) – The name of the command line interpreter to set.

Available since Cerbero Suite 6.4 and Cerbero Engine 3.4.

See also addCommandLineInterpreter() and setDefaultCommandLineInterpreter().

setDefaultCommandLineInterpreter(name: str)None

Sets the current command line interpreter if the user hasn’t already set one.

Parameters

name (str) – The name of the command line interpreter to set.

Available since Cerbero Suite 7.0 and Cerbero Engine 4.0.

See also addCommandLineInterpreter() and setCurrentCommandLineInterpreter().

setDefaultTabTargetName(name: str, is_prefix: bool = False)None

Sets the name of the dock to which other docks are automatically tabbed.

Parameters
  • name (str) – The name of the dock.

  • is_prefix (bool) – If True, treats the name as a prefix and not as the full name.

Available since Cerbero Suite 7.4 and Cerbero Engine 4.4.

See also addDock().

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_Calculator: Final[int]

Identifier for the ‘calculator’ icon.

Available since Cerbero Suite 7.1 and Cerbero Engine 4.1.

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_ClassPrivate: Final[int]

Identifier for the ‘private code class’ icon.

Available since Cerbero Suite 7.6 and Cerbero Engine 4.6.

See also proAddPublicIcon().

PubIcon_ClassProtected: Final[int]

Identifier for the ‘protected code class’ icon.

Available since Cerbero Suite 7.6 and Cerbero Engine 4.6.

See also proAddPublicIcon().

PubIcon_Clock: Final[int]

Identifier for the ‘clock’ 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().

Identifier for the ‘directory link’ 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_FastText: Final[int]

Identifier for the ‘fast text’ icon.

Available since Cerbero Suite 7.0 and Cerbero Engine 4.0.

PubIcon_File: Final[int]

Identifier for the ‘file’ icon.

See also proAddPublicIcon().

PubIcon_FileInfo: Final[int]

Identifier for the ‘file info’ icon.

Available since Cerbero Suite 7.1 and Cerbero Engine 4.1.

See also proAddPublicIcon().

Identifier for the ‘file link’ 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_Home: Final[int]

Identifier for the ‘home’ icon.

Available since Cerbero Suite 7.0 and Cerbero Engine 4.0.

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_Minus: Final[int]

Identifier for the ‘minus’ icon.

Available since Cerbero Suite 7.1 and Cerbero Engine 4.1.

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_NavigationDown: Final[int]

Identifier for the ‘navigation down’ icon.

Available since Cerbero Suite 7.0 and Cerbero Engine 4.0.

See also proAddPublicIcon().

PubIcon_NavigationForth: Final[int]

Identifier for the ‘navigation forward’ icon.

See also proAddPublicIcon().

PubIcon_NavigationUp: Final[int]

Identifier for the ‘arrow up’ icon.

Available since Cerbero Suite 7.0 and Cerbero Engine 4.0.

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_Play: Final[int]

Identifier for the ‘play’ icon.

Available since Cerbero Suite 7.0 and Cerbero Engine 4.0.

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_Settings: Final[int]

Identifier for the ‘settings’ icon.

Available since Cerbero Suite 8.0 and Cerbero Engine 5.0.

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_Star: Final[int]

Identifier for the ‘star’ icon.

Available since Cerbero Suite 8.0 and Cerbero Engine 5.0.

See also proAddPublicIcon().

PubIcon_StarGray: Final[int]

Identifier for the ‘gray star’ icon.

Available since Cerbero Suite 8.0 and Cerbero Engine 5.0.

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_Task: Final[int]

Identifier for the ‘task’ icon.

Available since Cerbero Suite 7.0 and Cerbero Engine 4.0.

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.

proHighlightingNameFromFileName(fname: str)str

Deduces the syntax highlight rules from the extension of the specified file name.

Parameters

fname (str) – The file name.

Returns

Returns the syntax highlight rules if successful; otherwise returns an empty string.

Return type

str

Available since Cerbero Suite 7.0 and Cerbero Engine 4.0.

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., ProCellTableView.Data_Text).

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.

column

The column of the item.

See also row.

row

The row of the item.

See also column.

setColor(color: int)None

Sets the requested item color.

This method can be called when processing the ProCellTableView.Data_BackgroundColor and ProCellTableView.Data_TextColor notifications.

Parameters

color (int) – The color to return.

setFontOptions(opt: int)None

Sets the item font options.

This method can be called when processing the ProCellTableView.Data_Font notification.

Parameters

opt (int) – The options for the font (e.g. ProCellTableView.Font_Bold).

setIcon(icon: int)None

Sets the item icon.

This method can be called when processing the ProCellTableView.Data_Icon notification.

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().

setText(t: str)None

Sets the item text.

This method can be called when processing the ProCellTableView.Data_Text and ProCellTableView.Data_EditText notifications.

Important

Both ProCellTableView.Data_Text and ProCellTableView.Data_EditText notifications should be implemented, even when the cell table view is not editable.

Parameters

t (str) – The item text.

setTextAlignment(align: int)None

Sets the item text.

This method can be called when processing the ProCellTableView.Data_TextAlignment notification.

Parameters

align (int) – The item text alignment (see ProAlign).

See also ProAlign.

type

The type of data requested (e.g., ProCellTableView.Data_Text).

pvnCellTableItemActivated: Final[int]

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

The associated data is pvnCellTableItemActivatedData.

See also pvnCellTableItemActivatedData and ProCellTableView.

class pvnCellTableItemActivatedData

This class contains the data associated to pvnCellTableItemActivated.

See also ProCellTableView.

Attributes:

column

The column of the activated item.

row

The row of the activated item.

column

The column of the activated item.

See also row.

row

The row of the activated item.

See also column.

pvnCellTableRowCount: Final[int]

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

The handler of this notification must return the number of rows in the cell table view.

See also ProCellTableView.

pvnCellTableSelectionChanged: Final[int]

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

See also ProCellTableView.

pvnCheckChanged: Final[int]

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

The associated data is pvnCheckChangedData.

See also pvnCheckChangedData and ProCheckBox.

class pvnCheckChangedData

This class contains the data associated to pvnCheckChanged.

See also ProCheckBox.

Attributes:

checked

This value is True when the check box is checked; otherwise it’s False.

checked

This value is True when the check box is checked; otherwise it’s False.

pvnClose: Final[int]

Notification for when a custom view is destroyed.

See also ProCustomView.

pvnCloseDialog: Final[int]

Notification for when a dialog box is closed.

See also ProDialog.

pvnCmdLineEntered: Final[int]

Notification for when a command is entered into a custom command line interpreter.

The associated data is pvnCmdLineEnteredData.

Available since Cerbero Suite 6.4 and Cerbero Engine 3.4.

See also pvnCmdLineEnteredData and ProWorkspace.addCommandLineInterpreter().

class pvnCmdLineEnteredData

This class contains the data associated to pvnCmdLineEntered.

Available since Cerbero Suite 6.4 and Cerbero Engine 3.4.

See also ProWorkspace.addCommandLineInterpreter().

Attributes:

cmd

The entered command.

name

The name of the command line interpreter.

cmd

The entered command.

name

The name of the command line interpreter.

pvnComboIndexChanged: Final[int]

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

The associated data is pvnComboIndexChangedData.

See also pvnComboIndexChangedData and ProComboBox.

class pvnComboIndexChangedData

This class contains the data associated to pvnComboIndexChanged.

See also ProComboBox.

Attributes:

index

The index of the current combo box item.

index

The index of the current combo box item.

pvnComboTextChanged: Final[int]

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

See also ProComboBox.

class pvnCommonRowData

Base class for other UI notification classes.

See also pvnGetTableRowData, pvnGetTreeRowData and pvnGetCustomTreeRowData.

Methods:

bgColor(i)

Retrieves the background color for an item in the row.

clear(i)

Clears the data for an item in the row.

flags(i)

Retrieves the flags for an item in the row.

hasBGColor(i)

Checks whether an item in the row has a background color.

hasIcon(i)

Checks whether an item in the row has an icon.

hasStrongBGColor(i)

Checks whether an item in the row has a strong background color.

icon(i)

Retrieves the icon identifier of an item in the row.

isValid(i)

Checks whether an item in the row is valid.

setBgColor(i, color[, strong])

Sets the background color for an item in the row.

setBold(i[, b])

Sets the bold text flag for an item in the row.

setIcon(i, icon)

Sets the icon for an item in the row.

setText(i, t)

Sets the text for an item in the row.

text(i)

Retrieves the text of an item in the row.

bgColor(i: int)int

Retrieves the background color for an item in the row.

Parameters

i (int) – The item index.

Returns

Returns the background color.

Return type

int

See also hasBGColor() and setBgColor().

clear(i: int)None

Clears the data for an item in the row.

Parameters

i (int) – The item index.

See also isValid().

flags(i: int)int

Retrieves the flags for an item in the row.

Hint

The individual flags of an item can be checked using methods such as hasBGColor() or isValid().

Parameters

i (int) – The item index.

Returns

Returns the flags for the item.

Return type

int

See also isValid().

hasBGColor(i: int)bool

Checks whether an item in the row has a background color.

Parameters

i (int) – The item index.

Returns

Returns True if the item has a background color; otherwise returns False.

Return type

bool

See also bgColor() and setBgColor().

hasIcon(i: int)bool

Checks whether an item in the row has an icon.

Note

Icons are not yet supported by ProTableView, but they are supported by ProCellTableView.

Parameters

i (int) – The item index.

Returns

Returns True if the item has an icon; otherwise returns False.

Return type

bool

See also icon() and setIcon().

hasStrongBGColor(i: int)bool

Checks whether an item in the row has a strong background color.

Note

This method is reserved for future use.

Parameters

i (int) – The item index.

Returns

Returns True if the item has a strong background color; otherwise returns False.

Return type

bool

See also bgColor() and setBgColor().

icon(i: int)int

Retrieves the icon identifier of an item in the row.

Note

Icons are not yet supported by ProTableView, but they are supported by ProCellTableView.

Parameters

i (int) – The item index.

Returns

Retrieves the icon identifier if the item has an icon; otherwise returns -1.

Return type

int

See also hasIcon() and setIcon().

isValid(i: int)bool

Checks whether an item in the row is valid.

An item becomes valid by setting its text (see setText()).

Parameters

i (int) – The item index.

Returns

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

Return type

bool

See also clear() and setText().

setBgColor(i: int, color: int, strong: bool = True)None

Sets the background color for an item in the row.

Parameters
  • i (int) – The item index.

  • color (int) – The background color.

  • strong (bool) – This value is reserved for future use.

See also hasBGColor() and bgColor().

setBold(i: int, b: bool = True)None

Sets the bold text flag for an item in the row.

Parameters
  • i (int) – The item index.

  • b (bool) – If True, sets the bold text flag; otherwise removes the flag.

See also setText().

setIcon(i: int, icon: int)None

Sets the icon for an item in the row.

Note

Icons are not yet supported by ProTableView, but they are supported by ProCellTableView.

Parameters
  • i (int) – The item index.

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

See also hasIcon() and icon().

setText(i: int, t: str)None

Sets the text for an item in the row.

Parameters
  • i (int) – The item index.

  • t (str) – The item text.

See also text() and isValid().

text(i: int)str

Retrieves the text of an item in the row.

Parameters

i (int) – The item index.

Returns

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

Return type

str

See also setText().

class pvnCommonTextBrowserLineIdData

This class is derived by other classes to retrieve line id information.

Attributes:

id

The input line id.

Methods:

setLineId(id)

Sets the returned line id.

id

The input line id.

setLineId(id: TextLineId)None

Sets the returned line id.

Parameters

id (TextLineId) – The line id to return.

pvnContextMenu: Final[int]

Notification for a context menu request.

The associated data is pvnContextMenuData.

See also pvnContextMenuData and ProView.

class pvnContextMenuData

This class contains the data associated to pvnContextMenu.

See also ProView.

Attributes:

menu

The instance of the ProMenu context menu.

menu

The instance of the ProMenu context menu.

See also ProMenu.

pvnCtrlReset: Final[int]

Notification for control reset.

See also ProView.

pvnCtrlSetup: Final[int]

Notification for control initialization.

See also ProView.

pvnCustomTreeItemActivated: Final[int]

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

The associated data is pvnCustomTreeItemActivatedData.

See also pvnCustomTreeItemActivatedData and ProTreeView.

class pvnCustomTreeItemActivatedData

Bases: Pro.UI.ProTreeIndex

This class contains the data associated to pvnCustomTreeItemActivated.

See also ProTreeView.

pvnCustomTreeItemExpanded: Final[int]

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

The associated data is pvnCustomTreeItemExpandedData.

Note

ProTreeView.enableExpansionNotifications() must be called to receive this notification.

See also pvnCustomTreeItemExpandedData and ProTreeView.

class pvnCustomTreeItemExpandedData

Bases: Pro.UI.ProTreeIndex

This class contains the data associated to pvnCustomTreeItemExpanded.

See also ProTreeView.

pvnCustomTreeRowSelected: Final[int]

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

The associated data is pvnCustomTreeRowSelectedData.

See also pvnCustomTreeRowSelectedData and ProTreeView.

class pvnCustomTreeRowSelectedData

Bases: Pro.UI.ProTreeIndex

This class contains the data associated to pvnCustomTreeRowSelected.

See also ProTreeView.

pvnDrop: Final[int]

Notification for when a drop event.

Available since Cerbero Suite 7.4 and Cerbero Engine 4.4.

See also pvnDropData and ProWorkspace.

class pvnDropData

This class contains the data associated to pvnDrop.

Attributes:

files

The file names dropped onto the view.

files

The file names dropped onto the view.

See also Pro.Core.NTStringList.

pvnExecuteAction: Final[int]

Notification for the execution of a UI action.

The associated data is pvnExecuteActionData.

See also pvnExecuteActionData and ProView.

class pvnExecuteActionData

This class contains the data associated to pvnExecuteAction.

See also ProView.

Attributes:

cmd

The identifier of the UI action.

cmd

The identifier of the UI action.

pvnFilterLineFilter: Final[int]

Notification for when a filter action is triggered by a filter line control.

Important

This notification is sent only when the control is not associated to a view using ProFilterLine.setViewToFilter().

Available since Cerbero Suite 7.5 and Cerbero Engine 4.5.

See also ProFilterLine.

pvnGetCustomTreeRow: Final[int]

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

The associated data is pvnGetCustomTreeRowData.

See also pvnGetCustomTreeRowData and ProTreeView.

class pvnGetCustomTreeRowData

Bases: Pro.UI.pvnCommonRowData

This class contains the data associated to pvnGetCustomTreeRow.

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.

pvnGetTableRow: Final[int]

Notification to retrieve the data for a table view row.

The associated data is pvnGetTableRowData.

See also pvnGetTableRowData and ProTableView.

class pvnGetTableRowData

Bases: Pro.UI.pvnCommonRowData

This class contains the data associated to pvnGetTableRow.

See also pvnCommonRowData and ProTableView.

Attributes:

row

The row to retrieve.

row

The row to retrieve.

pvnGetTableToolTip: Final[int]

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

The associated data is pvnGetTableToolTipData.

See also pvnGetTableToolTipData and ProTableView.

class pvnGetTableToolTipData

This class contains the data associated to pvnGetTableToolTip.

See also ProTableView.

Methods:

bgColor()

Retrieves the background color for the tool-tip.

clear()

Clears the data set.

flags()

Retrieves the flags for the tool-tip.

hasBGColor()

Checks whether the tool-tip has a background color.

hasIcon()

Checks whether the tool-tip has an icon.

hasStrongBGColor()

Checks whether the tool-tip has a strong background color.

icon()

Retrieves the icon identifier of the tool-tip.

isValid()

Checks whether the tool-tip data is valid.

setBgColor(color[, strong])

Sets the background color for the tool-tip

setBold([b])

Sets the bold text flag for the tool-tip.

setIcon(icon)

Sets the icon for the tool-tip.

setText(t)

Sets the text for the tool-tip.

text()

Retrieves the text of the tool-tip.

Attributes:

column

The column of the table view item.

row

The row of the table view item.

bgColor()int

Retrieves the background color for the tool-tip.

Note

This method is reserved for future use.

Returns

Returns the background color.

Return type

int

See also hasBGColor() and setBgColor().

clear()None

Clears the data set.

column

The column of the table view item.

See also row.

flags()int

Retrieves the flags for the tool-tip.

. hint::

The individual flags can be checked using methods such as hasBGColor() or isValid().

Returns

Returns the flags for the tool-tip.

Return type

int

See also isValid().

hasBGColor()bool

Checks whether the tool-tip has a background color.

Note

This method is reserved for future use.

Returns

Returns True if the tool-tip has a background color; otherwise returns False.

Return type

bool

See also bgColor() and setBgColor().

hasIcon()bool

Checks whether the tool-tip has an icon.

Note

This method is reserved for future use.

Returns

Returns True if the tool-tip has an icon; otherwise returns False.

Return type

bool

See also icon() and setIcon().

hasStrongBGColor()bool

Checks whether the tool-tip has a strong background color.

Note

This method is reserved for future use.

Returns

Returns True if the tool-tip has a strong background color; otherwise returns

Return type

bool

See also bgColor() and setBgColor().

icon()int

Retrieves the icon identifier of the tool-tip.

Note

This method is reserved for future use.

Returns

Retrieves the icon identifier if the tool-tip has an icon; otherwise returns -1.

Return type

int

isValid()bool

Checks whether the tool-tip data is valid.

The tool-tip data becomes valid by setting its text (see setText()).

Returns

Returns True if the tool-tip is valid; otherwise returns False.

Return type

bool

See also clear() and setText().

row

The row of the table view item.

See also column.

setBgColor(color: int, strong: bool = True)None

Sets the background color for the tool-tip

Note

This method is reserved for future use.

Parameters
  • color (int) – The background color.

  • strong (bool) – This value is reserved for future use.

See also hasBGColor() and bgColor().

setBold(b: bool = True)None

Sets the bold text flag for the tool-tip.

Note

This method is reserved for future use.

Parameters

b (bool) – If True, sets the bold text flag; otherwise removes the flag.

See also setText().

setIcon(icon: int)None

Sets the icon for the tool-tip.

Note

This method is reserved for future use.

Parameters

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

See also hasIcon() and icon().

setText(t: str)None

Sets the text for the tool-tip.

Parameters

t (str) – The tool-tip text.

See also text() and isValid().

text()str

Retrieves the text of the tool-tip.

Returns

Returns the text of the tool-tip if available; otherwise returns an empty string.

Return type

str

See also setText().

pvnGetTreeRow: Final[int]

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

The associated data is pvnGetTreeRowData.

See also pvnGetTreeRowData and ProTreeView.

class pvnGetTreeRowData

Bases: Pro.UI.pvnCommonRowData

This class contains the data associated to pvnGetTreeRow.

See also ProTreeView.

Attributes:

index

The Pro.Core.CFFDB index of the tree node of the row to retrieve.

index

The Pro.Core.CFFDB index of the tree node of the row to retrieve.

pvnHexRangeColor: Final[int]

This notification is not yet exposed to the Python SDK.

See also ProHexView.

pvnIdle: Final[int]

Notification for when a custom view is processing idle notifications.

See also ProCustomView.startIdleNotifications() and ProCustomView.

pvnInit: Final[int]

Notification for when a custom view is initialized.

See also ProCustomView.

pvnItemActivated: Final[int]

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

The associated data is pvnItemActivatedData.

See also pvnItemActivatedData and ProTableView.

class pvnItemActivatedData

This class contains the data associated to pvnItemActivated.

See also ProTableView.

Attributes:

column

The column of the activate item.

row

The row of the activate item.

column

The column of the activate item.

See also row.

row

The row of the activate item.

See also column.

pvnItemSelected: Final[int]

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

The associated data is pvnItemSelectedData.

See also pvnItemSelectedData and ProTableView.

class pvnItemSelectedData

This class contains the data associated to pvnItemSelected.

See also ProTableView.

Attributes:

column

The column of the selected item.

row

The row of the selected item.

column

The column of the selected item.

See also row.

row

The row of the selected item.

See also column.

pvnMenuAboutToShow: Final[int]

Notification for when a menu is about to be shown in a workspace.

Hint

This notification is sent only when enabled through ProWorkspace.notifyMenuAboutToShow().

See also ProWorkspace.notifyMenuAboutToShow().

class pvnMenuAboutToShowData

This class contains the data associated to pvnMenuAboutToShow.

See also ProWorkspace.

Attributes:

menu

The instance of the ProMenu context menu.

menu

The instance of the ProMenu context menu.

See also ProMenu.

pvnOwnerViewClosed: Final[int]

Notification for when an owner view is closed.

See also ProView.addDependentView().

pvnPlotPointSelected: Final[int]

Notification for a point selection in ProPlotView.

The associated data is pvnPlotPointSelectedData.

Important

In order to receive this notification, point selection must be enabled by calling ProPlotView.enablePointSelection().

See also pvnPlotPointSelectedData and ProPlotView.

class pvnPlotPointSelectedData

This class contains the data associated to pvnPlotPointSelected.

See also ProPlotView.

Attributes:

x

The x-coordinate of the point.

y

The y-coordinate of the point.

x

The x-coordinate of the point.

See also y.

y

The y-coordinate of the point.

See also x.

pvnRangeColor: Final[int]

This notification is not yet exposed to the Python SDK.

See also ProHexView.

pvnRangeDescription: Final[int]

This notification is not yet exposed to the Python SDK.

See also ProHexView.

pvnRangeValues: Final[int]

This notification is not yet exposed to the Python SDK.

See also ProHexView.

pvnRowSelected: Final[int]

Notification for when a row is selected in a ProTableView.

The associated data is pvnRowSelectedData.

See also pvnRowSelectedData and ProTableView.

class pvnRowSelectedData

This class contains the data associated to pvnRowSelected.

See also ProTableView.

Attributes:

row

The selected row.

row

The selected row.

pvnSaveMainSettings: Final[int]

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

pvnScriptEditorViewAutoComplete: Final[int]

Notification for an auto-completion request in ProScriptEditorView.

The associated data is pvnScriptEditorViewAutoCompleteData.

See also pvnScriptEditorViewAutoCompleteData and ProScriptEditorView.

class pvnScriptEditorViewAutoCompleteData

This class contains the data associated to pvnScriptEditorViewAutoComplete.

See also ProScriptEditorView.

Attributes:

complete

A Pro.Core.NTUTF8StringList list that must be filled with fully completed words.

partial

A Pro.Core.NTUTF8StringList list that must be filled with partially completed words.

statement

The statement for which auto-completion was requested.

complete

A Pro.Core.NTUTF8StringList list that must be filled with fully completed words.

partial

A Pro.Core.NTUTF8StringList list that must be filled with partially completed words.

Hint

This list must contain only the ending of the completed word without the statement part.

statement

The statement for which auto-completion was requested.

pvnScriptEditorViewRunScript: Final[int]

Notification for when a script is run in ProScriptEditorView.

See also ProScriptEditorView.

pvnScriptEditorViewTitleUpdate: Final[int]

Notification for when a script editor view updates its title.

See also ProScriptEditorView.

pvnShow: Final[int]

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

See also ProCustomView.

pvnShowDialog: Final[int]

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

See also ProDialog.

pvnTabChanged: Final[int]

Notification for a tab change in ProTabBar.

The associated data is pvnTabChangedData.

See also pvnTabChangedData and ProTabBar.

class pvnTabChangedData

This class contains the data associated to pvnTabChanged.

See also ProTabBar.

Attributes:

index

The index of the selected tab.

index

The index of the selected tab.

pvnTextBrowserClosestLine: Final[int]

Notification to retrieve the closest line id in a ProTextBrowserView.

The associated data is pvnTextBrowserClosestLineData.

Note

This notification is only sent when ProTextBrowserView.showCustomLines() is called with ProTextBrowserView.CustomLines_Sparse.

See also pvnTextBrowserClosestLineData and ProTextBrowserView.

class pvnTextBrowserClosestLineData

Bases: Pro.UI.pvnCommonTextBrowserLineIdData

This class contains the data associated to pvnTextBrowserClosestLine.

See also ProTextBrowserView.

Attributes:

nx

If True, specifies that the closest line to retrieve should be the one following the input line; otherwise the closest line to retrieve should be the one preceding the input line.

nx

If True, specifies that the closest line to retrieve should be the one following the input line; otherwise the closest line to retrieve should be the one preceding the input line.

pvnTextBrowserGetLine: Final[int]

Notification to retrieve the line in a ProTextBrowserView.

The associated data is pvnTextBrowserGetLineData.

Note

This notification is only sent when ProTextBrowserView.showCustomLines() is called.

See also pvnTextBrowserGetLineData and ProTextBrowserView.

class pvnTextBrowserGetLineData

This class contains the data associated to pvnTextBrowserGetLine.

See also ProTextBrowserView.

Attributes:

id

The id of the line to retrieve.

Methods:

setLine(line)

Sets the line to return.

setMultiLine(lines)

Sets the list of lines to return.

id

The id of the line to retrieve.

setLine(line: TBString)None

Sets the line to return.

Hint

The line must have been created using ProTextBrowserStringBuilder.

Parameters

line (TBString) – The line to return.

See also setMultiLine() and ProTextBrowserStringBuilder.

setMultiLine(lines: Pro.Core.NTByteArrayList)None

Sets the list of lines to return.

Hint

Each line in the list must have been created using ProTextBrowserStringBuilder.

Parameters

lines (NTByteArrayList) – The lines to return.

See also setLine() and ProTextBrowserStringBuilder.

pvnTextBrowserHyperLinkActivated: Final[int]

Notification sent when a hyper-link is activated in a ProTextBrowserView.

The associated data is pvnTextBrowserHyperLinkActivatedData.

See also pvnTextBrowserHyperLinkActivatedData and ProTextBrowserView.

class pvnTextBrowserHyperLinkActivatedData

This class contains the data associated to pvnTextBrowserHyperLinkActivated.

See also ProTextBrowserView.

Attributes:

hyper_link

A ProTextBrowserHyperLink instance.

A ProTextBrowserHyperLink instance.

pvnTextBrowserLastLine: Final[int]

Notification to retrieve the last line id in a ProTextBrowserView.

The associated data is pvnTextBrowserLastLineData.

Note

This notification is only sent when ProTextBrowserView.showCustomLines() is called with ProTextBrowserView.CustomLines_Sparse.

See also pvnTextBrowserLastLineData and ProTextBrowserView.

class pvnTextBrowserLastLineData

This class contains the data associated to pvnTextBrowserLastLine.

See also ProTextBrowserView.

Methods:

setLineId(id)

Sets the id of the last line.

setLineId(id: TextLineId)None

Sets the id of the last line.

Parameters

id (TextLineId) – The id of the last line.

pvnTextBrowserLineCount: Final[int]

Notification to retrieve the line count in a ProTextBrowserView.

The associated data is pvnTextBrowserLineCountData.

Note

This notification is only sent when ProTextBrowserView.showCustomLines() is called.

See also pvnTextBrowserLineCountData and ProTextBrowserView.

class pvnTextBrowserLineCountData

This class contains the data associated to pvnTextBrowserLineCount.

See also ProTextBrowserView.

Methods:

setCount(n)

Sets the number of lines.

setCount(n: TextLineId)None

Sets the number of lines.

Parameters

n (TextLineId) – The number of lines.

pvnTextBrowserNextLine: Final[int]

Notification to retrieve the next line id in a ProTextBrowserView.

The associated data is pvnTextBrowserNextLineData.

Note

This notification is only sent when ProTextBrowserView.showCustomLines() is called with ProTextBrowserView.CustomLines_Sparse.

See also pvnTextBrowserNextLineData and ProTextBrowserView.

class pvnTextBrowserNextLineData

Bases: Pro.UI.pvnCommonTextBrowserLineIdData

This class contains the data associated to pvnTextBrowserNextLine.

See also ProTextBrowserView.

pvnTextBrowserPrevLine: Final[int]

Notification to retrieve the previous line id in a ProTextBrowserView.

The associated data is pvnTextBrowserPrevLineData.

Note

This notification is only sent when ProTextBrowserView.showCustomLines() is called with ProTextBrowserView.CustomLines_Sparse.

See also pvnTextBrowserPrevLineData and ProTextBrowserView.

class pvnTextBrowserPrevLineData

Bases: Pro.UI.pvnCommonTextBrowserLineIdData

This class contains the data associated to pvnTextBrowserPrevLine.

See also ProTextBrowserView.

pvnTextBrowserWheelScroll: Final[int]

Notification for when the scroll wheel is moved in a ProTextBrowserView.

Note

This notification is only sent when the scroll-bars of the ProTextBrowserView are disabled.

Available since Cerbero Suite 6.4 and Cerbero Engine 3.4.

See also pvnTextBrowserWheelScrollData and ProTextBrowserView.

class pvnTextBrowserWheelScrollData

This class contains the data associated to pvnTextBrowserWheelScroll.

Available since Cerbero Suite 6.4 and Cerbero Engine 3.4.

Attributes:

steps

The direction and amount of scrolling.

vertical

If True, represents vertical scrolling; otherwise represents horizontal scrolling.

steps

The direction and amount of scrolling.

For vertical scrolling a positive value represents up, while a negative value represents down.

For horizontal scroll movements a positive value represents left, while a negative value represents right.

See also vertical.

vertical

If True, represents vertical scrolling; otherwise represents horizontal scrolling.

pvnTextLineEdited: Final[int]

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

See also ProTextLine.

pvnTreeColumnCount: Final[int]

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

The associated data is pvnTreeColumnCountData.

The processing callback for this notification must return the number of child columns for the specified item.

See also pvnTreeColumnCountData and ProTreeView.

class pvnTreeColumnCountData

Bases: Pro.UI.ProTreeIndex

This class contains the data associated to pvnTreeColumnCount.

See also ProTreeView.

pvnTreeIndex: Final[int]

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

The associated data is pvnTreeIndexData.

See also pvnTreeIndexData and ProTreeView.

class pvnTreeIndexData

This class contains the data associated to pvnTreeIndex.

See also ProTreeView.

Attributes:

column

The column of the item.

pidx

The parent index of the item.

row

The row of the item.

Methods:

setItemId(id)

Sets the user-defined 32-bit unsigned integer identifier for the item.

column

The column of the item.

See also row and pidx.

pidx

The parent index of the item.

See also ProTreeIndex, column and row.

row

The row of the item.

See also column and pidx.

setItemId(id: int)None

Sets the user-defined 32-bit unsigned integer identifier for the item.

Parameters

id (int) – The item identifier.

pvnTreeItemActivated: Final[int]

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

The associated data is pvnTreeItemActivatedData.

See also pvnTreeItemActivatedData and ProTreeView.

class pvnTreeItemActivatedData

This class contains the data associated to pvnTreeItemActivated.

See also ProTreeView.

Attributes:

index

The Pro.Core.CFFDB index of the activated tree node.

index

The Pro.Core.CFFDB index of the activated tree node.

pvnTreeItemExpanded: Final[int]

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

The associated data is pvnTreeItemExpandedData.

Note

ProTreeView.enableExpansionNotifications() must be called to receive this notification.

See also pvnTreeItemExpandedData and ProTreeView.

class pvnTreeItemExpandedData

This class contains the data associated to pvnTreeItemExpanded.

See also ProTreeView.

Attributes:

index

The Pro.Core.CFFDB index of the expanded tree node.

index

The Pro.Core.CFFDB index of the expanded tree node.

pvnTreeItemSelected: Final[int]

This notification is not yet exposed to the Python SDK.

See also ProTreeView.

pvnTreeParent: Final[int]

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

The associated data is pvnTreeParentData.

See also pvnTreeParentData and ProTreeView.

class pvnTreeParentData

This class contains the data associated to pvnTreeParent.

See also ProTreeView.

Attributes:

idx

The index item for which to retrieve the parent index information.

Methods:

setParentIndex(row, column, id)

Sets the parent index information for the index specified by idx.

idx

The index item for which to retrieve the parent index information.

See also ProTreeIndex and setParentIndex().

setParentIndex(row: int, column: int, id: int)None

Sets the parent index information for the index specified by idx.

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

  • column (int) – The column of the parent item.

  • id (int) – The user-defined 32-bit unsigned integer identifier of the parent item.

See also idx.

pvnTreeRowCount: Final[int]

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

The associated data is pvnTreeRowCountData.

The processing callback for this notification must return the number of child rows for the specified item.

See also pvnTreeRowCountData and ProTreeView.

class pvnTreeRowCountData

Bases: Pro.UI.ProTreeIndex

This class contains the data associated to pvnTreeRowCount.

See also ProTreeView.

pvnTreeRowSelected: Final[int]

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

The associated data is pvnTreeRowSelectedData.

See also pvnTreeRowSelectedData and ProTreeView.

class pvnTreeRowSelectedData

This class contains the data associated to pvnTreeRowSelected.

See also ProTreeView.

Attributes:

index

The Pro.Core.CFFDB index of the selected tree node.

index

The Pro.Core.CFFDB index of the selected tree node.