git-svn-id: https://svn.code.sf.net/p/kolmck/code@53 91bb2d04-0c0c-4d2d-88a5-bbb6f4c1fa07
This commit is contained in:
dkolmck
2010-03-24 10:14:37 +00:00
parent 6c878d4297
commit bb8bb405eb
8 changed files with 578 additions and 266 deletions

667
KOL.pas

File diff suppressed because it is too large Load Diff

View File

@ -291,7 +291,7 @@ begin
begin
if WinVer >= wvNT then
begin
// _FindFirstFileEx;
_FindFirstFileEx;
F := FFindFirstFileEx( PChar( DirTree.TVItemPath( node, '\' ) + '\*.*' ),
FindExInfoStandard, @ Find32, FindExSearchLimitToDirectories, nil, 0 );
if F <> INVALID_HANDLE_VALUE then
@ -986,7 +986,7 @@ begin
else
if WinVer >= wvNT then // ������������ ����� ������� ������� - ��� NT/2K/XP
begin
// _FindFirstFileEx;
_FindFirstFileEx;
F := FFindFirstFileEx( PChar( p + '*.*' ), FindExInfoStandard, @ Find32,
FindExSearchLimitToDirectories, nil, 0 );
if F <> INVALID_HANDLE_VALUE then

View File

@ -1,6 +1,6 @@
package KOLMCK_D2006;
{$R *.res}
{$R KOLMCK.res}
{$ALIGN 4}
{$ASSERTIONS ON}
{$BOOLEVAL OFF}

View File

@ -166,19 +166,16 @@ function TObj.RefDec: Integer;
asm
TEST EAX, EAX
JZ @@exit
{$IFDEF OLD_REFCOUNT}
SUB [EAX].fRefCount, 2
JGE @@exit
{$IFDEF OLD_REFCOUNT}
TEST [EAX].fRefCount, 1
JZ @@exit
MOV EDX, [EAX]
PUSH dword ptr [EDX+4]
{$ELSE}
SUB [EAX].fRefCount, 2
JGE @@exit
{$ENDIF}
MOV EDX, [EAX]
PUSH dword ptr [EDX+4]
{$ENDIF}
@@exit:
end;
@ -1754,7 +1751,7 @@ asm
CLD
PUSH EDX //Canvas.fHandle
CALL Arc
CALL Windows.Arc
POP ESI
end;
@ -3311,7 +3308,7 @@ asm
SETZ AL
end;
function AnsiEq( const S1, S2 : AnsiString ) : Boolean;
function AnsiEq( const S1, S2 : KOLString ) : Boolean;
asm
CALL AnsiCompareStrNoCase
TEST EAX, EAX
@ -5135,6 +5132,7 @@ asm //cmd //opd
XOR EAX, EAX
end;
{$IFDEF BITBTN_ASM}
function NewBitBtn( AParent: PControl; const Caption: KOLString;
Options: TBitBtnOptions; Layout: TGlyphLayout; GlyphBitmap: HBitmap; GlyphCount: Integer ): PControl;
const szBitmapInfo = sizeof(TBitmapInfo);
@ -5314,6 +5312,7 @@ asm
POP EDX
{$ENDIF}
end;
{$ENDIF BITBTN_ASM}
function NewCheckbox( AParent: PControl; const Caption: KOLString ): PControl;
asm
@ -6370,33 +6369,34 @@ asm
OR [EAX].TControl.fStyle, EDX
end;
// by Galkov, Jun-2009
function WndProcNotify( Self_: PControl; var Msg: TMsg; var Rslt: Integer ): Boolean;
asm
CMP word ptr [EDX].TMsg.message, WM_NOTIFY
JNE @@ret_false
CMP word ptr [EDX].TMsg.message, WM_NOTIFY
JNE @@ret_false
PUSH ECX
PUSH EDX
MOV ECX, [EDX].TMsg.lParam
{$IFDEF USE_PROP}
PUSH offset[ID_SELF]
PUSH [ECX].TNMHdr.hwndFrom
CALL GetProp
{$ELSE}
PUSH GWL_USERDATA
PUSH [ECX].TNMHdr.hwndFrom
CALL GetWindowLong
{$ENDIF}
MOV ECX, [EDX].TMsg.lParam
{$IFDEF USE_PROP}
PUSH offset[ID_SELF]
PUSH [ECX].TNMHdr.hwndFrom
CALL GetProp
{$ELSE}
PUSH GWL_USERDATA
PUSH [ECX].TNMHdr.hwndFrom
CALL GetWindowLong
{$ENDIF}
POP EDX
TEST EAX, EAX
JZ @@ret_false_ECX
MOV ECX, [EAX].TControl.fHandle
MOV [EDX].TMsg.hwnd, ECX
POP ECX
JMP TControl.EnumDynHandlers
JMP TControl.EnumDynHandlers
@@ret_false_ECX:
POP ECX
@@ret_false:
XOR EAX, EAX
XOR EAX, EAX
end;
function WndProcCommonNotify( Self_: PControl; var Msg: TMsg; var Rslt: Integer ): Boolean;
@ -11757,8 +11757,6 @@ asm
end;
{procedure TControl.SetCurIndex(const Value: Integer);
var
idx: Integer;
asm
MOVZX ECX, [EAX].fCommandActions.aSetCurrent
JECXZ @@set_item_sel
@ -11768,14 +11766,9 @@ asm
PUSH ECX
PUSH EAX
CALL Perform
mov idx, eax
POPAD
CMP CX, TCM_SETCURSEL
JNE @@exit
push ecx
mov ecx, idx
mov [EAX].fCurIndex, ecx
pop ecx
PUSH TCN_SELCHANGE
PUSH EAX // idfrom doesn't matter
PUSH [EAX].fHandle
@ -11787,12 +11780,11 @@ asm
POP ECX
POP ECX
POP ECX
jmp @@exit
@@exit:
RET
@@set_item_sel:
INC ECX
CALL SetItemSelected
@@exit:
// RET
end;}
procedure TControl.SetCurIndex(const Value: Integer); // fix av
@ -12586,16 +12578,20 @@ end;
{$IFDEF ASM_TLIST}
function TStrList.IndexOf(const S: Ansistring): integer;
asm
PUSH EBX
PUSH EDI
PUSH ESI
OR EBX, -1
PUSH EBX
OR EDI, -1
MOV ECX, [EAX].fCount
JECXZ @@exit
MOV ESI, [EAX].fList
MOV ESI, [ESI].TList.fItems
CALL EDX2PChar
MOVZX EBX, BYTE[EDX]
@@loo: LODSD
INC EBX
INC EDI
CMP BL, BYTE[EAX]
JNE @@1
PUSH EDX
PUSH ECX
CALL StrComp
@ -12603,10 +12599,11 @@ asm
POP EDX
JE @@exit
@@1: LOOP @@loo
OR EBX, -1
@@exit: XCHG EAX, EBX
POP ESI
OR EDI, -1
@@exit: XCHG EAX, EDI
POP EBX
POP ESI
POP EDI
end;
{$ENDIF}
@ -12817,48 +12814,43 @@ asm
end;
{$IFDEF ASM_TLIST}
function CompareStrListItems( const Sender : Pointer; const e1, e2 : DWORD ) : Integer;
function CompareStrListItems_Case( const Sender : Pointer; const e1, e2 : DWORD ) : Integer;
asm
CMP [EAX].TStrList.fCaseSensitiveSort, 0
MOV EAX, [EAX].TStrList.fList
MOV EAX, [EAX].TList.fItems
MOV EDX, [EAX+EDX*4]
MOV EAX, [EAX+ECX*4]
XCHG EAX, EDX
JNZ StrComp
PUSH EBX
JMP StrComp
end;
XCHG EBX, EAX
CALL LowerCaseStrFromPCharEDX
MOV EDX, EBX
CALL LowerCaseStrFromPCharEDX
POP EAX
POP EDX
PUSH EDX
PUSH EAX
CALL EAX2PChar
CALL EDX2PChar
CALL StrComp
XCHG EBX, EAX
CALL RemoveStr
CALL RemoveStr
XCHG EAX, EBX
POP EBX
function CompareStrListItems_NoCase( const Sender : Pointer; const e1, e2 : DWORD ) : Integer;
asm
MOV EAX, [EAX].TStrList.fList
MOV EAX, [EAX].TList.fItems
MOV EDX, [EAX+EDX*4]
MOV EAX, [EAX+ECX*4]
XCHG EAX, EDX
JMP StrComp_NoCase
end;
function CompareAnsiStrListItems( const Sender : Pointer; const e1, e2 : DWORD ) : Integer;
asm
CMP byte ptr [EAX].TStrList.fCaseSensitiveSort, 0
MOV EAX, [EAX].TStrList.fList
MOV EAX, [EAX].TList.fItems
MOV EDX, [EAX+EDX*4]
MOV EAX, [EAX+ECX*4]
XCHG EAX, EDX
JZ _AnsiCompareStrNoCase
JMP _AnsiCompareStrNoCase
end;
function CompareAnsiStrListItems_Case( const Sender : Pointer; const e1, e2 : DWORD ) : Integer;
asm
MOV EAX, [EAX].TStrList.fList
MOV EAX, [EAX].TList.fItems
MOV EDX, [EAX+EDX*4]
MOV EAX, [EAX+ECX*4]
XCHG EAX, EDX
JMP _AnsiCompareStr
end;
{$ENDIF}
@ -12866,18 +12858,26 @@ end;
procedure TStrList.Sort(CaseSensitive: Boolean);
asm
MOV [EAX].fCaseSensitiveSort, DL
MOV [EAX].fAnsiSort, 0
PUSH Offset[TStrList.Swap]
MOV ECX, Offset[CompareStrListItems]
MOV EDX, [EAX].fCount
MOV ECX, Offset[CompareStrListItems_Case]
CMP DL, 0
JNZ @1
MOV ECX, Offset[CompareStrListItems_NoCase]
@1: MOV EDX, [EAX].fCount
CALL SortData
end;
procedure TStrList.AnsiSort(CaseSensitive: Boolean);
asm
MOV [EAX].fCaseSensitiveSort, DL
MOV [EAX].fAnsiSort, 1
PUSH Offset[TStrList.Swap]
MOV ECX, Offset[CompareAnsiStrListItems]
MOV EDX, [EAX].fCount
CMP DL, 0
JZ @1
MOV ECX, Offset[CompareAnsiStrListItems_Case]
@1: MOV EDX, [EAX].fCount
CALL SortData
end;
@ -17898,7 +17898,7 @@ asm //cmd //opd
//@@exit: XCHG EAX, ECX
end;
function WinVer : TWindowsVersion;
{function WinVer : TWindowsVersion;
asm
MOVSX EAX, byte ptr [SaveWinVer]
INC AH // ���� <> 0 ����� ����������, �� AL �������� ����������� ������
@ -17908,7 +17908,6 @@ asm
XOR EAX, EAX
TEST EDX, EDX
XCHG DL, DH // DH=MajorVersion; DL=MinorVersion
JL @@platform_9x
MOV AL, wvNT
CMP DX, $0400
@ -17946,8 +17945,7 @@ asm
@@save_exit:
MOV byte ptr [SaveWinVer], AL
@@exit:
end;
end;}
//======================================== THE END OF FILE KOL_ASM.inc

View File

@ -222,9 +222,9 @@ type
function AddAnsiObject( const S: AnsiString; Obj: DWORD ): Integer;
{* Adds Ansi AnsiString and correspondent object to a list. }
function Add(S: PAnsiChar): integer;
{* Adds a AnsiString to list. }
{* Adds an AnsiString to list. }
function AddLen(S: PAnsiChar; Len: Integer): integer;
{* Adds a AnsiString to list. The AnsiString can contain #0 characters. }
{* Adds an AnsiString to list. The AnsiString can contain #0 characters. }
public
FastClear: Boolean;
{* }
@ -238,7 +238,7 @@ type
{* Returns index of first AnsiString, equal to given one (while comparing it
without case sensitivity). }
function IndexOfStrL_NoCase( Str: PAnsiChar; L: Integer ): integer;
{* Returns index of first AnsiString, equal to given one (while comparing it
{* Returns index of the first AnsiString, equal to given one (while comparing it
without case sensitivity). }
function Find(const S: AnsiString; var Index: Integer): Boolean;
{* Returns Index of the first AnsiString, equal or greater to given pattern, but
@ -827,7 +827,7 @@ function ShowQuestion( const S: KOLString; Answers: KOLString ): Integer;
application. Also, this function *must* be used in MDI applications
in place of any dialog functions, based on MessageBox.
|<br>
The second parameter should be empty AnsiString or several possible
The the second parameter should be empty AnsiString or several possible
answers separated by '/', e.g.: 'Yes/No/Cancel'. Result is
a number answered, starting from 1. For example, if 'Cancel'
was pressed, 3 will be returned.
@ -2341,7 +2341,7 @@ asm
MOV ECX, [EBX].FMonitor
JECXZ @@no_monitor
XCHG EAX, ECX
CALL TObj.Destroy
CALL TObj.Destroy // TObj.Free //
@@no_monitor:
MOV ECX, [EBX].FHandle
JECXZ @@exit
@ -3308,6 +3308,7 @@ begin
end;
//[END KeyClick]
{$IFDEF SNAPMOUSE2DFLTBTN}
function WndProcDlg( Sender: PControl; var Msg: TMsg; var Rslt: Integer ): Boolean;
var F, B: PControl;
R: TRect;
@ -3328,6 +3329,7 @@ begin
end;
end;
end;
{$ENDIF}
//[function ShowQuestionEx]
function ShowQuestionEx( S: KOLString; Answers: KOLString; CallBack: TOnEvent ): Integer;

View File

@ -19,7 +19,7 @@ mmmmm mmmmm mmmmm cccccccccccc kkkkk kkkkk
Key Objects Library (C) 1999 by Kladov Vladimir.
KOL Mirror Classes Kit (C) 2000 by Kladov Vladimir.
********************************************************
* VERSION 2.87
* VERSION 2.89
********************************************************
}
unit mirror;
@ -21447,7 +21447,7 @@ begin
if S <> '' then
//SL.Add( S + ';' );
{P}SL.Add( S );
(*) ... for a frame, this is not applicable ...
(* ... for a frame, this is not applicable ...
if MinimizeNormalAnimated then
//SL.Add( Prefix + AName + '.MinimizeNormalAnimated;' );
begin
@ -21457,7 +21457,7 @@ begin
begin
SL.Add( ' DUP TControl.RestoreNormalMaximized<1>' )
end;
(*)
*)
if Assigned( FpopupMenu ) then
//SL.Add( Prefix + AName + '.SetAutoPopupMenu( Result.' + FpopupMenu.Name +
// ' );' );
@ -21835,6 +21835,7 @@ var N: Integer;
if MI.itemindex >= 0 then
begin
if not MI.separator or generateSeparatorConstants then
//SL.Add( 'const ' + MI.Name + ': Integer = ' + IntToStr( MI.itemindex ) + ';' );
SL.Add( 'const ' + MI.Name + ' = ' + IntToStr( MI.itemindex ) + ';' );
Inc( N );
end;

View File

@ -1,9 +1,9 @@
KEY OBJECTS LIBRARY for Delphi (and Free Pascal Compiler) - to make applications small and power. This library is freeware and open source. Delphi 2, 3, 4, 5, 6, 7, 8, BDS 2005, 2006, TurboDelphi5 and Free Pascal Compiler 1.0.5, 1.0.6, and higher (2.0.4 and above) are supported. Partially compatible with Kylix (Linux/Qt platform, use special converting tool and provided files in Tools section on the site http://bonanzas.rinet.ru)
KEY OBJECTS LIBRARY for Delphi (and Free Pascal Compiler) - to make applications small and power. This library is freeware and open source. Delphi 2, 3, 4, 5, 6, 7, 8, BDS 2005, 2006, 2010, TurboDelphi and Free Pascal Compiler 1.0.5, 1.0.6, and higher (2.0.4) are supported. Partially compatible with Kylix (Linux/Qt platform, use special converting tool and provided files in Tools section on the site http://bonanzas.rinet.ru)
Copyright (C) by Vladimir Kladov, 1999-2007.
Copyright (C) by Vladimir Kladov, 1999-2010.
Some parts of code are Copyright (C) intellectual property by other people, see comments in code and on KOL site. Thanks to all for help with KOL and MCK!
v. 2.88 (27-Sep-2008 �.)
v. 2.89 (30-Mar-2010)
To get newer version, go to Web-page http://www.kolmck.net and get there updates.
@ -16,7 +16,7 @@ BRIEF DESCRIPTION:
A lot of additions are available for KOL, which allow to work with data bases, Active-X components, print reports, different image and compression formats, etc.
--------------------------------------------
This archive contains Key Objects Library main part: KOL.PAS and several test samples. At the KOL Web page (http://kolmck.net), you can download also additional components:
This archive contains Key Objects Library main part: KOL.PAS and several test samples. At the KOL Web page (http://bonanzas.rinet.ru), you can download also additional components:
MCK - Mirror Classes Kit - visual programming environment for KOL
xHelpGen - utility to generate html-documentation from comments within the source code;

View File

@ -1,12 +1,12 @@
KEY OBJECTS LIBRARY ��� Delphi (� Free Pascal Compiler) - ������������ ��� ����, ����� ������� ���������, ������������� � �������������� ����� �������, ���������� � ����� ����������.
Copyright (C) by Vladimir Kladov, 1999-2007. ���������, � ��������� ��������.
������ 2.88 (27 �������� 2008 �.)
������ 2.89 (30 ����� 2010 �.)
_________________
������� ��������:
�� KOL - Key Objects Library - ��� ���������� �������� ��� ���������������� � ����� Delphi.
�� �������������� ������ Delphi2, Delph3, Delphi4, Delphi5, Delphi6, Delphi7, Delphi8, BDS2005, BDS2006, Turbo-Delphi � ��� �� Free Pascal v1.0.5, v2.0.4 � ����. ������� ��� �� ��������� ������������� � Kylix (��������� ��������� � ����� ������, ��. � ������� "����������� ������������" �� ����� http://kolmck.net). ������� ������ ��� ������������� �� ������ ��������� (Linux, Win CE).
�� �������������� ������ Delphi2, Delph3, Delphi4, Delphi5, Delphi6, Delphi7, Delphi8, BDS2005, BDS2006, BDS2010, Turbo-Delphi � ��� �� Free Pascal v1.0.5, v2.0.4 � ����. ������� ��� �� ��������� ������������� � Kylix (��������� ��������� � ����� ������, ��. � ������� "����������� ������������" �� ����� http://bonanzas.rinet.ru). ������� ������ ��� ������������� �� ������ ��������� (Linux, Win CE).
���������� KOL ��������� ������������� ����������� ���������� GUI-���������� (�� 11� ��� ������ - ��� ������� ������������� ������������ ������ ��������� ������� system, sysinit, ��. �� ����� ������ "������"). ������� ����� ���� ���������� �� ���������.
�� � ���������� ����������� ��������� - ��������� ������� (xHelpGen), ����������� ��������� ������������ �� ���������� � html-�������. ������� ����������� �� ������ ������������ � �������� �������, ��� ��� ������������ ������ ����� ������ � ����� ������ � ������ ������������.
�� � �������������� MCK (Mirror Classes Kit - ����� ���������� �������) ��� �������� ���������� ���������� �������� � ������ ���� �������� � ��� �������������, ������������ KOL. ������������� � MCK ������� ����������� ��� ����� ��������� ����������, ������������� ��������� �-��� ����������� ������ ������ �������-���� ��� ������������� ���� (��. ���������: Collapse).