GeovpfCanvasTheme

GeovpfCanvasTheme — A widget that draws a single type of VPF themetatic data.

Synopsis




struct      GeovpfCanvasThemePrivate;
struct      GeovpfCanvasTheme;
struct      GeovpfCanvasThemeClass;

Object Hierarchy


  GObject
   +----GtkObject
         +----FooCanvasItem
               +----FooCanvasGroup
                     +----GeovpfCanvasTheme

Properties


  "add-attribute"        gchararray           : Write
  "anchor"               GtkAnchorType        : Read / Write
  "coverage"             gchararray           : Read / Write
  "expression"           gchararray           : Read / Write
  "feature-class"        gchararray           : Read / Write
  "fill-color-rgba"      guint                : Read / Write
  "fill-stipple"         GdkDrawable          : Read / Write
  "label-attribute"      gchararray           : Read / Write
  "library-path"         gchararray           : Read / Write
  "line-style"           GdkLineStyle         : Read / Write
  "line-width-pixels"    guint                : Read / Write
  "pixbuf"               GdkPixbuf            : Read / Write
  "pixbuf-height"        gdouble              : Read / Write
  "pixbuf-width"         gdouble              : Read / Write
  "text"                 gchararray           : Read / Write
  "text-size-points"     gdouble              : Read / Write

Signal Prototypes


"add-member"
            void        user_function      (GeovpfCanvasTheme *geovpfcanvastheme,
                                            FooCanvasItem *arg1,
                                            gpointer user_data);
"begin-group"
            void        user_function      (GeovpfCanvasTheme *geovpfcanvastheme,
                                            FooCanvasItem *arg1,
                                            gpointer user_data);

Description

The GeovpfCanvasTheme widget draws a single type of VPF thematic data to the canvas based on it properties specification. This is the lowest level building block for plotting VPF to the GeoCanvas and is the only one required for basic VPF displays. The feature-class, coverage, and database expression properties are used together to describe the theme.

This example creates a simple theme.

/* The GeovpfCanvasTheme is used to display all feature types - edge, face,
 * entity_node, connected_node, and text.
 *
 * library_path: location of the library.  Use of directory path can be avoided
 * by using the GeovpfDatabaseLookup object.
 *
 * coverage: a set of topologically related feature classes.  Earth coverage in
 *              in this case.
 *
 * feature_class: features that share a homogenous set of attributes.  Earth
 *              coverage areas in this case.
 *
 * expression: thematic information (a limited database query).  
 *             This example queries for land and island coverage.
 */
foo_canvas_item_new(group, GEOVPF_TYPE_CANVAS_THEME,
        "library_path", "/home/username/dnc/dnc17/a1707420",
        "coverage", "ecr",
        "feature_class", "ecrarea",
        "expression", "F_CODE=BA030 or F_CODE=DA010",
        "fill_color_rgba", 0xBDAF1Bff,
        NULL);

The VPF database structure looks something like this:

        Database (e.g. DNC17)
                - Library (e.g. a1707420 approach chart)
                        - coverage (e.g. ecr)
                                - feature class (e.g. ecrarea)
                                        -expression (e.g. F_CODE, etc.)

To discover how to properly set up the coverage, feature class, and expression properties of the theme, there is a program included in the geovpf directory of this package called geovpfprint. Use the -h option to see the usage. This program can provide a detailed list of what is available in the for the VPF databases being used.

Details

struct GeovpfCanvasThemePrivate

struct GeovpfCanvasThemePrivate;


struct GeovpfCanvasTheme

struct GeovpfCanvasTheme;


struct GeovpfCanvasThemeClass

struct GeovpfCanvasThemeClass {

        FooCanvasGroupClass parent_class;
        void (* reload_library) (GeovpfCanvasTheme *theme);
        void (* begin_group) (GeovpfCanvasTheme *theme, FooCanvasItem *group);
        void (* add_member) (GeovpfCanvasTheme *theme, FooCanvasItem *group);
};

Properties

"add-attribute" (gchararray : Write)

This property can be used as a way to query the VPF database for additional per item information. The results of the query are stored as a dataset in the canvas item and can be retrieved by calling g_object_get_data. This property can be set multiple times for each attribute to be queried.

"anchor" (GtkAnchorType : Read / Write)

Anchor for group (pixbuf & text items only).

"coverage" (gchararray : Read / Write)

The coverage refers to a set of topilogically related feature classes, e.g, "ecr", "hyd", "cul", etc. It is mandatory that this property be set.

"expression" (gchararray : Read / Write)

This is a simple logical expression used in the database search query. e.g., "F_CODE=BA030 or F_CODE=DA010" refers to the feature codes for mainland and islands. Use the geovpfprint program to determine what feature codes are available for a given database.

"feature-class" (gchararray : Read / Write)

An identifier for features that share a homogenous set of attributes. e.g. "ecrarea" refers to face features. It is mandatory that this property be set.

"fill-color-rgba" (guint : Read / Write)

Fill Color RGBA.

"fill-stipple" (GdkDrawable : Read / Write)

Fill Stipple.

"label-attribute" (gchararray : Read / Write)

This property will cause the "text" property for the theme to be set based on any arbitrary attribute that exists in the feature class table. This is should in most cases not be used on text feature classes as they will automatically set the appropriate "text" label.

"library-path" (gchararray : Read / Write)

This can be set to an absolute path and file name or it can be set to just the library name if the GeovpfDatabaseLookup object has been initialized with a search path. When using the GeovfCanvasTheme as a child of a GeovpfCanvasView, this property should not be explicitly set.

"line-style" (GdkLineStyle : Read / Write)

Line style.

"line-width-pixels" (guint : Read / Write)

Line width in pixels.

"pixbuf" (GdkPixbuf : Read / Write)

"pixbuf-height" (gdouble : Read / Write)

Height in pixels (for Pixbufs only.).

"pixbuf-width" (gdouble : Read / Write)

Width in pixels (for Pixbufs only.).

"text" (gchararray : Read / Write)

Text to be applied to all group members (Text item).

"text-size-points" (gdouble : Read / Write)

Font size in points for group (text item only).

Signals

The "add-member" signal

void        user_function                  (GeovpfCanvasTheme *geovpfcanvastheme,
                                            FooCanvasItem *arg1,
                                            gpointer user_data);

This signal is emitted each time a new canvas item is created as part of the theme. It can be used to add additional properties that are specific on a per item basis. An example use of this signal might be to make each face (polygon) within a theme a different color.

geovpfcanvastheme :the object which emitted the signal.
arg1 :The canvas item that was just created.
user_data :user data set when the signal handler was connected.

The "begin-group" signal

void        user_function                  (GeovpfCanvasTheme *geovpfcanvastheme,
                                            FooCanvasItem *arg1,
                                            gpointer user_data);

All thematic data is drawn by a GeoCanvasGroup widget. This signal is emitted each time a group is created. The group member of the theme may be destroyed and re-instantiated if certain properties of the theme are changed. This signal can be used to modify properties of the GeoCanvasGroup member.

geovpfcanvastheme :the object which emitted the signal.
arg1 :The GeoCanvasGroup that was just created.
user_data :user data set when the signal handler was connected.

See Also

GeovpfCanvasView