Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Wynn
purr-data
Commits
56a7f78f
Commit
56a7f78f
authored
Jan 06, 2016
by
Jonathan Wilkes
Browse files
remove scalehandle_unclick_label, and clean up some formatting
parent
7cab9c72
Changes
3
Hide whitespace changes
Inline
Side-by-side
pd/src/g_all_guis.c
View file @
56a7f78f
...
...
@@ -808,7 +808,6 @@ void scalehandle_dragon_label(t_scalehandle *h, float mouse_x, float mouse_y) {
h
->
h_dragx
=
dx
;
h
->
h_dragy
=
dy
;
int
properties
=
gfxstub_haveproperties
((
void
*
)
x
);
if
(
properties
)
{
...
...
@@ -817,21 +816,18 @@ void scalehandle_dragon_label(t_scalehandle *h, float mouse_x, float mouse_y) {
properties_set_field_int
(
properties
,
"label.xy.x_entry"
,
new_x
);
properties_set_field_int
(
properties
,
"label.xy.y_entry"
,
new_y
);
}
x
->
x_ldx
+=
dx
;
x
->
x_ldy
+=
dy
;
if
(
glist_isvisible
(
x
->
x_glist
))
{
int
xpos
=
text_xpix
(
&
x
->
x_obj
,
x
->
x_glist
);
int
ypos
=
text_ypix
(
&
x
->
x_obj
,
x
->
x_glist
);
//iemgui_getrect_legacy_label(x, &xpos, &ypos);
t_canvas
*
canvas
=
glist_getcanvas
(
x
->
x_glist
);
sys_vgui
(
".x%lx.c coords %lxLABEL %d %d
\n
"
,
canvas
,
x
,
xpos
+
x
->
x_ldx
+
h
->
h_dragx
,
ypos
+
x
->
x_ldy
+
h
->
h_dragy
);
//
sys_vgui(".x%lx.c coords %lxLABEL %d %d\n", canvas, x,
//
xpos+x->x_ldx + h->h_dragx,
//
ypos+x->x_ldy + h->h_dragy);
gui_vmess
(
"gui_iemgui_label_coords"
,
"xxii"
,
canvas
,
x
,
...
...
@@ -841,23 +837,6 @@ void scalehandle_dragon_label(t_scalehandle *h, float mouse_x, float mouse_y) {
}
}
void
scalehandle_unclick_label
(
t_scalehandle
*
h
)
{
t_iemgui
*
x
=
(
t_iemgui
*
)
h
->
h_master
;
canvas_apply_setundo
(
x
->
x_glist
,
(
t_gobj
*
)
x
);
if
(
h
->
h_dragx
||
h
->
h_dragy
)
{
x
->
x_ldx
+=
h
->
h_dragx
;
x
->
x_ldy
+=
h
->
h_dragy
;
canvas_dirty
(
x
->
x_glist
,
1
);
}
if
(
glist_isvisible
(
x
->
x_glist
))
{
iemgui_select
((
t_gobj
*
)
x
,
x
->
x_glist
,
1
);
canvas_fixlinesfor
(
x
->
x_glist
,
(
t_text
*
)
x
);
canvas_getscroll
(
x
->
x_glist
);
}
}
void
scalehandle_click_label
(
t_scalehandle
*
h
)
{
t_iemgui
*
x
=
(
t_iemgui
*
)
h
->
h_master
;
if
(
glist_isvisible
(
x
->
x_glist
))
...
...
@@ -943,8 +922,6 @@ static void scalehandle_motionhook(t_scalehandle *h,
void
iemgui__clickhook3
(
t_scalehandle
*
sh
,
int
newstate
)
{
if
(
!
sh
->
h_dragon
&&
newstate
&&
sh
->
h_scale
)
scalehandle_click_scale
(
sh
);
else
if
(
sh
->
h_dragon
&&
newstate
==
0
&&
!
sh
->
h_scale
)
scalehandle_unclick_label
(
sh
);
else
if
(
!
sh
->
h_dragon
&&
newstate
&&
!
sh
->
h_scale
)
scalehandle_click_label
(
sh
);
sh
->
h_dragon
=
newstate
;
...
...
pd/src/g_all_guis.h
View file @
56a7f78f
...
...
@@ -239,7 +239,6 @@ EXTERN t_scalehandle *scalehandle_new(t_object *x, t_glist *glist, int scale, t_
EXTERN
void
scalehandle_free
(
t_scalehandle
*
h
);
EXTERN
void
properties_set_field_int
(
long
props
,
const
char
*
gui_field
,
int
value
);
EXTERN
void
scalehandle_dragon_label
(
t_scalehandle
*
h
,
float
f1
,
float
f2
);
EXTERN
void
scalehandle_unclick_label
(
t_scalehandle
*
h
);
EXTERN
void
scalehandle_click_label
(
t_scalehandle
*
h
);
EXTERN
void
scalehandle_click_scale
(
t_scalehandle
*
h
);
EXTERN
void
scalehandle_unclick_scale
(
t_scalehandle
*
h
);
...
...
pd/src/g_canvas.c
View file @
56a7f78f
...
...
@@ -2131,6 +2131,8 @@ void canvasgop__clickhook(t_scalehandle *sh, int newstate)
}
else
//enter if move_gop hook
{
// this block is similar to scalehandle_unclick_label but not enough
// We've actually removed scalehandle_unclick_label everywhere, so
// check to see whether this can be removed as well...
canvas_undo_add
(
x
,
8
,
"apply"
,
canvas_undo_set_canvas
(
x
));
if
(
sh
->
h_dragx
||
sh
->
h_dragy
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment