changed existing full and simple examples to follow C API changed and C++ wrapper
SVN revision: 54659
This commit is contained in:
parent
d512742998
commit
d10df68468
|
@ -13,7 +13,6 @@ elementaryxx_example_full_SOURCES = \
|
|||
test_hover.cpp \
|
||||
test_icon.cpp \
|
||||
test_layout.cpp \
|
||||
test_notepad.cpp \
|
||||
test_table.cpp \
|
||||
test_toggle.cpp \
|
||||
test_slider.cpp \
|
||||
|
|
|
@ -4,8 +4,6 @@
|
|||
|
||||
#include "test.h"
|
||||
|
||||
|
||||
|
||||
#ifndef ELM_LIB_QUICKLAUNCH
|
||||
static void my_win_del(Evasxx::Object &obj, void *event_info);
|
||||
static void my_win_main(void);
|
||||
|
@ -24,7 +22,6 @@ void test_hover (void *data, Evas_Object *obj, void *event_info);
|
|||
void test_hover2 (void *data, Evas_Object *obj, void *event_info);
|
||||
void test_entry (void *data, Evas_Object *obj, void *event_info);
|
||||
void test_entry_scolled (void *data, Evas_Object *obj, void *event_info);
|
||||
void test_notepad (void *data, Evas_Object *obj, void *event_info);
|
||||
void test_check (void *data, Evas_Object *obj, void *event_info);
|
||||
void test_radio (void *data, Evas_Object *obj, void *event_info);
|
||||
//
|
||||
|
@ -170,7 +167,6 @@ int main (int argc, char **argv)
|
|||
li->append ("Hover 2", test_hover2, NULL);
|
||||
li->append ("Entry", test_entry, NULL);
|
||||
li->append ("Entry Scrolled", test_entry_scolled, NULL);
|
||||
li->append ("Notepad", test_notepad, NULL);
|
||||
/*li.append("Anchorview", NULL, NULL, my_bt_16, NULL);
|
||||
li.append("Anchorblock", NULL, NULL, my_bt_17, NULL);
|
||||
li.append("Toolbar", NULL, NULL, my_bt_18, NULL);
|
||||
|
|
|
@ -1,95 +0,0 @@
|
|||
#include "test.h"
|
||||
|
||||
|
||||
|
||||
static void my_notepad_bt_1 (Evasxx::Object &obj, void *event_info, Notepad *np)
|
||||
{
|
||||
// TODO
|
||||
}
|
||||
|
||||
static void my_notepad_bt_2 (Evasxx::Object &obj, void *event_info, Notepad *np)
|
||||
{
|
||||
// TODO
|
||||
}
|
||||
|
||||
static void my_notepad_bt_3 (Evasxx::Object &obj, void *event_info, Notepad *np)
|
||||
{
|
||||
// TODO
|
||||
}
|
||||
|
||||
void test_notepad (void *data, Evas_Object *obj, void *event_info)
|
||||
{
|
||||
Button *bt = NULL;
|
||||
Icon *ic = NULL;
|
||||
|
||||
Window *win = Window::factory ("notepad", ELM_WIN_BASIC);
|
||||
win->setTitle ("Notepad");
|
||||
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 ();
|
||||
|
||||
Notepad *np = Notepad::factory (*win);
|
||||
np->setFile ("note.txt", ELM_TEXT_FORMAT_PLAIN_UTF8);
|
||||
np->setWeightHintSize (EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
np->setAlignHintSize (EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||
bx->packEnd (*np);
|
||||
np->show ();
|
||||
|
||||
Box *bx2 = Box::factory (*win);
|
||||
bx2->setOrientation (Box::Horizontal);
|
||||
bx2->setHomogenous (true);
|
||||
bx2->setWeightHintSize (EVAS_HINT_EXPAND, 0.0);
|
||||
bx2->setAlignHintSize (EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||
|
||||
bt = Button::factory (*win);
|
||||
ic = Icon::factory (*win);
|
||||
ic->setStandard ("arrow_left");
|
||||
ic->setScale (true, false);
|
||||
bt->setIcon (*ic);
|
||||
ic->show ();
|
||||
bt->getEventSignal ("clicked")->connect (sigc::bind (sigc::ptr_fun (&my_notepad_bt_1), np));
|
||||
bt->setAlignHintSize (EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||
bt->setWeightHintSize (EVAS_HINT_EXPAND, 0.0);
|
||||
bx2->packEnd (*bt);
|
||||
bt->show ();
|
||||
|
||||
bt = Button::factory (*win);
|
||||
ic = Icon::factory (*win);
|
||||
ic->setStandard ("close");
|
||||
ic->setScale (true, false);
|
||||
bt->setIcon (*ic);
|
||||
ic->show ();
|
||||
bt->getEventSignal ("clicked")->connect (sigc::bind (sigc::ptr_fun (&my_notepad_bt_2), np));
|
||||
bt->setAlignHintSize (EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||
bt->setWeightHintSize (EVAS_HINT_EXPAND, 0.0);
|
||||
bx2->packEnd (*bt);
|
||||
bt->show ();
|
||||
|
||||
bt = Button::factory (*win);
|
||||
ic = Icon::factory (*win);
|
||||
ic->setStandard ("arrow_right");
|
||||
ic->setScale (true, false);
|
||||
bt->setIcon (*ic);
|
||||
ic->show ();
|
||||
bt->getEventSignal ("clicked")->connect (sigc::bind (sigc::ptr_fun (&my_notepad_bt_3), np));
|
||||
bt->setAlignHintSize (EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||
bt->setWeightHintSize (EVAS_HINT_EXPAND, 0.0);
|
||||
bx2->packEnd (*bt);
|
||||
bt->show ();
|
||||
|
||||
bx->packEnd (*bx2);
|
||||
bx2->show ();
|
||||
|
||||
win->resize (size320x320);
|
||||
|
||||
win->setFocus (true);
|
||||
win->show ();
|
||||
}
|
|
@ -8,7 +8,7 @@ elementaryxx_example_simple_SOURCES = \
|
|||
elementaryxx_example_simple_LDADD = \
|
||||
$(ELEMENTARYXX_LIBS) \
|
||||
$(EVASXX_LIBS) \
|
||||
$(PACKAGE_SOURCE_DIR)/src/common/libeflxx_example_common.la
|
||||
$(PACKAGE_SOURCE_DIR)/src/common/libeflxx_example_common.la
|
||||
|
||||
elementaryxx_example_simple_DEPENDENCIES = \
|
||||
$(PACKAGE_SOURCE_DIR)/src/common/libeflxx_example_common.la
|
||||
|
|
Loading…
Reference in New Issue