|
|
|
Location:
EIKBUTB.H
Link against: eikcoctl.lib
class CEikButtonBase : public CEikBorderedControl, public MQikCommandListOwner, public MQikCommandHandler;
This is the base class from which concrete button controls (command buttons, option buttons and checkboxes) are derived.
The base class implements knowledge of the buttons logical state, and can respond to user events. It cannot, however, draw itself.Derived classes should provide an appropriate implementation of CCoeControl::Draw() . It is usual to make the on-screen appearance of the button dependent on its current state. Derived classes may also implement StateChanged() to respond appropriately to changes in the draw state.
MQikCommandHandler - Interface for classes responsible of executing commandsMQikCommandListOwner - Interface for classes adding commandsMEikBorderedControl - Interface for bordered controlsMObjectProvider - An interface that allows an object to be part of a network of object providersCBase - Base class for all classes to be instantiated on the heapCCoeControl - Control base class from which all other controls are derivedCEikBorderedControl - A control which is drawn surrounded by a rectangular borderCEikButtonBase - This is the base class from which concrete button controls (command buttons, option buttons and checkboxes) are derivedDefined in CEikButtonBase:
ActivateL(), Animate(), Border(), CEikButtonBase(), CEikButtonBase_Reserved_1(), CEikButtonBase_Reserved_2(), CEikButtonBase_Reserved_3(), ComponentControl(), ConstructFromResourceL(), CopyDrawStateTo(), CountComponentControls(), Draw(), DrawState(), EClear, EDrawClear, EDrawClearPressed, EDrawIndeterminate, EDrawIndeterminatePressed, EDrawSet, EDrawSetPressed, EIndeterminate, ESet, FocusChanged(), GetColorUseListL(), GetHelpContext(), GetTextDrawer(), HandleCommandL(), HandleControlArrayEventL(), HandlePointerBufferReadyL(), HandlePointerEventL(), HandleResourceChange(), HasBorder(), InputCapabilities(), IsPressed(), MakeVisible(), MapCommandHandler(), MinimumSize(), MopSupplyObject(), OfferKeyEventL(), PositionChanged(), PrepareForFocusGainL(), PrepareForFocusLossL(), RequestRelayout(), SetAdjacent(), SetAllowTristate(), SetBehavior(), SetBorder(), SetBorder(), SetBubbleHelpTextL(), SetContainerWindowL(), SetCoordinator(), SetDimmed(), SetIgnoreNextPointerUp(), SetLayoutManagerL(), SetNeighbor(), SetParent(), SetReportOnPointerDown(), SetState(), SetTextBaselineSpacing(), SizeChanged(), State(), StateChanged(), TDrawState, TState, TextBaselineOffset(), WriteInternalStateL(), iButFlags, ~CEikButtonBase()
Inherited from CBase:
Delete(),
Extension_(),
operator new()
Inherited from CCoeControl:
AccumulatedZoom(),
ActivateGc(),
BackedUpWindow(),
Background(),
CapturesPointer(),
ClaimPointerGrab(),
CloseWindow(),
ComponentArrayExists(),
Components(),
ControlContext(),
ControlEnv(),
CopyControlContextFrom(),
CreateBackedUpWindowL(),
CreateWindowL(),
DeactivateGc(),
DrawBackground(),
DrawDeferred(),
DrawForeground(),
DrawNow(),
DrawableWindow(),
EAbsoluteZoom,
ERelativeZoom,
EnableDragEvents(),
FindBackground(),
FindFontProvider(),
GetColor(),
GetGc(),
GrabbingComponent(),
HandleComponentControlsResourceChange(),
HandleRedrawEvent(),
HitTest(),
IgnoreEventsUntilNextPointerUp(),
Index(),
InitComponentArrayL(),
IsActivated(),
IsBackedUp(),
IsBeingDestroyed(),
IsBlank(),
IsDimmed(),
IsFocused(),
IsNonFocusing(),
IsReadyToDraw(),
IsVisible(),
LayoutManager(),
MaximumWidth(),
MopNext(),
Observer(),
OverrideColorL(),
OwnsWindow(),
Parent(),
Position(),
PositionRelativeToScreen(),
Rect(),
RecursivelyMergedInputCapabilities(),
ReportEventL(),
Reserved_2(),
ResetGc(),
ScreenFont(),
SetAllowStrayPointers(),
SetBackground(),
SetBlank(),
SetCanDrawOutsideRect(),
SetComponentsToInheritVisibility(),
SetControlContext(),
SetCornerAndSize(),
SetExtent(),
SetExtentToWholeScreen(),
SetFocus(),
SetFocusing(),
SetFontProviderL(),
SetGc(),
SetGloballyCapturing(),
SetHitTest(),
SetMaximumWidth(),
SetMopParent(),
SetNonFocusing(),
SetObserver(),
SetPointerCapture(),
SetPosition(),
SetRect(),
SetSize(),
SetSizeWithoutNotification(),
SetUniqueHandle(),
SetZoomFactorL(),
Size(),
SystemGc(),
TZoomType,
TextDrawer(),
UniqueHandle(),
Window(),
ZoomWithType(),
iCoeEnv,
iContext,
iPosition,
iSize
Inherited from CEikBorderedControl:
iBorder
Inherited from MEikBorderedControl:
ETypeId,
anonymous
Inherited from MObjectProvider:
MObjectProvider_Reserved1(),
MObjectProvider_Reserved2(),
MopGetObject(),
MopGetObjectNoChaining()
Inherited from MQikCommandHandler:
HandleAttemptDimmedSelectionL()
IMPORT_C ~CEikButtonBase();
Destructor.
Destroys a CEikButtonBase object. Button base objects do not own their coordinator, the destructor therefore does not delete it.
IMPORT_C TState State() const;
Gets the buttons logical state.
|
IMPORT_C void SetState(TState aState);
Sets the buttons state. In order to create a Tri-State button, this method should be called once with the state EIndeterminate.
|
virtual IMPORT_C void Animate();
Animates a button; showing the control as momentarily depressed.
This is called by OfferKeyEventL() ; it may also be called by an application when the state of a button control is changed from elsewhere to mimic button behaviour and provide more feedback to the user.
IMPORT_C void SetCoordinator(TEikButtonCoordinator *aButCoord);
Sets the buttons co-ordinator.
This function sets the specified TEikButtonCoordinator object as the buttons co-ordinator. A button co-ordinator manages the interdependence between buttons in a group.
|
IMPORT_C void SetBehavior(TButtonBehavior aBehavior);
Sets the buttons behaviour.
A button can be made to stay set or stay clear. It can also be made a latching button.
|
IMPORT_C void SetIgnoreNextPointerUp();
Sets the button flag so that the next pointer up event is ignored.
IMPORT_C void SetBubbleHelpTextL(const TDesC &aText);
Sets the text to appear in a bubble help message for the button.
|
protected: IMPORT_C void SetReportOnPointerDown();
Sets event reporting on pointer down events.
If this flag is set, HandlePointerEvent() will report events to the control observer on incoming pointer down events. Normally events are only sent by the button in response to an incoming pointer down event followed by a pointer up event.
protected: IMPORT_C TDrawState DrawState() const;
Gets the current draw state.
|
protected: IMPORT_C TBool IsPressed() const;
Tests whether the button is currently being pressed by the user.
|
protected: IMPORT_C void SetAllowTristate();
Specifies the button can have an indeterminate state that is neither on, nor off.
protected: IMPORT_C void CopyDrawStateTo(CEikButtonBase *aTargetButton) const;
Copies the current draw state to the specified button.
|
virtual IMPORT_C void GetColorUseListL(CArrayFix< TCoeColorUse > &aColorUseList) const;
Gets a list of logical colours employed in the drawing of the control, paired with an explanation of how they are used.
Appends the list to aColorUseList .
|
virtual IMPORT_C void HandleResourceChange(TInt aType);
Handles a change to the control's resources which are shared across the environment.
For example, colours or fonts.
|
virtual IMPORT_C void WriteInternalStateL(RWriteStream &aWriteStream) const;
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.
|
virtual IMPORT_C void PrepareForFocusGainL();
Notifier called upon before the control gains focus.
virtual IMPORT_C void PrepareForFocusLossL();
Notifier called upon before the control loses focus.
private: virtual IMPORT_C void GetTextDrawer(CCoeTextDrawerBase *&aTextDrawer, const CCoeControl *aDrawingControl, TInt aKey) const;
|
virtual IMPORT_C MQikCommandHandler *MapCommandHandler(CQikCommand &aCommand);
From MQikCommandListOwner
|
|
virtual IMPORT_C void HandleCommandL(CQikCommand &aCommand);
From MQikCommandHandler
|
private: virtual IMPORT_C void StateChanged();
Notifies the button that its draw state has changed.
This function is called by CEikButtonBase when the buttons draw state changes, and may be overriden by derived classes in order to respond appropriately. For example, certain standard Uikon classes change their border type ready for drawing.Subclasses should call their own StateChanged() function whenever they update the draw state.
virtual IMPORT_C void HandlePointerEventL(const TPointerEvent &aPointerEvent);
Handles pointer events occurring on the control.
This function provides an appropriate implementation of CCoeControl::HandlePointerEventL() .
|
virtual IMPORT_C TKeyResponse OfferKeyEventL(const TKeyEvent &aKeyEvent, TEventCode aType);
Handles key events offered to the control by the control environment.
This function provides an appropriate implementation of CCoeControl::OfferKeyEventL() .
|
|
virtual IMPORT_C TCoeInputCapabilities InputCapabilities() const;
Returns the controls input capabilities.
|
virtual IMPORT_C TTypeUid::Ptr MopSupplyObject(TTypeUid aId);
Retrieves an object of the same type as that encapsulated in aId. From CCoeControl .
|
|
virtual IMPORT_C TBool HasBorder() const;
Tests if the control has a border. From CCoeControl .
|
virtual IMPORT_C void SetAdjacent(TInt aAdjacent);
Sets the control's appearance when it is next to other controls. From CCoeControl .
|
virtual IMPORT_C void MakeVisible(TBool aVisible);
Sets this control as visible or invisible. From CCoeControl .
|
virtual IMPORT_C void SetDimmed(TBool aDimmed);
Sets the control to be dimmed. From CCoeControl .
|
virtual IMPORT_C void SetContainerWindowL(const CCoeControl &aContainer);
Sets the control's containing window by copying it from aContainer. From CCoeControl .
|
virtual IMPORT_C void ConstructFromResourceL(TResourceReader &aReader);
Constructs the control from a resource file. From CCoeControl .
|
virtual IMPORT_C void ActivateL();
Sets the control as ready to be drawn. From CCoeControl .
virtual IMPORT_C void SetNeighbor(CCoeControl *aNeighbor);
Sets an associated control. From CCoeControl .
|
virtual IMPORT_C TSize MinimumSize();
Gets the control's minimum required size. From CCoeControl .
|
virtual IMPORT_C void GetHelpContext(TCoeHelpContext &aContext) const;
Gets the control's help context. From CCoeControl .
|
virtual IMPORT_C TInt SetParent(CCoeControl *aParent);
Sets aParent as the parent of this control. From CCoeControl .
|
|
virtual IMPORT_C void SetLayoutManagerL(MCoeLayoutManager *aLayout);
Sets the layout manager From CCoeControl .
|
virtual IMPORT_C TBool RequestRelayout(const CCoeControl *aChildControl);
Requests a relayout. From CCoeControl .
|
|
virtual IMPORT_C TInt TextBaselineOffset(const TSize &aSize) const;
Gets the offset to the first text baseline relative to the top of the control. From CCoeControl .
|
|
virtual IMPORT_C void SetTextBaselineSpacing(TInt aSpacing);
Sets the spacing between text baselines. From CCoeControl .
|
virtual IMPORT_C TInt CountComponentControls() const;
Gets the number of controls contained in a compound control. From CCoeControl .
|
virtual IMPORT_C CCoeControl *ComponentControl(TInt aIndex) const;
Gets an indexed component of a compound control. From CCoeControl .
|
|
virtual IMPORT_C void SetBorder(TGulBorder::TBorderType aBorderType);
Sets the border type from enum. From MEikBorderedControl .
|
virtual IMPORT_C void SetBorder(TInt aBorderType);
Sets the border type from value. From MEikBorderedControl .
|
virtual IMPORT_C TGulBorder Border() const;
Gets the border type. From MEikBorderedControl .
|
protected: virtual IMPORT_C void Draw(const TRect &aRect) const;
Draws the border around the control. From CCoeControl .
|
protected: virtual IMPORT_C void HandlePointerBufferReadyL();
Handles pointer buffer ready events. From CCoeControl .
protected: virtual IMPORT_C void FocusChanged(TDrawNow aDrawNow);
Responds to a change in focus. From CCoeControl .
|
protected: virtual IMPORT_C void SizeChanged();
Responds to changes to the size and position of the contents of this control. From CCoeControl .
protected: virtual IMPORT_C void PositionChanged();
Responds to changes in the position of a control. From CCoeControl .
protected: virtual IMPORT_C void HandleControlArrayEventL(CCoeControlArray::TEvent aEvent, const CCoeControlArray *aArray, CCoeControl *aControl, TInt aControlId);
Handles events generated by the CCoeControlArray. From CCoeControl .
|
TState
Possible logical states for a button.
TState values represent the logical state of a button. Derived button classes may draw themselves differently to indicate different states. See also State() and SetState() .The state of a non-latching button is, in general, of no interest to applications. What is of interest is the fact that it has been pressed.
|
protected: TDrawState
Possible states for the draw stateThe TDrawState values affecting a button are stored in iButFlags .
All draw state flag bits must be maskable by 0x001f ; the ones which describe a pressed button must be maskable by 0x0010 .
|
protected: TInt iButFlags;