parent
c6f69e07ee
commit
cce8cb5433
|
@ -20,11 +20,16 @@ public:
|
|||
// EAPI void elm_need_efreet(void);
|
||||
// EAPI void elm_need_e_dbus(void);
|
||||
|
||||
double getScale ();
|
||||
void setScale (double scale);
|
||||
static double getScale ();
|
||||
static void setScale (double scale);
|
||||
|
||||
// EAPI Evas_Coord elm_finger_size_get(void);
|
||||
// EAPI void elm_finger_size_set(Evas_Coord size);
|
||||
|
||||
/*!
|
||||
* Flush all caches & dump all data that can be to lean down to use less memory
|
||||
*/
|
||||
static void flushAll ();
|
||||
};
|
||||
|
||||
} // end namespace Elmxx
|
||||
|
|
|
@ -316,6 +316,14 @@ public:
|
|||
*/
|
||||
GenListItem *append (GenListColumnConstructor *construction, const GenListItem *parent, Elm_Genlist_Item_Flags flags, GenListColumnSelector *selection);
|
||||
|
||||
GenListItem *prepend (GenListColumnConstructor *construction, const GenListItem *parent, Elm_Genlist_Item_Flags flags, GenListColumnSelector *selection);
|
||||
|
||||
GenListItem *insertBefore (GenListColumnConstructor *construction, const GenListItem *parent, Elm_Genlist_Item_Flags flags, GenListColumnSelector *selection);
|
||||
|
||||
GenListItem *insertAfter (GenListColumnConstructor *construction, const GenListItem *parent, Elm_Genlist_Item_Flags flags, GenListColumnSelector *selection);
|
||||
|
||||
void del (GenListItem &item);
|
||||
|
||||
GenListItem *getItemSelected () const;
|
||||
|
||||
/*!
|
||||
|
@ -352,6 +360,16 @@ private:
|
|||
GenList (const GenList&); // forbid copy constructor
|
||||
GenList (Evasxx::Object &parent); // private construction -> use factory ()
|
||||
~GenList (); // forbid direct delete -> use Object::destroy()
|
||||
|
||||
enum InsertOperation
|
||||
{
|
||||
Append,
|
||||
Prepend,
|
||||
InsertAfter,
|
||||
InsertBefore
|
||||
};
|
||||
|
||||
GenListItem *insertInternal (GenListColumnConstructor *construction, GenList::InsertOperation op, const GenListItem *opItem, Elm_Genlist_Item_Flags flags, GenListColumnSelector *selection);
|
||||
|
||||
static void gl_sel (void *data, Evas_Object *obj, void *event_info);
|
||||
|
||||
|
|
|
@ -40,5 +40,10 @@ void Application::setScale (double scale)
|
|||
{
|
||||
elm_scale_set (scale);
|
||||
}
|
||||
|
||||
void Application::flushAll ()
|
||||
{
|
||||
elm_all_flush ();
|
||||
}
|
||||
|
||||
} // end namespace Elmxx
|
||||
|
|
|
@ -146,6 +146,26 @@ void GenList::glSelected (GenListColumnSelector &selection, const Evasxx::Object
|
|||
/* operations to add items */
|
||||
|
||||
GenListItem *GenList::append (GenListColumnConstructor *construction, const GenListItem *parent, Elm_Genlist_Item_Flags flags, GenListColumnSelector *selection)
|
||||
{
|
||||
insertInternal (construction, GenList::Append, parent, flags, selection);
|
||||
}
|
||||
|
||||
GenListItem *GenList::prepend (GenListColumnConstructor *construction, const GenListItem *parent, Elm_Genlist_Item_Flags flags, GenListColumnSelector *selection)
|
||||
{
|
||||
insertInternal (construction, GenList::Prepend, parent, flags, selection);
|
||||
}
|
||||
|
||||
GenListItem *GenList::insertBefore (GenListColumnConstructor *construction, const GenListItem *parent, Elm_Genlist_Item_Flags flags, GenListColumnSelector *selection)
|
||||
{
|
||||
insertInternal (construction, GenList::InsertBefore, parent, flags, selection);
|
||||
}
|
||||
|
||||
GenListItem *GenList::insertAfter (GenListColumnConstructor *construction, const GenListItem *parent, Elm_Genlist_Item_Flags flags, GenListColumnSelector *selection)
|
||||
{
|
||||
insertInternal (construction, GenList::InsertAfter, parent, flags, selection);
|
||||
}
|
||||
|
||||
GenListItem *GenList::insertInternal (GenListColumnConstructor *construction, GenList::InsertOperation op, const GenListItem *opItem, Elm_Genlist_Item_Flags flags, GenListColumnSelector *selection)
|
||||
{
|
||||
assert (mModel);
|
||||
|
||||
|
@ -172,12 +192,44 @@ GenListItem *GenList::append (GenListColumnConstructor *construction, const GenL
|
|||
construction->mDataModel = mModel;
|
||||
selection->mGenList = this;
|
||||
|
||||
gli = elm_genlist_item_append (o, &mModel->mGLIC,
|
||||
construction /* item data */,
|
||||
parent ? parent->mItem : NULL /* parent */,
|
||||
flags,
|
||||
GenList::gl_sel/* func */,
|
||||
selection /* func data */);
|
||||
switch (op)
|
||||
{
|
||||
case Append:
|
||||
gli = elm_genlist_item_append (o, &mModel->mGLIC,
|
||||
construction /* item data */,
|
||||
opItem ? opItem->mItem : NULL /* parent */,
|
||||
flags,
|
||||
GenList::gl_sel/* func */,
|
||||
selection /* func data */);
|
||||
break;
|
||||
|
||||
case Prepend:
|
||||
gli = elm_genlist_item_prepend (o, &mModel->mGLIC,
|
||||
construction /* item data */,
|
||||
opItem ? opItem->mItem : NULL /* parent */,
|
||||
flags,
|
||||
GenList::gl_sel/* func */,
|
||||
selection /* func data */);
|
||||
break;
|
||||
|
||||
case InsertBefore:
|
||||
gli = elm_genlist_item_insert_before (o, &mModel->mGLIC,
|
||||
construction /* item data */,
|
||||
opItem ? opItem->mItem : NULL /* parent */,
|
||||
flags,
|
||||
GenList::gl_sel/* func */,
|
||||
selection /* func data */);
|
||||
break;
|
||||
|
||||
case InsertAfter:
|
||||
gli = elm_genlist_item_insert_after (o, &mModel->mGLIC,
|
||||
construction /* item data */,
|
||||
opItem ? opItem->mItem : NULL /* parent */,
|
||||
flags,
|
||||
GenList::gl_sel/* func */,
|
||||
selection /* func data */);
|
||||
break;
|
||||
}
|
||||
|
||||
GenListItem *item = GenListItem::wrap (*gli, *mModel);
|
||||
|
||||
|
@ -200,6 +252,11 @@ GenListItem *GenList::append (GenListColumnConstructor *construction, const GenL
|
|||
return item;
|
||||
}
|
||||
|
||||
void GenList::del (GenListItem &item)
|
||||
{
|
||||
elm_genlist_item_del (item.mItem);
|
||||
}
|
||||
|
||||
GenListItem *GenList::getItemSelected () const
|
||||
{
|
||||
Elm_Genlist_Item *item = elm_genlist_selected_item_get (o);
|
||||
|
|
Loading…
Reference in New Issue