Commit Graph

376 Commits

Author SHA1 Message Date
David Capello
7b4511a5df Unify she::InputDevice and ui::PointerType 2016-04-20 22:49:03 -03:00
David Capello
a58cbfbc1c Enable eraser support for Wacom tablets on Skia/Win back-end
Related to #610
2016-04-20 22:33:10 -03:00
David Capello
8028cf64db Merge branch 'unicode-text'
# Conflicts:
#	third_party/libpng
#	third_party/zlib
2016-04-04 10:26:57 -03:00
David Capello
0605166cc6 Move clock/tick from "she" to "base" library and switch to uint64_t type 2016-03-29 16:19:23 -03:00
David Capello
69a1161f69 Fix Entry bugs handling the text caret
Added more checks and improve performance in Entry::setCaretPos()
2016-03-14 12:39:45 -03:00
David Capello
29f6db6f35 Widget::textLength() returns the number of (Unicode) characters in the text field 2016-03-14 12:38:11 -03:00
David Capello
0abe01c5f4 Merge she::LockedSurface/NonDisposableSurface with she::Surface 2016-03-09 11:00:17 -03:00
David Capello
285deb603e Define _CRT_SECURE_NO_WARNINGS on sub-libraries that need it 2016-03-03 19:22:52 -03:00
David Capello
8c9d9eb84c Replace NULL with nullptr on files that don't include base/base.h 2016-03-03 19:20:57 -03:00
David Capello
4f6a7a7742 Include base/debug.h on files that use ASSERT or TRACE 2016-03-03 19:17:07 -03:00
David Capello
cb86fb4c8f Rename ui::winKeyName to ui::kWinKeyName 2016-03-02 10:31:39 -03:00
Gabriel Rauter
cb92b781eb Change Windows Modifier Name to Win for Windows and Super for Linux/BSD 2016-03-01 23:52:36 +01:00
Gabriel Rauter
e22332144a Add Windows Key as possible Modifier in Keyboard Shortcuts on Windows and Linux as a step to fix #796 2016-03-01 20:14:32 +01:00
David Capello
78da4a40a1 Avoid warning on Graphics::drawUIString() 2016-02-29 22:21:21 -03:00
David Capello
91b8df9d4d Fix mouse lag on Linux (fix #957)
As now we can generate several mouse events in
one generateMessagesFromSheEvents(), thanks to
1588e834c3, we can process
all mouse events from Allegro 4.
2016-02-29 22:21:07 -03:00
David Capello
5798c896e2 Don't generate a kSetCursorMessage when the mouse is outside the window
Should finally fix #948
2016-02-29 22:18:36 -03:00
David Capello
ca160d0647 Remove unnecessary iterations on splitter children in onSave/LoadLayout 2016-02-26 15:08:58 -03:00
David Capello
9521ed3079 Merge branch 'master' 2016-02-18 14:15:04 -03:00
David Capello
15e10ad9f6 Add touch magnify event to support OS X trackpad gesture 2016-02-18 13:58:45 -03:00
David Capello
802b8a0a10 Fix performance problem when we change color sliders with mouse movement 2016-02-17 18:32:34 -03:00
David Capello
1588e834c3 Fix artifacts when scrolling on widgets with sub-children (fix #963)
This bug was introduced in b0650f6afe
To fix this issue we've to remove kPaintMessages from the message queue
for widgets that were moved. Those pending paint messages aren't valid
anymore because the widget was invalidated again.
2016-02-15 15:54:54 -03:00
David Capello
e843e7a9ba Do not overlap the menubar with a menubox 2016-02-07 14:41:43 -03:00
David Capello
b0650f6afe Generalize View::setViewScroll() to blit valid/scrollable region automatically
With this change we are removing specific code to scroll the Editor widget.
Now if we use Editor::setEditorScroll() to scroll it should work as
View::setViewScroll(). In this way we remove the ugly "blitValidRegion"
parameter from setEditorScroll().

Changes:
* Removed Widget::scrollRegion() because each widget must control
  valid/invalid regions after a ui::move_region() in a very specific way
  (see View::setViewScroll() or Window::moveWindow)
* Invalidate the whole widget on Widget::setBoundsQuietly()
* Fixed problems blitting invalid regions/not yet updated/painted: using
  the new ui::Manager::m_invalidRegion.
* Added View::onSetViewScroll() and View::onScrollRegion()
* Added FileListView to avoid moving the thumbnail region when we scroll
2016-01-05 16:37:52 -03:00
David Capello
1260cf12c5 Minor comment changes in widget.h 2016-01-05 16:28:54 -03:00
David Capello
e64cc958ce Minor change/renames in Widget::flushRedraw() 2016-01-04 17:50:21 -03:00
David Capello
3bad2af2f3 Make Widget::offsetWidgets() function public 2016-01-04 17:49:40 -03:00
David Capello
eba8de0306 Fix slow scroll/selection movement with Alleg4 port (fix #929) 2016-01-04 12:15:23 -03:00
David Capello
910612101a Fix slow performance pressing Alt or Ctrl key on Editor in Alleg4/Win port 2015-12-30 17:30:20 -03:00
David Capello
0f28e216ba Fix Manager::pumpQueue() when DEBUG_PAINT_EVENTS is defined 2015-12-30 12:24:26 -03:00
David Capello
199a3db278 Don't scroll invalid areas in Widget::scrollRegion() 2015-12-28 13:37:01 -03:00
David Capello
5074ef2d68 Handle several UI mouse movement events at once if they are in the she layer queue 2015-12-28 13:02:45 -03:00
David Capello
65dd457847 Reduce size hint for ui::ComboBox 2015-12-22 17:14:26 -03:00
David Capello
70127f19e1 Fix closing the whole user data popup when we're selecting the user data color 2015-12-17 16:34:57 -03:00
David Capello
6ec07d5e10 Fix comment for ui::PopupWindow::setHotRegion() member function 2015-12-17 15:46:13 -03:00
David Capello
1f513a1ed5 Restore selected ButtonSet item when we offer the mouse capture
When a ButtonSet triggers an onClick() when a mouse up message is received
(ButtonSet::m_multipleSelection == true), in case the mouse capture is
offered to other ButtonSet, we've to restore the selected item when we
capture the mouse, because we've never generated the onClick() event
in the first place.
2015-12-16 16:55:49 -03:00
David Capello
cff6d1cc65 Rename LinkLabel::getUrl() -> url() 2015-12-15 17:07:29 -03:00
David Capello
a380c9a877 Add possibility to create an empty LinkLabel 2015-12-15 17:07:13 -03:00
David Capello
e422acff1f Fix PopupWindow size hint when it doesn't have a title 2015-12-15 17:06:54 -03:00
David Capello
d8417df35f Add possibility to create empty ui::ListItems 2015-12-15 17:06:05 -03:00
David Capello
e78e9eeb2c Add PopupWindow::setClick/EnterBehavior() member functions 2015-12-11 12:48:11 -03:00
David Capello
50a01879ac Add possibility to create popup windows and tip windows from XML widgets 2015-12-10 16:51:48 -03:00
David Capello
455153d4b9 Change ui::TipWindow public API
Arrow align and target bounds are given as parameters of the new
TipWindow::pointAt() member function. Now TipWindow() contains a
default ctor.
2015-12-10 16:50:16 -03:00
David Capello
d02efbf315 Fix TipWindow background color 2015-12-10 16:46:01 -03:00
David Capello
3066e1b301 Minor format change in ui/textbox.h 2015-12-10 16:44:48 -03:00
David Capello
d467d71fa5 Rename PopupWindow enums 2015-12-05 15:56:32 -03:00
David Capello
e944ce0052 Move Bind, Connection, Signal, Slot, etc. to base namespace 2015-12-04 15:17:42 -03:00
David Capello
06be4f7fa6 Rename ui::Window::getKiller() -> closer() 2015-12-04 14:54:15 -03:00
David Capello
1aaeacc460 Refactor several "getNoun()" getters to "noun()"
This is a work-in-progress to create a consistent API and finally
separate the whole Aseprite base/gfx/ui libs into a reusable C++ library.

Classes:
app::IFileItem, app::AppMenuItem, app::skin::SkinPart,
gfx::Rect, gfx::Border, she::FileDialog,
ui::IButtonIcon, ui::Graphics, ui::Overlay, ui::Widget,
ui::ScrollableViewDelegate, and UI events
2015-12-04 14:39:04 -03:00
David Capello
cdd955441a Rename PreferredSize -> SizeHint 2015-12-03 21:50:05 -03:00
David Capello
78ba213471 Rename ui::Widget::getChildren() -> children()
Extra changes:
* Removed UI_FOREACH_WIDGET(), replaced with range-based for-loops
2015-12-03 19:46:13 -03:00