epoc32/include/mw/akncheckboxsettingpage.h
author William Roberts <williamr@symbian.org>
Wed, 31 Mar 2010 12:27:01 +0100
branchSymbian2
changeset 3 e1b950c65cb4
parent 2 2fe1408b6811
child 4 837f303aceeb
permissions -rw-r--r--
Attempt to represent the S^2->S^3 header reorganisation as a series of "hg rename" operations
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: 1
diff changeset
     1
/*
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
     2
* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
     3
* All rights reserved.
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
     4
* 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: 1
diff changeset
     5
* 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: 1
diff changeset
     6
* which accompanies this distribution, and is available
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
     7
* 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: 1
diff changeset
     8
*
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
     9
* Initial Contributors:
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    10
* Nokia Corporation - initial contribution.
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    11
*
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    12
* Contributors:
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    13
*
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    14
* Description: 
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    15
*  Check box list support for setting page in editable state
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    16
*
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    17
*
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    18
*/
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    19
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    20
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    21
#ifndef __AKNCHECKBOXSETTINGPAGE_H__
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    22
#define __AKNCHECKBOXSETTINGPAGE_H__ 
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    23
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    24
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    25
#include <aknlistboxsettingpage.h>
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    26
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    27
// forward declare
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    28
class CAknCheckBoxSettingPageExtension;
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    29
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    30
/**
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    31
* Class to encapsulate text and Boolean status; An array of these provides the interface to the CheckBoxSettingPage
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    32
* The boolean status can be changed after construction, but the text cannot be changed.
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    33
*
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    34
*
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    35
*/
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    36
class CSelectableItem : public CBase
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    37
{
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    38
public :
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    39
	/**
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    40
	* C++ constructor
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    41
	* @param	aItemText	text to go into the compound type
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    42
	* @param	aSelected	Pass ETrue to select the item; EFalse to deselect it.
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    43
	*/
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    44
	IMPORT_C CSelectableItem( TDesC& aItemText, TBool aSelected  );
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    45
	/**
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    46
	* C++ Destructor
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    47
	*/
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    48
	virtual ~CSelectableItem();
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    49
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    50
	/** 
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    51
	* 2nd stage construction
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    52
	*
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    53
	*/
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    54
	IMPORT_C void ConstructL();
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    55
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    56
	/**
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    57
	* Set the selection status to ETrue or EFalse
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    58
	* 
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    59
	* @param	aSelected	status that the selection status is to be set to.
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    60
	*/
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    61
	IMPORT_C void SetSelectionStatus( TBool aSelected );
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    62
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    63
	/**
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    64
	* Access the selection status
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    65
	* @return	EFalse if not selected; otherwise not EFalse
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    66
	*/
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    67
	IMPORT_C TBool SelectionStatus();
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    68
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    69
	/**
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    70
	* Access to the item text as TPtr
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    71
	* @return	TPtrC that points to items's text.
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    72
	*/
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    73
	IMPORT_C TPtrC ItemText();
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    74
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    75
private:
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    76
	TDesC& iDesC;	// Holds the reference to the descriptor prior to construction
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    77
	HBufC* iItem;	// This is on the heap and is used post constuction
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    78
	TBool iSelected;
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    79
};
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    80
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    81
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    82
/**
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    83
* Array type for holding selection items
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    84
*
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    85
*/
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    86
class CSelectionItemList : public CArrayPtrFlat<CSelectableItem>, public MDesCArray
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    87
	{
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    88
public:
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    89
	/**
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    90
	* Constructor
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    91
	*/
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    92
	IMPORT_C CSelectionItemList( TInt Granularity );
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    93
// from MDesCArray
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    94
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    95
	/**
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    96
	* From MDesCArray:
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    97
	*
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    98
	* @return number of items in the array
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
    99
	*/
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   100
	IMPORT_C TInt MdcaCount() const;
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   101
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   102
	/**
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   103
	* Access to item text of the elements in the array
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   104
	* @return item text of aIndex'th element
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   105
	*/
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   106
	IMPORT_C TPtrC MdcaPoint(TInt aIndex) const;
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   107
	};
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   108
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   109
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   110
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   111
/**
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   112
* Setting Page class supporting multiple selection. 
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   113
*
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   114
* Interface is via a CSelectionItemList array
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   115
*
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   116
*/
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   117
class CAknCheckBoxSettingPage : public CAknListBoxSettingPage
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   118
{
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   119
public:
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   120
	IMPORT_C CAknCheckBoxSettingPage(TInt aResourceID, CSelectionItemList* aItemArray );
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   121
 /**
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   122
 * Constructor that allows separate setting page and editor resources
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   123
 *
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   124
 * In all cases the number (if supplied i.e. <> 0 ) is used.  
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   125
 *
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   126
 *		Editor Resource		Setting Page Resource
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   127
 *			present				present				Both are used (but text & number overridden)
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   128
 *			 = 0				present				Editor resource is used via SP resource
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   129
 *			present				= 0					Default Avkon SP resource if used (to no effect?)
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   130
 *			 = 0				= 0					Not permitted
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   131
 *
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   132
 * Note: The first argument is a TDesC* (rather than TDesC&) because the other constructor
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   133
 * cannot initialize such a member without allocation or having an internal dummy buffer.
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   134
 *
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   135
 * Rules for text and numbers: The rules are the same for both:  (non-zero length) text or number other 
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   136
 * than EAknSettingPageNoOrdinalDisplayed if given in this constructor will not override resource 
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   137
 * (unless that is zero length or EAknSettingPageNoOrdinalDisplayed).  Note, however, that text or number given via the 
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   138
 * specific API for setting them, WILL override the resource.
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   139
 * It is assumed that number from resource is very rare.  Special text is somewhat more likely.
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   140
 * 
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   141
 * @param aSettingTitleText	Text at top of setting pane
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   142
 *	@param aSettingNumber		Number at top left (if present)
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   143
 * @param aControlType			Determines the type constructed and how its resource is read
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   144
 * @param aEditorResourceId	Editor resource to use in the setting page (if present)
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   145
 * @param aSettingPageResourceId		Setting Page to use (if present)
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   146
 * @param aItemArray			List of option texts and their selection states
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   147
 */
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   148
	IMPORT_C CAknCheckBoxSettingPage(	const TDesC* aSettingTitleText, 
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   149
								TInt aSettingNumber, 
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   150
								TInt aControlType,
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   151
								TInt aEditorResourceId, 
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   152
								TInt aSettingPageResourceId,
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   153
								CSelectionItemList* aItemArray );
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   154
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   155
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   156
	/**
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   157
	* 2nd phase constructor
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   158
	*
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   159
	*/
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   160
	IMPORT_C virtual void ConstructL();
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   161
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   162
	/** 
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   163
	*
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   164
	* Access to ListBoxControl
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   165
	*
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   166
	* @return pointer to listbox used by the setting page; No transfer of ownership
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   167
	*/
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   168
	IMPORT_C CAknSetStyleListBox* ListBoxControl() const;
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   169
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   170
	/**
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   171
	* Method to update the item array after a change in content 
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   172
	*
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   173
	* @param CSelectionItemList* aItemArray	The new array of selectable items
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   174
	*/
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   175
	IMPORT_C void SetSelectionItemArrayL( CSelectionItemList* aItemArray );
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   176
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   177
// From MEikListBoxObserver
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   178
	/**
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   179
	* Observer callback from the listbox 
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   180
	*
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   181
	* @param	aListBox	ptr to listbox that is calling the method
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   182
	* @param	aEventType	type of event; defined by MEikListBoxObserver
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   183
	*/
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   184
	IMPORT_C virtual void HandleListBoxEventL(CEikListBox* aListBox,
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   185
				 MEikListBoxObserver::TListBoxEvent aEventType);
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   186
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   187
    /**
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   188
    *  From CCoeControl
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   189
    *  Handles pointer events
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   190
    */	  
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   191
    IMPORT_C void HandlePointerEventL(const TPointerEvent& aPointerEvent);
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   192
    
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   193
    IMPORT_C void HandleResourceChange(TInt aType);
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   194
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   195
protected:
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   196
	/**
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   197
	* Destructor
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   198
	*/ 
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   199
	IMPORT_C virtual ~CAknCheckBoxSettingPage();
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   200
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   201
	/**
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   202
	* Called when the setting is updated
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   203
	*
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   204
	*/
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   205
	IMPORT_C virtual void UpdateSettingL();
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   206
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   207
	/**
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   208
	* Called when the setting page is about to be displayed
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   209
	*
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   210
	*/
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   211
	IMPORT_C void DynamicInitL();
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   212
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   213
	// From MEikCommandObserver
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   214
	IMPORT_C virtual void ProcessCommandL(TInt aCommandId);
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   215
	/*
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   216
	* This method is called upon Select command id.  It should change the setting but not exit in
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   217
	* this case.
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   218
	*/
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   219
	IMPORT_C virtual void SelectCurrentItemL();
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   220
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   221
//
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   222
// CoeControl Framework and reserved methods
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   223
//
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   224
protected:
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   225
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   226
/**
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   227
 * Writes the internal state of the control and its components to aStream.
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   228
 * Does nothing in release mode.
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   229
 * Designed to be overidden and base called by subclasses.
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   230
 *
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   231
 * @param	aWriteSteam		A connected write stream
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   232
 */	
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   233
	IMPORT_C virtual void WriteInternalStateL(RWriteStream& aWriteStream) const;
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   234
private:
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   235
    /**
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   236
    * From CAknControl
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   237
    */
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   238
    IMPORT_C void* ExtensionInterface( TUid aInterface );
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   239
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   240
private:
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   241
/**
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   242
 *	Reserved method derived from CCoeControl
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   243
 */
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   244
	IMPORT_C virtual void Reserved_2();
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   245
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   246
/**
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   247
 * New reserved methods for CAknSettingPage hierarchy
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   248
 */ 
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   249
private: 
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   250
	IMPORT_C virtual void CAknSettingPage_Reserved_1();
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   251
	IMPORT_C virtual void CAknSettingPage_Reserved_2();
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   252
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   253
private:
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   254
/**
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   255
 * New reserved method from CAknListBoxSettingPage 
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   256
 *
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   257
 */
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   258
	IMPORT_C virtual void CAknListBoxSettingPage_Reserved_1();
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   259
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   260
private:
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   261
	void UpdateAllSelections();
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   262
	void SetAllSelectionsL();
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   263
	void ToggleSelectionL();
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   264
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   265
	/**
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   266
	* Internal method to re-generate the internal, "decorated" text array used in the
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   267
	* real listbox. 
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   268
	*/
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   269
	void GenerateInternalArrayAndGiveToListBoxL();
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   270
	
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   271
	void CreateCheckBoxBitmapsL();
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   272
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   273
	CDesCArrayFlat* iInternalItemArray;	
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   274
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   275
	// the following are not owned
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   276
	CSelectionItemList* iItemArray; 
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   277
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   278
    CAknCheckBoxSettingPageExtension* iExtension; // owned
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   279
};
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   280
2fe1408b6811 Final list of Symbian^2 public API header files
William Roberts <williamr@symbian.org>
parents: 1
diff changeset
   281
#endif