-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 1f6e792
Showing
798 changed files
with
18,732 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# Auto detect text files and perform LF normalization | ||
* text=auto | ||
|
||
*.function linguist-language=apl | ||
*.operator linguist-language=apl | ||
*.class linguist-language=apl | ||
*.script linguist-language=apl | ||
*.charstring linguist-language=apl | ||
*.charList linguist-language=apl | ||
*.dws linguist-language=apl | ||
*.dyapp linguist-language=apl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
.acre | ||
Dest/ |
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
ADOC_Doc | ||
⍝ How to install Fire | ||
⍝ | ||
⍝ There is a file "HowToInstall.html" with details. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
r←About | ||
r←Version |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
AddPidToCaption←{ | ||
⍝ ⍵ is what is going to be the caption of a dialog box etc. | ||
⍝ This functions adds the ID of the current process (PID) to the beginning if the | ||
⍝ Windows Registry key for $DYALOG$\Captions\Messagebox is suppoed to show "{PID}". | ||
⍝ If so we return that PID, otherwise we return an empty vector. | ||
⍝ Used in Fire to show the PID in the same way. | ||
rk←GetDyalogRegKey ⍬ | ||
rk,←'\Captions\MessageBox' | ||
caption←##.WinReg.GetString rk | ||
0=+/'{PID}'⍷caption:⍵ | ||
(⍕##.OS.GetPID),' ',⍵ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
G←AssignRegistryValuesTo G;p;wsid | ||
⍝ Reads values from Windows Registry and assigns them to G. | ||
⍝ [1] is "State" | ||
⍝ [2] is "Active" | ||
p←GetFireRegistryKey | ||
wsid←1⊃A.SplitPath ⎕WSID | ||
|
||
⍝ Main GUI | ||
G.LookForList←''R.GetString p,wsid,'\LookForList' | ||
:If (,'#')≢G.LookIn←,''R.GetString p,wsid,'\LookIn' | ||
:AndIf ~0∊⍴G.LookIn | ||
:AndIf 0≥⎕NC G.LookIn | ||
G.LookIn←'' | ||
:EndIf | ||
|
||
G.Case←0⊃⍎'0 1'R.GetString p,'Case' | ||
G.APL_Name←1↑⍎'0'R.GetString p,'APL_Name' ⍝ Not "Active" | ||
|
||
G.Code←0⊃⍎'1 1'R.GetString p,'Code' | ||
G.Vars←0⊃⍎'1 1'R.GetString p,'Vars' | ||
G.NamesOnly←1↑⍎'1 0'R.GetString p,'NamesOnly' | ||
|
||
G.APL_Code←0⊃⍎'1 1'R.GetString p,'APL_Code' | ||
G.Comments←0⊃⍎'1 1'R.GetString p,'Comments' | ||
G.Text←0⊃⍎'1 1'R.GetString p,'Text' | ||
|
||
G.SearchIsRegEx←0⊃(⍎'0 1'R.GetString p,'SearchIsRegEx'),0 | ||
G.DotAll←0⊃(⍎'0 0'R.GetString p,'DotAll'),0 | ||
G.Greedy←0⊃(⍎'0 0'R.GetString p,'Greedy'),0 | ||
G.UCP←0⊃(⍎'0 0'R.GetString p,'UCP'),0 | ||
|
||
⍝ Replace dialog | ||
G.ReplaceBy←''R.GetString p,'ReplaceBy' | ||
G.DetailedReport←0 R.GetValue p,'DetailedReport' | ||
G.SimpleReport←1 R.GetValue p,'SimpleReport' | ||
⍝Done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
r←CR | ||
r←⎕UCS 13 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
CleanRegistry;rk;t;this;lsd;today | ||
⍝ Deletes workspace specific entries from the Registry older than one year. | ||
rk←GetFireRegistryKey ⍝ Get Registry key | ||
:If R.DoesKeyExist rk | ||
t←1 R.GetTree rk ⍝ Get tree with all keys, but only one level | ||
t←((2+'\'+.=rk)=(⊃t[;1])+.='\')⌿t | ||
t←(t[;0]=2)⌿t[;1] | ||
today←2 ⎕NQ'.' 'DateToIdn'(3↑⎕TS) | ||
:For this :In t | ||
lsd←⍎¨(1+4 2 2/⍳3)⊂'00000000'R.GetString this,'LastSaveDate' | ||
lsd←2 ⎕NQ'.' 'DateToIdn'lsd | ||
:If 365<today-lsd | ||
R.DeleteSubKeyTree this | ||
:EndIf | ||
:EndFor | ||
:EndIf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{r}←Cleanup;_ | ||
⍝ Tidy up | ||
r←'' | ||
:Trap 0 ⋄ _←GUI.n.Form.Close ⋄ :EndTrap | ||
:Trap 6 ⋄ SetCursorObj G.saveCursorObj ⋄ :EndTrap | ||
:Trap 0 ⋄ ⎕NQ GUI.n.Form'Close' ⋄ :EndTrap | ||
⎕EX¨'AWRG' | ||
⎕EX¨'GUI.n' 'GUI.TheIcon' | ||
(⍎¨⎕NL-9).(⎕EX¨⎕WN'') | ||
⍝Done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{r}←CompileFireFunctions dummy;GetFnsOpr;list;containers | ||
r←⍬ | ||
:If 14.1≤{↑(//)⎕VFI ⍵⌿⍨2>+\'.'=⍵}(1+⎕IO)⊃'#'⎕WG'APLVersion' | ||
GetFnsOpr←{(⊂' ',⍨⍕⎕THIS),¨' '~¨⍨↓⍵.⎕NL 3 4} | ||
list←GetFnsOpr ⎕THIS | ||
containers←' '~¨⍨↓⎕NL 9.1 | ||
containers←((⍕⎕THIS){⍺∘≡¨(⍴⍺)↑¨⍵}⍕¨⍎¨containers)/containers | ||
containers←{⍵/⍨~'['∊¨⍕¨⍎¨⍵}containers | ||
list,←↑,/{0∊⍴l←↓(⍎⍵).⎕NL 3 4:'' ⋄ (⊂⍵,'.'),¨l}¨containers | ||
{}compile list | ||
:EndIf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
CompileHits←{ | ||
⍝ Returns a vector of hits, each with a line number in the first item | ||
⍝ and the index of any hits in the second item. | ||
{⍵⌿⍨0<↑∘⍴¨⍵[;1]}(⍳⍴⍵),[0.5]⍵ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
CompileNamespaceList←{ | ||
⍝ Returns containers. | ||
⍝ Compiles always a complete tree and then throws away unwanted stuff. Fast anyway. | ||
ref←⍎0⊃⍵ | ||
flag←1⊃⍵ | ||
List ref flag ⍝ Get full list. | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
r←ConvertToPixel ref;save | ||
⍝ Treats size of "ref" as "Prop" and converts in into "Pixel' | ||
⍝ "ref" must be a ref to any GUI control | ||
save←ref.Coord | ||
ref.Coord←'Pixel' | ||
r←ref.Size | ||
ref.Coord←save |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{r}←CopySearchFor2ReplaceBy n;∆SendMessage;EM_REPLACESEL | ||
r←0 | ||
{}'∆SendMessage'⎕NA'U USER32|SendMessage* P U P <0T[]' | ||
EM_REPLACESEL←194 ⍝ x00c3 | ||
{}∆SendMessage n.ReplaceBy.Handle EM_REPLACESEL 0 n.SearchFor.Text | ||
⍝Done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
r←CreateGuiRefContainer;fns | ||
⍝ Creates an empty namespace and populates it with a method useful to list refs. | ||
⍝ The purpose of that namespace is to hold refs pointing to GUI controls | ||
r←(0⊃⎕RSI).⎕NS'' | ||
fns←⊂'r←{noOfCols}∆List sortByCol;n;refs' | ||
fns,←⊂'⍝ Returns a matrix with all refs and there type and there caption and style (if any)' | ||
fns,←⊂'⍝ sortByCol can be 0 (default anyway) or 1 which makes List sort' | ||
fns,←⊂'⍝ the matrix by Type rather than name.' | ||
fns,←⊂'⍝ You can restrict the number of columns by specifying a left argument (default=4)' | ||
fns,←⊂'noOfCols←{0<⎕NC ⍵:⍎⍵ ⋄ 4}''noOfCols''' | ||
fns,←⊂'refs←⍎¨n←⎕NL-9' ⍝ The refs and the names | ||
fns,←⊂'r←n,[0.5]refs.Type' ⍝ The "Type" | ||
fns,←⊂'r,←{0::'''' ⋄ ⍵.Style}¨refs' ⍝ The "Style", if any | ||
fns,←⊂'r,←{0::'''' ⋄ ⍵.Caption}¨refs' ⍝ The "Caption", if any | ||
fns,←⊂'r,←↓{{⍵↓[1]⍨+/∧\∧⌿⍵=[1]⍵[0;]}⊃⍵}⍕¨refs' ⍝ Add real names | ||
fns,←⊂'r←r[⍋⊃r[;sortByCol];⍳noOfCols]' ⍝ Sort and take requested number of cols | ||
r.⎕FX fns |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
CreateRefs | ||
⍝ Create refs if possible at all. | ||
⍝ Tries to find needs stuff in ## first, then in ⎕SE, then it gives up. | ||
A←GetRefTo'APLTreeUtils' | ||
F←GetRefTo'FilesAndDirs' | ||
R←GetRefTo'WinReg' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
DQ y | ||
2 ⎕NQ GUI.n.SearchFor'GotFocus' ⋄ ⎕DQ y | ||
⍝Done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
DisableProgressbar←{ | ||
GUI.n.PB.Visible←0 | ||
GUI.n.PB_Text.Visible←0 | ||
GUI.n.Info.Visible←1 | ||
1:r←⍬ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
DropComments←{ | ||
⍝ Drop comments from ⍵ which is supposed to be a sinmple vector of APL code. | ||
(~'⍝'∊⍵):⍵ | ||
⍵↑⍨⍵⍳'⍝' | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
DropDoublesFromHitList←{ | ||
({(⍵⍳⍵)=⍳⍴⍵}GlueNames ⍵)⌿⍵ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
DropRefsFrom←{ | ||
(0∊⍴⍵):⍵ | ||
(~IsUnnameNamespace¨0⊃¨⍵[;0])⌿⍵ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
EnableProgressbar←{ | ||
⍝ Makes the Progressbar visible. ⍵ is number of items to be processed. | ||
GUI.n.PB.Thumb←1 | ||
GUI.n.PB.Limits←0,⍵ | ||
GUI.n.PB.Visible←~GUI.n.Info.Visible←0 | ||
GUI.n.PB_Text.Text←⍺ | ||
GUI.n.PB_Text.Visible←1 | ||
GUI.n.PB_Text.Points[1]←⌊0.5×GUI.n.PB.Size[1]-1⊃GUI.n.Form.GetTextSize GUI.n.PB_Text.Text | ||
1:r←⍬ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
:Namespace EnvVars | ||
##.⎕IO←0 | ||
##.⎕ML←3 | ||
:EndNamespace |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{r}←EstablishNamedIbeams dummy | ||
⍝ name some useful I-beams | ||
r←⍬ | ||
iscompiled←1∘(400⌶) | ||
compile←2∘(400⌶) | ||
uncompile←3∘(400⌶) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
p←FindFireReadMe dummy;rk;v;thisPath;if;regData | ||
⍝ Returns the path to the Fire ReadMe.html file or an empty vector. | ||
⍝ Don't use refs pointing to APLTreeUtils, WinReg and FilesAndDirs here: this stops a certain test case! | ||
p←'' | ||
:If ##.FilesAndDirs.Exists'Fire/ReadMe.html' | ||
p←'Fire/ReadMe.html' | ||
:Else | ||
rk←GetRegKeyForSALT,'CommandFolder' | ||
regData←##.WinReg.GetString rk | ||
((regData∊'∘°')/regData)←';' | ||
v←';'##.APLTreeUtils.Split regData | ||
:For thisPath :In v | ||
:If ##.FilesAndDirs.Exists thisPath,'Fire/ReadMe.html' | ||
p←thisPath,'Fire/ReadMe.html' | ||
:Leave | ||
:EndIf | ||
:EndFor | ||
:If 0∊⍴p | ||
if←2 ⎕NQ'.' 'GetEnvironment' 'dyalog' ⍝ Get the install folder | ||
:If ~##.FilesAndDirs.Exists p←if,'/Fire/ReadMe.html' | ||
rk←GetFireRegistryKey,'HelpFileFolder' | ||
p←##.WinReg.GetString rk | ||
:EndIf | ||
:EndIf | ||
p←F.NormalizePath p | ||
:EndIf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
ref←FindScript name | ||
⍝ Tries to find `name` and returns a ref pointing to it or ⍬ | ||
⍝ if it cannot find the script in question. | ||
ref←⍬ | ||
:If 9=##.⎕NC name | ||
ref←##.⍎name | ||
:ElseIf (↑1↓⎕RSI).⎕NC name | ||
ref←(↑1↓⎕RSI).⍎name | ||
:Else #.⎕NC name | ||
ref←#.⍎name | ||
:EndIf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz⎕_∆⍙# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
r←{length}FormatDateTime ts;ts2;formatstring;bool;⎕IO;⎕ML;buffer | ||
⍝ Formats the right argument (defaults to `⎕TS` if empty) as a string with:\\ | ||
⍝ 'YYYY-MM-DD HH:MM:SS.MILLISECOND\\ | ||
⍝ The right argument can be one of: | ||
⍝ * A single float (like 20120102030405) representing date and time. | ||
⍝ * A simple vector of length 6 or 7 representing a timestamp (`⎕TS`). | ||
⍝ * A matrix of either floats or vectors (length 6 or 7) representing a DateTime. | ||
⍝ Note that you cannot mix floats and time stamps.\\ | ||
⍝ If the right argument has not 7 but 6 or 3 elements, formatting is done accordingly.\\ | ||
⍝ Via the left argument the length of the right argument can be set to | ||
⍝ ⍬, 3, 6 or 7; default is 6; ⍬ Accepts any length of the right argument which is 3, 6 or 7.\\ | ||
⍝ If the right argument is a... | ||
⍝ * simple vector, a string is returned. | ||
⍝ * matrix, a matrix is returned. | ||
⎕IO←⎕ML←1 | ||
:If 645≡⎕DR ts | ||
:If (⍴⍴ts)∊0 1 | ||
:If 1=⍴,ts | ||
ts←{0∊⍴,⍵:⍬ ⋄ ⎕ML←3 ⋄ ⍎¨(4 2 2 2 2 2/⍳6)⊂14 0⍕⍵}ts | ||
:EndIf | ||
:Else | ||
ts←↑,{0=⍵:6⍴0 ⋄ v←14 0⍕⍵ ⋄ ⎕ML←3 ⋄ ⍎¨(4 2 2 2 2 2/⍳6)⊂v}¨ts | ||
:EndIf | ||
:EndIf | ||
:If ⍬≡length←{2=⎕NC ⍵:⍎⍵ ⋄ 6}'length' | ||
length←''⍴¯1↑⍴ts | ||
:EndIf | ||
:If ~0∊⍴ts | ||
:If 2=⍴⍴ts | ||
buffer←{⍵/⍨0<⊃∘⍴¨⍵~¨⊂' ' 0}↓ts | ||
'Invalid right argument: must be integer'⎕SIGNAL 11/⍨~326 163∊⍨∪⎕DR¨buffer | ||
'Invalid right argument: must not be negative'⎕SIGNAL 11/⍨∨/¯1∊¨×¨buffer | ||
'Invalid right argument: must be simple'⎕SIGNAL 11/⍨1≠∪≡¨buffer | ||
:Else | ||
'Invalid right argument: must be integer'⎕SIGNAL 11/⍨~326 163∊⍨⎕DR ts | ||
'Invalid right argument: must not be negative'⎕SIGNAL 11/⍨¯1∊×,ts | ||
'Invalid right argument: must be simple'⎕SIGNAL 11/⍨1≠≡ts | ||
:EndIf | ||
:EndIf | ||
:If 2=⍴⍴ts | ||
ts2←length↑[2]ts | ||
:Else | ||
ts2←,[0.5]length↑{0∊⍴⍵:⎕TS ⋄ ts}ts | ||
:EndIf | ||
:Select ⊃length | ||
:Case 3 | ||
formatstring←'ZI4,<->,ZI2,<->,ZI2' | ||
:CaseList 6 7 | ||
formatstring←'ZI4,<->,ZI2,<->,ZI2,< >,ZI2,<:>,ZI2,<:>,ZI2' | ||
:Else | ||
'Invalid left argument'⎕SIGNAL 11 | ||
:EndSelect | ||
bool←(ts2∨.≠' ')∧ts2∨.≠0 | ||
r←bool⍀formatstring ⎕FMT(6⌊length)↑[2]bool⌿ts2 | ||
:If 7=2⊃⍴ts2 | ||
r←⊃(↓r),¨{0=⍵:'' ⋄ 0∊⍴⍵~' ':'' ⋄ '.',⍕⍵}¨ts2[;7] | ||
:EndIf | ||
:If 2≠⍴⍴ts | ||
r←,r | ||
:EndIf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
About←{ | ||
⍝ Show the "About" information | ||
msg←⊂'Fire version ',↑{⍺,' - ',⍵}/1↓##.Version | ||
msg,←⊂'' | ||
msg,←⊂'Written by Kai Jaeger ⋄ APL Software Ltd' | ||
msg,←⊂'' | ||
msg,←⊂'http://aplwiki.com/Fire' | ||
##.Question.ShowMsg msg | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
CenterIn←{ | ||
ref←⍵ ⍝ Ref to the parent or to all monitors | ||
sz←⍺ ⍝ Size of the form to be centered. | ||
(pp ps)←ref.(Posn Size) ⍝ Posn & Size of "parent" window. | ||
mh←GetSystemMetrics 15 ⍝ Menu height in pixels; 15=SM_CYMENU. | ||
mi←MonitorInfo ⍬ ⍝ Monitor info. | ||
np←pp-mh,0 ⍝ New Posn inside main app: start with "parent" pos. | ||
np+←0⌈⌊(ps-sz)÷2 ⍝ Center it. | ||
buf←30 10 ⍝ Buffer; Used to force the Dlg away from the brim. | ||
max←⌊(+⌿2 2⍴mi)-sz+buf ⍝ Calc max value. | ||
min←mi[0 1]+buf ⍝ Calc min value. | ||
np←min⌈(np+buf)⌊max ⍝ Calc result. | ||
np | ||
⍝ Returns a vector useful to center dialog ⍺ within ⍵ (size). | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
CenterOnMonitor←{ | ||
⍝ ⍺: the handle of parent form! | ||
0::0 ⍝ On any error get out! | ||
⍵.Type≢'Form':z←0 ⍝ Don't fool with SubForms, Groups, etc. | ||
⍺←{0=⎕NC'#.CAS.rF':0 ⋄ #.CAS.rF.Handle}'' | ||
|
||
⍝ .NET Reference | ||
⎕USING←'' 'System' 'System.Windows.Forms.Screen,System.Windows.Forms.dll' | ||
|
||
⍝ Make pointer object. | ||
6::z←0 ⍝ break out on value error. | ||
ptr←⎕NEW IntPtr ⍺ | ||
|
||
⍝ Do positioning. | ||
scr←System.Windows.Forms.Screen.FromHandle ptr | ||
xL←scr.WorkingArea.X | ||
xR←+/scr.WorkingArea.(X Width) | ||
yT←scr.WorkingArea.Y | ||
yB←+/scr.WorkingArea.(Y Height) | ||
b←yB xR ⍝ bottom-right | ||
t←yT xL ⍝ top-left | ||
|
||
⍵.Posn←t+0⌈0.5×(b-t)-⍵.Size ⍝ Center | ||
|
||
1:z←1 | ||
} |
Oops, something went wrong.