DataGrid2 - Improved Graphics Means What - Exactly?
Sannyasin Brahmanathaswami
brahma at hindu.org
Fri Jun 23 13:24:26 EDT 2017
OK I'm all in .. will make a contribution.
but so I can set all wonderment aside:
Since learning about completely encapsulated responsive custom controls (aka "group") which contain not a single line of code I've started creating these "all over the place.
I'm not clear on what "adornments" refer to with respect to a field. But I think it is mute in this scenario:
Given a custom control/group, layered like this
1) full card image in the background (ocean, sunset etc.) aka "eye candy in the back"
2) background graphic with rounded corners set to white with blend level to 20
with 40 px margin from edge of card all around aka cover the eye candy with some transparency
3) field on top with opaque set to false.
4) disclosure triangle at top (widget chevron pointing down) aka "hide me" indicator to the user
5) 40 pixel high button, transparent, across the whole top of the control where the widget is (underneath) to catch the actual tap intended for the widget, allowing user to not need a style to touch the visible pixels in the widget to trigger the mouseup/touch… aka "the real hide me button"
if we understand you correctly, it means that even if
a) the accelerated rendering for the card is set to true
b) the layer mode of the field is set to scrolling
that field scrolling will still "stutter" because it's parent is not the card.
Do we get that right? This would explain a lot. and yes, fixing this will make LC feel a lot more "professional" in the app space.
BR
PS and after you do this PLEEEZE (begging on my knees) but the other long standing request to get the browser widget into the msg hierarchy (I'm sure you are familiar by now with my business enhancement request) on the crowd funding agenda.
Mahalo! (thank you)
On 6/22/17, 9:28 PM, "use-livecode on behalf of Mark Waddingham via use-livecode" <use-livecode-bounces at lists.runrev.com on behalf of use-livecode at lists.runrev.com> wrote:
On 2017-06-23 07:23, Sannyasin Brahmanathaswami via use-livecode wrote:
> What is the scope of the improved graphics rendering? Is It DataGrid
> only?
No - the proposed engine addition (container layer mode) is not DataGrid
only - it is a general feature usable by any custom control which wants
to take advantage of acceleratedRendering.
At present, acceleratedRendering only works on top-level controls (those
which have a card as parent). The key engine change proposed is to add a
'container' layerMode. This would apply to groups and would mean that
instead of treating the group and its children as one thing,
acceleratedRendering should ignore the group (as it is just a container)
and look it's child controls instead. The end result being that controls
within a group (which has been marked as a container) can be individual
layers and thus benefit from acceleratedRendering, but still clipped by
the containing group's bounds.
In the case of the DataGrid we can use this in two ways:
1) In form view mode, each row can be a separate layer which means
they can be moved at zero re-rendering cost, thus allowing smooth
animation of the individual rows.
2) In table view mode, the group (inside the DataGrid) which actually
holds the content (as a set of grouped columns) can be its own scrolling
layer, thus allowing smooth scrolling of it.
> What about
> 1) other long grouped controls that need to scroll as one long group?
You can already use acceleratedRendering to do this but it currently
only works for top-level groups and your groups have to be 'unadorned' -
meaning that you have turned off all properties of the group which mean
the group itself renders something (e.g. borders, scrollbars).
This currently works well if you are targeting platforms where you don't
have scrollbars and can express your control as a single group. However,
it doesn't work for custom controls as (in that scenario) you usually
have the 'custom control group' containing the controls which provide
the display of the custom control - this is the case with the DataGrid,
for example.
> 2) scrolling fields
> 3) scrolling list fields
You can get fields and list fields to scroll smoothly at the moment with
acceleratedRendering by putting a field (with full height of its
content) within a 'scrolling' layerMode group. However, at the moment,
this would mean you don't get scrollbars, and can't have borders (or any
other adornments).
With the 'container' layerMode, you will be able to create a custom
control which lifts the 'no adornment' limitation. You would compose
such a thing of:
custom control group (container layerMode)
content group (scrolling layerMode)
field with content (always full height of content)
adornment controls (static layerMode) (e.g. scrollbars, border)
There's a lot more we could do here in the future (in the engine) to
make it easier to have smoothly scrolling fields and groups (which don't
really need to be custom controls), however, that work is logically
distinct from adding 'container' layerMode; and 'container' layerMode
makes it possible to do the same thing in script so was the best choice
for the Feature Exchange proposal in this case particularly as it is
general feature which can be leveraged directly by script.
Mark.
--
Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/
LiveCode: Everyone can create apps
_______________________________________________
use-livecode mailing list
use-livecode at lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
More information about the use-livecode
mailing list