HDTenEightyP/NetNews huggingface dataset:
From: console@eng.umd.edu (Console)
Subject: Dynamic Scrollbars and CMS
Date: Thu, 05 Nov 92 15:23:29 GMT
Organization: Project GLUE, University of Maryland, College Park
Distribution: usa


	I am facing two prblems with xview.  The first involves
attaching srollbars to windows:

	If I have a pair of (vert + horiz) scrollbars and several
windows that use them exclusively (hence only two objects need to be
created), what is the correct procedure for dynamically attaching the
scrollbars to the windows?  When I attach them using an xv_set to a
client, strange things happen: sometimes the scrollbar shows up around
the canvas, but it has not effect on it; there is a rectangular square
at the corner made by the scrollbars ... etc.

	The second problem I am having has to do with the CMS.  When I
try to change a subwindow's color values, the parent's color values
also change.  I am not sure why that is happening.  The WIN_CMS
returned by xv_get is different for the two windows and so is the
color index table address.  My objective is that given an Xv_window, I
want to be able to change specific color value entries for that window
only.

	All help would be really appreciated.

PD
Newsgroups: alt.toolkits.xview
From: lee@sq.sq.com (Liam R. E. Quin)
Subject: Re: windows locked out
Keywords: xview notifier
Organization: SoftQuad Inc., Toronto, Canada
X-Feet: bare
Date: Tue, 10 Nov 92 09:32:39 GMT

luisv@idea3.pue.udlap.mx writes (with _very_ long lines):
> We are developing a programming environment based on Prolog running under
> SunOS release 4.1.1.  The interface is written on top of Xview.  When running
> a user query we lock out all buttons so that nothing that the user can do can
> interfere with the running of his query.  Queries are activated by way of a
> button which results in an event activation under control of the notifier.
> If the user query should happen to enter an infinite loop, we have noticed
> that any attempt to activate any button of the environ
> ment will cause all interaction with all windows to be locked out,
> necesitating the killing of the Prolog environment process from a different
> terminal.

Perhaps I should put something about this in the open-look FAQ.  I've been
trying to avoid making the comp.windows.open-look FAQ subsume the XView one,
as someone was writing an XView FAQ< but I've never seen it.

In any event, this is a common problem when you have callbacks that do a
lot of work.

There are several solutions.

The best of them all is tipified by a NeWS/TNT program.  This doesn't help,
as Sun seems about to throw away everything it learned from TNT, but here's
the idea:

GUI process <------------- asynchronous link -------------> work process

In the HCI literature this sort of split is called the separable user
interface.  The idea is to isolate the user interface part as much as
possible from the compute-intensive part.

One way to do this in XView is to have two processes and use sockets.
There's an excellent book by John Bloomer that discusses this and gives
XView examples.


OK, you say, but my prolog program is part of a UI scripting system and
really does belong in the same memory space as the UI code itself.

Two other things you can do in XVIew are as follows:
[1] leave the notifier.  Use notify_stop().  This makes xv_main_loop()
    return in main() (or wherever).  So do this:

    for (;;) {
	xv_main_loop(main_frame);
	if (work_flag) {
	    do_a_bit_of_work();
	}
	if (exit_flag) {
	    break;
	}
    }

    Then in do_a_bit_of_work you call the notifier periodically to deal
    with events.

[2] set XV_BUSY, TRUE on your main window, and then clicking the buttons
    won't do anything.  This means you can't have a "stop" button, though.

Lee

-- 
lee@sq.com (Liam Quin) the barefoot programmer; SoftQuad Inc +1 416 239 4801
 OPEN LOOK UI FAQ; Metafont list; HexSweeper NeWS game; lq-text text retrieval
``They thought him, and they justly thought him, one   [lq-text-request@sq.com
  Sent to do more than he appeared to have done.''   Wm. Cowper, Conversation
Newsgroups: alt.toolkits.xview
From: lee@sq.sq.com (Liam R. E. Quin)
Subject: Re: Is XView worth it?
Organization: SoftQuad Inc., Toronto, Canada
Date: Tue, 10 Nov 92 05:11:06 GMT

viswanm@jasper.CS.ORST.EDU (Mahesh Viswanathan) writes:
>I am just getting started on XView, and wanted to know:
>
>	Is learning XView worth it?

Yes, absolutely.

> On first glance, it seems simpler than Motif.
It's simpler to use, more powerful, and less buggy.

> However, from the
> quick perusal that I did on this newsgroup, it seems that
>the future of XView itself is questionable.
This is no more than a rumour.  Don't worry about it -- even if Sun drops
XView entirely (and they won't -- they use it themselves!) -- the source
is free, available for anonymous ftp from export.lcs.mit.edu in /contrib.

XView is a good introduction to X programming.

> Since XView
>applications seem to run under Motif, could XView be used
>as a quick way of writing applications?

yes, absolutely.  You will need Dan Heller's book, Volume 7 in the O'Reilly
series on X.  It's in 2 volumes now, a green one and a thinner blue one.
You'll also want vols 0, 1 and 2 in the same series, whichever toolkit
you learn.

> Also, is XView saleable? I see several job offers for X/Motif
> programmers, but not so many for XView experienced programmers.

Once you know XView, you'll find it less of a pain to learn Motif if you
have to.  If this is a big worry, get Nabajyoti Barkakati's book on OPEN LOOK,
pub. by SAMS, and learn OLIT.  Then you'll be able to use the Motif-capable
version, MoOLIT, later.  Doug Young and John Pew's book on OLIT is also good,
but if you get that one you *must* also read the OPEN LOOK UI spec &
application style guideline books.

I'd start with XView, though, because it's the least pain, it's public
domain, and is actually pretty powerful.

There are a *lot* of Sun systems out there.  And they all come with XView.

Lee

-- 
lee@sq.com (Liam Quin) the barefoot programmer; SoftQuad Inc +1 416 239 4801
 OPEN LOOK UI FAQ; Metafont list; HexSweeper NeWS game; lq-text text retrieval
``They thought him, and they justly thought him, one   [lq-text-request@sq.com
  Sent to do more than he appeared to have done.''   Wm. Cowper, Conversation
Newsgroups: alt.toolkits.xview
From: lynda@ssd.kodak.com (Lynda J. Bowen)
Subject: getting notified with message Q's
Originator: lynda@windom
Organization: Eastman Kodak
Distribution: usa
Date: Thu, 5 Nov 92 20:03:05 GMT

I am working on an xview application that will use message Q's for
interprocess communication.  I want to my application to be "woken up"
when someone puts a new message into the messageQ.  Does anyone know an
easy way to do this ?

I know it can be done using notify_set_input_func if the interprocess
communication method involves file descriptors - but I am using message
Q's ....

Can anyone help me ....

Please reply via e-mail.  I do not subsribe to this news group. 

Thank You in advance for any help you might be able to give me.

Lynda


-- 
E-mail: lynda@ssd.kodak.com	       Phone : (716) 253-7522
And it is still true, no matter how old you are - When you go out into the
world, it is still best to hold hands and stick together.  -Robert Fulghum
From: das@ccwf.cc.utexas.edu (Suman Das)
Newsgroups: alt.toolkits.xview
Subject: Changing the font in Sun's SourceBrowser
Keywords: sbrowser, font
Date: 12 Nov 92 05:11:42 GMT
Reply-To: das@ccwf.cc.utexas.edu (Suman Das)
Followup-To: das@ccwf.cc.utexas.edu
Organization: The University of Texas at Austin

Has anyone out there been able to change the font for Sun's
SourceBrowser supplied with their C++ compiler CC ?

I tried various methods, including command line arguments such as 
%sbrowser -font screen-bold 
or
%sbrowser -fn screen-bold
as well as entries in the .Xdefaults file such as
sbrowser.font: screen-bold
but this only changed the font on the menus and text entry field. The
font in the "source display" subwindow and the "query matches" subwindow
remains at the default font "fixed".

Any help in this problem is appreciated.


---Suman Das
---The University of Texas at Austin
das@ccwf.cc.utexas.edu











Newsgroups: alt.toolkits.xview
From: corbet@sargon.astro.psu.edu (Robin Corbet)
Subject: text items and Escape
Reply-To: corbet@astro.psu.edu
Organization: Penn State University.
Date: Fri, 6 Nov 1992 15:33:37 GMT

Is it possible to have a panel text item accept
a string of characters which inclues the Escape character?

At the moment I can't either type it or copy and paste a
string containing Escape.

Thanks,
	Robin
	corbet@astro.psu.edu
Newsgroups: alt.toolkits.xview
From: kloeck@research.nj.nec.com (Erwin Klock)
Subject: Q: How to display kanji in TEXTSW?
Originator: kloeck@frege
Organization: NEC Research Institute
Date: Thu, 12 Nov 92 16:08:43 GMT

Is it possible to display kanji in a TEXTSW, and if so, how.

I can install the kanji font allright but I can only access
the usual ascii characters. How do I access the two byte characters?

Thanks for your help.

Erwin


-- 
--------..----------------------------------------------------------- 
Erwin Klock                         phone:             (609) 951-2748
NEC Research                        fax:               (609) 951-2482
Princeton NJ                        email: kloeck@research.nj.nec.com   
Newsgroups: alt.toolkits.xview
From: akpatel@uncc.edu (Alpesh K Patel)
Subject: Simple Question about Panels	
Keywords: Panels -- Xview
Reply-To: akpatel@uncc.edu
Organization: University of NC at Charlotte
Date: Thu, 12 Nov 1992 02:38:22 GMT

	To Xview gurus,

	I am new to xview and have a simple question
	I would like to invoke a simple kind of printing on a panel
	
	For example:
	I will create a simple push button like this
	
	 test2= xv_create(panel,PANEL_BUTTON,
        XV_X,           140,
        XV_Y,           80,
        PANEL_VALUE,    2,
        PANEL_LABEL_STRING,     " 2 ",
        PANEL_NOTIFY_PROC,      two_selected,
        PANEL_CLIENT_DATA,      frame,
        XV_KEY_DATA,            NUMBER_TWO, 2,
        NULL);

	How can I print a "2" right beside the Panel_button when the 2-button is pressed.
	Real simple for some of you.

	Any help would be deeply appreciated.

	
	

Newsgroups: alt.toolkits.xview
From: etljmme@etlxd10h.etlxd (jim moore xd/nda)
Subject: Re: Printing from within an Xview program
Reply-To: etljmme@etlxd10h.etlxd
Organization: Ericsson
Date: Wed, 11 Nov 1992 10:28:55 GMT

I must admit, despite the warning in the XView documentation, I have been using
system calls in my Xview apps. (quite extensively in some).  I have _never_ had
any problems doing this although this may be just luck.  My suggestion: go for it!

Good luck, Jim
From: rickg@eng.sun.com (Richard Goldstein)
Newsgroups: alt.toolkits.xview
Subject: Re: help on text items!!!
Date: 5 Nov 92 15:27:57 GMT
Reply-To: rickg@eng.sun.com
Organization: SunSoft, Inc.
NNTP-Posting-Host: nheeghee
In-reply-to: murrays@Tymnet.COM's message of 5 Nov 92 00:43:12 GMT


   From: murrays@Tymnet.COM (Scott Murray)
   Newsgroups: alt.toolkits.xview
   Date: 5 Nov 92 00:43:12 GMT
   Organization: BT North America, San Jose CA.


   I was wondering if anyone out there has found a way to have
   the arrow boxes that appear on text items work in such a way
   that if you hold the mouse button down while on the arrow the
   carret moves until the button is released?

what you need (aparently) is a newer libxview than you
currently have 8^).


   Also, how can I get a text string that has part of it hidden when it
   is inserted into a text item to have the end of it hidden instead 
   of the beggining?

about all you can do with the current API is to invoke the
text item's event handler with a ACTION_LINE_START event.
this makes the text item think someone typed a ^a into it.


<<tank



--

*********************************************************************

	Richard M. "Tank" Goldstein		rickg@Eng.Sun.COM
	Window Developer Environment,
	SunSoft, Inc.

	"I don't practice what I preach because I'm not the kind
	of person I'm preaching to"

				-"Bob" in Newsweek

*********************************************************************
Newsgroups: alt.toolkits.xview
From: kalt@nmsu.edu (Kerry Alt)
Subject: bug with abbreviated menu??
Organization: NMSU Computer Science
Distribution: alt.toolkits.xview, comp.windows.open-look
Date: Tue, 10 Nov 1992 23:51:26 GMT

When I set a PANEL_ABBREV_MENU_BUTTON to be greyed out using the 
PANEL_INACTIVE attribute, a very strange thing happens. The button's
label is greyed out, but the button itself appears to be normal. More
odd still, the button acts as though it is inactive (unresponsive to
mouse clicks). If I set PANEL_INACTIVE to be false, the label appears
normal, the button looks the same, but one can now pull down the
associated menu. 

Is this a bug? If so is there a patch? If it isn't a bug, could
someone clue me in on my error?

Thanks,

kerry
--

**************************************************************
**  Kerry Alt                    email:    kalt@nmsu.edu    **
**  New Mexico State University  office:   505/646-3645     **
**  Box 30001/3CS                fax:      505/646-6218     **
**  Las Cruces, NM 88003-0001    home:     505/524-7247     **
**************************************************************
From: joyce@apple.com (Joyce Wermont)
Newsgroups: alt.toolkits.xview
Subject: Xlib calls from XView
Date: 6 Nov 92 04:55:17 GMT
Organization: Apple Computer Inc, Cupertino, CA


I'm having trouble combining Xlib calls with XView. I'm trying to
display a pixmap, created with Xlib, into a canvas paint window
created with XView. The problem is with color - otherwise, everything
works fine.

First I created a window and attached a canvas to it, using XView.
I then created a 3-color CMS, which I attached to the window. I
created an 8-bit depth pixmap from a bitmap array, containing frame
buffer info (one bit per pixel), using XCreatePixmapFromBitmapData.
Then I created a graphics context and set the foreground color, using
XSetForeground. Last, I copied the image from the pixmap to the
display using XCopyArea.

The image is displayed correctly except that it is in black, rather
than the color I wanted (cyan).

If it will help, here's a code fragment:
-----------------------------------
#include <xview/cms.h>
#include <xview/canvas.h>
	.
	.
	.
	Cms cms;
	unsigned long *pixel;

	cms = xv_create(NULL, CMS,
			CMS_SIZE, CMS_CONTROL_COLORS+3,
			CMS_CONTROL_CMS, TRUE,
			CMS_NAMED_COLORS, "cyan", "yellow", "magenta", NULL, 
			NULL);

	pixel = (unsigned long *)xv_get(cms, CMS_INDEX_TABLE);

	xv_set(window,
		WIN_CMS, cms,
		WIN_FOREGROUND_COLOR, pixel[CMS_CONTROL_COLORS + 0],
		NULL);
        pw = canvas_paint_window(canvas);

 	display = (Display *)xv_get(pw, XV_DISPLAY);
        window_id = (XID)xv_get(pw, XV_XID);
	depth = xv_get(pw, WIN_DEPTH);

	map = XCreatePixmapFromBitmapData(display, window_id, frame, width,
                                          height, 1, 0, depth);

        gc = XCreateGC(display, map, 0, 0);
        XSetForeground(display, gc, pixel[CMS_CONTROL_COLORS + 0]);
        XCopyArea(display, map, window_id, gc, 0, 0, width, height, 0, 0);
-----------------------------------

I'm assuming that the problem is caused in some way by the fact that
Xlib doesn't recognize the XView environment, but I don't know how to
fix it (I've tried many approaches!) Can anyone point out what I'm doing
wrong here? 

Thanks!

Joyce Wermont
joyce@apple.com
Organisation: European Space Operation Centre (E.S.O.C)
Date: Wednesday, 11 Nov 1992 13:05:14 CET
From: <AGRUNES@ESOC.BITNET>
Newsgroups: alt.toolkits.xview
Subject: ttysubwindow menu

Does anyone know how to change a TTYsubwindow menu.  Currently the menu
that appears is entitled 'Term Pane' and has the items Enable Page Mode,
Cut and Paste.If it can't be changed, can it be removed?

Many thanks for you help,

Amanda
Newsgroups: alt.toolkits.xview
From: luisv@idea3.pue.udlap.mx (Luis Villasenor)
Subject: windows locked out
Keywords: xview notifier
Reply-To: luisv@idea3.pue.udlap.mx
Organization: University of Berne, Switzerland
Date: Tue, 10 Nov 1992 00:24:01 GMT


We are developing a programming environment based on Prolog running under SunOS release 4.1.1.  The interface is written on top of Xview.  When running a user query we lock out all buttons so that nothing that the user can do can interfere with the running of his query.  Queries are activated by way of a button which results in an event activation under control of the notifier.  If the user query should happen to enter an infinite loop, we have noticed that any attempt to activate any button of the environ



ment will cause all interaction with all windows to be locked out, necesitating the killing of the Prolog environment process from a different terminal.  

This is a very serious problem for us.  Does anyone have an idea of why this happens and what we can do about it?
From: filfeit@rael.Tymnet.COM (Fil Feit)
Newsgroups: alt.toolkits.xview
Subject: Just a line
Date: 11 Nov 92 15:01:54 GMT
Reply-To: filfeit@rael.Tymnet.COM
Organization: Sun Microsystems


That's all I want to do:  Place a line in the middle of a frame, separating
the top (some panel stuff) from the bottom (related but not closely) stuff.
I know it can be done, but I can't figure out how.  A separate frame for
the bottom portion didn't seem to do it.

--f2
From: chuck@yamada-sun.uucp (Chuck Neal)
Newsgroups: alt.toolkits.xview
Subject: Re: Showing grey scale images using Xview
Date: 3 Nov 92 22:38:16 GMT
Reply-To: chuck@ptl.UUCP (Chuck Neal)
Organization: Phase Three Logic, Inc., Beaverton, OR

In article <1992Nov2.125519.9009@nlm.nih.gov> neve@nlm.nih.gov writes:
>In article 92Oct31145419@stilton.vision.auc.dk, jann@vision.auc.dk (Jan Nielsen) writes:
>>Is there a method to look into the colortable 

>FYI - One of the MIT X client apps is called xshowcolormap. If you can

>It's a shame it doesn't come with Open Windows.

>Leif Neve

OpenWindows has the NeWS application, colormap, which shows the current
colormap in a window.  It must be invoked from the PostScript shell, psh.

-- 
Chuck Neal			Internet: yamada-sun!chuck@nosun.West.Sun.COM
Director of Networking Support	    Uucp: ...!uunet!nosun!yamada-sun!chuck
From: hyler@ast.saic.com (Buffy Hyler)
Newsgroups: alt.toolkits.xview
Subject: Re: Just a line
Date: 12 Nov 92 22:32:10 GMT
Reply-To: hyler@ast.saic.com
Organization: SAIC

In article 92Nov12090418@lion.bear.com, buzz@bear.com (Buzz Moschetti) writes:
>In article <2809@tymix.Tymnet.COM> filfeit@rael.Tymnet.COM (Fil Feit) writes:
>   That's all I want to do:  Place a line in the middle of a frame, separating
>   the top (some panel stuff) from the bottom (related but not closely) stuff.
>   I know it can be done, but I can't figure out how.  A separate frame for
>   the bottom portion didn't seem to do it.
>
>XView doesn't have a "separator" UI element like Motif.  Oh well.  Here's
>something that might work for you, although you'll end up with boxes
>around your UI element clusters instead of just a line:
>1.  Create the frame.
>2.  Create an upper panel and a lower panel.
>3.  Set the panel attribute WIN_BORDER to TRUE on one or both panels.

The way I do this is very similar, but you don't end up with boxes around
the panels.
1. Set the background color of the window to black
2. Create an upper panel and a lower panel.
3. Leave a 3-4 pixel gap between the bottom of the upper panel and the
   top of the lower panel.

This will give you a black "line" between the two panels.

The only drawback to either of the above methods is that since your panel
items are in different panels you can't "tab" from the last item in the
first panel to the first item in the second panel without added code.

---
----------------------------------------------------------------------
Buffy Hyler (hyler@ast.saic.com)
SAIC, Campus Point
San Diego, California
----------------------------------------------------------------------
From: ivory@e7sa.crd.ge.com (John Ivory)
Newsgroups: alt.toolkits.xview
Subject: Printing from within an Xview program
Date: 10 Nov 92 19:23:58 GMT
Organization: Tower Concepts

What is the prefered mechanism for an Xview program sending something to the
printer?  I would typically want to gen a file, and then do a
system call to lpr...

	sprintf(command, "lpr %s", filename);
	system(command);

The Xview documentation however warns against directly using system
calls because of confusions with the Notifier.  I could have the
program fork, and then do an exec call, but that seems like a lot
of effort for the system to go through for such a simple task.

Ideas?  Suggestions?

-----------------------------  R A Z O R ...  --------------------------- \ \ \ 
   Tower Concepts                                          John E. Ivory   \ \
   103 Sylvan Way                                       ivory@crd.ge.com    \ \
   New Hartford, NY  13413                     ivory@e7sa.epi.syr.ge.com     \
   (315) 724-1471                                                             \
-----------------------  A Configuration Management  --------------------------
                         & Problem Tracking System
From: foudil@lynx.cat.syr.edu (Foudil Bey Kamal)
Newsgroups: alt.toolkits.xview
Subject: Panel within a frame with a different color
Date: 6 Nov 92 15:16:41 GMT
Organization: Syracuse University

Hi, I am kind of new to xview, I need to create a panel with a background color different
from the main frame backgroound color. Is it possible to do that?
I need this to implement a series of unfolding menus. This concept would make
it easier to a user to know what he is doing.
thanks
From: dansmith@Autodesk.COM (Daniel Smith)
Newsgroups: alt.toolkits.xview
Subject: Re: Is XView worth it?
Date: 11 Nov 92 00:42:52 GMT
Organization: Autodesk Inc., Sausalito CA, USA

In <1dmnqiINN2bo@flop.ENGR.ORST.EDU> viswanm@jasper.CS.ORST.EDU (Mahesh Viswanathan) writes:
> I am just getting started on XView, and wanted to know:

> 	Is learning XView worth it?

	No.

	Not any more.

	If you want to get experience in the OpenLook arena, OLIT would
be a better way to go (and more transferable to Motif).

	I created this newsgroup (alt.toolkits.xview) a few years back
when I was struggling with porting IslandPaint from Motif to XView.  I wonder
if there's now call for alt.toolkits.olit?

	Things in XView's favor:

	The source is out there, and it's been ported here and there.

	Initially easy to learn, especially for those who know SunView.

	Steven Grimm's Workman is written in it (via DevGUIDE) :-)


	Disadvantages:

	What commercial apps are there based on XView that run on non-Sparc
	platforms?  Ok, maybe a few... but compared to Motif?

	Being phased out over the next few Solaris releases.

	Easy to learn, but when you hit a limitation, you hit it hard.
	Consider how you would do the following:

		make a tool palette of 10 rows by 2 columns.  These are all
		icon buttons.  Handle left *and* right mouse button presses.
		(right button gives you a tool options dialog...see IslandPaint)

		Give up?  I had to make the buttons individually, manage their
		on/off state, look at the x/y positions of events, etc.  What
		a hack!


	I think I'd say that as long as you're in a learning curve, and
in the searching for a job stage in Unixland, go for Motif.  It has a busier
newsgroup/mailing list, more books...more lore out there.  Watch for
the rise of OLIT.

	If I were starting over, and was going by "what's marketable",
I'd learn Windows / Windows NT first, then maybe Motif.  Anyways, just
an opinion from someone who's had a love/hate feeling about XView.

				Daniel
-- 
     Daniel Smith, Autodesk, Sausalito, California, (415) 332-2344 x 2580
	      Disclaimer: written by a highly caffeinated mammal
	    dansmith@autodesk.com            dansmith@well.sf.ca.us