[Q] [Morphic] SystemWindow
tblanchard at mac.com
tblanchard at mac.com
Sat Mar 8 18:06:04 UTC 2003
FWIW, I've been working on ProtoMorph, trying to get a new base Morph
class that is more straightforward to use. The number one "issue" I
run into when trying to build composite morphs is layout. It is my
opinion that the current layout schemes are a little too "tense" - IOW
they execute too much code that sometimes conflicts and this makes them
unpredictable.
I am making slow progress getting a ProtoMorph that can be composed
using a struts and springs scheme like you find in NextStep.
I've completely given up on trying to fix Morph itself as it is
*FRAGILE* and making little changes in it frequently results in a
frozen system (as does trying to write new layout managers).
My plan is to get ProtoMorph working properly including doing struts
and springs layout, then start reimplementing many of our popular
morphs on top of ProtoMorph rather than Morph. When SystemWindow is
done, it should be really easy to make a new tool with conventional
resizing behavior.
I just thought I'd mention what I'm doing in case anyone else is
thinking about tackling the same issue.
On Saturday, March 8, 2003, at 07:03 AM, Chris Burkert wrote:
> Hello Squeakers
>
> I want to build a nice SystemWindow for my application. The problem is
> resizing. For example take a Package Browser and resize it as small as
> possible. There will be Morphs displayed outside the SystemWindow.
>
>
>
>
> My code with the same problem would look like this (a DoIt should
> work):
>
> | window playfield bar |
> bar _ (RectangleMorph new) width: 500.
> window _ (SystemWindow labelled: 'my App').
> playfield _ (RectangleMorph new)
> layoutPolicy: TableLayout new;
> hResizing: #spaceFill;
> vResizing: #spaceFill.
> playfield addMorph: bar.
> window
> addMorph: playfield fullFrame: (LayoutFrame fractions: (0 at 0 corner:
> 1 at 1) offsets: (0 at 0 corner: 0 at 0));
> openInWorld.
>
>
>
>
> So I tried the following:
>
> | window playfield bar |
> bar _ (RectangleMorph new) width: 500.
> window _ (SystemWindow labelled: 'my App')
> layoutPolicy: TableLayout new;
> hResizing: #shrinkWrap;
> vResizing: #shrinkWrap.
> playfield _ (RectangleMorph new)
> layoutPolicy: TableLayout new;
> hResizing: #spaceFill;
> vResizing: #spaceFill.
> playfield addMorph: bar.
> window
> addMorphBack: playfield;
> openInWorld.
>
>
>
>
> Now the Titelbar and some colors are displayed completely wrong _but_
> it resizes correct. I believe this is a problem with Alignment. Is
> there a way around so that the window displays itself correct _and_ it
> resizes to #shrinkWrap?
>
> Should SystemWindow be refactored so that it supports the newer layout
> Policies?
>
> thanks
> Chris Burkert
> --
> -----------------------------------------------------------------------
> -
> Student of applied Computer Science at Chemnitz University of
> Technology
> http://www.chrisburkert.de/ chris at chrisburkert.de
> -----------------------------------------------------------------------
> -
> "I invented the term Object-Oriented, and I can tell you I did not have
> C++ in mind." - Alan Kay --> http://www.whysmalltalk.com/
>
>
More information about the Squeak-dev
mailing list
|