xforms.pp 106 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916
  1. {
  2. }
  3. {$IFNDEF FPC_DOTTEDUNITS}
  4. Unit xforms;
  5. {$ENDIF FPC_DOTTEDUNITS}
  6. Interface
  7. {$linklib forms}
  8. {$linklib c}
  9. {$linklib m}
  10. {$IFDEF FPC_DOTTEDUNITS}
  11. uses
  12. Api.X11.X,Api.X11.Xlib,Api.X11.Xutil,Api.X11.Xresource;
  13. {$ELSE FPC_DOTTEDUNITS}
  14. uses
  15. x,xlib,xutil,xresource;
  16. {$ENDIF FPC_DOTTEDUNITS}
  17. const
  18. FL_VERSION=0;
  19. FL_REVISION=88;
  20. FL_FIXLEVEL=0;
  21. FL_INCLUDE_VERSION=FL_VERSION * 1000 + FL_REVISION;
  22. { some general constants }
  23. FL_ON = 1;
  24. FL_OK = 1;
  25. FL_VALID = 1;
  26. FL_PREEMPT = 1;
  27. FL_AUTO = 2;
  28. FL_WHEN_NEEDED = FL_AUTO;
  29. FL_OFF = 0;
  30. {FL_NONE = 0;}
  31. FL_CANCEL = 0;
  32. FL_INVALID = 0;
  33. FL_IGNORE = -1;
  34. FL_CLOSE = -2;
  35. {
  36. * The screen coordinate unit, FL_Coord, must be of signed type. Without
  37. * prototype support, a type other than integer might not work right.
  38. * If FL_Coord is float, FL_CoordIsFloat must be defined to be 1 so that
  39. * round-off error can be checked. **TODO Float not tested ***
  40. }
  41. Type PWord = ^Word;
  42. PDouble = ^Double;
  43. PFloat = ^Real;
  44. PLongint = ^Longint;
  45. PCardinal = ^Cardinal;
  46. type TFL_Coord = Longint ;
  47. PFL_Coord = ^TFL_Coord;
  48. { #define FL_CoordIsFloat 0 define this if FL_Coord is of type float }
  49. TFL_COLOR = longint; { Was cardinal }
  50. PFL_COLOR = ^TFL_COLOR;
  51. {
  52. * Coordinates can be in pixels, milli-meters or points (1/72inch)
  53. }
  54. TFL_COORD_UNIT=Longint ;
  55. { POssible values }
  56. Const
  57. FL_COORD_PIXEL=0; { default, Pixel }
  58. FL_COORD_MM=1; { milli-meter }
  59. FL_COORD_POINT=2; { point }
  60. FL_COORD_centiMM=3; { one hundredth of a mm }
  61. FL_COORD_centiPOINT=4; { one hundredth of a point }
  62. {
  63. * All object classes.
  64. }
  65. type TFL_Class = Longint;
  66. Const { Possible values }
  67. FL_INVALID_CLASS=0;
  68. FL_BUTTON=1;
  69. FL_LIGHTBUTTON=2;
  70. FL_ROUNDBUTTON=3;
  71. FL_ROUND_3DBUTTON=4;
  72. FL_CHECKBUTTON=5;
  73. FL_BITMAPBUTTON=6;
  74. FL_PIXMAPBUTTON=7;
  75. FL_BITMAP=8;
  76. FL_PIXMAP=9;
  77. FL_BOX=10;
  78. FL_TEXT=11;
  79. FL_MENU=12;
  80. FL_CHART=13;
  81. FL_CHOICE=14;
  82. FL_COUNTER=15;
  83. FL_SLIDER=16;
  84. FL_VALSLIDER=17;
  85. FL_INPUT=18;
  86. FL_BROWSER=19;
  87. FL_DIAL=21;
  88. FL_TIMER=21;
  89. FL_CLOCK=22;
  90. FL_POSITIONER=23;
  91. FL_FREE=24;
  92. FL_XYPLOT=25;
  93. FL_FRAME=26;
  94. FL_LABELFRAME=27;
  95. FL_CANVAS=28;
  96. FL_GLCANVAS=29;
  97. FL_TABFOLDER=30;
  98. FL_SCROLLBAR=31;
  99. FL_SCROLLBUTTON=32;
  100. FL_MENUBAR=33;
  101. FL_IMAGECANVAS=34;
  102. FL_TEXTBOX=35;
  103. { how to display a form onto screen }
  104. Type
  105. TFL_PLace = Longint;
  106. Const
  107. FL_PLACE_FREE = 0; { size remain resizable }
  108. FL_PLACE_MOUSE = 1; { mouse centered on form }
  109. FL_PLACE_CENTER = 2; { center of the screen }
  110. FL_PLACE_POSITION = 4; { specific size }
  111. FL_PLACE_SIZE = 8; { specific size }
  112. FL_PLACE_GEOMETRY = 16; { specific position }
  113. FL_PLACE_ASPECT = 32; { keep aspect ratio }
  114. FL_PLACE_FULLSCREEN = 64; { scale to fit screen }
  115. FL_PLACE_HOTSPOT = 128; { so mouse fall on (x,y) }
  116. FL_PLACE_ICONIC = 256;
  117. { modifier }
  118. FL_FREE_SIZE = 1 shl 14;
  119. FL_FIX_SIZE = 1 shl 15;
  120. FL_PLACE_FREE_CENTER = FL_PLACE_CENTER or FL_FREE_SIZE;
  121. FL_PLACE_CENTERFREE = FL_PLACE_CENTER or FL_FREE_SIZE;
  122. { Window manager decoration request }
  123. type
  124. TFL_DECORATION = Longint;
  125. Const { Possible values for FL_DECORATION }
  126. FL_FULLBORDER = 1; { normal }
  127. FL_TRANSIENT = 2; { set TRANSIENT_FOR property }
  128. FL_NOBORDER = 3; { use override_redirect to supress decor. }
  129. FL_MODAL = 1 << 8;
  130. type
  131. { All box types }
  132. TFL_BOX_TYPE = Longint;
  133. Const { Possible values }
  134. FL_NO_BOX=0;
  135. FL_UP_BOX=1;
  136. FL_DOWN_BOX=2;
  137. FL_BORDER_BOX=3;
  138. FL_SHADOW_BOX=4;
  139. FL_FRAME_BOX=5;
  140. FL_ROUNDED_BOX=6;
  141. FL_EMBOSSED_BOX=7;
  142. FL_FLAT_BOX=8;
  143. FL_RFLAT_BOX=9;
  144. FL_RSHADOW_BOX=10;
  145. FL_OVAL_BOX=11;
  146. FL_ROUNDED3D_UPBOX=12;
  147. FL_ROUNDED3D_DOWNBOX=13;
  148. FL_OVAL3D_UPBOX=14;
  149. FL_OVAL3D_DOWNBOX=15;
  150. FL_OVAL3D_FRAMEBOX=16;
  151. FL_OVAL3D_EMBOSSEDBOX=17;
  152. { Internal use only }
  153. FL_TOPTAB_UPBOX=18;
  154. FL_SELECTED_TOPTAB_UPBOX=19;
  155. FL_BOTTOMTAB_UPBOX=20;
  156. FL_SELECTED_BOTTOMTAB_UPBOX=21;
  157. FL_OSHADOW_BOX=22;
  158. { How to place text relative to a box }
  159. Type
  160. TFL_ALIGN = Longint;
  161. Const { Possible values for FL_ALIGN }
  162. FL_ALIGN_CENTER = 0;
  163. FL_ALIGN_TOP = 1;
  164. FL_ALIGN_BOTTOM = 2;
  165. FL_ALIGN_LEFT = 4;
  166. FL_ALIGN_RIGHT = 8;
  167. FL_ALIGN_TOP_LEFT = FL_ALIGN_TOP or FL_ALIGN_LEFT;
  168. FL_ALIGN_TOP_RIGHT = FL_ALIGN_TOP or FL_ALIGN_RIGHT;
  169. FL_ALIGN_BOTTOM_LEFT = FL_ALIGN_BOTTOM or FL_ALIGN_LEFT;
  170. FL_ALIGN_BOTTOM_RIGHT = FL_ALIGN_BOTTOM or FL_ALIGN_RIGHT;
  171. FL_ALIGN_INSIDE = (1 shl 13);
  172. FL_ALIGN_VERT = (1 shl 14); { not functional yet }
  173. FL_ALIGN_LEFT_TOP = FL_ALIGN_TOP_LEFT;
  174. FL_ALIGN_RIGHT_TOP = FL_ALIGN_TOP_RIGHT;
  175. FL_ALIGN_LEFT_BOTTOM = FL_ALIGN_BOTTOM_LEFT;
  176. FL_ALIGN_RIGHT_BOTTOM = FL_ALIGN_BOTTOM_RIGHT;
  177. { Mouse buttons }
  178. FL_MBUTTON1=1; FL_LEFT_MOUSE=FL_MBUTTON1;
  179. FL_MBUTTON2=2; FL_MIDDLE_MOUSE=FL_MBUTTON2;
  180. FL_MBUTTON3=3; FL_RIGHT_MOUSE=FL_MBUTTON3;
  181. FL_MBUTTON4=4;
  182. FL_MBUTTON5=5;
  183. { control when to reutrn input, slider and dial object. }
  184. FL_RETURN_END_CHANGED = 0;
  185. FL_RETURN_CHANGED = 1;
  186. FL_RETURN_END = 2;
  187. FL_RETURN_ALWAYS = 3;
  188. FL_RETURN_DBLCLICK = 4;
  189. {
  190. * Some special color indeces for FL private colormap. It does not matter
  191. * what the value of each enum is, but it must start from 0 and be
  192. * consecutive.
  193. }
  194. Type
  195. TFL_DP_COL = Longint;
  196. Const
  197. FL_BLACK = 0;
  198. FL_RED = 1;
  199. FL_GREEN = 2;
  200. FL_YELLOW = 3;
  201. FL_BLUE = 4;
  202. FL_MAGENTA = 5;
  203. FL_CYAN = 6;
  204. FL_WHITE = 7;
  205. FL_TOMATO = 8;
  206. FL_INDIANRED = 9;
  207. FL_SLATEBLUE = 10;
  208. FL_COL1 = 11;
  209. FL_RIGHT_BCOL = 12;
  210. FL_BOTTOM_BCOL = 13;
  211. FL_TOP_BCOL = 14;
  212. FL_LEFT_BCOL = 15;
  213. FL_MCOL = 16;
  214. FL_INACTIVE = 17;
  215. FL_PALEGREEN = 18;
  216. FL_DARKGOLD = 19;
  217. FL_ORCHID = 20;
  218. FL_DARKCYAN = 21;
  219. FL_DARKTOMATO = 22;
  220. FL_WHEAT = 23;
  221. FL_DARKORANGE = 24;
  222. FL_DEEPPINK = 25;
  223. FL_CHARTREUSE = 26;
  224. FL_DARKVIOLET = 27;
  225. FL_SPRINGGREEN = 28;
  226. FL_DOGERBLUE = 29;
  227. FL_FREE_COL1 = 256;
  228. FL_FREE_COL2 = 257;
  229. FL_FREE_COL3 = 258;
  230. FL_FREE_COL4 = 259;
  231. FL_FREE_COL5 = 260;
  232. FL_FREE_COL6 = 261;
  233. FL_FREE_COL7 = 262;
  234. FL_FREE_COL8 = 263;
  235. FL_FREE_COL9 = 264;
  236. FL_FREE_COL10 = 265;
  237. FL_FREE_COL11 = 266;
  238. FL_FREE_COL12 = 267;
  239. FL_FREE_COL13 = 268;
  240. FL_FREE_COL14 = 269;
  241. FL_FREE_COL15 = 270;
  242. FL_FREE_COL16 = 271;
  243. FL_BUILT_IN_COLS = FL_DOGERBLUE+1;
  244. FL_INACTIVE_COL = FL_INACTIVE;
  245. { Some aliases for the color. This is actually backwards ... }
  246. Const
  247. FL_GRAY16=FL_RIGHT_BCOL;
  248. FL_GRAY35 = FL_BOTTOM_BCOL;
  249. FL_GRAY80 = FL_TOP_BCOL;
  250. FL_GRAY90 = FL_LEFT_BCOL;
  251. FL_GRAY63 = FL_COL1;
  252. FL_GRAY75 = FL_MCOL;
  253. FL_LCOL = FL_BLACK;
  254. {
  255. * Pop-up menu item attributes. NOTE if more than 8, need to change
  256. * choice and menu class where mode is kept by a single byte
  257. }
  258. FL_PUP_NONE = 0;
  259. FL_PUP_GREY = 1;
  260. FL_PUP_BOX = 2;
  261. FL_PUP_CHECK = 4;
  262. FL_PUP_RADIO = 8;
  263. FL_PUP_GRAY = FL_PUP_GREY;
  264. FL_PUP_TOGGLE = FL_PUP_BOX;
  265. FL_PUP_INACTIVE = FL_PUP_GREY;
  266. type
  267. TFL_PUP_CB = Procedure (p1 : Longint); { call back prototype } cdecl;
  268. PFL_PUP_CB = ^TFL_PUP_CB;
  269. TFL_PUP_ENTRY = record
  270. TheText : PAnsiChar; { label of a popup/menu item }
  271. CallBack : PFL_PUP_CB; { the callback function }
  272. shortcut : PAnsiChar; { hotkeys }
  273. mode : longint; { FL_PUP_GRAY, FL_PUP_CHECK etc }
  274. end;
  275. PFL_PUP_ENTRY = ^TFL_PUP_ENTRY;
  276. TFL_MENU_ENTRY = TFL_PUP_ENTRY;
  277. PFL_MENU_ENTRY = ^TFL_MENU_ENTRY;
  278. { Events that a form reacts to. }
  279. type TFL_EVENT = Longint;
  280. Const { Possible values }
  281. FL_NOEVENT = 0;
  282. FL_DRAW = 1;
  283. FL_PUSH = 2;
  284. FL_RELEASE = 3;
  285. FL_ENTER = 4;
  286. FL_LEAVE = 5;
  287. FL_MOUSE = 6;
  288. FL_FOCUS = 7;
  289. FL_UNFOCUS = 8;
  290. FL_KEYBOARD = 9;
  291. FL_MOTION = 10;
  292. FL_STEP = 11;
  293. FL_SHORTCUT = 12;
  294. FL_FREEMEM = 13;
  295. FL_OTHER = 14; { property, selection etc }
  296. FL_DRAWLABEL = 15;
  297. FL_DBLCLICK = 16; { double click }
  298. FL_TRPLCLICK = 17; { triple click }
  299. FL_PS = 18; { dump a form into EPS }
  300. const
  301. FL_MOVE=FL_MOTION; { for compatibility }
  302. { Resize policies }
  303. type TFL_RESIZE_T = Longint;
  304. const
  305. FL_RESIZE_NONE = 0;
  306. FL_RESIZE_X = 1;
  307. FL_RESIZE_Y = 2;
  308. const
  309. FL_RESIZE_ALL = FL_RESIZE_X or FL_RESIZE_Y;
  310. { Keyboard focus control }
  311. type
  312. TFL_KEY = Longint;
  313. Const { Possible values for FL_KEY_Normal }
  314. FL_KEY_NORMAL = 1; { normal keys(0-255) - tab +left/right }
  315. FL_KEY_TAB = 2; { normal keys + 4 direction cursor }
  316. FL_KEY_SPECIAL = 4; { only needs special keys(>255) }
  317. FL_KEY_ALL = 7; { all keys }
  318. FL_ALT_VAL = (1 shl 17); { alt + Key --> FL_ALT_VAL + key }
  319. { Internal use }
  320. Type
  321. TFL_FIND = Longint;
  322. Const
  323. FL_FIND_INPUT =0;
  324. FL_FIND_AUTOMATIC =1;
  325. FL_FIND_MOUSE =2;
  326. FL_FIND_CANVAS =3;
  327. FL_FIND_KEYSPECIAL =4;
  328. {******************************************************************
  329. * FONTS
  330. *****************************************************************}
  331. Const FL_MAXFONTS=32; { max number of fonts }
  332. type TFL_TEXT_STYLE = Longint;
  333. Const
  334. FL_INVALID_STYLE = -1;
  335. FL_NORMAL_STYLE = 0;
  336. FL_BOLD_STYLE = 1;
  337. FL_ITALIC_STYLE = 2;
  338. FL_BOLDITALIC_STYLE = 3;
  339. FL_FIXED_STYLE = 4;
  340. FL_FIXEDBOLD_STYLE = 5;
  341. FL_FIXEDITALIC_STYLE = 6;
  342. FL_FIXEDBOLDITALIC_STYLE = 7;
  343. FL_TIMES_STYLE = 8;
  344. FL_TIMESBOLD_STYLE = 9;
  345. FL_TIMESITALIC_STYLE = 10;
  346. FL_TIMESBOLDITALIC_STYLE = 11;
  347. { The following are derived and must differ by multiples of SHADOW,
  348. i.e., (FL_ENGRAVED%SHADOW) == 0. All being 2^n has the benefit that
  349. (lstyle | FL_SHADOW) == (lstyle + FL_SHADOW). }
  350. Const
  351. FL_SHADOW_STYLE = (1 shl 9);
  352. FL_ENGRAVED_STYLE = (1 shl 10);
  353. FL_EMBOSSED_STYLE = (1 shl 11);
  354. Type TFL_FONT_STYLE= TFL_TEXT_STYLE;
  355. { Standard sizes in XForms }
  356. Const
  357. FL_TINY_SIZE = 8;
  358. FL_SMALL_SIZE = 10;
  359. FL_NORMAL_SIZE = 12;
  360. FL_MEDIUM_SIZE = 14;
  361. FL_LARGE_SIZE = 18;
  362. FL_HUGE_SIZE = 24;
  363. FL_DEFAULT_SIZE = FL_SMALL_SIZE;
  364. { Defines for compatibility }
  365. FL_TINY_FONT = FL_TINY_SIZE;
  366. FL_SMALL_FONT = FL_SMALL_SIZE;
  367. FL_NORMAL_FONT= FL_NORMAL_SIZE;
  368. FL_MEDIUM_FONT= FL_MEDIUM_SIZE;
  369. FL_LARGE_FONT = FL_LARGE_SIZE;
  370. FL_HUGE_FONT = FL_HUGE_SIZE;
  371. FL_NORMAL_FONT1 = FL_SMALL_FONT;
  372. FL_NORMAL_FONT2 = FL_NORMAL_FONT;
  373. FL_DEFAULT_FONT = FL_SMALL_FONT;
  374. const
  375. FL_BOUND_WIDTH = 3; { Border width of boxes }
  376. cFL_BEGIN_GROUP = 10000;
  377. cFL_END_GROUP = 20000;
  378. {
  379. * Definition of basic struct that holds an object
  380. }
  381. FL_CLICK_TIMEOUT = 350; { double click interval }
  382. Type
  383. TFL_pixmap = record
  384. thepixmap : Tpixmap;
  385. Thewin : TWindow;
  386. TheVisual : TVisual;
  387. x,y : TFL_Coord;
  388. w, h : word;
  389. depth : Longint;
  390. dbl_background : TFL_COLOR;
  391. pixel : TFL_COLOR;
  392. end;
  393. Pform = ^TForm;
  394. {Pfl_pixmap = ^fl_pixmap;
  395. }
  396. Pflobjs = ^Tflobjs;
  397. THandle = Function (p1 : Pflobjs; p2 : Longint ; p3 : TFL_Coord; p4 : TFL_Coord;p5 : Longint ; p6 : pointer) : Longint; cdecl;
  398. PHandle = ^THandle;
  399. TObject_Callback = Procedure (P1 : Pflobjs;p2 : longint); cdecl;
  400. PObject_Callback = ^TObject_Callback;
  401. Tflobjs = record
  402. form : PForm; { the form this object belong }
  403. u_vdata : Pointer;
  404. u_cdata : PAnsiChar;
  405. u_ldata : longint;
  406. objclass : Longint ; { class of object, button, slider etc }
  407. thetype : Longint; { type within the class }
  408. boxtype : Longint ; { what kind of box type }
  409. x, y, w, h : TFL_Coord; { obj. location and size }
  410. bw : TFL_Coord;
  411. col1, col2 : TFL_color; { colors of obj }
  412. thelabel : PAnsiChar; { object label }
  413. lcol : TFL_COLOR; { label color }
  414. align : Longint;
  415. lsize, lstyle : Longint; { label size and style }
  416. shortcut : ^Longint;
  417. handle : PHandle;
  418. object_callback : PObject_Callback;
  419. argument : Longint;
  420. spec : pointer; { instantiation }
  421. prehandle : PHandle;
  422. posthandle : PHandle;
  423. { re-configure preference }
  424. resize : cardinal; { what to do if WM resizes the FORM }
  425. nwgravity : cardinal; { how to re-position top-left corner }
  426. segravity : cardinal; { how to re-position lower-right corner }
  427. parent,child,nc : Pflobjs;
  428. ischild : longint;
  429. prev : pflobjs; { prev. obj in form }
  430. next : pflobjs; { next. obj in form }
  431. flpixmap : Pointer; { pixmap double buffering stateinfo }
  432. use_pixmap : Longint; { true to use pixmap double buffering }
  433. double_buffer : Longint; { only used by mesa/gl canvas }
  434. { some interaction flags }
  435. pushed: Longint ;
  436. focus: Longint ;
  437. belowmouse: Longint ;
  438. active: Longint ; { if accept event }
  439. input: Longint ;
  440. wantkey: Longint ;
  441. radio: Longint ;
  442. automatic: Longint ;
  443. redraw: Longint ;
  444. visible: Longint ;
  445. clip: Longint ;
  446. click_timeout : cardinal;
  447. c_vdata : pointer; { for class use }
  448. c_cdata : PAnsiChar; { For class use }
  449. c_ldata : longint; { for class use }
  450. cspec_size : cardinal;
  451. aux_col1, aux_col2 : TFL_COLOR;
  452. dbl_background : TFL_COLOR;
  453. how_return : longint;
  454. reserved : array[0..5] of cardinal;
  455. { the following are for application programs }
  456. end;
  457. TFL_OBJECT = TFlobjs;
  458. PFL_OBJECT = ^TFL_OBJECT;
  459. TCallback = Procedure (P1 : pflobjs; P2 : pointer); cdecl;
  460. PCallback = ^TCallback;
  461. { callback function for an entire form }
  462. PFL_FORMCALLBACKPTR = PCallback;
  463. { object callback function }
  464. PFL_CALLBACKPTR = PCallBack;
  465. { preemptive callback function }
  466. PFL_RAW_CALLBACK = PCallback;
  467. { at close (WM menu delete/close etc.) }
  468. PFL_FORM_ATCLOSE = PCallback;
  469. { deactivate/activate callback }
  470. PFL_FORM_ATDEACTIVATE = PCallback;
  471. PFL_FORM_ATACTIVATE = PCallback;
  472. THandlePtr = Procedure ( p1 : PFL_Object; p2 : Longint; p3,p4 : TFL_COORD; p5 : Longint; p6 : pointer); cdecl;
  473. PHandlePTR = ^THandlePTR;
  474. PFL_HANDLEPTR = PHandlePTR;
  475. {
  476. extern FL_OBJECT *FL_EVENT;
  477. }
  478. {** FORM ***}
  479. PFL_FORM = ^TFL_FORM;
  480. Tform = record
  481. fdui : Pointer;
  482. u_vdata : pointer; { for application }
  483. u_cdata : PAnsiChar;
  484. u_ldata : longint;
  485. thelabel : PAnsiChar; { window title }
  486. window : cardinal; { X resource ID for window }
  487. x, y, w, h : TFL_COORD; { current geometry info }
  488. hotx, hoty : TFL_COORD; { hot-spot of the form }
  489. first,last,focusobj : pflobjs;
  490. form_callback : PFL_FORMCALLBACKPTR;
  491. activate_callback : PFL_FORM_ATACTIVATE;
  492. deactivate_callback: PFL_FORM_ATDEACTIVATE ;
  493. form_cb_data, activate_data, deactivate_data : pointer;
  494. key_callback,
  495. push_callback,
  496. crossing_callback,
  497. motion_callback,
  498. all_callback: PFL_RAW_CALLBACK ;
  499. compress_mask : cardinal;
  500. evmask : cardinal;
  501. { WM_DELETE_WINDOW message handler }
  502. close_callback : PFL_FORM_ATCLOSE ;
  503. close_data : pointer;
  504. flpixmap : pointer; { back buffer }
  505. icon_pixmap : cardinal;
  506. icon_mask : cardinal;
  507. { interaction and other flags }
  508. vmode : Longint ; { current X visual class }
  509. deactivated : Longint ; { true if sensitive }
  510. use_pixmap : Longint ; { true if dbl buffering }
  511. frozen : Longint ; { true if sync change }
  512. visible : Longint ; { true if mapped }
  513. wm_border : Longint ; { window manager info }
  514. prop : cardinal; { other attributes }
  515. has_auto : Longint ;
  516. top : Longint ;
  517. sort_of_modal : Longint;
  518. parent, child : PFL_FORM;
  519. parent_obj : PFL_OBJECT;
  520. reserved : array[0..9] of Longint;
  521. end;
  522. TFL_FORM = Tform;
  523. TFD_Any = record
  524. form : PFL_FORM;
  525. vdata : Pointer;
  526. cdata : PAnsiChar;
  527. ldata : longint;
  528. end;
  529. PFD_ANY = ^TFD_ANY;
  530. {
  531. * Async IO stuff
  532. }
  533. const
  534. FL_READ = 1;
  535. FL_WRITE = 2;
  536. FL_EXCEPT = 4;
  537. { IO other than XEvent Q }
  538. Type
  539. TFL_IO_CALLBACK = Procedure (p1 :Longint ;p2 : pointer); cdecl;
  540. PFL_IO_CALLBACK = ^TFL_IO_CALLBACK;
  541. { function definitions }
  542. Procedure fl_add_io_callback(p1 : Longint ; p2 : word; p3 : PFL_IO_CALLBACK; p4 : pointer); cdecl;external;
  543. Procedure fl_remove_io_callback(p1 : Longint ;p2 : word; p3 : PFL_IO_CALLBACK); cdecl;external;
  544. { signals }
  545. type
  546. TFL_SIGNAL_HANDLER = Procedure (p1 : Longint ; p2 : pointer); cdecl;
  547. PFL_SIGNAL_HANDLER = ^TFL_SIGNAL_HANDLER ;
  548. Procedure fl_add_signal_callback(p1 : LongInt;p2 : PFL_SIGNAL_HANDLER;p3 : pointer); cdecl;external;
  549. Procedure fl_remove_signal_callback(p1 : Longint ); cdecl;external;
  550. Procedure fl_signal_caught(p1 :Longint ); cdecl;external;
  551. Procedure fl_app_signal_direct(p1 : Longint ); cdecl;external;
  552. Function fl_add_timeout (p1 : longint;p2 : PFL_SIGNAL_HANDLER;p3 : pointer) : longint; cdecl;external;
  553. Procedure fl_remove_timeout(p1 : Longint); cdecl;external;
  554. { Some utility stuff }
  555. type
  556. TFL_VN_PAIR = record
  557. val : Longint;
  558. name : PAnsiChar;
  559. end;
  560. PFL_VN_PAIR = ^TFL_VN_PAIR;
  561. Function fl_get_vn_value (p1 : PFL_VN_PAIR; p2 : PAnsiChar) : Longint; cdecl;external;
  562. Function fl_get_vn_name (p1 : PFL_VN_PAIR; p2 : Longint ) : PAnsiChar; cdecl;external;
  563. Function fl_msleep (p1 : cardinal) : cardinal; cdecl;external;
  564. {
  565. * Basic public routine prototypes
  566. }
  567. Procedure fl_library_version(p1,p2 : pointer ); cdecl;external;
  568. {* Generic routines that deal with FORMS *}
  569. Function fl_bgn_form(P1 : Longint ; P2,p3 : TFL_Coord) : PFL_Form; cdecl;external;
  570. Procedure fl_end_form; cdecl;external;
  571. Function fl_do_forms : PFL_OBJECT ; cdecl;external;
  572. Function fl_check_forms : PFL_OBJECT; cdecl;external;
  573. Function fl_do_only_forms : PFL_OBJECT; cdecl;external;
  574. Function fl_check_only_forms : PFL_OBJECT; cdecl;external;
  575. Procedure fl_freeze_form(P1 : PFL_FORM); cdecl;external;
  576. Procedure fl_set_focus_object( P1 : PFL_FORM;p2 : PFL_OBJECT); cdecl;external;
  577. Procedure fl_reset_focus_object( p1 : PFL_OBJECT); cdecl;external;
  578. {
  579. #define fl_set_object_focus fl_set_focus_object
  580. }
  581. Function fl_set_form_atclose(p1 : PFL_FORM; p2 : PFL_FORM_ATCLOSE; p3 : pointer) : PFL_FORM_ATCLOSE ; cdecl;external;
  582. Function fl_set_atclose(p1 : PFL_FORM_ATCLOSE; p2: pointer) : PFL_FORM_ATCLOSE ; cdecl;external;
  583. Function fl_set_form_atactivate(p1 : PFL_FORM; P2 : PFL_FORM_ATACTIVATE; P3 : pointer) : PFL_FORM_ATACTIVATE ; cdecl;external;
  584. Function fl_set_form_atdeactivate(p1 : PFL_FORM;p2 : PFL_FORM_ATDEACTIVATE;p3 : pointer) : PFL_FORM_ATDEACTIVATE ; cdecl;external;
  585. Procedure fl_unfreeze_form (p1 : PFL_FORM); cdecl;external;
  586. Procedure fl_deactivate_form(p1 : PFL_FORM); cdecl;external;
  587. Procedure fl_activate_form(p1 : PFL_FORM); cdecl;external;
  588. Procedure fl_deactivate_all_forms; cdecl;external;
  589. Procedure fl_activate_all_forms; cdecl;external;
  590. Procedure fl_freeze_all_forms; cdecl;external;
  591. Procedure fl_unfreeze_all_forms; cdecl;external;
  592. Procedure fl_scale_form(p1 : PFL_FORM;p2,p3 : double); cdecl;external;
  593. Procedure fl_set_form_position(p1 : PFL_FORM; p2,p3 : TFL_Coord); cdecl;external;
  594. Procedure fl_set_form_title(p1 : PFL_FORM; p2 : PAnsiChar); cdecl;external;
  595. Procedure fl_set_form_property(p1 : PFL_FORM; p2 : word); cdecl;external;
  596. Procedure fl_set_app_mainform( p1 : PFL_FORM); cdecl;external;
  597. Function fl_get_app_mainform : PFL_FORM; cdecl;external;
  598. Procedure fl_set_app_nomainform(P1 : Longint ); cdecl;external;
  599. Procedure fl_set_form_callback(p1 : PFL_FORM; P2 : PFL_FORMCALLBACKPTR; P3 : pointer); cdecl;external;
  600. {
  601. #define fl_set_form_call_back fl_set_form_callback
  602. }
  603. Procedure fl_set_form_size(p1 : PFL_FORM; p2,p3 : TFL_Coord); cdecl;external;
  604. Procedure fl_set_form_hotspot(p1 : PFL_FORM; p2,p3 : TFL_Coord); cdecl;external;
  605. Procedure fl_set_form_hotobject(p1 : PFL_FORM; p2 : PFL_OBJECT); cdecl;external;
  606. Procedure fl_set_form_minsize(p1 : PFL_FORM ; p2,p3 :TFL_Coord); cdecl;external;
  607. Procedure fl_set_form_maxsize(p1 : PFL_FORM; p2,p3 :TFL_Coord); cdecl;external;
  608. Procedure fl_set_form_event_cmask(p1 : PFL_FORM; p2 : cardinal); cdecl;external;
  609. Function fl_get_form_event_cmask(p1 : PFL_FORM) : cardinal; cdecl;external;
  610. Procedure fl_set_form_geometry(p1 : PFL_FORM; p2,p3,p4,p5 : TFL_Coord); cdecl;external;
  611. {
  612. #define fl_set_initial_placement fl_set_form_geometry
  613. }
  614. Function fl_show_form (p1 : PFL_FORM; p2,p3 : Longint ; p4 : PAnsiChar) : Longint; cdecl;external;
  615. Procedure fl_hide_form(p1 : PFL_FORM); cdecl;external;
  616. Procedure fl_free_form(p1 : PFL_FORM); cdecl;external;
  617. Procedure fl_redraw_form(p1 : PFL_FORM); cdecl;external;
  618. Procedure fl_set_form_dblbuffer(p1 : PFL_FORM; p2 : Longint ); cdecl;external;
  619. Procedure fl_prepare_form_window(p1 : PFL_FORM; p2,p3 : Longint ; p4 : PAnsiChar); cdecl;external;
  620. Procedure fl_show_form_window(p1 : PFL_FORM); cdecl;external;
  621. Function fl_adjust_form_size(p1 : PFL_FORM) : double; cdecl;external;
  622. Function fl_form_is_visibe (p1 : PFL_FORM) : Longint; cdecl;external;
  623. Function fl_register_raw_callback(p1 : PFL_FORM; p2 : cardinal; P3 : PFL_RAW_CALLBACK): PFL_RAW_CALLBACK; cdecl;external;
  624. {
  625. #define fl_register_call_back fl_register_raw_callback
  626. }
  627. Function fl_bgn_group : PFL_OBJECT; cdecl;external;
  628. Function fl_end_group : PFL_OBJECT; cdecl;external;
  629. Procedure fl_addto_group (p1 : PFL_OBJECT); cdecl;external;
  630. {***** Routines that deal with FL_OBJECTS *******}
  631. Procedure fl_set_object_boxtype(p1 : PFL_OBJECT; p2 : Longint ); cdecl;external;
  632. Procedure fl_set_object_bw(p1 : PFL_OBJECT; p2 : Longint ); cdecl;external;
  633. Procedure fl_set_object_resize(p1 : PFL_OBJECT; p2 : word); cdecl;external;
  634. Procedure fl_set_object_gravity(p1 : PFL_OBJECT; p2,p3 : word ); cdecl;external;
  635. Procedure fl_set_object_lsize(p1 : PFL_OBJECT; p2 : Longint ); cdecl;external;
  636. Procedure fl_set_object_lstyle(p1 : PFL_OBJECT; p2 : Longint ); cdecl;external;
  637. Procedure fl_set_object_lcol(p1 : PFL_OBJECT; p2 : TFL_COLOR); cdecl;external;
  638. Procedure fl_set_object_return(p1 : PFL_OBJECT; p2 : Longint ); cdecl;external;
  639. Procedure fl_set_object_lalign(p1 : PFL_OBJECT; p2 : Longint ); { to be removed } cdecl;external;
  640. Procedure fl_set_object_shortcut(p1 : PFL_OBJECT; p2 : PAnsiChar;p3 : Longint ); cdecl;external;
  641. Procedure fl_set_object_shortcutkey(p1 : PFL_OBJECT; p2 : word); cdecl;external;
  642. Procedure fl_set_object_dblbuffer(p1 : PFL_OBJECT; p2 : Longint ); cdecl;external;
  643. Procedure fl_set_object_color(p1 : PFL_OBJECT; p2 : TFL_COLOR;p3 : TFL_COLOR); cdecl;external;
  644. Procedure fl_set_object_label(p1 : PFL_OBJECT; p2 : PAnsiChar); cdecl;external;
  645. Procedure fl_set_object_position(p1 : PFL_OBJECT; p2,p3 :TFL_Coord); cdecl;external;
  646. Procedure fl_set_object_size(p1 : PFL_OBJECT; p2,p3 :TFL_Coord); cdecl;external;
  647. Procedure fl_set_object_automatic(p1 : PFL_OBJECT; p2 : Longint ); cdecl;external;
  648. Procedure fl_draw_object_label(p1 : PFL_OBJECT); cdecl;external;
  649. Procedure fl_draw_object_label_outside(p1 : PFL_OBJECT); cdecl;external;
  650. Function fl_get_object_component(p1 : PFL_OBJECT; p2,p3,p4 : Longint): PFL_OBJECT; cdecl;external;
  651. {
  652. #define fl_set_object_dblclick(p1 : ob; p2 : timeout) (p1 : ob)->click_timeout = (p1 : timeout); p3 :p2 :
  653. }
  654. Procedure fl_set_object_geometry(p1 : PFL_OBJECT; p2,p3,p4,p5 :TFL_Coord); cdecl;external;
  655. Procedure fl_fit_object_label(p1 : PFL_OBJECT; p2,p3 :TFL_Coord); cdecl;external;
  656. { no much get (p1 : yet ?) }
  657. Procedure fl_get_object_geometry(p1 : PFL_OBJECT; p2,p3,p4,p5 : PFL_Coord ); cdecl;external;
  658. Procedure fl_get_object_position(p1 : PFL_OBJECT; p2,p3 :PFL_COORD); cdecl;external;
  659. { this one takes into account the label }
  660. Procedure fl_get_object_bbox (p1 : PFL_OBJECT; p2,p3,p4,p5 : PFL_COORD); cdecl;external;
  661. Procedure fl_call_object_callback(p1 : PFL_OBJECT); cdecl;external;
  662. Function fl_set_object_prehandler(p1 : PFL_OBJECT; p2 : PFL_HANDLEPTR) : PFL_HANDLEPTR ; cdecl;external;
  663. Function fl_set_object_posthandler(p1 : PFL_OBJECT; p2 : PFL_HANDLEPTR): PFL_HANDLEPTR ; cdecl;external;
  664. Function fl_set_object_callback(p1 : PFL_OBJECT; p2 : PFL_CALLBACKPTR; p3 :longint) : PFL_CALLBACKPTR ; cdecl;external;
  665. {
  666. #define fl_set_object_align fl_set_object_lalign
  667. #define fl_set_call_back fl_set_object_callback
  668. }
  669. Procedure fl_redraw_object(p1 : PFL_OBJECT); cdecl;external;
  670. Procedure fl_scale_object(p1 : PFL_OBJECT; p2 : double; p3 :double); cdecl;external;
  671. Procedure fl_show_object(p1 : PFL_OBJECT); cdecl;external;
  672. Procedure fl_hide_object(p1 : PFL_OBJECT); cdecl;external;
  673. Procedure fl_free_object(p1 : PFL_OBJECT); cdecl;external;
  674. Procedure fl_delete_object(p1 : PFL_OBJECT); cdecl;external;
  675. Procedure fl_trigger_object(p1 : PFL_OBJECT); cdecl;external;
  676. Procedure fl_activate_object(p1 : PFL_OBJECT); cdecl;external;
  677. Procedure fl_deactivate_object(p1 : PFL_OBJECT); cdecl;external;
  678. Type TFL_ENUMERATEPTR = Procedure (p : PAnsiChar); cdecl;
  679. PFL_ENUMERATEPTR = ^TFL_ENUMERATEPTR;
  680. Procedure fl_enumerate_fonts (p1 : PFL_ENUMERATEPTR; p2 : longint); cdecl;external;
  681. Function fl_set_font_name(p1 : Longint ; p2 : PAnsiChar) : longint; cdecl;external;
  682. Procedure fl_set_font(p1 : Longint ; p2 : Longint ); cdecl;external;
  683. { routines that facilitate free object }
  684. Function fl_get_char_height(p1,p2 : Longint ; p3,p4 : pointer) : Longint ; cdecl;external;
  685. Function fl_get_char_width(p1,p2 : Longint ) : Longint; cdecl;external;
  686. Function fl_get_string_height(p1 : Longint ; p2 : Longint ; p3 : PAnsiChar; p4 : Longint ; p5,p6 : pointer) : Longint ; cdecl;external;
  687. Function fl_get_string_width(p1 : Longint ; p2 : Longint ; p3 : PAnsiChar; p4 : Longint ) : Longint ; cdecl;external;
  688. Function fl_get_string_widthTAB(p1 : Longint ; p2 : Longint ; p3 : PAnsiChar; p4 : Longint ) : Longint ; cdecl;external;
  689. Function fl_get_string_dimension(p1 : Longint ; p2 : Longint ; p3 : PAnsiChar; p4 : Longint ; p5,p6 : pointer) : Longint ; cdecl;external;
  690. {
  691. #define fl_get_string_size fl_get_string_dimension
  692. }
  693. Procedure fl_get_align_xy(p1,p2,p3,p4,p5,p6,p7,p8,p9 : Longint ; p10,p11 : pointer); cdecl;external;
  694. Procedure fl_drw_text(p1 : Longint ; p2,p3,p4,p5 : TFL_Coord; p6 : TFL_COLOR; p7,p8 : Longint ; p9 : PAnsiChar); cdecl;external;
  695. Procedure fl_drw_text_beside(p1 : Longint ; p2,p3,p4,p5 : TFL_Coord; p6 : TFL_COLOR; p7,p8 : Longint ; p9 : PAnsiChar); cdecl;external;
  696. {
  697. #define fl_draw_text(p1 : a; p2 : x;y;w;h;c;st;sz;s) \
  698. (p1 : (p1 : (p1 : a) & FL_ALIGN_INSIDE) ? fl_drw_text:fl_drw_text_beside)\
  699. (p1 : a; p2 : x;y;w;h;c;st;sz;s)
  700. }
  701. Procedure fl_drw_text_cursor(p1 : Longint ; p2,p3,p4,p5 : TFL_Coord;p6,p7,p8: Longint ; p9 : PAnsiChar; p10,p11: Longint ); cdecl;external;
  702. Procedure fl_drw_box(p1 : Longint ; p2,p3,p4,p5 : TFL_Coord; p6 : TFL_COLOR; p7 : Longint ); cdecl;external;
  703. type
  704. FL_DRAWPTR = Procedure (p1,p2,p3,p4 : TFL_Coord; p5 : Longint ;p6: TFL_COLOR); cdecl;
  705. PFL_DRAWPTR = ^FL_DRAWPTR;
  706. Function fl_add_symbol(p1 : PAnsiChar; p2 : PFL_DRAWPTR; p3 :Longint ) : Longint ; cdecl;external;
  707. Function fl_draw_symbol(p1 : PAnsiChar; p2,p3,p4,p5 : TFL_Coord;p6 : TFL_COLOR) : Longint ; cdecl;external;
  708. const
  709. FL_SLIDER_NONE = 0;
  710. FL_SLIDER_BOX = 1;
  711. FL_SLIDER_KNOB = 2;
  712. FL_SLIDER_UP = 4;
  713. FL_SLIDER_DOWN = 8;
  714. FL_SLIDER_ALL = 15;
  715. Procedure fl_drw_slider (p1 :longint; p2,p3,P4,p5 : TFL_COORD; p6,p7 : TFL_COLOR;
  716. p8 : Longint; p9,p10 : double; P11 : PAnsiChar; p12,p13,p14 : Longint);cdecl;external;
  717. Function fl_mapcolor(p1 : TFL_COLOR; p2,p3,p4 : Longint ) : cardinal; cdecl;external;
  718. Function fl_mapcolorname(p1 : TFL_COLOR; p2 : PAnsiChar) : longint; cdecl;external;
  719. {
  720. #define fl_mapcolor_name fl_mapcolorname
  721. }
  722. Function fl_getmcolor(p1 : TFL_COLOR; p2,p3,p4 : pointer) : cardinal; cdecl;external;
  723. Procedure fl_free_colors(p1 : PFL_COLOR; p2 : Longint ); cdecl;external;
  724. Procedure fl_free_pixels(p1 : pcardinal; p2 : Longint ); cdecl;external;
  725. Procedure fl_set_color_leak(p1 : Longint ); cdecl;external;
  726. Function fl_get_pixel(p1 : TFL_COLOR): cardinal; cdecl;external;
  727. {
  728. #define fl_get_flcolor fl_get_pixel
  729. }
  730. Procedure fl_get_icm_color(p1 : TFL_COLOR; p2,p3,p4 : pointer); cdecl;external;
  731. Procedure fl_set_icm_color(p1 : TFL_COLOR; p2,p3,p4 : Longint ); cdecl;external;
  732. Procedure fl_color(p1 : TFL_COLOR); cdecl;external;
  733. Procedure fl_bk_color(p1 : TFL_COLOR); cdecl;external;
  734. Procedure fl_textcolor(p1 : TFL_COLOR); cdecl;external;
  735. Procedure fl_bk_textcolor(p1 : TFL_COLOR); cdecl;external;
  736. Procedure fl_set_gamma(p1,p2,p3 :double); cdecl;external;
  737. Procedure fl_show_errors(p1 : Longint ); cdecl;external;
  738. { Some macros }
  739. {
  740. #define FL_max(p1 : a; p2 : b) (p1 : (p1 : a) > (p1 : b) ? (p1 : a):(p1 : b) )
  741. #define FL_min(p1 : a; p2 : b) (p1 : (p1 : a) < (p1 : b) ? (p1 : a):(p1 : b) )
  742. #define FL_abs(p1 : a) (p1 : (p1 : a) > 0 ? (p1 : a):(p1 : -(p1 : a)))
  743. #define FL_nint(p1 : a) (p1 : (p1 : a) > 0 ? (p1 : (p1 : a) + 0.5):(p1 : (p1 : a) - 0.5))
  744. }
  745. type TFL_FSCB = Function (p1 : PAnsiChar; p2 : pointer) : Longint; cdecl;
  746. PFL_FSCB = ^TFL_FSCB;
  747. { utilities for new objects }
  748. var fl_current_form : PFL_FORM; cvar;external;
  749. Procedure fl_add_object(p1 : PFL_FORM; p2 : PFL_OBJECT); cdecl;external;
  750. Procedure fl_addto_form(p1 : PFL_FORM); cdecl;external;
  751. Function fl_make_object(p1 : Longint ; p2,p3,p4,p5,p6 : TFL_Coord; p7 : PAnsiChar; P8 : PFL_HANDLEPTR) : PFL_OBJECT; cdecl;external;
  752. Procedure fl_set_coordunit(p1 : Longint ); cdecl;external;
  753. Function fl_get_coordunit : Longint ; cdecl;external;
  754. Procedure fl_set_border_width(p1 : Longint ); cdecl;external;
  755. Function fl_get_border_width : Longint ; cdecl;external;
  756. Procedure fl_set_scrollbar_type (p1 :longint); cdecl;external;
  757. Procedure fl_flip_yorigin; cdecl;external;
  758. Procedure fl_ringbell ( p1 : longint); cdecl;external;
  759. Procedure fl_gettime (p1,p2 : Plongint); cdecl;external;
  760. Function fl_whoami : PAnsiChar; cdecl;external;
  761. Function fl_now : PAnsiChar; cdecl;external;
  762. Function fl_mouse_button : longint; cdecl;external;
  763. { this gives more flexibility for future changes }
  764. {
  765. #define fl_free free
  766. #define fl_malloc malloc
  767. #define fl_calloc calloc
  768. #define fl_realloc realloc
  769. }
  770. Const FL_MAX_MENU_CHOICE_ITEMS = 128;
  771. {
  772. *
  773. * X Window dependent stuff
  774. *
  775. }
  776. { Still need conversion !! }
  777. {
  778. #include <X11/Xatom.h>
  779. #include <X11/keysym.h>
  780. }
  781. Const
  782. FL_MINDEPTH = 1;
  783. { FL_xxx does not do anything anymore; but kept for compatibility }
  784. FL_illegalVisual = -1;
  785. FL_StaticGray = StaticGray;
  786. FL_GrayScale = GrayScale;
  787. FL_StaticColor = StaticColor;
  788. FL_PseudoColor = PseudoColor;
  789. FL_TrueColor = TrueColor;
  790. FL_DirectColor = DirectColor;
  791. FL_DefaultVisual = 10; { special request }
  792. FL_North = NorthGravity;
  793. FL_NorthEast = NorthEastGravity;
  794. FL_NorthWest = NorthWestGravity;
  795. FL_South = SouthGravity;
  796. FL_SouthEast = SouthEastGravity;
  797. FL_SouthWest = SouthWestGravity;
  798. FL_East = EastGravity;
  799. FL_West = WestGravity;
  800. FL_NoGravity = ForgetGravity;
  801. FL_ForgetGravity = ForgetGravity;
  802. {
  803. #define FL_is_gray(p1 : v) (p1 : v==GrayScale || v==StaticGray)
  804. #define FL_is_rgb(p1 : v) (p1 : v==TrueColor || v==DirectColor)
  805. }
  806. {
  807. * Internal colormap size. Not really very meaningful as fl_mapcolor
  808. * and company allow color "leakage"; that is; although only FL_MAX_COLS
  809. * are kept in the internal colormap; the server might have substantially
  810. * more colors allocated
  811. }
  812. FL_MAX_COLS = 1024;
  813. {
  814. * FL graphics state information. Some are redundant.
  815. }
  816. type
  817. TFL_STATE = record
  818. xvinfo : PXVisualInfo;
  819. cur_fnt : PXFontStruct; { current font in default GC }
  820. colormap : TColormap ; { colormap valid for xvinfo }
  821. trailblazer : TWindow ; { a valid window for xvinfo }
  822. vclass, depth, { visual class and color depth }
  823. rgb_bits, { primary color resolution }
  824. dithered, { true if dithered color }
  825. pcm : Longint; { true if colormap is not shared }
  826. gc : Array [0..16] of TGC; { working GC }
  827. textgc : array [0..16] of TGC; { GC used exclusively for text }
  828. dimmedGC : TGC; { A GC having a checkboard stipple }
  829. lut :array [0..FL_MAX_COLS] of cardinal; { secondary lookup table }
  830. rshift : word;
  831. rmask, rbits : Longint;
  832. gshift : word;
  833. gmask,gbits : Longint ;
  834. bshift : word;
  835. bmask, bbits : Longint ;
  836. end;
  837. PFL_State = ^TFL_State;
  838. {
  839. #define FL_State FL_STATE
  840. }
  841. {**** Global variables *****}
  842. Var
  843. fl_display : PDisplay;
  844. fl_screen : Longint;
  845. fl_root : TWindow; { root window }
  846. fl_vroot : TWindow; { virtual root window }
  847. fl_scrh : Longint;
  848. fl_scrw : Longint; { screen dimension in pixels }
  849. fl_vmode : Longint ;
  850. { current version only runs in single visual mode }
  851. {
  852. #define fl_get_vclass(p1 : ) fl_vmode
  853. #define fl_get_form_vclass(p1 : a) fl_vmode
  854. }
  855. {
  856. fl_state[] : PFL_State ;
  857. fl_ul_magic_char : PAnsiChar;
  858. }
  859. Function fl_mode_capable(p1,p2 : longint ) : longint; cdecl;external;
  860. {
  861. #define fl_default_win(p1 : ) (p1 : fl_state[fl_vmode].trailblazer)
  862. #define fl_default_window(p1 : ) (p1 : fl_state[fl_vmode].trailblazer)
  863. }
  864. {
  865. * All pixmaps used by FL_OBJECT to simulate double buffering have the
  866. * following entries in the structure. TFL_Coord x;y are used to shift
  867. * the origin of the drawing routines
  868. }
  869. { fonts related }
  870. Const
  871. FL_MAX_FONTSIZES=10;
  872. type
  873. FL_FONT = record
  874. fs : array[0..FL_MAX_FONTSIZES] of PXFontStruct; { cached fontstruct }
  875. size : array [0..FL_MAX_FONTSIZES] of byte; { cached sizes }
  876. nsize : byte; { cached so far }
  877. fname : Array[1..80] of AnsiChar; { without size info }
  878. end;
  879. {
  880. * Some basic drawing routines
  881. }
  882. type TFL_POINT = TXPoint;
  883. PFL_Point = ^TFL_Point;
  884. TFL_RECT = TXRECTANGLE;
  885. PFL_RECT = ^TFL_RECT;
  886. { rectangles }
  887. Procedure fl_rectangle(p1 : Longint ; p2,p3,p4,p5 : TFL_Coord; p6 : TFL_COLOR); cdecl;external;
  888. Procedure fl_rectbound(p1,p2,p3,p4 : TFL_Coord;p5 : TFL_COLOR); cdecl;external;
  889. Procedure fl_rectf(x,y,w,h : TFL_COORD;c : TFL_COLOR);
  890. Procedure fl_rect(x,y,w,h : TFL_COORD;c : TFL_COLOR);
  891. { rectangle with rounded-corners }
  892. Procedure fl_roundrectangle(p1 : Longint ; p2,p3,p4,p5 : TFL_Coord; p6 :TFL_COLOR); cdecl;external;
  893. {
  894. #define fl_roundrectf(p1 : x; p2 : y;w;h;c) fl_roundrectangle(p1 : 1; p2 : x;y;w;h;c)
  895. #define fl_roundrect(p1 : x; p2 : y;w;h;c) fl_roundrectangle(p1 : 0; p2 : x;y;w;h;c)
  896. }
  897. { general polygon and polylines }
  898. Procedure fl_polygon(p1 : Longint ; p2 : PFL_POINT; p3 : Longint ; p4 : TFL_COLOR); cdecl;external;
  899. (*
  900. #define fl_polyf(p1 : p; p2 : n;c) fl_polygon(p1 : 1; p2 : p; p3 : n; p4 : c)
  901. #define fl_polyl(p1 : p; p2 : n;c) fl_polygon(p1 : 0; p2 : p; p3 : n; p4 : c)
  902. #define fl_polybound(p1 : p; p2 : n;c) do {fl_polyf(p1 : p; p2 : n;c);fl_polyl(p1 : p; p2 : n;FL_BLACK);}while(p1 : 0)
  903. *)
  904. Procedure fl_lines(p1 : TFL_POINT; p2 : Longint ; p3 :TFL_COLOR); cdecl;external;
  905. Procedure fl_line(p1,p2,p3,p4 : TFL_Coord; p5 : TFL_COLOR); cdecl;external;
  906. Procedure fl_point(p1,p2 : TFL_Coord; p3: TFL_COLOR); cdecl;external;
  907. Procedure fl_points(p1 : PFL_POINT; p2 : Longint; p3: TFL_COLOR); cdecl;external;
  908. {
  909. #define fl_simple_line fl_line
  910. }
  911. Procedure fl_dashedlinestyle(p1 : PAnsiChar; p2 : Longint ); cdecl;external;
  912. Procedure fl_drawmode(p1 : Longint ); cdecl;external;
  913. {
  914. #define fl_diagline(p1 : x; p2 : y;w;h;c) fl_line(p1 : x; p2 : y;(p1 : x)+(p1 : w)-1; p2 : (p1 : y)+(p1 : h)-1; p2 : c)
  915. }
  916. { line attributes }
  917. Const
  918. FL_SOLID = 0;
  919. FL_USERDASH = 1;
  920. FL_USERDOUBLEDASH = 2;
  921. FL_DOT = 3;
  922. FL_DOTDASH = 4;
  923. FL_DASH = 5;
  924. FL_LONGDASH = 6;
  925. Procedure fl_linewidth(p1 : Longint ); cdecl;external;
  926. Procedure fl_linestyle(p1 : Longint ); cdecl;external;
  927. Function fl_get_linewidth : longint; cdecl;external;
  928. Function fl_get_linestyle : longint; cdecl;external;
  929. {* ellipses *}
  930. Procedure fl_oval(p1 : Longint ; p2,p3,p4,p5 : TFL_Coord; p6 : TFL_COLOR); cdecl;external;
  931. Procedure fl_ovalbound(p1,p2,p3,p4 : TFL_Coord; p5 : TFL_COLOR); cdecl;external;
  932. Procedure fl_ovalarc(p1 : Longint ; p2,p3,p4,p5 : TFL_Coord; p6,p7 : Longint; p8 : TFL_COLOR); cdecl;external;
  933. {
  934. #define fl_ovalf(p1 : x; p2 : y;w;h;c) fl_oval(p1 : 1; p2 : x;y;w;h;c)
  935. #define fl_ovall(p1 : x; p2 : y;w;h;c) fl_oval(p1 : 0; p2 : x;y;w;h;c)
  936. #define fl_oval_bound fl_ovalbound
  937. #define fl_circf(p1 : x; p2 : y;r;col) fl_oval(p1 : 1; p2 : (p1 : x)-(p1 : r); p2 : (p1 : y)-(p1 : r); p2 : 2*(p1 : r); p2 : 2*(p1 : r); p2 : col)
  938. #define fl_circ(p1 : x; p2 : y;r;col) fl_oval(p1 : 0; p2 : (p1 : x)-(p1 : r); p2 : (p1 : y)-(p1 : r); p2 : 2*(p1 : r); p2 : 2*(p1 : r); p2 : col)
  939. }
  940. { arcs }
  941. Procedure fl_pieslice(p1 : Longint ; p2,p3,p4,p5 : TFL_Coord;p6,p7 :Longint ; p8 : TFL_COLOR); cdecl;external;
  942. {
  943. #define fl_arcf(p1 : x; p2 : y;r;a1;a2;c) fl_pieslice(p1 : 1; p2 : (p1 : x)-(p1 : r); p2 : (p1 : y)-(p1 : r); p2 : \
  944. (p1 : 2*(p1 : r)); p2 : (p1 : 2*(p1 : r)); p2 : a1;a2;c)
  945. #define fl_arc(p1 : x; p2 : y;r;a1;a2;c) fl_pieslice(p1 : 0; p2 : (p1 : x)-(p1 : r); p2 : (p1 : y)-(p1 : r); p2 : \
  946. (p1 : 2*(p1 : r)); p2 : (p1 : 2*(p1 : r)); p2 : a1;a2;c)
  947. }
  948. { misc. stuff }
  949. Procedure fl_add_vertex(p1,p2 : TFL_Coord); cdecl;external;
  950. Procedure fl_add_float_vertex(p1,p2 : real); cdecl;external;
  951. Procedure fl_reset_vertex; cdecl;external;
  952. Procedure fl_endline; cdecl;external;
  953. Procedure fl_endpolygon; cdecl;external;
  954. Procedure fl_endclosedline; cdecl;external;
  955. {
  956. #define fl_bgnline fl_reset_vertex
  957. #define fl_bgnclosedline fl_reset_vertex
  958. #define fl_bgnpolygon fl_reset_vertex
  959. #define fl_v2s(p1 : v) fl_add_vertex(p1 : v[0]; p2 : v[1])
  960. #define fl_v2i(p1 : v) fl_add_vertex(p1 : v[0]; p2 : v[1])
  961. #define fl_v2f(p1 : v) fl_add_float_vertex(p1 : v[0]; p2 : v[1])
  962. #define fl_v2d(p1 : v) fl_add_float_vertex(p1 : v[0]; p2 : v[1])
  963. }
  964. { high level drawing routines }
  965. Procedure fl_drw_frame(p1 : Longint ; p2,p3,p4,p5 : TFL_Coord;p6 : TFL_COLOR; p7 : Longint ); cdecl;external;
  966. Procedure fl_drw_checkbox(p1 : Longint ; p2,p3,p4,p5 : TFL_Coord;p6 : TFL_COLOR;p7 : Longint ); cdecl;external;
  967. {
  968. * Interfaces
  969. }
  970. Function fl_get_fontstruct(p1,p2 : Longint ) : PXFontStruct; cdecl;external;
  971. {
  972. #define fl_get_font_struct fl_get_fontstruct
  973. #define fl_get_fntstruct fl_get_font_struct
  974. }
  975. Function fl_get_mouse(p1,p2 : PFL_COORD; p3 : pword) : TWindow; cdecl;external;
  976. Procedure fl_set_mouse(p1,p2 : TFL_Coord); cdecl;external;
  977. Function fl_get_win_mouse(p1 : TWindow; p2,p3 : PFL_COORD; p4 : pword) : TWindow; cdecl;external;
  978. Function fl_get_form_mouse(p1 : PFL_FORM; p2,p3 : PFL_COORD; p4 : pWord) : TWindow; cdecl;external;
  979. Function fl_win_to_form(p1 : TWindow) : PFL_form; cdecl;external;
  980. Procedure fl_set_form_icon(p1 : PFL_FORM; p2 : TPixmap; p3 :TPixmap); cdecl;external;
  981. {
  982. #define fl_raise_form(p1 : f) if(p1 : f->window) XRaiseWindow(p1 : fl_display; p2 : f->window)
  983. #define fl_lower_form(p1 : f) if(p1 : f->window) XLowerWindow(p1 : fl_display; p2 : f->window)
  984. }
  985. {
  986. #define fl_set_foreground(p1 : gc; p2 : c) XSetForeground(p1 : fl_display; p2 : gc;fl_get_pixel(p1 : c))
  987. #define fl_set_background(p1 : gc; p2 : c) XSetBackground(p1 : fl_display; p2 : gc;fl_get_pixel(p1 : c))
  988. }
  989. { General windowing support }
  990. Function fl_wincreate(p1 : PAnsiChar) : TWindow; cdecl;external;
  991. Function fl_winshow(p1 : TWindow) : TWindow; cdecl;external;
  992. Function fl_winopen(p1 : PAnsiChar) : TWindow; cdecl;external;
  993. Procedure fl_winhide(p1 : TWindow); cdecl;external;
  994. Procedure fl_winclose(p1 : TWindow); cdecl;external;
  995. Procedure fl_winset(p1 : TWindow); cdecl;external;
  996. Function fl_winget : Twindow; cdecl;external;
  997. Procedure fl_winresize(p1 : TWindow; p2,p3 :TFL_Coord); cdecl;external;
  998. Procedure fl_winmove(p1 : TWindow; p2,p3 :TFL_Coord); cdecl;external;
  999. Procedure fl_winreshape(p1 : TWindow; p2,p3,p4,p5 : TFL_Coord); cdecl;external;
  1000. Procedure fl_winicon(p1 : TWindow; p2 : TPixmap; p3 :TPixmap); cdecl;external;
  1001. Procedure fl_winbackground(p1 : TWindow; p2 : cardinal); cdecl;external;
  1002. Procedure fl_winstepunit(p1 : TWindow; p2,p3 :TFL_Coord); cdecl;external;
  1003. Procedure fl_winisvalid(p1 : TWindow); cdecl;external;
  1004. Procedure fl_wintitle(p1 : TWindow; p2 : PAnsiChar); cdecl;external;
  1005. Procedure fl_winposition(p1,p2 : TFL_Coord); cdecl;external;
  1006. {
  1007. #define fl_pref_winposition fl_winposition
  1008. #define fl_win_background fl_winbackground
  1009. #define fl_set_winstepunit fl_winstepunit
  1010. }
  1011. Procedure fl_winminsize(p1 : TWindow; p2,p3 :TFL_Coord); cdecl;external;
  1012. Procedure fl_winmaxsize(p1 : TWindow; p2,p3 :TFL_Coord); cdecl;external;
  1013. Procedure fl_winaspect(p1 : TWindow; p2,p3 :TFL_Coord); cdecl;external;
  1014. Procedure fl_reset_winconstraints(p1 : TWindow); cdecl;external;
  1015. Procedure fl_winsize(p1,p2 : TFL_Coord); cdecl;external;
  1016. Procedure fl_initial_winsize(p1,p2 : TFL_Coord); cdecl;external;
  1017. {
  1018. #define fl_pref_winsize fl_winsize
  1019. }
  1020. Procedure fl_initial_winstate(p1 : Longint ); cdecl;external;
  1021. Function fl_create_colormap(p1 : PXVisualInfo; p2 : Longint ) : TColormap; cdecl;external;
  1022. Procedure fl_wingeometry(p1,p2,p3,p4 : TFL_Coord); cdecl;external;
  1023. {
  1024. #define fl_pref_wingeometry fl_wingeometry
  1025. }
  1026. Procedure fl_initial_wingeometry(p1,p2,p3,p4 : TFL_Coord); cdecl;external;
  1027. {
  1028. Procedure fl_noborder; cdecl;external;
  1029. Procedure fl_transient; cdecl;external;
  1030. }
  1031. Procedure fl_get_winsize(p1 : TWindow; p2,p3 :PFL_COORD); cdecl;external;
  1032. Procedure fl_get_winorigin(p1 : TWindow; p2,p3 :PFL_COORD); cdecl;external;
  1033. Procedure fl_get_wingeometry(p1 : TWindow; p2,p3,p4,p5 : PFL_COORD); cdecl;external;
  1034. { for compatibility }
  1035. {
  1036. #define fl_get_win_size fl_get_winsize
  1037. #define fl_get_win_origin fl_get_winorigin
  1038. #define fl_get_win_geometry fl_get_wingeometry
  1039. #define fl_initial_winposition fl_pref_winposition
  1040. #define fl_get_display(p1 : ) fl_display
  1041. #define FL_FormDisplay(p1 : form) fl_display
  1042. #define FL_ObjectDisplay(p1 : object) fl_display
  1043. }
  1044. { the window an object belongints }
  1045. Function FL_ObjWin ( P : PFL_Object) : TWindow;
  1046. {
  1047. #define FL_OBJECT_WID FL_ObjWin
  1048. }
  1049. { all registerable events; including Client Message }
  1050. const FL_ALL_EVENT = (KeyPressMask or KeyReleaseMask or
  1051. ButtonPressMask or ButtonReleaseMask or
  1052. EnterWindowMask or LeaveWindowMask or
  1053. ButtonMotionMask or PointerMotionMask);
  1054. { Timer related }
  1055. FL_TIMER_EVENT = $40000000;
  1056. Function fl_XNextEvent(p1 : PXEvent) : Longint; cdecl;external;
  1057. Function fl_XPeekEvent(p1 : PXEvent) : Longint; cdecl;external;
  1058. Function fl_XEventsQueued(p1 : Longint ) : Longint; cdecl;external;
  1059. Procedure fl_XPutBackEvent(p1 : PXEvent); cdecl;external;
  1060. Function fl_last_event : PXEvent ; cdecl;external;
  1061. type
  1062. TFL_APPEVENT_CB = Procedure (p1 : PXEvent; p2 : pointer); cdecl;
  1063. PFL_APPEVENT_CB = ^TFL_APPEVENT_CB;
  1064. Function fl_set_event_callback(p1 : PFL_APPEVENT_CB; p2 : pointer) : PFL_APPEVENT_CB ; cdecl;external;
  1065. Function fl_set_idle_callback(p1 : PFL_APPEVENT_CB; p2 : pointer) : PFL_APPEVENT_CB ; cdecl;external;
  1066. Function fl_addto_selected_xevent(p1 : TWindow; p2 : longint) : Cardinal; cdecl;external;
  1067. Function fl_remove_selected_xevent(p1 : TWindow; p2 : longint) : cardinal; cdecl;external;
  1068. {
  1069. #define fl_add_selected_xevent fl_addto_selected_xevent
  1070. }
  1071. {
  1072. * Group some WM stuff into a structure for easy maintainance
  1073. }
  1074. const
  1075. FL_WM_SHIFT = 1;
  1076. FL_WM_NORMAL = 2;
  1077. type TFL_WM_STUFF = record
  1078. rpx, rpy, { reparenting offset for full border }
  1079. trpx, trpy, { reparenting offset for transient }
  1080. bw, { additional border }
  1081. rep_method : Longint; { 1 for shifting; 2 for normal }
  1082. pos_request : word; { USPOSITION or PPOSITION }
  1083. end;
  1084. PFL_WM_STUFF = ^TFL_WM_STUFF;
  1085. Function fl_add_event_callback(p1 : TWindow; p2 : Longint ; p3 : PFL_APPEVENT_CB; p4 : pointer) : PFL_APPEVENT_CB ; cdecl;external;
  1086. Procedure fl_remove_event_callback(p1 : TWindow; p2 : Longint ); cdecl;external;
  1087. Procedure fl_activate_event_callbacks(p1 : TWindow); cdecl;external;
  1088. Function fl_print_xevent_name(p1 : PAnsiChar; p2 : PXEvent) : PXEvent; cdecl;external;
  1089. {
  1090. #define metakey_down(p1 : mask) (p1 : (p1 : mask) & Mod1Mask)
  1091. #define shiftkey_down(p1 : mask) (p1 : (p1 : mask) & ShiftMask)
  1092. #define controlkey_down(p1 : mask) (p1 : (p1 : mask) & ControlMask)
  1093. #define button_down(p1 : mask) (p1 : (p1 : (p1 : mask) & Button1Mask) || \
  1094. (p1 : (p1 : mask) & Button2Mask) || \
  1095. (p1 : (p1 : mask) & Button3Mask))
  1096. #define fl_keypressed fl_keysym_pressed
  1097. }
  1098. {***************** Resources **************}
  1099. { bool is Longint . FL_NONE is defined elsewhere }
  1100. const
  1101. FL_NONE = 0;
  1102. FL_SHORT = 10;
  1103. FL_BOOL = 11;
  1104. FL_INT = 12;
  1105. FL_LONG = 13;
  1106. FL_FLOAT = 14;
  1107. FL_STRING = 15;
  1108. Type TFL_RTYPE = Longint;
  1109. TFL_RESOURCE = record
  1110. res_name, { resource name }
  1111. res_class : PAnsiChar; { resource class }
  1112. rtype : TFL_RTYPE; { FL_INT; FL_FLOAT; FL_BOOL;FL_STRING }
  1113. thevar : pointer; { address for the variable }
  1114. defval : PAnsiChar; { default setting in string form }
  1115. bytes : Longint { used only for strings }
  1116. end;
  1117. PFL_RESOURCE = ^TFL_RESOURCE;
  1118. Type
  1119. TFL_CMD_OPT = TXrmOptionDescRec;
  1120. PFL_CMD_OPT = ^TFL_CMD_OPT;
  1121. Function fl_initialize(p1 : pointer; p2 : PPAnsiChar; p3 :PAnsiChar; p4 : PFL_CMD_OPT; p5 : Longint ) : Pdisplay; cdecl;external;
  1122. Procedure fl_finish; cdecl;external;
  1123. { addfromhere }
  1124. Function fl_get_resource(p1 : PAnsiChar; p2 : PAnsiChar; p3 : TFL_RTYPE; p4 : PAnsiChar; p5 : pointer; p6 :Longint ) : PAnsiChar; cdecl;external;
  1125. Procedure fl_set_resource(p1 : PAnsiChar; p2 : PAnsiChar); cdecl;external;
  1126. Procedure fl_get_app_resources(p1 : PFL_resource; p2 : Longint ); cdecl;external;
  1127. Procedure fl_set_graphics_mode(p1 : Longint ; p2 : Longint ); cdecl;external;
  1128. Procedure fl_set_visualID(p1 : longint); cdecl;external;
  1129. Function fl_keysym_pressed(p1 : TKeySym) : Longint; cdecl;external;
  1130. {
  1131. #define buttonLabelSize buttonFontSize
  1132. #define sliderLabelSize sliderFontSize
  1133. #define inputLabelSize inputFontSize
  1134. }
  1135. { All Form control variables. Named closely as its resource name }
  1136. Type TFL_IOPT = record
  1137. rgamma, ggamma, bgamma : longint; { MUST BE FLOAT(single) !!! }
  1138. debug, sync,
  1139. depth, vclass, doubleBuffer,
  1140. ulPropWidth, ulThickness, { underline stuff }
  1141. buttonFontSize,
  1142. sliderFontSize,
  1143. inputFontSize,
  1144. browserFontSize,
  1145. menuFontSize,
  1146. choiceFontSize,
  1147. labelFontSize, { all other labels fonts }
  1148. pupFontSize, pupFontStyle, { font for pop-up menus }
  1149. privateColormap,
  1150. sharedColormap,
  1151. standardColormap,
  1152. ScrollBarType,
  1153. backingStore,
  1154. coordUnit,
  1155. borderWidth,
  1156. safe : Longint ;
  1157. rgbfile : PAnsiChar; { where RGB file is }
  1158. vname : array [0..23] of AnsiChar;
  1159. end;
  1160. PFL_IOPT = ^TFL_IOPT;
  1161. Const
  1162. { program default masks }
  1163. FL_PDDepth = 1 shl 1 ;
  1164. FL_PDClass = 1 shl 2 ;
  1165. FL_PDDouble = 1 shl 3 ;
  1166. FL_PDSync = 1 shl 4 ;
  1167. FL_PDPrivateMap = 1 shl 5 ;
  1168. FL_PDLeftScrollBar = 1 shl 6 ;
  1169. FL_PDPupFontSize = 1 shl 7 ;
  1170. FL_PDButtonFontSize = 1 shl 8 ;
  1171. FL_PDInputFontSize = 1 shl 9 ;
  1172. FL_PDSliderFontSize = 1 shl 10 ;
  1173. FL_PDVisual = 1 shl 11 ;
  1174. FL_PDULThickness = 1 shl 12 ;
  1175. FL_PDULPropWidth = 1 shl 13 ;
  1176. FL_PDBS = 1 shl 14 ;
  1177. FL_PDCoordUnit = 1 shl 15 ;
  1178. FL_PDDebug = 1 shl 16 ;
  1179. FL_PDSharedMap = 1 shl 17 ;
  1180. FL_PDStandardMap = 1 shl 18 ;
  1181. FL_PDBorderWidth = 1 shl 19 ;
  1182. FL_PDSafe = 1 shl 20 ;
  1183. FL_PDMenuFontSize = 1 shl 21 ;
  1184. FL_PDBrowserFontSize = 1 shl 22 ;
  1185. FL_PDChoiceFontSize = 1 shl 23 ;
  1186. FL_PDLabelFontSize = 1 shl 24;
  1187. FL_PDButtonLabelSize = FL_PDButtonFontSize;
  1188. FL_PDSliderLabelSize = FL_PDSliderFontSize;
  1189. FL_PDInputLabelSize = FL_PDInputFontSize;
  1190. FL_PDButtonLabel = FL_PDButtonLabelSize;
  1191. Procedure fl_set_defaults(p1 : cardinal; p2 : PFL_IOPT); cdecl;external;
  1192. Procedure fl_set_tabstop(p1 : PAnsiChar); cdecl;external;
  1193. Procedure fl_get_defaults(p1 : PFL_IOPT); cdecl;external;
  1194. Function fl_get_visual_depth : Longint; cdecl;external;
  1195. Function fl_vclass_name(p1 : Longint ) : PAnsiChar; cdecl;external;
  1196. Function fl_vclass_val(p1 : PAnsiChar) : Longint ; cdecl;external;
  1197. Procedure fl_set_ul_property(p1 : Longint ; p2 : Longint ); cdecl;external;
  1198. Procedure fl_set_clipping(p1 : TFL_Coord; p2 : TFL_Coord; p3 : TFL_Coord; p4 : TFL_Coord); cdecl;external;
  1199. Procedure fl_set_gc_clipping(p1 : TGC; p2 : TFL_Coord; p3 : TFL_Coord; p4 : TFL_Coord; p5 : TFL_Coord); cdecl;external;
  1200. Procedure fl_unset_gc_clipping(p1 : TGC); cdecl;external;
  1201. Procedure fl_set_clippings(p1 : PFL_RECT; p2 : Longint ); cdecl;external;
  1202. Procedure fl_unset_clipping; cdecl;external;
  1203. Function fl_textgc : TGC; cdecl;external;
  1204. {
  1205. #define fl_set_text_clipping(p1 : a; p2 : b;c;d) fl_set_gc_clipping(p1 : fl_textgc; p2 : a;b;c;d)
  1206. #define fl_unset_text_clipping(p1 : ) fl_unset_gc_clipping(p1 : fl_textgc)
  1207. }
  1208. Const
  1209. FL_NORMAL_BITMAP = 0;
  1210. {**** Defaults ****}
  1211. FL_BITMAP_BOXTYPE =FL_NO_BOX;
  1212. FL_BITMAP_COL1 =FL_COL1; { background of bitmap }
  1213. FL_BITMAP_COL2 =FL_COL1; { not used currently }
  1214. FL_BITMAP_LCOL =FL_LCOL; { foreground of bitmap }
  1215. FL_BITMAP_ALIGN =FL_ALIGN_BOTTOM;
  1216. {**** Others ****}
  1217. {FL_BITMAP_MAXSIZE = 128*128;}
  1218. {**** Routines ****}
  1219. Function fl_create_bitmap(p1 : Longint ; p2 : TFL_Coord; p3 : TFL_Coord; p4 : TFL_Coord; p5 : TFL_Coord; p6 : PAnsiChar) : PFL_OBJECT; cdecl;external;
  1220. Function fl_add_bitmap(p1 : Longint ; p2 : TFL_Coord; p3 : TFL_Coord; p4 : TFL_Coord; p5 : TFL_Coord; p6 : PAnsiChar) : PFL_OBJECT; cdecl;external;
  1221. Procedure fl_set_bitmap_data(p1 : PFL_OBJECT; p2 : Longint ; p3 : Longint ; p4 : pointer); cdecl;external;
  1222. Procedure fl_set_bitmap_file(p1 : PFL_OBJECT; p2 : PAnsiChar); cdecl;external;
  1223. Function fl_read_bitmapfile(p1 : TWindow; p2 : PAnsiChar; p3,p4 : pword; p5,p6 : pointer) : TPixmap ; cdecl;external;
  1224. {
  1225. #define fl_create_from_bitmapdata(p1 : win; p2 : data; p3 : w; p4 : h)\
  1226. XCreateBitmapFromData(p1 : fl_get_display(p1 : ); p2 : win; p3 :\
  1227. (p1 : AnsiChar *)data; p2 : w; p3 :h)
  1228. #define fl_set_bitmap_datafile fl_set_bitmap_file
  1229. }
  1230. { PIXMAP stuff }
  1231. Const
  1232. FL_NORMAL_PIXMAP = 0;
  1233. Function fl_create_pixmap(p1 : Longint ; p2,p3,p4,p5 : TFL_Coord; p6 :PAnsiChar) : PFL_OBJECT; cdecl;external;
  1234. Function fl_add_pixmap(p1 : Longint ; p2,p3,p4,p5 : TFL_Coord;p6 : PAnsiChar) : PFL_OBJECT; cdecl;external;
  1235. Procedure fl_set_pixmap_data(p1 : PFL_OBJECT; p2 : PPAnsiChar); cdecl;external;
  1236. Procedure fl_set_pixmap_file(p1 : PFL_OBJECT; p2 : PAnsiChar); cdecl;external;
  1237. Procedure fl_set_pixmap_align(p1 : PFL_OBJECT; p2 : Longint ; p3 : Longint ; p4 : Longint ); cdecl;external;
  1238. Procedure fl_set_pixmap_pixmap(p1 : PFL_OBJECT; p2 : TPixmap; p3 :TPixmap); cdecl;external;
  1239. Procedure fl_set_pixmap_colorcloseness(p1 : Longint ; p2 : Longint ; p3 :Longint ); cdecl;external;
  1240. Procedure fl_free_pixmap_pixmap(p1 : PFL_OBJECT); cdecl;external;
  1241. Function fl_get_pixmap_pixmap(p1 : PFL_OBJECT; p2 : PPixmap; p3 : PPixmap) : TPixmap ; cdecl;external;
  1242. Function fl_read_pixmapfile(p1 : TWindow; p2 : PAnsiChar;p3,p4 : pword; p5 : PPixmap;p6,p7 : pointer; p8 : TFL_COLOR) : TPixmap ; cdecl;external;
  1243. Function fl_create_from_pixmapdata(p1 : TWindow; p2 : PPAnsiChar;p3,p4 : pword; p5 : PPixmap;p6,p7 : pointer; p8 : TFL_COLOR) : TPixmap ; cdecl;external;
  1244. {
  1245. #define fl_free_pixmap(p1 : id) if(p1 : id != None) XFreePixmap(p1 : fl_display; p2 : id);
  1246. }
  1247. Function fl_create_box(p1 : Longint ; p2,p3,p4,p5 : TFL_Coord; p6 : PAnsiChar) : PFL_OBJECT; cdecl;external;
  1248. Function fl_add_box(p1 : Longint ; p2,p3,p4,p5 : TFL_Coord;p6 : PAnsiChar) : PFL_OBJECT; cdecl;external;
  1249. Type TFL_BROWSER_TYPE = Longint;
  1250. Const
  1251. FL_NORMAL_BROWSER = 0;
  1252. FL_SELECT_BROWSER = 1;
  1253. FL_HOLD_BROWSER = 2;
  1254. FL_MULTI_BROWSER = 3;
  1255. {**** Defaults ****}
  1256. FL_BROWSER_BOXTYPE = FL_DOWN_BOX;
  1257. FL_BROWSER_COL1 = FL_COL1;
  1258. FL_BROWSER_COL2 = FL_YELLOW;
  1259. FL_BROWSER_LCOL = FL_LCOL;
  1260. FL_BROWSER_ALIGN = FL_ALIGN_BOTTOM;
  1261. {**** Others ****}
  1262. FL_BROWSER_SLCOL = FL_COL1;
  1263. FL_BROWSER_LINELENGTH = 1024;
  1264. FL_BROWSER_FONTSIZE = FL_SMALL_FONT;
  1265. { as of .86
  1266. FL_SCROLLBAR_OFF = 0;
  1267. FL_SCROLLBAR_ON = 1;
  1268. FL_SCROLLBAR_ALWAYS_ON = 2;
  1269. }
  1270. {**** Routines ****}
  1271. Function fl_create_browser(p1 : Longint ; p2,p3,p4,p5 : TFL_Coord;p6 : PAnsiChar) : PFL_OBJECT; cdecl;external;
  1272. Function fl_add_browser(p1 : Longint ; p2,p3,p4,p5 : TFL_Coord;p6: PAnsiChar) : PFL_OBJECT; cdecl;external;
  1273. Procedure fl_clear_browser(p1 : PFL_OBJECT); cdecl;external;
  1274. Procedure fl_add_browser_line(p1 : PFL_OBJECT; p2 : PAnsiChar); cdecl;external;
  1275. Procedure fl_addto_browser(p1 : PFL_OBJECT; p2 : PAnsiChar); cdecl;external;
  1276. Procedure fl_addto_browserchars(p1 : PFL_OBJECT; p2 : PAnsiChar); cdecl;external;
  1277. Procedure fl_insert_browser_line(p1 : PFL_OBJECT; p2 : Longint ; p3 :PAnsiChar); cdecl;external;
  1278. Procedure fl_delete_browser_line(p1 : PFL_OBJECT; p2 : Longint ); cdecl;external;
  1279. Procedure fl_replace_browser_line(p1 : PFL_OBJECT; p2 : Longint ; p3 :PAnsiChar); cdecl;external;
  1280. Function fl_get_browser_line(p1 : PFL_OBJECT; p2 : Longint ) : PAnsiChar; cdecl;external;
  1281. Function fl_load_browser(p1 : PFL_OBJECT; p2 : PAnsiChar ) : Longint ; cdecl;external;
  1282. Procedure fl_select_browser_line(p1 : PFL_OBJECT; p2 : Longint ); cdecl;external;
  1283. Procedure fl_deselect_browser_line(p1 : PFL_OBJECT; p2 : Longint ); cdecl;external;
  1284. Procedure fl_deselect_browser(p1 : PFL_OBJECT); cdecl;external;
  1285. Function fl_isselected_browser_line(p1 : PFL_OBJECT; p2 : Longint ) : Longint ; cdecl;external;
  1286. Function fl_get_browser_topline(p1 : PFL_OBJECT ) : Longint ; cdecl;external;
  1287. Function fl_get_browser(p1 : PFL_OBJECT ) : Longint ; cdecl;external;
  1288. Function fl_get_browser_maxline(p1 : PFL_OBJECT ) : Longint ; cdecl;external;
  1289. Function fl_get_browser_screenlines(p1 : PFL_OBJECT ) : Longint ; cdecl;external;
  1290. Procedure fl_set_browser_topline(p1 : PFL_OBJECT; p2 : Longint ); cdecl;external;
  1291. Procedure fl_set_browser_fontsize(p1 : PFL_OBJECT; p2 : Longint ); cdecl;external;
  1292. Procedure fl_set_browser_fontstyle(p1 : PFL_OBJECT; p2 : Longint ); cdecl;external;
  1293. Procedure fl_set_browser_specialkey(p1 : PFL_OBJECT; p2 : Longint ); cdecl;external;
  1294. Procedure fl_set_browser_vscrollbar(p1 : PFL_OBJECT; p2 : Longint ); cdecl;external;
  1295. Procedure fl_set_browser_hscrollbar(p1 : PFL_OBJECT; p2 : Longint ); cdecl;external;
  1296. Procedure fl_set_browser_leftslider(p1 : PFL_OBJECT; p2 : Longint ); cdecl;external;
  1297. Procedure fl_set_browser_line_selectable(p1 : PFL_OBJECT; p2 : Longint ; p3 :Longint ); cdecl;external;
  1298. Procedure fl_get_browser_dimension(p1 : PFL_OBJECT; p2,p3,p4,p5 : PFL_COORD); cdecl;external;
  1299. Procedure fl_set_browser_dblclick_callback(p1 : PFL_OBJECT; p2 : PFL_CALLBACKPTR; p3 :longint); cdecl;external;
  1300. {
  1301. #define fl_set_browser_leftscrollbar fl_set_browser_leftslider
  1302. }
  1303. Procedure fl_set_browser_xoffset(p1 : PFL_OBJECT; p2 : TFL_Coord); cdecl;external;
  1304. Procedure fl_set_browser_scrollbarsize (p1 : PFL_OBJECT;p2,p3 : longint); cdecl;external;
  1305. Procedure fl_show_browser_line(p1 : PFL_OBJECT; p2 : longint); cdecl;external;
  1306. Function fl_get_browser_xoffset(p1 : PFL_OBJECT) : TFL_Coord ; cdecl;external;
  1307. type
  1308. TFL_BUTTON_TYPE= Longint;
  1309. Const
  1310. FL_NORMAL_BUTTON = 0;
  1311. FL_PUSH_BUTTON = 1;
  1312. FL_RADIO_BUTTON = 2;
  1313. FL_HIDDEN_BUTTON = 3;
  1314. FL_TOUCH_BUTTON = 4;
  1315. FL_INOUT_BUTTON = 5;
  1316. FL_RETURN_BUTTON = 6;
  1317. FL_HIDDEN_RET_BUTTON= 7;
  1318. FL_MENU_BUTTON = 8;
  1319. type TFL_BUTTON_SPEC = record
  1320. pixmap,mask : TPixmap;
  1321. bits_w, bits_h : Cardinal;
  1322. val, { whether on }
  1323. mousebut, { mouse button that caused the push }
  1324. timdel, { time since last touch (p1 : TOUCH buttons) }
  1325. event : Longint; { what event triggers redraw }
  1326. cspecl : longint; { reserved for class specfic stuff }
  1327. cspecv : pointer; { misc. things }
  1328. filename : PAnsiChar;
  1329. end;
  1330. TFL_BUTTON_STRUCT = TFL_BUTTON_SPEC;
  1331. PFL_BUTTON_STRUCT = ^TFL_BUTTON_STRUCT;
  1332. TFL_DrawButton = Procedure (p1 : PFL_OBJECT); cdecl;
  1333. PFL_DrawButton = ^TFL_DrawButton;
  1334. TFL_CleanupButton = Procedure (p1 : PFL_BUTTON_STRUCT); cdecl;
  1335. PFL_CleanupButton= ^TFL_CleanupButton;
  1336. Const
  1337. FL_BUTTON_BOXTYPE = FL_UP_BOX;
  1338. FL_BUTTON_COL1 = FL_COL1;
  1339. FL_BUTTON_COL2 = FL_COL1;
  1340. FL_BUTTON_LCOL = FL_LCOL;
  1341. FL_BUTTON_ALIGN = FL_ALIGN_CENTER;
  1342. FL_BUTTON_MCOL1 = FL_MCOL;
  1343. FL_BUTTON_MCOL2 = FL_MCOL;
  1344. FL_BUTTON_BW = FL_BOUND_WIDTH;
  1345. {
  1346. * light button defaults
  1347. }
  1348. FL_LIGHTBUTTON_BOXTYPE = FL_UP_BOX;
  1349. FL_LIGHTBUTTON_COL1 = FL_COL1;
  1350. FL_LIGHTBUTTON_COL2 = FL_YELLOW;
  1351. FL_LIGHTBUTTON_LCOL = FL_LCOL;
  1352. FL_LIGHTBUTTON_ALIGN = FL_ALIGN_CENTER;
  1353. {**** Others ****}
  1354. FL_LIGHTBUTTON_TOPCOL = FL_COL1;
  1355. FL_LIGHTBUTTON_MCOL = FL_MCOL;
  1356. FL_LIGHTBUTTON_MINSIZE = 12;
  1357. {* round button defaults **}
  1358. FL_ROUNDBUTTON_BOXTYPE = FL_NO_BOX;
  1359. FL_ROUNDBUTTON_COL1 = FL_MCOL;
  1360. FL_ROUNDBUTTON_COL2 = FL_YELLOW;
  1361. FL_ROUNDBUTTON_LCOL = FL_LCOL;
  1362. FL_ROUNDBUTTON_ALIGN = FL_ALIGN_CENTER;
  1363. FL_ROUNDBUTTON_TOPCOL = FL_COL1;
  1364. FL_ROUNDBUTTON_MCOL = FL_MCOL;
  1365. {* round3d button defaults **}
  1366. FL_ROUND3DBUTTON_BOXTYPE = FL_NO_BOX;
  1367. FL_ROUND3DBUTTON3D_COL1 = FL_MCOL;
  1368. FL_ROUND3DBUTTON_COL2 = FL_YELLOW;
  1369. FL_ROUND3DBUTTON_LCOL = FL_LCOL;
  1370. FL_ROUND3DBUTTON_ALIGN = FL_ALIGN_CENTER;
  1371. FL_ROUND3DBUTTON_TOPCOL = FL_COL1;
  1372. FL_ROUND3DBUTTON_MCOL = FL_MCOL;
  1373. {* check button defaults **}
  1374. FL_CHECKBUTTON_BOXTYPE = FL_NO_BOX;
  1375. FL_CHECKBUTTON_COL1 = FL_COL1;
  1376. FL_CHECKBUTTON_COL2 = FL_YELLOW;
  1377. FL_CHECKBUTTON_LCOL = FL_LCOL;
  1378. FL_CHECKBUTTON_ALIGN = FL_ALIGN_CENTER;
  1379. FL_CHECKBUTTON_TOPCOL = FL_COL1;
  1380. FL_CHECKBUTTON_MCOL = FL_MCOL;
  1381. {* bitmap button defaults *}
  1382. FL_BITMAPBUTTON_BOXTYPE = FL_UP_BOX;
  1383. FL_BITMAPBUTTON_COL1 = FL_COL1; { bitmap background }
  1384. FL_BITMAPBUTTON_COL2 = FL_BLUE; { "focus" color }
  1385. FL_BITMAPBUTTON_LCOL = FL_LCOL; { bitmap foreground }
  1386. FL_BITMAPBUTTON_ALIGN = FL_ALIGN_BOTTOM;
  1387. {* bitmap button defaults *}
  1388. FL_PIXMAPBUTTON_BOXTYPE = FL_UP_BOX;
  1389. FL_PIXMAPBUTTON_COL1 = FL_COL1; { box col }
  1390. FL_PIXMAPBUTTON_COL2 = FL_YELLOW; { bound rect }
  1391. FL_PIXMAPBUTTON_LCOL = FL_LCOL;
  1392. FL_PIXMAPBUTTON_ALIGN = FL_ALIGN_BOTTOM;
  1393. {**** Routines ****}
  1394. Function fl_create_button(p1 : Longint ; p2,p3,p4,p5 : TFL_Coord;p6 : PAnsiChar) : PFL_OBJECT; cdecl;external;
  1395. Function fl_create_roundbutton(p1 : Longint ; p2,p3,p4,p5 : TFL_Coord;p6 : PAnsiChar) : PFL_OBJECT; cdecl;external;
  1396. Function fl_create_round3dbutton(p1 : Longint ; p2,p3,p4,p5 : TFL_Coord;p6 : PAnsiChar) : PFL_OBJECT; cdecl;external;
  1397. Function fl_create_lightbutton(p1 : Longint ; p2,p3,p4,p5 : TFL_Coord;p6 : PAnsiChar) : PFL_OBJECT; cdecl;external;
  1398. Function fl_create_checkbutton(p1 : Longint ; p2,p3,p4,p5 : TFL_Coord;p6 : PAnsiChar) : PFL_OBJECT; cdecl;external;
  1399. Function fl_create_bitmapbutton(p1 : Longint ; p2,p3,p4,p5 : TFL_Coord;p6 : PAnsiChar) : PFL_OBJECT; cdecl;external;
  1400. Function fl_create_pixmapbutton(p1 : Longint ; p2,p3,p4,p5 : TFL_Coord;p6 : PAnsiChar) : PFL_OBJECT; cdecl;external;
  1401. Function fl_add_roundbutton(p1 : Longint ; p2,p3,p4,p5 :TFL_Coord; p6: PAnsiChar) : PFL_OBJECT; cdecl;external;
  1402. Function fl_add_round3dbutton(p1 : Longint ; p2,p3,p4,p5 :TFL_Coord; p6: PAnsiChar) : PFL_OBJECT; cdecl;external;
  1403. Function fl_add_lightbutton(p1 : Longint ; p2,p3,p4,p5 :TFL_Coord; p6: PAnsiChar) : PFL_OBJECT; cdecl;external;
  1404. Function fl_add_checkbutton(p1 : Longint ; p2,p3,p4,p5 :TFL_Coord; p6: PAnsiChar) : PFL_OBJECT; cdecl;external;
  1405. Function fl_add_button(p1 : Longint ; p2,p3,p4,p5 :TFL_Coord; p6: PAnsiChar) : PFL_OBJECT; cdecl;external;
  1406. Procedure fl_set_bitmapbutton_data (p1 : PFL_OBJECT; p2,p3 : Longint ; p4 : PAnsiChar); cdecl;external;
  1407. Procedure fl_set_bitmapbutton_file (p1 : PFL_OBJECT; p2: PAnsiChar); cdecl;external;
  1408. Function fl_add_bitmapbutton (p1 : longint; p2,p3,p4,p5: TFL_Coord;p6 : PAnsiChar) : PFL_OBJECT; cdecl;external;
  1409. {
  1410. #define fl_set_bitmapbutton_datafile fl_set_bitmapbutton_file
  1411. }
  1412. Function fl_add_pixmapbutton(p1 : Longint ; p2,p3,p4,p5 : TFL_Coord;p6 : PAnsiChar) : PFL_OBJECT; cdecl;external;
  1413. Procedure fl_set_pixmapbutton_data(p1 : PFL_OBJECT; p2 : PPAnsiChar);
  1414. Procedure fl_set_pixmapbutton_file(p1 : PFL_OBJECT; p2 : PAnsiChar);
  1415. Procedure fl_set_pixmapbutton_align(p1 : PFL_OBJECT; p2 : Longint ; p3 : Longint ; p4 : Longint );
  1416. Procedure fl_set_pixmapbutton_pixmap(p1 : PFL_OBJECT; p2 : TPixmap; p3 :TPixmap);
  1417. Procedure fl_set_pixmapbutton_colorcloseness(p1 : Longint ; p2 : Longint ; p3 :Longint );
  1418. Procedure fl_free_pixmapbutton_pixmap(p1 : PFL_OBJECT);
  1419. Function fl_get_pixmapbutton_pixmap(p1 : PFL_OBJECT; p2 : PPixmap; p3 : PPixmap) : TPixmap;
  1420. Function fl_get_button(p1 : PFL_OBJECT ) : Longint ; cdecl;external;
  1421. Procedure fl_set_button(p1 : PFL_OBJECT; p2 : Longint ); cdecl;external;
  1422. Function fl_get_button_numb(p1 : PFL_OBJECT ) : Longint ; cdecl;external;
  1423. Procedure fl_set_button_shortcut(p1 : PFL_OBJECT; p2 : PAnsiChar;p3 : Longint );
  1424. Function fl_create_generic_button(p1,p2 : Longint ; p3,p4,p5,p6 : TFL_Coord;p7 : PAnsiChar) : PFL_OBJECT; cdecl;external;
  1425. Procedure fl_add_button_class(p1 : Longint ; p2 : PFL_DRAWBUTTON; p3 : PFL_CLEANUPBUTTON); cdecl;external;
  1426. {
  1427. *
  1428. * Header for FL_CANVAS
  1429. *
  1430. }
  1431. type TFL_CANVAS_TYPE = Longint;
  1432. const
  1433. FL_NORMAL_CANVAS = 0;
  1434. FL_SCROLLED_CANVAS = 1;
  1435. Type
  1436. TFL_HANDLE_CANVAS = Procedure (P1 : PFL_OBJECT; P2 : TWindow; P3 : Longint ; P4 : Longint ;
  1437. P5 : PXEvent; P6 : pointer);cdecl;
  1438. PFL_HANDLE_CANVAS = ^TFL_HANDLE_CANVAS;
  1439. TFL_MODIFY_CANVAS_PROP = Procedure (p1 : PFL_OBJECT); cdecl;
  1440. PFL_MODIFY_CANVAS_PROP = ^TFL_MODIFY_CANVAS_PROP;
  1441. {******************* Default ********************}
  1442. Const FL_CANVAS_BOXTYPE = FL_DOWN_BOX;
  1443. FL_CANVAS_ALIGN = FL_ALIGN_TOP;
  1444. {*********** Interfaces ***********************}
  1445. Function fl_create_generic_canvas(p1 : Longint; p2 : Longint ; p3,p4,p5,p6 : TFL_Coord; p7 : PAnsiChar) : PFL_OBJECT; cdecl;external;
  1446. Function fl_add_canvas(p1 : Longint; p2,p3,p4,p5 : TFL_Coord; p6 : PAnsiChar): PFL_OBJECT; cdecl;external;
  1447. Function fl_create_canvas(p1 : Longint; p2,p3,p4,p5 : TFL_Coord; p6 : PAnsiChar) : PFL_OBJECT; cdecl;external;
  1448. Function fl_create_mesacanvas(p1 : Longint; p2,p3,p4,p5 : TFL_Coord;p6 : PAnsiChar) : PFL_OBJECT; cdecl;external;
  1449. Function fl_add_mesacanvas(p1 : Longint; p2,p3,p4,p5 : TFL_Coord;p6 : PAnsiChar) : PFL_OBJECT; cdecl;external;
  1450. Procedure fl_set_canvas_decoration(p1 : PFL_OBJECT; p2 : Longint );
  1451. Procedure fl_set_canvas_colormap(p1 : PFL_OBJECT; p2 : TColormap);cdecl;external;
  1452. Procedure fl_set_canvas_visual(p1 : PFL_OBJECT; p2 : PVisual);cdecl;external;
  1453. Procedure fl_set_canvas_depth(p1 : PFL_OBJECT; p2 : Longint );cdecl;external;
  1454. Procedure fl_set_canvas_attributes(p1 : PFL_OBJECT; p2 : word; p3 : PXSetWindowAttributes);cdecl;external;
  1455. Function fl_add_canvas_handler(p1 : PFL_OBJECT; p2 : Longint ; p3 : PFL_HANDLE_CANVAS; p4 : pointer) : PFL_HANDLE_CANVAS ; cdecl;external;
  1456. Function fl_get_canvas_id(p1 : PFL_OBJECT ) : TWindow ; cdecl;external;
  1457. Function fl_get_canvas_colormap(p1 : PFL_OBJECT ) : TColormap; cdecl;external;
  1458. Function fl_get_canvas_depth(p1 : PFL_OBJECT ) : Longint ; cdecl;external;
  1459. Procedure fl_remove_canvas_handler(p1 : PFL_OBJECT; p2 : Longint ; p3 : PFL_HANDLE_CANVAS); cdecl;external;
  1460. Procedure fl_hide_canvas(p1 : PFL_OBJECT); { internal use only } cdecl;external;
  1461. Procedure fl_canvas_yield_to_shortcut(p1 : PFL_OBJECT; p2 : Longint ); cdecl;external;
  1462. Procedure fl_share_canvas_colormap(p1 : PFL_OBJECT; p2 : TColormap); cdecl;external;
  1463. Procedure fl_modify_canvas_prop(p1 : PFL_OBJECT;
  1464. P2 : PFL_MODIFY_CANVAS_PROP;
  1465. p3 : PFL_MODIFY_CANVAS_PROP;
  1466. p4 : PFL_MODIFY_CANVAS_PROP);cdecl;external;
  1467. { OpenGL canvases }
  1468. Function fl_create_glcanvas(p1 : Longint; p2,p3,p4,p5 : TFL_Coord;p6 : PAnsiChar) : PFL_OBJECT; cdecl;external;
  1469. Function fl_add_glcanvas(p1 : Longint; p2,p3,p4,p5 : TFL_Coord; p6 : PAnsiChar) : PFL_OBJECT; cdecl;external;
  1470. Procedure fl_set_glcanvas_defaults(p1 : pointer); cdecl;external;
  1471. Procedure fl_get_glcanvas_defaults(p1 : pointer); cdecl;external;
  1472. Procedure fl_set_glcanvas_attributes(p1 : PFL_OBJECT; p2 : pointer); cdecl;external;
  1473. Procedure fl_get_glcanvas_attributes(p1 : PFL_OBJECT; p2 : pointer); cdecl;external;
  1474. Procedure fl_set_glcanvas_direct(p1 : PFL_OBJECT; p2 : Longint ); cdecl;external;
  1475. Procedure fl_activate_glcanvas(p1 : PFL_OBJECT); cdecl;external;
  1476. Function fl_get_glcanvas_xvisualinfo(p1 : PFL_OBJECT ) : PXVisualInfo; cdecl;external;
  1477. {
  1478. # if defined(p1 : __GLX_glx_h__) || defined(p1 : GLX_H)
  1479. Function fl_get_glcanvas_context(p1 : PFL_OBJECT ob ) : GLXContext ; cdecl;external;
  1480. Function fl_glwincreate(p1 : *; p2 : GLXContext *; p3 : Longint ; p4 : Longint ) : TWindow ; cdecl;external;
  1481. Function fl_glwinopen(p1 : *; p2 : GLXContext *; p3 : Longint ; p4 : Longint ) : TWindow ; cdecl;external;
  1482. }
  1483. {
  1484. *
  1485. * Object Class: Chart
  1486. *
  1487. }
  1488. const
  1489. FL_BAR_CHART = 0;
  1490. FL_HORBAR_CHART = 1;
  1491. FL_LINE_CHART = 2;
  1492. FL_FILL_CHART = 3;
  1493. FL_SPIKE_CHART = 4;
  1494. FL_PIE_CHART = 5;
  1495. FL_SPECIALPIE_CHART = 6;
  1496. Type TFL_CHART_TYPE = Longint;
  1497. {**** Defaults ****}
  1498. Const
  1499. FL_CHART_BOXTYPE = FL_BORDER_BOX;
  1500. FL_CHART_COL1 = FL_COL1;
  1501. FL_CHART_LCOL = FL_LCOL;
  1502. FL_CHART_ALIGN = FL_ALIGN_BOTTOM;
  1503. {**** Others ****}
  1504. FL_CHART_MAX = 512;
  1505. {**** Routines ****}
  1506. Function fl_create_chart(p1 : Longint; p2,p3,p4,p5 : TFL_Coord; p6 : PAnsiChar) : PFL_OBJECT; cdecl;external;
  1507. Function fl_add_chart(p1 : longint; p2,p3,p4,p5 : TFL_Coord; p6 : PAnsiChar) : PFL_OBJECT; cdecl;external;
  1508. Procedure fl_clear_chart(p1 : PFL_OBJECT); cdecl;external;
  1509. Procedure fl_add_chart_value(p1 : PFL_OBJECT; p2 : double; p3 : PAnsiChar; p4 : Longint ); cdecl;external;
  1510. Procedure fl_insert_chart_value(p1 : PFL_OBJECT; p2 : Longint ; p3 : double; p4 : PAnsiChar; p5 : Longint ); cdecl;external;
  1511. Procedure fl_replace_chart_value(p1 : PFL_OBJECT; p2 : Longint ; p3 : double; p4 : PAnsiChar; p5 : Longint ); cdecl;external;
  1512. Procedure fl_set_chart_bounds(p1 : PFL_OBJECT; p2 : double; p3 :double); cdecl;external;
  1513. Procedure fl_set_chart_maxnumb(p1 : PFL_OBJECT; p2 : Longint ); cdecl;external;
  1514. Procedure fl_set_chart_autosize(p1 : PFL_OBJECT; p2 : Longint ); cdecl;external;
  1515. Procedure fl_set_chart_lstyle(p1 : PFL_OBJECT; p2 : Longint ); cdecl;external;
  1516. Procedure fl_set_chart_lsize(p1 : PFL_OBJECT; p2 : Longint ); cdecl;external;
  1517. Procedure fl_set_chart_lcolor(p1 : PFL_OBJECT; p2 : TFL_COLOR); cdecl;external;
  1518. const
  1519. FL_NORMAL_CHOICE = 0;
  1520. FL_NORMAL_CHOICE2 = 1;
  1521. FL_DROPLIST_CHOICE = 2;
  1522. Type
  1523. TFL_CHOICE_TYPE = Longint;
  1524. Const
  1525. FL_SIMPLE_CHOICE = FL_NORMAL_CHOICE;
  1526. {**** Defaults ****}
  1527. FL_CHOICE_BOXTYPE = FL_ROUNDED_BOX;
  1528. FL_CHOICE_COL1 = FL_COL1;
  1529. FL_CHOICE_COL2 = FL_LCOL;
  1530. FL_CHOICE_LCOL = FL_LCOL;
  1531. FL_CHOICE_ALIGN = FL_ALIGN_LEFT;
  1532. {**** Others ****}
  1533. FL_CHOICE_MCOL = FL_MCOL;
  1534. FL_CHOICE_MAXITEMS = 63;
  1535. {**** Routines ****}
  1536. Function fl_create_choice(p1 : longint; p2,p3,p4,p5 : TFL_Coord; p6 : PAnsiChar) : PFL_OBJECT; cdecl;external;
  1537. Function fl_add_choice(p1 : longint; p2,p3,p4,p5 : TFL_Coord; p6 : PAnsiChar ) : PFL_OBJECT; cdecl;external;
  1538. Procedure fl_clear_choice(p1 : PFL_OBJECT); cdecl;external;
  1539. Procedure fl_addto_choice(p1 : PFL_OBJECT; p2 : PAnsiChar); cdecl;external;
  1540. Procedure fl_replace_choice(p1 : PFL_OBJECT; p2 : Longint ; p3 :PAnsiChar); cdecl;external;
  1541. Procedure fl_delete_choice(p1 : PFL_OBJECT; p2 : Longint ); cdecl;external;
  1542. Procedure fl_set_choice(p1 : PFL_OBJECT; p2 : Longint ); cdecl;external;
  1543. Procedure fl_set_choice_text(p1 : PFL_OBJECT; p2 : PAnsiChar); cdecl;external;
  1544. Function fl_get_choice(p1 : PFL_OBJECT ) : Longint ; cdecl;external;
  1545. Function fl_get_choice_item_text(p1 : PFL_OBJECT; p2 : Longint ) : PAnsiChar; cdecl;external;
  1546. Function fl_get_choice_maxitems(p1 : PFL_OBJECT ) : Longint ; cdecl;external;
  1547. Function fl_get_choice_text(p1 : PFL_OBJECT ) : PAnsiChar; cdecl;external;
  1548. Procedure fl_set_choice_fontsize(p1 : PFL_OBJECT; p2 : Longint ); cdecl;external;
  1549. Procedure fl_set_choice_fontstyle(p1 : PFL_OBJECT; p2 : Longint ); cdecl;external;
  1550. Procedure fl_set_choice_align(p1 : PFL_OBJECT; p2 : Longint ); cdecl;external;
  1551. Procedure fl_set_choice_item_mode(p1 : PFL_OBJECT; p2 : Longint ; p3 : word); cdecl;external;
  1552. Procedure fl_set_choice_item_shortcut(p1 : PFL_OBJECT; p2 : Longint ; p3 :PAnsiChar); cdecl;external;
  1553. Function fl_set_choice_entries(p1 : PFL_OBJECT ; p2 : PFL_PUP_ENTRY) : longint; cdecl;external;
  1554. Const
  1555. FL_ANALOG_CLOCK = 0;
  1556. FL_DIGITAL_CLOCK = 1;
  1557. FL_CLOCK_BOXTYPE = FL_UP_BOX;
  1558. FL_CLOCK_COL1 = FL_INACTIVE_COL;
  1559. FL_CLOCK_COL2 = FL_BOTTOM_BCOL;
  1560. FL_CLOCK_LCOL = FL_BLACK;
  1561. FL_CLOCK_ALIGN = FL_ALIGN_BOTTOM;
  1562. FL_CLOCK_TOPCOL = FL_COL1;
  1563. Function fl_create_clock(p1 : longint; p2,p3,p4,p5 : TFL_Coord; p6 : PAnsiChar) : PFL_OBJECT; cdecl;external;
  1564. Function fl_add_clock(p1 : longint; p2,p3,p4,p5 : TFL_Coord; p6 : PAnsiChar) : PFL_OBJECT; cdecl;external;
  1565. Procedure fl_get_clock(p1 : PFL_OBJECT; p2,p3,p4 : pointer); cdecl;external;
  1566. Function fl_set_clock_adjustment ( p1 : PFL_OBJECT; p2 : longint) : longint; cdecl;external;
  1567. Procedure fl_set_clock_ampm(p1 : PFL_OBJECT; p2 : Longint); cdecl;external;
  1568. Const
  1569. FL_NORMAL_COUNTER = 0;
  1570. FL_SIMPLE_COUNTER = 1;
  1571. type TFL_COUNTER_TYPE = Longint;
  1572. {**** Defaults ****}
  1573. Const
  1574. FL_COUNTER_BOXTYPE = FL_UP_BOX;
  1575. FL_COUNTER_COL1 = FL_COL1;
  1576. FL_COUNTER_COL2 = FL_BLUE; { ct label }
  1577. FL_COUNTER_LCOL = FL_LCOL; { ct reporting }
  1578. FL_COUNTER_ALIGN = FL_ALIGN_BOTTOM;
  1579. {**** Others ****}
  1580. FL_COUNTER_BW = FL_BOUND_WIDTH-1;
  1581. {**** Routines ****}
  1582. Function fl_create_counter(p1 : longint; p2,p3,p4,p5 : TFL_Coord;p6 : PAnsiChar) : PFL_OBJECT; cdecl;external;
  1583. Function fl_add_counter(p1 : longint; p2,p3,p4,p5 : TFL_Coord;p6: PAnsiChar) : PFL_OBJECT; cdecl;external;
  1584. Procedure fl_set_counter_value(p1 : PFL_OBJECT; p2 : double); cdecl;external;
  1585. Procedure fl_set_counter_bounds(p1 : PFL_OBJECT; p2 : double; p3 :double); cdecl;external;
  1586. Procedure fl_set_counter_step(p1 : PFL_OBJECT; p2 : double; p3 :double); cdecl;external;
  1587. Procedure fl_set_counter_precision(p1 : PFL_OBJECT; p2 : Longint ); cdecl;external;
  1588. Function fl_get_counter_value(p1 : PFL_OBJECT ) : double ; cdecl;external;
  1589. Procedure fl_get_counter_bounds(p1 : PFL_OBJECT; p2,p3 : pdouble); cdecl;external;
  1590. Procedure fl_get_counter_step(p1 : PFL_OBJECT; p2,p3 : pdouble); cdecl;external;
  1591. Procedure fl_set_counter_return(p1 : PFL_OBJECT; p2 : Longint ); cdecl;external;
  1592. Procedure fl_set_counter_filter(p1 : PFL_OBJECT;p2 : pointer); {!!!!} cdecl;external;
  1593. {
  1594. PAnsiChar(p1 : *)(p1 : PFL_OBJECT; p2 : double; p3 :Longint ));
  1595. }
  1596. {
  1597. *
  1598. * Cursor defs and prototypes
  1599. *
  1600. }
  1601. {$i cursorfont.inc}
  1602. const FL_DEFAULT_CURSOR = -1;
  1603. FL_INVISIBLE_CURSOR = -2;
  1604. Procedure fl_set_cursor(p1 : TWindow; p2 : Longint ); cdecl;external;
  1605. Procedure fl_set_cursor_color(p1 : longint; p2 : TFL_COLOR; p3 :TFL_COLOR); cdecl;external;
  1606. Function fl_create_bitmap_cursor(p1 : PAnsiChar; p2 : PAnsiChar; p3,p4,p5,p6 : Longint ) : TCursor; cdecl;external;
  1607. Function fl_get_cursor_byname(p1 : longint ) : TCursor; cdecl;external;
  1608. Function fl_create_animated_cursor(p1 : Plongint;p2 : longint): Longint; cdecl;external;
  1609. {
  1610. #define fl_reset_cursor(p1 : win) fl_set_cursor(p1 : win; p2 : -1);
  1611. }
  1612. Const
  1613. FL_NORMAL_DIAL = 0;
  1614. FL_LINE_DIAL = 1;
  1615. FL_FILL_DIAL = 2;
  1616. FL_DIAL_CW = 0;
  1617. FL_DIAL_CCW = 1;
  1618. Type
  1619. TFL_DIAL_TYPE = Longint;
  1620. {**** Defaults ****}
  1621. Const
  1622. FL_DIAL_BOXTYPE = FL_FLAT_BOX;
  1623. FL_DIAL_COL1 = FL_COL1;
  1624. FL_DIAL_COL2 = FL_RIGHT_BCOL;
  1625. FL_DIAL_LCOL = FL_LCOL;
  1626. FL_DIAL_ALIGN = FL_ALIGN_BOTTOM;
  1627. {**** Others ****}
  1628. FL_DIAL_TOPCOL = FL_COL1;
  1629. {**** Routines ****}
  1630. Function fl_create_dial(p1 : longint; p2,p3,p4,p5 : TFL_Coord;p6 :PAnsiChar) : PFL_OBJECT; cdecl;external;
  1631. Function fl_add_dial(p1 : longint; p2,p3,p4,p5 : TFL_Coord;p6: PAnsiChar) : PFL_OBJECT; cdecl;external;
  1632. Procedure fl_set_dial_value(p1 : PFL_OBJECT; p2 : double); cdecl;external;
  1633. Function fl_get_dial_value(p1 : PFL_OBJECT ) : double ; cdecl;external;
  1634. Procedure fl_set_dial_bounds(p1 : PFL_OBJECT; p2 : double; p3 :double); cdecl;external;
  1635. Procedure fl_get_dial_bounds(p1 : PFL_OBJECT; p2 : pdouble; p3 :pdouble); cdecl;external;
  1636. Procedure fl_set_dial_step(p1 : PFL_OBJECT; p2 : double); cdecl;external;
  1637. Procedure fl_set_dial_return(p1 : PFL_OBJECT; p2 : Longint ); cdecl;external;
  1638. Procedure fl_set_dial_angles(p1 : PFL_OBJECT; p2 : double; p3 :double); cdecl;external;
  1639. Procedure fl_set_dial_cross(p1 : PFL_OBJECT; p2 : Longint ); cdecl;external;
  1640. Procedure fl_set_dial_direction (p1 : PFL_OBJECT; p2 : Longint); cdecl;external;
  1641. {
  1642. *
  1643. * Convenience Functions to read a directory cdecl;external;
  1644. }
  1645. { File types }
  1646. Const
  1647. FT_FILE = 0;
  1648. FT_DIR = 1;
  1649. FT_LINK = 2;
  1650. FT_SOCK = 3;
  1651. FT_FIFO = 4;
  1652. FT_BLK = 5;
  1653. FT_CHR = 6;
  1654. FT_OTHER = 7;
  1655. type TFL_Dirlist = record
  1656. name : PAnsiChar; { entry name }
  1657. ftype : longint; { FILE_TYPE }
  1658. dl_mtime : longint;
  1659. dl_size : cardinal;
  1660. filler : array[0..2] of longint;
  1661. end;
  1662. PFL_Dirlist = ^TFL_Dirlist;
  1663. TFL_DIRLIST_FILTER = Procedure (p1 : PAnsiChar; p2 : Longint ); cdecl;
  1664. PFL_DIRLIST_FILTER = ^TFL_DIRLIST_FILTER;
  1665. Const
  1666. FL_ALPHASORT = 1;
  1667. FL_RALPHASORT = 2;
  1668. FL_MTIMESORT = 3;
  1669. FL_RMTIMESORT = 4;
  1670. FL_SIZESORT = 5;
  1671. FL_RSIZESORT = 6;
  1672. { read dir with pattern filtering. All dirs read might be cached.
  1673. * must not change dirlist in anyway.
  1674. }
  1675. Function fl_get_dirlist(p1 : PAnsiChar; p2 : PAnsiChar; p3 : pointer;p4 :longint) : PFL_Dirlist; { rescan } cdecl;external;
  1676. Function fl_set_dirlist_filter (p1 : PFL_DIRLIST_FILTER ) : PFL_DIRLIST_FILTER ; cdecl;external;
  1677. Procedure fl_set_dirlist_sort ( p1 : longint); cdecl;external;
  1678. Procedure fl_free_dirlist(p1 : PFL_Dirlist); cdecl;external;
  1679. { Free all directory caches }
  1680. Procedure fl_free_all_dirlist; cdecl;external;
  1681. Function fl_is_valid_dir(p1 : PAnsiChar ) : Longint; cdecl;external;
  1682. Function fl_fmtime(p1 : PAnsiChar ) : cardinal ; cdecl;external;
  1683. Function fl_fix_dirname(p1 : PAnsiChar) : PAnsiChar; cdecl;external;
  1684. Const
  1685. FLPS_AUTO = 0;
  1686. FLPS_LANDSCAPE = 1;
  1687. FLPS_PORTRAIT = 2;
  1688. FLPS_BW = -1;
  1689. FLPS_GRAYSCALE=0;
  1690. type
  1691. TFLPS_CONTROL = record
  1692. ps_color,orientation,auto_fit,drawbox,eps : longint;
  1693. xdpi,ydpi,paper_w,paper_h, gamma : real; { Must be float }
  1694. end;
  1695. PFLPS_CONTROL = ^TFLPS_CONTROL;
  1696. Function flps_init : PFLPS_CONTROL; cdecl;external;
  1697. Function fl_object_ps_dump (p1 : PFL_OBJECT; p2 : PAnsiChar) : longint; cdecl;external;
  1698. { types of frames }
  1699. Const
  1700. FL_NO_FRAME = 0;
  1701. FL_UP_FRAME = 1;
  1702. FL_DOWN_FRAME = 2;
  1703. FL_BORDER_FRAME = 3;
  1704. FL_SHADOW_FRAME = 4;
  1705. FL_ENGRAVED_FRAME = 5;
  1706. FL_ROUNDED_FRAME = 6;
  1707. FL_EMBOSSED_FRAME = 7;
  1708. FL_OVAL_FRAME = 8;
  1709. FL_FRAME_COL1 = FL_BLACK;
  1710. FL_FRAME_COL2 = FL_COL1;
  1711. FL_FRAME_LCOL = FL_BLACK;
  1712. Function fl_create_frame(p1 : longint; p2,p3,p4,p5 : TFL_Coord; p6 : PAnsiChar) : PFL_OBJECT; cdecl;external;
  1713. Function fl_add_frame(p1 : longint; p2,p3,p4,p5 : TFL_Coord;p6 : PAnsiChar) : PFL_OBJECT; cdecl;external;
  1714. Function fl_create_labelframe(p1 : longint; p2,p3,p4,p5 : TFL_Coord; p6 : PAnsiChar) : PFL_OBJECT; cdecl;external;
  1715. Function fl_add_labelframe(p1 : longint; p2,p3,p4,p5 : TFL_Coord;p6 : PAnsiChar) : PFL_OBJECT; cdecl;external;
  1716. {
  1717. *
  1718. * Object Class: Free
  1719. }
  1720. Const
  1721. FL_NORMAL_FREE = 0;
  1722. FL_INACTIVE_FREE = 1;
  1723. FL_INPUT_FREE = 2;
  1724. FL_CONTINUOUS_FREE = 3;
  1725. FL_ALL_FREE = 4;
  1726. Type
  1727. TFL_FREE_TYPE = Longint;
  1728. PFL_FREE_TYPE = ^TFL_FREE_TYPE;
  1729. Const FL_SLEEPING_FREE = FL_INACTIVE_FREE;
  1730. Function fl_create_free(p1 : LongInt; p2,p3,p4,p5 : TFL_Coord;p6: PAnsiChar; p7 : PFL_HANDLEPTR) : PFL_OBJECT; cdecl;external;
  1731. Function fl_add_free(p1 : LongInt; p2,p3,p4,p5 : TFL_Coord;p6 : PAnsiChar; P7 : PFL_HANDLEPTR) : PFL_OBJECT; cdecl;external;
  1732. Const
  1733. FLAlertDismissLabel = 'flAlert.dismiss.label';
  1734. FLQuestionYesLabel = 'flQuestion.yes.label';
  1735. FLQuestionNoLabel = 'flQuestion.no.label';
  1736. FLOKLabel = 'flInput.ok.label';
  1737. FLInputClearLabel = 'flInput.clear.label';
  1738. FLInputCancelLabel = 'flInput.cancel.label';
  1739. { from goodies.c }
  1740. Procedure fl_set_goodies_font(p1 : LongInt; p2 : Longint ); cdecl;external;
  1741. Procedure fl_show_message(p1 : PAnsiChar; p2 : PAnsiChar; p3 :PAnsiChar); cdecl;external;
  1742. Procedure fl_show_messages(p1 : PAnsiChar); cdecl;external;
  1743. Procedure fl_show_alert(p1 : PAnsiChar; p2 : PAnsiChar; p3 : PAnsiChar; p4 : Longint ); cdecl;external;
  1744. Function fl_show_question(p1 : PAnsiChar; p2 : longint) : Longint ; cdecl;external;
  1745. Function fl_show_input(p1 : PAnsiChar; p2 : PAnsiChar ) : PAnsiChar; cdecl;external;
  1746. Function fl_show_simple_input(p1 : PAnsiChar; p2 : PAnsiChar ) : PAnsiChar; cdecl;external;
  1747. Function fl_show_colormap(p1 : Longint ) : Longint ; cdecl;external;
  1748. Function fl_show_choice(p1,p2,p3 : PAnsiChar; p4 : Longint ; p5,p6,p7 : PAnsiChar; p8 : Longint) : Longint; cdecl;external;
  1749. Function fl_show_choices(p1 : PAnsiChar; p4 : Longint ; p5,p6,p7 : PAnsiChar; p8 : Longint) : Longint; cdecl;external;
  1750. Procedure fl_set_choices_shortcut(p1,p2,p3 :PAnsiChar); cdecl;external;
  1751. Procedure fl_show_oneliner(p1 : PAnsiChar; p2 : TFL_Coord; p3 :TFL_Coord); cdecl;external;
  1752. Procedure fl_hide_oneliner; cdecl;external;
  1753. Procedure fl_set_oneliner_font(p1 : LongInt; p2 : Longint ); cdecl;external;
  1754. Procedure fl_set_oneliner_color(p1 : TFL_COLOR; p2 : TFL_COLOR); cdecl;external;
  1755. type TFD_CMDLOG = record
  1756. form : PFL_FORM;
  1757. browser,close_browser,clear_browser : PFL_OBJECT;
  1758. end;
  1759. PFD_CMDLOG = ^TFD_CMDLOG;
  1760. Function fl_exe_command(p1 : PAnsiChar; p2 : Longint) : Longint; cdecl;external;
  1761. Function fl_end_command(p1 : longint) : Longint; cdecl;external;
  1762. Function fl_check_command(p1 : longint) : longint; cdecl;external;
  1763. Function fl_end_all_command : Longint; cdecl;external;
  1764. Procedure fl_show_command_log(p1 : Longint); cdecl;external;
  1765. Procedure fl_hide_command_log; cdecl;external;
  1766. Procedure fl_clear_command_log; cdecl;external;
  1767. Procedure fl_addto_command_log(p1 : PAnsiChar); cdecl;external;
  1768. Procedure fl_set_command_log_position(p1,p2 :longint); cdecl;external;
  1769. Function fl_get_command_log_fdstruct : PFD_CMDLOG; cdecl;external;
  1770. { aliases }
  1771. {
  1772. #define fl_open_command fl_exe_command
  1773. #define fl_close_command fl_end_command
  1774. }
  1775. {****** from file selector ****************}
  1776. Const FL_MAX_FSELECTOR = 6;
  1777. type TFD_FSELECTOR = record
  1778. fselect : PFL_FORM;
  1779. browser, theinput, prompt, resbutt,
  1780. patbutt,dirbutt, cancel, ready : PFL_OBJECT;
  1781. dirlabel,patlabel : PFL_OBJECT;
  1782. appbut : array[0..2] of PFL_OBJECT;
  1783. end;
  1784. PFD_FSELECTOR = ^TFD_FSELECTOR;
  1785. Function fl_use_fselector(p1 : LongInt ) : LongInt; cdecl;external;
  1786. Function fl_show_fselector(p1,p2,p3,p4 : PAnsiChar) : PAnsiChar; cdecl;external;
  1787. Procedure fl_set_fselector_fontsize (p1 : Longint); cdecl;external;
  1788. Procedure fl_set_fselector_fontstyle (p1 : longint); cdecl;external;
  1789. Procedure fl_set_fselector_placement(p1 : LongInt); cdecl;external;
  1790. Procedure fl_set_fselector_border(p1 : LongInt); cdecl;external;
  1791. {
  1792. #define fl_set_fselector_transient(p1 : b) \
  1793. fl_set_fselector_border(p1 : (p1 : b)?FL_TRANSIENT:FL_FULLBORDER)
  1794. }
  1795. Type TFSelector_Callback = Function (P1 : PAnsiChar; P2 : Pointer) : Longint; cdecl;
  1796. PFSelector_Callback = ^TFSelector_Callback;
  1797. TFL_Procedure = Procedure; cdecl;
  1798. PFL_Procedure = ^TFL_Procedure;
  1799. Procedure fl_set_fselector_callback( p1 : PFSelector_Callback; p2 : pointer); cdecl;external;
  1800. Function fl_get_filename : PAnsiChar; cdecl;external;
  1801. Function fl_get_directory : PAnsiChar; cdecl;external;
  1802. Function fl_get_pattern : PAnsiChar; cdecl;external;
  1803. Function fl_set_directory (p1 : PAnsiChar ) : LongInt; cdecl;external;
  1804. Procedure fl_set_pattern (p1 : PAnsiChar); cdecl;external;
  1805. Procedure fl_refresh_fselector; cdecl;external;
  1806. Procedure fl_add_fselector_appbutton(p1 : PAnsiChar; p2 : PFL_Procedure; p3 : pointer); cdecl;external;
  1807. Procedure fl_remove_fselector_appbutton(p1 : PAnsiChar); cdecl;external;
  1808. Procedure fl_disable_fselector_cache(p1 : LongInt); cdecl;external;
  1809. Procedure fl_invalidate_fselector_cache; cdecl;external;
  1810. Function fl_get_fselector_form : PFL_FORM; cdecl;external;
  1811. Function fl_get_fselector_fdstruct : PFD_FSELECTOR; cdecl;external;
  1812. Procedure fl_hide_fselector; cdecl;external;
  1813. Procedure fl_set_fselector_filetype_marker(p1,p2,p3,p4,p5 : Longint); cdecl;external;
  1814. {
  1815. #define fl_show_file_selector fl_show_fselector
  1816. #define fl_set_fselector_cb fl_set_fselector_callback
  1817. #define fl_set_fselector_title(p1 : s) fl_set_form_title(p1 : fl_get_fselector_form(p1 : ); p2 : s)
  1818. }
  1819. {**** Types ****}
  1820. Const
  1821. FL_NORMAL_INPUT = 0;
  1822. FL_FLOAT_INPUT = 1;
  1823. FL_INT_INPUT = 2;
  1824. FL_DATE_INPUT = 3;
  1825. FL_MULTILINE_INPUT = 4;
  1826. FL_HIDDEN_INPUT = 5;
  1827. FL_SECRET_INPUT = 6;
  1828. FL_INPUT_MMDD = 0;
  1829. FL_INPUT_DDMM = 1;
  1830. Type TFL_INPUT_TYPE = Longint;
  1831. {**** Defaults ****}
  1832. Const
  1833. FL_INPUT_BOXTYPE = FL_DOWN_BOX;
  1834. FL_INPUT_COL1 = FL_COL1;
  1835. FL_INPUT_COL2 = FL_MCOL;
  1836. FL_INPUT_LCOL = FL_LCOL;
  1837. FL_INPUT_ALIGN = FL_ALIGN_LEFT;
  1838. {**** Others ****}
  1839. FL_INPUT_TCOL = FL_LCOL;
  1840. FL_INPUT_CCOL = FL_BLUE;
  1841. cFL_RINGBELL = (1 shl 4);
  1842. {**** Routines ****}
  1843. Function fl_create_input(p1 : Longint; p2,p3,p4,p5 : TFL_Coord; p6: PAnsiChar) : PFL_OBJECT; cdecl;external;
  1844. Function fl_add_input(p1 : LongInt; p2,p3,p4,p5 : TFL_Coord; P6 : PAnsiChar ) : PFL_OBJECT; cdecl;external;
  1845. Procedure fl_set_input(p1 : PFL_OBJECT; p2 : PAnsiChar); cdecl;external;
  1846. Procedure fl_set_input_color(p1 : PFL_OBJECT; p2 : Longint ; p3 :Longint ); cdecl;external;
  1847. Procedure fl_set_input_return(p1 : PFL_OBJECT; p2 : Longint ); cdecl;external;
  1848. Procedure fl_set_input_scroll(p1 : PFL_OBJECT; p2 : Longint ); cdecl;external;
  1849. Procedure fl_set_input_cursorpos(p1 : PFL_OBJECT; p2 : Longint ; p3 :Longint ); cdecl;external;
  1850. Procedure fl_set_input_selected(p1 : PFL_OBJECT; p2 : Longint ); cdecl;external;
  1851. Procedure fl_set_input_selected_range(p1 : PFL_OBJECT; p2 : Longint ; p3 :Longint ); cdecl;external;
  1852. Procedure fl_set_input_maxchars(p1 : PFL_OBJECT; p2 : Longint ); cdecl;external;
  1853. Procedure fl_set_input_format(p1 : PFL_OBJECT; p2,p3 : Longint ); cdecl;external;
  1854. Procedure fl_set_input_hscrollbar(p1 : PFL_OBJECT; p2 : Longint ); cdecl;external;
  1855. Procedure fl_set_input_vscrollbar(p1 : PFL_OBJECT; p2 : Longint ); cdecl;external;
  1856. Procedure fl_set_input_xoffset(p1 : PFL_OBJECT; p2 : Longint ); cdecl;external;
  1857. Procedure fl_set_input_topline(p1 : PFL_OBJECT; p2 : Longint ); cdecl;external;
  1858. Procedure fl_set_input_scrollbarsize(p1 : PFL_OBJECT; p2,p3 : Longint ); cdecl;external;
  1859. Function fl_get_input(p1 : PFL_OBJECT ) : PAnsiChar; cdecl;external;
  1860. Function fl_get_input_cursorpos(p1 : PFL_OBJECT; p2,p3 : Pointer ) : LongInt; cdecl;external;
  1861. Function fl_get_input_topline(p1 : PFL_OBJECT;p2,p3 : PLongint) : Longint; cdecl;external;
  1862. Function fl_get_input_screenlines(p1 : PFL_OBJECT) : Longint; cdecl;external;
  1863. Function fl_get_input_numberoflines(p1 : PFL_OBJECT) : Longint; cdecl;external;
  1864. Procedure fl_get_input_format(p1 : PFL_OBJECT;p2,p3 : PLongint); cdecl;external;
  1865. Function fl_get_input_selected_range(p1 : PFL_OBJECT; p2 : Longint ; p3 :Longint ) : PAnsiChar ; cdecl;external;
  1866. type
  1867. TFL_INPUTVALIDATOR = Procedure (p1 : PFL_OBJECT; p2,p3 : PAnsiChar; p4 : Longint ); cdecl;
  1868. PFL_INPUTVALIDATOR= ^TFL_INPUTVALIDATOR;
  1869. Function fl_set_input_filter(p1 : PFL_OBJECT; p2 : PFL_INPUTVALIDATOR ) : PFL_INPUTVALIDATOR ; cdecl;external;
  1870. {
  1871. #define fl_set_input_shortcut fl_set_object_shortcut
  1872. #define ringbell(p1 : ) XBell(p1 : fl_display; p2 : 0)
  1873. }
  1874. type TFL_EditKeymap = record
  1875. { basic editing }
  1876. del_prev_char : Longint; { delete previous AnsiChar }
  1877. del_next_char : Longint; { delete next AnsiChar }
  1878. del_prev_word : Longint; { delete previous word }
  1879. del_next_word : Longint; { delete next word }
  1880. { movement }
  1881. moveto_prev_line : Longint; { one line up }
  1882. moveto_next_line : Longint; { one line down }
  1883. moveto_prev_char : Longint; { one AnsiChar left }
  1884. moveto_next_char : Longint; { one AnsiChar right }
  1885. moveto_prev_word : Longint; { one word left }
  1886. moveto_next_word : Longint; { one word right }
  1887. moveto_prev_page : Longint; { one page up }
  1888. moveto_next_page : Longint; { one page down }
  1889. moveto_bol : Longint; { move to begining of line }
  1890. moveto_eol : Longint; { move to end of line }
  1891. moveto_bof : Longint; { move to begin of file }
  1892. moveto_eof : Longint; { move to end of file }
  1893. { misc. stuff }
  1894. transpose : Longint; { switch two AnsiChar positions }
  1895. paste : Longint; { paste the edit buffer }
  1896. backspace : Longint; { another del_prev_char }
  1897. del_to_bol : Longint; { cut to begining of line }
  1898. del_to_eol : Longint; { cut to end of line }
  1899. clear_field : Longint; { delete everything }
  1900. del_to_eos : Longint; { not implemented }
  1901. reserverd : array[0..3] of Longint; { fillter }
  1902. end;
  1903. PFL_EditKeymap = ^TFL_EditKeymap;
  1904. Procedure fl_set_input_editkeymap(a: PFL_EditKeymap); cdecl;external;
  1905. {*********** Object Class: Menu ***********}
  1906. Const
  1907. FL_TOUCH_MENU = 0;
  1908. FL_PUSH_MENU = 1;
  1909. FL_PULLDOWN_MENU = 2;
  1910. Type TFL_MENU_TYPE = Longint;
  1911. {**** Defaults ****}
  1912. Const
  1913. FL_MENU_BOXTYPE = FL_BORDER_BOX;
  1914. FL_MENU_COL1 = FL_COL1;
  1915. FL_MENU_COL2 = FL_MCOL;
  1916. FL_MENU_LCOL = FL_LCOL;
  1917. FL_MENU_ALIGN = FL_ALIGN_CENTER;
  1918. {**** Others ****}
  1919. FL_MENU_MAXITEMS = 128;
  1920. FL_MENU_MAXSTR = 64;
  1921. {**** Routines ****}
  1922. Function fl_create_menu(p1 : LongInt; p2,p3,p4,p5 : TFL_Coord; P6 : PAnsiChar) : PFL_OBJECT; cdecl;external;
  1923. Function fl_add_menu(p1 : LongInt; p2,p3,p4,p5 : TFL_Coord; P6 : PAnsiChar) : PFL_OBJECT; cdecl;external;
  1924. Procedure fl_clear_menu(p1 : PFL_OBJECT); cdecl;external;
  1925. Procedure fl_set_menu(p1 : PFL_OBJECT; p2 : PAnsiChar); cdecl;external;
  1926. Procedure fl_addto_menu(p1 : PFL_OBJECT; p2 : PAnsiChar); cdecl;external;
  1927. Procedure fl_replace_menu_item(p1 : PFL_OBJECT; p2 : Longint ; p3 :PAnsiChar); cdecl;external;
  1928. Procedure fl_delete_menu_item(p1 : PFL_OBJECT; p2 : Longint ); cdecl;external;
  1929. Procedure fl_set_menu_item_shortcut(p1 : PFL_OBJECT; p2 : Longint ; p3 :PAnsiChar); cdecl;external;
  1930. Procedure fl_set_menu_item_mode(p1 : PFL_OBJECT; p2 : Longint ; p3 : Cardinal); cdecl;external;
  1931. Procedure fl_show_menu_symbol(p1 : PFL_OBJECT; p2 : Longint ); cdecl;external;
  1932. Procedure fl_set_menu_popup(p1 : PFL_OBJECT; p2 : Longint ); cdecl;external;
  1933. Function fl_get_menu_popup(p1 : pfl_object): longint; cdecl;external;
  1934. Function fl_get_menu(p1 : PFL_OBJECT ) : Longint ; cdecl;external;
  1935. Function fl_get_menu_item_text(p1 : PFL_OBJECT; p2 : Longint ) : PAnsiChar; cdecl;external;
  1936. Function fl_get_menu_maxitems(p1 : PFL_OBJECT ) : Longint ; cdecl;external;
  1937. Function fl_get_menu_item_mode(p1 : PFL_OBJECT; p2 : Longint ) : Cardinal ; cdecl;external;
  1938. Function fl_get_menu_text(p1 : PFL_OBJECT ) : PAnsiChar; cdecl;external;
  1939. Const
  1940. FL_NORMAL_MENUBAR = 0;
  1941. FL_MENUBAR_BOXTYPE =FL_UP_BOX;
  1942. FL_MENUBAR_COL1 =FL_COL1;
  1943. FL_MENUBAR_COL2 =FL_MCOL;
  1944. FL_MENUBAR_LCOL =FL_LCOL;
  1945. Function fl_create_menubar(p1 : longint; p2,p3,p4,p5 : TFL_COORD;p6 : PAnsiChar): PFL_OBJECT; cdecl;external;
  1946. Function fl_add_menubar(p1 : longint;p2,p3,p4,p5 : TFL_Coord;p6 : PAnsiChar) : PFL_OBJECT; cdecl;external;
  1947. Procedure fl_clear_menubar(p1 : PFL_OBJECT); cdecl;external;
  1948. Procedure fl_set_menubar(p1 : PFL_OBJECT; p2 : PAnsiChar); cdecl;external;
  1949. Procedure fl_set_menubar_entries(p1 : PFL_OBJECT; p2 : PAnsiChar;p3 : PFL_PUP_ENTRY); cdecl;external;
  1950. {
  1951. *
  1952. * Prototypes for pop-up menus
  1953. }
  1954. Const
  1955. FL_MAXPUPI = 80; { max item each pup }
  1956. FL_PUP_PADH = 4; { space between each items }
  1957. type
  1958. TFL_PUP_ENTERCB = Procedure (p1 : longint; p2: pointer); cdecl;
  1959. PFL_PUP_ENTERCB = ^TFL_PUP_ENTERCB;
  1960. TFL_PUP_LEAVECB =Procedure (p1 : longint; p2: pointer); cdecl;
  1961. PFL_PUP_LEAVECB = ^TFL_PUP_LEAVECB;
  1962. Function fl_setpup_entries(p1 : Longint; p2 : PFL_PUP_ENTRY) : Longint; cdecl;external;
  1963. Function fl_newpup(p1 : TWindow ) : LongInt; cdecl;external;
  1964. Function fl_defpup(p1 : TWindow; p2 : PAnsiChar) : LongInt; cdecl;external;
  1965. Function fl_addtopup(p1 : longint; p2 : PAnsiChar) : LongInt; cdecl;external;
  1966. Function fl_setpup_mode(p1 : Longint; p2 : Longint ; p3 : Cardinal) : Longint; cdecl;external;
  1967. Procedure fl_freepup(p1 : Longint); cdecl;external;
  1968. Function fl_dopup(p1 : Longint ) : LongInt; cdecl;external;
  1969. Procedure fl_setpup_shortcut(p1 : Longint; p2 : Longint ; p3 :PAnsiChar); cdecl;external;
  1970. Procedure fl_setpup_position(p1 : Longint; p2 : Longint ); cdecl;external;
  1971. Procedure fl_setpup_selection(p1 : Longint; p2 : Longint ); cdecl;external;
  1972. Procedure fl_setpup_shadow(p1 : LongInt; p2 : Longint {was LongInt}); cdecl;external;
  1973. Procedure fl_setpup_softedge(p1 : LongInt; p2 : Longint ); cdecl;external;
  1974. Function fl_setpup_fontsize(p1 : LongInt) : Longint; cdecl;external;
  1975. Function fl_setpup_fontstyle(p1 : LongInt) : Longint; cdecl;external;
  1976. Procedure fl_setpup_color(p1 : TFL_COLOR; p2 : TFL_COLOR); cdecl;external;
  1977. Procedure fl_setpup_checkcolor(p1 : TFL_COLOR); cdecl;external;
  1978. Function fl_setpup_default_fontsize(p1 : LongInt) : Longint;
  1979. Function fl_setpup_default_fontstyle(p1 : LongInt) : Longint;
  1980. Procedure fl_setpup_default_color(p1 : TFL_COLOR; p2 : TFL_COLOR);
  1981. Procedure fl_setpup_default_checkcolor(p1 : TFL_COLOR);
  1982. Procedure fl_setpup_title(p1 : LongInt; p2 : PAnsiChar); cdecl;external;
  1983. Procedure fl_setpup_bw(p1 : LongInt; p2 : Longint ); cdecl;external;
  1984. Procedure fl_setpup_pad(p1 : LongInt; p2 : Longint ; p3 :Longint ); cdecl;external;
  1985. Function fl_setpup_cursor(p1 : LongInt; p2 : Longint ) : TCursor ; cdecl;external;
  1986. Function fl_setpup_default_cursor(p1 : LongInt ) : TCursor ; cdecl;external;
  1987. Function fl_setpup_maxpup(p1 : LongInt ) : LongInt; cdecl;external;
  1988. Function fl_getpup_mode(p1 : LongInt; p2 : Longint ) : Cardinal; cdecl;external;
  1989. Function fl_getpup_text(p1 : LongInt; p2 : Longint ) : PAnsiChar; cdecl;external;
  1990. Procedure fl_showpup(p1 : LongInt); cdecl;external;
  1991. Procedure fl_hidepup(p1 : LongInt); cdecl;external;
  1992. {
  1993. #define fl_setpup_hotkey fl_setpup_shortcut
  1994. }
  1995. Function fl_setpup_itemcb(p1 : LongInt; p2 : Longint ; p3 :PFL_PUP_CB ) : PFL_PUP_CB ; cdecl;external;
  1996. Function fl_setpup_menucb(p1 : LongInt; p2 : PFL_PUP_CB ) : PFL_PUP_CB ; cdecl;external;
  1997. Procedure fl_setpup_submenu(p1 : LongInt; p2 : Longint ; p3 :Longint ); cdecl;external;
  1998. {
  1999. #define fl_setpup fl_setpup_mode
  2000. }
  2001. Const
  2002. FL_NORMAL_POSITIONER = 0;
  2003. {**** Defaults ****}
  2004. FL_POSITIONER_BOXTYPE = FL_DOWN_BOX;
  2005. FL_POSITIONER_COL1 = FL_COL1;
  2006. FL_POSITIONER_COL2 = FL_RED;
  2007. FL_POSITIONER_LCOL = FL_LCOL;
  2008. FL_POSITIONER_ALIGN = FL_ALIGN_BOTTOM;
  2009. {**** Others ****}
  2010. {**** Routines ****}
  2011. Function fl_create_positioner(p1 : LongInt; p2,p3,p4,p5 : TFL_Coord; p6 : PAnsiChar) : PFL_OBJECT; cdecl;external;
  2012. Function fl_add_positioner(p1 : LongInt; p2,p3,p4,p5 : TFL_Coord; p6 : PAnsiChar) : PFL_OBJECT; cdecl;external;
  2013. Procedure fl_set_positioner_xvalue(p1 : PFL_OBJECT; p2 : double); cdecl;external;
  2014. Function fl_get_positioner_xvalue(p1 : PFL_OBJECT ) : double ; cdecl;external;
  2015. Procedure fl_set_positioner_xbounds(p1 : PFL_OBJECT; p2 : double; p3 :double); cdecl;external;
  2016. Procedure fl_get_positioner_xbounds(p1 : PFL_OBJECT; p2 : pdouble ; p3 : pdouble); cdecl;external;
  2017. Procedure fl_set_positioner_yvalue(p1 : PFL_OBJECT; p2 : double); cdecl;external;
  2018. Function fl_get_positioner_yvalue(p1 : PFL_OBJECT ) : double ; cdecl;external;
  2019. Procedure fl_set_positioner_ybounds(p1 : PFL_OBJECT; p2 : double; p3 :double); cdecl;external;
  2020. Procedure fl_get_positioner_ybounds(p1 : PFL_OBJECT; p2 ,p3 :pdouble); cdecl;external;
  2021. Procedure fl_set_positioner_xstep(p1 : PFL_OBJECT; p2 : double); cdecl;external;
  2022. Procedure fl_set_positioner_ystep(p1 : PFL_OBJECT; p2 : double); cdecl;external;
  2023. Procedure fl_set_positioner_return(p1 : PFL_OBJECT; p2 : Longint ); cdecl;external;
  2024. Const
  2025. FL_HOR_SCROLLBAR = 0;
  2026. FL_VERT_SCROLLBAR = 1;
  2027. FL_HOR_THIN_SCROLLBAR = 2;
  2028. FL_VERT_THIN_SCROLLBAR = 3;
  2029. FL_HOR_NICE_SCROLLBAR = 4;
  2030. FL_VERT_NICE_SCROLLBAR = 5;
  2031. FL_HOR_PLAIN_SCROLLBAR = 6;
  2032. FL_VERT_PLAIN_SCROLLBAR = 7;
  2033. FL_HOR_BASIC_SCROLLBAR = FL_HOR_PLAIN_SCROLLBAR;
  2034. FL_VERT_BASIC_SCROLLBAR = FL_VERT_PLAIN_SCROLLBAR;
  2035. FL_THIN_SCROLLBAR = 0;
  2036. FL_PLAIN_SCROLLBAR = 1;
  2037. FL_NORMAL_SCROLLBAR = 2;
  2038. FL_NICE_SCROLLBAR = 3;
  2039. Function fl_create_scrollbar(p1 : longint;p2,p3,p4,p5 : TFL_Coord; p6 : PAnsiChar) : PFL_OBJECT ; cdecl;external;
  2040. Function fl_add_scrollbar(p1 : longint;p2,p3,p4,p5 : TFL_Coord; p6 : PAnsiChar) : PFL_OBJECT ; cdecl;external;
  2041. Function fl_get_scrollbar_value(p1 : PFL_OBJECT) : double ; cdecl;external;
  2042. Procedure fl_set_scrollbar_value(p1 : PFL_OBJECT; p2: double); cdecl;external;
  2043. Procedure fl_set_scrollbar_size(p1 : PFL_OBJECT; p2 : double); cdecl;external;
  2044. Procedure fl_set_scrollbar_increment(p1 : PFL_OBJECT;p2,p3: double); cdecl;external;
  2045. Procedure fl_get_scrollbar_increment(p1 : PFL_OBJECT; p2,p3 : real {float !!}); cdecl;external;
  2046. Procedure fl_set_scrollbar_bounds(p1 : PFL_OBJECT; p2,p3 : double); cdecl;external;
  2047. Procedure fl_get_scrollbar_bounds(p1 : PFL_OBJECT; p2,p3 : real {float !!!}); cdecl;external;
  2048. Procedure fl_set_scrollbar_return(p1 : PFL_OBJECT; p2 : longint); cdecl;external;
  2049. Procedure fl_set_scrollbar_step(P1 : PFL_OBJECT;p2 : double); cdecl;external;
  2050. {
  2051. *
  2052. * Object Class: Slider
  2053. *
  2054. }
  2055. Const
  2056. FL_VERT_SLIDER = 0;
  2057. FL_HOR_SLIDER = 1;
  2058. FL_VERT_FILL_SLIDER = 2;
  2059. FL_HOR_FILL_SLIDER = 3;
  2060. FL_VERT_NICE_SLIDER = 4;
  2061. FL_HOR_NICE_SLIDER = 5;
  2062. FL_HOR_BROWSER_SLIDER = 6;
  2063. FL_VERT_BROWSER_SLIDER = 7;
  2064. FL_HOR_BROWSER_SLIDER2 = 8; { for Longint ernal use only }
  2065. FL_VERT_BROWSER_SLIDER2 = 9; { for Longint ernal use only }
  2066. FL_HOR_THIN_SLIDER = 10; { internal use }
  2067. FL_VERT_THIN_SLIDER = 11; { internal use }
  2068. FL_HOR_BASIC_SLIDER = 12; { internal use }
  2069. FL_VERT_BASIC_SLIDER = 13; { internal use }
  2070. Type
  2071. TFL_SLIDER_TYPE = Longint;
  2072. PFL_SLIDER_TYPE = ^TFL_SLIDER_TYPE;
  2073. {**** Defaults ****}
  2074. Const
  2075. FL_SLIDER_BW1 = FL_BOUND_WIDTH;
  2076. FL_SLIDER_BW2 = FL_BOUND_WIDTH-1;
  2077. FL_SLIDER_BOXTYPE = FL_DOWN_BOX;
  2078. FL_SLIDER_COL1 = FL_COL1;
  2079. FL_SLIDER_COL2 = FL_COL1;
  2080. FL_SLIDER_LCOL = FL_LCOL;
  2081. FL_SLIDER_ALIGN = FL_ALIGN_BOTTOM;
  2082. {**** Others ****}
  2083. FL_SLIDER_FINE = 0.05;
  2084. FL_SLIDER_WIDTH = 0.10;
  2085. {**** Routines ****}
  2086. Function fl_create_slider(p1 : LongInt; p2,p3,p4,p5 : TFL_Coord;p6: PAnsiChar) : PFL_OBJECT; cdecl;external;
  2087. Function fl_add_slider(p1 : LongInt; p2,p3,p4,p5 : TFL_Coord;p6: PAnsiChar) : PFL_OBJECT; cdecl;external;
  2088. Function fl_create_valslider(p1 : LongInt; p2,p3,p4,p5 : TFL_Coord;p6: PAnsiChar): PFL_OBJECT; cdecl;external;
  2089. Function fl_add_valslider(p1 : LongInt; p2,p3,p4,p5 : TFL_Coord;P6: PAnsiChar) : PFL_OBJECT; cdecl;external;
  2090. Procedure fl_set_slider_value(p1 : PFL_OBJECT; p2 : double); cdecl;external;
  2091. Function fl_get_slider_value(p1 : PFL_OBJECT ) : double ; cdecl;external;
  2092. Procedure fl_set_slider_bounds(p1 : PFL_OBJECT; p2 : double; p3 :double); cdecl;external;
  2093. Procedure fl_get_slider_bounds(p1 : PFL_OBJECT; p2,p3 : pdouble); cdecl;external;
  2094. Procedure fl_set_slider_return(p1 : PFL_OBJECT; p2 : Longint ); cdecl;external;
  2095. Procedure fl_set_slider_step(p1 : PFL_OBJECT; p2 : double); cdecl;external;
  2096. Procedure fl_set_slider_increment(p1 : PFL_OBJECT; p2,p3 : double); cdecl;external;
  2097. Procedure fl_set_slider_size(p1 : PFL_OBJECT; p2 : double); cdecl;external;
  2098. Procedure fl_set_slider_precision(p1 : PFL_OBJECT; p2 : Longint ); cdecl;external;
  2099. Type
  2100. TFL_SLIDER_FILTER = Procedure (p1 : PFL_OBJECT; p2 : double; p3 :Longint ); cdecl;
  2101. PTFL_SLIDER_FILTER= ^TFL_SLIDER_FILTER ;
  2102. Procedure fl_set_slider_filter(p1 : PFL_OBJECT; p2 : PTFL_SLIDER_FILTER); cdecl;external;
  2103. const
  2104. FL_TOP_TABFOLDER = 0;
  2105. FL_BOTTOM_TABFOLDER = 1;
  2106. FL_LEFT_TABFOLDER = 2;
  2107. FL_RIGHT_TABFOLDER = 3;
  2108. FL_NORMAL_TABFOLDER = FL_TOP_TABFOLDER;
  2109. Function fl_create_tabfolder (p1 : longint;p2,p3,p4,p5 : TFL_Coord; p6 : PAnsiChar) : PFL_OBJECT ; cdecl;external;
  2110. Function fl_add_tabfolder(p1 : longint;p2,p3,p4,p5 : TFL_Coord; p6 : PAnsiChar) : PFL_OBJECT ; cdecl;external;
  2111. Function fl_addto_tabfolder(p1 : PFL_OBJECT; p2 : PAnsiChar; p3 : PFL_FORM) : PFL_OBJECT; cdecl;external;
  2112. Procedure fl_delete_folder(p1 : PFL_OBJECT; p2 : PFL_FORM); cdecl;external;
  2113. Procedure fl_delete_folder_bynumber(p1 : PFL_OBJECT; p2 : longint); cdecl;external;
  2114. Procedure fl_delete_folder_byname(p1 : PFL_OBJECT; p2 : PAnsiChar); cdecl;external;
  2115. Procedure fl_set_folder(p1 : PFL_OBJECT; P2 : PFL_FORM); cdecl;external;
  2116. Procedure fl_set_folder_byname(p1 : PFL_OBJECT; p2 : PAnsiChar); cdecl;external;
  2117. Procedure fl_set_folder_bynumber(p1 : PFL_OBJECT; p2 : longint); cdecl;external;
  2118. Function fl_get_folder(p1 : PFL_OBJECT) : PFL_FORM; cdecl;external;
  2119. Function fl_get_folder_number(p1 : PFL_OBJECT) : longint; cdecl;external;
  2120. Function fl_get_folder_name(p1 : PFL_OBJECT) : PAnsiChar; cdecl;external;
  2121. Function fl_get_active_folder(p1 : PFL_OBJECT) : PFL_FORM; cdecl;external;
  2122. Function fl_get_active_folder_number(P1 : PFL_OBJECT) : longint; cdecl;external;
  2123. Function fl_get_active_folder_name(p1 : PFL_OBJECT) : PAnsiChar; cdecl;external;
  2124. Procedure fl_get_folder_area(p1 : PFL_OBJECT; p2,p3,p4,p5 : PFL_Coord); cdecl;external;
  2125. Procedure fl_replace_folder_bynumber(p1 : PFL_OBJECT;p2 : longint;p3 : PFL_FORM); cdecl;external;
  2126. Const
  2127. FL_NORMAL_TEXT = 0;
  2128. FL_TEXT_BOXTYPE = FL_FLAT_BOX;
  2129. FL_TEXT_COL1 = FL_COL1;
  2130. FL_TEXT_COL2 = FL_MCOL;
  2131. FL_TEXT_LCOL = FL_LCOL;
  2132. FL_TEXT_ALIGN = FL_ALIGN_LEFT;
  2133. Function fl_create_text(p1 : LongInt; p2,p3,p4,p5 : TFL_Coord; p6 : PAnsiChar) : PFL_OBJECT; cdecl;external;
  2134. Function fl_add_text(p1 : LongInt; p2,p3,p4,p5 : TFL_Coord; p6 : PAnsiChar): PFL_OBJECT; cdecl;external;
  2135. {
  2136. *
  2137. * Object Class: Timer
  2138. *
  2139. }
  2140. Const
  2141. FL_NORMAL_TIMER = 0;
  2142. FL_VALUE_TIMER = 1;
  2143. FL_HIDDEN_TIMER = 2;
  2144. Type TFL_TIMER_TYPE = Longint;
  2145. {**** Defaults ****}
  2146. Const
  2147. FL_TIMER_BOXTYPE = FL_DOWN_BOX;
  2148. FL_TIMER_COL1 = FL_COL1;
  2149. FL_TIMER_COL2 = FL_RED;
  2150. FL_TIMER_LCOL = FL_LCOL;
  2151. FL_TIMER_ALIGN = FL_ALIGN_CENTER;
  2152. {**** Others ****}
  2153. FL_TIMER_BLINKRATE = 0.2;
  2154. Type TFL_TIMER_FILTER = Function (P1 : PFL_OBJECT;p2 : double) : PAnsiChar; cdecl;
  2155. PFL_TIMER_FILTER = ^TFL_TIMER_FILTER;
  2156. {**** Routines ****}
  2157. Function fl_create_timer(p1 : LongInt; p2,p3,p4,p5 : TFL_Coord;p6 : PAnsiChar) : PFL_OBJECT; cdecl;external;
  2158. Function fl_add_timer(p1 : LongInt; p2,p3,p4,p5 : TFL_Coord;p6: PAnsiChar) : PFL_OBJECT; cdecl;external;
  2159. Procedure fl_set_timer(p1 : PFL_OBJECT; p2 : double); cdecl;external;
  2160. Function fl_get_timer(p1 : PFL_OBJECT ) : double ; cdecl;external;
  2161. Procedure fl_set_timer_countup(p1 : PFL_OBJECT; p2 : Longint); cdecl;external;
  2162. Function fl_set_timer_filter (p1 : PFL_OBJECT; p2 : PFL_TIMER_FILTER) : PFL_TIMER_FILTER; cdecl;external;
  2163. Procedure fl_suspend_timer(p1 : PFL_OBJECT); cdecl;external;
  2164. Procedure fl_resume_timer(p1 : PFL_OBJECT); cdecl;external;
  2165. {
  2166. * Class FL_XYPLOT
  2167. }
  2168. Const
  2169. FL_NORMAL_XYPLOT = 0; { solid line }
  2170. FL_SQUARE_XYPLOT = 1; { with added square }
  2171. FL_CIRCLE_XYPLOT = 2; { with added circle }
  2172. FL_FILL_XYPLOT = 3; { fill completely }
  2173. FL_POINTS_XYPLOT = 4; { only data points }
  2174. FL_DASHED_XYPLOT = 5; { dashed line }
  2175. FL_IMPULSE_XYPLOT = 6;
  2176. FL_ACTIVE_XYPLOT = 7; { accepts Longint eractive manipulations }
  2177. FL_EMPTY_XYPLOT = 8;
  2178. Type
  2179. TFL_XYPLOT_TYPE = Longint;
  2180. Const
  2181. FL_LINEAR = 0;
  2182. FL_LOG = 1;
  2183. Const
  2184. FL_GRID_NONE = 0;
  2185. FL_GRID_MAJOR = 1;
  2186. FL_GRID_MINOR = 2;
  2187. {**** Defaults ****}
  2188. FL_XYPLOT_BOXTYPE = FL_FLAT_BOX;
  2189. FL_XYPLOT_COL1 = FL_COL1;
  2190. FL_XYPLOT_LCOL = FL_LCOL;
  2191. FL_XYPLOT_ALIGN = FL_ALIGN_BOTTOM;
  2192. FL_MAX_XYPLOTOVERLAY = 32;
  2193. {**** Others ****}
  2194. Function fl_create_xyplot(p1 : LongInt; p2,p3,p4,p5 : TFL_Coord; p6: PAnsiChar) : PFL_OBJECT; cdecl;external;
  2195. Function fl_add_xyplot(p1 : LongInt; p2,p3,p4,p5 : TFL_Coord; P6 : PAnsiChar ) : PFL_OBJECT; cdecl;external;
  2196. Procedure fl_set_xyplot_data(p1 : PFL_OBJECT; p2,p3 : pfloat; p4 : Longint ; p5,p6,p7 : PAnsiChar); cdecl;external;
  2197. Procedure fl_set_xyplot_file(p1 : PFL_OBJECT; p2,p3,p4,p5 :PAnsiChar); cdecl;external;
  2198. Procedure fl_set_xyplot_return(p1 : PFL_OBJECT; p2 : Longint ); cdecl;external;
  2199. Procedure fl_set_xyplot_xtics(p1 : PFL_OBJECT; p2 : Longint ; p3 :Longint ); cdecl;external;
  2200. Procedure fl_set_xyplot_ytics(p1 : PFL_OBJECT; p2 : Longint ; p3 :Longint ); cdecl;external;
  2201. Procedure fl_set_xyplot_xbounds(p1 : PFL_OBJECT; p2 : double; p3 :double); cdecl;external;
  2202. Procedure fl_set_xyplot_ybounds(p1 : PFL_OBJECT; p2 : double; p3 :double); cdecl;external;
  2203. Function fl_set_xyplot_maxoverlays(p1 : PFL_OBJECT; p2 : Longint ) : Longint ; cdecl;external;
  2204. Procedure fl_set_xyplot_overlay_type(p1 : PFL_OBJECT; p2 : Longint ; p3 : Longint ); cdecl;external;
  2205. Procedure fl_set_xyplot_interpolate(p1 : PFL_OBJECT; p2 : Longint ; p3 : Longint ; p4 : double); cdecl;external;
  2206. Procedure fl_set_xyplot_fontsize(p1 : PFL_OBJECT; p2 : Longint ); cdecl;external;
  2207. Procedure fl_set_xyplot_fontstyle(p1 : PFL_OBJECT; p2 : Longint ); cdecl;external;
  2208. Procedure fl_set_xyplot_inspect(p1 : PFL_OBJECT; p2 : Longint ); cdecl;external;
  2209. Procedure fl_set_xyplot_symbolsize(p1 : PFL_OBJECT; p2 : Longint ); cdecl;external;
  2210. Procedure fl_set_xyplot_xscale(p1 : PFL_OBJECT; p2 : Longint ; p3 :double); cdecl;external;
  2211. Procedure fl_set_xyplot_yscale(p1 : PFL_OBJECT; p2 : Longint ; p3 :double); cdecl;external;
  2212. Procedure fl_set_xyplot_linewidth(p1 : PFL_OBJECT; p2,p3 : Longint); cdecl;external;
  2213. Procedure fl_set_xyplot_xgrid(p1 : PFL_OBJECT; p2 : Longint); cdecl;external;
  2214. Procedure fl_set_xyplot_ygrid(p1 : PFL_OBJECT; p2 : Longint); cdecl;external;
  2215. Procedure fl_set_xyplot_alphaxtics(p1 : PFL_OBJECT; p2,p3 : PAnsiChar); cdecl;external;
  2216. Procedure fl_set_xyplot_alphaytics(p1 : PFL_OBJECT; p2,p3 : PAnsiChar); cdecl;external;
  2217. Procedure fl_set_xyplot_fixed_xaxis(p1 : PFL_OBJECT; p2,p3 : PAnsiChar); cdecl;external;
  2218. Procedure fl_set_xyplot_fixed_yaxis(p1 : PFL_OBJECT; p2,p3 : PAnsiChar); cdecl;external;
  2219. Procedure fl_get_xyplot_xbounds(p1 : PFL_OBJECT; p2,p3 : pfloat ); cdecl;external;
  2220. Procedure fl_get_xyplot_ybounds(p1 : PFL_OBJECT; p2,p3 : pfloat ); cdecl;external;
  2221. Procedure fl_get_xyplot(p1 : PFL_OBJECT; p2,p3 : pfloat; p4 : pointer); cdecl;external;
  2222. Procedure fl_get_xyplot_data(p1 : PFL_OBJECT; p2,p3 : pfloat; p4 : pointer); cdecl;external;
  2223. Procedure fl_get_xyplot_xmapping(p1 : PFL_OBJECT; p2,p3 : pfloat); cdecl;external;
  2224. Procedure fl_get_xyplot_ymapping(p1 : PFL_OBJECT; p2,p3 : pfloat); cdecl;external;
  2225. {
  2226. #define fl_set_xyplot_datafile fl_set_xyplot_file
  2227. }
  2228. Procedure fl_add_xyplot_text(p1 : PFL_OBJECT; p2,p3 : double; p4 : PAnsiChar;p5 : Longint ; p6 :TFL_COLOR); cdecl;external;
  2229. Procedure fl_add_xyplot_overlay(p1 : PFL_OBJECT; p2 : Longint ; p3,p4 : pfloat; p5 : Longint ; p6 :TFL_COLOR); cdecl;external;
  2230. Procedure fl_delete_xyplot_text(p1 : PFL_OBJECT; p2 : PAnsiChar); cdecl;external;
  2231. Procedure fl_delete_xyplot_overlay(p1 : PFL_OBJECT; p2 : Longint ); cdecl;external;
  2232. Procedure fl_replace_xyplot_point(p1 : PFL_OBJECT; p2 : Longint ; p3 : double; p4 : double); cdecl;external;
  2233. Function fl_interpolate(p1,p2 : pfloat; p3 :Longint ;p4,p5 : pfloat; p6 : double; p7 : Longint ) : Longint; cdecl;external;
  2234. Procedure fl_xyplot_s2w(p1 : PFL_OBJECT; p2 : double; p3 : double; p4,p5 : pfloat); cdecl;external;
  2235. Procedure fl_xyplot_w2s(p1 : PFL_OBJECT; p2 : double; p3 : double; p4,p5 : pfloat); cdecl;external;
  2236. implementation
  2237. { From here we implement function aliases which were #defined }
  2238. procedure fl_set_button_shortcut(p1 : PFL_OBJECT; p2 : PAnsiChar;p3 : Longint );
  2239. begin
  2240. fl_set_object_shortcut (p1,p2,p3);
  2241. end;
  2242. procedure fl_set_pixmapbutton_data(p1 : PFL_OBJECT; p2 : PPAnsiChar);
  2243. begin
  2244. fl_set_pixmap_data(p1,p2);
  2245. end;
  2246. procedure fl_set_pixmapbutton_file(p1 : PFL_OBJECT; p2 : PAnsiChar);
  2247. begin
  2248. fl_set_pixmap_file(p1,p2);
  2249. end;
  2250. procedure fl_set_pixmapbutton_align(p1 : PFL_OBJECT; p2 : Longint ; p3 : Longint ; p4 : Longint );
  2251. begin
  2252. fl_set_pixmap_align(p1,p2,p3,p4);
  2253. end;
  2254. procedure fl_set_pixmapbutton_pixmap(p1 : PFL_OBJECT; p2 : TPixmap; p3 :TPixmap);
  2255. begin
  2256. fl_set_pixmap_pixmap(p1,p2,p3);
  2257. end;
  2258. procedure fl_set_pixmapbutton_colorcloseness(p1 : Longint ; p2 : Longint ; p3 :Longint );
  2259. begin
  2260. fl_set_pixmap_colorcloseness(p1,p2,p3);
  2261. end;
  2262. procedure fl_free_pixmapbutton_pixmap(p1 : PFL_OBJECT);
  2263. begin
  2264. fl_free_pixmap_pixmap(p1);
  2265. end;
  2266. function fl_get_pixmapbutton_pixmap(p1 : PFL_OBJECT; p2 : PPixmap; p3 : PPixmap) : TPixmap ;
  2267. begin
  2268. fl_get_pixmapbutton_pixmap:=fl_get_pixmap_pixmap(p1,p2,p3);
  2269. end;
  2270. Function FL_ObjWin ( P : PFL_Object) : TWindow;
  2271. begin
  2272. if P^.objclass <> FL_CANVAS then
  2273. FL_ObjWin :=P^.form^.window
  2274. else
  2275. FL_objWin := fl_get_canvas_id (p)
  2276. end;
  2277. procedure fl_rectf(x,y,w,h : TFL_COORD;c : TFL_COLOR);
  2278. begin
  2279. fl_rectangle(1,x,y,w,h,c)
  2280. end;
  2281. procedure fl_rect(x,y,w,h : TFL_COORD;c : TFL_COLOR);
  2282. begin
  2283. fl_rectangle(0,x,y,w,h,c)
  2284. end;
  2285. procedure fl_set_canvas_decoration(p1 : PFL_OBJECT; p2 : Longint );
  2286. begin
  2287. fl_set_object_boxtype (p1,p2);
  2288. end;
  2289. function fl_setpup_default_fontsize(p1 : LongInt) : Longint;
  2290. begin
  2291. fl_setpup_default_fontsize:=fl_setpup_fontsize(p1)
  2292. end;
  2293. function fl_setpup_default_fontstyle(p1 : LongInt) : Longint;
  2294. begin
  2295. fl_setpup_default_fontstyle:=fl_setpup_fontstyle(p1);
  2296. end;
  2297. procedure fl_setpup_default_color(p1 : TFL_COLOR; p2 : TFL_COLOR);
  2298. begin
  2299. fl_setpup_color(p1,p2);
  2300. end;
  2301. procedure fl_setpup_default_checkcolor(p1 : TFL_COLOR);
  2302. begin
  2303. fl_setpup_default_checkcolor(p1);
  2304. end;
  2305. end.