#ifndef GUIShaderNodeIO_h__ #define GUIShaderNodeIO_h__ #include #include #include #include "GUINodePort.h" #include class GUIShaderNode; class GUIShaderNodeIO : public GUIWindow { friend class GUIShaderNode; public: EVENT2(IOEvent, GUIShaderNodeIO*, GUIShaderNodeIO*); IOEvent Event_Link; MouseEvent Event_PortClick; GUIShaderNodeIO(GUIShaderNode* _parent); ~GUIShaderNodeIO(); int id; void SetMode(bool input); void Update(float dt); void RenderSelf(); void SetBackColor(const Vec4f& color); void SetCaption(const String& _caption); bool IsInput(){return mode_input;} Vec2i GetAttachPoint(); GUIShaderNode* Owner; IShaderGraphNodePort* GraphicsPort; private: void AcceptLink(GUINodePort* me, GUINodePort* other); bool can_drag; void OnArrowPress(GUIWindow* w, int arg); void OnArrowClick(GUIWindow* w, int arg); GUINodePort* arrow; GUIText* caption; bool mode_input; }; #endif // GUIShaderNodeIO_h__