Subversion Repositories Kolibri OS

Rev

Rev 1458 | Rev 1489 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed

  1. ;*****************************************************************************
  2. ; Box_Lib - library of graphical components
  3. ;
  4. ; Authors:
  5. ; Alexey Teplov aka <Lrz>
  6. ; Marat Zakiyanov aka Mario79, aka Mario
  7. ; Evtikhov Maxim aka Maxxxx32
  8. ; Eugene Grechnikov aka Diamond
  9. ; hidnplayr
  10. ; Igor Afanasiev aka IgorA
  11. ;*****************************************************************************
  12.  
  13. format MS COFF
  14.  
  15. public EXPORTS
  16.  
  17. section '.flat' code readable align 16
  18. include '../../../../macros.inc'
  19. include '../../../../proc32.inc'
  20. include 'bl_sys.mac'
  21. include 'box_lib.mac' ;macro which should make life easier :)
  22.  
  23. ;-----------------------------------------------------------------------------
  24. ;ôóíêöèÿ äëÿ âûäåëåíèÿ ïàìÿòè
  25. ;input:
  26. ; ecx = size data
  27. ;otput:
  28. ; eax = pointer to memory
  29. align 4
  30. mem_Alloc:
  31.   push ebx
  32.   mov eax,68
  33.   mov ebx,12
  34.   int 0x40
  35.   pop ebx
  36.   ret
  37. ;ôóíêöèÿ äëÿ îñâîáîæäåíèÿ ïàìÿòè
  38. ;input:
  39. ; ecx = pointer to memory
  40. align 4
  41. proc mem_Free, mptr:dword
  42.         push eax ebx ecx
  43.         mov ecx,[mptr]
  44.         cmp ecx,0
  45.         jz @f
  46.                 mov eax,68
  47.                 mov ebx,13
  48.                 int 0x40
  49.         @@:
  50.         pop ecx ebx eax
  51.         ret
  52. endp
  53. ;ôóíêöèÿ äëÿ ïåðåðàñïðåäåëåíèÿ ïàìÿòè
  54. ;otput:
  55. ; eax = pointer to memory
  56. align 4
  57. proc mem_ReAlloc, mptr:dword, size:dword
  58.         push ebx ecx edx
  59.         mov     edx, [mptr]
  60.         mov     ecx, [size]
  61.         mcall 68, 20
  62.         pop     edx ecx ebx
  63.         ret
  64. endp
  65.  
  66. ;----------------------------------------------------
  67. ;EditBox
  68. ;----------------------------------------------------
  69. align 16
  70. use_editbox_draw        ;macro reveals the function of the display.
  71. align 16
  72. use_editbox_key         ;macro reveals processing function of the keypad.
  73. align 16
  74. use_editbox_mouse       ;macro reveals processing function of the mouse.
  75.  
  76. ;----------------------------------------------------
  77. ;CheckBox
  78. ;----------------------------------------------------
  79. align 16
  80. use_checkbox_draw       ;macro reveals the function of the display.
  81. align 16
  82. use_checkbox_mouse      ;macro reveals processing function of the mouse.
  83.  
  84.  
  85. ;--------------------------------------------------
  86. ;radiobutton Group
  87. ;--------------------------------------------------
  88. align 16
  89. use_optionbox_driver    ;macro that control the operating modes
  90. align 16
  91. use_optionbox_draw      ;macro reveals the function of the display.
  92. align 16
  93. use_optionbox_mouse     ;macro reveals processing function of the mouse.
  94.  
  95. ;--------------------------------------------------
  96. ;scrollbar Group
  97. ;--------------------------------------------------
  98. align 16
  99. use_scroll_bar
  100. align 16
  101. use_scroll_bar_vertical
  102. align 16
  103. use_scroll_bar_horizontal
  104.  
  105. ;--------------------------------------------------
  106. ;dinamic button Group
  107. ;--------------------------------------------------
  108. align 16
  109. use_dinamic_button
  110.  
  111. ;--------------------------------------------------
  112. ;menubar Group
  113. ;--------------------------------------------------
  114. align 16
  115. use_menu_bar
  116.  
  117. ;--------------------------------------------------
  118. ;filebrowser Group
  119. ;--------------------------------------------------
  120. align 16
  121. use_file_browser
  122.  
  123. ;--------------------------------------------------
  124. ;tree list
  125. ;--------------------------------------------------
  126. align 16
  127. use_tree_list
  128.  
  129. ;--------------------------------------------------
  130. ;PathShow Group
  131. ;--------------------------------------------------
  132. align 16
  133. use_path_show
  134.  
  135. ;--------------------------------------------------
  136. ;text editor
  137. ;--------------------------------------------------
  138. align 16
  139. use_text_edit
  140.  
  141. align 16
  142. init:
  143. ret
  144.  
  145.  
  146. align 16
  147. EXPORTS:
  148.  
  149.  
  150. dd      sz_init,                        init
  151. dd      sz_version,                     0x00000001
  152.  
  153. dd      sz_edit_box,                    edit_box
  154. dd      sz_edit_box_key,                edit_box_key
  155. dd      sz_edit_box_mouse,              edit_box_mouse
  156. dd      szVersion_ed,                   0x00000001
  157.  
  158. dd      sz_check_box_draw,              check_box_draw
  159. dd      sz_check_box_mouse,             check_box_mouse
  160. dd      szVersion_ch,                   0x00000001
  161.  
  162. dd      sz_option_box_draw,             option_box_draw
  163. dd      sz_option_box_mouse,            option_box_mouse
  164. dd      szVersion_op,                   0x00000001
  165.  
  166. dd      sz_Scrollbar_ver_draw,          scroll_bar_vertical.draw
  167. dd      sz_Scrollbar_ver_mouse,         scroll_bar_vertical.mouse
  168. dd      sz_Scrollbar_hor_draw,          scroll_bar_horizontal.draw
  169. dd      sz_Scrollbar_hor_mouse,         scroll_bar_horizontal.mouse
  170. dd      szVersion_scrollbar,            0x00010001
  171.  
  172. dd      sz_Dbutton_draw,                dinamic_button.draw
  173. dd      sz_Dbutton_mouse,               dinamic_button.mouse
  174. dd      szVersion_dbutton,              0x00010001
  175.  
  176. dd      sz_Menu_bar_draw,               menu_bar.draw
  177. dd      sz_Menu_bar_mouse,              menu_bar.mouse
  178. dd      sz_Menu_bar_activate,           menu_bar.activate
  179. dd      szVersion_menu_bar,             0x00010002
  180.  
  181. dd      sz_FileBrowser_draw,            fb_draw_panel
  182. dd      sz_FileBrowser_mouse,           fb_mouse
  183. dd      sz_FileBrowser_key,             fb_key
  184. dd      szVersion_FileBrowser,          0x00010001
  185.  
  186. dd      sz_tl_data_init,                tl_data_init
  187. dd      sz_tl_data_clear,               tl_data_clear
  188. dd      sz_tl_info_clear,               tl_info_clear
  189. dd      sz_tl_key,                      tl_key
  190. dd      sz_tl_mouse,                    tl_mouse
  191. dd      sz_tl_draw,                     tl_draw
  192. dd      sz_tl_info_undo,                tl_info_undo
  193. dd      sz_tl_info_redo,                tl_info_redo
  194. dd      sz_tl_node_add,                 tl_node_add
  195. dd      sz_tl_node_set_data,            tl_node_set_data
  196. dd      sz_tl_node_get_data,            tl_node_get_data
  197. dd      sz_tl_node_delete,              tl_node_delete
  198. dd      sz_tl_cur_beg,                  tl_cur_beg
  199. dd      sz_tl_cur_next,                 tl_cur_next
  200. dd      sz_tl_cur_perv,                 tl_cur_perv
  201. dd      sz_tl_node_close_open,          tl_node_close_open
  202. dd      sz_tl_node_lev_inc,             tl_node_lev_inc
  203. dd      sz_tl_node_lev_dec,             tl_node_lev_dec
  204. dd      sz_tl_node_move_up,             tl_node_move_up
  205. dd      sz_tl_node_move_down,           tl_node_move_down
  206. dd      sz_tl_node_poi_get_info,        tl_node_poi_get_info
  207. dd      sz_tl_node_poi_get_next_info,   tl_node_poi_get_next_info
  208. dd      sz_tl_node_poi_get_data,        tl_node_poi_get_data
  209. dd      sz_tl_save_mem,                 tl_save_mem
  210. dd      sz_tl_load_mem,                 tl_load_mem
  211. dd      sz_tl_get_mem_size,             tl_get_mem_size
  212. dd      sz_tl_version_tree_list,        0x00000001
  213.  
  214. dd      sz_PathShow_prepare,            path_show.prepare
  215. dd      sz_PathShow_draw,               path_show.draw
  216. dd      szVersion_path_show,            0x00010001
  217.  
  218. dd      sz_ted_but_save_file,           ted_but_save_file
  219. dd      sz_ted_but_sumb_upper,          ted_but_sumb_upper
  220. dd      sz_ted_but_sumb_lover,          ted_but_sumb_lover
  221. dd      sz_ted_can_save,                ted_can_save
  222. dd      sz_ted_clear,                   ted_clear
  223. dd      sz_ted_delete,                  ted_delete
  224. dd      sz_ted_draw,                    ted_draw
  225. dd      sz_ted_init,                    ted_init
  226. dd      sz_ted_init_scroll_bars,        ted_init_scroll_bars
  227. dd      sz_ted_init_syntax_file,        ted_init_syntax_file
  228. dd      sz_ted_is_select,               ted_is_select
  229. dd      sz_ted_key,                     ted_key
  230. dd      sz_ted_mouse,                   ted_mouse
  231. dd      sz_ted_open_file,               ted_open_file
  232. dd      sz_ted_text_add,                ted_text_add
  233. dd      sz_ted_but_select_word,         ted_but_select_word
  234. dd      sz_ted_but_cut,                 ted_but_cut
  235. dd      sz_ted_but_copy,                ted_but_copy
  236. dd      sz_ted_but_paste,               ted_but_paste
  237. dd      sz_ted_but_undo,                ted_but_undo
  238. dd      sz_ted_but_redo,                ted_but_redo
  239. dd      sz_ted_but_reverse,             ted_but_reverse
  240. dd      sz_ted_but_find_next,           ted_but_find_next
  241. dd      sz_ted_text_colored,            ted_text_colored
  242. dd      sz_ted_version,                 0x00000002
  243.  
  244. dd      0,0
  245.  
  246.  
  247. sz_init                         db 'lib_init',0
  248. sz_version                      db 'version',0
  249.  
  250. sz_edit_box                     db 'edit_box',0
  251. sz_edit_box_key                 db 'edit_box_key',0
  252. sz_edit_box_mouse               db 'edit_box_mouse',0
  253. szVersion_ed                    db 'version_ed',0
  254.  
  255. sz_check_box_draw               db 'check_box_draw',0
  256. sz_check_box_mouse              db 'check_box_mouse',0
  257. szVersion_ch                    db 'version_ch',0
  258.  
  259. sz_option_box_draw              db 'option_box_draw',0
  260. sz_option_box_mouse             db 'option_box_mouse',0
  261. szVersion_op                    db 'version_op',0
  262.  
  263. sz_Scrollbar_ver_draw           db 'scrollbar_v_draw',0
  264. sz_Scrollbar_ver_mouse          db 'scrollbar_v_mouse',0
  265. sz_Scrollbar_hor_draw           db 'scrollbar_h_draw',0
  266. sz_Scrollbar_hor_mouse          db 'scrollbar_h_mouse',0
  267. szVersion_scrollbar             db 'version_scrollbar',0
  268.  
  269. sz_Dbutton_draw                 db 'dbutton_draw',0
  270. sz_Dbutton_mouse                db 'dbutton_mouse',0
  271. szVersion_dbutton               db 'version_dbutton',0
  272.  
  273. sz_Menu_bar_draw                db 'menu_bar_draw',0
  274. sz_Menu_bar_mouse               db 'menu_bar_mouse',0
  275. sz_Menu_bar_activate            db 'menu_bar_activate',0
  276. szVersion_menu_bar              db 'version_menu_bar',0
  277.  
  278. sz_FileBrowser_draw             db 'FileBrowser_draw',0
  279. sz_FileBrowser_mouse            db 'FileBrowser_mouse',0
  280. sz_FileBrowser_key              db 'FileBrowser_key',0
  281. szVersion_FileBrowser           db 'version_FileBrowser',0
  282.  
  283. sz_tl_data_init                 db 'tl_data_init',0
  284. sz_tl_data_clear                db 'tl_data_clear',0
  285. sz_tl_info_clear                db 'tl_info_clear',0
  286. sz_tl_key                       db 'tl_key',0
  287. sz_tl_mouse                     db 'tl_mouse',0
  288. sz_tl_draw                      db 'tl_draw',0
  289. sz_tl_info_undo                 db 'tl_info_undo',0
  290. sz_tl_info_redo                 db 'tl_info_redo',0
  291. sz_tl_node_add                  db 'tl_node_add',0
  292. sz_tl_node_set_data             db 'tl_node_set_data',0
  293. sz_tl_node_get_data             db 'tl_node_get_data',0
  294. sz_tl_node_delete               db 'tl_node_delete',0
  295. sz_tl_cur_beg                   db 'tl_cur_beg',0
  296. sz_tl_cur_next                  db 'tl_cur_next',0
  297. sz_tl_cur_perv                  db 'tl_cur_perv',0
  298. sz_tl_node_close_open           db 'tl_node_close_open',0
  299. sz_tl_node_lev_inc              db 'tl_node_lev_inc',0
  300. sz_tl_node_lev_dec              db 'tl_node_lev_dec',0
  301. sz_tl_node_move_up              db 'tl_node_move_up',0
  302. sz_tl_node_move_down            db 'tl_node_move_down',0
  303. sz_tl_node_poi_get_info         db 'tl_node_poi_get_info',0
  304. sz_tl_node_poi_get_next_info    db 'tl_node_poi_get_next_info',0
  305. sz_tl_node_poi_get_data         db 'tl_node_poi_get_data',0
  306. sz_tl_save_mem                  db 'tl_save_mem',0
  307. sz_tl_load_mem                  db 'tl_load_mem',0
  308. sz_tl_get_mem_size              db 'tl_get_mem_size',0
  309. sz_tl_version_tree_list         db 'version_tree_list',0
  310.  
  311. sz_PathShow_prepare             db 'PathShow_prepare',0
  312. sz_PathShow_draw                db 'PathShow_draw',0
  313. szVersion_path_show             db 'version_PathShow',0
  314.  
  315. sz_ted_but_save_file            db 'ted_but_save_file',0
  316. sz_ted_but_sumb_upper           db 'ted_but_sumb_upper',0
  317. sz_ted_but_sumb_lover           db 'ted_but_sumb_lover',0
  318. sz_ted_can_save                 db 'ted_can_save',0
  319. sz_ted_clear                    db 'ted_clear',0
  320. sz_ted_delete                   db 'ted_delete',0
  321. sz_ted_draw                     db 'ted_draw',0
  322. sz_ted_init                     db 'ted_init',0
  323. sz_ted_init_scroll_bars         db 'ted_init_scroll_bars',0
  324. sz_ted_init_syntax_file         db 'ted_init_syntax_file',0
  325. sz_ted_is_select                db 'ted_is_select',0
  326. sz_ted_key                      db 'ted_key',0
  327. sz_ted_mouse                    db 'ted_mouse',0
  328. sz_ted_open_file                db 'ted_open_file',0
  329. sz_ted_text_add                 db 'ted_text_add',0
  330. sz_ted_but_select_word          db 'ted_but_select_word',0
  331. sz_ted_but_cut                  db 'ted_but_cut',0
  332. sz_ted_but_copy                 db 'ted_but_copy',0
  333. sz_ted_but_paste                db 'ted_but_paste',0
  334. sz_ted_but_undo                 db 'ted_but_undo',0
  335. sz_ted_but_redo                 db 'ted_but_redo',0
  336. sz_ted_but_reverse              db 'ted_but_reverse',0
  337. sz_ted_but_find_next            db 'ted_but_find_next',0
  338. sz_ted_text_colored             db 'ted_text_colored',0
  339. sz_ted_version                  db 'version_text_edit',0