HostPage#

class ansys.scade.guitools.guihost.HostPage(name: str, optional: bool, *args, **kwargs)#

Bases: ansys.scade.guitools.page.PropertyPageEx

Defines a property page for hosting client pages.

Parameters#

namestr

Name of the property Page.

optionalbool

Whether the combo box for selecting clients is hidden when there is only one client.

argsAny

Additional parameters for the property page.

kwargsAny

Additional parameters for the property page.

Initialize the host page.

Overview#

add_client

Add a client to the page.

is_available

Return whether the page is available for the current selection.

on_build

Build the property page and its clients.

on_close

Perform any cleaning before the page is closed.

on_context

Declare the models the page should consider.

on_display

Display the property page and its clients.

on_layout

Declare the contained control’s constraints.

on_sel_change

Display the selected client.

on_validate

Validate the property page’s clients.

Import detail#

from ansys.scade.guitools.guihost import HostPage

Attribute detail#

HostPage.active_clients: Dict[str, ProxyPageClient]#
HostPage.categories: List[str] = []#
HostPage.category = ''#
HostPage.cb_clients = None#
HostPage.optional#
HostPage.proxies: List[ProxyPageClient] = []#

Method detail#

HostPage.add_client(proxy: ProxyPageClient)#

Add a client to the page.

Parameters#

proxyProxyPageClient

Client page proxy.

HostPage.is_available(models: List[Any]) bool#

Return whether the page is available for the current selection.

The page is available for the selected models if at least one of its clients is available

Parameters#

modelsList[Any]

List of selected objects in the IDE.

HostPage.on_build()#

Build the property page and its clients.

HostPage.on_close()#

Perform any cleaning before the page is closed.

HostPage.on_context(models: List[Any])#

Declare the models the page should consider.

Parameters#

modelsList[Any]

List of selected objects in the IDE.

HostPage.on_display()#

Display the property page and its clients.

Activate the last active client when possible.

HostPage.on_layout()#

Declare the contained control’s constraints.

HostPage.on_sel_change(combobox: ansys.scade.guitools.control.ComboBox, index: int)#

Display the selected client.

Parameters#

comboboxComboBox

Control initiating the notification. Unused.

indexint

Index of the selected element.

HostPage.on_validate()#

Validate the property page’s clients.