diff options
Diffstat (limited to 'source/Asura.Editor/widgets')
22 files changed, 0 insertions, 217 deletions
diff --git a/source/Asura.Editor/widgets/binding/_button.cpp b/source/Asura.Editor/widgets/binding/_button.cpp deleted file mode 100644 index fbae64f..0000000 --- a/source/Asura.Editor/widgets/binding/_button.cpp +++ /dev/null @@ -1,60 +0,0 @@ -#include "../button.h" - -using namespace Luax; - -namespace AsuraEditor -{ - - LUAX_REGISTRY(Button) - { - - // Button.EStatus.xxx - LUAX_REGISTER_ENUM(state, "EStatus", - { "NORMAL", BUTTON_STATUS_NORMAL }, - { "PUSHED", BUTTON_STATUS_PUSHED }, - { "HOVER", BUTTON_STATUS_HOVER }, - { "DISABLED", BUTTON_STATUS_DISABLED }, - { "FOCUSED", BUTTON_STATUS_FOCUSED } - ); - - // Button.EMsg.xxx - LUAX_REGISTER_ENUM(state, "EMessage", - { "CLICK", BUTTON_MSG_CLICK }, - { "HOVER", BUTTON_MSG_HOVER }, - { "FOCUS", BUTTON_MSG_KILLFOCUS } - ); - - } - - LUAX_POSTPROCESS(Button) - { - - } - - // button:Connect(msg, callback) - LUAX_IMPL_METHOD(Button, _Connect) - { - LUAX_STATE(L); - - Button* self = state.GetUserdata<Button>(1); - int msg = state.CheckValue<int>(2); - if (!lua_isfunction(L, 3)) - return state.ErrorType(3, "callback"); - - LuaxMemberRef ref; - self->SetLuaxMemberRef(state, ref, 3); - if (ref) - { - self->mCallbacksRef.push_back(ref); - Slot slot = Slot(state, (*self), ref.refID); - self->Connect(msg, slot); - } - } - - // button:SetImage(image) - LUAX_IMPL_METHOD(Button, _SetImage) - { - - } - -}
\ No newline at end of file diff --git a/source/Asura.Editor/widgets/button.cpp b/source/Asura.Editor/widgets/button.cpp deleted file mode 100644 index 97de284..0000000 --- a/source/Asura.Editor/widgets/button.cpp +++ /dev/null @@ -1,10 +0,0 @@ -#include "button.h" - -namespace AsuraEditor -{ - - Button::Button() - { - } - -}
\ No newline at end of file diff --git a/source/Asura.Editor/widgets/button.h b/source/Asura.Editor/widgets/button.h deleted file mode 100644 index 14cd041..0000000 --- a/source/Asura.Editor/widgets/button.h +++ /dev/null @@ -1,79 +0,0 @@ -#ifndef __ASURA_EDITOR_BUTTON_H__ -#define __ASURA_EDITOR_BUTTON_H__ - -#include <vector> - -#include <asura-lib-utils/scripting/portable.hpp> -#include <asura-lib-core/graphics/image.h> - -#include "../core/signal.h" -#include "widget.h" - -namespace AsuraEditor -{ - - enum ButtonStatus - { - BUTTON_STATUS_NORMAL = 0, - BUTTON_STATUS_PUSHED = 1, - BUTTON_STATUS_HOVER = 2, - BUTTON_STATUS_DISABLED = 3, - BUTTON_STATUS_FOCUSED = 4, - _BUTTON_STATUS_COUNT = 5, - }; - - enum ButtonMessage - { - BUTTON_MSG_CLICK = 0, - BUTTON_MSG_HOVER = 1, - BUTTON_MSG_KILLFOCUS = 2, - _BUTTON_MSG_COUNT = 3, - }; - - class Button - : public Widget - , public AEScripting::Portable<Button> - { - public: - - LUAX_DECL_FACTORY(Button); - - Button(); - ~Button(); - - void OnEvent(AEInput::Event& e) override; - void OnPaint() override; - - void Connect(int msg, Slot callback); - void Disconnect(int msg); - void DisconnectAll(int msg); - void DisconnectAllMsg(); - - int GetStatus(); - void SetImage(int status, AEGraphics::Image* image); - - private: - - //------------------------------------------------------------------------------// - - LUAX_DECL_ENUM(ButtonStatus); - LUAX_DECL_ENUM(ButtonMessage); - - LUAX_DECL_METHOD(_Connect); - LUAX_DECL_METHOD(_Disconnect); - LUAX_DECL_METHOD(_SetImage); - - //------------------------------------------------------------------------------// - - int mStatus; // ǰ״̬ - Signal mSignals[_BUTTON_MSG_COUNT]; // 3Ϣsignal - AEGraphics::Image* mImage[_BUTTON_STATUS_COUNT]; // 5״̬ͼ - - Luax::LuaxMemberRef mImageRef[_BUTTON_STATUS_COUNT];// ͼ - std::vector<Luax::LuaxMemberRef> mCallbacksRef; // ص - - }; - -} - -#endif
\ No newline at end of file diff --git a/source/Asura.Editor/widgets/checkbox.cpp b/source/Asura.Editor/widgets/checkbox.cpp deleted file mode 100644 index e69de29..0000000 --- a/source/Asura.Editor/widgets/checkbox.cpp +++ /dev/null diff --git a/source/Asura.Editor/widgets/checkbox.h b/source/Asura.Editor/widgets/checkbox.h deleted file mode 100644 index e69de29..0000000 --- a/source/Asura.Editor/widgets/checkbox.h +++ /dev/null diff --git a/source/Asura.Editor/widgets/hslider.cpp b/source/Asura.Editor/widgets/hslider.cpp deleted file mode 100644 index e69de29..0000000 --- a/source/Asura.Editor/widgets/hslider.cpp +++ /dev/null diff --git a/source/Asura.Editor/widgets/hslider.h b/source/Asura.Editor/widgets/hslider.h deleted file mode 100644 index e69de29..0000000 --- a/source/Asura.Editor/widgets/hslider.h +++ /dev/null diff --git a/source/Asura.Editor/widgets/hvslider.cpp b/source/Asura.Editor/widgets/hvslider.cpp deleted file mode 100644 index e69de29..0000000 --- a/source/Asura.Editor/widgets/hvslider.cpp +++ /dev/null diff --git a/source/Asura.Editor/widgets/hvslider.h b/source/Asura.Editor/widgets/hvslider.h deleted file mode 100644 index e69de29..0000000 --- a/source/Asura.Editor/widgets/hvslider.h +++ /dev/null diff --git a/source/Asura.Editor/widgets/label.cpp b/source/Asura.Editor/widgets/label.cpp deleted file mode 100644 index e69de29..0000000 --- a/source/Asura.Editor/widgets/label.cpp +++ /dev/null diff --git a/source/Asura.Editor/widgets/label.h b/source/Asura.Editor/widgets/label.h deleted file mode 100644 index 1d053f8..0000000 --- a/source/Asura.Editor/widgets/label.h +++ /dev/null @@ -1,25 +0,0 @@ -#ifndef __ASURA_EDITOR_LABEL_H__ -#define __ASURA_EDITOR_LABEL_H__ - -#include <asura-lib-utils/scripting/portable.hpp> -#include <asura-lib-core/graphics/image.h> - -#include "widget.h" - -namespace AsuraEditor -{ - - class Label - : public Widget - , public AEScripting::Portable<Label> - { - public: - - void OnEvent(AEInput::Event& e) override; - void OnPaint() override; - - }; - -} - -#endif
\ No newline at end of file diff --git a/source/Asura.Editor/widgets/panel.cpp b/source/Asura.Editor/widgets/panel.cpp deleted file mode 100644 index e69de29..0000000 --- a/source/Asura.Editor/widgets/panel.cpp +++ /dev/null diff --git a/source/Asura.Editor/widgets/panel.h b/source/Asura.Editor/widgets/panel.h deleted file mode 100644 index e69de29..0000000 --- a/source/Asura.Editor/widgets/panel.h +++ /dev/null diff --git a/source/Asura.Editor/widgets/progress.cpp b/source/Asura.Editor/widgets/progress.cpp deleted file mode 100644 index e69de29..0000000 --- a/source/Asura.Editor/widgets/progress.cpp +++ /dev/null diff --git a/source/Asura.Editor/widgets/progress.h b/source/Asura.Editor/widgets/progress.h deleted file mode 100644 index e69de29..0000000 --- a/source/Asura.Editor/widgets/progress.h +++ /dev/null diff --git a/source/Asura.Editor/widgets/radio_button.cpp b/source/Asura.Editor/widgets/radio_button.cpp deleted file mode 100644 index e69de29..0000000 --- a/source/Asura.Editor/widgets/radio_button.cpp +++ /dev/null diff --git a/source/Asura.Editor/widgets/radio_button.h b/source/Asura.Editor/widgets/radio_button.h deleted file mode 100644 index e69de29..0000000 --- a/source/Asura.Editor/widgets/radio_button.h +++ /dev/null diff --git a/source/Asura.Editor/widgets/textbox.cpp b/source/Asura.Editor/widgets/textbox.cpp deleted file mode 100644 index e69de29..0000000 --- a/source/Asura.Editor/widgets/textbox.cpp +++ /dev/null diff --git a/source/Asura.Editor/widgets/textbox.h b/source/Asura.Editor/widgets/textbox.h deleted file mode 100644 index e69de29..0000000 --- a/source/Asura.Editor/widgets/textbox.h +++ /dev/null diff --git a/source/Asura.Editor/widgets/vslider.cpp b/source/Asura.Editor/widgets/vslider.cpp deleted file mode 100644 index e69de29..0000000 --- a/source/Asura.Editor/widgets/vslider.cpp +++ /dev/null diff --git a/source/Asura.Editor/widgets/vslider.h b/source/Asura.Editor/widgets/vslider.h deleted file mode 100644 index e69de29..0000000 --- a/source/Asura.Editor/widgets/vslider.h +++ /dev/null diff --git a/source/Asura.Editor/widgets/widget.h b/source/Asura.Editor/widgets/widget.h deleted file mode 100644 index 9ffd1fb..0000000 --- a/source/Asura.Editor/widgets/widget.h +++ /dev/null @@ -1,43 +0,0 @@ -#ifndef __ASURA_EDITOR_WIDGET_H__ -#define __ASURA_EDITOR_WIDGET_H__ - -#include <list> - -#include <asura-lib-utils/scripting/portable.hpp> -#include <asura-lib-utils/type.h> -#include <asura-lib-utils/math/rect.hpp> -#include <asura-lib-utils/math/vector2.hpp> -#include <asura-lib-core/input/event.h> - -namespace AsuraEditor -{ - - /// - /// Asura EditorĿؼȾں¼ѯֻ¼Ӧӿڡ - /// - ASURA_ABSTRACT class Widget - : public virtual AEScripting::NativeAccessor - { - - public: - - /// - /// ؼֻбڵѡΪfocusʱŻᴦ룬ԺܸЧ - /// - virtual void OnEvent(AEInput::Event& e) = 0; - - /// - /// - /// - virtual void OnPaint() = 0; - - protected: - - AEMath::Vector2i mPos; - AEMath::Recti mBBox; - - }; - -} - -#endif
\ No newline at end of file |