forked from enlightenment/enlightenment
well now the shelf can be resized... and i fixed up the shelf file to
actually have resize classes for parts of the border and the close & menu buttons have classes now so i can at least hook code to those classes.. :) SVN revision: 4249
This commit is contained in:
parent
20f9b35da8
commit
e173a57884
Binary file not shown.
34
src/shelf.c
34
src/shelf.c
|
@ -50,6 +50,30 @@ e_cb_mouse_down(void *data, Ebits_Object o, char *class, int bt, int x, int y, i
|
||||||
mv_prev_y = y;
|
mv_prev_y = y;
|
||||||
sh->state.moving = 1;
|
sh->state.moving = 1;
|
||||||
}
|
}
|
||||||
|
if (!strcmp(class, "Resize"))
|
||||||
|
{
|
||||||
|
mv_prev_x = x;
|
||||||
|
mv_prev_y = y;
|
||||||
|
sh->state.resizing = 1;
|
||||||
|
}
|
||||||
|
if (!strcmp(class, "Resize_Horizontal"))
|
||||||
|
{
|
||||||
|
mv_prev_x = x;
|
||||||
|
mv_prev_y = y;
|
||||||
|
sh->state.resizing = 1;
|
||||||
|
}
|
||||||
|
if (!strcmp(class, "Resize_Vertical"))
|
||||||
|
{
|
||||||
|
mv_prev_x = x;
|
||||||
|
mv_prev_y = y;
|
||||||
|
sh->state.resizing = 1;
|
||||||
|
}
|
||||||
|
if (!strcmp(class, "Menu"))
|
||||||
|
{
|
||||||
|
}
|
||||||
|
if (!strcmp(class, "Close"))
|
||||||
|
{
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
UN(o);
|
UN(o);
|
||||||
UN(bt);
|
UN(bt);
|
||||||
|
@ -66,6 +90,7 @@ e_cb_mouse_up(void *data, Ebits_Object o, char *class, int bt, int x, int y, int
|
||||||
|
|
||||||
sh = data;
|
sh = data;
|
||||||
if (sh->state.moving) sh->state.moving = 0;
|
if (sh->state.moving) sh->state.moving = 0;
|
||||||
|
if (sh->state.resizing) sh->state.resizing = 0;
|
||||||
return;
|
return;
|
||||||
UN(o);
|
UN(o);
|
||||||
UN(bt);
|
UN(bt);
|
||||||
|
@ -87,6 +112,15 @@ e_cb_mouse_move(void *data, Ebits_Object o, char *class, int bt, int x, int y, i
|
||||||
mv_prev_x = x;
|
mv_prev_x = x;
|
||||||
mv_prev_y = y;
|
mv_prev_y = y;
|
||||||
}
|
}
|
||||||
|
if (sh->state.resizing)
|
||||||
|
{
|
||||||
|
if (sh->state.resizing == 1)
|
||||||
|
{
|
||||||
|
e_shelf_resize_by(sh, x - mv_prev_x, y - mv_prev_y);
|
||||||
|
mv_prev_x = x;
|
||||||
|
mv_prev_y = y;
|
||||||
|
}
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
UN(o);
|
UN(o);
|
||||||
UN(bt);
|
UN(bt);
|
||||||
|
|
Loading…
Reference in New Issue