Symbian Developer Library

SYMBIAN OS V6.1 EDITION FOR C++

[Index] [Glossary] [Previous] [Next]



Location: eikcmbut.h
Link against: eikcoctl.lib

Class CEikBitmapButton

CEikBitmapButton

Support

Supported from 6.0

Description

This class provides member functions to enable you to create a command button with a bitmap image. A bitmap button has no text associated with it: it displays a picture only.

Derivation

CBaseBase class for all classes to be instantiated on the heap
CCoeControlControl base class from which all other controls are derived
CEikBitmapButtonThis class provides member functions to enable you to create a command button with a bitmap image
CEikBorderedControlA control which is drawn surrounded by a rectangular border
CEikButtonBaseThis is the base class from which concrete button controls (command buttons, option buttons and checkboxes) are derived
CEikCommandButtonBaseBase class for command buttons
MCoeControlContextInterface to allow sharing of graphics settings between controls

Defined in CEikBitmapButton:
CEikBitmapButton(), ConstructFromResourceL(), Picture(), SetPictureFromFileL(), SetPictureL(), ~CEikBitmapButton()

Inherited from CBase:
operator new()

Inherited from CCoeControl:
ActivateGc(), BackedUpWindow(), CapturesPointer(), ClaimPointerGrab(), CloseWindow(), ControlContext(), ControlEnv(), CopyControlContextFrom(), CreateBackedUpWindowL(), CreateWindowL(), DeactivateGc(), DrawDeferred(), DrawNow(), DrawableWindow(), EnableDragEvents(), GetColor(), GetHelpContext(), GrabbingComponent(), HandleComponentControlsResourceChange(), HandlePointerBufferReadyL(), HandleRedrawEvent(), IgnoreEventsUntilNextPointerUp(), Index(), IsActivated(), IsBackedUp(), IsBeingDestroyed(), IsBlank(), IsDimmed(), IsFocused(), IsNonFocusing(), IsReadyToDraw(), IsVisible(), MakeVisible(), Observer(), OverrideColorL(), OwnsWindow(), Position(), PositionChanged(), PositionRelativeToScreen(), PrepareForFocusGainL(), PrepareForFocusLossL(), Rect(), RecursivelyMergedInputCapabilities(), ReportEventL(), ResetGc(), SetAllowStrayPointers(), SetBlank(), SetCanDrawOutsideRect(), SetComponentsToInheritVisibility(), SetContainerWindow(), SetControlContext(), SetCornerAndSize(), SetCornerAndSizeL(), SetExtent(), SetExtentL(), SetExtentToWholeScreen(), SetExtentToWholeScreenL(), SetFocus(), SetFocusing(), SetGloballyCapturing(), SetNeighbor(), SetNonFocusing(), SetObserver(), SetPointerCapture(), SetPosition(), SetRect(), SetRectL(), SetSize(), SetSizeL(), SetSizeWithoutNotification(), SetSizeWithoutNotificationL(), Size(), SizeChanged(), SizeChangedL(), SystemGc(), Window()

Inherited from CEikBorderedControl:
Border(), HasBorder(), SetAdjacent(), SetBorder(), iBorder

Inherited from CEikButtonBase:
Animate(), CopyDrawStateTo(), DrawState(), EClear, EDrawClear, EDrawClearPressed, EDrawIndeterminate, EDrawIndeterminatePressed, EDrawSet, EDrawSetPressed, EEikButtonLatches, EEikButtonReportsOnPointerDown, EEikButtonStaysClear, EEikButtonStaysSet, EIndeterminate, ESet, HandlePointerEventL(), InputCapabilities(), IsPressed(), SetAllowTristate(), SetBehavior(), SetBubbleHelpTextL(), SetCoordinator(), SetIgnoreNextPointerUp(), SetReportOnPointerDown(), SetState(), State(), TButtonBehavior, TDrawState, TState, iButFlags

Inherited from CEikCommandButtonBase:
ActivateL(), Behavior(), CheckCreateCommandStack(), ComponentControl(), ConstructImageFromResourceL(), ConstructLabelFromResourceL(), CountComponentControls(), Draw(), EBoth, EFirst, EFirstBottomSecondTop, EFirstLeftSecondRight, EFirstOnly, EFirstRightSecondLeft, EFirstTopSecondBottom, ESecond, ESecondOnly, EShare, EToFirst, EToSecond, FocusChanged(), GetColorUseListL(), HandleResourceChange(), LayoutComponents(), MinimumSize(), OfferKeyEventL(), SetButtonLayout(), SetContainerWindowL(), SetDefault(), SetDimmed(), SetDisplayContent(), SetExcessSpace(), SetTextL(), StartConstructFromResourceL(), StateChanged(), TDisplayContent, TExcess, TLayout, TWhichComponent, UpdateComponentAlignment(), iCmdFlags, iComponents[2]

Inherited from MCoeControlContext:
ActivateContext(), PrepareContext(), ResetContext()


Construction and destruction


CEikBitmapButton()

CEikBitmapButton();

Description

Default constructor.


ConstructFromResourceL()

void ConstructFromResourceL(TResourceReader& aReader);

Description

Constructs a bitmap button from resource.

Parameters

TResourceReader& aReader

The resource reader to use.


~CEikBitmapButton()

~CEikBitmapButton();

Description

Destructor.

[Top]


Getting and setting the button’s bitmap


Picture()

CEikImage* Picture(TWhichComponent aWhich) const;

Description

Gets the image associated with the specified component.

Parameters

TWhichComponent aWhich

The component for which the image is retrieved.

Return value

CEikImage*

The image associated with the specified component.


SetPictureFromFileL()

void SetPictureFromFileL(const TDesC& aFilename,TInt aMain,TInt aMask,TWhichComponent aWhich);

Description

Set the button’s image to a bitmap stored in a file. A bitmap mask may optionally be set using aMask. If the image cannot be read from the file, the button is not updated.

Parameters

const TDesC& aFilename

The filename from which to read the bitmap.

TInt aMain

The index of the bitmap in the file.

TInt aMask

The index of the bitmap mask in the file. If specified, this is used to create the bitmap mask for the image.

TWhichComponent aWhich

The component for which the image is set.


SetPictureL()

protected: void SetPictureL(const CFbsBitmap* aMain,const CFbsBitmap* aMask,TWhichComponent aWhich);

Description

Sets the image to be displayed in the button, and an optional bitmap mask for the image.

Parameters

const CFbsBitmap* aMain

The bitmap to appear on the button.

const CFbsBitmap* aMask

Specifies the bitmap mask to use with the bitmap aMain; default is none.

TWhichComponent aWhich

The component for which the image is set.

See also: