Geoinformatica  0.90
Gtk2::Ex::Geo::Glue Class Reference

Public Member Functions

public scalar new (hash params)
 
private method create_layer_tree_view ()
 
public method layer_list_edit ()
 
public method create_toolbar ()
 
private method _set_interaction_mode ()
 
public method set_interaction_mode ()
 
private method _set_interaction_geometry ()
 
public method set_interaction_geometry ()
 
public method create_overlay ()
 
public method ()
 
public method open_history ()
 
public method open_resources ()
 
public method register_dialogs (scalar dialogs)
 Extend the capabilities by adding new dialogs. More...
 
public method register_command ()
 
public method unregister_command ()
 
public method register_commands (scalar commands)
 Extend the capabilities by adding new commands. More...
 
public method run_command ()
 
public object register_function (hash params)
 Extend the capabilities by adding a new function. More...
 
public method register_class (hash params)
 Extend the capabilities. More...
 
public method register_feature_class ()
 
public method close ()
 Attempt to destroy all widgets in the GUI. More...
 
public scalar get_dialog (name)
 Retrieve a dialog by its name. More...
 
public method message (scalar message)
 Display a short information message to the user. More...
 
public method overlay_menu ()
 Construct a menu for an overlay object. More...
 
public method show_information ()
 
public method inspect ()
 
public method close_inspect ()
 
public method set_layer ()
 
public Gtk2::Ex::Geo::Layer add_layer (scalar object, scalar name, scalar do_not_zoom_to)
 Add a layer to the overlay and the tree store. More...
 
public Gtk2::Ex::Geo::Layer layer (scalar name)
 
public method layers ()
 
public method get_focal (scalar name)
 Returns a selected (or visible) part of a raster layer by its name. More...
 
public method update ()
 
public method swap ()
 
public method move_down ()
 
public method move_up ()
 
public method remove_layer ()
 
public method delete_selected ()
 
public method get_selected_layer ()
 
public method select_layer (scalar name)
 Selects a layer. More...
 
public method eval_entry ()
 
public method render ()
 
public method simulate ()
 
public method stop ()
 
public method min ()
 
public method max ()
 

Static Public Member Functions

static public layer_menu ()
 The callback for button_press_event in the layer list tree view. More...
 

Detailed Description

Glue is a intended as a singleton object, which manages the widgets of the main application windows. The widgets are tree_view with an associated model (for the layer list), toolbar (for menu), statusbar (for information), entry (for command line), overlay (for map view). Glue maintains layer class dialogs and toolbar commands. Glue maintains entry history and application resources.

NAME

Gtk2::Ex::Geo::Glue

Gtk2::Ex::Geo::History

DESCRIPTION

Glue is a glue object that manages the GUI. The dialog boxes of the registered layer classes can be obtained from it. It maintains an overlay.

The entry widget that is managed by a glue object is used for getting commands from the user. The glue object maintains a history of the objects. Old commands can be browsed with the arrow up and arrow down keys. The user command is given to Perl's eval function.

1) the variable names are inspected and found layer names are replaced with pointers to real layers

2) keyword "focal:" in the beginning of an entry is removed and all references to layers are replaced with clipped versions

3) commands p, plot, and inspect are recognized without explicit reference to the Gtk2::Ex::Geo::Glue package

History is the history of the command line entry. It is stored persistently in the user's home directory in file .rash_history.

Definition at line 44 of file Glue.pm.

Member Function Documentation

private method Gtk2::Ex::Geo::Glue::_set_interaction_geometry ( )

Undocumented Method

Code:
click to view
private method Gtk2::Ex::Geo::Glue::_set_interaction_mode ( )

Undocumented Method

Code:
click to view
public Gtk2::Ex::Geo::Layer Gtk2::Ex::Geo::Glue::add_layer ( scalar  object,
scalar  name,
scalar  do_not_zoom_to 
)

Add a layer to the overlay and the tree store.

The default behavior is to zoom to the new layer. The layer is upgraded using the upgrade method of the registered layer classes.

Parameters
objectA geospatial data object. Must be either an object of a subclass of Gtk2::Ex::Geo::Layer or a data object that is recognized by such. It is the responsibility of the upgrade method of the layer class to upgrade the data object to a layer object.
name(optional) Name for the new layer.
do_not_zoom_to(optional) Whether to not to zoom the overlay to this layer. Forwarded to Gtk2::Ex::Geo::Overlay::add_layer.
Returns
Code:
click to view
public method Gtk2::Ex::Geo::Glue::close ( )

Attempt to destroy all widgets in the GUI.

Code:
click to view
public method Gtk2::Ex::Geo::Glue::close_inspect ( )

Undocumented Method

Code:
click to view
private method Gtk2::Ex::Geo::Glue::create_layer_tree_view ( )

Creates the tree view and associated model to manage the layers.

Code:
click to view
public method Gtk2::Ex::Geo::Glue::create_overlay ( )

Undocumented Method

Code:
click to view
public method Gtk2::Ex::Geo::Glue::create_toolbar ( )

Undocumented Method

Code:
click to view
public method Gtk2::Ex::Geo::Glue::delete_selected ( )

Undocumented Method

Code:
click to view
public method Gtk2::Ex::Geo::Glue::eval_entry ( )

Undocumented Method

Code:
click to view
public scalar Gtk2::Ex::Geo::Glue::get_dialog ( name  )

Retrieve a dialog by its name.

Code:
click to view
public method Gtk2::Ex::Geo::Glue::get_focal ( scalar  name)

Returns a selected (or visible) part of a raster layer by its name.

Deprecated:
Selected and clip are implemented elsewhere.
Code:
click to view
public method Gtk2::Ex::Geo::Glue::get_selected_layer ( )

Undocumented Method

Code:
click to view
public method Gtk2::Ex::Geo::Glue::inspect ( )

Undocumented Method

Code:
click to view
public Gtk2::Ex::Geo::Layer Gtk2::Ex::Geo::Glue::layer ( scalar  name)
Parameters
name
Returns
Code:
click to view
public method Gtk2::Ex::Geo::Glue::layer_list_edit ( )

Undocumented Method

Code:
click to view
public static Gtk2::Ex::Geo::Glue::layer_menu ( )
static

The callback for button_press_event in the layer list tree view.

Code:
click to view
public method Gtk2::Ex::Geo::Glue::layers ( )

Undocumented Method

Code:
click to view
public method Gtk2::Ex::Geo::Glue::max ( )

Undocumented Method

Code:
click to view
public method Gtk2::Ex::Geo::Glue::message ( scalar  message)

Display a short information message to the user.

Code:
click to view
public Gtk2::Ex::Geo::Glue::method ( )

Undocumented Method

Code:
click to view
public method Gtk2::Ex::Geo::Glue::min ( )

Undocumented Method

Code:
click to view
public method Gtk2::Ex::Geo::Glue::move_down ( )

Undocumented Method

Code:
click to view
public method Gtk2::Ex::Geo::Glue::move_up ( )

Undocumented Method

Code:
click to view
public scalar Gtk2::Ex::Geo::Glue::new ( hash  params)
Parameters
paramsnamed parameters:
  • first_file_open_folder [optional] default folder for the file open dialog
  • history [optional] a history file of user input
  • resources [optional] a user preferences file
Returns
a new Glue object
Code:
click to view
public method Gtk2::Ex::Geo::Glue::open_history ( )

Undocumented Method

Code:
click to view
public method Gtk2::Ex::Geo::Glue::open_resources ( )

Undocumented Method

Code:
click to view
public method Gtk2::Ex::Geo::Glue::overlay_menu ( )

Construct a menu for an overlay object.

Code:
click to view
public method Gtk2::Ex::Geo::Glue::register_class ( hash  params)

Extend the capabilities.

Parameters
paramsnamed parameters:
  • class [optional] the name of the layer class. If this is given, dialogs and commands are retrieved from the class with method Gtk2::Ex::Geo::Layer::registration
  • dialogs [optional] an object containing dialogs (a dialog master object)
  • commands [optional] an anonymous hash of commands for the GUI A command is defined in an anonymous hash with parameters:
    • nr a visual order of the commands
    • pos the pos parameter in toolbar->insert
    • text the text for the command button
    • tip the tip for the command button
    • sub a reference to a subroutine to be executed
Code:
click to view
public method Gtk2::Ex::Geo::Glue::register_command ( )

Undocumented Method

Code:
click to view
public method Gtk2::Ex::Geo::Glue::register_commands ( scalar  commands)

Extend the capabilities by adding new commands.

Code:
click to view
public method Gtk2::Ex::Geo::Glue::register_dialogs ( scalar  dialogs)

Extend the capabilities by adding new dialogs.

Code:
click to view
public method Gtk2::Ex::Geo::Glue::register_feature_class ( )

Undocumented Method

Code:
click to view
public object Gtk2::Ex::Geo::Glue::register_function ( hash  params)

Extend the capabilities by adding a new function.

Code:
click to view
public method Gtk2::Ex::Geo::Glue::remove_layer ( )

Undocumented Method

Code:
click to view
public method Gtk2::Ex::Geo::Glue::render ( )

Undocumented Method

Code:
click to view
public method Gtk2::Ex::Geo::Glue::run_command ( )

Undocumented Method

Code:
click to view
public method Gtk2::Ex::Geo::Glue::select_layer ( scalar  name)

Selects a layer.

Code:
click to view
public method Gtk2::Ex::Geo::Glue::set_interaction_geometry ( )

Undocumented Method

Code:
click to view
public method Gtk2::Ex::Geo::Glue::set_interaction_mode ( )

Undocumented Method

Code:
click to view
public method Gtk2::Ex::Geo::Glue::set_layer ( )

Undocumented Method

Code:
click to view
public method Gtk2::Ex::Geo::Glue::show_information ( )

Undocumented Method

Code:
click to view
public method Gtk2::Ex::Geo::Glue::simulate ( )

Undocumented Method

Code:
click to view
public method Gtk2::Ex::Geo::Glue::stop ( )

Undocumented Method

Code:
click to view
public method Gtk2::Ex::Geo::Glue::swap ( )

Undocumented Method

Code:
click to view
public method Gtk2::Ex::Geo::Glue::unregister_command ( )

Undocumented Method

Code:
click to view
public method Gtk2::Ex::Geo::Glue::update ( )

Undocumented Method

Code:
click to view

The documentation for this class was generated from the following file: