[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

3160.0. "quick copy question" by TOWNS::HOOVER () Wed Aug 01 1990 14:34

    I'm trying to implement part of the "quick copy" utility as described
    in chapter 12 of the guide to decwindows application programming (I
    think that is the manual).  Anyway, does anyone know how to get the
    text that has been highlighted from MB3?  I specify a callback for
    the function XtOwnSelection  which is supposed to convert the selected
    text to the requested format.  But I don't know how to get the text
    from within that callback.  Can anyone help? I can post my code if
    it would make my question more clear.
    
    
    thanks, 
    
    jim
    
    
    
    
    
    
    
    
    
    
    
    
    
    
                                                      
T.RTitleUserPersonal
Name
DateLines
3160.1DECWIN::FISHERLocutus: Fact or Fraud?Wed Aug 01 1990 17:5210
I don't know how to do it in general, but is the question related specifically
to QuickCopy?  I.e. do you know how to do the primary selection stuff with MB1?
If you know the former, the later should be the same except that the selection
name is different.  Replace the word PRIMARY with SECONDARY in the selection
name and I think that does it.

Don't know if that is helpful; I admit to nearly complete ignorance in this
area.

Burns
3160.2more infoTOWNS::HOOVERWed Aug 01 1990 18:0529
    I am going after the SECONDARY selection (choosen by MB3).  
    I have my application running (it has focus) and I move the mouse over
    to another window and select text with MB3.  That application sends
    me a client message with tells me it has data.  I do an XtOwnSelection
    (which is were I specify my get_text  callback routine which is
    supposed to get the text as I described in .1) and then I do an
    XtGetSelectionValue (which through a callback gets the data from
    get_text above).   My question is how do actually get the selected
    text?  The example just says something like this:
    
         .
         .
         .
        /* allocate buffer using xmalloc */
       
    	/* get text and fill in buffer */
    
         .
         .
         . 
    
    I don't know how to do that and the documentation seems to make it
    sound trivial.  Any sugestions?
    
    
    thanks, 
    
    
    jim