[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference bulova::decw_jan-89_to_nov-90

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

862.0. "take_focus equivalent for a simple text widget" by RABBET::FARRELL (Money, there is no substitute!) Wed May 31 1989 15:12

Could someone tell me how I can get a simple text widget to take input focus
(i.e. take_focus = true equivilent)
(i.e. Like the password widget on the login screen after you type a username)

thanks,

		$$$$ ted $$$$

T.RTitleUserPersonal
Name
DateLines
862.1LEOVAX::TREGGIARIWed May 31 1989 17:329
    Call XtCallAcceptFocus passing the widget and a time.  You should get
    the time from the most recent X event (i.e. the one that triggered
    the application to do this...).
    
    Note also that the widget MUST to mapped at the time or you will get
    an error back from the server.
    
    Leo

862.2If not C, then what to do ?GOTA1::BJERKEHOLTBo Bjerkeholt, SWAS, @GOOThu Jun 01 1989 15:253
    
    ....and what to call if you don't use C ?? 

862.3call the same routinePSW::WINALSKIPaul S. WinalskiThu Jun 01 1989 15:272
All of the Xt routines have VMS-binding equivalents, I thought....

862.4LEOVAX::TREGGIARIThu Jun 01 1989 21:545
    This ones does, even though it's not documented.
    XT$CALL_ACCEPT_FOCUS( widget (by reference), time (by reference))
    
    Leo

862.5almost... RABBET::FARRELLMoney, there is no substitute!Fri Jun 02 1989 10:148
> Call XtCallAcceptFocus passing the widget and a time

How do I get the X Toolkit time of the previous widget.  I could not find
any such feature.

		$$$$ ted $$$$

862.6LEOVAX::TREGGIARIFri Jun 02 1989 10:2311
> How do I get the X Toolkit time of the previous widget.  I could not find
> any such feature.

It's not the previous "widget", it's the previous "event".  Most X events
sent by the server have a time stamp inside them.  Part of the DECtoolkit
common callback data structure is a pointer to the last event which triggered
the callback.  You need to examine the event type and get the time out of
it.  The event data structures are defined in the xlib include files.

Leo

862.7example?SK8R::CRITZRichard -- KB4N/1Sat Jun 03 1989 14:126
    If anyone has an example of doing this (or produces one), could you
    please post it.

    Thanks,
    Richard

862.8On ULTRIX???LEDDEV::BRASSTue Jun 06 1989 12:489
    I am trying to do the same thing but on an Ultrix machine, and I
    cannot find any XtCallAcceptFocus in any .h files. There is an 
    XtInheritAcceptFocus but I can not find any documentation on it
    to figure out if it is the same. When I use XtInheritFocus instead
    of XtCallAcceptFocus I get an error message "unresolved inheritance".
    Any ideas?
    		Thanks
    		Bob 

862.9LEOVAX::TREGGIARITue Jun 06 1989 13:266
It's defined in Intrinsic.h on my VMS system.  And it's definitely not the
same as XtInheritFocus (which is used by a widget class to inherit the
accept_focus procedure of it's superclass).

Leo

862.10Missing in ActionLEDDEV::BRASSTue Jun 06 1989 13:515
    There is no XtCallAcceptFocus in Ultrix's Intrinsic.h or IntrinsicP.h
    files. Can I call XtAcceptFocusProc() myself without going through
    XtCall... ?
    		Bob

862.11LEOVAX::TREGGIARITue Jun 06 1989 14:3112
XtCallAcceptFocus is defined to be:

extern Boolean XtCallAcceptFocus();

Before doing anything else I would try calling this to see if it's in
the toolkit library.

If it's not (which would surprise me...) then, yes, you can reach into
the widget's class record and call thru it's accept_focus procedure.

Leo

862.12LEDDEV::BRASSWed Jun 07 1989 11:2510
    I am now using accept_focus instead of XtCall... I am using it in
    the same way. "accept_focus(widget,time)" before I do this I do
    an XtOverideTranslations etc... The problem is I get two warnings
    and an error. the warnings: "X Toolkit Warning: Initializing Resource
    lists twice" and "X Toolkit Warning: Initializing translation manager
    twice", I am not sure if they matter but the error is 
    "X Toolkit Error: Can't open display", I do not know why I am getting
    this error or what it means. Any ideas?
    		Bob                                               

862.13XtCallAcceptFocus is ULTRIX tooSMURF::HOFFMANanywhere in the universeThu Jun 08 1989 08:528
    re 862.8 - 862.12
    
    XtCallAcceptFocus is defined in ULTRIX UWS V2.0 and V2.1
    in the DECwindows Toolkit library module Intrinsic.h,
    just like in VMS.  It is not defined in the MIT Xt library.
    
    John