Skip to content

Commit 8cf0e34

Browse files
committed
rename drag-and-drop to plug and play throughout
1 parent 89beec2 commit 8cf0e34

178 files changed

Lines changed: 731 additions & 689 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

about/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
#site-sidebar a:hover { color: #111; }
1717
#site-sidebar a.active { color: #111; font-weight: 500; }
1818
.content { flex: 1; padding: 4rem; max-width: 820px; }
19-
.content h1 { font-size: 2rem; font-weight: 600; letter-spacing: -0.02em; margin-bottom: 0.5rem; }
20-
.content h2 { font-size: 1.1rem; font-weight: 600; margin-top: 3rem; margin-bottom: 1rem; padding-bottom: 0.5rem; border-bottom: 1px solid #e0e0e0; }
19+
.content h1 { font-size: 2rem; font-weight: 600; letter-spacing: -0.02em; margin-bottom: 0.5rem; color: #e8b400; }
20+
.content h2 { font-size: 1.1rem; font-weight: 600; margin-top: 3rem; margin-bottom: 1rem; padding-bottom: 0.5rem; border-bottom: 1px solid #e0e0e0; color: #b8860b; }
2121
.content p { color: #444; line-height: 1.8; margin-bottom: 1rem; font-size: 0.95rem; }
2222
.content .subtitle { color: #888; font-size: 0.95rem; margin-bottom: 3rem; }
2323
.lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1px; background: #e0e0e0; border: 1px solid #e0e0e0; border-radius: 8px; overflow: hidden; margin-bottom: 2rem; }

assets/errors.yml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,3 +97,60 @@
9797
filled with zeros, it has a fixed length, and reading or writing
9898
past the end of it throws a clear error instead of silently
9999
corrupting memory.
100+
101+
- code: E0005
102+
title: ArrayList.get() returns a pointer, not a value
103+
type: Compiler Error
104+
summary: >
105+
ArrayList<UserType> stores objects as pointers (T*) internally, which
106+
matches Java's reference semantics at the C++ level. That means .get()
107+
hands back a T*, not a copy of the object. Trying to assign it directly
108+
to a T variable won't compile because you can't copy a pointer into a
109+
plain object.
110+
fix: >
111+
Declare the variable as a pointer and use arrow syntax to access its
112+
fields and methods.
113+
before: |
114+
ArrayList<Particle> particles;
115+
Particle p = particles.get(0);
116+
p.update();
117+
after: |
118+
ArrayList<Particle> particles;
119+
Particle* p = particles.get(0);
120+
p->update();
121+
notes: >
122+
This mirrors how Java actually works under the hood. When you write
123+
Particle p = list.get(0) in Java, p is a reference to the original
124+
object, not a copy of it. CppMode maps that directly to a C++ pointer
125+
so the same mutation and lifetime behaviour applies. Adding objects
126+
works with either particles.add(Particle(x, y)) or
127+
particles.add(new Particle(x, y)) — CppMode handles heap allocation
128+
in both cases. Calling particles.remove(0) removes the pointer from
129+
the list but does not delete the object. Related: E0004.
130+
- code: E0006
131+
title: Java static access syntax not valid in C++
132+
type: Compiler Error
133+
summary: >
134+
Writing ClassName.member() or ClassName.CONSTANT the way you would in Java
135+
doesn't work in C++ for static access. The dot operator in C++ means
136+
instance member access, not static. CppMode detects this pattern for
137+
common wrapper classes and any uppercase-named class it can identify as
138+
static-only.
139+
fix: >
140+
Use :: instead of . when accessing static methods or fields on a class name.
141+
before: |
142+
int n = Integer.parseInt("42");
143+
float f = Float.parseFloat("3.14");
144+
float pi = Math.PI;
145+
after: |
146+
int n = Integer::parseInt("42");
147+
float f = Float::parseFloat("3.14");
148+
float pi = Math::PI;
149+
notes: >
150+
This covers both method calls and field access. The check applies to
151+
known static-only classes: Integer, Float, Double, Long, Boolean,
152+
Character, Byte, Short, Math, Arrays, Collections, System, Thread,
153+
Runtime, Class, and Objects. It skips known instance types like PImage,
154+
PFont, PVector, PShape, and PGraphics even though they start with an
155+
uppercase letter. For your own classes, use :: for anything declared
156+
static and . only on an actual instance. Related: E0004, E0005.

downloads/cmake-setup.html

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@
1616
#site-sidebar a:hover { color: #111; }
1717
#site-sidebar a.active { color: #111; font-weight: 500; }
1818
.content { flex: 1; padding: 4rem; max-width: 860px; }
19-
.content h1 { font-size: 2rem; font-weight: 600; letter-spacing: -0.02em; margin-bottom: 0.5rem; }
19+
.content h1 { font-size: 2rem; font-weight: 600; letter-spacing: -0.02em; margin-bottom: 0.5rem; color: #e8b400; }
2020
.content .subtitle { color: #888; font-size: 0.95rem; margin-bottom: 2.5rem; }
2121
.content .back-link { font-size: 13px; color: #888; display: inline-block; margin-bottom: 2rem; }
2222
.content .back-link:hover { color: #111; }
23-
.content h2 { font-size: 1.25rem; font-weight: 600; margin: 2.5rem 0 0.75rem; }
23+
.content h2 { font-size: 1.25rem; font-weight: 600; margin: 2.5rem 0 0.75rem; color: #b8860b; }
2424
.content h3 { font-size: 1rem; font-weight: 600; margin: 1.75rem 0 0.6rem; }
2525
.content p { color: #444; line-height: 1.8; margin-bottom: 1rem; font-size: 0.95rem; }
2626
.content ul, .content ol { color: #444; line-height: 1.9; font-size: 0.95rem; margin: 0 0 1rem 1.25rem; }
@@ -69,7 +69,7 @@
6969
<div class="content">
7070
<a class="back-link" href="/downloads">&larr; Back to Downloads</a>
7171
<h1>CMake Setup</h1>
72-
<p class="subtitle">Use this if your project already uses CMake, or if you want something more structured that scales to many source files. If you just want to get something running fast, try the <a href="/downloads/dragdrop-setup.html" style="border-bottom:1px solid #ddd;">Drag-and-Drop setup</a> first.</p>
72+
<p class="subtitle">Use this if your project already uses CMake, or if you want something more structured that scales to many source files. If you just want to get something running fast, try the <a href="/downloads/plugandplay-setup.html" style="border-bottom:1px solid #ddd;">Plug and Play setup</a> first.</p>
7373

7474
<p>Pick your operating system:</p>
7575
<div class="platform-tabs">
@@ -81,9 +81,9 @@ <h1>CMake Setup</h1>
8181
<!-- WINDOWS -->
8282
<div class="platform-section active" id="tab-windows">
8383
<h2>Steps 1-3 MSYS2 setup</h2>
84-
<p>Same as the drag-and-drop guide. If you already did that setup, just also install CMake while you're in the MSYS2 MinGW 64-bit terminal:</p>
84+
<p>Same as the plug-and-play guide. If you already did that setup, just also install CMake while you're in the MSYS2 MinGW 64-bit terminal:</p>
8585
<pre><code>pacman -S --needed mingw-w64-x86_64-cmake</code></pre>
86-
<p>If you haven't done that setup yet, <a href="/downloads/dragdrop-setup.html" style="border-bottom:1px solid #ddd;">follow steps 1-3 there first</a>, then come back here.</p>
86+
<p>If you haven't done that setup yet, <a href="/downloads/plugandplay-setup.html" style="border-bottom:1px solid #ddd;">follow steps 1-3 there first</a>, then come back here.</p>
8787

8888
<h2>Step 4 Get the CMake package</h2>
8989
<p>Download <strong>processing-cpp-cmake.zip</strong> from the <a href="/downloads" style="border-bottom:1px solid #ddd;">Downloads page</a>. Extract it. Rename the folder to <code>processing-cpp</code>.</p>
@@ -96,7 +96,7 @@ <h2>Step 5 Set up your project folder</h2>
9696
└── processing-cpp/ &larr; the folder you extracted</code></pre>
9797

9898
<h2>Step 6 Write main.cpp</h2>
99-
<p>Same sketch code as in the drag-and-drop guide:</p>
99+
<p>Same sketch code as in the plug-and-play guide:</p>
100100
<pre><code>#include "Processing.h"
101101

102102
struct Sketch : public Processing::PApplet {
@@ -202,7 +202,7 @@ <h2>Configure, build, and run</h2>
202202
</div>
203203

204204
<div class="next-steps">
205-
<a href="/downloads/dragdrop-setup.html">Want something simpler? Try Drag-and-Drop</a>
205+
<a href="/downloads/plugandplay-setup.html">Want something simpler? Try Plug and Play</a>
206206
<a href="/reference">Browse the reference →</a>
207207
<a href="/examples">See more examples →</a>
208208
</div>

downloads/index.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@
1616
#site-sidebar a:hover { color: #111; }
1717
#site-sidebar a.active { color: #111; font-weight: 500; }
1818
.content { flex: 1; padding: 4rem; max-width: 880px; }
19-
.content h1 { font-size: 2rem; font-weight: 600; letter-spacing: -0.02em; margin-bottom: 0.5rem; }
19+
.content h1 { font-size: 2rem; font-weight: 600; letter-spacing: -0.02em; margin-bottom: 0.5rem; color: #e8b400; }
2020
.content .subtitle { color: #888; font-size: 0.95rem; margin-bottom: 3rem; }
21-
.content h2 { font-size: 1.3rem; font-weight: 600; margin-top: 3rem; margin-bottom: 0.5rem; }
21+
.content h2 { font-size: 1.3rem; font-weight: 600; margin-top: 3rem; margin-bottom: 0.5rem; color: #b8860b; }
2222
.content h3 { font-size: 1rem; font-weight: 600; margin-top: 1.75rem; margin-bottom: 0.75rem; }
2323
.content p { color: #444; line-height: 1.8; margin-bottom: 1rem; font-size: 0.95rem; }
2424
.content code { font-family: "SF Mono","Fira Code",monospace; font-size: 13px; background: #f4f4f4; padding: 2px 6px; border-radius: 4px; color: #111; }
@@ -128,11 +128,11 @@ <h2>Download the header library</h2>
128128

129129
<div class="download-cards">
130130
<div class="download-card">
131-
<h3>Drag-and-Drop</h3>
131+
<h3>Plug and Play</h3>
132132
<p>For projects with no existing build system, or compiling a single file directly with <code>g++</code>.</p>
133133
<div class="dl-actions">
134-
<a class="dl-btn dl-btn-primary" href="https://github.com/processing-cpp/processing.cpp/releases/latest/download/processing-cpp-dragdrop.zip">Download</a>
135-
<a class="dl-howto" href="/downloads/dragdrop-setup.html">How to use?</a>
134+
<a class="dl-btn dl-btn-primary" href="https://github.com/processing-cpp/processing.cpp/releases/latest/download/processing-cpp-plugandplay.zip">Download</a>
135+
<a class="dl-howto" href="/downloads/plugandplay-setup.html">How to use?</a>
136136
</div>
137137
</div>
138138
<div class="download-card">
Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<head>
44
<meta charset="UTF-8">
55
<meta name="viewport" content="width=device-width, initial-scale=1.0">
6-
<title>Drag-and-Drop Setup - C++ Mode for Processing</title>
6+
<title>Plug and Play Setup - C++ Mode for Processing</title>
77
<style>
88
* { margin: 0; padding: 0; box-sizing: border-box; }
99
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: #111; background: #fff; }
@@ -16,11 +16,11 @@
1616
#site-sidebar a:hover { color: #111; }
1717
#site-sidebar a.active { color: #111; font-weight: 500; }
1818
.content { flex: 1; padding: 4rem; max-width: 860px; }
19-
.content h1 { font-size: 2rem; font-weight: 600; letter-spacing: -0.02em; margin-bottom: 0.5rem; }
19+
.content h1 { font-size: 2rem; font-weight: 600; letter-spacing: -0.02em; margin-bottom: 0.5rem; color: #e8b400; }
2020
.content .subtitle { color: #888; font-size: 0.95rem; margin-bottom: 2.5rem; }
2121
.content .back-link { font-size: 13px; color: #888; display: inline-block; margin-bottom: 2rem; }
2222
.content .back-link:hover { color: #111; }
23-
.content h2 { font-size: 1.25rem; font-weight: 600; margin: 2.5rem 0 0.75rem; }
23+
.content h2 { font-size: 1.25rem; font-weight: 600; margin: 2.5rem 0 0.75rem; color: #b8860b; }
2424
.content h3 { font-size: 1rem; font-weight: 600; margin: 1.75rem 0 0.6rem; }
2525
.content p { color: #444; line-height: 1.8; margin-bottom: 1rem; font-size: 0.95rem; }
2626
.content ul, .content ol { color: #444; line-height: 1.9; font-size: 0.95rem; margin: 0 0 1rem 1.25rem; }
@@ -69,7 +69,7 @@
6969
</div>
7070
<div class="content">
7171
<a class="back-link" href="/downloads">&larr; Back to Downloads</a>
72-
<h1>Drag-and-Drop Setup</h1>
72+
<h1>Plug and Play Setup</h1>
7373
<p class="subtitle">The easiest way to get started. Unzip one folder, write a <code>.cpp</code> file next to it, and run one script. No build system, no configuration.</p>
7474

7575
<p>Pick your operating system:</p>
@@ -87,7 +87,7 @@ <h2>Step 1 Install MSYS2 (once only)</h2>
8787
<p>Press Enter again when it asks to confirm. Wait for it to finish, then close that window.</p>
8888

8989
<h2>Step 2 Get the package</h2>
90-
<p>Download <strong>processing-cpp-dragdrop.zip</strong> from the <a href="/downloads" style="border-bottom:1px solid #ddd;">Downloads page</a>. Right-click it and choose Extract All. You'll get a folder called <code>processing-cpp-dragdrop</code>. rename it to <code>processing-cpp</code>.</p>
90+
<p>Download <strong>processing-cpp-plugandplay.zip</strong> from the <a href="/downloads" style="border-bottom:1px solid #ddd;">Downloads page</a>. Right-click it and choose Extract All. You'll get a folder called <code>processing-cpp-plugandplay</code>. rename it to <code>processing-cpp</code>.</p>
9191

9292
<h2>Step 3 Set up your project folder</h2>
9393
<p>Create a new empty folder anywhere, call it <code>MySketch</code>. Move the <code>processing-cpp</code> folder into it:</p>
@@ -155,7 +155,7 @@ <h2>Step 1 Install the tools (once only)</h2>
155155
<pre><code>brew install glfw glew</code></pre>
156156

157157
<h2>Steps 2-4 Get the package and write your sketch</h2>
158-
<p>Same as Windows: download <strong>processing-cpp-dragdrop.zip</strong>, rename the extracted folder to <code>processing-cpp</code>, create a <code>MySketch</code> folder, and write <code>main.cpp</code> with the same code as above inside it.</p>
158+
<p>Same as Windows: download <strong>processing-cpp-plugandplay.zip</strong>, rename the extracted folder to <code>processing-cpp</code>, create a <code>MySketch</code> folder, and write <code>main.cpp</code> with the same code as above inside it.</p>
159159

160160
<h2>Step 5 Open VS Code and the terminal</h2>
161161
<p>Open VS Code, go to <strong>File → Open Folder</strong> and select your <code>MySketch</code> folder. Open the integrated terminal with <code>Ctrl+`</code> (or <code>Cmd+`</code> on macOS).</p>
@@ -183,7 +183,7 @@ <h2>Step 1 Install the tools (once only)</h2>
183183
sudo pacman -S gcc glfw glew</code></pre>
184184

185185
<h2>Steps 2 onwards same as macOS</h2>
186-
<p>Download <strong>processing-cpp-dragdrop.zip</strong>, rename the extracted folder to <code>processing-cpp</code>, create a <code>MySketch</code> folder, write <code>main.cpp</code> with the same code, navigate to the folder, then run:</p>
186+
<p>Download <strong>processing-cpp-plugandplay.zip</strong>, rename the extracted folder to <code>processing-cpp</code>, create a <code>MySketch</code> folder, write <code>main.cpp</code> with the same code, navigate to the folder, then run:</p>
187187
<pre><code>./processing-cpp/run.sh</code></pre>
188188
</div>
189189

error/E0001.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
<div class="layout">
4949
<div class="sidebar-outer">
5050
<div id="site-sidebar"></div>
51-
<div class="err-sidebar"><div class="err-sidebar-title">Compiler Errors</div><a href="E0001.html" class="active">E0001 &middot; PGraphics needs to be a pointer</a><a href="E0002.html" class="">E0002 &middot; PImage needs to be a pointer</a><a href="E0003.html" class="">E0003 &middot; PShader needs to be a pointer</a><a href="E0004.html" class="">E0004 &middot; Java-style array declarations aren&#x27;t supported</a></div>
51+
<div class="err-sidebar"><div class="err-sidebar-title">Compiler Errors</div><a href="E0001.html" class="active">E0001 &middot; PGraphics needs to be a pointer</a><a href="E0002.html" class="">E0002 &middot; PImage needs to be a pointer</a><a href="E0003.html" class="">E0003 &middot; PShader needs to be a pointer</a><a href="E0004.html" class="">E0004 &middot; Java-style array declarations aren&#x27;t supported</a><a href="E0005.html" class="">E0005 &middot; ArrayList.get() returns a pointer, not a value</a><a href="E0006.html" class="">E0006 &middot; Java static access syntax not valid in C++</a></div>
5252
</div>
5353
<div class="content">
5454
<h1>E0001: PGraphics needs to be a pointer</h1>
@@ -69,7 +69,7 @@ <h2>Example</h2><div class="code-pair"><div><span class="code-label before">Befo
6969
<h2>Notes</h2><p>Once pg is a pointer, use -&gt; instead of the dot you&#x27;d use in Java.</p>
7070
</div>
7171
</div>
72-
<footer><p>C++ Mode for Processing</p><p class="footer-contact"><a href="mailto:pep84c@gmail.com">pep84c@gmail.com</a> &middot; <a href="https://discord.gg/vShSrPegJT">Discord</a></p></footer>
72+
<footer><p>Processing for C++</p></footer>
7373
<script src="../assets/nav.js"></script>
7474
</body>
7575
</html>

error/E0002.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
<div class="layout">
4949
<div class="sidebar-outer">
5050
<div id="site-sidebar"></div>
51-
<div class="err-sidebar"><div class="err-sidebar-title">Compiler Errors</div><a href="E0001.html" class="">E0001 &middot; PGraphics needs to be a pointer</a><a href="E0002.html" class="active">E0002 &middot; PImage needs to be a pointer</a><a href="E0003.html" class="">E0003 &middot; PShader needs to be a pointer</a><a href="E0004.html" class="">E0004 &middot; Java-style array declarations aren&#x27;t supported</a></div>
51+
<div class="err-sidebar"><div class="err-sidebar-title">Compiler Errors</div><a href="E0001.html" class="">E0001 &middot; PGraphics needs to be a pointer</a><a href="E0002.html" class="active">E0002 &middot; PImage needs to be a pointer</a><a href="E0003.html" class="">E0003 &middot; PShader needs to be a pointer</a><a href="E0004.html" class="">E0004 &middot; Java-style array declarations aren&#x27;t supported</a><a href="E0005.html" class="">E0005 &middot; ArrayList.get() returns a pointer, not a value</a><a href="E0006.html" class="">E0006 &middot; Java static access syntax not valid in C++</a></div>
5252
</div>
5353
<div class="content">
5454
<h1>E0002: PImage needs to be a pointer</h1>
@@ -65,7 +65,7 @@ <h2>Example</h2><div class="code-pair"><div><span class="code-label before">Befo
6565
<h2>Notes</h2><p>image() already accepts the pointer directly, so you only need -&gt; when reading something off the image itself, like img-&gt;width.</p>
6666
</div>
6767
</div>
68-
<footer><p>C++ Mode for Processing</p><p class="footer-contact"><a href="mailto:pep84c@gmail.com">pep84c@gmail.com</a> &middot; <a href="https://discord.gg/vShSrPegJT">Discord</a></p></footer>
68+
<footer><p>Processing for C++</p></footer>
6969
<script src="../assets/nav.js"></script>
7070
</body>
7171
</html>

error/E0003.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
<div class="layout">
4949
<div class="sidebar-outer">
5050
<div id="site-sidebar"></div>
51-
<div class="err-sidebar"><div class="err-sidebar-title">Compiler Errors</div><a href="E0001.html" class="">E0001 &middot; PGraphics needs to be a pointer</a><a href="E0002.html" class="">E0002 &middot; PImage needs to be a pointer</a><a href="E0003.html" class="active">E0003 &middot; PShader needs to be a pointer</a><a href="E0004.html" class="">E0004 &middot; Java-style array declarations aren&#x27;t supported</a></div>
51+
<div class="err-sidebar"><div class="err-sidebar-title">Compiler Errors</div><a href="E0001.html" class="">E0001 &middot; PGraphics needs to be a pointer</a><a href="E0002.html" class="">E0002 &middot; PImage needs to be a pointer</a><a href="E0003.html" class="active">E0003 &middot; PShader needs to be a pointer</a><a href="E0004.html" class="">E0004 &middot; Java-style array declarations aren&#x27;t supported</a><a href="E0005.html" class="">E0005 &middot; ArrayList.get() returns a pointer, not a value</a><a href="E0006.html" class="">E0006 &middot; Java static access syntax not valid in C++</a></div>
5252
</div>
5353
<div class="content">
5454
<h1>E0003: PShader needs to be a pointer</h1>
@@ -65,7 +65,7 @@ <h2>Example</h2><div class="code-pair"><div><span class="code-label before">Befo
6565
<h2>Notes</h2><p>Use -&gt; for calling methods on the shader itself, like shader-&gt;set(...).</p>
6666
</div>
6767
</div>
68-
<footer><p>C++ Mode for Processing</p><p class="footer-contact"><a href="mailto:pep84c@gmail.com">pep84c@gmail.com</a> &middot; <a href="https://discord.gg/vShSrPegJT">Discord</a></p></footer>
68+
<footer><p>Processing for C++</p></footer>
6969
<script src="../assets/nav.js"></script>
7070
</body>
7171
</html>

0 commit comments

Comments
 (0)