summaryrefslogtreecommitdiff
path: root/src/lib/elementary/efl_ui_alert_popup.eo
blob: c154bb274605091fd01318e090ed7f91423fafb8 (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
enum Efl.Ui.Alert_Popup_Button {
   [[Defines the type of the alert button. @since 1.23]]
   positive = 0, [[Button having positive meaning. E.g. "Yes".]]
   negative, [[Button having negative meaning. E.g. "No".]]
   user [[Button having user-defined meaning. E.g. "More information".]]
}

struct Efl.Ui.Alert_Popup_Button_Clicked_Event {
   [[Information for @[Efl.Ui.Alert_Popup.button,clicked] event. @since 1.23]]
   button_type: Efl.Ui.Alert_Popup_Button; [[Clicked button type.]]
}

class Efl.Ui.Alert_Popup extends Efl.Ui.Popup
{
   [[A variant of @Efl.Ui.Popup which uses a layout containing a content object and
     a variable number of buttons (up to 3 total).

     An Alert_Popup is a popup which can be used when an application requires user interaction. It provides
     functionality for easily creating button objects on the popup and passing information about
     which button has been pressed to the button event callback.

     @since 1.23
   ]]
   methods {
      @property button {
         [[This property changes the text and icon for the specified button object.

           When set, the Alert_Popup will create a button for the specified type if it does not yet
           exist. The button's content and text will be set using the passed values.

           Exactly one button may exist for each @Efl.Ui.Alert_Popup_Button type. Repeated calls to
           set values for the same button type will overwrite previous values.

           By default, no buttons are created. Once a button is added to the Popup using this property
           it cannot be removed.
         ]]
         set {
         }
         keys {
            type: Efl.Ui.Alert_Popup_Button; [[Alert_Popup button type.]]
         }
         values {
            text: string; [[Text of the specified button type.]]
            icon: Efl.Canvas.Object; [[Visual to use as an icon for the specified button type.]]
         }
      }
   }
   implements {
      Efl.Object.constructor;
      Efl.Object.destructor;
      Efl.Part.part_get;
   }
   events {
      button,clicked: Efl.Ui.Alert_Popup_Button_Clicked_Event; [[Called when an Alert_Popup button was clicked.]]
   }
}