BINDINGS/cxx elementaryxx: Removed trailing whitespaces.
SVN revision: 58633
This commit is contained in:
parent
a077647bd1
commit
e60c24a833
|
@ -32,7 +32,7 @@ int main (int argc, char **argv)
|
|||
|
||||
Window *elmWin = Window::factory ("window1", ELM_WIN_BASIC);
|
||||
elmWin->getEventSignal ("delete-request")->connect (sigc::ptr_fun (&my_win_del));
|
||||
|
||||
|
||||
Background *bg = Background::factory (*elmWin);
|
||||
|
||||
// TODO wrap this
|
||||
|
@ -110,7 +110,7 @@ int main (int argc, char **argv)
|
|||
{
|
||||
cerr << ene.what () << endl;
|
||||
}
|
||||
|
||||
|
||||
// This External access is save as it only calls the ExternalParam interface
|
||||
try
|
||||
{
|
||||
|
@ -126,7 +126,7 @@ int main (int argc, char **argv)
|
|||
{
|
||||
cerr << pne.what () << endl;
|
||||
}
|
||||
|
||||
|
||||
bg->setWeightHintSize (1.0, 1.0);
|
||||
elmWin->addObjectResize (*bg);
|
||||
|
||||
|
@ -138,9 +138,9 @@ int main (int argc, char **argv)
|
|||
* with evas_object_size_hint_min_set() at the same size to make a
|
||||
* window not resizable */
|
||||
bg->setMaxHintSize (Size (640, 640));
|
||||
|
||||
|
||||
elmWin->setTitle ("Elementaryxx Simple Example");
|
||||
|
||||
|
||||
elmWin->setAutoDel (true);
|
||||
|
||||
elmWin->show ();
|
||||
|
|
|
@ -87,7 +87,7 @@ int main (int argc, char **argv)
|
|||
* the evas object returned - the window will respond. elm_win makes sure
|
||||
* of that so you can blindly treat it like any other evas object
|
||||
* pretty much, just as long as you know it has special significance */
|
||||
|
||||
|
||||
/* the first parameter is a "parent" window - eg for a dialog you want to
|
||||
* have a main window it is related to, here it is NULL meaning there
|
||||
* is no parent. "main" is the name of the window - used by the window
|
||||
|
@ -95,7 +95,7 @@ int main (int argc, char **argv)
|
|||
* within this application (and all instances of the application). the
|
||||
* type is a basic window (the final parameter) */
|
||||
Window *win = Window::factory ("main", ELM_WIN_BASIC);
|
||||
|
||||
|
||||
/* set the title of the window - this is in the titlebar */
|
||||
win->setTitle ("Elementary Tests");
|
||||
|
||||
|
@ -105,7 +105,7 @@ int main (int argc, char **argv)
|
|||
* case it is NULL). This is how you can pass specific things to a
|
||||
* callback like objects or data layered on top */
|
||||
win->getEventSignal ("delete-request")->connect (sigc::ptr_fun (&my_win_del));
|
||||
|
||||
|
||||
/* add a background to our window. this just uses the standard theme set
|
||||
* background. without a backgorund, you could make a window seem
|
||||
* transparent with elm_win_alpha_set(win, 1); for example. if you have
|
||||
|
@ -152,7 +152,7 @@ int main (int argc, char **argv)
|
|||
li->setAlignHintSize (EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||
bx0->packEnd (*li);
|
||||
li->show ();
|
||||
|
||||
|
||||
li->append ("Bg Plain", test_bg_plain, NULL);
|
||||
li->append ("Bg Image", test_bg_image, NULL);
|
||||
li->append ("Icon Transparent", test_icon, NULL);
|
||||
|
@ -212,7 +212,7 @@ int main (int argc, char **argv)
|
|||
li->append ("Panel", test_panel, NULL);
|
||||
|
||||
li->go ();
|
||||
|
||||
|
||||
/* set an initial window size */
|
||||
win->resize (Size (240, 480));
|
||||
/* show the window */
|
||||
|
|
|
@ -43,7 +43,7 @@ void test_bg_image (void *data, Evas_Object *obj, void *event_info)
|
|||
|
||||
bg->setMinHintSize (size160x160);
|
||||
bg->setMaxHintSize (size640x640);
|
||||
|
||||
|
||||
win->resize (Size (size320x320));
|
||||
win->show ();
|
||||
}
|
||||
|
|
|
@ -31,7 +31,7 @@ void test_box_vert (void *data, Evas_Object *obj, void *event_info)
|
|||
ic2->setAlignHintSize (0.0, 0.5);
|
||||
bx->packEnd (*ic2);
|
||||
ic2->show ();
|
||||
|
||||
|
||||
Icon *ic3 = Icon::factory (*win);
|
||||
ic3->setFile (searchPixmapFile ("elementaryxx/logo_small.png"));
|
||||
ic3->setScale (false, false);
|
||||
|
@ -47,12 +47,12 @@ void test_box_horiz (void *data, Evas_Object *obj, void *event_info)
|
|||
Window *win = Window::factory ("box-horiz", ELM_WIN_BASIC);
|
||||
win->setTitle ("Box Horiz");
|
||||
win->setAutoDel (true);
|
||||
|
||||
|
||||
Background *bg = Background::factory (*win);
|
||||
win->addObjectResize (*bg);
|
||||
bg->setWeightHintSize (EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
bg->show ();
|
||||
|
||||
|
||||
Box *bx = Box::factory (*win);
|
||||
bx->setOrientation (Box::Horizontal);
|
||||
win->addObjectResize (*bx);
|
||||
|
@ -72,7 +72,7 @@ void test_box_horiz (void *data, Evas_Object *obj, void *event_info)
|
|||
ic2->setAlignHintSize (0.5, 0.0);
|
||||
bx->packEnd (*ic2);
|
||||
ic2->show ();
|
||||
|
||||
|
||||
Icon *ic3 = Icon::factory (*win);
|
||||
ic3->setFile (searchPixmapFile ("elementaryxx/logo_small.png"));
|
||||
ic3->setScale (false, false);
|
||||
|
|
|
@ -4,16 +4,16 @@ void test_button (void *data, Evas_Object *obj, void *event_info)
|
|||
{
|
||||
Icon *ic = NULL;
|
||||
Button *bt = NULL;
|
||||
|
||||
|
||||
Window *win = Window::factory ("buttons", ELM_WIN_BASIC);
|
||||
win->setTitle ("Buttons");
|
||||
win->setAutoDel (true);
|
||||
|
||||
|
||||
Background *bg = Background::factory (*win);
|
||||
win->addObjectResize (*bg);
|
||||
bg->setWeightHintSize (EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
bg->show ();
|
||||
|
||||
|
||||
Box *bx = Box::factory (*win);
|
||||
win->addObjectResize (*bx);
|
||||
bx->setWeightHintSize (EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
|
@ -28,7 +28,7 @@ void test_button (void *data, Evas_Object *obj, void *event_info)
|
|||
bx->packEnd (*bt);
|
||||
bt->show ();
|
||||
ic->show ();
|
||||
|
||||
|
||||
ic = Icon::factory (*win);
|
||||
ic->setFile (searchPixmapFile ("elementaryxx/logo_small.png"));
|
||||
ic->setAspectHintSize (EVAS_ASPECT_CONTROL_VERTICAL, Size (1, 1));
|
||||
|
@ -64,6 +64,6 @@ void test_button (void *data, Evas_Object *obj, void *event_info)
|
|||
bx->packEnd (*bt);
|
||||
bt->show ();
|
||||
ic->show ();
|
||||
|
||||
|
||||
win->show ();
|
||||
}
|
|
@ -5,12 +5,12 @@ void test_clock (void *data, Evas_Object *obj, void *event_info)
|
|||
Window *win = Window::factory ("clock", ELM_WIN_BASIC);
|
||||
win->setTitle ("Clock");
|
||||
win->setAutoDel (true);
|
||||
|
||||
|
||||
Background *bg = Background::factory (*win);
|
||||
win->addObjectResize (*bg);
|
||||
bg->setWeightHintSize (EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
bg->show ();
|
||||
|
||||
|
||||
Box *bx = Box::factory (*win);
|
||||
win->addObjectResize (*bx);
|
||||
bx->setWeightHintSize (EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
|
@ -19,7 +19,7 @@ void test_clock (void *data, Evas_Object *obj, void *event_info)
|
|||
Clock *ck = Clock::factory (*win);
|
||||
bx->packEnd (*ck);
|
||||
ck->show ();
|
||||
|
||||
|
||||
Clock *ck2 = Clock::factory (*win);
|
||||
ck2->setShowAmPm (true);
|
||||
bx->packEnd (*ck2);
|
||||
|
|
|
@ -25,16 +25,16 @@ static void my_entry_bt_4 (Evasxx::Object &obj, void *event_info, Entry *en)
|
|||
void test_entry (void *data, Evas_Object *obj, void *event_info)
|
||||
{
|
||||
Button *bt = NULL;
|
||||
|
||||
|
||||
Window *win = Window::factory ("entry", ELM_WIN_BASIC);
|
||||
win->setTitle ("Entry");
|
||||
win->setAutoDel (true);
|
||||
|
||||
|
||||
Background *bg = Background::factory (*win);
|
||||
win->addObjectResize (*bg);
|
||||
bg->setWeightHintSize (EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
bg->show ();
|
||||
|
||||
|
||||
Box *bx = Box::factory (*win);
|
||||
bx->setWeightHintSize (EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
win->addObjectResize (*bx);
|
||||
|
@ -104,16 +104,16 @@ void test_entry_scolled (void *data, Evas_Object *obj, void *event_info)
|
|||
Button *bt = NULL;
|
||||
Entry *en = NULL;
|
||||
Scroller *sc = NULL;
|
||||
|
||||
|
||||
Window *win = Window::factory ("entry-scrolled", ELM_WIN_BASIC);
|
||||
win->setTitle ("Entry Scrolled");
|
||||
win->setAutoDel (true);
|
||||
|
||||
|
||||
Background *bg = Background::factory (*win);
|
||||
win->addObjectResize (*bg);
|
||||
bg->setWeightHintSize (EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
bg->show ();
|
||||
|
||||
|
||||
Box *bx = Box::factory (*win);
|
||||
bx->setWeightHintSize (EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
win->addObjectResize (*bx);
|
||||
|
|
|
@ -13,10 +13,10 @@ public:
|
|||
GenListColumnConstructor1 () :
|
||||
mItemNum (0)
|
||||
{}
|
||||
|
||||
|
||||
void setItemNum (int num) {mItemNum = num;}
|
||||
int getItemNum () const {return mItemNum;}
|
||||
|
||||
|
||||
private:
|
||||
int mItemNum;
|
||||
};
|
||||
|
@ -30,19 +30,19 @@ public:
|
|||
~GenListDataModel1 () {}
|
||||
|
||||
std::string getLabel (GenListColumnConstructor *construction, Evasxx::Object &obj, const std::string &part) const
|
||||
{
|
||||
{
|
||||
GenListColumnConstructor1 *construct1 = static_cast <GenListColumnConstructor1*> (construction);
|
||||
cout << "GenListDataModel::getLabel" << endl;
|
||||
|
||||
return "Item " + toString <int> (construct1->getItemNum ());
|
||||
}
|
||||
|
||||
|
||||
Elmxx::Object *getIcon (GenListColumnConstructor *construction, Evasxx::Object &obj, const std::string &part)
|
||||
{
|
||||
Icon *ic = Icon::factory (obj);
|
||||
ic->setFile (searchPixmapFile ("elementaryxx/logo_small.png"));
|
||||
ic->setAspectHintSize (EVAS_ASPECT_CONTROL_VERTICAL, Eflxx::Size (1, 1));
|
||||
|
||||
|
||||
//part: elm.swallow.icon
|
||||
//part: elm.swallow.end
|
||||
|
||||
|
@ -60,7 +60,7 @@ class GenListColumnSelector1 : public GenListColumnSelector
|
|||
public:
|
||||
void setItemNum (int num) {mItemNum = num;}
|
||||
int getItemNum () const {return mItemNum;}
|
||||
|
||||
|
||||
private:
|
||||
int mItemNum;
|
||||
};
|
||||
|
@ -78,12 +78,12 @@ std::vector <GenListColumnConstructor1*> constructList1;
|
|||
* Hint: 'selectList1' isn't cleaned up at exit. Normal applications should do this.
|
||||
* This could be done at the GenList or Window destructor. For this example it's ok...
|
||||
*/
|
||||
std::vector <GenListColumnSelector1*> selectList1;
|
||||
std::vector <GenListColumnSelector1*> selectList1;
|
||||
|
||||
void glSelected (GenListColumnSelector &selection, const Evasxx::Object &obj, void *event_info)
|
||||
{
|
||||
GenListColumnSelector1 *selection1 = static_cast <GenListColumnSelector1*> (&selection);
|
||||
|
||||
|
||||
cout << "glSelected: " << selection1->getItemNum () << endl;
|
||||
}
|
||||
|
||||
|
@ -91,7 +91,7 @@ void _move (const Evasxx::MouseMoveEvent &ev, GenList *gl)
|
|||
{
|
||||
int where = 0;
|
||||
Eflxx::Point pos (ev.data->cur.canvas.x, ev.data->cur.canvas.y);
|
||||
|
||||
|
||||
GenListItem *gli = gl->getItemAtXY (pos, where);
|
||||
|
||||
if (gli)
|
||||
|
@ -135,17 +135,17 @@ void test_genlist (void *data, Evas_Object *obj, void *event_info)
|
|||
Window *win = Window::factory ("genlist", ELM_WIN_BASIC);
|
||||
win->setTitle ("GenList");
|
||||
win->setAutoDel (true);
|
||||
|
||||
|
||||
Background *bg = Background::factory (*win);
|
||||
win->addObjectResize (*bg);
|
||||
bg->setWeightHintSize (EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
bg->show ();
|
||||
|
||||
|
||||
Box *bx = Box::factory (*win);
|
||||
bx->setWeightHintSize (EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
win->addObjectResize (*bx);
|
||||
bx->show ();
|
||||
|
||||
|
||||
GenList *gl = GenList::factory (*win);
|
||||
gl->getEventSignal ("selected")->connect (sigc::ptr_fun (&_gl_selected));
|
||||
gl->getEventSignal ("clicked")->connect (sigc::ptr_fun (&_gl_clicked));
|
||||
|
@ -159,7 +159,7 @@ void test_genlist (void *data, Evas_Object *obj, void *event_info)
|
|||
gl->show ();
|
||||
|
||||
Eflxx::CountedPtr <Evasxx::Canvas> canvas (win->getEvas ());
|
||||
|
||||
|
||||
Evasxx::Rectangle *over = new Evasxx::Rectangle (*canvas);
|
||||
over->setColor (Eflxx::Color (0, 0, 0, 0));
|
||||
over->signalHandleMouseMove.connect (sigc::bind (sigc::ptr_fun (&_move), gl));
|
||||
|
@ -177,11 +177,11 @@ void test_genlist (void *data, Evas_Object *obj, void *event_info)
|
|||
bt_1500->setLabel ("Go to 1500");
|
||||
bx->packEnd (*bt_1500);
|
||||
bt_1500->show ();
|
||||
|
||||
|
||||
gl->setDataModel (model);
|
||||
|
||||
|
||||
gl->signalSelect.connect (sigc::ptr_fun (&glSelected));
|
||||
|
||||
|
||||
for (int i = 0; i < 2000; i++)
|
||||
{
|
||||
GenListColumnConstructor1 *construct1 = new GenListColumnConstructor1 ();
|
||||
|
@ -189,7 +189,7 @@ void test_genlist (void *data, Evas_Object *obj, void *event_info)
|
|||
|
||||
GenListColumnSelector1 *select1 = new GenListColumnSelector1 ();
|
||||
select1->setItemNum (i * 10);
|
||||
|
||||
|
||||
GenListItem *gli = gl->append (construct1, NULL, ELM_GENLIST_ITEM_NONE, select1);
|
||||
|
||||
constructList1.push_back (construct1);
|
||||
|
@ -204,7 +204,7 @@ void test_genlist (void *data, Evas_Object *obj, void *event_info)
|
|||
bt_1500->getEventSignal ("clicked")->connect (sigc::bind (sigc::ptr_fun (&_bt1500_cb), gli));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
win->resize (Size (480, 800));
|
||||
win->show ();
|
||||
}
|
||||
|
@ -225,7 +225,7 @@ static void my_gl_add (Evasxx::Object &obj, void *event_info, GenList *gl)
|
|||
construct1->setItemNum (i);
|
||||
GenListColumnSelector1 *select1 = new GenListColumnSelector1 ();
|
||||
select1->setItemNum (i*10);
|
||||
|
||||
|
||||
GenListItem *gli = gl->append (construct1, NULL, ELM_GENLIST_ITEM_NONE, select1);
|
||||
|
||||
i++;
|
||||
|
@ -235,7 +235,7 @@ static void my_gl_insert_before (Evasxx::Object &obj, void *event_info, GenList
|
|||
{
|
||||
static int i = 0;
|
||||
GenListItem *gliSel = gl->getItemSelected ();
|
||||
|
||||
|
||||
if (!gliSel)
|
||||
{
|
||||
cout << "no item selected" << endl;
|
||||
|
@ -247,7 +247,7 @@ static void my_gl_insert_before (Evasxx::Object &obj, void *event_info, GenList
|
|||
construct1->setItemNum (i);
|
||||
GenListColumnSelector1 *select1 = new GenListColumnSelector1 ();
|
||||
select1->setItemNum (i*10);
|
||||
|
||||
|
||||
GenListItem *gli = gl->insertBefore (construct1, gliSel, ELM_GENLIST_ITEM_NONE, select1);
|
||||
|
||||
i++;
|
||||
|
@ -257,7 +257,7 @@ static void my_gl_insert_after (Evasxx::Object &obj, void *event_info, GenList *
|
|||
{
|
||||
static int i = 0;
|
||||
GenListItem *gliSel = gl->getItemSelected ();
|
||||
|
||||
|
||||
if (!gliSel)
|
||||
{
|
||||
cout << "no item selected" << endl;
|
||||
|
@ -269,7 +269,7 @@ static void my_gl_insert_after (Evasxx::Object &obj, void *event_info, GenList *
|
|||
construct1->setItemNum (i);
|
||||
GenListColumnSelector1 *select1 = new GenListColumnSelector1 ();
|
||||
select1->setItemNum (i*10);
|
||||
|
||||
|
||||
GenListItem *gli = gl->insertAfter (construct1, gliSel, ELM_GENLIST_ITEM_NONE, select1);
|
||||
|
||||
i++;
|
||||
|
@ -310,7 +310,7 @@ static void my_gl_update_all (Evasxx::Object &obj, void *event_info, GenList *gl
|
|||
it->update ();
|
||||
cout << i << endl;
|
||||
i++;
|
||||
|
||||
|
||||
//it = elm_genlist_item_next_get(it);
|
||||
}*/
|
||||
}
|
||||
|
@ -323,7 +323,7 @@ static void my_gl_first (Evasxx::Object &obj, void *event_info, GenList *gl)
|
|||
|
||||
if (!gli)
|
||||
return;
|
||||
|
||||
|
||||
gli->show ();
|
||||
gli->setSelected (true);
|
||||
}
|
||||
|
@ -334,7 +334,7 @@ static void my_gl_last (Evasxx::Object &obj, void *event_info, GenList *gl)
|
|||
|
||||
if (!gli)
|
||||
return;
|
||||
|
||||
|
||||
gli->show ();
|
||||
gli->setSelected (true);
|
||||
}
|
||||
|
@ -357,17 +357,17 @@ test_genlist2(void *data, Evas_Object *obj, void *event_info)
|
|||
|
||||
Button *bt = NULL;
|
||||
Box *bx2 = NULL;
|
||||
|
||||
|
||||
Window *win = Window::factory ("genlist-2", ELM_WIN_BASIC);
|
||||
win->setTitle ("GenList 2");
|
||||
win->setAutoDel (true);
|
||||
|
||||
|
||||
Background *bg = Background::factory (*win);
|
||||
win->addObjectResize (*bg);
|
||||
bg->setFile (searchPixmapFile ("elementaryxx/plant_01.jpg"));
|
||||
bg->setWeightHintSize (EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
bg->show ();
|
||||
|
||||
|
||||
Box *bx = Box::factory (*win);
|
||||
bx->setWeightHintSize (EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
win->addObjectResize (*bx);
|
||||
|
@ -465,7 +465,7 @@ test_genlist2(void *data, Evas_Object *obj, void *event_info)
|
|||
bt->setAlignHintSize (EVAS_HINT_FILL, EVAS_HINT_FILL);/*************/
|
||||
bt->setWeightHintSize (EVAS_HINT_EXPAND, 0.0);
|
||||
bx2->packEnd (*bt);
|
||||
bt->show ();
|
||||
bt->show ();
|
||||
|
||||
bx->packEnd (*bx2);
|
||||
bx2->show ();
|
||||
|
@ -483,7 +483,7 @@ test_genlist2(void *data, Evas_Object *obj, void *event_info)
|
|||
bt->setAlignHintSize (EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||
bt->setWeightHintSize (EVAS_HINT_EXPAND, 0.0);
|
||||
bx2->packEnd (*bt);
|
||||
bt->show ();
|
||||
bt->show ();
|
||||
|
||||
bt = Button::factory (*win);
|
||||
bt->setLabel ("+");
|
||||
|
@ -491,7 +491,7 @@ test_genlist2(void *data, Evas_Object *obj, void *event_info)
|
|||
bt->setAlignHintSize (EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||
bt->setWeightHintSize (EVAS_HINT_EXPAND, 0.0);
|
||||
bx2->packEnd (*bt);
|
||||
bt->show ();
|
||||
bt->show ();
|
||||
|
||||
bt = Button::factory (*win);
|
||||
bt->setLabel ("-");
|
||||
|
@ -499,8 +499,8 @@ test_genlist2(void *data, Evas_Object *obj, void *event_info)
|
|||
bt->setAlignHintSize (EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||
bt->setWeightHintSize (EVAS_HINT_EXPAND, 0.0);
|
||||
bx2->packEnd (*bt);
|
||||
bt->show ();
|
||||
|
||||
bt->show ();
|
||||
|
||||
bx->packEnd (*bx2);
|
||||
bx2->show ();
|
||||
|
||||
|
@ -509,14 +509,14 @@ test_genlist2(void *data, Evas_Object *obj, void *event_info)
|
|||
bx3->setHomogenous (true);
|
||||
bx3->setWeightHintSize (EVAS_HINT_EXPAND, 0.0);
|
||||
bx3->setAlignHintSize (EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||
|
||||
|
||||
bt = Button::factory (*win);
|
||||
bt->setLabel ("+ before");
|
||||
bt->getEventSignal ("clicked")->connect (sigc::bind (sigc::ptr_fun (&my_gl_insert_before), gl));
|
||||
bt->setAlignHintSize (EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||
bt->setWeightHintSize (EVAS_HINT_EXPAND, 0.0);
|
||||
bx3->packEnd (*bt);
|
||||
bt->show ();
|
||||
bt->show ();
|
||||
|
||||
bt = Button::factory (*win);
|
||||
bt->setLabel ("+ after");
|
||||
|
@ -533,7 +533,7 @@ test_genlist2(void *data, Evas_Object *obj, void *event_info)
|
|||
bt->setWeightHintSize (EVAS_HINT_EXPAND, 0.0);
|
||||
bx3->packEnd (*bt);
|
||||
bt->show ();
|
||||
|
||||
|
||||
bx->packEnd (*bx3);
|
||||
bx3->show ();
|
||||
|
||||
|
@ -555,10 +555,10 @@ public:
|
|||
GenListColumnConstructor3 () :
|
||||
mTestItem (NULL)
|
||||
{}
|
||||
|
||||
|
||||
void setTestItem (TestItem *testItem) {mTestItem = testItem;}
|
||||
TestItem *getTestItem () const {return mTestItem;}
|
||||
|
||||
|
||||
private:
|
||||
TestItem *mTestItem;
|
||||
};
|
||||
|
@ -569,10 +569,10 @@ public:
|
|||
GenListColumnSelector3 () :
|
||||
mTestItem (NULL)
|
||||
{}
|
||||
|
||||
|
||||
void setTestItem (TestItem *testItem) {mTestItem = testItem;}
|
||||
TestItem *getTestItem () const {return mTestItem;}
|
||||
|
||||
|
||||
private:
|
||||
TestItem *mTestItem;
|
||||
};
|
||||
|
@ -586,18 +586,18 @@ public:
|
|||
~GenListDataModel3 () {}
|
||||
|
||||
std::string getLabel (GenListColumnConstructor *construction, Evasxx::Object &obj, const std::string &part) const
|
||||
{
|
||||
{
|
||||
GenListColumnConstructor3 *construct1 = static_cast <GenListColumnConstructor3*> (construction);
|
||||
cout << "GenListDataModel::getLabel" << endl;
|
||||
|
||||
return "Item mode " + toString <int> (construct1->getTestItem ()->mode);
|
||||
}
|
||||
|
||||
|
||||
Elmxx::Object *getIcon (GenListColumnConstructor *construction, Evasxx::Object &obj, const std::string &part)
|
||||
{
|
||||
GenListColumnConstructor3 *construct1 = static_cast <GenListColumnConstructor3*> (construction);
|
||||
int mode = construct1->getTestItem ()->mode;
|
||||
|
||||
|
||||
Icon *ic = Icon::factory (obj);
|
||||
|
||||
string iconName;
|
||||
|
@ -612,7 +612,7 @@ public:
|
|||
iconName = searchPixmapFile ("elementaryxx/panel_01.jpg");
|
||||
else if ((mode & 0x3) == 3)
|
||||
iconName = searchPixmapFile ("elementaryxx/rock_01.jpg");
|
||||
|
||||
|
||||
ic->setFile (iconName);
|
||||
}
|
||||
else if (part == "elm.swallow.end")
|
||||
|
@ -625,10 +625,10 @@ public:
|
|||
iconName = searchPixmapFile ("elementaryxx/sky_03.jpg");
|
||||
else if ((mode & 0x3) == 3)
|
||||
iconName = searchPixmapFile ("elementaryxx/sky_04.jpg");
|
||||
|
||||
|
||||
ic->setFile (iconName);
|
||||
}
|
||||
|
||||
|
||||
ic->setAspectHintSize (EVAS_ASPECT_CONTROL_VERTICAL, Eflxx::Size (1, 1));
|
||||
|
||||
return ic;
|
||||
|
@ -643,7 +643,7 @@ public:
|
|||
void glSelected3 (GenListColumnSelector &selection, const Evasxx::Object &obj, void *event_info)
|
||||
{
|
||||
GenListColumnSelector3 *selection1 = static_cast <GenListColumnSelector3*> (&selection);
|
||||
|
||||
|
||||
cout << "glSelected3 mode " << selection1->getTestItem ()->mode << endl;
|
||||
}
|
||||
|
||||
|
@ -658,12 +658,12 @@ void test_genlist3(void *data, Evas_Object *obj, void *event_info)
|
|||
Window *win = Window::factory ("genlist-3", ELM_WIN_BASIC);
|
||||
win->setTitle ("GenList 2");
|
||||
win->setAutoDel (true);
|
||||
|
||||
|
||||
Background *bg = Background::factory (*win);
|
||||
win->addObjectResize (*bg);
|
||||
bg->setWeightHintSize (EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
bg->show ();
|
||||
|
||||
|
||||
Box *bx = Box::factory (*win);
|
||||
bx->setWeightHintSize (EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
win->addObjectResize (*bx);
|
||||
|
@ -676,7 +676,7 @@ void test_genlist3(void *data, Evas_Object *obj, void *event_info)
|
|||
gl->show ();
|
||||
|
||||
gl->setDataModel (model3);
|
||||
|
||||
|
||||
gl->signalSelect.connect (sigc::ptr_fun (&glSelected3));
|
||||
|
||||
GenListColumnConstructor3 *construct1 = new GenListColumnConstructor3 ();
|
||||
|
@ -742,7 +742,7 @@ void test_genlist3(void *data, Evas_Object *obj, void *event_info)
|
|||
static void my_gl_item_check_changed (Evasxx::Object &obj, void *event_info, TestItem *tit)
|
||||
{
|
||||
Check *check = static_cast <Check*> (&obj);
|
||||
|
||||
|
||||
tit->onoff = check->getState ();
|
||||
printf("item %p onoff = %i\n", tit, tit->onoff);
|
||||
}
|
||||
|
@ -756,23 +756,23 @@ public:
|
|||
~GenListDataModel4 () {}
|
||||
|
||||
std::string getLabel (GenListColumnConstructor *construction, Evasxx::Object &obj, const std::string &part) const
|
||||
{
|
||||
{
|
||||
GenListColumnConstructor3 *construct1 = static_cast <GenListColumnConstructor3*> (construction);
|
||||
cout << "GenListDataModel::getLabel" << endl;
|
||||
|
||||
return "Item mode " + toString <int> (construct1->getTestItem ()->mode);
|
||||
}
|
||||
|
||||
|
||||
Elmxx::Object *getIcon (GenListColumnConstructor *construction, Evasxx::Object &obj, const std::string &part)
|
||||
{
|
||||
GenListColumnConstructor3 *construct1 = static_cast <GenListColumnConstructor3*> (construction);
|
||||
TestItem *tit = construct1->getTestItem ();
|
||||
|
||||
|
||||
if (part == "elm.swallow.icon")
|
||||
{
|
||||
Label *lb = Label::factory (obj);
|
||||
|
||||
lb->setLineWrap (true);
|
||||
lb->setLineWrap (true);
|
||||
lb->setWrapWidth (201);
|
||||
lb->setLabel ("ashj ascjscjh n asjkl hcjlh ls hzshnn zjh sh zxjcjsnd h dfw sdv edev efe fwefvv vsd cvs ws wf fvwf wd fwe f we wef we wfe rfwewef wfv wswf wefg sdfws w wsdcfwcf wsc vdv sdsd sdcd cv wsc sdcv wsc d sdcdcsd sdcdsc wdvd sdcsd wscxcv wssvd sd");
|
||||
lb->show ();
|
||||
|
@ -782,7 +782,7 @@ public:
|
|||
else if (part == "elm.swallow.end")
|
||||
{
|
||||
Check *ck = Check::factory (obj);
|
||||
|
||||
|
||||
ck->setEventsPropagate (false);
|
||||
ck->setState (tit->onoff);
|
||||
ck->getEventSignal ("changed")->connect (sigc::bind (sigc::ptr_fun (&my_gl_item_check_changed), tit));
|
||||
|
@ -810,12 +810,12 @@ void test_genlist4 (void *data, Evas_Object *obj, void *event_info)
|
|||
Window *win = Window::factory ("genlist-4", ELM_WIN_BASIC);
|
||||
win->setTitle ("GenList 4");
|
||||
win->setAutoDel (true);
|
||||
|
||||
|
||||
Background *bg = Background::factory (*win);
|
||||
win->addObjectResize (*bg);
|
||||
bg->setWeightHintSize (EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
bg->show ();
|
||||
|
||||
|
||||
Box *bx = Box::factory (*win);
|
||||
bx->setWeightHintSize (EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
win->addObjectResize (*bx);
|
||||
|
@ -827,7 +827,7 @@ void test_genlist4 (void *data, Evas_Object *obj, void *event_info)
|
|||
gl->show ();
|
||||
|
||||
gl->signalSelect.connect (sigc::ptr_fun (&glSelected3));
|
||||
|
||||
|
||||
gl->setDataModel (model4);
|
||||
|
||||
GenListColumnConstructor3 *construct1 = new GenListColumnConstructor3 ();
|
||||
|
@ -890,7 +890,7 @@ void test_genlist4 (void *data, Evas_Object *obj, void *event_info)
|
|||
static void my_gl_item_check_changed2 (Evasxx::Object &obj, void *event_info, TestItem *tit)
|
||||
{
|
||||
Check *check = static_cast <Check*> (&obj);
|
||||
|
||||
|
||||
tit->onoff = check->getState ();
|
||||
printf("item %p onoff = %i\n", tit, tit->onoff);
|
||||
}
|
||||
|
@ -939,11 +939,11 @@ public:
|
|||
~GenListDataModel5 () {}
|
||||
|
||||
std::string getLabel (GenListColumnConstructor *construction, Evasxx::Object &obj, const std::string &part) const
|
||||
{
|
||||
{
|
||||
GenListColumnConstructor3 *construct1 = static_cast <GenListColumnConstructor3*> (construction);
|
||||
const TestItem *tit = construct1->getTestItem ();
|
||||
string buf;
|
||||
|
||||
|
||||
if (part == "elm.text")
|
||||
{
|
||||
buf = "Item mode " + toString <int> (tit->mode);
|
||||
|
@ -955,12 +955,12 @@ public:
|
|||
|
||||
return buf;
|
||||
}
|
||||
|
||||
|
||||
Elmxx::Object *getIcon (GenListColumnConstructor *construction, Evasxx::Object &obj, const std::string &part)
|
||||
{
|
||||
GenListColumnConstructor3 *construct1 = static_cast <GenListColumnConstructor3*> (construction);
|
||||
TestItem *tit = construct1->getTestItem ();
|
||||
|
||||
|
||||
if (part == "elm.swallow.icon")
|
||||
{
|
||||
Box *bx = Box::factory (obj);
|
||||
|
@ -978,14 +978,14 @@ public:
|
|||
else if (part == "elm.swallow.end")
|
||||
{
|
||||
Check *ck = Check::factory (obj);
|
||||
|
||||
|
||||
ck->setEventsPropagate (false);
|
||||
ck->setState (tit->onoff);
|
||||
ck->getEventSignal ("changed")->connect (sigc::bind (sigc::ptr_fun (&my_gl_item_check_changed2), tit));
|
||||
ck->show ();
|
||||
return ck;
|
||||
}
|
||||
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -1006,12 +1006,12 @@ void test_genlist5 (void *data, Evas_Object *obj, void *event_info)
|
|||
Window *win = Window::factory ("genlist-5", ELM_WIN_BASIC);
|
||||
win->setTitle ("GenList 5");
|
||||
win->setAutoDel (true);
|
||||
|
||||
|
||||
Background *bg = Background::factory (*win);
|
||||
win->addObjectResize (*bg);
|
||||
bg->setWeightHintSize (EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
bg->show ();
|
||||
|
||||
|
||||
Box *bx = Box::factory (*win);
|
||||
bx->setWeightHintSize (EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
win->addObjectResize (*bx);
|
||||
|
@ -1143,16 +1143,16 @@ public:
|
|||
~GenListDataModel6 () {}
|
||||
|
||||
std::string getLabel (GenListColumnConstructor *construction, Evasxx::Object &obj, const std::string &part) const
|
||||
{
|
||||
{
|
||||
GenListColumnConstructor1 *construct1 = static_cast <GenListColumnConstructor1*> (construction);
|
||||
|
||||
|
||||
return "Item mode " + toString <int> (construct1->getItemNum ());
|
||||
}
|
||||
|
||||
|
||||
Elmxx::Object *getIcon (GenListColumnConstructor *construction, Evasxx::Object &obj, const std::string &part)
|
||||
{
|
||||
GenListColumnConstructor1 *construct1 = static_cast <GenListColumnConstructor1*> (construction);
|
||||
|
||||
|
||||
if (part == "elm.swallow.icon")
|
||||
{
|
||||
Icon *ic = Icon::factory (obj);
|
||||
|
@ -1166,12 +1166,12 @@ public:
|
|||
else if (part == "elm.swallow.end")
|
||||
{
|
||||
Check *ck = Check::factory (obj);
|
||||
|
||||
|
||||
ck->setEventsPropagate (false);
|
||||
ck->show ();
|
||||
return ck;
|
||||
}
|
||||
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -1191,12 +1191,12 @@ void test_genlist6(void *data, Evas_Object *obj, void *event_info)
|
|||
Window *win = Window::factory ("genlist-tree", ELM_WIN_BASIC);
|
||||
win->setTitle ("GenList Tree");
|
||||
win->setAutoDel (true);
|
||||
|
||||
|
||||
Background *bg = Background::factory (*win);
|
||||
win->addObjectResize (*bg);
|
||||
bg->setWeightHintSize (EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
bg->show ();
|
||||
|
||||
|
||||
Box *bx = Box::factory (*win);
|
||||
bx->setWeightHintSize (EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
win->addObjectResize (*bx);
|
||||
|
@ -1227,7 +1227,7 @@ void test_genlist6(void *data, Evas_Object *obj, void *event_info)
|
|||
bt->getEventSignal ("contract,request")->connect (sigc::bind (sigc::ptr_fun (&gl4_con_req), gl));
|
||||
bt->getEventSignal ("expanded")->connect (sigc::bind (sigc::ptr_fun (&gl4_exp), gl));
|
||||
bt->getEventSignal ("contracted")->connect (sigc::bind (sigc::ptr_fun (&gl4_con), gl));
|
||||
|
||||
|
||||
bx->packEnd (*gl);
|
||||
bx->show ();
|
||||
|
||||
|
@ -1263,7 +1263,7 @@ void test_genlist6(void *data, Evas_Object *obj, void *event_info)
|
|||
|
||||
bx->packEnd (*bx2);
|
||||
bx2->show ();
|
||||
|
||||
|
||||
win->resize (size320x320);
|
||||
win->show ();
|
||||
}
|
||||
|
|
|
@ -11,11 +11,11 @@ void test_hover (void *data, Evas_Object *obj, void *event_info)
|
|||
{
|
||||
Button *bt = NULL;
|
||||
Box *bx = NULL;
|
||||
|
||||
|
||||
Window *win = Window::factory ("hover", ELM_WIN_BASIC);
|
||||
win->setTitle ("Hover");
|
||||
win->setAutoDel (true);
|
||||
|
||||
|
||||
Background *bg = Background::factory (*win);
|
||||
win->addObjectResize (*bg);
|
||||
bg->setWeightHintSize (EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
|
@ -93,16 +93,16 @@ void test_hover2 (void *data, Evas_Object *obj, void *event_info)
|
|||
{
|
||||
Box *bx = NULL;
|
||||
Button *bt = NULL;
|
||||
|
||||
|
||||
Window *win = Window::factory ("hover2", ELM_WIN_BASIC);
|
||||
win->setTitle ("Hover 2");
|
||||
win->setAutoDel (true);
|
||||
|
||||
|
||||
Background *bg = Background::factory (*win);
|
||||
win->addObjectResize (*bg);
|
||||
bg->setWeightHintSize (EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
bg->show ();
|
||||
|
||||
|
||||
bx = Box::factory (*win);
|
||||
bx->setWeightHintSize (EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
win->addObjectResize (*bx);
|
||||
|
@ -131,7 +131,7 @@ void test_hover2 (void *data, Evas_Object *obj, void *event_info)
|
|||
ic->setScale (false, false);
|
||||
bx->packEnd (*ic);
|
||||
ic->show ();
|
||||
|
||||
|
||||
bt = Button::factory (*win);
|
||||
bt->setLabel ("Top 1");
|
||||
bx->packEnd (*bt);
|
||||
|
@ -165,7 +165,7 @@ void test_hover2 (void *data, Evas_Object *obj, void *event_info)
|
|||
bt->setLabel ("Right");
|
||||
hv->setContent ("right", *bt);
|
||||
bt->show ();
|
||||
|
||||
|
||||
bg->setMinHintSize (size160x160);
|
||||
bg->setMaxHintSize (size640x640);
|
||||
win->resize (size320x320);
|
||||
|
|
|
@ -7,7 +7,7 @@ void test_layout (void *data, Evas_Object *obj, void *event_info)
|
|||
Window *win = Window::factory ("layout", ELM_WIN_BASIC);
|
||||
win->setTitle ("Layout");
|
||||
win->setAutoDel (true);
|
||||
|
||||
|
||||
Background *bg = Background::factory (*win);
|
||||
win->addObjectResize (*bg);
|
||||
bg->setWeightHintSize (EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
|
|
|
@ -12,10 +12,10 @@ public:
|
|||
GenListColumnConstructor1 () :
|
||||
mItemNum (0)
|
||||
{}
|
||||
|
||||
|
||||
void setItemNum (int num) {mItemNum = num;}
|
||||
int getItemNum () const {return mItemNum;}
|
||||
|
||||
|
||||
private:
|
||||
int mItemNum;
|
||||
};
|
||||
|
@ -29,14 +29,14 @@ public:
|
|||
~GenListDataModel1 () {}
|
||||
|
||||
std::string getLabel (GenListColumnConstructor *construction, Evasxx::Object &obj, const std::string &part) const
|
||||
{
|
||||
{
|
||||
GenListColumnConstructor1 *construct1 = static_cast <GenListColumnConstructor1*> (construction);
|
||||
cout << "GenListDataModel::getLabel" << endl;
|
||||
|
||||
//return strdup(ecore_file_file_get(data));
|
||||
return "Item " + toString <int> (construct1->getItemNum ());
|
||||
}
|
||||
|
||||
|
||||
Elmxx::Object *getIcon (GenListColumnConstructor *construction, Evasxx::Object &obj, const std::string &part)
|
||||
{
|
||||
Window *win = static_cast <Window*> (&obj);
|
||||
|
@ -45,7 +45,7 @@ public:
|
|||
ic->setAspectHintSize (EVAS_ASPECT_CONTROL_VERTICAL, Eflxx::Size (1, 1));
|
||||
|
||||
/*
|
||||
if (!strcmp(source, "elm.swallow.icon"))
|
||||
if (!strcmp(source, "elm.swallow.icon"))
|
||||
{
|
||||
Evas_Object *ic;
|
||||
|
||||
|
@ -60,7 +60,7 @@ public:
|
|||
}
|
||||
return NULL;
|
||||
*/
|
||||
|
||||
|
||||
//part: elm.swallow.icon
|
||||
//part: elm.swallow.end
|
||||
|
||||
|
@ -75,12 +75,12 @@ public:
|
|||
|
||||
static GenListDataModel1 model ("default");
|
||||
|
||||
void test_panel (void *data, Evas_Object *obj, void *event_info)
|
||||
void test_panel (void *data, Evas_Object *obj, void *event_info)
|
||||
{
|
||||
Window *win = Window::factory ("panel", ELM_WIN_BASIC);
|
||||
win->setTitle ("Panel");
|
||||
win->setAutoDel (true);
|
||||
|
||||
|
||||
Background *bg = Background::factory (*win);
|
||||
win->addObjectResize (*bg);
|
||||
bg->setWeightHintSize (EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
|
@ -90,7 +90,7 @@ void test_panel (void *data, Evas_Object *obj, void *event_info)
|
|||
bx->setWeightHintSize (EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
win->addObjectResize (*bx);
|
||||
bx->show ();
|
||||
|
||||
|
||||
Panel *panel = Panel::factory (*win);
|
||||
panel->setOrientation (ELM_PANEL_ORIENT_LEFT);
|
||||
panel->setWeightHintSize (EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
|
@ -118,14 +118,14 @@ void test_panel (void *data, Evas_Object *obj, void *event_info)
|
|||
#if 0
|
||||
|
||||
|
||||
static void
|
||||
_item_del(const void *data, Evas_Object *obj)
|
||||
static void
|
||||
_item_del(const void *data, Evas_Object *obj)
|
||||
{
|
||||
eina_stringshare_del(data);
|
||||
}
|
||||
#endif
|
||||
|
||||
static void _fill_list (Evasxx::Object *obj)
|
||||
static void _fill_list (Evasxx::Object *obj)
|
||||
{
|
||||
DIR *d;
|
||||
struct dirent *de;
|
||||
|
@ -133,7 +133,7 @@ static void _fill_list (Evasxx::Object *obj)
|
|||
char *real;
|
||||
|
||||
if (!(d = opendir(getenv("HOME")))) return;
|
||||
while ((de = readdir(d)) != NULL)
|
||||
while ((de = readdir(d)) != NULL)
|
||||
{
|
||||
char buff[PATH_MAX];
|
||||
|
||||
|
@ -147,17 +147,17 @@ static void _fill_list (Evasxx::Object *obj)
|
|||
|
||||
dirs = eina_list_sort(dirs, eina_list_count(dirs), EINA_COMPARE_CB(strcoll));
|
||||
#if 0
|
||||
EINA_LIST_FOREACH(dirs, l, real)
|
||||
EINA_LIST_FOREACH(dirs, l, real)
|
||||
{
|
||||
Eina_Bool result = EINA_FALSE;
|
||||
|
||||
result = _dir_has_subs(real);
|
||||
if (!result)
|
||||
elm_genlist_item_append(obj, &itc, eina_stringshare_add(real),
|
||||
if (!result)
|
||||
elm_genlist_item_append(obj, &itc, eina_stringshare_add(real),
|
||||
NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL);
|
||||
else
|
||||
elm_genlist_item_append(obj, &itc, eina_stringshare_add(real),
|
||||
NULL, ELM_GENLIST_ITEM_SUBITEMS,
|
||||
else
|
||||
elm_genlist_item_append(obj, &itc, eina_stringshare_add(real),
|
||||
NULL, ELM_GENLIST_ITEM_SUBITEMS,
|
||||
NULL, NULL);
|
||||
free(real);
|
||||
}
|
||||
|
@ -165,7 +165,7 @@ static void _fill_list (Evasxx::Object *obj)
|
|||
#endif
|
||||
}
|
||||
|
||||
static Eina_Bool _dir_has_subs(const char *path)
|
||||
static Eina_Bool _dir_has_subs(const char *path)
|
||||
{
|
||||
DIR *d;
|
||||
struct dirent *de;
|
||||
|
@ -173,13 +173,13 @@ static Eina_Bool _dir_has_subs(const char *path)
|
|||
|
||||
if (!path) return result;
|
||||
if (!(d = opendir(path))) return result;
|
||||
while ((de = readdir(d)) != NULL)
|
||||
while ((de = readdir(d)) != NULL)
|
||||
{
|
||||
char buff[PATH_MAX];
|
||||
|
||||
if (de->d_name[0] == '.') continue;
|
||||
snprintf(buff, sizeof(buff), "%s/%s", path, de->d_name);
|
||||
if (ecore_file_is_dir(buff))
|
||||
if (ecore_file_is_dir(buff))
|
||||
{
|
||||
result = EINA_TRUE;
|
||||
break;
|
||||
|
|
|
@ -22,21 +22,21 @@ static void _my_progressbar_value_set ()
|
|||
double progress;
|
||||
|
||||
progress = _test_progressbar.pb1->getValue ();
|
||||
|
||||
|
||||
if (progress < 1.0)
|
||||
{
|
||||
progress += 0.0123;
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
progress = 0.0;
|
||||
}
|
||||
|
||||
|
||||
_test_progressbar.pb1->setValue (progress);
|
||||
_test_progressbar.pb4->setValue (progress);
|
||||
_test_progressbar.pb3->setValue (progress);
|
||||
_test_progressbar.pb6->setValue (progress);
|
||||
|
||||
|
||||
if (progress > 1.0)
|
||||
{
|
||||
_test_progressbar.run = false;
|
||||
|
@ -50,7 +50,7 @@ static void my_progressbar_test_start (Evasxx::Object &obj, void *event_info)
|
|||
_test_progressbar.pb2->pulse (true);
|
||||
_test_progressbar.pb5->pulse (true);
|
||||
_test_progressbar.pb7->pulse (true);
|
||||
|
||||
|
||||
if (!_test_progressbar.run)
|
||||
{
|
||||
_test_progressbar.timer = new Ecorexx::Timer (0.1);
|
||||
|
@ -64,7 +64,7 @@ static void _test_stop ()
|
|||
_test_progressbar.pb2->pulse (false);
|
||||
_test_progressbar.pb5->pulse (false);
|
||||
_test_progressbar.pb7->pulse (false);
|
||||
|
||||
|
||||
if (_test_progressbar.run)
|
||||
{
|
||||
_test_progressbar.timer->del ();
|
||||
|
@ -89,31 +89,31 @@ void test_progressbar(void *data, Evas_Object *obj, void *event_info)
|
|||
Icon *ic1 = NULL;
|
||||
Icon *ic2 = NULL;
|
||||
Button *bt = NULL;
|
||||
|
||||
|
||||
// start in stop mode
|
||||
_test_progressbar.run = false;
|
||||
|
||||
|
||||
Window *win = Window::factory ("progressbar", ELM_WIN_BASIC);
|
||||
win->setTitle ("Progressbar");
|
||||
win->getEventSignal ("delete,request")->connect (sigc::ptr_fun (&my_progressbar_destroy));
|
||||
|
||||
|
||||
Background *bg = Background::factory (*win);
|
||||
win->addObjectResize (*bg);
|
||||
bg->setWeightHintSize (EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
bg->show ();
|
||||
|
||||
|
||||
Box *bx = Box::factory (*win);
|
||||
win->addObjectResize (*bx);
|
||||
bx->setWeightHintSize (EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
bx->show ();
|
||||
|
||||
|
||||
pb = Progressbar::factory (*win);
|
||||
pb->setWeightHintSize (EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
pb->setAlignHintSize (EVAS_HINT_FILL, 0.5);
|
||||
bx->packEnd (*pb);
|
||||
pb->show ();
|
||||
_test_progressbar.pb1 = pb;
|
||||
|
||||
|
||||
pb = Progressbar::factory (*win);
|
||||
pb->setAlignHintSize (EVAS_HINT_FILL, 0.5);
|
||||
pb->setWeightHintSize (EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
|
@ -122,11 +122,11 @@ void test_progressbar(void *data, Evas_Object *obj, void *event_info)
|
|||
bx->packEnd (*pb);
|
||||
pb->show ();
|
||||
_test_progressbar.pb2 = pb;
|
||||
|
||||
|
||||
ic1 = Icon::factory (*win);
|
||||
ic1->setFile (searchPixmapFile ("elementaryxx/logo_small.png"));
|
||||
ic1->setAspectHintSize (EVAS_ASPECT_CONTROL_VERTICAL, Size (1, 1));
|
||||
|
||||
|
||||
pb = Progressbar::factory (*win);
|
||||
pb->setLabel ("Label");
|
||||
pb->setIcon (*ic1);
|
||||
|
@ -146,7 +146,7 @@ void test_progressbar(void *data, Evas_Object *obj, void *event_info)
|
|||
hbx->setAlignHintSize (EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||
bx->packEnd (*hbx);
|
||||
hbx->show ();
|
||||
|
||||
|
||||
pb = Progressbar::factory (*win);
|
||||
pb->setOrientation (Progressbar::Vertical);
|
||||
pb->setAlignHintSize (EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||
|
@ -156,7 +156,7 @@ void test_progressbar(void *data, Evas_Object *obj, void *event_info)
|
|||
pb->setLabel ("percent");
|
||||
pb->show ();
|
||||
_test_progressbar.pb4 = pb;
|
||||
|
||||
|
||||
pb = Progressbar::factory (*win);
|
||||
pb->setOrientation (Progressbar::Vertical);
|
||||
pb->setAlignHintSize (EVAS_HINT_FILL, 0.5);
|
||||
|
@ -171,7 +171,7 @@ void test_progressbar(void *data, Evas_Object *obj, void *event_info)
|
|||
ic2 = Icon::factory (*win);
|
||||
ic2->setFile (searchPixmapFile ("elementaryxx/logo_small.png"));
|
||||
ic2->setAspectHintSize (EVAS_ASPECT_CONTROL_HORIZONTAL, Size (1, 1));
|
||||
|
||||
|
||||
pb = Progressbar::factory (*win);
|
||||
pb->setOrientation (Progressbar::Vertical);
|
||||
pb->setLabel ("Label");
|
||||
|
@ -184,7 +184,7 @@ void test_progressbar(void *data, Evas_Object *obj, void *event_info)
|
|||
hbx->packEnd (*pb);
|
||||
pb->show ();
|
||||
_test_progressbar.pb6 = pb;
|
||||
|
||||
|
||||
pb = Progressbar::factory (*win);
|
||||
pb->setStyle ("wheel");
|
||||
pb->setLabel ("Style: wheel");
|
||||
|
@ -193,13 +193,13 @@ void test_progressbar(void *data, Evas_Object *obj, void *event_info)
|
|||
bx->packEnd (*pb);
|
||||
pb->show ();
|
||||
_test_progressbar.pb7 = pb;
|
||||
|
||||
|
||||
Box *bt_bx = Box::factory (*win);
|
||||
bt_bx->setOrientation (Box::Horizontal);
|
||||
bt_bx->setWeightHintSize (EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
bx->packEnd (*bt_bx);
|
||||
bt_bx->show ();
|
||||
|
||||
|
||||
bt = Button::factory (*win);
|
||||
bt->setLabel ("Start");
|
||||
bt->getEventSignal ("clicked")->connect (sigc::ptr_fun (&my_progressbar_test_start));
|
||||
|
|
|
@ -5,21 +5,21 @@ void test_radio (void *data, Evas_Object *obj, void *event_info)
|
|||
Radio *rd = NULL;
|
||||
Radio *rdg = NULL;
|
||||
Icon *ic = NULL;
|
||||
|
||||
|
||||
Window *win = Window::factory ("radio", ELM_WIN_BASIC);
|
||||
win->setTitle ("Radios");
|
||||
win->setAutoDel (true);
|
||||
|
||||
|
||||
Background *bg = Background::factory (*win);
|
||||
win->addObjectResize (*bg);
|
||||
bg->setWeightHintSize (EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
bg->show ();
|
||||
|
||||
|
||||
Box *bx = Box::factory (*win);
|
||||
win->addObjectResize (*bx);
|
||||
bx->setWeightHintSize (EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
bx->show ();
|
||||
|
||||
|
||||
ic = Icon::factory (*win);
|
||||
ic->setFile (searchPixmapFile ("elementaryxx/logo_small.png"));
|
||||
ic->setAspectHintSize (EVAS_ASPECT_CONTROL_VERTICAL, Size (1, 1));
|
||||
|
@ -82,7 +82,7 @@ void test_radio (void *data, Evas_Object *obj, void *event_info)
|
|||
bx->packEnd (*rd);
|
||||
rd->show ();
|
||||
ic->show ();
|
||||
|
||||
|
||||
rdg->setValue (2);
|
||||
|
||||
win->show ();
|
||||
|
|
|
@ -23,7 +23,7 @@ void test_slider (void *data, Evas_Object *obj, void *event_info)
|
|||
ic->setFile (searchPixmapFile ("elementaryxx/logo_small.png"));
|
||||
ic->setAspectHintSize (EVAS_ASPECT_CONTROL_VERTICAL, Size (1, 1));
|
||||
ic->show ();
|
||||
|
||||
|
||||
sl = Slider::factory (*win);
|
||||
sl->setLabel ("Label");
|
||||
sl->setIcon (*ic);
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
void test_spinner(void *data, Evas_Object *obj, void *event_info)
|
||||
{
|
||||
Spinner *sp = NULL;
|
||||
|
||||
|
||||
Window *win = Window::factory ("spinner", ELM_WIN_BASIC);
|
||||
win->setTitle ("Spinner");
|
||||
win->setAutoDel (true);
|
||||
|
@ -27,7 +27,7 @@ void test_spinner(void *data, Evas_Object *obj, void *event_info)
|
|||
sp->setWeightHintSize (EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
bx->packEnd (*sp);
|
||||
sp->show ();
|
||||
|
||||
|
||||
sp = Spinner::factory (*win);
|
||||
sp->setLabelFormat ("%1.1f units");
|
||||
sp->setStep (1.3);
|
||||
|
@ -38,7 +38,7 @@ void test_spinner(void *data, Evas_Object *obj, void *event_info)
|
|||
sp->setWeightHintSize (EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
bx->packEnd (*sp);
|
||||
sp->show ();
|
||||
|
||||
|
||||
sp = Spinner::factory (*win);
|
||||
sp->setLabelFormat ("Disabled %.0f");
|
||||
sp->setDisabled (true);
|
||||
|
@ -47,6 +47,6 @@ void test_spinner(void *data, Evas_Object *obj, void *event_info)
|
|||
sp->setWeightHintSize (EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
bx->packEnd (*sp);
|
||||
sp->show ();
|
||||
|
||||
|
||||
win->show ();
|
||||
}
|
||||
|
|
|
@ -7,7 +7,7 @@ void test_table (void *data, Evas_Object *obj, void *event_info)
|
|||
Window *win = Window::factory ("table", ELM_WIN_BASIC);
|
||||
win->setTitle ("Table");
|
||||
win->setAutoDel (true);
|
||||
|
||||
|
||||
Background *bg = Background::factory (*win);
|
||||
win->addObjectResize (*bg);
|
||||
bg->setWeightHintSize (EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
|
@ -17,14 +17,14 @@ void test_table (void *data, Evas_Object *obj, void *event_info)
|
|||
win->addObjectResize (*tb);
|
||||
tb->setWeightHintSize (EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
tb->show ();
|
||||
|
||||
|
||||
Button *bt = Button::factory (*win);
|
||||
bt->setLabel ("Button 1");
|
||||
bt->setWeightHintSize (EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
bt->setAlignHintSize (EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||
tb->pack (*bt, Rect (0, 0, 1, 1));
|
||||
bt->show ();
|
||||
|
||||
|
||||
Button *bt2 = Button::factory (*win);
|
||||
bt2->setLabel ("Button 2");
|
||||
bt2->setWeightHintSize (EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
|
|
|
@ -5,17 +5,17 @@ void test_toggle (void *data, Evas_Object *obj, void *event_info)
|
|||
Window *win = Window::factory ("toggles", ELM_WIN_BASIC);
|
||||
win->setTitle ("Toggles");
|
||||
win->setAutoDel (true);
|
||||
|
||||
|
||||
Background *bg = Background::factory (*win);
|
||||
win->addObjectResize (*bg);
|
||||
bg->setWeightHintSize (EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
bg->show ();
|
||||
|
||||
|
||||
Box *bx = Box::factory (*win);
|
||||
win->addObjectResize (*bx);
|
||||
bx->setWeightHintSize (EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
bx->show ();
|
||||
|
||||
|
||||
Icon *ic = Icon::factory (*win);
|
||||
ic->setFile (searchPixmapFile ("elementaryxx/logo_small.png"));
|
||||
ic->setAspectHintSize (EVAS_ASPECT_CONTROL_VERTICAL, Size (1, 1));
|
||||
|
@ -39,7 +39,7 @@ void test_toggle (void *data, Evas_Object *obj, void *event_info)
|
|||
bx->packEnd (*tg2);
|
||||
tg2->show ();
|
||||
ic2->show ();
|
||||
|
||||
|
||||
Toggle *tg3 = Toggle::factory (*win);
|
||||
tg3->setLabel ("Label Only");
|
||||
tg3->setLabelsStates ("Big long fun times label", "Small long happy fun label");
|
||||
|
|
|
@ -29,7 +29,7 @@ int main (int argc, char **argv)
|
|||
|
||||
Window *elmWin = Window::factory ("window1", ELM_WIN_BASIC);
|
||||
elmWin->getEventSignal ("delete-request")->connect (sigc::ptr_fun (&my_win_del));
|
||||
|
||||
|
||||
Background *bg = Background::factory (*elmWin);
|
||||
|
||||
Evas *e = evas_object_evas_get(bg->obj ());
|
||||
|
@ -68,17 +68,17 @@ int main (int argc, char **argv)
|
|||
elmScroller->setGeometry (Rect (250, 120, 200, 200));
|
||||
elmEntry->setGeometry (Rect (150, 200, 100, 50));
|
||||
elmSlider->setGeometry (Rect (200, 200, 100, 50));
|
||||
|
||||
|
||||
elmWin->setTitle ("Elementaryxx Simple Example");
|
||||
|
||||
|
||||
elmButton->setLabel ("Text");
|
||||
|
||||
|
||||
elmClock->setEdit (true);
|
||||
|
||||
|
||||
elmWin->setAutoDel (true);
|
||||
|
||||
//elmToggle->getEventSignal ("sub-object-del")->connect (sigc::ptr_fun (&testFunc));
|
||||
|
||||
|
||||
elmWin->show ();
|
||||
bg->show ();
|
||||
elmButton->show ();
|
||||
|
|
Loading…
Reference in New Issue