efl/src/lib/elementary/efl_ui_alert_popup.eo

60 lines
2.2 KiB
Plaintext

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.]]
}
}
}
parts {
title : Efl.Ui.Alert_Popup_Part_Title; [[The title text of Alert Popup.]]
}
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.]]
}
}