Class Efl.Canvas.Group
A group object is a container for other canvas objects. Its children move along their parent and are often clipped with a common clipper. This is part of the legacy smart object concept. A group is not necessarily a container (see Efl.IContainer) in the sense that a standard widget may not have any empty slots for content. However it's still a group of low-level canvas objects (clipper, raw objects, etc.). (Since EFL 1.22)
Inheritance
Syntax
public class Group : Object, IPointer, IColor, IEntity, IHint, IMapping, IStack, IInterface, IWrapper, IDisposable
Constructors
Group(EoWrapper.ConstructingHandle)
Subclasses should override this constructor if they are expected to be instantiated from native code. Do not call this constructor directly.
Declaration
protected Group(EoWrapper.ConstructingHandle ch)
Parameters
Type | Name | Description |
---|---|---|
Efl.Eo.EoWrapper.ConstructingHandle | ch | Tag struct storing the native handle of the object being constructed. |
Group(Object)
Initializes a new instance of the Efl.Canvas.Group class.
Declaration
public Group(Object parent = null)
Parameters
Type | Name | Description |
---|---|---|
Efl.Object | parent | Parent instance. |
Group(IntPtr, Object)
Initializes a new instance of the Efl.Canvas.Group class. Internal usage: Constructor to forward the wrapper initialization to the root class that interfaces with native code. Should not be used directly.
Declaration
protected Group(IntPtr baseKlass, Object parent)
Parameters
Type | Name | Description |
---|---|---|
System.IntPtr | baseKlass | The pointer to the base native Eo class. |
Efl.Object | parent | The Efl.Object parent of this instance. |
Properties
GroupClipper
The internal clipper object used by this group. This is the object clipping all the child objects. Do not delete or otherwise modify this clipper! (Since EFL 1.22)
Declaration
protected Object GroupClipper { get; }
Property Value
Type | Description |
---|---|
Efl.Canvas.Object | A clipper rectangle. |
GroupNeedRecalculate
Indicates that the group's layout needs to be recalculated. If this flag is set, then the Efl.Canvas.Group.CalculateGroup() function will be called, during rendering phase of the canvas. After that, this flag will be automatically unset.
Note: setting this flag alone will not make the canvas' whole scene dirty. Using evas_render() will have no effect. To force this, use Efl.Canvas.Group.GroupChange(), which will also call this function automatically, with the parameter set to true
.
See also Efl.Canvas.Group.CalculateGroup(). (Since EFL 1.22)
Declaration
public bool GroupNeedRecalculate { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
Methods
AddGroupMember(Object)
Set a canvas object as a member of a given group (or smart object). Members will automatically be stacked and layered together with the smart object. The various stacking functions will operate on members relative to the other members instead of the entire canvas, since they now live on an exclusive layer (see Efl.Gfx.IStack.StackAbove(Efl.Gfx.IStack), for more details).
Subclasses inheriting from this one may override this function to ensure the proper stacking of special objects, such as clippers, event rectangles, etc...
See also Efl.Canvas.Group.RemoveGroupMember(Efl.Canvas.Object). See also Efl.Canvas.Group.IsGroupMember(Efl.Canvas.Object). (Since EFL 1.22)
Declaration
public virtual void AddGroupMember(Object sub_obj)
Parameters
Type | Name | Description |
---|---|---|
Efl.Canvas.Object | sub_obj | The member object. |
CalculateGroup()
Triggers an immediate recalculation of this object's geometry. This will also reset the flag Efl.Canvas.Group.GroupNeedRecalculate. (Since EFL 1.22)
Declaration
public virtual void CalculateGroup()
GetGroupClipper()
Get the internal clipper. (Since EFL 1.22)
Declaration
protected virtual Object GetGroupClipper()
Returns
Type | Description |
---|---|
Efl.Canvas.Object | A clipper rectangle. |
GetGroupNeedRecalculate()
Indicates that the group's layout needs to be recalculated. If this flag is set, then the Efl.Canvas.Group.CalculateGroup() function will be called, during rendering phase of the canvas. After that, this flag will be automatically unset.
Note: setting this flag alone will not make the canvas' whole scene dirty. Using evas_render() will have no effect. To force this, use Efl.Canvas.Group.GroupChange(), which will also call this function automatically, with the parameter set to true
.
See also Efl.Canvas.Group.CalculateGroup(). (Since EFL 1.22)
Declaration
public virtual bool GetGroupNeedRecalculate()
Returns
Type | Description |
---|---|
System.Boolean |
|
GroupChange()
Marks the object as dirty. This also forcefully marks the given object as needing recalculation. As an effect, on the next rendering cycle its Efl.Canvas.Group.CalculateGroup() method will be called. (Since EFL 1.22)
Declaration
public virtual void GroupChange()
IsGroupMember(Object)
Finds out if a given object is a member of this group. (Since EFL 1.22)
Declaration
public virtual bool IsGroupMember(Object sub_obj)
Parameters
Type | Name | Description |
---|---|---|
Efl.Canvas.Object | sub_obj | A potential sub object. |
Returns
Type | Description |
---|---|
System.Boolean |
|
IterateGroupMembers()
Returns an iterator over the children of this object, which are canvas objects. This returns the list of "smart" children. This might be different from both the Efl.Object children list as well as the Efl.IContainer content list. (Since EFL 1.22)
Declaration
public virtual Iterator<Object> IterateGroupMembers()
Returns
Type | Description |
---|---|
Eina.Iterator<Efl.Canvas.Object> | Iterator to object children |
OnMemberAddedEvent(GroupMemberAddedEventArgs)
Method to raise event MemberAddedEvent.
Declaration
public void OnMemberAddedEvent(GroupMemberAddedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
Efl.Canvas.GroupMemberAddedEventArgs | e | Event to raise. |
OnMemberRemovedEvent(GroupMemberRemovedEventArgs)
Method to raise event MemberRemovedEvent.
Declaration
public void OnMemberRemovedEvent(GroupMemberRemovedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
Efl.Canvas.GroupMemberRemovedEventArgs | e | Event to raise. |
RemoveGroupMember(Object)
Removes a member object from a given smart object. This removes a member object from a smart object, if it was added to any. The object will still be on the canvas, but no longer associated with whichever smart object it was associated with.
See also Efl.Canvas.Group.AddGroupMember(Efl.Canvas.Object). See also Efl.Canvas.Group.IsGroupMember(Efl.Canvas.Object). (Since EFL 1.22)
Declaration
public virtual void RemoveGroupMember(Object sub_obj)
Parameters
Type | Name | Description |
---|---|---|
Efl.Canvas.Object | sub_obj | The member object to remove. |
SetGroupNeedRecalculate(Boolean)
Indicates that the group's layout needs to be recalculated. If this flag is set, then the Efl.Canvas.Group.CalculateGroup() function will be called, during rendering phase of the canvas. After that, this flag will be automatically unset.
Note: setting this flag alone will not make the canvas' whole scene dirty. Using evas_render() will have no effect. To force this, use Efl.Canvas.Group.GroupChange(), which will also call this function automatically, with the parameter set to true
.
See also Efl.Canvas.Group.CalculateGroup(). (Since EFL 1.22)
Declaration
public virtual void SetGroupNeedRecalculate(bool value)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | value |
|
Events
MemberAddedEvent
Called when a member is added to the group. (Since EFL 1.22)
Declaration
public event EventHandler<GroupMemberAddedEventArgs> MemberAddedEvent
Event Type
Type | Description |
---|---|
System.EventHandler<Efl.Canvas.GroupMemberAddedEventArgs> |
MemberRemovedEvent
Called when a member is removed from the group. (Since EFL 1.22)
Declaration
public event EventHandler<GroupMemberRemovedEventArgs> MemberRemovedEvent
Event Type
Type | Description |
---|---|
System.EventHandler<Efl.Canvas.GroupMemberRemovedEventArgs> |