Andreas Kling
214b67defd
AK: Add Vector::remove_first_matching(Callback).
...
This is a nice little helper to remove one item based on a matching
callback without having to do iteration yourself.
2019-03-18 20:51:40 +01:00
Andreas Kling
d7659ceebf
IRCClient: Add support for a bunch of numerics, mostly WHOIS related.
2019-03-18 15:36:32 +01:00
Andreas Kling
a319641fc4
GIODevice: Remove debug spam.
2019-03-18 15:36:16 +01:00
Andreas Kling
9ad076178a
GIODevice: Add a read_all() that returns a ByteBuffer with all we can read.
...
Use this to implement file opening in TextEditor.
2019-03-18 14:38:30 +01:00
Andreas Kling
8e3d0a23d5
LibGUI: Add GTCPSocket and base class GSocket (inherits from GIODevice.)
...
And use these to do the line-by-line reading automagically instead of having
that logic in IRCClient. This will definitely come in handy.
2019-03-18 14:09:58 +01:00
Andreas Kling
d466f2634d
LibGUI: Add GTableModel::Role::ForegroundColor.
...
This makes it possible to specify the text color for each table cell.
Use this to make the IRCClient show unread window list items in red.
2019-03-18 04:54:07 +01:00
Andreas Kling
f4b8e4966f
SharedGraphics: Add Color::to_string().
...
This generates a string in the format "rgba(%d, %d, %d, %d)".
2019-03-18 04:53:09 +01:00
Andreas Kling
c24d4b07db
IPv4: Add simple pseudorandom ephemeral port allocators for TCP and UDP.
2019-03-18 04:03:44 +01:00
Andreas Kling
77a782a67e
LibGUI: Don't crash if calling GClipboard::set_data() with a null string.
2019-03-18 02:59:08 +01:00
Andreas Kling
ce7017e1ec
LibGUI: Add GFile and base class GIODevice.
...
Working with the LibC API's is tedious, so let's add some comfy C++ API's.
2019-03-17 15:54:43 +01:00
Andreas Kling
ef05d8cbf6
AK: Use an OwnPtr for the VectorImpl.
...
I don't know why it wasn't implemented this way already. This fixes a leak
in operator=(Vector&&) that we were hitting on Ext2FS write.
2019-03-17 15:53:03 +01:00
Andreas Kling
4e451c1e92
Add client-side double buffering of window backing stores.
...
This prevents flicker and looks rather good. The main downside is that
resizing gets even more sluggish. That's the price we pay for now.
2019-03-17 04:23:54 +01:00
Andreas Kling
2ac4f54724
WindowServer: Oops, the message loop should wake up for timers.
2019-03-17 02:46:42 +01:00
Andreas Kling
0f49b5e7be
LibGUI: Ignore GWindow::update() with an empty rect.
2019-03-17 01:36:38 +01:00
Andreas Kling
01a2035ecf
LibGUI: Don't nap in event loop if there are already queued events.
...
This mirrors the WindowServer fix.
2019-03-17 01:34:31 +01:00
Andreas Kling
d3dcb42227
WindowServer: Don't nap in the message loop if there's a queued message.
...
This fixes a bug where clicking on a button would sometimes take a while
before showing up visually.
2019-03-17 01:30:55 +01:00
Andreas Kling
1c6dfc3282
AK: Make ByteBuffer's copy() and wrap() take void*.
...
This way we don't have to cast whatever we're passing to copy()/wrap().
2019-03-17 00:36:41 +01:00
Andreas Kling
5b0cbf547d
Base: Some work on various icons.
2019-03-17 00:33:49 +01:00
Andreas Kling
ec8bffb06d
LibGUI: Let GTextEditor deal with its horizontal padding internally.
...
I originally wanted to have the padding concept in GScrollableWidget
but it's really finicky with the ruler and everything.
2019-03-16 23:16:37 +01:00
Andreas Kling
78039ef057
TextEditor: Add actions for undo and redo. Not hooked up yet.
2019-03-16 23:16:11 +01:00
Andreas Kling
3854e752cb
LibGUI: Make GTextEditor inherit from GScrollableWidget.
...
This is quite nice, now we can share a ton of logic. :^)
2019-03-16 16:54:51 +01:00
Andreas Kling
6fbabac460
LibGUI: Factor out scrolling logic from GTableView into a GScrollableWidget.
...
This then becomes the base class for GTableView. I'd like to share as much
code as possible with GTextEditor and any other scrollable widgets.
2019-03-16 16:03:31 +01:00
Andreas Kling
dd5ca1940a
AK: Hoist the assertion in Retainable::release() to RetainableBase.
...
This means we don't have to generate a __PRETTY_FUNCTION__ symbol there
for each and every specialization.
2019-03-16 13:48:56 +01:00
Andreas Kling
3ebb5fbb87
AK: Remove custom allocator feature from Vector.
...
This wasn't really used and generated a whole bunch of template bloat.
2019-03-16 13:24:39 +01:00
Andreas Kling
5dd79736c5
Kernel: Remove the one client of Vector-with-custom-allocator.
...
This was a silly experiment. If I want to save space here, I can do it in
one of many other ways.
2019-03-16 13:19:58 +01:00
Andreas Kling
313ee8dd19
Move Lock from AK to Kernel, since it only works inside the kernel.
2019-03-16 13:18:22 +01:00
Andreas Kling
15657f0916
AK: Remove Buffer<T> since it was only ever instantiated with T=byte.
...
Instead make a specialized AK::ByteBufferImpl class for the backing store
of AK::ByteBuffer. This reduces template bloat.
2019-03-16 13:12:13 +01:00
Andreas Kling
eb610b309e
LibGUI: Make class_name() public so you can always call it.
...
I found myself having to cast to GWidget* all the time when writing some
generic debugging code that just wanted to dump widget info.
2019-03-16 12:57:04 +01:00
Andreas Kling
955a0ff477
AK: Reduce template bloat by hoisting non-typed parts of Retainable.
...
This is a bit of an old school hack, but it does remove a whole bunch of
generated symbols.
2019-03-16 12:47:19 +01:00
Andreas Kling
f44ba6a4c6
IRCClient: Add handling of some basic messages and commands.
2019-03-16 12:21:42 +01:00
Andreas Kling
b4f787090c
IRCClient: Add a little "(n)" indicator to window list for unread messages.
2019-03-16 02:14:53 +01:00
Andreas Kling
1394677528
IRCClient: Refactor window creation responsibilities.
...
IRCChannel and IRCQuery objects now create their own windows with the
help of an aid_create_window callback provided by IRCAppWindow.
There's still a bit of murk but this is already an improvement.
2019-03-16 01:45:49 +01:00
Andreas Kling
fc7f700c20
IRCClient: Rename IRCClientWindowFoo => IRCWindowFoo.
2019-03-16 01:15:19 +01:00
Andreas Kling
5c2d405e1f
IRCClient: Add menus.
2019-03-16 01:10:48 +01:00
Andreas Kling
746144f783
WindowServer: Add missing handling of AddMenuSeparator client request.
2019-03-16 01:09:27 +01:00
Andreas Kling
2b6cf37d20
IRCClient: Add some more toolbar actions. Starting to look nice.
2019-03-16 00:21:11 +01:00
Andreas Kling
3a3aa74b2e
IRCClient: Add a toolbar with some actions.
2019-03-15 23:24:40 +01:00
Andreas Kling
b54ab06595
GTableView: Add a way to turn off alternating row colors.
2019-03-15 21:41:27 +01:00
Andreas Kling
491aa112ab
IRClient: Add a member list to channel views.
2019-03-15 18:25:51 +01:00
Andreas Kling
08c15be0ca
IRCClient: Add ability to send query messages.
...
You can't open a query yet, but if someone starts one with you, you can
respond at least.
2019-03-15 18:02:38 +01:00
Andreas Kling
7e3673f710
GTextEditor: Disable the ruler in single-line mode.
...
Also make it possible to hide the ruler in multi-line mode, if you should
want to do that. :^)
2019-03-15 17:54:05 +01:00
Andreas Kling
1fc283ed7d
IRCClient+LibGUI: Add an input box so we can send messages to channels.
...
Implement this using a GTextEditor with a special single-line mode.
This new mode needs some polishing, but it's already very useful.
2019-03-15 17:37:13 +01:00
Andreas Kling
ad08165a25
LibGUI: Hit testing should skip invisible widgets.
2019-03-15 16:45:27 +01:00
Andreas Kling
a3d5ba8f23
LibGUI: Don't autofill the background of GStackWidget.
2019-03-15 16:44:51 +01:00
Andreas Kling
c1f2f5a153
LibGUI: Add a mode where GTableModel automatically activates on selection.
2019-03-15 16:25:30 +01:00
Andreas Kling
84f5312dc2
LibGUI: Disable GBoxLayout debug spam.
2019-03-15 16:23:12 +01:00
Andreas Kling
1089cd1378
IRCClient: Start using GStackWidget for the subwindows.
2019-03-15 16:12:51 +01:00
Andreas Kling
497300c492
LibGUI: Add a GStackWidget for many widgets sharing a single location.
...
Call set_active_widget(GWidget*) to put a new widget on top.
2019-03-15 16:12:06 +01:00
Andreas Kling
ab92252ee6
IRCClient: Hide all the table view headers.
2019-03-15 14:57:35 +01:00
Andreas Kling
a5d538b389
GTableView: Add a way to hide the column headers.
...
There are many situations where you would want a table view without headers.
2019-03-15 14:50:36 +01:00