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
f54a1cc5
Commit
f54a1cc5
authored
Aug 19, 2019
by
Aayush
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updated input handling in ascii->pd
parent
5ad27023
Pipeline
#1646
failed with stage
in 0 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
1 deletion
+28
-1
pd/nw/pd_canvas.js
pd/nw/pd_canvas.js
+1
-1
pd/nw/pdgui.js
pd/nw/pdgui.js
+19
-0
pd/src/m_glob.c
pd/src/m_glob.c
+8
-0
No files found.
pd/nw/pd_canvas.js
View file @
f54a1cc5
...
...
@@ -800,7 +800,7 @@ var canvas_events = (function() {
ascii_art
:
function
()
{
set_edit_menu_modals
(
false
);
canvas_events
.
none
();
document
.
addEventListener
(
"
keyup
"
,
events
.
check_ascii_art_state
,
fals
e
);
document
.
getElementById
(
"
ascii_art_text_area
"
).
addEventListener
(
"
input
"
,
events
.
check_ascii_art_stat
e
);
state
=
"
ascii_art
"
;
},
register
:
function
(
n
)
{
...
...
pd/nw/pdgui.js
View file @
f54a1cc5
...
...
@@ -1167,6 +1167,25 @@ function menu_quit() {
exports
.
menu_quit
=
menu_quit
;
function
ascii_entry_callback
(
textarea_state
)
{
var
ascii_art
=
w
.
document
.
getElementById
(
"
ascii_art
"
),
ascii_art_text_area
=
w
.
document
.
getElementById
(
"
ascii_art_text_area
"
);
if
(
textarea_state
==
1
)
{
alert
(
"
hi
"
);
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
[
canvas_events
.
get_previous_state
()]();
}
}
var
nw_app_quit
;
function
app_quit
()
{
...
...
pd/src/m_glob.c
View file @
f54a1cc5
...
...
@@ -101,6 +101,12 @@ static void glob_gui_properties(t_pd *dummy)
sys_autopatch_yoffset
);
}
//To enter or show ascii_art
extern
void
glob_ascii_entry
(
int
textarea_state
)
{
gui_vmess
(
"ascii_entry_callback"
,
textarea_state
);
}
// ths one lives inside g_editor so that it can access the clipboard
extern
void
glob_clipboard_text
(
t_pd
*
dummy
,
float
f
);
...
...
@@ -193,6 +199,8 @@ void glob_init(void)
gensym
(
"add-recent-file"
),
A_SYMBOL
,
0
);
class_addmethod
(
glob_pdobject
,
(
t_method
)
glob_clear_recent_files
,
gensym
(
"clear-recent-files"
),
0
);
class_addmethod
(
glob_pdobject
,
(
t_method
)
glob_ascii_entry
,
gensym
(
"toggle-ascii-entry"
),
0
);
#ifdef UNIX
class_addmethod
(
glob_pdobject
,
(
t_method
)
glob_watchdog
,
gensym
(
"watchdog"
),
0
);
...
...
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