[comp.windows.x] Three XView Questions

folta@tove.umd.edu (Wayne Folta) (05/08/90)

Could anyone please mail me with any answers to the following problems?
We are in the midst of moving from SunView to XView, and we have hit
some snags:

1. In SunView, we wrote event procedures so that the buttons in a panel would
   invert when the user moved the cursor over them. In XView this seems
   impossible to do...  We can't seem to get LOC_MOVE events in a Panel...

2. We have to quickly convert some SunView code to XView that involves
   the use of pop-up menus. Since XView does not block on menu_show, what
   is the quick-and-dirtiest way to simulate blocking menus to get this
   thing up and running. (Unfortunately, it looks like a real bear to tear
   the code up into action procedures.)

3. In Open Windows 1.0, we have been unable to eliminate the frame menu.
   The frame menu is now under the control of the window manager, so how
   (short of NO_DECORATIONS, since we want a window title) can we get
   rid of the menu or modify it?

(In case anyone is wondering, item #1 involves a scrollable panel of 250
buttons. As things of interest happen, the buttons appear, and the user
can pick the button to get more details. This simulates a two-dimensional
Choice List. The users are very paranoid about hitting the wrong button,
hence the desired feedback.

Actually, I am a little suspicious, since a standard pin-up menu does not
provide feedback when it is pinned up, so maybe XView doesn't pass on MOVE
events anymore--just DRAG events?

And maybe Sun could add two-dimensional Choice Lists to panels, please?
(Items are added across rows first, wrapping to new rows as required.)

Item #3 arises because our users' management is very paranoid, and wants all
the windows to be tiled, with no chance of windows getting lost behind other
windows, etc.)
--


Wayne Folta          (folta@cs.umd.edu  128.8.128.8)

argv@turnpike.Eng.Sun.COM (Dan Heller) (05/08/90)

In article <24258@mimsy.umd.edu> folta@tove.umd.edu (Wayne Folta) writes:
> Could anyone please mail me with any answers to the following problems?
> We are in the midst of moving from SunView to XView, and we have hit
> some snags:
> 
> 1. In SunView, we wrote event procedures so that the buttons in a panel would
>    invert when the user moved the cursor over them. In XView this seems
>    impossible to do...  We can't seem to get LOC_MOVE events in a Panel...

The XView Programmer's manual indirectly addresses this problem.
that is, it tells you how to do what you want to do, but not for the
reasons *you* need it :-)  Read Section 7.17, Panel Event Handling.
This discusses some of the internal mechanisms used by XView to do
this sort of thing.  Also, you should familiarize yourself with
interposing functions (notify_interpose_*).

NOTE: this will make your application non-OPEN LOOK compliant.
It is assumed that if you are using XView, you want to comply
with those user interface specifications.  What you describe
above biolates openlook.

> 2. We have to quickly convert some SunView code to XView that involves
>    the use of pop-up menus. Since XView does not block on menu_show, what
>    is the quick-and-dirtiest way to simulate blocking menus to get this
>    thing up and running. (Unfortunately, it looks like a real bear to tear
>    the code up into action procedures.)

This has to be handled on a case-by-case basis.  I have seen several
scenarios that require everywhere from "no change" to "major change".
I suggest as a general rule of thumb, tho: all the code that follows
a menu_show() function be moved into a new procedure that is a
callback routine from the menu items within the menu being displayed.
The menu_show() should be the last thing executed in the function
from which it was called.  If there are any variables or pointers
that need to be preserved from the original routine for that new
callback routine, attach them to the menu passed to menu_show() via
client data or XV_KEY_DATA.  The callback routine should extract
those variables using xv_get() from the new callback routine.

> 3. In Open Windows 1.0, we have been unable to eliminate the frame menu.
>    The frame menu is now under the control of the window manager, so how
>    (short of NO_DECORATIONS, since we want a window title) can we get
>    rid of the menu or modify it?
You simply can't do this without telling the window manager not to
display the decorations.

> And maybe Sun could add two-dimensional Choice Lists to panels, please?
This isn't sun's decision alone... or rather, it certainly isn't
the XView development team's decision.  While sun certainly has
input on what Open Look provides, ATT has a hand in this as well.
Suffice to say that you are not alone in your desires for changes
to the open look spec to provide for scrollable panels.  I wish I
knew what the procedure was for submitting OPEN LOOK spec changes.
Perhaps someone from sun/att would like to comment on this?

--
dan
----------------------------------------------------
O'Reilly && Associates   argv@sun.com / argv@ora.com
Opinions expressed reflect those of the author only.

argv@turnpike.Eng.Sun.COM (Dan Heller) (05/08/90)

Ooops.. I made a booboo in my last reply.  I was talking about
scrollable panels when in fact the person asked about
2-dimensional choise lists:
In article <24258@mimsy.umd.edu> folta@tove.umd.edu (Wayne Folta) writes:
> And maybe Sun could add two-dimensional Choice Lists to panels, please?
> (Items are added across rows first, wrapping to new rows as required.)

This has been implemented -- it will be available in the next release.
--
dan
----------------------------------------------------
O'Reilly && Associates   argv@sun.com / argv@ora.com
Opinions expressed reflect those of the author only.

stripes@eng.umd.edu (Joshua Osborne) (05/09/90)

In article <24258@mimsy.umd.edu> folta@tove.umd.edu (Wayne Folta) writes:
[...]
>3. In Open Windows 1.0, we have been unable to eliminate the frame menu.
>   The frame menu is now under the control of the window manager, so how
>   (short of NO_DECORATIONS, since we want a window title) can we get
>   rid of the menu or modify it?
[...]
>Item #3 arises because our users' management is very paranoid, and wants all
>the windows to be tiled, with no chance of windows getting lost behind other
>windows, etc.)

Then they should use a tiled window manager (like RTL), not bug you about it.
(besides that way when some other org. with a diffrent outlook decides they
want all tiled windows it's still not your problem).
-- 
           stripes@eng.umd.edu          "Security for Unix is like
      Josh_Osborne@Real_World,The          Mutitasking for MS-DOS"
      "The dyslexic porgramer"                  - Kevin Lockwood
"Don't try to change C into some nice, safe, portable programming language
 with all sharp edges removed, pick another language."  - John Limpert