GeocvpfView

GeocvpfView — group that represents a set of GeovpfCanvasThemes to be applied to a VPF library.

Synopsis




                    GeocvpfViewPrivate;
                    GeocvpfView;
                    GeocvpfViewClass;

Object Hierarchy


  GObject
   +----CrItem
         +----GeocItem
               +----GeocvpfView

Properties


  "library-pattern"          gchararray            : Read / Write
  "library-selector"         GObject               : Read / Write
  "sticky-deselect"          gboolean              : Read / Write

Description

The GeovpfCanvasView object is a simple canvas group that connects to the GeovpfCanvasSelector. It has special logic to select an appropriate library based on its library_pattern property and pass the library_name into is child GeovpfCanvasTheme objects. A GeovpfCanvasView can be thought of as a set of themes that should be applied to specific type of library.

Here is an example:


        \/* The library selector needs to be told which canvas to connect to.
        * After that, all views will look for a singleton instance unless the
        * view "library-selector" property is set explicitly.
        *\/
        selector = g_object_new(GEOVPF_TYPE_LIBRARY_SELECTOR, "geocanvas",
                        canvas, NULL);
                        
        \/* This view will activate select any library that begins with "g".
         * DNC, this is a "general" library.
         *\/
        general = geoc_item_new(group, GEOCVPF_TYPE_VIEW,
                        "library_pattern", "g*", 
                        NULL));

        \/* This item will draw water *\/
        geoc_item_new(general, GEOCVPF_TYPE_THEME, 
                "coverage", "ecr", 
                "feature_class", "ecrarea",
                "expression", "F_CODE=BA040",
                "fill_color_rgba", 0xD1F4FFFF,
                NULL);
        \/* This item will draw mainland and islands *\/
        geoc_item_new(general, GEOCVPF_TYPE_THEME, 
                "coverage", "ecr", 
                "feature_class", "ecrarea",
                "expression", "F_CODE=BA030 or F_CODE=DA010",
                "fill_color_rgba", 0xBDAF1Bff,
                NULL);
        \/* This item will draw text features. *\/
        geoc_item_new(general, GEOCVPF_TYPE_THEME,
                "coverage", "ecr",
                "feature_class", "ecrtext",
                "fill_color_rgba", 0x000000FF,
                NULL);

Details

GeocvpfViewPrivate

typedef struct _GeocvpfViewPrivate GeocvpfViewPrivate;


GeocvpfView

typedef struct _GeocvpfView GeocvpfView;


GeocvpfViewClass

typedef struct {
        GeocItemClass parent_class;
} GeocvpfViewClass;

Property Details

The "library-pattern" property

  "library-pattern"          gchararray            : Read / Write

Library name subject to 'glob' style pattern match. This is the name subject to a 'glob' style pattern match of the library or libraries to be associated with this #GeocvpfCanvasView. For example, a name of 'g*' would match any libraries 'gen17a', 'gen17b', and more.

Default value: NULL


The "library-selector" property

  "library-selector"         GObject               : Read / Write

Any onject with a 'selected library' property. This property points to an instance of any GObject that is capable of notifying on a @selected_library property. Usual it will connect to an instance of the #GeocvpfLibrarySelector. It defaults to @NULL.


The "sticky-deselect" property

  "sticky-deselect"          gboolean              : Read / Write

If TRUE does not hide when non-matching library is selected. This property when set will cause this instance to stay activated when a non-matching library is selected by the @library_selector after it has been activated once.

Default value: FALSE