From 4aa7c2ac0a4578c2213b8964dff098f039eef703 Mon Sep 17 00:00:00 2001 From: Jim Evins Date: Sun, 28 Feb 2010 23:14:23 -0500 Subject: [PATCH] Cleanup of libglabels documentation. Added documentation for new functionality in 3.0, including the vendor database and a new "natural order" compare function for sorting part numbers. --- docs/libglabels/libglabels-3.0-docs.sgml | 2 + docs/libglabels/libglabels-3.0-sections.txt | 28 +++++++++++ docs/libglabels/tmpl/db.sgml | 44 +++++++++++++++++ docs/libglabels/tmpl/str.sgml | 10 ++++ docs/libglabels/tmpl/template.sgml | 46 ++++++++++++++++++ docs/libglabels/tmpl/vendor.sgml | 53 +++++++++++++++++++++ docs/libglabels/tmpl/xml-vendor.sgml | 46 ++++++++++++++++++ libglabels/str.c | 5 ++ libglabels/template.c | 4 +- libglabels/vendor.c | 5 -- libglabels/xml-template.c | 4 -- 11 files changed, 235 insertions(+), 12 deletions(-) create mode 100644 docs/libglabels/tmpl/vendor.sgml create mode 100644 docs/libglabels/tmpl/xml-vendor.sgml diff --git a/docs/libglabels/libglabels-3.0-docs.sgml b/docs/libglabels/libglabels-3.0-docs.sgml index 9473f36c..28ddc612 100644 --- a/docs/libglabels/libglabels-3.0-docs.sgml +++ b/docs/libglabels/libglabels-3.0-docs.sgml @@ -14,6 +14,7 @@ + @@ -21,6 +22,7 @@ + diff --git a/docs/libglabels/libglabels-3.0-sections.txt b/docs/libglabels/libglabels-3.0-sections.txt index e6fb32f0..93918084 100644 --- a/docs/libglabels/libglabels-3.0-sections.txt +++ b/docs/libglabels/libglabels-3.0-sections.txt @@ -36,6 +36,12 @@ lgl_db_get_template_name_list_unique lgl_db_get_template_name_list_all lgl_db_free_template_name_list lgl_db_lookup_template_from_name +lgl_db_lookup_template_from_brand_part + +lgl_db_get_vendor_name_list +lgl_db_free_vendor_name_list +lgl_db_is_vendor_name_known +lgl_db_lookup_vendor_from_name lgl_db_print_known_papers lgl_db_print_known_categories @@ -66,10 +72,12 @@ lglTemplateMarkupMargin lglTemplateMarkupLine lglTemplateMarkupCircle lglTemplateMarkupRect +lglTemplateMarkupEllipse lglTemplateOrigin lgl_template_new +lgl_template_new_from_equiv lgl_template_dup lgl_template_free lgl_template_add_category @@ -87,6 +95,7 @@ lgl_template_alias_dup lgl_template_alias_free lgl_template_frame_rect_new +lgl_template_frame_ellipse_new lgl_template_frame_round_new lgl_template_frame_cd_new lgl_template_frame_dup @@ -106,6 +115,7 @@ lgl_template_markup_margin_new lgl_template_markup_line_new lgl_template_markup_circle_new lgl_template_markup_rect_new +lgl_template_markup_ellipse_new lgl_template_markup_dup lgl_template_markup_free @@ -128,6 +138,15 @@ lgl_category_dup lgl_category_free +
+vendor +libglabels/vendor.h +lglVendor +lgl_vendor_new +lgl_vendor_dup +lgl_vendor_free +
+
xml-paper libglabels/xml-paper.h @@ -155,6 +174,14 @@ lgl_xml_template_write_template_to_file lgl_xml_template_create_template_node
+
+xml-vendor +libglabels/xml-vendor.h +lgl_xml_vendor_read_vendors_from_file +lgl_xml_vendor_parse_vendors_doc +lgl_xml_vendor_parse_vendor_node +
+
xml libglabels/xml.h @@ -197,5 +224,6 @@ lgl_units_get_units_per_point str libglabels/str.h lgl_str_utf8_casecmp +lgl_str_part_name_cmp
diff --git a/docs/libglabels/tmpl/db.sgml b/docs/libglabels/tmpl/db.sgml index 3d5d2de3..4c2705bf 100644 --- a/docs/libglabels/tmpl/db.sgml +++ b/docs/libglabels/tmpl/db.sgml @@ -283,6 +283,50 @@ This enumeration defines a set of possible return values for lgl_db_register_tem @Returns: + + + + + +@brand: +@part: +@Returns: + + + + + + + +@Returns: + + + + + + + +@names: + + + + + + + +@name: +@Returns: + + + + + + + +@name: +@Returns: + + diff --git a/docs/libglabels/tmpl/str.sgml b/docs/libglabels/tmpl/str.sgml index 53cbd3b9..e333fb00 100644 --- a/docs/libglabels/tmpl/str.sgml +++ b/docs/libglabels/tmpl/str.sgml @@ -28,3 +28,13 @@ possible use to a user of libglabels. @Returns: + + + + + +@s1: +@s2: +@Returns: + + diff --git a/docs/libglabels/tmpl/template.sgml b/docs/libglabels/tmpl/template.sgml index ae363e42..57e7405c 100644 --- a/docs/libglabels/tmpl/template.sgml +++ b/docs/libglabels/tmpl/template.sgml @@ -208,6 +208,17 @@ This structure defines a simple rectangle markup. The rectangle can have rounde @h: Height of rectangle in points. @r: Radius of corners in points. Should be zero for sharp corners. + + +This structure defines a simple elliptical markup. + + +@type: Common field. Always #LGL_TEMPLATE_MARKUP_ELLIPSE for #lglTemplateMarkupEllipse. +@x1: Distance (in points) of left edge of markup from left edge of label or card. +@y1: Distance (in points) of top edge of markup from top edge of label or card. +@w: Width of rectangle in points. +@h: Height of rectangle in points. + This structure represents the cartesian coordinates of the origin of a label or card on the page. @@ -232,6 +243,17 @@ relative to the upper left corner of the page. @Returns: + + + + + +@brand: +@part: +@equiv_part: +@Returns: + + @@ -366,6 +388,18 @@ relative to the upper left corner of the page. @Returns: + + + + + +@id: +@w: +@h: +@waste: +@Returns: + + @@ -530,6 +564,18 @@ relative to the upper left corner of the page. @Returns: + + + + + +@x1: +@y1: +@w: +@h: +@Returns: + + diff --git a/docs/libglabels/tmpl/vendor.sgml b/docs/libglabels/tmpl/vendor.sgml new file mode 100644 index 00000000..1dee0044 --- /dev/null +++ b/docs/libglabels/tmpl/vendor.sgml @@ -0,0 +1,53 @@ + +The lglVendor Structure + + +Vendor definitions + + + +This section describes a structure for representing vendor data. + + + + + + + + + + + + +This structure defines a vendor. + + +@name: Vendor name. (e.g. "Avery") +@url: URL to vendor website + + + + + + +@name: +@Returns: + + + + + + + +@orig: +@Returns: + + + + + + + +@vendor: + + diff --git a/docs/libglabels/tmpl/xml-vendor.sgml b/docs/libglabels/tmpl/xml-vendor.sgml new file mode 100644 index 00000000..2550d259 --- /dev/null +++ b/docs/libglabels/tmpl/xml-vendor.sgml @@ -0,0 +1,46 @@ + +XML Vendor Functions + + +Functions to parse glabels XML vendor descriptions + + + +This section describes several functions for parsing vendor XML description files. + + + + + + + + + + + + + + + +@utf8_filename: +@Returns: + + + + + + + +@vendors_doc: +@Returns: + + + + + + + +@vendor_node: +@Returns: + + diff --git a/libglabels/str.c b/libglabels/str.c index 627e6be4..e93a9913 100644 --- a/libglabels/str.c +++ b/libglabels/str.c @@ -86,10 +86,15 @@ lgl_str_utf8_casecmp (const gchar *s1, * * Compare two UTF-8 strings representing part names or numbers. This function * uses a natural sort order: + * * - Ignores case. + * * - Strings are divided into chunks (numeric and non-numeric) + * * - Non-numeric chunks are compared character by character + * * - Numerical chunks are compared numerically, so that "20" precedes "100". + * * - Comparison of chunks is performed left to right until the first difference * is encountered or all chunks evaluate as equal. * diff --git a/libglabels/template.c b/libglabels/template.c index 9c1e71f2..0af4e5de 100644 --- a/libglabels/template.c +++ b/libglabels/template.c @@ -414,9 +414,7 @@ lgl_template_frame_rect_new (const gchar *id, * @id: ID of frame. (This should currently always be "0"). * @w: width of frame in points. * @h: height of frame in points. - * @r: radius of rounded corners in points. (Should be 0 for square corners.) - * @x_waste: Amount of overprint to allow in the horizontal direction. - * @y_waste: Amount of overprint to allow in the vertical direction. + * @waste: Amount of overprint to allow in points. * * This function creates a new template frame for an elliptical label or card. * diff --git a/libglabels/vendor.c b/libglabels/vendor.c index 9ee29bfb..e7f950bd 100644 --- a/libglabels/vendor.c +++ b/libglabels/vendor.c @@ -49,12 +49,7 @@ /** * lgl_vendor_new: - * @id: Id of vendor definition. (E.g. US-Letter, A4, etc.) Should be - * unique. * @name: Localized name of vendor. - * @width: Width of vendor in points. - * @height: Height of vendor in points. - * @pwg_size: PWG 5101.1-2002 size name. * * Allocates and constructs a new #lglVendor structure. * diff --git a/libglabels/xml-template.c b/libglabels/xml-template.c index a6f10a45..75b6fec4 100644 --- a/libglabels/xml-template.c +++ b/libglabels/xml-template.c @@ -104,8 +104,6 @@ static void xml_create_alias_node (const lglTemplateAlias *alias * * Read glabels templates from template file. * - * Returns: a list of #lglTemplate structures. - * */ void lgl_xml_template_read_templates_from_file (const gchar *utf8_filename) @@ -142,8 +140,6 @@ lgl_xml_template_read_templates_from_file (const gchar *utf8_filename) * * Read glabels templates from a libxml #xmlDocPtr tree. * - * Returns: a list of #lglTemplate structures. - * */ void lgl_xml_template_parse_templates_doc (const xmlDocPtr templates_doc) -- 2.39.5