Пример #1
0
	App() {
		horz.Add(tree1);
		horz.Add(tree2);
		horz.Add(optree);
		Add(horz.Horz().SizePos());
		optree.SetRoot("everything");
		for(int i = 0; i < 10; i++)
			optree.Add(i ? rand() % i : 0, x[i], AsString(i));
		tree1.MultiSelect();
		tree1.WhenOpen = THISFN(OpenDir);
		tree1.WhenClose = [=] (int id) { tree1.RemoveChildren(id); };
	#ifdef PLATFORM_WIN32
		String dir = String(GetExeFilePath()[0], 1) + ":\\";
	#else
		String dir = "/usr";
	#endif
		tree1.SetRoot(CtrlImg::Dir(), dir);
		tree2.SetRoot(CtrlImg::Dir(), dir);
		Progress pi;
		pi.AlignText(ALIGN_LEFT);
		LoadTree(0, dir, pi);
		tree2.NoCursor().NoRoot();
		tree2.SortDeep(0);
		Sizeable();

		tree1.WhenCursor = [=] { info = ~tree1; };
		tree1.AddFrame(info);
	}
Пример #2
0
    App() {
        Add(tree.SizePos());

        tree.WhenOpen = THISBACK(OpenDir);
        tree.WhenClose = THISBACK(CloseDir);

    #ifdef PLATFORM_WIN32
        String dir = String(GetExeFilePath()[0], 1) + ":\\";
    #else
        String dir = "/usr";
    #endif

        tree.SetRoot(dir);
        tree.Set(0, dir);

        Sizeable();
    }