Age | Commit message (Collapse) | Author |
|
|
|
|
|
Not sure why I put this into LibGUI in the first place.
|
|
The qualified name of a font is "<Family> <Size> <Weight>". You can
get the QN of a Font via the Font::qualified_name() API, and you can
get any system font by QN from the GUI::FontDatabase. :^)
|
|
|
|
|
|
|
|
This makes it easier to include JSON GUI declarations in any app. :^)
|
|
|
|
|
|
|
|
This is our first client of the new JSON GUI declaration thingy.
The skeleton of the TextEditor app GUI is now declared separately from
the C++ logic, and we use the Core::Object::name() of widgets to locate
them once they have been instantiated by the GUI builder.
|
|
The move constructor of a lambda just copies it anyway.
Even if the first move() left an 'empty' closure behind, then
'm_editor->on_cursor_change' would only be able to see an empty
closure, which is certainly not what was intended.
|
|
|
|
|
|
|
|
So far, clicking on a link from the Markdown/HTML preview Web::PageView did
nothing - now we pass that link to Desktop::Launcher, which will then
open it in Browser, FileManager, another TextEditor instance etc.
|
|
This will let the WindowManager choose the location of the window
|
|
|
|
|
|
Since the vast majority of message boxes should be modal, require
the parent window to be passed in, which can be nullptr for the
rare case that they don't. By it being the first argument, the
default arguments also don't need to be explicitly stated in most
cases, and it encourages passing in a parent window handle.
Fix up several message boxes that should have been modal.
|
|
Since FilePicker almost always should be modal, add the parent
window as mandatory first argument.
|
|
This makes looking at HTML files that somehow fail a little less
painful by allowing the user to actually _see_ the html.
|
|
This patch adds a PreviewMode enum with the following values:
- None
- Markdown
- HTML
This makes it a bit more logical to implement exclusive behavior.
|
|
In keeping with the slightly-higher-contrast theme.
|
|
During app teardown, the Application object may be destroyed before
something else, and so having Application::the() return a reference was
obscuring the truth about its lifetime.
This patch makes the API more honest by returning a pointer. While
this makes call sites look a bit more sketchy, do note that the global
Application pointer only becomes null during app teardown.
|
|
Having this on the stack makes whole-program teardown iffy. Turning it
into a Core::Object allows anyone who needs it to extends its lifetime.
|
|
This allows you to edit HTML and see the changes live. This feature is
possibly my favorite feature in the world right now.
|
|
|
|
Attempting to open a non-existent file from the command line should not
fail, it should just open a new text document with that name. Note that
the file is not created until you actually save it.
|
|
Markdown documents are now obtained via the static Document::parse
method, which returns a RefPtr<Document>, or nullptr on failure.
|
|
This widget doesn't just view HTML, it views a web page. :^)
|
|
And move canonicalized_path() to a static method on LexicalPath.
This is to make it clear that FileSystemPath/canonicalized_path() only
perform *lexical* canonicalization.
|
|
Closes https://github.com/SerenityOS/serenity/issues/2080
|
|
|
|
We're starting with a very basic decoding API and only ISO-8859-1 and
UTF-8 decoding (and UTF-8 decoding is really a no-op since String is
expected to be UTF-8.)
|
|
|
|
|
|
|
|
We should think a bit more about how we want preview content to
interact with the outside world, but for now let's just make it run.
|
|
The API for adding a submenu to a menu is now:
auto& submenu = menu.add_submenu("Name");
submenu.add_action(my_action);
|
|
|
|
This works by hooking into the change notifications from the TextEditor
widget and parsing the document content as markdown, and generating an
HTML document from it which is displayed using LibWeb.
This will make it a bit easier to write man pages! :^)
|
|
This mimics the Explorer toolbar container from Windows 2000 and looks
pretty neat! :^)
|
|
|
|
This patch adds GUI::Action::create_checkable() helpers that work just
like the existing create() helpers, but the actions become checkable(!)
Clients are no longer required to manage the checked state of their
actions manually, but instead they will be checked/unchecked as needed
by GUI::Action itself before the activation hook is fired.
|
|
This makes it show up in Inspector with all the menus inside it. :^)
|
|
|
|
This allows us to construct menus in a more natural way:
auto& file_menu = menubar->add_menu("File");
file_menu.add_action(...);
Instead of the old way:
auto file_menu = GUI::Menu::construct();
file_menu->add_action(...);
menubar->add_menu(file_menu);
|
|
Fixes #1444
|