henke@ipa.fhg.de (Juergen Henke) (09/11/90)
We got into some problems using the Andrew toolkit. What we want to do is building an application that runs in several windows, created from within ATK procedures. So, please give me some hints how to (best): - create and delete windows (WITH control over their size, their appearance, etc.) - restrict an object from resizing (in celview ??) - get the position of the end of text in an text object (in screen coordinates) - set the insert position in a text object - restrict the menu cards to display only desired entries - get the ATK, patchlevel 6, to run on a VAXstation with Ultrix-32 - get a description of the available methods and objects (please don't tell me to RTFM, we ordered N.Borenstein's book, but we have to wait, and - of course - are in a hurry :-() Many thanks in advance, Juergen. ____________________________________________________________ Juergen Henke (henke@IAO.FhG.de or juh_ipa@IPA.FhG.de) Fraunhofer-Institut f. Produktionstechnik u. Automatisierung Eierstrasse 46, D-7000 Stuttgart 1
tpn+@ANDREW.CMU.EDU (Tom Neuendorffer) (09/12/90)
Excerpts from mail: 11-Sep-90 request of some essential i.. Juergen Henke@IPA.FhG.de (1052) > So, please give me some hints how to (best): > - create and delete windows (WITH control over their size, their > appearance, etc.) See the code for frame_NewWindow and frame_DeleteWindow in frame/framecmd.c. The im_SetGeometrySpec() class procedure can be called prior to creating a new window and sent a string with a standard X style geometry spec. This will allow window size and placement. > - restrict an object from resizing (in celview ??) Not Supported. The philosphy is that the parent or user should always have control of this. > - get the position of the end of text in an text object > (in screen coordinates) I would like to think that most applications wouldn't need this (if you need an inset at the end of text, just insert one there). However, you can look at the code for textview__Locate to see how you can call textview_LineRedraw to inform you of things like this. > - set the insert position in a text object The text object has no notion of "insert position". Textviews have the Dot position, where characters typed at the keyboard (or inserted with the textview_self_insert procedure) will be entered. It can be set with textview_SetDotPosition. > - restrict the menu cards to display only desired entries A parent view can do this to the child view if it knows what menus to delete by creating a menulist with NULL proctable entries and the same menu strings as the child. See the menulist documentation in $ANDREWDIR/doc/basics. Also see the 'bind' documentation, which offers a simplified way to create menulists. If you aren't writing your own parent views, but are using Adew, you can ask ask the celview to override its child's menus for you. A simple example that deletes the "Page,Next Page" menu from a child text would include the following: /* user code begins here for includes */ #include <bind.ih> #include <menulist.ih> static struct menulist *tm; /* create a null binding for the "Next Page" menu entry */ static struct bind_Description Bindings[]={ {NULL,NULL,0,"Page,Next Page", 0,0,NULL,NULL}, NULL }; /* user code ends here for includes */ /* user code begins here for InitializeClass */ { /* link the binding to a static menu list */ struct classinfo *textviewtype = class_Load("textview"); tm = menulist_New(); bind_BindList(Bindings, NULL , tm, textviewtype); } /* user code ends here for InitializeClass */ /* user code begins here for testmen_go */ /* Ask the celview to override the child's menus */ celview_SetMenulist(celview_GetCelviewFromView(self->text_1View),tm); /* user code ends here for testmen_go */ See the Adew reference manual. > - get the ATK, patchlevel 6, to run on a VAXstation with > Ultrix-32 What problems are you having? > - get a description of the available methods and objects > (please don't tell me to RTFM, we ordered N.Borenstein's book, > but we have to wait, and - of course - are in a hurry :-() There is a lot of stuff in /usr/andy/doc and /usr/andy/help. I hope at some point to post a document with hyperlinks that will organize the doc files a little better and give an overview of what can be found. Regards, Tom Neuendorffer ITC