Commit f92c6c74 authored by Jonathan Wilkes's avatar Jonathan Wilkes
Browse files

Merge branch 'fix-midi-help'

parents 5ea49b53 b11cfeb6
#N canvas 430 38 555 619 10; #N canvas 1 53 555 619 10;
#X obj 0 595 cnv 15 552 21 empty \$0-pddp.cnv.footer empty 20 12 0 #X obj 0 595 cnv 15 552 21 empty \$0-pddp.cnv.footer empty 20 12 0
14 -228856 -66577 0; 14 -228856 -66577 0;
#X obj 0 0 cnv 15 552 40 empty \$0-pddp.cnv.header (MIDI) 3 12 0 18 #X obj 0 0 cnv 15 552 40 empty \$0-pddp.cnv.header (MIDI) 3 12 0 18
-204280 -1 0; -204280 -1 0;
#X obj 0 288 cnv 3 550 3 empty \$0-pddp.cnv.inlets inlets 8 12 0 13 #N canvas 403 185 494 367 META 0;
-228856 -1 0;
#N canvas 489 291 494 344 META 0;
#X text 12 105 LIBRARY internal; #X text 12 105 LIBRARY internal;
#X text 12 145 WEBSITE http://crca.ucsd.edu/~msp/; #X text 12 145 WEBSITE http://crca.ucsd.edu/~msp/;
#X text 12 65 LICENSE SIBSD; #X text 12 65 LICENSE SIBSD;
...@@ -20,13 +18,8 @@ touchin bendout ctlout midiout noteout pgmout polytouchout touchout ...@@ -20,13 +18,8 @@ touchin bendout ctlout midiout noteout pgmout polytouchout touchout
; ;
#X text 12 165 RELEASE_DATE 1997; #X text 12 165 RELEASE_DATE 1997;
#X restore 500 597 pd META; #X restore 500 597 pd META;
#X obj 0 495 cnv 3 550 3 empty \$0-pddp.cnv.outlets outlets 8 12 0 #X obj 0 561 cnv 3 550 3 empty \$0-pddp.cnv.more_info more_info 8 12
13 -228856 -1 0;
#X obj 0 538 cnv 3 550 3 empty \$0-pddp.cnv.argument arguments 8 12
0 13 -228856 -1 0; 0 13 -228856 -1 0;
#X obj 0 566 cnv 3 550 3 empty \$0-pddp.cnv.more_info more_info 8 12
0 13 -228856 -1 0;
#X text 98 542 (none);
#N canvas 217 519 428 109 Related_objects 0; #N canvas 217 519 428 109 Related_objects 0;
#X obj 62 43 makenote; #X obj 62 43 makenote;
#X obj 22 43 poly; #X obj 22 43 poly;
...@@ -35,66 +28,110 @@ touchin bendout ctlout midiout noteout pgmout polytouchout touchout ...@@ -35,66 +28,110 @@ touchin bendout ctlout midiout noteout pgmout polytouchout touchout
14 -204280 -1 0; 14 -204280 -1 0;
#X text 8 2 (MIDI) Related Objects; #X text 8 2 (MIDI) Related Objects;
#X restore 102 598 pd Related_objects; #X restore 102 598 pd Related_objects;
#X obj 79 297 cnv 17 3 130 empty \$0-pddp.cnv.let.0 0 5 9 0 16 -228856
-162280 0;
#X text 98 296 float;
#X text 98 353 list;
#X text 98 503 float;
#X obj 79 504 cnv 17 3 30 empty \$0-pddp.cnv.let.0 0 5 9 0 16 -228856
-162280 0;
#X obj 79 440 cnv 17 3 45 empty \$0-pddp.cnv.let.1 1 5 9 0 16 -228856
-162280 0;
#X text 98 439 float;
#X text 98 383 flush;
#X text 98 413 clear;
#X text 168 383 - output all values one by one \, in the order they
were received \, and clear the collection.;
#X text 168 503 - upon sending the "flush" message to the left inlet
\, [bag] will output each value in the order it was received.;
#X text 168 353 - a (value \, flag) pair is distributed to the two
inlets. Lists with more than two elements will be truncated.;
#X text 168 413 - clear the collection.;
#X text 167 439 - a float to the right inlet sets the "flag": if zero
\, values to the left inlet will not be added to the collection. If
nonzero \, values to the right inlet will be added to the collection.
;
#X text 168 296 - a float to the left inlet will be added to the collection
if the last value the right inlet received was nonzero. If the last
value the right inlet received was zero \, the float sent to the right
inlet will be removed from the collection.;
#X text 11 23 MIDI input/output objects; #X text 11 23 MIDI input/output objects;
#X obj 86 86 bendin; #X obj 86 57 bendin;
#X obj 86 123 bendout; #X obj 86 343 bendout;
#X obj 131 86 ctlin; #X obj 86 113 ctlin;
#X obj 137 123 ctlout; #X obj 86 403 ctlout;
#X obj 215 86 notein; #X obj 85 237 notein;
#X obj 233 123 noteout; #X obj 267 343 noteout;
#X obj 260 86 pgmin; #X obj 266 57 pgmin;
#X obj 284 123 pgmout; #X obj 267 403 pgmout;
#X obj 425 86 touchin; #X obj 267 237 touchin;
#X obj 299 86 polytouchin; #X obj 267 113 polytouchin;
#X obj 170 86 midiin; #X obj 85 177 midiin;
#X obj 374 86 sysexin; #X obj 267 177 sysexin;
#X obj 182 123 midiout; #X obj 86 463 midiout;
#X obj 329 123 polytouchout; #X obj 267 463 polytouchout;
#X obj 410 123 touchout; #X obj 267 523 touchout;
#X text 10 86 MIDI input:; #X text 10 57 MIDI input:;
#X text 10 123 MIDI output:; #X text 10 319 MIDI output:;
#X obj 320 185 pddp/pddplink touchin-help.pd; #X obj 345 522 pddp/pddplink touchout-help.pd;
#X obj 243 185 touchin; #X obj 146 464 pddp/pddplink midiout-help.pd;
#X obj 243 210 polytouchin;
#X obj 320 210 pddp/pddplink polytouchin-help.pd;
#X obj 243 235 touchout;
#X obj 320 235 pddp/pddplink touchout-help.pd;
#X obj 243 260 polytouchout;
#X obj 320 260 pddp/pddplink polytouchout-help.pd;
#X obj 80 185 midiin;
#X obj 80 235 sysexin;
#X obj 80 210 midiout;
#X obj 135 185 pddp/pddplink midiin-help.pd;
#X obj 135 235 pddp/pddplink sysexin-help.pd;
#X obj 135 210 pddp/pddplink midiout-help.pd;
#X obj 4 597 pddp/pddplink all_about_help_patches.pd -text Usage Guide #X obj 4 597 pddp/pddplink all_about_help_patches.pd -text Usage Guide
; ;
#X text 77 151 Right-click the objects above and choose "Help" \, or #X floatatom 86 78 5 0 0 0 - - -, f 5;
follow the links below for help on these objects:; #X floatatom 119 78 5 0 0 0 - - -, f 5;
#X floatatom 86 141 5 0 0 0 - - -, f 5;
#X floatatom 126 141 5 0 0 0 - - -, f 5;
#X floatatom 166 141 5 0 0 0 - - -, f 5;
#X obj 346 462 pddp/pddplink polytouchout-help.pd;
#X floatatom 85 200 5 0 0 0 - - -, f 5;
#X floatatom 125 200 5 0 0 0 - - -, f 5;
#X floatatom 85 265 5 0 0 0 - - -, f 5;
#X floatatom 125 265 5 0 0 0 - - -, f 5;
#X floatatom 165 265 5 0 0 0 - - -, f 5;
#X floatatom 266 79 5 0 0 0 - - -, f 5;
#X floatatom 301 79 5 0 0 0 - - -, f 5;
#X floatatom 267 135 5 0 0 0 - - -, f 5;
#X floatatom 307 135 5 0 0 0 - - -, f 5;
#X floatatom 347 135 5 0 0 0 - - -, f 5;
#X floatatom 267 199 5 0 0 0 - - -, f 5;
#X floatatom 307 199 5 0 0 0 - - -, f 5;
#X floatatom 267 259 5 0 0 0 - - -, f 5;
#X floatatom 307 259 5 0 0 0 - - -, f 5;
#X floatatom 86 319 5 0 0 0 - - -, f 5;
#X floatatom 125 319 5 0 0 0 - - -, f 5;
#X floatatom 85 379 5 0 0 0 - - -, f 5;
#X floatatom 124 379 5 0 0 0 - - -, f 5;
#X floatatom 164 379 5 0 0 0 - - -, f 5;
#X floatatom 86 439 5 0 0 0 - - -, f 5;
#X floatatom 125 439 5 0 0 0 - - -, f 5;
#X floatatom 267 319 5 0 0 0 - - -, f 5;
#X floatatom 306 319 5 0 0 0 - - -, f 5;
#X floatatom 346 319 5 0 0 0 - - -, f 5;
#X floatatom 267 379 5 0 0 0 - - -, f 5;
#X floatatom 306 379 5 0 0 0 - - -, f 5;
#X floatatom 267 439 5 0 0 0 - - -, f 5;
#X floatatom 306 439 5 0 0 0 - - -, f 5;
#X floatatom 346 439 5 0 0 0 - - -, f 5;
#X floatatom 267 499 5 0 0 0 - - -, f 5;
#X floatatom 312 499 5 0 0 0 - - -, f 5;
#X obj 131 57 pddp/pddplink bendin-help.pd;
#X obj 129 112 pddp/pddplink ctlin-help.pd;
#X obj 131 177 pddp/pddplink midiin-help.pd;
#X obj 131 237 pddp/pddplink notein-help.pd;
#X obj 346 57 pddp/pddplink pgmin-help.pd;
#X obj 347 113 pddp/pddplink polytouchin-help.pd;
#X obj 347 177 pddp/pddplink sysexin-help.pd;
#X obj 346 237 pddp/pddplink touchin-help.pd;
#X obj 146 343 pddp/pddplink bendout-help.pd;
#X obj 146 403 pddp/pddplink ctlout-help.pd;
#X obj 347 343 pddp/pddplink noteout-help.pd;
#X obj 347 403 pddp/pddplink pgmout-help.pd;
#X connect 6 0 26 0;
#X connect 6 1 27 0;
#X connect 8 0 28 0;
#X connect 8 1 29 0;
#X connect 8 2 30 0;
#X connect 10 0 34 0;
#X connect 10 1 35 0;
#X connect 10 2 36 0;
#X connect 12 0 37 0;
#X connect 12 1 38 0;
#X connect 14 0 44 0;
#X connect 14 1 45 0;
#X connect 15 0 39 0;
#X connect 15 1 40 0;
#X connect 15 2 41 0;
#X connect 16 0 32 0;
#X connect 16 1 33 0;
#X connect 17 0 42 0;
#X connect 17 1 43 0;
#X connect 46 0 7 0;
#X connect 47 0 7 1;
#X connect 48 0 9 0;
#X connect 49 0 9 1;
#X connect 50 0 9 2;
#X connect 51 0 18 0;
#X connect 52 0 18 1;
#X connect 53 0 11 0;
#X connect 54 0 11 1;
#X connect 55 0 11 2;
#X connect 56 0 13 0;
#X connect 57 0 13 1;
#X connect 58 0 19 0;
#X connect 59 0 19 1;
#X connect 60 0 19 2;
#X connect 61 0 20 0;
#X connect 62 0 20 1;
...@@ -13,12 +13,28 @@ ...@@ -13,12 +13,28 @@
<legend data-i18n="canvas.prop.heading.gop"></legend> <legend data-i18n="canvas.prop.heading.gop"></legend>
<table class="pairs"> <table class="pairs">
<tr class="display_flags prop hidden" data-i18n="[title]canvas.prop.gop_tt"> <tr class="prop no_scroll hidden" data-i18n="[title]canvas.prop.no_scroll_tt">
<td> <td colspan="2">
<input type="checkbox" name="gop" value="on"> <label>
<input type="checkbox" name="no_scroll" value="off">
<span data-i18n="canvas.prop.no_scroll"></span>
</label>
</td> </td>
<td> </tr>
<span id="gop_label" data-i18n="canvas.prop.gop"></span> <tr class="prop no_menu hidden" data-i18n="[title]canvas.prop.no_menu_tt">
<td colspan="2">
<label>
<input type="checkbox" name="no_menu" value="off">
<span data-i18n="canvas.prop.no_menu"></span>
</label>
</td>
</tr>
<tr class="display_flags prop hidden" data-i18n="[title]canvas.prop.gop_tt">
<td colspan="2">
<label>
<input type="checkbox" name="gop" value="on">
<span data-i18n="canvas.prop.gop"></span>
</label>
</td> </td>
</tr> </tr>
<tr class="x_pix prop hidden"> <tr class="x_pix prop hidden">
...@@ -443,11 +459,6 @@ arrays_select.addEventListener("change", function(evt) { ...@@ -443,11 +459,6 @@ arrays_select.addEventListener("change", function(evt) {
array_choose(evt.target.value); array_choose(evt.target.value);
}); });
var gop_label = document.getElementById("gop_label");
gop_label.addEventListener("click", function() {
document.getElementsByName("gop")[0].click();
});
var gop_button = document.getElementsByName("gop")[0]; var gop_button = document.getElementsByName("gop")[0];
gop_button.addEventListener("click", function(evt) { gop_button.addEventListener("click", function(evt) {
set_gop(this.checked); set_gop(this.checked);
...@@ -510,8 +521,8 @@ function substitute_space(arg) { ...@@ -510,8 +521,8 @@ function substitute_space(arg) {
} }
function get_input(name) { function get_input(name) {
var val = document.getElementsByName(name)[0].value; var elem = document.getElementsByName(name)[0];
return val; return (elem.type === "checkbox") ? elem.checked : elem.value;
} }
// get a value from the garray attr array // get a value from the garray attr array
...@@ -540,12 +551,12 @@ function get_array_slot_4(attrs) { ...@@ -540,12 +551,12 @@ function get_array_slot_4(attrs) {
function apply() { function apply() {
var gop, hide_name, slot_4; var gop, hide_name, slot_4;
// If this is a dialog to create a new array, we // If this is a dialog to create a new array
// skip the canvas dialog callback // skip the canvas dialog callback
if (!new_array_dialog) { if (!new_array_dialog) {
// Note: the "+" casts Boolean to Number // Note: the "+" casts Boolean to Number
gop = +document.getElementsByName("gop")[0].checked; gop = +get_input("gop");
hide_name = +document.getElementsByName("hide_name")[0].checked; hide_name = +get_input("hide_name");
pdgui.pdsend(pd_object_callback, "donecanvasdialog", pdgui.pdsend(pd_object_callback, "donecanvasdialog",
+get_input("x_scale"), +get_input("x_scale"),
...@@ -558,7 +569,9 @@ function apply() { ...@@ -558,7 +569,9 @@ function apply() {
+get_input("x_pix"), +get_input("x_pix"),
+get_input("y_pix"), +get_input("y_pix"),
+get_input("x_margin"), +get_input("x_margin"),
+get_input("y_margin") +get_input("y_margin"),
+get_input("no_scroll"),
+get_input("no_menu")
); );
} }
...@@ -760,6 +773,11 @@ function populate_form(attr_object) { ...@@ -760,6 +773,11 @@ function populate_form(attr_object) {
// X/Y scaling-- garray is always in a gop so not needed // X/Y scaling-- garray is always in a gop so not needed
document.getElementsByClassName("x_scale")[0] document.getElementsByClassName("x_scale")[0]
.classList.add("hidden"); .classList.add("hidden");
// scrollbars and menu
document.getElementsByClassName("no_scroll")[0]
.classList.add("hidden");
document.getElementsByClassName("no_menu")[0]
.classList.add("hidden");
} }
} }
......
...@@ -306,6 +306,10 @@ ...@@ -306,6 +306,10 @@
"viewbox_offsets": "viewbox offsets", "viewbox_offsets": "viewbox offsets",
"arrays": "array options" "arrays": "array options"
}, },
"no_scroll": "hide scrollbars",
"no_scroll_tt": "hide window scrollbars",
"no_menu": "hide menu",
"no_menu_tt": "hide window menu",
"gop": "graph on parent", "gop": "graph on parent",
"gop_tt": "show the inner contents of this canvas in a rectangle on the containing canvas", "gop_tt": "show the inner contents of this canvas in a rectangle on the containing canvas",
"hide_name": "hide name and arguments", "hide_name": "hide name and arguments",
......
...@@ -1033,9 +1033,11 @@ function register_window_id(cid, attr_array) { ...@@ -1033,9 +1033,11 @@ function register_window_id(cid, attr_array) {
// For now, there is no way for the cord inspector to be turned on by // For now, there is no way for the cord inspector to be turned on by
// default. But if this changes we need to set its menu item checkbox // default. But if this changes we need to set its menu item checkbox
// accordingly here // accordingly here
//set_cord_inspector_checkbox(); // set_cord_inspector_checkbox();
// One final kludge-- because window creation is asyncronous, we may // Set scroll bars
pdgui.canvas_set_scrollbars(cid, !attr_array.hide_scroll);
// One final kludge-- because window creation is asynchronous, we may
// have gotten a dirty flag before the window was created. In that case // have gotten a dirty flag before the window was created. In that case
// we check the title_queue to see if our title now contains an asterisk // we check the title_queue to see if our title now contains an asterisk
// (which is the visual cue for "dirty") // (which is the visual cue for "dirty")
......
...@@ -991,6 +991,17 @@ function gui_canvas_set_cordinspector(cid, state) { ...@@ -991,6 +991,17 @@ function gui_canvas_set_cordinspector(cid, state) {
patchwin[cid].window.set_cord_inspector_checkbox(state !== 0 ? true : false); patchwin[cid].window.set_cord_inspector_checkbox(state !== 0 ? true : false);
} }
function canvas_set_scrollbars(cid, scroll) {
patchwin[cid].window.document.body.style.
overflow = scroll ? "visible" : "hidden";
}
exports.canvas_set_scrollbars = canvas_set_scrollbars;
function gui_canvas_set_scrollbars(cid, no_scrollbars) {
canvas_set_scrollbars(cid, no_scrollbars === 0);
}
exports.menu_send = menu_send; exports.menu_send = menu_send;
function gui_set_toplevel_window_list(dummy, attr_array) { function gui_set_toplevel_window_list(dummy, attr_array) {
...@@ -1198,7 +1209,8 @@ function gui_startup(version, fontname_from_pd, fontweight_from_pd, ...@@ -1198,7 +1209,8 @@ function gui_startup(version, fontname_from_pd, fontweight_from_pd,
// } else { // } else {
// set oldtclversion 0 // set oldtclversion 0
// } // }
pdsend("pd init", enquote(pwd), "0", font_fixed_metrics); pdsend("pd init", enquote(defunkify_windows_path(pwd)), "0",
font_fixed_metrics);
// # add the audio and help menus to the Pd window. We delayed this // # add the audio and help menus to the Pd window. We delayed this
// # so that we'd know the value of "apilist". // # so that we'd know the value of "apilist".
...@@ -1381,7 +1393,7 @@ function create_window(cid, type, width, height, xpos, ypos, attr_array) { ...@@ -1381,7 +1393,7 @@ function create_window(cid, type, width, height, xpos, ypos, attr_array) {
} }
// create a new canvas // create a new canvas
function gui_canvas_new(cid, width, height, geometry, zoom, editmode, name, dir, dirty_flag, cargs) { function gui_canvas_new(cid, width, height, geometry, zoom, editmode, name, dir, dirty_flag, hide_scroll, hide_menu, cargs) {
// hack for buggy tcl popups... should go away for node-webkit // hack for buggy tcl popups... should go away for node-webkit
//reset_ctrl_on_popup_window //reset_ctrl_on_popup_window
...@@ -1432,7 +1444,8 @@ function gui_canvas_new(cid, width, height, geometry, zoom, editmode, name, dir, ...@@ -1432,7 +1444,8 @@ function gui_canvas_new(cid, width, height, geometry, zoom, editmode, name, dir,
dirty: dirty_flag, dirty: dirty_flag,
args: cargs, args: cargs,
zoom: zoom, zoom: zoom,
editmode: editmode editmode: editmode,
hide_scroll: hide_scroll
}); });
} }
......
...@@ -742,6 +742,18 @@ void canvas_scalar_event(t_canvas *x, t_symbol *s, int argc, t_atom *argv) ...@@ -742,6 +742,18 @@ void canvas_scalar_event(t_canvas *x, t_symbol *s, int argc, t_atom *argv)
draw_notify(x, s, argc, argv); draw_notify(x, s, argc, argv);
} }
void canvas_show_scrollbars(t_canvas *x, t_floatarg f)
{
x->gl_noscroll = (int)f;
gui_vmess("gui_canvas_set_scrollbars", "xi", x, (int)f);
}
void canvas_show_menu(t_canvas *x, t_floatarg f)
{
post("setting nomenu to %d", f);
x->gl_nomenu = (int)f;
}
extern void canvas_check_nlet_highlights(t_canvas *x); extern void canvas_check_nlet_highlights(t_canvas *x);
/*********** dpsaha@vt.edu resize move hooks ****************/ /*********** dpsaha@vt.edu resize move hooks ****************/
...@@ -2579,6 +2591,10 @@ void g_canvas_setup(void) ...@@ -2579,6 +2591,10 @@ void g_canvas_setup(void)
class_addmethod(canvas_class, (t_method)canvas_scalar_event, class_addmethod(canvas_class, (t_method)canvas_scalar_event,
gensym("scalar_event"), A_GIMME, 0); gensym("scalar_event"), A_GIMME, 0);
class_addmethod(canvas_class, (t_method)canvas_show_scrollbars,
gensym("scroll"), A_FLOAT, 0);
class_addmethod(canvas_class, (t_method)canvas_show_menu,
gensym("menu"), A_FLOAT, 0);
/* ---------------------- list handling ------------------------ */ /* ---------------------- list handling ------------------------ */
class_addmethod(canvas_class, (t_method)glist_clear, gensym("clear"), class_addmethod(canvas_class, (t_method)glist_clear, gensym("clear"),
......
...@@ -217,6 +217,8 @@ struct _glist ...@@ -217,6 +217,8 @@ struct _glist
unsigned int gl_private:1; /* private flag used in x_scalar.c */ unsigned int gl_private:1; /* private flag used in x_scalar.c */
unsigned int gl_isclone:1; /* exists as part of a clone object */ unsigned int gl_isclone:1; /* exists as part of a clone object */
unsigned int gl_gop_initialized:1; /* used for tagged moving of gop-ed objects to avoid redundant reinit */ unsigned int gl_gop_initialized:1; /* used for tagged moving of gop-ed objects to avoid redundant reinit */
unsigned int gl_noscroll:1; /* don't show window scrollbars */
unsigned int gl_nomenu:1; /* don't show the window menu */
//global preset array pointer //global preset array pointer
t_preset_hub *gl_phub; t_preset_hub *gl_phub;
//infinite undo goodies (have to stay here rather than the editor to prevent its obliteration when editor is deleted) //infinite undo goodies (have to stay here rather than the editor to prevent its obliteration when editor is deleted)
......
...@@ -2471,7 +2471,7 @@ void canvas_vis(t_canvas *x, t_floatarg f) ...@@ -2471,7 +2471,7 @@ void canvas_vis(t_canvas *x, t_floatarg f)
//fprintf(stderr,"new\n"); //fprintf(stderr,"new\n");
canvas_create_editor(x); canvas_create_editor(x);
canvas_args_to_string(argsbuf, x); canvas_args_to_string(argsbuf, x);
gui_vmess("gui_canvas_new", "xiisiissis", gui_vmess("gui_canvas_new", "xiisiissiiis",
x, x,
(int)(x->gl_screenx2 - x->gl_screenx1), (int)(x->gl_screenx2 - x->gl_screenx1),
(int)(x->gl_screeny2 - x->gl_screeny1), (int)(x->gl_screeny2 - x->gl_screeny1),
...@@ -2481,6 +2481,8 @@ void canvas_vis(t_canvas *x, t_floatarg f) ...@@ -2481,6 +2481,8 @@ void canvas_vis(t_canvas *x, t_floatarg f)
x->gl_name->s_name, x->gl_name->s_name,
canvas_getdir(x)->s_name, canvas_getdir(x)->s_name,
x->gl_dirty, x->gl_dirty,
x->gl_noscroll,
x->gl_nomenu,
argsbuf); argsbuf);
/* It looks like this font size call is no longer needed, /* It looks like this font size call is no longer needed,
...@@ -2684,6 +2686,8 @@ void canvas_properties(t_glist *x) ...@@ -2684,6 +2686,8 @@ void canvas_properties(t_glist *x)
gui_s("y_pix"); gui_i((int)x->gl_pixheight); gui_s("y_pix"); gui_i((int)x->gl_pixheight);
gui_s("x_margin"); gui_i((int)x->gl_xmargin); gui_s("x_margin"); gui_i((int)x->gl_xmargin);
gui_s("y_margin"); gui_i((int)x->gl_ymargin); gui_s("y_margin"); gui_i((int)x->gl_ymargin);
gui_s("no_scroll"); gui_i(x->gl_noscroll);
gui_s("no_menu"); gui_i(x->gl_nomenu);
} }
else else
{ {
...@@ -2705,6 +2709,8 @@ void canvas_properties(t_glist *x) ...@@ -2705,6 +2709,8 @@ void canvas_properties(t_glist *x)
gui_s("y_pix"); gui_i((int)x->gl_pixheight); gui_s("y_pix"); gui_i((int)x->gl_pixheight);
gui_s("x_margin"); gui_i((int)x->gl_xmargin); gui_s("x_margin"); gui_i((int)x->gl_xmargin);
gui_s("y_margin"); gui_i((int)x->gl_ymargin); gui_s("y_margin"); gui_i((int)x->gl_ymargin);
gui_s("no_scroll"); gui_i(x->gl_noscroll);
gui_s("no_menu"); gui_i(x->gl_nomenu);
} }
//gfxstub_new(&x->gl_pd, x, graphbuf); //gfxstub_new(&x->gl_pd, x, graphbuf);
...@@ -2761,6 +2767,10 @@ static void canvas_donecanvasdialog(t_glist *x, ...@@ -2761,6 +2767,10 @@ static void canvas_donecanvasdialog(t_glist *x,
xmargin = atom_getfloatarg(9, argc, argv); xmargin = atom_getfloatarg(9, argc, argv);
ymargin = atom_getfloatarg(10, argc, argv); ymargin = atom_getfloatarg(10, argc, argv);
pd_vmess(&x->gl_pd, gensym("scroll"), "f",
atom_getfloatarg(11, argc, argv));
x->gl_nomenu = atom_getintarg(12, argc, argv);
/* parent windows are treated differently than applies to /* parent windows are treated differently than applies to
individual objects */ individual objects */
if (glist_getcanvas(x) != x && !canvas_isabstraction(x)) if (glist_getcanvas(x) != x && !canvas_isabstraction(x))
......
...@@ -779,6 +779,13 @@ static void canvas_saveto(t_canvas *x, t_binbuf *b) ...@@ -779,6 +779,13 @@ static void canvas_saveto(t_canvas *x, t_binbuf *b)
(t_float)x->gl_pixwidth, (t_float)x->gl_pixheight, (t_float)x->gl_pixwidth, (t_float)x->gl_pixheight,
(t_float)x->gl_isgraph); (t_float)x->gl_isgraph);
} }
/* save a message if scrollbars are disabled-- otherwise do nothing
for the sake of backwards compatibility. */
if (x->gl_noscroll)
binbuf_addv(b, "ssi;", gensym("#X"), gensym("scroll"), x->gl_noscroll);
/* same for menu */
if (x->gl_nomenu)
binbuf_addv(b, "ssi;", gensym("#X"), gensym("menu"), x->gl_nomenu);
} }
/* yuck, wish I didn't have to do this... */ /* yuck, wish I didn't have to do this... */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment