Commit Graph

1032 Commits

Author SHA1 Message Date
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
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
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
David Capello
bb1151c0ac Rewrite the entire color selector as C++ class.
+ Added ColorSliders widget for RGB, HSV, and Grayscale sliders.
+ Added HexColorEntry to show a color in HTML format.
2011-03-01 22:50:49 -03:00
David Capello
2ac1d38d62 Avoid sending keys to gui manager when a popup frame is visible. 2011-03-01 22:37:00 -03:00
David Capello
fd7e95035b Add degree symbol in string representation of HSV colors. 2011-03-01 22:36:18 -03:00
David Capello
a2eab0553c Fix critical bug using "thumbnails" dead-pointer after calling "destroy_thumbnails". 2011-03-01 21:07:28 -03:00
David Capello
824c309c8f Fix issue #8: saving .gif files with transparent backgrounds
does not clear the previous frame.
2011-03-01 19:22:17 -03:00
David Capello
26715e1a08 Add Slider::getMinValue and getMaxValue. 2011-02-24 18:13:00 -03:00
David Capello
b0ff50ec0e New color-bar with scrollable palette-view.
+ Removed palette-view from Palette Editor.
+ Fixed problems pasting RGB values in #hex format and HSV sliders.
2011-02-23 19:29:57 -03:00
David Capello
22a45a9acb Include system.h because we need JI_CURSORS in skin_theme.h. 2011-02-20 20:29:34 -03:00
David Capello
344faeff00 Add Border(int) constructor. 2011-02-20 20:25:57 -03:00
David Capello
95fd6c697c Change SIGNAL_COLORBUTTON_CHANGE to ColorButton::Change signal. 2011-02-20 19:37:42 -03:00
David Capello
716aa05294 Change drawing code of ColorButton from JM_DRAW to onPaint(). 2011-02-20 19:01:34 -03:00
David Capello
4e0ad7f839 Modify short color format in Color::toFormalString(). 2011-02-20 18:59:41 -03:00
David Capello
dea3962502 Remove deprecated colorviewer widget. 2011-02-20 18:40:16 -03:00
David Capello
ad12af7c8b Refactor the entire view widget to View, Viewport, and ScrollBar C++ classes. 2011-02-20 18:35:21 -03:00
David Capello
88112b7ffe Add some operators+(Border) to Border class and Border::getSize() member function. 2011-02-19 23:44:48 -03:00
David Capello
e2848f1f55 Add support for vertical-scrolling with mouse wheel in PaletteView widget. 2011-02-19 23:44:17 -03:00
David Capello
b2ff34909f Remove quick-menu stuff (used only in old jinete examples): 2011-02-19 23:11:40 -03:00
David Capello
d1baef1555 Add text-color to Label widget. 2011-02-19 23:08:15 -03:00
David Capello
96095159bb Include new src/gui/*.h header files in src/gui/gui.h. 2011-02-19 22:50:54 -03:00
David Capello
9b2cf15e94 Remove COLOR_SIZE macro in palette_view.cpp. 2011-02-19 22:41:09 -03:00
David Capello
e309656737 Add PaletteView::IndexChange signal (to replace SIGNAL_PALETTE_EDITOR_CHANGE). 2011-02-19 22:40:46 -03:00
David Capello
d72909e130 Change "images" variable in ji_move_region() from JList to std::vector. 2011-02-16 00:13:18 -03:00
David Capello
3617ae9242 Change "thumbnails" variable in src/util/thmbnail.cpp from JList to std::vector<> type. 2011-02-16 00:07:09 -03:00
David Capello
69b7e2f8f7 Change StatusBar::m_progress from JList to std::vector<> type. 2011-02-16 00:03:56 -03:00
David Capello
9e687d84b0 Add shortcut in the tool-tip of ToolBar. 2011-02-15 09:55:44 -03:00
David Capello
82931688ad Fix position of tool tip in tool-bar. 2011-02-15 09:50:53 -03:00
David Capello
9658fc3747 Fix problem painting a new tip window (with alpha) over a dirty (non-validated) area in tool-bar. 2011-02-15 09:50:14 -03:00
David Capello
cb2eb74ff0 Add ArrowAlign to TipWindow so the tip is pointing to some widget. 2011-02-15 09:02:51 -03:00
David Capello
f96d1f7fa3 Move jwidget_init_theme() to Widget::initTheme(). 2011-02-15 09:00:29 -03:00
David Capello
5de5cfc8e1 Add Them::paintTooltip and changed the tooltip skin with rounded borders and shadow.
+ Move all parts definition to src/skin_parts.h.
2011-02-14 22:50:39 -03:00
David Capello
01f3f9ffab Use Graphics pointer in PopupFrame/TipWindow::onPreferredSize/onPaint events.
+ Add Graphics::drawString/fitString/drawStringAlgorithm.
2011-02-13 23:16:10 -03:00
David Capello
deae4d820a Setup the widget's font in Graphics created for PaintEvents. 2011-02-12 21:33:14 -03:00
David Capello
a33f10373c Add ScreenGraphics to get a "Graphics" to draw directly onto the screen. 2011-02-12 21:32:43 -03:00
David Capello
fe50b6a30a Change painting code of some widgets from JM_DRAW to onPaint().
This need future work to avoid using ji_screen and access to the
drawable area only through Graphics pointer inside the PaintEvent.
2011-02-12 09:32:57 -03:00
David Capello
890ec324f9 Add Widget::setDoubleBuffered(bool) to use double-buffering method
automatically when ji_screen == real screen. Activate this attribute
for palette editor sliders.
2011-02-05 16:26:01 -03:00
David Capello
86fb4c0f90 Change Slider paint code from JM_DRAW message handler to onPaint() method.
+ Rename Theme::draw_slider -> paintSlider(PaintEvent&)
+ Add methods in Graphics to draw images, rectangles, and text.
+ Add IntersectClip class.
+ Add Widget::getClientBounds().
+ Modify ISliderBgPainter::paint to receive a Graphics instead of BITMAP.
+ Add more methods in SkinTheme to draw theme parts in Graphics.
2011-02-05 12:03:22 -03:00
David Capello
56c8d34237 Minor changes in font.h (format). 2011-02-02 00:42:19 -03:00
David Capello
a7ea661ad0 Overload gfx::Border class operators to increment/decrement border size. 2011-01-30 23:18:52 -03:00
David Capello
f8e940d7a4 Sort #include lines in gui.h. 2011-01-30 20:38:07 -03:00
David Capello
e1e4adf68d Add unit tests for gfx::Rect class. 2011-01-30 20:03:25 -03:00
David Capello
7273b95b68 Rename Rect::inflate() -> enlarge() and Rect::deflate -> shrink(). 2011-01-30 20:03:10 -03:00
David Capello
2baa342a65 Remove "j" prefix from some files in gui library. 2011-01-30 19:12:10 -03:00
David Capello
69fa03dcd7 Avoid deprecated allegro functions. 2011-01-28 04:55:55 -08:00
David Capello
6ef082ad7f Rename PalEdit to PaletteView widget to avoid confusion with the palette editor command. 2011-01-28 09:28:54 -03:00
David Capello
ed2c870059 Replace draw_bounds_template() macro with SkinTheme::draw_bounds_template member function. 2011-01-28 09:13:43 -03:00
David Capello
1738a93fca Add Widget::get/setBorder(). 2011-01-27 23:30:11 -03:00
David Capello
034a943a0c Add gfx::Border class. 2011-01-27 23:29:46 -03:00
David Capello
40df2e1d73 Minor change in event.h. 2011-01-27 18:38:27 -03:00
David Capello
85203205b8 Add PaintEvent and Graphics (future replacement of JM_DRAW message). 2011-01-27 18:38:16 -03:00
David Capello
5eba876fce Minor changes in jintern.h 2011-01-27 17:21:43 -03:00
David Capello
5a9d991219 Convert jalert to Alert C++ class. 2011-01-27 17:21:33 -03:00
David Capello
f558666056 Move src/gui/jalert.h to src/gui/alert.h. 2011-01-27 00:29:54 -03:00
David Capello
8ae24b5a58 Refactor jimage widget to ImageView C++ class. 2011-01-27 00:18:47 -03:00
David Capello
8b67fd0bf3 Convert jgrid widget to C++ Grid class (avoid reallocs, use std::vector for internals instead). 2011-01-26 19:51:52 -03:00
David Capello
d8a3d27c0f Convert jbox widget to Box class. 2011-01-24 19:48:09 -03:00
David Capello
e32d8dc633 Rename src/gui/jview to src/gui/view. 2011-01-24 18:09:54 -03:00
David Capello
58b2c1bcd0 Improve palette editor's RGB/HSV sliders.
+ Added SkinSliderProperty and ISliderBgPainter to draw a customized background in sliders.
+ Moved SkinTheme to src/skin/ directory.
2011-01-24 00:03:38 -03:00
David Capello
18db7513a8 Open new sprites in the center of the current sprite. 2011-01-23 21:15:00 -03:00
David Capello
73d7c608a1 Convert "list" collection in "move_focus" function to std::vector. 2011-01-23 20:35:27 -03:00
David Capello
048bdbfb36 Convert "timers" collection to std::vector (to avoid using a raw array of pointers). 2011-01-23 20:33:22 -03:00
David Capello
f018ab64df Move "Constant Frame Rate" as a menu option under "Frame" menu (before it was a button in "Sprite Properties" dialog).
+ Added "frame" parameter to FrameProperties command.
+ Removed the global function dialogs_frame_length().
2011-01-23 20:27:52 -03:00
David Capello
749ff05ef7 Add support to load only the first frame of the animation (used in file selector's preview). 2011-01-23 19:35:22 -03:00
David Capello
36e605bdf2 Move jmalloc/jfree to base/ library as base_malloc/free (remove new/new0/renew macros). 2011-01-23 19:19:18 -03:00
David Capello
88f442b831 Avoid memory leaks from GuiXml singleton. 2011-01-22 20:30:44 -03:00
David Capello
1e88a438eb Rename PopupWindow to PopupFrame. 2011-01-22 11:28:40 -03:00
David Capello
05cc6f6ba6 Remove jwidget_close_window function. 2011-01-21 23:49:07 -03:00
David Capello
75e618c6fa Remove jwidget_send_message. 2011-01-21 23:33:56 -03:00
David Capello
cb6d70521f Replace jwidget_dirty/invalidate and Widget::dirty functions with new Widget::invalidate* member functions. 2011-01-21 19:45:04 -03:00
David Capello
86e145f0ed Remove jwidget_get_parent/manager/parents/children/pick/has_child functions. 2011-01-21 18:54:47 -03:00
David Capello
74b7442ae4 Replace jwidget_get/set_theme with Widget::get/setTheme. 2011-01-21 18:08:25 -03:00
David Capello
e9f7a035b1 Remove jtheme and JTheme types, use Theme class directly.
+ Added CurrentTheme namespace.
+ Rename Theme::regen() to Theme::onRegenerate().
+ ji_regen_theme() is in Theme::regenerate() member function.
2011-01-21 17:50:04 -03:00
David Capello
fc263ddb88 Move SkinneableTheme in src/modules/ directory to SkinTheme in src/. 2011-01-21 17:29:45 -03:00
David Capello
44c1c9720c Remove standard theme from gui/ directory (old ASE 0.7.2 look). 2011-01-21 17:22:05 -03:00
David Capello
e6c2fdd6ed Move pen_type.h to raster directory. 2011-01-21 17:16:21 -03:00
David Capello
45855b88d3 Move "AseException" to "base::Exception" class.
+ Created XmlException for tinyxml parsing errors.
+ Moved functionality of AseException::show() to Console::showException().
2011-01-20 23:33:57 -03:00
David Capello
cf2f042cbf Rename CommandsModule::get_command_by_name to getCommandByName. 2011-01-20 20:49:03 -03:00
David Capello
3887173fac Rename all commands to camel case. 2011-01-20 20:46:58 -03:00
David Capello
af3c4e9fba Move CommandFactory class from command.h to command_factory.h. 2011-01-20 20:02:54 -03:00
David Capello
8e8ac7aa50 Refactor all member functions of Context class to camel case. 2011-01-20 19:58:11 -03:00
David Capello
bf395fca61 More updates for copyright year to 2011. 2011-01-20 18:32:31 -03:00
David Capello
e914c9ad6a Rename ase_exception to AseException. 2011-01-20 18:03:11 -03:00
David Capello
e9bc81cc1d Add transparent color index in sprite and .ase files (it does not work in render operation yet). 2011-01-20 17:17:35 -03:00
David Capello
677fa5d4e0 Minor change: Remove one #include from render.cpp. 2011-01-20 17:13:31 -03:00
David Capello
d6eb20ef7e Update copyright year to 2011. 2011-01-18 20:49:53 -03:00
David Capello
c2e831d009 Use giflib to load gif files.
With this changes a lot of bugs loading different kind of .gif
files are fixed. GIF files must be loaded as RGBA images to
support background color and different transparent color per
frame combinations.
2011-01-18 20:42:43 -03:00
David Capello
f53b0d5816 Use a SharedPtr to delete automatically the optimized palette in fop_operate(). 2011-01-18 20:35:44 -03:00
David Capello
53896f9bfb Avoid to create an optimized palette for RGB images if the same loading process creates one.
+ Added Palette:isBlack member function.
2011-01-18 19:30:42 -03:00
David Capello
b82ec86994 Fix bug in SpriteImpl::resetPalettes() using an invalid "end" iterator after erasing an element from the m_palettes collection. 2011-01-18 19:22:03 -03:00
David Capello
75fd21164e Fix color_utils::color_for_image() when the color is of index type and the imgtype is indexed. 2011-01-18 19:21:36 -03:00
David Capello
ae918802e3 Minor changes in CelPropertiesCommand (remove buf[] local variable using Widget::setTextf). 2011-01-18 19:20:57 -03:00