3.15
git-svn-id: https://svn.code.sf.net/p/kolmck/code@108 91bb2d04-0c0c-4d2d-88a5-bbb6f4c1fa07
This commit is contained in:
20
KOL.pas
20
KOL.pas
@ -14,7 +14,7 @@
|
|||||||
Key Objects Library (C) 2000 by Vladimir Kladov.
|
Key Objects Library (C) 2000 by Vladimir Kladov.
|
||||||
|
|
||||||
****************************************************************
|
****************************************************************
|
||||||
* VERSION 3.1415926535897
|
* VERSION 3.15
|
||||||
****************************************************************
|
****************************************************************
|
||||||
|
|
||||||
K.O.L. - is a set of objects and functions to create small programs
|
K.O.L. - is a set of objects and functions to create small programs
|
||||||
@ -11558,6 +11558,8 @@ var _AnsiCompareStrNoCaseA: function(S1, S2: PAnsiChar): Integer =
|
|||||||
{* The same, but for PChar ANSI strings }
|
{* The same, but for PChar ANSI strings }
|
||||||
function AnsiCompareTextA( const S1, S2: AnsiString ): Integer;
|
function AnsiCompareTextA( const S1, S2: AnsiString ): Integer;
|
||||||
{* }
|
{* }
|
||||||
|
function CompareAnsiCase( const S1, S2: PAnsiChar ): Integer;
|
||||||
|
function CompareAnsiNoCase( const S1, S2: PAnsiChar ): Integer;
|
||||||
|
|
||||||
{$IFDEF WIN}
|
{$IFDEF WIN}
|
||||||
{$IFNDEF _FPC}
|
{$IFNDEF _FPC}
|
||||||
@ -12434,6 +12436,8 @@ procedure SortArray( const Data: Pointer; const uNElem: Dword;
|
|||||||
dwords (or integers or pointers occupying for 4 bytes for each item. }
|
dwords (or integers or pointers occupying for 4 bytes for each item. }
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
|
|
||||||
|
procedure SwapStrListExItems( const Sender: Pointer; const e1, e2: DWORD );
|
||||||
|
|
||||||
procedure SwapListItems( const L: Pointer; const e1, e2: DWORD );
|
procedure SwapListItems( const L: Pointer; const e1, e2: DWORD );
|
||||||
{* Use this function as the last parameter for SortData call when a PList
|
{* Use this function as the last parameter for SortData call when a PList
|
||||||
object is sorting. SwapListItems just exchanges two items of the list. }
|
object is sorting. SwapListItems just exchanges two items of the list. }
|
||||||
@ -14268,7 +14272,7 @@ function CrackStack_MapInFile( const MapFileName: KOLString; Max_length: Integer
|
|||||||
//......... these declarations are here to stop hints from Delphi5 while compiling MCK:
|
//......... these declarations are here to stop hints from Delphi5 while compiling MCK:
|
||||||
function CallTControlCreateWindow( Ctl: PControl ): Boolean;
|
function CallTControlCreateWindow( Ctl: PControl ): Boolean;
|
||||||
function DumpWindowed( c: PControl ): PControl;
|
function DumpWindowed( c: PControl ): PControl;
|
||||||
function WndProcAppAsm( Self_: PControl; var Msg: TMsg; var Rslt: Integer ): Boolean; forward;
|
function WndProcAppAsm( Self_: PControl; var Msg: TMsg; var Rslt: Integer ): Boolean;
|
||||||
//22{$IFDEF ASM_VERSION}
|
//22{$IFDEF ASM_VERSION}
|
||||||
const ButtonClass: array[ 0..6 ] of KOLChar = ( 'B','U','T','T','O','N',#0 );
|
const ButtonClass: array[ 0..6 ] of KOLChar = ( 'B','U','T','T','O','N',#0 );
|
||||||
//22{$ENDIF ASM_VERSION}
|
//22{$ENDIF ASM_VERSION}
|
||||||
@ -14801,6 +14805,8 @@ asm
|
|||||||
TEST EAX, EAX
|
TEST EAX, EAX
|
||||||
JNZ @@exit
|
JNZ @@exit
|
||||||
MOV EAX, offset[EmptyString]
|
MOV EAX, offset[EmptyString]
|
||||||
|
//LEA EAX, [EmptyString]
|
||||||
|
//MOV EAX, [EmptyString]
|
||||||
@@exit:
|
@@exit:
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -25464,14 +25470,15 @@ var h12, hAM: Boolean;
|
|||||||
function GetMonth( const fmt: KOLString; var S: PKOLChar ): Integer;
|
function GetMonth( const fmt: KOLString; var S: PKOLChar ): Integer;
|
||||||
var SD: TSystemTime;
|
var SD: TSystemTime;
|
||||||
M: Integer;
|
M: Integer;
|
||||||
C, MonthStr: KOLString;
|
MonthStr: KOLString;
|
||||||
begin
|
begin
|
||||||
GetSystemTime( SD );
|
GetSystemTime( SD );
|
||||||
|
SD.wDay := 1;
|
||||||
for M := 1 to 12 do
|
for M := 1 to 12 do
|
||||||
begin
|
begin
|
||||||
SD.wMonth := M;
|
SD.wMonth := M;
|
||||||
C := SystemDate2Str( SD, LOCALE_USER_DEFAULT, dfLongDate, PKOLChar( fmt + '/dd/yyyy/' ) );
|
MonthStr := SystemDate2Str( SD, LOCALE_USER_DEFAULT, dfLongDate, PKOLChar( fmt {+ '/dd/yyyy/'} ) );
|
||||||
MonthStr := Parse( C, '/' );
|
//MonthStr := Parse( C, '/' ); //++ -- by GMax
|
||||||
if AnsiCompareStrNoCase( MonthStr, Copy( S, 1, Length( MonthStr ) ) ) = 0 then
|
if AnsiCompareStrNoCase( MonthStr, Copy( S, 1, Length( MonthStr ) ) ) = 0 then
|
||||||
begin
|
begin
|
||||||
Inc( S, Length( MonthStr ) );
|
Inc( S, Length( MonthStr ) );
|
||||||
@ -32644,7 +32651,8 @@ begin
|
|||||||
Form := Form.Parent;
|
Form := Form.Parent;
|
||||||
Form := Form.ParentForm;
|
Form := Form.ParentForm;
|
||||||
if (Form <> nil) and (Form.MDIClient <> nil) then
|
if (Form <> nil) and (Form.MDIClient <> nil) then
|
||||||
Result := TranslateMDISysAccel( Form.MDIClient.fHandle, Msg );
|
Result := TranslateMDISysAccel( Form.MDIClient.fHandle,
|
||||||
|
Windows.TMsg(Msg) );
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
@ -26,6 +26,7 @@
|
|||||||
TKOLMDIClient = PControl;
|
TKOLMDIClient = PControl;
|
||||||
TKOLMDIChild = Pointer;
|
TKOLMDIChild = Pointer;
|
||||||
TKOLService = Pointer;
|
TKOLService = Pointer;
|
||||||
|
TBringFront = Pointer;
|
||||||
|
|
||||||
TKOLButton = PControl;
|
TKOLButton = PControl;
|
||||||
TKOLLabel = PControl;
|
TKOLLabel = PControl;
|
||||||
|
@ -3,6 +3,12 @@
|
|||||||
-- included in KOL.pas --
|
-- included in KOL.pas --
|
||||||
*******************************************************************************}
|
*******************************************************************************}
|
||||||
|
|
||||||
|
{$IFNDEF FPC}
|
||||||
|
{$IFNDEF TMSG_WINDOWS}
|
||||||
|
{$DEFINE TMSG_DECODED}
|
||||||
|
{$ENDIF}
|
||||||
|
{$ENDIF}
|
||||||
|
{$IFDEF TMSG_DECODED}
|
||||||
{$I MsgDecode.pas}
|
{$I MsgDecode.pas}
|
||||||
type
|
type
|
||||||
TMsg = packed record
|
TMsg = packed record
|
||||||
@ -20,6 +26,7 @@ type
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
tagMSG = TMsg;
|
tagMSG = TMsg;
|
||||||
|
{$ENDIF TMSG_DECODED}
|
||||||
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////
|
||||||
|
39
mirror.pas
39
mirror.pas
@ -2290,6 +2290,7 @@ type
|
|||||||
//
|
//
|
||||||
// �������, ������� ������������� ����� ������� ��������� � ����
|
// �������, ������� ������������� ����� ������� ��������� � ����
|
||||||
// ������������������ ������� "����������" ������� (��. �������� KOL)
|
// ������������������ ������� "����������" ������� (��. �������� KOL)
|
||||||
|
function ParentBorder: Integer;
|
||||||
function GenerateTransparentInits: String; virtual;
|
function GenerateTransparentInits: String; virtual;
|
||||||
function P_GenerateTransparentInits: String; virtual;
|
function P_GenerateTransparentInits: String; virtual;
|
||||||
|
|
||||||
@ -5413,7 +5414,9 @@ begin
|
|||||||
S := S + '.MouseTransparent';
|
S := S + '.MouseTransparent';
|
||||||
if LikeSpeedButton then
|
if LikeSpeedButton then
|
||||||
S := S + '.LikeSpeedButton';
|
S := S + '.LikeSpeedButton';
|
||||||
if Border <> DefaultBorder then
|
if (Border <> DefaultBorder) or
|
||||||
|
(Border = DefaultBorder) and
|
||||||
|
(ParentBorder >= 0) and (ParentBorder <> Border) then
|
||||||
S := S + '.SetBorder( ' + IntToStr( Border ) + ')';
|
S := S + '.SetBorder( ' + IntToStr( Border ) + ')';
|
||||||
Result := Trim( S );
|
Result := Trim( S );
|
||||||
|
|
||||||
@ -10479,6 +10482,23 @@ begin
|
|||||||
Result := 2;
|
Result := 2;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function TKOLCustomControl.ParentBorder: Integer;
|
||||||
|
var C: TWinControl;
|
||||||
|
begin
|
||||||
|
Result := -1;
|
||||||
|
C := Parent;
|
||||||
|
if C <> nil then
|
||||||
|
begin
|
||||||
|
if C is TKOLCustomControl then
|
||||||
|
Result := (C as TKOLCustomControl).Border
|
||||||
|
else if C is TCustomForm then
|
||||||
|
begin
|
||||||
|
if ParentKOLForm <> nil then
|
||||||
|
Result := ParentKOLForm.Border;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
{ TKOLApplet }
|
{ TKOLApplet }
|
||||||
|
|
||||||
procedure TKOLApplet.AssignEvents(SL: TStringList; const AName: String);
|
procedure TKOLApplet.AssignEvents(SL: TStringList; const AName: String);
|
||||||
@ -11918,7 +11938,7 @@ end;
|
|||||||
// ����������� � design-time �� ����� MCK-�������. ��������������� ��� ���������
|
// ����������� � design-time �� ����� MCK-�������. ��������������� ��� ���������
|
||||||
// ��������, ������������ ����� ��������� �� ���, ������� ����������� �� ���������
|
// ��������, ������������ ����� ��������� �� ���, ������� ����������� �� ���������
|
||||||
// � ������������ �������.
|
// � ������������ �������.
|
||||||
procedure ConstructComponent( SL: TStringList; C: TComponent );
|
function ConstructComponent( SL: TStringList; C: TComponent ): Boolean;
|
||||||
var Props, PropsD: PPropList;
|
var Props, PropsD: PPropList;
|
||||||
NProps, NPropsD, I, J: Integer;
|
NProps, NPropsD, I, J: Integer;
|
||||||
PropName, PropValue, PropValueD: String;
|
PropName, PropValue, PropValueD: String;
|
||||||
@ -11932,6 +11952,7 @@ begin
|
|||||||
DB 'ConstructComponent', 0
|
DB 'ConstructComponent', 0
|
||||||
@@e_signature:
|
@@e_signature:
|
||||||
end;
|
end;
|
||||||
|
Result := FALSE;
|
||||||
//SL.Add( ' Result.' + C.Name + ' := ' + C.ClassName + '.Create( nil );' );
|
//SL.Add( ' Result.' + C.Name + ' := ' + C.ClassName + '.Create( nil );' );
|
||||||
if C is TOleControl then
|
if C is TOleControl then
|
||||||
SL.Add( ' Result.' + C.Name +
|
SL.Add( ' Result.' + C.Name +
|
||||||
@ -11942,6 +11963,11 @@ begin
|
|||||||
try
|
try
|
||||||
try
|
try
|
||||||
NProps := GetPropList( C.ClassInfo, tkAny, Props );
|
NProps := GetPropList( C.ClassInfo, tkAny, Props );
|
||||||
|
for I := 0 to NProps-1 do
|
||||||
|
begin
|
||||||
|
if Props[I].Name = 'NotConstruct_KOLMCK' then
|
||||||
|
Exit; {>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>}
|
||||||
|
end;
|
||||||
SL.Add( ' //-- found ' + IntToStr( NProps ) + ' published props' );
|
SL.Add( ' //-- found ' + IntToStr( NProps ) + ' published props' );
|
||||||
if NProps > 0 then
|
if NProps > 0 then
|
||||||
BEGIN
|
BEGIN
|
||||||
@ -11995,11 +12021,13 @@ begin
|
|||||||
END;
|
END;
|
||||||
finally
|
finally
|
||||||
FreeMem( Props );
|
FreeMem( Props );
|
||||||
|
FreeMem( PropsD );
|
||||||
D.Free;
|
D.Free;
|
||||||
end;
|
end;
|
||||||
except
|
except
|
||||||
SL.Add( ' //-----^------Exception while getting properties of ' + C.Name );
|
SL.Add( ' //-----^------Exception while getting properties of ' + C.Name );
|
||||||
end;
|
end;
|
||||||
|
Result := TRUE;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TKOLForm.GenerateChildren( SL: TStringList; OfParent: TComponent; const OfParentName: String; const Prefix: String;
|
procedure TKOLForm.GenerateChildren( SL: TStringList; OfParent: TComponent; const OfParentName: String; const Prefix: String;
|
||||||
@ -12658,8 +12686,9 @@ begin
|
|||||||
if TComponent( oc[ I ] ) is TComponent then // ��-�-��!
|
if TComponent( oc[ I ] ) is TComponent then // ��-�-��!
|
||||||
begin
|
begin
|
||||||
SL.Add( '' );
|
SL.Add( '' );
|
||||||
ConstructComponent( SL, oc[ I ] );
|
if ConstructComponent( SL, oc[ I ] ) then
|
||||||
GenerateAdd2AutoFree( SL, 'Result.' + TComponent( oc[ I ] ).Name + '.Free',
|
GenerateAdd2AutoFree( SL, 'Result.' +
|
||||||
|
TComponent( oc[ I ] ).Name + '.Free',
|
||||||
FALSE, 'Add2AutoFreeEx', nil );
|
FALSE, 'Add2AutoFreeEx', nil );
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
@ -15276,7 +15305,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
if Border <> 2 then
|
if (Border <> 2) then
|
||||||
if FormCompact then
|
if FormCompact then
|
||||||
begin
|
begin
|
||||||
if Border = 1 then
|
if Border = 1 then
|
||||||
|
Reference in New Issue
Block a user