![]() |
![]() |
![]() |
DiaCanvas2 Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Properties | Signals |
DiaVariableDiaVariable — Variable value objects used by DiaSolver. |
#define DIA_VARIABLE (obj) struct DiaVariable; DiaVariable * dia_variable_new (void
); gdouble dia_variable_get_value (DiaVariable *var
); void dia_variable_set_value (DiaVariable *var
,gdouble value
); DiaStrength dia_variable_get_strength (DiaVariable *var
); void dia_variable_set_strength (DiaVariable *var
,DiaStrength strength
);
Variables hold values that can be changed by the constraint solver. Every variable is assigned a strength. The weakest variables are most likely to change if the solver starts resolving the constraints.
#define DIA_VARIABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DIA_TYPE_VARIABLE, DiaVariable))
DiaVariable * dia_variable_new (void
);
Create a new variable.
Returns : |
a newly-created variable. |
gdouble dia_variable_get_value (DiaVariable *var
);
Get the value of the variable.
void dia_variable_set_value (DiaVariable *var
,gdouble value
);
Set the value for the variable.
DiaStrength dia_variable_get_strength (DiaVariable *var
);
Retrieve the strength of variable var
.
Returns : |
Return the strength of the variable. |
void dia_variable_set_strength (DiaVariable *var
,DiaStrength strength
);
Set the strength of the variable. Stronger variables are less likely to change if they are used in a DiaConstraint.
"strength"
property"strength" DiaStrength : Read / Write
Strength of the variable.
Default value: DIA_STRENGTH_WEAK
"changed"
signalvoid user_function (DiaVariable *diavariable,
gpointer user_data) : Run Last
Notify the outer world that the value has changed.
|
the object which received the signal. |
|
user data set when the signal handler was connected. |
"changed-internal"
signalvoid user_function (DiaVariable *diavariable,
gpointer user_data) : Run Last
Changed signal used only inside the constraint solver. You should not connect to it.
|
the object which received the signal. |
|
user data set when the signal handler was connected. |