Title: | DECWINDOWS 26-JAN-89 to 29-NOV-90 |
Notice: | See 1639.0 for VMS V5.3 kit; 2043.0 for 5.4 IFT kit |
Moderator: | STAR::VATNE |
Created: | Mon Oct 30 1989 |
Last Modified: | Mon Dec 31 1990 |
Last Successful Update: | Fri Jun 06 1997 |
Number of topics: | 3726 |
Total number of notes: | 19516 |
A bunch of questions, some easy some a bit more difficult. Starting from the easy: 0) Where can I find documentation/examples for User Defined widgets? 1) The documentation on the clipboard for DwtBeginCopyToClipboard talks about the label parameter. In it it mentions something called a clipboard viewer, what is a clipboard viewer?? Is it simply a user application that sees whats in the clipboard or something else? 2) Is there any way to get a dialog box to do geometry management. That is if it has a child, and the child has graphics in it, and the dialog box is resized then the child with its graphics are resized to be scaled with the new size of the dialog box? 3) Can one size the scroll bar for a main window. The main window has a very definite idea what the size of its scroll bar should be, can an application override this easily with some use of XtSetArgs, XtSetValues, or using UIL? Maybe using DwtMainSetAreas in some way? Any ideas?? 4) When in a text widget a user highlights part of a line. The user now changes the insertion point to another portion of the text. If this happens the programmer wants to unhighlight the highlighted text. Unhighlighting text is easy. The problem is there doesn't seem to be a reason for a Text Widget that is set when the user moves the input focus to another part of a dialog box. Am I missing something really trivial?? 5) When a user logs into a session they type in their login name and if they hit CR the cursor is moved to the next Text Widget (the password prompt), not to the next line. How can one map the crlf to go to the next text widget. I seem to recall using some kind of translation event as a possibility. 6) A push button widget has a callback that loads in a UIL hierarchy. If the top widget it loads in is a pop-up dialog box, then one sees the whole dialog box. However, if the top widget in the UIL file is a main_window widget it gets clipped by the main_window of which the push_button widget is a child?? Did we make a pop-up dialog box a shell widget, similar to pull down menus, so it breaks out of its parent window?? Or is there something strange about the main_window widget? 7) Using UIL is there any way to specify radio buttons AND toggle buttons in the same pulldown menu. A pull down menu has an attribute menu_radio which can be set to TRUE for radio buttons, FALSE if one wants standard toggle buttons. A pulldown_menu in UIL cannot have a radio box widget as a child. There doesn't seem to be any way to mix toggle buttons adn radio buttons using UIL. Any ideas?? The next few questions remind me of some FT2 problems, so I'm holding off until SDC gets loaded onto the development machine, but anyway: 8) LoadQueryFont seems to be problematic if used in conjunction with XUI toolkit. It gives a typically non-helpful Xlib error message. More info on the message is hopefully forthcoming. 9) A main_window widget core dumps when a child of it is a user defined widget. All widgets are defined in UIL. 10)A text widget with a menu bar. When a pull_down menu is used, overlays text, then the text is reexposed it appears to be off by one pixel. Thanks for all and any help. yoseff
T.R | Title | User | Personal Name | Date | Lines |
---|---|---|---|---|---|
392.1 | A few answers | TBD1::BURLEIGH | Dave, DECwindows Training | Mon Mar 13 1989 12:31 | 34 |
> 0) Where can I find documentation/examples for User Defined > widgets? There isn't much. The MIT Xtoolkit Intrinsics manual is the best source of (mostly reference) information, other than widget sources. The DECwindows Application Programmer's Guide has an appendix that (inadequately) discusses widget writing, mostly by massaging excerpts from the MIT Intrinsics manual. However there are several good widget examples in the ELKTRA::DW_EXAMPLES notes file. > 2) Is there any way to get a dialog box to do geometry management. > That is if it has a child, and the child has graphics in it, and > the dialog box is resized then the child with its graphics are resized > to be scaled with the new size of the dialog box? Using an attached dialog box, you can get the child resized by "attaching" its edges to the edges of its parent, but there's no automatic scaling of the contents of the child. > 5) When a user logs into a session they type in their login name > and if they hit CR the cursor is moved to the next Text Widget (the > password prompt), not to the next line. How can one map the crlf > to go to the next text widget. I seem to recall using some kind > of translation event as a possibility. The translation: "<Key>0xFF0D: return_pressed()" Then write the action routine to correspond to "return_pressed", that calls XtCallAcceptFocus() for the widget that should get the focus next, and reference it in an Action table. See XtAddActions. | |||||
392.2 | RABBET::FARRELL | Money, there is no substitute! | Tue Mar 14 1989 14:06 | 27 | |
>> 5) When a user logs into a session they type in their login name >> and if they hit CR the cursor is moved to the next Text Widget (the >> password prompt), not to the next line. How can one map the crlf >> to go to the next text widget. I seem to recall using some kind >> of translation event as a possibility. > The translation: > > "<Key>0xFF0D: return_pressed()" > > Then write the action routine to correspond to "return_pressed", > that calls XtCallAcceptFocus() for the widget that should get > the focus next, and reference it in an Action table. See XtAddActions. RE: .1 Could you elaborate on this process. I would be very interested in having a simple text widget, and upon pressing return, instead of another line being created in the widget, the focus go to a button. For example many applications use this, press return after simple text and the OK button will be activated. Could you elaborate? $$$$ ted $$$$ | |||||
392.3 | Voila! | TBD1::BURLEIGH | Dave, DECwindows Training | Tue Mar 14 1989 15:13 | 30 |
Extracted from one of my demos: static XtActionProc TransferFocus(); char *cr_bindings = "<Key>0xFF0D: transfer-focus()"; static XtActionsRec cr_actions[] = { {"transfer-focus", TransferFocus} } ... XtAddActions(cr_actions,1); XtOverrideTranslations(source_widget, XtParseTranslationTable(cr_bindings)); ... static XtActionProc TransferFocus(widget,event,params,nparams) Widget widget; XEvent *event; char **params; int *nparams; { Time time = CurrentTime; XtCallAcceptFocus(target_widget,&time); } Happy programming, Dave |