Andreas Kling
1c0669f010
LibDraw: Introduce (formerly known as SharedGraphics.)
...
Instead of LibGUI and WindowServer building their own copies of the drawing
and graphics code, let's it in a separate LibDraw library.
This avoids building the code twice, and will encourage better separation
of concerns. :^)
2019-07-18 10:18:16 +02:00
Robin Burchell
a9d1a86e6e
CProcessStatisticsReader: Be consistent about terminology from the kernel down
2019-07-18 07:23:26 +02:00
rhin123
9724d540b6
TextEditor: Show window icon
2019-07-17 21:14:14 +02:00
Robin Burchell
7a53096e8d
LibGUI: Revert GWindowServerConnection to being a singleton
...
This was a mistake, of course. Nested event loops don't need (or want)
independent server connections.
We initialize the connection early in GEventLoop for e.g. users that
want to get the size of a GDesktop before the connection has been
established.
Bug noticed by Andreas, introduced by me ;-)
2019-07-17 21:03:01 +02:00
Robin Burchell
2177594c96
Port LibGUI to use CIPCClientSideConnection
...
As a consequence, move to use an explicit handshake() method rather than
calling virtuals from the constructor. This seemed to not bother
AClientConnection, but LibGUI crashes (rightfully) because of it.
2019-07-17 20:16:44 +02:00
Andreas Kling
a17fbd98e7
LibGUI: Add input types to GMessageBox.
...
Currently the two available input types are:
- GMessageBox::InputType::OK (default)
- GMessageBox::InputType::OKCancel
Based on your choice, GMessageBox::exec() will return ExecOK or ExecCancel.
2019-07-16 21:41:13 +02:00
Andreas Kling
f98b1f635b
SystemDialog: Add a new app for showing system dialogs.
...
Currently this will be used by the WindowServer to show some dialogs.
This is needed since WindowServer can't use LibGUI and reimplementing
message box functionality inside WindowServer would be silly. :^)
The only dialog supported in this initial version is --shutdown
2019-07-16 21:41:13 +02:00
Robin Burchell
825ce53fd3
Piano: Create the connection after the event loop
...
Otherwise it will crash when registering the CNotifier.
2019-07-16 20:47:32 +02:00
rhin123
1f77fbb75c
TextEditorWidget: Stop dbgprintf from printing null
2019-07-16 08:34:51 +02:00
rhin123
1bcf3968f2
TextEditor: Show window after text_widget loads
2019-07-16 08:34:51 +02:00
rhin123
82d9410226
TextEditorWidget: Added improved save feature.
...
Instead of saving to a temp file, the TextEditorWidget now saves
to a path returned by the improved GFilePicker.
2019-07-15 18:33:33 +02:00
Andreas Kling
954a0b8efe
AK: Add a canonicalized_path() convenience function.
...
This is the same as calling FileSystemPath(foo).string(). The majority of
clients only care about canonicalizing a path, so let's have an easy way
to express that.
2019-07-15 06:50:32 +02:00
Andreas Kling
2a9b627ae9
Piano: Use CObject::custom_event() to simplify PianoWidget a bit.
2019-07-14 10:28:10 +02:00
Andreas Kling
1ecb7462b7
Piano: Use CEventLoop::wake() to trigger repaint from sound thread.
...
In order to repaint the GUI after the sound thread has produced some sweet
new waves, we post a CCustomEvent to the main thread's event loop and then
wake up that event loop via CEventLoop::wake().
2019-07-14 10:22:28 +02:00
Robin Burchell
0a1bd03f1d
WindowServer: Add a custom window type for Launcher
...
This keeps it out of the taskbar window list.
The stacking order is a little gnarly, but it seems to work OK still.
2019-07-14 00:06:47 +02:00
Andreas Kling
559a999852
Piano: Use a fixed-width font in the UI to align things nicely.
2019-07-13 23:14:00 +02:00
Andreas Kling
9197cfc62f
Piano: Add 16x16 window icon.
2019-07-13 23:12:40 +02:00
Andreas Kling
3eeb0734ba
Piano: Remove some unused code.
2019-07-13 23:02:07 +02:00
Robin Burchell
ffa8cb668f
AudioServer: Assorted infrastructure work
...
* Add a LibAudio, and move WAV file parsing there (via AWavFile and AWavLoader)
* Add CLocalSocket, and CSocket::connect() variant for local address types.
We make some small use of this in WindowServer (as that's where we
modelled it from), but don't get too invasive as this PR is already
quite large, and the WS I/O is a bit carefully done
* Add an AClientConnection which will eventually be used to talk to
AudioServer (and make use of it in Piano, though right now it really
doesn't do anything except connect, using our new CLocalSocket...)
2019-07-13 22:57:24 +02:00
Andreas Kling
ec7b98f079
Piano: Take down the baseline "volume" from 3000 to 1800.
...
I have no idea what a good value for this would be. This seems to do better
when playing many notes at once.
2019-07-13 20:54:16 +02:00
Andreas Kling
eec9666735
Piano: Use a secondary thread to write the audio stream.
...
This frees up the main thread to draw the GUI. The secondary thread uses
a pipe to trick the main thread's event loop to break out of select() and
update() the PianoWidget. :^)
2019-07-13 20:20:08 +02:00
Andreas Kling
c962c54610
Piano: Start working on a desktop piano.
...
The idea here is to implement a simple synhesizer that allows you to play
music with your keyboard. :^)
It's a huge hack currently but we can improve upon this.
2019-07-13 17:05:16 +02:00
Andreas Kling
ecbf1b673a
IRCClient: Implement "/msg <nick> ..."
2019-07-13 12:02:31 +02:00
Andreas Kling
5e6c1c6912
IRCClient: Open query window immediately when created by the user.
...
When handling "/query nick", we now immediately switch to the new query.
2019-07-13 11:54:01 +02:00
Andreas Kling
f79f3f6b8c
IRCClient: Make the channel and query mappings case-insensitive.
...
This allows us to send a message to "nickserv" and receive a response from
"NickServ" without getting confused. :^)
2019-07-13 11:05:30 +02:00
Andreas Kling
9a7b638743
IRCClient: Process incoming NOTICE messages like PRIVMSG.
...
They should be handled slightly differently, but at least now we're doing
*something* withthem.
2019-07-13 11:04:41 +02:00
Andreas Kling
d0a2668833
TextEditor: Fix build (copy_ref() in outdated PR changes.)
2019-07-11 21:30:49 +02:00
Rhin
d7b836858e
TextEditor: Move the application UI into a dedicated TextEditorWidget. ( #292 )
...
Added a main widget for the text editor as a stepping stone to add new features.
2019-07-11 20:52:33 +02:00
Andreas Kling
2dc0ea1cf9
FontEditor: Initial port to using a VisualBuilder generated UI.
...
Here goes the first attempt at using VisualBuilder to make an application.
There are many features missing that we are gonna have to implement,
noticeably custom widgets (for the glyph editor and glyph map widgets)
but this patch already moves most of the UI layout to a form file. :^)
2019-07-11 20:19:26 +02:00
Andreas Kling
323704c851
TextEditor: Remove use of copy_ref().
2019-07-11 16:04:53 +02:00
Andreas Kling
a35dc10f54
ProcessManager: Remove use of copy_ref().
2019-07-11 16:04:17 +02:00
Andreas Kling
6382c14faf
IRCClient: Remove use of copy_ref().
2019-07-11 16:03:54 +02:00
Andreas Kling
433b6678c6
FontEditor: Remove use of copy_ref().
2019-07-11 16:02:55 +02:00
Andreas Kling
c0742e4c23
FileManager: Remove use of copy_ref().
2019-07-11 15:59:06 +02:00
Andreas Kling
245ae479eb
ProcessManager: Use CProcessStatisticsReader to get process data.
...
It was silly to duplicate this functionality in so many places. Now everyone
uses CProcessStatisticsReader to parse /proc/all :^)
2019-07-10 15:27:52 +02:00
Andreas Kling
7083a0104a
LibGUI: Add GActionGroup, a way to group a bunch of GActions.
...
This can be used to make a bunch of actions mutually exclusive.
This patch only implements the exclusivity behavior for buttons.
2019-07-09 22:10:03 +02:00
Andreas Kling
2c81477f16
Terminal: Try to preserve line contents when resizing the terminal window.
...
This is still destructive when shrinking, but clearly better than throwing
everything away.
2019-07-08 19:02:08 +02:00
Andreas Kling
0e75aba7c3
StringView: Rename characters() to characters_without_null_termination().
...
This should make you think twice before trying to use the const char* from
a StringView as if it's a null-terminated string.
2019-07-08 15:38:44 +02:00
Andreas Kling
752d297321
IRCClient: Fix build. Forgot to update a function signature.
2019-07-07 22:27:48 +02:00
Andreas Kling
ea9340aeca
IRCClient: Implement the "part from channel" action.
...
Also make sure the action is disabled while we're not in a window that
corresponds to an open channel. :^)
Fixes #277 .
2019-07-07 21:58:57 +02:00
Andreas Kling
27f699ef0c
AK: Rename the common integer typedefs to make it obvious what they are.
...
These types can be picked up by including <AK/Types.h>:
* u8, u16, u32, u64 (unsigned)
* i8, i16, i32, i64 (signed)
2019-07-03 21:20:13 +02:00
Andreas Kling
b79112e6d6
AK: Add String::number() for creating a String from a number.
...
Instead of manually doing String::format("%d"/"%u") everywhere, let's have
a String API for this. It's just a wrapper around format() for now, but it
could be made more efficient in the future.
2019-07-03 14:56:27 +02:00
Christopher Dumas
e9ab282cfd
Launcher: Reformat config a little bit ( #279 )
2019-07-03 05:53:44 +02:00
Andreas Kling
d2ec64ace0
Launcher: The "Launcher" config file group shouldn't take up visual space.
...
Also tweak Launcher.ini since CConfigFile bools are 1/0 rather than
true/false. We should probably use true/false. Or switch over to JSON.
2019-07-02 21:49:00 +02:00
Christopher Dumas
8a2123e385
Launcher: Vertical/Horizontal option
2019-07-02 13:29:14 +02:00
Andreas Kling
aaedc24f15
Kernel+ProcessManager: Convert /proc/memstat to JSON.
2019-07-01 18:43:01 +02:00
Andreas Kling
438a14c597
Terminal: Track which character cells have had something printed in them.
...
This helps us figure out where lines end, which we need when computing the
selected text for copy-to-clipboard. :^)
2019-07-01 18:14:08 +02:00
Andreas Kling
c70fbca23a
QuickShow: Make the window background black for a nicer contrast.
2019-06-30 17:22:12 +02:00
Andreas Kling
1fa467a424
Launcher: Tighten up the widget layout a bit.
2019-06-30 15:58:53 +02:00
Andreas Kling
daf44d5ec5
Terminal: Unbreak single-line text selection.
2019-06-30 15:11:56 +02:00
Andreas Kling
038f99eeff
QuickShow: When zooming with the mouse wheel, keep image centered at cursor.
2019-06-30 15:01:35 +02:00
VAN BOSSUYT Nicolas
802d4dcb6b
Meta: Removed all gitignore in the source tree only keeping the root one
2019-06-30 10:41:26 +02:00
Andreas Kling
0a44837738
PaintBrush: Make a little icon for the eraser tool.
2019-06-30 09:40:15 +02:00
Andreas Kling
315716d193
GUI: Use Win2K-like "warm gray" color instead of the older colder gray.
...
Someone suggested this a long time ago and I never got around to it.
So here we go, here's the warm gray! I have to admit I like it better. :^)
2019-06-30 09:23:16 +02:00
Andreas Kling
9962cb7291
ProcessManager: Add process-specific context menus to the main table view.
2019-06-30 08:15:55 +02:00
Andreas Kling
d5bb98acbc
AK: Defer to Traits<T> for equality comparison in container templates.
...
This is prep work for supporting HashMap with NonnullRefPtr<T> as values.
It's currently not possible because many HashTable functions require being
able to default-construct the value type.
2019-06-29 19:14:03 +02:00
Andreas Kling
2bd8118843
Kernel: Change the format of /proc/all to JSON.
...
Update ProcessManager, top and WSCPUMonitor to handle the new format.
Since the kernel is not allowed to use floating-point math, we now compile
the JSON classes in AK without JsonValue::Type::Double support.
To accomodate large unsigned ints, I added a JsonValue::Type::UnsignedInt.
2019-06-29 09:04:45 +02:00
Andreas Kling
561bfd3ed6
Terminal: Make it so typing resets the cursor blink timer.
...
Patch contributed by "pd"
2019-06-28 21:46:23 +02:00
Andreas Kling
96ca8bea6c
Terminal: Don't write erroneous characters to PTY when modifiers pressed.
...
Additionally the Alt modifier now generates the correct characters, as do
Insert/Delete/PgUp/PgDown.
Patch contributed by "pd"
2019-06-28 21:46:05 +02:00
Andreas Kling
274b41e47c
Terminal: Changex internal opacity representation to byte instead of float.
...
This lets us avoid some math during paint events.
Patch contributed by "pd"
2019-06-28 21:42:15 +02:00
Robin Burchell
933cd3848f
PaintBrush: Add size context menu to SprayTool
2019-06-28 15:27:23 +02:00
Robin Burchell
24ada6bd1f
PaintBrush: Add an erase tool
2019-06-28 15:27:23 +02:00
Lawrence Manning
f0a6b42066
Move common Application build steps into their own Makefile.common
...
Further consolidation is of course possible, eg the Games/ programs
follow the same rules more or less.
2019-06-25 21:35:50 +02:00
Andreas Kling
8247dad540
PaintBrush: Allow RGBA32 to use the bucket and spray tools.
...
Eventually I'd like to do some kind of bitmap layers, and we definitely want
alpha channel support then, so let's just not paint ourselves into an
uncomfortable corner early on. :^)
2019-06-25 20:33:44 +02:00
Andreas Kling
b529b4a3e6
PaintBrush: Add support for opening files.
...
Obviously this only supports whatever PNG files that load_png() can decode
at the moment.
2019-06-25 20:27:32 +02:00
Andreas Kling
eedb4f6b2f
QuickShow: Allow panning and zooming the image instead of stretching it.
...
This needs more work and polish, but it's a step in a more pleasant and
useful direction.
Also turn QuickShow into a fully-fledged "application". (By that, I really
just mean giving it its own Applications/ subdirectory.)
2019-06-23 16:35:43 +02:00
Andreas Kling
cf0d05d54a
Terminal: Don't compute buffer positions outside the possible area.
2019-06-23 15:34:36 +02:00
Andreas Kling
5aefd7f828
PaintBrush: Implement a thickness setting for the pen tool.
...
Painter gains the ability to draw lines with arbitrary thickness.
It's basically implemented by drawing filled rects for thickness>1.
In PaintBrush, Tool classes can now override on_contextmenu() to
provide a context menu for the toolbox button. :^)
2019-06-23 10:00:02 +02:00
Andreas Kling
08c04f0a41
Terminal: Add basic mouse selection with copy and paste.
...
Left mouse button selects (and copies the selection on mouse up).
The right mouse button then pastes whatever's on the clipboard. I always
liked this behavior in PuTTY, so now we have it here as well :^)
2019-06-23 09:18:17 +02:00
Andreas Kling
61b4da447d
PaintBrush: Fix compiler warnings.
2019-06-22 16:26:04 +02:00
Andreas Kling
4118aaaa32
Terminal: Fix compiler warnings.
2019-06-22 16:07:46 +02:00
Andreas Kling
25fd847ef2
PaintBrush: Add a color picker tool.
2019-06-22 12:05:35 +02:00
Andreas Kling
d343fb2429
AK: Rename Retainable.h => RefCounted.h.
2019-06-21 18:58:45 +02:00
Andreas Kling
550b0b062b
AK: Rename RetainPtr.h => RefPtr.h, Retained.h => NonnullRefPtr.h.
2019-06-21 18:45:59 +02:00
Andreas Kling
90b1354688
AK: Rename RetainPtr => RefPtr and Retained => NonnullRefPtr.
2019-06-21 18:37:47 +02:00
Andreas Kling
77b9fa89dd
AK: Rename Retainable => RefCounted.
...
(And various related renames that go along with it.)
2019-06-21 15:30:03 +02:00
Andreas Kling
2e9cc75d11
WindowServer+Taskbar: Let WindowServer manage the "window menus".
...
Taskbar now simply asks the WindowServer to popup a window menu when right
clicking on a taskbar button.
This patch also implements the "close" menu item, and furthermore makes the
window menu show up when you left-click a window's titlebar icon. :^)
2019-06-21 11:03:43 +02:00
Andreas Kling
41bcabd9aa
PaintBrush: Make a little icon for the spray tool.
2019-06-21 09:22:32 +02:00
Sergey Bugaev
7ccb84e58e
PaintBrush: Make spray circular.
2019-06-17 16:11:01 +02:00
Robin Burchell
502c54e39a
Add a simple spray fill tool
...
Could do with some more tweaking no doubt, and it'd be nice to have a
circular spray, but this is better than nothing.
2019-06-17 05:54:32 +02:00
Andreas Kling
f49e5c6732
PaintBrush: Reduce debug spam in the color editor dialog.
2019-06-16 16:33:16 +02:00
Andreas Kling
cf17e385b5
PaintBrush: Allow editing palette colors by ctrl-clicking them.
...
Maybe the ColorDialog class could be fashioned into something generally
usable in LibGUI, but for now it lives in the PaintBrush app. :^)
2019-06-16 15:09:36 +02:00
Andreas Kling
264890bfc3
PaintBrush: Flood filling with the same color is a no-op.
2019-06-16 06:34:29 +02:00
Andreas Kling
694b4a64bd
PaintBrush: Make little icons for the pen and bucket tools.
2019-06-15 17:52:53 +02:00
Andreas Kling
dcbddb4f8c
GraphicsBitmap: Provide templated versions of get_pixel() and set_pixel().
...
If we already know the bitmap format used, we can use these functions to
bypass the format checks and go straight to pixel manipulation.
2019-06-15 11:06:02 +02:00
Andreas Kling
150b3cf378
PaintBrush: Fix some silly logic typos in flood fill.
2019-06-15 10:48:20 +02:00
Andreas Kling
a8b2b96f38
PaintBrush: Use a Queue<Point> for the flood fill.
2019-06-15 10:39:45 +02:00
Andreas Kling
9443957c14
PaintBrush: Speed up the bucket tool with smarter use of Vector.
...
Put together a pretty well-performing queue using a Vector and an offset.
By using the new Vector::shift_left(int) instead of Vector::take_first()
we can avoid shifting the vector contents every time and instead only
do it every so often.
Maybe this could be generalized into a separate class, I'm not sure if it's
the best algorithm though, it's just what I came up with right now. :^)
2019-06-14 21:50:28 +02:00
Andreas Kling
e9c021de92
PaintBrush: Implement a naive but working bucket fill tool.
...
I've used a SinglyLinkedList<Point> for the flood fill queue, since Vector
was death slow. This could definitely be made faster with a better algorithm
and/or data structure. :^)
2019-06-14 19:11:22 +02:00
Andreas Kling
56cbe15033
PaintBrush: Factor out the pen tool into an actual PenTool class.
...
Also add a Tool base class, and an empty BucketTool subclass which is the
next thing to implement.
2019-06-14 18:51:57 +02:00
Andreas Kling
42f374d0f1
Terminal: Add support for DCH ('P' final)
...
Patch contributed by "pd"
2019-06-12 20:54:23 +02:00
Andreas Kling
c4d24bb4e9
PaintBrush: Start fleshing out a toolbox widget.
2019-06-12 05:58:31 +02:00
Andreas Kling
cadc65a82d
PaintBrush: Let's use Color::MidGray for the outside-the-bitmap area.
2019-06-11 20:39:32 +02:00
Andreas Kling
70564a78b2
PaintBrush: Tidy up the UI a bit. Add some more colors.
2019-06-11 20:37:58 +02:00
Andreas Kling
1372f10dda
Terminal: Add support for REP ('b' final)
...
Patch contributed by "pd"
2019-06-11 07:32:53 +02:00
Andreas Kling
6ef45bc0ef
PaintBrush: Add some placeholder menus so it looks proper.
2019-06-10 21:05:20 +02:00
Andreas Kling
1f756378e8
PaintBrush: Make it possible to switch colors using the PaletteWidget.
2019-06-10 20:07:26 +02:00
Andreas Kling
f86b1bdca1
PaintBrush: Add a PaletteWidget to allow color selection.
...
Also use different colors for left/right mouse button. :^)
2019-06-10 19:54:09 +02:00
Andreas Kling
642c82fbff
PaintBrush: Use draw_line() when drawing continuously.
2019-06-10 19:35:24 +02:00
Andreas Kling
d599544890
PaintBrush: Start working on a simple painting application.
2019-06-10 19:29:33 +02:00
Andreas Kling
39d1a9ae66
Meta: Tweak .clang-format to not wrap braces after enums.
2019-06-07 17:13:23 +02:00
Andreas Kling
0ed89440f1
ProcessManager+top: Rename "linear" size to "virtual" size.
...
I originally called it "linear" because that's how the Intel manual names
virtual addresses in many cases. I'm ready to accept that most people know
this as "virtual" so let's just call it that.
2019-06-07 12:44:29 +02:00
Andreas Kling
fd604a7c68
Applications: Run clang-format on everything.
2019-06-07 11:48:03 +02:00
Andreas Kling
4edc73ad1f
Terminal: Use the visual bell by default.
2019-06-07 08:45:39 +02:00
Andreas Kling
6e4f0b3cc5
Terminal: Reallocate kept lines when resizing the terminal.
...
Otherwise we end up with garbage text when making the window bigger.
2019-06-06 14:59:18 +02:00
Andreas Kling
e8f35ef311
Terminal: Store horizontal tabs in a Vector.
...
There's no need to muck around with manual malloc()/free() here.
2019-06-06 11:42:05 +02:00
Christopher Dumas
e92fe52031
Terminal: Use Vectors and OwnPtrs for Terminal lines. Adjust scroll
...
region behavior
2019-06-03 20:48:34 +02:00
Christopher Dumas
ce15a4021d
Terminal: Implement scroll region termcodes
2019-06-03 20:48:34 +02:00
Robin Burchell
1024dfa81a
StringViewize a bunch of things -- mostly LibGUI
2019-06-03 20:27:05 +02:00
Robin Burchell
7bce096afd
Take StringView in more places
...
We should work towards a pattern where we take StringView as function
arguments, and store String as member, to push the String construction
to the last possible moment.
2019-06-02 12:55:51 +02:00
Andreas Kling
51581c21fc
WindowServer+LibGUI: Add a way to bring a window to the front.
...
GWindow::move_to_front() can now be used to move a window to the top of
the window stack.
We use this in Terminal to bring the settings window to the front if it
already exists when it's requested, in case it's hiding behind something.
2019-06-01 20:10:37 +02:00
Andreas Kling
473d0e83ad
Terminal: Fix insufficient repaint after visual bell clears.
...
Also make the bell time a little shorter, 500ms kinda wears on you. :^)
2019-06-01 00:36:56 +02:00
Christopher Dumas
b0d8dba16d
Terminal: Single settings window & consistant visual bell timing
2019-06-01 00:07:45 +02:00
Christopher Dumas
6a4cb25557
Terminal: Settings windows can be opened multiple times
2019-06-01 00:07:45 +02:00
Christopher Dumas
f8a02d4733
Terminal: Audible vs Visible beep option
2019-06-01 00:07:45 +02:00
Robin Burchell
004a630bfe
Terminal: Fix some missing text attributes
...
Probably doesn't actually change much yet since we don't support many
text rendering options, but it's at least good to have the options, and
to record things we don't yet support too.
2019-05-30 10:35:36 +02:00
Andreas Kling
1361721053
Terminal: Add /usr/local/bin to the default PATH.
...
Now that we're building all these ports, let's have them in the PATH. :^)
2019-05-29 06:34:54 +02:00
Robin Burchell
0dc9af5f7e
Add clang-format file
...
Also run it across the whole tree to get everything using the One True Style.
We don't yet run this in an automated fashion as it's a little slow, but
there is a snippet to do so in makeall.sh.
2019-05-28 17:31:20 +02:00
Andreas Kling
4040c6137d
TextEditor: Fix window title when starting with an empty document.
2019-05-27 23:33:47 +02:00
Christopher Dumas
c23882dde1
can now tile background and made sure the IRC choose server popup still works
2019-05-27 21:40:53 +02:00
Christopher Dumas
50154a23cb
most apps now begin in the correct directory
2019-05-27 21:40:53 +02:00
Christopher Dumas
e3f81bce49
IRC client setttings, Terminal settings, more WM settings
2019-05-27 21:40:53 +02:00
Andreas Kling
b311257098
Applications: Let's put spaces in app names
...
"FileManager" => "File Manager"
"FontEditor" => "Font Editor"
"ProcessManager" => "Process Manager"
"TextEditor" => "Text Editor"
2019-05-27 13:52:28 +02:00
faissaloo
6ac8aab941
GFilePicker: Return paths as FileSystemPath rather than String
2019-05-26 22:52:09 +02:00
Christopher Dumas
957f8b84f2
WindowServer: Make it possible to turn off window title bars ( #88 )
...
Also, Launcher now does not use titlebars.
Only check if titlebar should be shown if the window type works with that.
2019-05-24 23:37:23 +02:00
Christopher Dumas
dd84dcf31f
Launcher loads applications from Launcher.ini, is started by default, and is resized automatically
...
Co-Authored-By: Andreas Kling <awesomekling@gmail.com>
2019-05-24 20:40:09 +02:00
Andreas Kling
677794f30d
LibGUI: Make GCheckBox inherit from GAbstractButton.
2019-05-24 17:11:42 +02:00
Andreas Kling
21c56477b0
LibGUI: Add a GAbstractButton base class for button widgets.
...
This patch moves GButton and GRadioButton to inherit from it. This allows
them to share code for mouse event handling, etc.
2019-05-24 16:32:20 +02:00
Christopher Dumas
00075b1c8a
Added functionality to make back and forward buttons work in FileManager. Also
...
fixed it so that directories don't get double-opened (first when they are
opened, and second when the selection changes to match in the file tree view)
2019-05-24 00:24:28 +02:00
Andreas Kling
3ec625067a
Terminal: Uh, also change the one caller of beep() to sysbeep()..
2019-05-17 14:34:07 +02:00
Andreas Kling
f196e2fcda
Terminal: Set original window title to "Terminal"
...
Don't rely on the shell setting the window title using escape sequences.
2019-05-16 20:13:41 +02:00
Robin Burchell
cef161c2bc
TextEditor: Make use of GFilePicker to select a file to open
2019-05-16 13:31:19 +02:00
Robin Burchell
f55965b5e8
WindowServer/GMenu: Adjust the popup position to fit the window inside the screen
...
Rather than passing a "top_anchored" bool. Fixes #22 .
2019-05-16 01:22:54 +02:00
Andreas Kling
3cba2a8a78
Kernel: Add a beep() syscall that beeps the PC speaker.
...
Hook this up in Terminal so that the '\a' character generates a beep.
Finally emit an '\a' character in the shell line editing code when
backspacing at the start of the line.
2019-05-15 21:40:41 +02:00
Andreas Kling
ad731cc08f
LibGUI: Support cycling through focusable widgets with Tab and Shift-Tab.
2019-05-15 02:39:58 +02:00
Andreas Kling
2fa5e2b66b
ProcessManager: Keep /proc/all open to reduce CPU impact of ProcessManager.
2019-05-14 17:12:35 +02:00
Andreas Kling
852d648912
Fix "make clean" not deleting app binaries.
2019-05-13 14:56:18 +02:00
Andreas Kling
dddf45f563
Change String&& arguments to const String& in a couple of places.
...
String&& is more nuisance than anything, and the codegen improvement is
basically negligible since the underlying type is already retainable.
2019-05-12 14:57:15 +02:00
Andreas Kling
ab42180e83
Fix some more victims of the new default layout spacing.
2019-05-11 03:06:18 +02:00
Andreas Kling
1ab66e4d33
FileManager: Tweak layout spacing (new default looks weird here.)
...
This app needs a layout rethink, but for now I'm just fixing breakage.
2019-05-11 02:35:03 +02:00
Andreas Kling
565f073796
Terminal: Give the terminal widget a sunken container look.
...
This blends perfectly with the new window frames. :^)
2019-05-11 02:27:06 +02:00
Andreas Kling
b54eefa25e
IRCClient: Tweak appearance.
2019-05-11 00:16:08 +02:00
Andreas Kling
4b32aa71d2
ProcessManager: Tweak appearance (spacing, margins..)
2019-05-10 22:59:39 +02:00
Andreas Kling
3a2f10fbbe
About: Center the window on screen and make it non-resizable.
2019-05-10 22:11:18 +02:00
Andreas Kling
fa232ac180
LibGUI: Remove GModel activations to GAbstractView.
...
Now you can hook activation via GAbstractView::on_activation.
The design still isn't quite right, we should eventually move the selection
away from the model somehow.
2019-05-09 04:56:52 +02:00
Andreas Kling
bd5c79aff2
LibGUI: Start working on a file picker dialog (GFilePicker).
...
Have LibGUI adopt GDirectoryModel from FileManager since it fits perfectly
for the needs of a file picker.
2019-05-09 01:24:37 +02:00
Andreas Kling
d4ac9e9a8a
FileManager: When mkdir() fails, show the path we passed in the message.
2019-05-08 22:41:19 +02:00
Andreas Kling
de98b2770b
GMessageBox: Add icons to message boxes with 3 standard ones to choose from.
2019-05-08 20:13:39 +02:00
Andreas Kling
b5b44a29bb
Replace various copies of parse_uint(String) with String::to_uint().
2019-05-08 19:21:51 +02:00
Andreas Kling
3ae9fc5d88
Move VisualBuilder into a new DevTools directory.
2019-05-08 13:53:34 +02:00
Andreas Kling
5d707745b6
VisualBuilder: Add a simple mechanism to write a form out to disk.
2019-05-08 04:39:42 +02:00
Andreas Kling
5e733d47a3
VisualBuilder: Add a way to dump the current form to the debugger.
2019-05-07 23:28:35 +02:00
Andreas Kling
1598a0a5cb
ProcessManager: Draw the graphs as lines.
...
This looks pretty neat. Also it exercises the diagonal line drawing code
so we get 2-for-1. :^)
2019-05-07 17:11:48 +02:00
Andreas Kling
922391e772
ProcessManager: Tweak default column widths.
2019-05-07 16:07:07 +02:00
Andreas Kling
b04f08ba48
Shell: Support home/end keys for line editing.
2019-05-07 05:03:21 +02:00
Andreas Kling
fe73543d41
Shell: Move the Shell to a separate directory and let's call it "Shell" :^)
2019-05-07 01:12:08 +02:00
Andreas Kling
3d61c8ec09
ProcessManager: Use the same margins for both CPU and memory graph.
2019-05-06 03:37:22 +02:00
Andreas Kling
25bb7a59ac
ProcessManager: Add CPU/memory usage graphs in a separate tab.
...
Finally we get some real use for the new GTabWidget. :^)
2019-05-06 03:21:34 +02:00
Andreas Kling
3bdb95e128
ProcessManager+LibGUI: Tweak things to improve ProcessManager look.
2019-05-05 20:53:04 +02:00
Andreas Kling
4e1b36ddf2
GTabWidget: Make a custom look for tab buttons.
2019-05-05 14:39:37 +02:00
Andreas Kling
62e7b26406
LibGUI: Start working on a tabbed widget container: GTabWidget.
2019-05-05 01:31:02 +02:00
Andreas Kling
6a5d92f0ad
WindowServer+LibGUI: Allow changing whether windows have alpha channels.
...
Use this in Terminal to tell the window server to not bother with the alpha
channel in the backing store if we're running without transparency.
Semi-transparent terminals look neat but they slow everything down, so this
keeps things fast while making it easy to switch to the flashy mode. :^)
2019-05-03 21:07:16 +02:00
Andreas Kling
f95ba881f0
VisualBuilder: Tweak form grid color.
2019-04-30 17:01:59 +02:00
Andreas Kling
86aad50818
VisualBuilder: Add GSlider to the widgets toolbox.
2019-04-30 16:18:05 +02:00
Andreas Kling
a274196bd7
Terminal: <esc>[m should clear the current attribute.
...
This was causing GCC error messages to appear in all-red text.
2019-04-30 01:23:20 +02:00
Andreas Kling
0ae475ff5b
Terminal: Add ability to adjust the terminal's opacity.
2019-04-29 19:24:18 +02:00
Andreas Kling
f254a84d17
Launcher: Add icons for VisualBuilder and IRCClient.
2019-04-29 04:07:36 +02:00
Andreas Kling
8f81a3f9dd
LibGUI+WindowServer: Make it possible to have checkable GActions.
...
They show up as checkable GButtons in GToolBar, and with (or without) check
marks in menus.
There are a bunch of places to make use of this. This patch only takes
advantage of it in the FileManager for the view type actions.
2019-04-26 21:09:56 +02:00
Andreas Kling
71770e000b
GTextEditor: Add very basic automatic indentation.
...
This is off by default, but enabled by TextEditor. It simply inserts the
same number of leading spaces as the previous line when hitting Enter. :^)
2019-04-25 22:56:09 +02:00
Andreas Kling
4bea3a4aa6
GTextEditor: Turn off the ruler by default.
...
You're usually not gonna want the ruler. TextEditor can enable it manually.
2019-04-24 23:06:44 +02:00
Andreas Kling
16cbfd3f4e
Taskbar: Clicking a window button now toggles minimized state.
2019-04-24 02:48:02 +02:00
Andreas Kling
f7a23f3668
Taskbar: Forgot to add WindowIdentifier.h.
2019-04-24 02:20:38 +02:00
Andreas Kling
956bd23aae
WindowServer+TaskBar: Add a taskbar window button popup menu.
...
This patch only hooks up the minimize and unminimize actions.
2019-04-23 23:14:14 +02:00
Andreas Kling
38e1e205a5
FileManager: Add a window icon.
2019-04-23 20:42:47 +02:00
Andreas Kling
58240fdb33
Do a pass of compiler warning fixes.
...
This is really making me question not using 64-bit integers more.
2019-04-23 13:00:53 +02:00
Andreas Kling
57da00b731
Include Makefile.common in all other Makefiles.
2019-04-21 04:09:39 +02:00
Andreas Kling
180de7e8c5
ProcessManager: Exclude colonel process from process listing.
2019-04-20 19:41:57 +02:00
Andreas Kling
ec365b82d5
Kernel: Make the colonel run at "Idle" priority (the lowest possible.)
...
This means it won't hog the CPU for more than a single timeslice. :^)
2019-04-20 15:58:45 +02:00
Andreas Kling
49e7ffc06a
WindowServer: Introduce a WM event mask so Taskbar can ignore window rects.
...
Taskbar was waking up to do nothing every time a window rect changed.
2019-04-20 14:40:59 +02:00
Andreas Kling
ab94a6be00
AK: Add String::copy(BufferType) helper.
...
This will create a String from any BufferType that has data() and size().
2019-04-20 14:13:40 +02:00
Andreas Kling
5eedb22834
Sprinkle use of AK::Vector in various places.
...
Some of these are less helpful than others. Avoiding a bunch of mallocs
in the event loop wakeup code is definitely nice.
2019-04-20 14:02:19 +02:00
Andreas Kling
301a269ca0
Get rid of SERENITY macro since the compiler already defines __serenity__
...
This makes it a bit easier to use AK templates out-of-tree.
2019-04-20 12:58:49 +02:00
Andreas Kling
54af44e354
VisualBuilder: Expose some more widget properties.
2019-04-19 23:48:19 +02:00
Andreas Kling
986f5806d7
VisualBuilder: Emit on_widget_selected() when appropriate.
...
This allows the properties window to stay in sync with what's happening.
For multi-widget selections, we don't show any properties.
2019-04-19 23:09:38 +02:00
Andreas Kling
b64408a564
VisualBuilder: Make widget deletion work properly.
2019-04-19 22:52:13 +02:00
Andreas Kling
440700b4cb
VisualBuilder: Multiple-widget selection support.
...
This is pretty damn nice, now I can move and resize entire groups of widgets
together. Diagonal group resizing feels a bit strange but I wasn't expecting
it not to. :^)
2019-04-19 22:46:16 +02:00
Andreas Kling
b3f657a1c6
VisualBuilder: Expose GGroupBox name property.
2019-04-19 01:40:25 +02:00
Andreas Kling
62d347d12a
VisualBuilder: Remove the separate property editor box in favor of inline.
...
Also make the property names show up in bold text. :^)
2019-04-19 01:16:57 +02:00
Andreas Kling
3a33b8ea08
VisualBuilder: Hook up everything needed for widget property editing.
...
It's now possible to edit widget properties inline in the properties window.
We're currently relying on the basic GVariant conversion functions to do
all the "parsing" but that's not gonna be good enough.
2019-04-19 01:05:59 +02:00
Andreas Kling
0e6b273620
LibGUI: Start working on GTableView inline editing.
...
This is pretty shaky still, but the basic idea is that you subclass GModel
and return true for editable indices. The table view also needs to have its
editable flag set.
2019-04-18 22:27:14 +02:00
Andreas Kling
ae3ec3fc37
LibGUI: Give GTextEditor a context menu.
...
Now GTextEditor manages its own editing actions (cut/copy/paste/etc) and
will show a context menu containing them when requested.
Apps that want to put a GTextEditor's actions in its menu can get to the
actions via public getters. :^)
2019-04-18 12:28:29 +02:00
Andreas Kling
67d7fc94fc
ProcessManager: Do a little less malloc() in the /proc/memstats parsing.
2019-04-18 04:48:53 +02:00
Andreas Kling
ac19fabaaf
ProcessManager: Use a single timer for refreshing the view.
...
Also add a menu for changing the update frequency to some nice values.
2019-04-18 04:38:31 +02:00
Andreas Kling
a747a10eab
LibGUI: Refactor context menus to be event-driven instead of declarative.
...
The declarative approach had way too many limitations. This patch adds a
context menu event that can be hooked to prepare a custom context menu on
demand just-in-time. :^)
2019-04-18 04:12:27 +02:00
Andreas Kling
e74b5bc054
ProcessManager+WindowServer: Do a little less malloc() in CPU monitor code.
2019-04-18 03:37:01 +02:00
Andreas Kling
36a6c10b09
FontEditor: Add a window icon.
2019-04-18 02:30:35 +02:00
Andreas Kling
ab539460de
ProcessManager: Use a CFile for parsing /proc/memstat.
2019-04-18 00:57:34 +02:00
Andreas Kling
c931eaa22c
WindowServer: Generate a separate WM event for window icon changes.
2019-04-18 00:39:11 +02:00
Andreas Kling
c02c6fef28
Kernel+ProcessManager: Show per-process syscall counts.
...
Added a simple syscall counter to the /proc/all contents. :^)
2019-04-17 23:16:14 +02:00
Andreas Kling
b77f9a5042
VisualBuilder: Pressing the Tab key when there are no widgets is a no-op.
2019-04-16 23:19:19 +02:00
Andreas Kling
428cae7864
VisualBuilder: Pressing the Tab key when there are no widgets is a no-op.
2019-04-16 23:17:14 +02:00
Andreas Kling
ef8c613737
VisualBuilder: Share code for setting the selected widget.
...
This fixes an issue where the properties window didn't update when selecting
a new widget using the keyboard shortcuts. :^)
2019-04-16 23:11:35 +02:00
Andreas Kling
f7157520eb
VisualBuilder: Add some keyboard navigation support.
...
Allow selecting widgets using the Tab key, and moving them around
using the arrow keys. :^)
2019-04-16 23:01:37 +02:00
Andreas Kling
8251f97858
Terminal: Add a window icon.
2019-04-16 17:55:39 +02:00
Andreas Kling
29abfc8623
ProcessManager: Add a window icon.
2019-04-16 17:55:27 +02:00
Andreas Kling
52e846df87
VisualBuilder: Make it possible to move widgets to front/back.
2019-04-16 03:52:26 +02:00
Andreas Kling
33920df299
AK: Try to use StringViews more for substrings and splitting.
2019-04-16 02:39:16 +02:00
Andreas Kling
e9c0f4567d
Kernel+ProcessManager: Expose the number of kmalloc/kfree calls.
...
This will be very helpful in tracking down unwanted kmalloc traffic. :^)
2019-04-15 19:43:12 +02:00
Andreas Kling
f1b58d8d8c
VisualBuilder: Let's have getters and setters for properties.
2019-04-14 04:14:23 +02:00
Andreas Kling
3f6408919f
AK: Improve smart pointer ergonomics a bit.
2019-04-14 02:36:06 +02:00
Andreas Kling
c09c114d77
WindowServer+LibGUI: Add ability to set per-window icons.
...
The icons are passed around as filesystem paths for now, since the shared
memory bitmaps only support 2 sides.
2019-04-13 16:59:55 +02:00
Andreas Kling
c06a3bdeb4
LibGUI+WindowServer: Add support for per-GWidget context menus.
...
You can now simply assign a GMenu as a GWidget's context menu and it will
automagically pop up on right click. :^)
2019-04-12 17:18:13 +02:00
Andreas Kling
c98bbff0cb
VisualBuilder: Add some widget-specific properties.
2019-04-12 15:17:53 +02:00
Andreas Kling
6f90f41516
VisualBuilder: Add some more GWidget default properties.
2019-04-12 14:47:21 +02:00
Andreas Kling
054c982181
LibGUI+WindowServer: Add support for enabled/disabled actions.
...
The enabled state of a GAction now propagates both to any toolbar buttons
and any menu items linked to the action. Toolbar buttons are painted in
a grayed out style when disabled. Menu items are gray when disabled. :^)
2019-04-12 02:53:27 +02:00
Andreas Kling
47a2982119
LibCore: Move LibGUI/GTimer to LibCore/CTimer.
2019-04-12 00:09:45 +02:00
Andreas Kling
c736dbdf10
VisualBuilder: Add a text box to the properties window.
2019-04-11 23:57:58 +02:00
Andreas Kling
3cddc3484e
VisualBuilder: Add [x, y, width, height] properties for all widgets.
...
At first I tried doing this as a single "rect" property but I like the
feel of the individual properties much better. :^)
2019-04-11 22:54:04 +02:00
Andreas Kling
ec841f3a23
VisualBuilder: Move properties window to its own class.
2019-04-11 22:03:55 +02:00
Andreas Kling
21d4b1c2fc
VisualBuilder: Tweak property table column width.
2019-04-11 21:55:57 +02:00
Andreas Kling
34dd4fcaf1
VisualBuilder: Display read-only propery values in gray.
2019-04-11 21:53:39 +02:00
Andreas Kling
383b2efc1f
VisualBuilder: Remove debug spam.
2019-04-11 21:47:50 +02:00
Andreas Kling
707bfe848d
VisualBuilder: Add a table view with the selected widget's properties.
2019-04-11 21:41:09 +02:00
Andreas Kling
f52e66ceda
VisualBuilder: Add a widget registry and a property class.
...
I need somewhere to centralize the knowledge about the different widget
types available. And VBProperty represents a property key/value of arbitrary
type (it uses a GVariant for the value.)
2019-04-11 16:13:19 +02:00
Andreas Kling
ba4a726e8b
VisualBuilder: Add a properties window.
2019-04-11 15:43:26 +02:00
Andreas Kling
93b76628a5
GGroupBox: Improve appearance with new FrameShape::Box style.
2019-04-11 14:27:31 +02:00
Andreas Kling
f0501a0102
VisualBuilder: Add GGroupBox.
...
The icon currently looks better than a real GGroupBox. I have to fix that.
2019-04-11 13:46:25 +02:00
Andreas Kling
07a9b2c4e6
VisualBuilder: Let's use 5 pixels for the grid size for now.
2019-04-11 13:16:18 +02:00
Andreas Kling
3f67298dad
VisualBuilder: Add GScrollBar (and yes, an icon for it, too.)
2019-04-11 06:42:07 +02:00
Andreas Kling
f25c524f20
VisualBuilder: Add GCheckBox and GLabel, and draw icons for them, too.
2019-04-11 06:32:27 +02:00
Andreas Kling
b5d1cfef58
VisualBuilder: Add icons to the toolbox, and support for GProgressBar.
2019-04-11 06:08:06 +02:00
Andreas Kling
75c76f6692
VisualBuilder: Make it possible to insert widgets from the toolbox.
2019-04-11 04:13:11 +02:00
Andreas Kling
c71ece77fa
VisualBuilder: Tweak grid size and add an (empty) toolbox window.
2019-04-11 04:01:17 +02:00
Andreas Kling
c6ffb3e2b8
VisualBuilder: Use real GWidgets instead of pretend VBWidgets.
...
That first design was the wrong idea. Instead, have VBWidget instantiate
a GWidget of the appropriate type and parent it to the VBForm.
We then use a new "greedy hit-testing" mechanism in GWidget to prevent any
mouse events from reaching the VBForm's children.
To paint the grabbers above the child widgets, I added a slightly hackish
but kind of neat second_paint_event() that is called after a widget has
painted all of his children. :^)
2019-04-11 03:34:37 +02:00
Andreas Kling
ead6524c0a
VisualBuilder: Add the first VBWidget subclass: VBButtonWidget. :^)
2019-04-11 02:49:10 +02:00
Andreas Kling
d73f79a2d2
VisualBuilder: Allow resizing widgets using their grabbers.
2019-04-11 02:35:30 +02:00
Andreas Kling
3c8e53ef2b
VisualBuilder: Work on selecting a widget and moving it around.
2019-04-11 01:59:07 +02:00
Andreas Kling
8268ece1bd
VisualBuilder: Start working on an interface builder application.
...
It's tedious making interfaces programmatically. Let's make a program to
help us with this. :^)
2019-04-11 00:05:47 +02:00
Andreas Kling
d8e1545783
LibCore: Move LibGUI/GLock to LibCore/CLock.
2019-04-10 22:39:59 +02:00
Andreas Kling
ab1c84cf53
LibCore: Move HTTP classes from LibGUI to LibCore.
2019-04-10 22:28:10 +02:00
Andreas Kling
cfd6e6cc36
LibCore: Move GIODevice hierarchy from LibGUI to LibCore.
2019-04-10 20:22:23 +02:00
Andreas Kling
fc1d3074de
LibCore: Move LibGUI/GNotifier to LibCore/CNotifier.
2019-04-10 17:35:43 +02:00
Andreas Kling
2f1f51b8ab
LibCore: Move LibGUI/GObject to LibCore/CObject.
2019-04-10 17:01:54 +02:00
Andreas Kling
b8062f69d8
LibCore: Add CEvent and make LibGUI/GEvent inherit from it.
2019-04-10 16:56:55 +02:00
Andreas Kling
696ada2810
Taskbar: Don't unconditionally update buttons on every state change.
2019-04-10 16:39:23 +02:00
Andreas Kling
5e0577a042
Introduce LibCore and move GElapsedTimer => CElapsedTimer.
...
I need a layer somewhere between AK (usable both by userspace and kernel)
and LibGUI (usable by userspace except WindowServer.) So here's LibCore.
2019-04-10 16:14:44 +02:00
Andreas Kling
d4818dd2dd
WindowServer: Give windows a "background color" to use for missing parts.
...
When resizing a window, we often end up having to paint some part of it
without coverage in the current backing store. This patch makes those cases
look nicer by having a fallback background color for each window, passed
along with the CreateWindow client message.
2019-04-10 14:29:47 +02:00
Andreas Kling
f6543c5946
LibGUI: Add a simple GGroupBox widget.
...
This needs some work on the visual side, but it gets the job done already.
2019-04-10 05:52:15 +02:00
Andreas Kling
b980c32662
FontEditor: Update the glyph map when changing a glyph's width.
2019-04-10 04:02:20 +02:00
Andreas Kling
f5c295ecc5
FontEditor: Add a "Glyph width:" label and align some things.
2019-04-10 03:51:03 +02:00