1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-10-13 15:02:18 +00:00
serenity/Applications/Spreadsheet
Andreas Kling 822dc56ef3 LibGUI: Introduce GML - a simple GUI Markup Language :^)
This patch replaces the UI-from-JSON mechanism with a more
human-friendly DSL.

The current implementation simply converts the GML into a JSON object
that can be consumed by GUI::Widget::load_from_json(). The parser is
not very helpful if you make a mistake.

The language offers a very simple way to instantiate any registered
Core::Object class by simply saying @ClassName

@GUI::Label {
    text: "Hello friends!"
    tooltip: ":^)"
}

Layouts are Core::Objects and can be assigned to the "layout" property:

@GUI::Widget {
    layout: @GUI::VerticalBoxLayout {
        spacing: 2
        margins: [8, 8, 8, 8]
    }
}

And finally, child objects are simply nested within their parent:

@GUI::Widget {
    layout: @GUI::HorizontalBoxLayout {
    }
    @GUI::Button {
        text: "OK"
    }
    @GUI::Button {
        text: "Cancel"
    }
}

This feels a *lot* more pleasant to write than the JSON we had. The fact
that no new code was being written with the JSON mechanism was pretty
telling, so let's approach this with developer convenience in mind. :^)
2020-12-20 11:59:40 +01:00
..
CellType LibJS: Remove js_string(Interpreter&, ...) 2020-09-27 20:26:58 +02:00
Readers Spreadsheet: Add a CSV reader and writer 2020-11-24 21:38:13 +01:00
Writers Spreadsheet: Add a CSV reader and writer 2020-11-24 21:38:13 +01:00
Cell.cpp Everywhere: Add missing <AK/TemporaryChange.h> includes 2020-10-15 23:49:53 +02:00
Cell.h Spreadsheet: Let the cells know their own position in the sheet 2020-09-28 17:41:48 +02:00
CellSyntaxHighlighter.cpp Spreadsheet: Add a syntax highlighter to the cell editor 2020-08-24 19:15:07 +02:00
CellSyntaxHighlighter.h Spreadsheet: Add a syntax highlighter to the cell editor 2020-08-24 19:15:07 +02:00
CellTypeDialog.cpp LibGUI: Introduce GML - a simple GUI Markup Language :^) 2020-12-20 11:59:40 +01:00
CellTypeDialog.h Spreadsheet: Add conditional formatting 2020-09-25 23:55:33 +02:00
CMakeLists.txt LibGUI: Introduce GML - a simple GUI Markup Language :^) 2020-12-20 11:59:40 +01:00
CondFormatting.gml LibGUI: Introduce GML - a simple GUI Markup Language :^) 2020-12-20 11:59:40 +01:00
ConditionalFormatting.h Spreadsheet: Add conditional formatting 2020-09-25 23:55:33 +02:00
CondView.gml LibGUI: Introduce GML - a simple GUI Markup Language :^) 2020-12-20 11:59:40 +01:00
Forward.h Spreadsheet: Add conditional formatting 2020-09-25 23:55:33 +02:00
HelpWindow.cpp LibWeb: Rename LayoutNode classes and move them into Layout namespace 2020-11-22 15:56:27 +01:00
HelpWindow.h Spreadsheet: Add support for example views and hyperlinks in the docs 2020-10-31 15:40:13 +01:00
JSIntegration.cpp Spreadsheet: Implement infinit-scroll for columns 2020-11-30 12:07:45 +01:00
JSIntegration.h Spreadsheet: Implement infinit-scroll for columns 2020-11-30 12:07:45 +01:00
main.cpp Spreadsheet: Force-update the spreadsheet widget after pasting 2020-11-30 12:07:45 +01:00
Position.h Spreadsheet: Serialise Positions to URLs and add Sheet::from_uri() 2020-11-03 16:47:56 +01:00
Spreadsheet.cpp Spreadsheet: Use JS::Parser::print_errors() for reporting syntax errors 2020-12-06 18:52:52 +01:00
Spreadsheet.h Spreadsheet: Implement infinit-scroll for columns 2020-11-30 12:07:45 +01:00
SpreadsheetModel.cpp Spreadsheet: Implement infinite-scroll for rows 2020-11-30 12:07:45 +01:00
SpreadsheetModel.h Spreadsheet: Add support for copying ranges of cells to other cells 2020-11-08 21:46:13 +01:00
SpreadsheetView.cpp LibGUI: Move selection behavior from TableView up to AbstractView 2020-12-17 00:54:58 +01:00
SpreadsheetView.h Spreadsheet: Invert the drag-selection trigger 2020-11-30 17:54:54 +01:00
SpreadsheetWidget.cpp Spreadsheet: Reduce top bar default height 2020-12-12 20:09:55 +01:00
SpreadsheetWidget.h Spreadsheet: Add support for copying ranges of cells to other cells 2020-11-08 21:46:13 +01:00
Workbook.cpp Spreadsheet: Add support for importing from and exporting to CSV files 2020-11-24 21:38:13 +01:00
Workbook.h LibJS: Rename InterpreterScope => InterpreterExecutionScope 2020-09-21 14:35:12 +02:00