forked from KolibriOS/kolibrios
box_lib.obj: clear code
git-svn-id: svn://kolibrios.org@8346 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
a327d88cb7
commit
5f41a75e27
@ -1,347 +0,0 @@
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
|
||||
Version 2, June 1991
|
||||
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
||||
675 Mass Ave, Cambridge, MA 02139, USA
|
||||
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
License is intended to guarantee your freedom to share and change free
|
||||
software--to make sure the software is free for all its users. This
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Library General Public License instead.) You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if you
|
||||
distribute copies of the software, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must give the recipients all the rights that
|
||||
you have. You must make sure that they, too, receive or can get the
|
||||
source code. And you must show them these terms so they know their
|
||||
rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and
|
||||
(2) offer you this license which gives you legal permission to copy,
|
||||
distribute and/or modify the software.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
software. If the software is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original, so
|
||||
that any problems introduced by others will not reflect on the original
|
||||
authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that redistributors of a free
|
||||
program will individually obtain patent licenses, in effect making the
|
||||
program proprietary. To prevent this, we have made it clear that any
|
||||
patent must be licensed for everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
a notice placed by the copyright holder saying it may be distributed
|
||||
under the terms of this General Public License. The "Program", below,
|
||||
refers to any such program or work, and a "work based on the Program"
|
||||
means either the Program or any derivative work under copyright law:
|
||||
that is to say, a work containing the Program or a portion of it,
|
||||
either verbatim or with modifications and/or translated into another
|
||||
language. (Hereinafter, translation is included without limitation in
|
||||
the term "modification".) Each licensee is addressed as "you".
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running the Program is not restricted, and the output from the Program
|
||||
is covered only if its contents constitute a work based on the
|
||||
Program (independent of having been made by running the Program).
|
||||
Whether that is true depends on what the Program does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's
|
||||
source code as you receive it, in any medium, provided that you
|
||||
conspicuously and appropriately publish on each copy an appropriate
|
||||
copyright notice and disclaimer of warranty; keep intact all the
|
||||
notices that refer to this License and to the absence of any warranty;
|
||||
and give any other recipients of the Program a copy of this License
|
||||
along with the Program.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and
|
||||
you may at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion
|
||||
of it, thus forming a work based on the Program, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
|
||||
c) If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display an
|
||||
announcement including an appropriate copyright notice and a
|
||||
notice that there is no warranty (or else, saying that you provide
|
||||
a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Program, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program
|
||||
with the Program (or with a work based on the Program) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it,
|
||||
under Section 2) in object code or executable form under the terms of
|
||||
Sections 1 and 2 above provided that you also do one of the following:
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable
|
||||
source code, which must be distributed under the terms of Sections
|
||||
1 and 2 above on a medium customarily used for software interchange; or,
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three
|
||||
years, to give any third party, for a charge no more than your
|
||||
cost of physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
|
||||
c) Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is
|
||||
allowed only for noncommercial distribution and only if you
|
||||
received the program in object code or executable form with such
|
||||
an offer, in accord with Subsection b above.)
|
||||
|
||||
The source code for a work means the preferred form of the work for
|
||||
making modifications to it. For an executable work, complete source
|
||||
code means all the source code for all modules it contains, plus any
|
||||
associated interface definition files, plus the scripts used to
|
||||
control compilation and installation of the executable. However, as a
|
||||
special exception, the source code distributed need not include
|
||||
anything that is normally distributed (in either source or binary
|
||||
form) with the major components (compiler, kernel, and so on) of the
|
||||
operating system on which the executable runs, unless that component
|
||||
itself accompanies the executable.
|
||||
|
||||
If distribution of executable or object code is made by offering
|
||||
access to copy from a designated place, then offering equivalent
|
||||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program is
|
||||
void, and will automatically terminate your rights under this License.
|
||||
However, parties who have received copies, or rights, from you under
|
||||
this License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
|
||||
5. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Program or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Program (or any work based on the
|
||||
Program), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program subject to
|
||||
these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Program at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Program by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system, which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
may add an explicit geographical distribution limitation excluding
|
||||
those countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions
|
||||
of the General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies a version number of this License which applies to it and "any
|
||||
later version", you have the option of following the terms and conditions
|
||||
either of that version or of any later version published by the Free
|
||||
Software Foundation. If the Program does not specify a version number of
|
||||
this License, you may choose any version ever published by the Free Software
|
||||
Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, write to the author
|
||||
to ask for permission. For software which is copyrighted by the Free
|
||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||
make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||
REPAIR OR CORRECTION.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
Appendix: How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) 19yy <name of author>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program is interactive, make it output a short notice like this
|
||||
when it starts in an interactive mode:
|
||||
|
||||
Gnomovision version 69, Copyright (C) 19yy name of author
|
||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, the commands you use may
|
||||
be called something other than `show w' and `show c'; they could even be
|
||||
mouse-clicks or menu items--whatever suits your program.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1989
|
||||
Ty Coon, President of Vice
|
||||
|
||||
This General Public License does not permit incorporating your program into
|
||||
proprietary programs. If your program is a subroutine library, you may
|
||||
consider it more useful to permit linking proprietary applications with the
|
||||
library. If this is what you want to do, use the GNU Library General
|
||||
Public License instead of this License.
|
@ -1,10 +0,0 @@
|
||||
;include 'editbox.mac' ;macro which should make life easier :) specially for editbox
|
||||
include 'checkbox2.mac' ;macro implements checkbox
|
||||
;include 'optionbox.mac' ;macro implements optionbox
|
||||
;include 'scrollbar.mac' ;macro implements scrollbar
|
||||
;include 'd_button.mac' ;macro implements dinamic_button
|
||||
;include 'menubar.mac' ;macro implements menubar
|
||||
;include 'filebrowser.mac' ;macro implements filebrowser
|
||||
;include 'tree_list.mac' ;macro implements tree_list, image_list, list_box
|
||||
;include 'pathshow.mac' ;macro implements pathshow
|
||||
;include 't_edit.mac' ;macro implements text_editor
|
@ -1,320 +0,0 @@
|
||||
; Copyright (C) KolibriOS team 2004-2010. All rights reserved.
|
||||
; Refer to the GNU General Public license (the "GPL") for full details.
|
||||
;
|
||||
;*****************************************************************************
|
||||
; Box_Lib - library of graphical components
|
||||
;
|
||||
; 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 'bl_sys.mac'
|
||||
include 'box_lib.mac' ;macro which should make life easier :)
|
||||
|
||||
;-----------------------------------------------------------------------------
|
||||
mem.alloc dd ? ;ôóíêöèÿ äëÿ âûäåëåíèÿ ïàìÿòè
|
||||
mem.free dd ? ;ôóíêöèÿ äëÿ îñâîáîæäåíèÿ ïàìÿòè
|
||||
mem.realloc dd ? ;ôóíêöèÿ äëÿ ïåðåðàñïðåäåëåíèÿ ïàìÿòè
|
||||
dll.load dd ?
|
||||
|
||||
;----------------------------------------------------
|
||||
;EditBox
|
||||
;----------------------------------------------------
|
||||
align 16
|
||||
;use_editbox_draw ;macro reveals the function of the display.
|
||||
align 16
|
||||
;use_editbox_key ;macro reveals processing function of the keypad.
|
||||
align 16
|
||||
;use_editbox_mouse ;macro reveals processing function of the mouse.
|
||||
|
||||
;----------------------------------------------------
|
||||
;CheckBox
|
||||
;----------------------------------------------------
|
||||
align 16
|
||||
_init_checkbox2 ;macro for init checkbox
|
||||
align 16
|
||||
use_checkbox_draw2 ;macro reveals the function of the display.
|
||||
align 16
|
||||
use_checkbox_mouse2 ;macro reveals processing function of the mouse.
|
||||
|
||||
|
||||
;--------------------------------------------------
|
||||
;radiobutton Group
|
||||
;--------------------------------------------------
|
||||
align 16
|
||||
;use_optionbox_driver ;macro that control the operating modes
|
||||
align 16
|
||||
;use_optionbox_draw ;macro reveals the function of the display.
|
||||
align 16
|
||||
;use_optionbox_mouse ;macro reveals processing function of the mouse.
|
||||
|
||||
;--------------------------------------------------
|
||||
;scrollbar Group
|
||||
;--------------------------------------------------
|
||||
align 16
|
||||
;use_scroll_bar
|
||||
align 16
|
||||
;use_scroll_bar_vertical
|
||||
align 16
|
||||
;use_scroll_bar_horizontal
|
||||
|
||||
;--------------------------------------------------
|
||||
;dinamic button Group
|
||||
;--------------------------------------------------
|
||||
align 16
|
||||
;use_dinamic_button
|
||||
|
||||
;--------------------------------------------------
|
||||
;menubar Group
|
||||
;--------------------------------------------------
|
||||
align 16
|
||||
;use_menu_bar
|
||||
|
||||
;--------------------------------------------------
|
||||
;filebrowser Group
|
||||
;--------------------------------------------------
|
||||
align 16
|
||||
;use_file_browser
|
||||
|
||||
;--------------------------------------------------
|
||||
;tree list
|
||||
;--------------------------------------------------
|
||||
align 16
|
||||
;use_tree_list
|
||||
|
||||
;--------------------------------------------------
|
||||
;PathShow Group
|
||||
;--------------------------------------------------
|
||||
align 16
|
||||
;use_path_show
|
||||
|
||||
;--------------------------------------------------
|
||||
;text editor
|
||||
;--------------------------------------------------
|
||||
align 16
|
||||
;use_text_edit
|
||||
|
||||
;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 16
|
||||
EXPORTS:
|
||||
|
||||
|
||||
dd sz_init, lib_init
|
||||
dd sz_version, 0x00000001
|
||||
|
||||
;dd sz_edit_box, edit_box
|
||||
;dd sz_edit_box_key, edit_box_key
|
||||
;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_checkbox2, init_checkbox2
|
||||
dd sz_check_box_draw2, check_box_draw2
|
||||
dd sz_check_box_mouse2, check_box_mouse2
|
||||
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_save_file, ted_but_save_file
|
||||
;dd sz_ted_but_sumb_upper, ted_but_sumb_upper
|
||||
;dd sz_ted_but_sumb_lover, ted_but_sumb_lover
|
||||
;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_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_next, ted_but_find_next
|
||||
;dd sz_ted_text_colored, ted_text_colored
|
||||
;dd sz_ted_version, 0x00000002
|
||||
|
||||
dd 0,0
|
||||
|
||||
|
||||
sz_init db 'lib_init',0
|
||||
sz_version db 'version',0
|
||||
|
||||
sz_edit_box db 'edit_box',0
|
||||
sz_edit_box_key db 'edit_box_key',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_checkbox2 db 'init_checkbox2',0
|
||||
sz_check_box_draw2 db 'check_box_draw2',0
|
||||
sz_check_box_mouse2 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_save_file db 'ted_but_save_file',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_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_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_next db 'ted_but_find_next',0
|
||||
sz_ted_text_colored db 'ted_text_colored',0
|
||||
sz_ted_version db 'version_text_edit',0
|
@ -1,400 +0,0 @@
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;Basic macros for use EditBox ;
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
ed_width equ [edi] ;ширина компонента
|
||||
ed_left equ [edi+4] ;положение по оси х
|
||||
ed_top equ [edi+8] ;положение по оси у
|
||||
ed_color equ [edi+12] ;цвет фона компонента
|
||||
shift_color equ [edi+16] ;=0x6a9480 для примера возьем желеный цвет бокса
|
||||
ed_focus_border_color equ [edi+20] ;цвет рамки компонента
|
||||
ed_blur_border_color equ [edi+24] ;цвет не активного компонента
|
||||
ed_text_color equ [edi+28] ;цвет текста
|
||||
ed_max equ [edi+32] ;кол-во символов которые можно максимально ввести
|
||||
ed_text equ [edi+36] ;указатель на буфер
|
||||
ed_mouse_variable equ [edi+40] ; указатель на переменную для бокса/группы
|
||||
ed_flags equ [edi+44] ;флаги
|
||||
bp_flags equ [ebp+44] ;в некоторых процедурах edi используется, взамен указатель храниться в ebp
|
||||
ed_size equ [edi+48] ;кол-во символов
|
||||
bp_size equ [ebp+48] ;кол-во симвполов, для адресации испльзуется ebpб edi занят
|
||||
ed_pos equ [edi+52] ;позиция курсора
|
||||
ed_offset equ [edi+56] ;смещение
|
||||
cl_curs_x equ [edi+60] ;предыдущее координата курсора по х
|
||||
cl_curs_y equ [edi+64] ;предыдущее координата курсора по у
|
||||
ed_shift_pos equ [edi+68] ;положение курсора
|
||||
ed_shift_pos_old equ [edi+72] ;старое положение курсора
|
||||
|
||||
ed_struc_size=76
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;Bit mask from editbox
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
ed_figure_only= 1000000000000000b ;одни символы
|
||||
ed_always_focus= 100000000000000b
|
||||
ed_focus= 10b ;фокус приложения
|
||||
ed_shift_on= 1000b ;если не установлен -значит впервые нажат shift,если был установлен, значит мы уже что - то делали удерживая shift
|
||||
ed_shift_on_off=1111111111110111b
|
||||
ed_shift= 100b ;включается при нажатии на shift т.е. если нажимаю
|
||||
ed_shift_off= 1111111111111011b
|
||||
ed_shift_bac= 10000b ;бит для очистки выделеного shift т.е. при установке говорит что есть выделение
|
||||
ed_shift_bac_cl=1111111111101111b ;очистка при удалении выделения
|
||||
ed_shift_cl= 1111111111100011b
|
||||
ed_shift_mcl= 1111111111111011b
|
||||
ed_left_fl= 100000b
|
||||
ed_right_fl= 1111111111011111b
|
||||
ed_offset_fl= 1000000b
|
||||
ed_offset_cl= 1111111110111111b
|
||||
ed_insert= 10000000b
|
||||
ed_insert_cl= 1111111101111111b
|
||||
ed_mouse_on = 100000000b
|
||||
ed_mous_adn_b= 100011000b
|
||||
ed_mouse_on_off=1111111011111111b
|
||||
ed_height=14 ; высота
|
||||
|
||||
struc edit_box width,left,top,color,shift_color,focus_border_color,\
|
||||
blur_border_color,text_color,max,text,mouse_variable,flags,size,pos
|
||||
{
|
||||
.width dd width
|
||||
.left dd left
|
||||
.top dd top
|
||||
.color dd color
|
||||
.shift_color dd shift_color
|
||||
.focus_border_color dd focus_border_color
|
||||
.blur_border_color dd blur_border_color
|
||||
.text_color dd text_color
|
||||
.max dd max
|
||||
.text dd text
|
||||
.mouse_variable dd mouse_variable
|
||||
.flags dd flags+0
|
||||
.size dd size+0
|
||||
.pos dd pos+0
|
||||
.offset dd 0
|
||||
.cl_curs_x dd 0
|
||||
.cl_curs_y dd 0
|
||||
.shift dd 0
|
||||
.shift_old dd 0
|
||||
}
|
||||
|
||||
macro edit_boxes_set_sys_color start,end,color_table
|
||||
{
|
||||
mov edi,start
|
||||
mov ecx,((end-start)/ed_struc_size)
|
||||
mov esi,color_table
|
||||
@@:
|
||||
mov eax,dword [esi+36]
|
||||
mov ebx,dword [esi+20]
|
||||
push dword eax
|
||||
pop dword ed_focus_border_color
|
||||
shr bh,1
|
||||
shr bl,1
|
||||
shr ah,1
|
||||
shr al,1
|
||||
add ah,bh
|
||||
add al,bl
|
||||
ror eax,16
|
||||
ror ebx,16
|
||||
shr bl,1
|
||||
shr al,1
|
||||
add al,bl
|
||||
ror eax,16
|
||||
mov dword ed_blur_border_color,eax
|
||||
mov dword shift_color,eax
|
||||
add edi,ed_struc_size
|
||||
loop @b
|
||||
}
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;Basic macros for use CheckBox ;
|
||||
;Last change 12.10.2010 ;
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
ch_struc_size=36 ;размер структуры
|
||||
ch_flag_en=10b ;флаг установленного чек бокса.
|
||||
ch_flag_top=0x0 ;флаг расположения текста вверху т.е. 3-й бит
|
||||
ch_flag_middle=100b ;флаг расположения текста в центре т.е. 4-й бит.
|
||||
ch_flag_bottom=1000b ;флаг расположения текста в низу т.е. по умолчанию принимается значение внизу т.е. отсуствие 3-го и 4-го бита
|
||||
|
||||
2ch_left_s equ [ebp] ;кордината начала рисования по х
|
||||
2ch_top_s equ [ebp+4] ;координата начала рисования по у
|
||||
2ch_text_margin equ [ebp+8] ;=4 расстояние от прямоугольника чек бокса до надписи
|
||||
2ch_color equ [ebp+12] ;цвет внутри checkbox
|
||||
2ch_border_color equ [ebp+16] ; or [edi+4] ;цвет рамки checkbox ее можно задать самостоятельно
|
||||
2ch_text_color equ [ebp+20] ;[edi+4] ;цвет текста
|
||||
2ch_text_ptr equ [ebp+24] ;указатель на начало текстовой строки
|
||||
2ch_flags equ [ebp+28] ;флаги
|
||||
2ch_sz_str equ [ebp+32] ;длинна строки, вычисляется при инициализации компонента
|
||||
|
||||
struc check_box2 left_s,top_s,ch_text_margin,color,border_color,text_color,text,flags
|
||||
{ ;структура параметров для чек бокса
|
||||
.left_s: dd left_s ;+0 положение по х dw + размер dw
|
||||
.top_s: dd top_s ;+4 положение по у dw + размер dw
|
||||
.ch_text_margin: dd ch_text_margin ;расстояние от прямоугольника чек бокса до надписи
|
||||
.color: dd color ;цвет внутри чекбокса
|
||||
.border_color: dd border_color ;цвет рамки
|
||||
.text_color: dd text_color ;цвет надписи
|
||||
.text: dd text ;адрес в коде программы где расположен текст
|
||||
.flags: dd flags+0 ;флаги
|
||||
.size_of_str: dd 0x0 ;длинна строки, вычисляется при инициализации компонента
|
||||
}
|
||||
|
||||
;Макрос проверки щелчка мышки над группой checkboxes.
|
||||
macro init_checkboxes2 start,end
|
||||
{
|
||||
mov ebp,start
|
||||
mov ecx,((end-start)/ch_struc_size)
|
||||
@@:
|
||||
push ebp ;указатель на первый checkbox
|
||||
call [init_checkbox2] ;макрос проверки мышки над checkbox'ом
|
||||
add ebp,ch_struc_size
|
||||
loop @b
|
||||
}
|
||||
|
||||
;Макрос проверки мышки группы checkboxes.
|
||||
macro checkboxes_mouse2 start,end
|
||||
{
|
||||
mov ebp,start
|
||||
mov ecx,((end-start)/ch_struc_size)
|
||||
@@:
|
||||
push ebp ;указатель на первый checkbox
|
||||
call [check_box_mouse2] ;нарисовать checkbox
|
||||
add ebp,ch_struc_size
|
||||
loop @b
|
||||
}
|
||||
|
||||
;Макрос отрисовки группы checkboxes.
|
||||
macro checkboxes_draw2 start,end
|
||||
{
|
||||
mov ebp,start
|
||||
mov ecx,((end-start)/ch_struc_size)
|
||||
@@:
|
||||
push ebp ;указатель на первый checkbox
|
||||
call [check_box_draw2] ;нарисовать checkbox
|
||||
add ebp,ch_struc_size
|
||||
loop @b
|
||||
}
|
||||
|
||||
macro check_boxes_set_sys_color start,end,color_table
|
||||
{
|
||||
mov ebp,start
|
||||
mov ecx,((end-start)/ch_struc_size)
|
||||
mov esi,color_table
|
||||
@@:
|
||||
push dword [esi+32] ;цвет текста в рабочей области окна
|
||||
pop dword ch_text_color
|
||||
push dword [esi+36] ;цвет графики в окне (разделительные линии и т.п.)
|
||||
pop dword ch_border_color
|
||||
add ebp,ch_struc_size
|
||||
loop @b
|
||||
}
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;Basic macros for use OptionBox ;
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
struc option_box point_gr,left,top,op_text_margin,op_size,color,border_color,text_color,text,op_text_length,flags
|
||||
{ ;структура параметров для чек бокса
|
||||
op_flag_en=10b
|
||||
.option_group: dd point_gr
|
||||
.left: dw left ;+0 ;положение по х
|
||||
.top: dw top ;положение по у
|
||||
.ch_text_margin: dd op_text_margin ;расстояние от прямоугольника чек бокса до надписи
|
||||
.ch_size: dd op_size ;размер квадрата чек бокса, для примера 12
|
||||
.color: dd color ;цвет внутри чекбокса
|
||||
.border_color: dd border_color ;цвет рамки
|
||||
.text_color: dd text_color ;цвет надписи
|
||||
.text: dd text ;адрес в коде программы где расположен текст
|
||||
.ch_text_length: dd op_text_length ;длинна строки с символами
|
||||
.flags: dd flags+0 ; флаги
|
||||
}
|
||||
|
||||
option_group equ [edi]
|
||||
op_left equ [edi+4] ;координата начала рисования по х
|
||||
op_top equ [edi+6] ;координата начала рисования по у
|
||||
op_text_margin equ [edi+8] ;=4 расстояние от прямоугольника чек бокса до надписи
|
||||
op_size equ [edi+12] ;12 размер квадрата чек бокса
|
||||
op_color equ [edi+16]
|
||||
op_border_color equ [edi+20] ; or [edi+4] ;цвет рамки checkbox ее можно задать самостоятельно
|
||||
op_text_color equ [edi+24];[edi+4] ;цвет текста
|
||||
op_text_ptr equ [edi+28] ;указатель на начало текстовой строки
|
||||
op_text_length equ [edi+32]
|
||||
op_flags equ [edi+36] ;флаги
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;Basic macros for use TreeList ;
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
struc tree_list info_size,info_max_count,style, img_cx,img_cy,\
|
||||
col_bkg,col_zag,col_txt, box_l,box_t,box_w,box_h, capt_cy,info_capt_offs,\
|
||||
info_capt_len,el_focus, p_scrol,on_press {
|
||||
.data_info dd 0
|
||||
.info_size dw info_size
|
||||
.info_max_count dd info_max_count
|
||||
.style dd style
|
||||
.data_nodes dd 0
|
||||
.data_img dd 0
|
||||
.img_cx dw img_cx
|
||||
.img_cy dw img_cy
|
||||
.data_img_sys dd 0
|
||||
.ch_tim dd 0
|
||||
.ls_tim dd 0
|
||||
.tim_undo dd 0
|
||||
.cur_pos dd 0
|
||||
.col_bkg dd col_bkg
|
||||
.col_zag dd col_zag
|
||||
.col_txt dd col_txt
|
||||
.box_left dd box_l
|
||||
.box_top dd box_t
|
||||
.box_width dd box_w
|
||||
.box_height dd box_h
|
||||
.capt_cy dw capt_cy
|
||||
.info_capt_offs dw info_capt_offs
|
||||
.info_capt_len dw info_capt_len
|
||||
.el_focus dd el_focus
|
||||
.p_scrol dd p_scrol
|
||||
rb 4
|
||||
.on_activate dd 0
|
||||
.on_press dd on_press
|
||||
}
|
||||
|
||||
tl_info_size equ word[edi +4] ;размер данных выделяемых для каждого узла (пользовательськие данные + текст для подписи)
|
||||
tl_info_max_count equ dword[edi+6] ;максимальное количество узлов, которые можно добавить в элемент
|
||||
tl_style equ dword[edi+10] ;стили элемента
|
||||
tl_data_nodes equ dword[edi+14] ;указатель на структуры узлов
|
||||
tl_data_img equ dword[edi+18] ;указатель на изображения с иконками узлов
|
||||
tl_img_cx equ word[edi+22] ;ширина иконок
|
||||
tl_img_cy equ word[edi+24] ;высота иконок
|
||||
tl_data_img_sys equ dword[edi+26] ;указатель на системные изображения (стрелки, плюсики)
|
||||
tl_ch_tim equ dword[edi+30] ;количество изменений в файле
|
||||
tl_tim_undo equ dword[edi+38] ;количество отмененных действий
|
||||
tl_cur_pos equ dword[edi+42] ;позиция курсора
|
||||
tl_col_bkg equ dword[edi+46] ;цвет фона
|
||||
tl_col_zag equ dword[edi+50] ;цвет заголовка
|
||||
tl_col_txt equ dword[edi+54] ;цвет текста
|
||||
tl_box_left equ dword[edi+58]
|
||||
tl_box_top equ dword[edi+62]
|
||||
tl_box_width equ dword[edi+66]
|
||||
tl_box_height equ dword[edi+70]
|
||||
tl_capt_cy equ word[edi+74] ;высота подписи
|
||||
tl_info_capt_offs equ word[edi+76] ;сдвиг для начала текста (подписи узла)
|
||||
tl_info_capt_len equ word[edi+78] ;длинна текста подписи узла (если = 0 то до конца структуры)
|
||||
tl_el_focus equ dword[edi+80] ;указатель на структуру элемента в фокусе
|
||||
tl_p_scrol equ dword[edi+84] ;указатель на структуру скроллинга
|
||||
tl_on_press equ dword[edi+96] ;указатель на функцию, которая вызывается при нажатии Enter
|
||||
|
||||
;data_info dd ? ;+ 0 указатель на основные даные
|
||||
;ls_tim dd ? ;+34 время последнего сохранения
|
||||
;on_activate dd ? ;+92 указатель на функцию при активировании узла
|
||||
|
||||
;константы стиля
|
||||
tl_key_no_edit equ 1b ;элемент нельзя редактировать на клавиатуре (изменять уровни, удалять)
|
||||
tl_draw_par_line equ 10b ;рисовать линии к родительскому узлу
|
||||
tl_list_box_mode equ 100b ;стиль не отображает уровни (как в ListBox все одного уровня)
|
||||
|
||||
;константы для функций
|
||||
tl_err_save_memory_size equ 10b ;не хватает памяти для сохранения элемента
|
||||
tl_err_load_caption equ 1b ;в памяти нет заголовка 'tree'
|
||||
tl_err_load_info_size equ 100b ;не совпадает размер информационной структуры при открытии
|
||||
tl_load_mode_add equ 0x20000 ;опция считывания в режиме добавления информации
|
||||
tl_save_load_heder_size equ 26 ;размер заголовка для записи/чтения элементов
|
||||
tl_offs_box equ 58 ;начало BOX структуры для tree_list
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;Basic macros for use TextEditor ;
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
ted_wnd_l equ dword[edi+ 0] ;окно редактора: отступ слева
|
||||
ted_wnd_t equ dword[edi+ 4] ;окно редактора: отступ сверху
|
||||
ted_wnd_w equ dword[edi+ 8] ;окно редактора: ширина
|
||||
ted_wnd_h equ dword[edi+12] ;окно редактора: высота
|
||||
ted_rec_l equ dword[edi+16] ;ширина панели в окне
|
||||
ted_rec_t equ dword[edi+20] ;высота панели в окне
|
||||
ted_rec_w equ dword[edi+24] ;ширина символа (знакоместа) в окне
|
||||
ted_rec_h equ dword[edi+28] ;высота символа (знакоместа) в окне
|
||||
ted_drag_m equ byte[edi+32] ;выделение от мыши
|
||||
ted_drag_k equ byte[edi+33] ;выделение от клавиатуры
|
||||
ted_sel_x0 equ dword[edi+34] ;координата выделения x0
|
||||
ted_sel_y0 equ dword[edi+38] ;координата выделения y0
|
||||
ted_sel_x1 equ dword[edi+42] ;координата выделения x1
|
||||
ted_sel_y1 equ dword[edi+46] ;координата выделения y1
|
||||
;запасные координаты выделения
|
||||
ted_seln_x0 equ dword[edi+50]
|
||||
ted_seln_y0 equ dword[edi+54]
|
||||
ted_seln_x1 equ dword[edi+58]
|
||||
ted_seln_y1 equ dword[edi+62]
|
||||
|
||||
ted_tex equ dword[edi+66] ;указатель на память для хранения текста
|
||||
ted_tex_1 equ dword[edi+70] ;указатель на 1-ю стркутру символа
|
||||
ted_tex_end equ dword[edi+74] ;указатель на последнюю структуру символа
|
||||
ted_cur_x equ dword[edi+78] ;координата x курсора
|
||||
ted_cur_y equ dword[edi+82] ;координата y курсора
|
||||
ted_max_chars equ dword[edi+86] ;максимальное число символов в одном документе
|
||||
ted_colors_text_count equ dword[edi+90] ;колличество цветов текста
|
||||
ted_key_words_count equ dword[edi+94] ;колличество ключевых слов
|
||||
ted_color_cursor equ dword[edi+98] ;цвет курсора
|
||||
ted_color_wnd_capt equ dword[edi+102] ;цвет полей вокруг окна
|
||||
ted_color_wnd_work equ dword[edi+106] ;цвет фона окна
|
||||
ted_color_wnd_bord equ dword[edi+110] ;цвет текста на полях
|
||||
ted_color_select equ dword[edi+114] ;цвет выделения
|
||||
ted_color_cur_text equ dword[edi+118] ;цвет символа под курсором
|
||||
ted_color_wnd_text equ dword[edi+122] ;цвет текста в окне
|
||||
ted_syntax_file equ dword[edi+126] ;указатель на начало файла синтаксиса
|
||||
ted_syntax_file_size equ dword[edi+130] ;максимальный размер файла синтаксиса
|
||||
ted_text_colors equ dword[edi+134] ;указатель на массив цветов текста
|
||||
ted_help_text_f1 equ dword[edi+138] ;указатель на текст справки (по нажатии F1)
|
||||
ted_help_id equ dword[edi+142] ;идентификатор для справки
|
||||
ted_key_words_data equ dword[edi+146] ;указатель на структуры ключевых слов TexColViv
|
||||
ted_tim_ch equ dword[edi+150] ;колличество изменений в файле
|
||||
ted_tim_undo equ dword[edi+154] ;колличество отмененных действий
|
||||
ted_tim_ls equ dword[edi+158] ;время последнего сохранения
|
||||
ted_tim_co equ dword[edi+162] ;время последней цветовой разметки
|
||||
ted_el_focus equ dword[edi+166] ;указатель на переменную элемента в фокусе
|
||||
ted_err_save equ byte[edi+170] ;ошибка сохранения файла
|
||||
ted_panel_id equ byte[edi+171] ;номер открытой панели
|
||||
ted_key_new equ byte[edi+172] ;символ, который будет добавлятся с клавиатуры
|
||||
ted_symbol_new_line equ byte[edi+173] ;символ завершения строки
|
||||
ted_scr_w equ dword[edi+174] ;вертикальный скроллинг
|
||||
ted_scr_h equ dword[edi+178] ;горизонтальный скроллинг
|
||||
ted_arr_key_pos equ dword[edi+182] ;указатель на массив позиций ключевых слов
|
||||
ted_buffer equ dword[edi+186] ;указатель на буфер копирования/вставки
|
||||
ted_buffer_find equ dword[edi+190] ;указатель на буфер для поиска
|
||||
ted_cur_ins equ byte[edi+194] ;режим работы курсора (обычный или замена)
|
||||
ted_mode_color equ byte[edi+195] ;режим выделения слов цветом (0-выкл. 1-вкл.)
|
||||
ted_mode_invis equ byte[edi+196] ;режим показа непечатаемых символов
|
||||
ted_gp_opt equ byte[edi+197] ;опции возвращаемые функцией ted_get_pos_by_cursor
|
||||
ted_fun_on_key_ctrl_o equ dword[edi+198] ;указатель на функцию вызываемую при нажатии Ctrl+O (открытие файла)
|
||||
ted_fun_on_key_ctrl_f equ dword[edi+202] ;... Ctrl+F (вызова/скрытия панели поиска)
|
||||
ted_fun_on_key_ctrl_n equ dword[edi+206] ;... Ctrl+N (создание нового документа)
|
||||
ted_fun_on_key_ctrl_s equ dword[edi+210] ;... Ctrl+S
|
||||
ted_buffer_size equ dword[edi+214] ;размер буфера копирования/вставки
|
||||
ted_fun_find_err equ dword[edi+218] ;указатель на функцию вызываемую если поиск закончился неудачно
|
||||
ted_fun_init_synt_err equ dword[edi+222] ;указатель на функцию вызываемую при ошибочном открытии файла синтаксиса
|
||||
ted_fun_draw_panel_buttons equ dword[edi+226] ;указатель на функцию рисования панели с кнопками
|
||||
ted_fun_draw_panel_find equ dword[edi+230] ;указатель на функцию рисования панели поиска
|
||||
ted_fun_draw_panel_syntax equ dword[edi+234] ;указатель на функцию рисования панели синтаксиса
|
||||
ted_fun_save_err equ dword[edi+238] ;указатель на функцию вызываемую если сохранение файла закончилось неудачно
|
||||
ted_increase_size equ dword[edi+242] ;число символов на которые будет увечиваться память при нехватке
|
||||
ted_ptr_free_symb equ dword[edi+246] ;указатель на свободную память, в которую можно добавлять символ (используется внутри элемента для ускорения вставки текста)
|
||||
;------------------------------------------------------------------------------
|
||||
ted_opt_ed_move_cursor equ 1 ;двигать курсор после добавления текста
|
||||
ted_opt_ed_change_time equ 2 ;добавлять изменения при редактировании текста
|
||||
ted_offs_sel equ 34 ;смещение структуры sel
|
||||
ted_offs_seln equ 50 ;смещение структуры seln
|
||||
ted_offs_count_colors equ 90 ;смещение переменной колличества цветов
|
||||
ted_offs_key_new equ 172
|
||||
ted_offs_symbol_new_line equ 173 ;смещение символа новой строки
|
||||
;------------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
; *** scroll bar constant ***
|
||||
sb_offs_size_x equ 0
|
||||
sb_offs_start_x equ 2
|
||||
sb_offs_size_y equ 4
|
||||
sb_offs_start_y equ 6
|
||||
sb_offs_max_area equ 16
|
||||
sb_offs_cur_area equ 20
|
||||
sb_offs_position equ 24
|
||||
sb_offs_bckg_col equ 28
|
||||
sb_offs_frnt_col equ 32
|
||||
sb_offs_line_col equ 36
|
||||
sb_offs_redraw equ 40
|
||||
sb_offs_delta2 equ 46
|
||||
sb_offs_all_redraw equ 80
|
||||
;------------------------------------------------------------------------------
|
@ -1,205 +0,0 @@
|
||||
;*****************************************************************************
|
||||
; Example for Box_lib: checkbox
|
||||
; Copyright (c) 2007-2010, Alexey Teplov aka <Lrz>
|
||||
; All rights reserved.
|
||||
;
|
||||
; Redistribution and use in source and binary forms, with or without
|
||||
; modification, are permitted provided that the following conditions are met:
|
||||
; * Redistributions of source code must retain the above copyright
|
||||
; notice, this list of conditions and the following disclaimer.
|
||||
; * Redistributions in binary form must reproduce the above copyright
|
||||
; notice, this list of conditions and the following disclaimer in the
|
||||
; documentation and/or other materials provided with the distribution.
|
||||
; * Neither the name of the <organization> nor the
|
||||
; names of its contributors may be used to endorse or promote products
|
||||
; derived from this software without specific prior written permission.
|
||||
;
|
||||
; THIS SOFTWARE IS PROVIDED BY Alexey Teplov ''AS IS'' AND ANY
|
||||
; EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
; WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
; DISCLAIMED. IN NO EVENT SHALL <copyright holder> BE LIABLE FOR ANY
|
||||
; DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
; (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
; ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
; (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
; SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
;******************************************************************************
|
||||
|
||||
use32
|
||||
org 0x0
|
||||
;------------ <head> from kolibrios programm
|
||||
db 'MENUET01'
|
||||
dd 0x01
|
||||
dd START
|
||||
dd MEM_END
|
||||
dd PRIL_END
|
||||
dd PRIL_END
|
||||
dd 0x0
|
||||
dd cur_dir_path
|
||||
;------------ </head>
|
||||
;------------ <include macros>
|
||||
include '../../../../macros.inc'
|
||||
include '../load_lib.mac'
|
||||
include 'box_lib.mac'
|
||||
;include 'macros.inc'
|
||||
;include 'load_lib.mac'
|
||||
;------------ </include macros>
|
||||
;------------ <init library>
|
||||
@use_library
|
||||
;------------ </init library>
|
||||
;---------------------------------------------------------------------
|
||||
;--- Start of program ----------------------------------------------
|
||||
;---------------------------------------------------------------------
|
||||
START:
|
||||
mcall 40,0x27
|
||||
|
||||
sys_load_library library_name, cur_dir_path, library_path, system_path, \
|
||||
err_message_found_lib, head_f_l, myimport, err_message_import, head_f_i
|
||||
test eax,eax
|
||||
jnz exit
|
||||
;init checkboxes
|
||||
push dword check1
|
||||
call [init_checkbox]
|
||||
|
||||
push dword check2
|
||||
call [init_checkbox]
|
||||
|
||||
push dword check3
|
||||
call [init_checkbox]
|
||||
|
||||
push dword check4
|
||||
call [init_checkbox]
|
||||
|
||||
push dword check5
|
||||
call [init_checkbox]
|
||||
|
||||
push dword check6
|
||||
call [init_checkbox]
|
||||
|
||||
|
||||
window:
|
||||
call draw_window ;ïåðâîíà÷àëüíî íåîáõîäèìî íàðèñîâàòü îêíî
|
||||
align 4
|
||||
still: ;îñíîâíîé îáðàáîò÷èê
|
||||
mcall 10 ;Îæèäàòü ñîáûòèÿ
|
||||
dec eax
|
||||
jz window
|
||||
dec eax
|
||||
jz key
|
||||
dec eax
|
||||
jz button
|
||||
|
||||
push dword check1
|
||||
call [check_box_mouse]
|
||||
|
||||
push dword check2
|
||||
call [check_box_mouse]
|
||||
|
||||
push dword check3
|
||||
call [check_box_mouse]
|
||||
|
||||
|
||||
push dword check4
|
||||
call [check_box_mouse]
|
||||
|
||||
push dword check5
|
||||
call [check_box_mouse]
|
||||
|
||||
push dword check6
|
||||
call [check_box_mouse]
|
||||
|
||||
|
||||
jmp still ;åñëè íè÷åãî èç ïåðå÷èñëåííîãî òî ñíîâà â öèêë
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
button:
|
||||
mcall 17 ;ïîëó÷èòü èäåíòèôèêàòîð íàæàòîé êëàâèøè
|
||||
test ah,ah ;åñëè â ah 0, òî ïåðåéòè íà îáðàáîò÷èê ñîáûòèé still
|
||||
jz still
|
||||
exit: mcall -1
|
||||
key:
|
||||
mcall 2 ;çàãðóçèì çíà÷åíèå 2 â ðåãèñòîð eax è ïîëó÷èì êîä íàæàòîé êëàâèøè
|
||||
|
||||
jmp still
|
||||
|
||||
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
|
||||
align 4
|
||||
draw_window: ;ðèñîâàíèå îêíà ïðèëîæåíèÿ
|
||||
mcall 12,1
|
||||
mcall 0,(50*65536+390),(30*65536+200),0x33AABBCC,0x805080DD,hed
|
||||
|
||||
push dword check1
|
||||
call [check_box_draw]
|
||||
|
||||
push dword check2
|
||||
call [check_box_draw]
|
||||
|
||||
push dword check3
|
||||
call [check_box_draw]
|
||||
|
||||
push dword check4
|
||||
call [check_box_draw]
|
||||
|
||||
push dword check5
|
||||
call [check_box_draw]
|
||||
|
||||
push dword check6
|
||||
call [check_box_draw]
|
||||
|
||||
|
||||
mcall 12,2
|
||||
ret
|
||||
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
|
||||
;DATA äàííûå
|
||||
;Âñåãäà ñîáëþäàòü ïîñëåäîâàòåëüíîñòü â èìåíè.
|
||||
system_path db '/sys/lib/'
|
||||
library_name db 'box_lib.obj',0
|
||||
; Åñëè åñòü æåëàíèå ðàçúåäèíèòü, òî íóæíî èñïîëüçîâàòü ñëåäóþùèþ êîíñòðóêöèþ
|
||||
;system_path db '/sys/lib/box_lib.obj',0
|
||||
;... ëþáàÿ ïîñëåäîâàòåëüíîñòü äðóãèõ êîìàíä è îïðåäåëåíèé.
|
||||
;library_name db 'box_lib.obj',0
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
err_message_found_lib db 'Sorry I cannot load library box_lib.obj',0
|
||||
head_f_i:
|
||||
head_f_l db 'System error',0
|
||||
err_message_import db 'Error on load import library box_lib.obj',0
|
||||
|
||||
myimport:
|
||||
|
||||
init_checkbox dd aInit_checkbox
|
||||
check_box_draw dd aCheck_box_draw
|
||||
check_box_mouse dd aCheck_box_mouse
|
||||
version_ch dd aVersion_ch
|
||||
dd 0,0
|
||||
|
||||
|
||||
aInit_checkbox db 'init_checkbox2',0
|
||||
aCheck_box_draw db 'check_box_draw2',0
|
||||
aCheck_box_mouse db 'check_box_mouse2',0
|
||||
aVersion_ch db 'version_ch2',0
|
||||
;---------------------------------------------------------------------
|
||||
check1 check_box2 (10 shl 16 + 12),(10 shl 16 + 12),6,0xC0AABBCC,0,0x80000000,check_text,ch_flag_en
|
||||
check2 check_box2 (10 shl 16 + 22),(25 shl 16 + 12),6,0xC0AABBCC,0,0x80000000,check_text2
|
||||
check3 check_box2 (10 shl 16 + 12),(40 shl 16 + 22),6,0xC0AABBCC,0,0x80000000,check_text3
|
||||
check4 check_box2 (10 shl 16 + 12),(70 shl 16 + 22),6,0xC0AABBCC,0,0x80000000,check_text4,ch_flag_top
|
||||
check5 check_box2 (10 shl 16 + 12),(100 shl 16 + 22),6,0xC0AABBCC,0,0x80000000,check_text5,ch_flag_middle
|
||||
check6 check_box2 (10 shl 16 + 12),(130 shl 16 + 22),6,0xC0AABBCC,0,0x80000000,check_text6,ch_flag_bottom
|
||||
;---------------------------------------------------------------------
|
||||
hed db 'CheckBox Exemples <Lrz> date 15.10.2010',0
|
||||
hed_end:
|
||||
;---------------------------------------------------------------------
|
||||
check_text db 'First checkbox, set flag ch_flag_en',0
|
||||
check_text2 db 'Second checkbox,not set any flag',0
|
||||
check_text3 db 'Number 3 checkbox, not set any flag',0
|
||||
check_text4 db 'Set flag is ch_flag_top',0
|
||||
check_text5 db 'Set flag is ch_flag_middle',0
|
||||
check_text6 db 'Set flag is ch_flag_bottom',0
|
||||
;---------------------------------------------------------------------
|
||||
MEM_END:
|
||||
cur_dir_path rb 1024
|
||||
library_path rb 1024
|
||||
rb 1024 ;for stack
|
||||
PRIL_END:
|
||||
|
||||
|
@ -1,2 +0,0 @@
|
||||
@fasm -m 16384 checkbox.asm checkbox.kex
|
||||
if exist checkbox.kex @kpack checkbox.kex
|
@ -1,155 +0,0 @@
|
||||
;Последная модификация 03.10.2010
|
||||
;файл создан 13.02.2009 <Lrz> На код применена GPL2 лицензия
|
||||
;Макрос для системной библиотеки box_lib.obj
|
||||
;Checkbox
|
||||
|
||||
;Инициализация checkbox
|
||||
macro _init_checkbox2
|
||||
{
|
||||
init_checkbox2:
|
||||
;подсчитаем кол-во символов в длинне выводимой строки.
|
||||
pushad
|
||||
mov ebp,dword [esp+36] ;загружаем указатель на структуру, указатель мы передаем в стеке
|
||||
mov ebx,dword 2ch_text_margin ;eax=0
|
||||
mov esi,dword 2ch_text_ptr ;указатель на строчку
|
||||
lodsb ;в al первый символ из строки
|
||||
test al,al
|
||||
jz .ex_loop
|
||||
@@:
|
||||
add ebx,6 ;ширина символа
|
||||
lodsb
|
||||
test al,al
|
||||
jnz @b
|
||||
.ex_loop:
|
||||
|
||||
mov dword 2ch_sz_str,ebx ;запишим длинну строки с учетом отступа от квадратика
|
||||
popad
|
||||
ret 4
|
||||
}
|
||||
|
||||
macro use_checkbox_draw2
|
||||
{
|
||||
check_box_draw2:
|
||||
pushad ;сохраним все регистры
|
||||
mov ebp,dword [esp+36] ;загружаем указатель на структуру, указатель мы передаем в стеке
|
||||
mcall 13,2ch_left_s,2ch_top_s,2ch_border_color ;рисуем рамку чек бокса, фактически рисуем прямоугольник и закрашиваем фон внутри цветом рамки бокса
|
||||
|
||||
mov edx,dword 2ch_color ;загружаем цвет фона
|
||||
add ebx,1 shl 16 - 2
|
||||
add ecx,1 shl 16 - 2
|
||||
mcall ;закрашиваем внутренности чекбокса фоном
|
||||
|
||||
test dword 2ch_flags,2 ;достать значение бита из переменной и поместить в флаг CF
|
||||
jz @f ;в если CF=1, то выполним следующую процедуру иначе перейти на нижнюю @@
|
||||
call check_box_draw_ch2 ;нарисовать включенный чек бокс
|
||||
@@:
|
||||
;----------------------------
|
||||
;расчет куда будет произведен вывод текста
|
||||
;----------------------------
|
||||
; mov ebx,dword ch_left_s ;загрузить значение (х shl 16 + длинна) для чек бокса
|
||||
; add ebx,dword ch_text_margin ;добавим размер стороны и расстояние на котором начнется вывод текста
|
||||
; shl ebx,16 ;сдвинем на 16 разрядов в лево (умножим на 65536)
|
||||
; add ebx,dword ch_left_s ;cкорректируем позицию Х. Т.е. сейчас в верхней части ebx у нас точка начала вывода текста по Х
|
||||
|
||||
; mov eax,word ch_top_s ;загрузим значение по (y shl 16 + длинна) для чек бокса
|
||||
; shr eax,16 ;сдвинем на 16 разрядов в лево (умножим на 65536)
|
||||
; add eax,dword ch_top_s ;cкорректируем позицию Х. Т.е. сейчас в верхней части ebx у нас точка начала вывода текста по Y
|
||||
|
||||
; Оптимизация для ЦП
|
||||
mov ebx,dword 2ch_left_s ;загрузить значение (х shl 16 + длинна) для чек бокса
|
||||
mov eax,dword 2ch_top_s ;загрузим значение по (y shl 16 + длинна) для чек бокса
|
||||
mov ecx,eax
|
||||
add ebx,dword 2ch_text_margin ;добавим размер стороны и расстояние на котором начнется вывод текста
|
||||
shr eax,16 ;сдвинем на 16 разрядов в право (разделим на 65536) в ax верхная точка
|
||||
shl ebx,16 ;сдвинем на 16 разрядов в лево (умножим на 65536)
|
||||
|
||||
sub ecx,8 ;корретировка учитываем высоту шрифта
|
||||
|
||||
test dword 2ch_flags,ch_flag_bottom ;проверим, нужно ли выводить вверху надпись
|
||||
jnz .bottom
|
||||
|
||||
test dword 2ch_flags,ch_flag_middle ;проверим, нужно ли выводить в центр надпись
|
||||
jz .top ;остался только top
|
||||
|
||||
shr cx,1 ;разделим на 2
|
||||
.bottom:
|
||||
add ax,cx
|
||||
.top:
|
||||
add ebx,dword 2ch_left_s ;cкорректируем позицию Х. Т.е. сейчас в верхней части ebx у нас точка начала вывода текста по Х
|
||||
mov bx,ax
|
||||
;ebx х shl 16 +y координаты вывода строчки
|
||||
|
||||
mov ecx,dword 2ch_text_color ;загрузим цвет надписи + flags
|
||||
mov edx,dword 2ch_text_ptr ;укажем адрес от куда нужно выводить строку
|
||||
mcall 4 ;Вывод
|
||||
popad ;восстановить значения регистров из стека
|
||||
ret 4 ;выйдем из процедуры и удалим из стека указатель на структуру (4 байта)
|
||||
|
||||
check_box_clear_ch2: ;очистка чек бокса
|
||||
mov edx,dword 2ch_color ;цвет внутри чек бокса
|
||||
jmp @f ;безусловный прыжок на нижнюю метку @@
|
||||
check_box_draw_ch2: ;нарисовать включенный чек бокс
|
||||
mov edx,dword 2ch_border_color ;загрузить цвет
|
||||
@@:
|
||||
;Отобразить включеный checkbox
|
||||
mov ebx,dword 2ch_left_s ;загружаем х shl 16 + длинна по Х
|
||||
mov ecx,dword 2ch_top_s ;загружаем Y shl 16 + длинна по Y
|
||||
add ebx,2 shl 16 - 4 ;после этих изменений (X+2) shl 16 +длинна по (Х-2)
|
||||
add ecx,2 shl 16 - 4 ;после этих изменений (Y+2) shl 16 +длинна по (Y-2)
|
||||
mcall 13 ;отобразить квадрат внутри checkbox
|
||||
ret
|
||||
}
|
||||
|
||||
|
||||
macro use_checkbox_mouse2
|
||||
{
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;Обработчик mouse
|
||||
;При попадании мышки + нажата клавиша в область checkbox состояние бокса должно менятся активный - не активный.
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
check_box_mouse2: ;обработка мыши
|
||||
pushad
|
||||
mov ebp,dword [esp+36] ;загружаем указатель на структуру, указатель мы передаем в стеке
|
||||
mcall 37,2 ;проверяем состояние клавиш мышки. Было ли событие нажатая клавиша на мышке.
|
||||
test eax,eax ;проверка если у нас в eax=0, выйдем
|
||||
jz .check_box_mouse_end ;обработка закончилась
|
||||
; Да событие: нажатие клавиши мышки произошло.
|
||||
@@:
|
||||
mcall 37,1 ;получить координаты курсора относительно окна
|
||||
;на выходе в eax x shl 16 + y
|
||||
;сравнение верхней точки по Y
|
||||
mov ecx,dword 2ch_top_s ;y shl 16 +длинна по y
|
||||
mov ebx,ecx
|
||||
shr ebx,16 ;bx = координата по y
|
||||
cmp ax,bx
|
||||
jb .check_box_mouse_end ;указатель мышки меньше начальной координаты по y чем координата по Y у бокса
|
||||
;сравнение нижней точки по Y
|
||||
add cx,bx ;сложим длинну по y и координату верхней точки по y поличим координату нижней точки по Y
|
||||
cmp ax,cx
|
||||
ja .check_box_mouse_end ;указатель мышки больше конечной координаты по y чем координата по Y у бокса
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
shr eax,16 ;сместим координату по Х в нижную часть регистра т.е. в ax
|
||||
;сравнение по начальной точке Х
|
||||
mov ecx,dword 2ch_left_s ;загрузить значение (х shl 16 + длинна) для чек бокса
|
||||
mov ebx,ecx
|
||||
shr ebx,16 ;bx = координата по X
|
||||
cmp ax,bx
|
||||
jb .check_box_mouse_end ;указатель мышки меньше начальной координаты по X чем координата по X у бокса
|
||||
;сравнение конечной точки по X
|
||||
add bx,cx ;сложим длинну по x и координату точки по х получим координату конечной точки по Х
|
||||
add bx,word 2ch_sz_str ;добавим длинну строки текста с отступом предвартиельно записав их в момент инициализации
|
||||
cmp ax,bx
|
||||
ja .check_box_mouse_end ;указатель мышки больше конечной координаты по х чем координата по Х у бокса
|
||||
;если все проверки были успешно пройдены мы обязаны поменять состояние бокса
|
||||
btc dword 2ch_flags,2 ;перенос 2-го бита в cf и инверсия его
|
||||
jc .enable_box ;если CF=1 то отобразим включенный бокс и выйдем
|
||||
push dword .check_box_mouse_end ;фокус -покус, вернемся после вызова check_box_clear_ch на метку check_box_mouse_end
|
||||
jmp check_box_clear_ch2 ;выключить чек бокс т.е. на месте закрашенного прямоугольника отобразить цвет фона.
|
||||
|
||||
.enable_box:
|
||||
call check_box_draw_ch2 ;отобразить включенный чек бокс
|
||||
.check_box_mouse_end:
|
||||
popad ;восстановить регистры из стека
|
||||
ret 4 ;выйти и восстановим стек
|
||||
}
|
@ -1,5 +0,0 @@
|
||||
# This is exeperemental source code for trunk, not stable.
|
||||
# Это экспериментальные наброски, которые в дальнейшем будут включены в trunk.
|
||||
# Причина появления: Мной была потеряна работа по изменению библиотеки box_lib, т.к. приходиться работать на разных ПК,
|
||||
# в разное время, и в разных местах.
|
||||
# <Lrz>, 03/10/2010.
|
@ -1,4 +0,0 @@
|
||||
if not exist bin mkdir bin
|
||||
@fasm.exe -m 16384 box_lib.asm bin\box_lib.obj
|
||||
@kpack bin\box_lib.obj
|
||||
pause
|
@ -1,7 +0,0 @@
|
||||
include 'scrollbar.mac' ;macro implements scrollbar
|
||||
include 'd_button.mac' ;macro implements dinamic_button
|
||||
include 'menubar.mac' ;macro implements menubar
|
||||
include 'filebrowser.mac' ;macro implements filebrowser
|
||||
include 'pathshow.mac' ;macro implements pathshow
|
||||
include 'frame.mac' ;macro implements frame
|
||||
include 'progressbar.mac' ;macro implements progressbar
|
@ -1,6 +1,6 @@
|
||||
;*****************************************************************************
|
||||
; Box_Lib - library of graphical components
|
||||
; Copyright (C) KolibriOS team 2008-2016. All rights reserved.
|
||||
; Copyright (C) KolibriOS team 2008-2020. All rights reserved.
|
||||
;
|
||||
; Authors:
|
||||
; Alexey Teplov aka <Lrz>
|
||||
@ -19,7 +19,6 @@ section '.flat' code readable align 16
|
||||
include '../../../../macros.inc'
|
||||
include '../../../../proc32.inc'
|
||||
include '../../../../KOSfuncs.inc'
|
||||
include 'bl_sys.mac'
|
||||
include 'box_lib.mac' ;macro which should make life easier :)
|
||||
;include '../../../../debug.inc'
|
||||
include 'keys.inc'
|
||||
@ -31,71 +30,20 @@ mem.realloc dd ? ;
|
||||
dll.load dd ?
|
||||
|
||||
;----------------------------------------------------
|
||||
;EditBox
|
||||
include 'editbox.asm' ;editbox
|
||||
|
||||
;----------------------------------------------------
|
||||
;CheckBox
|
||||
include 'checkbox.asm' ;checkbox
|
||||
|
||||
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
|
||||
;--------------------------------------------------
|
||||
;radiobutton Group
|
||||
include 'optionbox.asm' ;optionbox
|
||||
|
||||
;--------------------------------------------------
|
||||
;scrollbar Group
|
||||
;--------------------------------------------------
|
||||
align 16
|
||||
use_scroll_bar
|
||||
align 16
|
||||
use_scroll_bar_vertical
|
||||
align 16
|
||||
use_scroll_bar_horizontal
|
||||
|
||||
;--------------------------------------------------
|
||||
;dinamic button Group
|
||||
;--------------------------------------------------
|
||||
align 16
|
||||
use_dinamic_button
|
||||
|
||||
;--------------------------------------------------
|
||||
;menubar Group
|
||||
;--------------------------------------------------
|
||||
align 16
|
||||
use_menu_bar
|
||||
|
||||
;--------------------------------------------------
|
||||
;filebrowser Group
|
||||
;--------------------------------------------------
|
||||
align 16
|
||||
use_file_browser
|
||||
|
||||
;--------------------------------------------------
|
||||
;tree list
|
||||
include 'tree_list.asm' ;tree_list, list_box
|
||||
|
||||
;--------------------------------------------------
|
||||
;PathShow Group
|
||||
;--------------------------------------------------
|
||||
align 16
|
||||
use_path_show
|
||||
|
||||
;--------------------------------------------------
|
||||
;text editor
|
||||
include 't_edit.asm' ;text_editor
|
||||
|
||||
;--------------------------------------------------
|
||||
;Frame Group
|
||||
;--------------------------------------------------
|
||||
align 16
|
||||
use_frame
|
||||
;--------------------------------------------------
|
||||
;ProgressBar
|
||||
;--------------------------------------------------
|
||||
use_progressbar
|
||||
|
||||
;--------------------------------------------------
|
||||
include 'tooltip.asm' ;tooltip
|
||||
|
||||
;input:
|
||||
; eax = óêàçàòåëü íà ôóíêöèþ âûäåëåíèÿ ïàìÿòè
|
||||
@ -115,23 +63,23 @@ 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,dword[col_1]
|
||||
mov esi,[col_1]
|
||||
and esi,111111101111111011111110b
|
||||
|
||||
mov eax,SF_DRAW_RECT
|
||||
;bottom line
|
||||
mov edx,dword[col_2]
|
||||
mov ebx,dword[box_l]
|
||||
mov edx,[col_2]
|
||||
mov ebx,[box_l]
|
||||
shl ebx,16
|
||||
add ebx,dword[box_w]
|
||||
add ebx,[box_w]
|
||||
inc ebx ;äëÿ çàëèâêè äèàãîíàëüíûõ ïèêñåëåé
|
||||
mov ecx,dword[box_t]
|
||||
add ecx,dword[box_h]
|
||||
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
|
||||
@ -146,17 +94,17 @@ proc draw_edge uses eax ebx ecx edx edi esi, box_l:dword, box_t:dword, box_w:dwo
|
||||
jnz @b
|
||||
|
||||
;right line
|
||||
mov edx,dword[col_2]
|
||||
mov ebx,dword[box_l]
|
||||
add ebx,dword[box_w]
|
||||
mov edx,[col_2]
|
||||
mov ebx,[box_l]
|
||||
add ebx,[box_w]
|
||||
shl ebx,16
|
||||
inc ebx
|
||||
mov ecx,dword[box_t]
|
||||
mov ecx,[box_t]
|
||||
shl ecx,16
|
||||
add ecx,dword[box_h]
|
||||
add ecx,[box_h]
|
||||
|
||||
mov edi,3 ;for cycle
|
||||
@@:
|
||||
@@:
|
||||
;calculate colors
|
||||
and edx,111111101111111011111110b
|
||||
add edx,esi
|
||||
@ -171,11 +119,11 @@ proc draw_edge uses eax ebx ecx edx edi esi, box_l:dword, box_t:dword, box_w:dwo
|
||||
jnz @b
|
||||
|
||||
;top line
|
||||
mov edx,dword[col_0]
|
||||
mov ebx,dword[box_l]
|
||||
mov edx,[col_0]
|
||||
mov ebx,[box_l]
|
||||
shl ebx,16
|
||||
add ebx,dword[box_w]
|
||||
mov ecx,dword[box_t]
|
||||
add ebx,[box_w]
|
||||
mov ecx,[box_t]
|
||||
shl ecx,16
|
||||
inc ecx
|
||||
|
||||
@ -195,16 +143,16 @@ proc draw_edge uses eax ebx ecx edx edi esi, box_l:dword, box_t:dword, box_w:dwo
|
||||
jnz @b
|
||||
|
||||
;left line
|
||||
mov edx,dword[col_0]
|
||||
mov ebx,dword[box_l]
|
||||
mov edx,[col_0]
|
||||
mov ebx,[box_l]
|
||||
shl ebx,16
|
||||
inc ebx
|
||||
mov ecx,dword[box_t]
|
||||
mov ecx,[box_t]
|
||||
shl ecx,16
|
||||
add ecx,dword[box_h]
|
||||
add ecx,[box_h]
|
||||
|
||||
mov edi,3 ;for cycle
|
||||
@@:
|
||||
@@:
|
||||
;calculate colors
|
||||
and edx,111111101111111011111110b
|
||||
add edx,esi
|
||||
@ -235,9 +183,9 @@ 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_checkbox2, init_checkbox2
|
||||
dd sz_check_box_draw2, check_box_draw2
|
||||
dd sz_check_box_mouse2, check_box_mouse2
|
||||
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
|
||||
@ -349,9 +297,9 @@ 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_checkbox2 db 'init_checkbox2',0
|
||||
sz_check_box_draw2 db 'check_box_draw2',0
|
||||
sz_check_box_mouse2 db 'check_box_mouse2',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
|
||||
|
@ -108,30 +108,22 @@ macro edit_boxes_set_sys_color start,end,color_table
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;Basic macros for use CheckBox ;
|
||||
;Last change 17.01.2013 ;
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
ch_text_margin equ [edi+8] ;=4 à ááâ®ï¨¥ ®â ¯àאַ㣮«ì¨ª 祪 ¡®ªá ¤® ¤¯¨á¨
|
||||
ch_color equ [edi+12] ;梥⠢ãâਠcheckbox
|
||||
ch_border_color equ [edi+16] ; or [edi+4] ;梥â à ¬ª¨ checkbox ¥¥ ¬®¦® § ¤ âì á ¬®áâ®ï⥫ì®
|
||||
ch_text_color equ [edi+20] ;[edi+4] ;梥â ⥪áâ
|
||||
ch_text_ptr equ [edi+24] ;㪠§ ⥫ì ç «® ⥪á⮢®© áâப¨
|
||||
ch_flags equ [edi+28] ;ä« £¨
|
||||
|
||||
ch_struc_size=36 ;à §¬¥à áâàãªâãàë
|
||||
ch_flag_en=10b ;ä« £ ãáâ ®¢«¥®£® 祪 ¡®ªá .
|
||||
ch_flag_top=0x0 ;ä« £ à ᯮ«®¦¥¨ï ⥪áâ ¢¢¥àåã â.¥. 3-© ¡¨â
|
||||
ch_flag_middle=100b ;ä« £ à ᯮ«®¦¥¨ï ⥪áâ ¢ æ¥âॠâ.¥. 4-© ¡¨â.
|
||||
ch_flag_bottom=1000b ;ä« £ à ᯮ«®¦¥¨ï ⥪áâ ¢ ¨§ã â.¥. ¯® 㬮«ç ¨î ¯à¨¨¬ ¥âáï § 票¥ ¢¨§ã â.¥. ®âáãá⢨¥ 3-£® ¨ 4-£® ¡¨â
|
||||
|
||||
2ch_left_s equ [ebp] ;ª®à¤¨ â ç « à¨á®¢ ¨ï ¯® å
|
||||
2ch_top_s equ [ebp+4] ;ª®®à¤¨ â ç « à¨á®¢ ¨ï ¯® ã
|
||||
2ch_text_margin equ [ebp+8] ;=4 à ááâ®ï¨¥ ®â ¯àאַ㣮«ì¨ª 祪 ¡®ªá ¤® ¤¯¨á¨
|
||||
2ch_color equ [ebp+12] ;梥⠢ãâਠcheckbox
|
||||
2ch_border_color equ [ebp+16] ; or [edi+4] ;梥â à ¬ª¨ checkbox ¥¥ ¬®¦® § ¤ âì á ¬®áâ®ï⥫ì®
|
||||
2ch_text_color equ [ebp+20] ;[edi+4] ;梥â ⥪áâ
|
||||
2ch_text_ptr equ [ebp+24] ;㪠§ ⥫ì ç «® ⥪á⮢®© áâப¨
|
||||
2ch_flags equ [ebp+28] ;ä« £¨
|
||||
2ch_sz_str equ [ebp+32] ;¤«¨ áâப¨, ¢ëç¨á«ï¥âáï ¯à¨ ¨¨æ¨ «¨§ 樨 ª®¬¯®¥â
|
||||
ch_left_s equ [ebp] ;ª®à¤¨ â ç « à¨á®¢ ¨ï ¯® å
|
||||
ch_top_s equ [ebp+4] ;ª®®à¤¨ â ç « à¨á®¢ ¨ï ¯® ã
|
||||
ch_text_margin equ [ebp+8] ;=4 à ááâ®ï¨¥ ®â ¯àאַ㣮«ì¨ª 祪 ¡®ªá ¤® ¤¯¨á¨
|
||||
ch_color equ [ebp+12] ;梥⠢ãâਠcheckbox
|
||||
ch_border_color equ [ebp+16] ; or [edi+4] ;梥â à ¬ª¨ checkbox ¥¥ ¬®¦® § ¤ âì á ¬®áâ®ï⥫ì®
|
||||
ch_text_color equ [ebp+20] ;[edi+4] ;梥â ⥪áâ
|
||||
ch_text_ptr equ [ebp+24] ;㪠§ ⥫ì ç «® ⥪á⮢®© áâப¨
|
||||
ch_flags equ [ebp+28] ;ä« £¨
|
||||
ch_sz_str equ [ebp+32] ;¤«¨ áâப¨, ¢ëç¨á«ï¥âáï ¯à¨ ¨¨æ¨ «¨§ 樨 ª®¬¯®¥â
|
||||
|
||||
struc check_box2 left_s,top_s,ch_text_margin,color,border_color,text_color,text,flags
|
||||
{ ;áâàãªâãà ¯ à ¬¥â஢ ¤«ï 祪 ¡®ªá
|
||||
@ -143,7 +135,7 @@ struc check_box2 left_s,top_s,ch_text_margin,color,border_color,text_color,text,
|
||||
.text_color dd text_color ;梥⠤¯¨á¨
|
||||
.text dd text ; ¤à¥á ¢ ª®¤¥ ¯à®£à ¬¬ë £¤¥ à ᯮ«®¦¥ ⥪áâ
|
||||
.flags dd flags+0 ;ä« £¨
|
||||
.size_of_str dd 0x0 ;¤«¨ áâப¨, ¢ëç¨á«ï¥âáï ¯à¨ ¨¨æ¨ «¨§ 樨 ª®¬¯®¥â
|
||||
.size_of_str dd 0 ;¤«¨ áâப¨, ¢ëç¨á«ï¥âáï ¯à¨ ¨¨æ¨ «¨§ 樨 ª®¬¯®¥â
|
||||
}
|
||||
|
||||
;Œ ªà®á ¯à®¢¥àª¨ é¥«çª ¬ë誨 ¤ £à㯯®© checkboxes.
|
||||
@ -211,9 +203,9 @@ macro check_boxes_set_sys_color2 start,end,color_table
|
||||
@@:
|
||||
push dword [esi+32] ;梥â ⥪áâ ¢ à ¡®ç¥© ®¡« á⨠®ª
|
||||
or dword [esp],0x80000000 ;¥®¡å®¤¨¬® ¤«ï ¢ë¢®¤ ASCIIZ áâப
|
||||
pop dword 2ch_text_color
|
||||
pop dword ch_text_color
|
||||
push dword [esi+36] ;梥⠣à 䨪¨ ¢ ®ª¥ (à §¤¥«¨â¥«ìë¥ «¨¨¨ ¨ â.¯.)
|
||||
pop dword 2ch_border_color
|
||||
pop dword ch_border_color
|
||||
add ebp,ch_struc_size
|
||||
loop @b
|
||||
}
|
||||
|
@ -1,15 +1,15 @@
|
||||
;Последная модификация 07.12.2016
|
||||
;Последная модификация 08.12.2020
|
||||
;файл создан 13.02.2009 <Lrz> На код применена GPL2 лицензия
|
||||
;Checkbox
|
||||
|
||||
;Инициализация checkbox
|
||||
align 16
|
||||
init_checkbox2:
|
||||
init_checkbox:
|
||||
;подсчитаем кол-во символов в длинне выводимой строки.
|
||||
pushad
|
||||
mov ebp,dword [esp+36] ;загружаем указатель на структуру, указатель мы передаем в стеке
|
||||
mov ebx,dword 2ch_text_margin ;eax=0
|
||||
mov esi,dword 2ch_text_ptr ;указатель на строчку
|
||||
mov ebx,dword ch_text_margin ;eax=0
|
||||
mov esi,dword ch_text_ptr ;указатель на строчку
|
||||
lodsb ;в al первый символ из строки
|
||||
test al,al
|
||||
jz .ex_loop
|
||||
@ -20,27 +20,27 @@ init_checkbox2:
|
||||
jnz @b
|
||||
.ex_loop:
|
||||
|
||||
mov dword 2ch_sz_str,ebx ;запишем длинну строки с учетом отступа от квадратика
|
||||
or dword 2ch_text_color,0x80000000 ;добавляем бит для вывода ASCIIZ-строки
|
||||
mov dword ch_sz_str,ebx ;запишем длинну строки с учетом отступа от квадратика
|
||||
or dword ch_text_color,0x80000000 ;добавляем бит для вывода ASCIIZ-строки
|
||||
;на случай если пользователь забыл его самостоятельно поставить в структуре
|
||||
popad
|
||||
ret 4
|
||||
|
||||
|
||||
align 16
|
||||
check_box_draw2:
|
||||
check_box_draw:
|
||||
pushad ;сохраним все регистры
|
||||
mov ebp,dword [esp+36] ;загружаем указатель на структуру, указатель мы передаем в стеке
|
||||
mcall SF_DRAW_RECT,2ch_left_s,2ch_top_s,2ch_border_color ;рисуем рамку чек бокса, фактически рисуем прямоугольник и закрашиваем фон внутри цветом рамки бокса
|
||||
mcall SF_DRAW_RECT,ch_left_s,ch_top_s,ch_border_color ;рисуем рамку чек бокса, фактически рисуем прямоугольник и закрашиваем фон внутри цветом рамки бокса
|
||||
|
||||
mov edx,dword 2ch_color ;загружаем цвет фона
|
||||
mov edx,dword ch_color ;загружаем цвет фона
|
||||
add ebx,1 shl 16 - 2
|
||||
add ecx,1 shl 16 - 2
|
||||
mcall ;закрашиваем внутренности чекбокса фоном
|
||||
|
||||
test dword 2ch_flags,2 ;достать значение бита из переменной и поместить в флаг CF
|
||||
test dword ch_flags,2 ;достать значение бита из переменной и поместить в флаг CF
|
||||
jz @f ;в если CF=1, то выполним следующую процедуру иначе перейти на нижнюю @@
|
||||
call check_box_draw_ch2 ;нарисовать включенный чек бокс
|
||||
call check_box_draw_ch ;нарисовать включенный чек бокс
|
||||
@@:
|
||||
;----------------------------
|
||||
;расчет куда будет произведен вывод текста
|
||||
@ -55,44 +55,44 @@ check_box_draw2:
|
||||
; add eax,dword ch_top_s ;cкорректируем позицию Х. Т.е. сейчас в верхней части ebx у нас точка начала вывода текста по Y
|
||||
|
||||
; Оптимизация для ЦП
|
||||
mov ebx,dword 2ch_left_s ;загрузить значение (х shl 16 + длинна) для чек бокса
|
||||
mov eax,dword 2ch_top_s ;загрузим значение по (y shl 16 + длинна) для чек бокса
|
||||
mov ebx,dword ch_left_s ;загрузить значение (х shl 16 + длинна) для чек бокса
|
||||
mov eax,dword ch_top_s ;загрузим значение по (y shl 16 + длинна) для чек бокса
|
||||
mov ecx,eax
|
||||
add ebx,dword 2ch_text_margin ;добавим размер стороны и расстояние на котором начнется вывод текста
|
||||
add ebx,dword ch_text_margin ;добавим размер стороны и расстояние на котором начнется вывод текста
|
||||
shr eax,16 ;сдвинем на 16 разрядов в право (разделим на 65536) в ax верхная точка
|
||||
shl ebx,16 ;сдвинем на 16 разрядов в лево (умножим на 65536)
|
||||
|
||||
sub ecx,8 ;корретировка учитываем высоту шрифта
|
||||
|
||||
test dword 2ch_flags,ch_flag_bottom ;проверим, нужно ли выводить вверху надпись
|
||||
test dword ch_flags,ch_flag_bottom ;проверим, нужно ли выводить вверху надпись
|
||||
jnz .bottom
|
||||
|
||||
test dword 2ch_flags,ch_flag_middle ;проверим, нужно ли выводить в центр надпись
|
||||
test dword ch_flags,ch_flag_middle ;проверим, нужно ли выводить в центр надпись
|
||||
jz .top ;остался только top
|
||||
|
||||
shr cx,1 ;разделим на 2
|
||||
.bottom:
|
||||
add ax,cx
|
||||
.top:
|
||||
add ebx,dword 2ch_left_s ;cкорректируем позицию Х. Т.е. сейчас в верхней части ebx у нас точка начала вывода текста по Х
|
||||
add ebx,dword ch_left_s ;cкорректируем позицию Х. Т.е. сейчас в верхней части ebx у нас точка начала вывода текста по Х
|
||||
mov bx,ax
|
||||
;ebx х shl 16 +y координаты вывода строчки
|
||||
|
||||
mov ecx,dword 2ch_text_color ;загрузим цвет надписи + flags
|
||||
mov edx,dword 2ch_text_ptr ;укажем адрес от куда нужно выводить строку
|
||||
mov ecx,dword ch_text_color ;загрузим цвет надписи + flags
|
||||
mov edx,dword ch_text_ptr ;укажем адрес от куда нужно выводить строку
|
||||
mcall SF_DRAW_TEXT
|
||||
popad ;восстановить значения регистров из стека
|
||||
ret 4 ;выйдем из процедуры и удалим из стека указатель на структуру (4 байта)
|
||||
|
||||
check_box_clear_ch2: ;очистка чек бокса
|
||||
mov edx,dword 2ch_color ;цвет внутри чек бокса
|
||||
check_box_clear_ch: ;очистка чек бокса
|
||||
mov edx,dword ch_color ;цвет внутри чек бокса
|
||||
jmp @f ;безусловный прыжок на нижнюю метку @@
|
||||
check_box_draw_ch2: ;нарисовать включенный чек бокс
|
||||
mov edx,dword 2ch_border_color ;загрузить цвет
|
||||
check_box_draw_ch: ;нарисовать включенный чек бокс
|
||||
mov edx,dword ch_border_color ;загрузить цвет
|
||||
@@:
|
||||
;Отобразить включеный checkbox
|
||||
mov ebx,dword 2ch_left_s ;загружаем х shl 16 + длинна по Х
|
||||
mov ecx,dword 2ch_top_s ;загружаем Y shl 16 + длинна по Y
|
||||
mov ebx,dword ch_left_s ;загружаем х shl 16 + длинна по Х
|
||||
mov ecx,dword ch_top_s ;загружаем Y shl 16 + длинна по Y
|
||||
add ebx,2 shl 16 - 4 ;после этих изменений (X+2) shl 16 +длинна по (Х-2)
|
||||
add ecx,2 shl 16 - 4 ;после этих изменений (Y+2) shl 16 +длинна по (Y-2)
|
||||
mcall SF_DRAW_RECT ;отобразить квадрат внутри checkbox
|
||||
@ -104,7 +104,7 @@ check_box_draw_ch2: ;
|
||||
;При попадании мышки + нажата клавиша в область checkbox состояние бокса должно менятся активный - не активный.
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
align 16
|
||||
check_box_mouse2: ;обработка мыши
|
||||
check_box_mouse: ;обработка мыши
|
||||
pushad
|
||||
mov ebp,dword [esp+36] ;загружаем указатель на структуру, указатель мы передаем в стеке
|
||||
mcall SF_MOUSE_GET,SSF_BUTTON ;проверяем состояние клавиш мышки. Было ли событие нажатая клавиша на мышке.
|
||||
@ -115,7 +115,7 @@ pushad
|
||||
mcall SF_MOUSE_GET,SSF_WINDOW_POSITION ;получить координаты курсора относительно окна
|
||||
;на выходе в eax x shl 16 + y
|
||||
;сравнение верхней точки по Y
|
||||
mov ecx,dword 2ch_top_s ;y shl 16 +длинна по y
|
||||
mov ecx,dword ch_top_s ;y shl 16 +длинна по y
|
||||
mov ebx,ecx
|
||||
shr ebx,16 ;bx = координата по y
|
||||
cmp ax,bx
|
||||
@ -127,24 +127,24 @@ pushad
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
shr eax,16 ;сместим координату по Х в нижную часть регистра т.е. в ax
|
||||
;сравнение по начальной точке Х
|
||||
mov ecx,dword 2ch_left_s ;загрузить значение (х shl 16 + длинна) для чек бокса
|
||||
mov ecx,dword ch_left_s ;загрузить значение (х shl 16 + длинна) для чек бокса
|
||||
mov ebx,ecx
|
||||
shr ebx,16 ;bx = координата по X
|
||||
cmp ax,bx
|
||||
jb .check_box_mouse_end ;указатель мышки меньше начальной координаты по X чем координата по X у бокса
|
||||
;сравнение конечной точки по X
|
||||
add bx,cx ;сложим длинну по x и координату точки по х получим координату конечной точки по Х
|
||||
add bx,word 2ch_sz_str ;добавим длинну строки текста с отступом предвартиельно записав их в момент инициализации
|
||||
add bx,word ch_sz_str ;добавим длинну строки текста с отступом предвартиельно записав их в момент инициализации
|
||||
cmp ax,bx
|
||||
ja .check_box_mouse_end ;указатель мышки больше конечной координаты по х чем координата по Х у бокса
|
||||
;если все проверки были успешно пройдены мы обязаны поменять состояние бокса
|
||||
btc dword 2ch_flags,1 ;перенос 2-го бита в cf и инверсия его
|
||||
btc dword ch_flags,1 ;перенос 2-го бита в cf и инверсия его
|
||||
jnc .enable_box ;если CF=1 то отобразим включенный бокс и выйдем
|
||||
push dword .check_box_mouse_end ;фокус -покус, вернемся после вызова check_box_clear_ch на метку check_box_mouse_end
|
||||
jmp check_box_clear_ch2 ;выключить чек бокс т.е. на месте закрашенного прямоугольника отобразить цвет фона.
|
||||
jmp check_box_clear_ch ;выключить чек бокс т.е. на месте закрашенного прямоугольника отобразить цвет фона.
|
||||
|
||||
.enable_box:
|
||||
call check_box_draw_ch2 ;отобразить включенный чек бокс
|
||||
call check_box_draw_ch ;отобразить включенный чек бокс
|
||||
.check_box_mouse_end:
|
||||
popad ;восстановить регистры из стека
|
||||
ret 4 ;выйти и восстановим стек
|
||||
|
@ -31,8 +31,7 @@ popa
|
||||
ret 4
|
||||
}
|
||||
;*****************************************************************************
|
||||
macro use_dinamic_button
|
||||
{
|
||||
align 16
|
||||
dinamic_button:
|
||||
db_type equ [edi]
|
||||
db_size_x equ [edi+4]
|
||||
@ -89,7 +88,7 @@ dinamic_button_exit
|
||||
|
||||
push edi
|
||||
mov edi,db_palette_raw
|
||||
mcall 65
|
||||
mcall SF_PUT_IMAGE_EXT
|
||||
pop edi
|
||||
ret
|
||||
;*****************************************************************************
|
||||
@ -97,16 +96,17 @@ dinamic_button_exit
|
||||
; mouse event
|
||||
;*****************************************************************************
|
||||
;*****************************************************************************
|
||||
align 4
|
||||
.mouse:
|
||||
pusha
|
||||
mov edi,dword [esp+36]
|
||||
mcall 37,2
|
||||
mcall SF_MOUSE_GET,SSF_BUTTON
|
||||
mov ebx,db_mouse_keys
|
||||
mov db_mouse_keys_old,ebx
|
||||
|
||||
mov db_mouse_keys,eax
|
||||
|
||||
mcall 37,1
|
||||
mcall SF_MOUSE_GET,SSF_WINDOW_POSITION
|
||||
mov db_mouse_pos,eax
|
||||
|
||||
test eax,0x80000000
|
||||
@ -149,10 +149,10 @@ dinamic_button_exit
|
||||
|
||||
mov db_select,dword 2
|
||||
call .draw_1
|
||||
mcall 5, 25
|
||||
mcall SF_SLEEP, 25
|
||||
mov db_select,dword 1
|
||||
call .draw_1
|
||||
|
||||
|
||||
mov db_click,dword 1
|
||||
jmp .exit_menu_2
|
||||
|
||||
@ -167,4 +167,3 @@ dinamic_button_exit
|
||||
; mov db_click,dword 0
|
||||
.exit_menu_2:
|
||||
dinamic_button_exit
|
||||
}
|
@ -32,9 +32,6 @@ popa
|
||||
ret 4
|
||||
}
|
||||
;*****************************************************************************
|
||||
macro use_file_browser
|
||||
{
|
||||
file_browser:
|
||||
fb_type equ dword [edi] ;dword
|
||||
fb_size_x equ [edi+4] ;word
|
||||
fb_start_x equ [edi+6] ;word
|
||||
@ -97,6 +94,7 @@ fb_mouse_pos_old equ dword [edi+196] ;dword
|
||||
fb_marked_counter equ dword [edi+200] ;dword
|
||||
fb_keymap_pointer equ dword [edi+204] ;dword
|
||||
;---------------------------------------------------------------------
|
||||
align 16
|
||||
fb_draw_panel:
|
||||
pusha
|
||||
mov edi,dword [esp+36]
|
||||
@ -134,6 +132,7 @@ fb_draw_panel_1:
|
||||
popa
|
||||
ret
|
||||
;---------------------------------------------------------------------
|
||||
align 4
|
||||
fb_clear_panel:
|
||||
cmp fb_all_redraw,1
|
||||
jne @f
|
||||
@ -142,12 +141,14 @@ fb_clear_panel:
|
||||
@@:
|
||||
ret
|
||||
;---------------------------------------------------------------------
|
||||
align 4
|
||||
fb_calc_folder_sysdata:
|
||||
mov eax,fb_folder_data
|
||||
mov eax,[eax+4]
|
||||
mov fb_folder_block,eax
|
||||
ret
|
||||
;---------------------------------------------------------------------
|
||||
align 4
|
||||
fb_calc_max_panel_line:
|
||||
xor eax,eax
|
||||
xor ebx,ebx
|
||||
@ -162,6 +163,7 @@ fb_calc_max_panel_line:
|
||||
mov fb_max_panel_line,eax
|
||||
ret
|
||||
;---------------------------------------------------------------------
|
||||
align 4
|
||||
fb_draw_panel_selection:
|
||||
cmp fb_all_redraw,2
|
||||
je .end
|
||||
@ -197,16 +199,17 @@ fb_draw_panel_selection:
|
||||
shl eax,16
|
||||
push eax
|
||||
add ebx,eax
|
||||
mcall 13
|
||||
mcall SF_DRAW_RECT
|
||||
pop ebx
|
||||
cmp fb_all_redraw,0
|
||||
je .end
|
||||
mov bx,fb_start_x
|
||||
ror ebx,16
|
||||
mcall 13,,,fb_background_color
|
||||
mcall SF_DRAW_RECT,,,fb_background_color
|
||||
.end:
|
||||
ret
|
||||
;---------------------------------------------------------------------
|
||||
align 4
|
||||
fb_for_all_panel_selection:
|
||||
xor edx,edx
|
||||
mov dx,fb_line_size_y
|
||||
@ -224,6 +227,7 @@ fb_for_all_panel_selection:
|
||||
@@:
|
||||
ret
|
||||
;---------------------------------------------------------------------
|
||||
align 4
|
||||
fb_draw_folder_data:
|
||||
mov eax,fb_folder_block
|
||||
sub eax,fb_max_panel_line
|
||||
@ -325,7 +329,7 @@ fb_draw_folder_data:
|
||||
mov esi,2
|
||||
mov ecx,fb_reduct_text_color
|
||||
mov edx,dword fb_truncated_filename_char
|
||||
mcall 4
|
||||
mcall SF_DRAW_TEXT
|
||||
pop edx
|
||||
.continue:
|
||||
pop ebx
|
||||
@ -335,6 +339,7 @@ fb_draw_folder_data:
|
||||
inc eax
|
||||
jmp .start
|
||||
;--------------------------------------
|
||||
align 4
|
||||
.draw_name_temp_area:
|
||||
pusha
|
||||
mov eax,fb_max_name_temp_size
|
||||
@ -370,7 +375,7 @@ fb_draw_folder_data:
|
||||
mov eax,fb_select_color
|
||||
@@:
|
||||
mov edi,eax
|
||||
mcall 4
|
||||
mcall SF_DRAW_TEXT
|
||||
popa
|
||||
ret
|
||||
;--------------------------------------
|
||||
@ -395,10 +400,11 @@ fb_draw_folder_data:
|
||||
sub bx,3
|
||||
rol ebx,16
|
||||
mov edx,fb_background_color ;0xffffff
|
||||
mcall 13
|
||||
mcall SF_DRAW_RECT
|
||||
@@:
|
||||
ret
|
||||
;---------------------------------------------------------------------
|
||||
align 4
|
||||
fb_clear_line:
|
||||
mov fb_draw_panel_selection_flag,0
|
||||
pusha
|
||||
@ -426,12 +432,12 @@ fb_clear_line:
|
||||
sub bx,fb_icon_size_x
|
||||
sub bx,3
|
||||
rol ebx,16
|
||||
mov edx,fb_background_color
|
||||
mcall 13
|
||||
mcall SF_DRAW_RECT,,,fb_background_color
|
||||
.end:
|
||||
popa
|
||||
ret
|
||||
;---------------------------------------------------------------------
|
||||
align 4
|
||||
fb_draw_type_size_date:
|
||||
pusha
|
||||
mov eax,fb_type_table
|
||||
@ -503,6 +509,7 @@ fb_draw_type_size_date:
|
||||
mov [eax+6+4],word '- '
|
||||
jmp .date
|
||||
;-----------------------------------------
|
||||
align 4
|
||||
.call_decimal_string:
|
||||
mov ebx,fb_type_table
|
||||
add ebx,6
|
||||
@ -510,14 +517,14 @@ fb_draw_type_size_date:
|
||||
mov [ebx],dl
|
||||
jmp .size_convert_end
|
||||
;-----------------------------------------
|
||||
align 4
|
||||
.copy_size:
|
||||
;/0x40000000 - Gb
|
||||
;/0x100000 - Mb
|
||||
;/0x400 Kb
|
||||
mov [eax+6],dword ' '
|
||||
mov [eax+6+4],word ' '
|
||||
push ebx
|
||||
push edx
|
||||
push ebx edx
|
||||
mov eax,[edx-40+32]
|
||||
mov ebx,eax
|
||||
shr eax,30 ; /(1024*1024*1024)
|
||||
@ -565,8 +572,7 @@ fb_draw_type_size_date:
|
||||
jmp @r
|
||||
@@:
|
||||
pop edi
|
||||
pop edx
|
||||
pop ebx
|
||||
pop edx ebx
|
||||
;-----------------------------------------
|
||||
.date:
|
||||
xor eax,eax
|
||||
@ -617,10 +623,11 @@ fb_draw_type_size_date:
|
||||
mov eax,fb_select_color
|
||||
@@:
|
||||
mov edi,eax
|
||||
mcall 4
|
||||
mcall SF_DRAW_TEXT
|
||||
popa
|
||||
ret
|
||||
;---------------------------------------------------------------------
|
||||
align 4
|
||||
fb_draw_icon:
|
||||
pusha
|
||||
xor eax,eax
|
||||
@ -663,7 +670,7 @@ fb_draw_icon:
|
||||
xor ebp,ebp
|
||||
push edi
|
||||
mov edi,fb_palette_raw
|
||||
mcall 65
|
||||
mcall SF_PUT_IMAGE_EXT
|
||||
pop edi
|
||||
popa
|
||||
ret
|
||||
@ -674,6 +681,7 @@ fb_draw_icon:
|
||||
; EBX - address of string
|
||||
; Output:
|
||||
; string contains the number, marked the end of the code 0
|
||||
align 4
|
||||
fb_decimal_string_2:
|
||||
push eax ebx ecx edx
|
||||
xor ecx,ecx
|
||||
@ -702,6 +710,7 @@ fb_decimal_string_2:
|
||||
pop edx ecx ebx eax
|
||||
ret
|
||||
;---------------------------------------------------------------------
|
||||
align 4
|
||||
fb_decimal_string_4:
|
||||
push eax ecx edx
|
||||
xor ecx,ecx
|
||||
@ -730,6 +739,7 @@ fb_decimal_string_4:
|
||||
pop edx ecx eax
|
||||
ret
|
||||
;---------------------------------------------------------------------
|
||||
align 4
|
||||
fb_get_icon_number:
|
||||
push eax
|
||||
mov ebp,fb_extension_size
|
||||
@ -811,6 +821,7 @@ fb_get_icon_number:
|
||||
pop eax
|
||||
ret
|
||||
;---------------------------------------------------------------------
|
||||
align 4
|
||||
.calculate_1:
|
||||
add ebx,eax
|
||||
.calculate:
|
||||
@ -819,6 +830,7 @@ fb_get_icon_number:
|
||||
lodsb
|
||||
ret
|
||||
;---------------------------------------------------------------------
|
||||
align 4
|
||||
fb_char_toupper:
|
||||
; convert character to uppercase, using cp866 encoding
|
||||
; in: al=symbol
|
||||
@ -843,6 +855,7 @@ fb_char_toupper:
|
||||
and al, not 0x20
|
||||
ret
|
||||
;---------------------------------------------------------------------
|
||||
align 4
|
||||
fb_char_todown:
|
||||
; convert character to lowercase, using cp866 encoding
|
||||
; in: al=symbol
|
||||
@ -875,16 +888,17 @@ fb_truncated_filename_char:
|
||||
; mouse event
|
||||
;*****************************************************************************
|
||||
;*****************************************************************************
|
||||
align 4
|
||||
fb_mouse:
|
||||
pusha
|
||||
mov edi,dword [esp+36]
|
||||
;-------------------------------------------------------
|
||||
mcall 37,2
|
||||
mcall SF_MOUSE_GET,SSF_BUTTON
|
||||
mov ebx,fb_mouse_keys
|
||||
mov fb_mouse_keys_old,ebx
|
||||
mov fb_mouse_keys,eax
|
||||
|
||||
mcall 37,1
|
||||
mcall SF_MOUSE_GET,SSF_WINDOW_POSITION
|
||||
mov ebx,fb_mouse_pos
|
||||
mov fb_mouse_pos_old,ebx
|
||||
mov fb_mouse_pos,eax
|
||||
@ -999,12 +1013,12 @@ fb_mouse:
|
||||
jne .mark_mouse
|
||||
mov edx,2
|
||||
mov fb_mouse_keys_delta,edx
|
||||
mcall 26,9
|
||||
mcall SF_SYSTEM_GET,SSF_TIME_COUNT
|
||||
add eax,fb_mouse_key_delay
|
||||
mov fb_mouse_keys_tick,eax
|
||||
jmp .continue_2
|
||||
.enter_2:
|
||||
mcall 26,9
|
||||
mcall SF_SYSTEM_GET,SSF_TIME_COUNT
|
||||
cmp eax,fb_mouse_keys_tick
|
||||
ja @f
|
||||
; mov eax,fb_mouse_pos_old
|
||||
@ -1026,6 +1040,7 @@ fb_mouse:
|
||||
call fb_prepare_selected_BDVK_adress
|
||||
file_browser_exit
|
||||
;-------------------------------------------------------
|
||||
align 4
|
||||
.mark_mouse:
|
||||
call fb_key.mark_1
|
||||
call fb_draw_panel_1
|
||||
@ -1033,6 +1048,7 @@ file_browser_exit
|
||||
mov fb_mouse_keys_delta,eax
|
||||
jmp .exit_fb
|
||||
;-------------------------------------------------------
|
||||
align 4
|
||||
.enter_3:
|
||||
xor eax,eax
|
||||
mov fb_mouse_keys,eax
|
||||
@ -1043,6 +1059,7 @@ file_browser_exit
|
||||
mov fb_max_name_temp_size,eax
|
||||
ret
|
||||
;-------------------------------------------------------
|
||||
align 4
|
||||
.store_old_cursor_line:
|
||||
push eax
|
||||
mov ax,fb_start_draw_cursor_line
|
||||
@ -1053,6 +1070,7 @@ file_browser_exit
|
||||
ret
|
||||
;*****************************************************************************
|
||||
;*****************************************************************************
|
||||
align 4
|
||||
fb_prepare_selected_BDVK_adress:
|
||||
xor eax,eax
|
||||
mov ax,fb_start_draw_cursor_line
|
||||
@ -1083,6 +1101,7 @@ fb_prepare_selected_BDVK_adress:
|
||||
; 12 - Search with key
|
||||
;*****************************************************************************
|
||||
;*****************************************************************************
|
||||
align 4
|
||||
fb_key:
|
||||
pusha
|
||||
mov edi,dword [esp+36]
|
||||
@ -1097,6 +1116,7 @@ fb_key:
|
||||
je .exit_fb
|
||||
jmp dword [eax]
|
||||
;-------------------------------------------------------
|
||||
align 4
|
||||
.arrow_down:
|
||||
mov ax,fb_start_draw_cursor_line
|
||||
add ax,fb_line_size_y
|
||||
@ -1126,6 +1146,7 @@ fb_key:
|
||||
call fb_draw_panel_3
|
||||
jmp .exit_fb
|
||||
;-------------------------------------------------------
|
||||
align 4
|
||||
.arrow_up:
|
||||
mov ax,fb_start_draw_cursor_line
|
||||
add ax,fb_start_y
|
||||
@ -1144,6 +1165,7 @@ fb_key:
|
||||
call fb_draw_panel_3
|
||||
jmp .exit_fb
|
||||
;-------------------------------------------------------
|
||||
align 4
|
||||
.page_down:
|
||||
mov eax,fb_max_panel_line
|
||||
mov ebx,fb_folder_block
|
||||
@ -1186,6 +1208,7 @@ fb_key:
|
||||
call fb_draw_panel_2
|
||||
jmp .exit_fb
|
||||
;-------------------------------------------------------
|
||||
align 4
|
||||
.prepare_data_down:
|
||||
mov ecx,fb_folder_block
|
||||
sub ecx,fb_start_draw_line
|
||||
@ -1196,6 +1219,7 @@ fb_key:
|
||||
cmp cx,fb_start_draw_cursor_line
|
||||
ret
|
||||
;-------------------------------------------------------
|
||||
align 4
|
||||
.page_up:
|
||||
mov eax,fb_max_panel_line
|
||||
mov ebx,fb_start_draw_line
|
||||
@ -1216,6 +1240,7 @@ fb_key:
|
||||
call fb_draw_panel_2
|
||||
jmp .exit_fb
|
||||
;-------------------------------------------------------
|
||||
align 4
|
||||
.home:
|
||||
cmp fb_start_draw_line,0
|
||||
jne @f
|
||||
@ -1228,6 +1253,7 @@ fb_key:
|
||||
call fb_draw_panel_2
|
||||
jmp .exit_fb
|
||||
;-------------------------------------------------------
|
||||
align 4
|
||||
.end:
|
||||
mov eax,fb_folder_block
|
||||
sub eax,fb_max_panel_line
|
||||
@ -1242,14 +1268,17 @@ fb_key:
|
||||
mov eax,fb_max_panel_line
|
||||
jmp .page_down_0
|
||||
;-------------------------------------------------------
|
||||
align 4
|
||||
.enter:
|
||||
call fb_mouse.enter_3
|
||||
jmp .exit_fb
|
||||
;-------------------------------------------------------
|
||||
align 4
|
||||
.mark:
|
||||
call .mark_1
|
||||
jmp .arrow_down
|
||||
;-------------------------------------------------------
|
||||
align 4
|
||||
.mark_1:
|
||||
mov eax,fb_folder_block
|
||||
test eax,eax
|
||||
@ -1284,6 +1313,7 @@ fb_key:
|
||||
.exit:
|
||||
ret
|
||||
;-------------------------------------------------------
|
||||
align 4
|
||||
.mark_all:
|
||||
mov eax,fb_folder_block
|
||||
test eax,eax
|
||||
@ -1326,6 +1356,7 @@ fb_key:
|
||||
mov fb_marked_counter,eax
|
||||
jmp .exit_fb
|
||||
;-------------------------------------------------------
|
||||
align 4
|
||||
.select_mark_action:
|
||||
add ebx,299-40
|
||||
cmp fb_temp_counter,0
|
||||
@ -1345,6 +1376,7 @@ fb_key:
|
||||
.select_mark_action_1:
|
||||
ret
|
||||
;-------------------------------------------------------
|
||||
align 4
|
||||
.unmark_all:
|
||||
mov eax,fb_folder_block
|
||||
test eax,eax
|
||||
@ -1353,6 +1385,7 @@ fb_key:
|
||||
mov fb_temp_counter,1
|
||||
jmp .mark_all_1
|
||||
;-------------------------------------------------------
|
||||
align 4
|
||||
.invert_mark:
|
||||
mov eax,fb_folder_block
|
||||
test eax,eax
|
||||
@ -1373,8 +1406,9 @@ fb_key:
|
||||
; * bit 9 (mask 0x200): left Win is pressed
|
||||
; * bit 10 (mask 0x400): right Win is pressed
|
||||
;-------------------------------------------------------
|
||||
align 4
|
||||
.search_with_key:
|
||||
mcall 66,3
|
||||
mcall SF_BOARD,SSF_GET_CONTROL_KEYS
|
||||
test al,11b
|
||||
jnz .shift_layout
|
||||
|
||||
@ -1391,7 +1425,7 @@ fb_key:
|
||||
.alt_layout:
|
||||
mov ecx,3 ; Alt
|
||||
.get_keyboard_layout:
|
||||
mcall 26,2,,fb_keymap_pointer
|
||||
mcall SF_SYSTEM_GET,SSF_KEYBOARD_LAYOUT,,fb_keymap_pointer
|
||||
xor eax,eax
|
||||
mov ax,fb_key_action_num
|
||||
add eax,fb_keymap_pointer
|
||||
@ -1474,6 +1508,7 @@ fb_key:
|
||||
call fb_prepare_selected_BDVK_adress
|
||||
file_browser_exit
|
||||
;-------------------------------------------------------
|
||||
align 4
|
||||
fb_key_table:
|
||||
dd 0
|
||||
dd fb_key.arrow_down ; 1
|
||||
@ -1491,10 +1526,12 @@ fb_key_table:
|
||||
.end:
|
||||
dd 0
|
||||
;-------------------------------------------------------
|
||||
align 4
|
||||
fb_draw_panel_3:
|
||||
mov eax,2
|
||||
mov fb_all_redraw,eax
|
||||
jmp fb_draw_panel_2.1
|
||||
align 4
|
||||
fb_draw_panel_2:
|
||||
xor eax,eax
|
||||
inc eax
|
||||
@ -1508,4 +1545,3 @@ fb_draw_panel_2:
|
||||
mov fb_draw_scroll_bar,eax
|
||||
ret
|
||||
|
||||
}
|
@ -40,8 +40,6 @@ popa
|
||||
ret 4
|
||||
}
|
||||
;*****************************************************************************
|
||||
macro use_frame
|
||||
{
|
||||
fr equ [esp + 36]
|
||||
frame:
|
||||
fr_type equ [eax + FR_STYLE] ; dword
|
||||
@ -63,7 +61,7 @@ fr_font_backgr_color equ [eax + FR_BACK_COLOR] ; dword
|
||||
; draw event
|
||||
;*****************************************************************************
|
||||
;*****************************************************************************
|
||||
align 4
|
||||
align 16
|
||||
.draw:
|
||||
frame_start
|
||||
mov eax, fr
|
||||
@ -259,12 +257,11 @@ align 4
|
||||
;--------------------------------------
|
||||
align 4
|
||||
.draw_1:
|
||||
mov edx,fr_text_pointer
|
||||
mov edi,fr_font_backgr_color
|
||||
mcall 4
|
||||
mov edx,fr_text_pointer
|
||||
mov edi,fr_font_backgr_color
|
||||
mcall SF_DRAW_TEXT
|
||||
;----------------------------------------------------------------------
|
||||
align 4
|
||||
.exit:
|
||||
frame_exit
|
||||
}
|
||||
;*****************************************************************************
|
@ -31,8 +31,7 @@ popa
|
||||
ret 4
|
||||
}
|
||||
;*****************************************************************************
|
||||
macro use_menu_bar
|
||||
{
|
||||
align 16
|
||||
menu_bar:
|
||||
m_type equ [edi]
|
||||
m_size_x equ [edi+4]
|
||||
@ -94,7 +93,7 @@ m_get_mouse_flag equ [edi+116]
|
||||
.active:
|
||||
mov edx,m_frnt_col
|
||||
@@:
|
||||
mcall 13
|
||||
mcall SF_DRAW_RECT
|
||||
shr ecx,16
|
||||
mov bx,cx
|
||||
movzx eax,word m_size_y
|
||||
@ -109,14 +108,11 @@ m_get_mouse_flag equ [edi+116]
|
||||
add ecx,0x80000000
|
||||
@@:
|
||||
mov edx,m_text_pointer
|
||||
mcall 4
|
||||
mcall SF_DRAW_TEXT
|
||||
ret
|
||||
|
||||
.draw_2:
|
||||
mov ebx,m_size_x1
|
||||
mov ecx,m_size_y1
|
||||
mov edx,m_menu_col
|
||||
mcall 13
|
||||
mcall SF_DRAW_RECT,m_size_x1,m_size_y1,m_menu_col
|
||||
ret
|
||||
|
||||
.calculate_font_offset:
|
||||
@ -136,8 +132,7 @@ m_get_mouse_flag equ [edi+116]
|
||||
shl eax,16
|
||||
add ecx,eax
|
||||
mov cx,m_interval
|
||||
mov edx,m_menu_col
|
||||
mcall 13
|
||||
mcall SF_DRAW_RECT,,,m_menu_col
|
||||
pop ecx ebx
|
||||
|
||||
push ebx ecx
|
||||
@ -147,7 +142,7 @@ m_get_mouse_flag equ [edi+116]
|
||||
add ecx,eax
|
||||
mov cx,m_interval
|
||||
mov edx,m_menu_sel_col
|
||||
mcall 13
|
||||
mcall SF_DRAW_RECT
|
||||
pop ecx ebx
|
||||
|
||||
shr ecx,16
|
||||
@ -169,7 +164,7 @@ m_get_mouse_flag equ [edi+116]
|
||||
add ecx,0xC0000000
|
||||
push edi
|
||||
mov edi,eax
|
||||
mcall 4
|
||||
mcall SF_DRAW_TEXT
|
||||
pop edi
|
||||
call .get_next_text
|
||||
inc ebp
|
||||
@ -277,7 +272,7 @@ m_get_mouse_flag equ [edi+116]
|
||||
.red:
|
||||
call .draw_3
|
||||
.still:
|
||||
mcall 10
|
||||
mcall SF_WAIT_EVENT
|
||||
cmp eax,1
|
||||
je .exit_menu_3
|
||||
cmp eax,2
|
||||
@ -289,7 +284,7 @@ m_get_mouse_flag equ [edi+116]
|
||||
jmp .still
|
||||
|
||||
.key_menu:
|
||||
mcall 2
|
||||
mcall SF_GET_KEY
|
||||
|
||||
cmp dword m_extended_key,1
|
||||
je .extended_key
|
||||
@ -442,12 +437,12 @@ m_get_mouse_flag equ [edi+116]
|
||||
jmp .exit_menu_3
|
||||
;---------------------------------------------------------------------
|
||||
.processing_real_mouse:
|
||||
mcall 37,2
|
||||
mcall SF_MOUSE_GET,SSF_BUTTON
|
||||
mov ebx,m_mouse_keys
|
||||
mov m_mouse_keys_old,ebx
|
||||
mov m_mouse_keys,eax
|
||||
|
||||
mcall 37,1
|
||||
mcall SF_MOUSE_GET,SSF_WINDOW_POSITION
|
||||
ret
|
||||
;---------------------------------------------------------------------
|
||||
.allocate_menu_area:
|
||||
@ -456,21 +451,21 @@ m_get_mouse_flag equ [edi+116]
|
||||
movzx eax,word m_size_y1
|
||||
imul ecx,eax
|
||||
lea ecx,[ecx*3]
|
||||
mcall 68, 12
|
||||
mcall SF_SYS_MISC,SSF_MEM_ALLOC
|
||||
mov m_buf_adress,eax
|
||||
ret
|
||||
;---------------------------------------------------------------------
|
||||
.free_menu_area:
|
||||
cmp dword m_buf_adress,0
|
||||
je @f
|
||||
mcall 68,13,m_buf_adress
|
||||
mcall SF_SYS_MISC,SSF_MEM_FREE,m_buf_adress
|
||||
xor eax,eax
|
||||
mov m_buf_adress,eax
|
||||
@@:
|
||||
ret
|
||||
;---------------------------------------------------------------------
|
||||
.get_menu_area:
|
||||
mcall 9, m_procinfo,-1
|
||||
mcall SF_THREAD_INFO, m_procinfo,-1
|
||||
|
||||
mov cx,m_size_x1
|
||||
shl ecx,16
|
||||
@ -485,7 +480,7 @@ m_get_mouse_flag equ [edi+116]
|
||||
add dx,[eax+38]
|
||||
add dx,[eax+58]
|
||||
|
||||
mcall 36, m_buf_adress
|
||||
mcall SF_GET_IMAGE, m_buf_adress
|
||||
ret
|
||||
;---------------------------------------------------------------------
|
||||
.put_menu_area:
|
||||
@ -497,7 +492,7 @@ m_get_mouse_flag equ [edi+116]
|
||||
shl edx,16
|
||||
mov dx,m_start_y1
|
||||
|
||||
mcall 7, m_buf_adress
|
||||
mcall SF_PUT_IMAGE, m_buf_adress
|
||||
call .free_menu_area
|
||||
ret
|
||||
;---------------------------------------------------------------------
|
||||
@ -601,5 +596,3 @@ m_get_mouse_flag equ [edi+116]
|
||||
mov m_click,dword 0
|
||||
@@:
|
||||
menu_bar_exit
|
||||
}
|
||||
|
@ -33,12 +33,11 @@ macro path_show_start
|
||||
;*****************************************************************************
|
||||
macro path_show_exit
|
||||
{
|
||||
popa
|
||||
popa
|
||||
ret 4
|
||||
}
|
||||
;*****************************************************************************
|
||||
macro use_path_show
|
||||
{
|
||||
align 16
|
||||
path_show:
|
||||
ps_type equ [edi] ;dword
|
||||
ps_start_y equ [edi+4] ;word
|
||||
@ -146,7 +145,6 @@ path_show_start
|
||||
and eax,0xffffff
|
||||
xor esi,esi
|
||||
mov edi,eax
|
||||
mcall 4
|
||||
mcall SF_DRAW_TEXT
|
||||
path_show_exit
|
||||
}
|
||||
;*****************************************************************************
|
@ -1,5 +1,3 @@
|
||||
macro use_progressbar
|
||||
{
|
||||
pb equ [esp + 4 + 8*4]
|
||||
align 16
|
||||
progressbar_draw:
|
||||
@ -15,7 +13,7 @@ progressbar_draw:
|
||||
add esi, edi
|
||||
dec ebp
|
||||
dec esi
|
||||
mov eax, 38
|
||||
mov eax, SF_DRAW_LINE
|
||||
shl ebx, 16
|
||||
mov bx, bp
|
||||
shrd ecx, edi, 16
|
||||
@ -54,7 +52,7 @@ progressbar_draw:
|
||||
add ebx, edi
|
||||
add ecx, [eax + PB_HEIGHT]
|
||||
dec ecx
|
||||
mov eax, 13
|
||||
mov eax, SF_DRAW_RECT
|
||||
dec ecx
|
||||
int 64
|
||||
; draw last part of non-progress rectangle
|
||||
@ -133,11 +131,10 @@ progressbar_progress:
|
||||
add ebx, esi
|
||||
dec ecx
|
||||
sub ebx, edi
|
||||
mov eax, 13
|
||||
mov eax, SF_DRAW_RECT
|
||||
dec ecx
|
||||
int 64
|
||||
; .skip:
|
||||
popad
|
||||
ret 4
|
||||
restore pb
|
||||
}
|
@ -53,8 +53,7 @@ macro draw_up_arrow_vertical
|
||||
sub ebx,4 shl 16
|
||||
mov bx,7
|
||||
mov cx,1
|
||||
mov eax,13
|
||||
int 0x40
|
||||
mcall SF_DRAW_RECT
|
||||
sub ecx,1 shl 16
|
||||
add ebx,1 shl 16
|
||||
mov bx,5
|
||||
@ -98,7 +97,7 @@ macro draw_up_arrow_vertical_type2
|
||||
add cx,1
|
||||
sub bx,3
|
||||
|
||||
mcall 38,,,sb_line_col
|
||||
mcall SF_DRAW_LINE,,,sb_line_col
|
||||
|
||||
add bx,6
|
||||
|
||||
@ -127,8 +126,7 @@ macro draw_down_arrow_vertical
|
||||
mov bx,7
|
||||
sub ecx,2 shl 16
|
||||
mov cx,1
|
||||
mov eax,13
|
||||
int 0x40
|
||||
mcall SF_DRAW_RECT
|
||||
add ecx,1 shl 16
|
||||
add ebx,1 shl 16
|
||||
mov bx,5
|
||||
@ -174,7 +172,7 @@ macro draw_down_arrow_vertical_type2
|
||||
sub cx,2
|
||||
sub bx,3
|
||||
|
||||
mcall 38,,,sb_line_col
|
||||
mcall SF_DRAW_LINE,,,sb_line_col
|
||||
|
||||
add bx,6
|
||||
|
||||
@ -184,8 +182,7 @@ macro draw_down_arrow_vertical_type2
|
||||
;*****************************************************************************
|
||||
macro draw_runner_center_vertical
|
||||
{
|
||||
push ebx
|
||||
push ecx
|
||||
push ebx ecx
|
||||
|
||||
xor eax,eax
|
||||
mov ax,sb_size_x
|
||||
@ -203,8 +200,7 @@ macro draw_runner_center_vertical
|
||||
mov bx,10
|
||||
add ecx,4 shl 16
|
||||
mov cx,1
|
||||
mov eax,13
|
||||
int 0x40
|
||||
mcall SF_DRAW_RECT
|
||||
add ecx,3 shl 16
|
||||
sub ebx,1 shl 16
|
||||
mov bx,12
|
||||
@ -213,8 +209,7 @@ macro draw_runner_center_vertical
|
||||
mov bx,10
|
||||
add ecx,3 shl 16
|
||||
int 0x40
|
||||
pop ecx
|
||||
pop ebx
|
||||
pop ecx ebx
|
||||
}
|
||||
;*****************************************************************************
|
||||
macro draw_up_arrow_horizontal
|
||||
@ -238,8 +233,7 @@ macro draw_up_arrow_horizontal
|
||||
mov cx,7
|
||||
mov bx,1
|
||||
|
||||
mov eax,13
|
||||
int 0x40
|
||||
mcall SF_DRAW_RECT
|
||||
sub ebx,1 shl 16
|
||||
add ecx,1 shl 16
|
||||
mov cx,5
|
||||
@ -283,7 +277,7 @@ macro draw_up_arrow_horizontal_type2
|
||||
add bx,1
|
||||
sub cx,3
|
||||
|
||||
mcall 38,,,sb_line_col
|
||||
mcall SF_DRAW_LINE,,,sb_line_col
|
||||
|
||||
add cx,6
|
||||
|
||||
@ -312,8 +306,7 @@ macro draw_down_arrow_horizontal
|
||||
mov cx,7
|
||||
sub ebx,2 shl 16
|
||||
mov bx,1
|
||||
mov eax,13
|
||||
int 0x40
|
||||
mcall SF_DRAW_RECT
|
||||
add ebx,1 shl 16
|
||||
add ecx,1 shl 16
|
||||
mov cx,5
|
||||
@ -359,7 +352,7 @@ macro draw_down_arrow_horizontal_type2
|
||||
sub cx,2
|
||||
sub bx,3
|
||||
|
||||
mcall 38,,,sb_line_col
|
||||
mcall SF_DRAW_LINE,,,sb_line_col
|
||||
|
||||
add cx,6
|
||||
|
||||
@ -369,8 +362,7 @@ macro draw_down_arrow_horizontal_type2
|
||||
;*****************************************************************************
|
||||
macro draw_runner_center_horizontal
|
||||
{
|
||||
push ebx
|
||||
push ecx
|
||||
push ebx ecx
|
||||
|
||||
xor eax,eax
|
||||
mov ax,sb_size_y
|
||||
@ -388,8 +380,7 @@ macro draw_runner_center_horizontal
|
||||
mov cx,10
|
||||
add ebx,4 shl 16
|
||||
mov bx,1
|
||||
mov eax,13
|
||||
int 0x40
|
||||
mcall SF_DRAW_RECT
|
||||
add ebx,3 shl 16
|
||||
sub ecx,1 shl 16
|
||||
mov cx,12
|
||||
@ -398,13 +389,9 @@ macro draw_runner_center_horizontal
|
||||
mov cx,10
|
||||
add ebx,3 shl 16
|
||||
int 0x40
|
||||
pop ecx
|
||||
pop ebx
|
||||
pop ecx ebx
|
||||
}
|
||||
;*****************************************************************************
|
||||
macro use_scroll_bar
|
||||
{
|
||||
scroll_bar:
|
||||
sb_size_x equ [edi]
|
||||
sb_start_x equ [edi+2]
|
||||
sb_size_y equ [edi+4]
|
||||
@ -432,14 +419,13 @@ sb_position2 equ [edi+72]
|
||||
sb_work_size equ [edi+76]
|
||||
sb_all_redraw equ [edi+80]
|
||||
sb_ar_offset equ [edi+84]
|
||||
}
|
||||
|
||||
;*****************************************************************************
|
||||
;*****************************************************************************
|
||||
; draw event
|
||||
;*****************************************************************************
|
||||
;*****************************************************************************
|
||||
macro use_scroll_bar_vertical
|
||||
{
|
||||
align 16
|
||||
scroll_bar_vertical:
|
||||
.draw:
|
||||
pusha
|
||||
@ -520,7 +506,7 @@ scroll_bar_exit
|
||||
inc ebx
|
||||
mov ecx,sb_size_y
|
||||
mov edx,sb_line_col
|
||||
mov eax,13
|
||||
mov eax,SF_DRAW_RECT
|
||||
cmp dword sb_all_redraw,0
|
||||
je @f
|
||||
int 0x40 ; left extreme line
|
||||
@ -574,7 +560,7 @@ draw_up_arrow_vertical
|
||||
mov edx,sb_line_col
|
||||
cmp dword sb_all_redraw,0
|
||||
je @f
|
||||
mcall 13 ; top button - bottom line
|
||||
mcall SF_DRAW_RECT ; top button - bottom line
|
||||
@@:
|
||||
pop ecx
|
||||
;*********************************
|
||||
@ -588,7 +574,7 @@ draw_up_arrow_vertical
|
||||
mov cx,0
|
||||
add ecx,sb_position2
|
||||
dec cx
|
||||
mov eax,13
|
||||
mov eax,SF_DRAW_RECT
|
||||
test cx,0x8000
|
||||
jnz @f
|
||||
mov edx,sb_bckg_col
|
||||
@ -655,8 +641,7 @@ draw_runner_center_vertical
|
||||
test cx,0x8000
|
||||
jnz @f
|
||||
mov edx,sb_bckg_col
|
||||
mov eax,13
|
||||
int 0x40 ; bottom interval
|
||||
mcall SF_DRAW_RECT ; bottom interval
|
||||
@@:
|
||||
pop ecx
|
||||
;*********************************
|
||||
@ -667,7 +652,7 @@ draw_runner_center_vertical
|
||||
shl ecx,16
|
||||
inc ecx
|
||||
mov edx,sb_line_col
|
||||
mov eax,13
|
||||
mov eax,SF_DRAW_RECT
|
||||
cmp dword sb_all_redraw,0
|
||||
je @f
|
||||
int 0x40 ; bottom button - top line
|
||||
@ -703,7 +688,7 @@ draw_down_arrow_vertical
|
||||
mov cx,1
|
||||
cmp dword sb_all_redraw,0
|
||||
je @f
|
||||
mcall 13 ; bottom button - extreme line
|
||||
mcall SF_DRAW_RECT ; bottom button - extreme line
|
||||
;-----------------------------------------------------------------------------
|
||||
; scrollbar type 1 - stylish frame
|
||||
cmp word sb_type,1
|
||||
@ -732,14 +717,14 @@ draw_down_arrow_vertical
|
||||
.mouse:
|
||||
pusha
|
||||
mov edi,dword [esp+36]
|
||||
mcall 37,1
|
||||
mcall SF_MOUSE_GET,SSF_WINDOW_POSITION
|
||||
mov sb_m_pos,eax
|
||||
cmp dword sb_m_pos_2,0
|
||||
jne @f
|
||||
|
||||
mov sb_m_pos_2,eax
|
||||
@@:
|
||||
mcall 37,2
|
||||
mcall SF_MOUSE_GET,SSF_BUTTON
|
||||
mov sb_m_keys,eax
|
||||
|
||||
cmp sb_m_keys,eax
|
||||
@ -1031,15 +1016,14 @@ draw_down_arrow_vertical
|
||||
jmp .all_sb
|
||||
.exit_sb:
|
||||
scroll_bar_exit
|
||||
}
|
||||
|
||||
|
||||
;*****************************************************************************
|
||||
;*****************************************************************************
|
||||
;*****************************************************************************
|
||||
;*****************************************************************************
|
||||
;*****************************************************************************
|
||||
macro use_scroll_bar_horizontal
|
||||
{
|
||||
align 16
|
||||
scroll_bar_horizontal:
|
||||
.draw:
|
||||
pusha
|
||||
@ -1121,7 +1105,7 @@ scroll_bar_exit
|
||||
shl ecx,16
|
||||
inc ecx
|
||||
mov edx,sb_line_col
|
||||
mov eax,13
|
||||
mov eax,SF_DRAW_RECT
|
||||
cmp dword sb_all_redraw,0
|
||||
je @f
|
||||
int 0x40 ; top extreme line
|
||||
@ -1175,7 +1159,7 @@ draw_up_arrow_horizontal
|
||||
mov edx,sb_line_col
|
||||
cmp dword sb_all_redraw,0
|
||||
je @f
|
||||
mcall 13 ; left button - right line
|
||||
mcall SF_DRAW_RECT ; left button - right line
|
||||
@@:
|
||||
pop ebx
|
||||
;*********************************
|
||||
@ -1189,7 +1173,7 @@ draw_up_arrow_horizontal
|
||||
mov bx,0
|
||||
add ebx,sb_position2
|
||||
dec bx
|
||||
mov eax,13
|
||||
mov eax,SF_DRAW_RECT
|
||||
test bx,0x8000
|
||||
jnz @f
|
||||
mov edx,sb_bckg_col
|
||||
@ -1257,8 +1241,7 @@ draw_runner_center_horizontal
|
||||
test bx,0x8000
|
||||
jnz @f
|
||||
mov edx,sb_bckg_col
|
||||
mov eax,13
|
||||
int 0x40 ; bottom interval
|
||||
mcall SF_DRAW_RECT ; bottom interval
|
||||
@@:
|
||||
pop ebx
|
||||
;*********************************
|
||||
@ -1269,7 +1252,7 @@ draw_runner_center_horizontal
|
||||
shl ebx,16
|
||||
inc ebx
|
||||
mov edx,sb_line_col
|
||||
mov eax,13
|
||||
mov eax,SF_DRAW_RECT
|
||||
cmp dword sb_all_redraw,0
|
||||
je @f
|
||||
int 0x40 ; bottom button - top line
|
||||
@ -1305,7 +1288,7 @@ draw_down_arrow_horizontal
|
||||
mov bx,1
|
||||
cmp dword sb_all_redraw,0
|
||||
je @f
|
||||
mcall 13 ; bottom button - extreme line
|
||||
mcall SF_DRAW_RECT ; bottom button - extreme line
|
||||
;-----------------------------------------------------------------------------
|
||||
; scrollbar type 1 - stylish frame
|
||||
cmp word sb_type,1
|
||||
@ -1334,14 +1317,14 @@ draw_down_arrow_horizontal
|
||||
.mouse:
|
||||
pusha
|
||||
mov edi,dword [esp+36]
|
||||
mcall 37,1
|
||||
mcall SF_MOUSE_GET,SSF_WINDOW_POSITION
|
||||
mov sb_m_pos,eax
|
||||
cmp dword sb_m_pos_2,0
|
||||
jne @f
|
||||
|
||||
mov sb_m_pos_2,eax
|
||||
@@:
|
||||
mcall 37,2
|
||||
mcall SF_MOUSE_GET,SSF_BUTTON
|
||||
mov sb_m_keys,eax
|
||||
|
||||
cmp sb_m_keys,eax
|
||||
@ -1641,4 +1624,3 @@ draw_down_arrow_horizontal
|
||||
;*****************************************************************************
|
||||
.exit_sb:
|
||||
scroll_bar_exit
|
||||
}
|
@ -7,7 +7,7 @@ include '../../../macros.inc'
|
||||
include '../../../proc32.inc'
|
||||
include '../../../KOSfuncs.inc'
|
||||
include '../../../load_img.inc'
|
||||
include '../../../develop/libraries/box_lib/load_lib.mac'
|
||||
include '../../../load_lib.mac'
|
||||
|
||||
;include 'lang.inc'
|
||||
|
||||
@ -603,8 +603,8 @@ pole_next_gen:
|
||||
add edi,[memCell] ;edi -> &memCell[fristC]
|
||||
mov esi,[edi] ;swp=memCell[fristC];
|
||||
mov edx,[ecx] ;edx - 㦥 ¥ ¨á¯®«ì§ã¥¬, ¯®â®¬ã ¬®¦¥¬ ¯®àâ¨âì
|
||||
mov dword[edi],edx ;memCell[fristC]=memCell[i];
|
||||
mov dword[ecx],esi ;memCell[i]=swp;
|
||||
mov [edi],edx ;memCell[fristC]=memCell[i];
|
||||
mov [ecx],esi ;memCell[i]=swp;
|
||||
dec eax
|
||||
dec ebx
|
||||
sub ecx,4
|
||||
@ -614,10 +614,10 @@ pole_next_gen:
|
||||
cmp ebx,eax
|
||||
jle @b
|
||||
mov ebx,[memCell]
|
||||
mov dword[ebx],eax ;firstC <- eax
|
||||
mov [ebx],eax ;firstC <- eax
|
||||
|
||||
mov dword[b_sort],eax
|
||||
stdcall pole_fl_sort, dword[memCell],eax
|
||||
mov [b_sort],eax
|
||||
stdcall pole_fl_sort, [memCell],eax
|
||||
|
||||
mov ecx,[memCell]
|
||||
mov ebx,1
|
||||
@ -628,7 +628,7 @@ pole_next_gen:
|
||||
jae .no_change
|
||||
xor byte[edx+Cell.liv],3
|
||||
mov edi,[tim]
|
||||
mov dword[edx+Cell.tc],edi
|
||||
mov [edx+Cell.tc],edi
|
||||
bt word[edx+Cell.liv],0
|
||||
jc .new_cell
|
||||
push eax
|
||||
@ -722,8 +722,8 @@ proc pole_fl_sort, a:dword, n:dword
|
||||
add edi,ecx ;edi -> &a[i]
|
||||
mov esi,[edi] ;w=a[i];
|
||||
mov edx,[ecx+4]
|
||||
mov dword[edi],edx ;a[i]=a[1];
|
||||
mov dword[ecx+4],esi ;a[1]=w;
|
||||
mov [edi],edx ;a[i]=a[1];
|
||||
mov [ecx+4],esi ;a[1]=w;
|
||||
|
||||
dec eax
|
||||
cmp eax,2
|
||||
@ -749,7 +749,7 @@ endl
|
||||
lea edx,[ebx*4]
|
||||
add edx,eax
|
||||
mov edx,[edx]
|
||||
mov dword[copy],edx ;copy=a[i];
|
||||
mov [copy],edx ;copy=a[i];
|
||||
mov edi,ebx
|
||||
shl edi,1 ;m=i<<1;
|
||||
.cycle_b: ;while (m<=k) {
|
||||
@ -774,7 +774,7 @@ endl
|
||||
;if (pole_compare_cells_bm(a[j],copy)) {
|
||||
lea edx,[esi*4]
|
||||
add edx,eax
|
||||
stdcall pole_compare_cells_bm, dword[edx],dword[copy]
|
||||
stdcall pole_compare_cells_bm, dword[edx],[copy]
|
||||
cmp dl,0
|
||||
je .cycle_e ;} else break; //¢ë室 ¨§ 横«
|
||||
|
||||
@ -795,7 +795,7 @@ endl
|
||||
shl ebx,2
|
||||
add eax,ebx
|
||||
mov edx,[copy]
|
||||
mov dword[eax],edx ;a[i]=copy;
|
||||
mov [eax],edx ;a[i]=copy;
|
||||
|
||||
popad
|
||||
ret
|
||||
@ -1480,7 +1480,7 @@ but_pole_up:
|
||||
xor edx,edx
|
||||
div ecx
|
||||
@@:
|
||||
add dword[Cor_y],eax
|
||||
add [Cor_y],eax
|
||||
pop edx ecx eax
|
||||
stdcall [buf2d_clear], buf_0, [buf_0.color]
|
||||
call pole_paint
|
||||
@ -1499,7 +1499,7 @@ but_pole_dn:
|
||||
xor edx,edx
|
||||
div ecx
|
||||
@@:
|
||||
sub dword[Cor_y],eax
|
||||
sub [Cor_y],eax
|
||||
pop edx ecx eax
|
||||
stdcall [buf2d_clear], buf_0, [buf_0.color]
|
||||
call pole_paint
|
||||
@ -1511,14 +1511,13 @@ but_pole_left:
|
||||
push eax ecx edx
|
||||
mov eax,[buf_0.w]
|
||||
shr eax,2
|
||||
xor ecx,ecx
|
||||
mov cl,byte[zoom]
|
||||
cmp cx,2
|
||||
movzx ecx,byte[zoom]
|
||||
cmp ecx,2
|
||||
jl @f ;¤¥«¥¨¥ ¢¥«¨ç¨ã zoom
|
||||
xor edx,edx
|
||||
div ecx
|
||||
@@:
|
||||
add dword[Cor_x],eax
|
||||
add [Cor_x],eax
|
||||
pop edx ecx eax
|
||||
stdcall [buf2d_clear], buf_0, [buf_0.color]
|
||||
call pole_paint
|
||||
@ -1537,25 +1536,20 @@ but_pole_right:
|
||||
xor edx,edx
|
||||
div ecx
|
||||
@@:
|
||||
sub dword[Cor_x],eax
|
||||
sub [Cor_x],eax
|
||||
pop edx ecx eax
|
||||
stdcall [buf2d_clear], buf_0, [buf_0.color]
|
||||
call pole_paint
|
||||
stdcall [buf2d_draw], buf_0
|
||||
ret
|
||||
|
||||
;align 4
|
||||
;but_bru_clear:
|
||||
; ret
|
||||
|
||||
;input:
|
||||
; buf - 㪠§ ⥫ì áâபã, ç¨á«® ¤®«¦® ¡ëâì ¢ 10 ¨«¨ 16 à¨ç®¬ ¢¨¤¥
|
||||
;output:
|
||||
; eax - ç¨á«®
|
||||
align 4
|
||||
proc conv_str_to_int, buf:dword
|
||||
proc conv_str_to_int uses ebx ecx esi, buf:dword
|
||||
xor eax,eax
|
||||
push ebx ecx esi
|
||||
xor ebx,ebx
|
||||
mov esi,[buf]
|
||||
;®¯à¥¤¥«¥¨¥ ®âà¨æ ⥫ìëå ç¨á¥«
|
||||
@ -1617,7 +1611,6 @@ proc conv_str_to_int, buf:dword
|
||||
sub ecx,eax
|
||||
mov eax,ecx
|
||||
@@:
|
||||
pop esi ecx ebx
|
||||
ret
|
||||
endp
|
||||
|
||||
@ -1661,32 +1654,17 @@ db 'RLE',0
|
||||
db 0
|
||||
|
||||
|
||||
|
||||
head_f_i:
|
||||
head_f_l db '"‘¨á⥬ ï ®è¨¡ª ',0
|
||||
|
||||
system_dir_0 db '/sys/lib/'
|
||||
lib_name_0 db 'proc_lib.obj',0
|
||||
err_message_found_lib_0 db '<27>¥ ©¤¥ ¡¨¡«¨®â¥ª ',39,'proc_lib.obj',39,'" -tE',0
|
||||
err_message_import_0 db 'Žè¨¡ª ¯à¨ ¨¬¯®à⥠¡¨¡«¨®â¥ª¨ ',39,'proc_lib.obj',39,'" -tE',0
|
||||
|
||||
system_dir_1 db '/sys/lib/'
|
||||
lib_name_1 db 'libimg.obj',0
|
||||
err_message_found_lib_1 db '<27>¥ ©¤¥ ¡¨¡«¨®â¥ª ',39,'libimg.obj',39,'" -tE',0
|
||||
err_message_import_1 db 'Žè¨¡ª ¯à¨ ¨¬¯®à⥠¡¨¡«¨®â¥ª¨ ',39,'libimg.obj',39,'" -tE',0
|
||||
|
||||
system_dir_2 db '/sys/lib/'
|
||||
lib_name_2 db 'buf2d.obj',0
|
||||
err_msg_found_lib_2 db '<27>¥ ©¤¥ ¡¨¡«¨®â¥ª ',39,'buf2d.obj',39,'" -tE',0
|
||||
err_msg_import_2 db 'Žè¨¡ª ¯à¨ ¨¬¯®à⥠¡¨¡«¨®â¥ª¨ ',39,'buf2d',39,'" -tE',0
|
||||
|
||||
l_libs_start:
|
||||
lib0 l_libs lib_name_0, 0, file_name, system_dir_0,\
|
||||
err_message_found_lib_0, head_f_l, proclib_import,err_message_import_0, head_f_i
|
||||
lib1 l_libs lib_name_1, 0, file_name, system_dir_1,\
|
||||
err_message_found_lib_1, head_f_l, import_libimg, err_message_import_1, head_f_i
|
||||
lib2 l_libs lib_name_2, 0, file_name, system_dir_2,\
|
||||
err_msg_found_lib_2,head_f_l,import_buf2d,err_msg_import_2,head_f_i
|
||||
lib0 l_libs lib_name_0, file_name, system_dir_0, import_proclib
|
||||
lib1 l_libs lib_name_1, file_name, system_dir_1, import_libimg
|
||||
lib2 l_libs lib_name_2, file_name, system_dir_2, import_buf2d
|
||||
l_libs_end:
|
||||
|
||||
align 4
|
||||
@ -1702,7 +1680,7 @@ import_libimg:
|
||||
aimg_destroy db 'img_destroy',0
|
||||
|
||||
align 4
|
||||
proclib_import: ;®¯¨á ¨¥ íªá¯®àâ¨à㥬ëå äãªæ¨©
|
||||
import_proclib:
|
||||
OpenDialog_Init dd aOpenDialog_Init
|
||||
OpenDialog_Start dd aOpenDialog_Start
|
||||
dd 0,0
|
||||
@ -1740,16 +1718,15 @@ buf_0: dd 0
|
||||
|
||||
align 16
|
||||
i_end:
|
||||
mouse_dd dd 0
|
||||
last_time dd 0
|
||||
sc system_colors
|
||||
mouse_dd rd 1
|
||||
last_time rd 1
|
||||
sc system_colors
|
||||
procinfo process_information
|
||||
rb 1024
|
||||
stacktop:
|
||||
sys_path rb 1024
|
||||
file_name:
|
||||
rb 2048 ;4096
|
||||
file_name rb 2048 ;4096
|
||||
plugin_path rb 4096
|
||||
openfile_path rb 4096
|
||||
filename_area rb 256
|
||||
rb 1024
|
||||
stacktop:
|
||||
mem:
|
||||
|
@ -8,13 +8,14 @@ include '../../macros.inc'
|
||||
include '../../proc32.inc'
|
||||
include '../../KOSfuncs.inc'
|
||||
include '../../load_img.inc'
|
||||
include '../../load_lib.mac'
|
||||
include '../../develop/libraries/TinyGL/asm_fork/opengl_const.inc'
|
||||
include '../../develop/libraries/TinyGL/asm_fork/zbuffer.inc'
|
||||
include '../../develop/libraries/libs-dev/libimg/libimg.inc'
|
||||
include '../../develop/info3ds/info_fun_float.inc'
|
||||
|
||||
@use_library_mem mem.Alloc,mem.Free,mem.ReAlloc,dll.Load
|
||||
caption db 'Image transform 02.10.20',0 ;¯®¤¯¨áì ®ª
|
||||
@use_library mem.Alloc,mem.Free,mem.ReAlloc,dll.Load
|
||||
caption db 'Image transform 08.12.20',0 ;ŻŽ¤Ż¨áě ŽŞ
|
||||
|
||||
BUF_STRUCT_SIZE equ 21
|
||||
buf2d_data equ dword[edi] ;¤ ë¥ ¡ãä¥à ¨§®¡à ¦¥¨ï
|
||||
@ -1422,40 +1423,12 @@ lib_name_2 db 'buf2d.obj',0
|
||||
system_dir_3 db '/sys/lib/'
|
||||
lib_name_3 db 'tinygl.obj',0
|
||||
|
||||
align 4
|
||||
head_f_i:
|
||||
if lang eq ru
|
||||
head_f_l db '"‘¨á⥬ ï ®è¨¡ª ',0
|
||||
err_message_found_lib_0 db '<27>¥ ©¤¥ ¡¨¡«¨®â¥ª ',39,'proc_lib.obj',39,'" -tE',0
|
||||
err_message_import_0 db 'Žè¨¡ª ¯à¨ ¨¬¯®à⥠¡¨¡«¨®â¥ª¨ ',39,'proc_lib.obj',39,'" -tE',0
|
||||
err_message_found_lib_1 db '<27>¥ ©¤¥ ¡¨¡«¨®â¥ª ',39,'libimg.obj',39,'" -tE',0
|
||||
err_message_import_1 db 'Žè¨¡ª ¯à¨ ¨¬¯®à⥠¡¨¡«¨®â¥ª¨ ',39,'libimg.obj',39,'" -tE',0
|
||||
err_msg_found_lib_2 db '<27>¥ ©¤¥ ¡¨¡«¨®â¥ª ',39,'buf2d.obj',39,'" -tE',0
|
||||
err_msg_import_2 db 'Žè¨¡ª ¯à¨ ¨¬¯®à⥠¡¨¡«¨®â¥ª¨ ',39,'buf2d',39,'" -tE',0
|
||||
err_msg_found_lib_3 db '<27>¥ ©¤¥ ¡¨¡«¨®â¥ª ',39,'tinygl.obj',39,'" -tE',0
|
||||
err_msg_import_3 db 'Žè¨¡ª ¯à¨ ¨¬¯®à⥠¡¨¡«¨®â¥ª¨ ',39,'tinygl',39,'" -tE',0
|
||||
else
|
||||
head_f_l db '"System error',0
|
||||
err_message_found_lib_0 db 'Sorry I cannot found library ',39,'proc_lib.obj',39,'" -tE',0
|
||||
err_message_import_0 db 'Error on load import library ',39,'proc_lib.obj',39,'" -tE',0
|
||||
err_message_found_lib_1 db 'Sorry I cannot found library ',39,'libimg.obj',39,'" -tE',0
|
||||
err_message_import_1 db 'Error on load import library ',39,'libimg.obj',39,'" -tE',0
|
||||
err_msg_found_lib_2 db 'Sorry I cannot found library ',39,'buf2d.obj',39,'" -tE',0
|
||||
err_msg_import_2 db 'Error on load import library ',39,'buf2d',39,'" -tE',0
|
||||
err_msg_found_lib_3 db 'Sorry I cannot found library ',39,'tinygl.obj',39,'" -tE',0
|
||||
err_msg_import_3 db 'Error on load import library ',39,'tinygl',39,'" -tE',0
|
||||
end if
|
||||
|
||||
align 4
|
||||
l_libs_start:
|
||||
lib_0 l_libs lib_name_0, sys_path, file_name, system_dir_0,\
|
||||
err_message_found_lib_0, head_f_l, proclib_import,err_message_import_0, head_f_i
|
||||
lib_1 l_libs lib_name_1, sys_path, file_name, system_dir_1,\
|
||||
err_message_found_lib_1, head_f_l, import_libimg, err_message_import_1, head_f_i
|
||||
lib_2 l_libs lib_name_2, sys_path, library_path, system_dir_2,\
|
||||
err_msg_found_lib_2,head_f_l,import_buf2d,err_msg_import_2,head_f_i
|
||||
lib_3 l_libs lib_name_3, sys_path, library_path, system_dir_3,\
|
||||
err_msg_found_lib_3,head_f_l,import_lib_tinygl,err_msg_import_3,head_f_i
|
||||
lib_0 l_libs lib_name_0, file_name, system_dir_0, import_proclib
|
||||
lib_1 l_libs lib_name_1, file_name, system_dir_1, import_libimg
|
||||
lib_2 l_libs lib_name_2, library_path, system_dir_2, import_buf2d
|
||||
lib_3 l_libs lib_name_3, library_path, system_dir_3, import_lib_tinygl
|
||||
l_libs_end:
|
||||
|
||||
align 4
|
||||
@ -1506,7 +1479,7 @@ import_libimg:
|
||||
aimg_draw db 'img_draw',0
|
||||
|
||||
align 4
|
||||
proclib_import: ;®¯¨á ¨¥ íªá¯®àâ¨à㥬ëå äãªæ¨©
|
||||
import_proclib:
|
||||
OpenDialog_Init dd aOpenDialog_Init
|
||||
OpenDialog_Start dd aOpenDialog_Start
|
||||
OpenDialog_Set_file_name dd aOpenDialog_Set_file_name
|
||||
@ -1656,8 +1629,7 @@ run_file_70 FileInfoBlock
|
||||
align 16
|
||||
stacktop:
|
||||
sys_path rb 1024
|
||||
file_name:
|
||||
rb 1024 ;4096
|
||||
file_name rb 1024 ;4096
|
||||
library_path rb 1024
|
||||
plugin_path rb 4096
|
||||
openfile_path rb 4096
|
||||
|
@ -1,9 +1,9 @@
|
||||
; MIDI PLAYER FOR MENUET v1.0
|
||||
; MIDI PLAYER FOR KOLIBRI v1.0
|
||||
; Written in pure assembler by Ivushkin Andrey aka Willow
|
||||
;
|
||||
;
|
||||
; Created: December 7, 2004
|
||||
; Last changed: July 29, 2005
|
||||
; Last changed: December 8, 2020
|
||||
;
|
||||
; COMPILE WITH FASM
|
||||
|
||||
@ -53,23 +53,21 @@ FL_BOTTRED equ 0x100
|
||||
FL_MULSEL equ 0x8000
|
||||
|
||||
use32
|
||||
org 0x0
|
||||
org 0
|
||||
|
||||
db 'MENUET01'
|
||||
dd 0x01
|
||||
dd START
|
||||
dd IM_END
|
||||
dd 1, START, IM_END
|
||||
dd I_END ;APP_MEM
|
||||
dd stacktop ;APP_MEM - 1024
|
||||
dd I_PARAM
|
||||
dd cur_dir_path
|
||||
dd I_PARAM, cur_dir_path
|
||||
|
||||
listsel dd 0
|
||||
channel dd 0
|
||||
COLOR_ORDER equ MENUETOS
|
||||
include '../../../config.inc' ;for nightbuild
|
||||
include '../../../macros.inc' ; decrease code size (optional)
|
||||
include '../../../develop/libraries/box_lib/load_lib.mac'
|
||||
include '../../../KOSfuncs.inc'
|
||||
include '../../../load_lib.mac'
|
||||
|
||||
@use_library
|
||||
|
||||
@ -86,8 +84,8 @@ hdrimg:
|
||||
btns:
|
||||
file 'buttons.gif'
|
||||
START:
|
||||
mcall 68, 11
|
||||
|
||||
mcall SF_SYS_MISC, SSF_HEAP_INIT
|
||||
|
||||
load_libraries l_libs_start,end_l_libs
|
||||
|
||||
mov esi,I_PARAM
|
||||
@ -99,13 +97,13 @@ load_libraries l_libs_start,end_l_libs
|
||||
mov byte [edi-1], 0
|
||||
@@:
|
||||
;OpenDialog initialisation
|
||||
push dword OpenDialog_data
|
||||
call [OpenDialog_Init]
|
||||
push dword OpenDialog_data
|
||||
call [OpenDialog_Init]
|
||||
|
||||
or [flag],FL_BOTTRED;+FL_MUTE
|
||||
mov ecx,ipcarea
|
||||
call init_ipc
|
||||
mcall 40,1000111b
|
||||
mcall SF_SET_EVENTS_MASK,1000111b
|
||||
mov esi,btns
|
||||
mov edi,btn_raw
|
||||
call ReadGIF
|
||||
@ -116,7 +114,7 @@ load_libraries l_libs_start,end_l_libs
|
||||
mov edi,bottom_raw
|
||||
call ReadGIF
|
||||
call respawn
|
||||
mcall 9,prcinfo,-1
|
||||
mcall SF_THREAD_INFO,prcinfo,-1
|
||||
mov edx,[ebx+30]
|
||||
mov [parentPID],edx
|
||||
mov esi,I_PARAM
|
||||
@ -190,9 +188,7 @@ clearpath:
|
||||
mov esi,filename
|
||||
mov edi,I_PARAM
|
||||
rep movsd
|
||||
mov eax,70
|
||||
mov ebx,file_info
|
||||
mcall
|
||||
mcall SF_FILE,file_info
|
||||
add ebx,workarea
|
||||
mov [midi_limit],ebx
|
||||
mov edi,I_PARAM
|
||||
@ -245,7 +241,7 @@ decode_end:
|
||||
test [flag],FL_PLAY
|
||||
jz .noplay
|
||||
call draw_window
|
||||
mcall 5,100
|
||||
mcall SF_SLEEP,100
|
||||
mov eax,IPC_PLAY
|
||||
call ipc_send
|
||||
.noplay:
|
||||
@ -263,8 +259,7 @@ red:
|
||||
still:
|
||||
mov ecx,ipcarea
|
||||
call init_ipc
|
||||
mov eax,10
|
||||
mcall
|
||||
mcall SF_WAIT_EVENT
|
||||
prc_event:
|
||||
test eax,eax
|
||||
jz still
|
||||
@ -290,7 +285,7 @@ prc_event:
|
||||
xor edx,edx
|
||||
test [flag],FL_SHUFFLE
|
||||
jz .noshuf
|
||||
mcall 26,9
|
||||
mcall SF_SYSTEM_GET,SSF_TIME_COUNT
|
||||
movzx ebx,byte[list_count]
|
||||
div ebx
|
||||
mov eax,edx
|
||||
@ -424,12 +419,6 @@ db 0
|
||||
;---------------------------------------------------------------------
|
||||
system_dir_ProcLib db '/sys/lib/proc_lib.obj',0
|
||||
|
||||
head_f_i:
|
||||
head_f_l db 'error',0
|
||||
err_message_found_lib2 db 'proc_lib.obj - Not found!',0
|
||||
|
||||
err_message_import2 db 'proc_lib.obj - Wrong import!',0
|
||||
|
||||
;---------------------------------------------------------------------
|
||||
align 4
|
||||
ProcLib_import:
|
||||
@ -444,8 +433,8 @@ aOpenDialog_Start db 'OpenDialog_start',0
|
||||
;---------------------------------------------------------------------
|
||||
l_libs_start:
|
||||
|
||||
library01 l_libs system_dir_ProcLib+9, cur_dir_path, temp_dir_pach, system_dir_ProcLib, \
|
||||
err_message_found_lib2, head_f_l, ProcLib_import, err_message_import2, head_f_i
|
||||
library01 l_libs system_dir_ProcLib+9, temp_dir_pach, system_dir_ProcLib, \
|
||||
ProcLib_import
|
||||
|
||||
end_l_libs:
|
||||
;---------------------------------------------------------------------
|
||||
|
@ -2,19 +2,14 @@ macro use_label
|
||||
{
|
||||
draw_label:
|
||||
pusha
|
||||
xor esi,esi
|
||||
mov edx,[edi+8]
|
||||
xor esi,esi
|
||||
mov edx,[edi+8]
|
||||
.check_next:
|
||||
mov ah,[edx+esi]
|
||||
inc esi
|
||||
test ah,ah
|
||||
jz @f
|
||||
jmp .check_next
|
||||
@@:
|
||||
mov eax,4
|
||||
mov ebx,[edi]
|
||||
mov ecx,[edi+4]
|
||||
mcall
|
||||
mov ah,[edx+esi]
|
||||
inc esi
|
||||
test ah,ah
|
||||
jnz .check_next
|
||||
mcall SF_DRAW_TEXT,[edi],[edi+4]
|
||||
popa
|
||||
ret
|
||||
}
|
||||
|
@ -21,7 +21,7 @@
|
||||
format binary as ""
|
||||
|
||||
title equ 'Screenshooter v1.21' ; ‡ £®«®¢®ª ®ª
|
||||
include '../../develop/libraries/box_lib/load_lib.mac'
|
||||
include '../../load_lib.mac'
|
||||
include '../../develop/libraries/box_lib/trunk/box_lib.mac'
|
||||
include '../../config.inc' ;for nightbuild
|
||||
include '../../proc32.inc'
|
||||
@ -34,21 +34,15 @@ include 'textwork.inc'
|
||||
include 'scrshoot.mac'
|
||||
|
||||
use32
|
||||
org 0x0
|
||||
org 0
|
||||
db 'MENUET01'
|
||||
dd 0x1
|
||||
dd start
|
||||
dd IM_END
|
||||
dd i_end
|
||||
dd stacktop
|
||||
dd cmdstr
|
||||
dd cur_dir_path
|
||||
dd 1, start, IM_END, i_end, stacktop, cmdstr, cur_dir_path
|
||||
|
||||
include 'lang.inc'
|
||||
include '../../dll.inc'
|
||||
|
||||
align 4
|
||||
@use_library_mem mem.Alloc,mem.Free,mem.ReAlloc,dll.Load
|
||||
@use_library mem.Alloc,mem.Free,mem.ReAlloc,dll.Load
|
||||
use_txt_button ; |
|
||||
use_label ; |-- GUI ª®¬¯®¥âë ¨ ¥ª®â®àë¥ ¯à®æ¥¤ãàë
|
||||
use_text_work ; /
|
||||
@ -607,14 +601,14 @@ labels_end:
|
||||
;---------------------------------------------------------------------
|
||||
l_libs_start:
|
||||
|
||||
library01 l_libs system_dir_Boxlib+9, cur_dir_path, library_path, system_dir_Boxlib, \
|
||||
err_message_found_lib1, head_f_l, Box_lib_import, err_message_import1, head_f_i
|
||||
library01 l_libs system_dir_Boxlib+9, library_path, system_dir_Boxlib, \
|
||||
Box_lib_import
|
||||
|
||||
library02 l_libs system_dir_ProcLib+9, cur_dir_path, library_path, system_dir_ProcLib, \
|
||||
err_message_found_lib2, head_f_l, ProcLib_import, err_message_import2, head_f_i
|
||||
library02 l_libs system_dir_ProcLib+9, library_path, system_dir_ProcLib, \
|
||||
ProcLib_import
|
||||
|
||||
library03 l_libs system_dir_LibImg+9, cur_dir_path, library_path, system_dir_LibImg, \
|
||||
err_message_found_lib3, head_f_l, import_libimg, err_message_import3, head_f_i
|
||||
library03 l_libs system_dir_LibImg+9, library_path, system_dir_LibImg, \
|
||||
import_libimg
|
||||
|
||||
end_l_libs:
|
||||
;---------------------------------------------------------------------
|
||||
|
@ -14,24 +14,15 @@ macro draw_status text_ptr
|
||||
|
||||
macro start_draw_window
|
||||
{
|
||||
;mov eax,12
|
||||
push 12
|
||||
pop eax
|
||||
xor ebx,ebx
|
||||
inc ebx
|
||||
mcall
|
||||
xor ebx,ebx
|
||||
inc ebx
|
||||
mcall SF_REDRAW
|
||||
}
|
||||
|
||||
;--- ñîîáùèòü ñèñòåìå î çàâåðøåíèè ïåðåðèñîâêè îêíà ---
|
||||
macro stop_draw_window
|
||||
{
|
||||
;mov eax,12
|
||||
push 12
|
||||
pop eax
|
||||
;mov ebx,2
|
||||
push 2
|
||||
pop ebx
|
||||
mcall
|
||||
mcall SF_REDRAW, SSF_END_DRAW
|
||||
}
|
||||
|
||||
;--- óñòàíîâèòü ìàñêó îæèäàåìûõ ñîáûòèé ---
|
||||
@ -39,8 +30,7 @@ macro stop_draw_window
|
||||
;--- îæèäàòü ñîáûòèÿ ---
|
||||
macro wait_event redraw,key,button,mouse,ipc,other
|
||||
{
|
||||
mov eax,10
|
||||
mcall
|
||||
mcall SF_WAIT_EVENT
|
||||
dec ax
|
||||
if redraw eq
|
||||
else
|
||||
@ -77,76 +67,25 @@ end if
|
||||
;--- óñòàíîâèòü ìàñêó îæèäàåìûõ ñîáûòèé ---
|
||||
macro set_events_mask mask
|
||||
{
|
||||
;mov eax,40
|
||||
push 40
|
||||
pop eax
|
||||
;mov ebx,mask
|
||||
push mask
|
||||
pop ebx
|
||||
mcall
|
||||
mcall SF_SET_EVENTS_MASK, mask
|
||||
}
|
||||
|
||||
;macro check_boxes_set_sys_color start,end,color_table
|
||||
;{
|
||||
;ch_left equ [edi] ;êîîðäèíàòà íà÷àëà ðèñîâàíèÿ ïî õ
|
||||
;ch_top equ [edi+4] ;êîîðäèíàòà íà÷àëà ðèñîâàíèÿ ïî ó
|
||||
;ch_text_margin equ [edi+8] ;=4 ðàññòîÿíèå îò ïðÿìîóãîëüíèêà ÷åê áîêñà äî íàäïèñè
|
||||
;ch_size equ [edi+8] ;12 ðàçìåð êâàäðàòà ÷åê áîêñà
|
||||
;ch_color equ [edi+12] ;öâåò âíóòðè checkbox
|
||||
;ch_border_color equ [edi+16] ; or [edi+4] ;öâåò ðàìêè checkbox åå ìîæíî çàäàòü ñàìîñòîÿòåëüíî
|
||||
;ch_text_color equ [edi+20];[edi+4] ;öâåò òåêñòà
|
||||
;ch_text_ptr equ [edi+24] ;óêàçàòåëü íà íà÷àëî òåêñòîâîé ñòðîêè
|
||||
;ch_text_length equ [edi+28]
|
||||
;ch_flags equ [edi+32] ;ôëàãè
|
||||
|
||||
|
||||
;ch_left equ [edi] ;êîîðäèíàòà íà÷àëà ðèñîâàíèÿ ïî õ
|
||||
;ch_top equ [edi+2] ;êîîðäèíàòà íà÷àëà ðèñîâàíèÿ ïî ó
|
||||
;ch_color equ [edi+4] ;öâåò âíóòðè checkbox
|
||||
;ch_border_color equ [edi+8] ;öâåò ðàìêè checkbox
|
||||
;ch_text_color equ [edi+12] ;öâåò òåêñòà
|
||||
;ch_text_ptr equ [edi+16] ;óêàçàòåëü íà íà÷àëî òåêñòîâîé ñòðîêè
|
||||
;ch_text_length equ [edi+20] ;äëèíà íàäïèñè (2^64 òàêîé äëèíû ìîæåò áûòü òåêñò)
|
||||
;ch_flags equ [edi+24] ;ôëàãè
|
||||
|
||||
; mov edi,start
|
||||
; mov ecx,((end-start)/ch_struc_size)
|
||||
; mov esi,color_table
|
||||
;@@:
|
||||
; push dword [esi+32]
|
||||
; pop dword ch_text_color
|
||||
; push dword [esi+36]
|
||||
; pop dword ch_border_color
|
||||
; add edi,ch_struc_size
|
||||
; loop @b
|
||||
;}
|
||||
macro get_key
|
||||
{
|
||||
;mov eax,2
|
||||
push 2
|
||||
pop eax
|
||||
mcall
|
||||
mcall SF_GET_KEY
|
||||
}
|
||||
;--- ïîëó÷èòü êîä íàæàòîé êíîïêè ---
|
||||
macro get_pressed_button
|
||||
{
|
||||
;mov eax,17
|
||||
push 17
|
||||
pop eax
|
||||
mcall
|
||||
mcall SF_GET_BUTTON
|
||||
}
|
||||
macro get_active_window
|
||||
{
|
||||
mov eax,18
|
||||
mov ebx,7
|
||||
mcall
|
||||
mcall SF_SYSTEM,SSF_GET_ACTIVE_WINDOW
|
||||
}
|
||||
;--- ¯®«ãç¨âì ¨ä®à¬ æ¨î ® ¯à®æ¥áᥠ---
|
||||
;--- ïîëó÷èòü èíôîðìàöèþ î ïðîöåññå ---
|
||||
macro get_procinfo proc_inf_buf,slot_num
|
||||
{
|
||||
;mov eax,9
|
||||
push 9
|
||||
pop eax
|
||||
;mov ebx,proc_inf_buf
|
||||
push proc_inf_buf
|
||||
pop ebx
|
||||
@ -158,11 +97,11 @@ else
|
||||
push slot_num
|
||||
pop ecx
|
||||
end if
|
||||
mcall
|
||||
mcall SF_THREAD_INFO
|
||||
}
|
||||
macro get_screen_prop struc_ptr
|
||||
{
|
||||
mov eax,61
|
||||
mov eax,SF_GET_GRAPHICAL_PARAMS
|
||||
push eax eax
|
||||
xor ebx,ebx
|
||||
inc ebx
|
||||
@ -179,39 +118,31 @@ macro get_screen_prop struc_ptr
|
||||
}
|
||||
macro min_window
|
||||
{
|
||||
mov eax,18
|
||||
mov ebx,10
|
||||
mcall
|
||||
mcall SF_SYSTEM,SSF_MINIMIZE_WINDOW
|
||||
}
|
||||
macro app_close
|
||||
{
|
||||
or eax,-1
|
||||
mcall
|
||||
mcall SF_TERMINATE_PROCESS
|
||||
}
|
||||
macro get_skin_height
|
||||
{
|
||||
mov eax,48
|
||||
mov ebx,4
|
||||
mcall
|
||||
mcall SF_STYLE_SETTINGS,SSF_GET_SKIN_HEIGHT
|
||||
}
|
||||
macro delay time
|
||||
{
|
||||
mov eax,5
|
||||
if time eq
|
||||
else
|
||||
mov ebx,time
|
||||
mov ebx,time
|
||||
end if
|
||||
mcall
|
||||
mcall SF_SLEEP
|
||||
}
|
||||
macro activ_window slot_n
|
||||
{
|
||||
mov eax,18
|
||||
mov ebx,3
|
||||
if slot_n eq
|
||||
else
|
||||
mov ecx,slot_n
|
||||
mov ecx,slot_n
|
||||
end if
|
||||
mcall
|
||||
mcall SF_SYSTEM,SSF_FOCUS_WINDOW
|
||||
}
|
||||
struc screen_prop
|
||||
{
|
||||
@ -261,7 +192,7 @@ struc ipc_buffer size
|
||||
.messages: rb size
|
||||
}
|
||||
|
||||
;--- 梥â ---
|
||||
;--- öâåòà ---
|
||||
cl_white=0xffffff
|
||||
cl_black=0x000000
|
||||
|
||||
|
@ -55,6 +55,7 @@ align 4
|
||||
|
||||
jmp .still
|
||||
|
||||
align 4
|
||||
.draw_window:
|
||||
start_draw_window
|
||||
|
||||
@ -130,8 +131,9 @@ init_editbox:
|
||||
call [edit_box_set_text] ;ecx,edi
|
||||
ret
|
||||
;--------------------------------------------------------------------
|
||||
;--- ‘ç¨âë¢ ¨¥ ®¡« ⨠----------------------------------------------
|
||||
;--- ‘ç¨âë¢ ¨¥ ®¡« á⨠---------------------------------------------
|
||||
;--------------------------------------------------------------------
|
||||
align 4
|
||||
read_rect:
|
||||
bt dword [use_rect_active_window.flags],1
|
||||
jc read_rect_from_active_window
|
||||
@ -173,6 +175,7 @@ read_rect:
|
||||
mov [rect.height],ax
|
||||
ret
|
||||
|
||||
align 4
|
||||
read_rect_from_active_window:
|
||||
call get_active_window_info
|
||||
|
||||
@ -188,6 +191,7 @@ read_rect_from_active_window:
|
||||
mov [rect.height],ax
|
||||
ret
|
||||
|
||||
align 4
|
||||
draw_rect_on_screen:
|
||||
|
||||
xor edx,edx
|
||||
@ -237,37 +241,11 @@ ret
|
||||
|
||||
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
|
||||
;DATA ¤ ë¥
|
||||
;‚ᥣ¤ ᮡ«î¤ âì ¯®á«¥¤®¢ ⥫ì®áâì ¢ ¨¬¥¨.
|
||||
|
||||
system_dir_Boxlib db '/sys/lib/box_lib.obj',0
|
||||
system_dir_ProcLib db '/sys/lib/proc_lib.obj',0
|
||||
system_dir_LibImg db '/sys/lib/libimg.obj',0
|
||||
|
||||
if lang eq ru
|
||||
head_f_i:
|
||||
head_f_l db '‘¨á⥬ ï ®è¨¡ª ',0
|
||||
|
||||
err_message_found_lib1 db 'box_lib.obj - ¥ ©¤¥ !',0
|
||||
err_message_found_lib2 db 'proc_lib.obj - ¥ ©¤¥ !',0
|
||||
err_message_found_lib3 db 'libimg.obj - ¥ ©¤¥ !',0
|
||||
|
||||
err_message_import1 db 'box_lib.obj - ®è¨¡ª ¨¬¯®àâ !',0
|
||||
err_message_import2 db 'proc_lib.obj - ®è¨¡ª ¨¬¯®àâ !',0
|
||||
err_message_import3 db 'libimg.obj - ®è¨¡ª ¨¬¯®àâ !',0
|
||||
|
||||
else
|
||||
|
||||
head_f_i:
|
||||
head_f_l db 'System error',0
|
||||
|
||||
err_message_found_lib1 db 'box_lib.obj - Not found!',0
|
||||
err_message_found_lib2 db 'proc_lib.obj - Not found!',0
|
||||
err_message_found_lib3 db 'libimg.obj - Not found!',0
|
||||
|
||||
err_message_import1 db 'box_lib.obj - Wrong import!',0
|
||||
err_message_import2 db 'proc_lib.obj - Wrong import!',0
|
||||
err_message_import3 db 'libimg.obj - Wrong import!',0
|
||||
end if
|
||||
;---------------------------------------------------------------------
|
||||
align 4
|
||||
ProcLib_import:
|
||||
|
@ -69,8 +69,7 @@ ProcLib_import:
|
||||
OpenDialog_Init dd aOpenDialog_Init
|
||||
OpenDialog_Start dd aOpenDialog_Start
|
||||
;OpenDialog__Version dd aOpenDialog_Version
|
||||
dd 0
|
||||
dd 0
|
||||
dd 0,0
|
||||
aOpenDialog_Init db 'OpenDialog_init',0
|
||||
aOpenDialog_Start db 'OpenDialog_start',0
|
||||
;aOpenDialog_Version db 'Version_OpenDialog',0
|
||||
@ -85,8 +84,7 @@ init_checkbox dd aInit_checkbox
|
||||
check_box_draw dd aCheck_box_draw
|
||||
check_box_mouse dd aCheck_box_mouse
|
||||
|
||||
dd 0
|
||||
dd 0
|
||||
dd 0,0
|
||||
|
||||
aEdit_box_draw db 'edit_box',0
|
||||
aEdit_box_key db 'edit_box_key',0
|
||||
@ -97,26 +95,15 @@ aCheck_box_draw db 'check_box_draw2',0
|
||||
aCheck_box_mouse db 'check_box_mouse2',0
|
||||
|
||||
;---------------------------------------------------------------------
|
||||
head_f_i:
|
||||
head_f_l db 'System error',0
|
||||
|
||||
err_message_found_lib1 db 'box_lib.obj - Not found!',0
|
||||
err_message_found_lib2 db 'proc_lib.obj - Not found!',0
|
||||
|
||||
err_message_import1 db 'box_lib.obj - Wrong import!',0
|
||||
err_message_import2 db 'proc_lib.obj - Wrong import!',0
|
||||
|
||||
system_dir_Boxlib db '/sys/lib/box_lib.obj',0
|
||||
system_dir_ProcLib db '/sys/lib/proc_lib.obj',0
|
||||
;---------------------------------------------------------------------
|
||||
align 4
|
||||
l_libs_start:
|
||||
|
||||
library01 l_libs system_dir_Boxlib+9, cur_dir_path, library_path, system_dir_Boxlib, \
|
||||
err_message_found_lib1, head_f_l, Box_lib_import, err_message_import1, head_f_i
|
||||
library01 l_libs system_dir_Boxlib+9, library_path, system_dir_Boxlib, Box_lib_import
|
||||
|
||||
library02 l_libs system_dir_ProcLib+9, cur_dir_path, library_path, system_dir_ProcLib, \
|
||||
err_message_found_lib2, head_f_l, ProcLib_import, err_message_import2, head_f_i
|
||||
library02 l_libs system_dir_ProcLib+9, library_path, system_dir_ProcLib, ProcLib_import
|
||||
|
||||
load_lib_end:
|
||||
;---------------------------------------------------------------------
|
||||
|
@ -23,15 +23,16 @@ use32
|
||||
dd cur_dir_path
|
||||
;---------------------------------------------------------------------
|
||||
include '../../../config.inc' ;for nightbuild
|
||||
include '../../../KOSfuncs.inc'
|
||||
include '../../../macros.inc'
|
||||
include '../../../gui_patterns.inc'
|
||||
include '../../../develop/libraries/box_lib/trunk/box_lib.mac'
|
||||
include '../../../develop/libraries/box_lib/load_lib.mac'
|
||||
include '../../../load_lib.mac'
|
||||
@use_library
|
||||
|
||||
START:
|
||||
mcall 68,11
|
||||
mcall 40,0x80000027
|
||||
mcall SF_SYS_MISC,SSF_HEAP_INIT
|
||||
mcall SF_SET_EVENTS_MASK,0x80000027
|
||||
|
||||
load_libraries l_libs_start,load_lib_end
|
||||
cmp eax,-1
|
||||
@ -130,7 +131,7 @@ red:
|
||||
call draw_window
|
||||
;--------------------------------------
|
||||
still:
|
||||
mcall 10
|
||||
mcall SF_WAIT_EVENT
|
||||
dec eax
|
||||
jz red
|
||||
|
||||
@ -182,11 +183,11 @@ clear_messages:
|
||||
exit:
|
||||
xor eax,eax
|
||||
dec eax
|
||||
mcall
|
||||
mcall ;SF_TERMINATE_PROCESS
|
||||
;*********************************************************************
|
||||
button:
|
||||
; button pressed
|
||||
mcall 17
|
||||
mcall SF_GET_BUTTON
|
||||
xchg al,ah
|
||||
cmp al,7
|
||||
jz but7
|
||||
@ -318,7 +319,7 @@ set_editbox_position_all:
|
||||
ret
|
||||
;*********************************************************************
|
||||
key:
|
||||
mcall 2
|
||||
mcall SF_GET_KEY
|
||||
|
||||
push dword edit1
|
||||
call [edit_box_key]
|
||||
@ -408,7 +409,7 @@ draw_messages:
|
||||
neg ecx
|
||||
mov esi,ecx
|
||||
pop edi
|
||||
mcall 4,,0xB0000000,edi
|
||||
mcall SF_DRAW_TEXT,,0xB0000000,edi
|
||||
add ebx,16
|
||||
add edi,80
|
||||
cmp edi,message_cur_pos
|
||||
@ -418,20 +419,20 @@ draw_messages:
|
||||
;*********************************************************************
|
||||
draw_log_area:
|
||||
DrawRectangle 5, LOG_Y, WIN_W-12, LOG_H, [sc.work_graph]
|
||||
mcall 13, <6,WIN_W-13>, <LOG_Y+1,LOG_H-1>, 0xFFFfff
|
||||
mcall SF_DRAW_RECT, <6,WIN_W-13>, <LOG_Y+1,LOG_H-1>, 0xFFFfff
|
||||
DrawRectangle3D 6, LOG_Y+1, WIN_W-13, LOG_H-1, 0xDEDEDE, [sc.work_graph]
|
||||
ret
|
||||
;*********************************************************************
|
||||
draw_window:
|
||||
; start redraw
|
||||
mcall 12,1
|
||||
mcall 48,3,sc,40
|
||||
mcall SF_REDRAW,SSF_BEGIN_DRAW
|
||||
mcall SF_STYLE_SETTINGS,SSF_GET_COLORS,sc,40
|
||||
;--------------------------------------
|
||||
edit_boxes_set_sys_color edit1,editboxes_end,sc
|
||||
check_boxes_set_sys_color2 check1,check1_end,sc
|
||||
;--------------------------------------
|
||||
; define window
|
||||
mcall 48,4
|
||||
mcall SF_STYLE_SETTINGS,SSF_GET_SKIN_HEIGHT
|
||||
|
||||
mov ecx,100 shl 16 + WIN_H
|
||||
add ecx, eax
|
||||
@ -440,8 +441,8 @@ draw_window:
|
||||
add edx,34000000h
|
||||
xor esi,esi
|
||||
xor edi,edi
|
||||
mcall 0,<250,WIN_W+10>,,,,caption_str
|
||||
mcall 9,procinfo,-1
|
||||
mcall SF_CREATE_WINDOW,<250,WIN_W+10>,,,,caption_str
|
||||
mcall SF_THREAD_INFO,procinfo,-1
|
||||
|
||||
mov eax,[procinfo+70] ;status of window
|
||||
test eax,100b
|
||||
@ -457,7 +458,7 @@ draw_window:
|
||||
call draw_editbox
|
||||
; end redraw
|
||||
.end:
|
||||
mcall 12,2
|
||||
mcall SF_REDRAW,SSF_END_DRAW
|
||||
ret
|
||||
;*********************************************************************
|
||||
draw_editbox:
|
||||
@ -494,7 +495,7 @@ set_editbox_position:
|
||||
draw_buttons:
|
||||
; define compress button
|
||||
mov cx,18
|
||||
mcall 8,<WIN_W - RIGHT_BTN_W - 5, RIGHT_BTN_W>, <3, 20>,2,[sc.work_button]
|
||||
mcall SF_DEFINE_BUTTON,<WIN_W - RIGHT_BTN_W - 5, RIGHT_BTN_W>, <3, 20>,2,[sc.work_button]
|
||||
; uncompress button
|
||||
inc edx
|
||||
add ecx,LINE_H shl 16
|
||||
@ -506,10 +507,10 @@ draw_buttons:
|
||||
mov ecx,[sc.work_button_text]
|
||||
or ecx,0x90000000
|
||||
mov edx,aQuestion
|
||||
mcall 4,<WIN_W-19, LINE_H*2+5>
|
||||
mcall SF_DRAW_TEXT,<WIN_W-19, LINE_H*2+5>
|
||||
pop esi
|
||||
; define Path button
|
||||
mcall 8,<6,64>,<LINE_H*2+3,20>,4
|
||||
mcall SF_DEFINE_BUTTON,<6,64>,<LINE_H*2+3,20>,4
|
||||
; text on Path button
|
||||
mov ebx,8 shl 16+5
|
||||
mov al,4
|
||||
@ -522,7 +523,7 @@ draw_buttons:
|
||||
; text on settings buttons
|
||||
mov ecx, [sc.work_text]
|
||||
or ecx, 0x10000000
|
||||
mcall , <8, 5>, , buttons1names, 8
|
||||
mcall , <8, 5>, , buttons1names, 8
|
||||
|
||||
add edx,esi
|
||||
add ebx,LINE_H
|
||||
|
@ -44,13 +44,14 @@ KMENUITEM_SEPARATOR equ 2
|
||||
include 'lang.inc'
|
||||
include '../../macros.inc'
|
||||
include '../../proc32.inc'
|
||||
include '../../KOSfuncs.inc'
|
||||
include '../../dll.inc'
|
||||
include '../../develop/libraries/box_lib/trunk/box_lib.mac' ;for uses checkBox and editBox
|
||||
include '../../develop/libraries/box_lib/load_lib.mac'
|
||||
include '../../load_lib.mac'
|
||||
@use_library
|
||||
|
||||
START:
|
||||
mcall 48,3,sc,sizeof.system_colors ;get system colors
|
||||
mcall SF_STYLE_SETTINGS,SSF_GET_COLORS,sc,sizeof.system_colors ;get system colors
|
||||
|
||||
stdcall dll.Load, @IMPORT
|
||||
or eax, eax
|
||||
@ -61,10 +62,10 @@ START:
|
||||
|
||||
;set mask for events:
|
||||
;ñîîáùåíèå î ïåðåðèñîâêå,íàæàòà êíîïêà, îïðåäåë¸ííàÿ ðàíåå, ñîáûòèå îò ìûøè (÷òî-òî ñëó÷èëîñü - íàæàòèå íà êíîïêó ìûøè èëè ïåðåìåùåíèå; ñáðàñûâàåòñÿ ïðè ïðî÷òåíèè)
|
||||
mcall 40, 0x27
|
||||
mcall SF_SET_EVENTS_MASK, 0x27
|
||||
|
||||
mov ecx,[sc.work_text]
|
||||
and ecx, 0x9FFFFFFF
|
||||
and ecx,0x9FFFFFFF
|
||||
or ecx,0x90000000
|
||||
|
||||
call initBuf
|
||||
@ -120,7 +121,7 @@ START:
|
||||
call draw_window
|
||||
|
||||
event_wait:
|
||||
mcall 10
|
||||
mcall SF_WAIT_EVENT
|
||||
|
||||
cmp eax, 1 ; Event redraw
|
||||
je redraw
|
||||
@ -142,18 +143,18 @@ redraw:
|
||||
jmp event_wait
|
||||
|
||||
key:
|
||||
mcall 2
|
||||
mcall SF_GET_KEY
|
||||
invoke edit_box_key, editLabel
|
||||
invoke edit_box_key, editMBR
|
||||
jmp event_wait
|
||||
|
||||
button:
|
||||
mcall 17
|
||||
mcall SF_GET_BUTTON
|
||||
|
||||
cmp ah, 1 ;Close button
|
||||
jne @f
|
||||
exit:
|
||||
mcall -1
|
||||
mcall SF_TERMINATE_PROCESS
|
||||
@@:
|
||||
cmp ah, 2 ;Format button
|
||||
jne @f
|
||||
@ -225,7 +226,7 @@ butFormat:
|
||||
|
||||
butSelectFS:
|
||||
push eax ebx ecx
|
||||
mcall 9, pi, -1 ;get window coord
|
||||
mcall SF_THREAD_INFO, pi, -1 ;get window coord
|
||||
|
||||
mov eax, dword[pi+34]
|
||||
add eax, Otstup
|
||||
@ -241,7 +242,7 @@ butSelectFS:
|
||||
|
||||
butUnit:
|
||||
push eax ebx ecx
|
||||
mcall 9, pi, -1
|
||||
mcall SF_THREAD_INFO, pi, -1
|
||||
|
||||
mov eax, dword[pi+34]
|
||||
add eax, Otstup+80+30+delta
|
||||
@ -257,7 +258,7 @@ butUnit:
|
||||
|
||||
butDevice:
|
||||
push eax ebx ecx
|
||||
mcall 9, pi, -1
|
||||
mcall SF_THREAD_INFO, pi, -1
|
||||
|
||||
mov eax, dword[pi+34]
|
||||
add eax, Otstup+80+30+delta
|
||||
@ -279,9 +280,9 @@ draw_warningWindow:
|
||||
ret
|
||||
|
||||
draw_window:
|
||||
mcall 12, 1
|
||||
mcall SF_REDRAW, SSF_BEGIN_DRAW
|
||||
|
||||
mov eax, 0 ; function 0 : define and draw window
|
||||
mov eax, SF_CREATE_WINDOW ; define and draw window
|
||||
mov ebx, 100 * 65536 + (290+delta) ; [x start] *65536 + [x size]
|
||||
mov ecx, 100 * 65536 + (310+dy) ; [y start] *65536 + [y size]
|
||||
mov edx,[sc.work] ;0x14FFFFFF
|
||||
@ -293,38 +294,24 @@ draw_window:
|
||||
mcall
|
||||
|
||||
|
||||
mov ebx, (290+delta-Otstup-130+10)*65536+130
|
||||
mov ecx, (270+dy)*65536+(20+3)
|
||||
mov edx, 0x00000002
|
||||
mov esi, 0xAABBCC
|
||||
mcall 8
|
||||
mcall SF_DEFINE_BUTTON, (290+delta-Otstup-130+10)*65536+130, (270+dy)*65536+(20+3), 2
|
||||
|
||||
mov ebx, (290+delta-Otstup-50-2)*65536+(50+2)
|
||||
mov ecx, (210+dy)*65536+21 ;14
|
||||
mov edx, 0x00000003
|
||||
mov esi, 0xAABBCC
|
||||
mcall 8
|
||||
inc edx
|
||||
mcall , (290+delta-Otstup-50-2)*65536+(50+2), (210+dy)*65536+21 ;14
|
||||
|
||||
;button select FS
|
||||
mov ebx, Otstup*65536+120
|
||||
mov ecx, (110)*65536+(21)
|
||||
mov edx, 0x00000004
|
||||
inc edx
|
||||
mov esi, 0xFFFFFF
|
||||
mcall 8
|
||||
mcall , Otstup*65536+120, (110)*65536+(21)
|
||||
|
||||
;button select unit size
|
||||
mov ebx, (Otstup+80+30+delta)*65536+120
|
||||
mov ecx, (110)*65536+(21)
|
||||
mov edx, 0x00000005
|
||||
mov esi, 0xFFFFFF
|
||||
mcall 8
|
||||
inc edx
|
||||
mcall , (Otstup+80+30+delta)*65536+120, (110)*65536+(21)
|
||||
|
||||
;button select device
|
||||
mov ebx, (Otstup+80+30+delta)*65536+120
|
||||
mov ecx, (60)*65536+(21)
|
||||
mov edx, 0x00000006
|
||||
mov esi, 0xFFFFFF
|
||||
mcall 8
|
||||
inc edx
|
||||
mcall , (Otstup+80+30+delta)*65536+120, (60)*65536+(21)
|
||||
|
||||
invoke check_box_draw, ch1 ;ðèñîâàíèå ÷åêáîêñîâ
|
||||
invoke check_box_draw, ch2
|
||||
@ -345,7 +332,7 @@ draw_window:
|
||||
push dword frame_data2
|
||||
invoke frame_draw
|
||||
|
||||
mcall 12, 2
|
||||
mcall SF_REDRAW, SSF_END_DRAW
|
||||
ret
|
||||
|
||||
|
||||
@ -385,13 +372,6 @@ unittext:
|
||||
.6 db '32 Š¡', 0
|
||||
.7 db '64 Š¡', 0
|
||||
|
||||
head_f_i:
|
||||
head_f_l db '‘¨á⥬ ï ®è¨¡ª ',0
|
||||
err_message_found_lib0 db '<27>¥ ©¤¥ ¡¨¡«¨®â¥ª ',39,'proc_lib.obj',39,0
|
||||
err_message_import0 db 'Žè¨¡ª ¯à¨ ¨¬¯®à⥠¡¨¡«¨®â¥ª¨ ',39,'proc_lib.obj',39,0
|
||||
err_message_found_lib1 db '<27>¥ ©¤¥ ¡¨¡«¨®â¥ª ',39,'kmenu.obj',39,0
|
||||
err_message_import1 db 'Žè¨¡ª ¯à¨ ¨¬¯®à⥠¡¨¡«¨®â¥ª¨ ',39,'kmenu',39,0
|
||||
|
||||
else ;EN language
|
||||
|
||||
title db "Formatting Disk Utility", 0
|
||||
@ -418,13 +398,6 @@ unittext:
|
||||
.6 db '32 Kb', 0
|
||||
.7 db '64 Kb', 0
|
||||
|
||||
head_f_i:
|
||||
head_f_l db 'System error',0
|
||||
err_message_found_lib0 db 'Could not find library ',39,'proc_lib.obj',39,0
|
||||
err_message_import0 db 'Error importing library ',39,'proc_lib.obj',39,0
|
||||
err_message_found_lib1 db 'Could not find library ',39,'kmenu.obj',39,0
|
||||
err_message_import1 db 'Error importing library ',39,'kmenu',39,0
|
||||
|
||||
end if
|
||||
|
||||
|
||||
@ -450,11 +423,11 @@ getDeviceList:
|
||||
mov [kmDevice], eax
|
||||
sizeBDVK = 560 ;304 ;
|
||||
|
||||
mcall 68, 11
|
||||
mcall SF_SYS_MISC, SSF_HEAP_INIT
|
||||
|
||||
mcall 68, 12, sizeBDVK*maxDeviceCount+32
|
||||
mcall SF_SYS_MISC, SSF_MEM_ALLOC, sizeBDVK*maxDeviceCount+32
|
||||
mov dword[read_folder_struct.return], eax
|
||||
mcall 70, read_folder_struct
|
||||
mcall SF_FILE, read_folder_struct
|
||||
cmp eax, 0
|
||||
je .next
|
||||
cmp eax, 6
|
||||
@ -500,27 +473,27 @@ draw_super_text:
|
||||
mov eax, text.volume
|
||||
mov edx, eax
|
||||
mov esi, 13
|
||||
mcall 4
|
||||
mcall SF_DRAW_TEXT
|
||||
|
||||
mov ebx, Otstup * 65536 + 99-6
|
||||
mov edx, text.fs
|
||||
mov esi, 12
|
||||
mcall 4
|
||||
mcall SF_DRAW_TEXT
|
||||
|
||||
mov ebx, (Otstup+80+30+delta) * 65536 + 99-6
|
||||
mov edx, text.unit
|
||||
mov esi, 21
|
||||
mcall 4
|
||||
mcall SF_DRAW_TEXT
|
||||
|
||||
mov ebx, (Otstup+80+30+delta) * 65536 + 49-6
|
||||
mov edx, text.disk
|
||||
mov esi, 9
|
||||
mcall 4
|
||||
mcall SF_DRAW_TEXT
|
||||
|
||||
; mov ebx, Otstup * 65536 + (151-6+dy)
|
||||
; mov edx, text.option
|
||||
; mov esi, 8
|
||||
; mcall 4
|
||||
; mcall SF_DRAW_TEXT
|
||||
|
||||
mov ebx, (Otstup+80+30+delta +5) * 65536 + (110+3)
|
||||
mov dl, byte[kmUnitID]
|
||||
@ -567,7 +540,7 @@ draw_super_text:
|
||||
mov byte[kmUnitID], 0
|
||||
mov edx, unittext.0
|
||||
.printUnit:
|
||||
mcall 4
|
||||
mcall SF_DRAW_TEXT
|
||||
|
||||
mov ebx, (Otstup+5) * 65536 + (110+3)
|
||||
mov dl, byte[kmID]
|
||||
@ -600,7 +573,7 @@ draw_super_text:
|
||||
mov edx, kmNone
|
||||
.printFS:
|
||||
;mov esi, 8
|
||||
mcall 4
|
||||
mcall SF_DRAW_TEXT
|
||||
|
||||
;button device
|
||||
mov ebx, (Otstup+80+30+delta +5) * 65536 + (60+3)
|
||||
@ -609,7 +582,7 @@ draw_super_text:
|
||||
add edx, deviceAdrStr
|
||||
mov edx, dword[edx]
|
||||
;call setCurrentDeviceInEDX
|
||||
mcall 4
|
||||
mcall SF_DRAW_TEXT
|
||||
|
||||
;buttons text
|
||||
mov ebx, (290+delta-Otstup-130+10+2+10) * 65536 + (277-3+dy)
|
||||
@ -617,14 +590,14 @@ draw_super_text:
|
||||
mov eax, text.format
|
||||
mov edx, eax
|
||||
mov esi, 6
|
||||
mcall 4
|
||||
mcall SF_DRAW_TEXT
|
||||
|
||||
mov ebx, (290+delta-Otstup-52+6+8) * 65536 + (213+dy)
|
||||
;mov ecx, 0xFFFFFF
|
||||
mov eax, browse ;text.browse
|
||||
mov edx, eax
|
||||
mov esi, 6
|
||||
mcall 4
|
||||
mcall SF_DRAW_TEXT
|
||||
|
||||
pop esi edi edx ecx ebx eax
|
||||
ret
|
||||
@ -777,7 +750,7 @@ dd 0,0
|
||||
akmenuitem_draw db 'kmenuitem_draw',0
|
||||
|
||||
align 4
|
||||
proclib_import:
|
||||
import_proclib:
|
||||
OpenDialog_Init dd aOpenDialog_Init
|
||||
OpenDialog_Start dd aOpenDialog_Start
|
||||
dd 0,0
|
||||
@ -839,8 +812,8 @@ kmExt2: db 'EXT2', 0
|
||||
;kmXFS: db 'XFS', 0
|
||||
|
||||
l_libs_start:
|
||||
lib0 l_libs lib0_name, sys_path, file_name, system_dir0, err_message_found_lib0, head_f_l, proclib_import,err_message_import0, head_f_i
|
||||
lib1 l_libs lib1_name, sys_path, file_name, system_dir0, err_message_found_lib1, head_f_l, import_libkmenu,err_message_import1,head_f_i
|
||||
lib0 l_libs lib0_name, file_name, system_dir0, import_proclib
|
||||
lib1 l_libs lib1_name, file_name, system_dir0, import_libkmenu
|
||||
load_lib_end:
|
||||
|
||||
;ðàçìåðû: 80 è 120
|
||||
|
Loading…
Reference in New Issue
Block a user