Path: usenet.cise.ufl.edu!newsfeeds.nerdc.ufl.edu!newsfeeds.nerdc.ufl.edu!news.magicnet.net!feed2.news.erols.com!erols!nntp.abs.net!outfeed1.news.cais.net!news.neta.com!not-for-mail From: kfox@ford.com (Ken Fox) Newsgroups: comp.lang.perl.announce,comp.lang.perl.modules Subject: New release of X11::Motif, Lib, Toolkit, Xbae, XRT, Xpm Followup-To: comp.lang.perl.modules Date: 16 Aug 1998 19:52:17 GMT Organization: Ford Motor Company, Powertrain Lines: 111 Approved: merlyn@stonehenge.com (comp.lang.perl.announce) Message-ID: <6r7d9h$fke$1@news.neta.com> Reply-To: kfox@ford.com NNTP-Posting-Host: gadget.cscaper.com X-Trace: news.neta.com 903297137 16014 206.67.186.3 (16 Aug 1998 19:52:17 GMT) X-Complaints-To: abuse@neta.com NNTP-Posting-Date: 16 Aug 1998 19:52:17 GMT X-Disclaimer: The "Approved" header verifies header information for article transmission and does not imply approval of content. Xref: usenet.cise.ufl.edu comp.lang.perl.announce:114 comp.lang.perl.modules:3254 The third beta release of the X11::Motif module has been added to CPAN. It is available as: file: $CPAN/authors/id/KENFOX/X11-Motif-1.1b3.tar.gz size: 223641 bytes md5: c882d2c7717577c4c47b41905b532839 The X11::Motif distribution includes X11::Lib, X11::Toolkit, X11::Xpm, X11::Xbae and X11::XRT. An X11::Athena (including the 3d, Win95 and NeXTSTEP variants) is in the works. I'll probably have to split the distribution at that point because it is just getting too large. Taken together, these modules provide a nearly complete interface to the standard X libraries. The modules have both object oriented and function call style interfaces. The object interface is similar to the Tk module. The function call interface is strongly modeled after the standard X library documentation and will be familiar to someone with X Toolkit or Motif experience. The modules work well in both stand-alone scripts and when embedded in a larger C (or C++) Motif application. Embedded Perl combined with this module is an ideal way to add scripting capability to an existing Motif application. This release is very stable and works well. Production programs are being built on top of it. (The only reason that this version is not labeled production is because it is missing complete documentation.) I've included two versions of the classic "hello world" example at the end of this announcement. Even if you don't grab the module, I'd appreciate feedback on whether the examples are understandable. To build the modules, you will need: * Perl version 5.004 or higher (5.005 hasn't been tested yet) * X11R5 or higher (X11R4 should work but hasn't been tested) * Motif 1.2.4 or higher (CDE Motif works. Motif 2.0 is reported to work. LessTif is also reported to work, but with reduced functionality.) * An ANSI C compiler I would appreciate being notified of any changes necessary to support other environments and/or widget sets. Any questions or comments? Please send them to . - Ken # ---------------------------------------------------------------------- # -- Example #1: The object style use X11::Motif; my $toplevel = X::Toolkit::initialize("Example"); my $form = give $toplevel -Form; my $hello = give $form -Label, -text => 'Hello, world!'; my $ok = give $form -Button, -text => 'OK', -command => sub { exit }; arrange $form -fill => 'xy', -bottom => [ $ok, $hello ]; handle $toplevel; # ---------------------------------------------------------------------- # -- Example #2: The function call style (i.e. "traditional" Motif) use X11::Motif qw(:Xt :Xm); my $toplevel = X::Toolkit::initialize("Example"); my $form = XtCreateManagedWidget("form", xmFormWidgetClass, $toplevel); my $hello = XtCreateManagedWidget("hello", xmLabelWidgetClass, $form, XmNlabelString, "Hello, world!", XmNlabelType, XmSTRING); my $ok = XtCreateManagedWidget("ok", xmPushButtonWidgetClass, $form, XmNlabelString, "OK", XmNlabelType, XmSTRING); XtAddCallback($ok, XmNactivateCallback, sub { exit }, 0); XtSetValues($hello, XmNrightAttachment, XmATTACH_FORM, XmNleftAttachment, XmATTACH_FORM, XmNtopAttachment, XmATTACH_FORM, XmNbottomAttachment, XmATTACH_WIDGET, XmNbottomWidget, $ok); XtSetValues($ok, XmNrightAttachment, XmATTACH_FORM, XmNleftAttachment, XmATTACH_FORM, XmNtopAttachment, XmATTACH_NONE, XmNbottomAttachment, XmATTACH_FORM); XtRealizeWidget($toplevel); XtAppMainLoop(XtWidgetToApplicationContext($toplevel)); -- Ken Fox (kfox@ford.com) | My opinions or statements do | not represent those of, nor are Ford Motor Company, Powertrain | endorsed by, Ford Motor Company. Analytical Powertrain Methods Department | Software Development Section | "Is this some sort of trick | question or what?" -- Calvin .