Commit Graph

172 Commits

Author SHA1 Message Date
David Capello
ec99866a23 Fix region_tests compilation (as now it depends on pixman library) 2014-10-29 10:37:44 -03:00
David Capello
0cf597c0f4 Add dependency with pixman library 2014-10-25 22:22:58 -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