Package OpenCAGE.GUI.Displays.Object_Displays

Class Display_Observer

this is an observer on Display_Objects

Operations

public Moved( OpenCAGE.GUI.Displays.Object_Displays.Object_Display Display, Graphics.Points.Point Old_Position);

has to be called if the Object_Display was moved or had become a new position

public Changed( OpenCAGE.GUI.Displays.Object_Displays.Object_Display Display);

has to be called if there were any changes

public Node_Destroying( OpenCAGE.GUI.Displays.Object_Displays.Object_Display Display);

has to be called if the node has to be destroyed

public Edge_Destroying( OpenCAGE.GUI.Displays.Object_Displays.Object_Display Display);

has to be called if the edge has to be destroyed

public Visibility_Changed( OpenCAGE.GUI.Displays.Object_Displays.Object_Display Display);

has to be called if the visibility has changed

Class Object_Display

Object is the superclass of Node_Display and Edge_Display

Attributes

private OpenCAGE.GUI.Displays.States.State State 

holds the state of the node e.g. marked, selected, normal

private Boolean In_Viewport 

true means will be drawn, false means out of viewport

private OpenCAGE.GUI.Displays.Object_Displays.Observer_Lists.List Observers 

the list of observers which are registered

private OpenCAGE.GUI.Menus.Top_Menus.Top_Menu Context_Menu 

holds the context menu

private Ada.Strings.Unbounded.Unbounded_String Default_Command 

this command will be executed if an user double-clicks on this object

private OpenCAGE.Zoom_Tables.Zoom_Table Zoom 

holds a pointer to the Zoom_Table

private OpenCAGE.GUI.Displays.Object_Displays.Zoom_Observer Zoom_Observer 

our internal zoom observer

private Boolean Drawable 

Tells whether the object can be drawn or not. E.g. edges can't be drawn if they are missing a start or an end node.

Operations

public Draw( Graphics.Graphic_Component.Graphic_Component GC);

Draws the object on the given graphic component

public Draw_Sketch( Graphics.Graphic_Component.Graphic_Component GC);

Draws a sketch of the object on the given graphic component

public Update_Display(void);

updates the display

public Graphics.Points.Point Get_Position(void);

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.

public Take( OpenCAGE.GUI.Displays.Object_Displays.Object_Visitor Visitor);

see Visitor Pattern

public Graphics.Area_Sizes.Area_Size Get_Size(void);

returns the size of the object

public Graphics.Area_Sizes.Area_Size Get_Half_Size(void);

returns the size/2 of the object

public Attach( OpenCAGE.GUI.Displays.Object_Displays.Display_Observer Observer);

attaches the observer to the list of observers

public Detach( OpenCAGE.GUI.Displays.Object_Displays.Display_Observer Observer);

detaches he observer to the list of observers

public Notify_Moved( Graphics.Points.Point Old_Position);

This method is protected, i.e. it should not be called from outside. Unfortunatly Ada doesn't support this feature.

public Graphics.Points.Point Get_Upper_Left_Corner(void);

returns the position of upper left corner 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.

public Graphics.Points.Point Get_Lower_Right_Corner(void);

returns the position of lower right corner 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.

public Notify_Node_Destr(void);

This method is protected, i.e. it should not be called from outside. Unfortunatly Ada doesn't support this feature.

public Notify_Edge_Destr(void);

Tells the observers, that an edge display is going to be destroyed. This method is protected, i.e. it should not be called from outside. Unfortunatly Ada doesn't support this feature.

public Notify_Changed(void);

Tells the observers, that an object display has changed. This method is protected, i.e. it should not be called from outside. Unfortunatly Ada doesn't support this feature.

public Update_Display_Really(void);

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.

public Notify_Visibility_Changed(void);

Tells the observers, that the visibility of an object display has changed. This method is protected, i.e. it should not be called from outside. Unfortunatly Ada doesn't support this feature.

Class Object_Visitor

part of the Visitor-Pattern

Operations

public Visit_Node_Display( OpenCAGE.GUI.Displays.Object_Displays.Object_Display Obj);

part of the Visitor-Pattern

public Visit_Edge_Display( OpenCAGE.GUI.Displays.Object_Displays.Object_Display Obj);

part of the Visitor-Pattern

public Visit_Background_Display( OpenCAGE.GUI.Displays.Object_Displays.Object_Display Obj);

part of the Visitor-Pattern

Class Zoom_Observer

extends OpenCAGE.Zoom_Tables.Zoom_Observer

Attributes

private OpenCAGE.GUI.Displays.Object_Displays.Object_Display Display 

the observer's display

Operations

public Changed( OpenCAGE.Zoom_Tables.Zoom_Table Table);

This method is called after the zoom value changed. [This description is adopted from 'OpenCAGE.Zoom_Tables.Zoom_Observer'.]