ide: Alt+C (copy declaration/definition) refactored, CtrlLib: DisplayPopUp issues

This commit is contained in:
Mirek Fidler 2025-10-18 14:33:28 +02:00
parent b572d8be79
commit 27c4cdef51
9 changed files with 213 additions and 22 deletions

View file

@ -13,8 +13,33 @@ GUI_APP_MAIN
dl.Add("Simple");
for(int i = 0; i < 10; i++)
dl.Add("Long " + String('X', i * 100));
TreeCtrl tree;
Vector<int> parent, parent2;
parent.Add(0);
tree.SetRoot(Image(), "The Tree");
Array<Option> option;
for(int i = 1; i < 10000; i++) {
parent.Add(tree.Add(parent[rand() % parent.GetCount()],
i & 1 ? CtrlImg::open() : Image(),
FormatIntRoman(i, true)));
if((rand() & 3) == 0)
tree.Open(parent.Top());
}
tree.Open(0);
tree.MultiSelect().ScrollIntoX();
ColumnList clist;
clist.Columns(3);
clist.MultiSelect();
for(int i = 0; i < 500; i++)
clist.Add(FormatIntRoman(i));
TopWindow win;
win.Add(dl.TopPosZ(0).LeftPosZ(0, 100));
win.Add(list.VSizePosZ(Zx(20), 0).LeftPosZ(0, 100));
win.Add(tree.VSizePosZ(Zx(20), 0).LeftPosZ(100, 100));
win.Add(clist.VSizePosZ(Zx(20), 0).LeftPosZ(200, 100));
win.Run();
}

41
upptst/ide_alt_c/ide.cpp Normal file
View file

@ -0,0 +1,41 @@
#include <Core/Core.h>
using namespace Upp;
#include <Core/Core.h>
#include <algorithm>
#include <vector>
#include <set>
#include <utility>
struct Foo {
struct Change { int foo;
int Test();
};
struct Item { int foo; };
std::vector<String> Bar2(const std::vector<Item>& price, String s);
std::vector<Change> Bar(const std::vector<Item>& price, String s);
std::vector<Foo::Change> Bar(const std::vector<std::vector<Item>>& price, String s);
std::vector<void (*)(int x, int y)> Bar(const std::vector<std::vector<Item>>& price, int x);
};
namespace Test {
struct Foo {
struct Change { int foo;
int Test();
};
struct Item { int foo; };
std::vector<String> Bar2(const std::vector<Item>& price, String s);
std::vector<Change> Bar(const std::vector<Item>& price, String s);
std::vector<Foo::Change> Bar(const std::vector<std::vector<Item>>& price, String s);
std::vector<void (*)(int x, int y)> Bar(const std::vector<std::vector<Item>>& price, int x);
};
};
CONSOLE_APP_MAIN
{
}

View file

@ -0,0 +1,9 @@
uses
Core;
file
ide.cpp;
mainconfig
"" = "";