Discussion:
Update to WxMorphic (v0.03alpha)
Steven Swerling
2006-07-19 15:18:01 UTC
Permalink
Hi,

WxMorphic has been updated. Go there:

http://www.swerlingphoto.com/squeak/wxmorphic/WxMorphic.html

If you already downloaded it once, note that you still need the new VM
as well as the latest monticello package.

Added a screenshot to show multiple views on one world, including a
fully live scaled view.

From the changelog:

1. Added a "fix" for missing key events in WxMorphicWrappers. It is a
kludge. Not a big one, but a kludge nonetheless. Lots of progress made
on treating WxWidgets as Morphs. A clean little UI Builder is looking
pretty doable at this point.
2. Added ability to have multiple wxPanels on the same wxWorld
3. Scaled views of a world
4. Some progress on surviving image save (still not stable)
5. Added to Demo: emedding small scrollable new world, embedding scaled
view, opening another view of the world in another window, etc.

Steve S.
Rob Gayvert
2006-07-19 15:18:01 UTC
Permalink
Looking good. So how did you fix the key events? The multiple scaled
views are fun. If each of these could have a different viewport, I could
see lots of applications.

Are the embedded wrapper buttons initially gray because of the
performance issue? They have some additional display glitches, but
otherwise operate as expected (which, from a wx viewpoint, is very
unexpected).

One other little detail: when the Squeak window has been hidden and the
last wxMorphic window is closed, the app is still running but there's no
way to quit.
Post by Steven Swerling
Hi,
http://www.swerlingphoto.com/squeak/wxmorphic/WxMorphic.html
If you already downloaded it once, note that you still need the new VM
as well as the latest monticello package.
Added a screenshot to show multiple views on one world, including a
fully live scaled view.
1. Added a "fix" for missing key events in WxMorphicWrappers. It is a
kludge. Not a big one, but a kludge nonetheless. Lots of progress made
on treating WxWidgets as Morphs. A clean little UI Builder is looking
pretty doable at this point.
2. Added ability to have multiple wxPanels on the same wxWorld
3. Scaled views of a world
4. Some progress on surviving image save (still not stable)
5. Added to Demo: emedding small scrollable new world, embedding
scaled view, opening another view of the world in another window, etc.
Steve S.
Steven Swerling
2006-07-19 15:18:01 UTC
Permalink
Post by Rob Gayvert
One other little detail: when the Squeak window has been hidden and the
last wxMorphic window is closed, the app is still running but there's no
way to quit.
I noticed that. Any chance I could get a primitive call
"isSqueakDisplayOn" or the like (or is there one now)? If not, I could
just keep a flag in Smalltalk.

BTW, I noticed that WxButtons don't get their events reconnected during
window recreation. I was about to take a whack at that problem, but in a
past mail you mentioned some misgivings about the general architecture
of XRC handling in WxSqueak. Should I bother trying to fix bugs in the
current framework, or are you planning big changes there?
Steven Swerling
2006-07-19 15:18:01 UTC
Permalink
Post by Rob Gayvert
Looking good. So how did you fix the key events?
The fix was to detect set a flag in the morphic panel, wantsKeyEvents,
upon a mouse click there. This could be done on mouse motion events too,
but right now it's just on the click. When a key event comes into a
WxWidget, the morphic wrapper looks at this flag in its parent, the
morphic panel. If the parent wantsKeyEvents, the key event is forwarded
to the morphic panel, if not, it is processed normally. If there is a
click in a wx widget, the wantsKeyEvents flag is cleared.

As sketchy as that sounds, I think it will likely be sufficient, and
very few subclasses of WxMorphicWrapper will have to override the
default key event handling. As this problem only crops up when WxWidgets
are added as children to a WxMorphicPanel, I wouldn't expect the focus
issue to come up very often anyway, except in the case of a
UIBuilder/Editor. More typically in deployed applications, I would
think, WxWidgets will be siblings of the morphic panel rather than
children of it. We shall see.
Post by Rob Gayvert
Are the embedded wrapper buttons initially gray because of the
performance issue? They have some additional display glitches, but
otherwise operate as expected (which, from a wx viewpoint, is very
unexpected).
This code is very green at this point. The wrappers are initially gray
because they haven't had there picture taken yet (this happens the first
time there is a halo click). Really I'm just playing around with the
problem at this point. I had written a long note about the ins and outs
of this, but I'm going to try a completely different approach pretty
soon, with halos reimplemented as WxEllipses instead of as morphs, so
that they pop up over the entire Morphic Panel. That way, no pictures
need to be taken of the widgets, and the real WxWidgets will not need to
be hidden during halo editing. Once I get that working, I can play
around with that a bit and try to figure out the pros and cons of each
approach.

Loading...