11 Commits

Author SHA1 Message Date
Leandro Dorileo
6ab34c5f92 clui: fix Clipper() function
We're using the wrong control to calculate the clipped area, it should
be the clipped control not its clipped parent.

Signed-off-by: Leandro Dorileo <leandro.maciel.dorileo@intel.com>
2018-09-26 13:54:54 -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
6cede82cb7 add custom theme support
With this change users can specify custom theme extensions.

Signed-off-by: Leandro Dorileo <leandro.maciel.dorileo@intel.com>
2018-09-06 14:44:15 -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
8a4b55d6a3 base: add OnActive() callback
In order to notify the user we have gained or lost focus this patch
adds the OnActive() callback. The callback argument is the new value.
2018-04-12 10:29:55 -07:00
Leandro Dorileo
be1a2b7283 BaseControl: add a Destroy() interface
This interface should be used to remove an object from its parental
chain, this destroyed object will not receive events nor will be
drawn neither will impact on other objects position and sizing.

These objects if properly handled could be eligible for collection
as well.
2018-03-23 14:35:30 -07:00
Leandro Dorileo
1f44a01230 BaseControl: add refID
In order to guarantee BaseControl and Control are fully comparable in the
BaseControl level this patch introduces a refID interface, so the objects
can safely be comparable based on this interface.
2018-03-23 14:34:01 -07:00
Vladimir Markelov
7d2469f651 fix for #84 2018-03-15 20:56:29 -07:00
Vladimir Markelov
77ee1b7531 #84 - add new Control property Visible 2018-03-13 22:14:40 -07:00
Vladimir Markelov
2c06a01186 It is not complete patch because there are more places to fix. At least all demos and full-featured application termfb2 works without race condition warnings. 2017-11-28 19:27:32 -08:00
Vladimir Markelov
7cbba07780 Support termbox mouse move events and huge refactoring 2016-10-13 14:16:05 -07:00