GeocvpfTheme

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

Synopsis




                    GeocvpfThemePrivate;
                    GeocvpfTheme;
                    GeocvpfThemeClass;

Object Hierarchy


  GObject
   +----CrItem
         +----GeocItem
               +----GeocvpfTheme

Properties


  "add-attribute"            gchararray            : Write
  "anchor"                   GtkAnchorType         : Read / Write
  "coverage"                 gchararray            : Read / Write
  "dash"                     CrDash                : Read / Write
  "expression"               gchararray            : Read / Write
  "faster"                   gboolean              : Read / Write
  "feature-class"            gchararray            : Read / Write
  "fill-color"               gchararray            : Read / Write
  "fill-color-rgba"          guint                 : Read / Write
  "font"                     gchararray            : Read / Write
  "height"                   gdouble               : Read / Write
  "label-attribute"          gchararray            : Read / Write
  "library-path"             gchararray            : Read / Write
  "line-scaleable"           gboolean              : Read / Write
  "line-width"               gdouble               : Read / Write
  "outline-color"            gchararray            : Read / Write
  "outline-color-rgba"       guint                 : Read / Write
  "pattern"                  CrPattern             : Read / Write
  "pattern-scaleable"        gboolean              : Read / Write
  "pixbuf"                   GObject               : Read / Write
  "scaleable"                gboolean              : Read / Write
  "test-fill"                gboolean              : Read / Write
  "text"                     gchararray            : Read / Write
  "use-markup"               gboolean              : Read / Write
  "width"                    gdouble               : Read / Write
  "x-offset"                 gdouble               : Read / Write
  "y-offset"                 gdouble               : Read / Write

Signals


  "add-member"                                     : Run First
  "begin-group"                                    : Run First

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 GeocvpfCanvasTheme 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 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.
 *\/

 geoc_item_new(group, GEOCVPF_TYPE_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 60 the usage. This program can provide a detailed list of what is available in the for the VPF databases being used.

Details

GeocvpfThemePrivate

typedef struct _GeocvpfThemePrivate GeocvpfThemePrivate;


GeocvpfTheme

typedef struct _GeocvpfTheme GeocvpfTheme;


GeocvpfThemeClass

typedef struct {
        GeocItemClass parent_class;
        void (* reload_library) (GeocvpfTheme *theme);
        /**
         * GeocvpfTheme::begin-group:
         * @theme:
         * @group: newly created group
         *
         * 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.
         */
        void (* begin_group) (GeocvpfTheme *theme, GeocItem *group);
        /**
         * GeocvpfTheme::add-member:
         * @theme:
         * @group: parent canvas group
         *
         * 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.
         */
        void (* add_member) (GeocvpfTheme *theme, GeocItem *group);
} GeocvpfThemeClass;

Property Details

The "add-attribute" property

  "add-attribute"            gchararray            : Write

Retrieve info and add it via set_data. 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.

Default value: NULL


The "anchor" property

  "anchor"                   GtkAnchorType         : Read / Write

The part of the pixbuf that is referenced to the item's x, y coordinates.

Default value: GTK_ANCHOR_NORTH_WEST


The "coverage" property

  "coverage"                 gchararray            : Read / Write

Coverage type for the libraryThe coverage refers to a set of topilogically related feature classes, e.g, ecr, hyd, cul, etc. It is mandatory that this property be set.

Default value: NULL


The "dash" property

  "dash"                     CrDash                : Read / Write

a boxed array indicating the dash pattern to be used by Cairo. See #cairo_set_dash for more information.


The "expression" property

  "expression"               gchararray            : Read / Write

Database query expression for thematic info. 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 <filename>geovpfprint</filename> program to determine what feature codes are available for a given database.

Default value: "*"


The "faster" property

  "faster"                   gboolean              : Read / Write

Speeds up painting by using GDK primitives instead of cairo. Anti-aliasing not available when set. Currently only supported for Face themes.

Default value: TRUE


The "feature-class" property

  "feature-class"            gchararray            : Read / Write

Feature class for the coverage 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.

Default value: NULL


The "fill-color" property

  "fill-color"               gchararray            : Read / Write

A string color such as 'red', or '#123456' to be used to fill the path.

Default value: NULL


The "fill-color-rgba" property

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

Region fill color, red,grn,blue,alpha.

Default value: 0


The "font" property

  "font"                     gchararray            : Read / Write

A pango font description string of the form [FAMILY-LIST] [STYLE-OPTIONS] [SIZE].

Default value: NULL


The "height" property

  "height"                   gdouble               : Read / Write

Height of rectangle in item units. Note this is half above #CrItem:y and half below #CrItem:y.

Default value: 2


The "label-attribute" property

  "label-attribute"          gchararray            : Read / Write

For text items use the attribute value for the textThis 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.

Default value: "*"


The "library-path" property

  "library-path"             gchararray            : Read / Write

path & name, or just name (do hash lookup) 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.

Default value: NULL


The "line-scaleable" property

  "line-scaleable"           gboolean              : Read / Write

If line width should be scaleable.

Default value: TRUE


The "line-width" property

  "line-width"               gdouble               : Read / Write

Path line width in user units when #CrPath:line-scaleable is TRUE. When #CrPath:line-scaleable is FALSE this is in device units.

Default value: 2


The "outline-color" property

  "outline-color"            gchararray            : Read / Write

A string color such as 'red', or '#123456' to be used to sroke the path.

Default value: NULL


The "outline-color-rgba" property

  "outline-color-rgba"       guint                 : Read / Write

Path color, red,grn,blue,alpha.

Default value: 0


The "pattern" property

  "pattern"                  CrPattern             : Read / Write

Cairo pattern to fill the path region.


The "pattern-scaleable" property

  "pattern-scaleable"        gboolean              : Read / Write

If pattern should scale.

Default value: TRUE


The "pixbuf" property

  "pixbuf"                   GObject               : Read / Write

The GDK Pixbuf to draw. For images that are in other formats it may be more convenient to use the #CrPixbuf:png or #CrPixbuf:surface properties directly.


The "scaleable" property

  "scaleable"                gboolean              : Read / Write

When True the size of the text is in item units. When False, the size is in device/pixel units. This effects x/y_offset as well. See also @CrInverse for another way to achieve the same effect.

Default value: TRUE


The "test-fill" property

  "test-fill"                gboolean              : Read / Write

If the fill area should be grabbable by the pointer regardless of if it is filled. The most common use for this is as an invisible child of a very small item that would be difficult to grab on its own.

Default value: FALSE


The "text" property

  "text"                     gchararray            : Read / Write

The text to be drawn.

Default value: NULL


The "use-markup" property

  "use-markup"               gboolean              : Read / Write

If html style markup language should be used.

Default value: FALSE


The "width" property

  "width"                    gdouble               : Read / Write

Width of rectangle in item units. Note this is half to the left of #CrItem:x and half to the right of #CrItem:x.

Default value: 2


The "x-offset" property

  "x-offset"                 gdouble               : Read / Write

A device offset from the item's anchor position. Only used when scaleable=FALSE.

Default value: 0


The "y-offset" property

  "y-offset"                 gdouble               : Read / Write

A device offset from the item's anchor position. Only used when scaleable=FALSE.

Default value: 0

Signal Details

The "add-member" signal

void                user_function                      (GeocvpfTheme *theme,
                                                        CrItem       *group,
                                                        gpointer      user_data)      : Run First

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.

theme :
group : parent canvas group
user_data : user data set when the signal handler was connected.

The "begin-group" signal

void                user_function                      (GeocvpfTheme *theme,
                                                        GeocItem     *group,
                                                        gpointer      user_data)      : Run First

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.

theme :
group : newly created group
user_data : user data set when the signal handler was connected.