Module gwy :: Class VectorLayer
[show private | hide private]
[frames | no frames]

Class VectorLayer


The ::object-chosen signal is emitted when user starts interacting with a selection object, even before modifying it. It is emitted even if the layer is not editable, but it is not emitted when focus is set and the user attempts to choose a different object.
Method Summary
  ensure_selection()
Ensures a vector layer's selection exist in data container.
  get_editable()
Gets editability of a vector layer.
  get_focus()
Gets focused object index.
  get_selection_key()
Gets the key identifying selection this vector layer displays.
  object_chosen(id)
Emits "object-chosen" signal on a vector layer.
  set_editable(editable)
Sets a vector layer editability.
  set_focus(focus)
Focues on one selection object.
  set_selection_key(key)
Sets the selection object to use by a vector layer.
  UNIMPLEMENTED_button_press(event)
Sends a mouse button press event to a layer.
  UNIMPLEMENTED_button_release(event)
Sends a mouse button release event to a layer.
  UNIMPLEMENTED_draw(drawable, target)
Draws layer on given drawable (which should be a DataView window).
  UNIMPLEMENTED_key_press(event)
Sends a key press event to a layer.
  UNIMPLEMENTED_key_release(event)
Sends a key release event to a layer.
  UNIMPLEMENTED_motion_notify(event)
Sends a mouse pointer motion notification event to a layer.

Method Details

ensure_selection()

Ensures a vector layer's selection exist in data container.

This method can be called only when layer is plugged into a data view and it has a selection key set. If the data container contains a selection under the specified key the selection is returned. If there is none, a selection of appropriate type is created and put to the container first.

Provided the above conditions are met this method is suitable for just obtaining the selection object a vector layer uses too.
Returns:
The layer's selection (no reference is added).

get_editable()

Gets editability of a vector layer.
Returns:
True if layer is edtiable, False if it is not editable.

get_focus()

Gets focused object index.
Returns:
Focued object index, or -1 if no object is focused.

get_selection_key()

Gets the key identifying selection this vector layer displays.
Returns:
The string key, or NULL if it isn't set.

object_chosen(id)

Emits "object-chosen" signal on a vector layer.

This function is primarily intended for layer implementations.
Parameters:
id - Index of the chosen object. (int)

set_editable(editable)

Sets a vector layer editability.

It is an error to attempt to set a layer non-editabile while it is being edited.

When a layer is set noneditable, the user cannot change the selection. However, "object-chosen" signal is still emitted.
Parameters:
editable - True to set layer editable, False to set it noneditable. (bool)

set_focus(focus)

Focues on one selection object.

When a selection object is focused, it becomes the only one user can interact with. More precisely, "object-chosen" signal is emitted only for this object, and if the layer is editable only this object can be modified by the user.
Parameters:
focus - Index of object to focus on, use -1 to unfocus (allow interaction with any object). (int)
Returns:
True if the object was focused, False on failure. Failure can be caused by user currently moving another object, wrong object index, or the feature being unimplemented in layer.

set_selection_key(key)

Sets the selection object to use by a vector layer.
Parameters:
key - Container string key identifying the selection object. (string)

UNIMPLEMENTED_button_press(event)

Sends a mouse button press event to a layer.

This method primarily exists for DataView to forward events to layers. You should rarely need it.
Parameters:
event - A Gdk mouse button event. (GdkEventButton*)
Returns:
True if the event was handled. In practice, it returns False.

UNIMPLEMENTED_button_release(event)

Sends a mouse button release event to a layer.

This method primarily exists for DataView to forward events to layers. You should rarely need it.
Parameters:
event - A Gdk mouse button event. (GdkEventButton*)
Returns:
True if the event was handled. In practice, it returns False.

UNIMPLEMENTED_draw(drawable, target)

Draws layer on given drawable (which should be a DataView window).
Parameters:
drawable - A drawable to draw on. (GdkDrawable*)
target - Rendering target. (RenderingTarget)

UNIMPLEMENTED_key_press(event)

Sends a key press event to a layer.

This method primarily exists for DataView to forward events to layers. You should rarely need it.
Parameters:
event - A Gdk key event. (GdkEventKey*)
Returns:
True if the event was handled. In practice, it returns False.

UNIMPLEMENTED_key_release(event)

Sends a key release event to a layer.

This method primarily exists for DataView to forward events to layers. You should rarely need it.
Parameters:
event - A Gdk key event. (GdkEventKey*)
Returns:
True if the event was handled. In practice, it returns False.

UNIMPLEMENTED_motion_notify(event)

Sends a mouse pointer motion notification event to a layer.

This method primarily exists for DataView to forward events to layers. You should rarely need it.
Parameters:
event - A Gdk mouse pointer motion notification event. It can be a hint. (GdkEventMotion*)
Returns:
True if the event was handled. In practice, it returns False.

Generated by Epydoc 2.1 on Tue Dec 30 04:01:42 2008 http://epydoc.sf.net