This package provides data structure and methods to Display Edges on the screen
extends OpenCAGE.GUI.Displays.Object_Displays.Object_Display
throws No_Point_To_Draw_Edge_Exception .
This class holds the data needed for the visualization, e.g. visibility, the assigned pixmaps, etc. Each Edge_Display has its own Edge_Model.
private OpenCAGE.GUI.Displays.Node_Displays.Node_Display Start_Node_Display |
private OpenCAGE.GUI.Displays.Node_Displays.Node_Display End_Node_Display |
private OpenCAGE.GIF.Edge_Model Edge_Model |
private Ada.Strings.Unbounded.Unbounded_String Color |
The Color, in which the Edge is drawn
private OpenCAGE.GUI.Displays.Edge_Displays.Model_Observer Model_Observer |
private Graphics.Points.Point Old_Start_Position |
Stores the Position of the Start_Node. Use this, if you need the position when the edge is not Drawable any more.
private Graphics.Points.Point Old_End_Position |
Stores the Position of the End_Node. Use this, if you need the position when the edge is not Drawable any more.
Draws the edge if it is drawable, i.e. if both nodes exist. If this is the case, Draw_Really (implemented by subclass) is called.
Is called by draw. Don't ever called from somewhere else unless you know what you're doing. This method is protected, i.e. it should not be called from outside. Unfortunatly Ada doesn't support this feature.
Does nothing, we don't want edges in a sketch.
Is called by Update. Don't ever called from somewhere else unless you know what you're doing. This method is protected, i.e. it should not be called from outside. Unfortunatly Ada doesn't support this feature. [This description is adopted from 'OpenCAGE.GUI.Displays.Object_Displays.Object_Display'.]
returns the position of the object. Returns null if it has not a particular position e.g. an edge. This is not a very nice solution. The null value is used to calculate the Used_Area in Object_Display_Containers. [This description is adopted from 'OpenCAGE.GUI.Displays.Object_Displays.Object_Display'.]
see Visitor Pattern [This description is adopted from 'OpenCAGE.GUI.Displays.Object_Displays.Object_Display'.]
returns the size of the object [This description is adopted from 'OpenCAGE.GUI.Displays.Object_Displays.Object_Display'.]
returns the size/2 of the object [This description is adopted from 'OpenCAGE.GUI.Displays.Object_Displays.Object_Display'.]
If Start_Node hasn't been set, the given node is set as start node. If Start_Node has already been set, but End_Node hasn't, the given node is set as End_Node. Otherwise, nothing is done.
Self.Drawable := both Start_Node and End_Node are not null
extends OpenCAGE.GIF.Edge_Model_Observer
private OpenCAGE.GUI.Displays.Edge_Displays.Edge_Display Edge |
holds a pointer to the edge display to notify
Is called by the observerd edge, when it is asked to destroy itself. [This description is adopted from 'OpenCAGE.GIF.Edge_Model_Observer'.]
Is called by the observed edge when it has changed. [This description is adopted from 'OpenCAGE.GIF.Edge_Model_Observer'.]