Top | ![]() |
![]() |
![]() |
![]() |
#define | VIK_LAYER_TYPE |
enum | VikLayerToolFuncStatus |
struct | VikToolInterface |
enum | VikStdLayerMenuItem |
struct | VikLayerInterface |
VikLayerTypedParamData |
GObject ╰── VikLayer ├── VikAggregateLayer ├── VikCoordLayer ├── VikDEMLayer ├── VikGeorefLayer ├── VikGpsLayer ├── VikMapnikLayer ├── VikMapsLayer ╰── VikTrwLayer
gpointer (*VikToolConstructorFunc) (VikWindow *Param1
,VikViewport *Param2
);
VikLayerToolFuncStatus (*VikToolMouseFunc) (VikLayer *Param1
,GdkEventButton *Param2
,gpointer Param3
);
VikLayerToolFuncStatus (*VikToolMouseMoveFunc) (VikLayer *Param1
,GdkEventMotion *Param2
,gpointer Param3
);
gboolean (*VikToolKeyFunc) (VikLayer *Param1
,GdkEventKey *Param2
,gpointer Param3
);
void (*VikLayerFuncRealize) (VikLayer *Param1
,VikTreeview *Param2
,GtkTreeIter *Param3
);
void (*VikLayerFuncPostRead) (VikLayer *Param1
,VikViewport *vp
,gboolean from_file
);
gboolean (*VikLayerFuncProperties) (VikLayer *Param1
,VikViewport *Param2
,gboolean Param3
);
void (*VikLayerFuncChangeCoordMode) (VikLayer *Param1
,VikCoordMode Param2
);
void (*VikLayerFuncSetMenuItemsSelection) (VikLayer *Param1
,guint16 Param2
);
guint16
(*VikLayerFuncGetMenuItemsSelection) (VikLayer *Param1
);
void (*VikLayerFuncAddMenuItems) (VikLayer *Param1
,GtkMenu *Param2
,gpointer Param3
);
gboolean (*VikLayerFuncSublayerAddMenuItems) (VikLayer *Param1
,GtkMenu *Param2
,gpointer Param3
,gint Param4
,gpointer Param5
,GtkTreeIter *Param6
,VikViewport *Param7
);
const gchar * (*VikLayerFuncSublayerRenameRequest) (VikLayer *Param1
,const gchar *Param2
,gpointer Param3
,gint Param4
,VikViewport *Param5
,GtkTreeIter *Param6
);
gboolean (*VikLayerFuncSublayerToggleVisible) (VikLayer *Param1
,gint Param2
,gpointer Param3
);
const gchar * (*VikLayerFuncSublayerTooltip) (VikLayer *Param1
,gint Param2
,gpointer Param3
);
gboolean (*VikLayerFuncLayerSelected) (VikLayer *Param1
,gint Param2
,gpointer Param3
,gint Param4
,gpointer Param5
);
void (*VikLayerFuncMarshall) (VikLayer *Param1
,guint8 **Param2
,guint *Param3
);
VikLayer * (*VikLayerFuncUnmarshall) (guint8 *Param1
,guint Param2
,VikViewport *Param3
);
gboolean (*VikLayerFuncSetParam) (VikLayer *Param1
,VikLayerSetParam *Param2
);
VikLayerParamData (*VikLayerFuncGetParam) (VikLayer *Param1
,guint16 Param2
,gboolean Param3
);
void (*VikLayerFuncChangeParam) (GtkWidget *Param1
,ui_change_values Param2
);
gboolean (*VikLayerFuncReadFileData) (VikLayer *Param1
,FILE *Param2
,const gchar *Param3
);
void (*VikLayerFuncWriteFileData) (VikLayer *Param1
,FILE *Param2
,const gchar *Param3
);
void (*VikLayerFuncDeleteItem) (VikLayer *Param1
,gint Param2
,gpointer Param3
);
void (*VikLayerFuncCutItem) (VikLayer *Param1
,gint Param2
,gpointer Param3
);
void (*VikLayerFuncCopyItem) (VikLayer *Param1
,gint Param2
,gpointer Param3
,guint8 **Param4
,guint *Param5
);
gboolean (*VikLayerFuncPasteItem) (VikLayer *Param1
,gint Param2
,guint8 *Param3
,guint Param4
);
void (*VikLayerFuncDragDropRequest) (VikLayer *Param1
,VikLayer *Param2
,GtkTreeIter *Param3
,GtkTreePath *Param4
);
gboolean (*VikLayerFuncSelectClick) (VikLayer *Param1
,GdkEventButton *Param2
,VikViewport *Param3
,tool_ed_t *Param4
);
gboolean (*VikLayerFuncSelectMove) (VikLayer *Param1
,GdkEventMotion *Param2
,VikViewport *Param3
,tool_ed_t *Param4
);
gboolean (*VikLayerFuncSelectRelease) (VikLayer *Param1
,GdkEventButton *Param2
,VikViewport *Param3
,tool_ed_t *Param4
);
gboolean (*VikLayerFuncSelectedViewportMenu) (VikLayer *Param1
,GdkEventButton *Param2
,VikViewport *Param3
);
void vik_layer_set_defaults (VikLayer *vl
,VikViewport *vvp
);
Loop around all parameters for the specified layer to call the function to get the default value for that parameter
void vik_layer_set_menu_items_selection (VikLayer *l
,guint16 selection
);
void vik_layer_add_menu_items (VikLayer *l
,GtkMenu *menu
,gpointer vlp
);
VikLayer * vik_layer_create (VikLayerTypeEnum type
,VikViewport *vp
,gboolean interactive
);
gboolean vik_layer_properties (VikLayer *layer
,VikViewport *vp
,gboolean have_apply
);
void vik_layer_realize (VikLayer *l
,VikTreeview *vt
,GtkTreeIter *layer_iter
);
void vik_layer_post_read (VikLayer *layer
,VikViewport *vp
,gboolean from_file
);
gboolean vik_layer_sublayer_add_menu_items (VikLayer *l
,GtkMenu *menu
,gpointer vlp
,gint subtype
,gpointer sublayer
,GtkTreeIter *iter
,VikViewport *vvp
);
VikLayer * vik_layer_unmarshall (const guint8 *data
,guint len
,VikViewport *vvp
);
void vik_layer_marshall_params (VikLayer *vl
,guint8 **data
,guint *len
);
void vik_layer_unmarshall_params (VikLayer *vl
,const guint8 *data
,guint len
,VikViewport *vvp
);
const gchar * vik_layer_sublayer_rename_request (VikLayer *l
,const gchar *newname
,gpointer vlp
,gint subtype
,gpointer sublayer
,GtkTreeIter *iter
);
gboolean vik_layer_sublayer_toggle_visible (VikLayer *l
,gint subtype
,gpointer sublayer
);
const gchar * vik_layer_sublayer_tooltip (VikLayer *l
,gint subtype
,gpointer sublayer
);
gboolean vik_layer_selected (VikLayer *l
,gint subtype
,gpointer sublayer
,gint type
,gpointer vlp
);
GdkPixbuf *
vik_layer_load_icon (VikLayerTypeEnum type
);
Unref the returned pixbuf after use
void
vik_layer_emit_update_although_invisible
(VikLayer *vl
);
VikLayerTypedParamData * vik_layer_typed_param_data_copy_from_data (VikLayerParamType type
,VikLayerParamData val
);
VikLayerTypedParamData * vik_layer_data_typed_param_copy_from_string (VikLayerParamType type
,const gchar *str
);
struct VikToolInterface { const gchar *icon; GtkRadioActionEntry radioActionEntry; VikToolConstructorFunc create; VikToolDestructorFunc destroy; VikToolActivationFunc activate; VikToolActivationFunc deactivate; VikToolMouseFunc click; VikToolMouseMoveFunc move; VikToolMouseFunc release; VikToolKeyFunc key_press; /* return FALSE if we don't use the key press -- should return FALSE most of the time if we want any shortcuts / UI keybindings to work! use sparingly. */ VikToolKeyFunc key_release; /* as above */ gboolean pan_handler; // Call click & release funtions even when 'Pan Mode' is on GdkCursorType cursor_type; const gchar *cursor_name; const GdkCursor *cursor; };
struct VikLayerInterface { const gchar * fixed_layer_name; // Used in .vik files - this should never change to maintain file compatibility const gchar * name; // Translate-able name used for display purposes const gchar * accelerator; const gchar * icon; VikToolInterface * tools; guint16 tools_count; /* for I/O reading to and from .vik files -- params like coordline width, color, etc. */ VikLayerParam * params; guint16 params_count; gchar ** params_groups; guint8 params_groups_count; /* menu items to be created */ VikStdLayerMenuItem menu_items_selection; VikLayerFuncCreate create; VikLayerFuncRealize realize; VikLayerFuncPostRead post_read; VikLayerFuncFree free; VikLayerFuncProperties properties; VikLayerFuncDraw draw; VikLayerFuncConfigure configure; VikLayerFuncChangeCoordMode change_coord_mode; VikLayerFuncGetTimestamp get_timestamp; VikLayerFuncSetMenuItemsSelection set_menu_selection; VikLayerFuncGetMenuItemsSelection get_menu_selection; VikLayerFuncAddMenuItems add_menu_items; VikLayerFuncSublayerAddMenuItems sublayer_add_menu_items; VikLayerFuncSublayerRenameRequest sublayer_rename_request; VikLayerFuncSublayerToggleVisible sublayer_toggle_visible; VikLayerFuncSublayerTooltip sublayer_tooltip; VikLayerFuncLayerTooltip layer_tooltip; VikLayerFuncLayerSelected layer_selected; VikLayerFuncLayerToggleVisible layer_toggle_visible; VikLayerFuncMarshall marshall; VikLayerFuncUnmarshall unmarshall; /* for I/O */ VikLayerFuncSetParam set_param; VikLayerFuncGetParam get_param; VikLayerFuncChangeParam change_param; /* for I/O -- extra non-param data like TrwLayer data */ VikLayerFuncReadFileData read_file_data; VikLayerFuncWriteFileData write_file_data; VikLayerFuncDeleteItem delete_item; VikLayerFuncCutItem cut_item; VikLayerFuncCopyItem copy_item; VikLayerFuncPasteItem paste_item; VikLayerFuncFreeCopiedItem free_copied_item; VikLayerFuncDragDropRequest drag_drop_request; VikLayerFuncSelectClick select_click; VikLayerFuncSelectMove select_move; VikLayerFuncSelectRelease select_release; VikLayerFuncSelectedViewportMenu show_viewport_menu; VikLayerFuncRefresh refresh; };