text stringlengths 14 6.51M |
|---|
unit uother;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, StrUtils;
type
TByteArray = array of byte;
function ExtractText(const Str: string; const Delim1, Delim2: char): string;
function ExtractBetween(const Value, A, B: string): string;
procedure Split(Delimiter: char; Str: string; ListOfStrings: TStrings);
function CleanString(Str: string): string;
function NormalizeRequest(Str: string): string;
function StringToByteArray(S: string): TByteArray;
function HexStringToByteArray(S: string): TByteArray;
function ByteArrayToHexString(P: TByteArray): string;
function DynArrayAppend(var V: TByteArray; const R: byte): integer;
function DynArrayAppendByteArray(var V: TByteArray; const R: array of byte): integer;
function StrToByte(const Value: string): TByteArray;
function ByteToString(const Value: TByteArray): string;
function StringToHex(S: string): string;
function HexToString(H: string): string;
function NumStringToBCD(const inStr: string): string;
function BCDToNumString(const inStr: string): string;
function CheckParity(const Data: byte): byte;
implementation
procedure Split(Delimiter: char; Str: string; ListOfStrings: TStrings);
begin
ListOfStrings.Clear;
ListOfStrings.Delimiter := Delimiter;
ListOfStrings.StrictDelimiter := True;
ListOfStrings.DelimitedText := Str;
end;
function ExtractText(const Str: string; const Delim1, Delim2: char): string;
var
pos1, pos2: integer;
begin
Result := '';
pos1 := Pos(Delim1, Str);
pos2 := PosEx(Delim2, Str, Pos1 + 1);
if (pos1 > 0) and (pos2 > pos1) then
Result := Copy(Str, pos1 + 1, pos2 - pos1 - 1);
end;
function ExtractBetween(const Value, A, B: string): string;
var
aPos, bPos: Integer;
begin
result := '';
aPos := Pos(A, Value);
if aPos > 0 then begin
aPos := aPos + Length(A);
bPos := PosEx(B, Value, aPos);
if bPos > 0 then begin
result := Copy(Value, aPos, bPos - aPos);
end;
end;
end;
function CleanString(Str: string): string;
var
i: integer;
S: string;
begin
S := Str;
for i := Length(s) downto 1 do
case Copy(s, i, 1) of
#13, #10: Delete(s, i, 1);
end;
Result := s;
end;
function NormalizeRequest(Str: string): string;
var
St: TStringList;
ss: TStringStream;
i: integer;
begin
Result := '';
St := TStringList.Create;
ss := TStringStream.Create(Str);
try
St.LoadFromStream(ss);
St[0] := StringReplace(St[0], 'utf-8', 'UTF-8', [rfReplaceAll]);
for i := 0 to St.Count - 1 do
Result := Result + Trim(CleanString(St[i]));
finally
ss.Free;
st.Free;
end;
end;
function StringToByteArray(S: string): TByteArray;
var
SLen: int64;
idx: integer;
begin
SLen := Length(S);
SetLength(Result, SLen);
for idx := 1 to SLen do
begin
Result[Pred(idx)] := Ord(S[idx]);
end;
end;
function HexStringToByteArray(S: string): TByteArray;
var
idx: integer;
NibbCnt: integer; // nr of nibbles
ByteCnt: integer; // nr of Bytes
begin
NibbCnt := Length(S);
ByteCnt := NibbCnt shr 1;
SetLength(Result, ByteCnt);
for idx := 0 to Pred(ByteCnt) do
Result[idx] := Hex2Dec(MidStr(S, 1 + idx * 2, 2));
end;
function ByteArrayToHexString(P: TByteArray): string;
var
idx: integer;
begin
Result := '';
for idx := Low(P) to High(P) do
Result := Result + IntToHex(P[idx], 2);
end;
function DynArrayAppend(var V: TByteArray; const R: byte): integer;
begin
Result := Length(V);
SetLength(V, Result + 1);
V[Result] := R;
end;
function DynArrayAppendByteArray(var V: TByteArray; const R: array of byte): integer;
var
L: integer;
begin
Result := Length(V);
L := Length(R);
if L > 0 then
begin
SetLength(V, Result + L);
Move(R[0], V[Result], Sizeof(byte) * L);
end;
end;
function StrToByte(const Value: string): TByteArray;
var
I: integer;
begin
SetLength(Result, Length(Value));
for I := 0 to Length(Value) - 1 do
Result[I] := Byte(Value[I + 1]);
end;
function ByteToString(const Value: TByteArray): string;
var
I: integer;
S: string;
Letra: char;
begin
S := '';
for I := Length(Value) - 1 downto 0 do
begin
letra := Chr(Value[I]);
S := letra + S;
end;
Result := S;
end;
function StringToHex(S: string): string;
var
I: integer;
begin
Result := '';
for I := 1 to length(S) do
Result := Result + IntToHex(Ord(S[i]), 2);
end;
function HexToString(H: string): string;
var
I: integer;
begin
Result := '';
for I := 1 to length(H) div 2 do
Result := Result + char(StrToInt('$' + Copy(H, (I - 1) * 2 + 1, 2)));
end;
function NumStringToBCD(const inStr: string): string;
function Pack(ch1, ch2: char): char;
begin
Assert((ch1 >= '0') and (ch1 <= '9'));
Assert((ch2 >= '0') and (ch2 <= '9'));
{Ord('0') is $30, so we can just use the low nybble of the character
as value.}
Result := Chr((Ord(ch1) and $F) or ((Ord(ch2) and $F) shl 4));
end;
var
i: integer;
begin
if Odd(Length(inStr)) then
Result := NumStringToBCD('0' + instr)
else
begin
SetLength(Result, Length(inStr) div 2);
for i := 1 to Length(Result) do
Result[i] := Pack(inStr[2 * i - 1], inStr[2 * i]);
end;
end;
function BCDToNumString(const inStr: string): string;
procedure UnPack(ch: char; var ch1, ch2: char);
begin
ch1 := Chr((Ord(ch) and $F) + $30);
ch2 := Chr(((Ord(ch) shr 4) and $F) + $30);
Assert((ch1 >= '0') and (ch1 <= '9'));
Assert((ch2 >= '0') and (ch2 <= '9'));
end;
var
i: integer;
begin
SetLength(Result, Length(inStr) * 2);
for i := 1 to Length(inStr) do
UnPack(inStr[i], Result[2 * i - 1], Result[2 * i]);
end;
function CheckParity(const Data: byte): byte;
var
parity, b: byte;
begin
b := 0;
parity := 0;
b := Data;
while b <> 0 do
begin
parity := parity xor b;
b := b shr 1;
end;
Result := (parity and $1);
end;
end.
|
unit U_ListeDC;
interface
uses SysUtils;
type
ListeVide = class(SysUtils.Exception);
IterateurFin = class(SysUtils.Exception);
IterateurDebut = class(SysUtils.Exception);
ELEMENT = CARDINAL;
P_CELLULE = ^CELLULE;
CELLULE = record
elt : ELEMENT;
suiv : P_CELLULE;
prec : P_CELLULE;
end {CELLULE};
P_LISTE = ^LISTE;
LISTE = record
deb : P_CELLULE;
fin : P_CELLULE;
end {record};
ITERATEUR = record
courant : P_CELLULE;
plst : P_LISTE;
end{ITERATEUR};
function nouvelleListe : LISTE;
// CU : la liste a du etre initialisee avec nouvelleListe
function estListeVide (l : LISTE) : BOOLEAN;
// CU : la liste a du etre initialisee avec nouvelleListe
procedure ajouterEnTete(const x : ELEMENT; var l : LISTE);
// CU : la liste a du etre initialisee avec nouvelleListe
procedure ajouterEnQueue(const x : ELEMENT; var l : LISTE);
// CU : la liste doit contenir au moins un element
function iterateurEnDebut (l : P_LISTE) : ITERATEUR;
// CU : la liste doit contenir au moins un element
function iterateurEnFin (l : P_LISTE) : ITERATEUR;
// CU : l'iterateur a du etre initialise avec iterateurEnFin ou
// iterateurEnDebut
function estEnFin (it : ITERATEUR) : BOOLEAN;
// CU : l'iterateur a du etre initialise avec iterateurEnFin ou
// iterateurEnDebut
function estEnDebut (it : ITERATEUR) : BOOLEAN;
// CU : l'iterateur a du etre initialise avec iterateurEnFin ou
// iterateurEnDebut
procedure avancer (var it : ITERATEUR);
// CU : l'iterateur a du etre initialise avec iterateurEnFin ou
// iterateurEnDebut
procedure reculer (var it : ITERATEUR);
// CU : l'iterateur a du etre initialise avec iterateurEnFin ou
// iterateurEnDebut
function valeur (it : ITERATEUR) : ELEMENT;
// CU : l'iterateur a du etre initialise avec iterateurEnFin ou
// iterateurEnDebut
procedure insererAvant (var it : ITERATEUR; const x : ELEMENT);
// CU : l'iterateur a du etre initialise avec iterateurEnFin ou
// iterateurEnDebut
procedure insererApres (var it : ITERATEUR; const x : ELEMENT);
procedure insererTrie(const x: ELEMENT; var l: LISTE);
procedure afficherEndroit(l: LISTE);
procedure afficherEnvers(l: LISTE);
procedure afficherIterateur(it: ITERATEUR);
implementation
function nouvelleListe : LISTE;
var
l : LISTE;
begin
l.deb := NIL;
l.fin := NIL;
nouvelleListe := l;
end {nouvelleListe};
function estListeVide(l : LISTE): BOOLEAN;
begin
estListeVide := (l.deb = NIL) and (l.fin = NIL);
end {estListeVide};
procedure ajouterEnTete (const x : ELEMENT; var l : LISTE);
var
c : P_CELLULE;
begin
new(c);
c.elt := x;
c.suiv := l.deb;
c.prec := NIL;
try
// leve une exception si la liste est vide avant l'insertion
l.deb.prec := c;
except
l.fin := c;
end;
l.deb := c;
end {ajouterEnTete};
procedure ajouterEnQueue(const x : ELEMENT; var l : LISTE);
var
c : P_CELLULE;
begin
new(c);
c.elt := x;
c.suiv := NIL;
c.prec := l.fin;
try
// leve une exception si la liste est vide avant l'insertion
l.fin^.suiv := c;
except
l.deb := c;
end;
l.fin := c;
end {ajouterEnQueue};
function iterateurEnDebut (l : P_LISTE) : ITERATEUR;
var res: ITERATEUR;
begin
res.plst:= l;
if (not(estListeVide(l^))) then begin
res.courant:= l^.deb;
iterateurEnDebut:= res;
end else
raise ListeVide.create('la liste est vide.');
end{iterateurEnDebut};
function iterateurEnFin (l : P_LISTE) : ITERATEUR;
var res: ITERATEUR;
begin
res.plst:= l;
if (not(estListeVide(l^))) then begin
res.courant:= l^.fin;
iterateurEnFin:= res;
end else
raise ListeVide.create('la liste est vide.');
end{iterateurEnFin};
function estEnFin (it : ITERATEUR) : BOOLEAN;
begin
estEnFin:= (it.courant = it.plst^.fin);
end{estEnFin};
function estEnDebut (it : ITERATEUR) : BOOLEAN;
begin
estEnDebut:= (it.courant = it.plst^.deb);
end{estEnDebut};
procedure avancer (var it : ITERATEUR);
begin
if (not(estEnFin(it))) then
it.courant:= it.courant^.suiv
else
raise IterateurFin.create('iterateur en fin.');
end{avancer};
procedure reculer (var it : ITERATEUR);
begin
if (not(estEnDebut(it))) then
it.courant:= it.courant^.prec
else
raise IterateurDebut.create('iterateur en debut.');
end{reculer};
function valeur (it : ITERATEUR) : ELEMENT;
begin
valeur:= it.courant^.elt;
end{valeur};
procedure insererAvant (var it : ITERATEUR ; const x : ELEMENT);
var
c : P_CELLULE;
begin
TRY
new(c);
c^.elt:= x;
c^.suiv:= it.courant;
c^.prec:= it.courant^.prec;
it.courant^.prec^.suiv:= c;
it.courant^.prec:= c;
it.courant:= c;
EXCEPT // si la liste ne contient que un seul élement
ajouterEnTete(x,it.plst^);
reculer(it);
END;
end{insererAvant};
procedure insererApres (var it : ITERATEUR; const x : ELEMENT);
var
c : P_CELLULE;
begin
TRY
new(c);
c^.elt:= x;
c^.prec:= it.courant;
c^.suiv:= it.courant^.suiv;
it.courant^.suiv^.prec:= c;
it.courant^.suiv:= c;
it.courant:= c;
EXCEPT // si la liste ne contient que un seul élement
ajouterEnQueue(x,it.plst^);
avancer(it);
END;
end{insererApres};
procedure insererTrie(const x: ELEMENT; var l: LISTE);
var
it: ITERATEUR;
trouve: BOOLEAN;
begin
it:= iterateurEnDebut(@l);
trouve:= false;
while ((not(estEnFin(it))) AND not(trouve)) do begin
if (valeur(it) <= x) then
avancer(it)
else begin
insererAvant(it,x);
trouve:= true;
end;
end;
if not(trouve) then begin
if (valeur(it) <= x) then
insererApres(it,x)
else
insererAvant(it,x);
end;
end{insererTrie};
procedure afficherEndroit(l: LISTE);
var
it: ITERATEUR;
begin
TRY
write('[');
it:= iterateurEnDebut(@l);
while (not(estEnFin(it))) do begin
write(valeur(it),',');
avancer(it);
end;
write(valeur(it),']');
EXCEPT
on ListeVide do writeln('La liste est vide.');
END;
end{afficherEndroit};
procedure afficherEnvers(l: LISTE);
var
it: ITERATEUR;
begin
TRY
write('[');
it:= iterateurEnFin(@l);
while (not(estEnDebut(it))) do begin
write(valeur(it),',');
reculer(it);
end;
write(valeur(it),']');
EXCEPT
on ListeVide do writeln('La liste est vide.');
END;
end{afficherEnvers};
procedure afficherIterateur(it: ITERATEUR);
var
it2: ITERATEUR;
fini: boolean = false;
begin
TRY
write(' ');
it2:= iterateurEnDebut(it.plst);
while (not(estEnFin(it2))) and not(fini) do begin
if (it2.courant = it.courant) then
begin
write('^');
fini:= true;
end
else begin
if valeur(it2) >=10 then
write(' ')
else
write(' ');
avancer(it2);
end;
write(' ');
end;
if ((it2.courant = it.courant) and not(fini)) then write('^') else write(' ');
EXCEPT
on ListeVide do writeln('La liste est vide.');
END;
end{afficherIterateur};
end {U_ListeDC}.
|
unit Comaker;
interface
uses
Entity, ADODB, DB, Employer;
type
TComaker = class(TEntity)
private
FName: string;
FComakeredLoans: integer;
FEmployer: TEmployer;
function GetHasId: boolean;
public
procedure Add; override;
procedure Save; override;
procedure Edit; override;
procedure Cancel; override;
procedure Retrieve;
procedure CopyAddress;
property Name: string read FName write FName;
property ComakeredLoans: integer read FComakeredLoans write FComakeredLoans;
property Employer: TEmployer read FEmployer write FEmployer;
property HasId: boolean read GetHasId;
constructor Create; overload;
constructor Create(const id: string); overload;
constructor Create(const name, id: string); overload;
end;
var
cm: TComaker;
implementation
uses
ComakerData;
constructor TComaker.Create;
begin
inherited Create;
end;
constructor TComaker.Create(const id: string);
begin
FId := id;
end;
constructor TComaker.Create(const name, id: string);
begin
FName := name;
FId := id;
end;
procedure TComaker.Add;
var
i: integer;
begin
with dmComaker do
begin
for i:=0 to ComponentCount - 1 do
begin
if Components[i] is TADODataSet then
begin
if (Components[i] as TADODataSet).Tag <> 0 then
begin
(Components[i] as TADODataSet).Open;
(Components[i] as TADODataSet).Append;
end;
end;
end;
end;
end;
procedure TComaker.Save;
var
i: integer;
begin
with dmComaker do
begin
for i:=0 to ComponentCount - 1 do
if Components[i] is TADODataSet then
if (Components[i] as TADODataSet).State in [dsInsert,dsEdit] then
(Components[i] as TADODataSet).Post;
end;
end;
procedure TComaker.Edit;
begin
end;
procedure TComaker.Cancel;
begin
end;
procedure TComaker.Retrieve;
var
i: integer;
begin
with dmComaker do
begin
for i:=0 to ComponentCount - 1 do
begin
if Components[i] is TADODataSet then
begin
(Components[i] as TADODataSet).Open;
if (Components[i] as TADODataSet).Tag in [1] then
if (Components[i] as TADODataSet).RecordCount > 0 then
(Components[i] as TADODataSet).Edit;
end;
end;
end;
end;
procedure TComaker.CopyAddress;
var
i: integer;
begin
with dmComaker, dmComaker.dstAddressInfo do
begin
if dstAddressInfo2.RecordCount > 0 then
dstAddressInfo2.Edit
else
dstAddressInfo2.Append;
for i := 0 to FieldCount - 1 do
if dstAddressInfo2.Fields.FindField(Fields[i].FieldName) <> nil then
if not dstAddressInfo2.Fields[i].ReadOnly then
dstAddressInfo2.FieldByName(Fields[i].FieldName).Value := FieldByName(Fields[i].FieldName).Value;
end;
end;
function TComaker.GetHasId;
begin
Result := FId <> '';
end;
end.
|
unit ATipoFundo;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, formularios,
Componentes1, ExtCtrls, PainelGradiente, BotaoCadastro, StdCtrls, Buttons,
Db, Mask, DBCtrls, DBTables, Tabela, CBancoDados, Grids, DBGrids,
DBKeyViolation, Localizacao, DBClient;
type
TFTipoFundo = class(TFormularioPermissao)
PainelGradiente1: TPainelGradiente;
PanelColor1: TPanelColor;
PanelColor2: TPanelColor;
BotaoCadastrar1: TBotaoCadastrar;
BotaoAlterar1: TBotaoAlterar;
BotaoExcluir1: TBotaoExcluir;
BotaoGravar1: TBotaoGravar;
BotaoCancelar1: TBotaoCancelar;
BFechar: TBitBtn;
MoveBasico1: TMoveBasico;
TipoFundo: TRBSQL;
TipoFundoI_COD_FUN: TFMTBCDField;
TipoFundoC_NOM_FUN: TWideStringField;
Label1: TLabel;
DataTipoFundo: TDataSource;
Label2: TLabel;
DBEdit2: TDBEditColor;
Codigo: TDBKeyViolation;
Bevel1: TBevel;
Label3: TLabel;
Consulta: TLocalizaEdit;
GridIndice1: TGridIndice;
TipoFundoD_ULT_ALT: TSQLTimeStampField;
procedure FormCreate(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure GridIndice1Ordem(Ordem: String);
procedure BFecharClick(Sender: TObject);
procedure TipoFundoAfterInsert(DataSet: TDataSet);
procedure TipoFundoAfterEdit(DataSet: TDataSet);
procedure TipoFundoBeforePost(DataSet: TDataSet);
procedure TipoFundoAfterPost(DataSet: TDataSet);
private
{ Private declarations }
public
{ Public declarations }
end;
var
FTipoFundo: TFTipoFundo;
implementation
uses APrincipal, UnSistema;
{$R *.DFM}
{ ****************** Na criação do Formulário ******************************** }
procedure TFTipoFundo.FormCreate(Sender: TObject);
begin
{ abre tabelas }
{ chamar a rotina de atualização de menus }
Consulta.AtualizaConsulta;
end;
{ ******************* Quando o formulario e fechado ************************** }
procedure TFTipoFundo.FormClose(Sender: TObject; var Action: TCloseAction);
begin
{ fecha tabelas }
{ chamar a rotina de atualização de menus }
TipoFundo.free;
Action := CaFree;
end;
{(((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((
Ações Diversas
)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))}
{******************************************************************************}
procedure TFTipoFundo.GridIndice1Ordem(Ordem: String);
begin
Consulta.AOrdem := Ordem;
end;
{******************************************************************************}
procedure TFTipoFundo.BFecharClick(Sender: TObject);
begin
close;
end;
{******************************************************************************}
procedure TFTipoFundo.TipoFundoAfterInsert(DataSet: TDataSet);
begin
Codigo.ReadOnly := false;
Codigo.ProximoCodigo;
end;
{******************************************************************************}
procedure TFTipoFundo.TipoFundoAfterPost(DataSet: TDataSet);
begin
Sistema.MarcaTabelaParaImportar('CADTIPOFUNDO');
end;
{******************************************************************************}
procedure TFTipoFundo.TipoFundoAfterEdit(DataSet: TDataSet);
begin
Codigo.ReadOnly := true;
end;
{******************************************************************************}
procedure TFTipoFundo.TipoFundoBeforePost(DataSet: TDataSet);
begin
if TipoFundo.State = dsinsert then
Codigo.VerificaCodigoUtilizado;
TipoFundoD_ULT_ALT.AsDateTime := Sistema.RDataServidor;
end;
Initialization
{ *************** Registra a classe para evitar duplicidade ****************** }
RegisterClasses([TFTipoFundo]);
end.
|
unit fODChangeEvtDisp;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
fAutoSz, StdCtrls, ORFn, ExtCtrls, ORCtrls, VA508AccessibilityManager;
type
TfrmChangeEventDisp = class(TfrmAutoSz)
lblTop: TMemo;
pnlTop: TPanel;
lstCVOrders: TCaptionListBox;
pnlBottom: TPanel;
cmdOK: TButton;
cmdCancel: TButton;
procedure lstCVOrdersDrawItem(Control: TWinControl; Index: Integer;
Rect: TRect; State: TOwnerDrawState);
procedure lstCVOrdersMeasureItem(Control: TWinControl; Index: Integer;
var AHeight: Integer);
procedure cmdOKClick(Sender: TObject);
procedure cmdCancelClick(Sender: TObject);
private
FOKPressed: boolean;
public
{ Public declarations }
end;
function DispOrdersForEventChange(AnOrderList: TList; ACap: string): boolean;
implementation
{$R *.DFM}
uses rOrders;
function DispOrdersForEventChange(AnOrderList: TList; ACap: string): boolean;
var
frmChangeEventDisp: TfrmChangeEventDisp;
i: integer;
AnOrder: TOrder;
begin
frmChangeEventDisp := TFrmChangeEventDisp.Create(Application);
frmChangeEventDisp.lblTop.Text := ACap;
frmChangeEventDisp.lstCVOrders.Caption := ACap;
for i := 0 to AnOrderList.Count - 1 do
begin
AnOrder := TOrder(AnOrderList[i]);
frmChangeEventDisp.lstCVOrders.Items.Add(AnOrder.Text);
end;
frmChangeEventDisp.ShowModal;
Result := frmChangeEventDisp.FOKPressed;
end;
procedure TfrmChangeEventDisp.lstCVOrdersDrawItem(Control: TWinControl;
Index: Integer; Rect: TRect; State: TOwnerDrawState);
var
x: string;
ARect: TRect;
begin
inherited;
x := '';
ARect := Rect;
with lstCVOrders do
begin
Canvas.FillRect(ARect);
Canvas.Pen.Color := Get508CompliantColor(clSilver);
Canvas.MoveTo(0, ARect.Bottom - 1);
Canvas.LineTo(ARect.Right, ARect.Bottom - 1);
if Index < Items.Count then
begin
x := Items[Index];
DrawText(Canvas.handle, PChar(x), Length(x), ARect, DT_LEFT or DT_NOPREFIX or DT_WORDBREAK);
end;
end;
end;
procedure TfrmChangeEventDisp.lstCVOrdersMeasureItem(Control: TWinControl;
Index: Integer; var AHeight: Integer);
var
x:string;
ARect: TRect;
begin
inherited;
AHeight := MainFontHeight + 3;
with lstCVOrders do if Index < Items.Count then
begin
x := Items[index];
ARect := ItemRect(Index);
AHeight := DrawText(Canvas.Handle, PChar(x), Length(x), ARect,
DT_CALCRECT or DT_LEFT or DT_NOPREFIX or DT_WORDBREAK) + 2;
if AHeight > 255 then AHeight := 255;
if AHeight < 13 then AHeight := 13;
end;
end;
procedure TfrmChangeEventDisp.cmdOKClick(Sender: TObject);
begin
inherited;
FOKPressed := True;
Close;
end;
procedure TfrmChangeEventDisp.cmdCancelClick(Sender: TObject);
begin
inherited;
FOKPressed := False;
Close;
end;
end.
|
Unit REMDiskListModel;
Interface
Uses
Windows, ComCtrls, ListModel,
RemDiskDll, RemDiskClass, Generics.Collections;
Type
TRemDiskListModel = Class (TListModel<TRemDisk>)
Private
FDiskList : TList<TRemDisk>;
FDiskMap : TDictionary<Cardinal, TRemDisk>;
Protected
Function GetColumn(AItem:TRemDisk; ATag:NativeUInt):WideString; Override;
Procedure FreeItem(AItem:TRemDisk); Override;
Function _Item(AIndex:Integer):TRemDisk; Override;
Function GetImageIndex(AItem:TRemDisk):Integer; Override;
Public
Constructor Create(ADisplayer:TListView); Reintroduce;
Destructor Destroy; Override;
Function RowCount:Cardinal; Override;
Function Update:Cardinal; Override;
end;
Implementation
Uses
SysUtils, Utils;
Constructor TRemDiskListModel.Create(ADisplayer:TListView);
begin
FDiskList := TList<TRemDisk>.Create;
FDiskMap := TDictionary<Cardinal, TRemDisk>.Create;
Inherited Create(ADisplayer);
end;
Destructor TRemDiskListModel.Destroy;
Var
rd : TRemDisk;
begin
FDiskMap.Free;
For rd In FDiskList Do
FreeItem(rd);
FDiskList.Free;
Inherited Destroy;
end;
Procedure TRemDiskListModel.FreeItem(AItem:TRemDisk);
begin
AItem.Free;
end;
Function TRemDiskListModel.GetColumn(AItem:TRemDisk; ATag:NativeUInt):WideString;
begin
Case ATag Of
0 : Result := '0x' + IntToHex(AItem.DiskNumber, 2);
1 : Result := TRemDisk.TypeToString(AItem.DiskType);
2 : Result := Format('%u MB', [AItem.DiskSize Div (1024*1024)]);
3 : Result := TRemDisk.FlagsToString(AItem.Flags);
4 : Result := TRemDisk.StateToString(AItem.State);
5 : Result := AItem.FileName;
6 : Result := GetDiskDriveLetters(AItem.DiskNumber);
end;
end;
Function TRemDiskListModel.GetImageIndex(AItem:TRemDisk):Integer;
begin
Result := Inherited GetImageIndex(AItem);
Case AItem.DiskType Of
rdtRAMDisk : Result := 8;
rdtFileDisk : Result := 9;
end;
end;
Function TRemDiskListModel.Update:Cardinal;
Var
found : Boolean;
I, J : Integer;
rd : TRemDisk;
rdMap : TRemDisk;
l : TList<TRemDisk>;
begin
l := TList<TRemDisk>.Create;
Result := TRemDisk.Enumerate(l);
If Result = ERROR_SUCCESS Then
begin
I := 0;
While (I < FDisklist.Count) Do
begin
rd := FDiskList[I];
found := False;
For J := 0 To l.Count - 1 Do
begin
found := l[J].DiskNumber = rd.DiskNumber;
If found Then
Break;
end;
If Not found Then
begin
FDiskList.Delete(I);
FDiskMap.Remove(rd.DiskNumber);
rd.Free;
Continue;
end;
Inc(I);
end;
For rd In l Do
begin
If FDiskMap.TryGetValue(rd.DiskNumber, rdMap) Then
begin
rdMap.RefreshFromClass(rd);
rd.Free;
end
Else begin
FDiskMap.Add(rd.DiskNumber, rd);
FDiskList.Add(rd);
end;
end;
If Assigned(Displayer) Then
begin
Displayer.Items.Count := FDiskList.Count;
Displayer.Invalidate;
end;
end;
l.Free;
end;
Function TRemDiskListModel._Item(AIndex:Integer):TRemDisk;
begin
Result := FDiskList[AIndex];
end;
Function TRemDiskListModel.RowCount:Cardinal;
begin
Result := FDiskList.Count;
end;
End.
|
unit f03_findCategory;
interface
uses
utilitas,
buku_handler;
{ KAMUS }
var
inp : string;
kategori : array [1..5] of string = ('sastra','sains','manga','sejarah','programming');
{ DEKLARASI FUNGSI DAN PROSEDUR }
procedure filter_kategori(var data_bersih : tabel_buku; data_kotor : tabel_buku; kategori_valid : string);
function cek_kategori(inp : string) : boolean;
procedure urutkan(var data_input : tabel_buku);
procedure cetak(data_input : tabel_buku);
procedure cari_kategori(data_buku : tabel_buku);
{ IMPLEMENTASI FUNGSI DAN PROSEDUR }
implementation
procedure filter_kategori(var data_bersih : tabel_buku; data_kotor : tabel_buku; kategori_valid : string);
{ DESKRIPSI : fungsi untuk memfilter data_kotor sehingga menjadi data_bersih dengan isi data sesuai dengan kategori_valid }
{ PARAMETER : data_bersih dan data_kotor dengan tipe bentukan tabel_buku, kategori yang benar dengan tipe string }
{ KAMUS LOKAL }
var
i: integer;
{ ALGORITMA }
begin
data_bersih.t[0] := data_kotor.t[0];
data_bersih.sz := data_bersih.sz+1;
for i := 1 to data_kotor.sz-1 do
begin
if((data_kotor.t[i].Kategori = kategori_valid)) then
begin
// writeln('ok');
data_bersih.t[data_bersih.sz] := data_kotor.t[i];
data_bersih.sz := data_bersih.sz+1;
end;
end;
end;
function cek_kategori(inp : string) : boolean;
{ DESKRIPSI : fungsi untuk memeriksa apakah kategori masukan merupakan kategori yang valid }
{ PARAMETER : kategori yang akan diperiksa, berupa tipe string }
{ RETURN : boolean }
{ KAMUS LOKAL }
var
i : integer;
found : boolean;
{ ALGORITMA }
begin
found := false;
i := 1;
while((found <> true) and (i <= 5)) do
begin
if(inp = kategori[i]) then found := true else i := i + 1;
end;
cek_kategori := found;
end;
procedure urutkan(var data_input : tabel_buku);
{ DESKRIPSI : prosedur untuk mengurutkan data buku yang sudah di filter }
{ PARAMETER : data_buku berupa tipekan tabel_buku }
{ KAMUS LOKAL }
var
i, j, rc : integer;
temp : buku;
{ ALGORITMA }
begin
rc := data_input.sz;
{ SKEMA PENGURUTAN }
// Algoritma yang digunakan adalah bubble sort
for i:=1 to rc do
begin
for j := 1 to rc-i-1 do
begin
if(data_input.t[j].Judul_Buku > data_input.t[j+1].Judul_Buku) then
begin
// Menukar kedua data jika lebih besar
temp := data_input.t[j];
data_input.t[j] := data_input.t[j+1];
data_input.t[j+1] := temp;
end;
end;
end;
end;
procedure cetak(data_input : tabel_buku);
{ DESKRIPSI : prosedur untuk mencetak data buku ke layar }
{ PARAMETER : data buku berupa tipe bentukan tabel_buku }
{ KAMUS LOKAL }
var
i : integer;
{ ALGORITMA }
begin
for i := 1 to data_input.sz-1 do
begin
writeln(data_input.t[i].ID_Buku, ' | ', data_input.t[i].Judul_Buku, ' | ', data_input.t[i].Author);
end;
end;
procedure cari_kategori(data_buku : tabel_buku);
{ DESKRIPSI : procedure untuk mencari semua data buku yang sesuai dengan kategori masukan, lalu mencetaknya ke layar }
{ PARAMETER : data buku berupa tipe bentukan tabel_buku }
{ KAMUS LOKAL }
var
data_bersih : tabel_buku;
{ ALGORITMA }
begin
write('Masukkan kategori: ');
readln(inp);
while(cek_kategori(inp)<>true) do
begin
writeln('Kategori ', inp, ' tidak valid.');
write('Masukkan kategori: ');
readln(inp);
end;
data_bersih.sz := 0;
filter_kategori(data_bersih, data_buku, inp);
if(data_bersih.sz=1) then writeln('Tidak ada buku dalam kategori ini.')
else
begin
urutkan(data_bersih);
cetak(data_bersih);
end;
end;
end. |
unit IdHeaderCoder;
interface
uses
IdEmailAddress;
type
TTransfer = (bit7, bit8, iso2022jp);
CSET = set of Char;
const
csSPECIALS: CSET = ['(', ')', '[', ']', '<', '>', ':', ';',
'.', ',', '@', '\', '"'];
kana_tbl: array[#$A1..#$DF] of Word = (
$2123, $2156, $2157, $2122, $2126, $2572, $2521, $2523, $2525, $2527,
$2529, $2563, $2565, $2567, $2543, $213C, $2522, $2524, $2526, $2528,
$252A, $252B, $252D, $252F, $2531, $2533, $2535, $2537, $2539, $253B,
$253D, $253F, $2541, $2544, $2546, $2548, $254A, $254B, $254C, $254D,
$254E, $254F, $2552, $2555, $2558, $255B, $255E, $255F, $2560, $2561,
$2562, $2564, $2566, $2568, $2569, $256A, $256B, $256C, $256D, $256F,
$2573, $212B, $212C);
vkana_tbl: array[#$A1..#$DF] of Word = (
$0000, $0000, $0000, $0000, $0000, $0000, $0000, $0000, $0000, $0000,
$0000, $0000, $0000, $0000, $0000, $0000, $0000, $0000, $2574, $0000,
$0000, $252C, $252E, $2530, $2532, $2534, $2536, $2538, $253A, $253C,
$253E, $2540, $2542, $2545, $2547, $2549, $0000, $0000, $0000, $0000,
$0000, $2550, $2553, $2556, $2559, $255C, $0000, $0000, $0000, $0000,
$0000, $0000, $0000, $0000, $0000, $0000, $0000, $0000, $0000, $0000,
$0000, $0000, $0000);
sj1_tbl: array[#128..#255] of Byte = (
$00, $21, $23, $25, $27, $29, $2B, $2D, $2F, $31, $33, $35, $37, $39, $3B,
$3D,
$3F, $41, $43, $45, $47, $49, $4B, $4D, $4F, $51, $53, $55, $57, $59, $5B,
$5D,
$00, $01, $01, $01, $01, $01, $01, $01, $01, $01, $01, $01, $01, $01, $01,
$01,
$01, $01, $01, $01, $01, $01, $01, $01, $01, $01, $01, $01, $01, $01, $01,
$01,
$01, $01, $01, $01, $01, $01, $01, $01, $01, $01, $01, $01, $01, $01, $01,
$01,
$01, $01, $01, $01, $01, $01, $01, $01, $01, $01, $01, $01, $01, $01, $01,
$01,
$5F, $61, $63, $65, $67, $69, $6B, $6D, $6F, $71, $73, $75, $77, $79, $7B,
$7D,
$02, $02, $02, $02, $02, $02, $02, $02, $02, $02, $02, $02, $02, $00, $00,
$00);
sj2_tbl: array[Char] of Word = (
$0000, $0000, $0000, $0000, $0000, $0000, $0000, $0000, $0000, $0000,
$0000, $0000, $0000, $0000, $0000, $0000, $0000, $0000, $0000, $0000,
$0000, $0000, $0000, $0000, $0000, $0000, $0000, $0000, $0000, $0000,
$0000, $0000, $0000, $0000, $0000, $0000, $0000, $0000, $0000, $0000,
$0000, $0000, $0000, $0000, $0000, $0000, $0000, $0000, $0000, $0000,
$0000, $0000, $0000, $0000, $0000, $0000, $0000, $0000, $0000, $0000,
$0000, $0000, $0000, $0000, $0021, $0022, $0023, $0024, $0025, $0026,
$0027, $0028, $0029, $002A, $002B, $002C, $002D, $002E, $002F, $0030,
$0031, $0032, $0033, $0034, $0035, $0036, $0037, $0038, $0039, $003A,
$003B, $003C, $003D, $003E, $003F, $0040, $0041, $0042, $0043, $0044,
$0045, $0046, $0047, $0048, $0049, $004A, $004B, $004C, $004D, $004E,
$004F, $0050, $0051, $0052, $0053, $0054, $0055, $0056, $0057, $0058,
$0059, $005A, $005B, $005C, $005D, $005E, $005F, $0000, $0060, $0061,
$0062, $0063, $0064, $0065, $0066, $0067, $0068, $0069, $006A, $006B,
$006C, $006D, $006E, $006F, $0070, $0071, $0072, $0073, $0074, $0075,
$0076, $0077, $0078, $0079, $007A, $007B, $007C, $007D, $007E, $0121,
$0122, $0123, $0124, $0125, $0126, $0127, $0128, $0129, $012A, $012B,
$012C, $012D, $012E, $012F, $0130, $0131, $0132, $0133, $0134, $0135,
$0136, $0137, $0138, $0139, $013A, $013B, $013C, $013D, $013E, $013F,
$0140, $0141, $0142, $0143, $0144, $0145, $0146, $0147, $0148, $0149,
$014A, $014B, $014C, $014D, $014E, $014F, $0150, $0151, $0152, $0153,
$0154, $0155, $0156, $0157, $0158, $0159, $015A, $015B, $015C, $015D,
$015E, $015F, $0160, $0161, $0162, $0163, $0164, $0165, $0166, $0167,
$0168, $0169, $016A, $016B, $016C, $016D, $016E, $016F, $0170, $0171,
$0172, $0173, $0174, $0175, $0176, $0177, $0178, $0179, $017A, $017B,
$017C, $017D, $017E, $0000, $0000, $0000);
base64_tbl: array[0..63] of Char = (
'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H',
'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P',
'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X',
'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f',
'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n',
'o', 'p', 'q', 'r', 's', 't', 'u', 'v',
'w', 'x', 'y', 'z', '0', '1', '2', '3',
'4', '5', '6', '7', '8', '9', '+', '/');
function EncodeHeader(const Header: string; specials: CSET; const
HeaderEncoding: Char;
TransferHeader: TTransfer; MimeCharSet: string): string;
function Encode2022JP(const S: string): string;
function EncodeAddress(EmailAddr: TIdEMailAddressList; const HeaderEncoding:
Char;
TransferHeader: TTransfer; MimeCharSet: string): string;
function EncodeAddressItem(EmailAddr: TIdEmailAddressItem; const HeaderEncoding:
Char;
TransferHeader: TTransfer; MimeCharSet: string): string;
function DecodeHeader(Header: string): string;
function Decode2022JP(const S: string): string;
procedure DecodeAddress(EMailAddr: TIdEmailAddressItem);
procedure DecodeAddresses(AEMails: string; EMailAddr: TIdEmailAddressList);
procedure InitializeMime(var TransferHeader: TTransfer; var HeaderEncoding:
char;
var MimeCharSet: string);
implementation
uses
IdGlobal,
SysUtils;
function B64(AChar: Char): Byte;
var
i: Integer;
begin
for i := 0 to SizeOf(base64_tbl) do
begin
if AChar = base64_tbl[i] then
begin
Result := i;
exit;
end;
end;
Result := 0;
end;
function DecodeHeader(Header: string): string;
var
i, l: Integer;
HeaderEncoding,
HeaderCharSet,
s: string;
a3: array[1..3] of byte;
a4: array[1..4] of byte;
begin
if Pos('=?ISO', UpperCase(Header)) > 0 then
begin
for i := 1 to 3 do
begin
l := Pos('?', Header);
Header := Copy(Header, l + 1, Length(Header) - l + 1);
if i = 1 then
HeaderCharSet := Copy(Header, 1, Pos('?', Header) - 1)
else
if i = 2 then
HeaderEncoding := Header[1];
end;
if AnsiSameText(HeaderEncoding, 'Q') then
begin
i := 1;
repeat
if Header[i] = '_' then
s := s + ' '
else
if Header[i] = '=' then
begin
s := s + chr(StrToInt('$' + Header[i + 1] + Header[i + 2]));
inc(i, 2);
end
else
s := s + Header[i];
inc(i);
until (Header[i] = '?') and (Header[i + 1] = '=')
end
else
begin
while Length(Header) >= 4 do
begin
a4[1] := b64(Header[1]);
a4[2] := b64(Header[2]);
a4[3] := b64(Header[3]);
a4[4] := b64(Header[4]);
a3[1] := (a4[1] shl 2) or (a4[2] shr 4);
a3[2] := (a4[2] shl 4) or (a4[3] shr 2);
a3[3] := (a4[3] shl 6) or (a4[4] shr 0);
Header := Copy(Header, 5, Length(Header));
s := s + CHR(a3[1]) + CHR(a3[2]) + CHR(a3[3]);
end;
end;
if AnsiSameText(HeaderCharSet, 'ISO-2022-JP') then
result := Decode2022JP(s)
else
Result := s;
end
else
Result := Header;
end;
function Decode2022JP(const S: string): string;
var
T: string;
I, L: integer;
isK: Boolean;
K1, K2: byte;
K3: byte;
begin
T := '';
isK := False;
L := length(S);
I := 1;
while I <= L do
begin
if S[I] = #27 then
begin
Inc(I);
if I + 1 <= L then
begin
if Copy(S, I, 2) = '$B' then
isK := True
else
if Copy(S, I, 2) = '(B' then
isK := False;
Inc(I, 2);
end;
end
else
begin
if isK then
begin
if I + 1 <= L then
begin
K1 := byte(S[I]);
K2 := byte(S[I + 1]);
K3 := (K1 - 1) shr 1;
if K1 < 95 then
K3 := K3 + 113
else
K3 := K3 + 177;
if (K1 mod 2) = 1 then
begin
if K2 < 96 then
K2 := K2 + 31
else
K2 := K2 + 32
end
else
K2 := K2 + 126;
T := T + char(K3) + char(k2);
Inc(I, 2);
end
else
Inc(I);
end
else
begin
T := T + S[I];
Inc(I);
end;
end;
end;
Result := T;
end;
procedure InitializeMime(var TransferHeader: TTransfer; var HeaderEncoding:
char;
var MimeCharSet: string);
begin
TransferHeader := bit8;
HeaderEncoding := 'B';
case GetSystemLocale of
csGB2312: MimeCharSet := 'GB2312';
csBig5: MimeCharSet := 'Big5';
csIso2022jp:
begin
MimeCharSet := 'ISO-2022-JP';
TransferHeader := iso2022jp
end;
csEUCKR: MimeCharSet := 'EUC-KR';
else
MimeCharSet := 'ISO-8859-1';
HeaderEncoding := 'Q';
end;
end;
procedure DecodeAddress(EMailAddr: TIdEmailAddressItem);
begin
EMailAddr.Name := DecodeHeader(EMailAddr.Name);
end;
procedure DecodeAddresses(AEMails: string; EMailAddr: TIdEmailAddressList);
var
idx: Integer;
begin
idx := 0;
EMailAddr.EMailAddresses := AEMails;
while idx < EMailAddr.Count do
begin
DecodeAddress(EMailAddr[idx]);
inc(idx);
end;
end;
function EncodeAddressItem(EmailAddr: TIdEmailAddressItem; const HeaderEncoding:
Char;
TransferHeader: TTransfer; MimeCharSet: string): string;
var
S: string;
I: Integer;
NeedEncode: Boolean;
begin
if EmailAddr.Name <> '' then
begin
NeedEncode := False;
for I := 1 to Length(EmailAddr.Name) do
begin
if (EmailAddr.Name[I] < #32) or (EmailAddr.Name[I] >= #127) then
begin
NeedEncode := True;
Break;
end;
end;
if NeedEncode then
S := EncodeHeader(EmailAddr.Name, csSPECIALS, HeaderEncoding,
TransferHeader, MimeCharSet)
else
begin
S := '"';
for I := 1 to Length(EmailAddr.Name) do
begin
if (EmailAddr.Name[I] = '\') or (EmailAddr.Name[I] = '"') then
S := S + '\';
S := S + EmailAddr.Name[I];
end;
S := S + '"';
end;
Result := Format('%s <%s>', [S, EmailAddr.Address])
end
else
Result := Format('%s', [EmailAddr.Address]);
end;
function EncodeAddress(EmailAddr: TIdEMailAddressList; const HeaderEncoding:
Char;
TransferHeader: TTransfer; MimeCharSet: string): string;
var
idx: Integer;
begin
Result := '';
idx := 0;
while (idx < EmailAddr.Count) do
begin
Result := Result + ', ' + EncodeAddressItem(EMailAddr[idx], HeaderEncoding,
TransferHeader, MimeCharSet);
Inc(idx);
end;
System.Delete(Result, 1, 2);
end;
function Encode2022JP(const S: string): string;
const
desig_asc = #27'(B';
desig_jis = #27'$B';
var
T: string;
I, L: Integer;
isK: Boolean;
K1: Byte;
K2, K3: Word;
begin
T := '';
isK := False;
L := Length(S);
I := 1;
while I <= L do
begin
if S[I] < #128 then
begin
if isK then
begin
T := T + desig_asc;
isK := False;
end;
T := T + S[I];
INC(I);
end
else
begin
K1 := sj1_tbl[S[I]];
case K1 of
0: INC(I);
2: INC(I, 2);
1:
begin
if not isK then
begin
T := T + desig_jis;
isK := True;
end;
K2 := kana_tbl[S[I]];
if (I < L) and (Ord(S[I + 1]) and $FE = $DE) then
begin
K3 := vkana_tbl[S[I]];
case S[I + 1] of
#$DE:
if K3 <> 0 then
begin
K2 := K3;
INC(I);
end;
#$DF:
if (K3 >= $2550) and (K3 <= $255C) then
begin
K2 := K3 + 1;
INC(I);
end;
end;
end;
T := T + Chr(K2 shr 8) + Chr(K2 and $FF);
INC(I);
end;
else
if (I < L) then
begin
K2 := sj2_tbl[S[I + 1]];
if K2 <> 0 then
begin
if not isK then
begin
T := T + desig_jis;
isK := True;
end;
T := T + Chr(K1 + K2 shr 8) + Chr(K2 and $FF);
end;
end;
INC(I, 2);
end;
end;
end;
if isK then
T := T + desig_asc;
Result := T;
end;
function EncodeHeader(const Header: string; specials: CSET; const
HeaderEncoding: Char;
TransferHeader: TTransfer; MimeCharSet: string): string;
const
SPACES: set of Char = [' ', #9, #10, #13];
var
S, T: string;
L, P, Q, R: Integer;
B0, B1, B2: Integer;
InEncode: Integer;
NeedEncode: Boolean;
csNeedEncode, csReqQuote: CSET;
BeginEncode, EndEncode: string;
procedure EncodeWord(P: Integer);
const
MaxEncLen = 75;
var
Q: Integer;
EncLen: Integer;
Enc1: string;
begin
T := T + BeginEncode;
if L < P then P := L + 1;
Q := InEncode;
InEncode := 0;
EncLen := Length(BeginEncode) + 2;
if AnsiSameText(HeaderEncoding, 'Q') then
begin
while Q < P do
begin
if not (S[Q] in csReqQuote) then
begin
Enc1 := S[Q]
end
else
begin
if S[Q] = ' ' then
Enc1 := '_'
else
Enc1 := '=' + IntToHex(Ord(S[Q]), 2);
end;
if EncLen + Length(Enc1) > MaxEncLen then
begin
T := T + EndEncode + #13#10#9 + BeginEncode;
EncLen := Length(BeginEncode) + 2;
end;
T := T + Enc1;
INC(EncLen, Length(Enc1));
INC(Q);
end;
end
else
begin
while Q < P do
begin
if EncLen + 4 > MaxEncLen then
begin
T := T + EndEncode + #13#10#9 + BeginEncode;
EncLen := Length(BeginEncode) + 2;
end;
B0 := Ord(S[Q]);
case P - Q of
1: T := T + base64_tbl[B0 shr 2] + base64_tbl[B0 and $03 shl 4] +
'==';
2:
begin
B1 := Ord(S[Q + 1]);
T := T + base64_tbl[B0 shr 2] +
base64_tbl[B0 and $03 shl 4 + B1 shr 4] +
base64_tbl[B1 and $0F shl 2] + '=';
end;
else
B1 := Ord(S[Q + 1]);
B2 := Ord(S[Q + 2]);
T := T + base64_tbl[B0 shr 2] +
base64_tbl[B0 and $03 shl 4 + B1 shr 4] +
base64_tbl[B1 and $0F shl 2 + B2 shr 6] +
base64_tbl[B2 and $3F];
end;
INC(EncLen, 4);
INC(Q, 3);
end;
end;
T := T + EndEncode;
end;
begin
case TransferHeader of
iso2022jp:
S := Encode2022JP(Header);
else
S := Header;
end;
csNeedEncode := [#0..#31, #127..#255] + specials;
csReqQuote := csNeedEncode + ['?', '=', '_'];
BeginEncode := '=?' + MimeCharSet + '?' + HeaderEncoding + '?';
EndEncode := '?=';
L := Length(S);
P := 1;
T := '';
InEncode := 0;
while P <= L do
begin
Q := P;
while (P <= L) and (S[P] in SPACES) do
INC(P);
R := P;
NeedEncode := False;
while (P <= L) and not (S[P] in SPACES) do
begin
if S[P] in csNeedEncode then
begin
NeedEncode := True;
end;
INC(P);
end;
if NeedEncode then
begin
if InEncode = 0 then
begin
T := T + Copy(S, Q, R - Q);
InEncode := R;
end;
end
else
begin
if InEncode <> 0 then
begin
EncodeWord(Q);
end;
T := T + Copy(S, Q, P - Q);
end;
end;
if InEncode <> 0 then
begin
EncodeWord(P);
end;
Result := T;
end;
end.
|
unit Router4DelphiDemo.View.Router;
interface
type
TRouters = class
private
public
constructor Create;
destructor Destroy; override;
end;
var
Routers : TRouters;
implementation
uses
Router4D,
Router4DelphiDemo.View.Pages.Index,
Router4DelphiDemo.Views.Layouts.Main,
Router4DelphiDemo.View.Pages.Cadastros;
{ TRouters }
constructor TRouters.Create;
begin
TRouter4D.Switch.Router('Home', TPageIndex);
TRouter4D.Switch.Router('Cadastros', TPageCadastros);
TRouter4D.Switch.Router('main', TMainLayout);
end;
destructor TRouters.Destroy;
begin
inherited;
end;
initialization
Routers := TRouters.Create;
finalization
Routers.Free;
end.
|
unit ANovaTransportadora;
{ Autor: Rafael Budag
Data Criação: 25/03/1999;
Função: Cadastrar uma nova transportadora
Data Alteração: 25/03/1999;
Alterado por:
Motivo alteração:
}
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, formularios,
StdCtrls, Mask, DBCtrls, Db, DBTables, Tabela, BotaoCadastro,
Buttons, ExtCtrls, Componentes1, DBCidade, DBKeyViolation, DBGrids,
Localizacao, PainelGradiente, constantes, Constmsg, Grids, DBClient;
type
TFNovaTransportadora = class(TFormularioPermissao)
CadTransportadoras: TSQL;
DataTransportadora: TDataSource;
PainelGradiente1: TPainelGradiente;
PanelColor1: TPanelColor;
BotaoGravar1: TBotaoGravar;
BotaoCancelar1: TBotaoCancelar;
MoveBasico1: TMoveBasico;
PanelColor2: TPanelColor;
Label13: TLabel;
Label14: TLabel;
DBEditColor1: TDBEditColor;
Label15: TLabel;
Label1: TLabel;
DBEditColor2: TDBEditColor;
Label16: TLabel;
DBEditColor3: TDBEditColor;
Label2: TLabel;
DBEditColor4: TDBEditColor;
DBEditColor12: TDBEditColor;
Label11: TLabel;
DBEditColor8: TDBEditColor;
Label9: TLabel;
DBEditColor7: TDBEditColor;
Label8: TLabel;
DBEditColor6: TDBEditColor;
Label4: TLabel;
Label3: TLabel;
Label7: TLabel;
DBEditColor9: TDBEditColor;
Label10: TLabel;
Label5: TLabel;
Label12: TLabel;
Label6: TLabel;
DBEditColor13: TDBEditColor;
DBEditColor14: TDBEditColor;
CadTransportadorasI_COD_TRA: TFMTBCDField;
CadTransportadorasC_NOM_TRA: TWideStringField;
CadTransportadorasC_END_TRA: TWideStringField;
CadTransportadorasC_BAI_TRA: TWideStringField;
CadTransportadorasI_NUM_TRA: TFMTBCDField;
CadTransportadorasC_CID_TRA: TWideStringField;
CadTransportadorasC_EST_TRA: TWideStringField;
CadTransportadorasC_FON_TRA: TWideStringField;
CadTransportadorasC_FAX_TRA: TWideStringField;
CadTransportadorasC_NOM_GER: TWideStringField;
CadTransportadorasC_CGC_TRA: TWideStringField;
CadTransportadorasC_INS_TRA: TWideStringField;
CadTransportadorasD_DAT_MOV: TSQLTimeStampField;
CadTransportadorasC_WWW_TRA: TWideStringField;
CadTransportadorasC_END_ELE: TWideStringField;
DBEditPos21: TDBEditPos2;
DBEditPos22: TDBEditPos2;
DBEditColor10: TDBEditColor;
CadTransportadorasC_COM_END: TWideStringField;
Label17: TLabel;
BFechar: TBitBtn;
Label18: TLabel;
DBEditColor11: TDBEditColor;
CadTransportadorasCOD_CIDADE: TFMTBCDField;
ECidade: TDBEditLocaliza;
BCidade: TSpeedButton;
BRua: TSpeedButton;
Localiza: TConsultaPadrao;
CadTransportadorasC_CEP_TRA: TWideStringField;
ValidaGravacao1: TValidaGravacao;
CadTransportadorasD_ULT_ALT: TSQLTimeStampField;
DBCheckBox1: TDBCheckBox;
CadTransportadorasC_IND_ATI: TWideStringField;
ECodigo: TDBKeyViolation;
CadTransportadorasI_COD_PAI: TFMTBCDField;
CadTransportadorasI_COD_IBG: TFMTBCDField;
CadTransportadorasC_IND_PRO: TWideStringField;
DBCheckBox2: TDBCheckBox;
CadTransportadorasL_OBS_TRA: TWideStringField;
DBMemoColor1: TDBMemoColor;
procedure FormCreate(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure CadTransportadorasAfterInsert(DataSet: TDataSet);
procedure CadTransportadorasBeforePost(DataSet: TDataSet);
procedure BFecharClick(Sender: TObject);
procedure CadTransportadorasAfterEdit(DataSet: TDataSet);
procedure ECidadeCadastrar(Sender: TObject);
procedure ECidadeRetorno(Retorno1, Retorno2: String);
procedure BRuaClick(Sender: TObject);
procedure DBFilialColor1Change(Sender: TObject);
procedure CadTransportadorasAfterPost(DataSet: TDataSet);
procedure DBEditColor7Exit(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
FNovaTransportadora: TFNovaTransportadora;
implementation
uses APrincipal, ACadCidades, AConsultaRuas, funstring,
UnClientes, UnSistema;
{$R *.DFM}
{ ****************** Na criação do Formulário ******************************** }
procedure TFNovaTransportadora.FormCreate(Sender: TObject);
begin
CadTransportadoras.open;
end;
{ ******************* Quando o formulario e fechado ************************** }
procedure TFNovaTransportadora.FormClose(Sender: TObject; var Action: TCloseAction);
begin
CadTransportadoras.close;
Action := CaFree;
end;
{(((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((
Ações da Tabela
)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))}
{**********Verifica se o codigo já foi utilizado por outro usuario na rede*****}
procedure TFNovaTransportadora.CadTransportadorasBeforePost(DataSet: TDataSet);
begin
CadTransportadorasD_ULT_ALT.AsDateTime := Sistema.RDataServidor;
if CadTransportadoras.State = dsinsert then
ECodigo.VerificaCodigoUtilizado;
end;
{**********************Carrega os dados default do cadastro********************}
procedure TFNovaTransportadora.CadTransportadorasAfterInsert(
DataSet: TDataSet);
begin
ECodigo.ProximoCodigo;
DBEditColor12.Field.Value := date;
ECodigo.ReadOnly := False;
CadTransportadorasC_IND_ATI.AsString:= 'S';
CadTransportadorasC_IND_PRO.AsString := 'N';
end;
{******************************************************************************}
procedure TFNovaTransportadora.CadTransportadorasAfterPost(DataSet: TDataSet);
begin
Sistema.MarcaTabelaParaImportar('CADTRANSPORTADORAS');
end;
{*********************Coloca o campo chave em read-only************************}
procedure TFNovaTransportadora.CadTransportadorasAfterEdit(
DataSet: TDataSet);
begin
ECodigo.ReadOnly := true;
end;
{(((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((
Ações Diversas
)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))}
{************************Fecha o formulario corrente***************************}
procedure TFNovaTransportadora.BFecharClick(Sender: TObject);
begin
close;
end;
procedure TFNovaTransportadora.ECidadeCadastrar(Sender: TObject);
begin
FCidades := TFCidades.CriarSDI(Application, '', FPrincipal.VerificaPermisao('FCidades'));
FCidades.ShowModal;
end;
procedure TFNovaTransportadora.ECidadeRetorno(Retorno1,
Retorno2: String);
begin
if (Retorno2 <> '') then
if (CadTransportadoras.State in [dsInsert, dsEdit]) then
begin
if Retorno1 <> '' then
CadTransportadorasI_COD_IBG.AsInteger:=StrToInt(Retorno1)
else
CadTransportadorasI_COD_IBG.clear;
CadTransportadorasC_EST_TRA.AsString:=Retorno2; // Grava o Estado;
CadTransportadorasI_COD_PAI.AsInteger := FunClientes.RCodPais(Retorno2);
end;
end;
procedure TFNovaTransportadora.BRuaClick(Sender: TObject);
var
VpfCodCidade,
VpfCEP,
VpfRua,
VpfBairro,
VpfDesCidade: string;
begin
if CadTransportadoras.State in [dsedit, dsInsert] then
begin
VpfCEP := SubstituiStr(VpfCEP,'-','');
FConsultaRuas := TFConsultaRuas.CriarSDI(Application, '', FPrincipal.VerificaPermisao('FConsultaRuas'));
if FConsultaRuas.BuscaEndereco(VpfCodCidade, VpfCEP,
VpfRua, VpfBairro, VpfDesCidade)
then
begin
// Preenche os campos;
CadTransportadorasCOD_CIDADE.AsInteger := StrToInt(VpfCodCidade);
CadTransportadorasC_CEP_TRA.AsString := VpfCEP;
CadTransportadorasC_CID_TRA.AsString := VpfDesCidade;
CadTransportadorasC_END_TRA.AsString := VpfRua;
CadTransportadorasC_BAI_TRA.AsString := VpfBairro;
ECidade.Atualiza;
end;
end;
end;
procedure TFNovaTransportadora.DBEditColor7Exit(Sender: TObject);
begin
if CadTransportadoras.State in [dsedit,dsinsert] then
if (CadTransportadorasC_CGC_TRA.AsString = varia.CNPJFilial) then
CadTransportadorasC_IND_PRO.AsString := 'S';
end;
procedure TFNovaTransportadora.DBFilialColor1Change(Sender: TObject);
begin
if CadTransportadoras.State in [dsedit,dsinsert] then
ValidaGravacao1.Execute;
end;
Initialization
{ *************** Registra a classe para evitar duplicidade ****************** }
RegisterClasses([TFNovaTransportadora]);
end.
|
unit KennlinienStandardDefault;
interface
const //Konstanten für Drahtdurchmesser
D_06 = '0,6mm'; //Drahtdurchmesser 0,6
D_08 = '0,8mm'; //Drahtdurchmesser 0,8
D_09 = '0,9mm'; //Drahtdurchmesser 0,9
D_10 = '1,0mm'; //Drahtdurchmesser 1,0
D_12 = '1,2mm'; //Drahtdurchmesser 1,2
D_14 = '1,4mm'; //Drahtdurchmesser 1,4
D_16 = '1,6mm'; //Drahtdurchmesser 1,6
D_20 = '2,0mm'; //Drahtdurchmesser 2,0
D_24 = '2,4mm'; //Drahtdurchmesser 2,4
D_SPEZIAL = 'Spezial'; //Drahtdurchmesser Spezial
//Konstanten für Gas
G_82A18CO = '82Ar/18CO'; //Gas 82%Ar 18%CO
G_98A2CO = '98Ar/2CO'; //Gas 98%Ar 2%CO
G_100A = '100Ar'; //Gas 100%Ar
G_100CO = '100CO'; //Gas 100%CO
G_92A8CO = '92Ar/8CO'; //Gas 92%Ar 8%CO
G_99A1O = '99Ar/1O2'; //Gas 99%Ar 1%O2
G_98A2O = '98Ar/2O2'; //Gas 98%Ar 2%O2
G_97A3O = '97Ar/3O2'; //Gas 97%Ar 3%O2
G_92A8O = '92Ar/8O2'; //Gas 92%Ar 8%O2
G_90A5O5CO = '90Ar/5O2/5CO'; //Gas 90%Ar 5%O2 5%CO
G_100HE = '100He'; //Gas 100%He
G_80A20HE = '80Ar/20He'; //Gas 80%Ar 20%He
G_69A30HE1O = '69Ar/30He/1O2'; //Gas 69%Ar 30%He 1%O2
G_50A50HE = '50Ar/50He'; //Gas 50%Ar 50%He
G_98A2H = '98Ar/2H2'; //Gas 98%Ar 2%H2
G_94A6H = '94Ar/6H2'; //Gas 94%Ar 6%H2
G_50A50H = '50Ar/50H2'; //Gas 50%Ar 50%H2
G_30A70H = '30Ar/70H2'; //Gas 30%Ar 70%H2
G_SPEZIAL = 'Spezial'; //Gas Spezial
//Konstanten für Werkstoff
W_Fe = 'Fe'; //Wekstoff Fe
W_CR_NI = 'Cr/Ni'; //Wekstoff Cr/Ni
W_AL_MG = 'Al/Mg'; //Wekstoff Al/Mg
W_AL_SI = 'Al/Si'; //Wekstoff Al/Si
W_CU_SI = 'Cu/Si'; //Wekstoff Cu/Si
W_AL_MG3 = 'Al/Mg3'; //Wekstoff Al/Mg3
W_AL_MG5 = 'Al/Mg5'; //Wekstoff Al/Mg5
W_AL_MG45Mn = 'Al/Mg4,5Mn'; //Wekstoff Al/Mg4,5Mn
W_AL_BZ = 'Al/Bz'; //Wekstoff Al/Bz
W_SPEZIAL = 'Spezial'; //Wekstoff G_Spezial
//Konstanten für Verfahren
V_MAG_NORM = 'MIG/MAG-Normal'; //MIG/MAG-Normal
V_MAG_SYN = 'MIG/MAG-Synergie'; //MIG/MAG-Synergie
V_MAG_PULS = 'MIG/MAG-Puls'; //MIG/MAG-Puls
V_ELEKTRODE = 'Elektrode'; //Elektrode
V_WIG = 'WIG'; //WIG
V_WIG_PLS = 'WIG Pulsen'; //WIG Pulsen
V_WIG_SPD = 'WIG Speed-Pulsen'; //WIG Speed-Pulsen
V_WIG_SPD_PLS = 'WIG Speed-Pulsen + Puls'; //WIG Speed-Pulsen + Puls
V_MAG_AC = 'MIG/MAG-AC'; //MIG/MAG-AC
//Konstanten für Regler
R_PULS_UI = 'Puls U/I'; //Regler Puls U/I
R_PULS_IU = 'Puls I/U'; //Regler Puls I/U
R_PULS_UI_LBR = 'Puls U/I LBR'; //Regler Puls U/I mit LBR
R_PULS_II_LBR = 'Puls I/I LBR'; //Regler Puls I/I mit LBR
//Konstantentabelle für Standard-Kennlinien
STANDARDKENN: array[1..100,1..4] of String = (
// Verfahren Werkstoff Gas Draht
( V_MAG_SYN, W_Fe, G_82A18CO, D_08 ), //Kennlinie 1
( V_MAG_SYN, W_Fe, G_82A18CO, D_10 ), //Kennlinie 2
( V_MAG_SYN, W_Fe, G_82A18CO, D_12 ), //Kennlinie 3
( V_MAG_SYN, W_Fe, G_82A18CO, D_16 ), //Kennlinie 4
( V_MAG_SYN, W_Fe, G_82A18CO, D_20 ), //Kennlinie 5
( V_MAG_SYN, W_Fe, G_98A2CO, D_08 ), //Kennlinie 6
( V_MAG_SYN, W_Fe, G_98A2CO, D_10 ), //Kennlinie 7
( V_MAG_SYN, W_Fe, G_98A2CO, D_12 ), //Kennlinie 8
( V_MAG_SYN, W_Fe, G_98A2CO, D_16 ), //Kennlinie 9
( V_MAG_SYN, W_Fe, G_98A2CO, D_20 ), //Kennlinie 10
// Verfahren Werkstoff Gas Draht
( V_MAG_SYN, W_Fe, G_100CO, D_08 ), //Kennlinie 11
( V_MAG_SYN, W_Fe, G_100CO, D_10 ), //Kennlinie 12
( V_MAG_SYN, W_Fe, G_100CO, D_12 ), //Kennlinie 13
( V_MAG_SYN, W_Fe, G_100CO, D_16 ), //Kennlinie 14
( V_MAG_SYN, W_Fe, G_100CO, D_20 ), //Kennlinie 15
( V_MAG_SYN, W_Fe, G_SPEZIAL, D_08 ), //Kennlinie 16
( V_MAG_SYN, W_Fe, G_SPEZIAL, D_10 ), //Kennlinie 17
( V_MAG_SYN, W_Fe, G_SPEZIAL, D_12 ), //Kennlinie 18
( V_MAG_SYN, W_Fe, G_SPEZIAL, D_16 ), //Kennlinie 19
( V_MAG_SYN, W_Fe, G_SPEZIAL, D_20 ), //Kennlinie 20
// Verfahren Werkstoff Gas Draht
( V_MAG_SYN, W_CR_NI, G_98A2CO, D_08 ), //Kennlinie 21
( V_MAG_SYN, W_CR_NI, G_98A2CO, D_10 ), //Kennlinie 22
( V_MAG_SYN, W_CR_NI, G_98A2CO, D_12 ), //Kennlinie 23
( V_MAG_SYN, W_CR_NI, G_98A2CO, D_16 ), //Kennlinie 24
( V_MAG_SYN, W_CR_NI, G_98A2CO, D_20 ), //Kennlinie 25
( V_MAG_SYN, W_CR_NI, G_SPEZIAL, D_08 ), //Kennlinie 26
( V_MAG_SYN, W_CR_NI, G_SPEZIAL, D_10 ), //Kennlinie 27
( V_MAG_SYN, W_CR_NI, G_SPEZIAL, D_12 ), //Kennlinie 28
( V_MAG_SYN, W_CR_NI, G_SPEZIAL, D_16 ), //Kennlinie 29
( V_MAG_SYN, W_CR_NI, G_SPEZIAL, D_20 ), //Kennlinie 30
// Verfahren Werkstoff Gas Draht
( V_MAG_SYN, W_AL_MG, G_100A, D_08 ), //Kennlinie 31
( V_MAG_SYN, W_AL_MG, G_100A, D_10 ), //Kennlinie 32
( V_MAG_SYN, W_AL_MG, G_100A, D_12 ), //Kennlinie 33
( V_MAG_SYN, W_AL_MG, G_100A, D_16 ), //Kennlinie 34
( V_MAG_SYN, W_AL_MG, G_100A, D_20 ), //Kennlinie 35
( V_MAG_SYN, W_AL_SI, G_100A, D_08 ), //Kennlinie 36
( V_MAG_SYN, W_AL_SI, G_100A, D_10 ), //Kennlinie 37
( V_MAG_SYN, W_AL_SI, G_100A, D_12 ), //Kennlinie 38
( V_MAG_SYN, W_AL_SI, G_100A, D_16 ), //Kennlinie 39
( V_MAG_SYN, W_AL_SI, G_100A, D_20 ), //Kennlinie 40
// Verfahren Werkstoff Gas Draht
( V_MAG_SYN, W_CU_SI, G_100A, D_08 ), //Kennlinie 41
( V_MAG_SYN, W_CU_SI, G_100A, D_10 ), //Kennlinie 42
( V_MAG_SYN, W_CU_SI, G_100A, D_12 ), //Kennlinie 43
( V_MAG_SYN, W_CU_SI, G_100A, D_16 ), //Kennlinie 44
( V_MAG_SYN, W_CU_SI, G_100A, D_20 ), //Kennlinie 45
( V_MAG_SYN, W_CU_SI, G_98A2CO, D_08 ), //Kennlinie 46
( V_MAG_SYN, W_CU_SI, G_98A2CO, D_10 ), //Kennlinie 47
( V_MAG_SYN, W_CU_SI, G_98A2CO, D_12 ), //Kennlinie 48
( V_MAG_SYN, W_CU_SI, G_98A2CO, D_16 ), //Kennlinie 49
( V_MAG_SYN, W_CU_SI, G_98A2CO, D_20 ), //Kennlinie 50
// Verfahren Werkstoff Gas Draht
( V_MAG_PULS, W_Fe, G_82A18CO, D_08 ), //Kennlinie 51
( V_MAG_PULS, W_Fe, G_82A18CO, D_10 ), //Kennlinie 52
( V_MAG_PULS, W_Fe, G_82A18CO, D_12 ), //Kennlinie 53
( V_MAG_PULS, W_Fe, G_82A18CO, D_16 ), //Kennlinie 54
( V_MAG_PULS, W_Fe, G_82A18CO, D_20 ), //Kennlinie 55
( V_MAG_PULS, W_Fe, G_98A2CO, D_08 ), //Kennlinie 56
( V_MAG_PULS, W_Fe, G_98A2CO, D_10 ), //Kennlinie 57
( V_MAG_PULS, W_Fe, G_98A2CO, D_12 ), //Kennlinie 58
( V_MAG_PULS, W_Fe, G_98A2CO, D_16 ), //Kennlinie 59
( V_MAG_PULS, W_Fe, G_98A2CO, D_20 ), //Kennlinie 60
// Verfahren Werkstoff Gas Draht
( V_MAG_PULS, W_Fe, G_SPEZIAL, D_08 ), //Kennlinie 61
( V_MAG_PULS, W_Fe, G_SPEZIAL, D_10 ), //Kennlinie 62
( V_MAG_PULS, W_Fe, G_SPEZIAL, D_12 ), //Kennlinie 63
( V_MAG_PULS, W_Fe, G_SPEZIAL, D_16 ), //Kennlinie 64
( V_MAG_PULS, W_Fe, G_SPEZIAL, D_20 ), //Kennlinie 65
( V_MAG_PULS, W_Fe, G_SPEZIAL, D_08 ), //Kennlinie 66
( V_MAG_PULS, W_Fe, G_SPEZIAL, D_10 ), //Kennlinie 67
( V_MAG_PULS, W_Fe, G_SPEZIAL, D_12 ), //Kennlinie 68
( V_MAG_PULS, W_Fe, G_SPEZIAL, D_16 ), //Kennlinie 69
( V_MAG_PULS, W_Fe, G_SPEZIAL, D_20 ), //Kennlinie 70
// Verfahren Werkstoff Gas Draht
( V_MAG_PULS, W_CR_NI, G_98A2CO, D_08 ), //Kennlinie 71
( V_MAG_PULS, W_CR_NI, G_98A2CO, D_10 ), //Kennlinie 72
( V_MAG_PULS, W_CR_NI, G_98A2CO, D_12 ), //Kennlinie 73
( V_MAG_PULS, W_CR_NI, G_98A2CO, D_16 ), //Kennlinie 74
( V_MAG_PULS, W_CR_NI, G_98A2CO, D_20 ), //Kennlinie 75
( V_MAG_PULS, W_CR_NI, G_SPEZIAL, D_08 ), //Kennlinie 76
( V_MAG_PULS, W_CR_NI, G_SPEZIAL, D_10 ), //Kennlinie 77
( V_MAG_PULS, W_CR_NI, G_SPEZIAL, D_12 ), //Kennlinie 78
( V_MAG_PULS, W_CR_NI, G_SPEZIAL, D_16 ), //Kennlinie 79
( V_MAG_PULS, W_CR_NI, G_SPEZIAL, D_20 ), //Kennlinie 80
// Verfahren Werkstoff Gas Draht
( V_MAG_PULS, W_AL_MG, G_100A, D_08 ), //Kennlinie 81
( V_MAG_PULS, W_AL_MG, G_100A, D_10 ), //Kennlinie 82
( V_MAG_PULS, W_AL_MG, G_100A, D_12 ), //Kennlinie 83
( V_MAG_PULS, W_AL_MG, G_100A, D_16 ), //Kennlinie 84
( V_MAG_PULS, W_AL_MG, G_100A, D_20 ), //Kennlinie 85
( V_MAG_PULS, W_AL_SI, G_100A, D_08 ), //Kennlinie 86
( V_MAG_PULS, W_AL_SI, G_100A, D_10 ), //Kennlinie 87
( V_MAG_PULS, W_AL_SI, G_100A, D_12 ), //Kennlinie 88
( V_MAG_PULS, W_AL_SI, G_100A, D_16 ), //Kennlinie 89
( V_MAG_PULS, W_AL_SI, G_100A, D_20 ), //Kennlinie 90
// Verfahren Werkstoff Gas Draht
( V_MAG_PULS, W_CU_SI, G_100A, D_08 ), //Kennlinie 91
( V_MAG_PULS, W_CU_SI, G_100A, D_10 ), //Kennlinie 92
( V_MAG_PULS, W_CU_SI, G_100A, D_12 ), //Kennlinie 93
( V_MAG_PULS, W_CU_SI, G_100A, D_16 ), //Kennlinie 94
( V_MAG_PULS, W_CU_SI, G_100A, D_20 ), //Kennlinie 95
( V_MAG_PULS, W_CU_SI, G_98A2CO, D_08 ), //Kennlinie 96
( V_MAG_PULS, W_CU_SI, G_98A2CO, D_10 ), //Kennlinie 97
( V_MAG_PULS, W_CU_SI, G_98A2CO, D_12 ), //Kennlinie 98
( V_MAG_PULS, W_CU_SI, G_98A2CO, D_16 ), //Kennlinie 99
( V_MAG_PULS, W_CU_SI, G_98A2CO, D_20 ) //Kennlinie 100
);
implementation
end.
|
unit FileCtrl;
{
LLCL - FPC/Lazarus Light LCL
based upon
LVCL - Very LIGHT VCL
----------------------------
This file is a part of the Light LCL (LLCL).
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/.
This Source Code Form is "Incompatible With Secondary Licenses",
as defined by the Mozilla Public License, v. 2.0.
Copyright (c) 2015-2016 ChrisF
Based upon the Very LIGHT VCL (LVCL):
Copyright (c) 2008 Arnaud Bouchez - http://bouchez.info
Portions Copyright (c) 2001 Paul Toth - http://tothpaul.free.fr
Version 1.02:
Version 1.01:
* File creation.
* SelectDirectory added (for Delphi)
}
{$IFDEF FPC}
{$define LLCL_FPC_MODESECTION}
{$I LLCLFPCInc.inc} // For mode
{$undef LLCL_FPC_MODESECTION}
{$ENDIF}
{$I LLCLOptions.inc} // Options
//------------------------------------------------------------------------------
interface
uses
LLCLOSInt;
type
TSelectDirExtOpt = (sdNewFolder, sdShowEdit, sdShowShares, sdNewUI,
sdShowFiles, sdValidateDir);
TSelectDirExtOpts = set of TSelectDirExtOpt;
{$IFNDEF FPC} // SelectDirectory is in Dialogs.pas for FPC/Lazarus
function SelectDirectory(const Caption: string; const Root: string; var Directory: string): boolean; overload;
{$if CompilerVersion >= 18)} // Delphi 2006 or after
function SelectDirectory(const Caption: string; const Root: string; var Directory: string; Options: TSelectDirExtOpts = [sdNewUI]; Parent: TWinControl = nil): boolean; overload;
{$ifend}
{$ENDIF}
// (Not VCL/LCL standard - Called from Dialogs.pas for FPC)
function FC_SelectDirectory(const Caption: string; const InitialDirectory: string; Options: TSelectDirExtOpts; var Directory: string): Boolean;
//------------------------------------------------------------------------------
implementation
uses
{$IFNDEF FPC}ShlObj,{$ENDIF}
Forms;
{$IFDEF FPC}
{$PUSH} {$HINTS OFF}
{$ENDIF}
//------------------------------------------------------------------------------
{$IFNDEF FPC}
function SelectDirectory(const Caption: string; const Root: string; var Directory: string): Boolean;
begin
result := FC_SelectDirectory(Caption, Root, [], Directory);
end;
{$if CompilerVersion >= 18)} // Delphi 2006 or after
function SelectDirectory(const Caption: string; const Root: string; var Directory: string; Options: TSelectDirExtOpts = [sdNewUI]; Parent: TWinControl = nil): boolean; overload;
begin
result := FC_SelectDirectory(Caption, Root, Options, Directory);
end;
{$ifend}
{$ENDIF}
function FC_SelectDirectory(const Caption: string; const InitialDirectory: string; Options: TSelectDirExtOpts; var Directory: string): Boolean;
var BrowseInfo: TBrowseInfo;
begin
FillChar(BrowseInfo, SizeOf(BrowseInfo), 0);
BrowseInfo.hwndOwner := Application.MainForm.Handle;
BrowseInfo.ulFlags := BIF_RETURNONLYFSDIRS;
if (sdNewUI in Options) or (sdShowShares in Options) then
begin
BrowseInfo.ulFlags := BrowseInfo.ulFlags or BIF_NEWDIALOGSTYLE;
if not (sdNewFolder in Options) then
BrowseInfo.ulFlags := BrowseInfo.ulFlags or BIF_NONEWFOLDERBUTTON;
if (sdShowShares in Options) then
BrowseInfo.ulFlags := BrowseInfo.ulFlags or BIF_SHAREABLE;
end;
if (sdShowEdit in Options) then
BrowseInfo.ulFlags := BrowseInfo.ulFlags or BIF_EDITBOX;
if (sdShowFiles in Options) then
BrowseInfo.ulFlags := BrowseInfo.ulFlags or BIF_BROWSEINCLUDEFILES;
if (sdValidateDir in Options) and (sdShowEdit in Options) then
BrowseInfo.ulFlags := BrowseInfo.ulFlags or BIF_VALIDATE;
result := LLCLS_SH_BrowseForFolder(BrowseInfo, Caption, InitialDirectory, Directory);
end;
//------------------------------------------------------------------------------
{$IFDEF FPC}
{$POP}
{$ENDIF}
end.
|
unit YanTuMiaoShu;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, Buttons, Grids, ExtCtrls,
DB;
type
TYanTuMiaoShuForm = class(TForm)
Gbox: TGroupBox;
sgEarth: TStringGrid;
gbox2: TGroupBox;
lblD_t_name: TLabel;
Label1: TLabel;
edtMiaoShu: TEdit;
cboLeiXing: TComboBox;
btn_ok: TBitBtn;
btn_cancel: TBitBtn;
btn_add: TBitBtn;
btn_delete: TBitBtn;
btn_edit: TBitBtn;
procedure FormCreate(Sender: TObject);
procedure sgEarthSelectCell(Sender: TObject; ACol, ARow: Integer;
var CanSelect: Boolean);
procedure btn_editClick(Sender: TObject);
procedure btn_okClick(Sender: TObject);
procedure btn_addClick(Sender: TObject);
procedure btn_deleteClick(Sender: TObject);
procedure btn_cancelClick(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
private
{ Private declarations }
procedure button_status(int_status:integer;bHaveRecord:boolean);
procedure Get_oneRecord(aRow:integer);
function GetInsertSQL:string;
function GetUpdateSQL:string;
function GetDeleteSQL:string;
function GetExistedSQL(aLeiXing: string; aMiaoShu: string): string;
function Check_Data:boolean;
public
{ Public declarations }
end;
var
YanTuMiaoShuForm: TYanTuMiaoShuForm;
m_DataSetState: TDataSetState;
implementation
uses MainDM, public_unit;
{$R *.dfm}
procedure TYanTuMiaoShuForm.button_status(int_status: integer;
bHaveRecord: boolean);
begin
case int_status of
1: //浏览状态
begin
btn_edit.Enabled :=bHaveRecord;
btn_delete.Enabled :=bHaveRecord;
btn_edit.Caption :='修改';
btn_ok.Enabled :=false;
btn_add.Enabled :=true;
Enable_Components(self,false);
m_DataSetState := dsBrowse;
end;
2: //修改状态
begin
btn_edit.Enabled :=true;
btn_edit.Caption :='放弃';
btn_ok.Enabled :=true;
btn_add.Enabled :=false;
btn_delete.Enabled :=false;
Enable_Components(self,true);
m_DataSetState := dsEdit;
end;
3: //增加状态
begin
btn_edit.Enabled :=true;
btn_edit.Caption :='放弃';
btn_ok.Enabled :=true;
btn_add.Enabled :=false;
btn_delete.Enabled :=false;
Enable_Components(self,true);
m_DataSetState := dsInsert;
end;
end;
end;
function TYanTuMiaoShuForm.Check_Data: boolean;
begin
if trim(edtMiaoShu.Text) = '' then
begin
messagebox(self.Handle,'请输入岩土描述!','数据校对',mb_ok);
edtMiaoShu.SetFocus;
result := false;
exit;
end;
result := true;
end;
procedure TYanTuMiaoShuForm.FormCreate(Sender: TObject);
var
i: integer;
begin
self.Left := trunc((screen.Width -self.Width)/2);
self.Top := trunc((Screen.Height - self.Height)/2);
sgEarth.RowHeights[0] := 16;
sgEarth.Cells[1,0] := '岩土描述';
sgEarth.ColWidths[0]:=10;
sgEarth.ColWidths[1]:=125;
Clear_Data(self);
SetCBWidth(cboLeiXing);
with MainDataModule.qryPublic do
begin
close;
sql.Clear;
sql.Add('SELECT LeiXing,MiaoShu FROM earth_desc');
open;
i:=0;
sgEarth.Tag :=1;
while not Eof do
begin
i:=i+1;
sgEarth.RowCount := i +1;
sgEarth.Cells[1,i] := FieldByName('MiaoShu').AsString;
sgEarth.Cells[2,i] := FieldByName('LeiXing').AsString;
Next ;
end;
close;
sgEarth.Tag :=0;
end;
if i>0 then
begin
sgEarth.Row :=1;
Get_oneRecord(1);
button_status(1,true);
end
else
button_status(1,false);
end;
procedure TYanTuMiaoShuForm.Get_oneRecord(aRow:integer);
begin
if sgEarth.Cells[2,sgEarth.Row]='' then exit;
edtMiaoShu.Text := sgEarth.Cells[1,aRow];
cboLeiXing.ItemIndex := StrToInt(sgEarth.Cells[2,aRow]);
end;
function TYanTuMiaoShuForm.GetDeleteSQL: string;
begin
result :='DELETE FROM earth_desc WHERE LeiXing='+ ''''+inttostr(cboLeiXing.ItemIndex)+''''
+' AND MiaoShu='+''''+sgEarth.Cells[1,sgEarth.Row]+'''' ;
end;
function TYanTuMiaoShuForm.GetInsertSQL: string;
begin
result := 'INSERT INTO earth_desc (LeiXing,MiaoShu) VALUES('
+''''+inttostr(cboLeiXing.ItemIndex)+''''+','
+''''+trim(edtMiaoShu.Text)+''')';
end;
function TYanTuMiaoShuForm.GetUpdateSQL: string;
var
strSQLWhere,strSQLSet:string;
begin
strSQLWhere:=' WHERE LeiXing='+''''+sgEarth.Cells[2,sgEarth.Row]+''''
+' AND MiaoShu='+''''+sgEarth.Cells[1,sgEarth.Row]+'''' ;
strSQLSet:='UPDATE earth_desc SET ';
strSQLSet := strSQLSet + 'LeiXing' +'='+''''+inttostr(cboLeiXing.ItemIndex)+''''+',';
strSQLSet := strSQLSet + 'MiaoShu' +'='+''''+trim(edtMiaoShu.Text)+'''';
result := strSQLSet + strSQLWhere;
end;
procedure TYanTuMiaoShuForm.sgEarthSelectCell(Sender: TObject; ACol,
ARow: Integer; var CanSelect: Boolean);
begin
if sgEarth.Tag =1 then exit;
if (ARow <>0) and (ARow<>TStringGrid(Sender).Row) then
if sgEarth.Cells[1,ARow]<>'' then
begin
Get_oneRecord(aRow);
if sgEarth.Cells[1,ARow]='' then
Button_status(1,false)
else
Button_status(1,true);
end
else
begin
clear_data(self);
end;
end;
procedure TYanTuMiaoShuForm.btn_editClick(Sender: TObject);
begin
if btn_edit.Caption ='修改' then
begin
Button_status(2,true);
end
else
begin
clear_data(self);
Button_status(1,true);
Get_oneRecord(sgEarth.Row);
end;
end;
procedure TYanTuMiaoShuForm.btn_okClick(Sender: TObject);
var
strSQL: string;
begin
if not Check_Data then exit;
if m_DataSetState = dsInsert then
begin
strSQL := GetExistedSQL(IntToStr(cboLeiXing.ItemIndex),trim(edtMiaoShu.Text));
if isExistedRecord(MainDataModule.qryPublic,strSQL) then
begin
MessageBox(application.Handle,PAnsiChar('记录已经存在,不能保存。'),'数据库错误',MB_OK+MB_ICONERROR);
edtMiaoShu.SetFocus;
exit;
end;
strSQL := self.GetInsertSQL;
if Insert_oneRecord(MainDataModule.qryPublic,strSQL) then
begin
if (sgEarth.RowCount =2) and (sgEarth.Cells[1,1] ='') then
else
sgEarth.RowCount := sgEarth.RowCount+1;
sgEarth.Cells[1,sgEarth.RowCount-1] := trim(edtMiaoShu.Text);
sgEarth.Cells[2,sgEarth.RowCount-1] := IntToStr(cboLeiXing.ItemIndex);
sgEarth.Row := sgEarth.RowCount-1;
Button_status(1,true);
btn_add.SetFocus;
end;
end
else if m_DataSetState = dsEdit then
begin
if (sgEarth.Cells[1,sgEarth.Row]<>trim(edtMiaoShu.Text))
or (sgEarth.Cells[2,sgEarth.Row]<>IntToStr(cboLeiXing.ItemIndex)) then
begin
strSQL := GetExistedSQL(IntToStr(cboLeiXing.ItemIndex),trim(edtMiaoShu.Text));
if isExistedRecord(MainDataModule.qryPublic,strSQL) then
begin
MessageBox(application.Handle,'记录已经存在,不能保存。','数据库错误',MB_OK+MB_ICONERROR);
edtMiaoShu.SetFocus;
exit;
end;
end;
strSQL := self.GetUpdateSQL;
if Update_oneRecord(MainDataModule.qryPublic,strSQL) then
begin
sgEarth.Cells[1,sgEarth.Row] := trim(edtMiaoShu.Text) ;
sgEarth.Cells[2,sgEarth.Row] := IntToStr(cboLeiXing.ItemIndex);
Button_status(1,true);
btn_add.SetFocus;
end;
end;
end;
function TYanTuMiaoShuForm.GetExistedSQL(aLeiXing,
aMiaoShu: string): string;
begin
Result:='SELECT LeiXing,MiaoShu FROM earth_desc '
+ ' WHERE LeiXing='+''''+aLeiXing+''''
+' AND MiaoShu=' +''''+aMiaoShu+'''';
end;
procedure TYanTuMiaoShuForm.btn_addClick(Sender: TObject);
begin
Clear_Data(self);
Button_status(3,true);
cboLeiXing.ItemIndex := 1;
edtMiaoShu.SetFocus;
end;
procedure TYanTuMiaoShuForm.btn_deleteClick(Sender: TObject);
var
strSQL: string;
begin
if MessageBox(self.Handle,
'您确定要删除吗?','警告', MB_YESNO+MB_ICONQUESTION)=IDNO then exit;
if edtMiaoShu.Text <> '' then
begin
strSQL := self.GetDeleteSQL;
if Delete_oneRecord(MainDataModule.qryPublic,strSQL) then
begin
Clear_Data(self);
DeleteStringGridRow(sgEarth,sgEarth.Row);
if sgEarth.Cells[1,sgEarth.row]<>'' then
begin
Get_oneRecord(sgEarth.Row);
button_status(1,true);
end
else
button_status(1,false);
end;
end;
end;
procedure TYanTuMiaoShuForm.btn_cancelClick(Sender: TObject);
begin
self.Close;
end;
procedure TYanTuMiaoShuForm.FormClose(Sender: TObject;
var Action: TCloseAction);
begin
Action:= caFree;
end;
end.
|
unit gExpressionFunctions;
{ Author: Steve Kramer, goog@goog.com }
interface
Uses
Classes
, System.Types
, SysUtils
, Contnrs
, gExpressionEvaluator
, gExpressionOperators
;
Type
TFunction = Class(TOperator)
Public
ParameterCount : Integer;
Function Precedence : Integer;Override;
Procedure PostFix(ATokenList : TList; AStack : TStack);Override;
End;
TSameText = class(TFunction)
Public
Procedure Evaluate(AStack : TgVariantStack);Override;
End;
TCopy = Class(TFunction)
Public
Procedure Evaluate(AStack : TgVariantStack);Override;
End;
TIf = Class(TFunction)
Public
Procedure Evaluate(AStack : TgVariantStack);Override;
End;
TLength = Class(TFunction)
Public
Procedure Evaluate(AStack : TgVariantStack);Override;
End;
TLowerCase = Class(TFunction)
Public
Procedure Evaluate(AStack : TgVariantStack);Override;
End;
TPos = Class(TFunction)
Public
Procedure Evaluate(AStack : TgVariantStack);Override;
End;
TRandom = Class(TFunction)
Public
Procedure Evaluate(AStack : TgVariantStack);Override;
End;
TUpperCase = Class(TFunction)
Public
Procedure Evaluate(AStack : TgVariantStack);Override;
End;
TVarIsEmpty = Class(TFunction)
Public
Procedure Evaluate(AStack : TgVariantStack);Override;
End;
TFormatFloat = Class(TFunction)
Public
procedure Evaluate(AStack : TgVariantStack); override;
End;
TFormatDateTime = class(TFunction)
public
procedure Evaluate(AStack : TgVariantStack); override;
end;
TRight = class(TFunction)
Public
Procedure Evaluate(AStack : TgVariantStack);Override;
End;
TDateFunction = class(TFunction)
Public
procedure Evaluate(AStack : TgVariantStack); override;
end;
TNow = class(TFunction)
Public
Procedure Evaluate(AStack : TgVariantStack);Override;
End;
TABS = class(TFunction)
public
procedure Evaluate(AStack: TgVariantStack); override;
end;
TInSet = class(TFunction)
public
procedure Evaluate(AStack: TgVariantStack); override;
end;
implementation
Uses
Variants
, StrUtils
, System.TypInfo
;
{ TFunction }
procedure TFunction.PostFix(ATokenList: TList; AStack: TStack);
begin
AStack.Push(Self);
end;
function TFunction.Precedence: Integer;
begin
Result := 9;
end;
{ TSameText }
procedure TSameText.Evaluate(AStack : TgVariantStack);
Var
String1 : String;
String2 : String;
begin
String1 := AStack.Pop;
String2 := AStack.Pop;
AStack.Push(SameText(String1, String2));
end;
{ TCopy }
Procedure TCopy.Evaluate(AStack : TgVariantStack);
Var
S : String;
Index : Integer;
Count : Integer;
Begin
Count := AStack.Pop;
Index := AStack.Pop;
S := AStack.Pop;
AStack.Push(Copy(S, Index, Count));
End;
{ TIf }
Procedure TIf.Evaluate(AStack : TgVariantStack);
Var
ElseValue : Variant;
ThenValue : Variant;
IfValue : Boolean;
Begin
ElseValue := AStack.Pop;
ThenValue := AStack.Pop;
IfValue := AStack.Pop;
If IfValue Then
AStack.Push(ThenValue)
Else
AStack.Push(ElseValue);
End;
{ TLength }
procedure TLength.Evaluate(AStack : TgVariantStack);
begin
AStack.Push(Length(AStack.Pop));
end;
{ TLowerCase }
procedure TLowerCase.Evaluate(AStack: TgVariantStack);
begin
AStack.Push(LowerCase(AStack.Pop));
end;
{ TPos }
procedure TPos.Evaluate(AStack : TgVariantStack);
Var
SearchString : String;
TargetString : String;
begin
TargetString := AStack.Pop;
SearchString := AStack.Pop;
AStack.Push(Pos(SearchString, TargetString));
end;
{ TRandom }
procedure TRandom.Evaluate(AStack : TgVariantStack);
Var
Value : Integer;
begin
Value := AStack.Pop;
Value := Random(Value);
AStack.Push(Value);
end;
{ TUpperCase }
Procedure TUpperCase.Evaluate(AStack : TgVariantStack);
Begin
AStack.Push(UpperCase(AStack.Pop));
End;
{ TVarIsEmpty }
procedure TVarIsEmpty.Evaluate(AStack : TgVariantStack);
Var
Value : Variant;
begin
Value := AStack.Pop;
AStack.Push(VarIsEmpty(Value));
end;
{ TFormatFloat }
procedure TFormatFloat.Evaluate(AStack : TgVariantStack);
Var
FormatString : String;
Value : Extended;
Begin
Value := AStack.Pop;
FormatString := AStack.Pop;
AStack.Push(FormatFloat(FormatString, Value));
End;
{ TFormatFloat }
procedure TFormatDateTime.Evaluate(AStack : TgVariantStack);
Var
FormatString : String;
Value : Extended;
Begin
Value := AStack.Pop;
FormatString := AStack.Pop;
AStack.Push(FormatDateTime(FormatString, Value));
End;
{ TRight }
procedure TRight.Evaluate(AStack : TgVariantStack);
Var
SearchString : String;
ExtractLength : Integer;
begin
ExtractLength := AStack.Pop;
SearchString := AStack.Pop;
If ExtractLength < 0 Then
ExtractLength := Length(SearchString) + ExtractLength;
AStack.Push( RightStr( SearchString, ExtractLength ) );
end;
procedure TDateFunction.Evaluate(AStack : TgVariantStack);
begin
AStack.Push(Date);
end;
{ TSameText }
procedure TNow.Evaluate(AStack : TgVariantStack);
begin
AStack.Push(Now);
end;
procedure TABS.Evaluate(AStack: TgVariantStack);
var
Value: Double;
begin
Value := AStack.Pop;
AStack.Push(Abs(Value));
end;
{ TInSet }
procedure TInSet.Evaluate(AStack: TgVariantStack);
Var
ItemValue: String;
SetValue: String;
Strings: TStringDynArray;
S: String;
Begin
SetValue := Trim(AStack.Pop);
ItemValue := Trim(AStack.Pop);
if SetValue = '' then begin
AStack.Push(False);
exit;
end;
if (SetValue[1] = '[') and (SetValue[Length(SetValue)] = ']') then
SetValue := Copy(SetValue,2,Length(SetValue)-2);
Strings := SplitString(SetValue,',');
for S in Strings do
if SameText(ItemValue,Trim(S)) then begin
AStack.Push(True);
exit;
end;
AStack.Push(False)
End;
Initialization
TSameText.Register('SameText');
TAbs.Register('Abs');
TCopy.Register('Copy');
TIf.Register('If');
TLength.Register('Length');
TLowerCase.Register('LowerCase');
TPos.Register('Pos');
TRandom.Register('Random');
TUpperCase.Register('UpperCase');
TVarIsEmpty.Register('VarIsEmpty');
TFormatFloat.Register( 'FormatFloat' );
TFormatDateTime.Register( 'FormatDateTime' );
TRight.Register( 'Right' );
TRight.Register( 'RightStr' );
TDateFunction.Register('Date');
TNow.Register('Now');
TInSet.Register( 'InSet' );
end.
|
unit IdLogEvent;
interface
uses
Classes,
IdLogBase;
type
TLogItemStatusEvent = procedure(ASender: TComponent; const AText: string) of object;
TLogItemDataEvent = procedure(ASender: TComponent; const AText: string; const AData: string)
of object;
TIdLogEvent = class(TIdLogBase)
protected
FOnReceived: TLogItemDataEvent;
FOnSent: TLogItemDataEvent;
FOnStatus: TLogItemStatusEvent;
//
procedure LogStatus(const AText: string); override;
procedure LogReceivedData(const AText: string; const AData: string); override;
procedure LogSentData(const AText: string; const AData: string); override;
public
published
property OnReceived: TLogItemDataEvent read FOnReceived write FOnReceived;
property OnSent: TLogItemDataEvent read FOnSent write FOnSent;
property OnStatus: TLogItemStatusEvent read FOnStatus write FOnStatus;
end;
implementation
{ TIdLogEvent }
{procedure TIdLogEvent.Log(AText: string);
var
s: string;
begin
if assigned(OnLogItem) then begin
OnLogItem(Self, AText);
end;
case Target of
ltFile: begin
FFileStream.WriteBuffer(PChar(AText)^, Length(AText));
s := EOL;
FFileStream.WriteBuffer(PChar(s)^, Length(s));
end;
ltDebugOutput: begin
DebugOutput(AText + EOL);
end;
end;
end;}
{ TIdLogEvent }
procedure TIdLogEvent.LogReceivedData(const AText, AData: string);
begin
if Assigned(OnReceived) then begin
OnReceived(Self, AText, AData);
end;
end;
procedure TIdLogEvent.LogSentData(const AText, AData: string);
begin
if Assigned(OnSent) then begin
OnSent(Self, AText, AData);
end;
end;
procedure TIdLogEvent.LogStatus(const AText: string);
begin
if Assigned(OnStatus) then begin
OnStatus(Self, AText);
end;
end;
end.
|
unit ejb_sidl_javax_ejb_s;
{This file was generated on 28 Feb 2001 10:06:55 GMT by version 03.03.03.C1.06}
{of the Inprise VisiBroker idl2pas CORBA IDL compiler. }
{Please do not edit the contents of this file. You should instead edit and }
{recompile the original IDL which was located in the file sidl.idl. }
{Delphi Pascal unit : ejb_sidl_javax_ejb_s }
{derived from IDL module : ejb }
interface
uses
CORBA,
ejb_sidl_javax_ejb_i,
ejb_sidl_javax_ejb_c;
type
TEJBHomeSkeleton = class;
TEJBObjectSkeleton = class;
TEJBHomeSkeleton = class(CORBA.TCorbaObject, ejb_sidl_javax_ejb_i.EJBHome)
private
FImplementation : EJBHome;
public
constructor Create(const InstanceName: string; const Impl: EJBHome);
destructor Destroy; override;
function GetImplementation : EJBHome;
function getEJBMetaData : ejb_sidl_javax_ejb_i.EJBMetaData;
procedure remove ( const primaryKey : ANY);
function getSimplifiedIDL : AnsiString;
published
procedure _getEJBMetaData(const _Input: CORBA.InputStream; _Cookie: Pointer);
procedure _remove(const _Input: CORBA.InputStream; _Cookie: Pointer);
procedure _getSimplifiedIDL(const _Input: CORBA.InputStream; _Cookie: Pointer);
end;
TEJBObjectSkeleton = class(CORBA.TCorbaObject, ejb_sidl_javax_ejb_i.EJBObject)
private
FImplementation : EJBObject;
public
constructor Create(const InstanceName: string; const Impl: EJBObject);
destructor Destroy; override;
function GetImplementation : EJBObject;
function getEJBHome : ejb_sidl_javax_ejb_i.EJBHome;
function getPrimaryKey : ANY;
procedure remove ;
published
procedure _getEJBHome(const _Input: CORBA.InputStream; _Cookie: Pointer);
procedure _getPrimaryKey(const _Input: CORBA.InputStream; _Cookie: Pointer);
procedure _remove(const _Input: CORBA.InputStream; _Cookie: Pointer);
end;
implementation
constructor TEJBHomeSkeleton.Create(const InstanceName : string; const Impl : ejb_sidl_javax_ejb_i.EJBHome);
begin
inherited;
inherited CreateSkeleton(InstanceName, 'EJBHome', 'IDL:borland.com/sidl/javax/ejb/EJBHome:1.0');
FImplementation := Impl;
end;
destructor TEJBHomeSkeleton.Destroy;
begin
FImplementation := nil;
inherited;
end;
function TEJBHomeSkeleton.GetImplementation : ejb_sidl_javax_ejb_i.EJBHome;
begin
result := FImplementation as ejb_sidl_javax_ejb_i.EJBHome;
end;
function TEJBHomeSkeleton.getEJBMetaData : ejb_sidl_javax_ejb_i.EJBMetaData;
begin
Result := FImplementation.getEJBMetaData;
end;
procedure TEJBHomeSkeleton.remove ( const primaryKey : ANY);
begin
FImplementation.remove( primaryKey);
end;
function TEJBHomeSkeleton.getSimplifiedIDL : AnsiString;
begin
Result := FImplementation.getSimplifiedIDL;
end;
procedure TEJBHomeSkeleton._getEJBMetaData(const _Input: CORBA.InputStream; _Cookie: Pointer);
var
_Output : CORBA.OutputStream;
_Result : ejb_sidl_javax_ejb_i.EJBMetaData;
begin
_Result := getEJBMetaData;
GetReplyBuffer(_Cookie, _Output);
ejb_sidl_javax_ejb_c.TEJBMetaDataHelper.Write(_Output, _Result);
end;
procedure TEJBHomeSkeleton._remove(const _Input: CORBA.InputStream; _Cookie: Pointer);
var
_Output : CORBA.OutputStream;
_primaryKey : ANY;
begin
_Input.ReadAny(_primaryKey);
try
remove( _primaryKey);
except on E: UserException do
begin
GetExceptionReplyBuffer(_Cookie, _Output);
E.WriteExceptionInfo(_Output);
exit
end;
end;
GetReplyBuffer(_Cookie, _Output);
end;
procedure TEJBHomeSkeleton._getSimplifiedIDL(const _Input: CORBA.InputStream; _Cookie: Pointer);
var
_Output : CORBA.OutputStream;
_Result : AnsiString;
begin
_Result := getSimplifiedIDL;
GetReplyBuffer(_Cookie, _Output);
_Output.WriteString(_Result);
end;
constructor TEJBObjectSkeleton.Create(const InstanceName : string; const Impl : ejb_sidl_javax_ejb_i.EJBObject);
begin
inherited;
inherited CreateSkeleton(InstanceName, 'EJBObject', 'IDL:borland.com/sidl/javax/ejb/EJBObject:1.0');
FImplementation := Impl;
end;
destructor TEJBObjectSkeleton.Destroy;
begin
FImplementation := nil;
inherited;
end;
function TEJBObjectSkeleton.GetImplementation : ejb_sidl_javax_ejb_i.EJBObject;
begin
result := FImplementation as ejb_sidl_javax_ejb_i.EJBObject;
end;
function TEJBObjectSkeleton.getEJBHome : ejb_sidl_javax_ejb_i.EJBHome;
begin
Result := FImplementation.getEJBHome;
end;
function TEJBObjectSkeleton.getPrimaryKey : ANY;
begin
Result := FImplementation.getPrimaryKey;
end;
procedure TEJBObjectSkeleton.remove ;
begin
FImplementation.remove;
end;
procedure TEJBObjectSkeleton._getEJBHome(const _Input: CORBA.InputStream; _Cookie: Pointer);
var
_Output : CORBA.OutputStream;
_Result : ejb_sidl_javax_ejb_i.EJBHome;
begin
_Result := getEJBHome;
GetReplyBuffer(_Cookie, _Output);
ejb_sidl_javax_ejb_c.TEJBHomeHelper.Write(_Output, _Result);
end;
procedure TEJBObjectSkeleton._getPrimaryKey(const _Input: CORBA.InputStream; _Cookie: Pointer);
var
_Output : CORBA.OutputStream;
_Result : ANY;
begin
_Result := getPrimaryKey;
GetReplyBuffer(_Cookie, _Output);
_Output.WriteAny(_Result);
end;
procedure TEJBObjectSkeleton._remove(const _Input: CORBA.InputStream; _Cookie: Pointer);
var
_Output : CORBA.OutputStream;
begin
try
remove;
except on E: UserException do
begin
GetExceptionReplyBuffer(_Cookie, _Output);
E.WriteExceptionInfo(_Output);
exit
end;
end;
GetReplyBuffer(_Cookie, _Output);
end;
initialization
end. |
(*
InternetExpress Example.
The default page displays a customer list.
Clicking on a link displays a master detail form.
The master detail page has a link that
returns to the customer list. This link is only
executed after asking the user if pending updates can
be discarded.
Demonstrates:
TWebModule.Actions
TMidasPageProducer
TDataForm
TFieldGroup
TDataGrid
TDataNavigator
Styles and StyleSheets
Customizing TMidasPageProducer.HTMLDoc
Custom tags
Custom Java Script
TXMLBroker.Params.AssignStrings
Use of IScriptProducer, IScriptManager
*)
unit CustomerListWebModule;
interface
uses
Windows, Messages, SysUtils, Classes, HTTPApp, MidItems, XMLBrokr,
CompProd, PagItems, MidProd, Db, DBClient, MConnect, WebComp;
type
TWebModule1 = class(TWebModule)
DCOMConnection1: TDCOMConnection;
CustList: TMidasPageProducer;
XMLBroker1: TXMLBroker;
Data: TMidasPageProducer;
DataForm1: TDataForm;
FieldGroup1: TFieldGroup;
DataNavigator1: TDataNavigator;
OrderNo: TFieldText;
SaleDate: TFieldText;
ShipDate: TFieldText;
DataGrid1: TDataGrid;
DataNavigator2: TDataNavigator;
ItemNo: TTextColumn;
PartNo: TTextColumn;
Qty: TTextColumn;
Discount: TTextColumn;
StatusColumn1: TStatusColumn;
OrderNo2: TTextColumn;
ItemsTotal: TFieldText;
AmountPaid: TFieldText;
CustNames: TClientDataSet;
ReconcileError: TMidasPageProducer;
procedure DataHTMLTag(Sender: TObject; Tag: TTag;
const TagString: String; TagParams: TStrings;
var ReplaceText: String);
procedure CustListHTMLTag(Sender: TObject; Tag: TTag;
const TagString: String; TagParams: TStrings;
var ReplaceText: String);
procedure XMLBroker1RequestRecords(Sender: TObject;
Request: TWebRequest; out RecCount: Integer;
var OwnerData: OleVariant; var Records: String);
procedure DataBeforeGetContent(Sender: TObject);
procedure ReconcileErrorHTMLTag(Sender: TObject; Tag: TTag;
const TagString: String; TagParams: TStrings;
var ReplaceText: String);
private
procedure AddScript(Data: Pointer;
AddScriptElements: IAddScriptElements);
{ Private declarations }
public
{ Public declarations }
end;
var
WebModule1: TWebModule1;
implementation
{$R *.DFM}
procedure TWebModule1.DataHTMLTag(Sender: TObject; Tag: TTag;
const TagString: String; TagParams: TStrings; var ReplaceText: String);
var
CustNo: Integer;
begin
// See the HTMDoc property for location of tags.
if TagString = 'HREFCUSTLIST' then
begin
// provide value for <A HREF= to return to customer list
ReplaceText := Request.ScriptName;
// Note that the HTMLDoc property has an onclick handler
// to prevent this HREF from being followed if there are
// pending updates.
end
else if TagString = 'CUSTOMER' then
begin
// HTML describing customer
if XMLBroker1.Params.Count = 0 then
XMLBroker1.FetchParams;
CustNo := XMLBroker1.Params[0].AsInteger;
CustNames.Active := True;
CustNames.Locate('CustNo', VarArrayOf([CustNo]), []);
ReplaceText :=
Format('<H1>Customer Number: %d</H1>' +
'<H1>Customer Name: %s</H1>',
[CustNo,
CustNames.FieldByName('Company').AsString]);
end;
end;
procedure TWebModule1.CustListHTMLTag(Sender: TObject; Tag: TTag;
const TagString: String; TagParams: TStrings; var ReplaceText: String);
var
CompanyField, CustNoField: TField;
begin
// See the HTMDoc property for location of tags
// Generate list of customer HREFS. XMLBroker1 will
// use the Name/Value pairs to set Params.
if TagString = 'CUSTOMERLIST' then
begin
CompanyField := CustNames.FieldByName('Company');
CustNoField := CustNames.FieldByName('CustNo');
CustNames.Open;
while not CustNames.Eof do
begin
ReplaceText := Format('%s<A HREF="%s/Data?CustNo=%d">%s</A><BR>'#13#10,
[ReplaceText, Request.ScriptName, CustNoField.AsInteger, CompanyField.AsString]);
CustNames.Next;
end;
end;
end;
procedure TWebModule1.XMLBroker1RequestRecords(Sender: TObject;
Request: TWebRequest; out RecCount: Integer; var OwnerData: OleVariant;
var Records: String);
begin
// Set params using name/value pairs in URL
XMLBroker1.Params.AssignStrings(Request.QueryFields);
end;
// Add a JavaScript method to check for pending updates.
procedure TWebModule1.AddScript(Data: Pointer; AddScriptElements: IAddScriptElements);
begin
with AddScriptElements.ScriptManager do
if XMLDocuments.Count > 0 then
with XMLDocuments.Items[0] do
if RowSets.Count > 0 then
with RowSets.Items[0] do
AddScriptElements.AddFunction('CheckData',
Format(
'function CheckData()'#13#10 +
'{'#13#10 +
' if ((%0:s.forcepost() != 0) ||'#13#10 +
' (%0:s.DeltaChanges.row.length >0))'#13#10 +
' {'#13#10 +
' return confirm("Data has been changed. Discard changes?");'#13#10 +
' };'#13#10 +
'};'#13#10, [RowSetVarName]));
end;
procedure TWebModule1.DataBeforeGetContent(Sender: TObject);
var
ScriptProducer: IScriptProducer;
begin
if Data.GetInterface(IScriptProducer, ScriptProducer) then
ScriptProducer.ScriptManager.AddElementsIntf.AddPass(AddScript, nil);
end;
procedure TWebModule1.ReconcileErrorHTMLTag(Sender: TObject; Tag: TTag;
const TagString: String; TagParams: TStrings; var ReplaceText: String);
begin
// See the HTMDoc property for location of tags.
if TagString = 'HREFCUSTLIST' then
begin
// provide value for <A HREF= to return to customer list
ReplaceText := Request.ScriptName;
end
else if TagString = 'REDIRECT' then
begin
// Get redirect value send with delta packet.
ReplaceText := Request.ContentFields.Values[SRedirect];
end;
end;
end.
|
unit UClasses;
interface
uses
Windows, Messages, Classes, Controls, TntControls, StdCtrls, Graphics,
TntClasses, TntSysUtils, TntStdCtrls, SysUtils, Dialogs, TntButtons, Forms;
const
IDI_SubEditMinWidth = 40;
IDI_SubBtnMinWidth = 22;
{ TGcxCustomEdit }
type
TGcxCustomEdit = class(TTntCustomEdit)
private
FAlignment: TAlignment;//2013-12-08,
FMargin: Integer;//2013-12-08,
FCommonColor: TColor;
FReadOnlyColor: TColor;
FLoading: Boolean;
procedure SetCommonColor(const Value: TColor);
procedure SetReadOnlyColor(const Value: TColor);
function GetReadOnly: Boolean;
procedure SetReadOnly(const Value: Boolean);
function GetColor: TColor;
procedure SetColor(const Value: TColor);
function GetLoading: Boolean;
procedure SetLoading(const Value: Boolean);
procedure SetAlignment(Value: TAlignment);//2013-12-08,
procedure SetMargin(const Value: Integer);
protected
procedure UpdateColor;
function AllowKey(Key: Char): Boolean; virtual;
procedure KeyPress(var Key: Char); override;
procedure CompleteChange; virtual;
procedure CreateParams(var Params: TCreateParams); override;//2013-12-08,
procedure CreateWnd; override;//2013-12-08,
procedure SetEditRect; virtual;//2013-12-08,
property CommonColor: TColor
read FCommonColor write SetCommonColor default clInfoBk;
property ReadOnlyColor: TColor
read FReadOnlyColor write SetReadOnlyColor default clSkyBlue;
property ReadOnly: Boolean read GetReadOnly write SetReadOnly default False;
property Color: TColor read GetColor write SetColor default clInfoBk;
property Loading: Boolean read GetLoading write SetLoading;
property Alignment: TAlignment
read FAlignment write SetAlignment default taLeftJustify;
property Margin: Integer read FMargin write SetMargin default 5;
property TabStop default True;
public
constructor Create(AOwner: TComponent); override;
published
property Width default 49;
end;
{ TGcxEdit }
TGcxEdit = class(TGcxCustomEdit)
published
property CommonColor;
property ReadOnlyColor;
property Alignment;//2013-12-08,
property Margin;//2013-12-08,
property Align;
property Anchors;
property AutoSelect;
property AutoSize;
property BevelEdges;
property BevelInner;
property BevelKind default bkNone;
property BevelOuter;
property BevelWidth;
property BiDiMode;
property BorderStyle;
property CharCase;
property Color;
property Constraints;
property Ctl3D;
property DragCursor;
property DragKind;
property DragMode;
property Enabled;
property Font;
property HideSelection;
property ImeMode;
property ImeName;
property MaxLength;
property OEMConvert;
property ParentBiDiMode;
property ParentColor;
property ParentCtl3D;
property ParentFont;
property ParentShowHint;
property PasswordChar;
property PopupMenu;
property ReadOnly;
property ShowHint;
property TabOrder;
property TabStop;
property Text;
property Visible;
property OnChange;
property OnClick;
property OnContextPopup;
property OnDblClick;
property OnDragDrop;
property OnDragOver;
property OnEndDock;
property OnEndDrag;
property OnEnter;
property OnExit;
property OnKeyDown;
property OnKeyPress;
property OnKeyUp;
{$IFDEF COMPILER_9_UP}
property OnMouseActivate;
{$ENDIF}
property OnMouseDown;
{$IFDEF COMPILER_10_UP}
property OnMouseEnter;
property OnMouseLeave;
{$ENDIF}
property OnMouseMove;
property OnMouseUp;
property OnStartDock;
property OnStartDrag;
end;
{ TGcxCustomIntEdit }
TIntegerFormatStyle = (ifsInteger, ifsHex, ifsBinary, ifsOctal);
TGcxCustomIntEdit = class(TGcxCustomEdit)
private
FValue : Integer;
FValueMax: Integer;
FValueMin: Integer;
FFormatStyle: TIntegerFormatStyle;
FLeadingZeros: Boolean;
FBeepOnError: Boolean;
FUndoOnError: Boolean;
procedure SetValue(const Value: Integer);
procedure SetValueMax(const Value: Integer);
procedure SetValueMin(const Value: Integer);
procedure SetFormatStyle(const Value: TIntegerFormatStyle);
procedure SetMaxLength(const Value: Integer);
function GetMaxLength: Integer;
procedure SetLeadingZeros(const Value: Boolean);
protected
function GetText(Value: Integer): WideString;
procedure UpdateText;
procedure CompleteChange; override;
procedure DoExit; override;
function GetValue(Value: WideString): Integer;
function AllowKey(Key: Char): Boolean; override;
property Value : Integer read FValue write SetValue default 0;
property ValueMax: Integer read FValueMax write SetValueMax default 0;
property ValueMin: Integer read FValueMin write SetValueMin default 0;
property FormatStyle: TIntegerFormatStyle read FFormatStyle
write SetFormatStyle default ifsInteger;
property MaxLength: Integer read GetMaxLength write SetMaxLength default 0;
property LeadingZeros: Boolean read FLeadingZeros write SetLeadingZeros;
property BeepOnError: Boolean
read FBeepOnError write FBeepOnError default False;
property UndoOnError: Boolean
read FUndoOnError write FUndoOnError default True;
public
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
end;
{ TGcxIntEdit }
TGcxIntEdit = class(TGcxCustomIntEdit)
published
property Value;
property ValueMax;
property ValueMin;
property FormatStyle;
property LeadingZeros;
property CommonColor;
property ReadOnlyColor;
property Align;
property Anchors;
property AutoSelect;
property AutoSize;
property BevelEdges;
property BevelInner;
property BevelKind default bkNone;
property BevelOuter;
property BevelWidth;
property BiDiMode;
property BorderStyle;
property CharCase;
property Color;
property Constraints;
property Ctl3D;
property DragCursor;
property DragKind;
property DragMode;
property Enabled;
property Font;
property HideSelection;
property ImeMode;
property ImeName;
property MaxLength;
property OEMConvert;
property ParentBiDiMode;
property ParentColor;
property ParentCtl3D;
property ParentFont;
property ParentShowHint;
property PasswordChar;
property PopupMenu;
property ReadOnly;
property ShowHint;
property TabOrder;
property TabStop;
property Text;
property Visible;
property OnChange;
property OnClick;
property OnContextPopup;
property OnDblClick;
property OnDragDrop;
property OnDragOver;
property OnEndDock;
property OnEndDrag;
property OnEnter;
property OnExit;
property OnKeyDown;
property OnKeyPress;
property OnKeyUp;
{$IFDEF COMPILER_9_UP}
property OnMouseActivate;
{$ENDIF}
property OnMouseDown;
{$IFDEF COMPILER_10_UP}
property OnMouseEnter;
property OnMouseLeave;
{$ENDIF}
property OnMouseMove;
property OnMouseUp;
property OnStartDock;
property OnStartDrag;
end;
{ TGcxCustomLabel }
TGcxCustomLabel = class(TTntCustomLabel)
private
protected
public
//constructor Create;
//destructor Destroy; override;
published
end;
{ TGcxBoundLabel }
TLabelPosition = (lpLeft, lpRight, lpAbove, lpBelow);
IBoundLabelOwner = interface
['{4A1CE667-3DDC-4E08-A4FA-3222090968D5}']
function GetLabelPosition: TLabelPosition;
procedure SetLabelPosition(const Value: TLabelPosition);
property LabelPosition: TLabelPosition
read GetLabelPosition write SetLabelPosition;
end;
TGcxBoundLabel = class(TGcxCustomLabel)
private
FBind: TWinControl;
function GetTop: Integer;
function GetLeft: Integer;
function GetWidth: Integer;
function GetHeight: Integer;
procedure SetHeight(const Value: Integer);
procedure SetWidth(const Value: Integer);
protected
procedure AdjustBounds; override;
procedure SetBind(ABind: TWinControl);
public
constructor Create(AOwner: TComponent); override;
//destructor Destroy; override;
property Bind: TWinControl read FBind;
published
end;
{ TGcxCustomLabeledEdit }
TGcxCustomLabeledEdit = class(TGcxCustomEdit, IBoundLabelOwner)
private
FEditLabel: TGcxBoundLabel;
FLabelPosition: TLabelPosition;
FLabelSpacing: Integer;
function GetLabelPosition: TLabelPosition;
procedure SetLabelPosition(const Value: TLabelPosition);
procedure SetLabelSpacing(const Value: Integer);
protected
procedure SetParent(AParent: TWinControl); override;
procedure Notification(AComponent: TComponent;
Operation: TOperation); override;
procedure SetName(const Value: TComponentName); override;
procedure CMVisibleChanged(var Message: TMessage); message CM_VISIBLECHANGED;
procedure CMEnabledChanged(var Message: TMessage); message CM_ENABLEDCHANGED;
procedure CMBidimodeChanged(var Message: TMessage); message CM_BIDIMODECHANGED;
public
//destructor Destroy; override;
constructor Create(AOwner: TComponent); override;
procedure SetBounds(ALeft: Integer; ATop: Integer;
AWidth: Integer; AHeight: Integer); override;
procedure SetupInternalLabel;
property EditLabel: TGcxBoundLabel read FEditLabel;
property LabelPosition: TLabelPosition
read GetLabelPosition write SetLabelPosition default lpLeft;
property LabelSpacing: Integer
read FLabelSpacing write SetLabelSpacing default 3;
published
end;
{ TGcxCustomIntLabeledEdit }
TGcxCustomIntLabeledEdit = class(TGcxCustomIntEdit, IBoundLabelOwner)
private
FEditLabel: TGcxBoundLabel;
FLabelPosition: TLabelPosition;
FLabelSpacing: Integer;
function GetLabelPosition: TLabelPosition;
procedure SetLabelPosition(const Value: TLabelPosition);
procedure SetLabelSpacing(const Value: Integer);
protected
procedure SetParent(AParent: TWinControl); override;
procedure Notification(AComponent: TComponent;
Operation: TOperation); override;
procedure SetName(const Value: TComponentName); override;
procedure CMVisibleChanged(var Message: TMessage); message CM_VISIBLECHANGED;
procedure CMEnabledChanged(var Message: TMessage); message CM_ENABLEDCHANGED;
procedure CMBidimodeChanged(var Message: TMessage); message CM_BIDIMODECHANGED;
public
//destructor Destroy; override;
constructor Create(AOwner: TComponent); override;
procedure SetBounds(ALeft: Integer; ATop: Integer;
AWidth: Integer; AHeight: Integer); override;
procedure SetupInternalLabel;
property EditLabel: TGcxBoundLabel read FEditLabel;
property LabelPosition: TLabelPosition
read GetLabelPosition write SetLabelPosition default lpLeft;
property LabelSpacing: Integer
read FLabelSpacing write SetLabelSpacing default 3;
published
end;
TGcxCustomIntLabeledEditX = class(TGcxCustomIntLabeledEdit)
published
property Alignment;
property CharCase;
property Constraints;
property EditLabel;
property FormatStyle;
property HideSelection;
property LabelPosition;
property LabelSpacing;
property LeadingZeros;
property Margin;
property MaxLength;
property ParentShowHint;
property PopupMenu;
property ShowHint;
property Value;
property ValueMax;
property ValueMin;
//published
property OnChange;
property OnClick;
property OnDblClick;
property OnEnter;
property OnExit;
property OnKeyDown;
property OnKeyPress;
property OnKeyUp;
property OnMouseDown;
property OnMouseMove;
property OnMouseUp;
end;
TGcxCustomEditX = class(TGcxCustomEdit)
published
property Alignment;
property Constraints;
property HideSelection;
property ImeMode;
property ImeName;
property Margin;
property MaxLength;
property ParentShowHint;
property PopupMenu;
property ShowHint;
property Text;
//published
property OnChange;
property OnClick;
property OnDblClick;
property OnEnter;
property OnExit;
property OnKeyDown;
property OnKeyPress;
property OnKeyUp;
{$IFDEF COMPILER_9_UP}
property OnMouseActivate;
{$ENDIF}
property OnMouseDown;
{$IFDEF COMPILER_10_UP}
property OnMouseEnter;
property OnMouseLeave;
{$ENDIF}
property OnMouseMove;
property OnMouseUp;
end;
TGcxValueInfoEditArea = (vieaNone, vieaValue,
vieaValueToInfo, vieaInfo,
vieaInfoToButton, vieaButton);
{ TGcxCustomValueInfoEdit }
TGcxCustomValueInfoEdit = class(TWinControl)
private
FValueEdit: TGcxCustomIntLabeledEditX;
FInfoEdit: TGcxCustomEditX;
FSubBtn: TTntSpeedButton;
FSpace: Integer;
FDraging: Boolean;
FDragArea: TGcxValueInfoEditArea;
FMouseDownPoint: TPoint;
function GetCommonColor: TColor;
procedure SetCommonColor(const Value: TColor);
function GetReadOnly: Boolean;
procedure SetReadOnly(const Value: Boolean);
function GetReadOnlyColor: TColor;
procedure SetReadOnlyColor(const Value: TColor);
function GetButtonCaption: WideString;
procedure SetButtonCaption(const Value: WideString);
function GetCaption: WideString;
procedure SetCaption(const Value: WideString);
function GetFormatStyle: TIntegerFormatStyle;
procedure SetFormatStyle(const Value: TIntegerFormatStyle);
function GetLabelPosition: TLabelPosition;
procedure SetLabelPosition(const Value: TLabelPosition);
function GetText: WideString;
procedure SetText(const Value: WideString);
function GetValue: Integer;
procedure SetValue(const Value: Integer);
procedure SetSpace(const Value: Integer);
procedure DoValueEditResize (Sender: TObject);
function GetBorderWidth: TBorderWidth;
procedure SetBorderWidth(const Value: TBorderWidth);
procedure StopDrag;
procedure CMBidimodeChanged(var Message: TMessage); message CM_BIDIMODECHANGED;
procedure CMEnabledChanged(var Message: TMessage); message CM_ENABLEDCHANGED;
procedure CMVisibleChanged(var Message: TMessage); message CM_VISIBLECHANGED;
procedure CMTabStopChanged(var Message: TMessage); message CM_TABSTOPCHANGED;
procedure WMSetFocus(var Message: TWMSetFocus); message WM_SETFOCUS;
procedure CMDesignHitTest(var Message: TCMDesignHitTest); message CM_DESIGNHITTEST;
protected
procedure Notification(AComponent: TComponent;
Operation: TOperation); override;
procedure SetName(const Value: TComponentName); override;
procedure SetParent(AParent: TWinControl); override;
procedure CMBorderWidthChanged(var Message: TMessage); message CM_BORDERCHANGED;
function HitTest(P: TPoint): TGcxValueInfoEditArea; overload;
function HitTest(X, Y: Integer): TGcxValueInfoEditArea; overload;
procedure WndProc(var Message: TMessage); override;
procedure CMMouseLeave(var Message: TMessage); message CM_MOUSELEAVE;
procedure MouseDown(Button: TMouseButton; Shift: TShiftState;
X, Y: Integer); override;
procedure MouseMove(Shift: TShiftState; X, Y: Integer); override;
procedure MouseUp(Button: TMouseButton; Shift: TShiftState;
X, Y: Integer); override;
property CommonColor: TColor
read GetCommonColor write SetCommonColor default clInfoBk;
property ReadOnly: Boolean read GetReadOnly write SetReadOnly default False;
property ReadOnlyColor: TColor
read GetReadOnlyColor write SetReadOnlyColor default clSkyBlue;
property ButtonCaption: WideString
read GetButtonCaption write SetButtonCaption;
property Caption: WideString read GetCaption write SetCaption;
property FormatStyle: TIntegerFormatStyle
read GetFormatStyle write SetFormatStyle default ifsInteger;
property LabelPosition: TLabelPosition
read GetLabelPosition write SetLabelPosition default lpLeft;
property Text: WideString read GetText write SetText;
property Value: Integer read GetValue write SetValue default 0;
property Space: Integer read FSpace write SetSpace;
property BorderWidth: TBorderWidth
read GetBorderWidth write SetBorderWidth default 0;
public
procedure SetBounds(ALeft, ATop, AWidth, AHeight: Integer); override;
constructor Create(AOwner: TComponent); override;
property ValueEdit: TGcxCustomIntLabeledEditX read FValueEdit;
property InfoEdit: TGcxCustomEditX read FInfoEdit;
property SubBtn: TTntSpeedButton read FSubBtn;
published
end;
{ TGcxValueInfoEdit }
TGcxValueInfoEdit = class(TGcxCustomValueInfoEdit)
published
property Anchors;
//property AutoSelect;
property AutoSize;
property BevelEdges;
property BevelInner;
property BevelKind;
property BevelOuter;
property BiDiMode;
//property BorderStyle;
//property CharCase;
property Color;
property Constraints;
property Ctl3D;
property DragCursor;
property DragKind;
property DragMode;
//property EditLabel;
property Enabled;
property Font;
//property HideSelection;
property ImeMode;
property ImeName;
property LabelPosition;
//property LabelSpacing;
//property MaxLength;
//property OEMConvert;
property ParentBiDiMode;
property ParentColor;
property ParentCtl3D;
property ParentFont;
property ParentShowHint;
//property PasswordChar;
property PopupMenu;
property ReadOnly;
property ShowHint;
property TabOrder;
property TabStop;
property Text;
property Visible;
//property OnChange;
property OnClick;
property OnContextPopup;
property OnDblClick;
property OnDragDrop;
property OnDragOver;
property OnEndDock;
property OnEndDrag;
property OnEnter;
property OnExit;
property OnKeyDown;
property OnKeyPress;
property OnKeyUp;
property OnMouseDown;
property OnMouseMove;
property OnMouseUp;
property OnStartDock;
property OnStartDrag;
end;
procedure Register;
implementation
uses
Math;
////////////////////////////////////////////////////////////////////////////////
//非类方法
//这段函数来源自IOComp组件库iGPFunctions单元的iIntToStr
function GcxIntToStr(Value: Int64; Format: TIntegerFormatStyle;
MaxLength: Integer; LeadingZeros: Boolean): String;
var
x : Integer;
ShiftMultiplier : Integer;
DigitValue : Integer;
TempValue : Int64;//Longword;
begin
Result := '';
ShiftMultiplier := 0;
TempValue := Value;
case Format of
ifsInteger:
begin
Result := IntToStr(Value);
end;
ifsHex:
begin
for x := 1 to 8 do
begin
if ShiftMultiplier <> 0 then
TempValue := Value shr (4 * ShiftMultiplier);
DigitValue := TempValue and $F;
Result := IntToHex(DigitValue, 1) + Result;
Inc(ShiftMultiplier);
end;
end;
ifsBinary:
begin
for x := 1 to 32 do
begin
if ShiftMultiplier <> 0 then
TempValue := Value shr (1 * ShiftMultiplier);
DigitValue := TempValue and $1;
Result := IntToStr(DigitValue) + Result;
Inc(ShiftMultiplier);
end;
end;
ifsOctal:
begin
for x := 1 to 10 do
begin
if ShiftMultiplier <> 0 then
TempValue := Value shr (3*ShiftMultiplier);
DigitValue := TempValue and $7;
Result := IntToStr(DigitValue) + Result;
Inc(ShiftMultiplier);
end;
end;
end;
while Copy(Result, 1, 1) = '0' do
Result := Copy(Result, 2, Length(Result) - 1);
if LeadingZeros then
begin
while Length(Result) < MaxLength do
Result := '0' + Result;
end;
if Result = '' then
Result := '0';
end;
//这段函数来源自IOComp组件库iGPFunctions单元的iStrToInt
function GcxStrToInt(Value: String): Int64;
var
ACharacter : String;
AString : String;
CurrentPower : Integer;
begin
Result := 0;
CurrentPower := 0;
ACharacter := Copy(Value, 1, 1);
if ACharacter = 'b' then
begin
AString := Copy(Value, 2, Length(Value) -1);
while Length(AString) <> 0 do
begin
ACharacter := Copy(AString, Length(AString), 1);
Result := Result + StrToInt(ACharacter) * Trunc(Power(2, CurrentPower) + 0.0001);
AString := Copy(AString, 1, Length(AString) -1);
Inc(CurrentPower);
end;
end
else if ACharacter = 'o' then
begin
AString := Copy(Value, 2, Length(Value) -1);
while Length(AString) <> 0 do
begin
ACharacter := Copy(AString, Length(AString), 1);
Result := Result + StrToInt(ACharacter) * Trunc(Power(8, CurrentPower) + 0.0001);
AString := Copy(AString, 1, Length(AString) -1);
Inc(CurrentPower);
end;
end
else
begin
Result := StrToInt(Value);
end;
end;
////////////////////////////////////////////////////////////////////////////////
{ TGcxCustomEdit }
function TGcxCustomEdit.AllowKey(Key: Char): Boolean;
begin
Result := True;
end;
procedure TGcxCustomEdit.CompleteChange;
begin
end;
constructor TGcxCustomEdit.Create(AOwner: TComponent);
begin
inherited;
FCommonColor := clInfoBk;
FReadOnlyColor := clSkyBlue;
FAlignment := taLeftJustify;
FMargin := 5;
UpdateColor;
ImeName := '';
Width := 49;
end;
function TGcxCustomEdit.GetColor: TColor;
begin
Result := inherited Color;
end;
function TGcxCustomEdit.GetLoading: Boolean;
begin
Result := False;
if csLoading in ComponentState then Result := True;
if FLoading then Result := True;
end;
function TGcxCustomEdit.GetReadOnly: Boolean;
begin
Result := inherited ReadOnly;
end;
procedure TGcxCustomEdit.KeyPress(var Key: Char);
begin
inherited;
if not AllowKey(Key) then
Key := #0;
end;
procedure TGcxCustomEdit.SetAlignment(Value: TAlignment);
begin
if FAlignment <> Value then
begin
FAlignment := Value;
RecreateWnd;
end;
end;
procedure TGcxCustomEdit.SetColor(const Value: TColor);
begin
if ReadOnly then
FReadOnlyColor := Value
else
FCommonColor := Value;
UpdateColor;
end;
procedure TGcxCustomEdit.SetCommonColor(const Value: TColor);
begin
FCommonColor := Value;
UpdateColor;
end;
procedure TGcxCustomEdit.SetLoading(const Value: Boolean);
begin
FLoading := Value;
end;
procedure TGcxCustomEdit.SetReadOnly(const Value: Boolean);
begin
inherited ReadOnly := Value;
UpdateColor;
end;
procedure TGcxCustomEdit.SetReadOnlyColor(const Value: TColor);
begin
FReadOnlyColor := Value;
UpdateColor;
end;
procedure TGcxCustomEdit.UpdateColor;
begin
if ReadOnly then
inherited Color := FReadOnlyColor
else
inherited Color := FCommonColor;
end;
procedure TGcxCustomEdit.CreateParams(var Params: TCreateParams);
const
Alignments: array[Boolean, TAlignment] of DWORD =
((ES_LEFT, ES_RIGHT, ES_CENTER),(ES_RIGHT, ES_LEFT, ES_CENTER));
begin
inherited CreateParams(Params);
with Params do
begin
ExStyle := Exstyle and not WS_EX_Transparent;
Style := Style and not WS_BORDER or
Alignments[UseRightToLeftAlignment, FAlignment];
end;
end;
procedure TGcxCustomEdit.SetMargin(const Value: Integer);
begin
if FMargin <> Value then
begin
FMargin := Value;
RecreateWnd;//调用这个方法,非经验丰富,谁能知道,即使现在看到也不懂!
end;
end;
procedure TGcxCustomEdit.CreateWnd;
begin
inherited;
SetEditRect;
end;
procedure TGcxCustomEdit.SetEditRect;
begin
if (Handle = 0) or (not Assigned(Self.Parent)) then
Exit;
SendMessage(Handle, EM_SetMargins, EC_LeftMargin, MakeLong(FMargin, 0));
SendMessage(Handle, EM_SetMargins, EC_RightMargin, MakeLong(0, FMargin));
end;
{ TGcxCustomIntEdit }
destructor TGcxCustomIntEdit.Destroy;
begin
inherited;
end;
function TGcxCustomIntEdit.GetMaxLength: Integer;
begin
Result := inherited MaxLength;
end;
procedure TGcxCustomIntEdit.SetFormatStyle(
const Value: TIntegerFormatStyle);
begin
if FFormatStyle <> Value then
begin
FFormatStyle := Value;
UpdateText;
end;
end;
procedure TGcxCustomIntEdit.SetLeadingZeros(const Value: Boolean);
begin
if FLeadingZeros <> Value then
begin
FLeadingZeros := Value;
UpdateText;
end;
end;
procedure TGcxCustomIntEdit.SetMaxLength(const Value: Integer);
begin
inherited MaxLength := Value;
UpdateText;
end;
procedure TGcxCustomIntEdit.SetValue(const Value: Integer);
var
IntTmp: Integer;
begin
IntTmp := Value;
//if not ((FValueMax = 0) and (FValueMin = 0)) and not Loading then//原来的代码
if not Loading then
begin
if IntTmp > FValueMax then
IntTmp := FValueMax;
if IntTmp < FValueMin then
IntTmp := FValueMin;
end;
if FValue <> IntTmp then
begin
FValue := IntTmp;
UpdateText;
end;
end;
procedure TGcxCustomIntEdit.SetValueMax(const Value: Integer);
begin
if FValueMax <> Value then
begin
FValueMax := Value;
Self.Value := FValue;
end;
end;
procedure TGcxCustomIntEdit.SetValueMin(const Value: Integer);
begin
if FValueMin <> Value then
begin
FValueMin := Value;
Self.Value := FValue;
end;
end;
function TGcxCustomIntEdit.GetText(Value: Integer): WideString;
var
TmpMaxLength: Integer;
begin
TmpMaxLength := MaxLength;
case FFormatStyle of
ifsInteger:
begin
end;
ifsHex:
begin
if (TmpMaxLength > 8) or (TmpMaxLength = 0) then
TmpMaxLength := 8;
end;
ifsBinary:
begin
if (TmpMaxLength > 32) or (TmpMaxLength = 0) then
TmpMaxLength := 32;
end;
ifsOctal:
begin
if (TmpMaxLength > 10) or (TmpMaxLength = 0) then
TmpMaxLength := 10;
end;
else Exit;
end;
Result := GcxIntToStr(Value, FFormatStyle, TmpMaxLength, FLeadingZeros);
end;
procedure TGcxCustomIntEdit.UpdateText;
begin
GetText(FValue);
end;
procedure TGcxCustomIntEdit.CompleteChange;
begin
inherited;
Value := GetValue(Text);//这里或许应该判断Text不能为空,否则转换会出错,2013-12-08
end;
procedure TGcxCustomIntEdit.DoExit;
begin
inherited;
CompleteChange;
end;
function TGcxCustomIntEdit.GetValue(Value: WideString): Integer;
begin
Result := 0;
try
case FFormatStyle of
ifsInteger : Result := GcxStrToInt( Value);
ifsHex : Result := GcxStrToInt('$' + Value);
ifsBinary : Result := GcxStrToInt('b' + Value);
ifsOctal : Result := GcxStrToInt('o' + Value);
end;
except
on e: exception do
begin
if FUndoOnError then
begin
Undo;
Result := FValue;
if FBeepOnError then Beep;
end
else raise;
end;
end;
end;
function TGcxCustomIntEdit.AllowKey(Key: Char): Boolean;
var
BadKey : Boolean;
begin
case FormatStyle of
ifsInteger : BadKey := not (Key in [#8, '0'..'9', '-']);
ifsHex : BadKey := not (Key in [#8, '0'..'9', 'a'..'f', 'A'..'F']);
ifsBinary : BadKey := not (Key in [#8, '0'..'1']);
ifsOctal : BadKey := not (Key in [#8, '0'..'7']);
else
BadKey := True;
end;
//2013-12-08 03:27:00,zsl,ifsInteger时仅首位允许"-"
//if (not BadKey) and (Length(Text) > 0) then//不行,得判断KeyPress时光标的位置才行,SelStart
if (not BadKey) and (SelStart > 0) then//SelStart,SelLength,SelText,查看代码,2013-12-08 20:03:00,zsl
BadKey := (Key = '-');
if BadKey then
begin
if FBeepOnError then Beep;
end;
Result := not BadKey;
end;
constructor TGcxCustomIntEdit.Create(AOwner: TComponent);
begin
inherited;
Self.ImeName := '';
Self.ImeMode := imClose;
FUndoOnError := True;
FValueMax := 0;//?有default值了为什么还要在这里置0
FValue := 0; //?有default值了为什么还要在这里置0
FAlignment := taRightJustify;
UpdateText;
end;
{ TGcxBoundLabel }
procedure TGcxBoundLabel.AdjustBounds;
begin
inherited AdjustBounds;
if Supports(Owner, IBoundLabelOwner) then
with Owner as IBoundLabelOwner do
SetLabelPosition(GetLabelPosition);
end;
constructor TGcxBoundLabel.Create(AOwner: TComponent);
begin
inherited;
end;
function TGcxBoundLabel.GetHeight: Integer;
begin
Result := inherited Height;
end;
function TGcxBoundLabel.GetLeft: Integer;
begin
Result := inherited Left;
end;
function TGcxBoundLabel.GetTop: Integer;
begin
Result := inherited Top;
end;
function TGcxBoundLabel.GetWidth: Integer;
begin
Result := inherited Width;
end;
procedure TGcxBoundLabel.SetBind(ABind: TWinControl);
begin
Self.FBind := ABind;
end;
procedure TGcxBoundLabel.SetHeight(const Value: Integer);
begin
SetBounds(Left, Top, Width, Value);
end;
procedure TGcxBoundLabel.SetWidth(const Value: Integer);
begin
SetBounds(Left, Top, Value, Height);
end;
{ TGcxCustomLabeledEdit }
procedure TGcxCustomLabeledEdit.CMBidimodeChanged(var Message: TMessage);
begin
inherited;
FEditLabel.BiDiMode := BiDiMode;
end;
procedure TGcxCustomLabeledEdit.CMEnabledChanged(var Message: TMessage);
begin
inherited;
FEditLabel.Enabled := Enabled;
end;
procedure TGcxCustomLabeledEdit.CMVisibleChanged(var Message: TMessage);
begin
inherited;
FEditLabel.Visible := Visible;
end;
constructor TGcxCustomLabeledEdit.Create(AOwner: TComponent);
begin
inherited Create(AOwner);
FLabelPosition := lpAbove;
FLabelSpacing := 3;
SetupInternalLabel;
end;
function TGcxCustomLabeledEdit.GetLabelPosition: TLabelPosition;
begin
Result := FLabelPosition;
end;
procedure TGcxCustomLabeledEdit.Notification(AComponent: TComponent;
Operation: TOperation);
begin
inherited Notification(AComponent, Operation);
if (AComponent = FEditLabel) and (Operation = opRemove) then
FEditLabel := nil;
end;
procedure TGcxCustomLabeledEdit.SetBounds(ALeft, ATop, AWidth,
AHeight: Integer);
begin
inherited SetBounds(ALeft, ATop, AWidth, AHeight);
SetLabelPosition(FLabelPosition);
end;
procedure TGcxCustomLabeledEdit.SetLabelPosition(
const Value: TLabelPosition);
procedure UpdateLabelPosition(AOwner: TWinControl;
AEditLabel: TCustomLabel;
const NewLabelPosition: TLabelPosition;
const ALabelSpacing: Integer);
var
P: TPoint;
obj: TWinControl;
begin
if AEditLabel = nil then Exit;
obj := AOwner;
if (AEditLabel is TGcxBoundLabel) then
begin
with (AEditLabel as TGcxBoundLabel) do
if Assigned(Bind) then
obj := Bind;
end;
if not Assigned(obj) then
Exit;
with obj do
case NewLabelPosition of
lpAbove: P := Point(Left, Top - AEditLabel.Height - ALabelSpacing);
lpBelow: P := Point(Left, Top + Height + ALabelSpacing);
lpLeft : P := Point(Left - AEditLabel.Width - ALabelSpacing,
Top + ((Height - AEditLabel.Height) div 2));
lpRight: P := Point(Left + Width + ALabelSpacing,
Top + ((Height - AEditLabel.Height) div 2));
end;
AEditLabel.SetBounds(P.x, P.y, AEditLabel.Width, AEditLabel.Height);
end;
begin
FLabelPosition := Value;
UpdateLabelPosition(Self, FEditLabel, FLabelPosition, FLabelSpacing);
end;
procedure TGcxCustomLabeledEdit.SetLabelSpacing(const Value: Integer);
begin
FLabelSpacing := Value;
SetLabelPosition(FLabelPosition);
end;
procedure TGcxCustomLabeledEdit.SetName(const Value: TComponentName);
begin
if (csDesigning in ComponentState) and ((FEditlabel.GetTextLen = 0) or
(CompareText(FEditLabel.Caption, Name) = 0)) then
FEditLabel.Caption := Value;
inherited SetName(Value);
if csDesigning in ComponentState then
Text := '';
end;
procedure TGcxCustomLabeledEdit.SetParent(AParent: TWinControl);
begin
inherited SetParent(AParent);
if FEditLabel = nil then exit;
FEditLabel.Parent := AParent;
FEditLabel.Visible := True;
end;
procedure TGcxCustomLabeledEdit.SetupInternalLabel;
begin
if Assigned(FEditLabel) then exit;
FEditLabel := TGcxBoundLabel.Create(Self);
FEditLabel.FreeNotification(Self);
FEditLabel.FocusControl := Self;
end;
{ TGcxCustomIntLabeledEdit }
procedure TGcxCustomIntLabeledEdit.CMBidimodeChanged(var Message: TMessage);
begin
inherited;
FEditLabel.BiDiMode := BiDiMode;
end;
procedure TGcxCustomIntLabeledEdit.CMEnabledChanged(var Message: TMessage);
begin
inherited;
FEditLabel.Enabled := Enabled;
end;
procedure TGcxCustomIntLabeledEdit.CMVisibleChanged(var Message: TMessage);
begin
inherited;
FEditLabel.Visible := Visible;
end;
constructor TGcxCustomIntLabeledEdit.Create(AOwner: TComponent);
begin
inherited Create(AOwner);
FLabelPosition := lpAbove;
FLabelSpacing := 3;
SetupInternalLabel;
end;
function TGcxCustomIntLabeledEdit.GetLabelPosition: TLabelPosition;
begin
Result := FLabelPosition;
end;
procedure TGcxCustomIntLabeledEdit.Notification(AComponent: TComponent;
Operation: TOperation);
begin
inherited Notification(AComponent, Operation);
if (AComponent = FEditLabel) and (Operation = opRemove) then
FEditLabel := nil;
end;
procedure TGcxCustomIntLabeledEdit.SetBounds(ALeft, ATop, AWidth,
AHeight: Integer);
begin
inherited SetBounds(ALeft, ATop, AWidth, AHeight);
SetLabelPosition(FLabelPosition);
end;
procedure TGcxCustomIntLabeledEdit.SetLabelPosition(
const Value: TLabelPosition);
procedure UpdateLabelPosition(AOwner: TWinControl;
AEditLabel: TCustomLabel;
const NewLabelPosition: TLabelPosition;
const ALabelSpacing: Integer);
var
P: TPoint;
obj: TWinControl;
begin
if AEditLabel = nil then Exit;
obj := AOwner;
if (AEditLabel is TGcxBoundLabel) then
begin
with (AEditLabel as TGcxBoundLabel) do
if Assigned(Bind) then
obj := Bind;
end;
if not Assigned(obj) then
Exit;
with obj do
case NewLabelPosition of
lpAbove: P := Point(Left, Top - AEditLabel.Height - ALabelSpacing);
lpBelow: P := Point(Left, Top + Height + ALabelSpacing);
lpLeft : P := Point(Left - AEditLabel.Width - ALabelSpacing,
Top + ((Height - AEditLabel.Height) div 2));
lpRight: P := Point(Left + Width + ALabelSpacing,
Top + ((Height - AEditLabel.Height) div 2));
end;
AEditLabel.SetBounds(P.x, P.y, AEditLabel.Width, AEditLabel.Height);
end;
begin
FLabelPosition := Value;
UpdateLabelPosition(Self, FEditLabel, FLabelPosition, FLabelSpacing);
end;
procedure TGcxCustomIntLabeledEdit.SetLabelSpacing(const Value: Integer);
begin
FLabelSpacing := Value;
SetLabelPosition(FLabelPosition);
end;
procedure TGcxCustomIntLabeledEdit.SetName(const Value: TComponentName);
begin
if (csDesigning in ComponentState) and ((FEditlabel.GetTextLen = 0) or
(CompareText(FEditLabel.Caption, Name) = 0)) then
FEditLabel.Caption := Value;
inherited SetName(Value);
if csDesigning in ComponentState then
Text := '';
end;
procedure TGcxCustomIntLabeledEdit.SetParent(AParent: TWinControl);
begin
inherited SetParent(AParent);
if FEditLabel = nil then exit;
FEditLabel.Parent := AParent;
FEditLabel.Visible := True;
end;
procedure TGcxCustomIntLabeledEdit.SetupInternalLabel;
begin
if Assigned(FEditLabel) then exit;
FEditLabel := TGcxBoundLabel.Create(Self);
FEditLabel.FreeNotification(Self);
FEditLabel.FocusControl := Self;
end;
{ TGcxCustomValueInfoEdit }
procedure TGcxCustomValueInfoEdit.CMBorderWidthChanged(
var Message: TMessage);
begin
SetBounds(Left, Top, Width, Height);
end;
constructor TGcxCustomValueInfoEdit.Create(AOwner: TComponent);
var
AWidth, AHeight: Integer;
iTop, iHeight: Integer;
begin
inherited Create(AOwner);
FSpace := 2;
Self.ParentFont := True;
iTop := 0;
AWidth := 0;
FValueEdit := TGcxCustomIntLabeledEditX.Create(Self);
with FValueEdit do
begin
Name := 'ValueEdit';
SetSubComponent(True);
Parent := Self;
Top := iTop;
Left := AWidth;
iHeight := Height;
AWidth := AWidth + Width + FSpace;
FreeNotification(Self);
OnResize := DoValueEditResize;
EditLabel.SetBind(Self);
Constraints.MinWidth := IDI_SubEditMinWidth;
TabOrder := 0;
end;
FInfoEdit := TGcxCustomEditX.Create(Self);
with FInfoEdit do
begin
Name := 'InfoEdit';
SetSubComponent(True);
Parent := Self;
Text := '';
Top := iTop;
Left := AWidth;
AWidth := AWidth + Width + FSpace;
FreeNotification(Self);
Constraints.MinWidth := IDI_SubEditMinWidth;
TabOrder := 1;
end;
FSubBtn := TTntSpeedButton.Create(Self);
with FSubBtn do
begin
Name := 'SubBtn';
SetSubComponent(True);
Parent := Self;
Top := iTop;
Left := AWidth;
Width := 22;
Height := iHeight;
AWidth := AWidth + Width;
FreeNotification(Self);
Constraints.MinWidth := IDI_SubBtnMinWidth;
TabOrder := 2;
end;
TabStop := True;
AWidth := AWidth + Self.BorderWidth * 2;
AHeight := iHeight + Self.BorderWidth * 2;
SetBounds(Self.Left, Self.Top, AWidth, AHeight);
end;
procedure TGcxCustomValueInfoEdit.DoValueEditResize(Sender: TObject);
var
iHeight: Integer;
begin
if (Sender is TCustomEdit) then
begin
iHeight := (Sender as TCustomEdit).Height;
Self.SubBtn.Height := iHeight;
Inc(iHeight, Self.BorderWidth shl 1);
if Self.Height <> iHeight then
Self.Height := iHeight;
end;
end;
function TGcxCustomValueInfoEdit.GetBorderWidth: TBorderWidth;
begin
Result := inherited BorderWidth;
end;
function TGcxCustomValueInfoEdit.GetButtonCaption: WideString;
begin
Result := Self.FSubBtn.Caption;
end;
function TGcxCustomValueInfoEdit.GetCaption: WideString;
begin
Result := Self.FValueEdit.EditLabel.Caption;
end;
function TGcxCustomValueInfoEdit.GetCommonColor: TColor;
begin
Result := FValueEdit.CommonColor;
end;
function TGcxCustomValueInfoEdit.GetFormatStyle: TIntegerFormatStyle;
begin
Result := FValueEdit.FormatStyle;
end;
function TGcxCustomValueInfoEdit.GetLabelPosition: TLabelPosition;
begin
Result := FValueEdit.LabelPosition;
end;
function TGcxCustomValueInfoEdit.GetReadOnly: Boolean;
begin
Result := FValueEdit.ReadOnly;
end;
function TGcxCustomValueInfoEdit.GetReadOnlyColor: TColor;
begin
Result := FValueEdit.ReadOnlyColor;
end;
function TGcxCustomValueInfoEdit.GetText: WideString;
begin
Result := Self.InfoEdit.Text;
end;
function TGcxCustomValueInfoEdit.GetValue: Integer;
begin
Result := Self.ValueEdit.Value;
end;
procedure TGcxCustomValueInfoEdit.Notification(AComponent: TComponent;
Operation: TOperation);
begin
inherited Notification(AComponent, Operation);
if (Operation = opRemove) then
begin
if (AComponent = FValueEdit) then
FValueEdit := nil;
if (AComponent = FInfoEdit) then
FInfoEdit := nil;
if (AComponent = FSubBtn) then
FSubBtn := nil;
end;
end;
procedure TGcxCustomValueInfoEdit.SetBorderWidth(const Value: TBorderWidth);
var
DiffValue: Integer;
begin
DiffValue := (Value - BorderWidth) * 2;
inherited BorderWidth := Value;
SetBounds(Left, Top, Width + DiffValue, Height + DiffValue);
end;
procedure TGcxCustomValueInfoEdit.SetBounds(ALeft, ATop, AWidth,
AHeight: Integer);
type
TCtrlBoundInfo = record
Obj: TControl;
CtrlRect: TRect;
WidthEx: Integer;
end;
var
i: Integer;
iMinWidth: TConstraintSize;
iLeft, iHeight, iWidth, iSumWidth, iDiffWidth: Integer;
mBorderWidth: Integer;
mCtrlBoundInfo: array of TCtrlBoundInfo;
begin
mBorderWidth := Self.BorderWidth;
SetLength(mCtrlBoundInfo, 3);
mCtrlBoundInfo[0].Obj := FValueEdit;
mCtrlBoundInfo[1].Obj := FInfoEdit;
mCtrlBoundInfo[2].Obj := FSubBtn;
iHeight := FValueEdit.Height;
iSumWidth := 0;
for i := Low(mCtrlBoundInfo) to High(mCtrlBoundInfo) do
begin
with mCtrlBoundInfo[i] do
begin
// 检查并设置子对象的最小宽度
if Obj.Constraints.MinWidth = 0 then
begin
if Obj = FSubBtn then
Obj.Constraints.MinWidth := IDI_SubBtnMinWidth
else
Obj.Constraints.MinWidth := IDI_SubEditMinWidth;
end;
// 检查并重新计算子对象宽度
iMinWidth := Obj.Constraints.MinWidth;
if Obj.Width < iMinWidth then
iWidth := iMinWidth
else
iWidth := Obj.Width;
// 保留子对象的范围空间、可缩小宽度
mCtrlBoundInfo[i].CtrlRect := Bounds(Obj.Left, 0, iWidth, iHeight);
mCtrlBoundInfo[i].WidthEx := iWidth - iMinWidth;
// 累计宽度
Inc(iSumWidth, iWidth + FSpace);
end;
end;
Inc(iSumWidth, mBorderWidth shl 1 - FSpace); // 计算内部的宽度
iDiffWidth := AWidth - iSumWidth; // 计算内外宽度差
if iDiffWidth >= 0 then
begin // 外部宽,增加 FInfoEdit 宽度
for i := Low(mCtrlBoundInfo) to High(mCtrlBoundInfo) do
begin
with mCtrlBoundInfo[i] do
if Obj = FInfoEdit then
begin
Inc(CtrlRect.Right, iDiffWidth);
Break;
end;
end;
end else
begin // 内部宽,减少内部控件宽度
iSumWidth := - iDiffWidth;
for i := Low(mCtrlBoundInfo) to High(mCtrlBoundInfo) do
begin
with mCtrlBoundInfo[i] do
begin
if WidthEx <= iSumWidth then
iDiffWidth := WidthEx
else
iDiffWidth := iSumWidth;
Dec(CtrlRect.Right, iDiffWidth);
Dec(iSumWidth, iDiffWidth);
Dec(WidthEx, iDiffWidth);
if iSumWidth = 0 then
Break;
end;
end;
Inc(AWidth, iSumWidth);
end;
// 重新计算并设置子对象的位置
mCtrlBoundInfo[0].Obj.BoundsRect := mCtrlBoundInfo[0].CtrlRect;
for i := Low(mCtrlBoundInfo) + 1 to High(mCtrlBoundInfo) do
begin
iLeft := mCtrlBoundInfo[i - 1].CtrlRect.Right + FSpace;
//Types.OffsetRect(mCtrlBoundInfo[i].CtrlRect,
// iLeft - mCtrlBoundInfo[i].CtrlRect.Left, 0);
OffsetRect(mCtrlBoundInfo[i].CtrlRect,
iLeft - mCtrlBoundInfo[i].CtrlRect.Left, 0);
mCtrlBoundInfo[i].Obj.BoundsRect := mCtrlBoundInfo[i].CtrlRect;
end;
AHeight := iHeight + mBorderWidth * 2;
inherited SetBounds(ALeft, ATop, AWidth, AHeight);
FValueEdit.SetLabelPosition(FValueEdit.LabelPosition);
end;
procedure TGcxCustomValueInfoEdit.SetButtonCaption(const Value: WideString);
begin
Self.FSubBtn.Caption := Value;
end;
procedure TGcxCustomValueInfoEdit.SetCaption(const Value: WideString);
begin
Self.FValueEdit.EditLabel.Caption := Value;
end;
procedure TGcxCustomValueInfoEdit.SetCommonColor(const Value: TColor);
begin
FValueEdit.CommonColor := Value;
FInfoEdit.CommonColor := Value;
end;
procedure TGcxCustomValueInfoEdit.SetFormatStyle(
const Value: TIntegerFormatStyle);
begin
Self.ValueEdit.FormatStyle := Value;
end;
procedure TGcxCustomValueInfoEdit.SetLabelPosition(
const Value: TLabelPosition);
begin
Self.FValueEdit.LabelPosition := Value;
end;
procedure TGcxCustomValueInfoEdit.SetName(const Value: TComponentName);
begin
if (csDesigning in ComponentState) and ((FValueEdit.EditLabel.GetTextLen = 0) or
(CompareText(FValueEdit.EditLabel.Caption, FValueEdit.Name) = 0) or
(CompareText(FValueEdit.EditLabel.Caption, Name) = 0)) then
FValueEdit.EditLabel.Caption := Value;
inherited SetName(Value);
if csDesigning in ComponentState then
Text := '';
end;
procedure TGcxCustomValueInfoEdit.SetParent(AParent: TWinControl);
begin
inherited SetParent(AParent);
if FValueEdit = nil then Exit;
FValueEdit.Parent := Self;
if FValueEdit.EditLabel = nil then Exit;
FValueEdit.FEditLabel.Parent := AParent;
FValueEdit.FEditLabel.Visible := True;
end;
procedure TGcxCustomValueInfoEdit.SetReadOnly(const Value: Boolean);
begin
FValueEdit.ReadOnly := Value;
FInfoEdit.ReadOnly := Value;
end;
procedure TGcxCustomValueInfoEdit.SetReadOnlyColor(const Value: TColor);
begin
FValueEdit.ReadOnlyColor := Value;
FInfoEdit.ReadOnlyColor := Value;
end;
procedure TGcxCustomValueInfoEdit.SetSpace(const Value: Integer);
begin
FSpace := Value;
Self.SetBounds(Left, Top, Width, Height);
end;
procedure TGcxCustomValueInfoEdit.SetText(const Value: WideString);
begin
Self.InfoEdit.Text := Value;
end;
procedure TGcxCustomValueInfoEdit.SetValue(const Value: Integer);
begin
Self.ValueEdit.Value := Value;
end;
procedure TGcxCustomValueInfoEdit.CMBidimodeChanged(var Message: TMessage);
var
i: Integer;
begin
for I := 0 to ControlCount - 1 do
Controls[I].BiDiMode := BiDiMode;
end;
procedure TGcxCustomValueInfoEdit.CMEnabledChanged(var Message: TMessage);
var
i: Integer;
begin
for I := 0 to ControlCount - 1 do
Controls[I].Enabled := Enabled;
end;
procedure TGcxCustomValueInfoEdit.CMVisibleChanged(var Message: TMessage);
var
i: Integer;
begin
for I := 0 to ControlCount - 1 do
Controls[I].Visible := Visible;
end;
procedure TGcxCustomValueInfoEdit.CMTabStopChanged(var Message: TMessage);
var
i: Integer;
begin
for I := 0 to ControlCount - 1 do
if (Controls[I] is TWinControl) then
(Controls[I] as TWinControl).TabStop := TabStop;
end;
procedure TGcxCustomValueInfoEdit.WMSetFocus(var Message: TWMSetFocus);
begin
FValueEdit.SetFocus;
end;
procedure Register;
begin
RegisterComponents('GameControlX',
[
TGcxEdit,
TGcxIntEdit,
TGcxCustomValueInfoEdit
]);
end;
function TGcxCustomValueInfoEdit.HitTest(P: TPoint): TGcxValueInfoEditArea;
var
ValueRect, ValueToInfoRect, InfoRect: TRect;
InfoToButtonRect, ButtonRect: TRect;
iLeft, iRight: Integer;
begin
iLeft := 0;
iRight := FValueEdit.Width;
ValueRect := Rect(iLeft, 0, iRight, Height);
iLeft := iRight;
iRight := FInfoEdit.Left;
ValueToInfoRect := Rect(iLeft, 0, iRight, Height);
iLeft := FInfoEdit.Left;
iRight := iLeft + FInfoEdit.Width;
InfoRect := Rect(iLeft, 0, iRight, Height);
iLeft := iRight;
iRight := FSubBtn.Left;
InfoToButtonRect := Rect(iLeft, 0, iRight, Height);
iLeft := FSubBtn.Left;
iRight := iLeft + FSubBtn.Width;
ButtonRect := Rect(iLeft, 0, iRight, Height);
if PtInRect(ValueRect, P) then
Result := vieaValue
else if PtInRect(ValueToInfoRect, P) then
Result := vieaValueToInfo
else if PtInRect(InfoRect, P) then
Result := vieaInfo
else if PtInRect(InfoToButtonRect, P) then
Result := vieaInfoToButton
else if PtInRect(ButtonRect, P) then
Result := vieaButton
else
Result := vieaNone;
end;
function TGcxCustomValueInfoEdit.HitTest(X,
Y: Integer): TGcxValueInfoEditArea;
begin
Result := HitTest(Point(X, Y));
end;
procedure TGcxCustomValueInfoEdit.CMDesignHitTest(
var Message: TCMDesignHitTest);
begin
with Message do
begin
if (Self.HitTest(Message.XPos, Message.YPos)
in [vieaValueToInfo, vieaInfoToButton])
or FDraging then
begin
Screen.Cursor := crHSplit;
Message.Result := 1;
end
else
begin
Screen.Cursor := crDefault;
end;
end;
end;
procedure TGcxCustomValueInfoEdit.StopDrag;
var
frm: TCustomForm;
begin
if not FDraging then
Exit;
FDraging := False;
FDragArea := vieaNone;
frm := Forms.GetParentForm(Self);
if Assigned(frm) then
begin
frm.Designer.Modified;
end;
end;
procedure TGcxCustomValueInfoEdit.CMMouseLeave(var Message: TMessage);
begin
if (csDesigning in ComponentState) then
begin
Screen.Cursor := crDefault;
end;
inherited;
end;
procedure TGcxCustomValueInfoEdit.WndProc(var Message: TMessage);
begin
if (csDesigning in ComponentState) then
case Message.Msg of
CM_MOUSELEAVE:
Self.CMMouseLeave(Message);
else
end;
inherited;
end;
procedure TGcxCustomValueInfoEdit.MouseDown(Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
inherited;
if (csDesigning in ComponentState) then
begin
FDragArea := HitTest(X, Y);
FDraging := FDragArea in [vieaValueToInfo, vieaInfoToButton];
if not FDraging then
Exit;
FMouseDownPoint := Point(X, Y);
end;
end;
procedure TGcxCustomValueInfoEdit.MouseMove(Shift: TShiftState; X,
Y: Integer);
var
iOldWidth1, iOldWidth2, iNewWidth1, iNewWidth2, iDiffWidth: Integer;
mWinCtl1, mWinCtl2: TControl;
begin
inherited;
if not (csDesigning in ComponentState) then
Exit;
if not (ssLeft in Shift) then
begin
StopDrag;
Exit;
end;
if FDraging then
begin
case FDragArea of
vieaValueToInfo:
begin
mWinCtl1 := FValueEdit;
mWinCtl2 := FInfoEdit;
end;
vieaInfoToButton:
begin
mWinCtl1 := FInfoEdit;
mWinCtl2 := FSubBtn;
end;
else
Exit;
end;
iOldWidth1 := mWinCtl1.Width;
iOldWidth2 := mWinCtl2.Width;
iDiffWidth := FMouseDownPoint.X - X;
iNewWidth1 := iOldWidth1 - iDiffWidth;
iNewWidth2 := iOldWidth2 + iDiffWidth;
if iNewWidth1 <= mWinCtl1.Constraints.MinWidth then
begin
iNewWidth1 := mWinCtl1.Constraints.MinWidth;
iNewWidth2 := iOldWidth1 + iOldWidth2 - iNewWidth1;
end;
if iNewWidth2 <= mWinCtl2.Constraints.MinWidth then
begin
iNewWidth2 := mWinCtl2.Constraints.MinWidth;
iNewWidth1 := iOldWidth1 + iOldWidth2 - iNewWidth2;
end;
mWinCtl1.Width := iNewWidth1;
mWinCtl2.Left := mWinCtl2.Left - (iOldWidth1 - iNewWidth1);
mWinCtl2.Width := iNewWidth2;
FMouseDownPoint := Point(X, Y);
end;
end;
procedure TGcxCustomValueInfoEdit.MouseUp(Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
inherited;
StopDrag;
end;
end.
|
unit fGMV_DateRange;
{
================================================================================
*
* Application: Vitals
* Revision: $Revision: 1 $ $Modtime: 12/20/07 12:43p $
* Developer: ddomain.user@domain.ext/doma.user@domain.ext
* Site: Hines OIFO
*
* Description: Selects two date ranges.
*
* Notes:
*
================================================================================
* $Archive: /Vitals/5.0 (Version 5.0)/5.0.23 (Patch 23)/VITALS_5_0_23_8/Source/VITALSCOMMON/fGMV_DateRange.pas $
*
* $History: fGMV_DateRange.pas $
*
* ***************** Version 1 *****************
* User: Zzzzzzandria Date: 8/12/09 Time: 8:29a
* Created in $/Vitals/5.0 (Version 5.0)/5.0.23 (Patch 23)/VITALS_5_0_23_8/Source/VITALSCOMMON
*
* ***************** Version 1 *****************
* User: Zzzzzzandria Date: 3/09/09 Time: 3:38p
* Created in $/Vitals/5.0 (Version 5.0)/5.0.23 (Patch 23)/VITALS_5_0_23_6/Source/VITALSCOMMON
*
* ***************** Version 1 *****************
* User: Zzzzzzandria Date: 1/13/09 Time: 1:26p
* Created in $/Vitals/5.0 (Version 5.0)/5.0.23 (Patch 23)/VITALS_5_0_23_4/Source/VITALSCOMMON
*
* ***************** Version 1 *****************
* User: Zzzzzzandria Date: 5/14/07 Time: 10:29a
* Created in $/Vitals GUI 2007/Vitals-5-0-18/VITALSCOMMON
*
* ***************** Version 1 *****************
* User: Zzzzzzandria Date: 5/16/06 Time: 5:43p
* Created in $/Vitals/VITALS-5-0-18/VitalsCommon
* GUI v. 5.0.18 updates the default vital type IENs with the local
* values.
*
* ***************** Version 1 *****************
* User: Zzzzzzandria Date: 5/16/06 Time: 5:33p
* Created in $/Vitals/Vitals-5-0-18/VITALS-5-0-18/VitalsCommon
*
* ***************** Version 1 *****************
* User: Zzzzzzandria Date: 5/24/05 Time: 3:33p
* Created in $/Vitals/Vitals GUI v 5.0.2.1 -5.0.3.1 - Patch GMVR-5-7 (CASMed, No CCOW) - Delphi 6/VitalsCommon
*
* ***************** Version 1 *****************
* User: Zzzzzzandria Date: 4/16/04 Time: 4:17p
* Created in $/Vitals/Vitals GUI Version 5.0.3 (CCOW, CPRS, Delphi 7)/VITALSCOMMON
*
* ***************** Version 1 *****************
* User: Zzzzzzandria Date: 2/10/04 Time: 2:56p
* Created in $/VitalsLite/VitalsDLL
*
* ***************** Version 1 *****************
* User: Zzzzzzandria Date: 1/26/04 Time: 1:08p
* Created in $/Vitals/Vitals GUI Version 5.0.3 (CCOW, Delphi7)/V5031-D7/VitalsUser
*
* ***************** Version 1 *****************
* User: Zzzzzzandria Date: 10/29/03 Time: 4:15p
* Created in $/Vitals503/Vitals User
* Version 5.0.3
*
* ***************** Version 1 *****************
* User: Zzzzzzandria Date: 5/21/03 Time: 1:18p
* Created in $/Vitals GUI Version 5.0/VitalsUserNoCCOW
* Pre CCOW Version of Vitals User
*
* ***************** Version 4 *****************
* User: Zzzzzzandria Date: 8/30/02 Time: 4:06p
* Updated in $/Vitals GUI Version 5.0/Vitals User
* Labor Day Backup
*
* ***************** Version 3 *****************
* User: Zzzzzzpetitd Date: 6/20/02 Time: 9:32a
* Updated in $/Vitals GUI Version 5.0/Vitals User
* t27 Build
*
* ***************** Version 2 *****************
* User: Zzzzzzpetitd Date: 6/06/02 Time: 11:13a
* Updated in $/Vitals GUI Version 5.0/Vitals User
* Roll-up to 5.0.0.27
*
* ***************** Version 1 *****************
* User: Zzzzzzpetitd Date: 4/04/02 Time: 11:53a
* Created in $/Vitals GUI Version 5.0/Vitals User
*
*
================================================================================
}
interface
uses
Windows,
Messages,
SysUtils,
Classes,
Graphics,
Controls,
Forms,
Dialogs,
StdCtrls,
ComCtrls,
ExtCtrls;
type
TfrmGMV_DateRange = class(TForm)
Panel1: TPanel;
Panel5: TPanel;
GroupBox1: TGroupBox;
lblFrom: TLabel;
lblTo: TLabel;
dtpFrom: TDateTimePicker;
dtpTo: TDateTimePicker;
Panel2: TPanel;
btnOK: TButton;
btnCancel: TButton;
procedure btnOKClick(Sender: TObject);
procedure FormKeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
procedure dtpFromEnter(Sender: TObject);
procedure dtpFromExit(Sender: TObject);
procedure dtpToExit(Sender: TObject);
procedure dtpToEnter(Sender: TObject);
private
public
{ Public declarations }
end;
function GetDateRange(var FromDate, ToDate: TDateTime; AllowFutureDate: Boolean = True; AllowPastDate: Boolean = True): Boolean;
implementation
uses uGMV_Common, System.UITypes;
{$R *.DFM}
function GetDateRange(var FromDate, ToDate: TDateTime; AllowFutureDate: Boolean = True; AllowPastDate: Boolean = True): Boolean;
begin
with TfrmGMV_DateRange.Create(Application) do
try
dtpFrom.DateTime := FromDate;
dtpTo.DateTime := ToDate;
dtpFrom.MaxDate := TRunc(Now);
dtpTo.MaxDate := dtpFrom.MaxDate;
activeControl := dtpFrom;
ShowModal;
if ModalResult = mrOK then
begin
FromDate := dtpFrom.Date;
ToDate := dtpTo.Date;
Result := True;
end
else
Result := False;
finally
free;
end;
end;
procedure TfrmGMV_DateRange.btnOKClick(Sender: TObject);
begin
if trunc(dtpFrom.DateTime) <= trunc(dtpTo.DateTime) then
ModalResult := mrOk
else
MessageDlg('The ''Start with Date'' must be less' + #13 +
'than the ''Go to Date'' value.',
mtInformation, [mbok], 0);
end;
procedure TfrmGMV_DateRange.FormKeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
begin
if Key = VK_ESCAPE then
ModalResult := mrCancel;
end;
procedure TfrmGMV_DateRange.dtpFromEnter(Sender: TObject);
begin
dtpFrom.Color := clTabIn;
end;
procedure TfrmGMV_DateRange.dtpFromExit(Sender: TObject);
begin
dtpFrom.Color := clTabOut;
end;
procedure TfrmGMV_DateRange.dtpToExit(Sender: TObject);
begin
dtpTo.Color := clTabOut;
end;
procedure TfrmGMV_DateRange.dtpToEnter(Sender: TObject);
begin
dtpTo.Color := clTabIn;
end;
end.
|
{
Mystix
Copyright (C) 2005 Piotr Jura
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
You can contact with me by e-mail: pjura@o2.pl
}
unit uDocuments;
interface
uses
SysUtils, Classes, Graphics, Controls, Forms, JvTabBar, SynEdit,
SynEditKeyCmds, SynUniHighlighter, SynEditTypes, SynEditMiscClasses, Windows,
uExSynEdit;
type
TDocument = class
private
fEditor: TExSynEdit;
fFileName: String;
fHighlighter: TSynUniSyn;
fSaved: Boolean;
fTab: TJvTabBarItem;
fType: String;
fFunctionRegExp: String;
procedure SetDocumentType(const Value: String);
function GetModified: Boolean;
procedure SetModified(const Value: Boolean);
function GetCode: String;
procedure SynEditStatusChange(Sender: TObject; Changes: TSynStatusChanges);
procedure MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
procedure MouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
procedure MouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);
procedure SynEditReplaceText(Sender: TObject; const ASearch, AReplace: String; Line, Column: Integer; var Action: TSynReplaceAction);
procedure SynEditChange(Sender: TObject);
public
constructor Create;
destructor Destroy; override;
function CanPaste: Boolean;
function CanRedo: Boolean;
function CanSave: Boolean;
function CanUndo: Boolean;
function FindNext: Boolean;
function FindText(Text: String; WholeWords, MatchCase, RegExp, SelOnly, FromCursor, DirUp: Boolean): Boolean;
function ReplaceNext: Boolean;
function ReplaceText(Text, ReplaceWith: String; WholeWords, MatchCase, RegExp, SelOnly, FromCursor, Prompt, DirUp, ReplaceAll: Boolean): Boolean;
function SelAvail: Boolean;
procedure Activate;
function Close: Integer;
procedure CollapseAll;
procedure CollapseCurrent;
procedure CollapseLevel(Level: Integer);
procedure ColumnSelect;
procedure Copy;
procedure Cut;
procedure Delete;
procedure DeleteWord;
procedure DeleteLine;
procedure DeleteToEndOfWord;
procedure DeleteToEndOfLine;
procedure DeleteWordBack;
procedure Indent;
procedure Open(aFileName: String);
procedure Paste;
procedure Print;
procedure ReadFromIni;
procedure Redo;
procedure Save;
procedure SelectAll;
procedure SelectWord;
procedure SelectLine;
procedure SetupOptions(var Options: TSynSearchOptions; WholeWords, MatchCase, RegExp, SelOnly, FromCursor, DirUp: Boolean);
procedure UncollapseAll;
procedure UncollapseLevel(Level: Integer);
procedure Undo;
procedure Unindent;
procedure UpdateCaption;
procedure UpdateType;
procedure GoToLine(Line: Integer);
procedure UpdateFunctionList;
procedure UpperCase;
procedure LowerCase;
procedure ToggleCase;
procedure Capitalize;
property FileName: String read fFileName write fFileName;
property Saved: Boolean read fSaved write fSaved;
property DocumentType: String read fType write SetDocumentType;
property Editor: TExSynEdit read fEditor;
property Modified: Boolean read GetModified write SetModified;
property Code: String read GetCode;
property FunctionRegExp: String read fFunctionRegExp write fFunctionRegExp;
end;
TDocumentFactory = class
private
fDocuments: TList;
fUntitledIndex: Integer;
fLastSearchedForText: String;
function GetDocument(Index: Integer): TDocument;
function GetCount: Integer;
public
constructor Create;
destructor Destroy; override;
function AddDocument: TDocument;
function CanSaveAll: Boolean;
function CloseAll: Boolean;
procedure New;
procedure Open(aFileName: String);
procedure ReadAllFromIni;
procedure RemoveDocument(aDocument: TDocument);
procedure SaveAll;
function IsSearchedForTheFirstTime(S: String): Boolean;
property Documents[Index: Integer]: TDocument read GetDocument; default;
property Count: Integer read GetCount;
end;
var
DocumentFactory: TDocumentFactory;
Document: TDocument;
implementation
uses uMain, IniFiles, uUtils, uFunctionList, uConfirmReplace, uFind;
{ TDocument }
procedure TDocument.Activate;
begin
Document := Self;
fTab.Selected := True;
fEditor.BringToFront;
SynEditStatusChange(fEditor, [scAll]);
try
fEditor.SetFocus;
except end;
fEditor.OnChange(nil);
if fType <> '' then
MainForm.StatusBar.Panels[idDocTypePanel].Text := fType
else
with MainForm do
StatusBar.Panels[idDocTypePanel].Text :=
StringReplace(ViewDocumentType0.Caption, '&', '', []);
FunctionListForm.Clear;
end;
function TDocument.CanPaste: Boolean;
begin
Result := fEditor.CanPaste;
end;
function TDocument.CanRedo: Boolean;
begin
Result := fEditor.CanRedo;
end;
function TDocument.CanSave: Boolean;
begin
Result := fEditor.Modified;
end;
function TDocument.CanUndo: Boolean;
begin
Result := fEditor.CanUndo;
end;
procedure TDocument.Capitalize;
begin
fEditor.ExecuteCommand(ecTitleCase, #0, nil);
end;
function TDocument.Close: Integer;
var
i: Integer;
begin
Result := IDNO;
if Modified then
with Application do
case MessageBox( PChar( Format(sStrings[siAskSaveChanges], [fFileName]) ) , 'Confirm',
MB_YESNOCANCEL or MB_ICONQUESTION) of
IDYES:
begin
Result := IDYES;
Save;
end;
IDCANCEL:
begin
Result := IDCANCEL;
Exit;
end;
end;
if fSaved then
begin
MRUFiles.Add(fFileName);
MainForm.UpdateMRUFilesMenu;
end;
Document := nil;
fEditor.Free;
fTab.Free;
DocumentFactory.RemoveDocument(Self);
if DocumentFactory.Count = 0 then
begin
for i := 0 to MainForm.StatusBar.Panels.Count - 1 do
MainForm.StatusBar.Panels[i].Text := '';
FunctionListForm.Clear;
end;
end;
procedure TDocument.CollapseAll;
begin
fEditor.CollapseAll;
end;
procedure TDocument.CollapseCurrent;
begin
fEditor.CollapseCurrent;
end;
procedure TDocument.CollapseLevel(Level: Integer);
begin
fEditor.CollapseLevel(Level);
end;
procedure TDocument.ColumnSelect;
begin
if fEditor.SelectionMode = smColumn then
fEditor.SelectionMode := smNormal
else
fEditor.SelectionMode := smColumn;
end;
procedure TDocument.Copy;
begin
fEditor.CommandProcessor(ecCopy, #0, nil);
end;
constructor TDocument.Create;
begin
fSaved := False;
fFileName := '';
fType := '';
fEditor := TExSynEdit.Create(nil);
with fEditor do
begin
Align := alClient;
Top := 49;
Gutter.AutoSize := True;
Gutter.DigitCount := 3;
Gutter.LeftOffset := 0;
Gutter.Font.Name := 'Tahoma';
Gutter.Font.Size := 8;
WantTabs := True;
Highlighter := fHighlighter;
OnChange := SynEditChange;
OnStatusChange := SynEditStatusChange;
OnReplaceText := SynEditReplaceText;
OnMouseDown := MouseDown;
OnMouseMove := MouseMove;
OnMouseUp := MouseUp;
OnMButtonUp := MainForm.WmMButtonUp;
OnKeyDown := MainForm.OnKeyDown;
end;
fHighlighter := TSynUniSyn.Create(nil);
with MainForm do
begin
fEditor.Width := Width;
fEditor.Height := Height;
//fEditor.PopupMenu := mnuEditor;
end;
ReadFromIni;
fEditor.Parent := MainForm;
fTab := TJvTabBar(MainForm.tbDocuments).AddTab('');
fTab.Data := Self;
end;
procedure TDocument.Cut;
begin
fEditor.CommandProcessor(ecCut, #0, nil);
end;
procedure TDocument.Delete;
begin
fEditor.CommandProcessor(ecDeleteChar, #0, nil);
end;
procedure TDocument.DeleteLine;
begin
fEditor.CommandProcessor(ecDeleteLine, #0, nil);
end;
procedure TDocument.DeleteToEndOfLine;
begin
fEditor.CommandProcessor(ecDeleteEOL, #0, nil);
end;
procedure TDocument.DeleteToEndOfWord;
begin
fEditor.CommandProcessor(ecDeleteWord, #0, nil);
end;
procedure TDocument.DeleteWord;
var
Left, Right, Len: Integer;
Line: String;
LeftDone, RightDone: Boolean;
ptBefore, ptAfter: TBufferCoord;
begin
Line := fEditor.LineText;
Len := Length(Line);
LeftDone := False;
RightDone := False;
fEditor.BeginUpdate;
try
if Len > 0 then
begin
Left := fEditor.CaretX;
Right := fEditor.CaretX;
repeat
if (not LeftDone) and (Left - 1 > 0)
and (Line[Left - 1] in TSynValidStringChars) then
Dec(Left)
else
LeftDone := True;
if (not RightDone) and (Right + 1 <= Len)
and (Line[Right + 1] in TSynValidStringChars) then
Inc(Right)
else
RightDone := True;
until (LeftDone) and (RightDone);
if Right - Left > 0 then
begin
Inc(Right);
ptBefore.Char := Left;
ptBefore.Line := fEditor.CaretY;
ptAfter.Char := Right;
ptAfter.Line := fEditor.CaretY;
fEditor.SetCaretAndSelection(ptBefore, ptBefore, ptAfter);
fEditor.CommandProcessor(ecDeleteChar, #0, nil);
end;
end;
finally
fEditor.EndUpdate;
end;
end;
procedure TDocument.DeleteWordBack;
begin
fEditor.CommandProcessor(ecDeleteLastWord, #0, nil);
end;
destructor TDocument.Destroy;
begin
fHighlighter.Free;
inherited;
end;
function TDocument.FindNext: Boolean;
var
Options: TSynSearchOptions;
begin
SetupOptions(Options, frWholeWords, frMatchCase, frRegExp, frSelOnly, frFromCursor, frDirUp);
Exclude(Options, ssoEntireScope);
Result := fEditor.SearchReplace(frFindText, '', Options) <> 0;
end;
function TDocument.FindText(Text: String; WholeWords, MatchCase, RegExp,
SelOnly, FromCursor, DirUp: Boolean): Boolean;
var
Options: TSynSearchOptions;
begin
SetupOptions(Options, WholeWords, MatchCase, RegExp, SelOnly, FromCursor, DirUp);
Result := fEditor.SearchReplace(Text, '', Options) <> 0;
end;
function TDocument.GetCode: String;
begin
Result := fEditor.Text;
end;
function TDocument.GetModified: Boolean;
begin
Result := fEditor.Modified;
end;
procedure TDocument.GoToLine(Line: Integer);
begin
fEditor.GotoLineAndCenter(Line);
end;
procedure TDocument.Indent;
begin
fEditor.CommandProcessor(ecBlockIndent, #0, nil);
end;
procedure TDocument.LowerCase;
begin
if SelAvail then
fEditor.ExecuteCommand(ecLowerCaseBlock, #0, nil)
else
fEditor.ExecuteCommand(ecLowerCase, #0, nil);
end;
procedure TDocument.MouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
MainForm.OnMouseDown(Sender, Button, Shift, X, Y);
end;
procedure TDocument.MouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Integer);
begin
MainForm.OnMouseMove(Sender, Shift, X, Y);
end;
procedure TDocument.MouseUp(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
MainForm.OnMouseUp(Sender, Button, Shift, X, Y);
end;
procedure TDocument.Open(aFileName: String);
begin
fSaved := True;
fFileName := aFileName;
fEditor.Lines.LoadFromFile(aFileName);
UpdateCaption;
UpdateType;
end;
procedure TDocument.Paste;
begin
fEditor.CommandProcessor(ecPaste, #0, nil);
end;
procedure TDocument.Print;
begin
with MainForm.SynEditPrint do
begin
SynEdit := fEditor;
Highlighter := fEditor.Highlighter;
TabWidth := fEditor.TabWidth;
end;
end;
procedure TDocument.ReadFromIni;
var
Options: TSynEditorOptions;
begin
with Settings do
begin
if ReadBool('Editor', 'HighlightActiveLine', True) then
fEditor.ActiveLineColor := ReadColor('Editor', 'ActiveLineColor', clYellow)
else
fEditor.ActiveLineColor := clNone;
fEditor.CodeFolding.Enabled := ReadBool('Editor', 'CodeFolding', True);
fEditor.CodeFolding.IndentGuides := ReadBool('Editor', 'ShowIndentGuides',
True);
fEditor.CodeFolding.FolderBarColor := ReadColor('Editor',
'FoldingBarColor', clDefault);
fEditor.CodeFolding.FolderBarLinesColor := ReadColor('Editor',
'FoldingBarLinesColor', clDefault);
fEditor.CodeFolding.CollapsingMarkStyle := TSynCollapsingMarkStyle(ReadInteger('Editor',
'FoldingButtonStyle', 0));
fEditor.ExtraLineSpacing := ReadInteger('Editor', 'ExtraLineSpacing', 0);
fEditor.Font.Name := ReadString('Editor', 'FontName', 'Courier New');
fEditor.Font.Size := ReadInteger('Editor', 'FontSize', 10);
fEditor.Gutter.Visible := ReadBool('Editor', 'ShowGutter', True);
fEditor.Gutter.ShowLineNumbers := ReadBool('Editor', 'ShowLineNumbers', True);
if ReadBool('Editor', 'ShowRightMargin', True) then
fEditor.RightEdge := ReadInteger('Editor', 'RightMarginPosition', 80)
else
fEditor.RightEdge := 0;
fEditor.WordWrap := ReadBool('Editor', 'WordWrap', True);
fEditor.InsertCaret := TSynEditCaretType(ReadInteger('Editor', 'InsertCaret', 0));
fEditor.InsertMode := ReadBool('Editor', 'InsertMode', True);
fEditor.Gutter.LeadingZeros := ReadBool('Editor', 'ShowLeadingZeros', False);
fEditor.MaxUndo := ReadInteger('Editor', 'MaxUndo', 1024);
fEditor.OverwriteCaret := TSynEditCaretType(ReadInteger('Editor', 'OverwriteCaret', 0));
fEditor.Gutter.ZeroStart := ReadBool('Editor', 'ZeroStart', False);
fEditor.TabWidth := ReadInteger('Editor', 'TabWidth', 4);
if ReadColor('Editor', 'GutterColor', clDefault) <> clDefault then
fEditor.Gutter.Color := ReadColor('Editor', 'GutterColor', clBtnFace)
else
fEditor.Gutter.Color := clBtnFace;
Options := [];
if ReadBool('Editor', 'AutoIndent', True) then
Include(Options, eoAutoIndent);
if ReadBool('Editor', 'GroupUndo', True) then
Include(Options, eoGroupUndo);
if ReadBool('Editor', 'ScrollPastEOF', False) then
Include(Options, eoScrollPastEof);
if ReadBool('Editor', 'ScrollPastEOL', False) then
Include(Options, eoScrollPastEol);
if ReadBool('Editor', 'ShowSpecialChars', False) then
Include(Options, eoShowSpecialChars);
if ReadBool('Editor', 'TabsToSpaces', False) then
Include(Options, eoTabsToSpaces);
if ReadBool('Editor', 'TrimTrailingSpaces', True) then
Include(Options, eoTrimTrailingSpaces);
fEditor.Options := Options;
end;
end;
procedure TDocument.Redo;
begin
fEditor.CommandProcessor(ecRedo, #0, nil);
end;
function TDocument.ReplaceNext: Boolean;
var
Options: TSynSearchOptions;
begin
SetupOptions(Options, frWholeWords, frMatchCase, frRegExp, frSelOnly, frFromCursor, frDirUp);
Exclude(Options, ssoEntireScope);
Result := fEditor.SearchReplace(frFindText, frReplaceText, Options) <> 0;
end;
function TDocument.ReplaceText(Text, ReplaceWith: String; WholeWords, MatchCase,
RegExp, SelOnly, FromCursor, Prompt, DirUp, ReplaceAll: Boolean): Boolean;
var
Options: TSynSearchOptions;
begin
SetupOptions(Options, WholeWords, MatchCase, RegExp, SelOnly, FromCursor, DirUp);
Include(Options, ssoReplace);
if Prompt then
Include(Options, ssoPrompt);
if ReplaceAll then
begin
Include(Options, ssoReplaceAll);
DocumentFactory.fLastSearchedForText := '';
end;
Result := fEditor.SearchReplace(Text, ReplaceWith, Options) <> 0;
end;
procedure TDocument.Save;
begin
if fSaved then
begin
fSaved := True;
fEditor.Modified := False;
fEditor.GetUncollapsedStrings.SaveToFile(fFileName);
UpdateCaption;
UpdateType;
end
else
MainForm.SaveAs(Self);
end;
function TDocument.SelAvail: Boolean;
begin
Result := fEditor.SelAvail;
end;
procedure TDocument.SelectAll;
begin
fEditor.CommandProcessor(ecSelectAll, #0, nil);
end;
procedure TDocument.SelectLine;
begin
fEditor.BeginUpdate;
try
fEditor.CommandProcessor(ecLineStart, #0, nil);
fEditor.CommandProcessor(ecSelLineEnd, #0, nil);
finally
fEditor.EndUpdate;
end;
end;
procedure TDocument.SelectWord;
var
Left, Right, Len: Integer;
Line: String;
LeftDone, RightDone: Boolean;
ptBefore, ptAfter: TBufferCoord;
begin
Line := fEditor.LineText;
Len := Length(Line);
LeftDone := False;
RightDone := False;
fEditor.BeginUpdate;
try
if Len > 0 then
begin
Left := fEditor.CaretX;
Right := fEditor.CaretX;
repeat
if (not LeftDone) and (Left - 1 > 0)
and (Line[Left - 1] in TSynValidStringChars) then
Dec(Left)
else
LeftDone := True;
if (not RightDone) and (Right + 1 <= Len)
and (Line[Right + 1] in TSynValidStringChars) then
Inc(Right)
else
RightDone := True;
until (LeftDone) and (RightDone);
if Right - Left > 0 then
begin
Inc(Right);
ptBefore.Char := Left;
ptBefore.Line := fEditor.CaretY;
ptAfter.Char := Right;
ptAfter.Line := fEditor.CaretY;
fEditor.SetCaretAndSelection(ptBefore, ptBefore, ptAfter);
end;
end;
finally
fEditor.EndUpdate;
end;
end;
procedure TDocument.SetDocumentType(const Value: String);
var
TypeFile: String;
DocumentTypeIndex: Integer;
begin
fType := Value;
if fType <> '' then
begin
DocumentTypeIndex := DocTypes.IndexOf(Value) + 1;
TypeFile := Settings.ReadString('DocumentTypes', 'DocumentTypeSyntaxFile'
+ IntToStr( DocumentTypeIndex ), '');
if FileExists(AppPath + 'DocumentTypes\' + TypeFile) then
begin
TSynUniSyn(fHighlighter).LoadHglFromFile(AppPath + 'DocumentTypes\' + TypeFile);
fEditor.Highlighter := fHighlighter;
end;
fFunctionRegExp := Settings.ReadString('DocumentTypes',
'DocumentTypeFunctionRegExp' + IntToStr( DocumentTypeIndex ), '');
end
else
fEditor.Highlighter := nil;
fEditor.InitCodeFolding;
Activate;
end;
procedure TDocument.SetModified(const Value: Boolean);
begin
fEditor.Modified := Value;
end;
procedure TDocument.SetupOptions(var Options: TSynSearchOptions;
WholeWords, MatchCase, RegExp, SelOnly, FromCursor, DirUp: Boolean);
begin
Options := [];
if MatchCase then
Include(Options, ssoMatchCase);
if WholeWords then
Include(Options, ssoWholeWord);
if DirUp then
Include(Options, ssoBackwards);
if SelOnly then
Include(Options, ssoSelectedOnly);
if not FromCursor then
Include(Options, ssoEntireScope);
if not RegExp then
fEditor.SearchEngine := MainForm.Search
else
fEditor.SearchEngine := MainForm.RegexSearch;
end;
procedure TDocument.SynEditChange(Sender: TObject);
var
Size : Double;
Aux : String;
begin // Luciano
Size := Length(fEditor.Text) / 1024;
if Size > 0 then
begin
Aux := 'KB';
if Size > 999 then
begin
Aux := 'MB';
Size := Size / 1024;
end;
MainForm.StatusBar.Panels[idDocSizePanel].Text := FormatFloat('0.00',Size) + ' ' + Aux;
end
else
MainForm.StatusBar.Panels[idDocSizePanel].Text := '';
end;
procedure TDocument.SynEditReplaceText(Sender: TObject; const ASearch,
AReplace: String; Line, Column: Integer; var Action: TSynReplaceAction);
var
P: TPoint;
C: TDisplayCoord;
begin
if frPrompt then
begin
C.Row := fEditor.LineToRow(Line);
C.Column := Column;
P := fEditor.RowColumnToPixels(C);
Inc(P.Y, fEditor.LineHeight);
if P.X + 337 > fEditor.Width then
P.X := P.X - ((P.X + 337) - fEditor.Width);
if P.Y + 125 > fEditor.Height then
P.Y := P.Y - (125 + fEditor.LineHeight);
P := fEditor.ClientToScreen(P);
case TConfirmReplaceDialog.Create(MainForm).Execute(P.X, P.Y,
ASearch, AReplace) of
mrCancel: Action := raCancel;
mrIgnore: Action := raSkip;
mrYes: Action := raReplace;
mrAll: Action := raReplaceAll;
end;
end
else
Action := raReplace;
end;
procedure TDocument.SynEditStatusChange(Sender: TObject;
Changes: TSynStatusChanges);
begin // Luciano
if Changes * [scAll, scCaretX, scCaretY] <> [] then
begin
if (fEditor.CaretX > 0) and (fEditor.CaretY > 0) then
with fEditor do
MainForm.StatusBar.Panels[idXYPanel].Text := Format('%6d:%3d',
[GetRealLineNumber(CaretY), CaretX])
else
MainForm.StatusBar.Panels[idXYPanel].Text := '';
end;
if Changes * [scAll, scInsertMode, scReadOnly] <> [] then
begin
if fEditor.ReadOnly then
MainForm.StatusBar.Panels[idInsertModePanel].Text := sStrings[siReadOnly]
else
begin
if fEditor.InsertMode then
MainForm.StatusBar.Panels[idInsertModePanel].Text := sStrings[siInsertMode]
else
MainForm.StatusBar.Panels[idInsertModePanel].Text := sStrings[siOverwriteMode]
end;
end;
if Changes * [scAll, scModified] <> [] then
begin
fTab.Modified := fEditor.Modified;
if fEditor.Modified then
MainForm.StatusBar.Panels[idModifiedPanel].Text := sStrings[siModified]
else
MainForm.StatusBar.Panels[idModifiedPanel].Text := '';
end;
if scSelection in Changes then
begin
if (fEditor.SelAvail) then
MainForm.StatusMsg(Format(sStrings[siLinesSelected],
[Abs(fEditor.BlockBegin.Line - fEditor.BlockEnd.Line) + 1]))
else
MainForm.StatusMsg('');
if FindDialog <> nil then
FindDialog.chkSelOnly.Enabled := fEditor.SelAvail;
end;
end;
procedure TDocument.ToggleCase;
begin
if SelAvail then
fEditor.ExecuteCommand(ecToggleCaseBlock, #0, nil)
else
fEditor.ExecuteCommand(ecToggleCase, #0, nil)
end;
procedure TDocument.UncollapseAll;
begin
fEditor.UncollapseAll;
end;
procedure TDocument.UncollapseLevel(Level: Integer);
begin
fEditor.UncollapseLevel(Level);
end;
procedure TDocument.Undo;
begin
fEditor.CommandProcessor(ecUndo, #0, nil);
end;
procedure TDocument.Unindent;
begin
fEditor.CommandProcessor(ecBlockUnindent, #0, nil);
end;
procedure TDocument.UpdateCaption;
begin
if fSaved then
fTab.Caption := ExtractFileName(fFileName)
else
fTab.Caption := fFileName;
end;
procedure TDocument.UpdateFunctionList;
begin
FunctionListForm.RegExp := fFunctionRegExp;
FunctionListForm.UpdateFuncList;
end;
procedure TDocument.UpdateType;
var
fNewType: String;
begin
fNewType := DocumentTypeForExt( SysUtils.UpperCase( ExtractFileExt(fFileName) ) );
if fNewType <> fType then
DocumentType := fNewType;
end;
procedure TDocument.UpperCase;
begin
if SelAvail then
fEditor.ExecuteCommand(ecUpperCaseBlock, #0, nil)
else
fEditor.ExecuteCommand(ecUpperCase, #0, nil);
end;
{ TDocumentFactory }
function TDocumentFactory.AddDocument: TDocument;
begin
Result := TDocument.Create;
fDocuments.Add(Result);
Result.Activate;
end;
function TDocumentFactory.CanSaveAll: Boolean;
var
i: Integer;
begin
Result := False;
for i := 0 to Count - 1 do
if Documents[i].Modified then
begin
Result := True;
Break;
end;
end;
function TDocumentFactory.CloseAll: Boolean;
var
i: Integer;
begin
Result := True;
for i := Count - 1 downto 0 do
if Documents[i].Close = IDCANCEL then
begin
Result := False;
Exit;
end;
end;
constructor TDocumentFactory.Create;
begin
fDocuments := TList.Create;
fUntitledIndex := 1;
end;
destructor TDocumentFactory.Destroy;
begin
fDocuments.Free;
inherited;
end;
function TDocumentFactory.GetDocument(Index: Integer): TDocument;
begin
Result := TDocument( fDocuments[Index] );
end;
function TDocumentFactory.IsSearchedForTheFirstTime(S: String): Boolean;
begin
Result := fLastSearchedForText <> S;
if Result = True then
fLastSearchedForText := S;
end;
procedure TDocumentFactory.New;
var
DefDocType: String;
begin
with AddDocument do
FileName := Format(sStrings[siUntitled], [fUntitledIndex]);
Document.UpdateCaption;
Inc(fUntitledIndex);
DefDocType := Settings.ReadString('General', 'DefaultDocumentType', '');
if DefDocType <> '' then
Document.DocumentType := DefDocType;
end;
procedure TDocumentFactory.Open(aFileName: String);
var
i: Integer;
begin
// Check if this file isn't already open
for i := 0 to Count - 1 do
if SameText(Documents[i].FileName, aFileName) then
begin
Documents[i].Activate;
Exit;
end;
with AddDocument do
Open(aFileName);
end;
procedure TDocumentFactory.ReadAllFromIni;
var
i: Integer;
begin
for i := 0 to Count - 1 do
Documents[i].ReadFromIni;
end;
procedure TDocumentFactory.RemoveDocument(aDocument: TDocument);
begin
fDocuments.Remove(aDocument);
end;
procedure TDocumentFactory.SaveAll;
var
i: Integer;
begin
for i := 0 to Count - 1 do
Documents[i].Save;
end;
function TDocumentFactory.GetCount: Integer;
begin
Result := fDocuments.Count;
end;
initialization
DocumentFactory := TDocumentFactory.Create;
finalization
DocumentFactory := nil;
end.
|
unit uFaceApi.Servers.Types;
interface
type
TFaceApiServer = (
fasGeneral,
fasWestUS,
fasEastUS2,
fasWestCentralUS,
fasWestEurope,
fasSoutheastAsia
);
const
CONST_FACE_API_MAIN_SERVER = 'api.cognitive.microsoft.com';
CONST_FACE_API_SERVER_URLS: array [TFaceApiServer] of string = (
CONST_FACE_API_MAIN_SERVER,
'westus.' + CONST_FACE_API_MAIN_SERVER,
'eastus2.' + CONST_FACE_API_MAIN_SERVER,
'westcentralus.' + CONST_FACE_API_MAIN_SERVER,
'westeurope.' + CONST_FACE_API_MAIN_SERVER,
'southeastasia.' + CONST_FACE_API_MAIN_SERVER
);
implementation
end.
|
unit ResizeObject;
interface
uses
SysUtils, Windows, Classes, Graphics, Controls, ExtCtrls;
type
TKindSpots = (ksLeft, ksLeftTop, ksLeftBottom, ksTop, ksTopRight, ksRight, ksBottom, ksBottomRight);
TSpots = set of TKindSpots;
TObjectSpot = record
Kind : TKindSpots;
Sport : TShape;
end;
TArrObjectSpots = array of TObjectSpot;
TResizedObject = procedure(const ARect: TRect) of object;
TResizeObject = class
private
FRect:TRect;
FSpots:TSpots;
FOnResized : TResizedObject;
procedure SetSpots(val : TSpots);
procedure SetRect(val : TRect);
public
constructor Create(ARect:TRect; AParent : TWinControl; ACanvas: TCanvas);
destructor Destroy(); override;
procedure Refresh();
property Rect : TRect read FRect write SetRect;
property Spots : TSpots read FSpots write SetSpots;
property OnResized : TResizedObject read FOnResized write FOnResized;
private
FCanvas: TCanvas;
FParent: TWinControl;
FArrSpots:TArrObjectSpots;
FSizing:Boolean;
FPosDown:TPoint;
procedure SpotMouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
procedure SpotMouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Integer);
procedure SpotMouseUp(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
procedure ClearArrObject();
procedure CreateSpot(var ASpot: TShape);
procedure DrawRectnagle();
procedure ObjectSpots();
procedure SetSpotXY(var ASpot : TObjectSpot);
function GetCursor(kind : TKindSpots):TCursor;
procedure ShiftSpot(Sender: TObject; X, Y: Integer);
end;
const
SPOT_SIZE: Integer = 4; //размер квадрата
SPOT_SIZE_H: Integer = 0; //доп смещение
implementation
uses Types;
constructor TResizeObject.Create(ARect:TRect; AParent : TWinControl; ACanvas: TCanvas);
begin
FOnResized := nil;
FParent:= AParent;
FRect:= ARect;
FCanvas:= ACanvas;
FSizing:= false;
end;
destructor TResizeObject.Destroy();
begin
ClearArrObject();
inherited Destroy();
end;
procedure TResizeObject.Refresh();
var
i:Integer;
n:Integer;
begin
n := Length(FArrSpots)-1;
for i:= 0 to n do
begin
SetSpotXY(FArrSpots[i]);
end;
end;
procedure TResizeObject.SetSpots(val : TSpots);
begin
FSpots := val;
ObjectSpots();
Refresh();
end;
procedure TResizeObject.SetRect(val : TRect);
begin
FRect := val;
Refresh();
end;
procedure TResizeObject.SpotMouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
if not(FSizing or (Button <> mbLeft)) then
begin
DrawRectnagle();
FPosDown := (Sender as TShape).ClientToParent(Point(X, Y));
FSizing:=true;
end;
end;
procedure TResizeObject.SpotMouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Integer);
begin
if not FSizing then Exit;
DrawRectnagle();
ShiftSpot(Sender, X, Y);
DrawRectnagle();
Refresh();
end;
procedure TResizeObject.SpotMouseUp(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
if not FSizing then Exit;
DrawRectnagle();
FSizing := False;
ShiftSpot(Sender, X, Y);
if Assigned(FOnResized) then FOnResized(FRect);
end;
procedure TResizeObject.ClearArrObject();
var
i: Integer;
n: Integer;
begin
n := Length(FArrSpots)-1;
for i:= 0 to n do
begin
FreeAndNil(FArrSpots[i].Sport);
end;
SetLength(FArrSpots, 0);
end;
procedure TResizeObject.CreateSpot(var ASpot: TShape);
begin
ASpot:= TShape.Create(nil);
ASpot.Height:= SPOT_SIZE;
ASpot.Width:= SPOT_SIZE;
ASpot.Shape:= stRectangle;
ASpot.Parent:= FParent;
ASpot.OnMouseDown:= SpotMouseDown;
ASpot.OnMouseMove:= SpotMouseMove;
ASpot.OnMouseUp:= SpotMouseUp;
end;
procedure TResizeObject.DrawRectnagle();
begin
// if EqualRect(FRect, Rect(0,0,0,0)) then Exit;
with FCanvas do
begin
Pen.Style := psDot;
Pen.Color := clGray;
Pen.Mode := pmXor;
Pen.Width := 1;
Brush.Style := bsClear;
Rectangle(FRect);
end;
end;
procedure TResizeObject.ObjectSpots();
var
lastIndx: Integer;
procedure AddSpot(kind : TKindSpots);
begin
SetLength(FArrSpots, lastIndx+1);
FArrSpots[lastIndx].Kind := kind;
CreateSpot(FArrSpots[lastIndx].Sport);
FArrSpots[lastIndx].Sport.Tag := lastIndx;
FArrSpots[lastIndx].Sport.Cursor := GetCursor(kind);
end;
begin
ClearArrObject();
lastIndx := 0;
if ksLeft in FSpots then
begin
AddSpot(ksLeft);
inc(lastIndx);
end;
if ksLeftTop in FSpots then
begin
AddSpot(ksLeftTop);
inc(lastIndx);
end;
if ksLeftBottom in FSpots then
begin
AddSpot(ksLeftBottom);
inc(lastIndx);
end;
if ksTop in FSpots then
begin
AddSpot(ksTop);
inc(lastIndx);
end;
if ksTopRight in FSpots then
begin
AddSpot(ksTopRight);
inc(lastIndx);
end;
if ksRight in FSpots then
begin
AddSpot(ksRight);
inc(lastIndx);
end;
if ksBottom in FSpots then
begin
AddSpot(ksBottom);
inc(lastIndx);
end;
if ksBottomRight in FSpots then
begin
AddSpot(ksBottomRight);
inc(lastIndx);
end;
end;
procedure TResizeObject.SetSpotXY(var ASpot : TObjectSpot);
begin
case ASpot.Kind of
ksLeft:
begin
ASpot.Sport.Left := FRect.Left-SPOT_SIZE_H;
ASpot.Sport.Top := FRect.Top + ((FRect.Bottom - FRect.Top) div 2) - SPOT_SIZE_H;
end;
ksLeftTop:
begin
ASpot.Sport.Left := FRect.Left - SPOT_SIZE_H;
ASpot.Sport.Top := FRect.Top - SPOT_SIZE_H;
end;
ksLeftBottom:
begin
ASpot.Sport.Left := FRect.Left-SPOT_SIZE_H;
ASpot.Sport.Top := FRect.Bottom - SPOT_SIZE_H;
end;
ksTop:
begin
ASpot.Sport.Left := FRect.Left + ((FRect.Right - FRect.Left) div 2)-SPOT_SIZE_H;
ASpot.Sport.Top := FRect.Top-SPOT_SIZE_H;
end;
ksTopRight:
begin
ASpot.Sport.Left := FRect.Right-SPOT_SIZE_H;
ASpot.Sport.Top := FRect.Top-SPOT_SIZE_H;
end;
ksRight:
begin
ASpot.Sport.Left := FRect.Right-SPOT_SIZE_H;
ASpot.Sport.Top := FRect.Top + ((FRect.Bottom - FRect.Top) div 2)-SPOT_SIZE_H;
end;
ksBottom:
begin
ASpot.Sport.Left := FRect.Left + ((FRect.Right - FRect.Left) div 2)-SPOT_SIZE_H;
ASpot.Sport.Top := FRect.Bottom-SPOT_SIZE_H;
end;
ksBottomRight:
begin
ASpot.Sport.Left := FRect.Right-SPOT_SIZE_H;
ASpot.Sport.Top := FRect.Bottom-SPOT_SIZE_H;
end;
end;
end;
function TResizeObject.GetCursor(kind : TKindSpots): TCursor;
begin
Result := crDefault;
case kind of
ksLeft:
Result := crSizeWE;
ksLeftTop:
Result := crSizeNWSE;
ksLeftBottom:
Result := crSizeNESW;
ksTop:
Result := crSizeNS;
ksTopRight:
Result := crSizeNESW;
ksRight:
Result := crSizeWE;
ksBottom:
Result := crSizeNS;
ksBottomRight:
Result := crSizeNWSE;
end;
end;
procedure TResizeObject.ShiftSpot(Sender: TObject; X, Y: Integer);
var
itmSpot : TObjectSpot;
tmpPos:TPoint;
kind: TKindSpots;
begin
itmSpot := FArrSpots[(Sender as TShape).Tag];
tmpPos := itmSpot.Sport.ClientToParent(Point(X, Y));
case itmSpot.Kind of
ksLeft:
begin
end;
ksLeftTop:
begin
end;
ksTop:
begin
end;
ksTopRight,
ksRight:
begin
tmpPos.Y := FRect.Bottom;
inc(FRect.Right, (tmpPos.X - FPosDown.X));
end;
ksLeftBottom,
ksBottom:
begin
tmpPos.X := FRect.Right;
inc(FRect.Bottom,(tmpPos.Y - FPosDown.Y));
end;
ksBottomRight:
begin
inc(FRect.Right, (tmpPos.X - FPosDown.X));
inc(FRect.Bottom,(tmpPos.Y - FPosDown.Y));
end;
end;
FPosDown := tmpPos;
end;
end.
|
{*******************************************************}
{ }
{ Borland Delphi Visual Component Library }
{ CGI/WinCGI Web server application components }
{ }
{ Copyright (c) 1997,2001 Borland Software Corporation }
{ }
{*******************************************************}
unit CGIStubApp;
{$DENYPACKAGEUNIT}
interface
uses Windows, Classes, CGIHTTP, HTTPApp, WebBroker, IniFiles;
type
TCGIStubRequest = class(TCGIRequest)
public
function TranslateURI(const URI: string): string; override;
end;
TCGIStubResponse = class(TCGIResponse)
protected
function GetContent: string; override;
function GetDateVariable(Index: Integer): TDateTime; override;
function GetIntegerVariable(Index: Integer): Integer; override;
function GetLogMessage: string; override;
function GetStatusCode: Integer; override;
function GetStringVariable(Index: Integer): string; override;
procedure SetContent(const Value: string); override;
procedure SetDateVariable(Index: Integer; const Value: TDateTime); override;
procedure SetIntegerVariable(Index: Integer; Value: Integer); override;
procedure SetLogMessage(const Value: string); override;
procedure SetStatusCode(Value: Integer); override;
procedure SetStringVariable(Index: Integer; const Value: string); override;
procedure InitResponse; override;
public
procedure SendResponse; override;
procedure SendRedirect(const URI: string); override;
procedure SendStream(AStream: TStream); override;
end;
TWinCGIStubRequest = class(TWinCGIRequest)
public
function ReadString(Count: Integer): string; override;
function TranslateURI(const URI: string): string; override;
function WriteString(const AString: string): Boolean; override;
end;
TWinCGIStubResponse = class(TCGIStubResponse);
implementation
uses SysUtils, BrkrConst, CGIApp;
type
TCGIStubFactory = class(TCGIFactory)
protected
function NewRequest: TCGIRequest; override;
function NewResponse(CGIRequest: TCGIRequest): TCGIResponse; override;
end;
{ TCGIStubRequest }
function TCGIStubRequest.TranslateURI(const URI: string): string;
begin
Assert(False, 'Unexpected call');
end;
{ TCGIResponse }
function TCGIStubResponse.GetContent: string;
begin
Assert(False, 'Unexpected call');
end;
function TCGIStubResponse.GetDateVariable(Index: Integer): TDateTime;
begin
Assert(False, 'Unexpected call');
Result := Now;
end;
function TCGIStubResponse.GetIntegerVariable(Index: Integer): Integer;
begin
Assert(False, 'Unexpected call');
Result := 0;
end;
function TCGIStubResponse.GetLogMessage: string;
begin
// Result := TCGIRequest(HTTPRequest).ECB.lpszLogData;
end;
function TCGIStubResponse.GetStatusCode: Integer;
begin
Assert(False, 'Unexpected call');
Result := 0;
end;
function TCGIStubResponse.GetStringVariable(Index: Integer): string;
begin
Assert(False, 'Unexpected call');
end;
procedure TCGIStubResponse.SetContent(const Value: string);
begin
Assert(False, 'Unexpected call');
end;
procedure TCGIStubResponse.SetDateVariable(Index: Integer; const Value: TDateTime);
begin
Assert(False, 'Unexpected call');
end;
procedure TCGIStubResponse.SetIntegerVariable(Index: Integer; Value: Integer);
begin
Assert(False, 'Unexpected call');
end;
procedure TCGIStubResponse.SetLogMessage(const Value: string);
begin
// StrPLCopy(TCGIRequest(HTTPRequest).ECB.lpszLogData, Value, HSE_LOG_BUFFER_LEN);
end;
procedure TCGIStubResponse.SetStatusCode(Value: Integer);
begin
Assert(False, 'Unexpected call');
end;
procedure TCGIStubResponse.SetStringVariable(Index: Integer; const Value: string);
begin
Assert(False, 'Unexpected call');
end;
procedure TCGIStubResponse.SendResponse;
begin
// Ignore SendResponse, COM object is responsible for
// formatting headers and content into HTTP response
// This method will be called because the FSent instance
// variable is not being set.
end;
procedure TCGIStubResponse.SendRedirect(const URI: string);
begin
Assert(False, 'Unexpected call');
end;
procedure TCGIStubResponse.SendStream(AStream: TStream);
begin
Assert(False, 'Unexpected call');
end;
{ TWinCGIStubRequest }
function TWinCGIStubRequest.ReadString(Count: Integer): string;
begin
Assert(False, 'Unexpected call');
end;
function TWinCGIStubRequest.TranslateURI(const URI: string): string;
begin
Assert(False, 'Unexpected call');
end;
function TWinCGIStubRequest.WriteString(const AString: string): Boolean;
begin
if AString <> '' then
Result := WriteClient(Pointer(AString)^, Length(AString)) = Length(AString)
else Result := False;
end;
procedure TCGIStubResponse.InitResponse;
begin
// Do not initialize properties
end;
{ TCGIStubFactory }
function TCGIStubFactory.NewRequest: TCGIRequest;
var
Buffer: array[0..MAX_PATH] of Char;
S: string;
begin
if IsConsole then
Result := TCGIStubRequest.Create
else
begin
Result := TWinCGIStubRequest.Create(ParamStr(1), ParamStr(2), ParamStr(3));
OutputFileName := ParamStr(3);
if OutputFileName = '' then
begin
SetString(S, Buffer, GetPrivateProfileString('System', {do not localize}
'Output File', '', Buffer, SizeOf(Buffer), PChar(ParamStr(1)))); {do not localize}
OutputFileName := S;
end;
end;
end;
function TCGIStubFactory.NewResponse(
CGIRequest: TCGIRequest): TCGIResponse;
begin
if IsConsole then
Result := TCGIStubResponse.Create(CGIRequest)
else Result := TWinCGIStubResponse.Create(CGIRequest);
end;
initialization
TCGIStubFactory.Create;
end.
|
{***************************************************************************
*
* Orion-project.org Lazarus Helper Library
* Copyright (C) 2016-2017 by Nikolay Chunosov
*
* This file is part of the Orion-project.org Lazarus Helper Library
* https://github.com/Chunosov/orion-lazarus
*
* This Library is free software: you can redistribute it and/or modify it
* under the terms of the MIT License. See enclosed LICENSE.txt for details.
*
***************************************************************************}
unit WinPropEditor;
{$mode objfpc}{$H+}
interface
uses
Forms, Controls, PropEdits, ObjectInspector;
type
TWndPropEditor = class(TForm)
procedure FormClose(Sender: TObject; var CloseAction: TCloseAction);
procedure FormCreate(Sender: TObject);
private
FObjectInspector: TObjectInspectorDlg;
public
procedure SetSelection(AControl: TControl);
end;
function ShowPropEditor: TWndPropEditor; overload;
procedure ShowPropEditor(AControl: TControl); overload;
implementation
{$R *.lfm}
function ShowPropEditor: TWndPropEditor;
begin
Result := TWndPropEditor.Create(Application.MainForm);
Result.Show;
end;
procedure ShowPropEditor(AControl: TControl);
var
Wnd: TWndPropEditor;
begin
Wnd := ShowPropEditor;
AControl.Parent := Wnd;
AControl.Align := alClient;
Wnd.SetSelection(AControl);
end;
{%region TWndPropEditor}
procedure TWndPropEditor.FormCreate(Sender: TObject);
begin
// create the PropertyEditorHook (the interface to the properties)
if not Assigned(GlobalDesignHook) then
GlobalDesignHook := TPropertyEditorHook.Create;
// create the ObjectInspector
FObjectInspector := TObjectInspectorDlg.Create(Application);
FObjectInspector.PropertyEditorHook := GlobalDesignHook;
FObjectInspector.Show;
end;
procedure TWndPropEditor.FormClose(Sender: TObject; var CloseAction: TCloseAction);
begin
FObjectInspector.Close;
CloseAction := caFree;
end;
procedure TWndPropEditor.SetSelection(AControl: TControl);
var
Selection: TPersistentSelectionList;
begin
GlobalDesignHook.LookupRoot := AControl;
Selection := TPersistentSelectionList.Create;
try
Selection.Add(AControl);
FObjectInspector.Selection := Selection;
finally
Selection.Free;
end;
end;
{%endregion}
end.
|
{*******************************************************}
{ }
{ Delphi LiveBindings Framework }
{ }
{ Copyright(c) 2012-2018 Embarcadero Technologies, Inc. }
{ All rights reserved }
{ }
{*******************************************************}
{$HPPEMIT LINKUNIT}
unit Vcl.Bind.Navigator;
interface
uses Data.Bind.Components, System.Classes, Data.Bind.Controls,
System.Generics.Collections, Vcl.Buttons, Vcl.ActnList, System.SysUtils;
type
TNavigateButtonEvent = procedure (Sender: TObject; Button: TNavigateButton) of object;
TNavigatorOrientation = (orHorizontal, orVertical);
TCustomBindNavigator = class(TBaseNavigator, IBindNavigator)
private
FController: TBindNavigatorController;
FBeforeAction: TNavigateButtonEvent;
FOnNavClick: TNavigateButtonEvent;
FHints: TStrings;
FDefHints: TStrings;
FVisibleButtons: TNavigateButtons;
procedure OnActiveChanged(Sender: TObject);
procedure OnDataChanged(Sender: TObject);
procedure OnEditingChanged(Sender: TObject);
function GetDataSource: TBaseLinkingBindSource;
procedure SetDataSource(Value: TBaseLinkingBindSource);
procedure SetVisible(const Value: TNavigateButtons);
function GetHints: TStrings;
procedure SetHints(Value: TStrings);
function GetButton(Index: TNavigateButton): TNavButton;
procedure HintsChanged(Sender: TObject);
function GetOrientation: TNavigatorOrientation;
procedure SetOrientation(const Value: TNavigatorOrientation);
protected
procedure InitHints;
property Buttons[Index: TNavigateButton]: TNavButton read GetButton;
//procedure Notification(AComponent: TComponent; Operation: TOperation); override;
procedure EnabledChanged; override;
procedure ActiveChanged;
procedure DataChanged;
procedure EditingChanged;
procedure BtnClick(Index: TNavigateButton); virtual;
procedure Loaded; override;
procedure BtnIDClick(Index: TNavBtnID); override;
public
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
property VisibleButtons: TNavigateButtons read FVisibleButtons write SetVisible
default NavigatorDefaultButtons;
property DataSource: TBaseLinkingBindSource read GetDataSource write SetDataSource;
property Hints: TStrings read GetHints write SetHints;
property BeforeAction: TNavigateButtonEvent read FBeforeAction write FBeforeAction;
property OnClick: TNavigateButtonEvent read FOnNavClick write FOnNavClick;
property Orientation: TNavigatorOrientation read GetOrientation write SetOrientation;
end;
TBindNavigator = class (TCustomBindNavigator)
published
property DataSource;
property VisibleButtons;
property Align;
property Anchors;
property Constraints;
property DragCursor;
property DragKind;
property DragMode;
property Enabled;
property Flat;
property Ctl3D;
property Hints;
property Orientation;
property ParentCtl3D;
property ParentShowHint;
property PopupMenu;
property ConfirmDelete;
property ShowHint;
property TabOrder;
property TabStop;
property Visible;
property BeforeAction;
property OnClick;
property OnContextPopup;
property OnDblClick;
property OnDragDrop;
property OnDragOver;
property OnEndDock;
property OnEndDrag;
property OnEnter;
property OnExit;
property OnResize;
property OnStartDock;
property OnStartDrag;
end;
{ BindSource actions }
TBindNavigateAction = class(TAction)
private
FController: TBindNavigatorController;
FButton: TNavigateButton;
function GetDataSource: TBaseLinkingBindSource;
procedure SetDataSource(Value: TBaseLinkingBindSource);
function InvokeController(Target: TObject;
AProc: TProc<TBindNavigatorController>): Boolean;
protected
property Controller: TBindNavigatorController read FController;
public
constructor Create(AComponent: TComponent); overload; override;
constructor Create(AComponent: TComponent; AButton: TNavigateButton); reintroduce; overload;
destructor Destroy; override;
function HandlesTarget(Target: TObject): Boolean; override;
procedure ExecuteTarget(Target: TObject); override;
procedure UpdateTarget(Target: TObject); override;
published
property DataSource: TBaseLinkingBindSource read GetDataSource write SetDataSource;
end;
TBindNavigateFirst = class(TBindNavigateAction)
public
constructor Create(AComponent: TComponent); override;
end;
TBindNavigatePrior = class(TBindNavigateAction)
public
constructor Create(AComponent: TComponent); override;
end;
TBindNavigateNext = class(TBindNavigateAction)
public
constructor Create(AComponent: TComponent); override;
end;
TBindNavigateLast = class(TBindNavigateAction)
public
constructor Create(AComponent: TComponent); override;
end;
TBindNavigateInsert = class(TBindNavigateAction)
public
constructor Create(AComponent: TComponent); override;
end;
TBindNavigateDelete = class(TBindNavigateAction)
private
FConfirmDelete: Boolean;
public
constructor Create(AComponent: TComponent); override;
procedure ExecuteTarget(Target: TObject); override;
published
[Default(True)]
property ConfirmDelete: Boolean read FConfirmDelete write FConfirmDelete default True;
end;
TBindNavigateEdit = class(TBindNavigateAction)
public
constructor Create(AComponent: TComponent); override;
end;
TBindNavigatePost = class(TBindNavigateAction)
public
constructor Create(AComponent: TComponent); override;
end;
TBindNavigateCancel = class(TBindNavigateAction)
public
constructor Create(AComponent: TComponent); override;
end;
TBindNavigateRefresh = class(TBindNavigateAction)
public
constructor Create(AComponent: TComponent); override;
end;
TBindNavigateApplyUpdates = class(TBindNavigateAction)
public
constructor Create(AComponent: TComponent); override;
end;
TBindNavigateCancelUpdates = class(TBindNavigateAction)
public
constructor Create(AComponent: TComponent); override;
end;
implementation
uses Vcl.Dialogs, WinApi.Windows, Vcl.Themes,
Data.Bind.Consts, System.UITypes;
{$R BindCtrls.res}
{ TCustomBindNavigator }
var
BtnTypeName: array[TNavigateButton] of pchar = ('FIRST', 'PRIOR', 'NEXT',
'LAST', 'INSERT', 'DELETE', 'EDIT', 'POST', 'CANCEL', 'REFRESH',
'APPLYUPDATES',
'CANCELUPDATES');
BtnHintId: array[TNavigateButton] of string = (SFirstRecord, SPriorRecord,
SNextRecord, SLastRecord, SInsertRecord, SDeleteRecord, SEditRecord,
SPostEdit, SCancelEdit, SRefreshRecord,
SApplyUpdates, SCancelUpdates);
constructor TCustomBindNavigator.Create(AOwner: TComponent);
const
NormalButtons: array[TNavigateButton] of TThemedDataNavButtons = (tdnbFirstNormal,
tdnbPriorNormal, tdnbNextNormal, tdnbLastNormal, tdnbInsertNormal,
tdnbDeleteNormal, tdnbEditNormal, tdnbPostNormal, tdnbCancelNormal,
tdnbRefreshNormal, tdnbApplyUpdatesNormal, tdnbCancelUpdatesNormal);
HotButtons: array[TNavigateButton] of TThemedDataNavButtons = (tdnbFirstHot,
tdnbPriorHot, tdnbNextHot, tdnbLastHot, tdnbInsertHot,
tdnbDeleteHot, tdnbEditHot, tdnbPostHot, tdnbCancelHot,
tdnbRefreshHot, tdnbApplyUpdatesHot, tdnbCancelUpdatesHot);
DisabledButtons: array[TNavigateButton] of TThemedDataNavButtons = (tdnbFirstDisabled,
tdnbPriorDisabled, tdnbNextDisabled, tdnbLastDisabled, tdnbInsertDisabled,
tdnbDeleteDisabled, tdnbEditDisabled, tdnbPostDisabled, tdnbCancelDisabled,
tdnbRefreshDisabled, tdnbApplyUpdatesDisabled, tdnbCancelUpdatesDisabled);
PressedButtons: array[TNavigateButton] of TThemedDataNavButtons = (tdnbFirstPressed,
tdnbPriorPressed, tdnbNextPressed, tdnbLastPressed, tdnbInsertPressed,
tdnbDeletePressed, tdnbEditPressed, tdnbPostPressed, tdnbCancelPressed,
tdnbRefreshPressed, tdnbApplyUpdatesPressed, tdnbCancelUpdatesPressed);
var
LList: TList<TBaseNavigator.TButtonDescription>;
LDescription: TButtonDescription;
I: TNavigateButton;
begin
inherited;
FHints := TStringList.Create;
TStringList(FHints).OnChange := HintsChanged;
VisibleButtons := NavigatorDefaultButtons;
FController := TBindNavigatorController.Create(Self);
FController.OnEditingChanged := OnEditingChanged;
FController.OnDataChanged := OnDataChanged;
FController.OnActiveChanged := OnActiveChanged;
LList := TList<TBaseNavigator.TButtonDescription>.Create;
try
for I := Low(TNavigateButton) to High(TNavigateButton) do
begin
LDescription.ID := TNavBtnID(I);
LDescription.AllowTimer := (I = nbPrior) or (I = nbNext);
LDescription.DefaultHint := BtnHintId[I];
LDescription.DefaultVisible := I in VisibleButtons;
LDescription.GlyphResInstance := HInstance;
LDescription.GlyphResName := Format('BINDN_%s', [BtnTypeName[I]]);
LDescription.ThemeNormal := NormalButtons[I];
LDescription.ThemeHot := HotButtons[I];
LDescription.ThemeDisabled := DisabledButtons[I];
LDescription.ThemePressed := PressedButtons[I];
LList.Add(LDescription);
end;
DefineButtons(LList.ToArray);
finally
LList.Free;
end;
end;
procedure TCustomBindNavigator.HintsChanged(Sender: TObject);
begin
InitHints;
end;
procedure TCustomBindNavigator.InitHints;
var
I: Integer;
J: TNavigateButton;
begin
if not Assigned(FDefHints) then
begin
FDefHints := TStringList.Create;
for J := Low(TNavigateButton) to High(TNavigateButton) do
FDefHints.Add(BtnHintId[J]);
end;
for J := Low(TNavigateButton) to High(TNavigateButton) do
Buttons[J].Hint := FDefHints[Ord(J)];
J := Low(TNavigateButton);
for I := 0 to (FHints.Count - 1) do
begin
if FHints.Strings[I] <> '' then Buttons[J].Hint := FHints.Strings[I];
if J = High(TNavigateButton) then Exit;
Inc(J);
end;
end;
procedure TCustomBindNavigator.Loaded;
begin
inherited;
HintsChanged(Self);
end;
procedure TCustomBindNavigator.ActiveChanged;
var
LActive: Boolean;
begin
LActive := FController.Active;
if not (Enabled and LActive) then
FController.DisableButtons(
procedure(AButton: TNavigateButton; AEnabled: Boolean)
begin
Buttons[AButton].Enabled := AEnabled;
end)
else
begin
FController.EnableButtons(NavigatorButtons, Self.Enabled,
procedure(AButton: TNavigateButton; AEnabled: Boolean)
begin
Buttons[AButton].Enabled := AEnabled;
end)
end;
end;
procedure TCustomBindNavigator.DataChanged;
begin
FController.EnableButtons(NavigatorScrollButtons + [nbDelete, nbApplyUpdates, nbCancelUpdates], Self.Enabled,
procedure(AButton: TNavigateButton; AEnabled: Boolean)
begin
Buttons[AButton].Enabled := AEnabled;
end);
end;
destructor TCustomBindNavigator.Destroy;
begin
FController.Free;
FHints.Free;
FDefHints.Free;
inherited;
end;
procedure TCustomBindNavigator.EditingChanged;
begin
FController.EnableButtons(NavigatorEditButtons - [nbDelete], Enabled,
procedure(AButton: TNavigateButton; AEnabled: Boolean)
begin
Buttons[AButton].Enabled := AEnabled;
end);
end;
procedure TCustomBindNavigator.EnabledChanged;
begin
ActiveChanged;
end;
procedure TCustomBindNavigator.OnEditingChanged(Sender: TObject);
begin
Self.EditingChanged;
end;
procedure TCustomBindNavigator.OnActiveChanged(Sender: TObject);
begin
Self.ActiveChanged;
end;
procedure TCustomBindNavigator.OnDataChanged(Sender: TObject);
begin
Self.DataChanged;
end;
procedure TCustomBindNavigator.SetDataSource(Value: TBaseLinkingBindSource);
begin
FController.DataSource := Value;
if not (csLoading in ComponentState) then
ActiveChanged;
end;
procedure TCustomBindNavigator.SetHints(Value: TStrings);
begin
if Value.Text = FDefHints.Text then
FHints.Clear else
FHints.Assign(Value);
end;
procedure TCustomBindNavigator.SetOrientation(
const Value: TNavigatorOrientation);
begin
case Value of
orHorizontal:
inherited Orientation := TOrientation.orHorizontal;
orVertical:
inherited Orientation := TOrientation.orVertical;
else
Assert(False);
end;
end;
procedure TCustomBindNavigator.SetVisible(const Value: TNavigateButtons);
var
LList: TList<TNavBtnID>;
I: TNavigateButton;
begin
FVisibleButtons := Value;
LList := TList<TNavBtnID>.Create;
try
for I in Value do
LList.Add(TNavBtnID(I));
inherited SetVisible(LList.ToArray);
finally
LList.Free;
end;
end;
function TCustomBindNavigator.GetHints: TStrings;
begin
if (csDesigning in ComponentState) and not (csWriting in ComponentState) and
not (csReading in ComponentState) and (FHints.Count = 0) then
Result := FDefHints else
Result := FHints;
end;
function TCustomBindNavigator.GetOrientation: TNavigatorOrientation;
begin
case inherited Orientation of
TOrientation.orHorizontal:
Result := orHorizontal;
TOrientation.orVertical:
Result := orVertical;
else
Result := orHorizontal;
Assert(False);
end;
end;
function TCustomBindNavigator.GetDataSource: TBaseLinkingBindSource;
begin
Result := FController.DataSource as TBaseLinkingBindSource
end;
function TCustomBindNavigator.GetButton(Index: TNavigateButton): TNavButton;
begin
Result := inherited GetButton(TNavBtnID(Index));
end;
procedure TCustomBindNavigator.BtnClick(Index: TNavigateButton);
begin
if (DataSource <> nil) then
begin
if not (csDesigning in ComponentState) and Assigned(BeforeAction) then
BeforeAction(Self, Index);
FController.ExecuteButton(Index,
function: Boolean
begin
Result := not ConfirmDelete or
(MessageDlg(SDeleteRecordQuestion, mtConfirmation,
mbOKCancel, 0) <> idCancel);
end
);
end;
if not (csDesigning in ComponentState) and Assigned(OnClick) then
OnClick(Self, Index);
end;
procedure TCustomBindNavigator.BtnIDClick(Index: TNavBtnID);
begin
Self.BtnClick(TNavigateButton(Index));
end;
{ TBindNavigateAction }
function TBindNavigateAction.HandlesTarget(Target: TObject): Boolean;
begin
Result := DataSource <> nil;
end;
constructor TBindNavigateAction.Create(AComponent: TComponent);
begin
inherited;
FController := TBindNavigatorController.Create(Self);
end;
constructor TBindNavigateAction.Create(AComponent: TComponent;
AButton: TNavigateButton);
begin
inherited Create(AComponent);
FButton := AButton;
FController := TBindNavigatorController.Create(Self);
end;
destructor TBindNavigateAction.Destroy;
begin
FController.Free;
inherited;
end;
procedure TBindNavigateAction.ExecuteTarget(Target: TObject);
begin
InvokeController(Target,
procedure(AController: TBindNavigatorController)
begin
AController.ExecuteButton(FButton, nil);
end);
end;
function TBindNavigateAction.GetDataSource: TBaseLinkingBindSource;
begin
Result := FController.DataSource as TBaseLinkingBindSource
end;
procedure TBindNavigateAction.SetDataSource(Value: TBaseLinkingBindSource);
begin
FController.DataSource := Value;
end;
procedure TBindNavigateAction.UpdateTarget(Target: TObject);
begin
if not InvokeController(Target,
procedure(AController: TBindNavigatorController)
begin
AController.EnableButtons([FButton], True,
procedure(AButton: TNavigateButton; AEnabled: Boolean)
begin
Enabled := AEnabled;
end);
end) then
Enabled := False;
end;
function TBindNavigateAction.InvokeController(Target: TObject; AProc: TProc<TBindNavigatorController>): Boolean;
begin
Result := DataSource <> nil;
if Result then
AProc(FController)
end;
{ TBindNavigateFirst }
constructor TBindNavigateFirst.Create(AComponent: TComponent);
begin
inherited Create(AComponent, TNavigateButton.nbFirst);
end;
{ TBindNavigatePrior }
constructor TBindNavigatePrior.Create(AComponent: TComponent);
begin
inherited Create(AComponent, TNavigateButton.nbPrior);
end;
{ TBindNavigateNext }
constructor TBindNavigateNext.Create(AComponent: TComponent);
begin
inherited Create(AComponent, TNavigateButton.nbNext)
end;
{ TBindNavigateLast }
constructor TBindNavigateLast.Create(AComponent: TComponent);
begin
inherited Create(AComponent, TNavigateButton.nbLast)
end;
{ TBindNavigateInsert }
constructor TBindNavigateInsert.Create(AComponent: TComponent);
begin
inherited Create(AComponent, TNavigateButton.nbInsert)
end;
{ TBindNavigateDelete }
constructor TBindNavigateDelete.Create(AComponent: TComponent);
begin
inherited Create(AComponent, TNavigateButton.nbDelete);
FConfirmDelete := True;
end;
procedure TBindNavigateDelete.ExecuteTarget(Target: TObject);
begin
InvokeController(Target,
procedure(AController: TBindNavigatorController)
begin
AController.ExecuteButton(FButton,
function: Boolean
begin
Result := not ConfirmDelete or
(MessageDlg(SDeleteRecordQuestion, mtConfirmation,
mbOKCancel, 0) <> idCancel);
end);
end);
end;
{ TBindNavigateEdit }
constructor TBindNavigateEdit.Create(AComponent: TComponent);
begin
inherited Create(AComponent, TNavigateButton.nbEdit)
end;
{ TBindNavigatePost }
constructor TBindNavigatePost.Create(AComponent: TComponent);
begin
inherited Create(AComponent, TNavigateButton.nbPost)
end;
{ TBindNavigateCancel }
constructor TBindNavigateCancel.Create(AComponent: TComponent);
begin
inherited Create(AComponent, TNavigateButton.nbCancel)
end;
{ TBindNavigateRefresh }
constructor TBindNavigateRefresh.Create(AComponent: TComponent);
begin
inherited Create(AComponent, TNavigateButton.nbRefresh)
end;
{ TBindNavigateApplyUpdates }
constructor TBindNavigateApplyUpdates.Create(AComponent: TComponent);
begin
inherited Create(AComponent, TNavigateButton.nbApplyUpdates)
end;
{ TBindNavigateCancelUpdates }
constructor TBindNavigateCancelUpdates.Create(AComponent: TComponent);
begin
inherited Create(AComponent, TNavigateButton.nbCancelUpdates)
end;
end.
|
unit form_SecureErase;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, Shredder, Spin64;
type
TfrmSecureErase = class(TForm)
rbEntireDrive: TRadioButton;
rbFreeSpace: TRadioButton;
cbOverwriteMethod: TComboBox;
Label1: TLabel;
pbOverwrite: TButton;
pbClose: TButton;
cbDrive: TComboBox;
Label2: TLabel;
Label3: TLabel;
Label4: TLabel;
ckUnusedStorage: TCheckBox;
ckFileSlack: TCheckBox;
Shredder1: TShredder;
Label5: TLabel;
sePasses: TSpinEdit64;
procedure SettingChanged(Sender: TObject);
procedure pbOverwriteClick(Sender: TObject);
procedure pbCloseClick(Sender: TObject);
procedure FormShow(Sender: TObject);
private
procedure SetOverwriteMethod(useMethod: TShredMethod);
function GetOverwriteMethod(): TShredMethod;
procedure EnableDisableControls();
public
{ Public declarations }
end;
implementation
{$R *.dfm}
uses
AppGlobals,
SDUGeneral,
SDUDialogs;
procedure TfrmSecureErase.FormShow(Sender: TObject);
var
sm: TShredMethod;
begin
PopulateRemovableDrives(cbDrive);
ckUnusedStorage.checked := TRUE;
ckFileSlack.checked := TRUE;
cbOverwriteMethod.Items.Clear();
for sm := low(TShredMethodTitle) to high(TShredMethodTitle) do
begin
cbOverwriteMethod.Items.Add(ShredMethodTitle(sm));
end;
SetOVerwriteMethod(smPseudoRandom);
sePasses.Value := 1;
sePasses.MinValue := 1;
sePasses.MaxValue := 9999;
EnableDisableControls();
end;
procedure TfrmSecureErase.pbCloseClick(Sender: TObject);
begin
Close();
end;
procedure TfrmSecureErase.SetOverwriteMethod(useMethod: TShredMethod);
var
i: integer;
begin
for i := 0 to (cbOverwriteMethod.items.Count - 1) do
begin
if (cbOverwriteMethod.items[i] = ShredMethodTitle(useMethod)) then
begin
cbOverwriteMethod.itemindex := i;
break;
end;
end;
end;
function TfrmSecureErase.GetOverwriteMethod(): TShredMethod;
var
sm: TShredMethod;
retval: TShredMethod;
begin
retval := smPseudorandom;
for sm := low(TShredMethodTitle) to high(TShredMethodTitle) do
begin
if (cbOverwriteMethod.items[cbOverwriteMethod.itemindex] = ShredMethodTitle(sm)) then
begin
retval := sm;
break;
end;
end;
Result := retval;
end;
procedure TfrmSecureErase.pbOverwriteClick(Sender: TObject);
var
allOK: boolean;
driveItem: string;
drive: char;
driveDevice: string;
overwriteFailure: boolean;
userCancel: boolean;
overwriteResult: TShredResult;
failAdvice: string;
begin
allOK := TRUE;
overwriteFailure:= FALSE;
userCancel := FALSE;
drive := '@'; // Get rid of compiler warning
// Check user's input...
if allOK then
begin
if (cbDrive.ItemIndex < 0) then
begin
SDUMessageDlg(
'Please select which drive you wish to overwrite.',
mtError,
[mbOK],
0
);
allOK := FALSE;
end;
end;
// Check user's input...
if allOK then
begin
if (
not(rbEntireDrive.checked) and
not(rbFreeSpace.checked)
) then
begin
SDUMessageDlg(
'Please specify whether you wish to destroy the entire contents of the drive selected, or just it''s unused storage.',
mtError,
[mbOK],
0
);
allOK := FALSE;
end;
end;
// Check user's input...
if allOK then
begin
if (
rbFreeSpace.checked and
not(ckUnusedStorage.checked) and
not(ckFileSlack.checked)
) then
begin
SDUMessageDlg(
'Please select which unused areas of the drive you would like to overwrite from the checkboxes shown',
mtError,
[mbOK],
0
);
allOK := FALSE;
end;
end;
// Check user's input...
if allOK then
begin
if (sePasses.Value <= 0) then
begin
SDUMessageDlg(
'Please specify a number of passes greater than zero.',
mtError,
[mbOK],
0
);
allOK := FALSE;
end;
end;
if allOK then
begin
driveItem := cbDrive.Items[cbDrive.Itemindex];
drive := driveItem[1];
driveDevice := '\\.\'+drive+':';
end;
// Check user's input...
if allOK then
begin
if rbEntireDrive.checked then
begin
allOK := (SDUMessageDlg(
'WARNING:'+SDUCRLF+
SDUCRLF+
'The option you have selected will DESTROY all data on the drive '+drive+':'+SDUCRLF+
SDUCRLF+
'Are you sure you wish to proceed?',
mtWarning,
[mbYes, mbNo],
0
) = mrYes);
end;
end;
if allOK then
begin
Shredder1.IntMethod := GetOverwriteMethod();
Shredder1.IntPasses := sePasses.Value;
if rbEntireDrive.checked then
begin
allOK := Shredder1.DestroyDevice(driveDevice, FALSE, FALSE);
end
else
begin
if allOK then
begin
if ckUnusedStorage.checked then
begin
overwriteResult := Shredder1.OverwriteDriveFreeSpace(drive, FALSE);
if (overwriteResult = srError) then
begin
overwriteFailure := TRUE;
allOK := FALSE;
end
else if (overwriteResult = srUserCancel) then
begin
userCancel := TRUE;
allOK := FALSE;
end;
end;
end;
if allOK then
begin
if ckFileSlack.checked then
begin
overwriteResult := Shredder1.OverwriteAllFileSlacks(drive, FALSE);
if (overwriteResult = srError) then
begin
overwriteFailure := TRUE;
allOK := FALSE;
end
else if (overwriteResult = srUserCancel) then
begin
userCancel := TRUE;
allOK := FALSE;
end;
end;
end;
end;
end;
if allOK then
begin
SDUMessageDlg('Overwrite complete.', mtInformation, [mbOK], 0);
end
else
begin
if userCancel then
begin
SDUMessageDlg('Operation canceled.', mtInformation, [mbOK], 0);
end
else if overwriteFailure then
begin
if rbEntireDrive.checked then
begin
failAdvice := 'Please ensure that no files are open on this drive, or applications using it';
end
else
begin
failAdvice := 'Please ensure this drive is formatted.';
end;
SDUMessageDlg(
'Unable to complete overwrite.'+SDUCRLF+
SDUCRLF+
failAdvice,
mtWarning,
[mbOK],
0
);
end;
end;
end;
procedure TfrmSecureErase.SettingChanged(Sender: TObject);
begin
EnableDisableControls();
end;
procedure TfrmSecureErase.EnableDisableControls();
var
userEnterPasses: boolean;
begin
SDUEnableControl(ckUnusedStorage, rbFreeSpace.checked);
SDUEnableControl(ckFileSlack, rbFreeSpace.checked);
userEnterPasses := (TShredMethodPasses[GetOverwriteMethod()] <= 0);
SDUEnableControl(sePasses, userEnterPasses);
if not(userEnterPasses) then
begin
sePasses.Value := TShredMethodPasses[GetOverwriteMethod()];
end;
end;
END.
|
unit MaskEditImpl1;
interface
uses
Windows, ActiveX, Classes, Controls, Graphics, Menus, Forms, StdCtrls,
ComServ, StdVCL, AXCtrls, DelCtrls_TLB, Mask;
type
TMaskEditX = class(TActiveXControl, IMaskEditX)
private
{ Private declarations }
FDelphiControl: TMaskEdit;
FEvents: IMaskEditXEvents;
procedure ChangeEvent(Sender: TObject);
procedure ClickEvent(Sender: TObject);
procedure DblClickEvent(Sender: TObject);
procedure KeyPressEvent(Sender: TObject; var Key: Char);
protected
{ Protected declarations }
procedure DefinePropertyPages(DefinePropertyPage: TDefinePropertyPage); override;
procedure EventSinkChanged(const EventSink: IUnknown); override;
procedure InitializeControl; override;
function ClassNameIs(const Name: WideString): WordBool; safecall;
function DrawTextBiDiModeFlags(Flags: Integer): Integer; safecall;
function DrawTextBiDiModeFlagsReadingOnly: Integer; safecall;
function Get_AutoSelect: WordBool; safecall;
function Get_AutoSize: WordBool; safecall;
function Get_BiDiMode: TxBiDiMode; safecall;
function Get_BorderStyle: TxBorderStyle; safecall;
function Get_CanUndo: WordBool; safecall;
function Get_CharCase: TxEditCharCase; safecall;
function Get_Color: OLE_COLOR; safecall;
function Get_Ctl3D: WordBool; safecall;
function Get_Cursor: Smallint; safecall;
function Get_DoubleBuffered: WordBool; safecall;
function Get_DragCursor: Smallint; safecall;
function Get_DragMode: TxDragMode; safecall;
function Get_EditMask: WideString; safecall;
function Get_EditText: WideString; safecall;
function Get_Enabled: WordBool; safecall;
function Get_Font: IFontDisp; safecall;
function Get_ImeMode: TxImeMode; safecall;
function Get_ImeName: WideString; safecall;
function Get_IsMasked: WordBool; safecall;
function Get_MaxLength: Integer; safecall;
function Get_Modified: WordBool; safecall;
function Get_ParentColor: WordBool; safecall;
function Get_ParentCtl3D: WordBool; safecall;
function Get_ParentFont: WordBool; safecall;
function Get_PasswordChar: Smallint; safecall;
function Get_ReadOnly: WordBool; safecall;
function Get_SelLength: Integer; safecall;
function Get_SelStart: Integer; safecall;
function Get_SelText: WideString; safecall;
function Get_Text: WideString; safecall;
function Get_Visible: WordBool; safecall;
function GetControlsAlignment: TxAlignment; safecall;
function IsRightToLeft: WordBool; safecall;
function UseRightToLeftAlignment: WordBool; safecall;
function UseRightToLeftReading: WordBool; safecall;
function UseRightToLeftScrollBar: WordBool; safecall;
procedure _Set_Font(const Value: IFontDisp); safecall;
procedure AboutBox; safecall;
procedure Clear; safecall;
procedure ClearSelection; safecall;
procedure ClearUndo; safecall;
procedure CopyToClipboard; safecall;
procedure CutToClipboard; safecall;
procedure FlipChildren(AllLevels: WordBool); safecall;
procedure InitiateAction; safecall;
procedure PasteFromClipboard; safecall;
procedure SelectAll; safecall;
procedure Set_AutoSelect(Value: WordBool); safecall;
procedure Set_AutoSize(Value: WordBool); safecall;
procedure Set_BiDiMode(Value: TxBiDiMode); safecall;
procedure Set_BorderStyle(Value: TxBorderStyle); safecall;
procedure Set_CharCase(Value: TxEditCharCase); safecall;
procedure Set_Color(Value: OLE_COLOR); safecall;
procedure Set_Ctl3D(Value: WordBool); safecall;
procedure Set_Cursor(Value: Smallint); safecall;
procedure Set_DoubleBuffered(Value: WordBool); safecall;
procedure Set_DragCursor(Value: Smallint); safecall;
procedure Set_DragMode(Value: TxDragMode); safecall;
procedure Set_EditMask(const Value: WideString); safecall;
procedure Set_EditText(const Value: WideString); safecall;
procedure Set_Enabled(Value: WordBool); safecall;
procedure Set_Font(const Value: IFontDisp); safecall;
procedure Set_ImeMode(Value: TxImeMode); safecall;
procedure Set_ImeName(const Value: WideString); safecall;
procedure Set_MaxLength(Value: Integer); safecall;
procedure Set_Modified(Value: WordBool); safecall;
procedure Set_ParentColor(Value: WordBool); safecall;
procedure Set_ParentCtl3D(Value: WordBool); safecall;
procedure Set_ParentFont(Value: WordBool); safecall;
procedure Set_PasswordChar(Value: Smallint); safecall;
procedure Set_ReadOnly(Value: WordBool); safecall;
procedure Set_SelLength(Value: Integer); safecall;
procedure Set_SelStart(Value: Integer); safecall;
procedure Set_SelText(const Value: WideString); safecall;
procedure Set_Text(const Value: WideString); safecall;
procedure Set_Visible(Value: WordBool); safecall;
procedure Undo; safecall;
procedure ValidateEdit; safecall;
end;
implementation
uses ComObj, About15;
{ TMaskEditX }
procedure TMaskEditX.DefinePropertyPages(DefinePropertyPage: TDefinePropertyPage);
begin
{ Define property pages here. Property pages are defined by calling
DefinePropertyPage with the class id of the page. For example,
DefinePropertyPage(Class_MaskEditXPage); }
end;
procedure TMaskEditX.EventSinkChanged(const EventSink: IUnknown);
begin
FEvents := EventSink as IMaskEditXEvents;
end;
procedure TMaskEditX.InitializeControl;
begin
FDelphiControl := Control as TMaskEdit;
FDelphiControl.OnChange := ChangeEvent;
FDelphiControl.OnClick := ClickEvent;
FDelphiControl.OnDblClick := DblClickEvent;
FDelphiControl.OnKeyPress := KeyPressEvent;
end;
function TMaskEditX.ClassNameIs(const Name: WideString): WordBool;
begin
Result := FDelphiControl.ClassNameIs(Name);
end;
function TMaskEditX.DrawTextBiDiModeFlags(Flags: Integer): Integer;
begin
Result := FDelphiControl.DrawTextBiDiModeFlags(Flags);
end;
function TMaskEditX.DrawTextBiDiModeFlagsReadingOnly: Integer;
begin
Result := FDelphiControl.DrawTextBiDiModeFlagsReadingOnly;
end;
function TMaskEditX.Get_AutoSelect: WordBool;
begin
Result := FDelphiControl.AutoSelect;
end;
function TMaskEditX.Get_AutoSize: WordBool;
begin
Result := FDelphiControl.AutoSize;
end;
function TMaskEditX.Get_BiDiMode: TxBiDiMode;
begin
Result := Ord(FDelphiControl.BiDiMode);
end;
function TMaskEditX.Get_BorderStyle: TxBorderStyle;
begin
Result := Ord(FDelphiControl.BorderStyle);
end;
function TMaskEditX.Get_CanUndo: WordBool;
begin
Result := FDelphiControl.CanUndo;
end;
function TMaskEditX.Get_CharCase: TxEditCharCase;
begin
Result := Ord(FDelphiControl.CharCase);
end;
function TMaskEditX.Get_Color: OLE_COLOR;
begin
Result := OLE_COLOR(FDelphiControl.Color);
end;
function TMaskEditX.Get_Ctl3D: WordBool;
begin
Result := FDelphiControl.Ctl3D;
end;
function TMaskEditX.Get_Cursor: Smallint;
begin
Result := Smallint(FDelphiControl.Cursor);
end;
function TMaskEditX.Get_DoubleBuffered: WordBool;
begin
Result := FDelphiControl.DoubleBuffered;
end;
function TMaskEditX.Get_DragCursor: Smallint;
begin
Result := Smallint(FDelphiControl.DragCursor);
end;
function TMaskEditX.Get_DragMode: TxDragMode;
begin
Result := Ord(FDelphiControl.DragMode);
end;
function TMaskEditX.Get_EditMask: WideString;
begin
Result := WideString(FDelphiControl.EditMask);
end;
function TMaskEditX.Get_EditText: WideString;
begin
Result := WideString(FDelphiControl.EditText);
end;
function TMaskEditX.Get_Enabled: WordBool;
begin
Result := FDelphiControl.Enabled;
end;
function TMaskEditX.Get_Font: IFontDisp;
begin
GetOleFont(FDelphiControl.Font, Result);
end;
function TMaskEditX.Get_ImeMode: TxImeMode;
begin
Result := Ord(FDelphiControl.ImeMode);
end;
function TMaskEditX.Get_ImeName: WideString;
begin
Result := WideString(FDelphiControl.ImeName);
end;
function TMaskEditX.Get_IsMasked: WordBool;
begin
Result := FDelphiControl.IsMasked;
end;
function TMaskEditX.Get_MaxLength: Integer;
begin
Result := FDelphiControl.MaxLength;
end;
function TMaskEditX.Get_Modified: WordBool;
begin
Result := FDelphiControl.Modified;
end;
function TMaskEditX.Get_ParentColor: WordBool;
begin
Result := FDelphiControl.ParentColor;
end;
function TMaskEditX.Get_ParentCtl3D: WordBool;
begin
Result := FDelphiControl.ParentCtl3D;
end;
function TMaskEditX.Get_ParentFont: WordBool;
begin
Result := FDelphiControl.ParentFont;
end;
function TMaskEditX.Get_PasswordChar: Smallint;
begin
Result := Smallint(FDelphiControl.PasswordChar);
end;
function TMaskEditX.Get_ReadOnly: WordBool;
begin
Result := FDelphiControl.ReadOnly;
end;
function TMaskEditX.Get_SelLength: Integer;
begin
Result := FDelphiControl.SelLength;
end;
function TMaskEditX.Get_SelStart: Integer;
begin
Result := FDelphiControl.SelStart;
end;
function TMaskEditX.Get_SelText: WideString;
begin
Result := WideString(FDelphiControl.SelText);
end;
function TMaskEditX.Get_Text: WideString;
begin
Result := WideString(FDelphiControl.Text);
end;
function TMaskEditX.Get_Visible: WordBool;
begin
Result := FDelphiControl.Visible;
end;
function TMaskEditX.GetControlsAlignment: TxAlignment;
begin
Result := TxAlignment(FDelphiControl.GetControlsAlignment);
end;
function TMaskEditX.IsRightToLeft: WordBool;
begin
Result := FDelphiControl.IsRightToLeft;
end;
function TMaskEditX.UseRightToLeftAlignment: WordBool;
begin
Result := FDelphiControl.UseRightToLeftAlignment;
end;
function TMaskEditX.UseRightToLeftReading: WordBool;
begin
Result := FDelphiControl.UseRightToLeftReading;
end;
function TMaskEditX.UseRightToLeftScrollBar: WordBool;
begin
Result := FDelphiControl.UseRightToLeftScrollBar;
end;
procedure TMaskEditX._Set_Font(const Value: IFontDisp);
begin
SetOleFont(FDelphiControl.Font, Value);
end;
procedure TMaskEditX.AboutBox;
begin
ShowMaskEditXAbout;
end;
procedure TMaskEditX.Clear;
begin
FDelphiControl.Clear;
end;
procedure TMaskEditX.ClearSelection;
begin
FDelphiControl.ClearSelection;
end;
procedure TMaskEditX.ClearUndo;
begin
FDelphiControl.ClearUndo;
end;
procedure TMaskEditX.CopyToClipboard;
begin
FDelphiControl.CopyToClipboard;
end;
procedure TMaskEditX.CutToClipboard;
begin
FDelphiControl.CutToClipboard;
end;
procedure TMaskEditX.FlipChildren(AllLevels: WordBool);
begin
FDelphiControl.FlipChildren(AllLevels);
end;
procedure TMaskEditX.InitiateAction;
begin
FDelphiControl.InitiateAction;
end;
procedure TMaskEditX.PasteFromClipboard;
begin
FDelphiControl.PasteFromClipboard;
end;
procedure TMaskEditX.SelectAll;
begin
FDelphiControl.SelectAll;
end;
procedure TMaskEditX.Set_AutoSelect(Value: WordBool);
begin
FDelphiControl.AutoSelect := Value;
end;
procedure TMaskEditX.Set_AutoSize(Value: WordBool);
begin
FDelphiControl.AutoSize := Value;
end;
procedure TMaskEditX.Set_BiDiMode(Value: TxBiDiMode);
begin
FDelphiControl.BiDiMode := TBiDiMode(Value);
end;
procedure TMaskEditX.Set_BorderStyle(Value: TxBorderStyle);
begin
FDelphiControl.BorderStyle := TBorderStyle(Value);
end;
procedure TMaskEditX.Set_CharCase(Value: TxEditCharCase);
begin
FDelphiControl.CharCase := TEditCharCase(Value);
end;
procedure TMaskEditX.Set_Color(Value: OLE_COLOR);
begin
FDelphiControl.Color := TColor(Value);
end;
procedure TMaskEditX.Set_Ctl3D(Value: WordBool);
begin
FDelphiControl.Ctl3D := Value;
end;
procedure TMaskEditX.Set_Cursor(Value: Smallint);
begin
FDelphiControl.Cursor := TCursor(Value);
end;
procedure TMaskEditX.Set_DoubleBuffered(Value: WordBool);
begin
FDelphiControl.DoubleBuffered := Value;
end;
procedure TMaskEditX.Set_DragCursor(Value: Smallint);
begin
FDelphiControl.DragCursor := TCursor(Value);
end;
procedure TMaskEditX.Set_DragMode(Value: TxDragMode);
begin
FDelphiControl.DragMode := TDragMode(Value);
end;
procedure TMaskEditX.Set_EditMask(const Value: WideString);
begin
FDelphiControl.EditMask := String(Value);
end;
procedure TMaskEditX.Set_EditText(const Value: WideString);
begin
FDelphiControl.EditText := String(Value);
end;
procedure TMaskEditX.Set_Enabled(Value: WordBool);
begin
FDelphiControl.Enabled := Value;
end;
procedure TMaskEditX.Set_Font(const Value: IFontDisp);
begin
SetOleFont(FDelphiControl.Font, Value);
end;
procedure TMaskEditX.Set_ImeMode(Value: TxImeMode);
begin
FDelphiControl.ImeMode := TImeMode(Value);
end;
procedure TMaskEditX.Set_ImeName(const Value: WideString);
begin
FDelphiControl.ImeName := TImeName(Value);
end;
procedure TMaskEditX.Set_MaxLength(Value: Integer);
begin
FDelphiControl.MaxLength := Value;
end;
procedure TMaskEditX.Set_Modified(Value: WordBool);
begin
FDelphiControl.Modified := Value;
end;
procedure TMaskEditX.Set_ParentColor(Value: WordBool);
begin
FDelphiControl.ParentColor := Value;
end;
procedure TMaskEditX.Set_ParentCtl3D(Value: WordBool);
begin
FDelphiControl.ParentCtl3D := Value;
end;
procedure TMaskEditX.Set_ParentFont(Value: WordBool);
begin
FDelphiControl.ParentFont := Value;
end;
procedure TMaskEditX.Set_PasswordChar(Value: Smallint);
begin
FDelphiControl.PasswordChar := Char(Value);
end;
procedure TMaskEditX.Set_ReadOnly(Value: WordBool);
begin
FDelphiControl.ReadOnly := Value;
end;
procedure TMaskEditX.Set_SelLength(Value: Integer);
begin
FDelphiControl.SelLength := Value;
end;
procedure TMaskEditX.Set_SelStart(Value: Integer);
begin
FDelphiControl.SelStart := Value;
end;
procedure TMaskEditX.Set_SelText(const Value: WideString);
begin
FDelphiControl.SelText := String(Value);
end;
procedure TMaskEditX.Set_Text(const Value: WideString);
begin
FDelphiControl.Text := String(Value);
end;
procedure TMaskEditX.Set_Visible(Value: WordBool);
begin
FDelphiControl.Visible := Value;
end;
procedure TMaskEditX.Undo;
begin
FDelphiControl.Undo;
end;
procedure TMaskEditX.ValidateEdit;
begin
FDelphiControl.ValidateEdit;
end;
procedure TMaskEditX.ChangeEvent(Sender: TObject);
begin
if FEvents <> nil then FEvents.OnChange;
end;
procedure TMaskEditX.ClickEvent(Sender: TObject);
begin
if FEvents <> nil then FEvents.OnClick;
end;
procedure TMaskEditX.DblClickEvent(Sender: TObject);
begin
if FEvents <> nil then FEvents.OnDblClick;
end;
procedure TMaskEditX.KeyPressEvent(Sender: TObject; var Key: Char);
var
TempKey: Smallint;
begin
TempKey := Smallint(Key);
if FEvents <> nil then FEvents.OnKeyPress(TempKey);
Key := Char(TempKey);
end;
initialization
TActiveXControlFactory.Create(
ComServer,
TMaskEditX,
TMaskEdit,
Class_MaskEditX,
15,
'{695CDB46-02E5-11D2-B20D-00C04FA368D4}',
0,
tmApartment);
end.
|
{$INCLUDE ..\cDefines.inc}
unit cFileUtils;
{ }
{ File utility functions v3.02 }
{ }
{ This unit is copyright © 2002-2004 by David J Butler }
{ }
{ This unit is part of Delphi Fundamentals. }
{ Its original file name is cFileUtils.pas }
{ The latest version is available from the Fundamentals home page }
{ http://fundementals.sourceforge.net/ }
{ }
{ I invite you to use this unit, free of charge. }
{ I invite you to distibute this unit, but it must be for free. }
{ I also invite you to contribute to its development, }
{ but do not distribute a modified copy of this file. }
{ }
{ A forum is available on SourceForge for general discussion }
{ http://sourceforge.net/forum/forum.php?forum_id=2117 }
{ }
{ Revision history: }
{ 01/06/2002 3.01 Created cFileUtils from cSysUtils. }
{ 12/12/2002 3.02 Revision. }
{ }
interface
uses
{ Delphi }
{$IFDEF OS_MSWIN}
Windows,
{$ENDIF}
SysUtils;
{ }
{ Path functions }
{ }
const
PathSeperator = {$IFDEF OS_UNIX} '/'{$ENDIF}
{$IFDEF OS_MSWIN}'\'{$ENDIF};
function PathHasDriveLetter(const Path: String): Boolean;
function PathIsDriveLetter(const Path: String): Boolean;
function PathIsDriveRoot(const Path: String): Boolean;
function PathIsRoot(const Path: String): Boolean;
function PathIsUNCPath(const Path: String): Boolean;
function PathIsAbsolute(const Path: String): Boolean;
function PathIsDirectory(const Path: String): Boolean;
function PathInclSuffix(const Path: String;
const PathSep: Char = PathSeperator): String;
function PathExclSuffix(const Path: String;
const PathSep: Char = PathSeperator): String;
procedure PathEnsureSuffix(var Path: String;
const PathSep: Char = PathSeperator);
procedure PathEnsureNoSuffix(var Path: String;
const PathSep: Char = PathSeperator);
function PathCanonical(const Path: String;
const PathSep: Char = PathSeperator): String;
function PathExpand(const Path: String; const BasePath: String = '';
const PathSep: Char = PathSeperator): String;
function PathLeftElement(const Path: String;
const PathSep: Char = PathSeperator): String;
procedure PathSplitLeftElement(const Path: String;
var LeftElement, RightPath: String;
const PathSep: Char = PathSeperator);
procedure DecodeFilePath(const FilePath: String;
var Path, FileName: String;
const PathSep: Char = PathSeperator);
function FileNameValid(const FileName: String): String;
function FilePath(const FileName, Path: String; const BasePath: String = '';
const PathSep: Char = PathSeperator): String;
function DirectoryExpand(const Path: String; const BasePath: String = '';
const PathSep: Char = PathSeperator): String;
function UnixPathToWinPath(const Path: String): String;
function WinPathToUnixPath(const Path: String): String;
{ }
{ File operations }
{ MoveFile first attempts a rename, then a copy and delete. }
{ }
type
EFileError = class(Exception);
function GetFileSize(const FileName: String): Int64;
function GetFileDateTime(const FileName: String): TDateTime;
function GetFirstFileNameMatching(const FileMask: String): String;
function DirEntryGetAttr(const FileName: String): Integer;
function DirEntryIsDirectory(const FileName: String): Boolean;
function FileHasAttr(const FileName: String; const Attr: Word): Boolean;
function FileIsReadOnly(const FileName: String): Boolean;
procedure CopyFile(const FileName, DestName: String);
procedure MoveFile(const FileName, DestName: String);
function DeleteFiles(const FileMask: String): Boolean;
{$IFDEF OS_MSWIN}
{ }
{ Logical Drive functions }
{ }
type
TLogicalDriveType = (
DriveRemovable,
DriveFixed,
DriveRemote,
DriveCDRom,
DriveRamDisk,
DriveTypeUnknown);
function DriveIsValid(const Drive: Char): Boolean;
function DriveGetType(const Path: String): TLogicalDriveType;
function DriveFreeSpace(const Path: String): Int64;
{$ENDIF}
{ }
{ Self-testing code }
{ }
procedure SelfTest;
implementation
uses
{ Fundamentals }
cUtils,
cStrings;
{ }
{ Path functions }
{ }
function PathHasDriveLetter(const Path: String): Boolean;
var P: PChar;
begin
Result := False;
if Length(Path) < 2 then
exit;
P := Pointer(Path);
if not (P^ in ['A'..'Z', 'a'..'z']) then
exit;
Inc(P);
if P^ <> ':' then
exit;
Result := True;
end;
function PathIsDriveLetter(const Path: String): Boolean;
begin
Result := (Length(Path) = 2) and PathHasDriveLetter(Path);
end;
function PathIsDriveRoot(const Path: String): Boolean;
begin
Result := (Length(Path) = 3) and PathHasDriveLetter(Path) and
(Path[3] = '\');
end;
function PathIsRoot(const Path: String): Boolean;
begin
Result := ((Length(Path) = 1) and (Path[1] in csSlash)) or
PathIsDriveRoot(Path);
end;
function PathIsUNCPath(const Path: String): Boolean;
var P: PChar;
begin
Result := False;
if Length(Path) < 2 then
exit;
P := Pointer(Path);
if P^ <> '\' then
exit;
Inc(P);
if P^ <> '\' then
exit;
Result := True;
end;
function PathIsAbsolute(const Path: String): Boolean;
begin
if Path = '' then
Result := False else
if PathHasDriveLetter(Path) then
Result := True else
if PChar(Pointer(Path))^ in ['\', '/'] then
Result := True else
Result := False;
end;
function PathIsDirectory(const Path: String): Boolean;
var L: Integer;
P: PChar;
begin
L := Length(Path);
if L = 0 then
Result := False else
if (L = 2) and PathHasDriveLetter(Path) then
Result := True else
begin
P := Pointer(Path);
Inc(P, L - 1);
Result := P^ in csSlash;
end;
end;
function PathInclSuffix(const Path: String; const PathSep: Char): String;
var L: Integer;
P: PChar;
begin
L := Length(Path);
if L = 0 then
Result := '' else
begin
P := Pointer(Path);
Inc(P, L - 1);
if P^ = PathSep then
Result := Path else
Result := Path + PathSep;
end;
end;
procedure PathEnsureSuffix(var Path: String; const PathSep: Char);
begin
Path := PathInclSuffix(Path, PathSep);
end;
procedure PathEnsureNoSuffix(var Path: String; const PathSep: Char);
begin
Path := PathExclSuffix(Path, PathSep);
end;
function PathExclSuffix(const Path: String; const PathSep: Char): String;
var L: Integer;
P: PChar;
begin
L := Length(Path);
if L = 0 then
Result := '' else
begin
P := Pointer(Path);
Inc(P, L - 1);
if P^ = PathSep then
Result := Copy(Path, 1, L - 1) else
Result := Path;
end;
end;
function PathCanonical(const Path: String; const PathSep: Char): String;
var L, M : Integer;
I, J : Integer;
P : StringArray;
Q : PChar;
begin
Result := Path;
// \.\ references
M := Length(Result);
Repeat
L := M;
if L = 0 then
exit;
Result := StrReplace('\.\', '\', Result);
Result := StrReplace('/./', '/', Result);
M := Length(Result);
Until L = M;
// .\ prefix
StrEnsureNoPrefix(Result, '.\');
StrEnsureNoPrefix(Result, './');
// \. suffix
StrEnsureNoSuffix(Result, '\.');
StrEnsureNoSuffix(Result, '/.');
// ..
if Pos('..', Result) > 0 then
begin
P := StrSplitChar(Result, PathSep);
Repeat
J := -1;
For I := Length(P) - 1 downto 0 do
if P[I] = '..' then
begin
J := I;
break;
end;
if J = -1 then
break;
M := -1;
For I := J - 1 downto 0 do
if (P[I] = '') or ((I = 0) and PathHasDriveLetter(P[I])) then
break else
if P[I] <> '..' then
begin
M := I;
break;
end;
if M = -1 then
break;
Remove(P, J, 1);
Remove(P, M, 1);
Until False;
Result := StrJoinChar(P, PathSep);
end;
// \..\ prefix
While StrMatchLeft(Result, '\..\') do
Delete(Result, 1, 3);
While StrMatchLeft(Result, '/../') do
Delete(Result, 1, 3);
if (Result = '\..') or (Result = '/..') then
Result := '';
L := Length(Result);
if L = 0 then
exit;
// X:\..\ prefix
Q := Pointer(Result);
if Q^ in ['A'..'Z', 'a'..'z'] then
begin
if StrMatch(Result, ':\..\', 2) then
Delete(Result, 4, 3) else
if (L = 5) and StrMatch(Result, ':\..', 2) then
begin
SetLength(Result, 2);
exit;
end;
L := Length(Result);
end;
// single dot
Q := Pointer(Result);
if L = 1 then
begin
if Q^ = '.' then
Result := '';
exit;
end;
// final dot
Inc(Q, L - 2);
if not (Q^ in ['.', '\', '/', ':']) then
begin
Inc(Q);
if Q^ = '.' then
Delete(Result, L, 1);
end;
end;
function PathExpand(const Path: String; const BasePath: String;
const PathSep: Char): String;
begin
if Path = '' then
Result := BasePath else
if PathIsAbsolute(Path) then
Result := Path else
Result := PathInclSuffix(BasePath, PathSep) + Path;
Result := PathCanonical(Result, PathSep);
end;
function PathLeftElement(const Path: String; const PathSep: Char): String;
var I: Integer;
begin
I := PosChar(PathSep, Path);
if I <= 0 then
Result := Path else
Result := Copy(Path, 1, I - 1);
end;
procedure PathSplitLeftElement(const Path: String;
var LeftElement, RightPath: String; const PathSep: Char);
var I: Integer;
begin
I := PosChar(PathSep, Path);
if I <= 0 then
begin
LeftElement := Path;
RightPath := '';
end else
begin
LeftElement := Copy(Path, 1, I - 1);
RightPath := CopyFrom(Path, I + 1);
end;
end;
procedure DecodeFilePath(const FilePath: String; var Path, FileName: String;
const PathSep: Char);
var I: Integer;
begin
I := PosCharRev(PathSep, FilePath);
if I <= 0 then
begin
Path := '';
FileName := FilePath;
end else
begin
Path := Copy(FilePath, 1, I);
FileName := CopyFrom(FilePath, I + 1);
end;
end;
function FileNameValid(const FileName: String): String;
begin
Result := StrReplaceChar(['\', '/', ':', '>', '<', '*', '?'], '_', FileName);
if Result = '.' then
Result := '' else
if Result = '..' then
Result := '_';
end;
function FilePath(const FileName, Path: String; const BasePath: String;
const PathSep: Char): String;
var P, F: String;
begin
F := FileNameValid(FileName);
if F = '' then
begin
Result := '';
exit;
end;
P := PathExpand(Path, BasePath, PathSep);
if P = '' then
Result := F else
Result := PathInclSuffix(P, PathSep) + F;
End;
function DirectoryExpand(const Path: String; const BasePath: String;
const PathSep: Char): String;
begin
Result := PathExpand(PathInclSuffix(Path, PathSep),
PathInclSuffix(BasePath), PathSep);
end;
function UnixPathToWinPath(const Path: String): String;
begin
Result := StrReplaceChar('/', '\',
StrReplaceChar(['\', ':', '<', '>', '|'], '_', Path));
end;
function WinPathToUnixPath(const Path: String): String;
begin
Result := Path;
if PathHasDriveLetter(Path) then
begin
// X: -> \X
Result[2] := Result[1];
Result[1] := '\';
end else
if StrMatchLeft(Path, '\\.\') then
// \\.\ -> \
Delete(Result, 1, 3) else
if PathIsUncPath(Path) then
// \\ -> \
Delete(Result, 1, 1);
Result := StrReplaceChar('\', '/',
StrReplaceChar(['/', ':', '<', '>', '|'], '_', Result));
end;
{ }
{ File operations }
{ }
function GetFileSize(const FileName: String): Int64;
var SRec : TSearchRec;
begin
if FindFirst(FileName, faAnyFile, SRec) <> 0 then
Result := -1 else
begin
{$IFDEF OS_MSWIN}
{$WARNINGS OFF}
Int64Rec(Result).Lo := SRec.FindData.nFileSizeLow;
Int64Rec(Result).Hi := SRec.FindData.nFileSizeHigh;
{$IFDEF DEBUG}{$WARNINGS ON}{$ENDIF}
{$ELSE}
Result := SRec.Size;
{$ENDIF}
FindClose(SRec);
end;
end;
function GetFileDateTime(const FileName: String): TDateTime;
var Age : LongInt;
begin
Age := FileAge(FileName);
if Age = -1 then
Result := 0
else
Result := FileDateToDateTime(Age);
end;
function GetFirstFileNameMatching(const FileMask: String): String;
var SRec : TSearchRec;
begin
Result := '';
if FindFirst(FileMask, faAnyFile, SRec) = 0 then
try
Repeat
if SRec.Attr and faDirectory = 0 then
begin
Result := ExtractFilePath(FileMask) + SRec.Name;
exit;
end;
Until FindNext(SRec) <> 0;
finally
FindClose(SRec);
end;
end;
function DirEntryGetAttr(const FileName: String): Integer;
var SRec : TSearchRec;
begin
if (FileName = '') or PathIsDriveLetter(FileName) then
Result := -1 else
if PathIsRoot(FileName) then
Result := $0800 or faDirectory else
if FindFirst(PathExclSuffix(FileName, '\'), faAnyFile, SRec) = 0 then
begin
Result := SRec.Attr;
FindClose(SRec);
end
else
Result := -1;
end;
function DirEntryIsDirectory(const FileName: String): Boolean;
var SRec : TSearchRec;
begin
if (FileName = '') or PathIsDriveLetter(FileName) then
Result := False else
if PathIsRoot(FileName) then
Result := True else
if FindFirst(PathExclSuffix(FileName, '\'), faDirectory, SRec) = 0 then
begin
Result := SRec.Attr and faDirectory <> 0;
FindClose(SRec);
end
else
Result := False;
end;
{$IFDEF DELPHI6_UP}{$WARN SYMBOL_PLATFORM OFF}{$ENDIF}
function FileHasAttr(const FileName: String; const Attr: Word): Boolean;
var A : Integer;
begin
A := FileGetAttr(FileName);
Result := (A >= 0) and (A and Attr <> 0);
end;
function FileIsReadOnly(const FileName: String): Boolean;
begin
Result := FileHasAttr(FileName, faReadOnly);
end;
procedure CopyFile(const FileName, DestName: String);
var
CopyBuffer : Pointer;
BytesCopied : Longint;
Source, Dest : Integer;
Destination : TFileName;
const
ChunkSize = 8192;
begin
Destination := ExpandFileName(DestName);
if FileHasAttr(Destination, faDirectory) then // if destination is a directory, append file name
Destination := Destination + '\' + ExtractFileName(FileName);
GetMem(CopyBuffer, ChunkSize);
try
Source := FileOpen(FileName, fmShareDenyWrite);
if Source < 0 then
raise EFileError.CreateFmt('Can not open file %s', [FileName]);
try
Dest := FileCreate(Destination);
if Dest < 0 then
raise EFileError.CreateFmt('Can not create file %s', [Destination]);
try
Repeat
BytesCopied := FileRead(Source, CopyBuffer^, ChunkSize);
if BytesCopied > 0 then
FileWrite(Dest, CopyBuffer^, BytesCopied);
Until BytesCopied < ChunkSize;
finally
FileClose(Dest);
end;
finally
FileClose(Source);
end;
finally
FreeMem(CopyBuffer, ChunkSize);
end;
end;
procedure MoveFile(const FileName, DestName: String);
var Destination : String;
Attr : Integer;
begin
Destination := ExpandFileName(DestName);
if not RenameFile(FileName, Destination) then
begin
Attr := FileGetAttr(FileName);
if (Attr < 0) or (Attr and faReadOnly <> 0) then
raise EFileError.Create(Format('Can not move file %s', [FileName]));
CopyFile(FileName, Destination);
DeleteFile(FileName);
end;
end;
function DeleteFiles(const FileMask: String): Boolean;
var SRec : TSearchRec;
Path : String;
begin
Result := FindFirst(FileMask, faAnyFile, SRec) = 0;
if not Result then
exit;
try
Path := ExtractFilePath(FileMask);
Repeat
if (SRec.Name <> '') and (SRec.Name <> '.') and (SRec.Name <> '..') and
(SRec.Attr and (faVolumeID + faDirectory) = 0) then
begin
Result := DeleteFile(Path + SRec.Name);
if not Result then
break;
end;
Until FindNext(SRec) <> 0;
finally
FindClose(SRec);
end;
end;
{$IFDEF DELPHI6_UP}{$WARN SYMBOL_PLATFORM ON}{$ENDIF}
{$IFDEF OS_MSWIN}
{ }
{ Logical Drive functions }
{ }
function DriveIsValid(const Drive: Char): Boolean;
var D : Char;
begin
D := UpCase(Drive);
Result := D in ['A'..'Z'];
if not Result then
exit;
Result := IsBitSet(GetLogicalDrives, Ord(D) - Ord('A'));
end;
function DriveGetType(const Path: String): TLogicalDriveType;
begin
Case GetDriveType(PChar(Path)) of
DRIVE_REMOVABLE : Result := DriveRemovable;
DRIVE_FIXED : Result := DriveFixed;
DRIVE_REMOTE : Result := DriveRemote;
DRIVE_CDROM : Result := DriveCDRom;
DRIVE_RAMDISK : Result := DriveRamDisk;
else
Result := DriveTypeUnknown;
end;
end;
function DriveFreeSpace(const Path: String): Int64;
var D: Byte;
begin
if PathHasDriveLetter(Path) then
D := Ord(UpCase(PChar(Path)^)) - Ord('A') + 1 else
if PathIsUNCPath(Path) then
begin
Result := -1;
exit;
end else
D := 0;
Result := DiskFree(D);
end;
{$ENDIF}
{ }
{ Self-testing code }
{ }
{$ASSERTIONS ON}
procedure SelfTest;
begin
Assert(PathHasDriveLetter('C:'), 'PathHasDriveLetter');
Assert(PathHasDriveLetter('C:\'), 'PathHasDriveLetter');
Assert(not PathHasDriveLetter('\C\'), 'PathHasDriveLetter');
Assert(not PathHasDriveLetter('::'), 'PathHasDriveLetter');
Assert(PathIsAbsolute('\'), 'PathIsAbsolute');
Assert(PathIsAbsolute('\C'), 'PathIsAbsolute');
Assert(PathIsAbsolute('\C\'), 'PathIsAbsolute');
Assert(PathIsAbsolute('C:\'), 'PathIsAbsolute');
Assert(PathIsAbsolute('C:'), 'PathIsAbsolute');
Assert(PathIsAbsolute('\C\..\'), 'PathIsAbsolute');
Assert(not PathIsAbsolute(''), 'PathIsAbsolute');
Assert(not PathIsAbsolute('C'), 'PathIsAbsolute');
Assert(not PathIsAbsolute('C\'), 'PathIsAbsolute');
Assert(not PathIsAbsolute('C\D'), 'PathIsAbsolute');
Assert(not PathIsAbsolute('C\D\'), 'PathIsAbsolute');
Assert(not PathIsAbsolute('..\'), 'PathIsAbsolute');
Assert(PathIsDirectory('\'), 'PathIsDirectory');
Assert(PathIsDirectory('\C\'), 'PathIsDirectory');
Assert(PathIsDirectory('C:'), 'PathIsDirectory');
Assert(PathIsDirectory('C:\'), 'PathIsDirectory');
Assert(PathIsDirectory('C:\D\'), 'PathIsDirectory');
Assert(not PathIsDirectory(''), 'PathIsDirectory');
Assert(not PathIsDirectory('D'), 'PathIsDirectory');
Assert(not PathIsDirectory('C\D'), 'PathIsDirectory');
Assert(PathInclSuffix('', '\') = '', 'PathInclSuffix');
Assert(PathInclSuffix('C', '\') = 'C\', 'PathInclSuffix');
Assert(PathInclSuffix('C\', '\') = 'C\', 'PathInclSuffix');
Assert(PathInclSuffix('C\D', '\') = 'C\D\', 'PathInclSuffix');
Assert(PathInclSuffix('C\D\', '\') = 'C\D\', 'PathInclSuffix');
Assert(PathInclSuffix('C:', '\') = 'C:\', 'PathInclSuffix');
Assert(PathInclSuffix('C:\', '\') = 'C:\', 'PathInclSuffix');
Assert(PathExclSuffix('', '\') = '', 'PathExclSuffix');
Assert(PathExclSuffix('C', '\') = 'C', 'PathExclSuffix');
Assert(PathExclSuffix('C\', '\') = 'C', 'PathExclSuffix');
Assert(PathExclSuffix('C\D', '\') = 'C\D', 'PathExclSuffix');
Assert(PathExclSuffix('C\D\', '\') = 'C\D', 'PathExclSuffix');
Assert(PathExclSuffix('C:', '\') = 'C:', 'PathExclSuffix');
Assert(PathExclSuffix('C:\', '\') = 'C:', 'PathExclSuffix');
Assert(PathCanonical('', '\') = '', 'PathCanonical');
Assert(PathCanonical('.', '\') = '', 'PathCanonical');
Assert(PathCanonical('.\', '\') = '', 'PathCanonical');
Assert(PathCanonical('..\', '\') = '..\', 'PathCanonical');
Assert(PathCanonical('\..\', '\') = '\', 'PathCanonical');
Assert(PathCanonical('\X\..\..\', '\') = '\', 'PathCanonical');
Assert(PathCanonical('\..', '\') = '', 'PathCanonical');
Assert(PathCanonical('X', '\') = 'X', 'PathCanonical');
Assert(PathCanonical('\X', '\') = '\X', 'PathCanonical');
Assert(PathCanonical('X.', '\') = 'X', 'PathCanonical');
Assert(PathCanonical('.', '\') = '', 'PathCanonical');
Assert(PathCanonical('\X.', '\') = '\X', 'PathCanonical');
Assert(PathCanonical('\X.Y', '\') = '\X.Y', 'PathCanonical');
Assert(PathCanonical('\X.Y\', '\') = '\X.Y\', 'PathCanonical');
Assert(PathCanonical('\A\X..Y\', '\') = '\A\X..Y\', 'PathCanonical');
Assert(PathCanonical('\A\.Y\', '\') = '\A\.Y\', 'PathCanonical');
Assert(PathCanonical('\A\..Y\', '\') = '\A\..Y\', 'PathCanonical');
Assert(PathCanonical('\A\Y..\', '\') = '\A\Y..\', 'PathCanonical');
Assert(PathCanonical('\A\Y..', '\') = '\A\Y..', 'PathCanonical');
Assert(PathCanonical('X', '\') = 'X', 'PathCanonical');
Assert(PathCanonical('X\', '\') = 'X\', 'PathCanonical');
Assert(PathCanonical('X\Y\..', '\') = 'X', 'PathCanonical');
Assert(PathCanonical('X\Y\..\', '\') = 'X\', 'PathCanonical');
Assert(PathCanonical('\X\Y\..', '\') = '\X', 'PathCanonical');
Assert(PathCanonical('\X\Y\..\', '\') = '\X\', 'PathCanonical');
Assert(PathCanonical('\X\Y\..\..', '\') = '', 'PathCanonical');
Assert(PathCanonical('\X\Y\..\..\', '\') = '\', 'PathCanonical');
Assert(PathCanonical('\A\.\.\X\.\Y\..\.\..\.\', '\') = '\A\', 'PathCanonical');
Assert(PathCanonical('C:', '\') = 'C:', 'PathCanonical');
Assert(PathCanonical('C:\', '\') = 'C:\', 'PathCanonical');
Assert(PathCanonical('C:\A\..', '\') = 'C:', 'PathCanonical');
Assert(PathCanonical('C:\A\..\', '\') = 'C:\', 'PathCanonical');
Assert(PathCanonical('C:\..\', '\') = 'C:\', 'PathCanonical');
Assert(PathCanonical('C:\..', '\') = 'C:', 'PathCanonical');
Assert(PathCanonical('C:\A\..\..', '\') = 'C:', 'PathCanonical');
Assert(PathCanonical('C:\A\..\..\', '\') = 'C:\', 'PathCanonical');
Assert(PathCanonical('\A\B\..\C\D\..\', '\') = '\A\C\', 'PathCanonical');
Assert(PathCanonical('\A\B\..\C\D\..\..\', '\') = '\A\', 'PathCanonical');
Assert(PathCanonical('\A\B\..\C\D\..\..\..\', '\') = '\', 'PathCanonical');
Assert(PathCanonical('\A\B\..\C\D\..\..\..\..\', '\') = '\', 'PathCanonical');
Assert(PathExpand('', '', '\') = '', 'PathExpand');
Assert(PathExpand('', '\', '\') = '\', 'PathExpand');
Assert(PathExpand('', '\C', '\') = '\C', 'PathExpand');
Assert(PathExpand('', '\C\', '\') = '\C\', 'PathExpand');
Assert(PathExpand('..\', '\C\', '\') = '\', 'PathExpand');
Assert(PathExpand('..', '\C\', '\') = '', 'PathExpand');
Assert(PathExpand('\..', '\C\', '\') = '', 'PathExpand');
Assert(PathExpand('\..\', '\C\', '\') = '\', 'PathExpand');
Assert(PathExpand('A', '..\', '\') = '..\A', 'PathExpand');
Assert(PathExpand('..\', '..\', '\') = '..\..\', 'PathExpand');
Assert(PathExpand('\', '', '\') = '\', 'PathExpand');
Assert(PathExpand('\', '\C', '\') = '\', 'PathExpand');
Assert(PathExpand('\A', '\C\', '\') = '\A', 'PathExpand');
Assert(PathExpand('\A\', '\C\', '\') = '\A\', 'PathExpand');
Assert(PathExpand('\A\B', '\C', '\') = '\A\B', 'PathExpand');
Assert(PathExpand('A\B', '\C', '\') = '\C\A\B', 'PathExpand');
Assert(PathExpand('A\B', '\C', '\') = '\C\A\B', 'PathExpand');
Assert(PathExpand('A\B', '\C\', '\') = '\C\A\B', 'PathExpand');
Assert(PathExpand('A\B', '\C\', '\') = '\C\A\B', 'PathExpand');
Assert(PathExpand('A\B', 'C\D', '\') = 'C\D\A\B', 'PathExpand');
Assert(PathExpand('..\A\B', 'C\D', '\') = 'C\A\B', 'PathExpand');
Assert(PathExpand('..\A\B', '\C\D', '\') = '\C\A\B', 'PathExpand');
Assert(PathExpand('..\..\A\B', 'C\D', '\') = 'A\B', 'PathExpand');
Assert(PathExpand('..\..\A\B', '\C\D', '\') = '\A\B', 'PathExpand');
Assert(PathExpand('..\..\..\A\B', '\C\D', '\') = '\A\B', 'PathExpand');
Assert(PathExpand('\..\A\B', '\C\D', '\') = '\A\B', 'PathExpand');
Assert(PathExpand('..\A\B', '\..\C\D', '\') = '\C\A\B', 'PathExpand');
Assert(PathExpand('..\A\B', '..\C\D', '\') = '..\C\A\B', 'PathExpand');
Assert(PathExpand('..\A\B', 'C:\C\D', '\') = 'C:\C\A\B', 'PathExpand');
Assert(PathExpand('..\A\B\', 'C:\C\D', '\') = 'C:\C\A\B\', 'PathExpand');
Assert(FilePath('C', '..\X\Y', 'A\B', '\') = 'A\X\Y\C', 'FilePath');
Assert(FilePath('C', '\X\Y', 'A\B', '\') = '\X\Y\C', 'FilePath');
Assert(FilePath('C', '', 'A\B', '\') = 'A\B\C', 'FilePath');
Assert(FilePath('', '\X\Y', 'A\B', '\') = '', 'FilePath');
Assert(FilePath('C', 'X\Y', 'A\B', '\') = 'A\B\X\Y\C', 'FilePath');
Assert(FilePath('C', 'X\Y', '', '\') = 'X\Y\C', 'FilePath');
Assert(DirectoryExpand('', '', '\') = '', 'DirectoryExpand');
Assert(DirectoryExpand('', '\X', '\') = '\X\', 'DirectoryExpand');
Assert(DirectoryExpand('\', '\X', '\') = '\', 'DirectoryExpand');
Assert(DirectoryExpand('\A', '\X', '\') = '\A\', 'DirectoryExpand');
Assert(DirectoryExpand('\A\', '\X', '\') = '\A\', 'DirectoryExpand');
Assert(DirectoryExpand('\A\B', '\X', '\') = '\A\B\', 'DirectoryExpand');
Assert(DirectoryExpand('A', '\X', '\') = '\X\A\', 'DirectoryExpand');
Assert(DirectoryExpand('A\', '\X', '\') = '\X\A\', 'DirectoryExpand');
Assert(DirectoryExpand('C:', '\X', '\') = 'C:\', 'DirectoryExpand');
Assert(DirectoryExpand('C:\', '\X', '\') = 'C:\', 'DirectoryExpand');
Assert(UnixPathToWinPath('/c/d.f') = '\c\d.f', 'UnixPathToWinPath');
Assert(WinPathToUnixPath('\c\d.f') = '/c/d.f', 'WinPathToUnixPath');
end;
end.
|
{*********************************************}
{ TeeBI Software Library }
{ Base abstract Algorithm class }
{ Copyright (c) 2015-2016 by Steema Software }
{ All Rights Reserved }
{*********************************************}
unit BI.Algorithm;
interface
uses
System.Classes, BI.DataItem, BI.Arrays.Strings;
type
// Just a set of TDataKind
TDataKinds=set of TDataKind;
// "Numeric" set constant with all TDataKind that correspond to numbers
TDataKindsHelper=record helper for TDataKinds
public
const
Numeric:TDataKinds=[dkInt32,dkInt64,dkSingle,dkDouble,dkExtended,dkDateTime];
end;
TQuantityStyle=(Exact, Minimum, Maximum);
// Describes an input parameter for algorithms
TAlgorithmNeed=record
private
function AnyDataNot(const AData:TDataItem):Boolean;
class procedure DoError(const AMessage:String; const Args:Array of Const); static;
public
Data : TDataArray;
Kinds : TDataKinds;
Name : String;
Quantity : Integer;
Style : TQuantityStyle;
Constructor Create(const AName:String;
const AStyle:TQuantityStyle;
const AQuantity:Integer;
const AKinds:TDataKinds=[]);
procedure CheckData;
function First:TDataItem;
function Verify(const Silent:Boolean=False):Boolean;
end;
// Describes all the input parameters an algorithm requires
TAlgorithmNeeds=Array of TAlgorithmNeed;
TAlgorithmNeedsHelper=record helper for TAlgorithmNeeds
public
procedure Add(const ANeed:TAlgorithmNeed);
function AnyNeedNot(const AData:TDataItem):Boolean;
procedure Clear; inline;
function Count:Integer; inline;
function Verify(const Silent:Boolean=False):Boolean;
end;
TDataOrigins=Array of TStringArray;
TDataProviderNeeds=class(TDataProvider)
protected
IParent : TDataItem;
IOrigins : TDataOrigins;
procedure TryFixOrigins;
public
Needs : TAlgorithmNeeds;
end;
// Base class for all algorithms
TBaseAlgorithm=class(TDataProviderNeeds)
protected
procedure AddOutput(const AData:TDataItem); virtual;
procedure Load(const AData: TDataItem; const Children: Boolean); override;
public
procedure Calculate; virtual; abstract;
end;
TBaseAlgorithmClass=class of TBaseAlgorithm;
// Simple helper class that defines a single "needed" data item
TSingleSourceProvider=class(TDataProviderNeeds)
private
function GetSource: TDataItem;
procedure TryRemoveNotify;
protected
procedure ClearSource; virtual;
procedure Notify(const AEvent:TBIEvent);
procedure SetSource(const Value: TDataItem); virtual;
public
Constructor Create(AOwner: TComponent); override;
Destructor Destroy; override;
property Source:TDataItem read GetSource write SetSource;
end;
// Special provider that creates a clone copy of its single source data
TCloneProvider=class(TSingleSourceProvider)
protected
procedure Load(const AData:TDataItem; const Children:Boolean); override;
end;
implementation
|
unit BCHELP;
interface
procedure ShowCommands;
implementation
uses Dos, Crt;
procedure ShowCommands;
procedure Pause;
var
C: Char;
begin
Write ('-- More --');
C := ReadKey;
if C = #0 then C := ReadKey;
WriteLn;
end;
begin
WriteLn;
WriteLn ('DOS commands:');
WriteLn;
WriteLn ('BREAK [on | off] Turn BREAK on or off.');
WriteLn ('CALL ... Run a batch file and return to your program.');
WriteLn ('CD/CHDIR ... Change directory.');
WriteLn ('CLS Clear the screen or the current window.');
WriteLn ('COMMAND [/c ...] Run COMMAND.COM.');
WriteLn ('COPY ... Copy file(s) (COPY is handled by COMMAND.COM).');
WriteLn ('DEL/ERASE ... Delete file(s).');
WriteLn ('DIR [/p][/w] Show a list of files in a directory.');
WriteLn ('ECHO ... Write text to the screen.');
WriteLn ('EXIT Exit program and return to DOS.');
WriteLn ('FOR %%C in (list) Set the variable %%C to all items of list and');
WriteLn (' do ... perform a command.');
WriteLn ('GOTO label Go to another line in the batch file');
WriteLn (' (a label is any word after a colon ":").');
WriteLn ('IF [NOT] EXIST ... If the file exists, then ...');
WriteLn ('IF ERRORLEVEL x ... If the ERRORLEVEL is x or below x, then ...');
WriteLn ('IF ... == ... If the two strings are equal, then ...');
WriteLn ('MD/MKDIR ... Create a new directory.');
WriteLn ('PATH ... Set or show the PATH.');
WriteLn ('PAUSE [...] Wait for a keystroke.');
WriteLn;
Pause;
WriteLn;
WriteLn ('PROMPT ... Change the DOS prompt.');
WriteLn ('REM ... Remark (Note: The first remark is placed at the');
WriteLn (' beginning of the .COM program, so it is displayed');
WriteLn (' when you TYPE the program).');
WriteLn ('RD/RMDIR ... Remove a directory.');
WriteLn ('REN/RENAME ... Rename a file or a group of files.');
WriteLn ('SET [var=[value]] Set an environment variable (Note: All variables');
WriteLn (' are restored after running the program).');
WriteLn ('SHIFT Move all parameters (%1, %2, ..) one place back.');
WriteLn ('TYPE ... Show the contents of a file.');
WriteLn ('VER Show the current DOS version.');
WriteLn ('VERIFY [on | off] Set VERIFY on or off.');
WriteLn ('VOL ... Show the volume of a drive.');
WriteLn;
WriteLn ('Special characters (for the commands ECHO, PAUSE, IF and SET):');
WriteLn;
WriteLn ('$g ">" $q "=" $s <Space>');
WriteLn ('$l "<" $h <BackSpace> $e <Esc>');
WriteLn ('$b "|" $_ <CR/LF> $$ "$"');
WriteLn ('$(n) ASCII number');
WriteLn;
WriteLn ('"$" at the end of a line: No <CR>.');
WriteLn;
Pause;
WriteLn;
WriteLn ('Variables:');
WriteLn;
WriteLn ('Besides the environment variables you may also define up to 100');
WriteLn ('32-bit variables to work with numbers. You can set these variables to');
WriteLn ('integer numbers in the range -2147483648...+2147483647.');
WriteLn;
WriteLn ('Variable commands:');
WriteLn;
WriteLn ('VAR varname [=number] Define a new variable (if no number is specified');
WriteLn (' the variable is set to 0).');
WriteLn ('LET var = number Set the variable to a new value.');
WriteLn ('LET var1 = var2 Copy the value of var2 into var1.');
WriteLn ('LET var = %1 If %1 is not a valid number, the ERRORLEVEL is set');
WriteLn (' to the position of the error.');
WriteLn ('LET var = ERRORLEVEL Sets var to the current errorlevel.');
WriteLn ('ADD var, x Add the value of x to var.');
WriteLn ('SUB var, x Subtract the value of x from var.');
WriteLn ('NEG var Change the sign of var (+/-).');
WriteLn ('ABS var If var < 0 then the sign is changed.');
WriteLn ('MUL var, x Multiply var with x.');
WriteLn ('DIV var, x Integer division.');
WriteLn;
WriteLn;
Pause;
WriteLn;
WriteLn ('Writing variable numbers:');
WriteLn;
WriteLn ('ECHO ... %VAR% ... Show the number of VAR (decimal).');
WriteLn ('ECHO %VAR:10% Use 10 spaces for the number (like this: " 123").');
WriteLn ('ECHO %VAR:-10% Spaces after the number ("123 ").');
WriteLn ('ECHO %VAR:010% Use "0" instead of spaces ("0000000123").');
WriteLn ('ECHO %VAR:b% Show the binary value ("1111011").');
WriteLn ('ECHO %VAR:X% Show the hexadecimal value ("7B").');
WriteLn ('ECHO %VAR:x% The same, but use lowercase letters ("7b").');
WriteLn ('ECHO %VAR:o% Show the octal value (173).');
WriteLn;
WriteLn ('Comparing variables:');
WriteLn;
WriteLn ('IF %var1% = %var2% ... If the two variables are the same then ...');
WriteLn ('IF %var1% <> %var2% .. If the variables are different then ...');
WriteLn ('IF %var1% > %var2% ... If var1 is larger than var2 then ...');
WriteLn ('IF %var1% < %var2% ... If var1 is smaller than var2 then ...');
WriteLn ('IF %var1% >= %var2% .. If var1 is larger than or equal to var2 then ...');
WriteLn ('IF %var1% <= %var2% .. If var1 is smaller than or equal to var2 then ...');
WriteLn;
WriteLn ('- You may always insert the word NOT to reverse the condition.');
WriteLn ('- If you compare strings with <, >, <= or >=, first the length is compared.');
WriteLn;
Pause;
WriteLn;
WriteLn ('GOSUB and RETURN:');
WriteLn;
WriteLn ('You can create subroutines in your programs by using these commands.');
WriteLn ('Example:');
WriteLn;
WriteLn (' GoTo Start');
WriteLn (' :Proc1');
WriteLn (' ...');
WriteLn (' Return');
WriteLn (' :Start');
WriteLn (' ...');
WriteLn (' GoSub Proc1');
WriteLn (' ...');
WriteLn (' GoSub Proc1');
WriteLn;
WriteLn;
WriteLn ('You can run the same procedure as often as you like without having to');
WriteLn ('write it again.');
WriteLn;
WriteLn ('NOTE: Never go to a subroutine using the GOTO command.');
WriteLn (' RETURN without GOSUB could cause the system to crach.');
WriteLn;
WriteLn;
Pause;
WriteLn;
WriteLn ('Other commands:');
WriteLn;
WriteLn ('CRT After this command all the output to screen is written');
WriteLn (' directly to the video buffer.');
WriteLn ('DOS Use DOS routines to handle output to screen.');
WriteLn ('SETCOLOR n Change the attribute. Only if CRT procedures are installed.');
WriteLn (' (valid attributes are 0..255 or $00..$FF)');
WriteLn ('MOVETO x, y Change the position of the cursor.');
WriteLn ('SETWINDOW x1, Define a window (Use this command before CLS, FILLWINDOW,');
WriteLn (' y1, x2, y2 FRAMEWIN, MENU, SCROLL). Default: 1, 1, 80, 25.');
WriteLn ('SCROLL n Scroll the current window n lines up (or down: n < 0).');
WriteLn ('FRAMEWINDOW Draw a frame in the current window. Chars is either');
WriteLn (' chars, title DOUBLEFRAME or SINGLEFRAME or the characters to be used');
WriteLn (' in the frame, eg. ÉÍ»ººÈͼ. Title is any text.');
WriteLn ('FILLWINDOW n Fills the window with one character (n = 0..255)');
WriteLn ('CHECKANSI Set the errorlevel to 1 if ANSI.SYS is installed.');
WriteLn ('GETSCREEN Save the contents of the entire screen in memory.');
WriteLn ('PUTSCREEN Restores the last screen saved by GETSCREEN or LOADSCREEN');
WriteLn ('SAVESCREEN file Save a screen to the disk.');
WriteLn ('LOADSCREEN file Load a screen from the disk into memory (use PUTSCREEN to');
WriteLn (' display it).');
WriteLn ('COUNTPARAMS Set the errorlevel to the number of parameters.');
WriteLn;
Pause;
WriteLn;
WriteLn ('Menus:');
WriteLn;
WriteLn ('MENU [c1,] [c2,] [c3,] "[" ~O~ption1 "/" O~p~tion2 [/...] "]" [";"]');
WriteLn;
WriteLn (' c1 Attribute of highlighted bar.');
WriteLn (' c2 Attribute of hot keys.');
WriteLn (' c3 Attribute of hot key in highlighted bar.');
WriteLn (' ~X~ Hot key.');
WriteLn (' ";" Return if the user presses <-- or --> (errorlevel 254, 255).');
WriteLn;
WriteLn ('If the user presses a hot key or <Enter>, the errorlevel will be set to the');
WriteLn ('number of the option. If <Esc> is pressed the errorlevel is set to 0.');
WriteLn ('Example:');
WriteLn;
WriteLn (' Cls');
WriteLn (' SetWindow 10, 5, 20, 9');
WriteLn (' FrameWindow SingleFrame, Menu ');
WriteLn (' SetWindow 11, 6, 19, 8');
WriteLn (' Menu $70, $0F, $70, [ ~E~dit / ~R~un / ~Q~uit ]');
WriteLn (' if ErrorLevel 3 GoTo Quit');
WriteLn (' if ErrorLevel 2 GoTo Run');
WriteLn (' ...');
WriteLn;
Pause;
WriteLn;
WriteLn ('Keyboard commands:');
WriteLn;
WriteLn ('ASK ["prompt"], keylist Set the errorlevel to the position in the list.');
WriteLn ('ASKYN ["prompt"] Yes: errorlevel = 1, No errorlevel = 0.');
WriteLn ('GETKEY Set the errorlevel to the ASCII value of a');
WriteLn (' keystroke.');
WriteLn ('GETKBFLAGS Set the errorlevel to the keyboard flags byte.');
WriteLn ('SETKBFLAGS <var> Change the keyboard flags.');
WriteLn ('SETBIT n <var> Set bit n of <var> to 1.');
WriteLn ('RESETBIT n <var> Set bit n of <var> to 0.');
WriteLn ('GETBIT n <var> Set the errorlevel to the value of bit n of <var>.');
WriteLn;
WriteLn ('Keyboard flag bits:');
WriteLn;
WriteLn ('76543210');
WriteLn ('.......1 Right Shift key pressed');
WriteLn ('......1. Left Shift key pressed');
WriteLn ('.....1.. Ctrl key pressed');
WriteLn ('....1... Alt key pressed');
WriteLn ('...1.... ScrollLock on');
WriteLn ('..1..... NumLock on');
WriteLn ('.1...... CapsLock on');
WriteLn ('1....... Insert mode on');
WriteLn;
Pause;
WriteLn;
WriteLn ('INPUT <Env-var> Input any environment variable (from the keyboard).');
WriteLn ('GETX <var> Store the cursor position in a variable.');
WriteLn ('GETY <var> Store the cursor line in a variable.');
WriteLn ('GETCURSOR <var> Store the cursor size in a variable.');
WriteLn ('SETCURSOR <var> Set the size of the cursor (Default $0B0C,');
WriteLn (' Block cursor: $001F, No cursor: $1F00).');
WriteLn ('DISKFREE <var> Get the free space on a disk into a variable.');
WriteLn ('UPPERCASE <env-var> Change all letters in a variable to capitals.');
WriteLn ('LOWERCASE <env-var> Change the capitals into lowercase letters.');
WriteLn ('GETDRIVE <env-var> Set an environment variable to the current drive.');
WriteLn ('GETDIR <env-var> Set a variable to the current directory.');
WriteLn ('GETDAY <env-var> Set a variable to the day of the week.');
WriteLn ('GETDATE <env-var> Set a variable to the current date.');
WriteLn ('GETTIME <env-var> Set a variable to the current time.');
WriteLn ('GETLENGTH <env-var> Set the errorlevel to the length of the var.');
WriteLn ('CHECKERRORS ON|off if on the program will stop and ask the user.');
WriteLn (' wether to continue or not. If off, the');
WriteLn (' error number is stored in the ERRORLEVEL.');
WriteLn ('Example:');
WriteLn;
WriteLn (' CheckErrors OFF');
WriteLn (' ChDir %1');
WriteLn (' if ErrorLevel 1 Echo THERE IS NO DIRECTORY NAMED "%1".');
WriteLn;
Pause;
WriteLn;
WriteLn ('BEEP Make a short sound.');
WriteLn ('IF KEYPRESSED ... If the user has pressed any key on the keyboard then ...');
WriteLn ('GETRANDOM Set the errorlevel to a random number (0..255).');
WriteLn ('WRITECHAR n1 [,n2] Write 1 (or n2) character(s) with ASCII code n1.');
WriteLn ('INLINE n1, n2, ... Use machine language in your programs (Hex numbers only).');
WriteLn;
WriteLn ('Example:');
WriteLn;
WriteLn (' REM This will print the screen (int 5):');
WriteLn (' INLINE cd 05');
WriteLn;
WriteLn ('An INLINE procedure may destroy the values of the registers AX, BX, CX, DX,');
WriteLn ('SI, DI and BP. The other registers must be restored.');
WriteLn;
WriteLn ('There are two ways to run any program:');
WriteLn ('- Type only the name. A copy of COMMAND.COM is loaded and searches all');
WriteLn (' directories of the PATH for the program. If the program is not found,');
WriteLn (' you will get the message "Bad command or filename".');
WriteLn ('- Type the full pathname and extension ("C:\UTIL\BC.EXE"). Use this');
WriteLn (' method if you want to know what errorlevel is left by the program.');
WriteLn;
WriteLn (' -- e-mail: mike@wieringsoftware.nl --');
WriteLn;
Halt(0);
end;
end.
|
{*******************************************************}
{ }
{ Borland Delphi Visual Component Library }
{ }
{ Copyright (c) 1997-1999 Borland Software Corporation }
{ }
{*******************************************************}
unit IdZLibConst;
interface
{$I IdCompilerDefines.inc}
{$UNDEF STATICLOAD_ZLIB}
{$IFDEF DCC}
{$IFDEF WIN32}
{$IFNDEF BCB5_DUMMY_BUILD}
{$DEFINE STATICLOAD_ZLIB}
{$ENDIF}
{$ENDIF}
{$ENDIF}
{$IFNDEF STATICLOAD_ZLIB}
uses
IdException;
{$ENDIF}
resourcestring
sTargetBufferTooSmall = 'ZLib error: target buffer may be too small';
sInvalidStreamOp = 'Invalid stream operation';
sZLibError = 'ZLib Error (%d)';
{$IFNDEF STATICLOAD_ZLIB}
RSZLibCallError = 'Error on call to ZLib library function %s';
{$ENDIF}
implementation
end.
|
unit mCoverSheetDisplayPanel_CPRS_ProblemList;
{
================================================================================
*
* Application: Demo
* Developer: doma.user@domain.ext
* Site: Salt Lake City ISC
* Date: 2015-12-21
*
* Description: Problem List display panel for CPRS Coversheet.
*
* Notes:
*
================================================================================
}
interface
uses
Winapi.Windows,
Winapi.Messages,
System.SysUtils,
System.Variants,
System.Classes,
System.ImageList,
Vcl.Graphics,
Vcl.Controls,
Vcl.Forms,
Vcl.Dialogs,
Vcl.ExtCtrls,
Vcl.Menus,
Vcl.ImgList,
Vcl.ComCtrls,
Vcl.StdCtrls,
Vcl.Buttons,
iCoverSheetIntf,
mCoverSheetDisplayPanel_CPRS,
oDelimitedString;
type
TfraCoverSheetDisplayPanel_CPRS_ProblemList = class(TfraCoverSheetDisplayPanel_CPRS)
private
{ Private declarations }
protected
{ Overridden events - TfraCoverSheetDisplayPanel_CPRS }
procedure OnGetDetail(aRec: TDelimitedString; aResult: TStrings); override;
public
constructor Create(aOwner: TComponent); override;
end;
var
fraCoverSheetDisplayPanel_CPRS_ProblemList: TfraCoverSheetDisplayPanel_CPRS_ProblemList;
implementation
{$R *.dfm}
{ TfraCoverSheetDisplayPanel_CPRS_ProblemList }
uses
ORFn;
const
TX_INACTIVE_ICDCODE = 'The ICD-9-CM code for this problem is inactive.' + CRLF + CRLF +
'Please correct this code using the ''Problems'' tab.';
TC_INACTIVE_ICDCODE = 'Inactive ICD-9-CM code';
TX_INACTIVE_10DCODE = 'The ICD-10-CM code for this problem is inactive.' + CRLF + CRLF +
'Please correct this code using the ''Problems'' tab.';
TC_INACTIVE_10DCODE = 'Inactive ICD-10-CM code';
TX_INACTIVE_SCTCODE = 'The SNOMED CT code for this problem is inactive.' + CRLF + CRLF +
'Please correct this code using the ''Problems'' tab.';
TC_INACTIVE_SCTCODE = 'Inactive SNOMED CT code';
constructor TfraCoverSheetDisplayPanel_CPRS_ProblemList.Create(aOwner: TComponent);
begin
inherited;
AddColumn(0, 'Problem List');
CollapseColumns;
end;
procedure TfraCoverSheetDisplayPanel_CPRS_ProblemList.OnGetDetail(aRec: TDelimitedString; aResult: TStrings);
begin
if aRec.GetPieceEquals(13, '#') then
if aRec.GetPieceEquals(16, '10D') then
InfoBox(TX_INACTIVE_10DCODE, TC_INACTIVE_10DCODE, MB_ICONWARNING or MB_OK)
else
InfoBox(TX_INACTIVE_ICDCODE, TC_INACTIVE_ICDCODE, MB_ICONWARNING or MB_OK)
else if aRec.GetPieceEquals(13, '$') then
InfoBox(TX_INACTIVE_SCTCODE, TC_INACTIVE_SCTCODE, MB_ICONWARNING or MB_OK);
inherited;
end;
end.
|
unit constexpr_generic_1;
interface
implementation
function Sum<T>(a, b: T): T; pure;
begin
Result := a + b;
end;
var
VI: Int32;
VF: Float32;
VS: string;
procedure Test;
begin
VI := Sum<Int32>(1, 4);
VF := Sum<Float32>(1.1, 4.2);
VS := Sum<string>('AA', 'BBB');
end;
initialization
Test();
finalization
Assert(VI = 5);
Assert(VF = 5.3);
Assert(VS = 'AABBB');
end. |
{*****************************************************************************}
{
{ Pascal Binding for Qt Library
{
{ Copyright (c) 2000, 2001 Borland Software Corporation
{
{*****************************************************************************}
unit Qt;
interface
uses Types;
{$HPPEMIT '#ifdef __linux__'}
{$HPPEMIT '#ifdef CLX_USE_LIBQT'}
{$HPPEMIT '#pragma link "libqtintf-6.9-qt2.3.so"'}
{$HPPEMIT '#else'}
{$HPPEMIT '#pragma link "libborqt-6.9-qt2.3.so"'}
{$HPPEMIT '#endif'}
{$HPPEMIT '#endif'}
{$HPPEMIT '#ifdef _Windows'}
{$HPPEMIT '#pragma link "QtIntf70.lib"'}
{$HPPEMIT '#endif'}
{$MINENUMSIZE 4}
(*$HPPEMIT '#if defined(__WIN32__)'*)
(*$HPPEMIT '#define C_EXPORT extern "C" __declspec(dllexport)'*)
(*$HPPEMIT '#else'*)
(*$HPPEMIT '#define C_EXPORT extern "C"'*)
(*$HPPEMIT '#endif'*)
(*$HPPEMIT '#include <qtypes.h>'*)
(*$HPPEMIT '#include <Xlib.hpp>'*)
const
UIEffect_LeftScroll = $0001;
UIEffect_RightScroll = $0002;
UIEffect_UpScroll = $0004;
UIEffect_DownScroll = $0008;
type
PPByte = ^PByte;
PInteger = ^Integer;
PCardinal = ^Cardinal;
uint = Cardinal;
PSizePolicy = ^TSizePolicy;
TSizePolicy = packed record
Data: Word;
end;
PPointArray = ^TPointArray;
TPointArray = array of TPoint;
PIntArray = ^TIntArray;
{$EXTERNALSYM PIntArray}
TIntArray = array of Integer;
{$EXTERNALSYM TIntArray}
{$HPPEMIT 'typedef DynamicArray<int > TIntArray;'}
{$HPPEMIT 'typedef TIntArray *PIntArray;'}
WId = Cardinal;
PWId = ^WId;
WFlags = Integer;
HANDLE = type Integer;
{$EXTERNALSYM HANDLE}
{$IFDEF LINUX}
{$HPPEMIT 'typedef int HANDLE;'}
{$ENDIF}
{$IFDEF MSWINDOWS}
{ Message structure }
PMsg = ^tagMSG;
tagMSG = packed record
hwnd: LongWord;
message: Cardinal;
wParam: Longint;
lParam: Longint;
time: DWORD;
pt: TPoint;
end;
HCURSOR = type HANDLE;
{$IFDEF MSWINDOWS} {$EXTERNALSYM HCURSOR} {$ENDIF}
HPALETTE = type HANDLE;
{$IFDEF MSWINDOWS} {$EXTERNALSYM HPALETTE} {$ENDIF}
HFONT = type HANDLE;
{$IFDEF MSWINDOWS} {$EXTERNALSYM HFONT} {$ENDIF}
HDC = type HANDLE;
{$IFDEF MSWINDOWS} {$EXTERNALSYM HDC} {$ENDIF}
HBITMAP = type HANDLE;
{$IFDEF MSWINDOWS} {$EXTERNALSYM HBRUSH} {$ENDIF}
HBRUSH = type HANDLE;
{$IFDEF MSWINDOWS} {$EXTERNALSYM HPEN} {$ENDIF}
HPEN = type HANDLE;
{$IFDEF MSWINDOWS} {$EXTERNALSYM HBITMAP} {$ENDIF}
HRGN = type HANDLE;
{$IFDEF MSWINDOWS} {$EXTERNALSYM HRGN} {$ENDIF}
{$ENDIF}
QRgb = type Cardinal;
QRgbH = ^QRgb;
QCOORD = type Integer;
QHookH = TMethod;
const
NullHook: QHookH = (Code: nil; Data: nil);
type
QAsyncIOH = class(TObject) end;
QDataSinkH = class(QAsyncIOH) end;
QDataSourceH = class(QAsyncIOH) end;
QIODeviceSourceH = class(QDataSourceH) end;
QBitValH = class(TObject) end;
QCharH = class(TObject) end;
QCollectionH = class(TObject) end;
QGCacheH = class(QCollectionH) end;
QAsciiCacheH = class(QGCacheH) end;
QCacheH = class(QGCacheH) end;
QIntCacheH = class(QGCacheH) end;
QGDictH = class(QCollectionH) end;
QAsciiDict = class(QGDictH) end;
QDictH = class(QGDictH) end;
QIntDictH = class(QGDictH) end;
QPtrDictH = class(QGDictH) end;
QGListH = class(QCollectionH) end;
QListH = class(QGListH) end;
QWidgetListH = class(QListH) end;
QStrListH = class(QListH) end;
QStrIListH = class(QStrListH) end;
QQueueH = class(QGListH) end;
QStackH = class(QGListH) end;
QColorH = class(TObject) end;
QColorGroupH = class(TObject) end;
QConnectionH = class(TObject) end;
QCursorH = class(TObject) end;
QDataStreamH = class(TObject) end;
QDateH = class(TObject) end;
QDateTimeH = class(TObject) end;
QDirH = class(TObject) end;
QDropSiteH = class(TObject) end;
QFileInfoH = class(TObject) end;
QFocusDataH = class(TObject) end;
QFontH = class(TObject) end;
QFontDatabaseH = class(TObject) end;
QFontInfoH = class(TObject) end;
QFontMetricsH = class(TObject) end;
QGArrayH = class(TObject) end;
QArrayH = class(QGArrayH) end;
QPointArrayH = class(QArrayH) end;
QGCacheIteratorH = class(TObject) end;
QAsciiCacheIteratorH = class(QGCacheIteratorH) end;
QCacheIteratorH = class(QGCacheIteratorH) end;
QIntCacheIteratorH = class(QGCacheIteratorH) end;
QGDictIteratorH = class(TObject) end;
QAsciiDictIteratorH = class(QGDictIteratorH) end;
QDictIteratorH = class(QGDictIteratorH) end;
QIntDictIteratorH = class(QGDictIteratorH) end;
QPtrDictIteratorH = class(QGDictIteratorH) end;
QGLH = class(TObject) end;
QGLContextH = class(QGLH) end;
QGLFormatH = class(QGLH) end;
QGListIteratorH = class(TObject) end;
QListIteratorH = class(QGListIteratorH) end;
QIconDragItemH = class(TObject) end;
QIconSetH = class(TObject) end;
QImageH = class(TObject) end;
QImageConsumerH = class(TObject) end;
QImageDecoderH = class(TObject) end;
QImageFormatH = class(TObject) end;
QImageFormatTypeH = class(TObject) end;
QImageIOH = class(TObject) end;
QIODeviceH = class(TObject) end;
QBufferH = class(QIODeviceH) end;
QFileH = class(QIODeviceH) end;
QSocketDeviceH = class(QIODeviceH) end;
QClxIODeviceH = class(QIODeviceH) end;
QLayoutItemH = class(TObject) end;
QSpacerItemH = class(QLayoutItemH) end;
QWidgetItemH = class(QLayoutItemH) end;
QLayoutIteratorH = class(TObject) end;
QListBoxItemH = class(TObject) end;
QListBoxPixmapH = class(QListBoxItemH) end;
QListBoxTextH = class(QListBoxItemH) end;
QClxListBoxItemH = class(QListBoxTextH) end;
QListViewItemIteratorH = class(TObject) end;
QLNodeH = class(TObject) end;
QMapH = class(TObject) end;
QMapConstIteratorH = class(TObject) end;
QMapIteratorH = class(TObject) end;
QMenuDataH = class(TObject) end;
QMimeSourceH = class(TObject) end;
QClxMimeSourceH = class(QMimeSourceH) end;
QMimeSourceFactoryH = class(TObject) end;
QClxMimeSourceFactoryH = class(QMimeSourceFactoryH) end;
QMovieH = class(TObject) end;
QNPluginH = class(TObject) end;
QNPStreamH = class(TObject) end;
QPaintDeviceH = class(TObject) end;
QPictureH = class(QPaintDeviceH) end;
QPixmapH = class(QPaintDeviceH) end;
QBitmapH = class(QPixmapH) end;
QPrinterH = class(QPaintDeviceH) end;
QPaintDeviceMetricsH = class(TObject) end;
QPaletteH = class(TObject) end;
QPixmapCacheH = class(TObject) end;
QPointH = class(TObject) end;
QRangeControlH = class(TObject) end;
QRectH = class(TObject) end;
QRegExpH = class(TObject) end;
QRegionH = class(TObject) end;
QSharedH = class(TObject) end;
QGLayoutIteratorH = class(QSharedH) end;
QSimpleRichTextH = class(TObject) end;
QSizeH = class(TObject) end;
QSizePolicyH = class(TObject) end;
QSocketAddressH = class(TObject) end;
QStringH = class(TObject) end;
QConstStringH = class(QStringH) end;
QtH = class(TObject) end;
QBrushH = class(QtH) end;
QEventH = class(QtH) end;
QChildEventH = class(QEventH) end;
QCloseEventH = class(QEventH) end;
QCustomEventH = class(QEventH) end;
QDragLeaveEventH = class(QEventH) end;
QDragResponseEventH = class(QEventH) end;
QDropEventH = class(QEventH) end;
QDragMoveEventH = class(QDropEventH) end;
QDragEnterEventH = class(QDragMoveEventH) end;
QFocusEventH = class(QEventH) end;
QHideEventH = class(QEventH) end;
QKeyEventH = class(QEventH) end;
QMouseEventH = class(QEventH) end;
QMoveEventH = class(QEventH) end;
QPaintEventH = class(QEventH) end;
QResizeEventH = class(QEventH) end;
QShowEventH = class(QEventH) end;
QTimerEventH = class(QEventH) end;
QWheelEventH = class(QEventH) end;
QIconViewItemH = class(QtH) end;
QClxIconViewItemH = class(QIconViewItemH) end;
QListViewItemH = class(QtH) end;
QClxListViewItemH = class(QListViewItemH) end;
QCheckListItemH = class(QListViewItemH) end;
QClxCheckListItemH = class(QCheckListItemH) end;
QObjectH = class(QtH) end;
QAccelH = class(QObjectH) end;
QApplicationH = class(QObjectH) end;
QClxApplicationH = class(QApplicationH) end;
QXtApplicationH = class(QApplicationH) end;
QClipboardH = class(QObjectH) end;
QDataPumpH = class(QObjectH) end;
QDragObjectH = class(QObjectH) end;
QClxDragObjectH = class(QDragObjectH) end;
QIconDragH = class(QDragObjectH) end;
QImageDragH = class(QDragObjectH) end;
QStoredDragH = class(QDragObjectH) end;
QUriDragH = class(QStoredDragH) end;
QColorDragH = class(QStoredDragH) end;
QTextDragH = class(QDragObjectH) end;
QFileIconProviderH = class(QObjectH) end;
QClxFileIconProviderH = class(QObjectH) end;
QLayoutH = class(QObjectH) end;
QBoxLayoutH = class(QLayoutH) end;
QHBoxLayoutH = class(QBoxLayoutH) end;
QVBoxLayoutH = class(QBoxLayoutH) end;
QGridLayoutH = class(QLayoutH) end;
QNPInstanceH = class(QObjectH) end;
QServerSocketH = class(QObjectH) end;
QSessionManagerH = class(QObjectH) end;
QSignalH = class(QObjectH) end;
QSignalMapperH = class(QObjectH) end;
QSocketH = class(QObjectH) end;
QSocketNotifierH = class(QObjectH) end;
QStyleH = class(QObjectH) end;
QCommonStyleH = class(QStyleH) end;
QMotifStyleH = class(QCommonStyleH) end;
QCDEStyleH = class(QMotifStyleH) end;
QWindowsStyleH = class(QCommonStyleH) end;
QPlatinumStyleH = class(QWindowsStyleH) end;
QClxStyleH = class(QStyleH) end;
QStyleSheetH = class(QObjectH) end;
QTimerH = class(QObjectH) end;
QToolTipGroupH = class(QObjectH) end;
QTranslatorH = class(QObjectH) end;
QAppTranslatorH = class(QTranslatorH) end;
QValidatorH = class(QObjectH) end;
QDoubleValidatorH = class(QValidatorH) end;
QIntValidatorH = class(QValidatorH) end;
QWidgetH = class(QObjectH) end;
QButtonH = class(QWidgetH) end;
QCheckBoxH = class(QButtonH) end;
QPushButtonH = class(QButtonH) end;
QClxBitBtnH = class(QPushButtonH) end;
QRadioButtonH = class(QButtonH) end;
QToolButtonH = class(QButtonH) end;
QOpenWidgetH = class(QWidgetH);
QComboBoxH = class(QWidgetH) end;
QOpenComboBoxH = class(QComboBoxH) end;
QDialogH = class(QWidgetH) end;
QColorDialogH = class(QDialogH) end;
QFileDialogH = class(QDialogH) end;
QClxFileDialogH = class(QDialogH) end;
QFontDialogH = class(QDialogH) end;
QMessageBoxH = class(QDialogH) end;
QTabDialogH = class(QDialogH) end;
QWizardH = class(QDialogH) end;
QPrintDialogH = class(QDialogH) end;
QTranslatorDialogH = class(QDialogH) end;
QFrameH = class(QWidgetH) end;
QGroupBoxH = class(QFrameH) end;
QButtonGroupH = class(QGroupBoxH) end;
QHButtonGroupH = class(QButtonGroupH) end;
QVButtonGroupH = class(QButtonGroupH) end;
QHGroupBoxH = class(QGroupBoxH) end;
QVGroupBoxH = class(QGroupBoxH) end;
QHBoxH = class(QFrameH) end;
QVBoxH = class(QHBoxH) end;
QLCDNumberH = class(QFrameH) end;
QLabelH = class(QFrameH) end;
QMenuBarH = class(QFrameH) end;
QPopupMenuH = class(QFrameH) end;
QProgressBarH = class(QFrameH) end;
QScrollViewH = class(QFrameH) end;
QOpenScrollViewH = class(QScrollViewH) end;
QIconViewH = class(QScrollViewH) end;
QListBoxH = class(QScrollViewH) end;
QListViewH = class(QScrollViewH) end;
QTextViewH = class(QScrollViewH) end;
QTextEditH = class(QTextViewH) end;
QTextBrowserH = class(QTextViewH) end;
QSpinBoxH = class(QFrameH) end;
QClxSpinBoxH = class(QSpinBoxH) end;
QSplitterH = class(QFrameH) end;
QTableViewH = class(QFrameH) end;
QOpenTableViewH = class(QTableViewH) end;
QMultiLineEditH = class(QOpenTableViewH) end;
QOpenMultiLineEditH = class(QMultiLineEditH) end;
QWidgetStackH = class(QFrameH) end;
QGLWidgetH = class(QWidgetH) end;
QHeaderH = class(QWidgetH) end;
QLineEditH = class(QWidgetH) end;
QClxLineEditH = class(QLineEditH) end;
QRenameEditH = class(QLineEditH) end;
QMainWindowH = class(QWidgetH) end;
QNPWidgetH = class(QWidgetH) end;
QScrollBarH = class(QWidgetH) end;
QSemiModalH = class(QWidgetH) end;
QProgressDialogH = class(QSemiModalH) end;
QSizeGripH = class(QWidgetH) end;
QSliderH = class(QWidgetH) end;
QClxSliderH = class(QSliderH) end;
QStatusBarH = class(QWidgetH) end;
QTabBarH = class(QWidgetH) end;
QTabWidgetH = class(QWidgetH) end;
QToolBarH = class(QWidgetH) end;
QXtWidgetH = class(QWidgetH) end;
QWorkspaceH = class(QWidgetH) end;
QClxWorkspaceH = class(QWorkspaceH) end;
QPainterH = class(QtH) end;
QPenH = class(QtH) end;
QStyleSheetItemH = class(QtH) end;
QToolTipH = class(QtH) end;
QWhatsThisH = class(QtH) end;
QTabH = class(TObject) end;
QTextCodecH = class(TObject) end;
QTextDecoderH = class(TObject) end;
QTextEncoderH = class(TObject) end;
QTextStreamH = class(TObject) end;
QTextIStreamH = class(QTextStreamH) end;
QTextOStreamH = class(QTextStreamH) end;
QTimeH = class(TObject) end;
QTranslatorMessageH = class(TObject) end;
QValueListH = class(TObject) end;
QValueListConstIteratorH = class(TObject) end;
QValueListIteratorH = class(TObject) end;
QWMatrixH = class(TObject) end;
QWidgetMapperH = class(TObject) end;
QStringListH = class(TObject) end;
QOpenStringListH = class(QStringListH) end;
QFileInfoListH = class(TObject) end;
QBitArrayH = class(TObject) end;
QByteArrayH = class(TObject) end;
QMapPrivateBaseH = class(TObject) end;
QMapNodeBaseH = class(TObject) end;
QMenuItemH = class(TObject) end;
QMetaObjectH = class(TObject) end;
QObjectListH = class(TObject) end;
QTextNodeH = class(TObject) end;
QPNGImageWriterH = class(TObject) end;
QPNGImagePackerH = class(QPNGImageWriterH) end;
QFilePreviewH = class(TObject) end;
QClxFilePreviewH = class(TObject) end;
QImageTextKeyLangH = class(TObject) end;
QCustomMenuItemH = class(TObject) end;
QClxStyleHooksH = class(TObject) end;
QClxListBoxHooksH = class(TObject) end;
QClxListViewHooksH = class(TObject) end;
QClxIconViewHooksH = class(TObject) end;
QObject_hookH = class(TObject) end;
QClxWorkspace_hookH = class(QObject_hookH) end;
QAccel_hookH = class(QObject_hookH) end;
QToolTip_hookH = class(QObject_hookH) end;
QWidget_hookH = class(QObject_hookH) end;
QButton_hookH = class(QWidget_hookH) end;
QCheckBox_hookH = class(QButton_hookH) end;
QPushButton_hookH = class(QButton_hookH) end;
QRadioButton_hookH = class(QButton_hookH) end;
QToolButton_hookH = class(QButton_hookH) end;
QComboBox_hookH = class(QWidget_hookH) end;
QHeader_hookH = class(QWidget_hookH) end;
QLineEdit_hookH = class(QWidget_hookH) end;
QRenameEdit_hookH = class(QLineEdit_hookH) end;
QClxLineEdit_hookH = class(QWidget_hookH) end;
QMainWindow_hookH = class(QWidget_hookH) end;
QSlider_hookH = class(QWidget_hookH) end;
QTabBar_hookH = class(QWidget_hookH) end;
QSpinBox_hookH = class(QWidget_hookH) end;
QTabWidget_hookH = class(QWidget_hookH) end;
QFrame_hookH = class(QWidget_hookH) end;
QGroupBox_hookH = class(QFrame_hookH) end;
QButtonGroup_hookH = class(QGroupBox_hookH) end;
QHButtonGroup_hookH = class(QButtonGroup_hookH) end;
QVButtonGroup_hookH = class(QButtonGroup_hookH) end;
QHGroupBox_hookH = class(QGroupBox_hookH) end;
QVGroupBox_hookH = class(QGroupBox_hookH) end;
QGrid_hookH = class(QFrame_hookH) end;
QLCDNumber_hookH = class(QFrame_hookH) end;
QPopupMenu_hookH = class(QFrame_hookH) end;
QMenuBar_hookH = class(QFrame_hookH) end;
QWidgetStack_hookH = class(QFrame_hookH) end;
QTableView_hookH = class(QFrame_hookH) end;
QMultiLineEdit_hookH = class(QTableView_hookH) end;
QWellArray_hookH = class(QTableView_hookH) end;
QScrollView_hookH = class(QFrame_hookH) end;
QIconView_hookH = class(QScrollView_hookH) end;
QListBox_hookH = class(QScrollView_hookH) end;
QFileListBox_hookH = class(QListBox_hookH) end;
QListView_hookH = class(QScrollView_hookH) end;
QFileListView_hookH = class(QListView_hookH) end;
QTextView_hookH = class(QScrollView_hookH) end;
QTextEdit_hookH = class(QTextView_hookH) end;
QTextBrowser_hookH = class(QTextView_hookH) end;
QSplitter_hookH = class(QFrame_hookH) end;
QHBox_hookH = class(QFrame_hookH) end;
QVBox_hookH = class(QHBox_hookH) end;
QLabel_hookH = class(QFrame_hookH) end;
QProgressBar_hookH = class(QFrame_hookH) end;
QDialog_hookH = class(QWidget_hookH) end;
QFontDialog_hookH = class(QDialog_hookH) end;
QFileDialog_hookH = class(QDialog_hookH) end;
QClxFileDialog_hookH = class(QDialog_hookH) end;
QWizard_hookH = class(QDialog_hookH) end;
QMessageBox_hookH = class(QDialog_hookH) end;
QColorDialog_hookH = class(QDialog_hookH) end;
QSemiModal_hookH = class(QWidget_hookH) end;
QProgressDialog_hookH = class(QSemiModal_hookH) end;
QScrollBar_hookH = class(QWidget_hookH) end;
QSizeGrip_hookH = class(QWidget_hookH) end;
QStatusBar_hookH = class(QWidget_hookH) end;
QToolBar_hookH = class(QWidget_hookH) end;
QWorkspace_hookH = class(QWidget_hookH) end;
QTimer_hookH = class(QObject_hookH) end;
QSocketNotifier_hookH = class(QObject_hookH) end;
QIODevice_hookH = class(QObject_hookH);
QSocket_hookH = class(QIODevice_hookH) end;
QSignalMapper_hookH = class(QObject_hookH) end;
QListViewItem_hookH = class(QObject_hookH) end;
QCheckListItem_hookH = class(QListViewItem_hookH) end;
QClipboard_hookH = class(QObject_hookH) end;
QApplication_hookH = class(QObject_hookH) end;
QToolTipGroup_hookH = class(QObject_hookH) end;
QSenderObject_hookH = class(QObject_hookH) end;
QEvent_hookH = class(QObject_hookH) end;
QTimerEvent_hookH = class(QEvent_hookH) end;
QMouseEvent_hookH = class(QEvent_hookH) end;
QWheelEvent_hookH = class(QEvent_hookH) end;
QKeyEvent_hookH = class(QEvent_hookH) end;
QFocusEvent_hookH = class(QEvent_hookH) end;
QPaintEvent_hookH = class(QEvent_hookH) end;
QMoveEvent_hookH = class(QEvent_hookH) end;
QResizeEvent_hookH = class(QEvent_hookH) end;
QCloseEvent_hookH = class(QEvent_hookH) end;
QShowEvent_hookH = class(QEvent_hookH) end;
QHideEvent_hookH = class(QEvent_hookH) end;
QDropEvent_hookH = class(QEvent_hookH) end;
QDragMoveEvent_hookH = class(QEvent_hookH) end;
QDragEnterEvent_hookH = class(QEvent_hookH) end;
QDragResponseEvent_hookH = class(QEvent_hookH) end;
QDragLeaveEvent_hookH = class(QEvent_hookH) end;
QChildEvent_hookH = class(QEvent_hookH) end;
QCustomEvent_hookH = class(QEvent_hookH) end;
QFileIconProvider_hookH = class(QObject_hookH) end;
QClxFileIconProvider_hookH = class(QObject_hookH) end;
QStyle_hookH = class(QObject_hookH) end;
QCommonStyle_hookH = class(QStyle_hookH) end;
QMotifStyle_hookH = class(QObject_hookH) end;
QCDEStyle_hookH = class(QMotifStyle_hookH) end;
QWindowsStyle_hookH = class(QCommonStyle_hookH) end;
QPlatinumStyle_hookH = class(QWindowsStyle_hookH) end;
QStyleSheetItem_hookH = class(QObject_hookH) end;
QStyleSheet_hookH = class(QObject_hookH) end;
QTranslator_hookH = class(QObject_hookH) end;
QValidator_hookH = class(QObject_hookH) end;
QIntValidator_hookH = class(QValidator_hookH) end;
QDoubleValidator_hookH = class(QValidator_hookH) end;
QBrush_hookH = class(QObject_hookH) end;
QPainter_hookH = class(QObject_hookH) end;
QPen_hookH = class(QObject_hookH) end;
QSignal_hookH = class(QObject_hookH) end;
QWhatsThis_hookH = class(QObject_hookH) end;
QIconViewItem_hookH = class(QObject_hookH) end;
QDragObject_hookH = class(QObject_hookH) end;
QIconDrag_hookH = class(QObject_hookH) end;
QStoredDrag_hookH = class(QDragObject_hookH) end;
QColorDrag_hookH = class(QDragObject_hookH) end;
QUriDrag_hookH = class(QStoredDrag_hookH) end;
QTextDrag_hookH = class(QDragObject_hookH) end;
QImageDrag_hookH = class(QDragObject_hookH) end;
QMovie_hookH = class(TObject) end;
QMapNodeBaseHH = ^QMapNodeBaseH;
QMenuDataHH = ^QMenuDataH;
PDisplay = Pointer;
_NPStream = Pointer;
_NPStreamP = ^_NPStream;
QPropertyH = Pointer;
QSenderObjectH = Pointer;
QMessageBoxButton = (NoButton = 0,
Ok = 1,
Cancel = 2,
Yes = 3,
No = 4,
Abort = 5,
Retry = 6,
Ignore = 7,
ButtonMask = $07,
Default = $100,
Escape = $200,
FlagMask = $300);
{$IFDEF LINUX}
type
TLoadThemeHook = function: Pointer;
var
LoadThemeHook: TLoadThemeHook = nil;
{$ENDIF}
{$HPPEMIT '#if defined(__WIN32__)'}
{$HPPEMIT 'typedef __stdcall int ( *TWndProcHook) (MSG * );'}
{$HPPEMIT '#else'}
{$HPPEMIT 'typedef bool ( *X11EventFilter) (XEvent * );'}
{$HPPEMIT '#endif'}
procedure Qt_hook_hook_events(handle: QObject_hookH; hook: QHookH); cdecl;
type
QWidgetBackgroundMode = ( QWidgetBackgroundMode_FixedColor, QWidgetBackgroundMode_FixedPixmap, QWidgetBackgroundMode_NoBackground, QWidgetBackgroundMode_PaletteForeground, QWidgetBackgroundMode_PaletteButton, QWidgetBackgroundMode_PaletteLight, QWidgetBackgroundMode_PaletteMidlight, QWidgetBackgroundMode_PaletteDark, QWidgetBackgroundMode_PaletteMid, QWidgetBackgroundMode_PaletteText, QWidgetBackgroundMode_PaletteBrightText, QWidgetBackgroundMode_PaletteBase, QWidgetBackgroundMode_PaletteBackground, QWidgetBackgroundMode_PaletteShadow, QWidgetBackgroundMode_PaletteHighlight, QWidgetBackgroundMode_PaletteHighlightedText, QWidgetBackgroundMode_PaletteButtonText, QWidgetBackgroundMode_X11ParentRelative );
type
QWidgetBackgroundOrigin = ( QWidgetBackgroundOrigin_WidgetOrigin, QWidgetBackgroundOrigin_ParentOrigin );
type
QWidgetPropagationMode = (
QWidgetPropagationMode_NoChildren,
QWidgetPropagationMode_AllChildren,
QWidgetPropagationMode_SameFont,
QWidgetPropagationMode_SamePalette = 2 { $2 });
type
QWidgetFocusPolicy = (
QWidgetFocusPolicy_NoFocus = 0 { $0 },
QWidgetFocusPolicy_TabFocus = 1 { $1 },
QWidgetFocusPolicy_ClickFocus = 2 { $2 },
QWidgetFocusPolicy_StrongFocus = 3 { $3 },
QWidgetFocusPolicy_WheelFocus = 7 { $7 });
type
QApplicationType = ( QApplicationType_Tty, QApplicationType_GuiClient, QApplicationType_GuiServer );
type
QApplicationColorMode = ( QApplicationColorMode_NormalColors, QApplicationColorMode_CustomColors );
type
QApplicationColorSpec = (
QApplicationColorSpec_NormalColor = 0 { $0 },
QApplicationColorSpec_CustomColor = 1 { $1 },
QApplicationColorSpec_ManyColor = 2 { $2 });
type
QButtonToggleType = ( QButtonToggleType_SingleShot, QButtonToggleType_Toggle, QButtonToggleType_Tristate );
type
QButtonToggleState = ( QButtonToggleState_Off, QButtonToggleState_NoChange, QButtonToggleState_On );
type
QComboBoxPolicy = ( QComboBoxPolicy_NoInsertion, QComboBoxPolicy_AtTop, QComboBoxPolicy_AtCurrent, QComboBoxPolicy_AtBottom, QComboBoxPolicy_AfterCurrent, QComboBoxPolicy_BeforeCurrent );
type
QDialogDialogCode = ( QDialogDialogCode_Rejected, QDialogDialogCode_Accepted );
type
QDragObjectDragMode = ( QDragObjectDragMode_DragDefault, QDragObjectDragMode_DragCopy, QDragObjectDragMode_DragMove, QDragObjectDragMode_DragCopyOrMove );
type
QFocusEventReason = ( QFocusEventReason_Mouse, QFocusEventReason_Tab, QFocusEventReason_ActiveWindow, QFocusEventReason_Popup, QFocusEventReason_Shortcut, QFocusEventReason_Other );
type
QEventType = (
QEventType_None = 0 { $0 },
QEventType_Timer = 1 { $1 },
QEventType_MouseButtonPress = 2 { $2 },
QEventType_MouseButtonRelease = 3 { $3 },
QEventType_MouseButtonDblClick = 4 { $4 },
QEventType_MouseMove = 5 { $5 },
QEventType_KeyPress = 6 { $6 },
QEventType_KeyRelease = 7 { $7 },
QEventType_FocusIn = 8 { $8 },
QEventType_FocusOut = 9 { $9 },
QEventType_Enter = 10 { $a },
QEventType_Leave = 11 { $b },
QEventType_Paint = 12 { $c },
QEventType_Move = 13 { $d },
QEventType_Resize = 14 { $e },
QEventType_Create = 15 { $f },
QEventType_Destroy = 16 { $10 },
QEventType_Show = 17 { $11 },
QEventType_Hide = 18 { $12 },
QEventType_Close = 19 { $13 },
QEventType_Quit = 20 { $14 },
QEventType_Reparent = 21 { $15 },
QEventType_ShowMinimized = 22 { $16 },
QEventType_ShowNormal = 23 { $17 },
QEventType_WindowActivate = 24 { $18 },
QEventType_WindowDeactivate = 25 { $19 },
QEventType_ShowToParent = 26 { $1a },
QEventType_HideToParent = 27 { $1b },
QEventType_ShowMaximized = 28 { $1c },
QEventType_Accel = 30 { $1e },
QEventType_Wheel = 31 { $1f },
QEventType_AccelAvailable = 32 { $20 },
QEventType_CaptionChange = 33 { $21 },
QEventType_IconChange = 34 { $22 },
QEventType_ParentFontChange = 35 { $23 },
QEventType_ApplicationFontChange = 36 { $24 },
QEventType_ParentPaletteChange = 37 { $25 },
QEventType_ApplicationPaletteChange = 38 { $26 },
QEventType_Clipboard = 40 { $28 },
QEventType_Speech = 42 { $2a },
QEventType_SockAct = 50 { $32 },
QEventType_AccelOverride = 51 { $33 },
QEventType_DragEnter = 60 { $3c },
QEventType_DragMove = 61 { $3d },
QEventType_DragLeave = 62 { $3e },
QEventType_Drop = 63 { $3f },
QEventType_DragResponse = 64 { $40 },
QEventType_ChildInserted = 70 { $46 },
QEventType_ChildRemoved = 71 { $47 },
QEventType_LayoutHint = 72 { $48 },
QEventType_ShowWindowRequest = 73 { $49 },
QEventType_ActivateControl = 80 { $50 },
QEventType_DeactivateControl = 81 { $51 },
QEventType_User = 1000 { $3e8 },
QEventType_ClxBase = 1000,
QEventType_ClxUser = 2000,
QEventType_ClxUserLimit = 4000);
type
QDropEventAction = (
QDropEventAction_Copy,
QDropEventAction_Link,
QDropEventAction_Move,
QDropEventAction_Private,
QDropEventAction_UserAction = 100 { $64 });
type
QFrameShape = (
QFrameShape_NoFrame = 0 { $0 },
QFrameShape_Box = 1 { $1 },
QFrameShape_Panel = 2 { $2 },
QFrameShape_WinPanel = 3 { $3 },
QFrameShape_HLine = 4 { $4 },
QFrameShape_VLine = 5 { $5 },
QFrameShape_StyledPanel = 6 { $6 },
QFrameShape_PopupPanel = 7 { $7 },
QFrameShape_MShape = 15 { $f });
type
QFrameShadow = (
QFrameShadow_Plain = 16 { $10 },
QFrameShadow_Raised = 32 { $20 },
QFrameShadow_Sunken = 48 { $30 },
QFrameShadow_MShadow = 240 { $f0 });
type
QIconViewSelectionMode = (
QIconViewSelectionMode_Single = 0 { $0 },
QIconViewSelectionMode_Multi,
QIconViewSelectionMode_Extended,
QIconViewSelectionMode_NoSelection);
type
QIconViewArrangement = (
QIconViewArrangement_LeftToRight = 0 { $0 },
QIconViewArrangement_TopToBottom);
type
QIconViewResizeMode = (
QIconViewResizeMode_Fixed = 0 { $0 },
QIconViewResizeMode_Adjust);
type
QIconViewItemTextPos = (
QIconViewItemTextPos_Bottom = 0 { $0 },
QIconViewItemTextPos_Right);
type
QLCDNumberSegmentStyle = ( QLCDNumberSegmentStyle_Outline, QLCDNumberSegmentStyle_Filled, QLCDNumberSegmentStyle_Flat );
type
QLCDNumberMode = (
QLCDNumberMode_Hex,
QLCDNumberMode_Dec,
QLCDNumberMode_Oct,
QLCDNumberMode_Bin);
type
QLineEditEchoMode = ( QLineEditEchoMode_Normal, QLineEditEchoMode_NoEcho, QLineEditEchoMode_Password );
type
QListBoxSelectionMode = ( QListBoxSelectionMode_Single, QListBoxSelectionMode_Multi, QListBoxSelectionMode_Extended, QListBoxSelectionMode_NoSelection );
type
QListBoxLayoutMode = (
QListBoxLayoutMode_FixedNumber,
QListBoxLayoutMode_FitToWidth,
QListBoxLayoutMode_FitToHeight = 1 { $1 },
QListBoxLayoutMode_Variable);
type
QListViewWidthMode = ( QListViewWidthMode_Manual, QListViewWidthMode_Maximum );
type
QListViewSelectionMode = ( QListViewSelectionMode_Single, QListViewSelectionMode_Multi, QListViewSelectionMode_Extended, QListViewSelectionMode_NoSelection );
type
QCheckListItemType = ( QCheckListItemType_RadioButton, QCheckListItemType_CheckBox, QCheckListItemType_Controller );
type
QMenuBarSeparator = (
QMenuBarSeparator_Never = 0 { $0 },
QMenuBarSeparator_InWindowsStyle = 1 { $1 });
type
QMessageBoxIcon = (
QMessageBoxIcon_NoIcon = 0 { $0 },
QMessageBoxIcon_Information = 1 { $1 },
QMessageBoxIcon_Warning = 2 { $2 },
QMessageBoxIcon_Critical = 3 { $3 });
type
QMultiLineEditEchoMode = ( QMultiLineEditEchoMode_Normal, QMultiLineEditEchoMode_NoEcho, QMultiLineEditEchoMode_Password );
type
QMultiLineEditWordWrap = ( QMultiLineEditWordWrap_NoWrap, QMultiLineEditWordWrap_WidgetWidth, QMultiLineEditWordWrap_FixedPixelWidth, QMultiLineEditWordWrap_FixedColumnWidth );
type
QMultiLineEditWrapPolicy = ( QMultiLineEditWrapPolicy_AtWhiteSpace, QMultiLineEditWrapPolicy_Anywhere );
type
QScrollViewResizePolicy = ( QScrollViewResizePolicy_Default, QScrollViewResizePolicy_Manual, QScrollViewResizePolicy_AutoOne );
type
QScrollViewScrollBarMode = ( QScrollViewScrollBarMode_Auto, QScrollViewScrollBarMode_AlwaysOff, QScrollViewScrollBarMode_AlwaysOn );
type
QSliderTickSetting = (
QSliderTickSetting_NoMarks = 0 { $0 },
QSliderTickSetting_Above = 1 { $1 },
QSliderTickSetting_Left = 1 { $1 },
QSliderTickSetting_Below = 2 { $2 },
QSliderTickSetting_Right = 2 { $2 },
QSliderTickSetting_Both = 3 { $3 });
type
QSocketNotifierType = ( QSocketNotifierType_Read, QSocketNotifierType_Write, QSocketNotifierType_Exception );
type
QSpinBoxButtonSymbols = ( QSpinBoxButtonSymbols_UpDownArrows, QSpinBoxButtonSymbols_PlusMinus );
type
QStyleScrollControl = (
QStyleScrollControl_AddLine = 1 { $1 },
QStyleScrollControl_SubLine = 2 { $2 },
QStyleScrollControl_AddPage = 4 { $4 },
QStyleScrollControl_SubPage = 8 { $8 },
QStyleScrollControl_First = 16 { $10 },
QStyleScrollControl_Last = 32 { $20 },
QStyleScrollControl_Slider = 64 { $40 },
QStyleScrollControl_NoScroll = 128 { $80 });
type
QTranslatorMessagePrefix = ( QTranslatorMessagePrefix_NoPrefix, QTranslatorMessagePrefix_Hash, QTranslatorMessagePrefix_HashContext, QTranslatorMessagePrefix_HashContextSourceText, QTranslatorMessagePrefix_HashContextSourceTextComment );
type
QTranslatorSaveMode = ( QTranslatorSaveMode_Everything, QTranslatorSaveMode_Stripped );
type
QColorSpec = ( QColorSpec_Rgb, QColorSpec_Hsv );
type
QFontCharSet = (
QFontCharSet_ISO_8859_1,
QFontCharSet_Latin1 = 0 { $0 },
QFontCharSet_AnyCharSet,
QFontCharSet_ISO_8859_2,
QFontCharSet_Latin2 = 2 { $2 },
QFontCharSet_ISO_8859_3,
QFontCharSet_Latin3 = 3 { $3 },
QFontCharSet_ISO_8859_4,
QFontCharSet_Latin4 = 4 { $4 },
QFontCharSet_ISO_8859_5,
QFontCharSet_ISO_8859_6,
QFontCharSet_ISO_8859_7,
QFontCharSet_ISO_8859_8,
QFontCharSet_ISO_8859_9,
QFontCharSet_Latin5 = 9 { $9 },
QFontCharSet_ISO_8859_10,
QFontCharSet_Latin6 = 10 { $a },
QFontCharSet_ISO_8859_11,
QFontCharSet_TIS620 = 11 { $b },
QFontCharSet_ISO_8859_12,
QFontCharSet_ISO_8859_13,
QFontCharSet_Latin7 = 13 { $d },
QFontCharSet_ISO_8859_14,
QFontCharSet_Latin8 = 14 { $e },
QFontCharSet_ISO_8859_15,
QFontCharSet_Latin9 = 15 { $f },
QFontCharSet_KOI8R,
QFontCharSet_Set_Ja,
QFontCharSet_Set_1 = 17 { $11 },
QFontCharSet_Set_Ko,
QFontCharSet_Set_Th_TH,
QFontCharSet_Set_Zh,
QFontCharSet_Set_Zh_TW,
QFontCharSet_Set_N = 21 { $15 },
QFontCharSet_Unicode,
QFontCharSet_Set_GBK,
QFontCharSet_Set_Big5,
QFontCharSet_TSCII,
QFontCharSet_KOI8U,
QFontCharSet_CP1251,
QFontCharSet_PT154,
QFontCharSet_JIS_X_0201 = 160 { $a0 },
QFontCharSet_JIS_X_0208 = 192 { $c0 },
QFontCharSet_Enc16 = 192 { $c0 },
QFontCharSet_KSC_5601,
QFontCharSet_GB_2312,
QFontCharSet_Big5);
type
QFontStyleHint = (
QFontStyleHint_Helvetica,
QFontStyleHint_Times,
QFontStyleHint_Courier,
QFontStyleHint_OldEnglish,
QFontStyleHint_System,
QFontStyleHint_AnyStyle,
QFontStyleHint_SansSerif = 0 { $0 },
QFontStyleHint_Serif = 1 { $1 },
QFontStyleHint_TypeWriter = 2 { $2 },
QFontStyleHint_Decorative = 3 { $3 });
type
QFontStyleStrategy = (
QFontStyleStrategy_PreferDefault = 1 { $1 },
QFontStyleStrategy_PreferBitmap = 2 { $2 },
QFontStyleStrategy_PreferDevice = 4 { $4 },
QFontStyleStrategy_PreferOutline = 8 { $8 },
QFontStyleStrategy_ForceOutline = 16 { $10 },
QFontStyleStrategy_PreferMatch = 32 { $20 },
QFontStyleStrategy_PreferQuality = 64 { $40 });
type
QFontWeight = (
QFontWeight_Light = 25 { $19 },
QFontWeight_Normal = 50 { $32 },
QFontWeight_DemiBold = 63 { $3f },
QFontWeight_Bold = 75 { $4b },
QFontWeight_Black = 87 { $57 });
type
QImageEndian = ( QImageEndian_IgnoreEndian, QImageEndian_BigEndian, QImageEndian_LittleEndian );
type
QIconSetSize = ( QIconSetSize_Automatic, QIconSetSize_Small, QIconSetSize_Large );
type
QIconSetMode = ( QIconSetMode_Normal, QIconSetMode_Disabled, QIconSetMode_Active );
type
QMovieStatus = (
QMovieStatus_SourceEmpty = -2 { $fffffffe },
QMovieStatus_UnrecognizedFormat = -1 { $ffffffff },
QMovieStatus_Paused = 1 { $1 },
QMovieStatus_EndOfFrame = 2 { $2 },
QMovieStatus_EndOfLoop = 3 { $3 },
QMovieStatus_EndOfMovie = 4 { $4 },
QMovieStatus_SpeedChanged = 5 { $5 });
type
QPaintDevicePDevCmd = (
QPaintDevicePDevCmd_PdcNOP = 0 { $0 },
QPaintDevicePDevCmd_PdcDrawPoint = 1 { $1 },
QPaintDevicePDevCmd_PdcDrawFirst = 1 { $1 },
QPaintDevicePDevCmd_PdcMoveTo = 2 { $2 },
QPaintDevicePDevCmd_PdcLineTo = 3 { $3 },
QPaintDevicePDevCmd_PdcDrawLine = 4 { $4 },
QPaintDevicePDevCmd_PdcDrawRect = 5 { $5 },
QPaintDevicePDevCmd_PdcDrawRoundRect = 6 { $6 },
QPaintDevicePDevCmd_PdcDrawEllipse = 7 { $7 },
QPaintDevicePDevCmd_PdcDrawArc = 8 { $8 },
QPaintDevicePDevCmd_PdcDrawPie = 9 { $9 },
QPaintDevicePDevCmd_PdcDrawChord = 10 { $a },
QPaintDevicePDevCmd_PdcDrawLineSegments = 11 { $b },
QPaintDevicePDevCmd_PdcDrawPolyline = 12 { $c },
QPaintDevicePDevCmd_PdcDrawPolygon = 13 { $d },
QPaintDevicePDevCmd_PdcDrawQuadBezier = 14 { $e },
QPaintDevicePDevCmd_PdcDrawText = 15 { $f },
QPaintDevicePDevCmd_PdcDrawTextFormatted = 16 { $10 },
QPaintDevicePDevCmd_PdcDrawPixmap = 17 { $11 },
QPaintDevicePDevCmd_PdcDrawImage = 18 { $12 },
QPaintDevicePDevCmd_PdcDrawText2 = 19 { $13 },
QPaintDevicePDevCmd_PdcDrawText2Formatted = 20 { $14 },
QPaintDevicePDevCmd_PdcDrawLast = 20 { $14 },
QPaintDevicePDevCmd_PdcBegin = 30 { $1e },
QPaintDevicePDevCmd_PdcEnd = 31 { $1f },
QPaintDevicePDevCmd_PdcSave = 32 { $20 },
QPaintDevicePDevCmd_PdcRestore = 33 { $21 },
QPaintDevicePDevCmd_PdcSetdev = 34 { $22 },
QPaintDevicePDevCmd_PdcSetBkColor = 40 { $28 },
QPaintDevicePDevCmd_PdcSetBkMode = 41 { $29 },
QPaintDevicePDevCmd_PdcSetROP = 42 { $2a },
QPaintDevicePDevCmd_PdcSetBrushOrigin = 43 { $2b },
QPaintDevicePDevCmd_PdcSetFont = 45 { $2d },
QPaintDevicePDevCmd_PdcSetPen = 46 { $2e },
QPaintDevicePDevCmd_PdcSetBrush = 47 { $2f },
QPaintDevicePDevCmd_PdcSetTabStops = 48 { $30 },
QPaintDevicePDevCmd_PdcSetTabArray = 49 { $31 },
QPaintDevicePDevCmd_PdcSetUnit = 50 { $32 },
QPaintDevicePDevCmd_PdcSetVXform = 51 { $33 },
QPaintDevicePDevCmd_PdcSetWindow = 52 { $34 },
QPaintDevicePDevCmd_PdcSetViewport = 53 { $35 },
QPaintDevicePDevCmd_PdcSetWXform = 54 { $36 },
QPaintDevicePDevCmd_PdcSetWMatrix = 55 { $37 },
QPaintDevicePDevCmd_PdcSaveWMatrix = 56 { $38 },
QPaintDevicePDevCmd_PdcRestoreWMatrix = 57 { $39 },
QPaintDevicePDevCmd_PdcSetClip = 60 { $3c },
QPaintDevicePDevCmd_PdcSetClipRegion = 61 { $3d },
QPaintDevicePDevCmd_PdcReservedStart = 0 { $0 },
QPaintDevicePDevCmd_PdcReservedStop = 199 { $c7 });
type
QColorGroupColorRole = ( QColorGroupColorRole_Foreground, QColorGroupColorRole_Button, QColorGroupColorRole_Light, QColorGroupColorRole_Midlight, QColorGroupColorRole_Dark, QColorGroupColorRole_Mid, QColorGroupColorRole_Text, QColorGroupColorRole_BrightText, QColorGroupColorRole_ButtonText, QColorGroupColorRole_Base, QColorGroupColorRole_Background, QColorGroupColorRole_Shadow, QColorGroupColorRole_Highlight, QColorGroupColorRole_HighlightedText, QColorGroupColorRole_NColorRoles );
type
QPaletteColorGroup = ( QPaletteColorGroup_Normal, QPaletteColorGroup_Disabled, QPaletteColorGroup_Active, QPaletteColorGroup_Inactive, QPaletteColorGroup_NColorGroups );
type
QPixmapColorMode = ( QPixmapColorMode_Auto, QPixmapColorMode_Color, QPixmapColorMode_Mono );
type
QPixmapOptimization = (
QPixmapOptimization_DefaultOptim,
QPixmapOptimization_NoOptim,
QPixmapOptimization_MemoryOptim = 1 { $1 },
QPixmapOptimization_NormalOptim,
QPixmapOptimization_BestOptim);
type
QPrinterOrientation = ( QPrinterOrientation_Portrait, QPrinterOrientation_Landscape );
type
QPrinterPageSize = ( QPrinterPageSize_A4, QPrinterPageSize_B5, QPrinterPageSize_Letter, QPrinterPageSize_Legal, QPrinterPageSize_Executive, QPrinterPageSize_A0, QPrinterPageSize_A1, QPrinterPageSize_A2, QPrinterPageSize_A3, QPrinterPageSize_A5, QPrinterPageSize_A6, QPrinterPageSize_A7, QPrinterPageSize_A8, QPrinterPageSize_A9, QPrinterPageSize_B0, QPrinterPageSize_B1, QPrinterPageSize_B10, QPrinterPageSize_B2, QPrinterPageSize_B3, QPrinterPageSize_B4, QPrinterPageSize_B6, QPrinterPageSize_B7, QPrinterPageSize_B8, QPrinterPageSize_B9, QPrinterPageSize_C5E, QPrinterPageSize_Comm10E, QPrinterPageSize_DLE, QPrinterPageSize_Folio, QPrinterPageSize_Ledger, QPrinterPageSize_Tabloid, QPrinterPageSize_NPageSize );
type
QPrinterPageOrder = ( QPrinterPageOrder_FirstPageFirst, QPrinterPageOrder_LastPageFirst );
type
QPrinterColorMode = ( QPrinterColorMode_GrayScale, QPrinterColorMode_Color );
type
QRegionRegionType = ( QRegionRegionType_Rectangle, QRegionRegionType_Ellipse );
type
Orientation = ( Orientation_Horizontal, Orientation_Vertical );
type
BGMode = ( BGMode_TransparentMode, BGMode_OpaqueMode );
type
PaintUnit = ( PaintUnit_PixelUnit, PaintUnit_LoMetricUnit, PaintUnit_HiMetricUnit, PaintUnit_LoEnglishUnit, PaintUnit_HiEnglishUnit, PaintUnit_TwipsUnit );
type
GUIStyle = ( GUIStyle_MacStyle, GUIStyle_WindowsStyle, GUIStyle_Win3Style, GUIStyle_PMStyle, GUIStyle_MotifStyle );
type
ArrowType = ( ArrowType_UpArrow, ArrowType_DownArrow, ArrowType_LeftArrow, ArrowType_RightArrow );
type
UIEffect = ( UIEffect_UI_General, UIEffect_UI_AnimateMenu, UIEffect_UI_FadeMenu, UIEffect_UI_AnimateCombo, UIEffect_UI_AnimateTooltip, UIEffect_UI_FadeTooltip );
type
TextFormat = ( TextFormat_PlainText, TextFormat_RichText, TextFormat_AutoText );
type
ButtonState = (
ButtonState_NoButton = 0 { $0 },
ButtonState_LeftButton = 1 { $1 },
ButtonState_RightButton = 2 { $2 },
ButtonState_MidButton = 4 { $4 },
ButtonState_MouseButtonMask = 7 { $7 },
ButtonState_ShiftButton = 8 { $8 },
ButtonState_ControlButton = 16 { $10 },
ButtonState_AltButton = 32 { $20 },
ButtonState_KeyButtonMask = 56 { $38 },
ButtonState_Keypad = 16384 { $4000 });
type
AlignmentFlags = (
AlignmentFlags_AlignLeft = 1 { $1 },
AlignmentFlags_AlignRight = 2 { $2 },
AlignmentFlags_AlignHCenter = 4 { $4 },
AlignmentFlags_AlignTop = 8 { $8 },
AlignmentFlags_AlignBottom = 16 { $10 },
AlignmentFlags_AlignVCenter = 32 { $20 },
AlignmentFlags_AlignCenter = 36 { $24 },
AlignmentFlags_SingleLine = 64 { $40 },
AlignmentFlags_DontClip = 128 { $80 },
AlignmentFlags_ExpandTabs = 256 { $100 },
AlignmentFlags_ShowPrefix = 512 { $200 },
AlignmentFlags_WordBreak = 1024 { $400 },
AlignmentFlags_DontPrint = 4096 { $1000 });
type
WidgetState = (
WidgetState_WState_Created = 1 { $1 },
WidgetState_WState_Disabled = 2 { $2 },
WidgetState_WState_Visible = 4 { $4 },
WidgetState_WState_ForceHide = 8 { $8 },
WidgetState_WState_OwnCursor = 16 { $10 },
WidgetState_WState_MouseTracking = 32 { $20 },
WidgetState_WState_CompressKeys = 64 { $40 },
WidgetState_WState_BlockUpdates = 128 { $80 },
WidgetState_WState_InPaintEvent = 256 { $100 },
WidgetState_WState_Reparented = 512 { $200 },
WidgetState_WState_ConfigPending = 1024 { $400 },
WidgetState_WState_Resized = 2048 { $800 },
WidgetState_WState_AutoMask = 4096 { $1000 },
WidgetState_WState_Polished = 8192 { $2000 },
WidgetState_WState_DND = 16384 { $4000 },
WidgetState_WState_Modal = 32768 { $8000 },
WidgetState_WState_Reserved1 = 65536 { $10000 },
WidgetState_WState_Reserved2 = 131072 { $20000 },
WidgetState_WState_Reserved3 = 262144 { $40000 },
WidgetState_WState_Maximized = 524288 { $80000 },
WidgetState_WState_TranslateBackground = 1048576 { $100000 },
WidgetState_WState_ForceDisabled = 2097152 { $200000 },
WidgetState_WState_Exposed = 4194304 { $400000 });
type
WidgetFlags = (
WidgetFlags_WType_TopLevel = 1 { $1 },
WidgetFlags_WType_Modal = 2 { $2 },
WidgetFlags_WType_Popup = 4 { $4 },
WidgetFlags_WType_Desktop = 8 { $8 },
WidgetFlags_WType_Mask = 15 { $f },
WidgetFlags_WStyle_Customize = 16 { $10 },
WidgetFlags_WStyle_NormalBorder = 32 { $20 },
WidgetFlags_WStyle_DialogBorder = 64 { $40 },
WidgetFlags_WStyle_NoBorder = 0 { $0 },
WidgetFlags_WStyle_Title = 128 { $80 },
WidgetFlags_WStyle_SysMenu = 256 { $100 },
WidgetFlags_WStyle_Minimize = 512 { $200 },
WidgetFlags_WStyle_Maximize = 1024 { $400 },
WidgetFlags_WStyle_MinMax = 1536 { $600 },
WidgetFlags_WStyle_Tool = 2048 { $800 },
WidgetFlags_WStyle_StaysOnTop = 4096 { $1000 },
WidgetFlags_WStyle_Dialog = 8192 { $2000 },
WidgetFlags_WStyle_ContextHelp = 16384 { $4000 },
WidgetFlags_WStyle_NoBorderEx = 32768 { $8000 },
WidgetFlags_WStyle_Mask = 65520 { $fff0 },
WidgetFlags_WDestructiveClose = 65536 { $10000 },
WidgetFlags_WPaintDesktop = 131072 { $20000 },
WidgetFlags_WPaintUnclipped = 262144 { $40000 },
WidgetFlags_WPaintClever = 524288 { $80000 },
WidgetFlags_WResizeNoErase = 1048576 { $100000 },
WidgetFlags_WMouseNoMask = 2097152 { $200000 },
WidgetFlags_WNorthWestGravity = 4194304 { $400000 },
WidgetFlags_WRepaintNoErase = 8388608 { $800000 },
WidgetFlags_WX11BypassWM = 16777216 { $1000000 },
WidgetFlags_WGroupLeader = 33554432 { $2000000 });
type
ImageConversionFlags = (
ImageConversionFlags_ColorMode_Mask = 3 { $3 },
ImageConversionFlags_AutoColor = 0 { $0 },
ImageConversionFlags_ColorOnly = 3 { $3 },
ImageConversionFlags_MonoOnly = 2 { $2 },
ImageConversionFlags_AlphaDither_Mask = 12 { $c },
ImageConversionFlags_ThresholdAlphaDither = 0 { $0 },
ImageConversionFlags_OrderedAlphaDither = 4 { $4 },
ImageConversionFlags_DiffuseAlphaDither = 8 { $8 },
ImageConversionFlags_NoAlpha = 12 { $c },
ImageConversionFlags_Dither_Mask = 48 { $30 },
ImageConversionFlags_DiffuseDither = 0 { $0 },
ImageConversionFlags_OrderedDither = 16 { $10 },
ImageConversionFlags_ThresholdDither = 32 { $20 },
ImageConversionFlags_DitherMode_Mask = 192 { $c0 },
ImageConversionFlags_AutoDither = 0 { $0 },
ImageConversionFlags_PreferDither = 64 { $40 },
ImageConversionFlags_AvoidDither = 128 { $80 });
type
Modifier = (
Modifier_SHIFT = 2097152 { $200000 },
Modifier_CTRL = 4194304 { $400000 },
Modifier_ALT = 8388608 { $800000 },
Modifier_MODIFIER_MASK = 14680064 { $e00000 },
Modifier_UNICODE_ACCEL = 268435456 { $10000000 },
Modifier_ASCII_ACCEL = 268435456 { $10000000 });
type
QtKey = Integer;
const
Key_Escape = 4096 { $1000 };
Key_Tab = 4097 { $1001 };
Key_Backtab = 4098 { $1002 };
Key_Backspace = 4099 { $1003 };
Key_Return = 4100 { $1004 };
Key_Enter = 4101 { $1005 };
Key_Insert = 4102 { $1006 };
Key_Delete = 4103 { $1007 };
Key_Pause = 4104 { $1008 };
Key_Print = 4105 { $1009 };
Key_SysReq = 4106 { $100a };
Key_Home = 4112 { $1010 };
Key_End = 4113 { $1011 };
Key_Left = 4114 { $1012 };
Key_Up = 4115 { $1013 };
Key_Right = 4116 { $1014 };
Key_Down = 4117 { $1015 };
Key_Prior = 4118 { $1016 };
Key_PageUp = 4118 { $1016 };
Key_Next = 4119 { $1017 };
Key_PageDown = 4119 { $1017 };
Key_Shift = 4128 { $1020 };
Key_Control = 4129 { $1021 };
Key_Meta = 4130 { $1022 };
Key_Alt = 4131 { $1023 };
Key_CapsLock = 4132 { $1024 };
Key_NumLock = 4133 { $1025 };
Key_ScrollLock = 4134 { $1026 };
Key_F1 = 4144 { $1030 };
Key_F2 = 4145 { $1031 };
Key_F3 = 4146 { $1032 };
Key_F4 = 4147 { $1033 };
Key_F5 = 4148 { $1034 };
Key_F6 = 4149 { $1035 };
Key_F7 = 4150 { $1036 };
Key_F8 = 4151 { $1037 };
Key_F9 = 4152 { $1038 };
Key_F10 = 4153 { $1039 };
Key_F11 = 4154 { $103a };
Key_F12 = 4155 { $103b };
Key_F13 = 4156 { $103c };
Key_F14 = 4157 { $103d };
Key_F15 = 4158 { $103e };
Key_F16 = 4159 { $103f };
Key_F17 = 4160 { $1040 };
Key_F18 = 4161 { $1041 };
Key_F19 = 4162 { $1042 };
Key_F20 = 4163 { $1043 };
Key_F21 = 4164 { $1044 };
Key_F22 = 4165 { $1045 };
Key_F23 = 4166 { $1046 };
Key_F24 = 4167 { $1047 };
Key_F25 = 4168 { $1048 };
Key_F26 = 4169 { $1049 };
Key_F27 = 4170 { $104a };
Key_F28 = 4171 { $104b };
Key_F29 = 4172 { $104c };
Key_F30 = 4173 { $104d };
Key_F31 = 4174 { $104e };
Key_F32 = 4175 { $104f };
Key_F33 = 4176 { $1050 };
Key_F34 = 4177 { $1051 };
Key_F35 = 4178 { $1052 };
Key_Super_L = 4179 { $1053 };
Key_Super_R = 4180 { $1054 };
Key_Menu = 4181 { $1055 };
Key_Hyper_L = 4182 { $1056 };
Key_Hyper_R = 4183 { $1057 };
Key_Help = 4184 { $1058 };
Key_Space = 32 { $20 };
Key_Any = 32 { $20 };
Key_Exclam = 33 { $21 };
Key_QuoteDbl = 34 { $22 };
Key_NumberSign = 35 { $23 };
Key_Dollar = 36 { $24 };
Key_Percent = 37 { $25 };
Key_Ampersand = 38 { $26 };
Key_Apostrophe = 39 { $27 };
Key_ParenLeft = 40 { $28 };
Key_ParenRight = 41 { $29 };
Key_Asterisk = 42 { $2a };
Key_Plus = 43 { $2b };
Key_Comma = 44 { $2c };
Key_Minus = 45 { $2d };
Key_Period = 46 { $2e };
Key_Slash = 47 { $2f };
Key_0 = 48 { $30 };
Key_1 = 49 { $31 };
Key_2 = 50 { $32 };
Key_3 = 51 { $33 };
Key_4 = 52 { $34 };
Key_5 = 53 { $35 };
Key_6 = 54 { $36 };
Key_7 = 55 { $37 };
Key_8 = 56 { $38 };
Key_9 = 57 { $39 };
Key_Colon = 58 { $3a };
Key_Semicolon = 59 { $3b };
Key_Less = 60 { $3c };
Key_Equal = 61 { $3d };
Key_Greater = 62 { $3e };
Key_Question = 63 { $3f };
Key_At = 64 { $40 };
Key_A = 65 { $41 };
Key_B = 66 { $42 };
Key_C = 67 { $43 };
Key_D = 68 { $44 };
Key_E = 69 { $45 };
Key_F = 70 { $46 };
Key_G = 71 { $47 };
Key_H = 72 { $48 };
Key_I = 73 { $49 };
Key_J = 74 { $4a };
Key_K = 75 { $4b };
Key_L = 76 { $4c };
Key_M = 77 { $4d };
Key_N = 78 { $4e };
Key_O = 79 { $4f };
Key_P = 80 { $50 };
Key_Q = 81 { $51 };
Key_R = 82 { $52 };
Key_S = 83 { $53 };
Key_T = 84 { $54 };
Key_U = 85 { $55 };
Key_V = 86 { $56 };
Key_W = 87 { $57 };
Key_X = 88 { $58 };
Key_Y = 89 { $59 };
Key_Z = 90 { $5a };
Key_BracketLeft = 91 { $5b };
Key_Backslash = 92 { $5c };
Key_BracketRight = 93 { $5d };
Key_AsciiCircum = 94 { $5e };
Key_Underscore = 95 { $5f };
Key_QuoteLeft = 96 { $60 };
Key_BraceLeft = 123 { $7b };
Key_Bar = 124 { $7c };
Key_BraceRight = 125 { $7d };
Key_AsciiTilde = 126 { $7e };
Key_nobreakspace = 160 { $a0 };
Key_exclamdown = 161 { $a1 };
Key_cent = 162 { $a2 };
Key_sterling = 163 { $a3 };
Key_currency = 164 { $a4 };
Key_yen = 165 { $a5 };
Key_brokenbar = 166 { $a6 };
Key_section = 167 { $a7 };
Key_diaeresis = 168 { $a8 };
Key_copyright = 169 { $a9 };
Key_ordfeminine = 170 { $aa };
Key_guillemotleft = 171 { $ab };
Key_notsign = 172 { $ac };
Key_hyphen = 173 { $ad };
Key_registered = 174 { $ae };
Key_macron = 175 { $af };
Key_degree = 176 { $b0 };
Key_plusminus = 177 { $b1 };
Key_twosuperior = 178 { $b2 };
Key_threesuperior = 179 { $b3 };
Key_acute = 180 { $b4 };
Key_mu = 181 { $b5 };
Key_paragraph = 182 { $b6 };
Key_periodcentered = 183 { $b7 };
Key_cedilla = 184 { $b8 };
Key_onesuperior = 185 { $b9 };
Key_masculine = 186 { $ba };
Key_guillemotright = 187 { $bb };
Key_onequarter = 188 { $bc };
Key_onehalf = 189 { $bd };
Key_threequarters = 190 { $be };
Key_questiondown = 191 { $bf };
Key_Agrave = 192 { $c0 };
Key_Aacute = 193 { $c1 };
Key_Acircumflex = 194 { $c2 };
Key_Atilde = 195 { $c3 };
Key_Adiaeresis = 196 { $c4 };
Key_Aring = 197 { $c5 };
Key_AE = 198 { $c6 };
Key_Ccedilla = 199 { $c7 };
Key_Egrave = 200 { $c8 };
Key_Eacute = 201 { $c9 };
Key_Ecircumflex = 202 { $ca };
Key_Ediaeresis = 203 { $cb };
Key_Igrave = 204 { $cc };
Key_Iacute = 205 { $cd };
Key_Icircumflex = 206 { $ce };
Key_Idiaeresis = 207 { $cf };
Key_ETH = 208 { $d0 };
Key_Ntilde = 209 { $d1 };
Key_Ograve = 210 { $d2 };
Key_Oacute = 211 { $d3 };
Key_Ocircumflex = 212 { $d4 };
Key_Otilde = 213 { $d5 };
Key_Odiaeresis = 214 { $d6 };
Key_multiply = 215 { $d7 };
Key_Ooblique = 216 { $d8 };
Key_Ugrave = 217 { $d9 };
Key_Uacute = 218 { $da };
Key_Ucircumflex = 219 { $db };
Key_Udiaeresis = 220 { $dc };
Key_Yacute = 221 { $dd };
Key_THORN = 222 { $de };
Key_ssharp = 223 { $df };
Key_agrave_lower = 224 { $e0 };
Key_aacute_lower = 225 { $e1 };
Key_acircumflex_lower = 226 { $e2 };
Key_atilde_lower = 227 { $e3 };
Key_adiaeresis_lower = 228 { $e4 };
Key_aring_lower = 229 { $e5 };
Key_ae_lower = 230 { $e6 };
Key_ccedilla_lower = 231 { $e7 };
Key_egrave_lower = 232 { $e8 };
Key_eacute_lower = 233 { $e9 };
Key_ecircumflex_lower = 234 { $ea };
Key_ediaeresis_lower = 235 { $eb };
Key_igrave_lower = 236 { $ec };
Key_iacute_lower = 237 { $ed };
Key_icircumflex_lower = 238 { $ee };
Key_idiaeresis_lower = 239 { $ef };
Key_eth_lower = 240 { $f0 };
Key_ntilde_lower = 241 { $f1 };
Key_ograve_lower = 242 { $f2 };
Key_oacute_lower = 243 { $f3 };
Key_ocircumflex_lower = 244 { $f4 };
Key_otilde_lower = 245 { $f5 };
Key_odiaeresis_lower = 246 { $f6 };
Key_division = 247 { $f7 };
Key_oslash = 248 { $f8 };
Key_ugrave_lower = 249 { $f9 };
Key_uacute_lower = 250 { $fa };
Key_ucircumflex_lower = 251 { $fb };
Key_udiaeresis_lower = 252 { $fc };
Key_yacute_lower = 253 { $fd };
Key_thorn_lower = 254 { $fe };
Key_ydiaeresis = 255 { $ff };
Key_unknown = 65535 { $ffff };
type
RasterOp = (
RasterOp_CopyROP,
RasterOp_OrROP,
RasterOp_XorROP,
RasterOp_NotAndROP,
RasterOp_EraseROP = 3 { $3 },
RasterOp_NotCopyROP,
RasterOp_NotOrROP,
RasterOp_NotXorROP,
RasterOp_AndROP,
RasterOp_NotEraseROP = 7 { $7 },
RasterOp_NotROP,
RasterOp_ClearROP,
RasterOp_SetROP,
RasterOp_NopROP,
RasterOp_AndNotROP,
RasterOp_OrNotROP,
RasterOp_NandROP,
RasterOp_NorROP,
RasterOp_LastROP = 15 { $f });
type
PenStyle = (
PenStyle_NoPen,
PenStyle_SolidLine,
PenStyle_DashLine,
PenStyle_DotLine,
PenStyle_DashDotLine,
PenStyle_DashDotDotLine,
PenStyle_MPenStyle = 15 { $f });
type
PenCapStyle = (
PenCapStyle_FlatCap = 0 { $0 },
PenCapStyle_SquareCap = 16 { $10 },
PenCapStyle_RoundCap = 32 { $20 },
PenCapStyle_MPenCapStyle = 48 { $30 });
type
PenJoinStyle = (
PenJoinStyle_MiterJoin = 0 { $0 },
PenJoinStyle_BevelJoin = 64 { $40 },
PenJoinStyle_RoundJoin = 128 { $80 },
PenJoinStyle_MPenJoinStyle = 192 { $c0 });
type
BrushStyle = (
BrushStyle_NoBrush,
BrushStyle_SolidPattern,
BrushStyle_Dense1Pattern,
BrushStyle_Dense2Pattern,
BrushStyle_Dense3Pattern,
BrushStyle_Dense4Pattern,
BrushStyle_Dense5Pattern,
BrushStyle_Dense6Pattern,
BrushStyle_Dense7Pattern,
BrushStyle_HorPattern,
BrushStyle_VerPattern,
BrushStyle_CrossPattern,
BrushStyle_BDiagPattern,
BrushStyle_FDiagPattern,
BrushStyle_DiagCrossPattern,
BrushStyle_CustomPattern = 24 { $18 });
type
WindowsVersion = (
WindowsVersion_WV_32s = 1 { $1 },
WindowsVersion_WV_95 = 2 { $2 },
WindowsVersion_WV_98 = 3 { $3 },
WindowsVersion_WV_DOS_based = 15 { $f },
WindowsVersion_WV_NT = 16 { $10 },
WindowsVersion_WV_2000 = 32 { $20 },
WindowsVersion_WV_NT_based = 240 { $f0 });
type
QInternalPaintDeviceFlags = (
QInternalPaintDeviceFlags_UndefinedDevice = 0 { $0 },
QInternalPaintDeviceFlags_Widget = 1 { $1 },
QInternalPaintDeviceFlags_Pixmap = 2 { $2 },
QInternalPaintDeviceFlags_Printer = 3 { $3 },
QInternalPaintDeviceFlags_Picture = 4 { $4 },
QInternalPaintDeviceFlags_System = 5 { $5 },
QInternalPaintDeviceFlags_DeviceTypeMask = 15 { $f },
QInternalPaintDeviceFlags_ExternalDevice = 16 { $10 });
type
QClxIODeviceOperation = (
QClxIODeviceOperation_Read = 1 { $1 },
QClxIODeviceOperation_Write = 2 { $2 });
type
QTableFlags = (
QTableFlags_vScrollBar = 1 { $1 },
QTableFlags_hScrollBar = 2 { $2 },
QTableFlags_autoVScrollBar = 4 { $4 },
QTableFlags_autoHScrollBar = 8 { $8 },
QTableFlags_autoScrollBars = 12 { $c },
QTableFlags_clipCellPainting = 256 { $100 },
QTableFlags_cutCellsV = 512 { $200 },
QTableFlags_cutCellsH = 1024 { $400 },
QTableFlags_cutCells = 1536 { $600 },
QTableFlags_scrollLastHCell = 2048 { $800 },
QTableFlags_scrollLastVCell = 4096 { $1000 },
QTableFlags_scrollLastCell = 6144 { $1800 },
QTableFlags_smoothHScrolling = 8192 { $2000 },
QTableFlags_smoothVScrolling = 16384 { $4000 },
QTableFlags_smoothScrolling = 24576 { $6000 },
QTableFlags_snapToHGrid = 32768 { $8000 },
QTableFlags_snapToVGrid = 65536 { $10000 },
QTableFlags_snapToGrid = 98304 { $18000 });
function QWidget_create(parent: QWidgetH; name: PAnsiChar; f: WFlags): QWidgetH; cdecl;
procedure QWidget_destroy(handle: QWidgetH); cdecl;
function QWidget_winId(handle: QWidgetH): Cardinal; cdecl;
procedure QWidget_setName(handle: QWidgetH; name: PAnsiChar); cdecl;
function QWidget_style(handle: QWidgetH): QStyleH; cdecl;
procedure QWidget_setStyle(handle: QWidgetH; p1: QStyleH); cdecl;
function QWidget_isTopLevel(handle: QWidgetH): Boolean; cdecl;
function QWidget_isModal(handle: QWidgetH): Boolean; cdecl;
function QWidget_isPopup(handle: QWidgetH): Boolean; cdecl;
function QWidget_isDesktop(handle: QWidgetH): Boolean; cdecl;
function QWidget_isEnabled(handle: QWidgetH): Boolean; cdecl;
function QWidget_isEnabledTo(handle: QWidgetH; p1: QWidgetH): Boolean; cdecl;
function QWidget_isEnabledToTLW(handle: QWidgetH): Boolean; cdecl;
procedure QWidget_setEnabled(handle: QWidgetH; p1: Boolean); cdecl;
procedure QWidget_setDisabled(handle: QWidgetH; p1: Boolean); cdecl;
procedure QWidget_frameGeometry(handle: QWidgetH; retval: PRect); cdecl;
procedure QWidget_geometry(handle: QWidgetH; retval: PRect); cdecl;
function QWidget_x(handle: QWidgetH): Integer; cdecl;
function QWidget_y(handle: QWidgetH): Integer; cdecl;
procedure QWidget_pos(handle: QWidgetH; retval: PPoint); cdecl;
procedure QWidget_frameSize(handle: QWidgetH; retval: PSize); cdecl;
procedure QWidget_size(handle: QWidgetH; retval: PSize); cdecl;
function QWidget_width(handle: QWidgetH): Integer; cdecl;
function QWidget_height(handle: QWidgetH): Integer; cdecl;
procedure QWidget_rect(handle: QWidgetH; retval: PRect); cdecl;
procedure QWidget_childrenRect(handle: QWidgetH; retval: PRect); cdecl;
procedure QWidget_childrenRegion(handle: QWidgetH; retval: QRegionH); cdecl;
procedure QWidget_minimumSize(handle: QWidgetH; retval: PSize); cdecl;
procedure QWidget_maximumSize(handle: QWidgetH; retval: PSize); cdecl;
function QWidget_minimumWidth(handle: QWidgetH): Integer; cdecl;
function QWidget_minimumHeight(handle: QWidgetH): Integer; cdecl;
function QWidget_maximumWidth(handle: QWidgetH): Integer; cdecl;
function QWidget_maximumHeight(handle: QWidgetH): Integer; cdecl;
procedure QWidget_setMinimumSize(handle: QWidgetH; p1: PSize); overload; cdecl;
procedure QWidget_setMinimumSize(handle: QWidgetH; minw: Integer; minh: Integer); overload; cdecl;
procedure QWidget_setMaximumSize(handle: QWidgetH; p1: PSize); overload; cdecl;
procedure QWidget_setMaximumSize(handle: QWidgetH; maxw: Integer; maxh: Integer); overload; cdecl;
procedure QWidget_setMinimumWidth(handle: QWidgetH; minw: Integer); cdecl;
procedure QWidget_setMinimumHeight(handle: QWidgetH; minh: Integer); cdecl;
procedure QWidget_setMaximumWidth(handle: QWidgetH; maxw: Integer); cdecl;
procedure QWidget_setMaximumHeight(handle: QWidgetH; maxh: Integer); cdecl;
procedure QWidget_sizeIncrement(handle: QWidgetH; retval: PSize); cdecl;
procedure QWidget_setSizeIncrement(handle: QWidgetH; p1: PSize); overload; cdecl;
procedure QWidget_setSizeIncrement(handle: QWidgetH; w: Integer; h: Integer); overload; cdecl;
procedure QWidget_baseSize(handle: QWidgetH; retval: PSize); cdecl;
procedure QWidget_setBaseSize(handle: QWidgetH; p1: PSize); overload; cdecl;
procedure QWidget_setBaseSize(handle: QWidgetH; basew: Integer; baseh: Integer); overload; cdecl;
procedure QWidget_setFixedSize(handle: QWidgetH; p1: PSize); overload; cdecl;
procedure QWidget_setFixedSize(handle: QWidgetH; w: Integer; h: Integer); overload; cdecl;
procedure QWidget_setFixedWidth(handle: QWidgetH; w: Integer); cdecl;
procedure QWidget_setFixedHeight(handle: QWidgetH; h: Integer); cdecl;
procedure QWidget_mapToGlobal(handle: QWidgetH; retval: PPoint; p1: PPoint); cdecl;
procedure QWidget_mapFromGlobal(handle: QWidgetH; retval: PPoint; p1: PPoint); cdecl;
procedure QWidget_mapToParent(handle: QWidgetH; retval: PPoint; p1: PPoint); cdecl;
procedure QWidget_mapFromParent(handle: QWidgetH; retval: PPoint; p1: PPoint); cdecl;
procedure QWidget_mapTo(handle: QWidgetH; retval: PPoint; p1: QWidgetH; p2: PPoint); cdecl;
procedure QWidget_mapFrom(handle: QWidgetH; retval: PPoint; p1: QWidgetH; p2: PPoint); cdecl;
function QWidget_topLevelWidget(handle: QWidgetH): QWidgetH; cdecl;
function QWidget_backgroundMode(handle: QWidgetH): QWidgetBackgroundMode; cdecl;
procedure QWidget_setBackgroundMode(handle: QWidgetH; p1: QWidgetBackgroundMode); cdecl;
function QWidget_backgroundColor(handle: QWidgetH): QColorH; cdecl;
function QWidget_foregroundColor(handle: QWidgetH): QColorH; cdecl;
procedure QWidget_setBackgroundColor(handle: QWidgetH; p1: QColorH); cdecl;
function QWidget_backgroundPixmap(handle: QWidgetH): QPixmapH; cdecl;
procedure QWidget_setBackgroundPixmap(handle: QWidgetH; p1: QPixmapH); cdecl;
function QWidget_colorGroup(handle: QWidgetH): QColorGroupH; cdecl;
function QWidget_palette(handle: QWidgetH): QPaletteH; cdecl;
function QWidget_ownPalette(handle: QWidgetH): Boolean; cdecl;
procedure QWidget_setPalette(handle: QWidgetH; p1: QPaletteH); overload; cdecl;
procedure QWidget_unsetPalette(handle: QWidgetH); cdecl;
procedure QWidget_font(handle: QWidgetH; retval: QFontH); cdecl;
function QWidget_ownFont(handle: QWidgetH): Boolean; cdecl;
procedure QWidget_setFont(handle: QWidgetH; p1: QFontH); overload; cdecl;
procedure QWidget_unsetFont(handle: QWidgetH); cdecl;
procedure QWidget_fontMetrics(handle: QWidgetH; retval: QFontMetricsH); cdecl;
procedure QWidget_fontInfo(handle: QWidgetH; retval: QFontInfoH); cdecl;
function QWidget_fontPropagation(handle: QWidgetH): QWidgetPropagationMode; cdecl;
procedure QWidget_setFontPropagation(handle: QWidgetH; p1: QWidgetPropagationMode); cdecl;
function QWidget_palettePropagation(handle: QWidgetH): QWidgetPropagationMode; cdecl;
procedure QWidget_setPalettePropagation(handle: QWidgetH; p1: QWidgetPropagationMode); cdecl;
function QWidget_cursor(handle: QWidgetH): QCursorH; cdecl;
function QWidget_ownCursor(handle: QWidgetH): Boolean; cdecl;
procedure QWidget_setCursor(handle: QWidgetH; p1: QCursorH); cdecl;
procedure QWidget_unsetCursor(handle: QWidgetH); cdecl;
procedure QWidget_caption(handle: QWidgetH; retval: PWideString); cdecl;
function QWidget_icon(handle: QWidgetH): QPixmapH; cdecl;
procedure QWidget_iconText(handle: QWidgetH; retval: PWideString); cdecl;
function QWidget_hasMouseTracking(handle: QWidgetH): Boolean; cdecl;
procedure QWidget_setMask(handle: QWidgetH; p1: QBitmapH); overload; cdecl;
procedure QWidget_setMask(handle: QWidgetH; p1: QRegionH); overload; cdecl;
procedure QWidget_clearMask(handle: QWidgetH); cdecl;
procedure QWidget_setCaption(handle: QWidgetH; p1: PWideString); cdecl;
procedure QWidget_setIcon(handle: QWidgetH; p1: QPixmapH); cdecl;
procedure QWidget_setIconText(handle: QWidgetH; p1: PWideString); cdecl;
procedure QWidget_setMouseTracking(handle: QWidgetH; enable: Boolean); cdecl;
procedure QWidget_setFocus(handle: QWidgetH); cdecl;
procedure QWidget_clearFocus(handle: QWidgetH); cdecl;
function QWidget_isActiveWindow(handle: QWidgetH): Boolean; cdecl;
procedure QWidget_setActiveWindow(handle: QWidgetH); cdecl;
function QWidget_isFocusEnabled(handle: QWidgetH): Boolean; cdecl;
function QWidget_focusPolicy(handle: QWidgetH): QWidgetFocusPolicy; cdecl;
procedure QWidget_setFocusPolicy(handle: QWidgetH; p1: QWidgetFocusPolicy); cdecl;
function QWidget_hasFocus(handle: QWidgetH): Boolean; cdecl;
procedure QWidget_setTabOrder(p1: QWidgetH; p2: QWidgetH); cdecl;
procedure QWidget_setFocusProxy(handle: QWidgetH; p1: QWidgetH); cdecl;
function QWidget_focusProxy(handle: QWidgetH): QWidgetH; cdecl;
procedure QWidget_grabMouse(handle: QWidgetH); overload; cdecl;
procedure QWidget_grabMouse(handle: QWidgetH; p1: QCursorH); overload; cdecl;
procedure QWidget_releaseMouse(handle: QWidgetH); cdecl;
procedure QWidget_grabKeyboard(handle: QWidgetH); cdecl;
procedure QWidget_releaseKeyboard(handle: QWidgetH); cdecl;
function QWidget_mouseGrabber(): QWidgetH; cdecl;
function QWidget_keyboardGrabber(): QWidgetH; cdecl;
function QWidget_isUpdatesEnabled(handle: QWidgetH): Boolean; cdecl;
procedure QWidget_setUpdatesEnabled(handle: QWidgetH; enable: Boolean); cdecl;
procedure QWidget_update(handle: QWidgetH); overload; cdecl;
procedure QWidget_update(handle: QWidgetH; x: Integer; y: Integer; w: Integer; h: Integer); overload; cdecl;
procedure QWidget_update(handle: QWidgetH; p1: PRect); overload; cdecl;
procedure QWidget_repaint(handle: QWidgetH); overload; cdecl;
procedure QWidget_repaint(handle: QWidgetH; erase: Boolean); overload; cdecl;
procedure QWidget_repaint(handle: QWidgetH; x: Integer; y: Integer; w: Integer; h: Integer; erase: Boolean); overload; cdecl;
procedure QWidget_repaint(handle: QWidgetH; p1: PRect; erase: Boolean); overload; cdecl;
procedure QWidget_repaint(handle: QWidgetH; p1: QRegionH; erase: Boolean); overload; cdecl;
procedure QWidget_show(handle: QWidgetH); cdecl;
procedure QWidget_hide(handle: QWidgetH); cdecl;
procedure QWidget_iconify(handle: QWidgetH); cdecl;
procedure QWidget_showMinimized(handle: QWidgetH); cdecl;
procedure QWidget_showMaximized(handle: QWidgetH); cdecl;
procedure QWidget_showFullScreen(handle: QWidgetH); cdecl;
procedure QWidget_showNormal(handle: QWidgetH); cdecl;
procedure QWidget_polish(handle: QWidgetH); cdecl;
procedure QWidget_constPolish(handle: QWidgetH); cdecl;
function QWidget_close(handle: QWidgetH): Boolean; overload; cdecl;
procedure QWidget_raise(handle: QWidgetH); cdecl;
procedure QWidget_lower(handle: QWidgetH); cdecl;
procedure QWidget_stackUnder(handle: QWidgetH; p1: QWidgetH); cdecl;
procedure QWidget_move(handle: QWidgetH; x: Integer; y: Integer); overload; cdecl;
procedure QWidget_move(handle: QWidgetH; p1: PPoint); overload; cdecl;
procedure QWidget_resize(handle: QWidgetH; w: Integer; h: Integer); overload; cdecl;
procedure QWidget_resize(handle: QWidgetH; p1: PSize); overload; cdecl;
procedure QWidget_setGeometry(handle: QWidgetH; x: Integer; y: Integer; w: Integer; h: Integer); overload; cdecl;
procedure QWidget_setGeometry(handle: QWidgetH; p1: PRect); overload; cdecl;
function QWidget_close(handle: QWidgetH; alsoDelete: Boolean): Boolean; overload; cdecl;
function QWidget_isVisible(handle: QWidgetH): Boolean; cdecl;
function QWidget_isVisibleTo(handle: QWidgetH; p1: QWidgetH): Boolean; cdecl;
function QWidget_isVisibleToTLW(handle: QWidgetH): Boolean; cdecl;
procedure QWidget_visibleRect(handle: QWidgetH; retval: PRect); cdecl;
function QWidget_isHidden(handle: QWidgetH): Boolean; cdecl;
function QWidget_isMinimized(handle: QWidgetH): Boolean; cdecl;
function QWidget_isMaximized(handle: QWidgetH): Boolean; cdecl;
procedure QWidget_sizeHint(handle: QWidgetH; retval: PSize); cdecl;
procedure QWidget_minimumSizeHint(handle: QWidgetH; retval: PSize); cdecl;
procedure QWidget_sizePolicy(handle: QWidgetH; retval: PSizePolicy); cdecl;
procedure QWidget_setSizePolicy(handle: QWidgetH; p1: PSizePolicy); cdecl;
function QWidget_heightForWidth(handle: QWidgetH; p1: Integer): Integer; cdecl;
procedure QWidget_adjustSize(handle: QWidgetH); cdecl;
function QWidget_layout(handle: QWidgetH): QLayoutH; cdecl;
procedure QWidget_updateGeometry(handle: QWidgetH); cdecl;
procedure QWidget_reparent(handle: QWidgetH; parent: QWidgetH; p2: WFlags; p3: PPoint; showIt: Boolean); overload; cdecl;
procedure QWidget_reparent(handle: QWidgetH; parent: QWidgetH; p2: PPoint; showIt: Boolean); overload; cdecl;
procedure QWidget_recreate(handle: QWidgetH; parent: QWidgetH; f: WFlags; p: PPoint; showIt: Boolean); cdecl;
procedure QWidget_erase(handle: QWidgetH); overload; cdecl;
procedure QWidget_erase(handle: QWidgetH; x: Integer; y: Integer; w: Integer; h: Integer); overload; cdecl;
procedure QWidget_erase(handle: QWidgetH; p1: PRect); overload; cdecl;
procedure QWidget_erase(handle: QWidgetH; p1: QRegionH); overload; cdecl;
procedure QWidget_scroll(handle: QWidgetH; dx: Integer; dy: Integer); overload; cdecl;
procedure QWidget_scroll(handle: QWidgetH; dx: Integer; dy: Integer; p3: PRect); overload; cdecl;
procedure QWidget_drawText(handle: QWidgetH; x: Integer; y: Integer; p3: PWideString); overload; cdecl;
procedure QWidget_drawText(handle: QWidgetH; p1: PPoint; p2: PWideString); overload; cdecl;
function QWidget_focusWidget(handle: QWidgetH): QWidgetH; cdecl;
procedure QWidget_microFocusHint(handle: QWidgetH; retval: PRect); cdecl;
function QWidget_acceptDrops(handle: QWidgetH): Boolean; cdecl;
procedure QWidget_setAcceptDrops(handle: QWidgetH; on: Boolean); cdecl;
procedure QWidget_setAutoMask(handle: QWidgetH; p1: Boolean); cdecl;
function QWidget_autoMask(handle: QWidgetH): Boolean; cdecl;
procedure QWidget_setBackgroundOrigin(handle: QWidgetH; p1: QWidgetBackgroundOrigin); cdecl;
function QWidget_backgroundOrigin(handle: QWidgetH): QWidgetBackgroundOrigin; cdecl;
function QWidget_customWhatsThis(handle: QWidgetH): Boolean; cdecl;
function QWidget_parentWidget(handle: QWidgetH): QWidgetH; cdecl;
function QWidget_testWState(handle: QWidgetH; n: Cardinal): Boolean; cdecl;
function QWidget_testWFlags(handle: QWidgetH; f: WFlags): Boolean; cdecl;
function QWidget_find(p1: Cardinal): QWidgetH; cdecl;
function QWidget_wmapper(): QWidgetMapperH; cdecl;
procedure QWidget_setPalette(handle: QWidgetH; p1: QPaletteH; iReallyMeanIt: Boolean); overload; cdecl;
procedure QWidget_setFont(handle: QWidgetH; p1: QFontH; iReallyMeanIt: Boolean); overload; cdecl;
function QWidget_to_QPaintDevice(handle: QWidgetH): QPaintDeviceH; cdecl;
function QApplication_argc(handle: QApplicationH): Integer; cdecl;
function QApplication_argv(handle: QApplicationH): PPAnsiChar; cdecl;
function QApplication_style(): QStyleH; cdecl;
procedure QApplication_setStyle(p1: QStyleH); cdecl;
function QApplication_colorSpec(): Integer; cdecl;
procedure QApplication_setColorSpec(p1: Integer); cdecl;
function QApplication_overrideCursor(): QCursorH; cdecl;
procedure QApplication_setOverrideCursor(p1: QCursorH; replace: Boolean); cdecl;
procedure QApplication_restoreOverrideCursor(); cdecl;
function QApplication_hasGlobalMouseTracking(): Boolean; cdecl;
procedure QApplication_setGlobalMouseTracking(enable: Boolean); cdecl;
procedure QApplication_palette(retval: QPaletteH; p1: QWidgetH); cdecl;
procedure QApplication_setPalette(p1: QPaletteH; informWidgets: Boolean; className: PAnsiChar); cdecl;
procedure QApplication_font(retval: QFontH; p1: QWidgetH); cdecl;
procedure QApplication_setFont(p1: QFontH; informWidgets: Boolean; className: PAnsiChar); cdecl;
procedure QApplication_fontMetrics(retval: QFontMetricsH); cdecl;
function QApplication_mainWidget(handle: QApplicationH): QWidgetH; cdecl;
procedure QApplication_setMainWidget(handle: QApplicationH; p1: QWidgetH); cdecl;
procedure QApplication_polish(handle: QApplicationH; p1: QWidgetH); cdecl;
function QApplication_allWidgets(): QWidgetListH; cdecl;
function QApplication_topLevelWidgets(): QWidgetListH; cdecl;
function QApplication_desktop(): QWidgetH; cdecl;
function QApplication_activePopupWidget(): QWidgetH; cdecl;
function QApplication_activeModalWidget(): QWidgetH; cdecl;
function QApplication_clipboard(): QClipboardH; cdecl;
function QApplication_focusWidget(handle: QApplicationH): QWidgetH; cdecl;
function QApplication_activeWindow(handle: QApplicationH): QWidgetH; cdecl;
function QApplication_widgetAt(x: Integer; y: Integer; child: Boolean): QWidgetH; overload; cdecl;
function QApplication_widgetAt(p1: PPoint; child: Boolean): QWidgetH; overload; cdecl;
function QApplication_exec(handle: QApplicationH): Integer; cdecl;
procedure QApplication_processEvents(handle: QApplicationH); overload; cdecl;
procedure QApplication_processEvents(handle: QApplicationH; maxtime: Integer); overload; cdecl;
procedure QApplication_processOneEvent(handle: QApplicationH); cdecl;
function QApplication_enter_loop(handle: QApplicationH): Integer; cdecl;
procedure QApplication_exit_loop(handle: QApplicationH); cdecl;
function QApplication_loopLevel(handle: QApplicationH): Integer; cdecl;
procedure QApplication_exit(retcode: Integer); cdecl;
function QApplication_sendEvent(receiver: QObjectH; event: QEventH): Boolean; cdecl;
procedure QApplication_postEvent(receiver: QObjectH; event: QEventH); cdecl;
procedure QApplication_sendPostedEvents(receiver: QObjectH; event_type: Integer); overload; cdecl;
procedure QApplication_sendPostedEvents(); overload; cdecl;
procedure QApplication_removePostedEvents(receiver: QObjectH); cdecl;
function QApplication_notify(handle: QApplicationH; p1: QObjectH; p2: QEventH): Boolean; cdecl;
function QApplication_startingUp(): Boolean; cdecl;
function QApplication_closingDown(): Boolean; cdecl;
procedure QApplication_flushX(); cdecl;
procedure QApplication_syncX(); cdecl;
procedure QApplication_beep(); cdecl;
procedure QApplication_setDefaultCodec(handle: QApplicationH; p1: QTextCodecH); cdecl;
function QApplication_defaultCodec(handle: QApplicationH): QTextCodecH; cdecl;
procedure QApplication_installTranslator(handle: QApplicationH; p1: QTranslatorH); cdecl;
procedure QApplication_removeTranslator(handle: QApplicationH; p1: QTranslatorH); cdecl;
procedure QApplication_translate(handle: QApplicationH; retval: PWideString; p1: PAnsiChar; p2: PAnsiChar); overload; cdecl;
procedure QApplication_translate(handle: QApplicationH; retval: PWideString; p1: PAnsiChar; p2: PAnsiChar; p3: PAnsiChar); overload; cdecl;
procedure QApplication_setWinStyleHighlightColor(p1: QColorH); cdecl;
function QApplication_winStyleHighlightColor(): QColorH; cdecl;
procedure QApplication_setDesktopSettingsAware(p1: Boolean); cdecl;
function QApplication_desktopSettingsAware(): Boolean; cdecl;
procedure QApplication_setCursorFlashTime(p1: Integer); cdecl;
function QApplication_cursorFlashTime(): Integer; cdecl;
procedure QApplication_setDoubleClickInterval(p1: Integer); cdecl;
function QApplication_doubleClickInterval(): Integer; cdecl;
procedure QApplication_setWheelScrollLines(p1: Integer); cdecl;
function QApplication_wheelScrollLines(): Integer; cdecl;
procedure QApplication_setGlobalStrut(p1: PSize); cdecl;
procedure QApplication_globalStrut(retval: PSize); cdecl;
procedure QApplication_setStartDragTime(ms: Integer); cdecl;
function QApplication_startDragTime(): Integer; cdecl;
procedure QApplication_setStartDragDistance(l: Integer); cdecl;
function QApplication_startDragDistance(): Integer; cdecl;
function QApplication_isEffectEnabled(p1: UIEffect): Boolean; cdecl;
procedure QApplication_setEffectEnabled(p1: UIEffect; enable: Boolean); cdecl;
{$IFDEF MSWINDOWS}
function QApplication_winEventFilter(handle: QApplicationH; p1: PMsg): Boolean; cdecl;
{$ENDIF}
{$IFDEF LINUX}
function QApplication_x11EventFilter(handle: QApplicationH; p1: PEvent): Boolean; cdecl;
{$ENDIF}
{$IFDEF LINUX}
function QApplication_x11ClientMessage(handle: QApplicationH; p1: QWidgetH; p2: PEvent; passive_only: Boolean): Integer; cdecl;
{$ENDIF}
{$IFDEF LINUX}
function QApplication_x11ProcessEvent(handle: QApplicationH; p1: PEvent): Integer; cdecl;
{$ENDIF}
{$IFDEF MSWINDOWS}
function QApplication_winVersion(): WindowsVersion; cdecl;
{$ENDIF}
{$IFDEF MSWINDOWS}
procedure QApplication_winFocus(handle: QApplicationH; p1: QWidgetH; p2: Boolean); cdecl;
{$ENDIF}
{$IFDEF MSWINDOWS}
procedure QApplication_winMouseButtonUp(); cdecl;
{$ENDIF}
function QApplication_isSessionRestored(handle: QApplicationH): Boolean; cdecl;
procedure QApplication_sessionId(handle: QApplicationH; retval: PWideString); cdecl;
procedure QApplication_commitData(handle: QApplicationH; sm: QSessionManagerH); cdecl;
procedure QApplication_saveState(handle: QApplicationH; sm: QSessionManagerH); cdecl;
procedure QApplication_create_xim(); cdecl;
procedure QApplication_close_xim(); cdecl;
procedure QApplication_wakeUpGuiThread(handle: QApplicationH); cdecl;
procedure QApplication_quit(handle: QApplicationH); cdecl;
procedure QApplication_closeAllWindows(handle: QApplicationH); cdecl;
function QButton_create(parent: QWidgetH; name: PAnsiChar; f: WFlags): QButtonH; cdecl;
procedure QButton_destroy(handle: QButtonH); cdecl;
procedure QButton_text(handle: QButtonH; retval: PWideString); cdecl;
procedure QButton_setText(handle: QButtonH; p1: PWideString); cdecl;
function QButton_pixmap(handle: QButtonH): QPixmapH; cdecl;
procedure QButton_setPixmap(handle: QButtonH; p1: QPixmapH); cdecl;
function QButton_accel(handle: QButtonH): Integer; cdecl;
procedure QButton_setAccel(handle: QButtonH; p1: Integer); cdecl;
function QButton_isToggleButton(handle: QButtonH): Boolean; cdecl;
function QButton_toggleType(handle: QButtonH): QButtonToggleType; cdecl;
procedure QButton_setDown(handle: QButtonH; p1: Boolean); cdecl;
function QButton_isDown(handle: QButtonH): Boolean; cdecl;
function QButton_isOn(handle: QButtonH): Boolean; cdecl;
function QButton_state(handle: QButtonH): QButtonToggleState; cdecl;
function QButton_autoResize(handle: QButtonH): Boolean; cdecl;
procedure QButton_setAutoResize(handle: QButtonH; p1: Boolean); cdecl;
function QButton_autoRepeat(handle: QButtonH): Boolean; cdecl;
procedure QButton_setAutoRepeat(handle: QButtonH; p1: Boolean); cdecl;
function QButton_isExclusiveToggle(handle: QButtonH): Boolean; cdecl;
function QButton_focusNextPrevChild(handle: QButtonH; next: Boolean): Boolean; cdecl;
function QButton_group(handle: QButtonH): QButtonGroupH; cdecl;
procedure QButton_animateClick(handle: QButtonH); cdecl;
procedure QButton_toggle(handle: QButtonH); cdecl;
function QComboBox_create(parent: QWidgetH; name: PAnsiChar): QComboBoxH; overload; cdecl;
procedure QComboBox_destroy(handle: QComboBoxH); cdecl;
function QComboBox_create(rw: Boolean; parent: QWidgetH; name: PAnsiChar): QComboBoxH; overload; cdecl;
function QComboBox_count(handle: QComboBoxH): Integer; cdecl;
procedure QComboBox_insertStringList(handle: QComboBoxH; p1: QStringListH; index: Integer); cdecl;
procedure QComboBox_insertStrList(handle: QComboBoxH; p1: QStrListH; index: Integer); overload; cdecl;
procedure QComboBox_insertStrList(handle: QComboBoxH; p1: PPAnsiChar; numStrings: Integer; index: Integer); overload; cdecl;
procedure QComboBox_insertItem(handle: QComboBoxH; text: PWideString; index: Integer); overload; cdecl;
procedure QComboBox_insertItem(handle: QComboBoxH; pixmap: QPixmapH; index: Integer); overload; cdecl;
procedure QComboBox_insertItem(handle: QComboBoxH; pixmap: QPixmapH; text: PWideString; index: Integer); overload; cdecl;
procedure QComboBox_removeItem(handle: QComboBoxH; index: Integer); cdecl;
procedure QComboBox_clear(handle: QComboBoxH); cdecl;
procedure QComboBox_currentText(handle: QComboBoxH; retval: PWideString); cdecl;
procedure QComboBox_text(handle: QComboBoxH; retval: PWideString; index: Integer); cdecl;
function QComboBox_pixmap(handle: QComboBoxH; index: Integer): QPixmapH; cdecl;
procedure QComboBox_changeItem(handle: QComboBoxH; text: PWideString; index: Integer); overload; cdecl;
procedure QComboBox_changeItem(handle: QComboBoxH; pixmap: QPixmapH; index: Integer); overload; cdecl;
procedure QComboBox_changeItem(handle: QComboBoxH; pixmap: QPixmapH; text: PWideString; index: Integer); overload; cdecl;
function QComboBox_currentItem(handle: QComboBoxH): Integer; cdecl;
procedure QComboBox_setCurrentItem(handle: QComboBoxH; index: Integer); cdecl;
function QComboBox_autoResize(handle: QComboBoxH): Boolean; cdecl;
procedure QComboBox_setAutoResize(handle: QComboBoxH; p1: Boolean); cdecl;
procedure QComboBox_sizeHint(handle: QComboBoxH; retval: PSize); cdecl;
procedure QComboBox_sizePolicy(handle: QComboBoxH; retval: PSizePolicy); cdecl;
procedure QComboBox_setBackgroundColor(handle: QComboBoxH; p1: QColorH); cdecl;
procedure QComboBox_setPalette(handle: QComboBoxH; p1: QPaletteH); cdecl;
procedure QComboBox_setFont(handle: QComboBoxH; p1: QFontH); cdecl;
procedure QComboBox_setEnabled(handle: QComboBoxH; p1: Boolean); cdecl;
procedure QComboBox_setSizeLimit(handle: QComboBoxH; p1: Integer); cdecl;
function QComboBox_sizeLimit(handle: QComboBoxH): Integer; cdecl;
procedure QComboBox_setMaxCount(handle: QComboBoxH; p1: Integer); cdecl;
function QComboBox_maxCount(handle: QComboBoxH): Integer; cdecl;
procedure QComboBox_setInsertionPolicy(handle: QComboBoxH; policy: QComboBoxPolicy); cdecl;
function QComboBox_insertionPolicy(handle: QComboBoxH): QComboBoxPolicy; cdecl;
procedure QComboBox_setValidator(handle: QComboBoxH; p1: QValidatorH); cdecl;
function QComboBox_validator(handle: QComboBoxH): QValidatorH; cdecl;
procedure QComboBox_setListBox(handle: QComboBoxH; p1: QListBoxH); cdecl;
function QComboBox_listBox(handle: QComboBoxH): QListBoxH; cdecl;
function QComboBox_lineEdit(handle: QComboBoxH): QLineEditH; cdecl;
procedure QComboBox_setAutoCompletion(handle: QComboBoxH; p1: Boolean); cdecl;
function QComboBox_autoCompletion(handle: QComboBoxH): Boolean; cdecl;
function QComboBox_eventFilter(handle: QComboBoxH; AnObject: QObjectH; event: QEventH): Boolean; cdecl;
procedure QComboBox_setDuplicatesEnabled(handle: QComboBoxH; enable: Boolean); cdecl;
function QComboBox_duplicatesEnabled(handle: QComboBoxH): Boolean; cdecl;
function QComboBox_editable(handle: QComboBoxH): Boolean; cdecl;
procedure QComboBox_setEditable(handle: QComboBoxH; p1: Boolean); cdecl;
procedure QComboBox_clearValidator(handle: QComboBoxH); cdecl;
procedure QComboBox_clearEdit(handle: QComboBoxH); cdecl;
procedure QComboBox_setEditText(handle: QComboBoxH; p1: PWideString); cdecl;
function QDialog_create(parent: QWidgetH; name: PAnsiChar; modal: Boolean; f: WFlags): QDialogH; cdecl;
procedure QDialog_destroy(handle: QDialogH); cdecl;
function QDialog_exec(handle: QDialogH): Integer; cdecl;
function QDialog_result(handle: QDialogH): Integer; cdecl;
procedure QDialog_show(handle: QDialogH); cdecl;
procedure QDialog_hide(handle: QDialogH); cdecl;
procedure QDialog_move(handle: QDialogH; x: Integer; y: Integer); overload; cdecl;
procedure QDialog_move(handle: QDialogH; p: PPoint); overload; cdecl;
procedure QDialog_resize(handle: QDialogH; w: Integer; h: Integer); overload; cdecl;
procedure QDialog_resize(handle: QDialogH; p1: PSize); overload; cdecl;
procedure QDialog_setGeometry(handle: QDialogH; x: Integer; y: Integer; w: Integer; h: Integer); overload; cdecl;
procedure QDialog_setGeometry(handle: QDialogH; p1: PRect); overload; cdecl;
procedure QDialog_setOrientation(handle: QDialogH; orientation: Orientation); cdecl;
function QDialog_orientation(handle: QDialogH): Orientation; cdecl;
procedure QDialog_setExtension(handle: QDialogH; extension: QWidgetH); cdecl;
function QDialog_extension(handle: QDialogH): QWidgetH; cdecl;
procedure QDialog_sizeHint(handle: QDialogH; retval: PSize); cdecl;
procedure QDialog_minimumSizeHint(handle: QDialogH; retval: PSize); cdecl;
procedure QDialog_setSizeGripEnabled(handle: QDialogH; p1: Boolean); cdecl;
function QDialog_isSizeGripEnabled(handle: QDialogH): Boolean; cdecl;
procedure QDragObject_destroy(handle: QDragObjectH); cdecl;
function QDragObject_drag(handle: QDragObjectH): Boolean; cdecl;
function QDragObject_dragMove(handle: QDragObjectH): Boolean; cdecl;
procedure QDragObject_dragCopy(handle: QDragObjectH); cdecl;
procedure QDragObject_setPixmap(handle: QDragObjectH; p1: QPixmapH); overload; cdecl;
procedure QDragObject_setPixmap(handle: QDragObjectH; p1: QPixmapH; hotspot: PPoint); overload; cdecl;
procedure QDragObject_pixmap(handle: QDragObjectH; retval: QPixmapH); cdecl;
procedure QDragObject_pixmapHotSpot(handle: QDragObjectH; retval: PPoint); cdecl;
function QDragObject_source(handle: QDragObjectH): QWidgetH; cdecl;
function QDragObject_target(): QWidgetH; cdecl;
procedure QDragObject_setTarget(p1: QWidgetH); cdecl;
function QDragObject_to_QMimeSource(handle: QDragObjectH): QMimeSourceH; cdecl;
function QStoredDrag_create(mimeType: PAnsiChar; dragSource: QWidgetH; name: PAnsiChar): QStoredDragH; cdecl;
procedure QStoredDrag_destroy(handle: QStoredDragH); cdecl;
procedure QStoredDrag_setEncodedData(handle: QStoredDragH; p1: QByteArrayH); cdecl;
function QStoredDrag_format(handle: QStoredDragH; i: Integer): PAnsiChar; cdecl;
procedure QStoredDrag_encodedData(handle: QStoredDragH; retval: QByteArrayH; p1: PAnsiChar); cdecl;
function QTextDrag_create(p1: PWideString; dragSource: QWidgetH; name: PAnsiChar): QTextDragH; overload; cdecl;
procedure QTextDrag_destroy(handle: QTextDragH); cdecl;
function QTextDrag_create(dragSource: QWidgetH; name: PAnsiChar): QTextDragH; overload; cdecl;
procedure QTextDrag_setText(handle: QTextDragH; p1: PWideString); cdecl;
procedure QTextDrag_setSubtype(handle: QTextDragH; p1: PAnsiString); cdecl;
function QTextDrag_format(handle: QTextDragH; i: Integer): PAnsiChar; cdecl;
procedure QTextDrag_encodedData(handle: QTextDragH; retval: QByteArrayH; p1: PAnsiChar); cdecl;
function QTextDrag_canDecode(e: QMimeSourceH): Boolean; cdecl;
function QTextDrag_decode(e: QMimeSourceH; s: PWideString): Boolean; overload; cdecl;
function QTextDrag_decode(e: QMimeSourceH; s: PWideString; subtype: PAnsiString): Boolean; overload; cdecl;
function QImageDrag_create(image: QImageH; dragSource: QWidgetH; name: PAnsiChar): QImageDragH; overload; cdecl;
procedure QImageDrag_destroy(handle: QImageDragH); cdecl;
function QImageDrag_create(dragSource: QWidgetH; name: PAnsiChar): QImageDragH; overload; cdecl;
procedure QImageDrag_setImage(handle: QImageDragH; image: QImageH); cdecl;
function QImageDrag_format(handle: QImageDragH; i: Integer): PAnsiChar; cdecl;
procedure QImageDrag_encodedData(handle: QImageDragH; retval: QByteArrayH; p1: PAnsiChar); cdecl;
function QImageDrag_canDecode(e: QMimeSourceH): Boolean; cdecl;
function QImageDrag_decode(e: QMimeSourceH; i: QImageH): Boolean; overload; cdecl;
function QImageDrag_decode(e: QMimeSourceH; i: QPixmapH): Boolean; overload; cdecl;
function QUriDrag_create(uris: QStrListH; dragSource: QWidgetH; name: PAnsiChar): QUriDragH; overload; cdecl;
procedure QUriDrag_destroy(handle: QUriDragH); cdecl;
function QUriDrag_create(dragSource: QWidgetH; name: PAnsiChar): QUriDragH; overload; cdecl;
procedure QUriDrag_setFilenames(handle: QUriDragH; fnames: QStringListH); cdecl;
procedure QUriDrag_setUnicodeUris(handle: QUriDragH; uuris: QStringListH); cdecl;
procedure QUriDrag_setUris(handle: QUriDragH; uris: QStrListH); cdecl;
procedure QUriDrag_uriToLocalFile(retval: PWideString; p1: PAnsiChar); cdecl;
procedure QUriDrag_localFileToUri(retval: PAnsiString; p1: PWideString); cdecl;
procedure QUriDrag_uriToUnicodeUri(retval: PWideString; p1: PAnsiChar); cdecl;
procedure QUriDrag_unicodeUriToUri(retval: PAnsiString; p1: PWideString); cdecl;
function QUriDrag_canDecode(e: QMimeSourceH): Boolean; cdecl;
function QUriDrag_decode(e: QMimeSourceH; i: QStrListH): Boolean; cdecl;
function QUriDrag_decodeToUnicodeUris(e: QMimeSourceH; i: QStringListH): Boolean; cdecl;
function QUriDrag_decodeLocalFiles(e: QMimeSourceH; i: QStringListH): Boolean; cdecl;
function QColorDrag_create(col: QColorH; dragsource: QWidgetH; name: PAnsiChar): QColorDragH; overload; cdecl;
procedure QColorDrag_destroy(handle: QColorDragH); cdecl;
function QColorDrag_create(dragSource: QWidgetH; name: PAnsiChar): QColorDragH; overload; cdecl;
procedure QColorDrag_setColor(handle: QColorDragH; col: QColorH); cdecl;
function QColorDrag_canDecode(p1: QMimeSourceH): Boolean; cdecl;
function QColorDrag_decode(p1: QMimeSourceH; col: QColorH): Boolean; cdecl;
function QEvent_create(_type: QEventType): QEventH; cdecl;
procedure QEvent_destroy(handle: QEventH); cdecl;
function QEvent_type(handle: QEventH): QEventType; cdecl;
function QTimerEvent_create(timerId: Integer): QTimerEventH; cdecl;
procedure QTimerEvent_destroy(handle: QTimerEventH); cdecl;
function QTimerEvent_timerId(handle: QTimerEventH): Integer; cdecl;
function QMouseEvent_create(_type: QEventType; pos: PPoint; button: Integer; state: Integer): QMouseEventH; overload; cdecl;
procedure QMouseEvent_destroy(handle: QMouseEventH); cdecl;
function QMouseEvent_create(_type: QEventType; pos: PPoint; globalPos: PPoint; button: Integer; state: Integer): QMouseEventH; overload; cdecl;
function QMouseEvent_pos(handle: QMouseEventH): PPoint; cdecl;
function QMouseEvent_globalPos(handle: QMouseEventH): PPoint; cdecl;
function QMouseEvent_x(handle: QMouseEventH): Integer; cdecl;
function QMouseEvent_y(handle: QMouseEventH): Integer; cdecl;
function QMouseEvent_globalX(handle: QMouseEventH): Integer; cdecl;
function QMouseEvent_globalY(handle: QMouseEventH): Integer; cdecl;
function QMouseEvent_button(handle: QMouseEventH): ButtonState; cdecl;
function QMouseEvent_state(handle: QMouseEventH): ButtonState; cdecl;
function QMouseEvent_stateAfter(handle: QMouseEventH): ButtonState; cdecl;
function QWheelEvent_create(pos: PPoint; delta: Integer; state: Integer): QWheelEventH; overload; cdecl;
procedure QWheelEvent_destroy(handle: QWheelEventH); cdecl;
function QWheelEvent_create(pos: PPoint; globalPos: PPoint; delta: Integer; state: Integer): QWheelEventH; overload; cdecl;
function QWheelEvent_delta(handle: QWheelEventH): Integer; cdecl;
function QWheelEvent_pos(handle: QWheelEventH): PPoint; cdecl;
function QWheelEvent_globalPos(handle: QWheelEventH): PPoint; cdecl;
function QWheelEvent_x(handle: QWheelEventH): Integer; cdecl;
function QWheelEvent_y(handle: QWheelEventH): Integer; cdecl;
function QWheelEvent_globalX(handle: QWheelEventH): Integer; cdecl;
function QWheelEvent_globalY(handle: QWheelEventH): Integer; cdecl;
function QWheelEvent_state(handle: QWheelEventH): ButtonState; cdecl;
function QWheelEvent_isAccepted(handle: QWheelEventH): Boolean; cdecl;
procedure QWheelEvent_accept(handle: QWheelEventH); cdecl;
procedure QWheelEvent_ignore(handle: QWheelEventH); cdecl;
function QKeyEvent_create(_type: QEventType; key: Integer; ascii: Integer; state: Integer; text: PWideString; autorep: Boolean; count: Word): QKeyEventH; cdecl;
procedure QKeyEvent_destroy(handle: QKeyEventH); cdecl;
function QKeyEvent_key(handle: QKeyEventH): Integer; cdecl;
function QKeyEvent_ascii(handle: QKeyEventH): Integer; cdecl;
function QKeyEvent_state(handle: QKeyEventH): ButtonState; cdecl;
function QKeyEvent_stateAfter(handle: QKeyEventH): ButtonState; cdecl;
function QKeyEvent_isAccepted(handle: QKeyEventH): Boolean; cdecl;
procedure QKeyEvent_text(handle: QKeyEventH; retval: PWideString); cdecl;
function QKeyEvent_isAutoRepeat(handle: QKeyEventH): Boolean; cdecl;
function QKeyEvent_count(handle: QKeyEventH): Integer; cdecl;
procedure QKeyEvent_accept(handle: QKeyEventH); cdecl;
procedure QKeyEvent_ignore(handle: QKeyEventH); cdecl;
function QFocusEvent_create(_type: QEventType): QFocusEventH; cdecl;
procedure QFocusEvent_destroy(handle: QFocusEventH); cdecl;
function QFocusEvent_gotFocus(handle: QFocusEventH): Boolean; cdecl;
function QFocusEvent_lostFocus(handle: QFocusEventH): Boolean; cdecl;
function QFocusEvent_reason(): QFocusEventReason; cdecl;
procedure QFocusEvent_setReason(reason: QFocusEventReason); cdecl;
procedure QFocusEvent_resetReason(); cdecl;
function QPaintEvent_create(paintRegion: QRegionH; erased: Boolean): QPaintEventH; overload; cdecl;
procedure QPaintEvent_destroy(handle: QPaintEventH); cdecl;
function QPaintEvent_create(paintRect: PRect; erased: Boolean): QPaintEventH; overload; cdecl;
procedure QPaintEvent_rect(handle: QPaintEventH; retval: PRect); cdecl;
function QPaintEvent_region(handle: QPaintEventH): QRegionH; cdecl;
function QPaintEvent_erased(handle: QPaintEventH): Boolean; cdecl;
function QMoveEvent_create(pos: PPoint; oldPos: PPoint): QMoveEventH; cdecl;
procedure QMoveEvent_destroy(handle: QMoveEventH); cdecl;
function QMoveEvent_pos(handle: QMoveEventH): PPoint; cdecl;
function QMoveEvent_oldPos(handle: QMoveEventH): PPoint; cdecl;
function QResizeEvent_create(size: PSize; oldSize: PSize): QResizeEventH; cdecl;
procedure QResizeEvent_destroy(handle: QResizeEventH); cdecl;
function QResizeEvent_size(handle: QResizeEventH): PSize; cdecl;
function QResizeEvent_oldSize(handle: QResizeEventH): PSize; cdecl;
function QCloseEvent_create(): QCloseEventH; cdecl;
procedure QCloseEvent_destroy(handle: QCloseEventH); cdecl;
function QCloseEvent_isAccepted(handle: QCloseEventH): Boolean; cdecl;
procedure QCloseEvent_accept(handle: QCloseEventH); cdecl;
procedure QCloseEvent_ignore(handle: QCloseEventH); cdecl;
function QShowEvent_create(spontaneous: Boolean): QShowEventH; cdecl;
procedure QShowEvent_destroy(handle: QShowEventH); cdecl;
function QShowEvent_spontaneous(handle: QShowEventH): Boolean; cdecl;
function QHideEvent_create(spontaneous: Boolean): QHideEventH; cdecl;
procedure QHideEvent_destroy(handle: QHideEventH); cdecl;
function QHideEvent_spontaneous(handle: QHideEventH): Boolean; cdecl;
function QDropEvent_create(pos: PPoint; typ: QEventType): QDropEventH; cdecl;
procedure QDropEvent_destroy(handle: QDropEventH); cdecl;
function QDropEvent_pos(handle: QDropEventH): PPoint; cdecl;
function QDropEvent_isAccepted(handle: QDropEventH): Boolean; cdecl;
procedure QDropEvent_accept(handle: QDropEventH; y: Boolean); cdecl;
procedure QDropEvent_ignore(handle: QDropEventH); cdecl;
function QDropEvent_isActionAccepted(handle: QDropEventH): Boolean; cdecl;
procedure QDropEvent_acceptAction(handle: QDropEventH; y: Boolean); cdecl;
procedure QDropEvent_setAction(handle: QDropEventH; a: QDropEventAction); cdecl;
function QDropEvent_action(handle: QDropEventH): QDropEventAction; cdecl;
function QDropEvent_source(handle: QDropEventH): QWidgetH; cdecl;
function QDropEvent_format(handle: QDropEventH; n: Integer): PAnsiChar; cdecl;
procedure QDropEvent_encodedData(handle: QDropEventH; retval: QByteArrayH; p1: PAnsiChar); cdecl;
function QDropEvent_provides(handle: QDropEventH; p1: PAnsiChar): Boolean; cdecl;
procedure QDropEvent_data(handle: QDropEventH; retval: QByteArrayH; f: PAnsiChar); cdecl;
procedure QDropEvent_setPoint(handle: QDropEventH; np: PPoint); cdecl;
function QDropEvent_to_QMimeSource(handle: QDropEventH): QMimeSourceH; cdecl;
function QDragMoveEvent_create(pos: PPoint; typ: QEventType): QDragMoveEventH; cdecl;
procedure QDragMoveEvent_destroy(handle: QDragMoveEventH); cdecl;
procedure QDragMoveEvent_answerRect(handle: QDragMoveEventH; retval: PRect); cdecl;
procedure QDragMoveEvent_accept(handle: QDragMoveEventH; y: Boolean); overload; cdecl;
procedure QDragMoveEvent_accept(handle: QDragMoveEventH; r: PRect); overload; cdecl;
procedure QDragMoveEvent_ignore(handle: QDragMoveEventH; r: PRect); overload; cdecl;
procedure QDragMoveEvent_ignore(handle: QDragMoveEventH); overload; cdecl;
function QDragEnterEvent_create(pos: PPoint): QDragEnterEventH; cdecl;
procedure QDragEnterEvent_destroy(handle: QDragEnterEventH); cdecl;
function QDragResponseEvent_create(accepted: Boolean): QDragResponseEventH; cdecl;
procedure QDragResponseEvent_destroy(handle: QDragResponseEventH); cdecl;
function QDragResponseEvent_dragAccepted(handle: QDragResponseEventH): Boolean; cdecl;
function QDragLeaveEvent_create(): QDragLeaveEventH; cdecl;
procedure QDragLeaveEvent_destroy(handle: QDragLeaveEventH); cdecl;
function QChildEvent_create(_type: QEventType; child: QObjectH): QChildEventH; cdecl;
procedure QChildEvent_destroy(handle: QChildEventH); cdecl;
function QChildEvent_child(handle: QChildEventH): QObjectH; cdecl;
function QChildEvent_inserted(handle: QChildEventH): Boolean; cdecl;
function QChildEvent_removed(handle: QChildEventH): Boolean; cdecl;
function QCustomEvent_create(_type: Integer): QCustomEventH; overload; cdecl;
procedure QCustomEvent_destroy(handle: QCustomEventH); cdecl;
function QCustomEvent_create(_type: QEventType; data: Pointer): QCustomEventH; overload; cdecl;
function QCustomEvent_data(handle: QCustomEventH): Pointer; cdecl;
procedure QCustomEvent_setData(handle: QCustomEventH; data: Pointer); cdecl;
function QFrame_create(parent: QWidgetH; name: PAnsiChar; f: WFlags; p4: Boolean): QFrameH; cdecl;
procedure QFrame_destroy(handle: QFrameH); cdecl;
function QFrame_frameStyle(handle: QFrameH): Integer; cdecl;
procedure QFrame_setFrameStyle(handle: QFrameH; p1: Integer); cdecl;
function QFrame_frameWidth(handle: QFrameH): Integer; cdecl;
procedure QFrame_contentsRect(handle: QFrameH; retval: PRect); cdecl;
function QFrame_lineShapesOk(handle: QFrameH): Boolean; cdecl;
procedure QFrame_sizeHint(handle: QFrameH; retval: PSize); cdecl;
procedure QFrame_sizePolicy(handle: QFrameH; retval: PSizePolicy); cdecl;
function QFrame_frameShape(handle: QFrameH): QFrameShape; cdecl;
procedure QFrame_setFrameShape(handle: QFrameH; p1: QFrameShape); cdecl;
function QFrame_frameShadow(handle: QFrameH): QFrameShadow; cdecl;
procedure QFrame_setFrameShadow(handle: QFrameH; p1: QFrameShadow); cdecl;
function QFrame_lineWidth(handle: QFrameH): Integer; cdecl;
procedure QFrame_setLineWidth(handle: QFrameH; p1: Integer); cdecl;
function QFrame_margin(handle: QFrameH): Integer; cdecl;
procedure QFrame_setMargin(handle: QFrameH; p1: Integer); cdecl;
function QFrame_midLineWidth(handle: QFrameH): Integer; cdecl;
procedure QFrame_setMidLineWidth(handle: QFrameH; p1: Integer); cdecl;
procedure QFrame_frameRect(handle: QFrameH; retval: PRect); cdecl;
procedure QFrame_setFrameRect(handle: QFrameH; p1: PRect); cdecl;
function QIconDragItem_create(): QIconDragItemH; cdecl;
procedure QIconDragItem_destroy(handle: QIconDragItemH); cdecl;
procedure QIconDragItem_data(handle: QIconDragItemH; retval: QByteArrayH); cdecl;
procedure QIconDragItem_setData(handle: QIconDragItemH; d: QByteArrayH); cdecl;
function QIconDrag_create(dragSource: QWidgetH; name: PAnsiChar): QIconDragH; cdecl;
procedure QIconDrag_destroy(handle: QIconDragH); cdecl;
procedure QIconDrag_append(handle: QIconDragH; item: QIconDragItemH; pr: PRect; tr: PRect); cdecl;
function QIconDrag_format(handle: QIconDragH; i: Integer): PAnsiChar; cdecl;
function QIconDrag_canDecode(e: QMimeSourceH): Boolean; cdecl;
procedure QIconDrag_encodedData(handle: QIconDragH; retval: QByteArrayH; mime: PAnsiChar); cdecl;
function QIconViewItem_create(parent: QIconViewH): QIconViewItemH; overload; cdecl;
procedure QIconViewItem_destroy(handle: QIconViewItemH); cdecl;
function QIconViewItem_create(parent: QIconViewH; after: QIconViewItemH): QIconViewItemH; overload; cdecl;
function QIconViewItem_create(parent: QIconViewH; text: PWideString): QIconViewItemH; overload; cdecl;
function QIconViewItem_create(parent: QIconViewH; after: QIconViewItemH; text: PWideString): QIconViewItemH; overload; cdecl;
function QIconViewItem_create(parent: QIconViewH; text: PWideString; icon: QPixmapH): QIconViewItemH; overload; cdecl;
function QIconViewItem_create(parent: QIconViewH; after: QIconViewItemH; text: PWideString; icon: QPixmapH): QIconViewItemH; overload; cdecl;
procedure QIconViewItem_setRenameEnabled(handle: QIconViewItemH; allow: Boolean); cdecl;
procedure QIconViewItem_setDragEnabled(handle: QIconViewItemH; allow: Boolean); cdecl;
procedure QIconViewItem_setDropEnabled(handle: QIconViewItemH; allow: Boolean); cdecl;
procedure QIconViewItem_text(handle: QIconViewItemH; retval: PWideString); cdecl;
function QIconViewItem_pixmap(handle: QIconViewItemH): QPixmapH; cdecl;
procedure QIconViewItem_key(handle: QIconViewItemH; retval: PWideString); cdecl;
function QIconViewItem_renameEnabled(handle: QIconViewItemH): Boolean; cdecl;
function QIconViewItem_dragEnabled(handle: QIconViewItemH): Boolean; cdecl;
function QIconViewItem_dropEnabled(handle: QIconViewItemH): Boolean; cdecl;
function QIconViewItem_iconView(handle: QIconViewItemH): QIconViewH; cdecl;
function QIconViewItem_prevItem(handle: QIconViewItemH): QIconViewItemH; cdecl;
function QIconViewItem_nextItem(handle: QIconViewItemH): QIconViewItemH; cdecl;
function QIconViewItem_index(handle: QIconViewItemH): Integer; cdecl;
procedure QIconViewItem_setSelected(handle: QIconViewItemH; s: Boolean; cb: Boolean); overload; cdecl;
procedure QIconViewItem_setSelected(handle: QIconViewItemH; s: Boolean); overload; cdecl;
procedure QIconViewItem_setSelectable(handle: QIconViewItemH; s: Boolean); cdecl;
function QIconViewItem_isSelected(handle: QIconViewItemH): Boolean; cdecl;
function QIconViewItem_isSelectable(handle: QIconViewItemH): Boolean; cdecl;
procedure QIconViewItem_repaint(handle: QIconViewItemH); cdecl;
procedure QIconViewItem_move(handle: QIconViewItemH; x: Integer; y: Integer); overload; cdecl;
procedure QIconViewItem_moveBy(handle: QIconViewItemH; dx: Integer; dy: Integer); overload; cdecl;
procedure QIconViewItem_move(handle: QIconViewItemH; pnt: PPoint); overload; cdecl;
procedure QIconViewItem_moveBy(handle: QIconViewItemH; pnt: PPoint); overload; cdecl;
procedure QIconViewItem_rect(handle: QIconViewItemH; retval: PRect); cdecl;
function QIconViewItem_x(handle: QIconViewItemH): Integer; cdecl;
function QIconViewItem_y(handle: QIconViewItemH): Integer; cdecl;
function QIconViewItem_width(handle: QIconViewItemH): Integer; cdecl;
function QIconViewItem_height(handle: QIconViewItemH): Integer; cdecl;
procedure QIconViewItem_size(handle: QIconViewItemH; retval: PSize); cdecl;
procedure QIconViewItem_pos(handle: QIconViewItemH; retval: PPoint); cdecl;
procedure QIconViewItem_textRect(handle: QIconViewItemH; retval: PRect; relative: Boolean); cdecl;
procedure QIconViewItem_pixmapRect(handle: QIconViewItemH; retval: PRect; relative: Boolean); cdecl;
function QIconViewItem_contains(handle: QIconViewItemH; pnt: PPoint): Boolean; cdecl;
function QIconViewItem_intersects(handle: QIconViewItemH; r: PRect): Boolean; cdecl;
function QIconViewItem_acceptDrop(handle: QIconViewItemH; mime: QMimeSourceH): Boolean; cdecl;
procedure QIconViewItem_rename(handle: QIconViewItemH); cdecl;
function QIconViewItem_compare(handle: QIconViewItemH; i: QIconViewItemH): Integer; cdecl;
procedure QIconViewItem_setText(handle: QIconViewItemH; text: PWideString); overload; cdecl;
procedure QIconViewItem_setPixmap(handle: QIconViewItemH; icon: QPixmapH); overload; cdecl;
procedure QIconViewItem_setText(handle: QIconViewItemH; text: PWideString; recalc: Boolean; redraw: Boolean); overload; cdecl;
procedure QIconViewItem_setPixmap(handle: QIconViewItemH; icon: QPixmapH; recalc: Boolean; redraw: Boolean); overload; cdecl;
procedure QIconViewItem_setKey(handle: QIconViewItemH; k: PWideString); cdecl;
function QIconView_create(parent: QWidgetH; name: PAnsiChar; f: WFlags): QIconViewH; cdecl;
procedure QIconView_destroy(handle: QIconViewH); cdecl;
procedure QIconView_insertItem(handle: QIconViewH; item: QIconViewItemH; after: QIconViewItemH); cdecl;
procedure QIconView_takeItem(handle: QIconViewH; item: QIconViewItemH); cdecl;
function QIconView_index(handle: QIconViewH; item: QIconViewItemH): Integer; cdecl;
function QIconView_firstItem(handle: QIconViewH): QIconViewItemH; cdecl;
function QIconView_lastItem(handle: QIconViewH): QIconViewItemH; cdecl;
function QIconView_currentItem(handle: QIconViewH): QIconViewItemH; cdecl;
procedure QIconView_setCurrentItem(handle: QIconViewH; item: QIconViewItemH); cdecl;
procedure QIconView_setSelected(handle: QIconViewH; item: QIconViewItemH; s: Boolean; cb: Boolean); cdecl;
function QIconView_count(handle: QIconViewH): Cardinal; cdecl;
procedure QIconView_showEvent(handle: QIconViewH; p1: QShowEventH); cdecl;
procedure QIconView_setSelectionMode(handle: QIconViewH; m: QIconViewSelectionMode); cdecl;
function QIconView_selectionMode(handle: QIconViewH): QIconViewSelectionMode; cdecl;
function QIconView_findItem(handle: QIconViewH; pos: PPoint): QIconViewItemH; overload; cdecl;
function QIconView_findItem(handle: QIconViewH; text: PWideString): QIconViewItemH; overload; cdecl;
procedure QIconView_selectAll(handle: QIconViewH; select: Boolean); cdecl;
procedure QIconView_clearSelection(handle: QIconViewH); cdecl;
procedure QIconView_invertSelection(handle: QIconViewH); cdecl;
procedure QIconView_repaintItem(handle: QIconViewH; item: QIconViewItemH); cdecl;
procedure QIconView_ensureItemVisible(handle: QIconViewH; item: QIconViewItemH); cdecl;
function QIconView_findFirstVisibleItem(handle: QIconViewH; r: PRect): QIconViewItemH; cdecl;
function QIconView_findLastVisibleItem(handle: QIconViewH; r: PRect): QIconViewItemH; cdecl;
procedure QIconView_clear(handle: QIconViewH); cdecl;
procedure QIconView_setGridX(handle: QIconViewH; rx: Integer); cdecl;
procedure QIconView_setGridY(handle: QIconViewH; ry: Integer); cdecl;
function QIconView_gridX(handle: QIconViewH): Integer; cdecl;
function QIconView_gridY(handle: QIconViewH): Integer; cdecl;
procedure QIconView_setSpacing(handle: QIconViewH; sp: Integer); cdecl;
function QIconView_spacing(handle: QIconViewH): Integer; cdecl;
procedure QIconView_setItemTextPos(handle: QIconViewH; pos: QIconViewItemTextPos); cdecl;
function QIconView_itemTextPos(handle: QIconViewH): QIconViewItemTextPos; cdecl;
procedure QIconView_setItemTextBackground(handle: QIconViewH; b: QBrushH); cdecl;
procedure QIconView_setArrangement(handle: QIconViewH; am: QIconViewArrangement); cdecl;
function QIconView_arrangement(handle: QIconViewH): QIconViewArrangement; cdecl;
procedure QIconView_setResizeMode(handle: QIconViewH; am: QIconViewResizeMode); cdecl;
function QIconView_resizeMode(handle: QIconViewH): QIconViewResizeMode; cdecl;
procedure QIconView_setMaxItemWidth(handle: QIconViewH; w: Integer); cdecl;
function QIconView_maxItemWidth(handle: QIconViewH): Integer; cdecl;
procedure QIconView_setMaxItemTextLength(handle: QIconViewH; w: Integer); cdecl;
function QIconView_maxItemTextLength(handle: QIconViewH): Integer; cdecl;
procedure QIconView_setAutoArrange(handle: QIconViewH; b: Boolean); cdecl;
function QIconView_autoArrange(handle: QIconViewH): Boolean; cdecl;
procedure QIconView_setShowToolTips(handle: QIconViewH; b: Boolean); cdecl;
function QIconView_showToolTips(handle: QIconViewH): Boolean; cdecl;
procedure QIconView_setSorting(handle: QIconViewH; sort: Boolean; ascending: Boolean); cdecl;
function QIconView_sorting(handle: QIconViewH): Boolean; cdecl;
function QIconView_sortDirection(handle: QIconViewH): Boolean; cdecl;
procedure QIconView_setItemsMovable(handle: QIconViewH; b: Boolean); cdecl;
function QIconView_itemsMovable(handle: QIconViewH): Boolean; cdecl;
procedure QIconView_setWordWrapIconText(handle: QIconViewH; b: Boolean); cdecl;
function QIconView_wordWrapIconText(handle: QIconViewH): Boolean; cdecl;
function QIconView_eventFilter(handle: QIconViewH; o: QObjectH; p2: QEventH): Boolean; cdecl;
procedure QIconView_minimumSizeHint(handle: QIconViewH; retval: PSize); cdecl;
procedure QIconView_sizePolicy(handle: QIconViewH; retval: PSizePolicy); cdecl;
procedure QIconView_sizeHint(handle: QIconViewH; retval: PSize); cdecl;
procedure QIconView_sort(handle: QIconViewH; ascending: Boolean); cdecl;
procedure QIconView_setFont(handle: QIconViewH; p1: QFontH); cdecl;
procedure QIconView_setPalette(handle: QIconViewH; p1: QPaletteH); cdecl;
procedure QIconView_arrangeItemsInGrid(handle: QIconViewH; grid: PSize; update: Boolean); overload; cdecl;
procedure QIconView_arrangeItemsInGrid(handle: QIconViewH; update: Boolean); overload; cdecl;
procedure QIconView_setContentsPos(handle: QIconViewH; x: Integer; y: Integer); cdecl;
procedure QIconView_updateContents(handle: QIconViewH); cdecl;
function QLCDNumber_create(parent: QWidgetH; name: PAnsiChar): QLCDNumberH; overload; cdecl;
procedure QLCDNumber_destroy(handle: QLCDNumberH); cdecl;
function QLCDNumber_create(numDigits: Cardinal; parent: QWidgetH; name: PAnsiChar): QLCDNumberH; overload; cdecl;
function QLCDNumber_smallDecimalPoint(handle: QLCDNumberH): Boolean; cdecl;
function QLCDNumber_numDigits(handle: QLCDNumberH): Integer; cdecl;
procedure QLCDNumber_setNumDigits(handle: QLCDNumberH; nDigits: Integer); cdecl;
function QLCDNumber_checkOverflow(handle: QLCDNumberH; num: Double): Boolean; overload; cdecl;
function QLCDNumber_checkOverflow(handle: QLCDNumberH; num: Integer): Boolean; overload; cdecl;
function QLCDNumber_mode(handle: QLCDNumberH): QLCDNumberMode; cdecl;
procedure QLCDNumber_setMode(handle: QLCDNumberH; p1: QLCDNumberMode); cdecl;
function QLCDNumber_segmentStyle(handle: QLCDNumberH): QLCDNumberSegmentStyle; cdecl;
procedure QLCDNumber_setSegmentStyle(handle: QLCDNumberH; p1: QLCDNumberSegmentStyle); cdecl;
function QLCDNumber_value(handle: QLCDNumberH): Double; cdecl;
function QLCDNumber_intValue(handle: QLCDNumberH): Integer; cdecl;
procedure QLCDNumber_sizeHint(handle: QLCDNumberH; retval: PSize); cdecl;
procedure QLCDNumber_sizePolicy(handle: QLCDNumberH; retval: PSizePolicy); cdecl;
procedure QLCDNumber_display(handle: QLCDNumberH; num: Integer); overload; cdecl;
procedure QLCDNumber_display(handle: QLCDNumberH; num: Double); overload; cdecl;
procedure QLCDNumber_display(handle: QLCDNumberH; str: PWideString); overload; cdecl;
procedure QLCDNumber_setHexMode(handle: QLCDNumberH); cdecl;
procedure QLCDNumber_setDecMode(handle: QLCDNumberH); cdecl;
procedure QLCDNumber_setOctMode(handle: QLCDNumberH); cdecl;
procedure QLCDNumber_setBinMode(handle: QLCDNumberH); cdecl;
procedure QLCDNumber_setSmallDecimalPoint(handle: QLCDNumberH; p1: Boolean); cdecl;
function QLineEdit_create(parent: QWidgetH; name: PAnsiChar): QLineEditH; overload; cdecl;
procedure QLineEdit_destroy(handle: QLineEditH); cdecl;
function QLineEdit_create(p1: PWideString; parent: QWidgetH; name: PAnsiChar): QLineEditH; overload; cdecl;
procedure QLineEdit_text(handle: QLineEditH; retval: PWideString); cdecl;
procedure QLineEdit_displayText(handle: QLineEditH; retval: PWideString); cdecl;
function QLineEdit_maxLength(handle: QLineEditH): Integer; cdecl;
procedure QLineEdit_setMaxLength(handle: QLineEditH; p1: Integer); cdecl;
procedure QLineEdit_setFrame(handle: QLineEditH; p1: Boolean); cdecl;
function QLineEdit_frame(handle: QLineEditH): Boolean; cdecl;
procedure QLineEdit_setEchoMode(handle: QLineEditH; p1: QLineEditEchoMode); cdecl;
function QLineEdit_echoMode(handle: QLineEditH): QLineEditEchoMode; cdecl;
procedure QLineEdit_setReadOnly(handle: QLineEditH; p1: Boolean); cdecl;
function QLineEdit_isReadOnly(handle: QLineEditH): Boolean; cdecl;
procedure QLineEdit_setValidator(handle: QLineEditH; p1: QValidatorH); cdecl;
function QLineEdit_validator(handle: QLineEditH): QValidatorH; cdecl;
procedure QLineEdit_sizeHint(handle: QLineEditH; retval: PSize); cdecl;
procedure QLineEdit_minimumSizeHint(handle: QLineEditH; retval: PSize); cdecl;
procedure QLineEdit_sizePolicy(handle: QLineEditH; retval: PSizePolicy); cdecl;
procedure QLineEdit_setEnabled(handle: QLineEditH; p1: Boolean); cdecl;
procedure QLineEdit_setFont(handle: QLineEditH; p1: QFontH); cdecl;
procedure QLineEdit_setPalette(handle: QLineEditH; p1: QPaletteH); cdecl;
procedure QLineEdit_setSelection(handle: QLineEditH; p1: Integer; p2: Integer); cdecl;
procedure QLineEdit_setCursorPosition(handle: QLineEditH; p1: Integer); cdecl;
function QLineEdit_cursorPosition(handle: QLineEditH): Integer; cdecl;
function QLineEdit_validateAndSet(handle: QLineEditH; p1: PWideString; p2: Integer; p3: Integer; p4: Integer): Boolean; cdecl;
procedure QLineEdit_cut(handle: QLineEditH); cdecl;
procedure QLineEdit_copy(handle: QLineEditH); cdecl;
procedure QLineEdit_paste(handle: QLineEditH); cdecl;
procedure QLineEdit_setAlignment(handle: QLineEditH; flag: Integer); cdecl;
function QLineEdit_alignment(handle: QLineEditH): Integer; cdecl;
procedure QLineEdit_cursorLeft(handle: QLineEditH; mark: Boolean; steps: Integer); cdecl;
procedure QLineEdit_cursorRight(handle: QLineEditH; mark: Boolean; steps: Integer); cdecl;
procedure QLineEdit_cursorWordForward(handle: QLineEditH; mark: Boolean); cdecl;
procedure QLineEdit_cursorWordBackward(handle: QLineEditH; mark: Boolean); cdecl;
procedure QLineEdit_backspace(handle: QLineEditH); cdecl;
procedure QLineEdit_del(handle: QLineEditH); cdecl;
procedure QLineEdit_home(handle: QLineEditH; mark: Boolean); cdecl;
procedure QLineEdit_end(handle: QLineEditH; mark: Boolean); cdecl;
procedure QLineEdit_setEdited(handle: QLineEditH; p1: Boolean); cdecl;
function QLineEdit_edited(handle: QLineEditH): Boolean; cdecl;
function QLineEdit_hasMarkedText(handle: QLineEditH): Boolean; cdecl;
procedure QLineEdit_markedText(handle: QLineEditH; retval: PWideString); cdecl;
procedure QLineEdit_setText(handle: QLineEditH; p1: PWideString); cdecl;
procedure QLineEdit_selectAll(handle: QLineEditH); cdecl;
procedure QLineEdit_deselect(handle: QLineEditH); cdecl;
procedure QLineEdit_clearValidator(handle: QLineEditH); cdecl;
procedure QLineEdit_insert(handle: QLineEditH; p1: PWideString); cdecl;
procedure QLineEdit_clear(handle: QLineEditH); cdecl;
function QListBox_create(parent: QWidgetH; name: PAnsiChar; f: WFlags): QListBoxH; cdecl;
procedure QListBox_destroy(handle: QListBoxH); cdecl;
procedure QListBox_setFont(handle: QListBoxH; p1: QFontH); cdecl;
function QListBox_count(handle: QListBoxH): Cardinal; cdecl;
procedure QListBox_insertStringList(handle: QListBoxH; p1: QStringListH; index: Integer); cdecl;
procedure QListBox_insertStrList(handle: QListBoxH; p1: QStrListH; index: Integer); overload; cdecl;
procedure QListBox_insertStrList(handle: QListBoxH; p1: PPAnsiChar; numStrings: Integer; index: Integer); overload; cdecl;
procedure QListBox_insertItem(handle: QListBoxH; p1: QListBoxItemH; index: Integer); overload; cdecl;
procedure QListBox_insertItem(handle: QListBoxH; p1: QListBoxItemH; after: QListBoxItemH); overload; cdecl;
procedure QListBox_insertItem(handle: QListBoxH; text: PWideString; index: Integer); overload; cdecl;
procedure QListBox_insertItem(handle: QListBoxH; pixmap: QPixmapH; index: Integer); overload; cdecl;
procedure QListBox_insertItem(handle: QListBoxH; pixmap: QPixmapH; text: PWideString; index: Integer); overload; cdecl;
procedure QListBox_removeItem(handle: QListBoxH; index: Integer); cdecl;
procedure QListBox_clear(handle: QListBoxH); cdecl;
procedure QListBox_text(handle: QListBoxH; retval: PWideString; index: Integer); cdecl;
function QListBox_pixmap(handle: QListBoxH; index: Integer): QPixmapH; cdecl;
procedure QListBox_changeItem(handle: QListBoxH; p1: QListBoxItemH; index: Integer); overload; cdecl;
procedure QListBox_changeItem(handle: QListBoxH; text: PWideString; index: Integer); overload; cdecl;
procedure QListBox_changeItem(handle: QListBoxH; pixmap: QPixmapH; index: Integer); overload; cdecl;
procedure QListBox_changeItem(handle: QListBoxH; pixmap: QPixmapH; text: PWideString; index: Integer); overload; cdecl;
procedure QListBox_takeItem(handle: QListBoxH; p1: QListBoxItemH); cdecl;
function QListBox_numItemsVisible(handle: QListBoxH): Integer; cdecl;
function QListBox_currentItem(handle: QListBoxH): Integer; cdecl;
procedure QListBox_currentText(handle: QListBoxH; retval: PWideString); cdecl;
procedure QListBox_setCurrentItem(handle: QListBoxH; index: Integer); overload; cdecl;
procedure QListBox_setCurrentItem(handle: QListBoxH; p1: QListBoxItemH); overload; cdecl;
procedure QListBox_centerCurrentItem(handle: QListBoxH); cdecl;
function QListBox_topItem(handle: QListBoxH): Integer; cdecl;
procedure QListBox_setTopItem(handle: QListBoxH; index: Integer); cdecl;
procedure QListBox_setBottomItem(handle: QListBoxH; index: Integer); cdecl;
function QListBox_maxItemWidth(handle: QListBoxH): Integer; cdecl;
procedure QListBox_setSelectionMode(handle: QListBoxH; p1: QListBoxSelectionMode); cdecl;
function QListBox_selectionMode(handle: QListBoxH): QListBoxSelectionMode; cdecl;
procedure QListBox_setMultiSelection(handle: QListBoxH; multi: Boolean); cdecl;
function QListBox_isMultiSelection(handle: QListBoxH): Boolean; cdecl;
procedure QListBox_setSelected(handle: QListBoxH; p1: QListBoxItemH; p2: Boolean); overload; cdecl;
procedure QListBox_setSelected(handle: QListBoxH; p1: Integer; p2: Boolean); overload; cdecl;
function QListBox_isSelected(handle: QListBoxH; p1: Integer): Boolean; overload; cdecl;
function QListBox_isSelected(handle: QListBoxH; p1: QListBoxItemH): Boolean; overload; cdecl;
procedure QListBox_sizeHint(handle: QListBoxH; retval: PSize); cdecl;
procedure QListBox_minimumSizeHint(handle: QListBoxH; retval: PSize); cdecl;
function QListBox_item(handle: QListBoxH; index: Integer): QListBoxItemH; cdecl;
function QListBox_index(handle: QListBoxH; p1: QListBoxItemH): Integer; cdecl;
function QListBox_findItem(handle: QListBoxH; text: PWideString): QListBoxItemH; cdecl;
procedure QListBox_triggerUpdate(handle: QListBoxH; doLayout: Boolean); cdecl;
function QListBox_itemVisible(handle: QListBoxH; index: Integer): Boolean; overload; cdecl;
function QListBox_itemVisible(handle: QListBoxH; p1: QListBoxItemH): Boolean; overload; cdecl;
procedure QListBox_setColumnMode(handle: QListBoxH; p1: QListBoxLayoutMode); overload; cdecl;
procedure QListBox_setColumnMode(handle: QListBoxH; p1: Integer); overload; cdecl;
procedure QListBox_setRowMode(handle: QListBoxH; p1: QListBoxLayoutMode); overload; cdecl;
procedure QListBox_setRowMode(handle: QListBoxH; p1: Integer); overload; cdecl;
function QListBox_columnMode(handle: QListBoxH): QListBoxLayoutMode; cdecl;
function QListBox_rowMode(handle: QListBoxH): QListBoxLayoutMode; cdecl;
function QListBox_numColumns(handle: QListBoxH): Integer; cdecl;
function QListBox_numRows(handle: QListBoxH): Integer; cdecl;
function QListBox_variableWidth(handle: QListBoxH): Boolean; cdecl;
procedure QListBox_setVariableWidth(handle: QListBoxH; p1: Boolean); cdecl;
function QListBox_variableHeight(handle: QListBoxH): Boolean; cdecl;
procedure QListBox_setVariableHeight(handle: QListBoxH; p1: Boolean); cdecl;
procedure QListBox_viewportPaintEvent(handle: QListBoxH; p1: QPaintEventH); cdecl;
function QListBox_dragSelect(handle: QListBoxH): Boolean; cdecl;
procedure QListBox_setDragSelect(handle: QListBoxH; p1: Boolean); cdecl;
function QListBox_autoScroll(handle: QListBoxH): Boolean; cdecl;
procedure QListBox_setAutoScroll(handle: QListBoxH; p1: Boolean); cdecl;
function QListBox_autoScrollBar(handle: QListBoxH): Boolean; cdecl;
procedure QListBox_setAutoScrollBar(handle: QListBoxH; enable: Boolean); cdecl;
function QListBox_scrollBar(handle: QListBoxH): Boolean; cdecl;
procedure QListBox_setScrollBar(handle: QListBoxH; enable: Boolean); cdecl;
function QListBox_autoBottomScrollBar(handle: QListBoxH): Boolean; cdecl;
procedure QListBox_setAutoBottomScrollBar(handle: QListBoxH; enable: Boolean); cdecl;
function QListBox_bottomScrollBar(handle: QListBoxH): Boolean; cdecl;
procedure QListBox_setBottomScrollBar(handle: QListBoxH; enable: Boolean); cdecl;
function QListBox_smoothScrolling(handle: QListBoxH): Boolean; cdecl;
procedure QListBox_setSmoothScrolling(handle: QListBoxH; p1: Boolean); cdecl;
function QListBox_autoUpdate(handle: QListBoxH): Boolean; cdecl;
procedure QListBox_setAutoUpdate(handle: QListBoxH; p1: Boolean); cdecl;
procedure QListBox_setFixedVisibleLines(handle: QListBoxH; lines: Integer); cdecl;
procedure QListBox_inSort(handle: QListBoxH; p1: QListBoxItemH); overload; cdecl;
procedure QListBox_inSort(handle: QListBoxH; text: PWideString); overload; cdecl;
function QListBox_cellHeight(handle: QListBoxH; i: Integer): Integer; overload; cdecl;
function QListBox_cellHeight(handle: QListBoxH): Integer; overload; cdecl;
function QListBox_cellWidth(handle: QListBoxH): Integer; overload; cdecl;
function QListBox_cellWidth(handle: QListBoxH; i: Integer): Integer; overload; cdecl;
function QListBox_numCols(handle: QListBoxH): Integer; cdecl;
function QListBox_itemHeight(handle: QListBoxH; index: Integer): Integer; cdecl;
function QListBox_itemAt(handle: QListBoxH; p1: PPoint): QListBoxItemH; cdecl;
procedure QListBox_itemRect(handle: QListBoxH; retval: PRect; item: QListBoxItemH); cdecl;
function QListBox_firstItem(handle: QListBoxH): QListBoxItemH; cdecl;
procedure QListBox_sort(handle: QListBoxH; ascending: Boolean); cdecl;
procedure QListBox_ensureCurrentVisible(handle: QListBoxH); cdecl;
procedure QListBox_clearSelection(handle: QListBoxH); cdecl;
procedure QListBox_selectAll(handle: QListBoxH; select: Boolean); cdecl;
procedure QListBox_invertSelection(handle: QListBoxH); cdecl;
procedure QListBoxItem_destroy(handle: QListBoxItemH); cdecl;
procedure QListBoxItem_text(handle: QListBoxItemH; retval: PWideString); cdecl;
function QListBoxItem_pixmap(handle: QListBoxItemH): QPixmapH; cdecl;
function QListBoxItem_height(handle: QListBoxItemH; p1: QListBoxH): Integer; cdecl;
function QListBoxItem_width(handle: QListBoxItemH; p1: QListBoxH): Integer; cdecl;
function QListBoxItem_selected(handle: QListBoxItemH): Boolean; cdecl;
function QListBoxItem_current(handle: QListBoxItemH): Boolean; cdecl;
function QListBoxItem_listBox(handle: QListBoxItemH): QListBoxH; cdecl;
procedure QListBoxItem_setSelectable(handle: QListBoxItemH; b: Boolean); cdecl;
function QListBoxItem_isSelectable(handle: QListBoxItemH): Boolean; cdecl;
function QListBoxItem_next(handle: QListBoxItemH): QListBoxItemH; cdecl;
function QListBoxItem_prev(handle: QListBoxItemH): QListBoxItemH; cdecl;
function QListBoxText_create(listbox: QListBoxH; text: PWideString): QListBoxTextH; overload; cdecl;
procedure QListBoxText_destroy(handle: QListBoxTextH); cdecl;
function QListBoxText_create(text: PWideString): QListBoxTextH; overload; cdecl;
function QListBoxText_create(listbox: QListBoxH; text: PWideString; after: QListBoxItemH): QListBoxTextH; overload; cdecl;
function QListBoxText_height(handle: QListBoxTextH; p1: QListBoxH): Integer; cdecl;
function QListBoxText_width(handle: QListBoxTextH; p1: QListBoxH): Integer; cdecl;
function QListBoxPixmap_create(listbox: QListBoxH; p2: QPixmapH): QListBoxPixmapH; overload; cdecl;
procedure QListBoxPixmap_destroy(handle: QListBoxPixmapH); cdecl;
function QListBoxPixmap_create(p1: QPixmapH): QListBoxPixmapH; overload; cdecl;
function QListBoxPixmap_create(listbox: QListBoxH; pix: QPixmapH; after: QListBoxItemH): QListBoxPixmapH; overload; cdecl;
function QListBoxPixmap_create(listbox: QListBoxH; p2: QPixmapH; p3: PWideString): QListBoxPixmapH; overload; cdecl;
function QListBoxPixmap_create(p1: QPixmapH; p2: PWideString): QListBoxPixmapH; overload; cdecl;
function QListBoxPixmap_create(listbox: QListBoxH; pix: QPixmapH; p3: PWideString; after: QListBoxItemH): QListBoxPixmapH; overload; cdecl;
function QListBoxPixmap_pixmap(handle: QListBoxPixmapH): QPixmapH; cdecl;
function QListBoxPixmap_height(handle: QListBoxPixmapH; p1: QListBoxH): Integer; cdecl;
function QListBoxPixmap_width(handle: QListBoxPixmapH; p1: QListBoxH): Integer; cdecl;
function QListViewItem_create(parent: QListViewH): QListViewItemH; overload; cdecl;
procedure QListViewItem_destroy(handle: QListViewItemH); cdecl;
function QListViewItem_create(parent: QListViewItemH): QListViewItemH; overload; cdecl;
function QListViewItem_create(parent: QListViewH; after: QListViewItemH): QListViewItemH; overload; cdecl;
function QListViewItem_create(parent: QListViewItemH; after: QListViewItemH): QListViewItemH; overload; cdecl;
function QListViewItem_create(parent: QListViewH; p2: PWideString; p3: PWideString; p4: PWideString; p5: PWideString; p6: PWideString; p7: PWideString; p8: PWideString; p9: PWideString): QListViewItemH; overload; cdecl;
function QListViewItem_create(parent: QListViewItemH; p2: PWideString; p3: PWideString; p4: PWideString; p5: PWideString; p6: PWideString; p7: PWideString; p8: PWideString; p9: PWideString): QListViewItemH; overload; cdecl;
function QListViewItem_create(parent: QListViewH; after: QListViewItemH; p3: PWideString; p4: PWideString; p5: PWideString; p6: PWideString; p7: PWideString; p8: PWideString; p9: PWideString; p10: PWideString): QListViewItemH; overload; cdecl;
function QListViewItem_create(parent: QListViewItemH; after: QListViewItemH; p3: PWideString; p4: PWideString; p5: PWideString; p6: PWideString; p7: PWideString; p8: PWideString; p9: PWideString; p10: PWideString): QListViewItemH; overload; cdecl;
procedure QListViewItem_insertItem(handle: QListViewItemH; p1: QListViewItemH); cdecl;
procedure QListViewItem_takeItem(handle: QListViewItemH; p1: QListViewItemH); cdecl;
procedure QListViewItem_removeItem(handle: QListViewItemH; p1: QListViewItemH); cdecl;
function QListViewItem_height(handle: QListViewItemH): Integer; cdecl;
procedure QListViewItem_invalidateHeight(handle: QListViewItemH); cdecl;
function QListViewItem_totalHeight(handle: QListViewItemH): Integer; cdecl;
function QListViewItem_width(handle: QListViewItemH; p1: QFontMetricsH; p2: QListViewH; column: Integer): Integer; cdecl;
procedure QListViewItem_widthChanged(handle: QListViewItemH; column: Integer); cdecl;
function QListViewItem_depth(handle: QListViewItemH): Integer; cdecl;
procedure QListViewItem_setText(handle: QListViewItemH; p1: Integer; p2: PWideString); cdecl;
procedure QListViewItem_text(handle: QListViewItemH; retval: PWideString; p1: Integer); cdecl;
procedure QListViewItem_setPixmap(handle: QListViewItemH; p1: Integer; p2: QPixmapH); cdecl;
function QListViewItem_pixmap(handle: QListViewItemH; p1: Integer): QPixmapH; cdecl;
procedure QListViewItem_key(handle: QListViewItemH; retval: PWideString; p1: Integer; p2: Boolean); cdecl;
procedure QListViewItem_sortChildItems(handle: QListViewItemH; p1: Integer; p2: Boolean); cdecl;
function QListViewItem_childCount(handle: QListViewItemH): Integer; cdecl;
function QListViewItem_isOpen(handle: QListViewItemH): Boolean; cdecl;
procedure QListViewItem_setOpen(handle: QListViewItemH; p1: Boolean); cdecl;
procedure QListViewItem_setup(handle: QListViewItemH); cdecl;
procedure QListViewItem_setSelected(handle: QListViewItemH; p1: Boolean); cdecl;
function QListViewItem_isSelected(handle: QListViewItemH): Boolean; cdecl;
procedure QListViewItem_paintCell(handle: QListViewItemH; p1: QPainterH; cg: QColorGroupH; column: Integer; width: Integer; alignment: Integer); cdecl;
procedure QListViewItem_paintBranches(handle: QListViewItemH; p: QPainterH; cg: QColorGroupH; w: Integer; y: Integer; h: Integer; s: GUIStyle); cdecl;
procedure QListViewItem_paintFocus(handle: QListViewItemH; p1: QPainterH; cg: QColorGroupH; r: PRect); cdecl;
function QListViewItem_firstChild(handle: QListViewItemH): QListViewItemH; cdecl;
function QListViewItem_nextSibling(handle: QListViewItemH): QListViewItemH; cdecl;
function QListViewItem_parent(handle: QListViewItemH): QListViewItemH; cdecl;
function QListViewItem_itemAbove(handle: QListViewItemH): QListViewItemH; cdecl;
function QListViewItem_itemBelow(handle: QListViewItemH): QListViewItemH; cdecl;
function QListViewItem_itemPos(handle: QListViewItemH): Integer; cdecl;
function QListViewItem_listView(handle: QListViewItemH): QListViewH; cdecl;
procedure QListViewItem_setSelectable(handle: QListViewItemH; enable: Boolean); cdecl;
function QListViewItem_isSelectable(handle: QListViewItemH): Boolean; cdecl;
procedure QListViewItem_setExpandable(handle: QListViewItemH; p1: Boolean); cdecl;
function QListViewItem_isExpandable(handle: QListViewItemH): Boolean; cdecl;
procedure QListViewItem_repaint(handle: QListViewItemH); cdecl;
procedure QListViewItem_sort(handle: QListViewItemH); cdecl;
procedure QListViewItem_moveItem(handle: QListViewItemH; after: QListViewItemH); cdecl;
function QListView_create(parent: QWidgetH; name: PAnsiChar; f: WFlags): QListViewH; overload; cdecl;
procedure QListView_destroy(handle: QListViewH); cdecl;
function QListView_create(parent: QWidgetH; name: PAnsiChar): QListViewH; overload; cdecl;
function QListView_treeStepSize(handle: QListViewH): Integer; cdecl;
procedure QListView_setTreeStepSize(handle: QListViewH; p1: Integer); cdecl;
procedure QListView_insertItem(handle: QListViewH; p1: QListViewItemH); cdecl;
procedure QListView_takeItem(handle: QListViewH; p1: QListViewItemH); cdecl;
procedure QListView_removeItem(handle: QListViewH; p1: QListViewItemH); cdecl;
procedure QListView_clear(handle: QListViewH); cdecl;
function QListView_header(handle: QListViewH): QHeaderH; cdecl;
function QListView_addColumn(handle: QListViewH; _label: PWideString; size: Integer): Integer; overload; cdecl;
function QListView_addColumn(handle: QListViewH; iconset: QIconSetH; _label: PWideString; size: Integer): Integer; overload; cdecl;
procedure QListView_removeColumn(handle: QListViewH; index: Integer); cdecl;
procedure QListView_setColumnText(handle: QListViewH; column: Integer; _label: PWideString); overload; cdecl;
procedure QListView_setColumnText(handle: QListViewH; column: Integer; iconset: QIconSetH; _label: PWideString); overload; cdecl;
procedure QListView_columnText(handle: QListViewH; retval: PWideString; column: Integer); cdecl;
procedure QListView_setColumnWidth(handle: QListViewH; column: Integer; width: Integer); cdecl;
function QListView_columnWidth(handle: QListViewH; column: Integer): Integer; cdecl;
procedure QListView_setColumnWidthMode(handle: QListViewH; column: Integer; p2: QListViewWidthMode); cdecl;
function QListView_columnWidthMode(handle: QListViewH; column: Integer): QListViewWidthMode; cdecl;
function QListView_columns(handle: QListViewH): Integer; cdecl;
procedure QListView_setColumnAlignment(handle: QListViewH; p1: Integer; p2: Integer); cdecl;
function QListView_columnAlignment(handle: QListViewH; p1: Integer): Integer; cdecl;
procedure QListView_show(handle: QListViewH); cdecl;
function QListView_itemAt(handle: QListViewH; screenPos: PPoint): QListViewItemH; cdecl;
procedure QListView_itemRect(handle: QListViewH; retval: PRect; p1: QListViewItemH); cdecl;
function QListView_itemPos(handle: QListViewH; p1: QListViewItemH): Integer; cdecl;
procedure QListView_ensureItemVisible(handle: QListViewH; p1: QListViewItemH); cdecl;
procedure QListView_repaintItem(handle: QListViewH; p1: QListViewItemH); cdecl;
procedure QListView_setMultiSelection(handle: QListViewH; enable: Boolean); cdecl;
function QListView_isMultiSelection(handle: QListViewH): Boolean; cdecl;
procedure QListView_setSelectionMode(handle: QListViewH; mode: QListViewSelectionMode); cdecl;
function QListView_selectionMode(handle: QListViewH): QListViewSelectionMode; cdecl;
procedure QListView_clearSelection(handle: QListViewH); cdecl;
procedure QListView_setSelected(handle: QListViewH; p1: QListViewItemH; p2: Boolean); cdecl;
function QListView_isSelected(handle: QListViewH; p1: QListViewItemH): Boolean; cdecl;
function QListView_selectedItem(handle: QListViewH): QListViewItemH; cdecl;
procedure QListView_setOpen(handle: QListViewH; p1: QListViewItemH; p2: Boolean); cdecl;
function QListView_isOpen(handle: QListViewH; p1: QListViewItemH): Boolean; cdecl;
procedure QListView_setCurrentItem(handle: QListViewH; p1: QListViewItemH); cdecl;
function QListView_currentItem(handle: QListViewH): QListViewItemH; cdecl;
function QListView_firstChild(handle: QListViewH): QListViewItemH; cdecl;
function QListView_childCount(handle: QListViewH): Integer; cdecl;
procedure QListView_setAllColumnsShowFocus(handle: QListViewH; p1: Boolean); cdecl;
function QListView_allColumnsShowFocus(handle: QListViewH): Boolean; cdecl;
procedure QListView_setItemMargin(handle: QListViewH; p1: Integer); cdecl;
function QListView_itemMargin(handle: QListViewH): Integer; cdecl;
procedure QListView_setRootIsDecorated(handle: QListViewH; p1: Boolean); cdecl;
function QListView_rootIsDecorated(handle: QListViewH): Boolean; cdecl;
procedure QListView_setSorting(handle: QListViewH; column: Integer; increasing: Boolean); cdecl;
procedure QListView_sort(handle: QListViewH); cdecl;
procedure QListView_setFont(handle: QListViewH; p1: QFontH); cdecl;
procedure QListView_setPalette(handle: QListViewH; p1: QPaletteH); cdecl;
function QListView_eventFilter(handle: QListViewH; o: QObjectH; p2: QEventH): Boolean; cdecl;
procedure QListView_sizeHint(handle: QListViewH; retval: PSize); cdecl;
procedure QListView_minimumSizeHint(handle: QListViewH; retval: PSize); cdecl;
procedure QListView_setShowSortIndicator(handle: QListViewH; show: Boolean); cdecl;
function QListView_showSortIndicator(handle: QListViewH): Boolean; cdecl;
procedure QListView_invertSelection(handle: QListViewH); cdecl;
procedure QListView_selectAll(handle: QListViewH; select: Boolean); cdecl;
procedure QListView_triggerUpdate(handle: QListViewH); cdecl;
procedure QListView_setContentsPos(handle: QListViewH; x: Integer; y: Integer); cdecl;
function QCheckListItem_create(parent: QCheckListItemH; text: PWideString; p3: QCheckListItemType): QCheckListItemH; overload; cdecl;
procedure QCheckListItem_destroy(handle: QCheckListItemH); cdecl;
function QCheckListItem_create(parent: QListViewItemH; text: PWideString; p3: QCheckListItemType): QCheckListItemH; overload; cdecl;
function QCheckListItem_create(parent: QListViewH; text: PWideString; p3: QCheckListItemType): QCheckListItemH; overload; cdecl;
function QCheckListItem_create(parent: QListViewItemH; text: PWideString; p3: QPixmapH): QCheckListItemH; overload; cdecl;
function QCheckListItem_create(parent: QListViewH; text: PWideString; p3: QPixmapH): QCheckListItemH; overload; cdecl;
procedure QCheckListItem_paintCell(handle: QCheckListItemH; p1: QPainterH; cg: QColorGroupH; column: Integer; width: Integer; alignment: Integer); cdecl;
procedure QCheckListItem_paintFocus(handle: QCheckListItemH; p1: QPainterH; cg: QColorGroupH; r: PRect); cdecl;
function QCheckListItem_width(handle: QCheckListItemH; p1: QFontMetricsH; p2: QListViewH; column: Integer): Integer; cdecl;
procedure QCheckListItem_setup(handle: QCheckListItemH); cdecl;
procedure QCheckListItem_setOn(handle: QCheckListItemH; p1: Boolean); cdecl;
function QCheckListItem_isOn(handle: QCheckListItemH): Boolean; cdecl;
function QCheckListItem_type(handle: QCheckListItemH): QCheckListItemType; cdecl;
procedure QCheckListItem_text(handle: QCheckListItemH; retval: PWideString); overload; cdecl;
procedure QCheckListItem_text(handle: QCheckListItemH; retval: PWideString; n: Integer); overload; cdecl;
procedure QCheckListItem_setEnabled(handle: QCheckListItemH; b: Boolean); cdecl;
function QCheckListItem_isEnabled(handle: QCheckListItemH): Boolean; cdecl;
function QListViewItemIterator_create(): QListViewItemIteratorH; overload; cdecl;
procedure QListViewItemIterator_destroy(handle: QListViewItemIteratorH); cdecl;
function QListViewItemIterator_create(item: QListViewItemH): QListViewItemIteratorH; overload; cdecl;
function QListViewItemIterator_create(it: QListViewItemIteratorH): QListViewItemIteratorH; overload; cdecl;
function QListViewItemIterator_create(lv: QListViewH): QListViewItemIteratorH; overload; cdecl;
function QListViewItemIterator_current(handle: QListViewItemIteratorH): QListViewItemH; cdecl;
function QMenuBar_create(parent: QWidgetH; name: PAnsiChar): QMenuBarH; cdecl;
procedure QMenuBar_destroy(handle: QMenuBarH); cdecl;
procedure QMenuBar_updateItem(handle: QMenuBarH; id: Integer); cdecl;
procedure QMenuBar_show(handle: QMenuBarH); cdecl;
procedure QMenuBar_hide(handle: QMenuBarH); cdecl;
function QMenuBar_eventFilter(handle: QMenuBarH; p1: QObjectH; p2: QEventH): Boolean; cdecl;
function QMenuBar_heightForWidth(handle: QMenuBarH; p1: Integer): Integer; cdecl;
function QMenuBar_separator(handle: QMenuBarH): QMenuBarSeparator; cdecl;
procedure QMenuBar_setSeparator(handle: QMenuBarH; when: QMenuBarSeparator); cdecl;
procedure QMenuBar_setDefaultUp(handle: QMenuBarH; p1: Boolean); cdecl;
function QMenuBar_isDefaultUp(handle: QMenuBarH): Boolean; cdecl;
function QMenuBar_customWhatsThis(handle: QMenuBarH): Boolean; cdecl;
procedure QMenuBar_sizeHint(handle: QMenuBarH; retval: PSize); cdecl;
procedure QMenuBar_minimumSize(handle: QMenuBarH; retval: PSize); cdecl;
procedure QMenuBar_minimumSizeHint(handle: QMenuBarH; retval: PSize); cdecl;
procedure QMenuBar_activateItemAt(handle: QMenuBarH; index: Integer); cdecl;
function QMenuBar_to_QMenuData(handle: QMenuBarH): QMenuDataH; cdecl;
function QMessageBox_create(parent: QWidgetH; name: PAnsiChar): QMessageBoxH; overload; cdecl;
procedure QMessageBox_destroy(handle: QMessageBoxH); cdecl;
function QMessageBox_create(caption: PWideString; text: PWideString; icon: QMessageBoxIcon; button0: Integer; button1: Integer; button2: Integer; parent: QWidgetH; name: PAnsiChar; modal: Boolean; f: WFlags): QMessageBoxH; overload; cdecl;
function QMessageBox_information(parent: QWidgetH; caption: PWideString; text: PWideString; button0: Integer; button1: Integer; button2: Integer): Integer; overload; cdecl;
function QMessageBox_information(parent: QWidgetH; caption: PWideString; text: PWideString; button0Text: PWideString; button1Text: PWideString; button2Text: PWideString; defaultButtonNumber: Integer; escapeButtonNumber: Integer): Integer; overload; cdecl;
function QMessageBox_warning(parent: QWidgetH; caption: PWideString; text: PWideString; button0: Integer; button1: Integer; button2: Integer): Integer; overload; cdecl;
function QMessageBox_warning(parent: QWidgetH; caption: PWideString; text: PWideString; button0Text: PWideString; button1Text: PWideString; button2Text: PWideString; defaultButtonNumber: Integer; escapeButtonNumber: Integer): Integer; overload; cdecl;
function QMessageBox_critical(parent: QWidgetH; caption: PWideString; text: PWideString; button0: Integer; button1: Integer; button2: Integer): Integer; overload; cdecl;
function QMessageBox_critical(parent: QWidgetH; caption: PWideString; text: PWideString; button0Text: PWideString; button1Text: PWideString; button2Text: PWideString; defaultButtonNumber: Integer; escapeButtonNumber: Integer): Integer; overload; cdecl;
procedure QMessageBox_about(parent: QWidgetH; caption: PWideString; text: PWideString); cdecl;
procedure QMessageBox_aboutQt(parent: QWidgetH; caption: PWideString); cdecl;
function QMessageBox_message(caption: PWideString; text: PWideString; buttonText: PWideString; parent: QWidgetH; name: PAnsiChar): Integer; cdecl;
function QMessageBox_query(caption: PWideString; text: PWideString; yesButtonText: PWideString; noButtonText: PWideString; parent: QWidgetH; name: PAnsiChar): Boolean; cdecl;
procedure QMessageBox_text(handle: QMessageBoxH; retval: PWideString); cdecl;
procedure QMessageBox_setText(handle: QMessageBoxH; p1: PWideString); cdecl;
function QMessageBox_icon(handle: QMessageBoxH): QMessageBoxIcon; cdecl;
procedure QMessageBox_setIcon(handle: QMessageBoxH; p1: QMessageBoxIcon); overload; cdecl;
procedure QMessageBox_setIcon(handle: QMessageBoxH; p1: QPixmapH); overload; cdecl;
function QMessageBox_iconPixmap(handle: QMessageBoxH): QPixmapH; cdecl;
procedure QMessageBox_setIconPixmap(handle: QMessageBoxH; p1: QPixmapH); cdecl;
procedure QMessageBox_buttonText(handle: QMessageBoxH; retval: PWideString; button: Integer); cdecl;
procedure QMessageBox_setButtonText(handle: QMessageBoxH; button: Integer; p2: PWideString); cdecl;
procedure QMessageBox_adjustSize(handle: QMessageBoxH); cdecl;
procedure QMessageBox_standardIcon(retval: QPixmapH; icon: QMessageBoxIcon; style: GUIStyle); cdecl;
function QMessageBox_textFormat(handle: QMessageBoxH): TextFormat; cdecl;
procedure QMessageBox_setTextFormat(handle: QMessageBoxH; p1: TextFormat); cdecl;
function QMultiLineEdit_create(parent: QWidgetH; name: PAnsiChar): QMultiLineEditH; cdecl;
procedure QMultiLineEdit_destroy(handle: QMultiLineEditH); cdecl;
procedure QMultiLineEdit_textLine(handle: QMultiLineEditH; retval: PWideString; line: Integer); cdecl;
function QMultiLineEdit_numLines(handle: QMultiLineEditH): Integer; cdecl;
procedure QMultiLineEdit_sizeHint(handle: QMultiLineEditH; retval: PSize); cdecl;
procedure QMultiLineEdit_minimumSizeHint(handle: QMultiLineEditH; retval: PSize); cdecl;
procedure QMultiLineEdit_sizePolicy(handle: QMultiLineEditH; retval: PSizePolicy); cdecl;
procedure QMultiLineEdit_setFont(handle: QMultiLineEditH; font: QFontH); cdecl;
procedure QMultiLineEdit_insertLine(handle: QMultiLineEditH; s: PWideString; line: Integer); cdecl;
procedure QMultiLineEdit_insertAt(handle: QMultiLineEditH; s: PWideString; line: Integer; col: Integer; mark: Boolean); cdecl;
procedure QMultiLineEdit_removeLine(handle: QMultiLineEditH; line: Integer); cdecl;
procedure QMultiLineEdit_cursorPosition(handle: QMultiLineEditH; line: PInteger; col: PInteger); cdecl;
procedure QMultiLineEdit_setCursorPosition(handle: QMultiLineEditH; line: Integer; col: Integer; mark: Boolean); cdecl;
procedure QMultiLineEdit_getCursorPosition(handle: QMultiLineEditH; line: PInteger; col: PInteger); cdecl;
function QMultiLineEdit_atBeginning(handle: QMultiLineEditH): Boolean; cdecl;
function QMultiLineEdit_atEnd(handle: QMultiLineEditH): Boolean; cdecl;
procedure QMultiLineEdit_setFixedVisibleLines(handle: QMultiLineEditH; lines: Integer); cdecl;
function QMultiLineEdit_maxLineWidth(handle: QMultiLineEditH): Integer; cdecl;
procedure QMultiLineEdit_setAlignment(handle: QMultiLineEditH; flags: Integer); cdecl;
function QMultiLineEdit_alignment(handle: QMultiLineEditH): Integer; cdecl;
procedure QMultiLineEdit_setValidator(handle: QMultiLineEditH; p1: QValidatorH); cdecl;
function QMultiLineEdit_validator(handle: QMultiLineEditH): QValidatorH; cdecl;
procedure QMultiLineEdit_setEdited(handle: QMultiLineEditH; p1: Boolean); cdecl;
function QMultiLineEdit_edited(handle: QMultiLineEditH): Boolean; cdecl;
procedure QMultiLineEdit_cursorWordForward(handle: QMultiLineEditH; mark: Boolean); cdecl;
procedure QMultiLineEdit_cursorWordBackward(handle: QMultiLineEditH; mark: Boolean); cdecl;
procedure QMultiLineEdit_setEchoMode(handle: QMultiLineEditH; p1: QMultiLineEditEchoMode); cdecl;
function QMultiLineEdit_echoMode(handle: QMultiLineEditH): QMultiLineEditEchoMode; cdecl;
procedure QMultiLineEdit_setMaxLength(handle: QMultiLineEditH; p1: Integer); cdecl;
function QMultiLineEdit_maxLength(handle: QMultiLineEditH): Integer; cdecl;
procedure QMultiLineEdit_setMaxLineLength(handle: QMultiLineEditH; p1: Integer); cdecl;
function QMultiLineEdit_maxLineLength(handle: QMultiLineEditH): Integer; cdecl;
procedure QMultiLineEdit_setMaxLines(handle: QMultiLineEditH; p1: Integer); cdecl;
function QMultiLineEdit_maxLines(handle: QMultiLineEditH): Integer; cdecl;
procedure QMultiLineEdit_setHMargin(handle: QMultiLineEditH; p1: Integer); cdecl;
function QMultiLineEdit_hMargin(handle: QMultiLineEditH): Integer; cdecl;
procedure QMultiLineEdit_setSelection(handle: QMultiLineEditH; row_from: Integer; col_from: Integer; row_to: Integer; col_t: Integer); cdecl;
procedure QMultiLineEdit_setWordWrap(handle: QMultiLineEditH; mode: QMultiLineEditWordWrap); cdecl;
function QMultiLineEdit_wordWrap(handle: QMultiLineEditH): QMultiLineEditWordWrap; cdecl;
procedure QMultiLineEdit_setWrapColumnOrWidth(handle: QMultiLineEditH; p1: Integer); cdecl;
function QMultiLineEdit_wrapColumnOrWidth(handle: QMultiLineEditH): Integer; cdecl;
procedure QMultiLineEdit_setWrapPolicy(handle: QMultiLineEditH; policy: QMultiLineEditWrapPolicy); cdecl;
function QMultiLineEdit_wrapPolicy(handle: QMultiLineEditH): QMultiLineEditWrapPolicy; cdecl;
function QMultiLineEdit_autoUpdate(handle: QMultiLineEditH): Boolean; cdecl;
procedure QMultiLineEdit_setAutoUpdate(handle: QMultiLineEditH; p1: Boolean); cdecl;
procedure QMultiLineEdit_setUndoEnabled(handle: QMultiLineEditH; p1: Boolean); cdecl;
function QMultiLineEdit_isUndoEnabled(handle: QMultiLineEditH): Boolean; cdecl;
procedure QMultiLineEdit_setUndoDepth(handle: QMultiLineEditH; p1: Integer); cdecl;
function QMultiLineEdit_undoDepth(handle: QMultiLineEditH): Integer; cdecl;
function QMultiLineEdit_isReadOnly(handle: QMultiLineEditH): Boolean; cdecl;
function QMultiLineEdit_isOverwriteMode(handle: QMultiLineEditH): Boolean; cdecl;
procedure QMultiLineEdit_text(handle: QMultiLineEditH; retval: PWideString); cdecl;
function QMultiLineEdit_length(handle: QMultiLineEditH): Integer; cdecl;
procedure QMultiLineEdit_setDefaultTabStop(ex: Integer); cdecl;
function QMultiLineEdit_defaultTabStop(): Integer; cdecl;
procedure QMultiLineEdit_setText(handle: QMultiLineEditH; p1: PWideString); cdecl;
procedure QMultiLineEdit_setReadOnly(handle: QMultiLineEditH; p1: Boolean); cdecl;
procedure QMultiLineEdit_setOverwriteMode(handle: QMultiLineEditH; p1: Boolean); cdecl;
procedure QMultiLineEdit_clear(handle: QMultiLineEditH); cdecl;
procedure QMultiLineEdit_append(handle: QMultiLineEditH; p1: PWideString); cdecl;
procedure QMultiLineEdit_deselect(handle: QMultiLineEditH); cdecl;
procedure QMultiLineEdit_selectAll(handle: QMultiLineEditH); cdecl;
procedure QMultiLineEdit_paste(handle: QMultiLineEditH); cdecl;
procedure QMultiLineEdit_pasteSubType(handle: QMultiLineEditH; subtype: PAnsiString); cdecl;
procedure QMultiLineEdit_copyText(handle: QMultiLineEditH); cdecl;
procedure QMultiLineEdit_copy(handle: QMultiLineEditH); cdecl;
procedure QMultiLineEdit_cut(handle: QMultiLineEditH); cdecl;
procedure QMultiLineEdit_insert(handle: QMultiLineEditH; p1: PWideString); cdecl;
procedure QMultiLineEdit_undo(handle: QMultiLineEditH); cdecl;
procedure QMultiLineEdit_redo(handle: QMultiLineEditH); cdecl;
function QScrollView_create(parent: QWidgetH; name: PAnsiChar; f: WFlags): QScrollViewH; cdecl;
procedure QScrollView_destroy(handle: QScrollViewH); cdecl;
procedure QScrollView_setResizePolicy(handle: QScrollViewH; p1: QScrollViewResizePolicy); cdecl;
function QScrollView_resizePolicy(handle: QScrollViewH): QScrollViewResizePolicy; cdecl;
procedure QScrollView_styleChange(handle: QScrollViewH; p1: QStyleH); cdecl;
procedure QScrollView_removeChild(handle: QScrollViewH; child: QWidgetH); overload; cdecl;
procedure QScrollView_addChild(handle: QScrollViewH; child: QWidgetH; x: Integer; y: Integer); cdecl;
procedure QScrollView_moveChild(handle: QScrollViewH; child: QWidgetH; x: Integer; y: Integer); cdecl;
function QScrollView_childX(handle: QScrollViewH; child: QWidgetH): Integer; cdecl;
function QScrollView_childY(handle: QScrollViewH; child: QWidgetH): Integer; cdecl;
function QScrollView_childIsVisible(handle: QScrollViewH; child: QWidgetH): Boolean; cdecl;
procedure QScrollView_showChild(handle: QScrollViewH; child: QWidgetH; yes: Boolean); cdecl;
function QScrollView_vScrollBarMode(handle: QScrollViewH): QScrollViewScrollBarMode; cdecl;
procedure QScrollView_setVScrollBarMode(handle: QScrollViewH; p1: QScrollViewScrollBarMode); cdecl;
function QScrollView_hScrollBarMode(handle: QScrollViewH): QScrollViewScrollBarMode; cdecl;
procedure QScrollView_setHScrollBarMode(handle: QScrollViewH; p1: QScrollViewScrollBarMode); cdecl;
function QScrollView_cornerWidget(handle: QScrollViewH): QWidgetH; cdecl;
procedure QScrollView_setCornerWidget(handle: QScrollViewH; p1: QWidgetH); cdecl;
function QScrollView_horizontalScrollBar(handle: QScrollViewH): QScrollBarH; cdecl;
function QScrollView_verticalScrollBar(handle: QScrollViewH): QScrollBarH; cdecl;
function QScrollView_viewport(handle: QScrollViewH): QWidgetH; cdecl;
function QScrollView_clipper(handle: QScrollViewH): QWidgetH; cdecl;
function QScrollView_visibleWidth(handle: QScrollViewH): Integer; cdecl;
function QScrollView_visibleHeight(handle: QScrollViewH): Integer; cdecl;
function QScrollView_contentsWidth(handle: QScrollViewH): Integer; cdecl;
function QScrollView_contentsHeight(handle: QScrollViewH): Integer; cdecl;
function QScrollView_contentsX(handle: QScrollViewH): Integer; cdecl;
function QScrollView_contentsY(handle: QScrollViewH): Integer; cdecl;
procedure QScrollView_resize(handle: QScrollViewH; w: Integer; h: Integer); overload; cdecl;
procedure QScrollView_resize(handle: QScrollViewH; p1: PSize); overload; cdecl;
procedure QScrollView_show(handle: QScrollViewH); cdecl;
procedure QScrollView_updateContents(handle: QScrollViewH; x: Integer; y: Integer; w: Integer; h: Integer); overload; cdecl;
procedure QScrollView_updateContents(handle: QScrollViewH; r: PRect); overload; cdecl;
procedure QScrollView_repaintContents(handle: QScrollViewH; x: Integer; y: Integer; w: Integer; h: Integer; erase: Boolean); overload; cdecl;
procedure QScrollView_repaintContents(handle: QScrollViewH; r: PRect; erase: Boolean); overload; cdecl;
procedure QScrollView_contentsToViewport(handle: QScrollViewH; x: Integer; y: Integer; vx: PInteger; vy: PInteger); overload; cdecl;
procedure QScrollView_viewportToContents(handle: QScrollViewH; vx: Integer; vy: Integer; x: PInteger; y: PInteger); overload; cdecl;
procedure QScrollView_contentsToViewport(handle: QScrollViewH; retval: PPoint; p1: PPoint); overload; cdecl;
procedure QScrollView_viewportToContents(handle: QScrollViewH; retval: PPoint; p1: PPoint); overload; cdecl;
procedure QScrollView_enableClipper(handle: QScrollViewH; y: Boolean); cdecl;
procedure QScrollView_setStaticBackground(handle: QScrollViewH; y: Boolean); cdecl;
function QScrollView_hasStaticBackground(handle: QScrollViewH): Boolean; cdecl;
procedure QScrollView_viewportSize(handle: QScrollViewH; retval: PSize; p1: Integer; p2: Integer); cdecl;
procedure QScrollView_sizePolicy(handle: QScrollViewH; retval: PSizePolicy); cdecl;
procedure QScrollView_sizeHint(handle: QScrollViewH; retval: PSize); cdecl;
procedure QScrollView_minimumSizeHint(handle: QScrollViewH; retval: PSize); cdecl;
procedure QScrollView_removeChild(handle: QScrollViewH; child: QObjectH); overload; cdecl;
procedure QScrollView_setDragAutoScroll(handle: QScrollViewH; b: Boolean); cdecl;
function QScrollView_dragAutoScroll(handle: QScrollViewH): Boolean; cdecl;
procedure QScrollView_resizeContents(handle: QScrollViewH; w: Integer; h: Integer); cdecl;
procedure QScrollView_scrollBy(handle: QScrollViewH; dx: Integer; dy: Integer); cdecl;
procedure QScrollView_setContentsPos(handle: QScrollViewH; x: Integer; y: Integer); cdecl;
procedure QScrollView_ensureVisible(handle: QScrollViewH; x: Integer; y: Integer); overload; cdecl;
procedure QScrollView_ensureVisible(handle: QScrollViewH; x: Integer; y: Integer; xmargin: Integer; ymargin: Integer); overload; cdecl;
procedure QScrollView_center(handle: QScrollViewH; x: Integer; y: Integer); overload; cdecl;
procedure QScrollView_center(handle: QScrollViewH; x: Integer; y: Integer; xmargin: Single; ymargin: Single); overload; cdecl;
procedure QScrollView_updateScrollBars(handle: QScrollViewH); cdecl;
procedure QScrollView_setEnabled(handle: QScrollViewH; enable: Boolean); cdecl;
function QSlider_create(parent: QWidgetH; name: PAnsiChar): QSliderH; overload; cdecl;
procedure QSlider_destroy(handle: QSliderH); cdecl;
function QSlider_create(p1: Orientation; parent: QWidgetH; name: PAnsiChar): QSliderH; overload; cdecl;
function QSlider_create(minValue: Integer; maxValue: Integer; pageStep: Integer; value: Integer; p5: Orientation; parent: QWidgetH; name: PAnsiChar): QSliderH; overload; cdecl;
procedure QSlider_setOrientation(handle: QSliderH; p1: Orientation); cdecl;
function QSlider_orientation(handle: QSliderH): Orientation; cdecl;
procedure QSlider_setTracking(handle: QSliderH; enable: Boolean); cdecl;
function QSlider_tracking(handle: QSliderH): Boolean; cdecl;
procedure QSlider_setPalette(handle: QSliderH; p1: QPaletteH); cdecl;
procedure QSlider_sliderRect(handle: QSliderH; retval: PRect); cdecl;
procedure QSlider_sizeHint(handle: QSliderH; retval: PSize); cdecl;
procedure QSlider_sizePolicy(handle: QSliderH; retval: PSizePolicy); cdecl;
procedure QSlider_minimumSizeHint(handle: QSliderH; retval: PSize); cdecl;
procedure QSlider_setTickmarks(handle: QSliderH; p1: QSliderTickSetting); cdecl;
function QSlider_tickmarks(handle: QSliderH): QSliderTickSetting; cdecl;
procedure QSlider_setTickInterval(handle: QSliderH; p1: Integer); cdecl;
function QSlider_tickInterval(handle: QSliderH): Integer; cdecl;
function QSlider_minValue(handle: QSliderH): Integer; cdecl;
function QSlider_maxValue(handle: QSliderH): Integer; cdecl;
procedure QSlider_setMinValue(handle: QSliderH; p1: Integer); cdecl;
procedure QSlider_setMaxValue(handle: QSliderH; p1: Integer); cdecl;
function QSlider_lineStep(handle: QSliderH): Integer; cdecl;
function QSlider_pageStep(handle: QSliderH): Integer; cdecl;
procedure QSlider_setLineStep(handle: QSliderH; p1: Integer); cdecl;
procedure QSlider_setPageStep(handle: QSliderH; p1: Integer); cdecl;
function QSlider_value(handle: QSliderH): Integer; cdecl;
procedure QSlider_setValue(handle: QSliderH; p1: Integer); cdecl;
procedure QSlider_addStep(handle: QSliderH); cdecl;
procedure QSlider_subtractStep(handle: QSliderH); cdecl;
function QSlider_to_QRangeControl(handle: QSliderH): QRangeControlH; cdecl;
function QSocketNotifier_create(socket: Integer; p2: QSocketNotifierType; parent: QObjectH; name: PAnsiChar): QSocketNotifierH; cdecl;
procedure QSocketNotifier_destroy(handle: QSocketNotifierH); cdecl;
function QSocketNotifier_socket(handle: QSocketNotifierH): Integer; cdecl;
function QSocketNotifier_type(handle: QSocketNotifierH): QSocketNotifierType; cdecl;
function QSocketNotifier_isEnabled(handle: QSocketNotifierH): Boolean; cdecl;
procedure QSocketNotifier_setEnabled(handle: QSocketNotifierH; p1: Boolean); cdecl;
function QSpinBox_create(parent: QWidgetH; name: PAnsiChar): QSpinBoxH; overload; cdecl;
procedure QSpinBox_destroy(handle: QSpinBoxH); cdecl;
function QSpinBox_create(minValue: Integer; maxValue: Integer; step: Integer; parent: QWidgetH; name: PAnsiChar): QSpinBoxH; overload; cdecl;
procedure QSpinBox_text(handle: QSpinBoxH; retval: PWideString); cdecl;
procedure QSpinBox_prefix(handle: QSpinBoxH; retval: PWideString); cdecl;
procedure QSpinBox_suffix(handle: QSpinBoxH; retval: PWideString); cdecl;
procedure QSpinBox_cleanText(handle: QSpinBoxH; retval: PWideString); cdecl;
procedure QSpinBox_setSpecialValueText(handle: QSpinBoxH; text: PWideString); cdecl;
procedure QSpinBox_specialValueText(handle: QSpinBoxH; retval: PWideString); cdecl;
procedure QSpinBox_setWrapping(handle: QSpinBoxH; on: Boolean); cdecl;
function QSpinBox_wrapping(handle: QSpinBoxH): Boolean; cdecl;
procedure QSpinBox_setButtonSymbols(handle: QSpinBoxH; p1: QSpinBoxButtonSymbols); cdecl;
function QSpinBox_buttonSymbols(handle: QSpinBoxH): QSpinBoxButtonSymbols; cdecl;
procedure QSpinBox_setValidator(handle: QSpinBoxH; v: QValidatorH); cdecl;
function QSpinBox_validator(handle: QSpinBoxH): QValidatorH; cdecl;
procedure QSpinBox_sizeHint(handle: QSpinBoxH; retval: PSize); cdecl;
procedure QSpinBox_sizePolicy(handle: QSpinBoxH; retval: PSizePolicy); cdecl;
function QSpinBox_minValue(handle: QSpinBoxH): Integer; cdecl;
function QSpinBox_maxValue(handle: QSpinBoxH): Integer; cdecl;
procedure QSpinBox_setMinValue(handle: QSpinBoxH; p1: Integer); cdecl;
procedure QSpinBox_setMaxValue(handle: QSpinBoxH; p1: Integer); cdecl;
function QSpinBox_lineStep(handle: QSpinBoxH): Integer; cdecl;
procedure QSpinBox_setLineStep(handle: QSpinBoxH; p1: Integer); cdecl;
function QSpinBox_value(handle: QSpinBoxH): Integer; cdecl;
procedure QSpinBox_setValue(handle: QSpinBoxH; value: Integer); cdecl;
procedure QSpinBox_setPrefix(handle: QSpinBoxH; text: PWideString); cdecl;
procedure QSpinBox_setSuffix(handle: QSpinBoxH; text: PWideString); cdecl;
procedure QSpinBox_stepUp(handle: QSpinBoxH); cdecl;
procedure QSpinBox_stepDown(handle: QSpinBoxH); cdecl;
procedure QSpinBox_setEnabled(handle: QSpinBoxH; p1: Boolean); cdecl;
function QSpinBox_to_QRangeControl(handle: QSpinBoxH): QRangeControlH; cdecl;
function QStyle_guiStyle(handle: QStyleH): GUIStyle; cdecl;
procedure QStyle_polish(handle: QStyleH; p1: QWidgetH); overload; cdecl;
procedure QStyle_unPolish(handle: QStyleH; p1: QWidgetH); overload; cdecl;
procedure QStyle_polish(handle: QStyleH; p1: QApplicationH); overload; cdecl;
procedure QStyle_unPolish(handle: QStyleH; p1: QApplicationH); overload; cdecl;
procedure QStyle_polish(handle: QStyleH; p1: QPaletteH); overload; cdecl;
procedure QStyle_itemRect(handle: QStyleH; retval: PRect; p: QPainterH; x: Integer; y: Integer; w: Integer; h: Integer; flags: Integer; enabled: Boolean; pixmap: QPixmapH; text: PWideString; len: Integer); cdecl;
procedure QStyle_drawItem(handle: QStyleH; p: QPainterH; x: Integer; y: Integer; w: Integer; h: Integer; flags: Integer; g: QColorGroupH; enabled: Boolean; pixmap: QPixmapH; text: PWideString; len: Integer; penColor: QColorH); cdecl;
procedure QStyle_drawSeparator(handle: QStyleH; p: QPainterH; x1: Integer; y1: Integer; x2: Integer; y2: Integer; g: QColorGroupH; sunken: Boolean; lineWidth: Integer; midLineWidth: Integer); cdecl;
procedure QStyle_drawRect(handle: QStyleH; p: QPainterH; x: Integer; y: Integer; w: Integer; h: Integer; p6: QColorH; lineWidth: Integer; fill: QBrushH); cdecl;
procedure QStyle_drawRectStrong(handle: QStyleH; p: QPainterH; x: Integer; y: Integer; w: Integer; h: Integer; p6: QColorGroupH; sunken: Boolean; lineWidth: Integer; midLineWidth: Integer; fill: QBrushH); cdecl;
procedure QStyle_drawButton(handle: QStyleH; p: QPainterH; x: Integer; y: Integer; w: Integer; h: Integer; g: QColorGroupH; sunken: Boolean; fill: QBrushH); cdecl;
procedure QStyle_buttonRect(handle: QStyleH; retval: PRect; x: Integer; y: Integer; w: Integer; h: Integer); cdecl;
procedure QStyle_drawButtonMask(handle: QStyleH; p: QPainterH; x: Integer; y: Integer; w: Integer; h: Integer); cdecl;
procedure QStyle_drawBevelButton(handle: QStyleH; p: QPainterH; x: Integer; y: Integer; w: Integer; h: Integer; g: QColorGroupH; sunken: Boolean; fill: QBrushH); cdecl;
procedure QStyle_bevelButtonRect(handle: QStyleH; retval: PRect; x: Integer; y: Integer; w: Integer; h: Integer); cdecl;
procedure QStyle_drawToolButton(handle: QStyleH; p: QPainterH; x: Integer; y: Integer; w: Integer; h: Integer; g: QColorGroupH; sunken: Boolean; fill: QBrushH); overload; cdecl;
procedure QStyle_drawToolButton(handle: QStyleH; btn: QToolButtonH; p: QPainterH); overload; cdecl;
procedure QStyle_toolButtonRect(handle: QStyleH; retval: PRect; x: Integer; y: Integer; w: Integer; h: Integer); cdecl;
procedure QStyle_drawPanel(handle: QStyleH; p: QPainterH; x: Integer; y: Integer; w: Integer; h: Integer; p6: QColorGroupH; sunken: Boolean; lineWidth: Integer; fill: QBrushH); cdecl;
procedure QStyle_drawPopupPanel(handle: QStyleH; p: QPainterH; x: Integer; y: Integer; w: Integer; h: Integer; p6: QColorGroupH; lineWidth: Integer; fill: QBrushH); cdecl;
procedure QStyle_drawArrow(handle: QStyleH; p: QPainterH; _type: ArrowType; down: Boolean; x: Integer; y: Integer; w: Integer; h: Integer; g: QColorGroupH; enabled: Boolean; fill: QBrushH); cdecl;
procedure QStyle_exclusiveIndicatorSize(handle: QStyleH; retval: PSize); cdecl;
procedure QStyle_drawExclusiveIndicator(handle: QStyleH; p: QPainterH; x: Integer; y: Integer; w: Integer; h: Integer; g: QColorGroupH; on: Boolean; down: Boolean; enabled: Boolean); cdecl;
procedure QStyle_drawExclusiveIndicatorMask(handle: QStyleH; p: QPainterH; x: Integer; y: Integer; w: Integer; h: Integer; on: Boolean); cdecl;
procedure QStyle_indicatorSize(handle: QStyleH; retval: PSize); cdecl;
procedure QStyle_drawIndicator(handle: QStyleH; p: QPainterH; x: Integer; y: Integer; w: Integer; h: Integer; g: QColorGroupH; state: Integer; down: Boolean; enabled: Boolean); cdecl;
procedure QStyle_drawIndicatorMask(handle: QStyleH; p: QPainterH; x: Integer; y: Integer; w: Integer; h: Integer; state: Integer); cdecl;
procedure QStyle_drawFocusRect(handle: QStyleH; p1: QPainterH; p2: PRect; p3: QColorGroupH; bg: QColorH; p5: Boolean); cdecl;
procedure QStyle_drawComboButton(handle: QStyleH; p: QPainterH; x: Integer; y: Integer; w: Integer; h: Integer; g: QColorGroupH; sunken: Boolean; editable: Boolean; enabled: Boolean; fill: QBrushH); cdecl;
procedure QStyle_comboButtonRect(handle: QStyleH; retval: PRect; x: Integer; y: Integer; w: Integer; h: Integer); cdecl;
procedure QStyle_comboButtonFocusRect(handle: QStyleH; retval: PRect; x: Integer; y: Integer; w: Integer; h: Integer); cdecl;
procedure QStyle_drawComboButtonMask(handle: QStyleH; p: QPainterH; x: Integer; y: Integer; w: Integer; h: Integer); cdecl;
procedure QStyle_drawPushButton(handle: QStyleH; btn: QPushButtonH; p: QPainterH); cdecl;
procedure QStyle_drawPushButtonLabel(handle: QStyleH; btn: QPushButtonH; p: QPainterH); cdecl;
procedure QStyle_pushButtonContentsRect(handle: QStyleH; retval: PRect; btn: QPushButtonH); cdecl;
function QStyle_menuButtonIndicatorWidth(handle: QStyleH; h: Integer): Integer; cdecl;
procedure QStyle_getButtonShift(handle: QStyleH; x: PInteger; y: PInteger); cdecl;
function QStyle_defaultFrameWidth(handle: QStyleH): Integer; cdecl;
procedure QStyle_tabbarMetrics(handle: QStyleH; p1: QTabBarH; p2: PInteger; p3: PInteger; p4: PInteger); cdecl;
procedure QStyle_drawTab(handle: QStyleH; p1: QPainterH; p2: QTabBarH; p3: QTabH; selected: Boolean); cdecl;
procedure QStyle_drawTabMask(handle: QStyleH; p1: QPainterH; p2: QTabBarH; p3: QTabH; selected: Boolean); cdecl;
procedure QStyle_scrollBarMetrics(handle: QStyleH; p1: QScrollBarH; p2: PInteger; p3: PInteger; p4: PInteger; p5: PInteger); cdecl;
procedure QStyle_drawScrollBarControls(handle: QStyleH; p1: QPainterH; p2: QScrollBarH; sliderStart: Integer; controls: Cardinal; activeControl: Cardinal); cdecl;
function QStyle_scrollBarPointOver(handle: QStyleH; p1: QScrollBarH; sliderStart: Integer; p3: PPoint): QStyleScrollControl; cdecl;
function QStyle_sliderLength(handle: QStyleH): Integer; cdecl;
procedure QStyle_drawSlider(handle: QStyleH; p: QPainterH; x: Integer; y: Integer; w: Integer; h: Integer; g: QColorGroupH; p7: Orientation; tickAbove: Boolean; tickBelow: Boolean); cdecl;
procedure QStyle_drawSliderMask(handle: QStyleH; p: QPainterH; x: Integer; y: Integer; w: Integer; h: Integer; p6: Orientation; tickAbove: Boolean; tickBelow: Boolean); cdecl;
procedure QStyle_drawSliderGroove(handle: QStyleH; p: QPainterH; x: Integer; y: Integer; w: Integer; h: Integer; g: QColorGroupH; c: QCOORD; p8: Orientation); cdecl;
procedure QStyle_drawSliderGrooveMask(handle: QStyleH; p: QPainterH; x: Integer; y: Integer; w: Integer; h: Integer; c: QCOORD; p7: Orientation); cdecl;
function QStyle_maximumSliderDragDistance(handle: QStyleH): Integer; cdecl;
function QStyle_splitterWidth(handle: QStyleH): Integer; cdecl;
procedure QStyle_drawSplitter(handle: QStyleH; p: QPainterH; x: Integer; y: Integer; w: Integer; h: Integer; g: QColorGroupH; p7: Orientation); cdecl;
procedure QStyle_drawCheckMark(handle: QStyleH; p: QPainterH; x: Integer; y: Integer; w: Integer; h: Integer; g: QColorGroupH; act: Boolean; dis: Boolean); cdecl;
procedure QStyle_polishPopupMenu(handle: QStyleH; p1: QPopupMenuH); cdecl;
function QStyle_extraPopupMenuItemWidth(handle: QStyleH; checkable: Boolean; maxpmw: Integer; mi: QMenuItemH; fm: QFontMetricsH): Integer; cdecl;
function QStyle_popupSubmenuIndicatorWidth(handle: QStyleH; fm: QFontMetricsH): Integer; cdecl;
function QStyle_popupMenuItemHeight(handle: QStyleH; checkable: Boolean; mi: QMenuItemH; fm: QFontMetricsH): Integer; cdecl;
procedure QStyle_drawPopupMenuItem(handle: QStyleH; p: QPainterH; checkable: Boolean; maxpmw: Integer; tab: Integer; mi: QMenuItemH; pal: QPaletteH; act: Boolean; enabled: Boolean; x: Integer; y: Integer; w: Integer; h: Integer); cdecl;
procedure QStyle_drawMenuBarItem(handle: QStyleH; p: QPainterH; x: Integer; y: Integer; w: Integer; h: Integer; mi: QMenuItemH; g: QColorGroupH; enabled: Boolean; active: Boolean); cdecl;
procedure QStyle_scrollBarExtent(handle: QStyleH; retval: PSize); cdecl;
function QStyle_buttonDefaultIndicatorWidth(handle: QStyleH): Integer; cdecl;
function QStyle_buttonMargin(handle: QStyleH): Integer; cdecl;
function QStyle_toolBarHandleExtent(handle: QStyleH): Integer; cdecl;
function QStyle_toolBarHandleExtend(handle: QStyleH): Integer; cdecl;
function QStyle_sliderThickness(handle: QStyleH): Integer; cdecl;
procedure QStyle_drawToolBarHandle(handle: QStyleH; p: QPainterH; r: PRect; orientation: Orientation; highlight: Boolean; cg: QColorGroupH; drawBorder: Boolean); cdecl;
function QTranslatorMessage_create(): QTranslatorMessageH; overload; cdecl;
procedure QTranslatorMessage_destroy(handle: QTranslatorMessageH); cdecl;
function QTranslatorMessage_create(context: PAnsiChar; sourceText: PAnsiChar; comment: PAnsiChar; translation: PWideString): QTranslatorMessageH; overload; cdecl;
function QTranslatorMessage_create(p1: QDataStreamH): QTranslatorMessageH; overload; cdecl;
function QTranslatorMessage_create(m: QTranslatorMessageH): QTranslatorMessageH; overload; cdecl;
function QTranslatorMessage_hash(handle: QTranslatorMessageH): Cardinal; cdecl;
function QTranslatorMessage_context(handle: QTranslatorMessageH): PAnsiChar; cdecl;
function QTranslatorMessage_sourceText(handle: QTranslatorMessageH): PAnsiChar; cdecl;
function QTranslatorMessage_comment(handle: QTranslatorMessageH): PAnsiChar; cdecl;
procedure QTranslatorMessage_setTranslation(handle: QTranslatorMessageH; translation: PWideString); cdecl;
procedure QTranslatorMessage_translation(handle: QTranslatorMessageH; retval: PWideString); cdecl;
procedure QTranslatorMessage_write(handle: QTranslatorMessageH; s: QDataStreamH; strip: Boolean; prefix: QTranslatorMessagePrefix); cdecl;
function QTranslatorMessage_commonPrefix(handle: QTranslatorMessageH; p1: QTranslatorMessageH): QTranslatorMessagePrefix; cdecl;
function QTranslator_create(parent: QObjectH; name: PAnsiChar): QTranslatorH; cdecl;
procedure QTranslator_destroy(handle: QTranslatorH); cdecl;
procedure QTranslator_find(handle: QTranslatorH; retval: PWideString; p1: PAnsiChar; p2: PAnsiChar; p3: PAnsiChar); overload; cdecl;
procedure QTranslator_find(handle: QTranslatorH; retval: PWideString; p1: PAnsiChar; p2: PAnsiChar); overload; cdecl;
function QTranslator_load(handle: QTranslatorH; filename: PWideString; directory: PWideString; search_delimiters: PWideString; suffix: PWideString): Boolean; cdecl;
function QTranslator_save(handle: QTranslatorH; filename: PWideString; mode: QTranslatorSaveMode): Boolean; cdecl;
procedure QTranslator_clear(handle: QTranslatorH); cdecl;
procedure QTranslator_insert(handle: QTranslatorH; p1: QTranslatorMessageH); overload; cdecl;
procedure QTranslator_insert(handle: QTranslatorH; p1: PAnsiChar; p2: PAnsiChar; p3: PWideString); overload; cdecl;
procedure QTranslator_remove(handle: QTranslatorH; p1: QTranslatorMessageH); overload; cdecl;
procedure QTranslator_remove(handle: QTranslatorH; p1: PAnsiChar; p2: PAnsiChar); overload; cdecl;
function QTranslator_contains(handle: QTranslatorH; p1: PAnsiChar; p2: PAnsiChar; p3: PAnsiChar): Boolean; overload; cdecl;
function QTranslator_contains(handle: QTranslatorH; p1: PAnsiChar; p2: PAnsiChar): Boolean; overload; cdecl;
procedure QTranslator_squeeze(handle: QTranslatorH; p1: QTranslatorSaveMode); overload; cdecl;
procedure QTranslator_squeeze(handle: QTranslatorH); overload; cdecl;
procedure QTranslator_unsqueeze(handle: QTranslatorH); cdecl;
function QColor_create(): QColorH; overload; cdecl;
procedure QColor_destroy(handle: QColorH); cdecl;
function QColor_create(r: Integer; g: Integer; b: Integer): QColorH; overload; cdecl;
function QColor_create(x: Integer; y: Integer; z: Integer; p4: QColorSpec): QColorH; overload; cdecl;
function QColor_create(rgb: QRgbH; pixel: Cardinal): QColorH; overload; cdecl;
function QColor_create(name: PWideString): QColorH; overload; cdecl;
function QColor_create(name: PAnsiChar): QColorH; overload; cdecl;
function QColor_create(p1: QColorH): QColorH; overload; cdecl;
function QColor_isValid(handle: QColorH): Boolean; cdecl;
function QColor_isDirty(handle: QColorH): Boolean; cdecl;
procedure QColor_name(handle: QColorH; retval: PWideString); cdecl;
procedure QColor_setNamedColor(handle: QColorH; name: PWideString); cdecl;
procedure QColor_rgb(handle: QColorH; r: PInteger; g: PInteger; b: PInteger); overload; cdecl;
procedure QColor_rgb(handle: QColorH; retval: QRgbH); overload; cdecl;
procedure QColor_setRgb(handle: QColorH; r: Integer; g: Integer; b: Integer); overload; cdecl;
procedure QColor_setRgb(handle: QColorH; rgb: QRgbH); overload; cdecl;
function QColor_red(handle: QColorH): Integer; cdecl;
function QColor_green(handle: QColorH): Integer; cdecl;
function QColor_blue(handle: QColorH): Integer; cdecl;
procedure QColor_hsv(handle: QColorH; h: PInteger; s: PInteger; v: PInteger); cdecl;
procedure QColor_getHsv(handle: QColorH; h: PInteger; s: PInteger; v: PInteger); cdecl;
procedure QColor_setHsv(handle: QColorH; h: Integer; s: Integer; v: Integer); cdecl;
procedure QColor_light(handle: QColorH; retval: QColorH; f: Integer); cdecl;
procedure QColor_dark(handle: QColorH; retval: QColorH; f: Integer); cdecl;
function QColor_lazyAlloc(): Boolean; cdecl;
procedure QColor_setLazyAlloc(p1: Boolean); cdecl;
function QColor_alloc(handle: QColorH): Cardinal; cdecl;
function QColor_pixel(handle: QColorH): Cardinal; cdecl;
function QColor_maxColors(): Integer; cdecl;
function QColor_numBitPlanes(): Integer; cdecl;
function QColor_enterAllocContext(): Integer; cdecl;
procedure QColor_leaveAllocContext(); cdecl;
function QColor_currentAllocContext(): Integer; cdecl;
procedure QColor_destroyAllocContext(p1: Integer); cdecl;
{$IFDEF MSWINDOWS}
function QColor_hPal(): HPALETTE; cdecl;
{$ENDIF}
{$IFDEF MSWINDOWS}
function QColor_realizePal(p1: QWidgetH): Cardinal; cdecl;
{$ENDIF}
procedure QColor_initialize(); cdecl;
procedure QColor_cleanup(); cdecl;
function QFont_create(): QFontH; overload; cdecl;
procedure QFont_destroy(handle: QFontH); cdecl;
function QFont_create(family: PWideString; pointSize: Integer; weight: Integer; italic: Boolean): QFontH; overload; cdecl;
function QFont_create(family: PWideString; pointSize: Integer; weight: Integer; italic: Boolean; charSet: QFontCharSet): QFontH; overload; cdecl;
function QFont_create(p1: QFontH): QFontH; overload; cdecl;
procedure QFont_family(handle: QFontH; retval: PWideString); cdecl;
procedure QFont_setFamily(handle: QFontH; p1: PWideString); cdecl;
function QFont_pointSize(handle: QFontH): Integer; cdecl;
function QFont_pointSizeFloat(handle: QFontH): Single; cdecl;
procedure QFont_setPointSize(handle: QFontH; p1: Integer); cdecl;
procedure QFont_setPointSizeFloat(handle: QFontH; p1: Single); cdecl;
function QFont_pixelSize(handle: QFontH): Integer; cdecl;
procedure QFont_setPixelSize(handle: QFontH; p1: Integer); cdecl;
procedure QFont_setPixelSizeFloat(handle: QFontH; p1: Single); cdecl;
function QFont_weight(handle: QFontH): Integer; cdecl;
procedure QFont_setWeight(handle: QFontH; p1: Integer); cdecl;
function QFont_bold(handle: QFontH): Boolean; cdecl;
procedure QFont_setBold(handle: QFontH; p1: Boolean); cdecl;
function QFont_italic(handle: QFontH): Boolean; cdecl;
procedure QFont_setItalic(handle: QFontH; p1: Boolean); cdecl;
function QFont_underline(handle: QFontH): Boolean; cdecl;
procedure QFont_setUnderline(handle: QFontH; p1: Boolean); cdecl;
function QFont_strikeOut(handle: QFontH): Boolean; cdecl;
procedure QFont_setStrikeOut(handle: QFontH; p1: Boolean); cdecl;
function QFont_fixedPitch(handle: QFontH): Boolean; cdecl;
procedure QFont_setFixedPitch(handle: QFontH; p1: Boolean); cdecl;
function QFont_styleHint(handle: QFontH): QFontStyleHint; cdecl;
procedure QFont_setStyleHint(handle: QFontH; p1: QFontStyleHint); overload; cdecl;
function QFont_styleStrategy(handle: QFontH): QFontStyleStrategy; cdecl;
procedure QFont_setStyleHint(handle: QFontH; p1: QFontStyleHint; p2: QFontStyleStrategy); overload; cdecl;
function QFont_charSet(handle: QFontH): QFontCharSet; cdecl;
procedure QFont_setCharSet(handle: QFontH; p1: QFontCharSet); cdecl;
function QFont_charSetForLocale(): QFontCharSet; cdecl;
function QFont_rawMode(handle: QFontH): Boolean; cdecl;
procedure QFont_setRawMode(handle: QFontH; p1: Boolean); cdecl;
function QFont_exactMatch(handle: QFontH): Boolean; cdecl;
function QFont_isCopyOf(handle: QFontH; p1: QFontH): Boolean; cdecl;
{$IFDEF MSWINDOWS}
function QFont_handle(handle: QFontH): HFONT; overload; cdecl;
{$ENDIF}
{$IFDEF LINUX}
function QFont_handle(handle: QFontH): HANDLE; overload; cdecl;
{$ENDIF}
procedure QFont_setRawName(handle: QFontH; p1: PWideString); cdecl;
procedure QFont_rawName(handle: QFontH; retval: PWideString); cdecl;
procedure QFont_key(handle: QFontH; retval: PWideString); cdecl;
procedure QFont_encodingName(retval: PWideString; p1: QFontCharSet); cdecl;
procedure QFont_defaultFont(retval: QFontH); cdecl;
procedure QFont_setDefaultFont(p1: QFontH); cdecl;
procedure QFont_substitute(retval: PWideString; familyName: PWideString); cdecl;
procedure QFont_insertSubstitution(p1: PWideString; p2: PWideString); cdecl;
procedure QFont_removeSubstitution(p1: PWideString); cdecl;
procedure QFont_substitutions(retval: QStringListH); cdecl;
procedure QFont_initialize(); cdecl;
procedure QFont_locale_init(); cdecl;
procedure QFont_cleanup(); cdecl;
procedure QFont_cacheStatistics(); cdecl;
function QImageTextKeyLang_create(k: PAnsiChar; l: PAnsiChar): QImageTextKeyLangH; overload; cdecl;
procedure QImageTextKeyLang_destroy(handle: QImageTextKeyLangH); cdecl;
function QImageTextKeyLang_create(): QImageTextKeyLangH; overload; cdecl;
function QImage_create(): QImageH; overload; cdecl;
procedure QImage_destroy(handle: QImageH); cdecl;
function QImage_create(width: Integer; height: Integer; depth: Integer; numColors: Integer; bitOrder: QImageEndian): QImageH; overload; cdecl;
function QImage_create(p1: PSize; depth: Integer; numColors: Integer; bitOrder: QImageEndian): QImageH; overload; cdecl;
function QImage_create(fileName: PWideString; format: PAnsiChar): QImageH; overload; cdecl;
function QImage_create(data: QByteArrayH): QImageH; overload; cdecl;
function QImage_create(data: PByte; w: Integer; h: Integer; depth: Integer; colortable: QRgbH; numColors: Integer; bitOrder: QImageEndian): QImageH; overload; cdecl;
function QImage_create(p1: QImageH): QImageH; overload; cdecl;
procedure QImage_detach(handle: QImageH); cdecl;
procedure QImage_copy(handle: QImageH; retval: QImageH); overload; cdecl;
procedure QImage_copy(handle: QImageH; retval: QImageH; x: Integer; y: Integer; w: Integer; h: Integer; conversion_flags: Integer); overload; cdecl;
procedure QImage_copy(handle: QImageH; retval: QImageH; p1: PRect); overload; cdecl;
function QImage_isNull(handle: QImageH): Boolean; cdecl;
function QImage_width(handle: QImageH): Integer; cdecl;
function QImage_height(handle: QImageH): Integer; cdecl;
procedure QImage_size(handle: QImageH; retval: PSize); cdecl;
procedure QImage_rect(handle: QImageH; retval: PRect); cdecl;
function QImage_depth(handle: QImageH): Integer; cdecl;
function QImage_numColors(handle: QImageH): Integer; cdecl;
function QImage_bitOrder(handle: QImageH): QImageEndian; cdecl;
procedure QImage_color(handle: QImageH; retval: QRgbH; i: Integer); cdecl;
procedure QImage_setColor(handle: QImageH; i: Integer; c: QRgbH); cdecl;
procedure QImage_setNumColors(handle: QImageH; p1: Integer); cdecl;
function QImage_hasAlphaBuffer(handle: QImageH): Boolean; cdecl;
procedure QImage_setAlphaBuffer(handle: QImageH; p1: Boolean); cdecl;
function QImage_allGray(handle: QImageH): Boolean; cdecl;
function QImage_isGrayscale(handle: QImageH): Boolean; cdecl;
function QImage_bits(handle: QImageH): PByte; cdecl;
function QImage_scanLine(handle: QImageH; p1: Integer): PByte; cdecl;
function QImage_jumpTable(handle: QImageH): PPByte; cdecl;
function QImage_colorTable(handle: QImageH): QRgbH; cdecl;
function QImage_numBytes(handle: QImageH): Integer; cdecl;
function QImage_bytesPerLine(handle: QImageH): Integer; cdecl;
function QImage_create(handle: QImageH; width: Integer; height: Integer; depth: Integer; numColors: Integer; bitOrder: QImageEndian): Boolean; overload; cdecl;
function QImage_create(handle: QImageH; p1: PSize; depth: Integer; numColors: Integer; bitOrder: QImageEndian): Boolean; overload; cdecl;
procedure QImage_reset(handle: QImageH); cdecl;
procedure QImage_fill(handle: QImageH; pixel: Cardinal); cdecl;
procedure QImage_invertPixels(handle: QImageH; invertAlpha: Boolean); cdecl;
procedure QImage_convertDepth(handle: QImageH; retval: QImageH; p1: Integer); overload; cdecl;
procedure QImage_convertDepthWithPalette(handle: QImageH; retval: QImageH; p1: Integer; p: QRgbH; pc: Integer; cf: Integer); cdecl;
procedure QImage_convertDepth(handle: QImageH; retval: QImageH; p1: Integer; conversion_flags: Integer); overload; cdecl;
procedure QImage_convertBitOrder(handle: QImageH; retval: QImageH; p1: QImageEndian); cdecl;
procedure QImage_smoothScale(handle: QImageH; retval: QImageH; width: Integer; height: Integer); cdecl;
procedure QImage_createAlphaMask(handle: QImageH; retval: QImageH; conversion_flags: Integer); cdecl;
procedure QImage_createHeuristicMask(handle: QImageH; retval: QImageH; clipTight: Boolean); cdecl;
procedure QImage_mirror(handle: QImageH; retval: QImageH); overload; cdecl;
procedure QImage_mirror(handle: QImageH; retval: QImageH; horizontally: Boolean; vertically: Boolean); overload; cdecl;
procedure QImage_swapRGB(handle: QImageH; retval: QImageH); cdecl;
function QImage_systemBitOrder(): QImageEndian; cdecl;
function QImage_systemByteOrder(): QImageEndian; cdecl;
function QImage_imageFormat(fileName: PWideString): PAnsiChar; cdecl;
procedure QImage_inputFormats(retval: QStrListH); cdecl;
procedure QImage_outputFormats(retval: QStrListH); cdecl;
procedure QImage_inputFormatList(retval: QStringListH); cdecl;
procedure QImage_outputFormatList(retval: QStringListH); cdecl;
function QImage_load(handle: QImageH; fileName: PWideString; format: PAnsiChar): Boolean; cdecl;
function QImage_loadFromData(handle: QImageH; buf: PByte; len: Cardinal; format: PAnsiChar): Boolean; overload; cdecl;
function QImage_loadFromData(handle: QImageH; data: QByteArrayH; format: PAnsiChar): Boolean; overload; cdecl;
function QImage_save(handle: QImageH; fileName: PWideString; format: PAnsiChar): Boolean; overload; cdecl;
function QImage_save(handle: QImageH; fileName: PWideString; format: PAnsiChar; quality: Integer): Boolean; overload; cdecl;
function QImage_valid(handle: QImageH; x: Integer; y: Integer): Boolean; cdecl;
function QImage_pixelIndex(handle: QImageH; x: Integer; y: Integer): Integer; cdecl;
procedure QImage_pixel(handle: QImageH; retval: QRgbH; x: Integer; y: Integer); cdecl;
procedure QImage_setPixel(handle: QImageH; x: Integer; y: Integer; index_or_rgb: Cardinal); cdecl;
function QImage_dotsPerMeterX(handle: QImageH): Integer; cdecl;
function QImage_dotsPerMeterY(handle: QImageH): Integer; cdecl;
procedure QImage_setDotsPerMeterX(handle: QImageH; p1: Integer); cdecl;
procedure QImage_setDotsPerMeterY(handle: QImageH; p1: Integer); cdecl;
procedure QImage_offset(handle: QImageH; retval: PPoint); cdecl;
procedure QImage_setOffset(handle: QImageH; p1: PPoint); cdecl;
procedure QImage_textLanguages(handle: QImageH; retval: QStringListH); cdecl;
procedure QImage_textKeys(handle: QImageH; retval: QStringListH); cdecl;
procedure QImage_text(handle: QImageH; retval: PWideString; key: PAnsiChar; lang: PAnsiChar); overload; cdecl;
procedure QImage_text(handle: QImageH; retval: PWideString; p1: QImageTextKeyLangH); overload; cdecl;
procedure QImage_setText(handle: QImageH; key: PAnsiChar; lang: PAnsiChar; p3: PWideString); cdecl;
function QImageIO_create(): QImageIOH; overload; cdecl;
procedure QImageIO_destroy(handle: QImageIOH); cdecl;
function QImageIO_create(ioDevice: QIODeviceH; format: PAnsiChar): QImageIOH; overload; cdecl;
function QImageIO_create(fileName: PWideString; format: PAnsiChar): QImageIOH; overload; cdecl;
function QImageIO_image(handle: QImageIOH): QImageH; cdecl;
function QImageIO_status(handle: QImageIOH): Integer; cdecl;
function QImageIO_format(handle: QImageIOH): PAnsiChar; cdecl;
function QImageIO_ioDevice(handle: QImageIOH): QIODeviceH; cdecl;
procedure QImageIO_fileName(handle: QImageIOH; retval: PWideString); cdecl;
function QImageIO_parameters(handle: QImageIOH): PAnsiChar; cdecl;
procedure QImageIO_description(handle: QImageIOH; retval: PWideString); cdecl;
procedure QImageIO_setImage(handle: QImageIOH; p1: QImageH); cdecl;
procedure QImageIO_setStatus(handle: QImageIOH; p1: Integer); cdecl;
procedure QImageIO_setFormat(handle: QImageIOH; p1: PAnsiChar); cdecl;
procedure QImageIO_setIODevice(handle: QImageIOH; p1: QIODeviceH); cdecl;
procedure QImageIO_setFileName(handle: QImageIOH; p1: PWideString); cdecl;
procedure QImageIO_setParameters(handle: QImageIOH; p1: PAnsiChar); cdecl;
procedure QImageIO_setDescription(handle: QImageIOH; p1: PWideString); cdecl;
function QImageIO_read(handle: QImageIOH): Boolean; cdecl;
function QImageIO_write(handle: QImageIOH): Boolean; cdecl;
function QImageIO_imageFormat(fileName: PWideString): PAnsiChar; overload; cdecl;
function QImageIO_imageFormat(p1: QIODeviceH): PAnsiChar; overload; cdecl;
procedure QImageIO_inputFormats(retval: QStrListH); cdecl;
procedure QImageIO_outputFormats(retval: QStrListH); cdecl;
function QIconSet_create(): QIconSetH; overload; cdecl;
procedure QIconSet_destroy(handle: QIconSetH); cdecl;
function QIconSet_create(p1: QPixmapH; p2: QIconSetSize): QIconSetH; overload; cdecl;
function QIconSet_create(smallPix: QPixmapH; largePix: QPixmapH): QIconSetH; overload; cdecl;
function QIconSet_create(p1: QIconSetH): QIconSetH; overload; cdecl;
procedure QIconSet_reset(handle: QIconSetH; p1: QPixmapH; p2: QIconSetSize); cdecl;
procedure QIconSet_setPixmap(handle: QIconSetH; p1: QPixmapH; p2: QIconSetSize; p3: QIconSetMode); overload; cdecl;
procedure QIconSet_setPixmap(handle: QIconSetH; p1: PWideString; p2: QIconSetSize; p3: QIconSetMode); overload; cdecl;
procedure QIconSet_pixmap(handle: QIconSetH; retval: QPixmapH; p1: QIconSetSize; p2: QIconSetMode); overload; cdecl;
procedure QIconSet_pixmap(handle: QIconSetH; retval: QPixmapH; s: QIconSetSize; enabled: Boolean); overload; cdecl;
procedure QIconSet_pixmap(handle: QIconSetH; retval: QPixmapH); overload; cdecl;
function QIconSet_isGenerated(handle: QIconSetH; p1: QIconSetSize; p2: QIconSetMode): Boolean; cdecl;
function QIconSet_isNull(handle: QIconSetH): Boolean; cdecl;
procedure QIconSet_detach(handle: QIconSetH); cdecl;
function QMovie_create(): QMovieH; overload; cdecl;
procedure QMovie_destroy(handle: QMovieH); cdecl;
function QMovie_create(bufsize: Integer): QMovieH; overload; cdecl;
function QMovie_create(p1: QDataSourceH; bufsize: Integer): QMovieH; overload; cdecl;
function QMovie_create(fileName: PWideString; bufsize: Integer): QMovieH; overload; cdecl;
function QMovie_create(data: QByteArrayH; bufsize: Integer): QMovieH; overload; cdecl;
function QMovie_create(p1: QMovieH): QMovieH; overload; cdecl;
function QMovie_pushSpace(handle: QMovieH): Integer; cdecl;
procedure QMovie_pushData(handle: QMovieH; data: PByte; length: Integer); cdecl;
function QMovie_backgroundColor(handle: QMovieH): QColorH; cdecl;
procedure QMovie_setBackgroundColor(handle: QMovieH; p1: QColorH); cdecl;
procedure QMovie_getValidRect(handle: QMovieH; retval: PRect); cdecl;
function QMovie_framePixmap(handle: QMovieH): QPixmapH; cdecl;
function QMovie_frameImage(handle: QMovieH): QImageH; cdecl;
function QMovie_isNull(handle: QMovieH): Boolean; cdecl;
function QMovie_frameNumber(handle: QMovieH): Integer; cdecl;
function QMovie_steps(handle: QMovieH): Integer; cdecl;
function QMovie_paused(handle: QMovieH): Boolean; cdecl;
function QMovie_finished(handle: QMovieH): Boolean; cdecl;
function QMovie_running(handle: QMovieH): Boolean; cdecl;
procedure QMovie_unpause(handle: QMovieH); cdecl;
procedure QMovie_pause(handle: QMovieH); cdecl;
procedure QMovie_step(handle: QMovieH); overload; cdecl;
procedure QMovie_step(handle: QMovieH; p1: Integer); overload; cdecl;
procedure QMovie_restart(handle: QMovieH); cdecl;
function QMovie_speed(handle: QMovieH): Integer; cdecl;
procedure QMovie_setSpeed(handle: QMovieH; p1: Integer); cdecl;
procedure QMovie_connectResize(handle: QMovieH; receiver: QObjectH; member: PAnsiChar); cdecl;
procedure QMovie_disconnectResize(handle: QMovieH; receiver: QObjectH; member: PAnsiChar); cdecl;
procedure QMovie_connectUpdate(handle: QMovieH; receiver: QObjectH; member: PAnsiChar); cdecl;
procedure QMovie_disconnectUpdate(handle: QMovieH; receiver: QObjectH; member: PAnsiChar); cdecl;
procedure QMovie_connectStatus(handle: QMovieH; receiver: QObjectH; member: PAnsiChar); cdecl;
procedure QMovie_disconnectStatus(handle: QMovieH; receiver: QObjectH; member: PAnsiChar); cdecl;
function QPaintDevice_devType(handle: QPaintDeviceH): Integer; cdecl;
function QPaintDevice_isExtDev(handle: QPaintDeviceH): Boolean; cdecl;
function QPaintDevice_paintingActive(handle: QPaintDeviceH): Boolean; cdecl;
{$IFDEF MSWINDOWS}
function QPaintDevice_handle(handle: QPaintDeviceH): HDC; overload; cdecl;
{$ENDIF}
{$IFDEF LINUX}
function QPaintDevice_handle(handle: QPaintDeviceH): HANDLE; overload; cdecl;
{$ENDIF}
{$IFDEF LINUX}
function QPaintDevice_x11Display(handle: QPaintDeviceH): PDisplay; cdecl;
{$ENDIF}
{$IFDEF LINUX}
function QPaintDevice_x11Screen(handle: QPaintDeviceH): Integer; cdecl;
{$ENDIF}
{$IFDEF LINUX}
function QPaintDevice_x11Depth(handle: QPaintDeviceH): Integer; cdecl;
{$ENDIF}
{$IFDEF LINUX}
function QPaintDevice_x11Cells(handle: QPaintDeviceH): Integer; cdecl;
{$ENDIF}
{$IFDEF LINUX}
function QPaintDevice_x11Colormap(handle: QPaintDeviceH): HANDLE; cdecl;
{$ENDIF}
{$IFDEF LINUX}
function QPaintDevice_x11DefaultColormap(handle: QPaintDeviceH): Boolean; cdecl;
{$ENDIF}
{$IFDEF LINUX}
function QPaintDevice_x11Visual(handle: QPaintDeviceH): Pointer; cdecl;
{$ENDIF}
{$IFDEF LINUX}
function QPaintDevice_x11DefaultVisual(handle: QPaintDeviceH): Boolean; cdecl;
{$ENDIF}
{$IFDEF LINUX}
function QPaintDevice_x11AppDisplay(): PDisplay; cdecl;
{$ENDIF}
{$IFDEF LINUX}
function QPaintDevice_x11AppScreen(): Integer; cdecl;
{$ENDIF}
{$IFDEF LINUX}
function QPaintDevice_x11AppDepth(): Integer; cdecl;
{$ENDIF}
{$IFDEF LINUX}
function QPaintDevice_x11AppCells(): Integer; cdecl;
{$ENDIF}
{$IFDEF LINUX}
function QPaintDevice_x11AppDpiX(): Integer; cdecl;
{$ENDIF}
{$IFDEF LINUX}
function QPaintDevice_x11AppDpiY(): Integer; cdecl;
{$ENDIF}
{$IFDEF LINUX}
function QPaintDevice_x11AppColormap(): HANDLE; cdecl;
{$ENDIF}
{$IFDEF LINUX}
function QPaintDevice_x11AppDefaultColormap(): Boolean; cdecl;
{$ENDIF}
{$IFDEF LINUX}
function QPaintDevice_x11AppVisual(): Pointer; cdecl;
{$ENDIF}
{$IFDEF LINUX}
function QPaintDevice_x11AppDefaultVisual(): Boolean; cdecl;
{$ENDIF}
{$IFDEF LINUX}
procedure QPaintDevice_x11SetAppDpiX(p1: Integer); cdecl;
{$ENDIF}
{$IFDEF LINUX}
procedure QPaintDevice_x11SetAppDpiY(p1: Integer); cdecl;
{$ENDIF}
function QColorGroup_create(): QColorGroupH; overload; cdecl;
procedure QColorGroup_destroy(handle: QColorGroupH); cdecl;
function QColorGroup_create(foreground: QColorH; button: QColorH; light: QColorH; dark: QColorH; mid: QColorH; text: QColorH; base: QColorH): QColorGroupH; overload; cdecl;
function QColorGroup_create(foreground: QBrushH; button: QBrushH; light: QBrushH; dark: QBrushH; mid: QBrushH; text: QBrushH; bright_text: QBrushH; base: QBrushH; background: QBrushH): QColorGroupH; overload; cdecl;
function QColorGroup_create(p1: QColorGroupH): QColorGroupH; overload; cdecl;
function QColorGroup_color(handle: QColorGroupH; p1: QColorGroupColorRole): QColorH; cdecl;
function QColorGroup_brush(handle: QColorGroupH; p1: QColorGroupColorRole): QBrushH; cdecl;
procedure QColorGroup_setColor(handle: QColorGroupH; p1: QColorGroupColorRole; p2: QColorH); cdecl;
procedure QColorGroup_setBrush(handle: QColorGroupH; p1: QColorGroupColorRole; p2: QBrushH); cdecl;
function QColorGroup_foreground(handle: QColorGroupH): QColorH; cdecl;
function QColorGroup_button(handle: QColorGroupH): QColorH; cdecl;
function QColorGroup_light(handle: QColorGroupH): QColorH; cdecl;
function QColorGroup_dark(handle: QColorGroupH): QColorH; cdecl;
function QColorGroup_mid(handle: QColorGroupH): QColorH; cdecl;
function QColorGroup_text(handle: QColorGroupH): QColorH; cdecl;
function QColorGroup_base(handle: QColorGroupH): QColorH; cdecl;
function QColorGroup_background(handle: QColorGroupH): QColorH; cdecl;
function QColorGroup_midlight(handle: QColorGroupH): QColorH; cdecl;
function QColorGroup_brightText(handle: QColorGroupH): QColorH; cdecl;
function QColorGroup_buttonText(handle: QColorGroupH): QColorH; cdecl;
function QColorGroup_shadow(handle: QColorGroupH): QColorH; cdecl;
function QColorGroup_highlight(handle: QColorGroupH): QColorH; cdecl;
function QColorGroup_highlightedText(handle: QColorGroupH): QColorH; cdecl;
function QPalette_create(): QPaletteH; overload; cdecl;
procedure QPalette_destroy(handle: QPaletteH); cdecl;
function QPalette_create(button: QColorH): QPaletteH; overload; cdecl;
function QPalette_create(button: QColorH; background: QColorH): QPaletteH; overload; cdecl;
function QPalette_create(active: QColorGroupH; disabled: QColorGroupH; inactive: QColorGroupH): QPaletteH; overload; cdecl;
function QPalette_create(p1: QPaletteH): QPaletteH; overload; cdecl;
function QPalette_color(handle: QPaletteH; p1: QPaletteColorGroup; p2: QColorGroupColorRole): QColorH; cdecl;
function QPalette_brush(handle: QPaletteH; p1: QPaletteColorGroup; p2: QColorGroupColorRole): QBrushH; cdecl;
procedure QPalette_setColor(handle: QPaletteH; p1: QPaletteColorGroup; p2: QColorGroupColorRole; p3: QColorH); overload; cdecl;
procedure QPalette_setBrush(handle: QPaletteH; p1: QPaletteColorGroup; p2: QColorGroupColorRole; p3: QBrushH); overload; cdecl;
procedure QPalette_setColor(handle: QPaletteH; p1: QColorGroupColorRole; p2: QColorH); overload; cdecl;
procedure QPalette_setBrush(handle: QPaletteH; p1: QColorGroupColorRole; p2: QBrushH); overload; cdecl;
procedure QPalette_copy(handle: QPaletteH; retval: QPaletteH); cdecl;
function QPalette_active(handle: QPaletteH): QColorGroupH; cdecl;
function QPalette_disabled(handle: QPaletteH): QColorGroupH; cdecl;
function QPalette_inactive(handle: QPaletteH): QColorGroupH; cdecl;
function QPalette_normal(handle: QPaletteH): QColorGroupH; cdecl;
procedure QPalette_setActive(handle: QPaletteH; p1: QColorGroupH); cdecl;
procedure QPalette_setDisabled(handle: QPaletteH; p1: QColorGroupH); cdecl;
procedure QPalette_setInactive(handle: QPaletteH; p1: QColorGroupH); cdecl;
procedure QPalette_setNormal(handle: QPaletteH; p1: QColorGroupH); cdecl;
function QPalette_isCopyOf(handle: QPaletteH; p1: QPaletteH): Boolean; cdecl;
function QPalette_serialNumber(handle: QPaletteH): Integer; cdecl;
function QPixmap_create(): QPixmapH; overload; cdecl;
procedure QPixmap_destroy(handle: QPixmapH); cdecl;
function QPixmap_create(w: Integer; h: Integer; depth: Integer; p4: QPixmapOptimization): QPixmapH; overload; cdecl;
function QPixmap_create(p1: PSize; depth: Integer; p3: QPixmapOptimization): QPixmapH; overload; cdecl;
function QPixmap_create(fileName: PWideString; format: PAnsiChar; mode: QPixmapColorMode): QPixmapH; overload; cdecl;
function QPixmap_create(fileName: PWideString; format: PAnsiChar; conversion_flags: Integer): QPixmapH; overload; cdecl;
function QPixmap_create(data: QByteArrayH): QPixmapH; overload; cdecl;
function QPixmap_create(p1: QPixmapH): QPixmapH; overload; cdecl;
function QPixmap_isNull(handle: QPixmapH): Boolean; cdecl;
function QPixmap_width(handle: QPixmapH): Integer; cdecl;
function QPixmap_height(handle: QPixmapH): Integer; cdecl;
procedure QPixmap_size(handle: QPixmapH; retval: PSize); cdecl;
procedure QPixmap_rect(handle: QPixmapH; retval: PRect); cdecl;
function QPixmap_depth(handle: QPixmapH): Integer; cdecl;
function QPixmap_defaultDepth(): Integer; cdecl;
procedure QPixmap_fill(handle: QPixmapH; fillColor: QColorH); overload; cdecl;
procedure QPixmap_fill(handle: QPixmapH; p1: QWidgetH; xofs: Integer; yofs: Integer); overload; cdecl;
procedure QPixmap_fill(handle: QPixmapH; p1: QWidgetH; ofs: PPoint); overload; cdecl;
procedure QPixmap_resize(handle: QPixmapH; width: Integer; height: Integer); overload; cdecl;
procedure QPixmap_resize(handle: QPixmapH; p1: PSize); overload; cdecl;
function QPixmap_mask(handle: QPixmapH): QBitmapH; cdecl;
procedure QPixmap_setMask(handle: QPixmapH; p1: QBitmapH); cdecl;
function QPixmap_selfMask(handle: QPixmapH): Boolean; cdecl;
procedure QPixmap_createHeuristicMask(handle: QPixmapH; retval: QBitmapH; clipTight: Boolean); cdecl;
procedure QPixmap_grabWindow(retval: QPixmapH; p1: Cardinal; x: Integer; y: Integer; w: Integer; h: Integer); cdecl;
procedure QPixmap_grabWidget(retval: QPixmapH; widget: QWidgetH; x: Integer; y: Integer; w: Integer; h: Integer); cdecl;
procedure QPixmap_xForm(handle: QPixmapH; retval: QPixmapH; p1: QWMatrixH); cdecl;
procedure QPixmap_trueMatrix(retval: QWMatrixH; p1: QWMatrixH; w: Integer; h: Integer); cdecl;
procedure QPixmap_convertToImage(handle: QPixmapH; retval: QImageH); cdecl;
function QPixmap_convertFromImage(handle: QPixmapH; p1: QImageH; mode: QPixmapColorMode): Boolean; overload; cdecl;
function QPixmap_convertFromImage(handle: QPixmapH; p1: QImageH; conversion_flags: Integer): Boolean; overload; cdecl;
function QPixmap_imageFormat(fileName: PWideString): PAnsiChar; cdecl;
function QPixmap_load(handle: QPixmapH; fileName: PWideString; format: PAnsiChar; mode: QPixmapColorMode): Boolean; overload; cdecl;
function QPixmap_load(handle: QPixmapH; fileName: PWideString; format: PAnsiChar; conversion_flags: Integer): Boolean; overload; cdecl;
function QPixmap_loadFromData(handle: QPixmapH; buf: PByte; len: Cardinal; format: PAnsiChar; mode: QPixmapColorMode): Boolean; overload; cdecl;
function QPixmap_loadFromData(handle: QPixmapH; buf: PByte; len: Cardinal; format: PAnsiChar; conversion_flags: Integer): Boolean; overload; cdecl;
function QPixmap_loadFromData(handle: QPixmapH; data: QByteArrayH; format: PAnsiChar; conversion_flags: Integer): Boolean; overload; cdecl;
function QPixmap_save(handle: QPixmapH; fileName: PWideString; format: PAnsiChar): Boolean; overload; cdecl;
function QPixmap_save(handle: QPixmapH; fileName: PWideString; format: PAnsiChar; quality: Integer): Boolean; overload; cdecl;
{$IFDEF MSWINDOWS}
function QPixmap_hbm(handle: QPixmapH): HBITMAP; cdecl;
{$ENDIF}
function QPixmap_serialNumber(handle: QPixmapH): Integer; cdecl;
function QPixmap_optimization(handle: QPixmapH): QPixmapOptimization; cdecl;
procedure QPixmap_setOptimization(handle: QPixmapH; p1: QPixmapOptimization); cdecl;
function QPixmap_defaultOptimization(): QPixmapOptimization; cdecl;
procedure QPixmap_setDefaultOptimization(p1: QPixmapOptimization); cdecl;
procedure QPixmap_detach(handle: QPixmapH); cdecl;
function QPixmap_isQBitmap(handle: QPixmapH): Boolean; cdecl;
{$IFDEF MSWINDOWS}
function QPixmap_isMultiCellPixmap(handle: QPixmapH): Boolean; cdecl;
{$ENDIF}
{$IFDEF MSWINDOWS}
function QPixmap_multiCellHandle(handle: QPixmapH): HDC; cdecl;
{$ENDIF}
{$IFDEF MSWINDOWS}
function QPixmap_multiCellBitmap(handle: QPixmapH): HBITMAP; cdecl;
{$ENDIF}
{$IFDEF MSWINDOWS}
function QPixmap_multiCellOffset(handle: QPixmapH): Integer; cdecl;
{$ENDIF}
{$IFDEF MSWINDOWS}
function QPixmap_allocCell(handle: QPixmapH): Integer; cdecl;
{$ENDIF}
{$IFDEF MSWINDOWS}
procedure QPixmap_freeCell(handle: QPixmapH; p1: Boolean); cdecl;
{$ENDIF}
function QPrinter_create(): QPrinterH; cdecl;
procedure QPrinter_destroy(handle: QPrinterH); cdecl;
procedure QPrinter_printerName(handle: QPrinterH; retval: PWideString); cdecl;
procedure QPrinter_setPrinterName(handle: QPrinterH; p1: PWideString); cdecl;
function QPrinter_outputToFile(handle: QPrinterH): Boolean; cdecl;
procedure QPrinter_setOutputToFile(handle: QPrinterH; p1: Boolean); cdecl;
procedure QPrinter_outputFileName(handle: QPrinterH; retval: PWideString); cdecl;
procedure QPrinter_setOutputFileName(handle: QPrinterH; p1: PWideString); cdecl;
procedure QPrinter_printProgram(handle: QPrinterH; retval: PWideString); cdecl;
procedure QPrinter_setPrintProgram(handle: QPrinterH; p1: PWideString); cdecl;
procedure QPrinter_printerSelectionOption(handle: QPrinterH; retval: PWideString); cdecl;
procedure QPrinter_setPrinterSelectionOption(handle: QPrinterH; p1: PWideString); cdecl;
procedure QPrinter_docName(handle: QPrinterH; retval: PWideString); cdecl;
procedure QPrinter_setDocName(handle: QPrinterH; p1: PWideString); cdecl;
procedure QPrinter_creator(handle: QPrinterH; retval: PWideString); cdecl;
procedure QPrinter_setCreator(handle: QPrinterH; p1: PWideString); cdecl;
function QPrinter_orientation(handle: QPrinterH): QPrinterOrientation; cdecl;
procedure QPrinter_setOrientation(handle: QPrinterH; p1: QPrinterOrientation); cdecl;
function QPrinter_pageSize(handle: QPrinterH): QPrinterPageSize; cdecl;
procedure QPrinter_setPageSize(handle: QPrinterH; p1: QPrinterPageSize); cdecl;
procedure QPrinter_setPageOrder(handle: QPrinterH; p1: QPrinterPageOrder); cdecl;
function QPrinter_pageOrder(handle: QPrinterH): QPrinterPageOrder; cdecl;
procedure QPrinter_setColorMode(handle: QPrinterH; p1: QPrinterColorMode); cdecl;
function QPrinter_colorMode(handle: QPrinterH): QPrinterColorMode; cdecl;
procedure QPrinter_setFullPage(handle: QPrinterH; p1: Boolean); cdecl;
function QPrinter_fullPage(handle: QPrinterH): Boolean; cdecl;
procedure QPrinter_margins(handle: QPrinterH; retval: PSize); cdecl;
function QPrinter_fromPage(handle: QPrinterH): Integer; cdecl;
function QPrinter_toPage(handle: QPrinterH): Integer; cdecl;
procedure QPrinter_setFromTo(handle: QPrinterH; fromPage: Integer; toPage: Integer); cdecl;
function QPrinter_minPage(handle: QPrinterH): Integer; cdecl;
function QPrinter_maxPage(handle: QPrinterH): Integer; cdecl;
procedure QPrinter_setMinMax(handle: QPrinterH; minPage: Integer; maxPage: Integer); cdecl;
function QPrinter_numCopies(handle: QPrinterH): Integer; cdecl;
procedure QPrinter_setNumCopies(handle: QPrinterH; p1: Integer); cdecl;
function QPrinter_newPage(handle: QPrinterH): Boolean; cdecl;
function QPrinter_abort(handle: QPrinterH): Boolean; cdecl;
function QPrinter_aborted(handle: QPrinterH): Boolean; cdecl;
function QPrinter_setup(handle: QPrinterH; parent: QWidgetH): Boolean; cdecl;
function QRegion_create(): QRegionH; overload; cdecl;
procedure QRegion_destroy(handle: QRegionH); cdecl;
function QRegion_create(x: Integer; y: Integer; w: Integer; h: Integer; p5: QRegionRegionType): QRegionH; overload; cdecl;
function QRegion_create(p1: PRect; p2: QRegionRegionType): QRegionH; overload; cdecl;
function QRegion_create(p1: PPointArray; winding: Boolean): QRegionH; overload; cdecl;
function QRegion_create(p1: QRegionH): QRegionH; overload; cdecl;
function QRegion_create(p1: QBitmapH): QRegionH; overload; cdecl;
function QRegion_isNull(handle: QRegionH): Boolean; cdecl;
function QRegion_isEmpty(handle: QRegionH): Boolean; cdecl;
function QRegion_contains(handle: QRegionH; p: PPoint): Boolean; overload; cdecl;
function QRegion_contains(handle: QRegionH; r: PRect): Boolean; overload; cdecl;
procedure QRegion_translate(handle: QRegionH; dx: Integer; dy: Integer); cdecl;
procedure QRegion_unite(handle: QRegionH; retval: QRegionH; p1: QRegionH); cdecl;
procedure QRegion_intersect(handle: QRegionH; retval: QRegionH; p1: QRegionH); cdecl;
procedure QRegion_subtract(handle: QRegionH; retval: QRegionH; p1: QRegionH); cdecl;
procedure QRegion_eor(handle: QRegionH; retval: QRegionH; p1: QRegionH); cdecl;
procedure QRegion_boundingRect(handle: QRegionH; retval: PRect); cdecl;
procedure QRegion_setRects(handle: QRegionH; p1: PRect; p2: Integer); cdecl;
{$IFDEF MSWINDOWS}
function QRegion_handle(handle: QRegionH): HRGN; overload; cdecl;
{$ENDIF}
{$IFDEF LINUX}
function QRegion_handle(handle: QRegionH): Region; overload; cdecl;
{$ENDIF}
function QObject_create(parent: QObjectH; name: PAnsiChar): QObjectH; cdecl;
procedure QObject_destroy(handle: QObjectH); cdecl;
procedure QObject_tr(retval: PWideString; p1: PAnsiChar); overload; cdecl;
procedure QObject_tr(retval: PWideString; p1: PAnsiChar; p2: PAnsiChar); overload; cdecl;
function QObject_event(handle: QObjectH; p1: QEventH): Boolean; cdecl;
function QObject_eventFilter(handle: QObjectH; p1: QObjectH; p2: QEventH): Boolean; cdecl;
function QObject_metaObject(handle: QObjectH): QMetaObjectH; cdecl;
function QObject_className(handle: QObjectH): PAnsiChar; cdecl;
function QObject_isA(handle: QObjectH; p1: PAnsiChar): Boolean; cdecl;
function QObject_inherits(handle: QObjectH; p1: PAnsiChar): Boolean; cdecl;
function QObject_name(handle: QObjectH): PAnsiChar; overload; cdecl;
function QObject_name(handle: QObjectH; defaultName: PAnsiChar): PAnsiChar; overload; cdecl;
procedure QObject_setName(handle: QObjectH; name: PAnsiChar); cdecl;
function QObject_isWidgetType(handle: QObjectH): Boolean; cdecl;
function QObject_highPriority(handle: QObjectH): Boolean; cdecl;
function QObject_signalsBlocked(handle: QObjectH): Boolean; cdecl;
procedure QObject_blockSignals(handle: QObjectH; b: Boolean); cdecl;
function QObject_startTimer(handle: QObjectH; interval: Integer): Integer; cdecl;
procedure QObject_killTimer(handle: QObjectH; id: Integer); cdecl;
procedure QObject_killTimers(handle: QObjectH); cdecl;
function QObject_child(handle: QObjectH; name: PAnsiChar; _type: PAnsiChar): QObjectH; cdecl;
function QObject_children(handle: QObjectH): QObjectListH; cdecl;
function QObject_objectTrees(): QObjectListH; cdecl;
function QObject_queryList(handle: QObjectH; inheritsClass: PAnsiChar; objName: PAnsiChar; regexpMatch: Boolean; recursiveSearch: Boolean): QObjectListH; cdecl;
procedure QObject_insertChild(handle: QObjectH; p1: QObjectH); cdecl;
procedure QObject_removeChild(handle: QObjectH; p1: QObjectH); cdecl;
procedure QObject_installEventFilter(handle: QObjectH; p1: QObjectH); cdecl;
procedure QObject_removeEventFilter(handle: QObjectH; p1: QObjectH); cdecl;
function QObject_connect(sender: QObjectH; signal: PAnsiChar; receiver: QObjectH; member: PAnsiChar): Boolean; overload; cdecl;
function QObject_connect(handle: QObjectH; sender: QObjectH; signal: PAnsiChar; member: PAnsiChar): Boolean; overload; cdecl;
function QObject_disconnect(sender: QObjectH; signal: PAnsiChar; receiver: QObjectH; member: PAnsiChar): Boolean; overload; cdecl;
function QObject_disconnect(handle: QObjectH; receiver: QObjectH; member: PAnsiChar): Boolean; overload; cdecl;
procedure QObject_dumpObjectTree(handle: QObjectH); cdecl;
procedure QObject_dumpObjectInfo(handle: QObjectH); cdecl;
function QObject_parent(handle: QObjectH): QObjectH; cdecl;
procedure QObject_superClasses(handle: QObjectH; retval: QStringListH; includeThis: Boolean); cdecl;
procedure QSenderObject_setSender(handle: QSenderObjectH; s: QObjectH); cdecl;
function QBrush_create(): QBrushH; overload; cdecl;
procedure QBrush_destroy(handle: QBrushH); cdecl;
function QBrush_create(p1: BrushStyle): QBrushH; overload; cdecl;
function QBrush_create(p1: QColorH; p2: BrushStyle): QBrushH; overload; cdecl;
function QBrush_create(p1: QColorH; p2: QPixmapH): QBrushH; overload; cdecl;
function QBrush_create(p1: QBrushH): QBrushH; overload; cdecl;
function QBrush_style(handle: QBrushH): BrushStyle; cdecl;
procedure QBrush_setStyle(handle: QBrushH; p1: BrushStyle); cdecl;
function QBrush_color(handle: QBrushH): QColorH; cdecl;
procedure QBrush_setColor(handle: QBrushH; p1: QColorH); cdecl;
function QBrush_pixmap(handle: QBrushH): QPixmapH; cdecl;
procedure QBrush_setPixmap(handle: QBrushH; p1: QPixmapH); cdecl;
function QButtonGroup_create(parent: QWidgetH; name: PAnsiChar): QButtonGroupH; overload; cdecl;
procedure QButtonGroup_destroy(handle: QButtonGroupH); cdecl;
function QButtonGroup_create(title: PWideString; parent: QWidgetH; name: PAnsiChar): QButtonGroupH; overload; cdecl;
function QButtonGroup_create(columns: Integer; o: Orientation; parent: QWidgetH; name: PAnsiChar): QButtonGroupH; overload; cdecl;
function QButtonGroup_create(columns: Integer; o: Orientation; title: PWideString; parent: QWidgetH; name: PAnsiChar): QButtonGroupH; overload; cdecl;
function QButtonGroup_isExclusive(handle: QButtonGroupH): Boolean; cdecl;
function QButtonGroup_isRadioButtonExclusive(handle: QButtonGroupH): Boolean; cdecl;
procedure QButtonGroup_setExclusive(handle: QButtonGroupH; p1: Boolean); cdecl;
procedure QButtonGroup_setRadioButtonExclusive(handle: QButtonGroupH; p1: Boolean); cdecl;
function QButtonGroup_insert(handle: QButtonGroupH; p1: QButtonH; id: Integer): Integer; cdecl;
procedure QButtonGroup_remove(handle: QButtonGroupH; p1: QButtonH); cdecl;
function QButtonGroup_find(handle: QButtonGroupH; id: Integer): QButtonH; cdecl;
function QButtonGroup_id(handle: QButtonGroupH; p1: QButtonH): Integer; cdecl;
function QButtonGroup_count(handle: QButtonGroupH): Integer; cdecl;
procedure QButtonGroup_setButton(handle: QButtonGroupH; id: Integer); cdecl;
procedure QButtonGroup_moveFocus(handle: QButtonGroupH; p1: Integer); cdecl;
function QButtonGroup_selected(handle: QButtonGroupH): QButtonH; cdecl;
function QCheckBox_create(parent: QWidgetH; name: PAnsiChar): QCheckBoxH; overload; cdecl;
procedure QCheckBox_destroy(handle: QCheckBoxH); cdecl;
function QCheckBox_create(text: PWideString; parent: QWidgetH; name: PAnsiChar): QCheckBoxH; overload; cdecl;
function QCheckBox_isChecked(handle: QCheckBoxH): Boolean; cdecl;
procedure QCheckBox_setChecked(handle: QCheckBoxH; check: Boolean); cdecl;
procedure QCheckBox_setNoChange(handle: QCheckBoxH); cdecl;
procedure QCheckBox_setTristate(handle: QCheckBoxH; y: Boolean); cdecl;
function QCheckBox_isTristate(handle: QCheckBoxH): Boolean; cdecl;
procedure QCheckBox_sizeHint(handle: QCheckBoxH; retval: PSize); cdecl;
procedure QCheckBox_sizePolicy(handle: QCheckBoxH; retval: PSizePolicy); cdecl;
procedure QClipboard_clear(handle: QClipboardH); cdecl;
function QClipboard_ownsSelection(handle: QClipboardH): Boolean; cdecl;
function QClipboard_data(handle: QClipboardH): QMimeSourceH; cdecl;
procedure QClipboard_setData(handle: QClipboardH; p1: QMimeSourceH); cdecl;
procedure QClipboard_text(handle: QClipboardH; retval: PWideString); overload; cdecl;
procedure QClipboard_text(handle: QClipboardH; retval: PWideString; subtype: PAnsiString); overload; cdecl;
procedure QClipboard_setText(handle: QClipboardH; p1: PWideString); cdecl;
procedure QClipboard_image(handle: QClipboardH; retval: QImageH); cdecl;
procedure QClipboard_pixmap(handle: QClipboardH; retval: QPixmapH); cdecl;
procedure QClipboard_setImage(handle: QClipboardH; p1: QImageH); cdecl;
procedure QClipboard_setPixmap(handle: QClipboardH; p1: QPixmapH); cdecl;
procedure QColorDialog_getColor(retval: QColorH; p1: QColorH; parent: QWidgetH; name: PAnsiChar); cdecl;
procedure QColorDialog_getRgba(retval: QRgbH; p1: QRgbH; ok: PBoolean; parent: QWidgetH; name: PAnsiChar); cdecl;
function QColorDialog_customCount(): Integer; cdecl;
procedure QColorDialog_customColor(retval: QRgbH; p1: Integer); cdecl;
procedure QColorDialog_setCustomColor(p1: Integer; p2: QRgbH); cdecl;
procedure QCommonStyle_drawComboButton(handle: QCommonStyleH; p: QPainterH; x: Integer; y: Integer; w: Integer; h: Integer; g: QColorGroupH; sunken: Boolean; editable: Boolean; enabled: Boolean; fill: QBrushH); cdecl;
procedure QCommonStyle_comboButtonRect(handle: QCommonStyleH; retval: PRect; x: Integer; y: Integer; w: Integer; h: Integer); cdecl;
procedure QCommonStyle_comboButtonFocusRect(handle: QCommonStyleH; retval: PRect; x: Integer; y: Integer; w: Integer; h: Integer); cdecl;
procedure QCommonStyle_drawComboButtonMask(handle: QCommonStyleH; p: QPainterH; x: Integer; y: Integer; w: Integer; h: Integer); cdecl;
procedure QCommonStyle_drawPushButtonLabel(handle: QCommonStyleH; btn: QPushButtonH; p: QPainterH); cdecl;
procedure QCommonStyle_getButtonShift(handle: QCommonStyleH; x: PInteger; y: PInteger); cdecl;
function QCommonStyle_defaultFrameWidth(handle: QCommonStyleH): Integer; cdecl;
procedure QCommonStyle_tabbarMetrics(handle: QCommonStyleH; p1: QTabBarH; p2: PInteger; p3: PInteger; p4: PInteger); cdecl;
procedure QCommonStyle_drawTab(handle: QCommonStyleH; p1: QPainterH; p2: QTabBarH; p3: QTabH; selected: Boolean); cdecl;
procedure QCommonStyle_drawTabMask(handle: QCommonStyleH; p1: QPainterH; p2: QTabBarH; p3: QTabH; selected: Boolean); cdecl;
function QCommonStyle_scrollBarPointOver(handle: QCommonStyleH; sb: QScrollBarH; sliderStart: Integer; p: PPoint): QStyleScrollControl; cdecl;
procedure QCommonStyle_drawSliderMask(handle: QCommonStyleH; p: QPainterH; x: Integer; y: Integer; w: Integer; h: Integer; p6: Orientation; tickAbove: Boolean; tickBelow: Boolean); cdecl;
procedure QCommonStyle_drawSliderGrooveMask(handle: QCommonStyleH; p: QPainterH; x: Integer; y: Integer; w: Integer; h: Integer; c: QCOORD; p7: Orientation); cdecl;
function QCommonStyle_maximumSliderDragDistance(handle: QCommonStyleH): Integer; cdecl;
function QCommonStyle_popupSubmenuIndicatorWidth(handle: QCommonStyleH; fm: QFontMetricsH): Integer; cdecl;
procedure QCommonStyle_drawMenuBarItem(handle: QCommonStyleH; p: QPainterH; x: Integer; y: Integer; w: Integer; h: Integer; mi: QMenuItemH; g: QColorGroupH; enabled: Boolean; active: Boolean); cdecl;
procedure QFontDialog_getFont(retval: QFontH; ok: PBoolean; def: QFontH; parent: QWidgetH; name: PAnsiChar); overload; cdecl;
procedure QFontDialog_getFont(retval: QFontH; ok: PBoolean; parent: QWidgetH; name: PAnsiChar); overload; cdecl;
function QGroupBox_create(parent: QWidgetH; name: PAnsiChar): QGroupBoxH; overload; cdecl;
procedure QGroupBox_destroy(handle: QGroupBoxH); cdecl;
function QGroupBox_create(title: PWideString; parent: QWidgetH; name: PAnsiChar): QGroupBoxH; overload; cdecl;
function QGroupBox_create(columns: Integer; o: Orientation; parent: QWidgetH; name: PAnsiChar): QGroupBoxH; overload; cdecl;
function QGroupBox_create(columns: Integer; o: Orientation; title: PWideString; parent: QWidgetH; name: PAnsiChar): QGroupBoxH; overload; cdecl;
procedure QGroupBox_setColumnLayout(handle: QGroupBoxH; columns: Integer; o: Orientation); cdecl;
procedure QGroupBox_title(handle: QGroupBoxH; retval: PWideString); cdecl;
procedure QGroupBox_setTitle(handle: QGroupBoxH; p1: PWideString); cdecl;
function QGroupBox_alignment(handle: QGroupBoxH): Integer; cdecl;
procedure QGroupBox_setAlignment(handle: QGroupBoxH; p1: Integer); cdecl;
function QGroupBox_columns(handle: QGroupBoxH): Integer; cdecl;
procedure QGroupBox_setColumns(handle: QGroupBoxH; p1: Integer); cdecl;
function QGroupBox_orientation(handle: QGroupBoxH): Orientation; cdecl;
procedure QGroupBox_setOrientation(handle: QGroupBoxH; p1: Orientation); cdecl;
procedure QGroupBox_addSpace(handle: QGroupBoxH; p1: Integer); cdecl;
procedure QGroupBox_sizeHint(handle: QGroupBoxH; retval: PSize); cdecl;
function QHeader_create(parent: QWidgetH; name: PAnsiChar): QHeaderH; overload; cdecl;
procedure QHeader_destroy(handle: QHeaderH); cdecl;
function QHeader_create(p1: Integer; parent: QWidgetH; name: PAnsiChar): QHeaderH; overload; cdecl;
function QHeader_addLabel(handle: QHeaderH; p1: PWideString; size: Integer): Integer; overload; cdecl;
function QHeader_addLabel(handle: QHeaderH; p1: QIconSetH; p2: PWideString; size: Integer): Integer; overload; cdecl;
procedure QHeader_removeLabel(handle: QHeaderH; section: Integer); cdecl;
procedure QHeader_setLabel(handle: QHeaderH; p1: Integer; p2: PWideString; size: Integer); overload; cdecl;
procedure QHeader_setLabel(handle: QHeaderH; p1: Integer; p2: QIconSetH; p3: PWideString; size: Integer); overload; cdecl;
procedure QHeader_label(handle: QHeaderH; retval: PWideString; section: Integer); cdecl;
function QHeader_iconSet(handle: QHeaderH; section: Integer): QIconSetH; cdecl;
procedure QHeader_setOrientation(handle: QHeaderH; p1: Orientation); cdecl;
function QHeader_orientation(handle: QHeaderH): Orientation; cdecl;
procedure QHeader_setTracking(handle: QHeaderH; enable: Boolean); cdecl;
function QHeader_tracking(handle: QHeaderH): Boolean; cdecl;
procedure QHeader_setClickEnabled(handle: QHeaderH; p1: Boolean; section: Integer); cdecl;
procedure QHeader_setResizeEnabled(handle: QHeaderH; p1: Boolean; section: Integer); cdecl;
procedure QHeader_setMovingEnabled(handle: QHeaderH; p1: Boolean); cdecl;
function QHeader_isClickEnabled(handle: QHeaderH; section: Integer): Boolean; cdecl;
function QHeader_isResizeEnabled(handle: QHeaderH; section: Integer): Boolean; cdecl;
function QHeader_isMovingEnabled(handle: QHeaderH): Boolean; cdecl;
procedure QHeader_resizeSection(handle: QHeaderH; section: Integer; s: Integer); cdecl;
function QHeader_sectionSize(handle: QHeaderH; section: Integer): Integer; cdecl;
function QHeader_sectionPos(handle: QHeaderH; section: Integer): Integer; cdecl;
function QHeader_sectionAt(handle: QHeaderH; pos: Integer): Integer; cdecl;
function QHeader_count(handle: QHeaderH): Integer; cdecl;
procedure QHeader_setCellSize(handle: QHeaderH; p1: Integer; p2: Integer); cdecl;
function QHeader_cellSize(handle: QHeaderH; p1: Integer): Integer; cdecl;
function QHeader_cellPos(handle: QHeaderH; p1: Integer): Integer; cdecl;
function QHeader_cellAt(handle: QHeaderH; p1: Integer): Integer; cdecl;
function QHeader_offset(handle: QHeaderH): Integer; cdecl;
procedure QHeader_sizeHint(handle: QHeaderH; retval: PSize); cdecl;
procedure QHeader_sizePolicy(handle: QHeaderH; retval: PSizePolicy); cdecl;
function QHeader_mapToSection(handle: QHeaderH; index: Integer): Integer; cdecl;
function QHeader_mapToIndex(handle: QHeaderH; section: Integer): Integer; cdecl;
function QHeader_mapToLogical(handle: QHeaderH; p1: Integer): Integer; cdecl;
function QHeader_mapToActual(handle: QHeaderH; p1: Integer): Integer; cdecl;
procedure QHeader_moveSection(handle: QHeaderH; section: Integer; toIndex: Integer); cdecl;
procedure QHeader_moveCell(handle: QHeaderH; p1: Integer; p2: Integer); cdecl;
procedure QHeader_setSortIndicator(handle: QHeaderH; section: Integer; increasing: Boolean); cdecl;
procedure QHeader_setUpdatesEnabled(handle: QHeaderH; enable: Boolean); cdecl;
procedure QHeader_setOffset(handle: QHeaderH; pos: Integer); cdecl;
function QLabel_create(parent: QWidgetH; name: PAnsiChar; f: WFlags): QLabelH; overload; cdecl;
procedure QLabel_destroy(handle: QLabelH); cdecl;
function QLabel_create(text: PWideString; parent: QWidgetH; name: PAnsiChar; f: WFlags): QLabelH; overload; cdecl;
function QLabel_create(buddy: QWidgetH; p2: PWideString; parent: QWidgetH; name: PAnsiChar; f: WFlags): QLabelH; overload; cdecl;
procedure QLabel_text(handle: QLabelH; retval: PWideString); cdecl;
function QLabel_pixmap(handle: QLabelH): QPixmapH; cdecl;
function QLabel_movie(handle: QLabelH): QMovieH; cdecl;
function QLabel_textFormat(handle: QLabelH): TextFormat; cdecl;
procedure QLabel_setTextFormat(handle: QLabelH; p1: TextFormat); cdecl;
function QLabel_alignment(handle: QLabelH): Integer; cdecl;
procedure QLabel_setAlignment(handle: QLabelH; p1: Integer); cdecl;
function QLabel_indent(handle: QLabelH): Integer; cdecl;
procedure QLabel_setIndent(handle: QLabelH; p1: Integer); cdecl;
function QLabel_autoResize(handle: QLabelH): Boolean; cdecl;
procedure QLabel_setAutoResize(handle: QLabelH; p1: Boolean); cdecl;
function QLabel_hasScaledContents(handle: QLabelH): Boolean; cdecl;
procedure QLabel_setScaledContents(handle: QLabelH; p1: Boolean); cdecl;
procedure QLabel_sizeHint(handle: QLabelH; retval: PSize); cdecl;
procedure QLabel_minimumSizeHint(handle: QLabelH; retval: PSize); cdecl;
procedure QLabel_sizePolicy(handle: QLabelH; retval: PSizePolicy); cdecl;
procedure QLabel_setBuddy(handle: QLabelH; p1: QWidgetH); cdecl;
function QLabel_buddy(handle: QLabelH): QWidgetH; cdecl;
procedure QLabel_setAutoMask(handle: QLabelH; p1: Boolean); cdecl;
function QLabel_heightForWidth(handle: QLabelH; p1: Integer): Integer; cdecl;
procedure QLabel_setText(handle: QLabelH; p1: PWideString); cdecl;
procedure QLabel_setPixmap(handle: QLabelH; p1: QPixmapH); cdecl;
procedure QLabel_setMovie(handle: QLabelH; p1: QMovieH); cdecl;
procedure QLabel_setNum(handle: QLabelH; p1: Integer); overload; cdecl;
procedure QLabel_setNum(handle: QLabelH; p1: Double); overload; cdecl;
procedure QLabel_clear(handle: QLabelH); cdecl;
function QPainter_create(): QPainterH; overload; cdecl;
procedure QPainter_destroy(handle: QPainterH); cdecl;
function QPainter_create(p1: QPaintDeviceH): QPainterH; overload; cdecl;
function QPainter_create(p1: QPaintDeviceH; p2: QWidgetH): QPainterH; overload; cdecl;
function QPainter_begin(handle: QPainterH; p1: QPaintDeviceH): Boolean; overload; cdecl;
function QPainter_begin(handle: QPainterH; p1: QPaintDeviceH; p2: QWidgetH): Boolean; overload; cdecl;
function QPainter_end(handle: QPainterH): Boolean; cdecl;
function QPainter_device(handle: QPainterH): QPaintDeviceH; cdecl;
procedure QPainter_redirect(pdev: QPaintDeviceH; replacement: QPaintDeviceH); cdecl;
function QPainter_isActive(handle: QPainterH): Boolean; cdecl;
procedure QPainter_flush(handle: QPainterH); cdecl;
procedure QPainter_save(handle: QPainterH); cdecl;
procedure QPainter_restore(handle: QPainterH); cdecl;
procedure QPainter_fontMetrics(handle: QPainterH; retval: QFontMetricsH); cdecl;
procedure QPainter_fontInfo(handle: QPainterH; retval: QFontInfoH); cdecl;
function QPainter_font(handle: QPainterH): QFontH; cdecl;
procedure QPainter_setFont(handle: QPainterH; p1: QFontH); cdecl;
function QPainter_pen(handle: QPainterH): QPenH; cdecl;
procedure QPainter_setPen(handle: QPainterH; p1: QPenH); overload; cdecl;
procedure QPainter_setPen(handle: QPainterH; p1: PenStyle); overload; cdecl;
procedure QPainter_setPen(handle: QPainterH; p1: QColorH); overload; cdecl;
function QPainter_brush(handle: QPainterH): QBrushH; cdecl;
procedure QPainter_setBrush(handle: QPainterH; p1: QBrushH); overload; cdecl;
procedure QPainter_setBrush(handle: QPainterH; p1: BrushStyle); overload; cdecl;
procedure QPainter_setBrush(handle: QPainterH; p1: QColorH); overload; cdecl;
procedure QPainter_pos(handle: QPainterH; retval: PPoint); cdecl;
function QPainter_backgroundColor(handle: QPainterH): QColorH; cdecl;
procedure QPainter_setBackgroundColor(handle: QPainterH; p1: QColorH); cdecl;
function QPainter_backgroundMode(handle: QPainterH): BGMode; cdecl;
procedure QPainter_setBackgroundMode(handle: QPainterH; p1: BGMode); cdecl;
function QPainter_rasterOp(handle: QPainterH): RasterOp; cdecl;
procedure QPainter_setRasterOp(handle: QPainterH; p1: RasterOp); cdecl;
function QPainter_brushOrigin(handle: QPainterH): PPoint; cdecl;
procedure QPainter_setBrushOrigin(handle: QPainterH; x: Integer; y: Integer); overload; cdecl;
procedure QPainter_setBrushOrigin(handle: QPainterH; p1: PPoint); overload; cdecl;
function QPainter_hasViewXForm(handle: QPainterH): Boolean; cdecl;
function QPainter_hasWorldXForm(handle: QPainterH): Boolean; cdecl;
procedure QPainter_setViewXForm(handle: QPainterH; p1: Boolean); cdecl;
procedure QPainter_window(handle: QPainterH; retval: PRect); cdecl;
procedure QPainter_setWindow(handle: QPainterH; p1: PRect); overload; cdecl;
procedure QPainter_setWindow(handle: QPainterH; x: Integer; y: Integer; w: Integer; h: Integer); overload; cdecl;
procedure QPainter_viewport(handle: QPainterH; retval: PRect); cdecl;
procedure QPainter_setViewport(handle: QPainterH; p1: PRect); overload; cdecl;
procedure QPainter_setViewport(handle: QPainterH; x: Integer; y: Integer; w: Integer; h: Integer); overload; cdecl;
procedure QPainter_setWorldXForm(handle: QPainterH; p1: Boolean); cdecl;
function QPainter_worldMatrix(handle: QPainterH): QWMatrixH; cdecl;
procedure QPainter_setWorldMatrix(handle: QPainterH; p1: QWMatrixH; combine: Boolean); cdecl;
procedure QPainter_saveWorldMatrix(handle: QPainterH); cdecl;
procedure QPainter_restoreWorldMatrix(handle: QPainterH); cdecl;
procedure QPainter_scale(handle: QPainterH; sx: Double; sy: Double); cdecl;
procedure QPainter_shear(handle: QPainterH; sh: Double; sv: Double); cdecl;
procedure QPainter_rotate(handle: QPainterH; a: Double); cdecl;
procedure QPainter_translate(handle: QPainterH; dx: Double; dy: Double); cdecl;
procedure QPainter_resetXForm(handle: QPainterH); cdecl;
procedure QPainter_xForm(handle: QPainterH; retval: PPoint; p1: PPoint); overload; cdecl;
procedure QPainter_xForm(handle: QPainterH; retval: PRect; p1: PRect); overload; cdecl;
procedure QPainter_xForm(handle: QPainterH; retval: PPointArray; p1: PPointArray); overload; cdecl;
procedure QPainter_xForm(handle: QPainterH; retval: PPointArray; p1: PPointArray; index: Integer; npoints: Integer); overload; cdecl;
procedure QPainter_xFormDev(handle: QPainterH; retval: PPoint; p1: PPoint); overload; cdecl;
procedure QPainter_xFormDev(handle: QPainterH; retval: PRect; p1: PRect); overload; cdecl;
procedure QPainter_xFormDev(handle: QPainterH; retval: PPointArray; p1: PPointArray); overload; cdecl;
procedure QPainter_xFormDev(handle: QPainterH; retval: PPointArray; p1: PPointArray; index: Integer; npoints: Integer); overload; cdecl;
procedure QPainter_setClipping(handle: QPainterH; p1: Boolean); cdecl;
function QPainter_hasClipping(handle: QPainterH): Boolean; cdecl;
function QPainter_clipRegion(handle: QPainterH): QRegionH; cdecl;
procedure QPainter_setClipRect(handle: QPainterH; p1: PRect); overload; cdecl;
procedure QPainter_setClipRect(handle: QPainterH; x: Integer; y: Integer; w: Integer; h: Integer); overload; cdecl;
procedure QPainter_setClipRegion(handle: QPainterH; p1: QRegionH); cdecl;
procedure QPainter_drawPoint(handle: QPainterH; x: Integer; y: Integer); overload; cdecl;
procedure QPainter_drawPoint(handle: QPainterH; p1: PPoint); overload; cdecl;
procedure QPainter_drawPoints(handle: QPainterH; a: PPointArray; index: Integer; npoints: Integer); cdecl;
procedure QPainter_moveTo(handle: QPainterH; x: Integer; y: Integer); overload; cdecl;
procedure QPainter_moveTo(handle: QPainterH; p1: PPoint); overload; cdecl;
procedure QPainter_lineTo(handle: QPainterH; x: Integer; y: Integer); overload; cdecl;
procedure QPainter_lineTo(handle: QPainterH; p1: PPoint); overload; cdecl;
procedure QPainter_drawLine(handle: QPainterH; x1: Integer; y1: Integer; x2: Integer; y2: Integer); overload; cdecl;
procedure QPainter_drawLine(handle: QPainterH; p1: PPoint; p2: PPoint); overload; cdecl;
procedure QPainter_drawRect(handle: QPainterH; x: Integer; y: Integer; w: Integer; h: Integer); overload; cdecl;
procedure QPainter_drawRect(handle: QPainterH; p1: PRect); overload; cdecl;
procedure QPainter_drawWinFocusRect(handle: QPainterH; x: Integer; y: Integer; w: Integer; h: Integer); overload; cdecl;
procedure QPainter_drawWinFocusRect(handle: QPainterH; x: Integer; y: Integer; w: Integer; h: Integer; bgColor: QColorH); overload; cdecl;
procedure QPainter_drawWinFocusRect(handle: QPainterH; p1: PRect); overload; cdecl;
procedure QPainter_drawWinFocusRect(handle: QPainterH; p1: PRect; bgColor: QColorH); overload; cdecl;
procedure QPainter_drawRoundRect(handle: QPainterH; x: Integer; y: Integer; w: Integer; h: Integer; p5: Integer; p6: Integer); overload; cdecl;
procedure QPainter_drawRoundRect(handle: QPainterH; p1: PRect; p2: Integer; p3: Integer); overload; cdecl;
procedure QPainter_drawRoundRect(handle: QPainterH; x: Integer; y: Integer; w: Integer; h: Integer); overload; cdecl;
procedure QPainter_drawRoundRect(handle: QPainterH; p1: PRect); overload; cdecl;
procedure QPainter_drawEllipse(handle: QPainterH; x: Integer; y: Integer; w: Integer; h: Integer); overload; cdecl;
procedure QPainter_drawEllipse(handle: QPainterH; p1: PRect); overload; cdecl;
procedure QPainter_drawArc(handle: QPainterH; x: Integer; y: Integer; w: Integer; h: Integer; a: Integer; alen: Integer); overload; cdecl;
procedure QPainter_drawArc(handle: QPainterH; p1: PRect; a: Integer; alen: Integer); overload; cdecl;
procedure QPainter_drawPie(handle: QPainterH; x: Integer; y: Integer; w: Integer; h: Integer; a: Integer; alen: Integer); overload; cdecl;
procedure QPainter_drawPie(handle: QPainterH; p1: PRect; a: Integer; alen: Integer); overload; cdecl;
procedure QPainter_drawChord(handle: QPainterH; x: Integer; y: Integer; w: Integer; h: Integer; a: Integer; alen: Integer); overload; cdecl;
procedure QPainter_drawChord(handle: QPainterH; p1: PRect; a: Integer; alen: Integer); overload; cdecl;
procedure QPainter_drawLineSegments(handle: QPainterH; p1: PPointArray; index: Integer; nlines: Integer); cdecl;
procedure QPainter_drawPolyline(handle: QPainterH; p1: PPointArray; index: Integer; npoints: Integer); cdecl;
procedure QPainter_drawPolygon(handle: QPainterH; p1: PPointArray; winding: Boolean; index: Integer; npoints: Integer); cdecl;
procedure QPainter_drawQuadBezier(handle: QPainterH; p1: PPointArray; index: Integer); cdecl;
procedure QPainter_drawPixmap(handle: QPainterH; x: Integer; y: Integer; p3: QPixmapH; sx: Integer; sy: Integer; sw: Integer; sh: Integer); overload; cdecl;
procedure QPainter_drawPixmap(handle: QPainterH; p1: PPoint; p2: QPixmapH; sr: PRect); overload; cdecl;
procedure QPainter_drawPixmap(handle: QPainterH; p1: PPoint; p2: QPixmapH); overload; cdecl;
procedure QPainter_drawImage(handle: QPainterH; x: Integer; y: Integer; p3: QImageH; sx: Integer; sy: Integer; sw: Integer; sh: Integer); overload; cdecl;
procedure QPainter_drawImage(handle: QPainterH; p1: PPoint; p2: QImageH; sr: PRect); overload; cdecl;
procedure QPainter_drawImage(handle: QPainterH; p1: PPoint; p2: QImageH); overload; cdecl;
procedure QPainter_drawImage(handle: QPainterH; x: Integer; y: Integer; p3: QImageH; sx: Integer; sy: Integer; sw: Integer; sh: Integer; conversion_flags: Integer); overload; cdecl;
procedure QPainter_drawImage(handle: QPainterH; p1: PPoint; p2: QImageH; sr: PRect; conversion_flags: Integer); overload; cdecl;
procedure QPainter_drawImage(handle: QPainterH; p1: PPoint; p2: QImageH; conversion_flags: Integer); overload; cdecl;
procedure QPainter_drawTiledPixmap(handle: QPainterH; x: Integer; y: Integer; w: Integer; h: Integer; p5: QPixmapH; sx: Integer; sy: Integer); overload; cdecl;
procedure QPainter_drawTiledPixmap(handle: QPainterH; p1: PRect; p2: QPixmapH; p3: PPoint); overload; cdecl;
procedure QPainter_drawTiledPixmap(handle: QPainterH; p1: PRect; p2: QPixmapH); overload; cdecl;
procedure QPainter_drawPicture(handle: QPainterH; p1: QPictureH); cdecl;
procedure QPainter_fillRect(handle: QPainterH; x: Integer; y: Integer; w: Integer; h: Integer; p5: QBrushH); overload; cdecl;
procedure QPainter_fillRect(handle: QPainterH; p1: PRect; p2: QBrushH); overload; cdecl;
procedure QPainter_eraseRect(handle: QPainterH; x: Integer; y: Integer; w: Integer; h: Integer); overload; cdecl;
procedure QPainter_eraseRect(handle: QPainterH; p1: PRect); overload; cdecl;
procedure QPainter_drawText(handle: QPainterH; x: Integer; y: Integer; p3: PWideString; len: Integer); overload; cdecl;
procedure QPainter_drawText(handle: QPainterH; p1: PPoint; p2: PWideString; len: Integer); overload; cdecl;
procedure QPainter_drawText(handle: QPainterH; x: Integer; y: Integer; w: Integer; h: Integer; flags: Integer; p6: PWideString; len: Integer; br: PRect; internal: PPAnsiChar); overload; cdecl;
procedure QPainter_drawText(handle: QPainterH; p1: PRect; flags: Integer; p3: PWideString; len: Integer; br: PRect; internal: PPAnsiChar); overload; cdecl;
procedure QPainter_boundingRect(handle: QPainterH; retval: PRect; x: Integer; y: Integer; w: Integer; h: Integer; flags: Integer; p6: PWideString; len: Integer; intern: PPAnsiChar); overload; cdecl;
procedure QPainter_boundingRect(handle: QPainterH; retval: PRect; p1: PRect; flags: Integer; p3: PWideString; len: Integer; intern: PPAnsiChar); overload; cdecl;
function QPainter_tabStops(handle: QPainterH): Integer; cdecl;
procedure QPainter_setTabStops(handle: QPainterH; p1: Integer); cdecl;
function QPainter_tabArray(handle: QPainterH): PInteger; cdecl;
procedure QPainter_setTabArray(handle: QPainterH; p1: PInteger); cdecl;
{$IFDEF MSWINDOWS}
function QPainter_handle(handle: QPainterH): HDC; overload; cdecl;
{$ENDIF}
{$IFDEF LINUX}
function QPainter_handle(handle: QPainterH): HANDLE; overload; cdecl;
{$ENDIF}
procedure QPainter_initialize(); cdecl;
procedure QPainter_cleanup(); cdecl;
function QPen_create(): QPenH; overload; cdecl;
procedure QPen_destroy(handle: QPenH); cdecl;
function QPen_create(p1: PenStyle): QPenH; overload; cdecl;
function QPen_create(color: QColorH; width: Cardinal; style: PenStyle): QPenH; overload; cdecl;
function QPen_create(cl: QColorH; w: Cardinal; s: PenStyle; c: PenCapStyle; j: PenJoinStyle): QPenH; overload; cdecl;
function QPen_create(p1: QPenH): QPenH; overload; cdecl;
function QPen_style(handle: QPenH): PenStyle; cdecl;
procedure QPen_setStyle(handle: QPenH; p1: PenStyle); cdecl;
function QPen_width(handle: QPenH): Cardinal; cdecl;
procedure QPen_setWidth(handle: QPenH; p1: Cardinal); cdecl;
function QPen_color(handle: QPenH): QColorH; cdecl;
procedure QPen_setColor(handle: QPenH; p1: QColorH); cdecl;
function QPen_capStyle(handle: QPenH): PenCapStyle; cdecl;
procedure QPen_setCapStyle(handle: QPenH; p1: PenCapStyle); cdecl;
function QPen_joinStyle(handle: QPenH): PenJoinStyle; cdecl;
procedure QPen_setJoinStyle(handle: QPenH; p1: PenJoinStyle); cdecl;
function QPopupMenu_create(parent: QWidgetH; name: PAnsiChar): QPopupMenuH; cdecl;
procedure QPopupMenu_destroy(handle: QPopupMenuH); cdecl;
procedure QPopupMenu_popup(handle: QPopupMenuH; pos: PPoint; indexAtPoint: Integer); cdecl;
procedure QPopupMenu_updateItem(handle: QPopupMenuH; id: Integer); cdecl;
procedure QPopupMenu_setCheckable(handle: QPopupMenuH; p1: Boolean); cdecl;
function QPopupMenu_isCheckable(handle: QPopupMenuH): Boolean; cdecl;
procedure QPopupMenu_setFont(handle: QPopupMenuH; p1: QFontH); cdecl;
procedure QPopupMenu_show(handle: QPopupMenuH); cdecl;
procedure QPopupMenu_hide(handle: QPopupMenuH); cdecl;
function QPopupMenu_exec(handle: QPopupMenuH): Integer; overload; cdecl;
function QPopupMenu_exec(handle: QPopupMenuH; pos: PPoint; indexAtPoint: Integer): Integer; overload; cdecl;
procedure QPopupMenu_setActiveItem(handle: QPopupMenuH; p1: Integer); cdecl;
procedure QPopupMenu_sizeHint(handle: QPopupMenuH; retval: PSize); cdecl;
function QPopupMenu_idAt(handle: QPopupMenuH; index: Integer): Integer; overload; cdecl;
function QPopupMenu_idAt(handle: QPopupMenuH; pos: PPoint): Integer; overload; cdecl;
function QPopupMenu_customWhatsThis(handle: QPopupMenuH): Boolean; cdecl;
function QPopupMenu_insertTearOffHandle(handle: QPopupMenuH; id: Integer; index: Integer): Integer; cdecl;
procedure QPopupMenu_activateItemAt(handle: QPopupMenuH; index: Integer); cdecl;
function QPopupMenu_to_QMenuData(handle: QPopupMenuH): QMenuDataH; cdecl;
function QPushButton_create(parent: QWidgetH; name: PAnsiChar): QPushButtonH; overload; cdecl;
procedure QPushButton_destroy(handle: QPushButtonH); cdecl;
function QPushButton_create(text: PWideString; parent: QWidgetH; name: PAnsiChar): QPushButtonH; overload; cdecl;
function QPushButton_create(icon: QIconSetH; text: PWideString; parent: QWidgetH; name: PAnsiChar): QPushButtonH; overload; cdecl;
procedure QPushButton_sizeHint(handle: QPushButtonH; retval: PSize); cdecl;
procedure QPushButton_sizePolicy(handle: QPushButtonH; retval: PSizePolicy); cdecl;
procedure QPushButton_move(handle: QPushButtonH; x: Integer; y: Integer); overload; cdecl;
procedure QPushButton_move(handle: QPushButtonH; p: PPoint); overload; cdecl;
procedure QPushButton_resize(handle: QPushButtonH; w: Integer; h: Integer); overload; cdecl;
procedure QPushButton_resize(handle: QPushButtonH; p1: PSize); overload; cdecl;
procedure QPushButton_setGeometry(handle: QPushButtonH; x: Integer; y: Integer; w: Integer; h: Integer); overload; cdecl;
procedure QPushButton_setGeometry(handle: QPushButtonH; p1: PRect); overload; cdecl;
procedure QPushButton_setToggleButton(handle: QPushButtonH; p1: Boolean); cdecl;
function QPushButton_autoDefault(handle: QPushButtonH): Boolean; cdecl;
procedure QPushButton_setAutoDefault(handle: QPushButtonH; autoDef: Boolean); cdecl;
function QPushButton_isDefault(handle: QPushButtonH): Boolean; cdecl;
procedure QPushButton_setDefault(handle: QPushButtonH; def: Boolean); cdecl;
procedure QPushButton_setIsMenuButton(handle: QPushButtonH; p1: Boolean); cdecl;
function QPushButton_isMenuButton(handle: QPushButtonH): Boolean; cdecl;
procedure QPushButton_setPopup(handle: QPushButtonH; popup: QPopupMenuH); cdecl;
function QPushButton_popup(handle: QPushButtonH): QPopupMenuH; cdecl;
procedure QPushButton_setIconSet(handle: QPushButtonH; p1: QIconSetH); cdecl;
function QPushButton_iconSet(handle: QPushButtonH): QIconSetH; cdecl;
procedure QPushButton_setFlat(handle: QPushButtonH; p1: Boolean); cdecl;
function QPushButton_isFlat(handle: QPushButtonH): Boolean; cdecl;
procedure QPushButton_setOn(handle: QPushButtonH; p1: Boolean); cdecl;
procedure QPushButton_toggle(handle: QPushButtonH); cdecl;
function QRadioButton_create(parent: QWidgetH; name: PAnsiChar): QRadioButtonH; overload; cdecl;
procedure QRadioButton_destroy(handle: QRadioButtonH); cdecl;
function QRadioButton_create(text: PWideString; parent: QWidgetH; name: PAnsiChar): QRadioButtonH; overload; cdecl;
function QRadioButton_isChecked(handle: QRadioButtonH): Boolean; cdecl;
procedure QRadioButton_setChecked(handle: QRadioButtonH; check: Boolean); cdecl;
procedure QRadioButton_sizeHint(handle: QRadioButtonH; retval: PSize); cdecl;
procedure QRadioButton_sizePolicy(handle: QRadioButtonH; retval: PSizePolicy); cdecl;
function QScrollBar_create(parent: QWidgetH; name: PAnsiChar): QScrollBarH; overload; cdecl;
procedure QScrollBar_destroy(handle: QScrollBarH); cdecl;
function QScrollBar_create(p1: Orientation; parent: QWidgetH; name: PAnsiChar): QScrollBarH; overload; cdecl;
function QScrollBar_create(minValue: Integer; maxValue: Integer; LineStep: Integer; PageStep: Integer; value: Integer; p6: Orientation; parent: QWidgetH; name: PAnsiChar): QScrollBarH; overload; cdecl;
procedure QScrollBar_setOrientation(handle: QScrollBarH; p1: Orientation); cdecl;
function QScrollBar_orientation(handle: QScrollBarH): Orientation; cdecl;
procedure QScrollBar_setTracking(handle: QScrollBarH; enable: Boolean); cdecl;
function QScrollBar_tracking(handle: QScrollBarH): Boolean; cdecl;
function QScrollBar_draggingSlider(handle: QScrollBarH): Boolean; cdecl;
procedure QScrollBar_setPalette(handle: QScrollBarH; p1: QPaletteH); cdecl;
procedure QScrollBar_sizeHint(handle: QScrollBarH; retval: PSize); cdecl;
procedure QScrollBar_sizePolicy(handle: QScrollBarH; retval: PSizePolicy); cdecl;
function QScrollBar_minValue(handle: QScrollBarH): Integer; cdecl;
function QScrollBar_maxValue(handle: QScrollBarH): Integer; cdecl;
procedure QScrollBar_setMinValue(handle: QScrollBarH; p1: Integer); cdecl;
procedure QScrollBar_setMaxValue(handle: QScrollBarH; p1: Integer); cdecl;
function QScrollBar_lineStep(handle: QScrollBarH): Integer; cdecl;
function QScrollBar_pageStep(handle: QScrollBarH): Integer; cdecl;
procedure QScrollBar_setLineStep(handle: QScrollBarH; p1: Integer); cdecl;
procedure QScrollBar_setPageStep(handle: QScrollBarH; p1: Integer); cdecl;
function QScrollBar_value(handle: QScrollBarH): Integer; cdecl;
procedure QScrollBar_setValue(handle: QScrollBarH; p1: Integer); cdecl;
function QScrollBar_to_QRangeControl(handle: QScrollBarH): QRangeControlH; cdecl;
function QSizeGrip_create(parent: QWidgetH; name: PAnsiChar): QSizeGripH; cdecl;
procedure QSizeGrip_destroy(handle: QSizeGripH); cdecl;
procedure QSizeGrip_sizeHint(handle: QSizeGripH; retval: PSize); cdecl;
procedure QSizeGrip_sizePolicy(handle: QSizeGripH; retval: PSizePolicy); cdecl;
procedure QTableView_setBackgroundColor(handle: QTableViewH; p1: QColorH); cdecl;
procedure QTableView_setPalette(handle: QTableViewH; p1: QPaletteH); cdecl;
procedure QTableView_show(handle: QTableViewH); cdecl;
procedure QTableView_repaint(handle: QTableViewH; erase: Boolean); overload; cdecl;
procedure QTableView_repaint(handle: QTableViewH; x: Integer; y: Integer; w: Integer; h: Integer; erase: Boolean); overload; cdecl;
procedure QTableView_repaint(handle: QTableViewH; p1: PRect; erase: Boolean); overload; cdecl;
function QTextBrowser_create(parent: QWidgetH; name: PAnsiChar): QTextBrowserH; cdecl;
procedure QTextBrowser_destroy(handle: QTextBrowserH); cdecl;
procedure QTextBrowser_setSource(handle: QTextBrowserH; name: PWideString); cdecl;
procedure QTextBrowser_source(handle: QTextBrowserH; retval: PWideString); cdecl;
procedure QTextBrowser_setText(handle: QTextBrowserH; contents: PWideString; context: PWideString); cdecl;
procedure QTextBrowser_scrollToAnchor(handle: QTextBrowserH; name: PWideString); cdecl;
procedure QTextBrowser_backward(handle: QTextBrowserH); cdecl;
procedure QTextBrowser_forward(handle: QTextBrowserH); cdecl;
procedure QTextBrowser_home(handle: QTextBrowserH); cdecl;
function QTextView_create(parent: QWidgetH; name: PAnsiChar): QTextViewH; overload; cdecl;
procedure QTextView_destroy(handle: QTextViewH); cdecl;
function QTextView_create(text: PWideString; context: PWideString; parent: QWidgetH; name: PAnsiChar): QTextViewH; overload; cdecl;
procedure QTextView_setText(handle: QTextViewH; text: PWideString; context: PWideString); overload; cdecl;
procedure QTextView_setText(handle: QTextViewH; text: PWideString); overload; cdecl;
procedure QTextView_text(handle: QTextViewH; retval: PWideString); cdecl;
procedure QTextView_context(handle: QTextViewH; retval: PWideString); cdecl;
function QTextView_textFormat(handle: QTextViewH): TextFormat; cdecl;
procedure QTextView_setTextFormat(handle: QTextViewH; p1: TextFormat); cdecl;
function QTextView_styleSheet(handle: QTextViewH): QStyleSheetH; cdecl;
procedure QTextView_setStyleSheet(handle: QTextViewH; styleSheet: QStyleSheetH); cdecl;
procedure QTextView_setPaper(handle: QTextViewH; pap: QBrushH); cdecl;
function QTextView_paper(handle: QTextViewH): QBrushH; overload; cdecl;
procedure QTextView_setPaperColorGroup(handle: QTextViewH; colgrp: QColorGroupH); cdecl;
function QTextView_paperColorGroup(handle: QTextViewH): QColorGroupH; cdecl;
procedure QTextView_setLinkColor(handle: QTextViewH; p1: QColorH); cdecl;
function QTextView_linkColor(handle: QTextViewH): QColorH; cdecl;
procedure QTextView_setLinkUnderline(handle: QTextViewH; p1: Boolean); cdecl;
function QTextView_linkUnderline(handle: QTextViewH): Boolean; cdecl;
procedure QTextView_setMimeSourceFactory(handle: QTextViewH; factory: QMimeSourceFactoryH); cdecl;
function QTextView_mimeSourceFactory(handle: QTextViewH): QMimeSourceFactoryH; cdecl;
procedure QTextView_documentTitle(handle: QTextViewH; retval: PWideString); cdecl;
function QTextView_heightForWidth(handle: QTextViewH; w: Integer): Integer; cdecl;
procedure QTextView_append(handle: QTextViewH; text: PWideString); cdecl;
function QTextView_hasSelectedText(handle: QTextViewH): Boolean; cdecl;
procedure QTextView_selectedText(handle: QTextViewH; retval: PWideString); cdecl;
procedure QTextView_copy(handle: QTextViewH); cdecl;
procedure QTextView_selectAll(handle: QTextViewH); cdecl;
function QWhatsThis_create(p1: QWidgetH): QWhatsThisH; cdecl;
procedure QWhatsThis_destroy(handle: QWhatsThisH); cdecl;
procedure QWhatsThis_text(handle: QWhatsThisH; retval: PWideString; p1: PPoint); cdecl;
procedure QWhatsThis_add(p1: QWidgetH; p2: PWideString); cdecl;
procedure QWhatsThis_remove(p1: QWidgetH); cdecl;
procedure QWhatsThis_textFor(retval: PWideString; p1: QWidgetH; pos: PPoint); cdecl;
function QWhatsThis_whatsThisButton(parent: QWidgetH): QToolButtonH; cdecl;
procedure QWhatsThis_enterWhatsThisMode(); cdecl;
function QWhatsThis_inWhatsThisMode(): Boolean; cdecl;
procedure QWhatsThis_leaveWhatsThisMode(p1: PWideString; pos: PPoint); cdecl;
function QWindowsStyle_create(): QWindowsStyleH; cdecl;
procedure QWindowsStyle_destroy(handle: QWindowsStyleH); cdecl;
procedure QWindowsStyle_drawButton(handle: QWindowsStyleH; p: QPainterH; x: Integer; y: Integer; w: Integer; h: Integer; g: QColorGroupH; sunken: Boolean; fill: QBrushH); cdecl;
procedure QWindowsStyle_drawBevelButton(handle: QWindowsStyleH; p: QPainterH; x: Integer; y: Integer; w: Integer; h: Integer; g: QColorGroupH; sunken: Boolean; fill: QBrushH); cdecl;
procedure QWindowsStyle_drawFocusRect(handle: QWindowsStyleH; p1: QPainterH; p2: PRect; p3: QColorGroupH; p4: QColorH; p5: Boolean); cdecl;
procedure QWindowsStyle_drawPushButton(handle: QWindowsStyleH; btn: QPushButtonH; p: QPainterH); cdecl;
procedure QWindowsStyle_getButtonShift(handle: QWindowsStyleH; x: PInteger; y: PInteger); cdecl;
procedure QWindowsStyle_drawPanel(handle: QWindowsStyleH; p: QPainterH; x: Integer; y: Integer; w: Integer; h: Integer; p6: QColorGroupH; sunken: Boolean; lineWidth: Integer; fill: QBrushH); cdecl;
procedure QWindowsStyle_drawPopupPanel(handle: QWindowsStyleH; p: QPainterH; x: Integer; y: Integer; w: Integer; h: Integer; p6: QColorGroupH; lineWidth: Integer; fill: QBrushH); cdecl;
procedure QWindowsStyle_drawArrow(handle: QWindowsStyleH; p: QPainterH; _type: ArrowType; down: Boolean; x: Integer; y: Integer; w: Integer; h: Integer; g: QColorGroupH; enabled: Boolean; fill: QBrushH); cdecl;
procedure QWindowsStyle_indicatorSize(handle: QWindowsStyleH; retval: PSize); cdecl;
procedure QWindowsStyle_drawIndicator(handle: QWindowsStyleH; p: QPainterH; x: Integer; y: Integer; w: Integer; h: Integer; g: QColorGroupH; s: Integer; down: Boolean; enabled: Boolean); cdecl;
procedure QWindowsStyle_exclusiveIndicatorSize(handle: QWindowsStyleH; retval: PSize); cdecl;
procedure QWindowsStyle_drawExclusiveIndicator(handle: QWindowsStyleH; p: QPainterH; x: Integer; y: Integer; w: Integer; h: Integer; g: QColorGroupH; on: Boolean; down: Boolean; enabled: Boolean); cdecl;
procedure QWindowsStyle_drawExclusiveIndicatorMask(handle: QWindowsStyleH; p: QPainterH; x: Integer; y: Integer; w: Integer; h: Integer; on: Boolean); cdecl;
procedure QWindowsStyle_drawComboButton(handle: QWindowsStyleH; p: QPainterH; x: Integer; y: Integer; w: Integer; h: Integer; g: QColorGroupH; sunken: Boolean; editable: Boolean; enabled: Boolean; fill: QBrushH); cdecl;
procedure QWindowsStyle_comboButtonRect(handle: QWindowsStyleH; retval: PRect; x: Integer; y: Integer; w: Integer; h: Integer); cdecl;
procedure QWindowsStyle_comboButtonFocusRect(handle: QWindowsStyleH; retval: PRect; x: Integer; y: Integer; w: Integer; h: Integer); cdecl;
procedure QWindowsStyle_tabbarMetrics(handle: QWindowsStyleH; p1: QTabBarH; p2: PInteger; p3: PInteger; p4: PInteger); cdecl;
procedure QWindowsStyle_drawTab(handle: QWindowsStyleH; p1: QPainterH; p2: QTabBarH; p3: QTabH; selected: Boolean); cdecl;
procedure QWindowsStyle_drawTabMask(handle: QWindowsStyleH; p1: QPainterH; p2: QTabBarH; p3: QTabH; selected: Boolean); cdecl;
procedure QWindowsStyle_scrollBarMetrics(handle: QWindowsStyleH; p1: QScrollBarH; p2: PInteger; p3: PInteger; p4: PInteger; p5: PInteger); cdecl;
procedure QWindowsStyle_drawScrollBarControls(handle: QWindowsStyleH; p1: QPainterH; p2: QScrollBarH; sliderStart: Integer; controls: Cardinal; activeControl: Cardinal); cdecl;
function QWindowsStyle_sliderLength(handle: QWindowsStyleH): Integer; cdecl;
procedure QWindowsStyle_drawSlider(handle: QWindowsStyleH; p: QPainterH; x: Integer; y: Integer; w: Integer; h: Integer; g: QColorGroupH; p7: Orientation; tickAbove: Boolean; tickBelow: Boolean); cdecl;
procedure QWindowsStyle_drawSliderMask(handle: QWindowsStyleH; p: QPainterH; x: Integer; y: Integer; w: Integer; h: Integer; p6: Orientation; tickAbove: Boolean; tickBelow: Boolean); cdecl;
procedure QWindowsStyle_drawSliderGroove(handle: QWindowsStyleH; p: QPainterH; x: Integer; y: Integer; w: Integer; h: Integer; g: QColorGroupH; c: QCOORD; p8: Orientation); cdecl;
function QWindowsStyle_maximumSliderDragDistance(handle: QWindowsStyleH): Integer; cdecl;
function QWindowsStyle_splitterWidth(handle: QWindowsStyleH): Integer; cdecl;
procedure QWindowsStyle_drawSplitter(handle: QWindowsStyleH; p: QPainterH; x: Integer; y: Integer; w: Integer; h: Integer; g: QColorGroupH; p7: Orientation); cdecl;
procedure QWindowsStyle_drawCheckMark(handle: QWindowsStyleH; p: QPainterH; x: Integer; y: Integer; w: Integer; h: Integer; g: QColorGroupH; act: Boolean; dis: Boolean); cdecl;
procedure QWindowsStyle_polishPopupMenu(handle: QWindowsStyleH; p1: QPopupMenuH); cdecl;
function QWindowsStyle_extraPopupMenuItemWidth(handle: QWindowsStyleH; checkable: Boolean; maxpmw: Integer; mi: QMenuItemH; fm: QFontMetricsH): Integer; cdecl;
function QWindowsStyle_popupMenuItemHeight(handle: QWindowsStyleH; checkable: Boolean; mi: QMenuItemH; fm: QFontMetricsH): Integer; cdecl;
procedure QWindowsStyle_drawPopupMenuItem(handle: QWindowsStyleH; p: QPainterH; checkable: Boolean; maxpmw: Integer; tab: Integer; mi: QMenuItemH; pal: QPaletteH; act: Boolean; enabled: Boolean; x: Integer; y: Integer; w: Integer; h: Integer); cdecl;
function QTimer_create(parent: QObjectH; name: PAnsiChar): QTimerH; cdecl;
procedure QTimer_destroy(handle: QTimerH); cdecl;
function QTimer_isActive(handle: QTimerH): Boolean; cdecl;
function QTimer_start(handle: QTimerH; msec: Integer; sshot: Boolean): Integer; cdecl;
procedure QTimer_changeInterval(handle: QTimerH; msec: Integer); cdecl;
procedure QTimer_stop(handle: QTimerH); cdecl;
procedure QTimer_singleShot(msec: Integer; receiver: QObjectH; member: PAnsiChar); cdecl;
function QWorkspace_create(parent: QWidgetH; name: PAnsiChar): QWorkspaceH; cdecl;
procedure QWorkspace_destroy(handle: QWorkspaceH); cdecl;
function QWorkspace_activeWindow(handle: QWorkspaceH): QWidgetH; cdecl;
procedure QWorkspace_sizePolicy(handle: QWorkspaceH; retval: PSizePolicy); cdecl;
procedure QWorkspace_sizeHint(handle: QWorkspaceH; retval: PSize); cdecl;
procedure QWorkspace_cascade(handle: QWorkspaceH); cdecl;
procedure QWorkspace_tile(handle: QWorkspaceH); cdecl;
function QBitmap_create(): QBitmapH; overload; cdecl;
procedure QBitmap_destroy(handle: QBitmapH); cdecl;
function QBitmap_create(w: Integer; h: Integer; clear: Boolean; p4: QPixmapOptimization): QBitmapH; overload; cdecl;
function QBitmap_create(p1: PSize; clear: Boolean; p3: QPixmapOptimization): QBitmapH; overload; cdecl;
function QBitmap_create(w: Integer; h: Integer; bits: PByte; isXbitmap: Boolean): QBitmapH; overload; cdecl;
function QBitmap_create(p1: PSize; bits: PByte; isXbitmap: Boolean): QBitmapH; overload; cdecl;
function QBitmap_create(p1: QBitmapH): QBitmapH; overload; cdecl;
function QBitmap_create(fileName: PWideString; format: PAnsiChar): QBitmapH; overload; cdecl;
procedure QBitmap_xForm(handle: QBitmapH; retval: QBitmapH; p1: QWMatrixH); cdecl;
function QCursor_create(): QCursorH; overload; cdecl;
procedure QCursor_destroy(handle: QCursorH); cdecl;
function QCursor_create(shape: Integer): QCursorH; overload; cdecl;
function QCursor_create(bitmap: QBitmapH; mask: QBitmapH; hotX: Integer; hotY: Integer): QCursorH; overload; cdecl;
function QCursor_create(pixmap: QPixmapH; hotX: Integer; hotY: Integer): QCursorH; overload; cdecl;
function QCursor_create(p1: QCursorH): QCursorH; overload; cdecl;
function QCursor_shape(handle: QCursorH): Integer; cdecl;
procedure QCursor_setShape(handle: QCursorH; p1: Integer); cdecl;
function QCursor_bitmap(handle: QCursorH): QBitmapH; cdecl;
function QCursor_mask(handle: QCursorH): QBitmapH; cdecl;
procedure QCursor_hotSpot(handle: QCursorH; retval: PPoint); cdecl;
{$IFDEF MSWINDOWS}
function QCursor_handle(handle: QCursorH): HCURSOR; overload; cdecl;
{$ENDIF}
{$IFDEF LINUX}
function QCursor_handle(handle: QCursorH): HANDLE; overload; cdecl;
{$ENDIF}
procedure QCursor_initialize(); cdecl;
procedure QCursor_cleanup(); cdecl;
procedure QCursor_pos(retval: PPoint); cdecl;
procedure QCursor_setPos(x: Integer; y: Integer); overload; cdecl;
procedure QCursor_setPos(p1: PPoint); overload; cdecl;
function QFontDatabase_create(): QFontDatabaseH; cdecl;
procedure QFontDatabase_destroy(handle: QFontDatabaseH); cdecl;
procedure QFontDatabase_families(handle: QFontDatabaseH; retval: QStringListH; onlyForLocale: Boolean); cdecl;
procedure QFontDatabase_pointSizes(handle: QFontDatabaseH; retval: PIntArray; family: PWideString; style: PWideString; charSet: PWideString); cdecl;
procedure QFontDatabase_styles(handle: QFontDatabaseH; retval: QStringListH; family: PWideString; charSet: PWideString); cdecl;
procedure QFontDatabase_charSets(handle: QFontDatabaseH; retval: QStringListH; familyName: PWideString; onlyForLocale: Boolean); overload; cdecl;
procedure QFontDatabase_font(handle: QFontDatabaseH; retval: QFontH; familyName: PWideString; style: PWideString; pointSize: Integer; charSetName: PWideString); cdecl;
function QFontDatabase_isBitmapScalable(handle: QFontDatabaseH; family: PWideString; style: PWideString; charSet: PWideString): Boolean; cdecl;
function QFontDatabase_isSmoothlyScalable(handle: QFontDatabaseH; family: PWideString; style: PWideString; charSet: PWideString): Boolean; cdecl;
function QFontDatabase_isScalable(handle: QFontDatabaseH; family: PWideString; style: PWideString; charSet: PWideString): Boolean; cdecl;
procedure QFontDatabase_smoothSizes(handle: QFontDatabaseH; retval: PIntArray; family: PWideString; style: PWideString; charSet: PWideString); cdecl;
procedure QFontDatabase_standardSizes(retval: PIntArray); cdecl;
function QFontDatabase_italic(handle: QFontDatabaseH; family: PWideString; style: PWideString; charSet: PWideString): Boolean; cdecl;
function QFontDatabase_bold(handle: QFontDatabaseH; family: PWideString; style: PWideString; charSet: PWideString): Boolean; cdecl;
function QFontDatabase_weight(handle: QFontDatabaseH; family: PWideString; style: PWideString; charSet: PWideString): Integer; cdecl;
procedure QFontDatabase_styleString(handle: QFontDatabaseH; retval: PWideString; p1: QFontH); cdecl;
procedure QFontDatabase_verboseCharSetName(retval: PWideString; charSetName: PWideString); cdecl;
procedure QFontDatabase_charSetSample(retval: PWideString; charSetName: PWideString); cdecl;
function QFontInfo_create(p1: QFontH): QFontInfoH; overload; cdecl;
procedure QFontInfo_destroy(handle: QFontInfoH); cdecl;
function QFontInfo_create(p1: QFontInfoH): QFontInfoH; overload; cdecl;
procedure QFontInfo_family(handle: QFontInfoH; retval: PWideString); cdecl;
function QFontInfo_pointSize(handle: QFontInfoH): Integer; cdecl;
function QFontInfo_italic(handle: QFontInfoH): Boolean; cdecl;
function QFontInfo_weight(handle: QFontInfoH): Integer; cdecl;
function QFontInfo_bold(handle: QFontInfoH): Boolean; cdecl;
function QFontInfo_underline(handle: QFontInfoH): Boolean; cdecl;
function QFontInfo_strikeOut(handle: QFontInfoH): Boolean; cdecl;
function QFontInfo_fixedPitch(handle: QFontInfoH): Boolean; cdecl;
function QFontInfo_styleHint(handle: QFontInfoH): QFontStyleHint; cdecl;
function QFontInfo_charSet(handle: QFontInfoH): QFontCharSet; cdecl;
function QFontInfo_rawMode(handle: QFontInfoH): Boolean; cdecl;
function QFontInfo_exactMatch(handle: QFontInfoH): Boolean; cdecl;
function QFontMetrics_create(p1: QFontH): QFontMetricsH; overload; cdecl;
procedure QFontMetrics_destroy(handle: QFontMetricsH); cdecl;
function QFontMetrics_create(p1: QFontMetricsH): QFontMetricsH; overload; cdecl;
function QFontMetrics_ascent(handle: QFontMetricsH): Integer; cdecl;
function QFontMetrics_descent(handle: QFontMetricsH): Integer; cdecl;
function QFontMetrics_height(handle: QFontMetricsH): Integer; cdecl;
function QFontMetrics_leading(handle: QFontMetricsH): Integer; cdecl;
function QFontMetrics_lineSpacing(handle: QFontMetricsH): Integer; cdecl;
function QFontMetrics_minLeftBearing(handle: QFontMetricsH): Integer; cdecl;
function QFontMetrics_minRightBearing(handle: QFontMetricsH): Integer; cdecl;
function QFontMetrics_maxWidth(handle: QFontMetricsH): Integer; cdecl;
function QFontMetrics_inFont(handle: QFontMetricsH; p1: PWideChar): Boolean; cdecl;
function QFontMetrics_leftBearing(handle: QFontMetricsH; p1: PWideChar): Integer; cdecl;
function QFontMetrics_rightBearing(handle: QFontMetricsH; p1: PWideChar): Integer; cdecl;
function QFontMetrics_width(handle: QFontMetricsH; p1: PWideString; len: Integer): Integer; overload; cdecl;
function QFontMetrics_width(handle: QFontMetricsH; p1: PWideChar): Integer; overload; cdecl;
function QFontMetrics_width(handle: QFontMetricsH; c: char): Integer; overload; cdecl;
procedure QFontMetrics_boundingRect(handle: QFontMetricsH; retval: PRect; p1: PWideString; len: Integer); overload; cdecl;
procedure QFontMetrics_boundingRect(handle: QFontMetricsH; retval: PRect; p1: PWideChar); overload; cdecl;
procedure QFontMetrics_boundingRect(handle: QFontMetricsH; retval: PRect; x: Integer; y: Integer; w: Integer; h: Integer; flags: Integer; str: PWideString; len: Integer; tabstops: Integer; tabarray: PInteger; intern: PPAnsiChar); overload; cdecl;
procedure QFontMetrics_size(handle: QFontMetricsH; retval: PSize; flags: Integer; str: PWideString; len: Integer; tabstops: Integer; tabarray: PInteger; intern: PPAnsiChar); cdecl;
function QFontMetrics_underlinePos(handle: QFontMetricsH): Integer; cdecl;
function QFontMetrics_strikeOutPos(handle: QFontMetricsH): Integer; cdecl;
function QFontMetrics_lineWidth(handle: QFontMetricsH): Integer; cdecl;
procedure QInputDialog_getText(retval: PWideString; caption: PWideString; _label: PWideString; text: PWideString; ok: PBoolean; parent: QWidgetH; name: PAnsiChar); overload; cdecl;
procedure QInputDialog_getText(retval: PWideString; caption: PWideString; _label: PWideString; echo: QLineEditEchoMode; text: PWideString; ok: PBoolean; parent: QWidgetH; name: PAnsiChar); overload; cdecl;
function QInputDialog_getInteger(caption: PWideString; _label: PWideString; num: Integer; from: Integer; _to: Integer; step: Integer; ok: PBoolean; parent: QWidgetH; name: PAnsiChar): Integer; cdecl;
function QInputDialog_getDouble(caption: PWideString; _label: PWideString; num: Double; from: Double; _to: Double; decimals: Integer; ok: PBoolean; parent: QWidgetH; name: PAnsiChar): Double; cdecl;
procedure QInputDialog_getItem(retval: PWideString; caption: PWideString; _label: PWideString; list: QStringListH; current: Integer; editable: Boolean; ok: PBoolean; parent: QWidgetH; name: PAnsiChar); cdecl;
procedure QIODevice_destroy(handle: QIODeviceH); cdecl;
function QIODevice_flags(handle: QIODeviceH): Integer; cdecl;
function QIODevice_mode(handle: QIODeviceH): Integer; cdecl;
function QIODevice_state(handle: QIODeviceH): Integer; cdecl;
function QIODevice_isDirectAccess(handle: QIODeviceH): Boolean; cdecl;
function QIODevice_isSequentialAccess(handle: QIODeviceH): Boolean; cdecl;
function QIODevice_isCombinedAccess(handle: QIODeviceH): Boolean; cdecl;
function QIODevice_isBuffered(handle: QIODeviceH): Boolean; cdecl;
function QIODevice_isRaw(handle: QIODeviceH): Boolean; cdecl;
function QIODevice_isSynchronous(handle: QIODeviceH): Boolean; cdecl;
function QIODevice_isAsynchronous(handle: QIODeviceH): Boolean; cdecl;
function QIODevice_isTranslated(handle: QIODeviceH): Boolean; cdecl;
function QIODevice_isReadable(handle: QIODeviceH): Boolean; cdecl;
function QIODevice_isWritable(handle: QIODeviceH): Boolean; cdecl;
function QIODevice_isReadWrite(handle: QIODeviceH): Boolean; cdecl;
function QIODevice_isInactive(handle: QIODeviceH): Boolean; cdecl;
function QIODevice_isOpen(handle: QIODeviceH): Boolean; cdecl;
function QIODevice_status(handle: QIODeviceH): Integer; cdecl;
procedure QIODevice_resetStatus(handle: QIODeviceH); cdecl;
function QIODevice_open(handle: QIODeviceH; mode: Integer): Boolean; cdecl;
procedure QIODevice_close(handle: QIODeviceH); cdecl;
procedure QIODevice_flush(handle: QIODeviceH); cdecl;
function QIODevice_size(handle: QIODeviceH): Cardinal; cdecl;
function QIODevice_at(handle: QIODeviceH): Integer; overload; cdecl;
function QIODevice_at(handle: QIODeviceH; p1: Integer): Boolean; overload; cdecl;
function QIODevice_atEnd(handle: QIODeviceH): Boolean; cdecl;
function QIODevice_reset(handle: QIODeviceH): Boolean; cdecl;
function QIODevice_readBlock(handle: QIODeviceH; data: PAnsiChar; maxlen: Cardinal): Integer; cdecl;
function QIODevice_writeBlock(handle: QIODeviceH; data: PAnsiChar; len: Cardinal): Integer; overload; cdecl;
function QIODevice_readLine(handle: QIODeviceH; data: PAnsiChar; maxlen: Cardinal): Integer; cdecl;
function QIODevice_writeBlock(handle: QIODeviceH; data: QByteArrayH): Integer; overload; cdecl;
procedure QIODevice_readAll(handle: QIODeviceH; retval: QByteArrayH); cdecl;
function QIODevice_getch(handle: QIODeviceH): Integer; cdecl;
function QIODevice_putch(handle: QIODeviceH; p1: Integer): Integer; cdecl;
function QIODevice_ungetch(handle: QIODeviceH; p1: Integer): Integer; cdecl;
function QMenuItem_create(): QMenuItemH; cdecl;
procedure QMenuItem_destroy(handle: QMenuItemH); cdecl;
function QMenuItem_id(handle: QMenuItemH): Integer; cdecl;
function QMenuItem_iconSet(handle: QMenuItemH): QIconSetH; cdecl;
procedure QMenuItem_text(handle: QMenuItemH; retval: PWideString); cdecl;
procedure QMenuItem_whatsThis(handle: QMenuItemH; retval: PWideString); cdecl;
function QMenuItem_pixmap(handle: QMenuItemH): QPixmapH; cdecl;
function QMenuItem_popup(handle: QMenuItemH): QPopupMenuH; cdecl;
function QMenuItem_widget(handle: QMenuItemH): QWidgetH; cdecl;
function QMenuItem_custom(handle: QMenuItemH): QCustomMenuItemH; cdecl;
function QMenuItem_key(handle: QMenuItemH): Integer; cdecl;
function QMenuItem_signal(handle: QMenuItemH): QSignalH; cdecl;
function QMenuItem_isSeparator(handle: QMenuItemH): Boolean; cdecl;
function QMenuItem_isEnabled(handle: QMenuItemH): Boolean; cdecl;
function QMenuItem_isChecked(handle: QMenuItemH): Boolean; cdecl;
function QMenuItem_isDirty(handle: QMenuItemH): Boolean; cdecl;
procedure QMenuItem_setText(handle: QMenuItemH; text: PWideString); cdecl;
procedure QMenuItem_setDirty(handle: QMenuItemH; dirty: Boolean); cdecl;
procedure QMenuItem_setWhatsThis(handle: QMenuItemH; text: PWideString); cdecl;
procedure QCustomMenuItem_destroy(handle: QCustomMenuItemH); cdecl;
function QCustomMenuItem_fullSpan(handle: QCustomMenuItemH): Boolean; cdecl;
function QCustomMenuItem_isSeparator(handle: QCustomMenuItemH): Boolean; cdecl;
procedure QCustomMenuItem_setFont(handle: QCustomMenuItemH; font: QFontH); cdecl;
procedure QCustomMenuItem_paint(handle: QCustomMenuItemH; p: QPainterH; cg: QColorGroupH; act: Boolean; enabled: Boolean; x: Integer; y: Integer; w: Integer; h: Integer); cdecl;
procedure QCustomMenuItem_sizeHint(handle: QCustomMenuItemH; retval: PSize); cdecl;
function QMenuData_create(): QMenuDataH; cdecl;
procedure QMenuData_destroy(handle: QMenuDataH); cdecl;
function QMenuData_count(handle: QMenuDataH): Cardinal; cdecl;
function QMenuData_insertItem(handle: QMenuDataH; text: PWideString; receiver: QObjectH; member: PAnsiChar; accel: Integer; id: Integer; index: Integer): Integer; overload; cdecl;
function QMenuData_insertItem(handle: QMenuDataH; icon: QIconSetH; text: PWideString; receiver: QObjectH; member: PAnsiChar; accel: Integer; id: Integer; index: Integer): Integer; overload; cdecl;
function QMenuData_insertItem(handle: QMenuDataH; pixmap: QPixmapH; receiver: QObjectH; member: PAnsiChar; accel: Integer; id: Integer; index: Integer): Integer; overload; cdecl;
function QMenuData_insertItem(handle: QMenuDataH; icon: QIconSetH; pixmap: QPixmapH; receiver: QObjectH; member: PAnsiChar; accel: Integer; id: Integer; index: Integer): Integer; overload; cdecl;
function QMenuData_insertItem(handle: QMenuDataH; text: PWideString; id: Integer; index: Integer): Integer; overload; cdecl;
function QMenuData_insertItem(handle: QMenuDataH; icon: QIconSetH; text: PWideString; id: Integer; index: Integer): Integer; overload; cdecl;
function QMenuData_insertItem(handle: QMenuDataH; text: PWideString; popup: QPopupMenuH; id: Integer; index: Integer): Integer; overload; cdecl;
function QMenuData_insertItem(handle: QMenuDataH; icon: QIconSetH; text: PWideString; popup: QPopupMenuH; id: Integer; index: Integer): Integer; overload; cdecl;
function QMenuData_insertItem(handle: QMenuDataH; pixmap: QPixmapH; id: Integer; index: Integer): Integer; overload; cdecl;
function QMenuData_insertItem(handle: QMenuDataH; icon: QIconSetH; pixmap: QPixmapH; id: Integer; index: Integer): Integer; overload; cdecl;
function QMenuData_insertItem(handle: QMenuDataH; pixmap: QPixmapH; popup: QPopupMenuH; id: Integer; index: Integer): Integer; overload; cdecl;
function QMenuData_insertItem(handle: QMenuDataH; icon: QIconSetH; pixmap: QPixmapH; popup: QPopupMenuH; id: Integer; index: Integer): Integer; overload; cdecl;
function QMenuData_insertItem(handle: QMenuDataH; widget: QWidgetH; id: Integer; index: Integer): Integer; overload; cdecl;
function QMenuData_insertItem(handle: QMenuDataH; icon: QIconSetH; custom: QCustomMenuItemH; id: Integer; index: Integer): Integer; overload; cdecl;
function QMenuData_insertItem(handle: QMenuDataH; custom: QCustomMenuItemH; id: Integer; index: Integer): Integer; overload; cdecl;
function QMenuData_insertSeparator(handle: QMenuDataH; index: Integer): Integer; cdecl;
procedure QMenuData_removeItem(handle: QMenuDataH; id: Integer); cdecl;
procedure QMenuData_removeItemAt(handle: QMenuDataH; index: Integer); cdecl;
procedure QMenuData_clear(handle: QMenuDataH); cdecl;
function QMenuData_accel(handle: QMenuDataH; id: Integer): Integer; cdecl;
procedure QMenuData_setAccel(handle: QMenuDataH; key: Integer; id: Integer); cdecl;
function QMenuData_iconSet(handle: QMenuDataH; id: Integer): QIconSetH; cdecl;
procedure QMenuData_text(handle: QMenuDataH; retval: PWideString; id: Integer); cdecl;
function QMenuData_pixmap(handle: QMenuDataH; id: Integer): QPixmapH; cdecl;
procedure QMenuData_setWhatsThis(handle: QMenuDataH; id: Integer; p2: PWideString); cdecl;
procedure QMenuData_whatsThis(handle: QMenuDataH; retval: PWideString; id: Integer); cdecl;
procedure QMenuData_changeItem(handle: QMenuDataH; id: Integer; text: PWideString); overload; cdecl;
procedure QMenuData_changeItem(handle: QMenuDataH; id: Integer; pixmap: QPixmapH); overload; cdecl;
procedure QMenuData_changeItem(handle: QMenuDataH; id: Integer; icon: QIconSetH; text: PWideString); overload; cdecl;
procedure QMenuData_changeItem(handle: QMenuDataH; id: Integer; icon: QIconSetH; pixmap: QPixmapH); overload; cdecl;
procedure QMenuData_changeItem(handle: QMenuDataH; text: PWideString; id: Integer); overload; cdecl;
procedure QMenuData_changeItem(handle: QMenuDataH; pixmap: QPixmapH; id: Integer); overload; cdecl;
procedure QMenuData_changeItem(handle: QMenuDataH; icon: QIconSetH; text: PWideString; id: Integer); overload; cdecl;
function QMenuData_isItemEnabled(handle: QMenuDataH; id: Integer): Boolean; cdecl;
procedure QMenuData_setItemEnabled(handle: QMenuDataH; id: Integer; enable: Boolean); cdecl;
function QMenuData_isItemChecked(handle: QMenuDataH; id: Integer): Boolean; cdecl;
procedure QMenuData_setItemChecked(handle: QMenuDataH; id: Integer; check: Boolean); cdecl;
procedure QMenuData_updateItem(handle: QMenuDataH; id: Integer); cdecl;
function QMenuData_indexOf(handle: QMenuDataH; id: Integer): Integer; cdecl;
function QMenuData_idAt(handle: QMenuDataH; index: Integer): Integer; cdecl;
procedure QMenuData_setId(handle: QMenuDataH; index: Integer; id: Integer); cdecl;
function QMenuData_connectItem(handle: QMenuDataH; id: Integer; receiver: QObjectH; member: PAnsiChar): Boolean; cdecl;
function QMenuData_disconnectItem(handle: QMenuDataH; id: Integer; receiver: QObjectH; member: PAnsiChar): Boolean; cdecl;
function QMenuData_setItemParameter(handle: QMenuDataH; id: Integer; param: Integer): Boolean; cdecl;
function QMenuData_itemParameter(handle: QMenuDataH; id: Integer): Integer; cdecl;
function QMenuData_findItem(handle: QMenuDataH; id: Integer): QMenuItemH; overload; cdecl;
function QMenuData_findItem(handle: QMenuDataH; id: Integer; parent: QMenuDataHH): QMenuItemH; overload; cdecl;
procedure QMenuData_activateItemAt(handle: QMenuDataH; index: Integer); cdecl;
function QMimeSource_format(handle: QMimeSourceH; n: Integer): PAnsiChar; cdecl;
function QMimeSource_provides(handle: QMimeSourceH; p1: PAnsiChar): Boolean; cdecl;
procedure QMimeSource_encodedData(handle: QMimeSourceH; retval: QByteArrayH; p1: PAnsiChar); cdecl;
function QMimeSourceFactory_create(): QMimeSourceFactoryH; cdecl;
procedure QMimeSourceFactory_destroy(handle: QMimeSourceFactoryH); cdecl;
function QMimeSourceFactory_defaultFactory(): QMimeSourceFactoryH; cdecl;
procedure QMimeSourceFactory_setDefaultFactory(p1: QMimeSourceFactoryH); cdecl;
function QMimeSourceFactory_data(handle: QMimeSourceFactoryH; abs_name: PWideString): QMimeSourceH; overload; cdecl;
procedure QMimeSourceFactory_makeAbsolute(handle: QMimeSourceFactoryH; retval: PWideString; abs_or_rel_name: PWideString; context: PWideString); cdecl;
function QMimeSourceFactory_data(handle: QMimeSourceFactoryH; abs_or_rel_name: PWideString; context: PWideString): QMimeSourceH; overload; cdecl;
procedure QMimeSourceFactory_setText(handle: QMimeSourceFactoryH; abs_name: PWideString; text: PWideString); cdecl;
procedure QMimeSourceFactory_setImage(handle: QMimeSourceFactoryH; abs_name: PWideString; im: QImageH); cdecl;
procedure QMimeSourceFactory_setPixmap(handle: QMimeSourceFactoryH; abs_name: PWideString; pm: QPixmapH); cdecl;
procedure QMimeSourceFactory_setData(handle: QMimeSourceFactoryH; abs_name: PWideString; data: QMimeSourceH); cdecl;
procedure QMimeSourceFactory_setFilePath(handle: QMimeSourceFactoryH; p1: QStringListH); cdecl;
procedure QMimeSourceFactory_filePath(handle: QMimeSourceFactoryH; retval: QStringListH); cdecl;
procedure QMimeSourceFactory_addFilePath(handle: QMimeSourceFactoryH; p1: PWideString); cdecl;
procedure QMimeSourceFactory_setExtensionType(handle: QMimeSourceFactoryH; ext: PWideString; mimetype: PAnsiChar); cdecl;
{$IFDEF MSWINDOWS}
function QWindowsMime_registerMimeType(mime: PAnsiChar): Integer; cdecl;
{$ENDIF}
function QPaintDeviceMetrics_create(p1: QPaintDeviceH): QPaintDeviceMetricsH; cdecl;
procedure QPaintDeviceMetrics_destroy(handle: QPaintDeviceMetricsH); cdecl;
function QPaintDeviceMetrics_width(handle: QPaintDeviceMetricsH): Integer; cdecl;
function QPaintDeviceMetrics_height(handle: QPaintDeviceMetricsH): Integer; cdecl;
function QPaintDeviceMetrics_widthMM(handle: QPaintDeviceMetricsH): Integer; cdecl;
function QPaintDeviceMetrics_heightMM(handle: QPaintDeviceMetricsH): Integer; cdecl;
function QPaintDeviceMetrics_logicalDpiX(handle: QPaintDeviceMetricsH): Integer; cdecl;
function QPaintDeviceMetrics_logicalDpiY(handle: QPaintDeviceMetricsH): Integer; cdecl;
function QPaintDeviceMetrics_numColors(handle: QPaintDeviceMetricsH): Integer; cdecl;
function QPaintDeviceMetrics_depth(handle: QPaintDeviceMetricsH): Integer; cdecl;
function QPicture_create(formatVersion: Integer): QPictureH; cdecl;
procedure QPicture_destroy(handle: QPictureH); cdecl;
function QPicture_isNull(handle: QPictureH): Boolean; cdecl;
function QPicture_size(handle: QPictureH): Cardinal; cdecl;
function QPicture_data(handle: QPictureH): PAnsiChar; cdecl;
procedure QPicture_setData(handle: QPictureH; data: PAnsiChar; size: Cardinal); cdecl;
function QPicture_play(handle: QPictureH; p1: QPainterH): Boolean; cdecl;
function QPicture_load(handle: QPictureH; fileName: PWideString): Boolean; cdecl;
function QPicture_save(handle: QPictureH; fileName: PWideString): Boolean; cdecl;
function QPixmapCache_cacheLimit(): Integer; cdecl;
procedure QPixmapCache_setCacheLimit(p1: Integer); cdecl;
function QPixmapCache_find(key: PWideString): QPixmapH; overload; cdecl;
function QPixmapCache_find(key: PWideString; p2: QPixmapH): Boolean; overload; cdecl;
function QPixmapCache_insert(key: PWideString; p2: QPixmapH): Boolean; overload; cdecl;
procedure QPixmapCache_clear(); cdecl;
function QPoint_create(): QPointH; overload; cdecl;
procedure QPoint_destroy(handle: QPointH); cdecl;
function QPoint_create(xpos: Integer; ypos: Integer): QPointH; overload; cdecl;
function QPoint_isNull(handle: QPointH): Boolean; cdecl;
function QPoint_x(handle: QPointH): Integer; cdecl;
function QPoint_y(handle: QPointH): Integer; cdecl;
procedure QPoint_setX(handle: QPointH; x: Integer); cdecl;
procedure QPoint_setY(handle: QPointH; y: Integer); cdecl;
function QPoint_manhattanLength(handle: QPointH): Integer; cdecl;
function QPoint_rx(handle: QPointH): QCOORD; cdecl;
function QPoint_ry(handle: QPointH): QCOORD; cdecl;
function QRangeControl_create(): QRangeControlH; overload; cdecl;
procedure QRangeControl_destroy(handle: QRangeControlH); cdecl;
function QRangeControl_create(minValue: Integer; maxValue: Integer; lineStep: Integer; pageStep: Integer; value: Integer): QRangeControlH; overload; cdecl;
function QRangeControl_value(handle: QRangeControlH): Integer; cdecl;
procedure QRangeControl_setValue(handle: QRangeControlH; p1: Integer); cdecl;
procedure QRangeControl_addPage(handle: QRangeControlH); cdecl;
procedure QRangeControl_subtractPage(handle: QRangeControlH); cdecl;
procedure QRangeControl_addLine(handle: QRangeControlH); cdecl;
procedure QRangeControl_subtractLine(handle: QRangeControlH); cdecl;
function QRangeControl_minValue(handle: QRangeControlH): Integer; cdecl;
function QRangeControl_maxValue(handle: QRangeControlH): Integer; cdecl;
procedure QRangeControl_setRange(handle: QRangeControlH; minValue: Integer; maxValue: Integer); cdecl;
function QRangeControl_lineStep(handle: QRangeControlH): Integer; cdecl;
function QRangeControl_pageStep(handle: QRangeControlH): Integer; cdecl;
procedure QRangeControl_setSteps(handle: QRangeControlH; line: Integer; page: Integer); cdecl;
function QRangeControl_bound(handle: QRangeControlH; p1: Integer): Integer; cdecl;
function QRect_create(): QRectH; overload; cdecl;
procedure QRect_destroy(handle: QRectH); cdecl;
function QRect_create(topleft: PPoint; bottomright: PPoint): QRectH; overload; cdecl;
function QRect_create(topleft: PPoint; size: PSize): QRectH; overload; cdecl;
function QRect_create(left: Integer; top: Integer; width: Integer; height: Integer): QRectH; overload; cdecl;
function QRect_isNull(handle: QRectH): Boolean; cdecl;
function QRect_isEmpty(handle: QRectH): Boolean; cdecl;
function QRect_isValid(handle: QRectH): Boolean; cdecl;
procedure QRect_normalize(handle: QRectH; retval: PRect); cdecl;
function QRect_left(handle: QRectH): Integer; cdecl;
function QRect_top(handle: QRectH): Integer; cdecl;
function QRect_right(handle: QRectH): Integer; cdecl;
function QRect_bottom(handle: QRectH): Integer; cdecl;
function QRect_rLeft(handle: QRectH): QCOORD; cdecl;
function QRect_rTop(handle: QRectH): QCOORD; cdecl;
function QRect_rRight(handle: QRectH): QCOORD; cdecl;
function QRect_rBottom(handle: QRectH): QCOORD; cdecl;
function QRect_x(handle: QRectH): Integer; cdecl;
function QRect_y(handle: QRectH): Integer; cdecl;
procedure QRect_setLeft(handle: QRectH; pos: Integer); cdecl;
procedure QRect_setTop(handle: QRectH; pos: Integer); cdecl;
procedure QRect_setRight(handle: QRectH; pos: Integer); cdecl;
procedure QRect_setBottom(handle: QRectH; pos: Integer); cdecl;
procedure QRect_setX(handle: QRectH; x: Integer); cdecl;
procedure QRect_setY(handle: QRectH; y: Integer); cdecl;
procedure QRect_topLeft(handle: QRectH; retval: PPoint); cdecl;
procedure QRect_bottomRight(handle: QRectH; retval: PPoint); cdecl;
procedure QRect_topRight(handle: QRectH; retval: PPoint); cdecl;
procedure QRect_bottomLeft(handle: QRectH; retval: PPoint); cdecl;
procedure QRect_center(handle: QRectH; retval: PPoint); cdecl;
procedure QRect_rect(handle: QRectH; x: PInteger; y: PInteger; w: PInteger; h: PInteger); cdecl;
procedure QRect_coords(handle: QRectH; x1: PInteger; y1: PInteger; x2: PInteger; y2: PInteger); cdecl;
procedure QRect_moveTopLeft(handle: QRectH; p: PPoint); cdecl;
procedure QRect_moveBottomRight(handle: QRectH; p: PPoint); cdecl;
procedure QRect_moveTopRight(handle: QRectH; p: PPoint); cdecl;
procedure QRect_moveBottomLeft(handle: QRectH; p: PPoint); cdecl;
procedure QRect_moveCenter(handle: QRectH; p: PPoint); cdecl;
procedure QRect_moveBy(handle: QRectH; dx: Integer; dy: Integer); cdecl;
procedure QRect_setRect(handle: QRectH; x: Integer; y: Integer; w: Integer; h: Integer); cdecl;
procedure QRect_setCoords(handle: QRectH; x1: Integer; y1: Integer; x2: Integer; y2: Integer); cdecl;
procedure QRect_size(handle: QRectH; retval: PSize); cdecl;
function QRect_width(handle: QRectH): Integer; cdecl;
function QRect_height(handle: QRectH): Integer; cdecl;
procedure QRect_setWidth(handle: QRectH; w: Integer); cdecl;
procedure QRect_setHeight(handle: QRectH; h: Integer); cdecl;
procedure QRect_setSize(handle: QRectH; s: PSize); cdecl;
function QRect_contains(handle: QRectH; p: PPoint; proper: Boolean): Boolean; overload; cdecl;
function QRect_contains(handle: QRectH; x: Integer; y: Integer; proper: Boolean): Boolean; overload; cdecl;
function QRect_contains(handle: QRectH; r: PRect; proper: Boolean): Boolean; overload; cdecl;
procedure QRect_unite(handle: QRectH; retval: PRect; r: PRect); cdecl;
procedure QRect_intersect(handle: QRectH; retval: PRect; r: PRect); cdecl;
function QRect_intersects(handle: QRectH; r: PRect): Boolean; cdecl;
function QRegExp_create(): QRegExpH; overload; cdecl;
procedure QRegExp_destroy(handle: QRegExpH); cdecl;
function QRegExp_create(p1: PWideString; caseSensitive: Boolean; wildcard: Boolean): QRegExpH; overload; cdecl;
function QRegExp_create(p1: QRegExpH): QRegExpH; overload; cdecl;
function QRegExp_isEmpty(handle: QRegExpH): Boolean; cdecl;
function QRegExp_isValid(handle: QRegExpH): Boolean; cdecl;
function QRegExp_caseSensitive(handle: QRegExpH): Boolean; cdecl;
procedure QRegExp_setCaseSensitive(handle: QRegExpH; p1: Boolean); cdecl;
function QRegExp_wildcard(handle: QRegExpH): Boolean; cdecl;
procedure QRegExp_setWildcard(handle: QRegExpH; p1: Boolean); cdecl;
procedure QRegExp_pattern(handle: QRegExpH; retval: PWideString); cdecl;
procedure QRegExp_setPattern(handle: QRegExpH; pattern: PWideString); cdecl;
function QRegExp_match(handle: QRegExpH; str: PWideString; index: Integer; len: PInteger; indexIsStart: Boolean): Integer; cdecl;
function QRegExp_find(handle: QRegExpH; str: PWideString; index: Integer): Integer; cdecl;
function QSize_create(): QSizeH; overload; cdecl;
procedure QSize_destroy(handle: QSizeH); cdecl;
function QSize_create(w: Integer; h: Integer): QSizeH; overload; cdecl;
function QSize_isNull(handle: QSizeH): Boolean; cdecl;
function QSize_isEmpty(handle: QSizeH): Boolean; cdecl;
function QSize_isValid(handle: QSizeH): Boolean; cdecl;
function QSize_width(handle: QSizeH): Integer; cdecl;
function QSize_height(handle: QSizeH): Integer; cdecl;
procedure QSize_setWidth(handle: QSizeH; w: Integer); cdecl;
procedure QSize_setHeight(handle: QSizeH; h: Integer); cdecl;
procedure QSize_transpose(handle: QSizeH); cdecl;
procedure QSize_expandedTo(handle: QSizeH; retval: PSize; p1: PSize); cdecl;
procedure QSize_boundedTo(handle: QSizeH; retval: PSize; p1: PSize); cdecl;
function QSize_rwidth(handle: QSizeH): QCOORD; cdecl;
function QSize_rheight(handle: QSizeH): QCOORD; cdecl;
function QStringList_create(): QStringListH; overload; cdecl;
procedure QStringList_destroy(handle: QStringListH); cdecl;
function QStringList_create(l: QStringListH): QStringListH; overload; cdecl;
function QStringList_create(i: PWideString): QStringListH; overload; cdecl;
function QStringList_create(i: PAnsiChar): QStringListH; overload; cdecl;
procedure QStringList_fromStrList(retval: QStringListH; p1: QStrListH); cdecl;
procedure QStringList_sort(handle: QStringListH); cdecl;
procedure QStringList_split(retval: QStringListH; sep: PWideString; str: PWideString; allowEmptyEntries: Boolean); overload; cdecl;
procedure QStringList_split(retval: QStringListH; sep: PWideChar; str: PWideString; allowEmptyEntries: Boolean); overload; cdecl;
procedure QStringList_split(retval: QStringListH; sep: QRegExpH; str: PWideString; allowEmptyEntries: Boolean); overload; cdecl;
procedure QStringList_join(handle: QStringListH; retval: PWideString; sep: PWideString); cdecl;
procedure QStringList_grep(handle: QStringListH; retval: QStringListH; str: PWideString; cs: Boolean); overload; cdecl;
procedure QStringList_grep(handle: QStringListH; retval: QStringListH; expr: QRegExpH); overload; cdecl;
function QWMatrix_create(): QWMatrixH; overload; cdecl;
procedure QWMatrix_destroy(handle: QWMatrixH); cdecl;
function QWMatrix_create(m11: Double; m12: Double; m21: Double; m22: Double; dx: Double; dy: Double): QWMatrixH; overload; cdecl;
procedure QWMatrix_setMatrix(handle: QWMatrixH; m11: Double; m12: Double; m21: Double; m22: Double; dx: Double; dy: Double); cdecl;
function QWMatrix_m11(handle: QWMatrixH): Double; cdecl;
function QWMatrix_m12(handle: QWMatrixH): Double; cdecl;
function QWMatrix_m21(handle: QWMatrixH): Double; cdecl;
function QWMatrix_m22(handle: QWMatrixH): Double; cdecl;
function QWMatrix_dx(handle: QWMatrixH): Double; cdecl;
function QWMatrix_dy(handle: QWMatrixH): Double; cdecl;
procedure QWMatrix_map(handle: QWMatrixH; x: Integer; y: Integer; tx: PInteger; ty: PInteger); overload; cdecl;
procedure QWMatrix_map(handle: QWMatrixH; x: Double; y: Double; tx: PDouble; ty: PDouble); overload; cdecl;
procedure QWMatrix_map(handle: QWMatrixH; retval: PPoint; p1: PPoint); overload; cdecl;
procedure QWMatrix_map(handle: QWMatrixH; retval: PRect; p1: PRect); overload; cdecl;
procedure QWMatrix_map(handle: QWMatrixH; retval: PPointArray; p1: PPointArray); overload; cdecl;
procedure QWMatrix_reset(handle: QWMatrixH); cdecl;
function QWMatrix_translate(handle: QWMatrixH; dx: Double; dy: Double): QWMatrixH; cdecl;
function QWMatrix_scale(handle: QWMatrixH; sx: Double; sy: Double): QWMatrixH; cdecl;
function QWMatrix_shear(handle: QWMatrixH; sh: Double; sv: Double): QWMatrixH; cdecl;
function QWMatrix_rotate(handle: QWMatrixH; a: Double): QWMatrixH; cdecl;
procedure QWMatrix_invert(handle: QWMatrixH; retval: QWMatrixH; p1: PBoolean); cdecl;
function QMovie_hook_create(movie: QMovieH): QMovie_hookH; cdecl;
procedure QMovie_hook_destroy(handle: QMovie_hookH); cdecl;
procedure QMovie_hook_hook_status(handle: QMovie_hookH; hook: QHookH); cdecl;
procedure QMovie_hook_hook_resize(handle: QMovie_hookH; hook: QHookH); cdecl;
procedure QMovie_hook_hook_update(handle: QMovie_hookH; hook: QHookH); cdecl;
procedure QMovie_hook_setMovie(handle: QMovie_hookH; m: QMovieH); cdecl;
procedure QClxObjectMap_setAddCallback(ptr: Pointer); cdecl;
procedure QClxObjectMap_setRemoveCallback(ptr: Pointer); cdecl;
procedure QClxObjectMap_add(obj: Pointer; value: Integer); cdecl;
procedure QClxObjectMap_remove(obj: Pointer); cdecl;
function QClxObjectMap_find(obj: Pointer): Integer; cdecl;
function QClxObjectMap_findClxObject(obj: Pointer): Integer; cdecl;
function QClxIODevice_create(stream: Pointer): QClxIODeviceH; cdecl;
procedure QClxIODevice_destroy(handle: QClxIODeviceH); cdecl;
procedure QClxIODevice_hook_progress(handle: QClxIODeviceH; hook: QHookH); cdecl;
function QClxLineEdit_create(parent: QWidgetH; name: PAnsiChar): QClxLineEditH; overload; cdecl;
procedure QClxLineEdit_destroy(handle: QClxLineEditH); cdecl;
function QClxLineEdit_create(p1: PWideString; parent: QWidgetH; name: PAnsiChar): QClxLineEditH; overload; cdecl;
procedure QClxLineEdit_text(handle: QClxLineEditH; retval: PWideString); cdecl;
procedure QClxLineEdit_displayText(handle: QClxLineEditH; retval: PWideString); cdecl;
function QClxLineEdit_maxLength(handle: QClxLineEditH): Integer; cdecl;
procedure QClxLineEdit_setMaxLength(handle: QClxLineEditH; p1: Integer); cdecl;
procedure QClxLineEdit_setFrame(handle: QClxLineEditH; p1: Boolean); cdecl;
function QClxLineEdit_frame(handle: QClxLineEditH): Boolean; cdecl;
procedure QClxLineEdit_setEchoMode(handle: QClxLineEditH; p1: QLineEditEchoMode); cdecl;
function QClxLineEdit_echoMode(handle: QClxLineEditH): QLineEditEchoMode; cdecl;
procedure QClxLineEdit_setReadOnly(handle: QClxLineEditH; p1: Boolean); cdecl;
function QClxLineEdit_isReadOnly(handle: QClxLineEditH): Boolean; cdecl;
procedure QClxLineEdit_setValidator(handle: QClxLineEditH; p1: QValidatorH); cdecl;
function QClxLineEdit_validator(handle: QClxLineEditH): QValidatorH; cdecl;
procedure QClxLineEdit_sizeHint(handle: QClxLineEditH; retval: PSize); cdecl;
procedure QClxLineEdit_minimumSizeHint(handle: QClxLineEditH; retval: PSize); cdecl;
procedure QClxLineEdit_sizePolicy(handle: QClxLineEditH; retval: PSizePolicy); cdecl;
procedure QClxLineEdit_setEnabled(handle: QClxLineEditH; p1: Boolean); cdecl;
procedure QClxLineEdit_setFont(handle: QClxLineEditH; p1: QFontH); cdecl;
procedure QClxLineEdit_setPalette(handle: QClxLineEditH; p1: QPaletteH); cdecl;
procedure QClxLineEdit_setSelection(handle: QClxLineEditH; p1: Integer; p2: Integer); cdecl;
procedure QClxLineEdit_setCursorPosition(handle: QClxLineEditH; p1: Integer); cdecl;
function QClxLineEdit_cursorPosition(handle: QClxLineEditH): Integer; cdecl;
function QClxLineEdit_validateAndSet(handle: QClxLineEditH; p1: PWideString; p2: Integer; p3: Integer; p4: Integer): Boolean; cdecl;
procedure QClxLineEdit_cut(handle: QClxLineEditH); cdecl;
procedure QClxLineEdit_copy(handle: QClxLineEditH); cdecl;
procedure QClxLineEdit_paste(handle: QClxLineEditH); cdecl;
procedure QClxLineEdit_setAlignment(handle: QClxLineEditH; flag: Integer); cdecl;
function QClxLineEdit_alignment(handle: QClxLineEditH): Integer; cdecl;
procedure QClxLineEdit_cursorLeft(handle: QClxLineEditH; mark: Boolean; steps: Integer); cdecl;
procedure QClxLineEdit_cursorRight(handle: QClxLineEditH; mark: Boolean; steps: Integer); cdecl;
procedure QClxLineEdit_cursorWordForward(handle: QClxLineEditH; mark: Boolean); cdecl;
procedure QClxLineEdit_cursorWordBackward(handle: QClxLineEditH; mark: Boolean); cdecl;
procedure QClxLineEdit_backspace(handle: QClxLineEditH); cdecl;
procedure QClxLineEdit_del(handle: QClxLineEditH); cdecl;
procedure QClxLineEdit_home(handle: QClxLineEditH; mark: Boolean); cdecl;
procedure QClxLineEdit_end(handle: QClxLineEditH; mark: Boolean); cdecl;
procedure QClxLineEdit_setEdited(handle: QClxLineEditH; p1: Boolean); cdecl;
function QClxLineEdit_edited(handle: QClxLineEditH): Boolean; cdecl;
function QClxLineEdit_hasMarkedText(handle: QClxLineEditH): Boolean; cdecl;
procedure QClxLineEdit_markedText(handle: QClxLineEditH; retval: PWideString); cdecl;
function QClxLineEdit_autoSelect(handle: QClxLineEditH): Boolean; cdecl;
procedure QClxLineEdit_setAutoSelect(handle: QClxLineEditH; value: Boolean); cdecl;
function QClxLineEdit_hideSelection(handle: QClxLineEditH): Boolean; cdecl;
procedure QClxLineEdit_setHideSelection(handle: QClxLineEditH; value: Boolean); cdecl;
procedure QClxLineEdit_clearSelection(handle: QClxLineEditH); cdecl;
procedure QClxLineEdit_doSetSelection(handle: QClxLineEditH; start: Integer; len: Integer); cdecl;
procedure QClxLineEdit_keyReleaseEvent(handle: QClxLineEditH; e: QKeyEventH); cdecl;
procedure QClxLineEdit_resetSelection(handle: QClxLineEditH); cdecl;
function QClxLineEdit_selStart(handle: QClxLineEditH): Integer; cdecl;
procedure QClxLineEdit_setSelStart(handle: QClxLineEditH; pos: Integer); cdecl;
procedure QClxLineEdit_updateSelection(handle: QClxLineEditH); cdecl;
function QClxLineEdit_selLen(handle: QClxLineEditH): Integer; cdecl;
procedure QClxLineEdit_setMarkedText(handle: QClxLineEditH; s: PWideString); cdecl;
procedure QClxLineEdit_setText(handle: QClxLineEditH; p1: PWideString); cdecl;
procedure QClxLineEdit_selectAll(handle: QClxLineEditH); cdecl;
procedure QClxLineEdit_deselect(handle: QClxLineEditH); cdecl;
procedure QClxLineEdit_clearValidator(handle: QClxLineEditH); cdecl;
procedure QClxLineEdit_insert(handle: QClxLineEditH; p1: PWideString); cdecl;
procedure QClxLineEdit_clear(handle: QClxLineEditH); cdecl;
procedure QClxLineEdit_undo(handle: QClxLineEditH); cdecl;
procedure QClxLineEdit_redo(handle: QClxLineEditH); cdecl;
function QClxLineEdit_canUndo(handle: QClxLineEditH): Boolean; cdecl;
function QClxLineEdit_canRedo(handle: QClxLineEditH): Boolean; cdecl;
procedure QClxDrawUtil_ScrollEffect(w: QWidgetH; dir: Cardinal; time: Integer); cdecl;
procedure QClxDrawUtil_FadeEffect(w: QWidgetH; time: Integer); cdecl;
procedure QClxDrawUtil_DrawItem(p: QPainterH; x: Integer; y: Integer; w: Integer; h: Integer; flags: Integer; g: QColorGroupH; enabled: Boolean; pixmap: QPixmapH; text: PWideString; len: Integer; penColor: QColorH); cdecl;
procedure QClxDrawUtil_DrawShadeLine(p: QPainterH; x1: Integer; y1: Integer; x2: Integer; y2: Integer; g: QColorGroupH; sunken: Boolean; lineWidth: Integer; midLineWidth: Integer); overload; cdecl;
procedure QClxDrawUtil_DrawShadeLine(p: QPainterH; p1: PPoint; p2: PPoint; g: QColorGroupH; sunken: Boolean; lineWidth: Integer; midLineWidth: Integer); overload; cdecl;
procedure QClxDrawUtil_DrawShadeRect(p: QPainterH; x: Integer; y: Integer; w: Integer; h: Integer; g: QColorGroupH; sunken: Boolean; lineWidth: Integer; midLineWidth: Integer; fill: QBrushH); overload; cdecl;
procedure QClxDrawUtil_DrawShadeRect(p: QPainterH; r: PRect; g: QColorGroupH; sunken: Boolean; lineWidth: Integer; midLineWidth: Integer; fill: QBrushH); overload; cdecl;
procedure QClxDrawUtil_DrawShadePanel(p: QPainterH; x: Integer; y: Integer; w: Integer; h: Integer; g: QColorGroupH; sunken: Boolean; lineWidth: Integer; fill: QBrushH); overload; cdecl;
procedure QClxDrawUtil_DrawShadePanel(p: QPainterH; r: PRect; g: QColorGroupH; sunken: Boolean; lineWidth: Integer; fill: QBrushH); overload; cdecl;
procedure QClxDrawUtil_DrawWinButton(p: QPainterH; x: Integer; y: Integer; w: Integer; h: Integer; g: QColorGroupH; sunken: Boolean; fill: QBrushH); overload; cdecl;
procedure QClxDrawUtil_DrawWinButton(p: QPainterH; r: PRect; g: QColorGroupH; sunken: Boolean; fill: QBrushH); overload; cdecl;
procedure QClxDrawUtil_DrawWinPanel(p: QPainterH; x: Integer; y: Integer; w: Integer; h: Integer; g: QColorGroupH; sunken: Boolean; fill: QBrushH); overload; cdecl;
procedure QClxDrawUtil_DrawWinPanel(p: QPainterH; r: PRect; g: QColorGroupH; sunken: Boolean; fill: QBrushH); overload; cdecl;
procedure QClxDrawUtil_DrawPlainRect(p: QPainterH; x: Integer; y: Integer; w: Integer; h: Integer; c: QColorH; lineWidth: Integer; fill: QBrushH); overload; cdecl;
procedure QClxDrawUtil_DrawPlainRect(p: QPainterH; r: PRect; c: QColorH; lineWidth: Integer; fill: QBrushH); overload; cdecl;
function QOpenWidget_event(handle: QOpenWidgetH; e: QEventH): Boolean; cdecl;
procedure QOpenWidget_mousePressEvent(handle: QOpenWidgetH; e: QMouseEventH); cdecl;
procedure QOpenWidget_mouseReleaseEvent(handle: QOpenWidgetH; e: QMouseEventH); cdecl;
procedure QOpenWidget_mouseDoubleClickEvent(handle: QOpenWidgetH; e: QMouseEventH); cdecl;
procedure QOpenWidget_mouseMoveEvent(handle: QOpenWidgetH; e: QMouseEventH); cdecl;
procedure QOpenWidget_wheelEvent(handle: QOpenWidgetH; e: QWheelEventH); cdecl;
procedure QOpenWidget_keyPressEvent(handle: QOpenWidgetH; e: QKeyEventH); cdecl;
procedure QOpenWidget_keyReleaseEvent(handle: QOpenWidgetH; e: QKeyEventH); cdecl;
procedure QOpenWidget_focusInEvent(handle: QOpenWidgetH; e: QFocusEventH); cdecl;
procedure QOpenWidget_focusOutEvent(handle: QOpenWidgetH; e: QFocusEventH); cdecl;
procedure QOpenWidget_enterEvent(handle: QOpenWidgetH; e: QEventH); cdecl;
procedure QOpenWidget_leaveEvent(handle: QOpenWidgetH; e: QEventH); cdecl;
procedure QOpenWidget_paintEvent(handle: QOpenWidgetH; e: QPaintEventH); cdecl;
procedure QOpenWidget_moveEvent(handle: QOpenWidgetH; e: QMoveEventH); cdecl;
procedure QOpenWidget_resizeEvent(handle: QOpenWidgetH; e: QResizeEventH); cdecl;
procedure QOpenWidget_closeEvent(handle: QOpenWidgetH; e: QCloseEventH); cdecl;
procedure QOpenWidget_dragEnterEvent(handle: QOpenWidgetH; e: QDragEnterEventH); cdecl;
procedure QOpenWidget_dragMoveEvent(handle: QOpenWidgetH; e: QDragMoveEventH); cdecl;
procedure QOpenWidget_dragLeaveEvent(handle: QOpenWidgetH; e: QDragLeaveEventH); cdecl;
procedure QOpenWidget_dropEvent(handle: QOpenWidgetH; e: QDropEventH); cdecl;
procedure QOpenWidget_showEvent(handle: QOpenWidgetH; e: QShowEventH); cdecl;
procedure QOpenWidget_hideEvent(handle: QOpenWidgetH; e: QHideEventH); cdecl;
procedure QOpenWidget_customEvent(handle: QOpenWidgetH; e: QCustomEventH); cdecl;
function QOpenWidget_getWState(handle: QOpenWidgetH): Cardinal; cdecl;
procedure QOpenWidget_setWState(handle: QOpenWidgetH; n: Cardinal); cdecl;
procedure QOpenWidget_clearWState(handle: QOpenWidgetH; n: Cardinal); cdecl;
function QOpenWidget_getWFlags(handle: QOpenWidgetH): WFlags; cdecl;
procedure QOpenWidget_setWFlags(handle: QOpenWidgetH; n: WFlags); cdecl;
procedure QOpenWidget_clearWFlags(handle: QOpenWidgetH; n: WFlags); cdecl;
function QOpenWidget_focusNextPrevChild(handle: QOpenWidgetH; next: Boolean): Boolean; cdecl;
procedure QOpenWidget_updateMask(handle: QOpenWidgetH); cdecl;
function QOpenStringList_count(handle: QOpenStringListH): Integer; cdecl;
procedure QOpenStringList_value(handle: QOpenStringListH; retval: PWideString; index: Integer); cdecl;
procedure QOpenStringList_append(handle: QOpenStringListH; value: PWideString); cdecl;
function QClxListBoxHooks_create(): QClxListBoxHooksH; cdecl;
procedure QClxListBoxHooks_destroy(handle: QClxListBoxHooksH); cdecl;
procedure QClxListBoxHooks_hook_paint(handle: QClxListBoxHooksH; paintHook: QHookH); cdecl;
procedure QClxListBoxHooks_hook_measure(handle: QClxListBoxHooksH; measureHook: QHookH); cdecl;
function QClxListBoxItem_create(text: PWideString; listBox_hooks: QClxListBoxHooksH; d: Pointer): QClxListBoxItemH; cdecl;
procedure QClxListBoxItem_destroy(handle: QClxListBoxItemH); cdecl;
function QClxListBoxItem_width(handle: QClxListBoxItemH; lb: QListBoxH): Integer; cdecl;
function QClxListBoxItem_height(handle: QClxListBoxItemH; lb: QListBoxH): Integer; cdecl;
function QClxListBoxItem_getData(handle: QClxListBoxItemH): Pointer; cdecl;
procedure QClxListBoxItem_setData(handle: QClxListBoxItemH; d: Pointer); cdecl;
procedure QClxListBoxItem_setCustomHighlighting(handle: QClxListBoxItemH; value: Boolean); cdecl;
function QClxListViewHooks_create(): QClxListViewHooksH; cdecl;
procedure QClxListViewHooks_destroy(handle: QClxListViewHooksH); cdecl;
procedure QClxListViewHooks_hook_PaintCell(handle: QClxListViewHooksH; h: QHookH); cdecl;
procedure QClxListViewHooks_hook_PaintBranches(handle: QClxListViewHooksH; h: QHookH); cdecl;
procedure QClxListViewHooks_hook_setSelected(handle: QClxListViewHooksH; h: QHookH); cdecl;
procedure QClxListViewHooks_hook_change(handle: QClxListViewHooksH; h: QHookH); cdecl;
procedure QClxListViewHooks_hook_changing(handle: QClxListViewHooksH; h: QHookH); cdecl;
procedure QClxListViewHooks_hook_expanding(handle: QClxListViewHooksH; h: QHookH); cdecl;
procedure QClxListViewHooks_hook_expanded(handle: QClxListViewHooksH; h: QHookH); cdecl;
procedure QClxListViewHooks_hook_checked(handle: QClxListViewHooksH; h: QHookH); cdecl;
procedure QClxListViewHooks_hook_destroyed(handle: QClxListViewHooksH; h: QHookH); cdecl;
procedure QClxListViewItem_paintCell(handle: QClxListViewItemH; p: QPainterH; cg: QColorGroupH; column: Integer; width: Integer; alignment: Integer); cdecl;
procedure QClxListViewItem_paintBranches(handle: QClxListViewItemH; p: QPainterH; cg: QColorGroupH; w: Integer; y: Integer; h: Integer; s: GUIStyle); cdecl;
function QClxListViewItem_create(parent: QListViewH; owner: Pointer; after: QListViewItemH; h: QClxListViewHooksH): QClxListViewItemH; overload; cdecl;
procedure QClxListViewItem_destroy(handle: QClxListViewItemH); cdecl;
function QClxListViewItem_create(parent: QListViewItemH; owner: Pointer; after: QListViewItemH; h: QClxListViewHooksH): QClxListViewItemH; overload; cdecl;
function QClxListViewItem_ClxRef(handle: QClxListViewItemH): Pointer; cdecl;
function QClxCheckListItem_create(parent: QListViewH; text: PWideString; t: QCheckListItemType; h: QClxListViewHooksH): QClxCheckListItemH; overload; cdecl;
procedure QClxCheckListItem_destroy(handle: QClxCheckListItemH); cdecl;
function QClxCheckListItem_create(parent: QListViewItemH; text: PWideString; t: QCheckListItemType; h: QClxListViewHooksH): QClxCheckListItemH; overload; cdecl;
function QClxIconViewHooks_create(): QClxIconViewHooksH; cdecl;
procedure QClxIconViewHooks_destroy(handle: QClxIconViewHooksH); cdecl;
procedure QClxIconViewHooks_hook_PaintItem(handle: QClxIconViewHooksH; h: QHookH); cdecl;
procedure QClxIconViewHooks_hook_PaintFocus(handle: QClxIconViewHooksH; h: QHookH); cdecl;
procedure QClxIconViewHooks_hook_setSelected(handle: QClxIconViewHooksH; h: QHookH); cdecl;
procedure QClxIconViewHooks_hook_change(handle: QClxIconViewHooksH; h: QHookH); cdecl;
procedure QClxIconViewHooks_hook_changing(handle: QClxIconViewHooksH; h: QHookH); cdecl;
procedure QClxIconViewHooks_hook_destroyed(handle: QClxIconViewHooksH; h: QHookH); cdecl;
function QClxIconViewItem_ClxRef(handle: QClxIconViewItemH): Pointer; cdecl;
procedure QClxIconViewItem_paintItem(handle: QClxIconViewItemH; p: QPainterH; cg: QColorGroupH); cdecl;
function QClxIconViewItem_create(parent: QIconViewH; owner: Pointer; h: QClxIconViewHooksH): QClxIconViewItemH; overload; cdecl;
procedure QClxIconViewItem_destroy(handle: QClxIconViewItemH); cdecl;
function QClxIconViewItem_create(parent: QIconViewH; owner: Pointer; after: QIconViewItemH; h: QClxIconViewHooksH): QClxIconViewItemH; overload; cdecl;
function QClxDragObject_create(dragSource: QWidgetH; name: PAnsiChar): QClxDragObjectH; cdecl;
procedure QClxDragObject_destroy(handle: QClxDragObjectH); cdecl;
function QClxDragObject_format(handle: QClxDragObjectH; n: Integer): PAnsiChar; cdecl;
procedure QClxDragObject_encodedData(handle: QClxDragObjectH; retval: QByteArrayH; format: PAnsiChar); cdecl;
function QClxDragObject_provides(handle: QClxDragObjectH; mimeType: PAnsiChar): Boolean; cdecl;
procedure QClxDragObject_addFormat(handle: QClxDragObjectH; format: PAnsiChar; ByteArray: QByteArrayH); cdecl;
function QOpenComboBox_create(parent: QWidgetH; name: PAnsiChar): QOpenComboBoxH; overload; cdecl;
procedure QOpenComboBox_destroy(handle: QOpenComboBoxH); cdecl;
function QOpenComboBox_create(rw: Boolean; parent: QWidgetH; name: PAnsiChar): QOpenComboBoxH; overload; cdecl;
procedure QOpenComboBox_popup(handle: QOpenComboBoxH); cdecl;
function QClxBitBtn_create(parent: QWidgetH; name: PAnsiChar; paintCB: QHookH): QClxBitBtnH; cdecl;
procedure QClxBitBtn_destroy(handle: QClxBitBtnH); cdecl;
function QClxMimeSource_create(): QClxMimeSourceH; overload; cdecl;
procedure QClxMimeSource_destroy(handle: QClxMimeSourceH); cdecl;
function QClxMimeSource_create(source: QMimeSourceH): QClxMimeSourceH; overload; cdecl;
function QClxMimeSource_format(handle: QClxMimeSourceH; n: Integer): PAnsiChar; cdecl;
procedure QClxMimeSource_encodedData(handle: QClxMimeSourceH; retval: QByteArrayH; format: PAnsiChar); cdecl;
function QClxMimeSource_provides(handle: QClxMimeSourceH; mimeType: PAnsiChar): Boolean; cdecl;
procedure QClxMimeSource_addFormat(handle: QClxMimeSourceH; format: PAnsiChar; ByteArray: QByteArrayH); cdecl;
function QClxMimeSourceFactory_create(): QClxMimeSourceFactoryH; cdecl;
procedure QClxMimeSourceFactory_destroy(handle: QClxMimeSourceFactoryH); cdecl;
procedure QClxMimeSourceFactory_setDataCallBack(handle: QClxMimeSourceFactoryH; hook: QHookH); cdecl;
function QClxMimeSourceFactory_data(handle: QClxMimeSourceFactoryH; abs_name: PWideString): QMimeSourceH; cdecl;
function QClxSlider_create(parent: QWidgetH; name: PAnsiChar; drawTickCB: QHookH): QClxSliderH; cdecl;
procedure QClxSlider_destroy(handle: QClxSliderH); cdecl;
procedure QClxSlider_drawTicks(handle: QClxSliderH; p: QPainterH; cg: QColorGroupH; dist: Integer; w: Integer; i: Integer); cdecl;
function QClxStyleHooks_create(): QClxStyleHooksH; cdecl;
procedure QClxStyleHooks_destroy(handle: QClxStyleHooksH); cdecl;
procedure QClxStyleHooks_hook_polish(handle: QClxStyleHooksH; hook: QHookH); cdecl;
procedure QClxStyleHooks_hook_unPolish(handle: QClxStyleHooksH; hook: QHookH); cdecl;
procedure QClxStyleHooks_hook_polish2(handle: QClxStyleHooksH; hook: QHookH); cdecl;
procedure QClxStyleHooks_hook_unPolish2(handle: QClxStyleHooksH; hook: QHookH); cdecl;
procedure QClxStyleHooks_hook_polish3(handle: QClxStyleHooksH; hook: QHookH); cdecl;
procedure QClxStyleHooks_hook_itemRect(handle: QClxStyleHooksH; hook: QHookH); cdecl;
procedure QClxStyleHooks_hook_drawItem(handle: QClxStyleHooksH; hook: QHookH); cdecl;
procedure QClxStyleHooks_hook_drawSeparator(handle: QClxStyleHooksH; hook: QHookH); cdecl;
procedure QClxStyleHooks_hook_drawRect(handle: QClxStyleHooksH; hook: QHookH); cdecl;
procedure QClxStyleHooks_hook_drawRectStrong(handle: QClxStyleHooksH; hook: QHookH); cdecl;
procedure QClxStyleHooks_hook_drawButton(handle: QClxStyleHooksH; hook: QHookH); cdecl;
procedure QClxStyleHooks_hook_buttonRect(handle: QClxStyleHooksH; hook: QHookH); cdecl;
procedure QClxStyleHooks_hook_drawButtonMask(handle: QClxStyleHooksH; hook: QHookH); cdecl;
procedure QClxStyleHooks_hook_drawBevelButton(handle: QClxStyleHooksH; hook: QHookH); cdecl;
procedure QClxStyleHooks_hook_bevelButtonRect(handle: QClxStyleHooksH; hook: QHookH); cdecl;
procedure QClxStyleHooks_hook_drawToolButton(handle: QClxStyleHooksH; hook: QHookH); cdecl;
procedure QClxStyleHooks_hook_drawToolButton2(handle: QClxStyleHooksH; hook: QHookH); cdecl;
procedure QClxStyleHooks_hook_toolButtonRect(handle: QClxStyleHooksH; hook: QHookH); cdecl;
procedure QClxStyleHooks_hook_drawPanel(handle: QClxStyleHooksH; hook: QHookH); cdecl;
procedure QClxStyleHooks_hook_drawPopupPanel(handle: QClxStyleHooksH; hook: QHookH); cdecl;
procedure QClxStyleHooks_hook_drawArrow(handle: QClxStyleHooksH; hook: QHookH); cdecl;
procedure QClxStyleHooks_hook_drawExclusiveIndicator(handle: QClxStyleHooksH; hook: QHookH); cdecl;
procedure QClxStyleHooks_hook_drawExclusiveIndicatorMask(handle: QClxStyleHooksH; hook: QHookH); cdecl;
procedure QClxStyleHooks_hook_drawIndicatorMask(handle: QClxStyleHooksH; hook: QHookH); cdecl;
procedure QClxStyleHooks_hook_drawIndicator(handle: QClxStyleHooksH; hook: QHookH); cdecl;
procedure QClxStyleHooks_hook_drawFocusRect(handle: QClxStyleHooksH; hook: QHookH); cdecl;
procedure QClxStyleHooks_hook_drawComboButton(handle: QClxStyleHooksH; hook: QHookH); cdecl;
procedure QClxStyleHooks_hook_comboButtonRect(handle: QClxStyleHooksH; hook: QHookH); cdecl;
procedure QClxStyleHooks_hook_comboButtonFocusRect(handle: QClxStyleHooksH; hook: QHookH); cdecl;
procedure QClxStyleHooks_hook_drawComboButtonMask(handle: QClxStyleHooksH; hook: QHookH); cdecl;
procedure QClxStyleHooks_hook_drawPushButton(handle: QClxStyleHooksH; hook: QHookH); cdecl;
procedure QClxStyleHooks_hook_drawPushButtonLabel(handle: QClxStyleHooksH; hook: QHookH); cdecl;
procedure QClxStyleHooks_hook_pushButtonContentsRect(handle: QClxStyleHooksH; hook: QHookH); cdecl;
procedure QClxStyleHooks_hook_tabbarMetrics(handle: QClxStyleHooksH; hook: QHookH); cdecl;
procedure QClxStyleHooks_hook_drawTab(handle: QClxStyleHooksH; hook: QHookH); cdecl;
procedure QClxStyleHooks_hook_drawTabMask(handle: QClxStyleHooksH; hook: QHookH); cdecl;
procedure QClxStyleHooks_hook_scrollBarMetrics(handle: QClxStyleHooksH; hook: QHookH); cdecl;
procedure QClxStyleHooks_hook_drawScrollBarControls(handle: QClxStyleHooksH; hook: QHookH); cdecl;
procedure QClxStyleHooks_hook_drawSlider(handle: QClxStyleHooksH; hook: QHookH); cdecl;
procedure QClxStyleHooks_hook_drawSliderMask(handle: QClxStyleHooksH; hook: QHookH); cdecl;
procedure QClxStyleHooks_hook_drawSliderGroove(handle: QClxStyleHooksH; hook: QHookH); cdecl;
procedure QClxStyleHooks_hook_drawSliderGrooveMask(handle: QClxStyleHooksH; hook: QHookH); cdecl;
procedure QClxStyleHooks_hook_drawSplitter(handle: QClxStyleHooksH; hook: QHookH); cdecl;
procedure QClxStyleHooks_hook_drawCheckMark(handle: QClxStyleHooksH; hook: QHookH); cdecl;
procedure QClxStyleHooks_hook_polishPopupMenu(handle: QClxStyleHooksH; hook: QHookH); cdecl;
procedure QClxStyleHooks_hook_extraPopupMenuItemWidth(handle: QClxStyleHooksH; hook: QHookH); cdecl;
procedure QClxStyleHooks_hook_popupSubmenuIndicatorWidth(handle: QClxStyleHooksH; hook: QHookH); cdecl;
procedure QClxStyleHooks_hook_popupMenuItemHeight(handle: QClxStyleHooksH; hook: QHookH); cdecl;
procedure QClxStyleHooks_hook_drawPopupMenuItem(handle: QClxStyleHooksH; hook: QHookH); cdecl;
procedure QClxStyleHooks_hook_StyleDestroyed(handle: QClxStyleHooksH; hook: QHookH); cdecl;
procedure QClxStyle_init(handle: QClxStyleH); cdecl;
function QClxStyle_create(aStyle: QStyleH; h: QClxStyleHooksH): QClxStyleH; overload; cdecl;
procedure QClxStyle_destroy(handle: QClxStyleH); cdecl;
function QClxStyle_create(styleName: PWideString; h: QClxStyleHooksH): QClxStyleH; overload; cdecl;
procedure QClxStyle_refresh(handle: QClxStyleH); cdecl;
function QClxStyle_defaultFrameWidth(handle: QClxStyleH): Integer; cdecl;
procedure QClxStyle_setDefaultFrameWidth(handle: QClxStyleH; Val: Integer); cdecl;
function QClxStyle_sliderLength(handle: QClxStyleH): Integer; cdecl;
procedure QClxStyle_setSliderLength(handle: QClxStyleH; Val: Integer); cdecl;
function QClxStyle_maximumSliderDragDistance(handle: QClxStyleH): Integer; cdecl;
procedure QClxStyle_setMaximumSliderDragDistance(handle: QClxStyleH; Val: Integer); cdecl;
function QClxStyle_splitterWidth(handle: QClxStyleH): Integer; cdecl;
procedure QClxStyle_setSplitterWidth(handle: QClxStyleH; Val: Integer); cdecl;
procedure QClxStyle_scrollBarExtent(handle: QClxStyleH; retval: PSize); cdecl;
procedure QClxStyle_setScrollBarExtent(handle: QClxStyleH; Val: PSize); cdecl;
procedure QClxStyle_indicatorSize(handle: QClxStyleH; retval: PSize); cdecl;
procedure QClxStyle_setIndicatorSize(handle: QClxStyleH; Val: PSize); cdecl;
procedure QClxStyle_exclusiveIndicatorSize(handle: QClxStyleH; retval: PSize); cdecl;
procedure QClxStyle_setExclusiveIndicatorSize(handle: QClxStyleH; Val: PSize); cdecl;
procedure QClxStyle_buttonShift(handle: QClxStyleH; x: PInteger; y: PInteger); cdecl;
procedure QClxStyle_setButtonShift(handle: QClxStyleH; x: Integer; y: Integer); cdecl;
procedure QClxStyle_scrollBarMetrics(handle: QClxStyleH; p1: QScrollBarH; p2: PInteger; p3: PInteger; p4: PInteger; p5: PInteger); cdecl;
procedure QClxStyle_tabbarMetrics(handle: QClxStyleH; p1: QTabBarH; p2: PInteger; p3: PInteger; p4: PInteger); cdecl;
function QClxSpinBox_create(parent: QWidgetH; name: PAnsiChar): QClxSpinBoxH; overload; cdecl;
procedure QClxSpinBox_destroy(handle: QClxSpinBoxH); cdecl;
function QClxSpinBox_create(minValue: Integer; maxValue: Integer; step: Integer; parent: QWidgetH; name: PAnsiChar): QClxSpinBoxH; overload; cdecl;
function QClxSpinBox_upButton(handle: QClxSpinBoxH): QPushButtonH; cdecl;
function QClxSpinBox_downButton(handle: QClxSpinBoxH): QPushButtonH; cdecl;
function QClxSpinBox_editor(handle: QClxSpinBoxH): QLineEditH; cdecl;
function QOpenScrollView_create(scrollBarGeometry_hook: QHookH; parent: QWidgetH; name: PAnsiChar; f: WFlags): QOpenScrollViewH; cdecl;
procedure QOpenScrollView_destroy(handle: QOpenScrollViewH); cdecl;
procedure QOpenScrollView_resizeContents(handle: QOpenScrollViewH; w: Integer; h: Integer); cdecl;
procedure QOpenScrollView_setVBarGeometry(handle: QOpenScrollViewH; vbar: QScrollBarH; x: Integer; y: Integer; w: Integer; h: Integer); cdecl;
procedure QOpenScrollView_setHBarGeometry(handle: QOpenScrollViewH; hbar: QScrollBarH; x: Integer; y: Integer; w: Integer; h: Integer); cdecl;
procedure QOpenScrollView_getScrollBarGeometry(handle: QOpenScrollViewH; sb: QScrollBarH; x: PInteger; y: PInteger; w: PInteger; h: PInteger); cdecl;
procedure QOpenScrollView_setMargins(handle: QOpenScrollViewH; left: Integer; top: Integer; right: Integer; bottom: Integer); cdecl;
function QOpenScrollView_leftMargin(handle: QOpenScrollViewH): Integer; cdecl;
function QOpenScrollView_topMargin(handle: QOpenScrollViewH): Integer; cdecl;
function QOpenScrollView_rightMargin(handle: QOpenScrollViewH): Integer; cdecl;
function QOpenScrollView_bottomMargin(handle: QOpenScrollViewH): Integer; cdecl;
procedure QClxDesign_setDesignOptions(); cdecl;
function QOpenMultiLineEdit_create(parent: QWidgetH; name: PAnsiChar): QOpenMultiLineEditH; cdecl;
procedure QOpenMultiLineEdit_destroy(handle: QOpenMultiLineEditH); cdecl;
function QOpenMultiLineEdit_hasMarkedText(handle: QOpenMultiLineEditH): Boolean; cdecl;
procedure QOpenMultiLineEdit_markedText(handle: QOpenMultiLineEditH; retval: PWideString); cdecl;
function QOpenMultiLineEdit_textWidth(handle: QOpenMultiLineEditH; i: Integer): Integer; overload; cdecl;
function QOpenMultiLineEdit_textWidth(handle: QOpenMultiLineEditH; text: PWideString): Integer; overload; cdecl;
procedure QOpenMultiLineEdit_cursorPoint(handle: QOpenMultiLineEditH; retval: PPoint); cdecl;
procedure QOpenMultiLineEdit_insert(handle: QOpenMultiLineEditH; text: PWideString; mark: Boolean); cdecl;
procedure QOpenMultiLineEdit_newLine(handle: QOpenMultiLineEditH); cdecl;
procedure QOpenMultiLineEdit_killLine(handle: QOpenMultiLineEditH); cdecl;
procedure QOpenMultiLineEdit_pageUp(handle: QOpenMultiLineEditH; mark: Boolean); cdecl;
procedure QOpenMultiLineEdit_pageDown(handle: QOpenMultiLineEditH; mark: Boolean); cdecl;
procedure QOpenMultiLineEdit_cursorLeft(handle: QOpenMultiLineEditH; mark: Boolean; wrap: Boolean); cdecl;
procedure QOpenMultiLineEdit_cursorRight(handle: QOpenMultiLineEditH; mark: Boolean; wrap: Boolean); cdecl;
procedure QOpenMultiLineEdit_cursorUp(handle: QOpenMultiLineEditH; mark: Boolean); cdecl;
procedure QOpenMultiLineEdit_cursorDown(handle: QOpenMultiLineEditH; mark: Boolean); cdecl;
procedure QOpenMultiLineEdit_backspace(handle: QOpenMultiLineEditH); cdecl;
procedure QOpenMultiLineEdit_del(handle: QOpenMultiLineEditH); cdecl;
procedure QOpenMultiLineEdit_home(handle: QOpenMultiLineEditH; mark: Boolean); cdecl;
procedure QOpenMultiLineEdit_end(handle: QOpenMultiLineEditH; mark: Boolean); cdecl;
function QOpenMultiLineEdit_getMarkedRegion(handle: QOpenMultiLineEditH; line1: PInteger; col1: PInteger; line2: PInteger; col2: PInteger): Boolean; cdecl;
function QOpenMultiLineEdit_lineLength(handle: QOpenMultiLineEditH; row: Integer): Integer; cdecl;
function QOpenMultiLineEdit_getString(handle: QOpenMultiLineEditH; row: Integer): PAnsiChar; cdecl;
procedure QOpenMultiLineEdit_stringShown(handle: QOpenMultiLineEditH; retval: PWideString; row: Integer); cdecl;
function QOpenMultiLineEdit_textLength(handle: QOpenMultiLineEditH): Integer; cdecl;
function QOpenMultiLineEdit_isEndOfParagraph(handle: QOpenMultiLineEditH; row: Integer): Boolean; cdecl;
procedure QOpenMultiLineEdit_getText(handle: QOpenMultiLineEditH; retval: PWideString); cdecl;
function QOpenMultiLineEdit_search(handle: QOpenMultiLineEditH; text: PWideString; line: Integer; col: Integer; caseSens: Boolean; highlight: Boolean; wholeword: Boolean; useRegExp: Boolean): Integer; cdecl;
function QOpenMultiLineEdit_tabStopDist(handle: QOpenMultiLineEditH; fm: QFontMetricsH): Integer; cdecl;
function QOpenMultiLineEdit_textWidthWithTabs(handle: QOpenMultiLineEditH; fm: QFontMetricsH; s: PWideString; start: Cardinal; nChars: Cardinal; align: Integer): Integer; cdecl;
function QOpenMultiLineEdit_xPosToCursorPos(handle: QOpenMultiLineEditH; s: PWideString; fm: QFontMetricsH; xPos: Integer; width: Integer; align: Integer): Integer; cdecl;
procedure QOpenMultiLineEdit_pixelPosToCursorPos(handle: QOpenMultiLineEditH; p: PPoint; x: PInteger; y: PInteger); cdecl;
function QOpenMultiLineEdit_tableFlags(handle: QOpenMultiLineEditH): Cardinal; cdecl;
function QOpenMultiLineEdit_testTableFlags(handle: QOpenMultiLineEditH; f: Cardinal): Boolean; cdecl;
procedure QOpenMultiLineEdit_setTableFlags(handle: QOpenMultiLineEditH; f: Cardinal); cdecl;
procedure QOpenMultiLineEdit_clearTableFlags(handle: QOpenMultiLineEditH; f: Cardinal); cdecl;
function QOpenTableView_numRows(handle: QOpenTableViewH): Integer; cdecl;
procedure QOpenTableView_setNumRows(handle: QOpenTableViewH; r: Integer); cdecl;
function QOpenTableView_numCols(handle: QOpenTableViewH): Integer; cdecl;
procedure QOpenTableView_setNumCols(handle: QOpenTableViewH; c: Integer); cdecl;
function QOpenTableView_topCell(handle: QOpenTableViewH): Integer; cdecl;
procedure QOpenTableView_setTopCell(handle: QOpenTableViewH; row: Integer); cdecl;
function QOpenTableView_leftCell(handle: QOpenTableViewH): Integer; cdecl;
procedure QOpenTableView_setLeftCell(handle: QOpenTableViewH; col: Integer); cdecl;
procedure QOpenTableView_setTopLeftCell(handle: QOpenTableViewH; row: Integer; col: Integer); cdecl;
function QOpenTableView_xOffset(handle: QOpenTableViewH): Integer; cdecl;
procedure QOpenTableView_setXOffset(handle: QOpenTableViewH; xofs: Integer); cdecl;
function QOpenTableView_yOffset(handle: QOpenTableViewH): Integer; cdecl;
procedure QOpenTableView_setYOffset(handle: QOpenTableViewH; yofs: Integer); cdecl;
procedure QOpenTableView_setOffset(handle: QOpenTableViewH; x: Integer; y: Integer; updateScrBars: Boolean); cdecl;
function QOpenTableView_cellWidth(handle: QOpenTableViewH; col: Integer): Integer; overload; cdecl;
function QOpenTableView_cellHeight(handle: QOpenTableViewH; row: Integer): Integer; overload; cdecl;
function QOpenTableView_cellWidth(handle: QOpenTableViewH): Integer; overload; cdecl;
function QOpenTableView_cellHeight(handle: QOpenTableViewH): Integer; overload; cdecl;
procedure QOpenTableView_setCellWidth(handle: QOpenTableViewH; w: Integer); cdecl;
procedure QOpenTableView_setCellHeight(handle: QOpenTableViewH; h: Integer); cdecl;
function QOpenTableView_totalWidth(handle: QOpenTableViewH): Integer; cdecl;
function QOpenTableView_totalHeight(handle: QOpenTableViewH): Integer; cdecl;
function QOpenTableView_tableFlags(handle: QOpenTableViewH): Cardinal; cdecl;
function QOpenTableView_testTableFlags(handle: QOpenTableViewH; f: Cardinal): Boolean; cdecl;
procedure QOpenTableView_setTableFlags(handle: QOpenTableViewH; f: Cardinal); cdecl;
procedure QOpenTableView_clearTableFlags(handle: QOpenTableViewH; f: Cardinal); cdecl;
function QOpenTableView_autoUpdate(handle: QOpenTableViewH): Boolean; cdecl;
procedure QOpenTableView_setAutoUpdate(handle: QOpenTableViewH; b: Boolean); cdecl;
procedure QOpenTableView_updateCell(handle: QOpenTableViewH; row: Integer; column: Integer; erase: Boolean); cdecl;
procedure QOpenTableView_cellUpdateRect(handle: QOpenTableViewH; retval: PRect); cdecl;
procedure QOpenTableView_viewRect(handle: QOpenTableViewH; retval: PRect); cdecl;
function QOpenTableView_lastRowVisible(handle: QOpenTableViewH): Integer; cdecl;
function QOpenTableView_lastColVisible(handle: QOpenTableViewH): Integer; cdecl;
function QOpenTableView_rowIsVisible(handle: QOpenTableViewH; row: Integer): Boolean; cdecl;
function QOpenTableView_colIsVisible(handle: QOpenTableViewH; col: Integer): Boolean; cdecl;
function QOpenTableView_verticalScrollBar(handle: QOpenTableViewH): QScrollBarH; cdecl;
function QOpenTableView_horizontalScrollBar(handle: QOpenTableViewH): QScrollBarH; cdecl;
procedure QOpenTableView_scroll(handle: QOpenTableViewH; xPixels: Integer; yPixels: Integer); cdecl;
procedure QOpenTableView_updateScrollBars(handle: QOpenTableViewH); cdecl;
procedure QOpenTableView_updateTableSize(handle: QOpenTableViewH); cdecl;
function QOpenTableView_findRow(handle: QOpenTableViewH; yPos: Integer): Integer; cdecl;
function QOpenTableView_findCol(handle: QOpenTableViewH; xPos: Integer): Integer; cdecl;
function QOpenTableView_rowYPos(handle: QOpenTableViewH; row: Integer; yPos: PInteger): Boolean; cdecl;
function QOpenTableView_colXPos(handle: QOpenTableViewH; col: Integer; xPos: PInteger): Boolean; cdecl;
function QOpenPainter_getHDC(p: QPainterH): HDC; cdecl;
function QOpenPainter_getPen(p: QPainterH): HPEN; cdecl;
function QOpenPainter_getHBrush(p: QPainterH): HBRUSH; cdecl;
function QOpenPainter_getFont(p: QPainterH): HFONT; cdecl;
function QOpenPainter_getBrushBitmap(p: QPainterH): HBITMAP; cdecl;
function QOpenPainter_getPalette(p: QPainterH): HPALETTE; cdecl;
type
QObject_destroyed_Event = procedure () of object cdecl;
type
QApplication_lastWindowClosed_Event = procedure () of object cdecl;
QApplication_aboutToQuit_Event = procedure () of object cdecl;
QApplication_guiThreadAwake_Event = procedure () of object cdecl;
type
QButton_pressed_Event = procedure () of object cdecl;
QButton_released_Event = procedure () of object cdecl;
QButton_clicked_Event = procedure () of object cdecl;
QButton_toggled_Event = procedure (p1: Boolean) of object cdecl;
QButton_stateChanged_Event = procedure (p1: Integer) of object cdecl;
type
QComboBox_activated_Event = procedure (index: Integer) of object cdecl;
QComboBox_highlighted_Event = procedure (index: Integer) of object cdecl;
QComboBox_activated2_Event = procedure (p1: PWideString) of object cdecl;
QComboBox_highlighted2_Event = procedure (p1: PWideString) of object cdecl;
QComboBox_textChanged_Event = procedure (p1: PWideString) of object cdecl;
type
QIconView_selectionChanged_Event = procedure () of object cdecl;
QIconView_selectionChanged2_Event = procedure (item: QIconViewItemH) of object cdecl;
QIconView_currentChanged_Event = procedure (item: QIconViewItemH) of object cdecl;
QIconView_clicked_Event = procedure (p1: QIconViewItemH) of object cdecl;
QIconView_clicked2_Event = procedure (p1: QIconViewItemH; p2: PPoint) of object cdecl;
QIconView_pressed_Event = procedure (p1: QIconViewItemH) of object cdecl;
QIconView_pressed2_Event = procedure (p1: QIconViewItemH; p2: PPoint) of object cdecl;
QIconView_doubleClicked_Event = procedure (item: QIconViewItemH) of object cdecl;
QIconView_returnPressed_Event = procedure (item: QIconViewItemH) of object cdecl;
QIconView_rightButtonClicked_Event = procedure (item: QIconViewItemH; pos: PPoint) of object cdecl;
QIconView_rightButtonPressed_Event = procedure (item: QIconViewItemH; pos: PPoint) of object cdecl;
QIconView_mouseButtonPressed_Event = procedure (button: Integer; item: QIconViewItemH; pos: PPoint) of object cdecl;
QIconView_mouseButtonClicked_Event = procedure (button: Integer; item: QIconViewItemH; pos: PPoint) of object cdecl;
QIconView_dropped_Event = procedure (e: QDropEventH; lst: Pointer) of object cdecl;
QIconView_moved_Event = procedure () of object cdecl;
QIconView_onItem_Event = procedure (item: QIconViewItemH) of object cdecl;
QIconView_onViewport_Event = procedure () of object cdecl;
QIconView_itemRenamed_Event = procedure (item: QIconViewItemH; p2: PWideString) of object cdecl;
QIconView_itemRenamed2_Event = procedure (item: QIconViewItemH) of object cdecl;
type
QLCDNumber_overflow_Event = procedure () of object cdecl;
type
QLineEdit_textChanged_Event = procedure (p1: PWideString) of object cdecl;
QLineEdit_returnPressed_Event = procedure () of object cdecl;
type
QListBox_highlighted_Event = procedure (index: Integer) of object cdecl;
QListBox_selected_Event = procedure (index: Integer) of object cdecl;
QListBox_highlighted2_Event = procedure (p1: PWideString) of object cdecl;
QListBox_selected2_Event = procedure (p1: PWideString) of object cdecl;
QListBox_highlighted3_Event = procedure (p1: QListBoxItemH) of object cdecl;
QListBox_selected3_Event = procedure (p1: QListBoxItemH) of object cdecl;
QListBox_selectionChanged_Event = procedure () of object cdecl;
QListBox_selectionChanged2_Event = procedure (p1: QListBoxItemH) of object cdecl;
QListBox_currentChanged_Event = procedure (p1: QListBoxItemH) of object cdecl;
QListBox_clicked_Event = procedure (p1: QListBoxItemH) of object cdecl;
QListBox_clicked2_Event = procedure (p1: QListBoxItemH; p2: PPoint) of object cdecl;
QListBox_pressed_Event = procedure (p1: QListBoxItemH) of object cdecl;
QListBox_pressed2_Event = procedure (p1: QListBoxItemH; p2: PPoint) of object cdecl;
QListBox_doubleClicked_Event = procedure (p1: QListBoxItemH) of object cdecl;
QListBox_returnPressed_Event = procedure (p1: QListBoxItemH) of object cdecl;
QListBox_rightButtonClicked_Event = procedure (p1: QListBoxItemH; p2: PPoint) of object cdecl;
QListBox_rightButtonPressed_Event = procedure (p1: QListBoxItemH; p2: PPoint) of object cdecl;
QListBox_mouseButtonPressed_Event = procedure (p1: Integer; p2: QListBoxItemH; p3: PPoint) of object cdecl;
QListBox_mouseButtonClicked_Event = procedure (p1: Integer; p2: QListBoxItemH; p3: PPoint) of object cdecl;
QListBox_onItem_Event = procedure (item: QListBoxItemH) of object cdecl;
QListBox_onViewport_Event = procedure () of object cdecl;
type
QListView_selectionChanged_Event = procedure () of object cdecl;
QListView_selectionChanged2_Event = procedure (p1: QListViewItemH) of object cdecl;
QListView_currentChanged_Event = procedure (p1: QListViewItemH) of object cdecl;
QListView_clicked_Event = procedure (p1: QListViewItemH) of object cdecl;
QListView_clicked2_Event = procedure (p1: QListViewItemH; p2: PPoint; p3: Integer) of object cdecl;
QListView_pressed_Event = procedure (p1: QListViewItemH) of object cdecl;
QListView_pressed2_Event = procedure (p1: QListViewItemH; p2: PPoint; p3: Integer) of object cdecl;
QListView_doubleClicked_Event = procedure (p1: QListViewItemH) of object cdecl;
QListView_returnPressed_Event = procedure (p1: QListViewItemH) of object cdecl;
QListView_rightButtonClicked_Event = procedure (p1: QListViewItemH; p2: PPoint; p3: Integer) of object cdecl;
QListView_rightButtonPressed_Event = procedure (p1: QListViewItemH; p2: PPoint; p3: Integer) of object cdecl;
QListView_mouseButtonPressed_Event = procedure (p1: Integer; p2: QListViewItemH; p3: PPoint; p4: Integer) of object cdecl;
QListView_mouseButtonClicked_Event = procedure (p1: Integer; p2: QListViewItemH; p3: PPoint; p4: Integer) of object cdecl;
QListView_onItem_Event = procedure (item: QListViewItemH) of object cdecl;
QListView_onViewport_Event = procedure () of object cdecl;
QListView_expanded_Event = procedure (item: QListViewItemH) of object cdecl;
QListView_collapsed_Event = procedure (item: QListViewItemH) of object cdecl;
type
QMenuBar_activated_Event = procedure (itemId: Integer) of object cdecl;
QMenuBar_highlighted_Event = procedure (itemId: Integer) of object cdecl;
type
QMultiLineEdit_textChanged_Event = procedure () of object cdecl;
QMultiLineEdit_returnPressed_Event = procedure () of object cdecl;
QMultiLineEdit_undoAvailable_Event = procedure (p1: Boolean) of object cdecl;
QMultiLineEdit_redoAvailable_Event = procedure (p1: Boolean) of object cdecl;
QMultiLineEdit_copyAvailable_Event = procedure (p1: Boolean) of object cdecl;
type
QScrollView_contentsMoving_Event = procedure (x: Integer; y: Integer) of object cdecl;
type
QSlider_valueChanged_Event = procedure (value: Integer) of object cdecl;
QSlider_sliderPressed_Event = procedure () of object cdecl;
QSlider_sliderMoved_Event = procedure (value: Integer) of object cdecl;
QSlider_sliderReleased_Event = procedure () of object cdecl;
type
QSocketNotifier_activated_Event = procedure (socket: Integer) of object cdecl;
type
QSpinBox_valueChanged_Event = procedure (value: Integer) of object cdecl;
QSpinBox_valueChanged2_Event = procedure (valueText: PWideString) of object cdecl;
type
QButtonGroup_pressed_Event = procedure (id: Integer) of object cdecl;
QButtonGroup_released_Event = procedure (id: Integer) of object cdecl;
QButtonGroup_clicked_Event = procedure (id: Integer) of object cdecl;
type
QClipboard_dataChanged_Event = procedure () of object cdecl;
type
QFontDialog_fontSelected_Event = procedure (font: QFontH) of object cdecl;
QFontDialog_fontHighlighted_Event = procedure (font: QFontH) of object cdecl;
type
QHeader_clicked_Event = procedure (section: Integer) of object cdecl;
QHeader_pressed_Event = procedure (section: Integer) of object cdecl;
QHeader_released_Event = procedure (section: Integer) of object cdecl;
QHeader_sizeChange_Event = procedure (section: Integer; oldSize: Integer; newSize: Integer) of object cdecl;
QHeader_indexChange_Event = procedure (section: Integer; fromIndex: Integer; _toIndex: Integer) of object cdecl;
QHeader_sectionClicked_Event = procedure (p1: Integer) of object cdecl;
QHeader_moved_Event = procedure (p1: Integer; p2: Integer) of object cdecl;
type
QPopupMenu_activated_Event = procedure (itemId: Integer) of object cdecl;
QPopupMenu_highlighted_Event = procedure (itemId: Integer) of object cdecl;
QPopupMenu_activatedRedirect_Event = procedure (itemId: Integer) of object cdecl;
QPopupMenu_highlightedRedirect_Event = procedure (itemId: Integer) of object cdecl;
QPopupMenu_aboutToShow_Event = procedure () of object cdecl;
QPopupMenu_aboutToHide_Event = procedure () of object cdecl;
type
QScrollBar_valueChanged_Event = procedure (value: Integer) of object cdecl;
QScrollBar_sliderPressed_Event = procedure () of object cdecl;
QScrollBar_sliderMoved_Event = procedure (value: Integer) of object cdecl;
QScrollBar_sliderReleased_Event = procedure () of object cdecl;
QScrollBar_nextLine_Event = procedure () of object cdecl;
QScrollBar_prevLine_Event = procedure () of object cdecl;
QScrollBar_nextPage_Event = procedure () of object cdecl;
QScrollBar_prevPage_Event = procedure () of object cdecl;
type
QTextBrowser_backwardAvailable_Event = procedure (p1: Boolean) of object cdecl;
QTextBrowser_forwardAvailable_Event = procedure (p1: Boolean) of object cdecl;
QTextBrowser_highlighted_Event = procedure (p1: PWideString) of object cdecl;
QTextBrowser_textChanged_Event = procedure () of object cdecl;
type
QTimer_timeout_Event = procedure () of object cdecl;
type
QWorkspace_windowActivated_Event = procedure (w: QWidgetH) of object cdecl;
type
QClxLineEdit_textChanged_Event = procedure (p1: PWideString) of object cdecl;
QClxLineEdit_returnPressed_Event = procedure () of object cdecl;
function QObject_hook_create(handle: QObjectH): QObject_hookH; cdecl;
procedure QObject_hook_destroy(handle: QObject_hookH); cdecl;
procedure QObject_hook_hook_destroyed(handle: QObject_hookH; hook: QHookH); cdecl;
function QSenderObject_hook_create(handle: QObjectH): QSenderObject_hookH; cdecl;
procedure QSenderObject_hook_destroy(handle: QSenderObject_hookH); cdecl;
function QWidget_hook_create(handle: QObjectH): QWidget_hookH; cdecl;
procedure QWidget_hook_destroy(handle: QWidget_hookH); cdecl;
function QApplication_hook_create(handle: QObjectH): QApplication_hookH; cdecl;
procedure QApplication_hook_destroy(handle: QApplication_hookH); cdecl;
procedure QApplication_hook_hook_lastWindowClosed(handle: QApplication_hookH; hook: QHookH); cdecl;
procedure QApplication_hook_hook_aboutToQuit(handle: QApplication_hookH; hook: QHookH); cdecl;
procedure QApplication_hook_hook_guiThreadAwake(handle: QApplication_hookH; hook: QHookH); cdecl;
function QButton_hook_create(handle: QObjectH): QButton_hookH; cdecl;
procedure QButton_hook_destroy(handle: QButton_hookH); cdecl;
procedure QButton_hook_hook_pressed(handle: QButton_hookH; hook: QHookH); cdecl;
procedure QButton_hook_hook_released(handle: QButton_hookH; hook: QHookH); cdecl;
procedure QButton_hook_hook_clicked(handle: QButton_hookH; hook: QHookH); cdecl;
procedure QButton_hook_hook_toggled(handle: QButton_hookH; hook: QHookH); cdecl;
procedure QButton_hook_hook_stateChanged(handle: QButton_hookH; hook: QHookH); cdecl;
function QComboBox_hook_create(handle: QObjectH): QComboBox_hookH; cdecl;
procedure QComboBox_hook_destroy(handle: QComboBox_hookH); cdecl;
procedure QComboBox_hook_hook_activated(handle: QComboBox_hookH; hook: QHookH); cdecl;
procedure QComboBox_hook_hook_highlighted(handle: QComboBox_hookH; hook: QHookH); cdecl;
procedure QComboBox_hook_hook_activated2(handle: QComboBox_hookH; hook: QHookH); cdecl;
procedure QComboBox_hook_hook_highlighted2(handle: QComboBox_hookH; hook: QHookH); cdecl;
procedure QComboBox_hook_hook_textChanged(handle: QComboBox_hookH; hook: QHookH); cdecl;
function QDialog_hook_create(handle: QObjectH): QDialog_hookH; cdecl;
procedure QDialog_hook_destroy(handle: QDialog_hookH); cdecl;
function QDragObject_hook_create(handle: QObjectH): QDragObject_hookH; cdecl;
procedure QDragObject_hook_destroy(handle: QDragObject_hookH); cdecl;
function QStoredDrag_hook_create(handle: QObjectH): QStoredDrag_hookH; cdecl;
procedure QStoredDrag_hook_destroy(handle: QStoredDrag_hookH); cdecl;
function QTextDrag_hook_create(handle: QObjectH): QTextDrag_hookH; cdecl;
procedure QTextDrag_hook_destroy(handle: QTextDrag_hookH); cdecl;
function QImageDrag_hook_create(handle: QObjectH): QImageDrag_hookH; cdecl;
procedure QImageDrag_hook_destroy(handle: QImageDrag_hookH); cdecl;
function QUriDrag_hook_create(handle: QObjectH): QUriDrag_hookH; cdecl;
procedure QUriDrag_hook_destroy(handle: QUriDrag_hookH); cdecl;
function QColorDrag_hook_create(handle: QObjectH): QColorDrag_hookH; cdecl;
procedure QColorDrag_hook_destroy(handle: QColorDrag_hookH); cdecl;
function QEvent_hook_create(handle: QObjectH): QEvent_hookH; cdecl;
procedure QEvent_hook_destroy(handle: QEvent_hookH); cdecl;
function QTimerEvent_hook_create(handle: QObjectH): QTimerEvent_hookH; cdecl;
procedure QTimerEvent_hook_destroy(handle: QTimerEvent_hookH); cdecl;
function QMouseEvent_hook_create(handle: QObjectH): QMouseEvent_hookH; cdecl;
procedure QMouseEvent_hook_destroy(handle: QMouseEvent_hookH); cdecl;
function QWheelEvent_hook_create(handle: QObjectH): QWheelEvent_hookH; cdecl;
procedure QWheelEvent_hook_destroy(handle: QWheelEvent_hookH); cdecl;
function QKeyEvent_hook_create(handle: QObjectH): QKeyEvent_hookH; cdecl;
procedure QKeyEvent_hook_destroy(handle: QKeyEvent_hookH); cdecl;
function QFocusEvent_hook_create(handle: QObjectH): QFocusEvent_hookH; cdecl;
procedure QFocusEvent_hook_destroy(handle: QFocusEvent_hookH); cdecl;
function QPaintEvent_hook_create(handle: QObjectH): QPaintEvent_hookH; cdecl;
procedure QPaintEvent_hook_destroy(handle: QPaintEvent_hookH); cdecl;
function QMoveEvent_hook_create(handle: QObjectH): QMoveEvent_hookH; cdecl;
procedure QMoveEvent_hook_destroy(handle: QMoveEvent_hookH); cdecl;
function QResizeEvent_hook_create(handle: QObjectH): QResizeEvent_hookH; cdecl;
procedure QResizeEvent_hook_destroy(handle: QResizeEvent_hookH); cdecl;
function QCloseEvent_hook_create(handle: QObjectH): QCloseEvent_hookH; cdecl;
procedure QCloseEvent_hook_destroy(handle: QCloseEvent_hookH); cdecl;
function QShowEvent_hook_create(handle: QObjectH): QShowEvent_hookH; cdecl;
procedure QShowEvent_hook_destroy(handle: QShowEvent_hookH); cdecl;
function QHideEvent_hook_create(handle: QObjectH): QHideEvent_hookH; cdecl;
procedure QHideEvent_hook_destroy(handle: QHideEvent_hookH); cdecl;
function QDropEvent_hook_create(handle: QObjectH): QDropEvent_hookH; cdecl;
procedure QDropEvent_hook_destroy(handle: QDropEvent_hookH); cdecl;
function QDragMoveEvent_hook_create(handle: QObjectH): QDragMoveEvent_hookH; cdecl;
procedure QDragMoveEvent_hook_destroy(handle: QDragMoveEvent_hookH); cdecl;
function QDragEnterEvent_hook_create(handle: QObjectH): QDragEnterEvent_hookH; cdecl;
procedure QDragEnterEvent_hook_destroy(handle: QDragEnterEvent_hookH); cdecl;
function QDragResponseEvent_hook_create(handle: QObjectH): QDragResponseEvent_hookH; cdecl;
procedure QDragResponseEvent_hook_destroy(handle: QDragResponseEvent_hookH); cdecl;
function QDragLeaveEvent_hook_create(handle: QObjectH): QDragLeaveEvent_hookH; cdecl;
procedure QDragLeaveEvent_hook_destroy(handle: QDragLeaveEvent_hookH); cdecl;
function QChildEvent_hook_create(handle: QObjectH): QChildEvent_hookH; cdecl;
procedure QChildEvent_hook_destroy(handle: QChildEvent_hookH); cdecl;
function QCustomEvent_hook_create(handle: QObjectH): QCustomEvent_hookH; cdecl;
procedure QCustomEvent_hook_destroy(handle: QCustomEvent_hookH); cdecl;
function QFrame_hook_create(handle: QObjectH): QFrame_hookH; cdecl;
procedure QFrame_hook_destroy(handle: QFrame_hookH); cdecl;
function QIconView_hook_create(handle: QObjectH): QIconView_hookH; cdecl;
procedure QIconView_hook_destroy(handle: QIconView_hookH); cdecl;
procedure QIconView_hook_hook_selectionChanged(handle: QIconView_hookH; hook: QHookH); cdecl;
procedure QIconView_hook_hook_selectionChanged2(handle: QIconView_hookH; hook: QHookH); cdecl;
procedure QIconView_hook_hook_currentChanged(handle: QIconView_hookH; hook: QHookH); cdecl;
procedure QIconView_hook_hook_clicked(handle: QIconView_hookH; hook: QHookH); cdecl;
procedure QIconView_hook_hook_clicked2(handle: QIconView_hookH; hook: QHookH); cdecl;
procedure QIconView_hook_hook_pressed(handle: QIconView_hookH; hook: QHookH); cdecl;
procedure QIconView_hook_hook_pressed2(handle: QIconView_hookH; hook: QHookH); cdecl;
procedure QIconView_hook_hook_doubleClicked(handle: QIconView_hookH; hook: QHookH); cdecl;
procedure QIconView_hook_hook_returnPressed(handle: QIconView_hookH; hook: QHookH); cdecl;
procedure QIconView_hook_hook_rightButtonClicked(handle: QIconView_hookH; hook: QHookH); cdecl;
procedure QIconView_hook_hook_rightButtonPressed(handle: QIconView_hookH; hook: QHookH); cdecl;
procedure QIconView_hook_hook_mouseButtonPressed(handle: QIconView_hookH; hook: QHookH); cdecl;
procedure QIconView_hook_hook_mouseButtonClicked(handle: QIconView_hookH; hook: QHookH); cdecl;
procedure QIconView_hook_hook_dropped(handle: QIconView_hookH; hook: QHookH); cdecl;
procedure QIconView_hook_hook_moved(handle: QIconView_hookH; hook: QHookH); cdecl;
procedure QIconView_hook_hook_onItem(handle: QIconView_hookH; hook: QHookH); cdecl;
procedure QIconView_hook_hook_onViewport(handle: QIconView_hookH; hook: QHookH); cdecl;
procedure QIconView_hook_hook_itemRenamed(handle: QIconView_hookH; hook: QHookH); cdecl;
procedure QIconView_hook_hook_itemRenamed2(handle: QIconView_hookH; hook: QHookH); cdecl;
function QLCDNumber_hook_create(handle: QObjectH): QLCDNumber_hookH; cdecl;
procedure QLCDNumber_hook_destroy(handle: QLCDNumber_hookH); cdecl;
procedure QLCDNumber_hook_hook_overflow(handle: QLCDNumber_hookH; hook: QHookH); cdecl;
function QLineEdit_hook_create(handle: QObjectH): QLineEdit_hookH; cdecl;
procedure QLineEdit_hook_destroy(handle: QLineEdit_hookH); cdecl;
procedure QLineEdit_hook_hook_textChanged(handle: QLineEdit_hookH; hook: QHookH); cdecl;
procedure QLineEdit_hook_hook_returnPressed(handle: QLineEdit_hookH; hook: QHookH); cdecl;
function QListBox_hook_create(handle: QObjectH): QListBox_hookH; cdecl;
procedure QListBox_hook_destroy(handle: QListBox_hookH); cdecl;
procedure QListBox_hook_hook_highlighted(handle: QListBox_hookH; hook: QHookH); cdecl;
procedure QListBox_hook_hook_selected(handle: QListBox_hookH; hook: QHookH); cdecl;
procedure QListBox_hook_hook_highlighted2(handle: QListBox_hookH; hook: QHookH); cdecl;
procedure QListBox_hook_hook_selected2(handle: QListBox_hookH; hook: QHookH); cdecl;
procedure QListBox_hook_hook_highlighted3(handle: QListBox_hookH; hook: QHookH); cdecl;
procedure QListBox_hook_hook_selected3(handle: QListBox_hookH; hook: QHookH); cdecl;
procedure QListBox_hook_hook_selectionChanged(handle: QListBox_hookH; hook: QHookH); cdecl;
procedure QListBox_hook_hook_selectionChanged2(handle: QListBox_hookH; hook: QHookH); cdecl;
procedure QListBox_hook_hook_currentChanged(handle: QListBox_hookH; hook: QHookH); cdecl;
procedure QListBox_hook_hook_clicked(handle: QListBox_hookH; hook: QHookH); cdecl;
procedure QListBox_hook_hook_clicked2(handle: QListBox_hookH; hook: QHookH); cdecl;
procedure QListBox_hook_hook_pressed(handle: QListBox_hookH; hook: QHookH); cdecl;
procedure QListBox_hook_hook_pressed2(handle: QListBox_hookH; hook: QHookH); cdecl;
procedure QListBox_hook_hook_doubleClicked(handle: QListBox_hookH; hook: QHookH); cdecl;
procedure QListBox_hook_hook_returnPressed(handle: QListBox_hookH; hook: QHookH); cdecl;
procedure QListBox_hook_hook_rightButtonClicked(handle: QListBox_hookH; hook: QHookH); cdecl;
procedure QListBox_hook_hook_rightButtonPressed(handle: QListBox_hookH; hook: QHookH); cdecl;
procedure QListBox_hook_hook_mouseButtonPressed(handle: QListBox_hookH; hook: QHookH); cdecl;
procedure QListBox_hook_hook_mouseButtonClicked(handle: QListBox_hookH; hook: QHookH); cdecl;
procedure QListBox_hook_hook_onItem(handle: QListBox_hookH; hook: QHookH); cdecl;
procedure QListBox_hook_hook_onViewport(handle: QListBox_hookH; hook: QHookH); cdecl;
function QListViewItem_hook_create(handle: QObjectH): QListViewItem_hookH; cdecl;
procedure QListViewItem_hook_destroy(handle: QListViewItem_hookH); cdecl;
function QListView_hook_create(handle: QObjectH): QListView_hookH; cdecl;
procedure QListView_hook_destroy(handle: QListView_hookH); cdecl;
procedure QListView_hook_hook_selectionChanged(handle: QListView_hookH; hook: QHookH); cdecl;
procedure QListView_hook_hook_selectionChanged2(handle: QListView_hookH; hook: QHookH); cdecl;
procedure QListView_hook_hook_currentChanged(handle: QListView_hookH; hook: QHookH); cdecl;
procedure QListView_hook_hook_clicked(handle: QListView_hookH; hook: QHookH); cdecl;
procedure QListView_hook_hook_clicked2(handle: QListView_hookH; hook: QHookH); cdecl;
procedure QListView_hook_hook_pressed(handle: QListView_hookH; hook: QHookH); cdecl;
procedure QListView_hook_hook_pressed2(handle: QListView_hookH; hook: QHookH); cdecl;
procedure QListView_hook_hook_doubleClicked(handle: QListView_hookH; hook: QHookH); cdecl;
procedure QListView_hook_hook_returnPressed(handle: QListView_hookH; hook: QHookH); cdecl;
procedure QListView_hook_hook_rightButtonClicked(handle: QListView_hookH; hook: QHookH); cdecl;
procedure QListView_hook_hook_rightButtonPressed(handle: QListView_hookH; hook: QHookH); cdecl;
procedure QListView_hook_hook_mouseButtonPressed(handle: QListView_hookH; hook: QHookH); cdecl;
procedure QListView_hook_hook_mouseButtonClicked(handle: QListView_hookH; hook: QHookH); cdecl;
procedure QListView_hook_hook_onItem(handle: QListView_hookH; hook: QHookH); cdecl;
procedure QListView_hook_hook_onViewport(handle: QListView_hookH; hook: QHookH); cdecl;
procedure QListView_hook_hook_expanded(handle: QListView_hookH; hook: QHookH); cdecl;
procedure QListView_hook_hook_collapsed(handle: QListView_hookH; hook: QHookH); cdecl;
function QCheckListItem_hook_create(handle: QObjectH): QCheckListItem_hookH; cdecl;
procedure QCheckListItem_hook_destroy(handle: QCheckListItem_hookH); cdecl;
function QMenuBar_hook_create(handle: QObjectH): QMenuBar_hookH; cdecl;
procedure QMenuBar_hook_destroy(handle: QMenuBar_hookH); cdecl;
procedure QMenuBar_hook_hook_activated(handle: QMenuBar_hookH; hook: QHookH); cdecl;
procedure QMenuBar_hook_hook_highlighted(handle: QMenuBar_hookH; hook: QHookH); cdecl;
function QMessageBox_hook_create(handle: QObjectH): QMessageBox_hookH; cdecl;
procedure QMessageBox_hook_destroy(handle: QMessageBox_hookH); cdecl;
function QMultiLineEdit_hook_create(handle: QObjectH): QMultiLineEdit_hookH; cdecl;
procedure QMultiLineEdit_hook_destroy(handle: QMultiLineEdit_hookH); cdecl;
procedure QMultiLineEdit_hook_hook_textChanged(handle: QMultiLineEdit_hookH; hook: QHookH); cdecl;
procedure QMultiLineEdit_hook_hook_returnPressed(handle: QMultiLineEdit_hookH; hook: QHookH); cdecl;
procedure QMultiLineEdit_hook_hook_undoAvailable(handle: QMultiLineEdit_hookH; hook: QHookH); cdecl;
procedure QMultiLineEdit_hook_hook_redoAvailable(handle: QMultiLineEdit_hookH; hook: QHookH); cdecl;
procedure QMultiLineEdit_hook_hook_copyAvailable(handle: QMultiLineEdit_hookH; hook: QHookH); cdecl;
function QScrollView_hook_create(handle: QObjectH): QScrollView_hookH; cdecl;
procedure QScrollView_hook_destroy(handle: QScrollView_hookH); cdecl;
procedure QScrollView_hook_hook_contentsMoving(handle: QScrollView_hookH; hook: QHookH); cdecl;
function QSlider_hook_create(handle: QObjectH): QSlider_hookH; cdecl;
procedure QSlider_hook_destroy(handle: QSlider_hookH); cdecl;
procedure QSlider_hook_hook_valueChanged(handle: QSlider_hookH; hook: QHookH); cdecl;
procedure QSlider_hook_hook_sliderPressed(handle: QSlider_hookH; hook: QHookH); cdecl;
procedure QSlider_hook_hook_sliderMoved(handle: QSlider_hookH; hook: QHookH); cdecl;
procedure QSlider_hook_hook_sliderReleased(handle: QSlider_hookH; hook: QHookH); cdecl;
function QSocketNotifier_hook_create(handle: QObjectH): QSocketNotifier_hookH; cdecl;
procedure QSocketNotifier_hook_destroy(handle: QSocketNotifier_hookH); cdecl;
procedure QSocketNotifier_hook_hook_activated(handle: QSocketNotifier_hookH; hook: QHookH); cdecl;
function QSpinBox_hook_create(handle: QObjectH): QSpinBox_hookH; cdecl;
procedure QSpinBox_hook_destroy(handle: QSpinBox_hookH); cdecl;
procedure QSpinBox_hook_hook_valueChanged(handle: QSpinBox_hookH; hook: QHookH); cdecl;
procedure QSpinBox_hook_hook_valueChanged2(handle: QSpinBox_hookH; hook: QHookH); cdecl;
function QStyle_hook_create(handle: QObjectH): QStyle_hookH; cdecl;
procedure QStyle_hook_destroy(handle: QStyle_hookH); cdecl;
function QTranslator_hook_create(handle: QObjectH): QTranslator_hookH; cdecl;
procedure QTranslator_hook_destroy(handle: QTranslator_hookH); cdecl;
function QBrush_hook_create(handle: QObjectH): QBrush_hookH; cdecl;
procedure QBrush_hook_destroy(handle: QBrush_hookH); cdecl;
function QButtonGroup_hook_create(handle: QObjectH): QButtonGroup_hookH; cdecl;
procedure QButtonGroup_hook_destroy(handle: QButtonGroup_hookH); cdecl;
procedure QButtonGroup_hook_hook_pressed(handle: QButtonGroup_hookH; hook: QHookH); cdecl;
procedure QButtonGroup_hook_hook_released(handle: QButtonGroup_hookH; hook: QHookH); cdecl;
procedure QButtonGroup_hook_hook_clicked(handle: QButtonGroup_hookH; hook: QHookH); cdecl;
function QCheckBox_hook_create(handle: QObjectH): QCheckBox_hookH; cdecl;
procedure QCheckBox_hook_destroy(handle: QCheckBox_hookH); cdecl;
function QClipboard_hook_create(handle: QObjectH): QClipboard_hookH; cdecl;
procedure QClipboard_hook_destroy(handle: QClipboard_hookH); cdecl;
procedure QClipboard_hook_hook_dataChanged(handle: QClipboard_hookH; hook: QHookH); cdecl;
function QColorDialog_hook_create(handle: QObjectH): QColorDialog_hookH; cdecl;
procedure QColorDialog_hook_destroy(handle: QColorDialog_hookH); cdecl;
function QCommonStyle_hook_create(handle: QObjectH): QCommonStyle_hookH; cdecl;
procedure QCommonStyle_hook_destroy(handle: QCommonStyle_hookH); cdecl;
function QFontDialog_hook_create(handle: QObjectH): QFontDialog_hookH; cdecl;
procedure QFontDialog_hook_destroy(handle: QFontDialog_hookH); cdecl;
procedure QFontDialog_hook_hook_fontSelected(handle: QFontDialog_hookH; hook: QHookH); cdecl;
procedure QFontDialog_hook_hook_fontHighlighted(handle: QFontDialog_hookH; hook: QHookH); cdecl;
function QGroupBox_hook_create(handle: QObjectH): QGroupBox_hookH; cdecl;
procedure QGroupBox_hook_destroy(handle: QGroupBox_hookH); cdecl;
function QHeader_hook_create(handle: QObjectH): QHeader_hookH; cdecl;
procedure QHeader_hook_destroy(handle: QHeader_hookH); cdecl;
procedure QHeader_hook_hook_clicked(handle: QHeader_hookH; hook: QHookH); cdecl;
procedure QHeader_hook_hook_pressed(handle: QHeader_hookH; hook: QHookH); cdecl;
procedure QHeader_hook_hook_released(handle: QHeader_hookH; hook: QHookH); cdecl;
procedure QHeader_hook_hook_sizeChange(handle: QHeader_hookH; hook: QHookH); cdecl;
procedure QHeader_hook_hook_indexChange(handle: QHeader_hookH; hook: QHookH); cdecl;
procedure QHeader_hook_hook_sectionClicked(handle: QHeader_hookH; hook: QHookH); cdecl;
procedure QHeader_hook_hook_moved(handle: QHeader_hookH; hook: QHookH); cdecl;
function QLabel_hook_create(handle: QObjectH): QLabel_hookH; cdecl;
procedure QLabel_hook_destroy(handle: QLabel_hookH); cdecl;
function QPainter_hook_create(handle: QObjectH): QPainter_hookH; cdecl;
procedure QPainter_hook_destroy(handle: QPainter_hookH); cdecl;
function QPen_hook_create(handle: QObjectH): QPen_hookH; cdecl;
procedure QPen_hook_destroy(handle: QPen_hookH); cdecl;
function QPopupMenu_hook_create(handle: QObjectH): QPopupMenu_hookH; cdecl;
procedure QPopupMenu_hook_destroy(handle: QPopupMenu_hookH); cdecl;
procedure QPopupMenu_hook_hook_activated(handle: QPopupMenu_hookH; hook: QHookH); cdecl;
procedure QPopupMenu_hook_hook_highlighted(handle: QPopupMenu_hookH; hook: QHookH); cdecl;
procedure QPopupMenu_hook_hook_activatedRedirect(handle: QPopupMenu_hookH; hook: QHookH); cdecl;
procedure QPopupMenu_hook_hook_highlightedRedirect(handle: QPopupMenu_hookH; hook: QHookH); cdecl;
procedure QPopupMenu_hook_hook_aboutToShow(handle: QPopupMenu_hookH; hook: QHookH); cdecl;
procedure QPopupMenu_hook_hook_aboutToHide(handle: QPopupMenu_hookH; hook: QHookH); cdecl;
function QPushButton_hook_create(handle: QObjectH): QPushButton_hookH; cdecl;
procedure QPushButton_hook_destroy(handle: QPushButton_hookH); cdecl;
function QRadioButton_hook_create(handle: QObjectH): QRadioButton_hookH; cdecl;
procedure QRadioButton_hook_destroy(handle: QRadioButton_hookH); cdecl;
function QScrollBar_hook_create(handle: QObjectH): QScrollBar_hookH; cdecl;
procedure QScrollBar_hook_destroy(handle: QScrollBar_hookH); cdecl;
procedure QScrollBar_hook_hook_valueChanged(handle: QScrollBar_hookH; hook: QHookH); cdecl;
procedure QScrollBar_hook_hook_sliderPressed(handle: QScrollBar_hookH; hook: QHookH); cdecl;
procedure QScrollBar_hook_hook_sliderMoved(handle: QScrollBar_hookH; hook: QHookH); cdecl;
procedure QScrollBar_hook_hook_sliderReleased(handle: QScrollBar_hookH; hook: QHookH); cdecl;
procedure QScrollBar_hook_hook_nextLine(handle: QScrollBar_hookH; hook: QHookH); cdecl;
procedure QScrollBar_hook_hook_prevLine(handle: QScrollBar_hookH; hook: QHookH); cdecl;
procedure QScrollBar_hook_hook_nextPage(handle: QScrollBar_hookH; hook: QHookH); cdecl;
procedure QScrollBar_hook_hook_prevPage(handle: QScrollBar_hookH; hook: QHookH); cdecl;
function QSizeGrip_hook_create(handle: QObjectH): QSizeGrip_hookH; cdecl;
procedure QSizeGrip_hook_destroy(handle: QSizeGrip_hookH); cdecl;
function QTableView_hook_create(handle: QObjectH): QTableView_hookH; cdecl;
procedure QTableView_hook_destroy(handle: QTableView_hookH); cdecl;
function QTextBrowser_hook_create(handle: QObjectH): QTextBrowser_hookH; cdecl;
procedure QTextBrowser_hook_destroy(handle: QTextBrowser_hookH); cdecl;
procedure QTextBrowser_hook_hook_backwardAvailable(handle: QTextBrowser_hookH; hook: QHookH); cdecl;
procedure QTextBrowser_hook_hook_forwardAvailable(handle: QTextBrowser_hookH; hook: QHookH); cdecl;
procedure QTextBrowser_hook_hook_highlighted(handle: QTextBrowser_hookH; hook: QHookH); cdecl;
procedure QTextBrowser_hook_hook_textChanged(handle: QTextBrowser_hookH; hook: QHookH); cdecl;
function QTextView_hook_create(handle: QObjectH): QTextView_hookH; cdecl;
procedure QTextView_hook_destroy(handle: QTextView_hookH); cdecl;
function QWhatsThis_hook_create(handle: QObjectH): QWhatsThis_hookH; cdecl;
procedure QWhatsThis_hook_destroy(handle: QWhatsThis_hookH); cdecl;
function QWindowsStyle_hook_create(handle: QObjectH): QWindowsStyle_hookH; cdecl;
procedure QWindowsStyle_hook_destroy(handle: QWindowsStyle_hookH); cdecl;
function QTimer_hook_create(handle: QObjectH): QTimer_hookH; cdecl;
procedure QTimer_hook_destroy(handle: QTimer_hookH); cdecl;
procedure QTimer_hook_hook_timeout(handle: QTimer_hookH; hook: QHookH); cdecl;
function QWorkspace_hook_create(handle: QObjectH): QWorkspace_hookH; cdecl;
procedure QWorkspace_hook_destroy(handle: QWorkspace_hookH); cdecl;
procedure QWorkspace_hook_hook_windowActivated(handle: QWorkspace_hookH; hook: QHookH); cdecl;
function QClxLineEdit_hook_create(handle: QObjectH): QClxLineEdit_hookH; cdecl;
procedure QClxLineEdit_hook_destroy(handle: QClxLineEdit_hookH); cdecl;
procedure QClxLineEdit_hook_hook_textChanged(handle: QClxLineEdit_hookH; hook: QHookH); cdecl;
procedure QClxLineEdit_hook_hook_returnPressed(handle: QClxLineEdit_hookH; hook: QHookH); cdecl;
procedure InitializePAnsiString(CCPS, COPS, IPS, FPS: Pointer); cdecl;
procedure InitializePWideString(CUPS, UOPS, LOPS, IPS, FPS: Pointer); cdecl;
procedure InitializePPointArray(GPP, GPL, SPL: Pointer); cdecl;
procedure InitializePIntArray(GPP, GPL, SPL: Pointer); cdecl;
procedure bitBlt(dst: QPaintDeviceH; dp: PPoint; src: QPaintDeviceH; sr: PRect;
rop: RasterOp); cdecl; overload;
{$EXTERNALSYM bitBlt}
procedure bitBlt(dst: QPaintDeviceH; dx: Integer; dy: Integer;
src: QPaintDeviceH; sx: Integer; sy: Integer; sw: Integer; sh: Integer;
rop: RasterOp; IgnoreMask: Boolean); cdecl; overload;
{$EXTERNALSYM bitBlt}
procedure bitBlt(dst: QImageH; dx, dy: Integer; src: QImageH; sx, sy, sw, sh,
conversion_flags: Integer); cdecl; overload;
{$EXTERNALSYM bitBlt}
function QByteArray_create(Size: Integer): QByteArrayH; cdecl;
{$EXTERNALSYM QByteArray_create}
procedure QByteArray_destroy(ba: QByteArrayH); cdecl;
{$EXTERNALSYM QByteArray_destroy}
function QClxWidget_MaxWidgetSize: Cardinal; cdecl;
{$EXTERNALSYM QClxWidget_MaxWidgetSize}
procedure QWorkspace_next(workspace: QWorkspaceH); cdecl;
{$EXTERNALSYM QWorkspace_next}
procedure QWorkspace_previous(workspace: QWorkspaceH); cdecl;
{$EXTERNALSYM QWorkspace_previous}
{$IFDEF MSWINDOWS}
procedure setPopupParent(newPopupParent: Cardinal); cdecl;
{$EXTERNALSYM setPopupParent}
{$ENDIF}
{$IFDEF LINUX}
function QtDisplay: PDisplay; cdecl;
{$EXTERNALSYM QtDisplay}
{$ENDIF}
function qApp_created: Boolean; cdecl;
{$EXTERNALSYM qApp_created}
procedure QMimeSource_destroy(mime: QMimeSourceH); cdecl;
{$EXTERNALSYM QMimeSource_destroy}
function QMimeSource_is_QClxMimeSource(mime: QMimeSourceH): Boolean; cdecl;
{$EXTERNALSYM QMimeSource_is_QClxMimeSource}
function QEvent_isQCustomEvent(e: QEventH): Boolean; cdecl;
{$EXTERNALSYM QEvent_isQCustomEvent}
function QEvent_isQShowEvent(e: QEventH): Boolean; cdecl;
{$EXTERNALSYM QEvent_isQShowEvent}
function QEvent_isQTimerEvent(e: QEventH): Boolean; cdecl;
{$EXTERNALSYM QEvent_isQTimerEvent}
function QEvent_isQMouseEvent(e: QEventH): Boolean; cdecl;
{$EXTERNALSYM QEvent_isQMouseEvent}
function QEvent_isQWheelEvent(e: QEventH): Boolean; cdecl;
{$EXTERNALSYM QEvent_isQWheelEvent}
function QEvent_isQKeyEvent(e: QEventH): Boolean; cdecl;
{$EXTERNALSYM QEvent_isQKeyEvent}
function QEvent_isQFocusEvent(e: QEventH): Boolean; cdecl;
{$EXTERNALSYM QEvent_isQFocusEvent}
function QEvent_isQPaintEvent(e: QEventH): Boolean; cdecl;
{$EXTERNALSYM QEvent_isQPaintEvent}
function QEvent_isQMoveEvent(e: QEventH): Boolean; cdecl;
{$EXTERNALSYM QEvent_isQMoveEvent}
function QEvent_isQResizeEvent(e: QEventH): Boolean; cdecl;
{$EXTERNALSYM QEvent_isQResizeEvent}
function QEvent_isQCloseEvent(e: QEventH): Boolean; cdecl;
{$EXTERNALSYM QEvent_isQCloseEvent}
function QEvent_isQHideEvent(e: QEventH): Boolean; cdecl;
{$EXTERNALSYM QEvent_isQHideEvent}
function QEvent_isQDropEvent(e: QEventH): Boolean; cdecl;
{$EXTERNALSYM QEvent_isQDropEvent}
function QEvent_isQDragMoveEvent(e: QEventH): Boolean; cdecl;
{$EXTERNALSYM QEvent_isQDragMoveEvent}
function QEvent_isQDragEnterEvent(e: QEventH): Boolean; cdecl;
{$EXTERNALSYM QEvent_isQDragEnterEvent}
function QEvent_isQDragResponseEvent(e: QEventH): Boolean; cdecl;
{$EXTERNALSYM QEvent_isQDragResponseEvent}
function QEvent_isQDragLeaveEvent(e: QEventH): Boolean; cdecl;
{$EXTERNALSYM QEvent_isQDragLeaveEvent}
function QEvent_isQChildEvent(e: QEventH): Boolean; cdecl;
{$EXTERNALSYM QEvent_isQChildEvent}
function QObjectList_create: QObjectListH; cdecl; overload;
{$EXTERNALSYM QObjectList_create}
function QObjectList_create(list: QObjectListH): QObjectListH; cdecl; overload;
{$EXTERNALSYM QObjectList_create}
procedure QObjectList_destroy(obj: QObjectListH);
{$EXTERNALSYM QObjectList_destroy}
function QObjectList_count(obj: QObjectListH): Cardinal; cdecl;
{$EXTERNALSYM QObjectList_count}
function QObjectList_isEmpty(obj: QObjectListH): Boolean; cdecl;
{$EXTERNALSYM QObjectList_isEmpty}
function QObjectList_insert(obj: QObjectListH; i: Cardinal; d: QObjectH): Boolean; cdecl;
{$EXTERNALSYM QObjectList_insert}
procedure QObjectList_inSort(obj: QObjectListH; d: QObjectH);
{$EXTERNALSYM QObjectList_inSort}
procedure QObjectList_prepend(obj: QObjectListH; d: QObjectH);
{$EXTERNALSYM QObjectList_prepend}
procedure QObjectList_append(obj: QObjectListH; d: QObjectH);
{$EXTERNALSYM QObjectList_append}
function QObjectList_remove(obj: QObjectListH; i: Cardinal): Boolean; cdecl; overload;
{$EXTERNALSYM QObjectList_remove}
function QObjectList_remove(obj: QObjectListH): Boolean; cdecl; overload;
{$EXTERNALSYM QObjectList_remove}
function QObjectList_remove(obj: QObjectListH; d: QObjectH): Boolean; cdecl; overload;
{$EXTERNALSYM QObjectList_remove}
function QObjectList_removeRef(obj: QObjectListH; d: QObjectH): Boolean; cdecl;
{$EXTERNALSYM QObjectList_removeRef}
function QObjectList_removeFirst(obj: QObjectListH): Boolean; cdecl;
{$EXTERNALSYM QObjectList_removeFirst}
function QObjectList_removeLast(obj: QObjectListH): Boolean; cdecl;
{$EXTERNALSYM QObjectList_removeLast}
function QObjectList_take(obj: QObjectListH; i: Cardinal): QObjectH; cdecl; overload;
{$EXTERNALSYM QObjectList_take}
function QObjectList_take(obj: QObjectListH): QObjectH; cdecl; overload;
{$EXTERNALSYM QObjectList_take}
procedure QObjectList_clear(obj: QObjectListH);
{$EXTERNALSYM QObjectList_clear}
procedure QObjectList_sort(obj: QObjectListH);
{$EXTERNALSYM QObjectList_sort}
function QObjectList_find(obj: QObjectListH; d: QObjectH): Integer; cdecl;
{$EXTERNALSYM QObjectList_find}
function QObjectList_findNext(obj: QObjectListH; d: QObjectH): Integer; cdecl;
{$EXTERNALSYM QObjectList_findNext}
function QObjectList_findRef(obj: QObjectListH; d: QObjectH): Integer; cdecl;
{$EXTERNALSYM QObjectList_findRef}
function QObjectList_findNextRef(obj: QObjectListH; d: QObjectH): Integer; cdecl;
{$EXTERNALSYM QObjectList_findNextRef}
function QObjectList_contains(obj: QObjectListH; d: QObjectH): Cardinal; cdecl;
{$EXTERNALSYM QObjectList_contains}
function QObjectList_containsRef(obj: QObjectListH; d: QObjectH): Cardinal; cdecl;
{$EXTERNALSYM QObjectList_containsRef}
function QObjectList_at(obj: QObjectListH; i: Cardinal): QObjectH; cdecl; overload;
{$EXTERNALSYM QObjectList_at}
function QObjectList_at(obj: QObjectListH): Integer; cdecl; overload;
{$EXTERNALSYM QObjectList_at}
function QObjectList_current(obj: QObjectListH): QObjectH; cdecl;
{$EXTERNALSYM QObjectList_current}
function QObjectList_getFirst(obj: QObjectListH): QObjectH; cdecl;
{$EXTERNALSYM QObjectList_getFirst}
function QObjectList_getLast(obj: QObjectListH): QObjectH; cdecl;
{$EXTERNALSYM QObjectList_getLast}
function QObjectList_first(obj: QObjectListH): QObjectH; cdecl;
{$EXTERNALSYM QObjectList_first}
function QObjectList_last(obj: QObjectListH): QObjectH; cdecl;
{$EXTERNALSYM QObjectList_last}
function QObjectList_next(obj: QObjectListH): QObjectH; cdecl;
{$EXTERNALSYM QObjectList_next}
function QObjectList_prev(obj: QObjectListH): QObjectH; cdecl;
{$EXTERNALSYM QObjectList_prev}
function QBitmap_from_QPixmap(bm: QBitmapH; pm: QPixmapH): QBitmapH; cdecl;
{$EXTERNALSYM QBitmap_from_QPixmap}
function QWidgetList_create: QWidgetListH; cdecl; overload;
{$EXTERNALSYM QWidgetList_create}
function QWidgetList_create(list: QWidgetListH): QWidgetListH; cdecl; overload;
{$EXTERNALSYM QWidgetList_create}
procedure QWidgetList_destroy(obj: QWidgetListH); cdecl;
{$EXTERNALSYM QWidgetList_destroy}
function QWidgetList_count(obj: QWidgetListH): Cardinal; cdecl;
{$EXTERNALSYM QWidgetList_count}
function QWidgetList_insert(obj: QWidgetListH; i: Cardinal; d: QWidgetH): Boolean; cdecl;
{$EXTERNALSYM QWidgetList_insert}
function QWidgetList_remove(obj: QWidgetListH; i: Cardinal): Boolean; cdecl; overload;
{$EXTERNALSYM QWidgetList_remove}
function QWidgetList_remove(obj: QWidgetListH; d: QWidgetH): Boolean; cdecl; overload;
{$EXTERNALSYM QWidgetList_remove}
procedure QWidgetList_clear(obj: QWidgetListH); cdecl;
{$EXTERNALSYM QWidgetList_clear}
function QWidgetList_find(obj: QWidgetListH; d: QWidgetH): Integer; cdecl;
{$EXTERNALSYM QWidgetList_find}
function QWidgetList_findNext(obj: QWidgetListH; d: QWidgetH): Integer; cdecl;
{$EXTERNALSYM QWidgetList_findNext}
function QWidgetList_contains(obj: QWidgetListH; d: QWidgetH): Cardinal; cdecl;
{$EXTERNALSYM QWidgetList_contains}
function QWidgetList_at(obj: QWidgetListH; i: Cardinal): QWidgetH; cdecl; overload;
{$EXTERNALSYM QWidgetList_at}
function QWidgetList_current(obj: QWidgetListH): QWidgetH; cdecl;
{$EXTERNALSYM QWidgetList_current}
function QWidgetList_first(obj: QWidgetListH): QWidgetH; cdecl;
{$EXTERNALSYM QWidgetList_first}
function QWidgetList_last(obj: QWidgetListH): QWidgetH; cdecl;
{$EXTERNALSYM QWidgetList_last}
function QWidgetList_next(obj: QWidgetListH): QWidgetH; cdecl;
{$EXTERNALSYM QWidgetList_next}
function QWidgetList_prev(obj: QWidgetListH): QWidgetH; cdecl;
{$EXTERNALSYM QWidgetList_prev}
(*$HPPEMIT '#if defined(BOR_QT_UCHAR)'*)
(*$HPPEMIT '#undef BOR_QT_UCHAR'*)
(*$HPPEMIT '#undef uchar'*)
(*$HPPEMIT '#endif'*)
{$IFDEF MSWINDOWS}
const
QtIntf = 'qtintf70.dll';
QtNamePrefix = '_';
QtLib = 'qtintf70.dll';
{$ENDIF}
{$IFDEF LINUX}
var
QtIntf: string = '';
QtLib: string = '';
const
QtNamePrefix = '';
{$ENDIF}
implementation
uses SysUtils, BindHelp;
const
{$IFDEF MSWINDOWS}
QtShareName = 'qtintf70.dll';
QtLibName = 'qtintf70.dll';
{$ENDIF}
{$IFDEF LINUX}
QtShareName = '';
QtLibName = '';
{$ENDIF}
procedure QWidget_destroy; external QtShareName name QtNamePrefix + 'QWidget_destroy';
function QWidget_create; external QtShareName name QtNamePrefix + 'QWidget_create';
function QWidget_winId; external QtShareName name QtNamePrefix + 'QWidget_winId';
procedure QWidget_setName; external QtShareName name QtNamePrefix + 'QWidget_setName';
function QWidget_style; external QtShareName name QtNamePrefix + 'QWidget_style';
procedure QWidget_setStyle; external QtShareName name QtNamePrefix + 'QWidget_setStyle';
function QWidget_isTopLevel; external QtShareName name QtNamePrefix + 'QWidget_isTopLevel';
function QWidget_isModal; external QtShareName name QtNamePrefix + 'QWidget_isModal';
function QWidget_isPopup; external QtShareName name QtNamePrefix + 'QWidget_isPopup';
function QWidget_isDesktop; external QtShareName name QtNamePrefix + 'QWidget_isDesktop';
function QWidget_isEnabled; external QtShareName name QtNamePrefix + 'QWidget_isEnabled';
function QWidget_isEnabledTo; external QtShareName name QtNamePrefix + 'QWidget_isEnabledTo';
function QWidget_isEnabledToTLW; external QtShareName name QtNamePrefix + 'QWidget_isEnabledToTLW';
procedure QWidget_setEnabled; external QtShareName name QtNamePrefix + 'QWidget_setEnabled';
procedure QWidget_setDisabled; external QtShareName name QtNamePrefix + 'QWidget_setDisabled';
procedure QWidget_frameGeometry; external QtShareName name QtNamePrefix + 'QWidget_frameGeometry';
procedure QWidget_geometry; external QtShareName name QtNamePrefix + 'QWidget_geometry';
function QWidget_x; external QtShareName name QtNamePrefix + 'QWidget_x';
function QWidget_y; external QtShareName name QtNamePrefix + 'QWidget_y';
procedure QWidget_pos; external QtShareName name QtNamePrefix + 'QWidget_pos';
procedure QWidget_frameSize; external QtShareName name QtNamePrefix + 'QWidget_frameSize';
procedure QWidget_size; external QtShareName name QtNamePrefix + 'QWidget_size';
function QWidget_width; external QtShareName name QtNamePrefix + 'QWidget_width';
function QWidget_height; external QtShareName name QtNamePrefix + 'QWidget_height';
procedure QWidget_rect; external QtShareName name QtNamePrefix + 'QWidget_rect';
procedure QWidget_childrenRect; external QtShareName name QtNamePrefix + 'QWidget_childrenRect';
procedure QWidget_childrenRegion; external QtShareName name QtNamePrefix + 'QWidget_childrenRegion';
procedure QWidget_minimumSize; external QtShareName name QtNamePrefix + 'QWidget_minimumSize';
procedure QWidget_maximumSize; external QtShareName name QtNamePrefix + 'QWidget_maximumSize';
function QWidget_minimumWidth; external QtShareName name QtNamePrefix + 'QWidget_minimumWidth';
function QWidget_minimumHeight; external QtShareName name QtNamePrefix + 'QWidget_minimumHeight';
function QWidget_maximumWidth; external QtShareName name QtNamePrefix + 'QWidget_maximumWidth';
function QWidget_maximumHeight; external QtShareName name QtNamePrefix + 'QWidget_maximumHeight';
procedure QWidget_setMinimumSize(handle: QWidgetH; p1: PSize); external QtShareName name QtNamePrefix + 'QWidget_setMinimumSize';
procedure QWidget_setMinimumSize(handle: QWidgetH; minw: Integer; minh: Integer); external QtShareName name QtNamePrefix + 'QWidget_setMinimumSize2';
procedure QWidget_setMaximumSize(handle: QWidgetH; p1: PSize); external QtShareName name QtNamePrefix + 'QWidget_setMaximumSize';
procedure QWidget_setMaximumSize(handle: QWidgetH; maxw: Integer; maxh: Integer); external QtShareName name QtNamePrefix + 'QWidget_setMaximumSize2';
procedure QWidget_setMinimumWidth; external QtShareName name QtNamePrefix + 'QWidget_setMinimumWidth';
procedure QWidget_setMinimumHeight; external QtShareName name QtNamePrefix + 'QWidget_setMinimumHeight';
procedure QWidget_setMaximumWidth; external QtShareName name QtNamePrefix + 'QWidget_setMaximumWidth';
procedure QWidget_setMaximumHeight; external QtShareName name QtNamePrefix + 'QWidget_setMaximumHeight';
procedure QWidget_sizeIncrement; external QtShareName name QtNamePrefix + 'QWidget_sizeIncrement';
procedure QWidget_setSizeIncrement(handle: QWidgetH; p1: PSize); external QtShareName name QtNamePrefix + 'QWidget_setSizeIncrement';
procedure QWidget_setSizeIncrement(handle: QWidgetH; w: Integer; h: Integer); external QtShareName name QtNamePrefix + 'QWidget_setSizeIncrement2';
procedure QWidget_baseSize; external QtShareName name QtNamePrefix + 'QWidget_baseSize';
procedure QWidget_setBaseSize(handle: QWidgetH; p1: PSize); external QtShareName name QtNamePrefix + 'QWidget_setBaseSize';
procedure QWidget_setBaseSize(handle: QWidgetH; basew: Integer; baseh: Integer); external QtShareName name QtNamePrefix + 'QWidget_setBaseSize2';
procedure QWidget_setFixedSize(handle: QWidgetH; p1: PSize); external QtShareName name QtNamePrefix + 'QWidget_setFixedSize';
procedure QWidget_setFixedSize(handle: QWidgetH; w: Integer; h: Integer); external QtShareName name QtNamePrefix + 'QWidget_setFixedSize2';
procedure QWidget_setFixedWidth; external QtShareName name QtNamePrefix + 'QWidget_setFixedWidth';
procedure QWidget_setFixedHeight; external QtShareName name QtNamePrefix + 'QWidget_setFixedHeight';
procedure QWidget_mapToGlobal; external QtShareName name QtNamePrefix + 'QWidget_mapToGlobal';
procedure QWidget_mapFromGlobal; external QtShareName name QtNamePrefix + 'QWidget_mapFromGlobal';
procedure QWidget_mapToParent; external QtShareName name QtNamePrefix + 'QWidget_mapToParent';
procedure QWidget_mapFromParent; external QtShareName name QtNamePrefix + 'QWidget_mapFromParent';
procedure QWidget_mapTo; external QtShareName name QtNamePrefix + 'QWidget_mapTo';
procedure QWidget_mapFrom; external QtShareName name QtNamePrefix + 'QWidget_mapFrom';
function QWidget_topLevelWidget; external QtShareName name QtNamePrefix + 'QWidget_topLevelWidget';
function QWidget_backgroundMode; external QtShareName name QtNamePrefix + 'QWidget_backgroundMode';
procedure QWidget_setBackgroundMode; external QtShareName name QtNamePrefix + 'QWidget_setBackgroundMode';
function QWidget_backgroundColor; external QtShareName name QtNamePrefix + 'QWidget_backgroundColor';
function QWidget_foregroundColor; external QtShareName name QtNamePrefix + 'QWidget_foregroundColor';
procedure QWidget_setBackgroundColor; external QtShareName name QtNamePrefix + 'QWidget_setBackgroundColor';
function QWidget_backgroundPixmap; external QtShareName name QtNamePrefix + 'QWidget_backgroundPixmap';
procedure QWidget_setBackgroundPixmap; external QtShareName name QtNamePrefix + 'QWidget_setBackgroundPixmap';
function QWidget_colorGroup; external QtShareName name QtNamePrefix + 'QWidget_colorGroup';
function QWidget_palette; external QtShareName name QtNamePrefix + 'QWidget_palette';
function QWidget_ownPalette; external QtShareName name QtNamePrefix + 'QWidget_ownPalette';
procedure QWidget_setPalette(handle: QWidgetH; p1: QPaletteH); external QtShareName name QtNamePrefix + 'QWidget_setPalette';
procedure QWidget_unsetPalette; external QtShareName name QtNamePrefix + 'QWidget_unsetPalette';
procedure QWidget_font; external QtShareName name QtNamePrefix + 'QWidget_font';
function QWidget_ownFont; external QtShareName name QtNamePrefix + 'QWidget_ownFont';
procedure QWidget_setFont(handle: QWidgetH; p1: QFontH); external QtShareName name QtNamePrefix + 'QWidget_setFont';
procedure QWidget_unsetFont; external QtShareName name QtNamePrefix + 'QWidget_unsetFont';
procedure QWidget_fontMetrics; external QtShareName name QtNamePrefix + 'QWidget_fontMetrics';
procedure QWidget_fontInfo; external QtShareName name QtNamePrefix + 'QWidget_fontInfo';
function QWidget_fontPropagation; external QtShareName name QtNamePrefix + 'QWidget_fontPropagation';
procedure QWidget_setFontPropagation; external QtShareName name QtNamePrefix + 'QWidget_setFontPropagation';
function QWidget_palettePropagation; external QtShareName name QtNamePrefix + 'QWidget_palettePropagation';
procedure QWidget_setPalettePropagation; external QtShareName name QtNamePrefix + 'QWidget_setPalettePropagation';
function QWidget_cursor; external QtShareName name QtNamePrefix + 'QWidget_cursor';
function QWidget_ownCursor; external QtShareName name QtNamePrefix + 'QWidget_ownCursor';
procedure QWidget_setCursor; external QtShareName name QtNamePrefix + 'QWidget_setCursor';
procedure QWidget_unsetCursor; external QtShareName name QtNamePrefix + 'QWidget_unsetCursor';
procedure QWidget_caption; external QtShareName name QtNamePrefix + 'QWidget_caption';
function QWidget_icon; external QtShareName name QtNamePrefix + 'QWidget_icon';
procedure QWidget_iconText; external QtShareName name QtNamePrefix + 'QWidget_iconText';
function QWidget_hasMouseTracking; external QtShareName name QtNamePrefix + 'QWidget_hasMouseTracking';
procedure QWidget_setMask(handle: QWidgetH; p1: QBitmapH); external QtShareName name QtNamePrefix + 'QWidget_setMask';
procedure QWidget_setMask(handle: QWidgetH; p1: QRegionH); external QtShareName name QtNamePrefix + 'QWidget_setMask2';
procedure QWidget_clearMask; external QtShareName name QtNamePrefix + 'QWidget_clearMask';
procedure QWidget_setCaption; external QtShareName name QtNamePrefix + 'QWidget_setCaption';
procedure QWidget_setIcon; external QtShareName name QtNamePrefix + 'QWidget_setIcon';
procedure QWidget_setIconText; external QtShareName name QtNamePrefix + 'QWidget_setIconText';
procedure QWidget_setMouseTracking; external QtShareName name QtNamePrefix + 'QWidget_setMouseTracking';
procedure QWidget_setFocus; external QtShareName name QtNamePrefix + 'QWidget_setFocus';
procedure QWidget_clearFocus; external QtShareName name QtNamePrefix + 'QWidget_clearFocus';
function QWidget_isActiveWindow; external QtShareName name QtNamePrefix + 'QWidget_isActiveWindow';
procedure QWidget_setActiveWindow; external QtShareName name QtNamePrefix + 'QWidget_setActiveWindow';
function QWidget_isFocusEnabled; external QtShareName name QtNamePrefix + 'QWidget_isFocusEnabled';
function QWidget_focusPolicy; external QtShareName name QtNamePrefix + 'QWidget_focusPolicy';
procedure QWidget_setFocusPolicy; external QtShareName name QtNamePrefix + 'QWidget_setFocusPolicy';
function QWidget_hasFocus; external QtShareName name QtNamePrefix + 'QWidget_hasFocus';
procedure QWidget_setTabOrder; external QtShareName name QtNamePrefix + 'QWidget_setTabOrder';
procedure QWidget_setFocusProxy; external QtShareName name QtNamePrefix + 'QWidget_setFocusProxy';
function QWidget_focusProxy; external QtShareName name QtNamePrefix + 'QWidget_focusProxy';
procedure QWidget_grabMouse(handle: QWidgetH); external QtShareName name QtNamePrefix + 'QWidget_grabMouse';
procedure QWidget_grabMouse(handle: QWidgetH; p1: QCursorH); external QtShareName name QtNamePrefix + 'QWidget_grabMouse2';
procedure QWidget_releaseMouse; external QtShareName name QtNamePrefix + 'QWidget_releaseMouse';
procedure QWidget_grabKeyboard; external QtShareName name QtNamePrefix + 'QWidget_grabKeyboard';
procedure QWidget_releaseKeyboard; external QtShareName name QtNamePrefix + 'QWidget_releaseKeyboard';
function QWidget_mouseGrabber; external QtShareName name QtNamePrefix + 'QWidget_mouseGrabber';
function QWidget_keyboardGrabber; external QtShareName name QtNamePrefix + 'QWidget_keyboardGrabber';
function QWidget_isUpdatesEnabled; external QtShareName name QtNamePrefix + 'QWidget_isUpdatesEnabled';
procedure QWidget_setUpdatesEnabled; external QtShareName name QtNamePrefix + 'QWidget_setUpdatesEnabled';
procedure QWidget_update(handle: QWidgetH); external QtShareName name QtNamePrefix + 'QWidget_update';
procedure QWidget_update(handle: QWidgetH; x: Integer; y: Integer; w: Integer; h: Integer); external QtShareName name QtNamePrefix + 'QWidget_update2';
procedure QWidget_update(handle: QWidgetH; p1: PRect); external QtShareName name QtNamePrefix + 'QWidget_update3';
procedure QWidget_repaint(handle: QWidgetH); external QtShareName name QtNamePrefix + 'QWidget_repaint';
procedure QWidget_repaint(handle: QWidgetH; erase: Boolean); external QtShareName name QtNamePrefix + 'QWidget_repaint2';
procedure QWidget_repaint(handle: QWidgetH; x: Integer; y: Integer; w: Integer; h: Integer; erase: Boolean); external QtShareName name QtNamePrefix + 'QWidget_repaint3';
procedure QWidget_repaint(handle: QWidgetH; p1: PRect; erase: Boolean); external QtShareName name QtNamePrefix + 'QWidget_repaint4';
procedure QWidget_repaint(handle: QWidgetH; p1: QRegionH; erase: Boolean); external QtShareName name QtNamePrefix + 'QWidget_repaint5';
procedure QWidget_show; external QtShareName name QtNamePrefix + 'QWidget_show';
procedure QWidget_hide; external QtShareName name QtNamePrefix + 'QWidget_hide';
procedure QWidget_iconify; external QtShareName name QtNamePrefix + 'QWidget_iconify';
procedure QWidget_showMinimized; external QtShareName name QtNamePrefix + 'QWidget_showMinimized';
procedure QWidget_showMaximized; external QtShareName name QtNamePrefix + 'QWidget_showMaximized';
procedure QWidget_showFullScreen; external QtShareName name QtNamePrefix + 'QWidget_showFullScreen';
procedure QWidget_showNormal; external QtShareName name QtNamePrefix + 'QWidget_showNormal';
procedure QWidget_polish; external QtShareName name QtNamePrefix + 'QWidget_polish';
procedure QWidget_constPolish; external QtShareName name QtNamePrefix + 'QWidget_constPolish';
function QWidget_close(handle: QWidgetH): Boolean; external QtShareName name QtNamePrefix + 'QWidget_close';
procedure QWidget_raise; external QtShareName name QtNamePrefix + 'QWidget_raise';
procedure QWidget_lower; external QtShareName name QtNamePrefix + 'QWidget_lower';
procedure QWidget_stackUnder; external QtShareName name QtNamePrefix + 'QWidget_stackUnder';
procedure QWidget_move(handle: QWidgetH; x: Integer; y: Integer); external QtShareName name QtNamePrefix + 'QWidget_move';
procedure QWidget_move(handle: QWidgetH; p1: PPoint); external QtShareName name QtNamePrefix + 'QWidget_move2';
procedure QWidget_resize(handle: QWidgetH; w: Integer; h: Integer); external QtShareName name QtNamePrefix + 'QWidget_resize';
procedure QWidget_resize(handle: QWidgetH; p1: PSize); external QtShareName name QtNamePrefix + 'QWidget_resize2';
procedure QWidget_setGeometry(handle: QWidgetH; x: Integer; y: Integer; w: Integer; h: Integer); external QtShareName name QtNamePrefix + 'QWidget_setGeometry';
procedure QWidget_setGeometry(handle: QWidgetH; p1: PRect); external QtShareName name QtNamePrefix + 'QWidget_setGeometry2';
function QWidget_close(handle: QWidgetH; alsoDelete: Boolean): Boolean; external QtShareName name QtNamePrefix + 'QWidget_close2';
function QWidget_isVisible; external QtShareName name QtNamePrefix + 'QWidget_isVisible';
function QWidget_isVisibleTo; external QtShareName name QtNamePrefix + 'QWidget_isVisibleTo';
function QWidget_isVisibleToTLW; external QtShareName name QtNamePrefix + 'QWidget_isVisibleToTLW';
procedure QWidget_visibleRect; external QtShareName name QtNamePrefix + 'QWidget_visibleRect';
function QWidget_isHidden; external QtShareName name QtNamePrefix + 'QWidget_isHidden';
function QWidget_isMinimized; external QtShareName name QtNamePrefix + 'QWidget_isMinimized';
function QWidget_isMaximized; external QtShareName name QtNamePrefix + 'QWidget_isMaximized';
procedure QWidget_sizeHint; external QtShareName name QtNamePrefix + 'QWidget_sizeHint';
procedure QWidget_minimumSizeHint; external QtShareName name QtNamePrefix + 'QWidget_minimumSizeHint';
procedure QWidget_sizePolicy; external QtShareName name QtNamePrefix + 'QWidget_sizePolicy';
procedure QWidget_setSizePolicy; external QtShareName name QtNamePrefix + 'QWidget_setSizePolicy';
function QWidget_heightForWidth; external QtShareName name QtNamePrefix + 'QWidget_heightForWidth';
procedure QWidget_adjustSize; external QtShareName name QtNamePrefix + 'QWidget_adjustSize';
function QWidget_layout; external QtShareName name QtNamePrefix + 'QWidget_layout';
procedure QWidget_updateGeometry; external QtShareName name QtNamePrefix + 'QWidget_updateGeometry';
procedure QWidget_reparent(handle: QWidgetH; parent: QWidgetH; p2: WFlags; p3: PPoint; showIt: Boolean); external QtShareName name QtNamePrefix + 'QWidget_reparent';
procedure QWidget_reparent(handle: QWidgetH; parent: QWidgetH; p2: PPoint; showIt: Boolean); external QtShareName name QtNamePrefix + 'QWidget_reparent2';
procedure QWidget_recreate; external QtShareName name QtNamePrefix + 'QWidget_recreate';
procedure QWidget_erase(handle: QWidgetH); external QtShareName name QtNamePrefix + 'QWidget_erase';
procedure QWidget_erase(handle: QWidgetH; x: Integer; y: Integer; w: Integer; h: Integer); external QtShareName name QtNamePrefix + 'QWidget_erase2';
procedure QWidget_erase(handle: QWidgetH; p1: PRect); external QtShareName name QtNamePrefix + 'QWidget_erase3';
procedure QWidget_erase(handle: QWidgetH; p1: QRegionH); external QtShareName name QtNamePrefix + 'QWidget_erase4';
procedure QWidget_scroll(handle: QWidgetH; dx: Integer; dy: Integer); external QtShareName name QtNamePrefix + 'QWidget_scroll';
procedure QWidget_scroll(handle: QWidgetH; dx: Integer; dy: Integer; p3: PRect); external QtShareName name QtNamePrefix + 'QWidget_scroll2';
procedure QWidget_drawText(handle: QWidgetH; x: Integer; y: Integer; p3: PWideString); external QtShareName name QtNamePrefix + 'QWidget_drawText';
procedure QWidget_drawText(handle: QWidgetH; p1: PPoint; p2: PWideString); external QtShareName name QtNamePrefix + 'QWidget_drawText2';
function QWidget_focusWidget; external QtShareName name QtNamePrefix + 'QWidget_focusWidget';
procedure QWidget_microFocusHint; external QtShareName name QtNamePrefix + 'QWidget_microFocusHint';
function QWidget_acceptDrops; external QtShareName name QtNamePrefix + 'QWidget_acceptDrops';
procedure QWidget_setAcceptDrops; external QtShareName name QtNamePrefix + 'QWidget_setAcceptDrops';
procedure QWidget_setAutoMask; external QtShareName name QtNamePrefix + 'QWidget_setAutoMask';
function QWidget_autoMask; external QtShareName name QtNamePrefix + 'QWidget_autoMask';
procedure QWidget_setBackgroundOrigin; external QtShareName name QtNamePrefix + 'QWidget_setBackgroundOrigin';
function QWidget_backgroundOrigin; external QtShareName name QtNamePrefix + 'QWidget_backgroundOrigin';
function QWidget_customWhatsThis; external QtShareName name QtNamePrefix + 'QWidget_customWhatsThis';
function QWidget_parentWidget; external QtShareName name QtNamePrefix + 'QWidget_parentWidget';
function QWidget_testWState; external QtShareName name QtNamePrefix + 'QWidget_testWState';
function QWidget_testWFlags; external QtShareName name QtNamePrefix + 'QWidget_testWFlags';
function QWidget_find; external QtShareName name QtNamePrefix + 'QWidget_find';
function QWidget_wmapper; external QtShareName name QtNamePrefix + 'QWidget_wmapper';
procedure QWidget_setPalette(handle: QWidgetH; p1: QPaletteH; iReallyMeanIt: Boolean); external QtShareName name QtNamePrefix + 'QWidget_setPalette2';
procedure QWidget_setFont(handle: QWidgetH; p1: QFontH; iReallyMeanIt: Boolean); external QtShareName name QtNamePrefix + 'QWidget_setFont2';
function QWidget_to_QPaintDevice; external QtSharename name QtNamePrefix + 'QWidget_to_QPaintDevice';
function QApplication_argc; external QtShareName name QtNamePrefix + 'QApplication_argc';
function QApplication_argv; external QtShareName name QtNamePrefix + 'QApplication_argv';
function QApplication_style; external QtShareName name QtNamePrefix + 'QApplication_style';
procedure QApplication_setStyle; external QtShareName name QtNamePrefix + 'QApplication_setStyle';
function QApplication_colorSpec; external QtShareName name QtNamePrefix + 'QApplication_colorSpec';
procedure QApplication_setColorSpec; external QtShareName name QtNamePrefix + 'QApplication_setColorSpec';
function QApplication_overrideCursor; external QtShareName name QtNamePrefix + 'QApplication_overrideCursor';
procedure QApplication_setOverrideCursor; external QtShareName name QtNamePrefix + 'QApplication_setOverrideCursor';
procedure QApplication_restoreOverrideCursor; external QtShareName name QtNamePrefix + 'QApplication_restoreOverrideCursor';
function QApplication_hasGlobalMouseTracking; external QtShareName name QtNamePrefix + 'QApplication_hasGlobalMouseTracking';
procedure QApplication_setGlobalMouseTracking; external QtShareName name QtNamePrefix + 'QApplication_setGlobalMouseTracking';
procedure QApplication_palette; external QtShareName name QtNamePrefix + 'QApplication_palette';
procedure QApplication_setPalette; external QtShareName name QtNamePrefix + 'QApplication_setPalette';
procedure QApplication_font; external QtShareName name QtNamePrefix + 'QApplication_font';
procedure QApplication_setFont; external QtShareName name QtNamePrefix + 'QApplication_setFont';
procedure QApplication_fontMetrics; external QtShareName name QtNamePrefix + 'QApplication_fontMetrics';
function QApplication_mainWidget; external QtShareName name QtNamePrefix + 'QApplication_mainWidget';
procedure QApplication_setMainWidget; external QtShareName name QtNamePrefix + 'QApplication_setMainWidget';
procedure QApplication_polish; external QtShareName name QtNamePrefix + 'QApplication_polish';
function QApplication_allWidgets; external QtShareName name QtNamePrefix + 'QApplication_allWidgets';
function QApplication_topLevelWidgets; external QtShareName name QtNamePrefix + 'QApplication_topLevelWidgets';
function QApplication_desktop; external QtShareName name QtNamePrefix + 'QApplication_desktop';
function QApplication_activePopupWidget; external QtShareName name QtNamePrefix + 'QApplication_activePopupWidget';
function QApplication_activeModalWidget; external QtShareName name QtNamePrefix + 'QApplication_activeModalWidget';
function QApplication_clipboard; external QtShareName name QtNamePrefix + 'QApplication_clipboard';
function QApplication_focusWidget; external QtShareName name QtNamePrefix + 'QApplication_focusWidget';
function QApplication_activeWindow; external QtShareName name QtNamePrefix + 'QApplication_activeWindow';
function QApplication_widgetAt(x: Integer; y: Integer; child: Boolean): QWidgetH; external QtShareName name QtNamePrefix + 'QApplication_widgetAt';
function QApplication_widgetAt(p1: PPoint; child: Boolean): QWidgetH; external QtShareName name QtNamePrefix + 'QApplication_widgetAt2';
function QApplication_exec; external QtShareName name QtNamePrefix + 'QApplication_exec';
procedure QApplication_processEvents(handle: QApplicationH); external QtShareName name QtNamePrefix + 'QApplication_processEvents';
procedure QApplication_processEvents(handle: QApplicationH; maxtime: Integer); external QtShareName name QtNamePrefix + 'QApplication_processEvents2';
procedure QApplication_processOneEvent; external QtShareName name QtNamePrefix + 'QApplication_processOneEvent';
function QApplication_enter_loop; external QtShareName name QtNamePrefix + 'QApplication_enter_loop';
procedure QApplication_exit_loop; external QtShareName name QtNamePrefix + 'QApplication_exit_loop';
function QApplication_loopLevel; external QtShareName name QtNamePrefix + 'QApplication_loopLevel';
procedure QApplication_exit; external QtShareName name QtNamePrefix + 'QApplication_exit';
function QApplication_sendEvent; external QtShareName name QtNamePrefix + 'QApplication_sendEvent';
procedure QApplication_postEvent; external QtShareName name QtNamePrefix + 'QApplication_postEvent';
procedure QApplication_sendPostedEvents(receiver: QObjectH; event_type: Integer); external QtShareName name QtNamePrefix + 'QApplication_sendPostedEvents';
procedure QApplication_sendPostedEvents(); external QtShareName name QtNamePrefix + 'QApplication_sendPostedEvents2';
procedure QApplication_removePostedEvents; external QtShareName name QtNamePrefix + 'QApplication_removePostedEvents';
function QApplication_notify; external QtShareName name QtNamePrefix + 'QApplication_notify';
function QApplication_startingUp; external QtShareName name QtNamePrefix + 'QApplication_startingUp';
function QApplication_closingDown; external QtShareName name QtNamePrefix + 'QApplication_closingDown';
procedure QApplication_flushX; external QtShareName name QtNamePrefix + 'QApplication_flushX';
procedure QApplication_syncX; external QtShareName name QtNamePrefix + 'QApplication_syncX';
procedure QApplication_beep; external QtShareName name QtNamePrefix + 'QApplication_beep';
procedure QApplication_setDefaultCodec; external QtShareName name QtNamePrefix + 'QApplication_setDefaultCodec';
function QApplication_defaultCodec; external QtShareName name QtNamePrefix + 'QApplication_defaultCodec';
procedure QApplication_installTranslator; external QtShareName name QtNamePrefix + 'QApplication_installTranslator';
procedure QApplication_removeTranslator; external QtShareName name QtNamePrefix + 'QApplication_removeTranslator';
procedure QApplication_translate(handle: QApplicationH; retval: PWideString; p1: PAnsiChar; p2: PAnsiChar); external QtShareName name QtNamePrefix + 'QApplication_translate';
procedure QApplication_translate(handle: QApplicationH; retval: PWideString; p1: PAnsiChar; p2: PAnsiChar; p3: PAnsiChar); external QtShareName name QtNamePrefix + 'QApplication_translate2';
procedure QApplication_setWinStyleHighlightColor; external QtShareName name QtNamePrefix + 'QApplication_setWinStyleHighlightColor';
function QApplication_winStyleHighlightColor; external QtShareName name QtNamePrefix + 'QApplication_winStyleHighlightColor';
procedure QApplication_setDesktopSettingsAware; external QtShareName name QtNamePrefix + 'QApplication_setDesktopSettingsAware';
function QApplication_desktopSettingsAware; external QtShareName name QtNamePrefix + 'QApplication_desktopSettingsAware';
procedure QApplication_setCursorFlashTime; external QtShareName name QtNamePrefix + 'QApplication_setCursorFlashTime';
function QApplication_cursorFlashTime; external QtShareName name QtNamePrefix + 'QApplication_cursorFlashTime';
procedure QApplication_setDoubleClickInterval; external QtShareName name QtNamePrefix + 'QApplication_setDoubleClickInterval';
function QApplication_doubleClickInterval; external QtShareName name QtNamePrefix + 'QApplication_doubleClickInterval';
procedure QApplication_setWheelScrollLines; external QtShareName name QtNamePrefix + 'QApplication_setWheelScrollLines';
function QApplication_wheelScrollLines; external QtShareName name QtNamePrefix + 'QApplication_wheelScrollLines';
procedure QApplication_setGlobalStrut; external QtShareName name QtNamePrefix + 'QApplication_setGlobalStrut';
procedure QApplication_globalStrut; external QtShareName name QtNamePrefix + 'QApplication_globalStrut';
procedure QApplication_setStartDragTime; external QtShareName name QtNamePrefix + 'QApplication_setStartDragTime';
function QApplication_startDragTime; external QtShareName name QtNamePrefix + 'QApplication_startDragTime';
procedure QApplication_setStartDragDistance; external QtShareName name QtNamePrefix + 'QApplication_setStartDragDistance';
function QApplication_startDragDistance; external QtShareName name QtNamePrefix + 'QApplication_startDragDistance';
function QApplication_isEffectEnabled; external QtShareName name QtNamePrefix + 'QApplication_isEffectEnabled';
procedure QApplication_setEffectEnabled; external QtShareName name QtNamePrefix + 'QApplication_setEffectEnabled';
{$IFDEF MSWINDOWS}
function QApplication_winEventFilter; external QtShareName name QtNamePrefix + 'QApplication_winEventFilter';
{$ENDIF}
{$IFDEF LINUX}
function QApplication_x11EventFilter; external QtShareName name QtNamePrefix + 'QApplication_x11EventFilter';
{$ENDIF}
{$IFDEF LINUX}
function QApplication_x11ClientMessage; external QtShareName name QtNamePrefix + 'QApplication_x11ClientMessage';
{$ENDIF}
{$IFDEF LINUX}
function QApplication_x11ProcessEvent; external QtShareName name QtNamePrefix + 'QApplication_x11ProcessEvent';
{$ENDIF}
{$IFDEF MSWINDOWS}
function QApplication_winVersion; external QtShareName name QtNamePrefix + 'QApplication_winVersion';
{$ENDIF}
{$IFDEF MSWINDOWS}
procedure QApplication_winFocus; external QtShareName name QtNamePrefix + 'QApplication_winFocus';
{$ENDIF}
{$IFDEF MSWINDOWS}
procedure QApplication_winMouseButtonUp; external QtShareName name QtNamePrefix + 'QApplication_winMouseButtonUp';
{$ENDIF}
function QApplication_isSessionRestored; external QtShareName name QtNamePrefix + 'QApplication_isSessionRestored';
procedure QApplication_sessionId; external QtShareName name QtNamePrefix + 'QApplication_sessionId';
procedure QApplication_commitData; external QtShareName name QtNamePrefix + 'QApplication_commitData';
procedure QApplication_saveState; external QtShareName name QtNamePrefix + 'QApplication_saveState';
procedure QApplication_create_xim; external QtShareName name QtNamePrefix + 'QApplication_create_xim';
procedure QApplication_close_xim; external QtShareName name QtNamePrefix + 'QApplication_close_xim';
procedure QApplication_wakeUpGuiThread; external QtShareName name QtNamePrefix + 'QApplication_wakeUpGuiThread';
procedure QApplication_quit; external QtShareName name QtNamePrefix + 'QApplication_quit';
procedure QApplication_closeAllWindows; external QtShareName name QtNamePrefix + 'QApplication_closeAllWindows';
procedure QButton_destroy; external QtShareName name QtNamePrefix + 'QButton_destroy';
function QButton_create; external QtShareName name QtNamePrefix + 'QButton_create';
procedure QButton_text; external QtShareName name QtNamePrefix + 'QButton_text';
procedure QButton_setText; external QtShareName name QtNamePrefix + 'QButton_setText';
function QButton_pixmap; external QtShareName name QtNamePrefix + 'QButton_pixmap';
procedure QButton_setPixmap; external QtShareName name QtNamePrefix + 'QButton_setPixmap';
function QButton_accel; external QtShareName name QtNamePrefix + 'QButton_accel';
procedure QButton_setAccel; external QtShareName name QtNamePrefix + 'QButton_setAccel';
function QButton_isToggleButton; external QtShareName name QtNamePrefix + 'QButton_isToggleButton';
function QButton_toggleType; external QtShareName name QtNamePrefix + 'QButton_toggleType';
procedure QButton_setDown; external QtShareName name QtNamePrefix + 'QButton_setDown';
function QButton_isDown; external QtShareName name QtNamePrefix + 'QButton_isDown';
function QButton_isOn; external QtShareName name QtNamePrefix + 'QButton_isOn';
function QButton_state; external QtShareName name QtNamePrefix + 'QButton_state';
function QButton_autoResize; external QtShareName name QtNamePrefix + 'QButton_autoResize';
procedure QButton_setAutoResize; external QtShareName name QtNamePrefix + 'QButton_setAutoResize';
function QButton_autoRepeat; external QtShareName name QtNamePrefix + 'QButton_autoRepeat';
procedure QButton_setAutoRepeat; external QtShareName name QtNamePrefix + 'QButton_setAutoRepeat';
function QButton_isExclusiveToggle; external QtShareName name QtNamePrefix + 'QButton_isExclusiveToggle';
function QButton_focusNextPrevChild; external QtShareName name QtNamePrefix + 'QButton_focusNextPrevChild';
function QButton_group; external QtShareName name QtNamePrefix + 'QButton_group';
procedure QButton_animateClick; external QtShareName name QtNamePrefix + 'QButton_animateClick';
procedure QButton_toggle; external QtShareName name QtNamePrefix + 'QButton_toggle';
procedure QComboBox_destroy; external QtShareName name QtNamePrefix + 'QComboBox_destroy';
function QComboBox_create(parent: QWidgetH; name: PAnsiChar): QComboBoxH; external QtShareName name QtNamePrefix + 'QComboBox_create';
function QComboBox_create(rw: Boolean; parent: QWidgetH; name: PAnsiChar): QComboBoxH; external QtShareName name QtNamePrefix + 'QComboBox_create2';
function QComboBox_count; external QtShareName name QtNamePrefix + 'QComboBox_count';
procedure QComboBox_insertStringList; external QtShareName name QtNamePrefix + 'QComboBox_insertStringList';
procedure QComboBox_insertStrList(handle: QComboBoxH; p1: QStrListH; index: Integer); external QtShareName name QtNamePrefix + 'QComboBox_insertStrList';
procedure QComboBox_insertStrList(handle: QComboBoxH; p1: PPAnsiChar; numStrings: Integer; index: Integer); external QtShareName name QtNamePrefix + 'QComboBox_insertStrList3';
procedure QComboBox_insertItem(handle: QComboBoxH; text: PWideString; index: Integer); external QtShareName name QtNamePrefix + 'QComboBox_insertItem';
procedure QComboBox_insertItem(handle: QComboBoxH; pixmap: QPixmapH; index: Integer); external QtShareName name QtNamePrefix + 'QComboBox_insertItem2';
procedure QComboBox_insertItem(handle: QComboBoxH; pixmap: QPixmapH; text: PWideString; index: Integer); external QtShareName name QtNamePrefix + 'QComboBox_insertItem3';
procedure QComboBox_removeItem; external QtShareName name QtNamePrefix + 'QComboBox_removeItem';
procedure QComboBox_clear; external QtShareName name QtNamePrefix + 'QComboBox_clear';
procedure QComboBox_currentText; external QtShareName name QtNamePrefix + 'QComboBox_currentText';
procedure QComboBox_text; external QtShareName name QtNamePrefix + 'QComboBox_text';
function QComboBox_pixmap; external QtShareName name QtNamePrefix + 'QComboBox_pixmap';
procedure QComboBox_changeItem(handle: QComboBoxH; text: PWideString; index: Integer); external QtShareName name QtNamePrefix + 'QComboBox_changeItem';
procedure QComboBox_changeItem(handle: QComboBoxH; pixmap: QPixmapH; index: Integer); external QtShareName name QtNamePrefix + 'QComboBox_changeItem2';
procedure QComboBox_changeItem(handle: QComboBoxH; pixmap: QPixmapH; text: PWideString; index: Integer); external QtShareName name QtNamePrefix + 'QComboBox_changeItem3';
function QComboBox_currentItem; external QtShareName name QtNamePrefix + 'QComboBox_currentItem';
procedure QComboBox_setCurrentItem; external QtShareName name QtNamePrefix + 'QComboBox_setCurrentItem';
function QComboBox_autoResize; external QtShareName name QtNamePrefix + 'QComboBox_autoResize';
procedure QComboBox_setAutoResize; external QtShareName name QtNamePrefix + 'QComboBox_setAutoResize';
procedure QComboBox_sizeHint; external QtShareName name QtNamePrefix + 'QComboBox_sizeHint';
procedure QComboBox_sizePolicy; external QtShareName name QtNamePrefix + 'QComboBox_sizePolicy';
procedure QComboBox_setBackgroundColor; external QtShareName name QtNamePrefix + 'QComboBox_setBackgroundColor';
procedure QComboBox_setPalette; external QtShareName name QtNamePrefix + 'QComboBox_setPalette';
procedure QComboBox_setFont; external QtShareName name QtNamePrefix + 'QComboBox_setFont';
procedure QComboBox_setEnabled; external QtShareName name QtNamePrefix + 'QComboBox_setEnabled';
procedure QComboBox_setSizeLimit; external QtShareName name QtNamePrefix + 'QComboBox_setSizeLimit';
function QComboBox_sizeLimit; external QtShareName name QtNamePrefix + 'QComboBox_sizeLimit';
procedure QComboBox_setMaxCount; external QtShareName name QtNamePrefix + 'QComboBox_setMaxCount';
function QComboBox_maxCount; external QtShareName name QtNamePrefix + 'QComboBox_maxCount';
procedure QComboBox_setInsertionPolicy; external QtShareName name QtNamePrefix + 'QComboBox_setInsertionPolicy';
function QComboBox_insertionPolicy; external QtShareName name QtNamePrefix + 'QComboBox_insertionPolicy';
procedure QComboBox_setValidator; external QtShareName name QtNamePrefix + 'QComboBox_setValidator';
function QComboBox_validator; external QtShareName name QtNamePrefix + 'QComboBox_validator';
procedure QComboBox_setListBox; external QtShareName name QtNamePrefix + 'QComboBox_setListBox';
function QComboBox_listBox; external QtShareName name QtNamePrefix + 'QComboBox_listBox';
function QComboBox_lineEdit; external QtShareName name QtNamePrefix + 'QComboBox_lineEdit';
procedure QComboBox_setAutoCompletion; external QtShareName name QtNamePrefix + 'QComboBox_setAutoCompletion';
function QComboBox_autoCompletion; external QtShareName name QtNamePrefix + 'QComboBox_autoCompletion';
function QComboBox_eventFilter; external QtShareName name QtNamePrefix + 'QComboBox_eventFilter';
procedure QComboBox_setDuplicatesEnabled; external QtShareName name QtNamePrefix + 'QComboBox_setDuplicatesEnabled';
function QComboBox_duplicatesEnabled; external QtShareName name QtNamePrefix + 'QComboBox_duplicatesEnabled';
function QComboBox_editable; external QtShareName name QtNamePrefix + 'QComboBox_editable';
procedure QComboBox_setEditable; external QtShareName name QtNamePrefix + 'QComboBox_setEditable';
procedure QComboBox_clearValidator; external QtShareName name QtNamePrefix + 'QComboBox_clearValidator';
procedure QComboBox_clearEdit; external QtShareName name QtNamePrefix + 'QComboBox_clearEdit';
procedure QComboBox_setEditText; external QtShareName name QtNamePrefix + 'QComboBox_setEditText';
procedure QDialog_destroy; external QtShareName name QtNamePrefix + 'QDialog_destroy';
function QDialog_create; external QtShareName name QtNamePrefix + 'QDialog_create';
function QDialog_exec; external QtShareName name QtNamePrefix + 'QDialog_exec';
function QDialog_result; external QtShareName name QtNamePrefix + 'QDialog_result';
procedure QDialog_show; external QtShareName name QtNamePrefix + 'QDialog_show';
procedure QDialog_hide; external QtShareName name QtNamePrefix + 'QDialog_hide';
procedure QDialog_move(handle: QDialogH; x: Integer; y: Integer); external QtShareName name QtNamePrefix + 'QDialog_move';
procedure QDialog_move(handle: QDialogH; p: PPoint); external QtShareName name QtNamePrefix + 'QDialog_move2';
procedure QDialog_resize(handle: QDialogH; w: Integer; h: Integer); external QtShareName name QtNamePrefix + 'QDialog_resize';
procedure QDialog_resize(handle: QDialogH; p1: PSize); external QtShareName name QtNamePrefix + 'QDialog_resize2';
procedure QDialog_setGeometry(handle: QDialogH; x: Integer; y: Integer; w: Integer; h: Integer); external QtShareName name QtNamePrefix + 'QDialog_setGeometry';
procedure QDialog_setGeometry(handle: QDialogH; p1: PRect); external QtShareName name QtNamePrefix + 'QDialog_setGeometry2';
procedure QDialog_setOrientation; external QtShareName name QtNamePrefix + 'QDialog_setOrientation';
function QDialog_orientation; external QtShareName name QtNamePrefix + 'QDialog_orientation';
procedure QDialog_setExtension; external QtShareName name QtNamePrefix + 'QDialog_setExtension';
function QDialog_extension; external QtShareName name QtNamePrefix + 'QDialog_extension';
procedure QDialog_sizeHint; external QtShareName name QtNamePrefix + 'QDialog_sizeHint';
procedure QDialog_minimumSizeHint; external QtShareName name QtNamePrefix + 'QDialog_minimumSizeHint';
procedure QDialog_setSizeGripEnabled; external QtShareName name QtNamePrefix + 'QDialog_setSizeGripEnabled';
function QDialog_isSizeGripEnabled; external QtShareName name QtNamePrefix + 'QDialog_isSizeGripEnabled';
procedure QDragObject_destroy; external QtShareName name QtNamePrefix + 'QDragObject_destroy';
function QDragObject_drag; external QtShareName name QtNamePrefix + 'QDragObject_drag';
function QDragObject_dragMove; external QtShareName name QtNamePrefix + 'QDragObject_dragMove';
procedure QDragObject_dragCopy; external QtShareName name QtNamePrefix + 'QDragObject_dragCopy';
procedure QDragObject_setPixmap(handle: QDragObjectH; p1: QPixmapH); external QtShareName name QtNamePrefix + 'QDragObject_setPixmap';
procedure QDragObject_setPixmap(handle: QDragObjectH; p1: QPixmapH; hotspot: PPoint); external QtShareName name QtNamePrefix + 'QDragObject_setPixmap2';
procedure QDragObject_pixmap; external QtShareName name QtNamePrefix + 'QDragObject_pixmap';
procedure QDragObject_pixmapHotSpot; external QtShareName name QtNamePrefix + 'QDragObject_pixmapHotSpot';
function QDragObject_source; external QtShareName name QtNamePrefix + 'QDragObject_source';
function QDragObject_target; external QtShareName name QtNamePrefix + 'QDragObject_target';
procedure QDragObject_setTarget; external QtShareName name QtNamePrefix + 'QDragObject_setTarget';
function QDragObject_to_QMimeSource; external QtSharename name QtNamePrefix + 'QDragObject_to_QMimeSource';
procedure QStoredDrag_destroy; external QtShareName name QtNamePrefix + 'QStoredDrag_destroy';
function QStoredDrag_create; external QtShareName name QtNamePrefix + 'QStoredDrag_create';
procedure QStoredDrag_setEncodedData; external QtShareName name QtNamePrefix + 'QStoredDrag_setEncodedData';
function QStoredDrag_format; external QtShareName name QtNamePrefix + 'QStoredDrag_format';
procedure QStoredDrag_encodedData; external QtShareName name QtNamePrefix + 'QStoredDrag_encodedData';
procedure QTextDrag_destroy; external QtShareName name QtNamePrefix + 'QTextDrag_destroy';
function QTextDrag_create(p1: PWideString; dragSource: QWidgetH; name: PAnsiChar): QTextDragH; external QtShareName name QtNamePrefix + 'QTextDrag_create';
function QTextDrag_create(dragSource: QWidgetH; name: PAnsiChar): QTextDragH; external QtShareName name QtNamePrefix + 'QTextDrag_create2';
procedure QTextDrag_setText; external QtShareName name QtNamePrefix + 'QTextDrag_setText';
procedure QTextDrag_setSubtype; external QtShareName name QtNamePrefix + 'QTextDrag_setSubtype';
function QTextDrag_format; external QtShareName name QtNamePrefix + 'QTextDrag_format';
procedure QTextDrag_encodedData; external QtShareName name QtNamePrefix + 'QTextDrag_encodedData';
function QTextDrag_canDecode; external QtShareName name QtNamePrefix + 'QTextDrag_canDecode';
function QTextDrag_decode(e: QMimeSourceH; s: PWideString): Boolean; external QtShareName name QtNamePrefix + 'QTextDrag_decode';
function QTextDrag_decode(e: QMimeSourceH; s: PWideString; subtype: PAnsiString): Boolean; external QtShareName name QtNamePrefix + 'QTextDrag_decode2';
procedure QImageDrag_destroy; external QtShareName name QtNamePrefix + 'QImageDrag_destroy';
function QImageDrag_create(image: QImageH; dragSource: QWidgetH; name: PAnsiChar): QImageDragH; external QtShareName name QtNamePrefix + 'QImageDrag_create';
function QImageDrag_create(dragSource: QWidgetH; name: PAnsiChar): QImageDragH; external QtShareName name QtNamePrefix + 'QImageDrag_create2';
procedure QImageDrag_setImage; external QtShareName name QtNamePrefix + 'QImageDrag_setImage';
function QImageDrag_format; external QtShareName name QtNamePrefix + 'QImageDrag_format';
procedure QImageDrag_encodedData; external QtShareName name QtNamePrefix + 'QImageDrag_encodedData';
function QImageDrag_canDecode; external QtShareName name QtNamePrefix + 'QImageDrag_canDecode';
function QImageDrag_decode(e: QMimeSourceH; i: QImageH): Boolean; external QtShareName name QtNamePrefix + 'QImageDrag_decode';
function QImageDrag_decode(e: QMimeSourceH; i: QPixmapH): Boolean; external QtShareName name QtNamePrefix + 'QImageDrag_decode2';
procedure QUriDrag_destroy; external QtShareName name QtNamePrefix + 'QUriDrag_destroy';
function QUriDrag_create(uris: QStrListH; dragSource: QWidgetH; name: PAnsiChar): QUriDragH; external QtShareName name QtNamePrefix + 'QUriDrag_create';
function QUriDrag_create(dragSource: QWidgetH; name: PAnsiChar): QUriDragH; external QtShareName name QtNamePrefix + 'QUriDrag_create2';
procedure QUriDrag_setFilenames; external QtShareName name QtNamePrefix + 'QUriDrag_setFilenames';
procedure QUriDrag_setUnicodeUris; external QtShareName name QtNamePrefix + 'QUriDrag_setUnicodeUris';
procedure QUriDrag_setUris; external QtShareName name QtNamePrefix + 'QUriDrag_setUris';
procedure QUriDrag_uriToLocalFile; external QtShareName name QtNamePrefix + 'QUriDrag_uriToLocalFile';
procedure QUriDrag_localFileToUri; external QtShareName name QtNamePrefix + 'QUriDrag_localFileToUri';
procedure QUriDrag_uriToUnicodeUri; external QtShareName name QtNamePrefix + 'QUriDrag_uriToUnicodeUri';
procedure QUriDrag_unicodeUriToUri; external QtShareName name QtNamePrefix + 'QUriDrag_unicodeUriToUri';
function QUriDrag_canDecode; external QtShareName name QtNamePrefix + 'QUriDrag_canDecode';
function QUriDrag_decode; external QtShareName name QtNamePrefix + 'QUriDrag_decode';
function QUriDrag_decodeToUnicodeUris; external QtShareName name QtNamePrefix + 'QUriDrag_decodeToUnicodeUris';
function QUriDrag_decodeLocalFiles; external QtShareName name QtNamePrefix + 'QUriDrag_decodeLocalFiles';
procedure QColorDrag_destroy; external QtShareName name QtNamePrefix + 'QColorDrag_destroy';
function QColorDrag_create(col: QColorH; dragsource: QWidgetH; name: PAnsiChar): QColorDragH; external QtShareName name QtNamePrefix + 'QColorDrag_create';
function QColorDrag_create(dragSource: QWidgetH; name: PAnsiChar): QColorDragH; external QtShareName name QtNamePrefix + 'QColorDrag_create2';
procedure QColorDrag_setColor; external QtShareName name QtNamePrefix + 'QColorDrag_setColor';
function QColorDrag_canDecode; external QtShareName name QtNamePrefix + 'QColorDrag_canDecode';
function QColorDrag_decode; external QtShareName name QtNamePrefix + 'QColorDrag_decode';
procedure QEvent_destroy; external QtShareName name QtNamePrefix + 'QEvent_destroy';
function QEvent_create; external QtShareName name QtNamePrefix + 'QEvent_create';
function QEvent_type; external QtShareName name QtNamePrefix + 'QEvent_type';
procedure QTimerEvent_destroy; external QtShareName name QtNamePrefix + 'QTimerEvent_destroy';
function QTimerEvent_create; external QtShareName name QtNamePrefix + 'QTimerEvent_create';
function QTimerEvent_timerId; external QtShareName name QtNamePrefix + 'QTimerEvent_timerId';
procedure QMouseEvent_destroy; external QtShareName name QtNamePrefix + 'QMouseEvent_destroy';
function QMouseEvent_create(_type: QEventType; pos: PPoint; button: Integer; state: Integer): QMouseEventH; external QtShareName name QtNamePrefix + 'QMouseEvent_create';
function QMouseEvent_create(_type: QEventType; pos: PPoint; globalPos: PPoint; button: Integer; state: Integer): QMouseEventH; external QtShareName name QtNamePrefix + 'QMouseEvent_create2';
function QMouseEvent_pos; external QtShareName name QtNamePrefix + 'QMouseEvent_pos';
function QMouseEvent_globalPos; external QtShareName name QtNamePrefix + 'QMouseEvent_globalPos';
function QMouseEvent_x; external QtShareName name QtNamePrefix + 'QMouseEvent_x';
function QMouseEvent_y; external QtShareName name QtNamePrefix + 'QMouseEvent_y';
function QMouseEvent_globalX; external QtShareName name QtNamePrefix + 'QMouseEvent_globalX';
function QMouseEvent_globalY; external QtShareName name QtNamePrefix + 'QMouseEvent_globalY';
function QMouseEvent_button; external QtShareName name QtNamePrefix + 'QMouseEvent_button';
function QMouseEvent_state; external QtShareName name QtNamePrefix + 'QMouseEvent_state';
function QMouseEvent_stateAfter; external QtShareName name QtNamePrefix + 'QMouseEvent_stateAfter';
procedure QWheelEvent_destroy; external QtShareName name QtNamePrefix + 'QWheelEvent_destroy';
function QWheelEvent_create(pos: PPoint; delta: Integer; state: Integer): QWheelEventH; external QtShareName name QtNamePrefix + 'QWheelEvent_create';
function QWheelEvent_create(pos: PPoint; globalPos: PPoint; delta: Integer; state: Integer): QWheelEventH; external QtShareName name QtNamePrefix + 'QWheelEvent_create2';
function QWheelEvent_delta; external QtShareName name QtNamePrefix + 'QWheelEvent_delta';
function QWheelEvent_pos; external QtShareName name QtNamePrefix + 'QWheelEvent_pos';
function QWheelEvent_globalPos; external QtShareName name QtNamePrefix + 'QWheelEvent_globalPos';
function QWheelEvent_x; external QtShareName name QtNamePrefix + 'QWheelEvent_x';
function QWheelEvent_y; external QtShareName name QtNamePrefix + 'QWheelEvent_y';
function QWheelEvent_globalX; external QtShareName name QtNamePrefix + 'QWheelEvent_globalX';
function QWheelEvent_globalY; external QtShareName name QtNamePrefix + 'QWheelEvent_globalY';
function QWheelEvent_state; external QtShareName name QtNamePrefix + 'QWheelEvent_state';
function QWheelEvent_isAccepted; external QtShareName name QtNamePrefix + 'QWheelEvent_isAccepted';
procedure QWheelEvent_accept; external QtShareName name QtNamePrefix + 'QWheelEvent_accept';
procedure QWheelEvent_ignore; external QtShareName name QtNamePrefix + 'QWheelEvent_ignore';
procedure QKeyEvent_destroy; external QtShareName name QtNamePrefix + 'QKeyEvent_destroy';
function QKeyEvent_create; external QtShareName name QtNamePrefix + 'QKeyEvent_create';
function QKeyEvent_key; external QtShareName name QtNamePrefix + 'QKeyEvent_key';
function QKeyEvent_ascii; external QtShareName name QtNamePrefix + 'QKeyEvent_ascii';
function QKeyEvent_state; external QtShareName name QtNamePrefix + 'QKeyEvent_state';
function QKeyEvent_stateAfter; external QtShareName name QtNamePrefix + 'QKeyEvent_stateAfter';
function QKeyEvent_isAccepted; external QtShareName name QtNamePrefix + 'QKeyEvent_isAccepted';
procedure QKeyEvent_text; external QtShareName name QtNamePrefix + 'QKeyEvent_text';
function QKeyEvent_isAutoRepeat; external QtShareName name QtNamePrefix + 'QKeyEvent_isAutoRepeat';
function QKeyEvent_count; external QtShareName name QtNamePrefix + 'QKeyEvent_count';
procedure QKeyEvent_accept; external QtShareName name QtNamePrefix + 'QKeyEvent_accept';
procedure QKeyEvent_ignore; external QtShareName name QtNamePrefix + 'QKeyEvent_ignore';
procedure QFocusEvent_destroy; external QtShareName name QtNamePrefix + 'QFocusEvent_destroy';
function QFocusEvent_create; external QtShareName name QtNamePrefix + 'QFocusEvent_create';
function QFocusEvent_gotFocus; external QtShareName name QtNamePrefix + 'QFocusEvent_gotFocus';
function QFocusEvent_lostFocus; external QtShareName name QtNamePrefix + 'QFocusEvent_lostFocus';
function QFocusEvent_reason; external QtShareName name QtNamePrefix + 'QFocusEvent_reason';
procedure QFocusEvent_setReason; external QtShareName name QtNamePrefix + 'QFocusEvent_setReason';
procedure QFocusEvent_resetReason; external QtShareName name QtNamePrefix + 'QFocusEvent_resetReason';
procedure QPaintEvent_destroy; external QtShareName name QtNamePrefix + 'QPaintEvent_destroy';
function QPaintEvent_create(paintRegion: QRegionH; erased: Boolean): QPaintEventH; external QtShareName name QtNamePrefix + 'QPaintEvent_create';
function QPaintEvent_create(paintRect: PRect; erased: Boolean): QPaintEventH; external QtShareName name QtNamePrefix + 'QPaintEvent_create2';
procedure QPaintEvent_rect; external QtShareName name QtNamePrefix + 'QPaintEvent_rect';
function QPaintEvent_region; external QtShareName name QtNamePrefix + 'QPaintEvent_region';
function QPaintEvent_erased; external QtShareName name QtNamePrefix + 'QPaintEvent_erased';
procedure QMoveEvent_destroy; external QtShareName name QtNamePrefix + 'QMoveEvent_destroy';
function QMoveEvent_create; external QtShareName name QtNamePrefix + 'QMoveEvent_create';
function QMoveEvent_pos; external QtShareName name QtNamePrefix + 'QMoveEvent_pos';
function QMoveEvent_oldPos; external QtShareName name QtNamePrefix + 'QMoveEvent_oldPos';
procedure QResizeEvent_destroy; external QtShareName name QtNamePrefix + 'QResizeEvent_destroy';
function QResizeEvent_create; external QtShareName name QtNamePrefix + 'QResizeEvent_create';
function QResizeEvent_size; external QtShareName name QtNamePrefix + 'QResizeEvent_size';
function QResizeEvent_oldSize; external QtShareName name QtNamePrefix + 'QResizeEvent_oldSize';
procedure QCloseEvent_destroy; external QtShareName name QtNamePrefix + 'QCloseEvent_destroy';
function QCloseEvent_create; external QtShareName name QtNamePrefix + 'QCloseEvent_create';
function QCloseEvent_isAccepted; external QtShareName name QtNamePrefix + 'QCloseEvent_isAccepted';
procedure QCloseEvent_accept; external QtShareName name QtNamePrefix + 'QCloseEvent_accept';
procedure QCloseEvent_ignore; external QtShareName name QtNamePrefix + 'QCloseEvent_ignore';
procedure QShowEvent_destroy; external QtShareName name QtNamePrefix + 'QShowEvent_destroy';
function QShowEvent_create; external QtShareName name QtNamePrefix + 'QShowEvent_create';
function QShowEvent_spontaneous; external QtShareName name QtNamePrefix + 'QShowEvent_spontaneous';
procedure QHideEvent_destroy; external QtShareName name QtNamePrefix + 'QHideEvent_destroy';
function QHideEvent_create; external QtShareName name QtNamePrefix + 'QHideEvent_create';
function QHideEvent_spontaneous; external QtShareName name QtNamePrefix + 'QHideEvent_spontaneous';
procedure QDropEvent_destroy; external QtShareName name QtNamePrefix + 'QDropEvent_destroy';
function QDropEvent_create; external QtShareName name QtNamePrefix + 'QDropEvent_create';
function QDropEvent_pos; external QtShareName name QtNamePrefix + 'QDropEvent_pos';
function QDropEvent_isAccepted; external QtShareName name QtNamePrefix + 'QDropEvent_isAccepted';
procedure QDropEvent_accept; external QtShareName name QtNamePrefix + 'QDropEvent_accept';
procedure QDropEvent_ignore; external QtShareName name QtNamePrefix + 'QDropEvent_ignore';
function QDropEvent_isActionAccepted; external QtShareName name QtNamePrefix + 'QDropEvent_isActionAccepted';
procedure QDropEvent_acceptAction; external QtShareName name QtNamePrefix + 'QDropEvent_acceptAction';
procedure QDropEvent_setAction; external QtShareName name QtNamePrefix + 'QDropEvent_setAction';
function QDropEvent_action; external QtShareName name QtNamePrefix + 'QDropEvent_action';
function QDropEvent_source; external QtShareName name QtNamePrefix + 'QDropEvent_source';
function QDropEvent_format; external QtShareName name QtNamePrefix + 'QDropEvent_format';
procedure QDropEvent_encodedData; external QtShareName name QtNamePrefix + 'QDropEvent_encodedData';
function QDropEvent_provides; external QtShareName name QtNamePrefix + 'QDropEvent_provides';
procedure QDropEvent_data; external QtShareName name QtNamePrefix + 'QDropEvent_data';
procedure QDropEvent_setPoint; external QtShareName name QtNamePrefix + 'QDropEvent_setPoint';
function QDropEvent_to_QMimeSource; external QtSharename name QtNamePrefix + 'QDropEvent_to_QMimeSource';
procedure QDragMoveEvent_destroy; external QtShareName name QtNamePrefix + 'QDragMoveEvent_destroy';
function QDragMoveEvent_create; external QtShareName name QtNamePrefix + 'QDragMoveEvent_create';
procedure QDragMoveEvent_answerRect; external QtShareName name QtNamePrefix + 'QDragMoveEvent_answerRect';
procedure QDragMoveEvent_accept(handle: QDragMoveEventH; y: Boolean); external QtShareName name QtNamePrefix + 'QDragMoveEvent_accept';
procedure QDragMoveEvent_accept(handle: QDragMoveEventH; r: PRect); external QtShareName name QtNamePrefix + 'QDragMoveEvent_accept2';
procedure QDragMoveEvent_ignore(handle: QDragMoveEventH; r: PRect); external QtShareName name QtNamePrefix + 'QDragMoveEvent_ignore';
procedure QDragMoveEvent_ignore(handle: QDragMoveEventH); external QtShareName name QtNamePrefix + 'QDragMoveEvent_ignore2';
procedure QDragEnterEvent_destroy; external QtShareName name QtNamePrefix + 'QDragEnterEvent_destroy';
function QDragEnterEvent_create; external QtShareName name QtNamePrefix + 'QDragEnterEvent_create';
procedure QDragResponseEvent_destroy; external QtShareName name QtNamePrefix + 'QDragResponseEvent_destroy';
function QDragResponseEvent_create; external QtShareName name QtNamePrefix + 'QDragResponseEvent_create';
function QDragResponseEvent_dragAccepted; external QtShareName name QtNamePrefix + 'QDragResponseEvent_dragAccepted';
procedure QDragLeaveEvent_destroy; external QtShareName name QtNamePrefix + 'QDragLeaveEvent_destroy';
function QDragLeaveEvent_create; external QtShareName name QtNamePrefix + 'QDragLeaveEvent_create';
procedure QChildEvent_destroy; external QtShareName name QtNamePrefix + 'QChildEvent_destroy';
function QChildEvent_create; external QtShareName name QtNamePrefix + 'QChildEvent_create';
function QChildEvent_child; external QtShareName name QtNamePrefix + 'QChildEvent_child';
function QChildEvent_inserted; external QtShareName name QtNamePrefix + 'QChildEvent_inserted';
function QChildEvent_removed; external QtShareName name QtNamePrefix + 'QChildEvent_removed';
procedure QCustomEvent_destroy; external QtShareName name QtNamePrefix + 'QCustomEvent_destroy';
function QCustomEvent_create(_type: Integer): QCustomEventH; external QtShareName name QtNamePrefix + 'QCustomEvent_create';
function QCustomEvent_create(_type: QEventType; data: Pointer): QCustomEventH; external QtShareName name QtNamePrefix + 'QCustomEvent_create2';
function QCustomEvent_data; external QtShareName name QtNamePrefix + 'QCustomEvent_data';
procedure QCustomEvent_setData; external QtShareName name QtNamePrefix + 'QCustomEvent_setData';
procedure QFrame_destroy; external QtShareName name QtNamePrefix + 'QFrame_destroy';
function QFrame_create; external QtShareName name QtNamePrefix + 'QFrame_create';
function QFrame_frameStyle; external QtShareName name QtNamePrefix + 'QFrame_frameStyle';
procedure QFrame_setFrameStyle; external QtShareName name QtNamePrefix + 'QFrame_setFrameStyle';
function QFrame_frameWidth; external QtShareName name QtNamePrefix + 'QFrame_frameWidth';
procedure QFrame_contentsRect; external QtShareName name QtNamePrefix + 'QFrame_contentsRect';
function QFrame_lineShapesOk; external QtShareName name QtNamePrefix + 'QFrame_lineShapesOk';
procedure QFrame_sizeHint; external QtShareName name QtNamePrefix + 'QFrame_sizeHint';
procedure QFrame_sizePolicy; external QtShareName name QtNamePrefix + 'QFrame_sizePolicy';
function QFrame_frameShape; external QtShareName name QtNamePrefix + 'QFrame_frameShape';
procedure QFrame_setFrameShape; external QtShareName name QtNamePrefix + 'QFrame_setFrameShape';
function QFrame_frameShadow; external QtShareName name QtNamePrefix + 'QFrame_frameShadow';
procedure QFrame_setFrameShadow; external QtShareName name QtNamePrefix + 'QFrame_setFrameShadow';
function QFrame_lineWidth; external QtShareName name QtNamePrefix + 'QFrame_lineWidth';
procedure QFrame_setLineWidth; external QtShareName name QtNamePrefix + 'QFrame_setLineWidth';
function QFrame_margin; external QtShareName name QtNamePrefix + 'QFrame_margin';
procedure QFrame_setMargin; external QtShareName name QtNamePrefix + 'QFrame_setMargin';
function QFrame_midLineWidth; external QtShareName name QtNamePrefix + 'QFrame_midLineWidth';
procedure QFrame_setMidLineWidth; external QtShareName name QtNamePrefix + 'QFrame_setMidLineWidth';
procedure QFrame_frameRect; external QtShareName name QtNamePrefix + 'QFrame_frameRect';
procedure QFrame_setFrameRect; external QtShareName name QtNamePrefix + 'QFrame_setFrameRect';
procedure QIconDragItem_destroy; external QtShareName name QtNamePrefix + 'QIconDragItem_destroy';
function QIconDragItem_create; external QtShareName name QtNamePrefix + 'QIconDragItem_create';
procedure QIconDragItem_data; external QtShareName name QtNamePrefix + 'QIconDragItem_data';
procedure QIconDragItem_setData; external QtShareName name QtNamePrefix + 'QIconDragItem_setData';
procedure QIconDrag_destroy; external QtShareName name QtNamePrefix + 'QIconDrag_destroy';
function QIconDrag_create; external QtShareName name QtNamePrefix + 'QIconDrag_create';
procedure QIconDrag_append; external QtShareName name QtNamePrefix + 'QIconDrag_append';
function QIconDrag_format; external QtShareName name QtNamePrefix + 'QIconDrag_format';
function QIconDrag_canDecode; external QtShareName name QtNamePrefix + 'QIconDrag_canDecode';
procedure QIconDrag_encodedData; external QtShareName name QtNamePrefix + 'QIconDrag_encodedData';
procedure QIconViewItem_destroy; external QtShareName name QtNamePrefix + 'QIconViewItem_destroy';
function QIconViewItem_create(parent: QIconViewH): QIconViewItemH; external QtShareName name QtNamePrefix + 'QIconViewItem_create';
function QIconViewItem_create(parent: QIconViewH; after: QIconViewItemH): QIconViewItemH; external QtShareName name QtNamePrefix + 'QIconViewItem_create2';
function QIconViewItem_create(parent: QIconViewH; text: PWideString): QIconViewItemH; external QtShareName name QtNamePrefix + 'QIconViewItem_create3';
function QIconViewItem_create(parent: QIconViewH; after: QIconViewItemH; text: PWideString): QIconViewItemH; external QtShareName name QtNamePrefix + 'QIconViewItem_create4';
function QIconViewItem_create(parent: QIconViewH; text: PWideString; icon: QPixmapH): QIconViewItemH; external QtShareName name QtNamePrefix + 'QIconViewItem_create5';
function QIconViewItem_create(parent: QIconViewH; after: QIconViewItemH; text: PWideString; icon: QPixmapH): QIconViewItemH; external QtShareName name QtNamePrefix + 'QIconViewItem_create6';
procedure QIconViewItem_setRenameEnabled; external QtShareName name QtNamePrefix + 'QIconViewItem_setRenameEnabled';
procedure QIconViewItem_setDragEnabled; external QtShareName name QtNamePrefix + 'QIconViewItem_setDragEnabled';
procedure QIconViewItem_setDropEnabled; external QtShareName name QtNamePrefix + 'QIconViewItem_setDropEnabled';
procedure QIconViewItem_text; external QtShareName name QtNamePrefix + 'QIconViewItem_text';
function QIconViewItem_pixmap; external QtShareName name QtNamePrefix + 'QIconViewItem_pixmap';
procedure QIconViewItem_key; external QtShareName name QtNamePrefix + 'QIconViewItem_key';
function QIconViewItem_renameEnabled; external QtShareName name QtNamePrefix + 'QIconViewItem_renameEnabled';
function QIconViewItem_dragEnabled; external QtShareName name QtNamePrefix + 'QIconViewItem_dragEnabled';
function QIconViewItem_dropEnabled; external QtShareName name QtNamePrefix + 'QIconViewItem_dropEnabled';
function QIconViewItem_iconView; external QtShareName name QtNamePrefix + 'QIconViewItem_iconView';
function QIconViewItem_prevItem; external QtShareName name QtNamePrefix + 'QIconViewItem_prevItem';
function QIconViewItem_nextItem; external QtShareName name QtNamePrefix + 'QIconViewItem_nextItem';
function QIconViewItem_index; external QtShareName name QtNamePrefix + 'QIconViewItem_index';
procedure QIconViewItem_setSelected(handle: QIconViewItemH; s: Boolean; cb: Boolean); external QtShareName name QtNamePrefix + 'QIconViewItem_setSelected';
procedure QIconViewItem_setSelected(handle: QIconViewItemH; s: Boolean); external QtShareName name QtNamePrefix + 'QIconViewItem_setSelected2';
procedure QIconViewItem_setSelectable; external QtShareName name QtNamePrefix + 'QIconViewItem_setSelectable';
function QIconViewItem_isSelected; external QtShareName name QtNamePrefix + 'QIconViewItem_isSelected';
function QIconViewItem_isSelectable; external QtShareName name QtNamePrefix + 'QIconViewItem_isSelectable';
procedure QIconViewItem_repaint; external QtShareName name QtNamePrefix + 'QIconViewItem_repaint';
procedure QIconViewItem_move(handle: QIconViewItemH; x: Integer; y: Integer); external QtShareName name QtNamePrefix + 'QIconViewItem_move';
procedure QIconViewItem_moveBy(handle: QIconViewItemH; dx: Integer; dy: Integer); external QtShareName name QtNamePrefix + 'QIconViewItem_moveBy';
procedure QIconViewItem_move(handle: QIconViewItemH; pnt: PPoint); external QtShareName name QtNamePrefix + 'QIconViewItem_move2';
procedure QIconViewItem_moveBy(handle: QIconViewItemH; pnt: PPoint); external QtShareName name QtNamePrefix + 'QIconViewItem_moveBy2';
procedure QIconViewItem_rect; external QtShareName name QtNamePrefix + 'QIconViewItem_rect';
function QIconViewItem_x; external QtShareName name QtNamePrefix + 'QIconViewItem_x';
function QIconViewItem_y; external QtShareName name QtNamePrefix + 'QIconViewItem_y';
function QIconViewItem_width; external QtShareName name QtNamePrefix + 'QIconViewItem_width';
function QIconViewItem_height; external QtShareName name QtNamePrefix + 'QIconViewItem_height';
procedure QIconViewItem_size; external QtShareName name QtNamePrefix + 'QIconViewItem_size';
procedure QIconViewItem_pos; external QtShareName name QtNamePrefix + 'QIconViewItem_pos';
procedure QIconViewItem_textRect; external QtShareName name QtNamePrefix + 'QIconViewItem_textRect';
procedure QIconViewItem_pixmapRect; external QtShareName name QtNamePrefix + 'QIconViewItem_pixmapRect';
function QIconViewItem_contains; external QtShareName name QtNamePrefix + 'QIconViewItem_contains';
function QIconViewItem_intersects; external QtShareName name QtNamePrefix + 'QIconViewItem_intersects';
function QIconViewItem_acceptDrop; external QtShareName name QtNamePrefix + 'QIconViewItem_acceptDrop';
procedure QIconViewItem_rename; external QtShareName name QtNamePrefix + 'QIconViewItem_rename';
function QIconViewItem_compare; external QtShareName name QtNamePrefix + 'QIconViewItem_compare';
procedure QIconViewItem_setText(handle: QIconViewItemH; text: PWideString); external QtShareName name QtNamePrefix + 'QIconViewItem_setText';
procedure QIconViewItem_setPixmap(handle: QIconViewItemH; icon: QPixmapH); external QtShareName name QtNamePrefix + 'QIconViewItem_setPixmap';
procedure QIconViewItem_setText(handle: QIconViewItemH; text: PWideString; recalc: Boolean; redraw: Boolean); external QtShareName name QtNamePrefix + 'QIconViewItem_setText2';
procedure QIconViewItem_setPixmap(handle: QIconViewItemH; icon: QPixmapH; recalc: Boolean; redraw: Boolean); external QtShareName name QtNamePrefix + 'QIconViewItem_setPixmap2';
procedure QIconViewItem_setKey; external QtShareName name QtNamePrefix + 'QIconViewItem_setKey';
procedure QIconView_destroy; external QtShareName name QtNamePrefix + 'QIconView_destroy';
function QIconView_create; external QtShareName name QtNamePrefix + 'QIconView_create';
procedure QIconView_insertItem; external QtShareName name QtNamePrefix + 'QIconView_insertItem';
procedure QIconView_takeItem; external QtShareName name QtNamePrefix + 'QIconView_takeItem';
function QIconView_index; external QtShareName name QtNamePrefix + 'QIconView_index';
function QIconView_firstItem; external QtShareName name QtNamePrefix + 'QIconView_firstItem';
function QIconView_lastItem; external QtShareName name QtNamePrefix + 'QIconView_lastItem';
function QIconView_currentItem; external QtShareName name QtNamePrefix + 'QIconView_currentItem';
procedure QIconView_setCurrentItem; external QtShareName name QtNamePrefix + 'QIconView_setCurrentItem';
procedure QIconView_setSelected; external QtShareName name QtNamePrefix + 'QIconView_setSelected';
function QIconView_count; external QtShareName name QtNamePrefix + 'QIconView_count';
procedure QIconView_showEvent; external QtShareName name QtNamePrefix + 'QIconView_showEvent';
procedure QIconView_setSelectionMode; external QtShareName name QtNamePrefix + 'QIconView_setSelectionMode';
function QIconView_selectionMode; external QtShareName name QtNamePrefix + 'QIconView_selectionMode';
function QIconView_findItem(handle: QIconViewH; pos: PPoint): QIconViewItemH; external QtShareName name QtNamePrefix + 'QIconView_findItem';
function QIconView_findItem(handle: QIconViewH; text: PWideString): QIconViewItemH; external QtShareName name QtNamePrefix + 'QIconView_findItem2';
procedure QIconView_selectAll; external QtShareName name QtNamePrefix + 'QIconView_selectAll';
procedure QIconView_clearSelection; external QtShareName name QtNamePrefix + 'QIconView_clearSelection';
procedure QIconView_invertSelection; external QtShareName name QtNamePrefix + 'QIconView_invertSelection';
procedure QIconView_repaintItem; external QtShareName name QtNamePrefix + 'QIconView_repaintItem';
procedure QIconView_ensureItemVisible; external QtShareName name QtNamePrefix + 'QIconView_ensureItemVisible';
function QIconView_findFirstVisibleItem; external QtShareName name QtNamePrefix + 'QIconView_findFirstVisibleItem';
function QIconView_findLastVisibleItem; external QtShareName name QtNamePrefix + 'QIconView_findLastVisibleItem';
procedure QIconView_clear; external QtShareName name QtNamePrefix + 'QIconView_clear';
procedure QIconView_setGridX; external QtShareName name QtNamePrefix + 'QIconView_setGridX';
procedure QIconView_setGridY; external QtShareName name QtNamePrefix + 'QIconView_setGridY';
function QIconView_gridX; external QtShareName name QtNamePrefix + 'QIconView_gridX';
function QIconView_gridY; external QtShareName name QtNamePrefix + 'QIconView_gridY';
procedure QIconView_setSpacing; external QtShareName name QtNamePrefix + 'QIconView_setSpacing';
function QIconView_spacing; external QtShareName name QtNamePrefix + 'QIconView_spacing';
procedure QIconView_setItemTextPos; external QtShareName name QtNamePrefix + 'QIconView_setItemTextPos';
function QIconView_itemTextPos; external QtShareName name QtNamePrefix + 'QIconView_itemTextPos';
procedure QIconView_setItemTextBackground; external QtShareName name QtNamePrefix + 'QIconView_setItemTextBackground';
procedure QIconView_setArrangement; external QtShareName name QtNamePrefix + 'QIconView_setArrangement';
function QIconView_arrangement; external QtShareName name QtNamePrefix + 'QIconView_arrangement';
procedure QIconView_setResizeMode; external QtShareName name QtNamePrefix + 'QIconView_setResizeMode';
function QIconView_resizeMode; external QtShareName name QtNamePrefix + 'QIconView_resizeMode';
procedure QIconView_setMaxItemWidth; external QtShareName name QtNamePrefix + 'QIconView_setMaxItemWidth';
function QIconView_maxItemWidth; external QtShareName name QtNamePrefix + 'QIconView_maxItemWidth';
procedure QIconView_setMaxItemTextLength; external QtShareName name QtNamePrefix + 'QIconView_setMaxItemTextLength';
function QIconView_maxItemTextLength; external QtShareName name QtNamePrefix + 'QIconView_maxItemTextLength';
procedure QIconView_setAutoArrange; external QtShareName name QtNamePrefix + 'QIconView_setAutoArrange';
function QIconView_autoArrange; external QtShareName name QtNamePrefix + 'QIconView_autoArrange';
procedure QIconView_setShowToolTips; external QtShareName name QtNamePrefix + 'QIconView_setShowToolTips';
function QIconView_showToolTips; external QtShareName name QtNamePrefix + 'QIconView_showToolTips';
procedure QIconView_setSorting; external QtShareName name QtNamePrefix + 'QIconView_setSorting';
function QIconView_sorting; external QtShareName name QtNamePrefix + 'QIconView_sorting';
function QIconView_sortDirection; external QtShareName name QtNamePrefix + 'QIconView_sortDirection';
procedure QIconView_setItemsMovable; external QtShareName name QtNamePrefix + 'QIconView_setItemsMovable';
function QIconView_itemsMovable; external QtShareName name QtNamePrefix + 'QIconView_itemsMovable';
procedure QIconView_setWordWrapIconText; external QtShareName name QtNamePrefix + 'QIconView_setWordWrapIconText';
function QIconView_wordWrapIconText; external QtShareName name QtNamePrefix + 'QIconView_wordWrapIconText';
function QIconView_eventFilter; external QtShareName name QtNamePrefix + 'QIconView_eventFilter';
procedure QIconView_minimumSizeHint; external QtShareName name QtNamePrefix + 'QIconView_minimumSizeHint';
procedure QIconView_sizePolicy; external QtShareName name QtNamePrefix + 'QIconView_sizePolicy';
procedure QIconView_sizeHint; external QtShareName name QtNamePrefix + 'QIconView_sizeHint';
procedure QIconView_sort; external QtShareName name QtNamePrefix + 'QIconView_sort';
procedure QIconView_setFont; external QtShareName name QtNamePrefix + 'QIconView_setFont';
procedure QIconView_setPalette; external QtShareName name QtNamePrefix + 'QIconView_setPalette';
procedure QIconView_arrangeItemsInGrid(handle: QIconViewH; grid: PSize; update: Boolean); external QtShareName name QtNamePrefix + 'QIconView_arrangeItemsInGrid';
procedure QIconView_arrangeItemsInGrid(handle: QIconViewH; update: Boolean); external QtShareName name QtNamePrefix + 'QIconView_arrangeItemsInGrid2';
procedure QIconView_setContentsPos; external QtShareName name QtNamePrefix + 'QIconView_setContentsPos';
procedure QIconView_updateContents; external QtShareName name QtNamePrefix + 'QIconView_updateContents';
procedure QLCDNumber_destroy; external QtShareName name QtNamePrefix + 'QLCDNumber_destroy';
function QLCDNumber_create(parent: QWidgetH; name: PAnsiChar): QLCDNumberH; external QtShareName name QtNamePrefix + 'QLCDNumber_create';
function QLCDNumber_create(numDigits: Cardinal; parent: QWidgetH; name: PAnsiChar): QLCDNumberH; external QtShareName name QtNamePrefix + 'QLCDNumber_create2';
function QLCDNumber_smallDecimalPoint; external QtShareName name QtNamePrefix + 'QLCDNumber_smallDecimalPoint';
function QLCDNumber_numDigits; external QtShareName name QtNamePrefix + 'QLCDNumber_numDigits';
procedure QLCDNumber_setNumDigits; external QtShareName name QtNamePrefix + 'QLCDNumber_setNumDigits';
function QLCDNumber_checkOverflow(handle: QLCDNumberH; num: Double): Boolean; external QtShareName name QtNamePrefix + 'QLCDNumber_checkOverflow';
function QLCDNumber_checkOverflow(handle: QLCDNumberH; num: Integer): Boolean; external QtShareName name QtNamePrefix + 'QLCDNumber_checkOverflow2';
function QLCDNumber_mode; external QtShareName name QtNamePrefix + 'QLCDNumber_mode';
procedure QLCDNumber_setMode; external QtShareName name QtNamePrefix + 'QLCDNumber_setMode';
function QLCDNumber_segmentStyle; external QtShareName name QtNamePrefix + 'QLCDNumber_segmentStyle';
procedure QLCDNumber_setSegmentStyle; external QtShareName name QtNamePrefix + 'QLCDNumber_setSegmentStyle';
function QLCDNumber_value; external QtShareName name QtNamePrefix + 'QLCDNumber_value';
function QLCDNumber_intValue; external QtShareName name QtNamePrefix + 'QLCDNumber_intValue';
procedure QLCDNumber_sizeHint; external QtShareName name QtNamePrefix + 'QLCDNumber_sizeHint';
procedure QLCDNumber_sizePolicy; external QtShareName name QtNamePrefix + 'QLCDNumber_sizePolicy';
procedure QLCDNumber_display(handle: QLCDNumberH; num: Integer); external QtShareName name QtNamePrefix + 'QLCDNumber_display';
procedure QLCDNumber_display(handle: QLCDNumberH; num: Double); external QtShareName name QtNamePrefix + 'QLCDNumber_display2';
procedure QLCDNumber_display(handle: QLCDNumberH; str: PWideString); external QtShareName name QtNamePrefix + 'QLCDNumber_display3';
procedure QLCDNumber_setHexMode; external QtShareName name QtNamePrefix + 'QLCDNumber_setHexMode';
procedure QLCDNumber_setDecMode; external QtShareName name QtNamePrefix + 'QLCDNumber_setDecMode';
procedure QLCDNumber_setOctMode; external QtShareName name QtNamePrefix + 'QLCDNumber_setOctMode';
procedure QLCDNumber_setBinMode; external QtShareName name QtNamePrefix + 'QLCDNumber_setBinMode';
procedure QLCDNumber_setSmallDecimalPoint; external QtShareName name QtNamePrefix + 'QLCDNumber_setSmallDecimalPoint';
procedure QLineEdit_destroy; external QtShareName name QtNamePrefix + 'QLineEdit_destroy';
function QLineEdit_create(parent: QWidgetH; name: PAnsiChar): QLineEditH; external QtShareName name QtNamePrefix + 'QLineEdit_create';
function QLineEdit_create(p1: PWideString; parent: QWidgetH; name: PAnsiChar): QLineEditH; external QtShareName name QtNamePrefix + 'QLineEdit_create2';
procedure QLineEdit_text; external QtShareName name QtNamePrefix + 'QLineEdit_text';
procedure QLineEdit_displayText; external QtShareName name QtNamePrefix + 'QLineEdit_displayText';
function QLineEdit_maxLength; external QtShareName name QtNamePrefix + 'QLineEdit_maxLength';
procedure QLineEdit_setMaxLength; external QtShareName name QtNamePrefix + 'QLineEdit_setMaxLength';
procedure QLineEdit_setFrame; external QtShareName name QtNamePrefix + 'QLineEdit_setFrame';
function QLineEdit_frame; external QtShareName name QtNamePrefix + 'QLineEdit_frame';
procedure QLineEdit_setEchoMode; external QtShareName name QtNamePrefix + 'QLineEdit_setEchoMode';
function QLineEdit_echoMode; external QtShareName name QtNamePrefix + 'QLineEdit_echoMode';
procedure QLineEdit_setReadOnly; external QtShareName name QtNamePrefix + 'QLineEdit_setReadOnly';
function QLineEdit_isReadOnly; external QtShareName name QtNamePrefix + 'QLineEdit_isReadOnly';
procedure QLineEdit_setValidator; external QtShareName name QtNamePrefix + 'QLineEdit_setValidator';
function QLineEdit_validator; external QtShareName name QtNamePrefix + 'QLineEdit_validator';
procedure QLineEdit_sizeHint; external QtShareName name QtNamePrefix + 'QLineEdit_sizeHint';
procedure QLineEdit_minimumSizeHint; external QtShareName name QtNamePrefix + 'QLineEdit_minimumSizeHint';
procedure QLineEdit_sizePolicy; external QtShareName name QtNamePrefix + 'QLineEdit_sizePolicy';
procedure QLineEdit_setEnabled; external QtShareName name QtNamePrefix + 'QLineEdit_setEnabled';
procedure QLineEdit_setFont; external QtShareName name QtNamePrefix + 'QLineEdit_setFont';
procedure QLineEdit_setPalette; external QtShareName name QtNamePrefix + 'QLineEdit_setPalette';
procedure QLineEdit_setSelection; external QtShareName name QtNamePrefix + 'QLineEdit_setSelection';
procedure QLineEdit_setCursorPosition; external QtShareName name QtNamePrefix + 'QLineEdit_setCursorPosition';
function QLineEdit_cursorPosition; external QtShareName name QtNamePrefix + 'QLineEdit_cursorPosition';
function QLineEdit_validateAndSet; external QtShareName name QtNamePrefix + 'QLineEdit_validateAndSet';
procedure QLineEdit_cut; external QtShareName name QtNamePrefix + 'QLineEdit_cut';
procedure QLineEdit_copy; external QtShareName name QtNamePrefix + 'QLineEdit_copy';
procedure QLineEdit_paste; external QtShareName name QtNamePrefix + 'QLineEdit_paste';
procedure QLineEdit_setAlignment; external QtShareName name QtNamePrefix + 'QLineEdit_setAlignment';
function QLineEdit_alignment; external QtShareName name QtNamePrefix + 'QLineEdit_alignment';
procedure QLineEdit_cursorLeft; external QtShareName name QtNamePrefix + 'QLineEdit_cursorLeft';
procedure QLineEdit_cursorRight; external QtShareName name QtNamePrefix + 'QLineEdit_cursorRight';
procedure QLineEdit_cursorWordForward; external QtShareName name QtNamePrefix + 'QLineEdit_cursorWordForward';
procedure QLineEdit_cursorWordBackward; external QtShareName name QtNamePrefix + 'QLineEdit_cursorWordBackward';
procedure QLineEdit_backspace; external QtShareName name QtNamePrefix + 'QLineEdit_backspace';
procedure QLineEdit_del; external QtShareName name QtNamePrefix + 'QLineEdit_del';
procedure QLineEdit_home; external QtShareName name QtNamePrefix + 'QLineEdit_home';
procedure QLineEdit_end; external QtShareName name QtNamePrefix + 'QLineEdit_end';
procedure QLineEdit_setEdited; external QtShareName name QtNamePrefix + 'QLineEdit_setEdited';
function QLineEdit_edited; external QtShareName name QtNamePrefix + 'QLineEdit_edited';
function QLineEdit_hasMarkedText; external QtShareName name QtNamePrefix + 'QLineEdit_hasMarkedText';
procedure QLineEdit_markedText; external QtShareName name QtNamePrefix + 'QLineEdit_markedText';
procedure QLineEdit_setText; external QtShareName name QtNamePrefix + 'QLineEdit_setText';
procedure QLineEdit_selectAll; external QtShareName name QtNamePrefix + 'QLineEdit_selectAll';
procedure QLineEdit_deselect; external QtShareName name QtNamePrefix + 'QLineEdit_deselect';
procedure QLineEdit_clearValidator; external QtShareName name QtNamePrefix + 'QLineEdit_clearValidator';
procedure QLineEdit_insert; external QtShareName name QtNamePrefix + 'QLineEdit_insert';
procedure QLineEdit_clear; external QtShareName name QtNamePrefix + 'QLineEdit_clear';
procedure QListBox_destroy; external QtShareName name QtNamePrefix + 'QListBox_destroy';
function QListBox_create; external QtShareName name QtNamePrefix + 'QListBox_create';
procedure QListBox_setFont; external QtShareName name QtNamePrefix + 'QListBox_setFont';
function QListBox_count; external QtShareName name QtNamePrefix + 'QListBox_count';
procedure QListBox_insertStringList; external QtShareName name QtNamePrefix + 'QListBox_insertStringList';
procedure QListBox_insertStrList(handle: QListBoxH; p1: QStrListH; index: Integer); external QtShareName name QtNamePrefix + 'QListBox_insertStrList';
procedure QListBox_insertStrList(handle: QListBoxH; p1: PPAnsiChar; numStrings: Integer; index: Integer); external QtShareName name QtNamePrefix + 'QListBox_insertStrList3';
procedure QListBox_insertItem(handle: QListBoxH; p1: QListBoxItemH; index: Integer); external QtShareName name QtNamePrefix + 'QListBox_insertItem';
procedure QListBox_insertItem(handle: QListBoxH; p1: QListBoxItemH; after: QListBoxItemH); external QtShareName name QtNamePrefix + 'QListBox_insertItem2';
procedure QListBox_insertItem(handle: QListBoxH; text: PWideString; index: Integer); external QtShareName name QtNamePrefix + 'QListBox_insertItem3';
procedure QListBox_insertItem(handle: QListBoxH; pixmap: QPixmapH; index: Integer); external QtShareName name QtNamePrefix + 'QListBox_insertItem4';
procedure QListBox_insertItem(handle: QListBoxH; pixmap: QPixmapH; text: PWideString; index: Integer); external QtShareName name QtNamePrefix + 'QListBox_insertItem5';
procedure QListBox_removeItem; external QtShareName name QtNamePrefix + 'QListBox_removeItem';
procedure QListBox_clear; external QtShareName name QtNamePrefix + 'QListBox_clear';
procedure QListBox_text; external QtShareName name QtNamePrefix + 'QListBox_text';
function QListBox_pixmap; external QtShareName name QtNamePrefix + 'QListBox_pixmap';
procedure QListBox_changeItem(handle: QListBoxH; p1: QListBoxItemH; index: Integer); external QtShareName name QtNamePrefix + 'QListBox_changeItem';
procedure QListBox_changeItem(handle: QListBoxH; text: PWideString; index: Integer); external QtShareName name QtNamePrefix + 'QListBox_changeItem2';
procedure QListBox_changeItem(handle: QListBoxH; pixmap: QPixmapH; index: Integer); external QtShareName name QtNamePrefix + 'QListBox_changeItem3';
procedure QListBox_changeItem(handle: QListBoxH; pixmap: QPixmapH; text: PWideString; index: Integer); external QtShareName name QtNamePrefix + 'QListBox_changeItem4';
procedure QListBox_takeItem; external QtShareName name QtNamePrefix + 'QListBox_takeItem';
function QListBox_numItemsVisible; external QtShareName name QtNamePrefix + 'QListBox_numItemsVisible';
function QListBox_currentItem; external QtShareName name QtNamePrefix + 'QListBox_currentItem';
procedure QListBox_currentText; external QtShareName name QtNamePrefix + 'QListBox_currentText';
procedure QListBox_setCurrentItem(handle: QListBoxH; index: Integer); external QtShareName name QtNamePrefix + 'QListBox_setCurrentItem';
procedure QListBox_setCurrentItem(handle: QListBoxH; p1: QListBoxItemH); external QtShareName name QtNamePrefix + 'QListBox_setCurrentItem2';
procedure QListBox_centerCurrentItem; external QtShareName name QtNamePrefix + 'QListBox_centerCurrentItem';
function QListBox_topItem; external QtShareName name QtNamePrefix + 'QListBox_topItem';
procedure QListBox_setTopItem; external QtShareName name QtNamePrefix + 'QListBox_setTopItem';
procedure QListBox_setBottomItem; external QtShareName name QtNamePrefix + 'QListBox_setBottomItem';
function QListBox_maxItemWidth; external QtShareName name QtNamePrefix + 'QListBox_maxItemWidth';
procedure QListBox_setSelectionMode; external QtShareName name QtNamePrefix + 'QListBox_setSelectionMode';
function QListBox_selectionMode; external QtShareName name QtNamePrefix + 'QListBox_selectionMode';
procedure QListBox_setMultiSelection; external QtShareName name QtNamePrefix + 'QListBox_setMultiSelection';
function QListBox_isMultiSelection; external QtShareName name QtNamePrefix + 'QListBox_isMultiSelection';
procedure QListBox_setSelected(handle: QListBoxH; p1: QListBoxItemH; p2: Boolean); external QtShareName name QtNamePrefix + 'QListBox_setSelected';
procedure QListBox_setSelected(handle: QListBoxH; p1: Integer; p2: Boolean); external QtShareName name QtNamePrefix + 'QListBox_setSelected2';
function QListBox_isSelected(handle: QListBoxH; p1: Integer): Boolean; external QtShareName name QtNamePrefix + 'QListBox_isSelected';
function QListBox_isSelected(handle: QListBoxH; p1: QListBoxItemH): Boolean; external QtShareName name QtNamePrefix + 'QListBox_isSelected2';
procedure QListBox_sizeHint; external QtShareName name QtNamePrefix + 'QListBox_sizeHint';
procedure QListBox_minimumSizeHint; external QtShareName name QtNamePrefix + 'QListBox_minimumSizeHint';
function QListBox_item; external QtShareName name QtNamePrefix + 'QListBox_item';
function QListBox_index; external QtShareName name QtNamePrefix + 'QListBox_index';
function QListBox_findItem; external QtShareName name QtNamePrefix + 'QListBox_findItem';
procedure QListBox_triggerUpdate; external QtShareName name QtNamePrefix + 'QListBox_triggerUpdate';
function QListBox_itemVisible(handle: QListBoxH; index: Integer): Boolean; external QtShareName name QtNamePrefix + 'QListBox_itemVisible';
function QListBox_itemVisible(handle: QListBoxH; p1: QListBoxItemH): Boolean; external QtShareName name QtNamePrefix + 'QListBox_itemVisible2';
procedure QListBox_setColumnMode(handle: QListBoxH; p1: QListBoxLayoutMode); external QtShareName name QtNamePrefix + 'QListBox_setColumnMode';
procedure QListBox_setColumnMode(handle: QListBoxH; p1: Integer); external QtShareName name QtNamePrefix + 'QListBox_setColumnMode2';
procedure QListBox_setRowMode(handle: QListBoxH; p1: QListBoxLayoutMode); external QtShareName name QtNamePrefix + 'QListBox_setRowMode';
procedure QListBox_setRowMode(handle: QListBoxH; p1: Integer); external QtShareName name QtNamePrefix + 'QListBox_setRowMode2';
function QListBox_columnMode; external QtShareName name QtNamePrefix + 'QListBox_columnMode';
function QListBox_rowMode; external QtShareName name QtNamePrefix + 'QListBox_rowMode';
function QListBox_numColumns; external QtShareName name QtNamePrefix + 'QListBox_numColumns';
function QListBox_numRows; external QtShareName name QtNamePrefix + 'QListBox_numRows';
function QListBox_variableWidth; external QtShareName name QtNamePrefix + 'QListBox_variableWidth';
procedure QListBox_setVariableWidth; external QtShareName name QtNamePrefix + 'QListBox_setVariableWidth';
function QListBox_variableHeight; external QtShareName name QtNamePrefix + 'QListBox_variableHeight';
procedure QListBox_setVariableHeight; external QtShareName name QtNamePrefix + 'QListBox_setVariableHeight';
procedure QListBox_viewportPaintEvent; external QtShareName name QtNamePrefix + 'QListBox_viewportPaintEvent';
function QListBox_dragSelect; external QtShareName name QtNamePrefix + 'QListBox_dragSelect';
procedure QListBox_setDragSelect; external QtShareName name QtNamePrefix + 'QListBox_setDragSelect';
function QListBox_autoScroll; external QtShareName name QtNamePrefix + 'QListBox_autoScroll';
procedure QListBox_setAutoScroll; external QtShareName name QtNamePrefix + 'QListBox_setAutoScroll';
function QListBox_autoScrollBar; external QtShareName name QtNamePrefix + 'QListBox_autoScrollBar';
procedure QListBox_setAutoScrollBar; external QtShareName name QtNamePrefix + 'QListBox_setAutoScrollBar';
function QListBox_scrollBar; external QtShareName name QtNamePrefix + 'QListBox_scrollBar';
procedure QListBox_setScrollBar; external QtShareName name QtNamePrefix + 'QListBox_setScrollBar';
function QListBox_autoBottomScrollBar; external QtShareName name QtNamePrefix + 'QListBox_autoBottomScrollBar';
procedure QListBox_setAutoBottomScrollBar; external QtShareName name QtNamePrefix + 'QListBox_setAutoBottomScrollBar';
function QListBox_bottomScrollBar; external QtShareName name QtNamePrefix + 'QListBox_bottomScrollBar';
procedure QListBox_setBottomScrollBar; external QtShareName name QtNamePrefix + 'QListBox_setBottomScrollBar';
function QListBox_smoothScrolling; external QtShareName name QtNamePrefix + 'QListBox_smoothScrolling';
procedure QListBox_setSmoothScrolling; external QtShareName name QtNamePrefix + 'QListBox_setSmoothScrolling';
function QListBox_autoUpdate; external QtShareName name QtNamePrefix + 'QListBox_autoUpdate';
procedure QListBox_setAutoUpdate; external QtShareName name QtNamePrefix + 'QListBox_setAutoUpdate';
procedure QListBox_setFixedVisibleLines; external QtShareName name QtNamePrefix + 'QListBox_setFixedVisibleLines';
procedure QListBox_inSort(handle: QListBoxH; p1: QListBoxItemH); external QtShareName name QtNamePrefix + 'QListBox_inSort';
procedure QListBox_inSort(handle: QListBoxH; text: PWideString); external QtShareName name QtNamePrefix + 'QListBox_inSort2';
function QListBox_cellHeight(handle: QListBoxH; i: Integer): Integer; external QtShareName name QtNamePrefix + 'QListBox_cellHeight';
function QListBox_cellHeight(handle: QListBoxH): Integer; external QtShareName name QtNamePrefix + 'QListBox_cellHeight2';
function QListBox_cellWidth(handle: QListBoxH): Integer; external QtShareName name QtNamePrefix + 'QListBox_cellWidth';
function QListBox_cellWidth(handle: QListBoxH; i: Integer): Integer; external QtShareName name QtNamePrefix + 'QListBox_cellWidth2';
function QListBox_numCols; external QtShareName name QtNamePrefix + 'QListBox_numCols';
function QListBox_itemHeight; external QtShareName name QtNamePrefix + 'QListBox_itemHeight';
function QListBox_itemAt; external QtShareName name QtNamePrefix + 'QListBox_itemAt';
procedure QListBox_itemRect; external QtShareName name QtNamePrefix + 'QListBox_itemRect';
function QListBox_firstItem; external QtShareName name QtNamePrefix + 'QListBox_firstItem';
procedure QListBox_sort; external QtShareName name QtNamePrefix + 'QListBox_sort';
procedure QListBox_ensureCurrentVisible; external QtShareName name QtNamePrefix + 'QListBox_ensureCurrentVisible';
procedure QListBox_clearSelection; external QtShareName name QtNamePrefix + 'QListBox_clearSelection';
procedure QListBox_selectAll; external QtShareName name QtNamePrefix + 'QListBox_selectAll';
procedure QListBox_invertSelection; external QtShareName name QtNamePrefix + 'QListBox_invertSelection';
procedure QListBoxItem_destroy; external QtShareName name QtNamePrefix + 'QListBoxItem_destroy';
procedure QListBoxItem_text; external QtShareName name QtNamePrefix + 'QListBoxItem_text';
function QListBoxItem_pixmap; external QtShareName name QtNamePrefix + 'QListBoxItem_pixmap';
function QListBoxItem_height; external QtShareName name QtNamePrefix + 'QListBoxItem_height';
function QListBoxItem_width; external QtShareName name QtNamePrefix + 'QListBoxItem_width';
function QListBoxItem_selected; external QtShareName name QtNamePrefix + 'QListBoxItem_selected';
function QListBoxItem_current; external QtShareName name QtNamePrefix + 'QListBoxItem_current';
function QListBoxItem_listBox; external QtShareName name QtNamePrefix + 'QListBoxItem_listBox';
procedure QListBoxItem_setSelectable; external QtShareName name QtNamePrefix + 'QListBoxItem_setSelectable';
function QListBoxItem_isSelectable; external QtShareName name QtNamePrefix + 'QListBoxItem_isSelectable';
function QListBoxItem_next; external QtShareName name QtNamePrefix + 'QListBoxItem_next';
function QListBoxItem_prev; external QtShareName name QtNamePrefix + 'QListBoxItem_prev';
procedure QListBoxText_destroy; external QtShareName name QtNamePrefix + 'QListBoxText_destroy';
function QListBoxText_create(listbox: QListBoxH; text: PWideString): QListBoxTextH; external QtShareName name QtNamePrefix + 'QListBoxText_create';
function QListBoxText_create(text: PWideString): QListBoxTextH; external QtShareName name QtNamePrefix + 'QListBoxText_create2';
function QListBoxText_create(listbox: QListBoxH; text: PWideString; after: QListBoxItemH): QListBoxTextH; external QtShareName name QtNamePrefix + 'QListBoxText_create3';
function QListBoxText_height; external QtShareName name QtNamePrefix + 'QListBoxText_height';
function QListBoxText_width; external QtShareName name QtNamePrefix + 'QListBoxText_width';
procedure QListBoxPixmap_destroy; external QtShareName name QtNamePrefix + 'QListBoxPixmap_destroy';
function QListBoxPixmap_create(listbox: QListBoxH; p2: QPixmapH): QListBoxPixmapH; external QtShareName name QtNamePrefix + 'QListBoxPixmap_create';
function QListBoxPixmap_create(p1: QPixmapH): QListBoxPixmapH; external QtShareName name QtNamePrefix + 'QListBoxPixmap_create2';
function QListBoxPixmap_create(listbox: QListBoxH; pix: QPixmapH; after: QListBoxItemH): QListBoxPixmapH; external QtShareName name QtNamePrefix + 'QListBoxPixmap_create3';
function QListBoxPixmap_create(listbox: QListBoxH; p2: QPixmapH; p3: PWideString): QListBoxPixmapH; external QtShareName name QtNamePrefix + 'QListBoxPixmap_create4';
function QListBoxPixmap_create(p1: QPixmapH; p2: PWideString): QListBoxPixmapH; external QtShareName name QtNamePrefix + 'QListBoxPixmap_create5';
function QListBoxPixmap_create(listbox: QListBoxH; pix: QPixmapH; p3: PWideString; after: QListBoxItemH): QListBoxPixmapH; external QtShareName name QtNamePrefix + 'QListBoxPixmap_create6';
function QListBoxPixmap_pixmap; external QtShareName name QtNamePrefix + 'QListBoxPixmap_pixmap';
function QListBoxPixmap_height; external QtShareName name QtNamePrefix + 'QListBoxPixmap_height';
function QListBoxPixmap_width; external QtShareName name QtNamePrefix + 'QListBoxPixmap_width';
procedure QListViewItem_destroy; external QtShareName name QtNamePrefix + 'QListViewItem_destroy';
function QListViewItem_create(parent: QListViewH): QListViewItemH; external QtShareName name QtNamePrefix + 'QListViewItem_create';
function QListViewItem_create(parent: QListViewItemH): QListViewItemH; external QtShareName name QtNamePrefix + 'QListViewItem_create2';
function QListViewItem_create(parent: QListViewH; after: QListViewItemH): QListViewItemH; external QtShareName name QtNamePrefix + 'QListViewItem_create3';
function QListViewItem_create(parent: QListViewItemH; after: QListViewItemH): QListViewItemH; external QtShareName name QtNamePrefix + 'QListViewItem_create4';
function QListViewItem_create(parent: QListViewH; p2: PWideString; p3: PWideString; p4: PWideString; p5: PWideString; p6: PWideString; p7: PWideString; p8: PWideString; p9: PWideString): QListViewItemH; external QtShareName name QtNamePrefix + 'QListViewItem_create5';
function QListViewItem_create(parent: QListViewItemH; p2: PWideString; p3: PWideString; p4: PWideString; p5: PWideString; p6: PWideString; p7: PWideString; p8: PWideString; p9: PWideString): QListViewItemH; external QtShareName name QtNamePrefix + 'QListViewItem_create6';
function QListViewItem_create(parent: QListViewH; after: QListViewItemH; p3: PWideString; p4: PWideString; p5: PWideString; p6: PWideString; p7: PWideString; p8: PWideString; p9: PWideString; p10: PWideString): QListViewItemH; external QtShareName name QtNamePrefix + 'QListViewItem_create7';
function QListViewItem_create(parent: QListViewItemH; after: QListViewItemH; p3: PWideString; p4: PWideString; p5: PWideString; p6: PWideString; p7: PWideString; p8: PWideString; p9: PWideString; p10: PWideString): QListViewItemH; external QtShareName name QtNamePrefix + 'QListViewItem_create8';
procedure QListViewItem_insertItem; external QtShareName name QtNamePrefix + 'QListViewItem_insertItem';
procedure QListViewItem_takeItem; external QtShareName name QtNamePrefix + 'QListViewItem_takeItem';
procedure QListViewItem_removeItem; external QtShareName name QtNamePrefix + 'QListViewItem_removeItem';
function QListViewItem_height; external QtShareName name QtNamePrefix + 'QListViewItem_height';
procedure QListViewItem_invalidateHeight; external QtShareName name QtNamePrefix + 'QListViewItem_invalidateHeight';
function QListViewItem_totalHeight; external QtShareName name QtNamePrefix + 'QListViewItem_totalHeight';
function QListViewItem_width; external QtShareName name QtNamePrefix + 'QListViewItem_width';
procedure QListViewItem_widthChanged; external QtShareName name QtNamePrefix + 'QListViewItem_widthChanged';
function QListViewItem_depth; external QtShareName name QtNamePrefix + 'QListViewItem_depth';
procedure QListViewItem_setText; external QtShareName name QtNamePrefix + 'QListViewItem_setText';
procedure QListViewItem_text; external QtShareName name QtNamePrefix + 'QListViewItem_text';
procedure QListViewItem_setPixmap; external QtShareName name QtNamePrefix + 'QListViewItem_setPixmap';
function QListViewItem_pixmap; external QtShareName name QtNamePrefix + 'QListViewItem_pixmap';
procedure QListViewItem_key; external QtShareName name QtNamePrefix + 'QListViewItem_key';
procedure QListViewItem_sortChildItems; external QtShareName name QtNamePrefix + 'QListViewItem_sortChildItems';
function QListViewItem_childCount; external QtShareName name QtNamePrefix + 'QListViewItem_childCount';
function QListViewItem_isOpen; external QtShareName name QtNamePrefix + 'QListViewItem_isOpen';
procedure QListViewItem_setOpen; external QtShareName name QtNamePrefix + 'QListViewItem_setOpen';
procedure QListViewItem_setup; external QtShareName name QtNamePrefix + 'QListViewItem_setup';
procedure QListViewItem_setSelected; external QtShareName name QtNamePrefix + 'QListViewItem_setSelected';
function QListViewItem_isSelected; external QtShareName name QtNamePrefix + 'QListViewItem_isSelected';
procedure QListViewItem_paintCell; external QtShareName name QtNamePrefix + 'QListViewItem_paintCell';
procedure QListViewItem_paintBranches; external QtShareName name QtNamePrefix + 'QListViewItem_paintBranches';
procedure QListViewItem_paintFocus; external QtShareName name QtNamePrefix + 'QListViewItem_paintFocus';
function QListViewItem_firstChild; external QtShareName name QtNamePrefix + 'QListViewItem_firstChild';
function QListViewItem_nextSibling; external QtShareName name QtNamePrefix + 'QListViewItem_nextSibling';
function QListViewItem_parent; external QtShareName name QtNamePrefix + 'QListViewItem_parent';
function QListViewItem_itemAbove; external QtShareName name QtNamePrefix + 'QListViewItem_itemAbove';
function QListViewItem_itemBelow; external QtShareName name QtNamePrefix + 'QListViewItem_itemBelow';
function QListViewItem_itemPos; external QtShareName name QtNamePrefix + 'QListViewItem_itemPos';
function QListViewItem_listView; external QtShareName name QtNamePrefix + 'QListViewItem_listView';
procedure QListViewItem_setSelectable; external QtShareName name QtNamePrefix + 'QListViewItem_setSelectable';
function QListViewItem_isSelectable; external QtShareName name QtNamePrefix + 'QListViewItem_isSelectable';
procedure QListViewItem_setExpandable; external QtShareName name QtNamePrefix + 'QListViewItem_setExpandable';
function QListViewItem_isExpandable; external QtShareName name QtNamePrefix + 'QListViewItem_isExpandable';
procedure QListViewItem_repaint; external QtShareName name QtNamePrefix + 'QListViewItem_repaint';
procedure QListViewItem_sort; external QtShareName name QtNamePrefix + 'QListViewItem_sort';
procedure QListViewItem_moveItem; external QtShareName name QtNamePrefix + 'QListViewItem_moveItem';
procedure QListView_destroy; external QtShareName name QtNamePrefix + 'QListView_destroy';
function QListView_create(parent: QWidgetH; name: PAnsiChar; f: WFlags): QListViewH; external QtShareName name QtNamePrefix + 'QListView_create';
function QListView_create(parent: QWidgetH; name: PAnsiChar): QListViewH; external QtShareName name QtNamePrefix + 'QListView_create2';
function QListView_treeStepSize; external QtShareName name QtNamePrefix + 'QListView_treeStepSize';
procedure QListView_setTreeStepSize; external QtShareName name QtNamePrefix + 'QListView_setTreeStepSize';
procedure QListView_insertItem; external QtShareName name QtNamePrefix + 'QListView_insertItem';
procedure QListView_takeItem; external QtShareName name QtNamePrefix + 'QListView_takeItem';
procedure QListView_removeItem; external QtShareName name QtNamePrefix + 'QListView_removeItem';
procedure QListView_clear; external QtShareName name QtNamePrefix + 'QListView_clear';
function QListView_header; external QtShareName name QtNamePrefix + 'QListView_header';
function QListView_addColumn(handle: QListViewH; _label: PWideString; size: Integer): Integer; external QtShareName name QtNamePrefix + 'QListView_addColumn';
function QListView_addColumn(handle: QListViewH; iconset: QIconSetH; _label: PWideString; size: Integer): Integer; external QtShareName name QtNamePrefix + 'QListView_addColumn2';
procedure QListView_removeColumn; external QtShareName name QtNamePrefix + 'QListView_removeColumn';
procedure QListView_setColumnText(handle: QListViewH; column: Integer; _label: PWideString); external QtShareName name QtNamePrefix + 'QListView_setColumnText';
procedure QListView_setColumnText(handle: QListViewH; column: Integer; iconset: QIconSetH; _label: PWideString); external QtShareName name QtNamePrefix + 'QListView_setColumnText2';
procedure QListView_columnText; external QtShareName name QtNamePrefix + 'QListView_columnText';
procedure QListView_setColumnWidth; external QtShareName name QtNamePrefix + 'QListView_setColumnWidth';
function QListView_columnWidth; external QtShareName name QtNamePrefix + 'QListView_columnWidth';
procedure QListView_setColumnWidthMode; external QtShareName name QtNamePrefix + 'QListView_setColumnWidthMode';
function QListView_columnWidthMode; external QtShareName name QtNamePrefix + 'QListView_columnWidthMode';
function QListView_columns; external QtShareName name QtNamePrefix + 'QListView_columns';
procedure QListView_setColumnAlignment; external QtShareName name QtNamePrefix + 'QListView_setColumnAlignment';
function QListView_columnAlignment; external QtShareName name QtNamePrefix + 'QListView_columnAlignment';
procedure QListView_show; external QtShareName name QtNamePrefix + 'QListView_show';
function QListView_itemAt; external QtShareName name QtNamePrefix + 'QListView_itemAt';
procedure QListView_itemRect; external QtShareName name QtNamePrefix + 'QListView_itemRect';
function QListView_itemPos; external QtShareName name QtNamePrefix + 'QListView_itemPos';
procedure QListView_ensureItemVisible; external QtShareName name QtNamePrefix + 'QListView_ensureItemVisible';
procedure QListView_repaintItem; external QtShareName name QtNamePrefix + 'QListView_repaintItem';
procedure QListView_setMultiSelection; external QtShareName name QtNamePrefix + 'QListView_setMultiSelection';
function QListView_isMultiSelection; external QtShareName name QtNamePrefix + 'QListView_isMultiSelection';
procedure QListView_setSelectionMode; external QtShareName name QtNamePrefix + 'QListView_setSelectionMode';
function QListView_selectionMode; external QtShareName name QtNamePrefix + 'QListView_selectionMode';
procedure QListView_clearSelection; external QtShareName name QtNamePrefix + 'QListView_clearSelection';
procedure QListView_setSelected; external QtShareName name QtNamePrefix + 'QListView_setSelected';
function QListView_isSelected; external QtShareName name QtNamePrefix + 'QListView_isSelected';
function QListView_selectedItem; external QtShareName name QtNamePrefix + 'QListView_selectedItem';
procedure QListView_setOpen; external QtShareName name QtNamePrefix + 'QListView_setOpen';
function QListView_isOpen; external QtShareName name QtNamePrefix + 'QListView_isOpen';
procedure QListView_setCurrentItem; external QtShareName name QtNamePrefix + 'QListView_setCurrentItem';
function QListView_currentItem; external QtShareName name QtNamePrefix + 'QListView_currentItem';
function QListView_firstChild; external QtShareName name QtNamePrefix + 'QListView_firstChild';
function QListView_childCount; external QtShareName name QtNamePrefix + 'QListView_childCount';
procedure QListView_setAllColumnsShowFocus; external QtShareName name QtNamePrefix + 'QListView_setAllColumnsShowFocus';
function QListView_allColumnsShowFocus; external QtShareName name QtNamePrefix + 'QListView_allColumnsShowFocus';
procedure QListView_setItemMargin; external QtShareName name QtNamePrefix + 'QListView_setItemMargin';
function QListView_itemMargin; external QtShareName name QtNamePrefix + 'QListView_itemMargin';
procedure QListView_setRootIsDecorated; external QtShareName name QtNamePrefix + 'QListView_setRootIsDecorated';
function QListView_rootIsDecorated; external QtShareName name QtNamePrefix + 'QListView_rootIsDecorated';
procedure QListView_setSorting; external QtShareName name QtNamePrefix + 'QListView_setSorting';
procedure QListView_sort; external QtShareName name QtNamePrefix + 'QListView_sort';
procedure QListView_setFont; external QtShareName name QtNamePrefix + 'QListView_setFont';
procedure QListView_setPalette; external QtShareName name QtNamePrefix + 'QListView_setPalette';
function QListView_eventFilter; external QtShareName name QtNamePrefix + 'QListView_eventFilter';
procedure QListView_sizeHint; external QtShareName name QtNamePrefix + 'QListView_sizeHint';
procedure QListView_minimumSizeHint; external QtShareName name QtNamePrefix + 'QListView_minimumSizeHint';
procedure QListView_setShowSortIndicator; external QtShareName name QtNamePrefix + 'QListView_setShowSortIndicator';
function QListView_showSortIndicator; external QtShareName name QtNamePrefix + 'QListView_showSortIndicator';
procedure QListView_invertSelection; external QtShareName name QtNamePrefix + 'QListView_invertSelection';
procedure QListView_selectAll; external QtShareName name QtNamePrefix + 'QListView_selectAll';
procedure QListView_triggerUpdate; external QtShareName name QtNamePrefix + 'QListView_triggerUpdate';
procedure QListView_setContentsPos; external QtShareName name QtNamePrefix + 'QListView_setContentsPos';
procedure QCheckListItem_destroy; external QtShareName name QtNamePrefix + 'QCheckListItem_destroy';
function QCheckListItem_create(parent: QCheckListItemH; text: PWideString; p3: QCheckListItemType): QCheckListItemH; external QtShareName name QtNamePrefix + 'QCheckListItem_create';
function QCheckListItem_create(parent: QListViewItemH; text: PWideString; p3: QCheckListItemType): QCheckListItemH; external QtShareName name QtNamePrefix + 'QCheckListItem_create2';
function QCheckListItem_create(parent: QListViewH; text: PWideString; p3: QCheckListItemType): QCheckListItemH; external QtShareName name QtNamePrefix + 'QCheckListItem_create3';
function QCheckListItem_create(parent: QListViewItemH; text: PWideString; p3: QPixmapH): QCheckListItemH; external QtShareName name QtNamePrefix + 'QCheckListItem_create4';
function QCheckListItem_create(parent: QListViewH; text: PWideString; p3: QPixmapH): QCheckListItemH; external QtShareName name QtNamePrefix + 'QCheckListItem_create5';
procedure QCheckListItem_paintCell; external QtShareName name QtNamePrefix + 'QCheckListItem_paintCell';
procedure QCheckListItem_paintFocus; external QtShareName name QtNamePrefix + 'QCheckListItem_paintFocus';
function QCheckListItem_width; external QtShareName name QtNamePrefix + 'QCheckListItem_width';
procedure QCheckListItem_setup; external QtShareName name QtNamePrefix + 'QCheckListItem_setup';
procedure QCheckListItem_setOn; external QtShareName name QtNamePrefix + 'QCheckListItem_setOn';
function QCheckListItem_isOn; external QtShareName name QtNamePrefix + 'QCheckListItem_isOn';
function QCheckListItem_type; external QtShareName name QtNamePrefix + 'QCheckListItem_type';
procedure QCheckListItem_text(handle: QCheckListItemH; retval: PWideString); external QtShareName name QtNamePrefix + 'QCheckListItem_text';
procedure QCheckListItem_text(handle: QCheckListItemH; retval: PWideString; n: Integer); external QtShareName name QtNamePrefix + 'QCheckListItem_text2';
procedure QCheckListItem_setEnabled; external QtShareName name QtNamePrefix + 'QCheckListItem_setEnabled';
function QCheckListItem_isEnabled; external QtShareName name QtNamePrefix + 'QCheckListItem_isEnabled';
procedure QListViewItemIterator_destroy; external QtShareName name QtNamePrefix + 'QListViewItemIterator_destroy';
function QListViewItemIterator_create(): QListViewItemIteratorH; external QtShareName name QtNamePrefix + 'QListViewItemIterator_create';
function QListViewItemIterator_create(item: QListViewItemH): QListViewItemIteratorH; external QtShareName name QtNamePrefix + 'QListViewItemIterator_create2';
function QListViewItemIterator_create(it: QListViewItemIteratorH): QListViewItemIteratorH; external QtShareName name QtNamePrefix + 'QListViewItemIterator_create3';
function QListViewItemIterator_create(lv: QListViewH): QListViewItemIteratorH; external QtShareName name QtNamePrefix + 'QListViewItemIterator_create4';
function QListViewItemIterator_current; external QtShareName name QtNamePrefix + 'QListViewItemIterator_current';
procedure QMenuBar_destroy; external QtShareName name QtNamePrefix + 'QMenuBar_destroy';
function QMenuBar_create; external QtShareName name QtNamePrefix + 'QMenuBar_create';
procedure QMenuBar_updateItem; external QtShareName name QtNamePrefix + 'QMenuBar_updateItem';
procedure QMenuBar_show; external QtShareName name QtNamePrefix + 'QMenuBar_show';
procedure QMenuBar_hide; external QtShareName name QtNamePrefix + 'QMenuBar_hide';
function QMenuBar_eventFilter; external QtShareName name QtNamePrefix + 'QMenuBar_eventFilter';
function QMenuBar_heightForWidth; external QtShareName name QtNamePrefix + 'QMenuBar_heightForWidth';
function QMenuBar_separator; external QtShareName name QtNamePrefix + 'QMenuBar_separator';
procedure QMenuBar_setSeparator; external QtShareName name QtNamePrefix + 'QMenuBar_setSeparator';
procedure QMenuBar_setDefaultUp; external QtShareName name QtNamePrefix + 'QMenuBar_setDefaultUp';
function QMenuBar_isDefaultUp; external QtShareName name QtNamePrefix + 'QMenuBar_isDefaultUp';
function QMenuBar_customWhatsThis; external QtShareName name QtNamePrefix + 'QMenuBar_customWhatsThis';
procedure QMenuBar_sizeHint; external QtShareName name QtNamePrefix + 'QMenuBar_sizeHint';
procedure QMenuBar_minimumSize; external QtShareName name QtNamePrefix + 'QMenuBar_minimumSize';
procedure QMenuBar_minimumSizeHint; external QtShareName name QtNamePrefix + 'QMenuBar_minimumSizeHint';
procedure QMenuBar_activateItemAt; external QtShareName name QtNamePrefix + 'QMenuBar_activateItemAt';
function QMenuBar_to_QMenuData; external QtSharename name QtNamePrefix + 'QMenuBar_to_QMenuData';
procedure QMessageBox_destroy; external QtShareName name QtNamePrefix + 'QMessageBox_destroy';
function QMessageBox_create(parent: QWidgetH; name: PAnsiChar): QMessageBoxH; external QtShareName name QtNamePrefix + 'QMessageBox_create';
function QMessageBox_create(caption: PWideString; text: PWideString; icon: QMessageBoxIcon; button0: Integer; button1: Integer; button2: Integer; parent: QWidgetH; name: PAnsiChar; modal: Boolean; f: WFlags): QMessageBoxH; external QtShareName name QtNamePrefix + 'QMessageBox_create2';
function QMessageBox_information(parent: QWidgetH; caption: PWideString; text: PWideString; button0: Integer; button1: Integer; button2: Integer): Integer; external QtShareName name QtNamePrefix + 'QMessageBox_information';
function QMessageBox_information(parent: QWidgetH; caption: PWideString; text: PWideString; button0Text: PWideString; button1Text: PWideString; button2Text: PWideString; defaultButtonNumber: Integer; escapeButtonNumber: Integer): Integer; external QtShareName name QtNamePrefix + 'QMessageBox_information2';
function QMessageBox_warning(parent: QWidgetH; caption: PWideString; text: PWideString; button0: Integer; button1: Integer; button2: Integer): Integer; external QtShareName name QtNamePrefix + 'QMessageBox_warning';
function QMessageBox_warning(parent: QWidgetH; caption: PWideString; text: PWideString; button0Text: PWideString; button1Text: PWideString; button2Text: PWideString; defaultButtonNumber: Integer; escapeButtonNumber: Integer): Integer; external QtShareName name QtNamePrefix + 'QMessageBox_warning2';
function QMessageBox_critical(parent: QWidgetH; caption: PWideString; text: PWideString; button0: Integer; button1: Integer; button2: Integer): Integer; external QtShareName name QtNamePrefix + 'QMessageBox_critical';
function QMessageBox_critical(parent: QWidgetH; caption: PWideString; text: PWideString; button0Text: PWideString; button1Text: PWideString; button2Text: PWideString; defaultButtonNumber: Integer; escapeButtonNumber: Integer): Integer; external QtShareName name QtNamePrefix + 'QMessageBox_critical2';
procedure QMessageBox_about; external QtShareName name QtNamePrefix + 'QMessageBox_about';
procedure QMessageBox_aboutQt; external QtShareName name QtNamePrefix + 'QMessageBox_aboutQt';
function QMessageBox_message; external QtShareName name QtNamePrefix + 'QMessageBox_message';
function QMessageBox_query; external QtShareName name QtNamePrefix + 'QMessageBox_query';
procedure QMessageBox_text; external QtShareName name QtNamePrefix + 'QMessageBox_text';
procedure QMessageBox_setText; external QtShareName name QtNamePrefix + 'QMessageBox_setText';
function QMessageBox_icon; external QtShareName name QtNamePrefix + 'QMessageBox_icon';
procedure QMessageBox_setIcon(handle: QMessageBoxH; p1: QMessageBoxIcon); external QtShareName name QtNamePrefix + 'QMessageBox_setIcon';
procedure QMessageBox_setIcon(handle: QMessageBoxH; p1: QPixmapH); external QtShareName name QtNamePrefix + 'QMessageBox_setIcon2';
function QMessageBox_iconPixmap; external QtShareName name QtNamePrefix + 'QMessageBox_iconPixmap';
procedure QMessageBox_setIconPixmap; external QtShareName name QtNamePrefix + 'QMessageBox_setIconPixmap';
procedure QMessageBox_buttonText; external QtShareName name QtNamePrefix + 'QMessageBox_buttonText';
procedure QMessageBox_setButtonText; external QtShareName name QtNamePrefix + 'QMessageBox_setButtonText';
procedure QMessageBox_adjustSize; external QtShareName name QtNamePrefix + 'QMessageBox_adjustSize';
procedure QMessageBox_standardIcon; external QtShareName name QtNamePrefix + 'QMessageBox_standardIcon';
function QMessageBox_textFormat; external QtShareName name QtNamePrefix + 'QMessageBox_textFormat';
procedure QMessageBox_setTextFormat; external QtShareName name QtNamePrefix + 'QMessageBox_setTextFormat';
procedure QMultiLineEdit_destroy; external QtShareName name QtNamePrefix + 'QMultiLineEdit_destroy';
function QMultiLineEdit_create; external QtShareName name QtNamePrefix + 'QMultiLineEdit_create';
procedure QMultiLineEdit_textLine; external QtShareName name QtNamePrefix + 'QMultiLineEdit_textLine';
function QMultiLineEdit_numLines; external QtShareName name QtNamePrefix + 'QMultiLineEdit_numLines';
procedure QMultiLineEdit_sizeHint; external QtShareName name QtNamePrefix + 'QMultiLineEdit_sizeHint';
procedure QMultiLineEdit_minimumSizeHint; external QtShareName name QtNamePrefix + 'QMultiLineEdit_minimumSizeHint';
procedure QMultiLineEdit_sizePolicy; external QtShareName name QtNamePrefix + 'QMultiLineEdit_sizePolicy';
procedure QMultiLineEdit_setFont; external QtShareName name QtNamePrefix + 'QMultiLineEdit_setFont';
procedure QMultiLineEdit_insertLine; external QtShareName name QtNamePrefix + 'QMultiLineEdit_insertLine';
procedure QMultiLineEdit_insertAt; external QtShareName name QtNamePrefix + 'QMultiLineEdit_insertAt';
procedure QMultiLineEdit_removeLine; external QtShareName name QtNamePrefix + 'QMultiLineEdit_removeLine';
procedure QMultiLineEdit_cursorPosition; external QtShareName name QtNamePrefix + 'QMultiLineEdit_cursorPosition';
procedure QMultiLineEdit_setCursorPosition; external QtShareName name QtNamePrefix + 'QMultiLineEdit_setCursorPosition';
procedure QMultiLineEdit_getCursorPosition; external QtShareName name QtNamePrefix + 'QMultiLineEdit_getCursorPosition';
function QMultiLineEdit_atBeginning; external QtShareName name QtNamePrefix + 'QMultiLineEdit_atBeginning';
function QMultiLineEdit_atEnd; external QtShareName name QtNamePrefix + 'QMultiLineEdit_atEnd';
procedure QMultiLineEdit_setFixedVisibleLines; external QtShareName name QtNamePrefix + 'QMultiLineEdit_setFixedVisibleLines';
function QMultiLineEdit_maxLineWidth; external QtShareName name QtNamePrefix + 'QMultiLineEdit_maxLineWidth';
procedure QMultiLineEdit_setAlignment; external QtShareName name QtNamePrefix + 'QMultiLineEdit_setAlignment';
function QMultiLineEdit_alignment; external QtShareName name QtNamePrefix + 'QMultiLineEdit_alignment';
procedure QMultiLineEdit_setValidator; external QtShareName name QtNamePrefix + 'QMultiLineEdit_setValidator';
function QMultiLineEdit_validator; external QtShareName name QtNamePrefix + 'QMultiLineEdit_validator';
procedure QMultiLineEdit_setEdited; external QtShareName name QtNamePrefix + 'QMultiLineEdit_setEdited';
function QMultiLineEdit_edited; external QtShareName name QtNamePrefix + 'QMultiLineEdit_edited';
procedure QMultiLineEdit_cursorWordForward; external QtShareName name QtNamePrefix + 'QMultiLineEdit_cursorWordForward';
procedure QMultiLineEdit_cursorWordBackward; external QtShareName name QtNamePrefix + 'QMultiLineEdit_cursorWordBackward';
procedure QMultiLineEdit_setEchoMode; external QtShareName name QtNamePrefix + 'QMultiLineEdit_setEchoMode';
function QMultiLineEdit_echoMode; external QtShareName name QtNamePrefix + 'QMultiLineEdit_echoMode';
procedure QMultiLineEdit_setMaxLength; external QtShareName name QtNamePrefix + 'QMultiLineEdit_setMaxLength';
function QMultiLineEdit_maxLength; external QtShareName name QtNamePrefix + 'QMultiLineEdit_maxLength';
procedure QMultiLineEdit_setMaxLineLength; external QtShareName name QtNamePrefix + 'QMultiLineEdit_setMaxLineLength';
function QMultiLineEdit_maxLineLength; external QtShareName name QtNamePrefix + 'QMultiLineEdit_maxLineLength';
procedure QMultiLineEdit_setMaxLines; external QtShareName name QtNamePrefix + 'QMultiLineEdit_setMaxLines';
function QMultiLineEdit_maxLines; external QtShareName name QtNamePrefix + 'QMultiLineEdit_maxLines';
procedure QMultiLineEdit_setHMargin; external QtShareName name QtNamePrefix + 'QMultiLineEdit_setHMargin';
function QMultiLineEdit_hMargin; external QtShareName name QtNamePrefix + 'QMultiLineEdit_hMargin';
procedure QMultiLineEdit_setSelection; external QtShareName name QtNamePrefix + 'QMultiLineEdit_setSelection';
procedure QMultiLineEdit_setWordWrap; external QtShareName name QtNamePrefix + 'QMultiLineEdit_setWordWrap';
function QMultiLineEdit_wordWrap; external QtShareName name QtNamePrefix + 'QMultiLineEdit_wordWrap';
procedure QMultiLineEdit_setWrapColumnOrWidth; external QtShareName name QtNamePrefix + 'QMultiLineEdit_setWrapColumnOrWidth';
function QMultiLineEdit_wrapColumnOrWidth; external QtShareName name QtNamePrefix + 'QMultiLineEdit_wrapColumnOrWidth';
procedure QMultiLineEdit_setWrapPolicy; external QtShareName name QtNamePrefix + 'QMultiLineEdit_setWrapPolicy';
function QMultiLineEdit_wrapPolicy; external QtShareName name QtNamePrefix + 'QMultiLineEdit_wrapPolicy';
function QMultiLineEdit_autoUpdate; external QtShareName name QtNamePrefix + 'QMultiLineEdit_autoUpdate';
procedure QMultiLineEdit_setAutoUpdate; external QtShareName name QtNamePrefix + 'QMultiLineEdit_setAutoUpdate';
procedure QMultiLineEdit_setUndoEnabled; external QtShareName name QtNamePrefix + 'QMultiLineEdit_setUndoEnabled';
function QMultiLineEdit_isUndoEnabled; external QtShareName name QtNamePrefix + 'QMultiLineEdit_isUndoEnabled';
procedure QMultiLineEdit_setUndoDepth; external QtShareName name QtNamePrefix + 'QMultiLineEdit_setUndoDepth';
function QMultiLineEdit_undoDepth; external QtShareName name QtNamePrefix + 'QMultiLineEdit_undoDepth';
function QMultiLineEdit_isReadOnly; external QtShareName name QtNamePrefix + 'QMultiLineEdit_isReadOnly';
function QMultiLineEdit_isOverwriteMode; external QtShareName name QtNamePrefix + 'QMultiLineEdit_isOverwriteMode';
procedure QMultiLineEdit_text; external QtShareName name QtNamePrefix + 'QMultiLineEdit_text';
function QMultiLineEdit_length; external QtShareName name QtNamePrefix + 'QMultiLineEdit_length';
procedure QMultiLineEdit_setDefaultTabStop; external QtShareName name QtNamePrefix + 'QMultiLineEdit_setDefaultTabStop';
function QMultiLineEdit_defaultTabStop; external QtShareName name QtNamePrefix + 'QMultiLineEdit_defaultTabStop';
procedure QMultiLineEdit_setText; external QtShareName name QtNamePrefix + 'QMultiLineEdit_setText';
procedure QMultiLineEdit_setReadOnly; external QtShareName name QtNamePrefix + 'QMultiLineEdit_setReadOnly';
procedure QMultiLineEdit_setOverwriteMode; external QtShareName name QtNamePrefix + 'QMultiLineEdit_setOverwriteMode';
procedure QMultiLineEdit_clear; external QtShareName name QtNamePrefix + 'QMultiLineEdit_clear';
procedure QMultiLineEdit_append; external QtShareName name QtNamePrefix + 'QMultiLineEdit_append';
procedure QMultiLineEdit_deselect; external QtShareName name QtNamePrefix + 'QMultiLineEdit_deselect';
procedure QMultiLineEdit_selectAll; external QtShareName name QtNamePrefix + 'QMultiLineEdit_selectAll';
procedure QMultiLineEdit_paste; external QtShareName name QtNamePrefix + 'QMultiLineEdit_paste';
procedure QMultiLineEdit_pasteSubType; external QtShareName name QtNamePrefix + 'QMultiLineEdit_pasteSubType';
procedure QMultiLineEdit_copyText; external QtShareName name QtNamePrefix + 'QMultiLineEdit_copyText';
procedure QMultiLineEdit_copy; external QtShareName name QtNamePrefix + 'QMultiLineEdit_copy';
procedure QMultiLineEdit_cut; external QtShareName name QtNamePrefix + 'QMultiLineEdit_cut';
procedure QMultiLineEdit_insert; external QtShareName name QtNamePrefix + 'QMultiLineEdit_insert';
procedure QMultiLineEdit_undo; external QtShareName name QtNamePrefix + 'QMultiLineEdit_undo';
procedure QMultiLineEdit_redo; external QtShareName name QtNamePrefix + 'QMultiLineEdit_redo';
procedure QScrollView_destroy; external QtShareName name QtNamePrefix + 'QScrollView_destroy';
function QScrollView_create; external QtShareName name QtNamePrefix + 'QScrollView_create';
procedure QScrollView_setResizePolicy; external QtShareName name QtNamePrefix + 'QScrollView_setResizePolicy';
function QScrollView_resizePolicy; external QtShareName name QtNamePrefix + 'QScrollView_resizePolicy';
procedure QScrollView_styleChange; external QtShareName name QtNamePrefix + 'QScrollView_styleChange';
procedure QScrollView_removeChild(handle: QScrollViewH; child: QWidgetH); external QtShareName name QtNamePrefix + 'QScrollView_removeChild';
procedure QScrollView_addChild; external QtShareName name QtNamePrefix + 'QScrollView_addChild';
procedure QScrollView_moveChild; external QtShareName name QtNamePrefix + 'QScrollView_moveChild';
function QScrollView_childX; external QtShareName name QtNamePrefix + 'QScrollView_childX';
function QScrollView_childY; external QtShareName name QtNamePrefix + 'QScrollView_childY';
function QScrollView_childIsVisible; external QtShareName name QtNamePrefix + 'QScrollView_childIsVisible';
procedure QScrollView_showChild; external QtShareName name QtNamePrefix + 'QScrollView_showChild';
function QScrollView_vScrollBarMode; external QtShareName name QtNamePrefix + 'QScrollView_vScrollBarMode';
procedure QScrollView_setVScrollBarMode; external QtShareName name QtNamePrefix + 'QScrollView_setVScrollBarMode';
function QScrollView_hScrollBarMode; external QtShareName name QtNamePrefix + 'QScrollView_hScrollBarMode';
procedure QScrollView_setHScrollBarMode; external QtShareName name QtNamePrefix + 'QScrollView_setHScrollBarMode';
function QScrollView_cornerWidget; external QtShareName name QtNamePrefix + 'QScrollView_cornerWidget';
procedure QScrollView_setCornerWidget; external QtShareName name QtNamePrefix + 'QScrollView_setCornerWidget';
function QScrollView_horizontalScrollBar; external QtShareName name QtNamePrefix + 'QScrollView_horizontalScrollBar';
function QScrollView_verticalScrollBar; external QtShareName name QtNamePrefix + 'QScrollView_verticalScrollBar';
function QScrollView_viewport; external QtShareName name QtNamePrefix + 'QScrollView_viewport';
function QScrollView_clipper; external QtShareName name QtNamePrefix + 'QScrollView_clipper';
function QScrollView_visibleWidth; external QtShareName name QtNamePrefix + 'QScrollView_visibleWidth';
function QScrollView_visibleHeight; external QtShareName name QtNamePrefix + 'QScrollView_visibleHeight';
function QScrollView_contentsWidth; external QtShareName name QtNamePrefix + 'QScrollView_contentsWidth';
function QScrollView_contentsHeight; external QtShareName name QtNamePrefix + 'QScrollView_contentsHeight';
function QScrollView_contentsX; external QtShareName name QtNamePrefix + 'QScrollView_contentsX';
function QScrollView_contentsY; external QtShareName name QtNamePrefix + 'QScrollView_contentsY';
procedure QScrollView_resize(handle: QScrollViewH; w: Integer; h: Integer); external QtShareName name QtNamePrefix + 'QScrollView_resize';
procedure QScrollView_resize(handle: QScrollViewH; p1: PSize); external QtShareName name QtNamePrefix + 'QScrollView_resize2';
procedure QScrollView_show; external QtShareName name QtNamePrefix + 'QScrollView_show';
procedure QScrollView_updateContents(handle: QScrollViewH; x: Integer; y: Integer; w: Integer; h: Integer); external QtShareName name QtNamePrefix + 'QScrollView_updateContents';
procedure QScrollView_updateContents(handle: QScrollViewH; r: PRect); external QtShareName name QtNamePrefix + 'QScrollView_updateContents2';
procedure QScrollView_repaintContents(handle: QScrollViewH; x: Integer; y: Integer; w: Integer; h: Integer; erase: Boolean); external QtShareName name QtNamePrefix + 'QScrollView_repaintContents';
procedure QScrollView_repaintContents(handle: QScrollViewH; r: PRect; erase: Boolean); external QtShareName name QtNamePrefix + 'QScrollView_repaintContents2';
procedure QScrollView_contentsToViewport(handle: QScrollViewH; x: Integer; y: Integer; vx: PInteger; vy: PInteger); external QtShareName name QtNamePrefix + 'QScrollView_contentsToViewport';
procedure QScrollView_viewportToContents(handle: QScrollViewH; vx: Integer; vy: Integer; x: PInteger; y: PInteger); external QtShareName name QtNamePrefix + 'QScrollView_viewportToContents';
procedure QScrollView_contentsToViewport(handle: QScrollViewH; retval: PPoint; p1: PPoint); external QtShareName name QtNamePrefix + 'QScrollView_contentsToViewport2';
procedure QScrollView_viewportToContents(handle: QScrollViewH; retval: PPoint; p1: PPoint); external QtShareName name QtNamePrefix + 'QScrollView_viewportToContents2';
procedure QScrollView_enableClipper; external QtShareName name QtNamePrefix + 'QScrollView_enableClipper';
procedure QScrollView_setStaticBackground; external QtShareName name QtNamePrefix + 'QScrollView_setStaticBackground';
function QScrollView_hasStaticBackground; external QtShareName name QtNamePrefix + 'QScrollView_hasStaticBackground';
procedure QScrollView_viewportSize; external QtShareName name QtNamePrefix + 'QScrollView_viewportSize';
procedure QScrollView_sizePolicy; external QtShareName name QtNamePrefix + 'QScrollView_sizePolicy';
procedure QScrollView_sizeHint; external QtShareName name QtNamePrefix + 'QScrollView_sizeHint';
procedure QScrollView_minimumSizeHint; external QtShareName name QtNamePrefix + 'QScrollView_minimumSizeHint';
procedure QScrollView_removeChild(handle: QScrollViewH; child: QObjectH); external QtShareName name QtNamePrefix + 'QScrollView_removeChild2';
procedure QScrollView_setDragAutoScroll; external QtShareName name QtNamePrefix + 'QScrollView_setDragAutoScroll';
function QScrollView_dragAutoScroll; external QtShareName name QtNamePrefix + 'QScrollView_dragAutoScroll';
procedure QScrollView_resizeContents; external QtShareName name QtNamePrefix + 'QScrollView_resizeContents';
procedure QScrollView_scrollBy; external QtShareName name QtNamePrefix + 'QScrollView_scrollBy';
procedure QScrollView_setContentsPos; external QtShareName name QtNamePrefix + 'QScrollView_setContentsPos';
procedure QScrollView_ensureVisible(handle: QScrollViewH; x: Integer; y: Integer); external QtShareName name QtNamePrefix + 'QScrollView_ensureVisible';
procedure QScrollView_ensureVisible(handle: QScrollViewH; x: Integer; y: Integer; xmargin: Integer; ymargin: Integer); external QtShareName name QtNamePrefix + 'QScrollView_ensureVisible2';
procedure QScrollView_center(handle: QScrollViewH; x: Integer; y: Integer); external QtShareName name QtNamePrefix + 'QScrollView_center';
procedure QScrollView_center(handle: QScrollViewH; x: Integer; y: Integer; xmargin: Single; ymargin: Single); external QtShareName name QtNamePrefix + 'QScrollView_center2';
procedure QScrollView_updateScrollBars; external QtShareName name QtNamePrefix + 'QScrollView_updateScrollBars';
procedure QScrollView_setEnabled; external QtShareName name QtNamePrefix + 'QScrollView_setEnabled';
procedure QSlider_destroy; external QtShareName name QtNamePrefix + 'QSlider_destroy';
function QSlider_create(parent: QWidgetH; name: PAnsiChar): QSliderH; external QtShareName name QtNamePrefix + 'QSlider_create';
function QSlider_create(p1: Orientation; parent: QWidgetH; name: PAnsiChar): QSliderH; external QtShareName name QtNamePrefix + 'QSlider_create2';
function QSlider_create(minValue: Integer; maxValue: Integer; pageStep: Integer; value: Integer; p5: Orientation; parent: QWidgetH; name: PAnsiChar): QSliderH; external QtShareName name QtNamePrefix + 'QSlider_create3';
procedure QSlider_setOrientation; external QtShareName name QtNamePrefix + 'QSlider_setOrientation';
function QSlider_orientation; external QtShareName name QtNamePrefix + 'QSlider_orientation';
procedure QSlider_setTracking; external QtShareName name QtNamePrefix + 'QSlider_setTracking';
function QSlider_tracking; external QtShareName name QtNamePrefix + 'QSlider_tracking';
procedure QSlider_setPalette; external QtShareName name QtNamePrefix + 'QSlider_setPalette';
procedure QSlider_sliderRect; external QtShareName name QtNamePrefix + 'QSlider_sliderRect';
procedure QSlider_sizeHint; external QtShareName name QtNamePrefix + 'QSlider_sizeHint';
procedure QSlider_sizePolicy; external QtShareName name QtNamePrefix + 'QSlider_sizePolicy';
procedure QSlider_minimumSizeHint; external QtShareName name QtNamePrefix + 'QSlider_minimumSizeHint';
procedure QSlider_setTickmarks; external QtShareName name QtNamePrefix + 'QSlider_setTickmarks';
function QSlider_tickmarks; external QtShareName name QtNamePrefix + 'QSlider_tickmarks';
procedure QSlider_setTickInterval; external QtShareName name QtNamePrefix + 'QSlider_setTickInterval';
function QSlider_tickInterval; external QtShareName name QtNamePrefix + 'QSlider_tickInterval';
function QSlider_minValue; external QtShareName name QtNamePrefix + 'QSlider_minValue';
function QSlider_maxValue; external QtShareName name QtNamePrefix + 'QSlider_maxValue';
procedure QSlider_setMinValue; external QtShareName name QtNamePrefix + 'QSlider_setMinValue';
procedure QSlider_setMaxValue; external QtShareName name QtNamePrefix + 'QSlider_setMaxValue';
function QSlider_lineStep; external QtShareName name QtNamePrefix + 'QSlider_lineStep';
function QSlider_pageStep; external QtShareName name QtNamePrefix + 'QSlider_pageStep';
procedure QSlider_setLineStep; external QtShareName name QtNamePrefix + 'QSlider_setLineStep';
procedure QSlider_setPageStep; external QtShareName name QtNamePrefix + 'QSlider_setPageStep';
function QSlider_value; external QtShareName name QtNamePrefix + 'QSlider_value';
procedure QSlider_setValue; external QtShareName name QtNamePrefix + 'QSlider_setValue';
procedure QSlider_addStep; external QtShareName name QtNamePrefix + 'QSlider_addStep';
procedure QSlider_subtractStep; external QtShareName name QtNamePrefix + 'QSlider_subtractStep';
function QSlider_to_QRangeControl; external QtSharename name QtNamePrefix + 'QSlider_to_QRangeControl';
procedure QSocketNotifier_destroy; external QtShareName name QtNamePrefix + 'QSocketNotifier_destroy';
function QSocketNotifier_create; external QtShareName name QtNamePrefix + 'QSocketNotifier_create';
function QSocketNotifier_socket; external QtShareName name QtNamePrefix + 'QSocketNotifier_socket';
function QSocketNotifier_type; external QtShareName name QtNamePrefix + 'QSocketNotifier_type';
function QSocketNotifier_isEnabled; external QtShareName name QtNamePrefix + 'QSocketNotifier_isEnabled';
procedure QSocketNotifier_setEnabled; external QtShareName name QtNamePrefix + 'QSocketNotifier_setEnabled';
procedure QSpinBox_destroy; external QtShareName name QtNamePrefix + 'QSpinBox_destroy';
function QSpinBox_create(parent: QWidgetH; name: PAnsiChar): QSpinBoxH; external QtShareName name QtNamePrefix + 'QSpinBox_create';
function QSpinBox_create(minValue: Integer; maxValue: Integer; step: Integer; parent: QWidgetH; name: PAnsiChar): QSpinBoxH; external QtShareName name QtNamePrefix + 'QSpinBox_create2';
procedure QSpinBox_text; external QtShareName name QtNamePrefix + 'QSpinBox_text';
procedure QSpinBox_prefix; external QtShareName name QtNamePrefix + 'QSpinBox_prefix';
procedure QSpinBox_suffix; external QtShareName name QtNamePrefix + 'QSpinBox_suffix';
procedure QSpinBox_cleanText; external QtShareName name QtNamePrefix + 'QSpinBox_cleanText';
procedure QSpinBox_setSpecialValueText; external QtShareName name QtNamePrefix + 'QSpinBox_setSpecialValueText';
procedure QSpinBox_specialValueText; external QtShareName name QtNamePrefix + 'QSpinBox_specialValueText';
procedure QSpinBox_setWrapping; external QtShareName name QtNamePrefix + 'QSpinBox_setWrapping';
function QSpinBox_wrapping; external QtShareName name QtNamePrefix + 'QSpinBox_wrapping';
procedure QSpinBox_setButtonSymbols; external QtShareName name QtNamePrefix + 'QSpinBox_setButtonSymbols';
function QSpinBox_buttonSymbols; external QtShareName name QtNamePrefix + 'QSpinBox_buttonSymbols';
procedure QSpinBox_setValidator; external QtShareName name QtNamePrefix + 'QSpinBox_setValidator';
function QSpinBox_validator; external QtShareName name QtNamePrefix + 'QSpinBox_validator';
procedure QSpinBox_sizeHint; external QtShareName name QtNamePrefix + 'QSpinBox_sizeHint';
procedure QSpinBox_sizePolicy; external QtShareName name QtNamePrefix + 'QSpinBox_sizePolicy';
function QSpinBox_minValue; external QtShareName name QtNamePrefix + 'QSpinBox_minValue';
function QSpinBox_maxValue; external QtShareName name QtNamePrefix + 'QSpinBox_maxValue';
procedure QSpinBox_setMinValue; external QtShareName name QtNamePrefix + 'QSpinBox_setMinValue';
procedure QSpinBox_setMaxValue; external QtShareName name QtNamePrefix + 'QSpinBox_setMaxValue';
function QSpinBox_lineStep; external QtShareName name QtNamePrefix + 'QSpinBox_lineStep';
procedure QSpinBox_setLineStep; external QtShareName name QtNamePrefix + 'QSpinBox_setLineStep';
function QSpinBox_value; external QtShareName name QtNamePrefix + 'QSpinBox_value';
procedure QSpinBox_setValue; external QtShareName name QtNamePrefix + 'QSpinBox_setValue';
procedure QSpinBox_setPrefix; external QtShareName name QtNamePrefix + 'QSpinBox_setPrefix';
procedure QSpinBox_setSuffix; external QtShareName name QtNamePrefix + 'QSpinBox_setSuffix';
procedure QSpinBox_stepUp; external QtShareName name QtNamePrefix + 'QSpinBox_stepUp';
procedure QSpinBox_stepDown; external QtShareName name QtNamePrefix + 'QSpinBox_stepDown';
procedure QSpinBox_setEnabled; external QtShareName name QtNamePrefix + 'QSpinBox_setEnabled';
function QSpinBox_to_QRangeControl; external QtSharename name QtNamePrefix + 'QSpinBox_to_QRangeControl';
procedure QStyle_destroy; external QtShareName name QtNamePrefix + 'QStyle_destroy';
function QStyle_guiStyle; external QtShareName name QtNamePrefix + 'QStyle_guiStyle';
procedure QStyle_polish(handle: QStyleH; p1: QWidgetH); external QtShareName name QtNamePrefix + 'QStyle_polish';
procedure QStyle_unPolish(handle: QStyleH; p1: QWidgetH); external QtShareName name QtNamePrefix + 'QStyle_unPolish';
procedure QStyle_polish(handle: QStyleH; p1: QApplicationH); external QtShareName name QtNamePrefix + 'QStyle_polish2';
procedure QStyle_unPolish(handle: QStyleH; p1: QApplicationH); external QtShareName name QtNamePrefix + 'QStyle_unPolish2';
procedure QStyle_polish(handle: QStyleH; p1: QPaletteH); external QtShareName name QtNamePrefix + 'QStyle_polish3';
procedure QStyle_itemRect; external QtShareName name QtNamePrefix + 'QStyle_itemRect';
procedure QStyle_drawItem; external QtShareName name QtNamePrefix + 'QStyle_drawItem';
procedure QStyle_drawSeparator; external QtShareName name QtNamePrefix + 'QStyle_drawSeparator';
procedure QStyle_drawRect; external QtShareName name QtNamePrefix + 'QStyle_drawRect';
procedure QStyle_drawRectStrong; external QtShareName name QtNamePrefix + 'QStyle_drawRectStrong';
procedure QStyle_drawButton; external QtShareName name QtNamePrefix + 'QStyle_drawButton';
procedure QStyle_buttonRect; external QtShareName name QtNamePrefix + 'QStyle_buttonRect';
procedure QStyle_drawButtonMask; external QtShareName name QtNamePrefix + 'QStyle_drawButtonMask';
procedure QStyle_drawBevelButton; external QtShareName name QtNamePrefix + 'QStyle_drawBevelButton';
procedure QStyle_bevelButtonRect; external QtShareName name QtNamePrefix + 'QStyle_bevelButtonRect';
procedure QStyle_drawToolButton(handle: QStyleH; p: QPainterH; x: Integer; y: Integer; w: Integer; h: Integer; g: QColorGroupH; sunken: Boolean; fill: QBrushH); external QtShareName name QtNamePrefix + 'QStyle_drawToolButton';
procedure QStyle_drawToolButton(handle: QStyleH; btn: QToolButtonH; p: QPainterH); external QtShareName name QtNamePrefix + 'QStyle_drawToolButton2';
procedure QStyle_toolButtonRect; external QtShareName name QtNamePrefix + 'QStyle_toolButtonRect';
procedure QStyle_drawPanel; external QtShareName name QtNamePrefix + 'QStyle_drawPanel';
procedure QStyle_drawPopupPanel; external QtShareName name QtNamePrefix + 'QStyle_drawPopupPanel';
procedure QStyle_drawArrow; external QtShareName name QtNamePrefix + 'QStyle_drawArrow';
procedure QStyle_exclusiveIndicatorSize; external QtShareName name QtNamePrefix + 'QStyle_exclusiveIndicatorSize';
procedure QStyle_drawExclusiveIndicator; external QtShareName name QtNamePrefix + 'QStyle_drawExclusiveIndicator';
procedure QStyle_drawExclusiveIndicatorMask; external QtShareName name QtNamePrefix + 'QStyle_drawExclusiveIndicatorMask';
procedure QStyle_indicatorSize; external QtShareName name QtNamePrefix + 'QStyle_indicatorSize';
procedure QStyle_drawIndicator; external QtShareName name QtNamePrefix + 'QStyle_drawIndicator';
procedure QStyle_drawIndicatorMask; external QtShareName name QtNamePrefix + 'QStyle_drawIndicatorMask';
procedure QStyle_drawFocusRect; external QtShareName name QtNamePrefix + 'QStyle_drawFocusRect';
procedure QStyle_drawComboButton; external QtShareName name QtNamePrefix + 'QStyle_drawComboButton';
procedure QStyle_comboButtonRect; external QtShareName name QtNamePrefix + 'QStyle_comboButtonRect';
procedure QStyle_comboButtonFocusRect; external QtShareName name QtNamePrefix + 'QStyle_comboButtonFocusRect';
procedure QStyle_drawComboButtonMask; external QtShareName name QtNamePrefix + 'QStyle_drawComboButtonMask';
procedure QStyle_drawPushButton; external QtShareName name QtNamePrefix + 'QStyle_drawPushButton';
procedure QStyle_drawPushButtonLabel; external QtShareName name QtNamePrefix + 'QStyle_drawPushButtonLabel';
procedure QStyle_pushButtonContentsRect; external QtShareName name QtNamePrefix + 'QStyle_pushButtonContentsRect';
function QStyle_menuButtonIndicatorWidth; external QtShareName name QtNamePrefix + 'QStyle_menuButtonIndicatorWidth';
procedure QStyle_getButtonShift; external QtShareName name QtNamePrefix + 'QStyle_getButtonShift';
function QStyle_defaultFrameWidth; external QtShareName name QtNamePrefix + 'QStyle_defaultFrameWidth';
procedure QStyle_tabbarMetrics; external QtShareName name QtNamePrefix + 'QStyle_tabbarMetrics';
procedure QStyle_drawTab; external QtShareName name QtNamePrefix + 'QStyle_drawTab';
procedure QStyle_drawTabMask; external QtShareName name QtNamePrefix + 'QStyle_drawTabMask';
procedure QStyle_scrollBarMetrics; external QtShareName name QtNamePrefix + 'QStyle_scrollBarMetrics';
procedure QStyle_drawScrollBarControls; external QtShareName name QtNamePrefix + 'QStyle_drawScrollBarControls';
function QStyle_scrollBarPointOver; external QtShareName name QtNamePrefix + 'QStyle_scrollBarPointOver';
function QStyle_sliderLength; external QtShareName name QtNamePrefix + 'QStyle_sliderLength';
procedure QStyle_drawSlider; external QtShareName name QtNamePrefix + 'QStyle_drawSlider';
procedure QStyle_drawSliderMask; external QtShareName name QtNamePrefix + 'QStyle_drawSliderMask';
procedure QStyle_drawSliderGroove; external QtShareName name QtNamePrefix + 'QStyle_drawSliderGroove';
procedure QStyle_drawSliderGrooveMask; external QtShareName name QtNamePrefix + 'QStyle_drawSliderGrooveMask';
function QStyle_maximumSliderDragDistance; external QtShareName name QtNamePrefix + 'QStyle_maximumSliderDragDistance';
function QStyle_splitterWidth; external QtShareName name QtNamePrefix + 'QStyle_splitterWidth';
procedure QStyle_drawSplitter; external QtShareName name QtNamePrefix + 'QStyle_drawSplitter';
procedure QStyle_drawCheckMark; external QtShareName name QtNamePrefix + 'QStyle_drawCheckMark';
procedure QStyle_polishPopupMenu; external QtShareName name QtNamePrefix + 'QStyle_polishPopupMenu';
function QStyle_extraPopupMenuItemWidth; external QtShareName name QtNamePrefix + 'QStyle_extraPopupMenuItemWidth';
function QStyle_popupSubmenuIndicatorWidth; external QtShareName name QtNamePrefix + 'QStyle_popupSubmenuIndicatorWidth';
function QStyle_popupMenuItemHeight; external QtShareName name QtNamePrefix + 'QStyle_popupMenuItemHeight';
procedure QStyle_drawPopupMenuItem; external QtShareName name QtNamePrefix + 'QStyle_drawPopupMenuItem';
procedure QStyle_drawMenuBarItem; external QtShareName name QtNamePrefix + 'QStyle_drawMenuBarItem';
procedure QStyle_scrollBarExtent; external QtShareName name QtNamePrefix + 'QStyle_scrollBarExtent';
function QStyle_buttonDefaultIndicatorWidth; external QtShareName name QtNamePrefix + 'QStyle_buttonDefaultIndicatorWidth';
function QStyle_buttonMargin; external QtShareName name QtNamePrefix + 'QStyle_buttonMargin';
function QStyle_toolBarHandleExtent; external QtShareName name QtNamePrefix + 'QStyle_toolBarHandleExtent';
function QStyle_toolBarHandleExtend; external QtShareName name QtNamePrefix + 'QStyle_toolBarHandleExtend';
function QStyle_sliderThickness; external QtShareName name QtNamePrefix + 'QStyle_sliderThickness';
procedure QStyle_drawToolBarHandle; external QtShareName name QtNamePrefix + 'QStyle_drawToolBarHandle';
procedure QTranslatorMessage_destroy; external QtShareName name QtNamePrefix + 'QTranslatorMessage_destroy';
function QTranslatorMessage_create(): QTranslatorMessageH; external QtShareName name QtNamePrefix + 'QTranslatorMessage_create';
function QTranslatorMessage_create(context: PAnsiChar; sourceText: PAnsiChar; comment: PAnsiChar; translation: PWideString): QTranslatorMessageH; external QtShareName name QtNamePrefix + 'QTranslatorMessage_create2';
function QTranslatorMessage_create(p1: QDataStreamH): QTranslatorMessageH; external QtShareName name QtNamePrefix + 'QTranslatorMessage_create3';
function QTranslatorMessage_create(m: QTranslatorMessageH): QTranslatorMessageH; external QtShareName name QtNamePrefix + 'QTranslatorMessage_create4';
function QTranslatorMessage_hash; external QtShareName name QtNamePrefix + 'QTranslatorMessage_hash';
function QTranslatorMessage_context; external QtShareName name QtNamePrefix + 'QTranslatorMessage_context';
function QTranslatorMessage_sourceText; external QtShareName name QtNamePrefix + 'QTranslatorMessage_sourceText';
function QTranslatorMessage_comment; external QtShareName name QtNamePrefix + 'QTranslatorMessage_comment';
procedure QTranslatorMessage_setTranslation; external QtShareName name QtNamePrefix + 'QTranslatorMessage_setTranslation';
procedure QTranslatorMessage_translation; external QtShareName name QtNamePrefix + 'QTranslatorMessage_translation';
procedure QTranslatorMessage_write; external QtShareName name QtNamePrefix + 'QTranslatorMessage_write';
function QTranslatorMessage_commonPrefix; external QtShareName name QtNamePrefix + 'QTranslatorMessage_commonPrefix';
procedure QTranslator_destroy; external QtShareName name QtNamePrefix + 'QTranslator_destroy';
function QTranslator_create; external QtShareName name QtNamePrefix + 'QTranslator_create';
procedure QTranslator_find(handle: QTranslatorH; retval: PWideString; p1: PAnsiChar; p2: PAnsiChar; p3: PAnsiChar); external QtShareName name QtNamePrefix + 'QTranslator_find';
procedure QTranslator_find(handle: QTranslatorH; retval: PWideString; p1: PAnsiChar; p2: PAnsiChar); external QtShareName name QtNamePrefix + 'QTranslator_find2';
function QTranslator_load; external QtShareName name QtNamePrefix + 'QTranslator_load';
function QTranslator_save; external QtShareName name QtNamePrefix + 'QTranslator_save';
procedure QTranslator_clear; external QtShareName name QtNamePrefix + 'QTranslator_clear';
procedure QTranslator_insert(handle: QTranslatorH; p1: QTranslatorMessageH); external QtShareName name QtNamePrefix + 'QTranslator_insert';
procedure QTranslator_insert(handle: QTranslatorH; p1: PAnsiChar; p2: PAnsiChar; p3: PWideString); external QtShareName name QtNamePrefix + 'QTranslator_insert2';
procedure QTranslator_remove(handle: QTranslatorH; p1: QTranslatorMessageH); external QtShareName name QtNamePrefix + 'QTranslator_remove';
procedure QTranslator_remove(handle: QTranslatorH; p1: PAnsiChar; p2: PAnsiChar); external QtShareName name QtNamePrefix + 'QTranslator_remove2';
function QTranslator_contains(handle: QTranslatorH; p1: PAnsiChar; p2: PAnsiChar; p3: PAnsiChar): Boolean; external QtShareName name QtNamePrefix + 'QTranslator_contains';
function QTranslator_contains(handle: QTranslatorH; p1: PAnsiChar; p2: PAnsiChar): Boolean; external QtShareName name QtNamePrefix + 'QTranslator_contains2';
procedure QTranslator_squeeze(handle: QTranslatorH; p1: QTranslatorSaveMode); external QtShareName name QtNamePrefix + 'QTranslator_squeeze';
procedure QTranslator_squeeze(handle: QTranslatorH); external QtShareName name QtNamePrefix + 'QTranslator_squeeze2';
procedure QTranslator_unsqueeze; external QtShareName name QtNamePrefix + 'QTranslator_unsqueeze';
procedure QColor_destroy; external QtShareName name QtNamePrefix + 'QColor_destroy';
function QColor_create(): QColorH; external QtShareName name QtNamePrefix + 'QColor_create';
function QColor_create(r: Integer; g: Integer; b: Integer): QColorH; external QtShareName name QtNamePrefix + 'QColor_create2';
function QColor_create(x: Integer; y: Integer; z: Integer; p4: QColorSpec): QColorH; external QtShareName name QtNamePrefix + 'QColor_create3';
function QColor_create(rgb: QRgbH; pixel: Cardinal): QColorH; external QtShareName name QtNamePrefix + 'QColor_create4';
function QColor_create(name: PWideString): QColorH; external QtShareName name QtNamePrefix + 'QColor_create5';
function QColor_create(name: PAnsiChar): QColorH; external QtShareName name QtNamePrefix + 'QColor_create6';
function QColor_create(p1: QColorH): QColorH; external QtShareName name QtNamePrefix + 'QColor_create7';
function QColor_isValid; external QtShareName name QtNamePrefix + 'QColor_isValid';
function QColor_isDirty; external QtShareName name QtNamePrefix + 'QColor_isDirty';
procedure QColor_name; external QtShareName name QtNamePrefix + 'QColor_name';
procedure QColor_setNamedColor; external QtShareName name QtNamePrefix + 'QColor_setNamedColor';
procedure QColor_rgb(handle: QColorH; r: PInteger; g: PInteger; b: PInteger); external QtShareName name QtNamePrefix + 'QColor_rgb';
procedure QColor_rgb(handle: QColorH; retval: QRgbH); external QtShareName name QtNamePrefix + 'QColor_rgb2';
procedure QColor_setRgb(handle: QColorH; r: Integer; g: Integer; b: Integer); external QtShareName name QtNamePrefix + 'QColor_setRgb';
procedure QColor_setRgb(handle: QColorH; rgb: QRgbH); external QtShareName name QtNamePrefix + 'QColor_setRgb2';
function QColor_red; external QtShareName name QtNamePrefix + 'QColor_red';
function QColor_green; external QtShareName name QtNamePrefix + 'QColor_green';
function QColor_blue; external QtShareName name QtNamePrefix + 'QColor_blue';
procedure QColor_hsv; external QtShareName name QtNamePrefix + 'QColor_hsv';
procedure QColor_getHsv; external QtShareName name QtNamePrefix + 'QColor_getHsv';
procedure QColor_setHsv; external QtShareName name QtNamePrefix + 'QColor_setHsv';
procedure QColor_light; external QtShareName name QtNamePrefix + 'QColor_light';
procedure QColor_dark; external QtShareName name QtNamePrefix + 'QColor_dark';
function QColor_lazyAlloc; external QtShareName name QtNamePrefix + 'QColor_lazyAlloc';
procedure QColor_setLazyAlloc; external QtShareName name QtNamePrefix + 'QColor_setLazyAlloc';
function QColor_alloc; external QtShareName name QtNamePrefix + 'QColor_alloc';
function QColor_pixel; external QtShareName name QtNamePrefix + 'QColor_pixel';
function QColor_maxColors; external QtShareName name QtNamePrefix + 'QColor_maxColors';
function QColor_numBitPlanes; external QtShareName name QtNamePrefix + 'QColor_numBitPlanes';
function QColor_enterAllocContext; external QtShareName name QtNamePrefix + 'QColor_enterAllocContext';
procedure QColor_leaveAllocContext; external QtShareName name QtNamePrefix + 'QColor_leaveAllocContext';
function QColor_currentAllocContext; external QtShareName name QtNamePrefix + 'QColor_currentAllocContext';
procedure QColor_destroyAllocContext; external QtShareName name QtNamePrefix + 'QColor_destroyAllocContext';
{$IFDEF MSWINDOWS}
function QColor_hPal; external QtShareName name QtNamePrefix + 'QColor_hPal';
{$ENDIF}
{$IFDEF MSWINDOWS}
function QColor_realizePal; external QtShareName name QtNamePrefix + 'QColor_realizePal';
{$ENDIF}
procedure QColor_initialize; external QtShareName name QtNamePrefix + 'QColor_initialize';
procedure QColor_cleanup; external QtShareName name QtNamePrefix + 'QColor_cleanup';
procedure QFont_destroy; external QtShareName name QtNamePrefix + 'QFont_destroy';
function QFont_create(): QFontH; external QtShareName name QtNamePrefix + 'QFont_create';
function QFont_create(family: PWideString; pointSize: Integer; weight: Integer; italic: Boolean): QFontH; external QtShareName name QtNamePrefix + 'QFont_create2';
function QFont_create(family: PWideString; pointSize: Integer; weight: Integer; italic: Boolean; charSet: QFontCharSet): QFontH; external QtShareName name QtNamePrefix + 'QFont_create3';
function QFont_create(p1: QFontH): QFontH; external QtShareName name QtNamePrefix + 'QFont_create4';
procedure QFont_family; external QtShareName name QtNamePrefix + 'QFont_family';
procedure QFont_setFamily; external QtShareName name QtNamePrefix + 'QFont_setFamily';
function QFont_pointSize; external QtShareName name QtNamePrefix + 'QFont_pointSize';
function QFont_pointSizeFloat; external QtShareName name QtNamePrefix + 'QFont_pointSizeFloat';
procedure QFont_setPointSize; external QtShareName name QtNamePrefix + 'QFont_setPointSize';
procedure QFont_setPointSizeFloat; external QtShareName name QtNamePrefix + 'QFont_setPointSizeFloat';
function QFont_pixelSize; external QtShareName name QtNamePrefix + 'QFont_pixelSize';
procedure QFont_setPixelSize; external QtShareName name QtNamePrefix + 'QFont_setPixelSize';
procedure QFont_setPixelSizeFloat; external QtShareName name QtNamePrefix + 'QFont_setPixelSizeFloat';
function QFont_weight; external QtShareName name QtNamePrefix + 'QFont_weight';
procedure QFont_setWeight; external QtShareName name QtNamePrefix + 'QFont_setWeight';
function QFont_bold; external QtShareName name QtNamePrefix + 'QFont_bold';
procedure QFont_setBold; external QtShareName name QtNamePrefix + 'QFont_setBold';
function QFont_italic; external QtShareName name QtNamePrefix + 'QFont_italic';
procedure QFont_setItalic; external QtShareName name QtNamePrefix + 'QFont_setItalic';
function QFont_underline; external QtShareName name QtNamePrefix + 'QFont_underline';
procedure QFont_setUnderline; external QtShareName name QtNamePrefix + 'QFont_setUnderline';
function QFont_strikeOut; external QtShareName name QtNamePrefix + 'QFont_strikeOut';
procedure QFont_setStrikeOut; external QtShareName name QtNamePrefix + 'QFont_setStrikeOut';
function QFont_fixedPitch; external QtShareName name QtNamePrefix + 'QFont_fixedPitch';
procedure QFont_setFixedPitch; external QtShareName name QtNamePrefix + 'QFont_setFixedPitch';
function QFont_styleHint; external QtShareName name QtNamePrefix + 'QFont_styleHint';
procedure QFont_setStyleHint(handle: QFontH; p1: QFontStyleHint); external QtShareName name QtNamePrefix + 'QFont_setStyleHint';
function QFont_styleStrategy; external QtShareName name QtNamePrefix + 'QFont_styleStrategy';
procedure QFont_setStyleHint(handle: QFontH; p1: QFontStyleHint; p2: QFontStyleStrategy); external QtShareName name QtNamePrefix + 'QFont_setStyleHint2';
function QFont_charSet; external QtShareName name QtNamePrefix + 'QFont_charSet';
procedure QFont_setCharSet; external QtShareName name QtNamePrefix + 'QFont_setCharSet';
function QFont_charSetForLocale; external QtShareName name QtNamePrefix + 'QFont_charSetForLocale';
function QFont_rawMode; external QtShareName name QtNamePrefix + 'QFont_rawMode';
procedure QFont_setRawMode; external QtShareName name QtNamePrefix + 'QFont_setRawMode';
function QFont_exactMatch; external QtShareName name QtNamePrefix + 'QFont_exactMatch';
function QFont_isCopyOf; external QtShareName name QtNamePrefix + 'QFont_isCopyOf';
{$IFDEF MSWINDOWS}
function QFont_handle(handle: QFontH): HFONT; external QtShareName name QtNamePrefix + 'QFont_handle';
{$ENDIF}
{$IFDEF LINUX}
function QFont_handle(handle: QFontH): HANDLE; external QtShareName name QtNamePrefix + 'QFont_handle3';
{$ENDIF}
procedure QFont_setRawName; external QtShareName name QtNamePrefix + 'QFont_setRawName';
procedure QFont_rawName; external QtShareName name QtNamePrefix + 'QFont_rawName';
procedure QFont_key; external QtShareName name QtNamePrefix + 'QFont_key';
procedure QFont_encodingName; external QtShareName name QtNamePrefix + 'QFont_encodingName';
procedure QFont_defaultFont; external QtShareName name QtNamePrefix + 'QFont_defaultFont';
procedure QFont_setDefaultFont; external QtShareName name QtNamePrefix + 'QFont_setDefaultFont';
procedure QFont_substitute; external QtShareName name QtNamePrefix + 'QFont_substitute';
procedure QFont_insertSubstitution; external QtShareName name QtNamePrefix + 'QFont_insertSubstitution';
procedure QFont_removeSubstitution; external QtShareName name QtNamePrefix + 'QFont_removeSubstitution';
procedure QFont_substitutions; external QtShareName name QtNamePrefix + 'QFont_substitutions';
procedure QFont_initialize; external QtShareName name QtNamePrefix + 'QFont_initialize';
procedure QFont_locale_init; external QtShareName name QtNamePrefix + 'QFont_locale_init';
procedure QFont_cleanup; external QtShareName name QtNamePrefix + 'QFont_cleanup';
procedure QFont_cacheStatistics; external QtShareName name QtNamePrefix + 'QFont_cacheStatistics';
procedure QImageTextKeyLang_destroy; external QtShareName name QtNamePrefix + 'QImageTextKeyLang_destroy';
function QImageTextKeyLang_create(k: PAnsiChar; l: PAnsiChar): QImageTextKeyLangH; external QtShareName name QtNamePrefix + 'QImageTextKeyLang_create';
function QImageTextKeyLang_create(): QImageTextKeyLangH; external QtShareName name QtNamePrefix + 'QImageTextKeyLang_create2';
procedure QImage_destroy; external QtShareName name QtNamePrefix + 'QImage_destroy';
function QImage_create(): QImageH; external QtShareName name QtNamePrefix + 'QImage_create';
function QImage_create(width: Integer; height: Integer; depth: Integer; numColors: Integer; bitOrder: QImageEndian): QImageH; external QtShareName name QtNamePrefix + 'QImage_create2';
function QImage_create(p1: PSize; depth: Integer; numColors: Integer; bitOrder: QImageEndian): QImageH; external QtShareName name QtNamePrefix + 'QImage_create3';
function QImage_create(fileName: PWideString; format: PAnsiChar): QImageH; external QtShareName name QtNamePrefix + 'QImage_create4';
function QImage_create(data: QByteArrayH): QImageH; external QtShareName name QtNamePrefix + 'QImage_create6';
function QImage_create(data: PByte; w: Integer; h: Integer; depth: Integer; colortable: QRgbH; numColors: Integer; bitOrder: QImageEndian): QImageH; external QtShareName name QtNamePrefix + 'QImage_create7';
function QImage_create(p1: QImageH): QImageH; external QtShareName name QtNamePrefix + 'QImage_create9';
procedure QImage_detach; external QtShareName name QtNamePrefix + 'QImage_detach';
procedure QImage_copy(handle: QImageH; retval: QImageH); external QtShareName name QtNamePrefix + 'QImage_copy';
procedure QImage_copy(handle: QImageH; retval: QImageH; x: Integer; y: Integer; w: Integer; h: Integer; conversion_flags: Integer); external QtShareName name QtNamePrefix + 'QImage_copy2';
procedure QImage_copy(handle: QImageH; retval: QImageH; p1: PRect); external QtShareName name QtNamePrefix + 'QImage_copy4';
function QImage_isNull; external QtShareName name QtNamePrefix + 'QImage_isNull';
function QImage_width; external QtShareName name QtNamePrefix + 'QImage_width';
function QImage_height; external QtShareName name QtNamePrefix + 'QImage_height';
procedure QImage_size; external QtShareName name QtNamePrefix + 'QImage_size';
procedure QImage_rect; external QtShareName name QtNamePrefix + 'QImage_rect';
function QImage_depth; external QtShareName name QtNamePrefix + 'QImage_depth';
function QImage_numColors; external QtShareName name QtNamePrefix + 'QImage_numColors';
function QImage_bitOrder; external QtShareName name QtNamePrefix + 'QImage_bitOrder';
procedure QImage_color; external QtShareName name QtNamePrefix + 'QImage_color';
procedure QImage_setColor; external QtShareName name QtNamePrefix + 'QImage_setColor';
procedure QImage_setNumColors; external QtShareName name QtNamePrefix + 'QImage_setNumColors';
function QImage_hasAlphaBuffer; external QtShareName name QtNamePrefix + 'QImage_hasAlphaBuffer';
procedure QImage_setAlphaBuffer; external QtShareName name QtNamePrefix + 'QImage_setAlphaBuffer';
function QImage_allGray; external QtShareName name QtNamePrefix + 'QImage_allGray';
function QImage_isGrayscale; external QtShareName name QtNamePrefix + 'QImage_isGrayscale';
function QImage_bits; external QtShareName name QtNamePrefix + 'QImage_bits';
function QImage_scanLine; external QtShareName name QtNamePrefix + 'QImage_scanLine';
function QImage_jumpTable; external QtShareName name QtNamePrefix + 'QImage_jumpTable';
function QImage_colorTable; external QtShareName name QtNamePrefix + 'QImage_colorTable';
function QImage_numBytes; external QtShareName name QtNamePrefix + 'QImage_numBytes';
function QImage_bytesPerLine; external QtShareName name QtNamePrefix + 'QImage_bytesPerLine';
function QImage_create(handle: QImageH; width: Integer; height: Integer; depth: Integer; numColors: Integer; bitOrder: QImageEndian): Boolean; external QtShareName name QtNamePrefix + 'QImage_create';
function QImage_create(handle: QImageH; p1: PSize; depth: Integer; numColors: Integer; bitOrder: QImageEndian): Boolean; external QtShareName name QtNamePrefix + 'QImage_create2';
procedure QImage_reset; external QtShareName name QtNamePrefix + 'QImage_reset';
procedure QImage_fill; external QtShareName name QtNamePrefix + 'QImage_fill';
procedure QImage_invertPixels; external QtShareName name QtNamePrefix + 'QImage_invertPixels';
procedure QImage_convertDepth(handle: QImageH; retval: QImageH; p1: Integer); external QtShareName name QtNamePrefix + 'QImage_convertDepth';
procedure QImage_convertDepthWithPalette; external QtShareName name QtNamePrefix + 'QImage_convertDepthWithPalette';
procedure QImage_convertDepth(handle: QImageH; retval: QImageH; p1: Integer; conversion_flags: Integer); external QtShareName name QtNamePrefix + 'QImage_convertDepth2';
procedure QImage_convertBitOrder; external QtShareName name QtNamePrefix + 'QImage_convertBitOrder';
procedure QImage_smoothScale; external QtShareName name QtNamePrefix + 'QImage_smoothScale';
procedure QImage_createAlphaMask; external QtShareName name QtNamePrefix + 'QImage_createAlphaMask';
procedure QImage_createHeuristicMask; external QtShareName name QtNamePrefix + 'QImage_createHeuristicMask';
procedure QImage_mirror(handle: QImageH; retval: QImageH); external QtShareName name QtNamePrefix + 'QImage_mirror';
procedure QImage_mirror(handle: QImageH; retval: QImageH; horizontally: Boolean; vertically: Boolean); external QtShareName name QtNamePrefix + 'QImage_mirror2';
procedure QImage_swapRGB; external QtShareName name QtNamePrefix + 'QImage_swapRGB';
function QImage_systemBitOrder; external QtShareName name QtNamePrefix + 'QImage_systemBitOrder';
function QImage_systemByteOrder; external QtShareName name QtNamePrefix + 'QImage_systemByteOrder';
function QImage_imageFormat; external QtShareName name QtNamePrefix + 'QImage_imageFormat';
procedure QImage_inputFormats; external QtShareName name QtNamePrefix + 'QImage_inputFormats';
procedure QImage_outputFormats; external QtShareName name QtNamePrefix + 'QImage_outputFormats';
procedure QImage_inputFormatList; external QtShareName name QtNamePrefix + 'QImage_inputFormatList';
procedure QImage_outputFormatList; external QtShareName name QtNamePrefix + 'QImage_outputFormatList';
function QImage_load; external QtShareName name QtNamePrefix + 'QImage_load';
function QImage_loadFromData(handle: QImageH; buf: PByte; len: Cardinal; format: PAnsiChar): Boolean; external QtShareName name QtNamePrefix + 'QImage_loadFromData';
function QImage_loadFromData(handle: QImageH; data: QByteArrayH; format: PAnsiChar): Boolean; external QtShareName name QtNamePrefix + 'QImage_loadFromData2';
function QImage_save(handle: QImageH; fileName: PWideString; format: PAnsiChar): Boolean; external QtShareName name QtNamePrefix + 'QImage_save';
function QImage_save(handle: QImageH; fileName: PWideString; format: PAnsiChar; quality: Integer): Boolean; external QtShareName name QtNamePrefix + 'QImage_save2';
function QImage_valid; external QtShareName name QtNamePrefix + 'QImage_valid';
function QImage_pixelIndex; external QtShareName name QtNamePrefix + 'QImage_pixelIndex';
procedure QImage_pixel; external QtShareName name QtNamePrefix + 'QImage_pixel';
procedure QImage_setPixel; external QtShareName name QtNamePrefix + 'QImage_setPixel';
function QImage_dotsPerMeterX; external QtShareName name QtNamePrefix + 'QImage_dotsPerMeterX';
function QImage_dotsPerMeterY; external QtShareName name QtNamePrefix + 'QImage_dotsPerMeterY';
procedure QImage_setDotsPerMeterX; external QtShareName name QtNamePrefix + 'QImage_setDotsPerMeterX';
procedure QImage_setDotsPerMeterY; external QtShareName name QtNamePrefix + 'QImage_setDotsPerMeterY';
procedure QImage_offset; external QtShareName name QtNamePrefix + 'QImage_offset';
procedure QImage_setOffset; external QtShareName name QtNamePrefix + 'QImage_setOffset';
procedure QImage_textLanguages; external QtShareName name QtNamePrefix + 'QImage_textLanguages';
procedure QImage_textKeys; external QtShareName name QtNamePrefix + 'QImage_textKeys';
procedure QImage_text(handle: QImageH; retval: PWideString; key: PAnsiChar; lang: PAnsiChar); external QtShareName name QtNamePrefix + 'QImage_text';
procedure QImage_text(handle: QImageH; retval: PWideString; p1: QImageTextKeyLangH); external QtShareName name QtNamePrefix + 'QImage_text2';
procedure QImage_setText; external QtShareName name QtNamePrefix + 'QImage_setText';
procedure QImageIO_destroy; external QtShareName name QtNamePrefix + 'QImageIO_destroy';
function QImageIO_create(): QImageIOH; external QtShareName name QtNamePrefix + 'QImageIO_create';
function QImageIO_create(ioDevice: QIODeviceH; format: PAnsiChar): QImageIOH; external QtShareName name QtNamePrefix + 'QImageIO_create2';
function QImageIO_create(fileName: PWideString; format: PAnsiChar): QImageIOH; external QtShareName name QtNamePrefix + 'QImageIO_create3';
function QImageIO_image; external QtShareName name QtNamePrefix + 'QImageIO_image';
function QImageIO_status; external QtShareName name QtNamePrefix + 'QImageIO_status';
function QImageIO_format; external QtShareName name QtNamePrefix + 'QImageIO_format';
function QImageIO_ioDevice; external QtShareName name QtNamePrefix + 'QImageIO_ioDevice';
procedure QImageIO_fileName; external QtShareName name QtNamePrefix + 'QImageIO_fileName';
function QImageIO_parameters; external QtShareName name QtNamePrefix + 'QImageIO_parameters';
procedure QImageIO_description; external QtShareName name QtNamePrefix + 'QImageIO_description';
procedure QImageIO_setImage; external QtShareName name QtNamePrefix + 'QImageIO_setImage';
procedure QImageIO_setStatus; external QtShareName name QtNamePrefix + 'QImageIO_setStatus';
procedure QImageIO_setFormat; external QtShareName name QtNamePrefix + 'QImageIO_setFormat';
procedure QImageIO_setIODevice; external QtShareName name QtNamePrefix + 'QImageIO_setIODevice';
procedure QImageIO_setFileName; external QtShareName name QtNamePrefix + 'QImageIO_setFileName';
procedure QImageIO_setParameters; external QtShareName name QtNamePrefix + 'QImageIO_setParameters';
procedure QImageIO_setDescription; external QtShareName name QtNamePrefix + 'QImageIO_setDescription';
function QImageIO_read; external QtShareName name QtNamePrefix + 'QImageIO_read';
function QImageIO_write; external QtShareName name QtNamePrefix + 'QImageIO_write';
function QImageIO_imageFormat(fileName: PWideString): PAnsiChar; external QtShareName name QtNamePrefix + 'QImageIO_imageFormat';
function QImageIO_imageFormat(p1: QIODeviceH): PAnsiChar; external QtShareName name QtNamePrefix + 'QImageIO_imageFormat2';
procedure QImageIO_inputFormats; external QtShareName name QtNamePrefix + 'QImageIO_inputFormats';
procedure QImageIO_outputFormats; external QtShareName name QtNamePrefix + 'QImageIO_outputFormats';
procedure QIconSet_destroy; external QtShareName name QtNamePrefix + 'QIconSet_destroy';
function QIconSet_create(): QIconSetH; external QtShareName name QtNamePrefix + 'QIconSet_create';
function QIconSet_create(p1: QPixmapH; p2: QIconSetSize): QIconSetH; external QtShareName name QtNamePrefix + 'QIconSet_create2';
function QIconSet_create(smallPix: QPixmapH; largePix: QPixmapH): QIconSetH; external QtShareName name QtNamePrefix + 'QIconSet_create3';
function QIconSet_create(p1: QIconSetH): QIconSetH; external QtShareName name QtNamePrefix + 'QIconSet_create4';
procedure QIconSet_reset; external QtShareName name QtNamePrefix + 'QIconSet_reset';
procedure QIconSet_setPixmap(handle: QIconSetH; p1: QPixmapH; p2: QIconSetSize; p3: QIconSetMode); external QtShareName name QtNamePrefix + 'QIconSet_setPixmap';
procedure QIconSet_setPixmap(handle: QIconSetH; p1: PWideString; p2: QIconSetSize; p3: QIconSetMode); external QtShareName name QtNamePrefix + 'QIconSet_setPixmap2';
procedure QIconSet_pixmap(handle: QIconSetH; retval: QPixmapH; p1: QIconSetSize; p2: QIconSetMode); external QtShareName name QtNamePrefix + 'QIconSet_pixmap';
procedure QIconSet_pixmap(handle: QIconSetH; retval: QPixmapH; s: QIconSetSize; enabled: Boolean); external QtShareName name QtNamePrefix + 'QIconSet_pixmap2';
procedure QIconSet_pixmap(handle: QIconSetH; retval: QPixmapH); external QtShareName name QtNamePrefix + 'QIconSet_pixmap3';
function QIconSet_isGenerated; external QtShareName name QtNamePrefix + 'QIconSet_isGenerated';
function QIconSet_isNull; external QtShareName name QtNamePrefix + 'QIconSet_isNull';
procedure QIconSet_detach; external QtShareName name QtNamePrefix + 'QIconSet_detach';
procedure QMovie_destroy; external QtShareName name QtNamePrefix + 'QMovie_destroy';
function QMovie_create(): QMovieH; external QtShareName name QtNamePrefix + 'QMovie_create';
function QMovie_create(bufsize: Integer): QMovieH; external QtShareName name QtNamePrefix + 'QMovie_create2';
function QMovie_create(p1: QDataSourceH; bufsize: Integer): QMovieH; external QtShareName name QtNamePrefix + 'QMovie_create3';
function QMovie_create(fileName: PWideString; bufsize: Integer): QMovieH; external QtShareName name QtNamePrefix + 'QMovie_create4';
function QMovie_create(data: QByteArrayH; bufsize: Integer): QMovieH; external QtShareName name QtNamePrefix + 'QMovie_create5';
function QMovie_create(p1: QMovieH): QMovieH; external QtShareName name QtNamePrefix + 'QMovie_create6';
function QMovie_pushSpace; external QtShareName name QtNamePrefix + 'QMovie_pushSpace';
procedure QMovie_pushData; external QtShareName name QtNamePrefix + 'QMovie_pushData';
function QMovie_backgroundColor; external QtShareName name QtNamePrefix + 'QMovie_backgroundColor';
procedure QMovie_setBackgroundColor; external QtShareName name QtNamePrefix + 'QMovie_setBackgroundColor';
procedure QMovie_getValidRect; external QtShareName name QtNamePrefix + 'QMovie_getValidRect';
function QMovie_framePixmap; external QtShareName name QtNamePrefix + 'QMovie_framePixmap';
function QMovie_frameImage; external QtShareName name QtNamePrefix + 'QMovie_frameImage';
function QMovie_isNull; external QtShareName name QtNamePrefix + 'QMovie_isNull';
function QMovie_frameNumber; external QtShareName name QtNamePrefix + 'QMovie_frameNumber';
function QMovie_steps; external QtShareName name QtNamePrefix + 'QMovie_steps';
function QMovie_paused; external QtShareName name QtNamePrefix + 'QMovie_paused';
function QMovie_finished; external QtShareName name QtNamePrefix + 'QMovie_finished';
function QMovie_running; external QtShareName name QtNamePrefix + 'QMovie_running';
procedure QMovie_unpause; external QtShareName name QtNamePrefix + 'QMovie_unpause';
procedure QMovie_pause; external QtShareName name QtNamePrefix + 'QMovie_pause';
procedure QMovie_step(handle: QMovieH); external QtShareName name QtNamePrefix + 'QMovie_step';
procedure QMovie_step(handle: QMovieH; p1: Integer); external QtShareName name QtNamePrefix + 'QMovie_step2';
procedure QMovie_restart; external QtShareName name QtNamePrefix + 'QMovie_restart';
function QMovie_speed; external QtShareName name QtNamePrefix + 'QMovie_speed';
procedure QMovie_setSpeed; external QtShareName name QtNamePrefix + 'QMovie_setSpeed';
procedure QMovie_connectResize; external QtShareName name QtNamePrefix + 'QMovie_connectResize';
procedure QMovie_disconnectResize; external QtShareName name QtNamePrefix + 'QMovie_disconnectResize';
procedure QMovie_connectUpdate; external QtShareName name QtNamePrefix + 'QMovie_connectUpdate';
procedure QMovie_disconnectUpdate; external QtShareName name QtNamePrefix + 'QMovie_disconnectUpdate';
procedure QMovie_connectStatus; external QtShareName name QtNamePrefix + 'QMovie_connectStatus';
procedure QMovie_disconnectStatus; external QtShareName name QtNamePrefix + 'QMovie_disconnectStatus';
procedure QPaintDevice_destroy; external QtShareName name QtNamePrefix + 'QPaintDevice_destroy';
function QPaintDevice_devType; external QtShareName name QtNamePrefix + 'QPaintDevice_devType';
function QPaintDevice_isExtDev; external QtShareName name QtNamePrefix + 'QPaintDevice_isExtDev';
function QPaintDevice_paintingActive; external QtShareName name QtNamePrefix + 'QPaintDevice_paintingActive';
{$IFDEF MSWINDOWS}
function QPaintDevice_handle(handle: QPaintDeviceH): HDC; external QtShareName name QtNamePrefix + 'QPaintDevice_handle';
{$ENDIF}
{$IFDEF LINUX}
function QPaintDevice_handle(handle: QPaintDeviceH): HANDLE; external QtShareName name QtNamePrefix + 'QPaintDevice_handle';
{$ENDIF}
{$IFDEF LINUX}
function QPaintDevice_x11Display; external QtShareName name QtNamePrefix + 'QPaintDevice_x11Display';
{$ENDIF}
{$IFDEF LINUX}
function QPaintDevice_x11Screen; external QtShareName name QtNamePrefix + 'QPaintDevice_x11Screen';
{$ENDIF}
{$IFDEF LINUX}
function QPaintDevice_x11Depth; external QtShareName name QtNamePrefix + 'QPaintDevice_x11Depth';
{$ENDIF}
{$IFDEF LINUX}
function QPaintDevice_x11Cells; external QtShareName name QtNamePrefix + 'QPaintDevice_x11Cells';
{$ENDIF}
{$IFDEF LINUX}
function QPaintDevice_x11Colormap; external QtShareName name QtNamePrefix + 'QPaintDevice_x11Colormap';
{$ENDIF}
{$IFDEF LINUX}
function QPaintDevice_x11DefaultColormap; external QtShareName name QtNamePrefix + 'QPaintDevice_x11DefaultColormap';
{$ENDIF}
{$IFDEF LINUX}
function QPaintDevice_x11Visual; external QtShareName name QtNamePrefix + 'QPaintDevice_x11Visual';
{$ENDIF}
{$IFDEF LINUX}
function QPaintDevice_x11DefaultVisual; external QtShareName name QtNamePrefix + 'QPaintDevice_x11DefaultVisual';
{$ENDIF}
{$IFDEF LINUX}
function QPaintDevice_x11AppDisplay; external QtShareName name QtNamePrefix + 'QPaintDevice_x11AppDisplay';
{$ENDIF}
{$IFDEF LINUX}
function QPaintDevice_x11AppScreen; external QtShareName name QtNamePrefix + 'QPaintDevice_x11AppScreen';
{$ENDIF}
{$IFDEF LINUX}
function QPaintDevice_x11AppDepth; external QtShareName name QtNamePrefix + 'QPaintDevice_x11AppDepth';
{$ENDIF}
{$IFDEF LINUX}
function QPaintDevice_x11AppCells; external QtShareName name QtNamePrefix + 'QPaintDevice_x11AppCells';
{$ENDIF}
{$IFDEF LINUX}
function QPaintDevice_x11AppDpiX; external QtShareName name QtNamePrefix + 'QPaintDevice_x11AppDpiX';
{$ENDIF}
{$IFDEF LINUX}
function QPaintDevice_x11AppDpiY; external QtShareName name QtNamePrefix + 'QPaintDevice_x11AppDpiY';
{$ENDIF}
{$IFDEF LINUX}
function QPaintDevice_x11AppColormap; external QtShareName name QtNamePrefix + 'QPaintDevice_x11AppColormap';
{$ENDIF}
{$IFDEF LINUX}
function QPaintDevice_x11AppDefaultColormap; external QtShareName name QtNamePrefix + 'QPaintDevice_x11AppDefaultColormap';
{$ENDIF}
{$IFDEF LINUX}
function QPaintDevice_x11AppVisual; external QtShareName name QtNamePrefix + 'QPaintDevice_x11AppVisual';
{$ENDIF}
{$IFDEF LINUX}
function QPaintDevice_x11AppDefaultVisual; external QtShareName name QtNamePrefix + 'QPaintDevice_x11AppDefaultVisual';
{$ENDIF}
{$IFDEF LINUX}
procedure QPaintDevice_x11SetAppDpiX; external QtShareName name QtNamePrefix + 'QPaintDevice_x11SetAppDpiX';
{$ENDIF}
{$IFDEF LINUX}
procedure QPaintDevice_x11SetAppDpiY; external QtShareName name QtNamePrefix + 'QPaintDevice_x11SetAppDpiY';
{$ENDIF}
procedure QColorGroup_destroy; external QtShareName name QtNamePrefix + 'QColorGroup_destroy';
function QColorGroup_create(): QColorGroupH; external QtShareName name QtNamePrefix + 'QColorGroup_create';
function QColorGroup_create(foreground: QColorH; button: QColorH; light: QColorH; dark: QColorH; mid: QColorH; text: QColorH; base: QColorH): QColorGroupH; external QtShareName name QtNamePrefix + 'QColorGroup_create2';
function QColorGroup_create(foreground: QBrushH; button: QBrushH; light: QBrushH; dark: QBrushH; mid: QBrushH; text: QBrushH; bright_text: QBrushH; base: QBrushH; background: QBrushH): QColorGroupH; external QtShareName name QtNamePrefix + 'QColorGroup_create3';
function QColorGroup_create(p1: QColorGroupH): QColorGroupH; external QtShareName name QtNamePrefix + 'QColorGroup_create4';
function QColorGroup_color; external QtShareName name QtNamePrefix + 'QColorGroup_color';
function QColorGroup_brush; external QtShareName name QtNamePrefix + 'QColorGroup_brush';
procedure QColorGroup_setColor; external QtShareName name QtNamePrefix + 'QColorGroup_setColor';
procedure QColorGroup_setBrush; external QtShareName name QtNamePrefix + 'QColorGroup_setBrush';
function QColorGroup_foreground; external QtShareName name QtNamePrefix + 'QColorGroup_foreground';
function QColorGroup_button; external QtShareName name QtNamePrefix + 'QColorGroup_button';
function QColorGroup_light; external QtShareName name QtNamePrefix + 'QColorGroup_light';
function QColorGroup_dark; external QtShareName name QtNamePrefix + 'QColorGroup_dark';
function QColorGroup_mid; external QtShareName name QtNamePrefix + 'QColorGroup_mid';
function QColorGroup_text; external QtShareName name QtNamePrefix + 'QColorGroup_text';
function QColorGroup_base; external QtShareName name QtNamePrefix + 'QColorGroup_base';
function QColorGroup_background; external QtShareName name QtNamePrefix + 'QColorGroup_background';
function QColorGroup_midlight; external QtShareName name QtNamePrefix + 'QColorGroup_midlight';
function QColorGroup_brightText; external QtShareName name QtNamePrefix + 'QColorGroup_brightText';
function QColorGroup_buttonText; external QtShareName name QtNamePrefix + 'QColorGroup_buttonText';
function QColorGroup_shadow; external QtShareName name QtNamePrefix + 'QColorGroup_shadow';
function QColorGroup_highlight; external QtShareName name QtNamePrefix + 'QColorGroup_highlight';
function QColorGroup_highlightedText; external QtShareName name QtNamePrefix + 'QColorGroup_highlightedText';
procedure QPalette_destroy; external QtShareName name QtNamePrefix + 'QPalette_destroy';
function QPalette_create(): QPaletteH; external QtShareName name QtNamePrefix + 'QPalette_create';
function QPalette_create(button: QColorH): QPaletteH; external QtShareName name QtNamePrefix + 'QPalette_create2';
function QPalette_create(button: QColorH; background: QColorH): QPaletteH; external QtShareName name QtNamePrefix + 'QPalette_create3';
function QPalette_create(active: QColorGroupH; disabled: QColorGroupH; inactive: QColorGroupH): QPaletteH; external QtShareName name QtNamePrefix + 'QPalette_create4';
function QPalette_create(p1: QPaletteH): QPaletteH; external QtShareName name QtNamePrefix + 'QPalette_create5';
function QPalette_color; external QtShareName name QtNamePrefix + 'QPalette_color';
function QPalette_brush; external QtShareName name QtNamePrefix + 'QPalette_brush';
procedure QPalette_setColor(handle: QPaletteH; p1: QPaletteColorGroup; p2: QColorGroupColorRole; p3: QColorH); external QtShareName name QtNamePrefix + 'QPalette_setColor';
procedure QPalette_setBrush(handle: QPaletteH; p1: QPaletteColorGroup; p2: QColorGroupColorRole; p3: QBrushH); external QtShareName name QtNamePrefix + 'QPalette_setBrush';
procedure QPalette_setColor(handle: QPaletteH; p1: QColorGroupColorRole; p2: QColorH); external QtShareName name QtNamePrefix + 'QPalette_setColor2';
procedure QPalette_setBrush(handle: QPaletteH; p1: QColorGroupColorRole; p2: QBrushH); external QtShareName name QtNamePrefix + 'QPalette_setBrush2';
procedure QPalette_copy; external QtShareName name QtNamePrefix + 'QPalette_copy';
function QPalette_active; external QtShareName name QtNamePrefix + 'QPalette_active';
function QPalette_disabled; external QtShareName name QtNamePrefix + 'QPalette_disabled';
function QPalette_inactive; external QtShareName name QtNamePrefix + 'QPalette_inactive';
function QPalette_normal; external QtShareName name QtNamePrefix + 'QPalette_normal';
procedure QPalette_setActive; external QtShareName name QtNamePrefix + 'QPalette_setActive';
procedure QPalette_setDisabled; external QtShareName name QtNamePrefix + 'QPalette_setDisabled';
procedure QPalette_setInactive; external QtShareName name QtNamePrefix + 'QPalette_setInactive';
procedure QPalette_setNormal; external QtShareName name QtNamePrefix + 'QPalette_setNormal';
function QPalette_isCopyOf; external QtShareName name QtNamePrefix + 'QPalette_isCopyOf';
function QPalette_serialNumber; external QtShareName name QtNamePrefix + 'QPalette_serialNumber';
procedure QPixmap_destroy; external QtShareName name QtNamePrefix + 'QPixmap_destroy';
function QPixmap_create(): QPixmapH; external QtShareName name QtNamePrefix + 'QPixmap_create';
function QPixmap_create(w: Integer; h: Integer; depth: Integer; p4: QPixmapOptimization): QPixmapH; external QtShareName name QtNamePrefix + 'QPixmap_create2';
function QPixmap_create(p1: PSize; depth: Integer; p3: QPixmapOptimization): QPixmapH; external QtShareName name QtNamePrefix + 'QPixmap_create3';
function QPixmap_create(fileName: PWideString; format: PAnsiChar; mode: QPixmapColorMode): QPixmapH; external QtShareName name QtNamePrefix + 'QPixmap_create4';
function QPixmap_create(fileName: PWideString; format: PAnsiChar; conversion_flags: Integer): QPixmapH; external QtShareName name QtNamePrefix + 'QPixmap_create5';
function QPixmap_create(data: QByteArrayH): QPixmapH; external QtShareName name QtNamePrefix + 'QPixmap_create7';
function QPixmap_create(p1: QPixmapH): QPixmapH; external QtShareName name QtNamePrefix + 'QPixmap_create8';
function QPixmap_isNull; external QtShareName name QtNamePrefix + 'QPixmap_isNull';
function QPixmap_width; external QtShareName name QtNamePrefix + 'QPixmap_width';
function QPixmap_height; external QtShareName name QtNamePrefix + 'QPixmap_height';
procedure QPixmap_size; external QtShareName name QtNamePrefix + 'QPixmap_size';
procedure QPixmap_rect; external QtShareName name QtNamePrefix + 'QPixmap_rect';
function QPixmap_depth; external QtShareName name QtNamePrefix + 'QPixmap_depth';
function QPixmap_defaultDepth; external QtShareName name QtNamePrefix + 'QPixmap_defaultDepth';
procedure QPixmap_fill(handle: QPixmapH; fillColor: QColorH); external QtShareName name QtNamePrefix + 'QPixmap_fill';
procedure QPixmap_fill(handle: QPixmapH; p1: QWidgetH; xofs: Integer; yofs: Integer); external QtShareName name QtNamePrefix + 'QPixmap_fill2';
procedure QPixmap_fill(handle: QPixmapH; p1: QWidgetH; ofs: PPoint); external QtShareName name QtNamePrefix + 'QPixmap_fill3';
procedure QPixmap_resize(handle: QPixmapH; width: Integer; height: Integer); external QtShareName name QtNamePrefix + 'QPixmap_resize';
procedure QPixmap_resize(handle: QPixmapH; p1: PSize); external QtShareName name QtNamePrefix + 'QPixmap_resize2';
function QPixmap_mask; external QtShareName name QtNamePrefix + 'QPixmap_mask';
procedure QPixmap_setMask; external QtShareName name QtNamePrefix + 'QPixmap_setMask';
function QPixmap_selfMask; external QtShareName name QtNamePrefix + 'QPixmap_selfMask';
procedure QPixmap_createHeuristicMask; external QtShareName name QtNamePrefix + 'QPixmap_createHeuristicMask';
procedure QPixmap_grabWindow; external QtShareName name QtNamePrefix + 'QPixmap_grabWindow';
procedure QPixmap_grabWidget; external QtShareName name QtNamePrefix + 'QPixmap_grabWidget';
procedure QPixmap_xForm; external QtShareName name QtNamePrefix + 'QPixmap_xForm';
procedure QPixmap_trueMatrix; external QtShareName name QtNamePrefix + 'QPixmap_trueMatrix';
procedure QPixmap_convertToImage; external QtShareName name QtNamePrefix + 'QPixmap_convertToImage';
function QPixmap_convertFromImage(handle: QPixmapH; p1: QImageH; mode: QPixmapColorMode): Boolean; external QtShareName name QtNamePrefix + 'QPixmap_convertFromImage';
function QPixmap_convertFromImage(handle: QPixmapH; p1: QImageH; conversion_flags: Integer): Boolean; external QtShareName name QtNamePrefix + 'QPixmap_convertFromImage2';
function QPixmap_imageFormat; external QtShareName name QtNamePrefix + 'QPixmap_imageFormat';
function QPixmap_load(handle: QPixmapH; fileName: PWideString; format: PAnsiChar; mode: QPixmapColorMode): Boolean; external QtShareName name QtNamePrefix + 'QPixmap_load';
function QPixmap_load(handle: QPixmapH; fileName: PWideString; format: PAnsiChar; conversion_flags: Integer): Boolean; external QtShareName name QtNamePrefix + 'QPixmap_load2';
function QPixmap_loadFromData(handle: QPixmapH; buf: PByte; len: Cardinal; format: PAnsiChar; mode: QPixmapColorMode): Boolean; external QtShareName name QtNamePrefix + 'QPixmap_loadFromData';
function QPixmap_loadFromData(handle: QPixmapH; buf: PByte; len: Cardinal; format: PAnsiChar; conversion_flags: Integer): Boolean; external QtShareName name QtNamePrefix + 'QPixmap_loadFromData2';
function QPixmap_loadFromData(handle: QPixmapH; data: QByteArrayH; format: PAnsiChar; conversion_flags: Integer): Boolean; external QtShareName name QtNamePrefix + 'QPixmap_loadFromData3';
function QPixmap_save(handle: QPixmapH; fileName: PWideString; format: PAnsiChar): Boolean; external QtShareName name QtNamePrefix + 'QPixmap_save';
function QPixmap_save(handle: QPixmapH; fileName: PWideString; format: PAnsiChar; quality: Integer): Boolean; external QtShareName name QtNamePrefix + 'QPixmap_save2';
{$IFDEF MSWINDOWS}
function QPixmap_hbm; external QtShareName name QtNamePrefix + 'QPixmap_hbm';
{$ENDIF}
function QPixmap_serialNumber; external QtShareName name QtNamePrefix + 'QPixmap_serialNumber';
function QPixmap_optimization; external QtShareName name QtNamePrefix + 'QPixmap_optimization';
procedure QPixmap_setOptimization; external QtShareName name QtNamePrefix + 'QPixmap_setOptimization';
function QPixmap_defaultOptimization; external QtShareName name QtNamePrefix + 'QPixmap_defaultOptimization';
procedure QPixmap_setDefaultOptimization; external QtShareName name QtNamePrefix + 'QPixmap_setDefaultOptimization';
procedure QPixmap_detach; external QtShareName name QtNamePrefix + 'QPixmap_detach';
function QPixmap_isQBitmap; external QtShareName name QtNamePrefix + 'QPixmap_isQBitmap';
{$IFDEF MSWINDOWS}
function QPixmap_isMultiCellPixmap; external QtShareName name QtNamePrefix + 'QPixmap_isMultiCellPixmap';
{$ENDIF}
{$IFDEF MSWINDOWS}
function QPixmap_multiCellHandle; external QtShareName name QtNamePrefix + 'QPixmap_multiCellHandle';
{$ENDIF}
{$IFDEF MSWINDOWS}
function QPixmap_multiCellBitmap; external QtShareName name QtNamePrefix + 'QPixmap_multiCellBitmap';
{$ENDIF}
{$IFDEF MSWINDOWS}
function QPixmap_multiCellOffset; external QtShareName name QtNamePrefix + 'QPixmap_multiCellOffset';
{$ENDIF}
{$IFDEF MSWINDOWS}
function QPixmap_allocCell; external QtShareName name QtNamePrefix + 'QPixmap_allocCell';
{$ENDIF}
{$IFDEF MSWINDOWS}
procedure QPixmap_freeCell; external QtShareName name QtNamePrefix + 'QPixmap_freeCell';
{$ENDIF}
procedure QPrinter_destroy; external QtShareName name QtNamePrefix + 'QPrinter_destroy';
function QPrinter_create; external QtShareName name QtNamePrefix + 'QPrinter_create';
procedure QPrinter_printerName; external QtShareName name QtNamePrefix + 'QPrinter_printerName';
procedure QPrinter_setPrinterName; external QtShareName name QtNamePrefix + 'QPrinter_setPrinterName';
function QPrinter_outputToFile; external QtShareName name QtNamePrefix + 'QPrinter_outputToFile';
procedure QPrinter_setOutputToFile; external QtShareName name QtNamePrefix + 'QPrinter_setOutputToFile';
procedure QPrinter_outputFileName; external QtShareName name QtNamePrefix + 'QPrinter_outputFileName';
procedure QPrinter_setOutputFileName; external QtShareName name QtNamePrefix + 'QPrinter_setOutputFileName';
procedure QPrinter_printProgram; external QtShareName name QtNamePrefix + 'QPrinter_printProgram';
procedure QPrinter_setPrintProgram; external QtShareName name QtNamePrefix + 'QPrinter_setPrintProgram';
procedure QPrinter_printerSelectionOption; external QtShareName name QtNamePrefix + 'QPrinter_printerSelectionOption';
procedure QPrinter_setPrinterSelectionOption; external QtShareName name QtNamePrefix + 'QPrinter_setPrinterSelectionOption';
procedure QPrinter_docName; external QtShareName name QtNamePrefix + 'QPrinter_docName';
procedure QPrinter_setDocName; external QtShareName name QtNamePrefix + 'QPrinter_setDocName';
procedure QPrinter_creator; external QtShareName name QtNamePrefix + 'QPrinter_creator';
procedure QPrinter_setCreator; external QtShareName name QtNamePrefix + 'QPrinter_setCreator';
function QPrinter_orientation; external QtShareName name QtNamePrefix + 'QPrinter_orientation';
procedure QPrinter_setOrientation; external QtShareName name QtNamePrefix + 'QPrinter_setOrientation';
function QPrinter_pageSize; external QtShareName name QtNamePrefix + 'QPrinter_pageSize';
procedure QPrinter_setPageSize; external QtShareName name QtNamePrefix + 'QPrinter_setPageSize';
procedure QPrinter_setPageOrder; external QtShareName name QtNamePrefix + 'QPrinter_setPageOrder';
function QPrinter_pageOrder; external QtShareName name QtNamePrefix + 'QPrinter_pageOrder';
procedure QPrinter_setColorMode; external QtShareName name QtNamePrefix + 'QPrinter_setColorMode';
function QPrinter_colorMode; external QtShareName name QtNamePrefix + 'QPrinter_colorMode';
procedure QPrinter_setFullPage; external QtShareName name QtNamePrefix + 'QPrinter_setFullPage';
function QPrinter_fullPage; external QtShareName name QtNamePrefix + 'QPrinter_fullPage';
procedure QPrinter_margins; external QtShareName name QtNamePrefix + 'QPrinter_margins';
function QPrinter_fromPage; external QtShareName name QtNamePrefix + 'QPrinter_fromPage';
function QPrinter_toPage; external QtShareName name QtNamePrefix + 'QPrinter_toPage';
procedure QPrinter_setFromTo; external QtShareName name QtNamePrefix + 'QPrinter_setFromTo';
function QPrinter_minPage; external QtShareName name QtNamePrefix + 'QPrinter_minPage';
function QPrinter_maxPage; external QtShareName name QtNamePrefix + 'QPrinter_maxPage';
procedure QPrinter_setMinMax; external QtShareName name QtNamePrefix + 'QPrinter_setMinMax';
function QPrinter_numCopies; external QtShareName name QtNamePrefix + 'QPrinter_numCopies';
procedure QPrinter_setNumCopies; external QtShareName name QtNamePrefix + 'QPrinter_setNumCopies';
function QPrinter_newPage; external QtShareName name QtNamePrefix + 'QPrinter_newPage';
function QPrinter_abort; external QtShareName name QtNamePrefix + 'QPrinter_abort';
function QPrinter_aborted; external QtShareName name QtNamePrefix + 'QPrinter_aborted';
function QPrinter_setup; external QtShareName name QtNamePrefix + 'QPrinter_setup';
procedure QRegion_destroy; external QtShareName name QtNamePrefix + 'QRegion_destroy';
function QRegion_create(): QRegionH; external QtShareName name QtNamePrefix + 'QRegion_create';
function QRegion_create(x: Integer; y: Integer; w: Integer; h: Integer; p5: QRegionRegionType): QRegionH; external QtShareName name QtNamePrefix + 'QRegion_create2';
function QRegion_create(p1: PRect; p2: QRegionRegionType): QRegionH; external QtShareName name QtNamePrefix + 'QRegion_create3';
function QRegion_create(p1: PPointArray; winding: Boolean): QRegionH; external QtShareName name QtNamePrefix + 'QRegion_create4';
function QRegion_create(p1: QRegionH): QRegionH; external QtShareName name QtNamePrefix + 'QRegion_create5';
function QRegion_create(p1: QBitmapH): QRegionH; external QtShareName name QtNamePrefix + 'QRegion_create6';
function QRegion_isNull; external QtShareName name QtNamePrefix + 'QRegion_isNull';
function QRegion_isEmpty; external QtShareName name QtNamePrefix + 'QRegion_isEmpty';
function QRegion_contains(handle: QRegionH; p: PPoint): Boolean; external QtShareName name QtNamePrefix + 'QRegion_contains';
function QRegion_contains(handle: QRegionH; r: PRect): Boolean; external QtShareName name QtNamePrefix + 'QRegion_contains2';
procedure QRegion_translate; external QtShareName name QtNamePrefix + 'QRegion_translate';
procedure QRegion_unite; external QtShareName name QtNamePrefix + 'QRegion_unite';
procedure QRegion_intersect; external QtShareName name QtNamePrefix + 'QRegion_intersect';
procedure QRegion_subtract; external QtShareName name QtNamePrefix + 'QRegion_subtract';
procedure QRegion_eor; external QtShareName name QtNamePrefix + 'QRegion_eor';
procedure QRegion_boundingRect; external QtShareName name QtNamePrefix + 'QRegion_boundingRect';
procedure QRegion_setRects; external QtShareName name QtNamePrefix + 'QRegion_setRects';
{$IFDEF MSWINDOWS}
function QRegion_handle(handle: QRegionH): HRGN; external QtShareName name QtNamePrefix + 'QRegion_handle';
{$ENDIF}
{$IFDEF LINUX}
function QRegion_handle(handle: QRegionH): Region; external QtShareName name QtNamePrefix + 'QRegion_handle2';
{$ENDIF}
procedure QObject_destroy; external QtShareName name QtNamePrefix + 'QObject_destroy';
function QObject_create; external QtShareName name QtNamePrefix + 'QObject_create';
procedure QObject_tr(retval: PWideString; p1: PAnsiChar); external QtShareName name QtNamePrefix + 'QObject_tr';
procedure QObject_tr(retval: PWideString; p1: PAnsiChar; p2: PAnsiChar); external QtShareName name QtNamePrefix + 'QObject_tr2';
function QObject_event; external QtShareName name QtNamePrefix + 'QObject_event';
function QObject_eventFilter; external QtShareName name QtNamePrefix + 'QObject_eventFilter';
function QObject_metaObject; external QtShareName name QtNamePrefix + 'QObject_metaObject';
function QObject_className; external QtShareName name QtNamePrefix + 'QObject_className';
function QObject_isA; external QtShareName name QtNamePrefix + 'QObject_isA';
function QObject_inherits; external QtShareName name QtNamePrefix + 'QObject_inherits';
function QObject_name(handle: QObjectH): PAnsiChar; external QtShareName name QtNamePrefix + 'QObject_name';
function QObject_name(handle: QObjectH; defaultName: PAnsiChar): PAnsiChar; external QtShareName name QtNamePrefix + 'QObject_name2';
procedure QObject_setName; external QtShareName name QtNamePrefix + 'QObject_setName';
function QObject_isWidgetType; external QtShareName name QtNamePrefix + 'QObject_isWidgetType';
function QObject_highPriority; external QtShareName name QtNamePrefix + 'QObject_highPriority';
function QObject_signalsBlocked; external QtShareName name QtNamePrefix + 'QObject_signalsBlocked';
procedure QObject_blockSignals; external QtShareName name QtNamePrefix + 'QObject_blockSignals';
function QObject_startTimer; external QtShareName name QtNamePrefix + 'QObject_startTimer';
procedure QObject_killTimer; external QtShareName name QtNamePrefix + 'QObject_killTimer';
procedure QObject_killTimers; external QtShareName name QtNamePrefix + 'QObject_killTimers';
function QObject_child; external QtShareName name QtNamePrefix + 'QObject_child';
function QObject_children; external QtShareName name QtNamePrefix + 'QObject_children';
function QObject_objectTrees; external QtShareName name QtNamePrefix + 'QObject_objectTrees';
function QObject_queryList; external QtShareName name QtNamePrefix + 'QObject_queryList';
procedure QObject_insertChild; external QtShareName name QtNamePrefix + 'QObject_insertChild';
procedure QObject_removeChild; external QtShareName name QtNamePrefix + 'QObject_removeChild';
procedure QObject_installEventFilter; external QtShareName name QtNamePrefix + 'QObject_installEventFilter';
procedure QObject_removeEventFilter; external QtShareName name QtNamePrefix + 'QObject_removeEventFilter';
function QObject_connect(sender: QObjectH; signal: PAnsiChar; receiver: QObjectH; member: PAnsiChar): Boolean; external QtShareName name QtNamePrefix + 'QObject_connect';
function QObject_connect(handle: QObjectH; sender: QObjectH; signal: PAnsiChar; member: PAnsiChar): Boolean; external QtShareName name QtNamePrefix + 'QObject_connect2';
function QObject_disconnect(sender: QObjectH; signal: PAnsiChar; receiver: QObjectH; member: PAnsiChar): Boolean; external QtShareName name QtNamePrefix + 'QObject_disconnect';
function QObject_disconnect(handle: QObjectH; receiver: QObjectH; member: PAnsiChar): Boolean; external QtShareName name QtNamePrefix + 'QObject_disconnect3';
procedure QObject_dumpObjectTree; external QtShareName name QtNamePrefix + 'QObject_dumpObjectTree';
procedure QObject_dumpObjectInfo; external QtShareName name QtNamePrefix + 'QObject_dumpObjectInfo';
function QObject_parent; external QtShareName name QtNamePrefix + 'QObject_parent';
procedure QObject_superClasses; external QtShareName name QtNamePrefix + 'QObject_superClasses';
procedure QSenderObject_destroy; external QtShareName name QtNamePrefix + 'QSenderObject_destroy';
procedure QSenderObject_setSender; external QtShareName name QtNamePrefix + 'QSenderObject_setSender';
procedure QBrush_destroy; external QtShareName name QtNamePrefix + 'QBrush_destroy';
function QBrush_create(): QBrushH; external QtShareName name QtNamePrefix + 'QBrush_create';
function QBrush_create(p1: BrushStyle): QBrushH; external QtShareName name QtNamePrefix + 'QBrush_create2';
function QBrush_create(p1: QColorH; p2: BrushStyle): QBrushH; external QtShareName name QtNamePrefix + 'QBrush_create3';
function QBrush_create(p1: QColorH; p2: QPixmapH): QBrushH; external QtShareName name QtNamePrefix + 'QBrush_create4';
function QBrush_create(p1: QBrushH): QBrushH; external QtShareName name QtNamePrefix + 'QBrush_create5';
function QBrush_style; external QtShareName name QtNamePrefix + 'QBrush_style';
procedure QBrush_setStyle; external QtShareName name QtNamePrefix + 'QBrush_setStyle';
function QBrush_color; external QtShareName name QtNamePrefix + 'QBrush_color';
procedure QBrush_setColor; external QtShareName name QtNamePrefix + 'QBrush_setColor';
function QBrush_pixmap; external QtShareName name QtNamePrefix + 'QBrush_pixmap';
procedure QBrush_setPixmap; external QtShareName name QtNamePrefix + 'QBrush_setPixmap';
procedure QButtonGroup_destroy; external QtShareName name QtNamePrefix + 'QButtonGroup_destroy';
function QButtonGroup_create(parent: QWidgetH; name: PAnsiChar): QButtonGroupH; external QtShareName name QtNamePrefix + 'QButtonGroup_create';
function QButtonGroup_create(title: PWideString; parent: QWidgetH; name: PAnsiChar): QButtonGroupH; external QtShareName name QtNamePrefix + 'QButtonGroup_create2';
function QButtonGroup_create(columns: Integer; o: Orientation; parent: QWidgetH; name: PAnsiChar): QButtonGroupH; external QtShareName name QtNamePrefix + 'QButtonGroup_create3';
function QButtonGroup_create(columns: Integer; o: Orientation; title: PWideString; parent: QWidgetH; name: PAnsiChar): QButtonGroupH; external QtShareName name QtNamePrefix + 'QButtonGroup_create4';
function QButtonGroup_isExclusive; external QtShareName name QtNamePrefix + 'QButtonGroup_isExclusive';
function QButtonGroup_isRadioButtonExclusive; external QtShareName name QtNamePrefix + 'QButtonGroup_isRadioButtonExclusive';
procedure QButtonGroup_setExclusive; external QtShareName name QtNamePrefix + 'QButtonGroup_setExclusive';
procedure QButtonGroup_setRadioButtonExclusive; external QtShareName name QtNamePrefix + 'QButtonGroup_setRadioButtonExclusive';
function QButtonGroup_insert; external QtShareName name QtNamePrefix + 'QButtonGroup_insert';
procedure QButtonGroup_remove; external QtShareName name QtNamePrefix + 'QButtonGroup_remove';
function QButtonGroup_find; external QtShareName name QtNamePrefix + 'QButtonGroup_find';
function QButtonGroup_id; external QtShareName name QtNamePrefix + 'QButtonGroup_id';
function QButtonGroup_count; external QtShareName name QtNamePrefix + 'QButtonGroup_count';
procedure QButtonGroup_setButton; external QtShareName name QtNamePrefix + 'QButtonGroup_setButton';
procedure QButtonGroup_moveFocus; external QtShareName name QtNamePrefix + 'QButtonGroup_moveFocus';
function QButtonGroup_selected; external QtShareName name QtNamePrefix + 'QButtonGroup_selected';
procedure QCheckBox_destroy; external QtShareName name QtNamePrefix + 'QCheckBox_destroy';
function QCheckBox_create(parent: QWidgetH; name: PAnsiChar): QCheckBoxH; external QtShareName name QtNamePrefix + 'QCheckBox_create';
function QCheckBox_create(text: PWideString; parent: QWidgetH; name: PAnsiChar): QCheckBoxH; external QtShareName name QtNamePrefix + 'QCheckBox_create2';
function QCheckBox_isChecked; external QtShareName name QtNamePrefix + 'QCheckBox_isChecked';
procedure QCheckBox_setChecked; external QtShareName name QtNamePrefix + 'QCheckBox_setChecked';
procedure QCheckBox_setNoChange; external QtShareName name QtNamePrefix + 'QCheckBox_setNoChange';
procedure QCheckBox_setTristate; external QtShareName name QtNamePrefix + 'QCheckBox_setTristate';
function QCheckBox_isTristate; external QtShareName name QtNamePrefix + 'QCheckBox_isTristate';
procedure QCheckBox_sizeHint; external QtShareName name QtNamePrefix + 'QCheckBox_sizeHint';
procedure QCheckBox_sizePolicy; external QtShareName name QtNamePrefix + 'QCheckBox_sizePolicy';
procedure QClipboard_destroy; external QtShareName name QtNamePrefix + 'QClipboard_destroy';
procedure QClipboard_clear; external QtShareName name QtNamePrefix + 'QClipboard_clear';
function QClipboard_ownsSelection; external QtShareName name QtNamePrefix + 'QClipboard_ownsSelection';
function QClipboard_data; external QtShareName name QtNamePrefix + 'QClipboard_data';
procedure QClipboard_setData; external QtShareName name QtNamePrefix + 'QClipboard_setData';
procedure QClipboard_text(handle: QClipboardH; retval: PWideString); external QtShareName name QtNamePrefix + 'QClipboard_text';
procedure QClipboard_text(handle: QClipboardH; retval: PWideString; subtype: PAnsiString); external QtShareName name QtNamePrefix + 'QClipboard_text2';
procedure QClipboard_setText; external QtShareName name QtNamePrefix + 'QClipboard_setText';
procedure QClipboard_image; external QtShareName name QtNamePrefix + 'QClipboard_image';
procedure QClipboard_pixmap; external QtShareName name QtNamePrefix + 'QClipboard_pixmap';
procedure QClipboard_setImage; external QtShareName name QtNamePrefix + 'QClipboard_setImage';
procedure QClipboard_setPixmap; external QtShareName name QtNamePrefix + 'QClipboard_setPixmap';
procedure QColorDialog_destroy; external QtShareName name QtNamePrefix + 'QColorDialog_destroy';
procedure QColorDialog_getColor; external QtShareName name QtNamePrefix + 'QColorDialog_getColor';
procedure QColorDialog_getRgba; external QtShareName name QtNamePrefix + 'QColorDialog_getRgba';
function QColorDialog_customCount; external QtShareName name QtNamePrefix + 'QColorDialog_customCount';
procedure QColorDialog_customColor; external QtShareName name QtNamePrefix + 'QColorDialog_customColor';
procedure QColorDialog_setCustomColor; external QtShareName name QtNamePrefix + 'QColorDialog_setCustomColor';
procedure QCommonStyle_destroy; external QtShareName name QtNamePrefix + 'QCommonStyle_destroy';
procedure QCommonStyle_drawComboButton; external QtShareName name QtNamePrefix + 'QCommonStyle_drawComboButton';
procedure QCommonStyle_comboButtonRect; external QtShareName name QtNamePrefix + 'QCommonStyle_comboButtonRect';
procedure QCommonStyle_comboButtonFocusRect; external QtShareName name QtNamePrefix + 'QCommonStyle_comboButtonFocusRect';
procedure QCommonStyle_drawComboButtonMask; external QtShareName name QtNamePrefix + 'QCommonStyle_drawComboButtonMask';
procedure QCommonStyle_drawPushButtonLabel; external QtShareName name QtNamePrefix + 'QCommonStyle_drawPushButtonLabel';
procedure QCommonStyle_getButtonShift; external QtShareName name QtNamePrefix + 'QCommonStyle_getButtonShift';
function QCommonStyle_defaultFrameWidth; external QtShareName name QtNamePrefix + 'QCommonStyle_defaultFrameWidth';
procedure QCommonStyle_tabbarMetrics; external QtShareName name QtNamePrefix + 'QCommonStyle_tabbarMetrics';
procedure QCommonStyle_drawTab; external QtShareName name QtNamePrefix + 'QCommonStyle_drawTab';
procedure QCommonStyle_drawTabMask; external QtShareName name QtNamePrefix + 'QCommonStyle_drawTabMask';
function QCommonStyle_scrollBarPointOver; external QtShareName name QtNamePrefix + 'QCommonStyle_scrollBarPointOver';
procedure QCommonStyle_drawSliderMask; external QtShareName name QtNamePrefix + 'QCommonStyle_drawSliderMask';
procedure QCommonStyle_drawSliderGrooveMask; external QtShareName name QtNamePrefix + 'QCommonStyle_drawSliderGrooveMask';
function QCommonStyle_maximumSliderDragDistance; external QtShareName name QtNamePrefix + 'QCommonStyle_maximumSliderDragDistance';
function QCommonStyle_popupSubmenuIndicatorWidth; external QtShareName name QtNamePrefix + 'QCommonStyle_popupSubmenuIndicatorWidth';
procedure QCommonStyle_drawMenuBarItem; external QtShareName name QtNamePrefix + 'QCommonStyle_drawMenuBarItem';
procedure QFontDialog_destroy; external QtShareName name QtNamePrefix + 'QFontDialog_destroy';
procedure QFontDialog_getFont(retval: QFontH; ok: PBoolean; def: QFontH; parent: QWidgetH; name: PAnsiChar); external QtShareName name QtNamePrefix + 'QFontDialog_getFont';
procedure QFontDialog_getFont(retval: QFontH; ok: PBoolean; parent: QWidgetH; name: PAnsiChar); external QtShareName name QtNamePrefix + 'QFontDialog_getFont2';
procedure QGroupBox_destroy; external QtShareName name QtNamePrefix + 'QGroupBox_destroy';
function QGroupBox_create(parent: QWidgetH; name: PAnsiChar): QGroupBoxH; external QtShareName name QtNamePrefix + 'QGroupBox_create';
function QGroupBox_create(title: PWideString; parent: QWidgetH; name: PAnsiChar): QGroupBoxH; external QtShareName name QtNamePrefix + 'QGroupBox_create2';
function QGroupBox_create(columns: Integer; o: Orientation; parent: QWidgetH; name: PAnsiChar): QGroupBoxH; external QtShareName name QtNamePrefix + 'QGroupBox_create3';
function QGroupBox_create(columns: Integer; o: Orientation; title: PWideString; parent: QWidgetH; name: PAnsiChar): QGroupBoxH; external QtShareName name QtNamePrefix + 'QGroupBox_create4';
procedure QGroupBox_setColumnLayout; external QtShareName name QtNamePrefix + 'QGroupBox_setColumnLayout';
procedure QGroupBox_title; external QtShareName name QtNamePrefix + 'QGroupBox_title';
procedure QGroupBox_setTitle; external QtShareName name QtNamePrefix + 'QGroupBox_setTitle';
function QGroupBox_alignment; external QtShareName name QtNamePrefix + 'QGroupBox_alignment';
procedure QGroupBox_setAlignment; external QtShareName name QtNamePrefix + 'QGroupBox_setAlignment';
function QGroupBox_columns; external QtShareName name QtNamePrefix + 'QGroupBox_columns';
procedure QGroupBox_setColumns; external QtShareName name QtNamePrefix + 'QGroupBox_setColumns';
function QGroupBox_orientation; external QtShareName name QtNamePrefix + 'QGroupBox_orientation';
procedure QGroupBox_setOrientation; external QtShareName name QtNamePrefix + 'QGroupBox_setOrientation';
procedure QGroupBox_addSpace; external QtShareName name QtNamePrefix + 'QGroupBox_addSpace';
procedure QGroupBox_sizeHint; external QtShareName name QtNamePrefix + 'QGroupBox_sizeHint';
procedure QHeader_destroy; external QtShareName name QtNamePrefix + 'QHeader_destroy';
function QHeader_create(parent: QWidgetH; name: PAnsiChar): QHeaderH; external QtShareName name QtNamePrefix + 'QHeader_create';
function QHeader_create(p1: Integer; parent: QWidgetH; name: PAnsiChar): QHeaderH; external QtShareName name QtNamePrefix + 'QHeader_create2';
function QHeader_addLabel(handle: QHeaderH; p1: PWideString; size: Integer): Integer; external QtShareName name QtNamePrefix + 'QHeader_addLabel';
function QHeader_addLabel(handle: QHeaderH; p1: QIconSetH; p2: PWideString; size: Integer): Integer; external QtShareName name QtNamePrefix + 'QHeader_addLabel2';
procedure QHeader_removeLabel; external QtShareName name QtNamePrefix + 'QHeader_removeLabel';
procedure QHeader_setLabel(handle: QHeaderH; p1: Integer; p2: PWideString; size: Integer); external QtShareName name QtNamePrefix + 'QHeader_setLabel';
procedure QHeader_setLabel(handle: QHeaderH; p1: Integer; p2: QIconSetH; p3: PWideString; size: Integer); external QtShareName name QtNamePrefix + 'QHeader_setLabel2';
procedure QHeader_label; external QtShareName name QtNamePrefix + 'QHeader_label';
function QHeader_iconSet; external QtShareName name QtNamePrefix + 'QHeader_iconSet';
procedure QHeader_setOrientation; external QtShareName name QtNamePrefix + 'QHeader_setOrientation';
function QHeader_orientation; external QtShareName name QtNamePrefix + 'QHeader_orientation';
procedure QHeader_setTracking; external QtShareName name QtNamePrefix + 'QHeader_setTracking';
function QHeader_tracking; external QtShareName name QtNamePrefix + 'QHeader_tracking';
procedure QHeader_setClickEnabled; external QtShareName name QtNamePrefix + 'QHeader_setClickEnabled';
procedure QHeader_setResizeEnabled; external QtShareName name QtNamePrefix + 'QHeader_setResizeEnabled';
procedure QHeader_setMovingEnabled; external QtShareName name QtNamePrefix + 'QHeader_setMovingEnabled';
function QHeader_isClickEnabled; external QtShareName name QtNamePrefix + 'QHeader_isClickEnabled';
function QHeader_isResizeEnabled; external QtShareName name QtNamePrefix + 'QHeader_isResizeEnabled';
function QHeader_isMovingEnabled; external QtShareName name QtNamePrefix + 'QHeader_isMovingEnabled';
procedure QHeader_resizeSection; external QtShareName name QtNamePrefix + 'QHeader_resizeSection';
function QHeader_sectionSize; external QtShareName name QtNamePrefix + 'QHeader_sectionSize';
function QHeader_sectionPos; external QtShareName name QtNamePrefix + 'QHeader_sectionPos';
function QHeader_sectionAt; external QtShareName name QtNamePrefix + 'QHeader_sectionAt';
function QHeader_count; external QtShareName name QtNamePrefix + 'QHeader_count';
procedure QHeader_setCellSize; external QtShareName name QtNamePrefix + 'QHeader_setCellSize';
function QHeader_cellSize; external QtShareName name QtNamePrefix + 'QHeader_cellSize';
function QHeader_cellPos; external QtShareName name QtNamePrefix + 'QHeader_cellPos';
function QHeader_cellAt; external QtShareName name QtNamePrefix + 'QHeader_cellAt';
function QHeader_offset; external QtShareName name QtNamePrefix + 'QHeader_offset';
procedure QHeader_sizeHint; external QtShareName name QtNamePrefix + 'QHeader_sizeHint';
procedure QHeader_sizePolicy; external QtShareName name QtNamePrefix + 'QHeader_sizePolicy';
function QHeader_mapToSection; external QtShareName name QtNamePrefix + 'QHeader_mapToSection';
function QHeader_mapToIndex; external QtShareName name QtNamePrefix + 'QHeader_mapToIndex';
function QHeader_mapToLogical; external QtShareName name QtNamePrefix + 'QHeader_mapToLogical';
function QHeader_mapToActual; external QtShareName name QtNamePrefix + 'QHeader_mapToActual';
procedure QHeader_moveSection; external QtShareName name QtNamePrefix + 'QHeader_moveSection';
procedure QHeader_moveCell; external QtShareName name QtNamePrefix + 'QHeader_moveCell';
procedure QHeader_setSortIndicator; external QtShareName name QtNamePrefix + 'QHeader_setSortIndicator';
procedure QHeader_setUpdatesEnabled; external QtShareName name QtNamePrefix + 'QHeader_setUpdatesEnabled';
procedure QHeader_setOffset; external QtShareName name QtNamePrefix + 'QHeader_setOffset';
procedure QLabel_destroy; external QtShareName name QtNamePrefix + 'QLabel_destroy';
function QLabel_create(parent: QWidgetH; name: PAnsiChar; f: WFlags): QLabelH; external QtShareName name QtNamePrefix + 'QLabel_create';
function QLabel_create(text: PWideString; parent: QWidgetH; name: PAnsiChar; f: WFlags): QLabelH; external QtShareName name QtNamePrefix + 'QLabel_create2';
function QLabel_create(buddy: QWidgetH; p2: PWideString; parent: QWidgetH; name: PAnsiChar; f: WFlags): QLabelH; external QtShareName name QtNamePrefix + 'QLabel_create3';
procedure QLabel_text; external QtShareName name QtNamePrefix + 'QLabel_text';
function QLabel_pixmap; external QtShareName name QtNamePrefix + 'QLabel_pixmap';
function QLabel_movie; external QtShareName name QtNamePrefix + 'QLabel_movie';
function QLabel_textFormat; external QtShareName name QtNamePrefix + 'QLabel_textFormat';
procedure QLabel_setTextFormat; external QtShareName name QtNamePrefix + 'QLabel_setTextFormat';
function QLabel_alignment; external QtShareName name QtNamePrefix + 'QLabel_alignment';
procedure QLabel_setAlignment; external QtShareName name QtNamePrefix + 'QLabel_setAlignment';
function QLabel_indent; external QtShareName name QtNamePrefix + 'QLabel_indent';
procedure QLabel_setIndent; external QtShareName name QtNamePrefix + 'QLabel_setIndent';
function QLabel_autoResize; external QtShareName name QtNamePrefix + 'QLabel_autoResize';
procedure QLabel_setAutoResize; external QtShareName name QtNamePrefix + 'QLabel_setAutoResize';
function QLabel_hasScaledContents; external QtShareName name QtNamePrefix + 'QLabel_hasScaledContents';
procedure QLabel_setScaledContents; external QtShareName name QtNamePrefix + 'QLabel_setScaledContents';
procedure QLabel_sizeHint; external QtShareName name QtNamePrefix + 'QLabel_sizeHint';
procedure QLabel_minimumSizeHint; external QtShareName name QtNamePrefix + 'QLabel_minimumSizeHint';
procedure QLabel_sizePolicy; external QtShareName name QtNamePrefix + 'QLabel_sizePolicy';
procedure QLabel_setBuddy; external QtShareName name QtNamePrefix + 'QLabel_setBuddy';
function QLabel_buddy; external QtShareName name QtNamePrefix + 'QLabel_buddy';
procedure QLabel_setAutoMask; external QtShareName name QtNamePrefix + 'QLabel_setAutoMask';
function QLabel_heightForWidth; external QtShareName name QtNamePrefix + 'QLabel_heightForWidth';
procedure QLabel_setText; external QtShareName name QtNamePrefix + 'QLabel_setText';
procedure QLabel_setPixmap; external QtShareName name QtNamePrefix + 'QLabel_setPixmap';
procedure QLabel_setMovie; external QtShareName name QtNamePrefix + 'QLabel_setMovie';
procedure QLabel_setNum(handle: QLabelH; p1: Integer); external QtShareName name QtNamePrefix + 'QLabel_setNum';
procedure QLabel_setNum(handle: QLabelH; p1: Double); external QtShareName name QtNamePrefix + 'QLabel_setNum2';
procedure QLabel_clear; external QtShareName name QtNamePrefix + 'QLabel_clear';
procedure QPainter_destroy; external QtShareName name QtNamePrefix + 'QPainter_destroy';
function QPainter_create(): QPainterH; external QtShareName name QtNamePrefix + 'QPainter_create';
function QPainter_create(p1: QPaintDeviceH): QPainterH; external QtShareName name QtNamePrefix + 'QPainter_create2';
function QPainter_create(p1: QPaintDeviceH; p2: QWidgetH): QPainterH; external QtShareName name QtNamePrefix + 'QPainter_create3';
function QPainter_begin(handle: QPainterH; p1: QPaintDeviceH): Boolean; external QtShareName name QtNamePrefix + 'QPainter_begin';
function QPainter_begin(handle: QPainterH; p1: QPaintDeviceH; p2: QWidgetH): Boolean; external QtShareName name QtNamePrefix + 'QPainter_begin2';
function QPainter_end; external QtShareName name QtNamePrefix + 'QPainter_end';
function QPainter_device; external QtShareName name QtNamePrefix + 'QPainter_device';
procedure QPainter_redirect; external QtShareName name QtNamePrefix + 'QPainter_redirect';
function QPainter_isActive; external QtShareName name QtNamePrefix + 'QPainter_isActive';
procedure QPainter_flush; external QtShareName name QtNamePrefix + 'QPainter_flush';
procedure QPainter_save; external QtShareName name QtNamePrefix + 'QPainter_save';
procedure QPainter_restore; external QtShareName name QtNamePrefix + 'QPainter_restore';
procedure QPainter_fontMetrics; external QtShareName name QtNamePrefix + 'QPainter_fontMetrics';
procedure QPainter_fontInfo; external QtShareName name QtNamePrefix + 'QPainter_fontInfo';
function QPainter_font; external QtShareName name QtNamePrefix + 'QPainter_font';
procedure QPainter_setFont; external QtShareName name QtNamePrefix + 'QPainter_setFont';
function QPainter_pen; external QtShareName name QtNamePrefix + 'QPainter_pen';
procedure QPainter_setPen(handle: QPainterH; p1: QPenH); external QtShareName name QtNamePrefix + 'QPainter_setPen';
procedure QPainter_setPen(handle: QPainterH; p1: PenStyle); external QtShareName name QtNamePrefix + 'QPainter_setPen2';
procedure QPainter_setPen(handle: QPainterH; p1: QColorH); external QtShareName name QtNamePrefix + 'QPainter_setPen3';
function QPainter_brush; external QtShareName name QtNamePrefix + 'QPainter_brush';
procedure QPainter_setBrush(handle: QPainterH; p1: QBrushH); external QtShareName name QtNamePrefix + 'QPainter_setBrush';
procedure QPainter_setBrush(handle: QPainterH; p1: BrushStyle); external QtShareName name QtNamePrefix + 'QPainter_setBrush2';
procedure QPainter_setBrush(handle: QPainterH; p1: QColorH); external QtShareName name QtNamePrefix + 'QPainter_setBrush3';
procedure QPainter_pos; external QtShareName name QtNamePrefix + 'QPainter_pos';
function QPainter_backgroundColor; external QtShareName name QtNamePrefix + 'QPainter_backgroundColor';
procedure QPainter_setBackgroundColor; external QtShareName name QtNamePrefix + 'QPainter_setBackgroundColor';
function QPainter_backgroundMode; external QtShareName name QtNamePrefix + 'QPainter_backgroundMode';
procedure QPainter_setBackgroundMode; external QtShareName name QtNamePrefix + 'QPainter_setBackgroundMode';
function QPainter_rasterOp; external QtShareName name QtNamePrefix + 'QPainter_rasterOp';
procedure QPainter_setRasterOp; external QtShareName name QtNamePrefix + 'QPainter_setRasterOp';
function QPainter_brushOrigin; external QtShareName name QtNamePrefix + 'QPainter_brushOrigin';
procedure QPainter_setBrushOrigin(handle: QPainterH; x: Integer; y: Integer); external QtShareName name QtNamePrefix + 'QPainter_setBrushOrigin';
procedure QPainter_setBrushOrigin(handle: QPainterH; p1: PPoint); external QtShareName name QtNamePrefix + 'QPainter_setBrushOrigin2';
function QPainter_hasViewXForm; external QtShareName name QtNamePrefix + 'QPainter_hasViewXForm';
function QPainter_hasWorldXForm; external QtShareName name QtNamePrefix + 'QPainter_hasWorldXForm';
procedure QPainter_setViewXForm; external QtShareName name QtNamePrefix + 'QPainter_setViewXForm';
procedure QPainter_window; external QtShareName name QtNamePrefix + 'QPainter_window';
procedure QPainter_setWindow(handle: QPainterH; p1: PRect); external QtShareName name QtNamePrefix + 'QPainter_setWindow';
procedure QPainter_setWindow(handle: QPainterH; x: Integer; y: Integer; w: Integer; h: Integer); external QtShareName name QtNamePrefix + 'QPainter_setWindow2';
procedure QPainter_viewport; external QtShareName name QtNamePrefix + 'QPainter_viewport';
procedure QPainter_setViewport(handle: QPainterH; p1: PRect); external QtShareName name QtNamePrefix + 'QPainter_setViewport';
procedure QPainter_setViewport(handle: QPainterH; x: Integer; y: Integer; w: Integer; h: Integer); external QtShareName name QtNamePrefix + 'QPainter_setViewport2';
procedure QPainter_setWorldXForm; external QtShareName name QtNamePrefix + 'QPainter_setWorldXForm';
function QPainter_worldMatrix; external QtShareName name QtNamePrefix + 'QPainter_worldMatrix';
procedure QPainter_setWorldMatrix; external QtShareName name QtNamePrefix + 'QPainter_setWorldMatrix';
procedure QPainter_saveWorldMatrix; external QtShareName name QtNamePrefix + 'QPainter_saveWorldMatrix';
procedure QPainter_restoreWorldMatrix; external QtShareName name QtNamePrefix + 'QPainter_restoreWorldMatrix';
procedure QPainter_scale; external QtShareName name QtNamePrefix + 'QPainter_scale';
procedure QPainter_shear; external QtShareName name QtNamePrefix + 'QPainter_shear';
procedure QPainter_rotate; external QtShareName name QtNamePrefix + 'QPainter_rotate';
procedure QPainter_translate; external QtShareName name QtNamePrefix + 'QPainter_translate';
procedure QPainter_resetXForm; external QtShareName name QtNamePrefix + 'QPainter_resetXForm';
procedure QPainter_xForm(handle: QPainterH; retval: PPoint; p1: PPoint); external QtShareName name QtNamePrefix + 'QPainter_xForm';
procedure QPainter_xForm(handle: QPainterH; retval: PRect; p1: PRect); external QtShareName name QtNamePrefix + 'QPainter_xForm2';
procedure QPainter_xForm(handle: QPainterH; retval: PPointArray; p1: PPointArray); external QtShareName name QtNamePrefix + 'QPainter_xForm3';
procedure QPainter_xForm(handle: QPainterH; retval: PPointArray; p1: PPointArray; index: Integer; npoints: Integer); external QtShareName name QtNamePrefix + 'QPainter_xForm4';
procedure QPainter_xFormDev(handle: QPainterH; retval: PPoint; p1: PPoint); external QtShareName name QtNamePrefix + 'QPainter_xFormDev';
procedure QPainter_xFormDev(handle: QPainterH; retval: PRect; p1: PRect); external QtShareName name QtNamePrefix + 'QPainter_xFormDev2';
procedure QPainter_xFormDev(handle: QPainterH; retval: PPointArray; p1: PPointArray); external QtShareName name QtNamePrefix + 'QPainter_xFormDev3';
procedure QPainter_xFormDev(handle: QPainterH; retval: PPointArray; p1: PPointArray; index: Integer; npoints: Integer); external QtShareName name QtNamePrefix + 'QPainter_xFormDev4';
procedure QPainter_setClipping; external QtShareName name QtNamePrefix + 'QPainter_setClipping';
function QPainter_hasClipping; external QtShareName name QtNamePrefix + 'QPainter_hasClipping';
function QPainter_clipRegion; external QtShareName name QtNamePrefix + 'QPainter_clipRegion';
procedure QPainter_setClipRect(handle: QPainterH; p1: PRect); external QtShareName name QtNamePrefix + 'QPainter_setClipRect';
procedure QPainter_setClipRect(handle: QPainterH; x: Integer; y: Integer; w: Integer; h: Integer); external QtShareName name QtNamePrefix + 'QPainter_setClipRect2';
procedure QPainter_setClipRegion; external QtShareName name QtNamePrefix + 'QPainter_setClipRegion';
procedure QPainter_drawPoint(handle: QPainterH; x: Integer; y: Integer); external QtShareName name QtNamePrefix + 'QPainter_drawPoint';
procedure QPainter_drawPoint(handle: QPainterH; p1: PPoint); external QtShareName name QtNamePrefix + 'QPainter_drawPoint2';
procedure QPainter_drawPoints; external QtShareName name QtNamePrefix + 'QPainter_drawPoints';
procedure QPainter_moveTo(handle: QPainterH; x: Integer; y: Integer); external QtShareName name QtNamePrefix + 'QPainter_moveTo';
procedure QPainter_moveTo(handle: QPainterH; p1: PPoint); external QtShareName name QtNamePrefix + 'QPainter_moveTo2';
procedure QPainter_lineTo(handle: QPainterH; x: Integer; y: Integer); external QtShareName name QtNamePrefix + 'QPainter_lineTo';
procedure QPainter_lineTo(handle: QPainterH; p1: PPoint); external QtShareName name QtNamePrefix + 'QPainter_lineTo2';
procedure QPainter_drawLine(handle: QPainterH; x1: Integer; y1: Integer; x2: Integer; y2: Integer); external QtShareName name QtNamePrefix + 'QPainter_drawLine';
procedure QPainter_drawLine(handle: QPainterH; p1: PPoint; p2: PPoint); external QtShareName name QtNamePrefix + 'QPainter_drawLine2';
procedure QPainter_drawRect(handle: QPainterH; x: Integer; y: Integer; w: Integer; h: Integer); external QtShareName name QtNamePrefix + 'QPainter_drawRect';
procedure QPainter_drawRect(handle: QPainterH; p1: PRect); external QtShareName name QtNamePrefix + 'QPainter_drawRect2';
procedure QPainter_drawWinFocusRect(handle: QPainterH; x: Integer; y: Integer; w: Integer; h: Integer); external QtShareName name QtNamePrefix + 'QPainter_drawWinFocusRect';
procedure QPainter_drawWinFocusRect(handle: QPainterH; x: Integer; y: Integer; w: Integer; h: Integer; bgColor: QColorH); external QtShareName name QtNamePrefix + 'QPainter_drawWinFocusRect2';
procedure QPainter_drawWinFocusRect(handle: QPainterH; p1: PRect); external QtShareName name QtNamePrefix + 'QPainter_drawWinFocusRect3';
procedure QPainter_drawWinFocusRect(handle: QPainterH; p1: PRect; bgColor: QColorH); external QtShareName name QtNamePrefix + 'QPainter_drawWinFocusRect4';
procedure QPainter_drawRoundRect(handle: QPainterH; x: Integer; y: Integer; w: Integer; h: Integer; p5: Integer; p6: Integer); external QtShareName name QtNamePrefix + 'QPainter_drawRoundRect';
procedure QPainter_drawRoundRect(handle: QPainterH; p1: PRect; p2: Integer; p3: Integer); external QtShareName name QtNamePrefix + 'QPainter_drawRoundRect2';
procedure QPainter_drawRoundRect(handle: QPainterH; x: Integer; y: Integer; w: Integer; h: Integer); external QtShareName name QtNamePrefix + 'QPainter_drawRoundRect3';
procedure QPainter_drawRoundRect(handle: QPainterH; p1: PRect); external QtShareName name QtNamePrefix + 'QPainter_drawRoundRect4';
procedure QPainter_drawEllipse(handle: QPainterH; x: Integer; y: Integer; w: Integer; h: Integer); external QtShareName name QtNamePrefix + 'QPainter_drawEllipse';
procedure QPainter_drawEllipse(handle: QPainterH; p1: PRect); external QtShareName name QtNamePrefix + 'QPainter_drawEllipse2';
procedure QPainter_drawArc(handle: QPainterH; x: Integer; y: Integer; w: Integer; h: Integer; a: Integer; alen: Integer); external QtShareName name QtNamePrefix + 'QPainter_drawArc';
procedure QPainter_drawArc(handle: QPainterH; p1: PRect; a: Integer; alen: Integer); external QtShareName name QtNamePrefix + 'QPainter_drawArc2';
procedure QPainter_drawPie(handle: QPainterH; x: Integer; y: Integer; w: Integer; h: Integer; a: Integer; alen: Integer); external QtShareName name QtNamePrefix + 'QPainter_drawPie';
procedure QPainter_drawPie(handle: QPainterH; p1: PRect; a: Integer; alen: Integer); external QtShareName name QtNamePrefix + 'QPainter_drawPie2';
procedure QPainter_drawChord(handle: QPainterH; x: Integer; y: Integer; w: Integer; h: Integer; a: Integer; alen: Integer); external QtShareName name QtNamePrefix + 'QPainter_drawChord';
procedure QPainter_drawChord(handle: QPainterH; p1: PRect; a: Integer; alen: Integer); external QtShareName name QtNamePrefix + 'QPainter_drawChord2';
procedure QPainter_drawLineSegments; external QtShareName name QtNamePrefix + 'QPainter_drawLineSegments';
procedure QPainter_drawPolyline; external QtShareName name QtNamePrefix + 'QPainter_drawPolyline';
procedure QPainter_drawPolygon; external QtShareName name QtNamePrefix + 'QPainter_drawPolygon';
procedure QPainter_drawQuadBezier; external QtShareName name QtNamePrefix + 'QPainter_drawQuadBezier';
procedure QPainter_drawPixmap(handle: QPainterH; x: Integer; y: Integer; p3: QPixmapH; sx: Integer; sy: Integer; sw: Integer; sh: Integer); external QtShareName name QtNamePrefix + 'QPainter_drawPixmap';
procedure QPainter_drawPixmap(handle: QPainterH; p1: PPoint; p2: QPixmapH; sr: PRect); external QtShareName name QtNamePrefix + 'QPainter_drawPixmap2';
procedure QPainter_drawPixmap(handle: QPainterH; p1: PPoint; p2: QPixmapH); external QtShareName name QtNamePrefix + 'QPainter_drawPixmap3';
procedure QPainter_drawImage(handle: QPainterH; x: Integer; y: Integer; p3: QImageH; sx: Integer; sy: Integer; sw: Integer; sh: Integer); external QtShareName name QtNamePrefix + 'QPainter_drawImage';
procedure QPainter_drawImage(handle: QPainterH; p1: PPoint; p2: QImageH; sr: PRect); external QtShareName name QtNamePrefix + 'QPainter_drawImage2';
procedure QPainter_drawImage(handle: QPainterH; p1: PPoint; p2: QImageH); external QtShareName name QtNamePrefix + 'QPainter_drawImage3';
procedure QPainter_drawImage(handle: QPainterH; x: Integer; y: Integer; p3: QImageH; sx: Integer; sy: Integer; sw: Integer; sh: Integer; conversion_flags: Integer); external QtShareName name QtNamePrefix + 'QPainter_drawImage4';
procedure QPainter_drawImage(handle: QPainterH; p1: PPoint; p2: QImageH; sr: PRect; conversion_flags: Integer); external QtShareName name QtNamePrefix + 'QPainter_drawImage5';
procedure QPainter_drawImage(handle: QPainterH; p1: PPoint; p2: QImageH; conversion_flags: Integer); external QtShareName name QtNamePrefix + 'QPainter_drawImage6';
procedure QPainter_drawTiledPixmap(handle: QPainterH; x: Integer; y: Integer; w: Integer; h: Integer; p5: QPixmapH; sx: Integer; sy: Integer); external QtShareName name QtNamePrefix + 'QPainter_drawTiledPixmap';
procedure QPainter_drawTiledPixmap(handle: QPainterH; p1: PRect; p2: QPixmapH; p3: PPoint); external QtShareName name QtNamePrefix + 'QPainter_drawTiledPixmap2';
procedure QPainter_drawTiledPixmap(handle: QPainterH; p1: PRect; p2: QPixmapH); external QtShareName name QtNamePrefix + 'QPainter_drawTiledPixmap3';
procedure QPainter_drawPicture; external QtShareName name QtNamePrefix + 'QPainter_drawPicture';
procedure QPainter_fillRect(handle: QPainterH; x: Integer; y: Integer; w: Integer; h: Integer; p5: QBrushH); external QtShareName name QtNamePrefix + 'QPainter_fillRect';
procedure QPainter_fillRect(handle: QPainterH; p1: PRect; p2: QBrushH); external QtShareName name QtNamePrefix + 'QPainter_fillRect2';
procedure QPainter_eraseRect(handle: QPainterH; x: Integer; y: Integer; w: Integer; h: Integer); external QtShareName name QtNamePrefix + 'QPainter_eraseRect';
procedure QPainter_eraseRect(handle: QPainterH; p1: PRect); external QtShareName name QtNamePrefix + 'QPainter_eraseRect2';
procedure QPainter_drawText(handle: QPainterH; x: Integer; y: Integer; p3: PWideString; len: Integer); external QtShareName name QtNamePrefix + 'QPainter_drawText';
procedure QPainter_drawText(handle: QPainterH; p1: PPoint; p2: PWideString; len: Integer); external QtShareName name QtNamePrefix + 'QPainter_drawText2';
procedure QPainter_drawText(handle: QPainterH; x: Integer; y: Integer; w: Integer; h: Integer; flags: Integer; p6: PWideString; len: Integer; br: PRect; internal: PPAnsiChar); external QtShareName name QtNamePrefix + 'QPainter_drawText3';
procedure QPainter_drawText(handle: QPainterH; p1: PRect; flags: Integer; p3: PWideString; len: Integer; br: PRect; internal: PPAnsiChar); external QtShareName name QtNamePrefix + 'QPainter_drawText4';
procedure QPainter_boundingRect(handle: QPainterH; retval: PRect; x: Integer; y: Integer; w: Integer; h: Integer; flags: Integer; p6: PWideString; len: Integer; intern: PPAnsiChar); external QtShareName name QtNamePrefix + 'QPainter_boundingRect';
procedure QPainter_boundingRect(handle: QPainterH; retval: PRect; p1: PRect; flags: Integer; p3: PWideString; len: Integer; intern: PPAnsiChar); external QtShareName name QtNamePrefix + 'QPainter_boundingRect2';
function QPainter_tabStops; external QtShareName name QtNamePrefix + 'QPainter_tabStops';
procedure QPainter_setTabStops; external QtShareName name QtNamePrefix + 'QPainter_setTabStops';
function QPainter_tabArray; external QtShareName name QtNamePrefix + 'QPainter_tabArray';
procedure QPainter_setTabArray; external QtShareName name QtNamePrefix + 'QPainter_setTabArray';
{$IFDEF MSWINDOWS}
function QPainter_handle(handle: QPainterH): HDC; external QtShareName name QtNamePrefix + 'QPainter_handle';
{$ENDIF}
{$IFDEF LINUX}
function QPainter_handle(handle: QPainterH): HANDLE; external QtShareName name QtNamePrefix + 'QPainter_handle2';
{$ENDIF}
procedure QPainter_initialize; external QtShareName name QtNamePrefix + 'QPainter_initialize';
procedure QPainter_cleanup; external QtShareName name QtNamePrefix + 'QPainter_cleanup';
procedure QPen_destroy; external QtShareName name QtNamePrefix + 'QPen_destroy';
function QPen_create(): QPenH; external QtShareName name QtNamePrefix + 'QPen_create';
function QPen_create(p1: PenStyle): QPenH; external QtShareName name QtNamePrefix + 'QPen_create2';
function QPen_create(color: QColorH; width: Cardinal; style: PenStyle): QPenH; external QtShareName name QtNamePrefix + 'QPen_create3';
function QPen_create(cl: QColorH; w: Cardinal; s: PenStyle; c: PenCapStyle; j: PenJoinStyle): QPenH; external QtShareName name QtNamePrefix + 'QPen_create4';
function QPen_create(p1: QPenH): QPenH; external QtShareName name QtNamePrefix + 'QPen_create5';
function QPen_style; external QtShareName name QtNamePrefix + 'QPen_style';
procedure QPen_setStyle; external QtShareName name QtNamePrefix + 'QPen_setStyle';
function QPen_width; external QtShareName name QtNamePrefix + 'QPen_width';
procedure QPen_setWidth; external QtShareName name QtNamePrefix + 'QPen_setWidth';
function QPen_color; external QtShareName name QtNamePrefix + 'QPen_color';
procedure QPen_setColor; external QtShareName name QtNamePrefix + 'QPen_setColor';
function QPen_capStyle; external QtShareName name QtNamePrefix + 'QPen_capStyle';
procedure QPen_setCapStyle; external QtShareName name QtNamePrefix + 'QPen_setCapStyle';
function QPen_joinStyle; external QtShareName name QtNamePrefix + 'QPen_joinStyle';
procedure QPen_setJoinStyle; external QtShareName name QtNamePrefix + 'QPen_setJoinStyle';
procedure QPopupMenu_destroy; external QtShareName name QtNamePrefix + 'QPopupMenu_destroy';
function QPopupMenu_create; external QtShareName name QtNamePrefix + 'QPopupMenu_create';
procedure QPopupMenu_popup; external QtShareName name QtNamePrefix + 'QPopupMenu_popup';
procedure QPopupMenu_updateItem; external QtShareName name QtNamePrefix + 'QPopupMenu_updateItem';
procedure QPopupMenu_setCheckable; external QtShareName name QtNamePrefix + 'QPopupMenu_setCheckable';
function QPopupMenu_isCheckable; external QtShareName name QtNamePrefix + 'QPopupMenu_isCheckable';
procedure QPopupMenu_setFont; external QtShareName name QtNamePrefix + 'QPopupMenu_setFont';
procedure QPopupMenu_show; external QtShareName name QtNamePrefix + 'QPopupMenu_show';
procedure QPopupMenu_hide; external QtShareName name QtNamePrefix + 'QPopupMenu_hide';
function QPopupMenu_exec(handle: QPopupMenuH): Integer; external QtShareName name QtNamePrefix + 'QPopupMenu_exec';
function QPopupMenu_exec(handle: QPopupMenuH; pos: PPoint; indexAtPoint: Integer): Integer; external QtShareName name QtNamePrefix + 'QPopupMenu_exec2';
procedure QPopupMenu_setActiveItem; external QtShareName name QtNamePrefix + 'QPopupMenu_setActiveItem';
procedure QPopupMenu_sizeHint; external QtShareName name QtNamePrefix + 'QPopupMenu_sizeHint';
function QPopupMenu_idAt(handle: QPopupMenuH; index: Integer): Integer; external QtShareName name QtNamePrefix + 'QPopupMenu_idAt';
function QPopupMenu_idAt(handle: QPopupMenuH; pos: PPoint): Integer; external QtShareName name QtNamePrefix + 'QPopupMenu_idAt2';
function QPopupMenu_customWhatsThis; external QtShareName name QtNamePrefix + 'QPopupMenu_customWhatsThis';
function QPopupMenu_insertTearOffHandle; external QtShareName name QtNamePrefix + 'QPopupMenu_insertTearOffHandle';
procedure QPopupMenu_activateItemAt; external QtShareName name QtNamePrefix + 'QPopupMenu_activateItemAt';
function QPopupMenu_to_QMenuData; external QtSharename name QtNamePrefix + 'QPopupMenu_to_QMenuData';
procedure QPushButton_destroy; external QtShareName name QtNamePrefix + 'QPushButton_destroy';
function QPushButton_create(parent: QWidgetH; name: PAnsiChar): QPushButtonH; external QtShareName name QtNamePrefix + 'QPushButton_create';
function QPushButton_create(text: PWideString; parent: QWidgetH; name: PAnsiChar): QPushButtonH; external QtShareName name QtNamePrefix + 'QPushButton_create2';
function QPushButton_create(icon: QIconSetH; text: PWideString; parent: QWidgetH; name: PAnsiChar): QPushButtonH; external QtShareName name QtNamePrefix + 'QPushButton_create3';
procedure QPushButton_sizeHint; external QtShareName name QtNamePrefix + 'QPushButton_sizeHint';
procedure QPushButton_sizePolicy; external QtShareName name QtNamePrefix + 'QPushButton_sizePolicy';
procedure QPushButton_move(handle: QPushButtonH; x: Integer; y: Integer); external QtShareName name QtNamePrefix + 'QPushButton_move';
procedure QPushButton_move(handle: QPushButtonH; p: PPoint); external QtShareName name QtNamePrefix + 'QPushButton_move2';
procedure QPushButton_resize(handle: QPushButtonH; w: Integer; h: Integer); external QtShareName name QtNamePrefix + 'QPushButton_resize';
procedure QPushButton_resize(handle: QPushButtonH; p1: PSize); external QtShareName name QtNamePrefix + 'QPushButton_resize2';
procedure QPushButton_setGeometry(handle: QPushButtonH; x: Integer; y: Integer; w: Integer; h: Integer); external QtShareName name QtNamePrefix + 'QPushButton_setGeometry';
procedure QPushButton_setGeometry(handle: QPushButtonH; p1: PRect); external QtShareName name QtNamePrefix + 'QPushButton_setGeometry2';
procedure QPushButton_setToggleButton; external QtShareName name QtNamePrefix + 'QPushButton_setToggleButton';
function QPushButton_autoDefault; external QtShareName name QtNamePrefix + 'QPushButton_autoDefault';
procedure QPushButton_setAutoDefault; external QtShareName name QtNamePrefix + 'QPushButton_setAutoDefault';
function QPushButton_isDefault; external QtShareName name QtNamePrefix + 'QPushButton_isDefault';
procedure QPushButton_setDefault; external QtShareName name QtNamePrefix + 'QPushButton_setDefault';
procedure QPushButton_setIsMenuButton; external QtShareName name QtNamePrefix + 'QPushButton_setIsMenuButton';
function QPushButton_isMenuButton; external QtShareName name QtNamePrefix + 'QPushButton_isMenuButton';
procedure QPushButton_setPopup; external QtShareName name QtNamePrefix + 'QPushButton_setPopup';
function QPushButton_popup; external QtShareName name QtNamePrefix + 'QPushButton_popup';
procedure QPushButton_setIconSet; external QtShareName name QtNamePrefix + 'QPushButton_setIconSet';
function QPushButton_iconSet; external QtShareName name QtNamePrefix + 'QPushButton_iconSet';
procedure QPushButton_setFlat; external QtShareName name QtNamePrefix + 'QPushButton_setFlat';
function QPushButton_isFlat; external QtShareName name QtNamePrefix + 'QPushButton_isFlat';
procedure QPushButton_setOn; external QtShareName name QtNamePrefix + 'QPushButton_setOn';
procedure QPushButton_toggle; external QtShareName name QtNamePrefix + 'QPushButton_toggle';
procedure QRadioButton_destroy; external QtShareName name QtNamePrefix + 'QRadioButton_destroy';
function QRadioButton_create(parent: QWidgetH; name: PAnsiChar): QRadioButtonH; external QtShareName name QtNamePrefix + 'QRadioButton_create';
function QRadioButton_create(text: PWideString; parent: QWidgetH; name: PAnsiChar): QRadioButtonH; external QtShareName name QtNamePrefix + 'QRadioButton_create2';
function QRadioButton_isChecked; external QtShareName name QtNamePrefix + 'QRadioButton_isChecked';
procedure QRadioButton_setChecked; external QtShareName name QtNamePrefix + 'QRadioButton_setChecked';
procedure QRadioButton_sizeHint; external QtShareName name QtNamePrefix + 'QRadioButton_sizeHint';
procedure QRadioButton_sizePolicy; external QtShareName name QtNamePrefix + 'QRadioButton_sizePolicy';
procedure QScrollBar_destroy; external QtShareName name QtNamePrefix + 'QScrollBar_destroy';
function QScrollBar_create(parent: QWidgetH; name: PAnsiChar): QScrollBarH; external QtShareName name QtNamePrefix + 'QScrollBar_create';
function QScrollBar_create(p1: Orientation; parent: QWidgetH; name: PAnsiChar): QScrollBarH; external QtShareName name QtNamePrefix + 'QScrollBar_create2';
function QScrollBar_create(minValue: Integer; maxValue: Integer; LineStep: Integer; PageStep: Integer; value: Integer; p6: Orientation; parent: QWidgetH; name: PAnsiChar): QScrollBarH; external QtShareName name QtNamePrefix + 'QScrollBar_create3';
procedure QScrollBar_setOrientation; external QtShareName name QtNamePrefix + 'QScrollBar_setOrientation';
function QScrollBar_orientation; external QtShareName name QtNamePrefix + 'QScrollBar_orientation';
procedure QScrollBar_setTracking; external QtShareName name QtNamePrefix + 'QScrollBar_setTracking';
function QScrollBar_tracking; external QtShareName name QtNamePrefix + 'QScrollBar_tracking';
function QScrollBar_draggingSlider; external QtShareName name QtNamePrefix + 'QScrollBar_draggingSlider';
procedure QScrollBar_setPalette; external QtShareName name QtNamePrefix + 'QScrollBar_setPalette';
procedure QScrollBar_sizeHint; external QtShareName name QtNamePrefix + 'QScrollBar_sizeHint';
procedure QScrollBar_sizePolicy; external QtShareName name QtNamePrefix + 'QScrollBar_sizePolicy';
function QScrollBar_minValue; external QtShareName name QtNamePrefix + 'QScrollBar_minValue';
function QScrollBar_maxValue; external QtShareName name QtNamePrefix + 'QScrollBar_maxValue';
procedure QScrollBar_setMinValue; external QtShareName name QtNamePrefix + 'QScrollBar_setMinValue';
procedure QScrollBar_setMaxValue; external QtShareName name QtNamePrefix + 'QScrollBar_setMaxValue';
function QScrollBar_lineStep; external QtShareName name QtNamePrefix + 'QScrollBar_lineStep';
function QScrollBar_pageStep; external QtShareName name QtNamePrefix + 'QScrollBar_pageStep';
procedure QScrollBar_setLineStep; external QtShareName name QtNamePrefix + 'QScrollBar_setLineStep';
procedure QScrollBar_setPageStep; external QtShareName name QtNamePrefix + 'QScrollBar_setPageStep';
function QScrollBar_value; external QtShareName name QtNamePrefix + 'QScrollBar_value';
procedure QScrollBar_setValue; external QtShareName name QtNamePrefix + 'QScrollBar_setValue';
function QScrollBar_to_QRangeControl; external QtSharename name QtNamePrefix + 'QScrollBar_to_QRangeControl';
procedure QSizeGrip_destroy; external QtShareName name QtNamePrefix + 'QSizeGrip_destroy';
function QSizeGrip_create; external QtShareName name QtNamePrefix + 'QSizeGrip_create';
procedure QSizeGrip_sizeHint; external QtShareName name QtNamePrefix + 'QSizeGrip_sizeHint';
procedure QSizeGrip_sizePolicy; external QtShareName name QtNamePrefix + 'QSizeGrip_sizePolicy';
procedure QTableView_destroy; external QtShareName name QtNamePrefix + 'QTableView_destroy';
procedure QTableView_setBackgroundColor; external QtShareName name QtNamePrefix + 'QTableView_setBackgroundColor';
procedure QTableView_setPalette; external QtShareName name QtNamePrefix + 'QTableView_setPalette';
procedure QTableView_show; external QtShareName name QtNamePrefix + 'QTableView_show';
procedure QTableView_repaint(handle: QTableViewH; erase: Boolean); external QtShareName name QtNamePrefix + 'QTableView_repaint';
procedure QTableView_repaint(handle: QTableViewH; x: Integer; y: Integer; w: Integer; h: Integer; erase: Boolean); external QtShareName name QtNamePrefix + 'QTableView_repaint2';
procedure QTableView_repaint(handle: QTableViewH; p1: PRect; erase: Boolean); external QtShareName name QtNamePrefix + 'QTableView_repaint3';
procedure QTextBrowser_destroy; external QtShareName name QtNamePrefix + 'QTextBrowser_destroy';
function QTextBrowser_create; external QtShareName name QtNamePrefix + 'QTextBrowser_create';
procedure QTextBrowser_setSource; external QtShareName name QtNamePrefix + 'QTextBrowser_setSource';
procedure QTextBrowser_source; external QtShareName name QtNamePrefix + 'QTextBrowser_source';
procedure QTextBrowser_setText; external QtShareName name QtNamePrefix + 'QTextBrowser_setText';
procedure QTextBrowser_scrollToAnchor; external QtShareName name QtNamePrefix + 'QTextBrowser_scrollToAnchor';
procedure QTextBrowser_backward; external QtShareName name QtNamePrefix + 'QTextBrowser_backward';
procedure QTextBrowser_forward; external QtShareName name QtNamePrefix + 'QTextBrowser_forward';
procedure QTextBrowser_home; external QtShareName name QtNamePrefix + 'QTextBrowser_home';
procedure QTextView_destroy; external QtShareName name QtNamePrefix + 'QTextView_destroy';
function QTextView_create(parent: QWidgetH; name: PAnsiChar): QTextViewH; external QtShareName name QtNamePrefix + 'QTextView_create';
function QTextView_create(text: PWideString; context: PWideString; parent: QWidgetH; name: PAnsiChar): QTextViewH; external QtShareName name QtNamePrefix + 'QTextView_create2';
procedure QTextView_setText(handle: QTextViewH; text: PWideString; context: PWideString); external QtShareName name QtNamePrefix + 'QTextView_setText';
procedure QTextView_setText(handle: QTextViewH; text: PWideString); external QtShareName name QtNamePrefix + 'QTextView_setText2';
procedure QTextView_text; external QtShareName name QtNamePrefix + 'QTextView_text';
procedure QTextView_context; external QtShareName name QtNamePrefix + 'QTextView_context';
function QTextView_textFormat; external QtShareName name QtNamePrefix + 'QTextView_textFormat';
procedure QTextView_setTextFormat; external QtShareName name QtNamePrefix + 'QTextView_setTextFormat';
function QTextView_styleSheet; external QtShareName name QtNamePrefix + 'QTextView_styleSheet';
procedure QTextView_setStyleSheet; external QtShareName name QtNamePrefix + 'QTextView_setStyleSheet';
procedure QTextView_setPaper; external QtShareName name QtNamePrefix + 'QTextView_setPaper';
function QTextView_paper(handle: QTextViewH): QBrushH; external QtShareName name QtNamePrefix + 'QTextView_paper';
procedure QTextView_setPaperColorGroup; external QtShareName name QtNamePrefix + 'QTextView_setPaperColorGroup';
function QTextView_paperColorGroup; external QtShareName name QtNamePrefix + 'QTextView_paperColorGroup';
procedure QTextView_setLinkColor; external QtShareName name QtNamePrefix + 'QTextView_setLinkColor';
function QTextView_linkColor; external QtShareName name QtNamePrefix + 'QTextView_linkColor';
procedure QTextView_setLinkUnderline; external QtShareName name QtNamePrefix + 'QTextView_setLinkUnderline';
function QTextView_linkUnderline; external QtShareName name QtNamePrefix + 'QTextView_linkUnderline';
procedure QTextView_setMimeSourceFactory; external QtShareName name QtNamePrefix + 'QTextView_setMimeSourceFactory';
function QTextView_mimeSourceFactory; external QtShareName name QtNamePrefix + 'QTextView_mimeSourceFactory';
procedure QTextView_documentTitle; external QtShareName name QtNamePrefix + 'QTextView_documentTitle';
function QTextView_heightForWidth; external QtShareName name QtNamePrefix + 'QTextView_heightForWidth';
procedure QTextView_append; external QtShareName name QtNamePrefix + 'QTextView_append';
function QTextView_hasSelectedText; external QtShareName name QtNamePrefix + 'QTextView_hasSelectedText';
procedure QTextView_selectedText; external QtShareName name QtNamePrefix + 'QTextView_selectedText';
procedure QTextView_copy; external QtShareName name QtNamePrefix + 'QTextView_copy';
procedure QTextView_selectAll; external QtShareName name QtNamePrefix + 'QTextView_selectAll';
procedure QWhatsThis_destroy; external QtShareName name QtNamePrefix + 'QWhatsThis_destroy';
function QWhatsThis_create; external QtShareName name QtNamePrefix + 'QWhatsThis_create';
procedure QWhatsThis_text; external QtShareName name QtNamePrefix + 'QWhatsThis_text';
procedure QWhatsThis_add; external QtShareName name QtNamePrefix + 'QWhatsThis_add';
procedure QWhatsThis_remove; external QtShareName name QtNamePrefix + 'QWhatsThis_remove';
procedure QWhatsThis_textFor; external QtShareName name QtNamePrefix + 'QWhatsThis_textFor';
function QWhatsThis_whatsThisButton; external QtShareName name QtNamePrefix + 'QWhatsThis_whatsThisButton';
procedure QWhatsThis_enterWhatsThisMode; external QtShareName name QtNamePrefix + 'QWhatsThis_enterWhatsThisMode';
function QWhatsThis_inWhatsThisMode; external QtShareName name QtNamePrefix + 'QWhatsThis_inWhatsThisMode';
procedure QWhatsThis_leaveWhatsThisMode; external QtShareName name QtNamePrefix + 'QWhatsThis_leaveWhatsThisMode';
procedure QWindowsStyle_destroy; external QtShareName name QtNamePrefix + 'QWindowsStyle_destroy';
function QWindowsStyle_create; external QtShareName name QtNamePrefix + 'QWindowsStyle_create';
procedure QWindowsStyle_drawButton; external QtShareName name QtNamePrefix + 'QWindowsStyle_drawButton';
procedure QWindowsStyle_drawBevelButton; external QtShareName name QtNamePrefix + 'QWindowsStyle_drawBevelButton';
procedure QWindowsStyle_drawFocusRect; external QtShareName name QtNamePrefix + 'QWindowsStyle_drawFocusRect';
procedure QWindowsStyle_drawPushButton; external QtShareName name QtNamePrefix + 'QWindowsStyle_drawPushButton';
procedure QWindowsStyle_getButtonShift; external QtShareName name QtNamePrefix + 'QWindowsStyle_getButtonShift';
procedure QWindowsStyle_drawPanel; external QtShareName name QtNamePrefix + 'QWindowsStyle_drawPanel';
procedure QWindowsStyle_drawPopupPanel; external QtShareName name QtNamePrefix + 'QWindowsStyle_drawPopupPanel';
procedure QWindowsStyle_drawArrow; external QtShareName name QtNamePrefix + 'QWindowsStyle_drawArrow';
procedure QWindowsStyle_indicatorSize; external QtShareName name QtNamePrefix + 'QWindowsStyle_indicatorSize';
procedure QWindowsStyle_drawIndicator; external QtShareName name QtNamePrefix + 'QWindowsStyle_drawIndicator';
procedure QWindowsStyle_exclusiveIndicatorSize; external QtShareName name QtNamePrefix + 'QWindowsStyle_exclusiveIndicatorSize';
procedure QWindowsStyle_drawExclusiveIndicator; external QtShareName name QtNamePrefix + 'QWindowsStyle_drawExclusiveIndicator';
procedure QWindowsStyle_drawExclusiveIndicatorMask; external QtShareName name QtNamePrefix + 'QWindowsStyle_drawExclusiveIndicatorMask';
procedure QWindowsStyle_drawComboButton; external QtShareName name QtNamePrefix + 'QWindowsStyle_drawComboButton';
procedure QWindowsStyle_comboButtonRect; external QtShareName name QtNamePrefix + 'QWindowsStyle_comboButtonRect';
procedure QWindowsStyle_comboButtonFocusRect; external QtShareName name QtNamePrefix + 'QWindowsStyle_comboButtonFocusRect';
procedure QWindowsStyle_tabbarMetrics; external QtShareName name QtNamePrefix + 'QWindowsStyle_tabbarMetrics';
procedure QWindowsStyle_drawTab; external QtShareName name QtNamePrefix + 'QWindowsStyle_drawTab';
procedure QWindowsStyle_drawTabMask; external QtShareName name QtNamePrefix + 'QWindowsStyle_drawTabMask';
procedure QWindowsStyle_scrollBarMetrics; external QtShareName name QtNamePrefix + 'QWindowsStyle_scrollBarMetrics';
procedure QWindowsStyle_drawScrollBarControls; external QtShareName name QtNamePrefix + 'QWindowsStyle_drawScrollBarControls';
function QWindowsStyle_sliderLength; external QtShareName name QtNamePrefix + 'QWindowsStyle_sliderLength';
procedure QWindowsStyle_drawSlider; external QtShareName name QtNamePrefix + 'QWindowsStyle_drawSlider';
procedure QWindowsStyle_drawSliderMask; external QtShareName name QtNamePrefix + 'QWindowsStyle_drawSliderMask';
procedure QWindowsStyle_drawSliderGroove; external QtShareName name QtNamePrefix + 'QWindowsStyle_drawSliderGroove';
function QWindowsStyle_maximumSliderDragDistance; external QtShareName name QtNamePrefix + 'QWindowsStyle_maximumSliderDragDistance';
function QWindowsStyle_splitterWidth; external QtShareName name QtNamePrefix + 'QWindowsStyle_splitterWidth';
procedure QWindowsStyle_drawSplitter; external QtShareName name QtNamePrefix + 'QWindowsStyle_drawSplitter';
procedure QWindowsStyle_drawCheckMark; external QtShareName name QtNamePrefix + 'QWindowsStyle_drawCheckMark';
procedure QWindowsStyle_polishPopupMenu; external QtShareName name QtNamePrefix + 'QWindowsStyle_polishPopupMenu';
function QWindowsStyle_extraPopupMenuItemWidth; external QtShareName name QtNamePrefix + 'QWindowsStyle_extraPopupMenuItemWidth';
function QWindowsStyle_popupMenuItemHeight; external QtShareName name QtNamePrefix + 'QWindowsStyle_popupMenuItemHeight';
procedure QWindowsStyle_drawPopupMenuItem; external QtShareName name QtNamePrefix + 'QWindowsStyle_drawPopupMenuItem';
procedure QTimer_destroy; external QtShareName name QtNamePrefix + 'QTimer_destroy';
function QTimer_create; external QtShareName name QtNamePrefix + 'QTimer_create';
function QTimer_isActive; external QtShareName name QtNamePrefix + 'QTimer_isActive';
function QTimer_start; external QtShareName name QtNamePrefix + 'QTimer_start';
procedure QTimer_changeInterval; external QtShareName name QtNamePrefix + 'QTimer_changeInterval';
procedure QTimer_stop; external QtShareName name QtNamePrefix + 'QTimer_stop';
procedure QTimer_singleShot; external QtShareName name QtNamePrefix + 'QTimer_singleShot';
procedure QWorkspace_destroy; external QtShareName name QtNamePrefix + 'QWorkspace_destroy';
function QWorkspace_create; external QtShareName name QtNamePrefix + 'QWorkspace_create';
function QWorkspace_activeWindow; external QtShareName name QtNamePrefix + 'QWorkspace_activeWindow';
procedure QWorkspace_sizePolicy; external QtShareName name QtNamePrefix + 'QWorkspace_sizePolicy';
procedure QWorkspace_sizeHint; external QtShareName name QtNamePrefix + 'QWorkspace_sizeHint';
procedure QWorkspace_cascade; external QtShareName name QtNamePrefix + 'QWorkspace_cascade';
procedure QWorkspace_tile; external QtShareName name QtNamePrefix + 'QWorkspace_tile';
procedure QBitmap_destroy; external QtShareName name QtNamePrefix + 'QBitmap_destroy';
function QBitmap_create(): QBitmapH; external QtShareName name QtNamePrefix + 'QBitmap_create';
function QBitmap_create(w: Integer; h: Integer; clear: Boolean; p4: QPixmapOptimization): QBitmapH; external QtShareName name QtNamePrefix + 'QBitmap_create2';
function QBitmap_create(p1: PSize; clear: Boolean; p3: QPixmapOptimization): QBitmapH; external QtShareName name QtNamePrefix + 'QBitmap_create3';
function QBitmap_create(w: Integer; h: Integer; bits: PByte; isXbitmap: Boolean): QBitmapH; external QtShareName name QtNamePrefix + 'QBitmap_create4';
function QBitmap_create(p1: PSize; bits: PByte; isXbitmap: Boolean): QBitmapH; external QtShareName name QtNamePrefix + 'QBitmap_create5';
function QBitmap_create(p1: QBitmapH): QBitmapH; external QtShareName name QtNamePrefix + 'QBitmap_create6';
function QBitmap_create(fileName: PWideString; format: PAnsiChar): QBitmapH; external QtShareName name QtNamePrefix + 'QBitmap_create7';
procedure QBitmap_xForm; external QtShareName name QtNamePrefix + 'QBitmap_xForm';
function QCursor_create(): QCursorH; external QtShareName name QtNamePrefix + 'QCursor_create';
function QCursor_create(shape: Integer): QCursorH; external QtShareName name QtNamePrefix + 'QCursor_create2';
function QCursor_create(bitmap: QBitmapH; mask: QBitmapH; hotX: Integer; hotY: Integer): QCursorH; external QtShareName name QtNamePrefix + 'QCursor_create3';
function QCursor_create(pixmap: QPixmapH; hotX: Integer; hotY: Integer): QCursorH; external QtShareName name QtNamePrefix + 'QCursor_create4';
function QCursor_create(p1: QCursorH): QCursorH; external QtShareName name QtNamePrefix + 'QCursor_create5';
function QCursor_shape; external QtShareName name QtNamePrefix + 'QCursor_shape';
procedure QCursor_setShape; external QtShareName name QtNamePrefix + 'QCursor_setShape';
function QCursor_bitmap; external QtShareName name QtNamePrefix + 'QCursor_bitmap';
function QCursor_mask; external QtShareName name QtNamePrefix + 'QCursor_mask';
procedure QCursor_hotSpot; external QtShareName name QtNamePrefix + 'QCursor_hotSpot';
{$IFDEF MSWINDOWS}
function QCursor_handle(handle: QCursorH): HCURSOR; external QtShareName name QtNamePrefix + 'QCursor_handle';
{$ENDIF}
{$IFDEF LINUX}
function QCursor_handle(handle: QCursorH): HANDLE; external QtShareName name QtNamePrefix + 'QCursor_handle2';
{$ENDIF}
procedure QCursor_initialize; external QtShareName name QtNamePrefix + 'QCursor_initialize';
procedure QCursor_cleanup; external QtShareName name QtNamePrefix + 'QCursor_cleanup';
procedure QCursor_destroy; external QtShareName name QtNamePrefix + 'QCursor_destroy';
procedure QCursor_pos; external QtShareName name QtNamePrefix + 'QCursor_pos';
procedure QCursor_setPos(x: Integer; y: Integer); external QtShareName name QtNamePrefix + 'QCursor_setPos';
procedure QCursor_setPos(p1: PPoint); external QtShareName name QtNamePrefix + 'QCursor_setPos2';
procedure QFontDatabase_destroy; external QtShareName name QtNamePrefix + 'QFontDatabase_destroy';
function QFontDatabase_create; external QtShareName name QtNamePrefix + 'QFontDatabase_create';
procedure QFontDatabase_families; external QtShareName name QtNamePrefix + 'QFontDatabase_families';
procedure QFontDatabase_pointSizes; external QtShareName name QtNamePrefix + 'QFontDatabase_pointSizes';
procedure QFontDatabase_styles; external QtShareName name QtNamePrefix + 'QFontDatabase_styles';
procedure QFontDatabase_charSets(handle: QFontDatabaseH; retval: QStringListH; familyName: PWideString; onlyForLocale: Boolean); external QtShareName name QtNamePrefix + 'QFontDatabase_charSets';
procedure QFontDatabase_font; external QtShareName name QtNamePrefix + 'QFontDatabase_font';
function QFontDatabase_isBitmapScalable; external QtShareName name QtNamePrefix + 'QFontDatabase_isBitmapScalable';
function QFontDatabase_isSmoothlyScalable; external QtShareName name QtNamePrefix + 'QFontDatabase_isSmoothlyScalable';
function QFontDatabase_isScalable; external QtShareName name QtNamePrefix + 'QFontDatabase_isScalable';
procedure QFontDatabase_smoothSizes; external QtShareName name QtNamePrefix + 'QFontDatabase_smoothSizes';
procedure QFontDatabase_standardSizes; external QtShareName name QtNamePrefix + 'QFontDatabase_standardSizes';
function QFontDatabase_italic; external QtShareName name QtNamePrefix + 'QFontDatabase_italic';
function QFontDatabase_bold; external QtShareName name QtNamePrefix + 'QFontDatabase_bold';
function QFontDatabase_weight; external QtShareName name QtNamePrefix + 'QFontDatabase_weight';
procedure QFontDatabase_styleString; external QtShareName name QtNamePrefix + 'QFontDatabase_styleString';
procedure QFontDatabase_verboseCharSetName; external QtShareName name QtNamePrefix + 'QFontDatabase_verboseCharSetName';
procedure QFontDatabase_charSetSample; external QtShareName name QtNamePrefix + 'QFontDatabase_charSetSample';
procedure QFontInfo_destroy; external QtShareName name QtNamePrefix + 'QFontInfo_destroy';
function QFontInfo_create(p1: QFontH): QFontInfoH; external QtShareName name QtNamePrefix + 'QFontInfo_create';
function QFontInfo_create(p1: QFontInfoH): QFontInfoH; external QtShareName name QtNamePrefix + 'QFontInfo_create2';
procedure QFontInfo_family; external QtShareName name QtNamePrefix + 'QFontInfo_family';
function QFontInfo_pointSize; external QtShareName name QtNamePrefix + 'QFontInfo_pointSize';
function QFontInfo_italic; external QtShareName name QtNamePrefix + 'QFontInfo_italic';
function QFontInfo_weight; external QtShareName name QtNamePrefix + 'QFontInfo_weight';
function QFontInfo_bold; external QtShareName name QtNamePrefix + 'QFontInfo_bold';
function QFontInfo_underline; external QtShareName name QtNamePrefix + 'QFontInfo_underline';
function QFontInfo_strikeOut; external QtShareName name QtNamePrefix + 'QFontInfo_strikeOut';
function QFontInfo_fixedPitch; external QtShareName name QtNamePrefix + 'QFontInfo_fixedPitch';
function QFontInfo_styleHint; external QtShareName name QtNamePrefix + 'QFontInfo_styleHint';
function QFontInfo_charSet; external QtShareName name QtNamePrefix + 'QFontInfo_charSet';
function QFontInfo_rawMode; external QtShareName name QtNamePrefix + 'QFontInfo_rawMode';
function QFontInfo_exactMatch; external QtShareName name QtNamePrefix + 'QFontInfo_exactMatch';
procedure QFontMetrics_destroy; external QtShareName name QtNamePrefix + 'QFontMetrics_destroy';
function QFontMetrics_create(p1: QFontH): QFontMetricsH; external QtShareName name QtNamePrefix + 'QFontMetrics_create';
function QFontMetrics_create(p1: QFontMetricsH): QFontMetricsH; external QtShareName name QtNamePrefix + 'QFontMetrics_create2';
function QFontMetrics_ascent; external QtShareName name QtNamePrefix + 'QFontMetrics_ascent';
function QFontMetrics_descent; external QtShareName name QtNamePrefix + 'QFontMetrics_descent';
function QFontMetrics_height; external QtShareName name QtNamePrefix + 'QFontMetrics_height';
function QFontMetrics_leading; external QtShareName name QtNamePrefix + 'QFontMetrics_leading';
function QFontMetrics_lineSpacing; external QtShareName name QtNamePrefix + 'QFontMetrics_lineSpacing';
function QFontMetrics_minLeftBearing; external QtShareName name QtNamePrefix + 'QFontMetrics_minLeftBearing';
function QFontMetrics_minRightBearing; external QtShareName name QtNamePrefix + 'QFontMetrics_minRightBearing';
function QFontMetrics_maxWidth; external QtShareName name QtNamePrefix + 'QFontMetrics_maxWidth';
function QFontMetrics_inFont; external QtShareName name QtNamePrefix + 'QFontMetrics_inFont';
function QFontMetrics_leftBearing; external QtShareName name QtNamePrefix + 'QFontMetrics_leftBearing';
function QFontMetrics_rightBearing; external QtShareName name QtNamePrefix + 'QFontMetrics_rightBearing';
function QFontMetrics_width(handle: QFontMetricsH; p1: PWideString; len: Integer): Integer; external QtShareName name QtNamePrefix + 'QFontMetrics_width';
function QFontMetrics_width(handle: QFontMetricsH; p1: PWideChar): Integer; external QtShareName name QtNamePrefix + 'QFontMetrics_width2';
function QFontMetrics_width(handle: QFontMetricsH; c: char): Integer; external QtShareName name QtNamePrefix + 'QFontMetrics_width3';
procedure QFontMetrics_boundingRect(handle: QFontMetricsH; retval: PRect; p1: PWideString; len: Integer); external QtShareName name QtNamePrefix + 'QFontMetrics_boundingRect';
procedure QFontMetrics_boundingRect(handle: QFontMetricsH; retval: PRect; p1: PWideChar); external QtShareName name QtNamePrefix + 'QFontMetrics_boundingRect2';
procedure QFontMetrics_boundingRect(handle: QFontMetricsH; retval: PRect; x: Integer; y: Integer; w: Integer; h: Integer; flags: Integer; str: PWideString; len: Integer; tabstops: Integer; tabarray: PInteger; intern: PPAnsiChar); external QtShareName name QtNamePrefix + 'QFontMetrics_boundingRect3';
procedure QFontMetrics_size; external QtShareName name QtNamePrefix + 'QFontMetrics_size';
function QFontMetrics_underlinePos; external QtShareName name QtNamePrefix + 'QFontMetrics_underlinePos';
function QFontMetrics_strikeOutPos; external QtShareName name QtNamePrefix + 'QFontMetrics_strikeOutPos';
function QFontMetrics_lineWidth; external QtShareName name QtNamePrefix + 'QFontMetrics_lineWidth';
procedure QInputDialog_destroy; external QtShareName name QtNamePrefix + 'QInputDialog_destroy';
procedure QInputDialog_getText(retval: PWideString; caption: PWideString; _label: PWideString; text: PWideString; ok: PBoolean; parent: QWidgetH; name: PAnsiChar); external QtShareName name QtNamePrefix + 'QInputDialog_getText';
procedure QInputDialog_getText(retval: PWideString; caption: PWideString; _label: PWideString; echo: QLineEditEchoMode; text: PWideString; ok: PBoolean; parent: QWidgetH; name: PAnsiChar); external QtShareName name QtNamePrefix + 'QInputDialog_getText2';
function QInputDialog_getInteger; external QtShareName name QtNamePrefix + 'QInputDialog_getInteger';
function QInputDialog_getDouble; external QtShareName name QtNamePrefix + 'QInputDialog_getDouble';
procedure QInputDialog_getItem; external QtShareName name QtNamePrefix + 'QInputDialog_getItem';
procedure QIODevice_destroy; external QtShareName name QtNamePrefix + 'QIODevice_destroy';
function QIODevice_flags; external QtShareName name QtNamePrefix + 'QIODevice_flags';
function QIODevice_mode; external QtShareName name QtNamePrefix + 'QIODevice_mode';
function QIODevice_state; external QtShareName name QtNamePrefix + 'QIODevice_state';
function QIODevice_isDirectAccess; external QtShareName name QtNamePrefix + 'QIODevice_isDirectAccess';
function QIODevice_isSequentialAccess; external QtShareName name QtNamePrefix + 'QIODevice_isSequentialAccess';
function QIODevice_isCombinedAccess; external QtShareName name QtNamePrefix + 'QIODevice_isCombinedAccess';
function QIODevice_isBuffered; external QtShareName name QtNamePrefix + 'QIODevice_isBuffered';
function QIODevice_isRaw; external QtShareName name QtNamePrefix + 'QIODevice_isRaw';
function QIODevice_isSynchronous; external QtShareName name QtNamePrefix + 'QIODevice_isSynchronous';
function QIODevice_isAsynchronous; external QtShareName name QtNamePrefix + 'QIODevice_isAsynchronous';
function QIODevice_isTranslated; external QtShareName name QtNamePrefix + 'QIODevice_isTranslated';
function QIODevice_isReadable; external QtShareName name QtNamePrefix + 'QIODevice_isReadable';
function QIODevice_isWritable; external QtShareName name QtNamePrefix + 'QIODevice_isWritable';
function QIODevice_isReadWrite; external QtShareName name QtNamePrefix + 'QIODevice_isReadWrite';
function QIODevice_isInactive; external QtShareName name QtNamePrefix + 'QIODevice_isInactive';
function QIODevice_isOpen; external QtShareName name QtNamePrefix + 'QIODevice_isOpen';
function QIODevice_status; external QtShareName name QtNamePrefix + 'QIODevice_status';
procedure QIODevice_resetStatus; external QtShareName name QtNamePrefix + 'QIODevice_resetStatus';
function QIODevice_open; external QtShareName name QtNamePrefix + 'QIODevice_open';
procedure QIODevice_close; external QtShareName name QtNamePrefix + 'QIODevice_close';
procedure QIODevice_flush; external QtShareName name QtNamePrefix + 'QIODevice_flush';
function QIODevice_size; external QtShareName name QtNamePrefix + 'QIODevice_size';
function QIODevice_at(handle: QIODeviceH): Integer; external QtShareName name QtNamePrefix + 'QIODevice_at';
function QIODevice_at(handle: QIODeviceH; p1: Integer): Boolean; external QtShareName name QtNamePrefix + 'QIODevice_at2';
function QIODevice_atEnd; external QtShareName name QtNamePrefix + 'QIODevice_atEnd';
function QIODevice_reset; external QtShareName name QtNamePrefix + 'QIODevice_reset';
function QIODevice_readBlock; external QtShareName name QtNamePrefix + 'QIODevice_readBlock';
function QIODevice_writeBlock(handle: QIODeviceH; data: PAnsiChar; len: Cardinal): Integer; external QtShareName name QtNamePrefix + 'QIODevice_writeBlock';
function QIODevice_readLine; external QtShareName name QtNamePrefix + 'QIODevice_readLine';
function QIODevice_writeBlock(handle: QIODeviceH; data: QByteArrayH): Integer; external QtShareName name QtNamePrefix + 'QIODevice_writeBlock2';
procedure QIODevice_readAll; external QtShareName name QtNamePrefix + 'QIODevice_readAll';
function QIODevice_getch; external QtShareName name QtNamePrefix + 'QIODevice_getch';
function QIODevice_putch; external QtShareName name QtNamePrefix + 'QIODevice_putch';
function QIODevice_ungetch; external QtShareName name QtNamePrefix + 'QIODevice_ungetch';
procedure QMenuItem_destroy; external QtShareName name QtNamePrefix + 'QMenuItem_destroy';
function QMenuItem_create; external QtShareName name QtNamePrefix + 'QMenuItem_create';
function QMenuItem_id; external QtShareName name QtNamePrefix + 'QMenuItem_id';
function QMenuItem_iconSet; external QtShareName name QtNamePrefix + 'QMenuItem_iconSet';
procedure QMenuItem_text; external QtShareName name QtNamePrefix + 'QMenuItem_text';
procedure QMenuItem_whatsThis; external QtShareName name QtNamePrefix + 'QMenuItem_whatsThis';
function QMenuItem_pixmap; external QtShareName name QtNamePrefix + 'QMenuItem_pixmap';
function QMenuItem_popup; external QtShareName name QtNamePrefix + 'QMenuItem_popup';
function QMenuItem_widget; external QtShareName name QtNamePrefix + 'QMenuItem_widget';
function QMenuItem_custom; external QtShareName name QtNamePrefix + 'QMenuItem_custom';
function QMenuItem_key; external QtShareName name QtNamePrefix + 'QMenuItem_key';
function QMenuItem_signal; external QtShareName name QtNamePrefix + 'QMenuItem_signal';
function QMenuItem_isSeparator; external QtShareName name QtNamePrefix + 'QMenuItem_isSeparator';
function QMenuItem_isEnabled; external QtShareName name QtNamePrefix + 'QMenuItem_isEnabled';
function QMenuItem_isChecked; external QtShareName name QtNamePrefix + 'QMenuItem_isChecked';
function QMenuItem_isDirty; external QtShareName name QtNamePrefix + 'QMenuItem_isDirty';
procedure QMenuItem_setText; external QtShareName name QtNamePrefix + 'QMenuItem_setText';
procedure QMenuItem_setDirty; external QtShareName name QtNamePrefix + 'QMenuItem_setDirty';
procedure QMenuItem_setWhatsThis; external QtShareName name QtNamePrefix + 'QMenuItem_setWhatsThis';
procedure QCustomMenuItem_destroy; external QtShareName name QtNamePrefix + 'QCustomMenuItem_destroy';
function QCustomMenuItem_fullSpan; external QtShareName name QtNamePrefix + 'QCustomMenuItem_fullSpan';
function QCustomMenuItem_isSeparator; external QtShareName name QtNamePrefix + 'QCustomMenuItem_isSeparator';
procedure QCustomMenuItem_setFont; external QtShareName name QtNamePrefix + 'QCustomMenuItem_setFont';
procedure QCustomMenuItem_paint; external QtShareName name QtNamePrefix + 'QCustomMenuItem_paint';
procedure QCustomMenuItem_sizeHint; external QtShareName name QtNamePrefix + 'QCustomMenuItem_sizeHint';
procedure QMenuData_destroy; external QtShareName name QtNamePrefix + 'QMenuData_destroy';
function QMenuData_create; external QtShareName name QtNamePrefix + 'QMenuData_create';
function QMenuData_count; external QtShareName name QtNamePrefix + 'QMenuData_count';
function QMenuData_insertItem(handle: QMenuDataH; text: PWideString; receiver: QObjectH; member: PAnsiChar; accel: Integer; id: Integer; index: Integer): Integer; external QtShareName name QtNamePrefix + 'QMenuData_insertItem';
function QMenuData_insertItem(handle: QMenuDataH; icon: QIconSetH; text: PWideString; receiver: QObjectH; member: PAnsiChar; accel: Integer; id: Integer; index: Integer): Integer; external QtShareName name QtNamePrefix + 'QMenuData_insertItem2';
function QMenuData_insertItem(handle: QMenuDataH; pixmap: QPixmapH; receiver: QObjectH; member: PAnsiChar; accel: Integer; id: Integer; index: Integer): Integer; external QtShareName name QtNamePrefix + 'QMenuData_insertItem3';
function QMenuData_insertItem(handle: QMenuDataH; icon: QIconSetH; pixmap: QPixmapH; receiver: QObjectH; member: PAnsiChar; accel: Integer; id: Integer; index: Integer): Integer; external QtShareName name QtNamePrefix + 'QMenuData_insertItem4';
function QMenuData_insertItem(handle: QMenuDataH; text: PWideString; id: Integer; index: Integer): Integer; external QtShareName name QtNamePrefix + 'QMenuData_insertItem5';
function QMenuData_insertItem(handle: QMenuDataH; icon: QIconSetH; text: PWideString; id: Integer; index: Integer): Integer; external QtShareName name QtNamePrefix + 'QMenuData_insertItem6';
function QMenuData_insertItem(handle: QMenuDataH; text: PWideString; popup: QPopupMenuH; id: Integer; index: Integer): Integer; external QtShareName name QtNamePrefix + 'QMenuData_insertItem7';
function QMenuData_insertItem(handle: QMenuDataH; icon: QIconSetH; text: PWideString; popup: QPopupMenuH; id: Integer; index: Integer): Integer; external QtShareName name QtNamePrefix + 'QMenuData_insertItem8';
function QMenuData_insertItem(handle: QMenuDataH; pixmap: QPixmapH; id: Integer; index: Integer): Integer; external QtShareName name QtNamePrefix + 'QMenuData_insertItem9';
function QMenuData_insertItem(handle: QMenuDataH; icon: QIconSetH; pixmap: QPixmapH; id: Integer; index: Integer): Integer; external QtShareName name QtNamePrefix + 'QMenuData_insertItem10';
function QMenuData_insertItem(handle: QMenuDataH; pixmap: QPixmapH; popup: QPopupMenuH; id: Integer; index: Integer): Integer; external QtShareName name QtNamePrefix + 'QMenuData_insertItem11';
function QMenuData_insertItem(handle: QMenuDataH; icon: QIconSetH; pixmap: QPixmapH; popup: QPopupMenuH; id: Integer; index: Integer): Integer; external QtShareName name QtNamePrefix + 'QMenuData_insertItem12';
function QMenuData_insertItem(handle: QMenuDataH; widget: QWidgetH; id: Integer; index: Integer): Integer; external QtShareName name QtNamePrefix + 'QMenuData_insertItem13';
function QMenuData_insertItem(handle: QMenuDataH; icon: QIconSetH; custom: QCustomMenuItemH; id: Integer; index: Integer): Integer; external QtShareName name QtNamePrefix + 'QMenuData_insertItem14';
function QMenuData_insertItem(handle: QMenuDataH; custom: QCustomMenuItemH; id: Integer; index: Integer): Integer; external QtShareName name QtNamePrefix + 'QMenuData_insertItem15';
function QMenuData_insertSeparator; external QtShareName name QtNamePrefix + 'QMenuData_insertSeparator';
procedure QMenuData_removeItem; external QtShareName name QtNamePrefix + 'QMenuData_removeItem';
procedure QMenuData_removeItemAt; external QtShareName name QtNamePrefix + 'QMenuData_removeItemAt';
procedure QMenuData_clear; external QtShareName name QtNamePrefix + 'QMenuData_clear';
function QMenuData_accel; external QtShareName name QtNamePrefix + 'QMenuData_accel';
procedure QMenuData_setAccel; external QtShareName name QtNamePrefix + 'QMenuData_setAccel';
function QMenuData_iconSet; external QtShareName name QtNamePrefix + 'QMenuData_iconSet';
procedure QMenuData_text; external QtShareName name QtNamePrefix + 'QMenuData_text';
function QMenuData_pixmap; external QtShareName name QtNamePrefix + 'QMenuData_pixmap';
procedure QMenuData_setWhatsThis; external QtShareName name QtNamePrefix + 'QMenuData_setWhatsThis';
procedure QMenuData_whatsThis; external QtShareName name QtNamePrefix + 'QMenuData_whatsThis';
procedure QMenuData_changeItem(handle: QMenuDataH; id: Integer; text: PWideString); external QtShareName name QtNamePrefix + 'QMenuData_changeItem';
procedure QMenuData_changeItem(handle: QMenuDataH; id: Integer; pixmap: QPixmapH); external QtShareName name QtNamePrefix + 'QMenuData_changeItem2';
procedure QMenuData_changeItem(handle: QMenuDataH; id: Integer; icon: QIconSetH; text: PWideString); external QtShareName name QtNamePrefix + 'QMenuData_changeItem3';
procedure QMenuData_changeItem(handle: QMenuDataH; id: Integer; icon: QIconSetH; pixmap: QPixmapH); external QtShareName name QtNamePrefix + 'QMenuData_changeItem4';
procedure QMenuData_changeItem(handle: QMenuDataH; text: PWideString; id: Integer); external QtShareName name QtNamePrefix + 'QMenuData_changeItem5';
procedure QMenuData_changeItem(handle: QMenuDataH; pixmap: QPixmapH; id: Integer); external QtShareName name QtNamePrefix + 'QMenuData_changeItem6';
procedure QMenuData_changeItem(handle: QMenuDataH; icon: QIconSetH; text: PWideString; id: Integer); external QtShareName name QtNamePrefix + 'QMenuData_changeItem7';
function QMenuData_isItemEnabled; external QtShareName name QtNamePrefix + 'QMenuData_isItemEnabled';
procedure QMenuData_setItemEnabled; external QtShareName name QtNamePrefix + 'QMenuData_setItemEnabled';
function QMenuData_isItemChecked; external QtShareName name QtNamePrefix + 'QMenuData_isItemChecked';
procedure QMenuData_setItemChecked; external QtShareName name QtNamePrefix + 'QMenuData_setItemChecked';
procedure QMenuData_updateItem; external QtShareName name QtNamePrefix + 'QMenuData_updateItem';
function QMenuData_indexOf; external QtShareName name QtNamePrefix + 'QMenuData_indexOf';
function QMenuData_idAt; external QtShareName name QtNamePrefix + 'QMenuData_idAt';
procedure QMenuData_setId; external QtShareName name QtNamePrefix + 'QMenuData_setId';
function QMenuData_connectItem; external QtShareName name QtNamePrefix + 'QMenuData_connectItem';
function QMenuData_disconnectItem; external QtShareName name QtNamePrefix + 'QMenuData_disconnectItem';
function QMenuData_setItemParameter; external QtShareName name QtNamePrefix + 'QMenuData_setItemParameter';
function QMenuData_itemParameter; external QtShareName name QtNamePrefix + 'QMenuData_itemParameter';
function QMenuData_findItem(handle: QMenuDataH; id: Integer): QMenuItemH; external QtShareName name QtNamePrefix + 'QMenuData_findItem';
function QMenuData_findItem(handle: QMenuDataH; id: Integer; parent: QMenuDataHH): QMenuItemH; external QtShareName name QtNamePrefix + 'QMenuData_findItem2';
procedure QMenuData_activateItemAt; external QtShareName name QtNamePrefix + 'QMenuData_activateItemAt';
procedure QMimeSource_destroy; external QtShareName name QtNamePrefix + 'QMimeSource_destroy';
function QMimeSource_format; external QtShareName name QtNamePrefix + 'QMimeSource_format';
function QMimeSource_provides; external QtShareName name QtNamePrefix + 'QMimeSource_provides';
procedure QMimeSource_encodedData; external QtShareName name QtNamePrefix + 'QMimeSource_encodedData';
procedure QMimeSourceFactory_destroy; external QtShareName name QtNamePrefix + 'QMimeSourceFactory_destroy';
function QMimeSourceFactory_create; external QtShareName name QtNamePrefix + 'QMimeSourceFactory_create';
function QMimeSourceFactory_defaultFactory; external QtShareName name QtNamePrefix + 'QMimeSourceFactory_defaultFactory';
procedure QMimeSourceFactory_setDefaultFactory; external QtShareName name QtNamePrefix + 'QMimeSourceFactory_setDefaultFactory';
function QMimeSourceFactory_data(handle: QMimeSourceFactoryH; abs_name: PWideString): QMimeSourceH; external QtShareName name QtNamePrefix + 'QMimeSourceFactory_data';
procedure QMimeSourceFactory_makeAbsolute; external QtShareName name QtNamePrefix + 'QMimeSourceFactory_makeAbsolute';
function QMimeSourceFactory_data(handle: QMimeSourceFactoryH; abs_or_rel_name: PWideString; context: PWideString): QMimeSourceH; external QtShareName name QtNamePrefix + 'QMimeSourceFactory_data2';
procedure QMimeSourceFactory_setText; external QtShareName name QtNamePrefix + 'QMimeSourceFactory_setText';
procedure QMimeSourceFactory_setImage; external QtShareName name QtNamePrefix + 'QMimeSourceFactory_setImage';
procedure QMimeSourceFactory_setPixmap; external QtShareName name QtNamePrefix + 'QMimeSourceFactory_setPixmap';
procedure QMimeSourceFactory_setData; external QtShareName name QtNamePrefix + 'QMimeSourceFactory_setData';
procedure QMimeSourceFactory_setFilePath; external QtShareName name QtNamePrefix + 'QMimeSourceFactory_setFilePath';
procedure QMimeSourceFactory_filePath; external QtShareName name QtNamePrefix + 'QMimeSourceFactory_filePath';
procedure QMimeSourceFactory_addFilePath; external QtShareName name QtNamePrefix + 'QMimeSourceFactory_addFilePath';
procedure QMimeSourceFactory_setExtensionType; external QtShareName name QtNamePrefix + 'QMimeSourceFactory_setExtensionType';
{$IFDEF MSWINDOWS}
function QWindowsMime_registerMimeType; external QtShareName name QtNamePrefix + 'QWindowsMime_registerMimeType';
{$ENDIF}
procedure QPaintDeviceMetrics_destroy; external QtShareName name QtNamePrefix + 'QPaintDeviceMetrics_destroy';
function QPaintDeviceMetrics_create; external QtShareName name QtNamePrefix + 'QPaintDeviceMetrics_create';
function QPaintDeviceMetrics_width; external QtShareName name QtNamePrefix + 'QPaintDeviceMetrics_width';
function QPaintDeviceMetrics_height; external QtShareName name QtNamePrefix + 'QPaintDeviceMetrics_height';
function QPaintDeviceMetrics_widthMM; external QtShareName name QtNamePrefix + 'QPaintDeviceMetrics_widthMM';
function QPaintDeviceMetrics_heightMM; external QtShareName name QtNamePrefix + 'QPaintDeviceMetrics_heightMM';
function QPaintDeviceMetrics_logicalDpiX; external QtShareName name QtNamePrefix + 'QPaintDeviceMetrics_logicalDpiX';
function QPaintDeviceMetrics_logicalDpiY; external QtShareName name QtNamePrefix + 'QPaintDeviceMetrics_logicalDpiY';
function QPaintDeviceMetrics_numColors; external QtShareName name QtNamePrefix + 'QPaintDeviceMetrics_numColors';
function QPaintDeviceMetrics_depth; external QtShareName name QtNamePrefix + 'QPaintDeviceMetrics_depth';
procedure QPicture_destroy; external QtShareName name QtNamePrefix + 'QPicture_destroy';
function QPicture_create; external QtShareName name QtNamePrefix + 'QPicture_create';
function QPicture_isNull; external QtShareName name QtNamePrefix + 'QPicture_isNull';
function QPicture_size; external QtShareName name QtNamePrefix + 'QPicture_size';
function QPicture_data; external QtShareName name QtNamePrefix + 'QPicture_data';
procedure QPicture_setData; external QtShareName name QtNamePrefix + 'QPicture_setData';
function QPicture_play; external QtShareName name QtNamePrefix + 'QPicture_play';
function QPicture_load; external QtShareName name QtNamePrefix + 'QPicture_load';
function QPicture_save; external QtShareName name QtNamePrefix + 'QPicture_save';
procedure QPixmapCache_destroy; external QtShareName name QtNamePrefix + 'QPixmapCache_destroy';
function QPixmapCache_cacheLimit; external QtShareName name QtNamePrefix + 'QPixmapCache_cacheLimit';
procedure QPixmapCache_setCacheLimit; external QtShareName name QtNamePrefix + 'QPixmapCache_setCacheLimit';
function QPixmapCache_find(key: PWideString): QPixmapH; external QtShareName name QtNamePrefix + 'QPixmapCache_find';
function QPixmapCache_find(key: PWideString; p2: QPixmapH): Boolean; external QtShareName name QtNamePrefix + 'QPixmapCache_find2';
function QPixmapCache_insert(key: PWideString; p2: QPixmapH): Boolean; external QtShareName name QtNamePrefix + 'QPixmapCache_insert';
procedure QPixmapCache_clear; external QtShareName name QtNamePrefix + 'QPixmapCache_clear';
procedure QPoint_destroy; external QtShareName name QtNamePrefix + 'QPoint_destroy';
function QPoint_create(): QPointH; external QtShareName name QtNamePrefix + 'QPoint_create';
function QPoint_create(xpos: Integer; ypos: Integer): QPointH; external QtShareName name QtNamePrefix + 'QPoint_create2';
function QPoint_isNull; external QtShareName name QtNamePrefix + 'QPoint_isNull';
function QPoint_x; external QtShareName name QtNamePrefix + 'QPoint_x';
function QPoint_y; external QtShareName name QtNamePrefix + 'QPoint_y';
procedure QPoint_setX; external QtShareName name QtNamePrefix + 'QPoint_setX';
procedure QPoint_setY; external QtShareName name QtNamePrefix + 'QPoint_setY';
function QPoint_manhattanLength; external QtShareName name QtNamePrefix + 'QPoint_manhattanLength';
function QPoint_rx; external QtShareName name QtNamePrefix + 'QPoint_rx';
function QPoint_ry; external QtShareName name QtNamePrefix + 'QPoint_ry';
procedure QRangeControl_destroy; external QtShareName name QtNamePrefix + 'QRangeControl_destroy';
function QRangeControl_create(): QRangeControlH; external QtShareName name QtNamePrefix + 'QRangeControl_create';
function QRangeControl_create(minValue: Integer; maxValue: Integer; lineStep: Integer; pageStep: Integer; value: Integer): QRangeControlH; external QtShareName name QtNamePrefix + 'QRangeControl_create2';
function QRangeControl_value; external QtShareName name QtNamePrefix + 'QRangeControl_value';
procedure QRangeControl_setValue; external QtShareName name QtNamePrefix + 'QRangeControl_setValue';
procedure QRangeControl_addPage; external QtShareName name QtNamePrefix + 'QRangeControl_addPage';
procedure QRangeControl_subtractPage; external QtShareName name QtNamePrefix + 'QRangeControl_subtractPage';
procedure QRangeControl_addLine; external QtShareName name QtNamePrefix + 'QRangeControl_addLine';
procedure QRangeControl_subtractLine; external QtShareName name QtNamePrefix + 'QRangeControl_subtractLine';
function QRangeControl_minValue; external QtShareName name QtNamePrefix + 'QRangeControl_minValue';
function QRangeControl_maxValue; external QtShareName name QtNamePrefix + 'QRangeControl_maxValue';
procedure QRangeControl_setRange; external QtShareName name QtNamePrefix + 'QRangeControl_setRange';
function QRangeControl_lineStep; external QtShareName name QtNamePrefix + 'QRangeControl_lineStep';
function QRangeControl_pageStep; external QtShareName name QtNamePrefix + 'QRangeControl_pageStep';
procedure QRangeControl_setSteps; external QtShareName name QtNamePrefix + 'QRangeControl_setSteps';
function QRangeControl_bound; external QtShareName name QtNamePrefix + 'QRangeControl_bound';
procedure QRect_destroy; external QtShareName name QtNamePrefix + 'QRect_destroy';
function QRect_create(): QRectH; external QtShareName name QtNamePrefix + 'QRect_create';
function QRect_create(topleft: PPoint; bottomright: PPoint): QRectH; external QtShareName name QtNamePrefix + 'QRect_create2';
function QRect_create(topleft: PPoint; size: PSize): QRectH; external QtShareName name QtNamePrefix + 'QRect_create3';
function QRect_create(left: Integer; top: Integer; width: Integer; height: Integer): QRectH; external QtShareName name QtNamePrefix + 'QRect_create4';
function QRect_isNull; external QtShareName name QtNamePrefix + 'QRect_isNull';
function QRect_isEmpty; external QtShareName name QtNamePrefix + 'QRect_isEmpty';
function QRect_isValid; external QtShareName name QtNamePrefix + 'QRect_isValid';
procedure QRect_normalize; external QtShareName name QtNamePrefix + 'QRect_normalize';
function QRect_left; external QtShareName name QtNamePrefix + 'QRect_left';
function QRect_top; external QtShareName name QtNamePrefix + 'QRect_top';
function QRect_right; external QtShareName name QtNamePrefix + 'QRect_right';
function QRect_bottom; external QtShareName name QtNamePrefix + 'QRect_bottom';
function QRect_rLeft; external QtShareName name QtNamePrefix + 'QRect_rLeft';
function QRect_rTop; external QtShareName name QtNamePrefix + 'QRect_rTop';
function QRect_rRight; external QtShareName name QtNamePrefix + 'QRect_rRight';
function QRect_rBottom; external QtShareName name QtNamePrefix + 'QRect_rBottom';
function QRect_x; external QtShareName name QtNamePrefix + 'QRect_x';
function QRect_y; external QtShareName name QtNamePrefix + 'QRect_y';
procedure QRect_setLeft; external QtShareName name QtNamePrefix + 'QRect_setLeft';
procedure QRect_setTop; external QtShareName name QtNamePrefix + 'QRect_setTop';
procedure QRect_setRight; external QtShareName name QtNamePrefix + 'QRect_setRight';
procedure QRect_setBottom; external QtShareName name QtNamePrefix + 'QRect_setBottom';
procedure QRect_setX; external QtShareName name QtNamePrefix + 'QRect_setX';
procedure QRect_setY; external QtShareName name QtNamePrefix + 'QRect_setY';
procedure QRect_topLeft; external QtShareName name QtNamePrefix + 'QRect_topLeft';
procedure QRect_bottomRight; external QtShareName name QtNamePrefix + 'QRect_bottomRight';
procedure QRect_topRight; external QtShareName name QtNamePrefix + 'QRect_topRight';
procedure QRect_bottomLeft; external QtShareName name QtNamePrefix + 'QRect_bottomLeft';
procedure QRect_center; external QtShareName name QtNamePrefix + 'QRect_center';
procedure QRect_rect; external QtShareName name QtNamePrefix + 'QRect_rect';
procedure QRect_coords; external QtShareName name QtNamePrefix + 'QRect_coords';
procedure QRect_moveTopLeft; external QtShareName name QtNamePrefix + 'QRect_moveTopLeft';
procedure QRect_moveBottomRight; external QtShareName name QtNamePrefix + 'QRect_moveBottomRight';
procedure QRect_moveTopRight; external QtShareName name QtNamePrefix + 'QRect_moveTopRight';
procedure QRect_moveBottomLeft; external QtShareName name QtNamePrefix + 'QRect_moveBottomLeft';
procedure QRect_moveCenter; external QtShareName name QtNamePrefix + 'QRect_moveCenter';
procedure QRect_moveBy; external QtShareName name QtNamePrefix + 'QRect_moveBy';
procedure QRect_setRect; external QtShareName name QtNamePrefix + 'QRect_setRect';
procedure QRect_setCoords; external QtShareName name QtNamePrefix + 'QRect_setCoords';
procedure QRect_size; external QtShareName name QtNamePrefix + 'QRect_size';
function QRect_width; external QtShareName name QtNamePrefix + 'QRect_width';
function QRect_height; external QtShareName name QtNamePrefix + 'QRect_height';
procedure QRect_setWidth; external QtShareName name QtNamePrefix + 'QRect_setWidth';
procedure QRect_setHeight; external QtShareName name QtNamePrefix + 'QRect_setHeight';
procedure QRect_setSize; external QtShareName name QtNamePrefix + 'QRect_setSize';
function QRect_contains(handle: QRectH; p: PPoint; proper: Boolean): Boolean; external QtShareName name QtNamePrefix + 'QRect_contains';
function QRect_contains(handle: QRectH; x: Integer; y: Integer; proper: Boolean): Boolean; external QtShareName name QtNamePrefix + 'QRect_contains2';
function QRect_contains(handle: QRectH; r: PRect; proper: Boolean): Boolean; external QtShareName name QtNamePrefix + 'QRect_contains3';
procedure QRect_unite; external QtShareName name QtNamePrefix + 'QRect_unite';
procedure QRect_intersect; external QtShareName name QtNamePrefix + 'QRect_intersect';
function QRect_intersects; external QtShareName name QtNamePrefix + 'QRect_intersects';
procedure QRegExp_destroy; external QtShareName name QtNamePrefix + 'QRegExp_destroy';
function QRegExp_create(): QRegExpH; external QtShareName name QtNamePrefix + 'QRegExp_create';
function QRegExp_create(p1: PWideString; caseSensitive: Boolean; wildcard: Boolean): QRegExpH; external QtShareName name QtNamePrefix + 'QRegExp_create2';
function QRegExp_create(p1: QRegExpH): QRegExpH; external QtShareName name QtNamePrefix + 'QRegExp_create3';
function QRegExp_isEmpty; external QtShareName name QtNamePrefix + 'QRegExp_isEmpty';
function QRegExp_isValid; external QtShareName name QtNamePrefix + 'QRegExp_isValid';
function QRegExp_caseSensitive; external QtShareName name QtNamePrefix + 'QRegExp_caseSensitive';
procedure QRegExp_setCaseSensitive; external QtShareName name QtNamePrefix + 'QRegExp_setCaseSensitive';
function QRegExp_wildcard; external QtShareName name QtNamePrefix + 'QRegExp_wildcard';
procedure QRegExp_setWildcard; external QtShareName name QtNamePrefix + 'QRegExp_setWildcard';
procedure QRegExp_pattern; external QtShareName name QtNamePrefix + 'QRegExp_pattern';
procedure QRegExp_setPattern; external QtShareName name QtNamePrefix + 'QRegExp_setPattern';
function QRegExp_match; external QtShareName name QtNamePrefix + 'QRegExp_match';
function QRegExp_find; external QtShareName name QtNamePrefix + 'QRegExp_find';
procedure QSize_destroy; external QtShareName name QtNamePrefix + 'QSize_destroy';
function QSize_create(): QSizeH; external QtShareName name QtNamePrefix + 'QSize_create';
function QSize_create(w: Integer; h: Integer): QSizeH; external QtShareName name QtNamePrefix + 'QSize_create2';
function QSize_isNull; external QtShareName name QtNamePrefix + 'QSize_isNull';
function QSize_isEmpty; external QtShareName name QtNamePrefix + 'QSize_isEmpty';
function QSize_isValid; external QtShareName name QtNamePrefix + 'QSize_isValid';
function QSize_width; external QtShareName name QtNamePrefix + 'QSize_width';
function QSize_height; external QtShareName name QtNamePrefix + 'QSize_height';
procedure QSize_setWidth; external QtShareName name QtNamePrefix + 'QSize_setWidth';
procedure QSize_setHeight; external QtShareName name QtNamePrefix + 'QSize_setHeight';
procedure QSize_transpose; external QtShareName name QtNamePrefix + 'QSize_transpose';
procedure QSize_expandedTo; external QtShareName name QtNamePrefix + 'QSize_expandedTo';
procedure QSize_boundedTo; external QtShareName name QtNamePrefix + 'QSize_boundedTo';
function QSize_rwidth; external QtShareName name QtNamePrefix + 'QSize_rwidth';
function QSize_rheight; external QtShareName name QtNamePrefix + 'QSize_rheight';
procedure QStringList_destroy; external QtShareName name QtNamePrefix + 'QStringList_destroy';
function QStringList_create(): QStringListH; external QtShareName name QtNamePrefix + 'QStringList_create';
function QStringList_create(l: QStringListH): QStringListH; external QtShareName name QtNamePrefix + 'QStringList_create2';
function QStringList_create(i: PWideString): QStringListH; external QtShareName name QtNamePrefix + 'QStringList_create4';
function QStringList_create(i: PAnsiChar): QStringListH; external QtShareName name QtNamePrefix + 'QStringList_create5';
procedure QStringList_fromStrList; external QtShareName name QtNamePrefix + 'QStringList_fromStrList';
procedure QStringList_sort; external QtShareName name QtNamePrefix + 'QStringList_sort';
procedure QStringList_split(retval: QStringListH; sep: PWideString; str: PWideString; allowEmptyEntries: Boolean); external QtShareName name QtNamePrefix + 'QStringList_split';
procedure QStringList_split(retval: QStringListH; sep: PWideChar; str: PWideString; allowEmptyEntries: Boolean); external QtShareName name QtNamePrefix + 'QStringList_split2';
procedure QStringList_split(retval: QStringListH; sep: QRegExpH; str: PWideString; allowEmptyEntries: Boolean); external QtShareName name QtNamePrefix + 'QStringList_split3';
procedure QStringList_join; external QtShareName name QtNamePrefix + 'QStringList_join';
procedure QStringList_grep(handle: QStringListH; retval: QStringListH; str: PWideString; cs: Boolean); external QtShareName name QtNamePrefix + 'QStringList_grep';
procedure QStringList_grep(handle: QStringListH; retval: QStringListH; expr: QRegExpH); external QtShareName name QtNamePrefix + 'QStringList_grep2';
procedure QWMatrix_destroy; external QtShareName name QtNamePrefix + 'QWMatrix_destroy';
function QWMatrix_create(): QWMatrixH; external QtShareName name QtNamePrefix + 'QWMatrix_create';
function QWMatrix_create(m11: Double; m12: Double; m21: Double; m22: Double; dx: Double; dy: Double): QWMatrixH; external QtShareName name QtNamePrefix + 'QWMatrix_create2';
procedure QWMatrix_setMatrix; external QtShareName name QtNamePrefix + 'QWMatrix_setMatrix';
function QWMatrix_m11; external QtShareName name QtNamePrefix + 'QWMatrix_m11';
function QWMatrix_m12; external QtShareName name QtNamePrefix + 'QWMatrix_m12';
function QWMatrix_m21; external QtShareName name QtNamePrefix + 'QWMatrix_m21';
function QWMatrix_m22; external QtShareName name QtNamePrefix + 'QWMatrix_m22';
function QWMatrix_dx; external QtShareName name QtNamePrefix + 'QWMatrix_dx';
function QWMatrix_dy; external QtShareName name QtNamePrefix + 'QWMatrix_dy';
procedure QWMatrix_map(handle: QWMatrixH; x: Integer; y: Integer; tx: PInteger; ty: PInteger); external QtShareName name QtNamePrefix + 'QWMatrix_map';
procedure QWMatrix_map(handle: QWMatrixH; x: Double; y: Double; tx: PDouble; ty: PDouble); external QtShareName name QtNamePrefix + 'QWMatrix_map2';
procedure QWMatrix_map(handle: QWMatrixH; retval: PPoint; p1: PPoint); external QtShareName name QtNamePrefix + 'QWMatrix_map3';
procedure QWMatrix_map(handle: QWMatrixH; retval: PRect; p1: PRect); external QtShareName name QtNamePrefix + 'QWMatrix_map4';
procedure QWMatrix_map(handle: QWMatrixH; retval: PPointArray; p1: PPointArray); external QtShareName name QtNamePrefix + 'QWMatrix_map5';
procedure QWMatrix_reset; external QtShareName name QtNamePrefix + 'QWMatrix_reset';
function QWMatrix_translate; external QtShareName name QtNamePrefix + 'QWMatrix_translate';
function QWMatrix_scale; external QtShareName name QtNamePrefix + 'QWMatrix_scale';
function QWMatrix_shear; external QtShareName name QtNamePrefix + 'QWMatrix_shear';
function QWMatrix_rotate; external QtShareName name QtNamePrefix + 'QWMatrix_rotate';
procedure QWMatrix_invert; external QtShareName name QtNamePrefix + 'QWMatrix_invert';
procedure QMovie_hook_destroy; external QtShareName name QtNamePrefix + 'QMovie_hook_destroy';
function QMovie_hook_create; external QtShareName name QtNamePrefix + 'QMovie_hook_create';
procedure QMovie_hook_hook_status; external QtShareName name QtNamePrefix + 'QMovie_hook_hook_status';
procedure QMovie_hook_hook_resize; external QtShareName name QtNamePrefix + 'QMovie_hook_hook_resize';
procedure QMovie_hook_hook_update; external QtShareName name QtNamePrefix + 'QMovie_hook_hook_update';
procedure QMovie_hook_setMovie; external QtShareName name QtNamePrefix + 'QMovie_hook_setMovie';
procedure QClxObjectMap_destroy; external QtShareName name QtNamePrefix + 'QClxObjectMap_destroy';
procedure QClxObjectMap_setAddCallback; external QtShareName name QtNamePrefix + 'QClxObjectMap_setAddCallback';
procedure QClxObjectMap_setRemoveCallback; external QtShareName name QtNamePrefix + 'QClxObjectMap_setRemoveCallback';
procedure QClxObjectMap_add; external QtShareName name QtNamePrefix + 'QClxObjectMap_add';
procedure QClxObjectMap_remove; external QtShareName name QtNamePrefix + 'QClxObjectMap_remove';
function QClxObjectMap_find; external QtShareName name QtNamePrefix + 'QClxObjectMap_find';
function QClxObjectMap_findClxObject; external QtShareName name QtNamePrefix + 'QClxObjectMap_findClxObject';
procedure QClxIODevice_destroy; external QtShareName name QtNamePrefix + 'QClxIODevice_destroy';
function QClxIODevice_create; external QtShareName name QtNamePrefix + 'QClxIODevice_create';
procedure QClxIODevice_hook_progress; external QtShareName name QtNamePrefix + 'QClxIODevice_hook_progress';
procedure QClxLineEdit_destroy; external QtShareName name QtNamePrefix + 'QClxLineEdit_destroy';
function QClxLineEdit_create(parent: QWidgetH; name: PAnsiChar): QClxLineEditH; external QtShareName name QtNamePrefix + 'QClxLineEdit_create';
function QClxLineEdit_create(p1: PWideString; parent: QWidgetH; name: PAnsiChar): QClxLineEditH; external QtShareName name QtNamePrefix + 'QClxLineEdit_create2';
procedure QClxLineEdit_text; external QtShareName name QtNamePrefix + 'QClxLineEdit_text';
procedure QClxLineEdit_displayText; external QtShareName name QtNamePrefix + 'QClxLineEdit_displayText';
function QClxLineEdit_maxLength; external QtShareName name QtNamePrefix + 'QClxLineEdit_maxLength';
procedure QClxLineEdit_setMaxLength; external QtShareName name QtNamePrefix + 'QClxLineEdit_setMaxLength';
procedure QClxLineEdit_setFrame; external QtShareName name QtNamePrefix + 'QClxLineEdit_setFrame';
function QClxLineEdit_frame; external QtShareName name QtNamePrefix + 'QClxLineEdit_frame';
procedure QClxLineEdit_setEchoMode; external QtShareName name QtNamePrefix + 'QClxLineEdit_setEchoMode';
function QClxLineEdit_echoMode; external QtShareName name QtNamePrefix + 'QClxLineEdit_echoMode';
procedure QClxLineEdit_setReadOnly; external QtShareName name QtNamePrefix + 'QClxLineEdit_setReadOnly';
function QClxLineEdit_isReadOnly; external QtShareName name QtNamePrefix + 'QClxLineEdit_isReadOnly';
procedure QClxLineEdit_setValidator; external QtShareName name QtNamePrefix + 'QClxLineEdit_setValidator';
function QClxLineEdit_validator; external QtShareName name QtNamePrefix + 'QClxLineEdit_validator';
procedure QClxLineEdit_sizeHint; external QtShareName name QtNamePrefix + 'QClxLineEdit_sizeHint';
procedure QClxLineEdit_minimumSizeHint; external QtShareName name QtNamePrefix + 'QClxLineEdit_minimumSizeHint';
procedure QClxLineEdit_sizePolicy; external QtShareName name QtNamePrefix + 'QClxLineEdit_sizePolicy';
procedure QClxLineEdit_setEnabled; external QtShareName name QtNamePrefix + 'QClxLineEdit_setEnabled';
procedure QClxLineEdit_setFont; external QtShareName name QtNamePrefix + 'QClxLineEdit_setFont';
procedure QClxLineEdit_setPalette; external QtShareName name QtNamePrefix + 'QClxLineEdit_setPalette';
procedure QClxLineEdit_setSelection; external QtShareName name QtNamePrefix + 'QClxLineEdit_setSelection';
procedure QClxLineEdit_setCursorPosition; external QtShareName name QtNamePrefix + 'QClxLineEdit_setCursorPosition';
function QClxLineEdit_cursorPosition; external QtShareName name QtNamePrefix + 'QClxLineEdit_cursorPosition';
function QClxLineEdit_validateAndSet; external QtShareName name QtNamePrefix + 'QClxLineEdit_validateAndSet';
procedure QClxLineEdit_cut; external QtShareName name QtNamePrefix + 'QClxLineEdit_cut';
procedure QClxLineEdit_copy; external QtShareName name QtNamePrefix + 'QClxLineEdit_copy';
procedure QClxLineEdit_paste; external QtShareName name QtNamePrefix + 'QClxLineEdit_paste';
procedure QClxLineEdit_setAlignment; external QtShareName name QtNamePrefix + 'QClxLineEdit_setAlignment';
function QClxLineEdit_alignment; external QtShareName name QtNamePrefix + 'QClxLineEdit_alignment';
procedure QClxLineEdit_cursorLeft; external QtShareName name QtNamePrefix + 'QClxLineEdit_cursorLeft';
procedure QClxLineEdit_cursorRight; external QtShareName name QtNamePrefix + 'QClxLineEdit_cursorRight';
procedure QClxLineEdit_cursorWordForward; external QtShareName name QtNamePrefix + 'QClxLineEdit_cursorWordForward';
procedure QClxLineEdit_cursorWordBackward; external QtShareName name QtNamePrefix + 'QClxLineEdit_cursorWordBackward';
procedure QClxLineEdit_backspace; external QtShareName name QtNamePrefix + 'QClxLineEdit_backspace';
procedure QClxLineEdit_del; external QtShareName name QtNamePrefix + 'QClxLineEdit_del';
procedure QClxLineEdit_home; external QtShareName name QtNamePrefix + 'QClxLineEdit_home';
procedure QClxLineEdit_end; external QtShareName name QtNamePrefix + 'QClxLineEdit_end';
procedure QClxLineEdit_setEdited; external QtShareName name QtNamePrefix + 'QClxLineEdit_setEdited';
function QClxLineEdit_edited; external QtShareName name QtNamePrefix + 'QClxLineEdit_edited';
function QClxLineEdit_hasMarkedText; external QtShareName name QtNamePrefix + 'QClxLineEdit_hasMarkedText';
procedure QClxLineEdit_markedText; external QtShareName name QtNamePrefix + 'QClxLineEdit_markedText';
function QClxLineEdit_autoSelect; external QtShareName name QtNamePrefix + 'QClxLineEdit_autoSelect';
procedure QClxLineEdit_setAutoSelect; external QtShareName name QtNamePrefix + 'QClxLineEdit_setAutoSelect';
function QClxLineEdit_hideSelection; external QtShareName name QtNamePrefix + 'QClxLineEdit_hideSelection';
procedure QClxLineEdit_setHideSelection; external QtShareName name QtNamePrefix + 'QClxLineEdit_setHideSelection';
procedure QClxLineEdit_clearSelection; external QtShareName name QtNamePrefix + 'QClxLineEdit_clearSelection';
procedure QClxLineEdit_doSetSelection; external QtShareName name QtNamePrefix + 'QClxLineEdit_doSetSelection';
procedure QClxLineEdit_keyReleaseEvent; external QtShareName name QtNamePrefix + 'QClxLineEdit_keyReleaseEvent';
procedure QClxLineEdit_resetSelection; external QtShareName name QtNamePrefix + 'QClxLineEdit_resetSelection';
function QClxLineEdit_selStart; external QtShareName name QtNamePrefix + 'QClxLineEdit_selStart';
procedure QClxLineEdit_setSelStart; external QtShareName name QtNamePrefix + 'QClxLineEdit_setSelStart';
procedure QClxLineEdit_updateSelection; external QtShareName name QtNamePrefix + 'QClxLineEdit_updateSelection';
function QClxLineEdit_selLen; external QtShareName name QtNamePrefix + 'QClxLineEdit_selLen';
procedure QClxLineEdit_setMarkedText; external QtShareName name QtNamePrefix + 'QClxLineEdit_setMarkedText';
procedure QClxLineEdit_setText; external QtShareName name QtNamePrefix + 'QClxLineEdit_setText';
procedure QClxLineEdit_selectAll; external QtShareName name QtNamePrefix + 'QClxLineEdit_selectAll';
procedure QClxLineEdit_deselect; external QtShareName name QtNamePrefix + 'QClxLineEdit_deselect';
procedure QClxLineEdit_clearValidator; external QtShareName name QtNamePrefix + 'QClxLineEdit_clearValidator';
procedure QClxLineEdit_insert; external QtShareName name QtNamePrefix + 'QClxLineEdit_insert';
procedure QClxLineEdit_clear; external QtShareName name QtNamePrefix + 'QClxLineEdit_clear';
procedure QClxLineEdit_undo; external QtShareName name QtNamePrefix + 'QClxLineEdit_undo';
procedure QClxLineEdit_redo; external QtShareName name QtNamePrefix + 'QClxLineEdit_redo';
function QClxLineEdit_canUndo; external QtShareName name QtNamePrefix + 'QClxLineEdit_canUndo';
function QClxLineEdit_canRedo; external QtShareName name QtNamePrefix + 'QClxLineEdit_canRedo';
procedure QClxDrawUtil_destroy; external QtShareName name QtNamePrefix + 'QClxDrawUtil_destroy';
procedure QClxDrawUtil_ScrollEffect; external QtShareName name QtNamePrefix + 'QClxDrawUtil_ScrollEffect';
procedure QClxDrawUtil_FadeEffect; external QtShareName name QtNamePrefix + 'QClxDrawUtil_FadeEffect';
procedure QClxDrawUtil_DrawItem; external QtShareName name QtNamePrefix + 'QClxDrawUtil_DrawItem';
procedure QClxDrawUtil_DrawShadeLine(p: QPainterH; x1: Integer; y1: Integer; x2: Integer; y2: Integer; g: QColorGroupH; sunken: Boolean; lineWidth: Integer; midLineWidth: Integer); external QtShareName name QtNamePrefix + 'QClxDrawUtil_DrawShadeLine';
procedure QClxDrawUtil_DrawShadeLine(p: QPainterH; p1: PPoint; p2: PPoint; g: QColorGroupH; sunken: Boolean; lineWidth: Integer; midLineWidth: Integer); external QtShareName name QtNamePrefix + 'QClxDrawUtil_DrawShadeLine2';
procedure QClxDrawUtil_DrawShadeRect(p: QPainterH; x: Integer; y: Integer; w: Integer; h: Integer; g: QColorGroupH; sunken: Boolean; lineWidth: Integer; midLineWidth: Integer; fill: QBrushH); external QtShareName name QtNamePrefix + 'QClxDrawUtil_DrawShadeRect';
procedure QClxDrawUtil_DrawShadeRect(p: QPainterH; r: PRect; g: QColorGroupH; sunken: Boolean; lineWidth: Integer; midLineWidth: Integer; fill: QBrushH); external QtShareName name QtNamePrefix + 'QClxDrawUtil_DrawShadeRect2';
procedure QClxDrawUtil_DrawShadePanel(p: QPainterH; x: Integer; y: Integer; w: Integer; h: Integer; g: QColorGroupH; sunken: Boolean; lineWidth: Integer; fill: QBrushH); external QtShareName name QtNamePrefix + 'QClxDrawUtil_DrawShadePanel';
procedure QClxDrawUtil_DrawShadePanel(p: QPainterH; r: PRect; g: QColorGroupH; sunken: Boolean; lineWidth: Integer; fill: QBrushH); external QtShareName name QtNamePrefix + 'QClxDrawUtil_DrawShadePanel2';
procedure QClxDrawUtil_DrawWinButton(p: QPainterH; x: Integer; y: Integer; w: Integer; h: Integer; g: QColorGroupH; sunken: Boolean; fill: QBrushH); external QtShareName name QtNamePrefix + 'QClxDrawUtil_DrawWinButton';
procedure QClxDrawUtil_DrawWinButton(p: QPainterH; r: PRect; g: QColorGroupH; sunken: Boolean; fill: QBrushH); external QtShareName name QtNamePrefix + 'QClxDrawUtil_DrawWinButton2';
procedure QClxDrawUtil_DrawWinPanel(p: QPainterH; x: Integer; y: Integer; w: Integer; h: Integer; g: QColorGroupH; sunken: Boolean; fill: QBrushH); external QtShareName name QtNamePrefix + 'QClxDrawUtil_DrawWinPanel';
procedure QClxDrawUtil_DrawWinPanel(p: QPainterH; r: PRect; g: QColorGroupH; sunken: Boolean; fill: QBrushH); external QtShareName name QtNamePrefix + 'QClxDrawUtil_DrawWinPanel2';
procedure QClxDrawUtil_DrawPlainRect(p: QPainterH; x: Integer; y: Integer; w: Integer; h: Integer; c: QColorH; lineWidth: Integer; fill: QBrushH); external QtShareName name QtNamePrefix + 'QClxDrawUtil_DrawPlainRect';
procedure QClxDrawUtil_DrawPlainRect(p: QPainterH; r: PRect; c: QColorH; lineWidth: Integer; fill: QBrushH); external QtShareName name QtNamePrefix + 'QClxDrawUtil_DrawPlainRect2';
procedure QOpenWidget_destroy; external QtShareName name QtNamePrefix + 'QOpenWidget_destroy';
function QOpenWidget_event; external QtShareName name QtNamePrefix + 'QOpenWidget_event';
procedure QOpenWidget_mousePressEvent; external QtShareName name QtNamePrefix + 'QOpenWidget_mousePressEvent';
procedure QOpenWidget_mouseReleaseEvent; external QtShareName name QtNamePrefix + 'QOpenWidget_mouseReleaseEvent';
procedure QOpenWidget_mouseDoubleClickEvent; external QtShareName name QtNamePrefix + 'QOpenWidget_mouseDoubleClickEvent';
procedure QOpenWidget_mouseMoveEvent; external QtShareName name QtNamePrefix + 'QOpenWidget_mouseMoveEvent';
procedure QOpenWidget_wheelEvent; external QtShareName name QtNamePrefix + 'QOpenWidget_wheelEvent';
procedure QOpenWidget_keyPressEvent; external QtShareName name QtNamePrefix + 'QOpenWidget_keyPressEvent';
procedure QOpenWidget_keyReleaseEvent; external QtShareName name QtNamePrefix + 'QOpenWidget_keyReleaseEvent';
procedure QOpenWidget_focusInEvent; external QtShareName name QtNamePrefix + 'QOpenWidget_focusInEvent';
procedure QOpenWidget_focusOutEvent; external QtShareName name QtNamePrefix + 'QOpenWidget_focusOutEvent';
procedure QOpenWidget_enterEvent; external QtShareName name QtNamePrefix + 'QOpenWidget_enterEvent';
procedure QOpenWidget_leaveEvent; external QtShareName name QtNamePrefix + 'QOpenWidget_leaveEvent';
procedure QOpenWidget_paintEvent; external QtShareName name QtNamePrefix + 'QOpenWidget_paintEvent';
procedure QOpenWidget_moveEvent; external QtShareName name QtNamePrefix + 'QOpenWidget_moveEvent';
procedure QOpenWidget_resizeEvent; external QtShareName name QtNamePrefix + 'QOpenWidget_resizeEvent';
procedure QOpenWidget_closeEvent; external QtShareName name QtNamePrefix + 'QOpenWidget_closeEvent';
procedure QOpenWidget_dragEnterEvent; external QtShareName name QtNamePrefix + 'QOpenWidget_dragEnterEvent';
procedure QOpenWidget_dragMoveEvent; external QtShareName name QtNamePrefix + 'QOpenWidget_dragMoveEvent';
procedure QOpenWidget_dragLeaveEvent; external QtShareName name QtNamePrefix + 'QOpenWidget_dragLeaveEvent';
procedure QOpenWidget_dropEvent; external QtShareName name QtNamePrefix + 'QOpenWidget_dropEvent';
procedure QOpenWidget_showEvent; external QtShareName name QtNamePrefix + 'QOpenWidget_showEvent';
procedure QOpenWidget_hideEvent; external QtShareName name QtNamePrefix + 'QOpenWidget_hideEvent';
procedure QOpenWidget_customEvent; external QtShareName name QtNamePrefix + 'QOpenWidget_customEvent';
function QOpenWidget_getWState; external QtShareName name QtNamePrefix + 'QOpenWidget_getWState';
procedure QOpenWidget_setWState; external QtShareName name QtNamePrefix + 'QOpenWidget_setWState';
procedure QOpenWidget_clearWState; external QtShareName name QtNamePrefix + 'QOpenWidget_clearWState';
function QOpenWidget_getWFlags; external QtShareName name QtNamePrefix + 'QOpenWidget_getWFlags';
procedure QOpenWidget_setWFlags; external QtShareName name QtNamePrefix + 'QOpenWidget_setWFlags';
procedure QOpenWidget_clearWFlags; external QtShareName name QtNamePrefix + 'QOpenWidget_clearWFlags';
function QOpenWidget_focusNextPrevChild; external QtShareName name QtNamePrefix + 'QOpenWidget_focusNextPrevChild';
procedure QOpenWidget_updateMask; external QtShareName name QtNamePrefix + 'QOpenWidget_updateMask';
procedure QOpenStringList_destroy; external QtShareName name QtNamePrefix + 'QOpenStringList_destroy';
function QOpenStringList_count; external QtShareName name QtNamePrefix + 'QOpenStringList_count';
procedure QOpenStringList_value; external QtShareName name QtNamePrefix + 'QOpenStringList_value';
procedure QOpenStringList_append; external QtShareName name QtNamePrefix + 'QOpenStringList_append';
procedure QClxListBoxHooks_destroy; external QtShareName name QtNamePrefix + 'QClxListBoxHooks_destroy';
function QClxListBoxHooks_create; external QtShareName name QtNamePrefix + 'QClxListBoxHooks_create';
procedure QClxListBoxHooks_hook_paint; external QtShareName name QtNamePrefix + 'QClxListBoxHooks_hook_paint';
procedure QClxListBoxHooks_hook_measure; external QtShareName name QtNamePrefix + 'QClxListBoxHooks_hook_measure';
procedure QClxListBoxItem_destroy; external QtShareName name QtNamePrefix + 'QClxListBoxItem_destroy';
function QClxListBoxItem_create; external QtShareName name QtNamePrefix + 'QClxListBoxItem_create';
function QClxListBoxItem_width; external QtShareName name QtNamePrefix + 'QClxListBoxItem_width';
function QClxListBoxItem_height; external QtShareName name QtNamePrefix + 'QClxListBoxItem_height';
function QClxListBoxItem_getData; external QtShareName name QtNamePrefix + 'QClxListBoxItem_getData';
procedure QClxListBoxItem_setData; external QtShareName name QtNamePrefix + 'QClxListBoxItem_setData';
procedure QClxListBoxItem_setCustomHighlighting; external QtShareName name QtNamePrefix + 'QClxListBoxItem_setCustomHighlighting';
procedure QClxListViewHooks_destroy; external QtShareName name QtNamePrefix + 'QClxListViewHooks_destroy';
function QClxListViewHooks_create; external QtShareName name QtNamePrefix + 'QClxListViewHooks_create';
procedure QClxListViewHooks_hook_PaintCell; external QtShareName name QtNamePrefix + 'QClxListViewHooks_hook_PaintCell';
procedure QClxListViewHooks_hook_PaintBranches; external QtShareName name QtNamePrefix + 'QClxListViewHooks_hook_PaintBranches';
procedure QClxListViewHooks_hook_setSelected; external QtShareName name QtNamePrefix + 'QClxListViewHooks_hook_setSelected';
procedure QClxListViewHooks_hook_change; external QtShareName name QtNamePrefix + 'QClxListViewHooks_hook_change';
procedure QClxListViewHooks_hook_changing; external QtShareName name QtNamePrefix + 'QClxListViewHooks_hook_changing';
procedure QClxListViewHooks_hook_expanding; external QtShareName name QtNamePrefix + 'QClxListViewHooks_hook_expanding';
procedure QClxListViewHooks_hook_expanded; external QtShareName name QtNamePrefix + 'QClxListViewHooks_hook_expanded';
procedure QClxListViewHooks_hook_checked; external QtShareName name QtNamePrefix + 'QClxListViewHooks_hook_checked';
procedure QClxListViewHooks_hook_destroyed; external QtShareName name QtNamePrefix + 'QClxListViewHooks_hook_destroyed';
procedure QClxListViewItem_destroy; external QtShareName name QtNamePrefix + 'QClxListViewItem_destroy';
procedure QClxListViewItem_paintCell; external QtShareName name QtNamePrefix + 'QClxListViewItem_paintCell';
procedure QClxListViewItem_paintBranches; external QtShareName name QtNamePrefix + 'QClxListViewItem_paintBranches';
function QClxListViewItem_create(parent: QListViewH; owner: Pointer; after: QListViewItemH; h: QClxListViewHooksH): QClxListViewItemH; external QtShareName name QtNamePrefix + 'QClxListViewItem_create';
function QClxListViewItem_create(parent: QListViewItemH; owner: Pointer; after: QListViewItemH; h: QClxListViewHooksH): QClxListViewItemH; external QtShareName name QtNamePrefix + 'QClxListViewItem_create2';
function QClxListViewItem_ClxRef; external QtShareName name QtNamePrefix + 'QClxListViewItem_ClxRef';
procedure QClxCheckListItem_destroy; external QtShareName name QtNamePrefix + 'QClxCheckListItem_destroy';
function QClxCheckListItem_create(parent: QListViewH; text: PWideString; t: QCheckListItemType; h: QClxListViewHooksH): QClxCheckListItemH; external QtShareName name QtNamePrefix + 'QClxCheckListItem_create';
function QClxCheckListItem_create(parent: QListViewItemH; text: PWideString; t: QCheckListItemType; h: QClxListViewHooksH): QClxCheckListItemH; external QtShareName name QtNamePrefix + 'QClxCheckListItem_create2';
procedure QClxIconViewHooks_destroy; external QtShareName name QtNamePrefix + 'QClxIconViewHooks_destroy';
function QClxIconViewHooks_create; external QtShareName name QtNamePrefix + 'QClxIconViewHooks_create';
procedure QClxIconViewHooks_hook_PaintItem; external QtShareName name QtNamePrefix + 'QClxIconViewHooks_hook_PaintItem';
procedure QClxIconViewHooks_hook_PaintFocus; external QtShareName name QtNamePrefix + 'QClxIconViewHooks_hook_PaintFocus';
procedure QClxIconViewHooks_hook_setSelected; external QtShareName name QtNamePrefix + 'QClxIconViewHooks_hook_setSelected';
procedure QClxIconViewHooks_hook_change; external QtShareName name QtNamePrefix + 'QClxIconViewHooks_hook_change';
procedure QClxIconViewHooks_hook_changing; external QtShareName name QtNamePrefix + 'QClxIconViewHooks_hook_changing';
procedure QClxIconViewHooks_hook_destroyed; external QtShareName name QtNamePrefix + 'QClxIconViewHooks_hook_destroyed';
procedure QClxIconViewItem_destroy; external QtShareName name QtNamePrefix + 'QClxIconViewItem_destroy';
function QClxIconViewItem_ClxRef; external QtShareName name QtNamePrefix + 'QClxIconViewItem_ClxRef';
procedure QClxIconViewItem_paintItem; external QtShareName name QtNamePrefix + 'QClxIconViewItem_paintItem';
function QClxIconViewItem_create(parent: QIconViewH; owner: Pointer; h: QClxIconViewHooksH): QClxIconViewItemH; external QtShareName name QtNamePrefix + 'QClxIconViewItem_create';
function QClxIconViewItem_create(parent: QIconViewH; owner: Pointer; after: QIconViewItemH; h: QClxIconViewHooksH): QClxIconViewItemH; external QtShareName name QtNamePrefix + 'QClxIconViewItem_create2';
procedure QClxDragObject_destroy; external QtShareName name QtNamePrefix + 'QClxDragObject_destroy';
function QClxDragObject_create; external QtShareName name QtNamePrefix + 'QClxDragObject_create';
function QClxDragObject_format; external QtShareName name QtNamePrefix + 'QClxDragObject_format';
procedure QClxDragObject_encodedData; external QtShareName name QtNamePrefix + 'QClxDragObject_encodedData';
function QClxDragObject_provides; external QtShareName name QtNamePrefix + 'QClxDragObject_provides';
procedure QClxDragObject_addFormat; external QtShareName name QtNamePrefix + 'QClxDragObject_addFormat';
procedure QOpenComboBox_destroy; external QtShareName name QtNamePrefix + 'QOpenComboBox_destroy';
function QOpenComboBox_create(parent: QWidgetH; name: PAnsiChar): QOpenComboBoxH; external QtShareName name QtNamePrefix + 'QOpenComboBox_create';
function QOpenComboBox_create(rw: Boolean; parent: QWidgetH; name: PAnsiChar): QOpenComboBoxH; external QtShareName name QtNamePrefix + 'QOpenComboBox_create2';
procedure QOpenComboBox_popup; external QtShareName name QtNamePrefix + 'QOpenComboBox_popup';
procedure QClxBitBtn_destroy; external QtShareName name QtNamePrefix + 'QClxBitBtn_destroy';
function QClxBitBtn_create; external QtShareName name QtNamePrefix + 'QClxBitBtn_create';
procedure QClxMimeSource_destroy; external QtShareName name QtNamePrefix + 'QClxMimeSource_destroy';
function QClxMimeSource_create(): QClxMimeSourceH; external QtShareName name QtNamePrefix + 'QClxMimeSource_create';
function QClxMimeSource_create(source: QMimeSourceH): QClxMimeSourceH; external QtShareName name QtNamePrefix + 'QClxMimeSource_create2';
function QClxMimeSource_format; external QtShareName name QtNamePrefix + 'QClxMimeSource_format';
procedure QClxMimeSource_encodedData; external QtShareName name QtNamePrefix + 'QClxMimeSource_encodedData';
function QClxMimeSource_provides; external QtShareName name QtNamePrefix + 'QClxMimeSource_provides';
procedure QClxMimeSource_addFormat; external QtShareName name QtNamePrefix + 'QClxMimeSource_addFormat';
procedure QClxMimeSourceFactory_destroy; external QtShareName name QtNamePrefix + 'QClxMimeSourceFactory_destroy';
function QClxMimeSourceFactory_create; external QtShareName name QtNamePrefix + 'QClxMimeSourceFactory_create';
procedure QClxMimeSourceFactory_setDataCallBack; external QtShareName name QtNamePrefix + 'QClxMimeSourceFactory_setDataCallBack';
function QClxMimeSourceFactory_data; external QtShareName name QtNamePrefix + 'QClxMimeSourceFactory_data';
procedure QClxSlider_destroy; external QtShareName name QtNamePrefix + 'QClxSlider_destroy';
function QClxSlider_create; external QtShareName name QtNamePrefix + 'QClxSlider_create';
procedure QClxSlider_drawTicks; external QtShareName name QtNamePrefix + 'QClxSlider_drawTicks';
procedure QClxStyleHooks_destroy; external QtShareName name QtNamePrefix + 'QClxStyleHooks_destroy';
function QClxStyleHooks_create; external QtShareName name QtNamePrefix + 'QClxStyleHooks_create';
procedure QClxStyleHooks_hook_polish; external QtShareName name QtNamePrefix + 'QClxStyleHooks_hook_polish';
procedure QClxStyleHooks_hook_unPolish; external QtShareName name QtNamePrefix + 'QClxStyleHooks_hook_unPolish';
procedure QClxStyleHooks_hook_polish2; external QtShareName name QtNamePrefix + 'QClxStyleHooks_hook_polish2';
procedure QClxStyleHooks_hook_unPolish2; external QtShareName name QtNamePrefix + 'QClxStyleHooks_hook_unPolish2';
procedure QClxStyleHooks_hook_polish3; external QtShareName name QtNamePrefix + 'QClxStyleHooks_hook_polish3';
procedure QClxStyleHooks_hook_itemRect; external QtShareName name QtNamePrefix + 'QClxStyleHooks_hook_itemRect';
procedure QClxStyleHooks_hook_drawItem; external QtShareName name QtNamePrefix + 'QClxStyleHooks_hook_drawItem';
procedure QClxStyleHooks_hook_drawSeparator; external QtShareName name QtNamePrefix + 'QClxStyleHooks_hook_drawSeparator';
procedure QClxStyleHooks_hook_drawRect; external QtShareName name QtNamePrefix + 'QClxStyleHooks_hook_drawRect';
procedure QClxStyleHooks_hook_drawRectStrong; external QtShareName name QtNamePrefix + 'QClxStyleHooks_hook_drawRectStrong';
procedure QClxStyleHooks_hook_drawButton; external QtShareName name QtNamePrefix + 'QClxStyleHooks_hook_drawButton';
procedure QClxStyleHooks_hook_buttonRect; external QtShareName name QtNamePrefix + 'QClxStyleHooks_hook_buttonRect';
procedure QClxStyleHooks_hook_drawButtonMask; external QtShareName name QtNamePrefix + 'QClxStyleHooks_hook_drawButtonMask';
procedure QClxStyleHooks_hook_drawBevelButton; external QtShareName name QtNamePrefix + 'QClxStyleHooks_hook_drawBevelButton';
procedure QClxStyleHooks_hook_bevelButtonRect; external QtShareName name QtNamePrefix + 'QClxStyleHooks_hook_bevelButtonRect';
procedure QClxStyleHooks_hook_drawToolButton; external QtShareName name QtNamePrefix + 'QClxStyleHooks_hook_drawToolButton';
procedure QClxStyleHooks_hook_drawToolButton2; external QtShareName name QtNamePrefix + 'QClxStyleHooks_hook_drawToolButton2';
procedure QClxStyleHooks_hook_toolButtonRect; external QtShareName name QtNamePrefix + 'QClxStyleHooks_hook_toolButtonRect';
procedure QClxStyleHooks_hook_drawPanel; external QtShareName name QtNamePrefix + 'QClxStyleHooks_hook_drawPanel';
procedure QClxStyleHooks_hook_drawPopupPanel; external QtShareName name QtNamePrefix + 'QClxStyleHooks_hook_drawPopupPanel';
procedure QClxStyleHooks_hook_drawArrow; external QtShareName name QtNamePrefix + 'QClxStyleHooks_hook_drawArrow';
procedure QClxStyleHooks_hook_drawExclusiveIndicator; external QtShareName name QtNamePrefix + 'QClxStyleHooks_hook_drawExclusiveIndicator';
procedure QClxStyleHooks_hook_drawExclusiveIndicatorMask; external QtShareName name QtNamePrefix + 'QClxStyleHooks_hook_drawExclusiveIndicatorMask';
procedure QClxStyleHooks_hook_drawIndicatorMask; external QtShareName name QtNamePrefix + 'QClxStyleHooks_hook_drawIndicatorMask';
procedure QClxStyleHooks_hook_drawIndicator; external QtShareName name QtNamePrefix + 'QClxStyleHooks_hook_drawIndicator';
procedure QClxStyleHooks_hook_drawFocusRect; external QtShareName name QtNamePrefix + 'QClxStyleHooks_hook_drawFocusRect';
procedure QClxStyleHooks_hook_drawComboButton; external QtShareName name QtNamePrefix + 'QClxStyleHooks_hook_drawComboButton';
procedure QClxStyleHooks_hook_comboButtonRect; external QtShareName name QtNamePrefix + 'QClxStyleHooks_hook_comboButtonRect';
procedure QClxStyleHooks_hook_comboButtonFocusRect; external QtShareName name QtNamePrefix + 'QClxStyleHooks_hook_comboButtonFocusRect';
procedure QClxStyleHooks_hook_drawComboButtonMask; external QtShareName name QtNamePrefix + 'QClxStyleHooks_hook_drawComboButtonMask';
procedure QClxStyleHooks_hook_drawPushButton; external QtShareName name QtNamePrefix + 'QClxStyleHooks_hook_drawPushButton';
procedure QClxStyleHooks_hook_drawPushButtonLabel; external QtShareName name QtNamePrefix + 'QClxStyleHooks_hook_drawPushButtonLabel';
procedure QClxStyleHooks_hook_pushButtonContentsRect; external QtShareName name QtNamePrefix + 'QClxStyleHooks_hook_pushButtonContentsRect';
procedure QClxStyleHooks_hook_tabbarMetrics; external QtShareName name QtNamePrefix + 'QClxStyleHooks_hook_tabbarMetrics';
procedure QClxStyleHooks_hook_drawTab; external QtShareName name QtNamePrefix + 'QClxStyleHooks_hook_drawTab';
procedure QClxStyleHooks_hook_drawTabMask; external QtShareName name QtNamePrefix + 'QClxStyleHooks_hook_drawTabMask';
procedure QClxStyleHooks_hook_scrollBarMetrics; external QtShareName name QtNamePrefix + 'QClxStyleHooks_hook_scrollBarMetrics';
procedure QClxStyleHooks_hook_drawScrollBarControls; external QtShareName name QtNamePrefix + 'QClxStyleHooks_hook_drawScrollBarControls';
procedure QClxStyleHooks_hook_drawSlider; external QtShareName name QtNamePrefix + 'QClxStyleHooks_hook_drawSlider';
procedure QClxStyleHooks_hook_drawSliderMask; external QtShareName name QtNamePrefix + 'QClxStyleHooks_hook_drawSliderMask';
procedure QClxStyleHooks_hook_drawSliderGroove; external QtShareName name QtNamePrefix + 'QClxStyleHooks_hook_drawSliderGroove';
procedure QClxStyleHooks_hook_drawSliderGrooveMask; external QtShareName name QtNamePrefix + 'QClxStyleHooks_hook_drawSliderGrooveMask';
procedure QClxStyleHooks_hook_drawSplitter; external QtShareName name QtNamePrefix + 'QClxStyleHooks_hook_drawSplitter';
procedure QClxStyleHooks_hook_drawCheckMark; external QtShareName name QtNamePrefix + 'QClxStyleHooks_hook_drawCheckMark';
procedure QClxStyleHooks_hook_polishPopupMenu; external QtShareName name QtNamePrefix + 'QClxStyleHooks_hook_polishPopupMenu';
procedure QClxStyleHooks_hook_extraPopupMenuItemWidth; external QtShareName name QtNamePrefix + 'QClxStyleHooks_hook_extraPopupMenuItemWidth';
procedure QClxStyleHooks_hook_popupSubmenuIndicatorWidth; external QtShareName name QtNamePrefix + 'QClxStyleHooks_hook_popupSubmenuIndicatorWidth';
procedure QClxStyleHooks_hook_popupMenuItemHeight; external QtShareName name QtNamePrefix + 'QClxStyleHooks_hook_popupMenuItemHeight';
procedure QClxStyleHooks_hook_drawPopupMenuItem; external QtShareName name QtNamePrefix + 'QClxStyleHooks_hook_drawPopupMenuItem';
procedure QClxStyleHooks_hook_StyleDestroyed; external QtShareName name QtNamePrefix + 'QClxStyleHooks_hook_StyleDestroyed';
procedure QClxStyle_destroy; external QtShareName name QtNamePrefix + 'QClxStyle_destroy';
procedure QClxStyle_init; external QtShareName name QtNamePrefix + 'QClxStyle_init';
function QClxStyle_create(aStyle: QStyleH; h: QClxStyleHooksH): QClxStyleH; external QtShareName name QtNamePrefix + 'QClxStyle_create';
function QClxStyle_create(styleName: PWideString; h: QClxStyleHooksH): QClxStyleH; external QtShareName name QtNamePrefix + 'QClxStyle_create2';
procedure QClxStyle_refresh; external QtShareName name QtNamePrefix + 'QClxStyle_refresh';
function QClxStyle_defaultFrameWidth; external QtShareName name QtNamePrefix + 'QClxStyle_defaultFrameWidth';
procedure QClxStyle_setDefaultFrameWidth; external QtShareName name QtNamePrefix + 'QClxStyle_setDefaultFrameWidth';
function QClxStyle_sliderLength; external QtShareName name QtNamePrefix + 'QClxStyle_sliderLength';
procedure QClxStyle_setSliderLength; external QtShareName name QtNamePrefix + 'QClxStyle_setSliderLength';
function QClxStyle_maximumSliderDragDistance; external QtShareName name QtNamePrefix + 'QClxStyle_maximumSliderDragDistance';
procedure QClxStyle_setMaximumSliderDragDistance; external QtShareName name QtNamePrefix + 'QClxStyle_setMaximumSliderDragDistance';
function QClxStyle_splitterWidth; external QtShareName name QtNamePrefix + 'QClxStyle_splitterWidth';
procedure QClxStyle_setSplitterWidth; external QtShareName name QtNamePrefix + 'QClxStyle_setSplitterWidth';
procedure QClxStyle_scrollBarExtent; external QtShareName name QtNamePrefix + 'QClxStyle_scrollBarExtent';
procedure QClxStyle_setScrollBarExtent; external QtShareName name QtNamePrefix + 'QClxStyle_setScrollBarExtent';
procedure QClxStyle_indicatorSize; external QtShareName name QtNamePrefix + 'QClxStyle_indicatorSize';
procedure QClxStyle_setIndicatorSize; external QtShareName name QtNamePrefix + 'QClxStyle_setIndicatorSize';
procedure QClxStyle_exclusiveIndicatorSize; external QtShareName name QtNamePrefix + 'QClxStyle_exclusiveIndicatorSize';
procedure QClxStyle_setExclusiveIndicatorSize; external QtShareName name QtNamePrefix + 'QClxStyle_setExclusiveIndicatorSize';
procedure QClxStyle_buttonShift; external QtShareName name QtNamePrefix + 'QClxStyle_buttonShift';
procedure QClxStyle_setButtonShift; external QtShareName name QtNamePrefix + 'QClxStyle_setButtonShift';
procedure QClxStyle_scrollBarMetrics; external QtShareName name QtNamePrefix + 'QClxStyle_scrollBarMetrics';
procedure QClxStyle_tabbarMetrics; external QtShareName name QtNamePrefix + 'QClxStyle_tabbarMetrics';
procedure QClxSpinBox_destroy; external QtShareName name QtNamePrefix + 'QClxSpinBox_destroy';
function QClxSpinBox_create(parent: QWidgetH; name: PAnsiChar): QClxSpinBoxH; external QtShareName name QtNamePrefix + 'QClxSpinBox_create';
function QClxSpinBox_create(minValue: Integer; maxValue: Integer; step: Integer; parent: QWidgetH; name: PAnsiChar): QClxSpinBoxH; external QtShareName name QtNamePrefix + 'QClxSpinBox_create2';
function QClxSpinBox_upButton; external QtShareName name QtNamePrefix + 'QClxSpinBox_upButton';
function QClxSpinBox_downButton; external QtShareName name QtNamePrefix + 'QClxSpinBox_downButton';
function QClxSpinBox_editor; external QtShareName name QtNamePrefix + 'QClxSpinBox_editor';
procedure QOpenScrollView_destroy; external QtShareName name QtNamePrefix + 'QOpenScrollView_destroy';
function QOpenScrollView_create; external QtShareName name QtNamePrefix + 'QOpenScrollView_create';
procedure QOpenScrollView_resizeContents; external QtShareName name QtNamePrefix + 'QOpenScrollView_resizeContents';
procedure QOpenScrollView_setVBarGeometry; external QtShareName name QtNamePrefix + 'QOpenScrollView_setVBarGeometry';
procedure QOpenScrollView_setHBarGeometry; external QtShareName name QtNamePrefix + 'QOpenScrollView_setHBarGeometry';
procedure QOpenScrollView_getScrollBarGeometry; external QtShareName name QtNamePrefix + 'QOpenScrollView_getScrollBarGeometry';
procedure QOpenScrollView_setMargins; external QtShareName name QtNamePrefix + 'QOpenScrollView_setMargins';
function QOpenScrollView_leftMargin; external QtShareName name QtNamePrefix + 'QOpenScrollView_leftMargin';
function QOpenScrollView_topMargin; external QtShareName name QtNamePrefix + 'QOpenScrollView_topMargin';
function QOpenScrollView_rightMargin; external QtShareName name QtNamePrefix + 'QOpenScrollView_rightMargin';
function QOpenScrollView_bottomMargin; external QtShareName name QtNamePrefix + 'QOpenScrollView_bottomMargin';
procedure QClxDesign_destroy; external QtShareName name QtNamePrefix + 'QClxDesign_destroy';
procedure QClxDesign_setDesignOptions; external QtShareName name QtNamePrefix + 'QClxDesign_setDesignOptions';
procedure QOpenMultiLineEdit_destroy; external QtShareName name QtNamePrefix + 'QOpenMultiLineEdit_destroy';
function QOpenMultiLineEdit_create; external QtShareName name QtNamePrefix + 'QOpenMultiLineEdit_create';
function QOpenMultiLineEdit_hasMarkedText; external QtShareName name QtNamePrefix + 'QOpenMultiLineEdit_hasMarkedText';
procedure QOpenMultiLineEdit_markedText; external QtShareName name QtNamePrefix + 'QOpenMultiLineEdit_markedText';
function QOpenMultiLineEdit_textWidth(handle: QOpenMultiLineEditH; i: Integer): Integer; external QtShareName name QtNamePrefix + 'QOpenMultiLineEdit_textWidth';
function QOpenMultiLineEdit_textWidth(handle: QOpenMultiLineEditH; text: PWideString): Integer; external QtShareName name QtNamePrefix + 'QOpenMultiLineEdit_textWidth2';
procedure QOpenMultiLineEdit_cursorPoint; external QtShareName name QtNamePrefix + 'QOpenMultiLineEdit_cursorPoint';
procedure QOpenMultiLineEdit_insert; external QtShareName name QtNamePrefix + 'QOpenMultiLineEdit_insert';
procedure QOpenMultiLineEdit_newLine; external QtShareName name QtNamePrefix + 'QOpenMultiLineEdit_newLine';
procedure QOpenMultiLineEdit_killLine; external QtShareName name QtNamePrefix + 'QOpenMultiLineEdit_killLine';
procedure QOpenMultiLineEdit_pageUp; external QtShareName name QtNamePrefix + 'QOpenMultiLineEdit_pageUp';
procedure QOpenMultiLineEdit_pageDown; external QtShareName name QtNamePrefix + 'QOpenMultiLineEdit_pageDown';
procedure QOpenMultiLineEdit_cursorLeft; external QtShareName name QtNamePrefix + 'QOpenMultiLineEdit_cursorLeft';
procedure QOpenMultiLineEdit_cursorRight; external QtShareName name QtNamePrefix + 'QOpenMultiLineEdit_cursorRight';
procedure QOpenMultiLineEdit_cursorUp; external QtShareName name QtNamePrefix + 'QOpenMultiLineEdit_cursorUp';
procedure QOpenMultiLineEdit_cursorDown; external QtShareName name QtNamePrefix + 'QOpenMultiLineEdit_cursorDown';
procedure QOpenMultiLineEdit_backspace; external QtShareName name QtNamePrefix + 'QOpenMultiLineEdit_backspace';
procedure QOpenMultiLineEdit_del; external QtShareName name QtNamePrefix + 'QOpenMultiLineEdit_del';
procedure QOpenMultiLineEdit_home; external QtShareName name QtNamePrefix + 'QOpenMultiLineEdit_home';
procedure QOpenMultiLineEdit_end; external QtShareName name QtNamePrefix + 'QOpenMultiLineEdit_end';
function QOpenMultiLineEdit_getMarkedRegion; external QtShareName name QtNamePrefix + 'QOpenMultiLineEdit_getMarkedRegion';
function QOpenMultiLineEdit_lineLength; external QtShareName name QtNamePrefix + 'QOpenMultiLineEdit_lineLength';
function QOpenMultiLineEdit_getString; external QtShareName name QtNamePrefix + 'QOpenMultiLineEdit_getString';
procedure QOpenMultiLineEdit_stringShown; external QtShareName name QtNamePrefix + 'QOpenMultiLineEdit_stringShown';
function QOpenMultiLineEdit_textLength; external QtShareName name QtNamePrefix + 'QOpenMultiLineEdit_textLength';
function QOpenMultiLineEdit_isEndOfParagraph; external QtShareName name QtNamePrefix + 'QOpenMultiLineEdit_isEndOfParagraph';
procedure QOpenMultiLineEdit_getText; external QtShareName name QtNamePrefix + 'QOpenMultiLineEdit_getText';
function QOpenMultiLineEdit_search; external QtShareName name QtNamePrefix + 'QOpenMultiLineEdit_search';
function QOpenMultiLineEdit_tabStopDist; external QtShareName name QtNamePrefix + 'QOpenMultiLineEdit_tabStopDist';
function QOpenMultiLineEdit_textWidthWithTabs; external QtShareName name QtNamePrefix + 'QOpenMultiLineEdit_textWidthWithTabs';
function QOpenMultiLineEdit_xPosToCursorPos; external QtShareName name QtNamePrefix + 'QOpenMultiLineEdit_xPosToCursorPos';
procedure QOpenMultiLineEdit_pixelPosToCursorPos; external QtShareName name QtNamePrefix + 'QOpenMultiLineEdit_pixelPosToCursorPos';
function QOpenMultiLineEdit_tableFlags; external QtShareName name QtNamePrefix + 'QOpenMultiLineEdit_tableFlags';
function QOpenMultiLineEdit_testTableFlags; external QtShareName name QtNamePrefix + 'QOpenMultiLineEdit_testTableFlags';
procedure QOpenMultiLineEdit_setTableFlags; external QtShareName name QtNamePrefix + 'QOpenMultiLineEdit_setTableFlags';
procedure QOpenMultiLineEdit_clearTableFlags; external QtShareName name QtNamePrefix + 'QOpenMultiLineEdit_clearTableFlags';
procedure QOpenTableView_destroy; external QtShareName name QtNamePrefix + 'QOpenTableView_destroy';
function QOpenTableView_numRows; external QtShareName name QtNamePrefix + 'QOpenTableView_numRows';
procedure QOpenTableView_setNumRows; external QtShareName name QtNamePrefix + 'QOpenTableView_setNumRows';
function QOpenTableView_numCols; external QtShareName name QtNamePrefix + 'QOpenTableView_numCols';
procedure QOpenTableView_setNumCols; external QtShareName name QtNamePrefix + 'QOpenTableView_setNumCols';
function QOpenTableView_topCell; external QtShareName name QtNamePrefix + 'QOpenTableView_topCell';
procedure QOpenTableView_setTopCell; external QtShareName name QtNamePrefix + 'QOpenTableView_setTopCell';
function QOpenTableView_leftCell; external QtShareName name QtNamePrefix + 'QOpenTableView_leftCell';
procedure QOpenTableView_setLeftCell; external QtShareName name QtNamePrefix + 'QOpenTableView_setLeftCell';
procedure QOpenTableView_setTopLeftCell; external QtShareName name QtNamePrefix + 'QOpenTableView_setTopLeftCell';
function QOpenTableView_xOffset; external QtShareName name QtNamePrefix + 'QOpenTableView_xOffset';
procedure QOpenTableView_setXOffset; external QtShareName name QtNamePrefix + 'QOpenTableView_setXOffset';
function QOpenTableView_yOffset; external QtShareName name QtNamePrefix + 'QOpenTableView_yOffset';
procedure QOpenTableView_setYOffset; external QtShareName name QtNamePrefix + 'QOpenTableView_setYOffset';
procedure QOpenTableView_setOffset; external QtShareName name QtNamePrefix + 'QOpenTableView_setOffset';
function QOpenTableView_cellWidth(handle: QOpenTableViewH; col: Integer): Integer; external QtShareName name QtNamePrefix + 'QOpenTableView_cellWidth';
function QOpenTableView_cellHeight(handle: QOpenTableViewH; row: Integer): Integer; external QtShareName name QtNamePrefix + 'QOpenTableView_cellHeight';
function QOpenTableView_cellWidth(handle: QOpenTableViewH): Integer; external QtShareName name QtNamePrefix + 'QOpenTableView_cellWidth2';
function QOpenTableView_cellHeight(handle: QOpenTableViewH): Integer; external QtShareName name QtNamePrefix + 'QOpenTableView_cellHeight2';
procedure QOpenTableView_setCellWidth; external QtShareName name QtNamePrefix + 'QOpenTableView_setCellWidth';
procedure QOpenTableView_setCellHeight; external QtShareName name QtNamePrefix + 'QOpenTableView_setCellHeight';
function QOpenTableView_totalWidth; external QtShareName name QtNamePrefix + 'QOpenTableView_totalWidth';
function QOpenTableView_totalHeight; external QtShareName name QtNamePrefix + 'QOpenTableView_totalHeight';
function QOpenTableView_tableFlags; external QtShareName name QtNamePrefix + 'QOpenTableView_tableFlags';
function QOpenTableView_testTableFlags; external QtShareName name QtNamePrefix + 'QOpenTableView_testTableFlags';
procedure QOpenTableView_setTableFlags; external QtShareName name QtNamePrefix + 'QOpenTableView_setTableFlags';
procedure QOpenTableView_clearTableFlags; external QtShareName name QtNamePrefix + 'QOpenTableView_clearTableFlags';
function QOpenTableView_autoUpdate; external QtShareName name QtNamePrefix + 'QOpenTableView_autoUpdate';
procedure QOpenTableView_setAutoUpdate; external QtShareName name QtNamePrefix + 'QOpenTableView_setAutoUpdate';
procedure QOpenTableView_updateCell; external QtShareName name QtNamePrefix + 'QOpenTableView_updateCell';
procedure QOpenTableView_cellUpdateRect; external QtShareName name QtNamePrefix + 'QOpenTableView_cellUpdateRect';
procedure QOpenTableView_viewRect; external QtShareName name QtNamePrefix + 'QOpenTableView_viewRect';
function QOpenTableView_lastRowVisible; external QtShareName name QtNamePrefix + 'QOpenTableView_lastRowVisible';
function QOpenTableView_lastColVisible; external QtShareName name QtNamePrefix + 'QOpenTableView_lastColVisible';
function QOpenTableView_rowIsVisible; external QtShareName name QtNamePrefix + 'QOpenTableView_rowIsVisible';
function QOpenTableView_colIsVisible; external QtShareName name QtNamePrefix + 'QOpenTableView_colIsVisible';
function QOpenTableView_verticalScrollBar; external QtShareName name QtNamePrefix + 'QOpenTableView_verticalScrollBar';
function QOpenTableView_horizontalScrollBar; external QtShareName name QtNamePrefix + 'QOpenTableView_horizontalScrollBar';
procedure QOpenTableView_scroll; external QtShareName name QtNamePrefix + 'QOpenTableView_scroll';
procedure QOpenTableView_updateScrollBars; external QtShareName name QtNamePrefix + 'QOpenTableView_updateScrollBars';
procedure QOpenTableView_updateTableSize; external QtShareName name QtNamePrefix + 'QOpenTableView_updateTableSize';
function QOpenTableView_findRow; external QtShareName name QtNamePrefix + 'QOpenTableView_findRow';
function QOpenTableView_findCol; external QtShareName name QtNamePrefix + 'QOpenTableView_findCol';
function QOpenTableView_rowYPos; external QtShareName name QtNamePrefix + 'QOpenTableView_rowYPos';
function QOpenTableView_colXPos; external QtShareName name QtNamePrefix + 'QOpenTableView_colXPos';
function QOpenPainter_getHDC; external QtShareName name QtNamePrefix + 'QOpenPainter_getHDC';
function QOpenPainter_getPen; external QtShareName name QtNamePrefix + 'QOpenPainter_getPen';
function QOpenPainter_getHBrush; external QtShareName name QtNamePrefix + 'QOpenPainter_getHBrush';
function QOpenPainter_getFont; external QtShareName name QtNamePrefix + 'QOpenPainter_getFont';
function QOpenPainter_getBrushBitmap; external QtShareName name QtNamePrefix + 'QOpenPainter_getBrushBitmap';
function QOpenPainter_getPalette; external QtShareName name QtNamePrefix + 'QOpenPainter_getPalette';
procedure QObject_hook_destroy; external QtShareName name QtNamePrefix + 'QObject_hook_destroy';
function QObject_hook_create; external QtShareName name QtNamePrefix + 'QObject_hook_create';
procedure QObject_hook_hook_destroyed; external QtShareName name QtNamePrefix + 'QObject_hook_hook_destroyed';
procedure QSenderObject_hook_destroy; external QtShareName name QtNamePrefix + 'QSenderObject_hook_destroy';
function QSenderObject_hook_create; external QtShareName name QtNamePrefix + 'QSenderObject_hook_create';
procedure QWidget_hook_destroy; external QtShareName name QtNamePrefix + 'QWidget_hook_destroy';
function QWidget_hook_create; external QtShareName name QtNamePrefix + 'QWidget_hook_create';
procedure QApplication_hook_destroy; external QtShareName name QtNamePrefix + 'QApplication_hook_destroy';
function QApplication_hook_create; external QtShareName name QtNamePrefix + 'QApplication_hook_create';
procedure QApplication_hook_hook_lastWindowClosed; external QtShareName name QtNamePrefix + 'QApplication_hook_hook_lastWindowClosed';
procedure QApplication_hook_hook_aboutToQuit; external QtShareName name QtNamePrefix + 'QApplication_hook_hook_aboutToQuit';
procedure QApplication_hook_hook_guiThreadAwake; external QtShareName name QtNamePrefix + 'QApplication_hook_hook_guiThreadAwake';
procedure QButton_hook_destroy; external QtShareName name QtNamePrefix + 'QButton_hook_destroy';
function QButton_hook_create; external QtShareName name QtNamePrefix + 'QButton_hook_create';
procedure QButton_hook_hook_pressed; external QtShareName name QtNamePrefix + 'QButton_hook_hook_pressed';
procedure QButton_hook_hook_released; external QtShareName name QtNamePrefix + 'QButton_hook_hook_released';
procedure QButton_hook_hook_clicked; external QtShareName name QtNamePrefix + 'QButton_hook_hook_clicked';
procedure QButton_hook_hook_toggled; external QtShareName name QtNamePrefix + 'QButton_hook_hook_toggled';
procedure QButton_hook_hook_stateChanged; external QtShareName name QtNamePrefix + 'QButton_hook_hook_stateChanged';
procedure QComboBox_hook_destroy; external QtShareName name QtNamePrefix + 'QComboBox_hook_destroy';
function QComboBox_hook_create; external QtShareName name QtNamePrefix + 'QComboBox_hook_create';
procedure QComboBox_hook_hook_activated; external QtShareName name QtNamePrefix + 'QComboBox_hook_hook_activated';
procedure QComboBox_hook_hook_highlighted; external QtShareName name QtNamePrefix + 'QComboBox_hook_hook_highlighted';
procedure QComboBox_hook_hook_activated2; external QtShareName name QtNamePrefix + 'QComboBox_hook_hook_activated2';
procedure QComboBox_hook_hook_highlighted2; external QtShareName name QtNamePrefix + 'QComboBox_hook_hook_highlighted2';
procedure QComboBox_hook_hook_textChanged; external QtShareName name QtNamePrefix + 'QComboBox_hook_hook_textChanged';
procedure QDialog_hook_destroy; external QtShareName name QtNamePrefix + 'QDialog_hook_destroy';
function QDialog_hook_create; external QtShareName name QtNamePrefix + 'QDialog_hook_create';
procedure QDragObject_hook_destroy; external QtShareName name QtNamePrefix + 'QDragObject_hook_destroy';
function QDragObject_hook_create; external QtShareName name QtNamePrefix + 'QDragObject_hook_create';
procedure QStoredDrag_hook_destroy; external QtShareName name QtNamePrefix + 'QStoredDrag_hook_destroy';
function QStoredDrag_hook_create; external QtShareName name QtNamePrefix + 'QStoredDrag_hook_create';
procedure QTextDrag_hook_destroy; external QtShareName name QtNamePrefix + 'QTextDrag_hook_destroy';
function QTextDrag_hook_create; external QtShareName name QtNamePrefix + 'QTextDrag_hook_create';
procedure QImageDrag_hook_destroy; external QtShareName name QtNamePrefix + 'QImageDrag_hook_destroy';
function QImageDrag_hook_create; external QtShareName name QtNamePrefix + 'QImageDrag_hook_create';
procedure QUriDrag_hook_destroy; external QtShareName name QtNamePrefix + 'QUriDrag_hook_destroy';
function QUriDrag_hook_create; external QtShareName name QtNamePrefix + 'QUriDrag_hook_create';
procedure QColorDrag_hook_destroy; external QtShareName name QtNamePrefix + 'QColorDrag_hook_destroy';
function QColorDrag_hook_create; external QtShareName name QtNamePrefix + 'QColorDrag_hook_create';
procedure QEvent_hook_destroy; external QtShareName name QtNamePrefix + 'QEvent_hook_destroy';
function QEvent_hook_create; external QtShareName name QtNamePrefix + 'QEvent_hook_create';
procedure QTimerEvent_hook_destroy; external QtShareName name QtNamePrefix + 'QTimerEvent_hook_destroy';
function QTimerEvent_hook_create; external QtShareName name QtNamePrefix + 'QTimerEvent_hook_create';
procedure QMouseEvent_hook_destroy; external QtShareName name QtNamePrefix + 'QMouseEvent_hook_destroy';
function QMouseEvent_hook_create; external QtShareName name QtNamePrefix + 'QMouseEvent_hook_create';
procedure QWheelEvent_hook_destroy; external QtShareName name QtNamePrefix + 'QWheelEvent_hook_destroy';
function QWheelEvent_hook_create; external QtShareName name QtNamePrefix + 'QWheelEvent_hook_create';
procedure QKeyEvent_hook_destroy; external QtShareName name QtNamePrefix + 'QKeyEvent_hook_destroy';
function QKeyEvent_hook_create; external QtShareName name QtNamePrefix + 'QKeyEvent_hook_create';
procedure QFocusEvent_hook_destroy; external QtShareName name QtNamePrefix + 'QFocusEvent_hook_destroy';
function QFocusEvent_hook_create; external QtShareName name QtNamePrefix + 'QFocusEvent_hook_create';
procedure QPaintEvent_hook_destroy; external QtShareName name QtNamePrefix + 'QPaintEvent_hook_destroy';
function QPaintEvent_hook_create; external QtShareName name QtNamePrefix + 'QPaintEvent_hook_create';
procedure QMoveEvent_hook_destroy; external QtShareName name QtNamePrefix + 'QMoveEvent_hook_destroy';
function QMoveEvent_hook_create; external QtShareName name QtNamePrefix + 'QMoveEvent_hook_create';
procedure QResizeEvent_hook_destroy; external QtShareName name QtNamePrefix + 'QResizeEvent_hook_destroy';
function QResizeEvent_hook_create; external QtShareName name QtNamePrefix + 'QResizeEvent_hook_create';
procedure QCloseEvent_hook_destroy; external QtShareName name QtNamePrefix + 'QCloseEvent_hook_destroy';
function QCloseEvent_hook_create; external QtShareName name QtNamePrefix + 'QCloseEvent_hook_create';
procedure QShowEvent_hook_destroy; external QtShareName name QtNamePrefix + 'QShowEvent_hook_destroy';
function QShowEvent_hook_create; external QtShareName name QtNamePrefix + 'QShowEvent_hook_create';
procedure QHideEvent_hook_destroy; external QtShareName name QtNamePrefix + 'QHideEvent_hook_destroy';
function QHideEvent_hook_create; external QtShareName name QtNamePrefix + 'QHideEvent_hook_create';
procedure QDropEvent_hook_destroy; external QtShareName name QtNamePrefix + 'QDropEvent_hook_destroy';
function QDropEvent_hook_create; external QtShareName name QtNamePrefix + 'QDropEvent_hook_create';
procedure QDragMoveEvent_hook_destroy; external QtShareName name QtNamePrefix + 'QDragMoveEvent_hook_destroy';
function QDragMoveEvent_hook_create; external QtShareName name QtNamePrefix + 'QDragMoveEvent_hook_create';
procedure QDragEnterEvent_hook_destroy; external QtShareName name QtNamePrefix + 'QDragEnterEvent_hook_destroy';
function QDragEnterEvent_hook_create; external QtShareName name QtNamePrefix + 'QDragEnterEvent_hook_create';
procedure QDragResponseEvent_hook_destroy; external QtShareName name QtNamePrefix + 'QDragResponseEvent_hook_destroy';
function QDragResponseEvent_hook_create; external QtShareName name QtNamePrefix + 'QDragResponseEvent_hook_create';
procedure QDragLeaveEvent_hook_destroy; external QtShareName name QtNamePrefix + 'QDragLeaveEvent_hook_destroy';
function QDragLeaveEvent_hook_create; external QtShareName name QtNamePrefix + 'QDragLeaveEvent_hook_create';
procedure QChildEvent_hook_destroy; external QtShareName name QtNamePrefix + 'QChildEvent_hook_destroy';
function QChildEvent_hook_create; external QtShareName name QtNamePrefix + 'QChildEvent_hook_create';
procedure QCustomEvent_hook_destroy; external QtShareName name QtNamePrefix + 'QCustomEvent_hook_destroy';
function QCustomEvent_hook_create; external QtShareName name QtNamePrefix + 'QCustomEvent_hook_create';
procedure QFrame_hook_destroy; external QtShareName name QtNamePrefix + 'QFrame_hook_destroy';
function QFrame_hook_create; external QtShareName name QtNamePrefix + 'QFrame_hook_create';
procedure QIconView_hook_destroy; external QtShareName name QtNamePrefix + 'QIconView_hook_destroy';
function QIconView_hook_create; external QtShareName name QtNamePrefix + 'QIconView_hook_create';
procedure QIconView_hook_hook_selectionChanged; external QtShareName name QtNamePrefix + 'QIconView_hook_hook_selectionChanged';
procedure QIconView_hook_hook_selectionChanged2; external QtShareName name QtNamePrefix + 'QIconView_hook_hook_selectionChanged2';
procedure QIconView_hook_hook_currentChanged; external QtShareName name QtNamePrefix + 'QIconView_hook_hook_currentChanged';
procedure QIconView_hook_hook_clicked; external QtShareName name QtNamePrefix + 'QIconView_hook_hook_clicked';
procedure QIconView_hook_hook_clicked2; external QtShareName name QtNamePrefix + 'QIconView_hook_hook_clicked2';
procedure QIconView_hook_hook_pressed; external QtShareName name QtNamePrefix + 'QIconView_hook_hook_pressed';
procedure QIconView_hook_hook_pressed2; external QtShareName name QtNamePrefix + 'QIconView_hook_hook_pressed2';
procedure QIconView_hook_hook_doubleClicked; external QtShareName name QtNamePrefix + 'QIconView_hook_hook_doubleClicked';
procedure QIconView_hook_hook_returnPressed; external QtShareName name QtNamePrefix + 'QIconView_hook_hook_returnPressed';
procedure QIconView_hook_hook_rightButtonClicked; external QtShareName name QtNamePrefix + 'QIconView_hook_hook_rightButtonClicked';
procedure QIconView_hook_hook_rightButtonPressed; external QtShareName name QtNamePrefix + 'QIconView_hook_hook_rightButtonPressed';
procedure QIconView_hook_hook_mouseButtonPressed; external QtShareName name QtNamePrefix + 'QIconView_hook_hook_mouseButtonPressed';
procedure QIconView_hook_hook_mouseButtonClicked; external QtShareName name QtNamePrefix + 'QIconView_hook_hook_mouseButtonClicked';
procedure QIconView_hook_hook_dropped; external QtShareName name QtNamePrefix + 'QIconView_hook_hook_dropped';
procedure QIconView_hook_hook_moved; external QtShareName name QtNamePrefix + 'QIconView_hook_hook_moved';
procedure QIconView_hook_hook_onItem; external QtShareName name QtNamePrefix + 'QIconView_hook_hook_onItem';
procedure QIconView_hook_hook_onViewport; external QtShareName name QtNamePrefix + 'QIconView_hook_hook_onViewport';
procedure QIconView_hook_hook_itemRenamed; external QtShareName name QtNamePrefix + 'QIconView_hook_hook_itemRenamed';
procedure QIconView_hook_hook_itemRenamed2; external QtShareName name QtNamePrefix + 'QIconView_hook_hook_itemRenamed2';
procedure QLCDNumber_hook_destroy; external QtShareName name QtNamePrefix + 'QLCDNumber_hook_destroy';
function QLCDNumber_hook_create; external QtShareName name QtNamePrefix + 'QLCDNumber_hook_create';
procedure QLCDNumber_hook_hook_overflow; external QtShareName name QtNamePrefix + 'QLCDNumber_hook_hook_overflow';
procedure QLineEdit_hook_destroy; external QtShareName name QtNamePrefix + 'QLineEdit_hook_destroy';
function QLineEdit_hook_create; external QtShareName name QtNamePrefix + 'QLineEdit_hook_create';
procedure QLineEdit_hook_hook_textChanged; external QtShareName name QtNamePrefix + 'QLineEdit_hook_hook_textChanged';
procedure QLineEdit_hook_hook_returnPressed; external QtShareName name QtNamePrefix + 'QLineEdit_hook_hook_returnPressed';
procedure QListBox_hook_destroy; external QtShareName name QtNamePrefix + 'QListBox_hook_destroy';
function QListBox_hook_create; external QtShareName name QtNamePrefix + 'QListBox_hook_create';
procedure QListBox_hook_hook_highlighted; external QtShareName name QtNamePrefix + 'QListBox_hook_hook_highlighted';
procedure QListBox_hook_hook_selected; external QtShareName name QtNamePrefix + 'QListBox_hook_hook_selected';
procedure QListBox_hook_hook_highlighted2; external QtShareName name QtNamePrefix + 'QListBox_hook_hook_highlighted2';
procedure QListBox_hook_hook_selected2; external QtShareName name QtNamePrefix + 'QListBox_hook_hook_selected2';
procedure QListBox_hook_hook_highlighted3; external QtShareName name QtNamePrefix + 'QListBox_hook_hook_highlighted3';
procedure QListBox_hook_hook_selected3; external QtShareName name QtNamePrefix + 'QListBox_hook_hook_selected3';
procedure QListBox_hook_hook_selectionChanged; external QtShareName name QtNamePrefix + 'QListBox_hook_hook_selectionChanged';
procedure QListBox_hook_hook_selectionChanged2; external QtShareName name QtNamePrefix + 'QListBox_hook_hook_selectionChanged2';
procedure QListBox_hook_hook_currentChanged; external QtShareName name QtNamePrefix + 'QListBox_hook_hook_currentChanged';
procedure QListBox_hook_hook_clicked; external QtShareName name QtNamePrefix + 'QListBox_hook_hook_clicked';
procedure QListBox_hook_hook_clicked2; external QtShareName name QtNamePrefix + 'QListBox_hook_hook_clicked2';
procedure QListBox_hook_hook_pressed; external QtShareName name QtNamePrefix + 'QListBox_hook_hook_pressed';
procedure QListBox_hook_hook_pressed2; external QtShareName name QtNamePrefix + 'QListBox_hook_hook_pressed2';
procedure QListBox_hook_hook_doubleClicked; external QtShareName name QtNamePrefix + 'QListBox_hook_hook_doubleClicked';
procedure QListBox_hook_hook_returnPressed; external QtShareName name QtNamePrefix + 'QListBox_hook_hook_returnPressed';
procedure QListBox_hook_hook_rightButtonClicked; external QtShareName name QtNamePrefix + 'QListBox_hook_hook_rightButtonClicked';
procedure QListBox_hook_hook_rightButtonPressed; external QtShareName name QtNamePrefix + 'QListBox_hook_hook_rightButtonPressed';
procedure QListBox_hook_hook_mouseButtonPressed; external QtShareName name QtNamePrefix + 'QListBox_hook_hook_mouseButtonPressed';
procedure QListBox_hook_hook_mouseButtonClicked; external QtShareName name QtNamePrefix + 'QListBox_hook_hook_mouseButtonClicked';
procedure QListBox_hook_hook_onItem; external QtShareName name QtNamePrefix + 'QListBox_hook_hook_onItem';
procedure QListBox_hook_hook_onViewport; external QtShareName name QtNamePrefix + 'QListBox_hook_hook_onViewport';
procedure QListViewItem_hook_destroy; external QtShareName name QtNamePrefix + 'QListViewItem_hook_destroy';
function QListViewItem_hook_create; external QtShareName name QtNamePrefix + 'QListViewItem_hook_create';
procedure QListView_hook_destroy; external QtShareName name QtNamePrefix + 'QListView_hook_destroy';
function QListView_hook_create; external QtShareName name QtNamePrefix + 'QListView_hook_create';
procedure QListView_hook_hook_selectionChanged; external QtShareName name QtNamePrefix + 'QListView_hook_hook_selectionChanged';
procedure QListView_hook_hook_selectionChanged2; external QtShareName name QtNamePrefix + 'QListView_hook_hook_selectionChanged2';
procedure QListView_hook_hook_currentChanged; external QtShareName name QtNamePrefix + 'QListView_hook_hook_currentChanged';
procedure QListView_hook_hook_clicked; external QtShareName name QtNamePrefix + 'QListView_hook_hook_clicked';
procedure QListView_hook_hook_clicked2; external QtShareName name QtNamePrefix + 'QListView_hook_hook_clicked2';
procedure QListView_hook_hook_pressed; external QtShareName name QtNamePrefix + 'QListView_hook_hook_pressed';
procedure QListView_hook_hook_pressed2; external QtShareName name QtNamePrefix + 'QListView_hook_hook_pressed2';
procedure QListView_hook_hook_doubleClicked; external QtShareName name QtNamePrefix + 'QListView_hook_hook_doubleClicked';
procedure QListView_hook_hook_returnPressed; external QtShareName name QtNamePrefix + 'QListView_hook_hook_returnPressed';
procedure QListView_hook_hook_rightButtonClicked; external QtShareName name QtNamePrefix + 'QListView_hook_hook_rightButtonClicked';
procedure QListView_hook_hook_rightButtonPressed; external QtShareName name QtNamePrefix + 'QListView_hook_hook_rightButtonPressed';
procedure QListView_hook_hook_mouseButtonPressed; external QtShareName name QtNamePrefix + 'QListView_hook_hook_mouseButtonPressed';
procedure QListView_hook_hook_mouseButtonClicked; external QtShareName name QtNamePrefix + 'QListView_hook_hook_mouseButtonClicked';
procedure QListView_hook_hook_onItem; external QtShareName name QtNamePrefix + 'QListView_hook_hook_onItem';
procedure QListView_hook_hook_onViewport; external QtShareName name QtNamePrefix + 'QListView_hook_hook_onViewport';
procedure QListView_hook_hook_expanded; external QtShareName name QtNamePrefix + 'QListView_hook_hook_expanded';
procedure QListView_hook_hook_collapsed; external QtShareName name QtNamePrefix + 'QListView_hook_hook_collapsed';
procedure QCheckListItem_hook_destroy; external QtShareName name QtNamePrefix + 'QCheckListItem_hook_destroy';
function QCheckListItem_hook_create; external QtShareName name QtNamePrefix + 'QCheckListItem_hook_create';
procedure QMenuBar_hook_destroy; external QtShareName name QtNamePrefix + 'QMenuBar_hook_destroy';
function QMenuBar_hook_create; external QtShareName name QtNamePrefix + 'QMenuBar_hook_create';
procedure QMenuBar_hook_hook_activated; external QtShareName name QtNamePrefix + 'QMenuBar_hook_hook_activated';
procedure QMenuBar_hook_hook_highlighted; external QtShareName name QtNamePrefix + 'QMenuBar_hook_hook_highlighted';
procedure QMessageBox_hook_destroy; external QtShareName name QtNamePrefix + 'QMessageBox_hook_destroy';
function QMessageBox_hook_create; external QtShareName name QtNamePrefix + 'QMessageBox_hook_create';
procedure QMultiLineEdit_hook_destroy; external QtShareName name QtNamePrefix + 'QMultiLineEdit_hook_destroy';
function QMultiLineEdit_hook_create; external QtShareName name QtNamePrefix + 'QMultiLineEdit_hook_create';
procedure QMultiLineEdit_hook_hook_textChanged; external QtShareName name QtNamePrefix + 'QMultiLineEdit_hook_hook_textChanged';
procedure QMultiLineEdit_hook_hook_returnPressed; external QtShareName name QtNamePrefix + 'QMultiLineEdit_hook_hook_returnPressed';
procedure QMultiLineEdit_hook_hook_undoAvailable; external QtShareName name QtNamePrefix + 'QMultiLineEdit_hook_hook_undoAvailable';
procedure QMultiLineEdit_hook_hook_redoAvailable; external QtShareName name QtNamePrefix + 'QMultiLineEdit_hook_hook_redoAvailable';
procedure QMultiLineEdit_hook_hook_copyAvailable; external QtShareName name QtNamePrefix + 'QMultiLineEdit_hook_hook_copyAvailable';
procedure QScrollView_hook_destroy; external QtShareName name QtNamePrefix + 'QScrollView_hook_destroy';
function QScrollView_hook_create; external QtShareName name QtNamePrefix + 'QScrollView_hook_create';
procedure QScrollView_hook_hook_contentsMoving; external QtShareName name QtNamePrefix + 'QScrollView_hook_hook_contentsMoving';
procedure QSlider_hook_destroy; external QtShareName name QtNamePrefix + 'QSlider_hook_destroy';
function QSlider_hook_create; external QtShareName name QtNamePrefix + 'QSlider_hook_create';
procedure QSlider_hook_hook_valueChanged; external QtShareName name QtNamePrefix + 'QSlider_hook_hook_valueChanged';
procedure QSlider_hook_hook_sliderPressed; external QtShareName name QtNamePrefix + 'QSlider_hook_hook_sliderPressed';
procedure QSlider_hook_hook_sliderMoved; external QtShareName name QtNamePrefix + 'QSlider_hook_hook_sliderMoved';
procedure QSlider_hook_hook_sliderReleased; external QtShareName name QtNamePrefix + 'QSlider_hook_hook_sliderReleased';
procedure QSocketNotifier_hook_destroy; external QtShareName name QtNamePrefix + 'QSocketNotifier_hook_destroy';
function QSocketNotifier_hook_create; external QtShareName name QtNamePrefix + 'QSocketNotifier_hook_create';
procedure QSocketNotifier_hook_hook_activated; external QtShareName name QtNamePrefix + 'QSocketNotifier_hook_hook_activated';
procedure QSpinBox_hook_destroy; external QtShareName name QtNamePrefix + 'QSpinBox_hook_destroy';
function QSpinBox_hook_create; external QtShareName name QtNamePrefix + 'QSpinBox_hook_create';
procedure QSpinBox_hook_hook_valueChanged; external QtShareName name QtNamePrefix + 'QSpinBox_hook_hook_valueChanged';
procedure QSpinBox_hook_hook_valueChanged2; external QtShareName name QtNamePrefix + 'QSpinBox_hook_hook_valueChanged2';
procedure QStyle_hook_destroy; external QtShareName name QtNamePrefix + 'QStyle_hook_destroy';
function QStyle_hook_create; external QtShareName name QtNamePrefix + 'QStyle_hook_create';
procedure QTranslator_hook_destroy; external QtShareName name QtNamePrefix + 'QTranslator_hook_destroy';
function QTranslator_hook_create; external QtShareName name QtNamePrefix + 'QTranslator_hook_create';
procedure QBrush_hook_destroy; external QtShareName name QtNamePrefix + 'QBrush_hook_destroy';
function QBrush_hook_create; external QtShareName name QtNamePrefix + 'QBrush_hook_create';
procedure QButtonGroup_hook_destroy; external QtShareName name QtNamePrefix + 'QButtonGroup_hook_destroy';
function QButtonGroup_hook_create; external QtShareName name QtNamePrefix + 'QButtonGroup_hook_create';
procedure QButtonGroup_hook_hook_pressed; external QtShareName name QtNamePrefix + 'QButtonGroup_hook_hook_pressed';
procedure QButtonGroup_hook_hook_released; external QtShareName name QtNamePrefix + 'QButtonGroup_hook_hook_released';
procedure QButtonGroup_hook_hook_clicked; external QtShareName name QtNamePrefix + 'QButtonGroup_hook_hook_clicked';
procedure QCheckBox_hook_destroy; external QtShareName name QtNamePrefix + 'QCheckBox_hook_destroy';
function QCheckBox_hook_create; external QtShareName name QtNamePrefix + 'QCheckBox_hook_create';
procedure QClipboard_hook_destroy; external QtShareName name QtNamePrefix + 'QClipboard_hook_destroy';
function QClipboard_hook_create; external QtShareName name QtNamePrefix + 'QClipboard_hook_create';
procedure QClipboard_hook_hook_dataChanged; external QtShareName name QtNamePrefix + 'QClipboard_hook_hook_dataChanged';
procedure QColorDialog_hook_destroy; external QtShareName name QtNamePrefix + 'QColorDialog_hook_destroy';
function QColorDialog_hook_create; external QtShareName name QtNamePrefix + 'QColorDialog_hook_create';
procedure QCommonStyle_hook_destroy; external QtShareName name QtNamePrefix + 'QCommonStyle_hook_destroy';
function QCommonStyle_hook_create; external QtShareName name QtNamePrefix + 'QCommonStyle_hook_create';
procedure QFontDialog_hook_destroy; external QtShareName name QtNamePrefix + 'QFontDialog_hook_destroy';
function QFontDialog_hook_create; external QtShareName name QtNamePrefix + 'QFontDialog_hook_create';
procedure QFontDialog_hook_hook_fontSelected; external QtShareName name QtNamePrefix + 'QFontDialog_hook_hook_fontSelected';
procedure QFontDialog_hook_hook_fontHighlighted; external QtShareName name QtNamePrefix + 'QFontDialog_hook_hook_fontHighlighted';
procedure QGroupBox_hook_destroy; external QtShareName name QtNamePrefix + 'QGroupBox_hook_destroy';
function QGroupBox_hook_create; external QtShareName name QtNamePrefix + 'QGroupBox_hook_create';
procedure QHeader_hook_destroy; external QtShareName name QtNamePrefix + 'QHeader_hook_destroy';
function QHeader_hook_create; external QtShareName name QtNamePrefix + 'QHeader_hook_create';
procedure QHeader_hook_hook_clicked; external QtShareName name QtNamePrefix + 'QHeader_hook_hook_clicked';
procedure QHeader_hook_hook_pressed; external QtShareName name QtNamePrefix + 'QHeader_hook_hook_pressed';
procedure QHeader_hook_hook_released; external QtShareName name QtNamePrefix + 'QHeader_hook_hook_released';
procedure QHeader_hook_hook_sizeChange; external QtShareName name QtNamePrefix + 'QHeader_hook_hook_sizeChange';
procedure QHeader_hook_hook_indexChange; external QtShareName name QtNamePrefix + 'QHeader_hook_hook_indexChange';
procedure QHeader_hook_hook_sectionClicked; external QtShareName name QtNamePrefix + 'QHeader_hook_hook_sectionClicked';
procedure QHeader_hook_hook_moved; external QtShareName name QtNamePrefix + 'QHeader_hook_hook_moved';
procedure QLabel_hook_destroy; external QtShareName name QtNamePrefix + 'QLabel_hook_destroy';
function QLabel_hook_create; external QtShareName name QtNamePrefix + 'QLabel_hook_create';
procedure QPainter_hook_destroy; external QtShareName name QtNamePrefix + 'QPainter_hook_destroy';
function QPainter_hook_create; external QtShareName name QtNamePrefix + 'QPainter_hook_create';
procedure QPen_hook_destroy; external QtShareName name QtNamePrefix + 'QPen_hook_destroy';
function QPen_hook_create; external QtShareName name QtNamePrefix + 'QPen_hook_create';
procedure QPopupMenu_hook_destroy; external QtShareName name QtNamePrefix + 'QPopupMenu_hook_destroy';
function QPopupMenu_hook_create; external QtShareName name QtNamePrefix + 'QPopupMenu_hook_create';
procedure QPopupMenu_hook_hook_activated; external QtShareName name QtNamePrefix + 'QPopupMenu_hook_hook_activated';
procedure QPopupMenu_hook_hook_highlighted; external QtShareName name QtNamePrefix + 'QPopupMenu_hook_hook_highlighted';
procedure QPopupMenu_hook_hook_activatedRedirect; external QtShareName name QtNamePrefix + 'QPopupMenu_hook_hook_activatedRedirect';
procedure QPopupMenu_hook_hook_highlightedRedirect; external QtShareName name QtNamePrefix + 'QPopupMenu_hook_hook_highlightedRedirect';
procedure QPopupMenu_hook_hook_aboutToShow; external QtShareName name QtNamePrefix + 'QPopupMenu_hook_hook_aboutToShow';
procedure QPopupMenu_hook_hook_aboutToHide; external QtShareName name QtNamePrefix + 'QPopupMenu_hook_hook_aboutToHide';
procedure QPushButton_hook_destroy; external QtShareName name QtNamePrefix + 'QPushButton_hook_destroy';
function QPushButton_hook_create; external QtShareName name QtNamePrefix + 'QPushButton_hook_create';
procedure QRadioButton_hook_destroy; external QtShareName name QtNamePrefix + 'QRadioButton_hook_destroy';
function QRadioButton_hook_create; external QtShareName name QtNamePrefix + 'QRadioButton_hook_create';
procedure QScrollBar_hook_destroy; external QtShareName name QtNamePrefix + 'QScrollBar_hook_destroy';
function QScrollBar_hook_create; external QtShareName name QtNamePrefix + 'QScrollBar_hook_create';
procedure QScrollBar_hook_hook_valueChanged; external QtShareName name QtNamePrefix + 'QScrollBar_hook_hook_valueChanged';
procedure QScrollBar_hook_hook_sliderPressed; external QtShareName name QtNamePrefix + 'QScrollBar_hook_hook_sliderPressed';
procedure QScrollBar_hook_hook_sliderMoved; external QtShareName name QtNamePrefix + 'QScrollBar_hook_hook_sliderMoved';
procedure QScrollBar_hook_hook_sliderReleased; external QtShareName name QtNamePrefix + 'QScrollBar_hook_hook_sliderReleased';
procedure QScrollBar_hook_hook_nextLine; external QtShareName name QtNamePrefix + 'QScrollBar_hook_hook_nextLine';
procedure QScrollBar_hook_hook_prevLine; external QtShareName name QtNamePrefix + 'QScrollBar_hook_hook_prevLine';
procedure QScrollBar_hook_hook_nextPage; external QtShareName name QtNamePrefix + 'QScrollBar_hook_hook_nextPage';
procedure QScrollBar_hook_hook_prevPage; external QtShareName name QtNamePrefix + 'QScrollBar_hook_hook_prevPage';
procedure QSizeGrip_hook_destroy; external QtShareName name QtNamePrefix + 'QSizeGrip_hook_destroy';
function QSizeGrip_hook_create; external QtShareName name QtNamePrefix + 'QSizeGrip_hook_create';
procedure QTableView_hook_destroy; external QtShareName name QtNamePrefix + 'QTableView_hook_destroy';
function QTableView_hook_create; external QtShareName name QtNamePrefix + 'QTableView_hook_create';
procedure QTextBrowser_hook_destroy; external QtShareName name QtNamePrefix + 'QTextBrowser_hook_destroy';
function QTextBrowser_hook_create; external QtShareName name QtNamePrefix + 'QTextBrowser_hook_create';
procedure QTextBrowser_hook_hook_backwardAvailable; external QtShareName name QtNamePrefix + 'QTextBrowser_hook_hook_backwardAvailable';
procedure QTextBrowser_hook_hook_forwardAvailable; external QtShareName name QtNamePrefix + 'QTextBrowser_hook_hook_forwardAvailable';
procedure QTextBrowser_hook_hook_highlighted; external QtShareName name QtNamePrefix + 'QTextBrowser_hook_hook_highlighted';
procedure QTextBrowser_hook_hook_textChanged; external QtShareName name QtNamePrefix + 'QTextBrowser_hook_hook_textChanged';
procedure QTextView_hook_destroy; external QtShareName name QtNamePrefix + 'QTextView_hook_destroy';
function QTextView_hook_create; external QtShareName name QtNamePrefix + 'QTextView_hook_create';
procedure QWhatsThis_hook_destroy; external QtShareName name QtNamePrefix + 'QWhatsThis_hook_destroy';
function QWhatsThis_hook_create; external QtShareName name QtNamePrefix + 'QWhatsThis_hook_create';
procedure QWindowsStyle_hook_destroy; external QtShareName name QtNamePrefix + 'QWindowsStyle_hook_destroy';
function QWindowsStyle_hook_create; external QtShareName name QtNamePrefix + 'QWindowsStyle_hook_create';
procedure QTimer_hook_destroy; external QtShareName name QtNamePrefix + 'QTimer_hook_destroy';
function QTimer_hook_create; external QtShareName name QtNamePrefix + 'QTimer_hook_create';
procedure QTimer_hook_hook_timeout; external QtShareName name QtNamePrefix + 'QTimer_hook_hook_timeout';
procedure QWorkspace_hook_destroy; external QtShareName name QtNamePrefix + 'QWorkspace_hook_destroy';
function QWorkspace_hook_create; external QtShareName name QtNamePrefix + 'QWorkspace_hook_create';
procedure QWorkspace_hook_hook_windowActivated; external QtShareName name QtNamePrefix + 'QWorkspace_hook_hook_windowActivated';
procedure QClxLineEdit_hook_destroy; external QtShareName name QtNamePrefix + 'QClxLineEdit_hook_destroy';
function QClxLineEdit_hook_create; external QtShareName name QtNamePrefix + 'QClxLineEdit_hook_create';
procedure QClxLineEdit_hook_hook_textChanged; external QtShareName name QtNamePrefix + 'QClxLineEdit_hook_hook_textChanged';
procedure QClxLineEdit_hook_hook_returnPressed; external QtShareName name QtNamePrefix + 'QClxLineEdit_hook_hook_returnPressed';
procedure Qt_hook_hook_events; external QtShareName name QtNamePrefix + 'Qt_hook_hook_events';
procedure InitializePAnsiString; external QtShareName name QtNamePrefix + 'initPAnsiStrings';
procedure InitializePWideString; external QtShareName name QtNamePrefix + 'initPWideStrings';
procedure InitializePPointArray; external QtShareName name QtNamePrefix + 'initializePPointArray';
procedure InitializePIntArray; external QtShareName name QtNamePrefix + 'initializePIntArray';
procedure bitBlt(dst: QPaintDeviceH; dp: PPoint; src: QPaintDeviceH; sr: PRect;
rop: RasterOp);
external QtShareName name QtNamePrefix + 'bitBlt_1';
procedure bitBlt(dst: QPaintDeviceH; dx: Integer; dy: Integer;
src: QPaintDeviceH; sx: Integer; sy: Integer; sw: Integer; sh: Integer;
rop: RasterOp; IgnoreMask: Boolean);
external QtShareName name QtNamePrefix + 'bitBlt_2';
procedure bitBlt(dst: QImageH; dx, dy: Integer; src: QImageH; sx, sy, sw, sh,
conversion_flags: Integer);
external QtShareName name QtNamePrefix + 'bitBlt_3';
function QClxWidget_MaxWidgetSize; external QtShareName name QtNamePrefix + 'QClxWidget_MaxWidgetSize';
procedure QWorkspace_next; external QtShareName name QtNamePrefix + 'QWorkspace_next';
procedure QWorkspace_previous; external QtShareName name QtNamePrefix + 'QWorkspace_previous';
{$IFDEF MSWINDOWS}
procedure setPopupParent; external QtShareName name QtNamePrefix + 'setPopupParent';
{$ENDIF}
{$IFDEF LINUX}
function QtDisplay; external QtShareName name QtNamePrefix + 'QtDisplay';
{$ENDIF}
function qApp_created; external QtShareName name QtNamePrefix + 'QApp_created';
function QMimeSource_is_QClxMimeSource; external QtShareName name QtNamePrefix + 'QMimeSource_is_QClxMimeSource';
function QByteArray_create; external QtShareName name QtNamePrefix + 'QByteArray_create';
procedure QByteArray_destroy; external QtShareName name QtNamePrefix + 'QByteArray_destroy';
function QEvent_isQCustomEvent; external QtShareName name QtNamePrefix + 'QEvent_isQCustomEvent';
function QEvent_isQShowEvent; external QtShareName name QtNamePrefix + 'QEvent_isQShowEvent';
function QEvent_isQTimerEvent; external QtShareName name QtNamePrefix + 'QEvent_isQTimerEvent';
function QEvent_isQMouseEvent; external QtShareName name QtNamePrefix + 'QEvent_isQMouseEvent';
function QEvent_isQWheelEvent; external QtShareName name QtNamePrefix + 'QEvent_isQWheelEvent';
function QEvent_isQKeyEvent; external QtShareName name QtNamePrefix + 'QEvent_isQKeyEvent';
function QEvent_isQFocusEvent; external QtShareName name QtNamePrefix + 'QEvent_isQFocusEvent';
function QEvent_isQPaintEvent; external QtShareName name QtNamePrefix + 'QEvent_isQPaintEvent';
function QEvent_isQMoveEvent; external QtShareName name QtNamePrefix + 'QEvent_isQMoveEvent';
function QEvent_isQResizeEvent; external QtShareName name QtNamePrefix + 'QEvent_isQResizeEvent';
function QEvent_isQCloseEvent; external QtShareName name QtNamePrefix + 'QEvent_isQCloseEvent';
function QEvent_isQHideEvent; external QtShareName name QtNamePrefix + 'QEvent_isQHideEvent';
function QEvent_isQDropEvent; external QtShareName name QtNamePrefix + 'QEvent_isQDropEvent';
function QEvent_isQDragMoveEvent; external QtShareName name QtNamePrefix + 'QEvent_isQDragMoveEvent';
function QEvent_isQDragEnterEvent; external QtShareName name QtNamePrefix + 'QEvent_isQDragEnterEvent';
function QEvent_isQDragResponseEvent; external QtShareName name QtNamePrefix + 'QEvent_isQDragResponseEvent';
function QEvent_isQDragLeaveEvent; external QtShareName name QtNamePrefix + 'QEvent_isQDragLeaveEvent';
function QEvent_isQChildEvent; external QtShareName name QtNamePrefix + 'QEvent_isQChildEvent';
function QObjectList_create: QObjectListH; cdecl; external QtShareName name QtNamePrefix + 'QObjectList_create';
function QObjectList_create(list: QObjectListH): QObjectListH; cdecl; external QtShareName name QtNamePrefix + 'QObjectList_create2';
procedure QObjectList_destroy; external QtShareName name QtNamePrefix + 'QObjectList_destroy';
function QObjectList_count; external QtShareName name QtNamePrefix + 'QObjectList_count';
function QObjectList_isEmpty; external QtShareName name QtNamePrefix + 'QObjectList_isEmpty';
function QObjectList_insert; external QtShareName name QtNamePrefix + 'QObjectList_insert';
procedure QObjectList_inSort; external QtShareName name QtNamePrefix + 'QObjectList_inSort';
procedure QObjectList_prepend; external QtShareName name QtNamePrefix + 'QObjectList_prepend';
procedure QObjectList_append; external QtShareName name QtNamePrefix + 'QObjectList_append';
function QObjectList_remove(obj: QObjectListH; i: Cardinal): Boolean; cdecl; external QtShareName name QtNamePrefix + 'QObjectList_remove';
function QObjectList_remove(obj: QObjectListH): Boolean; cdecl; external QtShareName name QtNamePrefix + 'QObjectList_remove2';
function QObjectList_remove(obj: QObjectListH; d: QObjectH): Boolean; cdecl; external QtShareName name QtNamePrefix + 'QObjectList_remove3';
function QObjectList_removeRef; external QtShareName name QtNamePrefix + 'QObjectList_removeRef';
function QObjectList_removeFirst; external QtShareName name QtNamePrefix + 'QObjectList_removeFirst';
function QObjectList_removeLast; external QtShareName name QtNamePrefix + 'QObjectList_removeLast';
function QObjectList_take(obj: QObjectListH; i: Cardinal): QObjectH; cdecl; external QtShareName name QtNamePrefix + 'QObjectList_take';
function QObjectList_take(obj: QObjectListH): QObjectH; cdecl; external QtShareName name QtNamePrefix + 'QObjectList_take2';
procedure QObjectList_clear; external QtShareName name QtNamePrefix + 'QObjectList_clear';
procedure QObjectList_sort; external QtShareName name QtNamePrefix + 'QObjectList_sort';
function QObjectList_find; external QtShareName name QtNamePrefix + 'QObjectList_find';
function QObjectList_findNext; external QtShareName name QtNamePrefix + 'QObjectList_findNext';
function QObjectList_findRef; external QtShareName name QtNamePrefix + 'QObjectList_findRef';
function QObjectList_findNextRef; external QtShareName name QtNamePrefix + 'QObjectList_findRef';
function QObjectList_contains; external QtShareName name QtNamePrefix + 'QObjectList_contains';
function QObjectList_containsRef; external QtShareName name QtNamePrefix + 'QObjectList_containsRef';
function QObjectList_at(obj: QObjectListH; i: Cardinal): QObjectH; cdecl; external QtShareName name QtNamePrefix + 'QObjectList_at';
function QObjectList_at(obj: QObjectListH): Integer; cdecl; external QtShareName name QtNamePrefix + 'QObjectList_at2';
function QObjectList_current; external QtShareName name QtNamePrefix + 'QObjectList_current';
function QObjectList_getFirst; external QtShareName name QtNamePrefix + 'QObjectList_current';
function QObjectList_getLast; external QtShareName name QtNamePrefix + 'QObjectList_getLast';
function QObjectList_first; external QtShareName name QtNamePrefix + 'QObjectList_first';
function QObjectList_last; external QtShareName name QtNamePrefix + 'QObjectList_last';
function QObjectList_next; external QtShareName name QtNamePrefix + 'QObjectList_next';
function QObjectList_prev; external QtShareName name QtNamePrefix + 'QObjectList_prev';
function QWidgetList_create: QWidgetListH; cdecl; external QtShareName name QtNamePrefix + 'QWidgetList_create';
function QWidgetList_create(list: QWidgetListH): QWidgetListH; cdecl; external QtShareName name QtNamePrefix + 'QWidgetList_create2';
procedure QWidgetList_destroy; external QtShareName name QtNamePrefix + 'QWidgetList_destroy';
function QWidgetList_count; external QtShareName name QtNamePrefix + 'QWidgetList_count';
function QWidgetList_insert; external QtShareName name QtNamePrefix + 'QWidgetList_insert';
function QWidgetList_remove(obj: QWidgetListH; i: Cardinal): Boolean; cdecl; external QtShareName name QtNamePrefix + 'QWidgetList_remove';
function QWidgetList_remove(obj: QWidgetListH; d: QWidgetH): Boolean; cdecl; external QtShareName name QtNamePrefix + 'QWidgetList_remove3';
procedure QWidgetList_clear; external QtShareName name QtNamePrefix + 'QWidgetList_clear';
function QWidgetList_find; external QtShareName name QtNamePrefix + 'QWidgetList_find';
function QWidgetList_findNext; external QtShareName name QtNamePrefix + 'QWidgetList_findNext';
function QWidgetList_contains; external QtShareName name QtNamePrefix + 'QWidgetList_contains';
function QWidgetList_at(obj: QWidgetListH; i: Cardinal): QWidgetH; cdecl; external QtShareName name QtNamePrefix + 'QWidgetList_at';
function QWidgetList_current; external QtShareName name QtNamePrefix + 'QWidgetList_current';
function QWidgetList_first; external QtShareName name QtNamePrefix + 'QWidgetList_first';
function QWidgetList_last; external QtShareName name QtNamePrefix + 'QWidgetList_last';
function QWidgetList_next; external QtShareName name QtNamePrefix + 'QWidgetList_next';
function QWidgetList_prev; external QtShareName name QtNamePrefix + 'QWidgetList_prev';
function QBitmap_from_QPixmap; external QtShareName name QtNamePrefix + 'QBitmap_from_QPixmap';
end.
|
unit uGMV_Utils;
interface
uses SysUtils
,Forms;
Type
TVitalFunction = (
vfInit,
vfAdd,
vfSubtract);
function TitleCase(Value: string): string;
function StrToFloatDef(const Str: string; Def: extended): extended;
procedure VitalMath(var Value: string; FuncValue, Default: extended; Func: TVitalFunction; Decml: integer);
function ReplacePunctuation(s:String):String;
function formatSSN(sSSN:String):String;
function formatPatientName(sInfo:String):String;
function formatPatientInfo(sInfo:String):String;
function CalculateBMI(const WeightInLbs: Double; const HeightInInches: Double): Double;
function ConvertInToCm(const Inches: Double): Double;
function ConvertCmToIn(const Centimeters: Double): Double;
function ConvertLbsToKgs(const Pounds: Double): Double;
function ConvertKgsToLbs(const Kilograms: Double): Double;
function ConvertFToC(const Fahrenheight: Double): Double;
function ConvertCToF(const Celsius: Double): Double;
function ConvertcmH20TommHg(const cmH20: Double): Double;
function ConvertmmHgTocmH20(const mmHg: Double): Double;
function iPOx(sValue:String): integer;
function iVal(gStr: string): integer;
function BPMean(BP: string): integer;
function HasNumericValue(s: string): Boolean;
function SeriesLabel(sLbl: string): string;
implementation
uses uGMV_Common;
function TitleCase(Value: string): string;
{Returns a string value in Title Case format}
begin
Result := UpperCase(Copy(Value, 1, 1));
while Length(Value) > 1 do
begin
if
((Copy(Value, 1, 1) >= 'A') and (Copy(Value, 1, 1) <= 'Z')) or
((Copy(Value, 1, 1) >= 'a') and (Copy(Value, 1, 1) <= 'z')) then
Result := Result + LowerCase(Copy(Value, 2, 1))
else
Result := Result + Copy(Value, 2, 1);
Value := Copy(Value, 2, Length(Value) - 1);
end;
end;
procedure VitalMath(var Value: string; FuncValue, Default: extended; Func: TVitalFunction; Decml: integer);
var
tmp: extended;
begin
if (Func = vfInit) then
tmp := Default
else
begin
tmp := StrToFloatDef(Value, Default);
case Func of
vfAdd: tmp := tmp + FuncValue;
vfSubtract: tmp := tmp - FuncValue;
end;
end;
if tmp <= 0 then tmp := 0; //added zzzzzzandria 050707
if (tmp = 0) then
Value := ''
else
Value := FloatToStrF(tmp, ffFixed, 8, Decml);
end;
function StrToFloatDef(const Str: string; Def: extended): extended;
begin
if (Str = '') then
Result := 0
else
begin
try
Result := StrToFloat(Str);
except
on EConvertError do
Result := Def
else
raise;
end;
end;
end;
function ReplacePunctuation(s:String):String;
var
ss: String;
i: Integer;
const
ALPHA = 'qwertyuiopasdfghjklzxcvbnm1234567890#QWERTYUIOPASDFGHJKLZXCVBNM-/';
// "/" added 2008-02-12 zzzzzzandria ===================================>
begin
ss := '';
for i := 1 to length(s) do
if pos(copy(s,i,1),ALPHA) = 0 then
ss := ss + ' '
else
ss := ss +copy(s,i,1);
Result := ss;
end;
function formatPatientName(sInfo:String):String;
var
s: String;
begin
s := sInfo;
while (copy(s,length(s),1)<>' ') and (Length(s)>0) do
s := copy(s,1,length(s)-1);
result := s;
end;
function formatPatientInfo(sInfo:String):String;
var
sSSN,
sDOB,
sAge : String;
begin
sSSN := Piece(sInfo,'DOB:',1);
while (Length(sSSN) > 0) and (
(pos('1',sSSN) <> 1) and
(pos('2',sSSN) <> 1) and
(pos('3',sSSN) <> 1) and
(pos('4',sSSN) <> 1) and
(pos('5',sSSN) <> 1) and
(pos('6',sSSN) <> 1) and
(pos('7',sSSN) <> 1) and
(pos('8',sSSN) <> 1) and
(pos('9',sSSN) <> 1) and
(pos('0',sSSN) <> 1)
) do
sSSN := copy(sSSN,2,Length(sSSN)-1);
if pos('*S',sSSN) <> 1 then
sSSN := copy(sSSN,1,3)+'-'+copy(sSSN,4,2)+'-'+copy(sSSN,6,4);
sAge := '('+piece(sInfo,'Age:',2)+')';
sDOB := piece(Piece(sInfo,'DOB: ',2),' ',1);
Result := sSSN + ' ' + sDOB + ' '+SAge;
end;
function formatSSN(sSSN:String):String;
var
s: String;
begin
s := sSSN;
While pos(' ',s) = 1 do
s := copy(s,2,length(s)-1);
if pos('*S',s)=1 then
Result := s
else
Result := copy(s,1,3)+'-'+copy(s,4,2)+'-'+copy(s,6,Length(s)-5);
end;
function CalculateBMI(const WeightInLbs: Double; const HeightInInches: Double): Double;
begin
Result := Round(WeightInLbs / (HeightInInches * HeightInInches)*100)*0.01;
end;
function ConvertInToCm(const Inches: Double): Double;
begin
Result := Round(Inches * 2.54 * 100) * 0.01;
end;
function ConvertCmToIn(const Centimeters: Double): Double;
begin
Result := Round(Centimeters / 2.54 * 1000) * 0.001;
end;
// R153954
function ConvertLbsToKgs(const Pounds: Double): Double;
begin
//// Result := Round(Pounds*100 / 2.2026431718)*0.01;
// Result := Round(Pounds*100 / 2.20462262)*0.01;
Result := Round(Pounds*100 * 0.45359237)*0.01;
end;
function ConvertKgsToLbs(const Kilograms: Double): Double;
begin
//// Result := Round(Kilograms * 220.26431718)*0.01;
// Result := Round(Kilograms * 220.462262)*0.01;
Result := Round(Kilograms/0.45359237 * 100)*0.01;
end;
function ConvertFToC(const Fahrenheight: Double): Double;
begin
Result := Round(((Fahrenheight - 32) * 5.0 / 9.0) * 10) * 0.1;
end;
function ConvertCToF(const Celsius: Double): Double;
begin
Result := Round(((Celsius * 9.0 / 5.0) + 32) * 10) * 0.1;
end;
function ConvertcmH20TommHg(const cmH20: Double): Double;
begin
Result := cmH20 / 1.36;//AAN 07/03/2002
end;
function ConvertmmHgTocmH20(const mmHg: Double): Double;
begin
Result := mmHg * 1.36;//AAN 07/03/2002
end;
function iPOx(sValue:String): integer;
var
s: String;
begin
if sValue = '' then
begin
Result := 0;
Exit;
end;
if pos('*',sValue) <> 0 then
s := piece(sValue,'*',1)
else
s := piece(sValue,' ',1);
try
Result := StrToInt(s);
except
Result := 0;
end;
end;
function iVal(gStr: string): integer;
var
i: integer;
begin
i := 1;
while StrToIntDef(Copy(gStr, i, 1), -1) > -1 do
inc(i);
Result := StrToIntDef(Copy(gStr, 1, i - 1), 0);
end;
function BPMean(BP: string): integer;
begin
Result := (iVal(BP) + iVal(Piece(BP, '/', 2))) div 2;
end;
function HasNumericValue(s: string): Boolean;
begin
Result := (StrToIntDef(Copy(s, 1, 1), 9999) <> 9999)
or (copy(s,1,1)='-') // zzzzzzandria 051107
;
end;
function SeriesLabel(sLbl: string): string;
begin
while Copy(sLbl, 1, 1) = ' ' do
sLbl := Copy(sLbl, 2, Length(sLbl));
Result := Copy(sLbl, 1, Pos(' ', sLbl) - 1) + #13 +
Copy(sLbl, Pos(' ', sLbl) + 1, Length(sLbl));
end;
end.
|
unit uFromHik86Task;
interface
uses
System.SysUtils, System.Classes, IniFiles, SyncObjs, IOUtils, Generics.Collections,
IdBaseComponent, IdComponent, IdCustomTCPServer, IdCustomHTTPServer, IdHttp, IdUri,
IdHTTPServer, IdContext, Types, uLogger, uGlobal, uTypes, UInterface, uPassList;
type
TFromHik86Task = class
private
IdHTTPServerIn: TIdHTTPServer;
ipList: string;
oldHost, newHost, FVioPicUrl, FVioPicPath: string;
procedure IdHTTPServerInCommandGet(AContext: TIdContext;
ARequestInfo: TIdHTTPRequestInfo; AResponseInfo: TIdHTTPResponseInfo);
function CheckIP(ip: string): boolean;
function DownloadPic(vioList: TList<TPass>): boolean;
public
constructor Create;
destructor Destroy; override;
end;
var
FromHik86Task: TFromHik86Task;
implementation
constructor TFromHik86Task.Create;
var
ini: TIniFile;
port: integer;
begin
ini := TIniFile.Create(ExtractFilePath(ParamStr(0)) + 'config.ini');
ipList := ini.ReadString('FromHik86', 'ip', '');
port := ini.ReadInteger('FromHik86', 'PORT', 18009);
oldHost := ini.ReadString('FromHik86', 'OldHost', '172.16.45.18:8088');
newHost := ini.ReadString('FromHik86', 'NewHost', '10.43.255.8:18008');
FVioPicUrl := ini.ReadString('FromHik86', 'VioPicUrl', '');
FVioPicPath := ini.ReadString('FromHik86', 'VioPicPath', '');
ini.Free;
IdHTTPServerIn := TIdHTTPServer.Create(nil);
IdHTTPServerIn.Bindings.Clear;
IdHTTPServerIn.DefaultPort := port;
IdHTTPServerIn.OnCommandGet := self.IdHTTPServerInCommandGet;
try
IdHTTPServerIn.Active := True;
logger.logging('FromHik86Task start', 2);
except
on e: Exception do
begin
logger.logging(e.Message, 4);
end;
end;
end;
procedure TFromHik86Task.IdHTTPServerInCommandGet(AContext: TIdContext;
ARequestInfo: TIdHTTPRequestInfo; AResponseInfo: TIdHTTPResponseInfo);
var
action, ip, s: string;
ss: TStringList;
pass: TPass;
device: TDevice;
arr: TArray<string>;
vioList: TList<TPass>;
begin
action := ARequestInfo.Document.Substring(1);
ip := AContext.Connection.Socket.Binding.PeerIP;
//logger.logging('[' + ip + ']' + action, 2);
if not CheckIP(ip) then
begin
logger.Warn('Invalid IP Or Action!');
exit;
end;
if ARequestInfo.PostStream = nil then
begin
logger.Warn('ARequestInfo.PostStream is null!');
exit;
end;
vioList := TList<TPass>.Create;
ss := TStringList.Create;
try
ss.LoadFromStream(ARequestInfo.PostStream);
logger.Info('RecordCount:' + ss.Count.ToString);
for s in ss do
begin
arr := s.Split([#9]);
if Length(arr) >= 10 then
begin //CLXXBH,KKBH,JGSK,CDBH,HPHM,HPZL,HPYS,CSYS,CLSD,QJTP,QJTP1,QJTP2,WFXW
pass.GCXH := arr[0];
pass.kdbh := arr[1];
pass.gcsj := arr[2];
pass.cdbh := arr[3];
pass.HPHM := arr[4];
pass.HPZL := arr[5];
pass.hpys := arr[6];
pass.CSYS := arr[7];
pass.clsd := arr[8];
pass.tp1 := arr[9];
pass.tp2 := arr[10];
pass.tp3 := arr[11];
pass.WFXW := '';
if Length(arr) >= 13 then
pass.WFXW := arr[12];
pass.FWQDZ := '';
pass.tp1 := pass.tp1.Replace(oldHost, newHost);
pass.tp2 := pass.tp2.Replace(oldHost, newHost);
pass.tp3 := pass.tp3.Replace(oldHost, newHost);
pass.tp1 := pass.tp1 + '&ISSTREAM=1&appName=pic';
if pass.tp2 <> '' then
pass.tp2 := pass.tp2 + '&ISSTREAM=1&appName=pic';
if pass.tp3 <> '' then
pass.tp3 := pass.tp3 + '&ISSTREAM=1&appName=pic';
pass.KKSOURCE := 'FromHIK86';
if gDicDevice.ContainsKey(pass.kdbh) then
begin
device := gDicDevice[pass.kdbh];
if (device.TPGS = '1') then //非治安卡口
begin
if (Length(Trim(device.babh)) > 0) then
begin
Tmypint.WriteVehicleInfo(pass, device);
end;
// Tmypint.DoAlarm(pass); // 暂不预警
PassList.Add(pass);
end;
if (pass.WFXW.Length >= 4) and ((device.lhy_cjfs = '3') or (device.lhy_cjfs = '7')) then
pass.WFXW := Tmypint.getSpeedtoWFXW(pass.HPZL, strtointdef(pass.clsd, 0), device.XZSD);
end;
if pass.WFXW = '13441' then // 黄标车
begin
if not gDicHBC.ContainsKey(pass.HPHM + pass.HPZL) then
begin
pass.WFXW := '0';
end;
end;
if pass.WFXW.Length >= 4 then
begin
vioList.Add(pass);
end;
end;
//end;
end;
AResponseInfo.ContentText := 'OK';
except
on e: Exception do
begin
logger.Error(e.Message);
end;
end;
ss.Free;
if vioList.Count > 0 then
begin
DownloadPic(vioList);
TMypint.SaveVio1(vioList);
end;
vioList.Free;
end;
function TFromHik86Task.DownloadPic(vioList: TList<TPass>): boolean;
function Download(url, localPath, fileName: string): boolean;
var
http: TIdHttp;
stream: TMemoryStream;
begin
result := false;
if url = '' then exit;
http := TIdHttp.Create(nil);
stream := TMemoryStream.Create;
try
http.Get(url, stream);
stream.SaveToFile(localPath + fileName);
result := true;
except
on e: exception do
begin
logger.Error('[TFromHik86Task.DownloadPic]' + e.Message + url);
end;
end;
stream.Free;
http.Free;
end;
var
i: Integer;
pass: TPass;
newUrl, localPath, yyyymm, dd, kdbh, tp: string;
begin
result := true;
for i := 0 to vioList.Count - 1 do
begin
pass := vioList[i];
yyyymm := FormatDatetime('yyyymm', Now);
dd := FormatDatetime('dd', Now);
kdbh := pass.kdbh;
newUrl := Format('%s/%s/%s/%s/', [FVioPicUrl, yyyymm, dd, kdbh]);
localPath := Format('%s\%s\%s\%s\', [FVioPicPath, yyyymm, dd, kdbh]);
if not DirectoryExists(localPath) then
ForceDirectories(localPath);
tp := kdbh + pass.GCXH + '_1.jpg';
if Download(pass.tp1, localPath, tp) then
begin
pass.tp1 := newUrl + tp;
end;
tp := kdbh + pass.GCXH + '_2.jpg';
if Download(pass.tp2, localPath, tp) then
begin
pass.tp2 := newUrl + tp;
end;
tp := kdbh + pass.GCXH + '_3.jpg';
if Download(pass.tp3, localPath, tp) then
begin
pass.tp3 := newUrl + tp;
end;
vioList[i] := pass;
end;
end;
function TFromHik86Task.CheckIP(ip: string): boolean;
begin
result := (ipList = '') or ipList.Contains(ip);
end;
destructor TFromHik86Task.Destroy;
begin
idHttpServerIn.Active := false;
idHttpServerIn.Free;
logger.Info('FromHik86Task stoped');
end;
end.
|
unit frm_ediciontugs;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, db, FileUtil, Forms, Controls, Graphics, Dialogs, ExtCtrls,
StdCtrls, DBGrids, Buttons, DbCtrls, ZDataset, dmediciontugs
;
type
{ TfrmEdicionTugs }
TfrmEdicionTugs = class(TForm)
btnBorrar: TBitBtn;
btnSalir: TBitBtn;
ds_Resultados: TDatasource;
laGrilla: TDBGrid;
Panel1: TPanel;
Panel2: TPanel;
stTitulo: TStaticText;
procedure btnBorrarClick(Sender: TObject);
procedure btnSalirClick(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure FormDestroy(Sender: TObject);
procedure FormShow(Sender: TObject);
private
_laTug: TTablaTUG;
procedure CargarTug (value: TTablaTUG);
procedure ConfigurarGrilla;
procedure AgregarColumna (laColumna: TColumn; campo, titulo: string);
public
property laTUG: TTablaTUG write CargarTug;
end;
var
frmEdicionTugs: TfrmEdicionTugs;
implementation
{$R *.lfm}
{ TfrmEdicionTugs }
procedure TfrmEdicionTugs.btnBorrarClick(Sender: TObject);
begin
if (MessageDlg ('ATENCION', 'Borro el item seleccionado?', mtConfirmation, [mbYes, mbNo],0 ) = mrYes) then
DM_EdicionTUGs.EliminarFila;
end;
procedure TfrmEdicionTugs.btnSalirClick(Sender: TObject);
begin
ModalResult:= mrOK;
end;
procedure TfrmEdicionTugs.FormCreate(Sender: TObject);
begin
Application.CreateForm(TDM_EdicionTUGs, DM_EdicionTUGs);
end;
procedure TfrmEdicionTugs.FormDestroy(Sender: TObject);
begin
DM_EdicionTUGs.Free;
end;
procedure TfrmEdicionTugs.FormShow(Sender: TObject);
begin
end;
procedure TfrmEdicionTugs.CargarTug(value: TTablaTUG);
var
laTabla: TzTable;
begin
_laTug:= value;
stTitulo.Caption:= 'Edición de la tabla: ' + value.titulo;
laTabla:= DM_EdicionTUGs.FindComponent('tbTabla') as tzTable;
laTabla.Close;
laTabla.TableName:= value.nombre;
ds_Resultados.DataSet:= laTabla;
laTabla.Open;
ConfigurarGrilla;
end;
procedure TfrmEdicionTugs.AgregarColumna(laColumna: TColumn; campo,
titulo: string);
var
elCampo: TField;
begin
laColumna.FieldName:= campo;
laColumna.Title.Caption:= titulo;
elCampo:= ds_Resultados.DataSet.Fields.FindField (campo);
laColumna.Field.DisplayWidth:= 500;
if elCampo.DataType in [ftFloat, ftCurrency] then
laColumna.DisplayFormat:= '#######0.00';
end;
procedure TfrmEdicionTugs.ConfigurarGrilla;
var
idx: integer;
elCampo: TCampoTUG;
laColumna: TColumn;
elCampo2: TField;
begin
laGrilla.Columns.Clear;
for idx:= 0 to _laTug.CantidadCampos - 1 do
begin
elCampo:= _laTug.DevolverCampo(idx);
laGrilla.Columns.Add;
AgregarColumna(laGrilla.Columns[idx]
,elCampo.campo
,elCampo.titulo
);
end;
end;
end.
|
//
// Created by the DataSnap proxy generator.
// 23/02/2015 23:20:16
//
unit Proxy;
interface
uses System.JSON, Datasnap.DSProxyRest, Datasnap.DSClientRest, Data.DBXCommon, Data.DBXClient, Data.DBXDataSnap, Data.DBXJSON, Datasnap.DSProxy, System.Classes, System.SysUtils, Data.DB, Data.SqlExpr, Data.DBXDBReaders, Data.DBXCDSReaders, Data.FireDACJSONReflect, Data.DBXJSONReflect;
type
IDSRestCachedTFDJSONDataSets = interface;
TServerMethods1Client = class(TDSAdminRestClient)
private
FEchoStringCommand: TDSRestCommand;
FReverseStringCommand: TDSRestCommand;
FGetDepartmentNamesCommand: TDSRestCommand;
FGetDepartmentNamesCommand_Cache: TDSRestCommand;
FGetDepartmentEmployeesCommand: TDSRestCommand;
FGetDepartmentEmployeesCommand_Cache: TDSRestCommand;
FApplyChangesDepartmentEmployeesCommand: TDSRestCommand;
public
constructor Create(ARestConnection: TDSRestConnection); overload;
constructor Create(ARestConnection: TDSRestConnection; AInstanceOwner: Boolean); overload;
destructor Destroy; override;
function EchoString(Value: string; const ARequestFilter: string = ''): string;
function ReverseString(Value: string; const ARequestFilter: string = ''): string;
function GetDepartmentNames(const ARequestFilter: string = ''): TFDJSONDataSets;
function GetDepartmentNames_Cache(const ARequestFilter: string = ''): IDSRestCachedTFDJSONDataSets;
function GetDepartmentEmployees(AID: string; const ARequestFilter: string = ''): TFDJSONDataSets;
function GetDepartmentEmployees_Cache(AID: string; const ARequestFilter: string = ''): IDSRestCachedTFDJSONDataSets;
procedure ApplyChangesDepartmentEmployees(ADeltaList: TFDJSONDeltas);
end;
IDSRestCachedTFDJSONDataSets = interface(IDSRestCachedObject<TFDJSONDataSets>)
end;
TDSRestCachedTFDJSONDataSets = class(TDSRestCachedObject<TFDJSONDataSets>, IDSRestCachedTFDJSONDataSets, IDSRestCachedCommand)
end;
const
TServerMethods1_EchoString: array [0..1] of TDSRestParameterMetaData =
(
(Name: 'Value'; Direction: 1; DBXType: 26; TypeName: 'string'),
(Name: ''; Direction: 4; DBXType: 26; TypeName: 'string')
);
TServerMethods1_ReverseString: array [0..1] of TDSRestParameterMetaData =
(
(Name: 'Value'; Direction: 1; DBXType: 26; TypeName: 'string'),
(Name: ''; Direction: 4; DBXType: 26; TypeName: 'string')
);
TServerMethods1_GetDepartmentNames: array [0..0] of TDSRestParameterMetaData =
(
(Name: ''; Direction: 4; DBXType: 37; TypeName: 'TFDJSONDataSets')
);
TServerMethods1_GetDepartmentNames_Cache: array [0..0] of TDSRestParameterMetaData =
(
(Name: ''; Direction: 4; DBXType: 26; TypeName: 'String')
);
TServerMethods1_GetDepartmentEmployees: array [0..1] of TDSRestParameterMetaData =
(
(Name: 'AID'; Direction: 1; DBXType: 26; TypeName: 'string'),
(Name: ''; Direction: 4; DBXType: 37; TypeName: 'TFDJSONDataSets')
);
TServerMethods1_GetDepartmentEmployees_Cache: array [0..1] of TDSRestParameterMetaData =
(
(Name: 'AID'; Direction: 1; DBXType: 26; TypeName: 'string'),
(Name: ''; Direction: 4; DBXType: 26; TypeName: 'String')
);
TServerMethods1_ApplyChangesDepartmentEmployees: array [0..0] of TDSRestParameterMetaData =
(
(Name: 'ADeltaList'; Direction: 1; DBXType: 37; TypeName: 'TFDJSONDeltas')
);
implementation
function TServerMethods1Client.EchoString(Value: string; const ARequestFilter: string): string;
begin
if FEchoStringCommand = nil then
begin
FEchoStringCommand := FConnection.CreateCommand;
FEchoStringCommand.RequestType := 'GET';
FEchoStringCommand.Text := 'TServerMethods1.EchoString';
FEchoStringCommand.Prepare(TServerMethods1_EchoString);
end;
FEchoStringCommand.Parameters[0].Value.SetWideString(Value);
FEchoStringCommand.Execute(ARequestFilter);
Result := FEchoStringCommand.Parameters[1].Value.GetWideString;
end;
function TServerMethods1Client.ReverseString(Value: string; const ARequestFilter: string): string;
begin
if FReverseStringCommand = nil then
begin
FReverseStringCommand := FConnection.CreateCommand;
FReverseStringCommand.RequestType := 'GET';
FReverseStringCommand.Text := 'TServerMethods1.ReverseString';
FReverseStringCommand.Prepare(TServerMethods1_ReverseString);
end;
FReverseStringCommand.Parameters[0].Value.SetWideString(Value);
FReverseStringCommand.Execute(ARequestFilter);
Result := FReverseStringCommand.Parameters[1].Value.GetWideString;
end;
function TServerMethods1Client.GetDepartmentNames(const ARequestFilter: string): TFDJSONDataSets;
begin
if FGetDepartmentNamesCommand = nil then
begin
FGetDepartmentNamesCommand := FConnection.CreateCommand;
FGetDepartmentNamesCommand.RequestType := 'GET';
FGetDepartmentNamesCommand.Text := 'TServerMethods1.GetDepartmentNames';
FGetDepartmentNamesCommand.Prepare(TServerMethods1_GetDepartmentNames);
end;
FGetDepartmentNamesCommand.Execute(ARequestFilter);
if not FGetDepartmentNamesCommand.Parameters[0].Value.IsNull then
begin
FUnMarshal := TDSRestCommand(FGetDepartmentNamesCommand.Parameters[0].ConnectionHandler).GetJSONUnMarshaler;
try
Result := TFDJSONDataSets(FUnMarshal.UnMarshal(FGetDepartmentNamesCommand.Parameters[0].Value.GetJSONValue(True)));
if FInstanceOwner then
FGetDepartmentNamesCommand.FreeOnExecute(Result);
finally
FreeAndNil(FUnMarshal)
end
end
else
Result := nil;
end;
function TServerMethods1Client.GetDepartmentNames_Cache(const ARequestFilter: string): IDSRestCachedTFDJSONDataSets;
begin
if FGetDepartmentNamesCommand_Cache = nil then
begin
FGetDepartmentNamesCommand_Cache := FConnection.CreateCommand;
FGetDepartmentNamesCommand_Cache.RequestType := 'GET';
FGetDepartmentNamesCommand_Cache.Text := 'TServerMethods1.GetDepartmentNames';
FGetDepartmentNamesCommand_Cache.Prepare(TServerMethods1_GetDepartmentNames_Cache);
end;
FGetDepartmentNamesCommand_Cache.ExecuteCache(ARequestFilter);
Result := TDSRestCachedTFDJSONDataSets.Create(FGetDepartmentNamesCommand_Cache.Parameters[0].Value.GetString);
end;
function TServerMethods1Client.GetDepartmentEmployees(AID: string; const ARequestFilter: string): TFDJSONDataSets;
begin
if FGetDepartmentEmployeesCommand = nil then
begin
FGetDepartmentEmployeesCommand := FConnection.CreateCommand;
FGetDepartmentEmployeesCommand.RequestType := 'GET';
FGetDepartmentEmployeesCommand.Text := 'TServerMethods1.GetDepartmentEmployees';
FGetDepartmentEmployeesCommand.Prepare(TServerMethods1_GetDepartmentEmployees);
end;
FGetDepartmentEmployeesCommand.Parameters[0].Value.SetWideString(AID);
FGetDepartmentEmployeesCommand.Execute(ARequestFilter);
if not FGetDepartmentEmployeesCommand.Parameters[1].Value.IsNull then
begin
FUnMarshal := TDSRestCommand(FGetDepartmentEmployeesCommand.Parameters[1].ConnectionHandler).GetJSONUnMarshaler;
try
Result := TFDJSONDataSets(FUnMarshal.UnMarshal(FGetDepartmentEmployeesCommand.Parameters[1].Value.GetJSONValue(True)));
if FInstanceOwner then
FGetDepartmentEmployeesCommand.FreeOnExecute(Result);
finally
FreeAndNil(FUnMarshal)
end
end
else
Result := nil;
end;
function TServerMethods1Client.GetDepartmentEmployees_Cache(AID: string; const ARequestFilter: string): IDSRestCachedTFDJSONDataSets;
begin
if FGetDepartmentEmployeesCommand_Cache = nil then
begin
FGetDepartmentEmployeesCommand_Cache := FConnection.CreateCommand;
FGetDepartmentEmployeesCommand_Cache.RequestType := 'GET';
FGetDepartmentEmployeesCommand_Cache.Text := 'TServerMethods1.GetDepartmentEmployees';
FGetDepartmentEmployeesCommand_Cache.Prepare(TServerMethods1_GetDepartmentEmployees_Cache);
end;
FGetDepartmentEmployeesCommand_Cache.Parameters[0].Value.SetWideString(AID);
FGetDepartmentEmployeesCommand_Cache.ExecuteCache(ARequestFilter);
Result := TDSRestCachedTFDJSONDataSets.Create(FGetDepartmentEmployeesCommand_Cache.Parameters[1].Value.GetString);
end;
procedure TServerMethods1Client.ApplyChangesDepartmentEmployees(ADeltaList: TFDJSONDeltas);
begin
if FApplyChangesDepartmentEmployeesCommand = nil then
begin
FApplyChangesDepartmentEmployeesCommand := FConnection.CreateCommand;
FApplyChangesDepartmentEmployeesCommand.RequestType := 'POST';
FApplyChangesDepartmentEmployeesCommand.Text := 'TServerMethods1."ApplyChangesDepartmentEmployees"';
FApplyChangesDepartmentEmployeesCommand.Prepare(TServerMethods1_ApplyChangesDepartmentEmployees);
end;
if not Assigned(ADeltaList) then
FApplyChangesDepartmentEmployeesCommand.Parameters[0].Value.SetNull
else
begin
FMarshal := TDSRestCommand(FApplyChangesDepartmentEmployeesCommand.Parameters[0].ConnectionHandler).GetJSONMarshaler;
try
FApplyChangesDepartmentEmployeesCommand.Parameters[0].Value.SetJSONValue(FMarshal.Marshal(ADeltaList), True);
if FInstanceOwner then
ADeltaList.Free
finally
FreeAndNil(FMarshal)
end
end;
FApplyChangesDepartmentEmployeesCommand.Execute;
end;
constructor TServerMethods1Client.Create(ARestConnection: TDSRestConnection);
begin
inherited Create(ARestConnection);
end;
constructor TServerMethods1Client.Create(ARestConnection: TDSRestConnection; AInstanceOwner: Boolean);
begin
inherited Create(ARestConnection, AInstanceOwner);
end;
destructor TServerMethods1Client.Destroy;
begin
FEchoStringCommand.DisposeOf;
FReverseStringCommand.DisposeOf;
FGetDepartmentNamesCommand.DisposeOf;
FGetDepartmentNamesCommand_Cache.DisposeOf;
FGetDepartmentEmployeesCommand.DisposeOf;
FGetDepartmentEmployeesCommand_Cache.DisposeOf;
FApplyChangesDepartmentEmployeesCommand.DisposeOf;
inherited;
end;
end.
|
program TestCase;
procedure switch(sel : Integer);
begin
case sel of
0: WriteLn('hello 0');
1: WriteLn('hello 1');
2: WriteLn('hello 2');
3,4: WriteLn('hello 3 or 4');
5..10: WriteLn('hello 5 through 10');
otherwise begin
WriteLn('unrecognize selector:');
WriteLn(sel);
end;
end;
end;
begin
switch(0);
switch(1);
switch(2);
switch(3);
switch(4);
switch(5);
switch(10);
switch(11);
end.
|
program _demo;
Array[0]
var
Y : TReal1DArray;
N : AlglibInteger;
I : AlglibInteger;
T : Double;
P : BarycentricInterpolant;
V : Double;
DV : Double;
D2V : Double;
Err : Double;
MaxErr : Double;
begin
//
// Demonstration
//
Write(Format('POLYNOMIAL INTERPOLATION'#13#10''#13#10'',[]));
Write(Format('F(x)=sin(x), [0, pi]'#13#10'',[]));
Write(Format('Second degree polynomial is used'#13#10''#13#10'',[]));
//
// Create polynomial interpolant
//
N := 3;
SetLength(Y, N);
I:=0;
while I<=N-1 do
begin
Y[I] := Sin(0.5*Pi*(1.0+Cos(Pi*I/(N-1))));
Inc(I);
end;
PolynomialBuildCheb2(0, Pi, Y, N, P);
//
// Output results
//
BarycentricDiff2(P, 0, V, DV, D2V);
Write(Format(' P(x) F(x) '#13#10'',[]));
Write(Format('function %6.3f %6.3f '#13#10'',[
BarycentricCalc(P, 0),
Double(Variant(0))]));
Write(Format('d/dx(0) %6.3f %6.3f '#13#10'',[
DV,
Double(Variant(1))]));
Write(Format('d2/dx2(0) %6.3f %6.3f '#13#10'',[
D2V,
Double(Variant(0))]));
Write(Format(''#13#10''#13#10'',[]));
end. |
unit PascalCoin.RPC.Test.RawOp;
interface
uses
System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants,
FMX.Types, FMX.Graphics, FMX.Controls, FMX.Forms, FMX.Dialogs, FMX.StdCtrls,
FMX.Edit, FMX.Controls.Presentation, FMX.Layouts, FMX.ScrollBox, FMX.Memo,
PascalCoin.Utils.Interfaces, FMX.ListBox, PascalCoin.RawOp.Interfaces;
type
TRawOpFrame = class(TFrame)
Layout1: TLayout;
Layout2: TLayout;
Label1: TLabel;
FromAccount: TEdit;
Layout3: TLayout;
Label2: TLabel;
NextNOp: TEdit;
Label3: TLabel;
ToAccount: TEdit;
Layout5: TLayout;
Label4: TLabel;
Fee: TEdit;
Label5: TLabel;
Amount: TEdit;
StdCheckDataBtn: TButton;
Layout8: TLayout;
Label7: TLabel;
PrivateKey: TEdit;
Label8: TLabel;
Payload: TEdit;
CreateRawOp: TButton;
Memo1: TMemo;
KeyTypeCombo: TComboBox;
Label6: TLabel;
Layout4: TLayout;
Label9: TLabel;
KRandom: TEdit;
UseClass: TCheckBox;
OpNumber: TEdit;
Label10: TLabel;
procedure CreateRawOpClick(Sender: TObject);
procedure StdCheckDataBtnClick(Sender: TObject);
private
{ Private declarations }
FExpectedSender: string;
FExpectedNOp: string;
FExpectedReceiver: string;
FExpectedAmount: string;
FExpectedFee: string;
FExpectedHash: string;
FExpectedHashSig: string;
FExpectedPaylen: string;
FExpectedPayload: string;
FExpectedRawOp: string;
FExpectedRLen: string;
FExpectedSignedTx: string;
FExpectedStrToHash: string;
FExpectedSignR: string;
FExpectedSignS: string;
FExpectedSLen: string;
procedure UseObject;
public
{ Public declarations }
constructor Create(AOwner: TComponent); override;
end;
implementation
{$R *.fmx}
uses PascalCoin.KeyTool, ClpConverters, clpEncoders, SynCrypto, System.Rtti,
PascalCoin.RawOp.Classes, PascalCoin.Wallet.Classes;
constructor TRawOpFrame.Create(AOwner: TComponent);
var KT: TKeyType;
begin
inherited;
for KT := Low(TKeyType) to High(TKeyType) do
KeyTypeCombo.Items.Add(TRttiEnumerationType.GetName<TKeyType>(KT));
end;
procedure TRawOpFrame.CreateRawOpClick(Sender: TObject);
procedure AddToMemo(AName, AValue, AExpected: string);
const
c_bool: array[boolean] of string = ('No', 'Yes');
begin
Memo1.Lines.Add(AName + ' | ' + c_bool[AValue = AExpected] + ' | ' + AValue + ' | ' +
AExpected
);
end;
var KeyTools: IKeyTools;
lStrToHash, lRawOp: String;
lSLE: TBytes;
lSHex: string;
cAmount: Currency;
uAmount: uInt64;
KT: TKeyType;
lSender, lNOp, lReceiver, lAmount, lFee, lPayload, lHash, SigR, SigS: string;
lPayLen, lSigRLen, lSigSLen: string;
lSig: TECDSA_Signature;
lPayLenI :Integer;
begin
if UseClass.IsChecked then
begin
UseObject;
Exit;
end;
KeyTools := TPascalCoinKeyTools.Create;
Memo1.ClearContent;
lSLE := TConverters.ReadUInt32AsBytesLE(FromAccount.Text.ToInteger);
lSender := THEX.EnCode(lSLE);// TConverters.ConvertBytesToHexString(lSLE, False);
AddToMemo('Sender', lSender, FExpectedSender);
lSLE := TConverters.ReadUInt32AsBytesLE(NextNOp.Text.ToInteger);
lNOp := THEX.EnCode(lSLE);//TConverters.ConvertBytesToHexString(lSLE, False);
AddToMemo('NOp', lNOp, FExpectedNOp);
lSLE := TConverters.ReadUInt32AsBytesLE(ToAccount.Text.ToInteger);
lReceiver := THEX.EnCode(lSLE);//TConverters.ConvertBytesToHexString(lSLE, False);
AddToMemo('Receiver', lReceiver, FExpectedReceiver);
cAmount := Amount.Text.ToDouble;
uAmount := Trunc(cAmount * 10000);
AddToMemo('Amount', uAmount.ToString, '35000');
lSLE := TConverters.ReadUInt64AsBytesLE(uAmount);
lAmount := THEX.EnCode(lSLE);//TConverters.ConvertBytesToHexString(lSLE, False);
AddToMemo('Amount Hex', lAmount, FExpectedAmount);
cAmount := Fee.Text.ToDouble;
uAmount := Trunc(cAmount * 10000);
AddToMemo('Fee', uAmount.ToString, '1');
lSLE := TConverters.ReadUInt64AsBytesLE(uAmount);
lFee := THEX.EnCode(lSLE);//TConverters.ConvertBytesToHexString(lSLE, False);
AddToMemo('Fee HEX', lFee, FExpectedFee);
lSLE := TConverters.ConvertStringToBytes(Payload.Text, TEncoding.ANSI);
lPayload := THex.Encode(lSLE, True);
AddToMemo('Payload', lPayload, FExpectedPayload);
lPayLenI := Payload.Text.Length;
lSLE := KeyTools.UInt32ToLittleEndianByteArrayTwoBytes(lPayLenI);
lPayLen := THEX.EnCode(lSLE);//TConverters.ConvertBytesToHexString(lSLE, False);
AddToMemo('Payload Length', lPaylen, FExpectedPaylen);
lStrToHash := lSender + lNOp + lReceiver + lAmount + lFee + lPayload + '0000' + '01';
AddToMemo('StringToHash', lStrToHash, FExpectedStrToHash);
lHash := THEX.Encode(
KeyTools.ComputeSHA2_256_ToBytes(THEX.Decode(lStrToHash)));
AddToMemo('HASH', lHash, FExpectedHash);
KT := TRttiEnumerationType.GetValue<TKeyType>(KeyTypeCombo.Items[KeyTypeCombo.ItemIndex]);
KeyTools.SignOperation(PrivateKey.Text, KT, lHash, lSig, KRandom.Text);
SigR := lSig.R;
SigS := lSig.S;
AddToMemo('Sig.R', SigR, FExpectedSignR);
AddToMemo('Sig.S', SigS, FExpectedSignS);
lSLE := KeyTools.UInt32ToLittleEndianByteArrayTwoBytes(lSig.RLen);
lSigRLen := THEX.EnCode(lSLE);
lSLE := KeyTools.UInt32ToLittleEndianByteArrayTwoBytes(lSig.SLen);
lSigSLen := THEX.EnCode(lSLE);
AddToMemo('Sig.R.Len', lSigRLen, FExpectedRLen);
AddToMemo('Sig.S.Len', lSigSLen, FExpectedSLen);
lRawOp :=
THEX.Encode(TConverters.ReadUInt32AsBytesLE(1)) + lSender + lNOp + lReceiver + lAmount + lFee + lPayLen + lPayload +
'000000000000' + lSigRLen + SigR + lSigSLen + SigS;
//prefix with count of operations
lRawOp := '01000000' + lRawOp;
AddToMemo('Raw Op', lRawOp, FExpectedRawOp);
end;
procedure TRawOpFrame.StdCheckDataBtnClick(Sender: TObject);
begin
FromAccount.Text := '3700';
ToAccount.Text := '7890';
NextNOp.Text := '2';
Amount.Text := '3.5';
Fee.Text := '0.0001';
Payload.Text := 'EXAMPLE';
PrivateKey.Text := '37B799726961D231492823513F5686B3F7C7909DEFF20907D91BF4D24A356624';
KeyTypeCombo.ItemIndex := KeyTypeCombo.Items.IndexOf('SECP256K1');
KRandom.Text := 'A235553C44D970D0FC4D0C6C1AF80330BF06E3B4A6C039A7B9E8A2B5D3722D1F';
OpNumber.Text := '1';
FExpectedSender := '740E0000';
FExpectedNOp := '02000000';
FExpectedReceiver := 'D21E0000';
FExpectedAmount := 'B888000000000000';
FExpectedFee := '0100000000000000';
FExpectedPayload := '4558414D504C45';
FExpectedPaylen := '0700';
FExpectedStrToHash := '740E000002000000D21E0000B88800000000000001000000000000004558414D504C45000001';
FExpectedHash := 'B8C2057F4BA187B7A29CC810DB56B66C7B9361FA64FD77BADC759DD21FF4ABE7';
FExpectedHashSig := '37B799726961D231492823513F5686B3F7C7909DEFF20907D91BF4D24A356624';
FExpectedSignR := 'EFD5CBC12F6CC347ED55F26471E046CF59C87E099513F56F4F1DD49BDFA84C0E';
FExpectedRLen := '2000';
FExpectedSignS := '7BCB0D96A93202A9C6F11D90BFDCAB99F513C880C4888FECAC74D9B09618C06E';
FExpectedSLen := '2000';
FExpectedSignedTx := '01000000740E000002000000D21E0000B888000000000000010000000000000007004558414D504C450000000000002000EFD5CBC12F6CC347ED55F26471E046CF59C87E099513F56F4F1DD49BDFA84C0E20007BCB0D96A93202A9C6F11D90BFDCAB99F513C880C4888FECAC74D9B09618C06E';
FExpectedRawOp := '01000000' + FExpectedSignedTx;
end;
procedure TRawOpFrame.UseObject;
procedure AddToMemo(AName, AValue, AExpected: string);
const
c_bool: array[boolean] of string = ('No', 'Yes');
begin
Memo1.Lines.Add(AName + ' | ' + c_bool[AValue = AExpected]);
Memo1.Lines.Add('Val: ' + AValue);
Memo1.Lines.Add('Exp: ' + AExpected);
Memo1.Lines.Add('');
end;
var lOp: IRawTransactionOp;
lMultiOp: IRawOperations;
KT: TKeyType;
begin
lOp := TRawTransactionOp.Create(TPascalCoinKeyTools.Create);
Memo1.ClearContent;
KT := TRttiEnumerationType.GetValue<TKeyType>(KeyTypeCombo.Items[KeyTypeCombo.ItemIndex]);
lOp.Key := TPrivateKey.Create(PrivateKey.Text, KT);
AddToMemo('KeyHex', lOp.TestValue('Key.Hex'), PrivateKey.Text);
lOp.KRandom := KRandom.Text;
AddToMemo('KRandom', lOp.TestValue('KRandom'), KRandom.Text);
lOp.SendFrom := FromAccount.Text.ToInteger;
AddToMemo('Sender', lOp.TestValue('SENDFROM'), FExpectedSender);
lOp.NOp := NextNOp.Text.ToInteger;
AddToMemo('NOp', lOp.TestValue('NOP'), FExpectedNOp);
lOp.SendTo := ToAccount.Text.ToInteger;
AddToMemo('Receiver', lOp.TestValue('SendTo'), FExpectedReceiver);
lOp.Amount := Amount.Text.ToDouble;
AddToMemo('Amount Hex', lOp.TestValue('Amount'), FExpectedAmount);
lOp.Fee := Fee.Text.ToDouble;
AddToMemo('Fee HEX', lOp.TestValue('Fee'), FExpectedFee);
lOp.Payload :=
THex.Encode(TConverters.ConvertStringToBytes(Payload.Text, TEncoding.ANSI), True);
AddToMemo('Payload', lOp.Payload, FExpectedPayload);
AddToMemo('PayloadLen', lOp.TestValue('PayloadLen'), FExpectedPaylen);
AddToMemo('ValueToHash', lOp.TestValue('ValueToHash'), FExpectedStrToHash);
AddToMemo('HASH', lOp.TestValue('Hash'), FExpectedHash);
AddToMemo('Sig.R', lOp.TestValue('SIG.R'), FExpectedSignR);
AddToMemo('Sig.S', lOp.TestValue('SIG.S'), FExpectedSignS);
AddToMemo('Sig.R.Len', lOp.TestValue('Sig.R.Len'), FExpectedRLen);
AddToMemo('Sig.S.Len', lOp.TestValue('Sig.S.Len'), FExpectedSLen);
AddToMemo('SignedTx', lOp.TestValue('SignedTx'), FExpectedSignedTx);
lMultiOp := TRawOperations.Create;
lMultiOp.AddRawOperation(lOp);
AddToMemo('Raw Op', lMultiOp.RawData, FExpectedRawOp);
end;
end.
|
unit fPCEProvider;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls, ORCtrls, ExtCtrls, uPCE, ORFn, fBase508Form,
VA508AccessibilityManager;
type
TfrmPCEProvider = class(TfrmBase508Form)
cboPrimary: TORComboBox;
lblMsg: TMemo;
btnYes: TButton;
btnNo: TButton;
btnSelect: TButton;
Spacer1: TLabel;
procedure cboPrimaryNeedData(Sender: TObject; const StartFrom: String;
Direction, InsertAt: Integer);
procedure cboPrimaryChange(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure btnSelectClick(Sender: TObject);
private
FPCEData: TPCEData;
FUseDefault: boolean;
FIEN: array[boolean] of Int64;
FName: array[boolean] of string;
public
procedure AskUser(ForceSelect: boolean);
end;
function NoPrimaryPCEProvider(AProviders: TPCEProviderList; PCEData: TPCEData): boolean;
implementation
uses rCore, uCore, rTIU, rPCE;
{$R *.DFM}
const
AreYouStr = 'Are You, ';
PEPStr2 = ' the Primary Provider for this Encounter';
PEPStr = PEPStr2 + '?';
IsStr = 'Is ';
SelectStr = 'Please Select' + PEPStr2 + '.';
function NoPrimaryPCEProvider(AProviders: TPCEProviderList; PCEData: TPCEData): boolean;
var
frmPCEProvider: TfrmPCEProvider;
idx: integer;
b: boolean;
X: string;
mr: TModalResult;
begin
if(AProviders.PrimaryIdx < 0) then
SetDefaultProvider(AProviders, PCEData);
if(AProviders.PrimaryIdx < 0) then
begin
frmPCEProvider := TfrmPCEProvider.Create(Application);
try
with frmPCEProvider do
begin
FPCEData := PCEData;
for b := FALSE to TRUE do
begin
FIEN[b] := AProviders.PendingIEN(b);
FName[b] := AProviders.PendingNAME(b);
end;
if(FIEN[TRUE] = 0) and (FIEN[FALSE] = 0) then
begin
AskUser(TRUE);
mr := ModalResult;
end
else
begin
FUseDefault := TRUE;
AskUser(FALSE);
mr := ModalResult;
if((mr in [mrAbort, mrNo]) and (FIEN[TRUE] <> FIEN[FALSE])) then
begin
FUseDefault := FALSE;
AskUser(FALSE);
mr := ModalResult;
end;
end;
if (mr = mrYes) then
begin
AProviders.AddProvider(IntToStr(FIEN[FUseDefault]), FName[FUseDefault], TRUE);
end
else
if (mr = mrOK) then
begin
idx := cboPrimary.ItemIndex;
if(idx >= 0) then
begin
X := frmPCEProvider.cboPrimary.Items[idx];
AProviders.AddProvider(Piece(X, U, 1), Piece(X, U, 2), TRUE);
end;
end;
end;
finally
frmPCEProvider.Free;
end;
Result := (AProviders.PrimaryIdx < 0);
end
else
Result := FALSE;
end;
{ TfrmPCEProvider }
procedure TfrmPCEProvider.cboPrimaryNeedData(Sender: TObject;
const StartFrom: String; Direction, InsertAt: Integer);
begin
if(FPCEData.VisitCategory = 'E') then
cboPrimary.ForDataUse(SubSetOfPersons(StartFrom, Direction))
else
cboPrimary.ForDataUse(SubSetOfUsersWithClass(StartFrom, Direction,
FloatToStr(FPCEData.PersonClassDate)));
end;
procedure TfrmPCEProvider.cboPrimaryChange(Sender: TObject);
var
txt: string;
begin
if(cboPrimary.ItemIEN <> 0) and (FPCEData.VisitCategory <> 'E') then
begin
txt := InvalidPCEProviderTxt(cboPrimary.ItemIEN, FPCEData.PersonClassDate);
if(txt <> '') then
begin
InfoBox(cboPrimary.DisplayText[cboPrimary.ItemIndex] + txt, TX_BAD_PROV, MB_OK);
cboPrimary.ItemIndex := -1;
end;
end;
end;
procedure TfrmPCEProvider.FormCreate(Sender: TObject);
begin
ResizeAnchoredFormToFont(self);
ClientHeight := cboPrimary.Top;
end;
procedure TfrmPCEProvider.btnSelectClick(Sender: TObject);
begin
ClientHeight := cboPrimary.Top + cboPrimary.Height + 5;
cboPrimary.Visible := TRUE;
btnSelect.Visible := FALSE;
btnYes.Caption := '&OK';
btnYes.ModalResult := mrOK;
btnNo.Caption := '&Cancel';
btnNo.ModalResult := mrCancel;
lblMsg.Text := SelectStr;
cboPrimary.Caption := lblMsg.Text;
cboPrimary.InitLongList(User.Name);
end;
procedure TfrmPCEProvider.AskUser(ForceSelect: boolean);
var
msg: string;
begin
if(ForceSelect) then
begin
btnSelectClick(Self);
end
else
begin
if(FIEN[FUseDefault] = 0) then
begin
ModalResult := mrAbort;
exit;
end
else
begin
if(FIEN[FUseDefault] = User.DUZ) then
msg := AreYouStr + FName[FUseDefault] + ',' + PEPStr
else
msg := IsStr + FName[FUseDefault] + PEPStr;
end;
lblMsg.text := msg;
cboPrimary.Caption := lblMsg.text;
end;
ShowModal;
end;
end.
|
unit Test.GeomerLastValues;
interface
uses Windows, TestFrameWork, GMGlobals, Classes, GeomerLastValue;
type
TGeomerLastValueTest = class(TTestCase)
private
glv: TGeomerLastValue;
procedure SetUpSlowCNT_DI;
protected
procedure SetUp; override;
procedure TearDown; override;
published
procedure SlowCNT_DI();
end;
implementation
uses DateUtils, SysUtils, GMConst, Math;
{ TGeomerLastValueTest }
procedure TGeomerLastValueTest.SetUp;
begin
inherited;
glv := TGeomerLastValue.Create();
end;
procedure TGeomerLastValueTest.SetUpSlowCNT_DI();
var i: int;
udt: LongWord;
begin
glv.bCounter := true;
udt := EncodeDateTimeUTC(2014, 01, 01);
glv.LastVal := MakeValueFromBase(udt, 99);
for i := 0 to 15 do
begin
udt := EncodeDateTimeUTC(2014, 01, 01) + LongWord((i + 1) * UTC_MINUTE);
glv.ShiftVals();
glv.LastVal := MakeValueFromBase(udt, 100);
end;
end;
procedure TGeomerLastValueTest.SlowCNT_DI;
begin
SetUpSlowCNT_DI();
Check(glv.LastVal.Val = 100, 'LastVal');
Check(glv.PrevVal.Val = 99, 'PrevVal');
Check(CompareValue(glv.CalcLastVal().Val, 1 / (16 * UTC_MINUTE)) = 0, 'CalcLastVal');
end;
procedure TGeomerLastValueTest.TearDown;
begin
inherited;
glv.Free();
end;
initialization
RegisterTest('GMIOPSrv/Classes/GeomerLastValues', TGeomerLastValueTest.Suite);
end.
|
unit NestedTypesForm;
interface
uses
System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants,
FMX.Types, FMX.Controls, FMX.Forms, FMX.Graphics, FMX.Dialogs, FMX.StdCtrls,
FMX.Layouts, FMX.Memo, FMX.Controls.Presentation, FMX.ScrollBox;
type
TForm1 = class(TForm)
Memo1: TMemo;
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
procedure Show (const msg: string);
end;
var
Form1: TForm1;
// display function for secondary unit
procedure Show (const msg: string);
implementation
{$R *.fmx}
uses
NestedClass;
procedure Show (const msg: string);
begin
if Assigned (Form1) then
Form1.Show(msg);
end;
procedure TForm1.Button1Click(Sender: TObject);
var
One: TOne;
begin
One := TOne.Create;
One.Hello;
One.Free;
end;
procedure TForm1.Show(const Msg: string);
begin
Memo1.Lines.Add(Msg);
end;
end.
|
unit uFH;
{$mode objfpc}{$H+}
{ Example 08 File Handling }
{ }
{ This example demonstrates just a few basic functions of file handling which }
{ is a major topic in itself. }
{ }
{ For more information on all of the available file function see the Ultibo }
{ Wiki or the Free Pascal user guide. }
{ }
{ To compile the example select Run, Compile (or Run, Build) from the menu. }
{ }
{ Once compiled select Tools, Run in QEMU ... from the Lazarus menu to launch }
{ the application in a QEMU session. }
{ }
{ QEMU VersatilePB version }
{ What's the difference? See Project, Project Options, Config and Target. }
{Declare some units used by this example.}
interface
uses
GlobalConst,
GlobalTypes,
Platform,
Threads,
SysUtils,
Classes, {Include the common classes}
FileSystem, {Include the file system core and interfaces}
FATFS, {Include the FAT file system driver}
MMC; {Include the MMC/SD core to access our SD card}
type
FHPtr = ^FH;
FH = record
StringList:TStringList;
FileStream:TFileStream;
end;
{A window handle plus a couple of others.}
var
Count:Integer;
Filename:String;
SearchRec:TSearchRec;
StringList:TStringList;
FileStream:TFileStream;
//Fileinfo : FH;
//r1 : FHPtr;
procedure uFHCrAFile(aFilename : String;ar1:FHPtr);
//procedure setPtrFH(ar1:FHPtr);
procedure DisplayFiles();
procedure RmAFile(aFilename:String);
procedure CrAFile(aFilename:String);
procedure ListAFile(aFilename : String);
//procedure CrAFileRecord(aFilename:String);
implementation
procedure uFHCrAFile(aFilename : String;ar1:FHPtr);
begin
WriteLn('aFilename ' + aFilename);
try
ar1^.FileStream:=TFileStream.Create(aFilename,fmCreate);
{We've created the file, now we need to write some content to it, we can use
a TStringList for that but there are many other ways as well.}
ar1^.StringList:=TStringList.Create;
{Add some text to our string list}
ar1^.StringList.Add('Example 08 File Handling');
ar1^.StringList.Add('This is a test file created by the example');
ar1^.StringList.Add('Here is a another line of text as well.');
ar1^.StringList.Add('Example 08 File Handling');
ar1^.StringList.Add('This is a test file created by the example');
ar1^.StringList.Add('Here is a another line of text as well.');
WriteLn('Saving the TStringList to the file');
ar1^.StringList.SaveToStream(ar1^.FileStream);
{Close the file and free the string list again}
WriteLn('In uFHCrAFile Closing the file');
WriteLn('');
ar1^.FileStream.Free;
ar1^.StringList.Free;
try
ar1^.FileStream:=TFileStream.Create(aFilename,fmOpenReadWrite);
{We've created the file, now we need to write some content to it, we can use
a TStringList for that but there are many other ways as well.}
ar1^.StringList:=TStringList.Create;
{And use LoadFromStream to read it}
WriteLn('Loading the TStringList from the file');
ar1^.StringList.LoadFromStream(ar1^.FileStream);
{Iterate the strings and print them to the screen}
WriteLn('The contents of the file are:');
for Count:=0 to ar1^.StringList.Count - 1 do
begin
WriteLn(ar1^.StringList.Strings[Count]);
end;
{Close the file and free the string list again}
WriteLn('Closing the file');
WriteLn('');
ar1^.FileStream.Free;
ar1^.StringList.Free;
except
{Something went wrong creating the file}
WriteLn('Failed to open the file ' + aFilename);
end;
except
{Something went wrong creating the file}
WriteLn('Failed to create the file ' + aFilename);
end;
end;
//procedure setPtrFH(ar1:FHPtr);
//begin
//r1:=ar1;
//end;
procedure RmAFile(aFilename : String);
begin
if FileExists(aFilename) then
begin
{If it does exist we can delete it}
WriteLn('Deleting the file ' + aFilename);
DeleteFile(aFilename);
end;
end;
procedure CrAFile(aFilename : String);
var
StringList:TStringList;
FileStream:TFileStream;
begin
try
FileStream:=TFileStream.Create(aFilename,fmCreate);
{We've created the file, now we need to write some content to it, we can use
a TStringList for that but there are many other ways as well.}
StringList:=TStringList.Create;
{Add some text to our string list}
StringList.Add('Example 08 File Handling');
StringList.Add('This is a test file created by the example');
StringList.Add('Here is a another line of text as well.');
StringList.Add('Example 08 File Handling');
StringList.Add('This is a test file created by the example');
StringList.Add('Here is a another line of text as well.');
WriteLn('Saving the TStringList to the file');
StringList.SaveToStream(FileStream);
{Close the file and free the string list again}
WriteLn('In crafile Closing the file');
WriteLn('');
FileStream.Free;
StringList.Free;
try
FileStream:=TFileStream.Create(aFilename,fmOpenReadWrite);
{We've created the file, now we need to write some content to it, we can use
a TStringList for that but there are many other ways as well.}
StringList:=TStringList.Create;
{And use LoadFromStream to read it}
WriteLn('Loading the TStringList from the file');
StringList.LoadFromStream(FileStream);
{Iterate the strings and print them to the screen}
WriteLn('The contents of the file are:');
for Count:=0 to StringList.Count - 1 do
begin
WriteLn(StringList.Strings[Count]);
end;
{Close the file and free the string list again}
WriteLn('Closing the file');
WriteLn('');
FileStream.Free;
StringList.Free;
except
{Something went wrong creating the file}
WriteLn('Failed to open the file ' + Filename);
end;
except
{Something went wrong creating the file}
WriteLn('Failed to create the file ' + Filename);
end;
end;
procedure ListAFile(aFilename : String);
var
StringList:TStringList;
FileStream:TFileStream;
begin
try
FileStream:=TFileStream.Create(aFilename,fmOpenReadWrite);
{We've created the file, now we need to write some content to it, we can use
a TStringList for that but there are many other ways as well.}
StringList:=TStringList.Create;
{And use LoadFromStream to read it}
WriteLn('Loading the TStringList from the file');
StringList.LoadFromStream(FileStream);
{Iterate the strings and print them to the screen}
WriteLn('The contents of the file are:');
for Count:=0 to StringList.Count - 1 do
begin
WriteLn(StringList.Strings[Count]);
end;
{Close the file and free the string list again}
WriteLn('Closing the file');
WriteLn('');
FileStream.Free;
StringList.Free;
except
{Something went wrong creating the file}
WriteLn('Failed to open the file ' + Filename);
end;
end;
procedure DisplayFiles();
begin
if FindFirst('C:\*.*',faAnyFile,SearchRec) = 0 then
begin
{If FindFirst succeeds it will return 0 and we can proceed with the search}
repeat
{Print the file found to the screen}
WriteLn('Filename is ' + SearchRec.Name + ' - Size is ' + IntToStr(SearchRec.Size) + ' - Time is ' + DateTimeToStr(FileDateToDateTime(SearchRec.Time)));
{We keep calling FindNext until there are no more files to find}
until FindNext(SearchRec) <> 0;
end;
{After any call to FindFirst, you must call FindClose or else memory will be leaked}
FindClose(SearchRec);
WriteLn('');
end;
end.
|
unit NtUtils.Security.Acl;
interface
uses
Winapi.WinNt, Ntapi.ntdef, NtUtils.Security.Sid, NtUtils.Exceptions;
type
TAce = record
AceType: TAceType;
AceFlags: Byte;
Mask: TAccessMask;
Sid: ISid;
function Size: Cardinal;
function Allocate: PAce;
end;
IAcl = interface
function Acl: PAcl;
function SizeInfo: TAclSizeInformation;
function GetAce(Index: Integer): TAce;
function Delete(Index: Integer): TNtxStatus;
function AddAt(const Ace: TAce; Index: Integer): TNtxStatus;
procedure MapGenericMask(const GenericMapping: TGenericMapping);
end;
TAcl = class(TInterfacedObject, IAcl)
private
FAcl: PAcl;
procedure Expand(AtLeast: Cardinal);
public
constructor CreateEmpy(InitialSize: Cardinal = 512);
constructor CreateCopy(SrcAcl: PAcl);
function Acl: PAcl;
function SizeInfo: TAclSizeInformation;
function GetAce(Index: Integer): TAce;
function Delete(Index: Integer): TNtxStatus;
function AddAt(const Ace: TAce; Index: Integer): TNtxStatus;
procedure MapGenericMask(const GenericMapping: TGenericMapping);
end;
// Query ACL size information
function RtlxQuerySizeInfoAcl(Acl: PAcl; out SizeInfo: TAclSizeInformation):
TNtxStatus;
// Appen all ACEs from one ACL to another
function RtlxAppendAcl(SourceAcl, TargetAcl: PAcl): TNtxStatus;
// Prepare security descriptor
function RtlxCreateSecurityDescriptor(var SecDesc: TSecurityDescriptor):
TNtxStatus;
// Get owner from the security descriptor
function RtlxGetOwnerSD(pSecDesc: PSecurityDescriptor; out Owner: ISid):
TNtxStatus;
// Get primary group from the security descriptor
function RtlxGetPrimaryGroupSD(pSecDesc: PSecurityDescriptor; out Group: ISid):
TNtxStatus;
// Get DACL from the security descriptor
function RtlxGetDaclSD(pSecDesc: PSecurityDescriptor; out Dacl: IAcl):
TNtxStatus;
// Get SACL from the security descriptor
function RtlxGetSaclSD(pSecDesc: PSecurityDescriptor; out Sacl: IAcl):
TNtxStatus;
// Prepare a security descriptor with an owner
function RtlxPrepareOwnerSD(var SecDesc: TSecurityDescriptor; Owner: ISid):
TNtxStatus;
// Prepare a security descriptor with a primary group
function RtlxPreparePrimaryGroupSD(var SecDesc: TSecurityDescriptor; Group: ISid):
TNtxStatus;
// Prepare a security descriptor with a DACL
function RtlxPrepareDaclSD(var SecDesc: TSecurityDescriptor; Dacl: IAcl):
TNtxStatus;
// Prepare a security descriptor with a SACL
function RtlxPrepareSaclSD(var SecDesc: TSecurityDescriptor; Sacl: IAcl):
TNtxStatus;
// Compute required access to read/write security
function RtlxComputeReadAccess(SecurityInformation: TSecurityInformation)
: TAccessMask;
function RtlxComputeWriteAccess(SecurityInformation: TSecurityInformation)
: TAccessMask;
implementation
uses
Ntapi.ntrtl, Ntapi.ntstatus;
{ TAce }
function TAce.Allocate: PAce;
begin
if not Assigned(Sid) then
raise ENtError.Create(STATUS_INVALID_SID, 'TAce.Allocate');
// TODO: Object aces?
Result := AllocMem(Size);
Result.Header.AceType := AceType;
Result.Header.AceFlags := AceFlags;
Result.Header.AceSize := Size;
Result.Mask := Mask;
Move(Sid.Sid^, Result.Sid^, RtlLengthSid(Sid.Sid));
end;
function TAce.Size: Cardinal;
begin
if not Assigned(Sid) then
raise ENtError.Create(STATUS_INVALID_SID, 'TAce.Size');
Result := SizeOf(TAce_Internal) - SizeOf(Cardinal) + RtlLengthSid(Sid.Sid);
end;
{ TAcl }
function ExpandingEq(Value: Cardinal): Cardinal; inline;
begin
// Exrta capacity: +12.5% + 256 Bytes
Result := Value shr 3 + 256;
end;
function ExpandSize(SizeInfo: TAclSizeInformation;
Requires: Cardinal): Cardinal;
begin
// Satisfy the requirements + some extra capacity
if SizeInfo.AclBytesFree < Requires then
SizeInfo.AclBytesFree := Requires + ExpandingEq(Requires);
// Make sure we have enough extra capacity
if SizeInfo.AclBytesFree < ExpandingEq(SizeInfo.AclBytesInUse) then
SizeInfo.AclBytesFree := ExpandingEq(SizeInfo.AclBytesInUse);
Result := SizeInfo.AclBytesTotal;
if Result > MAX_ACL_SIZE then
Result := MAX_ACL_SIZE;
end;
function TAcl.Acl: PAcl;
begin
Result := FAcl;
end;
function TAcl.AddAt(const Ace: TAce; Index: Integer): TNtxStatus;
var
AceBuffer: PAce;
begin
// Expand the ACL if we are going to run out of space
if SizeInfo.AclBytesFree < Ace.Size then
Expand(Ace.Size);
AceBuffer := Ace.Allocate;
Result.Location := 'RtlAddAce';
Result.Status := RtlAddAce(FAcl, ACL_REVISION, Index, AceBuffer, Ace.Size);
FreeMem(AceBuffer);
end;
constructor TAcl.CreateCopy(SrcAcl: PAcl);
var
SizeInfo: TAclSizeInformation;
begin
if not Assigned(SrcAcl) or not RtlValidAcl(SrcAcl) then
NtxAssert(STATUS_INVALID_ACL, 'RtlValidAcl');
RtlxQuerySizeInfoAcl(SrcAcl, SizeInfo).RaiseOnError;
// Create an ACL, potentially with some extra capacity
CreateEmpy(ExpandSize(SizeInfo, 0));
// Add all aces from the source ACL
RtlxAppendAcl(SrcAcl, FAcl).RaiseOnError;
end;
constructor TAcl.CreateEmpy(InitialSize: Cardinal);
var
Status: NTSTATUS;
begin
if InitialSize > MAX_ACL_SIZE then
InitialSize := MAX_ACL_SIZE;
FAcl := AllocMem(InitialSize);
Status := RtlCreateAcl(FAcl, InitialSize, ACL_REVISION);
if not NT_SUCCESS(Status) then
begin
FreeMem(FAcl);
NtxAssert(Status, 'RtlCreateAcl');
end;
end;
function TAcl.Delete(Index: Integer): TNtxStatus;
begin
Result.Location := 'RtlDeleteAce';
Result.Status := RtlDeleteAce(FAcl, Index);
end;
procedure TAcl.Expand(AtLeast: Cardinal);
var
NewAcl: PAcl;
NewAclSize: Cardinal;
Status: NTSTATUS;
begin
NewAclSize := ExpandSize(SizeInfo, AtLeast);
// Check if expanding is possible/needs reallocation
if NewAclSize = SizeInfo.AclBytesTotal then
Exit;
NewAcl := AllocMem(NewAclSize);
Status := RtlCreateAcl(NewAcl, NewAclSize, ACL_REVISION);
if not NT_SUCCESS(Status) then
begin
FreeMem(NewAcl);
NtxAssert(Status, 'RtlCreateAcl');
end;
// Copy all ACEs to the new ACL
RtlxAppendAcl(FAcl, NewAcl).RaiseOnError;
// Replace current ACL with the new one
FreeMem(FAcl);
FAcl := NewAcl;
end;
function TAcl.GetAce(Index: Integer): TAce;
var
pAceRef: PAce;
begin
NtxCheck(RtlGetAce(FAcl, Index, pAceRef), 'RtlGetAce');
Result.AceType := pAceRef.Header.AceType;
Result.AceFlags := pAceRef.Header.AceFlags;
case pAceRef.Header.AceType of
AceTypeAccessAllowed, AceTypeAccessDenied,
AceTypeSystemAudit, AceTypeSystemAlarm,
AceTypeAccessAllowedCallback, AceTypeAccessDeniedCallback,
AceTypeSystemAuditCallback, AceTypeSystemAlarmCallback,
AceTypeSystemMandatoryLabel, AceTypeSystemResourceAttribute,
AceTypeSystemScopedPolicyId, AceTypeSystemProcessTrustLabel,
AceTypeSystemAccessFilter:
begin
// Non-object aces
Result.Mask := pAceRef.Mask;
Result.Sid := TSid.CreateCopy(pAceRef.Sid);
end;
AceTypeObjectAccessAllowed, AceTypeObjectAccessDenied,
AceTypeObjectSystemAudit, AceTypeObjectSystemAlarm,
AceTypeObjectAccessAllowedCallback, AceTypeObjectAccessDeniedCallback,
AceTypeObjectSystemAuditCallback, AceTypeObjectSystemAlarmCallback:
begin
// Object aces
Result.Mask := PObjectAce(pAceRef).Mask;
Result.Sid := TSid.CreateCopy(PObjectAce(pAceRef).Sid);
end;
else
// Unsupported ace type
Result.Mask := 0;
Result.Sid := nil;
end;
end;
procedure TAcl.MapGenericMask(const GenericMapping: TGenericMapping);
var
i: Integer;
Ace: PAce;
begin
for i := 0 to SizeInfo.AceCount - 1 do
begin
NtxCheck(RtlGetAce(FAcl, i, Ace), 'RtlGetAce');
RtlMapGenericMask(Ace.Mask, GenericMapping);
end;
end;
function TAcl.SizeInfo: TAclSizeInformation;
begin
RtlxQuerySizeInfoAcl(FAcl, Result).RaiseOnError;
end;
{ functions }
function RtlxQuerySizeInfoAcl(Acl: PAcl; out SizeInfo: TAclSizeInformation):
TNtxStatus;
begin
Result.Location := 'RtlQueryInformationAcl';
Result.Status := RtlQueryInformationAcl(Acl, SizeInfo);
end;
function RtlxAppendAcl(SourceAcl, TargetAcl: PAcl): TNtxStatus;
var
i: Integer;
Ace: PAce;
SizeInfo: TAclSizeInformation;
begin
Result.Location := 'RtlQueryInformationAcl';
Result.Status := RtlQueryInformationAcl(SourceAcl, SizeInfo);
if not Result.IsSuccess then
Exit;
for i := 0 to SizeInfo.AceCount - 1 do
begin
Result.Location := 'RtlGetAce';
Result.Status := RtlGetAce(SourceAcl, i, Ace);
if not Result.IsSuccess then
Exit;
Result.Location := 'RtlAddAce';
Result.Status := RtlAddAce(TargetAcl, ACL_REVISION, -1, Ace,
Ace.Header.AceSize);
if not Result.IsSuccess then
Exit;
end;
end;
function RtlxCreateSecurityDescriptor(var SecDesc: TSecurityDescriptor):
TNtxStatus;
begin
FillChar(SecDesc, SizeOf(SecDesc), 0);
Result.Location := 'RtlCreateSecurityDescriptor';
Result.Status := RtlCreateSecurityDescriptor(SecDesc,
SECURITY_DESCRIPTOR_REVISION);
end;
function RtlxGetOwnerSD(pSecDesc: PSecurityDescriptor; out Owner: ISid):
TNtxStatus;
var
Defaulted: Boolean;
OwnerSid: PSid;
begin
Result.Location := 'RtlGetOwnerSecurityDescriptor';
Result.Status := RtlGetOwnerSecurityDescriptor(pSecDesc, OwnerSid, Defaulted);
if Result.IsSuccess then
Owner := TSid.CreateCopy(OwnerSid);
end;
function RtlxGetPrimaryGroupSD(pSecDesc: PSecurityDescriptor; out Group: ISid):
TNtxStatus;
var
Defaulted: Boolean;
GroupSid: PSid;
begin
Result.Location := 'RtlGetGroupSecurityDescriptor';
Result.Status := RtlGetGroupSecurityDescriptor(pSecDesc, GroupSid, Defaulted);
if Result.IsSuccess then
Group := TSid.CreateCopy(GroupSid);
end;
function RtlxGetDaclSD(pSecDesc: PSecurityDescriptor; out Dacl: IAcl):
TNtxStatus;
var
pDaclRef: PAcl;
DaclPresent, Defaulted: Boolean;
begin
Result.Location := 'RtlGetDaclSecurityDescriptor';
Result.Status := RtlGetDaclSecurityDescriptor(pSecDesc, DaclPresent, pDaclRef,
Defaulted);
if Result.IsSuccess and DaclPresent and Assigned(pDaclRef) then
Dacl := TAcl.CreateCopy(pDaclRef)
else
Dacl := nil;
end;
function RtlxGetSaclSD(pSecDesc: PSecurityDescriptor; out Sacl: IAcl):
TNtxStatus;
var
pSaclRef: PAcl;
SaclPresent, Defaulted: Boolean;
begin
Result.Location := 'RtlGetSaclSecurityDescriptor';
Result.Status := RtlGetSaclSecurityDescriptor(pSecDesc, SaclPresent, pSaclRef,
Defaulted);
if Result.IsSuccess and SaclPresent and Assigned(pSaclRef) then
Sacl := TAcl.CreateCopy(pSaclRef)
else
Sacl := nil;
end;
function RtlxPrepareOwnerSD(var SecDesc: TSecurityDescriptor; Owner: ISid):
TNtxStatus;
begin
Result := RtlxCreateSecurityDescriptor(SecDesc);
if not Result.IsSuccess then
Exit;
Result.Location := 'RtlSetOwnerSecurityDescriptor';
if Assigned(Owner) then
Result.Status := RtlSetOwnerSecurityDescriptor(SecDesc, Owner.Sid, False)
else
Result.Status := RtlSetOwnerSecurityDescriptor(SecDesc, nil, True);
end;
function RtlxPreparePrimaryGroupSD(var SecDesc: TSecurityDescriptor; Group: ISid):
TNtxStatus;
begin
Result := RtlxCreateSecurityDescriptor(SecDesc);
if not Result.IsSuccess then
Exit;
Result.Location := 'RtlSetGroupSecurityDescriptor';
if Assigned(Group) then
Result.Status := RtlSetGroupSecurityDescriptor(SecDesc, Group.Sid, False)
else
Result.Status := RtlSetGroupSecurityDescriptor(SecDesc, nil, True);
end;
function RtlxPrepareDaclSD(var SecDesc: TSecurityDescriptor; Dacl: IAcl):
TNtxStatus;
begin
Result := RtlxCreateSecurityDescriptor(SecDesc);
if not Result.IsSuccess then
Exit;
Result.Location := 'RtlSetDaclSecurityDescriptor';
if Assigned(Dacl) then
Result.Status := RtlSetDaclSecurityDescriptor(SecDesc, True, Dacl.Acl,
False)
else
Result.Status := RtlSetDaclSecurityDescriptor(SecDesc, True, nil, False);
end;
function RtlxPrepareSaclSD(var SecDesc: TSecurityDescriptor; Sacl: IAcl):
TNtxStatus;
begin
Result := RtlxCreateSecurityDescriptor(SecDesc);
if not Result.IsSuccess then
Exit;
Result.Location := 'RtlSetSaclSecurityDescriptor';
if Assigned(Sacl) then
Result.Status := RtlSetSaclSecurityDescriptor(SecDesc, True, Sacl.Acl,
False)
else
Result.Status := RtlSetSaclSecurityDescriptor(SecDesc, True, nil, False);
end;
function RtlxComputeReadAccess(SecurityInformation: TSecurityInformation)
: TAccessMask;
const
REQUIRE_READ_CONTROL = OWNER_SECURITY_INFORMATION or
GROUP_SECURITY_INFORMATION or DACL_SECURITY_INFORMATION or
LABEL_SECURITY_INFORMATION or ATTRIBUTE_SECURITY_INFORMATION or
SCOPE_SECURITY_INFORMATION or BACKUP_SECURITY_INFORMATION;
REQUIRE_SYSTEM_SECURITY = SACL_SECURITY_INFORMATION or
BACKUP_SECURITY_INFORMATION;
begin
Result := 0;
if SecurityInformation and REQUIRE_READ_CONTROL <> 0 then
Result := Result or READ_CONTROL;
if SecurityInformation and REQUIRE_SYSTEM_SECURITY <> 0 then
Result := Result or ACCESS_SYSTEM_SECURITY;
end;
function RtlxComputeWriteAccess(SecurityInformation: TSecurityInformation)
: TAccessMask;
const
REQUIRE_WRITE_DAC = DACL_SECURITY_INFORMATION or
ATTRIBUTE_SECURITY_INFORMATION or BACKUP_SECURITY_INFORMATION or
PROTECTED_DACL_SECURITY_INFORMATION or
UNPROTECTED_DACL_SECURITY_INFORMATION;
REQUIRE_WRITE_OWNER = OWNER_SECURITY_INFORMATION or GROUP_SECURITY_INFORMATION
or LABEL_SECURITY_INFORMATION or BACKUP_SECURITY_INFORMATION;
REQUIRE_SYSTEM_SECURITY = SACL_SECURITY_INFORMATION or
SCOPE_SECURITY_INFORMATION or
BACKUP_SECURITY_INFORMATION or PROTECTED_SACL_SECURITY_INFORMATION or
UNPROTECTED_SACL_SECURITY_INFORMATION;
begin
Result := 0;
if SecurityInformation and REQUIRE_WRITE_DAC <> 0 then
Result := Result or WRITE_DAC;
if SecurityInformation and REQUIRE_WRITE_OWNER <> 0 then
Result := Result or WRITE_OWNER;
if SecurityInformation and REQUIRE_SYSTEM_SECURITY <> 0 then
Result := Result or ACCESS_SYSTEM_SECURITY;
end;
end.
|
unit ncaFrmTrocoMax;
interface
uses
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
Vcl.Controls, Vcl.Forms, Vcl.Dialogs, cxGraphics, cxControls, cxLookAndFeels,
cxLookAndFeelPainters, cxContainer, cxEdit, Vcl.Menus, Vcl.StdCtrls,
cxButtons, LMDControl, LMDCustomControl, LMDCustomPanel, LMDCustomBevelPanel,
LMDSimplePanel, cxLabel;
type
TFrmTrocoMax = class(TForm)
cxLabel1: TcxLabel;
LMDSimplePanel4: TLMDSimplePanel;
btnSalvar: TcxButton;
cxLabel2: TcxLabel;
lbTroco: TcxLabel;
lbMax: TcxLabel;
lbConfig: TcxLabel;
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure FormCreate(Sender: TObject);
procedure lbConfigClick(Sender: TObject);
procedure FormKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
private
{ Private declarations }
public
sTroco, sMax : String;
FTroco : Currency;
{ Public declarations }
procedure Mostrar(aTroco: Currency);
class function TrocoOk(aTroco: Currency): Boolean;
end;
var
FrmTrocoMax: TFrmTrocoMax;
implementation
{$R *.dfm}
uses ncClassesBase, ncaFrmConfigEspecies, ncaDM, ncaFrmPri;
procedure TFrmTrocoMax.FormClose(Sender: TObject; var Action: TCloseAction);
begin
Action := caFree;
end;
procedure TFrmTrocoMax.FormCreate(Sender: TObject);
begin
sTroco := lbTroco.Caption;
sMax := lbMax.Caption;
end;
procedure TFrmTrocoMax.FormKeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
begin
case Key of
Key_F2,
Key_Esc : Close;
end;
end;
procedure TFrmTrocoMax.lbConfigClick(Sender: TObject);
begin
TFrmConfigEspecies.Create(Self).Mostrar(False, True);
lbMax.Caption := sMax+': '+CurrencyToStr(gConfig.TrocoMax);
if gConfig.TrocoMax>=FTroco then Close;
end;
procedure TFrmTrocoMax.Mostrar(aTroco: Currency);
begin
FTroco := aTroco;
lbTroco.Caption := sTroco+': '+CurrencyToStr(aTroco);
lbMax.Caption := sMax+': '+CurrencyToStr(gConfig.TrocoMax);
ShowModal;
end;
class function TFrmTrocoMax.TrocoOk(aTroco: Currency): Boolean;
begin
Result := (aTroco<=gConfig.TrocoMax);
if not Result then begin
with TFrmTrocoMax.Create(nil) do
Mostrar(aTroco);
Result := (aTroco<=gConfig.TrocoMax);
end;
end;
end.
|
unit ncaFrmConfigCaixaFechamento;
{
ResourceString: Dario 11/03/13
Nada para para fazer
}
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ncaFrmBaseOpcao, cxGraphics, cxLookAndFeels, cxLookAndFeelPainters,
Menus, cxControls, cxContainer, cxEdit, StdCtrls, cxRadioGroup, cxLabel,
LMDPNGImage, ExtCtrls, cxButtons, LMDControl, LMDCustomControl,
LMDCustomPanel, LMDCustomBevelPanel, LMDSimplePanel, cxCheckBox;
type
TFrmConfigCaixaFechamento = class(TFrmBaseOpcao)
img: TImage;
cbSaldoFinal: TcxCheckBox;
cbRelAutomatico: TcxCheckBox;
private
{ Private declarations }
public
procedure Ler; override;
procedure Salvar; override;
function Alterou: Boolean; override;
procedure Renumera; override;
function NumItens: Integer; override;
{ Public declarations }
end;
var
FrmConfigCaixaFechamento: TFrmConfigCaixaFechamento;
implementation
uses ncClassesBase;
{$R *.dfm}
{ TFrmConfigCaixaAbertura }
function TFrmConfigCaixaFechamento.Alterou: Boolean;
begin
Result := True;
if cbSaldoFinal.Checked <> gConfig.PedirSaldoF then Exit;
if cbRelAutomatico.Checked <> gConfig.RelCaixaAuto then Exit;
Result := False;
end;
procedure TFrmConfigCaixaFechamento.Ler;
begin
inherited;
cbSaldoFinal.Checked := gConfig.PedirSaldoF;
cbRelAutomatico.Checked := gConfig.RelCaixaAuto;
end;
function TFrmConfigCaixaFechamento.NumItens: Integer;
begin
Result := 2;
end;
procedure TFrmConfigCaixaFechamento.Renumera;
begin
inherited;
cbSaldoFinal.Caption := IntToStr(InicioNumItem) + '. ' + cbSaldoFinal.Caption;
cbRelAutomatico.Caption := IntToStr(InicioNumItem+1) + '. ' + cbRelAutomatico.Caption;
end;
procedure TFrmConfigCaixaFechamento.Salvar;
begin
inherited;
gConfig.PedirSaldoF := cbSaldoFinal.Checked;
gConfig.RelCaixaAuto := cbRelAutomatico.Checked;
end;
end.
|
unit simple_proc_call_1;
interface
implementation
var G: Int32;
procedure Test;
begin
G := 3;
end;
initialization
Test;
finalization
Assert(G = 3);
end. |
unit FSXcontrol;
interface
uses
Classes, SimConnect, Windows, Messages;
const
// Define a user message for message driven version of the example
WM_USER_SIMCONNECT = WM_USER + 2;
EVENT_SIM_START = 1;
EVENT_SIM_STOP = 2;
type
TVarChangeCallbackProcedure = procedure(pValue: Double) of object;
PAutopilotData = ^TAutopilotData;
TAutopilotData = record
vSpeed: Double;
vElevatorPos: Double;
end;
TAutopilotCallbackProcedure = procedure(pData: PAutopilotData) of object;
TFSXcontrol = class
private
fReservedRequestsCount: Integer;
fReservedDefinitionsCount: Integer;
{ Private declarations }
fhSimConnect: THandle; // Handle for the SimConection
fSCAvailable : boolean;
fSCConnected : boolean;
fRegisteredEvents : TStringList;
fRegisteredVars: TStringList;
fOnDisconnect: TNotifyEvent;
fFsxVars: array of variant;
fFsxInFlight: Boolean;
fInVarsCount: Integer;
fAutopilotDataChange: TAutopilotCallbackProcedure;
fEventValues: TStrings;
fEventCaptions: TStrings;
procedure DebugLog(Value: String);
procedure LogRcvData(pData: PSimConnectRecvSimObjectData);
function CardinalToStr(pData: Cardinal) : String;
procedure LogRawSCData(pData: PSimConnectRecv; cbData: DWORD);
procedure AddDefaultEvents(l : TStrings);
procedure LoadEvents(pFileName: String; l : TStrings);
procedure InitEvents;
public
{ Public declarations }
constructor Create;
destructor Destroy; Override;
procedure Init;
procedure Connect(Handle: THandle);
function SendEvent(Name: String; Param: Cardinal = 0): boolean;
function SendEventByTitle(pTitle: String; Param: Cardinal = 0): boolean;
function SendText(lValue: String): boolean;
function RegisterFSXVariable(pName, pUnits: String): boolean;
function GetFSXVariable(pName: String): variant;
function AddFSXVaribale(pName: String; pUnits: String): Integer;
procedure SetFSXVariable(pName: String; pUnits: String; pValue: double);
procedure DispatchHandler(pData: PSimConnectRecv; cbData: DWORD; pContext: Pointer);
procedure SimConnectMessage(var Message: TMessage);
function RegisterAutopilotVariables: Boolean;
property SCAvailable : boolean read fSCAvailable;
property SCConnected : boolean read fSCConnected;
property hSimConnect : THandle read fhSimConnect;
property OnDisconnect: TNotifyEvent read fOnDisconnect write fOnDisconnect;
property OnAutopiloDataChange: TAutopilotCallbackProcedure read fAutopilotDataChange write fAutopilotDataChange;
property EventValues: TStrings read fEventValues;
property EventCaptions: TStrings read fEventCaptions;
end;
TFSXVariable = class(TObject)
public
Name: String;
DefinitionId: Integer;
RequestId: Integer;
IsString: Boolean;
constructor Create;
end;
implementation
uses SysUtils, uGlobals, Forms;
type
TSimConnectString = packed array[0..255] of char;
PSimConnectString = ^TSimConnectString;
procedure MyDispatchProc(pData: PSimConnectRecv; cbData: DWORD; pContext:
Pointer); stdcall;
begin
Glb.FSX.DispatchHandler(pData, cbData, pContext);
end;
constructor TFSXcontrol.Create;
begin
//inherited;
fRegisteredEvents := TstringList.Create;
fRegisteredEvents.CaseSensitive := False;
fRegisteredVars := TStringList.Create;
fRegisteredVars.CaseSensitive := False;
fReservedRequestsCount := 1;
fReservedDefinitionsCount := 1;
fInVarsCount := 0;
fEventValues := TStringList.Create;
fEventCaptions := TStringList.Create;
SetLength(fFsxVars, fInVarsCount);
fFsxInFlight := False; // this variable won't work if HIDmacros is started
// already in flight. ould have to ask somehow, but there's no FSX variable...
fAutopilotDataChange := nil;
end;
destructor TFSXcontrol.Destroy;
var I: Integer;
begin
fRegisteredEvents.Free;
for I := 0 to fRegisteredVars.Count - 1 do
fRegisteredVars.Objects[I].Free;
fRegisteredVars.Free;
fEventValues.Free;
fEventCaptions.Free;
inherited;
end;
procedure TFSXcontrol.DispatchHandler(pData: PSimConnectRecv; cbData:
DWORD;
pContext: Pointer);
var
OpenData : PSimConnectRecvOpen;
pObjData : PSimConnectRecvSimObjectData;
Exception : PSimConnectRecvException;
Evt: PSimconnectRecvEvent;
lVar: TFSXVariable;
lVarIndex: Integer;
lStrValue: String;
lDoubleValue: Double;
begin
//LogRawSCData(pData, cbData);
// Handle the various types of message
case TSimConnectRecvId(pData^.dwID) of
SIMCONNECT_RECV_ID_OPEN:
begin
//StatusBar.Panels[0].Text := txt.Values['SCConnected'];
OpenData := PSimConnectRecvOpen(pData);
with OpenData^ do
begin
DebugLog(Format('%s %1d.%1d.%1d.%1d', [szApplicationName,
dwApplicationVersionMajor, dwApplicationVersionMinor,
dwApplicationBuildMajor, dwApplicationBuildMinor]));
DebugLog(Format('%s %1d.%1d.%1d.%1d', ['SimConnect',
dwSimConnectVersionMajor, dwSimConnectVersionMinor,
dwSimConnectBuildMajor, dwSimConnectBuildMinor]));
if (not SUCCEEDED(SimConnect_SubscribeToSystemEvent(fhSimConnect,
EVENT_SIM_START, 'SimStart'))) then
DebugLog('FSX:ERROR: Can not subscribe to SimStart');
if (not SUCCEEDED(SimConnect_SubscribeToSystemEvent(fhSimConnect,
EVENT_SIM_STOP, 'SimStop'))) then
DebugLog('FSX:ERROR: Can not subscribe to SimStop');
end;
end;
SIMCONNECT_RECV_ID_EVENT:
begin
evt := PSimconnectRecvEvent(pData);
case evt^.uEventID of
EVENT_SIM_START: fFsxInFlight := True;
EVENT_SIM_STOP: fFsxInFlight := False;
else
DebugLog('FSX:Unknown SC Event ' + IntToStr(evt^.uEventID) + ', data ' + IntToStr(evt^.dwData));
end;
//DebugLog('FSX: FSX in flight:'+BoolToStr(fFsxInFlight));
end;
SIMCONNECT_RECV_ID_QUIT:
begin
fSCConnected := False;
if Assigned(fOnDisconnect) then fOnDisconnect(Self);
end;
SIMCONNECT_RECV_ID_EXCEPTION:
begin
Exception := PSimConnectRecvException(pData);
DebugLog(Format('***** EXCEPTION=%d SendID=%d Index=%d cbData=%d',
[Exception^.dwException, Exception^.dwSendID, Exception^.dwIndex, cbData]));
end;
SIMCONNECT_RECV_ID_SIMOBJECT_DATA:
begin
pObjData := PSimConnectRecvSimObjectData(pData);
//LogRcvData(pObjData);
if (pObjData^.dwRequestID = 0) then // autopilot data
begin
if Assigned(fAutopilotDataChange) then
fAutopilotDataChange(PAutopilotData(@pObjData^.dwData));
end else
if (pObjData^.dwRequestID < Length(fFsxVars)+fReservedRequestsCount) then
begin
// find the variable to find out type
lVarIndex := pObjData^.dwDefineID - fReservedDefinitionsCount;
if (lVarIndex >= 0) and (lVarIndex < fRegisteredVars.Count) then
begin
lVar := fRegisteredVars.Objects[lVarIndex] as TFSXVariable;
if lVar.IsString then
begin
lStrValue := PSimConnectString(@pObjData^.dwData)^;
fFsxVars[pObjData^.dwRequestID-fReservedRequestsCount] := lStrValue;
DebugLog(Format('FSX:Received string var value: index %d = %s',
[pObjData^.dwRequestID-fReservedRequestsCount, fFsxVars[pObjData^.dwRequestID-fReservedRequestsCount]]));
end
else
begin
// double
lDoubleValue := PDouble(@pObjData^.dwData)^;
fFsxVars[pObjData^.dwRequestID-fReservedRequestsCount] := lDoubleValue;
DebugLog(Format('FSX:Received var value: index %d = %8.3f',
[pObjData^.dwRequestID-fReservedRequestsCount, lDoubleValue]));
end;
end;
end;
end;
else
DebugLog(Format('FSX:Unknown dwID: %d', [pData.dwID]));
end;
end;
function TFSXcontrol.GetFSXVariable(pName: String): variant;
var
lVarIndex: Integer;
begin
Result := 0;
if not fSCConnected then
begin
exit;
end;
//DebugLog('FSX:Get variable name ' + pName);
lVarIndex := fRegisteredVars.IndexOf(pName);
if lVarIndex > -1 then
Result := fFsxVars[lVarIndex];
end;
procedure TFSXcontrol.Init;
begin
fhSimConnect := 0;
fRegisteredEvents.Clear;
if InitSimConnect then
begin
fSCAvailable := True;
end
else
begin
fSCAvailable := False;
fSCConnected := False;
end;
InitEvents;
end;
procedure TFSXcontrol.LoadEvents(pFileName: String; l : TStrings);
var
lFile: TStringList;
i: Integer;
lPos: Integer;
lName, lValue: String;
begin
lFile := TStringList.Create;
try
lFile.LoadFromFile(pFileName);
for I := 0 to lFile.Count - 1 do
begin
if Trim(lFile[i]) = '' then
Continue;
lPos := Pos(':', lFile[i]);
if lPos = 0 then
begin
lName := lFile[i];
lValue := lFile[i];
end
else
begin
lValue := UpperCase(Trim(Copy(lFile[i], 1, lPos - 1)));
lName := Trim(Copy(lFile[i], lPos+1, 1024));
end;
l.Add(lName + '=' + lValue);
end;
finally
lFile.Free;
end;
end;
procedure TFSXcontrol.LogRawSCData(pData: PSimConnectRecv; cbData: DWORD);
var I: Integer;
Res: String;
TmpP: PByte;
begin
DebugLog('FSX:SC packet received, size ' + IntToStr(cbData) + ' bytes.');
Res := '';
TmpP := PByte(pData);
for I := 0 to cbData - 1 do
begin
Res := Res + IntToHex(TmpP^, 2) + ' ';
Inc(TmpP);
if (I+1) mod 8 = 0 then
begin
DebugLog(Res);
Res := '';
end;
end;
DebugLog(Res);
end;
procedure TFSXcontrol.LogRcvData(pData: PSimConnectRecvSimObjectData);
var tmpP: PDouble;
begin
DebugLog('FSX:dwRequestID: ' + CardinalToStr(pData^.dwRequestID));
DebugLog('FSX:dwObjectID: ' + CardinalToStr(pData^.dwObjectID));
DebugLog('FSX:dwDefineID: ' + CardinalToStr(pData^.dwDefineID));
DebugLog('FSX:dwFlags: ' + CardinalToStr(pData^.dwFlags));
DebugLog('FSX:dwentrynumber: ' + CardinalToStr(pData^.dwentrynumber));
DebugLog('FSX:dwoutof: ' + CardinalToStr(pData^.dwoutof));
DebugLog('FSX:dwDefineCount: ' + CardinalToStr(pData^.dwDefineCount));
DebugLog('FSX:dwData: ' + CardinalToStr(pData^.dwData));
tmpP := @pData^.dwData;
DebugLog('FSX:dwData double: ' + FloatToStr(tmpP^));
end;
function TFSXcontrol.RegisterAutopilotVariables: Boolean;
begin
Result := True;
if not fSCConnected then
begin
Result := False;
exit;
end;
if not(SUCCEEDED(SimConnect_AddToDataDefinition(fhSimConnect, 0,
'VERTICAL SPEED', 'ft/min'))) then
Result := False;
if not(SUCCEEDED(SimConnect_AddToDataDefinition(fhSimConnect, 0,
'ELEVATOR POSITION', 'Position'))) then
Result := False;
if not(SUCCEEDED(SimConnect_RequestDataOnSimObject(fhSimConnect, 0, 0,
SIMCONNECT_OBJECT_ID_USER, SIMCONNECT_PERIOD_SECOND, SIMCONNECT_DATA_REQUEST_FLAG_CHANGED))) then
Result := False;
end;
function TFSXcontrol.RegisterFSXVariable(pName, pUnits: String): boolean;
var
lVarIndex: Integer;
lRequestId: Integer;
begin
Result := True;
if not fSCConnected then
begin
Result := False;
exit;
end;
// if not yet registered, register
Result := True;
lVarIndex := AddFSXVaribale(pName, pUnits);
if (lVarIndex >= 0) and
(TFSXVariable(fRegisteredVars.Objects[lVarIndex]).RequestId = -1) then
begin
lRequestId := fInVarsCount;
if (SUCCEEDED(SimConnect_RequestDataOnSimObject(fhSimConnect, lRequestId+fReservedRequestsCount, lVarIndex+fReservedDefinitionsCount,
SIMCONNECT_OBJECT_ID_USER, SIMCONNECT_PERIOD_SECOND, SIMCONNECT_DATA_REQUEST_FLAG_CHANGED))) then
begin
TFSXVariable(fRegisteredVars.Objects[lVarIndex]).RequestId := lRequestId;
Inc(fInVarsCount);
SetLength(fFsxVars, fInVarsCount);
DebugLog('FSX: Var ' + pName + ' requested with request id ' + IntToStr(lRequestId));
end
else
begin
DebugLog('FSX: Error requsting var ' + pName + ' definition ' + IntToStr(lVarIndex));
Result := False;
end;
end;
end;
procedure TFSXcontrol.InitEvents;
var
lFileName: string;
lSortedList: TStringList;
lTmpList: TStrings;
I: Integer;
begin
fEventValues.Clear;
fEventCaptions.Clear;
lSortedList := TStringList.Create;
try
lSortedList.Sorted := True;
lFileName := ExtractFilePath(Application.ExeName)+'\FSXevents.lst';
if (FileExists(lFileName)) then
LoadEvents(lFileName, lSortedList)
else
begin
lTmpList := TStringList.Create;
try
AddDefaultEvents(lTmpList);
for I := 0 to lTmpList.Count - 1 do
lSortedList.Add(lTmpList[i] + '=' + lTmpList[i]);
finally
lTmpList.Free;
end;
end;
for I := 0 to lSortedList.Count - 1 do
begin
fEventCaptions.Add(lSortedList.Names[i]);
fEventValues.Add(lSortedList.ValueFromIndex[i]);
end;
finally
lSortedList.Free;
end;
end;
function TFSXcontrol.AddFSXVaribale(pName, pUnits: String): Integer;
var
lVarIndex: Integer;
lFSXVar: TFSXVariable;
lRegOK: Boolean;
begin
// adds SimConnect data definition and returns its id
Result := -1;
if not fSCConnected then
exit;
// if not yet registered, register
lVarIndex := fRegisteredVars.IndexOf(pName);
if lVarIndex = -1 then
begin
// add to data definition - there we have in and out vars
lVarIndex := fRegisteredVars.Count;
if UpperCase(pUnits) = 'STRING' then
lRegOK := SUCCEEDED(SimConnect_AddToDataDefinition(fhSimConnect,
lVarIndex+fReservedDefinitionsCount, pName, '', SIMCONNECT_DATATYPE_STRING256))
else
lRegOK := SUCCEEDED(SimConnect_AddToDataDefinition(fhSimConnect,
lVarIndex+fReservedDefinitionsCount, pName, pUnits));
if lRegOK then
begin
DebugLog('FSX: Var ' + pName + ' added definition id ' + IntToStr(lVarIndex));
lFSXVar := TFSXVariable.Create;
lFSXVar.Name := pName;
lFSXVar.DefinitionId := lVarIndex;
lFSXVar.IsString := (UpperCase(pUnits) = 'STRING');
fRegisteredVars.AddObject(pName, lFSXVar);
end
else
begin
DebugLog('FSX: Error adding definition var ' + pName + ' as ' + IntToStr(lVarIndex));
lVarIndex := -1;
end;
end;
Result := lVarIndex;
end;
function TFSXcontrol.CardinalToStr(pData: Cardinal): String;
begin
Result := IntToStr(pData) + '(' + IntToHex(pData, 8) + ')';
end;
procedure TFSXcontrol.Connect(Handle: THandle);
begin
if (SUCCEEDED(SimConnect_Open(fhSimConnect, 'HID macros', Handle,
WM_USER_SIMCONNECT, 0, 0))) then
begin
fSCConnected := True;
fRegisteredEvents.Clear;
end;
end;
procedure TFSXcontrol.SimConnectMessage(var Message: TMessage);
begin
SimConnect_CallDispatch(hSimConnect, MyDispatchProc, nil);
end;
procedure TFSXcontrol.DebugLog(Value: String);
begin
Glb.DebugLog(Value, 'FSX');
end;
function TFSXcontrol.SendEvent(Name: String; Param: Cardinal = 0): boolean;
var
lEventIndex: Integer;
// tmp: array[0..255] of char;
begin
if not fSCConnected then
begin
Result := False;
exit;
end;
// if not yet registered, register
// StrPCopy(tmp, 'HIDMACROS: Got event ' + Name + ' par ' + IntToStr(Param));
// OutputDebugString(tmp);
Result := True;
lEventIndex := fRegisteredEvents.IndexOf(Name);
if lEventIndex = -1 then
begin
// we have to register this event first
lEventIndex := fRegisteredEvents.Count;
if (SUCCEEDED(SimConnect_MapClientEventToSimEvent(fhSimConnect, lEventIndex+3, Name))) then
begin
DebugLog('Event ' + Name + ' registered as ' + IntToStr(lEventINdex+3));
fRegisteredEvents.Add(Name);
end
else
begin
DebugLog('Error registering event ' + Name + ' as ' + IntToStr(lEventIndex+3));
Result := False;
lEventIndex := -1;
end;
end;
// call with its index
if Result then
begin
Result := SUCCEEDED(SimConnect_TransmitClientEvent(fhSimConnect, 0, lEventIndex+3,
Param, SIMCONNECT_GROUP_PRIORITY_HIGHEST, SIMCONNECT_EVENT_FLAG_GROUPID_IS_PRIORITY));
DebugLog(Format('Event %s (%d) sent to FSX with param %d.',
[Name, lEventIndex+3, Param]));
end;
end;
function TFSXcontrol.SendEventByTitle(pTitle: String; Param: Cardinal): boolean;
var
lIndex: Integer;
begin
lIndex := fEventCaptions.IndexOf(pTitle);
if (lIndex < 0) then
begin
DebugLog('Event with title ' + pTitle + ' not found. Call ignored.');
Result := False;
exit;
end;
Result := SendEvent(fEventValues[lIndex], Param);
end;
function TFSXcontrol.SendText(lValue: String): boolean;
begin
Result := True;
if not fSCConnected then
begin
Result := False;
exit;
end;
SimConnect_Text(fhSimConnect, SIMCONNECT_TEXT_TYPE_PRINT_BLACK, 3.0, 0, Length(lValue)+1, PChar(lValue));
end;
procedure TFSXcontrol.SetFSXVariable(pName: String; pUnits: String; pValue: double);
var
lVarIndex: Integer;
lVar: TFSXVariable;
begin
if not fSCConnected then
exit;
// if not yet registered, register
lVarIndex := AddFSXVaribale(pName, pUnits);
if lVarIndex >= 0 then
begin
lVar := fRegisteredVars.Objects[lVarIndex] as TFSXVariable;
if (lVar <> nil) and (lVar.IsString) then
exit; // string vars are read only
if (SUCCEEDED(SimConnect_SetDataOnSimObject(fhSimConnect, lVarIndex+fReservedDefinitionsCount, SIMCONNECT_OBJECT_ID_USER,
0, 0, sizeof(pValue), @pValue))) then
begin
DebugLog('FSX: Var ' + pName + ', definition ' + IntToStr(lVarIndex) +
' set to ' + FloatToStr(pValue));
end
else
begin
DebugLog('FSX: Error setting var ' + pName + ' to ' + FloatToStr(pValue));
end;
end;
end;
procedure TFSXcontrol.AddDefaultEvents(l : TStrings);
begin
l.Add('REPAIR_AND_REFUEL');
l.Add('DME_SELECT');
l.Add('FUEL_DUMP_TOGGLE');
l.Add('VIEW_COCKPIT_FORWARD');
l.Add('VIEW_VIRTUAL_COCKPIT_FORWARD');
l.Add('TOW_PLANE_RELEASE');
l.Add('TOW_PLANE_REQUEST');
l.Add('REQUEST_FUEL_KEY');
l.Add('RELEASE_DROPPABLE_OBJECTS');
l.Add('VIEW_PANEL_ALPHA_SET');
l.Add('VIEW_PANEL_ALPHA_SELECT');
l.Add('VIEW_PANEL_ALPHA_INC');
l.Add('VIEW_PANEL_ALPHA_DEC');
l.Add('VIEW_LINKING_SET');
l.Add('VIEW_LINKING_TOGGLE');
l.Add('RADIO_SELECTED_DME_IDENT_ENABLE');
l.Add('RADIO_SELECTED_DME_IDENT_DISABLE');
l.Add('RADIO_SELECTED_DME_IDENT_SET');
l.Add('RADIO_SELECTED_DME_IDENT_TOGGLE');
l.Add('GAUGE_KEYSTROKE');
l.Add('SIMUI_WINDOW_HIDESHOW');
l.Add('TOGGLE_VARIOMETER_SWITCH');
l.Add('TOGGLE_TURN_INDICATOR_SWITCH');
l.Add('VIEW_WINDOW_TITLES_TOGGLE');
l.Add('VIEW_AXIS_INDICATOR_CYCLE');
l.Add('VIEW_MAP_ORIENTATION_CYCLE');
l.Add('TOGGLE_JETWAY');
l.Add('RETRACT_FLOAT_SWITCH_DEC');
l.Add('RETRACT_FLOAT_SWITCH_INC');
l.Add('TOGGLE_WATER_BALLAST_VALVE');
l.Add('VIEW_CHASE_DISTANCE_ADD');
l.Add('VIEW_CHASE_DISTANCE_SUB');
l.Add('APU_STARTER');
l.Add('APU_OFF_SWITCH');
l.Add('APU_GENERATOR_SWITCH_TOGGLE');
l.Add('APU_GENERATOR_SWITCH_SET');
l.Add('EXTINGUISH_ENGINE_FIRE');
l.Add('AP_MAX_BANK_INC');
l.Add('AP_MAX_BANK_DEC');
l.Add('AP_N1_HOLD');
l.Add('AP_N1_REF_INC');
l.Add('AP_N1_REF_DEC');
l.Add('HYDRAULIC_SWITCH_TOGGLE');
l.Add('BLEED_AIR_SOURCE_CONTROL_INC');
l.Add('BLEED_AIR_SOURCE_CONTROL_DEC');
l.Add('TURBINE_IGNITION_SWITCH_TOGGLE');
l.Add('CABIN_NO_SMOKING_ALERT_');
l.Add('SWITCH_TOGGLE');
l.Add('CABIN_SEATBELTS_ALERT_');
l.Add('SWITCH_TOGGLE');
l.Add('ANTISKID_BRAKES_TOGGLE');
l.Add('GPWS_SWITCH_TOGGLE');
l.Add('VIDEO_RECORD_TOGGLE');
l.Add('TOGGLE_AIRPORT_NAME_DISPLAY');
l.Add('CAPTURE_SCREENSHOT');
l.Add('MOUSE_LOOK_TOGGLE');
l.Add('YAXIS_INVERT_TOGGLE');
l.Add('AUTORUDDER_TOGGLE');
l.Add('FLY_BY_WIRE_ELAC_TOGGLE');
l.Add('FLY_BY_WIRE_FAC_TOGGLE');
l.Add('FLY_BY_WIRE_SEC_TOGGLE');
l.Add('MANUAL_FUEL_PRESSURE_PUMP');
l.Add('STEERING_INC');
l.Add('STEERING_DEC');
l.Add('STEERING_SET');
l.Add('FREEZE_LATITUDE_LONGITUDE_TOGGLE');
l.Add('FREEZE_LATITUDE_LONGITUDE_SET');
l.Add('FREEZE_ALTITUDE_TOGGLE');
l.Add('FREEZE_ALTITUDE_SET');
l.Add('KEY_PRESSURIZATION_PRESSURE_ALT_INC');
l.Add('KEY_PRESSURIZATION_PRESSURE_ALT_DEC');
l.Add('PRESSURIZATION_CLIMB_RATE_INC');
l.Add('PRESSURIZATION_CLIMB_RATE_DEC');
l.Add('PRESSURIZATION_PRESSURE_DUMP_SWTICH');
l.Add('FUEL_SELECTOR_LEFT_MAIN');
l.Add('FUEL_SELECTOR_2_LEFT_MAIN');
l.Add('FUEL_SELECTOR_3_LEFT_MAIN');
l.Add('FUEL_SELECTOR_4_LEFT_MAIN');
l.Add('FUEL_SELECTOR_RIGHT_MAIN');
l.Add('FUEL_SELECTOR_2_RIGHT_MAIN');
l.Add('FUEL_SELECTOR_3_RIGHT_MAIN');
l.Add('FUEL_SELECTOR_4_RIGHT_MAIN');
l.Add('MP_VOICE_CAPTURE_START');
l.Add('MP_VOICE_CAPTURE_STOP');
l.Add('MP_BROADCAST_VOICE_CAPTURE_START');
l.Add('MP_BROADCAST_VOICE_CAPTURE_STOP');
l.Add('POINT_OF_INTEREST_TOGGLE_POINTER');
l.Add('POINT_OF_INTEREST_CYCLE_PREVIOUS');
l.Add('POINT_OF_INTEREST_CYCLE_NEXT');
l.Add('G1000_PFD_FLIGHTPLAN_BUTTON');
l.Add('G1000_PFD_PROCEDURE_BUTTON');
l.Add('G1000_PFD_ZOOMIN_BUTTON');
l.Add('G1000_PFD_ZOOMOUT_BUTTON');
l.Add('G1000_PFD_DIRECTTO_BUTTON');
l.Add('G1000_PFD_MENU_BUTTON');
l.Add('G1000_PFD_CLEAR_BUTTON');
l.Add('G1000_PFD_ENTER_BUTTON');
l.Add('G1000_PFD_CURSOR_BUTTON');
l.Add('G1000_PFD_GROUP_KNOB_INC');
l.Add('G1000_PFD_GROUP_KNOB_DEC');
l.Add('G1000_PFD_PAGE_KNOB_INC');
l.Add('G1000_PFD_PAGE_KNOB_DEC');
l.Add('G1000_PFD_SOFTKEY1');
l.Add('G1000_PFD_SOFTKEY2');
l.Add('G1000_PFD_SOFTKEY3');
l.Add('G1000_PFD_SOFTKEY4');
l.Add('G1000_PFD_SOFTKEY5');
l.Add('G1000_PFD_SOFTKEY6');
l.Add('G1000_PFD_SOFTKEY7');
l.Add('G1000_PFD_SOFTKEY8');
l.Add('G1000_PFD_SOFTKEY9');
l.Add('G1000_PFD_SOFTKEY10');
l.Add('G1000_PFD_SOFTKEY11');
l.Add('G1000_PFD_SOFTKEY12');
l.Add('G1000_MFD_FLIGHTPLAN_BUTTON');
l.Add('G1000_MFD_PROCEDURE_BUTTON');
l.Add('G1000_MFD_ZOOMIN_BUTTON');
l.Add('G1000_MFD_ZOOMOUT_BUTTON');
l.Add('G1000_MFD_DIRECTTO_BUTTON');
l.Add('G1000_MFD_MENU_BUTTON');
l.Add('G1000_MFD_CLEAR_BUTTON');
l.Add('G1000_MFD_ENTER_BUTTON');
l.Add('G1000_MFD_CURSOR_BUTTON');
l.Add('G1000_MFD_GROUP_KNOB_INC');
l.Add('G1000_MFD_GROUP_KNOB_DEC');
l.Add('G1000_MFD_PAGE_KNOB_INC');
l.Add('G1000_MFD_PAGE_KNOB_DEC');
l.Add('G1000_MFD_SOFTKEY1');
l.Add('G1000_MFD_SOFTKEY2');
l.Add('G1000_MFD_SOFTKEY3');
l.Add('G1000_MFD_SOFTKEY4');
l.Add('G1000_MFD_SOFTKEY5');
l.Add('G1000_MFD_SOFTKEY6');
l.Add('G1000_MFD_SOFTKEY7');
l.Add('G1000_MFD_SOFTKEY8');
l.Add('G1000_MFD_SOFTKEY9');
l.Add('G1000_MFD_SOFTKEY10');
l.Add('G1000_MFD_SOFTKEY11');
l.Add('G1000_MFD_SOFTKEY12');
l.Add('THROTTLE_FULL');
l.Add('THROTTLE_INCR');
l.Add('THROTTLE_INCR_SMALL');
l.Add('THROTTLE_DECR');
l.Add('THROTTLE_DECR_SMALL');
l.Add('THROTTLE_CUT');
l.Add('INCREASE_THROTTLE');
l.Add('DECREASE_THROTTLE');
l.Add('THROTTLE_SET');
l.Add('AXIS_THROTTLE_SET');
l.Add('THROTTLE1_SET');
l.Add('THROTTLE2_SET');
l.Add('THROTTLE3_SET');
l.Add('THROTTLE4_SET');
l.Add('THROTTLE1_FULL');
l.Add('THROTTLE1_INCR');
l.Add('THROTTLE1_INCR_SMALL');
l.Add('THROTTLE1_DECR');
l.Add('THROTTLE1_CUT');
l.Add('THROTTLE2_FULL');
l.Add('THROTTLE2_INCR');
l.Add('THROTTLE2_INCR_SMALL');
l.Add('THROTTLE2_DECR');
l.Add('THROTTLE2_CUT');
l.Add('THROTTLE3_FULL');
l.Add('THROTTLE3_INCR');
l.Add('THROTTLE3_INCR_SMALL');
l.Add('THROTTLE3_DECR');
l.Add('THROTTLE3_CUT');
l.Add('THROTTLE4_FULL');
l.Add('THROTTLE4_INCR');
l.Add('THROTTLE4_INCR_SMALL');
l.Add('THROTTLE4_DECR');
l.Add('THROTTLE4_CUT');
l.Add('THROTTLE_10');
l.Add('THROTTLE_20');
l.Add('THROTTLE_30');
l.Add('THROTTLE_40');
l.Add('THROTTLE_50');
l.Add('THROTTLE_60');
l.Add('THROTTLE_70');
l.Add('THROTTLE_80');
l.Add('THROTTLE_90');
l.Add('AXIS_THROTTLE1_SET');
l.Add('AXIS_THROTTLE2_SET');
l.Add('AXIS_THROTTLE3_SET');
l.Add('AXIS_THROTTLE4_SET');
l.Add('THROTTLE1_DECR_SMALL');
l.Add('THROTTLE2_DECR_SMALL');
l.Add('THROTTLE3_DECR_SMALL');
l.Add('THROTTLE4_DECR_SMALL');
l.Add('PROP_PITCH_DECR_SMALL');
l.Add('PROP_PITCH1_DECR_SMALL');
l.Add('PROP_PITCH2_DECR_SMALL');
l.Add('PROP_PITCH3_DECR_SMALL');
l.Add('PROP_PITCH4_DECR_SMALL');
l.Add('MIXTURE1_RICH');
l.Add('MIXTURE1_INCR');
l.Add('MIXTURE1_INCR_SMALL');
l.Add('MIXTURE1_DECR');
l.Add('MIXTURE1_LEAN');
l.Add('MIXTURE2_RICH');
l.Add('MIXTURE2_INCR');
l.Add('MIXTURE2_INCR_SMALL');
l.Add('MIXTURE2_DECR');
l.Add('MIXTURE2_LEAN');
l.Add('MIXTURE3_RICH');
l.Add('MIXTURE3_INCR');
l.Add('MIXTURE3_INCR_SMALL');
l.Add('MIXTURE3_DECR');
l.Add('MIXTURE3_LEAN');
l.Add('MIXTURE4_RICH');
l.Add('MIXTURE4_INCR');
l.Add('MIXTURE4_INCR_SMALL');
l.Add('MIXTURE4_DECR');
l.Add('MIXTURE4_LEAN');
l.Add('MIXTURE_SET');
l.Add('MIXTURE_RICH');
l.Add('MIXTURE_INCR');
l.Add('MIXTURE_INCR_SMALL');
l.Add('MIXTURE_DECR');
l.Add('MIXTURE_LEAN');
l.Add('MIXTURE1_SET');
l.Add('MIXTURE2_SET');
l.Add('MIXTURE3_SET');
l.Add('MIXTURE4_SET');
l.Add('AXIS_MIXTURE_SET');
l.Add('AXIS_MIXTURE1_SET');
l.Add('AXIS_MIXTURE2_SET');
l.Add('AXIS_MIXTURE3_SET');
l.Add('AXIS_MIXTURE4_SET');
l.Add('MIXTURE_SET_BEST');
l.Add('MIXTURE_DECR_SMALL');
l.Add('MIXTURE1_DECR_SMALL');
l.Add('MIXTURE2_DECR_SMALL');
l.Add('MIXTURE3_DECR_SMALL');
l.Add('MIXTURE4_DECR_SMALL');
l.Add('PROP_PITCH_SET');
l.Add('PROP_PITCH_LO');
l.Add('PROP_PITCH_INCR');
l.Add('PROP_PITCH_INCR_SMALL');
l.Add('PROP_PITCH_DECR');
l.Add('PROP_PITCH_HI');
l.Add('PROP_PITCH1_SET');
l.Add('PROP_PITCH2_SET');
l.Add('PROP_PITCH3_SET');
l.Add('PROP_PITCH4_SET');
l.Add('PROP_PITCH1_LO');
l.Add('PROP_PITCH1_INCR');
l.Add('PROP_PITCH1_INCR_SMALL');
l.Add('PROP_PITCH1_DECR');
l.Add('PROP_PITCH1_HI');
l.Add('PROP_PITCH2_LO');
l.Add('PROP_PITCH2_INCR');
l.Add('PROP_PITCH2_INCR_SMALL');
l.Add('PROP_PITCH2_DECR');
l.Add('PROP_PITCH2_HI');
l.Add('PROP_PITCH3_LO');
l.Add('PROP_PITCH3_INCR');
l.Add('PROP_PITCH3_INCR_SMALL');
l.Add('PROP_PITCH3_DECR');
l.Add('PROP_PITCH3_HI');
l.Add('PROP_PITCH4_LO');
l.Add('PROP_PITCH4_INCR');
l.Add('PROP_PITCH4_INCR_SMALL');
l.Add('PROP_PITCH4_DECR');
l.Add('PROP_PITCH4_HI');
l.Add('AXIS_PROPELLER_SET');
l.Add('AXIS_PROPELLER1_SET');
l.Add('AXIS_PROPELLER2_SET');
l.Add('AXIS_PROPELLER3_SET');
l.Add('AXIS_PROPELLER4_SET');
l.Add('JET_STARTER');
l.Add('MAGNETO_SET');
l.Add('TOGGLE_STARTER1');
l.Add('TOGGLE_STARTER2');
l.Add('TOGGLE_STARTER3');
l.Add('TOGGLE_STARTER4');
l.Add('TOGGLE_ALL_STARTERS');
l.Add('ENGINE_AUTO_START');
l.Add('ENGINE_AUTO_SHUTDOWN');
l.Add('MAGNETO');
l.Add('MAGNETO_DECR');
l.Add('MAGNETO_INCR');
l.Add('MAGNETO1_OFF');
l.Add('MAGNETO1_RIGHT');
l.Add('MAGNETO1_LEFT');
l.Add('MAGNETO1_BOTH');
l.Add('MAGNETO1_START');
l.Add('MAGNETO2_OFF');
l.Add('MAGNETO2_RIGHT');
l.Add('MAGNETO2_LEFT');
l.Add('MAGNETO2_BOTH');
l.Add('MAGNETO2_START');
l.Add('MAGNETO3_OFF');
l.Add('MAGNETO3_RIGHT');
l.Add('MAGNETO3_LEFT');
l.Add('MAGNETO3_BOTH');
l.Add('MAGNETO3_START');
l.Add('MAGNETO4_OFF');
l.Add('MAGNETO4_RIGHT');
l.Add('MAGNETO4_LEFT');
l.Add('MAGNETO4_BOTH');
l.Add('MAGNETO4_START');
l.Add('MAGNETO_OFF');
l.Add('MAGNETO_RIGHT');
l.Add('MAGNETO_LEFT');
l.Add('MAGNETO_BOTH');
l.Add('MAGNETO_START');
l.Add('MAGNETO1_DECR');
l.Add('MAGNETO1_INCR');
l.Add('MAGNETO2_DECR');
l.Add('MAGNETO2_INCR');
l.Add('MAGNETO3_DECR');
l.Add('MAGNETO3_INCR');
l.Add('MAGNETO4_DECR');
l.Add('MAGNETO4_INCR');
l.Add('MAGNETO1_SET');
l.Add('MAGNETO2_SET');
l.Add('MAGNETO3_SET');
l.Add('MAGNETO4_SET');
l.Add('ANTI_ICE_ON');
l.Add('ANTI_ICE_OFF');
l.Add('ANTI_ICE_SET');
l.Add('ANTI_ICE_TOGGLE');
l.Add('ANTI_ICE_TOGGLE_ENG1');
l.Add('ANTI_ICE_TOGGLE_ENG2');
l.Add('ANTI_ICE_TOGGLE_ENG3');
l.Add('ANTI_ICE_TOGGLE_ENG4');
l.Add('ANTI_ICE_SET_ENG1');
l.Add('ANTI_ICE_SET_ENG2');
l.Add('ANTI_ICE_SET_ENG3');
l.Add('ANTI_ICE_SET_ENG4');
l.Add('TOGGLE_FUEL_VALVE_ALL');
l.Add('TOGGLE_FUEL_VALVE_ENG1');
l.Add('TOGGLE_FUEL_VALVE_ENG2');
l.Add('TOGGLE_FUEL_VALVE_ENG3');
l.Add('TOGGLE_FUEL_VALVE_ENG4');
l.Add('COWLFLAP1_SET');
l.Add('COWLFLAP2_SET');
l.Add('COWLFLAP3_SET');
l.Add('COWLFLAP4_SET');
l.Add('INC_COWL_FLAPS');
l.Add('DEC_COWL_FLAPS');
l.Add('INC_COWL_FLAPS1');
l.Add('DEC_COWL_FLAPS1');
l.Add('INC_COWL_FLAPS2');
l.Add('DEC_COWL_FLAPS2');
l.Add('INC_COWL_FLAPS3');
l.Add('DEC_COWL_FLAPS3');
l.Add('INC_COWL_FLAPS4');
l.Add('DEC_COWL_FLAPS4');
l.Add('FUEL_PUMP');
l.Add('TOGGLE_ELECT_FUEL_PUMP');
l.Add('TOGGLE_ELECT_FUEL_PUMP1');
l.Add('TOGGLE_ELECT_FUEL_PUMP2');
l.Add('TOGGLE_ELECT_FUEL_PUMP3');
l.Add('TOGGLE_ELECT_FUEL_PUMP4');
l.Add('ENGINE_PRIMER');
l.Add('TOGGLE_PRIMER');
l.Add('TOGGLE_PRIMER1');
l.Add('TOGGLE_PRIMER2');
l.Add('TOGGLE_PRIMER3');
l.Add('TOGGLE_PRIMER4');
l.Add('TOGGLE_FEATHER_SWITCHES');
l.Add('TOGGLE_FEATHER_SWITCH_1');
l.Add('TOGGLE_FEATHER_SWITCH_2');
l.Add('TOGGLE_FEATHER_SWITCH_3');
l.Add('TOGGLE_FEATHER_SWITCH_4');
l.Add('TOGGLE_PROPELLER_SYNC');
l.Add('TOGGLE_AUTOFEATHER_ARM');
l.Add('TOGGLE_AFTERBURNER');
l.Add('TOGGLE_AFTERBURNER1');
l.Add('TOGGLE_AFTERBURNER2');
l.Add('TOGGLE_AFTERBURNER3');
l.Add('TOGGLE_AFTERBURNER4');
l.Add('ENGINE');
l.Add('SPOILERS_TOGGLE');
l.Add('FLAPS_UP');
l.Add('FLAPS_1');
l.Add('FLAPS_2');
l.Add('FLAPS_3');
l.Add('FLAPS_DOWN');
l.Add('ELEV_TRIM_DN');
l.Add('ELEV_DOWN');
l.Add('AILERONS_LEFT');
l.Add('CENTER_AILER_RUDDER');
l.Add('AILERONS_RIGHT');
l.Add('ELEV_TRIM_UP');
l.Add('ELEV_UP');
l.Add('RUDDER_LEFT');
l.Add('RUDDER_CENTER');
l.Add('RUDDER_RIGHT');
l.Add('ELEVATOR_SET');
l.Add('AILERON_SET');
l.Add('RUDDER_SET');
l.Add('FLAPS_INCR');
l.Add('FLAPS_DECR');
l.Add('AXIS_ELEVATOR_SET');
l.Add('AXIS_AILERONS_SET');
l.Add('AXIS_RUDDER_SET');
l.Add('AXIS_ELEV_TRIM_SET');
l.Add('SPOILERS_SET');
l.Add('SPOILERS_ARM_TOGGLE');
l.Add('SPOILERS_ON');
l.Add('SPOILERS_OFF');
l.Add('SPOILERS_ARM_ON');
l.Add('SPOILERS_ARM_OFF');
l.Add('SPOILERS_ARM_SET');
l.Add('AILERON_TRIM_LEFT');
l.Add('AILERON_TRIM_RIGHT');
l.Add('RUDDER_TRIM_LEFT');
l.Add('RUDDER_TRIM_RIGHT');
l.Add('AXIS_SPOILER_SET');
l.Add('FLAPS_SET');
l.Add('ELEVATOR_TRIM_SET');
l.Add('AXIS_FLAPS_SET');
l.Add('AP_MASTER');
l.Add('AUTOPILOT_OFF');
l.Add('AUTOPILOT_ON');
l.Add('YAW_DAMPER_TOGGLE');
l.Add('AP_PANEL_HEADING_HOLD');
l.Add('AP_PANEL_ALTITUDE_HOLD');
l.Add('AP_ATT_HOLD_ON');
l.Add('AP_LOC_HOLD_ON');
l.Add('AP_APR_HOLD_ON');
l.Add('AP_HDG_HOLD_ON');
l.Add('AP_ALT_HOLD_ON');
l.Add('AP_WING_LEVELER_ON');
l.Add('AP_BC_HOLD_ON');
l.Add('AP_NAV1_HOLD_ON');
l.Add('AP_ATT_HOLD_OFF');
l.Add('AP_LOC_HOLD_OFF');
l.Add('AP_APR_HOLD_OFF');
l.Add('AP_HDG_HOLD_OFF');
l.Add('AP_ALT_HOLD_OFF');
l.Add('AP_WING_LEVELER_OFF');
l.Add('AP_BC_HOLD_OFF');
l.Add('AP_NAV1_HOLD_OFF');
l.Add('AP_AIRSPEED_HOLD');
l.Add('AUTO_THROTTLE_ARM');
l.Add('AUTO_THROTTLE_TO_GA');
l.Add('HEADING_BUG_INC');
l.Add('HEADING_BUG_DEC');
l.Add('HEADING_BUG_SET');
l.Add('AP_PANEL_SPEED_HOLD');
l.Add('AP_ALT_VAR_INC');
l.Add('AP_ALT_VAR_DEC');
l.Add('AP_VS_VAR_INC');
l.Add('AP_VS_VAR_DEC');
l.Add('AP_SPD_VAR_INC');
l.Add('AP_SPD_VAR_DEC');
l.Add('AP_PANEL_MACH_HOLD');
l.Add('AP_MACH_VAR_INC');
l.Add('AP_MACH_VAR_DEC');
l.Add('AP_MACH_HOLD');
l.Add('AP_ALT_VAR_SET_METRIC');
l.Add('AP_VS_VAR_SET_ENGLISH');
l.Add('AP_SPD_VAR_SET');
l.Add('AP_MACH_VAR_SET');
l.Add('YAW_DAMPER_ON');
l.Add('YAW_DAMPER_OFF');
l.Add('YAW_DAMPER_SET');
l.Add('AP_AIRSPEED_ON');
l.Add('AP_AIRSPEED_OFF');
l.Add('AP_AIRSPEED_SET');
l.Add('AP_MACH_ON');
l.Add('AP_MACH_OFF');
l.Add('AP_MACH_SET');
l.Add('AP_PANEL_ALTITUDE_ON');
l.Add('AP_PANEL_ALTITUDE_OFF');
l.Add('AP_PANEL_ALTITUDE_SET');
l.Add('AP_PANEL_HEADING_ON');
l.Add('AP_PANEL_HEADING_OFF');
l.Add('AP_PANEL_HEADING_SET');
l.Add('AP_PANEL_MACH_ON');
l.Add('AP_PANEL_MACH_OFF');
l.Add('AP_PANEL_MACH_SET');
l.Add('AP_PANEL_SPEED_ON');
l.Add('AP_PANEL_SPEED_OFF');
l.Add('AP_PANEL_SPEED_SET');
l.Add('AP_ALT_VAR_SET_ENGLISH');
l.Add('AP_VS_VAR_SET_METRIC');
l.Add('TOGGLE_FLIGHT_DIRECTOR');
l.Add('SYNC_FLIGHT_DIRECTOR_PITCH');
l.Add('INCREASE_AUTOBRAKE_CONTROL');
l.Add('DECREASE_AUTOBRAKE_CONTROL');
l.Add('AP_PANEL_SPEED_HOLD_TOGGLE');
l.Add('AP_PANEL_MACH_HOLD_TOGGLE');
l.Add('AP_NAV_SELECT_SET');
l.Add('HEADING_BUG_SELECT');
l.Add('ALTITUDE_BUG_SELECT');
l.Add('VSI_BUG_SELECT');
l.Add('AIRSPEED_BUG_SELECT');
l.Add('AP_PITCH_REF_INC_UP');
l.Add('AP_PITCH_REF_INC_DN');
l.Add('AP_PITCH_REF_SELECT');
l.Add('AP_ATT_HOLD');
l.Add('AP_LOC_HOLD');
l.Add('AP_APR_HOLD');
l.Add('AP_HDG_HOLD');
l.Add('AP_ALT_HOLD');
l.Add('AP_WING_LEVELER');
l.Add('AP_BC_HOLD');
l.Add('AP_NAV1_HOLD');
l.Add('FUEL_SELECTOR_OFF');
l.Add('FUEL_SELECTOR_ALL');
l.Add('FUEL_SELECTOR_LEFT');
l.Add('FUEL_SELECTOR_RIGHT');
l.Add('FUEL_SELECTOR_LEFT_AUX');
l.Add('FUEL_SELECTOR_RIGHT_AUX');
l.Add('FUEL_SELECTOR_CENTER');
l.Add('FUEL_SELECTOR_SET');
l.Add('FUEL_SELECTOR_2_OFF');
l.Add('FUEL_SELECTOR_2_ALL');
l.Add('FUEL_SELECTOR_2_LEFT');
l.Add('FUEL_SELECTOR_2_RIGHT');
l.Add('FUEL_SELECTOR_2_LEFT_AUX');
l.Add('FUEL_SELECTOR_2_RIGHT_AUX');
l.Add('FUEL_SELECTOR_2_CENTER');
l.Add('FUEL_SELECTOR_2_SET');
l.Add('FUEL_SELECTOR_3_OFF');
l.Add('FUEL_SELECTOR_3_ALL');
l.Add('FUEL_SELECTOR_3_LEFT');
l.Add('FUEL_SELECTOR_3_RIGHT');
l.Add('FUEL_SELECTOR_3_LEFT_AUX');
l.Add('FUEL_SELECTOR_3_RIGHT_AUX');
l.Add('FUEL_SELECTOR_3_CENTER');
l.Add('FUEL_SELECTOR_3_SET');
l.Add('FUEL_SELECTOR_4_OFF');
l.Add('FUEL_SELECTOR_4_ALL');
l.Add('FUEL_SELECTOR_4_LEFT');
l.Add('FUEL_SELECTOR_4_RIGHT');
l.Add('FUEL_SELECTOR_4_LEFT_AUX');
l.Add('FUEL_SELECTOR_4_RIGHT_AUX');
l.Add('FUEL_SELECTOR_4_CENTER');
l.Add('FUEL_SELECTOR_4_SET');
l.Add('CROSS_FEED_OPEN');
l.Add('CROSS_FEED_TOGGLE');
l.Add('CROSS_FEED_OFF');
l.Add('XPNDR');
l.Add('ADF');
l.Add('DME');
l.Add('COM_RADIO');
l.Add('VOR_OBS');
l.Add('NAV_RADIO');
l.Add('COM_RADIO_WHOLE_DEC');
l.Add('COM_RADIO_WHOLE_INC');
l.Add('COM_RADIO_FRACT_DEC');
l.Add('COM_RADIO_FRACT_INC');
l.Add('NAV1_RADIO_WHOLE_DEC');
l.Add('NAV1_RADIO_WHOLE_INC');
l.Add('NAV1_RADIO_FRACT_DEC');
l.Add('NAV1_RADIO_FRACT_INC');
l.Add('NAV2_RADIO_WHOLE_DEC');
l.Add('NAV2_RADIO_WHOLE_INC');
l.Add('NAV2_RADIO_FRACT_DEC');
l.Add('NAV2_RADIO_FRACT_INC');
l.Add('ADF_100_INC');
l.Add('ADF_10_INC');
l.Add('ADF_1_INC');
l.Add('XPNDR_1000_INC');
l.Add('XPNDR_100_INC');
l.Add('XPNDR_10_INC');
l.Add('XPNDR_1_INC');
l.Add('VOR1_OBI_DEC');
l.Add('VOR1_OBI_INC');
l.Add('VOR2_OBI_DEC');
l.Add('VOR2_OBI_INC');
l.Add('ADF_100_DEC');
l.Add('ADF_10_DEC');
l.Add('ADF_1_DEC');
l.Add('COM_RADIO_SET');
l.Add('NAV1_RADIO_SET');
l.Add('NAV2_RADIO_SET');
l.Add('ADF_SET');
l.Add('XPNDR_SET');
l.Add('VOR1_SET');
l.Add('VOR2_SET');
l.Add('DME1_TOGGLE');
l.Add('DME2_TOGGLE');
l.Add('RADIO_VOR1_IDENT_DISABLE');
l.Add('RADIO_VOR2_IDENT_DISABLE');
l.Add('RADIO_DME1_IDENT_DISABLE');
l.Add('RADIO_DME2_IDENT_DISABLE');
l.Add('RADIO_ADF_IDENT_DISABLE');
l.Add('RADIO_VOR1_IDENT_ENABLE');
l.Add('RADIO_VOR2_IDENT_ENABLE');
l.Add('RADIO_DME1_IDENT_ENABLE');
l.Add('RADIO_DME2_IDENT_ENABLE');
l.Add('RADIO_ADF_IDENT_ENABLE');
l.Add('RADIO_VOR1_IDENT_TOGGLE');
l.Add('RADIO_VOR2_IDENT_TOGGLE');
l.Add('RADIO_DME1_IDENT_TOGGLE');
l.Add('RADIO_DME2_IDENT_TOGGLE');
l.Add('RADIO_ADF_IDENT_TOGGLE');
l.Add('RADIO_VOR1_IDENT_SET');
l.Add('RADIO_VOR2_IDENT_SET');
l.Add('RADIO_DME1_IDENT_SET');
l.Add('RADIO_DME2_IDENT_SET');
l.Add('RADIO_ADF_IDENT_SET');
l.Add('ADF_CARD_INC');
l.Add('ADF_CARD_DEC');
l.Add('ADF_CARD_SET');
l.Add('TOGGLE_DME');
l.Add('TOGGLE_AVIONICS_MASTER');
l.Add('COM_STBY_RADIO_SET');
l.Add('COM_STBY_RADIO_SWAP');
l.Add('COM_RADIO_FRACT_DEC_CARRY');
l.Add('COM_RADIO_FRACT_INC_CARRY');
l.Add('COM2_RADIO_WHOLE_DEC');
l.Add('COM2_RADIO_WHOLE_INC');
l.Add('COM2_RADIO_FRACT_DEC');
l.Add('COM2_RADIO_FRACT_DEC_CARRY');
l.Add('COM2_RADIO_FRACT_INC');
l.Add('COM2_RADIO_FRACT_INC_CARRY');
l.Add('COM2_RADIO_SET');
l.Add('COM2_STBY_RADIO_SET');
l.Add('COM2_RADIO_SWAP');
l.Add('NAV1_RADIO_FRACT_DEC_CARRY');
l.Add('NAV1_RADIO_FRACT_INC_CARRY');
l.Add('NAV1_STBY_SET');
l.Add('NAV1_RADIO_SWAP');
l.Add('NAV2_RADIO_FRACT_DEC_CARRY');
l.Add('NAV2_RADIO_FRACT_INC_CARRY');
l.Add('NAV2_STBY_SET');
l.Add('NAV2_RADIO_SWAP');
l.Add('ADF1_RADIO_TENTHS_DEC');
l.Add('ADF1_RADIO_TENTHS_INC');
l.Add('XPNDR_1000_DEC');
l.Add('XPNDR_100_DEC');
l.Add('XPNDR_10_DEC');
l.Add('XPNDR_1_DEC');
l.Add('XPNDR_DEC_CARRY');
l.Add('XPNDR_INC_CARRY');
l.Add('ADF_FRACT_DEC_CARRY');
l.Add('ADF_FRACT_INC_CARRY');
l.Add('COM1_TRANSMIT_SELECT');
l.Add('COM2_TRANSMIT_SELECT');
l.Add('COM_RECEIVE_ALL_TOGGLE');
l.Add('COM_RECEIVE_ALL_SET');
l.Add('MARKER_SOUND_TOGGLE');
l.Add('ADF_COMPLETE_SET');
l.Add('ADF1_WHOLE_INC');
l.Add('ADF1_WHOLE_DEC');
l.Add('ADF2_100_INC');
l.Add('ADF2_10_INC');
l.Add('ADF2_1_INC');
l.Add('ADF2_RADIO_TENTHS_INC');
l.Add('ADF2_100_DEC');
l.Add('ADF2_10_DEC');
l.Add('ADF2_1_DEC');
l.Add('ADF2_RADIO_TENTHS_DEC');
l.Add('ADF2_WHOLE_INC');
l.Add('ADF2_WHOLE_DEC');
l.Add('ADF2_FRACT_DEC_CARRY');
l.Add('ADF2_FRACT_INC_CARRY');
l.Add('ADF2_COMPLETE_SET');
l.Add('RADIO_ADF2_IDENT_DISABLE');
l.Add('RADIO_ADF2_IDENT_ENABLE');
l.Add('RADIO_ADF2_IDENT_TOGGLE');
l.Add('RADIO_ADF2_IDENT_SET');
l.Add('FREQUENCY_SWAP');
l.Add('TOGGLE_GPS_DRIVES_NAV1');
l.Add('GPS_POWER_BUTTON');
l.Add('GPS_NEAREST_BUTTON');
l.Add('GPS_OBS_BUTTON');
l.Add('GPS_MSG_BUTTON');
l.Add('GPS_MSG_BUTTON_DOWN');
l.Add('GPS_MSG_BUTTON_UP');
l.Add('GPS_FLIGHTPLAN_BUTTON');
l.Add('GPS_TERRAIN_BUTTON');
l.Add('GPS_PROCEDURE_BUTTON');
l.Add('GPS_ZOOMIN_BUTTON');
l.Add('GPS_ZOOMOUT_BUTTON');
l.Add('GPS_DIRECTTO_BUTTON');
l.Add('GPS_MENU_BUTTON');
l.Add('GPS_CLEAR_BUTTON');
l.Add('GPS_CLEAR_ALL_BUTTON');
l.Add('GPS_CLEAR_BUTTON_DOWN');
l.Add('GPS_CLEAR_BUTTON_UP');
l.Add('GPS_ENTER_BUTTON');
l.Add('GPS_CURSOR_BUTTON');
l.Add('GPS_GROUP_KNOB_INC');
l.Add('GPS_GROUP_KNOB_DEC');
l.Add('GPS_PAGE_KNOB_INC');
l.Add('GPS_PAGE_KNOB_DEC');
l.Add('EGT');
l.Add('EGT_INC');
l.Add('EGT_DEC');
l.Add('EGT_SET');
l.Add('BAROMETRIC');
l.Add('GYRO_DRIFT_INC');
l.Add('GYRO_DRIFT_DEC');
l.Add('KOHLSMAN_INC');
l.Add('KOHLSMAN_DEC');
l.Add('KOHLSMAN_SET');
l.Add('TRUE_AIRSPEED_CAL_INC');
l.Add('TRUE_AIRSPEED_CAL_DEC');
l.Add('TRUE_AIRSPEED_CAL_SET');
l.Add('EGT1_INC');
l.Add('EGT1_DEC');
l.Add('EGT1_SET');
l.Add('EGT2_INC');
l.Add('EGT2_DEC');
l.Add('EGT2_SET');
l.Add('EGT3_INC');
l.Add('EGT3_DEC');
l.Add('EGT3_SET');
l.Add('EGT4_INC');
l.Add('EGT4_DEC');
l.Add('EGT4_SET');
l.Add('ATTITUDE_BARS_POSITION_UP');
l.Add('ATTITUDE_BARS_POSITION_DOWN');
l.Add('ATTITUDE_CAGE_BUTTON');
l.Add('RESET_G_FORCE_INDICATOR');
l.Add('RESET_MAX_RPM_INDICATOR');
l.Add('HEADING_GYRO_SET');
l.Add('GYRO_DRIFT_SET');
l.Add('STROBES_TOGGLE');
l.Add('ALL_LIGHTS_TOGGLE');
l.Add('PANEL_LIGHTS_TOGGLE');
l.Add('LANDING_LIGHTS_TOGGLE');
l.Add('LANDING_LIGHT_UP');
l.Add('LANDING_LIGHT_DOWN');
l.Add('LANDING_LIGHT_LEFT');
l.Add('LANDING_LIGHT_RIGHT');
l.Add('LANDING_LIGHT_HOME');
l.Add('STROBES_ON');
l.Add('STROBES_OFF');
l.Add('STROBES_SET');
l.Add('PANEL_LIGHTS_ON');
l.Add('PANEL_LIGHTS_OFF');
l.Add('PANEL_LIGHTS_SET');
l.Add('LANDING_LIGHTS_ON');
l.Add('LANDING_LIGHTS_OFF');
l.Add('LANDING_LIGHTS_SET');
l.Add('TOGGLE_BEACON_LIGHTS');
l.Add('TOGGLE_TAXI_LIGHTS');
l.Add('TOGGLE_LOGO_LIGHTS');
l.Add('TOGGLE_RECOGNITION_LIGHTS');
l.Add('TOGGLE_WING_LIGHTS');
l.Add('TOGGLE_NAV_LIGHTS');
l.Add('TOGGLE_CABIN_LIGHTS');
l.Add('TOGGLE_VACUUM_FAILURE');
l.Add('TOGGLE_ELECTRICAL_FAILURE');
l.Add('TOGGLE_PITOT_BLOCKAGE');
l.Add('TOGGLE_STATIC_PORT_BLOCKAGE');
l.Add('TOGGLE_HYDRAULIC_FAILURE');
l.Add('TOGGLE_TOTAL_BRAKE_FAILURE');
l.Add('TOGGLE_LEFT_BRAKE_FAILURE');
l.Add('TOGGLE_RIGHT_BRAKE_FAILURE');
l.Add('TOGGLE_ENGINE1_FAILURE');
l.Add('TOGGLE_ENGINE2_FAILURE');
l.Add('TOGGLE_ENGINE3_FAILURE');
l.Add('TOGGLE_ENGINE4_FAILURE');
l.Add('SMOKE_TOGGLE');
l.Add('GEAR_TOGGLE');
l.Add('BRAKES');
l.Add('GEAR_SET');
l.Add('BRAKES_LEFT');
l.Add('BRAKES_RIGHT');
l.Add('PARKING_BRAKES');
l.Add('GEAR_PUMP');
l.Add('PITOT_HEAT_TOGGLE');
l.Add('SMOKE_ON');
l.Add('SMOKE_OFF');
l.Add('SMOKE_SET');
l.Add('PITOT_HEAT_ON');
l.Add('PITOT_HEAT_OFF');
l.Add('PITOT_HEAT_SET');
l.Add('GEAR_UP');
l.Add('GEAR_DOWN');
l.Add('TOGGLE_MASTER_BATTERY');
l.Add('TOGGLE_MASTER_ALTERNATOR');
l.Add('TOGGLE_ELECTRIC_VACUUM_PUMP');
l.Add('TOGGLE_ALTERNATE_STATIC');
l.Add('DECREASE_DECISION_HEIGHT');
l.Add('INCREASE_DECISION_HEIGHT');
l.Add('TOGGLE_STRUCTURAL_DEICE');
l.Add('TOGGLE_PROPELLER_DEICE');
l.Add('TOGGLE_ALTERNATOR1');
l.Add('TOGGLE_ALTERNATOR2');
l.Add('TOGGLE_ALTERNATOR3');
l.Add('TOGGLE_ALTERNATOR4');
l.Add('TOGGLE_MASTER_BATTERY_ALTERNATOR');
l.Add('AXIS_LEFT_BRAKE_SET');
l.Add('AXIS_RIGHT_BRAKE_SET');
l.Add('TOGGLE_AIRCRAFT_EXIT');
l.Add('TOGGLE_WING_FOLD');
l.Add('TOGGLE_TAIL_HOOK_HANDLE');
l.Add('TOGGLE_WATER_RUDDER');
l.Add('TOGGLE_PUSHBACK');
l.Add('TUG_HEADING');
l.Add('TUG_SPEED');
l.Add('TUG_DISABLE');
l.Add('TOGGLE_MASTER_IGNITION_SWITCH');
l.Add('TOGGLE_TAILWHEEL_LOCK');
l.Add('ADD_FUEL_QUANTITY');
l.Add('ROTOR_BRAKE');
l.Add('ROTOR_CLUTCH_SWITCH_TOGGLE');
l.Add('ROTOR_CLUTCH_SWITCH_SET');
l.Add('ROTOR_GOV_SWITCH_TOGGLE');
l.Add('ROTOR_GOV_SWITCH_SET');
l.Add('ROTOR_LATERAL_TRIM_INC');
l.Add('ROTOR_LATERAL_TRIM_DEC');
l.Add('ROTOR_LATERAL_TRIM_SET');
l.Add('SLEW_TOGGLE');
l.Add('SLEW_OFF');
l.Add('SLEW_ON');
l.Add('SLEW_SET');
l.Add('SLEW_ALTIT_UP_FAST');
l.Add('SLEW_ALTIT_UP_SLOW');
l.Add('SLEW_ALTIT_FREEZE');
l.Add('SLEW_ALTIT_DN_SLOW');
l.Add('SLEW_ALTIT_DN_FAST');
l.Add('SLEW_ALTIT_PLUS');
l.Add('SLEW_ALTIT_MINUS');
l.Add('SLEW_PITCH_DN_FAST');
l.Add('SLEW_PITCH_DN_SLOW');
l.Add('SLEW_PITCH_FREEZE');
l.Add('SLEW_PITCH_UP_SLOW');
l.Add('SLEW_PITCH_UP_FAST');
l.Add('SLEW_PITCH_PLUS');
l.Add('SLEW_PITCH_MINUS');
l.Add('SLEW_BANK_MINUS');
l.Add('SLEW_AHEAD_PLUS');
l.Add('SLEW_BANK_PLUS');
l.Add('SLEW_LEFT');
l.Add('SLEW_FREEZE');
l.Add('SLEW_RIGHT');
l.Add('SLEW_HEADING_MINUS');
l.Add('SLEW_AHEAD_MINUS');
l.Add('SLEW_HEADING_PLUS');
l.Add('SLEW_RESET');
l.Add('AXIS_SLEW_AHEAD_SET');
l.Add('AXIS_SLEW_SIDEWAYS_SET');
l.Add('AXIS_SLEW_HEADING_SET');
l.Add('AXIS_SLEW_ALT_SET');
l.Add('AXIS_SLEW_BANK_SET');
l.Add('AXIS_SLEW_PITCH_SET');
l.Add('VIEW_MODE');
l.Add('VIEW_WINDOW_TO_FRONT');
l.Add('ZOOM_IN');
l.Add('ZOOM_OUT');
l.Add('MAP_ZOOM_FINE_IN');
l.Add('PAN_LEFT');
l.Add('PAN_RIGHT');
l.Add('MAP_ZOOM_FINE_OUT');
l.Add('VIEW_FORWARD');
l.Add('VIEW_FORWARD_RIGHT');
l.Add('VIEW_RIGHT');
l.Add('VIEW_REAR_RIGHT');
l.Add('VIEW_REAR');
l.Add('VIEW_REAR_LEFT');
l.Add('VIEW_LEFT');
l.Add('VIEW_FORWARD_LEFT');
l.Add('VIEW_DOWN');
l.Add('ZOOM_MINUS');
l.Add('ZOOM_PLUS');
l.Add('PAN_UP');
l.Add('PAN_DOWN');
l.Add('VIEW_MODE_REV');
l.Add('ZOOM_IN_FINE');
l.Add('ZOOM_OUT_FINE');
l.Add('CLOSE_VIEW');
l.Add('NEW_VIEW');
l.Add('NEXT_VIEW');
l.Add('PREV_VIEW');
l.Add('PAN_LEFT_UP');
l.Add('PAN_LEFT_DOWN');
l.Add('PAN_RIGHT_UP');
l.Add('PAN_RIGHT_DOWN');
l.Add('PAN_TILT_LEFT');
l.Add('PAN_TILT_RIGHT');
l.Add('PAN_RESET');
l.Add('VIEW_FORWARD_UP');
l.Add('VIEW_FORWARD_RIGHT_UP');
l.Add('VIEW_RIGHT_UP');
l.Add('VIEW_REAR_RIGHT_UP');
l.Add('VIEW_REAR_UP');
l.Add('VIEW_REAR_LEFT_UP');
l.Add('VIEW_LEFT_UP');
l.Add('VIEW_FORWARD_LEFT_UP');
l.Add('VIEW_UP');
l.Add('VIEW_RESET');
l.Add('PAN_RESET_COCKPIT');
l.Add('KEY_CHASE_VIEW_NEXT');
l.Add('KEY_CHASE_VIEW_PREV');
l.Add('CHASE_VIEW_TOGGLE');
l.Add('EYEPOINT_UP');
l.Add('EYEPOINT_DOWN');
l.Add('EYEPOINT_RIGHT');
l.Add('EYEPOINT_LEFT');
l.Add('EYEPOINT_FORWARD');
l.Add('EYEPOINT_BACK');
l.Add('EYEPOINT_RESET');
l.Add('NEW_MAP');
l.Add('DEMO_STOP');
l.Add('SELECT_1');
l.Add('SELECT_2');
l.Add('SELECT_3');
l.Add('SELECT_4');
l.Add('MINUS');
l.Add('PLUS');
l.Add('ZOOM_1X');
l.Add('SOUND_TOGGLE');
l.Add('PAUSE_TOGGLE');
l.Add('SIM_RATE');
l.Add('JOYSTICK_CALIBRATE');
l.Add('SITUATION_SAVE');
l.Add('SITUATION_RESET');
l.Add('SOUND_SET');
l.Add('EXIT');
l.Add('ABORT');
l.Add('READOUTS_SLEW');
l.Add('READOUTS_FLIGHT');
l.Add('MINUS_SHIFT');
l.Add('PLUS_SHIFT');
l.Add('SIM_RATE_INCR');
l.Add('SIM_RATE_DECR');
l.Add('PAUSE_ON');
l.Add('PAUSE_OFF');
l.Add('KNEEBOARD_VIEW');
l.Add('PANEL_1');
l.Add('PANEL_2');
l.Add('PANEL_3');
l.Add('PANEL_4');
l.Add('PANEL_5');
l.Add('PANEL_6');
l.Add('PANEL_7');
l.Add('PANEL_8');
l.Add('PANEL_9');
l.Add('PAUSE_SET');
l.Add('SOUND_ON');
l.Add('SOUND_OFF');
l.Add('INVOKE_HELP');
l.Add('TOGGLE_AIRCRAFT_LABELS');
l.Add('FLIGHT_MAP');
l.Add('RELOAD_PANELS');
l.Add('PANEL_ID_TOGGLE');
l.Add('PANEL_ID_OPEN');
l.Add('PANEL_ID_CLOSE');
l.Add('RELOAD_USER_AIRCRAFT');
l.Add('SIM_RESET');
l.Add('VIRTUAL_COPILOT_TOGGLE');
l.Add('VIRTUAL_COPILOT_SET');
l.Add('VIRTUAL_COPILOT_ACTION');
l.Add('REFRESH_SCENERY');
l.Add('CLOCK_HOURS_DEC');
l.Add('CLOCK_HOURS_INC');
l.Add('CLOCK_MINUTES_DEC');
l.Add('CLOCK_MINUTES_INC');
l.Add('CLOCK_SECONDS_ZERO');
l.Add('CLOCK_HOURS_SET');
l.Add('CLOCK_MINUTES_SET');
l.Add('ZULU_HOURS_SET');
l.Add('ZULU_MINUTES_SET');
l.Add('ZULU_DAY_SET');
l.Add('ZULU_YEAR_SET');
l.Add('ATC');
l.Add('ATC_MENU_1');
l.Add('ATC_MENU_2');
l.Add('ATC_MENU_3');
l.Add('ATC_MENU_4');
l.Add('ATC_MENU_5');
l.Add('ATC_MENU_6');
l.Add('ATC_MENU_7');
l.Add('ATC_MENU_8');
l.Add('ATC_MENU_9');
l.Add('ATC_MENU_0');
l.Add('MP_TRANSFER_CONTROL');
l.Add('MP_PLAYER_SNAP');
l.Add('MP_GO_OBSERVER');
l.Add('MP_CHAT');
l.Add('MP_ACTIVATE_CHAT');
end;
{ TFSXVariable }
constructor TFSXVariable.Create;
begin
DefinitionId := -1;
RequestId := -1;
IsString := False;
end;
end.
|
unit Vigilante.Infra.ChangeSetItem.DataAdapter;
interface
uses
System.SysUtils, System.Classes;
type
IChangeSetItemAdapter = Interface(IInterface)
['{E115CA1F-DF9A-49C5-A931-0EACF0BD7F20}']
function GetAutor: string;
function GetDescricao: string;
function GetArquivos: TArray<TFileName>;
property Autor: string read GetAutor;
property Descricao: string read GetDescricao;
property Arquivos: TArray<TFileName> read GetArquivos;
end;
implementation
end.
|
{ *********************************************************************** }
{ }
{ Delphi / Kylix Cross-Platform Runtime Library }
{ }
{ Copyright (c) 1996, 2001 Borland Software Corporation }
{ }
{ *********************************************************************** }
unit Math;
{ This unit contains high-performance arithmetic, trigonometric, logarithmic,
statistical, financial calculation and FPU routines which supplement the math
routines that are part of the Delphi language or System unit.
References:
1) P.J. Plauger, "The Standard C Library", Prentice-Hall, 1992, Ch. 7.
2) W.J. Cody, Jr., and W. Waite, "Software Manual For the Elementary
Functions", Prentice-Hall, 1980.
3) Namir Shammas, "C/C++ Mathematical Algorithms for Scientists and Engineers",
McGraw-Hill, 1995, Ch 8.
4) H.T. Lau, "A Numerical Library in C for Scientists and Engineers",
CRC Press, 1994, Ch. 6.
5) "Pentium(tm) Processor User's Manual, Volume 3: Architecture
and Programming Manual", Intel, 1994
Some of the functions, concepts or constants in this unit were provided by
Earl F. Glynn (www.efg2.com) and Ray Lischner (www.tempest-sw.com)
All angle parameters and results of trig functions are in radians.
Most of the following trig and log routines map directly to Intel 80387 FPU
floating point machine instructions. Input domains, output ranges, and
error handling are determined largely by the FPU hardware.
Routines coded in assembler favor the Pentium FPU pipeline architecture.
}
{$N+,S-}
interface
uses SysUtils, Types;
const { Ranges of the IEEE floating point types, including denormals }
MinSingle = 1.5e-45;
MaxSingle = 3.4e+38;
MinDouble = 5.0e-324;
MaxDouble = 1.7e+308;
MinExtended = 3.4e-4932;
MaxExtended = 1.1e+4932;
MinComp = -9.223372036854775807e+18;
MaxComp = 9.223372036854775807e+18;
{ The following constants should not be used for comparison, only
assignments. For comparison please use the IsNan and IsInfinity functions
provided below. }
NaN = 0.0 / 0.0;
(*$EXTERNALSYM NaN*)
(*$HPPEMIT 'static const Extended NaN = 0.0 / 0.0;'*)
Infinity = 1.0 / 0.0;
(*$EXTERNALSYM Infinity*)
(*$HPPEMIT 'static const Extended Infinity = 1.0 / 0.0;'*)
NegInfinity = -1.0 / 0.0;
(*$EXTERNALSYM NegInfinity*)
(*$HPPEMIT 'static const Extended NegInfinity = -1.0 / 0.0;'*)
{ Trigonometric functions }
function ArcCos(const X: Extended): Extended; { IN: |X| <= 1 OUT: [0..PI] radians }
function ArcSin(const X: Extended): Extended; { IN: |X| <= 1 OUT: [-PI/2..PI/2] radians }
{ ArcTan2 calculates ArcTan(Y/X), and returns an angle in the correct quadrant.
IN: |Y| < 2^64, |X| < 2^64, X <> 0 OUT: [-PI..PI] radians }
function ArcTan2(const Y, X: Extended): Extended;
{ SinCos is 2x faster than calling Sin and Cos separately for the same angle }
procedure SinCos(const Theta: Extended; var Sin, Cos: Extended) register;
function Tan(const X: Extended): Extended;
function Cotan(const X: Extended): Extended; { 1 / tan(X), X <> 0 }
function Secant(const X: Extended): Extended; { 1 / cos(X) }
function Cosecant(const X: Extended): Extended; { 1 / sin(X) }
function Hypot(const X, Y: Extended): Extended; { Sqrt(X**2 + Y**2) }
{ Angle unit conversion routines }
function RadToDeg(const Radians: Extended): Extended; { Degrees := Radians * 180 / PI }
function RadToGrad(const Radians: Extended): Extended; { Grads := Radians * 200 / PI }
function RadToCycle(const Radians: Extended): Extended;{ Cycles := Radians / 2PI }
function DegToRad(const Degrees: Extended): Extended; { Radians := Degrees * PI / 180}
function DegToGrad(const Degrees: Extended): Extended;
function DegToCycle(const Degrees: Extended): Extended;
function GradToRad(const Grads: Extended): Extended; { Radians := Grads * PI / 200 }
function GradToDeg(const Grads: Extended): Extended;
function GradToCycle(const Grads: Extended): Extended;
function CycleToRad(const Cycles: Extended): Extended; { Radians := Cycles * 2PI }
function CycleToDeg(const Cycles: Extended): Extended;
function CycleToGrad(const Cycles: Extended): Extended;
{ Hyperbolic functions and inverses }
function Cot(const X: Extended): Extended; { alias for Cotan }
function Sec(const X: Extended): Extended; { alias for Secant }
function Csc(const X: Extended): Extended; { alias for Cosecant }
function Cosh(const X: Extended): Extended;
function Sinh(const X: Extended): Extended;
function Tanh(const X: Extended): Extended;
function CotH(const X: Extended): Extended;
function SecH(const X: Extended): Extended;
function CscH(const X: Extended): Extended;
function ArcCot(const X: Extended): Extended; { IN: X <> 0 }
function ArcSec(const X: Extended): Extended; { IN: X <> 0 }
function ArcCsc(const X: Extended): Extended; { IN: X <> 0 }
function ArcCosh(const X: Extended): Extended; { IN: X >= 1 }
function ArcSinh(const X: Extended): Extended;
function ArcTanh(const X: Extended): Extended; { IN: |X| <= 1 }
function ArcCotH(const X: Extended): Extended; { IN: X <> 0 }
function ArcSecH(const X: Extended): Extended; { IN: X <> 0 }
function ArcCscH(const X: Extended): Extended; { IN: X <> 0 }
{ Logarithmic functions }
function LnXP1(const X: Extended): Extended; { Ln(X + 1), accurate for X near zero }
function Log10(const X: Extended): Extended; { Log base 10 of X }
function Log2(const X: Extended): Extended; { Log base 2 of X }
function LogN(const Base, X: Extended): Extended; { Log base N of X }
{ Exponential functions }
{ IntPower: Raise base to an integral power. Fast. }
function IntPower(const Base: Extended; const Exponent: Integer): Extended register;
{ Power: Raise base to any power.
For fractional exponents, or |exponents| > MaxInt, base must be > 0. }
function Power(const Base, Exponent: Extended): Extended;
{ Miscellaneous Routines }
{ Frexp: Separates the mantissa and exponent of X. }
procedure Frexp(const X: Extended; var Mantissa: Extended; var Exponent: Integer) register;
{ Ldexp: returns X*2**P }
function Ldexp(const X: Extended; const P: Integer): Extended register;
{ Ceil: Smallest integer >= X, |X| < MaxInt }
function Ceil(const X: Extended):Integer;
{ Floor: Largest integer <= X, |X| < MaxInt }
function Floor(const X: Extended): Integer;
{ Poly: Evaluates a uniform polynomial of one variable at value X.
The coefficients are ordered in increasing powers of X:
Coefficients[0] + Coefficients[1]*X + ... + Coefficients[N]*(X**N) }
function Poly(const X: Extended; const Coefficients: array of Double): Extended;
{-----------------------------------------------------------------------
Statistical functions.
Common commercial spreadsheet macro names for these statistical and
financial functions are given in the comments preceding each function.
-----------------------------------------------------------------------}
{ Mean: Arithmetic average of values. (AVG): SUM / N }
function Mean(const Data: array of Double): Extended;
{ Sum: Sum of values. (SUM) }
function Sum(const Data: array of Double): Extended register;
function SumInt(const Data: array of Integer): Integer register;
function SumOfSquares(const Data: array of Double): Extended;
procedure SumsAndSquares(const Data: array of Double;
var Sum, SumOfSquares: Extended) register;
{ MinValue: Returns the smallest signed value in the data array (MIN) }
function MinValue(const Data: array of Double): Double;
function MinIntValue(const Data: array of Integer): Integer;
function Min(const A, B: Integer): Integer; overload;
function Min(const A, B: Int64): Int64; overload;
function Min(const A, B: Single): Single; overload;
function Min(const A, B: Double): Double; overload;
function Min(const A, B: Extended): Extended; overload;
{ MaxValue: Returns the largest signed value in the data array (MAX) }
function MaxValue(const Data: array of Double): Double;
function MaxIntValue(const Data: array of Integer): Integer;
function Max(const A, B: Integer): Integer; overload;
function Max(const A, B: Int64): Int64; overload;
function Max(const A, B: Single): Single; overload;
function Max(const A, B: Double): Double; overload;
function Max(const A, B: Extended): Extended; overload;
{ Standard Deviation (STD): Sqrt(Variance). aka Sample Standard Deviation }
function StdDev(const Data: array of Double): Extended;
{ MeanAndStdDev calculates Mean and StdDev in one call. }
procedure MeanAndStdDev(const Data: array of Double; var Mean, StdDev: Extended);
{ Population Standard Deviation (STDP): Sqrt(PopnVariance).
Used in some business and financial calculations. }
function PopnStdDev(const Data: array of Double): Extended;
{ Variance (VARS): TotalVariance / (N-1). aka Sample Variance }
function Variance(const Data: array of Double): Extended;
{ Population Variance (VAR or VARP): TotalVariance/ N }
function PopnVariance(const Data: array of Double): Extended;
{ Total Variance: SUM(i=1,N)[(X(i) - Mean)**2] }
function TotalVariance(const Data: array of Double): Extended;
{ Norm: The Euclidean L2-norm. Sqrt(SumOfSquares) }
function Norm(const Data: array of Double): Extended;
{ MomentSkewKurtosis: Calculates the core factors of statistical analysis:
the first four moments plus the coefficients of skewness and kurtosis.
M1 is the Mean. M2 is the Variance.
Skew reflects symmetry of distribution: M3 / (M2**(3/2))
Kurtosis reflects flatness of distribution: M4 / Sqr(M2) }
procedure MomentSkewKurtosis(const Data: array of Double;
var M1, M2, M3, M4, Skew, Kurtosis: Extended);
{ RandG produces random numbers with Gaussian distribution about the mean.
Useful for simulating data with sampling errors. }
function RandG(Mean, StdDev: Extended): Extended;
{-----------------------------------------------------------------------
General/Misc use functions
-----------------------------------------------------------------------}
{ Extreme testing }
// Like an infinity, a NaN double value has an exponent of 7FF, but the NaN
// values have a fraction field that is not 0.
function IsNan(const AValue: Double): Boolean; overload;
function IsNan(const AValue: Single): Boolean; overload;
function IsNan(const AValue: Extended): Boolean; overload;
// Like a NaN, an infinity double value has an exponent of 7FF, but the
// infinity values have a fraction field of 0. Infinity values can be positive
// or negative, which is specified in the high-order, sign bit.
function IsInfinite(const AValue: Double): Boolean;
{ Simple sign testing }
type
TValueSign = -1..1;
const
NegativeValue = Low(TValueSign);
ZeroValue = 0;
PositiveValue = High(TValueSign);
function Sign(const AValue: Integer): TValueSign; overload;
function Sign(const AValue: Int64): TValueSign; overload;
function Sign(const AValue: Double): TValueSign; overload;
{ CompareFloat & SameFloat: If epsilon is not given (or is zero) we will
attempt to compute a reasonable one based on the precision of the floating
point type used. }
function CompareValue(const A, B: Extended; Epsilon: Extended = 0): TValueRelationship; overload;
function CompareValue(const A, B: Double; Epsilon: Double = 0): TValueRelationship; overload;
function CompareValue(const A, B: Single; Epsilon: Single = 0): TValueRelationship; overload;
function CompareValue(const A, B: Integer): TValueRelationship; overload;
function CompareValue(const A, B: Int64): TValueRelationship; overload;
function SameValue(const A, B: Extended; Epsilon: Extended = 0): Boolean; overload;
function SameValue(const A, B: Double; Epsilon: Double = 0): Boolean; overload;
function SameValue(const A, B: Single; Epsilon: Single = 0): Boolean; overload;
{ IsZero: These will return true if the given value is zero (or very very very
close to it). }
function IsZero(const A: Extended; Epsilon: Extended = 0): Boolean; overload;
function IsZero(const A: Double; Epsilon: Double = 0): Boolean; overload;
function IsZero(const A: Single; Epsilon: Single = 0): Boolean; overload;
{ Easy to use conditional functions }
function IfThen(AValue: Boolean; const ATrue: Integer; const AFalse: Integer = 0): Integer; overload;
function IfThen(AValue: Boolean; const ATrue: Int64; const AFalse: Int64 = 0): Int64; overload;
function IfThen(AValue: Boolean; const ATrue: Double; const AFalse: Double = 0.0): Double; overload;
{ Various random functions }
function RandomRange(const AFrom, ATo: Integer): Integer;
function RandomFrom(const AValues: array of Integer): Integer; overload;
function RandomFrom(const AValues: array of Int64): Int64; overload;
function RandomFrom(const AValues: array of Double): Double; overload;
{ Range testing functions }
function InRange(const AValue, AMin, AMax: Integer): Boolean; overload;
function InRange(const AValue, AMin, AMax: Int64): Boolean; overload;
function InRange(const AValue, AMin, AMax: Double): Boolean; overload;
{ Range truncation functions }
function EnsureRange(const AValue, AMin, AMax: Integer): Integer; overload;
function EnsureRange(const AValue, AMin, AMax: Int64): Int64; overload;
function EnsureRange(const AValue, AMin, AMax: Double): Double; overload;
{ 16 bit integer division and remainder in one operation }
procedure DivMod(Dividend: Integer; Divisor: Word;
var Result, Remainder: Word);
{ Round to a specific digit or power of ten }
{ ADigit has a valid range of 37 to -37. Here are some valid examples
of ADigit values...
3 = 10^3 = 1000 = thousand's place
2 = 10^2 = 100 = hundred's place
1 = 10^1 = 10 = ten's place
-1 = 10^-1 = 1/10 = tenth's place
-2 = 10^-2 = 1/100 = hundredth's place
-3 = 10^-3 = 1/1000 = thousandth's place }
type
TRoundToRange = -37..37;
function RoundTo(const AValue: Double; const ADigit: TRoundToRange): Double;
{ This variation of the RoundTo function follows the asymmetric arithmetic
rounding algorithm (if Frac(X) < .5 then return X else return X + 1). This
function defaults to rounding to the hundredth's place (cents). }
function SimpleRoundTo(const AValue: Double; const ADigit: TRoundToRange = -2): Double;
{-----------------------------------------------------------------------
Financial functions. Standard set from Quattro Pro.
Parameter conventions:
From the point of view of A, amounts received by A are positive and
amounts disbursed by A are negative (e.g. a borrower's loan repayments
are regarded by the borrower as negative).
Interest rates are per payment period. 11% annual percentage rate on a
loan with 12 payments per year would be (11 / 100) / 12 = 0.00916667
-----------------------------------------------------------------------}
type
TPaymentTime = (ptEndOfPeriod, ptStartOfPeriod);
{ Double Declining Balance (DDB) }
function DoubleDecliningBalance(const Cost, Salvage: Extended;
Life, Period: Integer): Extended;
{ Future Value (FVAL) }
function FutureValue(const Rate: Extended; NPeriods: Integer; const Payment,
PresentValue: Extended; PaymentTime: TPaymentTime): Extended;
{ Interest Payment (IPAYMT) }
function InterestPayment(const Rate: Extended; Period, NPeriods: Integer;
const PresentValue, FutureValue: Extended; PaymentTime: TPaymentTime): Extended;
{ Interest Rate (IRATE) }
function InterestRate(NPeriods: Integer; const Payment, PresentValue,
FutureValue: Extended; PaymentTime: TPaymentTime): Extended;
{ Internal Rate of Return. (IRR) Needs array of cash flows. }
function InternalRateOfReturn(const Guess: Extended;
const CashFlows: array of Double): Extended;
{ Number of Periods (NPER) }
function NumberOfPeriods(const Rate: Extended; Payment: Extended;
const PresentValue, FutureValue: Extended; PaymentTime: TPaymentTime): Extended;
{ Net Present Value. (NPV) Needs array of cash flows. }
function NetPresentValue(const Rate: Extended; const CashFlows: array of Double;
PaymentTime: TPaymentTime): Extended;
{ Payment (PAYMT) }
function Payment(Rate: Extended; NPeriods: Integer; const PresentValue,
FutureValue: Extended; PaymentTime: TPaymentTime): Extended;
{ Period Payment (PPAYMT) }
function PeriodPayment(const Rate: Extended; Period, NPeriods: Integer;
const PresentValue, FutureValue: Extended; PaymentTime: TPaymentTime): Extended;
{ Present Value (PVAL) }
function PresentValue(const Rate: Extended; NPeriods: Integer;
const Payment, FutureValue: Extended; PaymentTime: TPaymentTime): Extended;
{ Straight Line depreciation (SLN) }
function SLNDepreciation(const Cost, Salvage: Extended; Life: Integer): Extended;
{ Sum-of-Years-Digits depreciation (SYD) }
function SYDDepreciation(const Cost, Salvage: Extended; Life, Period: Integer): Extended;
type
EInvalidArgument = class(EMathError) end;
{-----------------------------------------------------------------------
FPU exception/precision/rounding management
The following functions allow you to control the behavior of the FPU. With
them you can control what constutes an FPU exception, what the default
precision is used and finally how rounding is handled by the FPU.
-----------------------------------------------------------------------}
type
TFPURoundingMode = (rmNearest, rmDown, rmUp, rmTruncate);
{ Return the current rounding mode }
function GetRoundMode: TFPURoundingMode;
{ Set the rounding mode and return the old mode }
function SetRoundMode(const RoundMode: TFPURoundingMode): TFPURoundingMode;
type
TFPUPrecisionMode = (pmSingle, pmReserved, pmDouble, pmExtended);
{ Return the current precision control mode }
function GetPrecisionMode: TFPUPrecisionMode;
{ Set the precision control mode and return the old one }
function SetPrecisionMode(const Precision: TFPUPrecisionMode): TFPUPrecisionMode;
type
TFPUException = (exInvalidOp, exDenormalized, exZeroDivide,
exOverflow, exUnderflow, exPrecision);
TFPUExceptionMask = set of TFPUException;
{ Return the exception mask from the control word.
Any element set in the mask prevents the FPU from raising that kind of
exception. Instead, it returns its best attempt at a value, often NaN or an
infinity. The value depends on the operation and the current rounding mode. }
function GetExceptionMask: TFPUExceptionMask;
{ Set a new exception mask and return the old one }
function SetExceptionMask(const Mask: TFPUExceptionMask): TFPUExceptionMask;
{ Clear any pending exception bits in the status word }
procedure ClearExceptions(RaisePending: Boolean = True);
implementation
uses SysConst;
procedure DivMod(Dividend: Integer; Divisor: Word;
var Result, Remainder: Word);
asm
PUSH EBX
MOV EBX,EDX
MOV EDX,EAX
SHR EDX,16
DIV BX
MOV EBX,Remainder
MOV [ECX],AX
MOV [EBX],DX
POP EBX
end;
function RoundTo(const AValue: Double; const ADigit: TRoundToRange): Double;
var
LFactor: Double;
begin
LFactor := IntPower(10, ADigit);
Result := Round(AValue / LFactor) * LFactor;
end;
function SimpleRoundTo(const AValue: Double; const ADigit: TRoundToRange = -2): Double;
var
LFactor: Double;
begin
LFactor := IntPower(10, ADigit);
Result := Trunc((AValue / LFactor) + 0.5) * LFactor;
end;
function Annuity2(const R: Extended; N: Integer; PaymentTime: TPaymentTime;
var CompoundRN: Extended): Extended; Forward;
function Compound(const R: Extended; N: Integer): Extended; Forward;
function RelSmall(const X, Y: Extended): Boolean; Forward;
type
TPoly = record
Neg, Pos, DNeg, DPos: Extended
end;
const
MaxIterations = 15;
procedure ArgError(const Msg: string);
begin
raise EInvalidArgument.Create(Msg);
end;
function DegToRad(const Degrees: Extended): Extended; { Radians := Degrees * PI / 180 }
begin
Result := Degrees * (PI / 180);
end;
function RadToDeg(const Radians: Extended): Extended; { Degrees := Radians * 180 / PI }
begin
Result := Radians * (180 / PI);
end;
function GradToRad(const Grads: Extended): Extended; { Radians := Grads * PI / 200 }
begin
Result := Grads * (PI / 200);
end;
function RadToGrad(const Radians: Extended): Extended; { Grads := Radians * 200 / PI}
begin
Result := Radians * (200 / PI);
end;
function CycleToRad(const Cycles: Extended): Extended; { Radians := Cycles * 2PI }
begin
Result := Cycles * (2 * PI);
end;
function RadToCycle(const Radians: Extended): Extended;{ Cycles := Radians / 2PI }
begin
Result := Radians / (2 * PI);
end;
function DegToGrad(const Degrees: Extended): Extended;
begin
Result := RadToGrad(DegToRad(Degrees));
end;
function DegToCycle(const Degrees: Extended): Extended;
begin
Result := RadToCycle(DegToRad(Degrees));
end;
function GradToDeg(const Grads: Extended): Extended;
begin
Result := RadToDeg(GradToRad(Grads));
end;
function GradToCycle(const Grads: Extended): Extended;
begin
Result := RadToCycle(GradToRad(Grads));
end;
function CycleToDeg(const Cycles: Extended): Extended;
begin
Result := RadToDeg(CycleToRad(Cycles));
end;
function CycleToGrad(const Cycles: Extended): Extended;
begin
Result := RadToGrad(CycleToRad(Cycles));
end;
function LnXP1(const X: Extended): Extended;
{ Return ln(1 + X). Accurate for X near 0. }
asm
FLDLN2
MOV AX,WORD PTR X+8 { exponent }
FLD X
CMP AX,$3FFD { .4225 }
JB @@1
FLD1
FADD
FYL2X
JMP @@2
@@1:
FYL2XP1
@@2:
FWAIT
end;
{ Invariant: Y >= 0 & Result*X**Y = X**I. Init Y = I and Result = 1. }
{function IntPower(X: Extended; I: Integer): Extended;
var
Y: Integer;
begin
Y := Abs(I);
Result := 1.0;
while Y > 0 do begin
while not Odd(Y) do
begin
Y := Y shr 1;
X := X * X
end;
Dec(Y);
Result := Result * X
end;
if I < 0 then Result := 1.0 / Result
end;
}
function IntPower(const Base: Extended; const Exponent: Integer): Extended;
asm
mov ecx, eax
cdq
fld1 { Result := 1 }
xor eax, edx
sub eax, edx { eax := Abs(Exponent) }
jz @@3
fld Base
jmp @@2
@@1: fmul ST, ST { X := Base * Base }
@@2: shr eax,1
jnc @@1
fmul ST(1),ST { Result := Result * X }
jnz @@1
fstp st { pop X from FPU stack }
cmp ecx, 0
jge @@3
fld1
fdivrp { Result := 1 / Result }
@@3:
fwait
end;
function Compound(const R: Extended; N: Integer): Extended;
{ Return (1 + R)**N. }
begin
Result := IntPower(1.0 + R, N)
end;
function Annuity2(const R: Extended; N: Integer; PaymentTime: TPaymentTime;
var CompoundRN: Extended): Extended;
{ Set CompoundRN to Compound(R, N),
return (1+Rate*PaymentTime)*(Compound(R,N)-1)/R;
}
begin
if R = 0.0 then
begin
CompoundRN := 1.0;
Result := N;
end
else
begin
{ 6.1E-5 approx= 2**-14 }
if Abs(R) < 6.1E-5 then
begin
CompoundRN := Exp(N * LnXP1(R));
Result := N*(1+(N-1)*R/2);
end
else
begin
CompoundRN := Compound(R, N);
Result := (CompoundRN-1) / R
end;
if PaymentTime = ptStartOfPeriod then
Result := Result * (1 + R);
end;
end; {Annuity2}
procedure PolyX(const A: array of Double; X: Extended; var Poly: TPoly);
{ Compute A[0] + A[1]*X + ... + A[N]*X**N and X * its derivative.
Accumulate positive and negative terms separately. }
var
I: Integer;
Neg, Pos, DNeg, DPos: Extended;
begin
Neg := 0.0;
Pos := 0.0;
DNeg := 0.0;
DPos := 0.0;
for I := High(A) downto Low(A) do
begin
DNeg := X * DNeg + Neg;
Neg := Neg * X;
DPos := X * DPos + Pos;
Pos := Pos * X;
if A[I] >= 0.0 then
Pos := Pos + A[I]
else
Neg := Neg + A[I]
end;
Poly.Neg := Neg;
Poly.Pos := Pos;
Poly.DNeg := DNeg * X;
Poly.DPos := DPos * X;
end; {PolyX}
function RelSmall(const X, Y: Extended): Boolean;
{ Returns True if X is small relative to Y }
const
C1: Double = 1E-15;
C2: Double = 1E-12;
begin
Result := Abs(X) < (C1 + C2 * Abs(Y))
end;
{ Math functions. }
function ArcCos(const X: Extended): Extended;
begin
Result := ArcTan2(Sqrt(1 - X * X), X);
end;
function ArcSin(const X: Extended): Extended;
begin
Result := ArcTan2(X, Sqrt(1 - X * X))
end;
function ArcTan2(const Y, X: Extended): Extended;
asm
FLD Y
FLD X
FPATAN
FWAIT
end;
function Tan(const X: Extended): Extended;
{ Tan := Sin(X) / Cos(X) }
asm
FLD X
FPTAN
FSTP ST(0) { FPTAN pushes 1.0 after result }
FWAIT
end;
function CoTan(const X: Extended): Extended;
{ CoTan := Cos(X) / Sin(X) = 1 / Tan(X) }
asm
FLD X
FPTAN
FDIVRP
FWAIT
end;
function Secant(const X: Extended): Extended;
{ Secant := 1 / Cos(X) }
asm
FLD X
FCOS
FLD1
FDIVRP
FWAIT
end;
function Cosecant(const X: Extended): Extended;
{ Cosecant := 1 / Sin(X) }
asm
FLD X
FSIN
FLD1
FDIVRP
FWAIT
end;
function Hypot(const X, Y: Extended): Extended;
{ formula: Sqrt(X*X + Y*Y)
implemented as: |Y|*Sqrt(1+Sqr(X/Y)), |X| < |Y| for greater precision
var
Temp: Extended;
begin
X := Abs(X);
Y := Abs(Y);
if X > Y then
begin
Temp := X;
X := Y;
Y := Temp;
end;
if X = 0 then
Result := Y
else // Y > X, X <> 0, so Y > 0
Result := Y * Sqrt(1 + Sqr(X/Y));
end;
}
asm
FLD Y
FABS
FLD X
FABS
FCOM
FNSTSW AX
TEST AH,$45
JNZ @@1 // if ST > ST(1) then swap
FXCH ST(1) // put larger number in ST(1)
@@1: FLDZ
FCOMP
FNSTSW AX
TEST AH,$40 // if ST = 0, return ST(1)
JZ @@2
FSTP ST // eat ST(0)
JMP @@3
@@2: FDIV ST,ST(1) // ST := ST / ST(1)
FMUL ST,ST // ST := ST * ST
FLD1
FADD // ST := ST + 1
FSQRT // ST := Sqrt(ST)
FMUL // ST(1) := ST * ST(1); Pop ST
@@3: FWAIT
end;
procedure SinCos(const Theta: Extended; var Sin, Cos: Extended);
asm
FLD Theta
FSINCOS
FSTP tbyte ptr [edx] // Cos
FSTP tbyte ptr [eax] // Sin
FWAIT
end;
{ Extract exponent and mantissa from X }
procedure Frexp(const X: Extended; var Mantissa: Extended; var Exponent: Integer);
{ Mantissa ptr in EAX, Exponent ptr in EDX }
asm
FLD X
PUSH EAX
MOV dword ptr [edx], 0 { if X = 0, return 0 }
FTST
FSTSW AX
FWAIT
SAHF
JZ @@Done
FXTRACT // ST(1) = exponent, (pushed) ST = fraction
FXCH
// The FXTRACT instruction normalizes the fraction 1 bit higher than
// wanted for the definition of frexp() so we need to tweak the result
// by scaling the fraction down and incrementing the exponent.
FISTP dword ptr [edx]
FLD1
FCHS
FXCH
FSCALE // scale fraction
INC dword ptr [edx] // exponent biased to match
FSTP ST(1) // discard -1, leave fraction as TOS
@@Done:
POP EAX
FSTP tbyte ptr [eax]
FWAIT
end;
function Ldexp(const X: Extended; const P: Integer): Extended;
{ Result := X * (2^P) }
asm
PUSH EAX
FILD dword ptr [ESP]
FLD X
FSCALE
POP EAX
FSTP ST(1)
FWAIT
end;
function Ceil(const X: Extended): Integer;
begin
Result := Integer(Trunc(X));
if Frac(X) > 0 then
Inc(Result);
end;
function Floor(const X: Extended): Integer;
begin
Result := Integer(Trunc(X));
if Frac(X) < 0 then
Dec(Result);
end;
{ Conversion of bases: Log.b(X) = Log.a(X) / Log.a(b) }
function Log10(const X: Extended): Extended;
{ Log.10(X) := Log.2(X) * Log.10(2) }
asm
FLDLG2 { Log base ten of 2 }
FLD X
FYL2X
FWAIT
end;
function Log2(const X: Extended): Extended;
asm
FLD1
FLD X
FYL2X
FWAIT
end;
function LogN(const Base, X: Extended): Extended;
{ Log.N(X) := Log.2(X) / Log.2(N) }
asm
FLD1
FLD X
FYL2X
FLD1
FLD Base
FYL2X
FDIV
FWAIT
end;
function Poly(const X: Extended; const Coefficients: array of Double): Extended;
{ Horner's method }
var
I: Integer;
begin
Result := Coefficients[High(Coefficients)];
for I := High(Coefficients)-1 downto Low(Coefficients) do
Result := Result * X + Coefficients[I];
end;
function Power(const Base, Exponent: Extended): Extended;
begin
if Exponent = 0.0 then
Result := 1.0 { n**0 = 1 }
else if (Base = 0.0) and (Exponent > 0.0) then
Result := 0.0 { 0**n = 0, n > 0 }
else if (Frac(Exponent) = 0.0) and (Abs(Exponent) <= MaxInt) then
Result := IntPower(Base, Integer(Trunc(Exponent)))
else
Result := Exp(Exponent * Ln(Base))
end;
{ Hyperbolic functions }
function Cosh(const X: Extended): Extended;
begin
if IsZero(X) then
Result := 1
else
Result := (Exp(X) + Exp(-X)) / 2;
end;
function Sinh(const X: Extended): Extended;
begin
if IsZero(X) then
Result := 0
else
Result := (Exp(X) - Exp(-X)) / 2;
end;
function Tanh(const X: Extended): Extended;
begin
if IsZero(X) then
Result := 0
else
Result := SinH(X) / CosH(X);
end;
function ArcCosh(const X: Extended): Extended;
begin
Result := Ln(X + Sqrt((X - 1) / (X + 1)) * (X + 1));
end;
function ArcSinh(const X: Extended): Extended;
begin
Result := Ln(X + Sqrt((X * X) + 1));
end;
function ArcTanh(const X: Extended): Extended;
begin
if SameValue(X, 1) then
Result := Infinity
else if SameValue(X, -1) then
Result := NegInfinity
else
Result := 0.5 * Ln((1 + X) / (1 - X));
end;
function Cot(const X: Extended): Extended;
begin
Result := CoTan(X);
end;
function Sec(const X: Extended): Extended;
begin
Result := Secant(X);
end;
function Csc(const X: Extended): Extended;
begin
Result := Cosecant(X);
end;
function CotH(const X: Extended): Extended;
begin
Result := 1 / TanH(X);
end;
function SecH(const X: Extended): Extended;
begin
Result := 1 / CosH(X);
end;
function CscH(const X: Extended): Extended;
begin
Result := 1 / SinH(X);
end;
function ArcCot(const X: Extended): Extended;
begin
if IsZero(X) then
Result := PI / 2
else
Result := ArcTan(1 / X);
end;
function ArcSec(const X: Extended): Extended;
begin
if IsZero(X) then
Result := Infinity
else
Result := ArcCos(1 / X);
end;
function ArcCsc(const X: Extended): Extended;
begin
if IsZero(X) then
Result := Infinity
else
Result := ArcSin(1 / X);
end;
function ArcCotH(const X: Extended): Extended;
begin
if SameValue(X, 1) then
Result := Infinity
else if SameValue(X, -1) then
Result := NegInfinity
else
Result := 0.5 * Ln((X + 1) / (X - 1));
end;
function ArcSecH(const X: Extended): Extended;
begin
if IsZero(X) then
Result := Infinity
else if SameValue(X, 1) then
Result := 0
else
Result := Ln((Sqrt(1 - X * X) + 1) / X);
end;
function ArcCscH(const X: Extended): Extended;
begin
Result := Ln(Sqrt(1 + (1 / (X * X)) + (1 / X)));
end;
function IsNan(const AValue: Single): Boolean;
begin
Result := ((PLongWord(@AValue)^ and $7F800000) = $7F800000) and
((PLongWord(@AValue)^ and $007FFFFF) <> $00000000);
end;
function IsNan(const AValue: Double): Boolean;
begin
Result := ((PInt64(@AValue)^ and $7FF0000000000000) = $7FF0000000000000) and
((PInt64(@AValue)^ and $000FFFFFFFFFFFFF) <> $0000000000000000);
end;
function IsNan(const AValue: Extended): Boolean;
type
TExtented = packed record
Mantissa: Int64;
Exponent: Word;
end;
PExtended = ^TExtented;
begin
Result := ((PExtended(@AValue)^.Exponent and $7FFF) = $7FFF) and
((PExtended(@AValue)^.Mantissa and $7FFFFFFFFFFFFFFF) <> 0);
end;
function IsInfinite(const AValue: Double): Boolean;
begin
Result := ((PInt64(@AValue)^ and $7FF0000000000000) = $7FF0000000000000) and
((PInt64(@AValue)^ and $000FFFFFFFFFFFFF) = $0000000000000000);
end;
{ Statistical functions }
function Mean(const Data: array of Double): Extended;
begin
Result := SUM(Data) / (High(Data) - Low(Data) + 1);
end;
function MinValue(const Data: array of Double): Double;
var
I: Integer;
begin
Result := Data[Low(Data)];
for I := Low(Data) + 1 to High(Data) do
if Result > Data[I] then
Result := Data[I];
end;
function MinIntValue(const Data: array of Integer): Integer;
var
I: Integer;
begin
Result := Data[Low(Data)];
for I := Low(Data) + 1 to High(Data) do
if Result > Data[I] then
Result := Data[I];
end;
function Min(const A, B: Integer): Integer;
begin
if A < B then
Result := A
else
Result := B;
end;
function Min(const A, B: Int64): Int64;
begin
if A < B then
Result := A
else
Result := B;
end;
function Min(const A, B: Single): Single;
begin
if A < B then
Result := A
else
Result := B;
end;
function Min(const A, B: Double): Double;
begin
if A < B then
Result := A
else
Result := B;
end;
function Min(const A, B: Extended): Extended;
begin
if A < B then
Result := A
else
Result := B;
end;
function MaxValue(const Data: array of Double): Double;
var
I: Integer;
begin
Result := Data[Low(Data)];
for I := Low(Data) + 1 to High(Data) do
if Result < Data[I] then
Result := Data[I];
end;
function MaxIntValue(const Data: array of Integer): Integer;
var
I: Integer;
begin
Result := Data[Low(Data)];
for I := Low(Data) + 1 to High(Data) do
if Result < Data[I] then
Result := Data[I];
end;
function Max(const A, B: Integer): Integer;
begin
if A > B then
Result := A
else
Result := B;
end;
function Max(const A, B: Int64): Int64;
begin
if A > B then
Result := A
else
Result := B;
end;
function Max(const A, B: Single): Single;
begin
if A > B then
Result := A
else
Result := B;
end;
function Max(const A, B: Double): Double;
begin
if A > B then
Result := A
else
Result := B;
end;
function Max(const A, B: Extended): Extended;
begin
if A > B then
Result := A
else
Result := B;
end;
function Sign(const AValue: Integer): TValueSign;
begin
Result := ZeroValue;
if AValue < 0 then
Result := NegativeValue
else if AValue > 0 then
Result := PositiveValue;
end;
function Sign(const AValue: Int64): TValueSign;
begin
Result := ZeroValue;
if AValue < 0 then
Result := NegativeValue
else if AValue > 0 then
Result := PositiveValue;
end;
function Sign(const AValue: Double): TValueSign;
begin
if ((PInt64(@AValue)^ and $7FFFFFFFFFFFFFFF) = $0000000000000000) then
Result := ZeroValue
else if ((PInt64(@AValue)^ and $8000000000000000) = $8000000000000000) then
Result := NegativeValue
else
Result := PositiveValue;
end;
const
FuzzFactor = 1000;
ExtendedResolution = 1E-19 * FuzzFactor;
DoubleResolution = 1E-15 * FuzzFactor;
SingleResolution = 1E-7 * FuzzFactor;
function CompareValue(const A, B: Extended; Epsilon: Extended): TValueRelationship;
begin
if SameValue(A, B, Epsilon) then
Result := EqualsValue
else if A < B then
Result := LessThanValue
else
Result := GreaterThanValue;
end;
function CompareValue(const A, B: Double; Epsilon: Double): TValueRelationship;
begin
if SameValue(A, B, Epsilon) then
Result := EqualsValue
else if A < B then
Result := LessThanValue
else
Result := GreaterThanValue;
end;
function CompareValue(const A, B: Single; Epsilon: Single): TValueRelationship;
begin
if SameValue(A, B, Epsilon) then
Result := EqualsValue
else if A < B then
Result := LessThanValue
else
Result := GreaterThanValue;
end;
function CompareValue(const A, B: Integer): TValueRelationship;
begin
if A = B then
Result := EqualsValue
else if A < B then
Result := LessThanValue
else
Result := GreaterThanValue;
end;
function CompareValue(const A, B: Int64): TValueRelationship;
begin
if A = B then
Result := EqualsValue
else if A < B then
Result := LessThanValue
else
Result := GreaterThanValue;
end;
function SameValue(const A, B: Extended; Epsilon: Extended): Boolean;
begin
if Epsilon = 0 then
Epsilon := Max(Min(Abs(A), Abs(B)) * ExtendedResolution, ExtendedResolution);
if A > B then
Result := (A - B) <= Epsilon
else
Result := (B - A) <= Epsilon;
end;
function SameValue(const A, B: Double; Epsilon: Double): Boolean;
begin
if Epsilon = 0 then
Epsilon := Max(Min(Abs(A), Abs(B)) * DoubleResolution, DoubleResolution);
if A > B then
Result := (A - B) <= Epsilon
else
Result := (B - A) <= Epsilon;
end;
function SameValue(const A, B: Single; Epsilon: Single): Boolean;
begin
if Epsilon = 0 then
Epsilon := Max(Min(Abs(A), Abs(B)) * SingleResolution, SingleResolution);
if A > B then
Result := (A - B) <= Epsilon
else
Result := (B - A) <= Epsilon;
end;
function IsZero(const A: Extended; Epsilon: Extended): Boolean;
begin
if Epsilon = 0 then
Epsilon := ExtendedResolution;
Result := Abs(A) <= Epsilon;
end;
function IsZero(const A: Double; Epsilon: Double): Boolean;
begin
if Epsilon = 0 then
Epsilon := DoubleResolution;
Result := Abs(A) <= Epsilon;
end;
function IsZero(const A: Single; Epsilon: Single): Boolean;
begin
if Epsilon = 0 then
Epsilon := SingleResolution;
Result := Abs(A) <= Epsilon;
end;
function IfThen(AValue: Boolean; const ATrue: Integer; const AFalse: Integer): Integer;
begin
if AValue then
Result := ATrue
else
Result := AFalse;
end;
function IfThen(AValue: Boolean; const ATrue: Int64; const AFalse: Int64): Int64;
begin
if AValue then
Result := ATrue
else
Result := AFalse;
end;
function IfThen(AValue: Boolean; const ATrue: Double; const AFalse: Double): Double;
begin
if AValue then
Result := ATrue
else
Result := AFalse;
end;
function RandomRange(const AFrom, ATo: Integer): Integer;
begin
if AFrom > ATo then
Result := Random(AFrom - ATo) + ATo
else
Result := Random(ATo - AFrom) + AFrom;
end;
function RandomFrom(const AValues: array of Integer): Integer;
begin
Result := AValues[Random(High(AValues) + 1)];
end;
function RandomFrom(const AValues: array of Int64): Int64;
begin
Result := AValues[Random(High(AValues) + 1)];
end;
function RandomFrom(const AValues: array of Double): Double;
begin
Result := AValues[Random(High(AValues) + 1)];
end;
{ Range testing functions }
function InRange(const AValue, AMin, AMax: Integer): Boolean;
begin
Result := (AValue >= AMin) and (AValue <= AMax);
end;
function InRange(const AValue, AMin, AMax: Int64): Boolean;
begin
Result := (AValue >= AMin) and (AValue <= AMax);
end;
function InRange(const AValue, AMin, AMax: Double): Boolean;
begin
Result := (AValue >= AMin) and (AValue <= AMax);
end;
{ Range truncation functions }
function EnsureRange(const AValue, AMin, AMax: Integer): Integer;
begin
Result := AValue;
assert(AMin <= AMax);
if Result < AMin then
Result := AMin;
if Result > AMax then
Result := AMax;
end;
function EnsureRange(const AValue, AMin, AMax: Int64): Int64;
begin
Result := AValue;
assert(AMin <= AMax);
if Result < AMin then
Result := AMin;
if Result > AMax then
Result := AMax;
end;
function EnsureRange(const AValue, AMin, AMax: Double): Double;
begin
Result := AValue;
assert(AMin <= AMax);
if Result < AMin then
Result := AMin;
if Result > AMax then
Result := AMax;
end;
procedure MeanAndStdDev(const Data: array of Double; var Mean, StdDev: Extended);
var
S: Extended;
N,I: Integer;
begin
N := High(Data)- Low(Data) + 1;
if N = 1 then
begin
Mean := Data[0];
StdDev := Data[0];
Exit;
end;
Mean := Sum(Data) / N;
S := 0; // sum differences from the mean, for greater accuracy
for I := Low(Data) to High(Data) do
S := S + Sqr(Mean - Data[I]);
StdDev := Sqrt(S / (N - 1));
end;
procedure MomentSkewKurtosis(const Data: array of Double;
var M1, M2, M3, M4, Skew, Kurtosis: Extended);
var
Sum, SumSquares, SumCubes, SumQuads, OverN, Accum, M1Sqr, S2N, S3N: Extended;
I: Integer;
begin
OverN := 1 / (High(Data) - Low(Data) + 1);
Sum := 0;
SumSquares := 0;
SumCubes := 0;
SumQuads := 0;
for I := Low(Data) to High(Data) do
begin
Sum := Sum + Data[I];
Accum := Sqr(Data[I]);
SumSquares := SumSquares + Accum;
Accum := Accum*Data[I];
SumCubes := SumCubes + Accum;
SumQuads := SumQuads + Accum*Data[I];
end;
M1 := Sum * OverN;
M1Sqr := Sqr(M1);
S2N := SumSquares * OverN;
S3N := SumCubes * OverN;
M2 := S2N - M1Sqr;
M3 := S3N - (M1 * 3 * S2N) + 2*M1Sqr*M1;
M4 := (SumQuads * OverN) - (M1 * 4 * S3N) + (M1Sqr*6*S2N - 3*Sqr(M1Sqr));
Skew := M3 * Power(M2, -3/2); // = M3 / Power(M2, 3/2)
Kurtosis := M4 / Sqr(M2);
end;
function Norm(const Data: array of Double): Extended;
begin
Result := Sqrt(SumOfSquares(Data));
end;
function PopnStdDev(const Data: array of Double): Extended;
begin
Result := Sqrt(PopnVariance(Data))
end;
function PopnVariance(const Data: array of Double): Extended;
begin
Result := TotalVariance(Data) / (High(Data) - Low(Data) + 1)
end;
function RandG(Mean, StdDev: Extended): Extended;
{ Marsaglia-Bray algorithm }
var
U1, S2: Extended;
begin
repeat
U1 := 2*Random - 1;
S2 := Sqr(U1) + Sqr(2*Random-1);
until S2 < 1;
Result := Sqrt(-2*Ln(S2)/S2) * U1 * StdDev + Mean;
end;
function StdDev(const Data: array of Double): Extended;
begin
Result := Sqrt(Variance(Data))
end;
procedure RaiseOverflowError; forward;
function SumInt(const Data: array of Integer): Integer;
asm // IN: EAX = ptr to Data, EDX = High(Data) = Count - 1
// loop unrolled 4 times, 5 clocks per loop, 1.2 clocks per datum
PUSH EBX
MOV ECX, EAX // ecx = ptr to data
MOV EBX, EDX
XOR EAX, EAX
AND EDX, not 3
AND EBX, 3
SHL EDX, 2
JMP @Vector.Pointer[EBX*4]
@Vector:
DD @@1
DD @@2
DD @@3
DD @@4
@@4:
ADD EAX, [ECX+12+EDX]
JO RaiseOverflowError
@@3:
ADD EAX, [ECX+8+EDX]
JO RaiseOverflowError
@@2:
ADD EAX, [ECX+4+EDX]
JO RaiseOverflowError
@@1:
ADD EAX, [ECX+EDX]
JO RaiseOverflowError
SUB EDX,16
JNS @@4
POP EBX
end;
procedure RaiseOverflowError;
begin
raise EIntOverflow.Create(SIntOverflow);
end;
function SUM(const Data: array of Double): Extended;
asm // IN: EAX = ptr to Data, EDX = High(Data) = Count - 1
// Uses 4 accumulators to minimize read-after-write delays and loop overhead
// 5 clocks per loop, 4 items per loop = 1.2 clocks per item
FLDZ
MOV ECX, EDX
FLD ST(0)
AND EDX, not 3
FLD ST(0)
AND ECX, 3
FLD ST(0)
SHL EDX, 3 // count * sizeof(Double) = count * 8
JMP @Vector.Pointer[ECX*4]
@Vector:
DD @@1
DD @@2
DD @@3
DD @@4
@@4: FADD qword ptr [EAX+EDX+24] // 1
FXCH ST(3) // 0
@@3: FADD qword ptr [EAX+EDX+16] // 1
FXCH ST(2) // 0
@@2: FADD qword ptr [EAX+EDX+8] // 1
FXCH ST(1) // 0
@@1: FADD qword ptr [EAX+EDX] // 1
FXCH ST(2) // 0
SUB EDX, 32
JNS @@4
FADDP ST(3),ST // ST(3) := ST + ST(3); Pop ST
FADD // ST(1) := ST + ST(1); Pop ST
FADD // ST(1) := ST + ST(1); Pop ST
FWAIT
end;
function SumOfSquares(const Data: array of Double): Extended;
var
I: Integer;
begin
Result := 0.0;
for I := Low(Data) to High(Data) do
Result := Result + Sqr(Data[I]);
end;
procedure SumsAndSquares(const Data: array of Double; var Sum, SumOfSquares: Extended);
asm // IN: EAX = ptr to Data
// EDX = High(Data) = Count - 1
// ECX = ptr to Sum
// Est. 17 clocks per loop, 4 items per loop = 4.5 clocks per data item
FLDZ // init Sum accumulator
PUSH ECX
MOV ECX, EDX
FLD ST(0) // init Sqr1 accum.
AND EDX, not 3
FLD ST(0) // init Sqr2 accum.
AND ECX, 3
FLD ST(0) // init/simulate last data item left in ST
SHL EDX, 3 // count * sizeof(Double) = count * 8
JMP @Vector.Pointer[ECX*4]
@Vector:
DD @@1
DD @@2
DD @@3
DD @@4
@@4: FADD // Sqr2 := Sqr2 + Sqr(Data4); Pop Data4
FLD qword ptr [EAX+EDX+24] // Load Data1
FADD ST(3),ST // Sum := Sum + Data1
FMUL ST,ST // Data1 := Sqr(Data1)
@@3: FLD qword ptr [EAX+EDX+16] // Load Data2
FADD ST(4),ST // Sum := Sum + Data2
FMUL ST,ST // Data2 := Sqr(Data2)
FXCH // Move Sqr(Data1) into ST(0)
FADDP ST(3),ST // Sqr1 := Sqr1 + Sqr(Data1); Pop Data1
@@2: FLD qword ptr [EAX+EDX+8] // Load Data3
FADD ST(4),ST // Sum := Sum + Data3
FMUL ST,ST // Data3 := Sqr(Data3)
FXCH // Move Sqr(Data2) into ST(0)
FADDP ST(3),ST // Sqr1 := Sqr1 + Sqr(Data2); Pop Data2
@@1: FLD qword ptr [EAX+EDX] // Load Data4
FADD ST(4),ST // Sum := Sum + Data4
FMUL ST,ST // Sqr(Data4)
FXCH // Move Sqr(Data3) into ST(0)
FADDP ST(3),ST // Sqr1 := Sqr1 + Sqr(Data3); Pop Data3
SUB EDX,32
JNS @@4
FADD // Sqr2 := Sqr2 + Sqr(Data4); Pop Data4
POP ECX
FADD // Sqr1 := Sqr2 + Sqr1; Pop Sqr2
FXCH // Move Sum1 into ST(0)
MOV EAX, SumOfSquares
FSTP tbyte ptr [ECX] // Sum := Sum1; Pop Sum1
FSTP tbyte ptr [EAX] // SumOfSquares := Sum1; Pop Sum1
FWAIT
end;
function TotalVariance(const Data: array of Double): Extended;
var
Sum, SumSquares: Extended;
begin
SumsAndSquares(Data, Sum, SumSquares);
Result := SumSquares - Sqr(Sum)/(High(Data) - Low(Data) + 1);
end;
function Variance(const Data: array of Double): Extended;
begin
Result := TotalVariance(Data) / (High(Data) - Low(Data))
end;
{ Depreciation functions. }
function DoubleDecliningBalance(const Cost, Salvage: Extended; Life, Period: Integer): Extended;
{ dv := cost * (1 - 2/life)**(period - 1)
DDB = (2/life) * dv
if DDB > dv - salvage then DDB := dv - salvage
if DDB < 0 then DDB := 0
}
var
DepreciatedVal, Factor: Extended;
begin
Result := 0;
if (Period < 1) or (Life < Period) or (Life < 1) or (Cost <= Salvage) then
Exit;
{depreciate everything in period 1 if life is only one or two periods}
if ( Life <= 2 ) then
begin
if ( Period = 1 ) then
DoubleDecliningBalance:=Cost-Salvage
else
DoubleDecliningBalance:=0; {all depreciation occurred in first period}
exit;
end;
Factor := 2.0 / Life;
DepreciatedVal := Cost * IntPower((1.0 - Factor), Period - 1);
{DepreciatedVal is Cost-(sum of previous depreciation results)}
Result := Factor * DepreciatedVal;
{Nominal computed depreciation for this period. The rest of the
function applies limits to this nominal value. }
{Only depreciate until total depreciation equals cost-salvage.}
if Result > DepreciatedVal - Salvage then
Result := DepreciatedVal - Salvage;
{No more depreciation after salvage value is reached. This is mostly a nit.
If Result is negative at this point, it's very close to zero.}
if Result < 0.0 then
Result := 0.0;
end;
function SLNDepreciation(const Cost, Salvage: Extended; Life: Integer): Extended;
{ Spreads depreciation linearly over life. }
begin
if Life < 1 then ArgError('SLNDepreciation');
Result := (Cost - Salvage) / Life
end;
function SYDDepreciation(const Cost, Salvage: Extended; Life, Period: Integer): Extended;
{ SYD = (cost - salvage) * (life - period + 1) / (life*(life + 1)/2) }
{ Note: life*(life+1)/2 = 1+2+3+...+life "sum of years"
The depreciation factor varies from life/sum_of_years in first period = 1
downto 1/sum_of_years in last period = life.
Total depreciation over life is cost-salvage.}
var
X1, X2: Extended;
begin
Result := 0;
if (Period < 1) or (Life < Period) or (Cost <= Salvage) then Exit;
X1 := 2 * (Life - Period + 1);
X2 := Life * (Life + 1);
Result := (Cost - Salvage) * X1 / X2
end;
{ Discounted cash flow functions. }
function InternalRateOfReturn(const Guess: Extended; const CashFlows: array of Double): Extended;
{
Use Newton's method to solve NPV = 0, where NPV is a polynomial in
x = 1/(1+rate). Split the coefficients into negative and postive sets:
neg + pos = 0, so pos = -neg, so -neg/pos = 1
Then solve:
log(-neg/pos) = 0
Let t = log(1/(1+r) = -LnXP1(r)
then r = exp(-t) - 1
Iterate on t, then use the last equation to compute r.
}
var
T, Y: Extended;
Poly: TPoly;
K, Count: Integer;
function ConditionP(const CashFlows: array of Double): Integer;
{ Guarantees existence and uniqueness of root. The sign of payments
must change exactly once, the net payout must be always > 0 for
first portion, then each payment must be >= 0.
Returns: 0 if condition not satisfied, > 0 if condition satisfied
and this is the index of the first value considered a payback. }
var
X: Double;
I, K: Integer;
begin
K := High(CashFlows);
while (K >= 0) and (CashFlows[K] >= 0.0) do Dec(K);
Inc(K);
if K > 0 then
begin
X := 0.0;
I := 0;
while I < K do
begin
X := X + CashFlows[I];
if X >= 0.0 then
begin
K := 0;
Break;
end;
Inc(I)
end
end;
ConditionP := K
end;
begin
InternalRateOfReturn := 0;
K := ConditionP(CashFlows);
if K < 0 then ArgError('InternalRateOfReturn');
if K = 0 then
begin
if Guess <= -1.0 then ArgError('InternalRateOfReturn');
T := -LnXP1(Guess)
end else
T := 0.0;
for Count := 1 to MaxIterations do
begin
PolyX(CashFlows, Exp(T), Poly);
if Poly.Pos <= Poly.Neg then ArgError('InternalRateOfReturn');
if (Poly.Neg >= 0.0) or (Poly.Pos <= 0.0) then
begin
InternalRateOfReturn := -1.0;
Exit;
end;
with Poly do
Y := Ln(-Neg / Pos) / (DNeg / Neg - DPos / Pos);
T := T - Y;
if RelSmall(Y, T) then
begin
InternalRateOfReturn := Exp(-T) - 1.0;
Exit;
end
end;
ArgError('InternalRateOfReturn');
end;
function NetPresentValue(const Rate: Extended; const CashFlows: array of Double;
PaymentTime: TPaymentTime): Extended;
{ Caution: The sign of NPV is reversed from what would be expected for standard
cash flows!}
var
rr: Extended;
I: Integer;
begin
if Rate <= -1.0 then ArgError('NetPresentValue');
rr := 1/(1+Rate);
result := 0;
for I := High(CashFlows) downto Low(CashFlows) do
result := rr * result + CashFlows[I];
if PaymentTime = ptEndOfPeriod then result := rr * result;
end;
{ Annuity functions. }
{---------------
From the point of view of A, amounts received by A are positive and
amounts disbursed by A are negative (e.g. a borrower's loan repayments
are regarded by the borrower as negative).
Given interest rate r, number of periods n:
compound(r, n) = (1 + r)**n "Compounding growth factor"
annuity(r, n) = (compound(r, n)-1) / r "Annuity growth factor"
Given future value fv, periodic payment pmt, present value pv and type
of payment (start, 1 , or end of period, 0) pmtTime, financial variables satisfy:
fv = -pmt*(1 + r*pmtTime)*annuity(r, n) - pv*compound(r, n)
For fv, pv, pmt:
C := compound(r, n)
A := (1 + r*pmtTime)*annuity(r, n)
Compute both at once in Annuity2.
if C > 1E16 then A = C/r, so:
fv := meaningless
pv := -pmt*(pmtTime+1/r)
pmt := -pv*r/(1 + r*pmtTime)
else
fv := -pmt(1+r*pmtTime)*A - pv*C
pv := (-pmt(1+r*pmtTime)*A - fv)/C
pmt := (-pv*C-fv)/((1+r*pmtTime)*A)
---------------}
function PaymentParts(Period, NPeriods: Integer; Rate, PresentValue,
FutureValue: Extended; PaymentTime: TPaymentTime; var IntPmt: Extended):
Extended;
var
Crn:extended; { =Compound(Rate,NPeriods) }
Crp:extended; { =Compound(Rate,Period-1) }
Arn:extended; { =Annuity2(...) }
begin
if Rate <= -1.0 then ArgError('PaymentParts');
Crp:=Compound(Rate,Period-1);
Arn:=Annuity2(Rate,NPeriods,PaymentTime,Crn);
IntPmt:=(FutureValue*(Crp-1)-PresentValue*(Crn-Crp))/Arn;
PaymentParts:=(-FutureValue-PresentValue)*Crp/Arn;
end;
function FutureValue(const Rate: Extended; NPeriods: Integer; const Payment,
PresentValue: Extended; PaymentTime: TPaymentTime): Extended;
var
Annuity, CompoundRN: Extended;
begin
if Rate <= -1.0 then ArgError('FutureValue');
Annuity := Annuity2(Rate, NPeriods, PaymentTime, CompoundRN);
if CompoundRN > 1.0E16 then ArgError('FutureValue');
FutureValue := -Payment * Annuity - PresentValue * CompoundRN
end;
function InterestPayment(const Rate: Extended; Period, NPeriods: Integer;
const PresentValue, FutureValue: Extended; PaymentTime: TPaymentTime): Extended;
var
Crp:extended; { compound(rate,period-1)}
Crn:extended; { compound(rate,nperiods)}
Arn:extended; { annuityf(rate,nperiods)}
begin
if (Rate <= -1.0)
or (Period < 1) or (Period > NPeriods) then ArgError('InterestPayment');
Crp:=Compound(Rate,Period-1);
Arn:=Annuity2(Rate,Nperiods,PaymentTime,Crn);
InterestPayment:=(FutureValue*(Crp-1)-PresentValue*(Crn-Crp))/Arn;
end;
function InterestRate(NPeriods: Integer; const Payment, PresentValue,
FutureValue: Extended; PaymentTime: TPaymentTime): Extended;
{
Given:
First and last payments are non-zero and of opposite signs.
Number of periods N >= 2.
Convert data into cash flow of first, N-1 payments, last with
first < 0, payment > 0, last > 0.
Compute the IRR of this cash flow:
0 = first + pmt*x + pmt*x**2 + ... + pmt*x**(N-1) + last*x**N
where x = 1/(1 + rate).
Substitute x = exp(t) and apply Newton's method to
f(t) = log(pmt*x + ... + last*x**N) / -first
which has a unique root given the above hypotheses.
}
var
X, Y, Z, First, Pmt, Last, T, ET, EnT, ET1: Extended;
Count: Integer;
Reverse: Boolean;
function LostPrecision(X: Extended): Boolean;
asm
XOR EAX, EAX
MOV BX,WORD PTR X+8
INC EAX
AND EBX, $7FF0
JZ @@1
CMP EBX, $7FF0
JE @@1
XOR EAX,EAX
@@1:
end;
begin
Result := 0;
if NPeriods <= 0 then ArgError('InterestRate');
Pmt := Payment;
if PaymentTime = ptEndOfPeriod then
begin
X := PresentValue;
Y := FutureValue + Payment
end
else
begin
X := PresentValue + Payment;
Y := FutureValue
end;
First := X;
Last := Y;
Reverse := False;
if First * Payment > 0.0 then
begin
Reverse := True;
T := First;
First := Last;
Last := T
end;
if first > 0.0 then
begin
First := -First;
Pmt := -Pmt;
Last := -Last
end;
if (First = 0.0) or (Last < 0.0) then ArgError('InterestRate');
T := 0.0; { Guess at solution }
for Count := 1 to MaxIterations do
begin
EnT := Exp(NPeriods * T);
if {LostPrecision(EnT)} ent=(ent+1) then
begin
Result := -Pmt / First;
if Reverse then
Result := Exp(-LnXP1(Result)) - 1.0;
Exit;
end;
ET := Exp(T);
ET1 := ET - 1.0;
if ET1 = 0.0 then
begin
X := NPeriods;
Y := X * (X - 1.0) / 2.0
end
else
begin
X := ET * (Exp((NPeriods - 1) * T)-1.0) / ET1;
Y := (NPeriods * EnT - ET - X * ET) / ET1
end;
Z := Pmt * X + Last * EnT;
Y := Ln(Z / -First) / ((Pmt * Y + Last * NPeriods *EnT) / Z);
T := T - Y;
if RelSmall(Y, T) then
begin
if not Reverse then T := -T;
InterestRate := Exp(T)-1.0;
Exit;
end
end;
ArgError('InterestRate');
end;
function NumberOfPeriods(const Rate: Extended; Payment: Extended;
const PresentValue, FutureValue: Extended; PaymentTime: TPaymentTime): Extended;
{ If Rate = 0 then nper := -(pv + fv) / pmt
else cf := pv + pmt * (1 + rate*pmtTime) / rate
nper := LnXP1(-(pv + fv) / cf) / LnXP1(rate) }
var
PVRPP: Extended; { =PV*Rate+Payment } {"initial cash flow"}
T: Extended;
begin
if Rate <= -1.0 then ArgError('NumberOfPeriods');
{whenever both Payment and PaymentTime are given together, the PaymentTime has the effect
of modifying the effective Payment by the interest accrued on the Payment}
if ( PaymentTime=ptStartOfPeriod ) then
Payment:=Payment*(1+Rate);
{if the payment exactly matches the interest accrued periodically on the
presentvalue, then an infinite number of payments are going to be
required to effect a change from presentvalue to futurevalue. The
following catches that specific error where payment is exactly equal,
but opposite in sign to the interest on the present value. If PVRPP
("initial cash flow") is simply close to zero, the computation will
be numerically unstable, but not as likely to cause an error.}
PVRPP:=PresentValue*Rate+Payment;
if PVRPP=0 then ArgError('NumberOfPeriods');
{ 6.1E-5 approx= 2**-14 }
if ( ABS(Rate)<6.1E-5 ) then
Result:=-(PresentValue+FutureValue)/PVRPP
else
begin
{starting with the initial cash flow, each compounding period cash flow
should result in the current value approaching the final value. The
following test combines a number of simultaneous conditions to ensure
reasonableness of the cashflow before computing the NPER.}
T:= -(PresentValue+FutureValue)*Rate/PVRPP;
if T<=-1.0 then ArgError('NumberOfPeriods');
Result := LnXP1(T) / LnXP1(Rate)
end;
NumberOfPeriods:=Result;
end;
function Payment(Rate: Extended; NPeriods: Integer; const PresentValue,
FutureValue: Extended; PaymentTime: TPaymentTime): Extended;
var
Annuity, CompoundRN: Extended;
begin
if Rate <= -1.0 then ArgError('Payment');
Annuity := Annuity2(Rate, NPeriods, PaymentTime, CompoundRN);
if CompoundRN > 1.0E16 then
Payment := -PresentValue * Rate / (1 + Integer(PaymentTime) * Rate)
else
Payment := (-PresentValue * CompoundRN - FutureValue) / Annuity
end;
function PeriodPayment(const Rate: Extended; Period, NPeriods: Integer;
const PresentValue, FutureValue: Extended; PaymentTime: TPaymentTime): Extended;
var
Junk: Extended;
begin
if (Rate <= -1.0) or (Period < 1) or (Period > NPeriods) then ArgError('PeriodPayment');
PeriodPayment := PaymentParts(Period, NPeriods, Rate, PresentValue,
FutureValue, PaymentTime, Junk);
end;
function PresentValue(const Rate: Extended; NPeriods: Integer; const Payment,
FutureValue: Extended; PaymentTime: TPaymentTime): Extended;
var
Annuity, CompoundRN: Extended;
begin
if Rate <= -1.0 then ArgError('PresentValue');
Annuity := Annuity2(Rate, NPeriods, PaymentTime, CompoundRN);
if CompoundRN > 1.0E16 then
PresentValue := -(Payment / Rate * Integer(PaymentTime) * Payment)
else
PresentValue := (-Payment * Annuity - FutureValue) / CompoundRN
end;
function GetRoundMode: TFPURoundingMode;
begin
Result := TFPURoundingMode((Get8087CW shr 10) and 3);
end;
function SetRoundMode(const RoundMode: TFPURoundingMode): TFPURoundingMode;
var
CtlWord: Word;
begin
CtlWord := Get8087CW;
Set8087CW((CtlWord and $F3FF) or (Ord(RoundMode) shl 10));
Result := TFPURoundingMode((CtlWord shr 10) and 3);
end;
function GetPrecisionMode: TFPUPrecisionMode;
begin
Result := TFPUPrecisionMode((Get8087CW shr 8) and 3);
end;
function SetPrecisionMode(const Precision: TFPUPrecisionMode): TFPUPrecisionMode;
var
CtlWord: Word;
begin
CtlWord := Get8087CW;
Set8087CW((CtlWord and $FCFF) or (Ord(Precision) shl 8));
Result := TFPUPrecisionMode((CtlWord shr 8) and 3);
end;
function GetExceptionMask: TFPUExceptionMask;
begin
Byte(Result) := Get8087CW and $3F;
end;
function SetExceptionMask(const Mask: TFPUExceptionMask): TFPUExceptionMask;
var
CtlWord: Word;
begin
CtlWord := Get8087CW;
Set8087CW( (CtlWord and $FFC0) or Byte(Mask) );
Byte(Result) := CtlWord and $3F;
end;
procedure ClearExceptions(RaisePending: Boolean);
asm
cmp al, 0
jz @@clear
fwait
@@clear:
fnclex
end;
end.
|
unit fODVitals;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
fODBase, ComCtrls, ExtCtrls, StdCtrls, ORCtrls, ORDtTm,
VA508AccessibilityManager;
type
TfrmODVitals = class(TfrmODBase)
cboMeasurement: TORComboBox;
cboSchedule: TORComboBox;
calStart: TORDateBox;
calStop: TORDateBox;
grpCallHO: TGroupBox;
lblMeasurement: TLabel;
lblSchedule: TLabel;
lblStart: TLabel;
lblStop: TLabel;
txtBPsys: TCaptionEdit;
txtBPDia: TCaptionEdit;
txtPulseLT: TCaptionEdit;
txtPulGT: TCaptionEdit;
txtTemp: TCaptionEdit;
lblBPsys: TLabel;
lblBPdia: TLabel;
lblPulseLT: TLabel;
lblPulseGT: TLabel;
lblTemp: TLabel;
chkCallHO: TCheckBox;
txtComment: TCaptionEdit;
lblComment: TLabel;
spnBPsys: TUpDown;
spnBPdia: TUpDown;
spnPulseLT: TUpDown;
spnPulseGT: TUpDown;
spnTemp: TUpDown;
procedure FormCreate(Sender: TObject);
procedure ControlChange(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
private
{ Private declarations }
protected
procedure InitDialog; override;
procedure Validate(var AnErrMsg: string); override;
public
procedure SetupDialog(OrderAction: Integer; const ID: string); override;
end;
var
frmODVitals: TfrmODVitals;
implementation
{$R *.DFM}
uses uConst, ORFn, rODBase, fFrame, VAUtils;
const
TX_NO_MEASUREMENT = 'A measurement must be selected.';
TX_BAD_START = 'The start date is not valid.';
TX_BAD_STOP = 'The stop date is not valid.';
TX_STOPSTART = 'The stop date must be after the start date.';
procedure TfrmODVitals.FormCreate(Sender: TObject);
begin
frmFrame.pnlVisit.Enabled := false;
inherited;
FillerID := 'OR'; // does 'on Display' order check **KCM**
StatusText('Loading Dialog Definition');
Responses.Dialog := 'GMRVOR';
//Responses.Dialog := 'ORWD GENERIC VITALS'; // loads formatting info
StatusText('Loading Default Values'); // there are no defaults for text only
CtrlInits.LoadDefaults(ODForVitals);
InitDialog;
StatusText('');
end;
procedure TfrmODVitals.InitDialog;
begin
inherited;
txtComment.Text := '';
with CtrlInits do
begin
SetControl(cboMeasurement, 'Measurements');
SetControl(cboSchedule, 'Schedules');
end;
ActiveControl := cboMeasurement; //SetFocusedControl(cboMeasurement);
end;
procedure TfrmODVitals.SetupDialog(OrderAction: Integer; const ID: string);
begin
inherited;
if OrderAction in [ORDER_COPY, ORDER_EDIT, ORDER_QUICK] then with Responses do
begin
Changing := True;
SetControl(cboMeasurement, 'ORDERABLE', 1);
SetControl(cboSchedule, 'SCHEDULE', 1);
SetControl(calStart, 'START', 1);
SetControl(calStop, 'STOP', 1);
SetControl(txtComment, 'COMMENT', 1);
Changing := False;
ControlChange(Self);
end;
end;
procedure TfrmODVitals.Validate(var AnErrMsg: string);
var
ErrMsg: string;
procedure SetError(const x: string);
begin
if Length(AnErrMsg) > 0 then AnErrMsg := AnErrMsg + CRLF;
AnErrMsg := AnErrMsg + x;
end;
begin
inherited;
if cboMeasurement.ItemIEN <= 0 then SetError(TX_NO_MEASUREMENT);
calStart.Validate(ErrMsg);
if Length(ErrMsg) > 0 then SetError(TX_BAD_START);
calStop.Validate(ErrMsg);
if Length(ErrMsg) > 0 then SetError(TX_BAD_STOP);
if (Length(calStop.Text) > 0) and (calStop.FMDateTime <= calStart.FMDateTime)
then SetError(TX_STOPSTART);
end;
procedure TfrmODVitals.ControlChange(Sender: TObject);
begin
inherited;
if Changing then Exit;
Responses.Clear;
with cboMeasurement do if ItemIEN > 0 then Responses.Update('ORDERABLE', 1, ItemID, Text);
with cboSchedule do if Length(Text) > 0 then Responses.Update('SCHEDULE' , 1, Text, Text);
with calStart do if Length(Text) > 0 then Responses.Update('START', 1, Text, Text);
with calStop do if Length(Text) > 0 then Responses.Update('STOP', 1, Text, Text);
with txtComment do if Length(Text) > 0 then Responses.Update('COMMENT', 1, Text, Text);
memOrder.Text := Responses.OrderText;
end;
procedure TfrmODVitals.FormClose(Sender: TObject;
var Action: TCloseAction);
begin
inherited;
frmFrame.pnlVisit.Enabled := true;
end;
end.
|
{ *************************************************************************** }
{ }
{ Kylix and Delphi Cross-Platform Visual Component Library }
{ }
{ Copyright (c) 2000, 2001 Borland Software Corporation }
{ }
{ *************************************************************************** }
unit DBConnAdmin;
interface
uses SysUtils, Classes, IniFiles;
type
{ IConnectionAdmin }
IConnectionAdmin = interface
function GetDriverNames(List: TStrings): Integer;
function GetDriverParams(const DriverName: string; Params: TStrings): Integer;
procedure GetDriverLibNames(const DriverName: string;
var LibraryName, VendorLibrary: string);
function GetConnectionNames(List: TStrings; DriverName: string): Integer;
function GetConnectionParams(const ConnectionName: string; Params: TStrings): Integer;
procedure GetConnectionParamValues(const ParamName: string; Values: TStrings);
procedure AddConnection(const ConnectionName, DriverName: string);
procedure DeleteConnection(const ConnectionName: string);
procedure ModifyConnection(const ConnectionName: string; Params: TStrings);
procedure RenameConnection(const OldName, NewName: string);
procedure ModifyDriverParams(const DriverName: string; Params: TStrings);
end;
{ TConnectionAdmin }
TConnectionAdmin = class(TInterfacedObject, IConnectionAdmin)
private
FDriverConfig: TIniFile;
FConnectionConfig: TIniFile;
protected
{ IConnectionAdmin }
function GetDriverNames(List: TStrings): Integer;
function GetDriverParams(const DriverName: string; Params: TStrings): Integer;
procedure GetDriverLibNames(const DriverName: string;
var LibraryName, VendorLibrary: string);
function GetConnectionNames(List: TStrings; DriverName: string): Integer;
function GetConnectionParams(const ConnectionName: string; Params: TStrings): Integer;
procedure GetConnectionParamValues(const ParamName: string; Values: TStrings);
procedure AddConnection(const ConnectionName, DriverName: string);
procedure DeleteConnection(const ConnectionName: string);
procedure ModifyConnection(const ConnectionName: string; Params: TStrings);
procedure RenameConnection(const OldName, NewName: string);
procedure ModifyDriverParams(const DriverName: string; Params: TStrings);
public
constructor Create;
destructor Destroy; override;
property ConnectionConfig: TIniFile read FConnectionConfig;
property DriverConfig: TIniFile read FDriverConfig;
end;
function GetConnectionAdmin: IConnectionAdmin;
implementation
uses SqlConst, SqlExpr, DB;
{ Global Functions }
function GetConnectionAdmin: IConnectionAdmin;
begin
Result := IConnectionAdmin(TConnectionAdmin.Create);
end;
function FormatLine(const Key, Value: string): string;
begin
Result := Format('%s=%s', [Key, Value]);
end;
function GetValue(const Line: string): string;
var
ValPos: Integer;
begin
ValPos := Pos('=', Line);
if ValPos > 0 then
Result := Copy(Line, ValPos+1, MAXINT) else
Result := '';
end;
procedure WriteSectionValues(IniFile: TIniFile; const Section: string; Strings: TStrings);
var
I: Integer;
begin
with IniFile do
begin
EraseSection(Section);
for I := 0 to Strings.Count - 1 do
WriteString(Section, Strings.Names[I], GetValue(Strings[I]));
{$IFDEF LINUX}
UpdateFile;
{$ENDIF}
end;
end;
{ TConnectionAdmin }
constructor TConnectionAdmin.Create;
var
sConfigFile:String;
begin
inherited Create;
sConfigFile := GetDriverRegistryFile(True);
if not FileExists(sConfigFile) then
DatabaseErrorFmt(SMissingDriverRegFile,[sConfigFile]);
FDriverConfig := TIniFile.Create(sConfigFile);
sConfigFile := GetConnectionRegistryFile(True);
if not FileExists(sConfigFile) then
DatabaseErrorFmt(SMissingDriverRegFile,[sConfigFile]);
FConnectionConfig := TIniFile.Create(sConfigFile);
end;
destructor TConnectionAdmin.Destroy;
begin
inherited;
FConnectionConfig.Free;
FDriverConfig.Free;
end;
procedure TConnectionAdmin.AddConnection(const ConnectionName,
DriverName: string);
var
Params: TStrings;
DriverIndex: Integer;
begin
Params := TStringList.Create;
try
GetDriverParams(DriverName, Params);
Params.Insert(0, FormatLine(DRIVERNAME_KEY, DriverName));
DriverIndex := Params.IndexOfName(GETDRIVERFUNC_KEY);
if DriverIndex <> -1 then
Params.Delete(DriverIndex);
WriteSectionValues(ConnectionConfig, ConnectionName, Params);
finally
Params.Free
end;
end;
procedure TConnectionAdmin.DeleteConnection(const ConnectionName: string);
begin
ConnectionConfig.EraseSection(ConnectionName);
end;
function TConnectionAdmin.GetConnectionNames(List: TStrings;
DriverName: string): Integer;
var
I: Integer;
begin
ConnectionConfig.ReadSections(List);
if DriverName <> '' then
begin
List.BeginUpdate;
try
I := List.Count - 1;
while I >= 0 do
begin
if AnsiCompareText(ConnectionConfig.ReadString(List[i], DRIVERNAME_KEY, ''),
DriverName) <> 0 then List.Delete(I);
Dec(I);
end;
finally
List.EndUpdate;
end;
end;
Result := List.Count;
end;
function TConnectionAdmin.GetConnectionParams(const ConnectionName: string;
Params: TStrings): Integer;
begin
ConnectionConfig.ReadSectionValues(ConnectionName, Params);
Result := Params.Count;
end;
procedure TConnectionAdmin.GetConnectionParamValues(const ParamName: string;
Values: TStrings);
begin
DriverConfig.ReadSection(ParamName, Values);
end;
function TConnectionAdmin.GetDriverNames(List: TStrings): Integer;
begin
DriverConfig.ReadSection(DRIVERS_KEY, List);
Result := List.Count;
end;
function TConnectionAdmin.GetDriverParams(const DriverName: string; Params: TStrings): Integer;
procedure RemoveEntry(const KeyName: string);
var
Index: Integer;
begin
Index := Params.IndexOfName(KeyName);
if Index > -1 then Params.Delete(Index);
end;
begin
DriverConfig.ReadSectionValues(DriverName, Params);
RemoveEntry(DLLLIB_KEY);
RemoveEntry(VENDORLIB_KEY);
Result := Params.Count;
end;
procedure TConnectionAdmin.GetDriverLibNames(const DriverName: string;
var LibraryName, VendorLibrary: string);
begin
LibraryName := DriverConfig.ReadString(DriverName, DLLLIB_KEY, '');
VendorLibrary := DriverConfig.ReadString(DriverName, VENDORLIB_KEY, '');
end;
procedure TConnectionAdmin.ModifyConnection(const ConnectionName: string;
Params: TStrings);
begin
WriteSectionValues(ConnectionConfig, ConnectionName, Params);
end;
procedure TConnectionAdmin.RenameConnection(const OldName, NewName: string);
var
Params: TStrings;
begin
Params := TStringList.Create;
try
GetConnectionParams(OldName, Params);
ConnectionConfig.EraseSection(OldName);
WriteSectionValues(ConnectionConfig, NewName, Params);
finally
Params.Free
end;
end;
procedure TConnectionAdmin.ModifyDriverParams(const DriverName: string;
Params: TStrings);
begin
WriteSectionValues(DriverConfig, DriverName, Params);
end;
end.
|
unit Model.Entity.Produto;
interface
uses
SimpleAttributes;
type
[Tabela('PRODUTO')]
TPRODUTO = class
private
FGUUID :String;
FCODIGO :String;
FDESCRICAO :String;
FPRECO :Currency;
FNCM :Integer;
FALIQUOTA :Currency;
FST :Integer;
FSTATUS :Integer;
FDATAALTERACAO :TDateTime;
procedure SetGUUID (const Value :String);
function GetGUUID :String;
procedure SetCODIGO (const Value :String);
function GetCODIGO :String;
procedure SetDESCRICAO (const Value :String);
function GetDESCRICAO :String;
procedure SetPRECO (const Value :Currency);
function GetPRECO :Currency;
procedure SetNCM (const Value :Integer);
function GetNCM :Integer;
procedure SetALIQUOTA (const Value :Currency);
function GetALIQUOTA :Currency;
procedure SetST (const Value :Integer);
function GetST :Integer;
procedure SetSTATUS (const Value :Integer);
function GetSTATUS :Integer;
procedure SetDATAALTERACAO (const Value :TDateTime);
function GetDATAALTERACAO :TDateTime;
public
constructor Create;
destructor Destroy; override;
procedure Limpar;
[Campo('GUUID'), PK]
property GUUID :String read GetGUUID write SetGUUID;
[Campo('CODIGO')]
property CODIGO :String read GetCODIGO write SetCODIGO;
[Campo('DESCRICAO')]
property DESCRICAO :String read GetDESCRICAO write SetDESCRICAO;
[Campo('PRECO')]
property PRECO :Currency read GetPRECO write SetPRECO;
[Campo('NCM')]
property NCM :Integer read GetNCM write SetNCM;
[Campo('ALIQUOTA')]
property ALIQUOTA :Currency read GetALIQUOTA write SetALIQUOTA;
[Campo('ST')]
property ST :Integer read GetST write SetST;
[Campo('STATUS')]
property STATUS :Integer read GetSTATUS write SetSTATUS;
[Campo('DATAALTERACAO')]
property DATAALTERACAO :TDateTime read GetDATAALTERACAO write SetDATAALTERACAO;
end;
implementation
constructor TPRODUTO.Create;
begin
Limpar;
end;
destructor TPRODUTO.Destroy;
begin
inherited;
end;
procedure TPRODUTO.SetGUUID (const Value :String);
begin
FGUUID := Value;
end;
function TPRODUTO.GetGUUID :String;
begin
Result := FGUUID;
end;
procedure TPRODUTO.SetCODIGO (const Value :String);
begin
FCODIGO := Value;
end;
function TPRODUTO.GetCODIGO :String;
begin
Result := FCODIGO;
end;
procedure TPRODUTO.SetDESCRICAO (const Value :String);
begin
FDESCRICAO := Value;
end;
function TPRODUTO.GetDESCRICAO :String;
begin
Result := FDESCRICAO;
end;
procedure TPRODUTO.SetPRECO (const Value :Currency);
begin
FPRECO := Value;
end;
function TPRODUTO.GetPRECO :Currency;
begin
Result := FPRECO;
end;
procedure TPRODUTO.SetNCM (const Value :Integer);
begin
FNCM := Value;
end;
function TPRODUTO.GetNCM :Integer;
begin
Result := FNCM;
end;
procedure TPRODUTO.SetALIQUOTA (const Value :Currency);
begin
FALIQUOTA := Value;
end;
function TPRODUTO.GetALIQUOTA :Currency;
begin
Result := FALIQUOTA;
end;
procedure TPRODUTO.SetST (const Value :Integer);
begin
FST := Value;
end;
function TPRODUTO.GetST :Integer;
begin
Result := FST;
end;
procedure TPRODUTO.SetSTATUS (const Value :Integer);
begin
FSTATUS := Value;
end;
function TPRODUTO.GetSTATUS :Integer;
begin
Result := FSTATUS;
end;
procedure TPRODUTO.SetDATAALTERACAO (const Value :TDateTime);
begin
FDATAALTERACAO := Value;
end;
function TPRODUTO.GetDATAALTERACAO :TDateTime;
begin
Result := FDATAALTERACAO;
end;
procedure TPRODUTO.Limpar;
begin
Self.GUUID := '';
Self.CODIGO := '';
Self.DESCRICAO := '';
Self.PRECO := 0;
Self.NCM := 0;
Self.ALIQUOTA := 0;
Self.ST := 0;
Self.STATUS := 0;
Self.DATAALTERACAO := 0;
end;
end.
|
unit AddNoiseUnit;
interface
uses
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, Vcl.ComCtrls;
type
TAddNoiseForm = class(TForm)
Label1: TLabel;
TrackBar: TTrackBar;
ButtonOK: TButton;
ButtonCancel: TButton;
Edit: TEdit;
UpDown: TUpDown;
procedure TrackBarChange(Sender: TObject);
procedure EditChange(Sender: TObject);
procedure ButtonOKClick(Sender: TObject);
procedure ButtonCancelClick(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
private
{ Private declarations }
public
{ Public declarations }
end;
var
AddNoiseForm: TAddNoiseForm;
implementation
{$R *.dfm}
Uses MainUnit;
procedure AddNoize(Bitmap:TBitmap; Amount:integer; Mono:boolean);
function BLimit(B:integer):byte;
begin
if B<0 then
Result:=0
else if B>255 then
Result:=255
else Result:=B;
end;
type TRGB=record
B,G,R:byte;
end;
PRGB=^TRGB;
var
x,y,i,a:integer;
Dest:pRGB;
begin
Bitmap.PixelFormat:=pf24bit;
Randomize;
i:=Amount shr 1;
if mono then
for y:=0 to Bitmap.Height-1 do begin
Dest:=Bitmap.ScanLine[y];
for x:=0 to Bitmap.Width-1 do begin
a:=random(Amount)-i;
with Dest^ do begin
r:=BLimit(r+a);
g:=BLimit(g+a);
b:=BLimit(b+a);
end;
Inc(Dest);
end;
end else
for y:=0 to Bitmap.Height-1 do begin
Dest:=Bitmap.ScanLine[y];
for x:=0 to Bitmap.Width-1 do begin
with Dest^ do begin
r:=BLimit(r+random(Amount)-i);
g:=BLimit(g+random(Amount)-i);
b:=BLimit(b+random(Amount)-i);
end;
Inc(Dest);
end;
end;
end;
procedure TAddNoiseForm.ButtonCancelClick(Sender: TObject);
begin
buffer.Assign(img);
MainForm.PaintBox.Visible:=false;
MainForm.PaintBox.Visible:=true;
AddNoiseForm.Close;
end;
procedure TAddNoiseForm.ButtonOKClick(Sender: TObject);
begin
AddNoize(buffer,StrToInt(Edit.Text),false);
img.Assign(buffer);
AddNoiseForm.Close;
end;
procedure TAddNoiseForm.EditChange(Sender: TObject);
begin
buffer.Assign(img);
TrackBar.Position:=StrToInt(Edit.Text);
AddNoize(buffer,StrToInt(Edit.Text),false);
MainForm.PaintBox.Visible:=false;
MainForm.PaintBox.Visible:=true;
end;
procedure TAddNoiseForm.FormClose(Sender: TObject; var Action: TCloseAction);
begin
buffer.Assign(img);
MainForm.PaintBox.Visible:=false;
MainForm.PaintBox.Visible:=true;
end;
procedure TAddNoiseForm.FormCreate(Sender: TObject);
begin
TrackBar.Position:=0;
end;
procedure TAddNoiseForm.TrackBarChange(Sender: TObject);
begin
Edit.Text:=IntToStr(TrackBar.Position);
end;
end.
|
{
@html(<b>)
Plugable Message Client component
@html(</b>)
- Copyright (c) Danijel Tkalcec
@html(<br><br>)
Introducing the @html(<b>) @Link(TRtcMessageClient) @html(</b>) component:
@html(<br>)
Plugable Client component can be used for direct client-server in-memory connections, or
for "plugging" RTC Clients into third-party connection components (like NexusDB).
}
unit rtcMsgCli;
{$INCLUDE rtcDefs.inc}
interface
uses
Classes,
rtcInfo,
rtcConn,
rtcFastStrings,
rtcTransports,
rtcDataCli;
type
// @exclude
TRtcMessageClient=class;
{ @Abstract(Plugable Message Client Connection component)
Received data will be processed by TRtcMessageClient to gather Request
information and make it easily accessible through the
@Link(TRtcDataClient.Request) property.
The same way, your response will be packed into a HTTP result header
and sent out as a valid HTTP result, readable by any Web Browser.
@html(<br>)
@Link(TRtcMessageClient) also makes sure that you receive requests one by one
and get the chance to answer them one-by-one, even if the client side
sends all the requests at once (as one big request list), so
you can relax and process all incomming requests, without worrying
about overlapping your responses for different requests.
@html(<br><br>)
Properties to check first:
@html(<br>)
@Link(TRtcMessageClient.Server) - Server connection component (where our requests are sent for processing)
@html(<br><br>)
Methods to check first:
@html(<br>)
@Link(TRtcDataClient.Request), @Link(TRtcMessageClient.WriteHeader), @Link(TRtcMessageClient.Write) - Write (send) Request to Server
@html(<br>)
@Link(TRtcDataClient.Response), @Link(TRtcConnection.Read) - Read Server's Response
@html(<br><br>)
Events to check first:
@html(<br>)
@Link(TRtcConnection.OnDataSent) - Data sent to server (buffer now empty)
@html(<br>)
@Link(TRtcConnection.OnDataReceived) - Data available from server (check @Link(TRtcDataClient.Response))
@html(<br>)
@Link(TRtcMessageClient.OnInvalidResponse) - Received invalid response from Server
@html(<br><br>)
Check @Link(TRtcClient) and @Link(TRtcConnection) for more info.
}
TRtcMessageClient = class(TRtcDataClient)
private
FServer:TComponent;
// User Parameters
FMaxResponseSize:cardinal;
FMaxHeaderSize:cardinal;
FOnInvalidResponse:TRtcNotifyEvent;
// Internal variables
FWritten:boolean;
FWriteBuffer:TRtcHugeString;
procedure SetServer(const Value: TComponent);
protected
// @exclude
procedure SetTriggers; override;
// @exclude
procedure ClearTriggers; override;
// @exclude
procedure SetParams; override;
// @exclude
function CreateProvider:TObject; override;
// @exclude
procedure TriggerDataSent; override;
// @exclude
procedure TriggerDataReceived; override;
// @exclude
procedure TriggerDataOut; override;
// @exclude
procedure TriggerInvalidResponse; virtual;
// @exclude
procedure CallInvalidResponse; virtual;
// @exclude
procedure SetRequest(const Value: TRtcClientRequest); override;
// @exclude
procedure SetResponse(const Value: TRtcClientResponse); override;
public
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
class function New:TRtcMessageClient;
// @exclude
procedure LeaveEvent; override;
{ Flush all buffered data.
@html(<br>)
When using 'Write' without calling 'WriteHeader' before, all data
prepared by calling 'Write' will be buffered until your event
returns to its caller (automatically upon your event completion) or
when you first call 'Flush'. Flush will check if Request.ContentLength is set
and if not, will set the content length to the number of bytes buffered.
@html(<br>)
Flush does nothing if WriteHeader was called for this response.
@exclude}
procedure Flush; override;
// You can call WriteHeader to send the Request header out.
procedure WriteHeader(SendNow:boolean=True); overload; override;
{ You can call WriteHeader with empty 'HeaderText' parameter to
tell the component that you do not want any HTTP header to be sent. }
procedure WriteHeader(const HeaderText: string; SendNow:boolean=True); overload; override;
// Use Write to send any Content (document body) out.
procedure Write(const s:string=''); override;
published
{ Maximum allowed size of the first response line, without header (0 = no limit).
This is the first line in a HTTP response and includes Response.StatusCode and Response.StatusText }
property MaxResponseSize:cardinal read FMaxResponseSize write FMaxResponseSize default 0;
{ Maximum allowed size of each response's header size (0 = no limit).
This are all the remaining header lines in a HTTP response,
which come after the first line and end with an empty line,
after which usually comes the content (document body). }
property MaxHeaderSize:cardinal read FMaxHeaderSize write FMaxHeaderSize default 0;
{ This event will be called if the received response exceeds your defined
maximum response or header size. If both values are 0, this event will never be called. }
property OnInvalidResponse:TRtcNotifyEvent read FOnInvalidResponse write FOnInvalidResponse;
{ TRtcMsgServer or any other component implementing the IRTCMessageReceiver interface. }
property Server:TComponent read FServer write SetServer;
end;
implementation
uses
SysUtils,
rtcConnProv,
rtcMsgCliProv; // Message Client Provider
type
TMyProvider = TRtcMsgClientProvider; // Message Client Provider
{ TRtcMessageClient }
constructor TRtcMessageClient.Create(AOwner: TComponent);
begin
inherited Create(AOwner);
FWriteBuffer:=TRtcHugeString.Create;
FWritten:=False;
end;
destructor TRtcMessageClient.Destroy;
begin
FWriteBuffer.Free;
inherited;
end;
class function TRtcMessageClient.New: TRtcMessageClient;
begin
Result:=Create(nil);
end;
function TRtcMessageClient.CreateProvider:TObject;
begin
if not assigned(Con) then
begin
Con:=TMyProvider.Create;
SetTriggers;
end;
Result:=Con;
end;
procedure TRtcMessageClient.SetParams;
begin
inherited;
if assigned(Con) then
begin
TMyProvider(Con).Request:=Request;
TMyProvider(Con).Response:=Response;
TMyProvider(Con).MaxResponseSize:=MaxResponseSize;
TMyProvider(Con).MaxHeaderSize:=MaxHeaderSize;
end;
end;
procedure TRtcMessageClient.SetTriggers;
var
MR:IRTCMessageReceiver;
begin
inherited;
if assigned(Con) then
begin
if Server.GetInterface(IRTCMessageReceiverGUID, MR) then
TMyProvider(Con).Server:=MR
else
raise Exception.Create('Server does NOT support the IRTCMessageReceiver interface!');
{$IFDEF FPC}
TMyProvider(Con).SetTriggerInvalidResponse(@TriggerInvalidResponse);
{$ELSE}
TMyProvider(Con).SetTriggerInvalidResponse(TriggerInvalidResponse);
{$ENDIF}
end;
end;
procedure TRtcMessageClient.ClearTriggers;
begin
inherited;
if assigned(Con) then
begin
TMyProvider(Con).Server:=nil;
TMyProvider(Con).SetTriggerInvalidResponse(nil);
end;
end;
procedure TRtcMessageClient.WriteHeader(SendNow:boolean=True);
begin
if assigned(Con) and (State<>conInactive) then
begin
if Request.Active then
raise Exception.Create('Error! Sending multiple headers for one request.');
Timeout.DataSending;
TMyProvider(Con).WriteHeader;
end;
end;
procedure TRtcMessageClient.WriteHeader(const HeaderText: string; SendNow:boolean=True);
begin
if assigned(Con) and (State<>conInactive) then
begin
if Request.Active then
raise Exception.Create('Error! Sending multiple headers for one request.');
Timeout.DataSending;
TMyProvider(Con).WriteHeader(HeaderText);
end;
end;
procedure TRtcMessageClient.Write(const s: string='');
begin
if assigned(Con) and (State<>conInactive) then
begin
if Request.Complete then
raise Exception.Create('Error! Answer allready sent for this request.');
if Request.Active then
begin
{ Header is out }
if Request['Content-Length']<>'' then
if Request.ContentLength - Request.ContentOut < length(s) then
raise Exception.Create('Error! Sending more data out than specified in header.');
{ Data size is known or unimportant.
We can just write the string out, without buffering }
Con.Write(s);
end
else
begin
if (Request['CONTENT-LENGTH']<>'') and not FWritten then
begin
{ Content length defined and no data buffered,
send out header prior to sending first content bytes }
WriteHeader(length(s)=0);
if Request.ContentLength - Request.ContentOut < length(s) then
raise Exception.Create('Error! Sending more data out than specified in header.');
Con.Write(s);
end
else
begin
{ Header is not out.
Buffer all Write() operations,
so we can determine content size and write it all out in a flush. }
FWritten:=True;
FWriteBuffer.Add(s);
end;
end;
end;
end;
procedure TRtcMessageClient.Flush;
var
Temp:string;
begin
if not FWritten then
Exit
else
FWritten:=False; // so we don't re-enter this method.
if assigned(Con) and (State<>conInactive) then
begin
Timeout.DataSending;
if Request.Complete then
raise Exception.Create('Error! Answer allready sent for this request.');
if not Request.Active then
begin
if Request['CONTENT-LENGTH']='' then // length not specified
begin
Request.AutoLength:=True;
Request.ContentLength:=FWriteBuffer.Size;
end;
TMyProvider(Con).WriteHeader;
end;
if FWriteBuffer.Size>0 then
begin
Temp:= FWriteBuffer.Get;
FWriteBuffer.Clear;
Con.Write(Temp);
Temp:='';
end;
end;
end;
procedure TRtcMessageClient.CallInvalidResponse;
begin
if assigned(OnInvalidResponse) then
OnInvalidResponse(self);
end;
procedure TRtcMessageClient.TriggerDataReceived;
begin
inherited;
Flush;
end;
procedure TRtcMessageClient.TriggerDataSent;
begin
if FWriteCount>0 then
Timeout.DataSent;
EnterEvent;
try
if FWriteCount>0 then
begin
CallDataSent;
Flush;
end;
if not isClosing then
begin
CallReadyToSend;
Flush;
end;
finally
LeaveEvent;
end;
end;
procedure TRtcMessageClient.TriggerDataOut;
begin
inherited;
Flush;
end;
procedure TRtcMessageClient.TriggerInvalidResponse;
begin
EnterEvent;
try
CallInvalidResponse;
Flush;
Disconnect;
finally
LeaveEvent;
end;
end;
procedure TRtcMessageClient.SetRequest(const Value: TRtcClientRequest);
begin
inherited SetRequest(Value);
if assigned(Con) then
TMyProvider(Con).Request:=Request;
end;
procedure TRtcMessageClient.SetResponse(const Value: TRtcClientResponse);
begin
inherited SetResponse(Value);
if assigned(Con) then
TMyProvider(Con).Response:=Response;
end;
procedure TRtcMessageClient.LeaveEvent;
begin
inherited;
if not InsideEvent then
if assigned(Con) then
TMyProvider(Con).LeavingEvent;
end;
procedure TRtcMessageClient.SetServer(const Value: TComponent);
var
MR:IRTCMessageReceiver;
begin
if Value<>FServer then
begin
if not assigned(Value) then
FServer:=nil
else if assigned(Value) then
if Value.GetInterface(IRTCMessageReceiverGUID, MR) then
FServer:=Value
else
raise Exception.Create('Component does NOT support the IRTCMessageReceived interface!');
end;
end;
end.
|
unit caMatrixDataset;
{$INCLUDE ca.inc}
interface
uses
// Standard Delphi units
Windows,
SysUtils,
Classes,
DB,
{$IFDEF D7_UP}
Variants,
{$ENDIF}
// ca units
caLog,
caBaseDataset,
caMatrix,
caUtils,
caClasses;
type
//----------------------------------------------------------------------------
// TcaMatrixDataset
//----------------------------------------------------------------------------
TcaMatrixDataset = class(TcaBaseDataset)
private
// Private fields
FMatrix: TcaMatrix;
FItemIndex: Integer;
// Property fields
FFileName: String;
// Property methods
function GetFileName: String;
procedure SetFileName(const Value: String);
protected
//---------------------------------------------------------------------------
// Overridden abstract methods from TcaBaseDataset
//---------------------------------------------------------------------------
// Basic DB methods
function CanOpen: Boolean; override;
function GetFieldValue(Field: TField): Variant; override;
procedure DoBeforeSetFieldValue(Inserting: Boolean); override;
procedure DoClose; override;
procedure DoCreateFieldDefs; override;
procedure DoDeleteRecord; override;
procedure GetBlobField(Field: TField; Stream: TStream); override;
procedure SetBlobField(Field: TField; Stream: TStream); override;
procedure SetFieldValue(Field: TField; Value: Variant); override;
// Buffer ID methods
function AllocateRecordID: Pointer; override;
procedure DisposeRecordID(Value: Pointer); override;
procedure GotoRecordID(Value: Pointer); override;
// BookMark functions
function GetBookMarkSize: Integer; override;
procedure AllocateBookMark(RecordID: Pointer; Bookmark: Pointer); override;
procedure DoGotoBookmark(Bookmark: Pointer); override;
// Navigation methods
function Navigate(GetMode: TGetMode): TGetResult; override;
procedure DoFirst; override;
procedure DoLast; override;
//---------------------------------------------------------------------------
// Overridden methods from TDataset
//---------------------------------------------------------------------------
function GetRecordCount: Integer; override;
function GetRecNo: Integer; override;
procedure CreateFields; override;
procedure DoAfterPost; override;
procedure DoBeforePost; override;
procedure SetRecNo(Value: Integer); override;
//---------------------------------------------------------------------------
// Other protected methods
//---------------------------------------------------------------------------
procedure DoGetItemValue(const AColumnName: String; ARow: Integer; var AValue: Variant); virtual;
procedure DoLoadXMLData; virtual;
procedure DoSetItemValue(const AColumnName: String; ARow: Integer; var AValue: Variant); virtual;
public
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
published
// Properties
property FileName: String read GetFileName write SetFileName;
// Promoted properties
property Active;
property ReadOnly;
end;
implementation
//----------------------------------------------------------------------------
// TcaMatrixDataset
//----------------------------------------------------------------------------
constructor TcaMatrixDataset.Create(AOwner: TComponent);
begin
inherited;
FMatrix := TcaMatrix.Create;
end;
destructor TcaMatrixDataset.Destroy;
begin
if Active then Close;
FMatrix.Free;
inherited;
end;
// Overridden abstract methods from TcaBaseDataset
// Basic DB methods
function TcaMatrixDataset.CanOpen: Boolean;
begin
FItemIndex := -1;
FMatrix.LoadFromXML(FFileName);
Result := True;
end;
function TcaMatrixDataset.GetFieldValue(Field: TField): Variant;
var
ARow: Integer;
ACol: Integer;
begin
ARow := FItemIndex;
ACol := Field.Index;
Result := FMatrix.Strings[ACol, ARow];
end;
procedure TcaMatrixDataset.DoBeforeSetFieldValue(Inserting: Boolean);
begin
//
end;
procedure TcaMatrixDataset.DoClose;
begin
FreeAndNil(FMatrix);
end;
procedure TcaMatrixDataset.DoCreateFieldDefs;
var
FieldDef: TFieldDef;
Index: Integer;
begin
for Index := 0 to FMatrix.ColCount - 1 do
begin
FieldDef := FieldDefs.AddFieldDef;
FieldDef.Name := FMatrix.ColumnNames[Index];
// FieldDef.DataType :=
FieldDef.Size := FieldDef.Size;
FieldDef.Required := FieldDef.Required;
end;
end;
procedure TcaMatrixDataset.DoDeleteRecord;
begin
Pass;
end;
procedure TcaMatrixDataset.GetBlobField(Field: TField; Stream: TStream);
begin
Pass;
end;
procedure TcaMatrixDataset.SetBlobField(Field: TField; Stream: TStream);
begin
Pass;
end;
procedure TcaMatrixDataset.SetFieldValue(Field: TField; Value: Variant);
begin
// TODO: SetFieldValue
end;
// Buffer ID methods
function TcaMatrixDataset.AllocateRecordID: Pointer;
begin
Result := Pointer(FItemIndex);
end;
procedure TcaMatrixDataset.DisposeRecordID(Value: Pointer);
begin
Pass;
end;
procedure TcaMatrixDataset.GotoRecordID(Value: Pointer);
begin
FItemIndex := Integer(Value);
end;
// BookMark functions
function TcaMatrixDataset.GetBookMarkSize: Integer;
begin
Result := 0;
end;
procedure TcaMatrixDataset.AllocateBookMark(RecordID: Pointer; Bookmark: Pointer);
begin
PInteger(Bookmark)^ := Integer(RecordID);
end;
procedure TcaMatrixDataset.DoGotoBookmark(Bookmark: Pointer);
begin
GotoRecordID(Pointer(PInteger(Bookmark)^));
end;
// Navigation methods
function TcaMatrixDataset.Navigate(GetMode: TGetMode): TGetResult;
begin
if RecordCount < 1 then
Result := grEOF
else
begin
Result := grOK;
case GetMode of
gmNext:
begin
if FItemIndex >= RecordCount - 1 then
Result := grEOF
else
Inc(FItemIndex);
end;
gmPrior:
begin
if FItemIndex <= 0 then
begin
Result := grBOF;
FItemIndex := -1;
end
else
Dec(FItemIndex);
end;
gmCurrent:
if (FItemIndex < 0) or (FItemIndex >= RecordCount) then
Result := grError;
end;
end;
end;
procedure TcaMatrixDataset.DoFirst;
begin
FItemIndex := -1;
end;
procedure TcaMatrixDataset.DoLast;
begin
FItemIndex := RecordCount;
end;
// Overridden methods from TDataset
function TcaMatrixDataset.GetRecordCount: Integer;
begin
Result := 0;
// Result := FBizObject.List.Count;
end;
function TcaMatrixDataset.GetRecNo: Integer;
begin
UpdateCursorPos;
if (FItemIndex = -1) and (RecordCount > 0) then
Result := 1
else
Result := FItemIndex + 1;
end;
procedure TcaMatrixDataset.CreateFields;
// var
// Column: TnnBizColumn;
// Field: TField;
// Schema: TnnBizSchema;
// Index: Integer;
begin
inherited;
// Schema := FBizObject.Schema;
// for Index := 0 to FieldCount - 1 do
// begin
// Field := Fields[Index];
// Column := Schema.ColByName(Field.FieldName);
// Field.DisplayLabel := Column.ColumnCaption;
// end;
end;
procedure TcaMatrixDataset.DoAfterPost;
begin
inherited;
end;
procedure TcaMatrixDataset.DoBeforePost;
begin
inherited;
end;
procedure TcaMatrixDataset.SetRecNo(Value: Integer);
begin
if (Value > 0) and (Value < RecordCount) then
begin
FItemIndex := Value - 1;
Resync([]);
end;
end;
// Other protected methods
procedure TcaMatrixDataset.DoGetItemValue(const AColumnName: string; ARow: Integer; var AValue: Variant);
begin
inherited;
end;
procedure TcaMatrixDataset.DoLoadXMLData;
begin
inherited;
end;
procedure TcaMatrixDataset.DoSetItemValue(const AColumnName: string; ARow: Integer; var AValue: Variant);
begin
inherited;
end;
// Property methods
function TcaMatrixDataset.GetFileName: String;
begin
Result := FFileName;
end;
procedure TcaMatrixDataset.SetFileName(const Value: String);
begin
FFileName := Value;
end;
end.
|
unit bFormatter;
interface
uses system.sysutils, strutils;
type
TFormatter = class
private
class function formatType(v: string): string;
class function unformatType(v: string): string;
class function parseType(inputedType: string): string;
public
class function parseModel(v: string): string;
class function parseController(v: string): string;
class function parseDAO(v: string): string;
class function modelFromTable(tableName: string): string;
class function controllerFromTable(tableName: string): string;
class function daoFromTable(tableName: string): string;
class function tableFromModel(model: string): string;
class function tableFromController(controller: string): string;
class function tableFromDAO(dao: string): string;
class function replace(value, value_to_find: string; value_to_replace: string = ''): string;
end;
implementation
{ TFormatter }
class function TFormatter.replace(value, value_to_find: string; value_to_replace: string = ''): string;
begin
Result := StringReplace(value, value_to_find, value_to_replace, [rfReplaceAll, rfIgnoreCase]);
end;
class function TFormatter.tableFromController(controller: string): string;
begin
Result := '';
if controller = '' then
raise Exception.Create('Controller name must be filled.');
Result := unformatType(copy(controller, 1, length(controller) - length('Controller')));
end;
class function TFormatter.tableFromDAO(dao: string): string;
begin
Result := '';
if dao = '' then
raise Exception.Create('DAO name must be filled.');
Result := unformatType(copy(dao, 1, length(dao) - length('DAO')));
end;
class function TFormatter.tableFromModel(model: string): string;
begin
Result := '';
if model = '' then
raise Exception.Create('Model name must be filled.');
Result := unformatType(model);
end;
class function TFormatter.unformatType(v: string): string;
var
I: integer;
begin
Result := '';
Result := LowerCase(v[2]);
for I := 3 to length(v) do
Result := Result + ifthen(v[I] = LowerCase(v[I]), v[I], '_' + LowerCase(v[I]));
end;
class function TFormatter.controllerFromTable(tableName: string): string;
begin
Result := '';
if tableName = '' then
raise Exception.Create('Table name must be filled.');
Result := 'T' + formatType(copy(tableName, 1, length(tableName))) + 'Controller';
end;
class function TFormatter.daoFromTable(tableName: string): string;
begin
Result := '';
if tableName = '' then
raise Exception.Create('Table name must be filled.');
Result := 'T' + formatType(copy(tableName, 1, length(tableName))) + 'DAO';
end;
class function TFormatter.formatType(v: string): string;
var
I: integer;
begin
Result := uppercase(v[1]);
for I := 2 to length(v) do
begin
if v[I] = '_' then
begin
Result := Result + formatType(copy(v, I + 1, length(v)));
exit;
end
else
Result := Result + LowerCase(v[I]);
end;
end;
class function TFormatter.modelFromTable(tableName: string): string;
begin
Result := '';
if tableName = '' then
raise Exception.Create('Table name must be filled.');
Result := 'T' + formatType(copy(tableName, 1, length(tableName)));
end;
class function TFormatter.parseController(v: string): string;
begin
Result := TFormatter.formatType(TFormatter.unformatType(copy(v, 1, length(v) - length('controller')))) + 'Controller';
end;
class function TFormatter.parseDAO(v: string): string;
begin
Result := TFormatter.formatType(TFormatter.unformatType(copy(v, 1, length(v) - length('dao')))) + 'DAO';
end;
class function TFormatter.parseModel(v: string): string;
begin
Result := TFormatter.formatType(TFormatter.unformatType(v));
end;
class function TFormatter.parseType(inputedType: string): string;
begin
Result := TFormatter.formatType(TFormatter.unformatType(inputedType));
end;
end.
|
unit DebitPosting;
interface
uses
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
Vcl.Controls, Vcl.Forms, Vcl.Dialogs, BasePopup, Vcl.StdCtrls, RzLabel,
Vcl.Imaging.pngimage, Vcl.ExtCtrls, RzPanel, System.Rtti, DateUtils, Math;
type
TDiminishingType = (dtNone, dtScheduled, dtFixed);
TActiveLoan = class
strict private
FId: string;
FTerm: smallint;
FAmortization: currency;
FInterestRate: currency;
FReleaseAmount: currency;
FIsDiminishing: boolean;
FDiminishingType: TDiminishingType;
private
FReleaseDate: TDateTime;
public
property Id: string read FId write FId;
property ReleaseAmount: currency read FReleaseAmount write FReleaseAmount;
property Term: smallint read FTerm write FTerm;
property InterestRate: currency read FInterestRate write FInterestRate;
property IsDiminishing: boolean read FIsDiminishing write FIsDiminishing;
property Amortization: currency read FAmortization write FAmortization;
property DiminishingType: TDiminishingType read FDiminishingType write FDiminishingType;
property ReleaseDate: TDateTime read FReleaseDate write FReleaseDate;
end;
TfrmDebitPosting = class(TfrmBasePopup)
private
{ Private declarations }
procedure PostPrincipalDebit;
procedure PostInterestDebit;
function PostEntry(const refPostingId: string;
const debit, credit: currency; const eventObject, primaryKey, status: string;
const postDate, valueDate: TDateTime; const caseType: string): string;
function PostInterest(const interest: currency; const loanId: string;
const ADate: TDateTime; const source, status: string): string; overload;
function GetFirstDayOfValueDate(const ADate: TDateTime): TDateTime;
public
{ Public declarations }
end;
implementation
{$R *.dfm}
uses
AccountingData, IFinanceGlobal, AppConstants, IFinanceDialogs, DBUtil,
LoanClassification;
{ TfrmDebitPosting }
function TfrmDebitPosting.GetFirstDayOfValueDate(
const ADate: TDateTime): TDateTime;
var
month, day, year: word;
begin
DecodeDate(ADate,year,month,day);
Result := EncodeDate(year,month,1);
end;
function TfrmDebitPosting.PostEntry(const refPostingId: string; const debit,
credit: currency; const eventObject, primaryKey, status: string;
const postDate, valueDate: TDateTime; const caseType: string): string;
var
postingId: string;
begin
try
with dmAccounting.dstLedger do
begin
Append;
postingId := GetLedgerId;
FieldByName('posting_id').AsString := postingId;
if refPostingId <> '' then FieldByName('ref_posting_id').AsString := refPostingId;
FieldByName('loc_prefix').AsString := ifn.LocationPrefix;
if debit > 0 then FieldByName('debit_amt').AsCurrency := debit;
if credit > 0 then FieldByName('credit_amt').AsCurrency := credit;
FieldByName('pk_event_object').AsString := primaryKey;
FieldByName('event_object').AsString := eventObject;
FieldByName('status_code').AsString := status;
FieldByName('post_date').AsDateTime := postDate;
FieldByName('value_date').AsDateTime := valueDate;
if caseType <> '' then FieldByName('case_type').AsString := caseType;
Post;
end;
Result := postingId;
except
on E: Exception do ShowErrorBox(E.Message);
end;
end;
function TfrmDebitPosting.PostInterest(const interest: currency;
const loanId: string; const ADate: TDateTime; const source,
status: string): string;
begin
end;
procedure TfrmDebitPosting.PostInterestDebit;
begin
end;
procedure TfrmDebitPosting.PostPrincipalDebit;
var
refPostingId: string;
principal, interest, balance, credit: currency;
eventObject, primaryKey, caseType, status: string;
postDate, valueDate, runningDate: TDateTime;
i, cnt: integer;
LLoan: TActiveLoan;
vy, vm, vd, yy, mm, dd: word;
begin
refPostingId := '';
credit := 0;
eventObject := TRttiEnumerationType.GetName<TEventObjects>(TEventObjects.LON);
caseType := TRttiEnumerationType.GetName<TCaseTypes>(TCaseTypes.PRC);
valuedate := GetFirstDayOfValueDate(ifn.AppDate);
postDate := ifn.AppDate;
status := TRttiEnumerationType.GetName<TLedgerRecordStatus>(TLedgerRecordStatus.OPN);
DecodeDate(ifn.AppDate,yy,mm,dd);
LLoan := TActiveLoan.Create;
dmAccounting := TdmAccounting.Create(nil);
try
try
dmAccounting.dstLedger.Open;
with dmAccounting.dstPrincipalDebit do
begin
Open;
LLoan.Id := FieldByName('loan_id').AsString;
LLoan.Term := FieldByName('terms').AsInteger;
LLoan.Amortization := FieldByName('amort').AsCurrency;
LLoan.InterestRate := FieldByName('int_rate').AsCurrency / 100;
LLoan.ReleaseAmount := FieldByName('rel_amt').AsCurrency;
LLoan.IsDiminishing := FieldByName('int_comp_method').AsString = 'D';
LLoan.DiminishingType := TDiminishingType(FieldByName('dim_type').AsInteger);
LLoan.ReleaseDate := FieldByName('date_rel').AsDateTime;
while not Eof do
begin
primaryKey := LLoan.Id;
balance := LLoan.ReleaseAmount;
cnt := LLoan.Term;
i := 1;
while (i <= cnt) and (mm <> vm) and (yy <> vy) do
begin
runningDate := IncMonth(LLoan.ReleaseDate,i);
// interest
if LLoan.isDiminishing then interest := balance * LLoan.InterestRate
else interest := LLoan.ReleaseAmount * LLoan.InterestRate;
// round off to 2 decimal places
interest := RoundTo(interest,-2);
// principal
// use the balance for the last amount to be posted..
// this ensures sum of principal is equal to the loan amount released
if i < cnt then principal := LLoan.Amortization - interest
else principal := balance;
DecodeDate(runningDate,vy,vm,vd);
// for principal entries.. use the first day of the month
if (mm = vm) and (yy = vy) then
PostEntry(refPostingId, principal, credit, eventObject, primaryKey, status,
postDate, valueDate, caseType);
// get balance
balance := balance - principal;
Inc(i);
end;
Next;
end;
UpdateBatch;
end;
except
on E: Exception do
begin
dmAccounting.dstLedger.CancelBatch;
ShowErrorBox(E.Message);
Abort;
end;
end;
finally
dmAccounting.dstLedger.Close;
LLoan.Free;
dmAccounting.Free;
end;
end;
end.
|
{$A+,B-,D+,E-,F-,G+,I+,L+,N+,O-,P-,Q-,R-,S-,T-,V+,X+,Y+}
{$M 1024,0,0}
{
by Behdad Esfahbod
Algorithmic Problems Book
September '1999
Problem 37 O(N3) Karp's Algorithm
}
program
MinimumAverageWeightCycle;
const
MaxN = 100;
NoEdge = 10000;
var
N, S : Integer;
G, P, Ans : array [0 .. MaxN, 0 .. MaxN] of Integer;
I, J, K, Q, L : Integer;
MAWC, T, T2 : Real;
Flag : Boolean;
F : Text;
procedure ReadInput;
begin
Assign(F, 'input.txt');
Reset(F);
Readln(F, N);
FillChar(P, SizeOf(P), 40);
FillChar(G, SizeOf(G), 127);
S := 1;
P[S, 0] := 0;
Ans[S, 0] := S;
for I := 1 to N do
begin
for J := 1 to N do
Read(F, G[I, J]);
Readln(F);
end;
Close(F);
end;
procedure WriteOutput;
begin
Assign(F, 'output.txt');
Rewrite(F);
if MAWC >= 100 then
Writeln(F, 'The Graph is Acyclic')
else
begin
Writeln(F, MAWC : 0 : 2);
if I <> 0 then
begin
J := 1;
T := 0;
repeat
G[J, 0] := K;
Inc(J);
K := Ans[K, L];
Dec(L);
until K = I;
G[J, 0] := G[1, 0];
for I := J downto 2 do
begin
Writeln(F, G[I, 0]);
T := T + G[G[I, 0], G[I - 1, 0]];
end;
if T / (J - 1) <> MAWC then
begin
Writeln(F, 'Error : The Weight Of Cycle is ', T / (J - 1) : 0 : 2);
Write(#7);
end;
end;
end;
Close(F);
end;
procedure MinAveWeiCycle;
begin
L := 0;
repeat
Inc(L);
Flag := True;
for I := 1 to N do
begin
for J := 1 to I - 1 do
begin
if (G[I, J] + P[I, L - 1] < P[J, L]) then
begin
P[J, L] := G[I, J] + P[I, L - 1];
Ans[J, L] := I;
Flag := False;
end;
if (G[J, I] + P[J, L - 1] < P[I, L]) then
begin
P[I, L] := G[J, I] + P[J, L - 1];
Ans[I, L] := J;
Flag := False;
end;
end;
end;
until (L = N) or Flag;
MAWC := NoEdge;
for I := 1 to N do
begin
T2 := (P[I, N] - P[I, 0]) / N;
L := 0;
for J := 1 to N - 1 do
begin
T := (P[I, N] - P[I, J]) / (N - J);
if T > T2 then
begin
T2 := T;
L := J;
end;
end;
if T2 < MAWC then
begin
MAWC := T2;
Q := I;
end;
end;
FillChar(G[0], SizeOf(G[0]), 0);
K := Q; I := 0; L := N; J := L;
while J >= 0 do
begin
if G[0, K] = 1 then
begin
I := K;
Break;
end;
G[0, K] := 1;
K := Ans[K, J];
Dec(J);
end;
if I <> 0 then
begin
K := Q;
while K <> I do
begin
K := Ans[K, L];
Dec(L);
end;
end;
end;
begin
ReadInput;
MinAveWeiCycle;
WriteOutput;
end.
|
unit System.NetEncoding.Base64Url;
interface
uses
System.SysUtils, System.Classes, System.NetEncoding;
type
TBase64UrlEncoding = class(TBase64Encoding)
protected
function DoDecode(const Input, Output: TStream): NativeInt; override;
function DoDecode(const Input: array of Byte): TBytes; overload; override;
function DoEncode(const Input, Output: TStream): NativeInt; override;
function DoEncode(const Input: array of Byte): TBytes; overload; override;
function DoDecodeStringToBytes(const Input: string): TBytes; override;
function DoEncodeBytesToString(const Input: Pointer; Size: Integer): string;
overload; override;
end;
TNetEncodingHelper = class helper for TNetEncoding
private
class var FBase64UrlEncoding: TNetEncoding;
class function GetBase64UrlEncoding: TNetEncoding; static;
public
class destructor Destroy;
class property Base64Url: TNetEncoding read GetBase64UrlEncoding;
end;
implementation
uses System.RTLConsts;
function TBase64UrlEncoding.DoDecode(const Input: array of Byte): TBytes;
begin
var s: TBytes;
SetLength(s, Length(Input));
var c: Byte;
var i: Integer;
for i := Low(Input) to High(Input) do begin
c := Input[i];
if c = $2D{-} then
s[i] := $2B{+}
else if c = $5F{_} then
s[i] := $2F{/}
else
s[i] := c;
end;
var iPadding := 4 - Length(Input) mod 4;
if iPadding = 1 then
s := s + [$3D{=}]
else if iPadding = 2 then
s := s + [$3D{=}, $3D{=}];
Result := inherited DoDecode(s);
end;
function TBase64UrlEncoding.DoDecode(const Input, Output: TStream): NativeInt;
begin
raise Exception.CreateResFmt(@StrEActionNoSuported, [ClassName]);
end;
function TBase64UrlEncoding.DoDecodeStringToBytes(const Input: string): TBytes;
begin
var s := Input;
var c: Char;
var i: Integer;
for i := 0 to s.Length - 1 do begin
c := s[i];
if c = '-' then
s[i] := '+'
else if c = '_' then
s[i] := '/'
end;
var iPadding := 4 - Input.Length mod 4;
if iPadding = 1 then
s := s + '='
else if iPadding = 2 then
s := s + '==';
Result := inherited DoDecodeStringToBytes(s);
end;
function TBase64UrlEncoding.DoEncode(const Input, Output: TStream): NativeInt;
begin
raise Exception.CreateResFmt(@StrEActionNoSuported, [ClassName]);
end;
function TBase64UrlEncoding.DoEncode(const Input: array of Byte): TBytes;
begin
Result := inherited;
var c: Byte;
var i: Integer;
for i := Low(Result) to High(Result) do begin
c := Result[i];
if c = $2B {+} then
Result[i] := $2D {-}
else if c = $2F {/} then
Result[i] := $5F{_}
else if c = $3D{=} then Break;
end;
if (i <= Length(Result)) then SetLength(Result, i);
end;
function TBase64UrlEncoding.DoEncodeBytesToString(const Input: Pointer; Size:
Integer): string;
begin
var s := inherited;
var c: Char;
var i: Integer;
for i := 1 to s.Length do begin
c := s[i];
if c = '+' then
s[i] := '-'
else if c = '/' then
s[i] := '_'
else if c = '=' then Break;
end;
if (i <= s.Length) then SetLength(s, i - 1);
Result := s;
end;
class function TNetEncodingHelper.GetBase64UrlEncoding: TNetEncoding;
var LEncoding: TBase64Encoding;
begin
if FBase64UrlEncoding = nil then
begin
LEncoding := TBase64UrlEncoding.Create(0);
if AtomicCmpExchange(Pointer(FBase64UrlEncoding), Pointer(LEncoding), nil) <> nil then
LEncoding.Free
{$IFDEF AUTOREFCOUNT}
else
FBase64UrlEncoding.__ObjAddRef
{$ENDIF AUTOREFCOUNT};
end;
Result := FBase64UrlEncoding;
end;
class destructor TNetEncodingHelper.Destroy;
begin
FreeAndNil(FBase64UrlEncoding);
end;
end.
|
unit IdDNSResolver;
interface
uses
Classes,
IdResourceStrings,
SysUtils,
IdGlobal,
IdUDPClient;
const
IdDNSResolver_ReceiveTimeout = 4000;
const
//fBitCode Bits and Masks
cQRBit = $8000; //QR when 0 = Question when 1 Response
cQRMask = $EFFF;
cOpCodeBits = $7800; //Operation Code See Constansts Defined Below
cOpCodeMask = $87FF;
cAABit = $0400; //Valid in Responses Authoritative Answer if set (1)
cAAMask = $FBFF;
cTCBit = $0200; //Truncation Bit if Set Messages was truncated for length
cTCMask = $FDFF;
cRDBit = $0100; //If set(1) Recursive Search is Resquested by Query
cRDMask = $FEFF;
cRABit = $0080; //If set(1) Server supports Recursive Search (Available)
cRAMask = $FF7F;
cRCodeBits = $000F; //Response Code. See Constansts Defined Below
cRCodeMask = $FFF0;
//Question Operation Code Values
cResQuery = 0;
cResIQuery = 1;
cResStatus = 2;
cOPCodeStrs: array[cResQuery..cResStatus] of string[7] =
('Query',
'IQuery',
'Status');
// QType Identifes the type of Question
cA = 1; // a Host Address
cNS = 2; // An Authoritative name server
cMD = 3; // A mail destination obsolete use MX (OBSOLETE)
cMF = 4; // A mail forwarder obsolete use MX (OBSOLETE)
cName = 5; // The canonical name for an alias
cSOA = 6; // Marks the start of a zone of authority
cMB = 7; // A mail box domain name (Experimental)
cMG = 8; // A mail group member (Experimental)
cMR = 9; // A mail Rename Domain Name (Experimental)
cNULL = 10; // RR (Experimental)
cWKS = 11; // A well known service description
cPTR = 12; // A Domain Name Pointer;
cHINFO = 13; // Host Information;
cMINFO = 14; // Mailbox or Mail List Information;
cMX = 15; // Mail Exchange
cTXT = 16; // Text String;
cAXFR = 252; // A Request for the Transfer of an entire zone;
cMAILB = 253; // A request for mailbox related records (MB MG OR MR}
cMAILA = 254; // A request for mail agent RRs (Obsolete see MX)
cStar = 255; // A Request for all Records
//QClass
cIN = 1; //The Internet
cCS = 2; // the CSNet Obsolete
cCH = 3; // The Chaos Claee
cHS = 4; // Hesiod [Dyer 87]
//CStar any Class is same as QType for all records;
cQClassStr: array[cIN..CHs] of string[3] =
('IN', 'CS', 'CH', 'HS');
//Sever Response codes (RCode)
cRCodeNoError = 0;
cRCodeFormatErr = 1;
cRCodeServerErr = 2;
cRCodeNameErr = 3;
cRCodeNotImplemented = 4;
cRCodeRefused = 5;
cRCodeStrs: array[cRCodeNoError..cRCodeRefused] of string =
(RSCodeNoError,
RSCodeQueryFormat,
RSCodeQueryServer,
RSCodeQueryName,
RSCodeQueryNotImplemented,
RSCodeQueryQueryRefused);
type
TWKSBits = array[0..7] of byte;
TRequestedRecord = cA..cStar;
TRequestedRecords = set of TRequestedRecord;
TIdDNSHeader = class(TObject)
protected
FAnCount: Word;
FArCount: Word;
FBitCode: Word;
FId: Word;
FQdCount: Word;
FNsCount: Word;
function GetAA: Boolean;
function GetOpCode: Word;
function GetQr: Boolean;
function GetRA: Boolean;
function GetRCode: Word;
function GetRD: Boolean;
function GetTC: Boolean;
procedure InitializefId;
procedure SetAA(AuthAnswer: Boolean);
procedure SetOpCode(OpCode: Word);
procedure SetQr(IsResponse: Boolean);
procedure SetRA(RecursionAvailable: Boolean);
procedure SetRCode(RCode: Word);
procedure SetRD(RecursionDesired: Boolean);
procedure SetTC(IsTruncated: Boolean);
public
constructor Create;
procedure InitVars; virtual;
//
property AA: boolean read GetAA write SetAA;
property ANCount: Word read FAnCount write FAnCount;
property ARCount: Word read FArCount write FArCount;
property ID: Word read FId write FId;
property NSCount: Word read FNsCount write FNsCount;
property Opcode: Word read GetOpCode write SetOpCode;
property QDCount: Word read FQdCount write FQdCount;
property Qr: Boolean read GetQr write SetQr;
property RA: Boolean read GetRA write SetRA;
property RCode: Word read GetRCode write SetRCode;
property RD: Boolean read GetRD write SetRD;
property TC: Boolean read GetTC write SetTC;
end;
TQuestionItem = class(TCollectionItem)
public
QClass: Word;
QName: string;
QType: Word;
end;
TIdDNSQuestionList = class(TCollection)
protected
function GetItem(Index: Integer): TQuestionItem;
procedure SetItem(Index: Integer; const Value: TQuestionItem);
public
constructor Create; reintroduce;
function Add: TQuestionItem;
property Items[Index: Integer]: TQuestionItem read GetItem write SetItem;
default;
end;
THInfo = record
CPUStr: ShortString;
OsStr: ShortString;
end;
TMInfo = record
EMailBox: ShortString;
RMailBox: ShortString;
end;
TMX = record
Exchange: ShortString;
Preference: Word;
end;
TSOA = record
Expire: Cardinal;
Minimum: Cardinal;
MName: ShortString;
Refresh: Cardinal;
Retry: Cardinal;
RName: ShortString;
Serial: Cardinal;
end;
TWKS = record
Address: Cardinal;
Bits: TWKSBits;
Protocol: byte;
end;
TRdata = record
DomainName: string;
HInfo: THInfo;
MInfo: TMInfo;
MX: TMx;
SOA: TSOA;
A: Cardinal;
WKS: TWks;
Data: string;
HostAddrStr: string;
end;
TIdDNSResourceItem = class(TCollectionITem)
public
AType: Word;
AClass: Word;
Name: string;
RData: TRData;
RDLength: Word;
TTL: Cardinal;
StarData: string;
end;
TIdDNSResourceList = class(TCollection)
protected
function GetItem(Index: Integer): TIdDNSResourceItem;
procedure SetItem(Index: Integer; const Value: TIdDNSResourceItem);
public
function Add: TIdDNSResourceItem;
constructor Create; reintroduce;
property Items[Index: Integer]: TIdDNSResourceItem read GetItem write
SetItem; default;
published
function GetDNSMxExchangeNameEx(Idx: Integer): string;
function GetDNSRDataDomainName(Idx: Integer): string;
end;
TMXRecord = class(TIdDNSResourceItem)
protected
FPreference: Word;
FExchange: string;
public
property Preference: Word read FPreference;
property Exchange: string read FExchange;
end;
TARecord = class(TIdDNSResourceItem)
protected
FDomainName: string;
public
property DomainName: string read FDomainName;
end;
TNameRecord = class(TIdDNSResourceItem)
protected
FDomainName: string;
public
property DomainName: string read FDomainName;
end;
TPTRRecord = class(TIdDNSResourceItem)
protected
FDomainName: string;
public
property DomainName: string read FDomainName;
end;
THInfoRecord = class(TIdDNSResourceItem)
protected
FCPUStr: string;
FOsStr: string;
public
property CPUStr: string read FCPUStr;
property OsStr: string read FOsStr;
end;
TMInfoRecord = class(TIdDNSResourceItem)
protected
FEMmailBox: string;
FRMailBox: string;
public
property EMmailBox: string read FEMmailBox;
property RMailBox: string read FRMailBox;
end;
TMRecord = class(TIdDNSResourceItem)
protected
FEMailBox: string;
FRMailBox: string;
public
property EMailBox: string read FEMailBox;
property RMailBox: string read FRMailBox;
end;
TSOARecord = class(TIdDNSResourceItem)
protected
FExpire: Cardinal;
FMinimum: Cardinal;
FMName: string;
FRefresh: Cardinal;
FRetry: Cardinal;
FRName: string;
FSerial: Cardinal;
public
property Expire: Cardinal read FExpire;
property Minimum: Cardinal read FMinimum;
property MName: string read FMName;
property Refresh: Cardinal read FRefresh;
property Retry: Cardinal read FRetry;
property RName: string read FRName;
property Serial: Cardinal read FSerial;
end;
TWKSRecord = class(TIdDNSResourceItem)
protected
FAddress: Cardinal;
FBits: TWKSBits;
FProtocol: byte;
function GetBits(AIndex: Integer): Byte;
public
property Address: Cardinal read FAddress;
property Bits[AIndex: Integer]: Byte read GetBits;
property Protocol: byte read FProtocol;
end;
TIdDNSResolver = class(TIdUDPClient)
protected
FDNSAnList: TIdDNSResourceList;
FDNSArList: TIdDNSResourceList;
FDNSHeader: TIdDNSHeader;
FDNSQdList: TIdDNSQuestionList;
FDNSNsList: TIdDNSResourceList;
FQPacket: string;
FRPacket: string;
FQPackSize: Integer;
FRequestedRecords: TRequestedRecords;
FRPackSize: Integer;
FAnswers: TIdDNSResourceList;
function CreateLabelStr(QName: string): string;
procedure CreateQueryPacket;
procedure DecodeReplyPacket;
public
procedure ClearVars; virtual;
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
procedure ResolveDNS;
procedure ResolveDomain(const ADomain: string);
property Answers: TIdDNSResourceList read FAnswers;
property DNSAnList: TIdDNSResourceList read FDnsAnList write FDnsAnList;
property DNSARList: TIdDNSResourceList read FDnsArList write FDnsArList;
property DNSHeader: TIdDNSHeader read FDNSHeader write FDNSHeader;
property DNSQDList: TIdDNSQuestionList read FDnsQdList write FDnsQdList;
property DNSNSList: TIdDNSResourceList read FDnsNsList write FDnsNsList;
property Port default IdPORT_DOMAIN;
property QPacket: string read FQPacket write FQpacket;
property RequestedRecords: TRequestedRecords read FRequestedRecords write
FRequestedRecords;
property RPacket: string read FRPacket write FRPacket;
property ReceiveTimeout default IdDNSResolver_ReceiveTimeout;
end;
HiLoBytes = record
HiByte: Byte;
LoByte: Byte;
end;
WordRec = record
case byte of
1: (TheBytes: HiLoBytes);
2: (AWord: Word);
end;
HiLoWords = record
HiWord,
LowWord: Word;
end;
CardinalRec = record
case Byte of
1: (aCardinal: Cardinal);
2: (Words: HILoWords);
end;
function GetQTypeStr(aQType: Integer): string;
function GetQClassStr(QClass: Integer): string;
implementation
uses
IdException;
function TwoCharToWord(AChar1, AChar2: Char): Word;
begin
Result := Word((Ord(AChar1) shl 8) and $FF00) or Word(Ord(AChar2) and $00FF);
end;
function FourCharToCardinal(AChar1, AChar2, AChar3, AChar4: Char): Cardinal;
var
ARes: CardinalRec;
begin
ares.Words.HiWord := TwoCharToWord(AChar1, AChar2);
aRes.Words.LowWord := TwoCharToWord(AChar3, AChar4);
Result := ARes.aCardinal;
end;
function WordToTwoCharStr(AWord: Word): string;
begin
Result := Chr(Hi(AWord)) + Chr(Lo(AWord));
end;
function GetRCodeStr(RCode: Integer): string;
begin
if Rcode in [cRCodeNoError..cRCodeRefused] then
begin
Result := cRCodeStrs[Rcode];
end
else
begin
Result := RSCodeQueryUnknownError;
end;
end;
function GetQTypeStr(aQType: Integer): string;
begin
case AQType of
cA: Result := 'A'; // a Host Address
cNS: Result := 'NS'; // An Authoritative name server
cMD: Result := 'MD'; // A mail destination obsolete use MX (OBSOLETE)
cMF: Result := 'MF'; // A mail forwarder obsolete use MX (OBSOLETE)
cName: Result := 'NAME'; // The canonical name for an alias
cSOA: Result := 'SOA'; // Marks the start of a zone of authority
cMB: Result := 'MB'; // A mail box domain name (Experimental)
cMG: Result := 'MG'; // A mail group member (Experimental)
cMR: Result := 'MR'; // A mail Rename Domain Name (Experimental)
cNULL: Result := 'NULL'; // RR (Experimental)
cWKS: Result := 'WKS'; // A well known service description
cPTR: Result := 'PTR'; // A Domain Name Pointer;
cHINFO: Result := 'HINFO'; // Host Information;
cMINFO: Result := 'MINFO'; // Mailbox or Mail List Information;
cMX: Result := 'MX'; // Mail Exchange
cTXT: Result := 'TXT'; // Text String;
cAXFR: Result := 'AXFR'; // A Request for the Transfer of an entire zone;
cMAILB: Result := 'MAILB';
// A request for mailbox related records (MB MG OR MR}
cMAILA: Result := 'MAILA'; // A request for mail agent RRs (Obsolete see MX)
cStar: Result := '*'; // A Request for all Records
else
Result := IntToSTr(aQType);
end;
end;
function GetQClassStr(QClass: Integer): string;
begin
if QClass in [cIN..CHs] then
begin
Result := cQClassStr[QClass];
end
else
begin
if QClass = 15 then
begin
Result := 'MX';
end
else
begin
Result := IntToStr(QClass);
end;
end;
end;
function GetErrorStr(Code, Id: Integer): string;
begin
case code of
1: Result := Format(RSQueryInvalidQueryCount, [Id]);
2: Result := Format(RSQueryInvalidPacketSize, [InttoSTr(Id)]);
3: Result := Format(RSQueryLessThanFour, [Id]);
4: Result := Format(RSQueryInvalidHeaderID, [Id]);
5: Result := Format(RSQueryLessThanTwelve, [Id]);
6: Result := Format(RSQueryPackReceivedTooSmall, [Id]);
end;
end;
constructor TIdDNSHeader.Create;
begin
inherited Create;
InitialIzeFid;
end;
procedure TIdDNSHeader.InitializefId;
begin
Randomize;
fId := Random(10000);
end;
procedure TIdDNSHeader.InitVars;
begin
fBitCode := 0;
{ Holds Qr,OPCode AA TC RD RA RCode and Reserved Bits }
fQdCount := 0;
{ Number of Question Entries in Question Section }
fAnCount := 0;
{ Number of Resource Records in Answer Section }
fNsCount := 0;
{ Number of Name Server Resource Recs in Authority Rec Section }
fArCount := 0;
{ Number of Resource Records in Additional records Section }
end;
function TIdDNSHeader.GetQR: Boolean;
begin
Result := (fBitCode and cQRBit) = cQRBit;
end;
procedure TIdDNSHeader.SetQr(IsResponse: Boolean);
begin
if IsResponse then
begin
fBitCode := fBitCode or cQRBit;
end
else
begin
fBitCode := fBitCode and cQRMask
end;
end;
function TIdDNSHeader.GetOpCode: Word;
begin
Result := ((fBitCode and cOpCodeBits) shr 11) and $000F;
end;
procedure TIdDNSHeader.SetOpCode(OpCode: Word);
begin
fBitCode := ((OpCode shl 11) and cOpCodeBits) or
(fBitCode and cOpCodeMask);
end;
function TIdDNSHeader.GetAA: Boolean;
begin
Result := (fBitCode and cAABit) = cAABit;
end;
procedure TIdDNSHeader.SetAA(AuthAnswer: Boolean);
begin
if AuthAnswer then
begin
fBitCode := fBitCode or cAABit;
end
else
begin
fBitCode := fBitCode and cAAMask;
end;
end;
function TIdDNSHeader.GetTC: Boolean;
begin
Result := (fBitCode and cTCBit) = cTCBit;
end;
procedure TIdDNSHeader.SetTC(IsTruncated: Boolean);
begin
if IsTruncated then
begin
fBitCode := fBitCode or cTCBit;
end
else
begin
fBitCode := fBitCode and cTCMask;
end;
end;
function TIdDNSHeader.GetRD: Boolean;
begin
Result := (fBitCode and cRDBit) = cRDBit;
end;
procedure TIdDNSHeader.SetRD(RecursionDesired: Boolean);
begin
if RecursionDesired then
begin
fBitCode := fBitCode or cRDBit;
end
else
begin
fBitCode := fBitCode and cRDMask;
end;
end;
function TIdDNSHeader.GetRA: Boolean;
begin
Result := (fBitCode and cRABit) = cRABit;
end;
procedure TIdDNSHeader.SetRA(RecursionAvailable: Boolean);
begin
if RecursionAvailable then
begin
fBitCode := fBitCode or cRABit;
end
else
begin
fBitCode := fBitCode and cRAMask;
end;
end;
function TIdDNSHeader.GetRCode: Word;
begin
Result := (fBitCode and cRCodeBits);
end;
procedure TIdDNSHeader.SetRCode(RCode: Word);
begin
fBitCode := (RCode and cRCodeBits) or (fBitCode and cRCodeMask);
end;
function TIdDNSQuestionList.Add: TQuestionItem;
begin
Result := TQuestionItem(inherited Add);
end;
constructor TIdDNSQuestionList.Create;
begin
inherited Create(TQuestionItem);
end;
function TIdDNSQuestionList.GetItem(Index: Integer): TQuestionItem;
begin
Result := TQuestionItem(inherited Items[Index]);
end;
procedure TIdDNSQuestionList.SetItem(Index: Integer;
const Value: TQuestionItem);
begin
inherited SetItem(Index, Value);
end;
constructor TIdDNSResourceList.Create;
begin
inherited Create(TIdDNSResourceItem);
end;
function TIdDNSResourceList.GetDNSRDataDomainName(Idx: Integer): string;
begin
if (Idx < Count) and (Idx >= 0) then
begin
Result := TIdDNSResourceItem(Items[Idx]).RData.DomainName;
end
else
Result := '';
end;
function TIdDNSResourceList.GetDnsMxExchangeNameEx(Idx: Integer): string;
begin
if (Idx < Count) and (Idx >= 0) then
begin
Result :=
IntToStr(TIdDNSResourceItem(Items[Idx]).RData.MX.Preference);
while Length(Result) < 5 do
begin
Result := ' ' + Result;
end;
Result :=
Result + ' ' + TIdDNSResourceItem(Items[Idx]).RData.MX.Exchange;
end
else
begin
Result := '';
end;
end;
function TIdDNSResourceList.Add: TIdDNSResourceItem;
begin
Result := TIdDNSResourceItem(inherited Add);
end;
function TIdDNSResourceList.GetItem(Index: Integer): TIdDNSResourceItem;
begin
Result := TIdDNSResourceItem(inherited Items[Index]);
end;
procedure TIdDNSResourceList.SetItem(Index: Integer;
const Value: TIdDNSResourceItem);
begin
inherited SetItem(Index, Value);
end;
constructor TIdDNSResolver.Create(aOwner: tComponent);
begin
inherited Create(aOwner);
Port := IdPORT_DOMAIN;
ReceiveTimeout := IdDNSResolver_ReceiveTimeout;
fDNSHeader := TIdDNSHeader.Create;
fDnsQdList := TIdDNSQuestionList.Create;
fDnsAnList := TIdDNSResourceList.Create;
fDnsNsList := TIdDNSResourceList.Create;
fDnsArList := TIdDNSResourceList.Create;
FAnswers := TIdDNSREsourceList.Create;
end;
destructor TIdDNSResolver.Destroy;
begin
fDNSHeader.Free;
fDnsQdList.Free;
fDnsAnList.Free;
fDnsNsList.Free;
fDnsArList.Free;
FAnswers.Free;
inherited Destroy;
end;
procedure TIdDNSResolver.ResolveDNS;
begin
try
CreateQueryPacket;
Send(QPacket);
fRPacket := ReceiveString;
finally DecodeReplyPacket;
end;
end;
procedure TIdDNSResolver.ClearVars;
begin
fDNSHeader.InitVars;
fDnsQdList.Clear;
fDnsAnList.Clear;
fDnsNsList.Clear;
fDnsArList.Clear;
end;
function TIdDNSResolver.CreateLabelStr(QName: string): string;
const
aPeriod = '.';
var
aLabel: string;
ResultArray: array[0..512] of Char;
NumBytes,
aPos,
RaIdx: Integer;
begin
Result := '';
FillChar(ResultArray, SizeOf(ResultArray), 0);
aPos := Pos(aPeriod, QName);
RaIdx := 0;
while (aPos <> 0) and ((RaIdx + aPos) < SizeOf(ResultArray)) do
begin
aLabel := Copy(QName, 1, aPos - 1);
NumBytes := Succ(Length(Alabel));
Move(aLabel, ResultArray[RaIdx], NumBytes);
Inc(RaIdx, NumBytes);
Delete(QName, 1, aPos);
aPos := Pos(aPeriod, QName);
end;
Result := string(ResultArray);
end;
procedure TIdDNSResolver.CreateQueryPacket;
var
QueryIdx: Integer;
DnsQuestion: TQuestionItem;
procedure DoDomainName(ADNS: string);
var
BufStr: string;
aPos: Integer;
begin
while Length(aDns) > 0 do
begin
aPos := Pos('.', aDns);
if aPos = 0 then
begin
aPos := Length(aDns) + 1;
end;
BufStr := Copy(aDns, 1, aPos - 1);
Delete(aDns, 1, aPos);
QPacket := QPacket + Chr(Length(BufStr)) + BufStr;
end;
end;
procedure DoHostAddress(aDNS: string);
var
BufStr,
BufStr2: string;
aPos: Integer;
begin
while Length(aDns) > 0 do
begin
aPos := Pos('.', aDns);
if aPos = 0 then
begin
aPos := Length(aDns) + 1;
end;
BufStr := Copy(aDns, 1, aPos - 1);
Delete(aDns, 1, aPos);
BufStr2 := Chr(Length(BufStr)) + BufStr + BufStr2;
end;
QPacket :=
QPacket + BufStr2 + Chr(07) + 'in-addr' + Chr(04) + 'arpa';
end;
begin
DNSHeader.fId := Random(62000);
DNSHeader.fQdCount := fDnsQdList.Count;
if DNSHeader.fQdCount < 1 then
begin
raise EIdDnsResolverError.Create(GetErrorStr(1, 1));
end;
QPacket := WordToTwoCharStr(DNSHeader.fId);
QPacket := QPacket + WordToTwoCharStr(DNSHeader.fBitCode);
QPacket := QPacket + WordToTwoCharStr(DNSHeader.fQdCount);
QPacket := QPacket + Chr(0) + Chr(0)
+ Chr(0) + Chr(0)
+ Chr(0) + Chr(0);
for QueryIdx := 0 to fDnsQdList.Count - 1 do
begin
DNsQuestion := fDnsQdList.Items[QueryIdx];
case DNSQuestion.Qtype of
cA: DoDomainName(DNsQuestion.QName);
cNS: DoDomainName(DNsQuestion.QName);
cMD: raise EIdDnsResolverError.Create(RSDNSMDISObsolete);
cMF: raise EIdDnsResolverError.Create(RSDNSMFIsObsolete);
cName: DoDomainName(DNsQuestion.QName);
cSOA: DoDomainName(DNsQuestion.Qname);
cMB: DoDomainName(DNsQuestion.QName);
cMG: DoDomainName(DNsQuestion.QName);
cMR: DoDomainName(DNsQuestion.QName);
cNULL: DoDomainName(DNsQuestion.QName);
cWKS: DoDomainName(DNsQuestion.QName);
cPTR: DoHostAddress(DNsQuestion.QName);
cHINFO: DoDomainName(DNsQuestion.QName);
cMINFO: DoDomainName(DNsQuestion.QName);
cMX: DoDomainName(DNsQuestion.QName);
cTXT: DoDomainName(DNsQuestion.QName);
cAXFR: DoDomainName(DNsQuestion.QName);
cMAILB: DoDomainName(DNsQuestion.QName);
cMailA: raise EIdDnsResolverError.Create(RSDNSMailAObsolete);
cSTar: DoDomainName(DNsQuestion.QName);
end;
fQPacket := fQPacket + Chr(0);
fQPacket := fQPacket + WordToTwoCharStr(DNsQuestion.QType);
fQPacket := fQPacket + WordToTwoCharStr(DNsQuestion.QClass);
end;
FQPackSize := Length(fQPacket);
end;
procedure TIdDNSResolver.DecodeReplyPacket;
var
CharCount: Integer;
Idx: Integer;
ReplyId: Word;
function LabelsToDomainName(const SrcStr: string; var Idx: Integer): string;
var
LabelStr: string;
Len: Integer;
SavedIdx: Integer;
AChar: Char;
begin
Result := '';
SavedIdx := 0;
repeat
Len := Byte(SrcStr[Idx]);
if Len > 63 then
begin
if SavedIdx = 0 then
begin
SavedIdx := Succ(Idx);
end;
aChar := Char(Len and $3F);
Idx := TwoCharToWord(aChar, SrcStr[Idx + 1]) + 1;
end;
if Idx > fRPackSize then
begin
raise EIdDnsResolverError.Create(GetErrorStr(2, 2));
end;
SetLength(LabelStr, Byte(SrcStr[Idx]));
Move(SrcStr[Idx + 1], LabelStr[1], Length(LabelStr));
Inc(Idx, Length(LabelStr) + 1);
if (Idx - 1) > fRPackSize then
begin
raise EIdDnsResolverError.Create(GetErrorStr(2, 3));
end;
Result := Result + LabelStr + '.';
until (SrcStr[Idx] = Char(0)) or (Idx >= Length(SrcStr));
if Result[Length(Result)] = '.' then
begin
Delete(Result, Length(Result), 1);
end;
if SavedIdx > 0 then
begin
Idx := SavedIdx;
end;
Inc(Idx);
end;
function ParseQuestions(StrIdx: Integer): Integer;
var
DNSQuestion: TQuestionItem;
Idx: Integer;
begin
for Idx := 1 to fDNSHeader.fQdCount do
begin
DnsQuestion := fDnsQdList.Add;
DnsQuestion.QName := LabelsToDomainName(RPacket, StrIdx);
if StrIdx > fRPackSize then
begin
raise EIdDnsResolverError.Create(GetErrorStr(2, 4));
end;
DnsQuestion.Qtype := TwoCharToWord(RPacket[StrIdx], RPacket[StrIdx + 1]);
Inc(StrIdx, 2);
if StrIdx > fRPackSize then
begin
raise EIdDnsResolverError.Create(GetErrorStr(2, 5));
end;
DnsQuestion.QClass := TwoCharToWord(RPacket[StrIdx], RPacket[StrIdx + 1]);
if StrIdx + 1 > fRPackSize then
begin
raise EIdDnsResolverError.Create(GetErrorStr(2, 6));
end;
Inc(StrIdx, 2);
end;
Result := StrIdx;
end;
function ParseResource(NumItems, StrIdx: Integer; DnsList: TIdDNSResourceList)
: Integer;
var
RDataStartIdx: Integer;
DnsResponse: TIdDNSResourceItem;
Idx: Integer;
procedure ProcessRData(sIdx: Integer);
procedure DoHostAddress;
var
Idx: Integer;
begin
if sIdx + 3 > fRPackSize then
begin
raise EIdDnsResolverError.Create(GetErrorStr(2, 7));
end;
for Idx := sIdx to sIdx + 3 do
begin
DnsResponse.RData.HostAddrStr := DNSResponse.RData.HostAddrStr +
IntToStr(Ord(RPacket[Idx])) + '.';
end;
Delete(DNSResponse.RData.HostAddrStr,
Length(DNSResponse.RData.HostAddrStr), 1);
end;
procedure DoDomainNameRData;
begin
DnsResponse.RData.DomainName := LabelsToDomainName(RPacket, sIdx);
if (sIdx - 1) > fRPackSize then
begin
raise EIdDnsResolverError.Create(GetErrorStr(2, 8));
end;
end;
procedure DoSOARdata;
begin
DNSResponse.RData.SOA.MName := LabelsToDomainName(RPacket, sIdx);
if sIdx > fRPackSize then
begin
raise EIdDnsResolverError.Create(GetErrorStr(2, 9));
end;
DNSResponse.RData.SOA.RName := LabelsToDomainName(RPacket, sIdx);
if sIdx + 4 > fRPackSize then
begin
raise EIdDnsResolverError.Create(GetErrorStr(2, 10));
end;
DNSResponse.RData.SOA.Serial := FourCharToCardinal(RPacket[sIdx],
RPacket[sIdx + 1], RPacket[sIdx + 2], RPacket[sIdx + 3]);
Inc(sIdx, 4);
if sIdx + 4 > fRPackSize then
begin
raise EIdDnsResolverError.Create(GetErrorStr(2, 11));
end;
DNSResponse.RData.SOA.Refresh := FourCharToCardinal(RPacket[sIdx],
RPacket[sIdx + 1], RPacket[sIdx + 2], RPacket[sIdx + 3]);
Inc(sIdx, 4);
if sIdx + 4 > fRPackSize then
begin
raise EIdDnsResolverError.Create(GetErrorStr(2, 12));
end;
DNSResponse.RData.SOA.ReTry := FourCharToCardinal(RPacket[sIdx],
RPacket[sIdx + 1], RPacket[sIdx + 2], RPacket[sIdx + 3]);
Inc(sIdx, 4);
if sIdx + 4 > fRPackSize then
begin
raise EIdDnsResolverError.Create(GetErrorStr(2, 13));
end;
DNSResponse.RData.SOA.Expire := FourCharToCardinal(RPacket[sIdx],
RPacket[sIdx + 1], RPacket[sIdx + 2], RPacket[sIdx + 3]);
Inc(sIdx, 4);
if sIdx + 3 > fRPackSize then
begin
raise EIdDnsResolverError.Create(GetErrorStr(2, 14));
end;
DNSResponse.RData.SOA.Minimum := FourCharToCardinal(RPacket[sIdx],
RPacket[sIdx + 1], RPacket[sIdx + 2], RPacket[sIdx + 3]);
Inc(sIdx, 4);
end;
procedure DoWKSRdata;
begin
if sIdx + 4 > fRPackSize then
begin
raise EIdDnsResolverError.Create(GetErrorStr(2, 15));
end;
DNSResponse.RData.WKS.Address :=
FourCharToCardinal(RPacket[sIdx], RPacket[sIdx + 1], RPacket[sIdx +
2], RPacket[sIdx + 3]);
Inc(sIdx, 4);
DNSResponse.RData.WKS.Protocol := Byte(RPacket[sIdx]);
Inc(sIdx);
if sIdx + 7 > fRPackSize then
begin
raise EIdDnsResolverError.Create(GetErrorStr(2, 16));
end;
Move(RPacket[sIdx], DNSResponse.RData.WKS.Bits, 8);
end;
procedure DoHInfoRdata;
begin
if sIdx + Ord(RPacket[sIdx]) + 1 > fRPackSize then
begin
raise EIdDnsResolverError.Create(GetErrorStr(2, 17));
end;
Move(RPacket[sIdx], DNSResponse.RData.Hinfo.CpuStr,
Ord(RPacket[sIdx]) + 1);
sIdx := sIdx + Length(DNSResponse.RData.Hinfo.CpuStr) + 2;
if sIdx + Ord(RPacket[sIdx]) + 1 > fRPackSize then
begin
raise EIdDnsResolverError.Create(GetErrorStr(2, 18));
end;
Move(RPacket[sIdx], DNSResponse.RData.Hinfo.OSStr,
Ord(RPacket[sIdx]) + 1);
end;
procedure DoMInfoRdata;
begin
DNSResponse.RData.Minfo.RMailBox :=
LabelsToDomainName(RPacket, sIdx);
if sIdx > fRPackSize then
begin
raise EIdDnsResolverError.Create(GetErrorStr(2, 19));
end;
DNSResponse.RData.MinFo.EMailBox :=
LabelsToDomainName(RPacket, sIdx);
if sIdx > fRPackSize then
begin
raise EIdDnsResolverError.Create(GetErrorStr(2, 20));
end;
end;
procedure DoMXRData;
begin
if sIdx + 2 > fRPackSize then
begin
raise EIdDnsResolverError.Create(GetErrorStr(2, 21));
end;
DNSResponse.RData.MX.Preference :=
TwoCharToWord(RPacket[sIdx], RPacket[sIdx + 1]);
Inc(sIdx, 2);
if sIdx + 2 > fRPackSize then
begin
raise EIdDnsResolverError.Create(GetErrorStr(2, 22));
end;
DNSResponse.RData.Mx.Exchange := LabelsToDomainName(RPacket, sIdx);
end;
procedure DoMailBRdata;
begin
raise EIdDnsResolverError.Create(RSDNSMailBNotImplemented);
end;
begin
case DnsResponse.AType of
cA: DoHostAddress;
cNS: DoDomainNameRData;
cMD: raise EIdDnsResolverError.Create(RSDNSMDISObsolete);
cMF: raise EIdDnsResolverError.Create(RSDNSMFIsObsolete);
cName: DoDomainNameRData;
cSOA: DoSOARdata;
cMB: DoDomainNameRData;
cMG: DoDomainNameRData;
cMR: DoDomainNameRData;
cNULL:
DnsResponse.StarData :=
Copy(RPacket, RDataStartIdx, DnsResponse.RdLength);
cWKS: DoWKSRdata;
cPTR: DoDomainNameRData;
cHINFO: DoHInfoRdata;
cMINFO: DoMInfoRdata;
cMX: DoMXRData;
cTXT:
DnsResponse.StarData :=
Copy(RPacket, RDataStartIdx, DnsResponse.RdLength);
cAXFR:
DnsResponse.StarData :=
Copy(RPacket, RDataStartIdx, DnsResponse.RdLength);
cMAILB: DoMailBRData;
cMailA: raise EIdDnsResolverError.Create(RSDNSMFIsObsolete);
cStar:
DnsResponse.StarData :=
Copy(RPacket, RDataStartIdx, DnsResponse.RdLength);
else
end;
end;
begin
Result := 0;
for Idx := 1 to NumItems do
begin
DnsResponse := DnsList.Add;
DnsResponse.Name := LabelsToDomainName(RPacket, StrIdx);
if StrIdx + 10 > fRPackSize then
begin
raise EIdDnsResolverError.Create(GetErrorStr(2, 23));
end;
DnsResponse.aType :=
TwoCharToWord(RPacket[StrIdx], RPacket[StrIdx + 1]);
Inc(StrIdx, 2);
DnsResponse.aClass :=
TwoCharToWord(RPacket[StrIdx], RPacket[StrIdx + 1]);
Inc(StrIdx, 2);
DnsResponse.TTL :=
FourCharToCardinal(RPacket[StrIdx], RPacket[StrIdx + 1],
RPacket[StrIdx + 2], RPacket[StrIdx + 3]);
Inc(StrIdx, 4);
DnsResponse.RdLength :=
TwoCharToWord(RPacket[StrIdx], RPacket[StrIdx + 1]);
Inc(StrIdx, 2);
if ((StrIdx + DnsResponse.RdLength) - 1) > fRPackSize then
begin
raise EIdDnsResolverError.Create(GetErrorStr(2, 23));
end;
RDataStartIdx := StrIdx;
ProcessRdata(StrIdx);
Inc(StrIdx, DnsResponse.RdLength);
Result := StrIdx;
if StrIdx >= Length(RPacket) then
begin
Exit;
end;
end;
if Result = 0 then
begin
Result := StrIdx;
end;
end;
begin
ClearVars;
fRPackSize := Length(RPacket);
if fRPackSize < 4 then
begin
raise EIdDnsResolverError.Create(GetErrorStr(3, 28));
end;
CharCount := 1;
ReplyId := TwoCharToWord(RPacket[1], RPacket[2]);
if ReplyId <> fDNSHeader.fid then
begin
raise EIdDnsResolverError.Create(GetErrorStr(4, fDNSHeader.Fid));
end;
Inc(CharCount, 4);
fDNSHeader.fBitCode := TwoCharToWord(RPacket[3], RPacket[4]);
if FDNSHeader.RCode <> 0 then
begin
raise EIdDnsResolverError.Create(GetRCodeStr(FDNSHeader.RCode));
end;
if fRPackSize < 12 then
begin
raise EIdDnsResolverError.Create(GetErrorStr(5, 29));
end;
fDNSHeader.fQdCount := TwoCharToWord(RPacket[5], RPacket[6]);
fDNSHeader.fAnCount := TwoCharToWord(RPacket[7], RPacket[8]);
fDNSHeader.fNsCount := TwoCharToWord(RPacket[9], RPacket[10]);
fDNSHeader.fArCount := TwoCharToWord(RPacket[11], RPacket[12]);
if (fRPackSize < FQPackSize) then
begin
raise EIdDnsResolverError.Create(GetErrorStr(5, 30));
end;
for Idx := 1 to fDNSHeader.fQdCount do
begin
CharCount := ParseQuestions(13);
end;
if (Charcount >= fRPackSize) and ((fDNSHeader.fAnCount > 0) or
(fDNSHeader.fNsCount > 0) or
(fDNSHeader.fArCount > 0)) then
begin
raise EIdDnsResolverError.Create(GetErrorStr(6, 31));
end;
if fDNSHeader.fAnCount > 0 then
begin
CharCount := ParseResource(fDNSHeader.fAnCount, CharCount, fDnsAnList);
end;
if (Charcount >= fRPackSize) and ((fDNSHeader.fNsCount > 0) or
(fDNSHeader.fArCount > 0)) then
begin
raise EIdDnsResolverError.Create(GetErrorStr(6, 32));
end;
if fDNSHeader.fNsCount > 0 then
begin
CharCount := ParseResource(fDNSHeader.fNsCount, CharCount, fDnsNsList);
end;
if (Charcount >= fRPackSize) and (fDNSHeader.fArCount > 0) then
begin
raise EIdDnsResolverError.Create(GetErrorStr(6, 33));
end;
if fDNSHeader.fArCount > 0 then
begin
CharCount := ParseResource(fDNSHeader.fArCount, CharCount, fDnsArList);
end;
fRPackSize := CharCount;
end;
procedure TIdDNSResolver.ResolveDomain(const ADomain: string);
var
i: Integer;
Rec: TRequestedRecord;
LRData: TRData;
begin
ClearVars;
DNSHeader.ID := DNSHeader.Id + 1;
DNSHeader.Qr := False;
DNSHeader.Opcode := cResQuery;
DNSHeader.RD := True;
for Rec := Low(TRequestedRecord) to High(TRequestedRecord) do
begin
if Rec in FRequestedRecords then
begin
DNSHeader.QdCount := DNSHEader.QdCount + 1;
with DNSQDList.Add do
begin
QName := ADomain;
QType := Rec;
QClass := cIN;
end;
end;
end;
ResolveDNS;
for i := 0 to DNSAnList.Count - 1 do
begin
LRData := DNSAnList.Items[i].RData;
case DNSAnList.Items[i].AType of
cA:
with TARecord.Create(Answers) do
begin
FDomainName := LRData.DomainName;
end;
cMX:
with TMXRecord.Create(Answers) do
begin
FExchange := LRData.MX.Exchange;
FPreference := LRData.MX.Preference;
end;
cNAME:
with TNameRecord.Create(Answers) do
begin
FDomainName := LRData.DomainName;
end;
cSOA:
with TSOARecord.Create(Answers) do
begin
FExpire := LRData.SOA.Expire;
FMinimum := LRData.SOA.Minimum;
FMName := LRData.SOA.MName;
FRefresh := LRData.SOA.Refresh;
FRetry := LRData.SOA.Retry;
FRName := LRData.SOA.RName;
FSerial := LRData.SOA.Serial;
end;
cWKS:
with TWKSRecord.Create(Answers) do
begin
FAddress := LRData.WKS.Address;
FBits := LRData.WKS.Bits;
FProtocol := LRData.WKS.Protocol;
end;
cPTR:
with TPTRRecord.Create(Answers) do
begin
FDomainName := LRData.HostAddrStr;
end;
cHINFO:
with THInfoRecord.Create(Answers) do
begin
FCPUStr := LRData.HInfo.CPUStr;
FOsStr := LRData.HInfo.OsStr;
end;
cMINFO:
with TMInfoRecord.Create(Answers) do
begin
FEMmailBox := LRData.MInfo.EMailBox;
FRMailBox := LRData.MInfo.RMailBox;
end;
end;
end;
end;
function TWKSRecord.GetBits(AIndex: Integer): Byte;
begin
Result := FBits[Index];
end;
end.
|
{===============================================================================
Copyright(c) 2010, 北京北研兴电力仪表有限责任公司
All rights reserved.
电能表 通讯类型单元
===============================================================================}
unit xDL645Type;
interface
const
C_645_RESET_TIME = 1; // 广播校时
C_645_READ_DATA = 2; // 读数据
C_645_READ_NEXTDATA = 3; // 读后续数据
C_645_READ_ADDR = 4; // 读通信地址
C_645_WRITE_DATA = 5; // 写数据
C_645_WRITE_ADDR = 6; // 写通信地址
C_645_FREEZE = 7; // 冻结命令
C_645_CHANGE_BAUD_RATE = 8; // 改波通讯速率
C_645_CHANGE_PWD = 9; // 改密码
C_645_CLEAR_MAX_DEMAND = 10;// 最大需量清零
C_645_CLEAR_RDATA = 11;// 电表清零
C_645_CLEAR_REVENT = 12;// 事件清零
C_SET_WOUT_TYPE = 13;// 设置多功能口
C_645_IDENTITY = 14;// 身份认证
C_645_ONOFF_CONTROL = 15;// 拉合闸
C_645_CLEAR_RDATA_13 = 16;// 电表清零
C_645_CLEAR_REVENT_13 = 17;// 事件清零
C_645_DATA_COPY = 18;// 数据回抄
type
/// <summary>
/// 协议类型
/// </summary>
TDL645_PROTOCOL_TYPE = ( dl645ptNone, // 未知类型
dl645pt1997, // DL645-1997
dl645pt2007 // DL645-2007
);
const
/// <summary>
/// 命令等待时间
/// </summary>
C_COMMAND_TIMEOUT = 1500;
type
/// <summary>
/// 多功能口输出
/// </summary>
TMOUT_TYPE = (
motSecond, // 秒脉冲
motCycDemand, // 需量周期
motSwitch // 时段投切
);
//type
// /// <summary>
// /// 控制命令类型
// /// </summary>
// TCOMMAND_DL645_TYPE = ( cmd645None,
// C_645_RESET_TIME, // 广播校时
// C_645_READ_DATA, // 读数据
// C_645_READ_NEXTDATA, // 读后续数据
// C_645_READ_ADDR, // 读通信地址
// C_645_WRITE_DATA, // 写数据
// C_645_WRITE_ADDR, // 写通信地址
// C_645_FREEZE, // 冻结命令
// C_645_CHANGE_BAUD_RATE, // 改波通讯速率
// C_645_CHANGE_PWD, // 改密码
// C_645_CLEAR_MAX_DEMAND, // 最大需量清零
// C_645_CLEAR_RDATA, // 电表清零
// C_645_CLEAR_REVENT, // 事件清零
// C_SET_WOUT_TYPE, // 设置多功能口输出类型
// C_645_IDENTITY, // 身份认证
// C_645_ONOFF_CONTROL // 拉合闸控制
//
// );
// C_645_RESET_TIME = 1; // 广播校时
// C_645_READ_DATA = 2; // 读数据
// C_645_READ_NEXTDATA = 3; // 读后续数据
// C_645_READ_ADDR = 4; // 读通信地址
// C_645_WRITE_DATA = 5; // 写数据
// C_645_WRITE_ADDR = 6; // 写通信地址
// C_645_FREEZE = 7; // 冻结命令
// C_645_CHANGE_BAUD_RATE = 8; // 改波通讯速率
// C_645_CHANGE_PWD = 9; // 改密码
// C_645_CLEAR_MAX_DEMAND = 10;// 最大需量清零
// C_645_CLEAR_RDATA = 11;// 电表清零
// C_645_CLEAR_REVENT = 12;// 事件清零
// C_SET_WOUT_TYPE = 13;// 设置多功能口
// C_645_IDENTITY = 14;// 身份认证
// C_645_ONOFF_CONTROL = 15;// 拉合闸
// C_645_CLEAR_RDATA_13 = 16;// 电表清零
// C_645_CLEAR_REVENT_13 = 17;// 事件清零
// C_645_DATA_COPY = 18;// 数据回抄
//function GetDL645TypeStr( ADL645Type : TCOMMAND_DL645_TYPE ) :string;
type
/// <summary>
/// DL645_07错误类型
/// </summary>
TDL645_07_ERR = ( de645_07None,
de645_07OverRate, // 费率数超
de645_07OverDayTime, // 日时段数超
de645_07OverYearTme, // 年时区数超
de645_07BaudNotChange, // 通讯速率不能改
de645_07PwdError, // 密码错误或未授权
de645_07NoneData, // 无请求数据
de645_07OtherError, // 其他错误
de645_07RepeatTopUp, // 重复充值
de645_07ESAMError, // ESAM验证失败
de645_07IdentityError, // 身份认证失败
de645_07ClientSNError, // 客户编号不匹配
de645_07TopUpTimesError, // 充值次数错误
de645_07BuyOverError // 购电超囤积
);
/// <summary>
/// 冻结类型
/// </summary>
TDL645_07_FREEZE_TYPE = ( dft_07None, // 未知类型
dft_07Month, // 月冻结
dft_07Day, // 日冻结
dft_07Hour, // 时冻结
dft_07Now // 瞬时冻结
);
/// <summary>
/// 事件清零类型
/// </summary>
TDL645_07_CLEAREVENT_TYPE = ( dct_07None, // 未知类型
dct_07All, // 全部清零
dct_07Item // 分项清零
);
function Get07ErrStr( AErrType : TDL645_07_ERR ) : string;
/// <summary>
/// 97的数据标识转换成07的数据标识
/// </summary>
function Sign97To07(nSign:int64):int64;
implementation
//
//function GetDL645TypeStr( ADL645Type : TCOMMAND_DL645_TYPE ) :string;
//begin
// Result := '';
// case ADL645Type of
// C_645_RESET_TIME: Result := '广播校时';
// C_645_READ_DATA: Result := '读数据';
// C_645_READ_NEXTDATA: Result := '读后续数据';
// C_645_READ_ADDR: Result := '读通信地址';
// C_645_WRITE_DATA: Result := '写数据';
// C_645_WRITE_ADDR: Result := '写通信地址';
// C_645_FREEZE: Result := '冻结命令';
// C_645_CHANGE_BAUD_RATE: Result := '改波通讯速率';
// C_645_CHANGE_PWD: Result := '改密码';
// C_645_CLEAR_MAX_DEMAND: Result := '最大需量清零';
// C_645_CLEAR_RDATA: Result := '电表清零';
// C_645_CLEAR_REVENT: Result := '事件清零';
// C_SET_WOUT_TYPE: Result := '多功能口设置';
// C_645_IDENTITY: Result := '身份认证';
// C_645_ONOFF_CONTROL : Result := '费控功能';
// end;
//end;
function Get07ErrStr( AErrType : TDL645_07_ERR ) : string;
begin
case AErrType of
de645_07None: Result := '无错误';
de645_07OverRate: Result := '费率数超';
de645_07OverDayTime: Result := '日时段数超';
de645_07OverYearTme: Result := '年时区数超';
de645_07BaudNotChange: Result := '通讯速率不能改';
de645_07PwdError: Result := '密码错误或未授权';
de645_07NoneData: Result := '无请求数据';
de645_07OtherError: Result := '其他错误';
de645_07RepeatTopUp: Result := '重复充值';
de645_07ESAMError: Result := 'ESAM验证失败';
de645_07IdentityError: Result := '身份认证失败';
de645_07ClientSNError: Result := '客户编号不匹配';
de645_07TopUpTimesError: Result := '充值次数错误';
de645_07BuyOverError: Result := '购电超囤积';
end;
end;
function Sign97To07(nSign:int64):int64;
begin
if nSign = $9010 then
Result := $00000000
else if nSign = $9011 then
Result := $00000100
else if nSign = $9012 then
Result := $00000200
else if nSign = $9013 then
Result := $00000300
else if nSign = $9014 then
Result := $00000400
else if nSign = $9110 then
Result := $00030000
else if nSign = $9120 then
Result := $00040000
else if nSign = $A010 then
Result := $01010000
else if nSign = $B010 then
Result := $01010000
else if nSign = $A110 then
Result := $01020000
else if nSign = $B110 then
Result := $01020000
else if nSign = $B611 then Result := $02010100
else if nSign = $B612 then Result := $02010200
else if nSign = $B613 then Result := $02010300
else if nSign = $B621 then Result := $02020100
else if nSign = $B622 then Result := $02020200
else if nSign = $B623 then Result := $02020300
else if nSign = $B630 then Result := $02030000
else if nSign = $B631 then Result := $02030100
else if nSign = $B632 then Result := $02030200
else if nSign = $B633 then Result := $02030300
else if nSign = $B640 then Result := $02040000
else if nSign = $B641 then Result := $02040100
else if nSign = $B642 then Result := $02040200
else if nSign = $B643 then Result := $02040300
else if nSign = $C030 then Result := $04000409
else if nSign = $C031 then Result := $0400040A
else if nSign = $C032 then Result := $04000402
else if nSign = $C010 then Result := $04000101
else if nSign = $C011 then Result := $04000102
else
Result := $00010000
//$C033
//$C034
//$C035
end;
end.
|
{*******************************************************}
{ }
{ Delphi Visual Component Library }
{ }
{ Copyright(c) 1995-2011 Embarcadero Technologies, Inc. }
{ }
{*******************************************************}
unit ExpertsProject;
interface
uses Classes, ToolsAPI, SysUtils, ExpertsTemplates;
type
TExpertsProjectType = (ptApplication, ptLibrary, ptConsole, ptPackage, ptStaticLibrary);
TCustomExpertsProject = class;
TExpertsProjectPersonalityEvent = procedure(Sender: TCustomExpertsProject; const APersonality: string) of object;
TExpertsCreateProjectEvent = procedure(Sender: TCustomExpertsProject; const APersonality: string;
const AProjectName: string) of object;
TCustomExpertsProject = class(TComponent)
private
FProjectType: TExpertsProjectType;
FProjectTemplateFile: TCustomExpertsTemplateFile;
FTemplateProperties: TCustomExpertsTemplateProperties;
FOnCreateModules: TExpertsProjectPersonalityEvent;
FProjectDirectory: string;
FProjectFileName: string;
FUnnamed: Boolean;
FTemplatePropertiesDoc: TStrings;
procedure SetProjectFile(const Value: TCustomExpertsTemplateFile);
procedure SetTemplateProperties(const Value: TCustomExpertsTemplateProperties);
procedure SetProjectDirectory(const Value: string);
procedure SetProjectFileName(const Value: string);
procedure SetTemplatePropertiesDoc(const Value: TStrings);
protected
procedure DoOnCreateModules(const APersonality: string); virtual;
procedure Notification(AComponent: TComponent; Operation: TOperation); override;
public
class function ProjectTypeToString(AProjectType: TExpertsProjectType): string; static;
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
procedure CreateProject(const APersonality: string);
property ProjectType: TExpertsProjectType read FProjectType write FProjectType;
property ProjectTemplateFile: TCustomExpertsTemplateFile read FProjectTemplateFile write SetProjectFile;
property ProjectFileName: string read FProjectFileName write SetProjectFileName;
property ProjectDirectory: string read FProjectDirectory write SetProjectDirectory;
property TemplateProperties: TCustomExpertsTemplateProperties read FTemplateProperties write SetTemplateProperties;
property TemplatePropertiesDoc: TStrings read FTemplatePropertiesDoc write SetTemplatePropertiesDoc;
property OnCreateModules: TExpertsProjectPersonalityEvent read FOnCreateModules write FOnCreateModules;
property Unnamed: Boolean read FUnnamed write FUnnamed default true;
end;
TExpertsProject = class(TCustomExpertsProject)
published
property ProjectType;
property ProjectTemplateFile;
property TemplateProperties;
property TemplatePropertiesDoc;
property OnCreateModules;
property ProjectFileName;
property ProjectDirectory;
property Unnamed;
end;
implementation
uses ExpertsProjectCreators, ExpertsIntf, ExpertsResStrs;
type
TExpertsProjectAccessor = class(TInterfacedObject, IExpertsProjectAccessor)
private
FPersonality: string;
FExpertsProject: TCustomExpertsProject;
// IExpertsProjectAccessor
function GetCreatorType: string;
function NewProjectSource(const ProjectName: string): IOTAFile;
procedure NewDefaultModule;
function GetFileName: string;
function GetDirectory: string;
function GetUnnamed: Boolean;
public
constructor Create(const APersonality: string; AExpertsProject: TCustomExpertsProject);
end;
{ TCustomExpertsProject }
constructor TCustomExpertsProject.Create(AOwner: TComponent);
begin
inherited;
FUnnamed := True;
FTemplatePropertiesDoc := TStringList.Create;
end;
procedure TCustomExpertsProject.CreateProject(const APersonality: string);
begin
(BorlandIDEServices as IOTAModuleServices).CreateModule(
TExpertsProjectCreator.Create(APersonality, TExpertsProjectAccessor.Create(APersonality, Self)))
end;
destructor TCustomExpertsProject.Destroy;
begin
FTemplatePropertiesDoc.Free;
inherited;
end;
procedure TCustomExpertsProject.DoOnCreateModules(const APersonality: string);
begin
if Assigned(FOnCreateModules) then
FOnCreateModules(Self, APersonality);
end;
procedure TCustomExpertsProject.Notification(AComponent: TComponent;
Operation: TOperation);
begin
inherited Notification(AComponent, Operation);
if (Operation = opRemove) and (AComponent = FProjectTemplateFile) then
FProjectTemplateFile := nil;
if (Operation = opRemove) and (AComponent = FTemplateProperties) then
FTemplateProperties := nil;
end;
class function TCustomExpertsProject.ProjectTypeToString(
AProjectType: TExpertsProjectType): string;
begin
case AProjectType of
ptApplication : Result := ToolsAPI.sApplication;
ptLibrary : Result := ToolsAPI.sLibrary;
ptConsole : Result := ToolsAPI.sConsole;
ptPackage : Result := ToolsAPI.sPackage;
ptStaticLibrary: Result := ToolsAPI.sStaticLibrary;
else
raise Exception.Create(rsNotSupported);
end;
end;
procedure TCustomExpertsProject.SetProjectFile(const Value: TCustomExpertsTemplateFile);
begin
if FProjectTemplateFile <> Value then
begin
if Value <> nil then Value.FreeNotification(Self);
FProjectTemplateFile := Value;
end;
end;
procedure TCustomExpertsProject.SetProjectFileName(const Value: string);
begin
FProjectFileName := Trim(Value);
if FProjectFileName <> '' then
begin
FProjectFileName := ExtractFileName(ChangeFileExt(FProjectFileName, ''));
end;
end;
procedure TCustomExpertsProject.SetProjectDirectory(const Value: string);
begin
FProjectDirectory := Trim(Value);
if FProjectDirectory <> '' then
FProjectDirectory := IncludeTrailingPathDelimiter(FProjectDirectory)
end;
procedure TCustomExpertsProject.SetTemplateProperties(
const Value: TCustomExpertsTemplateProperties);
begin
if FTemplateProperties <> Value then
begin
if Value <> nil then Value.FreeNotification(Self);
FTemplateProperties := Value;
end;
end;
procedure TCustomExpertsProject.SetTemplatePropertiesDoc(const Value: TStrings);
begin
FTemplatePropertiesDoc.Assign(Value);
end;
{ TExpertsProjectAccessor }
constructor TExpertsProjectAccessor.Create(
const APersonality: string; AExpertsProject: TCustomExpertsProject);
begin
FPersonality := APersonality;
FExpertsProject := AExpertsProject;
end;
function TExpertsProjectAccessor.GetCreatorType: string;
begin
Result := TCustomExpertsProject.ProjectTypeToString(FExpertsProject.ProjectType)
end;
function TExpertsProjectAccessor.GetFileName: string;
begin
Result := FExpertsProject.ProjectFileName;
end;
function TExpertsProjectAccessor.GetDirectory: string;
begin
Result := FExpertsProject.ProjectDirectory;
end;
function TExpertsProjectAccessor.GetUnnamed: Boolean;
begin
Result := FExpertsProject.Unnamed;
end;
procedure TExpertsProjectAccessor.NewDefaultModule;
begin
FExpertsProject.DoOnCreateModules(FPersonality);
end;
function TExpertsProjectAccessor.NewProjectSource(
const ProjectName: string): IOTAFile;
var
LBuiltInProperties: TStrings;
LBuiltInPropertyPairs: IPropertyPairs;
begin
Result := nil;
if FExpertsProject.FProjectTemplateFile <> nil then
begin
LBuiltInProperties := TStringList.Create;
try
LBuiltInProperties.Values['ProjectName'] := ProjectName;
LBuiltInProperties.Values['ProjectType'] :=
TCustomExpertsProject.ProjectTypeToString(FExpertsProject.ProjectType);
LBuiltInPropertyPairs := TStringsPropertiesPairs.Create(LBuiltInProperties, False);
LBuiltInPropertyPairs := MergePropertyPairs(LBuiltInPropertyPairs,
TStringsPropertiesPairs.Create(FExpertsProject.FTemplatePropertiesDoc, False));
Result := FExpertsProject.FProjectTemplateFile.CreateFile(FPersonality,
MergePropertyPairs(LBuiltInPropertyPairs, TExpertsPropertiesPairs.Create(FExpertsProject.FTemplateProperties)))
finally
LBuiltInProperties.Free;
end;
// // Combine pairs from caller with this component's property pairs
// LMergedPairs := MergePropertyPairs(Props, TExpertsPropertiesPairs.Create(Self.FTemplateProperties));
// S := CreateSource(APersonality, LMergedPairs);
// Result := TOTAFile.Create(S);
//
// end
end
else
Result := nil;
end;
end.
|
unit Language;
interface
uses Types;
type
PLangItem = ^TLangItem;
TLangItem = object(TObject)
Name, Value: PString;
constructor Init(const AName, AValue: String);
destructor Done; virtual;
end;
const
Quiet: Boolean = False;
LanguagePool: PCollection = Nil;
procedure lngInit;
function lngLoad: Boolean;
procedure lngDone;
procedure lngAddToPool(const Key, Value: String);
procedure lngBegin; {$IFNDEF SOLID}export;{$ENDIF}
procedure lngPush(const Value: String); {$IFNDEF SOLID}export;{$ENDIF}
procedure lngPrint(const LogName, Key: String); {$IFNDEF SOLID}export;{$ENDIF}
procedure lngEnd; {$IFNDEF SOLID}export;{$ENDIF}
function lngGet(Key: String): String; {$IFNDEF SOLID}export;{$ENDIF}
procedure lngDump;
implementation
uses Wizard, Dos, Video, Config, Log, Semaphor;
{$I fastuue.inc}
const
Pool: PStrings = Nil;
constructor TLangItem.Init;
begin
inherited Init;
Name:=NewStr(AName);
Value:=NewStr(AValue);
end;
destructor TLangItem.Done;
begin
DisposeStr(Name);
DisposeStr(Value);
inherited Done;
end;
function lngGet(Key: String): String;
var
L: PLangItem;
K: Longint;
begin
if LanguagePool = Nil then
begin
lngGet:='';
Exit;
end;
StUpcaseEx(Key);
for K:=1 to LanguagePool^.Count do
begin
L:=LanguagePool^.At(K);
if L^.Name^ = Key then
begin
if L^.Value = Nil then
lngGet:=''
else
lngGet:=L^.Value^;
Exit;
end;
end;
lngGet:='';
end;
procedure lngInit;
begin
LanguagePool:=New(PCollection, Init);
Pool:=New(PStrings, Init);
end;
function lngLoad;
var
Langs: PStrings;
Param, Value: String;
procedure CompileLang(S: String); far;
var
F: Text;
begin
TrimEx(S);
S:=ForceExtension(S, 'LNG');
{$I-}
if IOResult <> 0 then;
Assign(F, S);
Reset(F);
if InOutRes <> 0 then
begin
vSetAttr($0C);
vPrintLn(' Error while opening "' + S + '", rc=#' + Long2Str(IOResult));
vSetAttr($07);
lngLoad:=False;
Exit;
end;
while not Eof(F) do
begin
ReadLn(F, S);
TrimEx(S);
if (S[0] = #0) or (S[1] in [';', '/']) then
Continue;
Param:=ExtractWord(1, S, ['=']);
TrimEx(Param);
StUpcaseEx(Param);
Value:=ExtractWord(2, S, ['"']);
if Param <> '' then
LanguagePool^.Insert(New(PLangItem, Init(Param, Value)));
end;
Close(F);
if IOResult <> 0 then;
end;
var
K: Longint;
S: String;
SR: SearchRec;
begin
lngLoad:=True;
Langs:=New(PStrings, Init);
cProcessList('Language', Langs);
for K:=1 to Langs^.Count do
begin
S:=AddBackSlash(JustPathName(GetPString(Langs^.At(K))));
FindFirst(GetPString(Langs^.At(K)), AnyFile, SR);
while DosError = 0 do
begin
CompileLang(S + SR.Name);
FindNext(SR);
end;
FindClose(SR);
end;
Dispose(Langs, Done);
end;
procedure lngDone;
begin
Dispose(Pool, Done);
Dispose(LanguagePool, Done);
end;
procedure lngBegin;
begin
if Pool = Nil then
Exit;
Pool^.FreeAll;
end;
procedure lngEnd;
begin
if Pool = Nil then
Exit;
Pool^.FreeAll;
end;
procedure lngPush(const Value: String);
begin
if Pool = Nil then
Exit;
Pool^.Insert(NewStr(Value));
end;
procedure lngAddToPool(const Key, Value: String);
begin
if LanguagePool = Nil then
Exit;
LanguagePool^.Insert(New(PLangItem, Init(StUpcase(Trim(Key)), Value)));
end;
procedure lngDump;
var
K: Longint;
I: PLangItem;
begin
logWrite('Main', '*** LANGUAGE POOL DUMP [start]');
for K:=1 to LanguagePool^.Count do
begin
I:=LanguagePool^.At(K);
logWrite('Main', '"' + GetPString(I^.Name) + '": "' + GetPString(I^.Value) + '"');
end;
logWrite('Main', '*** LANGUAGE POOL DUMP [end]');
end;
{ core of videosubsystem }
type
TCharacter = record
Character: Char;
Attribute: Byte;
end;
const
Color: Byte = $07;
BufferSize: Integer = 0;
var
Buffer: Array[1..256] of TCharacter;
procedure FlushBuffer;
var
K: Integer;
S: String;
Color: Byte;
begin
S:='';
Color:=0;
for K:=1 to BufferSize do
begin
if Buffer[K].Attribute <> Color then
begin
if S <> '' then
vPrint(S);
S:='';
Color:=Buffer[K].Attribute;
vSetAttr(Color);
end;
S:=Concat(S, Buffer[K].Character);
end;
if S <> '' then
vPrint(S);
BufferSize:=0;
end;
procedure PutCharacter(const Character: Char; const Attribute: Byte);
begin
Inc(BufferSize);
Buffer[BufferSize].Character:=Character;
Buffer[BufferSize].Attribute:=Attribute;
if BufferSize = 256 then
FlushBuffer;
end;
function lngProcess(const Key: String): String;
function Check(const S: String): String;
var
K: Byte;
O: String;
begin
if Key[1] = 'l' then
begin
Check:=S;
Exit;
end;
O:='';
for K:=1 to Length(S) do
case S[K] of
'$': O:=Concat(O, '$$');
'#': O:=Concat(O, '##');
else
O:=Concat(O, S[K]);
end;
Check:=O;
end;
var
S, O: String;
K, B: Byte;
begin
S:=lngGet(Key);
O:='';
K:=0;
repeat
Inc(K);
if K > Length(S) then
Break;
if (S[K] = '%') and (K <> Length(S)) and (S[K + 1] in ['0'..'9']) then
begin
Str2Byte(S[K + 1], B);
Inc(K);
O:=Concat(O, Check(GetPString(Pool^.At(B))));
end
else
O:=Concat(O, S[K]);
until False;
S:='';
K:=0;
repeat
Inc(K);
if K > Length(O) then
Break;
case O[K] of
'%':
if O[K + 1] = '%' then
begin
S:=Concat(S, '%');
Inc(K);
end
else
begin
B:=Pos('%', Copy(O, K + 1, 255));
if B = 0 then
Continue;
S:=Concat(S, lngGet(Copy(O, K + 1, B - 1)));
Inc(K, B);
end;
else
S:=Concat(S, O[K]);
end;
until False;
O:='';
K:=0;
repeat
Inc(K);
if K > Length(S) then
Break;
case S[K] of
'#':
if S[K + 1] = '#' then
begin
O:=Concat(O, '#');
Inc(K);
end
else
begin
Str2Byte('$' + Copy(S, K + 1, 2), B);
O:=Concat(O, Chr(B));
Inc(K, 2);
end;
else
O:=Concat(O, S[K]);
end;
until False;
lngProcess:=O;
end;
procedure lngPrint(const LogName, Key: String);
var
S: String;
K: Byte;
begin
if not Quiet then
begin
S:=lngProcess(Concat('scr.', Key));
if S <> '' then
begin
K:=0;
repeat
Inc(K);
if K > Length(S) then
Break;
if Copy(S, K, 2) = '$$' then
begin
PutCharacter('$', Color);
Inc(K);
end else
if S[K] = '$' then
begin
Str2Byte(Concat('$', Copy(S, K + 1, 2)), Color);
Inc(K, 2);
end else
PutCharacter(S[K], Color);
until False;
end;
FlushBuffer;
end;
S:=lngProcess(Concat('log.', Key));
if S <> '' then
logWrite(LogName, S);
end;
end.
|
{***************************************************************************
*
* Orion-project.org Lazarus Helper Library
* Copyright (C) 2016-2017 by Nikolay Chunosov
*
* This file is part of the Orion-project.org Lazarus Helper Library
* https://github.com/Chunosov/orion-lazarus
*
* This Library is free software: you can redistribute it and/or modify it
* under the terms of the MIT License. See enclosed LICENSE.txt for details.
*
***************************************************************************}
unit OriMath;
{$mode delphi}{$H+}
interface
procedure Swap(var Value1: Double; var Value2: Double); inline;
{%region Float Number Formatting}
type
TOriFloatFormatParams = record
Exponent: Byte;
Digits: Byte;
Zerofill: Boolean;
class operator NotEqual(const A, B: TOriFloatFormatParams): Boolean;
end;
POriFloatFormatParams = ^TOriFloatFormatParams;
function NotEqual(const A, B: TOriFloatFormatParams): Boolean; overload;
function StringFromFloat(Value: Extended; ExpTheshold, Digits: Byte; ZeroFill: Boolean): String; overload;
function StringFromFloat(Value: Extended; const FormatParams: TOriFloatFormatParams): String; overload;
function RefineFloatText(const AValue: String): String;
{%endregion}
implementation
uses
SysUtils, Math,
OriStrings;
procedure Swap(var Value1: Double; var Value2: Double); inline;
var
Tmp: Double;
begin
Tmp := Value1;
Value1 := Value2;
Value2 := Tmp;
end;
class operator TOriFloatFormatParams.NotEqual(const A, B: TOriFloatFormatParams): Boolean;
begin
Result := (A.Exponent <> B.Exponent) or (A.Digits <> B.Digits) or (A.Zerofill <> B.Zerofill);
end;
function NotEqual(const A, B: TOriFloatFormatParams): Boolean;
begin
Result := (A.Exponent <> B.Exponent) or (A.Digits <> B.Digits) or (A.Zerofill <> B.Zerofill);
end;
{%region Float Number Formatting}
{ The function formats a float number in a way like style General in Mathcad.
Paramater ExpThreshold:
Results of magnitude greater than 10^n or smaller than 10^-n ,
where n is the exponential threshold, are displayed in exponential notation.
Parameter Digits:
Defines a maximal number of digits after decimal point. When result is presented
in exponetial notation, Digits defines a number of decimal points before exponent.
For example:
12456,7556 = 1,246e4 (expth = 3 or 4, digits =3)
12456,7556 = 12456,756 (expth = 5, digits =3)
0,0012 = 0,001 (digits = 3, expth = 4)
0,0012 = 1,20E-3 (digits = 2, expth = 3)
}
function StringFromFloat(Value: Extended; ExpTheshold, Digits: Byte; ZeroFill: Boolean): String;
var
Min, Max: Extended;
i, j: Integer;
begin
if IsNaN(Value) then
begin
Result := 'NaN';
Exit;
end;
if IsInfinite(Value) then
begin
if Sign(Value) = -1
then Result := '-Inf'
else Result := 'Inf';
Exit;
end;
if Value = 0 then
begin
if ZeroFill
then Result := FloatToStrF(Value, ffFixed, 18, Digits)
else Result := FloatToStrF(Value, ffGeneral, 18, Digits);
Exit;
end;
case ExpTheshold of
1: begin Max := 1e01; Min := 1e-00; end; // 10 - 1
2: begin Max := 1e02; Min := 1e-01; end; // 100 - 0.01
3: begin Max := 1e03; Min := 1e-02; end;
4: begin Max := 1e04; Min := 1e-03; end;
5: begin Max := 1e05; Min := 1e-04; end;
6: begin Max := 1e06; Min := 1e-05; end;
7: begin Max := 1e07; Min := 1e-06; end;
8: begin Max := 1e08; Min := 1e-07; end;
9: begin Max := 1e09; Min := 1e-08; end;
10: begin Max := 1e10; Min := 1e-09; end;
11: begin Max := 1e11; Min := 1e-10; end;
12: begin Max := 1e12; Min := 1e-11; end;
13: begin Max := 1e13; Min := 1e-12; end;
14: begin Max := 1e14; Min := 1e-13; end;
15: begin Max := 1e15; Min := 1e-14; end;
16: begin Max := 1e16; Min := 1e-15; end;
17: begin Max := 1e17; Min := 1e-16; end;
else begin Max := 1e18; Min := 1e-17; end;
end;
if Value > 0 then
if (Value < Min) or (Value > Max)
then Result := FloatToStrF(Value, ffExponent, 1+Digits, 1)
else Result := FloatToStrF(Value, ffFixed, 18, Digits)
else
if (Value > -Min) or (Value < -Max)
then Result := FloatToStrF(Value, ffExponent, 1+Digits, 1)
else Result := FloatToStrF(Value, ffFixed, 18, Digits);
if not ZeroFill then
begin
i := CharPos(Result, 'E');
if i = 0 then
begin
i := Length(Result);
while i > 0 do
if Result[i] = '0' then
Dec(i)
else if Result[I] in [',','.'] then
begin
SetLength(Result, i-1);
Break;
end
else
begin
SetLength(Result, i);
Break;
end;
end
else
begin
j := i-1;
while j > 0 do
if Result[j] = '0' then
Dec(j)
else if Result[I] in [',','.'] then
begin
Result := Copy(Result, 1, j-1) + Copy(Result, i, 256);
Break;
end
else
begin
Result := Copy(Result, 1, j) + Copy(Result, i, 256);
Break;
end;
end;
end;
end;
function StringFromFloat(Value: Extended; const FormatParams: TOriFloatFormatParams): String;
begin
with FormatParams do Result := StringFromFloat(Value, Exponent, Digits, Zerofill);
end;
function RefineFloatText(const AValue: String): String;
var i, j: Integer;
begin
j := 1;
SetLength(Result, Length(AValue));
for i := 1 to Length(AValue) do
if AValue[i] in ['0'..'9','-', '+','e','E'] then
begin
Result[j] := AValue[i];
Inc(j);
end
else if AValue[i] in [',','.'] then
begin
Result[j] := DefaultFormatSettings.DecimalSeparator;
Inc(j);
end;
SetLength(Result, j-1);
if (Result = '-') or (Result = ',') or (Result = '.')
then Result := '0';
end;
{%endregion}
end.
|
{**********************************************************************}
{* Иллюстрация к книге "OpenGL в проектах Delphi" *}
{* Краснов М.В. softgl@chat.ru *}
{**********************************************************************}
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
OpenGL;
type
TForm1 = class(TForm)
procedure FormCreate(Sender: TObject);
procedure FormPaint(Sender: TObject);
procedure FormDestroy(Sender: TObject);
private
hrc: HGLRC;
end;
var
Form1: TForm1;
implementation
{$R *.DFM}
{=======================================================================
Перерисовка окна}
procedure TForm1.FormPaint(Sender: TObject);
var
Color : TGLArrayf3;
begin
wglMakeCurrent(Canvas.Handle, hrc);
glViewPort (0, 0, ClientWidth, ClientHeight);
glClearColor (1.0, 1, 1, 1.0);
glClear (GL_COLOR_BUFFER_BIT);
glPointSize (10);
glColor3f (1.0, 0.0, 0.0);
glGetFloatv (GL_CURRENT_COLOR, @Color);
glBegin (GL_POINTS);
glVertex2f (-0.25, -0.25);
glColor3f (0.0, 0.0, 1.0);
glVertex2f (-0.25, 0.25);
glColor3f (Color [0], Color [1], Color [2]);
glVertex2f (0.25, 0.25);
glEnd;
SwapBuffers(Canvas.Handle); // содержимое буфера - на экран
wglMakeCurrent(0, 0);
end;
{=======================================================================
Формат пикселя}
procedure SetDCPixelFormat (hdc : HDC);
var
pfd : TPixelFormatDescriptor;
nPixelFormat : Integer;
begin
FillChar (pfd, SizeOf (pfd), 0);
pfd.dwFlags := PFD_DRAW_TO_WINDOW or PFD_SUPPORT_OPENGL or PFD_DOUBLEBUFFER;
nPixelFormat := ChoosePixelFormat (hdc, @pfd);
SetPixelFormat (hdc, nPixelFormat, @pfd);
end;
{=======================================================================
Создание формы}
procedure TForm1.FormCreate(Sender: TObject);
begin
SetDCPixelFormat(Canvas.Handle);
hrc := wglCreateContext(Canvas.Handle);
end;
{=======================================================================
Конец работы приложения}
procedure TForm1.FormDestroy(Sender: TObject);
begin
wglDeleteContext(hrc);
end;
end.
|
unit IWCompText;
{PUBDIST}
interface
uses
Classes,
{$IFDEF Linux}QControls,{$ELSE}Controls,{$ENDIF}
IWControl, IWHTMLTag;
type
TIWCustomText = class(TIWControl)
protected
FLines: TStrings;
FRawText: boolean;
FWantReturns: boolean;
//
// procedure TextChangedNotification; override;
procedure SetLines(const AValue: TStrings);
//
//@@ This property indicates that the Lines property contains HTML which should be rendered as
// is. If this is true, the Text is treated as if it was valid HTML and is not parsed or
// modified in any way. This is useful if want a high-degree of control over the presentation
// and you know what you are doing.
//
// If this is false, all text in the Lines property is rendered as text even if it contains
// HTML and characters in need of encoding are translated to HTML.
//
//SeeAlso: Lines, WantReturns
property RawText: boolean read FRawText write FRawText;
//@@ This property indicates that the text in the lines property should honor the carriage
// returns in the Lines property. This property is ignored if the RawText property is set to
// True.
//
// SeeAlso: Lines, RawText
property WantReturns: Boolean read FWantReturns write FWantReturns;
public
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
function RenderHTML: TIWHTMLTag; override;
//
//@@ This TStrings property contains the text which will be displayed to the user. You can set
// this at design-time or manipulate it at run-time with methods such as LoadFromFile.
//
// You can set the font property to a font you wish the text to be rendered in. If you wish the
// text to be displayed with the Carriage returns from your text, you may set the WantReturns
// property to True otherwise the web-browser will wrap words as it sees fit.
//
// If you set the UseFrame property to True, text is placed in a scrollable region in the user's
// web-browser.
//
// If you set RawText to true, you can have your own HTML in your IntraWeb application by
// setting the Lines property to your HTML.
//
//SeeAlso: Font, RawText, WantReturns
property Lines: TStrings read FLines write SetLines;
end;
TIWText = class(TIWCustomText)
public
published
property Font;
property Lines;
property RawText;
property UseFrame;
property WantReturns;
end;
implementation
uses
{$IFDEF Linux}QGraphics, {$ELSE}Graphics, {$ENDIF}
IWServerControllerBase,
SysUtils, SWSystem;
constructor TIWCustomText.Create(AOwner: TComponent);
begin
inherited;
Height := 121;
Width := 121;
FLines := TStringList.Create;
FWantReturns := True;
end;
destructor TIWCustomText.Destroy;
begin
FreeAndNil(FLines);
inherited;
end;
procedure TIWCustomText.SetLines(const AValue: TStrings);
begin
FLines.Assign(AValue);
Text := FLines.Text;
Invalidate;
end;
{ TIWHTMLText }
function TIWCustomText.RenderHTML: TIWHTMLTag;
Var
S: String;
begin
S := FLines.Text;
if not RawText then begin
S := TextToHTML(S, WantReturns);
end else if WantReturns then begin
S := StringReplace(S, EOL, '<br>', [rfReplaceAll]);
end;
result := TIWHTMLTag.CreateTag('SPAN'); try
result.Contents.AddText(S);
except FreeAndNil(Result); raise; end;
end;
end.
|
program Todo;
{$mode objfpc}
uses
JS, Classes, SysUtils, Web;
type
task = record
name: String;
completed: Boolean;
end;
var
newTaskName: String;
tasks: array[0 .. 100] of task;
numberOfTasks: Integer;
listElement, inputElement, submitButton: TJSElement;
procedure SortByCompleted();
var result: array[0 .. 100] of task;
cur, i: Integer;
begin
cur := 0;
for i := 0 to numberOfTasks do
begin
if tasks[i].completed then
begin
result[cur] := tasks[i];
Inc(cur);
end;
end;
for i := 0 to numberOfTasks do
begin
if not tasks[i].completed then
begin
result[cur] := tasks[i];
Inc(cur);
end;
end;
for i := 0 to numberOfTasks do tasks[i] := result[i];
end;
procedure Blit();
var taskElement: TJSElement;
i: Integer;
function ToggleTask(Event: TEventListenerEvent): Boolean;
var index: Integer;
begin
index := integer(Event.target.Properties['id']);
tasks[index].completed := not tasks[index].completed;
Blit();
ToggleTask := true;
end;
begin
SortByCompleted();
listElement.innerHTML := '';
for i := 0 to numberOfTasks - 1 do
begin
taskElement := document.createElement('a');
taskElement.textContent := tasks[i].name;
taskElement.classList.add('list-group-item');
taskElement.classList.add('list-group-item-action');
taskElement.setAttribute('id', IntToStr(i));
taskElement.addEventListener('click', @ToggleTask);
if tasks[i].completed then
taskElement.classList.add('disabled');
listElement.insertBefore(taskElement, listElement.firstChild);
end;
end;
function AddTask(Event: TEventListenerEvent): Boolean;
begin
tasks[numberOfTasks].name := newTaskName;
tasks[numberOfTasks].completed := false;
Inc(numberOfTasks);
Blit();
AddTask := true;
end;
function OnTextChange(Event: TEventListenerEvent): Boolean;
begin
newTaskName := string(Event.target.Properties['value']);
inputElement.setAttribute('value', newTaskName);
end;
begin
WriteLn('Hello world');
listElement := document.querySelector('#list');
inputElement := document.querySelector('#newTaskInput');
inputElement.addEventListener('input', @OnTextChange);
submitButton := document.querySelector('#submitButton');
submitButton.addEventListener('click', @AddTask);
Blit();
end.
|
{*******************************************************}
{ }
{ Delphi Runtime Library }
{ }
{ File: OleCtl.h }
{ Copyright (c) Microsoft Corporation }
{ All Rights Reserved. }
{ }
{ Translator: Embarcadero Technologies, Inc. }
{ Copyright(c) 1995-2018 Embarcadero Technologies, Inc. }
{ All rights reserved }
{ }
{*******************************************************}
{*******************************************************}
{ OLE Controls interface unit }
{*******************************************************}
unit Winapi.OleCtl;
{$ALIGN ON}
{$MINENUMSIZE 4}
{$WEAKPACKAGEUNIT}
interface
(*$HPPEMIT '' *)
(*$HPPEMIT '#include <ocidl.h>' *)
(*$HPPEMIT '#include <olectl.h>' *)
(*$HPPEMIT '' *)
{$HPPEMIT LEGACYHPP}
uses Winapi.Windows, Winapi.Messages, Winapi.Ole2;
const
{ OLE control status codes }
{$EXTERNALSYM CTL_E_ILLEGALFUNCTIONCALL}
CTL_E_ILLEGALFUNCTIONCALL = $800A0000 + 5;
{$EXTERNALSYM CTL_E_OVERFLOW}
CTL_E_OVERFLOW = $800A0000 + 6;
{$EXTERNALSYM CTL_E_OUTOFMEMORY}
CTL_E_OUTOFMEMORY = $800A0000 + 7;
{$EXTERNALSYM CTL_E_DIVISIONBYZERO}
CTL_E_DIVISIONBYZERO = $800A0000 + 11;
{$EXTERNALSYM CTL_E_OUTOFSTRINGSPACE}
CTL_E_OUTOFSTRINGSPACE = $800A0000 + 14;
{$EXTERNALSYM CTL_E_OUTOFSTACKSPACE}
CTL_E_OUTOFSTACKSPACE = $800A0000 + 28;
{$EXTERNALSYM CTL_E_BADFILENAMEORNUMBER}
CTL_E_BADFILENAMEORNUMBER = $800A0000 + 52;
{$EXTERNALSYM CTL_E_FILENOTFOUND}
CTL_E_FILENOTFOUND = $800A0000 + 53;
{$EXTERNALSYM CTL_E_BADFILEMODE}
CTL_E_BADFILEMODE = $800A0000 + 54;
{$EXTERNALSYM CTL_E_FILEALREADYOPEN}
CTL_E_FILEALREADYOPEN = $800A0000 + 55;
{$EXTERNALSYM CTL_E_DEVICEIOERROR}
CTL_E_DEVICEIOERROR = $800A0000 + 57;
{$EXTERNALSYM CTL_E_FILEALREADYEXISTS}
CTL_E_FILEALREADYEXISTS = $800A0000 + 58;
{$EXTERNALSYM CTL_E_BADRECORDLENGTH}
CTL_E_BADRECORDLENGTH = $800A0000 + 59;
{$EXTERNALSYM CTL_E_DISKFULL}
CTL_E_DISKFULL = $800A0000 + 61;
{$EXTERNALSYM CTL_E_BADRECORDNUMBER}
CTL_E_BADRECORDNUMBER = $800A0000 + 63;
{$EXTERNALSYM CTL_E_BADFILENAME}
CTL_E_BADFILENAME = $800A0000 + 64;
{$EXTERNALSYM CTL_E_TOOMANYFILES}
CTL_E_TOOMANYFILES = $800A0000 + 67;
{$EXTERNALSYM CTL_E_DEVICEUNAVAILABLE}
CTL_E_DEVICEUNAVAILABLE = $800A0000 + 68;
{$EXTERNALSYM CTL_E_PERMISSIONDENIED}
CTL_E_PERMISSIONDENIED = $800A0000 + 70;
{$EXTERNALSYM CTL_E_DISKNOTREADY}
CTL_E_DISKNOTREADY = $800A0000 + 71;
{$EXTERNALSYM CTL_E_PATHFILEACCESSERROR}
CTL_E_PATHFILEACCESSERROR = $800A0000 + 75;
{$EXTERNALSYM CTL_E_PATHNOTFOUND}
CTL_E_PATHNOTFOUND = $800A0000 + 76;
{$EXTERNALSYM CTL_E_INVALIDPATTERNSTRING}
CTL_E_INVALIDPATTERNSTRING = $800A0000 + 93;
{$EXTERNALSYM CTL_E_INVALIDUSEOFNULL}
CTL_E_INVALIDUSEOFNULL = $800A0000 + 94;
{$EXTERNALSYM CTL_E_INVALIDFILEFORMAT}
CTL_E_INVALIDFILEFORMAT = $800A0000 + 321;
{$EXTERNALSYM CTL_E_INVALIDPROPERTYVALUE}
CTL_E_INVALIDPROPERTYVALUE = $800A0000 + 380;
{$EXTERNALSYM CTL_E_INVALIDPROPERTYARRAYINDEX}
CTL_E_INVALIDPROPERTYARRAYINDEX = $800A0000 + 381;
{$EXTERNALSYM CTL_E_SETNOTSUPPORTEDATRUNTIME}
CTL_E_SETNOTSUPPORTEDATRUNTIME = $800A0000 + 382;
{$EXTERNALSYM CTL_E_SETNOTSUPPORTED}
CTL_E_SETNOTSUPPORTED = $800A0000 + 383;
{$EXTERNALSYM CTL_E_NEEDPROPERTYARRAYINDEX}
CTL_E_NEEDPROPERTYARRAYINDEX = $800A0000 + 385;
{$EXTERNALSYM CTL_E_SETNOTPERMITTED}
CTL_E_SETNOTPERMITTED = $800A0000 + 387;
{$EXTERNALSYM CTL_E_GETNOTSUPPORTEDATRUNTIME}
CTL_E_GETNOTSUPPORTEDATRUNTIME = $800A0000 + 393;
{$EXTERNALSYM CTL_E_GETNOTSUPPORTED}
CTL_E_GETNOTSUPPORTED = $800A0000 + 394;
{$EXTERNALSYM CTL_E_PROPERTYNOTFOUND}
CTL_E_PROPERTYNOTFOUND = $800A0000 + 422;
{$EXTERNALSYM CTL_E_INVALIDCLIPBOARDFORMAT}
CTL_E_INVALIDCLIPBOARDFORMAT = $800A0000 + 460;
{$EXTERNALSYM CTL_E_INVALIDPICTURE}
CTL_E_INVALIDPICTURE = $800A0000 + 481;
{$EXTERNALSYM CTL_E_PRINTERERROR}
CTL_E_PRINTERERROR = $800A0000 + 482;
{$EXTERNALSYM CTL_E_CANTSAVEFILETOTEMP}
CTL_E_CANTSAVEFILETOTEMP = $800A0000 + 735;
{$EXTERNALSYM CTL_E_SEARCHTEXTNOTFOUND}
CTL_E_SEARCHTEXTNOTFOUND = $800A0000 + 744;
{$EXTERNALSYM CTL_E_REPLACEMENTSTOOLONG}
CTL_E_REPLACEMENTSTOOLONG = $800A0000 + 746;
{$EXTERNALSYM CTL_E_CUSTOM_FIRST}
CTL_E_CUSTOM_FIRST = $800A0000 + 600;
{ IClassFactory2 status codes }
{$EXTERNALSYM CLASS_E_NOTLICENSED}
CLASS_E_NOTLICENSED = CLASSFACTORY_E_FIRST + 2;
{ IConnectionPoint status codes }
{$EXTERNALSYM CONNECT_E_FIRST}
CONNECT_E_FIRST = $80040200;
{$EXTERNALSYM CONNECT_E_LAST}
CONNECT_E_LAST = $8004020F;
{$EXTERNALSYM CONNECT_S_FIRST}
CONNECT_S_FIRST = $00040200;
{$EXTERNALSYM CONNECT_S_LAST}
CONNECT_S_LAST = $0004020F;
{$EXTERNALSYM CONNECT_E_NOCONNECTION}
CONNECT_E_NOCONNECTION = CONNECT_E_FIRST + 0;
{$EXTERNALSYM CONNECT_E_ADVISELIMIT}
CONNECT_E_ADVISELIMIT = CONNECT_E_FIRST + 1;
{$EXTERNALSYM CONNECT_E_CANNOTCONNECT}
CONNECT_E_CANNOTCONNECT = CONNECT_E_FIRST + 2;
{$EXTERNALSYM CONNECT_E_OVERRIDDEN}
CONNECT_E_OVERRIDDEN = CONNECT_E_FIRST + 3;
{ DllRegisterServer/DllUnregisterServer status codes }
{$EXTERNALSYM SELFREG_E_FIRST}
SELFREG_E_FIRST = $80040200;
{$EXTERNALSYM SELFREG_E_LAST}
SELFREG_E_LAST = $8004020F;
{$EXTERNALSYM SELFREG_S_FIRST}
SELFREG_S_FIRST = $00040200;
{$EXTERNALSYM SELFREG_S_LAST}
SELFREG_S_LAST = $0004020F;
{$EXTERNALSYM SELFREG_E_TYPELIB}
SELFREG_E_TYPELIB = SELFREG_E_FIRST + 0;
{$EXTERNALSYM SELFREG_E_CLASS}
SELFREG_E_CLASS = SELFREG_E_FIRST + 1;
{ IPerPropertyBrowsing status codes }
{$EXTERNALSYM PERPROP_E_FIRST}
PERPROP_E_FIRST = $80040200;
{$EXTERNALSYM PERPROP_E_LAST}
PERPROP_E_LAST = $8004020F;
{$EXTERNALSYM PERPROP_S_FIRST}
PERPROP_S_FIRST = $00040200;
{$EXTERNALSYM PERPROP_S_LAST}
PERPROP_S_LAST = $0004020F;
{$EXTERNALSYM PERPROP_E_NOPAGEAVAILABLE}
PERPROP_E_NOPAGEAVAILABLE = PERPROP_E_FIRST + 0;
{ Additional OLEMISC constants }
{$EXTERNALSYM OLEMISC_INVISIBLEATRUNTIME}
OLEMISC_INVISIBLEATRUNTIME = $00000400;
{$EXTERNALSYM OLEMISC_ALWAYSRUN}
OLEMISC_ALWAYSRUN = $00000800;
{$EXTERNALSYM OLEMISC_ACTSLIKEBUTTON}
OLEMISC_ACTSLIKEBUTTON = $00001000;
{$EXTERNALSYM OLEMISC_ACTSLIKELABEL}
OLEMISC_ACTSLIKELABEL = $00002000;
{$EXTERNALSYM OLEMISC_NOUIACTIVATE}
OLEMISC_NOUIACTIVATE = $00004000;
{$EXTERNALSYM OLEMISC_ALIGNABLE}
OLEMISC_ALIGNABLE = $00008000;
{$EXTERNALSYM OLEMISC_SIMPLEFRAME}
OLEMISC_SIMPLEFRAME = $00010000;
{$EXTERNALSYM OLEMISC_SETCLIENTSITEFIRST}
OLEMISC_SETCLIENTSITEFIRST = $00020000;
{$EXTERNALSYM OLEMISC_IMEMODE}
OLEMISC_IMEMODE = $00040000;
{ Additional OLEIVERB constants }
{$EXTERNALSYM OLEIVERB_PROPERTIES}
OLEIVERB_PROPERTIES = -7;
{ Additional variant type tags for property sets }
{$EXTERNALSYM VT_STREAMED_PROPSET}
VT_STREAMED_PROPSET = 73; { Stream contains a property set }
{$EXTERNALSYM VT_STORED_PROPSET}
VT_STORED_PROPSET = 74; { Storage contains a property set }
{$EXTERNALSYM VT_BLOB_PROPSET}
VT_BLOB_PROPSET = 75; { Blob contains a property set }
{ Variant type tags that are just aliases for others }
{$EXTERNALSYM VT_COLOR}
VT_COLOR = VT_I4;
{$EXTERNALSYM VT_XPOS_PIXELS}
VT_XPOS_PIXELS = VT_I4;
{$EXTERNALSYM VT_YPOS_PIXELS}
VT_YPOS_PIXELS = VT_I4;
{$EXTERNALSYM VT_XSIZE_PIXELS}
VT_XSIZE_PIXELS = VT_I4;
{$EXTERNALSYM VT_YSIZE_PIXELS}
VT_YSIZE_PIXELS = VT_I4;
{$EXTERNALSYM VT_XPOS_HIMETRIC}
VT_XPOS_HIMETRIC = VT_I4;
{$EXTERNALSYM VT_YPOS_HIMETRIC}
VT_YPOS_HIMETRIC = VT_I4;
{$EXTERNALSYM VT_XSIZE_HIMETRIC}
VT_XSIZE_HIMETRIC = VT_I4;
{$EXTERNALSYM VT_YSIZE_HIMETRIC}
VT_YSIZE_HIMETRIC = VT_I4;
{$EXTERNALSYM VT_TRISTATE}
VT_TRISTATE = VT_I2;
{$EXTERNALSYM VT_OPTEXCLUSIVE}
VT_OPTEXCLUSIVE = VT_BOOL;
{$EXTERNALSYM VT_FONT}
VT_FONT = VT_DISPATCH;
{$EXTERNALSYM VT_PICTURE}
VT_PICTURE = VT_DISPATCH;
{$EXTERNALSYM VT_HANDLE}
VT_HANDLE = VT_I4;
{ Reflected window message IDs }
{$EXTERNALSYM OCM__BASE}
OCM__BASE = WM_USER + $1C00;
{$EXTERNALSYM OCM_COMMAND}
OCM_COMMAND = OCM__BASE + WM_COMMAND;
{$EXTERNALSYM OCM_CTLCOLORBTN}
OCM_CTLCOLORBTN = OCM__BASE + WM_CTLCOLORBTN;
{$EXTERNALSYM OCM_CTLCOLOREDIT}
OCM_CTLCOLOREDIT = OCM__BASE + WM_CTLCOLOREDIT;
{$EXTERNALSYM OCM_CTLCOLORDLG}
OCM_CTLCOLORDLG = OCM__BASE + WM_CTLCOLORDLG;
{$EXTERNALSYM OCM_CTLCOLORLISTBOX}
OCM_CTLCOLORLISTBOX = OCM__BASE + WM_CTLCOLORLISTBOX;
{$EXTERNALSYM OCM_CTLCOLORMSGBOX}
OCM_CTLCOLORMSGBOX = OCM__BASE + WM_CTLCOLORMSGBOX;
{$EXTERNALSYM OCM_CTLCOLORSCROLLBAR}
OCM_CTLCOLORSCROLLBAR = OCM__BASE + WM_CTLCOLORSCROLLBAR;
{$EXTERNALSYM OCM_CTLCOLORSTATIC}
OCM_CTLCOLORSTATIC = OCM__BASE + WM_CTLCOLORSTATIC;
{$EXTERNALSYM OCM_DRAWITEM}
OCM_DRAWITEM = OCM__BASE + WM_DRAWITEM;
{$EXTERNALSYM OCM_MEASUREITEM}
OCM_MEASUREITEM = OCM__BASE + WM_MEASUREITEM;
{$EXTERNALSYM OCM_DELETEITEM}
OCM_DELETEITEM = OCM__BASE + WM_DELETEITEM;
{$EXTERNALSYM OCM_VKEYTOITEM}
OCM_VKEYTOITEM = OCM__BASE + WM_VKEYTOITEM;
{$EXTERNALSYM OCM_CHARTOITEM}
OCM_CHARTOITEM = OCM__BASE + WM_CHARTOITEM;
{$EXTERNALSYM OCM_COMPAREITEM}
OCM_COMPAREITEM = OCM__BASE + WM_COMPAREITEM;
{$EXTERNALSYM OCM_HSCROLL}
OCM_HSCROLL = OCM__BASE + WM_HSCROLL;
{$EXTERNALSYM OCM_VSCROLL}
OCM_VSCROLL = OCM__BASE + WM_VSCROLL;
{$EXTERNALSYM OCM_PARENTNOTIFY}
OCM_PARENTNOTIFY = OCM__BASE + WM_PARENTNOTIFY;
{ TControlInfo.dwFlags masks }
{$EXTERNALSYM CTRLINFO_EATS_RETURN}
CTRLINFO_EATS_RETURN = 1; { Control doesn't send Return to container }
{$EXTERNALSYM CTRLINFO_EATS_ESCAPE}
CTRLINFO_EATS_ESCAPE = 2; { Control doesn't send Escape to container }
{ IOleControlSite.TransformCoords flags }
{$EXTERNALSYM XFORMCOORDS_POSITION}
XFORMCOORDS_POSITION = 1;
{$EXTERNALSYM XFORMCOORDS_SIZE}
XFORMCOORDS_SIZE = 2;
{$EXTERNALSYM XFORMCOORDS_HIMETRICTOCONTAINER}
XFORMCOORDS_HIMETRICTOCONTAINER = 4;
{$EXTERNALSYM XFORMCOORDS_CONTAINERTOHIMETRIC}
XFORMCOORDS_CONTAINERTOHIMETRIC = 8;
{ IPropertyPageSite.OnStatusChange flags }
{$EXTERNALSYM PROPPAGESTATUS_DIRTY}
PROPPAGESTATUS_DIRTY = 1; { Values in page have changed }
{$EXTERNALSYM PROPPAGESTATUS_VALIDATE}
PROPPAGESTATUS_VALIDATE = 2; { Appropriate time to validate/apply }
{ Picture attributes }
{$EXTERNALSYM PICTURE_SCALABLE}
PICTURE_SCALABLE = 1;
{$EXTERNALSYM PICTURE_TRANSPARENT}
PICTURE_TRANSPARENT = 2;
{ TPictDesc.picType values }
{$EXTERNALSYM PICTYPE_UNINITIALIZED}
PICTYPE_UNINITIALIZED = -1;
{$EXTERNALSYM PICTYPE_NONE}
PICTYPE_NONE = 0;
{$EXTERNALSYM PICTYPE_BITMAP}
PICTYPE_BITMAP = 1;
{$EXTERNALSYM PICTYPE_METAFILE}
PICTYPE_METAFILE = 2;
{$EXTERNALSYM PICTYPE_ICON}
PICTYPE_ICON = 3;
{$EXTERNALSYM PICTYPE_ENHMETAFILE}
PICTYPE_ENHMETAFILE = 4;
{ Standard dispatch ID constants }
{$EXTERNALSYM DISPID_AUTOSIZE}
DISPID_AUTOSIZE = -500;
{$EXTERNALSYM DISPID_BACKCOLOR}
DISPID_BACKCOLOR = -501;
{$EXTERNALSYM DISPID_BACKSTYLE}
DISPID_BACKSTYLE = -502;
{$EXTERNALSYM DISPID_BORDERCOLOR}
DISPID_BORDERCOLOR = -503;
{$EXTERNALSYM DISPID_BORDERSTYLE}
DISPID_BORDERSTYLE = -504;
{$EXTERNALSYM DISPID_BORDERWIDTH}
DISPID_BORDERWIDTH = -505;
{$EXTERNALSYM DISPID_DRAWMODE}
DISPID_DRAWMODE = -507;
{$EXTERNALSYM DISPID_DRAWSTYLE}
DISPID_DRAWSTYLE = -508;
{$EXTERNALSYM DISPID_DRAWWIDTH}
DISPID_DRAWWIDTH = -509;
{$EXTERNALSYM DISPID_FILLCOLOR}
DISPID_FILLCOLOR = -510;
{$EXTERNALSYM DISPID_FILLSTYLE}
DISPID_FILLSTYLE = -511;
{$EXTERNALSYM DISPID_FONT}
DISPID_FONT = -512;
{$EXTERNALSYM DISPID_FORECOLOR}
DISPID_FORECOLOR = -513;
{$EXTERNALSYM DISPID_ENABLED}
DISPID_ENABLED = -514;
{$EXTERNALSYM DISPID_HWND}
DISPID_HWND = -515;
{$EXTERNALSYM DISPID_TABSTOP}
DISPID_TABSTOP = -516;
{$EXTERNALSYM DISPID_TEXT}
DISPID_TEXT = -517;
{$EXTERNALSYM DISPID_CAPTION}
DISPID_CAPTION = -518;
{$EXTERNALSYM DISPID_BORDERVISIBLE}
DISPID_BORDERVISIBLE = -519;
{$EXTERNALSYM DISPID_REFRESH}
DISPID_REFRESH = -550;
{$EXTERNALSYM DISPID_DOCLICK}
DISPID_DOCLICK = -551;
{$EXTERNALSYM DISPID_ABOUTBOX}
DISPID_ABOUTBOX = -552;
{$EXTERNALSYM DISPID_CLICK}
DISPID_CLICK = -600;
{$EXTERNALSYM DISPID_DBLCLICK}
DISPID_DBLCLICK = -601;
{$EXTERNALSYM DISPID_KEYDOWN}
DISPID_KEYDOWN = -602;
{$EXTERNALSYM DISPID_KEYPRESS}
DISPID_KEYPRESS = -603;
{$EXTERNALSYM DISPID_KEYUP}
DISPID_KEYUP = -604;
{$EXTERNALSYM DISPID_MOUSEDOWN}
DISPID_MOUSEDOWN = -605;
{$EXTERNALSYM DISPID_MOUSEMOVE}
DISPID_MOUSEMOVE = -606;
{$EXTERNALSYM DISPID_MOUSEUP}
DISPID_MOUSEUP = -607;
{$EXTERNALSYM DISPID_ERROREVENT}
DISPID_ERROREVENT = -608;
{$EXTERNALSYM DISPID_AMBIENT_BACKCOLOR}
DISPID_AMBIENT_BACKCOLOR = -701;
{$EXTERNALSYM DISPID_AMBIENT_DISPLAYNAME}
DISPID_AMBIENT_DISPLAYNAME = -702;
{$EXTERNALSYM DISPID_AMBIENT_FONT}
DISPID_AMBIENT_FONT = -703;
{$EXTERNALSYM DISPID_AMBIENT_FORECOLOR}
DISPID_AMBIENT_FORECOLOR = -704;
{$EXTERNALSYM DISPID_AMBIENT_LOCALEID}
DISPID_AMBIENT_LOCALEID = -705;
{$EXTERNALSYM DISPID_AMBIENT_MESSAGEREFLECT}
DISPID_AMBIENT_MESSAGEREFLECT = -706;
{$EXTERNALSYM DISPID_AMBIENT_SCALEUNITS}
DISPID_AMBIENT_SCALEUNITS = -707;
{$EXTERNALSYM DISPID_AMBIENT_TEXTALIGN}
DISPID_AMBIENT_TEXTALIGN = -708;
{$EXTERNALSYM DISPID_AMBIENT_USERMODE}
DISPID_AMBIENT_USERMODE = -709;
{$EXTERNALSYM DISPID_AMBIENT_UIDEAD}
DISPID_AMBIENT_UIDEAD = -710;
{$EXTERNALSYM DISPID_AMBIENT_SHOWGRABHANDLES}
DISPID_AMBIENT_SHOWGRABHANDLES = -711;
{$EXTERNALSYM DISPID_AMBIENT_SHOWHATCHING}
DISPID_AMBIENT_SHOWHATCHING = -712;
{$EXTERNALSYM DISPID_AMBIENT_DISPLAYASDEFAULT}
DISPID_AMBIENT_DISPLAYASDEFAULT = -713;
{$EXTERNALSYM DISPID_AMBIENT_SUPPORTSMNEMONICS}
DISPID_AMBIENT_SUPPORTSMNEMONICS = -714;
{$EXTERNALSYM DISPID_AMBIENT_AUTOCLIP}
DISPID_AMBIENT_AUTOCLIP = -715;
{ Dispatch ID constants for fonts }
{$EXTERNALSYM DISPID_FONT_NAME}
DISPID_FONT_NAME = 0;
{$EXTERNALSYM DISPID_FONT_SIZE}
DISPID_FONT_SIZE = 2;
{$EXTERNALSYM DISPID_FONT_BOLD}
DISPID_FONT_BOLD = 3;
{$EXTERNALSYM DISPID_FONT_ITALIC}
DISPID_FONT_ITALIC = 4;
{$EXTERNALSYM DISPID_FONT_UNDER}
DISPID_FONT_UNDER = 5;
{$EXTERNALSYM DISPID_FONT_STRIKE}
DISPID_FONT_STRIKE = 6;
{$EXTERNALSYM DISPID_FONT_WEIGHT}
DISPID_FONT_WEIGHT = 7;
{$EXTERNALSYM DISPID_FONT_CHARSET}
DISPID_FONT_CHARSET = 8;
{ Dispatch ID constants for pictures }
{$EXTERNALSYM DISPID_PICT_HANDLE}
DISPID_PICT_HANDLE = 0;
{$EXTERNALSYM DISPID_PICT_HPAL}
DISPID_PICT_HPAL = 2;
{$EXTERNALSYM DISPID_PICT_TYPE}
DISPID_PICT_TYPE = 3;
{$EXTERNALSYM DISPID_PICT_WIDTH}
DISPID_PICT_WIDTH = 4;
{$EXTERNALSYM DISPID_PICT_HEIGHT}
DISPID_PICT_HEIGHT = 5;
{$EXTERNALSYM DISPID_PICT_RENDER}
DISPID_PICT_RENDER = 6;
type
PTextMetricOle = PTextMetricW;
TTextMetricOle = TTextMetricW;
TOleColor = Longint;
{$EXTERNALSYM OLE_XPOS_PIXELS}
OLE_XPOS_PIXELS = Longint;
{$EXTERNALSYM OLE_YPOS_PIXELS}
OLE_YPOS_PIXELS = Longint;
{$EXTERNALSYM OLE_XSIZE_PIXELS}
OLE_XSIZE_PIXELS = Longint;
{$EXTERNALSYM OLE_YSIZE_PIXELS}
OLE_YSIZE_PIXELS = Longint;
{$EXTERNALSYM OLE_XPOS_HIMETRIC}
OLE_XPOS_HIMETRIC = Longint;
{$EXTERNALSYM OLE_YPOS_HIMETRIC}
OLE_YPOS_HIMETRIC = Longint;
{$EXTERNALSYM OLE_XSIZE_HIMETRIC}
OLE_XSIZE_HIMETRIC = Longint;
{$EXTERNALSYM OLE_YSIZE_HIMETRIC}
OLE_YSIZE_HIMETRIC = Longint;
{$EXTERNALSYM OLE_XPOS_CONTAINER}
OLE_XPOS_CONTAINER = Single;
{$EXTERNALSYM OLE_YPOS_CONTAINER}
OLE_YPOS_CONTAINER = Single;
{$EXTERNALSYM OLE_XSIZE_CONTAINER}
OLE_XSIZE_CONTAINER = Single;
{$EXTERNALSYM OLE_YSIZE_CONTAINER}
OLE_YSIZE_CONTAINER = Single;
OLE_TRISTATE = (triUnchecked, triChecked, triGray);
{$EXTERNALSYM OLE_OPTEXCLUSIVE}
OLE_OPTEXCLUSIVE = Bool;
{$EXTERNALSYM OLE_CANCELBOOL}
OLE_CANCELBOOL = Bool;
{$EXTERNALSYM OLE_ENABLEDEFAULTBOOL}
OLE_ENABLEDEFAULTBOOL = Bool;
{$EXTERNALSYM OLE_HANDLE}
OLE_HANDLE = Longint;
{ Registration function types }
TDLLRegisterServer = function: HResult stdcall;
TDLLUnregisterServer = function: HResult stdcall;
{ TPointF structure }
PPointF = ^TPointF;
{$EXTERNALSYM tagPOINTFX}
tagPOINTFX = record
x: Single;
y: Single;
end;
TPointF = tagPOINTFX;
{$EXTERNALSYM POINTF}
POINTF = tagPOINTFX;
{ TControlInfo structure }
PControlInfo = ^TControlInfo;
{$EXTERNALSYM tagCONTROLINFO}
tagCONTROLINFO = record
cb: Longint;
hAccel: HAccel;
cAccel: Word;
dwFlags: Longint;
end;
TControlInfo = tagCONTROLINFO;
{$EXTERNALSYM CONTROLINFO}
CONTROLINFO = tagCONTROLINFO;
{ Forward declarations }
{$EXTERNALSYM IOleControl}
IOleControl = class;
{$EXTERNALSYM IOleControlSite}
IOleControlSite = class;
{$EXTERNALSYM ISimpleFrameSite}
ISimpleFrameSite = class;
{$EXTERNALSYM IPersistStreamInit}
IPersistStreamInit = class;
{$EXTERNALSYM IPropertyNotifySink }
IPropertyNotifySink = class;
{$EXTERNALSYM IProvideClassInfo }
IProvideClassInfo = class;
{$EXTERNALSYM IConnectionPointContainer}
IConnectionPointContainer = class;
{$EXTERNALSYM IEnumConnectionPoints}
IEnumConnectionPoints = class;
{$EXTERNALSYM IConnectionPoint}
IConnectionPoint = class;
{$EXTERNALSYM IEnumConnections}
IEnumConnections = class;
{$EXTERNALSYM IClassFactory2 }
IClassFactory2 = class;
{$EXTERNALSYM ISpecifyPropertyPages }
ISpecifyPropertyPages = class;
{$EXTERNALSYM IPerPropertyBrowsing}
IPerPropertyBrowsing = class;
{$EXTERNALSYM IPropertyPageSite}
IPropertyPageSite = class;
{$EXTERNALSYM IPropertyPage }
IPropertyPage = class;
{$EXTERNALSYM IPropertyPage2 }
IPropertyPage2 = class;
{$EXTERNALSYM IFont }
IFont = class;
{$EXTERNALSYM IFontDisp}
IFontDisp = class;
{$EXTERNALSYM IPicture}
IPicture = class;
{$EXTERNALSYM IPictureDisp}
IPictureDisp = class;
{ IOleControl interface }
{$EXTERNALSYM IOleControl}
IOleControl = class(IUnknown)
public
function GetControlInfo(var ci: TControlInfo): HResult; virtual; stdcall; abstract;
function OnMnemonic(msg: PMsg): HResult; virtual; stdcall; abstract;
function OnAmbientPropertyChange(dispid: TDispID): HResult; virtual; stdcall; abstract;
function FreezeEvents(bFreeze: BOOL): HResult; virtual; stdcall; abstract;
end;
{ IOleControlSite interface }
{$EXTERNALSYM IOleControlSite}
IOleControlSite = class(IUnknown)
public
function OnControlInfoChanged: HResult; virtual; stdcall; abstract;
function LockInPlaceActive(fLock: BOOL): HResult; virtual; stdcall; abstract;
function GetExtendedControl(var disp: IDispatch): HResult; virtual; stdcall; abstract;
function TransformCoords(var ptlHimetric: TPoint; var ptfContainer: TPointF;
flags: Longint): HResult; virtual; stdcall; abstract;
function TranslateAccelerator(msg: PMsg; grfModifiers: Longint): HResult;
virtual; stdcall; abstract;
function OnFocus(fGotFocus: BOOL): HResult; virtual; stdcall; abstract;
function ShowPropertyFrame: HResult; virtual; stdcall; abstract;
end;
{ ISimpleFrameSite interface }
{$EXTERNALSYM ISimpleFrameSite}
ISimpleFrameSite = class(IUnknown)
public
function PreMessageFilter(wnd: HWnd; msg, wp, lp: Integer;
var res: Integer; var Cookie: Longint): HResult;
virtual; stdcall; abstract;
function PostMessageFilter(wnd: HWnd; msg, wp, lp: Integer;
var res: Integer; Cookie: Longint): HResult;
virtual; stdcall; abstract;
end;
{ IPersistStreamInit interface }
{$EXTERNALSYM IPersistStreamInit}
IPersistStreamInit = class(IPersist)
public
function IsDirty: HResult; virtual; stdcall; abstract;
function Load(stm: IStream): HResult; virtual; stdcall; abstract;
function Save(stm: IStream; fClearDirty: BOOL): HResult; virtual; stdcall; abstract;
function GetSizeMax(var cbSize: Largeint): HResult; virtual; stdcall; abstract;
function InitNew: HResult; virtual; stdcall; abstract;
end;
{ IPropertyNotifySink interface }
{$EXTERNALSYM IPropertyNotifySink }
IPropertyNotifySink = class(IUnknown)
public
function OnChanged(dispid: TDispID): HResult; virtual; stdcall; abstract;
function OnRequestEdit(dispid: TDispID): HResult; virtual; stdcall; abstract;
end;
{ IProvideClassInfo interface }
{$EXTERNALSYM IProvideClassInfo }
IProvideClassInfo = class(IUnknown)
public
function GetClassInfo(var ti: ITypeInfo): HResult; virtual; stdcall; abstract;
end;
{ IConnectionPointContainer interface }
{$EXTERNALSYM IConnectionPointContainer}
IConnectionPointContainer = class(IUnknown)
public
function EnumConnectionPoints(var Enum: IEnumConnectionPoints): HResult;
virtual; stdcall; abstract;
function FindConnectionPoint(const iid: TIID;
var cp: IConnectionPoint): HResult; virtual; stdcall; abstract;
end;
{ IEnumConnectionPoints interface }
{$EXTERNALSYM IEnumConnectionPoints}
IEnumConnectionPoints = class(IUnknown)
public
function Next(celt: Longint; var elt;
pceltFetched: PLongint): HResult; virtual; stdcall; abstract;
function Skip(celt: Longint): HResult; virtual; stdcall; abstract;
function Reset: HResult; virtual; stdcall; abstract;
function Clone(var Enum: IEnumConnectionPoints): HResult;
virtual; stdcall; abstract;
end;
{ IConnectionPoint interface }
{$EXTERNALSYM IConnectionPoint}
IConnectionPoint = class(IUnknown)
public
function GetConnectionInterface(var iid: TIID): HResult; virtual; stdcall; abstract;
function GetConnectionPointContainer(var cpc: IConnectionPointContainer): HResult;
virtual; stdcall; abstract;
function Advise(unkSink: IUnknown; var dwCookie: Longint): HResult; virtual; stdcall; abstract;
function Unadvise(dwCookie: Longint): HResult; virtual; stdcall; abstract;
function EnumConnections(var Enum: IEnumConnections): HResult; virtual; stdcall; abstract;
end;
{ TConnectData structure }
PConnectData = ^TConnectData;
{$EXTERNALSYM tagCONNECTDATA}
tagCONNECTDATA = record
pUnk: IUnknown;
dwCookie: Longint;
end;
TConnectData = tagCONNECTDATA;
{$EXTERNALSYM CONNECTDATA}
CONNECTDATA = tagCONNECTDATA;
{ IEnumConnections interface }
{$EXTERNALSYM IEnumConnections}
IEnumConnections = class(IUnknown)
public
function Next(celt: Longint; var elt;
pceltFetched: PLongint): HResult; virtual; stdcall; abstract;
function Skip(celt: Longint): HResult; virtual; stdcall; abstract;
function Reset: HResult; virtual; stdcall; abstract;
function Clone(var Enum: IEnumConnections): HResult; virtual; stdcall; abstract;
end;
{ TLicInfo structure }
PLicInfo = ^TLicInfo;
{$EXTERNALSYM tagLICINFO}
tagLICINFO = record
cbLicInfo: Longint;
fRuntimeKeyAvail: BOOL;
fLicVerified: BOOL;
end;
TLicInfo = tagLICINFO;
{$EXTERNALSYM LICINFO}
LICINFO = tagLICINFO;
{ IClassFactory2 interface }
{$EXTERNALSYM IClassFactory2 }
IClassFactory2 = class(IClassFactory)
function GetLicInfo(var licInfo: TLicInfo): HResult; virtual; stdcall; abstract;
function RequestLicKey(dwResrved: Longint; var bstrKey: TBStr): HResult;
virtual; stdcall; abstract;
function CreateInstanceLic(unkOuter: IUnknown; unkReserved: IUnknown;
const iid: TIID; bstrKey: TBStr; var vObject): HResult; virtual; stdcall; abstract;
end;
{ TCAUUID structure - a counted array of TGUID }
PGUIDList = ^TGUIDList;
TGUIDList = array[0..65535] of TGUID;
PCAGUID = ^TCAGUID;
TCAGUID = record
cElems: Longint;
pElems: PGUIDList;
end;
{ TCAPOleStr structure - a counted array of POleStr }
PCAPOleStr = ^TCAPOleStr;
TCAPOleStr = record
cElems: Longint;
pElems: POleStrList;
end;
{ TCALongint - a counted array of Longint }
PLongintList = ^TLongintList;
TLongintList = array[0..65535] of Longint;
PCALongint = ^TCALongint;
TCALongint = record
cElems: Longint;
pElems: PLongintList;
end;
{ TOCPFIParams - parameters for OleCreatePropertyFrameIndirect }
POCPFIParams = ^TOCPFIParams;
{$EXTERNALSYM tagOCPFIPARAMS}
tagOCPFIPARAMS = record
cbStructSize: Longint;
hWndOwner: HWnd;
x: Integer;
y: Integer;
lpszCaption: POleStr;
cObjects: Longint;
pObjects: Pointer;
cPages: Longint;
pPages: Pointer;
lcid: TLCID;
dispidInitialProperty: TDispID;
end;
TOCPFIParams = tagOCPFIPARAMS;
{$EXTERNALSYM OCPFIPARAMS}
OCPFIPARAMS = tagOCPFIPARAMS;
{ TPropPageInfo structure - information about a property page }
PPropPageInfo = ^TPropPageInfo;
{$EXTERNALSYM tagPROPPAGEINFO}
tagPROPPAGEINFO = record
cb: Longint;
pszTitle: POleStr;
size: TSize;
pszDocString: POleStr;
pszHelpFile: POleStr;
dwHelpContext: Longint;
end;
TPropPageInfo = tagPROPPAGEINFO;
{$EXTERNALSYM PROPPAGEINFO}
PROPPAGEINFO = tagPROPPAGEINFO;
{ ISpecifyPropertyPages interface }
{$EXTERNALSYM ISpecifyPropertyPages }
ISpecifyPropertyPages = class(IUnknown)
public
function GetPages(var pages: TCAGUID): HResult; virtual; stdcall; abstract;
end;
{ IPerPropertyBrowsing interface }
{$EXTERNALSYM IPerPropertyBrowsing}
IPerPropertyBrowsing = class(IUnknown)
public
function GetDisplayString(dispid: TDispID; var bstr: TBStr): HResult;
virtual; stdcall; abstract;
function MapPropertyToPage(dispid: TDispID; var clsid: TCLSID): HResult;
virtual; stdcall; abstract;
function GetPredefinedStrings(dispid: TDispID; var caStringsOut: TCAPOleStr;
var caCookiesOut: TCALongint): HResult; virtual; stdcall; abstract;
function GetPredefinedValue(dispid: TDispID; dwCookie: Longint;
var varOut: Variant): HResult; virtual; stdcall; abstract;
end;
{ IPropertyPageSite interface }
{$EXTERNALSYM IPropertyPageSite}
IPropertyPageSite = class(IUnknown)
public
function OnStatusChange(flags: Longint): HResult; virtual; stdcall; abstract;
function GetLocaleID(var localeID: TLCID): HResult; virtual; stdcall; abstract;
function GetPageContainer(var unk: IUnknown): HResult; virtual; stdcall; abstract;
function TranslateAccelerator(msg: PMsg): HResult; virtual; stdcall; abstract;
end;
{ IPropertyPage interface }
{$EXTERNALSYM IPropertyPage }
IPropertyPage = class(IUnknown)
public
function SetPageSite(pageSite: IPropertyPageSite): HResult; virtual; stdcall; abstract;
function Activate(hwndParent: HWnd; const rc: TRect; bModal: BOOL): HResult;
virtual; stdcall; abstract;
function Deactivate: HResult; virtual; stdcall; abstract;
function GetPageInfo(var pageInfo: TPropPageInfo): HResult; virtual; stdcall; abstract;
function SetObjects(cObjects: Longint; unk: IUnknown): HResult; virtual; stdcall; abstract;
function Show(nCmdShow: Integer): HResult; virtual; stdcall; abstract;
function Move(const rect: TRect): HResult; virtual; stdcall; abstract;
function IsPageDirty: HResult; virtual; stdcall; abstract;
function Apply: HResult; virtual; stdcall; abstract;
function Help(pszHelpDir: POleStr): HResult; virtual; stdcall; abstract;
function TranslateAccelerator(msg: PMsg): HResult; virtual; stdcall; abstract;
end;
{ IPropertyPage2 interface }
{$EXTERNALSYM IPropertyPage2 }
IPropertyPage2 = class(IPropertyPage)
public
function EditProperty(dispid: TDispID): HResult; virtual; stdcall; abstract;
end;
{ IFont interface }
{$EXTERNALSYM IFont }
IFont = class(IUnknown)
public
function get_Name(var name: TBStr): HResult; virtual; stdcall; abstract;
function put_Name(name: TBStr): HResult; virtual; stdcall; abstract;
function get_Size(var size: TCurrency): HResult; virtual; stdcall; abstract;
function put_Size(size: TCurrency): HResult; virtual; stdcall; abstract;
function get_Bold(var bold: BOOL): HResult; virtual; stdcall; abstract;
function put_Bold(bold: BOOL): HResult; virtual; stdcall; abstract;
function get_Italic(var italic: BOOL): HResult; virtual; stdcall; abstract;
function put_Italic(italic: BOOL): HResult; virtual; stdcall; abstract;
function get_Underline(var underline: BOOL): HResult; virtual; stdcall; abstract;
function put_Underline(underline: BOOL): HResult; virtual; stdcall; abstract;
function get_Strikethrough(var strikethrough: BOOL): HResult; virtual; stdcall; abstract;
function put_Strikethrough(strikethrough: BOOL): HResult; virtual; stdcall; abstract;
function get_Weight(var weight: Smallint): HResult; virtual; stdcall; abstract;
function put_Weight(weight: Smallint): HResult; virtual; stdcall; abstract;
function get_Charset(var charset: Smallint): HResult; virtual; stdcall; abstract;
function put_Charset(charset: Smallint): HResult; virtual; stdcall; abstract;
function get_hFont(var font: HFont): HResult; virtual; stdcall; abstract;
function Clone(var font: IFont): HResult; virtual; stdcall; abstract;
function IsEqual(fontOther: IFont): HResult; virtual; stdcall; abstract;
function SetRatio(cyLogical, cyHimetric: Longint): HResult; virtual; stdcall; abstract;
function QueryTextMetrics(var tm: TTextMetricOle): HResult; virtual; stdcall; abstract;
function AddRefHfont(font: HFont): HResult; virtual; stdcall; abstract;
function ReleaseHfont(font: HFont): HResult; virtual; stdcall; abstract;
end;
{ IFontDisp interface }
{$EXTERNALSYM IFontDisp}
IFontDisp = class(IDispatch);
{ TFontDesc structure }
PFontDesc = ^TFontDesc;
{$EXTERNALSYM tagFONTDESC}
tagFONTDESC = record
cbSizeofstruct: Integer;
lpstrName: POleStr;
cySize: Comp;
sWeight: Smallint;
sCharset: Smallint;
fItalic: BOOL;
fUnderline: BOOL;
fStrikethrough: BOOL;
end;
TFontDesc = tagFONTDESC;
{$EXTERNALSYM FONTDESC}
FONTDESC = tagFONTDESC;
{ IPicture interface }
{$EXTERNALSYM IPicture}
IPicture = class(IUnknown)
public
function get_Handle(var handle: OLE_HANDLE): HResult; virtual; stdcall; abstract;
function get_hPal(var handle: OLE_HANDLE): HResult; virtual; stdcall; abstract;
function get_Type(var typ: Smallint): HResult; virtual; stdcall; abstract;
function get_Width(var width: OLE_XSIZE_HIMETRIC): HResult; virtual; stdcall; abstract;
function get_Height(var height: OLE_YSIZE_HIMETRIC): HResult; virtual; stdcall; abstract;
function Render(dc: HDC; x, y, cx, cy: Longint;
xSrc: OLE_XPOS_HIMETRIC; ySrc: OLE_YPOS_HIMETRIC;
cxSrc: OLE_XSIZE_HIMETRIC; cySrc: OLE_YSIZE_HIMETRIC;
const rcWBounds: TRect): HResult; virtual; stdcall; abstract;
function set_hPal(hpal: OLE_HANDLE): HResult; virtual; stdcall; abstract;
function get_CurDC(var dcOut: HDC): HResult; virtual; stdcall; abstract;
function SelectPicture(dcIn: HDC; var hdcOut: HDC;
var bmpOut: OLE_HANDLE): HResult; virtual; stdcall; abstract;
function get_KeepOriginalFormat(var fkeep: BOOL): HResult; virtual; stdcall; abstract;
function put_KeepOriginalFormat(fkeep: BOOL): HResult; virtual; stdcall; abstract;
function PictureChanged: HResult; virtual; stdcall; abstract;
function SaveAsFile(stream: IStream; fSaveMemCopy: BOOL;
var cbSize: Longint): HResult; virtual; stdcall; abstract;
function get_Attributes(dwAttr: Longint): HResult; virtual; stdcall; abstract;
end;
{ IPictureDisp interface }
{$EXTERNALSYM IPictureDisp}
IPictureDisp = class(IDispatch);
{ TPictDesc structure }
PPictDesc = ^TPictDesc;
{$EXTERNALSYM tagPICTDESC}
tagPICTDESC = record
cbSizeofstruct: Integer;
picType: Integer;
case Integer of
PICTYPE_BITMAP: (
hbitmap: THandle; { Bitmap }
hpal: THandle); { Accompanying palette }
PICTYPE_METAFILE: (
hMeta: THandle; { Metafile }
xExt, yExt: Integer); { Extent }
PICTYPE_ICON: (
hIcon: THandle); { Icon }
end;
TPictDesc = tagPICTDESC;
{$EXTERNALSYM PICTDESC}
PICTDESC = tagPICTDESC;
const
{ Standard interface IDs }
{$EXTERNALSYM IID_IPropertyNotifySink}
IID_IPropertyNotifySink: TGUID = (
D1:$9BFBBC02;D2:$EFF1;D3:$101A;D4:($84,$ED,$00,$AA,$00,$34,$1D,$07));
{$EXTERNALSYM IID_IClassFactory2}
IID_IClassFactory2: TGUID = (
D1:$B196B28F;D2:$BAB4;D3:$101A;D4:($B6,$9C,$00,$AA,$00,$34,$1D,$07));
{$EXTERNALSYM IID_IProvideClassInfo}
IID_IProvideClassInfo: TGUID = (
D1:$B196B283;D2:$BAB4;D3:$101A;D4:($B6,$9C,$00,$AA,$00,$34,$1D,$07));
{$EXTERNALSYM IID_IConnectionPointContainer}
IID_IConnectionPointContainer: TGUID = (
D1:$B196B284;D2:$BAB4;D3:$101A;D4:($B6,$9C,$00,$AA,$00,$34,$1D,$07));
{$EXTERNALSYM IID_IEnumConnectionPoints}
IID_IEnumConnectionPoints: TGUID = (
D1:$B196B285;D2:$BAB4;D3:$101A;D4:($B6,$9C,$00,$AA,$00,$34,$1D,$07));
{$EXTERNALSYM IID_IConnectionPoint}
IID_IConnectionPoint: TGUID = (
D1:$B196B286;D2:$BAB4;D3:$101A;D4:($B6,$9C,$00,$AA,$00,$34,$1D,$07));
{$EXTERNALSYM IID_IEnumConnections}
IID_IEnumConnections: TGUID = (
D1:$B196B287;D2:$BAB4;D3:$101A;D4:($B6,$9C,$00,$AA,$00,$34,$1D,$07));
{$EXTERNALSYM IID_IOleControl}
IID_IOleControl: TGUID = (
D1:$B196B288;D2:$BAB4;D3:$101A;D4:($B6,$9C,$00,$AA,$00,$34,$1D,$07));
{$EXTERNALSYM IID_IOleControlSite}
IID_IOleControlSite: TGUID = (
D1:$B196B289;D2:$BAB4;D3:$101A;D4:($B6,$9C,$00,$AA,$00,$34,$1D,$07));
{$EXTERNALSYM IID_ISimpleFrameSite}
IID_ISimpleFrameSite: TGUID = (
D1:$742B0E01;D2:$14E6;D3:$101B;D4:($91,$4E,$00,$AA,$00,$30,$0C,$AB));
{$EXTERNALSYM IID_IPersistStreamInit}
IID_IPersistStreamInit: TGUID = (
D1:$7FD52380;D2:$4E07;D3:$101B;D4:($AE,$2D,$08,$00,$2B,$2E,$C7,$13));
{$EXTERNALSYM IID_IPropertyFrame}
IID_IPropertyFrame: TGUID = (
D1:$B196B28A;D2:$BAB4;D3:$101A;D4:($B6,$9C,$00,$AA,$00,$34,$1D,$07));
{$EXTERNALSYM IID_ISpecifyPropertyPages}
IID_ISpecifyPropertyPages: TGUID = (
D1:$B196B28B;D2:$BAB4;D3:$101A;D4:($B6,$9C,$00,$AA,$00,$34,$1D,$07));
{$EXTERNALSYM IID_IPerPropertyBrowsing}
IID_IPerPropertyBrowsing: TGUID = (
D1:$376BD3AA;D2:$3845;D3:$101B;D4:($84,$ED,$08,$00,$2B,$2E,$C7,$13));
{$EXTERNALSYM IID_IPropertyPageSite}
IID_IPropertyPageSite: TGUID = (
D1:$B196B28C;D2:$BAB4;D3:$101A;D4:($B6,$9C,$00,$AA,$00,$34,$1D,$07));
{$EXTERNALSYM IID_IPropertyPage}
IID_IPropertyPage: TGUID = (
D1:$B196B28D;D2:$BAB4;D3:$101A;D4:($B6,$9C,$00,$AA,$00,$34,$1D,$07));
{$EXTERNALSYM IID_IPropertyPage2}
IID_IPropertyPage2: TGUID = (
D1:$01E44665;D2:$24AC;D3:$101B;D4:($84,$ED,$08,$00,$2B,$2E,$C7,$13));
{$EXTERNALSYM IID_IFont}
IID_IFont: TGUID = (
D1:$BEF6E002;D2:$A874;D3:$101A;D4:($8B,$BA,$00,$AA,$00,$30,$0C,$AB));
{$EXTERNALSYM IID_IFontDisp}
IID_IFontDisp: TGUID = (
D1:$BEF6E003;D2:$A874;D3:$101A;D4:($8B,$BA,$00,$AA,$00,$30,$0C,$AB));
{$EXTERNALSYM IID_IPicture}
IID_IPicture: TGUID = (
D1:$7BF80980;D2:$BF32;D3:$101A;D4:($8B,$BB,$00,$AA,$00,$30,$0C,$AB));
{$EXTERNALSYM IID_IPictureDisp}
IID_IPictureDisp: TGUID = (
D1:$7Bf80981;D2:$BF32;D3:$101A;D4:($8B,$BB,$00,$AA,$00,$30,$0C,$AB));
{ Standard class IDs }
CLSID_CFontPropPage: TGUID = (
D1:$2542f180;D2:$3532;D3:$1069;D4:($a2,$cd,$00,$aa,$00,$34,$b5,$0b));
CLSID_CColorPropPage: TGUID = (
D1:$ddf5a600;D2:$b9c0;D3:$101a;D4:($af,$1a,$00,$aa,$00,$34,$b5,$0b));
CLSID_CPicturePropPage: TGUID = (
D1:$fc7af71d;D2:$fc74;D3:$101a;D4:($84,$ed,$08,$00,$2b,$2e,$c7,$13));
CLSID_PersistPropset: TGUID = (
D1:$fb8f0821;D2:$0164;D3:$101b;D4:($84,$ed,$08,$00,$2b,$2e,$c7,$13));
CLSID_ConvertVBX: TGUID = (
D1:$fb8f0822;D2:$0164;D3:$101b;D4:($84,$ed,$08,$00,$2b,$2e,$c7,$13));
CLSID_StdFont: TGUID = (
D1:$fb8f0823;D2:$0164;D3:$101b;D4:($84,$ed,$08,$00,$2b,$2e,$c7,$13));
CLSID_StdPicture: TGUID = (
D1:$fb8f0824;D2:$0164;D3:$101b;D4:($84,$ed,$08,$00,$2b,$2e,$c7,$13));
{ Property frame APIs }
{$EXTERNALSYM OleCreatePropertyFrame}
function OleCreatePropertyFrame(hwndOwner: HWnd; x, y: Integer;
lpszCaption: POleStr; cObjects: Integer; pObjects: Pointer;
cPages: Integer; pPageCLSIDs: Pointer; lcid: TLCID; dwReserved: Longint;
pvReserved: Pointer): HResult; stdcall;
{$EXTERNALSYM OleCreatePropertyFrameIndirect}
function OleCreatePropertyFrameIndirect(var Params: TOCPFIParams): HResult; stdcall;
{ Standard type APIs }
{$EXTERNALSYM OleTranslateColor}
function OleTranslateColor(clr: TOleColor; hpal: HPalette;
var colorref: TColorRef): HResult; stdcall;
{$EXTERNALSYM OleCreateFontIndirect}
function OleCreateFontIndirect(var FontDesc: TFontDesc; const iid: TIID;
var vObject): HResult; stdcall;
{$EXTERNALSYM OleCreatePictureIndirect}
function OleCreatePictureIndirect(var PictDesc: TPictDesc; const iid: TIID;
fOwn: BOOL; var vObject): HResult; stdcall;
{$EXTERNALSYM OleLoadPicture}
function OleLoadPicture(stream: IStream; lSize: Longint; fRunmode: BOOL;
const iid: TIID; var vObject): HResult; stdcall;
{$EXTERNALSYM OleIconToCursor}
function OleIconToCursor(hinstExe: THandle; hIcon: THandle): HCursor; stdcall;
implementation
const
olepro32 = 'olepro32.dll';
{ Externals from olepro32.dll }
function OleCreatePropertyFrame; external olepro32 name 'OleCreatePropertyFrame';
function OleCreatePropertyFrameIndirect; external olepro32 name 'OleCreatePropertyFrameIndirect';
function OleTranslateColor; external olepro32 name 'OleTranslateColor';
function OleCreateFontIndirect; external olepro32 name 'OleCreateFontIndirect';
function OleCreatePictureIndirect; external olepro32 name 'OleCreatePictureIndirect';
function OleLoadPicture; external olepro32 name 'OleLoadPicture';
function OleIconToCursor; external olepro32 name 'OleIconToCursor';
end.
|
unit Util;
interface
uses Classes, SysUtils,Controls,StdCtrls;
type TStringFunction=function(S:String):Boolean;
function ComponentToString(C:TComponent):String;
procedure StringToComponent(S:String;C:TComponent);
function FileToString(const FileName: AnsiString): AnsiString;
procedure StringToFile(const FileName, Contents: AnsiString);
function StrEscape(const S:String):String;
function GetContentType(S:String):String;
function DoubleQuote(S:String):String;
function MatchEMail(S:String):Boolean;
function MatchPhone(S:String):Boolean;
function MatchDTMF(S:String):Boolean;
function MatchPassword(S:String):Boolean;
procedure CheckValid(F:TStringFunction;C:TCustomEdit;Msg:String='Невалидна стойност');
procedure PopControlHint(C:TControl;H:String);
var FHint :THintWindow;
type
TMessageException=class(Exception);
implementation
uses PerlRegEx, Windows, Forms;
function ComponentToString(C:TComponent):String;
var S:TStringstream;
M:TMemoryStream;
begin
S:=TStringStream.Create('');
M:=TMemoryStream.Create;
try
M.WriteComponent(C);
M.Position:=0;
ObjectBinaryToText(M,S);
Result:=S.DataString;
finally
M.Free;
S.Free;
end;
end;
procedure StringToComponent(S:String;C:TComponent);
var SS:TStringstream;
M:TMemoryStream;
begin
SS:=TStringStream.Create(S);
M:=TMemoryStream.Create;
try
SS.Position:=0;
ObjectTextToBinary(SS,M);
M.Position:=0;
M.ReadComponent(C);
finally
M.Free;
SS.Free;
end;
end;
function FileToString(const FileName: AnsiString): AnsiString;
var
fs: TFileStream;
len: Integer;
begin
fs := TFileStream.Create(FileName, fmOpenRead or fmShareDenyWrite);
try
len := fs.Size;
SetLength(Result, len);
if len > 0 then
fs.ReadBuffer(Result[1], len);
finally
fs.Free;
end;
end;
procedure StringToFile(const FileName, Contents: AnsiString);
var
fs: TFileStream;
len: Integer;
begin
fs := TFileStream.Create(FileName, fmCreate);
try
len := Length(Contents);
if len > 0 then
fs.WriteBuffer(Contents[1], Length(Contents));
finally
fs.Free;
end;
end;
function StrEscape(const S:String):String;
begin
Result:='"'+StringReplace(
StringReplace(
StringReplace(
StringReplace(
StringReplace(S,'\','\\',[rfReplaceAll]),
'/','\/',[rfReplaceAll]),
'"','\"',[rfReplaceAll]),
#13,'\r',[rfReplaceAll]),
#10,'\n',[rfReplaceAll])
+'"';
end;
function GetContentType(S:String):String;
begin
if SameText(S,'.html')
or SameText(S,'.htm') then Result:='text/html' else
if SameText(S,'.css')then Result:='text/css' else
if SameText(S,'.js')then Result:='text/javascript' else
if SameText(S,'.xml')then Result:='text/xml' else
Result:='text/plain'
end;
function DoubleQuote(S:String):String;
begin
Result:=StringReplace(S,'''','''''',[rfReplaceAll]);
end;
var MailRegEx:TPerlRegEx;
function MatchEMail(S:String):Boolean;
begin
if MailRegEx=nil then
begin
MailRegEx:=TPerlRegEx.Create(nil);
MailRegEx.Options:=MailRegEx.Options+[preCaseLess];
MailRegEx.RegEx:='^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,5}$';
end;
MailRegEx.Subject:=S;
Result:=MailRegEx.Match;
end;
procedure PopControlHint;
var R,RR:TRect;
begin
if FHint=nil then
begin
FHint:=HintWindowClass.Create(Application);
end;
FHint.ReleaseHandle;
if C=nil then
begin
R.Top:=Screen.Height div 2-10;
R.Left:=Screen.Width div 2-30;
R.Bottom:=Screen.Height div 2+10;
R.Right:=Screen.Width div 2+30;
end else
begin
R:=C.ClientRect;
R.TopLeft:=C.ClientToScreen(R.TopLeft);
R.BottomRight:=C.ClientToScreen(R.BottomRight);
end;
FHint.BoundsRect:=R;
if R.Right-R.Left>200 then
RR:=FHint.CalcHintRect(R.Right-R.Left,H,nil)
else
RR:=FHint.CalcHintRect(200,H,nil);
FHint.Width:=RR.Right;
FHint.Height:=RR.Bottom;
FHint.Top:=R.Top-FHint.Height-3;
if FHint.Top<0 then FHint.Top:=R.Bottom+1;
FHint.ActivateHint(FHint.BoundsRect,H);
FHint.Refresh;
end;
function MatchPhone(S:String):Boolean;
var I:Integer;
begin
Result:=False;
for I := 1 to Length(S) do
if not(S[I] in ['0'..'9']) then
Exit;
Result:=True;
end;
function MatchDTMF(S:String):Boolean;
var I:Integer;
begin
Result:=False;
if Length(S)<3 then Exit;
for I := 1 to Length(S) do
if not(S[I] in ['0'..'9']) then
Exit;
for I := 2 to Length(S) do
if S[I]=S[I-1] then
Exit;
Result:=True;
end;
procedure CheckValid;
begin
if not F(C.Text) then
begin
if C.Showing and C.CanFocus then C.SetFocus;
PopControlHint(C,Msg);
Abort;
end;
end;
function MatchPassword(S:String):Boolean;
begin
Result:=Length(S)>5;
end;
end.
|
unit uPaiControle;
interface
{ for caAtributo in rpPropriedade.GetAttributes do
if caAtributo is TCampoTabelaExterna then
fCampo.ProviderFlags := fCampo.ProviderFlags + [pfInUpdate];}
uses
uConexaoBanco, uLigacao, uConstrutorSQL, uAtributosCustomizados,
SysUtils, Classes, Variants, uRESTDWPoolerDB, Data.DB;
type
TControle = class(TRESTDWClientSQL)
private
FDataSource: TDataSource;
FFormulario: TComponent;
FLigacao: TLigacao;
procedure OnAfterScroll(DataSet: TDataSet);
procedure OnBeforePost(DataSet: TDataSet);
procedure AbrirQuery(psWhere: string = '');
procedure CriarLigacao(psNomePropriedade: string);
function WhereCodigo(pnCodigo: integer): string;
function LigarComponente(psPrefixoComponente, psPropriedadeComponente,
psNomeCampo: string): boolean;
procedure PreencherDataSet;
procedure PreencherPropriedades;
procedure DesabilitarCamposTabelaSecundaria(pslCampos: TStringList);
protected
FTabela: string;
public
constructor Create(poFormulario: TComponent); overload;
constructor Create(pnCodigo: integer); overload;
destructor Destroy; override;
procedure PesquisarPorCodigo(pnCodigoAntigo, pnCodigoNovo: integer);
property DataSource: TDataSource read FDataSource write FDataSource;
end;
implementation
uses
System.RTTI;
{ TControle }
constructor TControle.Create(pnCodigo: integer);
begin
inherited Create(nil);
FTabela := ClassName.Substring(1);
DataBase := TConexaoBanco.GetInstance.Conexao;
UpdateTableName := FTabela;
AfterScroll := OnAfterScroll;
BeforePost := OnBeforePost;
FDataSource := TDataSource.Create(nil);
FDataSource.DataSet := Self;
FLigacao := TLigacao.Create(Self);
if (pnCodigo > 0) or not Assigned(FFormulario) then
AbrirQuery(WhereCodigo(pnCodigo))
else
AbrirQuery;
end;
constructor TControle.Create(poFormulario: TComponent);
begin
FFormulario := poFormulario;
Create(0);
end;
destructor TControle.Destroy;
begin
if Assigned(FDataSource) then
FreeAndNil(FDataSource);
FreeAndNil(FLigacao);
inherited;
end;
procedure TControle.OnAfterScroll(DataSet: TDataSet);
begin
PreencherPropriedades;
end;
procedure TControle.OnBeforePost(DataSet: TDataSet);
begin
PreencherDataSet;
end;
procedure TControle.DesabilitarCamposTabelaSecundaria(pslCampos: TStringList);
var
i: Integer;
oCampo: TField;
sNomeCampo: string;
begin
for i := 0 to Pred(pslCampos.Count) do
begin
sNomeCampo := pslCampos[i].Substring(pslCampos[i].LastDelimiter(' ') + 1);
oCampo := FindField(sNomeCampo);
if Assigned(oCampo) then
oCampo.ProviderFlags := [];
end;
end;
procedure TControle.AbrirQuery(psWhere: string = '');
var
FConstrutorSQL: TConstrutorSQL;
begin
FConstrutorSQL := TConstrutorSQL.Create;
try
FConstrutorSQL.Construir(Self);
FConstrutorSQL.Condicoes.Text := psWhere;
if Active then
Close;
Open(FConstrutorSQL.SQLGerado);
First;
DesabilitarCamposTabelaSecundaria(FConstrutorSQL.CamposTabelaSecundaria);
finally
FreeAndNil(FConstrutorSQL);
end;
end;
function TControle.WhereCodigo(pnCodigo: integer): string;
begin
Result := 'ID' + FTabela + ' = ' + VarToStr(pnCodigo);
end;
procedure TControle.PesquisarPorCodigo(pnCodigoAntigo, pnCodigoNovo: integer);
begin
if pnCodigoAntigo <> pnCodigoNovo then
AbrirQuery(WhereCodigo(pnCodigoNovo));
end;
procedure TControle.PreencherPropriedades;
var
Ctx: TRttiContext;
rpPropriedade: TRttiProperty;
fCampo: TField;
begin
for rpPropriedade in Ctx.GetType(Self.ClassType).GetDeclaredProperties do
begin
fCampo := FindField(rpPropriedade.Name);
if fCampo = nil then
continue;
if (rpPropriedade.GetValue(Self).Kind = tkClass) then
continue;
rpPropriedade.SetValue(Self, TValue.FromVariant(fCampo.Value));
//passar só uma vez
CriarLigacao(rpPropriedade.Name);
end;
end;
procedure TControle.PreencherDataSet;
var
Ctx: TRttiContext;
rpPropriedade: TRttiProperty;
fCampo: TField;
begin
for rpPropriedade in Ctx.GetType(Self.ClassType).GetDeclaredProperties do
begin
fCampo := FindField(rpPropriedade.Name);
if fCampo = nil then
continue;
fCampo.Value := rpPropriedade.GetValue(Self).AsVariant;
end;
end;
function TControle.LigarComponente(psPrefixoComponente, psPropriedadeComponente, psNomeCampo: string): boolean;
var
oComponent: TComponent;
begin
Result := False;
oComponent := FFormulario.FindComponent(psPrefixoComponente+psNomeCampo);
if not Assigned(oComponent) then
Exit;
FLigacao.Ligar(psNomeCampo, oComponent, psPropriedadeComponente);
Result := True;
end;
procedure TControle.CriarLigacao(psNomePropriedade: string);
begin
if not Assigned(FFormulario) then
Exit;
if LigarComponente('Edt', 'Text', psNomePropriedade) then
Exit;
if LigarComponente('Mmo', 'Text', psNomePropriedade) then
Exit;
end;
end.
|
{*******************************************************}
{ }
{ Delphi Runtime Library }
{ ISAPI/NSAPI Web server application components }
{ }
{ Copyright(c) 1995-2018 Embarcadero Technologies, Inc. }
{ All rights reserved }
{ }
{*******************************************************}
{ The thread pool implemented here is specific to Microsoft's IIS web
server running on Windows NT/W2K/XP. This unit is a noop on
Win95/98/ME since none of them support IO completion ports. In this case
the exported functions simply forward all calls to ISAPIApp for execution.
The same is also true if the application is running on a Netscape server.
References:
1) John Vert "Writing Scalable Applications for Windows NT"
http://msdn.microsoft.com/library/techart/msdn_scalabil.htm
2) Ruediger Asche "Writing Windows NT Server
Applications in MFC Using I/O Completion Ports"
http://msdn.microsoft.com/library/techart/msdn_servrapp.htm
3) Gregory Leake "Architecture Decisions for Dynamic Web
Applications: Performance, Scalability, and Reliability"
http://msdn.microsoft.com/library/default.asp?URL=/library/techart/Docu2KBench.htm
}
{$DENYPACKAGEUNIT}
unit Web.Win.ISAPIThreadPool;
interface
uses Winapi.Isapi2, Winapi.Windows, System.SyncObjs;
type
TISAPIThreadPool = class;
TISAPIThreadPoolClass = class of TISAPIThreadPool;
TISAPIThreadPool = class(TObject)
private
FCriticalSection: TCriticalSection;
FRequestQueue: THandle;
FInitCOM: Boolean;
FMin: Integer deprecated;
FMax: Integer deprecated;
function GetThreadCount: Integer;
procedure SetMax(const Value: Integer); deprecated;
procedure SetMin(const Value: Integer); deprecated;
procedure SetInitCOM(const Value: Boolean);
protected
FThreads: array of THandle;
procedure Initialize; virtual;
function PushBack(ECB: PEXTENSION_CONTROL_BLOCK): Boolean;
procedure ShutDown; virtual;
property RequestQueue: THandle read FRequestQueue;
property Handle: THandle read FRequestQueue;
public
constructor Create(InitCOM: Boolean = False); virtual;
destructor Destroy; override;
property InitCOM: Boolean read FInitCOM write SetInitCOM;
property Min: Integer read FMin write SetMin default 1;
property Max: Integer read FMax write SetMax default 32;
property ThreadCount: Integer read GetThreadCount;
end;
var
{ NumberOfThreads is the number of threads used to process incoming
connections to the server. If you want to change this value you will
need to set it prior to the first request (ie your application's main
program block). }
NumberOfThreads: Byte;
{ ThreadPoolClass is a class reference which you can set in your main
program block should you need to implement a descendant of
TISAPIThreadPool. Setting this variable to your new thread class
will cause your class to be used in place of the one provided. }
ThreadPoolClass: TISAPIThreadPoolClass;
ThreadPool: TISAPIThreadPool;
function GetExtensionVersion(var Ver: THSE_VERSION_INFO): BOOL; stdcall;
function HttpExtensionProc(var ECB: TEXTENSION_CONTROL_BLOCK): DWORD; stdcall;
function TerminateExtension(dwFlags: DWORD): BOOL; stdcall;
implementation
uses System.SysUtils, Web.WebBroker, Web.Win.ISAPIApp, Winapi.ActiveX, System.Win.ComObj;
const
SHUTDOWN_FLAG = $FFFFFFFF; // Posted to the completion port when shutting down
var
IsNetscape: Boolean; // True, if loaded on a Netscape server, false otherwise
type
PServerContext = ^TServerContext;
TServerContext = record
ECB: PEXTENSION_CONTROL_BLOCK;
Token: THandle;
end;
function WorkerFunction(ThreadPool: TISAPIThreadPool): Integer;
var
ServerContext: PServerContext;
NumberOfBytes: DWord;
Overlapped: POverlapped;
begin
//The ServerContext parameter retrieves a pointer value that is passed along
//by the call to PostQueuedCompletionStatus, not a completion key.
while GetQueuedCompletionStatus(ThreadPool.FRequestQueue, NumberOfBytes,
UIntPtr(ServerContext), Overlapped, INFINITE) do
try
try
if UIntPtr(OverLapped) = SHUTDOWN_FLAG then // Shut down
break;
with ServerContext^ do
begin
ImpersonateLoggedOnUser(Token);
Web.Win.ISAPIApp.HttpExtensionProc(ECB^);
ECB^.ServerSupportFunction(ECB^.ConnID, HSE_REQ_DONE_WITH_SESSION, nil, nil, nil);
end;
finally
if Assigned(ServerContext) then
begin
CloseHandle(ServerContext^.Token);
Dispose(ServerContext);
ServerContext := nil;
end;
end;
except
// All exceptions should have been handled by Web.Win.ISAPIApp.HttpExtensionProc
end;
Result := 0;
end;
// Wraps WorkerFunction with a try...finally to handle COM un/initialization.
function COMWorkerFunction(ThreadPool: TISAPIThreadPool): Integer;
begin
CoInitializeEx(nil, CoInitFlags);
try
Result := WorkerFunction(ThreadPool);
finally
CoUninitialize;
end;
end;
{ TISAPIThreadPool }
constructor TISAPIThreadPool.Create(InitCOM: Boolean);
begin
inherited Create;
FInitCOM := InitCOM;
FRequestQueue := INVALID_HANDLE_VALUE;
FCriticalSection := TCriticalSection.Create;
end;
destructor TISAPIThreadPool.Destroy;
begin
ShutDown;
FCriticalSection.Free;
inherited Destroy;
end;
procedure TISAPIThreadPool.Initialize;
var
ThreadID: DWORD;
I: Integer;
ThreadFunc: TThreadFunc;
begin
FCriticalSection.Enter;
try
if FRequestQueue <> INVALID_HANDLE_VALUE then exit;
// Create IO completion port to queue the ISAPI requests
FRequestQueue := CreateIoCompletionPort(INVALID_HANDLE_VALUE, 0, 0, 0);
finally
FCriticalSection.Leave;
end;
// Create and initialize worker threads
SetLength(FThreads, NumberOfThreads);
ThreadFunc := @WorkerFunction;
if FInitCOM then
ThreadFunc := @COMWorkerFunction;
for I := 0 to NumberOfThreads - 1 do
FThreads[I] := BeginThread(nil, 0, ThreadFunc, Self, 0, ThreadID)
end;
procedure TISAPIThreadPool.ShutDown;
var
I: Integer;
begin
if FRequestQueue = INVALID_HANDLE_VALUE then exit;
// Tell the threads we're shutting down
for I := 0 to NumberOfThreads - 1 do
PostQueuedCompletionStatus(FRequestQueue, 0, 0, POverLapped(SHUTDOWN_FLAG));
// Wait for threads to finish
WaitForMultipleObjects(NumberOfThreads, @FThreads[0], True, 60000 * 2);
// Close the request queue handle
CloseHandle(FRequestQueue);
// Clear the queue handle
FRequestQueue := INVALID_HANDLE_VALUE;
// Close the thread handles
for I := 0 to NumberOfThreads - 1 do
CloseHandle(FThreads[I]);
SetLength(FThreads, 0);
end;
function TISAPIThreadPool.PushBack(ECB: PEXTENSION_CONTROL_BLOCK): Boolean;
var
ServerContext: PServerContext;
begin
Result := False;
if FRequestQueue <> INVALID_HANDLE_VALUE then
begin
New(ServerContext);
OpenThreadToken(GetCurrentThread(), TOKEN_ALL_ACCESS, False, ServerContext^.Token);
ServerContext^.ECB := ECB;
Result := PostQueuedCompletionStatus(FRequestQueue, 0, UIntPtr(ServerContext), nil);
end;
end;
function TISAPIThreadPool.GetThreadCount: Integer;
begin
Result := Length(FThreads);
end;
procedure TISAPIThreadPool.SetMax(const Value: Integer);
begin
// Method has been deprecated
end;
procedure TISAPIThreadPool.SetMin(const Value: Integer);
begin
// Method has been deprecated
end;
procedure TISAPIThreadPool.SetInitCOM(const Value: Boolean);
begin
if FRequestQueue = INVALID_HANDLE_VALUE then exit;
if Value <> FInitCOM then
FInitCOM := Value
end;
{ Exported functions }
function GetExtensionVersion(var Ver: THSE_VERSION_INFO): BOOL;
begin
if (Win32Platform = VER_PLATFORM_WIN32_NT) and not IsNetscape and
not Assigned(ThreadPool) then
ThreadPool := ThreadPoolClass.Create;
Result := Web.Win.ISAPIApp.GetExtensionVersion(Ver);
end;
function HttpExtensionProc(var ECB: TEXTENSION_CONTROL_BLOCK): DWORD;
begin
if (Win32Platform = VER_PLATFORM_WIN32_NT) and not IsNetscape and
Assigned(ThreadPool) then
try
if ThreadPool.Handle = INVALID_HANDLE_VALUE then
ThreadPool.Initialize;
Result := HSE_STATUS_ERROR;
if ThreadPool.PushBack(@ECB) then
Result := HSE_STATUS_PENDING
except
Result := HSE_STATUS_ERROR;
end
else
Result := Web.Win.ISAPIApp.HttpExtensionProc(ECB);
end;
function TerminateExtension(dwFlags: DWORD): BOOL;
begin
if (Win32Platform = VER_PLATFORM_WIN32_NT) and not IsNetscape and
Assigned(ThreadPool) then
begin
try
// Let application know that extension is terminating
Web.Win.ISAPIApp.TerminateExtension(dwFlags);
finally
FreeAndNil(ThreadPool);
end;
Result := True;
end
else
Result := Web.Win.ISAPIApp.TerminateExtension(dwFlags);
end;
function CheckForNetscapeServer: Boolean;
var
LoadingModule: string;
begin
SetLength(LoadingModule, 4096);
SetLength(LoadingModule, GetModuleFileName(GetModuleHandle(nil),
PChar(LoadingModule), Length(LoadingModule)));
Result := CompareText(ExtractFileName(LoadingModule), 'httpd.exe') = 0; {do not localize}
end;
initialization
// If we are loading under Netscape do not use the thread pool
IsNetscape := CheckForNetscapeServer;
ThreadPoolClass := TISAPIThreadPool;
NumberOfThreads := 25;
finalization
FreeAndNil(ThreadPool);
end.
|
{*******************************************************}
{ }
{ CodeGear Delphi Runtime Library }
{ }
{ Copyright(c) 2016 Embarcadero Technologies, Inc. }
{ All rights reserved }
{ }
{*******************************************************}
unit System.Win.ComConst;
interface
{$HPPEMIT LEGACYHPP}
resourcestring
SCreateRegKeyError = 'Erro criando entrada de registro no sistema';
SOleError = 'Erro OLE %.8x';
SObjectFactoryMissing = 'Criador do objeto da classe %s desconhecida';
STypeInfoMissing = 'Tipo de informação da classe %s desconhecida';
SBadTypeInfo = 'Tipo de informação da classe %s incorreta';
SDispIntfMissing = 'Interface do Dispatch da classe %s desconhecida';
SNoMethod = 'Método "%s" não suportado pelo objeto de automação';
SVarNotObject = 'Variante não pode fazer referência à um objeto de automação';
STooManyParams = 'Método Dispatch não suporta mais do que 64 parâmetros';
SDCOMNotInstalled = 'DCOM não instalado ou não encontrado';
SDAXError = 'Erro DAX';
SAutomationWarning = 'Alerta do servidor COM';
SNoCloseActiveServer1 = 'Ainda há um objeto COM ativo na aplicação.' +
'Um ou mais clientes podem estar fazendo referência a este objeto, ' +
'Deve ser fechado manualmente ';
SNoCloseActiveServer2 = 'Esta aplicação pode causar falhas nas ' +
'aplicação(ões) do cliente.'#13#10#13#10'Você quer fechá-la? ';
sNoRunningObject = 'Unable to retrieve a pointer to a running object registered with OLE for %s/%s';
sParameterCountExceeded = 'Parameter count exceeded';
SBadPropValue = '''%s'' is not a valid property value';
SInvalidLicense = 'License information for %s is invalid';
SNotLicensed = 'License information for %s not found. You cannot use this control in design mode';
SCannotActivate = 'OLE control activation failed';
SNoWindowHandle = 'Could not obtain OLE control window handle';
type
TInvoke = (CreateWnd = 0, SetBounds = 1, DestroyWindowHandle = 2);
implementation
end. |
program JTower;
(* copyright 1991 by Art Steinmetz *)
(* freely distributable *)
{$N+,E+}
(* {$DEFINE DEBUG} *)
uses CRT,
Graph,
Drivers,
MathLib0, {FLOAT, Max, Min , ln10 }
KeyCodes, { GetKey, ESC }
BoundRgn; { MarkHorizLine }
CONST
X0 = 1.5;
y0 = 1.5;
ColorChanges = 32;
CheatFill = FALSE;
VAR
XWidth, YWidth : INTEGER;
ScanLine, iter : WORD;
realC0, realCMax,
realCScale,
realC,imgC : FLOAT;
{ ---------------------------------------------------------------}
PROCEDURE DisplayHelp;
BEGIN
Writeln('usage: JTOWER [<Imaginary_C>] [<IterationsPerLine>]');
Writeln;
Writeln('After tower is done a coordinate grid will appear.');
Writeln('At this point use Up/PgUp or Dn/PgDn to move a');
Writeln('cursor line to a position corresponding to a point');
Writeln('on the real axis of the Mandelbrot set. Hit <return>');
Writeln('to view the Julia set at that point. Then hit any key');
Writeln('to return to the tower. <ESC> quits.');
Writeln(' Copyright 1991 Freely Distributable');
Writeln(' by Art Steinmetz (CIS 76044,3204; BIX asteinmetz)');
END;
{ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
FUNCTION Abort : BOOLEAN;
VAR
ChCode : INTEGER;
BEGIN
IF KeyPressed THEN
BEGIN
ChCode := GetKey;
IF ((ChCode = Break) OR (ChCode = ESC)) THEN
BEGIN
CloseGraph;
HALT;
END;
END
ELSE Abort := FALSE;
END; { Abort }
{ ---------------------------------------------------------------}
PROCEDURE GetTowerParams(VAR iC : FLOAT;
VAR iter :WORD);
VAR
code : INTEGER;
BEGIN
if paramstr(1) = '?' THEN BEGIN
DisplayHelp;
Halt;
END;
val(paramstr(1),iC,code);
IF code > 0 THEN iC := 0.0;
val(paramstr(2),iter,code);
IF code > 0 THEN iter := 100;
END;
{ ---------------------------------------------------------------}
PROCEDURE OpenGraph(VAR XRes : INTEGER; VAR YRes : INTEGER);
VAR
GraphDriver, GraphMode : INTEGER;
Begin
IF RegisterBGIdriver(@EGAVGADriverProc) < 0 then
BEGIN
Writeln('Graph error');
HALT;
END;
GraphDriver := VGA;
GraphMode := 1; { 2 page mode for VGA and EGA }
InitGraph(GraphDriver,GraphMode,'');
XRes := GetMaxX;
YRes := GetMaxY;
end;
{ ---------------------------------------------------------------}
PROCEDURE SetColors;
VAR
i : WORD;
BEGIN
SetPalette(1 ,White);
SetPalette(2 ,LightRed);
SetPalette(3 ,LightMagenta);
SetPalette(4 ,Red);
SetPalette(5 ,Magenta);
SetPalette(6, DarkGray);
SetPalette(7 ,White);
SetPalette(7 ,LightCyan);
SetPalette(8 ,LightBlue);
SetPalette(9 ,Cyan);
SetPalette(10,Blue);
SetPalette(11, DarkGray);
SetPalette(12 ,White);
SetPalette(13,LightGreen);
SetPalette(14,Green);
SetPalette(15, DarkGray);
END;
{ ---------------------------------------------------------------}
PROCEDURE Julia(x,y,p,q : FLOAT; maxiter : WORD);
(* x, y : initial values. p, q : c = p + qi *)
VAR
i : WORD;
color,
m, n : INTEGER;
XScale,
YScale,
wx, wy,
theta,
halfpi,
root : FLOAT;
BEGIN
color := 1;
Randomize; { init random # generator }
XScale := XWidth/4;
YScale := YWidth/4;
wx := x;
wy := y;
halfpi := pi/2;
i := 0;
WHILE (i < maxiter) AND NOT Abort DO
BEGIN
wx := wx - p;
wy := wy - q;
IF wx > 0 THEN theta := arctan(wy/wx)
ELSE IF wx < 0 THEN theta := pi + arctan(wy/wx)
ELSE theta := halfpi; { wx := 0 }
theta := theta / 2;
root := sqrt(wx*wx+wy*wy);
IF random < 0.5 THEN
root := sqrt(root)
ELSE
root := -sqrt(root);
wx := root * cos(theta);
wy := root * sin(theta);
m := round( (2 + wx) * XScale);
n := round( (2 + wy) * YScale);
PutPixel(m,n, color);
INC(i);
END; {WHILE}
END;
{ ---------------------------------------------------------------}
PROCEDURE JuliaTower(x0,y0,p,q : FLOAT; Line : WORD; maxiter : WORD);
(* x, y : initial values. p, q : c = p + qi *)
CONST
MaxImgC = 2.0;
UseAbsolutes = FALSE;
VAR
PixelColor,
i : WORD;
x, y : INTEGER;
RangePerColor,
XScale,
YScale,
wx, wy,
theta,
halfpi,
root : FLOAT;
BEGIN
Randomize; { init random # generator }
RangePerColor := MaxImgC / ColorChanges;
i := GetMaxX;
{ est. max range of set is -2 to 2, or 4 units }
{ so there are Width /4 pixels per unit }
XScale := XWidth/4;
YScale := YWidth/4;
wx := x0;
wy := y0;
halfpi := pi/2;
i := 0;
WHILE (i < maxiter) AND NOT Abort DO
BEGIN
wx := wx - p;
wy := wy - q;
IF wx > 0 THEN theta := arctan(wy/wx)
ELSE IF wx < 0 THEN theta := pi + arctan(wy/wx)
ELSE theta := halfpi; { wx := 0 }
theta := theta / 2;
root := sqrt(wx*wx+wy*wy);
IF random < 0.5 THEN
root := sqrt(root)
ELSE
root := -sqrt(root);
wx := root * cos(theta);
wy := root * sin(theta);
x := round( (2 + wx) * XScale);
IF UseAbsolutes THEN wy := ABS(wy);
IF (wy > 0) AND (wy < 2.0) THEN
BEGIN
{ assign color based on distance from 2.0, real Y }
PixelColor := round(wy / RangePerColor) mod GetMaxColor + 1 ;
If GetPixel(x,Line) < PixelColor THEN
PutPixel(x,Line, PixelColor);
END;
INC(i);
END; {WHILE}
END;
{ ---------------------------------------------------------------}
PROCEDURE JuliaSlice(VAR YLine : INTEGER);
(* sets YLine to -1 if users presses ESC to abort *)
(* Draws single set using 10 times the iterations specified for *)
(* each slice of the tower *)
BEGIN
MarkHorizLine(YLine,1);
SetActivePage(1);
ClearViewPort;
SetVisualPage(1);
realC := realC0 + RealCScale * YLine;
Julia(X0,Y0,realC,imgC,iter*10);
(* pause, check for exit *)
IF GetKey = ESC THEN YLine := -1;
SetActivePage(0);
SetVisualPage(0);
END;
{ ---------------------------------------------------------------}
PROCEDURE FillInLine(CurrLine : WORD);
BEGIN
(* image processing to interpolate dots *)
END;
{ ---------------------------------------------------------------}
PROCEDURE DrawGrid(X0,Y0, Xrange, Yrange : FLOAT;
x1,y1,x2,y2 : WORD);
CONST
ticks = 10;
VAR
valstr : string;
Xscale, YScale : FLOAT;
i,
Xdecimals, Ydecimals,
Xtick, Ytick : WORD;
BEGIN
setcolor(LightRed);
Xdecimals := max(trunc(ln(Xrange) / ln10) * -1, 0) + 2;
Ydecimals := max(trunc(ln(Yrange) / ln10) * -1, 0) + 2;
IF x2 > GetMaxX then x2 := GetMaxX;
IF y2 > GetMaxY then y2 := GetMaxY;
Rectangle(x1,y1,x2,y2);
Xtick := round((x2-x1)/ticks);
Ytick := round((y2-y1)/ticks);
XScale := Xrange/ticks;
YScale := Yrange/ticks;
FOR i := 0 TO ticks DO
BEGIN
{ do the X range }
str(X0+XScale*i:5:Xdecimals,valstr);
MoveTo(x1+Xtick*i,y1);
LineTo(x1+Xtick*i,y1+Ytick div 4);
IF i < ticks THEN OutText(valstr);
MoveTo(x1+Xtick*i,y2);
LineTo(x1+Xtick*i,y2-Ytick div 5);
IF i < ticks THEN OutText(valstr);
{ do the Y range }
str(Y0+YScale*i:5:Ydecimals,valstr);
MoveTo(x1,y1+Ytick*i);
LineTo(x1+Xtick div 5,y1+Ytick*i);
IF i > 0 THEN OutText(valstr);
MoveTo(x2,y1+Ytick*i);
LineTo(x2-Xtick div 5,y1+Ytick*i);
{ add another MoveTo to put us on left side of axis }
MoveTo(x2-45,y1+Ytick*i);
IF i > 0 THEN OutText(valstr);
END;
END;
{ ---------------------------------------------------------------}
PROCEDURE Finish;
VAR
StartLine : INTEGER;
aspect : FLOAT;
BEGIN
aspect := XWidth/YWidth;
IF aspect > 1.0 THEN
DrawGrid(-2.0,-2.0,4.0 * aspect, 4.0, 0, 0, XWidth, YWidth)
ELSE
DrawGrid(-2.0,-2.0,4.0, 4.0/aspect, 0, 0, XWidth, YWidth);
IF GetKey <> ESC THEN
BEGIN
StartLine := GetMaxY DIV 2;
REPEAT JuliaSlice(StartLine) UNTIL StartLine < 0;
END;
CloseGraph;
Halt;
END;
{ ---------------------------------------------------------------}
FUNCTION GetScale(max,min : FLOAT) : FLOAT;
BEGIN
GetScale := ABS((max-min) / GetMaxY);
END;
{ ---------------------------------------------------------------}
BEGIN
realC0 := -2.0;
realCMax := 0.75;
imgC := 1;
GetTowerParams(imgC,iter);
OpenGraph(XWidth,YWidth);
SetColors;
{$IFDEF DEBUG}
RestoreCRTMode;
{$ENDIF}
RealCScale := GetScale(realC0,realCMax);
FOR ScanLine := GetMaxY DOWNTO 0 DO
BEGIN
realC := realC0 + RealCScale * ScanLine;
JuliaTower(x0,y0,realC,imgC,ScanLine,iter);
IF CheatFill THEN FillInLine(ScanLine);
END;
Finish;
END.
|
unit WkeWebView;
interface
uses
SysUtils, Classes, Messages, Windows, WkeTypes, WkeApi, WkeIntf, Imm;
type
TWkeWebView = class;
TWkeTimer = class
private
FInterval: Cardinal;
FWindowHandle: HWND;
FOnTimer: TNotifyEvent;
FEnabled: Boolean;
procedure UpdateTimer;
procedure SetEnabled(Value: Boolean);
procedure SetInterval(Value: Cardinal);
procedure SetOnTimer(Value: TNotifyEvent);
procedure WndProc(var Msg: TMessage);
protected
procedure Timer; dynamic;
public
constructor Create;
destructor Destroy; override;
property Enabled: Boolean read FEnabled write SetEnabled;
property Interval: Cardinal read FInterval write SetInterval;
property OnTimer: TNotifyEvent read FOnTimer write SetOnTimer;
end;
TWkeWebView = class(TInterfacedObject, IWkeWebView)
private
FThis: Pointer;
FImeCount: Integer;
FImeResult: WideString;
FUserAgent: WideString;
FDestroying: Boolean;
FWebView: TWebView;
FOwnView: Boolean;
FJs: IWkeJs;
FData1: Pointer;
FData2: Pointer;
FIsFocused: Boolean;
FInvalidate: Boolean;
FWebViewUpdateTimer: TWkeTimer;
FObjectList: IWkeJsObjectList;
FOnTitleChange: TWkeWebViewTitleChangeProc;
FOnURLChange: TWkeWebViewURLChangeProc;
FOnPaintUpdated: TWkeWebViewPaintUpdatedProc;
FOnAlertBoxProc: TWkeWebViewAlertBoxProc;
FOnConfirmBoxProc: TWkeWebViewConfirmBoxProc;
FOnPromptBoxProc: TWkeWebViewPromptBoxProc;
FOnConsoleMessageProc: TWkeWebViewConsoleMessageProc;
FOnNavigationProc: TWkeWebViewNavigationProc;
FOnCreateViewProc: TWkeWebViewCreateViewProc;
FOnDocumentReadyProc: TWkeWebViewDocumentReadyProc;
FOnLoadingFinishProc: TWkeWebViewLoadingFinishProc;
FOnInvalidate: TWkeInvalidateProc;
FOnContextMenu: TWkeContextMenuProc;
FOnWndProc: TWkeWndProc;
FOnWndDestory: TWkeWndDestoryProc;
private
function GetThis: IWkeWebBase; virtual;
function GetWebView: TWebView;
function GetName: WideString;
function GetTransparent: Boolean;
function GetTitle: WideString;
function GetUserAgent: WideString;
function GetCookie: WideString;
function GetHostWindow: HWND;
function GetWidth: Integer;
function GetHeight: Integer;
function GetContentWidth: Integer;
function GetContentHeight: Integer;
function GetViewDC(): Pointer;
function GetCursorType: wkeCursorType;
function GetDirty: Boolean;
function GetFocused: Boolean;
function GetCookieEnabled: Boolean;
function GetMediaVolume: float;
function GetCaretRect: wkeRect;
function GetZoomFactor: float;
function GetEnabled: Boolean;
function GetJs: IWkeJs;
function GetData1: Pointer;
function GetData2: Pointer;
function GetOnTitleChange: TWkeWebViewTitleChangeProc;
function GetOnURLChange: TWkeWebViewURLChangeProc;
function GetOnPaintUpdated: TWkeWebViewPaintUpdatedProc;
function GetOnAlertBox: TWkeWebViewAlertBoxProc;
function GetOnConfirmBox: TWkeWebViewConfirmBoxProc;
function GetOnConsoleMessage: TWkeWebViewConsoleMessageProc;
function GetOnCreateView: TWkeWebViewCreateViewProc;
function GetOnDocumentReady: TWkeWebViewDocumentReadyProc;
function GetOnLoadingFinish: TWkeWebViewLoadingFinishProc;
function GetOnNavigation: TWkeWebViewNavigationProc;
function GetOnPromptBox: TWkeWebViewPromptBoxProc;
function GetOnInvalidate: TWkeInvalidateProc;
function GetOnContextMenu: TWkeContextMenuProc;
function GetOnWndProc: TWkeWndProc;
function GetOnWndDestory: TWkeWndDestoryProc;
procedure SetName(const Value: WideString);
procedure SetTransparent(const Value: Boolean);
procedure SetUserAgent(const Value: WideString);
procedure SetHostWindow(const Value: HWND);
procedure SetDirty(const Value: Boolean);
procedure SetCookieEnabled(const Value: Boolean);
procedure SetMediaVolume(const Value: float);
procedure SetZoomFactor(const Value: float);
procedure SetEnabled(const Value: Boolean);
procedure SetData1(const Value: Pointer);
procedure SetData2(const Value: Pointer);
procedure SetOnTitleChange(const Value: TWkeWebViewTitleChangeProc);
procedure SetOnURLChange(const Value: TWkeWebViewURLChangeProc);
procedure SetOnPaintUpdated(const Value: TWkeWebViewPaintUpdatedProc);
procedure SetOnAlertBox(const Value: TWkeWebViewAlertBoxProc);
procedure SetOnConfirmBox(const Value: TWkeWebViewConfirmBoxProc);
procedure SetOnConsoleMessage(const Value: TWkeWebViewConsoleMessageProc);
procedure SetOnCreateView(const Value: TWkeWebViewCreateViewProc);
procedure SetOnDocumentReady(const Value: TWkeWebViewDocumentReadyProc);
procedure SetOnLoadingFinish(const Value: TWkeWebViewLoadingFinishProc);
procedure SetOnNavigation(const Value: TWkeWebViewNavigationProc);
procedure SetOnPromptBox(const Value: TWkeWebViewPromptBoxProc);
procedure SetOnInvalidate(const Value: TWkeInvalidateProc);
procedure SetOnContextMenu(const Value: TWkeContextMenuProc);
procedure SetOnWndProc(const Value: TWkeWndProc);
procedure SetOnWndDestory(const Value: TWkeWndDestoryProc);
protected
function _AddRef: Integer; stdcall;
function _Release: Integer; stdcall;
procedure DoAlertBox(const msg: wkeString);
function DoConfirmBox(const msg: wkeString): Boolean;
function DoOnPromptBox(const msg, defaultResult, result_: wkeString): Boolean;
procedure DoPaintUpdated(const hdc: HDC; x, y, cx, cy: Integer);
procedure DoDocumentReady(const info: PwkeDocumentReadyInfo);
function DoCreateView(const info: PwkeNewViewInfo): TWebView;
function DoNavigation(navigationType: wkeNavigationType; const url: wkeString): Boolean;
procedure DoLoadingFinish(const url: wkeString; result_: wkeLoadingResult; const failedReason: wkeString);
procedure DoRegObjectsNotify(const AInfo: IWkeJsObjectRegInfo; Action: TWkeJsObjectAction);
procedure DoWebViewUpdateTimer(Sender: TObject);
procedure DoBeforeLoadHtml();
procedure DoAfterLoadHtml();
public
constructor Create(const AThis: IWkeWebBase); overload;
constructor Create(const AThis: IWkeWebBase; const AWebView: TWebView; const AOwnView: Boolean = True); overload;
destructor Destroy; override;
function ProcND(msg: UINT; wParam: WPARAM; lParam: LPARAM; var pbHandled: Boolean): LRESULT; virtual;
procedure Close;
procedure Show(nCmdShow: Integer = SW_SHOW);
procedure Hide;
function IsShowing: Boolean;
procedure LoadURL(const url: WideString);
procedure PostURL(const url: WideString; const postData: PAnsiChar; postLen: Integer);
procedure LoadHTML(const html: WideString); overload;
procedure LoadHTML(const html: PUtf8); overload;
procedure LoadFile(const filename: WideString);
procedure Load(const str: PUtf8); overload;
procedure Load(const str: WideString); overload;
procedure Update;
procedure Invalidate;
function IsLoading: Boolean;
function IsLoadSucceeded: Boolean; (*document load sucessed*)
function IsLoadFailed: Boolean; (*document load failed*)
function IsLoadComplete: Boolean; (*document load complete*)
function IsDocumentReady: Boolean; (*document ready*)
procedure StopLoading;
procedure Reload;
procedure Resize(w: Integer; h: Integer);
procedure AddDirtyArea(x, y, w, h: Integer);
procedure LayoutIfNeeded;
procedure RepaintIfNeeded;
procedure Paint(bits: Pointer; pitch: Integer); overload;
procedure Paint(bits: Pointer; bufWid, bufHei, xDst, yDst, w, h,
xSrc, ySrc: Integer; bCopyAlpha: Boolean); overload;
function CanGoBack: Boolean;
function GoBack: Boolean;
function CanGoForward: Boolean;
function GoForward: Boolean;
procedure EditerSelectAll;
function EditerCanCopy: Boolean;
procedure EditerCopy;
function EditerCanCut: Boolean;
procedure EditerCut;
function EditerCanPaste: Boolean;
procedure EditerPaste;
function EditerCanDelete: Boolean;
procedure EditerDelete;
function EditerCanUndo: Boolean;
procedure EditerUndo;
function EditerCanRedo: Boolean;
procedure EditerRedo;
function MouseEvent(msg: UINT; x, y: Integer; flags: UINT): Boolean;
function ContextMenuEvent(x, y: Integer; flags: UINT): Boolean;
function MouseWheel(x, y, delta: Integer; flags: UINT): Boolean;
function KeyUp(virtualKeyCode: UINT; flags: UINT; systemKey: Boolean): Boolean;
function KeyDown(virtualKeyCode: UINT; flags: UINT; systemKey: Boolean): Boolean;
function KeyPress(charCode: UINT; flags: UINT; systemKey: Boolean): Boolean;
procedure SetFocus;
procedure KillFocus;
function RunJS(const script: PUtf8): jsValue; overload;
function RunJS(const script: WideString): jsValue; overload;
function GlobalExec: jsExecState;
procedure Sleep(); //moveOffscreen
procedure Wake(); //moveOnscreen
function IsAwake: Boolean;
procedure SetEditable(editable: Boolean);
procedure BindObject(const objName: WideString; obj: TObject);
procedure UnbindObject(const objName: WideString);
property This: IWkeWebBase read GetThis;
property WebView: TWebView read GetWebView;
property Name: WideString read GetName write SetName;
property Transparent: Boolean read GetTransparent write SetTransparent;
property Title: WideString read GetTitle;
property UserAgent: WideString read GetUserAgent write SetUserAgent;
property Cookie: WideString read GetCookie;
property HostWindow: HWND read GetHostWindow write SetHostWindow;
property Width: Integer read GetWidth; (*viewport width*)
property Height: Integer read GetHeight; (*viewport height*)
property ContentWidth: Integer read GetContentWidth; (*contents width*)
property ContentHeight: Integer read GetContentHeight; (*contents height*)
property ViewDC: Pointer read GetViewDC;
property CursorType: wkeCursorType read GetCursorType;
property IsFocused: Boolean read GetFocused;
property IsDirty: Boolean read GetDirty write SetDirty;
property CookieEnabled: Boolean read GetCookieEnabled write SetCookieEnabled;
property MediaVolume: float read GetMediaVolume write SetMediaVolume;
property CaretRect: wkeRect read GetCaretRect;
property ZoomFactor: float read GetZoomFactor write SetZoomFactor;
property Enabled: Boolean read GetEnabled write SetEnabled;
property Js: IWkeJs read GetJs;
property Data1: Pointer read GetData1 write SetData1;
property Data2: Pointer read GetData2 write SetData2;
property OnTitleChange: TWkeWebViewTitleChangeProc read GetOnTitleChange write SetOnTitleChange;
property OnURLChange: TWkeWebViewURLChangeProc read GetOnURLChange write SetOnURLChange;
property OnPaintUpdated: TWkeWebViewPaintUpdatedProc read GetOnPaintUpdated write SetOnPaintUpdated;
property OnAlertBox: TWkeWebViewAlertBoxProc read GetOnAlertBox write SetOnAlertBox;
property OnConfirmBox: TWkeWebViewConfirmBoxProc read GetOnConfirmBox write SetOnConfirmBox;
property OnPromptBox: TWkeWebViewPromptBoxProc read GetOnPromptBox write SetOnPromptBox;
property OnConsoleMessage: TWkeWebViewConsoleMessageProc read GetOnConsoleMessage write SetOnConsoleMessage;
property OnNavigation: TWkeWebViewNavigationProc read GetOnNavigation write SetOnNavigation;
property OnCreateView: TWkeWebViewCreateViewProc read GetOnCreateView write SetOnCreateView;
property OnDocumentReady: TWkeWebViewDocumentReadyProc read GetOnDocumentReady write SetOnDocumentReady;
property OnLoadingFinish: TWkeWebViewLoadingFinishProc read GetOnLoadingFinish write SetOnLoadingFinish;
property OnInvalidate: TWkeInvalidateProc read GetOnInvalidate write SetOnInvalidate;
property OnContextMenu: TWkeContextMenuProc read GetOnContextMenu write SetOnContextMenu;
property OnWndProc: TWkeWndProc read GetOnWndProc write SetOnWndProc;
property OnWndDestory: TWkeWndDestoryProc read GetOnWndDestory write SetOnWndDestory;
end;
TWkeWindow = class(TWkeWebView, IWkeWebBase, IWkeWindow)
private
FWindowType: wkeWindowType;
FIsModaling: Boolean;
FModalCode: Integer;
FOnClosing: TWkeWindowClosingProc;
FOnDestroy: TWkeWindowDestroyProc;
protected
function GetThis: IWkeWebBase; override;
function GetTitle: WideString;
function GetWindowHandle: HWND;
function GetWindowType: wkeWindowType;
function GetIsModaling: Boolean;
function GetModalCode: Integer;
function GetOnClosing: TWkeWindowClosingProc;
function GetOnDestroy: TWkeWindowDestroyProc;
procedure SetTitle(const AValue: WideString);
procedure SetModalCode(const Value: Integer);
procedure SetOnClosing(const AValue: TWkeWindowClosingProc);
procedure SetOnDestroy(const AValue: TWkeWindowDestroyProc);
protected
function _AddRef: Integer; stdcall;
function _Release: Integer; stdcall;
function DoClosing: Boolean;
procedure DoDestroy;
{ IWkeWebBase }
function GetWindowName: WideString;
function GetHwnd: HWND;
function GetResourceInstance: THandle;
function GetBoundsRect: TRect;
function GetDrawRect: TRect;
function GetDrawDC: HDC;
procedure ReleaseDC(const ADC: HDC);
public
constructor Create(type_: wkeWindowType; parent: HWND; x, y, width, height: Integer); overload;
destructor Destroy; override;
procedure ShowWindow();
procedure HideWindow();
procedure EnableWindow(enable: Boolean);
procedure CloseWindow;
procedure DestroyWindow;
function ShowModal(AParent: HWND = 0): Integer;
procedure EndModal(nCode: Integer);
procedure MoveWindow(x, y, width, height: Integer);
procedure MoveToCenter;
procedure ResizeWindow(width, height: Integer);
property Title: WideString read GetTitle write SetTitle;
property WindowHandle: HWND read GetWindowHandle;
property WindowType: wkeWindowType read GetWindowType;
property IsModaling: Boolean read GetIsModaling;
property ModalCode: Integer read GetModalCode write SetModalCode;
property OnClosing: TWkeWindowClosingProc read GetOnClosing write SetOnClosing;
property OnDestroy: TWkeWindowDestroyProc read GetOnDestroy write SetOnDestroy;
end;
procedure _wkeTitleChangedCallback(webView: WkeTypes.wkeWebView; param: Pointer; const title: wkeString); cdecl;
procedure _wkeURLChangedCallback(webView: WkeTypes.wkeWebView; param: Pointer; const url: wkeString); cdecl;
procedure _wkePaintUpdatedCallback(webView: WkeTypes.wkeWebView; param: Pointer; const hdc: HDC; x, y, cx, cy: Integer); cdecl;
procedure _wkeOnAlertBox(webView: WkeTypes.wkeWebView; param: Pointer; const msg: wkeString); cdecl;
function _wkeOnConfirmBox(webView: WkeTypes.wkeWebView; param: Pointer; const msg: wkeString): Boolean; cdecl;
function _wkeOnPromptBox(webView: WkeTypes.wkeWebView; param: Pointer; const msg, defaultResult: wkeString; result_: wkeString): Boolean; cdecl;
procedure _wkeOnConsoleMessage(webView: WkeTypes.wkeWebView; param: Pointer; const msg: PwkeConsoleMessage);cdecl;
function _wkeOnNavigation(webView: WkeTypes.wkeWebView; param: Pointer; navigationType: wkeNavigationType; const url: wkeString): Boolean;cdecl;
function _wkeOnCreateView(webView: WkeTypes.wkeWebView; param: Pointer; const info: PwkeNewViewInfo): WkeTypes.wkeWebView; cdecl;
procedure _wkeOnDocumentReady(webView: WkeTypes.wkeWebView; param: Pointer; const info: PwkeDocumentReadyInfo);cdecl;
procedure _wkeOnLoadingFinish(webView: WkeTypes.wkeWebView; param: Pointer; const url: wkeString; result_: wkeLoadingResult; const failedReason: wkeString);cdecl;
function _OnWindowClosing(webView: WkeTypes.wkeWebView; param: Pointer): Boolean;cdecl;
procedure _OnWindowDestroy(webView: WkeTypes.wkeWebView; param: Pointer);cdecl;
function GET_X_LPARAM(const lp: LPARAM): Integer;
function GET_Y_LPARAM(const lp: LPARAM): Integer;
function GET_WHEEL_DELTA_WPARAM(const wp: WPARAM): Integer;
function GlobalFunction: TStrings;
{$IF CompilerVersion > 18.5}
function ShellExecute(hWnd: HWND; Operation, FileName, Parameters,
Directory: PWideChar; ShowCmd: Integer): HINST; stdcall; external 'shell32.dll' name 'ShellExecuteW';
{$ELSE}
function ShellExecute(hWnd: HWND; Operation, FileName, Parameters,
Directory: PAnsiChar; ShowCmd: Integer): HINST; stdcall; external 'shell32.dll' name 'ShellExecuteA';
{$IFEND}
{$IF CompilerVersion <= 18.5}
function UTF8ToWideString(const S: AnsiString): WideString;
{$IFEND}
implementation
uses
WkeJs, StrUtils{$IF CompilerVersion > 18.5}, Types{$IFEND};
resourcestring
SNoTimers = '没有足够的可用计时器';
var
varGlobalFunction: TStrings = nil;
function GlobalFunction: TStrings;
begin
if varGlobalFunction = nil then
varGlobalFunction := TStringList.Create;
Result := varGlobalFunction;
end;
{$IF CompilerVersion <= 18.5}
function UTF8ToWideString(const S: AnsiString): WideString;
begin
Result := S;
end;
{$IFEND}
procedure _wkeTitleChangedCallback(webView: WkeTypes.wkeWebView; param: Pointer; const title: wkeString); cdecl;
var
LWebView: TWkeWebView;
begin
LWebView := param;
if @LWebView.FOnTitleChange <> nil then
try
LWebView.FOnTitleChange(LWebView, WAPI.wkeGetStringW(title));
except
on E: Exception do
begin
Trace('[OnTitleChange]'+E.Message);
end
end;
end;
procedure _wkeURLChangedCallback(webView: WkeTypes.wkeWebView; param: Pointer; const url: wkeString); cdecl;
var
LWebView: TWkeWebView;
begin
LWebView := param;
if @LWebView.FOnURLChange <> nil then
try
LWebView.FOnURLChange(LWebView, WAPI.wkeGetStringW(url));
except
on E: Exception do
begin
Trace('[OnURLChange]'+E.Message);
end
end;
end;
procedure _wkePaintUpdatedCallback(webView: WkeTypes.wkeWebView; param: Pointer; const hdc: HDC; x, y, cx, cy: Integer); cdecl;
var
LWebView: TWkeWebView;
begin
LWebView := param;
LWebView.DoPaintUpdated(hdc, x, y, cx, cy);
end;
procedure _wkeOnAlertBox(webView: WkeTypes.wkeWebView; param: Pointer; const msg: wkeString); cdecl;
var
LWebView: TWkeWebView;
begin
LWebView := param;
LWebView.DoAlertBox(msg);
end;
function _wkeOnConfirmBox(webView: WkeTypes.wkeWebView; param: Pointer; const msg: wkeString): Boolean; cdecl;
var
LWebView: TWkeWebView;
begin
LWebView := param;
Result := LWebView.DoConfirmBox(msg);
end;
function _wkeOnPromptBox(webView: WkeTypes.wkeWebView; param: Pointer; const msg, defaultResult: wkeString; result_: wkeString): Boolean; cdecl;
var
LWebView: TWkeWebView;
begin
LWebView := param;
Result := LWebView.DoOnPromptBox(msg, defaultResult, result_);
end;
procedure _wkeOnConsoleMessage(webView: WkeTypes.wkeWebView; param: Pointer; const msg: PwkeConsoleMessage);cdecl;
var
LWebView: TWkeWebView;
begin
LWebView := param;
if @LWebView.FOnConsoleMessageProc <> nil then
try
LWebView.FOnConsoleMessageProc(LWebView, msg);
except
on E: Exception do
begin
Trace('[OnConsoleMessageProc]'+E.Message);
end
end;
end;
function _wkeOnNavigation(webView: WkeTypes.wkeWebView; param: Pointer;
navigationType: wkeNavigationType; const url: wkeString): Boolean;cdecl;
var
LWebView: TWkeWebView;
begin
LWebView := param;
Result := LWebView.DoNavigation(navigationType, url);
end;
function _wkeOnCreateView(webView: WkeTypes.wkeWebView; param: Pointer;
const info: PwkeNewViewInfo): WkeTypes.wkeWebView; cdecl;
var
LWebView: TWkeWebView;
begin
LWebView := param;
Result := LWebView.DoCreateView(info)
end;
procedure _wkeOnDocumentReady(webView: WkeTypes.wkeWebView; param: Pointer; const info: PwkeDocumentReadyInfo);cdecl;
var
LWebView: TWkeWebView;
begin
LWebView := param;
try
LWebView.DoDocumentReady(info);
except
on E: Exception do
begin
Trace('[DoDocumentReady]'+E.Message);
end
end;
end;
procedure _wkeOnLoadingFinish(webView: WkeTypes.wkeWebView; param: Pointer;
const url: wkeString; result_: wkeLoadingResult; const failedReason: wkeString);cdecl;
var
LWebView: TWkeWebView;
begin
LWebView := param;
try
LWebView.DoLoadingFinish(url, result_, failedReason);
except
on E: Exception do
begin
Trace('[DoLoadingFinish]'+E.Message);
end
end;
end;
function _OnWindowClosing(webView: WkeTypes.wkeWebView; param: Pointer): Boolean;cdecl;
var
LWindow: TWkeWindow;
begin
LWindow := param;
Result := LWindow.DoClosing;
end;
procedure _OnWindowDestroy(webView: WkeTypes.wkeWebView; param: Pointer);cdecl;
var
LWindow: TWkeWindow;
begin
LWindow := param;
LWindow.DoDestroy;
end;
function GET_X_LPARAM(const lp: LPARAM): Integer;
begin
Result := Integer(short(LOWORD(lp)));
end;
function GET_Y_LPARAM(const lp: LPARAM): Integer;
begin
Result := Integer(short(HIWORD(lp)));
end;
function GET_WHEEL_DELTA_WPARAM(const wp: WPARAM): Integer;
begin
Result := Integer(short(HIWORD(wp)));
end;
{ TTimer }
constructor TWkeTimer.Create();
begin
inherited;
FEnabled := False;
FInterval := 1000;
FWindowHandle := Classes.AllocateHWnd(WndProc);
end;
destructor TWkeTimer.Destroy;
begin
FEnabled := False;
UpdateTimer;
Classes.DeallocateHWnd(FWindowHandle);
inherited Destroy;
end;
procedure TWkeTimer.WndProc(var Msg: TMessage);
begin
with Msg do
if Msg = WM_TIMER then
try
Timer;
except
on e: Exception do
begin
Trace('[TTimer.WndProc]'+e.Message);
raise;
end;
end
else
Result := DefWindowProc(FWindowHandle, Msg, wParam, lParam);
end;
procedure TWkeTimer.UpdateTimer;
begin
KillTimer(FWindowHandle, 1);
if (FInterval <> 0) and FEnabled and Assigned(FOnTimer) then
if SetTimer(FWindowHandle, 1, FInterval, nil) = 0 then
raise EOutOfResources.Create(SNoTimers);
end;
procedure TWkeTimer.SetEnabled(Value: Boolean);
begin
if Value <> FEnabled then
begin
FEnabled := Value;
UpdateTimer;
end;
end;
procedure TWkeTimer.SetInterval(Value: Cardinal);
begin
if Value <> FInterval then
begin
FInterval := Value;
UpdateTimer;
end;
end;
procedure TWkeTimer.SetOnTimer(Value: TNotifyEvent);
begin
FOnTimer := Value;
UpdateTimer;
end;
procedure TWkeTimer.Timer;
begin
if Assigned(FOnTimer) then FOnTimer(Self);
end;
{ TWkeWebView }
procedure TWkeWebView.AddDirtyArea(x, y, w, h: Integer);
begin
WAPI.wkeAddDirtyArea(FWebView, x, y, w, h);
end;
procedure TWkeWebView.Wake;
begin
WAPI.wkeWake(FWebView);
end;
function TWkeWebView.CanGoBack: Boolean;
begin
Result := WAPI.wkeCanGoBack(FWebView);
end;
function TWkeWebView.CanGoForward: Boolean;
begin
Result := WAPI.wkeCanGoForward(FWebView);
end;
procedure TWkeWebView.Close;
begin
if FDestroying then
Exit;
if this.GetHwnd <> 0 then
begin
CloseWindow(this.GetHwnd);
end;
end;
function TWkeWebView.ContextMenuEvent(x, y: Integer; flags: UINT): Boolean;
begin
Result := False;
if FDestroying then
Exit;
Result := WAPI.wkeFireContextMenuEvent(FWebView, x, y, flags);
if @FOnContextMenu <> nil then
try
FOnContextMenu(Self, x, y, flags);
except
on E: Exception do
begin
Trace('[TWkeWebView.OnContextMenu]'+E.Message);
end
end;
end;
procedure TWkeWebView.EditerCopy;
begin
WAPI.wkeEditorCopy(FWebView);
end;
constructor TWkeWebView.Create(const AThis: IWkeWebBase);
begin
Create(AThis, WAPI.wkeCreateWebView, True);
end;
constructor TWkeWebView.Create(const AThis: IWkeWebBase; const AWebView: TWebView;
const AOwnView: Boolean);
begin
FWebView := AWebView;
FOwnView := AOwnView;
FThis := Pointer(AThis);
FObjectList := TWkeJsObjectList.Create;
// Trace('wkeOnTitleChanged'+ IntToStr(Integer(@WAPI.wkeOnTitleChanged)));
// Trace('wkeOnURLChanged'+ IntToStr(Integer(@WAPI.wkeOnURLChanged)));
// Trace('wkeOnPaintUpdated'+ IntToStr(Integer(@WAPI.wkeOnPaintUpdated)));
// Trace('wkeOnAlertBox'+ IntToStr(Integer(@WAPI.wkeOnAlertBox)));
// Trace('wkeOnConfirmBox'+ IntToStr(Integer(@WAPI.wkeOnConfirmBox)));
// Trace('wkeOnPromptBox'+ IntToStr(Integer(@WAPI.wkeOnPromptBox)));
// Trace('wkeOnConsoleMessage'+ IntToStr(Integer(@WAPI.wkeOnConsoleMessage)));
// Trace('wkeOnNavigation'+ IntToStr(Integer(@WAPI.wkeOnNavigation)));
// Trace('wkeOnCreateView'+ IntToStr(Integer(@WAPI.wkeOnCreateView)));
// Trace('wkeOnDocumentReady'+ IntToStr(Integer(@WAPI.wkeOnDocumentReady)));
// Trace('wkeOnLoadingFinish'+ IntToStr(Integer(@WAPI.wkeOnLoadingFinish)));
// Trace('wkeSetUserAgent'+ IntToStr(Integer(@WAPI.wkeSetUserAgent)));
// Trace('wkeSetUserData'+ IntToStr(Integer(@WAPI.wkeSetUserData)));
WAPI.wkeOnTitleChanged(FWebView, _wkeTitleChangedCallback, Self);
WAPI.wkeOnURLChanged(FWebView, _wkeURLChangedCallback, Self);
WAPI.wkeOnPaintUpdated(FWebView, _wkePaintUpdatedCallback, Self);
WAPI.wkeOnAlertBox(FWebView, _wkeOnAlertBox, Self);
WAPI.wkeOnConfirmBox(FWebView, _wkeOnConfirmBox, Self);
WAPI.wkeOnPromptBox(FWebView, _wkeOnPromptBox, Self);
WAPI.wkeOnConsoleMessage(FWebView, _wkeOnConsoleMessage, Self);
WAPI.wkeOnNavigation(FWebView, _wkeOnNavigation, Self);
WAPI.wkeOnCreateView(FWebView, _wkeOnCreateView, Self);
WAPI.wkeOnDocumentReady(FWebView, _wkeOnDocumentReady, Self);
WAPI.wkeOnLoadingFinish(FWebView, _wkeOnLoadingFinish, Self);
WAPI.wkeSetUserAgent(FWebView, 'Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2228.0 Safari/537.36');
FWebViewUpdateTimer := TWkeTimer.Create;
FWebViewUpdateTimer.Interval := 50;
FWebViewUpdateTimer.OnTimer := DoWebViewUpdateTimer;
FWebViewUpdateTimer.Enabled := True;
FInvalidate := False;
WAPI.wkeSetUserData(FWebView, Self);
end;
procedure TWkeWebView.EditerCut;
begin
WAPI.wkeEditorCut(FWebView);
end;
procedure TWkeWebView.EditerDelete;
begin
WAPI.wkeEditorDelete(FWebView);
end;
destructor TWkeWebView.Destroy;
begin
FDestroying := True;
StopLoading;
if FWebViewUpdateTimer <> nil then
begin
FWebViewUpdateTimer.OnTimer := nil;
FWebViewUpdateTimer.Enabled := False;
FreeAndNil(FWebViewUpdateTimer);
end;
FThis := nil;
if FObjectList <> nil then
begin
FObjectList.RemoveListener(DoRegObjectsNotify);
FObjectList := nil;
end;
if (FWebView <> nil) and (WAPI <> nil) then
begin
Wke.GlobalObjects.RemoveListener(DoRegObjectsNotify);
WAPI.wkeOnTitleChanged(FWebView, nil, nil);
WAPI.wkeOnURLChanged(FWebView, nil, nil);
WAPI.wkeOnPaintUpdated(FWebView, nil, nil);
WAPI.wkeOnAlertBox(FWebView, nil, nil);
WAPI.wkeOnConfirmBox(FWebView, nil, nil);
WAPI.wkeOnPromptBox(FWebView, nil, nil);
WAPI.wkeOnConsoleMessage(FWebView, nil, nil);
WAPI.wkeOnNavigation(FWebView, nil, nil);
WAPI.wkeOnCreateView(FWebView, nil, nil);
WAPI.wkeOnDocumentReady(FWebView, nil, nil);
WAPI.wkeOnLoadingFinish(FWebView, nil, nil);
end;
FJs := nil;
if FWebView <> nil then
begin
WAPI.wkeSetUserData(FWebView, nil);
if FOwnView then
begin
WAPI.wkeDestroyWebView(FWebView);
end;
FWebView := nil;
end;
inherited;
end;
procedure TWkeWebView.DoWebViewUpdateTimer(Sender: TObject);
function _BytesPerScanline(PixelsPerScanline, BitsPerPixel, Alignment: Longint): Longint;
begin
Dec(Alignment);
Result := ((PixelsPerScanline * BitsPerPixel) + Alignment) and not Alignment;
Result := Result div 8;
end;
var
BufferDC, wndDC: HDC;
rcDraw, rcClip: TRect;
BitmapInfo: TBitmapInfo;
BufferBitmap, OldBitmap: HBitmap;
BufferBits : Pointer;
w, h, i, iRow: Integer;
p, s, s1: Pointer;
pt, ptWnd: TPoint;
sz: TSize;
bf: _BLENDFUNCTION;
bHandled: Boolean;
begin
if FDestroying then
Exit;
if FWebView = nil then Exit;
if FThis = nil then Exit;
if (not IsIconic(this.GetHwnd)) and IsDirty and IsWindowVisible(This.GetHwnd) then
begin
FInvalidate := False;
w := GetWidth;
h := GetHeight;
if (w = 0) and (h = 0) then
Exit;
if @FOnInvalidate <> nil then
try
bHandled := False;
FOnInvalidate(Self, bHandled);
if bHandled then
Exit;
except
on E: Exception do
begin
Trace('[TWkeWebView.DoWebViewUpdateTimer]'+E.Message);
Exit;
end
end;
wndDC := 0;
if not Transparent then
begin
wndDC := This.GetDrawDC;
if wndDC = 0 then
Exit;
end;
try
if not Transparent then
begin
GetClipBox(wndDC, rcClip);
if IntersectClipRect(wndDC, rcClip.Left, rcClip.Top, rcClip.Right, rcClip.Bottom) in [NULLREGION, ERROR] then
Exit;
end;
BufferDC := CreateCompatibleDC(0);
try
Fillchar(BitmapInfo, sizeof(BitmapInfo), #0);
with BitmapInfo.bmiHeader do
begin
biSize := SizeOf(TBitmapInfoHeader);
biWidth := w;
biHeight := h;
biPlanes := 1;
biBitCount := 32;
biCompression := BI_RGB;
end;
BufferBitmap := CreateDIBSection(BufferDC, BitmapInfo, DIB_RGB_COLORS, BufferBits, 0, 0);
try
OldBitmap := SelectObject(BufferDC, BufferBitmap);
try
GetMem(p, h * w * 4);
try
Paint(p, 0);
s := p;
for i := 0 to h - 1 do
begin
iRow := i;
if BitmapInfo.bmiHeader.biHeight > 0 then // bottom-up DIB
iRow := BitmapInfo.bmiHeader.biHeight - iRow - 1;
Integer(s1) := Integer(BufferBits) +
iRow * _BytesPerScanline(BitmapInfo.bmiHeader.biWidth, BitmapInfo.bmiHeader.biBitCount, 32);
Move(s^, s1^, w*4);
Inc(Integer(s), w*4);
end;
finally
FreeMem(p);
end;
if Transparent then
begin
rcDraw := This.GetDrawRect;
pt := Point(0, 0);
ptWnd := pt;
ClientToScreen(this.GetHwnd, ptWnd);
sz.cx := w;
sz.cY := h;
bf.BlendOp := AC_SRC_OVER;
bf.BlendFlags := 0;
bf.SourceConstantAlpha := 255;
bf.AlphaFormat := AC_SRC_ALPHA;
UpdateLayeredWindow(this.GetHwnd, 0, @ptWnd, @sz, BufferDC, @pt, $FFFFFF, @BF, ULW_ALPHA);
end
else
begin
rcDraw := This.GetDrawRect;
BitBlt(wndDC, rcDraw.Left, rcDraw.Top, rcDraw.Right-rcDraw.Left, rcDraw.Bottom-rcDraw.Top,
BufferDC, 0, 0, SRCCOPY);
end;
finally
SelectObject(BufferDC, OldBitmap);
end;
finally
if BufferBitmap <> 0 then DeleteObject(BufferBitmap);
end;
finally
if BufferDC <> 0 then
DeleteDC(BufferDC);
end;
finally
if wndDC <> 0 then
this.ReleaseDC(wndDC);
end;
end;
end;
procedure TWkeWebView.SetFocus;
begin
if FDestroying then
Exit;
WAPI.wkeSetFocus(FWebView);
FIsFocused := True;
end;
function TWkeWebView.GetCaretRect: wkeRect;
begin
Result := WAPI.wkeGetCaretRect(FWebView);
end;
function TWkeWebView.GetContentHeight: Integer;
begin
Result := WAPI.wkeGetContentHeight(FWebView);
end;
function TWkeWebView.GetContentWidth: Integer;
begin
Result := WAPI.wkeGetContentWidth(FWebView);
end;
function TWkeWebView.GetCookieEnabled: Boolean;
begin
Result := WAPI.wkeIsCookieEnabled(FWebView);
end;
function TWkeWebView.GetData1: Pointer;
begin
Result := FData1;
end;
function TWkeWebView.GetData2: Pointer;
begin
Result := FData2;
end;
function TWkeWebView.GetDirty: Boolean;
begin
Result := FInvalidate or WAPI.wkeIsDirty(FWebView);
end;
function TWkeWebView.GetEnabled: Boolean;
begin
Result := IsWindowEnabled(this.GetHwnd);
end;
function TWkeWebView.GetFocused: Boolean;
begin
Result := FIsFocused;
end;
function TWkeWebView.GetHeight: Integer;
begin
Result := WAPI.wkeGetHeight(FWebView);
end;
function TWkeWebView.GetJs: IWkeJs;
begin
if FJs = nil then
FJs := TwKeJs.Create(FWebView);
Result := FJs;
end;
function TWkeWebView.GetMediaVolume: float;
begin
Result := WAPI.wkeGetMediaVolume(FWebView);
end;
function TWkeWebView.GetName: WideString;
begin
Result := UTF8ToWideString(WAPI.wkeGetName(FWebView));
end;
function TWkeWebView.GetOnPaintUpdated: TWkeWebViewPaintUpdatedProc;
begin
Result := FOnPaintUpdated;
end;
function TWkeWebView.GetOnContextMenu: TWkeContextMenuProc;
begin
Result := FOnContextMenu;
end;
function TWkeWebView.GetOnInvalidate: TWkeInvalidateProc;
begin
Result := FOnInvalidate;
end;
function TWkeWebView.GetOnTitleChange: TWkeWebViewTitleChangeProc;
begin
Result := FOnTitleChange;
end;
function TWkeWebView.GetOnURLChange: TWkeWebViewURLChangeProc;
begin
Result := FOnURLChange;
end;
function TWkeWebView.GetOnWndDestory: TWkeWndDestoryProc;
begin
Result := FOnWndDestory;
end;
function TWkeWebView.GetOnWndProc: TWkeWndProc;
begin
Result := FOnWndProc;
end;
function TWkeWebView.GetThis: IWkeWebBase;
begin
Result := IWkeWebBase(FThis)
end;
function TWkeWebView.GetTitle: WideString;
begin
Result := WAPI.wkeGetTitleW(FWebView);
end;
function TWkeWebView.GetTransparent: Boolean;
begin
Result := WAPI.wkeIsTransparent(FWebView);
end;
function TWkeWebView.GetUserAgent: WideString;
begin
Result := FUserAgent;
end;
function TWkeWebView.GetViewDC: Pointer;
begin
Result := WAPI.wkeGetViewDC(FWebView);
end;
function TWkeWebView.GetWebView: TWebView;
begin
Result := FWebView;
end;
function TWkeWebView.GetWidth: Integer;
begin
Result := WAPI.wkeGetWidth(FWebView);
end;
function TWkeWebView.GetZoomFactor: float;
begin
Result := WAPI.wkeGetZoomFactor(FWebView);
end;
function TWkeWebView.GlobalExec: jsExecState;
begin
Result := WAPI.wkeGlobalExec(FWebView);
end;
function TWkeWebView.GoBack: Boolean;
begin
Result := WAPI.wkeGoBack(FWebView);
end;
function TWkeWebView.GoForward: Boolean;
begin
Result := WAPI.wkeGoForward(FWebView);
end;
procedure TWkeWebView.Hide;
begin
if FDestroying then
Exit;
ShowWindow(this.GetHwnd, SW_HIDE);
end;
procedure TWkeWebView.Invalidate;
begin
FInvalidate := True;
end;
function TWkeWebView.IsAwake: Boolean;
begin
Result := WAPI.wkeIsAwake(FWebView);
end;
function TWkeWebView.IsDocumentReady: Boolean;
begin
Result := WAPI.wkeIsDocumentReady(FWebView);
end;
function TWkeWebView.IsLoadComplete: Boolean;
begin
Result := WAPI.wkeIsLoadingCompleted(FWebView);
end;
function TWkeWebView.IsLoadSucceeded: Boolean;
begin
Result := WAPI.wkeIsLoadingSucceeded(FWebView);
end;
function TWkeWebView.IsLoadFailed: Boolean;
begin
Result := WAPI.wkeIsLoadingFailed(FWebView);
end;
function TWkeWebView.IsLoading: Boolean;
begin
Result := WAPI.wkeIsLoading(FWebView);
end;
function TWkeWebView.IsShowing: Boolean;
begin
Result := IsWindowVisible(this.GetHwnd)
end;
function TWkeWebView.KeyDown(virtualKeyCode, flags: UINT;
systemKey: Boolean): Boolean;
begin
Result := False;
if FDestroying then
Exit;
Result := WAPI.wkeFireKeyDownEvent(FWebView, virtualKeyCode, flags, systemKey);
end;
function TWkeWebView.KeyPress(charCode: UINT; flags: UINT;
systemKey: Boolean): Boolean;
begin
Result := False;
if FDestroying then
Exit;
Result := WAPI.wkeFireKeyPressEvent(FWebView, charCode, flags, systemKey)
end;
function TWkeWebView.KeyUp(virtualKeyCode, flags: UINT;
systemKey: Boolean): Boolean;
begin
Result := False;
if FDestroying then
Exit;
Result := WAPI.wkeFireKeyUpEvent(FWebView, virtualKeyCode, flags, systemKey)
end;
procedure TWkeWebView.LayoutIfNeeded;
begin
WAPI.wkeLayoutIfNeeded(FWebView);
end;
procedure TWkeWebView.Load(const str: PUtf8);
begin
WAPI.wkeLoad(FWebView, str);
end;
procedure TWkeWebView.Load(const str: WideString);
begin
WAPI.wkeLoadW(FWebView, PWideChar(str));
end;
procedure TWkeWebView.LoadFile(const filename: WideString);
var
sFile: WideString;
begin
DoBeforeLoadHtml();
try
sFile := StringReplace(filename, '/', '\', [rfReplaceAll]);
if AnsiStartsText('file:', sFile) then
begin
sFile := System.Copy(sFile, 6, MaxInt);
if sFile[1] = '\' then
System.Delete(sFile, 1, 1);
if sFile[1] = '\' then
System.Delete(sFile, 1, 1);
if sFile[1] = '\' then
System.Delete(sFile, 1, 1);
end;
CurrentLoadDir := ExtractFilePath(sFile);
sFile := EncodeURI(sFile);
WAPI.wkeLoadFileW(FWebView, PUnicodeChar(sFile));
DoAfterLoadHtml();
except
on E: Exception do
begin
Trace('[TWkeWebView.LoadFile]'+E.Message);
end
end;
end;
procedure TWkeWebView.LoadHTML(const html: PUtf8);
begin
DoBeforeLoadHtml();
WAPI.wkeLoadHTML(FWebView, html);
DoAfterLoadHtml();
end;
procedure TWkeWebView.LoadHTML(const html: WideString);
begin
DoBeforeLoadHtml();
WAPI.wkeLoadHTMLW(FWebView, PUnicodeChar(html));
DoAfterLoadHtml();
end;
procedure TWkeWebView.LoadURL(const url: WideString);
begin
DoBeforeLoadHtml();
WAPI.wkeLoadURLW(FWebView, PUnicodeChar(url));
DoAfterLoadHtml();
end;
function TWkeWebView.MouseEvent(msg: UINT; x, y: Integer;
flags: UINT): Boolean;
begin
Result := False;
if FDestroying then
Exit;
Result := WAPI.wkeFireMouseEvent(FWebView, msg, x, y, flags)
end;
function TWkeWebView.MouseWheel(x, y, delta: Integer;
flags: UINT): Boolean;
begin
Result := False;
if FDestroying then
Exit;
Result := WAPI.wkeFireMouseWheelEvent(FWebView, x, y, delta, flags)
end;
procedure TWkeWebView.Paint(bits: Pointer; pitch: Integer);
begin
WAPI.wkePaint2(FWebView, bits, pitch);
end;
procedure TWkeWebView.Paint(bits: Pointer; bufWid, bufHei, xDst, yDst, w,
h, xSrc, ySrc: Integer; bCopyAlpha: Boolean);
begin
WAPI.wkePaint(FWebView, bits, bufWid, bufHei, xDst, yDst, w, h, xSrc, ySrc, bCopyAlpha);
end;
procedure TWkeWebView.EditerPaste;
begin
WAPI.wkeEditorPaste(FWebView);
end;
procedure TWkeWebView.PostURL(const url: WideString;
const postData: PAnsiChar; postLen: Integer);
begin
WAPI.wkePostURLW(FWebView, PUnicodeChar(url), postData, postLen);
end;
function TWkeWebView.ProcND(msg: UINT; wParam: WPARAM; lParam: LPARAM;
var pbHandled: Boolean): LRESULT;
var
flags, virtualKeyCode, charCode: UINT;
caret:wkeRect;
form: TCandidateForm;
compForm: TCompositionForm;
hIMC, delta, x, y: Integer;
pt: TPoint;
rcClient: TRect;
i: Integer;
imc: Imm.HIMC;
p: PChar;
hParent: HWND;
bSystemKey: Boolean;
begin
Result := 0;
if FDestroying then
Exit;
case Msg of
WM_GETDLGCODE:
begin
Result := DLGC_WANTALLKEYS or DLGC_WANTTAB or DLGC_WANTARROWS or DLGC_WANTCHARS or DLGC_HASSETSEL;
pbHandled := True;
end;
WM_COMMAND:
begin
{wmId := LOWORD(wParam);
wmEvent := HIWORD(wParam);}
hParent := GetParent(this.GetHwnd);
if hParent <> 0 then
begin
Result := SendMessage(hParent, Msg, wParam, lParam);
pbHandled := True;
end;
end;
WM_SIZE:
begin
Resize(LOWORD(lParam), HIWORD(lParam));
end;
WM_SYSKEYDOWN,
WM_KEYDOWN:
begin
virtualKeyCode := WParam;
bSystemKey := msg = WM_SYSKEYDOWN;
flags := 0;
if HiWord(lParam) and KF_REPEAT <> 0 then
flags := flags or WKE_REPEAT
else
if HiWord(lParam) and KF_EXTENDED <> 0 then
flags := flags or WKE_EXTENDED;
if KeyDown(virtualKeyCode, flags, bSystemKey) then
pbHandled := True;
end;
WM_SYSKEYUP,
WM_KEYUP:
begin
virtualKeyCode := wParam;
bSystemKey := msg = WM_SYSKEYUP;
flags := 0;
if HiWord(lParam) and KF_REPEAT <> 0 then
flags := flags or WKE_REPEAT
else
if HiWord(lParam) and KF_EXTENDED <> 0 then
flags := flags or WKE_EXTENDED;
if KeyUp(virtualKeyCode, flags, bSystemKey) then
pbHandled := True;
end;
WM_IME_COMPOSITION:
begin
if ((lParam and GCS_RESULTSTR) <> 0) then
begin
imc := ImmGetContext(this.GetHwnd);
try
FImeCount := ImmGetCompositionString(imc, GCS_RESULTSTR, nil, 0);
GetMem(p, FImeCount + 1);
try
ImmGetCompositionString(imc, GCS_RESULTSTR, p, FImeCount);
p[FImeCount] := #0;
FImeResult := p;
finally
FreeMem(p, FImeCount + 1);
end;
finally
ImmReleaseContext(this.GetHwnd, imc);
end;
end;
end;
WM_IME_ENDCOMPOSITION:
begin
if (Length(FImeResult) > 0) then
begin
for i := 1 to Length(FImeResult) do
begin
if FImeResult[i] = #0 then
continue;
KeyPress(Ord(FImeResult[i]), 0, False)
end;
FImeResult := '';
end;
end;
WM_SYSCHAR,
WM_CHAR:
begin
charCode := WParam;
bSystemKey := msg = WM_SYSCHAR;
flags := 0;
if HiWord(lParam) and KF_REPEAT <> 0 then
flags := flags or WKE_REPEAT
else
if HiWord(lParam) and KF_EXTENDED <> 0 then
flags := flags or WKE_EXTENDED;
if (Length(FImeResult) > 0) then
begin
for i := 1 to Length(FImeResult) do
begin
if FImeResult[i] = #0 then
continue;
KeyPress(Ord(FImeResult[i]), flags, bSystemKey)
end;
FImeResult := '';
end;
if (FImeCount > 0) then
begin
Dec(FImeCount);
pbHandled := True;
Exit;
end;
if KeyPress(charCode, flags, bSystemKey) then
pbHandled := True;
end;
WM_SETCURSOR:
begin
Result := 0;
pbHandled := True;
end;
WM_LBUTTONDOWN,
WM_MBUTTONDOWN,
WM_RBUTTONDOWN,
WM_LBUTTONDBLCLK,
WM_MBUTTONDBLCLK,
WM_RBUTTONDBLCLK,
WM_LBUTTONUP,
WM_MBUTTONUP,
WM_RBUTTONUP,
WM_MOUSEMOVE:
begin
if (Msg = WM_LBUTTONDOWN) or (Msg = WM_MBUTTONDOWN) or (Msg = WM_RBUTTONDOWN) then
begin
Windows.SetFocus(This.GetHwnd);
Windows.SetCapture(This.GetHwnd);
end
else
if (Msg = WM_LBUTTONUP) or (Msg = WM_MBUTTONUP) or (Msg = WM_RBUTTONUP) then
begin
Windows.ReleaseCapture;
end;
Windows.GetClientRect(This.GetHwnd, rcClient);
x := GET_X_LPARAM(LParam) - rcClient.Left;
y := GET_Y_LPARAM(LParam) - rcClient.Top;
flags := 0;
if WParam and MK_CONTROL <> 0 then
flags := flags or WKE_CONTROL;
if WParam and MK_SHIFT <> 0 then
flags := flags or WKE_SHIFT;
if WParam and MK_LBUTTON <> 0 then
flags := flags or WKE_LBUTTON;
if WParam and MK_MBUTTON <> 0 then
flags := flags or WKE_MBUTTON;
if WParam and MK_RBUTTON <> 0 then
flags := flags or WKE_RBUTTON;
if MouseEvent(Msg, x, y, flags) then
pbHandled := True;
end;
WM_CONTEXTMENU:
begin
pt.X := GET_X_LPARAM(lParam);
pt.Y := GET_Y_LPARAM(lParam);
if (pt.X <> -1) and (pt.Y <> -1) then
Windows.ScreenToClient(this.GetHwnd, pt);
flags := 0;
if WParam and MK_CONTROL <> 0 then
flags := flags or WKE_CONTROL;
if WParam and MK_SHIFT <> 0 then
flags := flags or WKE_SHIFT;
if WParam and MK_LBUTTON <> 0 then
flags := flags or WKE_LBUTTON;
if WParam and MK_MBUTTON <> 0 then
flags := flags or WKE_MBUTTON;
if WParam and MK_RBUTTON <> 0 then
flags := flags or WKE_RBUTTON;
if ContextMenuEvent(pt.X, pt.Y, flags) then
pbHandled := True;
end;
WM_MOUSEWHEEL:
begin
pt.X := GET_X_LPARAM(lParam);
pt.Y := GET_Y_LPARAM(lParam);
Windows.ScreenToClient(This.GetHwnd, pt);
delta := GET_WHEEL_DELTA_WPARAM(wParam);
flags := 0;
if WParam and MK_CONTROL <> 0 then
flags := flags or WKE_CONTROL;
if WParam and MK_SHIFT <> 0 then
flags := flags or WKE_SHIFT;
if WParam and MK_LBUTTON <> 0 then
flags := flags or WKE_LBUTTON;
if WParam and MK_MBUTTON <> 0 then
flags := flags or WKE_MBUTTON;
if WParam and MK_RBUTTON <> 0 then
flags := flags or WKE_RBUTTON;
if MouseWheel(pt.X, pt.Y, delta, flags) then
pbHandled := True;
end;
WM_SETFOCUS:
begin
SetFocus;
end;
WM_KILLFOCUS:
begin
KillFocus;
end;
WM_IME_STARTCOMPOSITION:
begin
caret := GetCaretRect;
rcClient := this.GetBoundsRect;
ZeroMemory(@form, SizeOf(TCandidateForm));
ZeroMemory(@compForm, SizeOf(TCompositionForm));
form.dwIndex := 0;
form.dwStyle := CFS_EXCLUDE;
form.ptCurrentPos.x := caret.x + rcClient.left;
form.ptCurrentPos.y := caret.y + rcClient.top + 5;
form.rcArea.top := caret.y + rcClient.top;
form.rcArea.bottom := caret.y + caret.h + rcClient.top;
form.rcArea.left := caret.x + rcClient.left;
form.rcArea.right := caret.x + caret.w + rcClient.left;
compForm.ptCurrentPos := form.ptCurrentPos;
compForm.rcArea := form.rcArea;
compForm.dwStyle := CFS_POINT;
hIMC := ImmGetContext(This.GetHwnd);
try
ImmSetCandidateWindow(hIMC, @form);
ImmSetCompositionWindow(hIMC, @compForm);
finally
ImmReleaseContext(This.GetHwnd, hIMC);
end;
pbHandled := True;
end;
WM_ERASEBKGND,
WM_NCPAINT:
begin
Result := 0;
pbHandled := True;
end;
WM_PAINT:
begin
Invalidate;
end;
end;
end;
procedure TWkeWebView.Reload;
begin
WAPI.wkeReload(FWebView);
end;
procedure TWkeWebView.Resize(w, h: Integer);
begin
if FDestroying then
Exit;
WAPI.wkeResize(FWebView, w, h);
end;
function TWkeWebView.RunJS(const script: PUtf8): jsValue;
begin
Result := 0;
if FDestroying then
Exit;
Result := WAPI.wkeRunJS(FWebView, script)
end;
function TWkeWebView.RunJS(const script: WideString): jsValue;
begin
Result := 0;
if FDestroying then
Exit;
Result := WAPI.wkeRunJSW(FWebView, PUnicodeChar(script))
end;
procedure TWkeWebView.EditerSelectAll;
begin
WAPI.wkeEditorSelectAll(FWebView);
end;
procedure TWkeWebView.SetCookieEnabled(const Value: Boolean);
begin
WAPI.wkeSetCookieEnabled(FWebView, Value);
end;
procedure TWkeWebView.SetData1(const Value: Pointer);
begin
FData1 := Value;
end;
procedure TWkeWebView.SetData2(const Value: Pointer);
begin
FData2 := Value;
end;
procedure TWkeWebView.SetDirty(const Value: Boolean);
begin
WAPI.wkeSetDirty(FWebView, Value);
end;
procedure TWkeWebView.SetEditable(editable: Boolean);
begin
WAPI.wkeSetEditable(FWebView, editable);
end;
procedure TWkeWebView.SetEnabled(const Value: Boolean);
begin
EnableWindow(this.GetHwnd, Value)
end;
procedure TWkeWebView.SetMediaVolume(const Value: float);
begin
WAPI.wkeSetMediaVolume(FWebView, Value);
end;
procedure TWkeWebView.SetName(const Value: WideString);
begin
WAPI.wkeSetName(FWebView, PAnsiChar(AnsiString(Value)));
end;
procedure TWkeWebView.SetOnPaintUpdated(
const Value: TWkeWebViewPaintUpdatedProc);
begin
FOnPaintUpdated := Value;
end;
procedure TWkeWebView.SetOnContextMenu(const Value: TWkeContextMenuProc);
begin
FOnContextMenu := Value;
end;
procedure TWkeWebView.SetOnInvalidate(const Value: TWkeInvalidateProc);
begin
FOnInvalidate := Value;
end;
procedure TWkeWebView.SetOnTitleChange(
const Value: TWkeWebViewTitleChangeProc);
begin
FOnTitleChange := Value;
end;
procedure TWkeWebView.SetOnURLChange(
const Value: TWkeWebViewURLChangeProc);
begin
FOnURLChange := Value;
end;
procedure TWkeWebView.SetOnWndDestory(const Value: TWkeWndDestoryProc);
begin
FOnWndDestory := Value;
end;
procedure TWkeWebView.SetOnWndProc(const Value: TWkeWndProc);
begin
FOnWndProc := Value;
end;
procedure TWkeWebView.SetTransparent(const Value: Boolean);
begin
WAPI.wkeSetTransparent(FWebView, Value);
end;
procedure TWkeWebView.SetUserAgent(const Value: WideString);
begin
if Value = FUserAgent then
Exit;
FUserAgent := Value;
WAPI.wkeSetUserAgentW(FWebView, PUnicodeChar(FUserAgent));
end;
procedure TWkeWebView.SetZoomFactor(const Value: float);
begin
WAPI.wkeSetZoomFactor(FWebView, Value);
end;
procedure TWkeWebView.Show(nCmdShow: Integer);
begin
if FDestroying then
Exit;
ShowWindow(This.GetHwnd, nCmdShow);
end;
procedure TWkeWebView.Sleep;
begin
WAPI.wkeSleep(FWebView);
end;
procedure TWkeWebView.StopLoading;
begin
if FWebView <> nil then
WAPI.wkeStopLoading(FWebView);
end;
procedure TWkeWebView.KillFocus;
begin
if FDestroying then
Exit;
WAPI.wkeKillFocus(FWebView);
FIsFocused := False;
end;
procedure TWkeWebView.Update;
begin
WAPI.wkeUpdate;
end;
function TWkeWebView._AddRef: Integer;
begin
if FDestroying then
Result := FRefCount
else
Result := inherited _AddRef;
end;
function TWkeWebView._Release: Integer;
begin
if FDestroying then
Result := FRefCount
else
Result := inherited _Release;
end;
procedure TWkeWebView.RepaintIfNeeded;
begin
WAPI.wkeRepaintIfNeeded(FWebView);
end;
function TWkeWebView.GetCookie: WideString;
begin
Result := WAPI.wkeGetCookieW(FWebView);
end;
function TWkeWebView.GetOnAlertBox: TWkeWebViewAlertBoxProc;
begin
Result := FOnAlertBoxProc;
end;
function TWkeWebView.GetOnConfirmBox: TWkeWebViewConfirmBoxProc;
begin
Result := FOnConfirmBoxProc;
end;
function TWkeWebView.GetOnConsoleMessage: TWkeWebViewConsoleMessageProc;
begin
Result := FOnConsoleMessageProc;
end;
function TWkeWebView.GetOnCreateView: TWkeWebViewCreateViewProc;
begin
Result := FOnCreateViewProc;
end;
function TWkeWebView.GetOnDocumentReady: TWkeWebViewDocumentReadyProc;
begin
Result := FOnDocumentReadyProc;
end;
function TWkeWebView.GetOnLoadingFinish: TWkeWebViewLoadingFinishProc;
begin
Result := FOnLoadingFinishProc;
end;
function TWkeWebView.GetOnNavigation: TWkeWebViewNavigationProc;
begin
Result := FOnNavigationProc;
end;
function TWkeWebView.GetOnPromptBox: TWkeWebViewPromptBoxProc;
begin
Result := FOnPromptBoxProc;
end;
procedure TWkeWebView.SetOnAlertBox(const Value: TWkeWebViewAlertBoxProc);
begin
FOnAlertBoxProc := Value;
end;
procedure TWkeWebView.SetOnConfirmBox(
const Value: TWkeWebViewConfirmBoxProc);
begin
FOnConfirmBoxProc := Value;
end;
procedure TWkeWebView.SetOnConsoleMessage(
const Value: TWkeWebViewConsoleMessageProc);
begin
FOnConsoleMessageProc := Value;
end;
procedure TWkeWebView.SetOnCreateView(
const Value: TWkeWebViewCreateViewProc);
begin
FOnCreateViewProc := Value;
end;
procedure TWkeWebView.SetOnDocumentReady(
const Value: TWkeWebViewDocumentReadyProc);
begin
FOnDocumentReadyProc := Value;
end;
procedure TWkeWebView.SetOnLoadingFinish(
const Value: TWkeWebViewLoadingFinishProc);
begin
FOnLoadingFinishProc := Value;
end;
procedure TWkeWebView.SetOnNavigation(
const Value: TWkeWebViewNavigationProc);
begin
FOnNavigationProc := Value;
end;
procedure TWkeWebView.SetOnPromptBox(
const Value: TWkeWebViewPromptBoxProc);
begin
FOnPromptBoxProc := Value;
end;
procedure TWkeWebView.DoDocumentReady(const info: PwkeDocumentReadyInfo);
var
LGlobalObjects: IWkeJsObjectList;
i, argCount: Integer;
begin
if info.frameJSState = Js.GlobalExec.ExecState then
begin
LGlobalObjects := Wke.GlobalObjects;
for i := 0 to LGlobalObjects.Count - 1 do
GetJs.BindObject(LGlobalObjects.ItemName[i], LGlobalObjects[i].Value);
LGlobalObjects.RemoveListener(DoRegObjectsNotify);
LGlobalObjects.AddListener(DoRegObjectsNotify);
for i := 0 to FObjectList.Count - 1 do
GetJs.BindObject(FObjectList.ItemName[i], FObjectList[i].Value);
FObjectList.RemoveListener(DoRegObjectsNotify);
FObjectList.AddListener(DoRegObjectsNotify);
for i := 0 to GlobalFunction.Count - 1 do
begin
argCount := StrToInt(GlobalFunction.ValueFromIndex[i]);
GetJs.BindFunction(GlobalFunction.Names[i], Pointer(GlobalFunction.Objects[i]), argCount);
end;
end;
if @FOnDocumentReadyProc <> nil then
FOnDocumentReadyProc(Self, info);
end;
procedure TWkeWebView.DoLoadingFinish(
const url: wkeString; result_: wkeLoadingResult;
const failedReason: wkeString);
begin
if @FOnLoadingFinishProc <> nil then
FOnLoadingFinishProc(Self, url, result_, failedReason);
end;
procedure TWkeWebView.DoAfterLoadHtml;
begin
end;
procedure TWkeWebView.DoBeforeLoadHtml;
begin
end;
function TWkeWebView.GetHostWindow: HWND;
begin
Result := HWND(WAPI.wkeGetHostWindow(FWebView));
end;
procedure TWkeWebView.SetHostWindow(const Value: HWND);
begin
WAPI.wkeSetHostWindow(FWebView, Pointer(Value));
end;
function TWkeWebView.EditerCanCopy: Boolean;
begin
Result := WAPI.wkeEditorCanCopy(FWebView);
end;
function TWkeWebView.EditerCanCut: Boolean;
begin
Result := WAPI.wkeEditorCanCut(FWebView);
end;
function TWkeWebView.EditerCanDelete: Boolean;
begin
Result := WAPI.wkeEditorCanDelete(FWebView);
end;
function TWkeWebView.EditerCanPaste: Boolean;
begin
Result := WAPI.wkeEditorCanPaste(FWebView);
end;
function TWkeWebView.EditerCanRedo: Boolean;
begin
Result := WAPI.wkeEditorCanRedo(FWebView);
end;
function TWkeWebView.EditerCanUndo: Boolean;
begin
Result := WAPI.wkeEditorCanUndo(FWebView);
end;
procedure TWkeWebView.EditerRedo;
begin
WAPI.wkeEditorRedo(FWebView);
end;
procedure TWkeWebView.EditerUndo;
begin
WAPI.wkeEditorUndo(FWebView);
end;
procedure TWkeWebView.DoPaintUpdated(const hdc: HDC; x, y, cx,
cy: Integer);
begin
if FDestroying then
Exit;
if FThis = nil then
Exit;
if @FOnPaintUpdated <> nil then
try
FOnPaintUpdated(Self, hdc, x, y, cx, cy);
except
on E: Exception do
begin
Trace('[TWkeWebView.DoPaintUpdated]'+E.Message);
end
end;
end;
function TWkeWebView.DoNavigation(navigationType: wkeNavigationType;
const url: wkeString): Boolean;
var
sUrl: string;
processInfo: PROCESS_INFORMATION;
startupInfo: TStartupInfo;
succeeded, bHandled: Boolean;
begin
Result := True;
if @FOnNavigationProc <> nil then
try
bHandled := False;
Result := FOnNavigationProc(Self, navigationType, url, bHandled);
if bHandled then
Exit;
except
on E: Exception do
begin
Trace('[OnNavigationProc]'+E.Message);
end
end;
sUrl := WAPI.wkeGetStringW(url);
if AnsiStartsText('exec://', sUrl) then
begin
sUrl := Copy(sUrl, 8, MaxInt);
ZeroMemory(@processInfo, SizeOf(processInfo));
ZeroMemory(@startupInfo, SizeOf(startupInfo));
startupInfo.cb := SizeOf(startupInfo);
succeeded := CreateProcess(nil, PChar(sUrl), nil, nil, False, 0, nil, nil, startupInfo, processInfo);
if succeeded then
begin
CloseHandle(processInfo.hProcess);
CloseHandle(processInfo.hThread);
end;
Result := False;
Exit;
end;
end;
function TWkeWebView.DoCreateView(const info: PwkeNewViewInfo): TWebView;
var
bHandled: Boolean;
sTarget, sUrl: string;
newWindow: WkeTypes.wkeWebView;
begin
Result := nil;
if @FOnCreateViewProc <> nil then
try
bHandled := False;
Result := FOnCreateViewProc(Self, info, bHandled);
if bHandled then
Exit;
except
on E: Exception do
begin
Trace('[OnCreateViewProc]'+E.Message);
end
end;
sTarget := WAPI.wkeGetStringW(info.target);
sUrl := WAPI.wkeGetStringW(info.url);
if (sTarget = '') or (sTarget = '_blank') then
begin
if AnsiStartsText('file:///', sUrl) then
sUrl := Copy(sUrl, 9, MaxInt)
else
if AnsiStartsText('file://', sUrl) then
sUrl := Copy(sUrl, 8, MaxInt);
ShellExecute(0, 'open', PChar(sUrl), nil, nil, SW_SHOW);
Exit;
end
else
if sTarget = '_self' then
begin
Result := FWebView;
Exit;
end
else
if sTarget = 'wontOpen' then
Exit
else
begin
newWindow := WAPI.wkeCreateWebWindow(WKE_WINDOW_TYPE_POPUP, nil, info.x, info.y, info.width, info.height);
WAPI.wkeShowWindow(newWindow, True);
Result := newWindow;
Exit;
end;
end;
procedure TWkeWebView.DoAlertBox(const msg: wkeString);
var
bHandled: Boolean;
sMsg: WideString;
begin
if @FOnAlertBoxProc <> nil then
try
bHandled := False;
FOnAlertBoxProc(Self, msg, bHandled);
if bHandled then
Exit;
except
on E: Exception do
begin
Trace('[OnAlertBoxProc]'+E.Message);
end
end;
sMsg := WAPI.wkeGetStringW(msg);
MessageBoxW(0, PUnicodeChar(sMsg), '警告', MB_OK + MB_ICONWARNING);
end;
function TWkeWebView.DoConfirmBox(const msg: wkeString): Boolean;
var
bHandled: Boolean;
sMsg: WideString;
begin
if @FOnConfirmBoxProc <> nil then
try
bHandled := False;
Result := FOnConfirmBoxProc(Self, msg, bHandled);
if bHandled then
Exit;
except
on E: Exception do
begin
Trace('[OnConfirmBoxProc]'+E.Message);
end
end;
sMsg := WAPI.wkeGetStringW(msg);
Result := MessageBoxW(0, PUnicodeChar(sMsg), '确认', MB_OKCANCEL + MB_ICONQUESTION) = IDOK;
end;
function TWkeWebView.DoOnPromptBox(const msg, defaultResult,
result_: wkeString): Boolean;
var
bHandled: Boolean;
begin
Result := False;
if @FOnPromptBoxProc <> nil then
try
bHandled := False;
Result := FOnPromptBoxProc(Self, msg, defaultResult, result_, bHandled);
if bHandled then
Exit;
except
on E: Exception do
begin
Trace('[OnPromptBoxProc]'+E.Message);
end
end;
end;
function TWkeWebView.GetCursorType: wkeCursorType;
begin
Result := WAPI.wkeGetCursorType(FWebView);
end;
procedure TWkeWebView.DoRegObjectsNotify(const AInfo: IWkeJsObjectRegInfo;
Action: TWkeJsObjectAction);
begin
case Action of
woaReg:
begin
GetJs.BindObject(AInfo.Name, AInfo.Value);
end;
woaUnreg:
begin
GetJs.UnbindObject(AInfo.Name);
end;
woaChanged:
begin
GetJs.UnbindObject(AInfo.Name);
GetJs.BindObject(AInfo.Name, AInfo.Value);
end;
end;
end;
procedure TWkeWebView.BindObject(const objName: WideString; obj: TObject);
begin
FObjectList.Reg(objName, obj)
end;
procedure TWkeWebView.UnbindObject(const objName: WideString);
begin
FObjectList.UnReg(objName);
end;
{ TWkeWindow }
procedure TWkeWindow.CloseWindow;
begin
if FDestroying then
Exit;
if GetWindowHandle = 0 then
Exit;
if (GetWindowHandle <> 0) and IsWindow(GetWindowHandle) then
begin
Windows.DestroyWindow(GetWindowHandle);
end;
end;
constructor TWkeWindow.Create(type_: wkeWindowType; parent: HWND; x, y,
width, height: Integer);
var
LWebView: IWkeWebBase;
begin
FWebView := WAPI.wkeCreateWebWindow(type_, Pointer(parent), x, y, width, height);
LWebView := Self;
inherited Create(LWebView, FWebView, False);
LWebView := nil;
if @WAPI.wkeOnWindowClosing <> nil then
WAPI.wkeOnWindowClosing(FWebView, _OnWindowClosing, Self);
if @WAPI.wkeOnWindowDestroy <> nil then
WAPI.wkeOnWindowDestroy(FWebView, _OnWindowDestroy, Self);
end;
destructor TWkeWindow.Destroy;
begin
Windows.Sleep(10);
if FWebView <> nil then
begin
if @WAPI.wkeOnWindowClosing <> nil then
WAPI.wkeOnWindowClosing(FWebView, nil, nil);
if @WAPI.wkeOnWindowDestroy <> nil then
WAPI.wkeOnWindowDestroy(FWebView, nil, nil);
end;
inherited;
FWebView := nil;
end;
procedure TWkeWindow.DestroyWindow;
begin
if FWebView <> nil then
begin
if @WAPI.wkeOnWindowDestroy <> nil then
WAPI.wkeDestroyWebWindow(FWebView);
FWebView := nil;
end;
end;
function TWkeWindow.DoClosing: Boolean;
begin
if @FOnClosing <> nil then
Result := FOnClosing(Self)
else
Result := True;
end;
procedure TWkeWindow.DoDestroy;
begin
if @FOnDestroy <> nil then
FOnDestroy(Self);
if FWebView <> nil then
begin
WAPI.wkeOnWindowClosing(FWebView, nil, nil);
WAPI.wkeOnWindowDestroy(FWebView, nil, nil);
end;
FWebView := nil;
end;
procedure TWkeWindow.EnableWindow(enable: Boolean);
begin
WAPI.wkeEnableWindow(FWebView, enable);
end;
procedure TWkeWindow.EndModal(nCode: Integer);
begin
if nCode >= 0 then
FModalCode := nCode;
FIsModaling := False;
PostMessage(0, WM_NULL, 0, 0);
end;
function TWkeWindow.GetBoundsRect: TRect;
begin
GetWindowRect(GetWindowHandle, Result)
end;
function TWkeWindow.GetDrawDC: HDC;
begin
Result := 0;
end;
function TWkeWindow.GetDrawRect: TRect;
begin
GetClientRect(GetWindowHandle, Result)
end;
function TWkeWindow.GetHwnd: HWND;
begin
Result := GetWindowHandle;
end;
function TWkeWindow.GetIsModaling: Boolean;
begin
Result := FIsModaling;
end;
function TWkeWindow.GetModalCode: Integer;
begin
Result := FModalCode;
end;
function TWkeWindow.GetOnClosing: TWkeWindowClosingProc;
begin
Result := FOnClosing;
end;
function TWkeWindow.GetOnDestroy: TWkeWindowDestroyProc;
begin
Result := FOnDestroy;
end;
function TWkeWindow.GetResourceInstance: THandle;
begin
Result := MainInstance;
end;
function TWkeWindow.GetThis: IWkeWebBase;
begin
Result := Self;
end;
function TWkeWindow.GetTitle: WideString;
begin
Result := inherited GetTitle;
end;
function TWkeWindow.GetWindowHandle: HWND;
begin
Result := HWND(WAPI.wkeGetWindowHandle(FWebView));
end;
function TWkeWindow.GetWindowName: WideString;
begin
Result := Self.ClassName;
end;
function TWkeWindow.GetWindowType: wkeWindowType;
begin
Result := FWindowType;
end;
procedure TWkeWindow.HideWindow;
begin
WAPI.wkeShowWindow(FWebView, False);
end;
procedure TWkeWindow.MoveToCenter;
begin
WAPI.wkeMoveToCenter(FWebView);
end;
procedure TWkeWindow.MoveWindow(x, y, width, height: Integer);
begin
WAPI.wkeMoveWindow(FWebView, x, y, width, height);
end;
procedure TWkeWindow.ReleaseDC(const ADC: HDC);
begin
end;
procedure TWkeWindow.ResizeWindow(width, height: Integer);
begin
WAPI.wkeResizeWindow(FWebView, width, height);
end;
procedure TWkeWindow.SetModalCode(const Value: Integer);
begin
FModalCode := Value;
end;
procedure TWkeWindow.SetOnClosing(const AValue: TWkeWindowClosingProc);
begin
FOnClosing := AValue;
end;
procedure TWkeWindow.SetOnDestroy(const AValue: TWkeWindowDestroyProc);
begin
FOnDestroy := AValue;
end;
procedure TWkeWindow.SetTitle(const AValue: WideString);
begin
WAPI.wkeSetWindowTitleW(FWebView, PUnicodeChar(AValue));
end;
function TWkeWindow.ShowModal(AParent: HWND): Integer;
var
hParentWnd{, hActiveWnd}: HWND;
msg: TMsg;
begin
FModalCode := 0;
FisModaling := True;
//hActiveWnd := GetActiveWindow;
ShowWindow;
BringWindowToTop(GetWindowHandle);
if AParent = 0 then
hParentWnd := Windows.GetParent(GetWindowHandle)
else
hParentWnd := AParent;
while hParentWnd <> 0 do
begin
Windows.EnableWindow(hParentWnd, False);
hParentWnd := Windows.GetParent(hParentWnd);
end;
while FIsModaling do
begin
if not GetMessage(msg, 0, 0, 0) then
Break;
TranslateMessage(msg);
DispatchMessage(msg);
end;
if AParent = 0 then
hParentWnd := Windows.GetParent(GetWindowHandle)
else
hParentWnd := AParent;
while hParentWnd <> 0 do
begin
Windows.EnableWindow(hParentWnd, True);
hParentWnd := Windows.GetParent(hParentWnd);
end;
HideWindow;
// if hActiveWnd <> 0 then
// SetActiveWindow(hActiveWnd);
Result := FModalCode;
end;
procedure TWkeWindow.ShowWindow();
begin
WAPI.wkeShowWindow(FWebView, True);
end;
function TWkeWindow._AddRef: Integer;
begin
Result := inherited _AddRef;
//OutputDebugString(PChar('_AddRef:'+IntToStr(Result)));
end;
function TWkeWindow._Release: Integer;
begin
Result := inherited _Release;
//OutputDebugString(PChar('_Release:'+IntToStr(Result)));
end;
initialization
finalization
if varGlobalFunction <> nil then
FreeAndNil(varGlobalFunction);
end.
|
Uses Graph,Crt;
Const Eps=0.001;
H:Real=0.01;
{************************************************}
Function K:Real;
Function F(X:Real):Real;
Begin
F:=2*X-Sin(X)-3;
End;
Function Fs(X:Real):Real;
Begin
Fs:=2+Cos(X);
End;
Var Xo,Xi,E1:Real;
Const Eps=0.01;
Begin
Xo:=0;
Xi:=Xo;
Repeat
Xo:=Xi;
Xi:=Xo-F(Xo)/Fs(Xo);
E1:=Abs(Xo-Xi);
Until (E1<Eps);
K:=Xi;
End;
{------- Диференц. уравнение отн-но Y' ----------------}
Function F(X,Y,Ko:Real):Real;
Begin
F:=1+Ko*Y*Sin(X)-Y*Y;
End;
{--------------- Runge_Kutt 4 Го порядка --------------}
Function Runge_Kutt(h,a:real; yi:real ; Ko : Real): Real;
var
k10,k20,k30,k40:real;
Begin
k10:=F(a,yi,ko);
k20:=F(a+h/2,yi+h/2*k10,Ko);
k30:=F(a+h/2,yi+h/2*k20,Ko);
k40:=F(a+h,yi+h*k30,Ko);
yi:=yi+h/6*(k10+2*k20+2*k30+k40);
Runge_Kutt:=yi;
End;
{-------------- Пересчет -------------------------}
Function Y(X:Real):Real;
Const Eps = 0.1;
Var I,N:LongInt;
Yo,Yi1,Yz,Ko:Real;
Begin
Yo:=0.2; Yi1:=1; Ko:=K;
H:=0.05;
If X=0 then Y:=0.2 else begin
While Abs(Yo-Yi1)>Eps do begin
N:=Round(X/H);
Yo:=Yi1;
Yi1:=0.2;
For I:=0 to N-1 do
Yi1:=Runge_Kutt(H,I*H,Yi1,Ko);
H:=H/2;
End;
Y:=Yi1;
End;
End;
{----------------- Ньютон ------------------------}
Function P(N:LongInt;X:Real):Real;
Const H = 0.2;
Xo = 0;
Function Del(X:Real;N:LongInt):Real;
Begin
If N = 0 then Del:=Y(X)
else If N = 1 then Del:=Y(X+H)-Y(X)
else Del:=Del(X+H,N-1)-Del(X,N-1);
End;
Var Q,Pt,S:Real;
I,J:LongInt;
Begin
Q:=(X-Xo)/H;
S:=1;
Pt:=Y(Xo);
For I:=1 to N do begin
S:=S*(Q-I+1)/I;
Pt:=Pt+S*Del(Xo,I);
End;
P:=Pt;
End;
{--------------Оснавная программа--------------}
var
grDriver : Integer;
grMode : Integer;
ErrCode : Integer;
I,N,Xa,Ya:Integer;
Stt:String;
begin
grDriver := Detect;
InitGraph(grDriver,grMode,'BGI');
ErrCode := GraphResult;
if ErrCode = grOk then
begin
Line(GetMaxX div 2-210, GetMaxY div 2+100, GetMaxX-50, GetMaxY div 2+100);
Line(GetMaxX div 2-200, 50, GetMaxX div 2-200, GetMaxY div 2+110);
For I:=0 to 5 do begin
Circle(GetMaxX div 2-200+I*80,GetMaxY div 2+100,2);
Str(I/5:2:2,Stt);
OutTextXY(GetMaxX div 2-220+I*80,GetMaxY div 2+120,Stt);
End;
For I:=0 to 8 do begin
Circle(GetMaxX div 2-200,GetMaxY div 2+100-I*33,2);
Str(I/6:3:3,Stt);
OutTextXY(GetMaxX div 2-260,GetMaxY div 2+95-I*33,Stt);
End;
{------------------- Ньютон --------------------}
N:=16;
I:=0;
Xa:=Round(I*25+GetMaxX div 2-200);
Ya:=Round((-1)*P(5,I/N)*200+GetMaxY div 2+100);
MoveTo(Xa,Ya);
For I:=0 to N do begin
Xa:=Round(I*25+GetMaxX div 2-200);
Ya:=Round((-1)*P(5,I/N)*200+GetMaxY div 2+100);
LineTo(Xa,Ya);
End;
OuttextXY(Getmaxx-50,Getmaxy-200,'Nuton');
{------------------ Runge_Kutt ------------------}
N:=100;
I:=0;
Xa:=Round(I*4+GetMaxX div 2-200);
Ya:=Round((-1)*Y(I/N)*200+GetMaxY div 2+100);
MoveTo(Xa,Ya);
SetColor(12);
For I:=0 to N do begin
Xa:=Round(I*4+GetMaxX div 2-200);
Ya:=Round((-1)*Y(I/N)*200+GetMaxY div 2+100);
LineTo(Xa,Ya);
End;
OuttextXY(Getmaxx-300,Getmaxy-400,'Runge_Kutt');
ReadLn;
CloseGraph;
{--------------------------------------------}
end
else
WriteLn('Graphics error:',
GraphErrorMsg(ErrCode));
ClrScr;
N:=20;
I:=0;
Writeln(' X Nuton Runge_Kutt ');
For I:=0 to N do
Writeln(i/n:2:2,' ',P(5,I/N):2:5,' ',Y(i/n):2:5);
Readln;
End.
|
unit bool_arith_mixed_1;
interface
implementation
function GetBool(Cond: Boolean): Boolean;
begin
Result := Cond;
end;
var
A: Boolean = True;
R1, R2, B: Boolean = False;
procedure Test;
begin
R1 := A and (not B);
R2 := (not B) and A;
end;
initialization
Test();
finalization
Assert(R1);
Assert(R2);
end. |
//==================================================================//
// uHilang //
//------------------------------------------------------------------//
// Unit yang menangani hal-hal yang berhubungan dengan kehilangan //
//==================================================================//
unit uHilang;
interface
uses uFileLoader, uDate, Crt;
procedure PrintLaporanWithJudul(var arrLaporanHilang : HilangArr ; arrBuku : BArr);
{Menulis laporan hilang dengan format
ID_Buku_Hilang | Judul_Buku | Tanggal_Laporan}
{I.S. : arrLaporanHilang dan arrBuku sudah berisi data dari file laporan hilang serta buku
dan/atau modifikasi di main program}
{F.S. : laporan hilang tercetak ke layar sesuai format
ID_Buku_Hilang | Judul_Buku | Tanggal_Laporan}
function CariJudulBuku(var arrBuku : Barr ; ID_Buku : string) : string;
{Menghasilkan string Judul_Buku dari buku dengan id ID_Buku}
procedure LaporKehilangan(var arrlaporanHilang : HilangArr ; arrBuku : BArr; UserIn : User);
{Mengisi data yang diinputkan oleh pengguna untuk melaporkan buku yang hilang ke dalam
array Laporan Hilang}
{I.S. : arrLaporanHilang sudah berisi data dari file riwayat laporan hilang dan/atau modifikasi di main program}
{F.S. : arrLaporanHilang tercetak ke layar sesuai format data riwayat laporan hilang}
procedure PrintLaporanHilang(var arrLaporanHilang : HilangArr);
{Menulis elemen-elemen dari arrLaporanHilang ke layar dengan format sesuai data laporan hilang}
{I.S. : arrLaporanHilang sudah berisi data dari file laporan hilang dan/atau modifikasi di main program}
{F.S. : arrLaporanHilang tercetak ke layar sesuai format data laporan hilang}
{' | ' digunakan untuk pemisah antar kolom}
implementation
procedure PrintLaporanWithJudul(var arrLaporanHilang : HilangArr ; arrBuku : BArr);
{Menulis laporan hilang dengan format
ID_Buku_Hilang | Judul_Buku | Tanggal_Laporan}
{I.S. : arrLaporanHilang dan arrBuku sudah berisi data dari file laporan hilang serta buku
dan/atau modifikasi di main program}
{F.S. : laporan hilang tercetak ke layar sesuai format
ID_Buku_Hilang | Judul_Buku | Tanggal_Laporan}
{ KAMUS LOKAL }
var
i : integer;
{ ALGORITMA }
begin
writeln('Buku yang hilang');
for i := 1 to lenLaporanHilang do
begin
write(arrLaporanHilang[i].ID_Buku_Hilang);
write(' | ');
write(CariJudulBuku(arrBuku, arrLaporanHilang[i].ID_Buku_Hilang));
write(' | ');
WritelnDate(arrLaporanHilang[i].Tanggal_Laporan);
end;
writeln();
writeln('Ketik 0 untuk kembali ke menu.');
readln();
ClrScr;
end;
function CariJudulBuku(var arrBuku : Barr ; ID_Buku : string) : string;
{Menghasilkan string Judul_Buku dari buku dengan id ID_Buku}
{ KAMUS LOKAL }
var
i : integer;
isfound : boolean;
{ ALGORITMA }
begin
i := 1;
isfound := false;
while ((not isfound) and (i <= lenBuku)) do
begin
if(arrBuku[i].ID_Buku = ID_Buku) then
begin
CariJudulBuku := arrBuku[i].Judul_Buku;
isfound := true;
end else
begin
inc(i);
end;
end;
end;
procedure LaporKehilangan(var arrlaporanHilang : HilangArr ; arrBuku : BArr; UserIn : User);
{Mengisi data yang diinputkan oleh pengguna untuk melaporkan buku yang hilang ke dalam
array Laporan Hilang}
{I.S. : arrLaporanHilang sudah berisi data dari file riwayat laporan hilang dan/atau modifikasi di main program}
{F.S. : arrLaporanHilang tercetak ke layar sesuai format data riwayat laporan hilang}
{ KAMUS LOKAL }
var
tanggallaporstring, judulbukuhilang, idhilang : string;
i, indexlost : integer;
{ ALGORITMA }
begin
// Pengguna menginput id buku yang berbentuk string yang kemudian disimpan
// di array LaporanHilang
write('Masukkan id buku: ');
readln(idhilang);
arrLaporanHilang[lenLaporanHilang + 1].ID_Buku_Hilang := idhilang;
// untuk mencari indeks ke-i dari buku yang hilang
for i := 1 to lenBuku do
begin
if arrBuku[i].ID_Buku = idhilang then
begin
indexlost := i;
end;
end;
write('Masukkan judul buku: ');
readln(judulbukuhilang);
// Pengguna menginput tanggal laporan kehilangan yang berbentuk string dan menyimpan
// nilainya ke dalam array LaporanHilang
write('Masukkan tanggal pelaporan: ');
readln(tanggallaporstring);
arrLaporanHilang[lenLaporanHilang + 1].Tanggal_Laporan := ParseDate(tanggallaporstring);
// Username pengguna diimpor dari program utama
arrLaporanHilang[lenLaporanHilang + 1].Username := UserIn.username;
// Setiap penggguna melakukan laporan, panjang array bertambah 1
lenLaporanHilang := lenLaporanHilang + 1;
writeln('Laporan Berhasil Diterima');
writeln();
writeln('Ketik 0 untuk kembali ke menu.');
readln();
ClrScr;
end;
procedure PrintLaporanHilang(var arrLaporanHilang : HilangArr);
{Menulis elemen-elemen dari arrLaporanHilang ke layar dengan format sesuai data laporan hilang}
{I.S. : arrLaporanHilang sudah berisi data dari file laporan hilang dan/atau modifikasi di main program}
{F.S. : arrLaporanHilang tercetak ke layar sesuai format data laporan hilang}
{' | ' digunakan untuk pemisah antar kolom}
{KAMUS LOKAL}
var
k : integer;
{ALGORITMA}
begin
for k := 1 to (lenLaporanHilang) do
begin
write(k);
write(' | ');
write(arrLaporanHilang[k].Username);
write(' | ');
write(arrLaporanHilang[k].ID_Buku_Hilang);
write(' | ');
WriteDate(arrLaporanHilang[k].Tanggal_Laporan);
writeln();
end;
end;
end.
|
unit iaExample.TaskData;
interface
type
TExampleTaskData = class
private
fId:Integer;
fSomeAttribute:string;
public
constructor Create(const pId:Integer; const pSomeAttribute:string);
property Id:Integer read fId write fId;
property SomeAttribute:string read fSomeAttribute write fSomeAttribute;
end;
implementation
constructor TExampleTaskData.Create(const pId:Integer; const pSomeAttribute:string);
begin
fId := pId;
fSomeAttribute := pSomeAttribute;
end;
end.
|
{*******************************************************}
{ }
{ Delphi Runtime Library }
{ }
{ Copyright(c) 1995-2011 Embarcadero Technologies, Inc. }
{ }
{*******************************************************}
unit SockAppReg;
interface
uses
{$IFDEF MSWINDOWS}
System.Win.Registry,
{$ENDIF}
System.IniFiles, System.Contnrs;
type
TWebAppRegInfo = class(TObject)
private
FFileName: string;
FProgID: string;
public
property FileName: string read FFileName;
property ProgID: string read FProgID;
end;
TWebAppRegList = class(TObjectList)
private
function GetItem(I: Integer): TWebAppRegInfo;
public
property Items[I: Integer]: TWebAppRegInfo read GetItem; default;
end;
procedure GetRegisteredWebApps(AList: TWebAppRegList);
procedure RegisterWebApp(const AFileName, AProgID: string);
procedure UnregisterWebApp(const AProgID: string);
function FindRegisteredWebApp(const AProgID: string): string;
function CreateRegistry(InitializeNewFile: Boolean = False): TCustomIniFile;
const
sUDPPort = 'UDPPort';
implementation
{$IFDEF MSWINDOWS}
uses Winapi.Windows, System.SysUtils, System.Classes, SockConst;
{$ENDIF}
{$IFDEF LINUX}
uses SysUtils, Classes, libc;
{$ENDIF}
function CreateRegistry(InitializeNewFile: Boolean): TCustomIniFile;
{$IFDEF MSWINDOWS}
const
sKey = '\Software\CodeGear\WebAppDbg'; { do not localize }
begin
Result := TRegistryIniFile.Create(sKey);
end;
{$ENDIF}
{$IFDEF LINUX}
var
RegFile, ServInfoFile: string;
NewFile: Boolean;
begin
__mkdir(PChar(getenv('HOME') + '/.borland'), S_IRWXU or S_IRWXG or S_IRWXO);
RegFile := getenv('HOME') + '/.borland/webappdbgrc';
NewFile := not FileExists(RegFile);
if NewFile and InitializeNewFile then
begin
ServInfoFile := ExtractFilePath(GetModuleName(Maininstance)) + 'serverinfo'; { do not localize }
if FileExists(ServInfoFile) then
RegisterWebApp(ServInfoFile, 'serverinfo.Serverinfo'); { do not localize }
end;
Result := TMemIniFile.Create(RegFile);
TMemIniFile(Result).CaseSensitive := False;
end;
{$ENDIF}
const
sWebApps = 'WebApps'; // Do not localize
procedure GetRegisteredWebApps(AList: TWebAppRegList);
var
Reg: TCustomIniFile;
S: TStrings;
Info: TWebAppRegInfo;
I: Integer;
begin
AList.Clear;
Reg := CreateRegistry;
try
S := TStringList.Create;
try
Reg.ReadSectionValues(sWebApps, S);
for I := 0 to S.Count - 1 do
begin
Info := TWebAppRegInfo.Create;
Info.FProgID := S.Names[I];
Info.FFileName := S.Values[S.Names[I]];
AList.Add(Info);
end;
finally
S.Free;
end;
finally
Reg.Free;
end;
end;
function FindRegisteredWebApp(const AProgID: string): string;
var
Reg: TCustomIniFile;
begin
Reg := CreateRegistry;
try
Result := Reg.ReadString(sWebApps, AProgID, '');
finally
Reg.Free;
end;
end;
procedure RegisterWebApp(const AFileName, AProgID: string);
var
Reg: TCustomIniFile;
S: TStrings;
I: Integer;
SameFileName, SameProgID: Boolean;
begin
Reg := CreateRegistry;
try
S := TStringList.Create;
try
Reg.ReadSectionValues(sWebApps, S);
for I := 0 to S.Count - 1 do
begin
SameProgID := CompareText(S.Names[I], AProgID) = 0;
SameFileName := CompareText(S.Values[S.Names[I]], AFileName) = 0;
if SameProgID and SameFileName then
Exit // already registered
else if (SameProgID or SameFileName) then
Reg.DeleteKey(sWebApps, S[I]);
end;
Reg.WriteString(sWebApps, AProgID, AFileName);
finally
S.Free;
end;
finally
Reg.UpdateFile;
Reg.Free;
end;
end;
procedure UnregisterWebApp(const AProgID: string);
var
Reg: TCustomIniFile;
begin
Reg := CreateRegistry;
try
Reg.DeleteKey(sWebApps, AProgID);
finally
Reg.UpdateFile;
Reg.Free;
end;
end;
{ TWebAppRegList }
function TWebAppRegList.GetItem(I: Integer): TWebAppRegInfo;
begin
Result := TWebAppRegInfo(inherited Items[I]);
end;
end.
|
unit DmCSDemo;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
DBTables, DB;
type
TDmEmployee = class(TDataModule)
SalesTable: TTable;
SalesSource: TDataSource;
CustomerTable: TTable;
CustomerSource: TDataSource;
ShipOrderProc: TStoredProc;
EmployeeDatabase: TDatabase;
EmployeeSource: TDataSource;
EmployeeTable: TTable;
EmployeeTableEMP_NO: TSmallintField;
EmployeeTableFIRST_NAME: TStringField;
EmployeeTableLAST_NAME: TStringField;
EmployeeTablePHONE_EXT: TStringField;
EmployeeTableHIRE_DATE: TDateTimeField;
EmployeeTableDEPT_NO: TStringField;
EmployeeTableJOB_CODE: TStringField;
EmployeeTableJOB_GRADE: TSmallintField;
EmployeeTableJOB_COUNTRY: TStringField;
EmployeeTableSALARY: TFloatField;
EmployeeTableFULL_NAME: TStringField;
DeleteEmployeeProc: TStoredProc;
SalaryHistoryTable: TTable;
SalaryHistorySource: TDataSource;
SalaryHistoryTableCHANGE_DATE: TDateTimeField;
SalaryHistoryTableUPDATER_ID: TStringField;
SalaryHistoryTableOLD_SALARY: TFloatField;
SalaryHistoryTablePERCENT_CHANGE: TFloatField;
SalaryHistoryTableNEW_SALARY: TFloatField;
CustomerTableCUST_NO: TIntegerField;
CustomerTableCUSTOMER: TStringField;
CustomerTableCONTACT_FIRST: TStringField;
CustomerTableCONTACT_LAST: TStringField;
CustomerTablePHONE_NO: TStringField;
CustomerTableADDRESS_LINE1: TStringField;
CustomerTableADDRESS_LINE2: TStringField;
CustomerTableCITY: TStringField;
CustomerTableSTATE_PROVINCE: TStringField;
CustomerTableCOUNTRY: TStringField;
CustomerTablePOSTAL_CODE: TStringField;
CustomerTableON_HOLD: TStringField;
SalesTablePO_NUMBER: TStringField;
SalesTableCUST_NO: TIntegerField;
SalesTableSALES_REP: TSmallintField;
SalesTableORDER_STATUS: TStringField;
SalesTableORDER_DATE: TDateTimeField;
SalesTableSHIP_DATE: TDateTimeField;
SalesTableDATE_NEEDED: TDateTimeField;
SalesTablePAID: TStringField;
SalesTableQTY_ORDERED: TIntegerField;
SalesTableTOTAL_VALUE: TIntegerField;
SalesTableDISCOUNT: TFloatField;
SalesTableITEM_TYPE: TStringField;
SalesTableAGED: TFloatField;
EmployeeLookup: TTable;
SmallintField1: TSmallintField;
StringField1: TStringField;
StringField2: TStringField;
StringField3: TStringField;
DateTimeField1: TDateTimeField;
StringField4: TStringField;
StringField5: TStringField;
SmallintField2: TSmallintField;
StringField6: TStringField;
FloatField1: TFloatField;
StringField7: TStringField;
SalaryHistoryTableEMP_NO: TSmallintField;
SalaryHistoryTableEMPLOYEE: TStringField;
procedure EmployeeTableBeforeDelete(DataSet: TDataSet);
procedure EmployeeTableAfterPost(DataSet: TDataSet);
procedure DmEmployeeCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
DmEmployee: TDmEmployee;
implementation
{$R *.DFM}
{ Note: Business rules go in the data model. Here is an example, used by
the transaction editing demo. Deletes for the employee table are done
with a stored procedure rather than the normal BDE record delete
mechanism, so an audit trail could be provided, etc... }
{ The database, EmployeeDatabase, is the InterBase example EMPLOYEE.GDB database
accessed thru the BDE alias IBLOCAL. This database contains examples
of stored procedures, triggers, check constraints, views, etc., many of
which are used within this demo project. }
procedure TDmEmployee.EmployeeTableBeforeDelete(DataSet: TDataSet);
begin
{ Assign the current employee's id to the stored procedure's parameter }
DeleteEmployeeProc.Params.ParamValues['EMP_NUM'] := EmployeeTable['EMP_NO'];
DeleteEmployeeProc.ExecProc; { Trigger the stored proc }
EmployeeTable.Refresh; { Refresh the data }
{ Block the EmployeeTable delete since the stored procedure did the work }
Abort;
end;
procedure TDmEmployee.EmployeeTableAfterPost(DataSet: TDataSet);
begin
{ A change in an employee salary triggers a change in the salary history,
so if that table is open, it needs to be refreshed now }
with SalaryHistoryTable do if Active then Refresh;
end;
procedure TDmEmployee.DmEmployeeCreate(Sender: TObject);
begin
EmployeeDatabase.Open;
end;
end.
|
unit UFrmContact;
interface
uses FMX.Forms, FMX.StdCtrls, FMX.Edit, System.Classes, FMX.Types, FMX.Controls,
FMX.Controls.Presentation,
//
DzXMLTable;
type
TFrmContact = class(TForm)
Label1: TLabel;
EdName: TEdit;
Label2: TLabel;
EdAddress: TEdit;
Label3: TLabel;
EdPhone: TEdit;
CkEnabled: TCheckBox;
BtnOK: TButton;
BtnCancel: TButton;
procedure FormShow(Sender: TObject);
procedure BtnOKClick(Sender: TObject);
private
Edit: Boolean;
Rec: TDzRecord;
function NameAlreadyExists: Boolean;
end;
var
FrmContact: TFrmContact;
function DoEditContact(Edit: Boolean; var Rec: TDzRecord): Boolean;
implementation
{$R *.fmx}
uses UFrmMain, System.SysUtils, System.UITypes, FMX.DialogService;
function DoEditContact(Edit: Boolean; var Rec: TDzRecord): Boolean;
begin
FrmContact := TFrmContact.Create(Application);
FrmContact.Edit := Edit;
FrmContact.Rec := Rec;
Result := FrmContact.ShowModal = mrOk;
Rec := FrmContact.Rec;
FrmContact.Free;
end;
//
procedure TFrmContact.FormShow(Sender: TObject);
begin
if Edit then
begin
Caption := 'Edit Contact';
EdName.Text := Rec['Name'];
EdAddress.Text := Rec['Address'];
EdPhone.Text := Rec['Phone'];
CkEnabled.IsChecked := Rec['Enabled'];
end;
end;
procedure TFrmContact.BtnOKClick(Sender: TObject);
begin
EdName.Text := Trim(EdName.Text);
if EdName.Text.IsEmpty then
begin
TDialogService.ShowMessage('Name is blank');
EdName.SetFocus;
Exit;
end;
if NameAlreadyExists then
begin
TDialogService.ShowMessage('This name is already in use by another contact');
EdName.SetFocus;
Exit;
end;
//
if not Edit then
Rec := FrmMain.XT.New;
Rec['Name'] := EdName.Text;
Rec['Address'] := EdAddress.Text;
Rec['Phone'] := EdPhone.Text;
Rec['Enabled'] := CkEnabled.IsChecked;
ModalResult := mrOk;
end;
function TFrmContact.NameAlreadyExists: Boolean;
var
Index: Integer;
begin
Index := FrmMain.XT.FindIdxBySameText('Name', EdName.Text);
Result := (Index<>-1) and not (Edit and (Index=FrmMain.L.Selected.Index));
end;
end.
|
unit OpenDocumentUnit;
interface
uses Winapi.Windows, System.Generics.Collections;
type
TDocument = class(TObject)
private
protected
class procedure GetFileNames(const AFileName, AFileExts: string;
L: TList<String>); static;
public
class procedure Open(Handle: HWND; const AFolders, AFileName, AErrorMessage,
AEmptyErrorMessage: string; const AFileExts: string = ''); static;
end;
implementation
uses System.IOUtils, SettingsController, Winapi.ShellAPI, DialogUnit, SysUtils;
class procedure TDocument.GetFileNames(const AFileName, AFileExts: string;
L: TList<String>);
var
AExt: String;
D: string;
F: string;
m: TArray<String>;
S: string;
begin
Assert(not AFileName.IsEmpty);
S := TPath.GetExtension(AFileName);
if not S.IsEmpty then
L.Add(AFileName);
m := AFileExts.Split([';']);
for AExt in m do
begin
S := AExt.Trim;
if not S.IsEmpty then
begin
D := TPath.GetDirectoryName(AFileName);
F := TPath.GetFileNameWithoutExtension(AFileName);
L.Add(Format('%s.%s', [TPath.Combine(D, F), S]));
end;
end;
end;
class procedure TDocument.Open(Handle: HWND; const AFolders, AFileName,
AErrorMessage, AEmptyErrorMessage: string; const AFileExts: string = '');
var
AFolder: string;
AFullFileName: string;
L: TList<String>;
m: TArray<String>;
S: string;
begin
Assert(not AFolders.IsEmpty);
if AFileName.IsEmpty then
begin
TDialog.Create.ErrorMessageDialog(AEmptyErrorMessage);
Exit;
end;
// Получаем все возможные папки
m := AFolders.Split([';']);
Assert(Length(m) > 0);
L := TList<String>.Create;
try
// Получаем все возможные имена файлов
GetFileNames(AFileName, AFileExts, L);
Assert(L.Count > 0);
for S in L do
begin
for AFolder in m do
begin
// Получаем полное имя файла
AFullFileName := TPath.Combine(AFolder, S);
if TFile.Exists(AFullFileName) then
begin
ShellExecute(Handle, nil, PChar(AFullFileName), nil, nil,
SW_SHOWNORMAL);
Exit;
end
end;
end;
TDialog.Create.ErrorMessageDialog(Format(AErrorMessage,
[TPath.Combine(m[0], AFileName)]));
finally
FreeAndNil(L);
end;
end;
end.
|
{$A+,B-,D+,E-,F-,G+,I+,L+,N+,O-,P-,Q-,R-,S-,T-,V+,X+,Y+}
{$M 1024,0,655360}
{
by Behdad Esfahbod
Algorithmic Problems Book
April '2000
Problem 83 O(D2N) Dynamic Method
}
program
ThreeProcessors;
const
MaxN = 30;
MaxD = 100;
type
TArr = array [0 .. MaxD, 0 .. MaxD] of Byte;
var
N, D : Integer;
Dy : array [0 .. MaxN] of ^ TArr;
L, A : array [1 .. MaxN] of Integer;
Fl : Boolean;
I, J, K, S : Integer;
F : Text;
procedure ReadInput;
begin
Assign(F, 'input.txt');
Reset(F);
Readln(F, N, D);
for I := 1 to N do
Read(F, L[I]);
Close(F);
end;
procedure WriteOutput;
begin
Assign(F, 'output.txt');
Rewrite(F);
if Fl then
begin
for I := 1 to N do if A[I] = 1 then Write(F, I, ' ');
Writeln(F);
for I := 1 to N do if A[I] = 2 then Write(F, I, ' ');
Writeln(F);
for I := 1 to N do if A[I] = 3 then Write(F, I, ' ');
Writeln(F);
end
else
Writeln(F, 'No Solution');
Close(F);
end;
procedure Dynamic;
begin
for I := 0 to N do
begin
New(Dy[I]);
FillChar(Dy[I]^, SizeOf(Dy[I]^), 0);
end;
Dy[0]^[0, 0] := 4;
for I := 1 to N do
for J := 0 to D do
for K := 0 to D do
begin
if (L[I] <= J) and (Dy[I - 1]^[J - L[I], K] <> 0) then
Dy[I]^[J, K] := 1 else
if (L[I] <= K) and (Dy[I - 1]^[J, K - L[I]] <> 0) then
Dy[I]^[J, K] := 2 else
if (Dy[I - 1]^[J, K] <> 0) then
Dy[I]^[J, K] := 3;
end;
S := 0;
for I := 1 to N do Inc(S, L[I]);
Fl := False;
for J := D downto 0 do
begin
for K := J downto 0 do
begin
if J + K + D < S then
Break;
if Dy[N]^[J, K] <> 0 then
begin
Fl := True;
Break;
end;
end;
if Fl then
Break;
end;
if Fl then
for I := N downto 1 do
begin
A[I] := Dy[I]^[J, K];
case Dy[I]^[J, K] of
1 : Dec(J, L[I]);
2 : Dec(K, L[I]);
end;
end;
end;
begin
ReadInput;
Dynamic;
WriteOutput;
end.
|
program Sample;
procedure Output(A : Integer; B : Integer);
begin
WriteLn(A, ', ', B)
end;
begin
Output(7, 8)
end.
|
{ *************************************************************************** }
{ }
{ Kylix and Delphi Cross-Platform Visual Component Library }
{ Internet Application Runtime }
{ }
{ Copyright (C) 1997, 2001 Borland Software Corporation }
{ }
{ Licensees holding a valid Borland No-Nonsense License for this Software may }
{ use this file in accordance with such license, which appears in the file }
{ license.txt that came with this Software. }
{ }
{ *************************************************************************** }
unit WebConst;
interface
resourcestring
sErrorDecodingURLText = 'Error decoding URL style (%XX) encoded string at position %d';
sInvalidURLEncodedChar = 'Invalid URL encoded character (%s) at position %d';
sInvalidActionRegistration = 'Invalid Action registration';
sDuplicateActionName = 'Duplicate action name';
sFactoryAlreadyRegistered = 'Web Module Factory already registered';
sAppFactoryAlreadyRegistered = 'Web App Module Factory already registered.';
sOnlyOneDispatcher = 'Only one WebDispatcher per form/data module';
sHTTPItemName = 'Name';
sHTTPItemURI = 'PathInfo';
sHTTPItemEnabled = 'Enabled';
sHTTPItemDefault = 'Default';
sHTTPItemProducer = 'Producer';
sResNotFound = 'Resource %s not found';
sTooManyColumns = 'Too many table columns';
sFieldNameColumn = 'Field Name';
sFieldTypeColumn = 'Field Type';
sInvalidWebComponentsRegistration = 'Invalid Web component registration';
sInvalidWebComponentsEnumeration = 'Invalid Web component enumeration';
sVariableIsNotAContainer = 'Variable %s is not a container';
sInternalApplicationError = '<h1>Internal Application Error</h1>'#13#10 +
'<p>%0:s'#13#10 +
'<p><hr width="100%%"><i>%1:s</i>';
sInvalidParent = 'Invalid parent';
implementation
end.
|
unit DTMain;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls, ExtCtrls, BASS, Math;
const
MV_LEFT = 1;
MV_RIGHT = 2;
MV_UP = 4;
MV_DOWN = 8;
XDIST = 70;
YDIST = 65;
XCENTER = 268;
YCENTER = 92;
DIAM = 10;
MAXDIST = 500; // maximum distance of the channels (m)
SPEED = 5.0; // speed of the channels' movement (m/s)
PAR = 50;
type
PSource = ^TSource;
TSource = record
x, y: Float;
next: PSource;
movement: Integer;
sample, channel: Integer;
playing: Boolean;
end;
TForm1 = class(TForm)
GroupBox1: TGroupBox;
ListBox1: TListBox;
Button1: TButton;
Button2: TButton;
Button3: TButton;
Button4: TButton;
Bevel1: TBevel;
StaticText1: TStaticText;
RadioButton1: TRadioButton;
RadioButton2: TRadioButton;
RadioButton3: TRadioButton;
RadioButton4: TRadioButton;
RadioButton5: TRadioButton;
GroupBox2: TGroupBox;
ComboBox1: TComboBox;
GroupBox3: TGroupBox;
GroupBox4: TGroupBox;
ScrollBar1: TScrollBar;
ScrollBar2: TScrollBar;
GroupBox5: TGroupBox;
Label1: TLabel;
CheckBox1: TCheckBox;
ScrollBar3: TScrollBar;
Bevel2: TBevel;
Timer1: TTimer;
Bevel3: TBevel;
OpenDialog1: TOpenDialog;
procedure FormCreate(Sender: TObject);
procedure FormPaint(Sender: TObject);
procedure Timer1Timer(Sender: TObject);
procedure Button1Click(Sender: TObject);
procedure FormDestroy(Sender: TObject);
procedure ListBox1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
procedure ListBox1KeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
procedure Button3Click(Sender: TObject);
procedure Button4Click(Sender: TObject);
procedure RadioButton1Click(Sender: TObject);
procedure RadioButton2Click(Sender: TObject);
procedure RadioButton3Click(Sender: TObject);
procedure RadioButton4Click(Sender: TObject);
procedure RadioButton5Click(Sender: TObject);
procedure ComboBox1Change(Sender: TObject);
procedure CheckBox1Click(Sender: TObject);
procedure ScrollBar3Change(Sender: TObject);
procedure ScrollBar1Change(Sender: TObject);
procedure ScrollBar2Change(Sender: TObject);
private
{ Private-Deklarationen }
sources: PSource;
procedure Error(msg: string);
procedure AddSource(name: string);
procedure RemSource(num: Integer);
function GetSource(num: Integer): PSource;
procedure DrawSources;
procedure FreeSources;
procedure ActualizeSources(forceupdate: Boolean);
procedure ActualizeButtons;
function GetVel(p: PSource): BASS_3DVECTOR;
public
{ Public-Deklarationen }
end;
var
Form1: TForm1;
implementation
uses DTSelect;
{$R *.DFM}
procedure TForm1.Error(msg: string);
var
s: string;
begin
s := msg + #13#10 + '(error code: ' + IntToStr(BASS_ErrorGetCode) + ')';
MessageBox(handle, PChar(s), 'Error', MB_ICONERROR or MB_OK);
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
sources := nil;
end;
procedure TForm1.AddSource(name: string);
var
p, last: PSource;
newchan, newsamp: Integer;
sam: BASS_SAMPLE;
begin
newsamp := 0;
// Load a music from "file" with 3D enabled, and make it loop & use ramping
newchan := BASS_MusicLoad(FALSE, PChar(name), 0, 0, BASS_MUSIC_RAMP or BASS_MUSIC_LOOP or BASS_MUSIC_3D);
if (newchan <> 0) then
begin
// Set the min/max distance to 15/1000 meters
BASS_ChannelSet3DAttributes(newchan, -1, 35.0, 1000.0, -1, -1, -1);
end
else
begin
// Load a sample from "file" with 3D enabled, and make it loop
newsamp := BASS_SampleLoad(FALSE, PChar(name), 0, 0, 1, BASS_SAMPLE_LOOP or BASS_SAMPLE_3D or BASS_SAMPLE_VAM);
if (newsamp <> 0) then
begin
// Set the min/max distance to 15/1000 meters
BASS_SampleGetInfo(newsamp, sam);
sam.mindist := 35.0;
sam.maxdist := 1000.0;
BASS_SampleSetInfo(newsamp, sam);
end;
end;
if (newchan = 0) and (newsamp = 0) then
begin
Error('Can''t load file');
Exit;
end;
New(p);
p.x := 0;
p.y := 0;
p.movement := 0;
p.sample := newsamp;
p.channel := newchan;
p.playing := FALSE;
p.next := nil;
last := sources;
if last <> nil then
while (last.next <> nil) do last := last.next;
if last = nil then
sources := p
else
last.next := p;
ListBox1.Items.Add(name);
ActualizeButtons;
end;
procedure TForm1.RemSource(num: Integer);
var
p, prev: PSource;
i: Integer;
begin
prev := nil;
p := sources;
i := 0;
while (p <> nil) and (i < num) do
begin
Inc(i);
prev := p;
p := p.next;
end;
if (p <> nil) then
begin
if (prev <> nil) then
prev.next := p.next
else
sources := p.next;
if (p.sample <> 0) then
BASS_SampleFree(p.sample)
else
BASS_MusicFree(p.channel);
Dispose(p);
end;
ListBox1.Items.Delete(num);
ActualizeButtons;
end;
function TForm1.GetSource(num: Integer): PSource;
var
p: PSource;
i: Integer;
begin
if num < 0 then
begin
Result := nil;
Exit;
end;
p := sources;
i := 0;
while (p <> nil) and (i < num) do
begin
Inc(i);
p := p.next;
end;
Result := p;
end;
procedure TForm1.DrawSources;
var
p: PSource;
i, j: Integer;
begin
p := sources;
with Canvas do
begin
Brush.Color := Form1.Color;
Pen.Color := Form1.Color;
Rectangle(XCENTER - XDIST - DIAM,
YCENTER - YDIST - DIAM,
XCENTER + XDIST + DIAM,
YCENTER + YDIST + DIAM);
Brush.Color := clGray;
Pen.Color := clBlack;
Ellipse(XCENTER - DIAM div 2,
YCENTER - DIAM div 2,
XCENTER + DIAM div 2,
YCENTER + DIAM div 2);
Pen.Color := Form1.Color;
i := 0; j := ListBox1.ItemIndex;
while (p <> nil) do
begin
if (i = j) then
Brush.Color := clRed
else
Brush.Color := clBlack;
Ellipse(XCENTER + Trunc(p.x * XDIST / MAXDIST) - DIAM div 2,
YCENTER + Trunc(p.y * YDIST / MAXDIST) - DIAM div 2,
XCENTER + Trunc(p.x * XDIST / MAXDIST) + DIAM div 2,
YCENTER + Trunc(p.y * YDIST / MAXDIST) + DIAM div 2);
p := p.next;
Inc(i);
end;
end;
end;
procedure TForm1.ActualizeSources(forceupdate: Boolean);
var
p: PSource;
chng, fchng: Boolean;
pos, rot, vel: BASS_3DVECTOR;
begin
pos.y := 0;
rot.x := 0;
rot.y := 0;
rot.z := 0;
fchng := forceupdate;
p := sources;
while (p <> nil) do
begin
chng := forceupdate;
if (p.playing) then
begin
if ((p.movement and MV_LEFT) = MV_LEFT) then
begin
p.x := p.x - SPEED;
chng := TRUE;
end;
if ((p.movement and MV_RIGHT) = MV_RIGHT) then
begin
p.x := p.x + SPEED;
chng := TRUE;
end;
if ((p.movement and MV_UP) = MV_UP) then
begin
p.y := p.y - SPEED;
chng := TRUE;
end;
if ((p.movement and MV_DOWN) = MV_DOWN) then
begin
p.y := p.y + SPEED;
chng := TRUE;
end;
if (p.x < -MAXDIST) then
begin
p.x := -MAXDIST;
p.movement := MV_RIGHT;
end;
if (p.x > MAXDIST) then
begin
p.x := MAXDIST;
p.movement := MV_LEFT;
end;
if (p.y < -MAXDIST) then
begin
p.y := -MAXDIST;
p.movement := MV_DOWN;
end;
if (p.y > MAXDIST) then
begin
p.y := MAXDIST;
p.movement := MV_UP;
end;
if chng then
begin
pos.x := p.x;
pos.z := -p.y;
vel := getVel(p);
BASS_ChannelSet3DPosition(p.channel, pos, rot, vel);
end;
end;
p := p.next;
if chng then fchng := TRUE;
end;
if fchng then
begin
DrawSources;
BASS_Apply3D;
end;
end;
procedure TForm1.FreeSources;
var
p, v: PSource;
begin
p := sources;
while (p <> nil) do
begin
v := p.next;
Dispose(v);
p := v;
end;
sources := nil;
end;
procedure TForm1.FormPaint(Sender: TObject);
begin
DrawSources;
end;
procedure TForm1.Timer1Timer(Sender: TObject);
begin
ActualizeSources(FALSE);
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
If OpenDialog1.Execute then
begin
AddSource(OpenDialog1.FileName);
end;
end;
procedure TForm1.FormDestroy(Sender: TObject);
begin
FreeSources;
BASS_Stop;
BASS_Free;
end;
procedure TForm1.ActualizeButtons;
var
en: Boolean;
p: PSource;
begin
en := (ListBox1.ItemIndex >= 0);
Button2.Enabled := en;
Button3.Enabled := en;
Button4.Enabled := en;
RadioButton1.Enabled := en;
RadioButton2.Enabled := en;
RadioButton3.Enabled := en;
RadioButton4.Enabled := en;
RadioButton5.Enabled := en;
DrawSources;
p := GetSource(ListBox1.ItemIndex);
if p = nil then Exit;
if (p.x = -PAR) and ((p.movement = MV_UP) or (p.movement = MV_DOWN)) then
RadioButton1.Checked := TRUE
else if (p.x = PAR) and ((p.movement = MV_UP) or (p.movement = MV_DOWN)) then
RadioButton2.Checked := TRUE
else if (p.y = -PAR) and ((p.movement = MV_LEFT) or (p.movement = MV_RIGHT)) then
RadioButton3.Checked := TRUE
else if (p.y = PAR) and ((p.movement = MV_LEFT) or (p.movement = MV_RIGHT)) then
RadioButton4.Checked := TRUE
else
RadioButton5.Checked := TRUE;
end;
procedure TForm1.ListBox1Click(Sender: TObject);
begin
ActualizeButtons;
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
if ListBox1.ItemIndex >= 0 then
RemSource(ListBox1.ItemIndex);
end;
procedure TForm1.ListBox1KeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
begin
ActualizeButtons;
end;
procedure TForm1.Button3Click(Sender: TObject);
var
p: PSource;
pos, rot, vel: BASS_3DVECTOR;
begin
if ListBox1.ItemIndex < 0 then Exit;
p := GetSource(ListBox1.itemIndex);
if not p.playing then
begin
p.playing := TRUE;
pos.x := p.x;
pos.y := 0;
pos.z := -p.y;
vel := GetVel(p);
rot.x := 0;
rot.y := 0;
rot.z := 0;
if (p.sample <> 0) then
begin
if (p.channel = 0) then
p.channel := BASS_SamplePlay3D(p.sample, pos, rot, vel);
end
else
BASS_MusicPlay(p.channel);
end;
end;
procedure TForm1.Button4Click(Sender: TObject);
var
p: PSource;
begin
if ListBox1.ItemIndex < 0 then Exit;
p := GetSource(ListBox1.ItemIndex);
if p = nil then Exit;
BASS_ChannelStop(p.channel);
if (p.sample <> 0) then p.channel := 0;
p.playing := FALSE;
end;
procedure TForm1.RadioButton1Click(Sender: TObject);
var
p: PSource;
begin
if ListBox1.ItemIndex < 0 then Exit;
p := GetSource(ListBox1.ItemIndex);
if p = nil then Exit;
if (p.movement and MV_UP = 0) and
(p.movement and MV_DOWN = 0) then
begin
p.movement := MV_UP;
p.x := -PAR;
p.y := 0;
end
else
p.x := -PAR;
DrawSources;
end;
procedure TForm1.RadioButton2Click(Sender: TObject);
var
p: PSource;
begin
if ListBox1.ItemIndex < 0 then Exit;
p := GetSource(ListBox1.ItemIndex);
if p = nil then Exit;
if (p.movement and MV_UP = 0) and
(p.movement and MV_DOWN = 0) then
begin
p.movement := MV_UP;
p.x := PAR;
p.y := 0;
end
else
p.x := PAR;
DrawSources;
end;
procedure TForm1.RadioButton3Click(Sender: TObject);
var
p: PSource;
begin
if ListBox1.ItemIndex < 0 then Exit;
p := GetSource(ListBox1.ItemIndex);
if p = nil then Exit;
if (p.movement and MV_LEFT = 0) and
(p.movement and MV_RIGHT = 0) then
begin
p.movement := MV_RIGHT;
p.x := 0;
p.y := -PAR;
end
else
p.y := -PAR;
DrawSources;
end;
procedure TForm1.RadioButton4Click(Sender: TObject);
var
p: PSource;
begin
if ListBox1.ItemIndex < 0 then Exit;
p := GetSource(ListBox1.ItemIndex);
if p = nil then Exit;
if (p.movement and MV_LEFT = 0) and
(p.movement and MV_RIGHT = 0) then
begin
p.movement := MV_RIGHT;
p.x := 0;
p.y := PAR;
end
else
p.y := PAR;
DrawSources;
end;
procedure TForm1.RadioButton5Click(Sender: TObject);
var
p: PSource;
begin
if ListBox1.ItemIndex < 0 then Exit;
p := GetSource(ListBox1.ItemIndex);
if p = nil then Exit;
p.movement := 0;
ActualizeSources(TRUE);
end;
function TForm1.GetVel(p: PSource): BASS_3DVECTOR;
var
x, z: Float;
sp: Float;
begin
x := 0;
z := 0;
if p.playing then
begin
sp := SPEED * 1000 / Timer1.Interval;
if (p.movement = MV_LEFT) then x := -sp
else if (p.movement = MV_RIGHT) then x := sp
else if (p.movement = MV_UP) then z := sp
else if (p.movement = MV_DOWN) then z := -sp;
end;
Result.x := x;
Result.y := 0;
Result.z := z;
end;
procedure TForm1.ComboBox1Change(Sender: TObject);
begin
case (ComboBox1.ItemIndex) of
0: BASS_EAXPreset(EAX_ENVIRONMENT_OFF);
1: BASS_EAXPreset(EAX_ENVIRONMENT_GENERIC);
2: BASS_EAXPreset(EAX_ENVIRONMENT_PADDEDCELL);
3: BASS_EAXPreset(EAX_ENVIRONMENT_ROOM);
4: BASS_EAXPreset(EAX_ENVIRONMENT_BATHROOM);
5: BASS_EAXPreset(EAX_ENVIRONMENT_LIVINGROOM);
6: BASS_EAXPreset(EAX_ENVIRONMENT_STONEROOM);
7: BASS_EAXPreset(EAX_ENVIRONMENT_AUDITORIUM);
8: BASS_EAXPreset(EAX_ENVIRONMENT_CONCERTHALL);
9: BASS_EAXPreset(EAX_ENVIRONMENT_CAVE);
10: BASS_EAXPreset(EAX_ENVIRONMENT_ARENA);
11: BASS_EAXPreset(EAX_ENVIRONMENT_HANGAR);
12: BASS_EAXPreset(EAX_ENVIRONMENT_CARPETEDHALLWAY);
13: BASS_EAXPreset(EAX_ENVIRONMENT_HALLWAY);
14: BASS_EAXPreset(EAX_ENVIRONMENT_STONECORRIDOR);
15: BASS_EAXPreset(EAX_ENVIRONMENT_ALLEY);
16: BASS_EAXPreset(EAX_ENVIRONMENT_FOREST);
17: BASS_EAXPreset(EAX_ENVIRONMENT_CITY);
18: BASS_EAXPreset(EAX_ENVIRONMENT_MOUNTAINS);
19: BASS_EAXPreset(EAX_ENVIRONMENT_QUARRY);
20: BASS_EAXPreset(EAX_ENVIRONMENT_PLAIN);
21: BASS_EAXPreset(EAX_ENVIRONMENT_PARKINGLOT);
22: BASS_EAXPreset(EAX_ENVIRONMENT_SEWERPIPE);
23: BASS_EAXPreset(EAX_ENVIRONMENT_UNDERWATER);
24: BASS_EAXPreset(EAX_ENVIRONMENT_DRUGGED);
25: BASS_EAXPreset(EAX_ENVIRONMENT_DIZZY);
26: BASS_EAXPreset(EAX_ENVIRONMENT_PSYCHOTIC);
end;
end;
procedure TForm1.CheckBox1Click(Sender: TObject);
begin
if CheckBox1.Checked then
BASS_SetA3DHFAbsorbtion(Power(2, ScrollBar3.Position / 2.0))
else
BASS_SetA3DHFAbsorbtion(0);
end;
procedure TForm1.ScrollBar3Change(Sender: TObject);
var
a: Float;
begin
a := ScrollBar3.Position;
if CheckBox1.Checked then
BASS_SetA3DHFAbsorbtion(Power(2.0, a / 2.0));
end;
procedure TForm1.ScrollBar1Change(Sender: TObject);
var
a: Float;
begin
a := ScrollBar1.Position;
BASS_Set3DFactors(-1, Power(2.0, a / 4.0), -1);
end;
procedure TForm1.ScrollBar2Change(Sender: TObject);
var
a: Float;
begin
a := ScrollBar2.Position;
BASS_Set3DFactors(-1, -1, Power(2.0, a / 4.0));
end;
end.
|
PROGRAM PoleFigury ( output );
VAR
r : REAL;
error_r : INTEGER;
a,b : REAL;
error_a,error_b : INTEGER;
opcja : SHORTSTRING;
FUNCTION PoleKola(r :REAL): REAL;
BEGIN
PoleKola:=Pi * r * r;
END;
FUNCTION PoleElipsy(a : REAL; b: REAL): REAL;
BEGIN
PoleElipsy:=Pi * a * b;
END;
FUNCTION PoleProstokata(a : REAL; b : REAL): REAL;
BEGIN
PoleProstokata:=a * b;
END;
PROCEDURE DrukujOpcje;
BEGIN
Writeln('Nierozpoznana opcja ',opcja);
Writeln('Dostepne opcje:');
Writeln(' k - kolo ');
Writeln(' e - elipsa ');
Writeln(' p - prostokat ');
END;
BEGIN
opcja := ParamStr(1);
IF ParamCount = 0 THEN
BEGIN
Writeln('Brak parametrow');
halt(1);
END ELSE BEGIN
END;
IF (opcja = 'k') OR (opcja = 'K') THEN
BEGIN
Writeln('Obliczanie pola kola');
IF ParamCount > 1 THEN
BEGIN
Val(ParamStr(2), r, error_r);
IF error_r > 0 THEN
BEGIN
Write('Blad konwersji');
halt(1);
END;
Writeln('Pole Kola ', PoleKola(r):8:3);
END
END
ELSE IF (opcja = 'p') OR (opcja = 'P') THEN
BEGIN
Writeln('Obliczanie pola prostokata');
IF ParamCount > 1 THEN
BEGIN
Val(ParamStr(2), a, error_a);
IF (error_a > 0) THEN
BEGIN
Write('Blad konwersji');
halt(1);
END
END;
IF ParamCount > 2 THEN
BEGIN
Val(ParamStr(3), b, error_b);
IF (error_b > 0) THEN
BEGIN
Write('Blad konwersji');
halt(1);
END;
END;
Writeln('Pole Prostokata o bokach ',a:8:3,' ',b:8:3,' ',PoleProstokata(a,):8:3);
END
ELSE IF (opcja = 'e') OR (opcja = 'E') THEN
BEGIN
Writeln('Obliczanie pola elipsy');
IF ParamCount > 1 THEN
BEGIN
Val(ParamStr(2), a, error_a);
IF (error_a > 0) THEN
BEGIN
Write('Blad konwersji');
halt(1);
END
END;
IF ParamCount > 2 THEN
BEGIN
Val(ParamStr(3), b, error_b);
IF (error_b > 0) THEN
BEGIN
Write('Blad konwersji');
halt(1);
END;
END
ELSE
BEGIN
b := a;
END;
Writeln('Pole Elipsy o bokach ',a:8:3,' ',b:8:3,' ',PoleElipsy(a,b):8:3);
END
ELSE
BEGIN
DrukujOpcje;
halt(1);
END
END.
|
unit HGM.SQLang;
interface
uses
System.Classes, System.SysUtils, System.Generics.Collections;
type
TFieldType = (ftInteger, ftString, ftFloat, ftDateTime, ftBlob, ftBoolean, ftParam);
TDIType = (diInc, diDec, diDiv, diMul);
TWhereUnion = (wuAnd, wuOr, wuNotAnd, wuNotOr);
TField = record
private
function GetSQL: string;
public
FieldType: TFieldType;
FieldName: string;
PrimaryKey: Boolean;
AutoInc: Boolean;
NotNull: Boolean;
property SQL: string read GetSQL;
end;
TFields = TList<TField>;
TFieldNames = TStringList;
TUnionWhere = TStringList;
TInsertValue = record
public
FieldType: TFieldType;
FieldName: string;
Value: Variant;
end;
TInsertValues = TList<TInsertValue>;
TDIValue = record
public
FieldType: TFieldType;
DIType: TDIType;
FieldName: string;
Value: Variant;
end;
TDIValues = TList<TDIValue>;
TTable = class;
TInsertInto = class;
TUpdate = class;
TSelect = class;
TDelete = class;
TDropTable = class;
TUpdateBlob = class;
BaseSQL = class
private
FName: string;
procedure SetName(const Value: string);
public
property TableName: string read FName write SetName;
end;
SQL = class(BaseSQL)
private
FWhereStr: string;
FUWheres: TUnionWhere;
function GetWhere: string;
function InsertUnion(const Union: TWhereUnion): string;
public
function AsSubquery: string; virtual;
function GetSQL(AutoFree: Boolean = False): string; virtual; abstract;
procedure EndCreate; virtual;
procedure Clear; virtual;
procedure WhereParenthesesOpen(Union: TWhereUnion = wuAnd);
procedure WhereParenthesesClose;
procedure WhereFieldLike(const FieldName: string; const Value: string; const Union: TWhereUnion = wuAnd); overload;
procedure WhereFieldBetween(const FieldName: string; const ValueLeft, ValueRight: TDateTime; const Union: TWhereUnion = wuAnd); overload;
procedure WhereFieldBetween(const FieldName: string; const ValueLeft, ValueRight: Extended; const Union: TWhereUnion = wuAnd); overload;
procedure WhereFieldBetween(const FieldName: string; const ValueLeft, ValueRight: Integer; const Union: TWhereUnion = wuAnd); overload;
procedure WhereFieldIsNull(const FieldName: string; const Union: TWhereUnion = wuAnd);
procedure WhereFieldIsNotNull(const FieldName: string; const Union: TWhereUnion = wuAnd);
procedure WhereField(const FieldName, Oper: string; const FieldValue: string; const Union: TWhereUnion = wuAnd); overload;
procedure WhereField(const FieldName, Oper: string; const FieldValue: Extended; const Union: TWhereUnion = wuAnd); overload;
procedure WhereField(const FieldName, Oper: string; const FieldValue: Integer; const Union: TWhereUnion = wuAnd); overload;
procedure WhereField(const FieldName, Oper: string; const FieldValue: TDateTime; const Union: TWhereUnion = wuAnd); overload;
procedure WhereField(const FieldName, Oper: string; const FieldValue: Boolean; const Union: TWhereUnion = wuAnd); overload;
procedure WhereFieldWOQ(const FieldName, Oper: string; const FieldValue: string; const Union: TWhereUnion = wuAnd); //Без ковычек
procedure WhereFieldIN(const FieldName: string; const FieldValues: array of string; const Union: TWhereUnion = wuAnd); overload;
procedure WhereFieldIN(const FieldName: string; const FieldValues: array of Extended; const Union: TWhereUnion = wuAnd); overload;
procedure WhereFieldIN(const FieldName: string; const FieldValues: array of Integer; const Union: TWhereUnion = wuAnd); overload;
procedure WhereFieldIN(const FieldName: string; const FieldValues: array of TDateTime; const Union: TWhereUnion = wuAnd); overload;
procedure WhereFieldIN(const FieldName: string; const FieldValues: array of Boolean; const Union: TWhereUnion = wuAnd); overload;
procedure WhereFieldEqual(const FieldName: string; const FieldValue: string; const Union: TWhereUnion = wuAnd); overload;
procedure WhereFieldEqual(const FieldName: string; const FieldValue: Extended; const Union: TWhereUnion = wuAnd); overload;
procedure WhereFieldEqual(const FieldName: string; const FieldValue: Integer; const Union: TWhereUnion = wuAnd); overload;
procedure WhereFieldEqual(const FieldName: string; const FieldValue: TDateTime; const Union: TWhereUnion = wuAnd); overload;
procedure WhereFieldEqual(const FieldName: string; const FieldValue: Boolean; const Union: TWhereUnion = wuAnd); overload;
procedure WhereNotFieldEqual(const FieldName: string; const FieldValue: string; const Union: TWhereUnion = wuAnd); overload;
procedure WhereNotFieldEqual(const FieldName: string; const FieldValue: Extended; const Union: TWhereUnion = wuAnd); overload;
procedure WhereNotFieldEqual(const FieldName: string; const FieldValue: Integer; const Union: TWhereUnion = wuAnd); overload;
procedure WhereNotFieldEqual(const FieldName: string; const FieldValue: TDateTime; const Union: TWhereUnion = wuAnd); overload;
procedure WhereNotFieldEqual(const FieldName: string; const FieldValue: Boolean; const Union: TWhereUnion = wuAnd); overload;
procedure WhereExists(const Select: string; const Union: TWhereUnion = wuAnd);
procedure WhereStr(const Value: string);
constructor Create; virtual;
destructor Destroy; override;
property Where: string read GetWhere;
public
class function CreateField: TField;
class function CreateTable(TableName: string = ''; IfNotExists: Boolean = True): TTable; overload;
class function InsertInto: TInsertInto; overload;
class function InsertInto(TableName: string): TInsertInto; overload;
class function InsertOrReplace: TInsertInto; overload;
class function InsertOrReplace(TableName: string): TInsertInto; overload;
class function Delete: TDelete; overload;
class function Delete(TableName: string): TDelete; overload;
class function DropTable: TDropTable; overload;
class function DropTable(TableName: string): TDropTable; overload;
class function Update: TUpdate; overload;
class function Update(TableName: string): TUpdate; overload;
class function Select: TSelect; overload;
class function Select(TableName: string; Field: string = ''): TSelect; overload;
class function Select(TableName: string; Fields: TArray<string>): TSelect; overload;
class function UpdateBlob: TUpdateBlob; overload;
class function UpdateBlob(TableName: string): TUpdateBlob; overload;
class function UpdateBlob(TableName, FieldName: string): TUpdateBlob; overload;
//
class function PRAGMA(Key, Value: string): string;
class function SelectLastInsertID: string;
//
end;
TTable = class(BaseSQL)
private
FIfNotExists: Boolean;
function GetField(Index: Integer): TField;
procedure SetField(Index: Integer; const Value: TField);
protected
FFields: TFields;
public
function GetSQL(AutoFree: Boolean = False): string; virtual;
procedure AddField(Name: string; FieldType: TFieldType; PrimaryKey: Boolean = False; NotNull: Boolean = False; AutoInc: Boolean = False); virtual;
procedure EndCreate; virtual;
procedure Clear; virtual;
constructor Create(ATableName: string = ''; AIfNotExists: Boolean = True); overload; virtual;
destructor Destroy; override;
property Fields[Index: Integer]: TField read GetField write SetField;
property TableName;
property IfNotExists: Boolean read FIfNotExists write FIfNotExists;
end;
TInsertInto = class(BaseSQL)
private
FDoubleDoubleQuote: Boolean;
FOrReplace: Boolean;
procedure SetDoubleDoubleQuote(const Value: Boolean);
protected
FFieldValues: TInsertValues;
public
function GetSQL(AutoFree: Boolean = False): string;
procedure EndCreate;
procedure Clear;
procedure AddValue(FieldName: string; FieldValue: Integer); overload;
procedure AddValue(FieldName: string; FieldValue: string); overload;
procedure AddValue(FieldName: string; FieldValue: Extended); overload;
procedure AddValue(FieldName: string; FieldValue: TDateTime); overload;
procedure AddValue(FieldName: string; FieldValue: Boolean); overload;
procedure AddValueAsParam(FieldName: string; ParamChar: string = ':'; CharOnly: Boolean = False);
constructor Create; virtual;
destructor Destroy; override;
property TableName;
property OrReplace: Boolean read FOrReplace write FOrReplace;
property DoubleDoubleQuote: Boolean read FDoubleDoubleQuote write SetDoubleDoubleQuote default False;
end;
TUpdate = class(SQL)
private
FDoubleDoubleQuote: Boolean;
procedure SetDoubleDoubleQuote(const Value: Boolean);
protected
FFieldValues: TInsertValues;
FDIValues: TDIValues;
public
function GetSQL(AutoFree: Boolean = False): string; override;
procedure Clear; override;
procedure AddValue(FieldName: string; FieldValue: Integer); overload;
procedure AddValue(FieldName: string; FieldValue: string); overload;
procedure AddValue(FieldName: string; FieldValue: Extended); overload;
procedure AddValue(FieldName: string; FieldValue: TDateTime); overload;
procedure AddValue(FieldName: string; FieldValue: Boolean); overload;
procedure IncValue(FieldName: string; Value: Integer); overload;
procedure IncValue(FieldName: string; Value: Extended); overload;
procedure DecValue(FieldName: string; Value: Integer); overload;
procedure DecValue(FieldName: string; Value: Extended); overload;
procedure MulValue(FieldName: string; Value: Integer); overload;
procedure MulValue(FieldName: string; Value: Extended); overload;
procedure DivValue(FieldName: string; Value: Integer); overload;
procedure DivValue(FieldName: string; Value: Extended); overload;
procedure AddValueAsParam(FieldName: string; ParamChar: string = ':'; CharOnly: Boolean = False);
constructor Create; override;
destructor Destroy; override;
property TableName;
property DoubleDoubleQuote: Boolean read FDoubleDoubleQuote write SetDoubleDoubleQuote;
end;
TSelect = class(SQL)
private
FOrderBy: TStringList;
FJoins: TStringList;
FLimitInt: Integer;
FDistinct: Boolean;
function GetField(Index: Integer): string;
procedure SetField(Index: Integer; const Value: string);
function GetOrderBy: string;
protected
FFields: TFieldNames;
public
function GetSQL(AutoFree: Boolean = False): string; override;
procedure AddField(Name: string; IFNULL: string = '');
procedure AddAsField(Value: string; Alias: string = '');
procedure AddFieldCount(Name: string; Alias: string = '');
procedure InnerJoin(JoinTable, BaseField, JoinField: string);
procedure LeftJoin(JoinTable, BaseField, JoinField: string; AndWhere: string = '');
procedure RightJoin(JoinTable, BaseField, JoinField: string);
procedure OrderBy(FieldName: string; DESC: Boolean = False);
procedure Clear; override;
constructor Create; override;
destructor Destroy; override;
property Fields[Index: Integer]: string read GetField write SetField;
property Distinct: Boolean read FDistinct write FDistinct;
property Limit: Integer read FLimitInt write FLimitInt;
property OrderByStr: string read GetOrderBy;
property TableName;
end;
TDelete = class(SQL)
public
function GetSQL(AutoFree: Boolean = False): string; override;
procedure Clear; override;
constructor Create; override;
destructor Destroy; override;
property Where;
property TableName;
end;
TDropTable = class(BaseSQL)
public
function GetSQL(AutoFree: Boolean = False): string;
procedure EndCreate;
procedure Clear;
constructor Create; virtual;
property TableName;
end;
TUpdateBlob = class(SQL)
private
FBlobField: string;
public
function GetSQL(AutoFree: Boolean = False): string; override;
property BlobField: string read FBlobField write FBlobField;
property Where;
property TableName;
end;
function Field(Name: string; FieldType: TFieldType; PrimaryKey, NotNull, AutoInc: Boolean): TField;
function InsertValue(Name: string; FieldType: TFieldType; Value: Variant): TInsertValue;
function FloatToSQLStr(Value: Extended): string;
function FieldTypeToStr(Value: TFieldType): string;
function FieldTypeToString(Value: TFieldType): string;
implementation
uses
System.StrUtils;
function QuotedStr(const S: string): string;
var
I: Integer;
begin
Result := S;
if Result = '?' then
Exit;
for I := Result.Length - 1 downto 0 do
if Result.Chars[I] = '''' then
Result := Result.Insert(I, '''');
Result := '''' + Result + '''';
end;
function FloatToSQLStr(Value: Extended): string;
begin
Result := FloatToStr(Value);
Result := StringReplace(Result, ',', '.', [rfReplaceAll]);
end;
function BoolToSQLStr(Value: Boolean): string;
begin
if Value then
Exit('1')
else
Exit('0');
end;
function FieldTypeToStr(Value: TFieldType): string;
begin
case Value of
ftInteger:
Result := 'INTEGER';
ftString:
Result := 'TEXT';
ftFloat:
Result := 'REAL';
ftDateTime:
Result := 'REAL';
ftBlob:
Result := 'BLOB';
ftBoolean:
Result := 'INTEGER';
end;
end;
function FieldTypeToString(Value: TFieldType): string;
begin
case Value of
ftInteger:
Result := 'ftInteger';
ftString:
Result := 'ftString';
ftFloat:
Result := 'ftFloat';
ftDateTime:
Result := 'ftDateTime';
ftBlob:
Result := 'ftBlob';
ftBoolean:
Result := 'ftBoolean';
end;
end;
function Field;
begin
Result.FieldType := FieldType;
Result.FieldName := Name;
Result.PrimaryKey := PrimaryKey;
Result.AutoInc := AutoInc;
Result.NotNull := NotNull;
end;
function InsertValue(Name: string; FieldType: TFieldType; Value: Variant): TInsertValue; overload;
begin
Result.FieldName := Name;
Result.FieldType := FieldType;
Result.Value := Value;
end;
function DIValue(Name: string; FieldType: TFieldType; DIType: TDIType; Value: Variant): TDIValue; overload;
begin
Result.FieldName := Name;
Result.FieldType := FieldType;
Result.DIType := DIType;
Result.Value := Value;
end;
{ SQL }
class function SQL.CreateField: TField;
begin
Result := Field('', ftInteger, False, False, False);
end;
class function SQL.Delete: TDelete;
begin
Result := TDelete.Create;
end;
class function SQL.CreateTable(TableName: string; IfNotExists: Boolean): TTable;
begin
Result := TTable.Create;
Result.IfNotExists := IfNotExists;
Result.TableName := TableName;
end;
class function SQL.Delete(TableName: string): TDelete;
begin
Result := TDelete.Create;
Result.TableName := TableName;
end;
destructor SQL.Destroy;
begin
FUWheres.Free;
inherited;
end;
class function SQL.DropTable(TableName: string): TDropTable;
begin
Result := TDropTable.Create;
Result.TableName := TableName;
end;
class function SQL.DropTable: TDropTable;
begin
Result := TDropTable.Create;
end;
class function SQL.InsertInto(TableName: string): TInsertInto;
begin
Result := TInsertInto.Create;
Result.TableName := TableName;
end;
class function SQL.InsertInto: TInsertInto;
begin
Result := TInsertInto.Create;
end;
class function SQL.InsertOrReplace(TableName: string): TInsertInto;
begin
Result := InsertOrReplace;
Result.TableName := TableName;
end;
class function SQL.InsertOrReplace: TInsertInto;
begin
Result := TInsertInto.Create;
Result.OrReplace := True;
end;
class function SQL.PRAGMA(Key, Value: string): string;
begin
Result := 'PRAGMA ' + Key + ' = "' + Value + '"';
end;
class function SQL.Select(TableName: string; Fields: TArray<string>): TSelect;
var
i: Integer;
begin
Result := TSelect.Create;
Result.TableName := TableName;
if Length(Fields) > 0 then
begin
for i := Low(Fields) to High(Fields) do
Result.AddField(Fields[i]);
end;
end;
class function SQL.Select(TableName, Field: string): TSelect;
var
FFields: TArray<string>;
begin
if not Field.IsEmpty then
begin
SetLength(FFields, 1);
FFields[0] := Field;
end;
Result := SQL.Select(TableName, FFields);
end;
class function SQL.SelectLastInsertID: string;
begin
Result := 'SELECT LAST_INSERT_ID();';
end;
class function SQL.Select: TSelect;
begin
Result := TSelect.Create;
end;
class function SQL.Update: TUpdate;
begin
Result := TUpdate.Create;
end;
class function SQL.Update(TableName: string): TUpdate;
begin
Result := TUpdate.Create;
Result.TableName := TableName;
end;
class function SQL.UpdateBlob: TUpdateBlob;
begin
Result := TUpdateBlob.Create;
end;
class function SQL.UpdateBlob(TableName: string): TUpdateBlob;
begin
Result := TUpdateBlob.Create;
Result.TableName := TableName;
end;
class function SQL.UpdateBlob(TableName, FieldName: string): TUpdateBlob;
begin
Result := TUpdateBlob.Create;
Result.TableName := TableName;
Result.BlobField := FieldName;
end;
{ TTable }
constructor TTable.Create(ATableName: string; AIfNotExists: Boolean);
begin
inherited Create;
FFields := TFields.Create;
if not ATableName.IsEmpty then
TableName := ATableName;
IfNotExists := AIfNotExists;
end;
destructor TTable.Destroy;
begin
FFields.Free;
inherited;
end;
function TTable.GetField(Index: Integer): TField;
begin
Result := FFields[Index];
end;
function TTable.GetSQL(AutoFree: Boolean = False): string;
var
i: Integer;
begin
Result := 'CREATE TABLE';
if FIfNotExists then
Result := Result + ' IF NOT EXISTS';
Result := Result + ' ' + TableName + ' (';
for i := 0 to FFields.Count - 1 do
begin
Result := Result + FFields[i].GetSQL;
if i <> FFields.Count - 1 then
Result := Result + ', ';
end;
Result := Result + ')';
if AutoFree then
EndCreate;
end;
procedure TTable.AddField;
begin
FFields.Add(Field(Name, FieldType, PrimaryKey, NotNull, AutoInc));
end;
procedure TTable.Clear;
begin
TableName := '';
FFields.Clear;
end;
procedure TTable.EndCreate;
begin
Clear;
Free;
end;
procedure TTable.SetField(Index: Integer; const Value: TField);
begin
FFields[Index] := Value;
end;
{ TField }
function TField.GetSQL: string;
begin
Result := FieldName + ' ' + FieldTypeToStr(FieldType);
if PrimaryKey then
Result := Result + ' PRIMARY KEY';
if NotNull then
Result := Result + ' NOT NULL';
if AutoInc then
Result := Result + ' AUTOINCREMENT';
end;
{ TInsertInto }
constructor TInsertInto.Create;
begin
inherited;
FDoubleDoubleQuote := False;
FFieldValues := TInsertValues.Create;
end;
destructor TInsertInto.Destroy;
begin
FFieldValues.Free;
inherited;
end;
function TInsertInto.GetSQL(AutoFree: Boolean = False): string;
var
i: Integer;
begin
Result := 'INSERT ' + IfThen(FOrReplace, 'OR REPLACE') + ' INTO ' + TableName + ' (';
for i := 0 to FFieldValues.Count - 1 do
begin
Result := Result + FFieldValues[i].FieldName;
if i <> FFieldValues.Count - 1 then
Result := Result + ', ';
end;
Result := Result + ') VALUES (';
for i := 0 to FFieldValues.Count - 1 do
begin
case FFieldValues[i].FieldType of
ftInteger:
Result := Result + QuotedStr(IntToStr(FFieldValues[i].Value));
ftString:
Result := Result + QuotedStr(FFieldValues[i].Value);
ftFloat:
Result := Result + QuotedStr(FloatToSQLStr(FFieldValues[i].Value));
ftDateTime:
Result := Result + QuotedStr(FloatToSQLStr(FFieldValues[i].Value));
ftBoolean:
Result := Result + QuotedStr(BoolToSQLStr(FFieldValues[i].Value));
ftParam:
Result := Result + FFieldValues[i].Value;
end;
if i <> FFieldValues.Count - 1 then
Result := Result + ', ';
end;
Result := Result + ')';
if AutoFree then
EndCreate;
end;
procedure TInsertInto.SetDoubleDoubleQuote(const Value: Boolean);
begin
FDoubleDoubleQuote := Value;
end;
procedure TInsertInto.AddValue(FieldName: string; FieldValue: Extended);
begin
FFieldValues.Add(InsertValue(FieldName, ftFloat, FieldValue));
end;
procedure TInsertInto.AddValue(FieldName, FieldValue: string);
begin
if FDoubleDoubleQuote then
FieldValue := StringReplace(FieldValue, '"', '""', [rfReplaceAll]);
FFieldValues.Add(InsertValue(FieldName, ftString, FieldValue));
end;
procedure TInsertInto.AddValue(FieldName: string; FieldValue: Integer);
begin
FFieldValues.Add(InsertValue(FieldName, ftInteger, FieldValue));
end;
procedure TInsertInto.AddValue(FieldName: string; FieldValue: Boolean);
begin
FFieldValues.Add(InsertValue(FieldName, ftBoolean, FieldValue));
end;
procedure TInsertInto.AddValueAsParam(FieldName: string; ParamChar: string = ':'; CharOnly: Boolean = False);
begin
if CharOnly then
FFieldValues.Add(InsertValue(FieldName, ftParam, ParamChar))
else
FFieldValues.Add(InsertValue(FieldName, ftParam, ParamChar + FieldName));
end;
procedure TInsertInto.AddValue(FieldName: string; FieldValue: TDateTime);
begin
FFieldValues.Add(InsertValue(FieldName, ftDateTime, FieldValue));
end;
procedure TInsertInto.Clear;
begin
TableName := '';
FOrReplace := False;
FDoubleDoubleQuote := False;
FFieldValues.Clear;
end;
procedure TInsertInto.EndCreate;
begin
Clear;
Free;
end;
{ TSelect }
procedure TSelect.AddAsField(Value, Alias: string);
begin
if Alias <> '' then
Value := Value + ' as ' + Alias;
FFields.Add(Value);
end;
procedure TSelect.AddField(Name: string; IFNULL: string);
begin
if IFNULL.IsEmpty then
FFields.Add(Name)
else
FFields.Add('IFNULL(' + Name + ', ' + IFNULL + ')');
end;
procedure TSelect.AddFieldCount(Name, Alias: string);
begin
Name := 'COUNT(' + Name + ')';
if Alias <> '' then
Name := Name + ' as ' + Alias;
FFields.Add(Name);
end;
procedure TSelect.Clear;
begin
FName := '';
FFields.Clear;
FJoins.Clear;
FOrderBy.Clear;
end;
constructor TSelect.Create;
begin
inherited;
FFields := TFieldNames.Create;
FJoins := TStringList.Create;
FOrderBy := TStringList.Create;
FLimitInt := 0;
end;
destructor TSelect.Destroy;
begin
FFields.Free;
FJoins.Free;
FOrderBy.Free;
inherited;
end;
function TSelect.GetField(Index: Integer): string;
begin
Result := FFields[Index];
end;
function TSelect.GetOrderBy: string;
var
i: Integer;
begin
if FOrderBy.Count <= 0 then
Exit('');
Result := ' ORDER BY ';
for i := 0 to FOrderBy.Count - 1 do
begin
Result := Result + FOrderBy[i];
if i <> FOrderBy.Count - 1 then
Result := Result + ', ';
end;
end;
function TSelect.GetSQL(AutoFree: Boolean = False): string;
var
i: Integer;
FieldsStr, ALimit, AJoins: string;
begin
if FLimitInt > 0 then
ALimit := ' LIMIT ' + IntToStr(FLimitInt);
if FDistinct then
Result := 'SELECT DISTINCT '
else
Result := 'SELECT ';
FieldsStr := '';
for i := 0 to FFields.Count - 1 do
begin
FieldsStr := FieldsStr + FFields[i];
if i <> FFields.Count - 1 then
FieldsStr := FieldsStr + ', ';
end;
AJoins := '';
for i := 0 to FJoins.Count - 1 do
AJoins := AJoins + FJoins[i] + ' ';
if AJoins <> '' then
AJoins := ' ' + AJoins;
Result := Result + FieldsStr;
if not TableName.IsEmpty then
Result := Result + ' FROM ' + TableName;
Result := Result + AJoins + Where + OrderByStr + ALimit;
if AutoFree then
EndCreate;
end;
procedure TSelect.InnerJoin(JoinTable, BaseField, JoinField: string);
begin
FJoins.Add('INNER JOIN ' + JoinTable + ' ON ' + FName + '.' + BaseField + '=' + JoinTable + '.' + JoinField);
end;
procedure TSelect.LeftJoin(JoinTable, BaseField, JoinField: string; AndWhere: string = '');
begin
if AndWhere.Length > 0 then
AndWhere := ' and ' + AndWhere;
FJoins.Add('LEFT JOIN ' + JoinTable + ' ON ' + FName + '.' + BaseField + '=' + JoinTable + '.' + JoinField + AndWhere);
end;
procedure TSelect.OrderBy(FieldName: string; DESC: Boolean);
begin
if DESC then
FieldName := FieldName + ' DESC';
FOrderBy.Add(FieldName);
end;
procedure TSelect.RightJoin(JoinTable, BaseField, JoinField: string);
begin
FJoins.Add('RIGHT JOIN ' + JoinTable + ' ON ' + FName + '.' + BaseField + '=' + JoinTable + '.' + JoinField);
end;
procedure TSelect.SetField(Index: Integer; const Value: string);
begin
FFields[Index] := Value;
end;
{ TDelete }
procedure TDelete.Clear;
begin
FName := '';
end;
constructor TDelete.Create;
begin
inherited;
end;
destructor TDelete.Destroy;
begin
//
inherited;
end;
function TDelete.GetSQL(AutoFree: Boolean = False): string;
begin
Result := 'DELETE FROM ' + FName + Where;
if AutoFree then
EndCreate;
end;
{ TUpdate }
procedure TUpdate.AddValue(FieldName: string; FieldValue: Extended);
begin
FFieldValues.Add(InsertValue(FieldName, ftFloat, FieldValue));
end;
procedure TUpdate.AddValue(FieldName, FieldValue: string);
begin
if FDoubleDoubleQuote then
FieldValue := StringReplace(FieldValue, '"', '""', [rfReplaceAll]);
FFieldValues.Add(InsertValue(FieldName, ftString, FieldValue));
end;
procedure TUpdate.AddValue(FieldName: string; FieldValue: Integer);
begin
FFieldValues.Add(InsertValue(FieldName, ftInteger, FieldValue));
end;
procedure TUpdate.AddValue(FieldName: string; FieldValue: Boolean);
begin
FFieldValues.Add(InsertValue(FieldName, ftBoolean, FieldValue));
end;
procedure TUpdate.AddValueAsParam(FieldName: string; ParamChar: string = ':'; CharOnly: Boolean = False);
begin
if CharOnly then
FFieldValues.Add(InsertValue(FieldName, ftParam, ParamChar))
else
FFieldValues.Add(InsertValue(FieldName, ftParam, ParamChar + FieldName));
end;
procedure TUpdate.AddValue(FieldName: string; FieldValue: TDateTime);
begin
FFieldValues.Add(InsertValue(FieldName, ftDateTime, FieldValue));
end;
procedure TUpdate.Clear;
begin
TableName := '';
FFieldValues.Clear;
end;
constructor TUpdate.Create;
begin
inherited;
FDoubleDoubleQuote := False;
FFieldValues := TInsertValues.Create;
FDIValues := TDIValues.Create;
end;
procedure TUpdate.DecValue(FieldName: string; Value: Extended);
begin
FDIValues.Add(DIValue(FieldName, ftFloat, diDec, Value));
end;
destructor TUpdate.Destroy;
begin
FFieldValues.Free;
FDIValues.Free;
inherited;
end;
procedure TUpdate.DivValue(FieldName: string; Value: Integer);
begin
FDIValues.Add(DIValue(FieldName, ftInteger, diDiv, Value));
end;
procedure TUpdate.DivValue(FieldName: string; Value: Extended);
begin
FDIValues.Add(DIValue(FieldName, ftFloat, diDiv, Value));
end;
procedure TUpdate.DecValue(FieldName: string; Value: Integer);
begin
FDIValues.Add(DIValue(FieldName, ftInteger, diDec, Value));
end;
procedure TUpdate.IncValue(FieldName: string; Value: Extended);
begin
FDIValues.Add(DIValue(FieldName, ftFloat, diInc, Value));
end;
procedure TUpdate.IncValue(FieldName: string; Value: Integer);
begin
FDIValues.Add(DIValue(FieldName, ftInteger, diInc, Value));
end;
procedure TUpdate.MulValue(FieldName: string; Value: Integer);
begin
FDIValues.Add(DIValue(FieldName, ftInteger, diMul, Value));
end;
procedure TUpdate.MulValue(FieldName: string; Value: Extended);
begin
FDIValues.Add(DIValue(FieldName, ftFloat, diMul, Value));
end;
procedure TUpdate.SetDoubleDoubleQuote(const Value: Boolean);
begin
FDoubleDoubleQuote := Value;
end;
function TUpdate.GetSQL(AutoFree: Boolean = False): string;
var
i: Integer;
str: string;
begin
Result := 'UPDATE ' + TableName + ' SET ';
for i := 0 to FFieldValues.Count - 1 do
begin
str := '';
case FFieldValues[i].FieldType of
ftInteger:
str := QuotedStr(IntToStr(FFieldValues[i].Value));
ftString:
str := QuotedStr(FFieldValues[i].Value);
ftFloat:
str := QuotedStr(FloatToSQLStr(FFieldValues[i].Value));
ftDateTime:
str := QuotedStr(FloatToSQLStr(FFieldValues[i].Value));
ftBoolean:
str := QuotedStr(BoolToSQLStr(FFieldValues[i].Value));
ftParam:
str := FFieldValues[i].Value;
end;
Result := Result + FFieldValues[i].FieldName + ' = ' + str;
if i <> FFieldValues.Count - 1 then
Result := Result + ', ';
end;
for i := 0 to FDIValues.Count - 1 do
begin
str := '';
case FDIValues[i].FieldType of
ftInteger:
str := QuotedStr(IntToStr(FDIValues[i].Value));
ftFloat:
str := QuotedStr(FloatToSQLStr(FDIValues[i].Value));
end;
case FDIValues[i].DIType of
diInc:
Result := Result + FDIValues[i].FieldName + ' = ' + FDIValues[i].FieldName + ' + ' + str;
diDec:
Result := Result + FDIValues[i].FieldName + ' = ' + FDIValues[i].FieldName + ' - ' + str;
diMul:
Result := Result + FDIValues[i].FieldName + ' = ' + FDIValues[i].FieldName + ' * ' + str;
diDiv:
Result := Result + FDIValues[i].FieldName + ' = ' + FDIValues[i].FieldName + ' / ' + str;
end;
if i <> FDIValues.Count - 1 then
Result := Result + ', ';
end;
Result := Result + Where;
if AutoFree then
EndCreate;
end;
{ TDropTable }
procedure TDropTable.Clear;
begin
TableName := '';
end;
constructor TDropTable.Create;
begin
inherited;
end;
procedure TDropTable.EndCreate;
begin
Clear;
Free;
end;
function TDropTable.GetSQL(AutoFree: Boolean = False): string;
begin
Result := 'DROP TABLE ' + TableName;
if AutoFree then
EndCreate;
end;
{ SQL }
function SQL.AsSubquery: string;
begin
Result := '(' + GetSQL + ')';
EndCreate;
end;
procedure SQL.Clear;
begin
FUWheres.Clear;
end;
constructor SQL.Create;
begin
inherited;
FUWheres := TUnionWhere.Create;
end;
procedure SQL.EndCreate;
begin
Clear;
Free;
end;
function SQL.GetWhere: string;
var
i: Integer;
begin
Result := '';
for i := 0 to FUWheres.Count - 1 do
Result := Result + FUWheres[i];
if FWhereStr <> '' then
Result := Result + ' ' + FWhereStr;
if Result <> '' then
Result := ' WHERE ' + Result;
end;
procedure BaseSQL.SetName(const Value: string);
begin
FName := Value;
end;
procedure SQL.WhereExists(const Select: string; const Union: TWhereUnion);
begin
FUWheres.Add(InsertUnion(Union) + ' EXISTS(' + Select + ')');
end;
procedure SQL.WhereField(const FieldName, Oper: string; const FieldValue: Extended; const Union: TWhereUnion);
begin
FUWheres.Add(InsertUnion(Union) + FieldName + Oper + QuotedStr(FloatToSQLStr(FieldValue)));
end;
procedure SQL.WhereField(const FieldName, Oper: string; const FieldValue: string; const Union: TWhereUnion);
begin
FUWheres.Add(InsertUnion(Union) + FieldName + Oper + QuotedStr(FieldValue));
end;
procedure SQL.WhereField(const FieldName, Oper: string; const FieldValue: Integer; const Union: TWhereUnion);
begin
FUWheres.Add(InsertUnion(Union) + FieldName + Oper + QuotedStr(IntToStr(FieldValue)));
end;
procedure SQL.WhereField(const FieldName, Oper: string; const FieldValue: Boolean; const Union: TWhereUnion);
begin
FUWheres.Add(InsertUnion(Union) + FieldName + Oper + QuotedStr(BoolToSQLStr(FieldValue)));
end;
procedure SQL.WhereFieldBetween(const FieldName: string; const ValueLeft, ValueRight: TDateTime; const Union: TWhereUnion);
begin
FUWheres.Add(InsertUnion(Union) + FieldName + ' between ' + FloatToSQLStr(ValueLeft) + ' and ' + FloatToSQLStr(ValueRight));
end;
procedure SQL.WhereFieldBetween(const FieldName: string; const ValueLeft, ValueRight: Extended; const Union: TWhereUnion);
begin
FUWheres.Add(InsertUnion(Union) + FieldName + ' between ' + FloatToSQLStr(ValueLeft) + ' and ' + FloatToSQLStr(ValueRight));
end;
procedure SQL.WhereFieldBetween(const FieldName: string; const ValueLeft, ValueRight: Integer; const Union: TWhereUnion);
begin
FUWheres.Add(InsertUnion(Union) + FieldName + ' between ' + IntToStr(ValueLeft) + ' and ' + IntToStr(ValueRight));
end;
procedure SQL.WhereField(const FieldName, Oper: string; const FieldValue: TDateTime; const Union: TWhereUnion);
begin
FUWheres.Add(InsertUnion(Union) + FieldName + Oper + QuotedStr(FloatToSQLStr(FieldValue)));
end;
procedure SQL.WhereFieldEqual(const FieldName: string; const FieldValue: string; const Union: TWhereUnion);
begin
WhereField(FieldName, '=', FieldValue, Union);
end;
procedure SQL.WhereFieldEqual(const FieldName: string; const FieldValue: Integer; const Union: TWhereUnion);
begin
WhereField(FieldName, '=', FieldValue, Union);
end;
procedure SQL.WhereFieldEqual(const FieldName: string; const FieldValue: Extended; const Union: TWhereUnion);
begin
WhereField(FieldName, '=', FieldValue, Union);
end;
procedure SQL.WhereFieldEqual(const FieldName: string; const FieldValue: Boolean; const Union: TWhereUnion);
begin
WhereField(FieldName, '=', FieldValue, Union);
end;
procedure SQL.WhereFieldIN(const FieldName: string; const FieldValues: array of Extended; const Union: TWhereUnion);
var
FieldValue: string;
i: Integer;
begin
FieldValue := '';
for i := Low(FieldValues) to High(FieldValues) do
begin
FieldValue := FieldValue + QuotedStr(FloatToSQLStr(FieldValues[i]));
if i <> High(FieldValues) then
FieldValue := FieldValue + ', ';
end;
WhereFieldWOQ(FieldName, ' IN ', '(' + FieldValue + ')', Union);
end;
procedure SQL.WhereFieldIN(const FieldName: string; const FieldValues: array of string; const Union: TWhereUnion);
var
FieldValue: string;
i: Integer;
begin
FieldValue := '';
for i := Low(FieldValues) to High(FieldValues) do
begin
FieldValue := FieldValue + QuotedStr(FieldValues[i]);
if i <> High(FieldValues) then
FieldValue := FieldValue + ', ';
end;
WhereFieldWOQ(FieldName, ' IN ', '(' + FieldValue + ')', Union);
end;
procedure SQL.WhereFieldIN(const FieldName: string; const FieldValues: array of Integer; const Union: TWhereUnion);
var
FieldValue: string;
i: Integer;
begin
FieldValue := '';
for i := Low(FieldValues) to High(FieldValues) do
begin
FieldValue := FieldValue + QuotedStr(IntToStr(FieldValues[i]));
if i <> High(FieldValues) then
FieldValue := FieldValue + ', ';
end;
WhereFieldWOQ(FieldName, ' IN ', '(' + FieldValue + ')', Union);
end;
procedure SQL.WhereFieldIN(const FieldName: string; const FieldValues: array of Boolean; const Union: TWhereUnion);
var
FieldValue: string;
i: Integer;
begin
FieldValue := '';
for i := Low(FieldValues) to High(FieldValues) do
begin
FieldValue := FieldValue + QuotedStr(BoolToSQLStr(FieldValues[i]));
if i <> High(FieldValues) then
FieldValue := FieldValue + ', ';
end;
WhereFieldWOQ(FieldName, ' IN ', '(' + FieldValue + ')', Union);
end;
procedure SQL.WhereFieldIsNotNull(const FieldName: string; const Union: TWhereUnion);
begin
FUWheres.Add(InsertUnion(Union) + ' not ' + FieldName + ' is Null');
end;
function SQL.InsertUnion(const Union: TWhereUnion): string;
begin
case Union of
wuAnd:
Result := ' AND ';
wuOr:
Result := ' OR ';
wuNotAnd:
Result := ' NOT AND ';
wuNotOr:
Result := ' NOT OR ';
end;
if FUWheres.Count <= 0 then
Result := ''
else if FUWheres[FUWheres.Count - 1][Length(FUWheres[FUWheres.Count - 1])] = '(' then
Result := '';
end;
procedure SQL.WhereFieldIsNull(const FieldName: string; const Union: TWhereUnion);
begin
FUWheres.Add(InsertUnion(Union) + FieldName + ' is Null');
end;
procedure SQL.WhereFieldLike(const FieldName, Value: string; const Union: TWhereUnion);
begin
FUWheres.Add(InsertUnion(Union) + FieldName + ' like ' + QuotedStr(Value));
end;
procedure SQL.WhereFieldIN(const FieldName: string; const FieldValues: array of TDateTime; const Union: TWhereUnion);
var
FieldValue: string;
i: Integer;
begin
FieldValue := '';
for i := Low(FieldValues) to High(FieldValues) do
begin
FieldValue := FieldValue + QuotedStr(FloatToSQLStr(FieldValues[i]));
if i <> High(FieldValues) then
FieldValue := FieldValue + ', ';
end;
WhereFieldWOQ(FieldName, ' IN ', '(' + FieldValue + ')', Union);
end;
procedure SQL.WhereFieldWOQ(const FieldName, Oper, FieldValue: string; const Union: TWhereUnion);
begin
FUWheres.Add(InsertUnion(Union) + FieldName + Oper + FieldValue);
end;
procedure SQL.WhereFieldEqual(const FieldName: string; const FieldValue: TDateTime; const Union: TWhereUnion);
begin
WhereField(FieldName, '=', FieldValue, Union);
end;
procedure SQL.WhereNotFieldEqual(const FieldName: string; const FieldValue: Extended; const Union: TWhereUnion);
begin
WhereField(FieldName, '<>', FieldValue, Union);
end;
procedure SQL.WhereNotFieldEqual(const FieldName: string; const FieldValue: string; const Union: TWhereUnion);
begin
WhereField(FieldName, '<>', FieldValue, Union);
end;
procedure SQL.WhereNotFieldEqual(const FieldName: string; const FieldValue: Integer; const Union: TWhereUnion);
begin
WhereField(FieldName, '<>', FieldValue, Union);
end;
procedure SQL.WhereNotFieldEqual(const FieldName: string; const FieldValue: Boolean; const Union: TWhereUnion);
begin
WhereField(FieldName, '<>', FieldValue, Union);
end;
procedure SQL.WhereParenthesesClose;
begin
FUWheres.Add(') ');
end;
procedure SQL.WhereParenthesesOpen;
begin
FUWheres.Add(InsertUnion(Union) + ' (');
end;
procedure SQL.WhereStr(const Value: string);
begin
FWhereStr := Value;
end;
procedure SQL.WhereNotFieldEqual(const FieldName: string; const FieldValue: TDateTime; const Union: TWhereUnion);
begin
WhereField(FieldName, '<>', FieldValue, Union);
end;
{ TUpdateBlob }
function TUpdateBlob.GetSQL(AutoFree: Boolean = False): string;
begin
Result := 'UPDATE ' + FName + ' SET ' + FBlobField + ' = ? ' + Where;
if AutoFree then
EndCreate;
end;
end.
|
unit Token;
interface
type
TTokenKind = (tkUndefined, tkIdentifier, tkStringConstant, tkCharConstant, tkIntegerConstant, tkRealConstant,
tkConstantExpression, tkLabelIdentifier, tkTypeIdentifier, tkClassIdentifier, tkReservedWord, tkSpecialSymbol,
tkParameter, tkProgram, tkUnit, tkLibrary, tkPackage,
tkInteger, tkBoolean, tkByte, tkWord, tkCardinal, tkLongInt, tkInt64, tkUInt64, tkChar,
tkWideChar, tkWideString, tkLongWord, tkShortInt, tkSmallInt, tkPChar, tkPointer,
tkReal, tkSingle, tkDouble, tkExtended, tkCurrency, tkComp, tkByteBool, tkWordBool, tkLongBool);
const
Kinds : array[TTokenKind] of AnsiString = (
'Undefined', 'Identifier', 'String Constant', 'Char Constant', 'Integer Constant',
'Real Constant', 'Constant Expression', 'Label Identifier', 'Type Identifier', 'Class Identifier', 'Reserved Word',
'Special Symbol', 'Parameter', 'Program', 'Unit', 'Library', 'Package',
'Integer', 'Boolean', 'Byte', 'Word', 'Cardinal', 'LongInt', 'Int64', 'UInt64', 'Char',
'WideChar', 'WideString', 'LongWord', 'ShortInt', 'SmallInt', 'PChar', 'Pointer',
'Real', 'Single', 'Double', 'Extended', 'Currency', 'Comp', 'ByteBool', 'WordBool', 'LongBool');
type
TToken = class
Lexeme : string;
Hash : Cardinal;
Type_ : TToken;
NextScope : TToken;
Scope : Word;
Kind : TTokenKind;
RealValue : Extended;
IntegerValue : Int64;
StringValue : string;
end;
implementation
end.
|
unit OriUtils_TChart;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, Graphics, TAGraph, TASeries;
type
TChartHelper = class helper for TChart
public
function HasSeries(ASeries: TBasicChartSeries): Boolean;
end;
procedure ChooseSeriesColor(Series: TLineSeries);
function GetLineSeriesColor(Chart: TChart): TColor;
function GetRandomLineSeriesColor(Chart: TChart): TColor;
implementation
uses
OriGraphics;
{%region TChartHelper}
function TChartHelper.HasSeries(ASeries: TBasicChartSeries): Boolean;
var
I: Integer;
begin
Result := False;
for I := 0 to Self.Series.Count-1 do
if Self.Series[I] = ASeries then
begin
Result := True;
exit;
end;
end;
{%endregion}
{%region Series Colors}
const
SeriesColors: array[0..50] of TColor = (clRed, clGreen, clBlue, clBlack,
clMaroon, clNavy, clOlive, clPurple, clTeal, clGray, clLime, clFuchsia,
clAqua, clMediumVioletRed, clDarkRed, clBrown, clDarkGreen, clDarkCyan,
clMidnightBlue, clDarkSlateGray, clDarkSlateBlue, clDarkOrange, clFireBrick,
clDarkKhaki, clSienna, clPaleVioletRed, clSeaGreen, clCadetBlue, clRoyalBlue,
clSlateBlue, clSlateGray, clDeepPink, clCrimson, clSaddleBrown, clDarkOliveGreen,
clLightSeaGreen, clSteelBlue, clOrangeRed, clIndigo, clDimGray, clIndianRed,
clDarkGoldenrod, clDarkSeaGreen, clTurquoise, clDodgerBlue, clDarkViolet,
clDarkSalmon, clRosyBrown, clMediumSpringGreen, clMediumAquamarine, clViolet);
procedure ChooseSeriesColor(Series: TLineSeries);
begin
if Assigned(Series.Owner) and (Series.Owner is TChart)
then Series.LinePen.Color := GetLineSeriesColor(TChart(Series.Owner))
else Series.LinePen.Color := SeriesColors[Random(Length(SeriesColors))];
end;
function LineSeriesColorExists(Chart: TChart; Color: TColor): Boolean;
var
I: Integer;
begin
for I := 0 to Chart.Series.Count-1 do
if Chart.Series[I] is TLineSeries then
if TLineSeries(Chart.Series[I]).SeriesColor = Color then
begin
Result := True;
exit;
end;
Result := False;
end;
function GetLineSeriesColor(Chart: TChart): TColor;
var
I: Integer;
begin
for I := Low(SeriesColors) to High(SeriesColors) do
if not LineSeriesColorExists(Chart, SeriesColors[I]) then
begin
Result := SeriesColors[I];
exit;
end;
Result := SeriesColors[Random(Length(SeriesColors))];
end;
function GetRandomLineSeriesColor(Chart: TChart): TColor;
var
I, Start: Integer;
begin
Start := Random(Length(SeriesColors));
for I := Start to High(SeriesColors) do
if not LineSeriesColorExists(Chart, SeriesColors[I]) then
begin
Result := SeriesColors[I];
exit;
end;
for I := Low(SeriesColors) to Start-1 do
if not LineSeriesColorExists(Chart, SeriesColors[I]) then
begin
Result := SeriesColors[I];
exit;
end;
Result := SeriesColors[Start];
end;
{%endregion}
end.
|
unit CryptMessage;
{$mode delphi}
interface
uses
Classes, SysUtils, ExtCtrls, Graphics, StdCtrls, Controls, Dialogs;
const
clHighLightMsg = TColor ($FFC0C0);
type
{ TMessages }
TMessages = class(TCustomControl)
private
fImg :TImage;
fName :TLabel;
fText :TLabel;
fDate :TLabel;
function GetDate :TDate;
function GetText :string;
function GetTextHeigh (Text :string) :integer;
procedure EnterMouse (Sender :TObject);
function GetUser :string;
procedure LeaveMouse (Sender :TObject);
procedure SetDate (AValue :TDate);
procedure SetText (AValue :string);
procedure SetUser (AValue :string);
public
constructor Create (TheOwner :TComponent); override;
destructor Destroy; override;
procedure LoadImage (FileName :string); overload;
procedure LoadImage (APicture :TPicture); overload;
procedure Test;
published
procedure ReAlign; dynamic;
property User :string read GetUser write SetUser;
property Text :string read GetText write SetText;
property Date :TDate read GetDate write SetDate;
end;
implementation
{ TMessages }
function TMessages.GetTextHeigh (Text :string) :integer;
var
i :integer;
begin
Result := 0;
for i := 0 to Length (Text) - 1 do
if (Text[i] = #13) or (Text[i] = #10) then
Inc (Result, 1);
Result := Result * (Canvas.Font.GetTextHeight ('a') + 1);
// ShowMessage(Text+'Строк: '+IntToStr(Result)+'; Высота текста: '+IntToStr(Canvas.Font.GetTextHeight('a')));
end;
function TMessages.GetDate :TDate;
begin
Result := StrToDate (fDate.Caption);
end;
function TMessages.GetText :string;
begin
Result := fText.Caption;
end;
procedure TMessages.EnterMouse (Sender :TObject);
begin
if (self is TMessages) then
(self as TMessages).Color := clHighLightMsg
else
(self.Parent as TMessages).Color := clHighLightMsg;
end;
function TMessages.GetUser :string;
begin
Result := fName.Caption;
end;
procedure TMessages.LeaveMouse (Sender :TObject);
begin
if (self is TMessages) then
(self as TMessages).Color := clWhite
else
(self.Parent as TMessages).Color := clWhite;
end;
procedure TMessages.SetDate (AValue :TDate);
begin
fDate.Caption := DateTimeToStr (AValue);
end;
procedure TMessages.SetText (AValue :string);
begin
fText.Caption := AValue;
end;
procedure TMessages.SetUser (AValue :string);
begin
fName.Caption := AValue;
end;
constructor TMessages.Create (TheOwner :TComponent);
begin
inherited Create (TheOwner);
// Panel
Caption := '';
//BevelInner:= bvNone;
// BevelOuter:=bvNone;
Color := clWhite;
(self as TMessages).Left := 4;
(self as TMessages).Top := 10;
(self as TMessages).Height := 100;
// Avatar
fImg := TImage.Create (self as TMessages);
fImg.Parent := self as TMessages;
fImg.Left := 4;
fImg.Top := 4;
fImg.Height := 64;
fImg.Width := 64;
fImg.Stretch := True;
fImg.Proportional := True;
// Name User
fName := TLabel.Create (self as TMessages);
fName.Parent := self as TMessages;
fName.Left := 84;
fName.Top := 4;
fName.Font.Color := clMaroon;
fName.Font.Style := [fsBold];
// Text
fText := TLabel.Create (self as TMessages);
fText.Parent := self as TMessages;
fText.Font.Color := clBlack;
fText.Left := 84;
fText.Top := 24;
fText.WordWrap := True;
fText.AutoSize := True;
// Date of Message
fDate := TLabel.Create (self as TMessages);
fDate.Parent := self as TMessages;
fDate.Left := (self as TMessages).Width - fDate.Width - 4;
fDate.Anchors := [akRight, akTop];
fDate.Top := 4;
fDate.Font.Color := clGray;
// Mouse events
(self as TMessages).OnMouseEnter := EnterMouse ();
(self as TMessages).OnMouseLeave := LeaveMouse ();
fImg.OnMouseEnter := EnterMouse ();
fImg.OnMouseLeave := LeaveMouse ();
fDate.OnMouseEnter := EnterMouse ();
fDate.OnMouseLeave := LeaveMouse ();
fText.OnMouseEnter := EnterMouse ();
fText.OnMouseLeave := LeaveMouse ();
fName.OnMouseEnter := EnterMouse ();
fName.OnMouseLeave := LeaveMouse ();
end;
destructor TMessages.Destroy;
begin
fImg.Free;
fName.Free;
fText.Free;
fDate.Free;
inherited Destroy;
end;
procedure TMessages.LoadImage (FileName :string);
begin
fImg.Picture.LoadFromFile (FileName);
end;
procedure TMessages.LoadImage (APicture :TPicture);
begin
fImg.Picture.Assign (APicture);
end;
procedure TMessages.Test;
var
pic :TPicture;
begin
Text := 'Привет)) Как дела?' + #13 + #10;
Date := Now;
User := 'User';
pic := TPicture.Create;
pic.LoadFromFile ('/home/anton/Изображения/ava.jpg');
LoadImage (pic);
pic.Free;
end;
procedure TMessages.ReAlign;
begin
inherited ReAlign;
(self as TMessages).Height := 74 + GetTextHeigh (string (fText.Caption));
end;
end.
|
//
// This unit is part of the GLScene Project, http://glscene.org
//
{: FRTrackBarEdit<p>
Frame combining a TrackBar and an Edit.<p>
<b>Historique : </b><font size=-1><ul>
<li>05/10/08 - DanB - Removed Kylix support
<li>29/03/07 - DaStr - Renamed LINUX to KYLIX (BugTrackerID=1681585)
<li>19/12/06 - DaStr - Fixed bug in SetValue, SetValueMin, SetValueMax when
changing these values didn't change the Edit's Text
<li>03/07/04 - LR - Make change for Linux
<li>06/02/00 - Egg - Creation
</ul></font>
}
unit FRTrackBarEdit;
interface
{$i GLScene.inc}
uses
System.Classes, System.SysUtils,
VCL.Forms, VCL.StdCtrls, VCL.ComCtrls, VCL.Controls;
type
TRTrackBarEdit = class(TFrame)
TrackBar: TTrackBar;
Edit: TEdit;
procedure TrackBarChange(Sender: TObject);
procedure EditChange(Sender: TObject);
private
{ Private Declarations }
procedure SetValue(const val : Integer);
function GetValue : Integer;
procedure SetValueMin(const val : Integer);
function GetValueMin : Integer;
procedure SetValueMax(const val : Integer);
function GetValueMax : Integer;
public
{ Public Declarations }
property Value : Integer read GetValue write SetValue;
property ValueMin : Integer read GetValueMin write SetValueMin;
property ValueMax : Integer read GetValueMax write SetValueMax;
end;
//---------------------------------------------------------------------
implementation
//---------------------------------------------------------------------
{$R *.dfm}
procedure TRTrackBarEdit.TrackBarChange(Sender: TObject);
begin
Edit.Text:=IntToStr(TrackBar.Position);
end;
procedure TRTrackBarEdit.EditChange(Sender: TObject);
var
i : Integer;
begin
try
i:=StrToInt(Edit.Text);
TrackBar.Position:=i;
except
// ignore
end;
end;
// SetValue
//
procedure TRTrackBarEdit.SetValue(const val : Integer);
begin
TrackBar.Position:=val;
TrackBarChange(Self);
end;
// GetValue
//
function TRTrackBarEdit.GetValue : Integer;
begin
Result:=TrackBar.Position;
end;
// SetValueMax
//
procedure TRTrackBarEdit.SetValueMax(const val : Integer);
begin
TrackBar.Max:=val;
TrackBarChange(Self);
end;
// GetValueMax
//
function TRTrackBarEdit.GetValueMax : Integer;
begin
Result:=TrackBar.Max;
end;
// SetValueMin
//
procedure TRTrackBarEdit.SetValueMin(const val : Integer);
begin
TrackBar.Min:=val;
TrackBarChange(Self);
end;
// GetValueMin
//
function TRTrackBarEdit.GetValueMin : Integer;
begin
Result:=TrackBar.Min;
end;
end.
|
unit BillsFrm;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
Grids, Db, DBTables, DBGrids, ExtCtrls, DBCtrls, BtrDS, Menus,
StdCtrls, Buttons, ComCtrls, SearchFrm, {Sign, }PaydocsFrm, Common, Basbn,
Utilits, CommCons, BillFrm, BankCnBn;
type
TBillsForm = class(TDataBaseForm)
DataSource: TDataSource;
DBGrid: TDBGrid;
StatusBar: TStatusBar;
BtnPanel: TPanel;
NameEdit: TEdit;
SearchIndexComboBox: TComboBox;
MainMenu: TMainMenu;
OperItem: TMenuItem;
FindItem: TMenuItem;
SeeItem: TMenuItem;
EditBreaker: TMenuItem;
NameLabel: TLabel;
procedure FormCreate(Sender: TObject);
procedure FormDestroy(Sender: TObject);
procedure NameEditChange(Sender: TObject);
procedure FindItemClick(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure SeeItemClick(Sender: TObject);
procedure SearchIndexComboBoxClick(Sender: TObject);
private
procedure UpdateBill(CopyCurrent, New: Boolean);
public
SearchForm: TSearchForm;
end;
var
BillsForm: TBillsForm;
implementation
{$R *.DFM}
var
PayDataSet: TExtBtrDataSet = nil;
procedure TBillsForm.FormCreate(Sender: TObject);
begin
DataSource.DataSet := GlobalBase(biBill);
PayDataSet := GlobalBase(biPay);
DefineGridCaptions(DBGrid, PatternDir+'Bills.tab');
SearchForm:=TSearchForm.Create(Self);
SearchIndexComboBox.ItemIndex:=0;
SearchIndexComboBoxClick(nil);
SearchForm.SourceDBGrid := DBGrid;
end;
procedure TBillsForm.FormDestroy(Sender: TObject);
begin
BillsForm := nil;
end;
procedure TBillsForm.NameEditChange(Sender: TObject);
var
T: array[0..512] of Char;
I, Err: LongInt;
S: string;
D: Word;
begin
case SearchIndexComboBox.ItemIndex of
0, 1:
begin
Val(NameEdit.Text, I, Err);
if Err=0 then
TBtrDataSet(DataSource.DataSet).LocateBtrRecordByIndex(I,
SearchIndexComboBox.ItemIndex, bsGe);
end;
2: begin
D := StrToBtrDate(NameEdit.Text);
TBtrDataSet(DataSource.DataSet).LocateBtrRecordByIndex(D, 2, bsGe);
end;
end;
end;
procedure TBillsForm.FindItemClick(Sender: TObject);
begin
SearchForm.ShowModal;
end;
procedure TBillsForm.FormClose(Sender: TObject; var Action: TCloseAction);
begin
if FormStyle=fsMDIChild then Action:=caFree;
end;
procedure TBillsForm.UpdateBill(CopyCurrent, New: Boolean);
var
OpRec: TOpRec;
Err: Integer;
T: array[0..512] of Char;
begin
(* BillForm := TBillForm.Create(Self);
with BillForm do begin
if CopyCurrent then
TBillDataSet(DataSource.DataSet).GetBtrRecord(PChar(@OpRec))
else
FillChar(OpRec,SizeOf(OpRec),#0);
with OpRec do begin
DosToWin(clNameC);
StrLCopy(T,clAccC,SizeOf(clAccC));
RsEdit.Text := StrPas(T);
BikEdit.Text := IntToStr(clCodeB);
StrLCopy(T,clInn,SizeOf(clInn));
InnEdit.Text := StrPas(T);
NameMemo.Text := StrPas(clNameC);
end;
if ShowModal = mrOk then begin
with OpRec do begin
StrPCopy(clAccC,RsEdit.Text);
Val(BikEdit.Text,clCodeB,Err);
StrPCopy(clInn,InnEdit.Text);
StrPCopy(clNameC,NameMemo.Text);
WinToDos(clNameC);
end;
if New then begin
if TBillDataSet(DataSource.DataSet).AddBtrRecord(PChar(@OpRec),
SizeOf(OpRec))
then
DataSource.DataSet.Refresh
else
MessageBox(Handle, 'Невозможно добавить запись', 'Редактирование',
MB_OK + MB_ICONERROR);
end else begin
if TBillDataSet(DataSource.DataSet).UpdateBtrRecord(PChar(@OpRec),
SizeOf(OpRec))
then
{ DataSource.DataSet.Refresh}
DataSource.DataSet.UpdateCursorPos
else
MessageBox(Handle, 'Невозможно изменить запись', 'Редактирование',
MB_OK + MB_ICONERROR);
end;
end;
Free;
end;*)
end;
procedure TBillsForm.SeeItemClick(Sender: TObject);
const
MesTitle: PChar = 'Состояние документа';
var
BillRec: TOpRec;
Res, LenB, LenD, DocSender: Integer;
BillForm: TBillForm;
Editing, ChangeStatus: Boolean;
Buf: array[0..511] of Char;
I: Integer;
W: Word;
BankPayRec: TBankPayRec;
begin
with TBillDataSet(DataSource.DataSet) do
begin
LenB := GetBtrRecord(@BillRec);
if LenB>0 then
begin
I := BillRec.brDocId;
LenD := SizeOf(BankPayRec);
Res := PayDataSet.BtrBase.GetEqual(BankPayRec, LenD, I, 0);
if Res=0 then
DocSender := BankPayRec.dbIdSender
else
DocSender := 0;
BillForm := TBillForm.Create(Self);
with BillForm do
begin
Caption := 'Состояние операции';
//if GetOperNum<>1 then
LockAllControls;
UpdateDocCheckBox.Enabled := False;
InputCheckBox.Enabled := False;
ToExportCheckBox.Enabled := False;
SignCheckBox.Enabled := False;
MailComboBox.Enabled := False;
MailComboBox.ParentColor := True;
UpdateBillCheckBox.Enabled := True;
BillPanel.Visible := True;
with BillRec do
begin
if (0<=brPrizn) and (brPrizn<=2) then
PriznComboBox.ItemIndex := brPrizn;
DateEdit.Text := BtrDateToStr(brDate);
if brDel=0 then
DelComboBox.ItemIndex := 0
else
DelComboBox.ItemIndex := 1;
DebitComboBox.ItemIndex := (brState and dsAnsType) shr 4;
CreditComboBox.ItemIndex := (brState and dsReSndType) shr 6;
SenderComboBox.ItemIndex := brState and dsSndType;
VerSpinEdit.Value := brVersion;
LenB := LenB - 17;
if LenB>SizeOf(Buf) then
LenB := SizeOf(Buf);
case brPrizn of
brtBill:
begin
LenB := LenB-53;
if LenB<0 then
LenB := 0;
StrLCopy(Buf, brText, LenB);
DosToWinL(Buf, SizeOf(Buf));
NameEdit.Text := StrPas(Buf);
NumberEdit.Text := IntToStr(brNumber);
VidComboBox.Text := IntToStr(brType);
DebetAccEdit.Text := Copy(StrPas(brAccD), 1, SizeOf(brAccD));
CreditAccEdit.Text := Copy(StrPas(brAccC), 1, SizeOf(brAccC));
SumCalcEdit.Value := brSum / 100.0;
end;
brtReturn:
begin
StrLCopy(Buf, brRet, LenB);
DosToWinL(Buf, SizeOf(Buf));
NameEdit.Text := Buf;
end;
end;
end;
PriznComboBoxChange(nil);
UpdateBillCheckBox.Checked := False;
VerSpinEdit.Font.Color := clBlack;
OpIdLabel.Caption := 'Id='+IntToStr(BillRec.brIder);
Editing := True;
while Editing and (ShowModal = mrOk) and not ReadOnly do
begin
if UpdateBillCheckBox.Checked then
begin
(*
with BillRec do
begin
LenB := 17;
brDate := DateToBtrDate(DateEdit.Date);
brPrizn := PriznComboBox.ItemIndex;
case brPrizn of
brtBill:
begin
brNumber := StrToInt(NumberEdit.Text);
brType := StrToInt(VidComboBox.Text);
StrPLCopy(brAccD, DebetAccEdit.Text, SizeOf(brAccD));
StrPLCopy(brAccC, CreditAccEdit.Text, SizeOf(brAccC));
brSum := SumCalcEdit.Value * 100;
StrPLCopy(Buf, NameEdit.Text, SizeOf(Buf)-1);
WinToDosL(Buf, SizeOf(Buf));
StrPLCopy(brText, Buf, SizeOf(brText)-1);
LenB := LenB + 53 + StrLen(brText) + 1;
end;
brtReturn:
begin
StrPLCopy(Buf, NameEdit.Text, SizeOf(brRet)-1);
WinToDosL(Buf, SizeOf(Buf));
StrPLCopy(brRet, Buf, SizeOf(brRet)-1);
LenB := LenB + StrLen(brRet) + 1;
end;
end;
brState := 0;
if not NewBill then
begin
brState := brState or SenderComboBox.ItemIndex;
brState := brState or (DebitComboBox.ItemIndex shl 4);
brState := brState or (CreditComboBox.ItemIndex shl 6);
end;
brVersion := VerSpinEdit.Value;
ChangeStatus := NewBill or (brDel<>0) and (DelComboBox.ItemIndex=0)
or (brDel=0) and (DelComboBox.ItemIndex=1);
if DelComboBox.ItemIndex=0 then
brDel := 0
else
brDel := 1;
if ChangeStatus then
begin
if NewBill or (brDel=0) then
begin
if not CorrectOpSum(brAccD, brAccC, 0, Round(brSum), brDate,
DocSender, W, nil)
then
MessageBox(Application.Handle,
PChar('Не удалось обновить состояние счетов'),
MesTitle, MB_OK or MB_ICONERROR);
end
else
if not DeleteOp(BillRec, BankPayRec.dbIdSender) then
MessageBox(Application.Handle,
PChar('Не удалось обновить состояние счетов'),
MesTitle, MB_OK or MB_ICONERROR);
end;
end;
I := BillRec.brIder;
Res := BtrBase.Update(BillRec, LenB, I, 0);
if Res=0 then
UpdateCursorPos
else *) Res := -111;
MessageBox(Application.Handle,
PChar('Не удалось обновить операцию BtrErr='+IntToStr(Res)),
MesTitle, MB_OK or MB_ICONERROR);
end;
Editing := False;
end;
Free;
end;
end
end;
end;
procedure TBillsForm.SearchIndexComboBoxClick(Sender: TObject);
begin
(DataSource.DataSet as TBtrDataSet).IndexNum:=SearchIndexComboBox.ItemIndex;
NameEdit.Visible := SearchIndexComboBox.ItemIndex <> 2;
end;
end.
|
unit MainClientForm;
{ Use the "GateCli" component to configure this Client to connect with your Gateway. }
interface
uses
Windows, Messages, SysUtils, Variants,
Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ExtCtrls, Buttons,
rtcInfo,
rtcLog,
rtcConn,
rtcSystem,
rtcGateConst,
rtcGateCli,
rtcXGateCIDs,
rtcSrcList,
ScreenHostForm,
ScreenViewForm,
rtcDataCli;
{$include rtcDeploy.inc}
var
MyFileName:String='';
type
TMsgType=(msg_Input,msg_Output,msg_Speed,msg_Error,msg_Status,msg_Group);
type
TGateClientForm = class(TForm)
MainPanel: TPanel;
StatusUpdate: TTimer;
InfoPanel: TPanel;
l_Status1: TLabel;
l_Status2: TLabel;
Panel1: TPanel;
lblRecvBufferSize: TLabel;
lblSendBuffSize: TLabel;
eYourID: TEdit;
GateCli: TRtcHttpGateClient;
Label1: TLabel;
btnShowScreen: TButton;
eUsers: TListBox;
ScreenLink: TRtcGateClientLink;
btnReset: TSpeedButton;
btnCLR: TLabel;
shInput: TShape;
shOutput: TShape;
Label2: TLabel;
Label3: TLabel;
procedure btnCLRClick(Sender: TObject);
procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean);
procedure FormCreate(Sender: TObject);
procedure StatusUpdateTimer(Sender: TObject);
procedure FormDestroy(Sender: TObject);
procedure eUsersClick(Sender: TObject);
procedure btnResetClick(Sender: TObject);
procedure btnShowScreenClick(Sender: TObject);
procedure GateCliBeforeLogInGUI(Client: TRtcHttpGateClient;
State: TRtcGateClientStateInfo);
procedure GateCliAfterLoginFailGUI(Client: TRtcHttpGateClient;
State: TRtcGateClientStateInfo);
procedure GateCliAfterLogOutGUI(Client: TRtcHttpGateClient;
State: TRtcGateClientStateInfo);
procedure GateCliDataFilter(Client: TRtcHttpGateClient;
Data: TRtcGateClientData; var Wanted: Boolean);
procedure GateCliInfoFilter(Client: TRtcHttpGateClient;
Data: TRtcGateClientData; var Wanted: Boolean);
procedure GateCliReadyToSend(Client: TRtcHttpGateClient;
State: TRtcGateClientStateInfo; var WantGUI,
WantBackThread: Boolean);
procedure GateCliStreamResetGUI(Client: TRtcHttpGateClient;
State: TRtcGateClientStateInfo);
procedure GateCliAfterLoggedInGUI(Client: TRtcHttpGateClient;
State: TRtcGateClientStateInfo);
procedure ScreenLinkDataFilter(Client: TRtcHttpGateClient;
Data: TRtcGateClientData; var Wanted: Boolean);
procedure GateCliInfoReceived(Client: TRtcHttpGateClient;
Data: TRtcGateClientData; var WantGUI, WantBackThread: Boolean);
procedure GateCliInfoReceivedGUI(Client: TRtcHttpGateClient;
Data: TRtcGateClientData);
procedure ScreenLinkDataReceivedGUI(Client: TRtcHttpGateClient;
Data: TRtcGateClientData);
public
FCS:TRtcCritSec;
sStatus1,sStatus2:String;
FLoginStart:Cardinal;
CntReset:integer;
FScreenUsers:TStrList;
NeedProviderChange:boolean;
procedure PrintMsg(const s:String; t:TMsgType);
end;
var
GateClientForm: TGateClientForm;
implementation
{$R *.dfm}
function FillZero(const s:RtcString;len:integer):RtcString;
begin
Result:=s;
while length(Result)<len do
Result:='0'+Result;
end;
function Time2Str(v:TDateTime):RtcString;
var
hh,mm,ss,ms:word;
begin
DecodeTime(v, hh,mm,ss,ms);
Result:=FillZero(Int2Str(hh),2)+':'+FillZero(Int2Str(mm),2)+':'+FillZero(Int2Str(ss),2);
end;
function KSeparate(const s:String):String;
var
i,len:integer;
begin
Result:='';
i:=0;len:=length(s);
while i<len do
begin
Result:=s[len-i]+Result;
Inc(i);
if (i mod 3=0) and (i<len) then Result:='.'+Result;
end;
end;
procedure TGateClientForm.FormCreate(Sender: TObject);
begin
StartLog;
NeedProviderChange:=False;
FCS:=TRtcCritSec.Create;
sStatus1:='';
sStatus2:='';
MyFileName:=AppFileName;
FScreenUsers:=tStrList.Create(16);
GateCli.AutoLogin:=True;
end;
procedure TGateClientForm.FormDestroy(Sender: TObject);
begin
FreeAndNil(FScreenUsers);
FreeAndNil(FCS);
end;
procedure TGateClientForm.FormCloseQuery(Sender: TObject; var CanClose: Boolean);
begin
GateCli.AutoLogin:=False;
CanClose:=True;
end;
procedure TGateClientForm.btnCLRClick(Sender: TObject);
begin
CntReset:=0;
btnCLR.Color:=clWhite;
btnCLR.Font.Color:=clNavy;
btnCLR.Caption:='CLR';
end;
procedure TGateClientForm.StatusUpdateTimer(Sender: TObject);
begin
case GateCli.State.InputState of
ins_Connecting: shInput.Brush.Color:=clYellow;
ins_Closed: shInput.Brush.Color:=clRed;
ins_Prepare: shInput.Brush.Color:=clBlue;
ins_Start: shInput.Brush.Color:=clGreen;
ins_Recv: shInput.Brush.Color:=clLime;
ins_Idle: shInput.Brush.Color:=clGreen;
ins_Done: shInput.Brush.Color:=clNavy;
end;
if GateCli.State.InputState=ins_Closed then
shInput.Pen.Color:=shInput.Brush.Color
else
case GateCli.State.PingInCnt of
0:shInput.Pen.Color:=clWhite;
1:shInput.Pen.Color:=clGreen;
2:shInput.Pen.Color:=clLime;
3:shInput.Pen.Color:=clBlack;
end;
case GateCli.State.OutputState of
outs_Connecting: shOutput.Brush.Color:=clYellow;
outs_Closed: shOutput.Brush.Color:=clRed;
outs_Prepare: shOutput.Brush.Color:=clBlue;
outs_Start: shOutput.Brush.Color:=clGreen;
outs_Send: shOutput.Brush.Color:=clLime;
outs_Idle: shOutput.Brush.Color:=clGreen;
outs_Done: shOutput.Brush.Color:=clNavy;
end;
if GateCli.State.OutputState=outs_Closed then
shOutput.Pen.Color:=shOutput.Brush.Color
else
case GateCli.State.PingOutCnt of
0:shOutput.Pen.Color:=clWhite;
1:shOutput.Pen.Color:=clGreen;
2:shOutput.Pen.Color:=clLime;
3:shOutput.Pen.Color:=clBlack;
end;
lblSendBuffSize.Caption:=KSeparate(Int2Str(GateCli.State.TotalSent div 1024))+'K';
lblRecvBufferSize.Caption:=KSeparate(Int2Str(GateCli.State.TotalReceived div 1024))+'K';
FCS.Acquire;
try
l_Status1.Caption:=sStatus1;
l_Status2.Caption:=sStatus2;
finally
FCS.Release;
end;
end;
procedure TGateClientForm.PrintMsg(const s: String; t:TMsgType);
begin
FCS.Acquire;
try
case t of
msg_Input:
sStatus1:=Time2Str(Now)+' '+s;
msg_Output:
sStatus2:=Time2Str(Now)+' '+s;
msg_Group:
sStatus1:=Time2Str(Now)+' '+s;
msg_Status:
begin
sStatus1:=Time2Str(Now)+' '+s;
sStatus2:='';
end;
msg_Error:
sStatus2:=Time2Str(Now)+' '+s;
end;
finally
FCS.Release;
end;
(*
case t of
msg_Input:
Log(s,IntToStr(GateCli.MyUID)+'_DATA');
msg_Output:
Log(s,IntToStr(GateCli.MyUID)+'_DATA');
msg_Group:
Log(s,IntToStr(GateCli.MyUID)+'_DATA');
msg_Speed:
Log(s,IntToStr(GateCli.MyUID)+'_CONN');
msg_Status:
if GateCli.MyUID>0 then
Log(s,IntToStr(GateCli.MyUID)+'_CONN');
msg_Error:
if GateCli.MyUID>0 then
Log(s,IntToStr(GateCli.MyUID)+'_CONN');
end;
*)
end;
procedure TGateClientForm.eUsersClick(Sender: TObject);
var
UID,Key:String;
UserID,GroupID:TGateUID;
i:integer;
begin
if GateCli.Ready then
begin
if (eUsers.Items.Count>0) and (eUsers.ItemIndex>=0) then
begin
UID:=Trim(eUsers.Items.Strings[eUsers.ItemIndex]);
eUsers.Items.Delete(eUsers.ItemIndex);
Key:=FScreenUsers.search(UID);
if Key<>'' then
begin
FScreenUsers.remove(UID);
i:=Pos('/',UID);
UserID:=StrToInt(Copy(UID,1,i-1));
GroupID:=StrToInt(Copy(UID,i+1,length(UID)-i));
// Open a new Screen View Form
NewScreenViewForm(GateCli,UserID,GroupID,Key);
end;
end;
end;
end;
procedure TGateClientForm.btnResetClick(Sender: TObject);
begin
NeedProviderChange:=True;
GateCli.ResetStreams;
end;
procedure TGateClientForm.btnShowScreenClick(Sender: TObject);
begin
if GateCli.Ready then
GetScreenHostForm(GateCli);
end;
procedure TGateClientForm.GateCliBeforeLogInGUI(Client: TRtcHttpGateClient; State: TRtcGateClientStateInfo);
begin
FLoginStart:=GetAppRunTime;
CntReset:=0;
btnCLR.Color:=clWhite;
btnCLR.Font.Color:=clNavy;
btnCLR.Caption:='CLR';
shInput.Brush.Color:=clYellow;
shInput.Pen.Color:=clWhite;
shOutput.Brush.Color:=clYellow;
shOutput.Pen.Color:=clWhite;
PrintMsg('Logging in ...',msg_Status);
StatusUpdate.Enabled:=True;
end;
procedure TGateClientForm.GateCliAfterLoginFailGUI(Client: TRtcHttpGateClient; State: TRtcGateClientStateInfo);
begin
if Client.UseWinHTTP then // WinHTTP -> async WinSock
begin
btnReset.Caption:='AS';
Client.UseBlocking:=False;
Client.UseProxy:=False;
Client.UseWinHTTP:=False;
end
else if Client.UseProxy then // WinInet -> WinHTTP
begin
btnReset.Caption:='HT';
Client.UseWinHTTP:=True;
end
else if Client.UseBlocking then // blocking WinSock -> WinInet
begin
btnReset.Caption:='IE';
Client.UseProxy:=True;
end
else // async WinSock -> blocking WinSock
begin
btnReset.Caption:='BS';
Client.UseBlocking:=True;
end;
StatusUpdate.Enabled:=False;
StatusUpdateTimer(nil);
PrintMsg('Login attempt FAILED.',msg_Status);
if State.LastError<>'' then
PrintMsg(State.LastError, msg_Error);
btnCLR.Color:=clRed;
btnCLR.Font.Color:=clYellow;
end;
procedure TGateClientForm.GateCliAfterLogOutGUI(Client: TRtcHttpGateClient; State: TRtcGateClientStateInfo);
begin
PrintMsg('Logged OUT.',msg_Status);
if State.LastError<>'' then
PrintMsg(State.LastError,msg_Error);
StatusUpdate.Enabled:=False;
if btnCLR.Caption<>'CLR' then
begin
btnCLR.Color:=clRed;
btnCLR.Font.Color:=clYellow;
end;
StatusUpdateTimer(nil);
end;
procedure TGateClientForm.GateCliDataFilter(Client: TRtcHttpGateClient; Data: TRtcGateClientData; var Wanted: Boolean);
begin
if Data.Footer or not Data.ToBuffer then
PrintMsg('<'+IntToStr(Length(Data.Content) div 1024)+'K id '+IntToStr(Data.UserID), msg_Input);
end;
procedure TGateClientForm.GateCliReadyToSend(Client: TRtcHttpGateClient; State: TRtcGateClientStateInfo; var WantGUI, WantBackThread: Boolean);
begin
PrintMsg('Ready ('+FloatToStr((GetAppRunTime-FLoginStart)/RUN_TIMER_PRECISION)+' s).',msg_Output);
FLoginStart:=GetAppRunTime;
end;
procedure TGateClientForm.GateCliStreamResetGUI(Client: TRtcHttpGateClient; State: TRtcGateClientStateInfo);
begin
if NeedProviderChange then
begin
NeedProviderChange:=False;
if Client.UseWinHTTP then // WinHTTP -> async WinSock
begin
btnReset.Caption:='AS';
Client.UseBlocking:=False;
Client.UseProxy:=False;
Client.UseWinHTTP:=False;
end
else if Client.UseProxy then // WinInet -> WinHTTP
begin
btnReset.Caption:='HT';
Client.UseWinHTTP:=True;
end
else if Client.UseBlocking then // blocking WinSock -> WinInet
begin
btnReset.Caption:='IE';
Client.UseProxy:=True;
end
else // async WinSock -> blocking WinSock
begin
btnReset.Caption:='BS';
Client.UseBlocking:=True;
end;
end;
FLoginStart:=GetAppRunTime;
Inc(CntReset);
btnCLR.Color:=clYellow;
btnCLR.Font.Color:=clRed;
btnCLR.Caption:=IntToStr(CntReset);
if Client.Active then
PrintMsg('#LOST ('+FloatToStr(State.InputResetTime/RUN_TIMER_PRECISION)+'s / '+FloatToStr(State.OutputResetTime/RUN_TIMER_PRECISION)+'s)',msg_Status)
else
PrintMsg('#FAIL ('+FloatToStr(State.InputResetTime/RUN_TIMER_PRECISION)+'s / '+FloatToStr(State.OutputResetTime/RUN_TIMER_PRECISION)+'s)',msg_Status);
if State.LastError<>'' then
PrintMsg(State.LastError, msg_Error);
eUsers.Clear;
Client.Groups.ClearAllStates;
FScreenUsers.removeall;
end;
procedure TGateClientForm.GateCliAfterLoggedInGUI(Client: TRtcHttpGateClient; State: TRtcGateClientStateInfo);
begin
PrintMsg('Logged IN ('+FloatToStr((GetAppRunTime-FLoginStart)/RUN_TIMER_PRECISION)+' s).',msg_Status);
eYourID.Text:=LWord2Str(State.MyUID);
StatusUpdateTimer(nil);
end;
procedure TGateClientForm.GateCliInfoFilter(Client: TRtcHttpGateClient; Data: TRtcGateClientData; var Wanted: Boolean);
begin
case Data.Command of
gc_UserOnline,
gc_UserOffline,
gc_UserJoined,
gc_UserLeft,
gc_JoinedUser,
gc_LeftUser,
gc_Error: Wanted:=True;
end;
end;
procedure TGateClientForm.GateCliInfoReceived(Client: TRtcHttpGateClient; Data: TRtcGateClientData; var WantGUI, WantBackThread: Boolean);
begin
case Data.Command of
gc_Error: PrintMsg('ERR #'+IntToStr(Data.ErrCode)+' from User '+IntToStr(Data.UserID),msg_Group);
gc_UserOnline: PrintMsg(IntToStr(Data.UserID)+' ON-Line',msg_Group);
gc_UserOffline: PrintMsg(IntToStr(Data.UserID)+' OFF-Line',msg_Group);
gc_UserJoined,
gc_UserLeft,
gc_JoinedUser,
gc_LeftUser: WantGUI:=True;
end;
end;
procedure TGateClientForm.GateCliInfoReceivedGUI(Client: TRtcHttpGateClient; Data: TRtcGateClientData);
var
s:String;
begin
case Data.Command of
gc_UserJoined: begin
S:=IntToStr(Data.UserID)+'/'+INtToStr(Data.GroupID);
PrintMsg('OUT +'+S,msg_Group);
end;
gc_UserLeft: begin
S:=IntToStr(Data.UserID)+'/'+IntToStr(Data.GroupID);
PrintMsg('OUT -'+S,msg_Group);
end;
gc_JoinedUser: begin
Client.Groups.SetStatus(Data.UserID,Data.GroupID,10);
S:=IntToStr(Data.UserID)+'/'+IntToStr(Data.GroupID);
PrintMsg('IN +'+S,msg_Group);
if FScreenUsers.search(S)<>'' then
begin
FScreenUsers.remove(S);
if eUsers.Items.IndexOf(S)>=0 then
eUsers.Items.Delete(eUsers.Items.IndexOf(S));
end;
end;
gc_LeftUser: begin
Client.Groups.ClearStatus(Data.UserID,Data.GroupID);
S:=IntToStr(Data.UserID)+'/'+IntToStr(Data.GroupID);
PrintMsg('IN -'+S,msg_Group);
end;
end;
end;
procedure TGateClientForm.ScreenLinkDataFilter(Client: TRtcHttpGateClient; Data: TRtcGateClientData; var Wanted: Boolean);
begin
if (Data.CallID=cid_ImageInvite) and (Data.ToGroupID>0) then
begin
if Data.Footer then
Wanted:=(length(Data.Content)>0) and (Client.Groups.GetStatus(Data.UserID,Data.ToGroupID)=0)
else if Data.Header then
Data.ToBuffer:=True;
end
else if (Data.CallID=cid_GroupClosed) and (Data.GroupID>0) then
begin
if Data.Footer then
Wanted:=True
else if Data.Header then
Data.ToBuffer:=True;
end;
end;
procedure TGateClientForm.ScreenLinkDataReceivedGUI(Client: TRtcHttpGateClient; Data: TRtcGateClientData);
var
UID:RtcString;
i:integer;
begin
if (Data.CallID=cid_ImageInvite) and (Data.ToGroupID>0) then
begin
UID:=Int2Str(Data.UserID)+'/'+Int2Str(Data.ToGroupID);
if FScreenUsers.search(UID)='' then
begin
// Add UserID+GroupID to Screen Users invitation list
eUsers.Items.Add(UID);
// Store Invitation Key for Screen with UserID+GroupID
FScreenUsers.insert(UID,RtcBytesToString(Data.Content));
if GetActiveWindow<>Handle then MessageBeep(0);
end;
end
else if (Data.CallID=cid_GroupClosed) and (Data.GroupID>0) then
begin
UID:=Int2Str(Data.UserID)+'/'+Int2Str(Data.GroupID);
if FScreenUsers.search(UID)<>'' then
begin
i:=eUsers.Items.IndexOf(UID);
if i>=0 then
eUsers.Items.Delete(i);
FScreenUsers.remove(UID);
end;
end;
end;
end.
|
unit ExLibrary;
interface
uses Classes,SysUtils,SyncObjs,Dialogs,Variants, Math ;
type
addrRecord = record
addrArray : array[0..6] of string;
end;
//==============================================================================
// 암호화에 사용되는 기본 키값
//==============================================================================
const
MYKEY = 7756; ENCKEY = 9089; DECKEY = 1441;
SidoTo : array[1..23] of String = (
'강원' ,// 0
'경기' ,// 1
'경남' ,// 2
'경남' ,// 3
'경북' ,// 4
'경북' ,// 5
'광주' ,// 6
'대구' ,// 7
'대전' ,// 8
'부산' ,// 9
'서울' ,// 0
'세종' ,// 1
'울산' ,// 2
'인천' ,// 3
'전남' ,// 4
'전남' ,// 5
'전북' ,// 6
'전북' ,// 7
'제주' ,// 8
'충남' ,// 9
'충남' ,// 0
'충북' ,// 1
'충북' // 2
);
SidoFrom : array[1..23] of String = (
'강원' ,// 0
'경기' ,// 1
'경남' ,// 2
'경상남',// 3
'경북' ,// 4
'경상북',// 5
'광주' ,// 6
'대구' ,// 7
'대전' ,// 8
'부산' ,// 9
'서울' ,// 0
'세종' ,// 1
'울산' ,// 2
'인천' ,// 3
'전남' ,// 4
'전라남',// 5
'전북' ,// 6
'전라북',// 7
'제주' ,// 8
'충남' ,// 9
'충청남',// 0
'충북' ,// 1
'충청북' // 2
);
{
// 입력받은 문자열의 길이를 구한다.
function ExLen( Value : String ) : Integer ; overload;
// 입력받은 문자열의 길이가 LonSize 와 같은지 확인한뒤 결과를 넘겨준다.
function ExLen( Value : String ; LenSize : Byte ) : Boolean; overload;
// 입력 받은 X 에 N 만큼 증가 한뒤 값을 넘겨준다.
function ExInc( var X : Integer ; N : Integer = 1 ; Action : Boolean = True) : Integer ;
// 입력 받은 X 에 N 만큼 감소 한뒤 값을 넘겨준다.
function ExDec( var X : Integer ; N : Integer = 1 ; Action : Boolean = True) : Integer ;
// Round 델파이 라운드에 문제가 있어 수정하여 사용함
}
// function ExRound (Value : Extended ) : Int64 ;
// function ExFloor (Value : Extended ) : Int64 ;
// 입력된 문자가 공백인지 확인하는 펑션
function ExIsEmpty ( Value : String ): Boolean ; overload;
// 입력된 문자가 공백이면 디폴트 값을 넘겨준다.
function ExIsEmpty ( Value : String ; Default : String ): String ; overload;
// 입력 받은 숫자가 0 이면 디폴트 값을 넘겨준다.
function ExIsZero( Value : Integer; Default : Integer ) : Integer ;
//
function ExMakeText ( CharText : Char; TextSize : Integer ) : String;
//
function ExPlusText ( CharText : Char; TextSize : Integer ; Value : Variant ) : String;
// 문자열을 암호화 처리 한다.
function ExEncoding ( Const Value : String ; Key : Word = MYKEY ) : String;
// 문자열을 암호화 해지 한다.
function ExDecoding ( Const Value : String ; Key : Word = MYKEY ) : String;
// 문자열을 받아 넘버형 필드를 넘겨준다.
function ExNumbText ( value , Default : Variant ; OnlyNumb : Boolean = False ) : String ;
// 문자 변환용 펑션
function ExVarToStr ( Value : Variant; DefValue : String = '' ) : String ;
function ExVarToInt ( Value : Variant; DefValue : Integer = 0 ) : Integer ;
function ExVarToDob ( Value : Variant; DefValue : Double = 0 ) : Double ;
function ExVarToBol ( Value : Variant; DefValue : Boolean = False ) : Boolean ;
function ExVarToWon ( Value : Variant; DefValue : Double = 0 ) : String ;
// 문자열을 받아 스페이스를 제거 한다.
function ExSqlSpace ( Const Value : String ) : String ;
function ExStrToSql ( Const Value : String ; StrWrite : Boolean ) : String; overload;
function ExStrToSql ( Const Value : String ; DefIndex , RtlIndex : Integer ) : String; overload;
function ExStrToSql ( Const Value : String ; TextArry : array of String ) : String; overload;
function ExStrToSql ( Const Value : String ; TextArry : array of String; SqlWrite : Boolean ) : String; overload;
function ExStrToSql ( Const Value : String ; FromDate , Todate : TDateTime ) : String; overload;
function ExStrToSql ( Const Value : String ; FromDate , Todate : TDateTime ; StrWrite : Boolean ) : String; overload;
// 특정 값을 입력받고 배열에서 저장된 다음 숫자를 찾아 결과를 넘겨준다.
// 만약 다음 숫자를 찾지 못하면 처음 값을 넘겨준다.
function ExNextByte ( Value : Integer; LoopValue : array of Integer ) : Integer ;
// 두 문자열을 입력 받아 참이면 앞의 문자열을 거짓이면 뒷 문자열을 넘겨준다.
function ExRetToStr ( TrueValue , FalseValue : String ; RetBool : Boolean ) : String; overload;
// 두 숫자를 입력 받아 참이면 앞의 문자열을 거짓이면 뒷 문자열을 넘겨준다.
function ExRetToInt ( TrueValue , FalseValue : Integer ; RetBool : Boolean ) : Integer; overload;
// 두 문자열을 입력 받아 참이면 앞의 문자열을 거짓이면 뒷 문자열을 넘겨준다.
function ExRetToVar ( TrueValue , FalseValue : Variant ; RetBool : Boolean ) : Variant; overload;
// 한 문자열을 입력 받아 배열로 입력된 문자가 있는지 확인 하여 참과 거짓을 넘겨준다.
function ExFindText ( Const Value : String ; TextList : array of string; UpperType : Boolean = False ) : Boolean;
//
function ExCopyText ( Const Value : String ; Index , Count : Integer ) : String ;
//
function ExCopyFind ( Const Value : String; Index , Count : Integer ; FindList : Array of String ; UpperType : Boolean = False ) : Boolean ;
// 일자를 입력 받아 한글로 표기된 요일을 넘겨준다.
function ExWeekOfHan ( Value : TDateTime=0) : String ;
// 체크썸을 구한다.
function ExStrToBcc ( Const Value : String ) : Word ;
// 주민 등록 번호를 검사 한다.
function ExPLicense ( Const Value : String ) : Boolean ;
//ExStringList;
// 등록 번호를 검사 한다.
function ExCLicense( Const Value : String ) : Boolean ;
// 2개의 바이트를 받아 제일 높은 수를 구한다.
function ExMinByte( A1 , B1 : Byte ): byte;
/// function ExMinByte ( Value : Array of Byte ): byte;
// 2개를 받아 제일 높은 수를 구한다.
function ExMaxInteger( A1 , B1 : Longint ): Longint;
// 2개를 받아 제일 낮은 수를 구한다.
function ExMinInteger( A1 , B1 : Longint ): Longint;
// 특별문자 변환
function ExReplace( Source, FromStr, ToStr : String ): String;
// 전체주소를 받아 시도,시군구, 읍면동, 상세주소로 분리 한다.
function ExAddressSplite( Source: String ): addrRecord;
// 시도를 짧은시도2자리로 만든다.
function ExAddressSidoShort( Source: String ): String;
// 특별문자 변환
//function ExReplace(Source, FromStr, ToStr : String ): String;
//function ExReplace(Source, FromStr, ToStr : String ): String;
// 델파이 ROUND 가 문제가 있어 소스 만들어 사용함
// 델파이에서는 뱅크 라운드 형태를 취함
{function Myround(Value : Extended): Int64;
var
TempVal : Int64;
begin
Result := round(Value);
Temp := Trunc(Value);
if (Value - TempVal) = 0.5 then Result := TempVal + 1
else if (Value - TempVal) = -0.5 then Result := TempVal;
end;
}
implementation
{
//==============================================================================
// 문자열을 입력 받아 문자열의 사이즈를 넘겨준다.
//==============================================================================
function ExLen( Value : String ) : Integer ;
begin
if not ExIsEmpty ( Value ) then Result := Length ( Trim( Value ) ) else Result := 0 ;
end;
//==============================================================================
// 입력 받은 문자열의 길이와 입력된 사이즈가 같으면 참을 넘겨준다.
//==============================================================================
function ExLen( Value : String ; LenSize : Byte ) : Boolean;
begin
if ExLen( Value ) = LenSize then Result := True else Result := False;
end;
}
//==============================================================================
// 지정된 수만큼 증가한다.
//==============================================================================
function ExtInc( var X : Integer ; N : Integer = 1; Action : Boolean = True ) : Integer ;
begin
if Action then
Inc( X , N );
Result := X ;
end;
//==============================================================================
// 지정된 수만큼 감소한다.
//==============================================================================
function ExtDec( var X : Integer ; N : Integer = 1 ; Action : Boolean = True) : Integer ;
begin
if Action then
Dec( X , N );
Result := X ;
end;
//==============================================================================
// 델파이 Round 문제가 있어 수정하여 사용함
//==============================================================================
function ExRound (Value : Extended) : Int64 ;
begin
Result := Trunc(Value) + Trunc(Frac(Value)*2);
end;
//==============================================================================
// 델파이 Round 문제가 있어 수정하여 사용함
//==============================================================================
function ExFloor (Value : Extended ) : Int64 ;
var BuffText : String ;
Pos_Byte : Integer ;
begin
BuffText := FloatToStr( Value );
Pos_Byte := Pos( '.',BuffText );
if Pos_Byte > 0 then begin
Result := StrToInt64( Copy( BuffText , 1, Pos_Byte -1 ) );
end else
Result := StrToInt64( BuffText );
end;
//==============================================================================
// 입력된 문자열이 공백인지 확인한다. 공백일 경우 참을 그렇지 않을 경우 거짓을 넘겨준다.
//==============================================================================
function ExIsEmpty ( Value : String ) : Boolean;
begin
if Trim( Value ) = '' then Result := True else Result := False ;
end;
//==============================================================================
// 입력된 문자열이 공백인지 확인한다. 공백일 경우 디폴트 값을 넘겨준다.
//==============================================================================
function ExIsEmpty( Value : String; Default : String ) : String;
begin
if Trim( Value ) = '' then Result := Default else Result := Value;
end;
//==============================================================================
// 입력된 숫자가 0 이면 디폴트 값을 넘겨준다.
//==============================================================================
function ExIsZero( Value : Integer; Default : Integer ) : Integer ;
begin
if Value = 0 then Result := Default else Result := Value;
end;
//==============================================================================
// 문자열을 받아 암호화 한다.
//==============================================================================
function ExEncoding ( Const Value : String; Key : Word = MYKEY ) : String;
var i : Byte;
AscChar : Char;
EncStr , EncAsc : string;
begin
EncStr := '';
if Key = 0 Then Key := MYKEY;
for i := 1 to Length( Value ) do begin
EncStr := EncStr + Char ( Byte ( Value [i] ) xor ( Key shr 8 ) );
Key := ( Byte ( EncStr [i] ) + Key ) * ENCKEY + DECKEY ;
end;
EncAsc := '';
for i := 1 to Length( EncStr ) do begin // 암호화된 이진 문자열을 ASCII 숫자로 변경
AscChar := EncStr[i];
EncAsc := EncAsc + format('%.3d', [Ord(AscChar)]); // 한문자당 3자리씩
end;
Result := EncAsc;
end;
//==============================================================================
// 암호화된 문자열을 받아 암호를 헤제한다.
//==============================================================================
function ExDecoding ( const Value : string; Key : Word = MYKEY ) : string;
var i : Byte;
AscStr : string;
DecStr , DecAsc : string;
begin
DecAsc := ''; i := 1;
repeat
AscStr := Copy( Value, i, 3); // 한문자당 3자리 숫자로 저장되어 있다
DecAsc := DecAsc + Chr( StrToIntDef ( AscStr, 0 ) ) ; // ASCII값을 구한다
i := i + 3;
until i > Length( Value );
DecStr := '';
if Key = 0 Then Key := MYKEY;
for i := 1 to Length( DecAsc ) do begin
DecStr := DecStr + Char ( Byte ( DecAsc [i] ) xor ( Key shr 8 ) );
Key := ( Byte ( DecAsc [i] ) + Key ) * ENCKEY + DECKEY ;
end;
Result := DecStr;
end;
//==============================================================================
// 특정 캐랙터를 받아 입력 받은 수 만큼의 문자열을 만들어 준다.
// 특정 문자로 이루어진 문자열을 만들때 사용한다.
// ex ( 5 , C ) = 'CCCCC' 예제 ( 4 , '0' ) = '0000'
//==============================================================================
function ExMakeText ( CharText : Char; TextSize : Integer ) : String;
begin
Result := '';
if 0 < TextSize then begin
if TextSize > 255 then TextSize := 255;
SetLength( Result , TextSize );
FillChar ( Result[1] , Length(Result), CharText );
end;
end;
//==============================================================================
// 숫자와 자리수를 받아 자리수 만큼의 의 문자열을 만들어 주는 함수 ( 0으로 채움 )
// 항상 지정된 자리수 만큼의 문자열을 사용할때 사용한다.
// ex ( KS , -4 , 'A' ) = 'AAKS'; ( KS , -5 , '0' ) = '000KS';
// ex ( KS , 4 , 'A' ) = 'KSAA'; ( KS , 5 , '0' ) = 'KS000';
//==============================================================================
function ExPlusText ( CharText : Char; TextSize : Integer; Value : Variant ) : String;
begin
try Result := VarToStr ( Value );
if TextSize > 0 then begin
Result := Result + ExMakeText( CharText , TextSize - Length( Result ) ) ;
end else
if TextSize < 0 then begin
Result := ExMakeText( CharText , ( TextSize * -1 ) - Length( Result ) ) + Result ;
end;
finally end;
end;
//==============================================================================
// 가변형을 받아 숫자형 문자만 출력해 준다.
//==============================================================================
function ExNumbText ( value , Default : Variant; OnlyNumb : Boolean = False ) : String ;
var i : Integer;
IvBuff , RvBuff : String;
begin
RvBuff := '' ;
Result := Default ;
try IvBuff := VarToStr ( value ) ;
if not ExIsEmpty ( IvBuff ) then begin
for i := 1 to Length ( IvBuff ) do begin
if IvBuff[i] In [ '0'..'9','-','.' ] then begin
if OnlyNumb then begin
if IvBuff[i] In [ '0'..'9' ] then RvBuff := RvBuff + IvBuff[i]
end else RvBuff := RvBuff + IvBuff[i] ;
end;
end;
end;
finally Result := RvBuff ; end;
end;
//==============================================================================
// 가변형을 받아 문자 형태로 넘겨준다.
//==============================================================================
function ExVarToStr ( Value : Variant; DefValue : String = '' ) : String ;
begin
Result := Defvalue ;
try Result := VarToStr ( Value );
if Trim( Result) = '' then Result := DefValue;
except Result := DefValue;end;
end;
//==============================================================================
// 가변형을 받아 숫자 형태로 넘겨준다.
//==============================================================================
function ExVarToInt ( Value : Variant; DefValue : Integer = 0 ) : Integer ;
begin
if not ExFindText( VarToStr( Value ) , [ 'TRUE' , 'FALSE' ] , True ) then begin
try Result := StrToInt ( ExVarToStr ( Value , IntToStr(DefValue) ) );
except
Result := DefValue;
end;
end else
if ExFindText( VarToStr( Value ) , ['TRUE' ] , True ) then begin
Result := 1 ;
end else
if ExFindText( VarToStr( Value ) , ['FALSE' ] , True ) then begin
Result := 0 ;
end ;
end;
//==============================================================================
// 가변형을 받아 실수 형태로 넘겨준다.
//==============================================================================
function ExVarToDob ( Value : Variant; DefValue : Double = 0 ) : Double ;
begin
try Result := StrToFloat( ExVarToStr ( Value , FloatToStr( DefValue ) ) );
except Result := DefValue; end;
end;
//==============================================================================
// 가변형을 받아 블린 형태로 넘겨준다.
//==============================================================================
function ExVarToBol ( Value : Variant; DefValue : Boolean = False ) : Boolean ;
var TempText : String ;
begin
try TempText := UpperCase ( Trim( ExVarToStr( Value , BoolToStr ( DefValue ) ) ) );
Result := ExFindText( TempText, [ 'Y' , 'YES' , 'T' , 'TRUE' , '1', '참' ] );
except Result := DefValue; end;
end;
//==============================================================================
// 가변형을 받아 문자 형태로 넘겨준다.
//==============================================================================
function ExVarToWon ( Value : Variant; DefValue : Double = 0 ) : String ;
const Suh : Array [1..9] of String = ( '일','이','삼','사','오','육','칠','팔','구');
won : Array [1..9] of String = ( '' ,'십','백','천','만','십','백','천','억');
var TempBuff : Double ;
TempText : String;
TextSize , TextSite , TextNumb : Integer ;
begin
TempBuff := ExVarToDob( Value , 0 ) ;
if ( TempBuff > 0 ) and ( TempBuff < 1000000000 ) then begin
TempText := ExNumbText( TempBuff ,0 , True ) ;
Result :='금_';
TextSite := 1;
TextSize := Length(TempText);
while TextSize > 0 do begin
if TempText[TextSite] <> '0' then begin
TextNumb := StrToInt(TempText[TextSite]);
Result := Result+Suh[TextNumb]+Won[TextSize];
end;
Dec ( TextSize ) ;
inc ( TextSite ) ;
end;
Result := Result +'원정';
end else Result := '?';
end;
//==============================================================================
//
//==============================================================================
function ExSqlSpace ( Const Value : String ) : String ;
var TextSize : integer ;
TempBuff : String ;
CharBuff , TempChar : Char ;
CharByte , LoopByte : Integer ;
begin
Result := '' ; TempBuff := '' ;
CharBuff := ' '; TempChar := ' ';
CharByte := 0 ; LoopByte := 0 ;
TextSize := Length( Value );
if TextSize > 0 then begin
while LoopByte <= TextSize do begin
Inc(LoopByte);
TempChar := CharBuff ;
CharBuff := Value[LoopByte] ;
if CharBuff = ' ' then begin // 한자리를 읽은뒤 공백이면
Inc(CharByte);
if CharByte = 1 then
if TempChar <> ',' then TempBuff := TempBuff + ' ';
end else
begin
CharByte := 0 ;
if (CharBuff = ',') and (TempChar = ' ' ) then begin
TempBuff := Copy ( TempBuff , 1, Length ( TempBuff ) -1 ) + CharBuff ;
end else TempBuff := TempBuff + CharBuff;
end;
end;
Result := TempBuff ;
end ;
end;
//==============================================================================
// Where 문장을 넣어준다.
//==============================================================================
function ExStrToSql ( Const Value : String ; TextArry : Array of String; SqlWrite : Boolean ) : String; overload;
var i : Integer ;
FlagBuff , TextBuff : String ;
begin
Result := '' ;
try FlagBuff := Trim ( UpperCase( TextArry[Low(TextArry)]) );
if SqlWrite and not ExIsEmpty ( FlagBuff ) then begin //
if High ( TextArry ) > 0 then begin // 배열의 크기가 0보다 크면
if ExFindText( FlagBuff , ['FIX', 'NUM', 'AND', 'ORS', 'ORM', 'ORE', 'LIKE' , 'LLK' , 'RLK' ,'DLK' ] ) then begin
if (FlagBuff = 'FIX') then begin
Result := Value + QuotedStr ( TextArry[1] ) ; // StrWrite 유무 관계없이 무조건 넣어준다. 고정값으로 판정
end else
if not ExIsEmpty ( TextArry [1] ) then begin
//if FlagBuff = 'FIX' then begin Result := Value + QuotedStr ( TextArry[1] ) ; end else
if FlagBuff = 'NUM' then begin Result := Value + TextArry[1] ; end else
if FlagBuff = 'AND' then begin Result := Value + QuotedStr ( TextArry[1] ) ; end else
if FlagBuff = 'ORS' then begin Result := ' AND (1=2 '+ Value + QuotedStr ( TextArry[1] ); end else
if FlagBuff = 'ORM' then begin Result := Value + QuotedStr ( TextArry[1] ) ; end else
if FlagBuff = 'ORE' then begin Result := Value + QuotedStr ( TextArry[1] ) + ' ) ' ; end else
if FlagBuff = 'LLK' then begin Result := Value + ' LIKE ''%' + TextArry[1] + ''' ' ; end else
if FlagBuff = 'RLK' then begin Result := Value + ' LIKE ''' + TextArry[1] + '%'' ' ; end else
if FlagBuff = 'DLK' then begin Result := Value + ' LIKE ''%' + TextArry[1] + '%'' ' ; end else
if FlagBuff = 'LIKE' then begin Result := Value + ' LIKE ''%' + TextArry[1] + '%'' ' ;
end;
end else begin
if FlagBuff = 'ORS' then begin Result := ' AND ( 1 = 2 ' ; end else
if FlagBuff = 'ORE' then begin Result := ' ) ' ; end;
end;
end else
if ExFindText ( FlagBuff , ['IN'] ) then begin
if High (TextArry) = 1 then begin
if not ExIsEmpty ( TextArry[1] ) then begin
Result := Value + ' = ' + QuotedStr ( TextArry[1] );
end;
end else
if High (TextArry) > 1 then begin
FlagBuff := ''; TextBuff := '';
for i := Low(TextArry) + 1 to High (TextArry) do begin
// ShowMessage( TextArry[i] );
TextBuff := TextBuff + FlagBuff + QuotedStr ( TextArry[i] ) ;
FlagBuff := ',' ;
end;
Result := Value + ' IN ( ' + TextBuff + ' ) ' ;
end ;
end else
if not ExIsEmpty( TextArry[0] ) and not ExIsEmpty(TextArry [1] ) then begin
Result := Value + ' BETWEEN ' + QuotedStr( TextArry[0]) +' AND '+ QuotedStr(TextArry[1] ) ;
end;
end else Result := Value + QuotedStr ( TextArry[0] ) ;
end;
finally
if Trim ( Result ) <> '' then Result := Result + #13#10;
end;
end;
//==============================================================================
// Where 문장을 넣어준다.
//==============================================================================
function ExStrToSql ( Const Value : String ; TextArry : Array of String ) : String; overload;
begin
Result := ExStrToSql ( Value , TextArry , True ) ;
end;
//==============================================================================
// Where 문장을 넣어준다.
//==============================================================================
function ExStrToSql ( Const Value : String ; StrWrite : Boolean ) : String; overload;
begin
if StrWrite then Result := Value else Result := '';
end;
function ExStrToSql ( Const Value : String ; DefIndex , RtlIndex : Integer ) : String; overload;
begin
Result := ExStrToSql ( Value , (DefIndex = RtlIndex) );
end;
//==============================================================================
// Where 문장을 넣어준다.
//==============================================================================
function ExStrToSql ( Const Value : String ; FromDate , ToDate : TDateTime ) : String; overload;
begin
Result := Value + ' BETWEEN ''' + FormatDateTime( 'YYYY-MM-DD' , FromDate ) +
''' AND ''' + FormatDateTime( 'YYYY-MM-DD' , ToDate ) + ''' ' + #13#10 ;
end;
//==============================================================================
// Where 문장을 넣어준다.
//==============================================================================
function ExStrToSql ( Const Value : String ; FromDate , ToDate : TDateTime ; StrWrite : Boolean ) : String; overload;
begin
if StrWrite then Result := ExStrToSql ( Value , FromDate , ToDate ) else Result := '';
end;
//==============================================================================
// 특정 값을 입력받고 배열에서 저장된 다음 숫자를 찾아 결과를 넘겨준다.
// 만약 다음 숫자를 찾지 못하면 처음 값을 넘겨준다.
//==============================================================================
function ExNextByte ( Value : Integer; LoopValue : array of Integer ) : Integer;
var i , j : Integer ;
begin
if not(ExtInc(Value)>LoopValue[High(LoopValue)]) and not(Value<LoopValue[Low(LoopValue)]) then begin
for i := Value to LoopValue[High(LoopValue)] do begin
for j := Low(LoopValue ) to High(LoopValue) do begin
if Value = LoopValue[ j ] then begin
Result := LoopValue[j] ;
Exit;
end else Continue ;
end;
ExtInc( Value );
Continue ;
end;
Result := LoopValue[Low( LoopValue )];
end else Result := LoopValue[Low( LoopValue )];
end;
//==============================================================================
// 문자열을 받아 참과 거짓일 때 문자열을 넘겨준다.
//==============================================================================
function ExRetToStr ( TrueValue , FalseValue : String ; RetBool : Boolean ) : String ;
begin
if RetBool then Result := TrueValue else Result := FalseValue ;
end;
//==============================================================================
// 문자열을 받아 참과 거짓일 때 문자열을 넘겨준다.
//==============================================================================
function ExRetToInt ( TrueValue , FalseValue : Integer ; RetBool : Boolean ) : Integer ;
begin
if RetBool then Result := TrueValue else Result := FalseValue ;
end;
//==============================================================================
// 문자열을 받아 참과 거짓일 때 문자열을 넘겨준다.
//==============================================================================
function ExRetToVar ( TrueValue , FalseValue : Variant ; RetBool : Boolean ) : Variant;
begin
if RetBool then Result := TrueValue else Result := FalseValue ;
end;
//==============================================================================
// 입력된 문자여세 동일한 문자열이 있는지 검색한다.
//==============================================================================
function ExFindText ( const Value : String ; TextList : Array of string; UpperType : Boolean = False ) : Boolean;
var i : integer;
KeyValue : String ;
function UpperTypeAction ( TempText : String ) : String ;
begin
if UpperType then Result := UpperCase ( TempText ) else Result := TempText ;
end;
begin
Result := False;
KeyValue := UpperTypeAction ( Value );
for i := Low ( TextList ) to High ( TextList ) do begin // 배열의 시작부터 끝까지 루프를 반복한다.
if KeyValue = UpperTypeAction ( TextList[i] ) then begin // 배열의 루푸지점과 KEY 값이 일치하면 True 를 반환한뒤 종료한다.
Result := True; exit;
end;
end;
end;
//==============================================================================
// 카피와 동일한 문장이다. [ 양수 ] 입력시 Left Copy [ 음수 ] 입력시 Right Copy 한다.
// Index 가 양수 이면 앞 자리수 부터 카피
// 음수 이면 뒤 자리수 부터 카피
// Count 가 양수 이면 Index 지점부터 + 카운트 문자열
// 음수 이면 Index 지점부터 - 카운트 문자열
//==============================================================================
function ExCopyText ( Const Value : String ; Index , Count : Integer ) : String ;
begin
Result := Value ;
if Index > 0 then begin
if Count > 0 then
Result := Copy ( Value , Index , Count )
else Result := Copy ( Value , ( Length( Value ) + 1 ) - ( Count * -1 ) , ( Count * -1 ));
end else begin
Result := Copy ( Value , ( Length( Value ) + 1 )-(Abs(Index)) , Abs(Index));
end;
end;
//==============================================================================
// 문자열을 주고 해당 문자가열 특정 위치와 찾고자 하는 값이 포함되어 있는지 확인한다.
//==============================================================================
function ExCopyFind ( Const Value : String; Index , Count : Integer ; FindList : Array of String ; UpperType : Boolean = False ) : Boolean ;
begin
Result := ExFindText ( ExCopyText( Value , Index , Count ) , FindList ,UpperType );
end;
//==============================================================================
// 일자를 받아 한들로 된 요일을 알려준다.
//==============================================================================
function ExWeekOfHan ( Value : TDateTime = 0 ) : String ;
const DAYSWEEK_ARRAY : Array [1..7] of String = ('일','월','화','수','목','금','토');
begin
if Value = 0 then begin
Result := DAYSWEEK_ARRAY [ DayOfWeek( Now ) ];
end else
Result := DAYSWEEK_ARRAY [ DayOfWeek(Value) ];
end;
//==============================================================================
// ChkSum 구하는 함수
//==============================================================================
function ExStrToBcc ( Const Value : String ) : Word ;
var i : integer;
/// BccSum : WORD;
begin
Result := Byte( Value[1] ) xor Byte( Value[2] ) ;
for i := 3 to Length ( Value ) do begin
Result := Result xor Byte ( Value[i] );
end;
end;
{
//==============================================================================
// Hex 값을 텍스트 형태로 바꿔준다.
//==============================================================================
function ExHexToHex ( HexByte : Byte; ResultSize : Byte = 4 ) : String ; overload;
begin
Result := IntToHex ( HexByte , ResultSize ) ;
end;
}
{
//==============================================================================
// HEX 형태의 텍스트를 받아 Hex형태로 바꿔준다.
//==============================================================================
function ExHexToHex ( HexText : String ) : Byte ; overload;
//var ix , iy : Char ;
// ix , iy : Char ;
begin
// Str := ( x Shl 4 ) or y );
// ExStrToHex
end;
}
{
//==============================================================================
// 2값을 비교하여 큰 값을 넘겨준다.
//==============================================================================
function ExMaxValue ( A1 , B1 : Longint ): Longint; overload;
begin
if A1 > B1 then Result := A1 else Result := B1;
end;
//==============================================================================
// 2값을 비교하여 작은 값을 넘겨준다.
//==============================================================================
function ExMInValue ( A1 , B1 : Longint ): Longint; overload;
begin
if A1 < B1 then Result := A1 else Result := B1;
end;
}
//==============================================================================
// 문자열을 받아 대한민국 주민등록 번호와 일치하는지 검사한다.
//==============================================================================
function ExPLicense( Const Value : String ) : Boolean ;
var i,Numb : integer;
IdNumb : String ;
Narray : Array [ 1..13 ] of Integer ;
begin
Result := False ;
IdNumb := ExNumbText( Value , 0 , True );
if Length ( IdNumb ) = 13 then begin
for i := 1 to Length ( IdNumb ) do Narray[i] := StrToInt ( IdNumb[i] ) ;
Numb := 11 - ( NArray[ 1] * 2 + NArray[ 2] * 3 + NArray[ 3] * 4 +
NArray[ 4] * 5 + NArray[ 5] * 6 + NArray[ 6] * 7 +
NArray[ 7] * 8 + NArray[ 8] * 9 + NArray[ 9] * 2 +
NArray[10] * 3 + NArray[11] * 4 + NArray[12] * 5 ) mod 11 ;
Case Numb of 10 : Numb := 0 ; 11 : Numb := 1 ; end;
if Numb = Narray[13] then Result := True else Result := False ;
end;
end;
//==============================================================================
// 문자열을 받아 대한민국 사업자 번호와 일치하는지 검사한다.
//==============================================================================
function ExCLicense( Const Value : String ) : Boolean ;
var i : Integer ;
ChNumb : integer;
IdNumb , IdChar : String ;
begin
Result := False ;
IdNumb := ExNumbText( Value , 0 , True );
ChNumb := 0;
if Length ( IdNumb ) = 10 then begin
for i := 1 to Length ( IdNumb ) do begin
Case i of
1,4,7 : begin ChNumb := ChNumb + StrToInt ( IdNumb[i] ); end;
2,5,8 : begin ChNumb := ChNumb + StrToInt ( IdNumb[i] ) * 3 ; end;
3 ,6 : begin ChNumb := ChNumb + StrToInt ( IdNumb[i] ) * 7 ; end;
9 : begin IdChar := ExPlusText( '0' , -2 , StrToInt ( IdNumb[i] ) * 5 ) ;
ChNumb := ChNumb + StrToInt ( Copy ( IdChar ,1,1 ) ) +
StrToInt ( Copy ( IdChar ,2,1 ) ) ;
end;
end;
end;
if FloatToStr( ( 10 - ChNumb mod 10 ) mod 10 ) = IdNumb[10] then Result := True ;
end;
end;
function ExMinByte( A1 , B1 : Byte ): byte;
begin
if A1 < B1 then Result := A1 else Result := B1;
end;
//==============================================================================
// 2개의 값중 큰값을 넘겨준다.
//==============================================================================
function ExMaxInteger(A1, B1: Longint): Longint;
begin
if A1 > B1 then Result := A1 else Result := B1;
end;
//==============================================================================
// 2개의 값중 작은값을 넘겨준다.
//==============================================================================
function ExMinInteger(A1, B1: Longint): Longint;
begin
if A1 < B1 then Result := A1 else Result := B1;
end;
// 특별문자 변환
function ExReplace(Source, FromStr, ToStr : String ): String;
var before : String;
begin
Result := StringReplace(Source, FromStr, ToStr, [rfReplaceAll, rfIgnoreCase]);
end;
// -----------------------------------------------------------------------------
// 전체주소를 받아 시도,시군구, 읍면동, 상세주소로 분리 한다.
// 경기도 광명시 소사구 소사동 소아아파트 123-4567
// -----------------------------------------------------------------------------
function ExAddressSplite( Source: String ): addrRecord;
var //addrArray : array[0..4] of string;
ar : addrRecord;
iSearch : Integer;
Str, Str1, Str2 : String;
sido, gungu, dong, etc : String;
function getPos(SourceStr : String) : String;
var iPos : Integer;
begin
Result := '';
iPos := Pos(' ', SourceStr); // 반환값 = 3
if iPos > 0 then begin
result := Trim(Copy(SourceStr, 1,iPos));
Str := Trim(Copy(SourceStr, iPos, 200));
end else Str := Trim(SourceStr);
end;
begin
sido := '';
gungu := '';
dong := '';
Str := Source;
etc := Trim(Str);
sido := getPos(Str); //시도
if Trim(Str) <> '' then begin
etc := Trim(Str);
gungu := getPos(Trim(Str)); //시군구
if Trim(Str) <> '' then begin
dong := getPos(Trim(Str)); //읍면동
etc := Trim(Str); //나머지 주소
end;
end;
Str2 := Copy(dong, Length(dong)-1, 2);
if Str2 = '구' then begin
sido := sido + gungu;
gungu := dong;
dong := getPos(Trim(Str)); //읍면동
etc := Trim(Str); //나머지 주소
end;
ar.addrArray[0] := Source;
ar.addrArray[1] := sido;
ar.addrArray[2] := gungu;
ar.addrArray[3] := dong;
ar.addrArray[4] := etc;
ar.addrArray[5] := IntToStr(length(sido));
//ar.addrArray[5] := IntToStr(ByteToCharLen(sido, Length(sido)*2));
ar.addrArray[6] := ExAddressSidoShort(sido);
Result := ar;
end;
// 시도를 짧은시도2자리로 만든다.
function ExAddressSidoShort( Source: String ): String;
var i, No : Integer;
StrFrom, StrTo : String;
begin
Result := '';
for I := Low(SidoFrom) to High(SidoFrom) do begin
StrFrom := SidoFrom[I];
StrTo := SidoTo[I];
No := Pos(StrFrom, Source); //시도
if No > 0 then begin
Result := StrTo;
//sHOWmESSAGE('tO=>'+StrTo);
break;
end;
end;
end;
//// 특별문자 변환
//function ExReplace(Source, FromStr, ToStr : String ): String;
//var before : String;
//begin
// Result := StringReplace(Source, FromStr, ToStr, [rfReplaceAll, rfIgnoreCase]);
//end;
end. |
{**********************************************}
{ TBubbleSeries (derived from TPointSeries) }
{ Copyright (c) 1995-2004 by David Berneda }
{**********************************************}
unit BubbleCh;
{$I TeeDefs.inc}
interface
{ TBubbleSeries derives from standard TPointSeries.
Each point in the series is drawn like a Bubble.
Each point has a Radius value that's used to draw the Bubble with its
corresponding screen size.
Inherits all functionality from TPointSeries and
its ancestor TCustomSeries.
}
uses {$IFNDEF LINUX}
Windows, Messages,
{$ENDIF}
{$IFDEF CLX}
QGraphics, Types,
{$ELSE}
Graphics,
{$ENDIF}
Classes,
Chart, Series, TeEngine, TeCanvas, TeeProcs;
type
TBubbleSeries=class(TPointSeries)
private
FRadiusValues : TChartValueList; { <-- Bubble's radius storage }
FSquared : Boolean;
Function ApplyRadius( Const Value:Double;
AList:TChartValueList;
Increment:Boolean):Double;
Procedure SetRadiusValues(Value:TChartValueList);
Procedure SetSquared(Value:Boolean);
protected
Procedure AddSampleValues(NumValues:Integer; OnlyMandatory:Boolean=False); override; { <-- to add random radius values }
Procedure DrawLegendShape(ValueIndex:Integer; Const Rect:TRect); override;
procedure DrawValue(ValueIndex:Integer); override; { <-- main draw method }
class function GetEditorClass:String; override;
Function GetGradient:TChartGradient; override;
Procedure PrepareForGallery(IsEnabled:Boolean); override;
Procedure PreparePointer(ValueIndex:Integer); override;
public
Constructor Create(AOwner: TComponent); override;
Function AddBubble(Const AX,AY,ARadius:Double; Const AXLabel:String='';
AColor:TColor=clTeeColor):Integer;
Procedure Assign(Source:TPersistent); override;
Function NumSampleValues:Integer; override;
Function IsValidSourceOf(Value:TChartSeries):Boolean; override;
Function MaxYValue:Double; override; { <-- adds radius }
Function MinYValue:Double; override; { <-- substracts radius }
Function MaxZValue:Double; override;
Function MinZValue:Double; override;
published
property ColorEachPoint default True;
property RadiusValues:TChartValueList read FRadiusValues write SetRadiusValues;
property Squared:Boolean read FSquared write SetSquared default True;
end;
implementation
Uses Math, SysUtils, TeeConst;
type TPointerAccess=class(TSeriesPointer);
{ TBubbleSeries }
Constructor TBubbleSeries.Create(AOwner: TComponent);
Begin
inherited;
FRadiusValues:=TChartValueList.Create(Self,TeeMsg_ValuesBubbleRadius); { <-- radius storage }
With Pointer do
begin
InflateMargins:=False;
Style:=psCircle; { <-- a Bubble is a circle (by default) }
end;
TPointerAccess(Pointer).AllowChangeSize:=False;
Marks.Frame.Hide;
Marks.Transparent:=True;
FSquared:=True;
ColorEachPoint:=True;
end;
Procedure TBubbleSeries.SetSquared(Value:Boolean);
Begin
SetBooleanProperty(FSquared,Value);
end;
Procedure TBubbleSeries.SetRadiusValues(Value:TChartValueList);
Begin
SetChartValueList(FRadiusValues,Value); { standard method }
end;
{ Helper method, special to Bubble series }
Function TBubbleSeries.AddBubble( Const AX,AY,ARadius:Double;
Const AXLabel:String; AColor:TColor):Integer;
Begin
RadiusValues.TempValue:=ARadius;
result:=AddXY(AX,AY,AXLabel,AColor);
end;
Function TBubbleSeries.NumSampleValues:Integer;
begin
result:=8;
end;
Procedure TBubbleSeries.AddSampleValues(NumValues:Integer; OnlyMandatory:Boolean=False);
Var t : Integer;
s : TSeriesRandomBounds;
Begin
s:=RandomBounds(NumValues);
with s do
for t:=1 to NumValues do { some sample values to see something in design mode }
Begin
AddBubble( tmpX, { X }
RandomValue(Round(DifY)), { Y }
(DifY/15.0)+Round(DifY/(10+RandomValue(15))) { <- Radius }
);
tmpX:=tmpX+StepX;
end;
end;
Procedure TBubbleSeries.PreparePointer(ValueIndex:Integer);
var tmpSize : Integer;
begin
tmpSize:=GetVertAxis.CalcSizeValue(RadiusValues.Value[ValueIndex]);
if FSquared then
TPointerAccess(Pointer).ChangeHorizSize(tmpSize)
else
TPointerAccess(Pointer).ChangeHorizSize(GetHorizAxis.CalcSizeValue(RadiusValues.Value[ValueIndex]));
TPointerAccess(Pointer).ChangeVertSize(tmpSize);
end;
procedure TBubbleSeries.DrawValue(ValueIndex:Integer);
Begin
// This overrided method is the main paint for bubble points.
// The bubble effect is achieved by changing the Pointer.Size based
// on the corresponding Radius value for each point in the series.
// We dont use Pointer.Size:=... because that will force a repaint
// while we are painting !! giving recursive endlessly repaints !!!
PreparePointer(ValueIndex);
DrawPointer(CalcXPos(ValueIndex),CalcYPos(ValueIndex),ValueColor[ValueIndex],ValueIndex);
// dont call inherited here to avoid drawing the "pointer"
end;
Function TBubbleSeries.ApplyRadius( Const Value:Double;
AList:TChartValueList;
Increment:Boolean):Double;
var t : Integer;
begin
result:=Value;
for t:=0 to Count-1 do
if Increment then
result:=Math.Max(result,AList.Value[t]+RadiusValues.Value[t])
else
result:=Math.Min(result,AList.Value[t]-RadiusValues.Value[t]);
end;
Function TBubbleSeries.MaxYValue:Double;
Begin
result:=ApplyRadius(inherited MaxYValue,YValues,True);
end;
Function TBubbleSeries.MinYValue:Double;
Begin
result:=ApplyRadius(inherited MinYValue,YValues,False);
end;
Procedure TBubbleSeries.Assign(Source:TPersistent);
begin
if Source is TBubbleSeries then
FSquared:=TBubbleSeries(Source).FSquared;
inherited;
end;
Function TBubbleSeries.IsValidSourceOf(Value:TChartSeries):Boolean;
begin
result:=Value is TBubbleSeries; // Only Bubbles can be assigned to Bubbles
end;
Function TBubbleSeries.MaxZValue:Double;
begin
if Pointer.Draw3D then result:=RadiusValues.MaxValue
else result:=inherited MaxZValue;
end;
Function TBubbleSeries.MinZValue:Double;
begin
if Pointer.Draw3D then result:=-RadiusValues.MaxValue
else result:=inherited MinZValue;
end;
Procedure TBubbleSeries.DrawLegendShape(ValueIndex:Integer; Const Rect:TRect);
var tmp : Integer;
begin
With Rect do tmp:=Math.Min(Right-Left,Bottom-Top);
TPointerAccess(Pointer).ChangeHorizSize(tmp);
TPointerAccess(Pointer).ChangeVertSize(tmp);
inherited;
end;
class function TBubbleSeries.GetEditorClass: String;
begin
result:='TBubbleSeriesEditor';
end;
procedure TBubbleSeries.PrepareForGallery(IsEnabled: Boolean);
begin
inherited;
Gradient.Visible:=True;
end;
function TBubbleSeries.GetGradient: TChartGradient;
begin
result:=Pointer.Gradient;
end;
initialization
RegisterTeeSeries( TBubbleSeries, {$IFNDEF CLR}@{$ENDIF}TeeMsg_GalleryBubble,
{$IFNDEF CLR}@{$ENDIF}TeeMsg_GalleryStandard,1);
end.
|
{*******************************************************}
{ }
{ CodeGear Delphi Runtime Library }
{ }
{ Copyright(c) 1995-2018 Embarcadero Technologies, Inc. }
{ All rights reserved }
{ }
{*******************************************************}
unit System.Math.Vectors;
interface
uses
System.Types;
type
TEpsilon = record
const
Matrix = 1E-5;
Vector = 1E-4;
Scale = 1E-4;
FontSize = 1E-2;
Position = 1E-3;
Angle = 1E-4;
end;
TVector3DType = array [0..3] of Single;
TVectorArray = array [0..2] of Single;
TPolygon = array of TPointF;
TCubicBezier = array [0..3] of TPointF;
tagVECTOR = record
case Integer of
0: (V: TVectorArray;);
1: (X: Single;
Y: Single;
W: Single;);
end;
PVector = ^TVector;
TVector = record
class function Create(const AX, AY: Single; const AW: Single = 1.0): TVector; overload; static; inline;
class function Create(const APoint: TPointF): TVector; overload; static; inline;
class operator Add(const AVector1, AVector2: TVector): TVector;
class operator Subtract(const AVector1, AVector2: TVector): TVector;
class operator Equal(const AVector1, AVector2: TVector): Boolean; inline;
class operator NotEqual(const AVector1, AVector2: TVector): Boolean; inline;
class operator Implicit(const APoint: TPointF): TVector; inline;
class operator Explicit(const APoint: TVector): TPointF;
class operator Implicit(const APoint: TVector): TPointF; inline; deprecated 'Implicit conversion from TVector to TPointF requires homogenization';
class operator Implicit(const ASize: TSizeF): TVector; inline;
class operator Multiply(const AVector: TVector; const AFactor: Single): TVector;
class operator Multiply(const AFactor: Single; const AVector: TVector): TVector; inline;
class operator Divide(const AVector: TVector; const AFactor: Single): TVector;
/// <summary> Zero vector having values of (0, 0, 0). </summary>
class function Zero: TVector; inline; static;
function Length: Single;
function Normalize: TVector;
function CrossProduct(const AVector: TVector): TVector;
function DotProduct(const AVector: TVector): Single;
function MidVector(const AVector: TVector): TVector;
function ToPointF: TPointF; inline; deprecated 'Use explicit typecast instead.';
case Integer of
0: (V: TVectorArray;);
1: (X: Single;
Y: Single;
W: Single;);
end;
TPoint3D = record
type
TPoint3DArray = array [0..2] of Single;
class function Create(const AX, AY, AZ: Single): TPoint3D; overload; static; inline;
class function Create(const P: TVector3DType): TPoint3D; overload; static; inline;
class function Create(const APoint: TPointF; const AZ: Single = 0.0): TPoint3D; overload; static; inline;
class operator Add(const APoint1, APoint2: TPoint3D): TPoint3D;
class operator Subtract(const APoint1, APoint2: TPoint3D): TPoint3D;
class operator Equal(const APoint1, APoint2: TPoint3D): Boolean; inline;
class operator NotEqual(const APoint1, APoint2: TPoint3D): Boolean; inline;
class operator Negative(const APoint: TPoint3D): TPoint3D;
class operator Multiply(const APoint1, APoint2: TPoint3D): TPoint3D;
class operator Multiply(const APoint: TPoint3D; const AFactor: Single): TPoint3D; inline;
class operator Multiply(const AFactor: Single; const APoint: TPoint3D): TPoint3D; inline;
class operator Divide(const APoint: TPoint3D; const AFactor: Single): TPoint3D;
/// <summary> Zero point having values of (0, 0, 0). </summary>
class function Zero: TPoint3D; inline; static;
procedure Offset(const ADelta: TPoint3D); overload; inline;
procedure Offset(const ADeltaX, ADeltaY, ADeltaZ: Single); overload; inline;
function CrossProduct(const APoint: TPoint3D): TPoint3D;
function DotProduct(const APoint: TPoint3D): Single; inline;
function EqualsTo(const APoint: TPoint3D; const Epsilon: Single = 0): Boolean; inline;
function Length: Single; inline;
function Normalize: TPoint3D;
function Distance(const APoint: TPoint3D): Single;
function Rotate(const AAxis: TPoint3D; const AAngle: Single): TPoint3D; inline;
function Reflect(const APoint: TPoint3D): TPoint3D; inline;
function MidPoint(const APoint: TPoint3D): TPoint3D; inline;
function AngleCosine(const APoint: TPoint3D): Single;
case Integer of
0: (V: TPoint3DArray;);
1: (X: Single;
Y: Single;
Z: Single;);
end;
PPoint3D = ^TPoint3D;
tagVECTOR3D = record
case Integer of
0: (V: TVector3DType;);
1: (X: Single;
Y: Single;
Z: Single;
W: Single;);
end;
TMatrixArray = array [0..2] of TVector;
TMaxtrixArrayBase = array[0..2] of tagVECTOR;
{$NODEFINE TMatrixArray 'System::Math::Vectors::TMatrixArray' 'System::Math::Vectors::TMaxtrixArrayBase'}
(*$HPPEMIT END OPENNAMESPACE*)
(*$HPPEMIT END 'typedef TVector TMatrixArray[3];'*)
(*$HPPEMIT END CLOSENAMESPACE*)
TMatrix = record
private
function Scale(const AFactor: Single): TMatrix;
public
class function CreateRotation(const AAngle: Single): TMatrix; static;
class function CreateScaling(const AScaleX, AScaleY: Single): TMatrix; static;
class function CreateTranslation(const ADeltaX, ADeltaY: Single): TMatrix; static;
class operator Multiply(const AMatrix1, AMatrix2: TMatrix): TMatrix;
class operator Multiply(const APoint: TPointF; const AMatrix: TMatrix): TPointF;
class operator Multiply(const AVector: TVector; const AMatrix: TMatrix): TVector;
class operator Multiply(const AVector: TPoint3D; const AMatrix: TMatrix): TPoint3D;
/// <summary>Equal operator, calls to EqualsTo function with a default epsilon.</summary>
class operator Equal(const RightMatrix, LeftMatrix: TMatrix): Boolean; static;
function Determinant: Single;
function Adjoint: TMatrix;
function Inverse: TMatrix;
function ExtractScale: TPointF;
/// <summary>This function returns true if all the values are the same than the given matrix using an epsilon error
/// threshold, and returns false otherwise.</summary>
function EqualsTo(const AMatrix: TMatrix; const Epsilon: Single = TEpsilon.Matrix): Boolean;
case Integer of
0: (M: TMatrixArray;);
1: (m11, m12, m13: Single;
m21, m22, m23: Single;
m31, m32, m33: Single);
end;
TMatrixConstants = record helper for TMatrix
const Identity: TMatrix = (m11: 1; m12: 0; m13: 0; m21: 0; m22: 1; m23: 0; m31: 0; m32: 0; m33: 1);
end;
PVector3D = ^TVector3D;
TVector3D = record
class function Create(const AX, AY, AZ: Single; const AW: Single = 1.0): TVector3D; overload; static; inline;
class function Create(const APoint: TPoint3D; const AW: Single = 1.0): TVector3D; overload; static; inline;
class operator Add(const AVector1, AVector2: TVector3D): TVector3D;
class operator Subtract(const AVector1, AVector2: TVector3D): TVector3D;
class operator Equal(const AVector1, AVector2: TVector3D): Boolean;
class operator NotEqual(const AVector1, AVector2: TVector3D): Boolean;
class operator Negative(const AVector: TVector3D): TVector3D;
class operator Implicit(const APoint: TPoint3D): TVector3D;
class operator Explicit(const AVector: TVector3D): TPoint3D;
class operator Implicit(const AVector: TVector3D): TPoint3D; inline; deprecated 'Implicit conversion from TVector3D to TPoint3D requires homogenization';
class operator Multiply(const AVector1, AVector2: TVector3D): TVector3D;
class operator Multiply(const AVector: TVector3D; const AFactor: Single): TVector3D; inline;
class operator Multiply(const AFactor: Single; const AVector: TVector3D): TVector3D; inline;
class operator Divide(const AVector: TVector3D; const AFactor: Single): TVector3D;
/// <summary> Zero vector having values of (0, 0, 0, 0). </summary>
class function Zero: TVector3D; inline; static;
procedure Offset(const ADelta: TPoint3D); overload; inline; deprecated 'Use TPoint3D.Offset';
procedure Offset(const ADeltaX, ADeltaY, ADeltaZ: Single); overload; inline; deprecated 'Use TPoint3D.Offset';
function CrossProduct(const AVector: TVector3D): TVector3D; deprecated 'Use TPoint3D.CrossProduct';
function DotProduct(const AVector: TVector3D): Single; deprecated 'Use TPoint3D.DotProduct';
function EqualsTo(const AVector: TVector3D; const Epsilon: Single = 0): Boolean; inline;
function Length: Single;
function Normalize: TVector3D;
function Distance(const AVector: TVector3D): Single;
function Rotate(const AAxis: TPoint3D; const AAngle: Single): TVector3D; inline; deprecated 'Use TPoint3D.Rotate';
function Reflect(const AVector: TVector3D): TVector3D; inline; deprecated 'Use TPoint3D.Reflect';
function MidVector(const AVector: TVector3D): TVector3D;
function AngleCosine(const AVector: TVector3D): Single; deprecated 'Use TPoint3D.AngleCosine';
// converts 4D (3D + W) vector into 3D vector (when ATransform is True, divides by W)
function ToPoint3D(const ATransform: Boolean = False): TPoint3D; deprecated 'Use explicit typecast instead.';
case Integer of
0: (V: TVector3DType;);
1: (X: Single;
Y: Single;
Z: Single;
W: Single;);
end;
TVector3DArray = array [0..2] of TVector3D;
{$NODEFINE TVector3DArray 'System::Types::TVector3DArray' 'System::Types::TVector3DArrayBase'}
(*$HPPEMIT END OPENNAMESPACE*)
(*$HPPEMIT END 'typedef TVector3D TVector3DArray[3];'*)
(*$HPPEMIT END CLOSENAMESPACE*)
TVector3DArrayBase = array[0..2] of tagVECTOR3D;
TMatrix3DType = array [0..3] of TVector3D;
{$NODEFINE TMatrix3DType 'System::Math::Vectors::TMatrix3DType' 'System::Math::Vectors::TMatrix3DTypeBase'}
(*$HPPEMIT END OPENNAMESPACE*)
(*$HPPEMIT END 'typedef TVector3D TMatrix3DType[3];'*)
(*$HPPEMIT END CLOSENAMESPACE*)
TMatrix3DTypeBase = array[0..3] of tagVECTOR3D;
TMatrix3D = record
private
function DetInternal(const a1, a2, a3, b1, b2, b3, c1, c2, c3: Single): Single; inline;
function Scale(const AFactor: Single): TMatrix3D;
public
// Creation of matrix by specifying individual values.
constructor Create(const AM11, AM12, AM13, AM14, AM21, AM22, AM23, AM24, AM31, AM32, AM33,
AM34, AM41, AM42, AM43, AM44: Single); overload;
constructor Create(const AArray: TSingleDynArray); overload;
// Creation of simple transformation matrices.
class function CreateScaling(const AScale: TPoint3D): TMatrix3D; static;
class function CreateTranslation(const ATranslation: TPoint3D): TMatrix3D; static;
// Creation of rotation matrix around only one of the axes (work faster than composite variants)
class function CreateRotationX(const AAngle: Single): TMatrix3D; static;
class function CreateRotationY(const AAngle: Single): TMatrix3D; static;
class function CreateRotationZ(const AAngle: Single): TMatrix3D; static;
// Creation of a composite rotation matrix (slower but more flexible than simple variants)
class function CreateRotation(const AAxis: TPoint3D; const AAngle: Single): TMatrix3D; static;
class function CreateRotationYawPitchRoll(const AYaw, APitch, ARoll: Single): TMatrix3D; static;
class function CreateRotationHeadingPitchBank(const AHeading, APitch, ABank: Single): TMatrix3D; static;
// Creation of view/camera matrices.
class function CreateLookAtRH(const ASource, ATarget, ACeiling: TPoint3D): TMatrix3D; static;
class function CreateLookAtLH(const ASource, ATarget, ACeiling: TPoint3D): TMatrix3D; static;
class function CreateLookAtDirRH(const ASource, ADirection, ACeiling: TPoint3D): TMatrix3D; static;
class function CreateLookAtDirLH(const ASource, ADirection, ACeiling: TPoint3D): TMatrix3D; static;
class function CreateOrthoLH(const AWidth, AHeight, AZNear, AZFar: Single): TMatrix3D; static;
class function CreateOrthoRH(const AWidth, AHeight, AZNear, AZFar: Single): TMatrix3D; static;
class function CreateOrthoOffCenterLH(const ALeft, ATop, ARight, ABottom, AZNear, AZFar: Single): TMatrix3D; static;
class function CreateOrthoOffCenterRH(const ALeft, ATop, ARight, ABottom, AZNear, AZFar: Single): TMatrix3D; static;
class function CreatePerspectiveFovLH(const AFOV, AAspect, AZNear, AZFar: Single;
const AHorizontalFOV: Boolean = False): TMatrix3D; static;
class function CreatePerspectiveFovRH(const AFOV, AAspect, AZNear, AZFar: Single;
const AHorizontalFOV: Boolean = False): TMatrix3D; static;
// multiplication of two 3D matrices
class operator Multiply(const APoint1, APoint2: TMatrix3D): TMatrix3D;
// multiplication of 3D vector and matrix
class operator Multiply(const APoint: TPoint3D; const AMatrix: TMatrix3D): TPoint3D;
// multiplication of 4D(3D + w) vector and 3D (4x4) matrix
class operator Multiply(const AVector: TVector3D; const AMatrix: TMatrix3D): TVector3D;
function Transpose: TMatrix3D;
function Determinant: Single;
function Adjoint: TMatrix3D;
function Inverse: TMatrix3D;
function ToMatrix: TMatrix;
// calculates eye position from 3D matrix
function EyePosition: TPoint3D;
case Integer of
0: (M: TMatrix3DType;);
1: (m11, m12, m13, m14: Single;
m21, m22, m23, m24: Single;
m31, m32, m33, m34: Single;
m41, m42, m43, m44: Single);
end;
TMatrix3DConstants = record helper for TMatrix3D
const Identity: TMatrix3D = (m11: 1; m12: 0; m13: 0; m14: 0; m21: 0; m22: 1; m23: 0; m24: 0; m31: 0; m32: 0;
m33: 1; m34: 0; m41: 0; m42: 0; m43: 0; m44: 1;);
end;
TQuaternion3D = record
constructor Create(const AAxis: TPoint3D; const AAngle: Single); overload;
constructor Create(const AYaw, APitch, ARoll: Single); overload;
constructor Create(const AMatrix: TMatrix3D); overload;
class operator Implicit(const AQuaternion: TQuaternion3D): TMatrix3D;
class operator Multiply(const AQuaternion1, AQuaternion2: TQuaternion3D): TQuaternion3D;
// calculates quaternion magnitude
function Length: Single;
function Normalize: TQuaternion3D;
case Integer of
0: (V: TVector3DType;);
1: (ImagPart: TPoint3D;
RealPart: Single;);
end;
TQuaternion3DConstants = record helper for TQuaternion3D
const Identity: TQuaternion3D = (ImagPart: (X: 0; Y: 0; Z: 0); RealPart: 1);
end;
const
NullVector3D: TVector3D = (X: 0; Y: 0; Z: 0; W: 1);
NullPoint3D: TPoint3D = (X: 0; Y: 0; Z: 0);
function Vector(const X, Y: Single; const W: Single = 1.0): TVector; overload;
function Vector(const P: TPointF; const W: Single = 1.0): TVector; overload;
function Vector3D(const X, Y, Z: Single; const W: Single = 1.0): TVector3D; overload;
function Vector3D(const P: TPoint3D; const W: Single = 1.0): TVector3D; overload;
function Point3D(const X, Y, Z: Single): TPoint3D; overload;
function Point3D(const AVector3D: TVector3D; const ATransform: Boolean = False): TPoint3D; overload; deprecated 'Use direct typecast instead.';
function PointF(const V: TVector): TPointF; inline; overload;
implementation
uses
System.Math;
const
FuzzFactorSingle = 10;
SingleResolution: Single = 1.25E-7 * FuzzFactorSingle; // this is relative resolution of mantissa
procedure SinCosSingle(const Theta: Single; var Sin, Cos: Single);
var
{$IF SizeOf(Extended) > SizeOf(Double)}
S, C: Extended;
{$ELSE}
S, C: Double;
{$ENDIF}
begin
System.SineCosine(Theta, S, C);
Sin := S;
Cos := C;
end;
function Vector(const X, Y: Single; const W: Single = 1.0): TVector;
begin
Result.X := X;
Result.Y := Y;
Result.W := W;
end;
function Vector(const P: TPointF; const W: Single = 1.0): TVector;
begin
Result.X := P.X;
Result.Y := P.Y;
Result.W := W;
end;
function Vector3D(const X, Y, Z: Single; const W: Single = 1.0): TVector3D; overload;
begin
Result := TVector3D.Create(X,Y,Z,W);
end;
function Vector3D(const P: TPoint3D; const W: Single = 1.0): TVector3D; overload;
begin
Result := TVector3D.Create(P,W);
end;
function Point3D(const X, Y, Z: Single): TPoint3D; overload;
begin
Result := TPoint3D.Create(X,Y,Z);
end;
function Point3D(const AVector3D: TVector3D; const ATransform: Boolean): TPoint3D; overload;
begin
Result := AVector3D.ToPoint3D(ATransform);
end;
function PointF(const V: TVector): TPointF;
begin
Result := TPointF(V);
end;
{ TVector }
class function TVector.Create(const APoint: TPointF): TVector;
begin
Result.X := APoint.X;
Result.Y := APoint.Y;
Result.W := 1;
end;
class function TVector.Create(const AX, AY, AW: Single): TVector;
begin
Result.X := AX;
Result.Y := AY;
Result.W := AW;
end;
class operator TVector.Add(const AVector1, AVector2: TVector): TVector;
begin
{$EXCESSPRECISION OFF}
Result.V[0] := AVector1.V[0] + AVector2.V[0];
Result.V[1] := AVector1.V[1] + AVector2.V[1];
Result.V[2] := AVector1.V[2] + AVector2.V[2];
{$EXCESSPRECISION ON}
end;
class operator TVector.Subtract(const AVector1, AVector2: TVector): TVector;
begin
{$EXCESSPRECISION OFF}
Result.V[0] := AVector1.V[0] - AVector2.V[0];
Result.V[1] := AVector1.V[1] - AVector2.V[1];
Result.V[2] := AVector1.V[2] - AVector2.V[2];
{$EXCESSPRECISION ON}
end;
class operator TVector.Equal(const AVector1, AVector2: TVector): Boolean;
begin
Result := SameValue(AVector1.X, AVector2.X, TEpsilon.Vector) and
SameValue(AVector1.Y, AVector2.Y, TEpsilon.Vector) and
SameValue(AVector1.W, AVector2.W, TEpsilon.Vector);
end;
class operator TVector.NotEqual(const AVector1, AVector2: TVector): Boolean;
begin
Result := not (AVector1 = AVector2);
end;
class operator TVector.Implicit(const APoint: TPointF): TVector;
begin
Result := TVector.Create(APoint);
end;
class operator TVector.Explicit(const APoint: TVector): TPointF;
var
ReciprocalW: Single;
begin
{$EXCESSPRECISION OFF}
if not SameValue(APoint.W, 0, TEpsilon.Vector) then
begin
ReciprocalW := 1 / APoint.W;
Result.X := APoint.X * ReciprocalW;
Result.Y := APoint.Y * ReciprocalW;
end
else
begin
Result.X := APoint.X;
Result.Y := APoint.Y;
end;
{$EXCESSPRECISION ON}
end;
class operator TVector.Implicit(const APoint: TVector): TPointF;
begin
Result := TPointF(APoint);
end;
class operator TVector.Implicit(const ASize: TSizeF): TVector;
begin
Result := TVector.Create(ASize);
end;
class operator TVector.Multiply(const AVector: TVector; const AFactor: Single): TVector;
begin
{$EXCESSPRECISION OFF}
Result.X := AVector.X * AFactor;
Result.Y := AVector.Y * AFactor;
Result.W := AVector.W * AFactor;
{$EXCESSPRECISION ON}
end;
class operator TVector.Multiply(const AFactor: Single; const AVector: TVector): TVector;
begin
Result := AVector * AFactor;
end;
class operator TVector.Divide(const AVector: TVector; const AFactor: Single): TVector;
begin
if Abs(AFactor) > Epsilon then
Result := AVector * (1 / AFactor)
else
Result := AVector;
end;
function TVector.CrossProduct(const AVector: TVector): TVector;
begin
Result.X := (Self.Y * AVector.W) - (Self.W * AVector.Y);
Result.Y := (Self.W * AVector.X) - (Self.X * AVector.W);
Result.W := (Self.X * AVector.Y) - (Self.Y * AVector.X);
end;
function TVector.DotProduct(const AVector: TVector): Single;
begin
Result := (Self.X * AVector.X) + (Self.Y * AVector.Y) + (Self.W * AVector.W);
end;
function TVector.Length: Single;
begin
Result := Sqrt(Self.DotProduct(Self));
end;
function TVector.Normalize: TVector;
var
VecLen: Single;
begin
VecLen := Self.Length;
if VecLen > Epsilon then
Result := Self * (1 / VecLen)
else
Result := Self;
end;
function TVector.MidVector(const AVector: TVector): TVector;
begin
Result := (Self + AVector) * 0.5;
end;
function TVector.ToPointF: TPointF;
begin
Result := TPointF(Self);
end;
class function TVector.Zero: TVector;
begin
Result.X := 0;
Result.Y := 0;
Result.W := 0;
end;
{TMatrix}
class function TMatrix.CreateRotation(const AAngle: Single): TMatrix;
var
Sine, Cosine: Single;
begin
SinCosSingle(AAngle, Sine, Cosine);
Result := Identity;
Result.m11 := Cosine;
Result.m12 := Sine;
Result.m21 := -Sine;
Result.m22 := Cosine;
end;
class function TMatrix.CreateScaling(const AScaleX, AScaleY: Single): TMatrix;
begin
Result := Identity;
Result.m11 := AScaleX;
Result.m22 := AScaleY;
end;
class function TMatrix.CreateTranslation(const ADeltaX, ADeltaY: Single): TMatrix;
begin
Result := Identity;
Result.m31 := ADeltaX;
Result.m32 := ADeltaY;
end;
class operator TMatrix.Multiply(const AMatrix1, AMatrix2: TMatrix): TMatrix;
begin
Result.m11 := AMatrix1.m11 * AMatrix2.m11 + AMatrix1.m12 * AMatrix2.m21 + AMatrix1.m13 * AMatrix2.m31;
Result.m12 := AMatrix1.m11 * AMatrix2.m12 + AMatrix1.m12 * AMatrix2.m22 + AMatrix1.m13 * AMatrix2.m32;
Result.m13 := AMatrix1.m11 * AMatrix2.m13 + AMatrix1.m12 * AMatrix2.m23 + AMatrix1.m13 * AMatrix2.m33;
Result.m21 := AMatrix1.m21 * AMatrix2.m11 + AMatrix1.m22 * AMatrix2.m21 + AMatrix1.m23 * AMatrix2.m31;
Result.m22 := AMatrix1.m21 * AMatrix2.m12 + AMatrix1.m22 * AMatrix2.m22 + AMatrix1.m23 * AMatrix2.m32;
Result.m23 := AMatrix1.m21 * AMatrix2.m13 + AMatrix1.m22 * AMatrix2.m23 + AMatrix1.m23 * AMatrix2.m33;
Result.m31 := AMatrix1.m31 * AMatrix2.m11 + AMatrix1.m32 * AMatrix2.m21 + AMatrix1.m33 * AMatrix2.m31;
Result.m32 := AMatrix1.m31 * AMatrix2.m12 + AMatrix1.m32 * AMatrix2.m22 + AMatrix1.m33 * AMatrix2.m32;
Result.m33 := AMatrix1.m31 * AMatrix2.m13 + AMatrix1.m32 * AMatrix2.m23 + AMatrix1.m33 * AMatrix2.m33;
end;
class operator TMatrix.Multiply(const APoint: TPointF; const AMatrix: TMatrix): TPointF;
begin
Result.X := APoint.X * AMatrix.M[0].V[0] + APoint.Y * AMatrix.M[1].V[0]
+ AMatrix.M[2].V[0];
Result.Y := APoint.X * AMatrix.M[0].V[1] + APoint.Y * AMatrix.M[1].V[1]
+ AMatrix.M[2].V[1];
end;
class operator TMatrix.Multiply(const AVector: TVector; const AMatrix: TMatrix): TVector;
begin
Result.V[0] := AVector.V[0] * AMatrix.M[0].V[0] + AVector.V[1] * AMatrix.M[1].V[0]
+ AVector.V[2] * AMatrix.M[2].V[0];
Result.V[1] := AVector.V[0] * AMatrix.M[0].V[1] + AVector.V[1] * AMatrix.M[1].V[1]
+ AVector.V[2] * AMatrix.M[2].V[1];
Result.V[2] := AVector.V[0] * AMatrix.M[0].V[2] + AVector.V[1] * AMatrix.M[1].V[2]
+ AVector.V[2] * AMatrix.M[2].V[2];
end;
class operator TMatrix.Multiply(const AVector: TPoint3D; const AMatrix: TMatrix): TPoint3D;
begin
Result.V[0] := AVector.V[0] * AMatrix.M[0].V[0] + AVector.V[1] * AMatrix.M[1].V[0]
+ AVector.V[2] * AMatrix.M[2].V[0];
Result.V[1] := AVector.V[0] * AMatrix.M[0].V[1] + AVector.V[1] * AMatrix.M[1].V[1]
+ AVector.V[2] * AMatrix.M[2].V[1];
Result.V[2] := AVector.V[0] * AMatrix.M[0].V[2] + AVector.V[1] * AMatrix.M[1].V[2]
+ AVector.V[2] * AMatrix.M[2].V[2];
end;
function TMatrix.Scale(const AFactor: Single): TMatrix;
var
I: Integer;
begin
for I := 0 to 2 do
begin
Result.M[I].V[0] := Self.M[I].V[0] * AFactor;
Result.M[I].V[1] := Self.M[I].V[1] * AFactor;
Result.M[I].V[2] := Self.M[I].V[2] * AFactor;
end;
end;
function TMatrix.Determinant: Single;
begin
Result := Self.M[0].V[0] * (Self.M[1].V[1] * Self.M[2].V[2] - Self.M[2].V[1] * Self.M[1].V[2]) - Self.M[0].V[1]
* (Self.M[1].V[0] * Self.M[2].V[2] - Self.M[2].V[0] * Self.M[1].V[2]) + Self.M[0].V[2] * (Self.M[1].V[0]
* Self.M[2].V[1] - Self.M[2].V[0] * Self.M[1].V[1]);
end;
class operator TMatrix.Equal(const RightMatrix, LeftMatrix: TMatrix): Boolean;
begin
Result := RightMatrix.EqualsTo(LeftMatrix);
end;
function TMatrix.EqualsTo(const AMatrix: TMatrix; const Epsilon: Single): Boolean;
begin
Result := SameValue(Self.m11, AMatrix.m11, Epsilon) and SameValue(Self.m12, AMatrix.m12, Epsilon) and
SameValue(Self.m13, AMatrix.m13, Epsilon) and SameValue(Self.m21, AMatrix.m21, Epsilon) and
SameValue(Self.m22, AMatrix.m22, Epsilon) and SameValue(Self.m23, AMatrix.m23, Epsilon) and
SameValue(Self.m31, AMatrix.m31, Epsilon) and SameValue(Self.m32, AMatrix.m32, Epsilon) and
SameValue(Self.m33, AMatrix.m33, Epsilon);
end;
function TMatrix.ExtractScale: TPointF;
const
BaseVector: TPointF = (X: 0; Y: 0);
begin
Result.X := (PointF(1, 0) * Self).Distance(BaseVector * Self);
Result.Y := (PointF(0, 1) * Self).Distance(BaseVector * Self);
end;
function TMatrix.Adjoint: TMatrix;
var
a1, a2, a3, b1, b2, b3, c1, c2, c3: Single;
begin
a1 := Self.M[0].V[0];
a2 := Self.M[0].V[1];
a3 := Self.M[0].V[2];
b1 := Self.M[1].V[0];
b2 := Self.M[1].V[1];
b3 := Self.M[1].V[2];
c1 := Self.M[2].V[0];
c2 := Self.M[2].V[1];
c3 := Self.M[2].V[2];
Result.M[0].V[0] := (b2 * c3 - c2 * b3);
Result.M[1].V[0] := -(b1 * c3 - c1 * b3);
Result.M[2].V[0] := (b1 * c2 - c1 * b2);
Result.M[0].V[1] := -(a2 * c3 - c2 * a3);
Result.M[1].V[1] := (a1 * c3 - c1 * a3);
Result.M[2].V[1] := -(a1 * c2 - c1 * a2);
Result.M[0].V[2] := (a2 * b3 - b2 * a3);
Result.M[1].V[2] := -(a1 * b3 - b1 * a3);
Result.M[2].V[2] := (a1 * b2 - b1 * a2);
end;
function TMatrix.Inverse: TMatrix;
const
DefaultValue: TMatrix = (m11: 1.0; m12: 0.0; m13: 0.0; m21: 0.0; m22: 1.0; m23: 0.0; m31: 0.0; m32: 0.0; m33: 1.0);
var
Det: Single;
begin
Det := Self.Determinant;
if Abs(Det) < Epsilon then
Result := DefaultValue
else
Result:= Self.Adjoint.Scale(1 / Det);
end;
{ TPoint3D }
class function TPoint3D.Create(const AX, AY, AZ: Single): TPoint3D;
begin
Result.X := AX;
Result.Y := AY;
Result.Z := AZ;
end;
class function TPoint3D.Create(const P: TVector3DType): TPoint3D;
begin
Result.X := P[0];
Result.Y := P[1];
Result.Z := P[2];
end;
class function TPoint3D.Create(const APoint: TPointF; const AZ: Single): TPoint3D;
begin
Result.X := APoint.X;
Result.Y := APoint.Y;
Result.Z := AZ;
end;
class operator TPoint3D.Add(const APoint1, APoint2: TPoint3D): TPoint3D;
begin
{$EXCESSPRECISION OFF}
Result.X := APoint1.X + APoint2.X;
Result.Y := APoint1.Y + APoint2.Y;
Result.Z := APoint1.Z + APoint2.Z;
{$EXCESSPRECISION ON}
end;
class operator TPoint3D.Subtract(const APoint1, APoint2: TPoint3D): TPoint3D;
begin
{$EXCESSPRECISION OFF}
Result.X := APoint1.X - APoint2.X;
Result.Y := APoint1.Y - APoint2.Y;
Result.Z := APoint1.Z - APoint2.Z;
{$EXCESSPRECISION ON}
end;
class operator TPoint3D.Equal(const APoint1, APoint2: TPoint3D): Boolean;
begin
Result := SameValue(APoint1.X, APoint2.X, TEpsilon.Vector) and
SameValue(APoint1.Y, APoint2.Y, TEpsilon.Vector) and
SameValue(APoint1.Z, APoint2.Z, TEpsilon.Vector);
end;
function TPoint3D.EqualsTo(const APoint: TPoint3D; const Epsilon: Single): Boolean;
begin
Result := SameValue(X, APoint.X, Epsilon) and SameValue(Y, APoint.Y, Epsilon) and SameValue(Z, APoint.Z, Epsilon);
end;
class operator TPoint3D.NotEqual(const APoint1, APoint2: TPoint3D): Boolean;
begin
Result := not (APoint1 = APoint2);
end;
class operator TPoint3D.Negative(const APoint: TPoint3D): TPoint3D;
begin
Result.X := - APoint.X;
Result.Y := - APoint.Y;
Result.Z := - APoint.Z;
end;
class operator TPoint3D.Multiply(const APoint1, APoint2: TPoint3D): TPoint3D;
begin
{$EXCESSPRECISION OFF}
Result.X := APoint1.X * APoint2.X;
Result.Y := APoint1.Y * APoint2.Y;
Result.Z := APoint1.Z * APoint2.Z;
{$EXCESSPRECISION ON}
end;
class operator TPoint3D.Multiply(const APoint: TPoint3D; const AFactor: Single): TPoint3D;
begin
Result := APoint * TPoint3D.Create(AFactor, AFactor, AFactor);
end;
class operator TPoint3D.Multiply(const AFactor: Single; const APoint: TPoint3D): TPoint3D;
begin
Result := APoint * AFactor;
end;
class operator TPoint3D.Divide(const APoint: TPoint3D; const AFactor: Single): TPoint3D;
begin
{$EXCESSPRECISION OFF}
if AFactor <> 0 then
Result := APoint * (1 / AFactor)
else
Result := APoint;
{$EXCESSPRECISION ON}
end;
procedure TPoint3D.Offset(const ADelta: TPoint3D);
begin
Self := Self + ADelta;
end;
procedure TPoint3D.Offset(const ADeltaX, ADeltaY, ADeltaZ: Single);
begin
Self.Offset(TPoint3D.Create(ADeltaX, ADeltaY, ADeltaZ));
end;
function TPoint3D.CrossProduct(const APoint: TPoint3D): TPoint3D;
begin
Result.X := (Self.Y * APoint.Z) - (Self.Z * APoint.Y);
Result.Y := (Self.Z * APoint.X) - (Self.X * APoint.Z);
Result.Z := (Self.X * APoint.Y) - (Self.Y * APoint.X);
end;
function TPoint3D.DotProduct(const APoint: TPoint3D): Single;
begin
Result := (Self.X * APoint.X) + (Self.Y * APoint.Y) + (Self.Z * APoint.Z);
end;
function TPoint3D.Length: Single;
begin
Result := Sqrt(Self.DotProduct(Self));
end;
function TPoint3D.Normalize: TPoint3D;
var
VecLen: Single;
begin
VecLen := Self.Length;
if VecLen > 0.0 then
Result := Self / VecLen
else
Result := Self;
end;
function TPoint3D.Distance(const APoint: TPoint3D): Single;
begin
Result := (Self - APoint).Length;
end;
function TPoint3D.Rotate(const AAxis: TPoint3D; const AAngle: Single): TPoint3D;
begin
Result := Self * TMatrix3D.CreateRotation(AAxis, AAngle);
end;
function TPoint3D.Reflect(const APoint: TPoint3D): TPoint3D;
begin
Result := Self + APoint * (-2 * Self.DotProduct(APoint));
end;
function TPoint3D.MidPoint(const APoint: TPoint3D): TPoint3D;
begin
Result := (Self + APoint) * 0.5;
end;
function TPoint3D.AngleCosine(const APoint: TPoint3D): Single;
begin
Result := Self.Length * APoint.Length;
if Abs(Result) > Epsilon then
Result := Self.DotProduct(APoint) / Result
else
Result := Self.DotProduct(APoint) / Epsilon;
Result := Max(Min(Result, 1), -1);
end;
class function TPoint3D.Zero: TPoint3D;
begin
Result.X := 0;
Result.Y := 0;
Result.Z := 0;
end;
{ TVector3D }
class function TVector3D.Create(const AX, AY, AZ, AW: Single): TVector3D;
begin
Result.X := AX;
Result.Y := AY;
Result.Z := AZ;
Result.W := AW;
end;
class function TVector3D.Create(const APoint: TPoint3D; const AW: Single): TVector3D;
begin
Result.X := APoint.X;
Result.Y := APoint.Y;
Result.Z := APoint.Z;
Result.W := AW;
end;
class operator TVector3D.Add(const AVector1, AVector2: TVector3D): TVector3D;
begin
{$EXCESSPRECISION OFF}
Result.X := AVector1.X + AVector2.X;
Result.Y := AVector1.Y + AVector2.Y;
Result.Z := AVector1.Z + AVector2.Z;
Result.W := AVector1.W + AVector2.W;
{$EXCESSPRECISION ON}
end;
class operator TVector3D.Subtract(const AVector1, AVector2: TVector3D): TVector3D;
begin
{$EXCESSPRECISION OFF}
Result.X := AVector1.X - AVector2.X;
Result.Y := AVector1.Y - AVector2.Y;
Result.Z := AVector1.Z - AVector2.Z;
Result.W := AVector1.W - AVector2.W;
{$EXCESSPRECISION ON}
end;
class operator TVector3D.Equal(const AVector1, AVector2: TVector3D): Boolean;
begin
Result := SameValue(AVector1.X, AVector2.X, TEpsilon.Vector) and SameValue(AVector1.Y, AVector2.Y,
TEpsilon.Vector) and SameValue(AVector1.Z, AVector2.Z, TEpsilon.Vector) and
SameValue(AVector1.W, AVector2.W, TEpsilon.Vector);
end;
function TVector3D.EqualsTo(const AVector: TVector3D; const Epsilon: Single): Boolean;
begin
Result := SameValue(X, AVector.X, Epsilon) and SameValue(Y, AVector.Y, Epsilon) and
SameValue(Z, AVector.Z, Epsilon) and SameValue(W, AVector.W, Epsilon);
end;
class operator TVector3D.NotEqual(const AVector1, AVector2: TVector3D): Boolean;
begin
Result := not (AVector1 = AVector2);
end;
class operator TVector3D.Negative(const AVector: TVector3D): TVector3D;
begin
Result.X := - AVector.X;
Result.Y := - AVector.Y;
Result.Z := - AVector.Z;
Result.W := - AVector.W;
end;
class operator TVector3D.Implicit(const APoint: TPoint3D): TVector3D;
begin
Result := TVector3D.Create(APoint);
end;
class operator TVector3D.Explicit(const AVector: TVector3D): TPoint3D;
var
ReciprocalW: Single;
begin
{$EXCESSPRECISION OFF}
if not SameValue(AVector.W, 0, TEpsilon.Vector) then
begin
ReciprocalW := 1 / AVector.W;
Result.X := AVector.X * ReciprocalW;
Result.Y := AVector.Y * ReciprocalW;
Result.Z := AVector.Z * ReciprocalW;
end
else
begin
Result.X := AVector.X;
Result.Y := AVector.Y;
Result.Z := AVector.Z;
end;
{$EXCESSPRECISION ON}
end;
class operator TVector3D.Implicit(const AVector: TVector3D): TPoint3D;
begin
Result := TPoint3D(AVector);
end;
class operator TVector3D.Multiply(const AVector1, AVector2: TVector3D): TVector3D;
begin
{$EXCESSPRECISION OFF}
Result.X := AVector1.X * AVector2.X;
Result.Y := AVector1.Y * AVector2.Y;
Result.Z := AVector1.Z * AVector2.Z;
Result.W := AVector1.W * AVector2.W;
{$EXCESSPRECISION ON}
end;
class operator TVector3D.Multiply(const AVector: TVector3D; const AFactor: Single): TVector3D;
begin
Result := AVector * TVector3D.Create(AFactor, AFactor, AFactor, AFactor);
end;
class operator TVector3D.Multiply(const AFactor: Single; const AVector: TVector3D): TVector3D;
begin
Result := AVector * AFactor;
end;
class operator TVector3D.Divide(const AVector: TVector3D; const AFactor: Single): TVector3D;
begin
{$EXCESSPRECISION OFF}
if not SameValue(AFactor, 0, TEpsilon.Vector) then
Result := AVector * (1 / AFactor)
else
Result := AVector;
{$EXCESSPRECISION ON}
end;
procedure TVector3D.Offset(const ADelta: TPoint3D);
begin
{$EXCESSPRECISION OFF}
Self.X := Self.X + ADelta.X;
Self.Y := Self.Y + ADelta.Y;
Self.Z := Self.Z + ADelta.Z;
Self.W := Self.W;
{$EXCESSPRECISION ON}
end;
procedure TVector3D.Offset(const ADeltaX, ADeltaY, ADeltaZ: Single);
begin
Self.X := Self.X + ADeltaX;
Self.Y := Self.Y + ADeltaY;
Self.Z := Self.Z + ADeltaZ;
Self.W := Self.W;
end;
function TVector3D.CrossProduct(const AVector: TVector3D): TVector3D;
begin
Result.X := Self.Y * AVector.Z - Self.Z * AVector.Y;
Result.Y := Self.Z * AVector.X - Self.X * AVector.Z;
Result.Z := Self.X * AVector.Y - Self.Y * AVector.X;
Result.W := 1;
end;
function TVector3D.DotProduct(const AVector: TVector3D): Single;
begin
Result := Self.X * AVector.X + Self.Y * AVector.Y + Self.Z * AVector.Z;
end;
function TVector3D.Length: Single;
begin
Result := Sqrt(Self.X * Self.X + Self.Y * Self.Y + Self.Z * Self.Z + Self.W * Self.W);
end;
function TVector3D.Normalize: TVector3D;
var
VecLen: Single;
begin
VecLen := Self.Length;
if VecLen > 0 then
Result := Self / VecLen
else
Result := Self;
end;
function TVector3D.Distance(const AVector: TVector3D): Single;
begin
Result := (AVector - Self).Length;
end;
function TVector3D.Rotate(const AAxis: TPoint3D; const AAngle: Single): TVector3D;
begin
Result := Self * TMatrix3D.CreateRotation(AAxis, AAngle);
end;
function TVector3D.Reflect(const AVector: TVector3D): TVector3D;
begin
Result := TPoint3D(Self) + TPoint3D(AVector) * (-2 * TPoint3D(Self).DotProduct(TPoint3D(AVector)));
end;
function TVector3D.MidVector(const AVector: TVector3D): TVector3D;
begin
Result := (Self + AVector) * 0.5;
end;
function TVector3D.AngleCosine(const AVector: TVector3D): Single;
begin
Result := TPoint3D(Self).Length * TPoint3D(AVector).Length;
if not SameValue(Result, 0, TEpsilon.Vector) then
Result := TPoint3D(Self).DotProduct(TPoint3D(AVector)) / Result
else
Result := TPoint3D(Self).DotProduct(TPoint3D(AVector)) / SingleResolution;
Result := Max(Min(Result, 1), -1);
end;
function TVector3D.ToPoint3D(const ATransform: Boolean): TPoint3D;
var
ReciprocalW: Single;
begin
{$EXCESSPRECISION OFF}
if (not ATransform) or SameValue(Self.W, 0, TEpsilon.Vector) then
begin
Result.X := Self.X;
Result.Y := Self.Y;
Result.Z := Self.Z;
end
else
begin
ReciprocalW := 1 / Self.W;
Result.X := Self.X * ReciprocalW;
Result.Y := Self.Y * ReciprocalW;
Result.Z := Self.Z * ReciprocalW;
end;
{$EXCESSPRECISION ON}
end;
class function TVector3D.Zero: TVector3D;
begin
Result.X := 0;
Result.Y := 0;
Result.Z := 0;
Result.W := 0;
end;
{ TMatrix3D }
constructor TMatrix3D.Create(const AM11, AM12, AM13, AM14, AM21, AM22, AM23, AM24, AM31, AM32, AM33, AM34, AM41, AM42,
AM43, AM44: Single);
begin
Self.m11 := AM11;
Self.m12 := AM12;
Self.m13 := AM13;
Self.m14 := AM14;
Self.m21 := AM21;
Self.m22 := AM22;
Self.m23 := AM23;
Self.m24 := AM24;
Self.m31 := AM31;
Self.m32 := AM32;
Self.m33 := AM33;
Self.m34 := AM34;
Self.m41 := AM41;
Self.m42 := AM42;
Self.m43 := AM43;
Self.m44 := AM44;
end;
constructor TMatrix3D.Create(const AArray: TSingleDynArray);
begin
Self := TMatrix3D.Create(AArray[0], AArray[4], AArray[8], AArray[12], AArray[1], AArray[5], AArray[9], AArray[13],
AArray[2], AArray[6], AArray[10], AArray[14], AArray[3], AArray[7], AArray[11], AArray[15]);
end;
class function TMatrix3D.CreateScaling(const AScale: TPoint3D): TMatrix3D;
begin
FillChar(Result, SizeOf(Result), 0);
Result.m11 := AScale.X;
Result.m22 := AScale.Y;
Result.m33 := AScale.Z;
Result.m44 := 1;
end;
class function TMatrix3D.CreateTranslation(const ATranslation: TPoint3D): TMatrix3D;
begin
Result := Identity;
Result.m41 := ATranslation.X;
Result.m42 := ATranslation.Y;
Result.m43 := ATranslation.Z;
end;
class function TMatrix3D.CreateRotationX(const AAngle: Single): TMatrix3D;
var
Sine, Cosine: Single;
begin
SinCosSingle(AAngle, Sine, Cosine);
Result := Identity;
Result.m22 := Cosine;
Result.m23 := Sine;
Result.m32 := - Result.m23;
Result.m33 := Result.m22;
end;
class function TMatrix3D.CreateRotationY(const AAngle: Single): TMatrix3D;
var
Sine, Cosine: Single;
begin
SinCosSingle(AAngle, Sine, Cosine);
Result := Identity;
Result.m11 := Cosine;
Result.m13 := - Sine;
Result.m31 := - Result.m13;
Result.m33 := Result.m11;
end;
class function TMatrix3D.CreateRotationZ(const AAngle: Single): TMatrix3D;
var
Sine, Cosine: Single;
begin
SinCosSingle(AAngle, Sine, Cosine);
Result := Identity;
Result.m11 := Cosine;
Result.m12 := Sine;
Result.m21 := - Result.m12;
Result.m22 := Result.m11;
end;
class function TMatrix3D.CreateRotation(const AAxis: TPoint3D; const AAngle: Single): TMatrix3D;
var
NormAxis: TPoint3D;
Cosine, Sine, OneMinusCos: Single;
begin
SinCosSingle(AAngle, Sine, Cosine);
OneMinusCos := 1 - Cosine;
NormAxis := AAxis.Normalize;
Result := Identity;
Result.m11 := (OneMinusCos * NormAxis.X * NormAxis.X) + Cosine;
Result.m12 := (OneMinusCos * NormAxis.X * NormAxis.Y) + (NormAxis.Z * Sine);
Result.m13 := (OneMinusCos * NormAxis.Z * NormAxis.X) - (NormAxis.Y * Sine);
Result.m21 := (OneMinusCos * NormAxis.X * NormAxis.Y) - (NormAxis.Z * Sine);
Result.m22 := (OneMinusCos * NormAxis.Y * NormAxis.Y) + Cosine;
Result.m23 := (OneMinusCos * NormAxis.Y * NormAxis.Z) + (NormAxis.X * Sine);
Result.m31 := (OneMinusCos * NormAxis.Z * NormAxis.X) + (NormAxis.Y * Sine);
Result.m32 := (OneMinusCos * NormAxis.Y * NormAxis.Z) - (NormAxis.X * Sine);
Result.m33 := (OneMinusCos * NormAxis.Z * NormAxis.Z) + Cosine;
end;
class function TMatrix3D.CreateRotationYawPitchRoll(const AYaw, APitch, ARoll: Single): TMatrix3D;
var
SineYaw, SinePitch, SineRoll: Single;
CosineYaw, CosinePitch, CosineRoll: Single;
begin
SinCosSingle(AYaw, SineYaw, CosineYaw);
SinCosSingle(APitch, SinePitch, CosinePitch);
SinCosSingle(ARoll, SineRoll, CosineRoll);
Result := Identity;
Result.m11 := CosineRoll * CosineYaw + SinePitch * SineRoll * SineYaw;
Result.m12 := CosineYaw * SinePitch * SineRoll - CosineRoll * SineYaw;
Result.m13 := - CosinePitch * SineRoll;
Result.m21 := CosinePitch * SineYaw;
Result.m22 := CosinePitch * CosineYaw;
Result.m23 := SinePitch;
Result.m31 := CosineYaw * SineRoll - CosineRoll * SinePitch * SineYaw;
Result.m32 := - CosineRoll * CosineYaw * SinePitch - SineRoll * SineYaw;
Result.m33 := CosinePitch * CosineRoll;
end;
class function TMatrix3D.CreateRotationHeadingPitchBank(const AHeading, APitch, ABank: Single): TMatrix3D;
var
SineHeading, SinePitch, SineBank: Single;
CosineHeading, CosinePitch, CosineBank: Single;
begin
SinCosSingle(AHeading, SineHeading, CosineHeading);
SinCosSingle(APitch, SinePitch, CosinePitch);
SinCosSingle(ABank, SineBank, CosineBank);
Result := Identity;
Result.m11 := (CosineHeading * CosineBank) + (SineHeading * SinePitch * SineBank);
Result.m12 := (- CosineHeading * SineBank) + (SineHeading * SinePitch * CosineBank);
Result.m13 := SineHeading * CosinePitch;
Result.m21 := SineBank * CosinePitch;
Result.m22 := CosineBank * CosinePitch;
Result.m23 := - SinePitch;
Result.m31 := (- SineHeading * CosineBank) + (CosineHeading * SinePitch * SineBank);
Result.m32 := (SineBank * SineHeading) + (CosineHeading * SinePitch * CosineBank);
Result.m33 := CosineHeading * CosinePitch;
end;
class function TMatrix3D.CreateLookAtRH(const ASource, ATarget, ACeiling: TPoint3D): TMatrix3D;
var
ZAxis, XAxis, YAxis: TPoint3D;
begin
ZAxis := (ASource - ATarget).Normalize;
XAxis := ACeiling.CrossProduct(ZAxis).Normalize;
YAxis := ZAxis.CrossProduct(XAxis);
Result := Identity;
Result.m11 := XAxis.X;
Result.m12 := YAxis.X;
Result.m13 := ZAxis.X;
Result.m21 := XAxis.Y;
Result.m22 := YAxis.Y;
Result.m23 := ZAxis.Y;
Result.m31 := XAxis.Z;
Result.m32 := YAxis.Z;
Result.m33 := ZAxis.Z;
Result.m41 := - XAxis.DotProduct(ASource);
Result.m42 := - YAxis.DotProduct(ASource);
Result.m43 := - ZAxis.DotProduct(ASource);
end;
class function TMatrix3D.CreateLookAtLH(const ASource, ATarget, ACeiling: TPoint3D): TMatrix3D;
var
ZAxis, XAxis, YAxis: TPoint3D;
begin
ZAxis := (ATarget - ASource).Normalize;
XAxis := ACeiling.CrossProduct(ZAxis).Normalize;
YAxis := ZAxis.CrossProduct(XAxis);
Result := Identity;
Result.m11 := XAxis.X;
Result.m12 := YAxis.X;
Result.m13 := ZAxis.X;
Result.m21 := XAxis.Y;
Result.m22 := YAxis.Y;
Result.m23 := ZAxis.Y;
Result.m31 := XAxis.Z;
Result.m32 := YAxis.Z;
Result.m33 := ZAxis.Z;
Result.m41 := - XAxis.DotProduct(ASource);
Result.m42 := - YAxis.DotProduct(ASource);
Result.m43 := - ZAxis.DotProduct(ASource);
end;
class function TMatrix3D.CreateLookAtDirRH(const ASource, ADirection, ACeiling: TPoint3D): TMatrix3D;
var
ZAxis, XAxis, YAxis: TPoint3D;
begin
ZAxis := ADirection.Normalize;
XAxis := ACeiling.CrossProduct(ZAxis).Normalize;
YAxis := ZAxis.CrossProduct(XAxis);
Result := Identity;
Result.m11 := XAxis.X;
Result.m12 := YAxis.X;
Result.m13 := ZAxis.X;
Result.m21 := XAxis.Y;
Result.m22 := YAxis.Y;
Result.m23 := ZAxis.Y;
Result.m31 := XAxis.Z;
Result.m32 := YAxis.Z;
Result.m33 := ZAxis.Z;
Result.m41 := - XAxis.DotProduct(ASource);
Result.m42 := - YAxis.DotProduct(ASource);
Result.m43 := - ZAxis.DotProduct(ASource);
end;
class function TMatrix3D.CreateLookAtDirLH(const ASource, ADirection, ACeiling: TPoint3D): TMatrix3D;
var
ZAxis, XAxis, YAxis: TPoint3D;
begin
ZAxis := - ADirection.Normalize;
XAxis := ACeiling.CrossProduct(ZAxis).Normalize;
YAxis := ZAxis.CrossProduct(XAxis);
Result := Identity;
Result.m11 := XAxis.X;
Result.m12 := YAxis.X;
Result.m13 := ZAxis.X;
Result.m21 := XAxis.Y;
Result.m22 := YAxis.Y;
Result.m23 := ZAxis.Y;
Result.m31 := XAxis.Z;
Result.m32 := YAxis.Z;
Result.m33 := ZAxis.Z;
Result.m41 := - XAxis.DotProduct(ASource);
Result.m42 := - YAxis.DotProduct(ASource);
Result.m43 := - ZAxis.DotProduct(ASource);
end;
class function TMatrix3D.CreateOrthoLH(const AWidth, AHeight, AZNear, AZFar: Single): TMatrix3D;
begin
Result := TMatrix3D.Identity;
Result.m11 := 2 / AWidth;
Result.m22 := 2 / AHeight;
Result.m33 := 1 / (AZFar - AZNear);
Result.m42 := AZNear / (AZNear - AZFar);
end;
class function TMatrix3D.CreateOrthoRH(const AWidth, AHeight, AZNear, AZFar: Single): TMatrix3D;
begin
Result := TMatrix3D.Identity;
Result.m11 := 2 / AWidth;
Result.m22 := 2 / AHeight;
Result.m33 := 1 / (AZNear - AZFar);
Result.m42 := AZNear / (AZNear - AZFar);
end;
class function TMatrix3D.CreateOrthoOffCenterLH(const ALeft, ATop, ARight, ABottom, AZNear, AZFar: Single): TMatrix3D;
begin
Result := TMatrix3D.Identity;
Result.m11 := 2 / (ARight - ALeft);
Result.m22 := 2 / (ATop - ABottom);
Result.m33 := 1 / (AZFar - AZNear);
Result.m41 := (ALeft + ARight) / (ALeft - ARight);
Result.m42 := (ATop + ABottom) / (ABottom - ATop);
Result.m43 := AZNear / (AZNear - AZFar);
end;
class function TMatrix3D.CreateOrthoOffCenterRH(const ALeft, ATop, ARight, ABottom, AZNear, AZFar: Single): TMatrix3D;
begin
Result := TMatrix3D.Identity;
Result.m11 := 2 / (ARight - ALeft);
Result.m22 := 2 / (ATop - ABottom);
Result.m33 := 1 / (AZNear - AZFar);
Result.m41 := (ALeft + ARight) / (ALeft - ARight);
Result.m42 := (ATop + ABottom) / (ABottom - ATop);
Result.m43 := AZNear / (AZNear - AZFar);
end;
class function TMatrix3D.CreatePerspectiveFovLH(const AFOV, AAspect, AZNear, AZFar: Single;
const AHorizontalFOV: Boolean = False): TMatrix3D;
var
XScale, YScale: Single;
begin
if AHorizontalFOV then
begin
XScale := 1 / Tangent(AFOV / 2);
YScale := XScale / AAspect;
end else
begin
YScale := 1 / Tangent(AFOV / 2);
XScale := YScale / AAspect;
end;
Result := TMatrix3D.Identity;
Result.m11 := XScale;
Result.m22 := YScale;
Result.m33 := AZFar / (AZFar - AZNear);
Result.m34 := 1;
Result.m43 := -AZNear * AZFar / (AZFar - AZNear);
Result.m44 := 0;
end;
class function TMatrix3D.CreatePerspectiveFovRH(const AFOV, AAspect, AZNear, AZFar: Single;
const AHorizontalFOV: Boolean = False): TMatrix3D;
var
XScale, YScale: Single;
begin
if AHorizontalFOV then
begin
XScale := 1 / Tangent(AFOV / 2);
YScale := XScale / AAspect;
end else
begin
YScale := 1 / Tangent(AFOV / 2);
XScale := YScale / AAspect;
end;
Result := TMatrix3D.Identity;
Result.m11 := XScale;
Result.m22 := YScale;
Result.m33 := AZFar / (AZNear - AZFar);
Result.m34 := -1;
Result.m43 := AZNear * AZFar / (AZNear - AZFar);
Result.m44 := 0;
end;
class operator TMatrix3D.Multiply(const APoint1, APoint2: TMatrix3D): TMatrix3D;
begin
Result.M[0].V[0] := APoint1.M[0].V[0] * APoint2.M[0].V[0] + APoint1.M[0].V[1] * APoint2.M[1].V[0]
+ APoint1.M[0].V[2] * APoint2.M[2].V[0] + APoint1.M[0].V[3] * APoint2.M[3].V[0];
Result.M[0].V[1] := APoint1.M[0].V[0] * APoint2.M[0].V[1] + APoint1.M[0].V[1] * APoint2.M[1].V[1]
+ APoint1.M[0].V[2] * APoint2.M[2].V[1] + APoint1.M[0].V[3] * APoint2.M[3].V[1];
Result.M[0].V[2] := APoint1.M[0].V[0] * APoint2.M[0].V[2] + APoint1.M[0].V[1] * APoint2.M[1].V[2]
+ APoint1.M[0].V[2] * APoint2.M[2].V[2] + APoint1.M[0].V[3] * APoint2.M[3].V[2];
Result.M[0].V[3] := APoint1.M[0].V[0] * APoint2.M[0].V[3] + APoint1.M[0].V[1] * APoint2.M[1].V[3]
+ APoint1.M[0].V[2] * APoint2.M[2].V[3] + APoint1.M[0].V[3] * APoint2.M[3].V[3];
Result.M[1].V[0] := APoint1.M[1].V[0] * APoint2.M[0].V[0] + APoint1.M[1].V[1] * APoint2.M[1].V[0]
+ APoint1.M[1].V[2] * APoint2.M[2].V[0] + APoint1.M[1].V[3] * APoint2.M[3].V[0];
Result.M[1].V[1] := APoint1.M[1].V[0] * APoint2.M[0].V[1] + APoint1.M[1].V[1] * APoint2.M[1].V[1]
+ APoint1.M[1].V[2] * APoint2.M[2].V[1] + APoint1.M[1].V[3] * APoint2.M[3].V[1];
Result.M[1].V[2] := APoint1.M[1].V[0] * APoint2.M[0].V[2] + APoint1.M[1].V[1] * APoint2.M[1].V[2]
+ APoint1.M[1].V[2] * APoint2.M[2].V[2] + APoint1.M[1].V[3] * APoint2.M[3].V[2];
Result.M[1].V[3] := APoint1.M[1].V[0] * APoint2.M[0].V[3] + APoint1.M[1].V[1] * APoint2.M[1].V[3]
+ APoint1.M[1].V[2] * APoint2.M[2].V[3] + APoint1.M[1].V[3] * APoint2.M[3].V[3];
Result.M[2].V[0] := APoint1.M[2].V[0] * APoint2.M[0].V[0] + APoint1.M[2].V[1] * APoint2.M[1].V[0]
+ APoint1.M[2].V[2] * APoint2.M[2].V[0] + APoint1.M[2].V[3] * APoint2.M[3].V[0];
Result.M[2].V[1] := APoint1.M[2].V[0] * APoint2.M[0].V[1] + APoint1.M[2].V[1] * APoint2.M[1].V[1]
+ APoint1.M[2].V[2] * APoint2.M[2].V[1] + APoint1.M[2].V[3] * APoint2.M[3].V[1];
Result.M[2].V[2] := APoint1.M[2].V[0] * APoint2.M[0].V[2] + APoint1.M[2].V[1] * APoint2.M[1].V[2]
+ APoint1.M[2].V[2] * APoint2.M[2].V[2] + APoint1.M[2].V[3] * APoint2.M[3].V[2];
Result.M[2].V[3] := APoint1.M[2].V[0] * APoint2.M[0].V[3] + APoint1.M[2].V[1] * APoint2.M[1].V[3]
+ APoint1.M[2].V[2] * APoint2.M[2].V[3] + APoint1.M[2].V[3] * APoint2.M[3].V[3];
Result.M[3].V[0] := APoint1.M[3].V[0] * APoint2.M[0].V[0] + APoint1.M[3].V[1] * APoint2.M[1].V[0]
+ APoint1.M[3].V[2] * APoint2.M[2].V[0] + APoint1.M[3].V[3] * APoint2.M[3].V[0];
Result.M[3].V[1] := APoint1.M[3].V[0] * APoint2.M[0].V[1] + APoint1.M[3].V[1] * APoint2.M[1].V[1]
+ APoint1.M[3].V[2] * APoint2.M[2].V[1] + APoint1.M[3].V[3] * APoint2.M[3].V[1];
Result.M[3].V[2] := APoint1.M[3].V[0] * APoint2.M[0].V[2] + APoint1.M[3].V[1] * APoint2.M[1].V[2]
+ APoint1.M[3].V[2] * APoint2.M[2].V[2] + APoint1.M[3].V[3] * APoint2.M[3].V[2];
Result.M[3].V[3] := APoint1.M[3].V[0] * APoint2.M[0].V[3] + APoint1.M[3].V[1] * APoint2.M[1].V[3]
+ APoint1.M[3].V[2] * APoint2.M[2].V[3] + APoint1.M[3].V[3] * APoint2.M[3].V[3];
end;
class operator TMatrix3D.Multiply(const APoint: TPoint3D; const AMatrix: TMatrix3D): TPoint3D;
begin
Result.X := (APoint.X * AMatrix.m11) + (APoint.Y * AMatrix.m21) + (APoint.Z * AMatrix.m31) + AMatrix.m41;
Result.Y := (APoint.X * AMatrix.m12) + (APoint.Y * AMatrix.m22) + (APoint.Z * AMatrix.m32) + AMatrix.m42;
Result.Z := (APoint.X * AMatrix.m13) + (APoint.Y * AMatrix.m23) + (APoint.Z * AMatrix.m33) + AMatrix.m43;
end;
class operator TMatrix3D.Multiply(const AVector: TVector3D;
const AMatrix: TMatrix3D): TVector3D;
begin
Result.X := (AVector.X * AMatrix.m11) + (AVector.Y * AMatrix.m21) + (AVector.Z * AMatrix.m31) + (AVector.W * AMatrix.m41);
Result.Y := (AVector.X * AMatrix.m12) + (AVector.Y * AMatrix.m22) + (AVector.Z * AMatrix.m32) + (AVector.W * AMatrix.m42);
Result.Z := (AVector.X * AMatrix.m13) + (AVector.Y * AMatrix.m23) + (AVector.Z * AMatrix.m33) + (AVector.W * AMatrix.m43);
Result.W := (AVector.X * AMatrix.m14) + (AVector.Y * AMatrix.m24) + (AVector.Z * AMatrix.m34) + (AVector.W * AMatrix.m44);
end;
function TMatrix3D.Scale(const AFactor: single): TMatrix3D;
var
i: Integer;
begin
{$EXCESSPRECISION OFF}
for i := 0 to 3 do
begin
Result.M[i].V[0] := Self.M[i].V[0] * AFactor;
Result.M[i].V[1] := Self.M[i].V[1] * AFactor;
Result.M[i].V[2] := Self.M[i].V[2] * AFactor;
Result.M[i].V[3] := Self.M[i].V[3] * AFactor;
end;
{$EXCESSPRECISION ON}
end;
function TMatrix3D.Transpose: TMatrix3D;
begin
Result.M[0].V[0] := Self.M[0].V[0];
Result.M[0].V[1] := Self.M[1].V[0];
Result.M[0].V[2] := Self.M[2].V[0];
Result.M[0].V[3] := Self.M[3].V[0];
Result.M[1].V[0] := Self.M[0].V[1];
Result.M[1].V[1] := Self.M[1].V[1];
Result.M[1].V[2] := Self.M[2].V[1];
Result.M[1].V[3] := Self.M[3].V[1];
Result.M[2].V[0] := Self.M[0].V[2];
Result.M[2].V[1] := Self.M[1].V[2];
Result.M[2].V[2] := Self.M[2].V[2];
Result.M[2].V[3] := Self.M[3].V[2];
Result.M[3].V[0] := Self.M[0].V[3];
Result.M[3].V[1] := Self.M[1].V[3];
Result.M[3].V[2] := Self.M[2].V[3];
Result.M[3].V[3] := Self.M[3].V[3];
end;
function TMatrix3D.EyePosition: TPoint3D;
type
TMatrix3DArray = array [0 .. 15] of Single;
begin
Result.X := - TMatrix3DArray(Self)[0] * TMatrix3DArray(Self)[12] - TMatrix3DArray(Self)[1] * TMatrix3DArray(Self)[13]
- TMatrix3DArray(Self)[2] * TMatrix3DArray(Self)[14];
Result.Y := - TMatrix3DArray(Self)[4] * TMatrix3DArray(Self)[12] - TMatrix3DArray(Self)[5] * TMatrix3DArray(Self)[13]
- TMatrix3DArray(Self)[6] * TMatrix3DArray(Self)[14];
Result.Z := - TMatrix3DArray(Self)[8] * TMatrix3DArray(Self)[12] - TMatrix3DArray(Self)[9] * TMatrix3DArray(Self)[13]
- TMatrix3DArray(Self)[10] * TMatrix3DArray(Self)[14];
end;
function TMatrix3D.DetInternal(const a1, a2, a3, b1, b2, b3, c1, c2, c3: Single): Single;
begin
Result := a1 * (b2 * c3 - b3 * c2) - b1 * (a2 * c3 - a3 * c2) + c1 * (a2 * b3 - a3 * b2);
end;
function TMatrix3D.Determinant: Single;
begin
Result :=
Self.M[0].V[0] * DetInternal(Self.M[1].V[1], Self.M[2].V[1], Self.M[3].V[1], Self.M[1].V[2],
Self.M[2].V[2], Self.M[3].V[2], Self.M[1].V[3], Self.M[2].V[3], Self.M[3].V[3])
- Self.M[0].V[1] * DetInternal(Self.M[1].V[0], Self.M[2].V[0], Self.M[3].V[0], Self.M[1].V[2], Self.M[2].V[2],
Self.M[3].V[2], Self.M[1].V[3], Self.M[2].V[3], Self.M[3].V[3])
+ Self.M[0].V[2] * DetInternal(Self.M[1].V[0], Self.M[2].V[0], Self.M[3].V[0], Self.M[1].V[1], Self.M[2].V[1],
Self.M[3].V[1], Self.M[1].V[3], Self.M[2].V[3], Self.M[3].V[3])
- Self.M[0].V[3] * DetInternal(Self.M[1].V[0], Self.M[2].V[0], Self.M[3].V[0], Self.M[1].V[1], Self.M[2].V[1],
Self.M[3].V[1], Self.M[1].V[2], Self.M[2].V[2], Self.M[3].V[2]);
end;
function TMatrix3D.Adjoint: TMatrix3D;
var
a1, a2, a3, a4, b1, b2, b3, b4, c1, c2, c3, c4, d1, d2, d3, d4: Single;
begin
a1 := Self.M[0].V[0];
b1 := Self.M[0].V[1];
c1 := Self.M[0].V[2];
d1 := Self.M[0].V[3];
a2 := Self.M[1].V[0];
b2 := Self.M[1].V[1];
c2 := Self.M[1].V[2];
d2 := Self.M[1].V[3];
a3 := Self.M[2].V[0];
b3 := Self.M[2].V[1];
c3 := Self.M[2].V[2];
d3 := Self.M[2].V[3];
a4 := Self.M[3].V[0];
b4 := Self.M[3].V[1];
c4 := Self.M[3].V[2];
d4 := Self.M[3].V[3];
Result.M[0].V[0] := DetInternal(b2, b3, b4, c2, c3, c4, d2, d3, d4);
Result.M[1].V[0] := -DetInternal(a2, a3, a4, c2, c3, c4, d2, d3, d4);
Result.M[2].V[0] := DetInternal(a2, a3, a4, b2, b3, b4, d2, d3, d4);
Result.M[3].V[0] := -DetInternal(a2, a3, a4, b2, b3, b4, c2, c3, c4);
Result.M[0].V[1] := -DetInternal(b1, b3, b4, c1, c3, c4, d1, d3, d4);
Result.M[1].V[1] := DetInternal(a1, a3, a4, c1, c3, c4, d1, d3, d4);
Result.M[2].V[1] := -DetInternal(a1, a3, a4, b1, b3, b4, d1, d3, d4);
Result.M[3].V[1] := DetInternal(a1, a3, a4, b1, b3, b4, c1, c3, c4);
Result.M[0].V[2] := DetInternal(b1, b2, b4, c1, c2, c4, d1, d2, d4);
Result.M[1].V[2] := -DetInternal(a1, a2, a4, c1, c2, c4, d1, d2, d4);
Result.M[2].V[2] := DetInternal(a1, a2, a4, b1, b2, b4, d1, d2, d4);
Result.M[3].V[2] := -DetInternal(a1, a2, a4, b1, b2, b4, c1, c2, c4);
Result.M[0].V[3] := -DetInternal(b1, b2, b3, c1, c2, c3, d1, d2, d3);
Result.M[1].V[3] := DetInternal(a1, a2, a3, c1, c2, c3, d1, d2, d3);
Result.M[2].V[3] := -DetInternal(a1, a2, a3, b1, b2, b3, d1, d2, d3);
Result.M[3].V[3] := DetInternal(a1, a2, a3, b1, b2, b3, c1, c2, c3);
end;
function TMatrix3D.Inverse: TMatrix3D;
const
DefaultValue: TMatrix3D = (m11: 1.0; m12: 0.0; m13: 0.0; m14: 0.0; m21: 0.0; m22: 1.0; m23: 0.0; m24: 0.0; m31: 0.0;
m32: 0.0; m33: 1.0; m34: 0.0; m41: 0.0; m42: 0.0; m43: 0.0; m44: 1.0;);
var
Det: Single;
begin
Det := Self.Determinant;
if Abs(Det) < Epsilon then
Result := DefaultValue
else
Result := Self.Adjoint.Scale(1 / Det);
end;
function TMatrix3D.ToMatrix: TMatrix;
begin
Result.m11 := Self.m11;
Result.m12 := Self.m12;
Result.m13 := Self.m13;
Result.m21 := Self.m21;
Result.m22 := Self.m22;
Result.m23 := Self.m23;
Result.m31 := Self.m31;
Result.m32 := Self.m32;
Result.m33 := Self.m33;
end;
{ TQuaternion3D }
constructor TQuaternion3D.Create(const AAxis: TPoint3D; const AAngle: Single);
var
AxisLen, Sine, Cosine: Single;
begin
AxisLen := AAxis.Length;
if AxisLen > 0 then
begin
SinCosSingle(AAngle / 2, Sine, Cosine);
Self.RealPart := Cosine;
Self.ImagPart := AAxis * (Sine / AxisLen);
end else Self := Identity;
end;
constructor TQuaternion3D.Create(const AYaw, APitch, ARoll: Single);
begin
Self := TQuaternion3D.Create(Point3D(0, 1, 0), AYaw) * TQuaternion3D.Create(Point3D(1, 0, 0), APitch)
* TQuaternion3D.Create(Point3D(0, 0, 1), ARoll);
end;
constructor TQuaternion3D.Create(const AMatrix: TMatrix3D);
var
Trace, S: double;
NewQuat: TQuaternion3D;
begin
Trace := AMatrix.m11 + AMatrix.m22 + AMatrix.m33;
if Trace > EPSILON then
begin
S := 0.5 / Sqrt(Trace + 1.0);
NewQuat.ImagPart.X := (AMatrix.M23 - AMatrix.M32) * S;
NewQuat.ImagPart.Y := (AMatrix.M31 - AMatrix.M13) * S;
NewQuat.ImagPart.Z := (AMatrix.M12 - AMatrix.M21) * S;
NewQuat.RealPart := 0.5 * Sqrt(Trace + 1.0);
end
else if (AMatrix.M11 > AMatrix.M22) and (AMatrix.M11 > AMatrix.M33) then
begin
S := Sqrt(Max(EPSILON, 1 + AMatrix.M11 - AMatrix.M22 - AMatrix.M33)) * 2.0;
NewQuat.ImagPart.X := 0.25 * S;
NewQuat.ImagPart.Y := (AMatrix.M12 + AMatrix.M21) / S;
NewQuat.ImagPart.Z := (AMatrix.M31 + AMatrix.M13) / S;
NewQuat.RealPart := (AMatrix.M23 - AMatrix.M32) / S;
end
else if (AMatrix.M22 > AMatrix.M33) then
begin
S := Sqrt(Max(EPSILON, 1 + AMatrix.M22 - AMatrix.M11 - AMatrix.M33)) * 2.0;
NewQuat.ImagPart.X := (AMatrix.M12 + AMatrix.M21) / S;
NewQuat.ImagPart.Y := 0.25 * S;
NewQuat.ImagPart.Z := (AMatrix.M23 + AMatrix.M32) / S;
NewQuat.RealPart := (AMatrix.M31 - AMatrix.M13) / S;
end else
begin
S := Sqrt(Max(EPSILON, 1 + AMatrix.M33 - AMatrix.M11 - AMatrix.M22)) * 2.0;
NewQuat.ImagPart.X := (AMatrix.M31 + AMatrix.M13) / S;
NewQuat.ImagPart.Y := (AMatrix.M23 + AMatrix.M32) / S;
NewQuat.ImagPart.Z := 0.25 * S;
NewQuat.RealPart := (AMatrix.M12 - AMatrix.M21) / S;
end;
Self := NewQuat.Normalize;
end;
class operator TQuaternion3D.Implicit(const AQuaternion: TQuaternion3D): TMatrix3D;
var
NormQuat: TQuaternion3D;
xx, xy, xz, xw, yy, yz, yw, zz, zw: Single;
begin
NormQuat := AQuaternion.Normalize;
{$EXCESSPRECISION OFF}
xx := NormQuat.ImagPart.X * NormQuat.ImagPart.X;
xy := NormQuat.ImagPart.X * NormQuat.ImagPart.Y;
xz := NormQuat.ImagPart.X * NormQuat.ImagPart.Z;
xw := NormQuat.ImagPart.X * NormQuat.RealPart;
yy := NormQuat.ImagPart.Y * NormQuat.ImagPart.Y;
yz := NormQuat.ImagPart.Y * NormQuat.ImagPart.Z;
yw := NormQuat.ImagPart.Y * NormQuat.RealPart;
zz := NormQuat.ImagPart.Z * NormQuat.ImagPart.Z;
zw := NormQuat.ImagPart.Z * NormQuat.RealPart;
{$EXCESSPRECISION ON}
FillChar(Result, Sizeof(Result), 0);
Result.M11 := 1 - 2 * (yy + zz);
Result.M21 := 2 * (xy - zw);
Result.M31 := 2 * (xz + yw);
Result.M12 := 2 * (xy + zw);
Result.M22 := 1 - 2 * (xx + zz);
Result.M32 := 2 * (yz - xw);
Result.M13 := 2 * (xz - yw);
Result.M23 := 2 * (yz + xw);
Result.M33 := 1 - 2 * (xx + yy);
Result.M44 := 1;
end;
class operator TQuaternion3D.Multiply(const AQuaternion1, AQuaternion2: TQuaternion3D): TQuaternion3D;
begin
Result.RealPart := AQuaternion1.RealPart * AQuaternion2.RealPart - AQuaternion1.ImagPart.X * AQuaternion2.ImagPart.X
- AQuaternion1.ImagPart.Y * AQuaternion2.ImagPart.Y - AQuaternion1.ImagPart.Z * AQuaternion2.ImagPart.Z;
Result.ImagPart.X := AQuaternion1.RealPart * AQuaternion2.ImagPart.X + AQuaternion2.RealPart * AQuaternion1.ImagPart.X
+ AQuaternion1.ImagPart.Y * AQuaternion2.ImagPart.Z - AQuaternion1.ImagPart.Z * AQuaternion2.ImagPart.Y;
Result.ImagPart.Y := AQuaternion1.RealPart * AQuaternion2.ImagPart.Y + AQuaternion2.RealPart * AQuaternion1.ImagPart.Y
+ AQuaternion1.ImagPart.Z * AQuaternion2.ImagPart.X - AQuaternion1.ImagPart.X * AQuaternion2.ImagPart.Z;
Result.ImagPart.Z := AQuaternion1.RealPart * AQuaternion2.ImagPart.Z + AQuaternion2.RealPart * AQuaternion1.ImagPart.Z
+ AQuaternion1.ImagPart.X * AQuaternion2.ImagPart.Y - AQuaternion1.ImagPart.Y * AQuaternion2.ImagPart.X;
end;
function TQuaternion3D.Length: Single;
begin
Result := Sqrt(Self.ImagPart.DotProduct(Self.ImagPart) + Self.RealPart * Self.RealPart);
end;
function TQuaternion3D.Normalize: TQuaternion3D;
var
QuatLen, InvLen: Single;
begin
QuatLen := Self.Length;
if QuatLen > EPSILON2 then
begin
{$EXCESSPRECISION OFF}
InvLen := 1 / QuatLen;
Result.ImagPart := Self.ImagPart * InvLen;
Result.RealPart := Self.RealPart * InvLen;
{$EXCESSPRECISION ON}
end
else
Result := Identity;
end;
end.
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.