Commit Graph

1340 Commits

Author SHA1 Message Date
David Capello
a17c767e65 Remove all public fields of Cel adding accessors. 2011-03-28 00:24:27 -03:00
David Capello
9077ab8357 Implement duplicate sprite with flatten layers (it was removed
temporally with the introduction of Document class).
2011-03-27 23:21:22 -03:00
David Capello
341e298a6e Fix problems showing incorrect values in RGB/HSB entries in color selector. 2011-03-27 22:15:33 -03:00
David Capello
92266b2a68 Implement duplicate layer (it was removed temporally with the introduction
of Document class).
2011-03-27 22:08:19 -03:00
David Capello
e2a6ab7501 Show HSB instead of HSV in color selectors. 2011-03-27 22:02:59 -03:00
David Capello
da491a601b Fix showing layer buttons in the status-bar overlapped by the
transparent-color selector when we're moving pixels.
2011-03-27 21:19:26 -03:00
David Capello
363f753929 Fix bug #3050538 avoiding using the global "window_action" flag. 2011-03-27 21:15:56 -03:00
David Capello
6a982f2e9f Remove NEWS.txt file (replaced with Wiki). 2011-03-27 20:55:03 -03:00
David Capello
df01255b51 Use OVERRIDE macro in more member functions (onProcessMessage, etc.). 2011-03-27 20:42:16 -03:00
David Capello
682e7152b7 Replace UndoHistory::undo_int/data/double methods with new safe-undoers.
+ Added SetCelFrame/Opacity/Position, SetMaskPosition, SetStockImgType,
  and SetLayerFlags undoers.
+ Finally removed the Layer::flags_addr() atrocity.
+ Removed RawData undoer.
+ Renamed SetImgType to SetSpriteImgType.
2011-03-27 18:15:00 -03:00
David Capello
b40a20e8aa Move src/widgets/editor.h to src/widgets/editor/editor.h. 2011-03-27 14:54:37 -03:00
David Capello
8b19d36e51 Add ContextFlags to simplify Command::onEnabled() implementations. 2011-03-27 14:51:02 -03:00
David Capello
94ad5cc0fc Fix layer_editable and layer_locked parts (they were switched). 2011-03-27 00:20:23 -03:00
David Capello
a21d15b4ef Improve Document::lock() with an enum as parameter instead of a bool. 2011-03-27 00:15:08 -03:00
David Capello
eee8e17fcf Fix problems drawing the editor cursor when several JM_DRAWs messages were received. 2011-03-27 00:02:20 -03:00
David Capello
be7aa1009d Fix bug in ink_hline8_blur(). 2011-03-26 23:55:59 -03:00
David Capello
cb0e3e9db1 Fix bug in BlurGetPixelsDelegateIndexed::operator() in ink_processing.h. 2011-03-26 23:51:55 -03:00
David Capello
6395ad3817 Write-lock the Document only when we press OK button
in LayerProperties, CanvasSize, LoadMask, and SaveFile commands.
2011-03-26 23:41:37 -03:00
David Capello
e6b1b1ffa8 Remove LayerImage(const LayerImage*, Sprite*) ctor. 2011-03-26 23:23:50 -03:00
David Capello
687e2a0f4f Fix UndoHistory to adjust m_diffCount correctly. 2011-03-26 23:20:45 -03:00
David Capello
ef1a3194f0 Minor changes in UndoTransaction to avoid throwing exceptions from its dtor. 2011-03-26 23:05:24 -03:00
David Capello
74c21c3abb Move FilterManagerImpl::apply() to private section. 2011-03-26 22:34:12 -03:00
David Capello
d95919beb5 Add a simple DeveloperConsole for debugging purposes (F11 key). 2011-03-26 20:43:43 -03:00
David Capello
7dd873b1a7 Mask and palettes do not need to be serialized with IDs because
they are not referenced by IDs in any other place.
2011-03-26 20:13:49 -03:00
David Capello
98c306f587 Fix bug using incorrect states as the "saved one" in UndoHistory. 2011-03-26 20:04:20 -03:00
David Capello
f854c7acf5 Fix bug #14, don't ask for saving changes when read-only commands are used.
+ Added a new attribute for each undo item (undo::Modification).
+ Each item now modifies or does not modify the document (e.g. selection
  actions do not modify the document).
+ Added an asterisk in tabs when the document is modified.
2011-03-26 19:58:52 -03:00
David Capello
4fcbc7b6df Improve AnimationEditor::drawCel() to avoid calling LayerImage::getCel()
for each Cel to be drawn (getCel() is O(N)).
2011-03-26 19:05:09 -03:00
David Capello
a524fae9ba Implement LayerImage::getCel() in terms of LayerImage::getCel() const. 2011-03-26 18:49:29 -03:00
David Capello
3e8e3b397a Convert the animation editor to a C++ class (AnimationEditor derived
from Widget).
2011-03-26 18:28:27 -03:00
David Capello
e6bfe37a7c Fix bug in FilterManagerImpl::begin(), it was not checking the
new Document::isMaskVisible() flag.
2011-03-26 17:48:51 -03:00
David Capello
8e5c950df8 Refactored the entire Undo system in several layers.
+ Added "undo" library (undo namespace).
+ Moved UndoHistory to undo namespace.
+ Added Undoer and UndoersCollector interfaces.
+ Converted old UndoStream to UndoersStack class.
+ Added new "undoers" namespace and moved each Undoer implementation
  (classes to undo different actions) to "undoers" directory.
+ Added IO operations to "raster" objects (image, cel, layer, palette,
  mask).
2011-03-26 17:40:55 -03:00
David Capello
daf7abfa68 Use <iosfwd> instead of <iostream> in base/serialization.h. 2011-03-26 15:09:44 -03:00
David Capello
bc86d0afd7 Add OVERRIDE macro as wrapper for MSVC "override" keyword. 2011-03-25 14:22:53 -03:00
David Capello
be955de1da Fix definition of read8/write8 in base::serialization namespace. 2011-03-25 14:21:55 -03:00
David Capello
69dff9b5d0 Use C99 uint*_t instead of ase_uint*. 2011-03-24 18:36:19 -03:00
David Capello
f816425d5d Add ObjectsContainer interface in src/undo/ so UndoHistory has a way to
obtain any kind of objects (not just GfxObj).
+ Removed GfxObjId.
+ Added ObjectsContainerImpl.
+ Use UniquePtr for each member in Document to avoid memory leaks in
  Document() ctor.
+ Removed RasterModule class.
2011-03-24 18:03:38 -03:00
David Capello
d77c639c57 UndoTransaction does not need document wrappers. 2011-03-24 14:43:00 -03:00
David Capello
bf3232c640 Rename Layer::destroy_all_cels() to destroyAllCels(). 2011-03-24 13:15:09 -03:00
David Capello
5ff24c794c Minor fixes to #include directives in raster/ dir. 2011-03-24 13:10:48 -03:00
David Capello
a2e0f32987 No more pimpl idiom for Sprite class (because the biggest dependencies
are now part of Document class).
2011-03-24 13:06:40 -03:00
David Capello
82476db988 Remove deprecated file cmd_new_cel.cpp. 2011-03-24 11:50:09 -03:00
David Capello
9182f0f14a Move UndoHistory from raster/ to undo/ directory. 2011-03-24 11:50:00 -03:00
David Capello
44bee62e51 Modify PixelsMovementImpl to avoid write-locking the document
in the whole operation.
2011-03-24 11:37:41 -03:00
David Capello
b23a3ddcf8 Changes in TODO file. 2011-03-24 10:33:41 -03:00
David Capello
93f0caae79 Rename DocumentWriter::unlock_writter() to unlockWriter(). 2011-03-24 10:26:40 -03:00
David Capello
0b495085cc Move the active mask from Sprite class to Document.
+ Removed masks and paths repositories.
+ Added Document::isMaskVisible and Document::setMaskVisible methods.
2011-03-23 00:06:43 -03:00
David Capello
f412c8450b Fix warning abouts undefined dtor of FormatOptions in file_formats_manager.cpp. 2011-03-22 23:19:38 -03:00
David Capello
f08d049ab6 Rename Undoable to UndoTransaction. 2011-03-22 21:22:13 -03:00
David Capello
6e60d3200d Add Document class, to remove app specific properties from Sprite.
+ Moved some properties from Sprite to Document: lock/unlock/mutex,
  filename, isModified flag, undo history, mask boundaries, file
  format options, preferred editor settings, extra cel.
+ A Context now has an active document (instead of an active sprite).
+ Renamed all sprite wrappers to be document wrappers (as the mutex is
  in the Document now).
+ Modifications to SharedPtr<> to be more like C++0x shared_ptr<>.
2011-03-22 21:11:25 -03:00
David Capello
42dbe7d026 Add reset(pointer,deleter_type) member function to UniquePtr. 2011-03-20 17:58:19 -03:00