Commit Graph

1216 Commits

Author SHA1 Message Date
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
David Capello
775357d04f Remove deprecated vectmap code. 2011-03-20 16:40:44 -03:00
David Capello
afd5ade856 Add find_unittests() in src/CMakeLists.txt to avoid compiling unittests
with all libraries as dependencies.
2011-03-18 00:26:08 -03:00
David Capello
cbf5c721f4 Add UniquePtr class. 2011-03-17 23:28:33 -03:00
David Capello
55c611c08b Convert Documents from std::list<> to a class. 2011-03-13 19:41:59 -03:00
David Capello
8d53d10a77 Renamed SpriteList to Documents. 2011-03-13 17:40:37 -03:00
David Capello
9b32ebdad6 Rename Undo class to UndoHistory. 2011-03-13 17:33:42 -03:00
David Capello
27cf3f2f63 Add explicit to CurrentSprite/Reader/Writer(Context*). 2011-03-13 16:38:26 -03:00
David Capello
a8d9636467 Refactor filters (effects).
+ Added Filter, FilterManager, and FilterIndexedData interfaces.
+ Moved all widgets related to filters to src/commands/filters.
+ Added the filters library.
+ Added FilterWindow and one derived window for each filter.
2011-03-13 15:50:31 -03:00
David Capello
d20bd1a31b Add <colorpicker> element for XML widgets. 2011-03-13 15:33:04 -03:00
David Capello
654d14eede Console::showException() does not modify the exception (added "const"). 2011-03-09 00:18:43 -03:00
David Capello
69a3070018 Minor changes in gui.cpp. 2011-03-08 23:25:06 -03:00
David Capello
e0edf5625f Use Widget::layout() instead of Widget::setBounds(getBounds). 2011-03-08 23:23:13 -03:00
David Capello
f36a0f22b1 Fix bug of hidden widgets when the frame is shown.
This is (probably) a fix for bug #3050538 in sf.net tracker.
2011-03-08 23:21:37 -03:00
David Capello
bd69a216bb Remove unreferenced local variable warning. 2011-03-08 23:18:18 -03:00
David Capello
bb7d3a0b71 Move jwidget_relayout() to Widget::layout(). 2011-03-08 23:18:04 -03:00
David Capello
f6c48645f9 Adjustments to TODO.txt file. 2011-03-08 15:36:22 -03:00
David Capello
0401f4abd4 Remove gui/base.h from sprite.cpp 2011-03-08 15:23:29 -03:00
David Capello
47669fe6f1 Add SpriteReader wrapper to lock the sprite when Editor paints it.
+ Fixed critical bugs using "sprite resize" command and drawing
  the current editor (fixed usage of invalid memory pointers).
  It happens because the resize command is executed in a background
  thread, and at the same time the user can cancel or move a progress
  dialog (generating redraw events to the editor).
+ Anyway this change incorporates some other problems with effects
  where they keep locked the sprite in the whole command execution,
  so the effect preview cannot be visualized. This will be fixed with
  a refactor of the entire effect/preview stuff.
2011-03-08 01:25:46 -03:00
David Capello
6319af1676 Fix problems restoring preferred scroll in selected sprite. 2011-03-06 18:23:57 -03:00
David Capello
cea3ade78a Minor changes: comments to C++ style. 2011-03-06 16:55:26 -03:00
David Capello
b02b86b613 Fix compiling on Linux when XDGA is detected (fixed issue #12). 2011-03-06 16:20:11 -03:00
David Capello
6d5531b998 Replace old gfx-data with graphics from the skin sheet.
+ Removed gfxdata.cpp file.
+ Removed get_gfx() from modules/gfx.h/cpp.
+ Added skin parts for each removed graphics of gfxdata.
+ Added IButtonIcon interface and an implementation for skin theme.
+ Removed "icon_buttons" from gui.cpp.
+ Now icons in button are set through set_gfxicon_to_button function.
+ Removed from Theme class check/radio_icon_size member variables
  (they are replaced with the new IButtonIcon interface).
+ Removed jdraw_inverted_sprite(), now each icon has it normal/selected
  version in the skin sheet.
2011-03-06 16:15:05 -03:00
David Capello
de47c6ff59 Rewritten palette editor using ColorSliders and HexColorEntry widgets. 2011-03-03 22:17:25 -03:00
David Capello
d7458bc78f Add ColorSlidersChangeEvent so ColorSliders::ColorChange signal
can receive the modified channel.
2011-03-03 22:16:54 -03:00