Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
purr-data
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jonathan Wilkes
purr-data
Commits
2426f6d6
Commit
2426f6d6
authored
10 years ago
by
Mathieu L Bouchard
Browse files
Options
Downloads
Patches
Plain Diff
fix bugs about applying [nbx] properties
parent
82a9f90b
Loading
Loading
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
pd/src/g_numbox.c
+16
-22
16 additions, 22 deletions
pd/src/g_numbox.c
with
16 additions
and
22 deletions
pd/src/g_numbox.c
+
16
−
22
View file @
2426f6d6
...
...
@@ -202,9 +202,8 @@ static void my_numbox_draw_config(t_my_numbox* x,t_glist* glist)
int
issel
=
x
->
x_gui
.
x_selected
==
canvas
&&
x
->
x_gui
.
x_glist
==
canvas
;
sys_vgui
(
".x%lx.c itemconfigure %lxNUMBER -font %s -fill %s
\n
"
,
canvas
,
x
,
iemgui_font
(
&
x
->
x_gui
),
issel
?
selection_color
:
fcol
);
sys_vgui
(
".x%lx.c itemconfigure %lxBASE2 -
fill
%s
\n
"
,
sys_vgui
(
".x%lx.c itemconfigure %lxBASE2 -
stroke
%s
\n
"
,
canvas
,
x
,
issel
?
selection_color
:
fcol
);
iemgui_label_draw_config
(
&
x
->
x_gui
,
canvas
);
sys_vgui
(
".x%lx.c itemconfigure %lxBASE1 -fill #%6.6x
\n
"
,
canvas
,
x
,
x
->
x_gui
.
x_bcol
);
...
...
@@ -434,23 +433,18 @@ static void my_numbox_properties(t_gobj *z, t_glist *owner)
}
sprintf
(
buf
,
"pdtk_iemgui_dialog %%s |nbx| \
-------dimensions(digits)(pix):------- %d %d width: %d %d height: \
-----------output-range:----------- %g min: %g max: %d \
%d lin log %d %d log-height: %d \
{%s} {%s} \
{%s} %d %d \
%d %d \
%d %d %d
\n
"
,
x
->
x_gui
.
x_w
,
1
,
x
->
x_gui
.
x_h
,
8
,
x
->
x_min
,
x
->
x_max
,
x
->
x_hide_frame
,
/*EXCEPTION: x_hide_frame instead of schedule*/
x
->
x_lin0_log1
,
x
->
x_gui
.
x_loadinit
,
-
1
,
x
->
x_log_height
,
/*no multi, but iem-characteristic*/
srl
[
0
]
->
s_name
,
srl
[
1
]
->
s_name
,
srl
[
2
]
->
s_name
,
x
->
x_gui
.
x_ldx
,
x
->
x_gui
.
x_ldy
,
x
->
x_gui
.
x_font_style
,
x
->
x_gui
.
x_fontsize
,
0xffffff
&
x
->
x_gui
.
x_bcol
,
0xffffff
&
x
->
x_gui
.
x_fcol
,
0xffffff
&
x
->
x_gui
.
x_lcol
);
-------dimensions(digits)(pix):------- %d %d width: %d %d height: \
-----------output-range:----------- %g min: %g max: %d \
%d lin log %d %d log-height: %d {%s} {%s} {%s} %d %d %d %d %d %d %d
\n
"
,
x
->
x_gui
.
x_w
,
1
,
x
->
x_gui
.
x_h
,
8
,
x
->
x_min
,
x
->
x_max
,
x
->
x_hide_frame
,
/*EXCEPTION: x_hide_frame instead of schedule*/
x
->
x_lin0_log1
,
x
->
x_gui
.
x_loadinit
,
-
1
,
x
->
x_log_height
,
/*no multi, but iem-characteristic*/
srl
[
0
]
->
s_name
,
srl
[
1
]
->
s_name
,
srl
[
2
]
->
s_name
,
x
->
x_gui
.
x_ldx
,
x
->
x_gui
.
x_ldy
,
x
->
x_gui
.
x_font_style
,
x
->
x_gui
.
x_fontsize
,
0xffffff
&
x
->
x_gui
.
x_bcol
,
0xffffff
&
x
->
x_gui
.
x_fcol
,
0xffffff
&
x
->
x_gui
.
x_lcol
);
gfxstub_new
(
&
x
->
x_gui
.
x_obj
.
ob_pd
,
x
,
buf
);
}
...
...
@@ -474,8 +468,8 @@ static void my_numbox_dialog(t_my_numbox *x, t_symbol *s, int argc,
iemgui_dialog
(
&
x
->
x_gui
,
argc
,
argv
);
x
->
x_numwidth
=
my_numbox_calc_fontwidth
(
x
);
my_numbox_check_minmax
(
x
,
min
,
max
);
iem
gui_draw
_erase
(
&
x
->
x_gui
,
x
->
x_gui
.
x_glist
);
iemgui_shouldvis
(
&
x
->
x_gui
,
IEM_GUI_DRAW_MODE_
NEW
);
x
->
x_
gui
.
x
_draw
(
x
,
x
->
x_gui
.
x_glist
,
IEM_GUI_DRAW_MODE_CONFIG
);
x
->
x_gui
.
x_draw
(
x
,
x
->
x_gui
.
x_glist
,
IEM_GUI_DRAW_MODE_
MOVE
);
scalehandle_draw
(
&
x
->
x_gui
,
x
->
x_gui
.
x_glist
);
//canvas_restore_original_position(x->x_gui.x_glist, (t_gobj *)x,"bogus",-1);
scrollbar_update
(
x
->
x_gui
.
x_glist
);
...
...
@@ -484,7 +478,7 @@ static void my_numbox_dialog(t_my_numbox *x, t_symbol *s, int argc,
static
void
my_numbox_motion
(
t_my_numbox
*
x
,
t_floatarg
dx
,
t_floatarg
dy
)
{
double
k2
=
1
.
0
;
int
old
=
x
->
x_val
;
int
old
=
x
->
x_val
;
if
(
x
->
x_gui
.
x_finemoved
)
k2
=
0
.
01
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment