*/}}

la_templates.c 65 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517
  1. #include "../la_5.h"
  2. extern LA MAIN;
  3. extern struct _tnsMain *T;
  4. extern const char* LA_UDF_EXTENSION_STRINGS[];
  5. int laget_InstanceModified(void* instance);
  6. void laget_TimeString(laTimeInfo *ti, char *result, char** resultdirect);
  7. void laui_DefaultPropDetails(laUiList *uil, laPropPack *This, laPropPack *Extra, laColumn *UNUSED, int context){
  8. laColumn *c;
  9. laUiItem *b;
  10. c = laFirstColumn(uil);
  11. laSafeString* s=0;
  12. if(Extra&&Extra->EndInstance){ //button
  13. laGeneralUiExtraData* ex=Extra->EndInstance;
  14. laUiItem* ui=ex->ui;
  15. if(This&&This->LastPs&&This->EndInstance){
  16. laProp* p=This->LastPs->p; laPropContainer* pc=p->Container; void* inst=This->LastPs->UseInstance;
  17. char FullPath[256]={0}; la_GetPropPackFullPath(This, FullPath);
  18. strSafePrint(&s,"%s", FullPath); if(ui->ExtraInstructions){ strSafePrint(&s,"(%s)", ui->ExtraInstructions->Ptr); }
  19. laShowLabel(uil,c,p->Description,0,0);
  20. laShowLabel(uil,c,s->Ptr,0,0)->Flags|=LA_TEXT_MONO|LA_UI_FLAGS_DISABLED;
  21. }else{
  22. laShowLabel(uil,c,ui->AT->Description,0,0);
  23. strSafePrint(&s,"%s", ui->AT->Identifier); if(ui->ExtraInstructions){ strSafePrint(&s,"(%s)", ui->ExtraInstructions->Ptr); }
  24. laShowLabel(uil,c,s->Ptr,0,0)->Flags|=LA_TEXT_MONO|LA_UI_FLAGS_DISABLED;
  25. }
  26. }else{
  27. if(!This || !This->LastPs){ laShowLabel(uil,c,"Can't access property details.",0,0); return; }
  28. char FullPath[256]={0}; la_GetPropPackFullPath(This, FullPath);
  29. laProp* p=This->LastPs->p; laPropContainer* pc=p->Container; void* inst=This->LastPs->UseInstance;
  30. laShowLabel(uil,c,p->Description,0,0);
  31. if(p->PropertyType==(LA_PROP_ENUM)||(LA_PROP_ARRAY|LA_PROP_ENUM)){
  32. laEnumItem* ei=laGetEnumArrayIndexed(This,This->LastIndex);
  33. if(ei){ strSafeSet(&s,0);strSafePrint(&s,"Current: %s", ei->Description);laShowLabel(uil,c,s->Ptr,0,0)->Flags|=LA_UI_FLAGS_HIGHLIGHT; }
  34. }
  35. laShowLabel(uil,c,FullPath,0,0)->Flags|=LA_TEXT_MONO|LA_UI_FLAGS_DISABLED;
  36. if(inst && !pc->OtherAlloc){
  37. laShowSeparator(uil,c); strSafeSet(&s,0); strSafePrint(&s,"[ %s ]", pc->Name?pc->Name:pc->Identifier, inst);
  38. int Level=0; laMemNodeHyper* m=memGetHead(inst,&Level);
  39. laListHandle* users=memGetUserList(inst);
  40. if(users){ strSafePrint(&s," %d Users", lstCountElements(users)); }
  41. laShowLabel(uil,c,s->Ptr,0,0)->Flags|=LA_TEXT_MONO;
  42. if(Level==2){
  43. strSafeSet(&s,0);strSafePrint(&s, m->NUID.String);
  44. if(laget_InstanceModified(inst)){ strSafePrint(&s, " 🌑 Modified"); }else{ strSafePrint(&s, " Clean"); }
  45. laShowLabel(uil,c,s->Ptr,0,0)->Flags|=LA_TEXT_MONO;
  46. laget_TimeString(&m->TimeCreated, FullPath, 0);
  47. strSafeSet(&s,0); strSafePrint(&s, "Created at %s", FullPath);
  48. laShowLabel(uil,c,s->Ptr,0,0)->Flags|=LA_TEXT_MONO;
  49. }
  50. if(m){
  51. if(Level==2){
  52. laShowSeparator(uil,c);
  53. if(m->FromFile){
  54. //strSafeSet(&s,0); strSafePrint(&s,"File:\n%s", m->FromFile->BaseName);
  55. //laShowLabel(uil,c,s->Ptr,0,0);
  56. char safepath[256]; strEscapePath(safepath, m->FromFile->BaseName->Ptr);
  57. strSafeSet(&s,0); strSafePrint(&s,"la.managed_udfs@basename=%s.__self", safepath);
  58. laShowItemFull(uil,c,0,s->Ptr,0,0,laui_ManagedUDFItem,0)->Flags|=LA_UI_FLAGS_NO_GAP|LA_UI_FLAGS_NO_DECAL;
  59. }else{
  60. laShowLabel(uil,c,"<Not saved yet>",0,0)->Flags|=LA_UI_FLAGS_DISABLED;
  61. }
  62. }
  63. }
  64. }
  65. }
  66. strSafeDestroy(&s);
  67. }
  68. void laui_DefaultNodeOperationsPropUiDefine(laUiList *uil, laPropPack *This, laPropPack *OperatorProps, laColumn *UNUSED, int context){
  69. laColumn *c = laFirstColumn(uil); laColumn* cl,*cr; laSplitColumn(uil,c,0.5); cl=laLeftColumn(c,0);cr=laRightColumn(c,0);
  70. laShowItemFull(uil, c, This, "base.name",LA_WIDGET_STRING_PLAIN,0,0,0);
  71. laShowItemFull(uil, cl, This, "base.move",0,"direction=left;text=Move Left;icon=🡰;",0,0);
  72. laShowItemFull(uil, cr, This, "base.move",0,"text=Move Right;icon=🡲;",0,0);
  73. laShowItemFull(uil, c, This, "base.delete",0,0,0,0);
  74. }
  75. void laui_DefaultPropUiDefine(laUiList *uil, laPropPack *This, laPropPack *OperatorProps, laColumn *UNUSED, int context){
  76. laColumn *c;
  77. laProp *p, *gp;
  78. if (OperatorProps && OperatorProps->LastPs){
  79. c = laFirstColumn(uil); gp = OperatorProps->LastPs->p;
  80. for (p = gp->SubProp->Props.pFirst; p; p = p->Item.pNext){
  81. laShowItem(uil, c, OperatorProps, p->Identifier);
  82. }
  83. }
  84. if (!This || !This->LastPs) return;
  85. c = laFirstColumn(uil); gp = This->LastPs->p;
  86. for (p = gp->SubProp->Props.pFirst; p; p = p->Item.pNext){
  87. //la_ShowGeneralPropItem(uil, c, This, gp, p, 0, 0, 0);
  88. laShowItem(uil, c, This, p->Identifier);
  89. }
  90. }
  91. void laui_StringPropUiDefine(laUiList *uil, laPropPack *This, laPropPack *Extra, laColumn *UNUSED, int context){
  92. laColumn *c;
  93. laProp *p, *gp;
  94. if (!This || !This->LastPs) return;
  95. c = laFirstColumn(uil);
  96. gp = This->LastPs->p;
  97. if(Extra){
  98. laShowItem(uil, c, Extra, "copy_selection");
  99. }else{
  100. laShowItem(uil, c, This, "copy");
  101. }
  102. laShowItem(uil, c, This, "paste");
  103. laShowItem(uil, c, This, "restore");
  104. if(gp->Tag&LA_PROP_IS_FILE){ laShowItem(uil, c, This, "get_file_path"); }
  105. if(gp->Tag&LA_PROP_IS_FOLDER){ laShowItem(uil, c, This, "get_folder_path"); }
  106. }
  107. void laui_IdentifierOnly(laUiList *uil, laPropPack *This, laPropPack *OP_UNUSED, laColumn *Extra, int context){
  108. laColumn *col = Extra, *c, *cl, *cr, *crl, *crr, *cll, *clr, *clrl, *clrr, *clrrl, *clrrr;
  109. laUiItem *ui;
  110. c = laFirstColumn(uil);
  111. laShowItemFull(uil, c, This, "identifier", LA_WIDGET_STRING_PLAIN,0, 0, 0);
  112. }
  113. void laui_SubShow(laPropPack *pp){
  114. if (laGetInt(pp) & LA_PROP_SUB) return 1;
  115. return 0;
  116. }
  117. void laRebuildPathRecursive(laProp *p, char *buf){
  118. if (p->Container){
  119. laRebuildPathRecursive(p->Container, buf);
  120. sprintf(buf, ".%s", p->Identifier);
  121. }else
  122. sprintf(buf, "%s", p->Identifier);
  123. }
  124. void laui_IntPropInfo(laUiList *uil, laPropPack *Base, laPropPack *UNUSED_This, laColumn *ExtraColumns, int context){
  125. laColumn *col, *cl, *cr;
  126. laUiItem *b1,*b2;
  127. laUiList *tuil;
  128. col = laFirstColumn(uil);
  129. laSplitColumn(uil, col, 0.2);
  130. cl = laLeftColumn(col, 1);
  131. cr = laRightColumn(col, 0);
  132. laShowItemFull(uil, cr, Base, "base.identifier", LA_WIDGET_STRING_PLAIN,0, 0, 0);
  133. b1= laOnConditionToggle(uil, cl, 0,0,0,0,0);{
  134. for(laProp* p=MAIN.ContainerInt->Props.pFirst;p;p=p->Item.pNext){
  135. laShowItem(uil,cr,Base,p->Identifier);
  136. }
  137. }laEndCondition(uil,b1);
  138. }
  139. void laui_FloatPropInfo(laUiList *uil, laPropPack *Base, laPropPack *UNUSED_This, laColumn *ExtraColumns, int context){
  140. laColumn *col, *cl, *cr;
  141. laUiItem *b1,*b2;
  142. laUiList *tuil;
  143. col = laFirstColumn(uil);
  144. laSplitColumn(uil, col, 0.2);
  145. cl = laLeftColumn(col, 1);
  146. cr = laRightColumn(col, 0);
  147. laShowItemFull(uil, cr, Base, "base.identifier", LA_WIDGET_STRING_PLAIN,0, 0, 0);
  148. b1= laOnConditionToggle(uil, cl, 0,0,0,0,0);{
  149. for(laProp* p=MAIN.ContainerFloat->Props.pFirst;p;p=p->Item.pNext){
  150. laShowItem(uil,cr,Base,p->Identifier);
  151. }
  152. }laEndCondition(uil,b1);
  153. }
  154. void laui_SubPropInfoDefault(laUiList *uil, laPropPack *Base, laPropPack *OperatorInst, laColumn *ExtraColumns, int context){
  155. laColumn *c, *cl, *cr, *cll, *clr, *crl, *crr, *crrl, *crrr;
  156. laUiItem *bracket, *b1, *b2;
  157. laPropContainer *pc;
  158. laProp *p;
  159. char buf[LA_RAW_CSTR_MAX_LEN]={0};
  160. c = laFirstColumn(uil);
  161. laSplitColumn(uil, c, 0.2);
  162. cl = laLeftColumn(c, 1);
  163. cr = laRightColumn(c, 0);
  164. laSplitColumn(uil, cr, 0.5);
  165. crrl = laLeftColumn(cr, 1*6);
  166. crrr = laRightColumn(cr, 0);
  167. laPropContainer* subc=Base->LastPs->p->SubProp;
  168. if (!((laSubProp*)Base->LastPs->p)->GetType){
  169. if (!subc) subc = la_ContainerLookup(((laSubProp *)Base->LastPs->p)->TargetID);
  170. if (!subc) return; Base->LastPs->p->SubProp=subc;
  171. }else{
  172. subc=((laSubProp*)Base->LastPs->p)->GetType(Base->EndInstance);
  173. }
  174. if (!Base->LastPs->p->UDFIsRefer && !Base->LastPs->p->UDFNoCreate && !Base->LastPs->p->UDFIsSingle){
  175. laShowItem(uil, cr, Base, "identifier")->Flags|=LA_UI_FLAGS_PLAIN;
  176. bracket = laOnConditionToggle(uil, cl, 0, 0, 0, 0, 0);
  177. }
  178. for (p = subc->Props.pFirst; p; p = p->Item.pNext){
  179. if (!(p->PropertyType & LA_PROP_SUB)){
  180. buf[0] = 0;
  181. sprintf(buf, "la.prop_containers#%s.properties#%s.name", p->Container->Identifier, p->Identifier);
  182. laShowItemFull(uil, crrl, 0, buf, LA_WIDGET_STRING_PLAIN,0, 0, 0);
  183. laShowItem(uil, crrr, Base, p->Identifier);
  184. //buf[0] = 0; sprintf(buf, "la.prop_containers#%s.properties#%s.name", p->Container->Identifier, p->Identifier); laShowItemFull(uil, crl, 0, buf, 0, laui_SubPropInfoDefault, 0);
  185. //buf[0] = 0; sprintf(buf, "la.prop_containers#%s.properties#%s.description", p->Container->Identifier, p->Identifier); laShowItemFull(uil, crr, 0, buf, 0, laui_SubPropInfoDefault, 0);
  186. laShowSeparator(uil, c);
  187. }else{
  188. //buf[0] = 0; sprintf(buf, "la.prop_containers#%s.properties#%s.name", p->Container->Identifier, p->Identifier); laShowItemFull(uil, crrl, 0, buf, LA_WIDGET_STRING_PLAIN, 0, 0);
  189. //buf[0] = 0; sprintf(buf, "la.prop_containers#%s.properties#%s.name", p->Container->Identifier, p->Identifier); laShowItemFull(uil, crl, 0, buf, 0, laui_SubPropInfoDefault, 0);
  190. //buf[0] = 0; sprintf(buf, "la.prop_containers#%s.properties#%s.description", p->Container->Identifier, p->Identifier); laShowItemFull(uil, crr, 0, buf, 0, laui_SubPropInfoDefault, 0);
  191. if (p->UDFIsRefer) laShowLabel(uil, crrr, "🠞", 0, 0);
  192. elif (p->UDFNoCreate) laShowLabel(uil, crrr, "n", 0, 0);
  193. else laShowLabel(uil, crrr, "🗇", 0, 0);
  194. buf[0] = 0;
  195. sprintf(buf, "la.prop_containers#%s.icon_id", ((laSubProp *)p)->TargetID);
  196. laShowIcon(uil, cl, 0, buf, 0);
  197. b1 = laOnConditionToggle(uil, crrl, 0, 0, 0, 0, 0);{ b1->Flags|=LA_TEXT_ALIGN_LEFT;
  198. sprintf(buf, "text=...%s;", p->Name);
  199. strSafeSet(&b1->ExtraInstructions, buf);
  200. laUiDefineFunc f=laui_SubPropInfoDefault;
  201. if(!context) f=((laSubProp*)p)->GetType?0:(p->UiDefine?p->UiDefine:(p->SubProp&&p->SubProp->UiDefine?p->SubProp->UiDefine:laui_SubPropInfoDefault));
  202. laShowItemFull(uil, cr, Base, p->Identifier, 0,0, f, context);
  203. }
  204. laEndCondition(uil, b1);
  205. laShowSeparator(uil, c);
  206. }
  207. }
  208. if (!Base->LastPs->p->UDFIsRefer && !Base->LastPs->p->UDFNoCreate && !Base->LastPs->p->UDFIsSingle){
  209. laEndCondition(uil, bracket);
  210. }
  211. //laShowItemFull(uil, crl, Base, "identifier", 0, 0, 0);
  212. //p = Base->LastPs->p->SubProp->Props.pFirst;
  213. }
  214. void laui_SubPropSelection(laUiList *uil, laPropPack *Base, laPropPack *OperatorInst, laColumn *ExtraColumns, int context){
  215. laColumn *c, *cl, *cr, *cll, *clr, *crl, *crr, *crrl, *crrr;
  216. laUiItem *bracket, *b1, *b2;
  217. laPropContainer *pc;
  218. laProp *p;
  219. laPropPack *pp;
  220. char buf[LA_RAW_CSTR_MAX_LEN]={0};
  221. c = laFirstColumn(uil);
  222. laSplitColumn(uil, c, 0.2);
  223. cl = laLeftColumn(c, 1);
  224. cr = laRightColumn(c, 0);
  225. laSplitColumn(uil, cr, 0.8);
  226. crl = laLeftColumn(cr, 0);
  227. crr = laRightColumn(cr, 100);
  228. laSplitColumn(uil, crl, 0.5);
  229. crrl = laLeftColumn(crl, 150);
  230. crrr = laRightColumn(crl, 0);
  231. if (!Base->LastPs->p->SubProp) Base->LastPs->p->SubProp = la_ContainerLookup(((laSubProp *)Base->LastPs->p)->TargetID);
  232. if (!Base->LastPs->p->UDFIsRefer){
  233. laShowItemFull(uil, cr, Base, "identifier", LA_WIDGET_STRING_PLAIN,0, 0, 0);
  234. bracket = laOnConditionToggle(uil, cl, 0, 0, 0, 0, 0);
  235. }
  236. for (p = Base->LastPs->p->SubProp->Props.pFirst; p; p = p->Item.pNext){
  237. if (p->PropertyType == LA_PROP_SUB){
  238. //buf[0] = 0; sprintf(buf, "la.prop_containers#%s.properties#%s.name", p->Container->Identifier, p->Identifier);
  239. //laShowItemFull(uil, crrl, 0, buf, LA_WIDGET_STRING_PLAIN, 0, 0);
  240. buf[0] = 0;
  241. sprintf(buf, "identifier=%s;", p->Identifier);
  242. laShowItemFull(uil, crrr, Base, "put_data_block", 0, buf, 0, 0);
  243. //laShowLabel(uil, crr, "PUT", 0, 0);
  244. b1 = laOnConditionToggle(uil, crrl, 0, 0, 0, 0, 0);{
  245. buf[0] = 0; sprintf(buf, "text=...%s;", p->Name); strSafeSet(&b1->ExtraInstructions, buf);
  246. laShowItemFull(uil, cr, Base, p->Identifier, 0,0, laui_SubPropSelection, 0)->Flags|=LA_TEXT_ALIGN_LEFT;
  247. }
  248. laEndCondition(uil, b1);
  249. laShowSeparator(uil, c);
  250. }
  251. }
  252. if (!Base->LastPs->p->UDFIsRefer){
  253. laEndCondition(uil, bracket);
  254. }
  255. //laShowItemFull(uil, crl, Base, "identifier", 0, 0, 0);
  256. //p = Base->LastPs->p->SubProp->Props.pFirst;
  257. }
  258. void laui_LinkerSelectionProp(laUiList *uil, laPropPack *Base, laPropPack *OperatorInst, laColumn *ExtraColumns, int context){
  259. laColumn *c, *cl, *cr, *cll, *clr, *crl, *crr, *crrl, *crrr;
  260. laUiItem *bracket, *b1, *b2;
  261. laPropContainer *pc;
  262. laProp *p;
  263. laPropPack *pp;
  264. char buf[LA_RAW_CSTR_MAX_LEN]={0};
  265. c = laFirstColumn(uil);
  266. laSplitColumn(uil, c, 0.4);
  267. cl = laLeftColumn(c, 1);
  268. cr = laRightColumn(c, 0);
  269. b1=laBeginRow(uil,cr,0,0);
  270. laShowItemFull(uil, cr, Base, "identifier", LA_WIDGET_STRING_PLAIN,0, 0, 0);
  271. laShowIcon(uil, cr, Base, "pp.last_ps.property.sub_icon_id", 0);
  272. laEndRow(uil,b1);
  273. bracket = laOnConditionToggle(uil, cl, 0, 0, 0, 0, 0);{
  274. laShowItemFull(uil, cr, Base, "instances", 0,0, laui_LinkerSelectionInstance, 0);
  275. }
  276. bracket->State=LA_BT_ACTIVE;
  277. laEndCondition(uil, bracket);
  278. }
  279. void laui_LinkerSelectionInstance(laUiList *uil, laPropPack *Base, laPropPack *OperatorInst, laColumn *ExtraColumns, int context){
  280. laColumn *c, *cl, *cr, *cll, *clr, *crl, *crr, *crrl, *crrr;
  281. laUiItem *bracket, *b1, *b2;
  282. laPropContainer *pc;
  283. laProp *p;
  284. laPropPack *pp;
  285. char buf[LA_RAW_CSTR_MAX_LEN]={0};
  286. c = laFirstColumn(uil);
  287. laSplitColumn(uil, c, 0.4);
  288. cl = laLeftColumn(c, 1);
  289. cr = laRightColumn(c, 0);
  290. laShowItemFull(uil, cr, Base, "identifier", LA_WIDGET_STRING_PLAIN,0, 0, 0);
  291. b1 = laOnConditionToggle(uil, cl, 0, 0, 0, 0, 0);{
  292. laShowItemFull(uil, cr, Base, "children", 0,0, laui_LinkerSelectionProp, 0);
  293. }
  294. laEndCondition(uil, b1);
  295. }
  296. void laui_DefaultPanelTitleBar(laUiList *uil, laPropPack *Base, laPropPack *Extra, laUiDefineFunc header){
  297. laColumn *c, *cl, *cr, *cll, *clr, *crl, *crr, *cb1, *cb2, *cb3;
  298. laUiItem *bracket, *b1, *b2;
  299. c = laFirstColumn(uil);
  300. laSplitColumn(uil, c, 0.3);
  301. cl = laLeftColumn(c, 1);
  302. cr = laRightColumn(c, 0);
  303. b1=laBeginRow(uil,cr,0,0);
  304. laShowItemFull(uil, cr, Base, "title", LA_WIDGET_STRING_PLAIN,0, 0, 0)->Expand=1;
  305. laShowItem(uil, cr, Base, "hide")->Flags|=LA_UI_FLAGS_ICON;
  306. laShowItem(uil, cr, Base, "dock")->Flags|=LA_UI_FLAGS_ICON;
  307. laShowItem(uil, cr, Base, "close")->Flags|=LA_UI_FLAGS_ICON;
  308. laEndRow(uil,b1);
  309. bracket = laOnConditionToggle(uil, cl, 0, 0, 0, 0, 0);{
  310. if(!Extra->LastPs->p->SubProp->Props.pFirst){
  311. laShowLabel(uil, cr, "Panel doesn't have configurable property.", 0, 0);
  312. }else{
  313. if(header){
  314. laShowLabel(uil, cr, "Panel properties:", 0, 0);
  315. header(uil, Base, Extra, cr, 0);
  316. }else{
  317. for(laProp* p = Extra->LastPs->p->SubProp->Props.pFirst;p;p=p->Item.pNext){
  318. laShowItem(uil, cr, Extra, p->Identifier);
  319. }
  320. }
  321. }
  322. //laShowItem(uil, cr, 0,"la.example_int");
  323. laShowSeparator(uil, c);
  324. //laShowLabel(uil, c, "Position:", 0, 0);
  325. //laShowItemFull(uil, c, Base, "position", LA_WIDGET_INT, 0, 0);
  326. //laShowLabel(uil, c, "Size:", 0, 0);
  327. //laShowItemFull(uil, c, Base, "size", LA_WIDGET_INT, 0, 0);
  328. //laShowLabel(uil, c, "Snapping:", 0, 0);
  329. //laShowItem(uil, c, Base, "snap_enable")->Flags=LA_UI_FLAGS_CYCLE|LA_UI_FLAGS_TRANSPOSE;
  330. //laShowItemFull(uil, c, Base, "snap", LA_WIDGET_INT, 0, 0);
  331. }
  332. laEndCondition(uil, bracket);
  333. }
  334. void laui_DefaultOperatorPanelTitleBar(laUiList *uil, laPropPack *Base, laPropPack *OperatorInst, laColumn *ExtraColumns, int context){
  335. laColumn *c, *cl, *cr, *cll, *clr, *crl, *crr;
  336. laUiItem *bracket, *b1, *b2;
  337. c = laFirstColumn(uil);
  338. b1 = laBeginRow(uil,c,0,0);
  339. laShowItemFull(uil, c, Base, "title", LA_WIDGET_STRING_PLAIN,0, 0, 0)->Expand=1;
  340. laShowItem(uil, c, 0, "LA_cancel");//->Flags|=LA_UI_FLAGS_ICON;
  341. laEndRow(uil, b1);
  342. }
  343. void laui_ColumnItem(laUiList *uil, laPropPack *Base, laPropPack *UNUSED_This, laColumn *UNUSED_Colums, int context){
  344. laColumn *c0, *c, *cl, *cr, *cll, *clr, *crl, *crr, *clll, *cllr, *cll2, *clr2;
  345. laUiItem *bracket, *b1, *b2;
  346. c0 = laFirstColumn(uil);
  347. laSplitColumn(uil, c0, 0.8);
  348. cll = laLeftColumn(c0, 80);
  349. c = laRightColumn(c0, 0);
  350. laSplitColumn(uil, c, 0.7);
  351. cl = laLeftColumn(c, 0);
  352. cr = laRightColumn(c, 200);
  353. laSplitColumn(uil, cr, 0.5);
  354. crl = laLeftColumn(cr, 0);
  355. crr = laRightColumn(cr, 70);
  356. laSplitColumn(uil, cll, 0.5);
  357. clll = laLeftColumn(cll, 1);
  358. cllr = laRightColumn(cll, 0);
  359. laSplitColumn(uil, cl, 0.5);
  360. cll2 = laLeftColumn(cl, 0);
  361. clr2 = laRightColumn(cl, 70);
  362. //laShowItem(uil, c, Base, "self");
  363. bracket = laOnConditionThat(uil, crr, laPropExpression(0, "live_editor.current_ui")); // laOnConditionThat(uil, 0, "live_editor", la_LiveEditAllowShow);
  364. laShowItemFull(uil, cll, Base, "select_column", 0, "text=Select;", 0, 0);
  365. laEndCondition(uil, bracket);
  366. bracket = laOnConditionThat(uil, c, laPropExpression(Base, "sub_left"));{ //laOnConditionThat(uil, Base, 0, laui_SnapButtonShow); {
  367. laShowItem(uil, cll2, Base, "split_at");
  368. laShowItemFull(uil, clr2, Base, "merge_column", 0, "text=Merge;", 0, 0);
  369. b1 = laOnConditionThat(uil, c, laPropExpression(Base, "snap_state"));{
  370. laShowItem(uil, crl, Base, "snap_width");
  371. }
  372. laElse(uil, b1);{
  373. laShowLabel(uil, crl, "Align:", 0, 0)->Flags|=LA_TEXT_ALIGN_RIGHT;
  374. }
  375. laEndCondition(uil, b1);
  376. laShowItem(uil, crr, Base, "snap_state");
  377. laShowSeparator(uil, c0);
  378. b1 = laOnConditionToggle(uil, clll, 0, 0, 0, 0, 0);{
  379. laShowItemFull(uil, c, Base, "sub_left", LA_WIDGET_COLLECTION_SINGLE,0, laui_ColumnItem, 0);
  380. }
  381. laElse(uil, b1);{
  382. laShowLabel(uil, cllr, "Left", 0, 0);
  383. }
  384. laEndCondition(uil, b1);
  385. laShowSeparator(uil, c0);
  386. b1 = laOnConditionToggle(uil, clll, 0, 0, 0, 0, 0);{
  387. laShowItemFull(uil, c, Base, "sub_right", LA_WIDGET_COLLECTION_SINGLE,0, laui_ColumnItem, 0);
  388. }
  389. laElse(uil, b1);{
  390. laShowLabel(uil, cllr, "Right", 0, 0);
  391. }
  392. laEndCondition(uil, b1);
  393. }
  394. laElse(uil, bracket);{
  395. laShowItem(uil, c, Base, "split_column");
  396. }
  397. laEndCondition(uil, bracket);
  398. }
  399. void laui_DefaultMenuButtonsFileEntries(laUiList *uil, laPropPack *pp, laPropPack *actinst, laColumn *extracol, int context){
  400. laColumn* c=laFirstColumn(uil);
  401. laShowLabel(uil, c, "Function Test", 0, 0);
  402. laShowItem(uil, c, 0, "LA_pure_yes_no");
  403. laShowItem(uil, c, 0, "LA_file_dialog");
  404. laShowItem(uil, c, 0, "LA_udf_read");
  405. laShowItem(uil, c, 0, "LA_managed_save");
  406. laShowItem(uil, c, 0, "LA_manage_udf");
  407. laShowLabel(uil, c, "Other Entries", 0, 0);
  408. laShowItemFull(uil, c, 0, "LA_panel_activator", 0, "panel_id=LAUI_about;text=About;", 0, 0);
  409. laShowItem(uil, c, 0, "LA_terminate_program");
  410. }
  411. void laui_DefaultMenuButtonsOptionEntries(laUiList *uil, laPropPack *pp, laPropPack *actinst, laColumn *extracol, int context){
  412. laColumn* c=laFirstColumn(uil);
  413. laShowLabel(uil, c, "Settings", 0, 0);
  414. laShowItemFull(uil, c, 0, "LA_panel_activator", 0, "panel_id=LAUI_user_preferences;", 0, 0);
  415. }
  416. void laui_DefaultMenuButtons(laUiList *uil, laPropPack *pp, laPropPack *actinst, laColumn *extracol, int context){
  417. laUiList *muil; laColumn *mc,*c = laFirstColumn(uil);
  418. muil = laMakeMenuPage(uil, c, "File");{
  419. mc = laFirstColumn(muil); laui_DefaultMenuButtonsFileEntries(muil,pp,actinst,extracol,0);
  420. }
  421. muil = laMakeMenuPage(uil, c, "Options"); {
  422. mc = laFirstColumn(muil); laui_DefaultMenuButtonsOptionEntries(muil,pp,actinst,extracol,0);
  423. }
  424. }
  425. void laui_DefaultMenuExtras(laUiList *uil, laPropPack *pp, laPropPack *actinst, laColumn *extracol, int context){
  426. laColumn *c = laFirstColumn(uil);
  427. laShowLabel(uil, c, MAIN.MenuProgramName, 0, 0)->Expand=1;
  428. }
  429. void laui_DefaultMenuBarActual(laUiList *uil, laPropPack *pp, laPropPack *actinst, laColumn *extracol, int context){
  430. laUiList *muil;
  431. laColumn *c,*mc;
  432. laUiItem* bb;
  433. c = laFirstColumn(uil);
  434. laUiItem* row=laBeginRow(uil,c,0,0);
  435. bb=laOnConditionThat(uil,c,laPropExpression(0,"la.windows.operator_hints"));{
  436. laShowItem(uil,c,0,"la.windows.operator_hints");
  437. }laElse(uil,bb);{
  438. laShowItem(uil, c, 0, "LA_new_panel")->Flags=LA_UI_FLAGS_ICON;
  439. if(MAIN.MenuButtons){ MAIN.MenuButtons(uil,0,0,0,0); }
  440. laShowSeparator(uil,c);
  441. laUiItem* mui=laOnConditionThat(uil,c,laPropExpression(0,"la.windows.maximized_ui"));{
  442. laShowItemFull(uil,c,0,"LA_canvas_ui_maximize", 0, "icon=🡰;restore=true;text=Restore Layout", 0, 0);
  443. }laElse(uil,mui);{
  444. laUiItem* ui=laOnConditionThat(uil,c,laPropExpression(0,"la.windows.maximized_block"));{
  445. laShowItemFull(uil,c,0,"LA_block_maximize", 0, "icon=🡰;restore=true;text=Restore Layout", 0, 0);
  446. }laElse(uil,ui);{
  447. laShowItemFull(uil, c, 0, "LA_switch_layout", 0, "icon=🞐;show_list=true;", 0, 0)->Flags|=LA_UI_FLAGS_ICON;
  448. laShowItemFull(uil,c,0,"LA_switch_layout", 0, "icon=🡰;reverse=true;", 0, 0)->Flags|=LA_UI_FLAGS_ICON;
  449. laShowItemFull(uil,c,0,"LA_switch_layout", 0, "icon=🡲;", 0,0)->Flags|=LA_UI_FLAGS_ICON;
  450. laShowItem(uil, c, 0, "la.windows.layouts.identifier");
  451. laShowItem(uil,c,0,"LA_new_window")->Flags|=LA_UI_FLAGS_ICON;
  452. }laEndCondition(uil, ui);
  453. }laEndCondition(uil,mui);
  454. if(MAIN.MenuExtras){ laShowSeparator(uil,c); MAIN.MenuExtras(uil,0,0,0,0); }
  455. laUiItem* b1=laOnConditionThat(uil,c,laPropExpression(0,"la.windows.panels_hidden"));
  456. laShowSeparator(uil,c);
  457. muil = laMakeMenuPage(uil, c, "🡻 Minimized");{
  458. mc = laFirstColumn(muil);
  459. laShowItemFull(muil, mc, 0, "la.windows.panels_hidden", 0,0, laui_IdentifierOnly,0);
  460. }
  461. laEndCondition(uil, b1);
  462. }laEndCondition(uil,bb);
  463. laEndRow(uil,row);
  464. }
  465. void laui_DefaultMenuBar(laWindow *w){
  466. laPanel *p;
  467. p =laCreateTopPanel(w, 0, 0, 0, 0, LA_RH, 0, 0, 0, 0, -1, -1, -1, 0);
  468. p->IsMenuPanel = 1;
  469. laui_DefaultMenuBarActual(&p->TitleBar, &p->PP, &p->PropLinkPP, 0, 0);
  470. }
  471. void laui_ThemeListItem(laUiList *uil, laPropPack *Base, laPropPack *UNUSED_This, laColumn *UNUSED_Colums, int context){
  472. laColumn *col, *cl, *cr;
  473. laUiItem *bracket;
  474. col = laFirstColumn(uil);
  475. bracket = laBeginRow(uil,col,0,0);
  476. laShowItemFull(uil, col, Base, "name", LA_WIDGET_STRING_PLAIN,0, 0, 0)->Expand=1;
  477. laShowItemFull(uil, col, Base, "author", LA_WIDGET_STRING_PLAIN,0, 0, 0);
  478. laEndRow(uil,bracket);
  479. }
  480. void laui_Theme(laUiList *uil, laPropPack *Base, laPropPack *UNUSED_This, laColumn *UNUSED_Colums, int context){
  481. laColumn *col, *cl, *cr, *cll, *clr;
  482. laUiItem *sui;
  483. laUiList *tuil;
  484. laUiItem *ui;
  485. //col = laFirstColumn(uil);
  486. //tuil = laMakeGroup(uil, col, "����ժҪ", 0, 0)->Page; {
  487. // col = laFirstColumn(tuil);
  488. // laSplitColumn(tuil, col, 0.7);
  489. // cl = laLeftColumn(col, 0);
  490. // cr = laRightColumn(col, 0);
  491. // laSplitColumn(tuil, cr, 0.6);
  492. // crl = laLeftColumn(cr, 0);
  493. // crr = laRightColumn(cr, 70);
  494. // laShowItemFull(tuil, cl, 0, "themes.name", 0, 0, 0);
  495. // laShowItemFull(tuil, crl, 0, "themes.author", 0, 0, 0);
  496. // laShowLabel(tuil, crr, 0, "EXEC", 0, 0, 0);
  497. //}
  498. col = laFirstColumn(uil); laSplitColumn(uil,col,0.5);
  499. cl=laLeftColumn(col,0);
  500. cr=laRightColumn(col,0);
  501. ui=laBeginRow(uil,col, 0,0);
  502. laShowItem(uil,col,Base, "name")->Expand=1;
  503. laShowItem(uil,col,Base, "delete");
  504. laEndRow(uil, ui);
  505. laShowLabel(uil, col, "Basics:",0,0);
  506. laShowLabel(uil, cl, "Base Color:",0,0)->Flags|=LA_TEXT_ALIGN_RIGHT; laShowItem(uil, cr, Base, "color");
  507. laShowLabel(uil, cl, "Accent Color:",0,0)->Flags|=LA_TEXT_ALIGN_RIGHT; laShowItem(uil, cr, Base, "accent_color");
  508. laShowItem(uil, cr, Base, "cursor_alpha");
  509. laShowItem(uil, cr, Base, "selection_alpha");
  510. laShowItem(uil, cr, Base, "inactive_mix");
  511. laShowItem(uil, cr, Base, "inactive_saturation");
  512. laShowLabel(uil, col, "Nodes:",0,0);
  513. laShowItem(uil, cr, Base, "wire_brightness");
  514. laShowItem(uil, cr, Base, "wire_saturation");
  515. laShowItem(uil, cr, Base, "wire_transparency");
  516. laShowLabel(uil, col, "Meshes:",0,0);
  517. laShowItem(uil, cl, Base, "edge_transparency");
  518. laShowItem(uil, cl, Base, "edge_brightness");
  519. laShowItem(uil, cr, Base, "vertex_transparency");
  520. laShowItem(uil, cr, Base, "vertex_brightness");
  521. laShowItem(uil, col, Base, "svertex_transparency");
  522. laShowItem(uil, col, Base, "sedge_transparency");
  523. laShowItem(uil, col, Base, "sface_transparency");
  524. laShowLabel(uil, col, "Widgets:",0,0);
  525. laShowItem(uil, col, Base, "boxed_themes");
  526. }
  527. void laui_BoxedThemeItem(laUiList *uil, laPropPack *Base, laPropPack *UNUSED_This, laColumn *UNUSED_Colums, int context){
  528. laColumn *col, *cl, *cr, *crl,*crr;
  529. laUiItem *bracket;
  530. laUiList *tuil;
  531. col = laFirstColumn(uil);
  532. laSplitColumn(uil, col, 0.8);
  533. cl = laLeftColumn(col, 1);
  534. cr = laRightColumn(col, 0);
  535. laSplitColumn(uil, cr, 0.5);
  536. crl = laLeftColumn(cr, 0);
  537. crr = laRightColumn(cr, 0);
  538. laShowItemFull(uil, cr, Base, "name", LA_WIDGET_STRING_PLAIN, 0 ,0,0);
  539. bracket = laOnConditionToggle(uil, cl, 0, 0, 0, 0, 0);{
  540. laShowItem(uil, cr, Base, "normal");
  541. laShowItem(uil, cr, Base, "active");
  542. laShowItem(uil, cr, Base, "border");
  543. laShowItem(uil, cr, Base, "text");
  544. laShowItem(uil, cr, Base, "text_active");
  545. laShowItem(uil, cr, Base, "alpha");
  546. laShowLabel(uil,crl,"Margins:",0,0);
  547. laShowItem(uil, crl, Base, "margins")->Flags=LA_UI_FLAGS_TRANSPOSE;
  548. laShowLabel(uil,crr,"Paddings:",0,0);
  549. laShowItem(uil, crr, Base, "paddings")->Flags=LA_UI_FLAGS_TRANSPOSE;
  550. }
  551. laEndCondition(uil, bracket);
  552. }
  553. void laui_PropertyContainerList(laUiList *uil, laPropPack *Base, laPropPack *UNUSED_This, laColumn *UNUSED_Colums, int context){
  554. laColumn *col, *cl, *cr, *crl, *crr, *cll, *clr, *crrl, *crrr;
  555. laUiItem *bracket;
  556. laUiList *tuil;
  557. col = laFirstColumn(uil);
  558. laSplitColumn(uil, col, 0.5);
  559. cl = laLeftColumn(col, 60);
  560. cr = laRightColumn(col, 0);
  561. laSplitColumn(uil, cr, 0.25);
  562. crl = laLeftColumn(cr, 0);
  563. crr = laRightColumn(cr, 0);
  564. laSplitColumn(uil, crr, 0.3);
  565. crrl = laLeftColumn(crr, 0);
  566. crrr = laRightColumn(crr, 0);
  567. laShowLabel(uil, cl, "Select", 0, 0);
  568. laShowLabel(uil, crl, "Identifier", 0, 0);
  569. laShowLabel(uil, crrl, "Name", 0, 0);
  570. laShowLabel(uil, crrr, "Description", 0, 0);
  571. laShowColumnAdjuster(uil, col);
  572. laShowItem(uil, col, Base, "properties");
  573. }
  574. void laui_WindowListItem(laUiList *uil, laPropPack *Base, laPropPack *UNUSED_This, laColumn *UNUSED_Colums, int context){
  575. laColumn *col, *cl, *cr, *cll, *clr;
  576. laUiItem *bracket;
  577. laUiList *tuil;
  578. cl = laFirstColumn(uil);
  579. laSplitColumn(uil, cl, 0.2);
  580. cll = laLeftColumn(cl, 1);
  581. clr = laRightColumn(cl, 0);
  582. laShowItem(uil, clr, Base, "title");
  583. bracket = laOnConditionToggle(uil, cll, 0, 0, 0, 0, 0);{
  584. laShowLabel(uil, clr, "Layouts", 0, 0);
  585. laShowItem(uil, clr, Base, "layouts");
  586. laShowLabel(uil, clr, "TopPanels", 0, 0);
  587. laShowItem(uil, clr, Base, "panels");
  588. }
  589. laEndCondition(uil, bracket);
  590. }
  591. void laui_LayoutListItem(laUiList *uil, laPropPack *Base, laPropPack *UNUSED_This, laColumn *UNUSED_Colums, int context){
  592. laColumn *col, *cl, *cr, *cll, *clr;
  593. laUiItem *bracket;
  594. laUiList *tuil;
  595. cl = laFirstColumn(uil);
  596. laSplitColumn(uil, cl, 0.2);
  597. cll = laLeftColumn(cl, 1);
  598. clr = laRightColumn(cl, 0);
  599. laShowItem(uil, clr, Base, "title");
  600. bracket = laOnConditionToggle(uil, cll, 0, 0, 0, 0, 0);{
  601. laShowItem(uil, clr, Base, "panels");
  602. }
  603. laEndCondition(uil, bracket);
  604. }
  605. void laui_PanelListItem(laUiList *uil, laPropPack *Base, laPropPack *UNUSED_This, laColumn *UNUSED_Colums, int context){
  606. laColumn *col, *cl, *cr, *cll, *clr;
  607. laUiItem *bracket;
  608. laUiList *tuil;
  609. cl = laFirstColumn(uil);
  610. laSplitColumn(uil, cl, 0.2);
  611. cll = laLeftColumn(cl, 1);
  612. clr = laRightColumn(cl, 0);
  613. laShowItem(uil, clr, Base, "title");
  614. bracket = laOnConditionToggle(uil, cll, 0, 0, 0, 0, 0);{
  615. laShowItemFull(uil, clr, Base, "size", LA_WIDGET_INT,0, 0, 0);
  616. }
  617. laEndCondition(uil, bracket);
  618. }
  619. void laui_UiTemplateListItemLiveEdit(laUiList *uil, laPropPack *Base, laPropPack *UNUSED_This, laColumn *UNUSED_Colums, int context){
  620. laColumn *col, *cl, *cr, *cll, *clr;
  621. laUiItem *bracket;
  622. laUiList *tuil;
  623. cl = laFirstColumn(uil);
  624. //bracket = laOnConditionThat(uil, cl, laNot(laPropExpression(Base, "for_panel"))); {
  625. bracket = laOnConditionThat(uil, cl, laAnd(laNot(laPropExpression(Base, "for_panel")), laOr(laNot(laPropExpression(Base, "target")), laEqual(laPropExpression(0, "live_editor.current_ui.prop_pack.last_ps.property.sub"), laPropExpression(Base, "target")))));{
  626. laShowItemFull(uil, cl, Base, "identifier", LA_WIDGET_STRING_PLAIN,0, 0, 0);
  627. }
  628. laElse(uil, bracket);{
  629. laShowItemFull(uil, cl, Base, "identifier", LA_WIDGET_STRING_PLAIN, "disabled=true;",0, 0);
  630. }
  631. laEndCondition(uil, bracket);
  632. }
  633. void laui_UiTemplateListItem(laUiList *uil, laPropPack *Base, laPropPack *UNUSED_This, laColumn *UNUSED_Colums, int context){
  634. laColumn *col, *cl, *cr, *cll, *clr, *clll, *cllr, *clrl, *clrr, *clrrl, *clrrr;
  635. laUiItem *bracket, *b1;
  636. laUiList *tuil;
  637. cl = laFirstColumn(uil);
  638. laSplitColumn(uil, cl, 0.2);
  639. cll = laLeftColumn(cl, LA_2RH);
  640. clr = laRightColumn(cl, 0);
  641. laSplitColumn(uil, cll, 0.5);
  642. clll = laLeftColumn(cll, 0);
  643. cllr = laRightColumn(cll, 0);
  644. laSplitColumn(uil, clr, 0.5);
  645. clrl = laLeftColumn(clr, 0);
  646. clrr = laRightColumn(clr, 200);
  647. laSplitColumn(uil, clrr, 0.2);
  648. clrrl = laLeftColumn(clrr, 1);
  649. clrrr = laRightColumn(clrr, 0);
  650. bracket = laOnConditionThat(uil, cll, laPropExpression(Base, "define_func"));{
  651. laShowLabel(uil, clll, "f", 0, 0);
  652. }
  653. laEndCondition(uil, bracket);
  654. bracket = laOnConditionThat(uil, cll, laPropExpression(Base, "descriptor"));{
  655. laShowLabel(uil, cllr, "🠞", 0, 0);
  656. }
  657. laEndCondition(uil, bracket);
  658. laShowItemFull(uil, clrl, Base, "identifier", LA_WIDGET_STRING_PLAIN,0, 0, 0);
  659. bracket = laOnConditionThat(uil, cll, laPropExpression(Base, "target_id"));{
  660. laShowIcon(uil, clrrl, Base, "target.icon_id", 0);
  661. laShowItemFull(uil, clrrr, Base, "target_id", LA_WIDGET_STRING_PLAIN,0, 0, 0);
  662. }
  663. laElse(uil, bracket);{
  664. b1 = laOnConditionThat(uil, cll, laPropExpression(Base, "for_panel"));{
  665. //laShowLabel(uil, clrrl, 0,, 0, 0);
  666. laShowLabel(uil, clrrr, "PANEL", 0, 0);
  667. }
  668. laElse(uil, b1);{
  669. laShowLabel(uil, clrrr, "-", 0, LA_WIDGET_STRING_PLAIN);
  670. }
  671. laEndCondition(uil, b1);
  672. }
  673. laEndCondition(uil, bracket);
  674. }
  675. int la_CreateSystemWindow(laWindow *window);
  676. void tnsui_GroupItem(laUiList *uil, laPropPack *Base, laPropPack *UNUSED_This, laColumn *UNUSED_Colums, int context){
  677. laColumn *col, *cl, *cr, *crl, *crr;
  678. laUiItem *b1;
  679. col = laFirstColumn(uil);
  680. laSplitColumn(uil, col, 0.3);
  681. cl = laLeftColumn(col, 1);
  682. cr = laRightColumn(col, 0);
  683. laSplitColumn(uil, cr, 0.5);
  684. crl = laLeftColumn(cr, 0);
  685. crr = laRightColumn(cr, 0);
  686. laShowItem(uil, cr, Base, "name");
  687. b1 = laOnConditionToggle(uil, cl, 0, 0, 0, 0, 0);{
  688. laShowItem(uil, cr, Base, "objects");
  689. }
  690. laEndCondition(uil, b1);
  691. }
  692. void tnsui_ObjectGroupItem(laUiList *uil, laPropPack *Base, laPropPack *UNUSED_This, laColumn *UNUSED_Colums, int context){
  693. laColumn *col, *cl, *cr, *crl, *crr;
  694. laUiItem *b1;
  695. col = laFirstColumn(uil);
  696. laSplitColumn(uil, col, 0.3);
  697. cl = laLeftColumn(col, 1);
  698. cr = laRightColumn(col, 0);
  699. laSplitColumn(uil, cr, 0.5);
  700. crl = laLeftColumn(cr, 0);
  701. crr = laRightColumn(cr, 0);
  702. laShowItem(uil, cr, Base, "group.name");
  703. }
  704. void tnsui_GroupObjectItem(laUiList *uil, laPropPack *Base, laPropPack *UNUSED_This, laColumn *UNUSED_Colums, int context){
  705. laColumn *col, *cl, *cr, *crl, *crr;
  706. laUiItem *b1;
  707. col = laFirstColumn(uil);
  708. laSplitColumn(uil, col, 0.3);
  709. cl = laLeftColumn(col, 1);
  710. cr = laRightColumn(col, 0);
  711. laSplitColumn(uil, cr, 0.5);
  712. crl = laLeftColumn(cr, 0);
  713. crr = laRightColumn(cr, 0);
  714. laShowItem(uil, cr, Base, "object.identifier");
  715. }
  716. void tnsui_MaterialItem(laUiList *uil, laPropPack *Base, laPropPack *UNUSED_This, laColumn *UNUSED_Colums, int context){
  717. laColumn *col, *cl, *cr, *crl, *crr;
  718. laUiItem *b1;
  719. col = laFirstColumn(uil);
  720. laSplitColumn(uil, col, 0.3);
  721. cl = laLeftColumn(col, 1);
  722. cr = laRightColumn(col, 0);
  723. laSplitColumn(uil, cr, 0.5);
  724. crl = laLeftColumn(cr, 0);
  725. crr = laRightColumn(cr, 0);
  726. laShowItem(uil, cr, Base, "object.identifier");
  727. }
  728. void laui_PlainSceneListItem(laUiList *uil, laPropPack *This, laPropPack *OP_UNUSED, laColumn *Extra, int context){
  729. laColumn *col = Extra, *c, *cl, *cr, *crl, *crr, *cll, *clr, *clrl, *clrr, *clrrl, *clrrr;
  730. laUiItem *ui;
  731. //if (Extra)c = Extra;
  732. c = laFirstColumn(uil);
  733. laShowItemFull(uil, c, This, "name", LA_WIDGET_STRING_PLAIN, 0, 0, 0);
  734. }
  735. void laui_DataRestorePage(laUiList *uil, laPropPack *THIS_UNUSED, laPropPack *Operator, laColumn *UNUSED, int context){
  736. laColumn *col = laFirstColumn(uil), *c, *cl, *cr, *crl, *crr, *cll, *clr, *clrl, *clrr, *clrrl, *clrrr;
  737. laUiList *u;
  738. laUiItem *b;
  739. laShowItemFull(uil, col, 0, "la", 0, 0, laui_SubPropSelection, 0);
  740. laShowItemFull(uil, col, 0, "tns", 0, 0, laui_SubPropSelection, 0);
  741. }
  742. void laui_FileBrowserFileItem(laUiList *uil, laPropPack *This, laPropPack *OP_UNUSED, laColumn *Extra, int context){
  743. laColumn *c = Extra, *cl, *cr, *crl, *crr, *cll, *clr, *clrl, *clrr, *clrrl, *clrrr;
  744. laUiItem *ui;
  745. laSplitColumn(0, c, 0.1);
  746. cll = laLeftColumn(c, 1);
  747. clr = laRightColumn(c, 0);
  748. laSplitColumn(0, clr, 0.7);
  749. clrl = laLeftColumn(clr, 0);
  750. clrr = laRightColumn(clr, 0);
  751. laSplitColumn(0, clrr, 0.5);
  752. clrrl = laLeftColumn(clrr, 0);
  753. clrrr = laRightColumn(clrr, 0);
  754. laShowItemFull(uil, cll, This, "type", LA_WIDGET_ENUM_ICON_PLAIN, 0, 0, 0)->Flags|=LA_TEXT_ALIGN_RIGHT;
  755. //laShowItem(uil, cll, This, "is_folder");
  756. laShowItemFull(uil, clrl, This, "name", LA_WIDGET_STRING_PLAIN, 0, 0, 0);
  757. ui = laOnConditionThat(uil, clrr, laNot(laPropExpression(This, "is_folder")));{
  758. laShowItemFull(uil, clrrl, This, "time_modified.time_string", LA_WIDGET_STRING_PLAIN, 0, 0, 0);
  759. laShowItem(uil, clrrr, This, "size")->Flags|=LA_UI_FLAGS_NO_DECAL;
  760. }
  761. laEndCondition(uil, ui);
  762. //laShowSeparator(uil,cll)
  763. //laShowItemFull(uil, clrrl, This, "time_modified.time_string", LA_WIDGET_STRING_PLAIN, 0, 0);
  764. //laShowItem(uil, clrrr, This, "size");
  765. }
  766. void laui_FileBrowserDiskItem(laUiList *uil, laPropPack *This, laPropPack *OP_UNUSED, laColumn *Extra, int context){
  767. laColumn *col = Extra, *c, *cl, *cr, *crl, *crr;
  768. laUiItem *ui;
  769. c = Extra;
  770. laSplitColumn(0, c, 0.2);
  771. cl = laLeftColumn(c, LA_2RH);
  772. cr = laRightColumn(c, 0);
  773. laSplitColumn(0, cr, 0.5);
  774. crl = laLeftColumn(cr, 0);
  775. crr = laRightColumn(cr, 0);
  776. //laShowColumnAdjuster(uil, c);
  777. laShowItemFull(uil, cl, This, "id", LA_WIDGET_STRING_PLAIN, 0, 0, 0);
  778. laShowItem(uil, crl, This, "total_gb");
  779. laShowItem(uil, crr, This, "free_gb");
  780. }
  781. void laui_FileBrowserFileList(laUiList *uil, laPropPack *THIS_UNUSED, laPropPack *Operator, laColumn *UNUSED, int context){
  782. laColumn *col = laFirstColumn(uil), *c, *cl, *cr, *crl, *crr, *cll, *clr, *clrl, *clrr, *clrrl, *clrrr;
  783. laUiList *u;
  784. laUiItem *b;
  785. laSplitColumn(uil, col, 0.25);
  786. cl = laLeftColumn(col, 10);
  787. cr = laRightColumn(col, 0);
  788. laShowItemFull(uil, cl, Operator, "folder_up", LA_WIDGET_BUTTON_NO_CONFIRM, 0 ,0,0);
  789. laShowItem(uil, cr, Operator, "path")->Expand=1;
  790. laUiItem* r=laBeginRow(uil,cr,0,0);
  791. laShowItem(uil, cr, Operator, "file_name")->Expand=1;
  792. laShowItem(uil, cr, Operator, "confirm")->Flags|=LA_UI_FLAGS_HIGHLIGHT|LA_UI_FLAGS_NO_CONFIRM;
  793. laEndRow(uil,r);
  794. laShowSeparator(uil,col);
  795. u = laMakeGroup(uil, cl, "Logic Drives", 0)->Page;
  796. c = laFirstColumn(u);
  797. laSplitColumn(u, c, 0.2);
  798. cll = laLeftColumn(c, LA_2RH);
  799. clr = laRightColumn(c, 0);
  800. laSplitColumn(u, clr, 0.5);
  801. clrl = laLeftColumn(clr, 0);
  802. clrr = laRightColumn(clr, 0);
  803. laShowColumnAdjuster(u, c);
  804. laShowItem(u, c, Operator, "disk_list");
  805. b = laMakeGroup(uil, cr, "File List", 0);b->State=LA_UI_ACTIVE; u=b->Page;
  806. u->HeightCoeff = -3;
  807. c = laFirstColumn(u);
  808. laShowColumnAdjuster(u, c);
  809. laSplitColumn(u, c, 0.1);
  810. cll = laLeftColumn(c, 1);
  811. clr = laRightColumn(c, 0);
  812. laSplitColumn(u, clr, 0.7);
  813. clrl = laLeftColumn(clr, 0);
  814. clrr = laRightColumn(clr, 0);
  815. laSplitColumn(u, clrr, 0.5);
  816. clrrl = laLeftColumn(clrr, 0);
  817. clrrr = laRightColumn(clrr, 0);
  818. laShowLabel(u, clrl, "File Name", 0, 0);
  819. laShowLabel(u, clrrl, "Last Modified On", 0, 0);
  820. laShowLabel(u, clrrr, "File Size", 0, 0);
  821. laShowItem(u, c, Operator, "file_list")->Flags|=LA_UI_FLAGS_NO_DECAL;
  822. }
  823. void laui_LinkerPanel(laUiList *uil, laPropPack *Base, laPropPack *OperatorInst, laColumn *ExtraColumns, int context){
  824. laColumn *c, *cl, *cr, *cll, *clr, *crl, *crr, *crrl, *crrr, *gc;
  825. laUiList *gu;
  826. laUiItem *bracket, *b1, *b2;
  827. laPropContainer *pc;
  828. laProp *p;
  829. laPropPack *pp;
  830. char buf[LA_RAW_CSTR_MAX_LEN]={0};
  831. c = laFirstColumn(uil);
  832. laSplitColumn(uil, c, 0.2);
  833. cl = laLeftColumn(c, 100);
  834. cr = laRightColumn(c, 0);
  835. laSplitColumn(uil, cr, 0.2);
  836. crl = laLeftColumn(cr, 1);
  837. crr = laRightColumn(cr, 0);
  838. gu = laMakeGroup(uil, c, " UDF File Content", 0)->Page;{
  839. gc = laFirstColumn(gu);
  840. laShowItem(gu, gc, OperatorInst, "root_nodes");
  841. }
  842. }
  843. void laui_ManagedUDFItem(laUiList *uil, laPropPack *Base, laPropPack *OperatorInst, laColumn *ExtraColumns, int context){
  844. laColumn *c=laFirstColumn(uil);
  845. laSplitColumn(uil,c,0.5);
  846. laColumn *cl=laLeftColumn(c, 1);
  847. laColumn *cr=laRightColumn(c,0);
  848. laUiItem* b2=laOnConditionThat(uil,cr,laPropExpression(Base,"udf"));{
  849. laUiItem* r=laBeginRow(uil,c,0,0);
  850. laUiItem* b=laOnConditionToggle(uil,c,0,0,0,0,0);strSafeSet(&b->ExtraInstructions,"text=🛈;");b->Flags|=LA_UI_FLAGS_PLAIN;{
  851. laShowItemFull(uil,c,Base,"udf.path",LA_WIDGET_STRING_PLAIN, 0 ,0,0);
  852. }laElse(uil,b);{
  853. laShowItemFull(uil,c,Base,"basename",LA_WIDGET_STRING_PLAIN, 0 ,0,0);
  854. }laEndCondition(uil,b);
  855. laEndRow(uil, r);
  856. }laElse(uil,b2);{
  857. laShowItemFull(uil,c,Base,"basename",LA_WIDGET_STRING_PLAIN, 0 ,0,0);
  858. }laEndCondition(uil,b2);
  859. }
  860. void laui_ManagedUDFOps(laUiList *uil, laPropPack *Base, laPropPack *OperatorInst, laColumn *ExtraColumns, int context){
  861. laColumn *c=laFirstColumn(uil);
  862. laSplitColumn(uil,c,0.3);
  863. laColumn *cl=laLeftColumn(c, 1);
  864. laColumn *cr=laRightColumn(c,0);
  865. laUiItem* b1=laOnConditionThat(uil, cr, laPropExpression(Base, "udf"));{
  866. laShowItem(uil,cl,Base,"udf.modified");
  867. laUiItem* b=laBeginRow(uil,cr,0,0);
  868. laUiItem* b2=laOnConditionToggle(uil,cr,0,0,0,0,0);strSafeSet(&b2->ExtraInstructions,"text=🛈;");b2->Flags|=LA_UI_FLAGS_PLAIN;{
  869. laUiItem* ui=laShowItemFull(uil,cr,Base,"udf.path",LA_WIDGET_STRING_PLAIN, 0 ,0,0);ui->Expand=1;strSafeSet(&ui->ExtraInstructions,"text=Change");
  870. laShowItem(uil,cr,&ui->PP,"get_file_path");
  871. }laElse(uil,b2);{
  872. laShowItemFull(uil,cr,Base,"basename", LA_WIDGET_STRING_PLAIN, 0 ,0,0)->Expand=1;
  873. }laEndCondition(uil,b2);
  874. laEndRow(uil, b);
  875. }laElse(uil,b1);{
  876. laShowItemFull(uil,cr,0,"LA_managed_save_new_file",0,"feedback=NONE;",0,0);
  877. }laEndCondition(uil,b1);
  878. }
  879. void laui_ManagedPropInstance(laUiList *uil, laPropPack *Base, laPropPack *OperatorInst, laColumn *ExtraColumns, int context){
  880. if(!Base ||! Base->EndInstance ||Base->LastPs->p->PropertyType!=LA_PROP_SUB) return;
  881. laColumn *c=laFirstColumn(uil);
  882. laSplitColumn(uil,c,0.3); laColumn *cl=laLeftColumn(c, 1); laColumn *cr=laRightColumn(c,0);
  883. laSplitColumn(uil,cr,0.6); laColumn *crl=laLeftColumn(cr, 30); laColumn *crr=laRightColumn(cr,0);
  884. laPropContainer* pc=la_EnsureSubTarget(Base->LastPs->p, Base->EndInstance);
  885. if(pc->UDFPropagate){
  886. char buf[128]; sprintf(buf,"Assign all \"%s\" into:",pc->Name);
  887. laShowLabel(uil,crl,buf,0,0)->Flags|=LA_TEXT_ALIGN_RIGHT;
  888. laShowItem(uil,crr,Base,"__single_udf_propagate");
  889. }
  890. if(pc->OtherAlloc || Base->LastPs->p->UDFIsSingle){
  891. //laShowLabel(uil,cr,"(Item not allocated by memAcquire)",0,0)->Expand=1;
  892. }else{
  893. if(pc->Hyper==2){
  894. laShowItem(uil,cl,Base,"__modified"); laSplitColumn(uil,crl,0.4); laColumn *crll=laLeftColumn(crl, 0); laColumn *crlr=laRightColumn(crl,10);
  895. laUiItem* idui=laShowItem(uil,crll,Base,"identifier");idui->Flags|=LA_UI_FLAGS_PLAIN;idui->Expand=1;
  896. laShowItem(uil,crlr,Base,"__uid")->Flags|=LA_UI_FLAGS_NO_DECAL;
  897. if(pc->UDFPropagate){
  898. laColumn *crrl,*crrr,*udfc,*optionc; laSplitColumn(uil,crr,0.7); crrl=laLeftColumn(crr,0); crrr=laRightColumn(crr,1);
  899. laSplitColumn(uil,crrl,0.3); udfc=laLeftColumn(crrl,0); optionc=laRightColumn(crrl,8);
  900. laUiItem* uc=laOnConditionToggle(uil,crrr,0,0,0,0,0);{ strSafeSet(&uc->ExtraInstructions,"text=⮯;");
  901. laShowItem(uil,udfc,Base,"__file");
  902. laUiItem* sr=laBeginRow(uil,optionc,1,0);
  903. laShowItemFull(uil,optionc,Base,"__udf_propagate",0,"force=true;text=Force;",0,0)->Flags|=LA_TEXT_ALIGN_CENTER;
  904. laShowItemFull(uil,optionc,Base,"__udf_propagate",0,0,0,0)->Flags|=LA_TEXT_ALIGN_CENTER;
  905. laEndRow(uil,sr);
  906. }laElse(uil,uc);{
  907. laShowItem(uil,crrl,Base,"__file");
  908. }laEndCondition(uil,uc);
  909. }else{
  910. laShowItem(uil,crr,Base,"__file");
  911. }
  912. }else{
  913. //laShowItem(uil,crl,Base,"identifier")->Flags|=LA_UI_FLAGS_PLAIN;
  914. }
  915. }
  916. for(laProp*p=pc->Props.pFirst;p;p=p->Item.pNext){
  917. if(p->PropertyType!=LA_PROP_SUB || p->UDFIsRefer) continue;
  918. la_EnsureSubTarget(p,0);
  919. if(p->SubProp &&p->SubProp->Hyper!=2 &&(!p->UDFIsSingle)) continue;
  920. if(p->UDFNoCreate) continue;
  921. if(p==pc->SaverDummy){
  922. laShowItem(uil,cl,Base,"__single_saver_dummy.__modified");
  923. laShowItem(uil,crl,Base,"identifier")->Flags|=LA_UI_FLAGS_PLAIN;
  924. laShowItem(uil,crr,Base,"__single_saver_dummy.__file");
  925. continue;
  926. }
  927. char buf[128]; sprintf(buf,"🞄 %s",p->Identifier);
  928. laUiItem* b=laOnConditionToggle(uil,c,0,0,0,0,0);{ strSafePrint(&b->ExtraInstructions,"text=🞄 %s;",p->Identifier);
  929. b->Flags|=LA_UI_FLAGS_NO_DECAL|LA_TEXT_ALIGN_LEFT; b->State=LA_BT_ACTIVE;
  930. laShowItemFull(uil,cr,Base,p->Identifier,0, 0,laui_ManagedPropInstance,0)->Flags|=LA_UI_FLAGS_NO_DECAL|LA_UI_COLLECTION_NO_HIGHLIGHT;
  931. }laEndCondition(uil,b);
  932. }
  933. laShowSeparator(uil,c);
  934. }
  935. void laui_ManagedProp(laUiList *uil, laPropPack *Base, laPropPack *OperatorInst, laColumn *ExtraColumns, int context){
  936. laColumn *c=laFirstColumn(uil);
  937. laPropPack PP={0}; if(!Base ||! Base->EndInstance) return;
  938. laManagedSaveProp* msp=Base->EndInstance;
  939. laShowLabel(uil,c,msp->Path->Ptr,0,0);
  940. laShowItemFull(uil,c,0,msp->Path->Ptr,0, 0,laui_ManagedPropInstance,0)->Flags|=LA_UI_FLAGS_NO_DECAL|LA_UI_COLLECTION_NO_HIGHLIGHT;
  941. }
  942. void laui_ManagedSavePanel(laUiList *uil, laPropPack *Base, laPropPack *Operator, laColumn *ExtraColumns, int context){
  943. laManagedSaveExtra*mse=Operator->EndInstance;
  944. laColumn *c=laFirstColumn(uil);
  945. if(mse->OnExit){
  946. laShowLabel(uil,c,"You still have unsaved/unassigned datablocks:",0,0)->Flags|=LA_TEXT_ALIGN_CENTER|LA_TEXT_LINE_WRAP;
  947. laShowSeparator(uil,c);
  948. }
  949. laUiItem* r=laBeginRow(uil,c,0,0);
  950. laShowLabel(uil,c,"Viewing",0,0);
  951. laShowItem(uil,c,Operator,"show_page")->Flags|=LA_UI_FLAGS_EXPAND;
  952. laEndRow(uil,r);
  953. laUiItem* g=laMakeEmptyGroup(uil,c,"List",0);{ g->State=LA_UI_ACTIVE;
  954. laUiList* gu=g->Page; gu->HeightCoeff=mse->OnExit?-4:-3; laColumn* gc=laFirstColumn(gu);
  955. laUiItem* b=laOnConditionThat(gu,gc,laEqual(laPropExpression(Operator, "show_page"),laIntExpression(0)));{
  956. laShowItemFull(gu,gc,0,"la.managed_props",0, 0,laui_ManagedProp,0)->Flags|=LA_UI_FLAGS_NO_DECAL|LA_UI_COLLECTION_NO_HIGHLIGHT;
  957. }laElse(gu,b);{
  958. laShowItemFull(gu,gc,0,"la.managed_udfs",0,0,0,0)->Flags|=LA_UI_FLAGS_NO_DECAL;
  959. }laEndCondition(gu,b);
  960. }
  961. if(mse->OnExit){
  962. laShowLabel(uil,c,"If you exit the program now, you will lose those changes.",0,0)->Flags|=LA_TEXT_ALIGN_CENTER|LA_TEXT_LINE_WRAP;
  963. }
  964. r=laBeginRow(uil,c,0,0);
  965. if(mse->OnExit){
  966. laShowItemFull(uil,c,0,"LA_cancel",0,"text=Discard And Quit;feedback=DISCARD_AND_QUIT",0,0);
  967. }
  968. laShowSeparator(uil,c)->Expand=1;
  969. laShowItemFull(uil,c,0,"LA_managed_save",0,"quiet=true;ignore_unassigned=true;text=Save All Modified;feedback=SAVE_MODIFIED",0,0);
  970. laEndRow(uil,r);
  971. }
  972. void laui_ResourceFolderItem(laUiList *uil, laPropPack *Base, laPropPack *OperatorInst, laColumn *ExtraColumns, int context){
  973. laColumn *c;
  974. c = laFirstColumn(uil);
  975. laUiItem* b=laBeginRow(uil,c,0,0);
  976. laShowItem(uil, c, Base, "remove")->Flags|=LA_UI_FLAGS_ICON;
  977. laUiItem* ui=laShowItem(uil, c, Base, "path");
  978. ui->Expand=1;
  979. laShowItem(uil,c,&ui->PP,"get_folder_path")->Flags|=LA_UI_FLAGS_ICON;
  980. laEndRow(uil,b);
  981. }
  982. void laui_LogItem(laUiList *uil, laPropPack *Base, laPropPack *OperatorInst, laColumn *ExtraColumns, int context){
  983. laShowItem(uil, ExtraColumns, Base, "content")->Flags|=LA_TEXT_LINE_WRAP|LA_TEXT_USE_NEWLINE|LA_TEXT_MONO;
  984. }
  985. void laui_NodeRack(laUiList *uil, laPropPack *This, laPropPack *Extra, laColumn *UNUSED, int context){
  986. laNodeRack* r=This->EndInstance;
  987. laColumn* c=laFirstColumn(uil),*cl, *cr;
  988. laShowLabel(uil,c,"\n",0,0);
  989. laUiItem* b=laBeginRow(uil,c,0,0);
  990. laShowItemFull(uil,c,This,"move",0,"icon=🡰;direction=left;",0,0)->Flags|=LA_UI_FLAGS_ICON;
  991. laUiItem* u=laShowItem(uil,c,This,"name"); u->Flags|=LA_UI_FLAGS_NO_DECAL|LA_TEXT_ALIGN_CENTER; u->Expand=1;
  992. laShowItemFull(uil,c,This,"move",0,"icon=🡲;direction=right;",0,0)->Flags|=LA_UI_FLAGS_ICON;
  993. laEndRow(uil,b);
  994. laShowLabel(uil,c,"\n",0,0);
  995. laShowItem(uil,c,This,"nodes")->Flags|=LA_UI_FLAGS_NO_DECAL;
  996. laShowLabel(uil,c,"\n",0,0);
  997. b=laBeginRow(uil,c,0,0);
  998. laShowItemFull(uil,c,This,"add_node",0,(context==LA_RACK_TYPE_DRIVER)?"target=DRIVER;":"target=INPUT;",0,0)->Expand=1;
  999. laShowItem(uil,c,This,"delete")->Flags|=LA_UI_FLAGS_ICON;
  1000. laShowItem(uil,c,This,"insert_rack");
  1001. laEndRow(uil,b);
  1002. laShowLabel(uil,c,"\n\n\n",0,0);
  1003. }
  1004. void laui_RackPage(laUiList *uil, laPropPack *This, laPropPack *Extra, laColumn *UNUSED, int context){
  1005. laColumn* c=laFirstColumn(uil);
  1006. laUiItem* g=laMakeGroup(uil,c,"Racks",0);{ g->Flags|=/*LA_UI_FLAGS_NO_GAP|LA_UI_FLAGS_NO_DECAL|*/LA_UI_FLAGS_NODE_CONTAINER;
  1007. laUiList* gu=g->Page; laColumn* gc=laFirstColumn(gu); gu->AllowScale=1; gu->HeightCoeff=-3; g->State=LA_UI_ACTIVE;
  1008. laUiItem* hui=laShowItemFull(gu,gc,This,"racks",0,0,laui_NodeRack,context); hui->Expand=15; hui->Flags|=LA_UI_FLAGS_NO_DECAL;
  1009. }
  1010. laShowItemFull(uil,c,This,"add_rack",0,(context==LA_RACK_TYPE_DRIVER)?"type=DRIVER;":0,0,0);
  1011. }
  1012. void laui_NodeCategory(laUiList *uil, laPropPack *This, laPropPack *Extra, laColumn *UNUSED, int context){
  1013. laColumn* c=laFirstColumn(uil); laNodeCategory* nc=This->EndInstance;
  1014. if(nc->Ui){ nc->Ui(uil,This,Extra,0,context); return; }
  1015. char buf[256];
  1016. for(laListItemPointer* lip=nc->NodeTypes.pFirst;lip;lip=lip->pNext){
  1017. laBaseNodeType* nt=lip->p; sprintf(buf,"feedback=%s;text=%s;icon=%lc;",nt->TypeName,nt->Name,nt->Icon?nt->Icon:' ');
  1018. laShowItemFull(uil,c,0,"LA_confirm",0,buf,0,0);
  1019. }
  1020. }
  1021. void laui_UserPreference(laUiList *uil, laPropPack *Base, laPropPack *OperatorInst, laColumn *ExtraColumns, int context){
  1022. laColumn* c = laFirstColumn(uil),*cl,*cr; laSplitColumn(uil,c,0.5);cl=laLeftColumn(c,0);cr=laRightColumn(c,0);
  1023. laUiList *muil;
  1024. laColumn *mc, *mcl, *mcr, *mcll, *mclr;
  1025. laUiItem *b, *bracket;
  1026. //_LA_PANEL_USER_PREFERENCE = p;
  1027. //la_UDFAppendSharedTypePointer("_LA_PANEL_USER_PREFERENCE", _LA_PANEL_USER_PREFERENCE);
  1028. //p->Show = 0;
  1029. //p->FastUpdate = 1;
  1030. laShowItem(uil,cr,0,"LA_save_user_preferences");
  1031. bracket = laMakeTab(uil, c, 0);{
  1032. muil = laAddTabPage(bracket, "Display");{
  1033. //muil->HeightCoeff = -1;
  1034. mc = laFirstColumn(muil);
  1035. laSplitColumn(muil, mc, 0.5);
  1036. mcl = laLeftColumn(mc, 0);
  1037. mcr = laRightColumn(mc, 0);
  1038. laShowLabel(muil, mc, "Interface:", 0, 0);
  1039. laShowLabel(muil, mcl, "Row Height:", 0, 0);
  1040. laShowItem(muil, mcr, 0, "la.user_preferences.interface_size");
  1041. laShowLabel(muil, mcl, "Font Size:", 0, 0);
  1042. laShowItem(muil, mcr, 0, "la.user_preferences.font_size");
  1043. laShowLabel(muil, mcl, "Margin Size:", 0, 0);
  1044. laShowItem(muil, mcr, 0, "la.user_preferences.margin_size");
  1045. laShowLabel(muil, mcl, "Panel Multisample:", 0, 0);
  1046. laShowItem(muil, mcr, 0, "la.user_preferences.panel_multisample")->Flags|=LA_UI_FLAGS_EXPAND;
  1047. laShowItem(muil, mc, 0, "la.user_preferences.top_framerate");
  1048. laShowSeparator(muil, mc);
  1049. laShowLabel(muil, mc, "Nodes:", 0, 0);
  1050. laShowItem(muil, mcr, 0, "la.user_preferences.wire_color_slices");
  1051. laShowItem(muil, mcr, 0, "la.user_preferences.wire_thickness");
  1052. laShowItem(muil, mcr, 0, "la.user_preferences.wire_saggyness");
  1053. laShowSeparator(muil, mc);
  1054. laShowLabel(muil, mc, "Floating Panel:", 0, 0);
  1055. laShowItem(muil, mcl, 0, "la.user_preferences.floating_alpha");
  1056. laShowItem(muil, mcr, 0, "la.user_preferences.solid_shadow_length");
  1057. laShowSeparator(muil, mc);
  1058. laShowLabel(muil, mc, "Translation:", 0, 0);
  1059. laShowLabel(muil, mcl, "Enable Translation:", 0, 0);
  1060. laShowItem(muil, mcr, 0, "la.user_preferences.enable_translation");
  1061. b = laOnConditionThat(muil, mcl, laPropExpression(0, "la.user_preferences.enable_translation"));{
  1062. laShowLabel(muil, mcl, "Language:", 0, 0);
  1063. laShowItemFull(muil, mcr, 0, "la.user_preferences.languages", LA_WIDGET_COLLECTION_SELECTOR, 0, 0, 0);
  1064. laShowItem(muil, mcl, 0, "LA_translation_dump");
  1065. }
  1066. laEndCondition(muil, b);
  1067. }
  1068. muil = laAddTabPage(bracket, "Input");{
  1069. //muil->HeightCoeff = -1;
  1070. mc = laFirstColumn(muil);
  1071. laSplitColumn(muil, mc, 0.5);
  1072. mcl = laLeftColumn(mc, 0);
  1073. mcr = laRightColumn(mc, 0);
  1074. laShowLabel(muil, mc, "User Interactions:", 0, 0);
  1075. laShowItem(muil, mc, 0, "la.user_preferences.scroll_speed");
  1076. laShowItem(muil, mcl, 0, "la.user_preferences.animation_speed");
  1077. laShowItem(muil, mcr, 0, "la.user_preferences.panel_animation_speed");
  1078. laShowItem(muil, mc, 0, "la.user_preferences.valuator_threshold");
  1079. laShowItem(muil, mc, 0, "la.user_preferences.zoom_speed_2d");
  1080. laShowItem(muil, mcl, 0, "la.user_preferences.tooltip_close_distance");
  1081. laShowItem(muil, mcr, 0, "la.user_preferences.idle_time");
  1082. }
  1083. muil = laAddTabPage(bracket, "Resource");{
  1084. //muil->HeightCoeff = -1;
  1085. mc = laFirstColumn(muil);
  1086. laSplitColumn(muil, mc, 0.5);
  1087. mcl = laLeftColumn(mc, 0);
  1088. mcr = laRightColumn(mc, 0);
  1089. laShowLabel(muil, mcl, "UDF Manager Default View:", 0, 0);
  1090. laShowItem(muil, mcr, 0, "la.user_preferences.manager_default_view")->Flags|=LA_UI_FLAGS_EXPAND;
  1091. laShowSeparator(muil,mc);
  1092. b=laBeginRow(muil,mc,0,0);
  1093. laShowLabel(muil, mc, "Resource Folders", 0, 0)->Expand=1;
  1094. laShowItem(muil, mc, 0, "LA_add_resource_folder");
  1095. laEndRow(muil,b);
  1096. laShowItem(muil, mc, 0, "la.user_preferences.resource_folders");
  1097. }
  1098. muil = laAddTabPage(bracket, "Theme");{
  1099. //muil->HeightCoeff = -1;
  1100. mc = laFirstColumn(muil);
  1101. laShowLabel(muil, mc, "Active Theme", 0, 0);
  1102. laShowItemFull(muil, mc, 0, "la.themes", LA_WIDGET_COLLECTION_SELECTOR, 0,laui_ThemeListItem,0);
  1103. laShowItemFull(muil, mc, 0, "la.themes", LA_WIDGET_COLLECTION_SINGLE, 0 ,0,0);
  1104. }
  1105. }
  1106. }
  1107. void laui_About(laUiList *uil, laPropPack *Base, laPropPack *OperatorInst, laColumn *ExtraColumns, int context){
  1108. laColumn *c, *cl, *cr, *tc, *gc, *gcl, *gcr, *tcl, *tcr;
  1109. laUiItem *bracket, *t, *g;
  1110. laPanel *p;
  1111. laUiList *u, *gu;
  1112. laPropContainer *pc;
  1113. int h;
  1114. laOperatorType *at;
  1115. laUiList *first;
  1116. char buf[2048]={0};
  1117. c = laFirstColumn(uil);
  1118. laShowLabel(uil, c, "LaGUI", 0, 0);
  1119. laShowLabel(uil, c, "A graphical user interface application toolkit", 0, 0)->Flags|=LA_TEXT_LINE_WRAP;
  1120. laShowLabel(uil, c, "(C)Yiming Wu", 0, 0);
  1121. t = laMakeTab(uil, c, 0);{
  1122. first = u = laAddTabPage(t, "Version");
  1123. tc = laFirstColumn(u);
  1124. g = laMakeGroup(u, tc, "LaGUI information", 0);
  1125. gu = g->Page;{
  1126. gc = laFirstColumn(gu);
  1127. sprintf(buf, "LaGUI.%d.%d.%d", LA_VERSION_MAIN, LA_VERSION_SUB, LA_VERSION_MINOR);
  1128. laShowLabel(gu, gc, buf, 0, 0)->Flags|=LA_TEXT_MONO;
  1129. sprintf(buf, "Program built on:[UTC+8] %s %s", __DATE__, __TIME__);
  1130. laShowLabel(gu, gc, buf, 0, 0)->Flags|=LA_TEXT_MONO;
  1131. sprintf(buf, "UDF Capability %s %d.%d.%d",LA_UDF_IDENTIFIER, LA_UDF_CAPABILITY_MAIN, LA_UDF_CAPABILITY_SUB, LA_UDF_CAPABILITY_MINOR);
  1132. laShowLabel(gu, gc, buf, 0, 0)->Flags|=LA_TEXT_MONO;
  1133. laShowLabel(gu, gc, "UDF Extensions:", 0, 0)->Flags|=LA_TEXT_MONO;
  1134. laShowLabel(gu, gc, "🗸 LA_UDF_BASICS", 0, 0)->Flags|=LA_TEXT_MONO;
  1135. for(int i=0;i<64;i++){
  1136. if(!LA_UDF_EXTENSION_STRINGS[i][0]) break; int gray=!((1<<i)&LA_UDF_EXTENSION_BITS);
  1137. sprintf(buf,"%s %s",gray?" ":"🗸",LA_UDF_EXTENSION_STRINGS[i]);
  1138. laUiItem* ext=laShowLabel(gu, gc, buf, 0, 0); ext->Flags|=LA_TEXT_MONO;
  1139. if(gray){ ext->Flags|=LA_UI_FLAGS_DISABLED; }
  1140. }
  1141. }
  1142. g = laMakeGroup(u, tc, "Graphics", 0);
  1143. gu = g->Page;{
  1144. gc = laFirstColumn(gu);
  1145. sprintf(buf, "OpenGL Version: %s", T->GLVersionStr); laShowLabel(gu, gc, buf, 0, 0)->Flags|=LA_TEXT_MONO;
  1146. sprintf(buf, "OpenGL Vendor: %s", T->GLVendorStr); laShowLabel(gu, gc, buf, 0, 0)->Flags|=LA_TEXT_MONO;
  1147. sprintf(buf, "OpenGL Renderer: %s", T->GLRendererStr); laShowLabel(gu, gc, buf, 0, 0)->Flags|=LA_TEXT_MONO;
  1148. sprintf(buf, "GLSL Version: %s", T->GLSLVersionStr); laShowLabel(gu, gc, buf, 0, 0)->Flags|=LA_TEXT_MONO;
  1149. }
  1150. u = laAddTabPage(t, "Props");{
  1151. c = laFirstColumn(u);
  1152. laSplitColumn(u, c, 0.2);
  1153. gcl = laLeftColumn(c, 1);
  1154. gcr = laRightColumn(c, 0);
  1155. for (pc = MAIN.PropContainers.pFirst; pc; pc = pc->Item.pNext){
  1156. buf[0] = L' ';buf[1]= L'\0';
  1157. if(pc->IconID){
  1158. sprintf(buf, "%lc", pc->IconID);
  1159. }
  1160. laShowLabelDynamic(u, gcl, buf, 0, LA_WIDGET_STRING_PLAIN);
  1161. laShowLabelDynamic(u, gcr, pc->Identifier, 0, LA_WIDGET_STRING_PLAIN);
  1162. }
  1163. }
  1164. u = laAddTabPage(t, "Functions");{
  1165. c = laFirstColumn(u);
  1166. laSplitColumn(u, c, 0.2);
  1167. gcl = laLeftColumn(c, 1);
  1168. gcr = laRightColumn(c, 0);
  1169. for (h = 0; h < 256; h++){
  1170. for (at = MAIN.OperatorTypeHash.Entries[h].pFirst; at; at = at->Item.pNext){
  1171. buf[0] = L' ';buf[1]= L'\0';
  1172. if(at->IconID){
  1173. sprintf(buf, "%lc", at->IconID);
  1174. }
  1175. laShowLabelDynamic(u, gcl, buf, 0, LA_WIDGET_STRING_PLAIN);
  1176. laShowLabelDynamic(u, gcr, at->Identifier, 0, LA_WIDGET_STRING_PLAIN);
  1177. }
  1178. }
  1179. }
  1180. u = laAddTabPage(t, "Author");
  1181. tc = laFirstColumn(u);
  1182. laSplitColumn(u, tc, 0.8);
  1183. tcl = laLeftColumn(tc, 3);
  1184. tcr = laRightColumn(tc, 00);
  1185. strSafeSet(&laShowSymbol(u, tc, 0, 0)->ExtraInstructions, "mode=invert;preserve=5;");
  1186. laShowItemFull(u, tcl, 0, "LA_open_internet_link", 0, "link=http://www.wellobserve.com;", 0, 0);
  1187. laShowLabel(u, tcr, "Yiming's Website", 0, 0);
  1188. laShowSeparator(u, tc);
  1189. laShowLabel(u, tcr, "QQ 1094469528", 0, 0);
  1190. laShowSeparator(u, tc);
  1191. laShowItemFull(u, tcl, 0, "LA_open_internet_link", 0, "link=http://weibo.com/1919404360;", 0, 0);
  1192. laShowLabel(u, tcr, "Weibo", 0, 0);
  1193. laShowItemFull(u, tcl, 0, "LA_open_internet_link", 0, "link=https://www.artstation.com/artist/nicksbest;", 0, 0);
  1194. laShowLabel(u, tcr, "Artstation", 0, 0);
  1195. laShowItemFull(u, tcl, 0, "LA_open_internet_link", 0, "link=mailto:1094469528@qq.com;icon=🖅", 0, 0);
  1196. laShowLabel(u, tcr, "QQ Mail", 0, 0);
  1197. laShowLabel(u, tcr, "Outlook Mail", 0, 0);
  1198. laShowItemFull(u, tcl, 0, "LA_open_internet_link", 0, "link=mailto:xp8110@outlook.com;icon=🖅", 0, 0);
  1199. t->Page = first;
  1200. }
  1201. }
  1202. void laui_terminal(laUiList *uil, laPropPack *Base, laPropPack *OperatorInst, laColumn *ExtraColumns, int context){
  1203. laColumn* c=laFirstColumn(uil);
  1204. laUiItem* g=laMakeGroup(uil,c,"123",0);{ g->State=LA_UI_ACTIVE; g->Flags|=LA_UI_FLAGS_PREFER_BOTTOM;
  1205. laUiList* gu=g->Page; laColumn* gc=laFirstColumn(gu); gu->HeightCoeff=-1;
  1206. laShowItem(gu,gc,0,"la.logs")->Flags|=LA_UI_FLAGS_NO_DECAL;
  1207. }
  1208. }
  1209. void laui_IdleDataManager(laUiList *uil, laPropPack *Base, laPropPack *Extra, laColumn *ExtraColumns, int context){
  1210. laColumn *c=laFirstColumn(uil);
  1211. laUiItem* r=laBeginRow(uil,c,0,0);
  1212. laShowLabel(uil,c,"Viewing",0,0);
  1213. laShowItem(uil,c,Extra,"show_page")->Flags|=LA_UI_FLAGS_EXPAND;
  1214. laEndRow(uil,r);
  1215. laUiItem* g=laMakeEmptyGroup(uil,c,"List",0);{ g->State=LA_UI_ACTIVE;
  1216. laUiList* gu=g->Page; gu->HeightCoeff=-3; laColumn* gc=laFirstColumn(gu);
  1217. laUiItem* b=laOnConditionThat(gu,gc,laEqual(laPropExpression(Extra, "show_page"),laIntExpression(0)));{
  1218. laShowItemFull(gu,gc,0,"la.managed_props",0, 0,laui_ManagedProp,0)->Flags|=LA_UI_FLAGS_NO_DECAL;
  1219. }laElse(gu,b);{
  1220. laShowItemFull(gu,gc,0,"la.managed_udfs",0,0,0,0)->Flags|=LA_UI_FLAGS_NO_DECAL;
  1221. }laEndCondition(gu,b);
  1222. }
  1223. r=laBeginRow(uil,c,0,0);
  1224. laShowSeparator(uil,c)->Expand=1;
  1225. laShowItemFull(uil,c,0,"LA_managed_save",0,"quiet=true;ignore_unassigned=true;text=Save All Modified",0,0);
  1226. laEndRow(uil,r);
  1227. }
  1228. void lauidetached_IdleDataManager(laPanel* p){
  1229. la_MakeDetachedProp(p, "la.user_preferences.manager_default_view", "show_page");
  1230. }
  1231. void laui_TextureInspector(laUiList *uil, laPropPack *Base, laPropPack *Extra, laColumn *ExtraColumns, int context){
  1232. laColumn *c=laFirstColumn(uil),*cl,*cr;
  1233. laSplitColumn(0, c, 0.5);
  1234. cl = laLeftColumn(c, 0);
  1235. cr = laRightColumn(c, 0);
  1236. laShowLabel(uil,cl,"Viewing Texture:",0,0)->Flags|=LA_TEXT_ALIGN_RIGHT;
  1237. laShowItemFull(uil,cr,Extra,"textures",LA_WIDGET_COLLECTION_SELECTOR,0,0,0);
  1238. laUiItem* u2=laShowCanvas(uil,c,Extra,"textures",0,-1);
  1239. laDefault2DViewOverlayRight(u2);
  1240. }
  1241. void lauidetached_TextureInspector(laPanel* p){
  1242. la_MakeDetachedProp(p, "tns.texture_list", "textures");
  1243. }
  1244. void laui_GameController(laUiList *uil, laPropPack *This, laPropPack *Extra, laColumn *UNUSED, int context){
  1245. laColumn* c=laFirstColumn(uil),*cl, *cr;
  1246. laSplitColumn(uil,c,0.5); cl=laLeftColumn(c,0); cr=laRightColumn(c,0);
  1247. laUiItem* b=laBeginRow(uil,cl,0,0);
  1248. laUiItem* l=laShowLabel(uil,cl,"Controller:",0,0); l->Flags|=LA_TEXT_ALIGN_RIGHT; l->Expand=1;
  1249. laShowItem(uil,cl,0,"LA_refresh_controllers")->Flags|=LA_UI_FLAGS_ICON;
  1250. laEndRow(uil,b);
  1251. laShowItemFull(uil,cr,Extra,"controllers",LA_WIDGET_COLLECTION_SELECTOR,0,laui_IdentifierOnly,0);
  1252. b=laOnConditionThat(uil,c,laPropExpression(Extra,"controllers"));{
  1253. laShowItemFull(uil,c,Extra,"controllers",LA_WIDGET_COLLECTION_SINGLE,0,0,0);
  1254. }laElse(uil,b);{
  1255. laShowLabel(uil,c,"Please select a controller.",0,0)->Flags|=LA_TEXT_ALIGN_CENTER;
  1256. }
  1257. }
  1258. void lauidetached_GameController(laPanel* p){
  1259. la_MakeDetachedProp(p, "la.controllers", "controllers");
  1260. }
  1261. void laui_InputMapper(laUiList *uil, laPropPack *This, laPropPack *Extra, laColumn *UNUSED, int context){
  1262. laColumn* c=laFirstColumn(uil),*cl, *cr;
  1263. laSplitColumn(uil,c,0.6); cl=laLeftColumn(c,0); cr=laRightColumn(c,0);
  1264. laUiItem* b=laBeginRow(uil,cl,0,0);
  1265. laUiItem* b2=laOnConditionThat(uil,cl,laPropExpression(0,"la.input_mapping.pages"));{
  1266. laUiItem* b3=laOnConditionThat(uil,cl,laPropExpression(0,"la.input_mapping.current_page"));{
  1267. laShowItem(uil,cr,0,"la.input_mapping.current_page.name")->Expand=1;
  1268. laShowItem(uil,c,Extra,"LA_input_mapping_rebuild")->Flags|=LA_UI_FLAGS_ICON;
  1269. }laEndCondition(uil,b3);
  1270. }laEndCondition(uil,b2);
  1271. laShowItem(uil,cl,0,"LA_add_input_mapping_page")->Flags|=LA_UI_FLAGS_ICON;
  1272. laEndRow(uil,b);
  1273. b2=laOnConditionThat(uil,cr,laPropExpression(0,"la.input_mapping.pages"));{
  1274. laShowItemFull(uil,cr,0,"la.input_mapping.pages",LA_WIDGET_COLLECTION_SELECTOR,0,0,0);
  1275. }laEndCondition(uil,b2);
  1276. laShowItemFull(uil,c,0,"la.input_mapping.current_page",LA_WIDGET_COLLECTION_SINGLE,0,laui_RackPage,LA_RACK_TYPE_INPUT);
  1277. }
  1278. void lauidetached_Drivers(laPanel* p){
  1279. la_MakeDetachedProp(p, "la.drivers.current_page", "page");
  1280. }
  1281. void laui_Drivers(laUiList *uil, laPropPack *This, laPropPack *Extra, laColumn *UNUSED, int context){
  1282. laColumn* c=laFirstColumn(uil),*cl, *cr;
  1283. laSplitColumn(uil,c,0.6); cl=laLeftColumn(c,0); cr=laRightColumn(c,0);
  1284. laUiItem* b=laBeginRow(uil,cl,0,0);
  1285. laUiItem* b2=laOnConditionThat(uil,cl,laPropExpression(0,"la.drivers.pages"));{
  1286. laUiItem* b3=laOnConditionThat(uil,cl,laPropExpression(Extra,"page"));{
  1287. laShowItem(uil,cr,Extra,"page.name")->Expand=1;
  1288. laShowItem(uil,c,Extra,"LA_driver_rebuild")->Flags|=LA_UI_FLAGS_ICON;
  1289. }laEndCondition(uil,b3);
  1290. }laEndCondition(uil,b2);
  1291. laShowItem(uil,cl,0,"LA_add_driver_page")->Flags|=LA_UI_FLAGS_ICON;
  1292. laEndRow(uil,b);
  1293. b2=laOnConditionThat(uil,cr,laPropExpression(0,"la.drivers.pages"));{
  1294. laShowItemFull(uil,cr,Extra,"page",LA_WIDGET_COLLECTION_SELECTOR,0,0,0);
  1295. }laEndCondition(uil,b2);
  1296. laShowItemFull(uil,c,Extra,"page",LA_WIDGET_COLLECTION_SINGLE,0,laui_RackPage,LA_RACK_TYPE_DRIVER);
  1297. }
  1298. void la_RegisterBuiltinTemplates(){
  1299. laRegisterUiTemplate("LAUI_input_mapper","Input Mapper",laui_InputMapper,0,0,"Controlling");
  1300. laRegisterUiTemplate("LAUI_drivers","Drivers",laui_Drivers,lauidetached_Drivers,0,0);
  1301. laRegisterUiTemplate("LAUI_controllers", "Controllers", laui_GameController, lauidetached_GameController, 0,0);
  1302. laRegisterUiTemplate("LAUI_user_preferences", "User Preferences", laui_UserPreference, 0, 0, "System");
  1303. laRegisterUiTemplate("LAUI_about", "About", laui_About, 0, 0, 0);
  1304. laRegisterUiTemplate("LAUI_texture_inspector", "Texture Inspector", laui_TextureInspector, lauidetached_TextureInspector, 0, 0);
  1305. laRegisterUiTemplate("LAUI_data_manager", "Data Manager", laui_IdleDataManager, lauidetached_IdleDataManager, 0, 0);
  1306. laRegisterUiTemplate("LAUI_terminal", "Terminal", laui_terminal, 0, 0, 0);
  1307. }