mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-15 14:16:07 -06:00
.reference
git-svn-id: svn://ultimatepp.org/upp/trunk@10275 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
c8dbd68e1d
commit
29eebcd4e0
11 changed files with 13 additions and 109 deletions
|
|
@ -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
4
reference/Convert/init
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
#ifndef _Convert_icpp_init_stub
|
||||
#define _Convert_icpp_init_stub
|
||||
#include "CtrlLib/init"
|
||||
#endif
|
||||
|
|
@ -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; };
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue