VisuPairWire

VisuPairWire — An interface defining all the properties required to draw a VisuPair as a wire.

Functions

Properties

ToolShade * shade Read / Write
guint stipple Read / Write
guint width Read / Write

Types and Values

Object Hierarchy

    GInterface
    ╰── VisuPairWire

Prerequisites

VisuPairWire requires GObject.

Known Implementations

VisuPairWire is implemented by VisuPairLink.

Description

VisuPairWire interface introduces the "width" property of a wire rendering, wether or not it should use a solid color or a ToolShade depending on its length...

Functions

visu_pair_wire_getDefaultWidth ()

guint
visu_pair_wire_getDefaultWidth ();

Retrieves the default width.

Returns

the default width.

Since: 3.8


visu_pair_wire_getDefaultStipple ()

guint16
visu_pair_wire_getDefaultStipple ();

Retrieves the default stipple pattern.

Returns

the default stipple pattern.

Since: 3.8


visu_pair_wire_setWidth ()

gboolean
visu_pair_wire_setWidth (VisuPairWire *data,
                         guint val);

This method allows to change the width of line for a specific pair. When a pair is rendered via with a line, it first checks if that pairs has a specific width value set by this method. If not, it uses the default value.

Parameters

data

a VisuPairWire object ;

 

val

a positive integer.

 

Returns

TRUE if the value is different from previous.


visu_pair_wire_getWidth ()

guint
visu_pair_wire_getWidth (VisuPairWire *data);

Get the width of the given pair data . If the given pair has no specific width, the defaul value is returned.

Parameters

data

a VisuPairWire object.

 

Returns

the width of the given pair.


visu_pair_wire_setShade ()

gboolean
visu_pair_wire_setShade (VisuPairWire *data,
                         ToolShade *shade);

If shade is not NULL, make the colour of each pair varies with its length according to shade colour scheme.

Parameters

data

a VisuPairWire object.

 

shade

a ToolShade object (can be NULL).

[allow-none]

Returns

TRUE if shade is changed.

Since: 3.6


visu_pair_wire_getShade ()

ToolShade *
visu_pair_wire_getShade (VisuPairWire *data);

Colour of wires can depend on length, following a ToolShade scheme.

Parameters

data

a VisuPairWire object.

 

Returns

the ToolShade scheme if used, or NULL.

[transfer none]

Since: 3.6


visu_pair_wire_setStipple ()

gboolean
visu_pair_wire_setStipple (VisuPairWire *data,
                           guint16 stipple);

Change the line pattern of data .

Parameters

data

a VisuPairWire object ;

 

stipple

a pattern.

 

Returns

TRUE if the value is different from previous.


visu_pair_wire_getStipple ()

guint16
visu_pair_wire_getStipple (VisuPairWire *data);

Get the line pattern of data .

Parameters

data

a VisuPairWire object.

 

Returns

a line pattern (default is 65535).

Types and Values

struct VisuPairWireInterface

struct VisuPairWireInterface {
  GTypeInterface parent;

  guint      (*get_width) (VisuPairWire *self);
  gboolean   (*set_width) (VisuPairWire *self, guint val);
  ToolShade* (*get_shade) (VisuPairWire *self);
  gboolean   (*set_shade) (VisuPairWire *self, ToolShade *val);
  guint16    (*get_stipple) (VisuPairWire *self);
  gboolean   (*set_stipple) (VisuPairWire *self, guint16 val);
};

Interface for class that can represent VisuPairLink as flat wires.

Members

GTypeInterface parent;

its parent.

 

get_width ()

a method to get the width.

 

set_width ()

a method to change the width of drawn wire VisuPairLink.

 

get_shade ()

a method to get the shading colourisation of a wire.

 

set_shade ()

a method to set if the wire should be coloured according to its length.

 

get_stipple ()

a method to get the stipple scheme.

 

set_stipple ()

a method to change the stipple scheme of drawn wire VisuPairLink.

 

Since: 3.8


VisuPairWire

typedef struct _VisuPairWire VisuPairWire;

Interface object.

Since: 3.8

Property Details

The “shade” property

  “shade”                    ToolShade *

wire shade.

Flags: Read / Write


The “stipple” property

  “stipple”                  guint

wire stipple.

Flags: Read / Write

Allowed values: [1,65535]

Default value: 65535


The “width” property

  “width”                    guint

wire width.

Flags: Read / Write

Allowed values: [1,10]

Default value: 2