Inheritance: EventDispatcher
 static public int set_treeNodeWillExpand(IntPtr l)
 {
     try {
         FairyGUI.TreeView self = (FairyGUI.TreeView)checkSelf(l);
         FairyGUI.TreeView.TreeNodeWillExpandDelegate v;
         int op = LuaDelegation.checkDelegate(l, 2, out v);
         if (op == 0)
         {
             self.treeNodeWillExpand = v;
         }
         else if (op == 1)
         {
             self.treeNodeWillExpand += v;
         }
         else if (op == 2)
         {
             self.treeNodeWillExpand -= v;
         }
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Beispiel #2
0
    static int set_treeNodeWillExpand(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            FairyGUI.TreeView obj = (FairyGUI.TreeView)o;
            FairyGUI.TreeView.TreeNodeWillExpandDelegate arg0 = null;
            LuaTypes funcType2 = LuaDLL.lua_type(L, 2);

            if (funcType2 != LuaTypes.LUA_TFUNCTION)
            {
                arg0 = (FairyGUI.TreeView.TreeNodeWillExpandDelegate)ToLua.CheckObject(L, 2, typeof(FairyGUI.TreeView.TreeNodeWillExpandDelegate));
            }
            else
            {
                LuaFunction func = ToLua.ToLuaFunction(L, 2);
                arg0 = DelegateFactory.CreateDelegate(typeof(FairyGUI.TreeView.TreeNodeWillExpandDelegate), func) as FairyGUI.TreeView.TreeNodeWillExpandDelegate;
            }

            obj.treeNodeWillExpand = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index treeNodeWillExpand on a nil value" : e.Message));
        }
    }
 static public int get_onClickNode(IntPtr l)
 {
     try {
         FairyGUI.TreeView self = (FairyGUI.TreeView)checkSelf(l);
         pushValue(l, true);
         pushValue(l, self.onClickNode);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
 static public int ClearSelection(IntPtr l)
 {
     try {
         FairyGUI.TreeView self = (FairyGUI.TreeView)checkSelf(l);
         self.ClearSelection();
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
 static public int GetSelection(IntPtr l)
 {
     try {
         FairyGUI.TreeView self = (FairyGUI.TreeView)checkSelf(l);
         var ret = self.GetSelection();
         pushValue(l, true);
         pushValue(l, ret);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Beispiel #6
0
 static int ClearSelection(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 1);
         FairyGUI.TreeView obj = (FairyGUI.TreeView)ToLua.CheckObject(L, 1, typeof(FairyGUI.TreeView));
         obj.ClearSelection();
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
 static public int UpdateNodes(IntPtr l)
 {
     try {
         FairyGUI.TreeView self = (FairyGUI.TreeView)checkSelf(l);
         System.Collections.Generic.List <FairyGUI.TreeNode> a1;
         checkType(l, 2, out a1);
         self.UpdateNodes(a1);
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
 static public int set_indent(IntPtr l)
 {
     try {
         FairyGUI.TreeView self = (FairyGUI.TreeView)checkSelf(l);
         System.Int32      v;
         checkType(l, 2, out v);
         self.indent = v;
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
 static public int RemoveSelection(IntPtr l)
 {
     try {
         FairyGUI.TreeView self = (FairyGUI.TreeView)checkSelf(l);
         FairyGUI.TreeNode a1;
         checkType(l, 2, out a1);
         self.RemoveSelection(a1);
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Beispiel #10
0
 static int GetSelectedNode(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 1);
         FairyGUI.TreeView obj = (FairyGUI.TreeView)ToLua.CheckObject(L, 1, typeof(FairyGUI.TreeView));
         FairyGUI.TreeNode o   = obj.GetSelectedNode();
         ToLua.PushObject(L, o);
         return(1);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
 static public int GetNodeIndex(IntPtr l)
 {
     try {
         FairyGUI.TreeView self = (FairyGUI.TreeView)checkSelf(l);
         FairyGUI.TreeNode a1;
         checkType(l, 2, out a1);
         var ret = self.GetNodeIndex(a1);
         pushValue(l, true);
         pushValue(l, ret);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Beispiel #12
0
 static int GetSelection(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 1);
         FairyGUI.TreeView obj = (FairyGUI.TreeView)ToLua.CheckObject(L, 1, typeof(FairyGUI.TreeView));
         System.Collections.Generic.List <FairyGUI.TreeNode> o = obj.GetSelection();
         ToLua.PushObject(L, o);
         return(1);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Beispiel #13
0
 static int CollapseAll(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 2);
         FairyGUI.TreeView obj  = (FairyGUI.TreeView)ToLua.CheckObject(L, 1, typeof(FairyGUI.TreeView));
         FairyGUI.TreeNode arg0 = (FairyGUI.TreeNode)ToLua.CheckObject(L, 2, typeof(FairyGUI.TreeNode));
         obj.CollapseAll(arg0);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
 static public int constructor(IntPtr l)
 {
     try {
         FairyGUI.TreeView o;
         FairyGUI.GList    a1;
         checkType(l, 2, out a1);
         o = new FairyGUI.TreeView(a1);
         pushValue(l, true);
         pushValue(l, o);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Beispiel #15
0
 static int UpdateNodes(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 2);
         FairyGUI.TreeView obj = (FairyGUI.TreeView)ToLua.CheckObject(L, 1, typeof(FairyGUI.TreeView));
         System.Collections.Generic.List <FairyGUI.TreeNode> arg0 = (System.Collections.Generic.List <FairyGUI.TreeNode>)ToLua.CheckObject(L, 2, typeof(System.Collections.Generic.List <FairyGUI.TreeNode>));
         obj.UpdateNodes(arg0);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
 static public int AddSelection(IntPtr l)
 {
     try {
         FairyGUI.TreeView self = (FairyGUI.TreeView)checkSelf(l);
         FairyGUI.TreeNode a1;
         checkType(l, 2, out a1);
         System.Boolean a2;
         checkType(l, 3, out a2);
         self.AddSelection(a1, a2);
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Beispiel #17
0
 static int AddSelection(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 3);
         FairyGUI.TreeView obj  = (FairyGUI.TreeView)ToLua.CheckObject(L, 1, typeof(FairyGUI.TreeView));
         FairyGUI.TreeNode arg0 = (FairyGUI.TreeNode)ToLua.CheckObject(L, 2, typeof(FairyGUI.TreeNode));
         bool arg1 = LuaDLL.luaL_checkboolean(L, 3);
         obj.AddSelection(arg0, arg1);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Beispiel #18
0
 static int GetNodeIndex(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 2);
         FairyGUI.TreeView obj  = (FairyGUI.TreeView)ToLua.CheckObject(L, 1, typeof(FairyGUI.TreeView));
         FairyGUI.TreeNode arg0 = (FairyGUI.TreeNode)ToLua.CheckObject(L, 2, typeof(FairyGUI.TreeNode));
         int o = obj.GetNodeIndex(arg0);
         LuaDLL.lua_pushinteger(L, o);
         return(1);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Beispiel #19
0
    static int get_root(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            FairyGUI.TreeView obj = (FairyGUI.TreeView)o;
            FairyGUI.TreeNode ret = obj.root;
            ToLua.PushObject(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index root on a nil value" : e.Message));
        }
    }
Beispiel #20
0
    static int get_indent(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            FairyGUI.TreeView obj = (FairyGUI.TreeView)o;
            int ret = obj.indent;
            LuaDLL.lua_pushinteger(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index indent on a nil value" : e.Message));
        }
    }
Beispiel #21
0
    static int set_indent(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            FairyGUI.TreeView obj = (FairyGUI.TreeView)o;
            int arg0 = (int)LuaDLL.luaL_checknumber(L, 2);
            obj.indent = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index indent on a nil value" : e.Message));
        }
    }
Beispiel #22
0
    static int get_treeNodeWillExpand(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            FairyGUI.TreeView obj = (FairyGUI.TreeView)o;
            FairyGUI.TreeView.TreeNodeWillExpandDelegate ret = obj.treeNodeWillExpand;
            ToLua.Push(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index treeNodeWillExpand on a nil value" : e.Message));
        }
    }
Beispiel #23
0
    static int get_onClickNode(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            FairyGUI.TreeView      obj = (FairyGUI.TreeView)o;
            FairyGUI.EventListener ret = obj.onClickNode;
            ToLua.PushObject(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index onClickNode on a nil value" : e.Message));
        }
    }
Beispiel #24
0
    static int _CreateFairyGUI_TreeView(IntPtr L)
    {
        try
        {
            int count = LuaDLL.lua_gettop(L);

            if (count == 1)
            {
                FairyGUI.GList    arg0 = (FairyGUI.GList)ToLua.CheckObject(L, 1, typeof(FairyGUI.GList));
                FairyGUI.TreeView obj  = new FairyGUI.TreeView(arg0);
                ToLua.PushObject(L, obj);
                return(1);
            }
            else
            {
                return(LuaDLL.luaL_throw(L, "invalid arguments to ctor method: FairyGUI.TreeView.New"));
            }
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }
        internal void SetTree(TreeView value)
        {
            tree = value;
            if (tree != null && tree.treeNodeWillExpand != null && _expanded)
                tree.treeNodeWillExpand(this, true);

            if (_children != null)
            {
                int cnt = _children.Count;
                for (int i = 0; i < cnt; i++)
                {
                    TreeNode node = _children[i];
                    node.level = level + 1;
                    node.SetTree(value);
                }
            }
        }