uidesigner/com.nokia.sdt.series60.componentlibrary/components/controls/CCoeControlBase.js
author timkelly
Wed, 24 Jun 2009 14:21:31 -0500
changeset 297 192fda8b2d77
parent 0 fb279309251b
permissions -rw-r--r--
update test for plat macros to use newer SDK (S60 5th ed.)

/*
* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of the License "Eclipse Public License v1.0"
* which accompanies this distribution, and is available
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
*
* Initial Contributors:
* Nokia Corporation - initial contribution.
*
* Contributors:
*
* Description: 
*
*/


include("../settingsListLibrary.js")

function CCoeControlBaseEventInfo() {
}

/** Only return a subset of events when a control is in a setting item list */
CCoeControlBaseEventInfo.prototype.getEventGroups = function(instance) {
	if (isSettingItemList(instance.parent))
		return ["SettingsList"];
	else if (instance.parent.attributes["is-transient-object"] == "true")
		return []; // no events
	else
		return ["CCoeControl"];
}

/** Only return a subset of events when a control is in a setting item list */
CCoeControlBaseEventInfo.prototype.getDefaultEventName = function(instance) {
	if (isSettingItemList(instance.parent))
		return "editingStopped";
	else
		return null;	// select component default
}