mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-01 16:58:52 +00:00
LibGUI: Add a simple GWidget class registry/factory
You can now register a GWidget subclass with REGISTER_GWIDGET(class) and it will be available for factory construction through the new GWidgetClassRegistration interface. To obtain a GWidgetClassRegistration for a given class name, you call GWidgetClassRegistration::find(class_name). You can also iterate over all the registered classes using GWCR::for_each(callback). This will be very useful for implementing a proper GUI designer, and also in the future for things like script bindings. NOTE: All of the registrations are done in GWidget.cpp at the moment since I ran into trouble with the fricken linker pruning the global constructors this mechanism relies on. :^)
This commit is contained in:
parent
a353d16ff4
commit
ca538b6cee
Notes:
sideshowbarker
2024-07-19 11:17:19 +09:00
Author: https://github.com/awesomekling
Commit: ca538b6cee
10 changed files with 109 additions and 8 deletions
|
@ -15,6 +15,11 @@
|
|||
|
||||
//#define DEBUG_GTEXTEDITOR
|
||||
|
||||
GTextEditor::GTextEditor(GWidget* parent)
|
||||
: GTextEditor(Type::MultiLine, parent)
|
||||
{
|
||||
}
|
||||
|
||||
GTextEditor::GTextEditor(Type type, GWidget* parent)
|
||||
: GScrollableWidget(parent)
|
||||
, m_type(type)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue