[futurebasic] Re: [FB] Hierarchical popup menus in Appearance runtime

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : May 2004 : Group Archive : Group : All Groups

From: Alain Pastor <apastor@...>
Date: Thu, 27 May 2004 21:15:56 +0200
Paul Bruneau wrote:

> Alain, you have done it! Thank you!
> 
> Where you learned to do this:
> 
>> Appearance Button _cAction, _activeBtn,_actionMenu,
>>  _kControlBehaviorCommandMenu,,"Action", (275,27)-(330,45),
>>   _kControlBevelButtonSmallBevelProc_kControlUsesOwningWindowsFontVariant
> 
> 
> (the _kControlBehaviorCommandMenu part)
> 
> and this:
> 
>> Def GetButtonData( btnID, _kControlMenuPart, 
>>                   _kControlBevelButtonLastMenuTag, 
>>                    Sizeof(SInt16), @menuSel.v%, actualSize )
>>
>> Def GetButtonData( btnID, _kControlMenuPart, 
>>                   _kControlBevelButtonMenuValueTag, 
>>                   Sizeof(SInt16), @menuSel.h%, actualSize )
> 
> 
> is beyond me, but I am very grateful you have shared it.
> 

You know, I just needed it and I searched the Apple documentation, which 
at times is a bit poor on certain matters, but I have to admit it was 
more a trial and error game and maybe that was the first time I didn't 
rant against the verbose names that Apple seems to be so fond of nowadays.

>> Now the tricky part is that the end user interaction is reported as a  
>> _btnClick dialog event. The prog intercepts the event more or less  
>> like so:
> 
> 
> Actually, for me this part is no problem because I was already prepared  
> to handle these popup menus in the _btnClick dialog event area. Heck in  
> FBII/FB3 STD I handled popups in the doMouse area, so this isn't too  
> strange.
> 

Well, at my side, I wanted to write a kind of generic and independent 
function easily reusable in other projects that one can put in action in 
no time.

> Thanks again, and also for the other tips,
> 

You're welcome.

Alain