summaryrefslogtreecommitdiff
path: root/src/lib/elementary/efl_ui_collection_view.eo
blob: 330c95693ce7a45efdc24f28118992d6b6b761b8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
class Efl.Ui.Collection_View extends Efl.Ui.Layout_Base implements
                Efl.Ui.Layout_Orientable,
                Efl.Ui.Focus.Manager_Sub,
                Efl.Ui.Widget_Focus_Manager,
                Efl.Ui.Item_Clickable
    composites Efl.Ui.Scrollable, Efl.Ui.Scrollbar, Efl.Ui.Multi_Selectable_Async, Efl.Ui.Single_Selectable
{
   [[This widget displays a list of items in an arrangement controlled by an external @.position_manager
     object. By using different @.position_manager objects this widget can show unidimensional lists or
     two-dimensional grids of items, for example.

     This class is intended to act as a base for widgets like List_View or @Efl.Ui.Grid_View,
     which hide this complexity from the user.

     Items are generated by the @Efl.Ui.Factory defined with .factory.set to match the content of the
     @Efl.Model defined with @Efl.Ui.View.model.set. They are dynamically created/destroyed to only have
     the one that are necessary to display all the one that are to far out of the viewport will not be
     created to lighten the usage for very large list.

     The direction of the arrangement can be controlled through @Efl.Ui.Layout_Orientable.orientation.

     If all items do not fit in the current widget size scrolling facilities are provided.

     Items inside this widget can be selected according to the @Efl.Ui.Multi_Selectable_Async.select_mode
     policy, and the selection can be retrieved with @Efl.Ui.Multi_Selectable_Async.selected_iterator_new.

     @since 1.23
   ]]
   methods {
      @property factory {
         [[Define the factory used to create all the items.]]
         get {}
         set {}
         values {
            factory: Efl.Ui.Factory; [[The factory.]]
         }
      }
      @property position_manager @beta {
        [[Position manager object that handles placement of items.]]
        values {
           position_manager : Efl.Ui.Position_Manager.Entity @move; [[The objects ownership is passed to the item container.]]
        }
      }
   }
   implements {
      Efl.Object.constructor;
      Efl.Object.invalidate;

      Efl.Ui.Layout_Orientable.orientation { get; set; }

      Efl.Ui.Widget.theme_apply;

      Efl.Ui.Scrollable.match_content { set; }
      Efl.Ui.Widget_Focus_Manager.focus_manager_create;
      Efl.Ui.Focus.Manager.move;
      Efl.Ui.Widget.focus_state_apply;
   }
   events {
      item,realized : Efl.Ui.Item; [[Event triggered when an @Efl.Ui.Item has been provided by the @Efl.Ui.Factory and is about to be used.]]
      item,unrealized : Efl.Ui.Item; [[Event triggered when the @Efl.Ui.Collection_View is about to give an @Efl.Ui.Item back to the @Efl.Ui.Factory.]]
   }
}