> On 27 Jan 2015, at 1:21 , Roberto Minelli <[email protected]> wrote:
>
> Dear all,
>
> I have some questions about the following topics: Morphic, the
> Zinc-HTTP-Client-Server, and NautilusRefactoring. I am wondering if someone
> can help ;)
>
> I am visiting RMoD @ INRIA these days (I am now sitting at the “visiting
> tables” @ 3rd floor of INRIA). If someone is willingness to help, please come
> forward! To get an idea (and hopefully to collect some answers from people
> outside of Lille) here are my doubts
>
> ### Morphic
> - How can I assess the “z index” of windows?
That would be their index in the PasteupMorphs submorphs collection, where
larger index -> higher in z-order.
In general, the z-ordering of morphs would be a tree, where
Morph >> visibilityIndex
^self owner ifNil:[0] ifNotNil: [: own | own submorphs indexOf: self ]
Morph >> visibility
^self owner ifNotNil: [ owner visibility addLast: self visibilityIndex;
yourself ] ifNil:[OrderedCollection new].
would give you a list of numbers, all morphs with higher numbers at any level
would have a higher z-order.
> For each window I’d like to know the % that is visible on screen, i.e., not
> covered from other windows.
That's not possible to calculate accurately in the general case, due to morphs
possibly containing fully transparent portions within their bounds.
An approximation using bounds would work the same way as the procedure in
WorldState >> drawWorld: aWorld submorphs: submorphs invalidAreasOn: aCanvas ,
where:
- The bounds of the morph to check is the damage rect to fill (rectList)
- The bounds of higher ordered morphs that might obscure it corresponds to the
submorphs parameter.
- There's no merging of remnants
- No actually drawing/all the other fluff :P
Area of remnants / area of original morph bounds would then be an ok-ish
approximation of the % that is visible.
> - Is there a “general pattern” on how to extract which entity is “displayed”
> on a window? In System Browsers is easy, what about other types of windows?
Dunno what you mean by that...
>
> ### Zinc-HTTP-Client-Server
> - How can I do a real upload (HTTP post) in background?
>
> ### NautilusRefactoring
> - How does it work? Why there are different methods to remove a class, for
> example? e.g., NautilusRefactoring>>#removeClasses: vs.
> AbstractTool>>#removeClasses:
> - Why #removeClasses: is triggered before the actual removal (i.e.,
> confirmation dialogue)?
Leaving these for others ;)
Cheers,
Henry