MenuProcDescriptor
This class is to write inProc MDEF's, see Apples documentation
on writing custom Menus (MDEF) and the sample project we prowided with
the MenuLib (its called "Creating Custom Rendered MENU").
In MenuLib 4.0 we changed how custom MDEF's are made so you dont get
just one event and the raw MDEF any more. This is done to brigde
the gap between Carbon and Classic, as the Carbon has different MDEF'
messages, which need different handling. This all we have made transparent
to the REALbasic programmer so one Custom MDEF routine will
work on both Carbon and Classic. We still reccomend Apple documentation
for Writing custom MDEF's, even if we have changed the interface a bit.
Note: The MenuHandle, Rect and Point in the events are passed as
a general object to prevent REALbasic to make compile
link errors, so you have to typecast them the the correct
types before using them.
Super class:
Object
Properties:
None
Methods
None
Constructor:
MenuProcDescriptor(theMenu as MenuHandle)
theMenu Handle of a menu to connect the custom menu to.
Events:
DrawContents(hMenu as Object,menuRect as Object)
FindItem(hMenu as Object,menuRect as Object,hitPt as Object,
ByRef itemSelected as Integer, ByRef itemUnderMouse as Integer)
HiliteItem(hMenu as Object,menuRect as Object,hitPt as Object,
previousItem as Integer, newItem as Integer)
PositionPopUp(hMenu as Object,menuRect as Object,left as Integer,top as Integer)
SizeContents(hMenu as Object,menuRect as Object)
Supported platforms:
* MacOS PPC
* MacOS Carbon
* MacOS 68k
Unsupported platforms:
* Windows x86