namespace core::layout overview

Included by: zmodeler.h

Description

core::layout namespace is a logical group for tool's layout behaviour interfaces. It provides several interfaces that are have to be supported in order to lay a tool in ZModeler properly. Each ITool interface provides it's layout information which is presented with a base core::layout::ILayout interface. ZModeler queries certain ILayout-derived interfaces from it to determine which layout is supported by the tool.

Each ILayout-derived interface provides it's own set of methods to query location branch, toolbar-image and so on. Some interfaces are extended with Custom-interfaces for customization. Initially, these interfaces allow tools to migrate inside their layout (reposition items in menu or commands bar) or even migrate layout (move tools from command bar to toolbar or main menu and so on). These features are supported, but not implemeted yet.

ZModeler provides lots of tools and layout helper classes that you can derieve your classes from. Consider using them instead of implementing everything on your own.

Types and definitions

LAYOUT_* Definitions of tool's layout behaviour. Tool could be check-able, can be in a variation group or have a dialog extension.
tCommandBarTab Commands bar tab for placing tools. This is a root branch of a tool in current implementation. Thus, your tool does not need to specify "Modify..." branch, insead it refers to LAYOUT_CB_TAB_MODIFY tab. Separating tools to tabs is reserved for future use.

Layout interfaces

ILayout Base abstract layout interface. It has no methods.
ICommandBarLayout Interface for supporting layout in commands bar.
ICustomCommandBarView Customization interface for ICommandBarLayout. It is derived from ICustomLayoutView and extends it with button size and migration posibility.
ICustomLayoutView Base customization interface for layout. It allows to assign images (for menu items, toolbar items and command bar items).
IFloaterLayout Interface for supporting layout in a (dockable) floater box.
IMenuLayout Interface for supporting layout in menu.
IContextMenuLayout Interface for supporting layout in context menu. Derived from IMenuLayout.
ICustomMenuLayoutView Customization interface for menu layout. It's derived from ICustomLayoutView and extends it with methods that allow tool to migrate location in menu.
IMultyToolLayout Interface for supporting layout of multiple tools in one class. Thus, your class can implement several similar tools in one class with neighbour layout (can differ title, images). For example, Level-changing buttons in main toolbar are a single class with multiple tools laid one next to another.
IStartupLayout Layout for is non-visual tools and needs to apply somthing at startup. E.g. install themselfes as EventHandler.
IToolBarLayout Interface for supporting layout in ToolBar. The tool is a single button in toolbar (with, probably, extension) that can be added to an existen toolbar or can create it's own toolbar. Tools can be presented with a CWnd-derived control instead of a generic button.
IViewLayout Interface for supporting layout in viewport. It could be a control or, if IMenuLayout is supported too, can be laid in viewport menu.

Dialog interfaces

IDialog Interface for wrapping Dialogs. It's derivation - IChildDialog is a commonly used interface for supporting embedded dialogs.
IChildDialog Interface for supporting embedded dialogs (e.g. Command Bar tool can have embedded dialog boxes that are shown in commands bar). Interface is derived from IDialog.
INotifyChildDialog Interface extends IChildDialog with notification methods (show/hide/ok/cancel and so on). This interface is mostly used for group of child dialogs that are displayed in some properties page, configuration service, materials service.

Tree-navigation interfaces

ITreeNavigator Base interface for supporting navigation in tree structures. It allows to navigate to parent, sibling, child nodes. Each node (tree navigator) is usually presented with derived interface. For example, items in Commands bar are navigated with ICommandBarNavigator.
ICommandBarNavigator ITreeNavigator-derived interface extends it with command-bar specific functions that allows to press buttons, serach for tools and perform other operations with commands bar externally.
IUndoTreeNavigator ITreeNavigator-derived interface extends it with undo-tree specific functions that allows to access undo blocks on certain branches. Thus, you can navigate undo tree externally.
See Also:
References overview
namespace core overview