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 (SeeProTabBar
).group
- Group container (SeeProGroupBox
).
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
andright
.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 to1
.colspan
- The column span of the child inside of the grid layout. If not specified, defaults to1
.
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
- Iftrue
, 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
andright
. If not specified, it defaults totop
.
Group containers support the following attributes:
layout
- The layout of the group container. Possible values are:horizontal
,h
,vertical
andv
.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 (SeeProPushButton
). Available attributes are:text
- The text of the button.
carbon
- Carbon disassembly view (SeeProCarbonView
).celltable
- Cell table view (SeeProCellTableView
).check
- Check-box control (SeeProCheckBox
). Available attributes are:text
- The text of the check-box.checked
- Iftrue
, the initial state of the check-box is checked.
combo
- Combo control (SeeProComboBox
). Available attributes are:edit
- Iftrue
, the combo control is editable.text
- The text of an editable combo control.
fline
- Filter control (SeeProFilterLine
).fs
- File system view (SeeProFileSystemView
).hex
- Hex view (SeeProHexView
).label
- Label control (SeeProLabel
). The value of the XML node represents the text of the label. Available attributes are:select
- Iftrue
, the label text is selectable.wrap
- Iftrue
, 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
andright
.
media
- Media view (SeeProMediaView
).out
- Output view (SeeProView
). Available attributes are:readonly
- Iftrue
, the output view is read-only.linenr
- Iftrue
, the output view shows the line number.hline
- Iftrue
, the output view highlights the current line.hword
- Iftrue
, the output view highlights the current word.wrap
- Iftrue
, the output view wraps text.
pie
- Pie view (SeeProView
).plot
- Plot view (SeeProPlotView
).progbar
- Progress-bar control (SeeProProgressBar
).seditor
- Script editor view (SeeProScriptEditorView
).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 (SeeProTableView
).table
- Table view (SeeProTableView
).text
- Text view (SeeProTextView
). Available attributes are:readonly
- Iftrue
, the text view is read-only.linenr
- Iftrue
, the text view shows the line number.hline
- Iftrue
, the text view highlights the current line.hword
- Iftrue
, the text view highlights the current word.wrap
- Iftrue
, the text view wraps text.
textbr
- Text browser view (SeeProTextBrowserView
). Available attributes are:hline
- Iftrue
oralways
, the text browser highlights the current line. Iffalse
ornever
, the text browser doesn’t highlight the current line. Ifnofocus
, the text browser highlights the current line only when not focused.linenr
- Iftrue
, 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 (SeeProTextLine
).tree
- Tree view (SeeProTreeView
).
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
- Iftrue
, sets the horizontal size policy of the view to fixed.hfixed
- Iftrue
, sets the vertical size policy of the view to fixed.bold
- Iftrue
, sets the font of the view to bold.italic
- Iftrue
, sets the font of the view to italic.focus
- Iftrue
, 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 theui
,btn
,check
andlabel
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:
Error icon for a message box.
Information icon for a message box.
Warning icon for a message box.
Ok-Cancel buttons for a message box.
Yes-No buttons for a message box.
Escape code for
ProTextBrowserView
line.Maximum id for a
ProTextBrowserView
line.Maximum position in a
ProTextBrowserView
line.All tool-bar areas.
Bottom tool-bar area.
Theme based custom color.
Theme based error color.
Theme based special color.
Theme based unreferenced color.
Theme based used color.
Left tool-bar area.
Invalid tool-bar area.
Right tool-bar area.
Code for a
ProTextBrowserView
line.Code for a
ProTextBrowserView
line.Code for a
ProTextBrowserView
line.Code for a
ProTextBrowserView
line.Code for a
ProTextBrowserView
line.Code for a
ProTextBrowserView
line.Code for a
ProTextBrowserView
line.Code for a
ProTextBrowserView
line.Code for a
ProTextBrowserView
line.Code for a
ProTextBrowserView
line.Code for a
ProTextBrowserView
line.Code for a
ProTextBrowserView
line.Code for a
ProTextBrowserView
line.Code for a
ProTextBrowserView
line.Code for a
ProTextBrowserView
line.Line highlight policy for
ProTextBrowserView
.Line highlight policy for
ProTextBrowserView
.Line highlight policy for
ProTextBrowserView
.Top tool-bar area.
Identifier for the ‘add’ icon.
Identifier for the ‘add bookmark’ icon.
Identifier for the ‘add color’ icon.
Identifier for the ‘add file to report’ icon.
Identifier for the ‘add structure’ icon.
Identifier for the ‘address book’ icon.
Identifier for the ‘attachment’ icon.
Identifier for the ‘blue flag’ icon.
Identifier for the ‘bookmarks’ icon.
Identifier for the ‘bookmarks present’ icon.
Identifier for the ‘brush’ icon.
Identifier for the ‘light bulb’ icon.
Identifier for the ‘calculator’ icon.
Identifier for the ‘Carbon’ icon.
Identifier for the ‘Carbon add’ icon.
Identifier for the ‘certificate’ icon.
Identifier for the ‘code class’ icon.
Identifier for the ‘private code class’ icon.
Identifier for the ‘protected code class’ icon.
Identifier for the ‘clock’ icon.
Identifier for the ‘color’ icon.
Identifier for the ‘computer’ icon.
Identifier for the ‘copy’ icon.
Identifier for the ‘debug’ icon.
Identifier for the ‘delete’ icon.
Identifier for the ‘directory’ icon.
Identifier for the ‘directory link’ icon.
Identifier for the ‘download’ icon.
Identifier for the ‘hard-drive’ icon.
Identifier for the ‘edit bookmark’ icon.
Identifier for the ‘code enumerator’ icon.
Identifier for the ‘false’ icon.
Identifier for the ‘fast text’ icon.
Identifier for the ‘file’ icon.
Identifier for the ‘file info’ icon.
Identifier for the ‘file link’ icon.
Identifier for the ‘filter’ icon.
Identifier for the ‘find’ icon.
Identifier for the ‘full-screen’ icon.
Identifier for the ‘code function’ icon.
Identifier for the ‘code private function’ icon.
Identifier for the ‘code protected function’ icon.
Identifier for the ‘geo-location’ icon.
Identifier for the ‘Ghidra native UI’ icon.
Identifier for the ‘global bookmarks’ icon.
Identifier for the ‘global bookmarks present’ icon.
Identifier for the ‘global notes’ icon.
Identifier for the ‘global notes present’ icon.
Identifier for the ‘go to report’ icon.
Identifier for the ‘green flag’ icon.
Identifier for the ‘hammer tool’ icon.
Identifier for the ‘Header Manager’ icon.
Identifier for the ‘Header Manager’ icon.
Identifier for the ‘hex’ icon.
Identifier for the ‘hex add’ icon.
Identifier for the ‘home’ icon.
Identifier for the ‘installation’ icon.
Identifier for the ‘item’ icon.
Identifier for the ‘item 2’ icon.
Identifier for the ‘JavaScript Debugger’ icon.
Identifier for the ‘key’ icon.
Identifier for the ‘layout’ icon.
Identifier for the ‘layout table’ icon.
Identifier for the ‘minus’ icon.
Identifier for the ‘code namespace’ icon.
Identifier for the ‘navigation back’ icon.
Identifier for the ‘navigation down’ icon.
Identifier for the ‘navigation forward’ icon.
Identifier for the ‘arrow up’ icon.
Identifier for the ‘new’ icon.
Identifier for the ‘new application instance’ icon.
Identifier for the ‘new Ghidra native UI’ icon.
Identifier for the ‘notes’ icon.
Identifier for the ‘notes present’ icon.
Identifier for the ‘open’ icon.
Identifier for the ‘package’ icon.
Identifier for the ‘play’ icon.
Identifier for the ‘preview’ icon.
Identifier for the ‘question’ icon.
Identifier for the ‘raw data’ icon.
Identifier for the ‘red flag’ icon.
Identifier for the ‘redo’ icon.
Identifier for the ‘refresh’ icon.
Identifier for the ‘report’ icon.
Identifier for the ‘reset layout’ icon.
Identifier for the ‘roots’ icon.
Identifier for the ‘run’ icon.
Identifier for the ‘run action’ icon.
Identifier for the ‘run script’ icon.
Identifier for the ‘save’ icon.
Identifier for the ‘save layout’ icon.
Identifier for the ‘save project’ icon.
Identifier for the ‘save report’ icon.
Identifier for the ‘scan’ icon.
Identifier for the ‘scan active’ icon.
Identifier for the ‘scan add’ icon.
Identifier for the ‘scan hand’ icon.
Identifier for the ‘script editor add’ icon.
Identifier for the ‘settings’ icon.
Identifier for the ‘shell’ icon.
Identifier for the ‘single view’ icon.
Identifier for the ‘star’ icon.
Identifier for the ‘gray star’ icon.
Identifier for the ‘stats’ icon.
Identifier for the ‘table’ icon.
Identifier for the ‘task’ icon.
Identifier for the ‘text’ icon.
Identifier for the ‘text add’ icon.
Identifier for the ‘tool’ icon.
Identifier for the ‘trash empty’ icon.
Identifier for the ‘tree’ icon.
Identifier for the ‘true’ icon.
Identifier for the ‘User Account Control’ icon.
Identifier for the ‘undo’ icon.
Identifier for the ‘code variable’ icon.
Identifier for the ‘code private variable’ icon.
Identifier for the ‘code protected variable’ icon.
Identifier for the ‘warning’ icon.
Identifier for the ‘web’ icon.
Identifier for the ‘window’ icon.
Identifier for the ‘windows’ icon.
Identifier for the ‘yellow flag’ icon.
Notification for when a button is clicked.
Notification to inform the dependent views of a Carbon disassembly view that debug symbols were loaded.
Notification to retrieve the number of columns in a cell table item.
Notification to retrieve the label of a cell table view header.
Notification to retrieve the data of a cell table item.
Notification for when an item is activated in a cell table view.
Notification to retrieve the number of rows in a cell table item.
Notification for when the selection of a cell table view has changed.
Notification for when the status of a check box has changed.
Notification for when a custom view is destroyed.
Notification for when a dialog box is closed.
Notification for when a command is entered into a custom command line interpreter.
Notification for when the current item in a combo box is changed.
Notification for when the text in an editable combo box is changed.
Notification for a context menu request.
Notification for control reset.
Notification for control initialization.
Notification for when an item of a custom tree view was activated.
Notification for when an item of a custom tree view was expanded.
Notification for when the selected row has changed in a custom tree view.
Notification for when a drop event.
Notification for the execution of a UI action.
Notification for when a filter action is triggered by a filter line control.
Notification to retrieve the data for a row of a custom tree view.
Notification to retrieve the data for a table view row.
Notification to retrieve the tool-tip data for a table view item.
Notification used to retrieve the data for a row of a
Pro.Core.CFFDB
tree view.This notification is not yet exposed to the Python SDK.
Notification for when a custom view is processing idle notifications.
Notification for when a custom view is initialized.
Notification for when an item is activated in a table view.
Notification for when an item is selected in a table view.
Notification for when a menu is about to be shown in a workspace.
Notification for when an owner view is closed.
Notification for a point selection in
ProPlotView
.This notification is not yet exposed to the Python SDK.
This notification is not yet exposed to the Python SDK.
This notification is not yet exposed to the Python SDK.
Notification for when a row is selected in a
ProTableView
.This notification is sent to settings UI hooks to inform them that the user has saved the settings.
Notification for an auto-completion request in
ProScriptEditorView
.Notification for when a script is run in
ProScriptEditorView
.Notification for when a script editor view updates its title.
Notification for when a custom view is shown to the user.
Notification for when a dialog box is first shown to the user.
Notification for a tab change in
ProTabBar
.Notification to retrieve the closest line id in a
ProTextBrowserView
.Notification to retrieve the line in a
ProTextBrowserView
.Notification sent when a hyper-link is activated in a
ProTextBrowserView
.Notification to retrieve the last line id in a
ProTextBrowserView
.Notification to retrieve the line count in a
ProTextBrowserView
.Notification to retrieve the next line id in a
ProTextBrowserView
.Notification to retrieve the previous line id in a
ProTextBrowserView
.Notification for when the scroll wheel is moved in a
ProTextBrowserView
.Notification for when the text is changed in a text line control.
Notification used to retrieve the number child columns for an item of a custom tree view.
Notification used to retrieve the index information for an item of a custom tree view.
Notification for when an item of a
Pro.Core.CFFDB
tree view was activated.Notification for when an item of a
Pro.Core.CFFDB
tree view was expanded.This notification is not yet exposed to the Python SDK.
Notification used to retrieve the parent index information for an item of a custom tree view.
Notification used to retrieve the number child rows for an item of a custom tree view.
Notification for when the selected row has changed in a
Pro.Core.CFFDB
tree view.Classes:
ProAlign
()This class contains alignment constants.
This class represents a Carbon disassembly view.
This class represents a range in a Carbon disassembly view.
This class represent the index of an item in a cell table view.
List of
ProCellTableIndex
elements.Iterator class for
ProCellTableIndexList
.This class represents a cell table view.
This class represents a check box control.
This class allows access to the system clipboard.
This class represents a combo box control.
This class contains the information needed to add a command line interpreter to a workspace.
This class provides functionality for the current UI context.
This class represents a custom view.
This class provides the UI implementation of
Pro.Core.NTIWait
in the shape of a delayed wait-dialog.This class represents a dialog.
ProDock
()This class represent a dock view of a workspace.
List of
ProDock
elements.
ProDockListIt
(obj)Iterator class for
ProDockList
.This class represents a file info view.
This class represents a file system view.
This class represents a filter control.
This class represents a group box control.
This class represents a hex view.
ProInput
()This class provides additional common dialogs to those provided by
ProContext
.This class contains the information returned by
ProInput.askProcess()
.
ProLabel
()This class represents a label control.
This class represents a media view.
ProMenu
()This class represents a UI menu.
This class represents a menu-bar.
This class contains the options to download PDB files.
This class represents a plot view.
This class represents a progress bar control.
This class represents a property editor dialog.
This class represents a button control.
This class represents a script editor.
This class represents a tab bar.
This class represents a table view.
This class contains the base colors for a
ProTextBrowserView
.This class contains the data of a
ProTextBrowserView
hyper-link.This class can be used to parse custom text lines built using
ProTextBrowserStringBuilder
.This class represents a range of text in
ProTextBrowserView
.This class must be used to create custom text lines for
ProTextBrowserView
.This class represents a text browser.
This class represents a text line control.
This class represents a text view.
ProTheme
()This class represents a graphical theme.
This class represents a tool-bar.
This class represents an index of a custom tree view.
This class represents a tree view.
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.This class represents a UI workspace.
This class contains the data associated to
pvnCellTableGetHeader
.This class contains the data associated to
pvnCellTableGetItem
.This class contains the data associated to
pvnCellTableItemActivated
.This class contains the data associated to
pvnCheckChanged
.This class contains the data associated to
pvnCmdLineEntered
.This class contains the data associated to
pvnComboIndexChanged
.Base class for other UI notification classes.
This class is derived by other classes to retrieve line id information.
This class contains the data associated to
pvnContextMenu
.This class contains the data associated to
pvnCustomTreeItemActivated
.This class contains the data associated to
pvnCustomTreeItemExpanded
.This class contains the data associated to
pvnCustomTreeRowSelected
.This class contains the data associated to
pvnDrop
.This class contains the data associated to
pvnExecuteAction
.This class contains the data associated to
pvnGetCustomTreeRow
.This class contains the data associated to
pvnGetTableRow
.This class contains the data associated to
pvnGetTableToolTip
.This class contains the data associated to
pvnGetTreeRow
.This class contains the data associated to
pvnItemActivated
.This class contains the data associated to
pvnItemSelected
.This class contains the data associated to
pvnMenuAboutToShow
.This class contains the data associated to
pvnPlotPointSelected
.This class contains the data associated to
pvnRowSelected
.This class contains the data associated to
pvnScriptEditorViewAutoComplete
.This class contains the data associated to
pvnTabChanged
.This class contains the data associated to
pvnTextBrowserClosestLine
.This class contains the data associated to
pvnTextBrowserGetLine
.This class contains the data associated to
pvnTextBrowserHyperLinkActivated
.This class contains the data associated to
pvnTextBrowserLastLine
.This class contains the data associated to
pvnTextBrowserLineCount
.This class contains the data associated to
pvnTextBrowserNextLine
.This class contains the data associated to
pvnTextBrowserPrevLine
.This class contains the data associated to
pvnTextBrowserWheelScroll
.This class contains the data associated to
pvnTreeColumnCount
.This class contains the data associated to
pvnTreeIndex
.This class contains the data associated to
pvnTreeItemActivated
.This class contains the data associated to
pvnTreeItemExpanded
.This class contains the data associated to
pvnTreeParent
.This class contains the data associated to
pvnTreeRowCount
.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.
Returns the global
ProContext
instance.
proGetSpecialColor
(color)Retrieves the value of a special color.
Deduces the syntax highlight rules from the extension of the specified file name.
proRemovePublicIcon
(iid)Frees a public icon which was loaded using
proAddPublicIcon()
orproAddPublicIconFromFile()
.
- 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 alignment.
Center alignment.
Horizontal center alignment.
Left alignment.
Right alignment.
Top alignment.
Vertical center alignment.
- Bottom: Final[int]¶
Bottom alignment.
- 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:
pvnCarbonDebugSymbolsLoaded
- Emitted to notify dependent views that debug symbols were loaded.See also
ProContext.createView
andProCustomView
.Methods:
addLoaderAction
(cmd, label[, shortcut, icon])Adds a UI action from the side of the Carbon loader.
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.
Returns the current Carbon instance.
getSelectedRange
(range)Gets the selected range.
Returns the selected text if successful; otherwise returns an empty string.
Shows the module dialog box.
Opens the memory dependent view.
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 (seeproAddPublicIcon()
).- Returns
Returns the UI action if successful; otherwise returns an invalid UI action.
- Return type
See also
Pro.Carbon.CarbonLoader.executeAction()
andProUIAction
.
- 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
See also
Pro.Carbon.CarbonUIContext
andPro.Carbon.CarbonLoader
.
- getCarbon() → Carbon¶
- Returns
Returns the current Carbon instance.
- Return type
See also
setCarbon()
andPro.Carbon.Carbon
.
- getSelectedRange(range: Pro.UI.ProCarbonViewRange) → bool¶
Gets the selected range.
- Parameters
range (ProCarbonViewRange) – The selected range.
- Returns
Returns
True
if successful; otherwise returnsFalse
.- Return type
bool
See also
ProView.hasSelection()
,setSelectedRange()
,resetSelection()
andProCarbonViewRange
.
- 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()
andsetSelectedRange()
.
- 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()
andsetSelectedRange()
.
- setCarbon(c: Carbon) → None¶
Sets the current Carbon instance.
- Parameters
c (Carbon) – The Carbon instance to display in the view.
See also
getCarbon()
andPro.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()
andProCarbonViewRange
.
- class ProCarbonViewRange¶
This class represents a range in a Carbon disassembly view.
See also
ProCarbonView
.Attributes:
The end address of the range.
The end position of the range.
The start address of the range.
The start position of the range.
- end_addr¶
The end address of the range.
See also
start_addr
.
- class ProCellTableIndex¶
This class represent the index of an item in a cell table view.
See also
ProCellTableView
.Attributes:
The column of the item.
The row of the item.
Methods:
isValid
()Returns
True
if the index is valid; otherwise returnsFalse
.
- isValid() → bool¶
- Returns
Returns
True
if the index is valid; otherwise returnsFalse
.- Return type
bool
- 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 positioni
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
- 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 ofvalue
; otherwise returnsFalse
.- Return type
bool
- 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()
andcontains()
.
- 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 positioni
in the list. Ifi
is0
, the value is prepended to the list. Ifi
issize()
, 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()
andremoveAt()
.
- isEmpty() → bool¶
Checks whether the list is empty.
- Returns
Returns
True
if the list contains no items; otherwise returnsFalse
.- Return type
bool
See also
size()
.
- iterator() → Pro.UI.ProCellTableIndexListIt¶
Creates an iterator for the list.
- Returns
Returns the iterator.
- Return type
- 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.
- 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
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 returnsFalse
.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 returnsFalse
.
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 returnsFalse
.- Return type
bool
See also
hasPrevious()
andnext()
.
- 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 returnsFalse
.- Return type
bool
See also
hasNext()
andprevious()
.
- next() → Pro.UI.ProCellTableIndex¶
- Returns
Returns the next item and advances the iterator by one position.
- Return type
See also
hasNext()
andprevious()
.
- previous() → Pro.UI.ProCellTableIndex¶
- Returns
Returns the previous item and moves the iterator back by one position.
- Return type
See also
hasPrevious()
andnext()
.
- toBack() → None¶
Moves the iterator to the back of the container (after the last item).
See also
toFront()
andprevious()
.
- 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:
pvnCellTableGetItem
- Emitted to retrieve the data for an item.
pvnCellTableGetHeader
- Emitted to retrieve the text of a header.
pvnCellTableSelectionChanged
- Emitted when the selection of the table has changed.
pvnCellTableItemActivated
- Emitted when an item is activated.
pvnCellTableRowCount
- Emitted to retrieve the row count.
pvnCellTableColumnCount
- Emitted to retrieve the column count.See also
ProCustomView
andProTableView
.Attributes:
Item background color request type.
Item editable text request type.
Item font options request type.
Item icon request type.
Item text request type.
Item text alignment request type.
Item text color request type.
Item tool-tip request type.
Bold font option.
Italic font option.
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.
Returns
True
if it’s possible to go back the previous position; otherwise returnsFalse
.Returns the number of columns in the table.
enableNavigationHistory
([max_queue_size])Enables the navigation history for the table.
Ends a column insertion operation.
Ends a row insertion operation.
Ends a column removal operation.
Ends a row removal operation.
getColumnWidth
(col)Retrieves the width of a column.
Returns the current item if any; otherwise returns an invalid index.
Returns the horizontal scroll-bar position.
getItemText
(idx_or_row[, column])Retrieves the text of an item.
Returns a list of the currently selected items if any; otherwise returns an empty list.
Returns the vertical scroll-bar position.
goBack
()Goes back to the previous position in the navigation history.
Returns
True
if the table grid is visible; otherwise returnsFalse
.Returns
True
if the horizontal header is visible; otherwise returnsFalse
.Returns
True
if the last column is automatically stretched; otherwise returnsFalse
.Returns
True
if the vertical header is visible; otherwise returnsFalse
.
refresh
()Refreshes the contents of the table.
rowCount
()Returns the number of rows in the table.
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.
Sets the default cell width in characters.
Sets the default cell width in pixels.
Sets the standard fixed font as font for the table.
setGridVisible
(visible)Sets the visibility of the table grid.
Sets the visibility of the horizontal header.
Sets the horizontal scroll-bar position.
Sets whether row selection is enabled.
Sets whether the last column is automatically stretched.
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()
andbeginRemoveColumns()
.
- 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()
andbeginRemoveRows()
.
- 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()
andbeginInsertColumns()
.
- 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()
andbeginInsertRows()
.
- canGoBack() → bool¶
- Returns
Returns
True
if it’s possible to go back the previous position; otherwise returnsFalse
.- Return type
bool
See also
goBack()
andenableNavigationHistory()
.
- 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
androwCount()
.
Enables the navigation history for the table.
- Parameters
max_queue_size (int) – The maximum size of the navigation history.
See also
canGoBack()
andgoBack()
.
- 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
See also
setCurrentIndex()
andProCellTableIndex
.
- getHorizontalPosition() → int¶
- Returns
Returns the horizontal scroll-bar position.
- Return type
int
See also
setHorizontalPosition()
andgetVerticalPosition()
.
- 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
withData_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
See also
ProCellTableIndexList
,ProCellTableIndex
andsetCurrentIndex()
.
- getVerticalPosition() → int¶
- Returns
Returns the vertical scroll-bar position.
- Return type
int
See also
setVerticalPosition()
andgetHorizontalPosition()
.
- 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()
andenableNavigationHistory()
.
- isGridVisibile() → bool¶
- Returns
Returns
True
if the table grid is visible; otherwise returnsFalse
.- 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 returnsFalse
.- Return type
bool
Available since Cerbero Suite 7.4 and Cerbero Engine 7.4.
See also
setHorizontalHeaderVisible()
andisVerticalHeaderVisible()
.
- isLastColumnStretched() → bool¶
- Returns
Returns
True
if the last column is automatically stretched; otherwise returnsFalse
.- 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 returnsFalse
.- Return type
bool
Available since Cerbero Suite 7.4 and Cerbero Engine 7.4.
See also
setVerticalHeaderVisible()
andisHorizontalHeaderVisible()
.
- 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
andcolumnCount()
.
- 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()
andsetDefaultCellCWidth()
.
- 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()
andsetDefaultCellWidth()
.
- 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()
andProCellTableIndex
.
- setDefaultCellCWidth(cw: int) → None¶
Sets the default cell width in characters.
- Parameters
cw (int) – The width to set.
See also
setDefaultCellWidth()
andsetColumnCWidth()
.
- setDefaultCellWidth(w: int) → None¶
Sets the default cell width in pixels.
- Parameters
w (int) – The width to set.
See also
setDefaultCellCWidth()
andsetColumnWidth()
.
- 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()
andsetVerticalHeaderVisible()
.
- setHorizontalPosition(pos: int) → None¶
Sets the horizontal scroll-bar position.
- Parameters
pos (int) – The position to set.
See also
getHorizontalPosition()
andsetVerticalPosition()
.
- 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()
andsetHorizontalHeaderVisible()
.
- setVerticalPosition(pos: int) → None¶
Sets the vertical scroll-bar position.
- Parameters
pos (int) – The position to set.
See also
getVerticalPosition()
andsetHorizontalPosition()
.
- 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:
Returns
True
if the check box is checked; otherwise returnsFalse
.
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 returnsFalse
.- 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()
.
- 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.
- 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:
pvnComboIndexChanged
- Emitted when the current item of the combo box is changed.
pvnComboTextChanged
- Emitted when the text field of an editable combo box is changed.See also
ProCustomView
.Methods:
addItem
(text)Adds an item to the combo box.
addItems
(items)Adds a list of items to the combo box.
Clears the list of combo box items.
count
()Returns the number of items in the combo box.
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.
Returns
True
if the combo box is editable; otherwise returnsFalse
.
itemText
(i)Retrieves the text of an item in the combo box.
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.
Sets the currently selected item.
setEditText
(text)Sets the text of the combo box.
setEditable
(b)Makes the combo box editable.
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()
andremoveItem()
.
- 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()
andremoveItem()
.
- clearItems() → None¶
Clears the list of combo box items.
Available since Cerbero Suite 7.4 and Cerbero Engine 4.4.
See also
addItem()
,addItems()
andremoveItem()
.
- count() → int¶
- Returns
Returns the number of items in the combo box.
- Return type
int
See also
currentIndex()
andaddItem()
.
- currentIndex() → int¶
- Returns
Returns the index of the currently selected item if successful; otherwise returns
-1
.- Return type
int
See also
setCurrentIndex()
andeditText()
.
- 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()
andisEditable()
.
- 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()
andremoveItem()
.
- isEditable() → bool¶
- Returns
Returns
True
if the combo box is editable; otherwise returnsFalse
.- Return type
bool
See also
setEditable()
,editText()
andsetEditText()
.
- 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()
andaddItem()
.
- 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()
andaddItems()
.
- setCurrentIndex(i: int) → None¶
Sets the currently selected item.
- Parameters
i (int) – The index of the item to select.
See also
currentIndex()
andaddItem()
.
- 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()
andisEditable()
.
- 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()
andisEditable()
.
- 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:
The history for the command line interpreter.
The label visible to the user for the command line interpreter.
The syntax highlighting to be used for the command line interpreter.
The name of the command line interpreter.
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.
Returns the view of the current analysis view if any; otherwise returns an invalid view.
Returns the view of the current top level view if any; otherwise returns an invalid view.
Returns the current view if any; otherwise returns an invalid view.
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.
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.
Returns
True
if all media previews have been allowed by the user in the current workspace; otherwise returnsFalse
.Returns
True
if the main window is visible; otherwise returnsFalse
.
makeFileTitle
(prefix)Creates a view title from the currently open file.
msgBox
(type, caption[, title])Shows a message box to the user.
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 returnsFalse
.- Return type
bool
See also
createView()
andProView
.
- 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
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
See also
ProDialog
andProCustomView
.
- 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
- 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
See also
ProView.fromWidget()
andcreateView()
.
- 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
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
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
- getCurrentAnalysisView() → Pro.UI.ProView¶
- Returns
Returns the view of the current analysis view if any; otherwise returns an invalid view.
- Return type
Available since Cerbero Suite 5.1 and Cerbero Engine 2.1.
See also
getCurrentView()
,getCurrentTopLevelView()
andProView
.
- getCurrentTopLevelView() → Pro.UI.ProView¶
- Returns
Returns the view of the current top level view if any; otherwise returns an invalid view.
- Return type
Available since Cerbero Suite 7.4 and Cerbero Engine 7.4.
See also
getCurrentView()
,getCurrentAnalysisView()
andProView
.
- getCurrentView() → Pro.UI.ProView¶
- Returns
Returns the current view if any; otherwise returns an invalid view.
- Return type
See also
getCurrentTopLevelView()
,getCurrentAnalysisView()
andProView
.
- getCurrentWorkspace() → Pro.UI.ProWorkspace¶
- Returns
Returns the current workspace if available; otherwise returns an invalid workspace.
- Return type
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()
andgetSaveFileName()
.
- 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()
andgetExistingDirectory()
.
- 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 returnsFalse
.- Return type
bool
See also
ProPDBDownloadOptions
andPro.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()
andgetExistingDirectory()
.
- 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 returnsFalse
.- 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 returnsFalse
.- 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()
andaddView()
.
- 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 returns0
. Alternatively, always returns1
if the UI is not available.- Return type
int
See also
MBIconInfo
,MBIconWarn
,MBYesNo
andMBOkCancel
.
- 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
Available since Cerbero Suite 8.1 and Cerbero Engine 5.1.
See also
Pro.Core.NTIWait
andstartWait()
.
- startWait(label: str, flags: int = 0) → Pro.UI.ProWait¶
Displays a wait-dialog.
ProWait
is the UI implementation ofPro.Core.NTIWait
.
- Parameters
label (str) – The label for the wait-dialog.
flags (int) – The flags (e.g.,
Pro.Core.NTIWait.NoProgress
).- Returns
Returns the handle to the created wait-dialog.
- Return type
See also
Pro.Core.NTIWait
andstartDelayedWait()
.
- 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.
Starts the processing of idle notifications.
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
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 returnsFalse
.- 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()
andpvnIdle
.
- stopIdleNotifications() → None¶
Stops the processing of idle notifications.
Available since Cerbero Suite 5.2 and Cerbero Engine 2.2.
See also
ProCustomView.startIdleNotifications()
andpvnIdle
.
- 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()
andPro.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:
pvnShowDialog
- Emitted when the dialog is first shown to the user.
pvnCloseDialog
- Emitted when the dialog is closed.Hint
The callback of the embedded custom view receives the notifications originating from the dialog.
See also
ProContext.createDialog()
andProDialog
.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.
- 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()
andProWorkspace.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
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 positioni
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
- 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 ofvalue
; otherwise returnsFalse
.- Return type
bool
- 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()
andcontains()
.
- 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 positioni
in the list. Ifi
is0
, the value is prepended to the list. Ifi
issize()
, 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()
andremoveAt()
.
- isEmpty() → bool¶
Checks whether the list is empty.
- Returns
Returns
True
if the list contains no items; otherwise returnsFalse
.- Return type
bool
See also
size()
.
- iterator() → Pro.UI.ProDockListIt¶
Creates an iterator for the list.
- Returns
Returns the iterator.
- Return type
- 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.
- 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
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 returnsFalse
.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 returnsFalse
.
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 returnsFalse
.- Return type
bool
See also
hasPrevious()
andnext()
.
- 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 returnsFalse
.- Return type
bool
See also
hasNext()
andprevious()
.
- next() → Pro.UI.ProDock¶
- Returns
Returns the next item and advances the iterator by one position.
- Return type
See also
hasNext()
andprevious()
.
- previous() → Pro.UI.ProDock¶
- Returns
Returns the previous item and moves the iterator back by one position.
- Return type
See also
hasPrevious()
andnext()
.
- toBack() → None¶
Moves the iterator to the back of the container (after the last item).
See also
toFront()
andprevious()
.
- 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
andProCustomView
.Methods:
computeHash
(name)Computes a cryptographic hash for the current entry if not already computed; otherwise returns the already computed hash.
Returns the name of the current tab.
Returns the current view.
Returns the path of the current entry.
getFS
()Returns the file system instance if available; otherwise returns an invalid
Pro.Core.CFSInstance()
instance.Returns the already retrieved data of the current entry.
Returns the current entry.
Returns
True
if the interface is small; otherwise returnsFalse
.Returns
True
if quick launch is visible; otherwise returnsFalse
.
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.
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()
andcurrentView()
.
- currentView() → Pro.UI.ProView¶
- Returns
Returns the current view.
- Return type
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
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
See also
getFileEntry()
.
- getFileEntry() → Pro.Core.CFSEntry¶
- Returns
Returns the current entry.
- Return type
See also
setFileEntry()
andgetFileData()
.
- hasSmallInterface() → bool¶
- Returns
Returns
True
if the interface is small; otherwise returnsFalse
.- Return type
bool
See also
setSmallInterface()
.
- isQuickLaunchVisible() → bool¶
- Returns
Returns
True
if quick launch is visible; otherwise returnsFalse
.- 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()
andsetFileName()
.
- 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()
andProCustomView
.Methods:
Returns the current path.
getFS
()Returns the file system instance if available; otherwise returns an invalid
Pro.Core.CFSInstance()
instance.Returns the internal
ProFileInfoView
instance.Returns the currently selected file name if available; otherwise returns an empty string.
Returns the currently selected file entry if available; otherwise returns an invalid
CFSEntry
.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
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
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()
andgetSelectedFileEntry()
.
- getSelectedFileEntry() → Pro.Core.CFSEntry¶
- Returns
Returns the currently selected file entry if available; otherwise returns an invalid
CFSEntry
.- Return type
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 returnsFalse
.- 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 returnsFalse
.- 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 returnsFalse
.- 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
andProTreeView
.The notifications for this control are:
pvnFilterLineFilter
- Emitted when the filter action is triggered, provided the control is not associated to a view usingsetViewToFilter()
.Available since Cerbero Suite 7.2 and Cerbero Engine 4.2.
See also
ProCustomView
.Methods:
filter
()Filters again the elements.
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 returnsFalse
.- 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:
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()
andProCustomView
.Methods:
addressToOffset
(address)Converts an address to an offset.
Returns the analysis delta if present; otherwise returns
Pro.Core.INVALID_STREAM_OFFSET
.Returns the current offset.
Retrieves the cursor column.
Returns the offset of the cursor if successful; otherwise returns
Pro.Core.INVALID_STREAM_OFFSET
.
getData
()Returns the data displayed by the hex view.
Returns the selected range.
getSize
()Returns the size of the data displayed by the hex view.
Returns
True
if an analysis delta is present; otherwise returnsFalse
.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.
Sets whether or not the data displayed by the hex view is resizable.
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.
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()
andhasAnalysisDelta()
.
- 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()
andsetCursorOffset()
.
- getData() → Pro.Core.NTContainer¶
- Returns
Returns the data displayed by the hex view.
- Return type
See also
setData()
andPro.Core.NTContainer
.
- getSelectedRange() → Pro.Core.NTOffsetRange¶
- Returns
Returns the selected range.
- Return type
See also
ProView.hasSelection()
andsetSelectedRange()
.
- 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 returnsFalse
.- Return type
bool
Available since Cerbero Suite 7.3 and Cerbero Engine 4.3.
See also
setAnalysisDelta()
andanalysisDelta()
.
- layoutName() → str¶
- Returns
Returns the name of the associated layout if available; otherwise returns an empty string.
- Return type
str
See also
setLayoutName()
andPro.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()
andPro.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()
andPro.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 returnsFalse
.- 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()
andPro.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()
andsetEditable()
.
- 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()
andsetUndoable()
.
- 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 returnsFalse
.- 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()
andPro.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 returnsFalse
.- Return type
bool
See also
getSelectedRange()
andProView.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
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()
andaskTextEx()
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()
andaskTextEx()
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()
andaskValueEx()
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()
andaskValueEx()
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:
The base of the selected range.
The label of the selected item.
The id of the selected process.
The size of selected range.
Methods:
hasRange
()Returns
True
if the instance contains a specific range; otherwise returnsFalse
.
isValid
()Returns
True
if the instance is valid; otherwise returnsFalse
.
- base¶
The base of the selected range.
See also
hasRange()
.
- hasRange() → bool¶
- Returns
Returns
True
if the instance contains a specific range; otherwise returnsFalse
.- Return type
bool
- isValid() → bool¶
- Returns
Returns
True
if the instance is valid; otherwise returnsFalse
.- 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 (seeproAddPublicIcon()
).See also
setIconSize()
andproAddPublicIcon()
.
- 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:
Image media type.
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.
Returns
True
if the media is allowed; otherwise returnsFalse
.
isReady
()Returns
True
if the view is ready to be presented to the user; otherwise returnsFalse
.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 returnsFalse
.- 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 returnsFalse
.- Return type
bool
See also
addImageFromBytes()
.
- isAllowed() → bool¶
- Returns
Returns
True
if the media is allowed; otherwise returnsFalse
.- 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 returnsFalse
.- 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()
.
- class ProMenu¶
This class represents a UI menu.
See also
pvnContextMenu
,ProMenuBar
andProUIAction
.Methods:
addAction
(action)Adds a UI action to the menu.
addCopyAction
(action)Adds a copy action to the menu.
Adds favorite actions to the menu.
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 returnsFalse
.
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()
andaddCopyAction()
.
- 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()
andaddSeparator()
.
- 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()
andaddCopyAction()
.
- 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 returnsFalse
.- 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
andProUIAction
.Methods:
addAction
(action)Adds a UI action to the menu-bar.
addMenu
(title)Adds a sub-menu to the menu-bar.
Adds a separator to the menu-bar.
clear
()Clears the menu-bar.
isNull
()Returns
True
if the menu-bar is invalid; otherwise returnsFalse
.
- addAction(action: Pro.UI.ProUIAction) → None¶
Adds a UI action to the menu-bar.
- Parameters
action (ProUIAction) – The action to add.
See also
addSeparator()
andaddMenu()
.
- 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
See also
addAction()
andaddSeparator()
.
- addSeparator() → None¶
Adds a separator to the menu-bar.
See also
addAction()
andaddMenu()
.
- clear() → None¶
Clears the menu-bar.
- isNull() → bool¶
- Returns
Returns
True
if the menu-bar is invalid; otherwise returnsFalse
.- 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()
andPro.Core.PDBAssociationInfo
.Attributes:
The download path for the PDB files.
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:
pvnPlotPointSelected
- Emitted when the user clicks on a point of the plot.See also
ProCustomView
.Attributes:
Scale type for file sizes.
Bottom axis.
Top axis.
Left axis.
Right axis.
Methods:
addCurve
(x, y)Adds a curve to the plot.
enablePointSelection
([b])Enables point selection.
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
x (NTDoubleVector) – The x coordinate.
y (NTDoubleVector) – The y coordinate.
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
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:
Returns
True
if the text of the progress bar is visible; otherwise returnsFalse
.
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 returnsFalse
.- 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:
Closing notification code.
Initialization notification code.
Multi-line text view setup notification code.
This notification code is reserved for future use.
Methods:
Clears the errors set by
setErrors()
.Returns the id of the multi-line text view presented to the user.
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()
andcurrentMultiEditView()
.
- Notification_PreInit: Final[int]¶
This notification code is reserved for future use.
See also
Notification_Init
andNotification_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
andcurrentMultiEditView()
.
- currentMultiEditView() → Pro.UI.ProView¶
- Returns
Returns the multi-line text view presented to the user.
- Return type
Available since Cerbero Suite 5.4 and Cerbero Engine 2.4.
See also
Notification_MultiEditSetup
andcurrentMultiEditId()
.
- 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()
andgetValue()
.
- 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()
andgetStringValue()
.
- 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 returnsFalse
.- Return type
bool
See also
setEnabled()
andisVisible()
.
- 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 returnsFalse
.- Return type
bool
See also
setVisible()
andisEnabled()
.
- 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()
andsetVisible()
.
- 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 returnsFalse
.- Return type
bool
See also
getStringValue()
andsetValue()
.
- 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 returnsFalse
.- Return type
bool
See also
getValue()
andsetStringValue()
.
- 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()
andsetEnabled()
.
- class ProPushButton¶
Bases:
Pro.UI.ProView
This class represents a button control.
The notifications for this control are:
pvnButtonClicked
- Emitted when the button is clicked.See also
ProCustomView()
.Methods:
Returns the icon size of the button.
isFlat
()Returns
True
if the button is flat; otherwise returnsFalse
.
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
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 returnsFalse
.- 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 (seeproAddPublicIcon()
).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()
andProMenu
.
- 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:
pvnScriptEditorViewAutoComplete
- Emitted when the auto-completion is requested.
pvnScriptEditorViewRunScript
- Emitted when a script is run.
pvnScriptEditorViewTitleUpdate
- Emitted when the title of the script editor is changed.Available since Cerbero Suite 7.3 and Cerbero Engine 4.3.
See also
ProCustomView
.Methods:
Returns the text of the editor.
Returns
True
if there are unsaved changes; otherwise returnsFalse
.Returns
True
if the editor is empty; otherwise returnsFalse
.
isFile
()Returns
True
if the current script is a file; otherwise returnsFalse
.
openScript
(name)Opens an internal script.
openScriptFile
(fname)Opens a script from disk.
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.
Returns the name of the script.
setEditorText
(text)Sets the text of the editor.
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 returnsFalse
.- Return type
bool
See also
isEditorEmpty()
.
- isEditorEmpty() → bool¶
- Returns
Returns
True
if the editor is empty; otherwise returnsFalse
.- Return type
bool
See also
hasUnsavedChanges()
.
- isFile() → bool¶
- Returns
Returns
True
if the current script is a file; otherwise returnsFalse
.- 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 returnsFalse
.- Return type
bool
See also
openScriptFile()
,save()
andsaveAs()
.
- 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 returnsFalse
.- Return type
bool
See also
openScript()
,save()
andsaveAs()
.
- 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 tosaveAs()
if the changes were not previously saved; otherwise the method will fail.- Returns
Returns
True
if successful; otherwise returnsFalse
.- Return type
bool
See also
saveAs()
,saveScriptAs()
andopenScript()
.
- saveAs() → bool¶
Saves the current script with a name chosen by the user.
- Returns
Returns
True
if successful; otherwise returnsFalse
.- Return type
bool
See also
save()
,saveScriptAs()
andopenScript()
.
- saveScriptAs(fname: str) → bool¶
Saves the script to disk.
- Parameters
fname (str) – The file name of the script.
- Returns
Returns
True
if successful; otherwise returnsFalse
.- Return type
bool
See also
saveAs()
,save()
andopenScriptFile()
.
- 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:
pvnTabChanged
- Emitted when the current tab changes.Available since Cerbero Suite 5.0 and Cerbero Engine 2.0.
See also
ProCustomView
.Methods:
Returns the index of the current tab.
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:
pvnGetTableRow
- Emitted to retrieve the data for a row of the table.
pvnItemSelected
- Emitted when the item selection of the table has changed.
pvnRowSelected
- Emitted when the row selection of the table has changed.
pvnItemActivated
- Emitted when an item is activated.
pvnGetTableToolTip
- Emitted to retrieve the tool-tip for an item.See also
ProCustomView
andProCellTableView
.Methods:
displayFlags
(fl, value, title)Shows the flags dialog box for a specific value.
Returns the number of columns in the table.
Returns the column delta.
Returns the column labels.
getColumnWidth
(col)Retrieves the width of a column.
getItemText
(row, column)Retrieves the text of a table item.
Returns the vertical scroll position of the table.
Returns the number of rows in the table.
Retrieves the SQL columns displayed by the table which were specified when
setSQLTable()
was called.Retrieves the SQL condition used to filter the rows displayed by the table which was specified when
setSQLTable()
was called.Returns the currently selected SQL table if any; otherwise returns an empty string.
Returns the selected column if successful; otherwise returns
Pro.Core.INVALID_STREAM_OFFSET
.Returns the selected row if successful; otherwise returns
Pro.Core.INVALID_STREAM_OFFSET
.Returns the text of the selected item if any; otherwise returns
None
.Returns the structure displayed by the table if present; otherwise returns an invalid structure.
Returns
True
if this is a SQL table view; otherwise returnsFalse
.
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.
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.
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()
andgetRowCount()
.
- getColumnDelta() → int¶
- Returns
Returns the column delta.
- Return type
int
See also
setColumnDelta()
.
- getColumnLabels() → Pro.Core.NTStringList¶
- Returns
Returns the column labels.
- Return type
See also
setColumnLabels()
andPro.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()
andsetColumnCWidth()
.
- 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()
andgetColumnCount()
.
- 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()
andgetSQLCondition()
.
- 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()
andgetSQLColumns()
.
- getSQLTable() → str¶
- Returns
Returns the currently selected SQL table if any; otherwise returns an empty string.
- Return type
str
See also
setSQLTable()
andsetSQLTableSelectVisible()
.
- getSelectedColumn() → int¶
- Returns
Returns the selected column if successful; otherwise returns
Pro.Core.INVALID_STREAM_OFFSET
.- Return type
int
See also
getSelectedRow()
,setSelection()
andsetSelectedRow()
.
- getSelectedRow() → int¶
- Returns
Returns the selected row if successful; otherwise returns
Pro.Core.INVALID_STREAM_OFFSET
.- Return type
int
See also
getSelectedColumn()
,setSelection()
andsetSelectedRow()
.
- getSelectedText() → Optional[str]¶
- Returns
Returns the text of the selected item if any; otherwise returns
None
.- Return type
bool
See also
ProView.hasSelection()
,getSelectedColumn()
andgetSelectedRow()
.
- getStruct() → Pro.Core.CFFStruct¶
- Returns
Returns the structure displayed by the table if present; otherwise returns an invalid structure.
- Return type
See also
setStruct()
andPro.Core.CFFStruct
.
- isSQLTableView() → bool¶
- Returns
Returns
True
if this is a SQL table view; otherwise returnsFalse
.- Return type
bool
See also
setSQLite3Object()
andsetSQLTable()
.
- 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()
andupdateColumnsWidth()
.
- setColumnCount(columns: int) → None¶
Sets the column count for the table.
- Parameters
columns (int) – The number of columns to set.
See also
getColumnCount()
andsetRowCount()
.
- 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 thePro.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()
andPro.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()
andupdateColumnsWidth()
.
- 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()
andsetColumnCount()
.
- 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 returnsFalse
.- Return type
bool
See also
setSQLTableSelectVisible()
andsetSQLite3Object()
.
- 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()
andsetSQLite3Object()
.
- 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()
andsetSQLTable()
.
- 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()
andgetSelectedColumn()
.
- 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()
andgetSelectedColumn()
.
- 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
andsetColumnDelta()
.
- 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()
andProTextBrowserView.loadCarbonTheme()
.Attributes:
32-bit unsigned integer which represents the background color.
32-bit unsigned integer which represents the cursor color.
32-bit unsigned integer which represents the highlight background color.
32-bit unsigned integer which represents the highlight text color.
32-bit unsigned integer which represents the line highlight background color.
32-bit unsigned integer which represents the selection background color.
32-bit unsigned integer which represents the selection text color.
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()
.
- class ProTextBrowserHyperLink¶
This class contains the data of a
ProTextBrowserView
hyper-link.See also
ProTextBrowserView
.Methods:
clear
()Clears the data.
Attributes:
An unsigned 64-bit integer representing the data of the hyper-link.
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
.
- ProTextBrowserLineHighlightPolicy_Never: Final[int]¶
Line highlight policy for
ProTextBrowserView
.
- ProTextBrowserLineHighlightPolicy_NoFocus: Final[int]¶
Line highlight policy for
ProTextBrowserView
.
- 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.
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()
orvisitCode()
; otherwise returns0
.- Return type
int
See also
visitText()
,visitCode()
andProTextBrowserStringBuilder
.
- 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 andparse()
returns the same value returned by this method.- Return type
int
See also
visitText()
andparse()
.
- 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 andparse()
returns the same value returned by this method.- Return type
int
See also
visitCode()
andparse()
.
- class ProTextBrowserRange¶
This class represents a range of text in
ProTextBrowserView
.See also
ProTextBrowserView
.Methods:
Clears the range.
order
()Orders the range.
toString
()Returns the range as a printable string.
Attributes:
The id of the end line.
The end position.
The id of the start line.
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
andProTextBrowserParser
.Methods:
addLineMarker
(marker)Adds a line marker.
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.
Ends a hyper-link.
Returns the resulting line buffer.
isEmpty
()Returns
True
if the line is empty; otherwise returnsFalse
.
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.
Makes the text the default style.
setTextColor
(r_or_rgb[, g, b])Sets the text color.
Attributes:
The resulting line buffer.
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.
- beginHyperLink(type: TextBrowserHyperLinkType, data: TextBrowserHyperLinkData) → None¶
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.
- endHyperLink() → None¶
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 returnsFalse
.- 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()
andrpad()
.
- 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.
- 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.
- 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()
andpad_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()
andPro.Core.ntRgb()
.
- setBold() → None¶
Makes the text bold.
See also
setDefault()
.
- 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()
andPro.Core.ntRgb()
.
- class ProTextBrowserView¶
Bases:
Pro.UI.ProView
This class represents a text browser.
The notifications for this control are:
pvnTextBrowserLineCount
- Emitted whenshowCustomLines()
is called.
pvnTextBrowserGetLine
- Emitted whenshowCustomLines()
is called.
pvnTextBrowserLastLine
- Emitted whenshowCustomLines()
is called withCustomLines_Sparse
.
pvnTextBrowserPrevLine
- Emitted whenshowCustomLines()
is called withCustomLines_Sparse
.
pvnTextBrowserNextLine
- Emitted whenshowCustomLines()
is called withCustomLines_Sparse
.
pvnTextBrowserClosestLine
- Emitted whenshowCustomLines()
is called withCustomLines_Sparse
.
pvnTextBrowserHyperLinkActivated
- Emitted when a hyper-link is activated.
pvnTextBrowserWheelScroll
- Emitted when scroll-bars are disabled.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:
Option for
showCustomLines()
.Methods:
Returns a tuple containing the current line and position.
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.
Returns the basic colors of the text browser.
getData
()Returns the raw text data of the view.
Returns the line highlight policy (e.g.,
ProTextBrowserLineHighlightPolicy_Always
).
getSelectedRange
(range)Retrieves the selected text range information.
Returns the selected text if successful; otherwise returns an empty string.
getText
()Retrieves the text of the view.
Returns the text tags if available; otherwise returns an invalid
Pro.Core.NTTextTags()
instance.Retrieves the amount of characters allowed on a single line.
hasData
()Returns
True
if the text browser has data; otherwise returnsFalse
.Returns the UI action used to follow hyper-links.
Returns
True
if the horizontal scroll-bar is enabled; otherwise returnsFalse
.Returns
True
if the vertical scroll-bar is enabled; otherwise returnsFalse
.
loadCarbonTheme
(theme)Loads the basic colors for the text browser from a Carbon theme.
Returns the maximum number of characters which can be displayed on a single line.
Returns the maximum number of characters which are visible horizontally.
Returns the maximum number of visible lines.
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.
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()
andcursorLine()
.
- cursorLine() → tuple¶
- Returns
Returns a tuple containing the cursor line and position.
- Return type
tuple[int, int]
See also
setCursorLine()
andcurrentLine()
.
- 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
See also
setColors()
.
- getData() → Pro.Core.NTContainer¶
- Returns
Returns the raw text data of the view.
- Return type
See also
setData()
andsetPlainText()
.
- 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 returnsFalse
.- Return type
bool
See also
setSelectedRange()
andresetSelection()
.
- 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
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()
orsetPlainText()
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 returnsFalse
.- Return type
bool
Available since Cerbero Suite 7.6 and Cerbero Engine 4.6.
See also
setData()
andsetPlainText()
.
- hyperLinkFollowAction() → Pro.UI.ProUIAction¶
- Returns
Returns the UI action used to follow hyper-links.
- Return type
See also
ProUIAction
.
- isHorizontalScrollBarEnabled() → bool¶
- Returns
Returns
True
if the horizontal scroll-bar is enabled; otherwise returnsFalse
.- 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 returnsFalse
.- 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()
andmaxVisibleLines()
.
- maxVisibleLineLength() → int¶
- Returns
Returns the maximum number of characters which are visible horizontally.
- Return type
int
See also
maxLineCharacters()
andmaxVisibleLines()
.
- maxVisibleLines() → int¶
- Returns
Returns the maximum number of visible lines.
- Return type
int
See also
maxLineCharacters()
andmaxVisibleLineLength()
.
- resetSelection() → None¶
Resets the selection.
See also
getSelectedRange()
andsetSelectedRange()
.
- 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()
andsetCursorLine()
.
- 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()
andsetCurrentLine()
.
- 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 returnsFalse
.- Return type
bool
Available since Cerbero Suite 7.0 and Cerbero Engine 4.0.
See also
getData()
,setPlainText()
andproHighlightingNameFromFileName()
.
- 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()
andshowCustomLines()
.
- 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()
andshowCustomLines()
.
- setSelectedRange(range: Pro.UI.ProTextBrowserRange) → None¶
Sets the selected text range.
- Parameters
range (ProTextBrowserRange) – The range of text to select.
See also
getSelectedRange()
andresetSelection()
.
- 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()
orsetPlainText()
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()
andsetLines()
.
- class ProTextLine¶
Bases:
Pro.UI.ProView
This class represents a text line control.
The notifications for this control are:
pvnTextLineEdited
- Emitted when the text is modified.See also
ProCustomView
.Methods:
Returns
True
if the clear button is enabled; otherwise returnsFalse
.Returns the place-holder text of the control.
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 returnsFalse
.- 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()
.
- class ProTextView¶
Bases:
Pro.UI.ProView
This class represents a text view.
See also
ProContext.createView()
andProCustomView
.Methods:
Returns the current disassembly options for the view (e.g.,
Pro.Core.DisasmOpt_Opcodes
).Returns the position of the text cursor.
Returns the selected text if successful; otherwise returns
None
.Returns the size of the selected text.
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()
andsetSelection()
.
- getSelectionSize() → int¶
- Returns
Returns the size of the selected text.
- Return type
int
See also
getSelectionStart()
,setSelection()
andProView.hasSelection()
.
- getSelectionStart() → int¶
- Returns
Returns the start position of the selected text.
- Return type
int
See also
getSelectionSize()
,setSelection()
andProView.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()
andsetUndoableText()
.
- 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 returnsFalse
.- Return type
bool
See also
getSelectedText()
,setText()
andsetUndoableText()
.
- 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()
andgetSelectionSize()
.
- 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 returnsFalse
.- Return type
bool
See also
getText()
,setSelectedText()
andsetUndoableText()
.
- 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 returnsFalse
.- Return type
bool
See also
getText()
,setText()
andsetUndoableText()
.
- class ProTheme¶
This class represents a graphical theme.
Available since Cerbero Suite 6.0 and Cerbero Engine 3.0.
Methods:
Returns the list of available Carbon themes.
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 returnsFalse
.
isValid
()Returns
True
if the theme is valid; otherwise returnsFalse
.
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.
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
See also
availableThemes()
.
- static availableThemes() → Pro.Core.NTStringList¶
- Returns
Returns the list of available application themes.
- Return type
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
- isNull() → bool¶
- Returns
Returns
True
if the theme is invalid; otherwise returnsFalse
.- Return type
bool
See also
isValid()
.
- isValid() → bool¶
- Returns
Returns
True
if the theme is valid; otherwise returnsFalse
.- 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
See also
loadCarbon()
andsetTheme()
.
- 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
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()
andvalue()
.
- 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
- 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()
andcssColor()
.
- class ProToolBar¶
This class represents a tool-bar.
Only workspaces can have tool-bars (see
ProWorkspace
).See also
ProWorkspace
,ProUIAction
andProMenuBar
.Methods:
addAction
(action)Adds a UI action to the tool-bar.
Adds a separator to the tool-bar.
isNull
()Returns
True
if the tool-bar is invalid; otherwise returnsFalse
.
- 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 returnsFalse
.- 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:
The column of the tree index.
The identifier of the tree index.
The row of the tree index.
Methods:
isValid
()Returns
True
if the index is valid; otherwise returnsFalse
.
- id¶
The identifier of the tree index.
This is a user-defined 32-bit unsigned integer.
- isValid() → bool¶
- Returns
Returns
True
if the index is valid; otherwise returnsFalse
.- Return type
bool
- 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:
pvnGetCustomTreeRow
- Emitted to retrieve the data for a row of a custom tree view.
pvnCustomTreeRowSelected
- Emitted when the selected row has changed in a custom tree view.
pvnCustomTreeItemActivated
- Emitted when an item of a custom tree view was activated.
pvnCustomTreeItemExpanded
- Emitted when an item of a custom tree view was expanded.
pvnTreeRowCount
- Emitted to retrieve the number child rows for an item of a custom tree view.
pvnTreeColumnCount
- Emitted to retrieve the number child columns for an item of a custom tree view.
pvnTreeIndex
- Emitted to retrieve the index information for an item of a custom tree view.
pvnTreeParent
- Emitted to retrieve the parent index information for an item of a custom tree view.The notifications for tree views built from a
Pro.Core.CFFDB
are:
pvnGetTreeRow
- Emitted to retrieve the data for a row of aPro.Core.CFFDB
tree view.
pvnTreeItemSelected
- Emitted when the selected row has changed in aPro.Core.CFFDB
tree view.
pvnTreeItemActivated
- Emitted when an item of aPro.Core.CFFDB
tree view was activated.
pvnTreeRowSelected
- Emitted when the selected row has changed in aPro.Core.CFFDB
tree view.
pvnTreeItemExpanded
- Emitted when an item of aPro.Core.CFFDB
tree view was expanded.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()
andPro.Core.CFFDB
.Methods:
Collapses all the nodes of the tree view.
Regulates the emission of node expansion notifications.
Expands all the nodes of the tree view.
Returns the column labels.
getColumnWidth
(col)Retrieves the width of a column.
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 invalidPro.Core.CFFDB
.Returns the
Pro.Core.CFFDB
index of the selected tree node if successful; otherwise returnsPro.Core.CFFDBInvalidIndex
.
parentIndex
(idx)Retrieves the parent index of an item in a custom tree view.
Ends a row insertion operation in a custom tree.
rowsInsertionStart
(pidx, first, last)Starts a row insertion operation in a custom tree
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.
Selects an item in a custom tree view.
setDB
(db)Initializes the tree view using a
Pro.Core.CFFDB
instance.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
andpvnTreeItemExpanded
.
- expandAll() → None¶
Expands all the nodes of the tree view.
See also
collapseAll()
andsetExpandAllEnabled()
.
- getColumnLabels() → Pro.Core.NTStringList¶
- Returns
Returns the column labels.
- Return type
See also
setColumnLabels()
andPro.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()
andsetColumnCWidth()
.
- getCustomSelectedIndex() → Pro.UI.ProTreeIndex¶
- Returns
Returns the selected index of a custom tree view if successful; otherwise returns an invalid index.
- Return type
See also
setCustomSelectedIndex()
,ProTreeIndex
andProView.hasSelection()
.
- getDB() → Pro.Core.CFFDB¶
- Returns
Returns the
Pro.Core.CFFDB
instance if available; otherwise returns an invalidPro.Core.CFFDB
.- Return type
See also
setDB()
andPro.Core.CFFDB
.
- getSelectedIndex() → int¶
- Returns
Returns the
Pro.Core.CFFDB
index of the selected tree node if successful; otherwise returnsPro.Core.CFFDBInvalidIndex
.- Return type
int
See also
setSelectedIndex()
,Pro.Core.CFFDB
andProView.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
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()
andgetColumnWidth()
.
- 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()
andgetColumnWidth()
.
- 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()
andcollapseAll()
.
- 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
andProView.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()
andPro.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()
andsetExpandAllEnabled()
.
- 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
andProView.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.
Returns
True
if the action is checked; otherwise returnsFalse
.
isNull
()Returns
True
if the action is invalid; otherwise returnsFalse
.
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
Available since Cerbero Suite 7.4 and Cerbero Engine 4.4.
See also
setMenu()
.
- isChecked() → bool¶
- Returns
Returns
True
if the action is checked; otherwise returnsFalse
.- Return type
bool
See also
setChecked()
andsetCheckable()
.
- isNull() → bool¶
- Returns
Returns
True
if the action is invalid; otherwise returnsFalse
.- 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()
andisChecked()
.
- 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()
andsetCheckable()
.
- 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 (seeproAddPublicIcon()
).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
andProUIRect
.Methods:
fromBytes
(b)Converts a byte-array into a UI point.
toBytes
()Converts the UI point into a byte-array.
Attributes:
The x coordinate of the point.
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
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()
.
- 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
andProUISize
.Methods:
fromBytes
(b)Converts a byte-array into a UI rect.
isEmpty
()Returns
True
if the rect is empty; otherwise returnsFalse
.
toBytes
()Converts the UI rect into a byte-array.
Attributes:
The height of the rect.
The width of the rect.
The x coordinate of the rect.
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
See also
toBytes()
.
- h¶
The height of the rect.
- isEmpty() → bool¶
- Returns
Returns
True
if the rect is empty; otherwise returnsFalse
.- 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
andProUIRect
.Methods:
fromBytes
(b)Converts a byte-array into a UI size.
isEmpty
()Returns
True
if the size is empty; otherwise returnsFalse
.
toBytes
()Converts the UI size into a byte-array.
Attributes:
The height of the size.
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
See also
toBytes()
.
- h¶
The height of the size.
- isEmpty() → bool¶
- Returns
Returns
True
if the size is empty; otherwise returnsFalse
.- 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:
pvnCtrlSetup
- Emitted when the control is initialized.
pvnCtrlReset
- Emitted when the control is reset.
pvnContextMenu
- Emitted when the user requests a context menu.
pvnExecuteAction
- Emitted when a UI action is executed.See also
ProContext.createView()
,Type_Custom
andProCustomView
.Attributes:
Creates a Carbon disassembly view.
Creates a cell table view.
Creates a custom view.
Creates a file system view.
Creates a file info view.
Creates a hex view.
Creates a media view.
Creates a plot view.
Creates a SQLite table view.
Creates a table view.
Creates a text view.
Creates a text browser view.
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.
Returns the description of the contextual header if available; otherwise returns an empty string.
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.
Returns the background color of the view.
Returns the geometry of the view.
getName
()Returns the name of the view.
getTitle
()Returns the title of the view.
Returns the internal type name of the view if any; otherwise returns an empty string.
hasFocus
()Returns
True
if the view is focused; otherwise returnsFalse
.Returns
True
if the view has a selection; otherwise returnsFalse
.
id
()Returns the unique identifier of the view.
Returns
True
if the view belongs to an analysis view; otherwise returnsFalse
.Returns
True
if the view is enabled; otherwise returnsFalse
.Returns
True
if the view is maximized; otherwise returnsFalse
.Returns
True
if view belongs to an analysis view that belongs to the current root; otherwise returnsFalse
.
isValid
()Returns
True
if the view is valid; otherwise returnsFalse
.Returns
True
if the view is visible; otherwise returnsFalse
.
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.
Shows the view as maximized.
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()
andProCarbonView
.
- Type_CellTable: Final[int]¶
Creates a cell table view.
See also
ProContext.createView()
andProCellTableView
.
- Type_Custom: Final[int]¶
Creates a custom view.
See also
ProContext.createView()
andProCustomView
.
- Type_FS: Final[int]¶
Creates a file system view.
Available since Cerbero Suite 7.0 and Cerbero Engine 4.0.
See also
ProContext.createView()
andProFileSystemView
.
- Type_FileInfo: Final[int]¶
Creates a file info view.
Available since Cerbero Suite 7.1 and Cerbero Engine 4.1.
See also
ProContext.createView()
andProFileInfoView
.
- Type_Hex: Final[int]¶
Creates a hex view.
See also
ProContext.createView()
andProHexView
.
- Type_Media: Final[int]¶
Creates a media view.
See also
ProContext.createView()
andProMediaView
.
- Type_Plot: Final[int]¶
Creates a plot view.
See also
ProContext.createView()
andProPlotView
.
- Type_SqlTable: Final[int]¶
Creates a SQLite table view.
See also
ProContext.createView()
andProTableView
.
- Type_Table: Final[int]¶
Creates a table view.
See also
ProContext.createView()
andProTableView
.
- Type_Text: Final[int]¶
Creates a text view.
See also
ProContext.createView()
andProTextView
.
- Type_TextBrowser: Final[int]¶
Creates a text browser view.
See also
ProContext.createView()
andProTextBrowserView
.
- Type_Tree: Final[int]¶
Creates a tree view.
See also
ProContext.createView()
andProTreeView
.
- 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 (seeproAddPublicIcon()
).- Returns
Returns a UI action if successful; otherwise returns an invalid UI action.
- Return type
See also
ProUIAction.free()
andProUIAction
.
- 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 thepvnOwnerViewClosed
notification when the owner view is closed instead of being closed; otherwise the dependent view is closed.See also
closeDependentView()
andProContext.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 usingProPushButton.setMenu()
.
- Parameters
title (str) – The title of the menu.
- Returns
Returns the new menu.
- Return type
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()
andProDialog
.
- 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()
andsetEnabled()
.
- 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
See also
ProContext.createViewFromWidget()
andProContext.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
See also
setGeometry()
andisMaximized()
.
- 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 returnsFalse
.- Return type
bool
See also
setFocus()
andensureVisible()
.
- hasSelection() → bool¶
- Returns
Returns
True
if the view has a selection; otherwise returnsFalse
.- 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 returnsFalse
.- 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 returnsFalse
.- Return type
bool
See also
setEnabled()
andisVisible()
.
- isMaximized() → bool¶
- Returns
Returns
True
if the view is maximized; otherwise returnsFalse
.- Return type
bool
See also
showMaximized()
andgetGeometry()
.
- isNonOrphanedAnalysisView() → bool¶
- Returns
Returns
True
if view belongs to an analysis view that belongs to the current root; otherwise returnsFalse
.- 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 returnsFalse
.- Return type
bool
- isVisible() → bool¶
- Returns
Returns
True
if the view is visible; otherwise returnsFalse
.- Return type
bool
See also
setVisible()
andensureVisible()
.
- 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()
andensureVisible()
.
- setFocus() → None¶
Sets the focus to the view.
See also
hasFocus()
andensureVisible()
.
- setGeometry(rc: Pro.UI.ProUIRect) → None¶
Sets the geometry of the view.
- Parameters
rc (ProUIRect) – The geometry to set.
See also
getGeometry()
andisMaximized()
.
- 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 (seeproAddPublicIcon()
).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()
andensureVisible()
.
- showMaximized() → None¶
Shows the view as maximized.
Hint
This method is works only for top-level windows.
See also
isMaximized()
andshowNormal()
.
- showNormal() → None¶
Shows the view in its normal geometry.
Hint
This method is works only for top-level windows.
See also
isMaximized()
andshowMaximized()
.
- 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()
andPro.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:
pvnCmdLineEntered
- Emitted when a command is entered in a custom command line interpreter.
pvnDrop
- Emitted whensetAcceptDrops()
is used.
pvnMenuAboutToShow
- Emitted whennotifyMenuAboutToShow()
is used.See also
ProContext.createWorkspace()
.Attributes:
Standard actions for layouts.
Standard run actions.
Standard actions for views.
Standard output view dock.
Standard actions top menu item.
Standard help top menu item.
Standard views top menu item.
Standard command-line tool-bar.
Standard tool-bar for layouts.
Standard run tool-bar.
Standard tool-bar for views.
Methods:
Returns
True
if the workspace accepts drop events; otherwise returnsFalse
.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.
Sets whether the workspace accepts drop events.
Sets the current command line interpreter.
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 returnsFalse
.- 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()
andpvnCmdLineEntered
.
- 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()
andsetDefaultTabTargetName()
.
- 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()
andcreateStdDock()
.
- 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
Available since Cerbero Suite 7.0 and Cerbero Engine 4.0.
See also
menuBar()
,ProMenuBar
andProMenu
.
- 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
See also
addToolBar()
,addStdActions()
andcreateStdDock()
.
- 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
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
See also
createDock()
andaddDock()
.
- 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
See also
addDock()
andcreateStdDock()
.
- 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
See also
addDock()
andcreateDock()
.
- dockList() → Pro.UI.ProDockList¶
- Returns
Returns the list of docks available in the workspace.
- Return type
Available since Cerbero Suite 7.4 and Cerbero Engine 7.4.
See also
findDock()
andProDock
.
- 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
Available since Cerbero Suite 6.4 and Cerbero Engine 3.4.
See also
dockList()
andProDock
.
- 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()
andsaveLayout()
.
- Returns
Returns the menu-bar of the workspace.
- Return type
See also
ProMenuBar
.
- notifyMenuAboutToShow(menu: Pro.UI.ProMenu, notify: bool = True) → None¶
Sets whether show notifications should be sent for a specific menu.
- Parameters
menu (ProMenu) – The menu.
notify (bool) – If
True
, the workspace will receivepvnMenuAboutToShow
notifications.Available since Cerbero Suite 7.4 and Cerbero Engine 7.4.
See also
pvnMenuAboutToShow
andpvnMenuAboutToShowData
.
- 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()
andsaveLayout()
.
- 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()
andgetLayout()
.
- 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()
andsetDefaultCommandLineInterpreter()
.
- 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()
andsetCurrentCommandLineInterpreter()
.
- 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 returnsFalse
.- Return type
bool
See also
ProContext.createWorkspace()
andshow()
.
- show() → None¶
Shows the workspace.
See also
ProContext.createWorkspace()
andsetup()
.
- 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()
.
- PubIcon_DirLink: Final[int]¶
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()
.
- PubIcon_FileLink: Final[int]¶
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()
.
Identifier for the ‘navigation back’ icon.
See also
proAddPublicIcon()
.
Identifier for the ‘navigation down’ icon.
Available since Cerbero Suite 7.0 and Cerbero Engine 4.0.
See also
proAddPublicIcon()
.
Identifier for the ‘navigation forward’ icon.
See also
proAddPublicIcon()
.
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()
andproAddPublicIconFromFile()
.
- 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()
andproAddPublicIcon()
.
- proContext() → Pro.UI.ProContext¶
- Returns
Returns the global
ProContext
instance.- Return type
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
andProColor_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()
orproAddPublicIconFromFile()
.
- Parameters
iid (int) – The unique identifier of the icon to free.
See also
proAddPublicIcon()
andproAddPublicIconFromFile()
.
- 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
andProCellTableView
.
- class pvnCellTableGetHeaderData¶
This class contains the data associated to
pvnCellTableGetHeader
.See also
ProTabBar
.Attributes:
If
True
, the request is for the horizontal header of the cell table view; otherwise it’s for the vertical header.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.
- pvnCellTableGetItem: Final[int]¶
Notification to retrieve the data of a cell table item.
The associated data is
pvnCellTableGetItemData
.See also
pvnCellTableGetItemData
andProCellTableView
.
- class pvnCellTableGetItemData¶
This class contains the data associated to
pvnCellTableGetItem
.See also
ProCellTableView
.Attributes:
The column of the item.
The row of the item.
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.
- setColor(color: int) → None¶
Sets the requested item color.
This method can be called when processing the
ProCellTableView.Data_BackgroundColor
andProCellTableView.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 (seeproAddPublicIcon()
).See also
proAddPublicIcon()
.
- setText(t: str) → None¶
Sets the item text.
This method can be called when processing the
ProCellTableView.Data_Text
andProCellTableView.Data_EditText
notifications.Important
Both
ProCellTableView.Data_Text
andProCellTableView.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
andProCellTableView
.
- class pvnCellTableItemActivatedData¶
This class contains the data associated to
pvnCellTableItemActivated
.See also
ProCellTableView
.Attributes:
The column of the activated item.
The row of the activated item.
- 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
andProCheckBox
.
- class pvnCheckChangedData¶
This class contains the data associated to
pvnCheckChanged
.See also
ProCheckBox
.Attributes:
This value is
True
when the check box is checked; otherwise it’sFalse
.
- checked¶
This value is
True
when the check box is checked; otherwise it’sFalse
.
- pvnClose: Final[int]¶
Notification for when a custom view is destroyed.
See also
ProCustomView
.
- 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
andProWorkspace.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:
The entered command.
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
andProComboBox
.
- class pvnComboIndexChangedData¶
This class contains the data associated to
pvnComboIndexChanged
.See also
ProComboBox
.Attributes:
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
andpvnGetCustomTreeRowData
.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.
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()
andsetBgColor()
.
- 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()
orisValid()
.
- 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 returnsFalse
.- Return type
bool
See also
bgColor()
andsetBgColor()
.
- 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 byProCellTableView
.
- Parameters
i (int) – The item index.
- Returns
Returns
True
if the item has an icon; otherwise returnsFalse
.- Return type
bool
- 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 returnsFalse
.- Return type
bool
See also
bgColor()
andsetBgColor()
.
- 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 byProCellTableView
.
- Parameters
i (int) – The item index.
- Returns
Retrieves the icon identifier if the item has an icon; otherwise returns
-1
.- Return type
int
- 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 returnsFalse
.- Return type
bool
- 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()
andbgColor()
.
- 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 byProCellTableView
.
- 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 (seeproAddPublicIcon()
).
- 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.
- class pvnCommonTextBrowserLineIdData¶
This class is derived by other classes to retrieve line id information.
Attributes:
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
andProView
.
- class pvnContextMenuData¶
This class contains the data associated to
pvnContextMenu
.See also
ProView
.Attributes:
The instance of the
ProMenu
context menu.
- pvnCustomTreeItemActivated: Final[int]¶
Notification for when an item of a custom tree view was activated.
The associated data is
pvnCustomTreeItemActivatedData
.See also
pvnCustomTreeItemActivatedData
andProTreeView
.
- 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
andProTreeView
.
- 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
andProTreeView
.
- 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
andProWorkspace
.
- class pvnDropData¶
This class contains the data associated to
pvnDrop
.Attributes:
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
andProView
.
- class pvnExecuteActionData¶
This class contains the data associated to
pvnExecuteAction
.See also
ProView
.Attributes:
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
andProTreeView
.
- class pvnGetCustomTreeRowData¶
Bases:
Pro.UI.pvnCommonRowData
This class contains the data associated to
pvnGetCustomTreeRow
.See also
ProTreeView
.Attributes:
The column of the tree index.
The identifier of the tree index.
The row of the tree index.
Methods:
isValid
()Returns
True
if the index is valid; otherwise returnsFalse
.
- id¶
The identifier of the tree index.
This is a user-defined 32-bit unsigned integer.
- isValid() → bool¶
- Returns
Returns
True
if the index is valid; otherwise returnsFalse
.- Return type
bool
- pvnGetTableRow: Final[int]¶
Notification to retrieve the data for a table view row.
The associated data is
pvnGetTableRowData
.See also
pvnGetTableRowData
andProTableView
.
- class pvnGetTableRowData¶
Bases:
Pro.UI.pvnCommonRowData
This class contains the data associated to
pvnGetTableRow
.See also
pvnCommonRowData
andProTableView
.Attributes:
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
andProTableView
.
- 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.
Checks whether the tool-tip has a background color.
hasIcon
()Checks whether the tool-tip has an icon.
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:
The column of the table view item.
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()
andsetBgColor()
.
- clear() → None¶
Clears the data set.
- flags() → int¶
Retrieves the flags for the tool-tip.
- . hint::
The individual flags can be checked using methods such as
hasBGColor()
orisValid()
.
- 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 returnsFalse
.- Return type
bool
See also
bgColor()
andsetBgColor()
.
- 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 returnsFalse
.- Return type
bool
- 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()
andsetBgColor()
.
- 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 returnsFalse
.- Return type
bool
- 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()
andbgColor()
.
- 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 (seeproAddPublicIcon()
).
- setText(t: str) → None¶
Sets the text for the tool-tip.
- Parameters
t (str) – The tool-tip text.
- 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
andProTreeView
.
- class pvnGetTreeRowData¶
Bases:
Pro.UI.pvnCommonRowData
This class contains the data associated to
pvnGetTreeRow
.See also
ProTreeView
.Attributes:
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()
andProCustomView
.
- 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
andProTableView
.
- class pvnItemActivatedData¶
This class contains the data associated to
pvnItemActivated
.See also
ProTableView
.Attributes:
The column of the activate item.
The row of the activate item.
- pvnItemSelected: Final[int]¶
Notification for when an item is selected in a table view.
The associated data is
pvnItemSelectedData
.See also
pvnItemSelectedData
andProTableView
.
- class pvnItemSelectedData¶
This class contains the data associated to
pvnItemSelected
.See also
ProTableView
.Attributes:
The column of the selected item.
The row of the selected item.
- 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:
The instance of the
ProMenu
context menu.
- 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
andProPlotView
.
- class pvnPlotPointSelectedData¶
This class contains the data associated to
pvnPlotPointSelected
.See also
ProPlotView
.Attributes:
The x-coordinate of the point.
The y-coordinate of the point.
- 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
andProTableView
.
- class pvnRowSelectedData¶
This class contains the data associated to
pvnRowSelected
.See also
ProTableView
.Attributes:
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
andProScriptEditorView
.
- class pvnScriptEditorViewAutoCompleteData¶
This class contains the data associated to
pvnScriptEditorViewAutoComplete
.See also
ProScriptEditorView
.Attributes:
A
Pro.Core.NTUTF8StringList
list that must be filled with fully completed words.A
Pro.Core.NTUTF8StringList
list that must be filled with partially completed words.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
andProTabBar
.
- class pvnTabChangedData¶
This class contains the data associated to
pvnTabChanged
.See also
ProTabBar
.Attributes:
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 withProTextBrowserView.CustomLines_Sparse
.See also
pvnTextBrowserClosestLineData
andProTextBrowserView
.
- class pvnTextBrowserClosestLineData¶
Bases:
Pro.UI.pvnCommonTextBrowserLineIdData
This class contains the data associated to
pvnTextBrowserClosestLine
.See also
ProTextBrowserView
.Attributes:
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
andProTextBrowserView
.
- class pvnTextBrowserGetLineData¶
This class contains the data associated to
pvnTextBrowserGetLine
.See also
ProTextBrowserView
.Attributes:
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()
andProTextBrowserStringBuilder
.
- 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()
andProTextBrowserStringBuilder
.
- pvnTextBrowserHyperLinkActivated: Final[int]¶
Notification sent when a hyper-link is activated in a
ProTextBrowserView
.The associated data is
pvnTextBrowserHyperLinkActivatedData
.See also
pvnTextBrowserHyperLinkActivatedData
andProTextBrowserView
.
- class pvnTextBrowserHyperLinkActivatedData¶
This class contains the data associated to
pvnTextBrowserHyperLinkActivated
.See also
ProTextBrowserView
.Attributes:
A
ProTextBrowserHyperLink
instance.
- hyper_link¶
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 withProTextBrowserView.CustomLines_Sparse
.See also
pvnTextBrowserLastLineData
andProTextBrowserView
.
- 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
andProTextBrowserView
.
- 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 withProTextBrowserView.CustomLines_Sparse
.See also
pvnTextBrowserNextLineData
andProTextBrowserView
.
- 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 withProTextBrowserView.CustomLines_Sparse
.See also
pvnTextBrowserPrevLineData
andProTextBrowserView
.
- 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
andProTextBrowserView
.
- class pvnTextBrowserWheelScrollData¶
This class contains the data associated to
pvnTextBrowserWheelScroll
.Available since Cerbero Suite 6.4 and Cerbero Engine 3.4.
Attributes:
The direction and amount of scrolling.
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
andProTreeView
.
- 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
andProTreeView
.
- class pvnTreeIndexData¶
This class contains the data associated to
pvnTreeIndex
.See also
ProTreeView
.Attributes:
The column of the item.
The parent index of the item.
The row of the item.
Methods:
setItemId
(id)Sets the user-defined 32-bit unsigned integer identifier for the item.
- pidx¶
The parent index of the item.
See also
ProTreeIndex
,column
androw
.
- 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
andProTreeView
.
- class pvnTreeItemActivatedData¶
This class contains the data associated to
pvnTreeItemActivated
.See also
ProTreeView
.Attributes:
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
andProTreeView
.
- class pvnTreeItemExpandedData¶
This class contains the data associated to
pvnTreeItemExpanded
.See also
ProTreeView
.Attributes:
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
andProTreeView
.
- class pvnTreeParentData¶
This class contains the data associated to
pvnTreeParent
.See also
ProTreeView
.Attributes:
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
andsetParentIndex()
.
- 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
andProTreeView
.
- 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
andProTreeView
.
- class pvnTreeRowSelectedData¶
This class contains the data associated to
pvnTreeRowSelected
.See also
ProTreeView
.Attributes:
The
Pro.Core.CFFDB
index of the selected tree node.
- index¶
The
Pro.Core.CFFDB
index of the selected tree node.