Package OpenCAGE.GUI.Displays.Graph_Window_Displays

Class GWD_State

This is an Enumeration. Possible values: Normal, Selecting, Moving

Class Graph_Window_Display

extends OpenCAGE.GUI.Displays.Window_Displays.Window_Display

This class displays the Graph Window on the screen by using the Graph_Window_Model. BORDER_SPACE is used to get a blank border in a graph area.

Attributes

private Graphics.Area_Sizes.Area_Size Page_Size 

page width means the width of the visible area of the Graph Area in pixels

private Gdk.Font.Gdk_Font Font 

the font type used in the window

private Gtk.Window.Gtk_Window Window 

the window

private Gtk.Adjustment.Gtk_Adjustment Adj_V 

vertical adjustment, meaning the difference to the vertical coordinate, changed by scrolling e.g.

private Gtk.Adjustment.Gtk_Adjustment Adj_H 

horizontal adjustment, means the difference to the horizontal coordinate, changed by scrolling e.g.

private Gtk.Drawing_Area.Gtk_Drawing_Area Drawing_Area 

private Gtk.Scrollbar.Gtk_Scrollbar Scrollbar_V 

private Gtk.Scrollbar.Gtk_Scrollbar Scrollbar_H 

private OpenCAGE.GUI.Displays.Graph_Window_Displays.GWD_State State 

Holds the state of the display (e.g. if we are moving stuff around or not).

private Graphics.Graphic_Component.Gtk_GC.Gtk_Graphic_Component Moving_Objects_GC 

The graphic comonent containing the display of the nodes we are currently moving around.

private Graphics.Graphic_Component.Gtk_GC.Gtk_Graphic_Component Node_GC 

The graphic comonent of this display used to draw the nodes.

private Graphics.Graphic_Component.Gtk_GC.Gtk_Graphic_Component Edge_GC 

The graphic comonent of this display used to draw the edges.

private OpenCAGE.GUI.Displays.Graph_Window_Models.Graph_Window_Model Model 

private Graphics.Points.Point Start_Position 

holds the point where the user begins some stuff (e.g. moving around objects or selecting with scope)

private Gdk.GC.Gdk_GC Scroll_Gc 

context for the scrollbars

private Graphics.Points.Point Current_Position 

holds the current point where the user does some stuff right now (e.g. selecting with scope)

private Graphics.Points.Point Last_Scope_Position 

holds the position of the last position of the scope

private Gtk.Button.Gtk_Button All_Button 

if pressed it will select all objects

private Gtk.Button.Gtk_Button Inv_Button 

if pressed it will inverse the selection of the set of selected objects

private Glib.Gfloat Old_Adj_V_Value 

the old value of the adjustment

private Glib.Gfloat Old_Adj_H_Value 

private Graphics.Points.Point Last_Click 

the position of the last click with the mouse

private OpenCAGE.Zoom_Tables.Zoom_Table My_Zoom_Table 

private OpenCAGE.GUI.Displays.Graph_Window_Displays.Zoom_Observer Zoom_Observer 

our internal zoom observer

private Gtk.Label.Gtk_Label U_Status_Label 

The label that visualizes the Userview status.

private Gtk.Label.Gtk_Label F_Status_Label 

The label that visualizes the Filter status.

private Gtk.Label.Gtk_Label R_Status_Label 

The label that visualizes the Readonly status.

Operations

public Set_Window_Title( String Title);

sets the title of the window

public Redraw(void);

Do a complete redraw, e.g. after the model changed.

public Refresh(void);

Refresh the screen, e.g. after expose events.

public Show(void);

Show the window.

public Hide(void);

Hide the window.

public Create( OpenCAGE.GUI.Displays.Graph_Window_Displays.Graph_Window_Display Self, OpenCAGE.GUI.Displays.Graph_Window_Models.Graph_Window_Model Model);

Creates a new instance of this class.

public Refresh( Graphics.Points.Point Pos, Graphics.Area_Sizes.Area_Size Size);

Refresh the screen, e.g. after expose events.

public Start_Moving_Selected_Objects( Graphics.Points.Point Start_Pos);

Prepares for moving around all selected objects. This must be called before Move_Objects can be called!

public Move_Objects( Graphics.Points.Point Pos);

Move the current objects which where selected using on of the Start_Moving methods (currently only Start_Moving_Selected_Objects) to the given position.

public Graphics.Area_Sizes.Area_Size Stop_Moving_Objects( Graphics.Points.Point Pos);

Stops moving the objects. This will not refresh or redraw the screen. It returns a vector describing the new position.

public Update_Win_Settings(void);

updates the settings of the window if it was e.g. resized e.g. initializes the scrollbars

public OpenCAGE.GUI.Displays.Object_Displays.Object_Display Find_Object( Graphics.Points.Point Clicked);

Returns the Object which is at the Point that was clicked

public Graphics.Points.Point Calc_Abs_Position( Graphics.Points.Point Position);

calculates the absolute position of the mouse pointer on the Draw_Area

public Start_Selecting_Objects_With_Scope( Graphics.Points.Point Start_Pos);

Prepares for selecting objects with a scope. This must be called before Update_Scope_Position can be called!

public Update_Scope_Position( Graphics.Points.Point Pos);

This updates one of the two positions which make up the scope. The other was set with Start_Selecting_Objects_With_Scope.

public Stop_Selecting_Objects_With_Scope( Graphics.Points.Point Pos);

Stops selecting objects with a scope.

public Scroll_Draw_Area(void);

scrolls the content of the Drawing-Area

public Adjustment_Change(void);

updates the content of the Drawing_Area after the scrollbars were updated

private Refresh_Scroll(void);

moves and redraws a part of the viewport after the scrollbars were moved

public Boolean Is_Visible(void);

checks if its shown or hide [This description is adopted from 'OpenCAGE.GUI.Displays.Window_Displays.Window_Display'.]

public Toggle_Visibility(void);

chenges the visibility [This description is adopted from 'OpenCAGE.GUI.Displays.Window_Displays.Window_Display'.]

public Zoom_In(void);

zooms into the window

public Zoom_Out(void);

zooms out of the window

private Set_Upper( Gtk.Adjustment.Gtk_Adjustment Adj, Glib.Gfloat Value);

executes Gtk.Adjustment.Set_Upper corrected by zoom

private Set_Lower( Gtk.Adjustment.Gtk_Adjustment Adj, Glib.Gfloat Value);

executes Gtk.Adjustment.Set_Lower corrected by zoom

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

Redraw the given object display only.

private Set_Value( Gtk.Adjustment.Gtk_Adjustment Adj, Glib.Gfloat Value);

executes Gtk.Adjustment.Set_Value corrected by zoom

public Redraw_Status(void);

Update the status fields.

Class Zoom_Observer

extends OpenCAGE.Zoom_Tables.Zoom_Observer

Attributes

private OpenCAGE.GUI.Displays.Graph_Window_Displays.Graph_Window_Display 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'.]