[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

1729.0. "? on xt_override_translations" by VAOU02::JBLAIR (party on dudes!) Mon Nov 13 1989 20:20

    I am new to decwindows programming so I appologize if this is a dumb
    question. Also, I am speaking for a customer who is doing the actual
    work so this is all second hand info.
    
    The customer wants to have the user push a button with mb1, have a
    pop-up memu appear at that position and have the user select an item
    from the pop-up memu by releasing mb1. The user would not be required
    to release mb1 after pushing the button. My customer believes that this
    is not possible without modifying the source code for the pop-up menu
    widget. I think that as a solution modifing source code might be a bit
    radical. 
    
    Can the above requirement be accomplished by using
    xt$override_translations or something like that?
    
    
T.RTitleUserPersonal
Name
DateLines
1729.1Good news - bad newsLEOVAX::TREGGIARITue Nov 14 1989 07:427
    The good news is that an option menu or popup-up menu already
    do what you seem to be asking for.  The bad news is that the
    menu system is probably the most interdependent (event-wise)
    part of the toolkit.  So, modifying the translations (and making
    it work after you have done so) would not be easy.
    
    Leo
1729.2I do not understand the good news.VAOU02::JBLAIRparty on dudes!Tue Nov 14 1989 12:197
    re .1 I am not sure that I understand the good news. Every time I have
    used a pop-up menu I have had to press and release mb2 to make a
    selection. This customer wants to release mb1 to make the selection. 
    
    Can you give me more details on the good news?
    
    thanks
1729.3LEOVAX::TREGGIARITue Nov 14 1989 12:3431
>    re .1 I am not sure that I understand the good news. Every time I have
>    used a pop-up menu I have had to press and release mb2 to make a
>    selection. This customer wants to release mb1 to make the selection. 
>    
>    Can you give me more details on the good news?

I had a little trouble understanding what you are trying to do...
So now I'll assume that an option menu isn't what you want.  You
want MB1 pop-up menus, right?

That's not directly supported, and I'm not sure it will work (but it
might...).  You'll have to do at least one thing that the toolkit
does automatically for MB2 popups.  That is, set a passive grab for
MB1 on the window which will invoke the popup

            XGrabButton (      
                XtDisplay (w),
                1,
                AnyModifier,
                XtWindow (w),
                TRUE,                           /* Owner events */
                ButtonReleaseMask | PointerMotionHintMask,
                GrabModeAsync,
                GrabModeAsync,
                None,
                None);
  
As I mentioned, there are a lot of interdependencies between the menu,
its parent, and its children, so it may or may not work. 

Leo
1729.4Yes, a pop-up control by MB2VAOU02::JBLAIRparty on dudes!Tue Nov 14 1989 14:489
    Right! 
    
    I also want some advice to help me decide if I should get the VMS
    sources of XUI so that the customer can modify the pop-up widget. It
    would seem to me that we would want our customers to aviod such a
    drastic move but maybe I am wrong. Maybe modifying XUI sources is
    common. Do you know? 
    
    thanks
1729.5LEOVAX::TREGGIARITue Nov 14 1989 19:3414
    It's not common that I know of to modify the XUI sources.  There
    once was an XUI source kit, but there is no longer.  You could get the
    VMS source kit and try typing it all in (doesn't sound like fun...).
    
    The toolkit basically follows the style guide.  When you try to do
    something outside of the style guide, sometimes it's possible,
    sometimes it's not easy.  At this point in time, there would 
    certainly be no engineering effort spent on making something like
    this easier.  XUI is in maintenance mode; the toolkit group is
    working on Motif.
    
    Leo