Studio Developer Manual / Version 2010
Table Of Contents
In most cases you will use an action to open your own tab. In the example, a button is plugged
into the Favorites toolbar. Clicking the button triggers an OpenTabAction
to open
the browse tab.
... <editor:FavoritesToolbar> <editor:plugins> <ui:AddItemsPlugin> <ui:items> ... <!-- Add a button that opens a browse tab --> <Button itemId="browseTab"> <baseAction> <editor:OpenTabAction text="..."> <editor:tab> <example:BrowseTab/> </editor:tab> </editor:OpenTabAction> </baseAction> </Button> </ui:items> ... </ui:AddItemsPlugin> </editor:plugins> </editor:FavoritesToolbar> ...
Example 7.65. Adding a button to open a tab
The BrowseTab
from above is configured as the tab
configuration
parameter of OpenTabAction
. A new browse tab is then opened every time when
clicking the button. In addition, all open browse tabs will be reopened in the work area after
the reload of CoreMedia Studio. For that CoreMedia
Studio stores the xtypes of the open tabs as user preference when opening,
closing or selecting tabs. When loading the work area instances of the xtypes are generated
and added to the work area. This is basically why you should configure each tab in a separate
MXML. Nevertheless, you will see below in Section 7.13.4, “Storing the State of a Work Area Tab” how you can save
other state of the tab than the xtype in the user preference.