⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 kr_grouppopulator.h

📁 这是法国Kaleido公司提供了一个手机mmi设计平台
💻 H
字号:
/***************************************************************************
KR_GroupPopulator.h  -  
-------------------
begin                : Tue Mar 3 2004
copyright            : (C) 2004 by DigitalAirways
email                : info@digitalairways.com
***************************************************************************/

/*
* Copyright (c) 2000-2004 DigitalAirways, sarl. All Rights Reserved.
*
* This software is the confidential and proprietary information of
* DigitalAirways, sarl. ("Confidential Information").  You shall not
* disclose such Confidential Information and shall use it only in
* accordance with the terms of the license agreement you entered into
* with DigitalAirways.
* A copy of this license is included in the licence.txt file included
* in this software package.
*/

/*
**************************************************************
* TODO
**************************************************************

- 



**************************************************************
* HISTORY
**************************************************************

- 
*/

#ifndef __KR_GROUPPOPULATOR__
#define __KR_GROUPPOPULATOR__

#include "KR_KRuntime.h"
#include "KR_Option.h"
#include "KR_Resources.h"
#include "EB_PFWImage.h"

const boolean kRefreshOn = false;
const boolean kRefreshOff = true;
const boolean kDeleteOn = false;
const boolean kDeleteOff = false;


class KREBDLIBS_API GroupPopulator : public Plugin {

	friend class Group;

private:

	void init(char* param, Group* g){
		setGroup(g);
		init(param);
	}

protected:

	Group* fGroup;
	int fNbObjects;
	boolean fGivesUpCaptionOwnership;
	// DEPRECATED BEGIN
	boolean fStatic;
	// DEPRECATED END		
	SmallArrayList* localData ;

public:	

	static GroupPopulator* makeInstance(GContext* newGContext, char* populatorclass, char* param, Group* g) ;
	DEFINE_NEW(GroupPopulator);
	DEFINE_DELETE(GroupPopulator);

	GroupPopulator (GContext* newGContext) : Plugin(newGContext) {
#ifdef USE_DEPRECATED
		fType = 0 ;
#endif
		fGroup=NULL;
		resetPopulatorNbObjects();
		fGivesUpCaptionOwnership = false;
		fStatic = false;
		localData =NULL ;
	}

	virtual ~GroupPopulator() {
		SAFE_DELETE(localData);
	}

#ifdef DEV_CONSISTENCY
	virtual char *getInfo(int itemType, int itemIdx)
	{
		return defaultGetInfo(itemType, itemIdx);
	}
#endif // def DEV_CONSISTENCY

	Group* getGroup() {
		return fGroup;
	}

#ifdef USE_DEPRECATED
	int getType() { return fType; }
#endif

	void setGroup(Group* group) {
		fGroup = group;
	}

#ifdef USE_DEPRECATED
	void setProvidesStaticStrings(boolean v) {
		setKeepStringsOwnership(v);
	}

	boolean providesStaticString() {
		return isKeepStringsOwnership();
	}

	void setKeepStringsOwnership(boolean v) {
		setGivesUpCaptionOwnership(!v);
	}

	boolean isKeepStringsOwnership() {
		return !isGivesUpCaptionOwnership();
	}

#endif

	void setGivesUpCaptionOwnership(boolean v) {
		fGivesUpCaptionOwnership = v;
	}

	boolean isGivesUpCaptionOwnership() {
		return fGivesUpCaptionOwnership;
	}

	// DEPRECATED BEGIN
	virtual int isStatic() { // virtual for historical compatibility
		return fStatic;
	}

	void setStatic(boolean b) {
		fStatic = b;
	}
	// DEPRECATED END

	virtual	void init(char* /*param*/)  {
		// nothing
	}

	virtual	void postRestore(long /*version*/) {}

	void resetPopulatorNbObjects() {
		fNbObjects=-1;
	}

	long getCachedNbOption();

	virtual int getNbOption() {
		return 0;
	}

#ifdef USE_DEPRECATED
	virtual	Option* getOption(long index)  { //deprecated
		return getOption(index, NULL);// to conform old populators behavior	
	}
#endif

	virtual	Option* getOption(long index, Option* o);

	// gives up ownership of returned ptr
	virtual	void* getCaption(long index, boolean on = false);

	virtual	void aboutToNavigate()  {
		// nothing
	}

	virtual	void doAccept(Option* /* o */)  {
		// nothing
	}

};

typedef GroupPopulator* pGroupPopulator ;
typedef pGroupPopulator (*groupPopulatorInstanciator)(GContext* newGContext) ;

#endif // ndef __KR_GROUPPOPULATOR__

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -