epoc32/include/coecontrolarray.h
author William Roberts <williamr@symbian.org>
Tue, 16 Mar 2010 16:12:26 +0000
branchSymbian2
changeset 2 2fe1408b6811
parent 0 061f57f2323e
permissions -rw-r--r--
Final list of Symbian^2 public API header files
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
     1
// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
     2
// All rights reserved.
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
     3
// This component and the accompanying materials are made available
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
     4
// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
     5
// which accompanies this distribution, and is available
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
     6
// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
     7
//
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
     8
// Initial Contributors:
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
     9
// Nokia Corporation - initial contribution.
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    10
//
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    11
// Contributors:
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    12
//
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    13
// Description:
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    14
//
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    15
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    16
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    17
#ifndef __COECONTROLARRAY_H__
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    18
#define __COECONTROLARRAY_H__
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    19
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    20
#include <e32base.h>	// class CBase
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    21
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    22
class CCoeControl;
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    23
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    24
/** Default id for controls that have no associated id. This is equal
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    25
to KErrNotFound
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    26
@publishedAll 
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    27
@released 
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    28
*/
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    29
const TInt KCoeNoControlId = KErrNotFound;
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    30
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    31
/** Class that encapsulates a control and the identifier for that control.
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    32
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    33
Controls in a CCoeControlArray can be associated with an id. This class encapsulates the control and its id.
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    34
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    35
@publishedAll 
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    36
@released */
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    37
class TCoeControlWithId
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    38
	{
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    39
public:
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    40
	TCoeControlWithId(TInt aControlId, CCoeControl* aControl = NULL);
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    41
public:
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    42
	/** The control */
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    43
	CCoeControl* iControl;
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    44
	/** The id of the control */
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    45
	TInt iId;
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    46
	};
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    47
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    48
/** Class that represents an array of controls.
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    49
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    50
The CCoeControlArray class is used to store the child controls of a container control.
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    51
The method CCoeControl::InitComponentArrayL() must be used to create the array and the method
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    52
CCoeControlArray& CCoeControl::Components() can be used to get this array.
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    53
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    54
@publishedAll 
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    55
@released */
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    56
class CCoeControlArray : public CBase
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    57
	{
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    58
public:
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    59
	/** This class is an iterator for the CCoeControlArray class.
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    60
	@publishedAll 
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    61
	@released 
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    62
	*/
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    63
	class TCursor	// robust iterator
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    64
		{
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    65
	public:	
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    66
		template<typename T> T* Control();
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    67
		template<typename T> const T* Control() const;
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    68
		IMPORT_C TBool Prev();
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    69
		IMPORT_C TBool Next();
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    70
		IMPORT_C TBool IsValid() const;
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    71
		
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    72
		IMPORT_C TBool operator==(const TCursor& aCursor) const;
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    73
		IMPORT_C TBool operator!=(const TCursor& aCursor) const;
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    74
	public:
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    75
		TCursor(const CCoeControlArray& aArray, TInt aIndex);
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    76
		TInt Index() const;
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    77
	private:
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    78
		IMPORT_C CCoeControl* Ctrl() const;	
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    79
		void UpdateMemento() const;
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    80
		void UpdateIndex() const;
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    81
	private:
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    82
		const CCoeControlArray* iArray;
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    83
		mutable TInt iIndex;
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    84
		mutable TCoeControlWithId iMemento;
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    85
		};
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    86
public:
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    87
	IMPORT_C static CCoeControlArray* NewL(CCoeControl& aOwner);
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    88
	IMPORT_C ~CCoeControlArray();
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    89
	IMPORT_C TInt Count() const;
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    90
	IMPORT_C void Reset();
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    91
	IMPORT_C void ResetAndDestroy();
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    92
	IMPORT_C void SortById();
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    93
	
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    94
	IMPORT_C TBool ControlsOwnedExternally() const;
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    95
	IMPORT_C void SetControlsOwnedExternally(TBool aOwnedExternally);
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    96
			
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    97
	IMPORT_C TBool IsArrayLocked() const;
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    98
	IMPORT_C void SetArrayLocked();
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
    99
	
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   100
	template<typename T> T* ControlById(TInt aControlId);
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   101
	template<typename T> const T* ControlById(TInt aControlId) const;
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   102
		
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   103
	IMPORT_C TCursor Begin() const;
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   104
	IMPORT_C TCursor End() const;
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   105
	IMPORT_C TCursor Find(const CCoeControl* aControl) const;
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   106
	IMPORT_C TCursor Find(TInt aControlId) const;
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   107
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   108
	IMPORT_C TCursor AppendLC(CCoeControl* aControl, TInt aControlId = KCoeNoControlId);
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   109
	IMPORT_C TCursor InsertAfterLC(TInt aInsertAfterId, CCoeControl* aControl, TInt aControlId = KCoeNoControlId);
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   110
	IMPORT_C TCursor InsertLC(TCursor& aInsertAt, CCoeControl* aControl, TInt aControlId = KCoeNoControlId);
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   111
	
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   112
	IMPORT_C TInt Remove(const CCoeControl* aControl);
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   113
	IMPORT_C CCoeControl* Remove(TCursor aRemoveAt);
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   114
	IMPORT_C CCoeControl* RemoveById(TInt aControlId);
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   115
public:	
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   116
	IMPORT_C TInt Replace(CCoeControl* aOriginalControl, CCoeControl* aNewControl);
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   117
	
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   118
public:	// internal use only
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   119
	IMPORT_C TCoeControlWithId At(TInt aIndex);
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   120
	IMPORT_C const TCoeControlWithId At(TInt aIndex) const;
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   121
	IMPORT_C TInt Id(const CCoeControl& aControl) const;
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   122
	IMPORT_C void Sort(TLinearOrder< TCoeControlWithId > aOrder);
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   123
public:
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   124
	/** Defines the possible events related to a change to the contents
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   125
	of the array. */
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   126
	enum TEvent
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   127
		{
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   128
		/** A control has been added to the array */
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   129
		EControlAdded,	
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   130
		/** A control has been removed from the array */
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   131
		EControlRemoved
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   132
		};
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   133
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   134
private:
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   135
	IMPORT_C CCoeControlArray(CCoeControl& aOwner);
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   136
	TInt IndexById(TInt aControlId) const;
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   137
	IMPORT_C CCoeControl* CtrlById(TInt aControlId) const;
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   138
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   139
private:
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   140
	CCoeControl& iOwner;
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   141
	TInt iFlags;
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   142
	RArray<TCoeControlWithId> iControls;
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   143
	};
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   144
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   145
/**	Gets the control.
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   146
@return The control at the current cursor position. 
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   147
*/
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   148
template<typename T>
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   149
T* CCoeControlArray::TCursor::Control()
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   150
	{
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   151
	return static_cast<T*>(Ctrl());
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   152
	}
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   153
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   154
/**	Gets the control.
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   155
@return The control at the current cursor position. 
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   156
*/
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   157
template<typename T>
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   158
const T* CCoeControlArray::TCursor::Control() const
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   159
	{
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   160
	return static_cast<T*>(Ctrl());
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   161
	}
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   162
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   163
/** Gets the control with the given id.
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   164
@param aControlId The id of the desired control.
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   165
@return The control with the given id.
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   166
*/
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   167
template<typename T>
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   168
T* CCoeControlArray::ControlById(TInt aControlId)
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   169
	{
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   170
	return static_cast<T*>(CtrlById(aControlId));
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   171
	}
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   172
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   173
/** Gets the control with the given id.
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   174
@param aControlId The id of the desired control.
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   175
@return The control with the given id.
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   176
*/
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   177
template<typename T>
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   178
const T* CCoeControlArray::ControlById(TInt aControlId) const
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   179
	{
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   180
	return static_cast<T*>(CtrlById(aControlId));
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   181
	}
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   182
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 0
diff changeset
   183
#endif //__COECONTROLARRAY_H__