|
|
|||
Location:
QikScrollableContainer.h
Link against: qikcore.lib
class CQikScrollableContainer : public CQikContainerBase, public MEikScrollBarObserver;
This is a container for CCoeControl-derived controls that adds horizontal and/or vertical scrollbar(s) when needed. To use this container, simply: 1. add the controls to it 2a. add a layout manager, or 2b. position them manually relative the upper left corner of the scrolling page 2b.1 call the MinimumPageSize() method to find the size needed to hold all the controls. Use the SetPageSize() method to set the size of the scrolling page. A margin is added to the size given when a scrollbar is needed (can be changed with the SetBottomRightMargin() method).
MEikScrollBarObserver - This mixin is implemented by classes wishing to receive notification about scroll events from a scroll barMQikRelayoutSensitiveControl - A mixin for controls that have a special behaviour when a view changes layoutsMQikContainer - A mixin for controls that allows other classes to add and remove controls via a generic APIMEikBorderedControl - 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 borderCQikContainerBase - A generic base class for container controlsCQikScrollableContainer - This is a container for CCoeControl-derived controls that adds horizontal and/or vertical scrollbar(s) when neededDefined in CQikScrollableContainer:
ActivateL(), AddControlLC(), BeginUpdateLC(), Border(), BottomRightMargin(), CQikScrollableContainer(), CalculateRowInfo(), ComponentControl(), ConstructFromResourceL(), ConstructL(), ConstructL(), ContainerWindow(), Controls(), Controls(), ControlsFitOnPage(), CountComponentControls(), DeleteControl(), Draw(), EndUpdateL(), FocusChanged(), GetColorUseListL(), GetHelpContext(), HandleControlArrayEventL(), HandlePointerBufferReadyL(), HandlePointerEventL(), HandleResourceChange(), HandleScrollEventL(), HasBorder(), InitializeFromResourceL(), InputCapabilities(), LayoutManager(), LayoutManagerOfPage(), MakeVisible(), MinimumPageSize(), MinimumSize(), MopSupplyObject(), OfferKeyEventL(), Page(), PageSize(), PerformLayout(), PersistsAfterRelayout(), PositionChanged(), PrepareForFocusGainL(), PrepareForFocusLossL(), ReleaseControls(), RemoveControl(), RequestRelayout(), ResetAndDestroy(), Scroll(), ScrollBarFrame(), ScrollBarsNeeded(), ScrollOffset(), ScrollTo(), ScrollTo(), ScrollToMakeVisible(), SetAdjacent(), SetBorder(), SetBorder(), SetBottomRightMargin(), SetContainerWindowL(), SetDimmed(), SetLayoutManagerL(), SetNeighbor(), SetPageSize(), SetParent(), SetScrollObserver(), SetTextBaselineSpacing(), SizeChanged(), TextBaselineOffset(), UpdateScrollBarsL(), WriteInternalStateL(), ~CQikScrollableContainer()
Inherited from CBase:
Delete(),
Extension_(),
operator new()
Inherited from CCoeControl:
AccumulatedZoom(),
ActivateGc(),
BackedUpWindow(),
Background(),
CapturesPointer(),
ClaimPointerGrab(),
CloseWindow(),
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(),
MaximumWidth(),
Observer(),
OverrideColorL(),
OwnsWindow(),
Parent(),
Position(),
PositionRelativeToScreen(),
Rect(),
RecursivelyMergedInputCapabilities(),
ReportEventL(),
Reserved_CCoeControl_10(),
Reserved_CCoeControl_11(),
Reserved_CCoeControl_12(),
Reserved_CCoeControl_13(),
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 CQikContainerBase:
BaseConstructL(),
ControlsOwnedExternally(),
ETypeId,
HandlesRelayoutRequests(),
HorizontalWrappingEnabled(),
IsRelayoutInProgress(),
RowBasedMode(),
SetDebugMode(),
SetHandleRelayoutRequests(),
SetHorizontalWrappingEnabled(),
SetPersistsAfterRelayout(),
SetRelayoutInProgress(),
SetRowBasedMode(),
SetVerticalWrappingEnabled(),
VerticalWrappingEnabled(),
anonymous
Inherited from MObjectProvider:
MopGetObject(),
MopGetObjectNoChaining()
IMPORT_C CQikScrollableContainer();
Default constructor, it partially build a CQikScrollableContainer. the construction process will be not complete until ConstructL() it's called and executed.
~CQikScrollableContainer()ConstructL(TBool aPreAllocScrollBar)ConstructL(TBool aPreAllocScrollBar, TBool aComponentsOwnedExternally)IMPORT_C void ConstructL(TBool aPreAllocScrollBar);
Second step in construction process.
|
IMPORT_C void ConstructL(TBool aPreAllocScrollBar, TBool aControlsOwnedExternally);
Second step in construction process.
|
IMPORT_C CEikScrollBarFrame *ScrollBarFrame();
returns a pointer to the contained ScrollBarFrame
|
IMPORT_C TInt DeleteControl(CCoeControl &aControl);
Delete a control from the scrollable container.
|
|
|
IMPORT_C void ResetAndDestroy();
Removes and deletes all controls from the scrollable container.
IMPORT_C TSize MinimumPageSize() const;
Calculate the minimum size needed for the scrolling page to hold all the controls added to it, plus a margin to the right and bottom. Scrollbar(s) are added and removed as needed.
|
IMPORT_C void SetPageSize(TSize aSize);
Set the (minimum) size to be used by the scrolling page. Scrollbar(s) are added and removed as needed.
|
IMPORT_C TSize PageSize() const;
Returns the size of the scrolling page.
|
| Interface status: | deprecated | Use ContainerWindow() instead |
inline const CCoeControl &Page() const;
Returns a reference to the page of the scrolling container. Use this as ContainerWindow for all controls (and their subcontrols) that you add to the scrollable container.
|
IMPORT_C MCoeLayoutManager *LayoutManagerOfPage() const;
Gets the layout manager of the page
|
IMPORT_C TBool ControlsFitOnPage() const;
Predicate function used to tell whether the controls added to the scrollable container fit on the scrolling page, given its current size.
|
IMPORT_C void ScrollToMakeVisible(const CCoeControl *aControl) const;
Scroll the page to make a control visible
|
#Scroll(TInt aDeltaX, TInt aDeltaY)#ScrollTo( TPoint aTopLeft )IMPORT_C void ScrollTo(TPoint aTopLeft) const;
Scroll the page
|
#Scroll(TInt aDeltaX, TInt aDeltaY)#ScrollToMakeVisible( const CCoeControl* aControl )IMPORT_C void ScrollTo(TRect aRect) const;
Scrolls the page to make a rect visible
|
IMPORT_C void Scroll(TInt aDeltaX, TInt aDeltaY) const;
Scroll the page
|
#ScrollToMakeVisible( TPoint aTopLeft )#ScrollToMakeVisible( const CCoeControl* aControl )IMPORT_C void SetBottomRightMargin(TSize aMargin);
Use this method to set the margin that is added to the right and bottom of the scrolling page.
|
IMPORT_C TSize BottomRightMargin() const;
Returns the margin added to the right and bottom of the scrolling page.
|
IMPORT_C void SetScrollObserver(MEikScrollBarObserver *aObserver);
Sets an external scroll observer if needed. This is normally not the case, since the scrollable container handles all normal scrolling functionality.
|
IMPORT_C void ScrollBarsNeeded(TBool &aVerticalScrollBar, TBool &aHorizontalScrollBar) const;
set if a scrollbar is needed
|
virtual IMPORT_C void ConstructFromResourceL(TResourceReader &aReader);
Reads a QIK_SCROLLABLE_CONTAINER
|
CCoeControl::ConstructFromResourceLvirtual IMPORT_C TKeyResponse OfferKeyEventL(const TKeyEvent &aKeyEvent, TEventCode aType);
Handles key events Called by the Epoc framework.
|
|
virtual IMPORT_C void MakeVisible(TBool aVisible);
Sets this control as visible or invisible. This causes the control to disappear or reappear
|
virtual IMPORT_C const CCoeControl &ContainerWindow() const;
Gets the page
|
CQikContainerBase::ContainerWindowvirtual IMPORT_C void InitializeFromResourceL(TResourceReader &aReader, MQikControlProvider &aProvider);
Reads a QIK_SCROLLABLE_CONTAINER_SETTINGS and creates controls, layout manager, and layout data accordingly.
|
CQikContainerBase::InitializeFromResourceLvirtual IMPORT_C void SetLayoutManagerL(MCoeLayoutManager *aLayout);
Sets the layout manager of the page
|
CCoeControl::SetLayoutManagerLIMPORT_C MCoeLayoutManager *LayoutManager() const;
Returns NULL since the scrollable container cannot have its own layout manager. Use LayoutManagerOfPage() if you want to get the layout manager of the page.
|
LayoutManagerOfPagevirtual IMPORT_C TSize MinimumSize();
|
CCoeControl::MinimumSizeprotected: virtual IMPORT_C void HandleScrollEventL(CEikScrollBar *aScrollBar, TEikScrollEvent aEventType);
handles scroll events, performing the scrolling Called by the Epoc framework.
|
protected: virtual IMPORT_C void SizeChanged();
Resizes and repositions the parts of the scrollable container.
CCoeControl::SizeChangedprotected: virtual IMPORT_C TInt CountComponentControls() const;
|
CCoeControl::CountComponentControlsprotected: virtual IMPORT_C CCoeControl *ComponentControl(TInt aIndex) const;
Gets the specified component of a compound control Called by the Epoc framework.
|
|
protected: 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 overridden and base called by subclasses.
|
virtual IMPORT_C void BeginUpdateLC();
This method should be called before updates to the layout, and/or addition/removal of controls. The cleanup stack item pushed to the cleanup stack by this method is popped by EndUpdateL() so you should always call them in pairs and not pop the cleanup item yourself.
EndUpdateLCQikContainerBase::BeginUpdateLC()virtual IMPORT_C void EndUpdateL();
This method should be called when updates to the layout is done after BeginUpdateLC() is called. This method makes sure that a relayout is performed, and might also peform transitions effects and similar operations depending on the device.
BeginUpdateLCCQikContainerBase::EndUpdateL()virtual IMPORT_C CCoeControlArray &Controls();
Returns a list of the controls in the container.
|
virtual IMPORT_C const CCoeControlArray &Controls() const;
Returns a list of the controls in the container.
|
virtual IMPORT_C TTypeUid::Ptr MopSupplyObject(TTypeUid aId);
Supports CQikContainerBase , MQikContainer , and MQikRelayoutSensitiveControl .
|
|
CCoeControl::MopSupplyObjectvirtual IMPORT_C TBool RequestRelayout(const CCoeControl *aChildControl);
Handles the request if CQikContainerBase::HandleRelayoutRequests() .
|
|
CCoeControl::RequestRelayoutCQikContainerBase::HandleRelayoutRequestsvirtual 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.
|
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.
virtual IMPORT_C TBool HasBorder() const;
Tests if the control has a border.
|
virtual IMPORT_C void SetAdjacent(TInt aAdjacent);
Sets the control's appearance when it is next to other controls.
|
virtual IMPORT_C void SetDimmed(TBool aDimmed);
Sets the control to be dimmed.
|
virtual IMPORT_C void SetContainerWindowL(const CCoeControl &aContainer);
Sets the control's containing window by copying it from aContainer.
|
virtual IMPORT_C void SetNeighbor(CCoeControl *aNeighbor);
Sets an associated control.
|
virtual IMPORT_C void GetHelpContext(TCoeHelpContext &aContext) const;
Gets the control's help context.
|
virtual IMPORT_C TInt SetParent(CCoeControl *aParent);
Sets aParent as the parent of this control.
|
|
virtual IMPORT_C TInt TextBaselineOffset(const TSize &aSize) const;
Gets the offset to the first text baseline relative to the top of the control.
|
|
virtual IMPORT_C void SetTextBaselineSpacing(TInt aSpacing);
Sets the spacing between text baselines.
|
virtual IMPORT_C TCoeInputCapabilities InputCapabilities() const;
Returns the controls input capabilities.
|
virtual IMPORT_C void AddControlLC(CCoeControl *aControl, TInt aComponentId=KErrNotFound);
|
MQikContainer::AddControlLCvirtual IMPORT_C TInt RemoveControl(CCoeControl &aControl);
|
|
MQikContainer::RemoveControlvirtual IMPORT_C TBool PersistsAfterRelayout() const;
|
MQikRelayoutSensitiveControl::PersistsAfterRelayoutvirtual IMPORT_C void ReleaseControls(RQikReleasedControlsArray &aReleasedControls);
|
MQikRelayoutSensitiveControl::ReleaseControlsvirtual IMPORT_C void SetBorder(TGulBorder::TBorderType aBorderType);
Sets the border type from enum.
|
virtual IMPORT_C void SetBorder(TInt aBorderType);
Sets the border type from value.
|
virtual IMPORT_C TGulBorder Border() const;
Gets the border type.
|
protected: virtual IMPORT_C void HandlePointerEventL(const TPointerEvent &aPointerEvent);
Forwards the HandlePointerEventL to appropriate component control. Also handles drag above/below window.
|
ClosestFocusingControlCCoeControl::HandlePointerEventL()protected: virtual IMPORT_C void HandleControlArrayEventL(CCoeControlArray::TEvent aEvent, const CCoeControlArray *aArray, CCoeControl *aControl, TInt aControlId);
Handles events generated by the CCoeControlArray. From CCoeControl .
|
protected: virtual IMPORT_C void Draw(const TRect &aRect) const;
|
CCoeControl::Draw()protected: virtual IMPORT_C void CalculateRowInfo(const TSize &aVisibleSize);
Calculates the row information given the visible size of the container, and notifies the layout manager and component controls (which are MQikRowAwareControl) of the change.
|
protected: virtual IMPORT_C void PerformLayout();
Handle a relayout request. Is called asynchronously when RequestRelayout() has been called and HandleRelayoutRequests() is ETrue.
RequestRelayoutHandleRelayoutRequestsprotected: virtual IMPORT_C void HandlePointerBufferReadyL();
Handles pointer buffer ready events.
protected: virtual IMPORT_C void FocusChanged(TDrawNow aDrawNow);
Responds to a change in focus.
|