diff --git a/uppsrc/Core/srcdoc.tpp/Decisions$en-us.tpp b/uppsrc/Core/srcdoc.tpp/Decisions$en-us.tpp index b54478526..20eb1fdf9 100644 --- a/uppsrc/Core/srcdoc.tpp/Decisions$en-us.tpp +++ b/uppsrc/Core/srcdoc.tpp/Decisions$en-us.tpp @@ -1,11 +1,65 @@ -TITLE("Design decisions and tradeoffs") -COMPRESSED -120,156,133,86,107,143,219,198,21,253,43,131,172,19,236,218,146,204,121,240,37,161,69,130,221,160,8,26,199,70,92,55,31,132,77,57,34,71,210,212,36,71,153,33,189,86,138,250,183,247,220,33,181,89,212,46,234,133,181,43,106,238,235,60,238,104,43,216,179,103,201,34,185,74,254,207,191,245,157,217,235,177,29,238,183,173,40,138,141,205,19,181,209,60,223,188,46,55,159,62,125,90,149,165,216,80,42,142,84,60,81,146,11,206,85,146,40,145,243,180,76,202,180,224,69,34,115,37,210,60,73,215,39,237,117,119,191,213,133,220,60,255,57,67,148,88,164,87,146,75,158,240,76,40,156,74,100,34,20,23,41,47,10,197,243,180,144,101,150,173,107,125,26,172,235,239,183,59,138,163,98,18,97,73,94,100,138,35,72,165,66,230,169,66,176,82,156,227,111,158,230,89,158,175,7,59,180,230,126,107,169,235,29,207,242,141,86,130,186,190,165,12,106,145,93,161,77,145,35,133,18,42,83,178,16,146,23,66,100,165,84,165,66,255,92,172,237,96,208,237,14,97,20,74,97,41, -10,171,84,113,9,96,84,158,74,28,203,241,91,37,37,23,168,94,36,105,138,194,230,227,5,45,2,138,226,50,148,19,121,74,167,11,85,112,153,23,66,137,76,160,129,36,199,180,84,61,93,55,38,212,136,147,130,111,6,180,180,185,253,54,221,112,4,231,139,252,74,36,101,34,178,188,68,65,52,139,193,101,89,114,89,160,160,226,105,194,229,186,118,13,134,221,137,52,145,177,98,1,62,50,100,142,216,164,25,71,195,66,22,40,153,115,41,241,154,170,34,95,7,67,140,12,206,223,111,159,127,123,157,172,146,149,72,211,27,10,47,17,94,72,37,165,202,74,197,19,137,50,200,161,8,175,44,1,167,60,21,197,122,167,3,106,14,138,192,141,168,114,18,20,8,144,69,42,81,58,195,11,200,197,128,18,216,136,82,21,82,22,201,186,110,117,8,79,0,122,78,67,114,190,224,252,42,39,92,83,41,84,73,224,72,1,128,69,150,150,28,8,167,153,74,196,218,155,223,70,235,77,103,122,64,108,161,145,205,133,158,89,143,104,102,210,163,88,112,1,69,166,89,150,16,94, -41,84,33,100,10,192,19,94,40,116,132,31,80,60,204,146,220,253,49,131,92,112,121,85,10,37,209,73,169,20,16,64,2,94,114,206,147,2,63,152,12,184,68,109,240,89,93,79,133,197,213,130,171,171,28,90,6,83,165,162,242,165,36,252,4,224,23,89,146,130,7,49,133,11,66,93,60,3,238,92,20,244,63,34,207,211,5,135,41,208,34,79,83,204,45,1,181,40,48,123,10,236,101,212,57,207,139,245,79,230,33,220,233,193,204,130,121,126,251,108,82,26,207,22,60,187,74,40,62,45,74,16,200,21,225,39,149,42,69,41,101,42,202,84,102,9,112,12,147,167,41,152,124,21,61,249,152,36,95,240,28,14,195,172,105,138,233,99,24,38,207,57,181,34,138,50,35,20,230,36,213,178,181,61,245,1,101,108,38,49,60,191,125,193,121,78,137,10,24,166,40,178,68,150,0,3,24,36,41,148,142,173,80,128,104,240,44,96,3,90,11,245,123,125,48,213,114,182,236,191,254,241,239,175,191,255,105,249,238,45,219,6,177,97,119,38,216,67,207,26,83,219,128,61,16,152, -238,27,54,120,221,32,194,237,247,225,155,251,109,72,54,22,62,216,236,164,220,188,78,54,236,187,129,13,71,195,58,71,66,89,176,7,195,194,224,93,127,104,207,108,175,63,56,143,183,122,176,53,67,231,239,109,127,96,110,207,222,85,47,170,23,108,110,37,172,216,15,123,214,187,225,72,159,154,54,152,5,179,3,235,244,123,19,230,147,250,116,10,44,152,118,95,45,107,215,15,26,24,52,236,122,112,7,131,202,158,61,216,225,200,194,57,128,103,202,190,106,245,57,246,189,178,93,203,246,182,53,225,38,190,215,109,112,172,27,235,35,26,195,97,207,6,199,90,167,145,138,62,245,99,127,195,108,207,126,180,253,248,145,93,255,115,12,3,171,93,7,209,210,68,218,99,76,219,161,37,234,255,23,231,155,185,44,198,102,127,189,251,158,145,65,241,12,31,84,203,147,119,181,9,193,249,155,21,123,123,68,130,134,237,70,219,54,1,232,32,155,237,78,109,180,21,158,119,24,6,72,161,19,60,245,238,131,153,78,206,181,44,81,177,27,15,64,183,49,171,47,128,127,251,230,29, -59,234,64,241,59,195,140,141,120,180,118,0,183,213,210,244,141,213,61,3,5,59,123,120,124,123,109,62,58,226,67,251,250,8,107,212,195,8,109,49,154,18,28,176,48,158,78,206,163,179,155,5,85,223,183,122,96,82,84,203,29,81,130,38,40,27,158,103,234,201,163,9,8,251,187,113,251,107,219,15,55,236,207,213,159,152,2,65,71,4,219,192,176,70,134,136,97,223,104,223,0,147,219,209,123,140,79,115,155,64,40,208,24,159,247,99,177,68,23,236,187,87,119,153,194,175,159,95,69,18,223,56,96,248,230,246,127,129,65,71,136,53,176,238,99,146,56,16,81,3,136,230,225,216,246,215,193,157,108,93,173,171,151,213,203,91,231,77,245,50,248,186,113,117,245,242,21,40,208,59,160,247,204,244,213,114,12,191,178,203,147,123,12,228,71,195,246,64,64,247,103,118,168,107,118,2,60,120,223,197,178,175,222,254,253,118,146,43,241,220,182,55,95,234,241,23,19,205,213,76,13,193,107,168,206,208,96,176,59,11,222,206,36,175,234,43,55,14,228,183,106,217,153,206,249,115, -245,21,51,31,107,19,175,230,201,146,222,212,104,203,159,163,119,30,77,210,218,90,211,25,118,112,36,212,113,160,108,83,138,232,169,64,202,59,179,147,7,75,33,186,214,120,143,113,32,181,0,39,78,102,55,190,179,61,182,29,124,249,183,35,216,123,36,240,228,245,161,139,86,6,65,174,29,99,165,106,137,58,30,237,157,140,183,166,175,13,157,159,136,127,194,61,60,208,76,22,236,123,119,38,159,99,120,13,190,13,4,239,221,14,94,235,209,3,59,146,61,232,28,130,107,58,59,144,172,189,105,45,24,184,168,101,197,190,131,145,23,208,30,28,122,97,32,76,42,252,96,253,48,234,118,30,26,207,218,22,182,143,39,247,222,152,223,13,12,143,234,59,179,39,220,255,11,102,76,232,64,116,199,26,208,76,236,192,161,125,176,104,241,68,232,132,7,64,140,222,161,95,215,247,16,42,56,180,33,224,44,64,104,166,111,110,179,254,78,103,188,244,216,131,99,141,27,255,15,119,233,182,133,124,35,245,195,209,187,135,167,180,194,85,19,145,215,68,12,52,220,1,94,111,116,192, -175,207,207,79,80,61,232,240,217,16,40,220,88,58,114,51,19,216,218,206,14,147,46,34,30,17,209,14,242,105,162,195,71,50,28,97,140,82,32,253,11,154,125,165,63,218,110,236,88,63,118,59,184,10,154,50,211,254,138,77,147,23,30,119,250,101,61,99,102,172,130,186,29,27,34,251,47,239,126,120,12,89,160,159,247,230,73,46,140,21,243,220,121,119,250,209,6,172,15,244,44,182,21,147,156,221,3,89,206,176,77,182,95,39,201,50,73,24,190,105,168,124,129,47,55,139,76,229,171,251,47,52,75,181,144,32,160,110,107,8,53,131,203,171,33,40,160,201,134,124,65,68,116,6,155,240,236,198,139,202,26,186,24,218,193,226,94,156,35,98,162,120,241,160,135,120,25,140,1,138,161,101,237,250,75,98,34,6,194,143,43,32,158,159,182,79,55,246,228,196,121,51,58,90,202,1,210,212,113,171,123,120,194,64,52,215,88,5,135,145,84,63,16,75,29,238,50,71,130,194,229,132,59,83,239,77,92,51,15,250,252,197,61,50,193,253,56,15,245,246,250,109,181,132,113,73, -175,15,182,193,221,24,29,108,226,21,115,17,18,45,175,97,118,245,19,11,78,231,163,224,253,94,215,38,238,245,150,57,72,173,131,155,40,202,235,147,109,32,243,15,166,117,39,98,114,74,222,210,0,88,43,88,171,186,31,46,101,46,59,32,150,194,8,243,50,136,119,47,78,216,233,238,165,43,254,162,27,143,21,136,139,115,118,243,138,189,238,227,126,138,216,97,125,244,205,130,221,30,117,7,21,33,125,192,23,137,158,132,53,95,250,243,24,128,98,26,191,117,238,125,245,205,222,152,118,129,11,154,18,249,184,151,244,124,53,18,103,181,177,31,104,173,179,198,238,129,117,92,93,52,39,110,73,66,211,207,160,179,251,255,0,255,177,67,114, - +topic "Design decisions and tradeoffs"; +[2 $$0,0#00000000000000000000000000000000:Default] +[l288;i704;a17;O9;~~~.992;2 $$1,0#10431211400427159095818037425705:param] +[a83;*R6 $$2,5#31310162474203024125188417583966:caption] +[b83;*2 $$3,5#07864147445237544204411237157677:title] +[i288;b167;a42;O9;C2 $$4,6#40027414424643823182269349404212:item] +[b42;a42;2 $$5,5#45413000475342174754091244180557:text] +[l288;a17;2 $$6,6#27521748481378242620020725143825:desc] +[l321;t246;C@5;1 $$7,7#20902679421464641399138805415013:code] +[b2503;2 $$8,0#65142375456100023862071332075487:separator] +[*@(0.0.255)2 $$9,0#83433469410354161042741608181528:base] +[t4167;C2 $$10,0#37138531426314131251341829483380:class] +[l288;a17;*1 $$11,11#70004532496200323422659154056402:requirement] +[i417;b42;a42;O9;~~~.416;2 $$12,12#10566046415157235020018451313112:tparam] +[b167;C2 $$13,13#92430459443460461911108080531343:item1] +[i288;a42;O9;C2 $$14,14#77422149456609303542238260500223:item2] +[*@2$(0.128.128)2 $$15,15#34511555403152284025741354420178:NewsDate] +[l321;*C$7;2 $$16,16#03451589433145915344929335295360:result] +[l321;b83;a83;*C$7;2 $$17,17#07531550463529505371228428965313:result`-line] +[l160;t4167;*C+117 $$18,5#88603949442205825958800053222425:package`-title] +[{_}%EN-US +[s2; Design decisions and trade`-offs&] +[s0;i150;b33;O0; At the moment, we strongly favor static linking +of U`+`+ packages. If nothing else, it makes U`+`+ apps self`-contained +(together with system of .lay and .iml files) and also much faster +to load (and run) in Linux (just compare start times of UWord +with some KDE based word`-processor). Shared builds were implemented +mainly to improve build times in debug mode.&] +[s0;i150;b33;O0; CPU has to be either little`-endian or big`-endian +(exotic architectures are not supported), in flat 32`-bit mode +or in 64`-bit mode with sizeof(int) >`= 4 (that is quite standard). +Currently tested CPU architectures are i386, AMD64, ARM and PowerPC.&] +[s0;i150;b33;O0; CPU and compiler are supposed to support [^topic`:`/`/Core`/srcdoc`/Moveable`$en`-us^ M +oveable] (true for any gcc platform and MSVC`+`+ as well).&] +[s0;i150;b33;O0; We decided to ignore possibility of `"out`-of`-memory`" +exceptions and recovery. If U`+`+ application goes out of memory, +it simply prints the error message and terminates. This is quite +pragmatic resolution `- our experience is that it is quite hard +and annoying to achieve robustness here and it cannot be reliably +tested. Also, most platforms with virtual memory will almost +freeze long before out`-of`-memory problem due to intensive page +swapping. Connected issue `- default and copy constructors are +not allowed to throw exceptions in U`+`+ (the common reason to +throw exception here was out`-of`-memory condition). This limitation +will be removed in future releases.&] +[s0;i150;b33;O0;%- [%% Maximum number of elements in any of U`+`+ containers +(including GUI elements, like number of rows in DropList) is +2][%%` 31 ][%% `- 1 `= ]2,147,483,647.&] +[s0;i150;b33;O0; GUI is designed in a way that all user events are +passed and processed the main thread. The synchronization is +done using single global mutex (operated by EnterGuiMutex, LeaveGuiMutex +or GuiLock scoped helper). Other threads can directly work with +GUI as long they do use this global mutex. There are some operations +(like opening/closing windows, message loops) that cannot be +performed by any other thread than main, however U`+`+ workarounds +this by invoking such operations as `"call to main thread`". +In other words, you can do anything in non`-main threads as long +as you do not forget to synchronize using global GUI mutex.&] +[s0;i150;b33;O0; U`+`+ does not use OS`-native widgets. The main +reason for this is to achieve widget interface model optimal +for rapid development. The less important reason is that this +way it is much easier to make U`+`+ cross`-platform. On the other +hand, Chameleon skinning system achieves native look`&feel, so +there is a little perceivable difference for end user.&] +[s0; ] \ No newline at end of file diff --git a/uppsrc/CtrlCore/Ctrl.cpp b/uppsrc/CtrlCore/Ctrl.cpp index d989c7697..83fb8e372 100644 --- a/uppsrc/CtrlCore/Ctrl.cpp +++ b/uppsrc/CtrlCore/Ctrl.cpp @@ -37,26 +37,6 @@ int Ctrl::LoopLevel; bool Ctrl::MemoryCheck; -void Ctrl::EnterMutex() -{ - EnterGuiMutex(); -} - -void Ctrl::LeaveMutex() -{ - LeaveGuiMutex(); -} - -Ctrl::Lock::Lock(Ctrl& ctrl) -{ - EnterGuiMutex(); -} - -Ctrl::Lock::~Lock() -{ - LeaveGuiMutex(); -} - void Ctrl::SetData(const Value&) {} Value Ctrl::GetData() const { return Value(); } diff --git a/uppsrc/CtrlCore/CtrlCore.h b/uppsrc/CtrlCore/CtrlCore.h index 94fcfdbe3..396d8cd94 100644 --- a/uppsrc/CtrlCore/CtrlCore.h +++ b/uppsrc/CtrlCore/CtrlCore.h @@ -795,14 +795,6 @@ protected: Ctrl& Unicode() { unicode = true; return *this; } public: - void EnterMutex(); - void LeaveMutex(); - - struct Lock { - Lock(Ctrl& ctrl); - ~Lock(); - }; - enum StateReason { FOCUS = 10, ACTIVATE = 11,