Loading...
Skip to end of metadata
Go to start of metadata

ArkTab objects represent a handle to a graphical tab in the arKItect client's main frame. They support the following methods :

  • GetName()
    Returns the current caption of the tab
  • SetName( name )
    Sets the caption of the tab. If name is already the caption of another ArkTab object, a ValueError will be raised.
  • TopWidget()
    Returns The PyQt widget shown in the tab. Use it as a parent for the windows you need to embed into the tab.
  • SetActionState( actionId, enabled, checked = False)
    Defines the state of the arKItect's toolbar component identified by the actionId, whether it is enabled or not (True or False) and whether it is checked or not (True or False).
    Here are the following values possible for actionId :

    Action ID

    Matching Icon

    ACTION_FILE_NEW

    ACTION_FILE_OPEN

    ACTION_EDIT_CUT

    ACTION_EDIT_COPY

    ACTION_EDIT_PASTE

    ACTION_APP_ABOUT

    ACTION_REFRESH

    ACTION_DICTIONARY

    ACTION_SEARCH

    ACTION_SHOW_PROPS

    ACTION_SHOW_LOCATION

    ACTION_SHOW_VARIANTS

    ACTION_VIEW_TASK_PANE

    ACTION_ADD_PANE

    ACTION_TREEVIEWS_COMBO

    Combobox

    ACTION_ACTIVATE_TREEVIEW

    ACTION_VIEW_PREV

    ACTION_VIEW_NEXT

    ACTION_VIEW_UP

    ACTION_LOCALIZE_OBJECTS

    ACTION_OD_DRAW_SELECT

    ACTION_OD_LINK_COMPONENTS

    ACTION_SAVE_AS_JPG

    ACTION_HIDE_LABELS

    ACTION_SYNCHRONIZE_VIEWS

    ACTION_AUTOLAYOUT_H

    ACTION_AUTOLAYOUT_V

    ACTION_AUTOLAYOUT_LEGACY

    ACTION_AUTOLAYOUT_HTREE

    ACTION_AUTOLAYOUT_VTREE

    ACTION_AUTOLAYOUT_OUTERPORTS

    ACTION_RESET_OUTERPORTS

    ACTION_ZOOM

    ACTION_ZOOM_FIT

    ACTION_ZOOM_SELECTION

    ACTION_PAN

    ACTION_GRID

    ACTION_SNAP_TO_GRID

    ACTION_PAGE_BOUNDS

    ACTION_NUDGE_DOWN

    ACTION_NUDGE_LEFT

    ACTION_NUDGE_RIGHT

    ACTION_NUDGE_UP

    ACTION_ALIGN_BOTTOM

    ACTION_ALIGN_CENTER

    ACTION_ALIGN_LEFT

    ACTION_ALIGN_MIDDLE

    ACTION_ALIGN_RIGHT

    ACTION_ALIGN_TOP

    ACTION_SPACE_ACROSS

    ACTION_SPACE_DOWN

    ACTION_SAME_WIDTH

    ACTION_SAME_HEIGHT

    ACTION_SAME_SIZE

    ACTION_CHOICE_MNGR

    ACTION_VARIANT_MNGR

    ACTION_VARIANT_SUM

    ACTION_VARIANTS_COMBO

    Combobox

  • OnAction( actionId, functor )
    Binds functor to the click of the arKItect's toolbar button identified by actionId. functor needs to be a callable with an arity of 1. This ArkTab object will be passed as a parameter when functor is called.
    actionId can be any of the values enumerated previously except ACTION_TREEVIEWS_COMBO and ACTION_VARIANTS_COMBO since they are not buttons.
  • OnFocus( functor )
    Binds functor to the focus event of the tab. functor will therefore be called when the tab gets the focus (most likely due to a click on the tab).
    functor needs to be a callable with an arity of 2. This ArkTab object and the current ArkObjRef object will be passed as parameters when functor is called.
    Note that a focus event can be generated by a click on the tab, a change of projection, a change of variant or even a change of object in the projection.
  • OnDestroy( functor )
    Binds functor to the destroy event of the tab. functor will therefore be called when the tab gets removed. 
    functor needs to be a callable with an arity of 1. This ArkTab object will be passed as a parameter when functor is called.

  • OnActivate( functor )
    Binds a callback (functor) that is called when tab is activated or deactivated. The functor must be a callable taking 2 arguments:
    • The ArkTab object, which was activated or de-activated
    • Boolean value, True if tab was activated, and False otherwise.

  • Activate()
    Activates tab.
  • No labels