Re: XForms: XForms, cursors and others (fwd)

Steve Lamont (spl@szechuan.ucsd.edu)
Tue, 3 Nov 98 12:13:43 PST

# To subscribers of the xforms list from spl@szechuan.ucsd.edu (Steve Lamont) :

> - Firstly, the colormap. Is there anyway in XForms to make the two
> windows, i.e. the one with the original and the one with the
> magnified version, share the same colormap? Please give me
> a simple XForms solution, if there is such a thing, as reading
> the XWindows System manuals has already given me a headache.
> Time is crucial!

Yes. Use the Default Colormap. If you are using a Canvas to display
your images, you can set the Canvas Colormap with

screen_number = DefaultScreen( fl_get_display() );
fl_set_canvas_colormap( canvas,
DefaultColormap( fl_get_display(),
screen_number ) );

before the Canvas is shown.

> - Secondly, defining a suitable cursor. I would like a rectangular
> cursor with the size of the region to be magnified; unfortunatly
> I tried to read the "cursors.c" demo source and understood very
> little - most of it uses things not explained on the online
> manual. Any help here?

Two solutions here. Either use one of the standard cursors with the
fl_set_cursor() function:

fl_set_cursor( FL_ObjWin( some_object ), XC_watch );

will display the X Windows watch cursor. Any good Xlib manual will
give you a list of the cursors and their symbols.

If you have a custom cursor, you can use fl_create_bitmap_cursor().
The manual discusses this in detail in Appendix B.

> - Finaly, the positioning of the forms. All the examples and
> the online manual always position the forms at the center of
> the screen. Thus, I fail to understand how one may position
> them elsewhere. It is very important for me to do so, since I
> would like to create a system with multiple windows/forms. Any
> sugestions?

Forms may be placed arbitrarily using the FL_PLACE_GEOMETRY argument
to fl_show_form() along with the fl_set_form_position() or
fl_set_form_geometry() call. The manual also discusses this in
detail.

spl
_________________________________________________
To unsubscribe, send the message "unsubscribe" to
xforms-request@bob.usuf2.usuhs.mil or see
http://bob.usuf2.usuhs.mil/mailserv/xforms.html
XForms Home Page: http://bragg.phys.uwm.edu/xforms
List Archive: http://bob.usuf2.usuhs.mil/mailserv/list-archives/