diff options
Diffstat (limited to 'source/Asura.Editor/core')
-rw-r--r-- | source/Asura.Editor/core/gui_state.h | 17 | ||||
-rw-r--r-- | source/Asura.Editor/core/shaders.h | 11 | ||||
-rw-r--r-- | source/Asura.Editor/core/signal.h | 52 | ||||
-rw-r--r-- | source/Asura.Editor/core/slot.h | 43 |
4 files changed, 17 insertions, 106 deletions
diff --git a/source/Asura.Editor/core/gui_state.h b/source/Asura.Editor/core/gui_state.h new file mode 100644 index 0000000..9e7e91c --- /dev/null +++ b/source/Asura.Editor/core/gui_state.h @@ -0,0 +1,17 @@ +#ifndef _ASURA_EDITOR_GUI_STATE_H_ +#define _ASURA_EDITOR_GUI_STATE_H_ + +#include <asura-utils/classes.h> + +namespace_begin(AsuraEditor) + +/// GUI widgets uniqueID + + + + +namespace_end + + +#endif + diff --git a/source/Asura.Editor/core/shaders.h b/source/Asura.Editor/core/shaders.h deleted file mode 100644 index e567f95..0000000 --- a/source/Asura.Editor/core/shaders.h +++ /dev/null @@ -1,11 +0,0 @@ -#ifndef __ASURA_EDITOR_SHADERS_H__ -#define __ASURA_EDITOR_SHADERS_H__ - -namespace AsuraEditor -{ - - - -} - -#endif
\ No newline at end of file diff --git a/source/Asura.Editor/core/signal.h b/source/Asura.Editor/core/signal.h deleted file mode 100644 index f73f4b1..0000000 --- a/source/Asura.Editor/core/signal.h +++ /dev/null @@ -1,52 +0,0 @@ -#ifndef __ASRUA_EDTIRO_SIGNAL_H__ -#define __ASRUA_EDTIRO_SIGNAL_H__ - -#include <vector> - -#include <asura-utils/scripting/portable.hpp> - -#include "../widgets/widget.h" -#include "slot.h" - -namespace AsuraEditor -{ - - /// - /// ؼ¼ - /// - class Signal - { - public: - Signal(); - - /// - /// Fire¼connectļߣãconnectĺ - /// - void operator()(void* userdata) - { - for (auto callback : mCallbacks) - callback(); - } - - /// - /// עص - /// - void Connect(const Slot& callback) - { - mCallbacks.push_back(callback); - } - - /// - /// - /// - void Disconnect(); - - private: - - std::vector<Slot> mCallbacks; // - - }; - -} - -#endif
\ No newline at end of file diff --git a/source/Asura.Editor/core/slot.h b/source/Asura.Editor/core/slot.h deleted file mode 100644 index f569cfe..0000000 --- a/source/Asura.Editor/core/slot.h +++ /dev/null @@ -1,43 +0,0 @@ -#ifndef __ASURA_EDITOR_SLOT_H__ -#define __ASURA_EDITOR_SLOT_H__ - -#include <asura-utils/scripting/portable.hpp> -#include <asura-core/input/event.h> - -#include "../controls/widget.h" - -namespace AsuraEditor -{ - - /// - /// Ӧsignalıհ - /// - class Slot - { - public: - Slot(Luax::LuaxState& state, Widget& widget, int refID) - : mState(state) - , mRefID(refID) - , mWidget(widget) - { - } - - void operator()() - { - mWidget.PushLuaxMemberRef(mState, mRefID); - if (lua_isfunction(mState, -1)) // callback - { - mState.Call(0, 0); - } - } - - private: - Luax::LuaxState& mState; - Widget& mWidget; - int mRefID; - - }; - -} - -#endif
\ No newline at end of file |