Age | Commit message (Collapse) | Author |
|
|
|
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.
|
|
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.
|
|
Otherwise changes to the widgets would cause all sorts of updates on
half-deleted cells.
Fixes #4171.
|
|
...as the initial stroke that begins an edit.
This is still imperfect, as it completely ignores selections.
Fixes #4168 (sort of).
|
|
This naturally also implements multi-char columns, and also integrates
it into the js runtime (such columns can be named in ranges too).
|
|
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.
|
|
Just updating the sheet will not cause a widget update.
|
|
This simply fils the target selection with the source cell.
Fixes #4010.
|
|
Closes #4136.
|
|
This is not utilised yet.
|
|
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!)
|
|
All of these files were getting ByteBuffer.h from someone else and then
using it. Let's include it explicitly.
|
|
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.
|
|
Now the entire range is copied to the area around the target cell,
translating the current cursor to the target.
|
|
|
|
These currently only work on the current sheet, in the current
Spreadsheet instance, but they're still freakin' cool!
|
|
|
|
|
|
|
|
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>
|
|
|
|
|
|
This makes tables look a lot nicer with different-sized fonts. :^)
|
|
Don't rely on HashTable.h pulling this in.
|
|
s/String::format/String::formatted/ - the Markdown source was not being
formatted properly.
|
|
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.
|
|
Just use VM::call() directly everywhere.
|
|
|
|
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.
|
|
|
|
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 :^)
|
|
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.
|
|
|
|
Since `JS::Date::value_of()' returns the timestamp in ms, this new type
assumes that the value given is also in ms.
|
|
|
|
|
|
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
|
|
This will allow us to throw exceptions even when there is no active
interpreter in the VM.
|
|
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.)
|
|
Fixes #3570.
|
|
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.
|
|
Now all format values will format a single double, cast to the
appropriate types.
|
|
|
|
|
|
|
|
|
|
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. :^)
|
|
This allows you to enter many rows of cells like so:
1<return>2<return>3<return>...
Very cool! :^)
|
|
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. :^)
|