Commit Graph

352 Commits

Author SHA1 Message Date
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
David Capello
d5e3f3d3e8 Minor format changes 2015-12-03 19:29:50 -03:00
David Capello
771a7ba467 Add search field in keyboard shortcuts dialog (fix #849)
Changes:
* Added "icon_search" part in the skin
* Added app::SearchEntry widget
* Fixed Separator widget to handle a custom background color, because
  now we use Separators inside a ListBox too
* Added Entry::(on)getEntryTextBounds() to specify a customized area
  to show text (as SearchEntry needs space for search and close icons)
2015-11-30 15:08:18 -03:00
David Capello
4b21d8d5f4 Sort listbox items using compare_filenames() to compare numbers correctly (fix #782) 2015-11-18 16:50:49 -03:00
David Capello
62a16d0525 Improve font selection with keyboard in PasteTextCommand 2015-10-19 15:32:44 -03:00
David Capello
02ef2268fe Remove unnecessary filtering of key events in PopupWindow
In this way Tab key (and other focus movement keys) can be used
in PopupWindows. They aren’t propagated to the main window because
a correct filter was added in 883629b563
2015-10-19 15:31:34 -03:00
David Capello
2a09990b16 Make viewport bigger when we load a new font on FontPopup 2015-10-16 18:51:35 -03:00
David Capello
74c2ce83dc Simplify update_mouse_cursor() code 2015-10-14 19:36:46 -03:00
David Capello
0900019b1e Minor change in Widget::scrollRegion() to avoid an extra Region::offset() 2015-10-14 18:41:56 -03:00
David Capello
fe6d2f3db0 Minor change in move_region.cpp 2015-10-14 18:39:07 -03:00
David Capello
bd1a1ffafb Add support to transport key modifiers from she events to UI messages
It’s better if we use the original key modifiers from she::Events (given
by Cocoa or Win32 APIs) instead of asking for the current state of
the modifier when the ui::Message is created (which can be different
from the original value).

This commit adds support to transport the modifiers, but it is not
using the original key modifiers yet.
2015-10-14 16:42:49 -03:00
David Capello
9e90061e37 Fix first native cursor hiding on Skia backend 2015-10-14 12:44:37 -03:00
David Capello
2fe612fd00 Add precise trackpad support on Skia/OSX port 2015-10-14 09:27:20 -03:00
David Capello
615e369cc4 Fix closing multiple tabs with middle-click without moving mouse (fix #826) 2015-10-13 12:13:13 -03:00
David Capello
5d9b7475e0 Add missing #include files 2015-10-02 10:54:15 -03:00
David Capello
a06e01ff7e Rename ui::Entry::EntryChange to ui::Entry::Change 2015-09-22 16:22:47 -03:00
David Capello
629bea41a8 Fix scroll in Preview window (fix #811)
Regression bug introduced in 9772f99303
2015-09-18 16:35:29 -03:00
David Capello
9772f99303 Add scroll bars to Timeline widget (fix #732)
Changes:
- Added ui::ScrollableViewDelegate so ui::ScrollBar can be child of
  a non-ui::View widget.
- Added a generic ui::setup_scrollbars() utility to locate
  horizontal/vertical scrollbars depending on the scrollable area and
  the available viewport area.
- Replaced Timeline::m_scroll_x/y ints with m_hbar/m_vbar widgets.
- Added transparent scrollbar look & feel.
- Added a "hover" state to mini-scrollbars used in sprite editors.
2015-09-17 15:19:47 -03:00
David Capello
182a094f2b Add some checks to Menu::closeAll() to avoid accessing null pointers
These are not reproducible situations, but we've received a crash
report that indicates that these pointers can be null if some
unknown scenario.
2015-09-16 10:52:02 -03:00
David Capello
e8abba1b93 Refactor some UI code
- Moved ui::GuiSystem from ui/base.h to ui/system.h as ui::UISystem
- Moved some internals to ui::details namespace
- Fix crash of UI tests when ~Manager is called
- Removed ui::init/exit_system() functions
2015-09-01 10:18:47 -03:00
David Capello
110aa74dae Add required #include "ui/timer.h" in ui/tooltips.h 2015-08-28 14:45:56 -03:00
David Capello
db4817e3ef Add an extra grid test with four columns 2015-08-28 13:11:00 -03:00
David Capello
530edb4ae3 Add Widget() constructor to create default widgets 2015-08-28 13:10:42 -03:00
David Capello
a79c9479b7 Replace dynamic_cast with static_cast in Widget::getRoot() 2015-08-25 14:40:53 -03:00
David Capello
746f41ff5b Rename ui::ListBox::ChangeSelectedItem to ui::ListBox::Change 2015-08-25 13:56:21 -03:00