The last version released by Andrew was 4.7 - in July 1999. After that he transferred maintenance, it is now with the LessTif maintainers.
The LessTif web site contains more information about their mailing lists; it's at http://www.lesstif.org.
In any case, please include details as to the version you are using, the circumstances under which the problem occurred and (if you can) a patch.
If you want to change the reaction to various actions (as in Action routines), several are affected by the behavior of the various callbacks associated with the XbaeMatrix. These reactions would include:
Although more specific answers to changing widget behaviour follow, some may not be covered by this FAQ. In this case, it is important to follow the advice above and carefully read the manpage. More than likely the answer is in there.
void enterCB( Widget w, XtPointer cd, XtPointer cb ) { XbaeMatrixEnterCellCallbackStruct *cbs = (XbaeMatrixEnterCellCallbackStruct *)cb; switch(cbs->column) { case 2: /* * Make all of column 2 non editable except for row 4 */ if(cbs->row != 4) cbs->doit = False; break; default: cbs->doit = True; /* Default behaviour */ break; } }It really is as easy as that!
Anybody who uses two byte charaters and is willing to come up with an effective patch is hereby granted the opportunity!
Another option is to unmanage the widget via XtUnmanageChild() and manage it again once the redraw is complete.
*mw*translations: #override\n\ <Btn1Down>: SelectCell()and the latter, an
XtOverrideTranslations(mw, XtParseTranslationTable( ":<Btn1Down>: SelectCell()"));will do the trick.
In the selectCellCallback, you then need to select the row/column as indicated in the callback struct.
Also, refer to the choice example program which demonstrates this ability.
*mw*translations: #override\n\ <Btn3Down>: SelectCell(menu)
The "menu" parameter then gets passed to the selectCellCallback in the callback struct as params[0] so a simple strcmp() should suffice in detecting the parameter.
The menu needs to be created using XmCreatePopupMenu() so see your trusty manual page on how to do this.
To position the menu, you should use XmMenuPosition(). Once again, you should refer to the manual page. The event structure is passed through in the XmNselectCellCallbackStruct.
In a few specific circumstances, the configure command needs a little help. Please ask us at the LessTif mailing list, we'll try to help you.
If all that fails, an alternative build method for Xbae exists : Imake. Use "xmkmf -a; make" and things *should* build as well.
When you register your drop site you also add a drop callback, ie
XtSetArg(args[n],XmNdropProc,ddDrop);And in this drop function you can do this:
void ddDrop(Widget w,XtPointer clientData,XtPointer callData) { XmDropProcCallback dropData = (XmDropProcCallback) callData; int x = dropData->x; // drop x coord int y = dropData->y; // drop y coord ....However since I wanted to useXbaeMatrixGetEventRowColumn(Widget, event, &row, &col);to get my row/column position I needed an event structure, so I made a copy of one I got before I started the drag, and then I adjusted the x and y value and passed it to the XbaeMatrix function.. and it all works fine!Keyboard translations don't always work
Question : We want to have the Home key move you to the top of the list and select the first item. We are not able to get the keyboard traversals to work for the matrix. We can get them to work for the TextField widget if it has the focus. We don't want to make the customer click in an editable field before hitting "Home".You'll find that things won't work until the text field has been mapped. We've been trying to get Page Up/Down going but until the text field has been mapped (even if it is then subsequently unmapped) the actions don't work.
This seems to be because the initial focus goes to the clip child (not the matrix itself) which doesn't know what to do with the key events. I haven't found any way around this yet, except that you could manage then unmanage the text field programmatically and see if that works.
Doing :
XbaeMatrixEditCell(mw, 0, 0); XbaeMatrixCommitEdit(mw, True); /* unmap it again */when you first create the matrix should be virtually undetectable.More questions ?
If you have more questions, or if you would be able to answer some of the currently addressed questions better, then please send us mail at lesstif@lesstif.org .This is version $Header: /cvsroot/hungry/lesstif/lib/Xbae/FAQ.html,v 1.4 1999/12/28 10:48:25 danny Exp $ of this document in the LessTif CVS server.