Geoinformatica  0.90
Gtk2::Ex::Geo::Layer Class Reference
+ Inheritance diagram for Gtk2::Ex::Geo::Layer:
+ Collaboration diagram for Gtk2::Ex::Geo::Layer:

Public Member Functions

public method registration ()
 A class method. Returns the dialogs and commands implemented by this layer class. More...
 
public method palette_types ()
 
public method symbol_types ()
 
public method label_placements ()
 
public method upgrade ()
 
public method new (hash params)
 A class method. Constructs a new layer object or blesses an object into a layer class. Calls defaults with the given parameters. More...
 
public method defaults (hash params)
 assigns default values to attributes The default values are hard-coded, but they can be overridden with given values. The given values are lower case. More...
 
public method DESTROY ()
 
public method close (scalar gui)
 Close and destroy all resources of this layer, as it has been removed from the GUI. More...
 
public method type ()
 
public method name ()
 
public method alpha ()
 
public method visible (scalar visible)
 Show or hide the layer. More...
 
public method got_focus (scalar gui)
 Called by the GUI when this layer has received the focus. More...
 
public method lost_focus (scalar gui)
 Called by the GUI when this layer has lost the focus. More...
 
public method border_color (scalar red, scalar green, scalar blue)
 Set or get the border color of the features. More...
 
public method inspect_data ()
 
public method open_properties_dialog ()
 
public void open_features_dialog (scalar gui, scalar soft_open)
 A request to invoke a features dialog for this layer object. More...
 
public arrayref menu_items ()
 Return menu items for the layer menu. More...
 
public method open_rules_dialog ()
 
public method open_symbols_dialog ()
 
public method open_colors_dialog ()
 
public method open_labeling_dialog ()
 
public method palette_type ()
 
public method supported_palette_types ()
 
public method symbol_type ()
 
public method supported_symbol_types ()
 
public method symbol_size ()
 
public method symbol_scale ()
 
public method hue_range ()
 
public method grayscale_subtype ()
 
public method invert_scale ()
 
public method grayscale_color ()
 
public method symbol_field ()
 
public method single_color ()
 
public method color_scale ()
 
public method color_field ()
 
public method color_table ()
 
public method color (scalar index, array XRGBA)
 Get or set the single color or a color in a color table or bins. The index is an index to the table and not a color table index or upper limit of a bin (the X is) and is not to be given to set the single color. More...
 
public method add_color (scalar index, array XRGBA)
 Add color to color table or color bins at given index. More...
 
public method remove_color (scalar index)
 Remove color from color table or color bins at given index. More...
 
public method save_color_table (scalar filename)
 Saves the layers color table into the file, which name is given as parameter. More...
 
public method color_bins ()
 
public method save_color_bins (scalar filename)
 Saves the layers color bins into the file, which name is given as parameter. More...
 
public hashref labeling (scalar labeling)
 Sets the labeling for the layer. More...
 
public method select (hash params)
 Select features based on user input. More...
 
public method selected_features ()
 
public method features ()
 
public method has_features_with_borders ()
 
public method schema ()
 Return the schema of the layer as an anonymous hash. More...
 
public method value_range ()
 
public method render_selection (scalar gc)
 Render the selection using the given graphics context. More...
 
public void render (scalar pb, scalar cr, scalar overlay, scalar viewport)
 A request to render the data of the layer onto a surface. More...
 
public $string statusbar_info ()
 A request for an information string for the statusbar. More...
 
public method bootstrap_dialog ()
 
public method hide_dialog (scalar dialog)
 Hide the given (name of a) dialog. More...
 
public method dialog_visible ()
 

Static Public Attributes

static hash EXPORT_TAGS
 

Detailed Description

NAME

Gtk2::Ex::Geo::Layer

Gtk2::Ex::Geo::Schema

DESCRIPTION

The root class of all layer classes.

Layer classes should be registered with the glue object. The registration information comprises a dialogs object (an instance of DialogMaster or its subclass), and class methods it offers (typically a subset of 'new', 'open', 'save', etc.).

Definition at line 28 of file Layer.pm.

Member Function Documentation

public method Gtk2::Ex::Geo::Layer::add_color ( scalar  index,
array  XRGBA 
)

Add color to color table or color bins at given index.

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

Undocumented Method

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

Undocumented Method

Code:
click to view
public method Gtk2::Ex::Geo::Layer::border_color ( scalar  red,
scalar  green,
scalar  blue 
)

Set or get the border color of the features.

$self->border_color($red, $green, $blue); # set
$self->border_color(); # clear, no border
@color = $self->border_color(); # get
Code:
click to view
public method Gtk2::Ex::Geo::Layer::close ( scalar  gui)

Close and destroy all resources of this layer, as it has been removed from the GUI.

If you override this, remember to call the super method:

$self->SUPER::close(@_);
Code:
click to view
public method Gtk2::Ex::Geo::Layer::color ( scalar  index,
array  XRGBA 
)

Get or set the single color or a color in a color table or bins. The index is an index to the table and not a color table index or upper limit of a bin (the X is) and is not to be given to set the single color.

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

Undocumented Method

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

Undocumented Method

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

Undocumented Method

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

Undocumented Method

Code:
click to view
public method Gtk2::Ex::Geo::Layer::defaults ( hash  params)

assigns default values to attributes The default values are hard-coded, but they can be overridden with given values. The given values are lower case.

Todo:
: document the attributes
Code:
click to view
public method Gtk2::Ex::Geo::Layer::DESTROY ( )

Undocumented Method

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

Undocumented Method

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

Undocumented Method

Code:
click to view
public method Gtk2::Ex::Geo::Layer::got_focus ( scalar  gui)

Called by the GUI when this layer has received the focus.

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

Undocumented Method

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

Undocumented Method

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

Undocumented Method

Code:
click to view
public method Gtk2::Ex::Geo::Layer::hide_dialog ( scalar  dialog)

Hide the given (name of a) dialog.

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

Undocumented Method

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

Undocumented Method

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

Undocumented Method

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

Undocumented Method

Code:
click to view
public hashref Gtk2::Ex::Geo::Layer::labeling ( scalar  labeling)

Sets the labeling for the layer.

Parameters
[in]labelingAn anonymous hash containing the labeling: { field => , font => , color => [r, g, b, a], min_size => }
Returns
labeling in an anonymous hash
Code:
click to view
public method Gtk2::Ex::Geo::Layer::lost_focus ( scalar  gui)

Called by the GUI when this layer has lost the focus.

Code:
click to view
public arrayref Gtk2::Ex::Geo::Layer::menu_items ( )

Return menu items for the layer menu.

A menu item consists of an entry and action. The action may be an anonymous subroutine or FALSE, in which case a separator item is added. A '_' in front of a letter makes that letter a shortcut key for the item. The final layer menu is composed of entries added by Glue.pm, and all classes in the layers lineage. The subroutine is called with [$self, $gui] as user data.

Todo:
add machinery for multiselection.
Returns
a reference to the items array.
Code:
click to view
public method Gtk2::Ex::Geo::Layer::name ( )

Undocumented Method

Code:
click to view
public method Gtk2::Ex::Geo::Layer::new ( hash  params)

A class method. Constructs a new layer object or blesses an object into a layer class. Calls defaults with the given parameters.

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

Undocumented Method

Code:
click to view
public void Gtk2::Ex::Geo::Layer::open_features_dialog ( scalar  gui,
scalar  soft_open 
)

A request to invoke a features dialog for this layer object.

Parameters
guiA Gtk2::Ex::Glue object (contains predefined dialogs).
soft_openWhether to "soft open", i.e., reset an already open dialog.
Code:
click to view
public method Gtk2::Ex::Geo::Layer::open_labeling_dialog ( )

Undocumented Method

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

Undocumented Method

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

Undocumented Method

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

Undocumented Method

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

Undocumented Method

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

Undocumented Method

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

A class method. Returns the dialogs and commands implemented by this layer class.

The dialogs is an object of a subclass of Gtk2::Ex::Geo::DialogMaster. The commands is a reference to a command hash. The keys of the command hash are top-level commands for the GUI. The value of the command is a reference to a hash, which has keys: nr, text, tip, pos, and sub. The 'sub' is a reference to a subroutine, which is executed when the user executes the command. The commands are currently implemented as buttons in Gtk2::Ex::Geo::Glue.

Returns
an anonymous hash containing the dialogs (key: 'dialogs') and commands (key: 'commands')
Code:
click to view
public method Gtk2::Ex::Geo::Layer::remove_color ( scalar  index)

Remove color from color table or color bins at given index.

Code:
click to view
public void Gtk2::Ex::Geo::Layer::render ( scalar  pb,
scalar  cr,
scalar  overlay,
scalar  viewport 
)

A request to render the data of the layer onto a surface.

Parameters
[in,out]pbA (XS wrapped) pointer to a gtk2_ex_geo_pixbuf.
[in,out]crA Cairo::Context object for the surface to draw on.
[in]overlayA Gtk2::Ex::Geo::Overlay object which manages the surface.
[in]viewportA reference to the bounding box [min_x, min_y, max_x, max_y] of the surface in world coordinates.
Code:
click to view
public method Gtk2::Ex::Geo::Layer::render_selection ( scalar  gc)

Render the selection using the given graphics context.

Parameters
$gcGtk2::Gdk::GC
Code:
click to view
public method Gtk2::Ex::Geo::Layer::save_color_bins ( scalar  filename)

Saves the layers color bins into the file, which name is given as parameter.

Parameters
[in]filenameName of file where the color bins are saved.
Exceptions
Afilename is given, which can't be written to.
Code:
click to view
public method Gtk2::Ex::Geo::Layer::save_color_table ( scalar  filename)

Saves the layers color table into the file, which name is given as parameter.

Parameters
[in]filenameName of file where the color table is saved.
Exceptions
Afilename is given, which can't be written to.
Code:
click to view
public method Gtk2::Ex::Geo::Layer::schema ( )

Return the schema of the layer as an anonymous hash.

For the structure of the schema hash see Geo::Vector::schema

Code:
click to view
public method Gtk2::Ex::Geo::Layer::select ( hash  params)

Select features based on user input.

Parameters
paramsnamed params, the key is something that is recognized by the features method and the value is a geometry the user has defined
  • key A Geo::OGR::Geometry object representing the point or area the user has selected The key, value pair is fed as such to features subroutine. A call without parameters deselects all features.
Code:
click to view
public method Gtk2::Ex::Geo::Layer::selected_features ( )

Undocumented Method

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

Undocumented Method

Code:
click to view
public $string Gtk2::Ex::Geo::Layer::statusbar_info ( )

A request for an information string for the statusbar.

Parameters
[in]xThe x location of the mouse.
[in]yThe y location of the mouse.
Returns
A short information string for the statusbar.
Code:
click to view
public method Gtk2::Ex::Geo::Layer::supported_palette_types ( )

Undocumented Method

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

Undocumented Method

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

Undocumented Method

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

Undocumented Method

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

Undocumented Method

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

Undocumented Method

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

Undocumented Method

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

Undocumented Method

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

Undocumented Method

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

Undocumented Method

Code:
click to view
public method Gtk2::Ex::Geo::Layer::visible ( scalar  visible)

Show or hide the layer.

Parameters
visibleIf true then the layer is made visible, else hidden.
Code:
click to view

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