Divide Framework 0.1
A free and open-source 3D Framework under heavy development
Loading...
Searching...
No Matches
PropertyWindow.h
Go to the documentation of this file.
1/*
2Copyright (c) 2018 DIVIDE-Studio
3Copyright (c) 2009 Ionut Cava
4
5This file is part of DIVIDE Framework.
6
7Permission is hereby granted, free of charge, to any person obtaining a copy
8of this software
9and associated documentation files (the "Software"), to deal in the Software
10without restriction,
11including without limitation the rights to use, copy, modify, merge, publish,
12distribute, sublicense,
13and/or sell copies of the Software, and to permit persons to whom the
14Software is furnished to do so,
15subject to the following conditions:
16
17The above copyright notice and this permission notice shall be included in
18all copies or substantial portions of the Software.
19
20THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21IMPLIED,
22INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
23PARTICULAR PURPOSE AND NONINFRINGEMENT.
24IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
25DAMAGES OR OTHER LIABILITY,
26WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
27IN CONNECTION WITH THE SOFTWARE
28OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
29
30*/
31
32#pragma once
33#ifndef DVD_EDITOR_PROPERTY_WINDOW_H_
34#define DVD_EDITOR_PROPERTY_WINDOW_H_
35
39
40namespace Divide {
41
42class Camera;
43class Texture;
44class Material;
45class SceneGraphNode;
46class TransformComponent;
47
48struct Selections;
49struct EditorComponentField;
51 public:
53
54 void drawInternal() override;
55 void backgroundUpdateInternal() override;
56
57 [[nodiscard]] string name() const override;
58
59 PROPERTY_INTERNAL(bool, skipAutoTooltip, false);
60
61 protected:
62 void onRemoveComponent(const EditorComponent& comp) override;
63 [[nodiscard]] bool printComponent(SceneGraphNode* sgnNode, EditorComponent* comp, F32 xOffset, F32 smallButtonWidth);
64
65 [[nodiscard]] bool drawCamera( Camera* cam);
66
67 [[nodiscard]] const Selections& selections() const;
68 [[nodiscard]] SceneGraphNode* node(I64 guid) const;
69
70 //return true if the field has been modified
71 [[nodiscard]] bool processField(EditorComponentField& field);
72 [[nodiscard]] bool processBasicField(EditorComponentField& field);
73 [[nodiscard]] bool processTransform(TransformComponent* transform, bool readOnly, bool hex);
74 [[nodiscard]] bool processMaterial(Material* material, bool readOnly, bool hex);
75
76 private:
81
82 Handle<Texture> _previewTexture = INVALID_HANDLE<Texture>;
83
84};
85
86} //namespace Divide
87
88#endif //DVD_EDITOR_PROPERTY_WINDOW_H_
const Descriptor & descriptor() const noexcept
Definition: DockedWindow.h:69
PlatformContext & context() noexcept
bool processField(EditorComponentField &field)
PROPERTY_INTERNAL(bool, skipAutoTooltip, false)
void drawInternal() override
void backgroundUpdateInternal() override
Handle< Texture > _previewTexture
const Selections & selections() const
bool processBasicField(EditorComponentField &field)
bool printComponent(SceneGraphNode *sgnNode, EditorComponent *comp, F32 xOffset, F32 smallButtonWidth)
bool processMaterial(Material *material, bool readOnly, bool hex)
string name() const override
SceneGraphNode * node(I64 guid) const
bool processTransform(TransformComponent *transform, bool readOnly, bool hex)
bool drawCamera(Camera *cam)
struct Divide::PropertyWindow::LockedComponent _lockedComponent
void onRemoveComponent(const EditorComponent &comp) override
Handle console commands that start with a forward slash.
Definition: AIProcessor.cpp:7
Project & parent
Definition: DefaultScene.h:41
int64_t I64