The classes in OpenCAGE.Masters provide basic functionality for showing master windows. Functionality for master models is not provided here.
Provide basic functionality for showing master displays.
Provide a similar look and feel for all masters.
The Handler_Target is an abstract class to provide a target for events. The masters extends Handler_Target so they can be a target for events created by buttons and other widgets contained somewhere in the master. This additional layer is used, because the master implementation on top of these master classes (e.g. Analysis Master) have no direct access to a button created earlier (e.g. in Button_Master_Display) to attach a event handler directly.
Each Handler_Target can be asked with Can_Execute, if something with the given link can be done or not. In Event is the actual implementation of the event done.
A Master_Display provides a window and the always necessary observers for changing the cursor and locking the window according to the state. Both observers are attached to the State_Model. But the Cursor_Observer is capable of changing the cursor for the window itself, so no further implementation is necessary. The actual cursor depends on the state and the cursor factory attached to the Cursor_Observer. The masters are normally using the factory from the Cursor_Factory attribute in Oc_Data (in contrast to the graph windows which use DC_Cursor_Factory).
A Master_Display provides also methods to show and hide the window and the convenience methods Is_Visible and Toggle_Visibility, which are mainly used in commands to implement the functionality for the respective buttons in the workbench.
A Button_Master_Display provides an additional Button_Box at the bottom of the window. The box itself is created later in the specific master implementations. Update_Sensitivity is called to update the sensitivity state of the buttons. It will be overloaded by subclasses, if they have other widgets that have to change their sensitivity when something changed (i.e. Event is called).
A Parameter_Set_Master_Display provides additionaly a paned widget (2 widgets separated by a vertical line that can be moved at runtime). In the left part is the Tree, in the right part the Parameters_Widget, a container that is meant to contain a parameter set widget that refines the left-side selection. There is also a Selected_Set_Label that shows a descriptive text for the widget (it should match the selection).
Below the Parameters_Widget is a second Button_Box, the Parameter_Button_Box. It provides buttons that pertain to the parameter set.
The Layout Master
Provide a list of available layouts.
Provide a means of applying layouts to graph windows.
During initialization of OpenCAGE, the Layout_Master_Model is created. Then all Layout_Factorys are created and attached to the model.
For applying the layout, the display creates first a To_Window-command. After takeing this, the select Graph_Display_Controller is set in Oc_Data. This is used to create a Layout-Command, which gets the objects that it should layout.
Show a list of all graph windows in a hierarchical tree.
Hold a list of opened graph windows.
Provide a possibility to show and hide windows, bring them to front, and open another window that shows the same object.
During initialization of OpenCAGE, the Window_Master_Model is created. The windows are attached with Add_Display_Controller when a new graph is opened, or when a node is opened. When the Display_Controller changes its state, the Window_Master_Model is notified.
The model can be asked with Has_Visible_Display_Controllers, if any of the registered Display_Controllers is visible at the moment.
Destroy_Display_Controllers closes and destroys all registered Display_Controllers. It is used in Close_Graph_Cmd.
Finally, a generic Window_Master_Model_Observer is provided, that can be attached to the model.
The Window_Master_Display is a descendant of Master_Display. It has a Window_Master_Model_Observer attached to the Window_Master_Model, so it is updated every time the model changes.
In the analysis master you can select a certain analysis, specify additional parameters and run the analysis.
Hold a list of available analysis action factories.
Provide a possibility to create an action for a specific analysis, and run the analysis command.
During initialization of OpenCAGE, the Analysis_Master_Model is created. Then all Analysis_Action_Factorys (in fact, they are descendants of Default_Analysis_Action_Factory) are created and attached to the model.
An Analysis_Action_Factory_Pot_Element is needed to be able to put an Analysis_Action_Factory in a parameter pot.
Finally, a generic Analysis_Master_Model_Observer is provided, that can be attached to the model.
blubb.