<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<control xmlns="http://www.sap.com/sap.ui.library.xsd">
    <name>ToolPopup</name>
    <derived/>
    <author>SAP SE</author>
    <documentation>A popup which the user can open from the Shell's tool pane. Generally, the starting point would be an icon.
For this pop up, buttons can be defined with any text; therefore, it has the same purpose
and similar look like any common dialog box.
A ToolPopup can have any content. Depending on the application type and design, the structure
of the texts and input fields can be for example form-like.</documentation>
    <deprecation since="1.38">Instead, use the &lt;code&gt;sap.m.Popover&lt;/code&gt; control.</deprecation>
    <baseType>sap.ui.core/Control</baseType>
    <properties>
        <property name="title" type="sap.ui.core/string" group="Misc">
            <documentation>Determines the title displayed in the pop up window</documentation>
        </property>
        <property name="icon" type="sap.ui.core/URI" group="Misc">
            <documentation>This property is relevant for Shell use:
The URL to the icon displayed in the tool area which is used to open the ToolPopup.
The recommended size is 32x32px, including some transparent border. Therefore,
the content will cover about 20x20px.</documentation>
        </property>
        <property name="iconHover" type="sap.ui.core/URI" group="Misc">
            <documentation>This property is relevant for Shell use:
The URL to the icon in hover state, displayed in the tool area which is used to open the popup.</documentation>
        </property>
        <property name="iconSelected" type="sap.ui.core/URI" group="Misc">
            <documentation>This property is relevant for Shell use:
The URL to the icon in selected state displayed in the tool area which is used to open the popup.
If no selected icon is given, the hover icon is used.</documentation>
        </property>
        <property name="modal" type="sap.ui.core/boolean" defaultValue="false" group="Behavior">
            <documentation>Specifies whether the popup is modal and blocks any user-interaction with controls in the background.
Changing this property while the ToolPopup is open will not have any effect.
Please don't use "modal" and "autoclose" at the same time. In this case a warning will
be prompted to the console and "autoclose" won't be used.</documentation>
        </property>
        <property name="inverted" type="sap.ui.core/boolean" defaultValue="true" group="Misc" since="1.11.1">
            <documentation>Specifies whether the ToolPopup has a dark or bright background. If set to true
the background and borders will be dark. If false they will be bright.
This property only has an effect for the GoldReflection-theme.</documentation>
        </property>
        <property name="autoClose" type="sap.ui.core/boolean" defaultValue="false" group="Misc" since="1.13.2">
            <documentation>Determines whether the ToolPopup will auto close when it loses focus.
If the user e.g. clicks outside of the ToolPopup it will be closed.
Please don't use "modal" and "autoclose" at the same time.
In this case a warning will be prompted to the console and "autoclose" won't be used.</documentation>
        </property>
        <property name="maxHeight" type="sap.ui.core/CSSSize" group="Misc" since="1.13.2">
            <documentation>Forces a maximum height of the ToolPopup in pixels. If the ToolPopup content
is higher than the ToolPopup, the content will be scrollable.</documentation>
        </property>
        <property name="maxWidth" type="sap.ui.core/CSSSize" group="Misc" since="1.15.0">
            <documentation>Forces a maximum width of the ToolPopup in pixels.</documentation>
        </property>
        <property name="openDuration" type="sap.ui.core/int" defaultValue="400" group="Misc" since="1.19.0">
            <documentation>Time in milliseconds for the open animation.</documentation>
        </property>
        <property name="closeDuration" type="sap.ui.core/int" defaultValue="400" group="Misc" since="1.19.0">
            <documentation>Time in milliseconds for the close animation.</documentation>
        </property>
    </properties>
    <events>
        <event name="open" allowPreventDefault="false">
            <documentation>Event is fired when the popup opens</documentation>
        </event>
        <event name="close" allowPreventDefault="true">
            <documentation>Event is fired when the popup closes because the user pressed Escape or the ToolPopup
Button in the Shell. This is called before the closing animation.</documentation>
        </event>
        <event name="enter" allowPreventDefault="false">
            <documentation>Event is fired whenever the user clicks the Enter or the Enter key inside the pop up</documentation>
            <parameters>
                <parameter name="originalEvent" type="sap.ui.core/object">
                    <documentation>The onsapenter event, received by the pop up</documentation>
                </parameter>
                <parameter name="originalSrcControl" type="sap.ui.core/Control">
                    <documentation>The control that was focused when the user pressed the Enter key (may be null)</documentation>
                </parameter>
            </parameters>
        </event>
        <event name="iconChanged" allowPreventDefault="false">
            <documentation>Event is fired when one of the icon properties is modified (Note: The icon is not
rendered by the ToolPopup).
To be used by other controls which want to update the icon in their UI.</documentation>
        </event>
        <event name="closed" allowPreventDefault="false">
            <documentation>This event is fired after the ToolPopup has finished its closing animation.
It is called for EVERY close, regardless of whether the user has triggered the
close or whether the ToolPopup was closed via API call.</documentation>
        </event>
        <event name="opened" since="1.19.0" allowPreventDefault="false">
            <documentation>Event is being fired after the ToolPopup has been opened.</documentation>
        </event>
    </events>
    <aggregations default="content">
        <aggregation name="buttons" type="sap.ui.core/Control" cardinality="0..n">
            <documentation>Defines the buttons to appear in the popup</documentation>
        </aggregation>
        <aggregation name="content" type="sap.ui.core/Control" cardinality="0..n">
            <documentation>Defines the content of the popup</documentation>
        </aggregation>
    </aggregations>
    <associations>
        <association name="initialFocus" type="sap.ui.core/Control" cardinality="0..1">
            <documentation>Defines the control that will get the focus when the ToolPopup is opened.</documentation>
        </association>
        <association name="opener" type="sap.ui.core/Control" cardinality="0..1">
            <documentation>This property is relevant for stand-alone use:
This association needs to be set if the ToolPopup should not be opened by/with
the Shell. This association contains the instance of the control that
assigns the ToolPopup's position.</documentation>
        </association>
        <association name="defaultButton" type="sap.ui.core/Control" cardinality="0..1" since="1.20.1">
            <documentation>Defines one of the buttons that have been provided via button aggregation to be
the default button. This default button is initially selected, if no control
is set via the initialFocus association explicitly. The default button is activated
when Enter is pressed in the context of the dialog and when the currently selected element
does not handle the Enter event itself.</documentation>
        </association>
    </associations>
    <methods>
        <method name="isOpen" type="sap.ui.core/boolean">
            <documentation>Indicates whether the pop up is currently open</documentation>
        </method>
        <method name="close" type="sap.ui.ux3/ToolPopup">
            <documentation>Closes the pop up.
Can be called by the Shell when the pop up's button is clicked again; or by the application
when the interaction in the pop up has been completed or canceled.</documentation>
            <parameters>
                <parameter name="preventRestoreFocus" type="sap.ui.core/boolean">
                    <documentation>If set, the focus is NOT restored to the element that had the focus before the ToolPopup was opened.</documentation>
                </parameter>
            </parameters>
        </method>
        <method name="getEnabled" type="sap.ui.core/boolean" since="1.13.1">
            <documentation>Indicates whether the ToolPopup is currently enabled or not.

Applications can't control the enabled state via a property. A ToolPopup is implicitly
enabled depending on its &lt;code&gt;openState&lt;/code&gt;. Descendant controls that honor the
enabled state of their ancestors will appear disabled after the ToolPopup is closed.

Since 1.13.1. Whether a dialog is regarded as "enabled" during the state transitions
(OPENING, CLOSING) is not fully decided. Currently, it is enabled during the OPENING phase
and disabled during the CLOSING phase. The only potential change would be to treat the
OPENING phase as disabled as well. Applications should be prepared to receive events from
"enabled" controls after they called open() on the dialog until close() is called on it.
If the mentioned potential change should happen, the dialog will become enabled only
after the transition to OPEN. Events from "enabled" children then can still only arrive
between open() and close(), so applications that obey the previous rule should continue
to work. Only end users or code that explicitly triggers pseudo user events would notice
a difference. &lt;br&gt;
A second aspect that might change is the visual behavior of the content: during the CLOSING
phase it 'looks' enabled but in fact it is already disabled. This avoids unnecessary redraws
for content that becomes hidden soon. Should this show to be confusing for end users, it might
be changed.</documentation>
        </method>
        <method name="setPosition">
            <documentation>Sets the position of the pop up, the same parameters as for sap.ui.core.Popup can be used.</documentation>
        </method>
        <method name="addFocusableArea" since="1.19.0">
            <documentation>Adds an ID to the Popup that should be focusable as well when using &lt;code&gt;autoclose&lt;/code&gt;.
Chaining is only possible if a valid type (string) is given.</documentation>
            <parameters>
                <parameter name="iD" type="sap.ui.core/string">
                    <documentation>ID of the corresponding element that should be focusable as well</documentation>
                </parameter>
            </parameters>
        </method>
        <method name="removeFocusableArea" since="1.19.0">
            <documentation>Removes an ID to the Popup that should be focusable as well when using &lt;code&gt;autoclose&lt;/code&gt;.
Chaining is only possible if a valid type (string) is given.</documentation>
            <parameters>
                <parameter name="iD" type="sap.ui.core/string">
                    <documentation>ID of the corresponding element</documentation>
                </parameter>
            </parameters>
        </method>
    </methods>
</control>
