mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 05:17:34 +00:00
LibGUI: Create an alias for Widget UnregisteredChildHandler
This commit is contained in:
parent
33f42e3490
commit
703da34947
4 changed files with 9 additions and 8 deletions
|
@ -353,12 +353,13 @@ public:
|
|||
AK::Variant<Gfx::StandardCursor, NonnullRefPtr<Gfx::Bitmap>> const& override_cursor() const { return m_override_cursor; }
|
||||
void set_override_cursor(AK::Variant<Gfx::StandardCursor, NonnullRefPtr<Gfx::Bitmap>>);
|
||||
|
||||
using UnregisteredChildHandler = ErrorOr<NonnullRefPtr<Core::Object>>(DeprecatedString const&);
|
||||
ErrorOr<void> try_load_from_gml(StringView);
|
||||
ErrorOr<void> try_load_from_gml(StringView, ErrorOr<NonnullRefPtr<Core::Object>> (*unregistered_child_handler)(DeprecatedString const&));
|
||||
ErrorOr<void> try_load_from_gml(StringView, UnregisteredChildHandler);
|
||||
|
||||
// FIXME: Replace all uses of load_from_gml() with try_load_from_gml()
|
||||
bool load_from_gml(StringView gml_string);
|
||||
bool load_from_gml(StringView, ErrorOr<NonnullRefPtr<Core::Object>> (*unregistered_child_handler)(DeprecatedString const&));
|
||||
bool load_from_gml(StringView, UnregisteredChildHandler);
|
||||
|
||||
// FIXME: remove this when all uses of shrink_to_fit are eliminated
|
||||
void set_shrink_to_fit(bool);
|
||||
|
@ -367,7 +368,7 @@ public:
|
|||
bool has_pending_drop() const;
|
||||
|
||||
// In order for others to be able to call this, it needs to be public.
|
||||
virtual ErrorOr<void> load_from_gml_ast(NonnullRefPtr<GUI::GML::Node> ast, ErrorOr<NonnullRefPtr<Core::Object>> (*unregistered_child_handler)(DeprecatedString const&));
|
||||
virtual ErrorOr<void> load_from_gml_ast(NonnullRefPtr<GUI::GML::Node> ast, UnregisteredChildHandler);
|
||||
|
||||
protected:
|
||||
Widget();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue