*/}}

la_interface.h 71 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219
  1. /*
  2. * LaGUI: A graphical application framework.
  3. * Copyright (C) 2022-2023 Wu Yiming
  4. *
  5. * This program is free software: you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License as published by
  7. * the Free Software Foundation, either version 3 of the License, or
  8. * (at your option) any later version.
  9. *
  10. * This program is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. * GNU General Public License for more details.
  14. *
  15. * You should have received a copy of the GNU General Public License
  16. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  17. */
  18. #pragma once
  19. #include <GL/glew.h>
  20. //#include <GL/glxew.h>
  21. #include <GL/gl.h>
  22. #ifdef __linux__
  23. #include <X11/Xlib.h>
  24. #include <X11/Xutil.h>
  25. #include <X11/Xresource.h>
  26. #include <X11/Xlocale.h>
  27. #include <X11/XKBlib.h>
  28. #include <X11/Xatom.h>
  29. #include <GL/glx.h>
  30. #include <GL/glext.h>
  31. #endif
  32. #ifdef _WIN32
  33. #include <GL/wglew.h>
  34. #endif
  35. #include "la_5.h"
  36. #include "la_data.h"
  37. //#include "llvm-c/Analysis.h"
  38. //#include "llvm-c/BitWriter.h"
  39. //#include "llvm-c/Core.h"
  40. //#include "llvm-c/ExecutionEngine.h"
  41. //#include "llvm-c/Target.h"
  42. //#include <Windows.h>
  43. #define LA_VERSION_MAIN 5
  44. #define LA_VERSION_SUB 1
  45. #define LA_ACTUATOR_CAPABILITY_MAIN 5
  46. #define LA_ACTUATOR_CAPABILITY_SUB 0
  47. #define LA_NODE_MAIN_MODULE_NAME "LA_NODE_MAIN_MODULE"
  48. #define LA_GUI_WNDCLASS_NAME "LA_WINDOW_CLASS"
  49. #define LA_ARROW 1
  50. #define LA_CROSS 2
  51. #define LA_LEFT_AND_RIGHT 3
  52. #define LA_UP_AND_DOWN 4
  53. #define LA_HAND 5
  54. #define LA_MOVE 6
  55. #define LA_CORNER 7
  56. #define EVT_WND_MOVE -1
  57. #define EVT_WND_SIZE_BEGIN -2
  58. #define EVT_WND_SIZE_FINISH -3
  59. #define EVT_WND_SIZE -4
  60. #define EVT_WND_SHOW -5
  61. #define EVT_FEEDBACK 8192
  62. #define LA_KEYBOARD_EVENT (1<<0)
  63. #define LA_MOUSE_EVENT (1<<1)
  64. #define LA_STATE_MOVE (1<<2)
  65. #define LA_STATE_DOWN (1<<3)
  66. #define LA_STATE_UP (1<<4)
  67. #define LA_TIME_EVENT (1<<5)
  68. #define LA_TIME_IDLE (LA_TIME_EVENT|(1<<6))
  69. #define LA_TIME_DELAY (LA_TIME_EVENT|(1<<7))
  70. #define LA_KEY_MOUSE_LEFT (1<<8)
  71. #define LA_KEY_MOUSE_MIDDLE (1<<9)
  72. #define LA_KEY_MOUSE_RIGHT (1<<10)
  73. #define LA_KEY_MOUSE_SCROLL (1<<11)
  74. #define LA_KEY_BACKSPACE (1<<12)
  75. #define LA_KEY_ESCAPE (1<<13)
  76. #define LA_KEY_ENTER (1<<14)
  77. #define LA_INPUT (1<<15)
  78. #define LA_KEY_ARRLEFT (1<<16)
  79. #define LA_KEY_ARRRIGHT (1<<17)
  80. #define LA_KEY_ARRUP (1<<18)
  81. #define LA_KEY_ARRDOWN (1<<19)
  82. #define LA_KEY_SHIFT (1<<20)
  83. #define LA_KEY_CTRL (1<<21)
  84. #define LA_KEY_ALT (1<<22)
  85. #define LA_KEY_DELETE (1<<23)
  86. #define LA_KEY_TAB (1<<24)
  87. #ifdef _WIN32
  88. #define XK_F1 1
  89. #define XK_F2 2
  90. #define XK_F3 3
  91. #define XK_F4 4
  92. #define XK_F5 5
  93. #define XK_F6 6
  94. #define XK_F7 7
  95. #define XK_F8 8
  96. #define XK_F9 9
  97. #define XK_F10 10
  98. #define XK_F11 11
  99. #define XK_F12 12
  100. #endif
  101. #define LA_KEY_F1 XK_F1
  102. #define LA_KEY_F2 XK_F2
  103. #define LA_KEY_F3 XK_F3
  104. #define LA_KEY_F4 XK_F4
  105. #define LA_KEY_F5 XK_F5
  106. #define LA_KEY_F6 XK_F6
  107. #define LA_KEY_F7 XK_F7
  108. #define LA_KEY_F8 XK_F8
  109. #define LA_KEY_F9 XK_F9
  110. #define LA_KEY_F10 XK_F10
  111. #define LA_KEY_F11 XK_F11
  112. #define LA_KEY_F12 XK_F12
  113. #define LA_KEY_SPECIALS (LA_KEY_CTRL|LA_KEY_SHIFT|LA_KEY_ALT)
  114. #define LA_MOUSEMOVE (LA_MOUSE_EVENT | LA_STATE_MOVE)
  115. #define LA_EMPTY LA_MOUSEMOVE
  116. #define LA_MOUSEDOWN (LA_MOUSE_EVENT | LA_STATE_DOWN)
  117. #define LA_MOUSEUP (LA_MOUSE_EVENT | LA_STATE_UP)
  118. #define LA_WHEEL (LA_MOUSE_EVENT | LA_KEY_MOUSE_SCROLL)
  119. #define LA_L_MOUSE_DOWN (LA_MOUSE_EVENT | LA_STATE_DOWN | LA_KEY_MOUSE_LEFT)
  120. #define LA_L_MOUSE_UP (LA_MOUSE_EVENT | LA_STATE_UP | LA_KEY_MOUSE_LEFT)
  121. #define LA_M_MOUSE_DOWN (LA_MOUSE_EVENT | LA_STATE_DOWN | LA_KEY_MOUSE_MIDDLE)
  122. #define LA_M_MOUSE_UP (LA_MOUSE_EVENT | LA_STATE_UP | LA_KEY_MOUSE_MIDDLE)
  123. #define LA_R_MOUSE_DOWN (LA_MOUSE_EVENT | LA_STATE_DOWN | LA_KEY_MOUSE_RIGHT)
  124. #define LA_R_MOUSE_UP (LA_MOUSE_EVENT | LA_STATE_UP | LA_KEY_MOUSE_RIGHT)
  125. #define LA_MOUSE_WHEEL_DOWN (LA_MOUSE_EVENT | LA_STATE_DOWN | LA_KEY_MOUSE_SCROLL)
  126. #define LA_MOUSE_WHEEL_UP (LA_MOUSE_EVENT | LA_STATE_UP | LA_KEY_MOUSE_SCROLL)
  127. #define LA_KEY_DOWN (LA_KEYBOARD_EVENT | LA_STATE_DOWN)
  128. #define LA_KEY_UP (LA_KEYBOARD_EVENT | LA_STATE_UP)
  129. #define LA_LEFT_DOWN (LA_KEYBOARD_EVENT | LA_KEY_ARRLEFT | LA_STATE_DOWN)
  130. #define LA_RIGHT_DOWN (LA_KEYBOARD_EVENT | LA_KEY_ARRRIGHT | LA_STATE_DOWN)
  131. #define LA_UP_DOWN (LA_KEYBOARD_EVENT | LA_KEY_ARRUP | LA_STATE_DOWN)
  132. #define LA_DOWN_DOWN (LA_KEYBOARD_EVENT | LA_KEY_ARRDOWN | LA_STATE_DOWN)
  133. #define LA_LEFT_UP (LA_KEYBOARD_EVENT | LA_KEY_ARRLEFT | LA_STATE_UP)
  134. #define LA_RIGHT_UP (LA_KEYBOARD_EVENT | LA_KEY_ARRRIGHT | LA_STATE_UP)
  135. #define LA_UP_UP (LA_KEYBOARD_EVENT | LA_KEY_ARRUP | LA_STATE_UP)
  136. #define LA_DOWN_UP (LA_KEYBOARD_EVENT | LA_KEY_ARRDOWN | LA_STATE_UP)
  137. #define LA_BACKSPACE_DOWN (LA_KEYBOARD_EVENT | LA_KEY_BACKSPACE | LA_STATE_DOWN)
  138. #define LA_BACKSPACE_UP (LA_KEYBOARD_EVENT | LA_KEY_BACKSPACE | LA_STATE_UP)
  139. #define LA_ESCAPE_DOWN (LA_KEYBOARD_EVENT | LA_KEY_ESCAPE | LA_STATE_DOWN)
  140. #define LA_ESCAPE_UP (LA_KEYBOARD_EVENT | LA_KEY_ESCAPE | LA_STATE_UP)
  141. #define LA_ENTER_DOWN (LA_KEYBOARD_EVENT | LA_KEY_ENTER | LA_STATE_DOWN)
  142. #define LA_ENTER_UP (LA_KEYBOARD_EVENT | LA_KEY_ENTER | LA_STATE_UP)
  143. #define LA_ONLY_BITS_AND(orig, yours) \
  144. ((orig & yours) == yours)
  145. NEED_STRUCTURE(laTunnel);
  146. NEED_STRUCTURE(laUiList);
  147. NEED_STRUCTURE(laUiItem);
  148. NEED_STRUCTURE(laColumn);
  149. typedef void (*laUiDrawFunc)(void *, int); //Instance,Theme
  150. typedef void (*laPanelDrawFunc)(void *, void *, void *); //SYSWINDOW,Instance,Theme
  151. //typedef void(*laUiDefineFunc)(laUiList*,laPropPack*,laPropPack*,laColumn*);//uil,collection inst+"This" inst,actuator inst,Extra column list.
  152. typedef void (*laOperatorArgumentParserFunc)(laStringSplitor *, uint32_t *, char *); //icon id,display string buf
  153. typedef int (*laUiGetHeightFunc)(laUiItem *);
  154. typedef int (*laUiGetMinWidthFunc)(laUiItem *);
  155. typedef int (*laUiConditionFunc)(laPropPack *); //maybe inst+actuator,replaceInst
  156. typedef void (*laUiDestroyFunc)(laUiItem *);
  157. typedef void (*laUiInitFunc)(laUiItem *);
  158. typedef void (*laUiRefreshFunc)(laUiItem *);
  159. typedef void (*laLayoutBkgDrawFunc)(void *, void *l);
  160. typedef void (*laPreFrameF)();
  161. typedef void (*laPreDrawF)();
  162. typedef void (*laPostFrameF)();
  163. typedef void (*laCleanupF)();
  164. STRUCTURE(laEvent){
  165. laListItem Item;
  166. int Type;
  167. int state;
  168. int x, y;
  169. int key;
  170. int SpecialKeyBit;
  171. int p1, p2;
  172. uint32_t Input;
  173. int GoodPressure,IsEraser;
  174. real Pressure,AngleX,AngleY;
  175. void *Localized;
  176. //void* BoardcastedData;
  177. };
  178. NEED_STRUCTURE(laWindow)
  179. NEED_STRUCTURE(laRoot)
  180. NEED_STRUCTURE(laPanel)
  181. NEED_STRUCTURE(laUiItem)
  182. NEED_STRUCTURE(laUiList)
  183. NEED_STRUCTURE(laAnimationAction)
  184. NEED_STRUCTURE(laUiDescriptor)
  185. NEED_STRUCTURE(laUiConditionNode)
  186. STRUCTURE(laSharedTypeItem){
  187. laListItem Item;
  188. char ID[64];
  189. void *Pointer;
  190. };
  191. #define LA_ANIMATION_STOPPED 0
  192. #define LA_ANIMATION_PLAYING 1
  193. #define LA_ANIMATION_PLAYING_REVERSE 2
  194. STRUCTURE(laAnimationGlobal){
  195. laListItem Item;
  196. int PlayStatus;
  197. int Frame;
  198. int FrameBegin, FrameEnd;
  199. int FrameStep;
  200. int FrameRate;
  201. };
  202. NEED_STRUCTURE(laTranslation);
  203. NEED_STRUCTURE(laTheme);
  204. STRUCTURE(laKeyMapper){
  205. laListItem Item;//unused;
  206. laListHandle Items;
  207. };
  208. STRUCTURE(laLogEntry){
  209. laListItem Item;
  210. laSafeString* Content;
  211. int Type;
  212. };
  213. NEED_STRUCTURE(laManagedUDF);
  214. STRUCTURE(laNodeOutSocket){
  215. void* Data;
  216. void* Parent;
  217. laSafeString* Label;
  218. int DataType, ArrLen;
  219. int RuntimeX, RuntimeY, RuntimePX, RuntimePY;
  220. };
  221. STRUCTURE(laNodeInSocket){
  222. laNodeOutSocket* Source;
  223. laSafeString* Label;
  224. int DataType, ArrLen; int ColorId;
  225. int RuntimeX, RuntimeY, RuntimePX, RuntimePY;
  226. };
  227. NEED_STRUCTURE(laBaseNodeType);
  228. NEED_STRUCTURE(laRackPage);
  229. NEED_STRUCTURE(laNodeCategory);
  230. STRUCTURE(laRackPageCollection){
  231. laRackPage* CurrentPage;
  232. laListHandle Pages;
  233. laListHandle Eval;
  234. int NeedEval,NeedRebuild;
  235. };
  236. typedef laBaseNodeType* (*laGetBaseNodeTypeF)(char* str);
  237. NEED_STRUCTURE(laConfirmData);
  238. STRUCTURE(laExtraPreferencePage){
  239. laListItem Item;
  240. const char* Name;
  241. laUiDefineFunc Func;
  242. };
  243. STRUCTURE(laProgressDisplay){
  244. char String[256];
  245. SYSWINDOW w;
  246. #ifdef __linux__
  247. GC gc;
  248. XGCValues gc_values;
  249. #endif
  250. #ifdef _WIN32
  251. HBRUSH brush_bg;
  252. HBRUSH brush_fg;
  253. HPEN pen_fg;
  254. HDC hdc;
  255. #endif
  256. laTimeRecorder TimeCalled;
  257. real p1,p2;
  258. int Called,Shown;
  259. };
  260. STRUCTURE(LA){
  261. laListItem Hyper;
  262. laListHandle Logs;
  263. laListHandle Controllers; int NextControllerID;
  264. laListHandle Windows;
  265. laListHandle WastedPanels;
  266. laConfirmData *InvokeConfirmData;
  267. laPreFrameF PreFrame;
  268. laPreDrawF PreDraw;
  269. laPostFrameF PostFrame;
  270. laCleanupF Cleanup;
  271. real IdleStart, DelayStart;
  272. int DelayTriggered;
  273. int IdleTriggered;
  274. int ReTriggerOperators;
  275. laPanel* DockingPanel;
  276. char SysFontDir[512];
  277. char *InputBuf; int InputBufNext, InputBufMax;
  278. int32_t *InputBufU; int InputBufUNext, InputBufUMax;
  279. #ifdef __linux__
  280. Atom MsgDelWindow;
  281. Atom bufid;
  282. Atom fmtid;
  283. Atom propid;
  284. Atom incrid;
  285. Atom targets_atom;
  286. Atom text_atom;
  287. Atom UTF8;
  288. Atom selection;
  289. Atom wmstate,wmfullscr,wmfullscroff;
  290. #endif
  291. laSafeString* CopyPending;
  292. int GLMajor,GLMinor,BufferSamples;
  293. SYSTEMDISPLAY* dpy;
  294. SYSGLCONTEXT glc;
  295. #ifdef _WIN32
  296. HINSTANCE hinstance;
  297. HDC hdc;
  298. #endif
  299. #ifdef __linux__
  300. XVisualInfo* xvi;
  301. GLXFBConfig BestFBC;
  302. Colormap cmap;
  303. XIM im;
  304. XIC ic;
  305. int xi_opcode;
  306. #endif
  307. int WacomDeviceStylus; real StylusPressure, StylusAngleX, StylusAngleY, StylusMaxPressure;
  308. int WacomDeviceEraser; real EraserPressure, EraserAngleX, EraserAngleY, EraserMaxPressure;
  309. int PointerIsEraser,IsPen;
  310. int evLastX,evLastY;
  311. laWindow *CurrentWindow;
  312. laPanel *CurrentPanel;
  313. laProgressDisplay Progress;
  314. int InitDone;
  315. int SavePreferenceOnExit;
  316. laKeyMapper KeyMap;
  317. laHash256 OperatorTypeHash;
  318. laListHandle ExtraExtensions;
  319. laListHandle ExtraPreferencePaths;
  320. laListHandle ExtraPreferencePages;
  321. laUiDefineFunc PreferencePageDisplay;
  322. laUiDefineFunc PreferencePageInput;
  323. laUiDefineFunc PreferencePageResource;
  324. laUiDefineFunc PreferencePageTheme;
  325. laPropContainer *GeneralIntSub;
  326. laPropContainer *GeneralFloatSub;
  327. laPropContainer *GeneralEnumSub;
  328. laPropContainer *GeneralIntArraySub;
  329. laPropContainer *GeneralFloatArraySub;
  330. laPropContainer *GeneralEnumArraySub;
  331. laPropContainer *GeneralStringSub;
  332. laPropContainer *GeneralOperatorSub;
  333. laPropContainer *GeneralCollectionSub;
  334. laPropContainer *GeneralRawSub;
  335. laPropContainer *ContainerInt;
  336. laPropContainer *ContainerFloat;
  337. laPropContainer *ContainerEnum;
  338. laPropContainer *ContainerString;
  339. laPropContainer *ContainerOperator;
  340. laPropContainer *ContainerCollection;
  341. laPropContainer *_CONTAINER_SETTING;
  342. laProp *_PROP_SETTING;
  343. laPropContainer *_CONTAINER_SETTING_PROPAGATE_TO;
  344. void *_CONTAINER_SETTING_INSTANCE;
  345. laListHandle PropContainers;
  346. laRoot DataRoot;
  347. laPanel *PropMatcherContextP;
  348. laPanel* PendingSplash;
  349. laAnimationGlobal Animation;
  350. laTheme* CurrentTheme;
  351. laListHandle Themes;
  352. laListHandle UiTypes;
  353. laListHandle InitPanelTemplates;
  354. laListHandle PanelTemplates;
  355. laListHandle View2DTemplates;
  356. laUiDefineFunc MenuButtons;
  357. laUiDefineFunc MenuExtras;
  358. laUiDefineFunc AboutContent;
  359. laUiDefineFunc AboutVersion;
  360. laUiDefineFunc AboutAuthor;
  361. const char* MenuProgramName;
  362. laHash256 GlobalMemPool;
  363. int ByteCount;
  364. int TotalByteCount;
  365. laHash65536* DBInstMemLeft;// list item pointers
  366. laHash16M DBInst2;
  367. laHash16M DBInst1;
  368. laHash16M PtrSync;
  369. laListHandle PtrSyncAddressCommands;
  370. laListHandle PtrSyncHyper2Commands;
  371. laListHandle PostReadNodes;
  372. laListHandle RenewHyper2s;
  373. laListHandle SharedTypePointerSync;
  374. laListHandle PendingResourceRequests;
  375. laListHandle ResourceFolders;
  376. laListHandle ResourceRegistries;
  377. laListHandle UDFResources;
  378. laListHandle ManagedUDFs;
  379. laListHandle ManagedSaveProps;
  380. laManagedUDF* DummyManageUDF;
  381. laManagedUDF* DummyManageUDFSingle;
  382. laManagedUDF* DummyManageUDFSingleForce;
  383. int ManagerDefaultView;
  384. int SetUDFPending;
  385. laPropContainer* SaverDummyContainer;
  386. laListHandle DBInstPendingAcquireDBP;
  387. laListHandle DBInstPendingAcquireDiffCMD;
  388. laListHandle DiffTouched;
  389. laListHandle Differences;
  390. laDiff* HeadDifference;
  391. laDBInst RootDBInst;
  392. laListHandle DBRecordedProps;
  393. laHash65536* DBInstLink;
  394. laDiffPushEverythingF PushEverything;
  395. real FontSize;
  396. real MarginSize;
  397. int UiRowHeight;
  398. int ScaledUiRowHeight;
  399. real UiScale;
  400. void *ToPanel;
  401. int NextX, NextY, NextW, NextH;
  402. laNodeInSocket* tNodeIn;
  403. laNodeOutSocket* tNodeOut;
  404. laAuthorInfo Author;
  405. laListHandle ExternalAuthors;
  406. laSafeString *WorkingDirectory;
  407. //pthread_spinlock_t csNotifier;
  408. laListHandle ThreadNotifiers;
  409. //preference:
  410. //color
  411. real ColorPickerGamma;
  412. int NextWireColor, WireColorSlices;
  413. real WireThickness;
  414. real WireSaggyness;
  415. real* WireColorCache;
  416. //user interactions:
  417. int TopFramerate;
  418. int ValuatorThreshold;
  419. int ScrollingSpeed;
  420. int TooltipCloseDistance;
  421. real ZoomSpeed2D;
  422. real IdleTime;
  423. real DelayTime;
  424. //translations:
  425. laTranslation Translation;
  426. //display:
  427. real FloatingAlpha;
  428. int SolidShadowLength;
  429. int EnableAnimation;
  430. real AnimationSpeed;
  431. real PanelAnimationSpeed;
  432. int PanelMultisample;
  433. real LastFrameTime;
  434. real TimeAccum;
  435. //animation:
  436. int DefaultKeyFrameMode;
  437. //laThemeColor *ConditionStackColors[6];
  438. laUDFContentNode TEST_Link;
  439. laListHandle MediaFiles;
  440. laRackPageCollection* InputMapping;
  441. laRackPageCollection* Drivers;
  442. laListHandle NodeCategories;
  443. laNodeCategory* CurrentNodeCategory;
  444. int FilterNodeCategory;
  445. laBaseNodeType** NodeTypes; int NodeTypeNext, NodeTypeMax;
  446. laUiDefineFunc ExtraAddInputNodes;
  447. laUiDefineFunc ExtraAddDriverNodes;
  448. laGetBaseNodeTypeF ExtraGetInputNodeType;
  449. laGetBaseNodeTypeF ExtraGetDriverNodeType;
  450. //laHash256 RootNodes;
  451. //LLVMContextRef llvmContext;
  452. //LLVMModuleRef llvmModule;
  453. //pthread_spinlock_t csMediaPlay;
  454. int example_int;
  455. laSafeString* example_string;
  456. };
  457. #define LA_KM_SEL_UI_EXTRA 1
  458. #define LA_KM_SEL_PANEL 2
  459. STRUCTURE(laKeyMapItem){
  460. laListItem Item;
  461. int SpecialKeyBits;
  462. int EventType;
  463. int Key;
  464. char SelectBase;
  465. laPropPack Base;
  466. laPropPack Action;
  467. laSafeString *Operation;
  468. laSafeString *Instructions;
  469. };
  470. NEED_STRUCTURE(laLayout);
  471. NEED_STRUCTURE(laBlock);
  472. NEED_STRUCTURE(laPanel);
  473. NEED_STRUCTURE(laUiItem);
  474. STRUCTURE(laWindow){
  475. laListItem Item;
  476. SYSWINDOW* win;
  477. SYSGLCONTEXT glc;
  478. #ifdef _WIN32
  479. HDC hdc;
  480. #endif
  481. int X,Y,W,H;
  482. int CW,CH;
  483. int Activated;
  484. int Shown;
  485. int IsDocking;
  486. int OutputColorSpace;
  487. int OutputShowStripes;
  488. int IsFullScreen;
  489. int Redraw;
  490. int RedrawTouched;
  491. laPropPack PP;
  492. laPropStep FakePS;
  493. laSafeString *Title;
  494. laWindow* DockingFrom;
  495. laListHandle EventList;
  496. laSafeString *OperatorHints;
  497. laListHandle Layouts;
  498. laLayout *CurrentLayout;
  499. laBlock *MaximizedBlock;
  500. laPanel *MaximizedUiPanel;
  501. laUiItem *MaximizedUi;
  502. laListHandle Panels;
  503. laListHandle FadingPanels;
  504. laListHandle Operators;
  505. laListHandle PendingOperators;
  506. laUiDrawFunc Draw;
  507. };
  508. STRUCTURE(laBlock){
  509. int X, Y, W, H;
  510. laBlock *B1;
  511. laBlock *B2;
  512. laBlock *parent;
  513. laPanel *CurrentPanel;
  514. laListHandle Panels;
  515. int Vertical;
  516. int Folded;
  517. real SplitRatio; // From Left/Top;
  518. laPropPack PP;
  519. laPropPack FakePS;
  520. int OnButton;
  521. };
  522. #define LA_BLOCK_DROP_LOCATION_L 1
  523. #define LA_BLOCK_DROP_LOCATION_R 2
  524. #define LA_BLOCK_DROP_LOCATION_U 3
  525. #define LA_BLOCK_DROP_LOCATION_B 4
  526. STRUCTURE(laLayout){
  527. laListItem Item;
  528. laBlock *OperatingBlock;
  529. laBlock *FirstBlock;
  530. laBlock *MovingBlock;
  531. int IsMoving;
  532. laPanel *ClickedPanel;
  533. laBlock *DropToBlock;
  534. laBlock *OnBlockSeperator;
  535. char DropLocation;
  536. laSafeString *ID;
  537. laLayoutBkgDrawFunc Draw;
  538. };
  539. STRUCTURE(laUiList){
  540. laListItem Item;
  541. int L, R, U, B;
  542. int TL, TR, TU, TB;
  543. real PanX, PanY; //Pan Up/Left Is Positive
  544. laListHandle UiItems;
  545. laListHandle Columns;
  546. laListHandle *ShareColumns;
  547. laSafeString *TabName;
  548. char *Instance;
  549. short HeightCoeff;
  550. char ScrollerShownV;
  551. char ScrollerShownH;
  552. uint32_t IconID;
  553. int AllowScale;
  554. real Scale; real SaveScale;
  555. };
  556. STRUCTURE(laUiListRecord){
  557. laListItem Item;
  558. laUiList* uil;
  559. laUiItem* pui;
  560. };
  561. STRUCTURE(laColumn){
  562. laListItem Item;
  563. real PreWidth;
  564. real SP;
  565. int IL, IR;
  566. laColumn *Top;
  567. int MaxW;
  568. int B;
  569. laColumn *LS, *RS;
  570. laColumn *CopyRef;
  571. };
  572. STRUCTURE(laUiListDraw){
  573. laListHandle Items;
  574. laListHandle SocketRecord;
  575. laUiList* WiresContainer;
  576. };
  577. STRUCTURE(laUiListDrawItem){
  578. laListItem Item;
  579. laUiList *Target;
  580. int L, R, U, B, XP, YP, DifX, DifY;
  581. int ExtraPanX;
  582. real Scale;
  583. };
  584. STRUCTURE(laBoxedTheme){
  585. laListItem Item;
  586. laSafeString *Name;
  587. real NormalY, Normal[4], Inactive[4];
  588. real ActiveY, Active[4];
  589. real BorderY, Border[4];
  590. real TextY, Text[4];
  591. real TextActiveY, TextActive[4], TextInactive[4];
  592. real Alpha;
  593. int TextAlign;
  594. real Margins[4];
  595. real Paddings[4];
  596. //Don't change order
  597. int LM, RM, TM, BM;
  598. int LP, RP, TP, BP;
  599. laBoxedTheme **BackRef;
  600. laTheme* Parent;
  601. };
  602. STRUCTURE(laSocketRecord){
  603. laListItem Item;
  604. laNodeInSocket* In;
  605. laNodeOutSocket* Out;
  606. };
  607. extern laPropContainer* LA_PC_SOCKET_IN;
  608. extern laPropContainer* LA_PC_SOCKET_OUT;
  609. extern laPropContainer* LA_PC_MAPPER;
  610. extern laPropContainer* LA_PROP_SOCKET_SOURCE;
  611. extern laPropContainer* LA_PROP_SOCKET_OUT;
  612. extern laProp* LA_PROP_CONTROLLER;
  613. #define LA_UI_NORMAL 0
  614. #define LA_UI_ACTIVE (1<<0)
  615. #define LA_UI_EDITING (1<<1)
  616. #define LA_UI_DISABLED (1<<8)
  617. #define LA_BT_NORMAL LA_UI_NORMAL
  618. #define LA_BT_ACTIVE LA_UI_ACTIVE
  619. #define LA_BT_BORDER (1<<6)
  620. #define LA_BT_TEXT (1<<7)
  621. #define LA_BT_TEXT_NORMAL (LA_BT_TEXT|LA_UI_NORMAL)
  622. #define LA_BT_TEXT_ACTIVE (LA_BT_TEXT|LA_UI_ACTIVE)
  623. #define LA_BT_DISABLED LA_UI_DISABLED
  624. #define LA_BT_VERTEX (1<<8)
  625. #define LA_BT_EDGE (1<<9)
  626. #define LA_BT_FACE (1<<10)
  627. #define LA_BT_SELECTED (1<<11)
  628. #define LA_BT_SVERTEX (LA_BT_VERTEX|LA_BT_SELECTED)
  629. #define LA_BT_SEDGE (LA_BT_EDGE|LA_BT_SELECTED)
  630. #define LA_BT_SFACE (LA_BT_FACE|LA_BT_SELECTED)
  631. #define LA_UI_TAG_IS_OFFSCREEN (1<<0)
  632. #define LA_UI_TAG_CAVANS_SCALED (1<<1)
  633. #define LA_UI_TAG_NEED_REBUILD (LA_UI_TAG_IS_OFFSCREEN | LA_UI_TAG_CAVANS_SCALED)
  634. #define LA_UI_TAG_SCISSOR (1<<2)
  635. STRUCTURE(laTheme){
  636. laListItem Item;
  637. laSafeString *Name;
  638. laSafeString *Author;
  639. laListHandle Colors;
  640. laListHandle BoxedThemes;
  641. int abc;
  642. //
  643. real ColorBkg[4];
  644. real Color[4];
  645. real AccentColor[4];
  646. real SelectionColor[4];
  647. real CursorColor[4];
  648. real InactiveMix;
  649. real InactiveSaturation;
  650. real CursorAlpha;
  651. real SelectionAlpha;
  652. real WireSaturation;
  653. real WireTransparency;
  654. real WireBrightness;
  655. real VertexColor[4];
  656. real EdgeColor[4];
  657. real SVertexColor[4];
  658. real SEdgeColor[4];
  659. real SFaceColor[4];
  660. real EdgeBrightness, EdgeTransparency;
  661. real VertexBrightness, VertexTransparency;
  662. real SelectedVertexTransparency;
  663. real SelectedEdgeTransparency;
  664. real SelectedFaceTransparency;
  665. };
  666. NEED_STRUCTURE(laOperatorType);
  667. STRUCTURE(laUiType){
  668. laListItem Item;
  669. const char *Identifier;
  670. int ForType;
  671. const char *TargetSub;
  672. //laPropStep FakePs;
  673. laSubProp* FakeProp;
  674. laPropContainer* ExtraProps;
  675. laBoxedTheme **Theme;
  676. laUiDrawFunc Draw;
  677. const char *OperatorID;
  678. laOperatorType *OperatorType;
  679. laUiGetMinWidthFunc GetMinWidth;
  680. laUiGetHeightFunc GetHeight;
  681. laUiDestroyFunc Destroy;
  682. laUiInitFunc Init;
  683. laKeyMapper KeyMapper;
  684. int Tag;
  685. };
  686. NEED_STRUCTURE(laUiItem);
  687. STRUCTURE(laGeneralUiExtraData){
  688. int LastX, LastY;
  689. int TargetIndexVali;
  690. real TargetIndexValf;
  691. int On; //On:Modifying
  692. int Dragging;
  693. laStringEdit *Edit;
  694. void *Ptr1;
  695. void *Ptr2;
  696. int HeightCoeff;
  697. laUiItem* ui;
  698. };
  699. STRUCTURE(laMultiStringExtra){
  700. laGeneralUiExtraData* general;
  701. int PanX, PanY;
  702. };
  703. NEED_STRUCTURE(laCanvasExtra);
  704. typedef void(*laCanvasDrawFunc)(laBoxedTheme* bt, void* DataInstance, laCanvasExtra* Extra);
  705. typedef int (*laModalFunc)(laOperator *, laEvent *);
  706. STRUCTURE(laCanvasTemplate){
  707. laListItem Item;
  708. laSafeString *Identifier;
  709. laCanvasDrawFunc Draw;
  710. laUiDrawFunc SecondDraw;
  711. laKeyMapper KeyMapper;
  712. char *TargetContainerID;
  713. laPropContainer *TargetContainer;
  714. laPropContainer *ExtraProps;
  715. laSubProp *FakeProp;
  716. laModalFunc ExtraModal;
  717. //float LimitYScale;
  718. laUiInitFunc Init;
  719. laUiDestroyFunc Destroy;
  720. };
  721. #define LA_EDIT_ORIGIN_CENTER 0
  722. #define LA_EDIT_ORIGIN_INDIVIDUAL 1
  723. #define LA_EDIT_ORIGIN_CURSOR 2
  724. #define LA_LINE_WIDTH_WARNING_TOO_WIDE 1
  725. #define LA_LINE_WIDTH_WARNING_TOO_THIN 2
  726. #define LA_CANVAS_CURSOR_CROSS 1
  727. #define LA_CANVAS_CURSOR_BOX 2
  728. #define LA_CANVAS_CURSOR_ARROW 3
  729. #define LA_CANVAS_CURSOR_X 4
  730. #define LA_CANVAS_CURSOR_Y 5
  731. #define LA_CANVAS_SELECT_MODE_VERTS 0
  732. #define LA_CANVAS_SELECT_MODE_EDGES 1
  733. //#define LA_CANVAS_SELECT_MODE_FACES 2
  734. #define LA_CANVAS_SELECT_THROUGH_OFF 0
  735. #define LA_CANVAS_SELECT_THROUGH_ON 1
  736. void la_CanvasDefaultOverlay(laUiItem* ui, int h);
  737. void la_CanvasDrawOverlay(laUiItem *ui, int h);
  738. void la_CanvasInit(laUiItem *ui);
  739. void la_CanvasDestroy(laUiItem *ui);
  740. STRUCTURE(laCanvasExtra){
  741. laListItem Item;
  742. tnsOffscreen *OffScr;
  743. tnsOffscreen *DeferredOffScr;
  744. laUiItem *ParentUi;
  745. real ZoomX;
  746. real ZoomY;
  747. real PanX;
  748. real PanY;
  749. int DrawCursor;
  750. real OnX, TargetX;
  751. real OnY, TargetY;
  752. real ClickedX;
  753. real ClickedY;
  754. int HeightCoeff;
  755. //int SnapBottom;
  756. int ImageDrawAlpha;
  757. int ImageDrawBorder;
  758. int AdaptiveLineWidth;
  759. int LineWidthWarning;
  760. int ClearBackground;
  761. int SelectMode;
  762. int SelectThrough;
  763. int EditCenter;
  764. real BL, BR, BU, BB;
  765. int Dragging;
  766. int TargetIndexVali;
  767. //3d==========
  768. tnsOffscreen *OffScrShadow;
  769. tnsCamera *ViewingCamera; //Always create this one;
  770. tnsCamera *UsingCamera;
  771. int Layers[20];
  772. int DisplayMode;
  773. int ShowFloorGrid;
  774. int GridSize;
  775. int GridSpan;
  776. int ShowAxis[3];
  777. int LineDrawingMode;
  778. };
  779. NEED_STRUCTURE(laUiConditionNode);
  780. STRUCTURE(laConditionUiExtraData){
  781. int a;
  782. laUiItem *EndUi;
  783. laUiItem *ElseUi;
  784. laUiConditionNode *Expression;
  785. //char Remove;
  786. char IsTrue;
  787. };
  788. STRUCTURE(laUiTemplate){
  789. laListItem Item;
  790. laSafeString *Title;
  791. laSafeString *Identifier;
  792. laSafeString *CategoryName;
  793. laUiDefineFunc Define;
  794. laUiDefineFunc Header;
  795. laPanelDetachedPropFunc PropFunc;
  796. int DefaultGLFormat;
  797. int DefaultW_RH,DefaultH_RH;
  798. laKeyMapper KeyMap;
  799. };
  800. STRUCTURE(laUiItem){
  801. laListItem Item;
  802. laColumn *C;
  803. int L, R, U, B;
  804. int TL, TR, TU, TB;
  805. int AnimationDistinguish;
  806. int State; int Flags; // expand and even (in row control ui)
  807. laPropPack ExtraPP;
  808. laPropStep FakePs;
  809. laGeneralUiExtraData *Extra;
  810. //char NoRefresh;
  811. short Expand;
  812. short SymbolID;
  813. laPropPack PP;
  814. laSafeString *Display;
  815. laSafeString *ExtraInstructions;
  816. laUiType *Type;
  817. laCanvasTemplate *CanvasTemplate;
  818. laUiList *Page; // reuse as row begin ref
  819. laOperatorType *AT; //Probably share in the future;
  820. laStringSplitor *Instructions;
  821. laListHandle Subs;
  822. laUiDefineFunc Template;
  823. int TemplateContext;
  824. laListHandle SubPanels;
  825. };
  826. STRUCTURE(laWidget){
  827. laUiType* Type;
  828. int Flags;
  829. };
  830. #define LA_UI_FLAGS_TRANSPOSE (1<<0)
  831. #define LA_UI_FLAGS_EXPAND (1<<1)
  832. #define LA_UI_FLAGS_ICON (1<<2)
  833. #define LA_UI_FLAGS_CYCLE (1<<3)
  834. #define LA_UI_FLAGS_NO_DECAL (1<<4)
  835. #define LA_UI_FLAGS_NO_EVENT (1<<5)
  836. #define LA_UI_FLAGS_NO_CONFIRM (1<<6)
  837. #define LA_TEXT_ALIGN_LEFT (1<<7)
  838. #define LA_TEXT_ALIGN_RIGHT (1<<8)
  839. #define LA_TEXT_ALIGN_CENTER (1<<9)
  840. #define LA_TEXT_ALIGN_AUTO (1<<10)
  841. #define LA_TEXT_USE_NEWLINE (1<<11)
  842. #define LA_TEXT_LINE_WRAP (1<<12)
  843. #define LA_TEXT_REVERT_Y (1<<13)
  844. #define LA_TEXT_MONO (1<<14)
  845. #define LA_UI_FLAGS_PREFER_BOTTOM (1<<15)
  846. #define LA_UI_FLAGS_NO_GAP (1<<16)
  847. #define LA_UI_FLAGS_UNDERNEATH (1<<17)
  848. #define LA_UI_FLAGS_NO_HEIGHT (LA_UI_FLAGS_NO_GAP|LA_UI_FLAGS_NO_DECAL|LA_UI_FLAGS_UNDERNEATH)
  849. #define LA_UI_FLAGS_NO_OVERLAY (1<<18)
  850. #define LA_TEXT_OVERFLOW_ARROW (1<<19)
  851. #define LA_UI_FLAGS_DISABLED (1<<20)
  852. #define LA_UI_FLAGS_HIGHLIGHT (1<<21)
  853. #define LA_UI_FLAGS_NODE_CONTAINER (1<<22)
  854. #define LA_UI_COLLECTION_NO_HIGHLIGHT LA_TEXT_ALIGN_LEFT
  855. #define LA_TEXT_ONE_LINE (1<<23)
  856. #define LA_UI_FLAGS_NO_SCROLL_INACTIVE (1<<24)
  857. #define LA_UI_FLAGS_COLOR_SPACE_CLAY (1<<25)
  858. #define LA_UI_FLAGS_EXIT_WHEN_TRIGGERED LA_UI_FLAGS_COLOR_SPACE_CLAY
  859. #define LA_TEXT_LCD_16 (1<<27)
  860. #define LA_TEXT_LCD_7 (1<<28)
  861. #define LA_UI_FLAGS_NO_TOOLTIP LA_UI_FLAGS_PREFER_BOTTOM
  862. #define LA_UI_IMAGE_FULL_W LA_TEXT_MONO
  863. #define LA_UI_MIN_WIDTH LA_UI_FLAGS_COLOR_SPACE_CLAY
  864. #define LA_UI_FLAGS_INT_ICON (LA_UI_FLAGS_NO_DECAL|LA_UI_FLAGS_NO_EVENT|LA_UI_FLAGS_ICON)
  865. #define LA_UI_FLAGS_PLAIN (LA_UI_FLAGS_NO_DECAL|LA_UI_FLAGS_NO_EVENT)
  866. #define LA_TEXT_ALIGN (LA_TEXT_ALIGN_LEFT|LA_TEXT_ALIGN_CENTER|LA_TEXT_ALIGN_RIGHT|LA_TEXT_ALIGN_AUTO)
  867. #define LA_UI_SOCKET_LABEL_N LA_TEXT_ALIGN_LEFT
  868. #define LA_UI_SOCKET_LABEL_S LA_TEXT_ALIGN_RIGHT
  869. #define LA_UI_SOCKET_LABEL_W LA_TEXT_ALIGN_CENTER
  870. #define LA_UI_SOCKET_LABEL_E LA_TEXT_ALIGN_AUTO
  871. extern laWidget* LA_WIDGET_FIXED_GROUP;
  872. extern laWidget* LA_WIDGET_TAB;
  873. extern laWidget* LA_WIDGET_COLLECTION;
  874. extern laWidget* LA_WIDGET_COLLECTION_ITEM;
  875. extern laWidget* LA_WIDGET_COLLECTION_SELECTOR;
  876. extern laWidget* LA_WIDGET_COLLECTION_SINGLE;
  877. extern laWidget* LA_WIDGET_CONDITION_TOGGLE;
  878. extern laWidget* LA_WIDGET_COLUMN_ADJUSTER;
  879. extern laWidget* LA_WIDGET_COLUMN_VIEWER;
  880. extern laWidget* LA_WIDGET_BUTTON;
  881. extern laWidget* LA_WIDGET_BUTTON_NO_CONFIRM;
  882. extern laWidget* LA_WIDGET_LABEL;
  883. extern laWidget* LA_WIDGET_INT;
  884. extern laWidget* LA_WIDGET_INT_PLAIN;
  885. extern laWidget* LA_WIDGET_INT_PLAIN_ICON;
  886. extern laWidget* LA_WIDGET_VALUE_METER;
  887. extern laWidget* LA_WIDGET_VALUE_METER_2D;
  888. extern laWidget* LA_WIDGET_FLOAT;
  889. extern laWidget* LA_WIDGET_FLOAT_PLAIN;
  890. extern laWidget* LA_WIDGET_FLOAT_COLOR;
  891. extern laWidget* LA_WIDGET_FLOAT_COLOR_HCY;
  892. extern laWidget* LA_WIDGET_ENUM_SELECTOR;
  893. extern laWidget* LA_WIDGET_ENUM_SELECTOR_ICON;
  894. extern laWidget* LA_WIDGET_ENUM_CYCLE;
  895. extern laWidget* LA_WIDGET_ENUM_CYCLE_ICON;
  896. extern laWidget* LA_WIDGET_ENUM_ICON_PLAIN;
  897. extern laWidget *LA_WIDGET_ENUM_HIGHLIGHT;
  898. extern laWidget* LA_WIDGET_STRING;
  899. extern laWidget* LA_WIDGET_STRING_PLAIN;
  900. extern laWidget* LA_WIDGET_STRING_MULTI;
  901. extern laWidget *LA_WIDGET_STRING_MONO_PLAIN;
  902. extern laWidget* LA_WIDGET_MENU_ROOT;
  903. extern laWidget* LA_WIDGET_ALIGN;
  904. extern laWidget* LA_WIDGET_3D_VIEW;
  905. extern laWidget* LA_WIDGET_2D_VIEW;
  906. extern laWidget* LA_WIDGET_SYMBOL;
  907. extern laWidget *LA_WIDGET_NODE_SOCKET;
  908. extern laWidget *LA_WIDGET_HEIGHT_ADJUSTER;
  909. extern laWidget *LA_WIDGET_RAW;
  910. extern laWidget *LA_WIDGET_MAPPER;
  911. extern laWidget *LA_WIDGET_IMAGE;
  912. #define LA_CONDITION_TRUE 1
  913. #define LA_CONDITION_FALSE 2
  914. #define LA_CONDITION_GE 3
  915. #define LA_CONDITION_GT 4
  916. #define LA_CONDITION_EQ 5
  917. #define LA_CONDITION_LT 6
  918. #define LA_CONDITION_LE 7
  919. #define LA_CONDITION_AND 8
  920. #define LA_CONDITION_OR 9
  921. #define LA_CONDITION_NOT 10
  922. #define LA_CONDITION_INT 11
  923. #define LA_CONDITION_FLOAT 12
  924. #define LA_CONDITION_STRING 13
  925. #define LA_CONDITION_PROP 14
  926. STRUCTURE(laUiConditionNode){
  927. char a;
  928. int Type;
  929. laUiConditionNode *Expression1; // As Int Value
  930. laUiConditionNode *Expression2;
  931. laUiDescriptor *Base;
  932. char IsExtra;
  933. int IntValue;
  934. real FloatValue;
  935. laSafeString *String; //used as prop path in template
  936. laPropPack PP;
  937. };
  938. #define LA_PANEL_NORMAL 0
  939. #define LA_PANEL_FLOATING_PASSIVE 2
  940. #define LA_PANEL_FLOATING_TOP 3
  941. #define LA_PANEL_NO_PARENT_MENU 4
  942. #define LA_TAG_REDRAW 1
  943. #define LA_TAG_RECALC 2
  944. #define LA_TAG_ANIMATION 4
  945. #define LA_TAG_RECALC_SCROLLER 8
  946. #define LA_PANEL_ANIMATION_DROP_DOWN 1
  947. #define LA_PANEL_ANIMATION_EXPAND 2
  948. #define LA_PANEL_ANIMATION_DISSOVE 3
  949. #define LA_PANEL_ANIMATION_COLLAPSE 4
  950. #define LA_PANEL_ANIMATION_MINIMIZE 5
  951. #define LA_PANEL_ANIMATION_DESTROY 127
  952. NEED_STRUCTURE(laOperator);
  953. NEED_STRUCTURE(laOperator);
  954. STRUCTURE(laPanel){
  955. laListItem Item;
  956. int __SAFE__;
  957. int X, Y, W, H;
  958. int MaxW, MaxH, MinW, MinH;
  959. int TX, TY, TW, TH;
  960. int TitleWidth;
  961. char AnimationMode;
  962. real AnimationRatio;
  963. //int PanX, PanY;
  964. int Show;
  965. short Refresh;
  966. short ShowCorner;
  967. unsigned int FrameDistinguish;
  968. char BoundUi;
  969. char IsMenuPanel;
  970. char LaterDestroy;
  971. char CloseWhenMovedOut;
  972. int Mode;
  973. int LiveEditing;
  974. laUiItem *EditingUi;
  975. laUiItem *FocusingUi;
  976. void *SFPNode;
  977. int SL, SR, ST, SB; //Snap To Edge
  978. laSafeString *Title;
  979. laUiTemplate *PanelTemplate;
  980. laPropPack PP;
  981. laPropStep FakePS;
  982. laPropContainer* PropLinkContainer;
  983. laSubProp* PropLinkFakeProp;
  984. laPropPack PropLinkPP;
  985. laPropStep PropLinkFakePS;
  986. laKeyMapper KeyMap;
  987. laPanelDrawFunc Draw;
  988. laBoxedTheme **BT;
  989. tnsOffscreen *OffScr;
  990. laUiList UI;
  991. laUiList TitleBar;
  992. laUiList *MenuRefer;
  993. laUiDefineFunc UiDefine;
  994. laListHandle SubPanels;
  995. laPanel *Parent;
  996. laBlock *Block;
  997. laOperator *ParentOperator;
  998. u64bit Tag;
  999. //64 Main Types are useable,with 31 subtypes avainable each.
  1000. //Main Type 0~63(some are occupied by LA internal)
  1001. //Sub Type 0~31
  1002. //Main (Low) 0| 1| 2| 3|...
  1003. //[---32bits---][---32bits---][---32bits---][---32bits---]...
  1004. };
  1005. STRUCTURE(laPanelMessage){
  1006. laListItem Item;
  1007. laSafeString *Message;
  1008. };
  1009. STRUCTURE(laPanelMessageList){
  1010. laListHandle Msg;
  1011. };
  1012. NEED_STRUCTURE(laOperator);
  1013. typedef int (*laInitFunc)(laOperator *);
  1014. typedef int (*laRefreshFunc)(laOperator *);
  1015. typedef int (*laCheckFunc)(laPropPack *, laStringSplitor *); //this, ui->instructions amd ap->instructions
  1016. typedef int (*laExitFunc)(laOperator *, int); //true means Quit, false means Cancel
  1017. typedef int (*laInvokeFunc)(laOperator *, laEvent *);
  1018. typedef int (*laModalFunc)(laOperator *, laEvent *);
  1019. typedef int (*laSystemFunc)(laOperator *, laEvent *);
  1020. #define LA_CANCEL 0
  1021. #define LA_PASS_ON (1<<10)
  1022. #define LA_BLOCK (1<<11)
  1023. #define LA_FINISH (1<<12)
  1024. #define LA_CONFIRM (1<<13)
  1025. #define LA_CANCELED 0
  1026. //#define LA_PRE_INVOKE 16384
  1027. #define LA_FINISHED (LA_FINISH | LA_BLOCK)
  1028. #define LA_FINISHED_PASS (LA_FINISH | LA_PASS_ON)
  1029. #define LA_RUNNING LA_BLOCK
  1030. #define LA_RUNNING_PASS (LA_BLOCK | LA_PASS_ON)
  1031. #define LA_OPERATOR_CALLS_SHUTOFF (LA_FINISHED|(1<<5))
  1032. #define LA_EXTRA_TO_PANEL 1
  1033. #define LA_EXTRA_CONFIRM 2
  1034. #define LA_ACTUATOR_SYSTEM 4
  1035. #define LA_ACTUATOR_HIDDEN 8
  1036. #define LA_CONFIRM_OK (1<<10)
  1037. #define LA_CONFIRM_CANCEL (1<<11)
  1038. #define LA_CONFIRM_IGNORE (1<<12)
  1039. #define LA_CONFIRM_DATA (1<<13)
  1040. #define LA_CONFIRM_CUSTOM_STRING (1<<14)
  1041. STRUCTURE(laOperatorType){
  1042. laListItem Item;
  1043. const char *Identifier;
  1044. const char *Name;
  1045. const char *Description;
  1046. const char *ExtraInstructions;
  1047. laInitFunc Init;
  1048. laExitFunc Exit;
  1049. laInvokeFunc Invoke;
  1050. laModalFunc Modal;
  1051. laCheckFunc Check;
  1052. uint32_t IconID;
  1053. laPropContainer* PC;
  1054. laUiDefineFunc UiDefine;
  1055. laOperatorArgumentParserFunc ParseArgs;
  1056. laListHandle Properties;
  1057. int ExtraMark;
  1058. };
  1059. typedef void (*laConfirmDataDestroyFunc)(void *);
  1060. STRUCTURE(laConfirmData){
  1061. int Mode;
  1062. int IData;
  1063. real FData;
  1064. void *CustomData;
  1065. char *StrData;
  1066. laConfirmDataDestroyFunc Destroy;
  1067. };
  1068. STRUCTURE(laOperator){
  1069. laListItem Item;
  1070. int State;
  1071. void *Instance;
  1072. void *CustomData;
  1073. const char *ExtraInstructions;
  1074. laStringSplitor *ExtraInstructionsP;
  1075. laPropPack PP;
  1076. laPropPack *This;
  1077. laConfirmData *ConfirmData;
  1078. laConfirmData *NextConfirmData;
  1079. laOperator *Child;
  1080. laListHandle PropertyStorage;
  1081. laOperatorType *Type;
  1082. laPropPack *CreatedThis;
  1083. int Using;
  1084. int StopNow;
  1085. laPanel *ToPanel;
  1086. laPanel *OperatorPanel;
  1087. laListHandle LocalUiLists;
  1088. laSafeString* RuntimeHint;
  1089. };
  1090. #define LA_JS_MAX_AXES 32
  1091. #define LA_JS_MAX_BUTTONS 128
  1092. STRUCTURE(laController){
  1093. laListItem Item;
  1094. laSafeString* Name;
  1095. laSafeString* Path;
  1096. int fd; //device;
  1097. int NumButtons; int NumAxes; int UserAssignedID; int Error;
  1098. int InternalType; // used to identify models and use specific props.
  1099. int AxisValues[LA_JS_MAX_AXES];
  1100. char ButtonValues[LA_JS_MAX_BUTTONS];
  1101. };
  1102. void la_InitControllers();
  1103. void la_UpdateControllerStatus();
  1104. void la_RegisterControllerProps();
  1105. laPropContainer* laget_ControllerType(laController* c);
  1106. laController* la_FindControllerWithID(int id);
  1107. void la_RegisterInputMapperOperators();
  1108. #define LA_DAG_FLAG_ERR 0
  1109. #define LA_DAG_FLAG_TEMP 1
  1110. #define LA_DAG_FLAG_PERM 2
  1111. void laMappingRequestRebuild();
  1112. void laMappingRequestEval();
  1113. int la_RebuildInputMapping();
  1114. int la_RunInputMapping();
  1115. void laDriverRequestRebuild();
  1116. void laDriverRequestEval();
  1117. int la_RebuildDriverEval();
  1118. int la_RunDrivers();
  1119. void lapost_Node(laBaseNode *bn);
  1120. laBaseNode* la_CreateDriverNode(laNodeRack* ir, laBaseNodeType* NodeType);
  1121. laBaseNode* la_CreateInputMapperNode(laNodeRack* ir, laBaseNodeType* NodeType);
  1122. laPropContainer* laget_BaseNodeType(laBaseNode* bn);
  1123. void laRegisterNode(laBaseNodeType* type, laPropContainer* pc,
  1124. laBaseNodeInitF init, laBaseNodeDestroyF destroy, laBaseNodeVisitF visit, laBaseNodeEvalF eval,
  1125. int nodesize, char* udf_string, char* type_string, char* UiText, int icon);
  1126. void latouched_NodeInSocket(void* unused, int hint);
  1127. #define LA_BASE_NODE_HEADER(uil,c,This) \
  1128. {laSplitColumn(uil,c,0.2);laColumn*c1=laLeftColumn(c,1);c=laRightColumn(c,0);\
  1129. laShowHeightAdjuster(uil,c1,This,"base.__gap",0);}
  1130. #define LA_IDN_REGISTER(uitext,icon,a,pc,init,destroy,visit,eval,type) \
  1131. laRegisterNode(&a,pc,init,destroy,visit,eval,sizeof(type),"UDFRES_" #type, #type, uitext,icon);
  1132. #define LA_SRC_AND_PARENT(socket) \
  1133. ((socket)->Source && (socket)->Source->Parent)
  1134. #define LA_VISIT_NODE(node) \
  1135. {int result=node->Type->Visit(node,l); if(result!=LA_DAG_FLAG_PERM) return LA_DAG_FLAG_ERR;}
  1136. #define LA_GUARD_THIS_NODE(n) \
  1137. {if(n->Base.Eval==LA_DAG_FLAG_PERM) return LA_DAG_FLAG_PERM; if(n->Base.Eval==LA_DAG_FLAG_TEMP) return LA_DAG_FLAG_ERR; n->Base.Eval=LA_DAG_FLAG_TEMP; }
  1138. extern laBaseNodeType LA_IDN_KEYBOARD;
  1139. extern laBaseNodeType LA_IDN_MOUSE;
  1140. extern laBaseNodeType LA_IDN_CONTROLLER;
  1141. extern laBaseNodeType LA_IDN_VISUALIZER;
  1142. extern laBaseNodeType LA_IDN_SPLIT;
  1143. extern laBaseNodeType LA_IDN_SWITCH;
  1144. extern laBaseNodeType LA_IDN_COMBINE;
  1145. extern laBaseNodeType LA_IDN_VALUES;
  1146. extern laBaseNodeType LA_IDN_MATRIX;
  1147. extern laBaseNodeType LA_IDN_MATH;
  1148. extern laBaseNodeType TNS_IDN_TRANSFORM;
  1149. extern laBaseNodeType TNS_IDN_MAKE_TRANSFORM;
  1150. extern laNodeCategory* LA_NODE_CATEGORY_INPUT;
  1151. extern laNodeCategory* LA_NODE_CATEGORY_MATH;
  1152. extern laNodeCategory* LA_NODE_CATEGORY_ROUTE;
  1153. extern laNodeCategory* LA_NODE_CATEGORY_DRIVER;
  1154. extern laNodeCategory* LA_NODE_CATEGORY_AUX;
  1155. extern laNodeCategory* LA_NODE_CATEGORY_COLOR;
  1156. #define LA_VALUES_NODE_FLOAT 0
  1157. #define LA_VALUES_NODE_INT 1
  1158. #define LA_VALUES_NODE_ENUM 2
  1159. #define LA_MATRIX_NODE_OP_MUL 0
  1160. #define LA_MATRIX_NODE_OP_INV 1
  1161. #define LA_MATH_NODE_OP_ADD 0
  1162. #define LA_MATH_NODE_OP_SUB 1
  1163. #define LA_MATH_NODE_OP_MUL 2
  1164. #define LA_MATH_NODE_OP_DIV 3
  1165. #define LA_MATH_NODE_OP_POW 4
  1166. #define LA_MATH_NODE_OP_LOG 5
  1167. #define LA_MATH_NODE_OP_SIN 6
  1168. #define LA_MATH_NODE_OP_COS 7
  1169. #define LA_MATH_NODE_OP_TAN 8
  1170. #define LA_MATH_NODE_OP_ASIN 9
  1171. #define LA_MATH_NODE_OP_ACOS 10
  1172. #define LA_MATH_NODE_OP_ATAN 11
  1173. #define LA_MATH_NODE_OP_ATAN2 12
  1174. #define LA_MATH_NODE_OP_MOD 13
  1175. #define LA_VECTOR_MATH_OP_ADD 0
  1176. #define LA_VECTOR_MATH_OP_SUB 1
  1177. #define LA_VECTOR_MATH_OP_MUL 2
  1178. #define LA_VECTOR_MATH_OP_DIV 3
  1179. #define LA_VECTOR_MATH_OP_POW 4
  1180. #define LA_VECTOR_MATH_OP_LOG 5
  1181. #define LA_VECTOR_MATH_OP_DOT 6
  1182. #define LA_VECTOR_MATH_OP_CROSS 7
  1183. #define LA_VECTOR_MATH_OP_LEN 8
  1184. #define LA_VECTOR_MATH_OP_NORMALIZE 9
  1185. STRUCTURE(laRackPage){
  1186. laListItem Item;
  1187. laSafeString* Name;
  1188. laListHandle Racks;
  1189. int RackType;
  1190. };
  1191. #define LA_RACK_TYPE_INPUT (1<<0)
  1192. #define LA_RACK_TYPE_DRIVER (1<<1)
  1193. #define LA_RACK_TYPE_ALL (LA_RACK_TYPE_DRIVER|LA_RACK_TYPE_INPUT)
  1194. STRUCTURE(laNodeRack){
  1195. laListItem Item;
  1196. laSafeString* Name;
  1197. laListHandle Nodes;
  1198. laRackPage* ParentPage;
  1199. int RackType;
  1200. };
  1201. NEED_STRUCTURE(laInputControllerNode);
  1202. STRUCTURE(laInputControllerNodeSocket){
  1203. laInputControllerNode* Parent;
  1204. laSafeString* Which;
  1205. laNodeOutSocket* Out;
  1206. int Offset;
  1207. int IntVal[8]; real RealVal[8];
  1208. };
  1209. STRUCTURE(laInputControllerNode){
  1210. laBaseNode Base;
  1211. laInputControllerNodeSocket Sockets[8];
  1212. int UserID;
  1213. int Mode;// btn/axis;
  1214. };
  1215. STRUCTURE(laInputVisualizerNode){
  1216. laBaseNode Base;
  1217. laNodeInSocket* In;
  1218. int IntVal[8]; real RealVal[8];
  1219. };
  1220. STRUCTURE(laSplitNodeOutSocket){
  1221. laNodeOutSocket* Out;
  1222. };
  1223. STRUCTURE(laSplitNode){
  1224. laBaseNode Base;
  1225. laNodeInSocket* In;
  1226. laSplitNodeOutSocket Out[8];
  1227. int IntVal[8]; real RealVal[8];
  1228. int ArrLen;
  1229. };
  1230. STRUCTURE(laSwitchNodeInSocket){
  1231. laNodeInSocket* In;
  1232. };
  1233. STRUCTURE(laSwitchNode){
  1234. laBaseNode Base;
  1235. laSwitchNodeInSocket In[8];
  1236. laNodeOutSocket* Out;
  1237. laNodeInSocket* SwitchIn;
  1238. real TempVal;
  1239. int Switch;
  1240. };
  1241. STRUCTURE(laCombineNode){
  1242. laBaseNode Base;
  1243. laSwitchNodeInSocket In[8];
  1244. laNodeOutSocket* Out;
  1245. laNodeOutSocket* OutInt;
  1246. laNodeOutSocket* OutEnum;
  1247. real Values[8]; int ValuesI[8];
  1248. };
  1249. STRUCTURE(laValuesNode){
  1250. laBaseNode Base;
  1251. laSplitNodeOutSocket Out[8];
  1252. real Values[8]; int ValuesI[8], ValuesE[8];
  1253. int Modes[8];
  1254. };
  1255. STRUCTURE(laMatrixNode){
  1256. laBaseNode Base;
  1257. laNodeInSocket *InL,*InR;
  1258. laNodeOutSocket* Out;
  1259. tnsMatrix44d Mat;
  1260. int Operation;
  1261. };
  1262. STRUCTURE(laMathNode){
  1263. laBaseNode Base;
  1264. laNodeInSocket *InL,*InR;
  1265. laNodeOutSocket* Out,*OutInt;
  1266. real Value; int ValueI;
  1267. real ValueL, ValueR;
  1268. int Operation;
  1269. };
  1270. STRUCTURE(laValueMapperPoint){
  1271. laListItem Item;
  1272. real x,y;
  1273. };
  1274. STRUCTURE(laValueMapper){
  1275. real pad;
  1276. laListHandle Points;
  1277. real InRange[2],OutRange[2];
  1278. };
  1279. STRUCTURE(laMapperNode){
  1280. laBaseNode Base;
  1281. laNodeInSocket *In, *InMin, *InMax, *OutMin, *OutMax;
  1282. laNodeOutSocket* Out;
  1283. real rIn,rOut;
  1284. laValueMapper* Mapper;
  1285. int ClampInput, ClampOutput;
  1286. };
  1287. STRUCTURE(laRandomNode){
  1288. laBaseNode Base;
  1289. laNodeOutSocket* Out; real rOut;
  1290. laNodeInSocket *InMin, *InMax;
  1291. real Min,Max;
  1292. };
  1293. STRUCTURE(laVectorMathNode){
  1294. laBaseNode Base;
  1295. laNodeInSocket *InL,*InR;
  1296. laNodeOutSocket* Out;
  1297. real rOut[4];
  1298. int Operation;
  1299. };
  1300. STRUCTURE(laCommentNode){
  1301. laBaseNode Base;
  1302. laSafeString* Content;
  1303. };
  1304. STRUCTURE(laRGB2OKHSLNode){
  1305. laBaseNode Base;
  1306. laNodeInSocket *In;
  1307. laNodeOutSocket* OutH;
  1308. laNodeOutSocket* OutS;
  1309. laNodeOutSocket* OutL;
  1310. real RGB[3];
  1311. real rOut[3];
  1312. };
  1313. STRUCTURE(laOKHSL2RGBNode){
  1314. laBaseNode Base;
  1315. laNodeInSocket *InH;
  1316. laNodeInSocket *InS;
  1317. laNodeInSocket *InL;
  1318. laNodeOutSocket* Out;
  1319. real rOut[3];
  1320. };
  1321. STRUCTURE(laNodeCategory){
  1322. laListItem Item;
  1323. laSafeString* Name;
  1324. laListHandle NodeTypes;//lip
  1325. laUiDefineFunc Ui;
  1326. int For;
  1327. };
  1328. #define LA_INPUT_CONTROLLER_NODE_MODE_BTN 0
  1329. #define LA_INPUT_CONTROLLER_NODE_MODE_AXIS 1
  1330. laValueMapper* laValueMapperInit();
  1331. laValueMapper* laValueMapperDestroy(laValueMapper* vm);
  1332. real laValueMapperEvaluate(laValueMapper* vm, real x, real* force_InMin, real* force_InMax, real* force_OutMin, real* force_OutMax, int ClampIn, int ClampOut);
  1333. void laShowProgress(real p1, real p2);
  1334. void laHideProgress();
  1335. void logPrintT(int Type, char* format, ...);
  1336. void logPrint(char* format, ...);
  1337. void logPrintNew(char* format, ...);
  1338. #ifdef _WIN32
  1339. LRESULT CALLBACK LA_WindowProc(HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam);
  1340. LRESULT CALLBACK LA_ProgressWindowProc(HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam);
  1341. #endif
  1342. void la_RegisterMainOperators();
  1343. void la_RegisterUiOperatorsBasic();
  1344. void la_RegisterBuiltinOperators();
  1345. void la_RegisterModellingOperators();
  1346. void la_RegisterUiTypesBasic();
  1347. void la_RegisterUiTypesViewerWidgets();
  1348. void la_RegisterBuiltinTemplates();
  1349. void la_RegisterWindowKeys();
  1350. void la_RegisterGeneralProps();
  1351. void la_RegisterInternalProps();
  1352. void la_RegenerateWireColors();
  1353. void laui_IntPropInfo(laUiList *uil, laPropPack *Base, laPropPack *UNUSED_This, laColumn *ExtraColumns, int context);
  1354. void laui_FloatPropInfo(laUiList *uil, laPropPack *Base, laPropPack *UNUSED_This, laColumn *ExtraColumns, int context);
  1355. void laui_RackPage(laUiList *uil, laPropPack *This, laPropPack *Extra, laColumn *UNUSED, int context);
  1356. void laui_DefaultPropDetails(laUiList *uil, laPropPack *This, laPropPack *Extra, laColumn *UNUSED, int context);
  1357. void laui_DefaultNodeOperationsPropUiDefine(laUiList *uil, laPropPack *This, laPropPack *OperatorProps, laColumn *UNUSED, int context);
  1358. void laui_DefaultPropUiDefine(laUiList *uil, laPropPack *This, laPropPack *OperatorProps, laColumn *UNUSED, int context);
  1359. void laui_StringPropUiDefine(laUiList *uil, laPropPack *This, laPropPack *Extra, laColumn *UNUSED, int context);
  1360. void laui_IdentifierOnly(laUiList *uil, laPropPack *This, laPropPack *OP_UNUSED, laColumn *Extra, int context);
  1361. void laui_SubPropInfoDefault(laUiList *uil, laPropPack *Base, laPropPack *OperatorInst, laColumn *ExtraColumns, int context);
  1362. void laui_SubPropSelection(laUiList *uil, laPropPack *Base, laPropPack *OperatorInst, laColumn *ExtraColumns, int context);
  1363. void laui_LinkerSelectionProp(laUiList *uil, laPropPack *Base, laPropPack *OperatorInst, laColumn *ExtraColumns, int context);
  1364. void laui_LinkerSelectionInstance(laUiList *uil, laPropPack *Base, laPropPack *OperatorInst, laColumn *ExtraColumns, int context);
  1365. void laui_DefaultOperatorPanelTitleBar(laUiList *uil, laPropPack *Base, laPropPack *OperatorInst, laColumn *ExtraColumns, int context);
  1366. void laui_ColumnItem(laUiList *uil, laPropPack *Base, laPropPack *UNUSED_This, laColumn *UNUSED_Colums, int context);
  1367. void laui_DefaultMenuButtonsFileEntries(laUiList *uil, laPropPack *pp, laPropPack *actinst, laColumn *extracol, int context);
  1368. void laui_DefaultMenuButtonsOptionEntries(laUiList *uil, laPropPack *pp, laPropPack *actinst, laColumn *extracol, int context);
  1369. void laui_DefaultMenuButtons(laUiList *uil, laPropPack *pp, laPropPack *actinst, laColumn *extracol, int context);
  1370. void laui_DefaultMenuExtras(laUiList *uil, laPropPack *pp, laPropPack *actinst, laColumn *extracol, int context);
  1371. void laui_DefaultMenuBarActual(laUiList *uil, laPropPack *pp, laPropPack *actinst, laColumn *extracol, int context);
  1372. void laui_DefaultSubWindowMenuBarActual(laUiList *uil, laPropPack *pp, laPropPack *actinst, laColumn *extracol, int context);
  1373. void laui_ThemeListItem(laUiList *uil, laPropPack *Base, laPropPack *UNUSED_This, laColumn *UNUSED_Colums, int context);
  1374. void laui_Theme(laUiList *uil, laPropPack *Base, laPropPack *UNUSED_This, laColumn *UNUSED_Colums, int context);
  1375. void laui_BoxedThemeItem(laUiList *uil, laPropPack *Base, laPropPack *UNUSED_This, laColumn *UNUSED_Colums, int context);
  1376. void laui_PropertyContainerList(laUiList *uil, laPropPack *Base, laPropPack *UNUSED_This, laColumn *UNUSED_Colums, int context);
  1377. void laui_WindowListItem(laUiList *uil, laPropPack *Base, laPropPack *UNUSED_This, laColumn *UNUSED_Colums, int context);
  1378. void laui_LayoutListItem(laUiList *uil, laPropPack *Base, laPropPack *UNUSED_This, laColumn *UNUSED_Colums, int context);
  1379. void laui_PanelListItem(laUiList *uil, laPropPack *Base, laPropPack *UNUSED_This, laColumn *UNUSED_Colums, int context);
  1380. void laui_InputSocketItem(laUiList *uil, laPropPack *Base, laPropPack *UNUSED_This, laColumn *UNUSED_Colums, int context);
  1381. void laui_OutputSocketItem(laUiList *uil, laPropPack *Base, laPropPack *UNUSED_This, laColumn *UNUSED_Colums, int context);
  1382. void tnsui_GroupItem(laUiList *uil, laPropPack *Base, laPropPack *UNUSED_This, laColumn *UNUSED_Colums, int context);
  1383. void tnsui_ObjectGroupItem(laUiList *uil, laPropPack *Base, laPropPack *UNUSED_This, laColumn *UNUSED_Colums, int context);
  1384. void tnsui_GroupObjectItem(laUiList *uil, laPropPack *Base, laPropPack *UNUSED_This, laColumn *UNUSED_Colums, int context);
  1385. void tnsui_MaterialItem(laUiList *uil, laPropPack *Base, laPropPack *UNUSED_This, laColumn *UNUSED_Colums, int context);
  1386. void laui_FileBrowserFileItem(laUiList *uil, laPropPack *This, laPropPack *OP_UNUSED, laColumn *Extra, int context);
  1387. void laui_FileBrowserDiskItem(laUiList *uil, laPropPack *This, laPropPack *OP_UNUSED, laColumn *Extra, int context);
  1388. void laui_LinkerPanel(laUiList *uil, laPropPack *Base, laPropPack *OperatorInst, laColumn *ExtraColumns, int context);
  1389. void laui_ManagedUDFItem(laUiList *uil, laPropPack *Base, laPropPack *OperatorInst, laColumn *ExtraColumns, int context);
  1390. void laui_ManagedUDFOps(laUiList *uil, laPropPack *Base, laPropPack *OperatorInst, laColumn *ExtraColumns, int context);
  1391. void laui_ManagedProp(laUiList *uil, laPropPack *Base, laPropPack *OperatorInst, laColumn *ExtraColumns, int context);
  1392. void laui_ManagedSavePanel(laUiList *uil, laPropPack *Base, laPropPack *OperatorInst, laColumn *ExtraColumns, int context);
  1393. void laui_ManagedUDFPanel(laUiList *uil, laPropPack *Base, laPropPack *OperatorInst, laColumn *ExtraColumns, int context);
  1394. void laui_FileBrowserFileList(laUiList *uil, laPropPack *THIS_UNUSED, laPropPack *Operator, laColumn *UNUSED, int context);
  1395. void laui_DataRestorePage(laUiList *uil, laPropPack *THIS_UNUSED, laPropPack *Operator, laColumn *UNUSED, int context);
  1396. void laui_ResourceFolderItem(laUiList *uil, laPropPack *Base, laPropPack *OperatorInst, laColumn *ExtraColumns, int context);
  1397. void laui_LogItem(laUiList *uil, laPropPack *Base, laPropPack *OperatorInst, laColumn *ExtraColumns, int context);
  1398. void laui_NodeCategory(laUiList *uil, laPropPack *This, laPropPack *Extra, laColumn *UNUSED, int context);
  1399. int OPINV_UiItem(laOperator *a, laEvent *e);
  1400. int OPEXT_UiItem(laOperator *a, int ExitCode);
  1401. int la_ArrayGetHeight(laUiItem *ui);
  1402. int la_ValueGetHeight(laUiItem*ui);
  1403. int la_3DViewGetHeight(laUiItem *ui);
  1404. int la_CanvasGetHeight(laUiItem *ui);
  1405. int la_EnumGetHeight(laUiItem *ui);
  1406. int la_ColorPickerGetHeight(laUiItem *ui);
  1407. int la_SymbolGetHeight(laUiItem *ui);
  1408. int la_GroupGetHeight(laUiItem *ui);
  1409. laPanel *la_FindFreePanelByTemplate(laWindow *w, const laUiTemplate *uit);
  1410. laUiItem *la_FindUiWithMark(laUiList *uil, char *mark);
  1411. laUiList *la_FindSubListWithInstance(laUiItem *ui, void *Instance);
  1412. #define LA_FILETYPE_UNKNOWN 0
  1413. #define LA_FILETYPE_UDF 1
  1414. #define LA_FILETYPE_DOCUMENT 2
  1415. #define LA_FILETYPE_IMAGE 3
  1416. #define LA_FILETYPE_AUDIO 4
  1417. #define LA_FILETYPE_VIDEO 5
  1418. #define LA_FILETYPE_COMPRESSED 6
  1419. #define LA_FILETYPE_FONT 7
  1420. #define LA_FILETYPE_VECTOR 8
  1421. #define LA_FILETYPE_WEBPAGE 9
  1422. #define LA_FILETYPE_META 10
  1423. #define LA_FILETYPE_BLEND 11
  1424. #define LA_FILETYPE_PDF 13
  1425. #define LA_FILETYPE_EXEC 14
  1426. #define LA_FILETYPE_SYS 15
  1427. #define LA_FILETYPE_FOLDER 16
  1428. #define LA_FILETYPE_LASDEXCHANGE 17
  1429. #define LA_FILE_SELECT_FILE 0
  1430. #define LA_FILE_SELECT_FOLDER 1
  1431. STRUCTURE(laExtensionType){
  1432. laListItem Item;
  1433. int FileType;
  1434. const char* Extension;
  1435. };
  1436. STRUCTURE(laFileItem){
  1437. laListItem Hyper;
  1438. int IsFolder;
  1439. char Name[1024];
  1440. int Size;
  1441. laTimeInfo TimeModified;
  1442. int Type;
  1443. };
  1444. STRUCTURE(laDiskItem){
  1445. laListItem Hyper;
  1446. char ID;
  1447. real Total_GB;
  1448. real Free_GB;
  1449. };
  1450. STRUCTURE(laBookmarkedFolder){
  1451. laListItem Item;
  1452. char Name[128];
  1453. char Path[1024];
  1454. };
  1455. STRUCTURE(laFileBrowser){
  1456. laListItem Hyper;
  1457. char Path[1024];
  1458. char FileName[512];
  1459. laDiskItem *RootDisk;
  1460. laFileItem *Active;
  1461. laListHandle FileList;
  1462. laListHandle Bookmarks;
  1463. laListHandle Disks;
  1464. int SelectFolder;
  1465. int WarnFileExists;
  1466. int StatusWaitingWarning;
  1467. char UseExtension[64];
  1468. int UseType;
  1469. int FilterType;
  1470. laStringSplitor* ss_filter_extensions;
  1471. };
  1472. STRUCTURE(laUDFPreviewExtra){
  1473. laUDF *UDF;
  1474. laListHandle ContentNodes;
  1475. int Opened;
  1476. int Append;
  1477. };
  1478. STRUCTURE(laManagedSaveExtra){
  1479. int ShowPage;
  1480. int OnExit;
  1481. };
  1482. #define LA_UDF_SHARE_POINTER(id) \
  1483. la_UDFAppendSharedTypePointer("" #id, id)
  1484. void la_MakeTranslations();
  1485. laCanvasTemplate *la_GetCanvasTemplate(char *TargetContainerID, char* TemplateID);
  1486. laPropContainer* laUiHasExtraProps(laUiType *ut, int size, int Hyper);
  1487. laPropContainer* laCanvasHasExtraProps(laCanvasTemplate *ct, int size, int Hyper);
  1488. laUiType *la_RegisterUiType(const char *Identifer, int ForType, const char *UseOperator, laBoxedTheme **bt, laUiDrawFunc *Draw, laUiGetHeightFunc GetHeight, laUiInitFunc Init, laUiDestroyFunc Destroy);
  1489. void laSetWindowCursor(int id);
  1490. void laRenameWindow(laWindow* wnd, char* name);
  1491. void la_ScanWacomDevices(SYSTEMDISPLAY *display, int deviceid);
  1492. void laSetFontFolderPath(char* absolute);
  1493. int laGetReady();
  1494. int laGetReadyWith(int GLMajor, int GLMinor, int BufferSamples);
  1495. void laShutoff(int SavePreferences);
  1496. void laSaveUserPreferences();
  1497. void laEnsureUserPreferences();
  1498. void laAddExtraExtension(int FileType, ...);
  1499. void laAddExtraPreferencePath(const char* path);
  1500. void laAddExtraPreferencePage(const char* name, laUiDefineFunc Func);
  1501. void laSetFrameCallbacks(laPreFrameF PreFrame, laPreDrawF PreDraw, laPostFrameF PostFrame);
  1502. void laSetCleanupCallback(laCleanupF Cleanup);
  1503. void laSetMenuBarTemplates(laUiDefineFunc MenuButtons, laUiDefineFunc MenuExtras, const char* ProgramName);
  1504. void laSetAboutTemplates(laUiDefineFunc AboutContent, laUiDefineFunc AboutVersion, laUiDefineFunc AboutAuthor);
  1505. void laSetPreferenceTemplates(laUiDefineFunc PreferencePageDisplay, laUiDefineFunc PreferencePageInput, laUiDefineFunc PreferencePageResource, laUiDefineFunc PreferencePageTheme);
  1506. laWindow *laDesignWindow(int X, int Y, int W, int H);
  1507. laLayout *laDesignLayout(laWindow *w, char *Title);
  1508. void laDestroyLayout(laWindow *w, laLayout* l);
  1509. void laFoldBlockTitle(laBlock* b);
  1510. void laUnfoldBlockTitle(laBlock* b);
  1511. void laMaximizeBlock(laBlock* b);
  1512. void laRestoreToLayout();
  1513. void laMaximizeCanvasUI(laUiItem* ui, laPanel* UiParentPanel);
  1514. void laRestoreCanvasUI();
  1515. void laHideMenuBar();
  1516. void laShowMenuBar();
  1517. void laSplitBlockHorizon(laBlock *b, real Percentage);
  1518. void laSplitBlockVertical(laBlock *b, real Percentage);
  1519. void laCombineChildBlocks(laBlock *b);
  1520. laBlock *laBlock1(laBlock *b);
  1521. laBlock *laBlock2(laBlock *b);
  1522. laBlock *laSwapSubBlocks(laBlock *b);
  1523. void laDestroyBlocksRecursive(laBlock *Root);
  1524. laPanel* laTearOffPanel(laBlock* b, laPanel* p_if_set);
  1525. void laDockPanel(laWindow* from, laBlock* b, laPanel* p);
  1526. laPanel *laCreatePanel(laBlock *b, char *template_id);
  1527. laPanel *laCreateTopPanel(laWindow *w, char *template_id, int X, int Y, int W, int H, int MaxW, int MaxH, int MinW, int MinH, int SnapL, int SnapR, int SnapT, int SnapB);
  1528. void laShowPanel(laPanel *p);
  1529. void laShowPanelWithDropDownEffect(laPanel *p);
  1530. void laShowPanelWithExpandEffect(laPanel *p);
  1531. void laHidePanel(laPanel *p);
  1532. void laHidePanelWithDissoveEffect(laPanel *p);
  1533. void laActivatePanel(char* TemplateID, int x, int y);
  1534. void laPanPanel(laPanel *p, int DeltaX, int DeltaY);
  1535. int laPanUiListFree(laUiList *uil, int X, int Y);
  1536. int laPanUiList(laUiList *uil, int X, int Y, int L, int R, int U, int B);
  1537. int laPanUiListAuto(laUiList *uil, int X, int Y, int L, int R, int U, int B);
  1538. int laScaleUiList(laUiList *uil, real factor, int L, int R, int U, int B);
  1539. laPanel *laDesignPropPanel(char *Title, int X, int Y, int W, int H,
  1540. laUiDefineFunc Define, laPropPack *This, laPropPack *OperatorProps);
  1541. laPanel *laDesignOperatorPanel(char *Title, int X, int Y, int W, int H, int MaxW, int MaxH, int MinW, int MinH, int SnapL, int SnapR, int SnapT, int SnapB,
  1542. laUiDefineFunc Define, laPropPack *This, laPropPack *OperatorProps);
  1543. void laDeferedDestroyPanel(laPanel *p);
  1544. void laDestroySinglePanel(laPanel *p, int immediate);
  1545. void laEnsurePanelInBound(laPanel *p,laUiList* uil);
  1546. int laEnclosePanelContent(laPanel *p, laUiList *uil);
  1547. laPanel *laEnableIdlePanel(laPanel *Attachment, laOperator *a, laPropPack *OperatorProps, laUiDefineFunc ReplaceUiDefine, laPropPack *This,
  1548. int L, int R, int B, int MaxGH, int MaxW, laEvent *e);
  1549. laPanel *laEnableSplashPanel(laUiDefineFunc ReplaceUiDefine, int L, int R, int B, int MaxGH, int MaxW, laEvent* e);
  1550. laPanel *laEnablePropertyPanel(laPanel *Attachment, laOperator *a, laPropPack *OperatorProps, laUiDefineFunc ReplaceUiDefine, laUiDefineFunc FallBackUiDefine, laPropPack *This,
  1551. int L, int R, int B, int MaxGH, int MaxW, laEvent *e);
  1552. laPanel *laEnableEmptyPropertyPanel(laPanel *Attachment, laOperator *a, int L, int R, int U, int MaxGH, laEvent *e);
  1553. laPanel *laEnableMenuPanel(laPanel *Attachment, laOperator *a, laUiList *MenuRefer, laPropPack *This,
  1554. int L, int R, int B, int MaxGH, int MaxW, laEvent *e);
  1555. laPanel *laDefineAndEnableMenuPanel(laPanel *Attachment, laOperator *a, laPropPack *This,
  1556. int L, int B, int MaxGH, int MaxW, laEvent *e);
  1557. laPanel *laEnableOperatorPanel(laOperator *For, laPropPack *This, int X, int Y, int W, int H, int MaxW, int MaxH, int MinW, int MinH, int SnapL, int SnapR, int SnapT, int SnapB, laEvent *e);
  1558. laPanel *laEnableYesNoPanel(laOperator *a, laPanel *Attachment, char *Title, char *Message, int X, int Y, int W, laEvent *e);
  1559. laPanel *laEnableMessagePanel(laOperator *a, laPanel *Attachment, char *Title, char *Message, int X, int Y, int W, laEvent *e);
  1560. laPanel *laEnableMultiMessagePanel(laOperator *a, laPanel *Attachment, char *Title, laPanelMessageList *pml, int X, int Y, int W, laEvent *e);
  1561. void laAddPanelMessage(laPanelMessageList *pml, char *Message);
  1562. void la_PropPanelUserRemover(void* This, laItemUserLinker* iul);
  1563. void la_EnsurePanelExtras(laPanel *p);
  1564. void laRedrawAllWindows();
  1565. void laRefreshWindow();
  1566. void laRedrawCurrentWindow();
  1567. void laRedrawPanel(laPanel* p);
  1568. void laRecalcPanel(laPanel* p);
  1569. void laRedrawCurrentPanel();
  1570. void laRecalcCurrentPanel();
  1571. void laRecalcPanelImmediate(laPanel *p);
  1572. void laRecalcCurrentPanelImmediate();
  1573. int laNonFixedPanelExists(laPanel *p);
  1574. int laIsInPanel(laPanel *p, int PanelX, int PanelY);
  1575. int laIsCloseToPanel(laPanel *p, int PanelX, int PanelY);
  1576. void laPopPanel(laPanel *p);
  1577. int laPanelOverlappingEachOther(laPanel *p1, laPanel *p2);
  1578. void laUnlinkSharedPanel(laPanel *p);
  1579. int laIsPanelCovered(laPanel *p);
  1580. int laIsTopPanel(laPanel *p);
  1581. laPanel *laDetectPanel(int X, int Y);
  1582. void laWindowToLocal(laOperator *a, laPanel *p, int *x, int *y);
  1583. void laPanelToLocal(laOperator *a, int *x, int *y);
  1584. void laLocalToWindow(laOperator *a, laPanel *p, int *x, int *y);
  1585. void laLocalToPanel(laOperator *a, int *x, int *y);
  1586. void laSetNextMenuPos(int X, int Y, int W, int H);
  1587. int laIsInBlock(laBlock *b, int X, int Y);
  1588. int laIsInBlockHeader(laBlock *b, int X, int Y);
  1589. int laIsInBlockBotton1(laBlock *b, int X, int Y);
  1590. int laIsInBlockBotton2(laBlock *b, int X, int Y);
  1591. laBlock *laClearBlockButtonRecursive(laBlock *b, laBlock *except);
  1592. laBlock *laDetectBlockRecursive(laBlock *b, int X, int Y);
  1593. laUiList *laPrepareUi(laPanel *p);
  1594. laColumn *laFirstColumn(laUiList *uil);
  1595. laColumn *laSplitColumn(laUiList *uil, laColumn *c, real Percent);
  1596. laColumn *laSplitColumnDescriptor(laUiDescriptor *ud, laColumn *c, real Percent);
  1597. laColumn *laLeftColumn(laColumn *c, int MaxWidth);
  1598. laColumn *laRightColumn(laColumn *c, int MaxWidth);
  1599. int laCheckAndMergeSubColumnsUiList(laUiList *TopUil, laColumn *c, int DoMerge);
  1600. int laCheckAndMergeSubColumnsDescriptor(laUiDescriptor *TopDescriptor, laColumn *c, int DoMerge);
  1601. laUiConditionNode *laTrue();
  1602. laUiConditionNode *laFalse();
  1603. laUiConditionNode *laPropExpression(laPropPack *Base, char *Prop);
  1604. laUiConditionNode *laIntExpression(int Value);
  1605. laUiConditionNode *laFloatExpression(real Value);
  1606. laUiConditionNode *laStringExpression(char *Content);
  1607. laUiConditionNode *laAnd(laUiConditionNode *Expression1, laUiConditionNode *Expression2);
  1608. laUiConditionNode *laOr(laUiConditionNode *Expression1, laUiConditionNode *Expression2);
  1609. laUiConditionNode *laNot(laUiConditionNode *Expression1);
  1610. laUiConditionNode *laEqual(laUiConditionNode *Expression1, laUiConditionNode *Expression2);
  1611. laUiConditionNode *laGreaterThan(laUiConditionNode *Expression1, laUiConditionNode *Expression2);
  1612. laUiConditionNode *laLessThan(laUiConditionNode *Expression1, laUiConditionNode *Expression2);
  1613. laUiConditionNode *laGreaterEqual(laUiConditionNode *Expression1, laUiConditionNode *Expression2);
  1614. laUiConditionNode *laLessEqual(laUiConditionNode *Expression1, laUiConditionNode *Expression2);
  1615. laUiItem *laShowLabel(laUiList *uil, laColumn *c, const char *Content, laUiDefineFunc Template, laWidget* Widget);
  1616. laUiItem *laShowLabelDynamic(laUiList *uil, laColumn *c, const char *Content, laUiDefineFunc Template, laWidget* Widget);
  1617. laUiItem *laShowIcon(laUiList *uil, laColumn *c, laPropPack *Base, const char *Path, laWidget* Widget);
  1618. laUiItem *laShowItem(laUiList *uil, laColumn *c, laPropPack *Base, const char *Path);
  1619. laUiItem *laShowItemFull(laUiList *uil, laColumn *c, laPropPack *Base, const char *Path, laWidget* Widget, char* instructions, laUiDefineFunc Template, int TemplateContext);
  1620. laUiItem *laShowImage(laUiList *uil, laColumn *c, tnsImage* Image, int Height);
  1621. laUiItem *laShowNodeSocket(laUiList *uil, laColumn *c, laPropPack *Base, const char *Path, char* instructions);
  1622. laUiItem *laShowHeightAdjuster(laUiList *uil, laColumn *c, laPropPack *Base, const char *Path, char* instructions);
  1623. laUiItem *laShowDetachedItem(laPanel *p, laUiList *uil, laColumn *c, laPropPack *Base, const char *Path, const char *Rename, laUiDefineFunc Template, laWidget* Widget);
  1624. laUiItem *laShowCanvas(laUiList *uil, laColumn *c, laPropPack *Base, const char *Path, const char *id2DTemplate, int Height);
  1625. laUiItem *laShow2DContainerItem(laUiList *uil, laColumn *c, laPropPack *Base, const char *Path, int Height);
  1626. void laDefault3DViewOverlay(laUiItem *ui);
  1627. void laDefault2DViewOverlayRight(laUiItem *ui);
  1628. laUiItem *laShowColumnAdjuster(laUiList *uil, laColumn *c);
  1629. laUiItem *laShowSymbol(laUiList *uil, laColumn *c, int SymbolID, int Height);
  1630. laUiItem *laBeginRow(laUiList *uil, laColumn *c, int Expand, int Even);
  1631. laUiItem *laEndRow(laUiList *uil, laUiItem* Begin);
  1632. laUiItem *laMakeGroup(laUiList *uil, laColumn *c, const char *Name, laWidget* Widget);
  1633. laUiItem *laMakeFoldableGroup(laUiList *uil, laColumn *c, const char *Name, laWidget* Widget, int DefaultFolded, int ButtonFlags);
  1634. laUiItem *laMakeEmptyGroup(laUiList *uil, laColumn *c, const char *Name, laWidget* Widget);
  1635. void laEndFoldableGroup(laUiList *sub, laUiItem *group);
  1636. laUiItem *laMakeTab(laUiList *uil, laColumn *c, laWidget* Widget);
  1637. laUiList *laAddTabPage(laUiItem *ui, const char *Name);
  1638. laUiItem *laOnConditionThat(laUiList *uil, laColumn *c, laUiConditionNode *Expression);
  1639. laUiItem *laOnConditionToggle(laUiList *uil, laColumn *col, laUiDefineFunc define, int Remove, laPropPack *ExtraBase, laPropPack *ExtraThis, laWidget* Widget);
  1640. laUiItem *laEndCondition(laUiList *uil, laUiItem *Beginner);
  1641. laUiItem *laElse(laUiList *uil, laUiItem *Beginner);
  1642. laUiList *laMakeMenuPage(laUiList *uil, laColumn *c, const char *Title);
  1643. laUiItem *laShowSeparator(laUiList *uil, laColumn *widest);
  1644. void laFixHeight(laUiList *uil, short Rows);
  1645. void la_ConditionerInit(laUiItem *ui, laUiConditionNode *Expression);
  1646. void laMakeExtraColumns(laUiItem *ui, u8bit HowMany, ...);
  1647. int la_UiInBoundEx(laUiItem *ui, laUiListDraw *uild);
  1648. void la_DestroyUiRange(laUiList *uil, laUiItem *Begin, laUiItem *End);
  1649. void la_ClearUiSpecificData(laUiItem *ui);
  1650. laUiItem *la_UpdatePropDisplay(laUiItem *ui, laPropPack *Base, const char *Path, laUiDefineFunc Template, laWidget* Widget, char* instructions);
  1651. laUiItem *la_UpdateLabelDisplay(laUiItem *ui, laUiDefineFunc Template, char *Content);
  1652. laUiItem *la_ShowGeneralPropItem(laUiList *uil, laColumn *c, laPropPack *Base, laProp *GeneralProp, laProp *p, laUiDefineFunc Template, laWidget* Widget);
  1653. void laFinalizeUiTemplates();
  1654. laUiTemplate *laFindUiTemplate(char *Identifier);
  1655. void la_DestroyUiTemplate(laUiTemplate* uit);
  1656. void la_DestroyCanvasTemplate(laCanvasTemplate* uit);
  1657. laUiTemplate *laRegisterUiTemplate(char *Identifier, char* Title, laUiDefineFunc func,laPanelDetachedPropFunc PropFunc, laUiDefineFunc header, char* NewCategory, int DefaultGLFormat, int DefaultW_RH, int DefaultH_RH);
  1658. laCanvasTemplate *laRegisterCanvasTemplate(char *Identifier, char *ForContainer, laModalFunc ExtraModal, laCanvasDrawFunc Func, laUiDrawFunc SecondDraw, laUiInitFunc CustomInit, laUiDestroyFunc CustomDestroy);
  1659. void laGet2DViewRange(laCanvasExtra *e, int *L, int *R, int *U, int *B);
  1660. void laGet2DViewRanged(laCanvasExtra *e, real *L, real *R, real *U, real *B);
  1661. void laGet2DViewRangeW(laCanvasExtra *e, int *L, int *R);
  1662. void laGet2DViewRangeWd(laCanvasExtra *e, real *L, real *R);
  1663. void la_DestroyTheme(laTheme* t);
  1664. laTheme *laDesignTheme(const char *Name, const char *AuthorName);
  1665. laBoxedTheme *laDesignBoxedTheme(laTheme *t, const char *Name, laBoxedTheme** BackRef,
  1666. real NormalY,real ActiveY,real BorderY,real TextY,real TextActiveY, real Alpha,
  1667. real TopMargin, real LeftMargin, real RightMargin, real BottomMargin,
  1668. real TopPadding, real LeftPadding, real RightPadding, real BottomPadding);
  1669. laTheme *laGetTheme(const char *ThemeName);
  1670. laBoxedTheme *laGetBoxedTheme(const char *ThemeName, const char *BoxName);
  1671. real* laThemeColor(laBoxedTheme* bt, int which);
  1672. real* laAccentColor(int which);
  1673. void la_RefreshBoxedThemeColor(laBoxedTheme* bt);
  1674. void la_RefreshThemeColorSelf(laTheme* th);
  1675. void la_RefreshThemeColor(laTheme* th);
  1676. #define LA_COLOR4(c) (c)[0], (c)[1], (c)[2], (c)[3]
  1677. #define LA_COLOR3(c) (c)[0], (c)[1], (c)[2]
  1678. #define LA_VEC2(c) (c)[0], (c)[1]
  1679. #define LA_SET3(c, a1,a2,a3) { (c)[0]=a1; (c)[1]=a2; (c)[2]=a3; }
  1680. #define LA_COLOR3_TO_HEX(c) (((int)((c)[0]*255)<<16)|((int)((c)[1]*255)<<8)|((int)((c)[2]*255)<<0))
  1681. #define LA_COLOR3_TO_RGB(c) (RGB((int)((c)[0]*255),(int)((c)[1]*255),(int)((c)[2]*255)))
  1682. int laIsInUiItem(laUiItem *ui, int x, int y);
  1683. int laIsInBound(int x, int y, int l, int r, int u, int b);
  1684. laUiItem *la_DetectUiItemRecursive(laUiList *uil, int x, int y, int LimB, laListHandle *LocalBuf, int Deep);
  1685. laUiItem *la_DetectSocketRecursive(laUiList* uil, int x, int y, int LimB, laPropContainer* PCInOrOut);
  1686. laUiList *la_DetectUiListRecursive(laUiList *uil, int x, int y, int LimH,
  1687. laUiItem **ParentUi, laUiList **ScrollUil, laUiList **ContainerParent, int InToContainerUI, laUiItem *Exception);
  1688. laUiList *la_DetectUiListRecursiveDeep(laUiList *uil, int x, int y, int LimH, laUiItem **ParentUi, laUiList **ScrollUil,
  1689. laUiList **ContainerParent, int InToContainerUI, laUiItem *Exception, laListHandle* levels);
  1690. int laStartWindow(laWindow *w);
  1691. void laMainLoop();
  1692. void la_DestroyOperatorType(laOperatorType* at);
  1693. laOperatorType *laCreateOperatorType(const char *ID, const char *Name, const char *Description,
  1694. laCheckFunc Check, laInitFunc Init, laExitFunc Exit, laInvokeFunc Invoke, laModalFunc Modal,
  1695. uint32_t IconID, int ExtraMark);
  1696. laPropContainer* laDefineOperatorProps(laOperatorType* ot, int HyperLevel);
  1697. laNodeOutSocket* laCreateOutSocket(void* NodeParentOptional, char* label, int DataType);
  1698. laNodeInSocket* laCreateInSocket(char* label, int DataType);
  1699. void laDestroyInSocket(laNodeInSocket* s);
  1700. void laDestroyOutSocket(laNodeOutSocket* s);
  1701. laNodeCategory* laAddNodeCategory(char* Name,laUiDefineFunc* Ui,int ForRackTypes);
  1702. void laNodeCategoryAddNodeTypes(laNodeCategory* nc, ...);
  1703. void laFreeKeyMapItem(laKeyMapItem* kmi);
  1704. laKeyMapItem *laAssignNewKey(laKeyMapper *km, char *Path, char *Operation, char SelectBase, int SpecialKeyBits, int EventType, int Key, char *ExtraInstructions);
  1705. int laKeyMapExecuteEvent(laOperator *from, laKeyMapper *km, laEvent *e);
  1706. int laKeyMapExecuteEventEx(laOperator *from, laPropPack *UiExtra, laKeyMapper *km, laEvent *e);
  1707. laOperatorType *laGetOperatorType(const char *ID);
  1708. void laSetOperatorLocalizer(void *ToPanel);
  1709. int laOperatorAvailable(char *ID, laPropPack *This, laStringSplitor *Instructions);
  1710. int laOperatorAvailableP(laOperatorType *at, laPropPack *This, laStringSplitor *Instructions);
  1711. int laOperatorAvailableSafe(char *ID, laPropPack *This, void *Real_FromInstance, laStringSplitor *Instructions);
  1712. int laOperatorAvailablePSafe(laOperatorType *at, laPropPack *This, void *Real_FromInstance, laStringSplitor *Instructions);
  1713. void laSendOperatorTriggerEvent();
  1714. void laRetriggerOperators();
  1715. int la_GenericTopPanelProcessing(laOperator* a, laEvent* e);
  1716. int OPMOD_FinishOnData(laOperator* a, laEvent* e);
  1717. void laHideCursor();
  1718. void laShowCursor();
  1719. int la_UiOperatorExists(void *inst);
  1720. int laOperatorExistsT(laOperatorType* at);
  1721. int laOperatorExists(const char* ID);
  1722. int laInvokeUi(laOperator *From, char *ID, laEvent *e, void *inst, laListHandle *Locals, int IgnoreLocals);
  1723. int laInvokeUiP(laOperator *From, laOperatorType *at, laEvent *e, void *inst, laListHandle *Locals, int IgnoreLocals);
  1724. int laInvoke(laOperator *From, char *ID, laEvent *e, laPropPack *This, char *args, char *args2);
  1725. int laInvokeP(laOperator *From, laOperatorType *at, laEvent *e, laPropPack *This, char *args, char *args2);
  1726. int laInvokePCreateThis(laOperator *From, laOperatorType *at, laEvent *e, laPropPack *OrigionalThis, void *FromInstance, char *args, char *args2);
  1727. void laRequestDelayEvent(real Seconds);
  1728. int la_UiStillInService(void *UiInstance);
  1729. void la_StopUiOperatorService(void *UiInstance);
  1730. void la_StopAllOperators();
  1731. int la_ProcessTextEdit(laEvent *e, laStringEdit *se, laUiItem* ui);
  1732. void laConfirmInt(laOperator *a, int Data, int mode);
  1733. void laConfirmFloat(laOperator *a, real Data, int mode);
  1734. void laConfirmString(laOperator *a, char *Str, int mode);
  1735. int laConfirmSameDataIfAny(laOperator *a);
  1736. void laConfirmUserData(laOperator *a, void *UserData, laConfirmDataDestroyFunc Destroy, int mode);
  1737. int laGetConfirmInt(laOperator *a);
  1738. real laGetConfirmFloat(laOperator *a);
  1739. void laGetConfirmString(laOperator *a, char *buf);
  1740. void *laGetConfirmUserData(laOperator *a);
  1741. //int laInvokeSub(laProp* From, char * ID, laEvent* e, void* inst);
  1742. void laFinalizeOperators();
  1743. int laWaitFor(laOperator *Who, int State);
  1744. void la_PrintOperatorStack();
  1745. void laui_DefaultPanelTitleBar(laUiList *uil, laPropPack *Base, laPropPack *Extra, laUiDefineFunc header);
  1746. void laui_DefaultOperatorPanelTitleBar(laUiList *uil, laPropPack *Base, laPropPack *OperatorInst, laColumn *ExtraColumns, int context);;
  1747. void laui_DefaultSubWindowMenuBarActual(laUiList *uil, laPropPack *pp, laPropPack *actinst, laColumn *extracol, int context);;
  1748. void laui_DefaultMenuBarActual(laUiList *uil, laPropPack *pp, laPropPack *actinst, laColumn *extracol, int context);;
  1749. void laui_DefaultMenuBar(laWindow *w);
  1750. void laui_DefaultSubWindowMenuBar(laWindow *w);
  1751. void laui_DefaultPropUiDefine(laUiList *uil, laPropPack *This, laPropPack *OperatorProps, laColumn *UNUSED, int context);;
  1752. int laCopyToClipboard(unsigned char * text);
  1753. extern laUiType *_LA_UI_FIXED_GROUP;
  1754. extern laUiType *_LA_UI_TAB;
  1755. extern laUiType _LA_UI_CONDITION; //NO PTR
  1756. extern laUiType _LA_UI_CONDITION_END; //NO PTR
  1757. extern laUiType _LA_UI_CONDITION_ELSE; //NO PTR
  1758. extern laUiType _LA_UI_ROW_BEGIN; //NO PTR
  1759. extern laUiType _LA_UI_ROW_END; //NO PTR
  1760. extern laUiType *_LA_UI_COLLECTION;
  1761. extern laUiType *_LA_UI_COLLECTION_ITEM;
  1762. extern laUiType *_LA_UI_COLLECTION_SELECTOR;
  1763. extern laUiType *_LA_UI_COLLECTION_SINGLE;
  1764. extern laUiType *_LA_UI_BUTTON;
  1765. extern laUiType *_LA_UI_LABEL;
  1766. extern laUiType *_LA_UI_INT;
  1767. extern laUiType *_LA_UI_VALUE_METER;
  1768. extern laUiType *_LA_UI_VALUE_METER_2D;
  1769. extern laUiType *_LA_UI_FLOAT;
  1770. extern laUiType *_LA_UI_FLOAT_COLOR;
  1771. extern laUiType *_LA_UI_FLOAT_COLOR_HCY;
  1772. extern laUiType *_LA_UI_ENUM_SELECTOR;
  1773. extern laUiType *_LA_UI_MENU_ROOT;
  1774. extern laUiType *_LA_UI_CONDITION_TOGGLE;
  1775. extern laUiType *_LA_UI_STRING;
  1776. extern laUiType *_LA_UI_STRING_MULTI;
  1777. extern laUiType *_LA_UI_ALIGN;
  1778. extern laUiType *_LA_UI_CANVAS;
  1779. extern laUiType *_LA_UI_COLUMN_ADJUSTER;
  1780. extern laUiType *_LA_UI_SYMBOL;
  1781. extern laUiType *_LA_UI_COLUMN_VIEWER;
  1782. extern laUiType *_LA_UI_NODE_SOCKET;
  1783. extern laUiType *_LA_UI_HEIGHT_ADJUSTER;
  1784. extern laUiType *_LA_UI_RAW;
  1785. extern laUiType *_LA_UI_MAPPER;
  1786. extern laUiType *_LA_UI_IMAGE;
  1787. extern laUiDescriptor _LA_UI_DESCRIPTOR_REF_UI;
  1788. extern laUiDescriptor _LA_UI_DESCRIPTOR_REF_UIE;
  1789. extern laUiDescriptor _LA_UI_DESCRIPTOR_REF_P;
  1790. extern laUiDescriptor _LA_UI_DESCRIPTOR_REF_PE;
  1791. extern laUiDescriptor _LA_UI_DESCRIPTOR_REF_BASE;
  1792. extern laUiDescriptor _LA_UI_DESCRIPTOR_REF_ACT;
  1793. extern laUiDefineFunc _LA_SUBPROP_DONT_CARE;
  1794. extern laBoxedTheme *_LA_THEME_PANEL;
  1795. extern laBoxedTheme *_LA_THEME_VALUATOR;
  1796. extern laBoxedTheme *_LA_THEME_BUTTON;
  1797. extern laBoxedTheme *_LA_THEME_STRING;
  1798. extern laBoxedTheme *_LA_THEME_SELECTOR;
  1799. extern laBoxedTheme *_LA_THEME_COLLECTION_SELECTOR;
  1800. extern laBoxedTheme *_LA_THEME_LABEL;
  1801. extern laBoxedTheme *_LA_THEME_TAB;
  1802. extern laBoxedTheme *_LA_THEME_COLLECTION_GROUP;
  1803. extern laBoxedTheme *_LA_THEME_COLLECTION_ITEM;
  1804. extern laBoxedTheme *_LA_THEME_FLOATING_PANEL;
  1805. extern laBoxedTheme *_LA_THEME_3D_VIEW;
  1806. extern laBoxedTheme *_LA_THEME_2D_VIEW;
  1807. extern laBoxedTheme *_LA_THEME_SOCKET;
  1808. extern laProp *_LA_PROP_PANEL;
  1809. extern laProp *_LA_PROP_BLOCK;
  1810. extern laProp *_LA_PROP_WINDOW;
  1811. extern laProp *_LA_PROP_UI_ITEM;
  1812. extern laProp *_LA_PROP_FAILED_ITEM;
  1813. extern laProp *_LA_PROP_TRASH_ITEM;
  1814. extern laProp *_LA_PROP_NODE_GRAPH;
  1815. extern laPropContainer *_LA_PROP_3D_EXTRA;
  1816. extern laPropContainer *_LA_PROP_2D_EXTRA;
  1817. extern laPropContainer *_LA_PROP_FILE_BROWSER;
  1818. extern laProp _P_LA_USE_INSTANCE_ONLY;
  1819. #define _LA_USE_INSTANCE_ONLY (&_P_LA_USE_INSTANCE_ONLY)
  1820. #define LA_CARE_ALL64 (~(0ull))
  1821. #define LA_CARE_ALL32 (~(0ull))
  1822. #define LA_MATCH_INSTANCE (1ull << 63)
  1823. #define LA_IN_USER_PREF (1ull << 62)
  1824. #define LA_IN_LIVE_EDIT (1ull << 61)
  1825. #define LA_IN_PANEL (1ull << 60)
  1826. #define LA_IN_WINDOW (1ull << 59)
  1827. #define LA_IN_LAYOUT (1ull << 58)
  1828. #define LA_USER_THEME (1ull << 63)
  1829. #define LA_USER_THEME_SIZE (1ull << 62)
  1830. #define LA_USER_THEME_COLOR (1ull << 61)
  1831. #define LA_USER_DISPLAY (1ull << 60)
  1832. #define LA_LIVE_PATH (1ull << 63)
  1833. #define LA_LIVE_TYPE (1ull << 62)
  1834. #define LA_LIVE_THEME (1ull << 61)
  1835. #define LA_LIVE_EXTRA (1ull << 60)
  1836. #define LA_WINDOW_INFO (1ull << 63)
  1837. #define LA_LAYOUT_INFO (1ull << 63)
  1838. #define LA_UI_INTERNAL_BUTTON 1
  1839. #define LA_UI_INTERNAL_WATCHER 2
  1840. #define LA_UI_INTERNAL_GROUP 3
  1841. #define LA_UI_INTERNAL_TAB 4
  1842. #define LA_UI_INTERNAL_LABEL 5
  1843. #define LA_UI_INTERNAL_3D_VIEW 6
  1844. #define LA_UI_INTERNAL_2D_VIEW 7
  1845. #define LA_UI_INTERNAL_ADJUSTER 8
  1846. #define LA_UI_INTERNAL_BRACKET_BEGIN 9
  1847. #define LA_UI_INTERNAL_BRACKET_ELSE 10
  1848. #define LA_UI_INTERNAL_FOLDER_BEGIN 11
  1849. #define LA_UI_INTERNAL_BRACKET_END 12
  1850. #define LA_UI_INTERNAL_ALIGNER 13
  1851. #define LA_UI_INTERNAL_MENU 14
  1852. #define LA_UI_INTERNAL_SYMBOL 15
  1853. #define LA_RH0 (MAIN.UiRowHeight)
  1854. #define LA_RH (MAIN.ScaledUiRowHeight)
  1855. #define LA_2RH (MAIN.ScaledUiRowHeight*2)
  1856. #define LA_RH2 ((int)(MAIN.ScaledUiRowHeight/2))
  1857. #define LA_SCROLL_W ((int)(MAIN.ScaledUiRowHeight * 0.67))
  1858. #define LA_SEAM_W ((int)(MAIN.ScaledUiRowHeight * 0.15))