mirror of
https://github.com/servo/servo.git
synced 2025-06-14 11:24:33 +00:00
108 lines
3.2 KiB
C++
108 lines
3.2 KiB
C++
// -- WARNING -- WARNING -- WARNING -- WARNING -- WARNING -- WARNING --
|
|
//
|
|
// THE CONTENTS OF THIS FILE IS GENERATED BY CODE AND
|
|
// ANY MODIFICATIONS WILL BE OVERWRITTEN
|
|
//
|
|
// -- WARNING -- WARNING -- WARNING -- WARNING -- WARNING -- WARNING --
|
|
|
|
// %BANNER_BEGIN%
|
|
// ---------------------------------------------------------------------
|
|
// %COPYRIGHT_BEGIN%
|
|
//
|
|
// Copyright (c) 2018 Magic Leap, Inc. All Rights Reserved.
|
|
// Use of this file is governed by the Creator Agreement, located
|
|
// here: https://id.magicleap.com/creator-terms
|
|
//
|
|
// %COPYRIGHT_END%
|
|
// ---------------------------------------------------------------------
|
|
// %BANNER_END%
|
|
|
|
// %SRC_VERSION%: 1
|
|
|
|
#include <SceneDescriptor.h>
|
|
#include <SpawnedSceneBase.h>
|
|
#include <Servo2D/Servo2D.h>
|
|
|
|
namespace scenes {
|
|
|
|
namespace Servo2D {
|
|
|
|
SpawnedScene::SpawnedScene(const SceneDescriptor& sceneDescriptor, lumin::Node* root)
|
|
: SpawnedSceneBase(sceneDescriptor, root) {
|
|
contentPanel = lumin::ui::UiPanel::CastFrom(root->findChild(externalNodes::contentPanel));
|
|
content = lumin::QuadNode::CastFrom(root->findChild(externalNodes::content));
|
|
backButton = lumin::ui::UiButton::CastFrom(root->findChild(externalNodes::backButton));
|
|
fwdButton = lumin::ui::UiButton::CastFrom(root->findChild(externalNodes::fwdButton));
|
|
urlBar = lumin::ui::UiTextEdit::CastFrom(root->findChild(externalNodes::urlBar));
|
|
}
|
|
|
|
SpawnedScene::~SpawnedScene() {
|
|
}
|
|
|
|
SpawnedSceneBase* createSpawnedScene(const SceneDescriptor& sceneDescriptor, lumin::Node* root) {
|
|
using namespace externalNodes;
|
|
SpawnedScene* spawnedScene = new SpawnedScene(sceneDescriptor, root);
|
|
return spawnedScene;
|
|
}
|
|
|
|
class Handlers : public SpawnedSceneHandlers
|
|
{
|
|
public:
|
|
Handlers(SpawnedScene& ss);
|
|
|
|
private:
|
|
|
|
struct contentPanelHandlers {
|
|
contentPanelHandlers(SpawnedScene& ss);
|
|
};
|
|
contentPanelHandlers contentPanelHandlers_;
|
|
struct contentHandlers {
|
|
contentHandlers(SpawnedScene& ss);
|
|
};
|
|
contentHandlers contentHandlers_;
|
|
struct backButtonHandlers {
|
|
backButtonHandlers(SpawnedScene& ss);
|
|
};
|
|
backButtonHandlers backButtonHandlers_;
|
|
struct fwdButtonHandlers {
|
|
fwdButtonHandlers(SpawnedScene& ss);
|
|
};
|
|
fwdButtonHandlers fwdButtonHandlers_;
|
|
struct urlBarHandlers {
|
|
urlBarHandlers(SpawnedScene& ss);
|
|
};
|
|
urlBarHandlers urlBarHandlers_;
|
|
};
|
|
|
|
Handlers::contentPanelHandlers::contentPanelHandlers(SpawnedScene& ss)
|
|
{
|
|
}
|
|
Handlers::contentHandlers::contentHandlers(SpawnedScene& ss)
|
|
{
|
|
}
|
|
Handlers::backButtonHandlers::backButtonHandlers(SpawnedScene& ss)
|
|
{
|
|
}
|
|
Handlers::fwdButtonHandlers::fwdButtonHandlers(SpawnedScene& ss)
|
|
{
|
|
}
|
|
Handlers::urlBarHandlers::urlBarHandlers(SpawnedScene& ss)
|
|
{
|
|
}
|
|
|
|
Handlers::Handlers(SpawnedScene& ss)
|
|
: SpawnedSceneHandlers(ss),
|
|
contentPanelHandlers_(ss),
|
|
contentHandlers_(ss),
|
|
backButtonHandlers_(ss),
|
|
fwdButtonHandlers_(ss),
|
|
urlBarHandlers_(ss)
|
|
{
|
|
}
|
|
|
|
SpawnedSceneHandlers* createSpawnedSceneHandlers(SpawnedSceneBase& ssb) {
|
|
return new Handlers(static_cast<SpawnedScene&>(ssb));
|
|
}
|
|
}
|
|
}
|
|
|