Browse Source

* PChar -> PAnsiChar

Michaël Van Canneyt 2 years ago
parent
commit
0454ec3f2f

+ 1 - 1
packages/fpgtk/examples/lister.pp

@@ -607,7 +607,7 @@ end;
 
 
 { List }
 { List }
 
 
-const ListSignalNames : array[0..15] of string =
+const ListSignalNames : array[0..15] of AnsiString =
         (sgSelectionChanged,sgSelectChild,sgUnselectChild,
         (sgSelectionChanged,sgSelectChild,sgUnselectChild,
          sgToggleFocusRow,sgSelectAll,sgUnselectAll,sgUndoSelection,
          sgToggleFocusRow,sgSelectAll,sgUnselectAll,sgUndoSelection,
          sgStartSelection,sgEndSelection,sgToggleAddMode,
          sgStartSelection,sgEndSelection,sgToggleAddMode,

+ 65 - 65
packages/fpgtk/src/def/objectdef.pp

@@ -48,21 +48,21 @@ type
 
 
   TParameterItem = class (TCollectionItem)
   TParameterItem = class (TCollectionItem)
   private
   private
-    FName : string;
+    FName : AnsiString;
     FConvert: boolean;
     FConvert: boolean;
-    FpascalType: string;
+    FpascalType: AnsiString;
     FParamType: TParamType;
     FParamType: TParamType;
   protected
   protected
-    function GetDisplayName : string; override;
-    procedure SetDisplayName(Const Value : string); override;
+    function GetDisplayName : AnsiString; override;
+    procedure SetDisplayName(Const Value : AnsiString); override;
     procedure AssignTo(Dest: TPersistent); override;
     procedure AssignTo(Dest: TPersistent); override;
   public
   public
     constructor Create (ACollection : TCollection); override;
     constructor Create (ACollection : TCollection); override;
     destructor destroy; override;
     destructor destroy; override;
   published
   published
-    property Name : string read FName write FName;
+    property Name : AnsiString read FName write FName;
     { De naam van de parameter }
     { De naam van de parameter }
-    property PascalType : string read FpascalType write FPascalType;
+    property PascalType : AnsiString read FpascalType write FPascalType;
     { Zijn type }
     { Zijn type }
     property Convert : boolean read FConvert write FConvert default false;
     property Convert : boolean read FConvert write FConvert default false;
     { geeft aan of er een omzetting dient te gebeuren voor het gebruiken }
     { geeft aan of er een omzetting dient te gebeuren voor het gebruiken }
@@ -86,14 +86,14 @@ type
   TPropertyItem = class (TCollectionItem)
   TPropertyItem = class (TCollectionItem)
   private
   private
     FPropType : TPropType;
     FPropType : TPropType;
-    FName: string;
+    FName: AnsiString;
     FSection: TInterfaceSection;
     FSection: TInterfaceSection;
-    FPascalType: string;
+    FPascalType: AnsiString;
     FParameters: TParamCollection;
     FParameters: TParamCollection;
-    FGtkName: string;
+    FGtkName: AnsiString;
     FWriteProcType: TpropFuncType;
     FWriteProcType: TpropFuncType;
     FReadFuncType: TPropFuncType;
     FReadFuncType: TPropFuncType;
-    FWriteGtkName: string;
+    FWriteGtkName: AnsiString;
     FCode: TStringList;
     FCode: TStringList;
     FWriteCode: TStringList;
     FWriteCode: TStringList;
     FProctypes: TProcTypeSet;
     FProctypes: TProcTypeSet;
@@ -103,8 +103,8 @@ type
     procedure SetWriteCode(const Value: TStringList);
     procedure SetWriteCode(const Value: TStringList);
     procedure SetPropType(const Value: TPropType);
     procedure SetPropType(const Value: TPropType);
   protected
   protected
-    function GetDisplayName: string; override;
-    procedure SetDisplayName(const Value: string); override;
+    function GetDisplayName: AnsiString; override;
+    procedure SetDisplayName(const Value: AnsiString); override;
     procedure AssignTo(Dest: TPersistent); override;
     procedure AssignTo(Dest: TPersistent); override;
   public
   public
     constructor create (ACollection : TCollection); override;
     constructor create (ACollection : TCollection); override;
@@ -112,15 +112,15 @@ type
   published
   published
     property PropType : TPropType read FPropType write SetPropType default ptProcedure;
     property PropType : TPropType read FPropType write SetPropType default ptProcedure;
     { wat voor iets het is } // Moet voor DisplayName staan voor goede inleesvolgorde
     { wat voor iets het is } // Moet voor DisplayName staan voor goede inleesvolgorde
-    property Name : string read FName write FName;
+    property Name : AnsiString read FName write FName;
     { Naam van de property/functie/proc/veld/... }
     { Naam van de property/functie/proc/veld/... }
     property Section : TInterfaceSection read FSection write FSection default isPublic;
     property Section : TInterfaceSection read FSection write FSection default isPublic;
     { waar het geplaats moet worden private, public, ... }
     { waar het geplaats moet worden private, public, ... }
-    property PascalType : string read FPascalType write FPascalType;
+    property PascalType : AnsiString read FPascalType write FPascalType;
     { het type van property, functie, veld, signal (moet dan wel gedefinieerd zijn) }
     { het type van property, functie, veld, signal (moet dan wel gedefinieerd zijn) }
     property Parameters : TParamCollection read FParameters write FParameters;
     property Parameters : TParamCollection read FParameters write FParameters;
     { de parameters die doorgegeven moeten worden via de functie/procedure/signaltype }
     { de parameters die doorgegeven moeten worden via de functie/procedure/signaltype }
-    property GtkName : string read FGtkName write FGtkName;
+    property GtkName : AnsiString read FGtkName write FGtkName;
     { de naam zoals GTK die gebruikt (waarschijnlijk met _ in) }
     { de naam zoals GTK die gebruikt (waarschijnlijk met _ in) }
     property Code : TStringList read FCode write SetCode;
     property Code : TStringList read FCode write SetCode;
   { Property specifiek }
   { Property specifiek }
@@ -133,7 +133,7 @@ type
     { Geeft aan of de waarde voor toekenning aan result moet omgezet worden }
     { Geeft aan of de waarde voor toekenning aan result moet omgezet worden }
     property WriteProcType : TpropFuncType read FWriteProcType write FWriteProcType default pftGtkFunc;
     property WriteProcType : TpropFuncType read FWriteProcType write FWriteProcType default pftGtkFunc;
     { hoe de write functie moet werken : gtk-proc, object-veld, object-proc, eigen proc }
     { hoe de write functie moet werken : gtk-proc, object-veld, object-proc, eigen proc }
-    property WriteGtkName : string read FWriteGtkName write FWriteGtkName;
+    property WriteGtkName : AnsiString read FWriteGtkName write FWriteGtkName;
     { de naam zoals gtk of object die gebruikt. Gebruikt in write, voor read zie GtkName }
     { de naam zoals gtk of object die gebruikt. Gebruikt in write, voor read zie GtkName }
     property WriteConvert : boolean read FWriteConvert write FWriteConvert default false;
     property WriteConvert : boolean read FWriteConvert write FWriteConvert default false;
     { Geeft aan of de waarde moet omgezet worden voor het doorgeven }
     { Geeft aan of de waarde moet omgezet worden voor het doorgeven }
@@ -158,31 +158,31 @@ type
 
 
   TObjectItem = class (TCollectionItem)
   TObjectItem = class (TCollectionItem)
   private
   private
-    FInherit: string;
-    FName: string;
+    FInherit: AnsiString;
+    FName: AnsiString;
     FProps: TPropertyCollection;
     FProps: TPropertyCollection;
-    FGtkFuncName: string;
+    FGtkFuncName: AnsiString;
     FWithPointer: boolean;
     FWithPointer: boolean;
     FCreateObject: boolean;
     FCreateObject: boolean;
-    FGtkName: string;
-    FCreateParams: string;
+    FGtkName: AnsiString;
+    FCreateParams: AnsiString;
     procedure SetProps(const Value: TPropertyCollection);
     procedure SetProps(const Value: TPropertyCollection);
-    procedure SetGtkFuncName(const Value: string);
+    procedure SetGtkFuncName(const Value: AnsiString);
   protected
   protected
-    function GetDisplayName: string; override;
-    procedure SetDisplayName(const Value: string); override;
+    function GetDisplayName: AnsiString; override;
+    procedure SetDisplayName(const Value: AnsiString); override;
     procedure AssignTo(Dest: TPersistent); override;
     procedure AssignTo(Dest: TPersistent); override;
   public
   public
     constructor create (ACollection : TCollection); override;
     constructor create (ACollection : TCollection); override;
     destructor destroy; override;
     destructor destroy; override;
   published
   published
-    property Name : string read FName write FName;
+    property Name : AnsiString read FName write FName;
     { Naam van het object }
     { Naam van het object }
-    property Inherit : string read FInherit write FInherit;
+    property Inherit : AnsiString read FInherit write FInherit;
     { De naam van het object dat ancester is }
     { De naam van het object dat ancester is }
-    property GtkFuncName : string read FGtkFuncName write SetGtkFuncName;
+    property GtkFuncName : AnsiString read FGtkFuncName write SetGtkFuncName;
     { Naam van het object in gtk zoals het in de functies en procedures gebruikt wordt }
     { Naam van het object in gtk zoals het in de functies en procedures gebruikt wordt }
-    property GtkName : string read FGtkName write FGtkName;
+    property GtkName : AnsiString read FGtkName write FGtkName;
     { Naam van het objectrecord in gtk zoals gebruikt in typedeclaraties}
     { Naam van het objectrecord in gtk zoals gebruikt in typedeclaraties}
     property Props : TPropertyCollection read FProps write SetProps;
     property Props : TPropertyCollection read FProps write SetProps;
     { De verschillende properties, procedures, ... van en voor het object }
     { De verschillende properties, procedures, ... van en voor het object }
@@ -190,7 +190,7 @@ type
     { duid aan of er ook een pointerdefinitie moet zijn }
     { duid aan of er ook een pointerdefinitie moet zijn }
     property CreateObject : boolean read FCreateObject write FCreateObject default false;
     property CreateObject : boolean read FCreateObject write FCreateObject default false;
     { duid aan of er een CreateGtkObject procedure moet aangemaakt worden }
     { duid aan of er een CreateGtkObject procedure moet aangemaakt worden }
-    property CreateParams : string read FCreateParams write FCreateParams;
+    property CreateParams : AnsiString read FCreateParams write FCreateParams;
     { Geeft de parameters die meegeven moeten worden aan de _New functie }
     { Geeft de parameters die meegeven moeten worden aan de _New functie }
   end;
   end;
 
 
@@ -212,7 +212,7 @@ type
     FDefinition: TObjectCollection;
     FDefinition: TObjectCollection;
     FGtkPrefix,
     FGtkPrefix,
     FUsesList,
     FUsesList,
-    FUnitName: string;
+    FUnitName: AnsiString;
     {$IFNDEF Delphi}
     {$IFNDEF Delphi}
     FTop, FLeft : integer;
     FTop, FLeft : integer;
     {$ENDIF}
     {$ENDIF}
@@ -230,9 +230,9 @@ type
   published
   published
     { Published declarations }
     { Published declarations }
     property Definition : TObjectCollection read FDefinition write SetDefinition;
     property Definition : TObjectCollection read FDefinition write SetDefinition;
-    property GtkPrefix : string read FGtkPrefix write FGtkPrefix;
-    property UnitName : string read FUnitName write FUnitName;
-    property UsesList : string read FUsesList write FUsesList;
+    property GtkPrefix : AnsiString read FGtkPrefix write FGtkPrefix;
+    property UnitName : AnsiString read FUnitName write FUnitName;
+    property UsesList : AnsiString read FUsesList write FUsesList;
     {$IFNDEF delphi}
     {$IFNDEF delphi}
     // Compatibiliteit met Delphi
     // Compatibiliteit met Delphi
     property Left : integer read FLeft write FLeft;
     property Left : integer read FLeft write FLeft;
@@ -241,8 +241,8 @@ type
   end;
   end;
 
 
 var
 var
-  GtkPrefix : string = 'gtk';
-  ObjectsPrefix : string = 'FPgtk';
+  GtkPrefix : AnsiString = 'gtk';
+  ObjectsPrefix : AnsiString = 'FPgtk';
 
 
 procedure Register;
 procedure Register;
 
 
@@ -257,7 +257,7 @@ const
   PropUsesGtkName = [pftProc, pftExistingProc];
   PropUsesGtkName = [pftProc, pftExistingProc];
 
 
 var
 var
-  lowerObjectsPrefix : string;
+  lowerObjectsPrefix : AnsiString;
   ObjectsPrefixLength : integer;
   ObjectsPrefixLength : integer;
 
 
 procedure Register;
 procedure Register;
@@ -317,12 +317,12 @@ begin
   inherited;
   inherited;
 end;
 end;
 
 
-function TParameterItem.GetDisplayName: string;
+function TParameterItem.GetDisplayName: AnsiString;
 begin
 begin
   result := FName;
   result := FName;
 end;
 end;
 
 
-procedure TParameterItem.SetDisplayName(const Value: string);
+procedure TParameterItem.SetDisplayName(const Value: AnsiString);
 begin
 begin
   FName := Value;
   FName := Value;
 end;
 end;
@@ -377,12 +377,12 @@ begin
 end;
 end;
 
 
 const
 const
-  DispPropType : array [TPropType] of string =
+  DispPropType : array [TPropType] of AnsiString =
     ('Field','Property','Function','Procedure', 'Signal',
     ('Field','Property','Function','Procedure', 'Signal',
      'HelperProc','HelperFunc','SignalType','Declarations', 'TypeDeclaration',
      'HelperProc','HelperFunc','SignalType','Declarations', 'TypeDeclaration',
      'Constructor','Destructor','Initialization','Finilization');
      'Constructor','Destructor','Initialization','Finilization');
 
 
-function TPropertyItem.GetDisplayName: string;
+function TPropertyItem.GetDisplayName: AnsiString;
 begin
 begin
   if FPropType = ptDeclarations then
   if FPropType = ptDeclarations then
     if Section = ispublished then
     if Section = ispublished then
@@ -406,7 +406,7 @@ begin
   FCode.assign (Value);
   FCode.assign (Value);
 end;
 end;
 
 
-procedure TPropertyItem.SetDisplayName(const Value: string);
+procedure TPropertyItem.SetDisplayName(const Value: AnsiString);
 begin
 begin
   FName := Value;
   FName := Value;
 end;
 end;
@@ -481,17 +481,17 @@ begin
   inherited;
   inherited;
 end;
 end;
 
 
-function TObjectItem.GetDisplayName: string;
+function TObjectItem.GetDisplayName: AnsiString;
 begin
 begin
   result := FName;
   result := FName;
 end;
 end;
 
 
-procedure TObjectItem.SetDisplayName(const Value: string);
+procedure TObjectItem.SetDisplayName(const Value: AnsiString);
 begin
 begin
   FName := Value;
   FName := Value;
 end;
 end;
 
 
-procedure TObjectItem.SetGtkFuncName(const Value: string);
+procedure TObjectItem.SetGtkFuncName(const Value: AnsiString);
 begin
 begin
   FGtkFuncName := Value;
   FGtkFuncName := Value;
   {$IFDEF writecreate}
   {$IFDEF writecreate}
@@ -550,9 +550,9 @@ begin
 end;
 end;
 
 
 const
 const
-  DispPropFuncType : array [TPropFuncType] of string = ('GtkFunc','ObjField',
+  DispPropFuncType : array [TPropFuncType] of AnsiString = ('GtkFunc','ObjField',
       'ObjFunc','Field','Proc','NotImplemented','GtkMacro','ExistingProc');
       'ObjFunc','Field','Proc','NotImplemented','GtkMacro','ExistingProc');
-  DispProcType : array [TProcType] of string = ('Override', 'Virtual', 'Dynamic',
+  DispProcType : array [TProcType] of AnsiString = ('Override', 'Virtual', 'Dynamic',
       'Abstract', 'Cdecl', 'Overload', 'Reintroduce');
       'Abstract', 'Cdecl', 'Overload', 'Reintroduce');
 
 
 procedure TObjectDefs.Save (List : TStrings);
 procedure TObjectDefs.Save (List : TStrings);
@@ -673,7 +673,7 @@ resourcestring
 procedure TObjectDefs.Load (List : TStrings);
 procedure TObjectDefs.Load (List : TStrings);
 
 
 var line : integer;
 var line : integer;
-    item, value : string;
+    item, value : AnsiString;
     HasLine : boolean;
     HasLine : boolean;
 
 
   procedure SplitNext;
   procedure SplitNext;
@@ -742,7 +742,7 @@ var line : integer;
       Rproptype : TPropType;
       Rproptype : TPropType;
       RpropFuncType : TpropFuncType;
       RpropFuncType : TpropFuncType;
       counter : integer;
       counter : integer;
-      s : string;
+      s : AnsiString;
   begin
   begin
     with AProperty do
     with AProperty do
       begin
       begin
@@ -1019,7 +1019,7 @@ procedure TObjectDefs.Write(TheUnit : TStrings; StepIt : TLukStepItProc; StepItM
       TheUnit.add ('  T'+ObjectsPrefix+Name+' = class;');
       TheUnit.add ('  T'+ObjectsPrefix+Name+' = class;');
   end;
   end;
 
 
-  function CalcProcTypes (ProcTypes : TProcTypeSet; InImplementation:boolean) : string; overload;
+  function CalcProcTypes (ProcTypes : TProcTypeSet; InImplementation:boolean) : AnsiString; overload;
   begin
   begin
     if not InImplementation then
     if not InImplementation then
       begin
       begin
@@ -1045,7 +1045,7 @@ procedure TObjectDefs.Write(TheUnit : TStrings; StepIt : TLukStepItProc; StepItM
       result := result + ' Overload;';
       result := result + ' Overload;';
   end;
   end;
 
 
-  function CalcProcTypes (ProcTypes : TProcTypeSet) : string; overload;
+  function CalcProcTypes (ProcTypes : TProcTypeSet) : AnsiString; overload;
   begin
   begin
     result := CalcProcTypes (ProcTypes, False);
     result := CalcProcTypes (ProcTypes, False);
   end;
   end;
@@ -1053,12 +1053,12 @@ procedure TObjectDefs.Write(TheUnit : TStrings; StepIt : TLukStepItProc; StepItM
   type
   type
     TConvType = (ToGtk, ToLuk, ToFPgtk);
     TConvType = (ToGtk, ToLuk, ToFPgtk);
 
 
-  function ConvertType (PascalType : string; ConvType : TConvType) : string;
+  function ConvertType (PascalType : AnsiString; ConvType : TConvType) : AnsiString;
   begin
   begin
     PascalType := lowercase (PascalType);
     PascalType := lowercase (PascalType);
     if ConvType = ToGtk then
     if ConvType = ToGtk then
       begin
       begin
-      if PascalType = 'string' then
+      if PascalType = 'AnsiString' then
         result := 'pgChar'
         result := 'pgChar'
       else if copy(PascalType,1,ObjectsPrefixLength+1) = 't'+LowerObjectsPrefix then
       else if copy(PascalType,1,ObjectsPrefixLength+1) = 't'+LowerObjectsPrefix then
         result := 'PGtk' + copy (PascalType, ObjectsPrefixLength+2, maxint)
         result := 'PGtk' + copy (PascalType, ObjectsPrefixLength+2, maxint)
@@ -1070,7 +1070,7 @@ procedure TObjectDefs.Write(TheUnit : TStrings; StepIt : TLukStepItProc; StepItM
     else
     else
       begin
       begin
       if PascalType = 'pgChar' then
       if PascalType = 'pgChar' then
-        result := 'string'
+        result := 'AnsiString'
       else if copy(PascalType,1,4) = 'pgtk' then
       else if copy(PascalType,1,4) = 'pgtk' then
         result := 'T'+ObjectsPrefix + copy (PascalType, 5, maxint)
         result := 'T'+ObjectsPrefix + copy (PascalType, 5, maxint)
       else if PascalType = 'gint' then
       else if PascalType = 'gint' then
@@ -1080,12 +1080,12 @@ procedure TObjectDefs.Write(TheUnit : TStrings; StepIt : TLukStepItProc; StepItM
       end;
       end;
   end;
   end;
 
 
-  function DoConvert (Variable, PascalType : string; ConvType : TConvType) : string;
-  var s : string;
+  function DoConvert (Variable, PascalType : AnsiString; ConvType : TConvType) : AnsiString;
+  var s : AnsiString;
   begin
   begin
     result := variable;
     result := variable;
     PascalType := lowercase (PascalType);
     PascalType := lowercase (PascalType);
-    if PascalType = 'string' then
+    if PascalType = 'AnsiString' then
       begin
       begin
       if ConvType <> ToLuk then
       if ConvType <> ToLuk then
         result := 'ConvertToPgchar('+result+')'
         result := 'ConvertToPgchar('+result+')'
@@ -1125,7 +1125,7 @@ procedure TObjectDefs.Write(TheUnit : TStrings; StepIt : TLukStepItProc; StepItM
       end;
       end;
   end;
   end;
 
 
-  function CalcParam (param : TParameterItem; Declaration : boolean; ConvType : TConvType) : string;
+  function CalcParam (param : TParameterItem; Declaration : boolean; ConvType : TConvType) : AnsiString;
   begin
   begin
     with Param do
     with Param do
       begin
       begin
@@ -1149,9 +1149,9 @@ procedure TObjectDefs.Write(TheUnit : TStrings; StepIt : TLukStepItProc; StepItM
   type
   type
     TParamListType = (plDecl, plImpl, plImplCl, plImplLukCl);
     TParamListType = (plDecl, plImpl, plImplCl, plImplLukCl);
 
 
-  function CalcParameterList (params : TParamCollection; PLType : TParamListType) : string; overload;
+  function CalcParameterList (params : TParamCollection; PLType : TParamListType) : AnsiString; overload;
   var r : integer;
   var r : integer;
-      Sep : string[2];
+      Sep : AnsiString[2];
       ct : TConvType;
       ct : TConvType;
   begin
   begin
     if PLType = plDecl then
     if PLType = plDecl then
@@ -1175,7 +1175,7 @@ procedure TObjectDefs.Write(TheUnit : TStrings; StepIt : TLukStepItProc; StepItM
         end;
         end;
   end;
   end;
 
 
-  function CalcParameterList (params : TParamCollection) : string; overload;
+  function CalcParameterList (params : TParamCollection) : AnsiString; overload;
   var r : integer;
   var r : integer;
   begin
   begin
     with params do
     with params do
@@ -1196,7 +1196,7 @@ procedure TObjectDefs.Write(TheUnit : TStrings; StepIt : TLukStepItProc; StepItM
   procedure WriteObjectInterface (Obj : TObjectItem);
   procedure WriteObjectInterface (Obj : TObjectItem);
   var r : integer;
   var r : integer;
       TheList : TStrings;
       TheList : TStrings;
-      I, N, s : string;
+      I, N, s : AnsiString;
   begin
   begin
     Lpublic.Clear;
     Lpublic.Clear;
     LProt.Clear;
     LProt.Clear;
@@ -1331,8 +1331,8 @@ procedure TObjectDefs.Write(TheUnit : TStrings; StepIt : TLukStepItProc; StepItM
               end;
               end;
             ptSignalType :
             ptSignalType :
               begin
               begin
-              TheList.Add ('    function ' + Name + 'Connect (Signal:string; Proc:T'+ObjectsPrefix+Name+'Function; data:pointer) : guint;');
-              TheList.Add ('    function ' + Name + 'ConnectAfter (Signal:string; Proc:T'+ObjectsPrefix+Name+'Function; data:pointer) : guint;');
+              TheList.Add ('    function ' + Name + 'Connect (Signal:AnsiString; Proc:T'+ObjectsPrefix+Name+'Function; data:pointer) : guint;');
+              TheList.Add ('    function ' + Name + 'ConnectAfter (Signal:AnsiString; Proc:T'+ObjectsPrefix+Name+'Function; data:pointer) : guint;');
               end;
               end;
             ptConstructor :
             ptConstructor :
               TheList.Add ('    constructor ' + Name + CalcParameterList(Parameters, plDecl)
               TheList.Add ('    constructor ' + Name + CalcParameterList(Parameters, plDecl)
@@ -1376,7 +1376,7 @@ procedure TObjectDefs.Write(TheUnit : TStrings; StepIt : TLukStepItProc; StepItM
   end;
   end;
 
 
   procedure WriteObjectImplementation (Obj : TObjectItem);
   procedure WriteObjectImplementation (Obj : TObjectItem);
-  var gn, n, s, start, midden, eind, res : string;
+  var gn, n, s, start, midden, eind, res : AnsiString;
       r, l, p : integer;
       r, l, p : integer;
   begin
   begin
     with Obj, TheUnit do
     with Obj, TheUnit do
@@ -1545,7 +1545,7 @@ procedure TObjectDefs.Write(TheUnit : TStrings; StepIt : TLukStepItProc; StepItM
                    '  '+eind+'p ('+s+')'+CRLF+
                    '  '+eind+'p ('+s+')'+CRLF+
                    '  end;'+CRLF+
                    '  end;'+CRLF+
                    'end;'+CRLF);
                    'end;'+CRLF);
-              midden := ' (signal:string; proc:T'+ObjectsPrefix+Name+
+              midden := ' (signal:AnsiString; proc:T'+ObjectsPrefix+Name+
                                               'Function; data:pointer) : guint;'+CRLF+
                                               'Function; data:pointer) : guint;'+CRLF+
                    'begin'+CRLF+
                    'begin'+CRLF+
                    '  result := '+GtkPrefix+'_signal_connect';
                    '  result := '+GtkPrefix+'_signal_connect';

+ 4 - 4
packages/fpgtk/src/editor/buttonrow.pp

@@ -37,9 +37,9 @@ type
     FCalcIconFunc : TCalcIconFunc;
     FCalcIconFunc : TCalcIconFunc;
     FSelectIndex : integer;
     FSelectIndex : integer;
     FNeedFocus : boolean;
     FNeedFocus : boolean;
-    FTitle : string;
+    FTitle : AnsiString;
     AccelGroup : PGtkAccelGroup;
     AccelGroup : PGtkAccelGroup;
-    procedure SetTitle (Value : string);
+    procedure SetTitle (Value : AnsiString);
     procedure CreatePixmaps;
     procedure CreatePixmaps;
     procedure NewSelection (Sender : TFPgtkObject; row,column:integer;
     procedure NewSelection (Sender : TFPgtkObject; row,column:integer;
                             event:PGdkEventButton; data : pointer);
                             event:PGdkEventButton; data : pointer);
@@ -65,7 +65,7 @@ type
     procedure ChangeCollection (ACollection : TCollection);
     procedure ChangeCollection (ACollection : TCollection);
     function CurrentItem : TCollectionItem;
     function CurrentItem : TCollectionItem;
     property SelectedRow : integer read FSelectIndex;
     property SelectedRow : integer read FSelectIndex;
-    property Title : string read FTitle write SetTitle;
+    property Title : AnsiString read FTitle write SetTitle;
 
 
   end;
   end;
 
 
@@ -79,7 +79,7 @@ var
 
 
 { TButtonRow }
 { TButtonRow }
 
 
-procedure TButtonRow.SetTitle (Value : string);
+procedure TButtonRow.SetTitle (Value : AnsiString);
 begin
 begin
   FTitle := Value + ': ';
   FTitle := Value + ': ';
 end;
 end;

+ 5 - 5
packages/fpgtk/src/editor/finddlgs.pp

@@ -21,19 +21,19 @@ uses gtk, FPgtk;
 type
 type
   TFindDialog = class (TFPgtkWindow)
   TFindDialog = class (TFPgtkWindow)
   private
   private
-    FSearchString : string;
+    FSearchString : AnsiString;
     EditSearch : TFPgtkEntry;
     EditSearch : TFPgtkEntry;
-    procedure SetSearchString (Value:string);
+    procedure SetSearchString (Value:AnsiString);
     procedure ChangeText (Sender:TFPgtkObject; data:pointer);
     procedure ChangeText (Sender:TFPgtkObject; data:pointer);
   public
   public
     constructor create (WindowType : TGtkWindowType); override;
     constructor create (WindowType : TGtkWindowType); override;
     procedure DoDialogInit (InitData : pointer); override;
     procedure DoDialogInit (InitData : pointer); override;
-    property SearchString : string read FSearchString write SetSearchString;
+    property SearchString : AnsiString read FSearchString write SetSearchString;
   end;
   end;
 
 
   PFindDialogData = ^TFindDialogData;
   PFindDialogData = ^TFindDialogData;
   TFindDialogData = record
   TFindDialogData = record
-    Text : string;
+    Text : AnsiString;
   end;
   end;
 
 
 implementation
 implementation
@@ -79,7 +79,7 @@ begin
   inherited;
   inherited;
 end;
 end;
 
 
-procedure TFindDialog.SetSearchString (Value : string);
+procedure TFindDialog.SetSearchString (Value : AnsiString);
 begin
 begin
   EditSearch.Text := Value;
   EditSearch.Text := Value;
 end;
 end;

+ 16 - 16
packages/fpgtk/src/editor/gtkeditor.pp

@@ -125,16 +125,16 @@ type
     procedure ParamDisplayChanged;
     procedure ParamDisplayChanged;
     procedure ComposeWindow;
     procedure ComposeWindow;
   { File and menu handling }
   { File and menu handling }
-    FFileName : string;
+    FFileName : AnsiString;
     HasAFile : boolean;
     HasAFile : boolean;
     FReopenList : TStrings;
     FReopenList : TStrings;
     MenuEditObject, MenuEditProperty, MenuEditParameter,
     MenuEditObject, MenuEditProperty, MenuEditParameter,
     MenuFileReopen : TFPgtkMenuItem;
     MenuFileReopen : TFPgtkMenuItem;
     AccelGroup : integer;
     AccelGroup : integer;
-    procedure NewFilename (NewName : string);
+    procedure NewFilename (NewName : AnsiString);
     procedure BuildReopenList;
     procedure BuildReopenList;
-    procedure DataRead (filename : string);
-    procedure DataWrite (filename : string);
+    procedure DataRead (filename : AnsiString);
+    procedure DataWrite (filename : AnsiString);
     procedure Generate;
     procedure Generate;
   { Menu signals }
   { Menu signals }
     procedure FileNew (Sender : TFPgtkObject; data : pointer);
     procedure FileNew (Sender : TFPgtkObject; data : pointer);
@@ -166,10 +166,10 @@ uses XPMs, GtkDefTexts, inifiles, ProgWin;
 Type
 Type
   TRightLabel = class (TFPgtkLabel)
   TRightLabel = class (TFPgtkLabel)
   public
   public
-    constructor create(aText : string);
+    constructor create(aText : AnsiString);
   end;
   end;
 
 
-constructor TRightLabel.Create (aText : string);
+constructor TRightLabel.Create (aText : AnsiString);
 begin
 begin
   inherited create (aText);
   inherited create (aText);
   XAlign := 1;
   XAlign := 1;
@@ -672,12 +672,12 @@ end;
 
 
 procedure TGtkEditorWindow.CreatePixmaps;
 procedure TGtkEditorWindow.CreatePixmaps;
 
 
-  procedure GdkPixmap (Data : array of string; var pm : PGdkPixmap; var bm : PGdkBitmap);
+  procedure GdkPixmap (Data : array of AnsiString; var pm : PGdkPixmap; var bm : PGdkBitmap);
   var ppdata : ppgchar;
   var ppdata : ppgchar;
   begin
   begin
     ppdata := ArrayToPPgchar(Data);
     ppdata := ArrayToPPgchar(Data);
     pm := gdk_pixmap_colormap_create_from_xpm_d (nil, Colormap, @bm, nil, ppdata);
     pm := gdk_pixmap_colormap_create_from_xpm_d (nil, Colormap, @bm, nil, ppdata);
-    freemem (ppdata, sizeof (pchar) * (high(data)-low(data)+1));
+    freemem (ppdata, sizeof (PAnsiChar) * (high(data)-low(data)+1));
   end;
   end;
 
 
 begin
 begin
@@ -721,7 +721,7 @@ end;
 
 
 procedure TGtkEditorWindow.RefreshProperty (Selected : TCollectionItem; NeedFocus:boolean);
 procedure TGtkEditorWindow.RefreshProperty (Selected : TCollectionItem; NeedFocus:boolean);
 var r : byte;
 var r : byte;
-    s : string;
+    s : AnsiString;
 begin
 begin
   RefreshingProperty := True;
   RefreshingProperty := True;
   try
   try
@@ -994,7 +994,7 @@ begin
 end;
 end;
 
 
 procedure TGtkEditorWindow.ChangedPCode (Sender:TFPgtkObject; data:pointer);
 procedure TGtkEditorWindow.ChangedPCode (Sender:TFPgtkObject; data:pointer);
-var s : string;
+var s : AnsiString;
 begin
 begin
   if RefreshingProperty then Exit;
   if RefreshingProperty then Exit;
   if assigned(ciProperty) then
   if assigned(ciProperty) then
@@ -1037,7 +1037,7 @@ begin
 end;
 end;
 
 
 procedure TGtkEditorWindow.ChangedPWCode (Sender:TFPgtkObject; data:pointer);
 procedure TGtkEditorWindow.ChangedPWCode (Sender:TFPgtkObject; data:pointer);
-var s : string;
+var s : AnsiString;
 begin
 begin
   if RefreshingProperty then Exit;
   if RefreshingProperty then Exit;
   if assigned(ciProperty) then
   if assigned(ciProperty) then
@@ -1129,7 +1129,7 @@ begin
     end;
     end;
 end;
 end;
 
 
-procedure TGtkEditorWindow.NewFilename (NewName : string);
+procedure TGtkEditorWindow.NewFilename (NewName : AnsiString);
 var r : integer;
 var r : integer;
 begin
 begin
   if NewName = '' then
   if NewName = '' then
@@ -1147,7 +1147,7 @@ begin
     end;
     end;
 end;
 end;
 
 
-procedure TGtkEditorWindow.DataWrite (filename : string);
+procedure TGtkEditorWindow.DataWrite (filename : AnsiString);
 var
 var
   BinStream : TMemoryStream;
   BinStream : TMemoryStream;
   StrStream : TFileStream;
   StrStream : TFileStream;
@@ -1188,10 +1188,10 @@ begin
   end;
   end;
 end;
 end;
 
 
-procedure TGtkEditorWindow.DataRead (filename : string);
+procedure TGtkEditorWindow.DataRead (filename : AnsiString);
 var FStream : TFileStream;
 var FStream : TFileStream;
     MStream : TMemoryStream;
     MStream : TMemoryStream;
-    s : string[6];
+    s : AnsiString[6];
     l : TStrings;
     l : TStrings;
 begin
 begin
   if fileExists (filename) then
   if fileExists (filename) then
@@ -1404,7 +1404,7 @@ const
 
 
 procedure TGtkEditorWindow.ReadSettings;
 procedure TGtkEditorWindow.ReadSettings;
 var c, r : integer;
 var c, r : integer;
-    s : string;
+    s : AnsiString;
 begin
 begin
   with FSettings do
   with FSettings do
   with TMemInifile.Create(ChangeFileExt(paramstr(0), '.ini')) do
   with TMemInifile.Create(ChangeFileExt(paramstr(0), '.ini')) do

+ 9 - 9
packages/fpgtk/src/editor/settingsrec.pp

@@ -30,7 +30,7 @@ type
   TSettingsRec = record
   TSettingsRec = record
     SaveOnClose : boolean;
     SaveOnClose : boolean;
     FileFormat : TFileFormat;
     FileFormat : TFileFormat;
-    Extension : string;
+    Extension : AnsiString;
     MRUCount : integer;
     MRUCount : integer;
     ShowProgress : boolean;
     ShowProgress : boolean;
   end;
   end;
@@ -51,10 +51,10 @@ type
     Constructor Create;
     Constructor Create;
   end;
   end;
 
 
-procedure Log (s : string); overload;
-procedure Log (fmt : string; params : array of const); overload;
-procedure Log (indent:integer; s:string);
-procedure Log (indent:integer; fmt:string; params:array of const);
+procedure Log (s : AnsiString); overload;
+procedure Log (fmt : AnsiString; params : array of const); overload;
+procedure Log (indent:integer; s:AnsiString);
+procedure Log (indent:integer; fmt:AnsiString; params:array of const);
 
 
 implementation
 implementation
 
 
@@ -178,24 +178,24 @@ begin
   inherited;
   inherited;
 end;
 end;
 
 
-procedure Log (s : string);
+procedure Log (s : AnsiString);
 begin
 begin
   {$ifdef UseLog}
   {$ifdef UseLog}
   writeln (s);
   writeln (s);
   {$endif}
   {$endif}
 end;
 end;
 
 
-procedure Log (fmt : string; params : array of const);
+procedure Log (fmt : AnsiString; params : array of const);
 begin
 begin
   Log (format (fmt, params));
   Log (format (fmt, params));
 end;
 end;
 
 
-procedure Log (indent:integer; fmt:string; params:array of const);
+procedure Log (indent:integer; fmt:AnsiString; params:array of const);
 begin
 begin
   Log (stringofchar(' ',indent) + format(fmt, params));
   Log (stringofchar(' ',indent) + format(fmt, params));
 end;
 end;
 
 
-procedure Log (indent:integer; s:string);
+procedure Log (indent:integer; s:AnsiString);
 begin
 begin
   Log (stringofchar(' ',indent) + s);
   Log (stringofchar(' ',indent) + s);
 end;
 end;

+ 23 - 23
packages/fpgtk/src/editor/xpms.pp

@@ -19,7 +19,7 @@ interface
 
 
 const
 const
 
 
-  XPMFileNew : array [0..16] of string = (
+  XPMFileNew : array [0..16] of AnsiString = (
       '11 13 3 1',
       '11 13 3 1',
       '. c None',
       '. c None',
       'x c #000000',  // black
       'x c #000000',  // black
@@ -38,7 +38,7 @@ const
       'xooooooooox',
       'xooooooooox',
       'xxxxxxxxxxx');
       'xxxxxxxxxxx');
 
 
-  XPMFileOpen : array [0..17] of string = (
+  XPMFileOpen : array [0..17] of AnsiString = (
       '16 13 4 1',
       '16 13 4 1',
       '. c None',     // no color
       '. c None',     // no color
       '# c #000000',  // black
       '# c #000000',  // black
@@ -58,7 +58,7 @@ const
       '##ggggggggg#....',
       '##ggggggggg#....',
       '###########.....');
       '###########.....');
 
 
-  XPMFileSave : array [0..17] of string = (
+  XPMFileSave : array [0..17] of AnsiString = (
       '14 14 4 1',
       '14 14 4 1',
       '. c None',     // no color
       '. c None',     // no color
       '# c #000000',  // black
       '# c #000000',  // black
@@ -78,7 +78,7 @@ const
       '#gg#######*#g#',
       '#gg#######*#g#',
       '.#############');
       '.#############');
 
 
-  XPMEditAdd : array [0..16] of string = (
+  XPMEditAdd : array [0..16] of AnsiString = (
           '15 13 3 1',
           '15 13 3 1',
           '. c None',      // None
           '. c None',      // None
           'o c #000000',   // Black
           'o c #000000',   // Black
@@ -97,7 +97,7 @@ const
           '...............',
           '...............',
           '...............');
           '...............');
 
 
-  XPMEditCopy : array [0..17] of string = (
+  XPMEditCopy : array [0..17] of AnsiString = (
           '15 13 4 1',
           '15 13 4 1',
           '. c None',      // None
           '. c None',      // None
           '# c #000000',   // Black
           '# c #000000',   // Black
@@ -117,7 +117,7 @@ const
           '......o-------o',
           '......o-------o',
           '......ooooooooo');
           '......ooooooooo');
 
 
-  XPMEditDelete : array [0..17] of string = (
+  XPMEditDelete : array [0..17] of AnsiString = (
           '14 13 4 1',
           '14 13 4 1',
           '. c None',      // None
           '. c None',      // None
           '# c #000000',   // Black
           '# c #000000',   // Black
@@ -137,7 +137,7 @@ const
           '..r-..........',
           '..r-..........',
           '............r-');
           '............r-');
 
 
-  XPMEditUp : array [0..15] of string = (
+  XPMEditUp : array [0..15] of AnsiString = (
           '7 13 2 1',
           '7 13 2 1',
           '. c None',
           '. c None',
           'x c #000000',
           'x c #000000',
@@ -154,7 +154,7 @@ const
           '..xxx..',
           '..xxx..',
           '..xxx..',
           '..xxx..',
           '..xxx..');
           '..xxx..');
-  XPMEditDown : array [0..15] of string = (
+  XPMEditDown : array [0..15] of AnsiString = (
           '7 13 2 1',
           '7 13 2 1',
           '. c None',
           '. c None',
           'x c #000000',
           'x c #000000',
@@ -172,7 +172,7 @@ const
           '...x...',
           '...x...',
           '...x...');
           '...x...');
 
 
-  XPMGenerate : array [0..24] of string = (
+  XPMGenerate : array [0..24] of AnsiString = (
           '15 17 7 1',
           '15 17 7 1',
           '. c None',      // None
           '. c None',      // None
           '# c #000000',   // Black
           '# c #000000',   // Black
@@ -199,7 +199,7 @@ const
           'x-------------#',
           'x-------------#',
           '.#############.');
           '.#############.');
 
 
-  XPMPropField : array [0..18] of string = (
+  XPMPropField : array [0..18] of AnsiString = (
       '15 15 3 1',
       '15 15 3 1',
       '. c None',     // no color
       '. c None',     // no color
       '* c #000000',  // black
       '* c #000000',  // black
@@ -220,7 +220,7 @@ const
       '...............',
       '...............',
       '...............');
       '...............');
 
 
-  XPMPropProperty : array [0..18] of string = (
+  XPMPropProperty : array [0..18] of AnsiString = (
       '15 15 3 1',
       '15 15 3 1',
       '. c None',     // no color
       '. c None',     // no color
       '* c #000000',  // black
       '* c #000000',  // black
@@ -241,7 +241,7 @@ const
       '.+++++++++++++.',
       '.+++++++++++++.',
       '...............');
       '...............');
 
 
-  XPMPropFunction : array [0..18] of string = (
+  XPMPropFunction : array [0..18] of AnsiString = (
       '15 15 3 1',
       '15 15 3 1',
       '. c None',     // no color
       '. c None',     // no color
       '* c #000000',  // black
       '* c #000000',  // black
@@ -262,7 +262,7 @@ const
       '...............',
       '...............',
       '...............');
       '...............');
 
 
-  XPMPropProcedure : array [0..18] of string = (
+  XPMPropProcedure : array [0..18] of AnsiString = (
       '15 15 3 1',
       '15 15 3 1',
       '. c None',     // no color
       '. c None',     // no color
       '* c #000000',  // black
       '* c #000000',  // black
@@ -283,7 +283,7 @@ const
       '...............',
       '...............',
       '...............');
       '...............');
 
 
-  XPMPropHelperProc : array [0..18] of string = (
+  XPMPropHelperProc : array [0..18] of AnsiString = (
       '15 15 3 1',
       '15 15 3 1',
       '. c None',     // no color
       '. c None',     // no color
       '* c #000000',  // black
       '* c #000000',  // black
@@ -304,7 +304,7 @@ const
       '...............',
       '...............',
       '...............');
       '...............');
 
 
-  XPMPropHelperFunc : array [0..18] of string = (
+  XPMPropHelperFunc : array [0..18] of AnsiString = (
       '15 15 3 1',
       '15 15 3 1',
       '. c None',     // no color
       '. c None',     // no color
       '* c #000000',  // black
       '* c #000000',  // black
@@ -325,7 +325,7 @@ const
       '...............',
       '...............',
       '...............');
       '...............');
 
 
-  XPMPropSignalType : array [0..18] of string = (
+  XPMPropSignalType : array [0..18] of AnsiString = (
       '15 15 3 1',
       '15 15 3 1',
       '. c None',     // no color
       '. c None',     // no color
       '* c #000000',  // black
       '* c #000000',  // black
@@ -346,7 +346,7 @@ const
       '+++.........+++',
       '+++.........+++',
       '...............');
       '...............');
 
 
-  XPMPropSignal : array [0..18] of string = (
+  XPMPropSignal : array [0..18] of AnsiString = (
       '15 15 3 1',
       '15 15 3 1',
       '. c None',     // no color
       '. c None',     // no color
       '* c #000000',  // black
       '* c #000000',  // black
@@ -367,7 +367,7 @@ const
       '+++.........+++',
       '+++.........+++',
       '...............');
       '...............');
 
 
-  XPMPropdeclar : array [0..18] of string = (
+  XPMPropdeclar : array [0..18] of AnsiString = (
       '15 15 3 1',
       '15 15 3 1',
       '. c None',     // no color
       '. c None',     // no color
       '* c #FFFFFF',  // white
       '* c #FFFFFF',  // white
@@ -388,7 +388,7 @@ const
       '......+++**....',
       '......+++**....',
       '.......+**.....');
       '.......+**.....');
 
 
-  XPMPropTypeDecl : array [0..18] of string = (
+  XPMPropTypeDecl : array [0..18] of AnsiString = (
       '15 15 3 1',
       '15 15 3 1',
       '. c None',     // no color
       '. c None',     // no color
       '* c #FFFFFF',  // white
       '* c #FFFFFF',  // white
@@ -409,7 +409,7 @@ const
       '......+++**....',
       '......+++**....',
       '.......+**.....');
       '.......+**.....');
 
 
-  XPMPropConstr : array [0..18] of string = (
+  XPMPropConstr : array [0..18] of AnsiString = (
       '15 15 3 1',
       '15 15 3 1',
       '. c None',     // no color
       '. c None',     // no color
       '* c #000000',  // black
       '* c #000000',  // black
@@ -430,7 +430,7 @@ const
       '...............',
       '...............',
       '...............');
       '...............');
 
 
-  XPMPropDestr : array [0..19] of string = (
+  XPMPropDestr : array [0..19] of AnsiString = (
       '15 15 4 1',
       '15 15 4 1',
       '. c None',     // no color
       '. c None',     // no color
       '* c #000000',  // black
       '* c #000000',  // black
@@ -452,7 +452,7 @@ const
       '-..............',
       '-..............',
       '...............');
       '...............');
 
 
-  XPMPropInitial : array [0..18] of string = (
+  XPMPropInitial : array [0..18] of AnsiString = (
       '15 15 3 1',
       '15 15 3 1',
       '. c None',     // no color
       '. c None',     // no color
       '* c #000000',  // black
       '* c #000000',  // black
@@ -473,7 +473,7 @@ const
       '+*.............',
       '+*.............',
       '+*.............');
       '+*.............');
 
 
-  XPMPropFinal : array [0..18] of string = (
+  XPMPropFinal : array [0..18] of AnsiString = (
       '15 15 3 1',
       '15 15 3 1',
       '. c None',     // no color
       '. c None',     // no color
       '* c #000000',  // black
       '* c #000000',  // black

File diff suppressed because it is too large
+ 217 - 213
packages/fpgtk/src/fpgtk.pp


+ 65 - 65
packages/fpgtk/src/fpgtkext.pp

@@ -52,14 +52,14 @@ type
     procedure OpenFileSelection (Sender : TFPgtkObject; data : pointer);
     procedure OpenFileSelection (Sender : TFPgtkObject; data : pointer);
     procedure CloseFileSelection (Sender:TFPgtkWindow; DialogResult:pointer;
     procedure CloseFileSelection (Sender:TFPgtkWindow; DialogResult:pointer;
                                     Action:integer; initiator:TFPgtkObject);
                                     Action:integer; initiator:TFPgtkObject);
-    procedure SetFilename (Value : string);
-    function GetFilename : string;
+    procedure SetFilename (Value : ansistring);
+    function GetFilename : ansistring;
   public
   public
     constructor create;
     constructor create;
     property Edit : TFPgtkEntry read FEdit;
     property Edit : TFPgtkEntry read FEdit;
     property Button : TFPgtkButton read FButton;
     property Button : TFPgtkButton read FButton;
     property Image : TFPgtkPixmap read FImage;
     property Image : TFPgtkPixmap read FImage;
-    property Filename : string read GetFilename write SetFilename;
+    property Filename : ansistring read GetFilename write SetFilename;
   end;
   end;
 
 
   TFPgtkCheckedButton = class (TFPgtkToggleButton)
   TFPgtkCheckedButton = class (TFPgtkToggleButton)
@@ -68,8 +68,8 @@ type
     procedure ChangeCheck (Sender:TFPgtkObject; data:pointer);
     procedure ChangeCheck (Sender:TFPgtkObject; data:pointer);
   public
   public
     constructor Create;
     constructor Create;
-    constructor CreateWithLabel (aText:string);
-    constructor CreateWithLabel (aText:string; AccelGroup : PGtkAccelGroup);
+    constructor CreateWithLabel (aText:ansistring);
+    constructor CreateWithLabel (aText:ansistring; AccelGroup : PGtkAccelGroup);
   end;
   end;
 
 
 { ==== Widget who needs a scrollwindow ==== }
 { ==== Widget who needs a scrollwindow ==== }
@@ -79,20 +79,20 @@ type
   TFPgtkScrollText = class (TFPgtkScrolledWindow)
   TFPgtkScrollText = class (TFPgtkScrolledWindow)
   private
   private
     FText : TFPgtkText;
     FText : TFPgtkText;
-    procedure SetTooltip (Value : string);
-    function GetTooltip : string;
+    procedure SetTooltip (Value : ansistring);
+    function GetTooltip : ansistring;
     function GetUdpatePolicy : TGtkUpdateType;
     function GetUdpatePolicy : TGtkUpdateType;
     procedure SetUpdatePolicy (Value : TGtkUpdateType);
     procedure SetUpdatePolicy (Value : TGtkUpdateType);
-    function GetText : string;
-    procedure SetText (Value : string);
+    function GetText : ansistring;
+    procedure SetText (Value : ansistring);
     function GetLines : TStrings;
     function GetLines : TStrings;
   public
   public
     constructor create;
     constructor create;
     procedure Clear;
     procedure Clear;
     property TheText : TFPgtkText read FText;
     property TheText : TFPgtkText read FText;
-    property Tooltip : string read GetTooltip write SetTooltip;
+    property Tooltip : ansistring read GetTooltip write SetTooltip;
     property UpdatePolicy : TGtkUpdateType read GetUdpatePolicy write SetUpdatePolicy;
     property UpdatePolicy : TGtkUpdateType read GetUdpatePolicy write SetUpdatePolicy;
-    property Text : string read GetText write SetText;
+    property Text : ansistring read GetText write SetText;
     property Lines : TStrings read GetLines;
     property Lines : TStrings read GetLines;
   end;
   end;
 
 
@@ -148,14 +148,14 @@ const
   mrNoToAll = mrNone + 9;
   mrNoToAll = mrNone + 9;
   mrYesToAll = mrNone + 10;
   mrYesToAll = mrNone + 10;
 
 
-function MessageDlg(const aMsg: string; DlgType: TMsgDlgType;
+function MessageDlg(const aMsg: ansistring; DlgType: TMsgDlgType;
                     Buttons: TMsgDlgButtons; HelpCtx: Longint): Integer;
                     Buttons: TMsgDlgButtons; HelpCtx: Longint): Integer;
 
 
 
 
-function MessageDlg(const Fmt: string; Args : Array of const; DlgType: TMsgDlgType;
+function MessageDlg(const Fmt: ansistring; Args : Array of const; DlgType: TMsgDlgType;
                     Buttons: TMsgDlgButtons; HelpCtx: Longint): Integer;
                     Buttons: TMsgDlgButtons; HelpCtx: Longint): Integer;
 
 
-procedure ShowMessage (const aTitle, aMessage : string);
+procedure ShowMessage (const aTitle, aMessage : ansistring);
 
 
 { ==== Menu handling ==== }
 { ==== Menu handling ==== }
 
 
@@ -177,7 +177,7 @@ const
   gdk_Alt_mask = gdk_mod1_Mask;
   gdk_Alt_mask = gdk_mod1_Mask;
   DefaultAccelFlags : TGtkAccelFlags = GTK_ACCEL_VISIBLE;
   DefaultAccelFlags : TGtkAccelFlags = GTK_ACCEL_VISIBLE;
 
 
-function RemoveUnderscore (s : string) : string;
+function RemoveUnderscore (s : ansistring) : ansistring;
 function ConvertAccelModifier (amSet : TAccelModifiersSet) : TGdkModifierType;
 function ConvertAccelModifier (amSet : TAccelModifiersSet) : TGdkModifierType;
 function ConvertModifierType (Mods : TGdkModifierType) : TAccelModifiersSet;
 function ConvertModifierType (Mods : TGdkModifierType) : TAccelModifiersSet;
 function MakeAccelKeyDef (aWindow : TFPgtkWindow; anAG : integer; aKey : guint; aMods : TGdkModifierType) : PAccelKeyDef; overload;
 function MakeAccelKeyDef (aWindow : TFPgtkWindow; anAG : integer; aKey : guint; aMods : TGdkModifierType) : PAccelKeyDef; overload;
@@ -186,35 +186,35 @@ function MakeAccelKeyDef (anAG : PGtkAccelGroup; aKey : guint; aMods : TGdkModif
 function MakeAccelKeyDef (anAG : PGtkAccelGroup; aKey : guint; aMods : TAccelModifiersSet) : PAccelKeyDef; overload;
 function MakeAccelKeyDef (anAG : PGtkAccelGroup; aKey : guint; aMods : TAccelModifiersSet) : PAccelKeyDef; overload;
 
 
 function NewMenuBar (items : array of TFPgtkMenuItem) : TFPgtkMenuBar;
 function NewMenuBar (items : array of TFPgtkMenuItem) : TFPgtkMenuBar;
-function NewMenu (ATitle : string; items : array of TFPgtkMenuItem) : TFPgtkMenu;
+function NewMenu (ATitle : ansistring; items : array of TFPgtkMenuItem) : TFPgtkMenu;
 
 
-function NewMenuItem (ACaption, AToolTip, AprivText : string; Accelerator : PAccelKeyDef;
+function NewMenuItem (ACaption, AToolTip, AprivText : ansistring; Accelerator : PAccelKeyDef;
                       ActivateFunc : TFPgtkSignalFunction; AData : pointer) : TFPgtkMenuItem; overload;
                       ActivateFunc : TFPgtkSignalFunction; AData : pointer) : TFPgtkMenuItem; overload;
-function NewMenuItem (ACaption, AToolTip, AprivText : string;
+function NewMenuItem (ACaption, AToolTip, AprivText : ansistring;
                       ActivateFunc : TFPgtkSignalFunction; AData : pointer) : TFPgtkMenuItem; overload;
                       ActivateFunc : TFPgtkSignalFunction; AData : pointer) : TFPgtkMenuItem; overload;
-function NewMenuItem (ACaption : string; Accelerator : PAccelKeyDef;
+function NewMenuItem (ACaption : ansistring; Accelerator : PAccelKeyDef;
                       ActivateFunc : TFPgtkSignalFunction; AData : pointer) : TFPgtkMenuItem; overload;
                       ActivateFunc : TFPgtkSignalFunction; AData : pointer) : TFPgtkMenuItem; overload;
-function NewMenuItem (ACaption : string; ActivateFunc : TFPgtkSignalFunction; AData : pointer) : TFPgtkMenuItem; overload;
-function NewMenuItem (ACaption : string) : TFPgtkMenuItem; overload;
+function NewMenuItem (ACaption : ansistring; ActivateFunc : TFPgtkSignalFunction; AData : pointer) : TFPgtkMenuItem; overload;
+function NewMenuItem (ACaption : ansistring) : TFPgtkMenuItem; overload;
 
 
 function NewLine : TFPgtkMenuItem;
 function NewLine : TFPgtkMenuItem;
 function NewTearOffMenu : TFPgtkTearOffMenuItem;
 function NewTearOffMenu : TFPgtkTearOffMenuItem;
 
 
-function NewSubMenu (ACaption, ATooltip, AprivText : string; Accelerator : PAccelKeyDef;
+function NewSubMenu (ACaption, ATooltip, AprivText : ansistring; Accelerator : PAccelKeyDef;
                      Items : array of TFPgtkMenuItem) : TFPgtkMenuItem; Overload;
                      Items : array of TFPgtkMenuItem) : TFPgtkMenuItem; Overload;
-function NewSubMenu (ACaption, ATooltip, AprivText : string;
+function NewSubMenu (ACaption, ATooltip, AprivText : ansistring;
                      Items : array of TFPgtkMenuItem) : TFPgtkMenuItem; Overload;
                      Items : array of TFPgtkMenuItem) : TFPgtkMenuItem; Overload;
-function NewSubMenu (ACaption : string; Accelerator : PAccelKeyDef;
+function NewSubMenu (ACaption : ansistring; Accelerator : PAccelKeyDef;
                      Items : array of TFPgtkMenuItem) : TFPgtkMenuItem; Overload;
                      Items : array of TFPgtkMenuItem) : TFPgtkMenuItem; Overload;
-function NewSubMenu (ACaption : string; Items : array of TFPgtkMenuItem) : TFPgtkMenuItem; Overload;
+function NewSubMenu (ACaption : ansistring; Items : array of TFPgtkMenuItem) : TFPgtkMenuItem; Overload;
 
 
-function NewCheckMenuItem (ACaption, AToolTip, AprivText : string; Accelerator : PAccelKeyDef;
+function NewCheckMenuItem (ACaption, AToolTip, AprivText : ansistring; Accelerator : PAccelKeyDef;
                       ToggledFunc : TFPgtkSignalFunction; AData : pointer) : TFPgtkCheckMenuItem; Overload;
                       ToggledFunc : TFPgtkSignalFunction; AData : pointer) : TFPgtkCheckMenuItem; Overload;
-function NewCheckMenuItem (ACaption, AToolTip, AprivText : string;
+function NewCheckMenuItem (ACaption, AToolTip, AprivText : ansistring;
                       ToggledFunc : TFPgtkSignalFunction; AData : pointer) : TFPgtkCheckMenuItem; Overload;
                       ToggledFunc : TFPgtkSignalFunction; AData : pointer) : TFPgtkCheckMenuItem; Overload;
-function NewCheckMenuItem (ACaption : string; Accelerator : PAccelKeyDef;
+function NewCheckMenuItem (ACaption : ansistring; Accelerator : PAccelKeyDef;
                       ToggledFunc : TFPgtkSignalFunction; AData : pointer) : TFPgtkCheckMenuItem; Overload;
                       ToggledFunc : TFPgtkSignalFunction; AData : pointer) : TFPgtkCheckMenuItem; Overload;
-function NewCheckMenuItem (ACaption : string; ToggledFunc : TFPgtkSignalFunction; AData : pointer) : TFPgtkCheckMenuItem; Overload;
+function NewCheckMenuItem (ACaption : ansistring; ToggledFunc : TFPgtkSignalFunction; AData : pointer) : TFPgtkCheckMenuItem; Overload;
 
 
 procedure InsertMenuItemGroup (InMenu : TFPgtkMenuShell; position : integer; MenuItems : TFPgtkItemGroup); Overload;
 procedure InsertMenuItemGroup (InMenu : TFPgtkMenuShell; position : integer; MenuItems : TFPgtkItemGroup); Overload;
 procedure InsertMenuItemGroup (InMenu : TFPgtkMenuShell; position : integer;
 procedure InsertMenuItemGroup (InMenu : TFPgtkMenuShell; position : integer;
@@ -296,12 +296,12 @@ begin
   HPolicy := Gtk_Policy_Never;
   HPolicy := Gtk_Policy_Never;
 end;
 end;
 
 
-function TFPgtkScrollText.GetTooltip : string;
+function TFPgtkScrollText.GetTooltip : ansistring;
 begin
 begin
   result := inherited Tooltip;
   result := inherited Tooltip;
 end;
 end;
 
 
-procedure TFPgtkScrollText.SetTooltip (Value : string);
+procedure TFPgtkScrollText.SetTooltip (Value : ansistring);
 begin
 begin
   TheText.Tooltip := Value;
   TheText.Tooltip := Value;
   inherited Tooltip := Value;
   inherited Tooltip := Value;
@@ -326,7 +326,7 @@ begin
   {$endif}
   {$endif}
 end;
 end;
 
 
-function TFPgtkScrollText.GetText : string;
+function TFPgtkScrollText.GetText : ansistring;
 begin
 begin
   if assigned(TheText) then
   if assigned(TheText) then
     begin
     begin
@@ -338,7 +338,7 @@ begin
     end;
     end;
 end;
 end;
 
 
-procedure TFPgtkScrollText.SetText (Value : string);
+procedure TFPgtkScrollText.SetText (Value : ansistring);
 begin
 begin
   if assigned (TheText) then
   if assigned (TheText) then
     TheText.Text := Value;
     TheText.Text := Value;
@@ -384,7 +384,7 @@ end;
 
 
 { Menu functions }
 { Menu functions }
 
 
-function RemoveUnderscore (s : string) : string;
+function RemoveUnderscore (s : ansistring) : ansistring;
 begin
 begin
   result := stringreplace (s, '_', '', [rfReplaceAll]);
   result := stringreplace (s, '_', '', [rfReplaceAll]);
 end;
 end;
@@ -463,7 +463,7 @@ begin
       append (items[r]);
       append (items[r]);
 end;
 end;
 
 
-function NewMenu (ATitle : string; items : array of TFPgtkMenuItem) : TFPgtkMenu;
+function NewMenu (ATitle : ansistring; items : array of TFPgtkMenuItem) : TFPgtkMenu;
 var r : integer;
 var r : integer;
     AG : PGtkAccelGroup;
     AG : PGtkAccelGroup;
     m : TFPgtkMenuItem;
     m : TFPgtkMenuItem;
@@ -484,7 +484,7 @@ begin
 end;
 end;
 
 
 function CreateMenuItem (Atype : TFPgtkMenuItemType; ACaption, ATooltip,
 function CreateMenuItem (Atype : TFPgtkMenuItemType; ACaption, ATooltip,
-                         APrivText : string; Accelerator : PAccelKeyDef) : TFPgtkMenuItem;
+                         APrivText : ansistring; Accelerator : PAccelKeyDef) : TFPgtkMenuItem;
 begin
 begin
   result := AType.CreateWithLabel (ACaption);
   result := AType.CreateWithLabel (ACaption);
   if (ATooltip <> '') or (APrivText <> '') then
   if (ATooltip <> '') or (APrivText <> '') then
@@ -497,7 +497,7 @@ begin
     end;
     end;
 end;
 end;
 
 
-function NewMenuItem (ACaption, AToolTip, AprivText : string; Accelerator : PAccelKeyDef;
+function NewMenuItem (ACaption, AToolTip, AprivText : ansistring; Accelerator : PAccelKeyDef;
                       ActivateFunc : TFPgtkSignalFunction; AData : pointer) : TFPgtkMenuItem;
                       ActivateFunc : TFPgtkSignalFunction; AData : pointer) : TFPgtkMenuItem;
 begin
 begin
   result := CreateMenuItem (TFPgtkMenuItem, ACaption, ATooltip, APrivtext, Accelerator);
   result := CreateMenuItem (TFPgtkMenuItem, ACaption, ATooltip, APrivtext, Accelerator);
@@ -505,24 +505,24 @@ begin
     result.ConnectActivate (ActivateFunc, AData);
     result.ConnectActivate (ActivateFunc, AData);
 end;
 end;
 
 
-function NewMenuItem (ACaption, AToolTip, AprivText : string;
+function NewMenuItem (ACaption, AToolTip, AprivText : ansistring;
                       ActivateFunc : TFPgtkSignalFunction; AData : pointer) : TFPgtkMenuItem;
                       ActivateFunc : TFPgtkSignalFunction; AData : pointer) : TFPgtkMenuItem;
 begin
 begin
   result := NewMenuItem (aCaption, aTooltip, aPrivText, nil, ActivateFunc, aData);
   result := NewMenuItem (aCaption, aTooltip, aPrivText, nil, ActivateFunc, aData);
 end;
 end;
 
 
-function NewMenuItem (ACaption : string; Accelerator : PAccelKeyDef;
+function NewMenuItem (ACaption : ansistring; Accelerator : PAccelKeyDef;
                       ActivateFunc : TFPgtkSignalFunction; AData : pointer) : TFPgtkMenuItem;
                       ActivateFunc : TFPgtkSignalFunction; AData : pointer) : TFPgtkMenuItem;
 begin
 begin
   result := NewMenuItem (aCaption, '', '', Accelerator, ActivateFunc, aData);
   result := NewMenuItem (aCaption, '', '', Accelerator, ActivateFunc, aData);
 end;
 end;
 
 
-function NewMenuItem (ACaption : string; ActivateFunc : TFPgtkSignalFunction; AData : pointer) : TFPgtkMenuItem;
+function NewMenuItem (ACaption : ansistring; ActivateFunc : TFPgtkSignalFunction; AData : pointer) : TFPgtkMenuItem;
 begin
 begin
   result := NewMenuItem (aCaption, '', '', nil, ActivateFunc, aData);
   result := NewMenuItem (aCaption, '', '', nil, ActivateFunc, aData);
 end;
 end;
 
 
-function NewMenuItem (ACaption : string) : TFPgtkMenuItem;
+function NewMenuItem (ACaption : ansistring) : TFPgtkMenuItem;
 begin
 begin
   result := NewMenuItem (aCaption, '', '', nil, nil, nil);
   result := NewMenuItem (aCaption, '', '', nil, nil, nil);
 end;
 end;
@@ -537,31 +537,31 @@ begin
   result := TFPgtkTearOffMenuItem.create;
   result := TFPgtkTearOffMenuItem.create;
 end;
 end;
 
 
-function NewSubMenu (ACaption, ATooltip, AprivText : string; Accelerator : PAccelKeyDef;
+function NewSubMenu (ACaption, ATooltip, AprivText : ansistring; Accelerator : PAccelKeyDef;
                      Items : array of TFPgtkMenuItem) : TFPgtkMenuItem;
                      Items : array of TFPgtkMenuItem) : TFPgtkMenuItem;
 begin
 begin
   result := CreateMenuItem (TFPgtkMenuItem, ACaption, ATooltip, APrivText, Accelerator);
   result := CreateMenuItem (TFPgtkMenuItem, ACaption, ATooltip, APrivText, Accelerator);
   result.SetSubmenu (NewMenu ('', Items));
   result.SetSubmenu (NewMenu ('', Items));
 end;
 end;
 
 
-function NewSubMenu (ACaption, ATooltip, AprivText : string;
+function NewSubMenu (ACaption, ATooltip, AprivText : ansistring;
                      Items : array of TFPgtkMenuItem) : TFPgtkMenuItem;
                      Items : array of TFPgtkMenuItem) : TFPgtkMenuItem;
 begin
 begin
   result := NewSubMenu (aCaption, aTooltip, aPrivText, nil, Items);
   result := NewSubMenu (aCaption, aTooltip, aPrivText, nil, Items);
 end;
 end;
 
 
-function NewSubMenu (ACaption : string; Accelerator : PAccelKeyDef;
+function NewSubMenu (ACaption : ansistring; Accelerator : PAccelKeyDef;
                      Items : array of TFPgtkMenuItem) : TFPgtkMenuItem;
                      Items : array of TFPgtkMenuItem) : TFPgtkMenuItem;
 begin
 begin
   result := NewSubMenu (aCaption, '', '', Accelerator, Items);
   result := NewSubMenu (aCaption, '', '', Accelerator, Items);
 end;
 end;
 
 
-function NewSubMenu (ACaption : string; Items : array of TFPgtkMenuItem) : TFPgtkMenuItem;
+function NewSubMenu (ACaption : ansistring; Items : array of TFPgtkMenuItem) : TFPgtkMenuItem;
 begin
 begin
   result := NewSubMenu (aCaption, '', '', nil, Items);
   result := NewSubMenu (aCaption, '', '', nil, Items);
 end;
 end;
 
 
-function NewCheckMenuItem (ACaption, AToolTip, AprivText : string; Accelerator : PAccelKeyDef;
+function NewCheckMenuItem (ACaption, AToolTip, AprivText : ansistring; Accelerator : PAccelKeyDef;
                       ToggledFunc : TFPgtkSignalFunction; AData : pointer) : TFPgtkCheckMenuItem;
                       ToggledFunc : TFPgtkSignalFunction; AData : pointer) : TFPgtkCheckMenuItem;
 begin
 begin
   result := TFPgtkCheckMenuItem(CreateMenuItem (TFPgtkCheckMenuItem, ACaption, ATooltip, APrivText, Accelerator));
   result := TFPgtkCheckMenuItem(CreateMenuItem (TFPgtkCheckMenuItem, ACaption, ATooltip, APrivText, Accelerator));
@@ -569,19 +569,19 @@ begin
     Result.ConnectToggled (ToggledFunc, AData);
     Result.ConnectToggled (ToggledFunc, AData);
 end;
 end;
 
 
-function NewCheckMenuItem (ACaption, AToolTip, AprivText : string;
+function NewCheckMenuItem (ACaption, AToolTip, AprivText : ansistring;
                       ToggledFunc : TFPgtkSignalFunction; AData : pointer) : TFPgtkCheckMenuItem;
                       ToggledFunc : TFPgtkSignalFunction; AData : pointer) : TFPgtkCheckMenuItem;
 begin
 begin
   result := NewCheckMenuItem (aCaption, aToolTip, aPrivText, nil, ToggledFunc, AData);
   result := NewCheckMenuItem (aCaption, aToolTip, aPrivText, nil, ToggledFunc, AData);
 end;
 end;
 
 
-function NewCheckMenuItem (ACaption : string; Accelerator : PAccelKeyDef;
+function NewCheckMenuItem (ACaption : ansistring; Accelerator : PAccelKeyDef;
                       ToggledFunc : TFPgtkSignalFunction; AData : pointer) : TFPgtkCheckMenuItem;
                       ToggledFunc : TFPgtkSignalFunction; AData : pointer) : TFPgtkCheckMenuItem;
 begin
 begin
   result := NewCheckMenuItem (aCaption, '', '', Accelerator, ToggledFunc, AData);
   result := NewCheckMenuItem (aCaption, '', '', Accelerator, ToggledFunc, AData);
 end;
 end;
 
 
-function NewCheckMenuItem (ACaption : string; ToggledFunc : TFPgtkSignalFunction; AData : pointer) : TFPgtkCheckMenuItem;
+function NewCheckMenuItem (ACaption : ansistring; ToggledFunc : TFPgtkSignalFunction; AData : pointer) : TFPgtkCheckMenuItem;
 begin
 begin
   result := NewCheckMenuItem (aCaption, '', '', nil, ToggledFunc, AData);
   result := NewCheckMenuItem (aCaption, '', '', nil, ToggledFunc, AData);
 end;
 end;
@@ -672,7 +672,7 @@ type
 
 
   PFileEntryData = ^TFileEntryData;
   PFileEntryData = ^TFileEntryData;
   TFileEntryData = record
   TFileEntryData = record
-    aFilename : string;
+    aFilename : ansistring;
   end;
   end;
 
 
 constructor TFileEntryDialog.Create (AType:TGtkWindowType);
 constructor TFileEntryDialog.Create (AType:TGtkWindowType);
@@ -738,12 +738,12 @@ begin
   PackStart (FButton, false, true, 0);
   PackStart (FButton, false, true, 0);
 end;
 end;
 
 
-procedure TFPgtkFileEntry.SetFilename (Value : string);
+procedure TFPgtkFileEntry.SetFilename (Value : ansistring);
 begin
 begin
   FEdit.Text := Value;
   FEdit.Text := Value;
 end;
 end;
 
 
-function TFPgtkFileEntry.GetFilename : string;
+function TFPgtkFileEntry.GetFilename : ansistring;
 begin
 begin
   result := FEdit.Text;
   result := FEdit.Text;
 end;
 end;
@@ -818,13 +818,13 @@ begin
   FUnchecked.visible := not b;
   FUnchecked.visible := not b;
 end;
 end;
 
 
-constructor TFPgtkCheckedButton.CreateWithLabel (aText:string);
+constructor TFPgtkCheckedButton.CreateWithLabel (aText:ansistring);
 begin
 begin
   create;
   create;
   Text := aText;
   Text := aText;
 end;
 end;
 
 
-constructor TFPgtkCheckedButton.CreateWithLabel (aText:string; AccelGroup : PGtkAccelGroup);
+constructor TFPgtkCheckedButton.CreateWithLabel (aText:ansistring; AccelGroup : PGtkAccelGroup);
 begin
 begin
   create;
   create;
   Text := aText;
   Text := aText;
@@ -870,7 +870,7 @@ end;
 resourcestring
 resourcestring
   rsOk = '   Ok   ';
   rsOk = '   Ok   ';
 
 
-function MessageWindow (aTitle, aMessage : string) : TFPgtkWindow;
+function MessageWindow (aTitle, aMessage : ansistring) : TFPgtkWindow;
 var b : TFPgtkBox;
 var b : TFPgtkBox;
     but : TFPgtkButton;
     but : TFPgtkButton;
     l : TFPgtkLabel;
     l : TFPgtkLabel;
@@ -905,7 +905,7 @@ begin
   result.Add (b);
   result.Add (b);
 end;
 end;
 
 
-procedure ShowMessage (const aTitle, aMessage : string);
+procedure ShowMessage (const aTitle, aMessage : ansistring);
 begin
 begin
   with MessageWindow (aTitle, aMessage) do
   with MessageWindow (aTitle, aMessage) do
     Execute (nil, nil, nil);
     Execute (nil, nil, nil);
@@ -920,13 +920,13 @@ type
     FLTable : TFPgtkTable;
     FLTable : TFPgtkTable;
     FVBox : TFPgtkVBox;
     FVBox : TFPgtkVBox;
     FButtonBox: TFPgtkButtonBox;
     FButtonBox: TFPgtkButtonBox;
-    Constructor Create(AMsg:String; DlgType:TMsgDlgType; Buttons: TMsgDlgButtons);
+    Constructor Create(AMsg:ansistring; DlgType:TMsgDlgType; Buttons: TMsgDlgButtons);
     Procedure CreateButtons(Buttons: TMsgDlgButtons);
     Procedure CreateButtons(Buttons: TMsgDlgButtons);
   end;
   end;
 
 
 const
 const
 
 
-IMGInfo : Array[1..37] of string = ('32 32 4 1',
+IMGInfo : Array[1..37] of ansistring = ('32 32 4 1',
   '. c None',
   '. c None',
   '  c None',
   '  c None',
   'a c #ffffff', //#c3c3c3',
   'a c #ffffff', //#c3c3c3',
@@ -964,7 +964,7 @@ IMGInfo : Array[1..37] of string = ('32 32 4 1',
   '............#######.............',
   '............#######.............',
   '................................');
   '................................');
 
 
-IMGWarning :Array[1..37] of string = ('32 32 4 1',
+IMGWarning :Array[1..37] of ansistring = ('32 32 4 1',
   '# c #000000',
   '# c #000000',
   'b c #9c999c',
   'b c #9c999c',
   '. c None',
   '. c None',
@@ -1002,7 +1002,7 @@ IMGWarning :Array[1..37] of string = ('32 32 4 1',
   '....bbbbbbbbbbbbbbbbbbbbbbbbbbb.',
   '....bbbbbbbbbbbbbbbbbbbbbbbbbbb.',
   '.....bbbbbbbbbbbbbbbbbbbbbbbbb..');
   '.....bbbbbbbbbbbbbbbbbbbbbbbbb..');
 
 
-IMGError : Array[1..37] of string = ('32 32 4 1',
+IMGError : Array[1..37] of ansistring = ('32 32 4 1',
   '. c None',
   '. c None',
   'b c #808080',
   'b c #808080',
   '# c #c00000',
   '# c #c00000',
@@ -1040,7 +1040,7 @@ IMGError : Array[1..37] of string = ('32 32 4 1',
   '................................',
   '................................',
   '................................');
   '................................');
 
 
-IMGConfirmation : Array[1..37] of string = ('32 32 4 1',
+IMGConfirmation : Array[1..37] of ansistring = ('32 32 4 1',
   '. c None',
   '. c None',
   'b c #808080',
   'b c #808080',
   'a c #c00000',
   'a c #c00000',
@@ -1079,7 +1079,7 @@ IMGConfirmation : Array[1..37] of string = ('32 32 4 1',
   '................................');
   '................................');
 
 
 
 
-Constructor TMessageDialogWindow.Create(AMsg : String;DlgType:TMsgDlgType;Buttons: TMsgDlgButtons);
+Constructor TMessageDialogWindow.Create(AMsg : ansistring;DlgType:TMsgDlgType;Buttons: TMsgDlgButtons);
 const
 const
   OH = GTK_FILL OR GTK_EXPAND;
   OH = GTK_FILL OR GTK_EXPAND;
 begin
 begin
@@ -1115,7 +1115,7 @@ begin
 end;
 end;
 
 
 Const
 Const
-  ButtonText : Array[TMsgDlgBtn] of string  =
+  ButtonText : Array[TMsgDlgBtn] of ansistring  =
        ('Yes', 'No', 'OK', 'Cancel','Abort', 'Retry', 'Ignore',
        ('Yes', 'No', 'OK', 'Cancel','Abort', 'Retry', 'Ignore',
         'All', 'NoToAll', 'YesToAll', 'Help');
         'All', 'NoToAll', 'YesToAll', 'Help');
   ButtonResult : array [TMsgDlgbtn] of TModalResult =
   ButtonResult : array [TMsgDlgbtn] of TModalResult =
@@ -1137,14 +1137,14 @@ begin
       end;
       end;
 end;
 end;
 
 
-function MessageDlg(const aMsg: string; DlgType: TMsgDlgType;
+function MessageDlg(const aMsg: ansistring; DlgType: TMsgDlgType;
                     Buttons: TMsgDlgButtons; HelpCtx: Longint): Integer;
                     Buttons: TMsgDlgButtons; HelpCtx: Longint): Integer;
 begin
 begin
   With TMessageDialogWindow.Create(AMsg,DlgType,Buttons) do
   With TMessageDialogWindow.Create(AMsg,DlgType,Buttons) do
     Result:=Execute(Nil,Nil,Nil);
     Result:=Execute(Nil,Nil,Nil);
 end;
 end;
 
 
-function MessageDlg(const Fmt: string; Args : Array of const; DlgType: TMsgDlgType;
+function MessageDlg(const Fmt: ansistring; Args : Array of const; DlgType: TMsgDlgType;
                     Buttons: TMsgDlgButtons; HelpCtx: Longint): Integer;
                     Buttons: TMsgDlgButtons; HelpCtx: Longint): Integer;
 begin
 begin
   Result:=MessageDlg(Format(Fmt,Args),Dlgtype,Buttons,HelpCtx);
   Result:=MessageDlg(Format(Fmt,Args),Dlgtype,Buttons,HelpCtx);

+ 2 - 2
packages/fpgtk/src/pgtk/pgtk.pp

@@ -5,7 +5,7 @@ Uses sysutils, ObjectDef, classes;
 type
 type
   PGtkexception = class (Exception);
   PGtkexception = class (Exception);
 
 
-procedure DataRead (Filename:string; var Descr:TObjectDefs);
+procedure DataRead (Filename:AnsiString; var Descr:TObjectDefs);
 var StrStream : TFileStream;
 var StrStream : TFileStream;
     BinStream : TMemoryStream;
     BinStream : TMemoryStream;
 begin
 begin
@@ -30,7 +30,7 @@ begin
     raise PGtkException.Create ('Error: Can''t find file "'+filename+'"');
     raise PGtkException.Create ('Error: Can''t find file "'+filename+'"');
 end;
 end;
 
 
-procedure Convert (DescrFilename, UnitFilename : string);
+procedure Convert (DescrFilename, UnitFilename : AnsiString);
 var GTK : TObjectDefs;
 var GTK : TObjectDefs;
     l : TStrings;
     l : TStrings;
 begin
 begin

Some files were not shown because too many files changed in this diff