programs/system: Post-SVN tidy (part 3) (#413)
- Move source code from `trunk` into root directory for each program. - Update build files and ASM include paths. Add SPDX license header where appropriate. - Note: Line endings standardised from `CRLF` > `LF`, so best to view diffs with whitespace changes hidden. (Work towards #75, point 3) Reviewed-on: KolibriOS/kolibrios#413 Reviewed-by: Ivan B <dunkaist@noreply.localhost> Reviewed-by: Mikhail Frolov <mixa.frolov2003@gmail.com> Co-authored-by: Andrew <dent.ace@gmail.com> Co-committed-by: Andrew <dent.ace@gmail.com>
This commit is contained in:
1 parent
398dcbb13d
commit
7bcb400040
68 files changed
+5543
-5485
No files matched your search
@@ -1,7 +1,10 @@
|
||||
@@unpack$qqspvt1 equ unpack
|
||||
|
||||
include "..\..\system\skincfg\trunk\kglobals.inc"
|
||||
include "..\..\system\skincfg\trunk\unpacker.inc"
|
||||
|
||||
IncludeIGlobals
|
||||
IncludeUGlobals
|
||||
; SPDX-License-Identifier: NOASSERTION
|
||||
;
|
||||
|
||||
@@unpack$qqspvt1 equ unpack
|
||||
|
||||
include "..\..\system\skincfg\kglobals.inc"
|
||||
include "..\..\system\skincfg\unpacker.inc"
|
||||
|
||||
IncludeIGlobals
|
||||
IncludeUGlobals
|
||||
+18
-18
@@ -58,30 +58,30 @@ echo Building system
|
||||
echo *
|
||||
fasm system\calendar\calendar.asm %BIN%\calendar
|
||||
fasm system\board\board.asm %BIN%\develop\board
|
||||
fasm system\commouse\trunk\commouse.asm %BIN%\commouse
|
||||
rem fasm system\commouse\trunk\commouse.asm %BIN%\commouse
|
||||
fasm system\cpu\cpu.asm %BIN%\cpu
|
||||
fasm system\cpuid\trunk\cpuid.asm %BIN%\cpuid
|
||||
fasm system\skincfg\trunk\skincfg.asm %BIN%\skincfg
|
||||
rem fasm system\cpuid\trunk\cpuid.asm %BIN%\cpuid
|
||||
fasm system\skincfg\skincfg.asm %BIN%\skincfg
|
||||
fasm system\docpack\docpack.asm %BIN%\docpack
|
||||
fasm system\end\trunk\end.asm %BIN%\end
|
||||
fasm system\end\end.asm %BIN%\end
|
||||
fasm system\gmon\gmon.asm %BIN%\gmon
|
||||
fasm system\icon\icon.asm %BIN%\icon
|
||||
fasm system\kbd\trunk\kbd.ASM %BIN%\kbd
|
||||
rem fasm system\kbd\trunk\kbd.ASM %BIN%\kbd
|
||||
fasm system\launcher\launcher.asm %BIN%\launcher
|
||||
fasm system\menu\menu.asm %BIN%\@menu
|
||||
fasm system\mgb\trunk\mgb.asm %BIN%\mgb
|
||||
rem fasm system\mgb\trunk\mgb.asm %BIN%\mgb
|
||||
fasm system\mousemul\mousemul.asm %BIN%\mousemul
|
||||
fasm system\PANEL\trunk\@TASKBAR.ASM %BIN%\@TASKBAR
|
||||
fasm system\pcidev\trunk\pcidev.asm %BIN%\pcidev
|
||||
fasm system\RB\trunk\@RB.ASM %BIN%\@RB
|
||||
fasm system\taskbar\TASKBAR.ASM %BIN%\@TASKBAR
|
||||
rem fasm system\pcidev\trunk\pcidev.asm %BIN%\pcidev
|
||||
rem fasm system\RB\trunk\@RB.ASM %BIN%\@RB
|
||||
fasm system\rdsave\rdsave.asm %BIN%\rdsave
|
||||
fasm system\run\trunk\run.asm %BIN%\run
|
||||
fasm system\setup\trunk\setup.asm %BIN%\setup
|
||||
fasm system\skinsel\skinsel.asm %BIN%\skinsel
|
||||
fasm system\ss\trunk\@ss.asm %BIN%\@ss
|
||||
fasm system\vrr\trunk\vrr.asm %BIN%\vrr
|
||||
fasm system\vrr_m\trunk\vrr_m.asm %BIN%\vrr_m
|
||||
fasm system\zkey\trunk\zkey.asm %BIN%\zkey
|
||||
fasm system\run\run.asm %BIN%\run
|
||||
fasm system\setup\setup.asm %BIN%\setup
|
||||
rem fasm system\skinsel\skinsel.asm %BIN%\skinsel
|
||||
rem fasm system\ss\trunk\@ss.asm %BIN%\@ss
|
||||
rem fasm system\vrr\trunk\vrr.asm %BIN%\vrr
|
||||
rem fasm system\vrr_m\trunk\vrr_m.asm %BIN%\vrr_m
|
||||
fasm system\zkey\zkey.asm %BIN%\zkey
|
||||
|
||||
echo *
|
||||
echo Building develop
|
||||
@@ -237,9 +237,9 @@ fasm media\animage\animage.asm %BIN%\nightbuild\animage
|
||||
fasm media\midamp\trunk\midamp.asm %BIN%\nightbuild\midamp
|
||||
fasm develop\heed\trunk\heed.asm %BIN%\nightbuild\heed
|
||||
fasm develop\tinypad\trunk\tinypad.asm %BIN%\nightbuild\tinypad
|
||||
fasm system\skincfg\trunk\skincfg.asm %BIN%\nightbuild\skincfg
|
||||
fasm system\skincfg\skincfg.asm %BIN%\nightbuild\skincfg
|
||||
fasm system\hdd_info\hdd_info.asm %BIN%\nightbuild\hdd_info
|
||||
fasm system\mgb\trunk\mgb.asm %BIN%\nightbuild\mgb
|
||||
rem fasm system\mgb\trunk\mgb.asm %BIN%\nightbuild\mgb
|
||||
fasm system\rdsave\rdsave.asm %BIN%\nightbuild\rdsave
|
||||
fasm other\kpack\trunk\kpack.asm %BIN%\nightbuild\kpack
|
||||
fasm other\rtfread\rtfread.asm %BIN%\nightbuild\rtfread
|
||||
|
||||
+1630
-1625
File diff suppressed because it is too large.
Load diff
@@ -1,410 +1,416 @@
|
||||
;*****************************************************************************
|
||||
; Box_Lib - library of graphical components
|
||||
; Copyright (C) KolibriOS team 2008-2020. All rights reserved.
|
||||
;
|
||||
; Authors:
|
||||
; Alexey Teplov aka <Lrz>
|
||||
; Marat Zakiyanov aka Mario79, aka Mario
|
||||
; Evtikhov Maxim aka Maxxxx32
|
||||
; Eugene Grechnikov aka Diamond
|
||||
; hidnplayr
|
||||
; Igor Afanasiev aka IgorA
|
||||
;*****************************************************************************
|
||||
|
||||
format MS COFF
|
||||
|
||||
public EXPORTS
|
||||
|
||||
section '.flat' code readable align 16
|
||||
include '../../../../macros.inc'
|
||||
include '../../../../proc32.inc'
|
||||
include '../../../../KOSfuncs.inc'
|
||||
include 'box_lib.mac' ;macro which should make life easier :)
|
||||
;include '../../../../debug.inc'
|
||||
include 'keys.inc'
|
||||
include '../../../../system/skincfg/trunk/kglobals.inc'
|
||||
include '../../../../system/skincfg/trunk/unpacker.inc'
|
||||
|
||||
;-----------------------------------------------------------------------------
|
||||
mem.alloc dd ? ;ЇєэъЎш фы т√фхыхэш ярь Єш
|
||||
mem.free dd ? ;ЇєэъЎш фы юётюсюцфхэш ярь Єш
|
||||
mem.realloc dd ? ;ЇєэъЎш фы яхЁхЁрёяЁхфхыхэш ярь Єш
|
||||
dll.load dd ?
|
||||
|
||||
;----------------------------------------------------
|
||||
include 'editbox.asm' ;editbox
|
||||
include 'checkbox.asm' ;checkbox
|
||||
include 'optionbox.asm' ;optionbox
|
||||
include 'scrollbar.asm' ;scrollbar
|
||||
include 'd_button.asm' ;dinamic_button
|
||||
include 'menubar.asm' ;menubar
|
||||
include 'filebrowser.asm' ;filebrowser
|
||||
include 'tree_list.asm' ;tree_list, list_box
|
||||
include 'pathshow.asm' ;pathshow
|
||||
include 't_edit.asm' ;text_editor
|
||||
include 'frame.asm' ;frame
|
||||
include 'progressbar.asm' ;progressbar
|
||||
include 'tooltip.asm' ;tooltip
|
||||
;--------------------------------------------------
|
||||
|
||||
;input:
|
||||
; eax = єърчрЄхы№ эр ЇєэъЎш■ т√фхыхэш ярь Єш
|
||||
; ebx = ... юётюсюцфхэш ярь Єш
|
||||
; ecx = ... яхЁхЁрёяЁхфхыхэш ярь Єш
|
||||
; edx = ... чруЁєчъш сшсышюЄхъш (яюър эх шёяюы№чєхЄё )
|
||||
align 16
|
||||
lib_init:
|
||||
mov [mem.alloc], eax
|
||||
mov [mem.free], ebx
|
||||
mov [mem.realloc], ecx
|
||||
mov [dll.load], edx
|
||||
ret
|
||||
|
||||
|
||||
align 4
|
||||
proc draw_edge uses eax ebx ecx edx edi esi, box_l:dword, box_t:dword, box_w:dword, box_h:dword,\
|
||||
col_0:dword, col_1:dword, col_2:dword
|
||||
|
||||
mov esi,[col_1]
|
||||
and esi,111111101111111011111110b
|
||||
|
||||
mov eax,SF_DRAW_RECT
|
||||
;bottom line
|
||||
mov edx,[col_2]
|
||||
mov ebx,[box_l]
|
||||
shl ebx,16
|
||||
add ebx,[box_w]
|
||||
inc ebx ;фы чрыштъш фшруюэры№э√ї яшъёхыхщ
|
||||
mov ecx,[box_t]
|
||||
add ecx,[box_h]
|
||||
shl ecx,16
|
||||
inc ecx
|
||||
|
||||
mov edi,3 ;for cycle
|
||||
@@:
|
||||
;calculate colors
|
||||
and edx,111111101111111011111110b
|
||||
add edx,esi
|
||||
shr edx,1
|
||||
;line move up and ->...<-
|
||||
sub ecx,1 shl 16 ;move up
|
||||
add ebx,1 shl 16 ;->...
|
||||
sub ebx,2 ;...<-
|
||||
;draw line
|
||||
int 0x40
|
||||
dec edi
|
||||
jnz @b
|
||||
|
||||
;right line
|
||||
mov edx,[col_2]
|
||||
mov ebx,[box_l]
|
||||
add ebx,[box_w]
|
||||
shl ebx,16
|
||||
inc ebx
|
||||
mov ecx,[box_t]
|
||||
shl ecx,16
|
||||
add ecx,[box_h]
|
||||
|
||||
mov edi,3 ;for cycle
|
||||
@@:
|
||||
;calculate colors
|
||||
and edx,111111101111111011111110b
|
||||
add edx,esi
|
||||
shr edx,1
|
||||
;line move left and ...
|
||||
sub ebx,1 shl 16 ;move left
|
||||
add ecx,1 shl 16
|
||||
sub ecx,2
|
||||
;draw line
|
||||
int 0x40
|
||||
dec edi
|
||||
jnz @b
|
||||
|
||||
;top line
|
||||
mov edx,[col_0]
|
||||
mov ebx,[box_l]
|
||||
shl ebx,16
|
||||
add ebx,[box_w]
|
||||
mov ecx,[box_t]
|
||||
shl ecx,16
|
||||
inc ecx
|
||||
|
||||
mov edi,3 ;for cycle
|
||||
@@:
|
||||
;calculate colors
|
||||
and edx,111111101111111011111110b
|
||||
add edx,esi
|
||||
shr edx,1
|
||||
;line move down and ->...<-
|
||||
add ecx,1 shl 16 ;move down
|
||||
add ebx,1 shl 16 ;->...
|
||||
sub ebx,2 ;...<-
|
||||
;draw line
|
||||
int 0x40
|
||||
dec edi
|
||||
jnz @b
|
||||
|
||||
;left line
|
||||
mov edx,[col_0]
|
||||
mov ebx,[box_l]
|
||||
shl ebx,16
|
||||
inc ebx
|
||||
mov ecx,[box_t]
|
||||
shl ecx,16
|
||||
add ecx,[box_h]
|
||||
|
||||
mov edi,3 ;for cycle
|
||||
@@:
|
||||
;calculate colors
|
||||
and edx,111111101111111011111110b
|
||||
add edx,esi
|
||||
shr edx,1
|
||||
;line move left and ...
|
||||
add ebx,1 shl 16 ;move left
|
||||
add ecx,1 shl 16
|
||||
sub ecx,2
|
||||
;draw line
|
||||
int 0x40
|
||||
dec edi
|
||||
jnz @b
|
||||
|
||||
ret
|
||||
endp
|
||||
|
||||
|
||||
;фы ЁрсюЄ√ ё KPCK
|
||||
IncludeIGlobals
|
||||
IncludeUGlobals
|
||||
|
||||
align 16
|
||||
EXPORTS:
|
||||
|
||||
|
||||
dd sz_init, lib_init
|
||||
dd sz_version, 0x00000001
|
||||
|
||||
dd sz_edit_box, edit_box_draw ;old function name
|
||||
dd sz_edit_box_draw, edit_box_draw
|
||||
dd sz_edit_box_key, edit_box_key
|
||||
dd sz_edit_box_key_safe, edit_box_key_safe
|
||||
dd sz_edit_box_mouse, edit_box_mouse
|
||||
dd sz_edit_box_set_text, edit_box_set_text
|
||||
dd szVersion_ed, 0x00000001
|
||||
|
||||
dd sz_init_checkbox, init_checkbox
|
||||
dd sz_check_box_draw, check_box_draw
|
||||
dd sz_check_box_mouse, check_box_mouse
|
||||
dd szVersion_ch2, 0x00000002
|
||||
|
||||
dd sz_option_box_draw, option_box_draw
|
||||
dd sz_option_box_mouse, option_box_mouse
|
||||
dd szVersion_op, 0x00000001
|
||||
|
||||
dd sz_Scrollbar_ver_draw, scroll_bar_vertical.draw
|
||||
dd sz_Scrollbar_ver_mouse, scroll_bar_vertical.mouse
|
||||
dd sz_Scrollbar_hor_draw, scroll_bar_horizontal.draw
|
||||
dd sz_Scrollbar_hor_mouse, scroll_bar_horizontal.mouse
|
||||
dd szVersion_scrollbar, 0x00010001
|
||||
|
||||
dd sz_Dbutton_draw, dinamic_button.draw
|
||||
dd sz_Dbutton_mouse, dinamic_button.mouse
|
||||
dd szVersion_dbutton, 0x00010001
|
||||
|
||||
dd sz_Menu_bar_draw, menu_bar.draw
|
||||
dd sz_Menu_bar_mouse, menu_bar.mouse
|
||||
dd sz_Menu_bar_activate, menu_bar.activate
|
||||
dd szVersion_menu_bar, 0x00010002
|
||||
|
||||
dd sz_FileBrowser_draw, fb_draw_panel
|
||||
dd sz_FileBrowser_mouse, fb_mouse
|
||||
dd sz_FileBrowser_key, fb_key
|
||||
dd szVersion_FileBrowser, 0x00010001
|
||||
|
||||
dd sz_tl_data_init, tl_data_init
|
||||
dd sz_tl_data_clear, tl_data_clear
|
||||
dd sz_tl_info_clear, tl_info_clear
|
||||
dd sz_tl_key, tl_key
|
||||
dd sz_tl_mouse, tl_mouse
|
||||
dd sz_tl_draw, tl_draw
|
||||
dd sz_tl_info_undo, tl_info_undo
|
||||
dd sz_tl_info_redo, tl_info_redo
|
||||
dd sz_tl_node_add, tl_node_add
|
||||
dd sz_tl_node_set_data, tl_node_set_data
|
||||
dd sz_tl_node_get_data, tl_node_get_data
|
||||
dd sz_tl_node_delete, tl_node_delete
|
||||
dd sz_tl_cur_beg, tl_cur_beg
|
||||
dd sz_tl_cur_next, tl_cur_next
|
||||
dd sz_tl_cur_perv, tl_cur_perv
|
||||
dd sz_tl_node_close_open, tl_node_close_open
|
||||
dd sz_tl_node_lev_inc, tl_node_lev_inc
|
||||
dd sz_tl_node_lev_dec, tl_node_lev_dec
|
||||
dd sz_tl_node_move_up, tl_node_move_up
|
||||
dd sz_tl_node_move_down, tl_node_move_down
|
||||
dd sz_tl_node_poi_get_info, tl_node_poi_get_info
|
||||
dd sz_tl_node_poi_get_next_info, tl_node_poi_get_next_info
|
||||
dd sz_tl_node_poi_get_data, tl_node_poi_get_data
|
||||
dd sz_tl_save_mem, tl_save_mem
|
||||
dd sz_tl_load_mem, tl_load_mem
|
||||
dd sz_tl_get_mem_size, tl_get_mem_size
|
||||
dd sz_tl_version_tree_list, 0x00000001
|
||||
|
||||
dd sz_PathShow_prepare, path_show.prepare
|
||||
dd sz_PathShow_draw, path_show.draw
|
||||
dd szVersion_path_show, 0x00010001
|
||||
|
||||
dd sz_ted_but_sumb_upper, ted_but_sumb_upper
|
||||
dd sz_ted_but_sumb_lover, ted_but_sumb_lover
|
||||
dd sz_ted_but_convert_by_table, ted_but_convert_by_table
|
||||
dd sz_ted_can_save, ted_can_save
|
||||
dd sz_ted_clear, ted_clear
|
||||
dd sz_ted_delete, ted_delete
|
||||
dd sz_ted_draw, ted_draw
|
||||
dd sz_ted_init, ted_init
|
||||
dd sz_ted_init_scroll_bars, ted_init_scroll_bars
|
||||
dd sz_ted_init_syntax_file, ted_init_syntax_file
|
||||
dd sz_ted_is_select, ted_is_select
|
||||
dd sz_ted_key, ted_key
|
||||
dd sz_ted_mouse, ted_mouse
|
||||
dd sz_ted_open_file, ted_open_file
|
||||
dd sz_ted_save_file, ted_save_file
|
||||
dd sz_ted_text_add, ted_text_add
|
||||
dd sz_ted_but_select_word, ted_but_select_word
|
||||
dd sz_ted_but_cut, ted_but_cut
|
||||
dd sz_ted_but_copy, ted_but_copy
|
||||
dd sz_ted_but_paste, ted_but_paste
|
||||
dd sz_ted_but_undo, ted_but_undo
|
||||
dd sz_ted_but_redo, ted_but_redo
|
||||
dd sz_ted_but_reverse, ted_but_reverse
|
||||
dd sz_ted_but_find, ted_but_find
|
||||
dd sz_ted_but_replace, ted_but_replace
|
||||
dd sz_ted_text_colored, ted_text_colored
|
||||
dd sz_ted_go_to_position, ted_go_to_position
|
||||
dd sz_ted_version, 6
|
||||
|
||||
dd sz_Frame_draw, frame.draw
|
||||
dd szVersion_frame, 0x00010001
|
||||
|
||||
dd sz_progressbar_draw, progressbar_draw
|
||||
dd sz_progressbar_progress, progressbar_progress
|
||||
|
||||
dd sz_tooltip_init, tooltip_init
|
||||
dd sz_tooltip_delete, tooltip_delete
|
||||
dd sz_tooltip_test_show, tooltip_test_show
|
||||
dd sz_tooltip_mouse, tooltip_mouse
|
||||
dd sz_get_font_size, get_font_size
|
||||
|
||||
dd 0,0
|
||||
|
||||
|
||||
sz_init db 'lib_init',0
|
||||
sz_version db 'version',0
|
||||
|
||||
sz_edit_box db 'edit_box',0
|
||||
sz_edit_box_draw db 'edit_box_draw',0
|
||||
sz_edit_box_key db 'edit_box_key',0
|
||||
sz_edit_box_key_safe db 'edit_box_key_safe',0
|
||||
sz_edit_box_mouse db 'edit_box_mouse',0
|
||||
sz_edit_box_set_text db 'edit_box_set_text',0
|
||||
szVersion_ed db 'version_ed',0
|
||||
|
||||
sz_init_checkbox db 'init_checkbox2',0
|
||||
sz_check_box_draw db 'check_box_draw2',0
|
||||
sz_check_box_mouse db 'check_box_mouse2',0
|
||||
szVersion_ch2 db 'version_ch2',0
|
||||
|
||||
sz_option_box_draw db 'option_box_draw',0
|
||||
sz_option_box_mouse db 'option_box_mouse',0
|
||||
szVersion_op db 'version_op',0
|
||||
|
||||
sz_Scrollbar_ver_draw db 'scrollbar_v_draw',0
|
||||
sz_Scrollbar_ver_mouse db 'scrollbar_v_mouse',0
|
||||
sz_Scrollbar_hor_draw db 'scrollbar_h_draw',0
|
||||
sz_Scrollbar_hor_mouse db 'scrollbar_h_mouse',0
|
||||
szVersion_scrollbar db 'version_scrollbar',0
|
||||
|
||||
sz_Dbutton_draw db 'dbutton_draw',0
|
||||
sz_Dbutton_mouse db 'dbutton_mouse',0
|
||||
szVersion_dbutton db 'version_dbutton',0
|
||||
|
||||
sz_Menu_bar_draw db 'menu_bar_draw',0
|
||||
sz_Menu_bar_mouse db 'menu_bar_mouse',0
|
||||
sz_Menu_bar_activate db 'menu_bar_activate',0
|
||||
szVersion_menu_bar db 'version_menu_bar',0
|
||||
|
||||
sz_FileBrowser_draw db 'FileBrowser_draw',0
|
||||
sz_FileBrowser_mouse db 'FileBrowser_mouse',0
|
||||
sz_FileBrowser_key db 'FileBrowser_key',0
|
||||
szVersion_FileBrowser db 'version_FileBrowser',0
|
||||
|
||||
sz_tl_data_init db 'tl_data_init',0
|
||||
sz_tl_data_clear db 'tl_data_clear',0
|
||||
sz_tl_info_clear db 'tl_info_clear',0
|
||||
sz_tl_key db 'tl_key',0
|
||||
sz_tl_mouse db 'tl_mouse',0
|
||||
sz_tl_draw db 'tl_draw',0
|
||||
sz_tl_info_undo db 'tl_info_undo',0
|
||||
sz_tl_info_redo db 'tl_info_redo',0
|
||||
sz_tl_node_add db 'tl_node_add',0
|
||||
sz_tl_node_set_data db 'tl_node_set_data',0
|
||||
sz_tl_node_get_data db 'tl_node_get_data',0
|
||||
sz_tl_node_delete db 'tl_node_delete',0
|
||||
sz_tl_cur_beg db 'tl_cur_beg',0
|
||||
sz_tl_cur_next db 'tl_cur_next',0
|
||||
sz_tl_cur_perv db 'tl_cur_perv',0
|
||||
sz_tl_node_close_open db 'tl_node_close_open',0
|
||||
sz_tl_node_lev_inc db 'tl_node_lev_inc',0
|
||||
sz_tl_node_lev_dec db 'tl_node_lev_dec',0
|
||||
sz_tl_node_move_up db 'tl_node_move_up',0
|
||||
sz_tl_node_move_down db 'tl_node_move_down',0
|
||||
sz_tl_node_poi_get_info db 'tl_node_poi_get_info',0
|
||||
sz_tl_node_poi_get_next_info db 'tl_node_poi_get_next_info',0
|
||||
sz_tl_node_poi_get_data db 'tl_node_poi_get_data',0
|
||||
sz_tl_save_mem db 'tl_save_mem',0
|
||||
sz_tl_load_mem db 'tl_load_mem',0
|
||||
sz_tl_get_mem_size db 'tl_get_mem_size',0
|
||||
sz_tl_version_tree_list db 'version_tree_list',0
|
||||
|
||||
sz_PathShow_prepare db 'PathShow_prepare',0
|
||||
sz_PathShow_draw db 'PathShow_draw',0
|
||||
szVersion_path_show db 'version_PathShow',0
|
||||
|
||||
sz_ted_but_sumb_upper db 'ted_but_sumb_upper',0
|
||||
sz_ted_but_sumb_lover db 'ted_but_sumb_lover',0
|
||||
sz_ted_but_convert_by_table db 'ted_but_convert_by_table',0
|
||||
sz_ted_can_save db 'ted_can_save',0
|
||||
sz_ted_clear db 'ted_clear',0
|
||||
sz_ted_delete db 'ted_delete',0
|
||||
sz_ted_draw db 'ted_draw',0
|
||||
sz_ted_init db 'ted_init',0
|
||||
sz_ted_init_scroll_bars db 'ted_init_scroll_bars',0
|
||||
sz_ted_init_syntax_file db 'ted_init_syntax_file',0
|
||||
sz_ted_is_select db 'ted_is_select',0
|
||||
sz_ted_key db 'ted_key',0
|
||||
sz_ted_mouse db 'ted_mouse',0
|
||||
sz_ted_open_file db 'ted_open_file',0
|
||||
sz_ted_save_file db 'ted_save_file',0
|
||||
sz_ted_text_add db 'ted_text_add',0
|
||||
sz_ted_but_select_word db 'ted_but_select_word',0
|
||||
sz_ted_but_cut db 'ted_but_cut',0
|
||||
sz_ted_but_copy db 'ted_but_copy',0
|
||||
sz_ted_but_paste db 'ted_but_paste',0
|
||||
sz_ted_but_undo db 'ted_but_undo',0
|
||||
sz_ted_but_redo db 'ted_but_redo',0
|
||||
sz_ted_but_reverse db 'ted_but_reverse',0
|
||||
sz_ted_but_find db 'ted_but_find',0
|
||||
sz_ted_but_replace db 'ted_but_replace',0
|
||||
sz_ted_text_colored db 'ted_text_colored',0
|
||||
sz_ted_go_to_position db 'ted_go_to_position',0
|
||||
sz_ted_version db 'version_text_edit',0
|
||||
|
||||
sz_Frame_draw db 'frame_draw',0
|
||||
szVersion_frame db 'version_frame',0
|
||||
|
||||
sz_progressbar_draw db 'progressbar_draw', 0
|
||||
sz_progressbar_progress db 'progressbar_progress', 0
|
||||
|
||||
sz_tooltip_init db 'tooltip_init', 0
|
||||
sz_tooltip_delete db 'tooltip_delete', 0
|
||||
sz_tooltip_test_show db 'tooltip_test_show', 0
|
||||
sz_tooltip_mouse db 'tooltip_mouse', 0
|
||||
sz_get_font_size db 'get_font_size', 0
|
||||
; SPDX-License-Identifier: NOASSERTION
|
||||
;
|
||||
|
||||
; Text encoded with Code Page Windows 1251 - Cyrillic
|
||||
|
||||
|
||||
;*****************************************************************************
|
||||
; Box_Lib - library of graphical components
|
||||
; Copyright (C) KolibriOS team 2008-2020. All rights reserved.
|
||||
;
|
||||
; Authors:
|
||||
; Alexey Teplov aka <Lrz>
|
||||
; Marat Zakiyanov aka Mario79, aka Mario
|
||||
; Evtikhov Maxim aka Maxxxx32
|
||||
; Eugene Grechnikov aka Diamond
|
||||
; hidnplayr
|
||||
; Igor Afanasiev aka IgorA
|
||||
;*****************************************************************************
|
||||
|
||||
format MS COFF
|
||||
|
||||
public EXPORTS
|
||||
|
||||
section '.flat' code readable align 16
|
||||
include '../../../../macros.inc'
|
||||
include '../../../../proc32.inc'
|
||||
include '../../../../KOSfuncs.inc'
|
||||
include 'box_lib.mac' ;macro which should make life easier :)
|
||||
;include '../../../../debug.inc'
|
||||
include 'keys.inc'
|
||||
include '../../../../system/skincfg/kglobals.inc'
|
||||
include '../../../../system/skincfg/unpacker.inc'
|
||||
|
||||
;-----------------------------------------------------------------------------
|
||||
mem.alloc dd ? ;ЇєэъЎш фы т√фхыхэш ярь Єш
|
||||
mem.free dd ? ;ЇєэъЎш фы юётюсюцфхэш ярь Єш
|
||||
mem.realloc dd ? ;ЇєэъЎш фы яхЁхЁрёяЁхфхыхэш ярь Єш
|
||||
dll.load dd ?
|
||||
|
||||
;----------------------------------------------------
|
||||
include 'editbox.asm' ;editbox
|
||||
include 'checkbox.asm' ;checkbox
|
||||
include 'optionbox.asm' ;optionbox
|
||||
include 'scrollbar.asm' ;scrollbar
|
||||
include 'd_button.asm' ;dinamic_button
|
||||
include 'menubar.asm' ;menubar
|
||||
include 'filebrowser.asm' ;filebrowser
|
||||
include 'tree_list.asm' ;tree_list, list_box
|
||||
include 'pathshow.asm' ;pathshow
|
||||
include 't_edit.asm' ;text_editor
|
||||
include 'frame.asm' ;frame
|
||||
include 'progressbar.asm' ;progressbar
|
||||
include 'tooltip.asm' ;tooltip
|
||||
;--------------------------------------------------
|
||||
|
||||
;input:
|
||||
; eax = єърчрЄхы№ эр ЇєэъЎш■ т√фхыхэш ярь Єш
|
||||
; ebx = ... юётюсюцфхэш ярь Єш
|
||||
; ecx = ... яхЁхЁрёяЁхфхыхэш ярь Єш
|
||||
; edx = ... чруЁєчъш сшсышюЄхъш (яюър эх шёяюы№чєхЄё )
|
||||
align 16
|
||||
lib_init:
|
||||
mov [mem.alloc], eax
|
||||
mov [mem.free], ebx
|
||||
mov [mem.realloc], ecx
|
||||
mov [dll.load], edx
|
||||
ret
|
||||
|
||||
|
||||
align 4
|
||||
proc draw_edge uses eax ebx ecx edx edi esi, box_l:dword, box_t:dword, box_w:dword, box_h:dword,\
|
||||
col_0:dword, col_1:dword, col_2:dword
|
||||
|
||||
mov esi,[col_1]
|
||||
and esi,111111101111111011111110b
|
||||
|
||||
mov eax,SF_DRAW_RECT
|
||||
;bottom line
|
||||
mov edx,[col_2]
|
||||
mov ebx,[box_l]
|
||||
shl ebx,16
|
||||
add ebx,[box_w]
|
||||
inc ebx ;фы чрыштъш фшруюэры№э√ї яшъёхыхщ
|
||||
mov ecx,[box_t]
|
||||
add ecx,[box_h]
|
||||
shl ecx,16
|
||||
inc ecx
|
||||
|
||||
mov edi,3 ;for cycle
|
||||
@@:
|
||||
;calculate colors
|
||||
and edx,111111101111111011111110b
|
||||
add edx,esi
|
||||
shr edx,1
|
||||
;line move up and ->...<-
|
||||
sub ecx,1 shl 16 ;move up
|
||||
add ebx,1 shl 16 ;->...
|
||||
sub ebx,2 ;...<-
|
||||
;draw line
|
||||
int 0x40
|
||||
dec edi
|
||||
jnz @b
|
||||
|
||||
;right line
|
||||
mov edx,[col_2]
|
||||
mov ebx,[box_l]
|
||||
add ebx,[box_w]
|
||||
shl ebx,16
|
||||
inc ebx
|
||||
mov ecx,[box_t]
|
||||
shl ecx,16
|
||||
add ecx,[box_h]
|
||||
|
||||
mov edi,3 ;for cycle
|
||||
@@:
|
||||
;calculate colors
|
||||
and edx,111111101111111011111110b
|
||||
add edx,esi
|
||||
shr edx,1
|
||||
;line move left and ...
|
||||
sub ebx,1 shl 16 ;move left
|
||||
add ecx,1 shl 16
|
||||
sub ecx,2
|
||||
;draw line
|
||||
int 0x40
|
||||
dec edi
|
||||
jnz @b
|
||||
|
||||
;top line
|
||||
mov edx,[col_0]
|
||||
mov ebx,[box_l]
|
||||
shl ebx,16
|
||||
add ebx,[box_w]
|
||||
mov ecx,[box_t]
|
||||
shl ecx,16
|
||||
inc ecx
|
||||
|
||||
mov edi,3 ;for cycle
|
||||
@@:
|
||||
;calculate colors
|
||||
and edx,111111101111111011111110b
|
||||
add edx,esi
|
||||
shr edx,1
|
||||
;line move down and ->...<-
|
||||
add ecx,1 shl 16 ;move down
|
||||
add ebx,1 shl 16 ;->...
|
||||
sub ebx,2 ;...<-
|
||||
;draw line
|
||||
int 0x40
|
||||
dec edi
|
||||
jnz @b
|
||||
|
||||
;left line
|
||||
mov edx,[col_0]
|
||||
mov ebx,[box_l]
|
||||
shl ebx,16
|
||||
inc ebx
|
||||
mov ecx,[box_t]
|
||||
shl ecx,16
|
||||
add ecx,[box_h]
|
||||
|
||||
mov edi,3 ;for cycle
|
||||
@@:
|
||||
;calculate colors
|
||||
and edx,111111101111111011111110b
|
||||
add edx,esi
|
||||
shr edx,1
|
||||
;line move left and ...
|
||||
add ebx,1 shl 16 ;move left
|
||||
add ecx,1 shl 16
|
||||
sub ecx,2
|
||||
;draw line
|
||||
int 0x40
|
||||
dec edi
|
||||
jnz @b
|
||||
|
||||
ret
|
||||
endp
|
||||
|
||||
|
||||
;фы ЁрсюЄ√ ё KPCK
|
||||
IncludeIGlobals
|
||||
IncludeUGlobals
|
||||
|
||||
align 16
|
||||
EXPORTS:
|
||||
|
||||
|
||||
dd sz_init, lib_init
|
||||
dd sz_version, 0x00000001
|
||||
|
||||
dd sz_edit_box, edit_box_draw ;old function name
|
||||
dd sz_edit_box_draw, edit_box_draw
|
||||
dd sz_edit_box_key, edit_box_key
|
||||
dd sz_edit_box_key_safe, edit_box_key_safe
|
||||
dd sz_edit_box_mouse, edit_box_mouse
|
||||
dd sz_edit_box_set_text, edit_box_set_text
|
||||
dd szVersion_ed, 0x00000001
|
||||
|
||||
dd sz_init_checkbox, init_checkbox
|
||||
dd sz_check_box_draw, check_box_draw
|
||||
dd sz_check_box_mouse, check_box_mouse
|
||||
dd szVersion_ch2, 0x00000002
|
||||
|
||||
dd sz_option_box_draw, option_box_draw
|
||||
dd sz_option_box_mouse, option_box_mouse
|
||||
dd szVersion_op, 0x00000001
|
||||
|
||||
dd sz_Scrollbar_ver_draw, scroll_bar_vertical.draw
|
||||
dd sz_Scrollbar_ver_mouse, scroll_bar_vertical.mouse
|
||||
dd sz_Scrollbar_hor_draw, scroll_bar_horizontal.draw
|
||||
dd sz_Scrollbar_hor_mouse, scroll_bar_horizontal.mouse
|
||||
dd szVersion_scrollbar, 0x00010001
|
||||
|
||||
dd sz_Dbutton_draw, dinamic_button.draw
|
||||
dd sz_Dbutton_mouse, dinamic_button.mouse
|
||||
dd szVersion_dbutton, 0x00010001
|
||||
|
||||
dd sz_Menu_bar_draw, menu_bar.draw
|
||||
dd sz_Menu_bar_mouse, menu_bar.mouse
|
||||
dd sz_Menu_bar_activate, menu_bar.activate
|
||||
dd szVersion_menu_bar, 0x00010002
|
||||
|
||||
dd sz_FileBrowser_draw, fb_draw_panel
|
||||
dd sz_FileBrowser_mouse, fb_mouse
|
||||
dd sz_FileBrowser_key, fb_key
|
||||
dd szVersion_FileBrowser, 0x00010001
|
||||
|
||||
dd sz_tl_data_init, tl_data_init
|
||||
dd sz_tl_data_clear, tl_data_clear
|
||||
dd sz_tl_info_clear, tl_info_clear
|
||||
dd sz_tl_key, tl_key
|
||||
dd sz_tl_mouse, tl_mouse
|
||||
dd sz_tl_draw, tl_draw
|
||||
dd sz_tl_info_undo, tl_info_undo
|
||||
dd sz_tl_info_redo, tl_info_redo
|
||||
dd sz_tl_node_add, tl_node_add
|
||||
dd sz_tl_node_set_data, tl_node_set_data
|
||||
dd sz_tl_node_get_data, tl_node_get_data
|
||||
dd sz_tl_node_delete, tl_node_delete
|
||||
dd sz_tl_cur_beg, tl_cur_beg
|
||||
dd sz_tl_cur_next, tl_cur_next
|
||||
dd sz_tl_cur_perv, tl_cur_perv
|
||||
dd sz_tl_node_close_open, tl_node_close_open
|
||||
dd sz_tl_node_lev_inc, tl_node_lev_inc
|
||||
dd sz_tl_node_lev_dec, tl_node_lev_dec
|
||||
dd sz_tl_node_move_up, tl_node_move_up
|
||||
dd sz_tl_node_move_down, tl_node_move_down
|
||||
dd sz_tl_node_poi_get_info, tl_node_poi_get_info
|
||||
dd sz_tl_node_poi_get_next_info, tl_node_poi_get_next_info
|
||||
dd sz_tl_node_poi_get_data, tl_node_poi_get_data
|
||||
dd sz_tl_save_mem, tl_save_mem
|
||||
dd sz_tl_load_mem, tl_load_mem
|
||||
dd sz_tl_get_mem_size, tl_get_mem_size
|
||||
dd sz_tl_version_tree_list, 0x00000001
|
||||
|
||||
dd sz_PathShow_prepare, path_show.prepare
|
||||
dd sz_PathShow_draw, path_show.draw
|
||||
dd szVersion_path_show, 0x00010001
|
||||
|
||||
dd sz_ted_but_sumb_upper, ted_but_sumb_upper
|
||||
dd sz_ted_but_sumb_lover, ted_but_sumb_lover
|
||||
dd sz_ted_but_convert_by_table, ted_but_convert_by_table
|
||||
dd sz_ted_can_save, ted_can_save
|
||||
dd sz_ted_clear, ted_clear
|
||||
dd sz_ted_delete, ted_delete
|
||||
dd sz_ted_draw, ted_draw
|
||||
dd sz_ted_init, ted_init
|
||||
dd sz_ted_init_scroll_bars, ted_init_scroll_bars
|
||||
dd sz_ted_init_syntax_file, ted_init_syntax_file
|
||||
dd sz_ted_is_select, ted_is_select
|
||||
dd sz_ted_key, ted_key
|
||||
dd sz_ted_mouse, ted_mouse
|
||||
dd sz_ted_open_file, ted_open_file
|
||||
dd sz_ted_save_file, ted_save_file
|
||||
dd sz_ted_text_add, ted_text_add
|
||||
dd sz_ted_but_select_word, ted_but_select_word
|
||||
dd sz_ted_but_cut, ted_but_cut
|
||||
dd sz_ted_but_copy, ted_but_copy
|
||||
dd sz_ted_but_paste, ted_but_paste
|
||||
dd sz_ted_but_undo, ted_but_undo
|
||||
dd sz_ted_but_redo, ted_but_redo
|
||||
dd sz_ted_but_reverse, ted_but_reverse
|
||||
dd sz_ted_but_find, ted_but_find
|
||||
dd sz_ted_but_replace, ted_but_replace
|
||||
dd sz_ted_text_colored, ted_text_colored
|
||||
dd sz_ted_go_to_position, ted_go_to_position
|
||||
dd sz_ted_version, 6
|
||||
|
||||
dd sz_Frame_draw, frame.draw
|
||||
dd szVersion_frame, 0x00010001
|
||||
|
||||
dd sz_progressbar_draw, progressbar_draw
|
||||
dd sz_progressbar_progress, progressbar_progress
|
||||
|
||||
dd sz_tooltip_init, tooltip_init
|
||||
dd sz_tooltip_delete, tooltip_delete
|
||||
dd sz_tooltip_test_show, tooltip_test_show
|
||||
dd sz_tooltip_mouse, tooltip_mouse
|
||||
dd sz_get_font_size, get_font_size
|
||||
|
||||
dd 0,0
|
||||
|
||||
|
||||
sz_init db 'lib_init',0
|
||||
sz_version db 'version',0
|
||||
|
||||
sz_edit_box db 'edit_box',0
|
||||
sz_edit_box_draw db 'edit_box_draw',0
|
||||
sz_edit_box_key db 'edit_box_key',0
|
||||
sz_edit_box_key_safe db 'edit_box_key_safe',0
|
||||
sz_edit_box_mouse db 'edit_box_mouse',0
|
||||
sz_edit_box_set_text db 'edit_box_set_text',0
|
||||
szVersion_ed db 'version_ed',0
|
||||
|
||||
sz_init_checkbox db 'init_checkbox2',0
|
||||
sz_check_box_draw db 'check_box_draw2',0
|
||||
sz_check_box_mouse db 'check_box_mouse2',0
|
||||
szVersion_ch2 db 'version_ch2',0
|
||||
|
||||
sz_option_box_draw db 'option_box_draw',0
|
||||
sz_option_box_mouse db 'option_box_mouse',0
|
||||
szVersion_op db 'version_op',0
|
||||
|
||||
sz_Scrollbar_ver_draw db 'scrollbar_v_draw',0
|
||||
sz_Scrollbar_ver_mouse db 'scrollbar_v_mouse',0
|
||||
sz_Scrollbar_hor_draw db 'scrollbar_h_draw',0
|
||||
sz_Scrollbar_hor_mouse db 'scrollbar_h_mouse',0
|
||||
szVersion_scrollbar db 'version_scrollbar',0
|
||||
|
||||
sz_Dbutton_draw db 'dbutton_draw',0
|
||||
sz_Dbutton_mouse db 'dbutton_mouse',0
|
||||
szVersion_dbutton db 'version_dbutton',0
|
||||
|
||||
sz_Menu_bar_draw db 'menu_bar_draw',0
|
||||
sz_Menu_bar_mouse db 'menu_bar_mouse',0
|
||||
sz_Menu_bar_activate db 'menu_bar_activate',0
|
||||
szVersion_menu_bar db 'version_menu_bar',0
|
||||
|
||||
sz_FileBrowser_draw db 'FileBrowser_draw',0
|
||||
sz_FileBrowser_mouse db 'FileBrowser_mouse',0
|
||||
sz_FileBrowser_key db 'FileBrowser_key',0
|
||||
szVersion_FileBrowser db 'version_FileBrowser',0
|
||||
|
||||
sz_tl_data_init db 'tl_data_init',0
|
||||
sz_tl_data_clear db 'tl_data_clear',0
|
||||
sz_tl_info_clear db 'tl_info_clear',0
|
||||
sz_tl_key db 'tl_key',0
|
||||
sz_tl_mouse db 'tl_mouse',0
|
||||
sz_tl_draw db 'tl_draw',0
|
||||
sz_tl_info_undo db 'tl_info_undo',0
|
||||
sz_tl_info_redo db 'tl_info_redo',0
|
||||
sz_tl_node_add db 'tl_node_add',0
|
||||
sz_tl_node_set_data db 'tl_node_set_data',0
|
||||
sz_tl_node_get_data db 'tl_node_get_data',0
|
||||
sz_tl_node_delete db 'tl_node_delete',0
|
||||
sz_tl_cur_beg db 'tl_cur_beg',0
|
||||
sz_tl_cur_next db 'tl_cur_next',0
|
||||
sz_tl_cur_perv db 'tl_cur_perv',0
|
||||
sz_tl_node_close_open db 'tl_node_close_open',0
|
||||
sz_tl_node_lev_inc db 'tl_node_lev_inc',0
|
||||
sz_tl_node_lev_dec db 'tl_node_lev_dec',0
|
||||
sz_tl_node_move_up db 'tl_node_move_up',0
|
||||
sz_tl_node_move_down db 'tl_node_move_down',0
|
||||
sz_tl_node_poi_get_info db 'tl_node_poi_get_info',0
|
||||
sz_tl_node_poi_get_next_info db 'tl_node_poi_get_next_info',0
|
||||
sz_tl_node_poi_get_data db 'tl_node_poi_get_data',0
|
||||
sz_tl_save_mem db 'tl_save_mem',0
|
||||
sz_tl_load_mem db 'tl_load_mem',0
|
||||
sz_tl_get_mem_size db 'tl_get_mem_size',0
|
||||
sz_tl_version_tree_list db 'version_tree_list',0
|
||||
|
||||
sz_PathShow_prepare db 'PathShow_prepare',0
|
||||
sz_PathShow_draw db 'PathShow_draw',0
|
||||
szVersion_path_show db 'version_PathShow',0
|
||||
|
||||
sz_ted_but_sumb_upper db 'ted_but_sumb_upper',0
|
||||
sz_ted_but_sumb_lover db 'ted_but_sumb_lover',0
|
||||
sz_ted_but_convert_by_table db 'ted_but_convert_by_table',0
|
||||
sz_ted_can_save db 'ted_can_save',0
|
||||
sz_ted_clear db 'ted_clear',0
|
||||
sz_ted_delete db 'ted_delete',0
|
||||
sz_ted_draw db 'ted_draw',0
|
||||
sz_ted_init db 'ted_init',0
|
||||
sz_ted_init_scroll_bars db 'ted_init_scroll_bars',0
|
||||
sz_ted_init_syntax_file db 'ted_init_syntax_file',0
|
||||
sz_ted_is_select db 'ted_is_select',0
|
||||
sz_ted_key db 'ted_key',0
|
||||
sz_ted_mouse db 'ted_mouse',0
|
||||
sz_ted_open_file db 'ted_open_file',0
|
||||
sz_ted_save_file db 'ted_save_file',0
|
||||
sz_ted_text_add db 'ted_text_add',0
|
||||
sz_ted_but_select_word db 'ted_but_select_word',0
|
||||
sz_ted_but_cut db 'ted_but_cut',0
|
||||
sz_ted_but_copy db 'ted_but_copy',0
|
||||
sz_ted_but_paste db 'ted_but_paste',0
|
||||
sz_ted_but_undo db 'ted_but_undo',0
|
||||
sz_ted_but_redo db 'ted_but_redo',0
|
||||
sz_ted_but_reverse db 'ted_but_reverse',0
|
||||
sz_ted_but_find db 'ted_but_find',0
|
||||
sz_ted_but_replace db 'ted_but_replace',0
|
||||
sz_ted_text_colored db 'ted_text_colored',0
|
||||
sz_ted_go_to_position db 'ted_go_to_position',0
|
||||
sz_ted_version db 'version_text_edit',0
|
||||
|
||||
sz_Frame_draw db 'frame_draw',0
|
||||
szVersion_frame db 'version_frame',0
|
||||
|
||||
sz_progressbar_draw db 'progressbar_draw', 0
|
||||
sz_progressbar_progress db 'progressbar_progress', 0
|
||||
|
||||
sz_tooltip_init db 'tooltip_init', 0
|
||||
sz_tooltip_delete db 'tooltip_delete', 0
|
||||
sz_tooltip_test_show db 'tooltip_test_show', 0
|
||||
sz_tooltip_mouse db 'tooltip_mouse', 0
|
||||
sz_get_font_size db 'get_font_size', 0
|
||||
@@ -27,7 +27,7 @@
|
||||
;; ;;
|
||||
;;================================================================================================;;
|
||||
include 'xcf.inc'
|
||||
;include '../../../../../system/board/trunk/debug.inc'
|
||||
;include '../../../../../system/board/debug.inc'
|
||||
|
||||
MAX_LAYERS = 255
|
||||
|
||||
@@ -821,7 +821,7 @@ endl
|
||||
|
||||
mov [bottom_x1], 0
|
||||
mov ecx, [ebx + Image.Width]
|
||||
mov [bottom_length], ecx
|
||||
mov [bottom_length], ecx
|
||||
|
||||
mov eax, [edx + Image.Extended]
|
||||
movsx eax, word[eax + xcf_ext.offset_x]
|
||||
@@ -858,7 +858,7 @@ endl
|
||||
|
||||
mov [bottom_y1], 0
|
||||
mov ecx, [ebx + Image.Height]
|
||||
mov [bottom_length], ecx
|
||||
mov [bottom_length], ecx
|
||||
|
||||
mov eax, [edx + Image.Extended]
|
||||
movsx eax, word[eax + xcf_ext.offset_y]
|
||||
@@ -972,7 +972,7 @@ endl
|
||||
add edi, edx
|
||||
mov edx, [edi]
|
||||
jmp .composite_found
|
||||
@@:
|
||||
@@:
|
||||
add edi, 16
|
||||
dec ecx
|
||||
jnz .still
|
||||
|
||||
+2553
-2550
File diff suppressed because it is too large.
Load diff
+435
-429
@@ -1,429 +1,435 @@
|
||||
;Огромная благодарность всем, кто помогал: кодом/советом/дизайном ...
|
||||
|
||||
use32
|
||||
org 0
|
||||
db 'MENUET01' ;идентиф. исполняемого файла всегда 8 байт
|
||||
dd 1, start, i_end, mem, stacktop, file_name, sys_path
|
||||
|
||||
MAX_COLOR_WORD_LEN equ 40
|
||||
maxChars equ 100002 ;(колличество символов в новом документе + 2)
|
||||
BUF_SIZE equ 4096 ;buffer for copy|paste
|
||||
maxSyntaxFileSize equ 410000
|
||||
TOOLBAR_ICONS_SIZE equ 1200*21
|
||||
|
||||
include '../../proc32.inc'
|
||||
include '../../macros.inc'
|
||||
include '../../KOSfuncs.inc'
|
||||
include '../../load_img.inc'
|
||||
include '../../load_lib.mac'
|
||||
include '../../develop/libraries/box_lib/trunk/box_lib.mac'
|
||||
include '../../system/skincfg/trunk/kglobals.inc'
|
||||
include '../../system/skincfg/trunk/unpacker.inc'
|
||||
include 'lang.inc'
|
||||
|
||||
include 't_data.inc'
|
||||
include 't_button.inc'
|
||||
include 't_menu.inc'
|
||||
include 'strlen.inc'
|
||||
include 't_draw.inc' ;draw main window functions
|
||||
include 'wnd_k_words.inc'
|
||||
|
||||
@use_library mem.Alloc,mem.Free,mem.ReAlloc,dll.Load
|
||||
|
||||
align 4
|
||||
icon_tl_sys dd 0 ;указатель на память для хранения системных иконок
|
||||
run_file_70 FileInfoBlock
|
||||
|
||||
align 4
|
||||
start:
|
||||
mcall SF_STYLE_SETTINGS,SSF_GET_COLORS,sc,sizeof.system_colors
|
||||
|
||||
mcall SF_SYS_MISC,SSF_HEAP_INIT
|
||||
or eax,eax
|
||||
jnz @f
|
||||
call ted_Exit
|
||||
@@:
|
||||
|
||||
mcall SF_KEYBOARD,SSF_SET_INPUT_MODE,1 ;scan code
|
||||
mcall SF_SET_EVENTS_MASK,0xC0000027
|
||||
|
||||
mov esi,file_name
|
||||
stdcall str_len,esi
|
||||
mov ecx,eax
|
||||
mov edi,openfile_path
|
||||
cld
|
||||
rep movsb ;копируем имя файла в буфер openfile_path
|
||||
|
||||
load_libraries l_libs_start,load_lib_end
|
||||
|
||||
;проверка на сколько удачно загузились библиотеки
|
||||
mov ebp,lib0
|
||||
.test_lib_open:
|
||||
cmp dword [ebp+ll_struc_size-4],0
|
||||
jz @f
|
||||
mcall SF_TERMINATE_PROCESS ;exit not correct
|
||||
@@:
|
||||
add ebp,ll_struc_size
|
||||
cmp ebp,load_lib_end
|
||||
jl .test_lib_open
|
||||
|
||||
;---------------------------------------------------------------------
|
||||
stdcall [ted_init], tedit0
|
||||
stdcall [tl_data_init], tree1
|
||||
option_boxes_set_sys_color sc,opt_grlist1
|
||||
init_checkboxes2 check_boxes,check_boxes_end
|
||||
check_boxes_set_sys_color2 check_boxes,check_boxes_end,sc
|
||||
|
||||
; OpenDialog initialisation
|
||||
stdcall [OpenDialog_Init],OpenDialog_data
|
||||
|
||||
; kmenu initialisation
|
||||
call tedit_menu_init
|
||||
|
||||
; init toolbar file
|
||||
include_image_file 'te_icon.png', bmp_icon,,,6 ;6 для серых кнопок
|
||||
mov eax,[bmp_icon]
|
||||
add eax,TOOLBAR_ICONS_SIZE
|
||||
stdcall img_to_gray, [bmp_icon],eax,(TOOLBAR_ICONS_SIZE)/3
|
||||
;---------------------------------------------------------------------
|
||||
; внедряем файл с курсорами и линиями
|
||||
include_image_file '..\..\media\log_el\trunk\tl_sys_16.png', icon_tl_sys
|
||||
mov eax,dword[icon_tl_sys]
|
||||
mov dword[tree1.data_img_sys],eax
|
||||
; внедряем файл с иконками узлов
|
||||
include_image_file 'tl_nod_16.png', icon_tl_sys
|
||||
mov eax,dword[icon_tl_sys]
|
||||
mov dword[tree1.data_img],eax
|
||||
;------------------------------------------------------------------------------
|
||||
copy_path fn_syntax_dir,sys_path,file_name,0 ;берем путь к папке с файлами синтаксиса
|
||||
xor eax,eax
|
||||
mov ecx,4096
|
||||
mov edi,file_name
|
||||
repnz scasb
|
||||
mov byte[edi-2],al ;убираем '/' в конце имени папки (нужно для чтения с CD)
|
||||
mcall SF_FILE,tree_file_struct
|
||||
|
||||
or ebx,ebx
|
||||
jz .end_dir_init
|
||||
mov eax,dir_mem+32+40
|
||||
mov ecx,ebx
|
||||
@@:
|
||||
cmp byte[eax],'.' ;фильтруем файлы с именами '.' и '..'
|
||||
je .filter
|
||||
;0x10000 ;1*2^16 - где 1 номер иконки с книгой
|
||||
stdcall [tl_node_add], tree1,0x10000,eax
|
||||
stdcall [tl_cur_next], tree1
|
||||
.filter:
|
||||
add eax,304
|
||||
loop @b
|
||||
stdcall [tl_cur_beg],tree1 ;ставим курсор на начало списка
|
||||
or dword[tree1.style], tl_cursor_pos_limited ;ограничиваем движение курсора в пределах списка
|
||||
.end_dir_init:
|
||||
|
||||
;--- load ini file ---
|
||||
copy_path ini_name,sys_path,file_name,0
|
||||
;window startup pozition
|
||||
stdcall [ini_get_int],file_name,ini_sec_window,key_window_l,ini_def_window_l
|
||||
mov word[wnd_s_pos+2],ax
|
||||
stdcall [ini_get_int],file_name,ini_sec_window,key_window_w,ini_def_window_w
|
||||
mov word[wnd_s_pos],ax
|
||||
stdcall [ini_get_int],file_name,ini_sec_window,key_window_t,ini_def_window_t
|
||||
mov word[wnd_s_pos+6],ax
|
||||
stdcall [ini_get_int],file_name,ini_sec_window,key_window_h,ini_def_window_h
|
||||
mov word[wnd_s_pos+4],ax
|
||||
;scrool type
|
||||
stdcall [ini_get_int],file_name,ini_sec_window,key_scroll_type,ini_def_scroll_type
|
||||
mov [wScr.type],eax
|
||||
mov [hScr.type],eax
|
||||
mov [ws_dir_lbox.type],eax
|
||||
mov [w_scr_t3.type],eax
|
||||
;symbol size
|
||||
stdcall [ini_get_int],file_name,ini_sec_window,key_symbol_w,ini_def_symbol_w
|
||||
mov dword[tedit0.rec.width],eax
|
||||
stdcall [ini_get_int],file_name,ini_sec_window,key_symbol_h,ini_def_symbol_h
|
||||
mov dword[tedit0.rec.height],eax
|
||||
;lea eax,[eax+eax*2]
|
||||
;mov dword[tedit0.rec.top],eax
|
||||
;font size
|
||||
stdcall [ini_get_int],file_name,ini_sec_window,key_font_s,ini_def_font_s
|
||||
shl eax,24
|
||||
mov dword[tedit0.font_size],eax
|
||||
;кнопки на панели
|
||||
ini_panel key_but_new, ID_BUT_NEW
|
||||
ini_panel key_but_open, ID_BUT_OPEN
|
||||
ini_panel key_but_save, ID_BUT_SAVE
|
||||
ini_panel key_but_save_as,ID_BUT_SAVE_AS
|
||||
ini_panel key_but_select, ID_BUT_SELECT
|
||||
ini_panel key_but_cut, ID_BUT_CUT
|
||||
ini_panel key_but_copy, ID_BUT_COPY
|
||||
ini_panel key_but_paste, ID_BUT_PASTE
|
||||
ini_panel key_but_find, ID_BUT_FIND
|
||||
ini_panel key_but_replace,ID_BUT_REPLACE
|
||||
ini_panel key_but_key_words,ID_BUT_KEY_WORDS
|
||||
ini_panel key_but_upper, ID_BUT_UPPER
|
||||
ini_panel key_but_lower, ID_BUT_LOWER
|
||||
ini_panel key_but_reverse,ID_BUT_REVERSE
|
||||
ini_panel key_but_undo, ID_BUT_UNDO
|
||||
ini_panel key_but_redo, ID_BUT_REDO
|
||||
ini_panel key_but_invisible,ID_BUT_INVISIBLE
|
||||
ini_panel key_but_syntax_list,ID_BUT_SYNTAX_LIST
|
||||
ini_panel key_but_syntax_mode,ID_BUT_SYNTAX_MODE
|
||||
ini_panel key_but_convert_1251_866,ID_BUT_CONVERT_1251_866
|
||||
ini_panel key_but_convert_866_1251,ID_BUT_CONVERT_866_1251
|
||||
;файловые расширения
|
||||
xor edx,edx
|
||||
mov ebx,synt_auto_open
|
||||
@@:
|
||||
;берем имя файла
|
||||
stdcall [ini_get_str],file_name,ini_sec_options,key_synt_file,ebx,32,ini_def_synt_f
|
||||
cmp byte[ebx],0
|
||||
je @f
|
||||
inc byte[key_synt_file.numb]
|
||||
add ebx,32
|
||||
;берем расширения
|
||||
stdcall [ini_get_str],file_name,ini_sec_options,key_synt_ext,ebx,32,ini_def_synt_f
|
||||
inc byte[key_synt_ext.numb]
|
||||
add ebx,32
|
||||
inc edx
|
||||
cmp edx,max_synt_auto_open
|
||||
jl @b
|
||||
@@:
|
||||
|
||||
;--- load color option file ---
|
||||
stdcall open_unpac_synt_file,[fn_col_option]
|
||||
|
||||
;--- get cmd line ---
|
||||
cmp byte[openfile_path+3],0 ;openfile_path
|
||||
je @f ;if file names exist
|
||||
mov esi,openfile_path
|
||||
stdcall auto_open_syntax,esi
|
||||
call but_no_msg_OpenFile
|
||||
@@:
|
||||
|
||||
|
||||
|
||||
align 16
|
||||
red_win:
|
||||
call draw_window
|
||||
|
||||
align 16
|
||||
still:
|
||||
mcall SF_WAIT_EVENT
|
||||
cmp dword[exit_code],1
|
||||
jne @f
|
||||
call ted_Exit
|
||||
jmp still
|
||||
@@:
|
||||
|
||||
cmp al,1 ;изменилось положение окна
|
||||
jz red_win
|
||||
cmp al,2
|
||||
jz key
|
||||
cmp al,3
|
||||
jz button
|
||||
cmp al,6 ;мышь
|
||||
jne @f
|
||||
call mouse
|
||||
@@:
|
||||
jmp still
|
||||
|
||||
align 16
|
||||
mouse:
|
||||
stdcall [kmainmenu_dispatch_cursorevent], [main_menu]
|
||||
|
||||
mcall SF_MOUSE_GET,SSF_WINDOW_POSITION
|
||||
cmp word[tedit0.wnd.top],ax
|
||||
jg .no_edit
|
||||
shr eax,16
|
||||
cmp word[tedit0.wnd.left],ax
|
||||
jg .no_edit
|
||||
mcall SF_MOUSE_GET,SSF_BUTTON_EXT
|
||||
bt eax,24 ;двойной щелчёк левой кнопкой
|
||||
jnc @f
|
||||
stdcall [ted_but_select_word], tedit0
|
||||
ret
|
||||
@@:
|
||||
stdcall [ted_mouse], tedit0
|
||||
.no_edit:
|
||||
|
||||
;проверка боковых панелей
|
||||
cmp byte[tedit0.panel_id],TED_PANEL_FIND
|
||||
jne @f
|
||||
stdcall [edit_box_mouse], edit_find
|
||||
stdcall [option_box_mouse], opt_grlist1
|
||||
stdcall [check_box_mouse], ch1
|
||||
@@:
|
||||
cmp byte[tedit0.panel_id],TED_PANEL_REPLACE
|
||||
jne @f
|
||||
stdcall [edit_box_mouse], edit_find
|
||||
stdcall [edit_box_mouse], edit_replace
|
||||
stdcall [option_box_mouse], opt_grlist1
|
||||
@@:
|
||||
cmp byte[tedit0.panel_id],TED_PANEL_SYNTAX
|
||||
jne @f
|
||||
stdcall [tl_mouse], tree1
|
||||
@@:
|
||||
cmp byte[tedit0.panel_id],TED_PANEL_GOTO
|
||||
jne @f
|
||||
stdcall [edit_box_mouse], edit_goto
|
||||
@@:
|
||||
ret
|
||||
;---------------------------------------------------------------------
|
||||
|
||||
;output:
|
||||
; ah = symbol
|
||||
align 16
|
||||
proc KeyConvertToASCII uses ebx, table:dword
|
||||
mov ebx,dword[table] ;convert scan to ascii
|
||||
shr ax,8
|
||||
add bx,ax
|
||||
mov ah,byte[ebx]
|
||||
ret
|
||||
endp
|
||||
|
||||
align 16
|
||||
key:
|
||||
mcall SF_KEYBOARD,SSF_GET_CONTROL_KEYS ;66.3 получить состояние управляющих клавиш
|
||||
xor esi,esi
|
||||
mov ecx,1
|
||||
test al,3 ;[Shift]
|
||||
jz @f
|
||||
mov cl,2
|
||||
or esi,KM_SHIFT
|
||||
@@:
|
||||
test al,0x0c ;[Ctrl]
|
||||
jz @f
|
||||
or esi,KM_CTRL
|
||||
@@:
|
||||
test al,0x30 ;[Alt]
|
||||
jz @f
|
||||
mov cl,3
|
||||
or esi,KM_ALT
|
||||
@@:
|
||||
test al,0x80 ;[NumLock]
|
||||
jz @f
|
||||
or esi,KM_NUMLOCK
|
||||
@@:
|
||||
|
||||
mcall SF_SYSTEM_GET,SSF_KEYBOARD_LAYOUT,,conv_tabl ;26.2 получить раскладку клавиатуры
|
||||
mcall SF_GET_KEY
|
||||
stdcall [tl_key], tree1
|
||||
|
||||
test word[edit_replace.flags],ed_focus ;если не в фокусе, выходим
|
||||
je @f
|
||||
cmp ah,0x80 ;if key up
|
||||
ja still
|
||||
cmp ah,42 ;[Shift] (left)
|
||||
je still
|
||||
cmp ah,54 ;[Shift] (right)
|
||||
je still
|
||||
cmp ah,56 ;[Alt]
|
||||
je still
|
||||
cmp ah,29 ;[Ctrl]
|
||||
je still
|
||||
cmp ah,69 ;[Pause Break]
|
||||
je still
|
||||
|
||||
stdcall KeyConvertToASCII, conv_tabl
|
||||
stdcall [edit_box_key], edit_replace
|
||||
jmp still
|
||||
@@:
|
||||
test word[edit_find.flags],ed_focus ;если не в фокусе, выходим
|
||||
je @f
|
||||
cmp ah,0x80 ;if key up
|
||||
ja still
|
||||
cmp ah,42 ;[Shift] (left)
|
||||
je still
|
||||
cmp ah,54 ;[Shift] (right)
|
||||
je still
|
||||
cmp ah,56 ;[Alt]
|
||||
je still
|
||||
cmp ah,29 ;[Ctrl]
|
||||
je still
|
||||
cmp ah,69 ;[Pause Break]
|
||||
je still
|
||||
|
||||
stdcall KeyConvertToASCII, conv_tabl
|
||||
stdcall [edit_box_key], edit_find
|
||||
jmp still
|
||||
@@:
|
||||
test word[edit_goto.flags],ed_focus ;если не в фокусе, выходим
|
||||
je @f
|
||||
cmp ah,0x80 ;if key up
|
||||
ja still
|
||||
cmp ah,42 ;[Shift] (left)
|
||||
je still
|
||||
cmp ah,54 ;[Shift] (right)
|
||||
je still
|
||||
cmp ah,56 ;[Alt]
|
||||
je still
|
||||
cmp ah,29 ;[Ctrl]
|
||||
je still
|
||||
cmp ah,69 ;[Pause Break]
|
||||
je still
|
||||
|
||||
stdcall KeyConvertToASCII, conv_tabl
|
||||
stdcall [edit_box_key], edit_goto
|
||||
jmp still
|
||||
@@:
|
||||
|
||||
stdcall [ted_key], tedit0, conv_tabl,esi
|
||||
jmp still
|
||||
|
||||
align 4
|
||||
edit_replace edit_box TED_PANEL_WIDTH-1, 0, 20, 0xffffff, 0xff80, 0xff0000, 0xff, 0x4080, 300, buf_replace, mouse_dd, 0
|
||||
edit_find edit_box TED_PANEL_WIDTH-1, 0, 20, 0xffffff, 0xff80, 0xff0000, 0xff, 0x4080, 300, buf_find, mouse_dd, 0
|
||||
edit_goto edit_box TED_PANEL_WIDTH-1, 0, 20, 0xffffff, 0xff80, 0xff0000, 0xff, 0x4080, 10, buf_goto, mouse_dd, 0
|
||||
|
||||
unpac_mem dd 0
|
||||
|
||||
;library structures
|
||||
l_libs_start:
|
||||
lib0 l_libs lib_name_0, file_name, system_dir_0, import_box_lib
|
||||
lib1 l_libs lib_name_1, file_name, system_dir_1, import_msgbox_lib
|
||||
lib2 l_libs lib_name_2, file_name, system_dir_2, import_proclib
|
||||
lib3 l_libs lib_name_3, file_name, system_dir_3, import_libimg
|
||||
lib4 l_libs lib_name_4, file_name, system_dir_4, import_libini
|
||||
lib5 l_libs lib_name_5, file_name, system_dir_5, import_libkmenu
|
||||
load_lib_end:
|
||||
|
||||
IncludeIGlobals
|
||||
hed db 'TextEdit '
|
||||
i_end:
|
||||
openfile_path: ;полный путь к файлу с которым идет работа
|
||||
rb 4096
|
||||
dir_mem rb 32+304*count_of_dir_list_files
|
||||
wnd_s_pos: ;место для настроек стартовой позиции окна
|
||||
rq 1
|
||||
last_open_synt_file rb 32 ;имя последнего подключенного файла синтаксиса
|
||||
buf rb BUF_SIZE ;буфер для копирования и вставки
|
||||
buf_find rb 302 ;буфер для поиска текста
|
||||
buf_replace rb 302 ;буфер для замены текста
|
||||
buf_goto rb 12 ;буфер для перхода на строку
|
||||
sc system_colors
|
||||
IncludeUGlobals
|
||||
align 16
|
||||
procinfo process_information
|
||||
rb 1024
|
||||
thread:
|
||||
rb 4096
|
||||
align 16
|
||||
thread_coords:
|
||||
rb 4096
|
||||
align 16
|
||||
stacktop:
|
||||
sys_path: ;путь откуда запустился исполняемый файл
|
||||
rb 4096
|
||||
file_name: ;параметры запуска
|
||||
rb 4096
|
||||
syntax_path: ;имя подключаемого файла синтаксиса
|
||||
rb 4096
|
||||
plugin_path:
|
||||
rb 4096
|
||||
text_work_area: ;путь к файлу, который показывается в окне
|
||||
rb 4096
|
||||
filename_area: ;имя файла для диалога открытия/закрытия
|
||||
rb 256
|
||||
file_info:
|
||||
rb 40
|
||||
mem:
|
||||
; SPDX-License-Identifier: NOASSERTION
|
||||
;
|
||||
|
||||
; Text encoded with Code Page 866 - Cyrillic
|
||||
|
||||
|
||||
;Огромная благодарность всем, кто помогал: кодом/советом/дизайном ...
|
||||
|
||||
use32
|
||||
org 0
|
||||
db 'MENUET01' ;идентиф. исполняемого файла всегда 8 байт
|
||||
dd 1, start, i_end, mem, stacktop, file_name, sys_path
|
||||
|
||||
MAX_COLOR_WORD_LEN equ 40
|
||||
maxChars equ 100002 ;(колличество символов в новом документе + 2)
|
||||
BUF_SIZE equ 4096 ;buffer for copy|paste
|
||||
maxSyntaxFileSize equ 410000
|
||||
TOOLBAR_ICONS_SIZE equ 1200*21
|
||||
|
||||
include '../../proc32.inc'
|
||||
include '../../macros.inc'
|
||||
include '../../KOSfuncs.inc'
|
||||
include '../../load_img.inc'
|
||||
include '../../load_lib.mac'
|
||||
include '../../develop/libraries/box_lib/trunk/box_lib.mac'
|
||||
include '../../system/skincfg/kglobals.inc'
|
||||
include '../../system/skincfg/unpacker.inc'
|
||||
include 'lang.inc'
|
||||
|
||||
include 't_data.inc'
|
||||
include 't_button.inc'
|
||||
include 't_menu.inc'
|
||||
include 'strlen.inc'
|
||||
include 't_draw.inc' ;draw main window functions
|
||||
include 'wnd_k_words.inc'
|
||||
|
||||
@use_library mem.Alloc,mem.Free,mem.ReAlloc,dll.Load
|
||||
|
||||
align 4
|
||||
icon_tl_sys dd 0 ;указатель на память для хранения системных иконок
|
||||
run_file_70 FileInfoBlock
|
||||
|
||||
align 4
|
||||
start:
|
||||
mcall SF_STYLE_SETTINGS,SSF_GET_COLORS,sc,sizeof.system_colors
|
||||
|
||||
mcall SF_SYS_MISC,SSF_HEAP_INIT
|
||||
or eax,eax
|
||||
jnz @f
|
||||
call ted_Exit
|
||||
@@:
|
||||
|
||||
mcall SF_KEYBOARD,SSF_SET_INPUT_MODE,1 ;scan code
|
||||
mcall SF_SET_EVENTS_MASK,0xC0000027
|
||||
|
||||
mov esi,file_name
|
||||
stdcall str_len,esi
|
||||
mov ecx,eax
|
||||
mov edi,openfile_path
|
||||
cld
|
||||
rep movsb ;копируем имя файла в буфер openfile_path
|
||||
|
||||
load_libraries l_libs_start,load_lib_end
|
||||
|
||||
;проверка на сколько удачно загузились библиотеки
|
||||
mov ebp,lib0
|
||||
.test_lib_open:
|
||||
cmp dword [ebp+ll_struc_size-4],0
|
||||
jz @f
|
||||
mcall SF_TERMINATE_PROCESS ;exit not correct
|
||||
@@:
|
||||
add ebp,ll_struc_size
|
||||
cmp ebp,load_lib_end
|
||||
jl .test_lib_open
|
||||
|
||||
;---------------------------------------------------------------------
|
||||
stdcall [ted_init], tedit0
|
||||
stdcall [tl_data_init], tree1
|
||||
option_boxes_set_sys_color sc,opt_grlist1
|
||||
init_checkboxes2 check_boxes,check_boxes_end
|
||||
check_boxes_set_sys_color2 check_boxes,check_boxes_end,sc
|
||||
|
||||
; OpenDialog initialisation
|
||||
stdcall [OpenDialog_Init],OpenDialog_data
|
||||
|
||||
; kmenu initialisation
|
||||
call tedit_menu_init
|
||||
|
||||
; init toolbar file
|
||||
include_image_file 'te_icon.png', bmp_icon,,,6 ;6 для серых кнопок
|
||||
mov eax,[bmp_icon]
|
||||
add eax,TOOLBAR_ICONS_SIZE
|
||||
stdcall img_to_gray, [bmp_icon],eax,(TOOLBAR_ICONS_SIZE)/3
|
||||
;---------------------------------------------------------------------
|
||||
; внедряем файл с курсорами и линиями
|
||||
include_image_file '..\..\media\log_el\trunk\tl_sys_16.png', icon_tl_sys
|
||||
mov eax,dword[icon_tl_sys]
|
||||
mov dword[tree1.data_img_sys],eax
|
||||
; внедряем файл с иконками узлов
|
||||
include_image_file 'tl_nod_16.png', icon_tl_sys
|
||||
mov eax,dword[icon_tl_sys]
|
||||
mov dword[tree1.data_img],eax
|
||||
;------------------------------------------------------------------------------
|
||||
copy_path fn_syntax_dir,sys_path,file_name,0 ;берем путь к папке с файлами синтаксиса
|
||||
xor eax,eax
|
||||
mov ecx,4096
|
||||
mov edi,file_name
|
||||
repnz scasb
|
||||
mov byte[edi-2],al ;убираем '/' в конце имени папки (нужно для чтения с CD)
|
||||
mcall SF_FILE,tree_file_struct
|
||||
|
||||
or ebx,ebx
|
||||
jz .end_dir_init
|
||||
mov eax,dir_mem+32+40
|
||||
mov ecx,ebx
|
||||
@@:
|
||||
cmp byte[eax],'.' ;фильтруем файлы с именами '.' и '..'
|
||||
je .filter
|
||||
;0x10000 ;1*2^16 - где 1 номер иконки с книгой
|
||||
stdcall [tl_node_add], tree1,0x10000,eax
|
||||
stdcall [tl_cur_next], tree1
|
||||
.filter:
|
||||
add eax,304
|
||||
loop @b
|
||||
stdcall [tl_cur_beg],tree1 ;ставим курсор на начало списка
|
||||
or dword[tree1.style], tl_cursor_pos_limited ;ограничиваем движение курсора в пределах списка
|
||||
.end_dir_init:
|
||||
|
||||
;--- load ini file ---
|
||||
copy_path ini_name,sys_path,file_name,0
|
||||
;window startup pozition
|
||||
stdcall [ini_get_int],file_name,ini_sec_window,key_window_l,ini_def_window_l
|
||||
mov word[wnd_s_pos+2],ax
|
||||
stdcall [ini_get_int],file_name,ini_sec_window,key_window_w,ini_def_window_w
|
||||
mov word[wnd_s_pos],ax
|
||||
stdcall [ini_get_int],file_name,ini_sec_window,key_window_t,ini_def_window_t
|
||||
mov word[wnd_s_pos+6],ax
|
||||
stdcall [ini_get_int],file_name,ini_sec_window,key_window_h,ini_def_window_h
|
||||
mov word[wnd_s_pos+4],ax
|
||||
;scrool type
|
||||
stdcall [ini_get_int],file_name,ini_sec_window,key_scroll_type,ini_def_scroll_type
|
||||
mov [wScr.type],eax
|
||||
mov [hScr.type],eax
|
||||
mov [ws_dir_lbox.type],eax
|
||||
mov [w_scr_t3.type],eax
|
||||
;symbol size
|
||||
stdcall [ini_get_int],file_name,ini_sec_window,key_symbol_w,ini_def_symbol_w
|
||||
mov dword[tedit0.rec.width],eax
|
||||
stdcall [ini_get_int],file_name,ini_sec_window,key_symbol_h,ini_def_symbol_h
|
||||
mov dword[tedit0.rec.height],eax
|
||||
;lea eax,[eax+eax*2]
|
||||
;mov dword[tedit0.rec.top],eax
|
||||
;font size
|
||||
stdcall [ini_get_int],file_name,ini_sec_window,key_font_s,ini_def_font_s
|
||||
shl eax,24
|
||||
mov dword[tedit0.font_size],eax
|
||||
;кнопки на панели
|
||||
ini_panel key_but_new, ID_BUT_NEW
|
||||
ini_panel key_but_open, ID_BUT_OPEN
|
||||
ini_panel key_but_save, ID_BUT_SAVE
|
||||
ini_panel key_but_save_as,ID_BUT_SAVE_AS
|
||||
ini_panel key_but_select, ID_BUT_SELECT
|
||||
ini_panel key_but_cut, ID_BUT_CUT
|
||||
ini_panel key_but_copy, ID_BUT_COPY
|
||||
ini_panel key_but_paste, ID_BUT_PASTE
|
||||
ini_panel key_but_find, ID_BUT_FIND
|
||||
ini_panel key_but_replace,ID_BUT_REPLACE
|
||||
ini_panel key_but_key_words,ID_BUT_KEY_WORDS
|
||||
ini_panel key_but_upper, ID_BUT_UPPER
|
||||
ini_panel key_but_lower, ID_BUT_LOWER
|
||||
ini_panel key_but_reverse,ID_BUT_REVERSE
|
||||
ini_panel key_but_undo, ID_BUT_UNDO
|
||||
ini_panel key_but_redo, ID_BUT_REDO
|
||||
ini_panel key_but_invisible,ID_BUT_INVISIBLE
|
||||
ini_panel key_but_syntax_list,ID_BUT_SYNTAX_LIST
|
||||
ini_panel key_but_syntax_mode,ID_BUT_SYNTAX_MODE
|
||||
ini_panel key_but_convert_1251_866,ID_BUT_CONVERT_1251_866
|
||||
ini_panel key_but_convert_866_1251,ID_BUT_CONVERT_866_1251
|
||||
;файловые расширения
|
||||
xor edx,edx
|
||||
mov ebx,synt_auto_open
|
||||
@@:
|
||||
;берем имя файла
|
||||
stdcall [ini_get_str],file_name,ini_sec_options,key_synt_file,ebx,32,ini_def_synt_f
|
||||
cmp byte[ebx],0
|
||||
je @f
|
||||
inc byte[key_synt_file.numb]
|
||||
add ebx,32
|
||||
;берем расширения
|
||||
stdcall [ini_get_str],file_name,ini_sec_options,key_synt_ext,ebx,32,ini_def_synt_f
|
||||
inc byte[key_synt_ext.numb]
|
||||
add ebx,32
|
||||
inc edx
|
||||
cmp edx,max_synt_auto_open
|
||||
jl @b
|
||||
@@:
|
||||
|
||||
;--- load color option file ---
|
||||
stdcall open_unpac_synt_file,[fn_col_option]
|
||||
|
||||
;--- get cmd line ---
|
||||
cmp byte[openfile_path+3],0 ;openfile_path
|
||||
je @f ;if file names exist
|
||||
mov esi,openfile_path
|
||||
stdcall auto_open_syntax,esi
|
||||
call but_no_msg_OpenFile
|
||||
@@:
|
||||
|
||||
|
||||
|
||||
align 16
|
||||
red_win:
|
||||
call draw_window
|
||||
|
||||
align 16
|
||||
still:
|
||||
mcall SF_WAIT_EVENT
|
||||
cmp dword[exit_code],1
|
||||
jne @f
|
||||
call ted_Exit
|
||||
jmp still
|
||||
@@:
|
||||
|
||||
cmp al,1 ;изменилось положение окна
|
||||
jz red_win
|
||||
cmp al,2
|
||||
jz key
|
||||
cmp al,3
|
||||
jz button
|
||||
cmp al,6 ;мышь
|
||||
jne @f
|
||||
call mouse
|
||||
@@:
|
||||
jmp still
|
||||
|
||||
align 16
|
||||
mouse:
|
||||
stdcall [kmainmenu_dispatch_cursorevent], [main_menu]
|
||||
|
||||
mcall SF_MOUSE_GET,SSF_WINDOW_POSITION
|
||||
cmp word[tedit0.wnd.top],ax
|
||||
jg .no_edit
|
||||
shr eax,16
|
||||
cmp word[tedit0.wnd.left],ax
|
||||
jg .no_edit
|
||||
mcall SF_MOUSE_GET,SSF_BUTTON_EXT
|
||||
bt eax,24 ;двойной щелчёк левой кнопкой
|
||||
jnc @f
|
||||
stdcall [ted_but_select_word], tedit0
|
||||
ret
|
||||
@@:
|
||||
stdcall [ted_mouse], tedit0
|
||||
.no_edit:
|
||||
|
||||
;проверка боковых панелей
|
||||
cmp byte[tedit0.panel_id],TED_PANEL_FIND
|
||||
jne @f
|
||||
stdcall [edit_box_mouse], edit_find
|
||||
stdcall [option_box_mouse], opt_grlist1
|
||||
stdcall [check_box_mouse], ch1
|
||||
@@:
|
||||
cmp byte[tedit0.panel_id],TED_PANEL_REPLACE
|
||||
jne @f
|
||||
stdcall [edit_box_mouse], edit_find
|
||||
stdcall [edit_box_mouse], edit_replace
|
||||
stdcall [option_box_mouse], opt_grlist1
|
||||
@@:
|
||||
cmp byte[tedit0.panel_id],TED_PANEL_SYNTAX
|
||||
jne @f
|
||||
stdcall [tl_mouse], tree1
|
||||
@@:
|
||||
cmp byte[tedit0.panel_id],TED_PANEL_GOTO
|
||||
jne @f
|
||||
stdcall [edit_box_mouse], edit_goto
|
||||
@@:
|
||||
ret
|
||||
;---------------------------------------------------------------------
|
||||
|
||||
;output:
|
||||
; ah = symbol
|
||||
align 16
|
||||
proc KeyConvertToASCII uses ebx, table:dword
|
||||
mov ebx,dword[table] ;convert scan to ascii
|
||||
shr ax,8
|
||||
add bx,ax
|
||||
mov ah,byte[ebx]
|
||||
ret
|
||||
endp
|
||||
|
||||
align 16
|
||||
key:
|
||||
mcall SF_KEYBOARD,SSF_GET_CONTROL_KEYS ;66.3 получить состояние управляющих клавиш
|
||||
xor esi,esi
|
||||
mov ecx,1
|
||||
test al,3 ;[Shift]
|
||||
jz @f
|
||||
mov cl,2
|
||||
or esi,KM_SHIFT
|
||||
@@:
|
||||
test al,0x0c ;[Ctrl]
|
||||
jz @f
|
||||
or esi,KM_CTRL
|
||||
@@:
|
||||
test al,0x30 ;[Alt]
|
||||
jz @f
|
||||
mov cl,3
|
||||
or esi,KM_ALT
|
||||
@@:
|
||||
test al,0x80 ;[NumLock]
|
||||
jz @f
|
||||
or esi,KM_NUMLOCK
|
||||
@@:
|
||||
|
||||
mcall SF_SYSTEM_GET,SSF_KEYBOARD_LAYOUT,,conv_tabl ;26.2 получить раскладку клавиатуры
|
||||
mcall SF_GET_KEY
|
||||
stdcall [tl_key], tree1
|
||||
|
||||
test word[edit_replace.flags],ed_focus ;если не в фокусе, выходим
|
||||
je @f
|
||||
cmp ah,0x80 ;if key up
|
||||
ja still
|
||||
cmp ah,42 ;[Shift] (left)
|
||||
je still
|
||||
cmp ah,54 ;[Shift] (right)
|
||||
je still
|
||||
cmp ah,56 ;[Alt]
|
||||
je still
|
||||
cmp ah,29 ;[Ctrl]
|
||||
je still
|
||||
cmp ah,69 ;[Pause Break]
|
||||
je still
|
||||
|
||||
stdcall KeyConvertToASCII, conv_tabl
|
||||
stdcall [edit_box_key], edit_replace
|
||||
jmp still
|
||||
@@:
|
||||
test word[edit_find.flags],ed_focus ;если не в фокусе, выходим
|
||||
je @f
|
||||
cmp ah,0x80 ;if key up
|
||||
ja still
|
||||
cmp ah,42 ;[Shift] (left)
|
||||
je still
|
||||
cmp ah,54 ;[Shift] (right)
|
||||
je still
|
||||
cmp ah,56 ;[Alt]
|
||||
je still
|
||||
cmp ah,29 ;[Ctrl]
|
||||
je still
|
||||
cmp ah,69 ;[Pause Break]
|
||||
je still
|
||||
|
||||
stdcall KeyConvertToASCII, conv_tabl
|
||||
stdcall [edit_box_key], edit_find
|
||||
jmp still
|
||||
@@:
|
||||
test word[edit_goto.flags],ed_focus ;если не в фокусе, выходим
|
||||
je @f
|
||||
cmp ah,0x80 ;if key up
|
||||
ja still
|
||||
cmp ah,42 ;[Shift] (left)
|
||||
je still
|
||||
cmp ah,54 ;[Shift] (right)
|
||||
je still
|
||||
cmp ah,56 ;[Alt]
|
||||
je still
|
||||
cmp ah,29 ;[Ctrl]
|
||||
je still
|
||||
cmp ah,69 ;[Pause Break]
|
||||
je still
|
||||
|
||||
stdcall KeyConvertToASCII, conv_tabl
|
||||
stdcall [edit_box_key], edit_goto
|
||||
jmp still
|
||||
@@:
|
||||
|
||||
stdcall [ted_key], tedit0, conv_tabl,esi
|
||||
jmp still
|
||||
|
||||
align 4
|
||||
edit_replace edit_box TED_PANEL_WIDTH-1, 0, 20, 0xffffff, 0xff80, 0xff0000, 0xff, 0x4080, 300, buf_replace, mouse_dd, 0
|
||||
edit_find edit_box TED_PANEL_WIDTH-1, 0, 20, 0xffffff, 0xff80, 0xff0000, 0xff, 0x4080, 300, buf_find, mouse_dd, 0
|
||||
edit_goto edit_box TED_PANEL_WIDTH-1, 0, 20, 0xffffff, 0xff80, 0xff0000, 0xff, 0x4080, 10, buf_goto, mouse_dd, 0
|
||||
|
||||
unpac_mem dd 0
|
||||
|
||||
;library structures
|
||||
l_libs_start:
|
||||
lib0 l_libs lib_name_0, file_name, system_dir_0, import_box_lib
|
||||
lib1 l_libs lib_name_1, file_name, system_dir_1, import_msgbox_lib
|
||||
lib2 l_libs lib_name_2, file_name, system_dir_2, import_proclib
|
||||
lib3 l_libs lib_name_3, file_name, system_dir_3, import_libimg
|
||||
lib4 l_libs lib_name_4, file_name, system_dir_4, import_libini
|
||||
lib5 l_libs lib_name_5, file_name, system_dir_5, import_libkmenu
|
||||
load_lib_end:
|
||||
|
||||
IncludeIGlobals
|
||||
hed db 'TextEdit '
|
||||
i_end:
|
||||
openfile_path: ;полный путь к файлу с которым идет работа
|
||||
rb 4096
|
||||
dir_mem rb 32+304*count_of_dir_list_files
|
||||
wnd_s_pos: ;место для настроек стартовой позиции окна
|
||||
rq 1
|
||||
last_open_synt_file rb 32 ;имя последнего подключенного файла синтаксиса
|
||||
buf rb BUF_SIZE ;буфер для копирования и вставки
|
||||
buf_find rb 302 ;буфер для поиска текста
|
||||
buf_replace rb 302 ;буфер для замены текста
|
||||
buf_goto rb 12 ;буфер для перхода на строку
|
||||
sc system_colors
|
||||
IncludeUGlobals
|
||||
align 16
|
||||
procinfo process_information
|
||||
rb 1024
|
||||
thread:
|
||||
rb 4096
|
||||
align 16
|
||||
thread_coords:
|
||||
rb 4096
|
||||
align 16
|
||||
stacktop:
|
||||
sys_path: ;путь откуда запустился исполняемый файл
|
||||
rb 4096
|
||||
file_name: ;параметры запуска
|
||||
rb 4096
|
||||
syntax_path: ;имя подключаемого файла синтаксиса
|
||||
rb 4096
|
||||
plugin_path:
|
||||
rb 4096
|
||||
text_work_area: ;путь к файлу, который показывается в окне
|
||||
rb 4096
|
||||
filename_area: ;имя файла для диалога открытия/закрытия
|
||||
rb 256
|
||||
file_info:
|
||||
rb 40
|
||||
mem:
|
||||
@@ -1,389 +1,394 @@
|
||||
use32
|
||||
org 0
|
||||
db 'MENUET01' ;идентиф. исполняемого файла всегда 8 байт
|
||||
dd 1, start, i_end, mem, stacktop, file_name, sys_path
|
||||
|
||||
MAX_COLOR_WORD_LEN equ 40
|
||||
BUF_SIZE equ 4096 ;buffer for copy|paste
|
||||
CAPT_PATH_WIDTH equ 50 ;ширина подписи перед текстовым полем
|
||||
|
||||
include '../../macros.inc'
|
||||
include '../../proc32.inc'
|
||||
include '../../KOSfuncs.inc'
|
||||
include '../../load_img.inc'
|
||||
include '../../load_lib.mac'
|
||||
include '../../develop/libraries/box_lib/trunk/box_lib.mac'
|
||||
include '../../system/skincfg/trunk/kglobals.inc'
|
||||
include '../../system/skincfg/trunk/unpacker.inc'
|
||||
include 'te_data.inc'
|
||||
include 'te_work.inc' ;text work functions
|
||||
|
||||
@use_library mem.Alloc,mem.Free,mem.ReAlloc,dll.Load
|
||||
|
||||
icon_tl_sys dd 0 ;указатель на память для хранения системных иконок
|
||||
|
||||
align 4
|
||||
start:
|
||||
mcall SF_STYLE_SETTINGS,SSF_GET_COLORS,sc,sizeof.system_colors
|
||||
|
||||
mcall SF_SYS_MISC,SSF_HEAP_INIT
|
||||
or eax,eax
|
||||
jz button.exit
|
||||
|
||||
mcall SF_KEYBOARD,SSF_SET_INPUT_MODE,1 ;scan code
|
||||
mcall SF_SET_EVENTS_MASK,0xC0000027
|
||||
|
||||
load_libraries l_libs_start,load_lib_end
|
||||
|
||||
;проверка на сколько удачно загузилась библиотека
|
||||
cmp dword[lib0+ll_struc_size-4],0
|
||||
jz @f
|
||||
mcall -1 ;exit not correct
|
||||
@@:
|
||||
|
||||
;---------------------------------------------------------------------
|
||||
stdcall [tl_data_init], tree1
|
||||
|
||||
; читаем файл с курсорами и линиями
|
||||
include_image_file '..\..\media\log_el\trunk\tl_sys_16.png', icon_tl_sys
|
||||
mov eax,[icon_tl_sys]
|
||||
mov [tree1.data_img_sys],eax
|
||||
;---------------------------------------------------------------------
|
||||
; читаем bmp файл с иконками узлов
|
||||
include_image_file '..\t_edit\tl_nod_16.png', icon_tl_sys
|
||||
mov eax,[icon_tl_sys]
|
||||
mov [tree1.data_img],eax
|
||||
;------------------------------------------------------------------------------
|
||||
copy_path fn_syntax_dir,sys_path,file_name,0 ;берем путь к папке с файлами синтаксиса
|
||||
mcall SF_FILE,tree_file_struct
|
||||
|
||||
cmp ebx,2
|
||||
jg @f
|
||||
notify_window_run file_name ;сообщение если не удалось открыть файлы
|
||||
jmp .end_dir_init
|
||||
@@:
|
||||
;cmp ebx,0
|
||||
;jle .end_dir_init
|
||||
mov eax,dir_mem+32+40
|
||||
mov ecx,ebx
|
||||
@@:
|
||||
cmp byte[eax],'.' ;фильтруем файлы с именами '.' и '..'
|
||||
je .filter
|
||||
stdcall [tl_node_add],tree1,0x10000,eax ;1*2^16 - где 1 номер иконки с книгой
|
||||
stdcall [tl_cur_next],tree1
|
||||
.filter:
|
||||
add eax,304
|
||||
loop @b
|
||||
stdcall [tl_cur_beg],tree1 ;ставим курсор на начало списка
|
||||
or dword[tree1.style], tl_cursor_pos_limited ;ограничиваем движение курсора в пределах списка
|
||||
.end_dir_init:
|
||||
|
||||
xor eax,eax
|
||||
inc eax
|
||||
mov [scrol_w1.type],eax
|
||||
mov [scrol_h1.type],eax
|
||||
mov [ws_dir_lbox.type],eax
|
||||
|
||||
;--- load color option file ---
|
||||
stdcall [ted_init], tedit0
|
||||
mov byte[file_name],0
|
||||
|
||||
align 4
|
||||
red_win:
|
||||
call draw_window
|
||||
|
||||
align 4
|
||||
still:
|
||||
mcall SF_WAIT_EVENT
|
||||
|
||||
cmp al,1 ;изм. положение окна
|
||||
jz red_win
|
||||
cmp al,2
|
||||
jz key
|
||||
cmp al,3
|
||||
jz button
|
||||
cmp al,6
|
||||
jz mouse
|
||||
|
||||
jmp still
|
||||
|
||||
|
||||
align 4
|
||||
draw_window:
|
||||
pushad
|
||||
mcall SF_REDRAW,SSF_BEGIN_DRAW
|
||||
|
||||
mov edx,[sc.work]
|
||||
or edx,0x33000000
|
||||
mov edi,hed
|
||||
mcall SF_CREATE_WINDOW,<10,555>,<10,333>
|
||||
|
||||
mcall SF_THREAD_INFO,procinfo,-1
|
||||
mov edi,tedit0 ;значение edi нужно для EvSize и ted_wnd_t
|
||||
call EvSize
|
||||
|
||||
mov esi,[sc.work_button];0xd0
|
||||
mcall SF_DEFINE_BUTTON,5*65536+90,195*65536+20,200
|
||||
|
||||
mov ebx,100*65536+85
|
||||
mov ecx,195*65536+20
|
||||
mov edx,201
|
||||
mov esi,0xd00000
|
||||
mcall
|
||||
|
||||
mov ecx,[sc.work_button_text]
|
||||
or ecx,0x80000000
|
||||
mcall SF_DRAW_TEXT,10*65536+200,,txt_load_f
|
||||
|
||||
mov ecx,0xffff00
|
||||
or ecx,0x80000000
|
||||
mcall ,105*65536+200,,txt_save_f
|
||||
|
||||
mov ecx,[sc.work_text]
|
||||
or ecx,0x80000000
|
||||
mcall ,195*65536+10,,txt_inp_file
|
||||
|
||||
add ebx,20
|
||||
mov edx,txt_out_file
|
||||
int 0x40
|
||||
|
||||
stdcall [PathShow_draw], PathShow_data_1
|
||||
|
||||
stdcall [edit_box_draw], edit1
|
||||
stdcall [tl_draw], tree1
|
||||
|
||||
;scroll 1
|
||||
mov [ws_dir_lbox.all_redraw],1
|
||||
stdcall [scrollbar_ver_draw],ws_dir_lbox
|
||||
stdcall [ted_draw], tedit0
|
||||
|
||||
mcall SF_REDRAW,SSF_END_DRAW
|
||||
popad
|
||||
ret
|
||||
|
||||
MIN_M_WND_H equ 100 ;минимальная высота главного окна
|
||||
;input:
|
||||
; edi = pointer to tedit struct
|
||||
align 4
|
||||
EvSize:
|
||||
pushad
|
||||
mov ebx,ted_scr_h
|
||||
mov esi,ted_scr_w
|
||||
|
||||
m2m ted_wnd_w,[procinfo.client_box.width] ;ставим ширину окна редактора равной ширине всего окна
|
||||
mov eax,ted_wnd_l
|
||||
sub ted_wnd_w,eax ;отнимаем отступ слева
|
||||
movzx eax,word[esi+sb_offs_size_x]
|
||||
sub ted_wnd_w,eax ;отнимаем ширину верт. скроллинга
|
||||
|
||||
m2m ted_wnd_h,[procinfo.client_box.height] ;ставим высоту окна редактора равной высоте всего окна
|
||||
cmp ted_wnd_h,MIN_M_WND_H
|
||||
jg @f
|
||||
mov ted_wnd_h,MIN_M_WND_H
|
||||
@@:
|
||||
|
||||
movzx eax,word[ebx+sb_offs_size_y]
|
||||
sub ted_wnd_h,eax ;отнимаем высоту гориз. скроллинга
|
||||
mov eax,ted_wnd_t
|
||||
sub ted_wnd_h,eax ;отнимаем отступ сверху
|
||||
|
||||
stdcall [ted_init_scroll_bars], tedit0,2
|
||||
popad
|
||||
ret
|
||||
|
||||
align 4
|
||||
mouse:
|
||||
stdcall [tl_mouse],tree1
|
||||
stdcall [edit_box_mouse],edit1
|
||||
stdcall [ted_mouse], tedit0
|
||||
jmp still
|
||||
|
||||
;output:
|
||||
; ah = symbol
|
||||
align 4
|
||||
proc KeyConvertToASCII, table:dword
|
||||
push ebx
|
||||
mov ebx,dword[table] ;convert scan to ascii
|
||||
shr ax,8
|
||||
add bx,ax
|
||||
mov ah,byte[ebx]
|
||||
pop ebx
|
||||
ret
|
||||
endp
|
||||
|
||||
align 4
|
||||
key:
|
||||
mcall SF_KEYBOARD,SSF_GET_CONTROL_KEYS ;66.3 получить состояние управляющих клавиш
|
||||
xor esi,esi
|
||||
mov ecx,1
|
||||
test al,3 ;[Shift]
|
||||
jz @f
|
||||
mov cl,2
|
||||
or esi,KM_SHIFT
|
||||
@@:
|
||||
test al,0x0c ;[Ctrl]
|
||||
jz @f
|
||||
or esi,KM_CTRL
|
||||
@@:
|
||||
test al,0x30 ;[Alt]
|
||||
jz @f
|
||||
mov cl,3
|
||||
or esi,KM_ALT
|
||||
@@:
|
||||
test al,0x80 ;[NumLock]
|
||||
jz @f
|
||||
or esi,KM_NUMLOCK
|
||||
@@:
|
||||
|
||||
mcall SF_SYSTEM_GET,SSF_KEYBOARD_LAYOUT,,conv_tabl ;26.2 получить раскладку клавиатуры
|
||||
mcall SF_GET_KEY
|
||||
stdcall [tl_key],tree1
|
||||
|
||||
test word [edit1.flags],10b;ed_focus ; если не в фокусе, выходим
|
||||
je @f
|
||||
cmp ah,0x80 ;if key up
|
||||
ja still
|
||||
cmp ah,42 ;[Shift] (left)
|
||||
je still
|
||||
cmp ah,54 ;[Shift] (right)
|
||||
je still
|
||||
cmp ah,56 ;[Alt]
|
||||
je still
|
||||
cmp ah,29 ;[Ctrl]
|
||||
je still
|
||||
cmp ah,69 ;[Pause Break]
|
||||
je still
|
||||
|
||||
stdcall KeyConvertToASCII, conv_tabl
|
||||
stdcall [edit_box_key],edit1
|
||||
jmp still
|
||||
@@:
|
||||
|
||||
stdcall [ted_key], tedit0, conv_tabl,esi
|
||||
jmp still
|
||||
|
||||
align 4
|
||||
button:
|
||||
mcall SF_GET_BUTTON
|
||||
|
||||
cmp ah,200
|
||||
jne @f
|
||||
call but_OpenSyntax
|
||||
@@:
|
||||
cmp ah,201
|
||||
jne @f
|
||||
call but_SaveSyntax
|
||||
@@:
|
||||
|
||||
cmp ah,1
|
||||
jne still
|
||||
.exit:
|
||||
stdcall mem.Free,[options_file]
|
||||
stdcall mem.Free,[unpac_mem]
|
||||
|
||||
stdcall [tl_data_clear], tree1
|
||||
stdcall [ted_delete], tedit0
|
||||
mcall SF_TERMINATE_PROCESS ;выход из программы
|
||||
|
||||
align 4
|
||||
but_OpenSyntax:
|
||||
push eax
|
||||
stdcall [tl_node_get_data],tree1
|
||||
mov [fn_col_option],eax
|
||||
call InitColText
|
||||
pop eax
|
||||
ret
|
||||
|
||||
align 4
|
||||
but_SaveSyntax:
|
||||
stdcall [ted_save_file], tedit0,run_file_70,[edit1.text]
|
||||
ret
|
||||
|
||||
;description:
|
||||
; функция вызываемую при нажатии Ctrl+N,O,F,S,H,G
|
||||
align 4
|
||||
proc ted_but_ctrl_all uses eax, opt_key:dword
|
||||
mov eax,[opt_key]
|
||||
cmp al,'N' ;Ctrl+N
|
||||
jne @f
|
||||
call but_ctrl_n
|
||||
jmp .end0
|
||||
@@:
|
||||
cmp al,'O' ;Ctrl+O
|
||||
jne @f
|
||||
call but_ctrl_o
|
||||
@@:
|
||||
;cmp al,'S' ;Ctrl+S
|
||||
;cmp al,'F' ;Ctrl+F
|
||||
;cmp al,'G' ;Ctrl+G
|
||||
;cmp al,'H' ;Ctrl+H
|
||||
.end0:
|
||||
ret
|
||||
endp
|
||||
|
||||
align 4
|
||||
but_ctrl_o:
|
||||
push eax
|
||||
call get_wnd_in_focus
|
||||
or eax,eax
|
||||
jz @f
|
||||
stdcall [ted_open_file], eax,str_file_70,[edit1.text]
|
||||
@@:
|
||||
pop eax
|
||||
ret
|
||||
|
||||
;создание нового файла
|
||||
align 4
|
||||
but_ctrl_n:
|
||||
push eax
|
||||
call get_wnd_in_focus
|
||||
or eax,eax
|
||||
jz @f
|
||||
stdcall [ted_clear], eax,1
|
||||
stdcall [ted_draw], eax
|
||||
@@:
|
||||
pop eax
|
||||
ret
|
||||
|
||||
;определяем какое из окон редактора в фокусе
|
||||
align 4
|
||||
get_wnd_in_focus:
|
||||
xor eax,eax
|
||||
cmp dword[el_focus],tedit0
|
||||
jne @f
|
||||
mov eax,tedit0
|
||||
@@:
|
||||
;cmp dword[el_focus],tedit1
|
||||
;jne @f
|
||||
; mov eax,tedit1
|
||||
;@@:
|
||||
ret
|
||||
|
||||
hed db 'TextEditor syntax file converter 18.12.20',0 ;подпись окна
|
||||
conv_tabl rb 128 ; таблица для конвертирования scan-кода в ascii-код
|
||||
|
||||
txt_load_f db 'Загр. файл',0
|
||||
txt_save_f db 'Сохр. файл',0
|
||||
txt_inp_file db 'Исх. файл:',0
|
||||
txt_out_file db 'Вых. файл:',0
|
||||
|
||||
;library structures
|
||||
l_libs_start:
|
||||
lib0 l_libs lib_name_0, file_name, system_dir_0, import_box_lib
|
||||
lib1 l_libs lib_name_1, file_name, system_dir_1, import_libimg
|
||||
load_lib_end:
|
||||
|
||||
IncludeIGlobals
|
||||
|
||||
align 16
|
||||
i_end:
|
||||
IncludeUGlobals
|
||||
procinfo process_information
|
||||
rb 1024
|
||||
thread:
|
||||
rb 1024
|
||||
stacktop:
|
||||
sys_path rb 4096
|
||||
file_name rb 4096
|
||||
file_name_rez rb 4096
|
||||
mem:
|
||||
; SPDX-License-Identifier: NOASSERTION
|
||||
;
|
||||
|
||||
; Text encoded with Code Page 866 - Cyrillic
|
||||
|
||||
use32
|
||||
org 0
|
||||
db 'MENUET01' ;идентиф. исполняемого файла всегда 8 байт
|
||||
dd 1, start, i_end, mem, stacktop, file_name, sys_path
|
||||
|
||||
MAX_COLOR_WORD_LEN equ 40
|
||||
BUF_SIZE equ 4096 ;buffer for copy|paste
|
||||
CAPT_PATH_WIDTH equ 50 ;ширина подписи перед текстовым полем
|
||||
|
||||
include '../../macros.inc'
|
||||
include '../../proc32.inc'
|
||||
include '../../KOSfuncs.inc'
|
||||
include '../../load_img.inc'
|
||||
include '../../load_lib.mac'
|
||||
include '../../develop/libraries/box_lib/trunk/box_lib.mac'
|
||||
include '../../system/skincfg/kglobals.inc'
|
||||
include '../../system/skincfg/unpacker.inc'
|
||||
include 'te_data.inc'
|
||||
include 'te_work.inc' ;text work functions
|
||||
|
||||
@use_library mem.Alloc,mem.Free,mem.ReAlloc,dll.Load
|
||||
|
||||
icon_tl_sys dd 0 ;указатель на память для хранения системных иконок
|
||||
|
||||
align 4
|
||||
start:
|
||||
mcall SF_STYLE_SETTINGS,SSF_GET_COLORS,sc,sizeof.system_colors
|
||||
|
||||
mcall SF_SYS_MISC,SSF_HEAP_INIT
|
||||
or eax,eax
|
||||
jz button.exit
|
||||
|
||||
mcall SF_KEYBOARD,SSF_SET_INPUT_MODE,1 ;scan code
|
||||
mcall SF_SET_EVENTS_MASK,0xC0000027
|
||||
|
||||
load_libraries l_libs_start,load_lib_end
|
||||
|
||||
;проверка на сколько удачно загузилась библиотека
|
||||
cmp dword[lib0+ll_struc_size-4],0
|
||||
jz @f
|
||||
mcall -1 ;exit not correct
|
||||
@@:
|
||||
|
||||
;---------------------------------------------------------------------
|
||||
stdcall [tl_data_init], tree1
|
||||
|
||||
; читаем файл с курсорами и линиями
|
||||
include_image_file '..\..\media\log_el\trunk\tl_sys_16.png', icon_tl_sys
|
||||
mov eax,[icon_tl_sys]
|
||||
mov [tree1.data_img_sys],eax
|
||||
;---------------------------------------------------------------------
|
||||
; читаем bmp файл с иконками узлов
|
||||
include_image_file '..\t_edit\tl_nod_16.png', icon_tl_sys
|
||||
mov eax,[icon_tl_sys]
|
||||
mov [tree1.data_img],eax
|
||||
;------------------------------------------------------------------------------
|
||||
copy_path fn_syntax_dir,sys_path,file_name,0 ;берем путь к папке с файлами синтаксиса
|
||||
mcall SF_FILE,tree_file_struct
|
||||
|
||||
cmp ebx,2
|
||||
jg @f
|
||||
notify_window_run file_name ;сообщение если не удалось открыть файлы
|
||||
jmp .end_dir_init
|
||||
@@:
|
||||
;cmp ebx,0
|
||||
;jle .end_dir_init
|
||||
mov eax,dir_mem+32+40
|
||||
mov ecx,ebx
|
||||
@@:
|
||||
cmp byte[eax],'.' ;фильтруем файлы с именами '.' и '..'
|
||||
je .filter
|
||||
stdcall [tl_node_add],tree1,0x10000,eax ;1*2^16 - где 1 номер иконки с книгой
|
||||
stdcall [tl_cur_next],tree1
|
||||
.filter:
|
||||
add eax,304
|
||||
loop @b
|
||||
stdcall [tl_cur_beg],tree1 ;ставим курсор на начало списка
|
||||
or dword[tree1.style], tl_cursor_pos_limited ;ограничиваем движение курсора в пределах списка
|
||||
.end_dir_init:
|
||||
|
||||
xor eax,eax
|
||||
inc eax
|
||||
mov [scrol_w1.type],eax
|
||||
mov [scrol_h1.type],eax
|
||||
mov [ws_dir_lbox.type],eax
|
||||
|
||||
;--- load color option file ---
|
||||
stdcall [ted_init], tedit0
|
||||
mov byte[file_name],0
|
||||
|
||||
align 4
|
||||
red_win:
|
||||
call draw_window
|
||||
|
||||
align 4
|
||||
still:
|
||||
mcall SF_WAIT_EVENT
|
||||
|
||||
cmp al,1 ;изм. положение окна
|
||||
jz red_win
|
||||
cmp al,2
|
||||
jz key
|
||||
cmp al,3
|
||||
jz button
|
||||
cmp al,6
|
||||
jz mouse
|
||||
|
||||
jmp still
|
||||
|
||||
|
||||
align 4
|
||||
draw_window:
|
||||
pushad
|
||||
mcall SF_REDRAW,SSF_BEGIN_DRAW
|
||||
|
||||
mov edx,[sc.work]
|
||||
or edx,0x33000000
|
||||
mov edi,hed
|
||||
mcall SF_CREATE_WINDOW,<10,555>,<10,333>
|
||||
|
||||
mcall SF_THREAD_INFO,procinfo,-1
|
||||
mov edi,tedit0 ;значение edi нужно для EvSize и ted_wnd_t
|
||||
call EvSize
|
||||
|
||||
mov esi,[sc.work_button];0xd0
|
||||
mcall SF_DEFINE_BUTTON,5*65536+90,195*65536+20,200
|
||||
|
||||
mov ebx,100*65536+85
|
||||
mov ecx,195*65536+20
|
||||
mov edx,201
|
||||
mov esi,0xd00000
|
||||
mcall
|
||||
|
||||
mov ecx,[sc.work_button_text]
|
||||
or ecx,0x80000000
|
||||
mcall SF_DRAW_TEXT,10*65536+200,,txt_load_f
|
||||
|
||||
mov ecx,0xffff00
|
||||
or ecx,0x80000000
|
||||
mcall ,105*65536+200,,txt_save_f
|
||||
|
||||
mov ecx,[sc.work_text]
|
||||
or ecx,0x80000000
|
||||
mcall ,195*65536+10,,txt_inp_file
|
||||
|
||||
add ebx,20
|
||||
mov edx,txt_out_file
|
||||
int 0x40
|
||||
|
||||
stdcall [PathShow_draw], PathShow_data_1
|
||||
|
||||
stdcall [edit_box_draw], edit1
|
||||
stdcall [tl_draw], tree1
|
||||
|
||||
;scroll 1
|
||||
mov [ws_dir_lbox.all_redraw],1
|
||||
stdcall [scrollbar_ver_draw],ws_dir_lbox
|
||||
stdcall [ted_draw], tedit0
|
||||
|
||||
mcall SF_REDRAW,SSF_END_DRAW
|
||||
popad
|
||||
ret
|
||||
|
||||
MIN_M_WND_H equ 100 ;минимальная высота главного окна
|
||||
;input:
|
||||
; edi = pointer to tedit struct
|
||||
align 4
|
||||
EvSize:
|
||||
pushad
|
||||
mov ebx,ted_scr_h
|
||||
mov esi,ted_scr_w
|
||||
|
||||
m2m ted_wnd_w,[procinfo.client_box.width] ;ставим ширину окна редактора равной ширине всего окна
|
||||
mov eax,ted_wnd_l
|
||||
sub ted_wnd_w,eax ;отнимаем отступ слева
|
||||
movzx eax,word[esi+sb_offs_size_x]
|
||||
sub ted_wnd_w,eax ;отнимаем ширину верт. скроллинга
|
||||
|
||||
m2m ted_wnd_h,[procinfo.client_box.height] ;ставим высоту окна редактора равной высоте всего окна
|
||||
cmp ted_wnd_h,MIN_M_WND_H
|
||||
jg @f
|
||||
mov ted_wnd_h,MIN_M_WND_H
|
||||
@@:
|
||||
|
||||
movzx eax,word[ebx+sb_offs_size_y]
|
||||
sub ted_wnd_h,eax ;отнимаем высоту гориз. скроллинга
|
||||
mov eax,ted_wnd_t
|
||||
sub ted_wnd_h,eax ;отнимаем отступ сверху
|
||||
|
||||
stdcall [ted_init_scroll_bars], tedit0,2
|
||||
popad
|
||||
ret
|
||||
|
||||
align 4
|
||||
mouse:
|
||||
stdcall [tl_mouse],tree1
|
||||
stdcall [edit_box_mouse],edit1
|
||||
stdcall [ted_mouse], tedit0
|
||||
jmp still
|
||||
|
||||
;output:
|
||||
; ah = symbol
|
||||
align 4
|
||||
proc KeyConvertToASCII, table:dword
|
||||
push ebx
|
||||
mov ebx,dword[table] ;convert scan to ascii
|
||||
shr ax,8
|
||||
add bx,ax
|
||||
mov ah,byte[ebx]
|
||||
pop ebx
|
||||
ret
|
||||
endp
|
||||
|
||||
align 4
|
||||
key:
|
||||
mcall SF_KEYBOARD,SSF_GET_CONTROL_KEYS ;66.3 получить состояние управляющих клавиш
|
||||
xor esi,esi
|
||||
mov ecx,1
|
||||
test al,3 ;[Shift]
|
||||
jz @f
|
||||
mov cl,2
|
||||
or esi,KM_SHIFT
|
||||
@@:
|
||||
test al,0x0c ;[Ctrl]
|
||||
jz @f
|
||||
or esi,KM_CTRL
|
||||
@@:
|
||||
test al,0x30 ;[Alt]
|
||||
jz @f
|
||||
mov cl,3
|
||||
or esi,KM_ALT
|
||||
@@:
|
||||
test al,0x80 ;[NumLock]
|
||||
jz @f
|
||||
or esi,KM_NUMLOCK
|
||||
@@:
|
||||
|
||||
mcall SF_SYSTEM_GET,SSF_KEYBOARD_LAYOUT,,conv_tabl ;26.2 получить раскладку клавиатуры
|
||||
mcall SF_GET_KEY
|
||||
stdcall [tl_key],tree1
|
||||
|
||||
test word [edit1.flags],10b;ed_focus ; если не в фокусе, выходим
|
||||
je @f
|
||||
cmp ah,0x80 ;if key up
|
||||
ja still
|
||||
cmp ah,42 ;[Shift] (left)
|
||||
je still
|
||||
cmp ah,54 ;[Shift] (right)
|
||||
je still
|
||||
cmp ah,56 ;[Alt]
|
||||
je still
|
||||
cmp ah,29 ;[Ctrl]
|
||||
je still
|
||||
cmp ah,69 ;[Pause Break]
|
||||
je still
|
||||
|
||||
stdcall KeyConvertToASCII, conv_tabl
|
||||
stdcall [edit_box_key],edit1
|
||||
jmp still
|
||||
@@:
|
||||
|
||||
stdcall [ted_key], tedit0, conv_tabl,esi
|
||||
jmp still
|
||||
|
||||
align 4
|
||||
button:
|
||||
mcall SF_GET_BUTTON
|
||||
|
||||
cmp ah,200
|
||||
jne @f
|
||||
call but_OpenSyntax
|
||||
@@:
|
||||
cmp ah,201
|
||||
jne @f
|
||||
call but_SaveSyntax
|
||||
@@:
|
||||
|
||||
cmp ah,1
|
||||
jne still
|
||||
.exit:
|
||||
stdcall mem.Free,[options_file]
|
||||
stdcall mem.Free,[unpac_mem]
|
||||
|
||||
stdcall [tl_data_clear], tree1
|
||||
stdcall [ted_delete], tedit0
|
||||
mcall SF_TERMINATE_PROCESS ;выход из программы
|
||||
|
||||
align 4
|
||||
but_OpenSyntax:
|
||||
push eax
|
||||
stdcall [tl_node_get_data],tree1
|
||||
mov [fn_col_option],eax
|
||||
call InitColText
|
||||
pop eax
|
||||
ret
|
||||
|
||||
align 4
|
||||
but_SaveSyntax:
|
||||
stdcall [ted_save_file], tedit0,run_file_70,[edit1.text]
|
||||
ret
|
||||
|
||||
;description:
|
||||
; функция вызываемую при нажатии Ctrl+N,O,F,S,H,G
|
||||
align 4
|
||||
proc ted_but_ctrl_all uses eax, opt_key:dword
|
||||
mov eax,[opt_key]
|
||||
cmp al,'N' ;Ctrl+N
|
||||
jne @f
|
||||
call but_ctrl_n
|
||||
jmp .end0
|
||||
@@:
|
||||
cmp al,'O' ;Ctrl+O
|
||||
jne @f
|
||||
call but_ctrl_o
|
||||
@@:
|
||||
;cmp al,'S' ;Ctrl+S
|
||||
;cmp al,'F' ;Ctrl+F
|
||||
;cmp al,'G' ;Ctrl+G
|
||||
;cmp al,'H' ;Ctrl+H
|
||||
.end0:
|
||||
ret
|
||||
endp
|
||||
|
||||
align 4
|
||||
but_ctrl_o:
|
||||
push eax
|
||||
call get_wnd_in_focus
|
||||
or eax,eax
|
||||
jz @f
|
||||
stdcall [ted_open_file], eax,str_file_70,[edit1.text]
|
||||
@@:
|
||||
pop eax
|
||||
ret
|
||||
|
||||
;создание нового файла
|
||||
align 4
|
||||
but_ctrl_n:
|
||||
push eax
|
||||
call get_wnd_in_focus
|
||||
or eax,eax
|
||||
jz @f
|
||||
stdcall [ted_clear], eax,1
|
||||
stdcall [ted_draw], eax
|
||||
@@:
|
||||
pop eax
|
||||
ret
|
||||
|
||||
;определяем какое из окон редактора в фокусе
|
||||
align 4
|
||||
get_wnd_in_focus:
|
||||
xor eax,eax
|
||||
cmp dword[el_focus],tedit0
|
||||
jne @f
|
||||
mov eax,tedit0
|
||||
@@:
|
||||
;cmp dword[el_focus],tedit1
|
||||
;jne @f
|
||||
; mov eax,tedit1
|
||||
;@@:
|
||||
ret
|
||||
|
||||
hed db 'TextEditor syntax file converter 18.12.20',0 ;подпись окна
|
||||
conv_tabl rb 128 ; таблица для конвертирования scan-кода в ascii-код
|
||||
|
||||
txt_load_f db 'Загр. файл',0
|
||||
txt_save_f db 'Сохр. файл',0
|
||||
txt_inp_file db 'Исх. файл:',0
|
||||
txt_out_file db 'Вых. файл:',0
|
||||
|
||||
;library structures
|
||||
l_libs_start:
|
||||
lib0 l_libs lib_name_0, file_name, system_dir_0, import_box_lib
|
||||
lib1 l_libs lib_name_1, file_name, system_dir_1, import_libimg
|
||||
load_lib_end:
|
||||
|
||||
IncludeIGlobals
|
||||
|
||||
align 16
|
||||
i_end:
|
||||
IncludeUGlobals
|
||||
procinfo process_information
|
||||
rb 1024
|
||||
thread:
|
||||
rb 1024
|
||||
stacktop:
|
||||
sys_path rb 4096
|
||||
file_name rb 4096
|
||||
file_name_rez rb 4096
|
||||
mem:
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -1,3 +1,6 @@
|
||||
; SPDX-License-Identifier: NOASSERTION
|
||||
;
|
||||
|
||||
;
|
||||
; END
|
||||
;
|
||||
@@ -7,7 +10,7 @@
|
||||
;
|
||||
; 15.02.2007 merge old END with new one (fron Veliant & Leency) by Heavyiron
|
||||
|
||||
include "..\..\..\macros.inc"
|
||||
include "..\..\macros.inc"
|
||||
|
||||
meos_app_start
|
||||
code
|
||||
@@ -43,7 +46,7 @@ draw:
|
||||
xor edx, edx
|
||||
mcall
|
||||
|
||||
|
||||
|
||||
mov al,8
|
||||
mcall ,58 shl 16 + 32,59 shl 16 + 34, 1 shl 30 + 1
|
||||
inc edx
|
||||
@@ -55,7 +58,7 @@ draw:
|
||||
inc edx
|
||||
mcall ,144 shl 16 + 43
|
||||
|
||||
mov al,12 ;end of redraw
|
||||
mov al,12 ;end of redraw
|
||||
mov ebx,2
|
||||
mcall
|
||||
|
||||
File renamed without changes.
File renamed without changes.
@@ -1,3 +1,6 @@
|
||||
; SPDX-License-Identifier: NOASSERTION
|
||||
;
|
||||
|
||||
use32
|
||||
org 0x0
|
||||
|
||||
@@ -10,9 +13,9 @@ use32
|
||||
dd 0x0
|
||||
dd 0x0
|
||||
|
||||
include '../../../proc32.inc'
|
||||
include '../../../macros.inc'
|
||||
include '../../../dll.inc'
|
||||
include '../../proc32.inc'
|
||||
include '../../macros.inc'
|
||||
include '../../dll.inc'
|
||||
|
||||
|
||||
PATH_MAX equ 255
|
||||
@@ -56,7 +59,7 @@ STARTAPP:
|
||||
|
||||
;----------------------------------------------------------------
|
||||
; This is fix for files located at /kolibrios and /usbhd drives
|
||||
; It checks is the file exists for 5 times with perioud 1 second
|
||||
; It checks is the file exists for 5 times with period 1 second
|
||||
check_file_exists:
|
||||
mov edi, 0
|
||||
@@:
|
||||
@@ -1,5 +1,5 @@
|
||||
if tup.getconfig("NO_FASM") ~= "" then return end
|
||||
HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../../.." or tup.getconfig("HELPERDIR")
|
||||
HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../.." or tup.getconfig("HELPERDIR")
|
||||
tup.include(HELPERDIR .. "/use_fasm.lua")
|
||||
add_include(tup.getvariantdir())
|
||||
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -1,11 +1,16 @@
|
||||
; SPDX-License-Identifier: NOASSERTION
|
||||
;
|
||||
|
||||
; Text encoded with Code Page 866 - Cyrillic
|
||||
|
||||
window_h=85
|
||||
window_w=430
|
||||
;--- другие макросы ---
|
||||
include '../../../KOSfuncs.inc'
|
||||
include '../../../load_lib.mac'
|
||||
include '../../../develop/libraries/box_lib/trunk/box_lib.mac'
|
||||
include '../../KOSfuncs.inc'
|
||||
include '../../load_lib.mac'
|
||||
include '../../develop/libraries/box_lib/trunk/box_lib.mac'
|
||||
include 'txtbut.inc'
|
||||
include '../../../macros.inc'
|
||||
include '../../macros.inc'
|
||||
include 'run.mac'
|
||||
include 'lang.inc' ; Language support for locales: ru_RU (CP866), it_IT, en_US.
|
||||
use32
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -1,3 +1,8 @@
|
||||
; SPDX-License-Identifier: NOASSERTION
|
||||
;
|
||||
|
||||
; Text encoded with Code Page 866 - Cyrillic
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;; SYSTEM SETTINGS ;;
|
||||
;;;;;;;;;;;;;;;;;;;;;;;
|
||||
@@ -15,9 +20,9 @@ dd I_END
|
||||
dd param
|
||||
dd 0
|
||||
|
||||
include '../../../proc32.inc'
|
||||
include '../../../macros.inc'
|
||||
include '../../../dll.inc'
|
||||
include '../../proc32.inc'
|
||||
include '../../macros.inc'
|
||||
include '../../dll.inc'
|
||||
;---------------------------------------------------------------
|
||||
BootSettings:
|
||||
; Set system language
|
||||
@@ -80,7 +85,7 @@ BootSettings:
|
||||
invoke ini.get_int, sz_ini, sz_mouse, sz_acceleration, 1
|
||||
mov edx,eax
|
||||
mcall 18,19,3
|
||||
|
||||
|
||||
; Set mouse double click delay
|
||||
invoke ini.get_int, sz_ini, sz_mouse, sz_double_click_delay, 1
|
||||
mov edx,eax
|
||||
@@ -1,5 +1,5 @@
|
||||
if tup.getconfig("NO_FASM") ~= "" then return end
|
||||
HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../../.." or tup.getconfig("HELPERDIR")
|
||||
HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../.." or tup.getconfig("HELPERDIR")
|
||||
tup.include(HELPERDIR .. "/use_fasm.lua")
|
||||
add_include(tup.getvariantdir())
|
||||
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -1,3 +1,6 @@
|
||||
; SPDX-License-Identifier: NOASSERTION
|
||||
;
|
||||
|
||||
;
|
||||
; UNIFORM WINDOW COLOURS & SKIN
|
||||
;
|
||||
@@ -28,15 +31,15 @@ M01header.params:
|
||||
dd cur_dir_path ; path to file
|
||||
|
||||
include 'lang.inc'
|
||||
include '../../../proc32.inc'
|
||||
include '../../../config.inc' ;for nightbuild
|
||||
include '../../../macros.inc'
|
||||
include '../../../string.inc'
|
||||
include '../../../dll.inc'
|
||||
include '../../proc32.inc'
|
||||
include '../../config.inc' ;for nightbuild
|
||||
include '../../macros.inc'
|
||||
include '../../string.inc'
|
||||
include '../../dll.inc'
|
||||
include 'kglobals.inc'
|
||||
include 'unpacker.inc'
|
||||
include '../../../KOSfuncs.inc'
|
||||
include '../../../load_lib.mac'
|
||||
include '../../KOSfuncs.inc'
|
||||
include '../../load_lib.mac'
|
||||
@use_library
|
||||
;******************************************************************************
|
||||
;--------------------------------------
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -1,3 +1,8 @@
|
||||
; SPDX-License-Identifier: NOASSERTION
|
||||
;
|
||||
|
||||
; Text encoded with Code Page 866 - Cyrillic
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
; ;
|
||||
; TASK PANEL for KolibriOS - Compile with fasm ;
|
||||
@@ -74,11 +79,11 @@ format binary as ""
|
||||
dd path ; application pach
|
||||
;------------------------------------------------------------------------------
|
||||
include 'lang.inc'
|
||||
include '../../../macros.inc'
|
||||
include '../../../proc32.inc'
|
||||
;include '../../../debug.inc'
|
||||
include 'MOI.INC' ;раскладки клавиатуры
|
||||
include '../../../develop/libraries/box_lib/load_lib.mac'
|
||||
include '../../macros.inc'
|
||||
include '../../proc32.inc'
|
||||
;include '../../debug.inc'
|
||||
include 'MOI.INC' ; keyboard layouts
|
||||
include '../../develop/libraries/box_lib/load_lib.mac'
|
||||
@use_library ;use load lib macros
|
||||
;------------------------------------------------------------------------------
|
||||
caps_lock_check fix 1
|
||||
@@ -1156,7 +1161,7 @@ no_full:
|
||||
;------------------------------------------------------------------------------
|
||||
include 'libini.inc'
|
||||
;------------------------------------------------------------------------------
|
||||
include '../../../dll.inc'
|
||||
include '../../dll.inc'
|
||||
;------------------------------------------------------------------------------
|
||||
include 'drawappl.inc'
|
||||
;------------------------------------------------------------------------------
|
||||
@@ -1,5 +1,5 @@
|
||||
if tup.getconfig("NO_FASM") ~= "" then return end
|
||||
HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../../.." or tup.getconfig("HELPERDIR")
|
||||
HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../.." or tup.getconfig("HELPERDIR")
|
||||
tup.include(HELPERDIR .. "/use_fasm.lua")
|
||||
add_include(tup.getvariantdir())
|
||||
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -1,4 +1,4 @@
|
||||
include '../../../proc32.inc'
|
||||
include '../../proc32.inc'
|
||||
|
||||
macro start_draw_window x,y,xsize,ysize,areacolor,caption
|
||||
{
|
||||
@@ -125,4 +125,3 @@ macro putpixel x,y,color
|
||||
mov edx, color
|
||||
int 0x40
|
||||
}
|
||||
|
||||
File renamed without changes.
@@ -1,4 +1,9 @@
|
||||
; SPDX-License-Identifier: NOASSERTION
|
||||
;
|
||||
|
||||
; Text encoded with Code Page 866 - Cyrillic
|
||||
|
||||
|
||||
; ZKEY. Version 0.51.
|
||||
; Virtual keyboard for KolibriOS.
|
||||
;
|
||||
@@ -20,7 +25,7 @@ use32
|
||||
dd 0
|
||||
dd 0
|
||||
|
||||
include '../../../macros.inc'
|
||||
include '../../macros.inc'
|
||||
include "ASPAPI.INC"
|
||||
|
||||
N_KEYCOLOR equ 0x00677889 ; Normal button color
|
||||
@@ -168,19 +173,19 @@ draw_window:
|
||||
mul byte [keyboard_mode]
|
||||
add eax, SwitchText
|
||||
stdcall draw_button, 513,28,46,20,106,0x00700000,eax,6,TEXTCOLOR ; Scan/ASCII switch
|
||||
|
||||
|
||||
xor al, al
|
||||
xchg al, [red_type]
|
||||
test al, 2
|
||||
jnz .skip_end_draw_window ; if we draw switch button without redraw window then end_draw_window not need
|
||||
|
||||
|
||||
@@:
|
||||
.draw_indicators_area:
|
||||
call lights_on
|
||||
|
||||
end_draw_window
|
||||
|
||||
.skip_end_draw_window:
|
||||
|
||||
.skip_end_draw_window:
|
||||
ret
|
||||
|
||||
get_zkey_window_slot_number:
|
||||
@@ -197,14 +202,14 @@ still:
|
||||
call get_receiver_window_slot_number
|
||||
call get_receiver_window_keyboard_mode ; return in ecx keyboard_mode for set_keyboard_mode
|
||||
call set_keyboard_mode
|
||||
; delete_switch_button
|
||||
mov eax, 8
|
||||
; delete_switch_button
|
||||
mov eax, 8
|
||||
mov edx, BT_DEL + 0x00700000
|
||||
int 0x40
|
||||
int 0x40
|
||||
|
||||
mov byte [red_type], 2
|
||||
call draw_window.draw_switch_button
|
||||
|
||||
|
||||
mov eax, 10 ; Wait for an event in the queue.
|
||||
int 0x40
|
||||
|
||||
@@ -486,4 +491,3 @@ PROCINFO_BUFF process_information
|
||||
rb 4096
|
||||
STACKTOP:
|
||||
MEM:
|
||||
|
||||
File renamed without changes.
Reference in new issue
Block a user