*/}}

la_interface.h 71 KB

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