[ First ]  [ Previous ]  [ Next ]  [ Last ]  [ Manuals ]

 

LStdPopupMenu



Overview:

LStdPopupMenu is a PowerPlant class that is used for managing Mac OS pop-up menus.

Methods :

The methods in this class are:

 

LStdPopupMenu()  
~LStdPopupMenu()  
DrawSelf()  
GetMacMenuH()  
InitStdPopupMenu()  
 

Data Members:

There are no data members in this class.

Operation:

LStdPopupMenu encapsulates the details of dealing with Mac OS pop-up menus. To create a new pop-up menu, create the required resources with the Constructor resource editor as described in The PowerPlant Book, then use a constructor to create your pop-up menu.

Source files:

(Pane Classes)

LStdControl.h

LStdControl.cp

Ancestors:

The ancestors this class derives from are:

 

LAttachable  
LControl  
LStdControl  
LBroadcaster  
LPane  
 

LStdPopupMenu()

Purpose:

The constructor creates objects from the passed-in parameters.

Access:

Public

Prototype:

LStdPopupMenu( const SPaneInfo &inPaneInfo,
MessageT inValueMessage,
SInt16 inTitleOptions,
ResIDT inMENUid,
SInt16 inTitleWidth,
SInt16 inPopupVariation,
ResIDT inTextTraitsID,
Str255 inTitle,
OSType inResTypeMENU,
SInt16 inInitialMenuItem );

LStdPopupMenu( const SPaneInfo &inPaneInfo,
MessageT inValueMessage,
SInt32 inMaxValue,
ResIDT inTextTraitsID,
ControlHandle inMacControlH );

LStdPopupMenu( LStream *inStream );
Parameters:

These constructors have the following parameters:

 

const   SPaneInfo&  
inPaneInfo  
A reference to the SPaneInfo object that is the super view.  
MessageT  
inValueMessage  
The message sent when the control is interacted with.  
SInt32  
inTitleOptions  
This is passed to LStdControl().  
ResIDT  
inMENUid  
The resource ID of the resource containing the menu items.  
SInt16  
inTitleWidth  
This is passed to LStdControl().  
SInt16  
inPopupVariation  
This is passed to LStdControl().  
ResIDT  
inTextTraitsID  
The resource ID for the resource containing the text traits to apply to the pop-up menu text strings.  
Str255  
inTitle  
The text string indicating the title of the pop-up menu.  
OSType  
inResTypeMENU  
This is passed to LStdControl().  
SInt16  
inInitialMenuItem  
The number indicating which menu item should appear in the pop-up menu the first time it is drawn.  
ControlHandle  
inMacControlH  
The handle to the Mac OS control.  
LStream*  
inStream  
Pointer to a stream object that contains the information to create the LControl object.  

~LStdPopupMenu()

Purpose:

The destructor destroys the object.

Access:

Virtual, Public

Prototype:

virtual ~LStdPopupMenu();

DrawSelf()

Purpose:

This method draws the pop-up menu, and is an override of DrawSelf() in LStdControl.

GetMacMenuH()

Purpose:

Return the Mac OS MenuHandle associated with a the pop-up menu.

Access:

Virtual, Public

Prototype:

virtual MenuHandle GetMacMenuH();
Parameters:

None

Return:

MenuHandle containing the Mac OS handle of the menu.

InitStdPopupMenu()

Purpose:

This is a private initializer method used by the internals of the class to set up the pop-up menu.

Access:

Private

Prototype:

void InitStdPopupMenu( SInt16 inInitialMenuItem );
Parameters:

This method has the following parameter:

 

SInt16  
inInitialMenuItem  
The number of the initial menu item to show in the popup menu.  

Return:

None


[ First ]  [ Previous ]  [ Next ]  [ Last ]  [ Manuals ]

Visit the Metrowerks website at: http://www.metrowerks.com
For assistance contact Metrowerks Technical Support at: cw_support@metrowerks.com
Copyright © 2000, Metrowerks Corp. All rights reserved.

Last updated: July 21, 2000