![]() |
![]() |
![]() |
adg-1 reference manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Properties |
#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
);
"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
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.
struct AdgTitleBlock;
All fields are privates and should not be used directly. Use its public methods instead.
Since 1.0
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
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.
|
an AdgTitleBlock entity |
|
the new logo |
Since 1.0
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.
|
an AdgTitleBlock entity |
Returns : |
the logo or NULL on no logo or errors. [transfer none]
|
Since 1.0
void adg_title_block_set_title (AdgTitleBlock *title_block
,const gchar *title
);
Sets a new title on the title block.
|
an AdgTitleBlock entity |
|
the new title |
Since 1.0
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.
|
an AdgTitleBlock entity |
Returns : |
the title or NULL on no title or errors. [transfer none]
|
Since 1.0
void adg_title_block_set_drawing (AdgTitleBlock *title_block
,const gchar *drawing
);
Sets a new drawing name on the title block.
|
an AdgTitleBlock entity |
|
the new drawing name |
Since 1.0
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.
|
an AdgTitleBlock entity |
Returns : |
the drawing name or NULL on no name or errors. [transfer none]
|
Since 1.0
void adg_title_block_set_size (AdgTitleBlock *title_block
,const gchar *size
);
Sets a new size on the title block.
|
an AdgTitleBlock entity |
|
the new size |
Since 1.0
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.
|
an AdgTitleBlock entity |
Returns : |
the size or NULL on no size or errors. [transfer none]
|
Since 1.0
void adg_title_block_set_scale (AdgTitleBlock *title_block
,const gchar *scale
);
Sets a new scale on the title block.
|
an AdgTitleBlock entity |
|
the new scale |
Since 1.0
const gchar * adg_title_block_get_scale (AdgTitleBlock *title_block
);
Gets the scale descriptive name of the drawing.
|
an AdgTitleBlock entity |
Returns : |
the scale text or NULL on no scale or errors. [transfer none]
|
Since 1.0
void adg_title_block_set_author (AdgTitleBlock *title_block
,const gchar *author
);
Sets a new author on the title block.
|
an AdgTitleBlock entity |
|
the new author |
Since 1.0
const gchar * adg_title_block_get_author (AdgTitleBlock *title_block
);
Gets the author's name of the drawing.
|
an AdgTitleBlock entity |
Returns : |
the author or NULL on no author or errors. [transfer none]
|
Since 1.0
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
.
|
an AdgTitleBlock entity |
|
the new date |
Since 1.0
const gchar * adg_title_block_get_date (AdgTitleBlock *title_block
);
Gets the date of the rendering set on title_block
.
|
an AdgTitleBlock entity |
Returns : |
the date or NULL on no date or errors. [transfer none]
|
Since 1.0
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.
|
an AdgTitleBlock entity |
|
the new projection |
Since 1.0
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.
|
an AdgTitleBlock entity |
Returns : |
the projection or
NULL on no projection or errors. [transfer none]
|
Since 1.0
"author"
property "author" gchar* : Read / Write
Name and last name of the author of the drawing.
Default value: NULL
"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
"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
"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.
"projection"
property"projection" AdgEntity* : Read / Write
The entity usually reserved to identify the projection scheme adopted by this drawing.
"scale"
property "scale" gchar* : Read / Write
The scale of the drawing, if it makes sense.
Default value: NULL
"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