mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-08-25 14:22:54 -06:00
reorganizing repo
git-svn-id: svn://ultimatepp.org/upp/trunk@9206 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
7d17505cfe
commit
e3e8d627f5
3840 changed files with 0 additions and 1161578 deletions
|
|
@ -1,8 +0,0 @@
|
|||
#ifndef _ArrayCtrlSort_ArrayCtrlSort_h
|
||||
#define _ArrayCtrlSort_ArrayCtrlSort_h
|
||||
|
||||
#include <CtrlLib/CtrlLib.h>
|
||||
|
||||
using namespace Upp;
|
||||
|
||||
#endif
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
uses
|
||||
CtrlLib;
|
||||
|
||||
file
|
||||
ArrayCtrlSort.h,
|
||||
main.cpp;
|
||||
|
||||
mainconfig
|
||||
"" = "GUI";
|
||||
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
#ifndef _ArrayCtrlSort_icpp_init_stub
|
||||
#define _ArrayCtrlSort_icpp_init_stub
|
||||
#include "CtrlLib/init"
|
||||
#endif
|
||||
|
|
@ -1,43 +0,0 @@
|
|||
#include "ArrayCtrlSort.h"
|
||||
|
||||
class ArrayCtrlSort : public TopWindow {
|
||||
ArrayCtrl a;
|
||||
EditDouble ed1, ed2;
|
||||
|
||||
bool SortTest(int i1, int i2)
|
||||
{
|
||||
return a.Get(i1, 0) > a.Get(i2, 0);
|
||||
}
|
||||
|
||||
public:
|
||||
typedef ArrayCtrlSort CLASSNAME;
|
||||
ArrayCtrlSort();
|
||||
};
|
||||
|
||||
struct CvSum : public Convert {
|
||||
virtual Value Format(const Value& q) const {
|
||||
ValueArray va = q;
|
||||
return (int)va[0] + (int)va[1];
|
||||
}
|
||||
};
|
||||
|
||||
ArrayCtrlSort::ArrayCtrlSort()
|
||||
{
|
||||
a.AddColumn("first", "First").Edit(ed1).Sorting();
|
||||
a.AddColumn("second", "Second").Edit(ed2);
|
||||
a.AddColumnAt("first", "Format").Add("second").SetFormat("%d + %d = ").Sorting();
|
||||
a.AddColumnAt("first", "Sum")
|
||||
.Add("second")
|
||||
.SetConvert(Single<CvSum>());
|
||||
for(int i = 0; i < 100; i++)
|
||||
a.Add(rand() % 20, rand() % 10);
|
||||
Add(a.SizePos());
|
||||
// a.ColumnSort(3, StdValueOrder());
|
||||
|
||||
a.Sort(10, 40, THISBACK(SortTest));
|
||||
}
|
||||
|
||||
GUI_APP_MAIN
|
||||
{
|
||||
ArrayCtrlSort().Run();
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue