RSS RSS

Navigation (HowTo)





Search the wiki
»

PoweredBy
BaseEffect Metadata
BaseEffect provides several methods that can be used to specify how your effect should be presented to the user.

Name

BaseEffect.Name is defined as:

public abstract string Name { get; }

As Name is abstract, every effect must implement it.

public override string Name { get { return "My Effect"; } }

Icon

BaseEffect.Icon is defined as:

public virtual string Icon { get { return "Menu.Effects.Default.png"; } }

That is, your effect will receive the default icon if you do not override Icon.

public override string Icon { get { return "MyEffectIcon.png"; } }

EffectMenuCategory

BaseEffect.EffectMenuCategory only affects effects, and not adjustments. It is defined as:

public virtual string EffectMenuCategory { get { return "General"; } }

If you do not override it, your effect will be placed in the default "General" category.

Pinta ships with the following categories:

  • Artistic
  • Blurs
  • Distort
  • General
  • Noise
  • Photo
  • Render
  • Stylize

It is highly recommended that you use one of the predefined categories, however there are some cases where it may be appropriate to use a custom menu category, like if your extension installs several related effects.

public override string EffectMenuCategory { get { return "Blurs"; } }

AdjustmentMenuKey

BaseEffect.AdjustmentMenuKey only affects adjustments, and not effects. It is defined as:

public virtual Gdk.Key AdjustmentMenuKey { get { return (Gdk.Key)0; } }

If you leave the default of "0", your adjustment will not receive a shortcut.

public override Gdk.Key AdjustmentMenuKey { get { return Gdk.Key.K; } }

AdjustmentMenuKeyModifiers

BaseEffect.AdjustmentMenuKeyModifiers only affects adjustments, and not effects. It is defined as:

public virtual Gdk.ModifierType AdjustmentMenuKeyModifiers
{
    get { return Gdk.ModifierType.ControlMask | Gdk.ModifierType.ShiftMask; }
}

If you leave the default, your modifiers will be Ctrl-Shift.

public override Gdk.ModifierType AdjustmentMenuKeyModifiers
{
    get { return Gdk.ModifierType.ControlMask; }
}

Last modified on Apr 01, 2011 23:07 by jpobst