Re: How to use GUI: Win32::GUI If You Need Accessibility



V S Rawat wrote:
> in continuation of my Hindi to Unicode font transliteration program <snip>
> I want it to have a input text box in which I would paste the
> contents from clipboard <snip>
> I will press a key to convert, and it should give me the
> converted rtf8/unicode text in another text box <snip>

Hi,
I'd recommend you go with the Win32::GUI package if it supports unicode.
Their home page is at:

http://sourceforge.net/projects/perl-win32-gui

The documentation can be found on-line, too:

http://jeb.ca/perl/win32-gui-docs/index.pl/home

The module is still a bit experimental, though:
One of my biggest gripes is that there are no layout managers as in Java and
you don't seem to be able to pull in dialogs from resource files as far as I
can tell. The second bad thing is that I haven't figured out where to get
the exact font metrics that can be used to write resolution, font and DPI
independent code in Windows apps. I dislike hardcoding sizes if I can avoid
it.

On the up-side, all controls are native to say the least and event handling
is considerably simpler than in java, very Perlish in my view, though it
also reminds me of Visual Basic. Be warned: if you need to use OLE in some
of your programming efforts, you cannot run the GUI in its own thread
because OLE and threads are buggy. Perl will crash consistantly with a
highly cryptic error message if you try to use the two at once.

For message boxes and common dialogs, Active State's core Win32 functions
(MsgBox) as well as Win32::FileOp may be of interest.

A word of warning:
Though it may be nice to program, the popular TK GUi library is horibly
inaccessible on Win32. So if you're user-base includes people who have to
use a screen reader program to access Windows, that is blind or low-vision
users, I recommend you stick to Win32::GUI. Accessibility is still quite a
nieche for most sighted designers but thought I'd let you know.

As to what's wrong in TK as far as accessibility goes, I'll quote my self in
the Perl-Win32 list:

Quote:
Ok, I just installed Active TCL with the default settings and tried out both
the TK samples of Active TCL and the Synopsis code of Perl's TKX package.
But when it comes to accessibility, I'm very disappointed. I'm using Dolphin
Supernova 6.x but I doubt Jaws would be able to handle things any better as
TK seems so fundamentally inaccessible. Warning subjective ranting ahead:

The good news, compared to Swing, the widgets do look very much like their
Win32 counterparts to me and TK perfectly respects my color scheme, too.
However, very few controls are accessible. The title bars and some HTML
areas seem to be but virtually nothing else is. static text, the various
buttons and text fields just don't seem to be there as far as the screen
reader goes. It announces right from the start no focus detected and is not
able to read any control text, type and state, navigate between the controls
or manipulate them. Even when using a screen reader specific navigation mode
called virtual focus, it doesn't go beyond the title bar in most cases. I've
changed the screen reader map file to MSAA Application with no visible
improvements [even though TKX should support Active Accessibility].

Also some gripes about TK. As is the case with so many custom GUIs that try
to be Windows like, it feels sort of clumsy in places. Edit areas don't seem
to have the familiar context menu with choices like select all, copy or
undo. Scroll bars don't have context menus either when even Notepad does
have them. Keybord usage is a bit patchy, too. In the 50 States example, the
arrow keys, as well as, pg up/down and home/end don't move the selection in
the list box. Neither is item searching by rapidly typing in one or more
letters implemented.
End quote.

If you can use neither the display nor the mouse properly, a half-hearted
keyboard interface and failing to render the GUi as text ( speech and
braille) is more than a bit annoying. It means that many of the Win32 ports
of popular open-source software written using TK or GTK cannot be used by
the visually impaired at all. Again I'm not saying no-one should use TK
because of this. But it is annoying to find out you cannot use some piece of
software for accessibility reasons. A robust keyboard interface will also
help sighted power-users and accessible applications are easier to automate
in UI testing.

Nearly all command-line apps are accessible, though, so maybe you should
also offer the console version in addition to the GUI. But this doesn't mean
that a sight-impaired user couldn't enjoy the GUI, either. After having seen
Windowss I'll never go back to DOS big time, and use the LInux console
grudgingly, preferring Gnome. Well actually I prefer KDE, but that's not yet
accessible so here we go again.

There are many books and articles dealing with TK but I haven't seen the
Win32::GUI package discussed that widely so I thought I'd mention it as an
alternative.

--
With kind regards Veli-Pekka Tätilä (vtatila@xxxxxxxxxxxxxxxxxxxx)
Accessibility, game music, synthesizers and programming:
http://www.student.oulu.fi/~vtatila/


.


Quantcast