23 Commits

Author SHA1 Message Date
prospero78su
fa72f88ed7 281 Рефакторинг 2019-05-07 10:36:30 +03:00
prospero78su
2ef0bcd2be 280 Рефакторинг 2019-05-07 10:29:34 +03:00
Vladimir Markelov
ace300005c
Merge pull request #105 from dorileo/fix-child-at
Don't consider hidden children on ChildAt
2018-09-12 12:56:59 -07:00
Leandro Dorileo
825d1c1f49 Don't consider hidden children on ChildAt
When dealing with mouse events we use ChildAt() to find the controls
in the clicked area, but we may have hidden elements in the same position
in that case we want to dispatch events to the visible one. This patch
fixes this issue by filtering out the non visible elements.

Signed-off-by: Leandro Dorileo <leandro.maciel.dorileo@intel.com>
2018-09-12 10:37:41 -07:00
Leandro Dorileo
85c09dabf1 NextControl also considers parent's visibility
Whenever running through NextControl() also exclude those controls
which parents are also non visible.

Signed-off-by: Leandro Dorileo <leandro.maciel.dorileo@intel.com>
2018-09-12 09:28:22 -07:00
Leandro Dorileo
9153ec6718 frame: scrollable frame
This patch introduce internal changes in order to #1 actually clip
content avoid growing parent's size and keeping controls with their
own pre-set sizes and also #2 add a scrollable feature to frame control.

Signed-off-by: Leandro Dorileo <leandro.maciel.dorileo@intel.com>
2018-09-06 14:44:21 -07:00
Leandro Dorileo
f432809086 fix getLinearControlList() fn callback call
If no fn callback is provided don't try to call it and avoid segfault.

Signed-off-by: Leandro Dorileo <leandro.maciel.dorileo@intel.com>
2018-09-06 14:44:21 -07:00
Leandro Dorileo
a1babea8cb ctrlutil: fix NextControl()
With this helper we may iterate over the control list and end up
not having any control that match the search criteria (namely: tabStop,
visible and enabled). In that case an index out of bounds error will
happen.

This patch checks for the resulting list and return if no control's
found.

Signed-off-by: Leandro Dorileo <leandro.maciel.dorileo@intel.com>
2018-06-27 15:54:31 -07:00
Leandro Dorileo
1fc1fdd776 base_control: fix set visible event dispatching
Currently when setting a control visible no matter if this control has
active children new KeyTab events will be dispatched. This results in
errors when an application has explicitly set the active control -
i.e with clui.ActivateControl().

In this case the expected behavior is to have that control active
instead of the next one, since we are not considering the the children
state then we always emit the KeyTab event resulting into a focus/active
status change.

This patch changes this behavior by querying the children's status and
checking if there is a child with active state set and only triggering
the KeyTab event when no child is active.

Signed-off-by: Leandro Dorileo <leandro.maciel.dorileo@intel.com>
2018-06-21 17:22:26 -07:00
Leandro Dorileo
0b2b6067c1 clui: NextControl() also filter out disabled controls
When selecting previous or next controls in we want to also filter
out the disabled controls - since they will never get focused.
2018-04-19 10:33:16 -07:00
Leandro Dorileo
4c9bc9f83a clui: simplify NextControl() method
This patch simplifies the implementation of NextControl(),
FindLastControl() and FindFirstControl() methods.
2018-04-18 16:26:07 -07:00
Vladimir Markelov
77ee1b7531 #84 - add new Control property Visible 2018-03-13 22:14:40 -07:00
Vladimir Markelov
dd1c708720 closes #61 - fix focus movement with TAB key 2017-12-01 10:31:45 -08:00
Vladimir Markelov
7cbba07780 Support termbox mouse move events and huge refactoring 2016-10-13 14:16:05 -07:00
Vladimir Markelov
3dc059c8b8 typo fix 2015-11-13 17:04:19 -08:00
Vladimir Markelov
d184b3b829 closes #40 - alignment for multicolored single lined string 2015-11-05 11:36:51 -08:00
Vladimir Markelov
377892432f selected item number by thumb position moved to common module 2015-11-05 09:53:16 -08:00
Vladimir Markelov
353dab918e thumb position calculation moved to common module 2015-11-05 09:41:58 -08:00
Vladimir Markelov
cec72537cd closes #34 - make edit and checkbox one line height and center them vertically on resize 2015-11-04 10:34:30 -08:00
Vladimir Markelov
9f11406878 #24 - add docs for ctrlutil 2015-10-28 13:18:53 -07:00
Vladimir Markelov
8b83266c57 theme loading from file 2015-10-20 14:32:16 -07:00
Vladimir Markelov
d9160a6e02 fix crash on mouse click 2015-10-17 16:38:08 -07:00
Vladimir Markelov
0078d1ed0b refactoring and crossplatform patch 2015-10-16 10:27:43 -07:00