/// <summary> /// Search in subtree from iterator (including itself), /// check if user task and native task are compatible,then bind. /// </summary> /// <param name="task">The UITask to bind.</param> /// <param name="name">Name of the node to bind with the UITask.</param> /// <returns>If not possible to bind returns null , if sucessfull return UITask.</returns> public CKLBUITask bindTask(CKLBUITask task, String name = null) { if (name != null) { if (find(name, true)) { task.bind(node_getUITask(m_nodeCpp)); } else { throw new CKLBException("There is not any Node with this name."); } } else { IntPtr ptr = node_searchFirstByTypeID(m_nodeCpp, task.TypeID); if (ptr != IntPtr.Zero) { task.bind(ptr); } else { throw new CKLBException("There is not any Node compatible with this task."); } } return(task); }
public CKLBUIPolyline(CKLBUITask parent, uint order, uint maxPoint) : base(s_classID) { NativeManagement.resetCppError(); IntPtr ptr = CKLBUIPolyline_create(parent != null ? parent.CppObject : IntPtr.Zero, order, maxPoint); NativeManagement.intercepCppError(); bind(ptr); }
public CKLBUIFreeVertItem(CKLBUITask parent, uint order, float x, float y, String asset, float[] verticesArray) : base(s_classID) { NativeManagement.resetCppError(); IntPtr ptr = CKLBUIFreeVertItem_create(parent != null ? parent.CppObject : IntPtr.Zero, order, x, y, __MarshallingUtils.NativeUtf8FromString(asset), verticesArray); NativeManagement.intercepCppError(); bind(ptr); }
public static void dumpSceneGraph(CKLBUITask task = null) { if(task != null) { CKLBLuaLibRES_dumpSceneGraph(task.CppObject); } else { CKLBLuaLibRES_dumpSceneGraph(IntPtr.Zero); } }
public CKLBUIGroup(CKLBUITask parent, float x, float y) : base(s_classID) { NativeManagement.resetCppError(); IntPtr ptr = CKLBUIGroup_create(parent != null ? parent.CppObject : IntPtr.Zero, x, y); NativeManagement.intercepCppError(); bind(ptr); }
public CKLBUIPieChart(CKLBUITask parent, uint order, float x, float y, float width, float height, String image_asset, float start_angle, float end_angle, int anim_time = 0, float initial_value = 0.0f) : base(s_classID) { NativeManagement.resetCppError(); IntPtr ptr = CKLBUIPieChart_create(parent != null ? parent.CppObject : IntPtr.Zero, order, x, y, width, height, __MarshallingUtils.NativeUtf8FromString(image_asset), start_angle, end_angle, anim_time, initial_value); NativeManagement.intercepCppError(); bind(ptr); }
public CKLBUILabel(CKLBUITask parent, uint order, float x, float y, uint argb, String font_name, uint font_size, String text, EALIGN align) : base(s_classID) { NativeManagement.resetCppError(); IntPtr ptr = CKLBUILabel_create(parent != null ? parent.CppObject : IntPtr.Zero, order, x, y, argb, __MarshallingUtils.NativeUtf8FromString(font_name), font_size, __MarshallingUtils.NativeUtf8FromString(text), (uint)align); NativeManagement.intercepCppError(); bind(ptr); }
public CKLBUIScale9(CKLBUITask parent, uint order, float x, float y, int width, int height, String asset) : base(s_classID) { NativeManagement.resetCppError(); IntPtr ptr = CKLBUIScale9_create(parent != null ? parent.CppObject : IntPtr.Zero, order, x, y, width, height, __MarshallingUtils.NativeUtf8FromString(asset)); NativeManagement.intercepCppError(); bind(ptr); }
//a string is given to the constructor which creates a font object public CKLBUIDebugItem(CKLBUITask parent, uint order, float x, float y, uint argb, String font_name, uint font_size, String text, uint cmdID, CallBack callback) : base(s_classID) { NativeManagement.resetCppError(); IntPtr ptr = CKLBUIDebugItem_create(parent != null ? parent.CppObject : IntPtr.Zero, order, x, y, argb, __MarshallingUtils.NativeUtf8FromString(font_name), font_size, __MarshallingUtils.NativeUtf8FromString(text), cmdID); NativeManagement.intercepCppError(); bind(ptr); m_callback = callback; }
public CKLBUIClip(CKLBUITask parent, uint baseOrder, uint maxOrder, float x, float y, float clipWidth, float clipHeight) : base(s_classID) { NativeManagement.resetCppError(); IntPtr ptr = CKLBUIClip_create( parent != null ? parent.CppObject : IntPtr.Zero, baseOrder, maxOrder, x, y, clipWidth, clipHeight); NativeManagement.intercepCppError(); bind(ptr); }
public CKLBUICanvas(CKLBUITask parent, uint order, float x, float y, uint vertexMax, uint indexMax, CallBack onDrawCallBack) : base(s_classID) { NativeManagement.resetCppError(); IntPtr ptr = CKLBUICanvas_create(parent != null ? parent.CppObject : IntPtr.Zero, order, x, y, vertexMax, indexMax); NativeManagement.intercepCppError(); bind(ptr); m_callback = onDrawCallBack; }
public CKLBUIMoviePlayer(CKLBUITask parent, bool background_mode, float x, float y, float width, float height, CallBack callback, String url = null) : base(s_classID) { NativeManagement.resetCppError(); IntPtr ptr = CKLBUIMoviePlayer_create(parent != null ? parent.CppObject : IntPtr.Zero, background_mode, x, y, width, height, __MarshallingUtils.NativeUtf8FromString(url)); NativeManagement.intercepCppError(); bind(ptr); m_callback = callback; }
public CKLBUIForm(CKLBUITask parent, uint order, int x, int y, bool assetFile, String asset_name, bool bExclusive = false, bool modal = false, bool urgent = false) : base(s_classID) { NativeManagement.resetCppError(); IntPtr ptr = CKLBUIForm_create(parent != null ? parent.CppObject : IntPtr.Zero, order, x, y, assetFile, __MarshallingUtils.NativeUtf8FromString(asset_name), bExclusive, modal, urgent); NativeManagement.intercepCppError(); bind(ptr); }
public CKLBUIClip(CKLBUITask parent, uint baseOrder, uint maxOrder, float x, float y, float clipWidth, float clipHeight) : base(s_classID) { NativeManagement.resetCppError(); IntPtr ptr = CKLBUIClip_create(parent != null ? parent.CppObject : IntPtr.Zero, baseOrder, maxOrder, x, y, clipWidth, clipHeight); NativeManagement.intercepCppError(); bind(ptr); }
public CKLBUITextInput(CKLBUITask parent, bool passwordMode, int x, int y, uint width, uint height, String defaultText, CallBack callback, int widgetId = 0, int maxLen = 0, uint charType = (uint)(ECHAR_TYPE.TXCH_7BIT_ASCII|ECHAR_TYPE.TXCH_UTF8)) : base(s_classID) { NativeManagement.resetCppError(); IntPtr ptr = CKLBUITextInput_create(parent != null ? parent.CppObject : IntPtr.Zero, passwordMode, x, y, width, height, __MarshallingUtils.NativeUtf8FromString(defaultText), widgetId, maxLen, charType); NativeManagement.intercepCppError(); bind(ptr); m_callback = callback; }
public static void dumpSceneGraph(CKLBUITask task = null) { if (task != null) { CKLBLuaLibRES_dumpSceneGraph(task.CppObject); } else { CKLBLuaLibRES_dumpSceneGraph(IntPtr.Zero); } }
public CKLBUISWFPlayer(CKLBUITask parent, uint order, float x, float y, String asset, String movieName, CallBack callback, String[] replaceList = null, int assetCnt = 0) : base(s_classID) { NativeManagement.resetCppError(); IntPtr ptr = CKLBUISWFPlayer_create(parent != null ? parent.CppObject : IntPtr.Zero, order, x, y, __MarshallingUtils.NativeUtf8FromString(asset), __MarshallingUtils.NativeUtf8FromString(movieName), (replaceList != null) ? __MarshallingUtils.NativeUtf8ArrayFromStringArray(replaceList, replaceList.Length) : null, assetCnt); NativeManagement.intercepCppError(); bind(ptr); m_callback = callback; }
public CKLBUITextInput(CKLBUITask parent, bool passwordMode, int x, int y, uint width, uint height, String defaultText, CallBack callback, int widgetId = 0, int maxLen = 0, uint charType = (uint)(ECHAR_TYPE.TXCH_7BIT_ASCII | ECHAR_TYPE.TXCH_UTF8)) : base(s_classID) { NativeManagement.resetCppError(); IntPtr ptr = CKLBUITextInput_create(parent != null ? parent.CppObject : IntPtr.Zero, passwordMode, x, y, width, height, __MarshallingUtils.NativeUtf8FromString(defaultText), widgetId, maxLen, charType); NativeManagement.intercepCppError(); bind(ptr); m_callback = callback; }
public CKLBUIVirtualDoc(CKLBUITask parent, uint order, float x, float y, uint docWidth, uint docHeight, uint viewWidth, uint viewHeight, uint maxCommandNums, bool verticalFlag, CallBack callback) : base(s_classID) { NativeManagement.resetCppError(); IntPtr ptr = CKLBUIVirtualDoc_create(parent != null ? parent.CppObject : IntPtr.Zero, order, x, y, docWidth, docHeight, viewWidth, viewHeight, maxCommandNums, verticalFlag); NativeManagement.intercepCppError(); bind(ptr); m_callback = callback; m_isLocked = false; }
public CKLBUIList(CKLBUITask parent, uint base_priority, uint max_order, float x, float y, float clip_width, float clip_height, int default_line_step, DragCallBack callback, bool vertical = true, uint option_flags = 0) : base(s_classID) { NativeManagement.resetCppError(); IntPtr ptr = CKLBUIList_create(parent != null ? parent.CppObject : IntPtr.Zero, base_priority, max_order, x, y, clip_width, clip_height, default_line_step, vertical, option_flags); NativeManagement.intercepCppError(); bind(ptr); m_dragCallback = callback; }
public CKLBUIScore(CKLBUITask parent, uint order, int orderOffset, float x, float y, String[] textureTable, float stepX, float stepY, int column, bool fillZeroFlag, bool animationFlag, EALIGN align = EALIGN.ALIGN_RIGHT, bool countClip = false) : base(s_classID) { NativeManagement.resetCppError(); IntPtr ptr = CKLBUIScore_create(parent != null ? parent.CppObject : IntPtr.Zero, order, orderOffset, x, y, __MarshallingUtils.NativeUtf8ArrayFromStringArray(textureTable, textureTable.Length), stepX, stepY, column, fillZeroFlag, animationFlag, (uint)align, countClip); NativeManagement.intercepCppError(); bind(ptr); }
public CKLBUIDragIcon( CKLBUITask parent, uint order, float x, float y, ref Area tap_area, String asset, String drag_asset, int drag_order_offset, float drag_alpha, float center_x, float center_y, CallBack callback, uint flags = 0) : base(s_classID) { NativeManagement.resetCppError(); IntPtr ptr = CKLBUIDragIcon_create( parent != null ? parent.CppObject : IntPtr.Zero, order, x, y, ref tap_area, __MarshallingUtils.NativeUtf8FromString(asset), __MarshallingUtils.NativeUtf8FromString(drag_asset), drag_order_offset, drag_alpha, center_x, center_y, flags); NativeManagement.intercepCppError(); bind(ptr); m_callback = callback; }
public CKLBUIMultiImgItem( CKLBUITask parent, uint order, float x, float y, String[] pArrayAsset, uint[] pArrayIndexes, uint index = 0) : base(s_classID) { if(pArrayAsset.Length != pArrayAsset.Length) { throw new CKLBException("ArrayAsset and ArrayIndexes must have the same size."); } NativeManagement.resetCppError(); IntPtr ptr = CKLBUIMultiImgItem_create( parent != null ? parent.CppObject : IntPtr.Zero, order, x, y, index, __MarshallingUtils.NativeUtf8ArrayFromStringArray(pArrayAsset, pArrayAsset.Length), pArrayIndexes, (uint)pArrayAsset.Length); NativeManagement.intercepCppError(); bind(ptr); }
public CKLBUIRubberBand(CKLBUITask parent, uint order, float origin_x, float origin_y, String origin_asset, String joint_asset, String point_asset, uint resolution = 10, uint option_flags = 0, uint animation_time = 0, int joint_priority_offset = 0, int point_priority_offset = 0, bool rot_origin = true, bool rot_joint = false, bool rot_point = true) : base(s_classID) { NativeManagement.resetCppError(); IntPtr ptr = CKLBUIRubberBand_create(parent != null ? parent.CppObject : IntPtr.Zero, order, origin_x, origin_y, resolution, __MarshallingUtils.NativeUtf8FromString(origin_asset), __MarshallingUtils.NativeUtf8FromString(joint_asset), __MarshallingUtils.NativeUtf8FromString(point_asset), option_flags, animation_time, joint_priority_offset, point_priority_offset, rot_origin, rot_joint, rot_point); NativeManagement.intercepCppError(); bind(ptr); }
public CKLBUIDragIcon(CKLBUITask parent, uint order, float x, float y, ref Area tap_area, String asset, String drag_asset, int drag_order_offset, float drag_alpha, float center_x, float center_y, CallBack callback, uint flags = 0) : base(s_classID) { NativeManagement.resetCppError(); IntPtr ptr = CKLBUIDragIcon_create(parent != null ? parent.CppObject : IntPtr.Zero, order, x, y, ref tap_area, __MarshallingUtils.NativeUtf8FromString(asset), __MarshallingUtils.NativeUtf8FromString(drag_asset), drag_order_offset, drag_alpha, center_x, center_y, flags); NativeManagement.intercepCppError(); bind(ptr); m_callback = callback; }
public CKLBUIMultiImgItem(CKLBUITask parent, uint order, float x, float y, String[] pArrayAsset, uint[] pArrayIndexes, uint index = 0) : base(s_classID) { if (pArrayAsset.Length != pArrayAsset.Length) { throw new CKLBException("ArrayAsset and ArrayIndexes must have the same size."); } NativeManagement.resetCppError(); IntPtr ptr = CKLBUIMultiImgItem_create(parent != null ? parent.CppObject : IntPtr.Zero, order, x, y, index, __MarshallingUtils.NativeUtf8ArrayFromStringArray(pArrayAsset, pArrayAsset.Length), pArrayIndexes, (uint)pArrayAsset.Length); NativeManagement.intercepCppError(); bind(ptr); }
/// <summary> /// Try to get the UITask linked to the current Node of the NodeIterator. /// </summary> /// <returns>The UITask if a UITask is effectivly linked to the Node. Else returns null.</returns> public CKLBUITask getAsUITask() { IntPtr ptr = node_getUITask(m_nodeCpp); if (ptr != IntPtr.Zero) { NativeManagement.resetCppError(); CKLBUITask task = new CKLBUITask(NativeManagement.getTypeID(ptr)); NativeManagement.intercepCppError(); task.bind(ptr); return(task); } else { return(null); } }
public CKLBUIProgressBar(CKLBUITask parent, uint order, float x, float y, float width, float height, String imageFull, String imageEmpty, int startPix = -1, int endPix = -1, int animTime = 0, bool verticalFlag = false, String barfilterImage = null) : base(s_classID) { NativeManagement.resetCppError(); IntPtr ptr = CKLBUIProgressBar_create(parent != null ? parent.CppObject : IntPtr.Zero, order, x, y, width, height, __MarshallingUtils.NativeUtf8FromString(imageFull), __MarshallingUtils.NativeUtf8FromString(imageEmpty), startPix, endPix, animTime, verticalFlag, __MarshallingUtils.NativeUtf8FromString(barfilterImage)); NativeManagement.intercepCppError(); bind(ptr); }
public CKLBUIScrollBar( CKLBUITask parent, uint order, float x, float y, float width, float height, int minValue, int maxValue, int pos, String image, int sliderSize, int minSliderSize, uint argbNormal = 0xFFFFFFFF, uint argbSelect = 0xFFFFFFFF, bool vert = true, bool active = true, bool hideMode = false, ScrollBarCallBack callback = null) : base(s_classID) { NativeManagement.resetCppError(); IntPtr ptr = CKLBUIScrollBar_create( parent != null ? parent.CppObject : IntPtr.Zero, order, x, y, width, height, minValue, maxValue, pos, __MarshallingUtils.NativeUtf8FromString(image), sliderSize, minSliderSize, argbNormal, argbSelect, vert, active, hideMode); NativeManagement.intercepCppError(); bind(ptr); m_callback = callback; }
internal static IntPtr getNodeFromTask(CKLBUITask task) { return(node_getNodeFromTask(task.CppObject)); }
internal static IntPtr getNodeFromTask(CKLBUITask task) { return node_getNodeFromTask(task.CppObject); }
/// <summary> /// Try to get the UITask linked to the current Node of the NodeIterator. /// </summary> /// <returns>The UITask if a UITask is effectivly linked to the Node. Else returns null.</returns> public CKLBUITask getAsUITask() { IntPtr ptr = node_getUITask(m_nodeCpp); if(ptr != IntPtr.Zero) { NativeManagement.resetCppError(); CKLBUITask task = new CKLBUITask(NativeManagement.getTypeID(ptr)); NativeManagement.intercepCppError(); task.bind(ptr); return task; } else { return null; } }
/// <summary> /// Search in subtree from iterator (including itself), /// check if user task and native task are compatible,then bind. /// </summary> /// <param name="task">The UITask to bind.</param> /// <param name="name">Name of the node to bind with the UITask.</param> /// <returns>If not possible to bind returns null , if sucessfull return UITask.</returns> public CKLBUITask bindTask(CKLBUITask task, String name = null) { if(name != null) { if(find(name, true)) { task.bind(node_getUITask(m_nodeCpp)); } else { throw new CKLBException("There is not any Node with this name."); } } else { IntPtr ptr = node_searchFirstByTypeID(m_nodeCpp, task.TypeID); if(ptr != IntPtr.Zero) { task.bind(ptr); } else { throw new CKLBException("There is not any Node compatible with this task."); } } return task; }
public CKLBUIProgressBar( CKLBUITask parent, uint order, float x, float y, float width, float height, String imageFull, String imageEmpty, int startPix = -1, int endPix = -1, int animTime = 0, bool verticalFlag = false, String barfilterImage = null) : base(s_classID) { NativeManagement.resetCppError(); IntPtr ptr = CKLBUIProgressBar_create( parent != null ? parent.CppObject : IntPtr.Zero, order, x, y, width, height, __MarshallingUtils.NativeUtf8FromString(imageFull), __MarshallingUtils.NativeUtf8FromString(imageEmpty), startPix, endPix, animTime, verticalFlag, __MarshallingUtils.NativeUtf8FromString(barfilterImage)); NativeManagement.intercepCppError(); bind(ptr); }
public CKLBUIScore( CKLBUITask parent, uint order, int orderOffset, float x, float y, String[] textureTable, float stepX, float stepY, int column, bool fillZeroFlag, bool animationFlag, EALIGN align = EALIGN.ALIGN_RIGHT, bool countClip = false) : base(s_classID) { NativeManagement.resetCppError(); IntPtr ptr = CKLBUIScore_create(parent != null ? parent.CppObject : IntPtr.Zero, order, orderOffset, x, y, __MarshallingUtils.NativeUtf8ArrayFromStringArray(textureTable, textureTable.Length), stepX, stepY, column, fillZeroFlag, animationFlag, (uint)align, countClip); NativeManagement.intercepCppError(); bind(ptr); }
public CKLBUIList( CKLBUITask parent, uint base_priority, uint max_order, float x, float y, float clip_width, float clip_height, int default_line_step, DragCallBack callback, bool vertical = true, uint option_flags = 0) : base(s_classID) { NativeManagement.resetCppError(); IntPtr ptr = CKLBUIList_create( parent != null ? parent.CppObject : IntPtr.Zero, base_priority, max_order, x, y, clip_width, clip_height, default_line_step, vertical, option_flags); NativeManagement.intercepCppError(); bind(ptr); m_dragCallback = callback; }