Commit Graph

48 Commits

Author SHA1 Message Date
David Capello
01dfe4d52e Replace kResizeMessage message with ResizeEvent and Widget::onResize()
- Remove jwidget_set_rect() function.
2013-05-11 17:56:27 -03:00
David Capello
3dbf6518f9 Replace all JM_ macros with ui::MessageType enum and add ui::RegisterMessage class to register new UI messages 2013-04-04 21:53:29 -03:00
David Capello
6e62bcb82f Add ui::WidgetType enum to replace JI_WIDGET macros 2013-04-03 22:07:24 -03:00
David Capello
fd6e4ccc21 Add support for transparent background color for ui::Slider to draw ui::IntEntry popup window without background 2013-04-03 21:17:12 -03:00
David Capello
b45dcf7d0d Use ui::ListItem in ui::ComboBox widget 2013-04-03 20:31:02 -03:00
David Capello
1d76e0d545 When a widget is removed (through Widget::removeChild) we've to remove it from its ui::Manager
A widget without parent, cannot be part of the Manager (e.g. cannot be
the capture widget, or focused, or the widget with mouse).
2013-04-03 19:54:40 -03:00
David Capello
dcd8627406 Separate ui::ListBox::Item into ui::ListItem class 2013-04-02 21:34:30 -03:00
David Capello
1bf84bac41 Fix IntEntry's popup if it's beyond the screen border 2013-03-30 20:53:50 -03:00
David Capello
9076ee13ea Don't close IntEntry's popup in case of FOCUSLEAVE message 2013-03-30 20:50:43 -03:00
David Capello
cbb5809c10 Bigger hot region for IntEntry's popup window 2013-03-30 20:50:24 -03:00
David Capello
cb0cdb3197 Rename old _ji_* functions 2013-03-30 13:38:24 -03:00
David Capello
a437a954f2 Sort #includes in ui/entry.cpp file 2013-03-30 13:11:49 -03:00
David Capello
4adc9f8489 Add ui::IntEntry widget 2013-03-30 13:11:35 -03:00
David Capello
fe6209ed52 Fix bug in ui::Entry::m_caret, after changing the widget's text we've to adjust the caret
This is to avoid "out of range" situations, where the caret is outdated
and doesn't correspond to the new widget's text length.
2013-03-30 00:35:25 -03:00
David Capello
1d6be62ae7 Fix ui::Entry::onEntryChange: must be a virtual member function 2013-03-29 23:40:12 -03:00
David Capello
c2664b6aac ADd Entry::set/getSuffix() property 2013-03-29 16:20:32 -03:00
David Capello
c5a0acf7c6 Add ComboBox::onChange() member function 2013-03-29 16:16:24 -03:00
David Capello
da946ed90c Add Widget::getFirstChild() member function 2013-03-27 21:44:21 -03:00
David Capello
9b8e87da10 Update copyright year to 2013 2013-01-27 12:13:13 -03:00
David Capello
544a63cc28 Add "play" button in MiniEditorWindow (UI only)
At this moment the button isn't functional because the current frame
position is stored in the sprite (instead of the Editor). In this case,
when the "play" button is pressed, the mini-editor should show other
frames instead of the current one (should play the whole animation).
2013-01-20 21:58:16 -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
David Capello
3ae4889526 Remove deprecated messages 2013-01-16 21:54:47 -03:00
David Capello
95a0c6d0f4 Merge branch 'dev' of git@github.com:dacap/aseprite.git into dev
Conflicts:
	src/ui/popup_window.cpp
	src/ui/tooltips.cpp
	src/ui/tooltips.h
	src/ui/window.cpp
2013-01-13 22:45:25 -03:00
David Capello
eacd0c7642 Replace ui::jregion with gfx::Region class
This is an old TODO item, and it's the first step to finally
get rid of JRect and struct jrect.
2013-01-13 22:39:44 -03:00
David Capello
c5cf588370 Rename some member_functions to memberFunctions 2013-01-11 12:43:25 -03:00
David Capello
a517deee0d Add ui::Color and ThemeColor, move Color to app::Color
Now colors are customizable from skin.xml file.
2013-01-06 14:45:43 -03:00
David Capello
ef4934bef2 Remove JM_REQSIZE message 2012-09-26 18:34:52 -03:00
David Capello
44b8822e38 Remove deprecated MessageSignal message 2012-09-26 17:55:41 -03:00
David Capello
0496f38ed3 Fix a typo in all files distributed under BSD-like and Allegro licenses
Thanks to Tobias Hansen.
2012-09-23 23:24:43 -03:00
David Capello
23660eb0d1 Fix issue #164: Palette area visible in Advanced Mode.
Instead of switching ColorBar visibility, we've to switch the
Splitter position between the ColorBar and sprite editors.
2012-08-24 18:54:47 -03:00
David Capello
fb5f086f0f Add "ui::dirty_display_flag" flag to avoid flipping to the screen continuously.
This is a temporal fix to save more CPU. It will be refactored for next
versions.
2012-08-23 22:25:56 -03:00
David Capello
c6fe95231d Convert the mouse cursor into an ui::Overlay (now it support alpha channel).
- Added Cursor class and CursorType enum.
2012-08-10 23:14:54 -03:00
David Capello
d7862744b4 Merge branch 'master' of git@github.com:dacap/aseprite.git 2012-08-06 01:20:12 -03:00
David Capello
237bec80f2 Add overlays (ui::Overlay and ui::OverlayManager classes). 2012-08-06 01:17:29 -03:00
David Capello
89cb9d098c Move some base UI logic to handle the main display from modules/gui.cpp to she library. 2012-08-05 21:16:16 -03:00
David Capello
2ffe54584a Fix gcc problem using std::stream with forward-declarations only without including <sstream>. 2012-07-18 08:59:31 -03:00
David Capello
525851e6a1 The color bar is now resizable.
- Added Splitter::Type so it can be by pixel or by percentage.
- Added Widget::load/saveLayout functions and Widget::onLoad/SaveLayout
  events.
- Added LayoutIO interface so we can delegate the serialization of the
  layout.
2012-07-18 01:10:43 -03:00
David Capello
25fc113c37 Fix issue #142: Crash keeping a key pressed while we're en menu logic.
We cannot send another Menu::closeAll() request if we are processing
other open/close popup requests. This also fix a crash if we keep the left
or right key pressed to navigate through menus.
2012-07-17 23:18:43 -03:00
David Capello
8764f018c7 Minor change in menu.cpp. 2012-07-17 23:01:05 -03:00
David Capello
5da37e237b Fix a bug introduced in aseprite 0.9.2, commit 8a1295c025.
Widget::getMnemonicChar() can return 0, and we should pre-check this
value before we compare the mnemonic with the pressed ascii char.
2012-07-17 23:00:55 -03:00
David Capello
14f24b1181 Refactor: replace JList with std::vector<> or std::list<>. 2012-07-17 21:42:02 -03:00
David Capello
8dd42cc653 Fix problems with printf-like functions using %d with size_t fields (instead of %lu). 2012-07-15 02:02:29 -03:00
David Capello
8e7b16c3b1 Add MessageLoop to avoid 100% CPU in foreground windows. 2012-07-09 18:31:06 -03:00
David Capello
5529c62c9f Use a std::list instead of a std::vector for timers list. 2012-07-09 18:30:13 -03:00
David Capello
846fbff4a7 Fix compilation errors in GCC. 2012-07-09 17:36:45 -03:00
David Capello
91bf74350e Rename ui::Frame to ui::Window. 2012-07-08 23:24:42 -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
55aca8567c Move src/gui/ to src/ui/ 2012-06-17 22:49:58 -03:00