[comp.windows.open-look] Unmodifying a Text Subwindow

Lovstrand@EuroPARC.Xerox.COM (Lennart Lovstrand) (11/10/90)

Yo, folks.  I just recently begun doing XView programming and I'll start by
apologizing if this has been hashed before.  (BTW, Is there a FAQ for writing
XView applications?)

The short question: Is there some way to explicitly mark a text subwindow as
*not* having been modified?  Ideally, what I would like to do is:

	xv_set(textsw, TEXTSW_MODIFIED, FALSE, NULL);

but that doesn't seem to be supported, at least not with XView/OpenWindows 2.0
on a SPARCstation-1 with SunOS 4.0.3c.

The long justification: I have a couple of different applications that load
some data from a server and display it in a text subwindow [without going via
a file].  Now, in one of them the textsw is just used as a text display and
the user will never be able to change anything in it.  Thus, having to verify
a "you have unsaved changes" notification when exiting the application is not
quite appropriate.  I've fixed this by intercepting the destroy event sent to
the parent frame and doing a textsw_reset() at that time, but that seems like
a bit of a kluge.

The other application performs a similar task, but allows the user to
optionally edit the displayed data and put it back to the server.  Obviously,
here I would really like to know if the user touched the data or not before
deciding to throw it away, but what would be the appropriate way to do so?

I've RTFMed volume 7 of the O'Reilly books forwards and backwards, but with no
avail.  Is there any other good doc on XView?  Volume 7 can be pretty patchy
at times, so pointers to good solid reference material would be great.

Thanks,
-- 
--Lennart <Lovstrand@EuroPARC.Xerox.COM>		R   _A _  N_   K
Rank Xerox EuroPARC, 61 Regent St, Cambridge, UK	\/ |_ |_) | | \/
Zany, Sun-4/60 at EuroPARC, SunOS Release 4(0.3c)-3	/\ |_ | \ |_| /\
TOPS-20 Command processor 7(99)-12 [alpha]		E u r o  P A R C
--
--Lennart <Lovstrand@EuroPARC.Xerox.COM>		R   _A _  N_   K
Rank Xerox EuroPARC, 61 Regent St, Cambridge, UK	\/ |_ |_) | | \/
Zany, Sun-4/60 at EuroPARC, SunOS Release 4(0.3c)-3	/\ |_ | \ |_| /\
TOPS-20 Command processor 7(99)-12 [alpha]		E u r o  P A R C