summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Hollerbach <marcel-hollerbach@t-online.de>2016-02-19 19:47:09 +0100
committerMarcel Hollerbach <marcel-hollerbach@t-online.de>2016-02-19 19:47:09 +0100
commit8673e7a1b89687570b2db2d77f692dd57a41dc01 (patch)
tree5cc229971fe9dd7622aa9af43b242d15a16b40ae
parent9fceae128e2f38cf2317c723c7def2ac4c49ad18 (diff)
added new interfaces
-rw-r--r--src/lib/elm_focus_manager.eo38
-rw-r--r--src/lib/elm_focusable.eo17
2 files changed, 55 insertions, 0 deletions
diff --git a/src/lib/elm_focus_manager.eo b/src/lib/elm_focus_manager.eo
new file mode 100644
index 000000000..f0b85cded
--- /dev/null
+++ b/src/lib/elm_focus_manager.eo
@@ -0,0 +1,38 @@
1interface Elm.Focus_Manager {
2 [[A focusable Object should register itself to the next available Focus_Manager.
3
4 The next Focus_Manager which is found up in the widget tree is used.
5
6 Container widgets can also implement this interface to set there own right left top bottom objects, they just have to redirect the call up the widget tree so the next focus_manager registers the object]]
7 methods {
8 register {
9 [[register a focusable object to a focusmanager.
10
11 If the given direction objects is $null the manager should try on its own to evaluate this direction.
12
13 if the given object is already regsitered the childs will be updated.
14 ]]
15 params {
16 object : Elm.Focus*; [[object to add to the graph]]
17 right : Elm.Focus*; [[Next focusable object for direction right]]
18 left : Elm.Focus*; [[Next focusable object for direction left]]
19 top : Elm.Focus*; [[Next focusable object for direction top]]
20 bottom : Elm.Focus*; [[Next focusable object for direction bottom]]
21 back : Elm.Focus*; [[Next focusable object for tab presses]]
22 forth : Elm.Focus*; [[Next focusable object for forth presses]]
23 }
24 }
25 register_simple {
26 [[registers a focusable object to this Focus_Manager without any presetted direction objects.]]
27 params {
28 object : Elm.Focus*;
29 }
30 }
31 unregister {
32 [[unregister a before registered widget]]
33 params {
34 object : Elm.Focus*;
35 }
36 }
37 }
38} \ No newline at end of file
diff --git a/src/lib/elm_focusable.eo b/src/lib/elm_focusable.eo
new file mode 100644
index 000000000..a31ffc727
--- /dev/null
+++ b/src/lib/elm_focusable.eo
@@ -0,0 +1,17 @@
1interface Elm.Focusable {
2 [[Implemented by objects which may be focusable]]
3 methods {
4 focusable {
5 [[returns true if this object is focusable]]
6 return : bool;
7 }
8 focus {
9 [[returnds if this object is currently focused]]
10 return : bool;
11 }
12 }
13 events {
14 focus,on; [[called when the focus is added to this object]]
15 focus,off; [[called when the focus is remved from this object]]
16 }
17}