Commit Graph

1003 Commits

Author SHA1 Message Date
David Capello
8716214718 Add SetLoopSection command and F2 keyboard shortcut (close #491) 2014-11-08 19:57:46 -03:00
David Capello
ccf563c4dd Fix mini editor animation playback when we're drawing (inside a ToolLoop)
We've to show the document's extra cel only if we are in the current layer
and frame.
2014-11-08 17:03:29 -03:00
David Capello
5e2cefe212 Merge branch '1.0'
Conflicts:
	src/app/commands/cmd_sprite_size.cpp
	src/app/document_exporter.cpp
2014-11-07 19:30:39 -03:00
David Capello
cd913f7619 Do not center editor scroll by default when we zoom with keys or zoom tool 2014-11-07 19:11:23 -03:00
David Capello
ce962f4999 Add more command line options to export or convert sprites
Added --save-as, --scale, --split-layers, and --import-layer command line
options.
2014-11-06 21:04:32 -03:00
David Capello
39b8e034b5 Merge branch '1.0'
Conflicts:
	.gitmodules
	CMakeLists.txt
	src/CMakeLists.txt
	src/app/app.h
	src/app/app_menus.cpp
	src/app/commands/cmd_move_mask.cpp
	src/app/commands/cmd_rotate.cpp
	src/app/modules/gui.cpp
	src/doc/resize_image_tests.cpp
	src/ui/accelerator.cpp
	third_party/CMakeLists.txt
2014-10-30 01:06:27 -03:00
David Capello
d39397f4d1 Minor change in KeyItem::restoreKeys() logic 2014-10-29 23:50:58 -03:00
David Capello
d90150fed9 Move button to delete shortcuts from SelectAccelerator to KeyItem 2014-10-29 22:06:25 -03:00
David Capello
f939ef5f02 Add keyboard shortcuts customization (close #253)
Changes:
* Add KeyboardShortcutsCommand and window
* Add SelectAccelerator window
* Replace modules/gui.cpp functions with app::KeyboardShortcuts and
  app::Key with the logic to load/save/handle keyboard shortcuts
* Change ui::Accelerator concept: now it represent just one keyboard
  shortcut, not a set of shortcuts
* Remove ui::Accelerator from ui::MenuItem, now the key is associated
  in app::AppMenuItem and it's a app::Key
* Add Command::onGetFriendlyName() to get a user friendly name of the
  command depending on its parameters
2014-10-29 11:58:03 -03:00
David Capello
c6aedc117a Add Alt+Shift+G shortcut to toogle the pixel grid visibility (fix #504) 2014-10-26 00:48:15 -03:00
David Capello
736f08099b Merge branch '1.0' 2014-10-25 16:20:33 -03:00
David Capello
d68f1fa1b8 Add experimental option to flash the selected layer when Up/down array keys are used (fix #111) 2014-10-25 16:04:39 -03:00
David Capello
bfe7a637da Remove unused variables 2014-10-25 14:57:49 -03:00
David Capello
bb24d8b995 Add option to enable/disable automatic menu bar items popup (related to issue #501) 2014-10-25 11:24:29 -03:00
David Capello
66d88ffe5d Merge branch '1.0' 2014-10-24 18:51:16 -03:00
David Capello
4188fa1408 Add ReverseFramesCommand (fix #503) 2014-10-24 11:37:52 -03:00
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
5d3d96d2d9 Minor changes: remove unnecessary dependencies with allegro.h 2014-09-21 11:59:39 -03:00
David Capello
c5a568cd15 Generate mouse/key events from polling in she module instead of ui module 2014-09-19 10:12:05 -03:00
David Capello
546d3af5e8 Fix problems clearing background cels
- The background color to clear is calculated in one place: DocumentApi
- Rename RemoveCel command to ClearCel
2014-09-17 09:53:25 -03:00
David Capello
77a66c1b87 Simplify DocumentApi::clearMask(): we just need the "cel" param 2014-09-12 02:05:32 -03:00
David Capello
4e6e50194e Remove bgcolor param from DocumentApi::backgroundFromLayer() 2014-09-12 01:58:33 -03:00
David Capello
64a841a1d6 Remove unused variables 2014-09-09 08:49:52 -03:00
David Capello
eb1fd4ff0d Fix #67: Per-image grid settings 2014-09-08 23:08:06 -03:00
David Capello
d14a0fe075 Add "Size" options in CanvasSizeCommand to specify width/height
- Added canvas icons to change the expansion direction in CanvasSizeCommand
- Added Widget::at() and Widget::offerCapture() member functions
- Improved ButtonSet widget
2014-09-08 02:27:41 -03:00
David Capello
10eddb0d9e Avoid crash if FilterWorker cannot lock the current sprite to write it (fix #478) 2014-09-03 00:34:31 -03:00
David Capello
7d89167e00 Add right-click to ui::Entry to show edit popup menu (cut/copy/paste) 2014-08-31 22:51:17 -03:00
David Capello
bde2ddbe83 Remove ji_screen and ji_clock global variables
- Replace JI_SCREEN_W/H with ui::display_w/h()
- Remove GfxMode class
- Move drawing code of ColorCurveEditor widget to onPaint()
- Rename ji_clock -> ui::clock()
2014-08-31 14:17:49 -03:00
David Capello
55fca6a89f PalettePopup: Show three buttons: "Load", "Set as Default", and "Open Folder"
This is to show the "Set as Default" option when there is an open
document.
2014-08-29 09:42:07 -03:00
David Capello
5ea5d0d92f Add special mode (xor black/white) for selection tool (fix #301)
This change includes a blend mode for the document extra cel, but it's not
used to fix the issue.
2014-08-27 09:43:42 -03:00
David Capello
58b3e09d86 Remove all "infinite scroll" stuff to avoid changing mouse position (fixes #350)
Changing the mouse position isn't user-friendly in desktop apps, and
has several problems in some platforms (Mac OS X). In this way we've
changed the approach to handle the mouse position when it goes outside
the ui::Editor viewport.
2014-08-25 22:49:19 -03:00
David Capello
8e44e0fbab Do not change mouse position in PreviewCommand 2014-08-25 21:49:37 -03:00
David Capello
d4f056100b Now we can rotate the current cel or a range of cels (related to issue #161) 2014-08-25 09:06:38 -03:00
David Capello
27cfd60d1b Now we can flip several cels at the same time 2014-08-25 08:36:00 -03:00
David Capello
16ba5920a1 Change "outline" to "boundaries" in MoveMaskCommand 2014-08-24 23:33:13 -03:00
David Capello
da1b7097c6 Clear background layer too in "New Empty Frame" 2014-08-24 20:18:32 -03:00
David Capello
6c571adbd4 Add Alt+B shortcut to create new empty frames 2014-08-24 18:01:52 -03:00
David Capello
07e51897d3 OptionsCommand: fix the crash folder location 2014-08-24 00:19:14 -03:00
David Capello
be0b7de49e Remove unused LaunchCommand functionality to open files from docs/ 2014-08-24 00:10:15 -03:00
David Capello
ddaacd2f7b Fix #11 - now we support all formats to load/save palettes
Also we've removed dependency with Allegro code to load/save palette files.
2014-08-21 23:39:20 -03:00
David Capello
5b4ca4f061 Minor change in cmd_refresh.cpp 2014-08-20 09:22:38 -03:00
David Capello
44c6f9400e Add a notification to report the last crash 2014-08-20 00:11:19 -03:00
David Capello
154382e244 Fix issue #449: now we can delete frames/layers/cels with delete key/command 2014-08-19 22:19:55 -03:00
David Capello
9a15126682 Fix issue 188: Pick foreground color with right mouse button 2014-08-19 08:17:57 -03:00
David Capello
51ab478f49 Fix order of members initialization detected by clang 2014-08-17 20:38:55 -03:00
David Capello
5075c1f86f Remove unused variables/code 2014-08-17 20:37:12 -03:00
David Capello
fbda63704f Fix initialization order in PaletteEntryEditor 2014-08-15 00:27:12 -03:00
David Capello
dfc1ecd2da Use #pragma warning only in MSC compiler 2014-08-14 23:38:06 -03:00
David Capello
6824570c4b Remove base/override.h (use override keyword directly) 2014-08-14 23:07:47 -03:00
David Capello
6db36fe30b Add ZoomCommand so zoom keys are configured in gui.xml file 2014-08-13 00:22:29 -03:00
David Capello
414427e879 ExportSpriteSheet: setup text of columns/width/height when the other fields are modified 2014-08-12 08:12:16 -03:00
David Capello
f0fa34cf4a ExportSpriteSheet: fix getting the best fit size for long animations 2014-08-12 08:09:09 -03:00
David Capello
70f4354f88 Fix initial sprite sheet type in Export Sprite Sheet dialog 2014-08-11 11:48:36 -03:00
David Capello
a2ba77fa1d Fix horizontal/vertical export sprite sheet 2014-08-11 11:48:07 -03:00
David Capello
df3c16b802 Add more options to export sprite sheet (e.g. best fit for texture) 2014-08-11 11:33:17 -03:00
David Capello
c936a792ab Add export_sprite_sheet.xml widget 2014-08-11 07:27:10 -03:00
David Capello
a767eb187d Add layer_properties.xml widget 2014-08-11 06:57:22 -03:00
David Capello
d11900cdef Use generated widget app::gen::DuplicateSprite in DuplicateSpriteCommand 2014-08-11 06:55:51 -03:00
David Capello
7550db81ba Fix issue 446 crash calling replace color in a sprite with no layers
- Fix access to a NULL pointer in ReplaceColorFilterWrapper
- Fix typo in NoImageException
- Do not allow to remove all layers in RemoveLayerCommand
2014-08-11 06:54:14 -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
f48440fe71 Use the generated app::gen::Options widget for OptionsCommand 2014-08-10 01:12:31 -03:00
David Capello
33706ce6ff Fix issue 408 saving the Import Sprite Sheet window position 2014-08-09 21:54:12 -03:00
David Capello
303595689f Use generated widget app::gen::NewSprite in NewFileCommand 2014-08-09 21:45:07 -03:00
David Capello
2c675bfc4f Fix crash in PreviewCommand
We cannot use the ui::Graphics internal surface directly when we use
raster::convert_image_to_surface() (it expects an Rgba surface).
2014-08-09 21:33:38 -03:00
David Capello
93c6967409 Show mini editor window again after PlayAnimationCommand 2014-08-09 18:37:23 -03:00
David Capello
a5d6af7d87 Fix issue 426: The user should not be able to change cel opacity in Indexed images 2014-08-09 18:04:53 -03:00
David Capello
ff493552aa Capture mouse in PreviewCommand 2014-08-09 17:31:22 -03:00
David Capello
1e84c63042 Use ui::Window to show the animation playback instead of a custom event loop 2014-08-09 17:14:56 -03:00
David Capello
7faf8a1bb7 Fix crash in ClearCommand removing empty cels 2014-08-09 11:25:40 -03:00
David Capello
67f9354b3d Update about dialog 2014-08-09 11:05:13 -03:00
David Capello
6ccd95e22d Use a desktop Window in PreviewCommand to avoid a special events loop 2014-08-09 10:37:51 -03:00
David Capello
dfaf097b88 Rename base/compiler_specific.h to base/override.h 2014-08-09 08:08:20 -03:00
David Capello
5b5a2cfd9f Add support to copy and paste layers between different documents 2014-08-08 10:33:45 -03:00
David Capello
626ec1d2ba Add MoveTaskCommand: now you can move the selection with Shift+arrow keys 2014-08-08 01:00:02 -03:00
David Capello
9fd60f1119 Move Timeline logic to drag-and-drop ranges to app::DocumentRange/move_range/copy_range
This fixes issue 433.
2014-08-07 20:19:31 -03:00
David Capello
c104b4812d Add doc::Settings to get the undo limit (or other settings that will be in the logic/doc layer) 2014-07-31 00:19:58 -03:00
David Capello
91b0c2d071 Refactor: Remove "get" part for member functions that act like a simple getter
Additional change:
- Added Cel::image() to get the related image of the cel directly
2014-07-30 01:28:15 -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
a20bb2d4d7 Change Timeline logic to work with LayerIndex instead of inverted UI indexes
This is a work-in-progress, dropRange() must be reimplemented. Now that
the Timeline uses LayerIndex, we could change Timeline::Range to
DocumentRange and create unit tests for the logic side.
2014-07-24 23:50:45 -03:00
David Capello
411ceda0e7 Add options to save GIF files (how to quantize palettes mainly)
* Added "context" parameter to save/load routines so we can test them.
2014-07-19 22:01:39 -03:00
David Capello
4a17ee351c Minor changes in cmd_goto_frame.cpp 2014-07-06 21:48:46 -03:00
David Capello
fa760d8a21 Restore filename if "save as" fails 2014-07-06 21:29:36 -03:00
David Capello
331688bd86 Add "Zoom with Scroll Wheel" option (on/true by default) 2014-06-22 22:35:51 -03:00
David Capello
0c250df97a Separate Options dialog in different sections
* Add ui::Panel widget
2014-06-22 21:56:04 -03:00
David Capello
9ac51fd0be Rename raster::Pen -> raster::Brush 2014-06-14 15:09:43 -03:00
David Capello
3c959233b6 Add link label in Options dialog to locate the configuration file 2014-06-13 23:00:49 -03:00
David Capello
b54ed9cfe7 Minor change in About dialog 2014-06-13 22:56:21 -03:00
David Capello
6924990992 Simplify slot disconnections with the new Connection and ScopedConnection classes 2014-06-12 22:29:19 -03:00
David Capello
47b5a973e9 Fix issue #405 - crash after merge down
We were deleting the destination cel if there weren't a source cel.
2014-06-09 22:07:24 -03:00
David Capello
f91f41a425 NewFile command: Don't change palette in grayscale images 2014-06-01 18:10:52 -03:00
David Capello
76afcfedac Change current palette after undo/redo 2014-06-01 18:10:26 -03:00
David Capello
a15aea5ed7 Add timeline options for onion skin, loop section, and animation direction
- Add red/blue onion skin type
- Add app::calculate_next_frame() function to calculate the next frame
  depending of the timeline configuration (loop range, animation direction)
- Add app::finder() to simplify the access to widgets loaded from xml files
2014-05-17 21:27:44 -03:00
David Capello
3c2e01b5d8 Replace the dummy developer "console" with a WorkspaceView
This is completely experimental stuff. Just added this because the previous
window doesn't make sense.
2014-05-09 01:01:59 -03:00
David Capello
695243006f Don't show onion skin in the mini editor 2014-05-08 08:50:21 -03:00
David Capello
391a5c0bf4 Add command to switch onion skin visibility 2014-05-08 08:47:45 -03:00
David Capello
a6d900fc2c Fix several old issues with indexed images and transparent color
- If we use a RGB color in a background layer (indexed image),
  and the first palette entry (transparent color) matches that RGB color,
  we can use that entry, because this is the background (the transparent
  color isn't transparent at all in the background layer).
- If we use the same RGB color in a transparent color, we've to avoid the
  transparent color, because the user want to paint with that specific
  solid color.
- Palette::findBestfit() receives a mask_index now, so we can find what
  color best matches a specific RGB avoiding that specific mask color,
  or we can use -1 to use any color (e.g. for background layers).
- Added app::ColorTarget() to simplify and fix color_utils::color_for_layer
  and app_get_color_to_clear_layer(), so now we can use the new findBestfit
  to return the transparent color for background layers (if a RGB color
  matches the transparent color RGB values).
- Removed fixup_color_for_layer/background() functions in color_utils
- Fix NewImageFromMask() to use the mask color to clear the image
- Improve the Editor pen preview (cursor.cpp) to draw the bounds of the
  pen when it will paint with the transparent color.
2014-05-08 00:30:36 -03:00
David Capello
5a45d1ec23 Remove the number of colors entry field from "New Sprite" dialog
This field is disabled, and the program isn't ready to support less than
256 colors in Indexed mode, so it's better if we remove this field to avoid
confusion.
2014-05-06 00:08:43 -03:00
David Capello
fa204baf42 Easier way to reference the program website in commands 2014-05-05 21:28:58 -03:00
David Capello
b991f3b42e Rename cmd_change_image_type.cpp to cmd_change_pixel_format.cpp 2014-05-03 16:27:11 -03:00
David Capello
0eb8e344bb If the save process fails, mark the document as modified 2014-05-03 16:25:39 -03:00
David Capello
3e70c5316d Add undo information when the sprite transparent color is modified 2014-05-02 20:00:26 -03:00
David Capello
66564e354f Fix issue #394 - crash when we cancel the file save operation
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).
2014-05-02 17:04:55 -03:00
David Capello
aaa662cf23 Implement CelProperties commands using DocumentApi::setCelOpacity 2014-05-02 12:10:29 -03:00
David Capello
f60d1c5c4f Add "Cancel" option to cel_movement_popup (popup when you move cels in the Timeline) 2014-05-02 11:55:44 -03:00
David Capello
d470a6b78a Fix Clear command to delete the selection first when the range is enabled in one frame/one layer 2014-04-29 01:19:39 -03:00
David Capello
4d48e40484 Fix RemoveLayer command so it's disabled when we have no more layers to remove 2014-04-29 01:01:25 -03:00
David Capello
5601b07df6 Fix NewFrame command so it's enabled even when we don't have layers 2014-04-29 01:00:15 -03:00
David Capello
3c4bbbe30c Replace jwidget_set_min/max_size() with Width::setMin/MaxSize() 2014-04-21 22:15:29 -03:00
David Capello
b33357ed46 Remove base::string (std::string is good enough for utf8 strings) 2014-04-20 19:53:27 -03:00
David Capello
2e9751fef1 Rename base::file/directory_exists() to base::is_file/directory() 2014-04-17 17:12:55 -03:00
David Capello
f9612eb666 Merge branch 'dev' of git@github.com:aseprite/aseprite.git into gfx 2014-04-17 16:13:55 -03:00
David Capello
3dfc07b724 Remove ui::jwidget_set_border() function 2014-04-17 15:55:55 -03:00
David Capello
ed5a2d9570 Replace jwidget_noborders() with Widget::noBorderNoChildSpacing() 2014-04-17 15:44:33 -03:00
David Capello
a2753fd898 Add missing OVERRIDE modifier to OpenFileCommand member functions 2014-04-17 01:35:31 -03:00
David Capello
283d883d37 Add SetPaletteCommand 2014-04-17 01:29:58 -03:00
David Capello
ad4e08c8f5 Fix issue 98: The mini editor blacks out part of the screen when viewing an animation 2014-04-13 22:57:59 -03:00
David Capello
8ae3b3075d Simplify ResourceFinder API 2014-04-12 13:35:55 -03:00
David Capello
71b7000c8a Update links 2014-04-12 12:28:34 -03:00
David Capello
942dba36fd Timeline: add support to move/copy ranges (multiple cels/frames/layers)
- Merge Timeline::STATE_MOVING_LAYER/CEL/FRAME to STATE_MOVING_RANGE.
- Remove celmove.h/cpp and move_cel/copy_cel functions. Now they are
  in the Timeline as dropRange/Cels/Frames/Layers member functions.
- Add DocumentApi::copyFrame/moveCel/copyCel member functions.
- Add timeline_drop_layer_deco and timeline_drop_frame_deco skin parts.
- Move code from DuplicateLayerCommand::onExecute() to new member
  function DocumentApi::duplicateLayer().
- Fix a bug changing Cel's frame number: we weren't updating the Cel
  position properly inside the LayerImage::m_cels collection. Now we use
  LayerImage::moveCel() to change the Cel frame number.
- Other fixes to DocumentApi: Change bgcolor from int to color_t.
2014-04-09 21:56:06 -03:00
David Capello
f4b2b47a2c Add #pragma once 2014-03-29 19:40:17 -03:00
David Capello
44d3e228fd Add missing OVERRIDE modifier to Command::clone() overrides
It fixes some invalid clone() overrides without const modifier.
2014-03-29 17:08:40 -03:00
David Capello
b16bf981d0 Implement issue #265 - command/keyboard shortcut for "last export" operation
- 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".
2014-03-29 16:58:35 -03:00
David Capello
f3bfae7ad5 Fix issue 353: don't show context bar when a new view is activated
Now we have three modes: normal mode (everything is visible), the first
intermediate mode (context bar+sprite editor+timeline), and advanced mode
(sprite editor only).
2014-03-21 23:29:01 -03:00
David Capello
0caf41c5fd Fix compilation warning in cmd_remove_layer.cpp 2014-03-21 23:00:31 -03:00
David Capello
fabb58e0ea Fix crash in "go to" commands, don't access to null layer 2014-03-16 21:56:18 -03:00
David Capello
c4605ad513 Enable "remove layer" command to remove all layers
We can remove all layers anyway from timeline selecting a range of layers.
2014-03-16 19:26:03 -03:00
David Capello
1b86d613bf Fix issue 360: Cannot save gif files
* SaveFile and SaveFileAs commands ask for removing read-only attribute
* Fixed base::open_file_descriptor_with_exception() to create new files
* Added internal base::Win32Exception
* Added unit tests for the creation of file descriptors
* Added base::delete_file, has_readonly_attr, remove_readonly_attr functions
2014-03-02 20:47:34 -03:00
David Capello
2462767aac Fix issue 337: Vertical flip and Horizontal flips functions affect more than selected area 2014-02-17 00:41:28 -03:00
David Capello
e082cd96f1 Make ScreenScale option configurable through UI 2014-02-08 00:19:20 -03:00
David Capello
e671508d85 Change infinite scroll implementation
Remove necessity of jmouse_x(1) and jmouse_y(1) calls.

- Renamed jmouse_control_infinite_scroll() -> ui::control_infinite_scroll()
- Renamed jmouse_set_position() -> ui::set_mouse_position()
- Added ui::get_delta_outside_box()
2014-02-02 18:46:19 -03:00
David Capello
c8c099864c Added "Grab Alpha" option to eye dropper (issue 134) 2014-01-28 23:56:44 -03:00
David Capello
eee1719109 Implemented issue 260: Scroll-bars for sprite editor 2014-01-26 13:28:11 -03:00
David Capello
400a2c1993 Timeline: Add support to delete several cels at once 2013-12-22 18:52:25 -03:00
David Capello
076be1f22f Timeline: fix problem setting the duration of a frame range 2013-12-22 16:30:04 -03:00
David Capello
85523ba63a Add ability to change the properties of several frames (a range of frames) at once 2013-12-22 12:19:03 -03:00
David Capello
b4d9e3c9ca Timeline: Add button and handles to configure onionskin range 2013-12-18 00:01:55 -03:00
David Capello
cb11fb3458 Add support to remove several layers & frames at once 2013-12-15 20:21:31 -03:00
David Capello
3c861f1a7e Show timeline automatically when a new frame/layer is created (configurable option) 2013-12-15 12:58:14 -03:00
Joel Madigan
dabcad1807 Add string::c_str() to several functions.
There were a number of places where a std::string was being used in a function calls that expected a c string.  These instances were trivally fixed by adding a call to string::c_str().

Note, I'm not sure if this is a GCC specific issue, however even if it is a case of MSVC simply letting these usages slide it can't hurt to be explicit.
2013-11-24 01:35:55 -05:00
David Capello
ad0b28bd63 Change Window() ctor to avoid ambiguity (DesktopWindow, WithoutTitleBar, or WithTitleBar)
In this way we know at the moment of the creation of the window if it
will need the close button.

Issue #280.
https://github.com/aseprite/aseprite/pull/6
2013-11-23 17:47:57 -03:00
David Capello
88d8235e86 Merge branch 'dev' of git@github.com:dacap/aseprite.git into dev 2013-11-21 00:28:16 -03:00
Joel Madigan
422f1135d3 Fix for issue 284, assertion error was being triggered by passing an int to a function expecting type Item*. Looks like it was an oversight in commit b45dcf7 when the dialog was modified to use ui::ListItem 2013-11-19 23:32:11 -05:00
David Capello
49cf2bdcf0 Fix issue #277, LoadPalette command can change the default palette 2013-11-15 17:01:28 -03:00
David Capello
ddf4a13490 Add the Palette menu with Load/Save commands 2013-11-15 16:56:50 -03:00
David Capello
2173da9fcd Move src/app/dialogs/maskcol.cpp to src/app/commands/cmd_mask_by_color.cpp
Finally src/app/dialogs directory is gone.
2013-11-10 18:34:52 -03:00
David Capello
b0cd01b425 Add the old "Animation Editor" as a timeline at the bottom of sprite editors (Workspace)
- Renamed AnimationEditor (dialogs/aniedit.h) to Timeline
  class (app/ui/timeline.h)
- Renamed FilmEditor command to Timeline
2013-11-10 18:27:11 -03:00
David Capello
01d79ddf9b Merge branch 'dev' of git@github.com:dacap/aseprite.git into dev 2013-11-09 20:00:16 -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
dbf4d0d490 Replace JRect/jrect struct with gfx::Rect
- Replaced Widget::rc -> Widget::m_bounds private member.
- Added Widget::offsetWidgets() method.
- Removed View::displaceWidgets().
2013-10-26 12:50:55 -03:00
David Capello
5b252c30f5 Add support for Unicode file names on Windows
- 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
2013-10-14 19:58:11 -03:00
David Capello
cde54f3682 Change BSD license to MIT in sublibraries and fix headers 2013-08-08 21:01:20 -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