CEikMenuButton Class Reference

class CEikMenuButton : public CEikCommandButton

This class implements a command button that, when pressed, raises a Menu pane.

This class does NOT implement S60 look-and-feel and is not skinned.

eikcoctl.dll
Since
S60 1.0
Public Member Functions
CEikMenuButton ()
~CEikMenuButton ()
IMPORT_C void Animate ()
IMPORT_C void ConstructFromResourceL ( TResourceReader &)
IMPORT_C void HandlePointerEventL (const TPointerEvent &)
IMPORT_C void LaunchPopupMenuL ( MEikMenuObserver *)
IMPORT_C void SetMenuPaneId ( TInt )
Protected Member Functions
IMPORT_C void WriteInternalStateL ( RWriteStream &)
Private Member Functions
void ClosePopupMenu ()
void DoLaunchPopupMenuL ()
IMPORT_C void * ExtensionInterface ( TUid )
IMPORT_C void ProcessCommandL ( TInt )
IMPORT_C void SetEmphasis ( CCoeControl *, TBool )
Inherited Functions
CAknControl::CAknControl()
CAknControl::~CAknControl()
CBase::CBase()
CBase::Delete(CBase *)
CBase::Extension_(TUint,TAny *&,TAny *)
CBase::operator new(TUint)
CBase::operator new(TUint,TAny *)
CBase::operator new(TUint,TLeave)
CBase::operator new(TUint,TLeave,TUint)
CBase::operator new(TUint,TUint)
CBase::~CBase()
CCoeControl::AccumulatedZoom()const
CCoeControl::ActivateGc()const
CCoeControl::BackedUpWindow()const
CCoeControl::Background()const
CCoeControl::CCoeControl()
CCoeControl::CCoeControl(CCoeEnv *)
CCoeControl::CCoeControl(const CCoeControl &)
CCoeControl::CapturesPointer()const
CCoeControl::ClaimPointerGrab(TBool)
CCoeControl::ClaimPointerGrab(TInt,TBool)
CCoeControl::CloseWindow()
CCoeControl::ComponentArrayExists()const
CCoeControl::Components()
CCoeControl::Components()const
CCoeControl::ControlContext()const
CCoeControl::ControlEnv()const
CCoeControl::CopyControlContextFrom(const CCoeControl *)
CCoeControl::CreateBackedUpWindowL(RWindowTreeNode &)
CCoeControl::CreateBackedUpWindowL(RWindowTreeNode &,TDisplayMode)
CCoeControl::CreateWindowL()
CCoeControl::CreateWindowL(RWindowGroup *)
CCoeControl::CreateWindowL(RWindowTreeNode &)
CCoeControl::CreateWindowL(const CCoeControl *)
CCoeControl::CustomGc()const
CCoeControl::DeactivateGc()const
CCoeControl::DrawBackground(const TRect &)const
CCoeControl::DrawDeferred()const
CCoeControl::DrawForeground(const TRect &)const
CCoeControl::DrawNow()const
CCoeControl::DrawNow(const TRect &)const
CCoeControl::DrawableWindow()const
CCoeControl::EnableDragEvents()
CCoeControl::EnableReportControlStateChange(TBool)
CCoeControl::EnableWindowTransparency()
CCoeControl::FindBackground()const
CCoeControl::FindFontProvider()const
CCoeControl::GetColor(TInt,TRgb &)const
CCoeControl::GetGc()const
CCoeControl::GetHelpContext(TCoeHelpContext &)const
CCoeControl::GrabbingComponent()const
CCoeControl::GrabbingComponent(TInt)const
CCoeControl::HandleComponentControlsResourceChange(TInt)
CCoeControl::HandleControlArrayEventL(CCoeControlArray::TEvent,const CCoeControlArray *,CCoeControl *,TInt)
CCoeControl::HandlePointerBufferReadyL()
CCoeControl::HandleRedrawEvent(const TRect &)const
CCoeControl::HitTest()const
CCoeControl::IgnoreEventsUntilNextPointerUp()
CCoeControl::Index(const CCoeControl *)const
CCoeControl::InitComponentArrayL()
CCoeControl::IsActivated()const
CCoeControl::IsBackedUp()const
CCoeControl::IsBeingDestroyed()const
CCoeControl::IsBlank()const
CCoeControl::IsDimmed()const
CCoeControl::IsFocused()const
CCoeControl::IsNonFocusing()const
CCoeControl::IsReadyToDraw()const
CCoeControl::IsVisible()const
CCoeControl::LayoutManager()const
CCoeControl::MakeVisible(TBool)
CCoeControl::MaximumWidth()const
CCoeControl::MopSupplyObject(TTypeUid)
CCoeControl::NotifyFontChange(const CCoeFontProvider *)
CCoeControl::Observer()const
CCoeControl::OverrideColorL(TInt,TRgb)
CCoeControl::OwnsWindow()const
CCoeControl::Parent()
CCoeControl::Parent()const
CCoeControl::Position()const
CCoeControl::PositionChanged()
CCoeControl::PositionRelativeToScreen()const
CCoeControl::PrepareForFocusGainL()
CCoeControl::PrepareForFocusLossL()
CCoeControl::ProcessPointerBufferReadyL()
CCoeControl::ProcessPointerEventL(const TPointerEvent &)
CCoeControl::Rect()const
CCoeControl::RecursivelyMergeInputCapabilities(TCoeInputCapabilities &)const
CCoeControl::RecursivelyMergedInputCapabilities()const
CCoeControl::RefetchPixelMappingL()
CCoeControl::RemoveFromParent()
CCoeControl::ReportEventL(MCoeControlObserver::TCoeEvent)
CCoeControl::RequestRelayout(const CCoeControl *)
CCoeControl::ResetGc()const
CCoeControl::ScreenFont(const TCoeFont &)const
CCoeControl::SetAllowStrayPointers()
CCoeControl::SetBackground(const MCoeControlBackground *)
CCoeControl::SetBlank()
CCoeControl::SetCanDrawOutsideRect()
CCoeControl::SetComponentsToInheritVisibility(TBool)
CCoeControl::SetContainerWindowL(RBackedUpWindow &)
CCoeControl::SetContainerWindowL(RWindow &)
CCoeControl::SetControlContext(MCoeControlContext *)
CCoeControl::SetCornerAndSize(TGulAlignment,const TSize &)
CCoeControl::SetCustomGc(CWindowGc *)
CCoeControl::SetExtent(const TPoint &,const TSize &)
CCoeControl::SetExtentToWholeScreen()
CCoeControl::SetFocus(TBool,TDrawNow)
CCoeControl::SetFocusing(TBool)
CCoeControl::SetFontProviderL(const CCoeFontProvider &)
CCoeControl::SetGc(CWindowGc *)const
CCoeControl::SetGloballyCapturing(TBool)
CCoeControl::SetHitTest(const MCoeControlHitTest *)
CCoeControl::SetLayoutManagerL(MCoeLayoutManager *)
CCoeControl::SetMaximumWidth(TInt)
CCoeControl::SetMopParent(MObjectProvider *)
CCoeControl::SetNeighbor(CCoeControl *)
CCoeControl::SetNonFocusing()
CCoeControl::SetObserver(MCoeControlObserver *)
CCoeControl::SetParent(CCoeControl *)
CCoeControl::SetPointerCapture(TBool)
CCoeControl::SetPosition(const TPoint &)
CCoeControl::SetRect(const TRect &)
CCoeControl::SetSize(const TSize &)
CCoeControl::SetSizeWithoutNotification(const TSize &)
CCoeControl::SetTextBaselineSpacing(TInt)
CCoeControl::SetUniqueHandle(TInt)
CCoeControl::SetZoomFactorL(TInt,TZoomType)
CCoeControl::Size()const
CCoeControl::SystemGc()const
CCoeControl::TextBaselineOffset(const TSize &)const
CCoeControl::TextDrawer(TInt)const
CCoeControl::UniqueHandle()const
CCoeControl::Window()const
CCoeControl::WriteInternalStateNowL(RWriteStream &)const
CCoeControl::ZoomWithType()const
CCoeControl::operator=(const CCoeControl &)
CCoeControl::~CCoeControl()
CEikBorderedControl::Border()const
CEikBorderedControl::CEikBorderedControl()
CEikBorderedControl::CEikBorderedControl(const TGulBorder &)
CEikBorderedControl::HasBorder()const
CEikBorderedControl::SetAdjacent(TInt)
CEikBorderedControl::SetBorder(TGulBorder::TBorderType)
CEikBorderedControl::SetBorder(TInt)
CEikButtonBase::CEikButtonBase()
CEikButtonBase::CopyDrawStateTo(CEikButtonBase *)const
CEikButtonBase::DrawState()const
CEikButtonBase::InputCapabilities()const
CEikButtonBase::IsPressed()const
CEikButtonBase::SetAllowTristate()
CEikButtonBase::SetBehavior(TButtonBehavior)
CEikButtonBase::SetCoordinator(TEikButtonCoordinator *)
CEikButtonBase::SetIgnoreNextPointerUp()
CEikButtonBase::SetReportOnPointerDown()
CEikButtonBase::SetState(TState)
CEikButtonBase::State()const
CEikButtonBase::~CEikButtonBase()
CEikCommandButton::AddCommandToStackL(TInt,const TDesC *,const CFbsBitmap *,const CFbsBitmap *)
CEikCommandButton::CEikCommandButton()
CEikCommandButton::Label()const
CEikCommandButton::Picture()const
CEikCommandButton::PopCommandFromStack()
CEikCommandButton::RemoveCommandFromStack(TInt)
CEikCommandButton::SetButtonLayout(TLayout)
CEikCommandButton::SetCommandL(TInt,const TDesC *,const CFbsBitmap *,const CFbsBitmap *)
CEikCommandButton::SetDisplayContent(TDisplayContent)
CEikCommandButton::SetExcessSpace(TExcess)
CEikCommandButton::SetPictureFromFileL(const TDesC &,TInt,TInt)
CEikCommandButton::SetPictureL(const CFbsBitmap *,const CFbsBitmap *)
CEikCommandButton::SetTextL(const TDesC &)
CEikCommandButton::UpdateComponentAlignment()
CEikCommandButton::~CEikCommandButton()
CEikCommandButtonBase::ActivateL()
CEikCommandButtonBase::Behavior()const
CEikCommandButtonBase::ButFlags()const
CEikCommandButtonBase::CEikCommandButtonBase()
CEikCommandButtonBase::CheckCreateCommandStackL()
CEikCommandButtonBase::CommandStack()const
CEikCommandButtonBase::ComponentControl(TInt)const
CEikCommandButtonBase::ConstructImageFromResourceL(TResourceReader &,TWhichComponent)
CEikCommandButtonBase::ConstructLabelFromResourceL(TResourceReader &,TWhichComponent)
CEikCommandButtonBase::CountComponentControls()const
CEikCommandButtonBase::Draw(const TRect &)const
CEikCommandButtonBase::FocusChanged(TDrawNow)
CEikCommandButtonBase::GetColorUseListL(CArrayFix< TCoeColorUse > &)const
CEikCommandButtonBase::HandleResourceChange(TInt)
CEikCommandButtonBase::IsDefault()const
CEikCommandButtonBase::LayoutComponents()
CEikCommandButtonBase::MinimumSize()
CEikCommandButtonBase::OfferKeyEventL(const TKeyEvent &,TEventCode)
CEikCommandButtonBase::SetContainerWindowL(const CCoeControl &)
CEikCommandButtonBase::SetDefault(TBool)
CEikCommandButtonBase::SetDimmed(TBool)
CEikCommandButtonBase::SetImageAttributes(CEikImage *)
CEikCommandButtonBase::SetPictureFromFileL(const TDesC &,TInt,TInt,CEikAlignedControl *&)
CEikCommandButtonBase::SetPictureL(const CFbsBitmap *,const CFbsBitmap *,CEikAlignedControl *&)
CEikCommandButtonBase::SetTextL(const TDesC &,CEikAlignedControl *&)
CEikCommandButtonBase::StartConstructFromResourceL(TResourceReader &)
CEikCommandButtonBase::StateChanged()
CEikCommandButtonBase::~CEikCommandButtonBase()
Inherited Enumerations
CCoeControl:TZoomType
CEikButtonBase:TDrawState
CEikButtonBase:TState
CEikCommandButton:TDisplayContent
CEikCommandButton:TExcess
CEikCommandButton:TLayout
CEikCommandButtonBase:TWhichComponent
Private Attributes
MEikMenuObserver * iMenuObserver
TInt iMenuPaneId
CEikMenuPane * iMenuPopup
TInt iSpare
Inherited Attributes
CCoeControl::iCoeEnv
CCoeControl::iContext
CCoeControl::iPosition
CCoeControl::iSize
CEikBorderedControl::iBorder
CEikButtonBase::iButFlags
CEikCommandButtonBase::iCmdFlags
CEikCommandButtonBase::iComponents
CEikCommandButtonBase::iMargins

Constructor & Destructor Documentation

CEikMenuButton()

IMPORT_C CEikMenuButton ( )

C++ constructor

~CEikMenuButton()

IMPORT_C ~CEikMenuButton ( )

destructor

Member Functions Documentation

Animate()

IMPORT_C void Animate ( ) [virtual]

Triggers the change of appearance of the button that is associated with the button being pressed

ClosePopupMenu()

void ClosePopupMenu ( ) [private]

ConstructFromResourceL(TResourceReader &)

IMPORT_C void ConstructFromResourceL ( TResourceReader & aReader ) [virtual]

2nd phase constructor using a MNBUT resource struct

Parameters

TResourceReader & aReader A constructed resource reader.

DoLaunchPopupMenuL()

void DoLaunchPopupMenuL ( ) [private]

ExtensionInterface(TUid)

IMPORT_C void * ExtensionInterface ( TUid aInterface ) [private, virtual]

Parameters

TUid aInterface

HandlePointerEventL(const TPointerEvent &)

IMPORT_C void HandlePointerEventL ( const TPointerEvent & aPointerEvent ) [virtual]

From CCoeControl

Framework method called when a pointer event is found to be within this control's boundaries. The default implementation causes the associated menu to be presented to the screen.

Parameters

const TPointerEvent & aPointerEvent Pointer event to process

LaunchPopupMenuL(MEikMenuObserver *)

IMPORT_C void LaunchPopupMenuL ( MEikMenuObserver * aObserver )

Launch the related menu pane

Parameters

MEikMenuObserver * aObserver Mandatory supplied menu observer pointer.

ProcessCommandL(TInt)

IMPORT_C void ProcessCommandL ( TInt aCommandId ) [private]

From MEikCommandObserver

Framework method called to processs a command ID

Parameters

TInt aCommandId ID of the command to respond to.

SetEmphasis(CCoeControl *, TBool)

IMPORT_C void SetEmphasis ( CCoeControl * aMenuControl,
TBool aEmphasis
) [private]

From MEikMenuObserver

Called by the Uikon framework to handle the emphasising or de-emphasising of a menu window.

CEikMenuBar objects call this on their observer to emphasise themselves when they are displayed, and de-emphasise themselves when they stop displaying.

Parameters

CCoeControl * aMenuControl The menu control
TBool aEmphasis ETrue to emphasize the menu, EFalse otherwise

SetMenuPaneId(TInt)

IMPORT_C void SetMenuPaneId ( TInt aMenuPaneId )

Set the menu pane id to be launched when the control is activated.

Parameters

TInt aMenuPaneId Resource ID of the menu pane to be launched

WriteInternalStateL(RWriteStream &)

IMPORT_C void WriteInternalStateL ( RWriteStream & aWriteStream ) const [protected, virtual]

From CCoeControl

Serialize the state of the control to the given stream

Writes the internal state of the control and its components to aStream. Does nothing in release mode. Designed to be overidden and base called by subclasses.

Parameters

RWriteStream & aWriteStream Stream to write to

Member Data Documentation

MEikMenuObserver * iMenuObserver

MEikMenuObserver * iMenuObserver [private]

The object to receive the menu events Not Owned

TInt iMenuPaneId

TInt iMenuPaneId [private]

Resource ID of the menu pane

CEikMenuPane * iMenuPopup

CEikMenuPane * iMenuPopup [private]

Holds a menu pane object to be popped up Owned

TInt iSpare

TInt iSpare [private]