/* $Header$ */

// jsgeneric3.h
// Generic 3 example declarations

/*************** changes *******************
Date			Edit				Bug					Description
09-Jan-14	cr_jsc									JavaScript client generic component example.
*/

#ifndef _JSGENERIC_H_
#define _JSGENERIC_H_

#include "jssuper.h"

#define LIB_RES_NAME			1000			// Resource id of library name
#define OBJECT_ID1				2000			// Resource id of control within library
#define COMP_STORE_GROUP	3000			// Resource id of component store group
#define OBJECT_ICON 			1					// Resource bitmap id

//Custom Properties:
const attnumber cToggleColor = 4000;

//Custom Event Parameters:
const qshort cEvParamXPos = 6000;
const qshort cEvParamYPos = 6001;

class jsGenericComponent : public javaScriptComponent
{
public:
	str255	mText;
	qshort mToggleColor;

public:
	jsGenericComponent(HWND pFieldHWnd, WCCcontrol *pControl);
	~jsGenericComponent();
	virtual qlong attributeSupport(LPARAM pMessage, WPARAM wParam, LPARAM lParam, EXTCompInfo* eci);
	virtual void paintDesign(HDC pHdc);
	
	qbool getText(EXTfldval& fval);
	qbool setText(EXTfldval& fval);
	qbool getToggleColor(EXTfldval& fval);
	qbool setToggleColor(EXTfldval& fval);
	
	static qbool jsGetInnerHTML(HWND pHwnd, WCCcontrol *pControl, webClientComponent *pObject, EXTfldval &pInner, qdim pWidth, qdim pHeight);
};

struct JSChtmlOptionsGeneric : public JSChtmlOptions
{
public:
	JSChtmlOptionsGeneric() : JSChtmlOptions() { mControlHasDataName = qtrue; }
};

#endif		// #ifndef _JSGENERIC_H_
// End of file
