Sergey Bugaev
d3504b4f9b
Terminal+HackStudio: Fix leaking PTM fd to child processes
...
The pseudoterminal *master* fd is not supposed to be inherited,
so make sure to open it with O_CLOEXEC.
2019-11-13 16:37:04 +01:00
Andreas Kling
2fea238675
HackStudio: Reflect widget selections in the form widget tree view
...
You can now manipulate the widget selection either by clicking and
dragging the widgets using the cursor tool, or by interacting with
the form widget tree view. :^)
2019-11-11 22:20:02 +01:00
Andreas Kling
d5f735ecec
HackStudio: Show the edited form widget's widget tree in the tree view
...
This patch introduces a simple WidgetTreeModel that models the widget
tree inside of a given root GWidget.
2019-11-11 22:20:02 +01:00
Andreas Kling
6dab257a45
HackStudio: Make the widget toolbar buttons checkable and exclusive
...
This way you can see which tool you've currently got selected, and it
doesn't let you select more than one at once.
2019-11-10 22:50:30 +01:00
Andreas Kling
c8637e0206
HackStudio: Allow moving the selected widgets using the arrow keys
...
This is a nice complement to moving widgets with the mouse. :^)
2019-11-10 22:40:58 +01:00
Andreas Kling
567769eb2f
HackStudio: Allow moving widgets around using the CursorTool
...
You can now move the widgets around, either by themselves or in group
selections, by dragging them with the cursor tool. :^)
2019-11-10 22:31:10 +01:00
Andreas Kling
f6576c4b7c
HackStudio: Start implementing basic widget selection in CursorTool
...
You can now select widgets by clicking on them with the CursorTool,
and toggle the selection state of a widget by Ctrl+clicking it.
2019-11-10 22:03:39 +01:00
Andreas Kling
e87756424d
HackStudio: Introduce a Tool class with subs CursorTool and WidgetTool
...
These will be used to draw out new widgets on a FormWidget, or in the
case of CursorTool, to select and manipulate existing widgets.
2019-11-10 21:45:32 +01:00
Andreas Kling
a04ab219d1
HackStudio: Use a visually distinct icon for the cursor tool
...
Using the default cursor bitmap as the cursor tool icon in HackStudio
was predictably making it impossible to tell if it's the real cursor
or not. Replace it with a color-inverted cursor. :^)
2019-11-10 21:19:08 +01:00
Andreas Kling
f92e0f7d80
HackStudio: Add placeholder code to test widget factory construction
...
We now use the magical widget registry to factory-construct widgets and
place them into the form.
This will need all kinds of work, but it's nice that the mechanism is
working as intended.
2019-11-10 12:57:37 +01:00
Andreas Kling
2da058c7f2
HackStudio: Use the GWidget class registry to populate the toolbar
...
This will allow HackStudio to learn about new GWidget types without
having to do anything in HackStudio :^)
2019-11-10 12:57:37 +01:00
Andreas Kling
3e84ea9a53
HackStudio: Add panes on the right hand side of the form editing mode
...
- Form's widget tree pane (GTreeView)
- Selected widget's properties pane (GTableView)
2019-11-09 00:41:00 +01:00
Andreas Kling
c9fc34f5ff
HackStudio: Tweak the inset of the FormWidget
...
This is not permanent by any means, just moving things around to get
a feel for how the GUI should look.
2019-11-09 00:41:00 +01:00
Andreas Kling
803ebdfe9c
HackStudio: Make the FormEditorWidget have a MidGray background
...
This gives the form editor a VB6-like feeling :^)
2019-11-09 00:41:00 +01:00
Andreas Kling
489c6ac05c
HackStudio: Add a widgets toolbar to the form editing mode
2019-11-09 00:41:00 +01:00
Andreas Kling
d016d5e365
HackStudio: Start fleshing out the GUI for a GUI designer :^)
...
I'll be reconstructing parts of the VisualBuilder application here and
then we can retire VisualBuilder entirely once all the functionality
is available in HackStudio.
2019-11-09 00:41:00 +01:00
Andreas Kling
d6c0d32b63
HackStudio: Make the project file list a little narrower by default
2019-11-07 21:06:31 +01:00
Andreas Kling
794f2d5645
LibHTML: Rename parse_html() => parse_html_document()
2019-11-06 20:52:18 +01:00
Andreas Kling
f5cf8d4ad8
Revert "LibHTML: Rename parse_html() => parse_html_document()"
...
This reverts commit f6439789db
.
Oops, I committed unrelated changes here, let me clean that up..
2019-11-06 20:51:07 +01:00
Andreas Kling
f6439789db
LibHTML: Rename parse_html() => parse_html_document()
2019-11-06 20:31:56 +01:00
Andreas Kling
2755184e11
HackStudio: Update the "remove current editor" action enabled state
...
This action should not be enabled when there is only one editor open,
since you are not allowed to be editor-less.
2019-11-05 21:08:17 +01:00
Andreas Kling
cb627a3ada
HackStudio: Allow removing the current editor with Alt+Shift+E
...
Note that you are not allowed to remove the very last editor.
These keybinds are all temporary while I figure out what the right ones
should be. I'm not exactly sure how, but it'll reveal itself. :^)
2019-11-05 21:02:31 +01:00
Andreas Kling
538d5f82c1
HackStudio: Allow switching between editors with Ctrl+E / Ctrl+Shift+E
2019-11-05 20:56:36 +01:00
Andreas Kling
f844715106
HackStudio: Allow adding more editors by pressing Ctrl+Alt+E
...
We also now start out with a single editor, instead of two. :^)
2019-11-05 20:56:30 +01:00
Andreas Kling
0f81eaf8a2
HackStudio: Put annoying debug spam behind EDITOR_DEBUG
2019-11-05 20:09:06 +01:00
João Paulo Pulga
4d3be45ff4
HackStudio: Don't parse documentation if already parsed
2019-11-05 07:06:15 +01:00
Andreas Kling
390b219cd1
HackStudio: Use GTextDoument::find_all() to implement find-in-files
...
This fixes the bug seen in my monthly OS update video, where we'd look
through a stale copy of each file, instead of the potentially edited
version in the GTextDocument.
Search results are now also represented as a full GTextRange, and when
you jump to a search result, we select the whole matching range. :^)
2019-11-01 21:31:06 +01:00
Andreas Kling
b81f6f2c43
HackStudio: Rename TextDocument => ProjectFile
...
TextDocument was not the right name, and got even more confusing with
the addition of GTextDocument in LibGUI.
2019-11-01 21:31:06 +01:00
Andreas Kling
7c71040ba9
HackStudio: Show documentation preview in tooltip on identifier hover
...
When hovering over a C++ token that we have a man page for, we now show
the man page in a tooltip window.
This feels rather bulky at the moment, but the basic mechanism is quite
neat and just needs a bunch of tuning.
2019-10-30 20:28:44 +01:00
Andreas Kling
d24164ac6a
HackStudio: Add little icons for ".cpp" and ".h" files
...
This makes it easier to tell them apart in locator suggestions. :^)
2019-10-28 19:08:48 +01:00
Andreas Kling
272c59e6d8
HackStudio: Remove unnecessary Locator::keydown_event()
2019-10-28 19:08:48 +01:00
Andreas Kling
990ca1a7a5
HackStudio: Allow opening a Locator suggestion by double-clicking it
2019-10-28 19:08:48 +01:00
Andreas Kling
29ac3e1477
HackStudio: Scroll the locator suggestions when navigating with arrows
2019-10-28 19:08:48 +01:00
Andreas Kling
b4de5ac128
HackStudio: Start working on a "Locator", much like Qt Creator has
...
Pressing Ctrl+K will now open the little locator command line at the
bottom of the window. Right now it can only be used to jump quickly
to a file.
2019-10-28 19:08:48 +01:00
Andreas Kling
fe83d5087b
HackStudio: Show .h files with C++ syntax highlighting
2019-10-28 19:08:48 +01:00
Andreas Kling
e2c74762ff
HackStudio: Draw a brownish frame around the current editor widget
...
Also make the editor filename label bold only for the current editor.
2019-10-27 20:44:37 +01:00
Andreas Kling
e2d7f585da
HackStudio: Support opening the same file in both editors
...
Hey, it actually works! You can now edit the same file in both editors
and even the C++ highlighting updates correctly in both of them. :^)
2019-10-27 19:39:15 +01:00
Andreas Kling
f1c6193d6d
LibGUI: Move GTextDocument out of GTextEditor
...
The idea here is to decouple the document from the editor widget so you
could have multiple editors being views onto the same document.
This doesn't work yet, since the document and editor are coupled in
various ways still (including a per-line back-pointer to the editor.)
2019-10-27 16:44:16 +01:00
Andreas Kling
1bcbc3f827
HackStudio: Allow switching between the two editors with Ctrl+E :^)
...
This is very hackish and should be done differently, but the feature
feels pretty nice and does work for now.
2019-10-27 13:10:37 +01:00
Andreas Kling
1e5f4714c7
HackStudio: Tweak EditorWrapper layouts a bit to make things look nice
2019-10-27 13:06:30 +01:00
Andreas Kling
e39b1f11f9
HackStudio: Support multiple editors on screen
...
This patch adds Editor (subclass of GTextEditor) and EditorWrapper.
An EditorWrapper is a composite widget that adds a little statusbar
above an Editor widget. The statusbar is used for showing the filename
and the current cursor position. More things can definitely be added.
To get to the currently active editor, call current_editor().
You can also get to the current editor's wrapper by calling..
current_editor_wrapper(). Which editor is current is determined by
which was was last focused by the user.
2019-10-27 12:55:10 +01:00
Andreas Kling
90c81d5c16
HackStudio: Tweak style of C++ identifiers
...
On second thought, let's not have bold identifiers, as this ended up
making most of the code bold. :^)
2019-10-26 21:47:51 +02:00
Andreas Kling
dd74cb9c8f
HackStudio: Focus the text editor after opening a file
2019-10-26 21:45:29 +02:00
Andreas Kling
cea6506998
HackStudio: Implement adding an existing file to project
2019-10-26 21:43:46 +02:00
Andreas Kling
9129dbe0b9
HackStudio: Implement adding a new file to the project
...
You can now press Ctrl+N to create and add a new file to the project!
2019-10-26 21:28:31 +02:00
Andreas Kling
bc2026d26d
LibGUI: Make GTextEditor::Span have a range instead of two positions
...
A GTextRange is really just two GTextPositions (start and end) anyway.
This way we can say nice things like "if (range.contains(position))"
2019-10-26 15:33:19 +02:00
Andreas Kling
df7f3ca604
HackStudio: "Hide" the action tabs (find in files, console) by default
...
By "hide" I really mean collapse them down to 24px height. We grow them
to a normal size when they're needed. The user is also free to resize
them at will.
This keeps them out of the way when you just want to do editing. :^)
2019-10-26 12:30:49 +02:00
Andreas Kling
db353a06e5
HackStudio: Enable line wrapping and automatic indentation by default
2019-10-26 11:33:39 +02:00
Andreas Kling
ed242d538a
HackStudio: Assorted improvements to C++ highlighting
...
Add a list of hard-coded standard types (including AK types) and show
them in a different style.
Rehighligt the file whenever it changes. (This is very inefficient but
makes it much easier to experiment.)
Also keep tweaking the colors. :^)
2019-10-26 10:33:50 +02:00
Andreas Kling
2b19badd74
HackStudio: Make C++ keywords bold :^)
...
Now that we can specify the font of a GTextEditor::Span, use this to
make C++ keywords show up in bold text. Also tweak colors a bit.
2019-10-26 00:19:36 +02:00