.reference

git-svn-id: svn://ultimatepp.org/upp/trunk@10275 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2016-10-05 21:46:17 +00:00
parent c8dbd68e1d
commit 29eebcd4e0
11 changed files with 13 additions and 109 deletions

View file

@ -1,4 +1,4 @@
description "Using Convert to alter EditField for editing binary numbers";
description "Using Convert to alter EditField for editing binary numbers\377";
uses
CtrlLib;

4
reference/Convert/init Normal file
View file

@ -0,0 +1,4 @@
#ifndef _Convert_icpp_init_stub
#define _Convert_icpp_init_stub
#include "CtrlLib/init"
#endif

View file

@ -31,19 +31,14 @@ struct App : TopWindow {
EditField bin;
EditInt dec;
void BinChanged() { dec <<= ~bin; }
void DecChanged() { bin <<= ~dec; }
typedef App CLASSNAME;
App()
{
SetRect(0, 0, 200, 50);
bin.SetConvert(Single<ConvertBin>());
Add(bin.HSizePos().TopPos(0, Ctrl::STDSIZE));
Add(dec.HSizePos().BottomPos(0, Ctrl::STDSIZE));
bin <<= THISBACK(BinChanged);
dec <<= THISBACK(DecChanged);
bin << [=] { dec <<= ~bin; };
dec << [=] { bin <<= ~dec; };
}
};