Commit Graph

224 Commits

Author SHA1 Message Date
David Capello
63995c6f0a Merge "raster" namespace into "doc" library 2014-10-20 22:21:31 -03:00
David Capello
2b2d0f34b2 Add simpleini to replace Allegro 4 configuration routines 2014-10-16 21:27:25 -03:00
David Capello
21e700da4f Use fixmath lib in point shapes 2014-09-21 12:13:13 -03:00
David Capello
e133c341ff Add fixmath library 2014-09-21 11:51:24 -03:00
David Capello
897513264d Compile subprojects with C++11 flags 2014-08-15 00:26:27 -03:00
David Capello
f62356d410 Add compiler flags for C++11 so we can start using it 2014-08-14 00:40:01 -03:00
David Capello
ebca329112 Add support to compile with MSVC 64bits
It's not ready, the program crashes when it starts, but at least we can
compile for 64bits.
2014-08-12 07:01:21 -03:00
David Capello
1c324c9b14 Add experimental option to use native mouse cursors (and some renames of cursor names) 2014-08-10 19:51:14 -03:00
David Capello
81ffb0c5bd Refactor: Create doc::Context and move some logic from app::Document to doc::Document
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()
2014-07-29 00:53:24 -03:00
David Capello
31e565a2b0 Add "gen" utility to generate UI widget wrappers from XML files 2014-07-13 13:24:57 -03:00
David Capello
e09bb7d3f2 Fix file_tests 2014-07-06 22:10:48 -03:00
David Capello
738d6ec4ee Rename _unittest.cpp files to _tests.cpp 2014-06-28 10:49:38 -03:00
David Capello
7ffce344bd Add CUSTOM_WEBSITE_URL option to test a local webserver 2014-06-02 21:31:44 -03:00
David Capello
852aba87f8 Minor change in src/CMakeLists.txt to see if a unit test needs she library 2014-04-12 12:29:55 -03:00
David Capello
30af4e2620 Add trial-mode without save functionality 2014-04-10 00:33:28 -03:00
David Capello
2a70e750cd Add a basic model layer (doc-lib) 2014-03-12 19:25:09 -03:00
David Capello
ebc9fa55b1 MSVC: Add support for Windows XP platform 2014-01-05 22:37:53 -03:00
David Capello
8e81fb808d Add css library
This is a base library that will be used by SkinTheme to draw parts
with CSS styles (or something similar).
2013-12-03 19:31:36 -03:00
David Capello
e5ba8e0922 Encapsulate Image implementation (private members, accessors, iterators, etc.)
- Rename _rgba/_graya to raster::rgba()/graya()
- Add raster::color_t type (alias for uint32_t)
- Rename raster::GfxObj to Object. And GfxObj::getType() to Object::type()
- Move conversion from raster::Image/Palette to Allegro BITMAP/RGB
  to raster/conversion_alleg.h file
- Add raster/color_scales.h
- Rename image_* functions to raster/primitives.h
- Reimplement ink processing with templates instead of macros
2013-11-09 19:59:05 -03:00
David Capello
c88f9b172b Refactor: Move app files to src/app subdirectory inside app namespace
- 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
2013-08-05 21:20:19 -03:00
David Capello
b8c3d39c35 Add shading ink (for indexed images only) and color swatches (no UI yet) 2013-04-02 21:02:18 -03:00
David Capello
2364776c44 Add HTTP webserver feature (for testing only at the moment) 2013-03-31 00:36:00 -03:00
David Capello
bf745b1033 Add ContextBar in the MainWindow 2013-03-30 13:43:00 -03:00
David Capello
1d56133e75 Add support to split workspace views
+ Added WorkspacePart class
+ Added WorkspaceView::cloneWorkspaceView()/onClonedFrom() methods.
2013-03-27 21:19:35 -03:00
David Capello
02324f4cbb Refactor: move current frame/layer from Sprite class to Editor/DocumentView
This change is the first step to create a mini editor with the capability
to show the animation while we edit other frames. Also it will allow us
to have two or more editors of the same document in different frames.

- Added DocumentLocation: now the location in a document is a property
  of the current Context (Context::getActiveLocation()).
- Added ContextAccess/Reader/Writer classes.
- Added DocumentApi class: high-level API with the majority of methods
  in UndoTransaction class (that were not directly related to a undo
  transaction).
- Added AddFrame/RemoveFrame undoers to handle add/remove frame correctly:
  this fix issue #212.
- Removed SetCurrentLayer/Frame undoers.
2013-03-11 20:29:45 -03:00
David Capello
9b8e87da10 Update copyright year to 2013 2013-01-27 12:13:13 -03:00
David Capello
ed90055bf7 Replace modules/editors.cpp with widgets::Workspace class
Now we have one editor for each Document we want to edit. Before we were
creating one editor and switching the document on it, but now we have
several Editors (one for each opened Document). This simplifies the
Document implementation, because it doesn't need to know temporal
Editor information (like "preferred editor settings").

- Removed all code from modules/editors.cpp (legacy from C code).
- Removed PreferredEditorSettings class and
  Document::getPreferredEditorSettings().
- Added Workspace/WorkspaceView classes.
- Added DocumentView (a DocumentObserver).
- Added MiniEditorWindow class.
- Removed SelectFileCommand & CloseEditorCommand.
- Added TabView interface instead of using a raw void* in
  Tabs/TabsDelegate classes.
- Modified editors_draw_sprite() calls to Document::notifySpritePixelsModified
  notifications.
- The "current_editor" global variable wasn't removed because it's
  used in several places yet, but it will be removed in the near future.
  (Also this variable now can be NULL when we don't have an opened
  document.)
2013-01-20 18:40:37 -03:00
Ilya Barygin
9ba5ef44ca Fix FTBFS with --as-needed linker option
Libraries must be placed after object files in command line.
More information: https://bugs.gentoo.org/show_bug.cgi?id=445814

Conflicts:

	src/CMakeLists.txt
2013-01-01 21:12:22 -03:00
David Capello
f0d8703ad8 Add app::Project class to handle projects in the near future. 2012-09-13 19:57:37 -03:00
David Capello
6b4591c5fd Add shell mode to execute scripts interactively.
- Added Shell class.
- Added base::SystemConsole to adjust stdin/stdout on Windows platform.
2012-09-08 20:10:48 -03:00
David Capello
3c1ee303c6 Replace CheckArgs with app::AppOptions/base::ProgramOptions classes 2012-09-05 21:14:42 -03:00
David Capello
810b082500 Add scripting-lib (link with v8 when it's available) 2012-09-02 17:35:14 -03:00
David Capello
33e3b5c8d0 Fix unittests compilation for Windows. 2012-08-24 00:49:38 -03:00
David Capello
29898744fe Fix issue #160, crashes undoing critical actions like "remove layer" or "remove frame".
The OpenGroup & CloseGroup undoers now save the current SpritePosition
when the Undoer instance is created. Before we were using the current
Layer and Frame at the moment of the OpenGroup creation, it was generating
buggy undoers.
2012-08-23 21:44:41 -03:00
David Capello
f541fc8789 Add DataRecovery and Backup classes. They do nothing at the moment. 2012-08-22 21:05:02 -03:00
David Capello
3f7d7b00b7 Fix link problem with gcc compiler and loadpng library. 2012-08-18 17:51:37 -03:00
David Capello
25605d8c06 Fix UI unit tests: they must use/be linked to "she" library. 2012-08-18 17:51:26 -03:00
David Capello
3b99e73734 Rename "listener" to "observer" which is better to reference the "Observer" pattern. 2012-08-18 15:22:23 -03:00
David Capello
35f1249662 Add "she" layer.
This is the starting point to create a layer to isolate Allegro access.
In the future, we will be able to switch to SDL or Allegro 5 easily.
Anyway this will be a progressive refactoring.
2012-07-14 16:55:16 -03:00
David Capello
cd23721a97 Add MainWindow & MainMenuBar, and replace rootmenu module with AppMenus class.
Also the ToolBar widget was published in the toolbar.h header file.
2012-07-09 13:20:58 -03:00
David Capello
91bf74350e Rename ui::Frame to ui::Window. 2012-07-08 23:24:42 -03:00
David Capello
a35aa7559a Do not use the embedded libloadpng.
Add the option to use a shared libloadpng library.
Patch by Tobias Hansen <tobias.han@gmx.de>
2012-07-08 21:21:01 -03:00
David Capello
594a272c06 Add DocumentUndo to avoid app specific data in the undo library.
The UndoHistory was simplified, m_enabled/label/modification members
were removed because they aren't part of the undo library goal.
Now the "label" field is part of Open/CloseGroup undoers, and all undoers
must be enclosed in a group (this restriction is only for the app, the
undo library doesn't have this restriction). In this way, the
label/modification information is exchanged between an
OpenGroup <-> CloseGroup pair only.
2012-07-08 01:25:26 -03:00
David Capello
ebb8d0c5bd Replace deprecated "Monitor" struct from gui module with ui::Timers.
- Added ThumbnailGenerator class to avoid mixing the thumbnail generation
  code with FileList widget.
- Added IFileOpProgress for fop_operate() so we can update the job progress
  when the "file operation" progress changes.
2012-07-06 01:06:00 -03:00
David Capello
09ecf4c588 Remove src/widgets/editor/click.cpp and Editor::editor_click* member functions. 2012-06-17 22:58:31 -03:00
David Capello
51df7a3af6 Rename src/widgets/statebar.[cpp/h] to src/widgets/status_bar.[cpp/h]. 2012-06-17 22:56:40 -03:00
David Capello
55aca8567c Move src/gui/ to src/ui/ 2012-06-17 22:49:58 -03:00
David Capello
14dd4e7ae2 Add GUI library stuff into "ui" namespace (now ui-lib). 2012-06-17 22:02:54 -03:00
David Capello
6f91238264 Add support to load/save GIMP palettes (.gpl files). Issue #112. 2012-06-16 17:50:52 -03:00
David Capello
02e8c66da4 Remove signals and hooks in GUI code.
Several refactoring tasks where made:
- Removed the old Widget::id field (JID).
- Renamed Widget::get/setName to get/setId.
- Moved load_widget_from_xmlfile() to app::load_widget and WidgetLoader
  class.
- Removed jhook structure & jwidget_add_hook function. Hooks were replaced
  subclassing widgets.
- Added InitThemeEvent class and Widget::onInitTheme member function.
2012-06-15 23:37:59 -03:00
David Capello
3bbf7af991 Rename layer_new_flatten_copy() to create_flatten_layer_copy() and moved to src/flatten.cpp file. 2012-06-08 21:34:53 -03:00
David Capello
ccb4f11cc3 Add file_unittest.cpp with a basic test to load/save .ase file. 2012-05-19 16:22:55 -03:00
David Capello
78d3b80df3 Add ScopedAllegro class. 2012-05-12 23:25:36 -03:00
David Capello
27103a231f Convert group_button widget to ButtonSet class.
- Removed radio_button_new() function.
2012-04-19 20:33:57 -03:00
David Capello
55a4002ec5 Add posibility to scroll by-tiles using Ctrl+arrow keys (Paul Pridham idea).
+ Added ScrollCommand.
2012-04-04 00:49:13 -03:00
David Capello
58f5bbd4c0 Don't compile raster/path.cpp so libart header files are not required. 2012-03-22 19:01:05 -03:00
David Capello
ad9a5fde7a Add run_non_ui_unittests target to run tests that doesn't require X11 environment (thanks to Tobias Hansen). 2012-03-22 14:55:28 -03:00
David Capello
dfb43845a9 Updated src/allegro/src/config.c isn't necessary from Allegro 4.2.0.
ASEPRITE requires the following patch in config.c is:
http://alleg.svn.sourceforge.net/viewvc/alleg?view=revision&revision=4660
2012-03-22 13:31:40 -03:00
David Capello
a27d1d3eeb Remove deprecated dialogs: drawtext.cpp, playfli.cpp, repo.cpp. 2012-03-20 13:23:59 -03:00
David Capello
be82a49f86 Add option to compile using shared gtest library (thanks to Tobias Hansen). 2012-03-19 14:33:49 -03:00
David Capello
c6ad4a94c1 Fix find_library/path to find shared libcurl (thanks to Tobias Hansen) 2012-03-19 14:29:54 -03:00
David Capello
ae8d26bedf Replace find_library/path of giflib with find_package (thanks to Tobias Hansen). 2012-03-19 14:29:29 -03:00
David Capello
7befb6c830 Include ASEPRITE net library only when the updater is enabled. 2012-03-19 14:28:06 -03:00
David Capello
49614f6f41 Always add third_party/libpng to include directories (thanks to Tobias Hansen).
Because private libpng headers are used by loadpng and
src/file/png_format.cpp.
2012-03-19 14:27:00 -03:00
David Capello
7115806dc4 Create option to build with shared tinyxml (thanks to Tobias Hansen). 2012-03-19 14:04:24 -03:00
David Capello
d2b11dda2b Minor change in src/CMakeLists.txt 2012-03-19 13:24:34 -03:00
David Capello
c4c44bf7e2 Add support to compile with shared Allegro 4 library. 2012-03-19 13:24:15 -03:00
David Capello
71f044751f Add flags to link with giflib and curl shared libraries.
Removed freetype and libart in the linking process because they
are not used anymore (the source code is still in the repository).
2012-03-15 00:17:49 -03:00
David Capello
95a9524ec2 Avoid duplicated code to flip the image.
- Added raster::algorithm::FlipType enum and flip_image function.
- Added gfx/fwd.h for forward declarations.
2012-02-19 16:25:07 -03:00
David Capello
041140f528 Change "imgtype" int type to PixelFormat enumeration. 2012-02-12 23:21:06 -03:00
David Capello
bc32ded8a5 Add Ctrl+Tab and Ctrl+Shift+Tab keys to switch between tabs. 2012-02-12 11:33:06 -03:00
David Capello
ab333ff02b Remove the ScreenShot command. 2012-02-12 10:55:33 -03:00
David Capello
0d582f9d5f Improve the MovingPixelsState to support Enter and Esc keys to drop the pixels.
Also any executed command will drop the pixels and return the editor to
its standby state.
2012-02-06 00:17:42 -03:00
David Capello
354f6a15fa Add context listeners. 2012-02-02 20:05:26 -03:00
David Capello
b8fbaad7fb Replace Allegro Sprite Editor or ASE with ASEPRITE in all files. 2012-01-06 01:12:57 -03:00
David Capello
02a9d50524 Update copyright year to 2012. 2012-01-06 00:52:11 -03:00
David Capello
07edcdb1e2 Add transformation support (scale/rotate) to the selected area.
+ Added support to rotate images of IMAGE_BITMAP type.
+ Added transformation_handle & pivot_handle parts in sheet.png.
+ Added rotation cursors in sheet.png.
+ Added gfx::Transformation class and Document::m_transformation field.
+ Added StandbyState::Decorator and TransformHandles class to draw
  transformation handles.
+ Modified PixelsMovement class to support transformation handles.
+ Added new Linear Algebra library with Vector2d class.
2012-01-01 23:08:25 -03:00
David Capello
4f6c43edc5 Remove the editor's default state. Now the editor has a decorator property.
+ Removed Editor::setDefaultState.
+ Removed EditorState::getDecorator.
+ Added Editor::get/setDecorator.
+ Added EditorStatesHistory class and Editor::backToPreviousState() method.
+ Added EditorState::onBeforePopState event.
2011-11-13 20:40:19 -03:00
David Capello
b9b93e6869 Add ExpandCelCanvas to simplify ToolLoopImpl implementation. 2011-10-29 20:50:18 -03:00
David Capello
48000d6f48 Replace interactive_move_layer() with MovingCelState. 2011-10-29 16:25:47 -03:00
David Capello
8a9bb6c45c Add xpm icon for X11. 2011-09-06 19:37:35 -03:00
David Capello
d5dd899d3d Add "Export Sprite Sheet" command. 2011-08-07 22:24:21 -03:00
David Capello
0bddf2611c Add "Import Sprite Sheet" command (part of issue #4). 2011-07-31 22:55:52 -03:00
David Capello
dd65f0cf7f Replace "QuickReference" and "Donate" commands with "Launch". 2011-07-28 19:32:04 -03:00
David Capello
c35c258bd5 Fix problems compiling on Linux with GCC. 2011-07-27 23:08:54 -03:00
David Capello
04c675bd15 Merge branch 'ft-updater' 2011-07-27 22:10:49 -03:00
David Capello
d22d46fd2b Add ENABLE_UPDATER flag to disable the automatic updater. 2011-07-27 21:26:22 -03:00
David Capello
cf9a296e5d Add automatic check for updates with app::CheckUpdateThreadLauncher
and show notifications in StatusBar.
+ Added updater library.
+ Removed "Check for New Version" command.
2011-07-26 23:25:02 -03:00
David Capello
96d263f50e Move src/core/ to src/
+ Renamed cfg.cpp to ini_file.cpp
2011-06-29 22:51:46 -03:00
David Capello
ff481003c8 Now right-clicking a tab shows a popup-menu with useful options for the document.
+ Added OpenInFolder and OpenWithApp commands.
+ Added Launcher::openFolder.
+ Added document_tab_popup_menu.
2011-06-25 14:28:50 -03:00
David Capello
92a7b29e60 Add net-lib (HttpRequest/Response classes). 2011-06-12 10:50:30 -03:00
David Capello
7e6d25db88 Add curl library source code. 2011-06-02 21:03:03 -03:00
David Capello
5be14417f3 Convert menu widgets to Menu, MenuItem, MenuBox, and MenuBar classes. 2011-04-30 15:31:05 -03:00
David Capello
bda7f6c31d Add DropDownButton widget. 2011-04-30 15:31:03 -03:00
David Capello
7260fa20f9 Fix compilation of unit tests on Linux with pthreads. 2011-04-28 22:32:37 -03:00
David Capello
fc2fd9fdfd Rename SelectTileState to SelectBoxState. 2011-04-21 18:30:29 -03:00
David Capello
210e33f76a Improve "Canvas Size" command to show rulers to change the canvas size.
+ Added EditorDecorator and EditorState::getDecorator().
+ Added EditorPreRender and EditorPostRender classes.
+ Added Image::rectblend and image_rectblend functions to draw
  transparent rectangles.
+ Added SelectTileState and Ruler classes.
2011-04-21 17:39:43 -03:00
David Capello
5380877c4a Refactor Editor class to use a state design pattern.
+ Added EditorState and derived classes (StandByState, DrawingState, etc.)
+ Added StatusBarListener.
2011-04-10 20:15:17 -03:00
David Capello
70e76380aa Add mini-editor to see 1px preview when you zoom in.
+ Added EditorView widget.
2011-04-02 18:12:41 -03:00
David Capello
d547a05f4d Add EditorListeners. 2011-04-02 15:47:44 -03:00