summaryrefslogtreecommitdiff
path: root/Applications/Spreadsheet
AgeCommit message (Collapse)Author
2020-12-06Spreadsheet: Use JS::Parser::print_errors() for reporting syntax errorsLinus Groh
2020-11-30Spreadsheet: Invert the drag-selection triggerAnotherTest
Make drag-selection the default behaviour, allowing (almost) any part of the cell to initiate a select. a small 5x5 rect at the corners of a cell can be used to initiate a drag-copy instead. Fixes #4268.
2020-11-30Spreadsheet: Implement drag-to-selectAnotherTest
To initiate drag-to-select, the user can move the mouse to near the edge of a cell, and click-and-drag when the cursor changes to a crosshair. Fixes #4167.
2020-11-30Spreadsheet: Clear callbacks on persistent widgets before tearing tabs downAnotherTest
Otherwise changes to the widgets would cause all sorts of updates on half-deleted cells. Fixes #4171.
2020-11-30Spreadsheet: Clear the cell and commit when the delete key is pressedAnotherTest
...as the initial stroke that begins an edit. This is still imperfect, as it completely ignores selections. Fixes #4168 (sort of).
2020-11-30Spreadsheet: Implement infinit-scroll for columnsAnotherTest
This naturally also implements multi-char columns, and also integrates it into the js runtime (such columns can be named in ranges too).
2020-11-30Spreadsheet: Implement infinite-scroll for rowsAnotherTest
Every time the scrollbar reaches the end, we append 100 more rows (seamlessly!). As a result of defaulting to 100 rows, we can also save with the smallest number of rows required. This partially deals with #4170.
2020-11-30Spreadsheet: Force-update the spreadsheet widget after pastingAnotherTest
Just updating the sheet will not cause a widget update.
2020-11-24Spreadsheet: Allow copying from one cell to manyAnotherTest
This simply fils the target selection with the source cell. Fixes #4010.
2020-11-24Spreadsheet: Add support for importing from and exporting to CSV filesAnotherTest
Closes #4136.
2020-11-24Spreadsheet: Add a CSV reader and writerAnotherTest
This is not utilised yet.
2020-11-22LibWeb: Rename LayoutNode classes and move them into Layout namespaceAndreas Kling
Bring the names of various boxes closer to spec language. This should hopefully make things easier to understand and hack on. :^) Some notable changes: - LayoutNode -> Layout::Node - LayoutBox -> Layout::Box - LayoutBlock -> Layout::BlockBox - LayoutReplaced -> Layout::ReplacedBox - LayoutDocument -> Layout::InitialContainingBlockBox - LayoutText -> Layout::TextNode - LayoutInline -> Layout::InlineNode Note that this is not strictly a "box tree" as we also hang inline/text nodes in the same tree, and they don't generate boxes. (Instead, they contribute line box fragments to their containing block!)
2020-11-15Everywhere: Add missing <AK/ByteBuffer.h> includesAndreas Kling
All of these files were getting ByteBuffer.h from someone else and then using it. Let's include it explicitly.
2020-11-10AK: Make RefPtr, NonnullRefPtr, WeakPtr thread safeTom
This makes most operations thread safe, especially so that they can safely be used in the Kernel. This includes obtaining a strong reference from a weak reference, which now requires an explicit call to WeakPtr::strong_ref(). Another major change is that Weakable::make_weak_ref() may require the explicit target type. Previously we used reinterpret_cast in WeakPtr, assuming that it can be properly converted. But WeakPtr does not necessarily have the knowledge to be able to do this. Instead, we now ask the class itself to deliver a WeakPtr to the type that we want. Also, WeakLink is no longer specific to a target type. The reason for this is that we want to be able to safely convert e.g. WeakPtr<T> to WeakPtr<U>, and before this we just reinterpret_cast the internal WeakLink<T> to WeakLink<U>, which is a bold assumption that it would actually produce the correct code. Instead, WeakLink now operates on just a raw pointer and we only make those constructors/operators available if we can verify that it can be safely cast. In order to guarantee thread safety, we now use the least significant bit in the pointer for locking purposes. This also means that only properly aligned pointers can be used.
2020-11-08Spreadsheet: Add support for copying ranges of cells to other cellsAnotherTest
Now the entire range is copied to the area around the target cell, translating the current cursor to the target.
2020-11-08Spreadsheet: Update the view when using the cell editorAnotherTest
2020-11-03Spreadsheet: Enable Drag&Drop and Copy/PasteAnotherTest
These currently only work on the current sheet, in the current Spreadsheet instance, but they're still freakin' cool!
2020-11-03Spreadsheet: Serialise Positions to URLs and add Sheet::from_uri()AnotherTest
2020-11-02Applications: Use pledge and unveilBrendan Coles
2020-11-02Applications: Use GUI::Icon::default_icon to set application iconBrendan Coles
2020-10-31Spreadsheet: Add support for example views and hyperlinks in the docsAnotherTest
Now the functions can actually be demonstrated by small examples, embedded right inside the documentation via: spreadsheet://example/<page>#<example_name> Also allows pages to link to each other via the same scheme: spreadsheet://doc/<page>
2020-10-31Applications: Use application icons for dialog windowsBrendan Coles
2020-10-31Spreadsheet: Add Help menuBrendan Coles
2020-10-25LibGUI: Make table view row height+padding font-size-relativeAndreas Kling
This makes tables look a lot nicer with different-sized fonts. :^)
2020-10-15Everywhere: Add missing <AK/TemporaryChange.h> includesAndreas Kling
Don't rely on HashTable.h pulling this in.
2020-10-10Spreadsheet: Fix rendering of documentation examplesLinus Groh
s/String::format/String::formatted/ - the Markdown source was not being formatted properly.
2020-10-06Spreadsheet: Use new format functions.asynts
In a few places I also simplified a few format strings: -outln("{} item{}", items, items.size() == 1 ? ' ' : 's'); +outln("{} item(s)", items); In my opinion this is more readable and in some places it incorrectly wrote '0 item' which is "fixed" now. In other places the placeholder space looked weird.
2020-10-04LibJS: Remove Interpreter::call()Andreas Kling
Just use VM::call() directly everywhere.
2020-09-28Spreadsheet: Let the cells know their own position in the sheetAnotherTest
2020-09-27AK: Remove the ctype adapters and use the actual ctype functions insteadBenoît Lormeau
This finally takes care of the kind-of excessive boilerplate code that were the ctype adapters. On the other hand, I had to link `LibC/ctype.cpp` to the Kernel (for `AK/JsonParser.cpp` and `AK/Format.cpp`). The previous commit actually makes sense now: the `string.h` includes in `ctype.{h,cpp}` would require to link more LibC stuff to the Kernel when it only needs the `_ctype_` array of `ctype.cpp`, and there wasn't any string stuff used in ctype. Instead of all this I could have put static derivatives of `is_any_of()` in the concerned AK files, however that would have meant more boilerplate and workarounds; so I went for the Kernel approach.
2020-09-27LibJS: Remove js_string(Interpreter&, ...)Andreas Kling
2020-09-27LibJS: Make native function/property callbacks take VM, not InterpreterAndreas Kling
More work on decoupling the general runtime from Interpreter. The goal is becoming clearer. Interpreter should be one possible way to execute code inside a VM. In the future we might have other ways :^)
2020-09-27LibJS: Move most of Interpreter into VMAndreas Kling
This patch moves the exception state, call stack and scope stack from Interpreter to VM. I'm doing this to help myself discover what the split between Interpreter and VM should be, by shuffling things around and seeing what falls where. With these changes, we no longer have a persistent lexical environment for the current global object on the Interpreter's call stack. Instead, we push/pop that environment on Interpreter::run() enter/exit. Since it should only be used to find the global "this", and not for variable storage (that goes directly into the global object instead!), I had to insert some short-circuiting when walking the environment parent chain during variable lookup. Note that this is a "stepping stone" commit, not a final design.
2020-09-26Spreadsheet: clang-formatAndreas Kling
2020-09-25Spreadsheet: Add the 'Date' cell typeAnotherTest
Since `JS::Date::value_of()' returns the timestamp in ms, this new type assumes that the value given is also in ms.
2020-09-25Spreadsheet: Treat an empty format string as "default"AnotherTest
2020-09-25Spreadsheet: Save and load cell types and formatting optionsAnotherTest
2020-09-25Spreadsheet: Add conditional formattingAnotherTest
Currently only supports setting the foregound and the background colours. This patch also unifies `foreground_color' and `background_color' used throughout to a `Format' struct, in hopes of getting more formatting options one day :P
2020-09-22LibJS: Move the current exception from Interpreter to VMAndreas Kling
This will allow us to throw exceptions even when there is no active interpreter in the VM.
2020-09-21LibJS: Rename InterpreterScope => InterpreterExecutionScopeAndreas Kling
To make it a little clearer what this is for. (This is an RAII helper class for adding and removing an Interpreter to a VM's list of the currently active (executing code) Interpreters.)
2020-09-21Spreadsheet: Always keep the workbook interpreter in VM scopeAnotherTest
Fixes #3570.
2020-09-20LibJS+Clients: Add JS::VM object, separate Heap from InterpreterAndreas Kling
Taking a big step towards a world of multiple global object, this patch adds a new JS::VM object that houses the JS::Heap. This means that the Heap moves out of Interpreter, and the same Heap can now be used by multiple Interpreters, and can also outlive them. The VM keeps a stack of Interpreter pointers. We push/pop on this stack when entering/exiting execution with a given Interpreter. This allows us to make this change without disturbing too much of the existing code. There is still a 1-to-1 relationship between Interpreter and the global object. This will change in the future. Ultimately, the goal here is to make Interpreter a transient object that only needs to exist while you execute some code. Getting there will take a lot more work though. :^) Note that in LibWeb, the global JS::VM is called main_thread_vm(), to distinguish it from future worker VM's.
2020-09-12Spreadsheet: Implement a specialised version of printf for formattingAnotherTest
Now all format values will format a single double, cast to the appropriate types.
2020-09-12Spreadsheet: Allow customising the cell foreground and background colorsAnotherTest
2020-09-12Spreadsheet: Allow cells to optionally have static fg/bg colorsAnotherTest
2020-09-08Spreadsheet: Add "final" to JS objects and tweak declarationsAndreas Kling
2020-08-29Spreadsheet: Add (limited) support for custom cell formattingAnotherTest
2020-08-29Spreadsheet: Make cells right-aligned by defaultAndreas Kling
Until we have better control over cell content alignment, let's make them all right-aligned by default since that makes numbers look nice, and numbers are the bread & butter of spreadsheets. :^)
2020-08-28Spreadsheet: Treat Return as a cursor key in the cell editing delegateAndreas Kling
This allows you to enter many rows of cells like so: 1<return>2<return>3<return>... Very cool! :^)
2020-08-28Spreadsheet: Have cursor movement keys commit and stop cell editingAndreas Kling
Customize the cell editing delegate to stop editing when one of the various cursor movement keys is hit. This allows you to type into a cell and then move to an adjacent cell by simply pressing an arrow. This may not be the best factoring for this feature, but it's pretty dang cool and we'll see how it evolves over time. :^)