CpgLayoutable

CpgLayoutable — Interface for object layouting

Synopsis

struct              CpgLayoutableInterface;
void                cpg_layoutable_get_location         (CpgLayoutable *self,
                                                         gint *x,
                                                         gint *y);
void                cpg_layoutable_set_location         (CpgLayoutable *self,
                                                         gint x,
                                                         gint y);
gboolean            cpg_layoutable_get_has_location     (CpgLayoutable *self);
void                cpg_layoutable_set_has_location     (CpgLayoutable *self,
                                                         gboolean has_location);
gboolean            cpg_layoutable_supports_location    (CpgLayoutable *self);

Description

This interface can be implemented when an object can be layouted.

Details

struct CpgLayoutableInterface

struct CpgLayoutableInterface {
	GTypeInterface parent;

	void (*get_location) (CpgLayoutable *layoutable,
	                          gint          *x,
	                          gint          *y);

	void (*set_location) (CpgLayoutable *layoutable,
	                      gint           x,
	                      gint           y);

	gboolean (*supports_location) (CpgLayoutable *layoutable);

	gboolean (*get_has_location) (CpgLayoutable *layoutable);
	void (*set_has_location) (CpgLayoutable *layoutable,
	                          gboolean       has_location);
};


cpg_layoutable_get_location ()

void                cpg_layoutable_get_location         (CpgLayoutable *self,
                                                         gint *x,
                                                         gint *y);

Get the location of the layoutable.

x :

x. [out]

y :

y. [out]

cpg_layoutable_set_location ()

void                cpg_layoutable_set_location         (CpgLayoutable *self,
                                                         gint x,
                                                         gint y);

Set the location of the layoutable.

x :

x

y :

y

cpg_layoutable_get_has_location ()

gboolean            cpg_layoutable_get_has_location     (CpgLayoutable *self);


cpg_layoutable_set_has_location ()

void                cpg_layoutable_set_has_location     (CpgLayoutable *self,
                                                         gboolean has_location);


cpg_layoutable_supports_location ()

gboolean            cpg_layoutable_supports_location    (CpgLayoutable *self);

Whether the layoutable supports a location.

Returns :

TRUE if the layoutable supports location, FALSE otherwise