Andreas Kling
dcb0766d3f
LibGUI: Remove some header dependencies from Application.h
2020-02-15 01:18:32 +01:00
Andreas Kling
93e9c2732b
LibGfx: Remove unused Bitmap::load_from_file() for loading raw RGBA
...
This was not used anywhere but added unnecessary members to Bitmap.
2020-02-15 01:06:32 +01:00
Andreas Kling
9c0c677d57
LibGfx: Reduce header dependencies of Bitmap and Font
2020-02-15 01:03:37 +01:00
Andreas Kling
34b5ff7c29
LibGfx: Move a bunch of LogStream::operator<< to cpp files
2020-02-15 00:58:54 +01:00
Andreas Kling
3866e0d4d4
LibCore: Move LogStream::operator<< overloads into cpp files
2020-02-15 00:58:52 +01:00
Andreas Kling
2a41bff329
LibCore: Remove a bunch of unnecessary forward declarations
...
Now that we get LibCore forward declarations from <LibCore/Forward.h>,
we don't need to declare things manually.
2020-02-15 00:32:33 +01:00
Andreas Kling
66903ad987
LibGfx: Remove Utf8View.h dependency from Font.h
2020-02-15 00:27:50 +01:00
Andreas Kling
e1ff4fa034
LibGUI: Remove more header dependencies from Widget.h
2020-02-15 00:24:14 +01:00
Andreas Kling
69400c2ca1
LibCore: Replace manual forward declarations with <LibCore/Forward.h>
2020-02-15 00:13:44 +01:00
Andreas Kling
6a3cd11a80
AK: Remove manual forward declarations with <AK/Forward.h>
2020-02-15 00:12:31 +01:00
Andreas Kling
a368cf7d51
LibGfx: Replace manual forward declarations with <LibGfx/Forward.h>
2020-02-15 00:10:34 +01:00
Andreas Kling
34c7322d77
LibGUI: Remove some header dependencies from Widget.h
2020-02-14 23:53:11 +01:00
Andreas Kling
08cae2773d
LibGfx: More work on header dependency reduction
2020-02-14 23:33:21 +01:00
Andreas Kling
3fe2640c8c
LibGfx: Add forward declaration header
...
This patch adds <LibGfx/Forward.h> with forward declarations for Gfx.
2020-02-14 23:31:18 +01:00
Andreas Kling
8f7333f080
LibCore: Add a forward declaration header
...
This patch adds <LibCore/Forward.h> and uses it in various places to
shrink the header dependency graph.
2020-02-14 23:31:18 +01:00
Andreas Kling
3bbf4610d2
AK: Add a forward declaration header
...
You can now #include <AK/Forward.h> to get most of the AK types as
forward declarations.
Header dependency explosion is one of the main contributors to compile
times at the moment, so this is a step towards smaller include graphs.
2020-02-14 23:31:18 +01:00
Andreas Kling
5884ef8425
LibGUI: Add missing Event.cpp file
2020-02-14 17:35:04 +01:00
Andreas Kling
814d59f462
LibGUI: Port the drag&drop code to Core::MimeData
2020-02-14 13:18:59 +01:00
Andreas Kling
3cba9c3c25
LibCore: Add Core::MimeData class
...
This object contains zero or more { mime_type, data } entries and will
be used for clipboard data as well as drag & drop.
2020-02-14 13:17:26 +01:00
Andreas Kling
2c14e46b96
LibGUI: Indicate ItemView drag acceptance with a little rectangle
...
If an index accepts a drag, we now draw a little rectangle around it
when the drag moves over it.
2020-02-13 21:50:50 +01:00
Andreas Kling
f0ae353c9e
LibGUI: Allow dropping drags on AbstractView
...
You can now drop things on an AbstractView, which will ask its model if
the drag is acceptable to drop at the index where it's dropped.
If it's accepted by the model, the view will fire the on_drop hook.
2020-02-13 21:49:14 +01:00
Andreas Kling
8b3864c70a
LibGUI: Have FileSystemModel accept url-list drags onto directories
2020-02-13 21:48:32 +01:00
Andreas Kling
6e7ca44dee
LibGUI: Add GUI::Model::accepts_drag(index, data_type)
...
This allows a model to indicate whether it would accept a drag with a
given data type being dropped on a given index.
2020-02-13 21:45:46 +01:00
Andreas Kling
3ce80bec97
WindowServer+LibGUI: Add a "drag move" event
...
This allows windows/widgets to learn when something is being dragged
over them. They can then repaint themselves somehow to indicate that
they are willing to accept a drop.
Currently this is piggybacking somewhat on the mouse event mechanism
in WindowServer. I'm not sure that's the best design but it seemed
easier to do it this way right now.
2020-02-13 21:43:32 +01:00
Andreas Kling
f88fe5dc3f
LibGUI: Don't assert when hovering spacing around single-child Splitter
...
Fixes #1215 .
2020-02-13 20:00:01 +01:00
Andreas Kling
3e486f75ff
AK: Move escape_html_entities() from LibHTML to AK
...
This sort of thing can be useful to things that don't want to link with
all of LibHTML.
2020-02-13 08:46:00 +01:00
Andreas Kling
90fec9c732
LibCore: Add "static bool Core::File::exists(filename)"
2020-02-12 21:17:00 +01:00
Andreas Kling
0cdf68f668
LibGUI: Always unhighlight table view column headers when cursor leaves
...
If the cursor left a table view column header while also pressing it,
we would keep the header highlighted. This was not consistent with how
regular buttons behaved.
2020-02-12 19:35:25 +01:00
Andreas Kling
29aee5e0d6
LibGUI: Make last auto-sized widget in a BoxLayout fill remaining space
...
Since space is divided evenly between widgets with SizePolicy::Fill,
we were sometimes ending up with a couple of unused pixels after the
last widget (due to rounding.)
Fix this by always giving the slack pixels at the end to the very last
auto-sized widget in the layout.
This fixes an issue where it was sometimes possible to click on an
"unreachable" part of a Splitter widget. :^)
2020-02-12 14:05:50 +01:00
Andreas Kling
5e42fe76d6
LibGUI: Use Core::DateTime in FileSystemModel
2020-02-11 20:43:32 +01:00
Andreas Kling
8f89cc85d1
LibCore: Add DateTime::from_timestamp(time_t)
2020-02-11 19:48:46 +01:00
Andreas Kling
b8cf83926a
LibCore: Add a basic Core::DateTime class
...
This is just to have a pleasant way to print the current time for now:
dbg() << Core::DateTime::now();
Or if you want it as a string:
Core::DateTime::now().to_string();
2020-02-11 19:43:29 +01:00
Andreas Kling
29aa8373d4
LibC: Add localtime_r()
2020-02-11 19:36:59 +01:00
Andreas Kling
57e4410044
Revert "LibC: Remove isfoo() declarations from ctype.h"
...
This reverts commit 2ba06662b6
.
This broke the toolchain build. Apparently libstdc++v3 depends on the
declarations of isfoo() helpers.
2020-02-11 19:36:47 +01:00
Andreas Kling
2ba06662b6
LibC: Remove isfoo() declarations from ctype.h
...
We'll keep the definitions in ctype.cpp so you can link against them
but there's no reason to have competing declarations and macros.
2020-02-11 17:41:16 +01:00
Andreas Kling
92e2afe584
LibGUI: Tweak C++ syntax highlighting colors a bit :^)
2020-02-11 13:07:21 +01:00
Andreas Kling
9a09437c46
LibGUI: Splitter should forget resize candidates after cursor leaves
...
Otherwise we'll keep highlighting the grabbable rect even after the
cursor has left the splitter widget.
2020-02-11 11:53:38 +01:00
Andreas Kling
8a605922bb
LibGUI: Make splitters 1px wider as 3px is slightly too narrow
2020-02-11 11:53:38 +01:00
Andreas Kling
1fc887c576
LibGUI: Only highlight grabbable area between a Splitter's children
...
We were previously cheating by setting the entire splitter's background
color to the hover highlight color. This looked goofy whenever there
were transparent widgets inside a splitter, since the highlighted color
would shine through when hovering.
This was especially noticeable in SystemMonitor, which now looks much
better. :^)
2020-02-11 11:53:38 +01:00
Andreas Kling
3f58f0e87c
LibGfx: Add Rect::operator!=(Rect)
2020-02-11 11:53:38 +01:00
Andreas Kling
f4fa758959
LibGUI: Add a Widget::did_layout() that gets called after layout
...
This will allow widgets to implement post-layout behaviors.
2020-02-11 11:53:38 +01:00
Andreas Kling
7aa62665a3
LibGUI: Factor out Splitter hit testing into a separate function
2020-02-11 11:53:38 +01:00
Shannon Booth
7b6d450b6a
LibGfx: Assert that an empty bitmap is not created
2020-02-11 11:00:09 +01:00
Andreas Kling
7323d085dd
LibGUI: Single-line GUI::TextEditor should not have "go to line" action
2020-02-10 19:49:49 +01:00
Andreas Kling
580a94bc44
Kernel+LibC: Merge sys$stat() and sys$lstat()
...
There is now only one sys$stat() instead of two separate syscalls.
2020-02-10 19:49:49 +01:00
Andreas Kling
3713d31750
LibCore: TCP and UDP servers should parent Notifiers to themselves
...
This makes things look a little more neat in Inspector. :^)
2020-02-10 14:15:56 +01:00
William McPherson
aa149b9330
LibAudio/Piano: Replace floats with doubles
...
We should default to double-precision so that clients can make the
choice to use float or double.
2020-02-10 14:04:27 +01:00
William McPherson
d55d2b2794
LibAudio/aplay: Handle WAV header errors properly
...
We shouldn't just ASSERT() if the header parse fails. This was crashing
Piano completely.
2020-02-10 14:04:27 +01:00
Andreas Kling
6cbd72f54f
AK: Remove bitrotted Traits::dump() mechanism
...
This was only used by HashTable::dump() which I used when doing the
first HashTable implementation. Removing this allows us to also remove
most includes of <AK/kstdio.h>.
2020-02-10 11:55:34 +01:00
Liav A
7c4dd0c8cf
LibELF: Use VirtualAddress class from LibBareMetal
2020-02-09 19:38:17 +01:00