Text

Text

Synopsis




                    CcText;
                    CcTextClass;
CcItem*             cc_text_new                         (gchar const *text);
void                cc_text_set_anchor                  (CcText *self,
                                                         gdouble x,
                                                         gdouble y);
void                cc_text_set_anchor_type             (CcText *self,
                                                         GtkAnchorType anchor);
gcharconst*         cc_text_get_text                    (CcText const *self);
gboolean            cc_text_is_editable                 (CcText const *self);
void                cc_text_set_editable                (CcText *self,
                                                         gboolean editable);
void                cc_text_set_font_description        (CcText *self,
                                                         PangoFontDescription *desc);
void                cc_text_set_markup                  (CcText *self,
                                                         gchar const *markup);
void                cc_text_set_size_pixels             (CcText *self,
                                                         gboolean size_pixels);
void                cc_text_set_text                    (CcText *self,
                                                         gchar const *text);

Object Hierarchy


  GObject
   +----GInitiallyUnowned
         +----CcItem
               +----CcShape
                     +----CcText

Implemented Interfaces

CcText implements CcItemView.

Properties


  "anchor"                   GtkAnchorType         : Read / Write / Construct
  "brush-caret"              CcBrush               : Read / Write
  "cursor"                   gint                  : 
  "editable"                 gboolean              : Read / Write
  "size-pixels"              gboolean              : Read / Write
  "text"                     gchararray            : Read / Write

Description

Details

CcText

typedef struct _CcText CcText;


CcTextClass

typedef struct {
	CcShapeClass base_class;

	/* vtable */
	void (*remove) (CcText     * self,
			guint        offset,
			gsize        length);
	void (*insert) (CcText     * self,
			gchar const* text,
			gsize        offset);
} CcTextClass;


cc_text_new ()

CcItem*             cc_text_new                         (gchar const *text);

text :
Returns :

cc_text_set_anchor ()

void                cc_text_set_anchor                  (CcText *self,
                                                         gdouble x,
                                                         gdouble y);

self :
x :
y :

cc_text_set_anchor_type ()

void                cc_text_set_anchor_type             (CcText *self,
                                                         GtkAnchorType anchor);

self :
anchor :

cc_text_get_text ()

gcharconst*         cc_text_get_text                    (CcText const *self);

self :
Returns :

cc_text_is_editable ()

gboolean            cc_text_is_editable                 (CcText const *self);

self :
Returns :

cc_text_set_editable ()

void                cc_text_set_editable                (CcText *self,
                                                         gboolean editable);

self :
editable :

cc_text_set_font_description ()

void                cc_text_set_font_description        (CcText *self,
                                                         PangoFontDescription *desc);

Sets the font description to be used for rendering.

self : a CcText
desc : a PangoFontDescription

cc_text_set_markup ()

void                cc_text_set_markup                  (CcText *self,
                                                         gchar const *markup);

Set the markup displayed by this item.

self : a CcText
markup : the markup to be set

cc_text_set_size_pixels ()

void                cc_text_set_size_pixels             (CcText *self,
                                                         gboolean size_pixels);

Specify whether the text size is given in pixels. If it is, the text won't scale with the zoom level.

self : a Cctext
size_pixels : the value to be set

cc_text_set_text ()

void                cc_text_set_text                    (CcText *self,
                                                         gchar const *text);

Set the text to be displayed by a CcText item.

self : a CcText
text : the text to be set

Property Details

The "anchor" property

  "anchor"                   GtkAnchorType         : Read / Write / Construct

The location of the anchor point of the text element.

Default value: GTK_ANCHOR_NORTH_WEST


The "brush-caret" property

  "brush-caret"              CcBrush               : Read / Write

The brush used to paint the caret (text cursor).


The "cursor" property

  "cursor"                   gint                  : 

cursor.

Allowed values: [0,0]

Default value: 0


The "editable" property

  "editable"                 gboolean              : Read / Write

editable.

Default value: FALSE


The "size-pixels" property

  "size-pixels"              gboolean              : Read / Write

Specifies whether the given size is in pixels or in canvas units.

Default value: FALSE


The "text" property

  "text"                     gchararray            : Read / Write

The displayed text.

Default value: NULL