resize events in pop11 graphic windows 
Author Message
 resize events in pop11 graphic windows

I have been trying to add handling of resize events to the RCLIB

I create window objects which have a graphic widget in a composite
widget in a shell.

The objects are created using a procedure partly modelled on
XptNewWindow except that it has an extra layer of structure (the
composite widget) in order to allow new window objects to be embedded in
the window.

The creation procedure is XptNewPanel in LIB rc_window_object viewable


I have tried adding a callback procedure to handle resize events in the
same way as I added callback procedures to handle mouse, button,
keypress events, but it did not work. I tried things like this
where RC_DO_RESIZE_ACTIONS is the callback procedure:

    XptAddCallback(win, XtN resizeEvent, RC_DO_RESIZE_ACTIONS, "resize", identfn);

I tried making win the graphic widget, the composite or the shell. In no
case could I get the callback procedure to respond when the window was
resized with the mouse.

Persumably it did not work when win was the graphic widget, because the
graphic widget does not have its size changed automatically -- the
problem I wanted to fix. But it does not work (the callback was not
invoked on resize) if win is the shell or the composite either.

Then, by accident I discovered XptResizeResponse and found that if

P is a procedure that takes a widget as argument, this works where win is
the shell object, but not if it is the composite object.

    P -> XptResizeResponse(win);

Now I *think* I can implement everyting I need on top of that, but I wonder if
anyone can explain to me why XptAddCallback did not work for resize

I note that the updater of XptResizeResponse uses

rather than XptAddCallback. I've not been able to find any explanation
of the difference in the documentation (but that may simply be that I've
not looked in the right places).

Has anyone else written code to handle resize events in pop11 graphic windows?

If so I'd be grateful for a copy.


Aaron Sloman, ( http://www.*-*-*.com/ ~axs/ )
School of Computer Science, The University of Birmingham, B15 2TT, UK

PAPERS: http://www.*-*-*.com/ (And free book on Philosophy of AI)
FREE TOOLS: http://www.*-*-*.com/

Sun, 09 Jan 2005 19:19:15 GMT  
 [ 1 post ] 

 Relevant Pages 

1. PROPEL 0.2+ (pop11 for windows) (pop11 4 windows)

2. Events when user resizes window

3. bind to window resize event?

4. Is there a window resize event?!?

5. window resize event name?

6. Detect window resize event

7. window resize event

8. Catching Window Resize Event

9. Event Protocol handlers (resizing windows)

10. keyboard events in graphic window

11. Q: resizing listbox with window resize

12. VA3.0b - window resizing on form resize


Powered by phpBB® Forum Software