445 lines
16 KiB
Plaintext
445 lines
16 KiB
Plaintext
enum Elm.Toolbar_Item.Scrollto_Type
|
|
{
|
|
/*@
|
|
Defines where to position the item in the toolbar.
|
|
@ingroup Toolbar
|
|
*/
|
|
|
|
legacy: elm_toolbar_item_scrollto;
|
|
|
|
none = 0, /*@< no scrollto */
|
|
in = (1 << 0), /*@< to the nearest viewport */
|
|
first = (1 << 1), /*@< to the first of viewport */
|
|
middle = (1 << 2), /*@< to the middle of viewport */
|
|
last = (1 << 3) /*@< to the last of viewport */
|
|
}
|
|
|
|
class Elm.Toolbar_Item(Elm.Widget_Item)
|
|
{
|
|
eo_prefix: elm_obj_toolbar_item;
|
|
methods {
|
|
@property prev {
|
|
get {
|
|
/*@
|
|
Get the item before @p item in toolbar.
|
|
|
|
@note If it is the first item, @c NULL will be returned.
|
|
|
|
@see elm_toolbar_item_prepend()
|
|
|
|
@ingroup Toolbar
|
|
*/
|
|
}
|
|
values {
|
|
item: Elm_Object_Item *; /*@ The item before @p item, or @c NULL if none or on failure. */
|
|
}
|
|
}
|
|
@property next {
|
|
get {
|
|
/*@
|
|
Get the item after @p item in toolbar.
|
|
|
|
@note If it is the last item, @c NULL will be returned.
|
|
|
|
@see elm_toolbar_item_append()
|
|
|
|
@ingroup Toolbar
|
|
*/
|
|
}
|
|
values {
|
|
item: Elm_Object_Item *; /*@ The item after @p item, or @c NULL if none or on failure. */
|
|
}
|
|
}
|
|
@property priority {
|
|
get {
|
|
/*@
|
|
Get the priority of a toolbar item.
|
|
|
|
@see elm_toolbar_item_priority_set() for details.
|
|
|
|
@ingroup Toolbar
|
|
*/
|
|
}
|
|
set {
|
|
/*@
|
|
Set the priority of a toolbar item.
|
|
|
|
This is used only when the toolbar shrink mode is set
|
|
to #ELM_TOOLBAR_SHRINK_MENU or #ELM_TOOLBAR_SHRINK_HIDE.
|
|
When space is less than required, items with low priority
|
|
will be removed from the toolbar and added to a dynamically-created menu,
|
|
while items with higher priority will remain on the toolbar,
|
|
with the same order they were added.
|
|
|
|
@see elm_toolbar_item_priority_get()
|
|
|
|
@ingroup Toolbar
|
|
*/
|
|
}
|
|
values {
|
|
priority: int; /*@ The @p item priority. The default is zero for set and 0 is returned on failure. */
|
|
}
|
|
}
|
|
@property selected {
|
|
get {
|
|
/*@
|
|
Get whether the @p item is selected or not.
|
|
|
|
@return @c EINA_TRUE means item is selected. @c EINA_FALSE indicates
|
|
it's not. If @p obj is @c NULL, @c EINA_FALSE is returned.
|
|
|
|
@see elm_toolbar_selected_item_set() for details.
|
|
@see elm_toolbar_item_selected_get()
|
|
|
|
@ingroup Toolbar
|
|
*/
|
|
}
|
|
set {
|
|
/*@
|
|
Set the selected state of an item.
|
|
|
|
This sets the selected state of the given item @p it.
|
|
@c EINA_TRUE for selected, @c EINA_FALSE for not selected.
|
|
|
|
If a new item is selected the previously selected will be unselected.
|
|
Previously selected item can be get with function
|
|
elm_toolbar_selected_item_get().
|
|
|
|
Selected items will be highlighted.
|
|
|
|
@see elm_toolbar_item_selected_get()
|
|
@see elm_toolbar_selected_item_get()
|
|
|
|
@ingroup Toolbar
|
|
*/
|
|
}
|
|
values {
|
|
selected: bool; /*@ The selected state */
|
|
}
|
|
}
|
|
@property icon {
|
|
get {
|
|
/*@
|
|
Get the string used to set the icon of @p item.
|
|
|
|
@return The string associated with the icon object.
|
|
|
|
@see elm_toolbar_item_icon_set() for details.
|
|
|
|
@ingroup Toolbar
|
|
*/
|
|
}
|
|
set {
|
|
/*@
|
|
Set the icon associated with @p item.
|
|
|
|
@param icon A string with icon name or the absolute path of an image file.
|
|
|
|
Toolbar will load icon image from fdo or current theme.
|
|
This behavior can be set by elm_toolbar_icon_order_lookup_set() function.
|
|
If an absolute path is provided it will load it direct from a file.
|
|
|
|
@note This function does not accept relative icon path.
|
|
|
|
@see elm_toolbar_icon_order_lookup_set()
|
|
@see elm_toolbar_icon_order_lookup_get()
|
|
|
|
@ingroup Toolbar
|
|
*/
|
|
}
|
|
values {
|
|
icon: const (char) *;
|
|
}
|
|
}
|
|
@property object {
|
|
get {
|
|
/*@
|
|
Get the real Evas(Edje) object created to implement the view of a given
|
|
toolbar @p item.
|
|
|
|
@ingroup Toolbar
|
|
*/
|
|
}
|
|
values {
|
|
obj: Evas_Object *; /*@ The base Edje object associated with @p it. */
|
|
}
|
|
}
|
|
@property icon_object {
|
|
get {
|
|
/*@
|
|
Get the icon object of @p item.
|
|
|
|
@see elm_toolbar_item_icon_set(), elm_toolbar_item_icon_file_set(),
|
|
or elm_toolbar_item_icon_memfile_set() for details.
|
|
|
|
@ingroup Toolbar
|
|
*/
|
|
}
|
|
values {
|
|
obj: Evas_Object *; /*@ The icon object */
|
|
}
|
|
}
|
|
@property separator {
|
|
get {
|
|
/*@
|
|
Get a value whether item is a separator or not.
|
|
|
|
@return @c EINA_TRUE means item @p it is a separator. @c EINA_FALSE
|
|
indicates it's not. If @p it is @c NULL, @c EINA_FALSE is returned.
|
|
|
|
@see elm_toolbar_item_separator_set() for details.
|
|
|
|
@ingroup Toolbar
|
|
*/
|
|
}
|
|
set {
|
|
/*@
|
|
Set or unset item as a separator.
|
|
|
|
@param separator @c EINA_TRUE to set item @p item as separator or
|
|
@c EINA_FALSE to unset, i.e., item will be used as a regular item.
|
|
|
|
Items aren't set as separator by default.
|
|
|
|
If set as separator it will display separator theme, so won't display
|
|
icons or label.
|
|
|
|
@see elm_toolbar_item_separator_get()
|
|
|
|
@ingroup Toolbar
|
|
*/
|
|
}
|
|
values {
|
|
separator: bool;
|
|
}
|
|
}
|
|
@property menu {
|
|
get {
|
|
/*@
|
|
Get toolbar item's menu.
|
|
|
|
If @p item wasn't set as menu item with elm_toolbar_item_menu_set(),
|
|
this function will set it.
|
|
|
|
@see elm_toolbar_item_menu_set() for details.
|
|
|
|
@ingroup Toolbar
|
|
*/
|
|
}
|
|
values {
|
|
menu: Evas_Object *; /*@ Item's menu object or @c NULL on failure. */
|
|
}
|
|
}
|
|
@property state {
|
|
get {
|
|
/*@
|
|
Get the current state of @p it.
|
|
|
|
@return The selected state or @c NULL if none is selected or on failure.
|
|
|
|
@see elm_toolbar_item_state_set() for details.
|
|
@see elm_toolbar_item_state_unset()
|
|
@see elm_toolbar_item_state_add()
|
|
|
|
@ingroup Toolbar
|
|
*/
|
|
}
|
|
set {
|
|
/*@
|
|
Set @p state as the current state of @p it.
|
|
|
|
@param state The state to use.
|
|
@return @c EINA_TRUE on success or @c EINA_FALSE on failure.
|
|
|
|
If @p state is @c NULL, it won't select any state and the default item's
|
|
icon and label will be used. It's the same behaviour than
|
|
elm_toolbar_item_state_unset().
|
|
|
|
@see elm_toolbar_item_state_unset()
|
|
|
|
@ingroup Toolbar
|
|
*/
|
|
return: bool;
|
|
}
|
|
values {
|
|
state: Elm_Toolbar_Item_State * @nullable;
|
|
}
|
|
}
|
|
/* init { FIXME
|
|
params {
|
|
Evas_Smart_Cb func;
|
|
const(void)* data;
|
|
}
|
|
}*/
|
|
icon_memfile_set {
|
|
/*@
|
|
Set the icon associated with @p item to an image in a binary buffer.
|
|
|
|
@note The icon image set by this function can be changed by
|
|
elm_toolbar_item_icon_set().
|
|
|
|
@ingroup Toolbar
|
|
*/
|
|
params {
|
|
@in img: const (void) *; /*@ The binary data that will be used as an image */
|
|
@in size: size_t; /*@ The size of binary data @p img */
|
|
@in format: const (char) *; /*@ Optional format of @p img to pass to the image loader */
|
|
@in key: const (char) *; /*@ Optional key of @p img to pass to the image loader (eg. if @p img is an edje file) */
|
|
}
|
|
return: bool; /*@ (@c EINA_TRUE = success, @c EINA_FALSE = error) */
|
|
}
|
|
icon_file_set {
|
|
/*@
|
|
Set the icon associated with @p item to an image in a binary buffer.
|
|
|
|
@note The icon image set by this function can be changed by
|
|
elm_toolbar_item_icon_set().
|
|
|
|
@ingroup Toolbar
|
|
*/
|
|
params {
|
|
@in file: const (char) *; /*@ The file that contains the image */
|
|
@in key: const (char) *; /*@ Optional key of @p img to pass to the image loader (eg. if @p img is an edje file) */
|
|
}
|
|
return: bool; /*@ (@c EINA_TRUE = success, @c EINA_FALSE = error) */
|
|
}
|
|
state_add {
|
|
/*@
|
|
Add a new state to @p item.
|
|
|
|
Toolbar will load icon image from fdo or current theme.
|
|
This behavior can be set by elm_toolbar_icon_order_lookup_set() function.
|
|
If an absolute path is provided it will load it direct from a file.
|
|
|
|
States created with this function can be removed with
|
|
elm_toolbar_item_state_del().
|
|
|
|
@see elm_toolbar_item_state_del()
|
|
@see elm_toolbar_item_state_sel()
|
|
@see elm_toolbar_item_state_get()
|
|
|
|
@ingroup Toolbar
|
|
*/
|
|
params {
|
|
@in icon: const (char) *; /*@ A string with icon name or the absolute path of an image file. */
|
|
@in label: const (char) *; /*@ The label of the new state. */
|
|
@in func: Evas_Smart_Cb @optional; /*@ The function to call when the item is clicked when this * state is selected. */
|
|
@in data: const (void) * @optional; /*@ The data to associate with the state. */
|
|
}
|
|
return: Elm_Toolbar_Item_State *; /*@ The toolbar item state, or @c NULL upon failure. */
|
|
}
|
|
state_del {
|
|
/*@
|
|
Delete a previously added state to @p item.
|
|
|
|
@see elm_toolbar_item_state_add()
|
|
*/
|
|
params {
|
|
@in state: Elm_Toolbar_Item_State *; /*@ The state to be deleted. */
|
|
}
|
|
return: bool; /*@ @c EINA_TRUE on success or @c EINA_FALSE on failure. */
|
|
}
|
|
state_next {
|
|
/*@
|
|
Get the state after selected state in toolbar's @p item.
|
|
|
|
If last state is selected, this function will return first state.
|
|
|
|
@see elm_toolbar_item_state_set()
|
|
@see elm_toolbar_item_state_add()
|
|
|
|
@ingroup Toolbar
|
|
*/
|
|
return: Elm_Toolbar_Item_State *; /*@ The state after current state, or @c NULL on failure. */
|
|
}
|
|
state_prev {
|
|
/*@
|
|
Get the state before selected state in toolbar's @p item.
|
|
|
|
|
|
If first state is selected, this function will return last state.
|
|
|
|
@see elm_toolbar_item_state_set()
|
|
@see elm_toolbar_item_state_add()
|
|
|
|
@ingroup Toolbar
|
|
*/
|
|
return: Elm_Toolbar_Item_State *; /*@ The state before current state, or @c NULL on failure. */
|
|
}
|
|
show {
|
|
/*@
|
|
Show a specific item, when the toolbar can be scrolled.
|
|
|
|
see elm_toolbar_item_bring_in()
|
|
|
|
@since 1.8
|
|
@ingroup Toolbar
|
|
*/
|
|
params {
|
|
@in scrollto: Elm_Toolbar_Item_Scrollto_Type; /*@ the position the item should appear at */
|
|
}
|
|
}
|
|
bring_in {
|
|
/*@
|
|
Show a specific item with scroll animation, when the toolbar can be scrolled.
|
|
|
|
see elm_toolbar_item_show()
|
|
|
|
@since 1.8
|
|
@ingroup Toolbar
|
|
*/
|
|
params {
|
|
@in scrollto: Elm_Toolbar_Item_Scrollto_Type; /*@ the position the item should appear at */
|
|
}
|
|
}
|
|
menu_set {
|
|
/*@
|
|
Set whether the toolbar item opens a menu.
|
|
|
|
A toolbar item can be set to be a menu, using this function.
|
|
|
|
Once it is set to be a menu, it can be manipulated through the
|
|
menu-like function elm_toolbar_menu_parent_set() and the other
|
|
elm_menu functions, using the Evas_Object @c menu returned by
|
|
elm_toolbar_item_menu_get().
|
|
|
|
So, items to be displayed in this item's menu should be added with
|
|
elm_menu_item_add().
|
|
|
|
The following code exemplifies the most basic usage:
|
|
@code
|
|
tb = elm_toolbar_add(win)
|
|
item = elm_toolbar_item_append(tb, "refresh", "Menu", NULL, NULL);
|
|
elm_toolbar_item_menu_set(item, EINA_TRUE);
|
|
elm_toolbar_menu_parent_set(tb, win);
|
|
menu = elm_toolbar_item_menu_get(item);
|
|
elm_menu_item_add(menu, NULL, "edit-cut", "Cut", NULL, NULL);
|
|
menu_item = elm_menu_item_add(menu, NULL, "edit-copy", "Copy", NULL,
|
|
NULL);
|
|
@endcode
|
|
|
|
@see elm_toolbar_item_menu_get()
|
|
|
|
@ingroup Toolbar
|
|
*/
|
|
params {
|
|
@in menu: bool; /*@ If @c EINA_TRUE, @p item will opens a menu when selected. */
|
|
}
|
|
}
|
|
}
|
|
implements {
|
|
Eo.Base.constructor;
|
|
Eo.Base.destructor;
|
|
Elm.Widget_Item.disable;
|
|
Elm.Widget_Item.focus.set;
|
|
Elm.Widget_Item.focus.get;
|
|
Elm.Widget_Item.part_text.get;
|
|
Elm.Widget_Item.part_text.set;
|
|
Elm.Widget_Item.part_content.get;
|
|
Elm.Widget_Item.part_content.set;
|
|
Elm.Widget_Item.part_content_unset;
|
|
Elm_Interface_Atspi_Accessible.name.get;
|
|
Elm_Interface_Atspi_Accessible.state_set.get;
|
|
}
|
|
}
|