mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-07-11 22:03:01 -06:00
.uppdev
git-svn-id: svn://ultimatepp.org/upp/trunk@2874 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
9d83b6cafa
commit
3a7f160117
5 changed files with 104 additions and 72 deletions
18
uppdev/Alloc/Alloc.cpp
Normal file
18
uppdev/Alloc/Alloc.cpp
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
#include <Core/Core.h>
|
||||
|
||||
using namespace UPP;
|
||||
|
||||
#define ITEM_COUNT 1000000
|
||||
|
||||
CONSOLE_APP_MAIN {
|
||||
Vector<Value> v;
|
||||
getchar();
|
||||
for(int i=0;i<ITEM_COUNT;i++) v.Add((int)i);
|
||||
getchar();
|
||||
v.Clear(); v.Shrink();
|
||||
getchar();
|
||||
for(int i=0;i<ITEM_COUNT;i++) v.Add((int)i);
|
||||
getchar();
|
||||
v.Clear(); v.Shrink();
|
||||
getchar();
|
||||
}
|
||||
10
uppdev/Alloc/Alloc.upp
Normal file
10
uppdev/Alloc/Alloc.upp
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
uses
|
||||
Core;
|
||||
|
||||
file
|
||||
Alloc.cpp;
|
||||
|
||||
mainconfig
|
||||
"" = "",
|
||||
"" = "USEMALLOC";
|
||||
|
||||
4
uppdev/Alloc/init
Normal file
4
uppdev/Alloc/init
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
#ifndef _Alloc_icpp_init_stub
|
||||
#define _Alloc_icpp_init_stub
|
||||
#include "Core/init"
|
||||
#endif
|
||||
|
|
@ -1,68 +1,68 @@
|
|||
#include <CtrlLib/CtrlLib.h>
|
||||
|
||||
using namespace Upp;
|
||||
|
||||
struct App : TopWindow {
|
||||
ArrayCtrl a, b;
|
||||
Splitter s;
|
||||
|
||||
void DnD(PasteClip& d)
|
||||
{
|
||||
if(AcceptText(d))
|
||||
a.Add(GetString(d), GetString(d));
|
||||
}
|
||||
|
||||
void DnDInsert(int line, PasteClip& d)
|
||||
{
|
||||
if(AcceptInternal<ArrayCtrl>(d, "array"))
|
||||
a.InsertDrop(line, d);
|
||||
if(AcceptText(d)) {
|
||||
a.Insert(line);
|
||||
a.Set(line, 0, GetString(d));
|
||||
a.SetCursor(line);
|
||||
}
|
||||
}
|
||||
|
||||
void DnDInsertB(int line, PasteClip& d)
|
||||
{
|
||||
}
|
||||
|
||||
void Drag()
|
||||
{
|
||||
}
|
||||
|
||||
void DragB()
|
||||
{
|
||||
}
|
||||
|
||||
typedef App CLASSNAME;
|
||||
|
||||
App() {
|
||||
a.AddColumn("Text");
|
||||
a.MultiSelect();
|
||||
a.NoGrid();
|
||||
a.WhenDropInsert = THISBACK(DnDInsert);
|
||||
a.WhenDrop = THISBACK(DnD);
|
||||
a.WhenDrag = THISBACK(Drag);
|
||||
|
||||
b.AddColumn("Text");
|
||||
b.MultiSelect();
|
||||
b.WhenDropInsert = THISBACK(DnDInsertB);
|
||||
b.WhenDrag = THISBACK(DragB);
|
||||
|
||||
Add(s.Horz(a, b));
|
||||
for(int i = 0; i < 200; i++) {
|
||||
a.Add(i);
|
||||
b.Add(FormatIntRoman(i, true));
|
||||
if((i & 3) == 0)
|
||||
a.AddSeparator();
|
||||
}
|
||||
Sizeable();
|
||||
}
|
||||
};
|
||||
|
||||
GUI_APP_MAIN
|
||||
{
|
||||
DUMP("Test");
|
||||
App().Run();
|
||||
}
|
||||
#include <CtrlLib/CtrlLib.h>
|
||||
|
||||
using namespace Upp;
|
||||
|
||||
struct App : TopWindow {
|
||||
ArrayCtrl a, b;
|
||||
Splitter s;
|
||||
|
||||
void DnD(PasteClip& d)
|
||||
{
|
||||
if(AcceptText(d))
|
||||
a.Add(GetString(d), GetString(d));
|
||||
}
|
||||
|
||||
void DnDInsert(int line, PasteClip& d)
|
||||
{
|
||||
if(AcceptInternal<ArrayCtrl>(d, "array"))
|
||||
a.InsertDrop(line, d);
|
||||
if(AcceptText(d)) {
|
||||
a.Insert(line);
|
||||
a.Set(line, 0, GetString(d));
|
||||
a.SetCursor(line);
|
||||
}
|
||||
}
|
||||
|
||||
void DnDInsertB(int line, PasteClip& d)
|
||||
{
|
||||
}
|
||||
|
||||
void Drag()
|
||||
{
|
||||
}
|
||||
|
||||
void DragB()
|
||||
{
|
||||
}
|
||||
|
||||
typedef App CLASSNAME;
|
||||
|
||||
App() {
|
||||
a.AddColumn("\1Text alsdfjla fdlajd flajd falsjkd fla fals fj");
|
||||
a.MultiSelect();
|
||||
a.NoGrid();
|
||||
a.WhenDropInsert = THISBACK(DnDInsert);
|
||||
a.WhenDrop = THISBACK(DnD);
|
||||
a.WhenDrag = THISBACK(Drag);
|
||||
|
||||
b.AddColumn("Text");
|
||||
b.MultiSelect();
|
||||
b.WhenDropInsert = THISBACK(DnDInsertB);
|
||||
b.WhenDrag = THISBACK(DragB);
|
||||
|
||||
Add(s.Horz(a, b));
|
||||
for(int i = 0; i < 200; i++) {
|
||||
a.Add(i);
|
||||
b.Add(FormatIntRoman(i, true));
|
||||
if((i & 3) == 0)
|
||||
a.AddSeparator();
|
||||
}
|
||||
Sizeable();
|
||||
}
|
||||
};
|
||||
|
||||
GUI_APP_MAIN
|
||||
{
|
||||
DUMP("Test");
|
||||
App().Run();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,12 +15,12 @@ GUI_APP_MAIN
|
|||
fs.DefaultExt("hhh");
|
||||
|
||||
// fs.NoMkDirOption();
|
||||
fs.Multi();
|
||||
// fs.Multi();
|
||||
// fs.ActiveDir("/usr/include");
|
||||
// fs.NoEditFileName();
|
||||
fs.ActiveDir("c:/");
|
||||
fs.PreSelect("U:/log.txt");
|
||||
fs.ActiveType(3);
|
||||
// fs.ActiveDir("c:/");
|
||||
// fs.PreSelect("U:/log.txt");
|
||||
// fs.ActiveType(3);
|
||||
for(;;) {
|
||||
if(!fs.ExecuteSaveAs())
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue