efl.elementary.
ObjectItem
(*args, **kwargs)¶Bases: object
widget items.
data
¶Type: | dict |
---|
A dictionary object that holds user data.
content
¶The default content part of this ObjectItem.
content_get
()¶content_set
(content)¶content_unset
()¶cursor
¶The cursor that will be displayed when mouse is over the object. The object can have only one cursor set to it, so if this function is called twice for an object, the previous set will be unset.
cursor_engine_only
¶cursor_engine_only_set(engine_only)
Sets cursor engine only usage for this object.
Note
before you set a style you should define a cursor
with cursor
cursor_engine_only_get
()¶cursor_engine_only_set
(engine_only)¶cursor_get
()¶cursor_set
(cursor)¶cursor_style
¶The style for this object cursor.
Note
before you set a style you should define a cursor
with cursor
cursor_style_get
()¶cursor_style_set
(style=None)¶cursor_unset
()¶data_get
()¶Deprecated since version 1.8: Use the data attribute (dict) instead.
data_set
(*args, **kwargs)¶Deprecated since version 1.8: Use the data attribute (dict) instead.
delete
()¶Delete this ObjectItem.
disabled
¶The disabled state of an widget item.
Elementary object item can be disabled, in which state they won’t receive input and, in general, will be themed differently from their normal state, usually greyed out. Useful for contexts where you don’t want your users to interact with some of the parts of you interface.
Type: | bool |
---|
disabled_get
()¶disabled_set
(disabled)¶domain_part_text_translatable_set
(part, domain, translatable)¶Mark the part text to be translatable or not.
Once you mark the part text to be translatable, the text will be translated
internally regardless of part_text_set()
and
domain_translatable_part_text_set()
. In other case, if you set the
Elementary policy that all text will be translatable in default, you can set
the part text to not be translated by calling this API.
Parameters: |
|
---|---|
See: | |
See: | |
See: |
|
New in version 1.8.
domain_translatable_part_text_set
(part=None, domain=None, text=None)¶Set the text for an object item’s part, marking it as translatable.
The string to set as text
must be the original one. Do not pass the
return of gettext()
here. Elementary will translate the string
internally and set it on the object item using
elm_object_item_part_text_set(), also storing the original string so that it
can be automatically translated when the language is changed with
elm_language_set(). The domain
will be stored along to find the
translation in the correct catalog. It can be None, in which case it will use
whatever domain was set by the application with textdomain()
. This is
useful in case you are building a library on top of Elementary that will have
its own translatable strings, that should not be mixed with those of programs
using the library.
Parameters: |
|
---|
New in version 1.8.
focus
¶Whether the item is focused or not.
New in version 1.10.
focus_get
()¶focus_next_item_get
(direction)¶Get next object item which was set with specific focus direction.
Returns: | Focus next object item or None , if there is no focus next
object item. |
---|---|
Return type: | ObjectItem |
New in version 1.16.
focus_next_item_set
(next, direction)¶Set next object item with specific focus direction.
When focus next object item is set with specific focus direction, this object item will be the first candidate when finding next focusable object or item. If the focus next object item is set, it is preference to focus next object. Focus next object item can be registered with six directions that are previous, next, up, down, right, and left.
Parameters: |
|
---|---|
See: |
New in version 1.16.
focus_next_object_get
(direction)¶Get next object which was set with specific focus direction.
Parameters: | dir (Elm_Focus_Direction) – Focus direction |
---|---|
Returns: | Focus next object or None, if there is no focus next object. |
Return type: | Object |
See: | focus_next_object_set() |
New in version 1.16.
focus_next_object_set
(next, direction)¶Set next object with specific focus direction.
When focus next object is set with specific focus direction, this object will be the first candidate when finding next focusable object. Focus next object can be registered with six directions that are previous, next, up, down, right, and left.
Parameters: |
|
---|---|
See: |
New in version 1.16.
focus_set
(focused)¶part_content_get
(part)¶Get a content of an object item
Note
Elementary object items may have many contents
Parameters: | part (string) – The content part name to unset (None for the default content) |
---|---|
Returns: | content of the object item or None for any error |
Return type: | Object |
part_content_set
(part, content)¶Set a content of an object item
This sets a new object to an item as a content object. If any object was already set as a content object in the same part, previous object will be deleted automatically.
Note
Elementary object items may have many contents
Parameters: |
|
---|
part_content_unset
(part)¶Unset a content of an object item
Note
Elementary object items may have many contents
Parameters: | part (string) – The content part name to unset (None for the default content) |
---|
part_text_get
(part)¶Gets the text of a given part of this object.
See also
text_get() and part_text_set()
Parameters: | part (string) – part name to get the text. |
---|---|
Returns: | the text of a part or None if nothing was set. |
Return type: | string |
part_text_set
(part, text)¶Sets the text of a given part of this object.
See also
text
and part_text_get()
Parameters: |
|
---|
signal_emit
(emission, source)¶Send a signal to the edje object of the widget item.
This function sends a signal to the edje object of the obj item. An edje program can respond to a signal by specifying matching ‘signal’ and ‘source’ fields.
Parameters: |
|
---|
style
¶The style of an object item.
Type: | string |
---|
New in version 1.10.
style_get
()¶style_set
(style)¶text
¶The main text for this object.
Type: | string |
---|
text_get
()¶text_set
(text)¶tooltip_content_cb_set
(func, *args, **kargs)¶Set the content to be shown in the tooltip object
Setup the tooltip to object. The object can have only one tooltip, so
any previews tooltip data is removed. func(owner, item, tooltip,
args, kargs)
will be called every time that need show the tooltip and
it should return a valid Evas_Object. This object is then managed fully
by tooltip system and is deleted when the tooltip is gone.
Parameters: | func (function) – Function to be create tooltip content, called when need show tooltip. |
---|
tooltip_style
¶The style for this object tooltip.
Note
before you set a style you should define a tooltip
with tooltip_content_cb_set()
or tooltip_text_set()
tooltip_style_get
()¶tooltip_style_set
(style=None)¶tooltip_text_set
(text)¶Set the text to be shown in the tooltip object
Setup the text as tooltip object. The object can have only one
tooltip, so any previous tooltip data is removed. Internally, this
method calls tooltip_content_cb_set()
tooltip_unset
()¶Unset tooltip from object
Remove tooltip from object. If used the tooltip_text_set()
the internal copy of label will be removed correctly. If used
tooltip_content_cb_set()
, the data will be unreferred but
no freed.
tooltip_window_mode
¶Disables the size restrictions on an object’s tooltip.
If True
allows the tooltip to expand beyond its parent window’s
canvas. It is instead limited only by the size of the display.
Type: | bool |
---|
tooltip_window_mode_get
()¶tooltip_window_mode_set
(disable)¶track
()¶Same as item.track_object
track_count
¶The track object reference count.
Note
This gets the reference count for the track object. Whenever you
get the tracking object with track_object
the reference
count is increased by one. Likewise the reference count is
decreased when you call del item.track_object
. Unless the
reference count reaches zero the track object won’t be deleted so
please make sure to call del item.track_object
as many times as
getting track_object
.
New in version 1.10.
track_get
()¶Same as item.track_count
track_object
¶The track object of the item.
Note
This returns a rectangle object that represents the object items
internal object. If you wish to, for example, get the geometry or
visibility of the item you can use Evas API properties of the track
object such as geometry
or
visible
. Note that the widget items
may, or may not, actually have an internal object so this API will
return None if the tracking object doesn’t exist. Additionally, the
widget item is managed/controlled by the widget, which means the
widget item may be changed (moved, resized even deleted) anytime by
its own widget. Do not attempt to change the track object, and
don’t keep around a reference to the track object unless it’s
really required, instead get the track object at the moment you
need to refer to it. Otherwise you need to add some callbacks to
the track object to track its attributes’ changes.
Warning
After use the track object, please call del item.track_object
to free the track object properly. Don’t call ``obj.delete()`` on
the track object.
New in version 1.10.
translatable_part_text_get
(part=None)¶Gets the original string set as translatable for an object item.
When setting translated strings, the function elm_object_item_part_text_get()
will return the translation returned by gettext()
. To get the original
string use this function.
Parameters: | part – The name of the part that was set |
---|---|
Returns: | The original, untranslated string |
New in version 1.8.
untrack
()¶Same as del item.track_object
widget
¶Get the widget object’s handle which contains a given item
Note
This returns the widget object itself that an item belongs to.
Note
Every elm_object_item supports this API
Type: | Object |
---|
widget_get
()¶