2020-09-08 19:15:28 +08:00
|
|
|
#ifndef __HTMLOBJECT_H__
|
|
|
|
#define __HTMLOBJECT_H__
|
|
|
|
|
|
|
|
#include "cocos2d.h"
|
|
|
|
#include "FairyGUIMacros.h"
|
|
|
|
#include "GObjectPool.h"
|
|
|
|
|
|
|
|
NS_FGUI_BEGIN
|
|
|
|
|
|
|
|
class FUIRichText;
|
|
|
|
class HtmlElement;
|
|
|
|
class GObject;
|
|
|
|
|
|
|
|
class HtmlObject
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
static std::string buttonResource;
|
|
|
|
static std::string inputResource;
|
|
|
|
static std::string selectResource;
|
|
|
|
static bool usePool;
|
|
|
|
|
|
|
|
static GObjectPool objectPool;
|
2022-07-11 17:50:21 +08:00
|
|
|
static axis::Vector<GObject*> loaderPool;
|
2020-09-08 19:15:28 +08:00
|
|
|
|
|
|
|
HtmlObject();
|
|
|
|
virtual ~HtmlObject();
|
|
|
|
|
|
|
|
HtmlElement* getElement() const { return _element; }
|
|
|
|
GObject* getUI() const { return _ui; }
|
|
|
|
bool isHidden() const { return _hidden; }
|
|
|
|
|
|
|
|
virtual void create(FUIRichText* owner, HtmlElement* element);
|
|
|
|
virtual void destroy();
|
|
|
|
|
|
|
|
protected:
|
|
|
|
void createCommon();
|
|
|
|
void createImage();
|
|
|
|
void createButton();
|
|
|
|
void createInput();
|
|
|
|
void createSelect();
|
|
|
|
|
|
|
|
HtmlElement* _element;
|
|
|
|
FUIRichText* _owner;
|
|
|
|
GObject* _ui;
|
|
|
|
bool _hidden;
|
|
|
|
};
|
|
|
|
|
|
|
|
NS_FGUI_END
|
|
|
|
|
|
|
|
#endif
|