mirror of
https://github.com/moparisthebest/Simba
synced 2025-01-07 19:58:00 -05:00
Merge branch 'master' into settings-form
Conflicts: Projects/Simba/Simba.lpi
This commit is contained in:
commit
a4363dba56
@ -1,5 +1,27 @@
|
|||||||
# Change a minus to a plus when something is being worked on.
|
Check scriptref/dtm.rst, it look overly complicated with all the different
|
||||||
# Remove it when you are done.
|
types. (MDTM, DDTM, TSDTM)....
|
||||||
|
Add examples to files in scriptref:
|
||||||
|
|
||||||
|
- [ ] bitmaps.rst
|
||||||
|
- [ ] colourconverting.rst
|
||||||
|
- [ ] colourfinding.rst
|
||||||
|
- [ ] dtm.rst
|
||||||
|
- [ ] files.rst
|
||||||
|
- [/] mouseandkeyboard.rst
|
||||||
|
- [ ] ocr.rst
|
||||||
|
- [ ] sound.rst
|
||||||
|
- [ ] string.rst
|
||||||
|
- [ ] tpa.rst
|
||||||
|
- [ ] web.rst
|
||||||
|
- [ ] window.rst
|
||||||
|
|
||||||
|
# ADDING CONTENT
|
||||||
|
|
||||||
|
- Create a list of Simba Extensions. If the extension has a doc on it's own,
|
||||||
|
dont forget to link to it.
|
||||||
|
- Write mmlref / article (only for developers of Simba)
|
||||||
|
- Write tutorial?
|
||||||
|
- Write about Simba Stable/Unstable.
|
||||||
|
|
||||||
# GENERAL
|
# GENERAL
|
||||||
|
|
||||||
@ -12,13 +34,3 @@
|
|||||||
seems to use it).
|
seems to use it).
|
||||||
- Find stuff to add to this list.
|
- Find stuff to add to this list.
|
||||||
|
|
||||||
# ADDING CONTENT
|
|
||||||
|
|
||||||
- Create a list of Simba Extensions. If the extension has a doc on it's own,
|
|
||||||
dont forget to link to it.
|
|
||||||
- Create scriptref/ articles. A lot of functionality that Simba exposes to the
|
|
||||||
Scripters is currently not documented.
|
|
||||||
- Write mmlref/ article (only for developers of Simba)
|
|
||||||
- Write tutorial?
|
|
||||||
- Fix up articles?
|
|
||||||
- Write about Simba Stable/Unstable.
|
|
||||||
|
@ -18,10 +18,12 @@ an integer:
|
|||||||
.. code-block:: pascal
|
.. code-block:: pascal
|
||||||
|
|
||||||
var bmp, x, y: integer;
|
var bmp, x, y: integer;
|
||||||
bmp := CreateBitmap(10, 10); // Create a bitmap of size (10, 10)
|
begin
|
||||||
if FindBitmapIn(bmp, x, y, 0, 0, 300, 300) then
|
bmp := CreateBitmap(10, 10); // Create a bitmap of size (10, 10)
|
||||||
writeln('Found it!');
|
if FindBitmapIn(bmp, x, y, 0, 0, 300, 300) then
|
||||||
FreeBitmap(bmp); // Don't forget to free it when we are done.
|
writeln('Found it!');
|
||||||
|
FreeBitmap(bmp); // Don't forget to free it when we are done.
|
||||||
|
end;
|
||||||
|
|
||||||
Note that the previous example doesn't make a lot of sense as the bitmap has
|
Note that the previous example doesn't make a lot of sense as the bitmap has
|
||||||
only been created and not filled with any colours, they are as of yet,
|
only been created and not filled with any colours, they are as of yet,
|
||||||
@ -33,7 +35,7 @@ function.
|
|||||||
Word of caution on bitmap creation
|
Word of caution on bitmap creation
|
||||||
----------------------------------
|
----------------------------------
|
||||||
|
|
||||||
Bitmaps in Simba are internally all instances of *TMufasBitmap*. Scripts should
|
Bitmaps in Simba are internally all instances of *TMufasaBitmap*. Scripts should
|
||||||
generally access bitmaps using their *handle*: an integer. All functions
|
generally access bitmaps using their *handle*: an integer. All functions
|
||||||
referenced here either require a bitmap *handle* or return one.
|
referenced here either require a bitmap *handle* or return one.
|
||||||
|
|
||||||
@ -46,7 +48,9 @@ free it again)
|
|||||||
.. code-block:: pascal
|
.. code-block:: pascal
|
||||||
|
|
||||||
var bmp: TMufasaBitmap;
|
var bmp: TMufasaBitmap;
|
||||||
bmp := TMufasBitmap.Create;
|
begin
|
||||||
|
bmp := TMufasBitmap.Create;
|
||||||
|
end;
|
||||||
|
|
||||||
Because there is no way to get a *handle* to this bitmap; as it will not be
|
Because there is no way to get a *handle* to this bitmap; as it will not be
|
||||||
managed by Simba internally. (All Bitmaps created by *CreateBitmap* are managed
|
managed by Simba internally. (All Bitmaps created by *CreateBitmap* are managed
|
||||||
@ -75,10 +79,12 @@ then call this function to get the class reference.
|
|||||||
|
|
||||||
var bmp: TMufasaBitmap;
|
var bmp: TMufasaBitmap;
|
||||||
bmph: integer;
|
bmph: integer;
|
||||||
bmph := CreateBitmap(100, 100);
|
begin;
|
||||||
bmp := GetMufasaBitmap(bmph);
|
bmph := CreateBitmap(100, 100);
|
||||||
|
bmp := GetMufasaBitmap(bmph);
|
||||||
|
|
||||||
bmp.SetSize(150,150); // also changes bmph, as they are the same bitmap.
|
bmp.SetSize(150,150); // also changes bmph, as they are the same bitmap.
|
||||||
|
end;
|
||||||
|
|
||||||
.. _scriptref-createbitmapstring:
|
.. _scriptref-createbitmapstring:
|
||||||
|
|
||||||
|
@ -11,6 +11,8 @@ Quicksort
|
|||||||
|
|
||||||
procedure Quicksort(var Arr : TIntegerArray);
|
procedure Quicksort(var Arr : TIntegerArray);
|
||||||
|
|
||||||
|
Sorts a TIntegerArray using the Quicksort algorithm
|
||||||
|
|
||||||
|
|
||||||
tSwap
|
tSwap
|
||||||
-----
|
-----
|
||||||
@ -19,6 +21,8 @@ tSwap
|
|||||||
|
|
||||||
procedure tSwap(var a, b: TPoint);
|
procedure tSwap(var a, b: TPoint);
|
||||||
|
|
||||||
|
Swaps the values of a and b around
|
||||||
|
|
||||||
|
|
||||||
tpaSwap
|
tpaSwap
|
||||||
-------
|
-------
|
||||||
@ -27,6 +31,8 @@ tpaSwap
|
|||||||
|
|
||||||
procedure tpaSwap(var a, b: TPointArray);
|
procedure tpaSwap(var a, b: TPointArray);
|
||||||
|
|
||||||
|
Swaps the values of a and b around
|
||||||
|
|
||||||
|
|
||||||
SwapE
|
SwapE
|
||||||
-----
|
-----
|
||||||
@ -35,6 +41,8 @@ SwapE
|
|||||||
|
|
||||||
procedure SwapE(var a, b: Extended);
|
procedure SwapE(var a, b: Extended);
|
||||||
|
|
||||||
|
Swaps the values of a and b around
|
||||||
|
|
||||||
|
|
||||||
RAaSTPAEx
|
RAaSTPAEx
|
||||||
---------
|
---------
|
||||||
@ -43,6 +51,7 @@ RAaSTPAEx
|
|||||||
|
|
||||||
procedure RAaSTPAEx(var a: TPointArray; const w, h: Integer);
|
procedure RAaSTPAEx(var a: TPointArray; const w, h: Integer);
|
||||||
|
|
||||||
|
Leaves one point per box with side lengths W and H to the TPA
|
||||||
|
|
||||||
RAaSTPA
|
RAaSTPA
|
||||||
-------
|
-------
|
||||||
@ -51,6 +60,8 @@ RAaSTPA
|
|||||||
|
|
||||||
procedure RAaSTPA(var a: TPointArray; const Dist: Integer);
|
procedure RAaSTPA(var a: TPointArray; const Dist: Integer);
|
||||||
|
|
||||||
|
Leaves one point per box with the side length Dist
|
||||||
|
|
||||||
|
|
||||||
NearbyPointInArrayEx
|
NearbyPointInArrayEx
|
||||||
--------------------
|
--------------------
|
||||||
@ -59,6 +70,8 @@ NearbyPointInArrayEx
|
|||||||
|
|
||||||
function NearbyPointInArrayEx(const P: TPoint; w, h:Integer;const a: TPointArray): Boolean;
|
function NearbyPointInArrayEx(const P: TPoint; w, h:Integer;const a: TPointArray): Boolean;
|
||||||
|
|
||||||
|
Returns true if the point P is near a point in the TPA a with the
|
||||||
|
|
||||||
|
|
||||||
NearbyPointInArray
|
NearbyPointInArray
|
||||||
------------------
|
------------------
|
||||||
@ -67,6 +80,8 @@ NearbyPointInArray
|
|||||||
|
|
||||||
function NearbyPointInArray(const P: TPoint; Dist:Integer;const a: TPointArray): Boolean;
|
function NearbyPointInArray(const P: TPoint; Dist:Integer;const a: TPointArray): Boolean;
|
||||||
|
|
||||||
|
Returns true if the point P is near a point in the TPA a with the
|
||||||
|
|
||||||
|
|
||||||
QuickTPASort
|
QuickTPASort
|
||||||
------------
|
------------
|
||||||
@ -91,6 +106,8 @@ SortTPAFrom
|
|||||||
|
|
||||||
procedure SortTPAFrom(var a: TPointArray; const From: TPoint);
|
procedure SortTPAFrom(var a: TPointArray; const From: TPoint);
|
||||||
|
|
||||||
|
Sorts the TPA a from the TPoint From
|
||||||
|
|
||||||
|
|
||||||
SortATPAFrom
|
SortATPAFrom
|
||||||
------------
|
------------
|
||||||
@ -99,6 +116,8 @@ SortATPAFrom
|
|||||||
|
|
||||||
procedure SortATPAFrom(var a: T2DPointArray; const From: TPoint);
|
procedure SortATPAFrom(var a: T2DPointArray; const From: TPoint);
|
||||||
|
|
||||||
|
Sorts the T2DPointArray a from the TPoint From
|
||||||
|
|
||||||
|
|
||||||
SortATPAFromFirstPoint
|
SortATPAFromFirstPoint
|
||||||
----------------------
|
----------------------
|
||||||
@ -115,6 +134,8 @@ InvertTPA
|
|||||||
|
|
||||||
procedure InvertTPA(var a: TPointArray);
|
procedure InvertTPA(var a: TPointArray);
|
||||||
|
|
||||||
|
Reverses the TPA
|
||||||
|
|
||||||
|
|
||||||
InvertATPA
|
InvertATPA
|
||||||
----------
|
----------
|
||||||
@ -123,6 +144,8 @@ InvertATPA
|
|||||||
|
|
||||||
procedure InvertATPA(var a: T2DPointArray);
|
procedure InvertATPA(var a: T2DPointArray);
|
||||||
|
|
||||||
|
Reverses the T2dPointArray
|
||||||
|
|
||||||
|
|
||||||
MiddleTPAEx
|
MiddleTPAEx
|
||||||
-----------
|
-----------
|
||||||
@ -131,6 +154,8 @@ MiddleTPAEx
|
|||||||
|
|
||||||
function MiddleTPAEx(const TPA: TPointArray; var x, y: Integer): Boolean;
|
function MiddleTPAEx(const TPA: TPointArray; var x, y: Integer): Boolean;
|
||||||
|
|
||||||
|
Stores the middle point from the TPA in x and y
|
||||||
|
|
||||||
|
|
||||||
MiddleTPA
|
MiddleTPA
|
||||||
---------
|
---------
|
||||||
@ -139,6 +164,8 @@ MiddleTPA
|
|||||||
|
|
||||||
function MiddleTPA(const tpa: TPointArray): TPoint;
|
function MiddleTPA(const tpa: TPointArray): TPoint;
|
||||||
|
|
||||||
|
Returns the middle TPA in the result
|
||||||
|
|
||||||
|
|
||||||
SortATPASize
|
SortATPASize
|
||||||
------------
|
------------
|
||||||
@ -147,6 +174,8 @@ SortATPASize
|
|||||||
|
|
||||||
procedure SortATPASize(var a: T2DPointArray; const BigFirst: Boolean);
|
procedure SortATPASize(var a: T2DPointArray; const BigFirst: Boolean);
|
||||||
|
|
||||||
|
Sorts the T2dPointArray from largest to smallest if BigFirst is true or smallest to largest if BigFirst is false
|
||||||
|
|
||||||
|
|
||||||
SortATPAFromSize
|
SortATPAFromSize
|
||||||
----------------
|
----------------
|
||||||
@ -155,6 +184,8 @@ SortATPAFromSize
|
|||||||
|
|
||||||
procedure SortATPAFromSize(var a: T2DPointArray; const Size: Integer; CloseFirst: Boolean);
|
procedure SortATPAFromSize(var a: T2DPointArray; const Size: Integer; CloseFirst: Boolean);
|
||||||
|
|
||||||
|
Sorts the T2DPointArray from Size by the closest first if CloseFirst is true
|
||||||
|
|
||||||
|
|
||||||
InIntArrayEx
|
InIntArrayEx
|
||||||
------------
|
------------
|
||||||
@ -163,6 +194,8 @@ InIntArrayEx
|
|||||||
|
|
||||||
function InIntArrayEx(const a: TIntegerArray; var Where: Integer; const Number: Integer): Boolean;
|
function InIntArrayEx(const a: TIntegerArray; var Where: Integer; const Number: Integer): Boolean;
|
||||||
|
|
||||||
|
Returns true if Number was found in the TIntegerArray a and returns its location in Where
|
||||||
|
|
||||||
|
|
||||||
InIntArray
|
InIntArray
|
||||||
----------
|
----------
|
||||||
@ -171,6 +204,8 @@ InIntArray
|
|||||||
|
|
||||||
function InIntArray(const a: TIntegerArray; Number: Integer): Boolean;
|
function InIntArray(const a: TIntegerArray; Number: Integer): Boolean;
|
||||||
|
|
||||||
|
Returns true if Number is found in the TintegerArray a
|
||||||
|
|
||||||
|
|
||||||
ClearSameIntegers
|
ClearSameIntegers
|
||||||
-----------------
|
-----------------
|
||||||
@ -179,6 +214,8 @@ ClearSameIntegers
|
|||||||
|
|
||||||
procedure ClearSameIntegers(var a: TIntegerArray);
|
procedure ClearSameIntegers(var a: TIntegerArray);
|
||||||
|
|
||||||
|
Deletes the indexes in the TintegerArray a which are duplicated
|
||||||
|
|
||||||
|
|
||||||
ClearSameIntegersAndTPA
|
ClearSameIntegersAndTPA
|
||||||
-----------------------
|
-----------------------
|
||||||
@ -187,6 +224,8 @@ ClearSameIntegersAndTPA
|
|||||||
|
|
||||||
procedure ClearSameIntegersAndTPA(var a: TIntegerArray; var p: TPointArray);
|
procedure ClearSameIntegersAndTPA(var a: TIntegerArray; var p: TPointArray);
|
||||||
|
|
||||||
|
Deletes the indexes in the TIntegerArray a and TPointArray p which are duplicated
|
||||||
|
|
||||||
|
|
||||||
SplitTPAEx
|
SplitTPAEx
|
||||||
----------
|
----------
|
||||||
@ -195,6 +234,8 @@ SplitTPAEx
|
|||||||
|
|
||||||
function SplitTPAEx(const arr: TPointArray; w, h: Integer): T2DPointArray;
|
function SplitTPAEx(const arr: TPointArray; w, h: Integer): T2DPointArray;
|
||||||
|
|
||||||
|
Splits the points with max X and Y distances W and H to their
|
||||||
|
|
||||||
|
|
||||||
SplitTPA
|
SplitTPA
|
||||||
--------
|
--------
|
||||||
@ -203,6 +244,8 @@ SplitTPA
|
|||||||
|
|
||||||
function SplitTPA(const arr: TPointArray; Dist: Integer): T2DPointArray;
|
function SplitTPA(const arr: TPointArray; Dist: Integer): T2DPointArray;
|
||||||
|
|
||||||
|
Splits the points with max distance Dist to their own TPointArrays
|
||||||
|
|
||||||
|
|
||||||
FloodFillTPA
|
FloodFillTPA
|
||||||
------------
|
------------
|
||||||
@ -219,6 +262,9 @@ FilterPointsPie
|
|||||||
|
|
||||||
procedure FilterPointsPie(var Points: TPointArray; const SD, ED, MinR, MaxR: Extended; Mx, My: Integer);
|
procedure FilterPointsPie(var Points: TPointArray; const SD, ED, MinR, MaxR: Extended; Mx, My: Integer);
|
||||||
|
|
||||||
|
Removes the points that are in the TPointArray Points that are not within the the degrees SD (Strat Degrees) and
|
||||||
|
ED (End Degrees) and the radius' MinR (Min Radius) and MaxR (Max Radius) from the origin Mx and My
|
||||||
|
|
||||||
|
|
||||||
FilterPointsLine
|
FilterPointsLine
|
||||||
----------------
|
----------------
|
||||||
@ -227,6 +273,8 @@ FilterPointsLine
|
|||||||
|
|
||||||
procedure FilterPointsLine(var Points: TPointArray; Radial: Extended; Radius, MX, MY: Integer);
|
procedure FilterPointsLine(var Points: TPointArray; Radial: Extended; Radius, MX, MY: Integer);
|
||||||
|
|
||||||
|
Returns the result in the TPointArray Points. Returns the points from the TPointArray Points that are on the line Radial from the center mx, my that is with the radius Radius
|
||||||
|
|
||||||
|
|
||||||
FilterPointsDist
|
FilterPointsDist
|
||||||
----------------
|
----------------
|
||||||
@ -235,6 +283,9 @@ FilterPointsDist
|
|||||||
|
|
||||||
procedure FilterPointsDist(var Points: TPointArray; const MinDist, MaxDist: Extended; Mx, My: Integer);
|
procedure FilterPointsDist(var Points: TPointArray; const MinDist, MaxDist: Extended; Mx, My: Integer);
|
||||||
|
|
||||||
|
Removes the points from the TPointArray Points that are not within the radius MinDist (Min Distance) and MaxDist
|
||||||
|
from the origin Mx and My
|
||||||
|
|
||||||
|
|
||||||
GetATPABounds
|
GetATPABounds
|
||||||
-------------
|
-------------
|
||||||
@ -243,6 +294,8 @@ GetATPABounds
|
|||||||
|
|
||||||
function GetATPABounds(const ATPA: T2DPointArray): TBox;
|
function GetATPABounds(const ATPA: T2DPointArray): TBox;
|
||||||
|
|
||||||
|
Returns the boundaries of the T2DPointArray ATPA as a TBox
|
||||||
|
|
||||||
|
|
||||||
GetTPABounds
|
GetTPABounds
|
||||||
------------
|
------------
|
||||||
@ -251,6 +304,8 @@ GetTPABounds
|
|||||||
|
|
||||||
function GetTPABounds(const TPA: TPointArray): TBox;
|
function GetTPABounds(const TPA: TPointArray): TBox;
|
||||||
|
|
||||||
|
Returns the boundaries of the TPointArray TPA as a TBox
|
||||||
|
|
||||||
|
|
||||||
FindTPAinTPA
|
FindTPAinTPA
|
||||||
------------
|
------------
|
||||||
@ -259,6 +314,8 @@ FindTPAinTPA
|
|||||||
|
|
||||||
function FindTPAinTPA(const SearchTPA, TotalTPA: TPointArray; var Matches: TPointArray): Boolean;
|
function FindTPAinTPA(const SearchTPA, TotalTPA: TPointArray; var Matches: TPointArray): Boolean;
|
||||||
|
|
||||||
|
Looks for the TPoints from SearchTPA inside TotalTPA and stores the matches inside the TPointArray Matches
|
||||||
|
|
||||||
|
|
||||||
GetSamePointsATPA
|
GetSamePointsATPA
|
||||||
-----------------
|
-----------------
|
||||||
@ -267,6 +324,8 @@ GetSamePointsATPA
|
|||||||
|
|
||||||
function GetSamePointsATPA(const ATPA : T2DPointArray; var Matches : TPointArray) : boolean;
|
function GetSamePointsATPA(const ATPA : T2DPointArray; var Matches : TPointArray) : boolean;
|
||||||
|
|
||||||
|
Finds duplicate Points inside the T2DPointArray ATPA and stores the results inside the TPointArray Matches
|
||||||
|
|
||||||
|
|
||||||
FindTextTPAinTPA
|
FindTextTPAinTPA
|
||||||
----------------
|
----------------
|
||||||
@ -275,6 +334,8 @@ FindTextTPAinTPA
|
|||||||
|
|
||||||
function FindTextTPAinTPA(Height : integer;const SearchTPA, TotalTPA: TPointArray; var Matches: TPointArray): Boolean;
|
function FindTextTPAinTPA(Height : integer;const SearchTPA, TotalTPA: TPointArray; var Matches: TPointArray): Boolean;
|
||||||
|
|
||||||
|
Looks for the TPoints from SearchTPA inside TotalTPA with a maximum y distance of Height and stores the matches inside the TPointArray Matches
|
||||||
|
|
||||||
|
|
||||||
SortCircleWise
|
SortCircleWise
|
||||||
--------------
|
--------------
|
||||||
@ -283,6 +344,8 @@ SortCircleWise
|
|||||||
|
|
||||||
procedure SortCircleWise(var tpa: TPointArray; const cx, cy, StartDegree: Integer; SortUp, ClockWise: Boolean);
|
procedure SortCircleWise(var tpa: TPointArray; const cx, cy, StartDegree: Integer; SortUp, ClockWise: Boolean);
|
||||||
|
|
||||||
|
Sorts the TPointArray tpa from the point cx, cy if Sortup is true. Starting at StartDegree going clockwise if Clockwise is True
|
||||||
|
|
||||||
|
|
||||||
LinearSort
|
LinearSort
|
||||||
----------
|
----------
|
||||||
@ -291,6 +354,8 @@ LinearSort
|
|||||||
|
|
||||||
procedure LinearSort(var tpa: TPointArray; cx, cy, sd: Integer; SortUp: Boolean);
|
procedure LinearSort(var tpa: TPointArray; cx, cy, sd: Integer; SortUp: Boolean);
|
||||||
|
|
||||||
|
Sorts the TPointArray tpa from cx, cy if Sortup is true on the degree angle sd
|
||||||
|
|
||||||
|
|
||||||
RotatePoint
|
RotatePoint
|
||||||
-----------
|
-----------
|
||||||
@ -299,6 +364,8 @@ RotatePoint
|
|||||||
|
|
||||||
function RotatePoint(Const p: TPoint; angle, mx, my: Extended): TPoint;
|
function RotatePoint(Const p: TPoint; angle, mx, my: Extended): TPoint;
|
||||||
|
|
||||||
|
Rotates the TPoint p around the center mx, my with the angle
|
||||||
|
|
||||||
|
|
||||||
ChangeDistPT
|
ChangeDistPT
|
||||||
------------
|
------------
|
||||||
@ -307,6 +374,8 @@ ChangeDistPT
|
|||||||
|
|
||||||
function ChangeDistPT(const PT : TPoint; mx,my : integer; newdist : extended) : TPoint;
|
function ChangeDistPT(const PT : TPoint; mx,my : integer; newdist : extended) : TPoint;
|
||||||
|
|
||||||
|
Returns a TPoint with the distance newdist from the point mx, my based on the position of the TPoint TP
|
||||||
|
|
||||||
|
|
||||||
ChangeDistTPA
|
ChangeDistTPA
|
||||||
-------------
|
-------------
|
||||||
@ -315,6 +384,8 @@ ChangeDistTPA
|
|||||||
|
|
||||||
function ChangeDistTPA(var TPA : TPointArray; mx,my : integer; newdist : extended) : boolean;
|
function ChangeDistTPA(var TPA : TPointArray; mx,my : integer; newdist : extended) : boolean;
|
||||||
|
|
||||||
|
Returns the result in the TPointArray TPA with the distance newdist from mx, my based on the current position TPA
|
||||||
|
|
||||||
|
|
||||||
FindGapsTPA
|
FindGapsTPA
|
||||||
-----------
|
-----------
|
||||||
@ -323,6 +394,8 @@ FindGapsTPA
|
|||||||
|
|
||||||
function FindGapsTPA(const TPA: TPointArray; MinPixels: Integer): T2DPointArray;
|
function FindGapsTPA(const TPA: TPointArray; MinPixels: Integer): T2DPointArray;
|
||||||
|
|
||||||
|
Finds the possible gaps in the TPointArray TPA and results the gaps as a T2DPointArray. Considers as a gap if the gap length is >= MinPixels
|
||||||
|
|
||||||
|
|
||||||
RemoveDistTPointArray
|
RemoveDistTPointArray
|
||||||
---------------------
|
---------------------
|
||||||
@ -331,6 +404,8 @@ RemoveDistTPointArray
|
|||||||
|
|
||||||
function RemoveDistTPointArray(x, y, dist: Integer;const ThePoints: TPointArray; RemoveHigher: Boolean): TPointArray;
|
function RemoveDistTPointArray(x, y, dist: Integer;const ThePoints: TPointArray; RemoveHigher: Boolean): TPointArray;
|
||||||
|
|
||||||
|
Finds the possible gaps in the TPointArray TPA and removes the gaps. Considers as a gap if the gap length is >= MinPixels
|
||||||
|
|
||||||
|
|
||||||
CombineTPA
|
CombineTPA
|
||||||
----------
|
----------
|
||||||
@ -339,6 +414,8 @@ CombineTPA
|
|||||||
|
|
||||||
function CombineTPA(const Ar1, Ar2: TPointArray): TPointArray;
|
function CombineTPA(const Ar1, Ar2: TPointArray): TPointArray;
|
||||||
|
|
||||||
|
Attaches the TPointArray Ar2 onto the end of Ar1 and returns it as the result
|
||||||
|
|
||||||
|
|
||||||
ReArrangeandShortenArrayEx
|
ReArrangeandShortenArrayEx
|
||||||
--------------------------
|
--------------------------
|
||||||
@ -347,6 +424,8 @@ ReArrangeandShortenArrayEx
|
|||||||
|
|
||||||
function ReArrangeandShortenArrayEx(const a: TPointArray; w, h: Integer): TPointArray;
|
function ReArrangeandShortenArrayEx(const a: TPointArray; w, h: Integer): TPointArray;
|
||||||
|
|
||||||
|
Results the TPointArray a with one point per box with side lengths W and H left
|
||||||
|
|
||||||
|
|
||||||
ReArrangeandShortenArray
|
ReArrangeandShortenArray
|
||||||
------------------------
|
------------------------
|
||||||
@ -355,6 +434,8 @@ ReArrangeandShortenArray
|
|||||||
|
|
||||||
function ReArrangeandShortenArray(const a: TPointArray; Dist: Integer): TPointArray;
|
function ReArrangeandShortenArray(const a: TPointArray; Dist: Integer): TPointArray;
|
||||||
|
|
||||||
|
Results the TPointArray a with one point per box with side length Dist left
|
||||||
|
|
||||||
|
|
||||||
TPAtoATPAEx
|
TPAtoATPAEx
|
||||||
-----------
|
-----------
|
||||||
@ -363,6 +444,8 @@ TPAtoATPAEx
|
|||||||
|
|
||||||
function TPAtoATPAEx(const TPA: TPointArray; w, h: Integer): T2DPointArray;
|
function TPAtoATPAEx(const TPA: TPointArray; w, h: Integer): T2DPointArray;
|
||||||
|
|
||||||
|
Splits the TPA to boxes with sidelengths W and H and results them as a T2DPointArray
|
||||||
|
|
||||||
|
|
||||||
TPAtoATPA
|
TPAtoATPA
|
||||||
---------
|
---------
|
||||||
@ -371,6 +454,8 @@ TPAtoATPA
|
|||||||
|
|
||||||
function TPAtoATPA(const TPA: TPointArray; Dist: Integer): T2DPointArray;
|
function TPAtoATPA(const TPA: TPointArray; Dist: Integer): T2DPointArray;
|
||||||
|
|
||||||
|
Splits the TPA to boxes with sidelength Dist and results them as a T2DPointArray
|
||||||
|
|
||||||
|
|
||||||
CombineIntArray
|
CombineIntArray
|
||||||
---------------
|
---------------
|
||||||
@ -379,6 +464,8 @@ CombineIntArray
|
|||||||
|
|
||||||
function CombineIntArray(const Ar1, Ar2: TIntegerArray): TIntegerArray;
|
function CombineIntArray(const Ar1, Ar2: TIntegerArray): TIntegerArray;
|
||||||
|
|
||||||
|
Attaches the TIntegerArray Ar2 onto the end of Ar1 and returns it as the result
|
||||||
|
|
||||||
|
|
||||||
MergeATPA
|
MergeATPA
|
||||||
---------
|
---------
|
||||||
@ -387,6 +474,8 @@ MergeATPA
|
|||||||
|
|
||||||
function MergeATPA(const ATPA : T2DPointArray) : TPointArray;
|
function MergeATPA(const ATPA : T2DPointArray) : TPointArray;
|
||||||
|
|
||||||
|
Combines all the TPointArrays from the T2DPointArray ATPA into the result
|
||||||
|
|
||||||
|
|
||||||
AppendTPA
|
AppendTPA
|
||||||
---------
|
---------
|
||||||
@ -395,6 +484,8 @@ AppendTPA
|
|||||||
|
|
||||||
procedure AppendTPA(var TPA: TPointArray; const ToAppend: TPointArray);
|
procedure AppendTPA(var TPA: TPointArray; const ToAppend: TPointArray);
|
||||||
|
|
||||||
|
Attaches the TPointArray ToAppend onto the end of TPA
|
||||||
|
|
||||||
|
|
||||||
TPAFromBox
|
TPAFromBox
|
||||||
----------
|
----------
|
||||||
@ -403,6 +494,8 @@ TPAFromBox
|
|||||||
|
|
||||||
function TPAFromBox(const Box : TBox) : TPointArray;
|
function TPAFromBox(const Box : TBox) : TPointArray;
|
||||||
|
|
||||||
|
Create a TPointArray from the top left and the bottom right of the TBox Box
|
||||||
|
|
||||||
|
|
||||||
RotatePoints
|
RotatePoints
|
||||||
------------
|
------------
|
||||||
@ -411,6 +504,8 @@ RotatePoints
|
|||||||
|
|
||||||
function RotatePoints(Const P: TPointArray; A, cx, cy: Extended): TPointArray ;
|
function RotatePoints(Const P: TPointArray; A, cx, cy: Extended): TPointArray ;
|
||||||
|
|
||||||
|
Rotates the TPointArray P around the center cx, cy with the angle a
|
||||||
|
|
||||||
|
|
||||||
FindTPAEdges
|
FindTPAEdges
|
||||||
------------
|
------------
|
||||||
@ -419,6 +514,8 @@ FindTPAEdges
|
|||||||
|
|
||||||
function FindTPAEdges(const p: TPointArray): TPointArray;
|
function FindTPAEdges(const p: TPointArray): TPointArray;
|
||||||
|
|
||||||
|
Returns a TPointArray of the edge points of the TPointArray p
|
||||||
|
|
||||||
|
|
||||||
ClearTPAFromTPA
|
ClearTPAFromTPA
|
||||||
---------------
|
---------------
|
||||||
@ -427,6 +524,8 @@ ClearTPAFromTPA
|
|||||||
|
|
||||||
function ClearTPAFromTPA(const arP, ClearPoints: TPointArray): TPointArray;
|
function ClearTPAFromTPA(const arP, ClearPoints: TPointArray): TPointArray;
|
||||||
|
|
||||||
|
Removes the points in TPointArray ClearPoints from arP
|
||||||
|
|
||||||
|
|
||||||
ReturnPointsNotInTPA
|
ReturnPointsNotInTPA
|
||||||
--------------------
|
--------------------
|
||||||
@ -435,6 +534,8 @@ ReturnPointsNotInTPA
|
|||||||
|
|
||||||
function ReturnPointsNotInTPA(Const TotalTPA: TPointArray; const Box: TBox): TPointArray;
|
function ReturnPointsNotInTPA(Const TotalTPA: TPointArray; const Box: TBox): TPointArray;
|
||||||
|
|
||||||
|
All the points from the TPointArray TotalTPA that are not in the TBox Box are returned in the TPointArray Res
|
||||||
|
|
||||||
|
|
||||||
PointInTPA
|
PointInTPA
|
||||||
----------
|
----------
|
||||||
@ -443,6 +544,8 @@ PointInTPA
|
|||||||
|
|
||||||
function PointInTPA(p: TPoint;const arP: TPointArray): Boolean;
|
function PointInTPA(p: TPoint;const arP: TPointArray): Boolean;
|
||||||
|
|
||||||
|
Returns true if the TPoint p is found in the TPointArray arP
|
||||||
|
|
||||||
|
|
||||||
ClearDoubleTPA
|
ClearDoubleTPA
|
||||||
--------------
|
--------------
|
||||||
@ -451,6 +554,8 @@ ClearDoubleTPA
|
|||||||
|
|
||||||
procedure ClearDoubleTPA(var TPA: TPointArray);
|
procedure ClearDoubleTPA(var TPA: TPointArray);
|
||||||
|
|
||||||
|
Deletes duplicate TPAs int he TPointArray TPA
|
||||||
|
|
||||||
|
|
||||||
TPACountSort
|
TPACountSort
|
||||||
------------
|
------------
|
||||||
@ -475,6 +580,8 @@ InvertTIA
|
|||||||
|
|
||||||
procedure InvertTIA(var tI: TIntegerArray);
|
procedure InvertTIA(var tI: TIntegerArray);
|
||||||
|
|
||||||
|
Reverses the TIntegerArray tI
|
||||||
|
|
||||||
|
|
||||||
SumIntegerArray
|
SumIntegerArray
|
||||||
---------------
|
---------------
|
||||||
@ -483,6 +590,8 @@ SumIntegerArray
|
|||||||
|
|
||||||
function SumIntegerArray(const Ints : TIntegerArray): Integer;
|
function SumIntegerArray(const Ints : TIntegerArray): Integer;
|
||||||
|
|
||||||
|
Retuns the sum of all the integers in the TIntegerArray Ints
|
||||||
|
|
||||||
|
|
||||||
AverageTIA
|
AverageTIA
|
||||||
----------
|
----------
|
||||||
@ -491,6 +600,8 @@ AverageTIA
|
|||||||
|
|
||||||
function AverageTIA(const tI: TIntegerArray): Integer;
|
function AverageTIA(const tI: TIntegerArray): Integer;
|
||||||
|
|
||||||
|
Gives an average of the sum of the integers in the TIntegerArray tI
|
||||||
|
|
||||||
|
|
||||||
AverageExtended
|
AverageExtended
|
||||||
---------------
|
---------------
|
||||||
@ -499,6 +610,8 @@ AverageExtended
|
|||||||
|
|
||||||
function AverageExtended(const tE: TExtendedArray): Extended;
|
function AverageExtended(const tE: TExtendedArray): Extended;
|
||||||
|
|
||||||
|
Gives an average of the sum of the extendeds in the TExtendedArray tI
|
||||||
|
|
||||||
|
|
||||||
SplitTPAExWrap
|
SplitTPAExWrap
|
||||||
--------------
|
--------------
|
||||||
@ -507,6 +620,8 @@ SplitTPAExWrap
|
|||||||
|
|
||||||
procedure SplitTPAExWrap(const arr: TPointArray; w, h: Integer; var res : T2DPointArray);
|
procedure SplitTPAExWrap(const arr: TPointArray; w, h: Integer; var res : T2DPointArray);
|
||||||
|
|
||||||
|
Splits the points with max X and Y distances W and H to their and returns the result in the T2DPointArray Res
|
||||||
|
|
||||||
|
|
||||||
SplitTPAWrap
|
SplitTPAWrap
|
||||||
------------
|
------------
|
||||||
@ -515,6 +630,8 @@ SplitTPAWrap
|
|||||||
|
|
||||||
procedure SplitTPAWrap(const arr: TPointArray; Dist: Integer; var res: T2DPointArray);
|
procedure SplitTPAWrap(const arr: TPointArray; Dist: Integer; var res: T2DPointArray);
|
||||||
|
|
||||||
|
Splits the points with max distance Dist to their own TPointArrays and returns the result in the T2DPointArray Res
|
||||||
|
|
||||||
|
|
||||||
FindGapsTPAWrap
|
FindGapsTPAWrap
|
||||||
---------------
|
---------------
|
||||||
@ -523,6 +640,8 @@ FindGapsTPAWrap
|
|||||||
|
|
||||||
procedure FindGapsTPAWrap(const TPA: TPointArray; MinPixels: Integer; var Res : T2DPointArray);
|
procedure FindGapsTPAWrap(const TPA: TPointArray; MinPixels: Integer; var Res : T2DPointArray);
|
||||||
|
|
||||||
|
Finds the possible gaps in the TPointArray TPA and the result is returned in the T2DPointArray Res. Considers as a gap if the gap length is >= MinPixels
|
||||||
|
|
||||||
|
|
||||||
RemoveDistTPointArrayWrap
|
RemoveDistTPointArrayWrap
|
||||||
-------------------------
|
-------------------------
|
||||||
@ -531,6 +650,8 @@ RemoveDistTPointArrayWrap
|
|||||||
|
|
||||||
procedure RemoveDistTPointArrayWrap(x, y, dist: Integer;const ThePoints: TPointArray; RemoveHigher: Boolean; var Res : TPointArray);
|
procedure RemoveDistTPointArrayWrap(x, y, dist: Integer;const ThePoints: TPointArray; RemoveHigher: Boolean; var Res : TPointArray);
|
||||||
|
|
||||||
|
Finds the possible gaps in the TPointArray TPA and removes the gaps. Considers as a gap if the gap length is >= MinPixels and returns the result in the TPointArray Res
|
||||||
|
|
||||||
|
|
||||||
CombineTPAWrap
|
CombineTPAWrap
|
||||||
--------------
|
--------------
|
||||||
@ -539,6 +660,8 @@ CombineTPAWrap
|
|||||||
|
|
||||||
procedure CombineTPAWrap(const Ar1, Ar2: TPointArray; var Res : TPointArray);
|
procedure CombineTPAWrap(const Ar1, Ar2: TPointArray; var Res : TPointArray);
|
||||||
|
|
||||||
|
Attaches the TPointArray Ar2 onto the end of Ar1 and returns the result in the TPointArray Res
|
||||||
|
|
||||||
|
|
||||||
ReArrangeandShortenArrayExWrap
|
ReArrangeandShortenArrayExWrap
|
||||||
------------------------------
|
------------------------------
|
||||||
@ -547,6 +670,8 @@ ReArrangeandShortenArrayExWrap
|
|||||||
|
|
||||||
procedure ReArrangeandShortenArrayExWrap(const a: TPointArray; w, h: Integer; var Res : TPointArray);
|
procedure ReArrangeandShortenArrayExWrap(const a: TPointArray; w, h: Integer; var Res : TPointArray);
|
||||||
|
|
||||||
|
Results the TPointArray a with one point per box with side lengths W and H left and puts the result in Res
|
||||||
|
|
||||||
|
|
||||||
ReArrangeandShortenArrayWrap
|
ReArrangeandShortenArrayWrap
|
||||||
----------------------------
|
----------------------------
|
||||||
@ -555,6 +680,8 @@ ReArrangeandShortenArrayWrap
|
|||||||
|
|
||||||
procedure ReArrangeandShortenArrayWrap(const a: TPointArray; Dist: Integer; var Res : TPointArray);
|
procedure ReArrangeandShortenArrayWrap(const a: TPointArray; Dist: Integer; var Res : TPointArray);
|
||||||
|
|
||||||
|
Results the TPointArray a with one point per box with side length Dist left and puts the result in Res
|
||||||
|
|
||||||
|
|
||||||
TPAtoATPAExWrap
|
TPAtoATPAExWrap
|
||||||
---------------
|
---------------
|
||||||
@ -563,6 +690,8 @@ TPAtoATPAExWrap
|
|||||||
|
|
||||||
procedure TPAtoATPAExWrap(const TPA: TPointArray; w, h: Integer; var Res : T2DPointArray);
|
procedure TPAtoATPAExWrap(const TPA: TPointArray; w, h: Integer; var Res : T2DPointArray);
|
||||||
|
|
||||||
|
Splits the TPA to boxes with sidelengths W and H and results them as a T2DPointArray in Res
|
||||||
|
|
||||||
|
|
||||||
TPAtoATPAWrap
|
TPAtoATPAWrap
|
||||||
-------------
|
-------------
|
||||||
@ -571,6 +700,8 @@ TPAtoATPAWrap
|
|||||||
|
|
||||||
procedure TPAtoATPAWrap(const TPA: TPointArray; Dist: Integer; var Res : T2DPointArray);
|
procedure TPAtoATPAWrap(const TPA: TPointArray; Dist: Integer; var Res : T2DPointArray);
|
||||||
|
|
||||||
|
Splits the TPA to boxes with sidelength Dist and results them as a T2DPointArray in Res
|
||||||
|
|
||||||
|
|
||||||
CombineIntArrayWrap
|
CombineIntArrayWrap
|
||||||
-------------------
|
-------------------
|
||||||
@ -579,6 +710,8 @@ CombineIntArrayWrap
|
|||||||
|
|
||||||
procedure CombineIntArrayWrap(const Ar1, Ar2: TIntegerArray; var Res : TIntegerArray);
|
procedure CombineIntArrayWrap(const Ar1, Ar2: TIntegerArray; var Res : TIntegerArray);
|
||||||
|
|
||||||
|
Attaches the TIntegerArray Ar2 onto the end of Ar1 and returns it in the TIntegerArray Res
|
||||||
|
|
||||||
|
|
||||||
ReturnPointsNotInTPAWrap
|
ReturnPointsNotInTPAWrap
|
||||||
------------------------
|
------------------------
|
||||||
@ -587,6 +720,8 @@ ReturnPointsNotInTPAWrap
|
|||||||
|
|
||||||
procedure ReturnPointsNotInTPAWrap(Const TotalTPA: TPointArray; const Box: TBox; var Res : TPointArray);
|
procedure ReturnPointsNotInTPAWrap(Const TotalTPA: TPointArray; const Box: TBox; var Res : TPointArray);
|
||||||
|
|
||||||
|
All the points from the TPointArray TotalTPA that are not in the TBox Box are returned in the TPointArray Res
|
||||||
|
|
||||||
|
|
||||||
MergeATPAWrap
|
MergeATPAWrap
|
||||||
-------------
|
-------------
|
||||||
@ -595,6 +730,8 @@ MergeATPAWrap
|
|||||||
|
|
||||||
procedure MergeATPAWrap(const ATPA : T2DPointArray; var Res: TPointArray);
|
procedure MergeATPAWrap(const ATPA : T2DPointArray; var Res: TPointArray);
|
||||||
|
|
||||||
|
Combines all the TPointArrays from the T2DPointArray ATPA into the TPointArray Res
|
||||||
|
|
||||||
|
|
||||||
TPAFromBoxWrap
|
TPAFromBoxWrap
|
||||||
--------------
|
--------------
|
||||||
@ -603,6 +740,8 @@ TPAFromBoxWrap
|
|||||||
|
|
||||||
procedure TPAFromBoxWrap(const Box : TBox; var Res : TPointArray);
|
procedure TPAFromBoxWrap(const Box : TBox; var Res : TPointArray);
|
||||||
|
|
||||||
|
Create a TPointArray from the top left and the bottom right of the TBox Box and returns the result in Res
|
||||||
|
|
||||||
|
|
||||||
RotatePointsWrap
|
RotatePointsWrap
|
||||||
----------------
|
----------------
|
||||||
@ -611,6 +750,8 @@ RotatePointsWrap
|
|||||||
|
|
||||||
procedure RotatePointsWrap(Const P: TPointArray; A, cx, cy: Extended; var Res : TPointArray);
|
procedure RotatePointsWrap(Const P: TPointArray; A, cx, cy: Extended; var Res : TPointArray);
|
||||||
|
|
||||||
|
Rotates the TPointArray P around the center cx, cy with the angle a and returns the result in Res
|
||||||
|
|
||||||
|
|
||||||
FindTPAEdgesWrap
|
FindTPAEdgesWrap
|
||||||
----------------
|
----------------
|
||||||
@ -619,6 +760,8 @@ FindTPAEdgesWrap
|
|||||||
|
|
||||||
procedure FindTPAEdgesWrap(const p: TPointArray; var Res : TPointArray);
|
procedure FindTPAEdgesWrap(const p: TPointArray; var Res : TPointArray);
|
||||||
|
|
||||||
|
Returns a TPointArray of the edge points of the TPointArray p and returns the result in the TPointArray Res
|
||||||
|
|
||||||
|
|
||||||
ClearTPAFromTPAWrap
|
ClearTPAFromTPAWrap
|
||||||
-------------------
|
-------------------
|
||||||
@ -627,6 +770,8 @@ ClearTPAFromTPAWrap
|
|||||||
|
|
||||||
procedure ClearTPAFromTPAWrap(const arP, ClearPoints: TPointArray; var Res : TPointArray);
|
procedure ClearTPAFromTPAWrap(const arP, ClearPoints: TPointArray; var Res : TPointArray);
|
||||||
|
|
||||||
|
Removes the points in TPointArray ClearPoints from arP and returns the results in Res
|
||||||
|
|
||||||
|
|
||||||
SameTPA
|
SameTPA
|
||||||
-------
|
-------
|
||||||
@ -635,6 +780,8 @@ SameTPA
|
|||||||
|
|
||||||
function SameTPA(const aTPA, bTPA: TPointArray): Boolean;
|
function SameTPA(const aTPA, bTPA: TPointArray): Boolean;
|
||||||
|
|
||||||
|
Returns true if the TPointArray aTPA is the same as bTPA
|
||||||
|
|
||||||
|
|
||||||
TPAInATPA
|
TPAInATPA
|
||||||
---------
|
---------
|
||||||
@ -643,6 +790,8 @@ TPAInATPA
|
|||||||
|
|
||||||
function TPAInATPA(const TPA: TPointArray;const InATPA: T2DPointArray; var Index: LongInt): Boolean;
|
function TPAInATPA(const TPA: TPointArray;const InATPA: T2DPointArray; var Index: LongInt): Boolean;
|
||||||
|
|
||||||
|
Returns true if the TPointArray TPA is found in the T2DPointArray InATPA and stores the index in Index
|
||||||
|
|
||||||
|
|
||||||
OffsetTPA
|
OffsetTPA
|
||||||
---------
|
---------
|
||||||
@ -651,6 +800,8 @@ OffsetTPA
|
|||||||
|
|
||||||
procedure OffsetTPA(var TPA : TPointArray; const Offset : TPoint);
|
procedure OffsetTPA(var TPA : TPointArray; const Offset : TPoint);
|
||||||
|
|
||||||
|
Offsets all the TPAs int the TPointArray TPA but the TPoint Offset
|
||||||
|
|
||||||
|
|
||||||
OffsetATPA
|
OffsetATPA
|
||||||
----------
|
----------
|
||||||
@ -659,6 +810,8 @@ OffsetATPA
|
|||||||
|
|
||||||
procedure OffsetATPA(var ATPA : T2DPointArray; const Offset : TPoint);
|
procedure OffsetATPA(var ATPA : T2DPointArray; const Offset : TPoint);
|
||||||
|
|
||||||
|
Offsets all the TPAs int the T2DPointArray ATPA but the TPoint Offset
|
||||||
|
|
||||||
|
|
||||||
CopyTPA
|
CopyTPA
|
||||||
-------
|
-------
|
||||||
@ -667,6 +820,8 @@ CopyTPA
|
|||||||
|
|
||||||
function CopyTPA(const TPA : TPointArray) : TPointArray;
|
function CopyTPA(const TPA : TPointArray) : TPointArray;
|
||||||
|
|
||||||
|
Returns the TPointArray TPA
|
||||||
|
|
||||||
|
|
||||||
CopyATPA
|
CopyATPA
|
||||||
--------
|
--------
|
||||||
@ -675,4 +830,5 @@ CopyATPA
|
|||||||
|
|
||||||
function CopyATPA(const ATPA : T2DPointArray) : T2DPointArray;
|
function CopyATPA(const ATPA : T2DPointArray) : T2DPointArray;
|
||||||
|
|
||||||
|
Returns the T2DPointArray ATPA
|
||||||
|
|
||||||
|
@ -142,6 +142,8 @@ GetRawHeaders returns a string of headers from the specified client.
|
|||||||
Socket Functions
|
Socket Functions
|
||||||
----------------
|
----------------
|
||||||
|
|
||||||
|
Simba's Socket Functions. Examples required; if you have one, please let u know.
|
||||||
|
|
||||||
CreateSocket
|
CreateSocket
|
||||||
~~~~~~~~~~~~
|
~~~~~~~~~~~~
|
||||||
|
|
||||||
@ -190,7 +192,6 @@ ListenSocket
|
|||||||
|
|
||||||
ListenSocket allows for a client socket to accept connections.
|
ListenSocket allows for a client socket to accept connections.
|
||||||
|
|
||||||
|
|
||||||
AcceptSocket
|
AcceptSocket
|
||||||
~~~~~~~~~~~~
|
~~~~~~~~~~~~
|
||||||
|
|
||||||
@ -249,15 +250,15 @@ SendSocket
|
|||||||
|
|
||||||
SendSocket sends a string of data to a bound client socket.
|
SendSocket sends a string of data to a bound client socket.
|
||||||
|
|
||||||
SetTimeout
|
SetSocketTimeout
|
||||||
~~~~~~~~~~
|
~~~~~~~~~~
|
||||||
|
|
||||||
.. code-block:: pascal
|
.. code-block:: pascal
|
||||||
|
|
||||||
procedure SetTimeout(Client, Time: integer);
|
procedure SetSocketTimeout(Client, Time: integer);
|
||||||
|
|
||||||
SetTimeout sets a maximum amount of time for a bound client socket to wait for
|
SetTimeout sets a maximum amount of time for a bound client socket to wait for
|
||||||
data from another socket.
|
data from another socket. Time is in *milliseconds*.
|
||||||
|
|
||||||
SocketInfo
|
SocketInfo
|
||||||
~~~~~~~~~~
|
~~~~~~~~~~
|
||||||
|
15
Extensions/extension.sex
Normal file
15
Extensions/extension.sex
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
program ExtUpdater;
|
||||||
|
{$I ..\Extensions\Updater.sei}
|
||||||
|
|
||||||
|
procedure Init;
|
||||||
|
var
|
||||||
|
EXT: integer;
|
||||||
|
begin
|
||||||
|
Settings.GetKeyValueDef('Extensions_Visible', 'false'); //Default Menu to be hidden =)
|
||||||
|
AddUpdater('Extensions', 'http://wizzup.org/static/srl/exten.tar.bz2',
|
||||||
|
'http://wizzup.org/static/srl/exten_version', ScriptPath + {$IFDEF WINDOWS}'\' {$ELSE}'/'{$ENDIF}, True, True, EXT);
|
||||||
|
end;
|
||||||
|
|
||||||
|
function GetName: string; begin Result := 'Extensions Updater'; end;
|
||||||
|
function GetVersion: string; begin Result := '0.1'; end;
|
||||||
|
begin end.
|
@ -30,11 +30,12 @@ Name: "{app}\Extensions"
|
|||||||
Name: "{app}\Includes"
|
Name: "{app}\Includes"
|
||||||
Name: "{app}\Plugins"
|
Name: "{app}\Plugins"
|
||||||
Name: "{app}\Scripts"
|
Name: "{app}\Scripts"
|
||||||
Name: "{app}\Scripts\Tests"
|
; Name: "{app}\Scripts\Tests"
|
||||||
|
|
||||||
[Files]
|
[Files]
|
||||||
Source: "C:\Simba\Simba.exe"; DestDir: "{app}"; Flags: ignoreversion
|
Source: "C:\Simba\Simba.exe"; DestDir: "{app}"; Flags: ignoreversion
|
||||||
Source: "C:\Simba\Extensions\srl.sex"; DestDir: "{app}\Extensions"; Flags: ignoreversion
|
Source: "C:\Simba\Extensions\srl.sex"; DestDir: "{app}\Extensions"; Flags: ignoreversion
|
||||||
|
Source: "C:\Simba\Extensions\extension.sex"; DestDir: "{app}\Extensions"; Flags: ignoreversion
|
||||||
Source: "C:\Simba\Extensions\msi.sex"; DestDir: "{app}\Extensions"; Flags: ignoreversion
|
Source: "C:\Simba\Extensions\msi.sex"; DestDir: "{app}\Extensions"; Flags: ignoreversion
|
||||||
Source: "C:\Simba\Extensions\associate.sex"; DestDir: "{app}\Extensions"; Flags: ignoreversion
|
Source: "C:\Simba\Extensions\associate.sex"; DestDir: "{app}\Extensions"; Flags: ignoreversion
|
||||||
Source: "C:\Simba\Extensions\dtm_editor.sex"; DestDir: "{app}\Extensions"; Flags: ignoreversion
|
Source: "C:\Simba\Extensions\dtm_editor.sex"; DestDir: "{app}\Extensions"; Flags: ignoreversion
|
||||||
@ -43,6 +44,9 @@ Source: "C:\Simba\Extensions\paster.sex"; DestDir: "{app}\Extensions"; Flags: ig
|
|||||||
Source: "C:\Simba\Extensions\CRov.sex"; DestDir: "{app}\Extensions"; Flags: ignoreversion
|
Source: "C:\Simba\Extensions\CRov.sex"; DestDir: "{app}\Extensions"; Flags: ignoreversion
|
||||||
Source: "C:\Simba\Extensions\Updater.sei"; DestDir: "{app}\Extensions"; Flags: ignoreversion
|
Source: "C:\Simba\Extensions\Updater.sei"; DestDir: "{app}\Extensions"; Flags: ignoreversion
|
||||||
Source: "C:\Simba\Includes\mml.simba"; DestDir: "{app}\Includes"; Flags: ignoreversion
|
Source: "C:\Simba\Includes\mml.simba"; DestDir: "{app}\Includes"; Flags: ignoreversion
|
||||||
|
; Source: "C:\Simba\settings.xml"; DestDir: "{app}\"; Flags: ignoreversion
|
||||||
|
; XXX Make sure to use a MINIMAL settings.xml XXX
|
||||||
|
|
||||||
; Source: "C:\Simba\Fonts\*"; DestDir: "{app}\Fonts"; Flags: ignoreversion recursesubdirs createallsubdirs
|
; Source: "C:\Simba\Fonts\*"; DestDir: "{app}\Fonts"; Flags: ignoreversion recursesubdirs createallsubdirs
|
||||||
; Source: "C:\Simba\Tests\PS\*"; DestDir:"{app}\Scripts\Tests"; Flags: ignoreversion
|
; Source: "C:\Simba\Tests\PS\*"; DestDir:"{app}\Scripts\Tests"; Flags: ignoreversion
|
||||||
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
|
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
|
||||||
|
154
Projects/SMARTLoader/project1.lpi
Normal file
154
Projects/SMARTLoader/project1.lpi
Normal file
@ -0,0 +1,154 @@
|
|||||||
|
<?xml version="1.0"?>
|
||||||
|
<CONFIG>
|
||||||
|
<ProjectOptions>
|
||||||
|
<Version Value="9"/>
|
||||||
|
<General>
|
||||||
|
<Flags>
|
||||||
|
<MainUnitHasCreateFormStatements Value="False"/>
|
||||||
|
</Flags>
|
||||||
|
<MainUnit Value="0"/>
|
||||||
|
<ResourceType Value="res"/>
|
||||||
|
<UseXPManifest Value="True"/>
|
||||||
|
<Icon Value="0"/>
|
||||||
|
<ActiveWindowIndexAtStart Value="0"/>
|
||||||
|
</General>
|
||||||
|
<i18n>
|
||||||
|
<EnableI18N LFM="False"/>
|
||||||
|
</i18n>
|
||||||
|
<VersionInfo>
|
||||||
|
<StringTable ProductVersion=""/>
|
||||||
|
</VersionInfo>
|
||||||
|
<BuildModes Count="1" Active="Default">
|
||||||
|
<Item1 Name="Default" Default="True"/>
|
||||||
|
</BuildModes>
|
||||||
|
<PublishOptions>
|
||||||
|
<Version Value="2"/>
|
||||||
|
<IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/>
|
||||||
|
<ExcludeFileFilter Value="*.(bak|ppu|o|so);*~;backup"/>
|
||||||
|
</PublishOptions>
|
||||||
|
<RunParams>
|
||||||
|
<local>
|
||||||
|
<FormatVersion Value="1"/>
|
||||||
|
<LaunchingApplication PathPlusParams="/usr/bin/xterm -T 'Lazarus Run Output' -e $(LazarusDir)/tools/runwait.sh $(TargetCmdLine)"/>
|
||||||
|
</local>
|
||||||
|
</RunParams>
|
||||||
|
<RequiredPackages Count="1">
|
||||||
|
<Item1>
|
||||||
|
<PackageName Value="FCL"/>
|
||||||
|
</Item1>
|
||||||
|
</RequiredPackages>
|
||||||
|
<Units Count="5">
|
||||||
|
<Unit0>
|
||||||
|
<Filename Value="project1.lpr"/>
|
||||||
|
<IsPartOfProject Value="True"/>
|
||||||
|
<UnitName Value="project1"/>
|
||||||
|
<IsVisibleTab Value="True"/>
|
||||||
|
<EditorIndex Value="0"/>
|
||||||
|
<WindowIndex Value="0"/>
|
||||||
|
<TopLine Value="52"/>
|
||||||
|
<CursorPos X="3" Y="87"/>
|
||||||
|
<UsageCount Value="21"/>
|
||||||
|
<Loaded Value="True"/>
|
||||||
|
</Unit0>
|
||||||
|
<Unit1>
|
||||||
|
<Filename Value="../../Units/MMLAddon/plugins.pas"/>
|
||||||
|
<UnitName Value="plugins"/>
|
||||||
|
<EditorIndex Value="1"/>
|
||||||
|
<WindowIndex Value="0"/>
|
||||||
|
<TopLine Value="6"/>
|
||||||
|
<CursorPos X="26" Y="37"/>
|
||||||
|
<UsageCount Value="10"/>
|
||||||
|
<Loaded Value="True"/>
|
||||||
|
</Unit1>
|
||||||
|
<Unit2>
|
||||||
|
<Filename Value="../../../fpc/rtl/inc/dynlibs.pas"/>
|
||||||
|
<UnitName Value="dynlibs"/>
|
||||||
|
<WindowIndex Value="0"/>
|
||||||
|
<TopLine Value="1"/>
|
||||||
|
<CursorPos X="1" Y="1"/>
|
||||||
|
<UsageCount Value="10"/>
|
||||||
|
</Unit2>
|
||||||
|
<Unit3>
|
||||||
|
<Filename Value="../../Units/Linux/keybinder.pas"/>
|
||||||
|
<UnitName Value="keybinder"/>
|
||||||
|
<EditorIndex Value="2"/>
|
||||||
|
<WindowIndex Value="0"/>
|
||||||
|
<TopLine Value="1"/>
|
||||||
|
<CursorPos X="61" Y="24"/>
|
||||||
|
<UsageCount Value="10"/>
|
||||||
|
<Loaded Value="True"/>
|
||||||
|
</Unit3>
|
||||||
|
<Unit4>
|
||||||
|
<Filename Value="../../Units/Linux/xinput.pas"/>
|
||||||
|
<UnitName Value="xinput"/>
|
||||||
|
<EditorIndex Value="3"/>
|
||||||
|
<WindowIndex Value="0"/>
|
||||||
|
<TopLine Value="1"/>
|
||||||
|
<CursorPos X="1" Y="1"/>
|
||||||
|
<UsageCount Value="10"/>
|
||||||
|
<Loaded Value="True"/>
|
||||||
|
</Unit4>
|
||||||
|
</Units>
|
||||||
|
<JumpHistory Count="6" HistoryIndex="5">
|
||||||
|
<Position1>
|
||||||
|
<Filename Value="../../Units/MMLAddon/plugins.pas"/>
|
||||||
|
<Caret Line="37" Column="26" TopLine="27"/>
|
||||||
|
</Position1>
|
||||||
|
<Position2>
|
||||||
|
<Filename Value="project1.lpr"/>
|
||||||
|
<Caret Line="69" Column="17" TopLine="40"/>
|
||||||
|
</Position2>
|
||||||
|
<Position3>
|
||||||
|
<Filename Value="project1.lpr"/>
|
||||||
|
<Caret Line="16" Column="93" TopLine="1"/>
|
||||||
|
</Position3>
|
||||||
|
<Position4>
|
||||||
|
<Filename Value="project1.lpr"/>
|
||||||
|
<Caret Line="11" Column="10" TopLine="1"/>
|
||||||
|
</Position4>
|
||||||
|
<Position5>
|
||||||
|
<Filename Value="../../Units/MMLAddon/plugins.pas"/>
|
||||||
|
<Caret Line="37" Column="26" TopLine="6"/>
|
||||||
|
</Position5>
|
||||||
|
<Position6>
|
||||||
|
<Filename Value="project1.lpr"/>
|
||||||
|
<Caret Line="53" Column="3" TopLine="25"/>
|
||||||
|
</Position6>
|
||||||
|
</JumpHistory>
|
||||||
|
</ProjectOptions>
|
||||||
|
<CompilerOptions>
|
||||||
|
<Version Value="10"/>
|
||||||
|
<Target>
|
||||||
|
<Filename Value="project1"/>
|
||||||
|
</Target>
|
||||||
|
<SearchPaths>
|
||||||
|
<IncludeFiles Value="$(ProjOutDir)"/>
|
||||||
|
<OtherUnitFiles Value="../../Units/MMLCore"/>
|
||||||
|
<UnitOutputDirectory Value="lib/$(TargetCPU)-$(TargetOS)"/>
|
||||||
|
</SearchPaths>
|
||||||
|
<Linking>
|
||||||
|
<Options>
|
||||||
|
<PassLinkerOptions Value="True"/>
|
||||||
|
</Options>
|
||||||
|
</Linking>
|
||||||
|
<Other>
|
||||||
|
<CompilerMessages>
|
||||||
|
<UseMsgFile Value="True"/>
|
||||||
|
</CompilerMessages>
|
||||||
|
<CompilerPath Value="$(CompPath)"/>
|
||||||
|
</Other>
|
||||||
|
</CompilerOptions>
|
||||||
|
<Debugging>
|
||||||
|
<Exceptions Count="3">
|
||||||
|
<Item1>
|
||||||
|
<Name Value="EAbort"/>
|
||||||
|
</Item1>
|
||||||
|
<Item2>
|
||||||
|
<Name Value="ECodetoolError"/>
|
||||||
|
</Item2>
|
||||||
|
<Item3>
|
||||||
|
<Name Value="EFOpenError"/>
|
||||||
|
</Item3>
|
||||||
|
</Exceptions>
|
||||||
|
</Debugging>
|
||||||
|
</CONFIG>
|
95
Projects/SMARTLoader/project1.lpr
Normal file
95
Projects/SMARTLoader/project1.lpr
Normal file
@ -0,0 +1,95 @@
|
|||||||
|
program project1;
|
||||||
|
|
||||||
|
{$mode objfpc}{$H+}
|
||||||
|
|
||||||
|
uses
|
||||||
|
{$IFDEF UNIX}{$IFDEF UseCThreads}
|
||||||
|
cthreads,
|
||||||
|
{$ENDIF}{$ENDIF}
|
||||||
|
Classes, SysUtils, CustApp,
|
||||||
|
{ you can add units after this }
|
||||||
|
dynlibs;
|
||||||
|
|
||||||
|
const libSmart = 'smart';
|
||||||
|
|
||||||
|
|
||||||
|
procedure std_setup (ServerURL, SecondParam: PChar; sizeX, sizeY: Integer; SomeStr: PChar); cdecl; external libSmart;
|
||||||
|
|
||||||
|
|
||||||
|
type
|
||||||
|
|
||||||
|
{ TMyApplication }
|
||||||
|
|
||||||
|
TMyApplication = class(TCustomApplication)
|
||||||
|
protected
|
||||||
|
procedure DoRun; override;
|
||||||
|
public
|
||||||
|
constructor Create(TheOwner: TComponent); override;
|
||||||
|
destructor Destroy; override;
|
||||||
|
procedure WriteHelp; virtual;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
procedure LoadSmart;
|
||||||
|
begin
|
||||||
|
std_setup('http://world19.runescape.com/', 'plugin.js?param=o0,a1,m0', 765, 503, 's');
|
||||||
|
end;
|
||||||
|
|
||||||
|
{ TMyApplication }
|
||||||
|
|
||||||
|
procedure TMyApplication.DoRun;
|
||||||
|
var
|
||||||
|
ErrorMsg: String;
|
||||||
|
begin
|
||||||
|
// quick check parameters
|
||||||
|
ErrorMsg:=CheckOptions('h','help');
|
||||||
|
if ErrorMsg<>'' then begin
|
||||||
|
ShowException(Exception.Create(ErrorMsg));
|
||||||
|
Terminate;
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
|
||||||
|
// parse parameters
|
||||||
|
if HasOption('h','help') then begin
|
||||||
|
WriteHelp;
|
||||||
|
Terminate;
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
|
||||||
|
LoadSmart;
|
||||||
|
sleep(100000);
|
||||||
|
|
||||||
|
{ add your program here }
|
||||||
|
|
||||||
|
// stop program loop
|
||||||
|
Terminate;
|
||||||
|
end;
|
||||||
|
|
||||||
|
constructor TMyApplication.Create(TheOwner: TComponent);
|
||||||
|
begin
|
||||||
|
inherited Create(TheOwner);
|
||||||
|
StopOnException:=True;
|
||||||
|
end;
|
||||||
|
|
||||||
|
destructor TMyApplication.Destroy;
|
||||||
|
begin
|
||||||
|
inherited Destroy;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TMyApplication.WriteHelp;
|
||||||
|
begin
|
||||||
|
{ add your help code here }
|
||||||
|
writeln('Usage: ',ExeName,' -h');
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
Application: TMyApplication;
|
||||||
|
|
||||||
|
//{$R *.res}
|
||||||
|
|
||||||
|
begin
|
||||||
|
Application:=TMyApplication.Create(nil);
|
||||||
|
Application.Run;
|
||||||
|
Application.Free;
|
||||||
|
end.
|
||||||
|
|
@ -44,7 +44,7 @@
|
|||||||
<PackageName Value="LCL"/>
|
<PackageName Value="LCL"/>
|
||||||
</Item2>
|
</Item2>
|
||||||
</RequiredPackages>
|
</RequiredPackages>
|
||||||
<Units Count="49">
|
<Units Count="51">
|
||||||
<Unit0>
|
<Unit0>
|
||||||
<Filename Value="Simba.lpr"/>
|
<Filename Value="Simba.lpr"/>
|
||||||
<IsPartOfProject Value="True"/>
|
<IsPartOfProject Value="True"/>
|
||||||
@ -311,6 +311,15 @@
|
|||||||
<ResourceBaseClass Value="Form"/>
|
<ResourceBaseClass Value="Form"/>
|
||||||
<UnitName Value="SimbaSettingsSimple"/>
|
<UnitName Value="SimbaSettingsSimple"/>
|
||||||
</Unit48>
|
</Unit48>
|
||||||
|
<Unit49>
|
||||||
|
<Filename Value="../../Units/MMLCore/tpa.pas"/>
|
||||||
|
<IsPartOfProject Value="True"/>
|
||||||
|
<UnitName Value="tpa"/>
|
||||||
|
</Unit49>
|
||||||
|
<Unit50>
|
||||||
|
<Filename Value="../../Units/MMLAddon/PSInc/psexportedmethods.inc"/>
|
||||||
|
<IsPartOfProject Value="True"/>
|
||||||
|
</Unit50>
|
||||||
</Units>
|
</Units>
|
||||||
</ProjectOptions>
|
</ProjectOptions>
|
||||||
<CompilerOptions>
|
<CompilerOptions>
|
||||||
|
@ -33,7 +33,7 @@ uses
|
|||||||
{$ENDIF}{$ENDIF}
|
{$ENDIF}{$ENDIF}
|
||||||
Interfaces, Forms, SimbaUnit, colourhistory, About, internets, debugimage,
|
Interfaces, Forms, SimbaUnit, colourhistory, About, internets, debugimage,
|
||||||
framefunctionlist, simpleanalyzer, updater, updateform, Simbasettings,
|
framefunctionlist, simpleanalyzer, updater, updateform, Simbasettings,
|
||||||
libloader, mufasabase, v_ideCodeInsight,
|
libloader, mufasabase, tpa, v_ideCodeInsight,
|
||||||
PSDump, v_ideCodeParser,
|
PSDump, v_ideCodeParser,
|
||||||
v_AutoCompleteForm, CastaliaPasLex, CastaliaPasLexTypes, CastaliaSimplePasPar,
|
v_AutoCompleteForm, CastaliaPasLex, CastaliaPasLexTypes, CastaliaSimplePasPar,
|
||||||
CastaliaSimplePasParTypes, dcpbase64, mPasLex, v_Constants, v_MiscFunctions,
|
CastaliaSimplePasParTypes, dcpbase64, mPasLex, v_Constants, v_MiscFunctions,
|
||||||
|
@ -65,6 +65,7 @@ begin
|
|||||||
AboutMemo.Lines.Add(format('You are currently using version: %d',[SimbaUnit.SimbaVersion]));
|
AboutMemo.Lines.Add(format('You are currently using version: %d',[SimbaUnit.SimbaVersion]));
|
||||||
AboutMemo.Lines.Add('');
|
AboutMemo.Lines.Add('');
|
||||||
AboutMemo.Lines.Add('Please report bugs at: http://bugs.villavu.com/');
|
AboutMemo.Lines.Add('Please report bugs at: http://bugs.villavu.com/');
|
||||||
|
AboutMemo.ReadOnly:= True;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TAboutForm.OkButtonClick(Sender: TObject);
|
procedure TAboutForm.OkButtonClick(Sender: TObject);
|
||||||
|
@ -110,6 +110,7 @@ begin
|
|||||||
Width := DispSize.x;
|
Width := DispSize.x;
|
||||||
Height := DispSize.y;
|
Height := DispSize.y;
|
||||||
end;
|
end;
|
||||||
|
FormStyle := fsStayOnTop;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
initialization
|
initialization
|
||||||
|
@ -12,11 +12,11 @@ object FunctionListFrame: TFunctionListFrame
|
|||||||
DesignTop = 200
|
DesignTop = 200
|
||||||
object FunctionList: TTreeView
|
object FunctionList: TTreeView
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 483
|
Height = 479
|
||||||
Top = 18
|
Top = 20
|
||||||
Width = 182
|
Width = 182
|
||||||
Align = alClient
|
Align = alClient
|
||||||
DefaultItemHeight = 15
|
DefaultItemHeight = 17
|
||||||
ReadOnly = True
|
ReadOnly = True
|
||||||
ScrollBars = ssAutoBoth
|
ScrollBars = ssAutoBoth
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
@ -28,16 +28,19 @@ object FunctionListFrame: TFunctionListFrame
|
|||||||
end
|
end
|
||||||
object editSearchList: TEdit
|
object editSearchList: TEdit
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 21
|
Height = 23
|
||||||
Top = 501
|
Hint = 'Search ...'
|
||||||
|
Top = 499
|
||||||
Width = 182
|
Width = 182
|
||||||
Align = alBottom
|
Align = alBottom
|
||||||
OnChange = editSearchListChange
|
OnChange = editSearchListChange
|
||||||
|
ParentShowHint = False
|
||||||
|
ShowHint = True
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
end
|
end
|
||||||
object FunctionListLabel: TLabel
|
object FunctionListLabel: TLabel
|
||||||
Left = 2
|
Left = 2
|
||||||
Height = 14
|
Height = 16
|
||||||
Top = 2
|
Top = 2
|
||||||
Width = 178
|
Width = 178
|
||||||
Align = alTop
|
Align = alTop
|
||||||
@ -55,7 +58,6 @@ object FunctionListFrame: TFunctionListFrame
|
|||||||
Top = 2
|
Top = 2
|
||||||
Width = 16
|
Width = 16
|
||||||
Anchors = [akTop, akRight]
|
Anchors = [akTop, akRight]
|
||||||
Color = clBtnFace
|
|
||||||
Flat = True
|
Flat = True
|
||||||
Glyph.Data = {
|
Glyph.Data = {
|
||||||
36090000424D3609000000000000360000002800000018000000180000000100
|
36090000424D3609000000000000360000002800000018000000180000000100
|
||||||
|
@ -399,7 +399,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
if InitScript then
|
if InitScript then
|
||||||
mDebugLn('Init procedure succesfully called')
|
mDebugLn('Init procedure successfully called')
|
||||||
else
|
else
|
||||||
mDebugLn('Init procedure didn''t execute right, or couldn''t be found');
|
mDebugLn('Init procedure didn''t execute right, or couldn''t be found');
|
||||||
Enabled:= FWorking;
|
Enabled:= FWorking;
|
||||||
|
74
Projects/Simba/settings_const.inc
Normal file
74
Projects/Simba/settings_const.inc
Normal file
@ -0,0 +1,74 @@
|
|||||||
|
ssSettings = 'Settings/';
|
||||||
|
ssLastConfig = 'LastConfig/';
|
||||||
|
|
||||||
|
ssUpdater = 'Updater/';
|
||||||
|
ssFonts = 'Fonts/';
|
||||||
|
ssIncludes = 'Includes/';
|
||||||
|
ssInterpreter = 'Interpreter/';
|
||||||
|
ssTabs = 'Tabs/';
|
||||||
|
ssColourPicker = 'ColourPicker/';
|
||||||
|
ssScripts = 'Scripts/';
|
||||||
|
ssExtensions = 'Extensions/';
|
||||||
|
ssMainForm = 'MainForm/';
|
||||||
|
ssSourceEditor = 'SourceEditor/';
|
||||||
|
ssTray = 'Tray/';
|
||||||
|
ssConsole = 'Console/';
|
||||||
|
ssNews = 'News/';
|
||||||
|
ssPlugins = 'Plugins/';
|
||||||
|
|
||||||
|
ssCheckUpdate = ssSettings + ssUpdater + 'CheckForUpdates';
|
||||||
|
ssCheckUpdateMinutes = ssSettings + ssUpdater + 'CheckEveryXMinutes';
|
||||||
|
ssUpdaterLink = ssSettings + ssUpdater + 'RemoteLink';
|
||||||
|
ssUpdaterVersionLink = ssSettings + ssUpdater + 'RemoteVersionLink';
|
||||||
|
|
||||||
|
|
||||||
|
ssLoadFontsOnStart = ssSettings + ssFonts + 'LoadOnStartUp';
|
||||||
|
ssFontsVersion = ssSettings + ssFonts + 'Version';
|
||||||
|
ssFontsLink = ssSettings + ssFonts + 'UpdateLink';
|
||||||
|
ssFontsVersionLink = ssSettings + ssFonts + 'VersionLink';
|
||||||
|
ssFontsPath = ssSettings + ssFonts + 'Path';
|
||||||
|
|
||||||
|
ssIncludesPath = ssSettings + ssIncludes + 'Path';
|
||||||
|
ssInterpreterType = ssSettings + ssInterpreter + 'Type';
|
||||||
|
|
||||||
|
ssTabsOpenNextOnClose = ssSettings + ssTabs + 'OpenNextOnClose';
|
||||||
|
ssTabsOpenScriptInNewTab = ssSettings + ssTabs + 'OpenScriptInNewTab';
|
||||||
|
ssTabsCheckBeforeOpen = ssSettings + ssTabs + 'CheckTabsBeforeOpen';
|
||||||
|
|
||||||
|
ssColourPickerShowHistoryOnPick = ssSettings + ssColourPicker + 'ShowHistoryOnPick';
|
||||||
|
ssColourPickerAddToHistoryOnPick = ssSettings + ssColourPicker + 'AddToHistoryOnPick';
|
||||||
|
|
||||||
|
|
||||||
|
ssScriptsPath = ssSettings + ssScripts + 'Path';
|
||||||
|
|
||||||
|
ssCodeHintsShowAutomatically = ssSettings + 'CodeHints/ShowAutomatically';
|
||||||
|
ssCodeCompletionShowAutomatically = ssSettings + 'CodeCompletion/ShowAutomatically';
|
||||||
|
|
||||||
|
|
||||||
|
ssSourceEditorLazColors = ssSettings + ssSourceEditor + 'LazColors';
|
||||||
|
ssSourceEditorDefScriptPath = ssSettings + ssSourceEditor + 'DefScriptPath';
|
||||||
|
|
||||||
|
ssNewsLink = ssSettings + ssNews + 'URL';
|
||||||
|
ssPluginsPath = ssSettings + ssPlugins + 'Path';
|
||||||
|
|
||||||
|
ssExtensionsExtensionN = ssExtensions + 'Extension';
|
||||||
|
ssExtensionsPath = ssSettings + ssExtensions + 'Path';
|
||||||
|
ssExtensionsCount = ssExtensions + 'ExtensionCount';
|
||||||
|
ssExtensionsFileExtension = ssSettings + ssExtensions + 'FileExtension';
|
||||||
|
|
||||||
|
ssTrayAlwaysVisible = ssSettings + ssTray + 'AlwaysVisible';
|
||||||
|
|
||||||
|
ssConsoleVisible = ssLastConfig + ssConsole + 'Visible';
|
||||||
|
|
||||||
|
ssMainFormPosition = ssLastConfig + ssMainForm + 'Position';
|
||||||
|
ssMainFormState = ssLastConfig + ssMainForm + 'State';
|
||||||
|
ssMainFormNormalSize = ssSettings + ssMainForm + 'NormalSize';
|
||||||
|
ssFunctionListShown = ssLastConfig + ssMainForm + 'FunctionListShown';
|
||||||
|
|
||||||
|
ssFunctionListShowOnStart = ssSettings + 'FunctionList/ShowOnStart';
|
||||||
|
|
||||||
|
ssMaxRecentFiles = ssSettings + 'General/MaxRecentFiles';
|
||||||
|
ssRecentFiles = ssLastConfig + ssMainForm + 'RecentFiles';
|
||||||
|
ssRecentFilesCount = ssLastConfig + ssMainForm + 'RecentFiles/Count';
|
||||||
|
ssRecentFileN = ssLastConfig + ssMainForm + 'RecentFiles/File';
|
||||||
|
|
@ -62,7 +62,7 @@ uses
|
|||||||
settings, updater;
|
settings, updater;
|
||||||
|
|
||||||
const
|
const
|
||||||
SimbaVersion = 970;
|
SimbaVersion = 972;
|
||||||
|
|
||||||
interp_PS = 0; //PascalScript
|
interp_PS = 0; //PascalScript
|
||||||
interp_RT = 1; //RUTIS
|
interp_RT = 1; //RUTIS
|
||||||
@ -82,6 +82,8 @@ const
|
|||||||
shortcut_PickColourKey = VK_P;
|
shortcut_PickColourKey = VK_P;
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
|
|
||||||
|
{$I settings_const.inc}
|
||||||
|
|
||||||
type
|
type
|
||||||
|
|
||||||
{ TMufasaTab }
|
{ TMufasaTab }
|
||||||
@ -770,7 +772,7 @@ end;
|
|||||||
|
|
||||||
function TSimbaForm.GetInterpreter: Integer;
|
function TSimbaForm.GetInterpreter: Integer;
|
||||||
begin
|
begin
|
||||||
result := StrToIntDef(LoadSettingDef('Settings/Interpreter/Type','0'),0);
|
result := StrToIntDef(LoadSettingDef(ssInterpreterType, '0'),0);
|
||||||
if (result < 0) or (result > 2) then
|
if (result < 0) or (result > 2) then
|
||||||
begin
|
begin
|
||||||
SetInterpreter(0);
|
SetInterpreter(0);
|
||||||
@ -780,12 +782,12 @@ end;
|
|||||||
|
|
||||||
function TSimbaForm.GetDefScriptPath: string;
|
function TSimbaForm.GetDefScriptPath: string;
|
||||||
begin
|
begin
|
||||||
result :=LoadSettingDef('Settings/SourceEditor/DefScriptPath', ExpandFileName(MainDir+DS+'default.simba'));
|
result :=LoadSettingDef(ssSourceEditorDefScriptPath, ExpandFileName(MainDir+DS+'default.simba'));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TSimbaForm.GetScriptPath: string;
|
function TSimbaForm.GetScriptPath: string;
|
||||||
begin
|
begin
|
||||||
result :=IncludeTrailingPathDelimiter(LoadSettingDef('Settings/Scripts/Path', ExpandFileName(MainDir+DS+'Scripts' + DS)));
|
result :=IncludeTrailingPathDelimiter(LoadSettingDef(ssScriptsPath, ExpandFileName(MainDir+DS+'Scripts' + DS)));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TSimbaForm.HandleOpenFileData;
|
procedure TSimbaForm.HandleOpenFileData;
|
||||||
@ -994,7 +996,7 @@ var
|
|||||||
begin
|
begin
|
||||||
UpdateTimer.Interval:= MaxInt;
|
UpdateTimer.Interval:= MaxInt;
|
||||||
FontUpdate;
|
FontUpdate;
|
||||||
chk := LowerCase(LoadSettingDef('Settings/Updater/CheckForUpdates','True'));
|
chk := LowerCase(LoadSettingDef(ssCheckUpdate, 'True'));
|
||||||
|
|
||||||
if chk <> 'true' then
|
if chk <> 'true' then
|
||||||
Exit;
|
Exit;
|
||||||
@ -1010,7 +1012,7 @@ begin
|
|||||||
mDebugLn(format('Current Simba version: %d',[SimbaVersion]));
|
mDebugLn(format('Current Simba version: %d',[SimbaVersion]));
|
||||||
mDebugLn('Latest Simba Version: ' + IntToStr(LatestVersion));
|
mDebugLn('Latest Simba Version: ' + IntToStr(LatestVersion));
|
||||||
end;
|
end;
|
||||||
time := StrToIntDef(LoadSettingDef('Settings/Updater/CheckEveryXMinutes','30'),30);
|
time := StrToIntDef(LoadSettingDef(ssCheckUpdateMinutes, '30'),30);
|
||||||
UpdateTimer.Interval:= time {mins} * 60 {secs} * 1000 {ms};//Every half hour
|
UpdateTimer.Interval:= time {mins} * 60 {secs} * 1000 {ms};//Every half hour
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -1156,7 +1158,7 @@ begin
|
|||||||
OldIndex := PageControl1.TabIndex;
|
OldIndex := PageControl1.TabIndex;
|
||||||
if TabIndex = OldIndex then
|
if TabIndex = OldIndex then
|
||||||
begin;
|
begin;
|
||||||
if lowercase(LoadSettingDef('Settings/Tabs/OpenNextOnClose','False')) = 'false' then
|
if lowercase(LoadSettingDef(ssTabsOpenNextOnClose, 'False')) = 'false' then
|
||||||
OldIndex := LastTab //We are closing the 'current' tab, lets go back in history
|
OldIndex := LastTab //We are closing the 'current' tab, lets go back in history
|
||||||
else
|
else
|
||||||
OldIndex := Min(Tabs.Count - 1,OldIndex + 1);
|
OldIndex := Min(Tabs.Count - 1,OldIndex + 1);
|
||||||
@ -1366,43 +1368,52 @@ procedure TSimbaForm.CreateDefaultEnvironment;
|
|||||||
var
|
var
|
||||||
PluginsPath,extensionsPath : string;
|
PluginsPath,extensionsPath : string;
|
||||||
begin
|
begin
|
||||||
CreateSetting('Settings/Updater/CheckForUpdates','True');
|
CreateSetting(ssCheckUpdate, 'True');
|
||||||
CreateSetting('Settings/Updater/CheckEveryXMinutes','30');
|
CreateSetting(ssCheckUpdateMinutes, '30');
|
||||||
CreateSetting('Settings/Interpreter/Type', '0');
|
CreateSetting(ssInterpreterType, '0');
|
||||||
CreateSetting('Settings/Fonts/LoadOnStartUp', 'True');
|
CreateSetting(ssLoadFontsOnStart, 'True');
|
||||||
CreateSetting('Settings/Fonts/Version','-1');
|
CreateSetting(ssFontsVersion, '-1');
|
||||||
CreateSetting('Settings/Tabs/OpenNextOnClose','False');
|
CreateSetting(ssTabsOpenNextOnClose, 'False');
|
||||||
CreateSetting('Settings/Tabs/OpenScriptInNewTab','True');
|
CreateSetting(ssTabsOpenScriptInNewTab, 'True');
|
||||||
CreateSetting('Settings/Tabs/CheckTabsBeforeOpen','True');
|
CreateSetting(ssTabsCheckBeforeOpen, 'True');
|
||||||
CreateSetting('Settings/ColourPicker/ShowHistoryOnPick', 'True');
|
CreateSetting(ssColourPickerShowHistoryOnPick, 'True');
|
||||||
CreateSetting('Settings/General/MaxRecentFiles','10');
|
CreateSetting(ssMaxRecentFiles, '10');
|
||||||
CreateSetting('Settings/MainForm/NormalSize','739:555');
|
CreateSetting(ssMainFormNormalSize, '739:555');
|
||||||
CreateSetting('Settings/FunctionList/ShowOnStart','True');
|
CreateSetting(ssFunctionListShowOnStart, 'True');
|
||||||
CreateSetting('Settings/CodeHints/ShowAutomatically','True');
|
CreateSetting(ssCodeHintsShowAutomatically, 'True');
|
||||||
CreateSetting('Settings/CodeCompletion/ShowAutomatically','True');
|
CreateSetting(ssCodeCompletionShowAutomatically, 'True');
|
||||||
CreateSetting('Settings/SourceEditor/LazColors','True');
|
CreateSetting(ssSourceEditorLazColors, 'True');
|
||||||
{$IFDEF USE_EXTENSIONS}CreateSetting('Settings/Extensions/FileExtension','sex');{$ENDIF}
|
|
||||||
|
|
||||||
CreateSetting('Settings/Updater/RemoteLink',SimbaURL + 'Simba'{$IFDEF WINDOWS} +'.exe'{$ENDIF});
|
{$IFDEF USE_EXTENSIONS}
|
||||||
CreateSetting('Settings/Updater/RemoteVersionLink',SimbaURL + 'Version');
|
CreateSetting(ssExtensionsFileExtension, 'sex');
|
||||||
CreateSetting('Settings/Fonts/VersionLink', FontURL + 'Version');
|
{$ENDIF}
|
||||||
CreateSetting('Settings/Fonts/UpdateLink', FontURL + 'Fonts.tar.bz2');
|
|
||||||
|
|
||||||
CreateSetting('Settings/News/URL', 'http://simba.villavu.com/bin/news');
|
CreateSetting(ssUpdaterLink, SimbaURL + 'Simba'{$IFDEF WINDOWS} +'.exe'{$ENDIF});
|
||||||
|
CreateSetting(ssUpdaterVersionLink, SimbaURL + 'Version');
|
||||||
|
CreateSetting(ssFontsVersionLink, FontURL + 'Version');
|
||||||
|
CreateSetting(ssFontsLink, FontURL + 'Fonts.tar.bz2');
|
||||||
|
|
||||||
|
CreateSetting(ssNewsLink, 'http://simba.villavu.com/bin/news');
|
||||||
|
|
||||||
{Creates the paths and returns the path}
|
{Creates the paths and returns the path}
|
||||||
PluginsPath := CreateSetting('Settings/Plugins/Path', ExpandFileName(MainDir+ DS+ 'Plugins' + DS));
|
PluginsPath := CreateSetting(ssPluginsPath, ExpandFileName(MainDir + DS + 'Plugins' + DS));
|
||||||
|
|
||||||
{$IFDEF USE_EXTENSIONS}
|
{$IFDEF USE_EXTENSIONS}
|
||||||
extensionsPath := CreateSetting('Settings/Extensions/Path',ExpandFileName(MainDir +DS + 'Extensions' + DS));
|
extensionsPath := CreateSetting(ssExtensionsPath,
|
||||||
CreateSetting('Extensions/ExtensionCount','0');
|
ExpandFileName(MainDir +DS + 'Extensions' + DS));
|
||||||
|
CreateSetting(ssExtensionsCount, '0');
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
CreateSetting('LastConfig/MainForm/Position','');
|
|
||||||
CreateSetting('LastConfig/MainForm/State','Normal');
|
CreateSetting(ssMainFormPosition, '');
|
||||||
|
CreateSetting(ssMainFormState, 'Normal');
|
||||||
|
|
||||||
{$ifdef MSWindows}
|
{$ifdef MSWindows}
|
||||||
CreateSetting('LastConfig/Console/Visible','False');
|
CreateSetting(ssConsoleVisible, 'False');
|
||||||
ShowConsole(False);
|
ShowConsole(False);
|
||||||
{$endif}
|
{$endif}
|
||||||
CreateSetting('Settings/Tray/AlwaysVisible', 'True');
|
|
||||||
|
CreateSetting(ssTrayAlwaysVisible, 'True');
|
||||||
|
|
||||||
if not DirectoryExists(IncludePath) then
|
if not DirectoryExists(IncludePath) then
|
||||||
CreateDir(IncludePath);
|
CreateDir(IncludePath);
|
||||||
if not DirectoryExists(FontPath) then
|
if not DirectoryExists(FontPath) then
|
||||||
@ -1431,7 +1442,7 @@ var
|
|||||||
i,ii : integer;
|
i,ii : integer;
|
||||||
begin
|
begin
|
||||||
self.BeginFormUpdate;
|
self.BeginFormUpdate;
|
||||||
str := LoadSettingDef('LastConfig/MainForm/Position','');
|
str := LoadSettingDef(ssMainFormPosition, '');
|
||||||
if str <> '' then
|
if str <> '' then
|
||||||
begin;
|
begin;
|
||||||
Data := Explode(':',str);
|
Data := Explode(':',str);
|
||||||
@ -1442,36 +1453,38 @@ begin
|
|||||||
Self.Width:= StrToIntDef(Data[2],self.width);
|
Self.Width:= StrToIntDef(Data[2],self.width);
|
||||||
Self.Height:= StrToIntDef(Data[3],self.height);
|
Self.Height:= StrToIntDef(Data[3],self.height);
|
||||||
end;
|
end;
|
||||||
str := lowercase(LoadSettingDef('LastConfig/MainForm/State','Normal'));
|
str := lowercase(LoadSettingDef(ssMainFormState, 'Normal'));
|
||||||
if str = 'maximized' then
|
if str = 'maximized' then
|
||||||
self.windowstate := wsMaximized
|
self.windowstate := wsMaximized
|
||||||
else
|
else
|
||||||
// if str = 'normal' then
|
// if str = 'normal' then
|
||||||
Self.WindowState := wsNormal;
|
Self.WindowState := wsNormal;
|
||||||
if SettingExists('LastConfig/MainForm/RecentFiles/Count') then
|
if SettingExists(ssRecentFilesCount) then
|
||||||
begin;
|
begin;
|
||||||
ii := StrToIntDef(LoadSettingDef('LastConfig/MainForm/RecentFiles/Count','-1'),-1);
|
ii := StrToIntDef(LoadSettingDef(ssRecentFilesCount, '-1'), -1);
|
||||||
for i := 0 to ii do
|
for i := 0 to ii do
|
||||||
begin
|
begin
|
||||||
str := LoadSettingDef('LastConfig/MainForm/RecentFiles/File' + inttostr(I),'');
|
str := LoadSettingDef(ssRecentFileN + inttostr(I),'');
|
||||||
if str <> '' then
|
if str <> '' then
|
||||||
AddRecentFile(str);
|
AddRecentFile(str);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
str := LowerCase(LoadSettingDef('Settings/FunctionList/ShowOnStart','True'));
|
str := LowerCase(LoadSettingDef(ssFunctionListShowOnStart, 'True'));
|
||||||
str2 := lowercase(LoadSettingDef('LastConfig/MainForm/FunctionListShown',''));
|
str2 := lowercase(LoadSettingDef(ssFunctionListShown, ''));
|
||||||
if (str = 'true') or (str2 = 'true') then
|
if (str = 'true') or (str2 = 'true') then
|
||||||
FunctionListShown(True)
|
FunctionListShown(True)
|
||||||
else
|
else
|
||||||
FunctionListShown(false);
|
FunctionListShown(false);
|
||||||
|
|
||||||
{$ifdef MSWindows}
|
{$ifdef MSWindows}
|
||||||
str := LowerCase(LoadSettingDef('LastConfig/Console/Visible','True'));
|
str := LowerCase(LoadSettingDef(ssConsoleVisible, 'True'));
|
||||||
if str = 'true' then
|
if str = 'true' then
|
||||||
ShowConsole(True)
|
ShowConsole(True)
|
||||||
else
|
else
|
||||||
ShowConsole(false);
|
ShowConsole(false);
|
||||||
{$endif}
|
{$endif}
|
||||||
if Lowercase(LoadSettingDef('Settings/Tray/AlwaysVisible', 'True')) <> 'true' then
|
|
||||||
|
if Lowercase(LoadSettingDef(ssTrayAlwaysVisible, 'True')) <> 'true' then
|
||||||
begin
|
begin
|
||||||
MTrayIcon.Hide;
|
MTrayIcon.Hide;
|
||||||
writeln('Hiding tray.');
|
writeln('Hiding tray.');
|
||||||
@ -1490,36 +1503,36 @@ begin
|
|||||||
with SettingsForm.Settings do
|
with SettingsForm.Settings do
|
||||||
begin
|
begin
|
||||||
if Self.WindowState = wsMaximized then
|
if Self.WindowState = wsMaximized then
|
||||||
SetSetting('LastConfig/MainForm/State','maximized')
|
SetSetting(ssMainFormState, 'maximized')
|
||||||
else
|
else
|
||||||
begin; //Only save the form position if its not maximized.
|
begin; //Only save the form position if its not maximized.
|
||||||
SetSetting('LastConfig/MainForm/State','normal');
|
SetSetting(ssMainFormState, 'normal');
|
||||||
Data := ConvArr([inttostr(Self.left),inttostr(self.top),inttostr(self.width),inttostr(self.height)]);
|
Data := ConvArr([inttostr(Self.left),inttostr(self.top),inttostr(self.width),inttostr(self.height)]);
|
||||||
SetSetting('LastConfig/MainForm/Position', Implode(':',Data ));
|
SetSetting(ssMainFormPosition, Implode(':',Data ));
|
||||||
end;
|
end;
|
||||||
DeleteKey('LastConfig/MainForm/RecentFiles');
|
DeleteKey(ssRecentFiles);
|
||||||
if RecentFiles.Count > 0 then
|
if RecentFiles.Count > 0 then
|
||||||
begin
|
begin
|
||||||
SetSetting('LastConfig/MainForm/RecentFiles/Count',inttostr(RecentFiles.Count));
|
SetSetting(ssRecentFiles + '/Count', inttostr(RecentFiles.Count));
|
||||||
SetLength(data,RecentFiles.Count);
|
SetLength(data,RecentFiles.Count);
|
||||||
for i := 0 to RecentFiles.Count - 1 do
|
for i := 0 to RecentFiles.Count - 1 do
|
||||||
SetSetting('LastConfig/MainForm/RecentFiles/File'+inttostr(i),RecentFiles[i]);
|
SetSetting(ssRecentFileN + inttostr(i),RecentFiles[i]);
|
||||||
end;
|
end;
|
||||||
if MenuItemFunctionList.Checked then
|
if MenuItemFunctionList.Checked then
|
||||||
SetSetting('LastConfig/MainForm/FunctionListShown','True')
|
SetSetting(ssFunctionListShown, 'True')
|
||||||
else
|
else
|
||||||
SetSetting('LastConfig/MainForm/FunctionListShown','False');
|
SetSetting(ssFunctionListShown, 'False');
|
||||||
{$ifdef MSWindows}
|
{$ifdef MSWindows}
|
||||||
if ConsoleVisible then
|
if ConsoleVisible then
|
||||||
SetSetting('LastConfig/Console/Visible','True')
|
SetSetting(ssConsoleVisible, 'True')
|
||||||
else
|
else
|
||||||
SetSetting('LastConfig/Console/Visible','False');
|
SetSetting(ssConsoleVisible, 'False');
|
||||||
{$endif}
|
{$endif}
|
||||||
{$IFDEF USE_EXTENSIONS}
|
{$IFDEF USE_EXTENSIONS}
|
||||||
SetSetting('Extensions/ExtensionCount',inttostr(ExtManager.Extensions.Count));
|
SetSetting(ssExtensionsCount, inttostr(ExtManager.Extensions.Count));
|
||||||
for i := 0 to ExtManager.Extensions.Count-1 do
|
for i := 0 to ExtManager.Extensions.Count-1 do
|
||||||
begin;
|
begin;
|
||||||
path :='Extensions/Extension' + inttostr(I);
|
path := ssExtensionsExtensionN + inttostr(I);
|
||||||
SetSetting(Path + '/Path',TVirtualSimbaExtension(ExtManager.Extensions[i]).Filename);
|
SetSetting(Path + '/Path',TVirtualSimbaExtension(ExtManager.Extensions[i]).Filename);
|
||||||
SetSetting(Path + '/Enabled',BoolToStr(TVirtualSimbaExtension(ExtManager.Extensions[i]).Enabled,True));
|
SetSetting(Path + '/Enabled',BoolToStr(TVirtualSimbaExtension(ExtManager.Extensions[i]).Enabled,True));
|
||||||
end;
|
end;
|
||||||
@ -1541,7 +1554,7 @@ var
|
|||||||
result := false;
|
result := false;
|
||||||
if (number < 0) or (number >= extCount) then
|
if (number < 0) or (number >= extCount) then
|
||||||
exit;
|
exit;
|
||||||
path := 'Extensions/Extension' + inttostr(number);
|
path := ssExtensionsExtensionN + inttostr(number);
|
||||||
if SettingExists(Path) = false then
|
if SettingExists(Path) = false then
|
||||||
exit;
|
exit;
|
||||||
ExtPath := LoadSettingDef(Path + '/Path','');
|
ExtPath := LoadSettingDef(Path + '/Path','');
|
||||||
@ -1557,11 +1570,11 @@ var
|
|||||||
i : integer;
|
i : integer;
|
||||||
path : string;
|
path : string;
|
||||||
begin;
|
begin;
|
||||||
path := 'Extensions/Extension';
|
path := ssExtensionsExtensionN;
|
||||||
SettingsForm.Settings.DeleteKey(path + inttostr(number));
|
SettingsForm.Settings.DeleteKey(path + inttostr(number));
|
||||||
for i := number + 1 to extCount - 1 do
|
for i := number + 1 to extCount - 1 do
|
||||||
SettingsForm.Settings.RenameKey(path + inttostr(i),'Extension' + inttostr(i-1));
|
SettingsForm.Settings.RenameKey(path + inttostr(i),'Extension' + inttostr(i-1));
|
||||||
SetSetting('Extensions/ExtensionCount',inttostr(extCount - 1),true);
|
SetSetting(ssExtensionsCount, inttostr(extCount - 1),true);
|
||||||
dec(extCount);
|
dec(extCount);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -1569,13 +1582,13 @@ var
|
|||||||
str,str2 : string;
|
str,str2 : string;
|
||||||
i : integer;
|
i : integer;
|
||||||
begin
|
begin
|
||||||
extCount := StrToIntDef(LoadSettingDef('Extensions/ExtensionCount/','0'),0);
|
extCount := StrToIntDef(LoadSettingDef(ssExtensionsCount, '0'),0);
|
||||||
for i := 0 to extCount - 1 do
|
for i := 0 to extCount - 1 do
|
||||||
while (i < extCount) and not LoadExtension(i) do
|
while (i < extCount) and not LoadExtension(i) do
|
||||||
DeleteExtension(i);
|
DeleteExtension(i);
|
||||||
SetSetting('Extensions/ExtensionCount',inttostr(extCount));
|
SetSetting(ssExtensionsCount, inttostr(extCount));
|
||||||
str := LoadSettingDef('Settings/Extensions/Path',ExpandFileName(MainDir +DS + 'Extensions' + DS));
|
str := LoadSettingDef(ssExtensionsPath, ExpandFileName(MainDir +DS + 'Extensions' + DS));
|
||||||
str2 := LoadSettingDef('Settings/Extensions/FileExtension','sex');
|
str2 := LoadSettingDef(ssExtensionsFileExtension, 'sex');
|
||||||
ExtManager.LoadPSExtensionsDir(str,str2);
|
ExtManager.LoadPSExtensionsDir(str,str2);
|
||||||
{$ELSE}
|
{$ELSE}
|
||||||
begin
|
begin
|
||||||
@ -1587,7 +1600,7 @@ var
|
|||||||
MaxRecentFiles : integer;
|
MaxRecentFiles : integer;
|
||||||
Len,i : integer;
|
Len,i : integer;
|
||||||
begin
|
begin
|
||||||
MaxRecentFiles:= StrToIntDef(LoadSettingDef('Settings/General/MaxRecentFiles','10'),10);
|
MaxRecentFiles:= StrToIntDef(LoadSettingDef(ssMaxRecentFiles, '10'), 10);
|
||||||
i := RecentFiles.IndexOf(filename);
|
i := RecentFiles.IndexOf(filename);
|
||||||
if i <> -1 then
|
if i <> -1 then
|
||||||
RecentFiles.Delete(i);
|
RecentFiles.Delete(i);
|
||||||
@ -1676,7 +1689,7 @@ begin
|
|||||||
if selector.haspicked then
|
if selector.haspicked then
|
||||||
Thread.Client.IOManager.SetTarget(Selector.LastPick);
|
Thread.Client.IOManager.SetTarget(Selector.LastPick);
|
||||||
|
|
||||||
loadFontsOnScriptStart := (lowercase(LoadSettingDef('Settings/Fonts/LoadOnStartUp', 'True')) = 'true');
|
loadFontsOnScriptStart := (lowercase(LoadSettingDef(ssLoadFontsOnStart, 'True')) = 'true');
|
||||||
|
|
||||||
if (loadFontsOnScriptStart) then
|
if (loadFontsOnScriptStart) then
|
||||||
begin
|
begin
|
||||||
@ -1932,12 +1945,12 @@ var
|
|||||||
SizeStr : string;
|
SizeStr : string;
|
||||||
Data : TStringArray;
|
Data : TStringArray;
|
||||||
begin
|
begin
|
||||||
SizeStr := LoadSettingDef('Settings/MainForm/NormalSize','739:555');
|
SizeStr := LoadSettingDef(ssMainFormNormalSize, '739:555');
|
||||||
Data := Explode(':',SizeStr);
|
Data := Explode(':',SizeStr);
|
||||||
if length(Data) = 2 then
|
if length(Data) = 2 then
|
||||||
begin
|
begin
|
||||||
Self.Width:= StrToIntDef(Data[0],739);
|
Self.Width:= StrToIntDef(Data[0], 739);
|
||||||
Self.Height:= StrToIntDef(Data[1],555);
|
Self.Height:= StrToIntDef(Data[1], 555);
|
||||||
end else
|
end else
|
||||||
begin;
|
begin;
|
||||||
self.width := 739;
|
self.width := 739;
|
||||||
@ -2822,7 +2835,7 @@ end;
|
|||||||
procedure TSimbaForm.MTrayIconClick(Sender: TObject);
|
procedure TSimbaForm.MTrayIconClick(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
self.Show;
|
self.Show;
|
||||||
if Lowercase(LoadSettingDef('Settings/Tray/AlwaysVisible', 'True')) <> 'true' then
|
if Lowercase(LoadSettingDef(ssTrayAlwaysVisible, 'True')) <> 'true' then
|
||||||
MTrayIcon.Hide;
|
MTrayIcon.Hide;
|
||||||
if Self.CanFocus then
|
if Self.CanFocus then
|
||||||
self.SetFocus;
|
self.SetFocus;
|
||||||
@ -2832,7 +2845,7 @@ function TSimbaForm.GetSimbaNews: String;
|
|||||||
var
|
var
|
||||||
t: TDownloadThread;
|
t: TDownloadThread;
|
||||||
begin
|
begin
|
||||||
t := TDownloadThread.Create(LoadSettingDef('Settings/News/URL', 'http://Simba.villavu.com/bin/news'),
|
t := TDownloadThread.Create(LoadSettingDef(ssNewsLink, 'http://Simba.villavu.com/bin/news'),
|
||||||
@Result);
|
@Result);
|
||||||
t.Resume;
|
t.Resume;
|
||||||
while not t.done do
|
while not t.done do
|
||||||
@ -2844,13 +2857,13 @@ end;
|
|||||||
|
|
||||||
procedure TSimbaForm.SetDefScriptPath(const AValue: string);
|
procedure TSimbaForm.SetDefScriptPath(const AValue: string);
|
||||||
begin
|
begin
|
||||||
SetSetting('Settings/SourceEditor/DefScriptPath',AValue,True);
|
SetSetting(ssSourceEditorDefScriptPath, AValue,True);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{$IFDEF USE_EXTENSIONS}
|
{$IFDEF USE_EXTENSIONS}
|
||||||
procedure TSimbaForm.SetExtPath(const AValue: string);
|
procedure TSimbaForm.SetExtPath(const AValue: string);
|
||||||
begin
|
begin
|
||||||
SetSetting('Settings/Extensions/Path',AValue,true);
|
SetSetting(ssExtensionsPath, AValue,true);
|
||||||
end;
|
end;
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
|
|
||||||
@ -2891,10 +2904,10 @@ begin
|
|||||||
cobj := TColourPickerObject.Create(c, Classes.Point(x,y), '');
|
cobj := TColourPickerObject.Create(c, Classes.Point(x,y), '');
|
||||||
|
|
||||||
{ TODO: This should be no problem if the form is hidden? }
|
{ TODO: This should be no problem if the form is hidden? }
|
||||||
if lowercase(LoadSettingDef('Settings/ColourPicker/AddToHistoryOnPick', 'True')) = 'true' then
|
if lowercase(LoadSettingDef(ssColourPickerAddToHistoryOnPick, 'True')) = 'true' then
|
||||||
ColourHistoryForm.AddColObj(cobj, true);
|
ColourHistoryForm.AddColObj(cobj, true);
|
||||||
|
|
||||||
if lowercase(LoadSettingDef('Settings/ColourPicker/ShowHistoryOnPick', 'True')) = 'true' then
|
if lowercase(LoadSettingDef(ssColourPickerShowHistoryOnPick, 'True')) = 'true' then
|
||||||
ColourHistoryForm.Show;
|
ColourHistoryForm.Show;
|
||||||
|
|
||||||
FormWritelnEx('Picked colour: ' + inttostr(c) + ' at (' + inttostr(x) + ', ' + inttostr(y) + ')');
|
FormWritelnEx('Picked colour: ' + inttostr(c) + ' at (' + inttostr(x) + ', ' + inttostr(y) + ')');
|
||||||
@ -3014,34 +3027,34 @@ end;
|
|||||||
|
|
||||||
function TSimbaForm.GetShowParamHintAuto: boolean;
|
function TSimbaForm.GetShowParamHintAuto: boolean;
|
||||||
begin
|
begin
|
||||||
Result := LowerCase(LoadSettingDef('Settings/CodeHints/ShowAutomatically','True')) = 'true';
|
Result := LowerCase(LoadSettingDef(ssCodeHintsShowAutomatically, 'True')) = 'true';
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TSimbaForm.GetShowCodeCompletionAuto: boolean;
|
function TSimbaForm.GetShowCodeCompletionAuto: boolean;
|
||||||
begin
|
begin
|
||||||
Result := LowerCase(LoadSettingDef('Settings/CodeCompletion/ShowAutomatically','True')) = 'true';
|
Result := LowerCase(LoadSettingDef(ssCodeCompletionShowAutomatically, 'True')) = 'true';
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TSimbaForm.SetFontPath(const AValue: String);
|
procedure TSimbaForm.SetFontPath(const AValue: String);
|
||||||
begin
|
begin
|
||||||
SetSetting('Settings/Fonts/Path',AValue,true);
|
SetSetting(ssFontsPath, AValue,true);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TSimbaForm.GetFontPath: String;
|
function TSimbaForm.GetFontPath: String;
|
||||||
begin
|
begin
|
||||||
Result := IncludeTrailingPathDelimiter(LoadSettingDef('Settings/Fonts/Path', ExpandFileName(MainDir+DS+'Fonts' + DS)));
|
Result := IncludeTrailingPathDelimiter(LoadSettingDef(ssFontsPath, ExpandFileName(MainDir+DS+'Fonts' + DS)));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{$IFDEF USE_EXTENSIONS}
|
{$IFDEF USE_EXTENSIONS}
|
||||||
function TSimbaForm.GetExtPath: string;
|
function TSimbaForm.GetExtPath: string;
|
||||||
begin
|
begin
|
||||||
Result := IncludeTrailingPathDelimiter(LoadSettingDef('Settings/Extensions/Path', ExpandFileName(MainDir+DS+'Extensions' + DS)));
|
Result := IncludeTrailingPathDelimiter(LoadSettingDef(ssExtensionsPath, ExpandFileName(MainDir+DS+'Extensions' + DS)));
|
||||||
end;
|
end;
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
|
|
||||||
function TSimbaForm.GetHighlighter: TSynCustomHighlighter;
|
function TSimbaForm.GetHighlighter: TSynCustomHighlighter;
|
||||||
begin
|
begin
|
||||||
if lowercase(LoadSettingDef('Settings/SourceEditor/LazColors','True')) = 'true' then
|
if lowercase(LoadSettingDef(ssSourceEditorLazColors, 'True')) = 'true' then
|
||||||
result := LazHighlighter
|
result := LazHighlighter
|
||||||
else
|
else
|
||||||
result := SCARHighlighter;
|
result := SCARHighlighter;
|
||||||
@ -3049,17 +3062,17 @@ end;
|
|||||||
|
|
||||||
function TSimbaForm.GetIncludePath: String;
|
function TSimbaForm.GetIncludePath: String;
|
||||||
begin
|
begin
|
||||||
Result := IncludeTrailingPathDelimiter(LoadSettingDef('Settings/Includes/Path', ExpandFileName(MainDir+DS+'Includes' + DS)));
|
Result := IncludeTrailingPathDelimiter(LoadSettingDef(ssIncludesPath, ExpandFileName(MainDir+DS+'Includes' + DS)));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TSimbaForm.GetPluginPath: string;
|
function TSimbaForm.GetPluginPath: string;
|
||||||
begin
|
begin
|
||||||
Result := IncludeTrailingPathDelimiter(LoadSettingDef('Settings/Plugins/Path', ExpandFileName(MainDir+DS+'Plugins' + DS)));
|
Result := IncludeTrailingPathDelimiter(LoadSettingDef(ssPluginsPath, ExpandFileName(MainDir+DS+'Plugins' + DS)));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TSimbaForm.SetIncludePath(const AValue: String);
|
procedure TSimbaForm.SetIncludePath(const AValue: String);
|
||||||
begin
|
begin
|
||||||
SetSetting('Settings/Includes/Path',AValue,true);
|
SetSetting(ssIncludesPath, AValue,true);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TSimbaForm.SetInterpreter(const AValue: Integer);
|
procedure TSimbaForm.SetInterpreter(const AValue: Integer);
|
||||||
@ -3071,7 +3084,7 @@ begin
|
|||||||
with CurrScript.Synedit do
|
with CurrScript.Synedit do
|
||||||
if (Lines.text = DefaultScript) and not(CanUndo or CanRedo) then
|
if (Lines.text = DefaultScript) and not(CanUndo or CanRedo) then
|
||||||
UpdateCurrScript := true;
|
UpdateCurrScript := true;
|
||||||
SetSetting('Settings/Interpreter/Type',Inttostr(AValue),true);
|
SetSetting(ssInterpreterType, Inttostr(AValue),true);
|
||||||
UpdateInterpreter;
|
UpdateInterpreter;
|
||||||
if UpdateCurrScript then
|
if UpdateCurrScript then
|
||||||
CurrScript.SynEdit.Lines.text := DefaultScript;
|
CurrScript.SynEdit.Lines.text := DefaultScript;
|
||||||
@ -3079,12 +3092,12 @@ end;
|
|||||||
|
|
||||||
procedure TSimbaForm.SetPluginPath(const AValue: string);
|
procedure TSimbaForm.SetPluginPath(const AValue: string);
|
||||||
begin
|
begin
|
||||||
SetSetting('Settings/Plugins/Path',AValue,true);
|
SetSetting(ssPluginsPath, AValue,true);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TSimbaForm.SetScriptPath(const AValue: string);
|
procedure TSimbaForm.SetScriptPath(const AValue: string);
|
||||||
begin
|
begin
|
||||||
SetSetting('Settings/Scripts/Path',AValue,True);
|
SetSetting(ssScriptsPath, AValue,True);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TSimbaForm.SetScriptState(const State: TScriptState);
|
procedure TSimbaForm.SetScriptState(const State: TScriptState);
|
||||||
@ -3157,12 +3170,12 @@ begin
|
|||||||
if UpdatingFonts then
|
if UpdatingFonts then
|
||||||
exit;
|
exit;
|
||||||
UpdatingFonts := True;
|
UpdatingFonts := True;
|
||||||
CurrVersion := StrToIntDef(LoadSettingDef('Settings/Fonts/Version','-1'),-1);
|
CurrVersion := StrToIntDef(LoadSettingDef(ssFontsVersion, '-1'), -1);
|
||||||
LatestVersion := SimbaUpdateForm.GetLatestFontVersion;
|
LatestVersion := SimbaUpdateForm.GetLatestFontVersion;
|
||||||
if LatestVersion > CurrVersion then
|
if LatestVersion > CurrVersion then
|
||||||
begin;
|
begin;
|
||||||
formWriteln(format('New fonts available. Current version: %d. Latest version: %d',[CurrVersion,LatestVersion]));
|
formWriteln(format('New fonts available. Current version: %d. Latest version: %d',[CurrVersion,LatestVersion]));
|
||||||
FontDownload := TDownloadThread.Create(LoadSettingDef('Settings/Fonts/UpdateLink',FontURL + 'Fonts.tar.bz2'),
|
FontDownload := TDownloadThread.Create(LoadSettingDef(ssFontsLink, FontURL + 'Fonts.tar.bz2'),
|
||||||
@Fonts);
|
@Fonts);
|
||||||
FontDownload.resume;
|
FontDownload.resume;
|
||||||
while FontDownload.Done = false do
|
while FontDownload.Done = false do
|
||||||
@ -3182,8 +3195,8 @@ begin
|
|||||||
Idler;
|
Idler;
|
||||||
if UnTarrer.Result then
|
if UnTarrer.Result then
|
||||||
begin;
|
begin;
|
||||||
FormWriteln('Succesfully installed the new fonts!');
|
FormWriteln('Successfully installed the new fonts!');
|
||||||
SetSetting('Settings/Fonts/Version',IntToStr(LatestVersion),true);
|
SetSetting(ssFontsVersion, IntToStr(LatestVersion),true);
|
||||||
if Assigned(self.OCR_Fonts) then
|
if Assigned(self.OCR_Fonts) then
|
||||||
self.OCR_Fonts.Free;
|
self.OCR_Fonts.Free;
|
||||||
FormWriteln('Freeing the current fonts. Creating new ones now');
|
FormWriteln('Freeing the current fonts. Creating new ones now');
|
||||||
@ -3212,12 +3225,12 @@ end;
|
|||||||
|
|
||||||
procedure TSimbaForm.SetShowParamHintAuto(const AValue: boolean);
|
procedure TSimbaForm.SetShowParamHintAuto(const AValue: boolean);
|
||||||
begin
|
begin
|
||||||
SetSetting('Settings/CodeHints/ShowAutomatically', Booltostr(AValue,true));
|
SetSetting(ssCodeHintsShowAutomatically, Booltostr(AValue,true));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TSimbaForm.SetShowCodeCompletionAuto(const AValue: boolean);
|
procedure TSimbaForm.SetShowCodeCompletionAuto(const AValue: boolean);
|
||||||
begin
|
begin
|
||||||
SetSetting('Settings/CodeCompletion/ShowAutomatically', Booltostr(AValue,true));
|
SetSetting(ssCodeCompletionShowAutomatically, Booltostr(AValue,true));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{$ifdef mswindows}
|
{$ifdef mswindows}
|
||||||
@ -3345,7 +3358,7 @@ var
|
|||||||
OpenInNewTab : boolean;
|
OpenInNewTab : boolean;
|
||||||
begin
|
begin
|
||||||
Result := False;
|
Result := False;
|
||||||
OpenInNewTab:= (LowerCase(LoadSettingDef('Settings/Tabs/OpenScriptInNewTab','True')) = 'true');
|
OpenInNewTab:= (LowerCase(LoadSettingDef(ssTabsOpenScriptInNewTab, 'True')) = 'true');
|
||||||
if not OpenInNewTab then
|
if not OpenInNewTab then
|
||||||
if CanExitOrOpen = false then
|
if CanExitOrOpen = false then
|
||||||
Exit;
|
Exit;
|
||||||
@ -3357,7 +3370,7 @@ begin
|
|||||||
InitialDir := ScriptDir;
|
InitialDir := ScriptDir;
|
||||||
Options := [ofAllowMultiSelect, ofExtensionDifferent, ofPathMustExist, ofFileMustExist, ofEnableSizing, ofViewDetail];
|
Options := [ofAllowMultiSelect, ofExtensionDifferent, ofPathMustExist, ofFileMustExist, ofEnableSizing, ofViewDetail];
|
||||||
Filter:= 'Simba Files|*.simba;*.simb;*.cogat;*.mufa;*.txt' +
|
Filter:= 'Simba Files|*.simba;*.simb;*.cogat;*.mufa;*.txt' +
|
||||||
{$IFDEF USE_EXTENSIONS}';*.' + LoadSettingDef('Settings/Extensions/FileExtension', 'sex') + {$ENDIF}
|
{$IFDEF USE_EXTENSIONS}';*.' + LoadSettingDef(ssExtensionsFileExtension, 'sex') + {$ENDIF}
|
||||||
'|Any files|*.*';
|
'|Any files|*.*';
|
||||||
if Execute then
|
if Execute then
|
||||||
begin
|
begin
|
||||||
@ -3386,11 +3399,11 @@ begin
|
|||||||
if AlwaysOpenInNewTab then
|
if AlwaysOpenInNewTab then
|
||||||
OpenInNewTab := true
|
OpenInNewTab := true
|
||||||
else
|
else
|
||||||
OpenInNewTab:= (LowerCase(LoadSettingDef('Settings/Tabs/OpenScriptInNewTab','True')) = 'true');
|
OpenInNewTab:= (LowerCase(LoadSettingDef(ssTabsOpenScriptInNewTab,'True')) = 'true');
|
||||||
if CheckOtherTabs then
|
if CheckOtherTabs then
|
||||||
CheckTabsFirst := True
|
CheckTabsFirst := True
|
||||||
else
|
else
|
||||||
CheckTabsFirst := (Lowercase(LoadSettingDef('Settings/Tabs/CheckTabsBeforeOpen','True')) = 'true');
|
CheckTabsFirst := (Lowercase(LoadSettingDef(ssTabsCheckBeforeOpen, 'True')) = 'true');
|
||||||
if FileExistsUTF8(FileName) then
|
if FileExistsUTF8(FileName) then
|
||||||
begin;
|
begin;
|
||||||
if CheckTabsFirst then
|
if CheckTabsFirst then
|
||||||
@ -3465,7 +3478,7 @@ begin
|
|||||||
else
|
else
|
||||||
InitialDir := ScriptDir;
|
InitialDir := ScriptDir;
|
||||||
filter := 'Simba Files|*.simba;*.simb;*.cogat;*.mufa;*.txt' +
|
filter := 'Simba Files|*.simba;*.simb;*.cogat;*.mufa;*.txt' +
|
||||||
{$IFDEF USE_EXTENSIONS}';*.' + LoadSettingDef('Settings/Extensions/FileExtension','sex') + {$ENDIF}
|
{$IFDEF USE_EXTENSIONS}';*.' + LoadSettingDef(ssExtensionsFileExtension, 'sex') + {$ENDIF}
|
||||||
'|Any files|*.*';
|
'|Any files|*.*';
|
||||||
if Execute then
|
if Execute then
|
||||||
begin;
|
begin;
|
||||||
|
@ -241,7 +241,8 @@ begin
|
|||||||
FCancelling := False;
|
FCancelling := False;
|
||||||
FCancelled := True;
|
FCancelled := True;
|
||||||
DownloadSpeed.Visible := false;
|
DownloadSpeed.Visible := false;
|
||||||
Self.UpdateLog.Lines.Add('Download stopped at '+inttostr(DownloadProgress.Position)+'%... Simba did not succesfully update.');
|
Self.UpdateLog.Lines.Add('Download stopped at '+inttostr(DownloadProgress.Position)+
|
||||||
|
'%... Simba did not successfully update.');
|
||||||
// more detailed info
|
// more detailed info
|
||||||
mDebugLn('EXCEPTION IN UPDATEFORM: We either hit Cancel, or something went wrong with files');
|
mDebugLn('EXCEPTION IN UPDATEFORM: We either hit Cancel, or something went wrong with files');
|
||||||
if FileExists(Updater.BasePath + Updater.ReplacementFile + '_') then
|
if FileExists(Updater.BasePath + Updater.ReplacementFile + '_') then
|
||||||
@ -251,7 +252,8 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
FDone := True;
|
FDone := True;
|
||||||
Self.UpdateButton.Caption := 'Update!';
|
Self.UpdateButton.Caption := 'Updated!';
|
||||||
|
Self.UpdateButton.Enabled := False;
|
||||||
Self.CloseButton.Enabled := true;
|
Self.CloseButton.Enabled := true;
|
||||||
FUpdating:= false;
|
FUpdating:= false;
|
||||||
end;
|
end;
|
||||||
|
39
TODO
39
TODO
@ -3,31 +3,24 @@ Simple stuff, not required, may not be possible/useful:
|
|||||||
- Coloured writeln [ ]
|
- Coloured writeln [ ]
|
||||||
- Make an TAction for the Colour Picker. [ ]
|
- Make an TAction for the Colour Picker. [ ]
|
||||||
- Portable install (needs fiddling with settings and such) [ ]
|
- Portable install (needs fiddling with settings and such) [ ]
|
||||||
|
- Settings rewrite [ ]
|
||||||
- --no-extensions flag for Simba. [ ]
|
- --no-extensions flag for Simba. [ ]
|
||||||
|
|
||||||
|
- CTS/finder speedups and changes [X]
|
||||||
|
|
||||||
- CTS/finder speedups and changes [ ]
|
|
||||||
General ideas:
|
|
||||||
- everything subprocedure (lots of code)
|
|
||||||
|
|
||||||
- jit + comparison function (per cts) generated, call in loop
|
|
||||||
|
|
||||||
- comparison function (per cts), not generated, call in loop
|
|
||||||
|
|
||||||
- JIT (Generate comparison functions) [ ]
|
|
||||||
- Comparison functions for HSL/XYZ/L*a*b should check for
|
- Comparison functions for HSL/XYZ/L*a*b should check for
|
||||||
match on each component before calculating the next.
|
match on each component before calculating the next.
|
||||||
(see FindColorsToleranceOptimised)
|
(see FindColorsToleranceOptimised)
|
||||||
|
|
||||||
- Pass color information in struct [ ]
|
- Pass color information in struct [X]
|
||||||
- Precalculate screen bitmap in current cts / keep a cache
|
- Precalculate screen bitmap in current cts / keep a cache
|
||||||
to save comparisons [ ]
|
to save comparisons [X]
|
||||||
- Add CTS 3 [ ]
|
- Add CTS 3 [/]
|
||||||
- Add a direct RGB -> CIE L*a*b conversion [ ]
|
- Add a direct RGB -> CIE L*a*b conversion [/]
|
||||||
- Make sure colour conversions are inline [ ]
|
|
||||||
|
|
||||||
- More documentation:
|
- More documentation:
|
||||||
- Cover all functions by at least mentioning the definition [ ]
|
- Cover all functions by at least mentioning the definition [/]
|
||||||
|
- Imported functions as well?
|
||||||
- Write tutorial [ ]
|
- Write tutorial [ ]
|
||||||
- In depth documentation per function [ ]
|
- In depth documentation per function [ ]
|
||||||
|
|
||||||
@ -36,17 +29,17 @@ Simple stuff, not required, may not be possible/useful:
|
|||||||
- Lape! [ ]
|
- Lape! [ ]
|
||||||
|
|
||||||
- Integrate script manager [ ]
|
- Integrate script manager [ ]
|
||||||
- Basic support. (Install scripts) [ ]
|
- Basic support. (Install scripts) [X]
|
||||||
- Update functionality [ ]
|
- Update functionality [X]
|
||||||
- Uninstall scripts [ ]
|
- Uninstall scripts [X]
|
||||||
- Better storage / more stable storage [ ]
|
- Better storage / more stable storage [?]
|
||||||
- Pretty GUI [ ]
|
- Pretty GUI [/]
|
||||||
- Merging / storing usernames when updating [ ]
|
- Merging / storing usernames when updating [?]
|
||||||
|
|
||||||
- Make Simba more ``modular'':
|
- Make Simba more ``modular'':
|
||||||
- Fonts [ ]
|
- Fonts [ ]
|
||||||
- Interpreters [ ]
|
- Interpreters [/]
|
||||||
- Code completion/hints [ ]
|
- Code completion/hints [ ]
|
||||||
- Extensions [ ]
|
- Extensions [X]
|
||||||
- Interpreter system overhaul? [ ]
|
- Interpreter system overhaul? [ ]
|
||||||
|
|
||||||
|
34
Tests/PS/bmpbench.simba
Normal file
34
Tests/PS/bmpbench.simba
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
program new;
|
||||||
|
//http://farm4.static.flickr.com/3067/2612399892_7df428d482.jpg
|
||||||
|
{Make the above bitmap your target}
|
||||||
|
var
|
||||||
|
Bmp : integer;
|
||||||
|
x,y : integer;
|
||||||
|
w,h : integer;
|
||||||
|
t, i, c: integer;
|
||||||
|
begin
|
||||||
|
Bmp := createBitmap(15, 10);
|
||||||
|
FastDrawClear(bmp, clRed);
|
||||||
|
GetClientDimensions(w,h);
|
||||||
|
writeln(w);
|
||||||
|
writeln(h);
|
||||||
|
|
||||||
|
for c := 0 to 2 do
|
||||||
|
begin
|
||||||
|
writeln('cts: ' + inttostr(c));
|
||||||
|
setcolortolerancespeed(c);
|
||||||
|
|
||||||
|
t:=getsystemtime;
|
||||||
|
for i := 0 to 100 do
|
||||||
|
findBitmapToleranceIn(bmp,x,y,0,0,w-1,h-1,10);
|
||||||
|
writeln((getsystemtime-t) / 100.0);
|
||||||
|
if findBitmapToleranceIn(bmp,x,y,0,0,w-1,h-1,200) then
|
||||||
|
writeln('found');
|
||||||
|
end;
|
||||||
|
|
||||||
|
{if FindBitmapToleranceIn(bmp,x,y,0,0,w-1,h-1,300) then
|
||||||
|
begin
|
||||||
|
writeln('found');
|
||||||
|
MoveMouse(x,y);
|
||||||
|
end;}
|
||||||
|
end.
|
@ -172,12 +172,12 @@ begin;
|
|||||||
result := (((x >= Box.x1) and(x <= Box.x2)) and ((y >= box.y1) and (y <= box.y2)));
|
result := (((x >= Box.x1) and(x <= Box.x2)) and ((y >= box.y1) and (y <= box.y2)));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function ps_PointToBox(PT1,PT2 : TPoint) : TBox; extdecl;
|
function ps_PointToBox(topLeft,bottomRight: TPoint): TBox; extdecl;
|
||||||
begin;
|
begin;
|
||||||
result.x1 := PT1.x;
|
result.x1 := topLeft.x;
|
||||||
result.y1 := PT1.y;
|
result.y1 := topLeft.y;
|
||||||
result.x2 := PT2.x;
|
result.x2 := bottomRight.x;
|
||||||
result.y2 := PT2.y;
|
result.y2 := bottomRight.y;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function ps_PointInBox(PT : TPoint; Box: TBox): Boolean; extdecl;
|
function ps_PointInBox(PT : TPoint; Box: TBox): Boolean; extdecl;
|
||||||
|
@ -143,6 +143,11 @@ begin
|
|||||||
FilterPointsLine(points,radial,radius,mx,my);
|
FilterPointsLine(points,radial,radius,mx,my);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure ps_FilterTPADist(var TPA: TPointArray; maxDist: integer);
|
||||||
|
begin
|
||||||
|
FilterTPADist(TPA, maxDist);
|
||||||
|
end;
|
||||||
|
|
||||||
function ps_GetATPABounds(const ATPA: T2DPointArray): TBox;extdecl;
|
function ps_GetATPABounds(const ATPA: T2DPointArray): TBox;extdecl;
|
||||||
begin
|
begin
|
||||||
result := GetATPABounds(ATPA);
|
result := GetATPABounds(ATPA);
|
||||||
|
@ -69,7 +69,7 @@ AddFunction(@ps_iAbs,'function iAbs(a : integer) : integer;');
|
|||||||
AddFunction(@ps_ArcTan2,'function ArcTan2(y,x : extended) : extended;');
|
AddFunction(@ps_ArcTan2,'function ArcTan2(y,x : extended) : extended;');
|
||||||
AddFunction(@ps_IntToBox,'function IntToBox(xs,ys,xe,ye : integer) : TBox;');
|
AddFunction(@ps_IntToBox,'function IntToBox(xs,ys,xe,ye : integer) : TBox;');
|
||||||
AddFunction(@ps_IntInBox,'function IntInBox(x, y: Integer; Box: TBox): Boolean;');
|
AddFunction(@ps_IntInBox,'function IntInBox(x, y: Integer; Box: TBox): Boolean;');
|
||||||
AddFunction(@ps_PointToBox,'function PointToBox(PT1,PT2 : TPoint): TBox;');
|
AddFunction(@ps_PointToBox,'function PointToBox(topLeft,bottomRight: TPoint): TBox;');
|
||||||
AddFunction(@ps_PointInBox,'function PointInBox(PT : TPoint; Box: TBox): Boolean;');
|
AddFunction(@ps_PointInBox,'function PointInBox(PT : TPoint; Box: TBox): Boolean;');
|
||||||
AddFunction(@ps_sqr,'function Sqr(e : extended) : extended;');
|
AddFunction(@ps_sqr,'function Sqr(e : extended) : extended;');
|
||||||
AddFunction(@ps_point,'function Point(x,y:integer) : TPoint;');
|
AddFunction(@ps_point,'function Point(x,y:integer) : TPoint;');
|
||||||
@ -458,6 +458,7 @@ AddFunction(@ps_FloodFillTPA,'function FloodFillTPA(const TPA : TPointArray) : T
|
|||||||
AddFunction(@ps_FilterPointsPie,'procedure FilterPointsPie(var Points: TPointArray; const SD, ED, MinR, MaxR: Extended; Mx, My: Integer);');
|
AddFunction(@ps_FilterPointsPie,'procedure FilterPointsPie(var Points: TPointArray; const SD, ED, MinR, MaxR: Extended; Mx, My: Integer);');
|
||||||
AddFunction(@ps_FilterPointsLine,'procedure FilterPointsLine(var Points: TPointArray; Radial: Extended; Radius, MX, MY: Integer);');
|
AddFunction(@ps_FilterPointsLine,'procedure FilterPointsLine(var Points: TPointArray; Radial: Extended; Radius, MX, MY: Integer);');
|
||||||
AddFunction(@ps_filterpointsdist,'procedure FilterPointsDist(var Points: TPointArray; const MinDist, MaxDist: Extended; Mx, My: Integer);');
|
AddFunction(@ps_filterpointsdist,'procedure FilterPointsDist(var Points: TPointArray; const MinDist, MaxDist: Extended; Mx, My: Integer);');
|
||||||
|
AddFunction(@ps_filterTPADist, 'procedure FilterTPADist(var TPA: TPointArray; maxDist: integer);');
|
||||||
AddFunction(@ps_GetATPABounds,'function GetATPABounds(const ATPA: T2DPointArray): TBox;');
|
AddFunction(@ps_GetATPABounds,'function GetATPABounds(const ATPA: T2DPointArray): TBox;');
|
||||||
AddFunction(@ps_GetTPABounds,'function GetTPABounds(const TPA: TPointArray): TBox;');
|
AddFunction(@ps_GetTPABounds,'function GetTPABounds(const TPA: TPointArray): TBox;');
|
||||||
AddFunction(@ps_FindTPAinTPA,'function FindTPAinTPA(const SearchTPA, TotalTPA: TPointArray; var Matches: TPointArray): Boolean;');
|
AddFunction(@ps_FindTPAinTPA,'function FindTPAinTPA(const SearchTPA, TotalTPA: TPointArray; var Matches: TPointArray): Boolean;');
|
||||||
|
@ -184,7 +184,8 @@ type
|
|||||||
procedure OnCompile(Sender: TPSScript);
|
procedure OnCompile(Sender: TPSScript);
|
||||||
function RequireFile(Sender: TObject; const OriginFileName: String;
|
function RequireFile(Sender: TObject; const OriginFileName: String;
|
||||||
var FileName, OutPut: string): Boolean;
|
var FileName, OutPut: string): Boolean;
|
||||||
function FileAlreadyIncluded(Sender: TObject; FileName: string): Boolean;
|
function FileAlreadyIncluded(Sender: TObject; OrgFileName, FileName: string): Boolean;
|
||||||
|
function OnIncludingFile(Sender: TObject; OrgFileName, FileName: string): Boolean;
|
||||||
|
|
||||||
procedure OnCompImport(Sender: TObject; x: TPSPascalCompiler);
|
procedure OnCompImport(Sender: TObject; x: TPSPascalCompiler);
|
||||||
procedure OnExecImport(Sender: TObject; se: TPSExec; x: TPSRuntimeClassImporter);
|
procedure OnExecImport(Sender: TObject; se: TPSExec; x: TPSRuntimeClassImporter);
|
||||||
@ -425,7 +426,9 @@ begin
|
|||||||
Exit;
|
Exit;
|
||||||
end;
|
end;
|
||||||
filename := path;//Yeah!
|
filename := path;//Yeah!
|
||||||
Includes.Add(path);
|
|
||||||
|
if Includes.IndexOf(path) = -1 then
|
||||||
|
Includes.Add(path);
|
||||||
|
|
||||||
try
|
try
|
||||||
f:= TFileStream.Create(UTF8ToSys(Path), fmOpenRead);
|
f:= TFileStream.Create(UTF8ToSys(Path), fmOpenRead);
|
||||||
@ -615,6 +618,7 @@ begin
|
|||||||
PSScript.UsePreProcessor:= True;
|
PSScript.UsePreProcessor:= True;
|
||||||
PSScript.CompilerOptions := PSScript.CompilerOptions + [icBooleanShortCircuit];
|
PSScript.CompilerOptions := PSScript.CompilerOptions + [icBooleanShortCircuit];
|
||||||
PSScript.OnNeedFile := @RequireFile;
|
PSScript.OnNeedFile := @RequireFile;
|
||||||
|
PSScript.OnIncludingFile := @OnIncludingFile;
|
||||||
PSScript.OnFileAlreadyIncluded := @FileAlreadyIncluded;
|
PSScript.OnFileAlreadyIncluded := @FileAlreadyIncluded;
|
||||||
PSScript.OnProcessDirective:=@OnProcessDirective;
|
PSScript.OnProcessDirective:=@OnProcessDirective;
|
||||||
PSScript.OnProcessUnknowDirective:=@PSScriptProcessUnknownDirective;
|
PSScript.OnProcessUnknowDirective:=@PSScriptProcessUnknownDirective;
|
||||||
@ -737,26 +741,59 @@ begin
|
|||||||
'{$IFDEF __REMOVE_IS_INCLUDE}{$UNDEF IS_INCLUDE}{$ENDIF}';
|
'{$IFDEF __REMOVE_IS_INCLUDE}{$UNDEF IS_INCLUDE}{$ENDIF}';
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TPSThread.FileAlreadyIncluded(Sender: TObject; FileName: string): Boolean;
|
function TPSThread.FileAlreadyIncluded(Sender: TObject; OrgFileName, FileName: string): Boolean;
|
||||||
var
|
var
|
||||||
path: string;
|
path: string;
|
||||||
i: integer;
|
i: integer;
|
||||||
begin
|
begin
|
||||||
path := FindFile(Filename,[ScriptPath,IncludePath]);
|
path := FindFile(filename,[includepath,ScriptPath,IncludeTrailingPathDelimiter(ExtractFileDir(OrgFileName))]);
|
||||||
|
if path = '' then
|
||||||
|
begin
|
||||||
|
Result := True;
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
path := ExpandFileNameUTF8(path);
|
||||||
|
|
||||||
if (path <> '') then
|
if (path <> '') then
|
||||||
if Includes.Find(path,i) then
|
if Includes.IndexOf(path) <> -1 then
|
||||||
begin
|
begin
|
||||||
{$IFDEF SIMBA_VERBOSE}
|
{$IFDEF SIMBA_VERBOSE}
|
||||||
psWriteln('Include_Once file already included:' + Path);
|
writeln('Include_Once file already included:' + Path);
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
Result := True;
|
Result := True;
|
||||||
Exit;
|
Exit;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
{$IFDEF SIMBA_VERBOSE}
|
||||||
|
writeln('OnFileAlreadyIncluded, Adding: ' + path);
|
||||||
|
{$ENDIF}
|
||||||
Includes.Add(path);
|
Includes.Add(path);
|
||||||
Result := False;
|
Result := False;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function TPSThread.OnIncludingFile(Sender: TObject; OrgFileName, FileName: string): Boolean;
|
||||||
|
var
|
||||||
|
path: string;
|
||||||
|
begin
|
||||||
|
path := FindFile(filename,[includepath,ScriptPath,IncludeTrailingPathDelimiter(ExtractFileDir(OrgFileName))]);
|
||||||
|
if path = '' then
|
||||||
|
begin
|
||||||
|
Result := True;
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
path := ExpandFileNameUTF8(path);
|
||||||
|
|
||||||
|
if Includes.IndexOf(path) = -1 then
|
||||||
|
begin
|
||||||
|
{$IFDEF SIMBA_VERBOSE}
|
||||||
|
writeln('OnIncludingFile, Adding: ' + path);
|
||||||
|
{$ENDIF}
|
||||||
|
Includes.Add(path);
|
||||||
|
end;
|
||||||
|
|
||||||
|
Result := True; // Not used
|
||||||
|
end;
|
||||||
|
|
||||||
procedure SIRegister_Mufasa(cl: TPSPascalCompiler);
|
procedure SIRegister_Mufasa(cl: TPSPascalCompiler);
|
||||||
begin
|
begin
|
||||||
SIRegister_MML(cl);
|
SIRegister_MML(cl);
|
||||||
@ -927,7 +964,7 @@ begin
|
|||||||
if PSScript.Compile then
|
if PSScript.Compile then
|
||||||
begin
|
begin
|
||||||
OutputMessages;
|
OutputMessages;
|
||||||
psWriteln('Compiled succesfully in ' + IntToStr(GetTickCount - Starttime) + ' ms.');
|
psWriteln('Compiled successfully in ' + IntToStr(GetTickCount - Starttime) + ' ms.');
|
||||||
if CompileOnly then
|
if CompileOnly then
|
||||||
exit;
|
exit;
|
||||||
// if not (ScriptState = SCompiling) then
|
// if not (ScriptState = SCompiling) then
|
||||||
@ -1171,7 +1208,7 @@ begin
|
|||||||
RUTIS.Compile;
|
RUTIS.Compile;
|
||||||
if not RUTIS.CompilerError then
|
if not RUTIS.CompilerError then
|
||||||
begin
|
begin
|
||||||
psWriteln('Compiled succesfully in ' + IntToStr(GetTickCount - Starttime) + ' ms.');
|
psWriteln('Compiled successfully in ' + IntToStr(GetTickCount - Starttime) + ' ms.');
|
||||||
if CompileOnly then
|
if CompileOnly then
|
||||||
exit;
|
exit;
|
||||||
RUTIS.Run;
|
RUTIS.Run;
|
||||||
|
@ -128,6 +128,7 @@ begin;
|
|||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
result := '';
|
||||||
end;
|
end;
|
||||||
|
|
||||||
constructor TMFiles.Create(Owner : TObject);
|
constructor TMFiles.Create(Owner : TObject);
|
||||||
|
@ -1692,6 +1692,8 @@ begin
|
|||||||
|
|
||||||
end;
|
end;
|
||||||
//We did find the Bmp, otherwise we would be at the part below
|
//We did find the Bmp, otherwise we would be at the part below
|
||||||
|
TClient(Client).IOManager.FreeReturnData;
|
||||||
|
|
||||||
x := ClientTPA[i].x + xs;
|
x := ClientTPA[i].x + xs;
|
||||||
y := ClientTPA[i].y + ys;
|
y := ClientTPA[i].y + ys;
|
||||||
result := true;
|
result := true;
|
||||||
|
@ -20,15 +20,21 @@
|
|||||||
|
|
||||||
Linux OS specific implementation for Mufasa Macro Library
|
Linux OS specific implementation for Mufasa Macro Library
|
||||||
}
|
}
|
||||||
{$mode objfpc}{$H+}
|
{$mode objfpc}{$H+}
|
||||||
unit os_linux;
|
unit os_linux;
|
||||||
|
|
||||||
|
{
|
||||||
|
TODO's:
|
||||||
|
- Allow selecting a different X display
|
||||||
|
- Fix keyboard layout / SendString
|
||||||
|
}
|
||||||
|
|
||||||
interface
|
interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
Classes, SysUtils, mufasatypes, xlib, x, xutil, IOManager, XKeyInput, ctypes, xtest,
|
Classes, SysUtils, mufasatypes, xlib, x, xutil, IOManager, XKeyInput, ctypes, xtest,
|
||||||
syncobjs, mufasabase;
|
syncobjs, mufasabase;
|
||||||
|
|
||||||
type
|
type
|
||||||
|
|
||||||
TNativeWindow = x.TWindow;
|
TNativeWindow = x.TWindow;
|
||||||
@ -43,7 +49,7 @@ interface
|
|||||||
|
|
||||||
TWindow = class(TWindow_Abstract)
|
TWindow = class(TWindow_Abstract)
|
||||||
public
|
public
|
||||||
constructor Create(display: PDisplay; screennum: integer; window: x.TWindow);
|
constructor Create(display: PDisplay; screennum: integer; window: x.TWindow);
|
||||||
destructor Destroy; override;
|
destructor Destroy; override;
|
||||||
procedure GetTargetDimensions(out w, h: integer); override;
|
procedure GetTargetDimensions(out w, h: integer); override;
|
||||||
procedure GetTargetPosition(out left, top: integer); override;
|
procedure GetTargetPosition(out left, top: integer); override;
|
||||||
@ -89,7 +95,7 @@ interface
|
|||||||
{ X Error Handler }
|
{ X Error Handler }
|
||||||
oldXHandler: TXErrorHandler;
|
oldXHandler: TXErrorHandler;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
TIOManager = class(TIOManager_Abstract)
|
TIOManager = class(TIOManager_Abstract)
|
||||||
public
|
public
|
||||||
constructor Create;
|
constructor Create;
|
||||||
@ -109,7 +115,7 @@ interface
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
function MufasaXErrorHandler(para1:PDisplay; para2:PXErrorEvent):cint; cdecl;
|
function MufasaXErrorHandler(para1:PDisplay; para2:PXErrorEvent):cint; cdecl;
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
uses GraphType, interfacebase, lcltype;
|
uses GraphType, interfacebase, lcltype;
|
||||||
@ -126,7 +132,7 @@ implementation
|
|||||||
{
|
{
|
||||||
This is extremely hacky, but also very useful.
|
This is extremely hacky, but also very useful.
|
||||||
We have to install a X error handler, because otherwise X
|
We have to install a X error handler, because otherwise X
|
||||||
will terminate out entire app on error.
|
will terminate our entire app on error.
|
||||||
|
|
||||||
Since we want the right thread to recieve the right error, we have to
|
Since we want the right thread to recieve the right error, we have to
|
||||||
fiddle a bit with threadvars, mutexes / semaphores.
|
fiddle a bit with threadvars, mutexes / semaphores.
|
||||||
@ -207,8 +213,8 @@ implementation
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
{ See if the semaphores / CS are initialised }
|
{ See if the semaphores / CS are initialised }
|
||||||
constructor TWindow.Create(display: PDisplay; screennum: integer; window: x.TWindow);
|
constructor TWindow.Create(display: PDisplay; screennum: integer; window: x.TWindow);
|
||||||
begin
|
begin
|
||||||
inherited Create;
|
inherited Create;
|
||||||
self.display:= display;
|
self.display:= display;
|
||||||
self.screennum:= screennum;
|
self.screennum:= screennum;
|
||||||
@ -227,8 +233,8 @@ implementation
|
|||||||
finally
|
finally
|
||||||
ErrorCS.Leave;
|
ErrorCS.Leave;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
destructor TWindow.Destroy;
|
destructor TWindow.Destroy;
|
||||||
var
|
var
|
||||||
erh: TXErrorHandler;
|
erh: TXErrorHandler;
|
||||||
@ -304,8 +310,8 @@ implementation
|
|||||||
if ReceivedError then
|
if ReceivedError then
|
||||||
raise Exception.Create('Error: ActivateClient: ' + GetError);
|
raise Exception.Create('Error: ActivateClient: ' + GetError);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TWindow.ReturnData(xs, ys, width, height: Integer): TRetData;
|
function TWindow.ReturnData(xs, ys, width, height: Integer): TRetData;
|
||||||
var
|
var
|
||||||
w,h: integer;
|
w,h: integer;
|
||||||
begin
|
begin
|
||||||
@ -334,8 +340,8 @@ implementation
|
|||||||
dirty:= true;
|
dirty:= true;
|
||||||
//XSetErrorHandler(Old_Handler);
|
//XSetErrorHandler(Old_Handler);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TWindow.FreeReturnData;
|
procedure TWindow.FreeReturnData;
|
||||||
begin
|
begin
|
||||||
if dirty then
|
if dirty then
|
||||||
begin
|
begin
|
||||||
@ -413,40 +419,41 @@ implementation
|
|||||||
result := xmask and ButtonP > 0;
|
result := xmask and ButtonP > 0;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TWindow.SendString(str: string);
|
{ TODO: Check if this supports multiple keyboard layouts, probably not }
|
||||||
var
|
procedure TWindow.SendString(str: string);
|
||||||
I, L: Integer;
|
var
|
||||||
K: Byte;
|
I, L: Integer;
|
||||||
HoldShift: Boolean;
|
K: Byte;
|
||||||
begin
|
HoldShift: Boolean;
|
||||||
HoldShift := False;
|
|
||||||
L := Length(str);
|
|
||||||
for I := 1 to L do
|
|
||||||
begin
|
begin
|
||||||
if (((str[I] >= 'A') and (str[I] <= 'Z')) or
|
HoldShift := False;
|
||||||
((str[I] >= '!') and (str[I] <= '&')) or
|
L := Length(str);
|
||||||
((str[I] >= '(') and (str[I] <= '+')) or
|
for I := 1 to L do
|
||||||
(str[I] = ':') or
|
|
||||||
((str[I] >= '<') and (str[I] <= '@')) or
|
|
||||||
((str[I] >= '^') and (str[I] <= '_')) or
|
|
||||||
((str[I] >= '{') and (str[I] <= '~'))) then
|
|
||||||
begin
|
begin
|
||||||
HoldKey(VK_SHIFT);
|
if (((str[I] >= 'A') and (str[I] <= 'Z')) or
|
||||||
HoldShift := True;
|
((str[I] >= '!') and (str[I] <= '&')) or
|
||||||
end;
|
((str[I] >= '(') and (str[I] <= '+')) or
|
||||||
|
(str[I] = ':') or
|
||||||
K := GetKeyCode(str[I]);
|
((str[I] >= '<') and (str[I] <= '@')) or
|
||||||
HoldKey(K);
|
((str[I] >= '^') and (str[I] <= '_')) or
|
||||||
Sleep(20);
|
((str[I] >= '{') and (str[I] <= '~'))) then
|
||||||
ReleaseKey(K);
|
begin
|
||||||
|
HoldKey(VK_SHIFT);
|
||||||
if (HoldShift) then
|
HoldShift := True;
|
||||||
begin
|
end;
|
||||||
HoldShift := False;
|
|
||||||
ReleaseKey(VK_SHIFT);
|
K := GetKeyCode(str[I]);
|
||||||
|
HoldKey(K);
|
||||||
|
Sleep(20);
|
||||||
|
ReleaseKey(K);
|
||||||
|
|
||||||
|
if (HoldShift) then
|
||||||
|
begin
|
||||||
|
HoldShift := False;
|
||||||
|
ReleaseKey(VK_SHIFT);
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TWindow.HoldKey(key: integer);
|
procedure TWindow.HoldKey(key: integer);
|
||||||
begin
|
begin
|
||||||
@ -474,7 +481,7 @@ end;
|
|||||||
Raise Exception.CreateFMT('GetSimpleKeyCode - char (%s) is not in A..z',[c]);
|
Raise Exception.CreateFMT('GetSimpleKeyCode - char (%s) is not in A..z',[c]);
|
||||||
end
|
end
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ ***implementation*** IOManager }
|
{ ***implementation*** IOManager }
|
||||||
|
|
||||||
constructor TIOManager.Create;
|
constructor TIOManager.Create;
|
||||||
@ -499,17 +506,17 @@ end;
|
|||||||
{ Get the Desktop Window }
|
{ Get the Desktop Window }
|
||||||
desktop:= RootWindow(display,screennum)
|
desktop:= RootWindow(display,screennum)
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TIOManager.NativeFree;
|
procedure TIOManager.NativeFree;
|
||||||
begin
|
begin
|
||||||
XCloseDisplay(display);
|
XCloseDisplay(display);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TIOManager.SetDesktop;
|
procedure TIOManager.SetDesktop;
|
||||||
begin
|
begin
|
||||||
SetBothTargets(TWindow.Create(display, screennum, desktop));
|
SetBothTargets(TWindow.Create(display, screennum, desktop));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TIOManager.SetTarget(target: x.TWindow): integer;
|
function TIOManager.SetTarget(target: x.TWindow): integer;
|
||||||
begin
|
begin
|
||||||
result := SetBothTargets(TWindow.Create(display, screennum, target))
|
result := SetBothTargets(TWindow.Create(display, screennum, target))
|
||||||
|
@ -67,6 +67,7 @@ function FloodFillTPA(const TPA : TPointArray) : T2DPointArray;
|
|||||||
procedure FilterPointsPie(var Points: TPointArray; const SD, ED, MinR, MaxR: Extended; Mx, My: Integer);
|
procedure FilterPointsPie(var Points: TPointArray; const SD, ED, MinR, MaxR: Extended; Mx, My: Integer);
|
||||||
procedure FilterPointsDist(var Points: TPointArray; const MinDist,MaxDist: Extended; Mx, My: Integer);
|
procedure FilterPointsDist(var Points: TPointArray; const MinDist,MaxDist: Extended; Mx, My: Integer);
|
||||||
procedure FilterPointsLine(var Points: TPointArray; Radial: Extended; Radius, MX, MY: Integer);
|
procedure FilterPointsLine(var Points: TPointArray; Radial: Extended; Radius, MX, MY: Integer);
|
||||||
|
procedure FilterTPADist(var TPA: TPointArray; maxDist: integer);
|
||||||
function RemoveDistTPointArray(x, y, dist: Integer;const ThePoints: TPointArray; RemoveHigher: Boolean): TPointArray;
|
function RemoveDistTPointArray(x, y, dist: Integer;const ThePoints: TPointArray; RemoveHigher: Boolean): TPointArray;
|
||||||
function GetATPABounds(const ATPA: T2DPointArray): TBox;
|
function GetATPABounds(const ATPA: T2DPointArray): TBox;
|
||||||
function GetTPABounds(const TPA: TPointArray): TBox;
|
function GetTPABounds(const TPA: TPointArray): TBox;
|
||||||
@ -1168,6 +1169,55 @@ begin
|
|||||||
Points:= P;
|
Points:= P;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
{/\
|
||||||
|
Removes points in the TPA that are within maxDist of each other.
|
||||||
|
/\}
|
||||||
|
procedure FilterTPADist(var TPA: TPointArray; maxDist: integer);
|
||||||
|
var
|
||||||
|
c, i, j, l, h, maxDistSq: integer;
|
||||||
|
newTPA: TPointArray;
|
||||||
|
inBadElements: TBooleanArray;
|
||||||
|
begin
|
||||||
|
h := high(TPA);
|
||||||
|
l := (h + 1);
|
||||||
|
maxDistSq := (maxDist * maxDist);
|
||||||
|
|
||||||
|
setLength(inBadElements, l);
|
||||||
|
setLength(newTPA, l);
|
||||||
|
|
||||||
|
for i := 0 to h do
|
||||||
|
inBadElements[i] := false;
|
||||||
|
|
||||||
|
for i := 0 to (h - 1) do
|
||||||
|
begin
|
||||||
|
if (inBadElements[i]) then
|
||||||
|
continue;
|
||||||
|
|
||||||
|
for j := (i + 1) to h do
|
||||||
|
begin
|
||||||
|
if (inBadElements[j]) then
|
||||||
|
continue;
|
||||||
|
|
||||||
|
// simplified -> a^2 + b^2 <= c^2
|
||||||
|
if (((TPA[i].x - TPA[j].x) * (TPA[i].x - TPA[j].x)) + ((TPA[i].y - TPA[j].y) * (TPA[i].y - TPA[j].y)) <= maxDistSq) then
|
||||||
|
inBadElements[j] := true;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
c := 0;
|
||||||
|
|
||||||
|
// set the new TPA
|
||||||
|
for i := 0 to h do
|
||||||
|
if (not inBadElements[i]) then
|
||||||
|
begin
|
||||||
|
newTPA[c] := TPA[i];
|
||||||
|
inc(c);
|
||||||
|
end;
|
||||||
|
|
||||||
|
setLength(newTPA, c);
|
||||||
|
TPA := newTPA;
|
||||||
|
end;
|
||||||
|
|
||||||
{/\
|
{/\
|
||||||
Removes the points that are inside or outside the distance Dist from the point (x, y) from the TPointArray ThePoints.
|
Removes the points that are inside or outside the distance Dist from the point (x, y) from the TPointArray ThePoints.
|
||||||
/\}
|
/\}
|
||||||
|
@ -94,7 +94,8 @@ type
|
|||||||
TPSOnNeedFile = function (Sender: TObject; const OrginFileName: tbtstring; var FileName, Output: tbtstring): Boolean of object;
|
TPSOnNeedFile = function (Sender: TObject; const OrginFileName: tbtstring; var FileName, Output: tbtstring): Boolean of object;
|
||||||
|
|
||||||
{ Added by Wizzup }
|
{ Added by Wizzup }
|
||||||
TPSOnFileAlreadyIncluded = function (Sender: TObject; FileName: tbtstring): Boolean of object;
|
TPSOnFileAlreadyIncluded = function (Sender: TObject; OrgFileName, FileName: tbtstring): Boolean of object;
|
||||||
|
TPSOnIncludingFile = function (Sender: TObject; OrgFileName, FileName: tbtstring): Boolean of object;
|
||||||
{ Wizzup out }
|
{ Wizzup out }
|
||||||
|
|
||||||
TPSOnProcessDirective = procedure (
|
TPSOnProcessDirective = procedure (
|
||||||
@ -127,6 +128,7 @@ type
|
|||||||
FOnNeedFile: TPSOnNeedFile;
|
FOnNeedFile: TPSOnNeedFile;
|
||||||
{ Added by Wizzup }
|
{ Added by Wizzup }
|
||||||
FOnFileAlreadyIncluded: TPSOnFileAlreadyIncluded;
|
FOnFileAlreadyIncluded: TPSOnFileAlreadyIncluded;
|
||||||
|
FOnIncludingFile: TPSOnIncludingFile;
|
||||||
{ Wizzup out }
|
{ Wizzup out }
|
||||||
FUsePreProcessor: Boolean;
|
FUsePreProcessor: Boolean;
|
||||||
FDefines: TStrings;
|
FDefines: TStrings;
|
||||||
@ -161,7 +163,8 @@ type
|
|||||||
//--jgv new
|
//--jgv new
|
||||||
function DoOnNeedFile (Sender: TObject; const OrginFileName: tbtstring; var FileName, Output: tbtstring): Boolean; virtual;
|
function DoOnNeedFile (Sender: TObject; const OrginFileName: tbtstring; var FileName, Output: tbtstring): Boolean; virtual;
|
||||||
{ Added by Wizzup }
|
{ Added by Wizzup }
|
||||||
function DoOnFileAlreadyIncluded (Sender: TObject; FileName: tbtstring): Boolean; virtual;
|
function DoOnFileAlreadyIncluded (Sender: TObject; OrgFileName, FileName: tbtstring): Boolean; virtual;
|
||||||
|
function DoOnIncludingFile (Sender: TObject; OrgFileName, FileName: tbtstring): Boolean; virtual;
|
||||||
{ Wizzup out }
|
{ Wizzup out }
|
||||||
function DoOnUnknowUses (Sender: TPSPascalCompiler; const Name: tbtstring): Boolean; virtual; // return true if processed
|
function DoOnUnknowUses (Sender: TPSPascalCompiler; const Name: tbtstring): Boolean; virtual; // return true if processed
|
||||||
procedure DoOnCompImport; virtual;
|
procedure DoOnCompImport; virtual;
|
||||||
@ -300,6 +303,7 @@ type
|
|||||||
|
|
||||||
{ Added by Wizzup }
|
{ Added by Wizzup }
|
||||||
property OnFileAlreadyIncluded: TPSOnFileAlreadyIncluded read FOnFileAlreadyIncluded write FOnFileAlreadyIncluded;
|
property OnFileAlreadyIncluded: TPSOnFileAlreadyIncluded read FOnFileAlreadyIncluded write FOnFileAlreadyIncluded;
|
||||||
|
property OnIncludingFile: TPSOnIncludingFile read FOnIncludingFile write FOnIncludingFile;
|
||||||
{ Wizzup out }
|
{ Wizzup out }
|
||||||
|
|
||||||
property Defines: TStrings read FDefines write SetDefines;
|
property Defines: TStrings read FDefines write SetDefines;
|
||||||
@ -553,9 +557,14 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
{ Added by Wizzup }
|
{ Added by Wizzup }
|
||||||
function CEOnFileAlreadyIncluded(Sender: TPSPreProcessor; FileName: tbtstring): Boolean;
|
function CEOnFileAlreadyIncluded(Sender: TPSPreProcessor; OrgFileName, FileName: tbtstring): Boolean;
|
||||||
begin
|
begin
|
||||||
Result := TPSScript (Sender.ID).DoOnFileAlreadyIncluded(Sender.ID, Filename);
|
Result := TPSScript (Sender.ID).DoOnFileAlreadyIncluded(Sender.ID, OrgFileName, Filename);
|
||||||
|
end;
|
||||||
|
|
||||||
|
function CEOnIncludingFile(Sender: TPSPreProcessor; OrgFileName, FileName: tbtstring): Boolean;
|
||||||
|
begin
|
||||||
|
Result := TPSScript (Sender.ID).DoOnIncludingFile(Sender.ID, OrgFileName, Filename);
|
||||||
end;
|
end;
|
||||||
{ Wizzup out }
|
{ Wizzup out }
|
||||||
|
|
||||||
@ -675,6 +684,7 @@ begin
|
|||||||
|
|
||||||
{ Added by Wizzup }
|
{ Added by Wizzup }
|
||||||
FPP.OnFileAlreadyIncluded:= CEOnFileAlreadyIncluded;
|
FPP.OnFileAlreadyIncluded:= CEOnFileAlreadyIncluded;
|
||||||
|
FPP.OnIncludingFile:= CEOnIncludingFile;
|
||||||
{ Wizzup out }
|
{ Wizzup out }
|
||||||
|
|
||||||
FDefines := TStringList.Create;
|
FDefines := TStringList.Create;
|
||||||
@ -1081,10 +1091,19 @@ end;
|
|||||||
|
|
||||||
{ Added by Wizzup }
|
{ Added by Wizzup }
|
||||||
function TPSScript.DoOnFileAlreadyIncluded(Sender: TObject;
|
function TPSScript.DoOnFileAlreadyIncluded(Sender: TObject;
|
||||||
FileName: tbtstring): Boolean;
|
OrgFileName, FileName: tbtstring): Boolean;
|
||||||
begin
|
begin
|
||||||
If Assigned (OnFileAlreadyIncluded) then
|
If Assigned (OnFileAlreadyIncluded) then
|
||||||
Result := OnFileAlreadyIncluded(Sender, FileName)
|
Result := OnFileAlreadyIncluded(Sender, OrgFileName, FileName)
|
||||||
|
else
|
||||||
|
Result := False;
|
||||||
|
end;
|
||||||
|
|
||||||
|
function TPSScript.DoOnIncludingFile(Sender: TObject;
|
||||||
|
OrgFileName, FileName: tbtstring): Boolean;
|
||||||
|
begin
|
||||||
|
If Assigned (OnIncludingFile) then
|
||||||
|
Result := OnIncludingFile(Sender, OrgFileName, FileName)
|
||||||
else
|
else
|
||||||
Result := False;
|
Result := False;
|
||||||
end;
|
end;
|
||||||
|
@ -311,7 +311,7 @@ begin T := Self.TabIndex; end;
|
|||||||
|
|
||||||
(*----------------------------------------------------------------------------*)
|
(*----------------------------------------------------------------------------*)
|
||||||
procedure TTabControlNoteBookStringsNoteBook_R(Self: TTabControlNoteBookStrings; var T: TNoteBook);
|
procedure TTabControlNoteBookStringsNoteBook_R(Self: TTabControlNoteBookStrings; var T: TNoteBook);
|
||||||
begin T := TNoteBook(Self.NoteBook); end;
|
begin T := Self.NoteBook; end;
|
||||||
|
|
||||||
(*----------------------------------------------------------------------------*)
|
(*----------------------------------------------------------------------------*)
|
||||||
procedure TTabControlStringsTabWidth_W(Self: TTabControlStrings; const T: Smallint);
|
procedure TTabControlStringsTabWidth_W(Self: TTabControlStrings; const T: Smallint);
|
||||||
|
@ -16,7 +16,8 @@ type
|
|||||||
TPSOnNeedFile = function (Sender: TPSPreProcessor; const callingfilename: tbtstring; var FileName, Output: tbtstring): Boolean;
|
TPSOnNeedFile = function (Sender: TPSPreProcessor; const callingfilename: tbtstring; var FileName, Output: tbtstring): Boolean;
|
||||||
|
|
||||||
{ Added by Wizzup }
|
{ Added by Wizzup }
|
||||||
TPSOnFileAlreadyIncluded = function (Sender: TPSPreProcessor; FileName: tbtstring): Boolean;
|
TPSOnFileAlreadyIncluded = function (Sender: TPSPreProcessor; OrgFileName, FileName: tbtstring): Boolean;
|
||||||
|
TPSOnIncludingFile = function (Sender: TPSPreProcessor; OrgFileName, FileName: tbtstring): Boolean;
|
||||||
{ Wizzup out }
|
{ Wizzup out }
|
||||||
|
|
||||||
TPSOnProcessDirective = procedure (
|
TPSOnProcessDirective = procedure (
|
||||||
@ -99,6 +100,7 @@ type
|
|||||||
FOnNeedFile: TPSOnNeedFile;
|
FOnNeedFile: TPSOnNeedFile;
|
||||||
{ Added by Wizzup }
|
{ Added by Wizzup }
|
||||||
FOnFileAlreadyIncluded: TPSOnFileAlreadyIncluded;
|
FOnFileAlreadyIncluded: TPSOnFileAlreadyIncluded;
|
||||||
|
FOnIncludingFile: TPSOnIncludingFile;
|
||||||
{ Wizzup out }
|
{ Wizzup out }
|
||||||
FAddedPosition: Cardinal;
|
FAddedPosition: Cardinal;
|
||||||
FDefineState: TPSDefineStates;
|
FDefineState: TPSDefineStates;
|
||||||
@ -120,6 +122,7 @@ type
|
|||||||
|
|
||||||
{ Added by Wizzup }
|
{ Added by Wizzup }
|
||||||
property OnFileAlreadyIncluded: TPSOnFileAlreadyIncluded read FOnFileAlreadyIncluded write FOnFileAlreadyIncluded;
|
property OnFileAlreadyIncluded: TPSOnFileAlreadyIncluded read FOnFileAlreadyIncluded write FOnFileAlreadyIncluded;
|
||||||
|
property OnIncludingFile: TPSOnIncludingFile read FOnIncludingFile write FOnIncludingFile;
|
||||||
{ Wizzup out }
|
{ Wizzup out }
|
||||||
|
|
||||||
property Defines: TStringList read FDefines write FDefines;
|
property Defines: TStringList read FDefines write FDefines;
|
||||||
@ -633,6 +636,8 @@ begin
|
|||||||
begin
|
begin
|
||||||
if FDefineState.DoWrite then
|
if FDefineState.DoWrite then
|
||||||
begin
|
begin
|
||||||
|
if assigned(@OnIncludingFile) then
|
||||||
|
OnIncludingFile(self , Filename, s);
|
||||||
FAddedPosition := 0;
|
FAddedPosition := 0;
|
||||||
IntPreProcess(Level +1, FileName, s, Dest);
|
IntPreProcess(Level +1, FileName, s, Dest);
|
||||||
FCurrentLineInfo.Current := current;
|
FCurrentLineInfo.Current := current;
|
||||||
@ -646,7 +651,7 @@ begin
|
|||||||
raise EPSPreProcessor.CreateFmt(RPS_IncludeOnceNotFound, [FileName, OrgFileName])
|
raise EPSPreProcessor.CreateFmt(RPS_IncludeOnceNotFound, [FileName, OrgFileName])
|
||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
if not OnFileAlreadyIncluded(Self, FileName) then
|
if not OnFileAlreadyIncluded(Self, FileName, s) then
|
||||||
begin
|
begin
|
||||||
FAddedPosition := 0;
|
FAddedPosition := 0;
|
||||||
IntPreProcess(Level +1, FileName, s, Dest);
|
IntPreProcess(Level +1, FileName, s, Dest);
|
||||||
|
@ -85,14 +85,14 @@ procedure RIRegisterTPANEL(Cl: TPSRuntimeClassImporter);
|
|||||||
begin
|
begin
|
||||||
Cl.Add(TPANEL);
|
Cl.Add(TPANEL);
|
||||||
end;
|
end;
|
||||||
procedure TPagePageIndex_R(Self: TCustomPage; var T: INTEGER); begin T := Self.PageIndex; end;
|
procedure TPagePageIndex_R(Self: TPAGE; var T: INTEGER); begin T := Self.PageIndex; end;
|
||||||
procedure TPagePageIndex_W(Self: TCustomPage; T: INTEGER); begin Self.PageIndex := T; end;
|
procedure TPagePageIndex_W(Self: TPAGE; T: INTEGER); begin Self.PageIndex := T; end;
|
||||||
procedure TPageOnShow_R(Self: TCustomPage; var T: TNotifyEvent); begin T := Self.OnShow; end;
|
procedure TPageOnShow_R(Self: TPAGE; var T: TNotifyEvent); begin T := Self.OnShow; end;
|
||||||
procedure TPageOnShow_W(Self: TCustomPage; T: TNotifyEvent); begin Self.OnShow := T; end;
|
procedure TPageOnShow_W(Self: TPAGE; T: TNotifyEvent); begin Self.OnShow := T; end;
|
||||||
{$IFNDEF CLX}
|
{$IFNDEF CLX}
|
||||||
procedure RIRegisterTPAGE(Cl: TPSRuntimeClassImporter);
|
procedure RIRegisterTPAGE(Cl: TPSRuntimeClassImporter);
|
||||||
begin
|
begin
|
||||||
with Cl.Add(TCustomPage) do
|
with Cl.Add(TPAGE) do
|
||||||
begin
|
begin
|
||||||
RegisterPropertyHelper(@TPagePageIndex_R,@TPagePageIndex_W,'PageIndex');
|
RegisterPropertyHelper(@TPagePageIndex_R,@TPagePageIndex_W,'PageIndex');
|
||||||
RegisterEventPropertyHelper(@TPageOnShow_R,@TPageOnShow_W,'OnShow');
|
RegisterEventPropertyHelper(@TPageOnShow_R,@TPageOnShow_W,'OnShow');
|
||||||
@ -106,7 +106,7 @@ begin
|
|||||||
with Cl.Add(TNOTEBOOK) do
|
with Cl.Add(TNOTEBOOK) do
|
||||||
begin
|
begin
|
||||||
{$IFDEF FPC}
|
{$IFDEF FPC}
|
||||||
// RegisterMethod(@TNoteBook.TabIndexAtClientPos,'TABINDEXATCLIENTPOS');
|
RegisterMethod(@TNoteBook.TabIndexAtClientPos,'TABINDEXATCLIENTPOS');
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
RegisterPropertyHelper(@TNoteBookPageCount_R,nil,'PAGECOUNT');
|
RegisterPropertyHelper(@TNoteBookPageCount_R,nil,'PAGECOUNT');
|
||||||
end;
|
end;
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit 940053e16d79c3d76b6b70d6a1bf56507ad0e627
|
Subproject commit b24c52b9748c6f9f3e91a7a86f727022bf2fd6ce
|
Loading…
Reference in New Issue
Block a user