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



Veli-Pekka Tätilä wrote:
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>

I'd recommend you go with the Win32::GUI package if it supports unicode.

Win32::GUI support for Unicode is *very* limited at the moment. It is possible, but you have to jump through some pretty large hoops. If you want to pursue this, then I suggest starting a thread on the perl-win32-gui-users list - details from the homepage below.


Their home page is at:
http://sourceforge.net/projects/perl-win32-gui
New home page at:
http://perl-win32-gui.sourceforge.net/

The documentation can be found on-line, too:
http://jeb.ca/perl/win32-gui-docs/index.pl/home
That documentation is very old.  Updated (official) docs can be found at:
http://perl-win32-gui.sourceforge.net/docs/
although there are some useful tid-bits at jeb.ca

The module is still a bit experimental, though:
Well, that depends on your viewpoint. It's pretty advanced if you're coming from a win32 api/C/C++ background. If you're coming from other backgrounds then there's a lot that it doesn't do that would be desirable. Not enough developers, not enough time :-)

One of my biggest gripes is that there are no layout managers as in Java
There's the (very) basic Win32::GUI::GridLayout. I've got a background project to do something more sophisticated, but it's a way off yet.

you don't seem to be able to pull in dialogs from resource files as far as I can tell.
No, you can't do this, although if you want to raise a feature request I doubt it'd be hard to do.

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.
Me too. Part of the layout manager project I have on the go is looking at dealing with this so that you can use dialog units instead of pixels for the layouts and font sizes.

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.
I wasn't involved when Aldo started the project, but I believe VB was the original model.

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.
I have some techniques for using threads with Win32::GUI that seem to work; I can't comment in Win32::OLE.

> 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.

I have some of your post from the Perl-Win32 list archived, as I want to try to address some of the accessibility issues that you raised with Win32::GUI - in particular with Win32::GUI::Grid IIRC.


To get back on topic, the OP may find the Win32::Clipboard package useful (although I admit that I have not had more than a cursory play with it, and it may suffer from lack of unicode support too). I think it is a standard ActiveState Perl module.

Regards,
Rob.
--
Robert May
Win32::GUI, a perl extension for native Win32 applications
http://perl-win32-gui.sourceforge.net/
.



Relevant Pages

  • Re: How to use GUI: Win32::GUI If You Need Accessibility
    ... I will press a key to convert, and it should give me the converted rtf8/unicode text in another text box <snip> ... coming from a win32 api/C/C++ background. ... the exact font metrics that can be used to write resolution, font and DPI independent code in Windows apps. ... Perl will crash consistantly with a highly cryptic error message if you try to use the two at once. ...
    (comp.lang.perl.misc)
  • Re: Requesting advice how to clean up C code for validating string represents integer
    ... [Java to Lisp] ... [Perl to Lisp] ...
    (comp.lang.c)
  • Re: Ternary operator
    ... to the perl maintainers) is "Where does perl document the ternary ... operator's behaviour of only evaluating either the second or the third ... is the only trinary operator. ...
    (perl.beginners)
  • Re: @array a copy of @names???
    ... It started in the 3rd edition of Learning Perl. ... That's really a foreach loop, ... least) an even worse confusion in the readers mind: ...
    (perl.beginners)
  • Re: Find Element Position
    ... containing block for absolutely positioned elements. ... <partial snip about reused coords> ... IFrame that triggers quirks mode, ... size the font of the element. ...
    (comp.lang.javascript)

Loading