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:
Carsten Haitzler 2001-02-18 21:21:20 +00:00
parent 20f9b35da8
commit e173a57884
2 changed files with 34 additions and 0 deletions

View File

@ -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;
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;
UN(o);
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;
if (sh->state.moving) sh->state.moving = 0;
if (sh->state.resizing) sh->state.resizing = 0;
return;
UN(o);
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_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;
UN(o);
UN(bt);