Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

OPEN LOOK GUI FAQ 02/04: Sun OpenWindows DeskSet Questions

0 views
Skip to first unread message

Liam Quin

unread,
Jun 24, 1997, 3:00:00 AM6/24/97
to

Archive-name: open-look/02-deskset
Last-Modified: Feb 1 1996


Sun DeskSet is the collection of tools you get with OpenWindows;
some of these are being ported to Motif for COSE/CDE: cm, mailtool, maybe
others.

[1] What are the default key bindings in textedit and elsewhere?
[2] What can I put in my .ttysrc? Where is it documented?
[3] Is there a tty-based interface to cm (Calendar Manager)?
[4] How can I arrange to have my .signature included in my outgoing mail?

[1] What are the default key bindings in textedit and elsewhere?

See the man page for textedit(1) for some of them.
In general, the editing/moving commands go in the opposite direction when
shifted - e.g. Ctrl+w deletes a word, and Ctrl+W deletes the word to the
right of the insert point.

Meta-i - include file Meta-f - find selection (forward/backward)

Ctrl-a - start of line Ctrl-< - back word
Ctrl-e - end of line Ctrl-> - forward word
Ctrl-w - delete word Ctrl-u - delete to start/END of line
Ctrl-Return - move to end/START of document

See the O'Reilly XView Reference Manual for a list of some of the default
keys; see also the olwm or olvwm manual page.

[2] What can I put in my .ttysrc? Where is it documented?

See the manual page for shelltool.

Subject: DeskSet, Mailtool, Calendar Manager, etc.

[3] Is there a tty-based interface to cm (Calendar Manager)?
Yes, cm_delete, cm_insert and cm_lookup; these all have manual pages.
If "man cm_delete" doesn't work or gives strange messages, see under
Trouble Shooting: Strange Error Messages, below.

On Solaris 2.3, cm_lookup may be broken (and maybe cm_delete & cm_insert
are too), as it always uses a date in 1970 if you give it an invalid date.
The Solaris 2.2 and 2.4 ones seem more tolerant of date formats.

[4] How can I arrange to have my .signature included in my outgoing mail?
The best way is:
$ cd
$ cp /usr/lib/.textswrc .
$ chmod +w .textswrc
edit .textswrc (use vi, textedit, or whatever you prefer)
add the follwing:
KEY_RIGHT(3) FILTER
cat ~/.signature
(you might need to change ~ to $HOME)

Now pressing R3 will insert your .signature file.

[5] How can I get mailtool to send mime messages by default?

Add the following two lines to your .mailrc:
set strictmime
set sendrfc

WARNING: some versions of mailtool (up to and including Solaris 2.3,
maybe 2.4 as well) will corrupt MIME messages that they receive when
you save your mail. There's a patch for this.
Also, the sendrfc and strictmime options are unsupported and undocumented.


[END of deskset FAQ]

# @(#) $Id: ol2.faq,v 1.5 96/02/01 23:03:48 lee Exp $


--
Liam Quin, l...@sq.com | lq-text freely available Unix text retrieval
Senior Technical Consultant | FAQs: Metafont fonts, OPEN LOOK UI, OpenWindows
SoftQuad Inc. +1 416 544-9000 | xfonttool (Unix xfontsel in XView)
http://www.softquad.com/ | the barefoot programmer

Liam Quin

unread,
Jun 24, 1997, 3:00:00 AM6/24/97
to

Archive-name: open-look/03-xview
Last-Modified: Jun 7 1996


This is a new FAQ.

Contributions will be welcomed; mail them to l...@sq.com (Liam Quin),
preferably including "XView FAQ" in the Subject line.

Contents:
Sources Of Information:
The Future of XView
Scrolling Lists
How do I keep a pop-up window displayed after a button is pressed?
how do I make an XView button look pressed?
OpenWindows 3 imake doesn't work properly
The pop-up menu in my canvas has funny colours
The second ttysw in my program doesn't work
How do arrange to have a (Cancel) button to stop a calacuation?
How do I put panel items on a canvas?


Subject: Sources Of Information:
netnews newsgroups:
alt.toolkits.xview - best for specific XView questions
comp.windows.open-look
comp.windows.x - highest volume
Watch for Frequently Asked Questions lists (such as this) in these
groups. The article you are reading is part of the alt.toolkits.xview
and comp.windows.open-look FAQ.

Books:
See the comp.windows.open-look FAQ, which lists several books on X
and XView. The O'Reiily books in particular are recommended.

Source: code:
the FTP site ftp.x.org in directory /R5contrib (?), has the
full XView source (the latest release is 3.2), together with lots
of X programs. Programs whose name ends in "tool" or starts with
"xv" are often based on XView.

Subject: The Future of XView

XView is no longer a Strategic Direction for Sun. It will be supported
for the next few years, but new features will not be added.
On the other hand, the source is publicly available.
XView is included with SunOS and Solaris, and also with some versions
of Linux.

Sun will be moving to a motif-like user interface in 1995, with the
shipping of COSE/CDE. At that time, XView will be less interesting to
many people.

Since it's probably the easiest X toolkit to use that's easily and
widely available, XView will probably be widely used for a while.

Subject: Scrolling Lists

@ How do I set the font of individual Scrolling List items?
PANEL_LIST_FONT takes an int row_number and an Xv_opaque font_handle.
PANEL_LIST_FONTS take a NULL terminated list of Xv_opaque font_handles.
There is no easy way to make an entire list fixed width font.
You have to make sure that you always specify PANEL_LIST_FONT when you
insert a new row into that list, or write a convenience function
insert_row(list, row, string) that hides the nasty bits.
The most efficient way to do this involves creating an Xv_attr array
to do lots of insertions at once, complete with PANEL_LIST_FONTs.

If you give both PANEL_LIST_STRING and PANEL_LIST_FONT in the same
xv_set() call, PANEL_LIST_STRING must be given first, or the default
font will be used.

@ How do I set the selected item of an exclusive list with required choice?
If you have a PANEL_LIST with a required choice, and the list is
exclusive, you must de-select the old item and select the new one in
a single xv_set() call, for example:

xv_create(owner, PANEL_LIST,
....
PANEL_CHOOSE_ONE, TRUE, /* only one entry can be selected */
PANEL_CHOOSE_NONE, FALSE, /* one entry must be selected */
NULL
);

xv_set(List,
PANEL_CHOOSE_NONE, TRUE,
PANEL_LIST_SELECT, xv_get(List, PANEL_LIST_FIRST_SELECTED), FALSE,
PANEL_LIST_SELECT, row, TRUE,
PANEL_CHOOSE_NONE, FALSE,
NULL
);

Note: you may find it useful to start with PANEL_CHOOSE_NONE true so that
the list comes up with no selection; and then on the first selection set
PANEL_CHOOSE_NONE to FALSE so that a selection is required.

Subject: How do I keep a pop-up window displayed after a button is pressed?
In the button callback, do
xv_set(button, PANEL_NOTIFY_STATUS, XV_ERROR, NULL);
This will keep the window visible.
You might also need to investigate the MENU_NOTIFY_STATUS attribute.

Subject: how do I make an XView button look pressed?
call panel_begin_preview() and panel_cancel_preview(); these are
documented in -- er -- the XView 3 source...

Subject: OpenWindows 3 imake doesn't work properly
Paul DuBois <dub...@primate.wisc.edu> has written some useful notes
on this; see:
http://www.primate.wisc.edu/software/imake-stuff
ftp://ftp.primate.wisc.edu/software/imake-stuff
There are both text and PostScript versions of his notes.

Here also is Greg Earle's patch, to be applied in $OPENWINHOME; note
that you should edit lib/config/sun.cf afterwards to get OSName and
OSMinorVersion right (MinorVersion is 1 in SunOS 4.1.4, for example).
I have edited the patch a little, so any bugs are mine [l...@sq.com] :-)

*** bin/xmkmf.orig Wed Sep 18 07:02:02 1991
--- bin/xmkmf Tue Aug 6 00:39:20 1991
***************
*** 30,34 ****

elif [ -n "$OPENWINHOME" ]; then
! args="-DUseInstalled $OPENWINHOME/lib/config"

else
--- 30,34 ----

elif [ -n "$OPENWINHOME" ]; then
! args="-I$OPENWINHOME/lib/config -DUseInstalled -DXCOMM='/**/#'"

else
*** lib/config/site.def.orig Wed Sep 18 01:26:19 1991
--- lib/config/site.def Tue Aug 6 00:44:37 1991
***************
*** 0 ****
--- 1,7 ----
+ #define BinDir $(OPENWINHOME)/bin
+ #define LibDir $(OPENWINHOME)/lib
+ #define IncRoot $(OPENWINHOME)/share/include
+ #define InstallNonExecFile(file,dest) @@\
+ install:: file @@\
+ $(INSTALL) -c $(INSTDATFLAGS) file dest
+ #define NullParameter


Subject: The pop-up menu in my canvas has funny colours
You need to use CMS_CONTROL_CMS when you create the CMS for your canvas.
This allocates the OPEN LOOK UI 3D colors at the start of the colormap.
The foreground color lives right at the end.

Subject: The second ttysw in my program doesn't work
XView only supports one ttysw per program!

Subject: How do arrange to have a (Cancel) button to stop a calacuation?
When you are doing cpu-intensive calculations, your program probably
isn't calling the XView notifier, so that button presses aren't noticed
until the computation is over.
There are several possible solutions:
* use the implicit or explicit notify displatch mechanism, described
in the Notifier chapter of the XView Programming Manual (O'Reilly);
* use multiple processes, and send signals;
* split up the work into small chunks and use notify_stop to return to
the main loop for each chunk.

Subject: How do I put panel items on a canvas?
You don't.
You can, however, draw on a panel, as if it was a canvas.
Another alternative is to use olgx to render the controls, but this is
a little tricky.


END of XView FAQ

# $Id: ol3.faq,v 1.4 96/06/07 18:00:33 lee Exp $

0 new messages