Making a Poplog propbox vertical in Motif. Help please. 
Author Message
 Making a Poplog propbox vertical in Motif. Help please.

Quote:

> [...]
> I would be gratefile if someone using Poplog with Motif would
> test my guess for me by trying the following, after running Pop-11

> uses propsheet; ;;; should be already part of Pop-11, but in case not....

There should also be a call to -propsheet_init- here.

Quote:
> ;;; create a propbox with four buttons labelled A, B, C, D.
> vars propbox = propsheet_new_box('TEST', false, false, [A B C D]);

> ;;; show it on screen (buttons should come out horizontal)
>  propsheet_show(propbox);

> ;;; Now try to change its orientation:

> ;;; First load macro definitions for Motif

> uses XmConstants

#_IF pop_internal_version > 142200
     loadinclude XmConstants;
#_ELSE
     uses XmConstants;
#_ENDIF

Will make it work under later Poplog versions. The undocumented
XmConstants library will become a documented include file post 14.2.

Quote:
> ;;; Now change the orientation (I hope). Mark and load this:

> XmVERTICAL ->
>          XptValue(
>              propbox.XptChildren.hd.XptChildren.hd.XptChildren.tl.hd,
>              XtN orientation, TYPESPEC(:int)
>          );

> ;;; Does that change the alignment?

Nope. The widget hierarchy is different under Motif so the
"propbox.XptChildren[...]" won't work.

I should also point out that the widget trees produced by LIB *
PROPSHEET are currently *not* documented and may well change in future
Propsheet versions. Writing code that depends on these widget trees is
likely to break (and yes --- I was guilty of this with some of the code
I gave to Aaron, I should have used propsheet_subpart, see next sentence
:-)

People should use the (undocumented as yet... Jon, where's that REF
file? :-) -propsheet_subpart- procedure to access the widgets in a
propbox. You can use

        propsheet_subpart(propbox, "lower_controls")

to get the parent of the buttons.

Anyway... now we have the widget. Will

        XmVERTICAL ->
                XptValue(
                        propsheet_subpart(propbox, "lower_controls"),
                        XtN orientation
                );

work?

Unfortunately not, since the parent of the buttons is an XmForm widget
which organises its children via a more complex mechanism. Those who are
interested should refer to:

        man 3 XmForm

Basically, you will have to alter the constraint resources of the
button widgets (which you can get with

        propsheet_subpart(propbox,"buttons") -> BUTTON_WIDGET_LIST

.)

Whether LIB * PROPSHEET should provide support for this kind of thing is
a moot point. IMHO we're exceeding the areas Propsheet was originally
designed to cope with here quite a bit. To do this kind of thing
properly would probably involve writing a more general Garnet-esque
library. Something I'd love to do if somebody will give me some money
:-)

Quote:
> ;;; Also see if you can change its location, width and height

> (500, 20, 50, 200) -> XptWidgetCoords(propbox);

This will work. It's completely general and should work on any widget.


ObDisclamer: Poplog pay my wages



Fri, 22 Dec 1995 16:16:25 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Making a Poplog propbox vertical in Motif. Help please.

2. geometry for HELP panel in motif Poplog

3. Free Motif (better than Lesstif) works with Poplog/Xved

4. Running Linux Poplog without motif

5. rebuilding poplog for motif

6. linking motif poplog - generic script wanted

7. CW4 MAKING QUE (PLEASE HELP)

8. cw4 making Que (Please Help)

9. Q: stand alone executables made with Poplog?

10. PLEASE HELP re: making Windows App's using Fortran subroutines

11. please help to making a lisp running !!

12. Please help with making C and Tcl work together

 

 
Powered by phpBB® Forum Software