Undoers were little objects to swap/revert an action. They didn't
execute the action itself, they just revert its previous state. Now
undoers were replaced with cmds: A cmd is an object that
executes/undoes/redoes just one action.
Changes:
* Remove old undo library and app/objects_container_impl.cpp
(now we use the doc::ObjectId directly to store undo info)
* Remove all Undoers from app/undoers/
* Replace DocumentApi impl with little Cmds in app/cmd/, these
cmds handle execute/undo/redo of each action at the logic layer
* Remove doc::Dirty object
* Remove doc::Settings: all undo configuration is in the app side
* Move undo options from app:ISettings to app::Preferences
* Rename UndoTransaction to Transaction
* Create a CmdSequence to store a sequence of Cmds (as now the new
undo library doesn't support open/close groups)
* Add doc::get<T>(ObjectId) function to get any kind of object
from the doc library by its ID
* Add Cel::document() and Sprite::document() members
* Add Sprite::cels(frame_t) to get all cels in the given frame
* Add Layer::displaceFrames() member function
* Move the "allow non-linear history" flag from undo2::UndoHistory
to app::DocumentUndo
Changes:
* Add doc::ImageRef to count references to the same image between Cels
(at this moment we cannot generate linked cels anyway)
* Remove doc:Stock class and doc::Sprite::m_stock member variable
* Remove app::undoers::Add/RemoveImage
* Add doc::SubObjectsIO and app::undoers::ObjectIO to
replace doc::LayerSubObjectsSerializer
Here we avoid copying and clearing pixels that will not be used
in the whole tool loop process.
Changes:
* Add several member functions in ToolLoop to validate/invalidate regions
of source/destination images so we know what regions are safe to use
by inks and can be shown in the editor
* Add new DocumentObserver::onExposeSpritePixels() member to validate
pixels that will be displayed in the editor
* Add Ink::needs/createSpecialSourceArea() member functions to validate
extra areas for inks like blur or jumble
* Add undoers::ModifiedRegion to save the undo information about the
modified region
* Add ShowHideDrawingCursor class
* Change "blur" tool policy from overlap to accumulate
(This is a real fix for issue #239)
Changes:
* Add doc::Sprite::bounds()
* Use gfx::Point to store the doc::Cel position
* Replace "int x, int y" with a "const gfx::Point&" param
* Fix Mask::intersect(const gfx::Rect&) and Mask::crop(const Image*)
Fix a problem selecting one cel in the timeline, using Ctrl+A and then
Ctrl+C to copy the whole image area. (This indicates that the user want
to copy the cel content, not the timeline cel.)
The objective of these changes is to create a more testable doc/logic API.
Included changes:
- Added doc::Context, doc::Documents (the old app::Documents),
and doc::Sprites (and observers for each)
- Added raster::Sprite::createBasicSprite()
- Added doc::ColorMode (equal to raster::PixelFormat)
- Added some methods to doc::Document: context(), sprites(), sprite()
(to replace app::Document::getSprite()), width/height(), colorMode(),
name(), and close()
- Moved app::DocumentObserver/Event to doc::DocumentObserver/Event
- Replaced app::ContextObserver with doc::DocumentsObserver and a couple
of signals.
- Renamed app::Context::getActiveDocument() with
doc::Context::activeDocument()
- Renamed app::Context::getActiveLocation() with
app::Context::activeLocation()
- Removed app::ContextObserverList
- Removed app::DocumentId (now we can use doc::ObjectId)
- Removed app::Context::getSettings()
There were problems calling a pure virtual function (IFileOpProgress
implemented by OpenFileJob) when we are already in ~Job() dtor. So we've
to wait the background thread (added Job::waitJob() function) to join
the thread so it can use IFileOpProgress safely.
Also the save process of .ase files now can be cancelled (it wasn't
possible before).
- Add doc::ExportData with information about the last export operation.
- Add RepeatLastExport command.
- Add SaveFileBaseCommand as base Command class, to accept "filename"
param.
- Add parameters to ExportSpriteSheet so we can call it without UI
from "repeat last export".
- Fixed issue #46: open .png files with Unicode chars
- Fixed issue #150: ability to uncompress program in folders w/Unicode chars
- Added base::utf8_iterator
- Added base::FileHandle
- Added base::get_app_path()
- Modified ui::KeyMessage::ascii() -> unicodeChar()
- Removed JI_NOTEXT flag
- Added app::XmlDocumentRef class and app::open_xml() function
- Added support for Unicode text exchange with Win32 clipboard
- Add HAVE_CONFIG_H wrapper to #include "config.h"
- Removed widgets namespace (it's in app now)
- Move some functions from src/file/file.h to src/base/cfile.h
- Move Vector2d to base library
- Rename MenuItem2 to AppMenuItem