Elementary: Add missing smart callbacks.
This commit is contained in:
parent
4da99fd7ce
commit
bd208f2233
|
@ -36,26 +36,27 @@ would have instantiating one directly.
|
|||
|
||||
The following styles are available for this button:
|
||||
|
||||
- ``"default"``
|
||||
- ``"anchor"``
|
||||
- ``"hoversel_vertical"``
|
||||
- ``"hoversel_vertical_entry"``
|
||||
- ``default``
|
||||
- ``anchor``
|
||||
- ``hoversel_vertical``
|
||||
- ``hoversel_vertical_entry``
|
||||
|
||||
This widget emits the following signals, besides the ones sent from
|
||||
:py:class:`~efl.elementary.button.Button`:
|
||||
|
||||
- ``"file,chosen"`` - the user has selected a path which comes as the
|
||||
- ``file,chosen`` - the user has selected a path which comes as the
|
||||
``event_info`` data
|
||||
- ``language,changed`` - the program's language changed
|
||||
|
||||
Default text parts of the fileselector_button widget that you can use for
|
||||
are:
|
||||
|
||||
- "default" - Label of the fileselector_button
|
||||
- ``default`` - Label of the fileselector_button
|
||||
|
||||
Default content parts of the fileselector_button widget that you can use
|
||||
for are:
|
||||
|
||||
- "icon" - Icon of the fileselector_button
|
||||
- ``icon`` - Icon of the fileselector_button
|
||||
|
||||
|
||||
"""
|
||||
|
@ -270,5 +271,15 @@ cdef class FileselectorButton(Button):
|
|||
def callback_file_chosen_del(self, func):
|
||||
self._callback_del_full("file,chosen", _cb_string_conv, func)
|
||||
|
||||
def callback_language_changed_add(self, func, *args, **kwargs):
|
||||
"""The program's language changed.
|
||||
|
||||
.. versionadded:: 1.8.1
|
||||
|
||||
"""
|
||||
self._callback_add("language,changed", func, *args, **kwargs)
|
||||
|
||||
def callback_language_changed_del(self, func):
|
||||
self._callback_del("language,changed", func)
|
||||
|
||||
_object_mapping_register("Elm_Fileselector_Button", FileselectorButton)
|
||||
|
|
|
@ -43,35 +43,36 @@ selector than that one would have instantiating one directly.
|
|||
|
||||
Smart callbacks one can register to:
|
||||
|
||||
- ``"changed"`` - The text within the entry was changed
|
||||
- ``"activated"`` - The entry has had editing finished and
|
||||
- ``changed`` - The text within the entry was changed
|
||||
- ``activated`` - The entry has had editing finished and
|
||||
changes are to be "committed"
|
||||
- ``"press"`` - The entry has been clicked
|
||||
- ``"longpressed"`` - The entry has been clicked (and held) for a
|
||||
- ``press`` - The entry has been clicked
|
||||
- ``longpressed`` - The entry has been clicked (and held) for a
|
||||
couple seconds
|
||||
- ``"clicked"`` - The entry has been clicked
|
||||
- ``"clicked,double"`` - The entry has been double clicked
|
||||
- ``"focused"`` - The entry has received focus
|
||||
- ``"unfocused"`` - The entry has lost focus
|
||||
- ``"selection,paste"`` - A paste action has occurred on the
|
||||
- ``clicked`` - The entry has been clicked
|
||||
- ``clicked,double`` - The entry has been double clicked
|
||||
- ``focused`` - The entry has received focus
|
||||
- ``unfocused`` - The entry has lost focus
|
||||
- ``selection,paste`` - A paste action has occurred on the
|
||||
entry
|
||||
- ``"selection,copy"`` - A copy action has occurred on the entry
|
||||
- ``"selection,cut"`` - A cut action has occurred on the entry
|
||||
- ``"unpressed"`` - The file selector entry's button was released
|
||||
- ``selection,copy`` - A copy action has occurred on the entry
|
||||
- ``selection,cut`` - A cut action has occurred on the entry
|
||||
- ``unpressed`` - The file selector entry's button was released
|
||||
after being pressed.
|
||||
- ``"file,chosen"`` - The user has selected a path via the file
|
||||
- ``file,chosen`` - The user has selected a path via the file
|
||||
selector entry's internal file selector, whose string
|
||||
comes as the ``event_info`` data.
|
||||
- ``language,changed`` - the program's language changed
|
||||
|
||||
Default text parts of the fileselector_button widget that you can use for
|
||||
are:
|
||||
|
||||
- "default" - Label of the fileselector_button
|
||||
- ``default`` - Label of the fileselector_button
|
||||
|
||||
Default content parts of the fileselector_entry widget that you can use for
|
||||
are:
|
||||
|
||||
- "button icon" - Button icon of the fileselector_entry
|
||||
- ``button icon`` - Button icon of the fileselector_entry
|
||||
|
||||
|
||||
"""
|
||||
|
@ -404,5 +405,15 @@ cdef class FileselectorEntry(LayoutClass):
|
|||
def callback_file_chosen_del(self, func):
|
||||
self._callback_del_full("file,chosen", _cb_string_conv, func)
|
||||
|
||||
def callback_language_changed_add(self, func, *args, **kwargs):
|
||||
"""The program's language changed.
|
||||
|
||||
.. versionadded:: 1.8.1
|
||||
|
||||
"""
|
||||
self._callback_add("language,changed", func, *args, **kwargs)
|
||||
|
||||
def callback_language_changed_del(self, func):
|
||||
self._callback_del("language,changed", func)
|
||||
|
||||
_object_mapping_register("Elm_Fileselector_Entry", FileselectorEntry)
|
||||
|
|
|
@ -45,25 +45,27 @@ Elementary has the following styles for the hover widget:
|
|||
This widget emits the following signals, besides the ones sent from
|
||||
:py:class:`~efl.elementary.layout_class.LayoutClass`:
|
||||
|
||||
- ``"clicked"`` - the user clicked the empty space in the hover to
|
||||
dismiss
|
||||
- ``"smart,changed"`` - a content object placed under the "smart"
|
||||
policy was replaced to a new slot direction.
|
||||
- ``clicked`` - the user clicked the empty space in the hover to
|
||||
dismiss.
|
||||
- ``dismissed`` - the user clicked the empty space in the hover to dismiss.
|
||||
(since 1.8)
|
||||
- ``smart,changed`` - a content object placed under the "smart"
|
||||
policy was replaced to a new slot direction.
|
||||
- ``focused`` - When the hover has received focus. (since 1.8)
|
||||
- ``unfocused`` - When the hover has lost focus. (since 1.8)
|
||||
|
||||
Default content parts of the hover widget that you can use for are:
|
||||
|
||||
- ``"left"``
|
||||
- ``"top-left"``
|
||||
- ``"top"``
|
||||
- ``"top-right"``
|
||||
- ``"right"``
|
||||
- ``"bottom-right"``
|
||||
- ``"bottom"``
|
||||
- ``"bottom-left"``
|
||||
- ``"middle"``
|
||||
- ``"smart"``
|
||||
- ``left``
|
||||
- ``top-left``
|
||||
- ``top``
|
||||
- ``top-right``
|
||||
- ``right``
|
||||
- ``bottom-right``
|
||||
- ``bottom``
|
||||
- ``bottom-left``
|
||||
- ``middle``
|
||||
- ``smart``
|
||||
|
||||
All directions may have contents at the same time, except for "smart".
|
||||
This is a special placement hint and its use case depends of the
|
||||
|
@ -222,6 +224,17 @@ cdef class Hover(LayoutClass):
|
|||
def callback_clicked_del(self, func):
|
||||
self._callback_del("clicked", func)
|
||||
|
||||
def callback_dismissed_add(self, func, *args, **kwargs):
|
||||
"""the user clicked the empty space in the hover to dismiss
|
||||
|
||||
.. versionadded:: 1.8.1
|
||||
|
||||
"""
|
||||
self._callback_add("dismissed", func, *args, **kwargs)
|
||||
|
||||
def callback_dismissed_del(self, func):
|
||||
self._callback_del("dismissed", func)
|
||||
|
||||
def callback_smart_changed_add(self, func, *args, **kwargs):
|
||||
"""a content object placed under the "smart" policy was replaced to a
|
||||
new slot direction."""
|
||||
|
|
Loading…
Reference in New Issue