Synopsis

#include <adg-1/adg.h>

struct              AdgTitleBlock;
struct              AdgTitleBlockClass;
AdgTitleBlock *     adg_title_block_new                 (void);
void                adg_title_block_set_logo            (AdgTitleBlock *title_block,
                                                         AdgEntity *logo);
AdgEntity *         adg_title_block_logo                (AdgTitleBlock *title_block);
void                adg_title_block_set_title           (AdgTitleBlock *title_block,
                                                         const gchar *title);
const gchar *       adg_title_block_get_title           (AdgTitleBlock *title_block);
void                adg_title_block_set_drawing         (AdgTitleBlock *title_block,
                                                         const gchar *drawing);
const gchar *       adg_title_block_get_drawing         (AdgTitleBlock *title_block);
void                adg_title_block_set_size            (AdgTitleBlock *title_block,
                                                         const gchar *size);
const gchar *       adg_title_block_get_size            (AdgTitleBlock *title_block);
void                adg_title_block_set_scale           (AdgTitleBlock *title_block,
                                                         const gchar *scale);
const gchar *       adg_title_block_get_scale           (AdgTitleBlock *title_block);
void                adg_title_block_set_author          (AdgTitleBlock *title_block,
                                                         const gchar *author);
const gchar *       adg_title_block_get_author          (AdgTitleBlock *title_block);
void                adg_title_block_set_date            (AdgTitleBlock *title_block,
                                                         const gchar *date);
const gchar *       adg_title_block_get_date            (AdgTitleBlock *title_block);
void                adg_title_block_set_projection      (AdgTitleBlock *title_block,
                                                         AdgEntity *projection);
AdgEntity *         adg_title_block_projection          (AdgTitleBlock *title_block);

Object Hierarchy

  GObject
   +----GInitiallyUnowned
         +----AdgEntity
               +----AdgTable
                     +----AdgTitleBlock

Properties

  "author"                   gchar*                : Read / Write
  "date"                     gchar*                : Read / Write
  "drawing"                  gchar*                : Read / Write
  "logo"                     AdgEntity*            : Read / Write
  "projection"               AdgEntity*            : Read / Write
  "scale"                    gchar*                : Read / Write
  "size"                     gchar*                : Read / Write
  "title"                    gchar*                : Read / Write

Description

Title blocks are commonly used in technical drawings to include additional information not strictly related to physical dimensions, such as title, material of the represented part, special treatments, date and scale etc.

Actually this entity is only a place-holder: it will be implemented properly in a 0.6.x release, after having AdgToyTable in place.

Details

struct AdgTitleBlock

struct AdgTitleBlock;

All fields are privates and should not be used directly. Use its public methods instead.

Since 1.0


struct AdgTitleBlockClass

struct AdgTitleBlockClass {
};

adg_title_block_new ()

AdgTitleBlock *     adg_title_block_new                 (void);

Creates a new empty title block entity.

Returns :

the newly created title block entity. [transfer full]

Since 1.0


adg_title_block_set_logo ()

void                adg_title_block_set_logo            (AdgTitleBlock *title_block,
                                                         AdgEntity *logo);

Sets a new logo on the title block. This function will add a reference to logo, removing the eventual reference held to the old logo, hence possibly destroying the old endity.

The space reserved for the logo is 56x56, so try to keep the new logo near this size or scale it accordingly.

title_block :

an AdgTitleBlock entity

logo :

the new logo

Since 1.0


adg_title_block_logo ()

AdgEntity *         adg_title_block_logo                (AdgTitleBlock *title_block);

Gets the logo bound to this title block. The returned object is owned by title_block and should not be unreferenced although can be freely modified.

title_block :

an AdgTitleBlock entity

Returns :

the logo or NULL on no logo or errors. [transfer none]

Since 1.0


adg_title_block_set_title ()

void                adg_title_block_set_title           (AdgTitleBlock *title_block,
                                                         const gchar *title);

Sets a new title on the title block.

title_block :

an AdgTitleBlock entity

title :

the new title

Since 1.0


adg_title_block_get_title ()

const gchar *       adg_title_block_get_title           (AdgTitleBlock *title_block);

Gets the descriptive title associated to this title block. The returned string is owned by title_block and should not be modifed or freed.

title_block :

an AdgTitleBlock entity

Returns :

the title or NULL on no title or errors. [transfer none]

Since 1.0


adg_title_block_set_drawing ()

void                adg_title_block_set_drawing         (AdgTitleBlock *title_block,
                                                         const gchar *drawing);

Sets a new drawing name on the title block.

title_block :

an AdgTitleBlock entity

drawing :

the new drawing name

Since 1.0


adg_title_block_get_drawing ()

const gchar *       adg_title_block_get_drawing         (AdgTitleBlock *title_block);

Gets the drawing name, commonly used to specify the file name. The returned string is owned by title_block and should not be modifed or freed.

title_block :

an AdgTitleBlock entity

Returns :

the drawing name or NULL on no name or errors. [transfer none]

Since 1.0


adg_title_block_set_size ()

void                adg_title_block_set_size            (AdgTitleBlock *title_block,
                                                         const gchar *size);

Sets a new size on the title block.

title_block :

an AdgTitleBlock entity

size :

the new size

Since 1.0


adg_title_block_get_size ()

const gchar *       adg_title_block_get_size            (AdgTitleBlock *title_block);

Gets the media size (a descriptive name) where this drawing will be printed. Usually contains something like "A4" or "Letter". The returned string is owned by title_block and should not be modifed or freed.

title_block :

an AdgTitleBlock entity

Returns :

the size or NULL on no size or errors. [transfer none]

Since 1.0


adg_title_block_set_scale ()

void                adg_title_block_set_scale           (AdgTitleBlock *title_block,
                                                         const gchar *scale);

Sets a new scale on the title block.

title_block :

an AdgTitleBlock entity

scale :

the new scale

Since 1.0


adg_title_block_get_scale ()

const gchar *       adg_title_block_get_scale           (AdgTitleBlock *title_block);

Gets the scale descriptive name of the drawing.

title_block :

an AdgTitleBlock entity

Returns :

the scale text or NULL on no scale or errors. [transfer none]

Since 1.0


adg_title_block_set_author ()

void                adg_title_block_set_author          (AdgTitleBlock *title_block,
                                                         const gchar *author);

Sets a new author on the title block.

title_block :

an AdgTitleBlock entity

author :

the new author

Since 1.0


adg_title_block_get_author ()

const gchar *       adg_title_block_get_author          (AdgTitleBlock *title_block);

Gets the author's name of the drawing.

title_block :

an AdgTitleBlock entity

Returns :

the author or NULL on no author or errors. [transfer none]

Since 1.0


adg_title_block_set_date ()

void                adg_title_block_set_date            (AdgTitleBlock *title_block,
                                                         const gchar *date);

Sets a new date on the title block. By default the date is set to NULL and it will be implicitely rendered using the preferred representation for the current local of the actual date. This is roughly equivalent to:

1
2
strftime(buffer, sizeof(buffer), "%x", now);
adg_title_block_set_date(title_block, buffer);

To not render any value, use an empty string as date.

title_block :

an AdgTitleBlock entity

date :

the new date

Since 1.0


adg_title_block_get_date ()

const gchar *       adg_title_block_get_date            (AdgTitleBlock *title_block);

Gets the date of the rendering set on title_block.

title_block :

an AdgTitleBlock entity

Returns :

the date or NULL on no date or errors. [transfer none]

Since 1.0


adg_title_block_set_projection ()

void                adg_title_block_set_projection      (AdgTitleBlock *title_block,
                                                         AdgEntity *projection);

Sets a new projection symbol on the title block. This function will add a reference to projection, removing the eventual reference held to the old symbol, hence possibly destroying the old endity.

The space reserved for the projection is 56x56, so try to keep the new projection near this size or scale it accordingly.

title_block :

an AdgTitleBlock entity

projection :

the new projection

Since 1.0


adg_title_block_projection ()

AdgEntity *         adg_title_block_projection          (AdgTitleBlock *title_block);

Gets the projection bound to this title block. The returned object is owned by title_block and should not be unreferenced although can be freely modified.

title_block :

an AdgTitleBlock entity

Returns :

the projection or NULL on no projection or errors. [transfer none]

Since 1.0

Property Details

The "author" property

  "author"                   gchar*                : Read / Write

Name and last name of the author of the drawing.

Default value: NULL


The "date" property

  "date"                     gchar*                : Read / Write

The date this drawing has been generated: setting it to an empty string will fallback to today in the preferred representation for the current locale.

Default value: NULL


The "drawing" property

  "drawing"                  gchar*                : Read / Write

The name of the drawing: the ADG canvas does not make any assumtpion on this text string.

Default value: NULL


The "logo" property

  "logo"                     AdgEntity*            : Read / Write

An entity to be displayed in the title block as the logo of the owner: the containing cell has a 1:1 ratio.


The "projection" property

  "projection"               AdgEntity*            : Read / Write

The entity usually reserved to identify the projection scheme adopted by this drawing.


The "scale" property

  "scale"                    gchar*                : Read / Write

The scale of the drawing, if it makes sense.

Default value: NULL


The "size" property

  "size"                     gchar*                : Read / Write

The media size to be used to print the drawing, usually something like "A3" or "Letter".

Default value: NULL


The "title" property

  "title"                    gchar*                : Read / Write

A descriptive title of the drawing.

Default value: NULL