Master views are alternate versions of masters designed for specific contexts. They allow you to create a master once and then rearrange, resize, and restyle its widgets to fit each context you intend to use it in. When you add an instance of a master to the canvas, you can choose which of its views to display.母版视图是为特定情景设计的母版视图的替代版本。 它们使你可以一次创建一个母版,然后重新排列,调整其大小和样式,以适合你打算在其中使用的每个场景。将母版实例添加到画布时,你可以选择显示哪个母版视图 。
Adding Views to a Master添加一个母版视图
To add master views to a master, start by opening the master on the canvas for editing. Click the canvas to focus the master itself, and then click Add Master Views in the Style pane to open the Master Views dialog, where you'll create and manage your views.要将母版视图添加到母版,请首先在画布上打开母版进行编辑。 单击画布聚焦母版本身,然后在“样式”窗格中单击“添加母版视图”以打开“母版视图”对话框,您将在其中创建和管理视图。
To remove master views from a master, click Remove Views at the top-right of the Style pane. 要从母版中删除母版视图,请单击“样式”窗格右上方的“删除视图”。 |
Master View Inheritance母版视图继承
Master views are organized into chains of inheritance. The first link in the chain, the view from which all others inherit, is the Base view. Each view you add inherits its widgets and widget properties either directly from the Base view or from another view in the chain.母版视图被组织成继承链。 链中的第一个链接是所有其他视图要继承的视图,即基本视图。 你添加的每个视图都直接从基本视图或链中的另一个视图继承其窗口部件和窗口部件属性。
For example, the chain of inheritance for a button master might looks like this:例如,按钮母版的继承链可能如下所示:
Primary Button (Base) > Secondary Button > Text Link Button主按钮(基本)>辅助按钮>文本链接按钮
Edits made in the Primary Button view would be reflected in both the Secondary Button and Text Link Button views as well.在“主要按钮”视图中所做的编辑也将同时反映在“次要按钮”和“文本链接按钮”视图中。
Edits made in the Secondary Button view would be reflected in the Text Link Button view but not in the Primary Button view.在“辅助按钮”视图中所做的编辑将反映在“文本链接按钮”视图中,但不会反映在“主按钮”视图中。
Edits made in the Text Link Button view would only affect that view.在“文本链接按钮”视图中进行的编辑只会影响该视图。
Editing Diagrams in Master Views在母版视图中编辑图
Once you've added master views to a master, you can access each view by clicking its name at the top of the canvas. The color of a view's name indicates whether or not it will be affected by edits you make on the canvas:
将母版视图添加到模板后,可以通过单击画布顶部的名称来访问每个视图。 视图名称的颜色指示该视图是否会受到你在画布上所做的编辑的影响:
Turquoise绿松石色: The view currently displayed on the canvas. Edits will affect this view.当前显示在画布上的视图。 编辑将影响此视图。
Yellow黄色: A child of the view currently displayed on the canvas. Edits will affect this view.前显示在画布上的视图的子级。 编辑将影响此视图。
Grey灰色: A parent of the view currently displayed on the canvas. Edits will not affect this view.当前显示在画布上的视图的父级。 编辑不会影响此视图。
Green绿色: The Affect All Views checkbox is checked. Edits will affect all views.选中“影响所有视图”复选框。 编辑将影响所有视图。
Furthermore, if you edit a widget property in a child view, edits to the same property in a parent view will no longer affect the child view. For example, if you change a button's fill color to pink in a child view and then change that same button's fill color to green in the parent view, the button will still be pink in the child view, not green.此外,如果你在子视图中编辑窗口部件属性,则在父视图中对相同属性的编辑将不再影响子视图。 例如,如果你在子视图中将按钮的填充颜色更改为粉红色,然后在父视图中将同一按钮的填充颜色更改为绿色,则该按钮在子视图中仍将是粉红色,而不是绿色。
Tip提示
To take full advantage of the benefits of master view edit inheritance, we suggest you take a top-down approach to editing your diagrams, starting in the Base view and then working your way down the chain.为了充分利用主视图编辑继承的好处,我们建议你采用自上而下的方法来编辑图,从基础视图开始,然后逐步进行。
Cross-View Widget Properties跨视图部件属性
You can change the visual styling, size, and position of widgets freely across master views. Some widget properties, however, are always the same in every view. These include widget text, notes, and interactions/interactive properties. Making edits to these on a widget in one view will always affect all other views as well.你可以在母版视图之间自由更改窗口部件的视觉样式,大小和位置。 但是,某些部件属性在每个视图中始终相同。 这些包括部件文本,注释和交互/交互属性。 在一个视图中的窗口小部件上对其进行编辑也将始终影响所有其他视图。
Additionally, special widget properties like the options in a droplist widget, the rows and columns in a table widget, and the nodes in a tree widget, are also shared across views.此外,还可以在视图之间共享特殊的窗口部件属性,例如下拉列表窗口部件中的选项,表格窗口部件中的行和列以及树形窗口部件中的节点。
If you need a cross-view widget property to vary across your master views, create an additional copy of the widget for each variation and use the "unplace" feature to choose which version of the widget appears in each view.如果你需要跨视图窗口部件属性在母版视图之间变化,请为每个变体创建一个窗口部件的附加副本,并使用“展开”功能选择在每个视图中显示窗口小部件的版本。
Unplaced Widgets未放置的窗口部件
"Unplaced" widgets are widgets that are included in some of a master's views but not in others. Any widgets that have been unplaced from the current view are listed in red in the Outline pane.“未放置”窗口部件是包含在某些母版视图中但不包含在其他视图中的窗口部件。 当前视图中未放置的所有部件在“大纲”窗格中以红色列出。
|
There are two ways to unplace a widget from a view:有两种方法可以从视图中取消放置窗口部件:
You can unplace a widget from the current view and its children by right-clicking the widget and selecting Unplace from View. You can also do this by selecting the widget and pressingDELETE.你可以通过右键单击窗口部件并选择从视图中“取消放置”来从当前视图及其子视图中移除窗口部件。 你也可以通过选择部件并按Delete来完成此操作。
If you add a new widget to a child view, the widget will be automatically unplaced from all parent views (unless Affect All Views is checked).如果将新的窗口部件添加到子视图,则该窗口部件将自动从所有父视图中取消放置(除非选中“影响所有视图”)。
Warning警告
If youDELETEa widget from the base view or while Affect All Views is checked, the widget will not be unplaced; instead, it will be deleted from all views.如果你从基本视图中删除了部件,或者选中了“影响所有视图”,则该部件将不会被放置; 相反,它将从所有视图中删除。
You can place an unplaced widget in the current view and its children by right-clicking it and selecting Place in View.你可以通过点击右键并选择“放置到视图”放置一个未放置部件到当前视图及子视图。
To delete a widget from all views entirely, right-click it and select Delete from All Views. This will completely remove the widget from the master instead of just unplacing it.要完全从所有视图中删除部件,请右键单击它然后选择“从所有视图中删除”。 这将完全从母版中删除部件,而不仅仅是未放置。
Choosing a Master View on the Canvas在画布上选择母版视图
When you add an instance of a master to the canvas, use the Master Views dropdown in the Style pane to choose which of its views to display.当你将母版实例添加到画布时,请使用“样式”窗格中的“主视图”下拉菜单选择要显示的视图。
Master Views and Adaptive Views母版视图和自适应视图
You can set up your master views to work in conjunction with your adaptive view sets. Make sure that your master views have the same names and inheritance structure as your adaptive views, and your master views will switch automatically in the browser along with your adaptive views.你可以将母版视图设置为与自适应视图集一起使用。 确保母版视图与自适应视图具有相同的名称和继承结构,并且母版视图将与自适应视图一起在浏览器中自动切换。