forked from KolibriOS/kolibrios
'cnc_editor' small fix in button colors
git-svn-id: svn://kolibrios.org@7441 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
840f6b865f
commit
50c6905604
@ -77,7 +77,7 @@ start:
|
|||||||
mov [pb.height], dword 17
|
mov [pb.height], dword 17
|
||||||
mov [pb.max], dword 100;599
|
mov [pb.max], dword 100;599
|
||||||
mov [pb.min], dword 0 ;-397
|
mov [pb.min], dword 0 ;-397
|
||||||
mov [pb.value], dword 50;-397
|
mov [pb.value], dword 0 ;-397
|
||||||
mov [pb.back_color], dword 00C8D0D4h
|
mov [pb.back_color], dword 00C8D0D4h
|
||||||
mov [pb.progress_color], dword 8072B7EBh
|
mov [pb.progress_color], dword 8072B7EBh
|
||||||
mov [pb.frame_color], dword 00406175h
|
mov [pb.frame_color], dword 00406175h
|
||||||
@ -151,30 +151,13 @@ mouse:
|
|||||||
call mouse_left_d
|
call mouse_left_d
|
||||||
jmp .end_l
|
jmp .end_l
|
||||||
@@:
|
@@:
|
||||||
;bt eax,0
|
|
||||||
;jnc @f
|
|
||||||
;mouse l. but. move
|
|
||||||
;call mouse_left_m
|
|
||||||
;jmp .end_l
|
|
||||||
;@@:
|
|
||||||
bt eax,16
|
bt eax,16
|
||||||
jnc .end_l
|
jnc .end_l
|
||||||
;mouse l. but. up
|
;mouse l. but. up
|
||||||
call mouse_left_u
|
call mouse_left_u
|
||||||
;jmp .end_l
|
;jmp .end_l
|
||||||
.end_l:
|
.end_l:
|
||||||
;bt eax,9
|
|
||||||
;jnc @f
|
|
||||||
;mouse r. but. press
|
|
||||||
;jmp .end_r
|
|
||||||
;@@:
|
|
||||||
;bt eax,1
|
|
||||||
;jnc @f
|
|
||||||
;mouse r. but. move
|
|
||||||
;call mouse_right_m
|
|
||||||
;jmp .end_r
|
|
||||||
;@@:
|
|
||||||
;.end_r:
|
|
||||||
|
|
||||||
call buf_get_mouse_coord
|
call buf_get_mouse_coord
|
||||||
cmp eax,-1
|
cmp eax,-1
|
||||||
@ -298,8 +281,7 @@ proc buf_get_mouse_coord
|
|||||||
endp
|
endp
|
||||||
|
|
||||||
align 4
|
align 4
|
||||||
proc timer_funct
|
proc timer_funct uses eax ebx
|
||||||
pushad
|
|
||||||
mcall SF_SYSTEM_GET,SSF_TIME_COUNT
|
mcall SF_SYSTEM_GET,SSF_TIME_COUNT
|
||||||
mov [last_time],eax
|
mov [last_time],eax
|
||||||
|
|
||||||
@ -309,7 +291,6 @@ proc timer_funct
|
|||||||
stdcall draw_obj2d,ObjData
|
stdcall draw_obj2d,ObjData
|
||||||
stdcall [buf2d_draw], buf_0
|
stdcall [buf2d_draw], buf_0
|
||||||
@@:
|
@@:
|
||||||
popad
|
|
||||||
ret
|
ret
|
||||||
endp
|
endp
|
||||||
|
|
||||||
@ -559,11 +540,9 @@ but_open_file:
|
|||||||
jnz .end_open_file
|
jnz .end_open_file
|
||||||
cmp ebx,0xffffffff
|
cmp ebx,0xffffffff
|
||||||
je .end_open_file
|
je .end_open_file
|
||||||
|
|
||||||
mov [open_file_size],ebx
|
mov [open_file_size],ebx
|
||||||
mcall SF_SET_CAPTION,1,openfile_path
|
mcall SF_SET_CAPTION,1,openfile_path
|
||||||
|
|
||||||
;---
|
|
||||||
stdcall FileInit,[open_file_data],[open_file_size]
|
stdcall FileInit,[open_file_data],[open_file_size]
|
||||||
stdcall [buf2d_clear], buf_0, [buf_0.color] ;ç¨á⨬ ¡ãä¥à
|
stdcall [buf2d_clear], buf_0, [buf_0.color] ;ç¨á⨬ ¡ãä¥à
|
||||||
stdcall [buf2d_draw], buf_0 ;®¡®¢«ï¥¬ ¡ãä¥à íªà ¥
|
stdcall [buf2d_draw], buf_0 ;®¡®¢«ï¥¬ ¡ãä¥à íªà ¥
|
||||||
@ -610,8 +589,6 @@ proc but_restore_zoom
|
|||||||
ret
|
ret
|
||||||
endp
|
endp
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
;input:
|
;input:
|
||||||
; buf - 㪠§ ⥫ì áâபã, ç¨á«® ¤®«¦® ¡ëâì ¢ 10 ¨«¨ 16 à¨ç®¬ ¢¨¤¥
|
; buf - 㪠§ ⥫ì áâபã, ç¨á«® ¤®«¦® ¡ëâì ¢ 10 ¨«¨ 16 à¨ç®¬ ¢¨¤¥
|
||||||
;output:
|
;output:
|
||||||
@ -1094,7 +1071,8 @@ thread_n_file:
|
|||||||
rb 2048
|
rb 2048
|
||||||
stacktop:
|
stacktop:
|
||||||
sys_path rb 1024
|
sys_path rb 1024
|
||||||
file_name: rb 1024 ;4096
|
file_name:
|
||||||
|
rb 1024
|
||||||
library_path rb 1024
|
library_path rb 1024
|
||||||
plugin_path rb 4096
|
plugin_path rb 4096
|
||||||
openfile_path rb 4096
|
openfile_path rb 4096
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
;add_object_in_list, (¢à¥¬. áâà.), (Object.FigData)
|
;add_object_in_list, (¢à¥¬. áâà.), (Object.FigData)
|
||||||
; mov [Object.FigData], (tl_node_add(¢à¥¬. áâà.),tl_node_get_data)
|
; mov [Object.FigData], (tl_node_add(¢à¥¬. áâà.),tl_node_get_data)
|
||||||
|
|
||||||
;draw_fig2d_litl, ___, pobj, (Object.FigData), ___, ___, ___
|
;draw_fig2d_litl, ___, pobj, (Object.FigData), fign, ___, ___, ___
|
||||||
|
|
||||||
struct Object
|
struct Object
|
||||||
OType dd ?
|
OType dd ?
|
||||||
@ -107,8 +107,8 @@ graf_margin_left dd 3 ;margin in pixels
|
|||||||
graf_margin_right dd 3+6 ;margin in pixels
|
graf_margin_right dd 3+6 ;margin in pixels
|
||||||
graf_margin_top dd 3+9 ;margin in pixels
|
graf_margin_top dd 3+9 ;margin in pixels
|
||||||
graf_margin_bot dd 3+9 ;margin in pixels
|
graf_margin_bot dd 3+9 ;margin in pixels
|
||||||
png_data dd ?
|
data_printed dd ? ;ç¨á«® ¢ë¯®«¥ëå ª®¬ ¤
|
||||||
png_size dd ?
|
data_all dd ? ;ç¨á«® ¢á¥å ª®¬ ¤
|
||||||
|
|
||||||
;global variables:
|
;global variables:
|
||||||
ObjData Object
|
ObjData Object
|
||||||
@ -220,6 +220,8 @@ proc ObjectInit uses eax ebx ecx edi, pobj:dword, etxt:dword
|
|||||||
push ecx
|
push ecx
|
||||||
mov edi,eax
|
mov edi,eax
|
||||||
xor eax,eax
|
xor eax,eax
|
||||||
|
mov [data_all],eax ;å¨â஥ ç «ì®¥ ®¡ã«¥¨¥ áç¥â稪
|
||||||
|
mov [data_printed],eax
|
||||||
rep stosd ;clear memory
|
rep stosd ;clear memory
|
||||||
pop ecx
|
pop ecx
|
||||||
|
|
||||||
@ -227,12 +229,19 @@ proc ObjectInit uses eax ebx ecx edi, pobj:dword, etxt:dword
|
|||||||
align 4
|
align 4
|
||||||
.cycle0:
|
.cycle0:
|
||||||
stdcall FigureInit,edi
|
stdcall FigureInit,edi
|
||||||
|
mov eax,[edi]
|
||||||
|
mov eax,[eax+Figure.PoiCount]
|
||||||
|
or eax,eax
|
||||||
|
jnz @f
|
||||||
|
inc eax ;¬¨¨¬ã¬ 1- ª®¬ ¤
|
||||||
|
@@:
|
||||||
|
add [data_all],eax
|
||||||
cmp esi,[etxt]
|
cmp esi,[etxt]
|
||||||
jge .cycle0end
|
jge .cycle0end
|
||||||
add edi,4
|
add edi,4
|
||||||
loop .cycle0
|
loop .cycle0
|
||||||
.cycle0end:
|
.cycle0end:
|
||||||
inc dword[ebx+Object.FigCount] ;???
|
inc dword[ebx+Object.FigCount]
|
||||||
or ecx,ecx
|
or ecx,ecx
|
||||||
jz @f
|
jz @f
|
||||||
;㬥ìè ¥¬ ®¡ê¥¬ ¯ ¬ï⨠¢ë¤¥«¥ë© ¤«ï ª®¬ ¤
|
;㬥ìè ¥¬ ®¡ê¥¬ ¯ ¬ï⨠¢ë¤¥«¥ë© ¤«ï ª®¬ ¤
|
||||||
@ -242,6 +251,12 @@ align 4
|
|||||||
stdcall mem.ReAlloc,[ebx+Object.FigData],eax
|
stdcall mem.ReAlloc,[ebx+Object.FigData],eax
|
||||||
mov [ebx+Object.FigData],eax
|
mov [ebx+Object.FigData],eax
|
||||||
@@:
|
@@:
|
||||||
|
;ãáâ ®¢ª áç¥â稪 ¨ ¯à®£à¥á¡ à 25 %
|
||||||
|
mov eax,[data_all]
|
||||||
|
mov [pb.max],eax
|
||||||
|
shr eax,2
|
||||||
|
mov [data_printed],eax
|
||||||
|
mov [pb.value],eax
|
||||||
|
|
||||||
stdcall ObjCalculateScale,ebx
|
stdcall ObjCalculateScale,ebx
|
||||||
|
|
||||||
@ -896,6 +911,7 @@ endp
|
|||||||
align 4
|
align 4
|
||||||
proc draw_obj2d, pobj:dword
|
proc draw_obj2d, pobj:dword
|
||||||
locals
|
locals
|
||||||
|
data_draw dd ?
|
||||||
CentrX dd ?
|
CentrX dd ?
|
||||||
CentrY dd ?
|
CentrY dd ?
|
||||||
endl
|
endl
|
||||||
@ -934,9 +950,17 @@ pushad
|
|||||||
add edx,[graf_margin_left]
|
add edx,[graf_margin_left]
|
||||||
add edx,[ebx+Object.MCentrX]
|
add edx,[ebx+Object.MCentrX]
|
||||||
mov [CentrX],edx
|
mov [CentrX],edx
|
||||||
|
mov dword[data_draw],0
|
||||||
align 4
|
align 4
|
||||||
.cycle0:
|
.cycle0:
|
||||||
stdcall draw_fig2d_litl, buf_0,ebx,[edi],0,edx,eax
|
stdcall draw_fig2d_litl, buf_0,ebx,[edi],[data_draw],0,edx,eax
|
||||||
|
mov esi,[edi]
|
||||||
|
mov esi,[esi+Figure.PoiCount]
|
||||||
|
or esi,esi
|
||||||
|
jnz @f
|
||||||
|
inc esi
|
||||||
|
@@:
|
||||||
|
add [data_draw],esi
|
||||||
add edi,4
|
add edi,4
|
||||||
loop .cycle0
|
loop .cycle0
|
||||||
stdcall [buf2d_flip_v], buf_0
|
stdcall [buf2d_flip_v], buf_0
|
||||||
@ -981,11 +1005,16 @@ endp
|
|||||||
|
|
||||||
;input:
|
;input:
|
||||||
; pbuf - pointer to buffer 2d
|
; pbuf - pointer to buffer 2d
|
||||||
|
; pobj - 㪠§ â¥«ì ®¡ê¥ªâ
|
||||||
|
; pfig - 㪠§ ⥫ì 䨣ãàã
|
||||||
|
; fign - ®¬¥à 䨣ãàë
|
||||||
;description:
|
;description:
|
||||||
; äãªæ¨ï ¤«ï à¨á®¢ ¨ï ®¡ê¥ªâ ¯® ç áâï¬
|
; äãªæ¨ï ¤«ï à¨á®¢ ¨ï ®¡ê¥ªâ ¯® ç áâï¬
|
||||||
align 4
|
align 4
|
||||||
proc draw_fig2d_litl, pbuf:dword, pobj:dword, pfig:dword, Scale:dword, CentrX:dword, CentrY:dword
|
proc draw_fig2d_litl, pbuf:dword, pobj:dword, pfig:dword, fign:dword,\
|
||||||
|
Scale:dword, CentrX:dword, CentrY:dword
|
||||||
locals
|
locals
|
||||||
|
line_col dd ? ;figure color
|
||||||
PervX dd 0 ;pervios point coord X
|
PervX dd 0 ;pervios point coord X
|
||||||
PervY dd 0 ;pervios point coord Y
|
PervY dd 0 ;pervios point coord Y
|
||||||
GrafX dd ? ;active point coord X
|
GrafX dd ? ;active point coord X
|
||||||
@ -1011,6 +1040,7 @@ pushad
|
|||||||
lea eax,[edx+Object.WScale]
|
lea eax,[edx+Object.WScale]
|
||||||
@@:
|
@@:
|
||||||
fmul qword[eax]
|
fmul qword[eax]
|
||||||
|
mov esi,[fign]
|
||||||
align 4
|
align 4
|
||||||
.cycle0:
|
.cycle0:
|
||||||
fld qword[edi+Point.CoordX]
|
fld qword[edi+Point.CoordX]
|
||||||
@ -1025,17 +1055,24 @@ align 4
|
|||||||
fistp dword[ebp-4]
|
fistp dword[ebp-4]
|
||||||
stdcall [buf2d_set_pixel], [pbuf], [GrafX],[GrafY], 0xff0000
|
stdcall [buf2d_set_pixel], [pbuf], [GrafX],[GrafY], 0xff0000
|
||||||
cmp ecx,[ebx+Figure.PoiCount]
|
cmp ecx,[ebx+Figure.PoiCount]
|
||||||
je @f
|
je .end0
|
||||||
stdcall [buf2d_line_sm], [pbuf], [PervX],[PervY], [GrafX],[GrafY], 0x80
|
;®¯à¥¤¥«¥¨¥ 梥â
|
||||||
;sub esp,24
|
cmp esi,[data_printed]
|
||||||
;call [buf2d_line]
|
jl @f
|
||||||
stdcall [buf2d_line], [pbuf], [PervX],[PervY], [GrafX],[GrafY], 0x80
|
mov [line_col],0x80 ;if not printed
|
||||||
|
jmp .end1
|
||||||
@@:
|
@@:
|
||||||
|
mov [line_col],0xff0000 ;if was printed
|
||||||
|
.end1:
|
||||||
|
stdcall [buf2d_line_sm], [pbuf], [PervX],[PervY], [GrafX],[GrafY], [line_col]
|
||||||
|
stdcall [buf2d_line], [pbuf], [PervX],[PervY], [GrafX],[GrafY], [line_col]
|
||||||
|
.end0:
|
||||||
mov eax,[GrafX]
|
mov eax,[GrafX]
|
||||||
mov [PervX],eax
|
mov [PervX],eax
|
||||||
mov eax,[GrafY]
|
mov eax,[GrafY]
|
||||||
mov [PervY],eax
|
mov [PervY],eax
|
||||||
add edi,sizeof.Point
|
add edi,sizeof.Point
|
||||||
|
inc esi
|
||||||
;;loop .cycle0
|
;;loop .cycle0
|
||||||
dec ecx
|
dec ecx
|
||||||
jnz .cycle0
|
jnz .cycle0
|
||||||
|
@ -14,7 +14,7 @@ include 'cnc_editor.inc'
|
|||||||
include '../../develop/info3ds/info_fun_float.inc'
|
include '../../develop/info3ds/info_fun_float.inc'
|
||||||
|
|
||||||
@use_library_mem mem.Alloc,mem.Free,mem.ReAlloc,dll.Load
|
@use_library_mem mem.Alloc,mem.Free,mem.ReAlloc,dll.Load
|
||||||
caption db 'CNC editor 24.09.18',0 ;¯®¤¯¨áì ®ª
|
caption db 'CNC editor 08.10.18',0 ;¯®¤¯¨áì ®ª
|
||||||
|
|
||||||
run_file_70 FileInfoBlock
|
run_file_70 FileInfoBlock
|
||||||
|
|
||||||
@ -321,7 +321,7 @@ pushad
|
|||||||
|
|
||||||
; *** à¨á®¢ ¨¥ £« ¢®£® ®ª (¢ë¯®«ï¥âáï 1 à § ¯à¨ § ¯ã᪥) ***
|
; *** à¨á®¢ ¨¥ £« ¢®£® ®ª (¢ë¯®«ï¥âáï 1 à § ¯à¨ § ¯ã᪥) ***
|
||||||
mov edx,[sc.work]
|
mov edx,[sc.work]
|
||||||
or edx,(3 shl 24)+0x10000000+0x20000000
|
or edx,0x33000000
|
||||||
mov edi,caption
|
mov edi,caption
|
||||||
mcall SF_CREATE_WINDOW,(20 shl 16)+599,(20 shl 16)+415
|
mcall SF_CREATE_WINDOW,(20 shl 16)+599,(20 shl 16)+415
|
||||||
|
|
||||||
@ -363,73 +363,54 @@ pushad
|
|||||||
.end0:
|
.end0:
|
||||||
|
|
||||||
; *** ᮧ¤ ¨¥ ª®¯®ª ¯ ¥«ì ***
|
; *** ᮧ¤ ¨¥ ª®¯®ª ¯ ¥«ì ***
|
||||||
mcall SF_DEFINE_BUTTON,(5 shl 16)+20,(5 shl 16)+20,3,, [sc.work_button]
|
mcall SF_DEFINE_BUTTON,(5 shl 16)+20,(5 shl 16)+20,3, [sc.work_button]
|
||||||
|
|
||||||
mov ebx,(30 shl 16)+20
|
|
||||||
mov edx,4 ;0x4000000?
|
|
||||||
int 0x40 ;open
|
|
||||||
|
|
||||||
add ebx,25 shl 16
|
add ebx,25 shl 16
|
||||||
mov edx,5
|
mcall ,,,4 ;open
|
||||||
int 0x40 ;save
|
add ebx,25 shl 16
|
||||||
|
mcall ,,,5 ;save
|
||||||
|
|
||||||
add ebx,30 shl 16
|
add ebx,30 shl 16
|
||||||
mov edx,6
|
mcall ,,,6 ;captions on off
|
||||||
int 0x40 ;captions on off
|
|
||||||
|
|
||||||
add ebx,25 shl 16
|
add ebx,25 shl 16
|
||||||
mov edx,7
|
mcall ,,,7 ;figure move up
|
||||||
int 0x40 ;figure move up
|
|
||||||
add ebx,25 shl 16
|
add ebx,25 shl 16
|
||||||
mov edx,8
|
mcall ,,,8 ;figure move down
|
||||||
int 0x40 ;figure move down
|
|
||||||
|
|
||||||
add ebx,25 shl 16
|
add ebx,25 shl 16
|
||||||
mov edx,9
|
mcall ,,,9 ;sel points dlg
|
||||||
int 0x40 ;sel points dlg
|
|
||||||
|
|
||||||
add ebx,25 shl 16
|
add ebx,25 shl 16
|
||||||
mov edx,10
|
mcall ,,,10 ;sel points move up
|
||||||
int 0x40 ;sel points move up
|
|
||||||
add ebx,25 shl 16
|
add ebx,25 shl 16
|
||||||
mov edx,11
|
mcall ,,,11 ;sel points move down
|
||||||
int 0x40 ;sel points move down
|
|
||||||
|
|
||||||
add ebx,25 shl 16
|
add ebx,25 shl 16
|
||||||
mov edx,12
|
mcall ,,,12 ;align sel points left
|
||||||
int 0x40 ;align sel points left
|
|
||||||
add ebx,25 shl 16
|
add ebx,25 shl 16
|
||||||
mov edx,13
|
mcall ,,,13 ;align sel points right
|
||||||
int 0x40 ;align sel points right
|
|
||||||
add ebx,25 shl 16
|
add ebx,25 shl 16
|
||||||
mov edx,14
|
mcall ,,,14 ;align sel points top
|
||||||
int 0x40 ;align sel points top
|
|
||||||
add ebx,25 shl 16
|
add ebx,25 shl 16
|
||||||
mov edx,15
|
mcall ,,,15 ;align sel points bottom
|
||||||
int 0x40 ;align sel points bottom
|
|
||||||
|
|
||||||
add ebx,25 shl 16
|
add ebx,25 shl 16
|
||||||
mov edx,16
|
mcall ,,,16 ;copy to clipboard
|
||||||
int 0x40 ;copy to clipboard
|
|
||||||
add ebx,25 shl 16
|
add ebx,25 shl 16
|
||||||
mov edx,17
|
mcall ,,,17 ;paste from clipboard
|
||||||
int 0x40 ;paste from clipboard
|
|
||||||
|
|
||||||
add ebx,25 shl 16
|
add ebx,25 shl 16
|
||||||
mov edx,18
|
mcall ,,,18 ;sel points del
|
||||||
int 0x40 ;sel points del
|
|
||||||
|
|
||||||
add ebx,30 shl 16
|
add ebx,30 shl 16
|
||||||
mov edx,19
|
mcall ,,,19 ;restore zoom
|
||||||
int 0x40 ;restore zoom
|
|
||||||
|
|
||||||
add ebx,30 shl 16
|
add ebx,30 shl 16
|
||||||
mov edx,20
|
mcall ,,,20 ;.png
|
||||||
int 0x40 ;.png
|
|
||||||
|
|
||||||
add ebx,25 shl 16
|
add ebx,25 shl 16
|
||||||
mov edx,21
|
mcall ,,,21 ;options scale
|
||||||
int 0x40 ;options scale
|
|
||||||
|
|
||||||
; *** à¨á®¢ ¨¥ ¨ª®®ª ª®¯ª å ***
|
; *** à¨á®¢ ¨¥ ¨ª®®ª ª®¯ª å ***
|
||||||
mcall SF_PUT_IMAGE,[image_data_toolbar],(16 shl 16)+16,(7 shl 16)+7 ;icon new
|
mcall SF_PUT_IMAGE,[image_data_toolbar],(16 shl 16)+16,(7 shl 16)+7 ;icon new
|
||||||
|
@ -113,8 +113,6 @@ txt_rs db ')',0
|
|||||||
txt_len db ' len=',0
|
txt_len db ' len=',0
|
||||||
txt_39 db 39,0
|
txt_39 db 39,0
|
||||||
|
|
||||||
use_mem_array_figure equ 0 ;1 - ¨α―<EFBFBD>«μ§<EFBFBD>’ βμ €¨ ¬¨η₯αͺ¨© ¬ αα¨’ €«ο αβΰγͺβγΰ α <EFBFBD>―¨α ¨ο¬¨ 䨣γΰ
|
|
||||||
|
|
||||||
;᢮©á⢠¤«ï à¨á®¢ ¨ï â®ç¥ª
|
;᢮©á⢠¤«ï à¨á®¢ ¨ï â®ç¥ª
|
||||||
PROP_BIT_SELECT equ 30 ;â®çª ¯®¤ ¢ë¤¥«¥¨¥¬
|
PROP_BIT_SELECT equ 30 ;â®çª ¯®¤ ¢ë¤¥«¥¨¥¬
|
||||||
|
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 26 KiB |
Binary file not shown.
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 36 KiB |
Loading…
Reference in New Issue
Block a user