ui: Add panes to the ui reference now they are working
This commit is contained in:
parent
eabdff1f27
commit
fdad34a429
|
@ -16,7 +16,6 @@
|
||||||
* TODO Layout
|
* TODO Layout
|
||||||
* TODO - still ELM Conformant
|
* TODO - still ELM Conformant
|
||||||
* TODO - still ELM Mapbuf
|
* TODO - still ELM Mapbuf
|
||||||
* TODO - still ELM Naviframe
|
|
||||||
* TODO - still ELM Scroller
|
* TODO - still ELM Scroller
|
||||||
* TODO - still ELM Table
|
* TODO - still ELM Table
|
||||||
*/
|
*/
|
||||||
|
@ -56,20 +55,14 @@ _ui_grid_setup(Efl_Ui_Win *win)
|
||||||
|
|
||||||
// Load some boxes - a horizontal one for the window layout and a vertical
|
// Load some boxes - a horizontal one for the window layout and a vertical
|
||||||
// one to contain a flow
|
// one to contain a flow
|
||||||
static void
|
static Efl_Ui_Box *
|
||||||
_ui_boxes_setup(Efl_Ui_Win *win)
|
_ui_boxes_setup(Efl_Ui_Win *win)
|
||||||
{
|
{
|
||||||
Efl_Ui_Box *hbox, *box, *button;
|
Efl_Ui_Box *box, *button;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
hbox = efl_add(EFL_UI_BOX_CLASS, win,
|
|
||||||
efl_ui_direction_set(efl_added, EFL_UI_DIR_HORIZONTAL),
|
|
||||||
efl_pack_padding_set(efl_added, 5, 0, EINA_TRUE),
|
|
||||||
efl_content_set(win, efl_added));
|
|
||||||
|
|
||||||
box = efl_add(EFL_UI_BOX_CLASS, win,
|
box = efl_add(EFL_UI_BOX_CLASS, win,
|
||||||
efl_pack(hbox, efl_added));
|
efl_pack_padding_set(efl_added, 5, 0, EINA_TRUE));
|
||||||
efl_pack(hbox, _ui_grid_setup(win));
|
|
||||||
|
|
||||||
for (i = 1; i <= 4; i++)
|
for (i = 1; i <= 4; i++)
|
||||||
{
|
{
|
||||||
|
@ -81,10 +74,10 @@ _ui_boxes_setup(Efl_Ui_Win *win)
|
||||||
efl_gfx_size_hint_max_set(button, EINA_SIZE2D(100, 50));
|
efl_gfx_size_hint_max_set(button, EINA_SIZE2D(100, 50));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return box;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Load a vertical and horizontal split into the window
|
// Load a vertical and horizontal split into the window
|
||||||
// TODO re-enable this when it actually works in EFL
|
|
||||||
static void
|
static void
|
||||||
_ui_panes_setup(Efl_Ui_Win *win)
|
_ui_panes_setup(Efl_Ui_Win *win)
|
||||||
{
|
{
|
||||||
|
@ -93,19 +86,17 @@ _ui_panes_setup(Efl_Ui_Win *win)
|
||||||
split = efl_add(EFL_UI_PANES_CLASS, win,
|
split = efl_add(EFL_UI_PANES_CLASS, win,
|
||||||
efl_content_set(win, efl_added),
|
efl_content_set(win, efl_added),
|
||||||
efl_ui_panes_split_ratio_set(efl_added, 0.75));
|
efl_ui_panes_split_ratio_set(efl_added, 0.75));
|
||||||
|
efl_content_set(efl_part(split, "first"), _ui_boxes_setup(win));
|
||||||
efl_add(EFL_UI_BOX_CLASS, win,
|
|
||||||
efl_content_set(efl_part(split, "first"), efl_added));
|
|
||||||
|
|
||||||
horiz_split = efl_add(EFL_UI_PANES_CLASS, win,
|
horiz_split = efl_add(EFL_UI_PANES_CLASS, win,
|
||||||
efl_content_set(efl_part(split, "second"), efl_added),
|
efl_content_set(efl_part(split, "second"), efl_added),
|
||||||
|
efl_ui_direction_set(efl_added, EFL_UI_DIR_HORIZONTAL),
|
||||||
efl_ui_panes_split_ratio_set(efl_added, 0.85));
|
efl_ui_panes_split_ratio_set(efl_added, 0.85));
|
||||||
|
efl_content_set(efl_part(horiz_split, "first"), _ui_grid_setup(win));
|
||||||
efl_add(EFL_UI_BOX_CLASS, win,
|
|
||||||
efl_content_set(efl_part(horiz_split, "first"), efl_added));
|
|
||||||
|
|
||||||
efl_add(EFL_UI_BUTTON_CLASS, win,
|
efl_add(EFL_UI_BUTTON_CLASS, win,
|
||||||
efl_text_set(efl_added, "Quit"),
|
efl_text_set(efl_added, "Quit"),
|
||||||
|
efl_gfx_size_hint_max_set(efl_added, EINA_SIZE2D(150, 30)),
|
||||||
efl_content_set(efl_part(horiz_split, "second"), efl_added),
|
efl_content_set(efl_part(horiz_split, "second"), efl_added),
|
||||||
efl_event_callback_add(efl_added, EFL_UI_EVENT_CLICKED,
|
efl_event_callback_add(efl_added, EFL_UI_EVENT_CLICKED,
|
||||||
_gui_quit_cb, efl_added));
|
_gui_quit_cb, efl_added));
|
||||||
|
@ -121,11 +112,10 @@ efl_main(void *data EINA_UNUSED, const Efl_Event *ev EINA_UNUSED)
|
||||||
efl_text_set(efl_added, "Hello World"),
|
efl_text_set(efl_added, "Hello World"),
|
||||||
efl_ui_win_autodel_set(efl_added, EINA_TRUE));
|
efl_ui_win_autodel_set(efl_added, EINA_TRUE));
|
||||||
|
|
||||||
// _ui_panes_setup(win);
|
|
||||||
_ui_boxes_setup(win);
|
|
||||||
// when the user clicks "close" on a window there is a request to delete
|
// when the user clicks "close" on a window there is a request to delete
|
||||||
efl_event_callback_add(win, EFL_UI_WIN_EVENT_DELETE_REQUEST, _gui_quit_cb, NULL);
|
efl_event_callback_add(win, EFL_UI_WIN_EVENT_DELETE_REQUEST, _gui_quit_cb, NULL);
|
||||||
|
|
||||||
|
_ui_panes_setup(win);
|
||||||
|
|
||||||
efl_gfx_size_set(win, EINA_SIZE2D(350, 250));
|
efl_gfx_size_set(win, EINA_SIZE2D(350, 250));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue