2010-05-02 13:41:38 -07:00
|
|
|
|
#ifndef ELMXX_GEN_LIST_H
|
|
|
|
|
#define ELMXX_GEN_LIST_H
|
|
|
|
|
|
|
|
|
|
/* STL */
|
|
|
|
|
#include <string>
|
|
|
|
|
|
|
|
|
|
/* EFL */
|
|
|
|
|
#include <Elementary.h>
|
|
|
|
|
|
|
|
|
|
/* ELFxx */
|
|
|
|
|
#include "Object.h"
|
2011-11-05 12:45:19 -07:00
|
|
|
|
#include "Gen.h"
|
|
|
|
|
#include "GenDataModel.h"
|
2010-05-02 13:41:38 -07:00
|
|
|
|
|
|
|
|
|
namespace Elmxx {
|
|
|
|
|
|
2010-05-26 14:01:36 -07:00
|
|
|
|
/* forward declarations */
|
2011-11-05 12:45:19 -07:00
|
|
|
|
class GenItem;
|
2011-11-05 13:28:26 -07:00
|
|
|
|
class GenListItem;
|
2010-05-26 14:01:36 -07:00
|
|
|
|
class GenListColumnConstructor;
|
|
|
|
|
class GenListColumnSelector;
|
2011-11-05 12:45:19 -07:00
|
|
|
|
|
2010-05-02 13:41:38 -07:00
|
|
|
|
/*!
|
2010-05-26 14:01:36 -07:00
|
|
|
|
* @defgroup Genlist Genlist
|
|
|
|
|
*
|
|
|
|
|
* The aim was to have more expansive list that the simple list in
|
|
|
|
|
* Elementary that could have more flexible items and allow many more entries
|
|
|
|
|
* while still being fast and low on memory usage. At the same time it was
|
|
|
|
|
* also made to be able to do tree structures. But the price to pay is more
|
|
|
|
|
* complexity when it comes to usage. If all you want is a simple list with
|
|
|
|
|
* icons and a single label, use the normal List object.
|
|
|
|
|
*
|
|
|
|
|
* Signals that you can add callbacks for are:
|
|
|
|
|
*
|
2011-04-13 06:29:54 -07:00
|
|
|
|
* clicked,double - This is called when a user has double-clicked an item. The
|
2010-05-26 14:01:36 -07:00
|
|
|
|
* event_info parameter is the genlist item that was double-clicked.
|
|
|
|
|
*
|
|
|
|
|
* selected - This is called when a user has made an item selected. The
|
|
|
|
|
* event_info parameter is the genlist item that was selected.
|
|
|
|
|
*
|
|
|
|
|
* unselected - This is called when a user has made an item unselected. The
|
|
|
|
|
* event_info parameter is the genlist item that was unselected.
|
|
|
|
|
*
|
|
|
|
|
* expanded - This is called when elm_genlist_item_expanded_set() is called
|
|
|
|
|
* and the item is now meant to be expanded. The event_info parameter is the
|
|
|
|
|
* genlist item that was indicated to expand. It is the job of this callback
|
|
|
|
|
* to then fill in the child items.
|
|
|
|
|
*
|
|
|
|
|
* contracted - This is called when elm_genlist_item_expanded_set() is called
|
|
|
|
|
* and the item is now meant to be contracted. The event_info parameter is
|
|
|
|
|
* the genlist item that was indicated to contract. It is the job of this
|
|
|
|
|
* callback to then delete the child items
|
|
|
|
|
*
|
|
|
|
|
* expand,request - This is called when a user has indicated they want to
|
|
|
|
|
* expand a tree branch item. The callback should decide if the item can
|
|
|
|
|
* expand (has any children) and then call elm_genlist_item_expanded_set()
|
|
|
|
|
* appropriately to set the state. The event_info parameter is the genlist
|
|
|
|
|
* item that was indicated to expand.
|
|
|
|
|
*
|
|
|
|
|
* contract,request - This is called when a user has indicated they want to
|
|
|
|
|
* contract a tree branch item. The callback should decide if the item can
|
|
|
|
|
* contract (has any children) and then call elm_genlist_item_expanded_set()
|
|
|
|
|
* appropriately to set the state. The event_info parameter is the genlist
|
|
|
|
|
* item that was indicated to contract.
|
|
|
|
|
*
|
|
|
|
|
* realized - This is called when the item in the list is created as a real
|
|
|
|
|
* evas object. event_info parameter is the genlist item that was created.
|
|
|
|
|
* The object may be deleted at any time, so it is up to the caller to
|
2012-03-13 22:04:32 -07:00
|
|
|
|
* not use the object pointer from elm_object_item_part_content_get() in a way
|
2010-05-26 14:01:36 -07:00
|
|
|
|
* where it may point to freed objects.
|
|
|
|
|
*
|
|
|
|
|
* drag,start,up - This is called when the item in the list has been dragged
|
|
|
|
|
* (not scrolled) up.
|
|
|
|
|
*
|
|
|
|
|
* drag,start,down - This is called when the item in the list has been dragged
|
|
|
|
|
* (not scrolled) down.
|
|
|
|
|
*
|
|
|
|
|
* drag,start,left - This is called when the item in the list has been dragged
|
|
|
|
|
* (not scrolled) left.
|
|
|
|
|
*
|
|
|
|
|
* drag,start,right - This is called when the item in the list has been dragged
|
|
|
|
|
* (not scrolled) right.
|
|
|
|
|
*
|
|
|
|
|
* drag,stop - This is called when the item in the list has stopped being
|
|
|
|
|
* dragged.
|
|
|
|
|
*
|
|
|
|
|
* drag - This is called when the item in the list is being dragged.
|
|
|
|
|
*
|
|
|
|
|
* Genlist has a fairly large API, mostly because it's relatively complex,
|
|
|
|
|
* trying to be both expansive, powerful and efficient. First we will begin
|
|
|
|
|
* an overview o the theory behind genlist.
|
|
|
|
|
*
|
|
|
|
|
* Evas tracks every object you create. Every time it processes an event
|
|
|
|
|
* (mouse move, down, up etc.) it needs to walk through objects and find out
|
|
|
|
|
* what event that affects. Even worse every time it renders display updates,
|
|
|
|
|
* in order to just calculate what to re-draw, it needs to walk through many
|
|
|
|
|
* many many objects. Thus, the more objects you keep active, the more
|
|
|
|
|
* overhead Evas has in just doing its work. It is advisable to keep your
|
|
|
|
|
* active objects to the minimum working set you need. Also remember that
|
|
|
|
|
* object creation and deletion carries an overhead, so there is a
|
|
|
|
|
* middle-ground, which is not easily determined. But don't keep massive lists
|
|
|
|
|
* of objects you can't see or use. Genlist does this with list objects. It
|
|
|
|
|
* creates and destroys them dynamically as you scroll around. It groups them
|
|
|
|
|
* into blocks so it can determine the visibility etc. of a whole block at
|
|
|
|
|
* once as opposed to having to walk the whole list. This 2-level list allows
|
|
|
|
|
* for very large numbers of items to be in the list (tests have used up to
|
|
|
|
|
* 2,000,000 items). Also genlist employs a queue for adding items. As items
|
|
|
|
|
* may be different sizes, every item added needs to be calculated as to its
|
|
|
|
|
* size and thus this presents a lot of overhead on populating the list, this
|
|
|
|
|
* genlist employs a queue. Any item added is queued and spooled off over
|
|
|
|
|
* time, actually appearing some time later, so if your list has many members
|
|
|
|
|
* you may find it takes a while for them to all appear, with your process
|
|
|
|
|
* consuming a lot of CPU while it is busy spooling.
|
|
|
|
|
*
|
|
|
|
|
* Genlist also implements a tree structure, but it does so with callbacks to
|
|
|
|
|
* the application, with the application filling in tree structures when
|
|
|
|
|
* requested (allowing for efficient building of a very deep tree that could
|
|
|
|
|
* even be used for file-management). See the above smart signal callbacks for
|
|
|
|
|
* details.
|
|
|
|
|
*
|
|
|
|
|
* An item in the genlist world can have 0 or more text labels (they can be
|
|
|
|
|
* regular text or textblock – that's up to the style to determine), 0 or
|
|
|
|
|
* more icons (which are simply objects swallowed into the genlist item) and
|
|
|
|
|
* 0 or more boolean states that can be used for check, radio or other
|
|
|
|
|
* indicators by the edje theme style. An item may be one of several styles
|
|
|
|
|
* (Elementary provides 2 by default - “default” and “double_label”, but this
|
|
|
|
|
* can be extended by system or application custom themes/overlays/extensions).
|
|
|
|
|
*
|
|
|
|
|
* In order to implement the ability to add and delete items on the fly,
|
|
|
|
|
* Genlist implements a class/callback system where the application provides
|
|
|
|
|
* a structure with information about that type of item (genlist may contain
|
|
|
|
|
* multiple different items with different classes, states and styles).
|
|
|
|
|
* Genlist will call the functions in this struct (methods) when an item is
|
|
|
|
|
* “realized” (that is created dynamically while scrolling). All objects will
|
|
|
|
|
* simply be deleted when no longer needed with evas_object_del(). The
|
|
|
|
|
* Elm_Genlist_Item_Class structure contains the following members:
|
|
|
|
|
*
|
|
|
|
|
* item_style - This is a constant string and simply defines the name of the
|
|
|
|
|
* item style. It must be specified and the default should be “default”.
|
|
|
|
|
*
|
2011-12-08 16:18:42 -08:00
|
|
|
|
* func.text_get - This function is called when an actual item object is
|
2010-05-26 14:01:36 -07:00
|
|
|
|
* created. The data parameter is the data parameter passed to
|
|
|
|
|
* elm_genlist_item_append() and related item creation functions. The obj
|
|
|
|
|
* parameter is the genlist object and the part parameter is the string name
|
|
|
|
|
* of the text part in the edje design that is listed as one of the possible
|
|
|
|
|
* labels that can be set. This function must return a strudup()'ed string as
|
|
|
|
|
* the caller will free() it when done.
|
|
|
|
|
*
|
|
|
|
|
* func.icon_get - This function is called when an actual item object is
|
|
|
|
|
* created. The data parameter is the data parameter passed to
|
|
|
|
|
* elm_genlist_item_append() and related item creation functions. The obj
|
|
|
|
|
* parameter is the genlist object and the part parameter is the string name
|
|
|
|
|
* of the icon part in the edje design that is listed as one of the possible
|
|
|
|
|
* icons that can be set. This must return NULL for no object or a valid
|
|
|
|
|
* object. The object will be deleted by genlist on shutdown or when the item
|
|
|
|
|
* its unrealized.
|
|
|
|
|
*
|
|
|
|
|
* func.state_get - This function is called when an actual item object is
|
|
|
|
|
* created. The data parameter is the data parameter passed to
|
|
|
|
|
* elm_genlist_item_append() and related item creation functions. The obj
|
|
|
|
|
* parameter is the genlist object and the part parameter is the string name
|
|
|
|
|
* of the state part in the edje design that is listed as one of the possible
|
|
|
|
|
* states that can be set. Return 0 for false or 1 for true. Genlist will
|
|
|
|
|
* emit a signal to the edje object with “elm,state,XXX,active” “elm” when
|
|
|
|
|
* true (the default is false), where XXX is the name of the part.
|
|
|
|
|
*
|
2012-03-06 07:04:55 -08:00
|
|
|
|
* func.del - This is called when elm_object_item_del() is called on an
|
2010-05-26 14:01:36 -07:00
|
|
|
|
* item, elm_genlist_clear() is called on the genlist, or
|
|
|
|
|
* elm_genlist_item_subitems_clear() is called to clear sub-items. This is
|
|
|
|
|
* intended for use when actual genlist items are deleted, so any backing
|
|
|
|
|
* data attached to the item (e.g. its data parameter on creation) can be
|
|
|
|
|
* deleted.
|
|
|
|
|
*
|
2012-01-20 00:38:20 -08:00
|
|
|
|
* Items can be added by several calls. All of them return a genlist item(Elm_Object_Item)
|
2010-05-26 14:01:36 -07:00
|
|
|
|
* handle that is an internal member inside the genlist. They all take a data
|
|
|
|
|
* parameter that is meant to be used for a handle to the applications
|
|
|
|
|
* internal data (eg the struct with the original item data). The parent
|
|
|
|
|
* parameter is the parent genlist item this belongs to if it is a tree, and
|
|
|
|
|
* NULL if there is no parent. The flags can be a bitmask of
|
2012-03-12 23:22:39 -07:00
|
|
|
|
* ELM_GENLIST_ITEM_NONE and ELM_GENLIST_ITEM_TREE. If
|
|
|
|
|
* ELM_GENLIST_ITEM_TREE is set then this item is displayed as a item
|
2010-05-26 14:01:36 -07:00
|
|
|
|
* that is able to expand and have child items. The func parameter is a
|
|
|
|
|
* convenience callback that is called when the item is selected and the data
|
|
|
|
|
* parameter will be the func_data parameter, obj be the genlist object and
|
|
|
|
|
* vent_info will be the genlist item.
|
|
|
|
|
*
|
|
|
|
|
* elm_genlist_item_append() appends an item to the end of the list, or if
|
|
|
|
|
* there is a parent, to the end of all the child items of the parent.
|
|
|
|
|
* elm_genlist_item_prepend() is the same but prepends to the beginning of
|
|
|
|
|
* the list or children list. elm_genlist_item_insert_before() inserts at
|
|
|
|
|
* item before another item and elm_genlist_item_insert_after() inserts after
|
|
|
|
|
* the indicated item.
|
|
|
|
|
*
|
|
|
|
|
* The application can clear the list with elm_genlist_clear() which deletes
|
2012-03-06 07:04:55 -08:00
|
|
|
|
* all the items in the list and elm_object_item_del() will delete a specific
|
2010-05-26 14:01:36 -07:00
|
|
|
|
* item. elm_genlist_item_subitems_clear() will clear all items that are
|
|
|
|
|
* children of the indicated parent item.
|
|
|
|
|
*
|
|
|
|
|
* If the application wants multiple items to be able to be selected,
|
|
|
|
|
* elm_genlist_multi_select_set() can enable this. If the list is
|
|
|
|
|
* single-selection only (the default), then elm_genlist_selected_item_get()
|
|
|
|
|
* will return the selected item, if any, or NULL I none is selected. If the
|
|
|
|
|
* list is multi-select then elm_genlist_selected_items_get() will return a
|
|
|
|
|
* list (that is only valid as long as no items are modified (added, deleted,
|
|
|
|
|
* selected or unselected).
|
|
|
|
|
*
|
|
|
|
|
* To help inspect list items you can jump to the item at the top of the list
|
|
|
|
|
* with elm_genlist_first_item_get() which will return the item pointer, and
|
|
|
|
|
* similarly elm_genlist_last_item_get() gets the item at the end of the list.
|
|
|
|
|
* elm_genlist_item_next_get() and elm_genlist_item_prev_get() get the next
|
|
|
|
|
* and previous items respectively relative to the indicated item. Using
|
|
|
|
|
* these calls you can walk the entire item list/tree. Note that as a tree
|
|
|
|
|
* the items are flattened in the list, so elm_genlist_item_parent_get() will
|
|
|
|
|
* let you know which item is the parent (and thus know how to skip them if
|
|
|
|
|
* wanted).
|
|
|
|
|
*
|
2012-03-06 07:04:55 -08:00
|
|
|
|
* There are also convenience functions. elm_object_item_widget_get() will
|
2010-05-26 14:01:36 -07:00
|
|
|
|
* return the genlist object the item belongs to. elm_genlist_item_show()
|
|
|
|
|
* will make the scroller scroll to show that specific item so its visible.
|
2012-03-06 07:04:55 -08:00
|
|
|
|
* elm_object_item_data_get() returns the data pointer set by the item
|
2010-05-26 14:01:36 -07:00
|
|
|
|
* creation functions.
|
|
|
|
|
*
|
|
|
|
|
* If an item changes (state of boolean changes, label or icons change),
|
|
|
|
|
* then use elm_genlist_item_update() to have genlist update the item with
|
|
|
|
|
* the new state. Genlist will re-realize the item thus call the functions
|
|
|
|
|
* in the _Elm_Genlist_Item_Class for that item.
|
|
|
|
|
*
|
|
|
|
|
* To programmatically (un)select an item use elm_genlist_item_selected_set().
|
|
|
|
|
* To get its selected state use elm_genlist_item_selected_get(). Similarly
|
|
|
|
|
* to expand/contract and item and get its expanded state, use
|
|
|
|
|
* elm_genlist_item_expanded_set() and elm_genlist_item_expanded_get(). And
|
|
|
|
|
* again to make an item disabled (unable to be selected and appear
|
2012-03-06 07:04:55 -08:00
|
|
|
|
* differently) use elm_object_item_disabled_set() to set this and
|
|
|
|
|
* elm_object_item_disabled_get() to get the disabled state.
|
2010-05-26 14:01:36 -07:00
|
|
|
|
*
|
|
|
|
|
* In general to indicate how the genlist should expand items horizontally to
|
2012-03-06 07:04:55 -08:00
|
|
|
|
* fill the list area, use elm_genlist_mode_set(). Valid modes are
|
2010-05-26 14:01:36 -07:00
|
|
|
|
* ELM_LIST_LIMIT and ELM_LIST_SCROLL . The default is ELM_LIST_SCROLL. This
|
|
|
|
|
* mode means that if items are too wide to fit, the scroller will scroll
|
|
|
|
|
* horizontally. Otherwise items are expanded to fill the width of the
|
|
|
|
|
* viewport of the scroller. If it is ELM_LIST_LIMIT, Items will be expanded
|
|
|
|
|
* to the viewport width and limited to that size. This can be combined with
|
|
|
|
|
* a different style that uses edjes' ellipsis feature (cutting text off like
|
|
|
|
|
* this: “tex...”).
|
|
|
|
|
*
|
|
|
|
|
* Items will only call their selection func and callback when first becoming
|
|
|
|
|
* selected. Any further clicks will do nothing, unless you enable always
|
2012-03-14 23:22:25 -07:00
|
|
|
|
* select with elm_genlist_select_mode_set() using ELM_OBJECT_SELECT_MODE_ALWAYS.
|
|
|
|
|
* This means even if selected, every click will make the selected callbacks be called.
|
|
|
|
|
* elm_genlist_select_mode_set() using ELM_OBJECT_SELECT_MODE_NONE will turn off
|
|
|
|
|
* the ability to select items entirely and they will neither appear selected
|
|
|
|
|
* nor call selected callback functions.
|
2010-05-26 14:01:36 -07:00
|
|
|
|
*
|
|
|
|
|
* Remember that you can create new styles and add you own theme augmentation
|
|
|
|
|
* per application with elm_theme_extension_add(). If you absolutely must
|
|
|
|
|
* have a specific style that overrides any theme the user or system sets up
|
|
|
|
|
* you can use elm_theme_overlay_add() to add such a file.
|
2010-05-02 13:41:38 -07:00
|
|
|
|
*/
|
2011-11-05 12:45:19 -07:00
|
|
|
|
class GenList : public Gen
|
2010-05-02 13:41:38 -07:00
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
static GenList *factory (Evasxx::Object &parent);
|
|
|
|
|
|
|
|
|
|
void setMultiSelect (bool multi);
|
|
|
|
|
|
|
|
|
|
bool getMultiSelect ();
|
|
|
|
|
|
2011-11-05 12:45:19 -07:00
|
|
|
|
void setHorizontal (Elm_List_Mode mode);
|
2010-05-02 13:41:38 -07:00
|
|
|
|
|
2011-11-05 12:45:19 -07:00
|
|
|
|
Elm_List_Mode getHorizontal ();
|
2012-03-14 23:22:25 -07:00
|
|
|
|
|
2012-03-16 12:53:51 -07:00
|
|
|
|
void setSelectMode (Elm_Object_Select_Mode mode);
|
2012-03-14 23:22:25 -07:00
|
|
|
|
|
2010-05-02 13:41:38 -07:00
|
|
|
|
void setHomogeneous (bool homogeneous);
|
|
|
|
|
|
|
|
|
|
bool getHomogeneous ();
|
|
|
|
|
|
|
|
|
|
void setBlockCount (int n);
|
|
|
|
|
|
|
|
|
|
int getBlockCound ();
|
|
|
|
|
|
2011-11-05 12:45:19 -07:00
|
|
|
|
void setDataModel (GenDataModel &model);
|
2010-05-08 13:53:44 -07:00
|
|
|
|
|
|
|
|
|
/* operations to add items */
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
|
* Append item to the end of the genlist
|
2010-06-09 14:33:57 -07:00
|
|
|
|
* TODO: C++ comment!
|
2010-05-08 13:53:44 -07:00
|
|
|
|
*
|
|
|
|
|
* This appends the given item to the end of the list or the end of the
|
|
|
|
|
* children if the parent is given.
|
|
|
|
|
*
|
|
|
|
|
* @param obj The genlist object
|
|
|
|
|
* @param itc The item class for the item
|
|
|
|
|
* @param data The item data
|
|
|
|
|
* @param parent The parent item, or NULL if none
|
|
|
|
|
* @param flags Item flags
|
|
|
|
|
* @param func Convenience function called when item selected
|
|
|
|
|
* @param func_data Data passed to @p func above.
|
|
|
|
|
* @return A handle to the item added or NULL if not possible
|
|
|
|
|
*
|
|
|
|
|
*/
|
2012-03-10 12:41:06 -08:00
|
|
|
|
GenListItem *append (GenListColumnConstructor *construction, const GenListItem *parent, Elm_Genlist_Item_Type type, GenListColumnSelector *selection);
|
2010-06-09 14:33:57 -07:00
|
|
|
|
|
2012-03-10 12:41:06 -08:00
|
|
|
|
GenListItem *prepend (GenListColumnConstructor *construction, const GenListItem *parent, Elm_Genlist_Item_Type type, GenListColumnSelector *selection);
|
2010-07-09 13:23:12 -07:00
|
|
|
|
|
2012-03-10 12:41:06 -08:00
|
|
|
|
GenListItem *insertBefore (GenListColumnConstructor *construction, const GenListItem *parent, Elm_Genlist_Item_Type type, GenListColumnSelector *selection);
|
2010-07-09 13:23:12 -07:00
|
|
|
|
|
2012-03-10 12:41:06 -08:00
|
|
|
|
GenListItem *insertAfter (GenListColumnConstructor *construction, const GenListItem *parent, Elm_Genlist_Item_Type type, GenListColumnSelector *selection);
|
2010-07-09 13:23:12 -07:00
|
|
|
|
|
2011-11-05 13:28:26 -07:00
|
|
|
|
void del (GenListItem &item);
|
2010-07-09 13:23:12 -07:00
|
|
|
|
|
2011-11-05 13:28:26 -07:00
|
|
|
|
GenListItem *getItemSelected () const;
|
2010-06-09 14:33:57 -07:00
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
|
* Get the item that is at the x, y canvas coords
|
|
|
|
|
* TODO: C++ comment!
|
|
|
|
|
*
|
|
|
|
|
* This returns the item at the given coordinates (which are canvas relative
|
|
|
|
|
* not object-relative). If an item is at that coordinate, that item handle
|
|
|
|
|
* is returned, and if @p posret is not NULL, the integer pointed to is set
|
|
|
|
|
* to a value of -1, 0 or 1, depending if the coordinate is on the upper
|
|
|
|
|
* portion of that item (-1), on the middle section (0) or on the lower part
|
|
|
|
|
* (1). If NULL is returned as an item (no item found there), then posret
|
|
|
|
|
* may indicate -1 or 1 based if the coordinate is above or below all items
|
|
|
|
|
* respectively in the genlist.
|
|
|
|
|
*
|
|
|
|
|
* @param it The item
|
|
|
|
|
* @param x The input x coordinate
|
|
|
|
|
* @param y The input y coordinate
|
|
|
|
|
* @param posret The position relative to the item returned here
|
|
|
|
|
* @return The item at the coordinates or NULL if none
|
|
|
|
|
*
|
|
|
|
|
*/
|
2011-11-05 13:28:26 -07:00
|
|
|
|
GenListItem *getItemAtXY (const Eflxx::Point &pos, int &posret) const;
|
2010-06-09 14:33:57 -07:00
|
|
|
|
|
2011-11-05 13:28:26 -07:00
|
|
|
|
GenListItem *getItemFirst () const;
|
2010-06-09 14:33:57 -07:00
|
|
|
|
|
2011-11-05 13:28:26 -07:00
|
|
|
|
GenListItem *getItemLast () const;
|
2010-05-26 14:01:36 -07:00
|
|
|
|
|
|
|
|
|
// TODO: which type is event_info here instead of void*?
|
2010-05-31 14:34:34 -07:00
|
|
|
|
sigc::signal <void, GenListColumnSelector&, const Evasxx::Object&, void*> signalSelect;
|
2010-05-02 13:41:38 -07:00
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
GenList (); // forbid standard constructor
|
|
|
|
|
GenList (const GenList&); // forbid copy constructor
|
|
|
|
|
GenList (Evasxx::Object &parent); // private construction -> use factory ()
|
|
|
|
|
~GenList (); // forbid direct delete -> use Object::destroy()
|
2010-07-09 13:23:12 -07:00
|
|
|
|
|
|
|
|
|
enum InsertOperation
|
|
|
|
|
{
|
|
|
|
|
Append,
|
|
|
|
|
Prepend,
|
|
|
|
|
InsertAfter,
|
|
|
|
|
InsertBefore
|
|
|
|
|
};
|
|
|
|
|
|
2012-03-10 12:41:06 -08:00
|
|
|
|
GenListItem *insertInternal (GenListColumnConstructor *construction, GenList::InsertOperation op, const GenListItem *opItem, Elm_Genlist_Item_Type type, GenListColumnSelector *selection);
|
2010-05-08 13:53:44 -07:00
|
|
|
|
|
|
|
|
|
static void gl_sel (void *data, Evas_Object *obj, void *event_info);
|
2010-05-27 13:30:39 -07:00
|
|
|
|
|
2010-05-31 14:34:34 -07:00
|
|
|
|
void glSelected (GenListColumnSelector &selection, const Evasxx::Object &eo, void *event_info);
|
2010-05-08 13:53:44 -07:00
|
|
|
|
|
2011-11-05 12:45:19 -07:00
|
|
|
|
GenDataModel *mModel;
|
2010-05-27 13:30:39 -07:00
|
|
|
|
|
|
|
|
|
std::list <GenListColumnSelector*> mInternalSelList;
|
2010-05-30 15:27:52 -07:00
|
|
|
|
std::list <GenListColumnConstructor*> mInternalConstructList;
|
2010-05-02 13:41:38 -07:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
#if 0
|
|
|
|
|
/* operations to add items */
|
2012-03-12 23:22:39 -07:00
|
|
|
|
EAPI Elm_Object_Item *elm_genlist_item_prepend(Evas_Object *obj, const Elm_Genlist_Item_Class *itc, const void *data, Elm_Object_Item *parent, Elm_Genlist_Item_Type flags, Evas_Smart_Cb func, const void *func_data);
|
|
|
|
|
EAPI Elm_Object_Item *elm_genlist_item_insert_before(Evas_Object *obj, const Elm_Genlist_Item_Class *itc, const void *data, Elm_Object_Item *parent, Elm_Genlist_Item *before, Elm_Genlist_Item_Type flags, Evas_Smart_Cb func, const void *func_data);
|
|
|
|
|
EAPI Elm_Object_Item *elm_genlist_item_insert_after(Evas_Object *obj, const Elm_Genlist_Item_Class *itc, const void *data, Elm_Object_Item *parent, Elm_Genlist_Item *after, Elm_Genlist_Item_Type flags, Evas_Smart_Cb func, const void *func_data);
|
2010-05-02 13:41:38 -07:00
|
|
|
|
/* operations to retrieve existing items */
|
2010-06-09 14:33:57 -07:00
|
|
|
|
|
|
|
|
|
|
2010-05-02 13:41:38 -07:00
|
|
|
|
EAPI const Eina_List *elm_genlist_selected_items_get(const Evas_Object *obj);
|
|
|
|
|
EAPI Eina_List *elm_genlist_realized_items_get(const Evas_Object *obj);
|
2010-06-09 14:33:57 -07:00
|
|
|
|
|
2010-05-02 13:41:38 -07:00
|
|
|
|
/* available item styles:
|
|
|
|
|
* default
|
|
|
|
|
* default_style - The text part is a textblock
|
|
|
|
|
* double_label
|
|
|
|
|
* icon_top_text_bottom
|
|
|
|
|
*/
|
|
|
|
|
|
2010-06-02 14:27:50 -07:00
|
|
|
|
|
2010-05-02 13:41:38 -07:00
|
|
|
|
#endif // 0
|
|
|
|
|
|
|
|
|
|
} // end namespace Elmxx
|
|
|
|
|
|
|
|
|
|
#endif // ELMXX_GEN_LIST_H
|