summaryrefslogtreecommitdiff
path: root/src/lib/elm_settingspane_item.eo
blob: 296d344306ce08700ac81255d7f8e14e169a0dd4 (plain) (blame)
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
class Elm_Settingspane_Item(Eo.Base){
      eo_prefix: elm_obj_settingspane_item;
      data: Elm_Settingspane_Item_Data;
      properties {
           name {
               get {
                  /*@
                  Returns the name of the item

                  This will return the name which was passed at the creation via append_item or item_append_relative
                  This is the string displayed in the item.

                  @return The name of the item

                  @ingroup Settingspane
                  */
               }
               values {
                 const (char) *name;
               }
           }
           description{
               set {
                 /*@
                 Will set the desrciption for the item.

                 It will be displayed when you hover the item.
                 @ingroup Settingspane
                 */
               }
               get {
                 /*@
                 Return the description of the item

                 This will return the description which was passed at the creation via
                 append_item or item_append_relative.
                 This is the string displayed lower of the name.

                 @return The description of the item
                 @ingroup Settingspane
                 */
               }
               values {
                 const (char) *description;
               }
           }
           image {
             set {
             }
             get {
             }
             values {
               const (char) *file;
               const (char) *group;
             }
           }
           parent {
               get {
                 /*@
                 Returns the parent of this item

                 This will return the parent item of this item. If there is none it will return NULL.

                 @return The Elm_Settingspane_Item of the parent.
                 @ingroup Settingspane
                 */
               }
               values {
                 const (Elm_Settingspane_Item) *par;
               }
           }
           changed {
            /*
             * This will mark this item internally as changed,
             * the apply button will be enabled, and the item cannot be poped from stack anymore.
             * This can be undo if the user clicks the apply or reset button.
             */
             get {
               /*@
               Returns the changed flag

               This returns the changed flag of this Item.

               The changed flag controls the enable/disable of the apply and reset buttons,
               and controls if the panel can be closed.

               If this flag is set the apply and reset buttons are enabled, a click on them will
               result in the callbacks to the panel.
               If someone tryes to close this panel while there are unsaved changes,
               the panel will be highlighted with an error.

               @return EINA_TRUE if the flag is set, EINA_FALSE if not
               @ingroup Settingspane
               */
             }
             set {
               /*@
               Set the chagned flag

               This will set the changed flag for this item.

               The changed flag controls the enable/disable of the apply and reset buttons,
               and controls if the panel can be closed.

               If this flag is set the apply and reset buttons are enabled, a click on them will
               result in the callbacks to the panel.
               If someone tryes to close this panel while there are unsaved changes,
               the panel will be highlighted with an error.

               @note if this item doesnt have a attached panel settings this is useless

               @ingroup Settingspane
               */
             }
             values {
               Eina_Bool changed; /*@ set this item to changed*/
             }
          }
          keywords {
             get {
               /*@
               Returns the keywords
               @ingroup Settingspane
               */
             }
             set {
               /*@
               Set the keywords

               This is the string for the search of a item

               The string should be from the form word[,word2]
               The value of the searchentry will be compared against the values seperated by a ","

               @ingroup Settingspane
               */
             }
             values {
               char *word; /*@ set the current keywords to look up */
             }
          }
     }
      methods {
        realize {
          /*@
          This will realize this item, means display it if it does not exists yet, or raise it
          */
        }
        unrealize {
          /*@
          Will delete or just hide this item depending if there are unsaved changes or not
          */
        }
        attach_panel {
          /*@
          Attach a panel to the item

          This will attach a panel to this item.

          Attaching a panel means if this items gets focused this panel will be shown.

          The callback content_get is just called if this item gets displayed.
          If it was closed once and opened another time the callback will be called a second time.

          reset and apply are called when the apply or reset button is clicked.

          @note The panel can just be attached if this node doenst have childs.
          @note Once the panel has a panel it cannot be used as a parent node anymore.

          @ingroup Settingspane
           */
           params {
             @in Content_Get_Cb content_get; /*@ Callback to call when the content is requested
                                                 Each time the panel is selected content is requested with the content_cb,
                                                 If the content is changed the old Evas_Object will be saved and displayed next time the item is selected. */
             @in Evas_Smart_Cb reset; /*@ Callback to call when the reset button is clicked */
             @in Evas_Smart_Cb apply; /*@ Callback to call when the apply button is clicked */
           }
        }
        focus {
          /*@
          Focus this item

          This will focus the item in the widget, this means its children will be displayed in the menu,
          or the attached panel will be shown, this item will be the highest on the stack.

          @ingroup Settingspane
          */
        }
        delete {
          /*@
          Delete this item

          This will delete this item from the widget.

          If there are children they will also be deleted.
          If the parent of this item is just diplayed it will be refreshed and show
          the state after this item is deleted.
          If this item is the current focused item the stack will go back to a not deleted item.

          @ingroup Settingspane
          */
        }
      }
  implements {
     Eo.Base.destructor;
   }
}