Top |
void | button-press | Run Last |
void | button-release | Run Last |
void | drag-finish | Run Last |
void | drag-motion | Run Last |
GObject ╰── GInitiallyUnowned ╰── ClutterActor ╰── ChamplainMarker ├── ChamplainCustomMarker ├── ChamplainLabel ╰── ChamplainPoint
ChamplainMarker implements ClutterContainer, ClutterScriptable, ClutterAnimatable, AtkImplementorIface and ChamplainLocation.
Markers represent points of interest on a map. Markers need to be placed on a layer (a ChamplainMarkerLayer). Layers have to be added to a champlainview for the markers to show on the map.
A marker is nothing more than a regular clutteractor. You can draw on it what ever you want. Set the marker's position on the map using champlain_location_set_location. Don't forget to set the marker's pointer position using clutter_actor_set_translation.
This is a base class of all markers. libchamplain has a more evoluted type of markers with text and image support. See ChamplainLabel for more details.
ClutterActor *
champlain_marker_new (void
);
Creates an instance of ChamplainMarker.
Since: 0.12.4
void champlain_marker_set_selectable (ChamplainMarker *marker
,gboolean value
);
Sets the marker as selectable or not.
Since: 0.10
gboolean
champlain_marker_get_selectable (ChamplainMarker *marker
);
Checks whether the marker is selectable.
Since: 0.10
void champlain_marker_set_draggable (ChamplainMarker *marker
,gboolean value
);
Sets the marker as draggable or not.
Since: 0.10
gboolean
champlain_marker_get_draggable (ChamplainMarker *marker
);
Checks whether the marker is draggable.
Since: 0.10
void champlain_marker_set_selected (ChamplainMarker *marker
,gboolean value
);
Sets the marker as selected or not. This will affect the "Selected" look of the marker.
Since: 0.10
gboolean
champlain_marker_get_selected (ChamplainMarker *marker
);
Checks whether the marker is selected.
Since: 0.10
void
champlain_marker_animate_in (ChamplainMarker *marker
);
Animates the marker as if it were falling from the sky onto the map.
Since: 0.10
void champlain_marker_animate_in_with_delay (ChamplainMarker *marker
,guint delay
);
Animates the marker as if it were falling from the sky onto the map after delay.
Since: 0.10
void
champlain_marker_animate_out (ChamplainMarker *marker
);
Animates the marker as if it were drawn through the sky.
Since: 0.10
void champlain_marker_animate_out_with_delay (ChamplainMarker *marker
,guint delay
);
Animates the marker as if it were drawn through the sky after delay.
Since: 0.10
void
champlain_marker_set_selection_color (ClutterColor *color
);
Changes the selection color, this is to ensure a better integration with the desktop, this is automatically done by GtkChamplainEmbed.
Since: 0.10
const ClutterColor *
champlain_marker_get_selection_color (void
);
Gets the selection color.
Since: 0.10
void
champlain_marker_set_selection_text_color
(ClutterColor *color
);
Changes the selection text color, this is to ensure a better integration with the desktop, this is automatically done by GtkChamplainEmbed.
Since: 0.10
const ClutterColor *
champlain_marker_get_selection_text_color
(void
);
Gets the selection text color.
Since: 0.10
struct ChamplainMarker;
The ChamplainMarker structure contains only private data and should be accessed using the provided API
Since: 0.10
“draggable”
property“draggable” gboolean
The draggable state of the marker
Owner: ChamplainMarker
Flags: Read / Write
Default value: FALSE
Since: 0.10
“selectable”
property“selectable” gboolean
The selectable state of the marker
Owner: ChamplainMarker
Flags: Read / Write
Default value: FALSE
Since: 0.10
“selected”
property“selected” gboolean
The selected state of the marker
Owner: ChamplainMarker
Flags: Read / Write
Default value: FALSE
Since: 0.10
“button-press”
signalvoid user_function (ChamplainMarker *self, ClutterEvent *event, gpointer user_data)
Emitted when button is pressed.
self |
||
event |
the underlying ClutterEvent |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
Since: 0.10
“button-release”
signalvoid user_function (ChamplainMarker *self, ClutterEvent *event, gpointer user_data)
Emitted when button is released. This signal is not emmitted at the end of dragging.
self |
||
event |
the underlying ClutterEvent |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
Since: 0.10
“drag-finish”
signalvoid user_function (ChamplainMarker *self, ClutterEvent *event, gpointer user_data)
Emitted when marker dragging ends (i.e. the button is released at the end of dragging).
self |
||
event |
the underlying ClutterEvent |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
Since: 0.10
“drag-motion”
signalvoid user_function (ChamplainMarker *self, gdouble dx, gdouble dy, ClutterEvent *event, gpointer user_data)
Emmitted when the marker is dragged by mouse. dx and dy specify by how much the marker has been dragged since last time.
self |
||
dx |
by how much the marker has been moved in the x direction |
|
dy |
by how much the marker has been moved in the y direction |
|
event |
the underlying ClutterEvent |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
Since: 0.10