-
Notifications
You must be signed in to change notification settings - Fork 277
SimpleEffectDialog Reference
The SimpleEffectDialog
class will automatically generate a dialog for your effect based on the fields in the effect's EffectData
.
TODO
TODO
TODO
For int
or double
properties, a slider widget will be created. You can use the MinimumValue
and MaximumValue
attributes to control the range of the slider, and the IncrementValue
attribute to specify the step size of the slider. For double
, you can also use the DigitsValue
attribute to control the number of decimal places.
public class MyEffectData : EffectData
{
[MinimumValue(1), MaximumValue(5)]
public int IntegerValue = 2;
[DigitsValue(3), IncrementValue(0.1)]
public double DoubleValue = 1.0;
};
If an int
property is named "Seed"
, it will create a "Reseed" button instead of a slider. Use this if your effect requires a random value.
public class MyEffectData : EffectData
{
public int Seed;
};
If a double
property is named "Angle"
or "Rotation"
, an angle picker will be created instead of a slider.
public class MyEffectData : EffectData
{
public double Angle;
public double Rotation;
};
For bool
properties, a checkbox will be created.
public class MyEffectData : EffectData
{
public bool Invert;
};
For Gdk.Point
properties, a widget will be created that allows the user to specify the coordinates of a point on the canvas.
public class MyEffectData : EffectData
{
public Gdk.Point Point;
};
For Cairo.PointD
properties, a widget will be created that allows the user to specify an offset from the center of the canvas. The coordinates will be normalized, so that (-1, -1)
is the top left corner and (1, 1)
is the bottom right corner.
public class MyEffectData : EffectData
{
public Cairo.PointD Offset;
};
TODO