Re: Desire to unify UI for HyperCard VisualBasic Java and HTMLform
From: Phlip (phlip_cpp_at_yahoo.com)
Date: 09/03/04
- Next message: Carlos Dubon: "xml graphs"
- Previous message: rem642b_at_Yahoo.Com: "Re: Desire to unify UI for HyperCard VisualBasic Java and HTMLform"
- In reply to: rem642b_at_Yahoo.Com: "Re: Desire to unify UI for HyperCard VisualBasic Java and HTMLform"
- Next in thread: Gerry Quinn: "Re: Desire to unify UI for HyperCard VisualBasic Java and HTMLform"
- Reply: Gerry Quinn: "Re: Desire to unify UI for HyperCard VisualBasic Java and HTMLform"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 02 Sep 2004 22:03:41 GMT
rem642b@Yahoo.Com wrote:
> > Gerry Quinn wrote:
> > If VB is like VC++, it isn't quite exact to the pixel when you drag
> > and drop, because dialogs have slight rigidities to do with fonts
> > etc. But it's pretty close.
>
> Ah, thanks for jogging my memory. Indeed in VB6 there's pattern of
> little squares and all alignment of controls on the form must be
> aligned with those squares, so it's not free to a single pixel, more
> like units of several pixels. So in that respect, layout in VB is
> slightly different from in HyperCard. In either case, that's much more
> free/haphazard layout than either grid bag layout in Java or tables
> with colspan/rowspan in HTML.
>
> I've never used VC++ for dialog layout so I can't comment on the
> VB/VC++ comparison.
There are two kinds of layout management in the world - automatic
hierarchical layout, and pixel-oriented layout.
VB and VC++ use the same system because they wrap the same underlying
library. The raw Win32 SDK uses only pixel-oriented layout, as a
convenience, and has no built-in geometry management. However, the raw Win32
SDK supports a transformation between raw pixels and "dialog units", which
base on the size of the dialog's font. If you copy and paste a dialog, then
change ones font to a bigger point size, and run a program, you will see a
little and a big dialog, with all elements linearily expanded to fit their
font.
Both the VB and VC++ editors satisfy esthetics by optionally snapping new
geometries to the nearest grid coordinate; it looks like 5 pixels. These
features belong to the form painters, not the underlying window systems.
Microsoft (and originally IBM) leveraged their ability to build and promote
form painting tools to programmers to bypass the need for good geometry
management in their core architectures.
Both those systems can use more sophisticated geometry management, based on
handling the WM_RESIZE event. A Windows Template Library dialog, for
example, can inherit CDialogResize to specify which controls stretch and
which move at resize time.
By contrast, "toolkit" style windowing systems use hierarchical layout, like
HTML. Each Tk widget supports .pack(), which is incomprehensible and should
be avoided, and .grid(), which behaves like an HTML <table> tag. One passes
to .grid() the row and column index to place a control, and any overlapping
or default justification. Tk adds up all grids to determine a virtual table,
and resizes it to fit all its inhabitants.
Qt's geometry management uses a hierarchy of widget ownership. When a
horizontal box owns widgets it stretches them out horizontally; a vertical
box stacks them vertically. These boxes can nest to form grids. (This is
what Tk's pack system was trying to do, but less intuitively.) Qt also
supports a "spacer", which is a little widget that behaves like a spring. It
pushes its sibling widgets apart within their box.
The OP is advised (based on the Subject line) to write unit tests that drive
all four of those GUIs, testing "inside" the code and not thru a screen
driver. Then merge the common behavior of those tests together into an
abstract base class, such that the same test suite must satisfy all four
GUIs. Pull the GUI-specific code down into concrete classes that help each
test case operate on its target GUI. Then ensure that all these "skins" pass
all these tests all the time.
If all four GUIs must lay out the same, despite different geometry managers,
the OP should of course write a few tests that ensure controls layed out
similarly. This effort is open-ended, so to completely constrain the
situation, the OP should configure unit tests to record screenshots of each
form in each GUI, and upload these to a Web server for rapid review.
-- Phlip http://industrialxp.org/community/bin/view/Main/TestFirstUserInterfaces
- Next message: Carlos Dubon: "xml graphs"
- Previous message: rem642b_at_Yahoo.Com: "Re: Desire to unify UI for HyperCard VisualBasic Java and HTMLform"
- In reply to: rem642b_at_Yahoo.Com: "Re: Desire to unify UI for HyperCard VisualBasic Java and HTMLform"
- Next in thread: Gerry Quinn: "Re: Desire to unify UI for HyperCard VisualBasic Java and HTMLform"
- Reply: Gerry Quinn: "Re: Desire to unify UI for HyperCard VisualBasic Java and HTMLform"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|