Implement defaults for some interface methods

This commit is contained in:
Jesse van den Kieboom 2013-07-03 16:38:46 +02:00
parent 5c1b7f9f0a
commit dfc12858f9
2 changed files with 19 additions and 5 deletions

View file

@ -33,7 +33,9 @@ public interface Activity : Object, UIElement
* Method called to reload the activity.
*
*/
public abstract void reload();
public virtual void reload()
{
}
/**
* Whether the activity is the default for the specified action.
@ -44,7 +46,10 @@ public interface Activity : Object, UIElement
* %FALSE otherwise.
*
*/
public abstract bool is_default_for(string action);
public virtual bool is_default_for(string action)
{
return false;
}
}
}

View file

@ -74,7 +74,10 @@ public interface UIElement : Object
* element is not available, it will not be shown.
*
*/
public abstract bool available { get; }
public virtual bool available
{
get { return true; }
}
/**
* Check whether the ui element is enabled in the current application state.
@ -83,7 +86,10 @@ public interface UIElement : Object
* element is enabled (sensitive) given the current state of the application.
*
*/
public abstract bool enabled { get; }
public virtual bool enabled
{
get { return true; }
}
/**
* Negotiate the order with another UIElement.
@ -96,7 +102,10 @@ public interface UIElement : Object
* unimportant.
*
*/
public abstract int negotiate_order(UIElement other);
public virtual int negotiate_order(UIElement other)
{
return -1;
}
/**
* Activate the UIELement.