Symbian Developer Library

SYMBIAN OS V6.1 EDITION FOR C++

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



Location: eikconso.h
Link against: eikcoctl.lib

Class CEikConsoleControl

CEikConsoleControl

Support

Supported from 6.0

Description

Provides functions to enable construction and manipulation of a console.

Derivation

CBaseBase class for all classes to be instantiated on the heap
CCoeControlControl base class from which all other controls are derived
CEikConsoleControlProvides functions to enable construction and manipulation of a console
MEikScrollBarObserverThis mixin is implemented by classes wishing to receive notification about scroll events from a scroll bar

Defined in CEikConsoleControl:
CEikConsoleControl(), CharSize(), ClearChars(), ComponentControl(), ConstructL(), CountComponentControls(), Draw(), DrawChars(), DrawCursor(), FocusChanged(), Font(), GetColorUseListL(), HandleResourceChange(), HandleScrollEventL(), HideCursor(), InvertChars(), ScrollChars(), SetCursorHeight(), SetFontL(), SetRedrawer(), SetScrollBarVisibilityL(), SizeChanged(), UpdateArea(), UpdateScrollbarsL(), VisibleSize(), ~CEikConsoleControl()

Inherited from CBase:
operator new()

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

Inherited from MEikScrollBarObserver:
EEikScrollBottom, EEikScrollDown, EEikScrollEnd, EEikScrollHome, EEikScrollLeft, EEikScrollPageDown, EEikScrollPageLeft, EEikScrollPageRight, EEikScrollPageUp, EEikScrollRight, EEikScrollThumbDragHoriz, EEikScrollThumbDragVert, EEikScrollThumbReleaseHoriz, EEikScrollThumbReleaseVert, EEikScrollTop, EEikScrollUp, TEikScrollEvent


Construction, initialization and destruction


CEikConsoleControl()

CEikConsoleControl();

Description

Constructor. Initializes the console's colour, scrollbars and cursor. Complete construction with ConstructL().


ConstructL()

void ConstructL(TInt aFlags);

Description

Completes construction specifying whether a backed up window is used.

Parameters

TInt aFlags

Determines whether a backed up window is used.


ConstructL()

void ConstructL(TPoint aTopLeft,const TSize &aSize,TInt aFlags,TEikConsWinUnits aUnit);

Description

Completes construction specifying the console's position, size, whether a backed up window is used and whether to use pixels or characters as units.

Parameters

TPoint aTopLeft

The required position of the top left corner of the console control.

const TSize &aSize

The required size of the console control.

TInt aFlags

Determines whether a backed up window is used.

TEikConsWinUnits aUnit

Specifies whether to use pixels or characters as units for the console window.


SetRedrawer()

void SetRedrawer(CEikConsoleScreen *aConsole);

Description

Sets the specified console as the object responsible for redrawing.

Parameters

CEikConsoleScreen *aConsole

The console object to be made responsible for redrawing.


~CEikConsoleControl()

~CEikConsoleControl();

Description

Destructor. Releases the screen font and deletes the scroll bar frame.

[Top]


Font and size functions


SetFontL()

void SetFontL(const TFontSpec &aFontSpec,const CFbsFont* aFont);

Description

Sets the font.

Parameters

const TFontSpec &aFontSpec

The font's specification.

const CFbsFont* aFont

The font to use.


Font()

const TFontSpec& Font() const;

Description

Gets the current font's specification.

Return value

TFontSpec&

The current font's specification.


CharSize()

const TSize& CharSize() const;

Description

Gets the current font's character size in pixels.

Return value

TSize&

The height and width of a single character in pixels.


VisibleSize()

TSize VisibleSize() const;

Description

Gets the height and width of the visible area in characters.

[Top]


Cursors


SetCursorHeight()

void SetCursorHeight(TUint aPercentage);

Description

Sets cursor height to the specified percentage of the current screen font.

Parameters

TUint aPercentage

The percentage of the screen font height to which the cursor height will be set. For example 100% sets the cursor height to be the same as the screen font height.


DrawCursor()

void DrawCursor(TPoint aPosition);

Description

Draws the cursor at the specified character position.

Parameters

TPoint aPosition

The position at which to draw the cursor.


HideCursor()

void HideCursor();

Description

Hides the cursor.

[Top]


Drawing


UpdateArea()

void UpdateArea();

Description

Redraws the console.


DrawChars()

void DrawChars(const TDesC &aString,const TPoint &aPosition,TUint aCharacterAttributes);

Description

Draws the specified string in the given position with the specified attributes.

Parameters

const TDesC &aString

The string to draw.

const TPoint &aPosition

The position at which to draw the string.

TUint aCharacterAttributes

The character attributes for the string.


ClearChars()

void ClearChars(const TRect &anArea,TUint aCharacterAttributes);

Description

Clears the specified area.

Parameters

const TRect &anArea

The area to be cleared.

TUint aCharacterAttributes

The character attributes of the area to be cleared.


InvertChars()

void InvertChars(const TRect &anArea);

Description

Inverts the colour of the characters and background in the specified area.

Parameters

const TRect &anArea

The area to be inverted.


ScrollChars()

void ScrollChars(const TRect &anArea,const TPoint &aVector);

Description

Scrolls characters inside the specified area by the specified character coordinates.

Parameters

const TRect &anArea

The area to be scrolled.

const TPoint &aVector

The character coordinates to which the view is scrolled.

[Top]


Colour use and resource changes


GetColorUseListL()

virtual void GetColorUseListL(CArrayFix<TCoeColorUse>& aColorUseList) const;

Description

Gets the list of logical colours used to draw the control, paired with an explanation of how they are used. Appends the list to aColorUseList.

Parameters

CArrayFix<TCoeColorUse>& aColorUseList

List of logical colours.


HandleResourceChange()

virtual void HandleResourceChange(TInt aType);

Description

Handles a change to the control's resources which are shared across the environment. Colours or fonts for example.

Parameters

TInt aType

The type of resource that has changed.

[Top]


Scrollbars


HandleScrollEventL()

void HandleScrollEventL(CEikScrollBar* aScrollBar,TEikScrollEvent aEventType);

Description

Handles a scroll bar event. This function is called when a user interacts with the scrollbar and calls back the owning CEikConsoleScreen to perform any required redrawing.

Parameters

CEikScrollBar* aScrollBar

The scrollbar on which the event occurred.

TEikScrollEvent aEventType

The type of event.


SetScrollBarVisibilityL()

TInt SetScrollBarVisibilityL(CEikScrollBarFrame::TScrollBarVisibility aHBarVisibility, CEikScrollBarFrame::TScrollBarVisibility aVBarVisibility);

Description

Sets horizontal and vertical scrollbar visibility.

Parameters

CEikScrollBarFrame::TScrollBarVisibility aHBarVisibility

The required horizontal scrollbar visibility.

CEikScrollBarFrame::TScrollBarVisibility aVBarVisibility

The required vertical scrollbar visibility.

Return value

TInt

ETrue if a change in the visible area occurs as a result of setting scrollbar visibility. EFalse otherwise.


UpdateScrollbarsL()

TBool UpdateScrollbarsL(const TSize &aDataSize,const TSize& aVisibleSize,TPoint aPos);

Description

Updates the scrollbars, including thumb positions.

This function is called when the size or position of the scrollbars, data, or visible area changes.

Parameters

const TSize &aDataSize

The size, height and width, of all data.

const TSize& aVisibleSize

The size, height and width, of visible data.

TPoint aPos

The last thumb position.

Return value

TBool

ETrue if either scrollbar disappears as a result of the update. EFalse otherwise.

[Top]


Protected virtual functions


ComponentControl()

virtual CCoeControl* ComponentControl(TInt aIndex) const;

Description

Gets the specified component control.

Parameters

TInt aIndex

The index of the component control to retrieve.

Return value

CCoeControl*

The component control.


CountComponentControls()

virtual TInt CountComponentControls() const;

Description

Gets the number of component controls.

Return value

TInt

The number of component controls.


Draw()

void Draw(const TRect& aRect) const;

Description

Draws the control.

Parameters

const TRect& aRect

Optional. The rectangle in which to draw the control.


FocusChanged()

void FocusChanged(TDrawNow aDrawNow);

Description

Draws or removes the console control's cursor in response to a change in focus.

The control is drawn with a cursor if the control has gained focus, without a cursor if the control has lost focus.

This updates only the cursor.

Parameters

TDrawNow aDrawNow

Specifies whether to redraw the console control immediately.


SizeChanged()

void SizeChanged();

Description

Redraws the scrollbars and visible area as a result of a change in the console's size.