HDTenEightyP/NetNews huggingface dataset:
From: sinan@mtesol.boeing.COM (Sinan Karasu)
Subject: Re: X: User simplicity vs code complexity
Organization: The Internet
Date: Mon, 27 Jul 1992 23:41:04 GMT

 In article <TPAQUETTE.92Jul23134924@gumby.ita.lgc.com> tpaquette@ita.lgc.com (Trevor Paquette) writes:
 > To open up a window, create a button, attach a callback to that button
 > when pushed, released and held, while tracking the mouse, takes up a alot
 > of lines of code. (Granted that will take alot of lines in any GFX system
 > but most likely more in X then any other)
 > 

 We routinely code programs using devGUIDE from Sun to generate applications that 
put up menus,multiple-line text windows, canvasses, sliders, gauges all without 
writing a single line of code ( and in less than an hour.) 

 > Is there ANYONE out there who knows EVERYTHING in
 > these manuals?
 
 der Mouse, and Dan Heller....

 Sinan
Newsgroups: comp.windows.x
From: bucci1@donner.uucp (25853-pastor)
Subject: Re: faking xlock with kill -STOP <X server PID>
Organization: Bellcore, Livingston, NJ
Distribution: usa
Date: Wed, 22 Jul 92 20:33:18 GMT
Summary: What do you mean by X server PID?

In article <1992Jul21.143641.20596@Arco.COM>, cgp@Arco.COM (Chris Phillips  (214) 754-6419) writes:
> Unfortunately xlock doesn't just sleep; it does hinder the
> execution of other processes.  But if the X server is
> SIGSTOPped, won't this have the same effect?  The only drawback
> I see is that you will need to login somewhere else and send it
> a SIGCONT.
> 
> Of course, keystrokes are not ignored and you should do something
> like
> 	$ sleep 5; kill -STOP <X server PID>
> 
> Then move the pointer to the root window.
> Are there any security problems with this?
> 
> Chris

We were wondering exactly what you meant by "X server PID".  When we 
used the PID for the window manager, the applications still ran, but all
input was locked out.  If we stopped the original ksh, the window manager
still allowed the user to close the window of the original xterm (and thus 
terminate that display completely).

What we are looking for is a way to either hide that xterm icon, or to disable 
the close ability on it, but still allow users to work with the other 
applications with the touch screen.

Thanks

Robert Buccigrossi (bucci1@donner.cc.bellcore.com)
Xref: sparky comp.windows.x:14164 comp.windows.x.intrinsics:121
From: sas@calmasd.Prime.COM (Shirley Sloper)
Newsgroups: comp.windows.x,comp.windows.x.intrinsics
Subject: X graphics question
Keywords: Ximage, pixmap
Date: 21 Jul 92 22:11:40 GMT
Followup-To: comp.windows.x
Distribution: usa
Organization: Computervision, San Diego, CA


Hi,

I need help with a graphics application I am porting to X11R4,
Athena widgets (platforms: sun/sparc, DEC)

The application displays a 512x512 pixel image and 
updates areas of the image.  The graphics module receives
one row at a time to display. The data consists of
an array of colormap indices, the column and row of the first
pixel to display and the number of pixels to display. 

	raster_write_row(pixelBuf, count, x, y)
	char	*pixelBuf;
	int	count,x,y;

I am currently creating an Ximage of width count and height 1, 
putting the image in the window, and then destroying the 
image.  

This works, but there's a better way, right? I'm confused by
images, what kind of image should I be creating? How does the
image relate to a pixmap?  Is there a good reference on this?
Or a pd program that does something similar?

Thanks for any help (remember, be nice...)

Shirley
-- 
********************     Shirley Sloper     *******************
*            sas@calmasd.prime.com  (619) 587-3186            *
* Computervision, a division of Prime Computer, San Diego, CA *
***************************************************************
Newsgroups: comp.windows.x
From: mouse@thunder.mcrcim.mcgill.edu (der Mouse)
Subject: Re: How can I display a cursor glyph as a bitmap?
Organization: McGill Research Centre for Intelligent Machines
Date: Wed, 29 Jul 92 23:51:03 GMT

In article <Brv1tr.3pw@news.cso.uiuc.edu>, hofmann@cs.uiuc.edu (J. Scott Hofmann) writes:

> I need to display a remote user's cursor glyph on my display.  Is
> there any way, given the index (ie XC_target, XC_dot) I can display
> the glyph just as a bitmap?

If you're certain the cursor is one of the standard font cursors (the
ones created with XCreateFontCursor, with XC_ names), then you can just
render the relevant character from the font called "cursor" into a
bitmap and read it back with XGetImage.  (The XC_ define is the index
of the picture; add one to it to get the index of the mask.  Both are
simply glyphs in the font.)

You *must* know how the cursor was created.  There are at least three
ways to create cursors, one of which allows the client to use arbitrary
bitmaps.  There is no way to discover what a cursor looks like after
the fact; you must go back and work out what it should look like, given
how it was created.  (Standard font cursors make this easy.)

					der Mouse

			    mouse@larry.mcrcim.mcgill.edu
Subject: Re: GXcopy and GXxor
Organization: University of Maine System
Newsgroups: comp.windows.x
From:    michael@maine.maine.edu (Michael Johnson)
To:      NETNEWS@MAINE
Date:    Fri, 24 Jul 92 09:51:49 EDT

In article <xia.711911424@odin> xia@molbio.ethz.ch (Xia Tai-he) writes:
>I have created a GC with function GXcopy and another GC with GXxor for
>drawing rubber-band lines,
>I also set the foreground colors for the two GCs. When I
>draw lines with the first GC, I get the correct color.
>However, the lines drawn with the second GC don't have
>the color I have set, whose colors differ depending on the
>objects alreay existing on the screen. Could you give
>me a suggestion to get rid of it?

There's not really much you can do about it. When you XOR the pixels, the
resulting pixel value is going to yield whatever color that pixel maps to.
Do you understand what an XOR operation is?

I find that a useful value for rubber-banding with XOR is -1, cast to Pixel.
This usually yields a consistent color (usually black, though I've seen cases
where an application actually allocated pixels that high, resulting in a
different color).

Michael Johnson, VM Systems Group                     michael@maine.maine.edu
"I will choose the path that's clear. I will choose Free Will." -- Neil Peart
From: gerard@dps.co.UK (Gerard O'Driscoll)
Newsgroups: comp.windows.x
Subject: Specifying colormap resources
Date: 23 Jul 92 12:17:56 GMT
Organization: The Internet


I have a server which allows both 8 and 24 bit deep visuals on the same screen.
Given that I have started the server with a default 8 bit PseudoColor visual
root window, the question is, how do I start a standard X client (e.g. xterm)
which uses, say, a 24 bit TrueColor visual?

The visual and the depth can be specified as resources but it seems that Xt
provides no means for specifying colormap resources, other than from within
the source code itself (there's no string to colormap converter for instance).
So for a given widget we inherit the colormap from the parent, but of course
CreateWindow fails since the parent colormap and the visual are
incompatible. Is Xt lacking or have I missed something? Are there any widget
sets which provide such a capability?

I guess the next question is, what would a colormap resource look like:
Colormap id, resource name of standard colormap? And who creates it in the
first place, xstdcmap, the server?

Replies directly to me if possible.

gerard@dps.co.uk
From: richardp@otc.otca.oz.au (Richard Pulley)
Newsgroups: comp.windows.x.intrinsics
Subject: Re: Drawing with athena
Keywords: Athena
Date: 24 Jul 92 00:57:37 GMT
Reply-To: richardp@otc.otca.oz.au (Richard Pulley)
Organization: R&D, OTC Sydney, Australia

>I'm currently having two largish problems with the Athena widget set, but
>I'll just ask the one for the moment. Is it possible to use the normal
>XLib drawing functions (XFillRectangle, XDrawPoint etc) on a widget
>created under the Athena set. I've tried doing various things with the
>bitmap of a label, and using XtWindow(label_widget) to draw upon, to
>no avail. I know there is a drawing area widget with Motif, but there
>seems to be no equivalent.

Yes, some time last year I was faced with the same problem. The Athena
widget set has no "canvas" widget like other sets do. The way I solved
it was to create a pixmap the same size as a label widget that has already
been realised. Then you draw on the pixmap, and at appropriate intervals
you update the resources for that label, giving it the pixmap as its
background pixmap. Xfig, for example, does it this way. If you have to
do many updates in a short period of time, some loss of performance will 
result. I was doing rubberbanding - moving an object with connections to
other objects, and the object & connections moved as I moved the mouse.
It was quite good until I got several connections, however it was still
acceptable.

Richard.
-- 

=====================|   richardp@otc.otca.oz.au   |=====================
                             :                ___________________________
     ;__.  :                 : (612)          |\                       /|
    _/  |  |\                :                | \                     / |
  _/    \__| \.         _____:___________     |  \___________________/  |
 /             \       /   ___________   \    |      Richard Pulley     |
,!              \      \_ /           \ _/    |        OTC  R & D       |
 \              !  .     !  287-3182  !       |     231 Elizabeth St,   |
  \    ___^.    +=======/ \___________/       |      Sydney 2001        |
   \__/     \__/  (02)                        |_________________________|
             ..
              0
=========================================================================
From: rlb7h@rlbsun.ee.Virginia.EDU (Robert L. Blackburn)
Newsgroups: comp.windows.x.intrinsics
Subject: Help with cascade button translations
Date: 21 Jul 92 22:03:34 GMT
Organization: University of Virginia
Originator: rlb7h@rlbsun.ee.Virginia.EDU

I would like to modify some cascade buttons to add some of the functionality
of a pushbutton.  Specifically, I would like to add a translation (actually,
override a translation, but I don't think that's important) which would cause
the cascade button to act as if it were a pushbutton that had been activated,
i.e. activate it's callbacks and if it is part of a pulldown menu (as is often
the case) make the menu go away (disarm action?).

I suspect that I need to do one of two things:

1)

    XtParseTranslationTable( "<event>:	<name1>()" );

or 2)

    XtActionsRec
	actions_list[] = { { "<name2>",	(XtActionProc) <proc_name> } };
    XtAddActions( actions_list, XtNumber( actions_list ) );
    XtParseTranslationTable( "<event>:	<name2>()" );

And then, of course, call XtOverrideTranslations() in either case.

The first case would be handier if there were already an appropriate action
(<name1>), but I have not been able to determine what that action is.  (I have
tried "Activate", "activate", "BtnUp", and a few others for <name1>.  In every
case, I get a runtime message, e.g., 
	"X Toolkit Warning: Actions not found: BtnUp"
when the menu/button is constructed.  When <event> occurs, the menu goes away
but my callbacks are not activated.)

For the second case, I would need to find out what pre-existing function
name(s) I can put in for <proc_name> that will do what I want.

Please email responses to "blackburn@virginia.edu" as I am not a regular
reader of this group.

Thanks in advance for any suggestions.

-rlb
-- 
Robert L. Blackburn			      Dept. of  Electrical Engineering
Assistant Professor			      Thornton Hall, Univ. of Virginia
804-924-6079				      Charlottesville, Virginia  22903
blackburn@virginia.edu
Newsgroups: comp.windows.x.intrinsics
From: shmdgljd@rchland.vnet.ibm.com (Jay Schmidgall)
Subject: Re: XmNsubMenuId and other menu contortions in Motif
Date: Thu, 23 Jul 1992 14:10:31 GMT
Reply-To: jay@vnet.ibm.com
Disclaimer: This posting represents the poster's views, not necessarily those of IBM
Organization: IBM Rochester, MN

In article <1992Jul23.015519.25448@nas.nasa.gov>, dwallach@loch.nas.nasa.gov (Dan Wallach) writes:
|>     form = XtVaCreateManagedWidget("form", xmFormWidgetClass,
|> 				   top,
       [...]
|>     cascade = XtVaCreateManagedWidget("cascade", xmCascadeButtonWidgetClass,
|> 				      form,
       [...]
|>     menu = XmCreatePulldownMenu(cascade, "menu", NULL, 0);
|> 
|>     /*  
|>      *  my code blows up here
|>      */
|>     XtVaSetValues(cascade, XmNsubMenuId, menu, NULL);
|> 

I think the problem is that the subMenu of a cascade button must have the same
parent as the cascade button, rather than being a child of the cascade, i.e.,

       menu = XmCreatePulldownMenu(form, "menu", NULL, 0);
-- 
: jay          jay@vnet.ibm.com    My opinions and ideas, not my employer's.
: shmdgljd@rchland.vnet.ibm.com    (c) Copyright 1992.  All rights reserved.
From: gdmr@dcs.ed.ac.uk (George Ross)
Newsgroups: comp.windows.x.intrinsics
Subject: Re: Drawing with athena
Keywords: Athena
Date: 24 Jul 92 09:06:05 GMT
Organization: Department of Computer Science, Edinburgh University

In article <140@quark.ansto.gov.au>, davidc@quark.ansto.gov.au (David Carroll) writes:
> Is it possible to use the normal
> XLib drawing functions (XFillRectangle, XDrawPoint etc) on a widget
> created under the Athena set.

Just use a Core widget.  Catch the Expose events using either the translations
mechanism or an event handler.
-- 
George D M Ross, Department of Computer Science, University of Edinburgh
     Kings Buildings, Mayfield Road, Edinburgh, Scotland, EH9 3JZ
Tel: 031-650 5147   Internet: gdmr@dcs.ed.ac.uk   JANET: gdmr@uk.ac.ed.dcs
From: davidc@quark.ansto.gov.au (David Carroll)
Newsgroups: comp.windows.x.intrinsics
Subject: Drawing with athena
Keywords: Athena
Date: 23 Jul 92 01:16:54 GMT
Organization: Australian Nuclear Science and Technology Organisation

Hi, how are you all?

I'm currently having two largish problems with the Athena widget set, but
I'll just ask the one for the moment. Is it possible to use the normal
XLib drawing functions (XFillRectangle, XDrawPoint etc) on a widget
created under the Athena set. I've tried doing various things with the
bitmap of a label, and using XtWindow(label_widget) to draw upon, to
no avail. I know there is a drawing area widget with Motif, but there
seems to be no equivalent.

This sounds like it may be a FAQ, but I have seen no c.w.x.i FAQ list
posted.

Thanks for your time,

                         ^o^

Newsgroups: comp.windows.x.intrinsics
From: qarl@wuecl.wustl.edu (Karl Stiefvater)
Subject: Terminal widget
Organization: Washington University, St. Louis MO
Date: Thu, 23 Jul 1992 19:34:40 GMT


I am looking for a terminal widget (pty interface) which will give me:

	Most of the features of xterm
	The ability to set the color of reverse video, bold, underline,
		etc.

Anyone have any ideas?

- Karl
From: cluther@morticia.cnns.unt.edu (Clay Luther)
Newsgroups: comp.windows.x.intrinsics
Subject: Help with Signals: Novice has 2 questions.
Date: 24 Jul 92 17:37:44 GMT
Organization: University of North Texas

PLEASE EMAIL ALL REPLIES TO cpearce@nemesis.acs.unt.edu.
I AM NOT THE AUTHOR OF THIS POST.

Newsgroups: comp.windows.x.intrinsics
Subject: Novice has 2 questions.

I have two questions regarding a complicated problem. I need to be able to
perform interprocess communication from one X program to another. The first
X program I will be writing myself, but the second one, though I can add
code to it, does not provide access to any of the underlying X widgets...
here's a picture of the second programs architecture.

    +-------------
    | Private code that manages the X display
    +-------------
    | Public code called from the Private code.
    | No X information is passed up from the Private code.
    +-------------

For the interprocess communication, I believe that signals cannot be used due
to basic incompatibility with either X or the manner in which the second
program's architecture was built.

In a previous posting to comp.x.windows.motif, many people mentioned using
XtAppAddInput as a solution for the interprocess communication.

Here are the questions:

    1) XtAddAppInput expects me to pass an application context as the
       first argument. Since I have no X information passed to me
       explicitly, I am unable to use this function, unless I can
       somehow determine what the 'current' application context is...
       actually, even just one of the widgets would do, I believe.
       Is there a way for me to get the app_context with a call to
       X or Xt (or Xm)?

    2) An obsolete call exists: XtAddInput, which requires no application
       context. I tried using XtAddInput to implement the communication,
       but the target routine was never called. Why is XtAddInput obsolete?
       Why didn't it work? (I *am* issuing this XtAddInput call from
       within the Main Loop, I believe. I *can* register a new input from
       within the main loop, can't I?)

That last question is obviously a set of related questions, but I am too
clueless to know precisely what I should be asking...

Any help would be appreciated! Thanks to everyone who has helped me so far --
you've been very helpful. If I ever get this problem resolved, I'll try to
summarize it!

-- 
Chris Pearce -- cpearce@nemesis.acs.unt.edu

-- 
Clay W. Luther                                                (214) 994-1377
Internet: cluther@morticia.cnns.unt.edu                    Applelink: PDSDEV
Macintosh/Unix Programmer for Vortech Data, Inc.
"I think the word you're looking for is AAAAAAAAAHHHHHHHHHH!"
Newsgroups: comp.windows.x.intrinsics
From: dgreen@sti.com (Dan R. Greening)
Subject: Re: TopLevelShell, ApplicationShell
Organization: Software Transformation, Inc.
Date: Thu, 23 Jul 1992 22:08:36 GMT

In article <1311@speedy.ada.cci.de> gross@speedy.ada.cci.de (Arno Gross) writes:
>We want to open two or more windows from one application.
>The application should be ended after closing the last window.
>All hints are welcome.

Open a single unmapped window with XtAppCreateShell, using the resource
"unmappedWnenManaged" set to False.

Then for every window you want to open with the application, use

  widget1 = XtCreatePopupShell( "widget1", topLevelShellWidgetClass,
				appShell, args, n );
  XtPopup( widget1 );
  popupcount ++;

You have to keep count of the popups yourself.  When all the popups are gone,
XtDestroy the app widget, and quit the application.
-- 
____
\  /Dan Greening    Software Transformation   1601 Saratoga-Sunnyvale Rd, #100
 \/dgreen@sti.com   (408) 973-8081 x313       Cupertino, CA 95014
From: J.K.Wight@newcastle.ac.uk (Jim Wight)
Newsgroups: comp.windows.x.intrinsics
Subject: Re: Problem with new resource in derived widget
Date: 23 Jul 92 08:59:00 GMT
Organization: University of Newcastle upon Tyne, UK, NE1 7RU

J.K.Wight@newcastle.ac.uk (Jim Wight) writes:

>I am trying to get an application to work at R4 as well as R5, but
>have hit a problem with a widget I've derived from the Athena
>MenuButton widget. One of the reasons for the new widget is to add a
>help resource. The implementation file contains this bit of code:

>#define offset(field) XtOffsetOf(AxeMenuButtonRec, axeMenuButton.field)
>static XtResource resources[] = {
>  {XtNhelp, XtCHelp, XtRString, sizeof(String),
>     offset(help), XtRString, NULL},
>};   
>#undef offset

>The problem I am having is that at R4 (patchlevel 18) I get the message

>Warning: Representation size 4 must match superclass's to override help
> 
>and the resource is not able to play its intended role.

All of you who have been beavering away trying to solve that problem for me
will be pleased to hear that you can now cease your toils :-) I have managed to
get round it by treating the resource as a subresource.

Jim
---
J.K.Wight@newcastle.ac.uk
Computing Laboratory, The University,                    Tel: +44 91 222 8238
Newcastle upon Tyne, NE1 7RU, United Kingdom.            Fax: +44 91 222 8232
From: vojta@powdermilk.berkeley.edu (Paul Vojta)
Newsgroups: comp.windows.x.intrinsics
Subject: Re: Viewable region of a Viewport widget
Date: 25 Jul 1992 21:55:07 GMT
Organization: U.C. Berkeley Math. Department.
NNTP-Posting-Host: powdermilk.berkeley.edu

In article <l6m9jcINN33i@spim.mips.com> koblas@mips.com (David Koblas) writes:
>It is easy enough to get the X, Y offset to the top corner of the
>viewport, but the problem is how do I determine the width/height
>of the viewable region (a strange expose event processor?)

Get the size of the "clip" subwidget.

--Paul Vojta, vojta@math.berkeley.edu
Newsgroups: comp.windows.x.intrinsics
From: dbl@osf.org (David B. Lewis)
Subject: Re: Drawing with athena
Keywords: Athena
Organization: Open Software Foundation
Date: Fri, 24 Jul 1992 12:40:13 GMT

|> >no avail. I know there is a drawing area widget with Motif, but there
|> >seems to be no equivalent.


----------------------------------------------------------------------
Subject: 115)  What widget is appropriate to use as a drawing canvas?

	Some widget sets have a widget particularly for this purpose -- a
WorkSpace or DrawingArea which doesn't display anything but lets your Xt 
application know when it has been re-exposed, resized, and when it has received
user key and mouse input. 
	The best thing to do for other widget sets -- including the Athena set 
-- is to create or obtain such a widget; this is preferable to drawing into a 
core widget and grabbing events with XtAddEventHandler(), which loses a number 
of benefits of Xt and encapsulation of the functionality .  At least one 
version has been posted to comp.sources.x (name???). The publicly-available 
programs xball and xpic include other versions. And the Athena Widget manual 
(mit/doc/Xaw/Template in the R5 distribution) includes a tutorial and source 
code to a simple widget which is suitable for use.

----------------------------------------------------------------------

-- 
David B. Lewis  	Temporarily at and certainly not speaking for OSF.
by day: dbl@osf.org			by night: david%craft@uunet.uu.net
From: jgmjo@goofy.lahabra.chevron.com (Glyn M. Jones)
Newsgroups: comp.windows.x.intrinsics
Subject: Re: XmFileSelectionBox
Keywords: XmFileSelectionBox, Motif
Date: 22 Jul 92 21:46:00 GMT
Distribution: comp.windows.x.intrinsics
Organization: Chevron Oil Field Research Company

In article <Br33pD.50J@hsi.com>, waligora@hsi.com (Robert Waligora) writes:
|> How do I get the CallbackStruct for my FileSelectionBox. I created a
|> XmFileSelectionBoxWidget, and defined a callback for the OK button.
|> When the OK button is pressed, my callback fires up, but the CallbackStruct
|> is the struct for the PushButton, not the FileSelectionBox. So, how
|> do I get the FileSelectionBoxCallbackStruct from inside the Callback.
|> Also, I'm assuming that the value field is the filename entered in the
|> FileSelectionBox. Is this true?
|> -- 
-- 
The following works:

...
    widget_0 = XmCreateFileSelectionBox (parent, "widget_0", arglist,n);
    XtAddCallback(widget_0,XmNokCallback,fopen_ok_callback,NULL);
...
}

void 
  fopen_ok_callback(w, clientData, callData)
Widget w;
caddr_t clientData;
caddr_t callData;
  {
    Arg arglist[10];
    int n = 0;
    XmString *str;
    
    /* retrieve currently selected file in FileSelectionBox as XmString */
    
    XtSetArg(arglist[n], XmNtextString, &str); n++;
    XtGetValues(w, arglist, n);
...
  }

 +----------------------------------------------------------+
 Glyn Jones, Geophysics Division            jgmjo@chevron.com 	
 Chevron Oil Field Research Co.           Tel: (310) 694-7137 	
 La Habra, California 90633-0446          Fax: (310) 694-7063 	
Newsgroups: comp.windows.x.intrinsics