Skip to content

Commit 1d903a1

Browse files
committed
Enhance: Beautiful ASCII mockups throughout docs
1 parent b0468e8 commit 1d903a1

3 files changed

Lines changed: 190 additions & 77 deletions

File tree

docs/developer.md

Lines changed: 54 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,26 @@ This guide covers **pcode-editor version 0.2.28**.
1313
pcode-editor is built with a layered architecture:
1414

1515
```
16-
+---------------------------------------------+
17-
| Main Application |
18-
| (editor_app.cpp) |
19-
+-------------------------------------+
20-
| Editor Core | UI Rendering |
21-
| (TextEditor) | (Dear ImGui) |
22-
+-------------------------------------+
23-
| Input/Window Management |
24-
| (GLFW) |
25-
+-------------------------------------+
26-
| Platform-Specific APIs |
27-
| (Win32/Wayland/X11/Cocoa) |
28-
+---------------------------------------------+
16+
.====================================================================.
17+
| LAYER ARCHITECTURE |
18+
+====================================================================+
19+
| |
20+
| +-----------------------------------------------------------+ |
21+
| | EDITOR APP CORE | |
22+
| | (editor_app.cpp main loop) | |
23+
| +----------------------+------------------------------------+ |
24+
| | TEXT EDITOR | UI RENDERING | |
25+
| | (ImGuiColorText | (Dear ImGui widgets) | |
26+
| | TextEdit) | | |
27+
| +----------------------+------------------------------------+ |
28+
| +-----------------------------------------------------------+ |
29+
| | INPUT & WINDOW MANAGEMENT | |
30+
| | (GLFW) | |
31+
| +-----------------------------------------------------------+ |
32+
| | PLATFORM BACKENDS | |
33+
| | Win32 | Wayland | X11 | Cocoa | |
34+
| +----------------------+------------------------------------+ |
35+
'===================================================================='
2936
```
3037

3138
### Source Files
@@ -301,29 +308,40 @@ GIT_TAG v1.91 # Update this
301308
## Project Structure
302309

303310
```
304-
pcode-editor/
305-
+-- src/
306-
| +-- main.cpp # Entry point
307-
| +-- editor_app.h # Class definitions
308-
| +-- editor_app.cpp # Implementation
309-
|
310-
+-- tests/
311-
| +-- test_view_features.cpp
312-
|
313-
+-- scripts/
314-
| +-- build.sh # Universal build
315-
| +-- build-linux.sh # Linux
316-
| +-- build-windows.bat # Windows MSVC
317-
| +-- build-freebsd.sh # BSD
318-
|
319-
+-- .githooks/
320-
| +-- pre-commit # Build validation
321-
|
322-
+-- CMakeLists.txt
323-
+-- pcode-settings.json
324-
+-- VERSION
325-
+-- LICENSE
326-
+-- README.md
311+
.====================================================================.
312+
| PROJECT STRUCTURE |
313+
+====================================================================+
314+
| |
315+
| pcode-editor/ |
316+
| | |
317+
| +--- src/ |
318+
| | +-- main.cpp -- Entry point |
319+
| | +-- editor_app.h -- Class definitions |
320+
| | +-- editor_app.cpp -- Main implementation |
321+
| | |
322+
| +--- tests/ |
323+
| | +-- test_view_features.cpp |
324+
| | |
325+
| +--- scripts/ |
326+
| | +-- build.sh -- Universal build |
327+
| | +-- build-linux.sh -- Linux (Wayland) |
328+
| | +-- build-windows.bat -- Windows (MSVC) |
329+
| | +-- build-freebsd.sh -- BSD (X11) |
330+
| | |
331+
| +--- .githooks/ |
332+
| | +-- pre-commit -- Build validation |
333+
| | |
334+
| +--- docs/ |
335+
| | +-- userguide.md |
336+
| | +-- developer.md |
337+
| | +-- faq.md |
338+
| | |
339+
| +--- CMakeLists.txt |
340+
| +--- pcode-settings.json |
341+
| +--- VERSION |
342+
| +--- LICENSE |
343+
| +--- README.md |
344+
'===================================================================='
327345
```
328346

329347
---

docs/userguide.md

Lines changed: 110 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -31,23 +31,29 @@ This guide covers **pcode-editor version 0.2.28**.
3131
## Interface Overview
3232

3333
```
34-
+------------------------------------------------------------------+
35-
| File Edit View Help [_][X] |
36-
+------------------------------------------------------------------+
37-
| [+][~] untitled [X] |
38-
+------------------------------------------------------------------+
39-
| | |
40-
| 1 #include <stdio.h> | 1 #include |
41-
| 2 | 2 |
42-
| 3 int main() { | 3 int main |
43-
| 4 printf("Hello\n"); | 4 print |
44-
| 5 return 0; | 5 retur |
45-
| 6 } | 6 } |
46-
| | |
47-
| +------------+
48-
+------------------------------------------------------------------+
49-
| NORMAL | Ln 1, Col 1 | UTF-8 | LC | 100% | main.cpp | 0.2.28 |
50-
+------------------------------------------------------------------+
34+
.====================================================================.
35+
| [Menu Bar: File | Edit | View | Help ] [-][口][X] |
36+
+====================================================================+
37+
| [+] untitled.cpp [-] config.json [x] |
38+
+--------------------------------------------------------------------+
39+
| |
40+
| 1 | #include <stdio.h> |
41+
| 2 | |
42+
| 3 | int main() { |
43+
| 4 | printf("Hello, World!\n"); |
44+
| 5 | return 0; |
45+
| 6 | } |
46+
| 7 | |
47+
| 8 | |
48+
| 9 | |
49+
| 10 | |
50+
| |
51+
+===========================================================================+
52+
| [ Minimap: ||||||||||||||||||||||||||| ] |
53+
+--------------------------------------------------------------------+
54+
| |
55+
| MODE | Line 4, Col 10 | UTF-8 | LF | 100% | main.cpp | 0.2.28 |
56+
'===================================================================='
5157
```
5258

5359
### Key Interface Elements
@@ -128,6 +134,37 @@ pcode-editor supports Vim-style editing with multiple modes.
128134

129135
## Keyboard Shortcuts
130136

137+
### Keyboard Layout Reference
138+
139+
```
140+
.=====================================================================.
141+
| KEYBOARD SHORTCUTS |
142+
+=====================================================================+
143+
| |
144+
| +-------------+-------------+-------------+-------------+ |
145+
| | ESC | F1 | F2 | F3 | F4 | |
146+
| | [X] | | [F2] | | [X] | |
147+
| +------+------+-------+------+------+------+-----------+ |
148+
| | ` | 1 | 2 | 3 | 4 | 5 | |
149+
| | [X] | [1] | [2] | [3] | [4] | [5] | |
150+
| +------+------+-------+------+------+------+-----------+ |
151+
| | TAB| Q | W | E | R | T | |
152+
| | | [Q] | [W] | [E] | [R] | [T] | |
153+
| +------+------+-------+------+------+------+-----------+ |
154+
| | CTRL | A | S | D | F | G | |
155+
| |[CTRL]| [A] | [S] | [D] | [F] | [G] | |
156+
| +------+------+-------+------+------+------+-----------+ |
157+
| | SHIFT| Z | X | C | V | B | |
158+
| |[SHFT]| [Z] | [X] | [C] | [V] | [B] | |
159+
| +------+------+-------+------+------+------+-----------+ |
160+
| | | - | = | [SPACE] |
161+
| | | [-] | [=] | [ SPACE ]|
162+
| +------+------+-------+----------------------------------+ |
163+
| |
164+
| Mode Indicator: [ NORMAL ] Key: [ X ] = Press X |
165+
'====================================================================='
166+
```
167+
131168
### File Operations
132169

133170
| Shortcut | Action |
@@ -174,6 +211,38 @@ pcode-editor supports Vim-style editing with multiple modes.
174211
| `Ctrl+W` then `l` | Focus right split |
175212
| `Ctrl+W` then `o` | Close other splits |
176213

214+
### Split Window Layouts
215+
216+
Horizontal Split (`:sp`):
217+
```
218+
.====================================================================.
219+
| FILE A (Top) [_][-][X] |
220+
+====================================================================+
221+
| 1 | #include <stdio.h> | |
222+
| 2 | | |
223+
| 3 | int main() | |
224+
| 4 | { | |
225+
+====+================================================================+
226+
| FILE B (Bottom) [_][X] |
227+
| 1 | #include <stdlib.h> |
228+
| 2 | | |
229+
| 3 | int main() | |
230+
+====================================================================+
231+
```
232+
233+
Vertical Split (`:vsp`):
234+
```
235+
.====================================================================.
236+
| FILE A (Left) | FILE B (Right) |
237+
+===================================+============================+
238+
| 1 | #include <stdio.h> | 1 | #include <...> |
239+
| 2 | | 2 | |
240+
| 3 | int main() | 3 | int main() |
241+
| 4 | { | 4 | { |
242+
| | 5 | } |
243+
+============================+============================+
244+
```
245+
177246
---
178247

179248
## Command Palette
@@ -209,6 +278,30 @@ Type these in the palette:
209278

210279
Open terminal with `:term`, `:shell`, or `:sh`.
211280

281+
### Terminal Window
282+
283+
```
284+
.====================================================================.
285+
| TERMINAL [_][-][X] |
286+
+====================================================================+
287+
| |
288+
| Last login: Thu Apr 17 20:00:00 from 192.168.1.100 |
289+
| |
290+
| user@machine:~/project$ |
291+
| user@machine:~/project$ make |
292+
| gcc -o main main.c |
293+
| ./main |
294+
| Hello, World! |
295+
| |
296+
| user@machine:~/project$ _ |
297+
| |
298+
+====================================================================+
299+
| [+][-] Zoom: 100% Ctrl++ Zoom In / Ctrl+- Zoom |
300+
'===================================================================='
301+
```
302+
303+
### Shell Commands
304+
212305
### Features
213306

214307
- Direct keyboard input to shell

imgui.ini

Lines changed: 26 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
[Window][Editor]
2-
Pos=223,18
3-
Size=1057,782
2+
Pos=219,26
3+
Size=1033,774
44
Collapsed=0
55
DockId=0x00000003,0
66

77
[Window][DockSpace]
88
Pos=0,0
9-
Size=1280,800
9+
Size=1252,800
1010
Collapsed=0
1111

1212
[Window][Debug##Default]
@@ -15,32 +15,34 @@ Size=400,521
1515
Collapsed=0
1616

1717
[Window][Font Settings]
18-
Pos=420,301
19-
Size=460,229
18+
Pos=359,285
19+
Size=501,229
2020
Collapsed=0
2121

2222
[Window][Explorer]
23-
Pos=0,18
24-
Size=221,782
23+
Pos=0,26
24+
Size=217,774
2525
Collapsed=0
2626
DockId=0x00000005,0
2727

2828
[Docking][Data]
29-
DockSpace ID=0xCCBD8CF7 Window=0x3DA2F1DE Pos=0,18 Size=1280,782 Split=Y Selected=0xDF0EC458
30-
DockNode ID=0x0000000F Parent=0xCCBD8CF7 SizeRef=1280,480 Split=X
31-
DockNode ID=0x00000005 Parent=0x0000000F SizeRef=221,803 HiddenTabBar=1 Selected=0x00F0E82E
32-
DockNode ID=0x00000006 Parent=0x0000000F SizeRef=1057,803 Split=Y
33-
DockNode ID=0x0000000D Parent=0x00000006 SizeRef=1280,472 Split=Y
34-
DockNode ID=0x0000000B Parent=0x0000000D SizeRef=1280,720 Split=Y
35-
DockNode ID=0x00000009 Parent=0x0000000B SizeRef=1280,686 Split=Y
36-
DockNode ID=0x00000007 Parent=0x00000009 SizeRef=1280,703 Split=Y
37-
DockNode ID=0x00000001 Parent=0x00000007 SizeRef=1280,386 Selected=0x00F0E82E
38-
DockNode ID=0x00000002 Parent=0x00000007 SizeRef=1280,261 Split=X
39-
DockNode ID=0x00000003 Parent=0x00000002 SizeRef=678,778 CentralNode=1 HiddenTabBar=1 Selected=0xDF0EC458
40-
DockNode ID=0x00000004 Parent=0x00000002 SizeRef=600,778 Selected=0xD33228A6
41-
DockNode ID=0x00000008 Parent=0x00000009 SizeRef=1280,64 HiddenTabBar=1 Selected=0x2AB9DED9
42-
DockNode ID=0x0000000A Parent=0x0000000B SizeRef=1280,81 HiddenTabBar=1 Selected=0x2AB9DED9
43-
DockNode ID=0x0000000C Parent=0x0000000D SizeRef=1280,47 HiddenTabBar=1 Selected=0x2AB9DED9
44-
DockNode ID=0x0000000E Parent=0x00000006 SizeRef=1280,300 Selected=0xD33228A6
45-
DockNode ID=0x00000010 Parent=0xCCBD8CF7 SizeRef=1280,300 Selected=0xD33228A6
29+
DockSpace ID=0xCCBD8CF7 Window=0x3DA2F1DE Pos=0,26 Size=1252,774 Split=X Selected=0xDF0EC458
30+
DockNode ID=0x00000011 Parent=0xCCBD8CF7 SizeRef=1306,851 Split=Y
31+
DockNode ID=0x0000000F Parent=0x00000011 SizeRef=1280,480 Split=X
32+
DockNode ID=0x00000005 Parent=0x0000000F SizeRef=217,803 HiddenTabBar=1 Selected=0x00F0E82E
33+
DockNode ID=0x00000006 Parent=0x0000000F SizeRef=1061,803 Split=Y
34+
DockNode ID=0x0000000D Parent=0x00000006 SizeRef=1280,472 Split=Y
35+
DockNode ID=0x0000000B Parent=0x0000000D SizeRef=1280,720 Split=Y
36+
DockNode ID=0x00000009 Parent=0x0000000B SizeRef=1280,686 Split=Y
37+
DockNode ID=0x00000007 Parent=0x00000009 SizeRef=1280,703 Split=Y
38+
DockNode ID=0x00000001 Parent=0x00000007 SizeRef=1280,386 Selected=0x00F0E82E
39+
DockNode ID=0x00000002 Parent=0x00000007 SizeRef=1280,261 Split=X
40+
DockNode ID=0x00000003 Parent=0x00000002 SizeRef=678,778 CentralNode=1 HiddenTabBar=1 Selected=0xDF0EC458
41+
DockNode ID=0x00000004 Parent=0x00000002 SizeRef=600,778 Selected=0xD33228A6
42+
DockNode ID=0x00000008 Parent=0x00000009 SizeRef=1280,64 HiddenTabBar=1 Selected=0x2AB9DED9
43+
DockNode ID=0x0000000A Parent=0x0000000B SizeRef=1280,81 HiddenTabBar=1 Selected=0x2AB9DED9
44+
DockNode ID=0x0000000C Parent=0x0000000D SizeRef=1280,47 HiddenTabBar=1 Selected=0x2AB9DED9
45+
DockNode ID=0x0000000E Parent=0x00000006 SizeRef=1280,300 Selected=0xD33228A6
46+
DockNode ID=0x00000010 Parent=0x00000011 SizeRef=1280,300 Selected=0xD33228A6
47+
DockNode ID=0x00000012 Parent=0xCCBD8CF7 SizeRef=612,851 Selected=0xD33228A6
4648

0 commit comments

Comments
 (0)