Interface Efl.Ui.Focus.IManager
Interface for managing focus objects. This interface is built in order to support movement of the focus property in a set of widgets. The movement of the focus property can happen in a tree manner, or a graph manner. The movement is also keeping track of the history of focused elements. The tree interpretation differentiates between logical and regular widgets: Logical widgets (typically containers) cannot receive focus, whereas Regular ones (like buttons) can. (Since EFL 1.22)
Syntax
public interface IManager : IWrapper, IDisposable
Properties
BorderElements
Elements which are at the border of the graph. This means one of the relations right,left or down,up are not set. This call flushes all changes. See Efl.Ui.Focus.IManager.Move(Efl.Ui.Focus.Direction). (Since EFL 1.22)
Declaration
Iterator<IObject> BorderElements { get; }
Property Value
Type | Description |
---|---|
Eina.Iterator<Efl.Ui.Focus.IObject> | An iterator over the border objects. |
ManagerFocus
The element which is currently focused by this manager.
Use this property to retrieve the object currently being focused, or to set the focus to a new one. When focus
is a logical child (which cannot receive focus), the next regular object is selected instead. If there is no such object, focus does not change.
(Since EFL 1.22)
Declaration
IObject ManagerFocus { get; set; }
Property Value
Type | Description |
---|---|
Efl.Ui.Focus.IObject | Currently focused element. |
Redirect
Add another manager to serve the move requests.
If this value is set, all move requests are redirected to this manager object. Set it to null
once nothing should be redirected anymore.
(Since EFL 1.22)
Declaration
IManager Redirect { get; set; }
Property Value
Type | Description |
---|---|
Efl.Ui.Focus.IManager | The new focus manager. |
Root
Root node for all logical sub-trees. This property can only be set once. (Since EFL 1.22)
Declaration
IObject Root { get; set; }
Property Value
Type | Description |
---|---|
Efl.Ui.Focus.IObject | Object to register as the root of this manager object. |
Methods
DirtyLogicUnfreeze()
Enables the cache invalidation when an object is moved. This is the counterpart to Efl.Ui.Focus.IManager.FreezeDirtyLogic(). (Since EFL 1.22)
Declaration
void DirtyLogicUnfreeze()
FreezeDirtyLogic()
Disables the cache invalidation when an object is moved. Even if an object is moved, the focus manager will not recalculate its relations. This can be used when you know that the set of widgets in the focus manager is moved the same way, so the relations between the widgets in the set do not change and complex calculations can be avoided. Use Efl.Ui.Focus.IManager.DirtyLogicUnfreeze() to re-enable relationship calculation. (Since EFL 1.22)
Declaration
void FreezeDirtyLogic()
GetBorderElements()
Elements which are at the border of the graph. This means one of the relations right,left or down,up are not set. This call flushes all changes. See Efl.Ui.Focus.IManager.Move(Efl.Ui.Focus.Direction). (Since EFL 1.22)
Declaration
Iterator<IObject> GetBorderElements()
Returns
Type | Description |
---|---|
Eina.Iterator<Efl.Ui.Focus.IObject> | An iterator over the border objects. |
GetManagerFocus()
The element which is currently focused by this manager.
Use this property to retrieve the object currently being focused, or to set the focus to a new one. When focus
is a logical child (which cannot receive focus), the next regular object is selected instead. If there is no such object, focus does not change.
(Since EFL 1.22)
Declaration
IObject GetManagerFocus()
Returns
Type | Description |
---|---|
Efl.Ui.Focus.IObject | Currently focused element. |
GetRedirect()
Add another manager to serve the move requests.
If this value is set, all move requests are redirected to this manager object. Set it to null
once nothing should be redirected anymore.
(Since EFL 1.22)
Declaration
IManager GetRedirect()
Returns
Type | Description |
---|---|
Efl.Ui.Focus.IManager | The new focus manager. |
GetRoot()
Root node for all logical sub-trees. This property can only be set once. (Since EFL 1.22)
Declaration
IObject GetRoot()
Returns
Type | Description |
---|---|
Efl.Ui.Focus.IObject | Object to register as the root of this manager object. |
GetViewportElements(Rect)
Elements that are at the border of the viewport Every element returned by this is located inside the viewport rectangle, but has a right, left, down or up neighbor outside the viewport. (Since EFL 1.22)
Declaration
Iterator<IObject> GetViewportElements(Rect viewport)
Parameters
Type | Name | Description |
---|---|---|
Eina.Rect | viewport | The rectangle defining the viewport. |
Returns
Type | Description |
---|---|
Eina.Iterator<Efl.Ui.Focus.IObject> | An iterator over the viewport border objects. |
LogicalEnd()
Returns the last logical object. The returned object is the last object that would be returned if you start at the root and move in the "next" direction. (Since EFL 1.22)
Declaration
ManagerLogicalEndDetail LogicalEnd()
Returns
Type | Description |
---|---|
Efl.Ui.Focus.ManagerLogicalEndDetail | Last object. |
Move(Direction)
Moves the focus in the given direction to the next regular widget. This call flushes all changes. This means all changes since last flush are computed. (Since EFL 1.22)
Declaration
IObject Move(Direction direction)
Parameters
Type | Name | Description |
---|---|---|
Efl.Ui.Focus.Direction | direction | The direction to move to. |
Returns
Type | Description |
---|---|
Efl.Ui.Focus.IObject | The element which is now focused. |
MoveRequest(Direction, IObject, Boolean)
Returns the object in the direction
from child
.
(Since EFL 1.22)
Declaration
IObject MoveRequest(Direction direction, IObject child, bool logical)
Parameters
Type | Name | Description |
---|---|---|
Efl.Ui.Focus.Direction | direction | Direction to move focus. |
Efl.Ui.Focus.IObject | child | The child to move from. Pass |
System.Boolean | logical | Wether you want to have a logical node as result or a regular. Note that in a Efl.Ui.Focus.IManager.Move(Efl.Ui.Focus.Direction) call logical nodes will not get focus. |
Returns
Type | Description |
---|---|
Efl.Ui.Focus.IObject | Object that would receive focus if moved in the given direction. |
PopHistoryStack()
Removes the uppermost history element, and focuses the previous one. If there is an element that was focused before, it will be used. Otherwise, the best fitting element from the registered elements will be focused. (Since EFL 1.22)
Declaration
void PopHistoryStack()
RequestSubchild(IObject)
Returns the widget in the direction next.
The returned widget is a child of root
. It's guaranteed that child will not be prepared again, so you can call this function inside a Efl.Ui.Focus.IObject.SetupOrder() call.
(Since EFL 1.22)
Declaration
IObject RequestSubchild(IObject root)
Parameters
Type | Name | Description |
---|---|---|
Efl.Ui.Focus.IObject | root | Parent for returned child. |
Returns
Type | Description |
---|---|
Efl.Ui.Focus.IObject | Child of passed parameter. |
ResetHistory()
Resets the history stack of this manager object. This means the uppermost element will be unfocused, and all other elements will be removed from the remembered list. You should focus another element immediately after calling this, in order to always have a focused object. (Since EFL 1.22)
Declaration
void ResetHistory()
SetManagerFocus(IObject)
The element which is currently focused by this manager.
Use this property to retrieve the object currently being focused, or to set the focus to a new one. When focus
is a logical child (which cannot receive focus), the next regular object is selected instead. If there is no such object, focus does not change.
(Since EFL 1.22)
Declaration
void SetManagerFocus(IObject focus)
Parameters
Type | Name | Description |
---|---|---|
Efl.Ui.Focus.IObject | focus | Currently focused element. |
SetRedirect(IManager)
Add another manager to serve the move requests.
If this value is set, all move requests are redirected to this manager object. Set it to null
once nothing should be redirected anymore.
(Since EFL 1.22)
Declaration
void SetRedirect(IManager redirect)
Parameters
Type | Name | Description |
---|---|---|
Efl.Ui.Focus.IManager | redirect | The new focus manager. |
SetRoot(IObject)
Root node for all logical sub-trees. This property can only be set once. (Since EFL 1.22)
Declaration
bool SetRoot(IObject root)
Parameters
Type | Name | Description |
---|---|---|
Efl.Ui.Focus.IObject | root | Object to register as the root of this manager object. |
Returns
Type | Description |
---|---|
System.Boolean |
|
SetupOnFirstTouch(Direction, IObject)
Called when this manager is set as redirect.
In case that this is called as a result of a move call, direction
and entry
will be set to the direction of the move call, and the entry
object will be set to the object that had this manager as redirect property.
(Since EFL 1.22)
Declaration
void SetupOnFirstTouch(Direction direction, IObject entry)
Parameters
Type | Name | Description |
---|---|---|
Efl.Ui.Focus.Direction | direction | The direction in which this should be setup. |
Efl.Ui.Focus.IObject | entry | The object that caused this manager to be redirect. |
Events
CoordsDirtyEvent
Cached relationship calculation results have been invalidated. (Since EFL 1.22)
Declaration
event EventHandler CoordsDirtyEvent
Event Type
Type | Description |
---|---|
System.EventHandler |
DirtyLogicFreezeChangedEvent
Called when this focus manager is frozen or thawed, even_info being true
indicates that it is now frozen, false
indicates that it is thawed.
(Since EFL 1.22)
Declaration
event EventHandler<ManagerDirtyLogicFreezeChangedEventArgs> DirtyLogicFreezeChangedEvent
Event Type
Type | Description |
---|---|
System.EventHandler<Efl.Ui.Focus.ManagerDirtyLogicFreezeChangedEventArgs> |
FlushPreEvent
After this event, the manager object will calculate relations in the graph. Can be used to add / remove children in a lazy fashion. (Since EFL 1.22)
Declaration
event EventHandler FlushPreEvent
Event Type
Type | Description |
---|---|
System.EventHandler |
ManagerFocusChangedEvent
The manager_focus property has changed. The previously focused object is passed as an event argument. (Since EFL 1.22)
Declaration
event EventHandler<ManagerManagerFocusChangedEventArgs> ManagerFocusChangedEvent
Event Type
Type | Description |
---|---|
System.EventHandler<Efl.Ui.Focus.ManagerManagerFocusChangedEventArgs> |
RedirectChangedEvent
Redirect object has changed, the old manager is passed as an event argument. (Since EFL 1.22)
Declaration
event EventHandler<ManagerRedirectChangedEventArgs> RedirectChangedEvent
Event Type
Type | Description |
---|---|
System.EventHandler<Efl.Ui.Focus.ManagerRedirectChangedEventArgs> |