Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
purr-data
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Aayush
purr-data
Commits
3c0e1b52
Commit
3c0e1b52
authored
Aug 23, 2019
by
Aayush
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated UI for ascii_art->pd_diagram
parent
aed90478
Pipeline
#1652
failed with stage
in 0 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
21 deletions
+12
-21
pd/nw/pd_canvas.js
pd/nw/pd_canvas.js
+4
-12
pd/nw/pdgui.js
pd/nw/pdgui.js
+3
-5
pd/src/g_editor.c
pd/src/g_editor.c
+5
-4
No files found.
pd/nw/pd_canvas.js
View file @
3c0e1b52
...
...
@@ -428,11 +428,8 @@ var canvas_events = (function() {
}
},
close_ascii_art
:
function
(
evt
)
{
canvas_events
[
canvas_events
.
get_previous_state
()]();
var
ascii_art
=
document
.
getElementById
(
"
ascii_art
"
),
ascii_art_text_area
=
document
.
getElementById
(
"
ascii_art_text_area
"
);
ascii_art_text_area
.
value
=
"
write your ascii art here
"
;
ascii_art
.
style
.
setProperty
(
"
display
"
,
"
none
"
);
pdgui
.
pdsend
(
name
,
"
ascii-entry 0
"
);
canvas_events
[
canvas_events
.
get_previous_state
()]();
},
check_ascii_art_state
:
function
(
evt
)
{
var
ascii_art
=
document
.
getElementById
(
"
ascii_art_text_area
"
).
value
;
...
...
@@ -1611,16 +1608,11 @@ function nw_create_patch_window_menus(gui, w, name) {
// if there's a box being edited, try to instantiate it in Pd
instantiate_live_box
();
if
(
display_state
===
"
none
"
)
{
ascii_art
.
style
.
setProperty
(
"
display
"
,
"
inline
"
);
ascii_art_text_area
.
focus
();
ascii_art_text_area
.
select
();
pdgui
.
pdsend
(
name
,
"
ascii-entry 1
"
);
canvas_events
.
ascii_art
();
//pdgui.pdsend(name,"ascii-entry",1);
}
else
{
ascii_art_text_area
.
value
=
"
write your ascii art here
"
;
ascii_art
.
style
.
setProperty
(
"
display
"
,
"
none
"
);
pdgui
.
pdsend
(
name
,
"
ascii-entry 0
"
);
canvas_events
[
canvas_events
.
get_previous_state
()]();
//pdgui.pdsend(name,"ascii-entry",0);
}
}
});
...
...
pd/nw/pdgui.js
View file @
3c0e1b52
...
...
@@ -1170,17 +1170,15 @@ exports.menu_quit = menu_quit;
function
ascii_entry
(
cid
,
textarea_state
)
{
gui
(
cid
).
get_elem
(
"
ascii_art
"
,
function
(
w
)
{
var
ascii_art
=
w
.
document
.
getElementById
(
"
ascii_art
"
),
ascii_art_text_area
=
w
.
document
.
getElementById
(
"
ascii_art_text_area
"
);
if
(
textarea_state
==
1
)
{
var
ascii_art
=
patchwin
[
cid
].
windo
w
.
document
.
getElementById
(
"
ascii_art
"
),
ascii_art_text_area
=
patchwin
[
cid
].
windo
w
.
document
.
getElementById
(
"
ascii_art_text_area
"
);
if
(
textarea_state
)
{
ascii_art
.
style
.
setProperty
(
"
display
"
,
"
inline
"
);
ascii_art_text_area
.
focus
();
ascii_art_text_area
.
select
();
w
.
canvas_events
.
ascii_art
();
}
else
{
ascii_art_text_area
.
value
=
"
write your ascii art here
"
;
ascii_art
.
style
.
setProperty
(
"
display
"
,
"
none
"
);
w
.
canvas_events
[
w
.
canvas_events
.
get_previous_state
()]();
}
});
}
...
...
pd/src/g_editor.c
View file @
3c0e1b52
...
...
@@ -44,7 +44,7 @@ static int clipboard_istext = 0;
static
t_glist
*
glist_finddirty
(
t_glist
*
x
);
static
void
canvas_reselect
(
t_canvas
*
x
);
static
void
canvas_cut
(
t_canvas
*
x
);
static
void
canvas_ascii_entry
(
t_canvas
*
x
,
t_float
textarea_state
);
static
void
canvas_ascii_entry
(
t_canvas
*
x
,
t_float
arg
textarea_state
);
static
int
paste_xyoffset
=
0
;
/* a counter of pastes to make x,y offsets */
//static void canvas_mouseup_gop(t_canvas *x, t_gobj *g);
void
canvas_done_popup
(
t_canvas
*
x
,
t_float
which
,
t_float
xpos
,
...
...
@@ -171,11 +171,12 @@ static void canvas_nlet_conf (t_canvas *x, int type) {
1
);
}
static
void
canvas_ascii_entry
(
t_canvas
*
x
,
t_float
textarea_state
)
static
void
canvas_ascii_entry
(
t_canvas
*
x
,
t_float
arg
textarea_state
)
{
int
state
=
textarea_state
;
gui_vmess
(
"ascii_entry"
,
"xi"
,
x
,
textarea_
state
);
state
);
}
void
canvas_getscroll
(
t_canvas
*
x
)
{
//sys_vgui("pdtk_canvas_getscroll .x%lx.c\n",(long)x);
...
...
@@ -7724,7 +7725,7 @@ void g_editor_setup(void)
class_addmethod
(
canvas_class
,
(
t_method
)
canvas_reset_copyfromexternalbuffer
,
gensym
(
"reset_copyfromexternalbuffer"
),
A_NULL
);
class_addmethod
(
canvas_class
,
(
t_method
)
canvas_ascii_entry
,
gensym
(
"ascii-entry"
),
A_FLOAT
,
A_NULL
);
gensym
(
"ascii-entry"
),
A_
DEF
FLOAT
,
A_NULL
);
/* -------------- connect method used in reading files ------------------ */
class_addmethod
(
canvas_class
,
(
t_method
)
canvas_connect
,
gensym
(
"connect"
),
A_FLOAT
,
A_FLOAT
,
A_FLOAT
,
A_FLOAT
,
A_NULL
);
...
...
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