Browse Source

+ Initial implementation

michael 23 years ago
parent
commit
88b1b352d1

+ 1786 - 0
packages/extra/fpgtk/def/objectdef.pp

@@ -0,0 +1,1786 @@
+{$mode delphi}{$h+}
+unit ObjectDef;
+{_$define writecreate}{_$define loaddebug}
+interface
+
+uses
+  sysutils, Classes;
+
+const
+  VersionNumber = '1.08';
+
+type
+
+  TLukStepitProc = procedure of Object;
+  TLukStepitMaxProc = procedure (Max : integer) of Object;
+
+  TInterfaceSection = (isPrivate,isProtected,isPublic,isPublished);
+  TPropType = (ptField,ptProperty,ptFunction,ptProcedure,ptSignal,
+               ptHelperProc,ptHelperFunc,ptSignalType,ptDeclarations,ptTypeDecl,
+               ptConstructor,ptDestructor,ptInitialization, ptFinalization);
+  TpropFuncType = (pftGtkFunc,pftObjField,pftObjFunc,pftField,pftProc,pftNotImplemented,
+                   pftGtkMacro,pftExistingProc);
+  TParamType = (ptNone,ptVar,ptConst);
+  TProcType = (ptOverride, ptVirtual, ptDynamic, ptAbstract, ptCdecl,
+               ptOverload, ptReintroduce);
+  TProcTypeSet = set of TProcType;
+
+  TObjectDefs = class;
+  TObjectItem = class;
+  TPropertyItem = class;
+
+
+  TParameterItem = class (TCollectionItem)
+  private
+    FName : string;
+    FConvert: boolean;
+    FpascalType: string;
+    FParamType: TParamType;
+  protected
+    function GetDisplayName : string; override;
+    procedure SetDisplayName(Const Value : string); override;
+    procedure AssignTo(Dest: TPersistent); override;
+  public
+    constructor Create (ACollection : TCollection); override;
+    destructor destroy; override;
+  published
+    property Name : string read FName write FName;
+    { De naam van de parameter }
+    property PascalType : string read FpascalType write FPascalType;
+    { Zijn type }
+    property Convert : boolean read FConvert write FConvert default false;
+    { geeft aan of er een omzetting dient te gebeuren voor het gebruiken }
+    property ParamType : TParamType read FParamType write FParamType default ptNone;
+    { het type van parameter : var, const of niets }
+  end;
+
+  TParamCollection = class (TCollection)
+  private
+    FProcedure : TPropertyItem;
+    function GetItem(Index: Integer): TParameterItem;
+    procedure SetItem(Index: Integer; const Value: TParameterItem);
+  protected
+    function GetOwner : TPersistent; override;
+  public
+    constructor create (AOwner : TPropertyItem);
+    property Items[Index: Integer]: TParameterItem read GetItem write SetItem; default;
+  end;
+
+
+  TPropertyItem = class (TCollectionItem)
+  private
+    FPropType : TPropType;
+    FName: string;
+    FSection: TInterfaceSection;
+    FPascalType: string;
+    FParameters: TParamCollection;
+    FGtkName: string;
+    FWriteProcType: TpropFuncType;
+    FReadFuncType: TPropFuncType;
+    FWriteGtkName: string;
+    FCode: TStringList;
+    FWriteCode: TStringList;
+    FProctypes: TProcTypeSet;
+    FWriteConvert: boolean;
+    FReadConvert: boolean;
+    procedure SetCode(const Value: TStringList);
+    procedure SetWriteCode(const Value: TStringList);
+    procedure SetPropType(const Value: TPropType);
+  protected
+    function GetDisplayName: string; override;
+    procedure SetDisplayName(const Value: string); override;
+    procedure AssignTo(Dest: TPersistent); override;
+  public
+    constructor create (ACollection : TCollection); override;
+    destructor destroy; override;
+  published
+    property PropType : TPropType read FPropType write SetPropType default ptProcedure;
+    { wat voor iets het is } // Moet voor DisplayName staan voor goede inleesvolgorde
+    property Name : string read FName write FName;
+    { Naam van de property/functie/proc/veld/... }
+    property Section : TInterfaceSection read FSection write FSection default isPublic;
+    { waar het geplaats moet worden private, public, ... }
+    property PascalType : string read FPascalType write FPascalType;
+    { het type van property, functie, veld, signal (moet dan wel gedefinieerd zijn) }
+    property Parameters : TParamCollection read FParameters write FParameters;
+    { de parameters die doorgegeven moeten worden via de functie/procedure/signaltype }
+    property GtkName : string read FGtkName write FGtkName;
+    { de naam zoals GTK die gebruikt (waarschijnlijk met _ in) }
+    property Code : TStringList read FCode write SetCode;
+  { Property specifiek }
+    // ReadGtkName wordt weggeschreven in GtkName
+    // ReadCode wordt weggeschreven in Code
+    // parameters worden gebruikt om indexen aan te geven
+    property ReadFuncType : TPropFuncType read FReadFuncType write FReadFuncType default pftGtkFunc;
+    { hoe de read functie moet werken : gtk-functie, object-veld, object-functie, eigen functie }
+    property ReadConvert : boolean read FReadConvert write FReadConvert default false;
+    { Geeft aan of de waarde voor toekenning aan result moet omgezet worden }
+    property WriteProcType : TpropFuncType read FWriteProcType write FWriteProcType default pftGtkFunc;
+    { hoe de write functie moet werken : gtk-proc, object-veld, object-proc, eigen proc }
+    property WriteGtkName : string read FWriteGtkName write FWriteGtkName;
+    { de naam zoals gtk of object die gebruikt. Gebruikt in write, voor read zie GtkName }
+    property WriteConvert : boolean read FWriteConvert write FWriteConvert default false;
+    { Geeft aan of de waarde moet omgezet worden voor het doorgeven }
+    property WriteCode : TStringList read FWriteCode write SetWriteCode;
+  { procedure specifiek } //gebruikt code
+    property ProcTypes : TProcTypeSet read FProctypes write FProcTypes default [];
+    { Duid het type procedure/functie aan : abstract, virtual, ... }
+  end;
+
+  TPropertyCollection = class (TCollection)
+  private
+    FObject : TobjectItem;
+    function GetItem(Index: Integer): TPropertyItem;
+    procedure SetItem(Index: Integer; const Value: TPropertyItem);
+  protected
+    function GetOwner : TPersistent; override;
+  public
+    constructor create (AOwner : TObjectItem);
+    property Items[Index: Integer]: TPropertyItem read GetItem write SetItem; default;
+  end;
+
+
+  TObjectItem = class (TCollectionItem)
+  private
+    FInherit: string;
+    FName: string;
+    FProps: TPropertyCollection;
+    FGtkFuncName: string;
+    FWithPointer: boolean;
+    FCreateObject: boolean;
+    FGtkName: string;
+    FCreateParams: string;
+    procedure SetProps(const Value: TPropertyCollection);
+    procedure SetGtkFuncName(const Value: string);
+  protected
+    function GetDisplayName: string; override;
+    procedure SetDisplayName(const Value: string); override;
+    procedure AssignTo(Dest: TPersistent); override;
+  public
+    constructor create (ACollection : TCollection); override;
+    destructor destroy; override;
+  published
+    property Name : string read FName write FName;
+    { Naam van het object }
+    property Inherit : string read FInherit write FInherit;
+    { De naam van het object dat ancester is }
+    property GtkFuncName : string read FGtkFuncName write SetGtkFuncName;
+    { Naam van het object in gtk zoals het in de functies en procedures gebruikt wordt }
+    property GtkName : string read FGtkName write FGtkName;
+    { Naam van het objectrecord in gtk zoals gebruikt in typedeclaraties}
+    property Props : TPropertyCollection read FProps write SetProps;
+    { De verschillende properties, procedures, ... van en voor het object }
+    property WithPointer : boolean read FWithPointer write FWithPointer default false;
+    { duid aan of er ook een pointerdefinitie moet zijn }
+    property CreateObject : boolean read FCreateObject write FCreateObject default false;
+    { duid aan of er een CreateGtkObject procedure moet aangemaakt worden }
+    property CreateParams : string read FCreateParams write FCreateParams;
+    { Geeft de parameters die meegeven moeten worden aan de _New functie }
+  end;
+
+  TObjectCollection = class (TCollection)
+  private
+    FGtkDEf : TObjectDefs;
+    function GetItem(Index: Integer): TObjectItem;
+    procedure SetItem(Index: Integer; const Value: TObjectItem);
+  protected
+    function GetOwner : TPersistent; override;
+  public
+    constructor create (AOwner : TObjectDefs);
+    property Items[Index: Integer]: TObjectItem read GetItem write SetItem; default;
+  end;
+
+
+  TObjectDefs = class(TComponent)
+  private
+    FDefinition: TObjectCollection;
+    FGtkPrefix,
+    FUsesList,
+    FUnitName: string;
+    {$IFNDEF Delphi}
+    FTop, FLeft : integer;
+    {$ENDIF}
+    procedure SetDefinition(const Value: TObjectCollection);
+    { Private declarations }
+  protected
+    { Protected declarations }
+  public
+    { Public declarations }
+    constructor create (AOwner : TComponent); override;
+    destructor destroy; override;
+    procedure Write (TheUnit : TStrings; StepIt : TLukStepItProc; StepItMax : TLukStepItMaxProc);
+    procedure Save (List : TStrings);
+    procedure Load (List : TStrings);
+  published
+    { Published declarations }
+    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;
+    {$IFNDEF delphi}
+    // Compatibiliteit met Delphi
+    property Left : integer read FLeft write FLeft;
+    property Top : integer read FTop write FTop;
+    {$ENDIF}
+  end;
+
+var
+  GtkPrefix : string = 'gtk';
+  ObjectsPrefix : string = 'FPgtk';
+
+procedure Register;
+
+implementation
+
+//uses dsgnIntf;
+
+const
+  SectPublic = [isPublic,isPublished];
+  SectPriv = [isPrivate,isProtected];
+  CRLF = #13#10;
+  PropUsesGtkName = [pftProc, pftExistingProc];
+
+var
+  lowerObjectsPrefix : string;
+  ObjectsPrefixLength : integer;
+
+procedure Register;
+begin
+  RegisterComponents('Luk', [TObjectDefs]);
+end;
+
+{ TParamCollection }
+
+constructor TParamCollection.create(AOwner: TPropertyItem);
+begin
+  inherited Create (TParameterItem);
+  FProcedure := AOwner;
+end;
+
+function TParamCollection.GetItem(Index: Integer): TParameterItem;
+begin
+  result := TParameterItem (inherited Items[index]);
+end;
+
+function TParamCollection.GetOwner: TPersistent;
+begin
+  result := FProcedure;
+end;
+
+procedure TParamCollection.SetItem(Index: Integer;
+  const Value: TParameterItem);
+begin
+  inherited Items[Index] := Value;
+end;
+
+{ TParameterItem }
+
+procedure TParameterItem.AssignTo(Dest: TPersistent);
+begin
+  if Dest is TParameterItem then
+    with TParameterItem(Dest) do
+      begin
+      FName := Self.FName;
+      FConvert := Self.FConvert;
+      FpascalType := Self.FpascalType;
+      FParamType := Self.FParamType;
+      end
+  else
+    inherited;
+end;
+
+constructor TParameterItem.Create(ACollection: TCollection);
+begin
+  inherited;
+  FConvert := False;
+  FParamType := ptNone;
+end;
+
+destructor TParameterItem.destroy;
+begin
+  inherited;
+end;
+
+function TParameterItem.GetDisplayName: string;
+begin
+  result := FName;
+end;
+
+procedure TParameterItem.SetDisplayName(const Value: string);
+begin
+  FName := Value;
+end;
+
+
+{ TPropertyItem }
+
+procedure TPropertyItem.AssignTo(Dest: TPersistent);
+var r : integer;
+begin
+  if Dest is TPropertyItem then
+    with TPropertyItem(Dest) do
+      begin
+      FPropType := Self.FPropType;
+      FName := Self.FName;
+      FSection := Self.FSection;
+      FPascalType := Self.FPascalType;
+      FParameters.clear;
+      for r := 0 to pred(self.FParameters.count) do
+        FParameters.Add.assign (self.FParameters[r]);
+      FGtkName := Self.FGtkName;
+      FWriteProcType := Self.FWriteProcType;
+      FReadFuncType := Self.FReadFuncType;
+      FWriteGtkName := Self.FWriteGtkName;
+      FCode.Assign(Self.FCode);
+      FWriteCode.assign(Self.FWriteCode);
+      FProctypes := Self.FProctypes;
+      FWriteConvert := Self.FWriteConvert;
+      FReadConvert := Self.FReadConvert;
+      end
+  else
+    inherited;
+end;
+
+constructor TPropertyItem.create(ACollection: TCollection);
+begin
+  inherited;
+  FParameters := TParamCollection.Create (Self);
+  FPropType := ptProcedure;
+  FSection := isPublic;
+  FCode := TStringList.Create;
+  FWriteCode := TStringList.Create;
+  {$IFDEF writecreate}
+  writeln ('Property Item created');
+  {$ENDIF}
+end;
+
+destructor TPropertyItem.destroy;
+begin
+  FParameters.Free;
+  inherited;
+end;
+
+const
+  DispPropType : array [TPropType] of string =
+    ('Field','Property','Function','Procedure', 'Signal',
+     'HelperProc','HelperFunc','SignalType','Declarations', 'TypeDeclaration',
+     'Constructor','Destructor','Initialization','Finilization');
+
+function TPropertyItem.GetDisplayName: string;
+begin
+  if FPropType = ptDeclarations then
+    if Section = ispublished then
+      result := 'Interface code before'
+    else if Section = ispublic then
+      result := 'Interface code after'
+    else
+      result := 'Implementation code'
+  else
+    begin
+    result := DispProptype[FPropType];
+    if FPropType in [ptInitialization, ptFinalization] then
+      result := result + ' code'
+    else
+      result := FName + ' (' + result + ')';
+    end;
+end;
+
+procedure TPropertyItem.SetCode(const Value: TStringList);
+begin
+  FCode.assign (Value);
+end;
+
+procedure TPropertyItem.SetDisplayName(const Value: string);
+begin
+  FName := Value;
+end;
+
+procedure TPropertyItem.SetPropType(const Value: TPropType);
+begin
+  FPropType := Value;
+end;
+
+procedure TPropertyItem.SetWriteCode(const Value: TStringList);
+begin
+  FWriteCode.assign (Value);
+end;
+
+{ TPropertyCollection }
+
+constructor TPropertyCollection.create (AOwner : TObjectItem);
+begin
+  inherited create (TPropertyItem);
+  FObject := AOwner;
+end;
+
+function TPropertyCollection.GetItem(Index: Integer): TPropertyItem;
+begin
+  result := TPropertyItem(inherited items[index]);
+end;
+
+function TPropertyCollection.GetOwner: TPersistent;
+begin
+  result := FObject;
+end;
+
+procedure TPropertyCollection.SetItem(Index: Integer;
+  const Value: TPropertyItem);
+begin
+  Inherited Items[index] := Value;
+end;
+
+
+{ TObjectItem }
+
+procedure TObjectItem.AssignTo(Dest: TPersistent);
+var r : integer;
+begin
+  if Dest is TObjectItem then
+    with TObjectItem(Dest) do
+      begin
+      FName := self.FName;
+      FProps.clear;
+      for r := 0 to pred(Self.FProps.count) do
+        FProps.Add.assign (self.FProps[r]);
+      FInherit := Self.FInherit;
+      FGtkFuncName := Self.FGtkFuncName;
+      FWithPointer := Self.FWithPointer;
+      FCreateObject := Self.FCreateObject;
+      FGtkName := Self.FGtkName;
+      FCreateParams := Self.FCreateParams;
+      end
+  else
+    inherited;
+end;
+
+constructor TObjectItem.create(ACollection: TCollection);
+begin
+  inherited create (ACollection);
+  FProps := TpropertyCollection.Create (Self);
+end;
+
+destructor TObjectItem.destroy;
+begin
+  FProps.Free;
+  inherited;
+end;
+
+function TObjectItem.GetDisplayName: string;
+begin
+  result := FName;
+end;
+
+procedure TObjectItem.SetDisplayName(const Value: string);
+begin
+  FName := Value;
+end;
+
+procedure TObjectItem.SetGtkFuncName(const Value: string);
+begin
+  FGtkFuncName := Value;
+  {$IFDEF writecreate}
+  writeln ('GtkFuncname = ', Value);
+  {$ENDIF}
+end;
+
+procedure TObjectItem.SetProps(const Value: TPropertyCollection);
+begin
+  FProps.assign(Value);
+end;
+
+{ TObjectCollection }
+
+constructor TObjectCollection.create (AOwner : TObjectDefs);
+begin
+  inherited create (TObjectItem);
+  FGtkDef := AOwner;
+end;
+
+function TObjectCollection.GetItem(Index: Integer): TObjectItem;
+begin
+  result := TObjectItem(inherited Items[index]);
+end;
+
+function TObjectCollection.GetOwner: TPersistent;
+begin
+  result := FGtkDef;
+end;
+
+procedure TObjectCollection.SetItem(Index: Integer;
+  const Value: TObjectItem);
+begin
+  inherited items[index] := Value;
+end;
+
+
+{ TObjectDefs }
+
+constructor TObjectDefs.create (AOwner : TComponent);
+begin
+  inherited create (AOwner);
+  FDefinition := TObjectCollection.Create (self);
+  FgtkPrefix := 'gtk';
+end;
+
+destructor TObjectDefs.destroy;
+begin
+  FDefinition.Free;
+  inherited;
+end;
+
+procedure TObjectDefs.SetDefinition(const Value: TObjectCollection);
+begin
+  FDefinition.assign(Value);
+end;
+
+const
+  DispPropFuncType : array [TPropFuncType] of string = ('GtkFunc','ObjField',
+      'ObjFunc','Field','Proc','NotImplemented','GtkMacro','ExistingProc');
+  DispProcType : array [TProcType] of string = ('Override', 'Virtual', 'Dynamic',
+      'Abstract', 'Cdecl', 'Overload', 'Reintroduce');
+
+procedure TObjectDefs.Save (List : TStrings);
+
+  procedure WriteParameter (AParameter : TParameterItem);
+  begin
+    with AParameter do
+      begin
+      List.Add ('      Param=' + FName);
+      if FConvert then
+        List.Add ('        Convert');
+      if FpascalType <> '' then
+        List.Add ('        PascalType=' + FpascalType);
+      if FParamType = ptVar then
+        List.Add ('        ParamType=Var')
+      else if FParamType = ptConst then
+        List.Add ('        ParamType=Const');
+      end;
+  end;
+
+  procedure WriteProperty (AProperty : TPropertyItem);
+  var r : integer;
+      pt : TProcType;
+  begin
+    with AProperty do
+      begin
+      List.Add ('    Prop=' + FName);
+      List.Add ('      PropType='+DispPropType[FPropType]);
+      if FSection = isprivate then
+        List.Add ('      Section=Private')
+      else if FSection = isprotected then
+        List.Add ('      Section=Protected')
+      else if FSection = isPublished then
+        List.Add ('      Section=Published');
+      if FPascalType <> '' then
+        List.Add ('      PascalType=' + FPascalType);
+      if FGtkName <> '' then
+        List.Add ('      GtkName=' + FGtkName);
+      if Fcode.count > 0 then
+        List.Add ('      Code='+FCode.Commatext);
+      if FReadConvert then
+        List.Add ('      ReadConvert');
+      if FReadFuncType <> pftGtkFunc then
+        List.Add ('      ReadFuncType='+ DispPropFuncType[FReadFuncType]);
+      if FWriteProcType <> pftGtkFunc then
+        List.Add ('      WriteProcType='+ DispPropFuncType[FWriteProcType]);
+      if FWriteGtkName <> '' then
+        List.Add ('      WriteGtkName=' + FWriteGtkName);
+      if FWritecode.count > 0 then
+        List.Add ('      WriteCode='+FWriteCode.Commatext);
+      if FWriteConvert then
+        List.Add ('      WriteConvert');
+      if FProcTypes <> [] then
+        for pt := low(TProcType) to high(TProcType) do
+          if pt in FProcTypes then
+            List.Add ('      '+DispProcType[pt]);
+      with FParameters do
+        begin
+        List.Add ('      Count='+inttostr(Count));
+        for r := 0 to count-1 do
+          WriteParameter (Items[r]);
+        end;
+      end;
+  end;
+
+  procedure WriteObject (AnObject : TObjectItem);
+  var r : integer;
+  begin
+    with AnObject do
+      begin
+      List.Add ('  Object=' + FName);
+      if FInherit <> '' then
+        List.Add ('    Inherit=' + FInherit);
+      if FGtkFuncName <> '' then
+        List.Add ('    GtkFuncName=' + FGtkFuncName);
+      if FGtkName <> '' then
+        List.Add ('    GtkName=' + FGtkName);
+      if FCreateParams <> '' then
+        List.Add ('    CreateParams=' + FCreateParams);
+      if FWithPointer then
+        List.Add ('    WithPointer');
+      if FCreateObject then
+        List.Add ('    CreateObject');
+      with FProps do
+        begin
+        List.Add ('    Count='+inttostr(count));
+        for r := 0 to count-1 do
+          WriteProperty (Items[r]);
+        end;
+      end;
+  end;
+
+var r : integer;
+begin
+  List.Add ('definition');
+  if FGtkPrefix <> '' then
+    List.Add ('  GtkPrefix=' + FGtkPrefix);
+  if FUsesList <> '' then
+    List.Add ('  UsesList=' + FUsesList);
+  if FUnitName <> '' then
+    List.Add ('  UnitName=' + FUnitName);
+  with Definition do
+    begin
+    List.Add ('  Count=' + inttostr(count));
+    for r := 0 to count-1 do
+      WriteObject (Items[r])
+    end;
+end;
+
+resourcestring
+  sErrWrongFirstLine = 'Error: First line doesn''t contain correct word';
+  sErrCountExpected = 'Error: "Count" expected on line %d';
+  sErrObjectExpected = 'Error: "Object" expected on line %d';
+  sErrPropertyExpected = 'Error: "Prop" expected on line %d';
+  sErrProptypeExpected = 'Error: "PropType" expected on line %d';
+  sErrParameterExpected = 'Error: "Param" expected on line %d';
+
+procedure TObjectDefs.Load (List : TStrings);
+
+var line : integer;
+    item, value : string;
+    HasLine : boolean;
+
+  procedure SplitNext;
+  var p : integer;
+  begin
+    inc (line);
+    HasLine := (line < List.Count);
+    if HasLine then
+      begin
+      item := List[Line];
+      p := pos ('=', item);
+      if p = 0 then
+        value := ''
+      else
+        begin
+        value := copy(item, p+1, maxint);
+        item := copy(item, 1, p-1);
+        end;
+      end
+    else
+      begin
+      Item := '';
+      value := '';
+      end;
+  end;
+
+  procedure ReadParameter (AParameter : TParameterItem);
+  begin
+    with AParameter do
+      begin
+      if HasLine and (item = '      Param') then
+        begin
+        FName := value;
+        {$ifdef LoadDebug}writeln ('    Parameter Name ', FName);{$endif}
+        SplitNext;
+        end
+      else
+        raise exception.CreateFmt (sErrParameterExpected, [line]);
+      if HasLine then
+        begin
+        FConvert := (item = '        Convert');
+        {$ifdef LoadDebug}writeln ('              Convert ', FConvert);{$endif}
+        if FConvert then
+          SplitNext;
+        end;
+      if HasLine and (item = '        PascalType') then
+        begin
+        FPascalType := value;
+        {$ifdef LoadDebug}writeln ('              PascalType ', FPascalType);{$endif}
+        SplitNext;
+        end;
+      if HasLine and (item = '        ParamType') then
+        begin
+        if Value = 'Var' then
+          FParamType := ptVar
+        else if Value = 'Const' then
+          FParamType := ptConst;
+        {$ifdef LoadDebug}writeln ('              ParamType ', ord(FParamtype));{$endif}
+        SplitNext;
+        end;
+      end;
+  end;
+
+  procedure ReadProperty (AProperty : TPropertyItem);
+  var RProcType : TProcType;
+      Rproptype : TPropType;
+      RpropFuncType : TpropFuncType;
+      counter : integer;
+      s : string;
+  begin
+    with AProperty do
+      begin
+      if HasLine and (item = '    Prop') then
+        begin
+        FName := value;
+        {$ifdef LoadDebug}writeln ('  Property Name ', FName);{$endif}
+        SplitNext;
+        end
+      else
+        raise exception.CreateFmt (sErrPropertyExpected, [line]);
+      if HasLine and (item = '      PropType') then
+        begin
+        RProptype := high(TPropType);
+        while (RPropType > low(TPropType)) and (DispPropType[RPropType] <> value) do
+          dec (RPropType);
+        FPropType := RPropType;
+        {$ifdef LoadDebug}writeln ('           PropType ', ord(FPropType));{$endif}
+        SplitNext;
+        end
+      else
+        raise exception.CreateFmt (sErrPropTypeExpected, [Line]);
+      Section := isPublic;
+      if HasLine and (item = '      Section') then
+        begin
+        if value = 'Private' then
+          Section := isPrivate
+        else if value = 'Protected' then
+          FSection := isprotected
+        else if value = 'Published' then
+          FSection := isPublished;
+        SplitNext;
+        {$ifdef LoadDebug}writeln ('           Section ', ord(FSection));{$endif}
+        end;
+      if HasLine and (item = '      PascalType') then
+        begin
+        FPascalType := value;
+        {$ifdef LoadDebug}writeln ('           PascalType ', FPascalType);{$endif}
+        SplitNext;
+        end;
+      if HasLine and (item = '      GtkName') then
+        begin
+        FGtkName := value;
+        {$ifdef LoadDebug}writeln ('           GtkName ', FGtkName);{$endif}
+        SplitNext;
+        end;
+      if HasLine and (item = '      Code') then
+        begin
+        FCode.Commatext := value;
+        {$ifdef LoadDebug}writeln ('           Code set');{$endif}
+        SplitNext;
+        end;
+      if HasLine then
+        begin
+        FReadConvert := (item = '      ReadConvert');
+        {$ifdef LoadDebug}writeln ('           ReadConvert ', FReadConvert);{$endif}
+        if FReadConvert then
+          SplitNext;
+        end;
+      if HasLine and (item = '      ReadFuncType') then
+        begin
+        RpropFuncType := high(TpropFuncType);
+        while (RpropFuncType > low(TpropFuncType)) and
+              (value <> DispPropFuncType[RpropFuncType]) do
+          dec (RpropFuncType);
+        FReadFuncType := RpropFuncType;
+        {$ifdef LoadDebug}writeln ('           ReadFuncType ', ord(FReadFunctype));{$endif}
+        if RpropFuncType > low(TpropFuncType) then
+          Splitnext;
+        end;
+      if HasLine and (item = '      WriteProcType') then
+        begin
+        RpropFuncType := high(TpropFuncType);
+        while (RpropFuncType > low(TpropFuncType)) and
+              (value <> DispPropFuncType[RpropFuncType]) do
+          dec (RpropFuncType);
+        FWriteProcType := RpropFuncType;
+        {$ifdef LoadDebug}writeln ('           WriteProcType ', ord(FWriteProcType));{$endif}
+        if RpropFuncType > low(TpropFuncType) then
+          Splitnext;
+        end;
+      if HasLine and (item = '      WriteGtkName') then
+        begin
+        FWriteGtkName := value;
+        {$ifdef LoadDebug}writeln ('           WriteGtkName ', FWriteGtkName);{$endif}
+        SplitNext;
+        end;
+      if HasLine and (item = '      WriteCode') then
+        begin
+        FWriteCode.Commatext := value;
+        {$ifdef LoadDebug}writeln ('           WriteCode set');{$endif}
+        SplitNext;
+        end;
+      if HasLine then
+        begin
+        FWriteConvert := (item = '      WriteConvert');
+        {$ifdef LoadDebug}writeln ('           WriteConvert ', FWriteConvert);{$endif}
+        if FWriteConvert then
+          SplitNext;
+        end;
+      FProcTypes := [];
+      if HasLine then
+        begin
+        s := copy(item, 7, 35);
+        for RProcType := low(TProcType) to high(TProcType) do
+          if s = DispProcType[RProcType] then
+            begin
+            FProcTypes := FProcTypes + [RProcType];
+            {$ifdef LoadDebug}writeln ('           ProcType added ', s);{$endif}
+            SplitNext;
+            s := copy(item, 7, 35);
+            end;
+        end;
+      if HasLine and (Item = '      Count') then
+        with FParameters do
+          begin
+          counter := strtoint(value);
+          {$ifdef LoadDebug}writeln ('           Counter ', Counter);{$endif}
+          SplitNext;
+          while (Counter > 0) do
+            begin
+            ReadParameter (Add as TParameterItem);
+            dec (counter);
+            end;
+          end
+      else
+        raise exception.CreateFmt (sErrCountExpected, [line]);
+      end;
+  end;
+
+  procedure ReadObject (AnObject : TObjectItem);
+  var counter : integer;
+  begin
+    with AnObject do
+      begin
+      if HasLine and (item = '  Object') then
+        begin
+        FName := value;
+        {$ifdef LoadDebug}writeln ('Object name ', FName);{$endif}
+        SplitNext;
+        end
+      else
+        raise exception.CreateFmt (sErrObjectExpected, [line]);
+      if HasLine and (item = '    Inherit') then
+        begin
+        FInherit := value;
+        {$ifdef LoadDebug}writeln ('       Inherit ', FInherit);{$endif}
+        SplitNext;
+        end;
+      if HasLine and (item = '    GtkFuncName') then
+        begin
+        FGtkFuncName := value;
+        {$ifdef LoadDebug}writeln ('       GtkFuncName ', FGtkFuncName);{$endif}
+        SplitNext;
+        end;
+      if HasLine and (item = '    GtkName') then
+        begin
+        FGtkName := value;
+        {$ifdef LoadDebug}writeln ('       GtkName ', FGtkName);{$endif}
+        SplitNext;
+        end;
+      if HasLine and (item = '    CreateParams') then
+        begin
+        FCreateParams := value;
+        {$ifdef LoadDebug}writeln ('       CreateParams ', FCreateParams);{$endif}
+        SplitNext;
+        end;
+      if HasLine then
+        begin
+        FWithPointer := (item = '    WithPointer');
+        {$ifdef LoadDebug}writeln ('       WithPointer ', FWithPointer);{$endif}
+        if FWithPointer then
+          SplitNext;
+        end;
+      if HasLine then
+        begin
+        FCreateObject := (item = '    CreateObject');
+        {$ifdef LoadDebug}writeln ('       CreateObject ', FCreateObject);{$endif}
+        if FCreateObject then
+          SplitNext;
+        end;
+      if HasLine and (Item = '    Count') then
+        with FProps do
+          begin
+          counter := strtoint(value);
+          {$ifdef LoadDebug}writeln ('       Counter ', counter);{$endif}
+          SplitNext;
+          while (Counter > 0) do
+            begin
+            ReadProperty (Add as TPropertyItem);
+            dec (counter);
+            end;
+          end
+      else
+        raise exception.CreateFmt (sErrCountExpected, [line]);
+      end;
+  end;
+
+var counter : integer;
+begin
+  {$ifdef LoadDebug}writeln ('Start load');{$endif}
+  if List[0] <> 'definition' then
+    raise Exception.Create (sErrWrongFirstLine);
+  {$ifdef LoadDebug}writeln ('Correct startline');{$endif}
+  line := 0;
+  {$ifdef LoadDebug}writeln ('Calling SplitNext');{$endif}
+  SplitNext;
+  if HasLine and (Item = '  GtkPrefix') then
+    begin
+    {$ifdef LoadDebug}writeln ('GtkPrefix=',value);{$endif}
+    FGtkPrefix := value;
+    SplitNext;
+    end
+  else
+    FGtkPrefix := '';
+  if HasLine and (Item = '  UsesList') then
+    begin
+    {$ifdef LoadDebug}writeln ('UsesList=',value);{$endif}
+    FUsesList := value;
+    SplitNext;
+    end
+  else
+    FUsesList := '';
+  if HasLine and (Item = '  UnitName') then
+    begin
+    {$ifdef LoadDebug}writeln ('UnitName=',value);{$endif}
+    FUnitName := value;
+    SplitNext;
+    end
+  else
+    FUnitName := '';
+  if HasLine and (Item = '  Count') then
+    begin
+    counter := strtoint(value);
+    {$ifdef LoadDebug}writeln ('Counter ', counter);{$endif}
+    if assigned(FDefinition) then
+      begin
+      {$ifdef LoadDebug}writeln ('Clearing ObjectDefinitions');{$endif}
+      FDefinition.Clear;
+      end
+    else
+      begin
+      {$ifdef LoadDebug}writeln ('Creating ObjectDefinitions');{$endif}
+      FDefinition := TObjectCollection.Create (self);
+      end;
+    SplitNext;
+    while (Counter > 0) do
+      begin
+      ReadObject (Definition.Add as TObjectItem);
+      dec (counter);
+      end;
+    end
+  else
+    raise exception.CreateFmt (sErrCountExpected, [line]);
+end;
+
+procedure TObjectDefs.Write(TheUnit : TStrings; StepIt : TLukStepItProc; StepItMax : TLukStepItMaxProc);
+
+  procedure DoStepIt;
+  begin
+    if assigned (StepIt) then
+      StepIt;
+  end;
+
+  procedure DoStepItMax (Max : integer);
+  begin
+    if assigned (StepItMax) then
+      StepItMax (Max);
+  end;
+
+  procedure WriteObjectForward (Obj : TObjectItem);
+  begin
+    with obj do
+      TheUnit.add ('  T'+ObjectsPrefix+Name+' = class;');
+  end;
+
+  function CalcProcTypes (ProcTypes : TProcTypeSet; InImplementation:boolean) : string; overload;
+  begin
+    if not InImplementation then
+      begin
+      if ptOverride in ProcTypes then
+        result := ' Override;'
+      else
+        begin
+        if ptVirtual in ProcTypes then
+          result := ' Virtual;'
+        else if ptDynamic in ProcTypes then
+          result := ' Dynamic;'
+        else
+          result := '';
+        if (result <> '') and (ptAbstract in ProcTypes) then
+          result := result + ' Abstract;';
+        end;
+      if ptreintroduce in ProcTypes then
+        result := result + ' Reintroduce;';
+      end;
+    if ptCDecl in ProcTypes then
+      result := result + ' Cdecl;';
+    if ptOverload in ProcTypes then
+      result := result + ' Overload;';
+  end;
+
+  function CalcProcTypes (ProcTypes : TProcTypeSet) : string; overload;
+  begin
+    result := CalcProcTypes (ProcTypes, False);
+  end;
+
+  type
+    TConvType = (ToGtk, ToLuk, ToFPgtk);
+
+  function ConvertType (PascalType : string; ConvType : TConvType) : string;
+  begin
+    PascalType := lowercase (PascalType);
+    if ConvType = ToGtk then
+      begin
+      if PascalType = 'string' then
+        result := 'pgChar'
+      else if copy(PascalType,1,ObjectsPrefixLength+1) = 't'+LowerObjectsPrefix then
+        result := 'PGtk' + copy (PascalType, ObjectsPrefixLength+2, maxint)
+      else if PascalType = 'longbool' then
+        result := 'gint'
+      else
+        result := PascalType;
+      end
+    else
+      begin
+      if PascalType = 'pgChar' then
+        result := 'string'
+      else if copy(PascalType,1,4) = 'pgtk' then
+        result := 'T'+ObjectsPrefix + copy (PascalType, 5, maxint)
+      else if PascalType = 'gint' then
+        result := 'longbool'
+      else
+        result := PascalType;
+      end;
+  end;
+
+  function DoConvert (Variable, PascalType : string; ConvType : TConvType) : string;
+  var s : string;
+  begin
+    result := variable;
+    PascalType := lowercase (PascalType);
+    if PascalType = 'string' then
+      begin
+      if ConvType <> ToLuk then
+        result := 'ConvertToPgchar('+result+')'
+      end
+    else if copy(PascalType,1,4)='pgtk' then
+      begin
+      if ConvType = ToLuk then
+        begin
+        s := 'T'+ObjectsPrefix + copy(PascalType, 5, maxint);
+        result := 'GetPascalInstance(PGtkObject('+result+'),'+s+') as '+ s
+        end
+      else
+        result := PascalType+'(ConvertToGtkObject('+result+'))'
+      end
+    else if Copy(PascalType,1,ObjectsPrefixLength+1)='t'+LowerObjectsPrefix then
+      begin
+      if ConvType = ToLuk then
+        result := 'GetPascalInstance(PGtkObject('+result+'),'+PascalType+') as '+PascalType
+      else
+        result := 'PGtk'+copy(PascalType,ObjectsPrefixLength+2,maxint)+'(ConvertToGtkObject('+result+'))'
+      end
+    else if PascalType = 'boolean' then
+      begin
+      if (copy(variable,1,4)='gtk.') and
+              (ConvType = ToLuk) then
+        result := 'boolean('+variable+')'
+      else if  ConvType = ToFPGtk then
+        result := 'guint('+variable+')'
+      end
+    else if PascalType = 'longbool' then
+      begin
+      if (copy(variable,1,4)='gtk.') and
+              (ConvType = ToLuk) then
+        result := 'longbool('+variable+')'
+      else if ConvType in [ToFPGtk,ToGtk] then
+        result := 'gint('+variable+')';
+      end;
+  end;
+
+  function CalcParam (param : TParameterItem; Declaration : boolean; ConvType : TConvType) : string;
+  begin
+    with Param do
+      begin
+      if Declaration then
+        begin
+        case param.ParamType of
+          ptVar   : result := 'var ';
+          ptconst : result := 'const ';
+          else      result := '';
+        end;
+        result := result + Name + ':' + PascalType;
+        end
+      else
+        if Convert then
+          result := DoConvert (Name, PascalType, convType)
+        else
+          result := name;
+      end;
+  end;
+
+  type
+    TParamListType = (plDecl, plImpl, plImplCl, plImplLukCl);
+
+  function CalcParameterList (params : TParamCollection; PLType : TParamListType) : string; overload;
+  var r : integer;
+      Sep : string[2];
+      ct : TConvType;
+  begin
+    if PLType = plDecl then
+      Sep := '; '
+    else
+      Sep := ', ';
+    if PLType = plImplLukCl then
+      ct := ToLuk
+    else
+      ct := ToGtk;
+    with params do
+      if count = 0 then
+        result := ''
+      else
+        begin
+        result := CalcParam (Items[0], (PLType=plDecl), ct);
+        for r := 1 to count-1 do
+          result := result + Sep + CalcParam (items[r], (PLType=plDecl), ct);
+        if PLType <> plImpl then
+          result := ' (' + result + ')';
+        end;
+  end;
+
+  function CalcParameterList (params : TParamCollection) : string; overload;
+  var r : integer;
+  begin
+    with params do
+      if count = 0 then
+        result := ''
+      else
+        begin
+        with Items[0] do
+          result := Name + ':' + PascalType;
+        for r := 1 to count-1 do
+          with Items[r] do
+            result := result + '; ' + Name + ':' + PascalType;
+        end;
+  end;
+
+  var  Lpublic, LProt, LPriv, LPublish : TStrings;
+
+  procedure WriteObjectInterface (Obj : TObjectItem);
+  var r : integer;
+      TheList : TStrings;
+      I, N, s : string;
+  begin
+    Lpublic.Clear;
+    LProt.Clear;
+    LPriv.Clear;
+    LPublish.clear;
+    with obj do
+      begin
+      // Signal declarations
+      with props do
+        begin
+        for r := 0 to count-1 do
+          with Items[r] do
+            begin
+            if (PropType = ptSignalType) then
+              if PascalType = '' then
+                TheUnit.add ('  T'+ObjectsPrefix+Name+'Function = procedure' +
+                            CalcParameterList(parameters,plDecl)+' of Object;')
+              else
+                TheUnit.add ('  T'+ObjectsPrefix+Name+'Function = function' +
+                            CalcParameterList(parameters,plDecl)+': '+PascalType+' of Object;')
+            else if (PropType = ptTypeDecl) then
+              TheUnit.AddStrings (Code);
+            end;
+        end;
+      TheUnit.Add ('');
+      // Class definition
+      if WithPointer then
+        TheUnit.Add ('  P'+ObjectsPrefix+Name+' = ^T'+ObjectsPrefix+Name+';');
+      if Inherit = '' then
+        TheUnit.add ('  T'+ObjectsPrefix+Name+' = class')
+      else
+        begin
+        if inherit[1] = '*' then
+          s := copy(inherit, 2, maxint)
+        else
+          s := ObjectsPrefix + Inherit;
+        TheUnit.add ('  T'+ObjectsPrefix+Name+' = class (T'+s+')');
+        end;
+      { Filling the 4 sections with the properties }
+      for r := 0 to props.count-1 do
+        with Props[r] do
+          begin
+          case Section of
+            isPrivate : TheList := LPriv;
+            isProtected : TheList := LProt;
+            isPublic : TheList := LPublic;
+            else TheList := LPublish;
+          end;
+          case PropType of
+            ptField :
+              TheList.Insert(0,'    ' + Name + ':' + PascalType + ';');
+            ptProperty :
+              begin
+              s := '    property ' + Name;
+              if (ReadFuncType <> pftNotImplemented) or
+                 (WriteProcType <> pftNotImplemented) then
+                begin
+                if Parameters.Count > 0 then
+                  begin
+                  I := CalcParameterlist(parameters);
+                  s := s + ' ['+I+'] ';
+                  end;
+                s := s + ' : ' + PascalType;
+                if (ReadFuncType <> pftNotImplemented) then
+                  begin
+                  s := s + ' read ';
+                  if ReadFuncType = pftField then
+                    begin
+                    if GtkName <> '' then
+                      N := GtkName
+                    else
+                      N := 'F' + Name;
+                    LPriv.insert (0, '    ' + N + ' : ' + PascalType + ';');
+                    end
+                  else
+                    begin
+                    if (ReadFuncType in PropUsesGtkName) and (GtkName <> '') then
+                      N := GtkName
+                    else
+                      N := 'Get' + Name;
+                    if (ReadFuncType <> pftExistingProc) then
+                      begin
+                      if parameters.count > 0 then
+                        LPriv.Add ('    function '+N+'('+I+') : '+PascalType+';')
+                      else
+                        LPriv.Add ('    function '+N+' : '+PascalType+';');
+                      end;
+                    end;
+                  s := s + N;
+                  end;
+                if (WriteProcType <> pftNotImplemented) then
+                  begin
+                  s := s + ' write ';
+                  if WriteProcType = pftField then
+                    begin
+                    if GtkName <> '' then
+                      N := GtkName
+                    else
+                      N := 'F' + Name;
+                    if (ReadFuncType <> pftField) then
+                      LPriv.insert (0, '    ' + N + ' : ' + PascalType + ';');
+                    end
+                  else
+                    begin
+                    if (WriteProcType in PropUsesGtkName) and (WriteGtkName <> '') then
+                      N := WriteGtkName
+                    else
+                      N := 'Set' + Name;
+                    if (WriteProcType <> pftExistingProc) then
+                      begin
+                      if parameters.count > 0 then
+                        LPriv.Add ('    procedure '+N+' ('+I+'; TheValue : '+PascalType+');')
+                      else
+                        LPriv.Add ('    procedure '+N+' (TheValue : '+PascalType+');');
+                      end;
+                    end;
+                  s := s + N;
+                  end;
+                end;
+              TheList.Add (s+';');
+              end;
+            ptFunction :
+              Thelist.Add ('    function ' + Name + CalcParameterList(Parameters, plDecl)
+                         + ' : ' + PascalType+';' + CalcProcTypes(ProcTypes));
+            ptProcedure :
+              TheList.Add ('    procedure ' + Name + CalcParameterList(Parameters, plDecl)
+                         + ';' + CalcProcTypes(ProcTypes));
+            ptSignal :
+              begin
+              TheList.Add ('    function Connect'+Name+' (proc:T'+ObjectsPrefix+PascalType+'Function; data:pointer) : guint;');
+              TheList.Add ('    function ConnectAfter'+Name+' (proc:T'+ObjectsPrefix+PascalType+'Function; data:pointer) : guint;');
+              end;
+            ptSignalType :
+              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;');
+              end;
+            ptConstructor :
+              TheList.Add ('    constructor ' + Name + CalcParameterList(Parameters, plDecl)
+                         + ';' + CalcProcTypes(ProcTypes));
+            ptDestructor :
+              TheList.Add ('    destructor ' + Name + CalcParameterList(Parameters, plDecl)
+                         + ';' + CalcProcTypes(ProcTypes));
+          end;
+          end;
+      { Adding the sections }
+      if LPriv.count > 0 then
+        begin
+        TheUnit.add ('  Private');
+        TheUnit.AddStrings (Lpriv);
+        end;
+      if (LProt.count > 0) or CreateObject then
+        begin
+        TheUnit.add ('  Protected');
+        if CreateObject then
+          TheUnit.add ('    procedure CreateGtkObject; override;');
+        if LProt.Count >= 0 then
+          TheUnit.AddStrings (Lprot);
+        end;
+      if (GtkFuncName <> '') or (LPublic.count >= 0) then
+        begin
+        TheUnit.add ('  Public');
+        if (GtkFuncName <> '') then
+          TheUnit.add ('    function TheGtkObject : PGtk'+Name+';');
+        if LPublic.count >= 0 then
+          TheUnit.AddStrings (Lpublic);
+        end;
+      if LPublish.count > 0 then
+        begin
+        TheUnit.add ('  Publish');
+        TheUnit.AddStrings (Lpublish);
+        end;
+      end;
+    TheUnit.Add ('  end;');
+    TheUnit.add ('');
+    DoStepIt;
+  end;
+
+  procedure WriteObjectImplementation (Obj : TObjectItem);
+  var gn, n, s, start, midden, eind, res : string;
+      r, l, p : integer;
+  begin
+    with Obj, TheUnit do
+      begin
+      n := Name;
+      gn := GtkFuncName;
+      add (' { T'+ObjectsPrefix+N+' }'+CRLF);
+      if gn <> '' then
+        // Functie voor alle objecten en header
+        add ('function T'+ObjectsPrefix+N+'.TheGtkObject : PGtk'+N+';'+CRLF+
+             'begin'+CRLF+
+             '  result := P'+GtkPrefix+N+'(FGtkObject);'+CRLF+
+             'end;'+CRLF);
+      if CreateObject then
+        begin
+        eind := CreateParams;
+        if eind <> '' then
+          eind := ' (' + eind + ')';
+        add ('procedure T'+ObjectsPrefix+N+'.CreateGtkObject;'+CRLF+
+             'begin'+CRLF+
+             '  FGtkObject := PGtkObject(gtk_'+gn+'_new'+eind+');'+CRLF+
+             'end;'+CRLF);
+        end;
+      // Declarations toevoegen
+      for r := 0 to Props.count-1 do
+        with Props[r] do
+          if (PropType = ptDeclarations) and (Section in sectPriv) then
+            AddStrings (Code);
+      // Properties toevoegen
+      add ('');
+      for r := 0 to props.count-1 do
+        with Props[r] do
+          begin
+          case PropType of
+            ptFunction :
+              if not (ptAbstract in ProcTypes) then
+                begin
+                Add ('function T'+ObjectsPrefix + N + '.' + Name +
+                     CalcParameterList(Parameters, plDecl) +
+                     ' : ' + PascalType+';' + CalcProcTypes(ProcTypes,true));
+                if GtkName = '' then
+                  AddStrings (Code)
+                else
+                  begin
+                  s := CalcParameterList (Parameters, plImpl);
+                  if s <> '' then
+                    s := ', ' + s;
+                  Add ('begin' + CRLF +
+                       '  result := ' + GtkPrefix + '_' + GN + '_' + GtkName +
+                           ' (TheGtkObject' + s + ');' + CRLF +
+                       'end;');
+                  end;
+                add ('');
+                end;
+            ptHelperFunc :
+              begin
+              Add ('function ' + Name + CalcParameterList(Parameters, plDecl) +
+                ' : ' + PascalType+';'+CalcProcTypes(ProcTypes)+CRLF+Code.Text+CRLF);
+              end;
+            ptProcedure :
+              if not (ptAbstract in ProcTypes) then
+                begin
+                Add ('procedure T'+ObjectsPrefix + N + '.' + Name+
+                     CalcParameterList(Parameters,plDecl) + ';' +
+                     CalcProcTypes(ProcTypes, True));
+                if GtkName = '' then
+                  AddStrings (Code)
+                else
+                  begin
+                  s := CalcParameterList (Parameters, plImpl);
+                  if s <> '' then
+                    s := ', ' + s;
+                  Add ('begin' + CRLF +
+                       '  ' + GtkPrefix + '_' + GN + '_' + GtkName +
+                                ' (TheGtkObject' + s + ');' + CRLF +
+                       'end;');
+                  end;
+                add ('');
+                end;
+            ptHelperProc :
+              Add ('procedure ' + Name + CalcParameterList(Parameters, plDecl) +
+                   ';'+CalcProcTypes(ProcTypes)+CRLF+Code.Text+CRLF);
+            ptConstructor :
+              Add ('constructor T'+ObjectsPrefix + N + '.' + Name+
+                   CalcParameterList(Parameters,plDecl) + ';'+CRLF+Code.Text+CRLF);
+            ptDestructor :
+              Add ('destructor T'+ObjectsPrefix + N + '.' + Name+
+                   CalcParameterList(Parameters,plDecl) + ';'+CRLF+Code.Text+CRLF);
+            ptSignal :
+              begin
+              start := 'function T'+ObjectsPrefix + N + '.Connect';
+              midden := Name + ' (proc:T'+ObjectsPrefix + PascalType + 'Function; data:pointer) : guint;'+CRLF+
+                        'begin' + CRLF +
+                        '  result := ' + PascalType + 'Connect';
+              eind := ' (sg' + Name + ', proc, data);' + CRLF +
+                      'end;'+CRLF;
+              Add (start+midden+eind);
+              Add (start+'After'+midden+'After'+eind);
+              end;
+            ptSignalType :
+              begin
+              midden := '';
+              with parameters do
+                begin
+                if count > 0 then
+                  begin
+                  {if lowercase(Items[0].Name) = 'sender' then
+                    l := 1
+                  else
+                    l := 0;
+                  p := count - 1;
+                  if lowercase(Items[p].name) = 'data' then
+                    dec (p);
+                  }
+                  // s = ParameterList for call; midden = parameter for declaration
+                  //s := DoConvert ('TheWidget',ConvertType(Items[0].PascalType,ToGtk),ToLuk);
+                  s := 'TheWidget as ' + Items[0].PascalType;
+                  midden := Items[0].Name+':'+ConvertType(Items[0].PascalType,ToGtk);
+                  for l := 1 to count-2 do
+                    begin
+                    case Items[l].ParamType of
+                      ptVar : start := 'var ';
+                      ptconst : start := 'const ';
+                      else  start := '';
+                    end;
+                    with Items[l] do
+                      if Convert then
+                        begin
+                        midden := midden+'; '+start+Name+':'+ConvertType(PascalType, ToGtk);
+                        s := s+', '+DoConvert (Name,ConvertType(PascalType,ToGtk),ToLuk);
+                        end
+                      else
+                        begin
+                        midden := midden+'; '+start+Name+':'+PascalType;
+                        s := s+', '+Name;
+                        end
+                    end;
+                  p := count - 1;
+                  midden := midden+'; '+Items[p].Name+':'+ConvertType(Items[p].PascalType, ToGtk);
+                  s := s+', TheData';
+                  end
+                else
+                  begin
+                  s := '';
+                  midden := '';
+                  end;
+                end;
+              if PascalType = '' then
+                begin
+                start := 'procedure';
+                eind := '';
+                res := '';
+                end
+              else
+                begin
+                start := 'function';
+                eind := 'result := ';
+                res := ' : '+PascalType;
+                end;
+              Add (start+' '+Name+copy(start,1,4)+' ('+midden+')'+res+'; cdecl;'+CRLF+
+                   'var p : T'+ObjectsPrefix+Name+'Function;'+CRLF+
+                   'begin'+CRLF+
+                   'with PSignalData(data)^ do'+CRLF+
+                   '  begin'+CRLF+
+                   '  p := T'+ObjectsPrefix+Name+'Function (TheSignalProc);'+CRLF+
+                   '  '+eind+'p ('+s+')'+CRLF+
+                   '  end;'+CRLF+
+                   'end;'+CRLF);
+              midden := ' (signal:string; proc:T'+ObjectsPrefix+Name+
+                                              'Function; data:pointer) : guint;'+CRLF+
+                   'begin'+CRLF+
+                   '  result := '+GtkPrefix+'_signal_connect';
+              eind:= ' (FGtkObject, pgChar(signal), '+GtkPrefix+'_signal_func(@'+Name+copy(start,1,4)+'), '+
+                           'ConvertSignalData(T'+ObjectsPrefix+'SignalFunction(proc), data, true));'+CRLF+
+
+                   'end;'+CRLF;
+              start := 'function T'+ObjectsPrefix+N+'.'+Name+'Connect';
+              Add (start+midden+eind);
+              Add (start+'After'+midden+'_After'+eind);
+              end;
+            ptProperty :
+              begin
+              midden := Name;
+              if parameters.count > 0 then
+                start := ','+CalcParameterList (parameters, plImpl)
+              else
+                start := '';
+              if parameters.count > 0 then
+                eind := CalcParameterList (parameters)
+              else
+                eind := '';
+              // Read Function
+              if ReadFuncType = pftProc then
+                begin
+                s := Code.Text;
+                if GtkName <> '' then
+                  midden := GtkName
+                else
+                  midden := 'Get' + midden;
+                end
+              else if ReadFuncType in [pftGtkFunc, pftObjField, pftObjFunc, pftGtkMacro] then
+                begin
+                midden := 'Get'+midden;
+                case ReadFuncType of
+                  pftGtkFunc : s := GtkPrefix+'_'+gn+'_get_'+GtkName+'(TheGtkObject'+start+')';
+                  pftObjField: s := 'TheGtkObject^.'+GtkName;
+                  pftObjFunc : s := 'gtk.'+GtkName+'(TheGtkObject^'+start+')';
+                  pftGtkMacro: s := GtkPrefix+'_'+gn+'_'+GtkName+'(TheGtkObject'+start+')';
+                end;
+                  if ReadConvert then
+                    s := DoConvert (s, PascalType, ToLuk);
+                  s := 'begin'+CRLF+'  result := '+s+';'+CRLF+'end;'+CRLF;
+                end
+              else
+                s := '';
+              if s <> '' then
+                begin
+                if eind = '' then
+                  Add ('function T'+ObjectsPrefix+N+'.'+midden+' : '+PascalType+';'+CRLF+s)
+                else
+                  Add ('function T'+ObjectsPrefix+N+'.'+midden+' ('+eind+') : '+PascalType+';'+CRLF+s);
+                end;
+              // Write procedure
+              midden := Name;
+              if (WriteProcType in [pftGtkFunc,pftObjField,pftObjFunc,pftGtkMacro]) then
+                begin
+                midden := 'Set' + midden;
+                if WriteConvert then
+                  if WriteProcType in [pftObjField, pftObjFunc] then
+                    s := DoConvert ('TheValue', PascalType, ToFPGtk)
+                  else
+                    s := DoConvert ('TheValue', PascalType, ToGtk)
+                else
+                  s := 'TheValue';
+                case WriteProcType of
+                  pftGtkFunc : s := GtkPrefix+'_'+gn+'_set_'+writeGtkName+'(TheGtkObject'+start+','+s+');';
+                  pftGtkMacro: s := GtkPrefix+'_'+gn+'_'+writeGtkName+'(TheGtkObject'+start+','+s+');';
+                  pftObjField: s := 'TheGtkObject^.'+writeGtkName+' := '+s+';';
+                  pftObjFunc : s := 'gtk.'+'Set_'+WriteGtkName+'(TheGtkObject^'+start+','+s+')';
+                end;
+                s := 'begin'+CRLF+'  '+s+CRLF+'end;'+CRLF;
+                end
+              else if WriteProcType = pftProc then
+                begin
+                s := WriteCode.Text;
+                if writegtkname <> '' then
+                  midden := writegtkname
+                else
+                  midden := 'Set' + midden;
+                end
+              else
+                s := '';
+              if s <> '' then
+                begin
+                if eind = '' then
+                  Add ('procedure T'+ObjectsPrefix+N+'.'+midden+' ('+'TheValue:' + PascalType+');'+CRLF+s)
+                else
+                  Add ('procedure T'+ObjectsPrefix+N+'.'+midden+' ('+eind+'; TheValue:' + PascalType+');'+CRLF+s);
+                end;
+              end;
+          end;
+          end;
+      end;
+    DoStepIt;
+  end;
+
+var r, t : integer;
+    Need : boolean;
+    UsedSignals : TStringList;
+
+begin
+  LPublic := TStringList.Create;
+  LPublish := TStringList.Create;
+  LPriv := TStringList.Create;
+  LProt := TStringList.Create;
+  UsedSignals := TStringList.Create;
+  UsedSignals.Sorted := True;
+  lowerObjectsPrefix := lowercase (ObjectsPrefix);
+  ObjectsPrefixLength := length(lowerObjectsPrefix);
+  with TheUnit do
+    try
+      DoStepItMax (FDefinition.Count * 2 + 4);
+      clear;
+      capacity := 70 * FDefinition.Count;
+      add ('{$mode objfpc}{$h+} {$ifdef win32}{$define gtkwin}{$endif}'+CRLF+
+           'UNIT '+UnitName+';'+CRLF+CRLF+
+           '// Generated with GtkWrite by Luk Vandelaer (version '+versionnumber+')'+CRLF+CRLF+
+           'INTERFACE'+CRLF+CRLF+
+           'USES '+UsesList+';');
+      // public declarations before classtypes
+      for r := 0 to pred(FDefinition.count) do
+        with FDefinition[r] do
+          begin
+          Need := True;
+          for t := 0 to Props.count-1 do
+            with Props[t] do
+              if (PropType = ptDeclarations) and (Section = ispublished) then
+                begin
+                if Need then
+                  begin
+                  add ('{ T'+ObjectsPrefix + FDefinition[r].Name + ' }');
+                  Need := False;
+                  end;
+                AddStrings (Code);
+                end;
+          end;
+      DoStepIt;
+      Add (CRLF+'TYPE'+CRLF);
+      //Forward en implementation moeten in dezelfde Type block zitten
+        // Forward declarations
+        for r := 0 to pred(FDefinition.count) do
+          WriteObjectForward (FDefinition[r]);
+        // class declaration
+        add ('');
+        DoStepIt;
+        for r := 0 to pred(FDefinition.count) do
+          WriteObjectInterface (FDefinition[r]);
+      // public declarations after classtypes
+      for r := 0 to pred(FDefinition.count) do
+        with FDefinition[r] do
+          begin
+          Need := True;
+          for t := 0 to Props.count-1 do
+            with Props[t] do
+              if (PropType = ptDeclarations) and (Section = ispublic) then
+                begin
+                if Need then
+                  begin
+                  add ('{ T'+ObjectsPrefix + FDefinition[r].Name + ' }');
+                  Need := False;
+                  end;
+                AddStrings (Code);
+                end;
+          end;
+      // declaration of signal constants
+      Add (CRLF+'Const');
+      for r := 0 to pred(FDefinition.count) do
+        with FDefinition[r] do
+          begin
+          Need := True;
+          for t := 0 to Props.count-1 do
+            with Props[t] do
+              if (Section <> isPrivate) and
+                 (PropType = ptsignal) and
+                 (UsedSignals.indexof (Name) < 0) then
+                begin
+                if Need then
+                  begin
+                  add ('// T'+ObjectsPrefix + FDefinition[r].Name);
+                  Need := False;
+                  end;
+                Add ('  sg' + Name + ' = ''' + lowercase(GtkName)+ ''';');
+                UsedSignals.Add (Name);
+                end;
+          end;
+      Add ('');
+      // public helper functions en procedures
+      for r := 0 to pred(FDefinition.count) do
+        with FDefinition[r] do
+          begin
+          Need := True;
+          for t := 0 to Props.count-1 do
+            with Props[t] do
+              if (Section in sectPublic) then
+                if (PropType = ptHelperFunc) then
+                  begin
+                  if Need then
+                    begin
+                    add ('// T'+ObjectsPrefix + FDefinition[r].Name);
+                    Need := False;
+                    end;
+                  Add ('function ' + Name + CalcParameterList(Parameters, plDecl)
+                           + ' : ' + PascalType+';' + CalcProcTypes(ProcTypes));
+                  end
+                else if (PropType = ptHelperProc) then
+                  begin
+                  if Need then
+                    begin
+                    add ('// T'+ObjectsPrefix + FDefinition[r].Name);
+                    Need := False;
+                    end;
+                  Add ('procedure ' + Name + CalcParameterList(Parameters, plDecl)
+                         + ';' + CalcProcTypes(ProcTypes));
+                  end;
+          end;
+      // Start implementation
+      add (CRLF+'IMPLEMENTATION'+CRLF);
+      // Object implementations
+      for r := 0 to pred(FDefinition.count) do
+        WriteObjectImplementation (FDefinition[r]);
+      // Initializations
+      Add ('INITIALIZATION');
+      DoStepIt;
+      for r := 0 to pred(FDefinition.count) do
+        with FDefinition[r] do
+          begin
+          for t := 0 to Props.count-1 do
+            with Props[t] do
+              if (PropType = ptInitialization) then
+                AddStrings (Code);
+          end;
+      // Finalizations
+      Add (CRLF+'FINALIZATION');
+      DoStepIt;
+      for r := 0 to pred(FDefinition.count) do
+        with FDefinition[r] do
+          begin
+          for t := 0 to Props.count-1 do
+            with Props[t] do
+              if (PropType = ptFinalization) then
+                AddStrings (Code);
+          end;
+      add (CRLF+'End.');
+    finally
+      LPublic.Free;
+      LPublish.Free;
+      LPriv.Free;
+      LProt.Free;
+      UsedSignals.Free;
+    end;
+end;
+
+end.

+ 772 - 0
packages/extra/fpgtk/demo/lister.pp

@@ -0,0 +1,772 @@
+{$mode objfpc}{$h+}
+unit lister;
+
+interface
+
+uses glib, gdk, gtk, FPgtk, classes, fpgtkext, sysutils;
+
+type
+
+  TListWindow = class (TFPgtkWindow)
+  private
+    pb : TFPgtkProgressBar;
+    spin : TFPgtkSpinButton;
+    notebook : TFPgtkNotebook;
+    bar : TFPgtkStatusbar;
+    EContext, EMessage : TFPgtkEntry;
+    IDContext, IDMessage : TFPgtkSpinButton;
+    List : TFPgtkScrollList;
+    ListText : TFPgtkScrollText;
+    CList : TFPgtkScrollCList;
+    CListText : TFPgtkScrollText;
+    Key : TFPgtkSpinButton;
+    ModCtrl, ModAlt, ModShift : TFPgtkToggleButton;
+    KeyName : TFPgtkEntry;
+    AKeyName : TFPgtkAccelLabel;
+    TheAG : guint;
+    AccelBut : TFPgtkButton;
+    VButtons, HButtons : TFPgtkButtonBox;
+    TheLayout : TFPgtkLayout;
+    LayoutX, LayoutY : integer;
+    cal : TFPgtkCalendar;
+    MessageButtons : TMsgDlgButtons;
+    Msg : TFPgtkEntry;
+    DialogType : TFPgtkMenu;
+    procedure AddRemoveButton (Sender:TFPgtkObject; data:pointer);
+    procedure ShowMessageDialog (Sender:TFPgtkObject; data:pointer);
+    procedure Calendar_ShowDate (Sender:TFPgtkObject; data:pointer);
+    procedure Layout_runaway (Sender:TFPgtkObject; data:pointer);
+    procedure ButBox_AddThem (Sender:TFPgtkObject; data:pointer);
+    procedure Accel_Parse (Sender : TFPgtkObject; data : pointer);
+    procedure Accel_AddAccel (Sender : TFPgtkObject; data : pointer);
+    procedure Accel_ConvertToName (Sender : TFPgtkObject; data : pointer);
+    procedure ProgressBar_ShowItToMe (Sender : TFPgtkObject; data : pointer);
+    procedure ProgressBar_SetActivityMode (Sender : TFPgtkObject; data : pointer);
+    procedure ProgressBar_FormatString (Sender : TFPgtkObject; data : pointer);
+    procedure Spinbutton_ClimbRate (Sender : TFPgtkObject; data : pointer);
+    procedure Spinbutton_Digits (Sender : TFPgtkObject; data : pointer);
+    procedure Spinbutton_UpdatePolicy (Sender : TFPgtkObject; data : pointer);
+    procedure Spinbutton_Numeric (Sender : TFPgtkObject; data : pointer);
+    procedure Spinbutton_Wrap (Sender : TFPgtkObject; data : pointer);
+    procedure Spinbutton_SnapToTicks (Sender : TFPgtkObject; data : pointer);
+    procedure MemoMessage_Show (Sender : TFPgtkObject; data : pointer);
+    procedure StatusBar_GetContext (Sender : TFPgtkObject; data : pointer);
+    procedure StatusBar_Push (Sender : TFPgtkObject; data : pointer);
+    procedure StatusBar_Pop (Sender : TFPgtkObject; data : pointer);
+    procedure StatusBar_Remove (Sender : TFPgtkObject; data : pointer);
+    procedure List_ShowSignal (Sender : TFPgtkObject; data : pointer);
+    procedure List_ShowWidgetSignal (Sender : TFPgtkObject; Widget:TFPgtkWidget; data : pointer);
+    procedure List_AddToList (Sender : TFPgtkObject; data : pointer);
+    procedure List_SelectionMode (Sender : TFPgtkObject; data : pointer);
+    procedure List_ClearAll (Sender : TFPgtkObject; data : pointer);
+    procedure List_Clear1_5 (Sender : TFPgtkObject; data : pointer);
+    procedure List_AddCount (Sender : TFPgtkObject; data : pointer);
+    procedure CList_AddToList (Sender : TFPgtkObject; data : pointer);
+    procedure CList_SelectionMode (Sender : TFPgtkObject; data : pointer);
+  public
+    constructor create;
+  end;
+
+
+implementation
+
+const
+  Init_ProgressBar_FormatString = '%p%% (%v of %u)';
+
+constructor TListWindow.Create;
+var b, h : TFPgtkBox;
+    but : TFPgtkButton;
+    tbut : TFPgtkToggleButton;
+    e : TFPgtkEntry;
+    sp : TFPgtkSpinButton;
+    t : TFPgtkScrollText;
+    f : TFPgtkFrame;
+    p : TFPgtkPaned;
+    om : TFPgtkOptionMenu;
+    bb : TFPgtkButtonBox;
+begin
+  inherited create (gtk_window_dialog);
+  border := 10;
+  modal := TRUE;
+  Position := gtk_win_pos_mouse;
+
+  Notebook := TFPgtkNotebook.Create;
+  Notebook.homogenous := false;
+  Notebook.scrollable := true;
+  Add (Notebook);
+
+  // ******* MessageDialog
+
+  writeln ('  MessageDialog');
+  b := TFPgtkVBox.Create;
+  Notebook.AppendPage (b, TFPgtkLabel.Create('MessageDialog'));
+
+  Msg := TFpgtkEntry.Create;
+  Msg.Text := 'This is normal message text';
+  b.packstart (msg, false, false, 0);
+
+  om := TFPgtkOptionMenu.Create;
+  DialogType := NewMenu ('DialogType', [NewMenuItem ('Warning'),NewMenuItem ('Error'),
+           NewMenuItem ('Information'),NewMenuItem ('Confirmation'),NewMenuItem ('Custom')]);
+  om.Menu := DialogType;
+  om.SetHistory (0);
+  b.Packstart (om, false, false, 0);
+
+  bb := TFPgtkHButtonBox.create;
+  tbut := TFPgtkCheckedButton.CreateWithLabel ('Yes');
+  tbut.connectClicked (@AddRemoveButton, inttopointer(ord(mbYes)));
+  bb.PackStart (tbut);
+  tbut := TFPgtkCheckedButton.CreateWithLabel ('No');
+  tbut.connectClicked (@AddRemoveButton, inttopointer(ord(mbNo)));
+  bb.PackStart (tbut);
+  tbut := TFPgtkCheckedButton.CreateWithLabel ('Ok');
+  tbut.connectClicked (@AddRemoveButton, inttopointer(ord(mbOk)));
+  bb.PackStart (tbut);
+  tbut := TFPgtkCheckedButton.CreateWithLabel ('Cancel');
+  tbut.connectClicked (@AddRemoveButton, inttopointer(ord(mbCancel)));
+  bb.PackStart (tbut);
+  b.packstart (bb, false, false, 0);
+
+  bb := TFPgtkHButtonBox.create;
+  tbut := TFPgtkCheckedButton.CreateWithLabel ('Abort');
+  tbut.connectClicked (@AddRemoveButton, inttopointer(ord(mbAbort)));
+  bb.PackStart (tbut);
+  tbut := TFPgtkCheckedButton.CreateWithLabel ('Retry');
+  tbut.connectClicked (@AddRemoveButton, inttopointer(ord(mbRetry)));
+  bb.PackStart (tbut);
+  tbut := TFPgtkCheckedButton.CreateWithLabel ('Ignore');
+  tbut.connectClicked (@AddRemoveButton, inttopointer(ord(mbIgnore)));
+  bb.PackStart (tbut);
+  tbut := TFPgtkCheckedButton.CreateWithLabel ('Help');
+  tbut.connectClicked (@AddRemoveButton, inttopointer(ord(mbHelp)));
+  bb.PackStart (tbut);
+  b.packstart (bb, false, false, 0);
+
+  bb := TFPgtkHButtonBox.create;
+  tbut := TFPgtkCheckedButton.CreateWithLabel ('All');
+  tbut.connectClicked (@AddRemoveButton, inttopointer(ord(mbAll)));
+  bb.PackStart (tbut);
+  tbut := TFPgtkCheckedButton.CreateWithLabel ('NoToALl');
+  tbut.connectClicked (@AddRemoveButton, inttopointer(ord(mbNoToAll)));
+  bb.PackStart (tbut);
+  tbut := TFPgtkCheckedButton.CreateWithLabel ('YesToAll');
+  tbut.connectClicked (@AddRemoveButton, inttopointer(ord(mbYesToAll)));
+  bb.PackStart (tbut);
+  b.packstart (bb, false, false, 0);
+
+  bb := TFPgtkHButtonBox.create;
+  but := TFPgtkButton.CreateWithLabel ('Show Message Dialog !!');
+  but.ConnectClicked (@ShowMessageDialog, nil);
+  bb.Packstart (but);
+  b.packstart (bb, false, false, 0);
+
+  // ******* Calendar
+
+  writeln ('  Calendar');
+  b := TFPgtkVBox.Create;
+  Notebook.AppendPage (b, TFPgtkLabel.Create('Calendar'));
+
+  cal := TFPgtkCalendar.Create;
+  cal.date := encodeDate (2000,1,1);
+  b.PackStart (Cal);
+
+  but := TFPgtkButton.CreateWithLabel ('Show Date');
+  but.ConnectClicked (@Calendar_ShowDate, nil);
+  b.PackEnd (but, false, false, 0);
+
+  // ******* Layout
+
+  writeln ('  Layout');
+  TheLayout := TFPgtkLayout.Create;
+  Notebook.AppendPage (TheLayout, TFPgtkLabel.Create('Layout'));
+  TheLayout.Freeze;
+  e := TFPgtkEntry.Create;
+    e.Text := 'Entry on 25,10 to clearly show where the edges end';
+    TheLayout.Put (e, 25,10);
+  e := TFPgtkEntry.Create;
+    e.Text := 'Entry on 5,50';
+    e.SetUSize (300, 24);
+    TheLayout.Put (e, 5,30);
+  but := TFPgtkButton.CreateWithLabel ('Catch me with doubleclick !!');
+    but.ConnectClicked (@Layout_runaway, nil);
+    but.CanDefault:= true;
+    but.SetUSize (200, 50);
+    TheLayout.put (but, 75, 75);
+    LayoutY := 75;
+    LayoutX := 75;
+  TheLayout.SetSize (350, 400);
+  TheLayout.Thaw;
+
+  // ******* ButtonBox
+
+  writeln ('  ButtonBox');
+  b := TFPgtkVBox.Create;
+  Notebook.AppendPage (b, TFPgtkLabel.Create('Buttonboxes'));
+
+  HButtons := TFPgtkHButtonBox.Create;
+  HButtons.Layout := GTK_BUTTONBOX_end;
+  HButtons.Spacing := 3;
+  b.PackEnd (HButtons, false, false, 0);
+
+  h := TFPgtkHBox.Create;
+  b.PackStart (h, true, true, 0);
+
+  but := TFPgtkButton.CreateWithLabel ('Add a button');
+  but.ConnectClicked (@ButBox_AddThem, nil);
+  h.PackStart (but, false, false, 3);
+
+  VButtons := TFPgtkVButtonBox.Create;
+  VButtons.Layout := GTK_Buttonbox_Start;
+  VButtons.Spacing := 15;
+  h.PackEnd (VButtons, false, false,0);
+
+  // ******* Accelerator
+
+  writeln ('  Accelerator');
+  b := TFPgtkVBox.Create;
+  Notebook.AppendPage (b, TFPgtkLabel.Create('Accelorators'));
+
+  TheAG := AccelGroupNew;
+
+  h := TFPgtkHBox.Create;
+  b.PackStart (h, false, false, 0);
+  but := TFPgtkButton.CreateWithLabel('Parse');
+  but.ConnectClicked (@Accel_Parse, nil);
+  h.PackStart (but, false, false, 0);
+  Key := TFPgtkSpinButton.Create;
+  h.PackStart (Key);
+  Key.adjustment.configure (0, $FFFF, GDK_Delete, 1, 256, 0);
+  Key.Configure (nil, 100, 0);
+
+  h := TFPgtkHBox.Create;
+  b.PackStart (h, false, false, 0);
+  h.homogeneous := true;
+  ModShift := TFPgtkCheckedButton.CreateWithLabel('Shift');
+  h.PackStart (ModShift);
+  ModCtrl := TFPgtkCheckedButton.CreateWithLabel('Ctrl');
+  ModCtrl.active := true;
+  h.Packstart(ModCtrl);
+  ModAlt := TFPgtkCheckedButton.CreateWithLabel('Alt');
+  h.Packstart (ModAlt);
+
+  h := TFPgtkHBox.create;
+  b.PackStart (h, false, false, 0);
+  AccelBut := TFPgtkButton.createwithLabel ('Show');
+  Accelbut.ConnectClicked (@Accel_ConvertToName, nil);
+  //AcceleratorAdd (TheAG, Accelbut, sgClicked, Gdk_S, Gdk_Control_mask, GTK_ACCEL_VISIBLE);
+  h.PackStart (Accelbut,false,false,0);
+  KeyName := TFPgtkEntry.Create;
+  h.Packstart (KeyName);
+
+  h := TFPgtkHBox.create;
+  but := TFPgtkButton.CreateWithLabel ('Add');
+  but.ConnectClicked (@Accel_AddAccel, nil);
+  h.PackStart (but, false, false, 0);
+  but := TFPgtkButton.Create;
+  AKeyName := TFPgtkAccelLabel.create ('Accellerators');
+  but.Add (AKeyName);
+  AKeyName.accelwidget := AccelBut;
+  AKeyname.refetch;
+  h.PackStart (but, true, true, 0);
+  b.PackStart (h, false, false, 0);
+
+  // ******* CList
+
+  writeln ('  CList');
+  p := TFPgtkVPaned.Create;
+  Notebook.AppendPage (p, TFPgtkLabel.Create('CList'));
+
+  CList := TFPgtkScrollCList.Create (1);
+  p.Pack1 (CList, true, true);
+  b := TFPgtkVBox.Create;
+  p.Pack2 (b, false, true);
+  p.handleSize := 5;
+  p.ComputePosition (100, 60, 50);
+
+  CListText := TFPgtkScrollText.create;
+  b.Packstart (CListText);
+
+  h := TFPgtkHBox.Create;
+  b.PackStart (h, false, false, 0);
+
+  but := TFPGtkButton.CreateWithLabel('Add');
+  but.ConnectClicked (@CList_AddToList, CListText.TheText);
+  h.PackStart (but, false, false, 0);
+
+  h := TFPgtkHBox.Create;
+  h.PackStart (TFPGtkLabel.Create('Selection Mode'), false, false, 2);
+  om := TFPgtkOptionMenu.Create;
+  om.Menu := NewMenu ('Selection Mode', [
+                 NewMenuItem ('Single',@CList_SelectionMode, inttopointer(0)),
+                 NewMenuItem ('Browse',@CList_SelectionMode, inttopointer(1)),
+                 NewMenuItem ('Mutiple',@CList_SelectionMode, inttopointer(2)),
+                 NewMenuItem ('Extended',@CList_SelectionMode, inttopointer(3))]);
+  om.SetHistory (0);
+  CList.CList.SelectionMode := GTK_SELECTION_SINGLE;
+  h.Packstart (om, true, true, 0);
+
+  b.PackStart (h, false, false, 0);
+
+  // ******* List
+
+  writeln ('  List');
+  p := TFPgtkVPaned.Create;
+  Notebook.AppendPage (p, TFPgtkLabel.Create('List'));
+
+  List := TFPgtkScrollList.Create;
+  p.Pack1 (List, true, true);
+  b := TFPgtkVBox.Create;
+  p.Pack2 (b, false, true);
+  p.handleSize := 5;
+  p.ComputePosition (100, 60, 50);
+
+  ListText := TFPgtkScrollText.create;
+  b.Packstart (ListText);
+
+  h := TFPgtkHBox.Create;
+  b.PackStart (h, false, false, 0);
+
+  but := TFPGtkButton.CreateWithLabel('Add');
+  but.ConnectClicked (@List_AddToList, ListText.TheText);
+  h.PackStart (but, false, false, 0);
+
+  but := TFPGtkButton.CreateWithLabel('Add Count');
+  but.ConnectClicked (@List_AddCount, ListText.TheText);
+  h.PackStart (but, false, false, 0);
+
+  but := TFPGtkButton.CreateWithLabel('Clear 1-5');
+  but.ConnectClicked (@List_Clear1_5, ListText.TheText);
+  h.PackStart (but, false, false, 0);
+
+  but := TFPGtkButton.CreateWithLabel('Clear all');
+  but.ConnectClicked (@List_ClearAll, ListText.TheText);
+  h.PackStart (but, false, false, 0);
+
+  h := TFPgtkHBox.Create;
+  h.PackStart (TFPGtkLabel.Create('Selection Mode'), false, false, 2);
+  om := TFPgtkOptionMenu.Create;
+  om.Menu := NewMenu ('Selection Mode', [
+                 NewMenuItem ('Single','','',@List_SelectionMode, inttopointer(0)),
+                 NewMenuItem ('Browse','','',@List_SelectionMode, inttopointer(1)),
+                 NewMenuItem ('Mutiple','','',@List_SelectionMode, inttopointer(2)),
+                 NewMenuItem ('Extended','','',@List_SelectionMode, inttopointer(3))]);
+  om.SetHistory (0);
+  List.List.SelectionMode := GTK_SELECTION_SINGLE;
+  h.Packstart (om, true, true, 0);
+
+  b.PackStart (h, false, false, 0);
+
+  // ******* Statusbar
+
+  writeln ('  Statusbar');
+  b := TFPgtkVBox.Create;
+  Notebook.appendPage (b, TFPgtkLabel.Create('Statusbar'));
+
+  bar := TFPgtkStatusbar.Create;
+  b.Packend (bar, false, true, 0);
+
+  f := TFPgtkFrame.Create;
+  f.Text := 'Context';
+  h := TFPgtkHbox.Create;
+  IDContext := TFPgtkSpinbutton.Create;
+  IDContext.configure (nil, 1000, 0);
+  IDContext.adjustment.configure (-maxint, maxint, 0, 1, 100,0);
+  EContext := TFPgtkEntry.Create;
+  EContext.ConnectChanged (@StatusBar_GetContext, IDContext);
+  h.Packstart (EContext, true, true, 0);
+  h.packstart (TFPgtkLabel.Create('ID'), false, false, 2);
+  h.packstart (IDContext, false, false, 0);
+  f.add (h);
+  b.Packstart (f, false, true, 0);
+
+  f := TFPgtkFrame.Create;
+  f.Text := 'Message';
+  h := TFPgtkHbox.Create;
+  IDMessage := TFPgtkSpinbutton.Create;
+  IDMessage.configure (nil, 1000, 0);
+  IDMessage.adjustment.configure (-maxint, maxint, 0, 1, 100,0);
+  EMessage := TFPgtkEntry.Create;
+  h.Packstart (EMessage, true, true, 0);
+  h.packstart (TFPgtkLabel.Create('ID'), false, false, 2);
+  h.packstart (IDMessage, false, false, 0);
+  f.add (h);
+  b.Packstart (f, false, true, 0);
+
+  h := TFPgtkHBox.Create;
+  h.homogeneous := true;
+  b.Packstart (h, false, false, 2);
+
+  but := TFPgtkButton.CreateWithLabel ('Push');
+  but.ConnectClicked (@statusbar_Push, EMessage);
+  h.Packstart (but, false, true, 2);
+
+  but := TFPgtkButton.CreateWithLabel ('Pop');
+  but.ConnectClicked (@statusbar_Pop, EMessage);
+  h.Packstart (but, false, true, 2);
+
+  but := TFPgtkButton.CreateWithLabel ('Remove');
+  but.ConnectClicked (@statusbar_Remove, EMessage);
+  h.Packstart (but, false, true, 2);
+
+  // ******* Memo and ShowMessage
+
+  writeln ('  Memo / ShowMessage');
+  b := TFPgtkVBox.Create;
+  Notebook.appendPageFull (b, TFPgtkLabel.Create('Memo Message'), TFPgtkLabel.Create('Memo and ShowMessage'),true);
+
+  t := TFPgtkScrollText.Create;
+  b.PackStart (t, true, true, 10);
+
+  but := TFPgtkButton.CreateWithLabel ('Show text');
+  but.ConnectClicked (@MemoMessage_Show, t);
+  b.PackStart (but, false, false, 2);
+
+  // ******* File Selection
+
+  writeln ('  File selection');
+  b := TFPgtkVBox.Create;
+  Notebook.appendPageFull (b, TFPgtkLabel.Create('File selection'), TFPgtkLabel.Create('File selection dialog'),true);
+
+  b.PackStart (TFPgtkFileEntry.Create, false, true, 10);
+
+  // ******* Progress bar page
+
+  b := TFPgtkVBox.Create;
+  Notebook.appendPageFull (b, TFPgtkLabel.Create('Progress'), TFPgtkLabel.Create('The Progressbar'),true);
+
+  pb := TFPgtkProgressBar.Create (nil);
+  with pb do
+    begin
+    formatstring := Init_ProgressBar_FormatString;
+    showText := true;
+    configure (50.0, 0.0, 500.0);
+    end;
+  b.Packstart (pb, false, false, 3);
+
+  but := TFPgtkButton.createWithLabel ('Run the bar');
+  but.ConnectClicked (@ProgressBar_ShowItToMe, nil);
+  b.PackStart (but, false, false, 3);
+
+  but := TFPgtkCheckbutton.CreateWithLabel ('Activity mode');
+  but.ConnectClicked (@ProgressBar_SetActivityMode, pb);
+  b.PackStart (but, false, false, 3);
+
+  b.Packstart (TFPgtkLabel.Create ('Format text'), false, false, 10);
+
+  e := TFPgtkEntry.Create;
+  e.Text := Init_ProgressBar_FormatString;
+  e.ConnectChanged (@ProgressBar_FormatString, pb);
+  b.Packstart(e, false, false, 0);
+
+  // ******* Spinbutton
+  writeln ('  page creation');
+  b := TFPgtkVBox.Create;
+  Notebook.appendPageFull (b, TFPgtkLabel.Create('SpinButton'), TFPgtkLabel.Create('Spinbuttons'),true);
+
+  Spin := TFPgtkSPinButton.Create;
+  Spin.Configure (nil,0.01,3);
+  Spin.Adjustment.configure (-100.0, 100.0, 10.25, 0.01, 0.1, 1.0);
+  Spin.digits := 2;
+  Spin.numeric := false;
+  Spin.Wrap := false;
+  Spin.SnapToTicks := false;
+  b.PackStart (spin, false, false, 0);
+
+  b.PackStart (TFPgtkLabel.Create('Climb rate'), false, false, 0);
+  sp := TFPgtkSpinButton.Create;
+  with sp do
+    begin
+    with Adjustment do
+      begin
+      Configure (0.0, 1.0, 0.01, 0.01, 0.20, 0.0);
+      ConnectValueChanged (@Spinbutton_ClimbRate, sp);
+      end;
+    digits := 3;
+    ClimbRate := 0.01;
+    SnapToTicks := False;
+    end;
+  b.PackStart (sp, false, false, 0);
+
+  b.PackStart (TFPgtkLabel.Create('Digits'), false, false, 0);
+  sp := TFPgtkSpinButton.Create;
+  with sp do
+    begin
+    with adjustment do
+      begin
+      Configure (0.0, 5.0, 2.0, 1.0, 1.0, 0.0);
+      ConnectValueChanged (@Spinbutton_Digits, sp);
+      end;
+    Configure (nil,1,0);
+    SnapToTicks := True;
+    end;
+  b.PackStart (sp, false, false, 0);
+
+  tbut := TFPgtkToggleButton.CreateWithLabel ('Numeric');
+  tbut.ConnectToggled (@SpinButton_numeric, Spin);
+  b.PackStart (tbut, false, false, 0);
+
+  tbut := TFPgtkToggleButton.CreateWithLabel ('Wrap');
+  tbut.ConnectToggled (@SpinButton_Wrap, Spin);
+  b.PackStart (tbut, false, false, 0);
+
+  tbut := TFPgtkToggleButton.CreateWithLabel ('Snap to ticks');
+  tbut.ConnectToggled (@SpinButton_SnapToTicks, Spin);
+  b.PackStart (tbut, false, false, 0);
+
+  // ******* Last empty page
+
+  writeln ('  Empty page');
+  Notebook.appendPageFull (TFPgtkLabel.Create('This page is left intentionally blank'), TFPgtkLabel.Create('Empty'), nil, true);
+
+  Notebook.enablePopup;
+
+end;
+
+// ******* Progressbar
+
+procedure TListWindow.ProgressBar_ShowItToMe (Sender : TFPgtkObject; data : pointer);
+var k, r, t : integer;
+begin
+  for r := 0 to 500 do
+    begin
+    pb.CurrentValue := (r + 0.1);
+    for t := 0 to random(5) do
+      k := random(1000)*5 div 2542 + 15;
+    end;
+end;
+
+procedure TListWindow.ProgressBar_SetActivityMode (Sender : TFPgtkObject; data : pointer);
+begin
+  TFPgtkProgressBar(data).ActivityMode := TFPgtkCheckButton(Sender).Active;
+end;
+
+procedure TListWindow.ProgressBar_FormatString (Sender : TFPgtkObject; data : pointer);
+begin
+  TFPgtkProgressBar(data).Formatstring := TFPgtkEntry(Sender).Text;
+end;
+
+// ******* Spinbutton
+
+procedure TListWindow.Spinbutton_ClimbRate (Sender : TFPgtkObject; data : pointer);
+begin
+  spin.climbrate := TFPgtkSpinbutton(data).asFloat;
+end;
+
+procedure TListWindow.Spinbutton_Digits (Sender : TFPgtkObject; data : pointer);
+begin
+  spin.digits := TFPgtkSpinbutton(data).asinteger;
+end;
+
+procedure TListWindow.Spinbutton_UpdatePolicy (Sender : TFPgtkObject; data : pointer);
+begin
+end;
+
+procedure TListWindow.Spinbutton_Numeric (Sender : TFPgtkObject; data : pointer);
+begin
+  TFPgtkSpinbutton(data).Numeric := (Sender as TFPgtkToggleButton).Active;
+end;
+
+procedure TListWindow.Spinbutton_Wrap (Sender : TFPgtkObject; data : pointer);
+begin
+  TFPgtkSpinbutton(data).Wrap := (Sender as TFPgtkToggleButton).Active;
+end;
+
+procedure TListWindow.Spinbutton_SnapToTicks (Sender : TFPgtkObject; data : pointer);
+begin
+  TFPgtkSpinbutton(data).SnapToTicks := (Sender as TFPgtkToggleButton).Active;
+end;
+
+{ Memo and ShowMessage }
+
+procedure TListWindow.MemoMessage_Show (Sender : TFPgtkObject; data : pointer);
+begin
+  ShowMessage ('You typed:', TFPgtkScrollText(data).Text);
+end;
+
+{ Statusbar }
+
+procedure TListWindow.StatusBar_Push (Sender : TFPgtkObject; data : pointer);
+begin
+  IDMessage.asinteger := bar.push (IDContext.asinteger, EMessage.Text);
+end;
+
+procedure TListWindow.StatusBar_Pop (Sender : TFPgtkObject; data : pointer);
+begin
+  bar.pop (IDContext.asinteger);
+end;
+
+procedure TListWindow.StatusBar_Remove (Sender : TFPgtkObject; data : pointer);
+begin
+  bar.Remove (IDContext.asinteger, IDMessage.asinteger);
+end;
+
+procedure TListWindow.StatusBar_GetContext (Sender : TFPgtkObject; data : pointer);
+begin
+  IDContext.asinteger := bar.GetContextID (EContext.Text);
+end;
+
+{ List }
+
+const ListSignalNames : array[0..15] of string =
+        (sgSelectionChanged,sgSelectChild,sgUnselectChild,
+         sgToggleFocusRow,sgSelectAll,sgUnselectAll,sgUndoSelection,
+         sgStartSelection,sgEndSelection,sgToggleAddMode,
+         sgExtendSelection,sgScrollVertical,sgScrollHorizontal,
+         sgSelect,sgDeselect,sgToggle);
+
+procedure TListWindow.List_ShowSignal (Sender : TFPgtkObject; data : pointer);
+var r : integer;
+begin
+  r := PointerToInt (data);
+  writeln (Sender.Classname, ' emitted signal ',ListSignalNames[r]);
+end;
+
+procedure TListWindow.List_ShowWidgetSignal (Sender : TFPgtkObject; widget:TFPgtkWidget; data : pointer);
+var r : integer;
+begin
+  r := PointerToInt (data);
+  writeln (Sender.Classname, ' emitted signal ',ListSignalNames[r]);
+end;
+
+procedure TListWindow.List_AddToList (Sender : TFPgtkObject; data : pointer);
+var t : TFPgtkText;
+    l : TFPgtkListItemGroup;
+begin
+  l := TFPgtkListItemGroup.Create;
+  try
+    t := TFPgtkText(data);
+    l.FillFromList (t.Lines);
+    List.List.AppendItems (l);
+  finally
+    l.free;
+  end;
+end;
+
+procedure TListWindow.List_SelectionMode (Sender : TFPgtkObject; data : pointer);
+var r : integer;
+begin
+  r := pointertoint(data);
+  List.List.SelectionMode := TGtkSelectionMode(r);
+end;
+
+procedure TListWindow.List_ClearAll (Sender : TFPgtkObject; data : pointer);
+begin
+  List.List.ClearAll;
+end;
+
+procedure TListWindow.List_Clear1_5 (Sender : TFPgtkObject; data : pointer);
+begin
+  List.List.ClearItems(1,5);
+end;
+
+procedure TListWindow.List_AddCount (Sender : TFPgtkObject; data : pointer);
+var li : TFPgtkListItem;
+begin
+  li := TFPgtkListItem.CreateWithLabel ('Count');
+  List.List.Add (li);
+end;
+
+{ CList }
+
+procedure TListWindow.CList_AddToList (Sender : TFPgtkObject; data : pointer);
+var t : TFPgtkText;
+    l : TStrings;
+    r : integer;
+begin
+  t := TFPgtkText(data);
+  l := t.Lines;
+  writeln ('Going to add... (',l.commatext,')');
+  with l do
+    for r := 0 to count-1 do
+      CList.CList.Append (l[r],'');
+end;
+
+procedure TListWindow.CList_SelectionMode (Sender : TFPgtkObject; data : pointer);
+var r : integer;
+begin
+  r := pointertoint(data);
+  CList.CList.SelectionMode := TGtkSelectionMode(r);
+end;
+
+{ Accelerators }
+
+procedure Tlistwindow.Accel_ConvertToName (Sender : TFPgtkObject; data : pointer);
+var Mods : TGdkModifierType;
+begin
+  Mods := 0;
+  if ModCtrl.active then
+    Mods := Mods + Gdk_Control_Mask;
+  if ModShift.active then
+    Mods := Mods + Gdk_Shift_Mask;
+  if ModAlt.active then
+    Mods := Mods + Gdk_Mod1_Mask;
+  KeyName.Text := AccelKeyName (Key.asinteger, mods);
+end;
+
+procedure TListWindow.Accel_Parse (Sender : TFPgtkObject; data : pointer);
+var Mods : TGdkModifierType;
+    K : guint;
+begin
+  AccelKeyParse (KeyName.Text, K, Mods);
+  ModCtrl.active := (Mods and Gdk_Control_mask) <> 0;
+  ModShift.active := (Mods and Gdk_Shift_mask) <> 0;
+  ModAlt.active := (Mods and Gdk_Mod1_mask) <> 0;
+  Key.Asinteger := k;
+end;
+
+procedure TListWindow.Accel_AddAccel (Sender : TFPgtkObject; data : pointer);
+var Mods : TGdkModifierType;
+begin
+  Mods := 0;
+  if ModCtrl.active then
+    Mods := Mods + Gdk_Control_Mask;
+  if ModShift.active then
+    Mods := Mods + Gdk_Shift_Mask;
+  if ModAlt.active then
+    Mods := Mods + Gdk_Mod1_Mask;
+  AcceleratorAdd (TheAG, AccelBut, sgClicked, Key.Asinteger, mods, GTK_ACCEL_VISIBLE);
+  AKeyName.refetch;
+end;
+
+const ButBoxCount : integer = 0;
+
+procedure TListWindow.ButBox_AddThem (Sender:TFPgtkObject; data:pointer);
+begin
+  inc (ButBoxCount);
+  VButtons.PackStart (TFPgtkButton.CreateWithLabel (format ('But %d',[ButBoxCount])),false,false,1);
+  HButtons.PackStart (TFPgtkButton.CreateWithLabel (format ('But %d',[ButBoxCount])),false,false,1);
+end;
+
+procedure TListWindow.Layout_runaway (Sender:TFPgtkObject; data:pointer);
+begin
+  randomize;
+  LayoutX := LayoutX + 100 - random(200);
+  if LayoutX < 0 then
+    LayoutX := random(200);
+  LayoutY := LayoutY + 100 - random(200);
+  if LayoutY < 0 then
+    LayoutY := random(200);
+  TheLayout.move (Sender as TFPgtkWidget, LayoutX, LayoutY);
+end;
+
+procedure TListWindow.Calendar_ShowDate (Sender:TFPgtkObject; data:pointer);
+begin
+  ShowMessage ('Calendar', 'Date selected: ' + formatdatetime ('dd/mm/yyyy', cal.date));
+end;
+
+procedure TlistWindow.AddRemoveButton (Sender:TFPgtkObject; data:pointer);
+var mdb : TMsgDlgBtn;
+begin
+  mdb := TMsgDlgBtn(data);
+  if (Sender as TFPgtkToggleButton).Active then
+    MessageButtons := MessageButtons + [mdb]
+  else
+    MessageButtons := MessageButtons - [mdb];
+end;
+
+procedure TlistWindow.ShowMessageDialog (Sender:TFPgtkObject; data:pointer);
+begin
+  MessageDlg (Msg.Text, TMsgDlgType(DialogType.ActiveIndex), MessageButtons, 0);
+end;
+
+end.

+ 21 - 0
packages/extra/fpgtk/demo/testgtk.pp

@@ -0,0 +1,21 @@
+{$mode objfpc}
+program TestGTK;
+
+uses SysUtils, classes, FPgtk, FPgtkExt, lister;
+
+begin
+  try
+    writeln ('Creating application');
+    application := TFPgtkApplication.Create;
+    writeln ('Setting mainwindow');
+    application.MainWindow := TlistWindow.Create;
+    writeln ('Running GTK');
+    application.Run;
+    writeln ('Everything Closed');
+    application.Free;
+    writeln ('Cleaned up everything');
+  except
+    on e : Exception do
+      writeln ('UNEXPECTED ERORR: ',e.message);
+  end;
+end.

+ 110 - 0
packages/extra/fpgtk/demo/testgtk.ppr

@@ -0,0 +1,110 @@
+[RunParams]
+ExeHost=
+ExeParams=
+[General]
+MainName=%PRJPATH\TestGTK.pp
+[DefaultProjectSettings]
+MsgOnlyErrors=1
+MsgGeneralInfo=1
+MsgWarnings=1
+MsgNotes=1
+MsgHints=1
+MsgLineNum=0
+MsgFilesOpen=0
+MsgFilesTriedOpen=0
+MsgPrintProcFunc=0
+MsgWarnConditional=0
+MsgDefinedMacros=0
+MsgAdditionalDbg=0
+MsgWriteAll=0
+MsgNoMessages=0
+MsgDeclOnOverloadErr=0
+MsgOutputExeInfo=0
+MsgRhideMode=0
+MsgSaveErrors=1
+GenerateAssm=0
+AssmDonNotDelete=0
+AssmIncludeSrc=0
+AssmRegInfo=0
+AssmTempInfo=0
+AssmGNU=0
+AssmNasm=0
+AssmObjNasm=0
+AssmObjMasm=0
+AssmObjTasm=0
+OutBrowseInfo=1
+OutIncLocal=1
+OutDll=0
+OutExe=1
+HeapSize=8000000
+OutIO=1
+OutNoLink=0
+OutOverflow=1
+OutRange=1
+StackSize=1048576
+OutStatic=0
+OutStackCheck=0
+OutSmartLink=1
+OutDbgGDB=1
+OutDbgDBX=0
+OutHeaptrc=0
+OutGprof=0
+OutNoLinkNoAsm=0
+OutStripSym=0
+OutLink=0
+OutLinkDll=0
+OutLinkStatic=0
+OtmSize=0
+OtmSpeed=1
+OtmReg=0
+OtmUncertain=0
+OtmLevels=1
+OtmLevel1=0
+OtmLevel2=1
+OtmLevel3=0
+OtmProcessor=0
+Otm386=0
+OtmPentium=1
+OtmPII=0
+OtmNoOptimization=0
+LangATT=1
+LangIntel=0
+LangDirect=0
+LangDelphi2=0
+LangCOperators=0
+LangDelphiCompatible=0
+LangStopOnFirst=0
+LangSupportLabel=0
+LangAnsiStrings=0
+LangCInline=0
+LangCMacros=0
+LangTP=0
+LangGPC=0
+LangConDes=0
+LangAllowStatic=0
+LangNoCheckUnit=0
+LangCompSys=0
+WBaseAddress=268435456
+WRelocation=0
+WConsole=1
+TargetType=0
+[ProjectDirs]
+OutFileName=TestGTK.exe
+CondDef=gtkwin
+CondUnDef=
+OutPath=
+UnitOutPath=
+UnitPath=..;\pp\units\win32\fcl;\pp\units\win32\gtk
+LibPath=
+IncPath=
+ObjPath=
+
+[OpenFiles]
+NumOpenFiles=2
+OpenFile1=%PRJPATH\lister.pp
+OpenFile2=%PRJPATH\testgtk.pp
+[ProjectFiles]
+NumProjectFiles=3
+ProjectFile1=%PRJPATH\lister.pp
+ProjectFile2=D:\pp\LukGtk\FPgtkExt.pp
+ProjectFile3=D:\pp\LukGtk\FPgtk.pp

+ 438 - 0
packages/extra/fpgtk/editor/buttonrow.pp

@@ -0,0 +1,438 @@
+{$mode objfpc}{$h+}
+unit ButtonRow;
+
+interface
+
+uses classes, glib, gtk, gdk, FPgtk;
+
+type
+
+  TRefreshProc = procedure (Selected:TCollectionItem; NeedFocus:boolean) of object;
+  TCalcIconFunc = procedure (Item:TCollectionItem; var Pixmap:PGdkPixMap; var mask:PGdkBitmap) of object;
+
+  TButtonRow = class (TFPGtkToolbar)
+  private
+    FMFirst, FMPrev, FMNext, FMLast,
+    FMCopy, FMAdd, FMDelete, FMUp, FMDown : TFPGtkMenuItem;
+    FCopy, FAdd, FDelete, FUp, FDown : TFPGtkWidget;
+    ICopy, IUp, IDown, IDelete, IAdd : TFPgtkPixmap;
+    FCollection : TCollection;
+    FList : TFPgtkCList;
+    FRefreshProc : TRefreshProc;
+    FCalcIconFunc : TCalcIconFunc;
+    FSelectIndex : integer;
+    FNeedFocus : boolean;
+    FTitle : string;
+    AccelGroup : PGtkAccelGroup;
+    procedure SetTitle (Value : string);
+    procedure CreatePixmaps;
+    procedure NewSelection (Sender : TFPgtkObject; row,column:integer;
+                            event:PGdkEventButton; data : pointer);
+    procedure ClickedAdd (Sender : TFPgtkObject; data : pointer);
+    procedure ClickedCopy (Sender : TFPgtkObject; data : pointer);
+    procedure ClickedDelete (Sender : TFPgtkObject; data : pointer);
+    procedure ClickedUp (Sender : TFPgtkObject; data : pointer);
+    procedure ClickedDown (Sender : TFPgtkObject; data : pointer);
+    procedure ClickedFirst (Sender : TFPgtkObject; data : pointer);
+    procedure ClickedPrevious (Sender : TFPgtkObject; data : pointer);
+    procedure ClickedNext (Sender : TFPgtkObject; data : pointer);
+    procedure ClickedLast (Sender : TFPgtkObject; data : pointer);
+    procedure CheckSensitive (index : integer);
+    procedure FillList;
+  public
+    constructor create;
+    procedure Configure (TheList : TFPgtkCList;
+                         CalcIconFunc : TCalcIconFunc;
+                         RefreshProc : TRefreshProc;
+                         TheSubMenu : TFPgtkMenuShell;
+                         AG : PGtkAccelGroup;
+                         Mods : TGdkModifierType);
+    procedure ChangeCollection (ACollection : TCollection);
+    function CurrentItem : TCollectionItem;
+    property SelectedRow : integer read FSelectIndex;
+    property Title : string read FTitle write SetTitle;
+
+  end;
+
+implementation
+
+uses XPMs, GtkDefTexts, FPgtkExt;
+
+var
+  DefAdd, DefCopy, DefDel, DefUp, DefDown : PGdkPixmap;
+  DefAddM, DefCopyM, DefDelM, DefUpM, DefDownM : PGdkBitmap;
+
+{ TButtonRow }
+
+procedure TButtonRow.SetTitle (Value : string);
+begin
+  FTitle := Value + ': ';
+end;
+
+procedure TButtonRow.CreatePixmaps;
+begin
+  IAdd := TFPgtkPixmap.Create;
+  ICopy := TFPgtkPixmap.Create;
+  IDelete := TFPgtkPixmap.Create;
+  IUp := TFPgtkPixmap.Create;
+  IDown := TFPgtkPixmap.Create;
+  if assigned (DefAdd) then
+    begin
+    IAdd.SetPixmap (DefAdd, DefAddM);
+    ICopy.SetPixmap (DefCopy, DefCopyM);
+    IDelete.SetPixmap (DefDel, DefDelM);
+    IUp.SetPixmap (DefUp, DefUpM);
+    IDown.SetPixmap (DefDown, DefDownM);
+    end
+  else
+    begin
+    IAdd.LoadFromArray (XPMEditAdd);
+    ICopy.LoadFromArray (XPMEditCopy);
+    IDelete.LoadFromArray (XPMEditDelete);
+    IUp.LoadFromArray (XPMEditUp);
+    IDown.LoadFromArray (XPMEditDown);
+    IAdd.GetPixmap (DefAdd, DefAddM);
+    ICopy.GetPixmap (DefCopy, DefCopyM);
+    IDelete.GetPixmap (DefDel, DefDelM);
+    IUp.GetPixmap (DefUp, DefUpM);
+    IDown.GetPixmap (DefDown, DefDownM);
+    end;
+end;
+
+constructor TButtonRow.create;
+begin
+  inherited;
+  // Create the Pixmaps
+  CreatePixMaps;
+  // Configure the toolbar
+  ButtonRelief := Gtk_Relief_None;
+  // Create the buttons with the pixmaps
+  FAdd := AppendItem ('',RemoveUnderscore(smAdd),'',IAdd, @ClickedAdd, nil);
+  FAdd.Sensitive := False;
+  FCopy := AppendItem ('',RemoveUnderscore(smCopy),'',ICopy, @ClickedCopy, nil);
+  FCopy.Sensitive := False;
+  FDelete := AppendItem ('',RemoveUnderscore(smDelete),'',IDelete, @ClickedDelete, nil);
+  FDelete.Sensitive := False;
+  AppendSpace;
+  FUp := AppendItem ('',RemoveUnderscore(smUp),'',IUp, @ClickedUp, nil);
+  FUp.Sensitive := False;
+  FDown := AppendItem ('',RemoveUnderscore(smDown),'',IDown, @ClickedDown, nil);
+  FDown.Sensitive := False;
+end;
+
+procedure TButtonRow.Configure (TheList : TFPgtkCList;
+                         CalcIconFunc : TCalcIconFunc;
+                         RefreshProc : TRefreshProc;
+                         TheSubMenu : TFPgtkMenuShell;
+                         AG : PGtkAccelGroup;
+                         Mods : TGdkModifierType);
+
+  function MyKeyDef (Key : guint) : PAccelKeyDef;
+  begin
+    if Mods = 0 then
+      result := nil
+    else
+      result := MakeAccelKeyDef (AG, Key, Mods);
+  end;
+begin
+  FList := TheList;
+  FCollection := nil;
+  FRefreshProc := RefreshProc;
+  FCalcIconFunc := CalcIconFunc;
+  with FList do
+    begin
+    SelectionMode := Gtk_Selection_Browse;
+    ConnectSelectRow (@NewSelection, nil);
+    SetColumnAutoResize (0, true);
+    if assigned (FCalcIconFunc) then
+      SetColumnAutoResize (1, true);
+    end;
+  with TheSubMenu do
+    begin
+    FMAdd := NewMenuItem (smAdd, '', '', MyKeyDef (gdk_A), @ClickedAdd, nil);
+    FMDelete := NewMenuItem (smDelete, '', '', MyKeyDef (gdk_D), @ClickedDelete, nil);
+    FMCopy := NewMenuItem (smCopy, '', '', MyKeyDef (gdk_C), @ClickedCopy, nil);
+    FMUp := NewMenuItem (smUp, '', '', MyKeyDef (gdk_U), @ClickedUp, nil);
+    FMDown := NewMenuItem (smDown, '', '', MyKeyDef (gdk_O), @ClickedDown, nil);
+    FMFirst := NewMenuItem (smFirst, '', '', MyKeyDef (gdk_F), @ClickedFirst, nil);
+    FMLast := NewMenuItem (smLast, '', '', MyKeyDef (gdk_L), @ClickedLast, nil);
+    FMPrev := NewMenuItem (smPrevious, '', '', MyKeyDef (gdk_P), @ClickedPrevious, nil);
+    FMNext := NewMenuItem (smNext, '', '', MyKeyDef (gdk_N), @ClickedNext, nil);
+    Add (FMAdd);
+    Add (FMCopy);
+    Add (FMDelete);
+    Add (NewLine);
+    Add (FMUp);
+    Add (FMDown);
+    Add (NewLine);
+    Add (FMFirst);
+    Add (FMPrev);
+    Add (FMNext);
+    Add (FMLast);
+    end;
+  CheckSensitive (-1);
+end;
+
+procedure TButtonRow.FillList;
+var r : integer;
+    pm : PGdkPixMap;
+    m : PGdkBitmap;
+begin
+  FList.Freeze;
+  try
+    FList.Clear;
+    if assigned (FCollection) and (FCollection.Count > 0) then
+      with FCollection do
+        begin
+        if assigned (FCalcIconFunc) then
+          for r := 0 to count-1 do
+            begin
+            FCalcIconFunc (Items[r], pm, m);
+            FList.Append (['',Items[r].Displayname]);
+            FList.SetPixmap (r, 0, pm, m);
+            end
+        else
+          for r := 0 to count-1 do
+            begin
+            FList.Append (Items[r].Displayname, '~');
+            end;
+        end
+    else
+      begin
+      FSelectIndex := -1;
+      if assigned (FRefreshProc) then
+        FRefreshProc (nil, false);
+      end;
+  finally
+    FList.Thaw;
+  end;
+end;
+
+procedure TButtonRow.ChangeCollection (ACollection : TCollection);
+begin
+  {$IFDEF debug}
+  writeln (FTitle, 'ChangeCollection');
+  {$ENDIF}
+  FCollection := ACollection;
+  FillList;
+  if assigned(FCollection) and (FCollection.count > 0) then
+    CheckSensitive (0)
+  else
+    CheckSensitive (-1);
+  {$IFDEF debug}
+  writeln (FTitle, 'ChangeCollection End');
+  {$ENDIF}
+end;
+
+procedure TButtonRow.NewSelection (Sender : TFPgtkObject; row,column:integer;
+                                   event:PGdkEventButton; data:pointer);
+begin
+  {$IFDEF debug}
+  writeln (FTitle, 'NewSelection');
+  {$ENDIF}
+  if row >= 0 then
+    begin
+    FSelectIndex := row;
+    CheckSensitive (row);
+    if assigned (FRefreshProc) then
+      FRefreshProc (FCollection.items[row], FNeedFocus);
+    end;
+  {$IFDEF debug}
+  writeln (FTitle, 'NewSelection End');
+  {$ENDIF}
+end;
+
+procedure TButtonRow.ClickedAdd (Sender : TFPgtkObject; data : pointer);
+var i : TCollectionItem;
+    pm : PGdkPixmap;
+    m : PGdkBitmap;
+begin
+  {$IFDEF debug}
+  writeln (FTitle, 'ClickedAdd');
+  {$ENDIF}
+  if assigned(FCollection) then
+    begin
+    i := FCollection.Add;
+    i.displayname := sNew;
+    if assigned (FCalcIconFunc) then
+      begin
+      FCalcIconFunc (I, pm, m);
+      FList.Append (['',I.DisplayName]);
+      FList.SetPixmap (Flist.count, 0, pm, m);
+      end
+    else
+      FList.Append (i.displayName, '~');
+    FNeedFocus := True;
+    FList.SelectRow (FList.Count-1, 0);
+    end;
+  {$IFDEF debug}
+  writeln (FTitle, 'ClickedAdd End');
+  {$ENDIF}
+end;
+
+procedure TButtonRow.ClickedCopy (Sender : TFPgtkObject; data : pointer);
+var c, i : TCollectionItem;
+    pm : PGdkPixmap;
+    m : PGdkBitmap;
+begin
+  {$IFDEF debug}
+  writeln (FTitle, 'ClickedCopy');
+  {$ENDIF}
+  c := CurrentItem;
+  if assigned(FCollection) and assigned (c) then
+    begin
+    i := FCollection.Add;
+    i.assign(c);
+    if assigned (FCalcIconFunc) then
+      begin
+      FCalcIconFunc (I, pm, m);
+      FList.Append (['',I.DisplayName]);
+      FList.SetPixmap (Flist.count-1, 0, pm, m);
+      end
+    else
+      FList.Append (i.displayName, '~');
+    FNeedFocus := True;
+    FList.SelectRow (FList.Count-1,0);
+    end;
+  {$IFDEF debug}
+  writeln (FTitle, 'ClickedCopy End');
+  {$ENDIF}
+end;
+
+procedure TButtonRow.ClickedDelete (Sender : TFPgtkObject; data : pointer);
+begin
+  {$IFDEF debug}
+  writeln (FTitle, 'ClickedDelete');
+  {$ENDIF}
+  if FSelectIndex >= 0 then
+    begin
+    FCollection.Items[FSelectIndex].Free;
+    FList.Remove (FSelectIndex);
+    FNeedFocus := False;
+    FList.SelectRow (FSelectIndex, 0);
+    end;
+  {$IFDEF debug}
+  writeln (FTitle, 'ClickedDelete End');
+  {$ENDIF}
+end;
+
+procedure TButtonRow.ClickedUp (Sender : TFPgtkObject; data : pointer);
+begin
+  {$IFDEF debug}
+  writeln (FTitle, 'ClickedUp');
+  {$ENDIF}
+  if FSelectIndex > 0 then
+    begin
+    with FCollection.Items[FSelectIndex] do
+      Index := Index - 1;
+    with FList do
+      begin
+      SwapRows (FSelectIndex, FSelectIndex-1);
+      FNeedFocus := False;
+      SelectRow (FSelectIndex-1, 0);
+      end;
+    //CheckSensitive (FSelectIndex-1);
+    end;
+  {$IFDEF debug}
+  writeln (FTitle, 'ClickedUp End');
+  {$ENDIF}
+end;
+
+procedure TButtonRow.ClickedDown (Sender : TFPgtkObject; data : pointer);
+begin
+  {$IFDEF debug}
+  writeln (FTitle, 'ClickedDown');
+  {$ENDIF}
+  if (FSelectIndex >= 0) and (FSelectIndex < FCollection.count-1) then
+    begin
+    with FCollection.Items[FSelectIndex] do
+      Index := Index + 1;
+    with FList do
+      begin
+      SwapRows (FSelectIndex, FSelectIndex+1);
+      FNeedFocus := False;
+      SelectRow (FSelectIndex+1, 0);
+      end;
+    end;
+  {$IFDEF debug}
+  writeln (FTitle, 'ClickedDown End');
+  {$ENDIF}
+end;
+
+procedure TButtonRow.ClickedFirst (Sender : TFPgtkObject; data : pointer);
+begin
+  FNeedFocus := False;
+  with FList do
+    SelectRow (0, 0);
+end;
+
+procedure TButtonRow.ClickedPrevious (Sender : TFPgtkObject; data : pointer);
+begin
+  FNeedFocus := False;
+  if (FSelectIndex > 0) then
+    with FList do
+      SelectRow (FSelectIndex-1, 0);
+end;
+
+
+procedure TButtonRow.ClickedNext (Sender : TFPgtkObject; data : pointer);
+begin
+  FNeedFocus := False;
+  if (FSelectIndex >= 0) and (FSelectIndex < FCollection.count-1) then
+    with FList do
+      SelectRow (FSelectIndex+1, 0);
+end;
+
+procedure TButtonRow.ClickedLast (Sender : TFPgtkObject; data : pointer);
+begin
+  FNeedFocus := False;
+  with FList do
+    SelectRow (FSelectIndex+1, 0);
+end;
+
+procedure TButtonRow.CheckSensitive (index : integer);
+var b : boolean;
+begin
+  {$IFDEF debug}
+  writeln (FTitle, 'CheckSensitive ', index);
+  {$ENDIF}
+  b := assigned(FCollection);
+  FAdd.Sensitive := b;
+  FMAdd.Sensitive := b;
+  FMFirst.Sensitive := b;
+  FMLast.Sensitive := b;
+  b := assigned(FCollection) and (index >= 0) and (index < FCollection.Count);
+  FCopy.Sensitive := b;
+  FMCopy.Sensitive := b;
+  b := assigned(FCollection) and (index >= 0) and (index < FCollection.count);
+  FDelete.Sensitive := b;
+  FMDelete.Sensitive := b;
+  b := assigned(FCollection) and (index >= 0) and (index < FCollection.count-1);
+  FDown.Sensitive := b;
+  FMDown.Sensitive := b;
+  FMNext.Sensitive := b;
+  FUp.Sensitive := b;
+  b := assigned(FCollection) and (index > 0) and (index < FCollection.count);
+  FUp.Sensitive := b;
+  FMUp.Sensitive := b;
+  FMPrev.Sensitive := b;
+  {$IFDEF debug}
+  writeln (FTitle, 'CheckSensitive End');
+  {$ENDIF}
+end;
+
+function TButtonRow.CurrentItem : TCollectionItem;
+begin
+  {$IFDEF debug}
+  writeln (FTitle, 'CurrentItem');
+  {$ENDIF}
+  if FSelectIndex >= 0 then
+    result := FCollection.Items[FSelectIndex]
+  else
+    result := nil;
+  {$IFDEF debug}
+  writeln (FTitle, 'CurrentItem End');
+  {$ENDIF}
+end;
+
+end.

+ 78 - 0
packages/extra/fpgtk/editor/finddlgs.pp

@@ -0,0 +1,78 @@
+unit Finddlgs;
+
+interface
+
+uses gtk, FPgtk;
+
+type
+  TFindDialog = class (TFPgtkWindow)
+  private
+    FSearchString : string;
+    EditSearch : TFPgtkEntry;
+    procedure SetSearchString (Value:string);
+    procedure ChangeText (Sender:TFPgtkObject; data:pointer);
+  public
+    constructor create (WindowType : TGtkWindowType); override;
+    procedure DoDialogInit (InitData : pointer); override;
+    property SearchString : string read FSearchString write SetSearchString;
+  end;
+
+  PFindDialogData = ^TFindDialogData;
+  TFindDialogData = record
+    Text : string;
+  end;
+
+implementation
+
+resourcestring
+  rsSearch = 'Search';
+
+constructor TFindDialog.create (WindowType : TGtkWindowType);
+var b : TFPgtkButton;
+    t : TFPgtkTable;
+begin
+
+  inherited Create (WindowType);
+  border := 2;
+
+  t := TFPgtkTable.create (2,3);
+  Add (t);
+
+  t.attach (TFPgtkLabel.create('Give text to search (case sensitive)'), 0,2, 0,1);
+
+  b := TFPgtkButton.CreateWithLabel ('Ok');
+  b.ConnectClicked ( CloseWithResult, inttopointer (drOk) );
+  t.attach (b, 0,1, 2,3);
+  b.Candefault := True;
+  b.GrabDefault;
+
+  b := TFPgtkButton.CreateWithLabel ('Cancel');
+  b.ConnectClicked ( CloseWindow, inttopointer (drCancel) );
+  t.attach (b, 1,2, 2,3);
+  b.Candefault := True;
+
+  EditSearch := TFpGtkEntry.Create;
+  EditSearch.ConnectChanged (ChangeText, nil);
+  t.attach (EditSearch, 0,2, 1,2);
+  EditSearch.GrabFocus;
+
+end;
+
+procedure TFindDialog.DoDialogInit (InitData : pointer);
+begin
+  EditSearch.Text := PFindDialogData(InitData).Text;
+  Title := rsSearch;
+  inherited;
+end;
+
+procedure TFindDialog.SetSearchString (Value : string);
+begin
+  EditSearch.Text := Value;
+end;
+
+procedure TFindDialog.ChangeText (Sender : TFPGtkObject; data : pointer);
+begin
+  FSearchString := EditSearch.Text;
+end;
+
+end.

+ 28 - 0
packages/extra/fpgtk/editor/gtkdef.pp

@@ -0,0 +1,28 @@
+{$mode objfpc}{$h+}
+program GtkDef;
+
+uses sysutils,  // exception
+     FPgtkExt,  // Application, TFPgtkApplication
+     settingsrec,
+     GTKEditor;  // Mainwindow: TGtkEditorWindow
+
+begin
+  try
+    Log ('Creating application');
+    application := TFPgtkApplication.Create;
+    Log ('Setting mainwindow');
+    application.MainWindow := TGtkEditorWindow.Create;
+    Log ('Running GTK');
+    application.Run;
+    Log ('Everything Closed');
+    application.Free;
+    Log ('Cleaned up everything');
+  except
+    on e : Exception do
+      begin
+      writeln ('UNEXPECTED ERROR: ', e.message);
+      ShowMessage ('UNEXPECTED ERROR ', e.message);
+      end;
+  end;
+
+end.

+ 139 - 0
packages/extra/fpgtk/editor/gtkdeftexts.pp

@@ -0,0 +1,139 @@
+{$mode objfpc}{$h+}
+unit GtkDefTexts;
+
+interface
+
+resourcestring
+
+// SettingsRec
+  sOptions = 'Options';
+  sOk = '  Ok  ';
+  sCancel = 'Cancel';
+  sExtention = 'Extention';
+  sSaveonclose = '_Save on close';
+  sFileFormat = 'File format';
+  sMRUcount = 'MRU count';
+  sComponentBin = 'Component Binary';
+  sHintCompBin = 'Streaming of the component';
+  sComponentText = 'Component Text';
+  sHintCompText = 'Converting the streamed object to text (Delphi compatible)';
+  sHomeText = 'Private format';
+  sHintHomeText = 'Text format not compatible with streaming or Delphi';
+  sProgressWindow = 'S_how progress';
+
+// ProgWin
+  ProgressWinTitle = 'Progres generation unit';
+
+// GtkEditor
+  sEditorTitle = 'Pascal GTK editor';
+  sComponent = 'Component';
+  sObject = 'Object';
+  sDefinition = 'Definition';
+  sParameters = 'Parameters';
+  sRead = 'Read';
+  sWrite = 'Write';
+  sUnitName = 'Unit name';
+  sUseslist = 'Uses list';
+  sGtkPrefix = 'Gtk prefix';
+  sName = 'Name';
+  sInherits = 'Inherits from';
+  sGtkName = 'Gtk name';
+  sCreateObject = 'Create object';
+  sWithPointer = 'With pointer';
+  sCreateParams = 'Create params';
+  sGtkFunctionName = 'Gtk func name';
+  sType = 'Type';
+  sTypes = 'Types';
+  sPascalType = 'Pascal type';
+  sSection = 'Section';
+  // section types
+  sPrivate = 'Private';
+  sProtected = 'Protected';
+  sPublic = 'Public';
+  sPublished = 'Published';
+  // Property types
+  sField = 'Field';
+  sProperty = 'Property';
+  sFunction = 'Function';
+  sProcedure = 'Procedure';
+  sSignal = 'Signal';
+  sHelperproc = 'Helperproc';
+  sHelperFunc = 'HelperFunc';
+  sSignalType = 'SignalType';
+  sDeclarations = 'Declarations';
+  sTypeDecl = 'TypeDecl';
+  sConstructor = 'Constructor';
+  sDestructor = 'Destructor';
+  sInitialization = 'Initialization';
+  sFinalization = 'Finalization';
+  sCode = 'Code';
+  // function Types
+  sOverride = 'Override';
+  sVirtual = 'Virtual';
+  sDynamic = 'Dynamic';
+  sAbstract = 'Abstract';
+  sCDecl = 'CDecl';
+  sOverload = 'Overload';
+  sReintroduce = 'Reintroduce';
+  // Parameter types
+  sNothing = 'Nothing';
+  sVar = 'Var';
+  sConst = 'Const';
+  // Property read types
+  sGtkFunction = 'Gtk function';
+  sObjectField = 'Object field';
+  sObjectFunction = 'Object function';
+  sNotImplemented= 'Not implemented';
+  sGtkMacro = 'Gtk macro';
+  sExistingFunc = 'Existing function';
+  // Property write types (extra)
+  sGtkProcedure= 'Gtk Procedure';
+  sObjectProcedure= 'Object Procedure';
+  sExistingProc = 'Existing procedure';
+  // Other
+  sConvert = 'Convert';
+  // Menu
+  smFile = '_File';
+  smFileNew = '_New';
+  smFileOpen = '_Open';
+  smFileReopen = '_Reopen';
+  smFileSave = '_Save';
+  smFileSaveAs = 'Save _as';
+  smFileExit = 'E_xit';
+  smTools = '_Tools';
+  smToolsGenerate = '_Generate';
+  smToolsOptions = '_Options';
+  smHelp = '_Help';
+  smHelpAbout = '_About';
+  smHelpInfo = '_Info';
+  smEdit = '_Edit';
+  smEditObject = '_Object';
+  smEditProperty = '_Property';
+  smEditParameter = 'P_arameter';
+
+// About
+  sAboutTitle = 'About';
+  sAbout1 = 'Editor to generate FPGTK unit,';
+  sAbout2 = 'Or similar units.';
+  sAboutVersion  = 'Version: 1.0';
+  sAboutDesigner = 'Designer: Luk Vandelaer';
+
+// Help
+  sInfoTitle = 'Help';
+  sInfoMessage = 'Not yet implemented (searching for FPDoc and help display component)';
+
+// ButtonRow
+  sNew = 'New';
+  smAdd = '_Add';
+  smCopy = '_Copy';
+  smDelete = '_Delete';
+  smUp = 'Move _Up';
+  smDown = 'Move D_own';
+  smFirst = '_First';
+  smPrevious = '_Previous';
+  smNext = '_Next';
+  smLast = '_Last';
+
+implementation
+
+end.

+ 1435 - 0
packages/extra/fpgtk/editor/gtkeditor.pp

@@ -0,0 +1,1435 @@
+{$mode objfpc}{$h+}
+unit GtkEditor;
+
+interface
+{__$define debug}
+uses sysutils, classes,
+     glib, gdk, gtk, FPGtk, FPgtkExt,
+     buttonrow, ObjectDef, SettingsRec;
+
+type
+
+  TGtkEditorWindow = class (TFPgtkWindow)
+  private
+    FSettings : TSettingsRec;
+  { widgets in the window }
+    // visual arrangement
+    LObjects, LProperties, LParams : TFPgtkScrollCList;
+    BrObjects, BrProperties, BrParams : TButtonRow;
+    PObject, PProperty, PParam : TFPgtkHPaned;
+    FDefinition, FObject, FProperty : TFPgtkFrame;
+    FParam : TFPgtkBox;
+    // definition
+    DUnitName, DGtkPrefix, DUsesList : TFPgtkentry;
+    // object
+    OName, OInherit, OGtkName, OGtkFuncName, OCreateParams : TFPgtkentry;
+    OCreateObject, OWithPointer : TFPgtkToggleButton;
+    // property
+    PType : TFPgtkOptionMenu; // Or TFPgtkCombo
+    Bladen : TFPgtkNotebook;
+    BDefinition, BParameter, BRead, BWrite, BFunction, BCode : TFPgtkWidget;
+      // definition
+      PName, PPascalType, PGtkName : TFPgtkEntry;
+      PSection : TFPgtkOptionMenu; // Or TFPgtkCombo
+      // parameter
+      ParamName, ParamPascalType : TFPgtkentry;
+      ParamType : TFPgtkOptionmenu; // Or TFPgtkCombo
+      ParamConvert : TFPgtkToggleButton;
+      // read
+      PRType : TFPgtkOptionMenu;
+      PRGtkName : TFPgtkEntry;
+      PRCode : TFPgtkScrollText;
+      PRConvert : TFPgtkToggleButton;
+      // write
+      PWType : TFPgtkOptionMenu;
+      PWGtkName : TFPgtkEntry;
+      PWCode : TFPgtkScrollText;
+      PWConvert : TFPgtkToggleButton;
+      // function
+      POverride, PVirtual, PDynamic,
+      PAbstract, PCDecl, POverload,
+      PReintroduce : TFPgtkTogglebutton;
+      PFCode : TFPgtkScrollText;
+      // Code
+      PCode : TFPgtkScrollText;
+  { CollectionItems that are currently shown }
+    ciObject : TObjectItem;
+    ciProperty : TPropertyItem;
+    ciParameter : TParameterItem;
+  { Defs Property }
+    FDefs : TObjectDefs;
+  { entry saving procedures/signals }
+    // Definition
+    procedure ChangedDUsesList (Sender:TFPgtkObject; data:pointer);
+    procedure ChangedDUnitName (Sender:TFPgtkObject; data:pointer);
+    procedure ChangedDGtkPrefix (Sender:TFPgtkObject; data:pointer);
+    // Object
+    procedure ChangedOName (Sender:TFPgtkObject; data:pointer);
+    procedure ChangedOInherit (Sender:TFPgtkObject; data:pointer);
+    procedure ChangedOGtkName (Sender:TFPgtkObject; data:pointer);
+    procedure ChangedOGtkFuncName (Sender:TFPgtkObject; data:pointer);
+    procedure ChangedOCreateParams (Sender:TFPgtkObject; data:pointer);
+    procedure ChangedOCreateObject (Sender:TFPgtkObject; data:pointer);
+    procedure ChangedOWithPointer (Sender:TFPgtkObject; data:pointer);
+    // Property
+    procedure ChangedPType (Sender:TFPgtkObject; data:pointer);
+      procedure ChangedPName (Sender:TFPgtkObject; data:pointer);
+      procedure ChangedPPascalType (Sender:TFPgtkObject; data:pointer);
+      procedure ChangedPGtkName (Sender:TFPgtkObject; data:pointer);
+      procedure ChangedPSection (Sender:TFPgtkObject; data:pointer);
+      // parameter
+      procedure ChangedParamName (Sender:TFPgtkObject; data:pointer);
+      procedure ChangedParamPascalType (Sender:TFPgtkObject; data:pointer);
+      procedure ChangedParamType (Sender:TFPgtkObject; data:pointer);
+      procedure ChangedParamConvert (Sender:TFPgtkObject; data:pointer);
+      // read
+      procedure ChangedPRType (Sender:TFPgtkObject; data:pointer);
+      procedure ChangedPRConvert (Sender:TFPgtkObject; data:pointer);
+      // write
+      procedure ChangedPWType (Sender:TFPgtkObject; data:pointer);
+      procedure ChangedPWGtkName (Sender:TFPgtkObject; data:pointer);
+      procedure ChangedPWCode (Sender:TFPgtkObject; data:pointer);
+      procedure ChangedPWConvert (Sender:TFPgtkObject; data:pointer);
+      // function
+      procedure ChangedPFuncType (Sender:TFPgtkObject; data:pointer);
+      // Code
+      procedure ChangedPCode (Sender:TFPgtkObject; data:pointer);
+  { Showing procedures }
+    RefreshingParam, RefreshingProperty, RefreshingObject, RefreshingDefinition : boolean;
+    PropPixs : array [0..13] of PGdkPixmap;
+    PropMasks : array [0..13] of PGdkBitmap;
+    procedure CreatePixMaps;
+    procedure PropertyIcon (Item:TCollectionItem; var Pixmap:PGdkPixMap; var mask:PGdkBitmap);
+    procedure EnDisablePages (pt : TPropType);
+    procedure RefreshParam (Selected : TCollectionItem; NeedFocus:boolean);
+    procedure RefreshProperty (Selected : TCollectionItem; NeedFocus:boolean);
+    procedure RefreshObject (Selected : TCollectionItem; NeedFocus:boolean);
+    procedure RefreshDefinition;
+    procedure ObjectDisplayChanged;
+    procedure PropertyDisplayChanged;
+    procedure ParamDisplayChanged;
+    procedure ComposeWindow;
+  { File and menu handling }
+    FFileName : string;
+    HasAFile : boolean;
+    FReopenList : TStrings;
+    MenuEditObject, MenuEditProperty, MenuEditParameter,
+    MenuFileReopen : TFPgtkMenuItem;
+    AccelGroup : integer;
+    procedure NewFilename (NewName : string);
+    procedure BuildReopenList;
+    procedure DataRead (filename : string);
+    procedure DataWrite (filename : string);
+    procedure Generate;
+  { Menu signals }
+    procedure FileNew (Sender : TFPgtkObject; data : pointer);
+    procedure FileOpen (Sender : TFPgtkObject; data : pointer);
+    procedure FileSave (Sender : TFPgtkObject; data : pointer);
+    procedure FileSaveAs (Sender : TFPgtkObject; data : pointer);
+    procedure FileExit (Sender : TFPgtkObject; data : pointer);
+    procedure ToolsGenerate (Sender : TFPgtkObject; data : pointer);
+    procedure ToolsOptions (Sender : TFPgtkObject; data : pointer);
+    procedure HelpInfo (Sender : TFPgtkObject; data : pointer);
+    procedure HelpAbout (Sender : TFPgtkObject; data : pointer);
+    procedure ToolbarReopen (Sender : TFpgtkObject; data : pointer);
+  { Dialog Procedures }
+    procedure DialogSetFilename (Sender:TFPgtkWindow;
+              aDialogResult:pointer; Action:integer; initiator:TFPgtkObject);
+    procedure FileReopen (Sender : TFPgtkObject; data : pointer);
+  { Settings procedures }
+    procedure ReadSettings;
+    procedure WriteSettings (Sender : TFPgtkObject; data : pointer);
+  public
+    constructor create;
+    destructor Destroy; override;
+  end;
+
+implementation
+
+uses XPMs, GtkDefTexts, inifiles, ProgWin;
+
+Type
+  TRightLabel = class (TFPgtkLabel)
+  public
+    constructor create(aText : string);
+  end;
+
+constructor TRightLabel.Create (aText : string);
+begin
+  inherited create (aText);
+  XAlign := 1;
+end;
+
+{ TGtkEditorWindow }
+
+{ *** Creation of window *** }
+
+const
+  gtk_all = gtk_fill + gtk_expand + gtk_Shrink;
+  gtk_NoExp = gtk_fill + gtk_shrink;
+
+constructor TGtkEditorWindow.Create;
+begin
+  inherited Create (Gtk_Window_TopLevel);
+  SetUSize (800, 500);
+  MenuFileReopen := nil;
+  MenuEditObject := nil;
+  MenuEditProperty := nil;
+  MenuEditParameter := nil;
+  Title := sEditorTitle;
+  ciObject := nil;
+  ciProperty := nil;
+  ciParameter := nil;
+  FDefs := nil;
+  CreatePixmaps;
+  ComposeWindow;
+  FReopenList := TStringList.Create;
+  ReadSettings;
+  ConnectDestroy (@WriteSettings, @FSettings);
+end;
+
+destructor TGtkEditorWindow.Destroy;
+begin
+  FReopenList.Free;
+end;
+
+procedure TGtkEditorWindow.ComposeWindow;
+
+var b, b1 : TFPgtkBox;
+    t : TFPgtkTable;
+    m : TFPgtkMenuBar;
+    mlist : TFPgtkItemGroup;
+    F : TFPgtkFrame;
+    tb : TFPgtkToolbar;
+    //pm : TFPgtkPixmap;
+    but : TFPgtkButton;
+    AG : PGtkAccelGroup;
+
+begin
+
+  AccelGroup := AccelGroupNew;
+  AG := AccelGroups[AccelGroup];
+
+  b := TFPgtkVBox.Create;
+  Add (b);
+
+  //writeln ('------->> Menu');
+  MenuEditObject := NewSubMenu (smEditObject, '', '', nil, []);
+  MenuEditProperty := NewSubMenu (smEditProperty, '', '', nil, []);
+  MenuEditParameter := NewSubMenu (smEditParameter, '', '', nil, []);
+  MenuFileReopen := NewSubMenu (smFileReopen, '', '', nil, []);
+  m := NewMenuBar ([
+         NewSubMenu (smFile, '',  '', MakeAccelKeyDef(AG,Gdk_F,[amAlt]), [
+           NewMenuItem (smFileNew, '', '', MakeAccelKeyDef(AG,Gdk_N,[amControl]), @FileNew, nil),
+           NewMenuItem (smFileOpen, '', '', MakeAccelKeyDef(AG,Gdk_L,[amControl]), @FileOpen, nil),
+           MenuFileReopen,
+           NewMenuItem (smFileSave, '', '', MakeAccelKeyDef(AG,Gdk_S,[amControl]), @FileSave, nil),
+           NewMenuItem (smFileSaveAs, '', '', MakeAccelKeyDef(AG,Gdk_A,[amControl]), @FileSaveAs, nil),
+           NewLine,
+           NewMenuItem (smFileExit, '', '', MakeAccelKeyDef(AG,Gdk_W,[amControl]), @FileExit, nil)]),
+         NewSubMenu (smEdit, '', '', MakeAccelKeyDef(AG,Gdk_E,[amAlt]), [
+           MenuEditObject, MenuEditProperty, MenuEditParameter]),
+         NewSubMenu (smTools, '', '', MakeAccelKeyDef(AG,Gdk_T,[amAlt]), [
+           NewMenuItem (smToolsGenerate, '', '', MakeAccelKeyDef(AG,Gdk_G,[amControl]), @ToolsGenerate, nil),
+           NewMenuItem (smToolsOptions, '', '', MakeAccelKeyDef(AG,Gdk_O,[amControl]), @ToolsOptions, nil)]),
+         NewSubMenu (smHelp, '', '', MakeAccelKeyDef(AG,Gdk_H,[amAlt]), [
+           NewMenuItem (smHelpInfo, '', '', MakeAccelKeyDef(AG,Gdk_I,[amControl]), @HelpInfo, nil),
+           NewMenuItem (smHelpAbout, '', '', MakeAccelKeyDef(AG,Gdk_B,[amControl]), @HelpAbout, nil)])
+         ]);
+  b.PackStart (m, false, false, 0);
+
+  //writeln ('------->> Toolbar');
+
+  tb := TFPgtkToolbar.Create;
+  b.PackStart (tb, false, false, 0);
+  b.Packstart (TFPgtkHSeparator.Create, false, false, 0);
+
+  with tb do
+    begin
+    ButtonRelief := Gtk_Relief_None;
+    AppendSpace;
+    AppendItem ('', RemoveUnderscore(smFileNew), '', XPMFileNew, @FileNew, nil);
+    AppendSpace;
+    AppendItem ('', RemoveUnderscore(smFileOpen), '', XPMFileOpen, @FileOpen, nil);
+    but := TFPgtkButton.Create;
+    with but do
+      begin
+      ConnectClicked (@ToolbarReopen, nil);
+      Add (TFPgtkArrow.Create(GTK_Arrow_Down, GTK_Shadow_Out));
+      CanFocus := False;
+      ReliefStyle := GTK_RELIEF_NONE;
+      SetUsize (15, 22);
+      end;
+    AppendWidget (but, RemoveUnderscore(smFileReopen), '');
+    AppendSpace;
+    AppendItem ('', RemoveUnderscore(smFileSave), '', XPMFileSave, @FileSave, nil);
+    AppendSpace;
+    AppendItem ('', RemoveUnderscore(smToolsGenerate), '', XPMGenerate, @ToolsGenerate, nil);
+    end;
+
+  //writeln ('------->> Panels and lists');
+
+  FDefinition := TFPgtkFrame.Create;
+  FDefinition.Text := sComponent;
+  b.PackStart (FDefinition, false, true, 0);
+
+  PObject := TFPgtkHPaned.Create;
+  b.packStart (PObject, true, true, 0);
+
+  LObjects := TFPgtkScrollCList.Create (1);
+  LObjects.SetUsize (120,40);
+  b1 := TFPgtkVBox.Create;
+  BrObjects := TButtonRow.Create;
+  BrObjects.Title := 'Objects buttonrow';
+  b1.PackEnd (BrObjects, false, false, 0);
+  b1.PackEnd (LObjects);
+  PObject.Add1 (b1);
+
+  b := TFPgtkVBox.create;
+  PObject.Add2 (b);
+
+  FObject := TFPgtkFrame.Create;
+  FObject.Text := SObject;
+  b.PackStart (FObject, false, true, 0);
+
+  PProperty := TFPgtkHPaned.Create;
+  B.PackStart (PProperty, true, true, 0);
+
+  LProperties := TFpgtkScrollCList.Create (2);
+  LProperties.SetUSize (180,30);
+  b1 := TFPgtkVBox.Create;
+  BrProperties := TButtonRow.Create;
+  BrProperties.Title := 'Properties buttonrow';
+  b1.PackEnd (BrProperties, false, false, 0);
+  b1.PackEnd (LProperties);
+  PProperty.Add1 (b1);
+
+  FProperty := TFPgtkFrame.Create;
+  FProperty.Text := SProperty;
+  PProperty.Add2 (FProperty);
+
+  PProperty.ComputePosition (40, 20, 20);
+  PObject.ComputePosition (40, 20, 20);
+
+  //writeln ('------->> Definition');
+
+  t := TFPgtkTable.create (6,1);
+  t.ColSpacings := 3;
+
+  t.attach (TFPgtkLabel.Create(sUnitName), 0,1, 0,1, gtk_NoExp, gtk_fill, 3,0);
+  DUnitName := TFPgtkEntry.create;
+  DUnitName.ConnectChanged (@ChangedDUnitName, nil);
+  t.attach (DUnitName, 1,2, 0,1, gtk_all, gtk_fill, 0,0);
+
+  t.attach (TFPgtkLabel.Create (sGtkPrefix), 2,3, 0,1, gtk_NoExp, gtk_fill, 3,0);
+  DGtkPrefix := TFPgtkentry.create;
+  DGtkPrefix.ConnectChanged (@ChangedDGtkPrefix, nil);
+  t.attach (DGtkPrefix, 3,4, 0,1, gtk_all, gtk_fill, 0,0);
+
+  t.attach (TFPgtkLabel.Create(sUsesList), 4,5, 0,1, gtk_NoExp, gtk_fill, 3,0);
+  DUsesList := TFPgtkEntry.create;
+  DUsesList.ConnectChanged (@ChangedDUsesList, nil);
+  t.attach (DUsesList, 5,6, 0,1, gtk_all, gtk_fill, 0,0);
+
+  FDefinition.Add (t);
+
+  //writeln ('------->> Object');
+
+  t := tFPgtkTable.Create (5,3);
+  t.ColSpacings := 3;
+  FObject.Add (t);
+
+  t.attach (TRightLabel.create(sName), 0,1, 0,1, gtk_noExp, gtk_fill, 3,0);
+  OName := TFPgtkentry.create;
+  OName.ConnectChanged (@ChangedOName, nil);
+  t.attach (OName, 1,2, 0,1);
+  t.attach (TRightLabel.create(sInherits), 0,1, 1,2, gtk_noExp, gtk_fill, 3,0);
+  OInherit := TFPgtkentry.create;
+  OInherit.ConnectChanged (@ChangedOInherit, nil);
+  t.attach (OInherit, 1,2, 1,2);
+  t.attach (TRightLabel.create(sGtkName), 0,1, 2,3, gtk_noExp, gtk_fill, 3,0);
+  OGtkName := TFPgtkentry.create;
+  OGtkName.ConnectChanged (@ChangedOGtkName, nil);
+  t.attach (OGtkName, 1,2, 2,3);
+  t.SetOneColSpacing (1,7);
+  OCreateObject := TFPgtkCheckedButton.createWithLabel (sCreateObject);
+  OCreateObject.ConnectClicked (@ChangedOCreateObject, nil);
+  t.attach (OCreateObject, 3,4, 0,1);
+  OWithPointer := TFPgtkCheckedButton.createWithLabel (sWithPointer);
+  OWithPointer.ConnectClicked (@ChangedOWithPointer, nil);
+  t.attach (OWithPointer, 4,5, 0,1);
+  t.attach (TRightLabel.create(sCreateParams), 2,3, 1,2, gtk_noExp, gtk_fill, 3,0);
+  OCreateParams := TFPgtkentry.create;
+  OCreateParams.ConnectChanged (@ChangedOCreateParams, nil);
+  t.attach (OCreateParams, 3,5, 1,2, gtk_all, gtk_fill, 0,0);
+  t.attach (TRightLabel.create(sGtkFunctionName), 2,3, 2,3, gtk_noExp, gtk_fill, 3,0);
+  OGtkFuncName := TFPgtkentry.create;
+  OGtkFuncName.ConnectChanged (@ChangedOGtkFuncName, nil);
+  t.attach (OGtkFuncName, 3,5, 2,3, gtk_all, gtk_fill, 0,0);
+
+  //writeln ('------->> Property');
+
+  mlist := TFPgtkItemGroup.Create (TFPgtkMenuItem);
+  b := TFPgtkVBox.Create;
+  FProperty.Add (b);
+
+  b1 := TFPgtkHBox.Create;
+  b.PackStart (b1, false, true, 0);
+  b1.PackStart (TFPgtkLabel.Create(sType), false, true, 3);
+  mlist.FillFromArray ([sField, sProperty,sFunction,sProcedure,sSignal,sHelperproc,
+                        sHelperFunc,sSignalType,sDeclarations,sTypeDecl,sConstructor,
+                        sDestructor, sInitialization, sFinalization]);
+  PType := TFPgtkOptionMenu.Create;
+  with PType do
+    begin
+    menu := TFPgtkMenu.Create;
+    setUsize (70, 26);
+    AppendMenuItemGroup (menu, mlist, @ChangedPType, nil);
+    end;
+  mlist.Clear;
+  b1.PackStart (PType, true, true,0);
+  bladen := TFPgtkNotebook.Create;
+//  bladen.Homogenous := True;
+//  bladen.Scrollable := false;
+  b.PackStart (bladen, true, true, 0);
+
+  // defintion
+  //writeln ('------->> Property Definition');
+    t := TFPgtkTable.Create (2, 4);
+    t.attach (TRightLabel.Create(sName), 0,1, 0,1, gtk_noExp, gtk_fill, 3,0);
+    PName := TFPgtkEntry.create;
+    PName.ConnectChanged (@ChangedPName, nil);
+    t.attach (PName, 1,2, 0,1);
+    t.attach (TRightLabel.Create(sPascalType), 0,1, 1,2, gtk_noExp, gtk_fill, 3,0);
+    PPascalType := TFPgtkEntry.create;
+    PPascalType.ConnectChanged (@ChangedPPascalType, nil);
+    t.attach (PPascalType, 1,2, 1,2);
+    t.attach (TRightLabel.Create(sSection), 0,1, 2,3, gtk_noExp, gtk_fill, 3,0);
+    PSection := TFPgtkOptionMenu.create;
+    mlist.FillFromArray ([sPrivate, sProtected, sPublic, sPublished]);
+    with PSection do
+      begin
+      menu := TFPgtkMenu.Create;
+      AppendMenuItemGroup (menu, mlist, @ChangedPSection, nil);
+      setUsize (60,26);
+      end;
+    mlist.Clear;
+    t.attach (PSection, 1,2, 2,3);
+    t.attach (TRightLabel.Create(sGtkName), 0,1, 3,4, gtk_noExp, gtk_fill, 3,0);
+    PGtkName := TFPgtkEntry.create;
+    PGtkName.ConnectChanged (@ChangedPGtkName, nil);
+    t.attach (PGtkName, 1,2, 3,4);
+    b1 := TFPgtkVBox.Create;
+    b1.Packstart (t, false, false, 0);
+    BDefinition := b1;
+    bladen.AppendPage (b1, TFPgtkLabel.Create(sDefinition));
+
+  // parameter
+  //writeln ('------->> Property Parameter');
+    PParam := TFPgtkHPaned.Create;
+    bladen.AppendPage (PParam, TFPgtkLabel.Create(sParameters));
+    BParameter := PParam;
+    LParams := TFPgtkScrollCList.Create(1);
+    LParams.setusize (120,30);
+    b1 := TFPgtkVBox.Create;
+    BrParams := TButtonRow.Create;
+    BrParams.Title := 'Parameters buttonrow';
+    b1.PackEnd (BrParams, false, false, 0);
+    b1.PackEnd (LParams);
+    PParam.Add1 (b1);
+    FParam := TFPgtkVBox.Create;
+    PParam.Add2 (FParam);
+    t := TFPgtkTable.Create (3,4);
+    FParam.Packstart (t, false, false, 0);
+    t.attach (TRightLabel.Create(sName), 0,1, 0,1, gtk_noExp, gtk_fill, 3,0);
+    ParamName := TFPgtkentry.Create;
+    ParamName.ConnectChanged (@ChangedParamName, nil);
+    t.attach (ParamName, 1,3, 0,1);
+    t.attach (TRightLabel.Create(sPascalType), 0,1, 1,2, gtk_noExp, gtk_fill, 3,0);
+    ParamPascalType := TFPgtkentry.Create;
+    ParamPascalType.ConnectChanged (@ChangedParamPascalType, nil);
+    t.attach (ParamPascalType, 1,3, 1,2);
+    t.attach (TRightLabel.Create(sType), 0,1, 2,3, gtk_noExp, gtk_fill, 3,0);
+    ParamType := TFPgtkOptionmenu.Create;
+    t.attach (ParamType, 1,3, 2,3);
+    with ParamType do
+      begin
+      Menu := TFPgtkMenu.Create;
+      mList.FillFromArray ([sNothing, sVar, sConst]);
+      AppendMenuItemGroup (menu, mlist, @ChangedParamType, nil);
+      setusize (50, 26);
+      end;
+    mlist.Clear;
+    ParamConvert := TFPgtkCheckedButton.CreateWithLabel(sConvert);
+    ParamConvert.ConnectClicked (@ChangedParamConvert, nil);
+    t.attach (ParamConvert, 1,2, 3,4, gtk_noExp, gtk_Fill, 0,0);
+
+  // Read
+  //writeln ('------->> Property Read');
+    t := TFPgtkTable.Create (3,3);
+    bladen.AppendPage (t, TFPgtkLabel.Create(sRead));
+    BRead := t;
+    t.Attach (TRightLabel.Create(sType), 0,1, 0,1, gtk_noExp, gtk_fill, 3,0);
+    PRtype := TFPgtkOptionMenu.Create;
+    with PRType do
+      begin
+      Menu := TFPgtkMenu.Create;
+      mlist.FillFromArray ([sGtkFunction, sObjectField, sObjectFunction,SField, sFunction,
+                        sNotImplemented, sGtkMacro, sExistingFunc]);
+      AppendMenuItemGroup (Menu, mlist, @ChangedPRType, nil);
+      SetUsize (60,26);
+      end;
+    mlist.Clear;
+    t.attach (PRtype, 1,2, 0,1, gtk_all, gtk_noExp, 0,0);
+    PRConvert := TFPgtkCheckedButton.CreateWithLabel (sConvert);
+    PRConvert.ConnectClicked (@ChangedPRConvert, nil);
+    PRConvert.TheLabel.XAlign := 0.0;
+    t.attach (PRConvert, 2,3, 0,1, gtk_all, gtk_noExp, 0,0);
+    t.Attach (TRightLabel.Create(sGtkName), 0,1, 1,2, gtk_noExp, gtk_fill, 3,0);
+    PRGtkName := TFPgtkEntry.Create;
+    PRGtkName.ConnectChanged (@ChangedPGtkName, nil);
+    t.attach (PRGtkName, 1,3, 1,2, gtk_all, gtk_noExp, 0,0);
+    t.Attach (TRightLabel.Create(sCode), 0,1, 2,3, gtk_noExp, gtk_fill, 3,0);
+    PRCode := TFPgtkScrollText.Create;
+    PRCode.TheText.ConnectChanged (@ChangedPCode, nil);
+    t.attach (PRCode, 1,3, 2,3);
+
+  // Write
+  //writeln ('------->> Property Write');
+    t := TFPgtkTable.Create (3,3);
+    BWrite := t;
+    bladen.AppendPage (t, TFPgtkLabel.Create(sWrite));
+    t.Attach (TRightLabel.Create(sType), 0,1, 0,1, gtk_noExp, gtk_fill, 3,0);
+    PWtype := TFPgtkOptionMenu.Create;
+    with PWType do
+      begin
+      Menu := TFPgtkMenu.Create;
+      mlist.FillFromArray ([sGtkProcedure, sObjectField, sObjectProcedure,SField, sProcedure,
+                          sNotImplemented, sGtkMacro, sExistingProc]);
+      AppendMenuItemGroup (Menu, mlist, @ChangedPWType, nil);
+      SetUsize (60,26);
+      end;
+    mlist.Clear;
+    t.attach (PWtype, 1,2, 0,1, gtk_all, gtk_noExp, 0,0);
+    PWConvert := TFPgtkCheckedButton.CreateWithLabel (sConvert);
+    PWConvert.ConnectClicked (@ChangedPWConvert, nil);
+    PWConvert.TheLabel.XAlign := 0.0;
+    t.attach (PWConvert, 2,3, 0,1, gtk_all, gtk_noExp, 0,0);
+    t.Attach (TRightLabel.Create(sGtkName), 0,1, 1,2, gtk_noExp, gtk_fill, 3,0);
+    PWGtkName := TFPgtkEntry.Create;
+    PWGtkName.ConnectChanged (@ChangedPWGtkName, nil);
+    t.attach (PWGtkName, 1,3, 1,2, gtk_all, gtk_noExp, 0,0);
+    t.Attach (TRightLabel.Create(sCode), 0,1, 2,3, gtk_noExp, gtk_fill, 3,0);
+    PWCode := TFPgtkScrollText.Create;
+    PWCode.TheText.ConnectChanged (@ChangedPWCode, nil);
+    t.attach (PWCode, 1,3, 2,3);
+
+  // Function
+  //writeln ('------->> Property Function');
+    t := TFPgtkTable.Create (2,2);
+    BFunction := t;
+    bladen.AppendPage (t, TFPgtkLabel.Create(sFunction));
+
+    t.Attach (TFPgtkLabel.Create(sCode), 1,2, 0,1, gtk_NoExp, gtk_NoExp, 7,0);
+    PFCode := TFPgtkScrollText.Create;
+    PFCode.TheText.ConnectChanged (@ChangedPCode, nil);
+    t.Attach (PFCode, 1,2, 1,2, gtk_all, gtk_all, 0,0);
+    f := TFPgtkFrame.Create;
+    f.Border := 3;
+    f.Text := sTypes;
+    t.Attach (f, 0,1, 0,2, gtk_NoExp, gtk_NoExp, 0,0);
+
+    b1 := TFPgtkVBox.Create;
+    f.Add (b1);
+    b1.border := 2;
+    POverride := TFPgtkCheckedButton.CreateWithLabel (sOverride);
+    POverride.ConnectClicked (@ChangedPFuncType, inttopointer(0));
+    b1.PackStart (POverride, false, false, 0);
+    PVirtual := TFPgtkCheckedButton.CreateWithLabel (sVirtual);
+    PVirtual.ConnectClicked (@ChangedPFuncType, inttopointer(1));
+    b1.PackStart (PVirtual, false, false, 0);
+    PDynamic := TFPgtkCheckedButton.CreateWithLabel (sDynamic);
+    PDynamic.ConnectClicked (@ChangedPFuncType, inttopointer(2));
+    b1.PackStart (PDynamic, false, false, 0);
+    PAbstract := TFPgtkCheckedButton.CreateWithLabel (sAbstract);
+    PAbstract.ConnectClicked (@ChangedPFuncType, inttopointer(3));
+    b1.PackStart (PAbstract, false, false, 0);
+    PCDecl := TFPgtkCheckedButton.CreateWithLabel (sCDecl);
+    PCDecl.ConnectClicked (@ChangedPFuncType, inttopointer(4));
+    b1.PackStart (PCDecl, false, false, 0);
+    POverload := TFPgtkCheckedButton.CreateWithLabel (sOverload);
+    POverload.ConnectClicked (@ChangedPFuncType, inttopointer(5));
+    b1.PackStart (POverload, false, false, 0);
+    PReintroduce := TFPgtkCheckedButton.CreateWithLabel (sReintroduce);
+    PReintroduce.ConnectClicked (@ChangedPFuncType, inttopointer(6));
+    b1.PackStart (PReintroduce, false, false, 0);
+
+  // Code
+  //writeln ('------->> Property Code');
+    PCode := TFPgtkScrollText.Create;
+    BCode := PCode;
+    PCode.TheText.ConnectChanged (@ChangedPCode, nil);
+    bladen.AppendPage (PCode, TFPgtkLabel.Create(sCode));
+
+  // Configuring buttonrows
+  //writeln ('------->> Configure Buttonrows');
+  BrParams.Configure (LParams.CList, nil, @RefreshParam,
+                      MenuEditParameter.SubMenu,
+                      AG, Gdk_Mod1_Mask+Gdk_Shift_Mask);
+  BrProperties.Configure (LProperties.Clist, @PropertyIcon, @RefreshProperty,
+                          MenuEditProperty.SubMenu,
+                          AG, Gdk_Control_Mask+Gdk_Shift_Mask);
+  BrObjects.Configure (LObjects.CList, nil, @RefreshObject,
+                       MenuEditObject.SubMenu, AG, 0);
+
+  //writeln ('------->> Einde ComposeWindow');
+
+end;
+
+{ *** Procedures to show parts in the window (when selecting items) *** }
+
+{ Showing procedures }
+
+procedure TGtkEditorWindow.RefreshDefinition;
+begin
+  RefreshingDefinition := True;
+  try
+    if assigned (FDefs) then
+      with FDefs do
+        begin
+        DUnitName.text := UnitName;
+        DGtkPrefix.Text := GtkPrefix;
+        DUsesList.Text := UsesList;
+        BrObjects.ChangeCollection (Definition);
+        end
+    else
+      begin
+      DUnitName.text := '';
+      DGtkPrefix.Text := '';
+      DUsesList.Text := '';
+      BrObjects.ChangeCollection (nil);
+      end;
+  finally
+    RefreshingDefinition := False;
+  end;
+end;
+
+procedure TGtkEditorWindow.RefreshObject (Selected : TCollectionItem; NeedFocus:boolean);
+begin
+  RefreshingObject := True;
+  try
+    ciObject := TObjectItem(Selected);
+    if assigned (ciObject) then
+      with ciObject do
+        begin
+        FObject.Sensitive := true;
+        OName.Text := Name;
+        OInherit.Text := Inherit;
+        OGtkName.Text := GtkName;
+        OGtkFuncName.Text := GtkFuncName;
+        OCreateParams.Text := CreateParams;
+        OCreateObject.Active := CreateObject;
+        OWithPointer.Active := WithPointer;
+        BrProperties.ChangeCollection (Props);
+        end
+    else
+      begin
+      FObject.Sensitive := false;
+      OName.Clear;
+      OInherit.Clear;
+      OGtkName.Clear;
+      OGtkFuncName.Clear;
+      OCreateParams.Clear;
+      OCreateObject.Active := False;
+      OWithPointer.Active := False;
+      BrProperties.ChangeCollection (nil);
+      end;
+    if NeedFocus then
+      with OName do
+        begin
+        SelectRegion (0, -1);
+        GrabFocus;
+        end;
+  finally
+    RefreshingObject := false;
+  end;
+end;
+
+procedure TGtkEditorWindow.CreatePixmaps;
+
+  procedure GdkPixmap (Data : array of string; var pm : PGdkPixmap; var bm : PGdkBitmap);
+  var ppdata : ppgchar;
+  begin
+    ppdata := ArrayToPPgchar(Data);
+    pm := gdk_pixmap_colormap_create_from_xpm_d (nil, Colormap, @bm, nil, ppdata);
+    freemem (ppdata, sizeof (pchar) * (high(data)-low(data)+1));
+  end;
+
+begin
+  GdkPixmap (XPMPropField, PropPixs[0], PropMasks[0]);
+  GdkPixmap (XPMPropProperty, PropPixs[1], PropMasks[1]);
+  GdkPixmap (XPMPropFunction, PropPixs[2], PropMasks[2]);
+  GdkPixmap (XPMPropProcedure, PropPixs[3], PropMasks[3]);
+  GdkPixmap (XPMPropSignal, PropPixs[4], PropMasks[4]);
+  GdkPixmap (XPMPropHelperProc, PropPixs[5], PropMasks[5]);
+  GdkPixmap (XPMPropHelperFunc, PropPixs[6], PropMasks[6]);
+  GdkPixmap (XPMPropSignalType, PropPixs[7], PropMasks[7]);
+  GdkPixmap (XPMPropDeclar, PropPixs[8], PropMasks[8]);
+  GdkPixmap (XPMPropTypeDecl, PropPixs[9], PropMasks[9]);
+  GdkPixmap (XPMPropConstr, PropPixs[10], PropMasks[10]);
+  GdkPixmap (XPMPropDestr, PropPixs[11], PropMasks[11]);
+  GdkPixmap (XPMPropInitial, PropPixs[12], PropMasks[12]);
+  GdkPixmap (XPMPropFinal, PropPixs[13], PropMasks[13]);
+end;
+
+procedure TGtkEditorWindow.PropertyIcon (Item:TCollectionItem; var Pixmap:PGdkPixMap; var mask:PGdkBitmap);
+var r : integer;
+begin
+  r := ord((Item as TPropertyItem).propType);
+  Pixmap := PropPixs[r];
+  Mask := PropMasks[r];
+end;
+
+procedure TGtkEditorWindow.EnDisablePages (pt : TPropType);
+begin
+  BDefinition.Visible := pt in [ptField,ptProperty,ptFunction,ptProcedure,ptSignal,
+               ptHelperProc,ptHelperFunc,ptSignalType,ptDeclarations,ptTypeDecl,
+               ptConstructor,ptDestructor];
+  BParameter.visible := pt in [ptProperty,ptFunction,ptProcedure,
+               ptHelperProc,ptHelperFunc,ptSignalType,ptConstructor,ptDestructor];
+  BFunction.Visible := pt in [ptFunction,ptProcedure,ptHelperProc,ptHelperFunc,
+               ptConstructor,ptDestructor];
+  BRead.Visible := pt in [ptProperty];
+  BWrite.Visible := pt in [ptProperty];
+  BCode.visible := pt in [ptDeclarations,ptTypeDecl,ptInitialization,ptFinalization];
+end;
+
+procedure TGtkEditorWindow.RefreshProperty (Selected : TCollectionItem; NeedFocus:boolean);
+var r : byte;
+    s : string;
+begin
+  RefreshingProperty := True;
+  try
+    ciProperty := selected as TPropertyItem;
+    if assigned (ciProperty) then
+      with ciProperty do
+        begin
+        s := Code.Text;
+        FProperty.Sensitive := true;
+        r := ord (PropType);
+        PType.SetHistory (r);
+        EnDisablePages (PropType);
+        // definition
+        PName.Text := Name;
+        PPascalType.Text := PascalType;
+        PGtkName.Text := GtkName;
+        PSection.SetHistory (Ord(Section));
+        // read
+        PRType.SetHistory (Ord(ReadFuncType));
+        PRGtkName.Text := GtkName;
+        PRCode.Text := s;
+        PRConvert.Active := ReadConvert;
+        // write
+        PWType.SetHistory (Ord(WriteProcType));
+        PWGtkName.Text := WriteGtkName;
+        PWCode.Text := WriteCode.Text;
+        PWConvert.Active := WriteConvert;
+        // function
+        POverride.active := ptOverride in ProcTypes;
+        PVirtual.active := ptVirtual in ProcTypes;
+        PDynamic.active := ptDynamic in ProcTypes;
+        PAbstract.active := ptAbstract in ProcTypes;
+        PCDecl.active := ptCDecl in ProcTypes;
+        POverload.active := ptOverload in ProcTypes;
+        PReintroduce.active := ptReintroduce in ProcTypes;
+        PFCode.Text := s;
+        // Code
+        PCode.Text := s;
+        // Parameters
+        BrParams.ChangeCollection (Parameters);
+        end
+    else
+      begin
+      FProperty.Sensitive := false;
+      PType.Clear;
+      // definition
+      PName.Clear;
+      PPascalType.Clear;
+      PGtkName.Clear;
+      PSection.Clear;
+      // read
+      PRType.Clear;
+      PRGtkName.Clear;
+      PRCode.Clear;
+      PRConvert.Active := false;
+      // write
+      PWType.Clear;
+      PWGtkName.Clear;
+      PWCode.Clear;
+      PWConvert.Active := False;
+      // function
+      POverride.active := False;
+      PVirtual.active := False;
+      PDynamic.active := False;
+      PAbstract.active := False;
+      PCDecl.active := False;
+      POverload.active := False;
+      PReintroduce.active := False;
+      PFCode.Clear;
+      // Code
+      PCode.Clear;
+      // Parameters
+      BrParams.ChangeCollection (nil);
+      end;
+  finally
+    RefreshingProperty := false;
+  end;
+  if NeedFocus then
+    with PName do
+      begin
+      Bladen.PageIndex := 0;
+      SelectRegion (0, -1);
+      GrabFocus;
+      end;
+end;
+
+procedure TGtkEditorWindow.RefreshParam (Selected : TCollectionItem; NeedFocus:boolean);
+begin
+  RefreshingParam := True;
+  try
+    ciParameter := Selected as TParameterItem;
+    if assigned (ciParameter) then
+      with ciParameter do
+        begin
+        FParam.Sensitive := true;
+        ParamName.text := name;
+        ParamPascalType.text := PascalType;
+        self.ParamType.SetHistory (Ord(ParamType));
+        ParamConvert.Active := Convert;
+        end
+    else
+      begin
+      FParam.Sensitive := false;
+      ParamName.Clear;
+      ParamPascalType.Clear;
+      self.ParamType.Clear;
+      ParamConvert.Active := False;
+      end;
+    if NeedFocus then
+      with ParamName do
+        begin
+        selectRegion (0, -1);
+        GrabFocus;
+        end;
+  finally
+    RefreshingParam := False;
+  end;
+end;
+
+procedure TGtkEditorWindow.ObjectDisplayChanged;
+begin
+  with BrObjects do
+    if (SelectedRow >= 0) and assigned(ciObject) then
+      LObjects.Clist.CellText[SelectedRow,0] := ciObject.DisplayName;
+end;
+
+procedure TGtkEditorWindow.PropertyDisplayChanged;
+var r : integer;
+begin
+  with BrProperties do
+    if (SelectedRow >= 0) and assigned(ciProperty) then
+      begin
+      LProperties.CList.CellText[SelectedRow,1] := ciProperty.DisplayName;
+      r := ord(ciProperty.PropType);
+      LProperties.CList.SetPixMap (SelectedRow, 0, PropPixs[r], PropMasks[r]);
+      end;
+end;
+
+procedure TGtkEditorWindow.ParamDisplayChanged;
+begin
+  with BrParams do
+    if (SelectedRow >= 0) and assigned(ciParameter) then
+      LParams.CList.CellText[SelectedRow,0] := ciParameter.DisplayName;
+end;
+
+{ entry saving procedures/signals }
+
+// Definition
+
+procedure TGtkEditorWindow.ChangedDUsesList (Sender:TFPgtkObject; data:pointer);
+begin
+  if RefreshingDefinition then Exit;
+  if assigned (FDefs) then
+    FDefs.UsesList := DUsesList.Text;
+end;
+
+procedure TGtkEditorWindow.ChangedDUnitName (Sender:TFPgtkObject; data:pointer);
+begin
+  if RefreshingDefinition then Exit;
+  if assigned (FDefs) then
+    FDefs.UnitName := DUnitName.Text;
+end;
+
+procedure TGtkEditorWindow.ChangedDGtkPrefix (Sender:TFPgtkObject; data:pointer);
+begin
+  if RefreshingDefinition then Exit;
+  if assigned (FDefs) then
+    FDefs.GtkPrefix := DGtkPrefix.Text;
+end;
+
+// Object
+
+procedure TGtkEditorWindow.ChangedOName (Sender:TFPgtkObject; data:pointer);
+begin
+  if RefreshingObject then Exit;
+  if assigned(ciObject) then
+    begin
+    ciObject.Name := OName.Text;
+    ObjectDisplayChanged;
+    end;
+end;
+
+procedure TGtkEditorWindow.ChangedOInherit (Sender:TFPgtkObject; data:pointer);
+begin
+  if RefreshingObject then Exit;
+  if assigned(ciObject) then
+    ciObject.Inherit := OInherit.Text;
+end;
+
+procedure TGtkEditorWindow.ChangedOGtkName (Sender:TFPgtkObject; data:pointer);
+begin
+  if RefreshingObject then Exit;
+  if assigned(ciObject) then
+    ciObject.GtkName := OGtkName.Text;
+end;
+
+procedure TGtkEditorWindow.ChangedOGtkFuncName (Sender:TFPgtkObject; data:pointer);
+begin
+  if RefreshingObject then Exit;
+  if assigned(ciObject) then
+    ciObject.GtkFuncName := OGtkFuncName.Text;
+end;
+
+procedure TGtkEditorWindow.ChangedOCreateParams (Sender:TFPgtkObject; data:pointer);
+begin
+  if RefreshingObject then Exit;
+  if assigned(ciObject) then
+    ciObject.CreateParams := OCreateParams.Text;
+end;
+
+procedure TGtkEditorWindow.ChangedOCreateObject (Sender:TFPgtkObject; data:pointer);
+begin
+  if RefreshingObject then Exit;
+  if assigned(ciObject) then
+    ciObject.CreateObject := OCreateObject.active;
+end;
+
+procedure TGtkEditorWindow.ChangedOWithPointer (Sender:TFPgtkObject; data:pointer);
+begin
+  if RefreshingObject then Exit;
+  if assigned(ciObject) then
+    ciObject.WithPointer := OWithpointer.active;
+end;
+
+// Property
+
+procedure TGtkEditorWindow.ChangedPType (Sender:TFPgtkObject; data:pointer);
+begin
+  if RefreshingProperty then Exit;
+  if assigned(ciProperty) then
+    begin
+    ciProperty.PropType := TPropType(Pointertoint(data));
+    PropertyDisplayChanged;
+    EnDisablePages (ciProperty.PropType);
+    end;
+end;
+
+procedure TGtkEditorWindow.ChangedPName (Sender:TFPgtkObject; data:pointer);
+begin
+  if RefreshingProperty then Exit;
+  if assigned(ciProperty) then
+    begin
+    ciProperty.Name := PName.Text;
+    PropertyDisplayChanged;
+    end;
+end;
+
+procedure TGtkEditorWindow.ChangedPPascalType (Sender:TFPgtkObject; data:pointer);
+begin
+  if RefreshingProperty then Exit;
+  if assigned(ciProperty) then
+    ciProperty.PascalType := PPascalType.Text;
+end;
+
+procedure TGtkEditorWindow.ChangedPGtkName (Sender:TFPgtkObject; data:pointer);
+begin
+  if RefreshingProperty then Exit;
+  if assigned(ciProperty) then
+    ciProperty.GtkName := (Sender as TFpgtkEntry).Text;
+end;
+
+procedure TGtkEditorWindow.ChangedPSection (Sender:TFPgtkObject; data:pointer);
+begin
+  if RefreshingProperty then Exit;
+  if assigned(ciProperty) then
+    begin
+    ciProperty.Section := TInterfaceSection(Pointertoint(data));
+    PropertyDisplayChanged;
+    end;
+end;
+
+procedure TGtkEditorWindow.ChangedPCode (Sender:TFPgtkObject; data:pointer);
+var s : string;
+begin
+  if RefreshingProperty then Exit;
+  if assigned(ciProperty) then
+    s := (Sender as TFPgtkText).Text;
+  ciProperty.Code.Text := s;
+end;
+
+// read
+
+procedure TGtkEditorWindow.ChangedPRType (Sender:TFPgtkObject; data:pointer);
+begin
+  if RefreshingProperty then Exit;
+  if assigned(ciProperty) then
+    ciProperty.ReadfuncType := TPropFuncType(Pointertoint(data));
+end;
+
+procedure TGtkEditorWindow.ChangedPRConvert (Sender:TFPgtkObject; data:pointer);
+begin
+  if RefreshingProperty then Exit;
+  if assigned(ciProperty) then
+    ciProperty.ReadConvert := PRConvert.Active;
+end;
+
+// write
+
+procedure TGtkEditorWindow.ChangedPWType (Sender:TFPgtkObject; data:pointer);
+begin
+  if RefreshingProperty then Exit;
+  if assigned(ciProperty) then
+    begin
+    ciProperty.WriteProcType := TPropFuncType(Pointertoint(data));
+    end;
+end;
+
+procedure TGtkEditorWindow.ChangedPWGtkName (Sender:TFPgtkObject; data:pointer);
+begin
+  if RefreshingProperty then Exit;
+  if assigned(ciProperty) then
+    ciProperty.WriteGtkName := PWGtkName.Text;
+end;
+
+procedure TGtkEditorWindow.ChangedPWCode (Sender:TFPgtkObject; data:pointer);
+var s : string;
+begin
+  if RefreshingProperty then Exit;
+  if assigned(ciProperty) then
+    begin
+    s := PWCode.Text;
+    ciProperty.WriteCode.Text := s;
+    end;
+end;
+
+procedure TGtkEditorWindow.ChangedPWConvert (Sender:TFPgtkObject; data:pointer);
+begin
+  if RefreshingProperty then Exit;
+  if assigned(ciProperty) then
+    ciProperty.WriteConvert := PWConvert.active;
+end;
+
+// function
+
+procedure TGtkEditorWindow.ChangedPFuncType (Sender:TFPgtkObject; data:pointer);
+var pt : TProcType;
+begin
+  if RefreshingProperty then Exit;
+  if assigned(ciProperty) then
+    with ciProperty do
+      begin
+      pt := TProcType(pointertoint(data));
+      if (Sender as TFPgtkToggleButton).Active then
+        ProcTypes := Proctypes + [pt]
+      else
+        ProcTypes := Proctypes - [pt];
+      end;
+end;
+
+// parameter
+
+procedure TGtkEditorWindow.ChangedParamName (Sender:TFPgtkObject; data:pointer);
+begin
+  if RefreshingParam then Exit;
+  if assigned (ciParameter) then
+    begin
+    ciParameter.Name := ParamName.Text;
+    ParamDisplayChanged;
+    end;
+end;
+
+procedure TGtkEditorWindow.ChangedParamPascalType (Sender:TFPgtkObject; data:pointer);
+begin
+  if RefreshingParam then Exit;
+  if assigned (ciParameter) then
+    ciParameter.PascalType := ParamPascalType.Text;
+end;
+
+procedure TGtkEditorWindow.ChangedParamType (Sender:TFPgtkObject; data:pointer);
+begin
+  if RefreshingParam then Exit;
+  if assigned (ciParameter) then
+    ciParameter.ParamType := TParamType (Pointertoint(data));
+end;
+
+procedure TGtkEditorWindow.ChangedParamConvert (Sender:TFPgtkObject; data:pointer);
+begin
+  if RefreshingParam then Exit;
+  if assigned (ciParameter) then
+    ciParameter.Convert := ParamConvert.Active;
+end;
+
+{ *** Menu procedures *** }
+
+procedure TGtkEditorWindow.BuildReopenList;
+var r : integer;
+    mi : TFPgtkMenuItem;
+begin
+  with FReopenList do
+    begin
+    while (count > FSettings.MRUCount) do
+      Delete (0);
+    with MenuFileReopen do
+      begin
+      if assigned(SubMenu) then
+        SubMenu.Free;
+      SubMenu := TFPgtkMenu.Create;
+      with (submenu as TFPgtkMenu) do
+        for r := FReopenList.count-1 downto 0 do
+          begin
+          mi := NewMenuItem (FReopenList[r], '', '', nil, @FileReopen, mi);
+          Append (mi);
+          end;
+      end;
+    end;
+end;
+
+procedure TGtkEditorWindow.NewFilename (NewName : string);
+var r : integer;
+begin
+  if NewName = '' then
+    Title := sEditorTitle
+  else
+    Title := sEditorTitle + ' - ' + NewName;
+  FFilename := NewName;
+  with FReopenList do
+    begin
+    r := IndexOf (NewName);
+    if r >= 0 then
+      Delete (r);
+    Add (NewName);
+    BuildReopenList;
+    end;
+end;
+
+procedure TGtkEditorWindow.DataWrite (filename : string);
+var
+  BinStream : TMemoryStream;
+  StrStream : TFileStream;
+  l : TStrings;
+begin
+  StrStream := TFileStream.Create(filename, fmCreate);
+  try
+    case FSettings.FileFormat of
+    ffComponentText :
+      begin
+      BinStream := TMemoryStream.Create;
+      try
+        BinStream.WriteComponent(FDefs);
+        BinStream.Seek(0, soFromBeginning);
+        ObjectBinaryToText(BinStream, StrStream);
+      finally
+        BinStream.Free
+      end;
+      end;
+    ffComonentBin :
+      StrStream.WriteComponent(FDefs);
+    ffHomeText :
+      begin
+      l := TStringList.Create;
+      try
+        l.capacity := FDefs.definition.count * 5;
+        FDefs.Save (l);
+        l.SaveToStream (StrStream);
+      finally
+        l.Free;
+      end;
+      end;
+    end;
+    HasAFile := True;
+    NewFilename (filename);
+  finally
+    StrStream.Free;
+  end;
+end;
+
+procedure TGtkEditorWindow.DataRead (filename : string);
+var FStream : TFileStream;
+    MStream : TMemoryStream;
+    s : string[6];
+    l : TStrings;
+begin
+  if fileExists (filename) then
+    begin
+    FStream := TFileStream.Create(filename, fmOpenRead);
+    try
+      FStream.Readbuffer (s[1],6);
+      s[0] := #6;
+      FStream.Seek (0, soFromBeginning);
+      if not assigned (FDefs) then
+        FDefs := TObjectDefs.Create (nil);
+      if s = 'object' then
+        begin
+        MStream := TMemoryStream.Create;
+        try
+          ObjectTextToBinary(FStream, MStream);
+          MStream.Seek(0, soFromBeginning);
+          MStream.ReadComponent(FDefs);
+        finally
+          MStream.Free;
+        end;
+        end
+      else if s = 'defini' then
+        begin
+        l := TStringList.Create;
+        try
+          l.LoadFromStream (FStream);
+          FDefs.Load (l);
+        finally
+          l.Free;
+        end;
+        end
+      else
+        FStream.ReadComponent (FDefs);
+    finally
+      FStream.Free;
+    end;
+    HasAFile := True;
+    newFileName (filename);
+    end
+  else
+    ShowMessage ('Error', 'Can''t find file "'+filename+'"');
+end;
+
+procedure TGtkEditorWindow.Generate;
+var TheFile : TStringList;
+    Prog : TProgressWindow;
+begin
+  TheFile := TStringList.Create;
+  try
+    TheFile.beginUpdate;
+    if FSettings.ShowProgress then
+      begin
+      Prog := TProgressWindow.Create;
+      try
+        Prog.Show;
+        FDefs.Write (TheFile, @(Prog.StepIt), @(Prog.SetMax));
+        Prog.Hide;
+      finally
+        Prog.Free;
+      end;
+      end
+    else
+      FDefs.Write (TheFile, nil, nil);
+    TheFile.EndUpdate;
+    Thefile.SaveToFile (FDefs.UnitName+'.'+FSettings.Extention);
+  finally
+    TheFile.Free;
+  end;
+end;
+
+{ Menu signals }
+procedure TGtkEditorWindow.FileNew (Sender : TFPgtkObject; data : pointer);
+begin
+  FDefs.Free;
+  FDefs := TObjectDefs.Create (nil);
+  FFileName := '';
+  RefreshDefinition;
+end;
+
+procedure TGtkEditorWindow.DialogSetFilename (Sender:TFPgtkWindow;
+              aDialogResult:pointer; Action:integer; initiator:TFPgtkObject);
+begin
+  if Action = drOk then
+    FFilename := (Sender as TFPgtkFileSelection).Filename;
+end;
+
+procedure TGtkEditorWindow.FileOpen (Sender : TFPgtkObject; data : pointer);
+var fs : TFPgtkFileSelection;
+begin
+  fs := TFPgtkFileSelection.Create (gtk_window_dialog);
+  with fs do
+    begin
+    Title := 'Select file to open';
+    OKButton.ConnectClicked (@(fs.CloseWithResult), inttopointer(drOk));
+    CancelButton.ConnectClicked (@(fs.CloseWindow), nil);
+    Filename := FFilename;
+    if execute (nil, nil, @DialogSetFilename) = drOk then
+      begin
+      DataRead (FFilename);
+      RefreshDefinition;
+      end;
+    end;
+end;
+
+procedure TGtkEditorWindow.FileReopen (Sender : TFPgtkObject; data : pointer);
+begin
+  with (Sender as TFPgtkMenuItem) do
+    begin
+    DataRead (Text);
+    RefreshDefinition;
+    end;
+end;
+
+procedure TGtkEditorWindow.ToolbarReopen (Sender : TFpgtkObject; data : pointer);
+begin
+  (MenuFileReopen.submenu as TFPgtkMenu).Popup (0);
+end;
+
+procedure TGtkEditorWindow.FileSave (Sender : TFPgtkObject; data : pointer);
+begin
+  if FFilename = '' then
+    FileSaveAs (Sender, data)
+  else
+    DataWrite (FFilename);
+end;
+
+procedure TGtkEditorWindow.FileSaveAs (Sender : TFPgtkObject; data : pointer);
+var fs : TFPgtkFileSelection;
+begin
+  fs := TFPgtkFileSelection.Create (gtk_window_dialog);
+  with fs do
+    begin
+    Title := 'Give filename to save';
+    OKButton.ConnectClicked (@(fs.CloseWithResult), inttopointer(drOk));
+    CancelButton.ConnectClicked (@(fs.CloseWindow), nil);
+    Filename := FFilename;
+    if execute (nil, nil, @DialogSetFilename) = drOk then
+      DataWrite (FFilename);
+    end;
+end;
+
+procedure TGtkEditorWindow.FileExit (Sender : TFPgtkObject; data : pointer);
+begin
+  If FSettings.SaveOnClose then
+    FileSave (Sender, data);
+  Close;
+end;
+
+procedure TGtkEditorWindow.ToolsGenerate (Sender : TFPgtkObject; data : pointer);
+begin
+  Generate;
+end;
+
+procedure TGtkEditorWindow.ToolsOptions (Sender : TFPgtkObject; data : pointer);
+begin
+  with TSettingsDialog.Create do
+    Execute (nil, @FSettings, nil);
+end;
+
+procedure TGtkEditorWindow.HelpInfo (Sender : TFPgtkObject; data : pointer);
+begin
+  ShowMessage (sInfoTitle, sInfoMessage);
+end;
+
+procedure TGtkEditorWindow.HelpAbout (Sender : TFPgtkObject; data : pointer);
+var d : TFPgtkDialog;
+    b : TFPgtkButton;
+    box : TFPgtkBox;
+    AG : integer;
+begin
+  d := TFPgtkDialog.Create;
+  with d do
+    begin
+    title := sAboutTitle;
+    box := TFPgtkVBox.Create;
+    with Box do
+      begin
+      border := 15;
+      PackStart (TFPgtkLabel.Create (sAbout1));
+      PackStart (TFPgtkLabel.Create (sAbout2));
+      PackStart (TFPgtkHSeparator.Create, false, false, 8);
+      PackStart (TFPgtkLabel.Create (sAboutVersion));
+      PackStart (TFPgtkLabel.Create (sAboutDesigner));
+      end;
+    vbox.Packstart (box, true, false, 0);
+    with ActionArea do
+      begin
+      b := TFPgtkButton.CreateWithLabel (sOk);
+      b.ConnectClicked (@(d.CloseWindow), nil);
+      Packstart (b);
+      end;
+    AG := AccelGroupNew;
+    AcceleratorAdd (AG, b, sgClicked, gdk_Return, 0, TGTKAccelFlags(0));
+    AcceleratorAdd (AG, b, sgClicked, gdk_Cancel, 0, TGTKAccelFlags(0));
+    Execute (nil, nil, nil);
+    end;
+end;
+
+const
+  secSettings = 'Settings';
+  keySaveOnExit = 'SaveOnExit';
+  keyFileFormat = 'TextFormat';
+  keyMRUCount = 'MRUCount';
+  keyExtention = 'Extention';
+  keyProgressWindow = 'ShowProgress';
+  secMRU = 'Last open files';
+  keyFile = 'File';
+  keyCount = 'Count';
+
+procedure TGtkEditorWindow.ReadSettings;
+var c, r : integer;
+    s : string;
+begin
+  with FSettings do
+  with TMemInifile.Create(ChangeFileExt(paramstr(0), '.ini')) do
+    try
+      saveonclose := readbool (SecSettings, keySaveOnExit, true);
+      Fileformat := TFileFormat(readinteger (secSettings, keyFileFormat, 2));
+      Extention := readstring (secSettings, keyExtention, '.pp');
+      MRUCount := readinteger (secSettings, keyMRUCount, 5);
+      ShowProgress := readbool (SecSettings, keyProgressWindow, true);
+      FReopenList.capacity := MRUCount;
+      c := ReadInteger (secMRU, keyCount, 0);
+      for r := 0 to c-1 do
+        begin
+        s := readstring(secMRU, keyFile+inttostr(r), '');
+        if s <> '' then
+          FReopenlist.Add (s);
+        end;
+      BuildReopenList;
+    finally
+      free;
+    end;
+end;
+
+procedure TGtkEditorWindow.WriteSettings (Sender : TFPgtkObject; data : pointer);
+var r : integer;
+begin
+  with PSettingsRec(data)^, TMemInifile.Create (ChangeFileExt(paramstr(0), '.ini')) do
+    try
+      writebool (SecSettings, keySaveOnExit, saveonclose);
+      writeinteger (secSettings, keyFileFormat, Ord(FileFormat));
+      writestring (secSettings, keyExtention, Extention);
+      writeinteger (secSettings, keyMRUCount, MRUCount);
+      writebool (SecSettings, keyProgressWindow, ShowProgress);
+      writeinteger (secMRU, keyCount, FReopenlist.count);
+      UpdateFile;
+      for r := 0 to FReopenList.count-1 do
+        writestring (secMRU, keyFile+inttostr(r), FReopenList[r]);
+    finally
+      free;
+    end;
+end;
+
+end.

+ 52 - 0
packages/extra/fpgtk/editor/progwin.pp

@@ -0,0 +1,52 @@
+{$mode objfpc}{$h+}
+unit ProgWin;
+
+interface
+
+uses FPgtk, gtk, classes;
+
+type
+
+  TProgressWindow = class (TFPgtkWindow)
+  private
+    Bar : TFPgtkProgressbar;
+    procedure ComposeWindow;
+  public
+    procedure StepIt;
+    procedure SetMax (max : integer);
+    constructor create;
+  end;
+
+implementation
+
+uses gtkDefTexts;
+
+procedure TProgressWindow.ComposeWindow;
+begin
+  Title := ProgressWinTitle;
+  border := 20;
+
+  bar := TFPgtkProgressBar.Create (nil);
+  bar.FormatString := '- %p%% -';
+  add (bar);
+
+end;
+
+procedure TProgressWindow.StepIt;
+begin
+  with bar do
+    CurrentValue := CurrentValue + 1.0;
+end;
+
+procedure TProgressWindow.SetMax (max : integer);
+begin
+  bar.Configure (0.0,0.0,max);
+end;
+
+constructor TProgressWindow.create;
+begin
+  inherited create (gtk_window_dialog);
+  ComposeWindow;
+end;
+
+end.

+ 188 - 0
packages/extra/fpgtk/editor/settingsrec.pp

@@ -0,0 +1,188 @@
+{$mode objfpc}{$h+}
+unit SettingsRec;
+
+{$define UseLog}
+
+interface
+
+uses FPgtk, FPgtkExt;
+
+type
+
+  TFileFormat = (ffComonentBin, ffComponentText, ffHomeText);
+
+  PSettingsRec = ^TSettingsRec;
+  TSettingsRec = record
+    SaveOnClose : boolean;
+    FileFormat : TFileFormat;
+    Extention : string;
+    MRUCount : integer;
+    ShowProgress : boolean;
+  end;
+
+  TSettingsDialog = class (TFPgtkDialog)
+  private
+    FCBSaveOnClose : TFPgtkToggleButton;
+    FEFileFormat : TFPgtkOptionMenu;
+    FMenuFileFormat : TFPgtkMenu;
+    FEExtention : TFPgtkCombo;
+    FEMRUCount : TFPgtkSpinButton;
+    FCBProgressWindow : TFPgtkToggleButton;
+    procedure BuildDialog;
+  protected
+    procedure DoDialogResult (Action:integer; Sender:TFPgtkObject); override;
+    procedure DoDialogInit (InitData:pointer); override;
+  public
+    Constructor Create;
+  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);
+
+implementation
+
+uses GtkDefTexts, gdk, gtk, sysutils;
+
+constructor TSettingsDialog.Create;
+begin
+  inherited;
+  Title := sOptions;
+  BuildDialog;
+end;
+
+procedure TSettingsDialog.BuildDialog;
+var but : TFPgtkButton;
+    b, box : TFPgtkBox;
+    AG : integer;
+    AGroup : PGtkAccelGroup;
+begin
+  // Action Area
+  AG := AccelGroupNew;
+  Agroup := AccelGroups[AG];
+
+  Box := ActionArea;
+
+  but := TFPgtkButton.CreateWithLabel (sOk, AGroup);
+  box.PackEnd (but, false, false, 0);
+  with but do
+    begin
+    Candefault := true;
+    ConnectClicked (@CloseWithResult, inttopointer(drOk));
+    GrabDefault;
+    end;
+  AcceleratorAdd (AG, but, sgClicked, GDK_Return, 0, GTK_ACCEL_VISIBLE);
+
+  but := TFPgtkButton.CreateWithLabel (sCancel, AGroup);
+  box.PackEnd (but, false, false, 0);
+  with but do
+    begin
+    CanDefault := true;
+    ConnectClicked (@CloseWithResult, inttopointer(drCancel));
+    end;
+  AcceleratorAdd (AG, but, sgClicked, GDK_Escape, 0, gtk_accel_visible);
+
+  // Setting controls
+  box := vbox;
+  border := 15;
+
+  FEFileFormat := TFPgtkOptionMenu.Create;
+  FMenuFileFormat := NewMenu ('', [
+         NewMenuItem (sComponentBin, sHintCompBin, '', nil, nil, nil),
+         NewMenuItem (sComponentText, sHintCompText, '', nil, nil, nil),
+         NewMenuItem (sHomeText, sHintHomeText, '', nil, nil, nil)
+         ]);
+  FEFileFormat.Menu := FMenuFileFormat;
+  b := TFPgtkHBox.Create;
+  b.PackStart (TFPgtkLabel.Create (sFileFormat), false, false, 0);
+  b.PackStart (FEFileFormat, False, False, 10);
+  box.PackStart (b, false, false, 0);
+
+  b := TFPgtkHBox.Create;
+  box.PackStart (b, true, true, 0);
+
+  FCBSaveOnClose := TFPgtkCheckedButton.CreateWithLabel(sSaveonclose,AGroup);
+  b.PackStart (FCBSaveOnClose, False, False, 10);
+
+  FCBProgressWindow := TFPgtkCheckedButton.CreateWithLabel(sProgressWindow, AGroup);
+  b.PackStart (FCBProgressWindow, False, False, 10);
+
+  FEExtention := TFPgtkCombo.Create;
+  with FEExtention do
+    begin
+    SetValueInList (false, false);
+    List.Add (TFPgtkListItem.CreateWithLabel('pp'));
+    List.Add (TFPgtkListItem.CreateWithLabel('pas'));
+    end;
+  b := TFPgtkHBox.Create;
+  b.PackStart (TFPgtkLabel.Create (sExtention), false, false, 0);
+  b.PackStart (FEExtention, false, false, 5);
+  box.PackStart (b, false, false, 10);
+
+  FEMRUCount := TFPgtkSpinButton.Create;
+  with FEMRUCount do
+    begin
+    Configure (nil, 1.0, 0);
+    SnapToTicks := True;
+    Numeric := True;
+    Wrap := False;
+    Adjustment.configure (1.0, 10.0, 5.0, 1.0, 3.0, 1.0);
+    end;
+  b := TFPgtkHBox.Create;
+  b.PackStart (TFPgtkLabel.Create (sMRUcount), false, false, 0);
+  b.PackStart (FEMRUCount, false, false, 5);
+  box.PackStart (b, false, false, 10);
+
+end;
+
+procedure TSettingsDialog.DoDialogResult (Action:integer; Sender:TFPgtkObject);
+begin
+  if Action = drOk then
+    with PSettingsRec(DialogResult)^ do
+      begin
+      SaveOnClose := FCBSaveOnClose.Active;
+      FileFormat := TFileFormat(FMenuFileFormat.ActiveIndex);
+      Extention := FEExtention.Entry.Text;
+      MRUCount := FEMRUCount.AsInteger;
+      ShowProgress := FCBProgressWindow.Active;
+      end;
+  inherited;
+end;
+
+procedure TSettingsDialog.DoDialogInit (InitData:pointer);
+begin
+  with PSettingsRec(InitData)^ do
+    begin
+    FCBSaveOnClose.Active := SaveOnClose;
+    FEFileFormat.SetHistory (ord(FileFormat));
+    FEExtention.Entry.Text := Extention;
+    FEMRUCount.AsInteger := MRUCount;
+    FCBProgressWindow.Active := ShowProgress;
+    end;
+  inherited;
+end;
+
+procedure Log (s : string);
+begin
+  {$ifdef UseLog}
+  writeln (s);
+  {$endif}
+end;
+
+procedure Log (fmt : string; params : array of const);
+begin
+  Log (format (fmt, params));
+end;
+
+procedure Log (indent:integer; fmt:string; params:array of const);
+begin
+  Log (stringofchar(' ',indent) + format(fmt, params));
+end;
+
+procedure Log (indent:integer; s:string);
+begin
+  Log (stringofchar(' ',indent) + s);
+end;
+
+end.

+ 485 - 0
packages/extra/fpgtk/editor/xpms.pp

@@ -0,0 +1,485 @@
+unit XPMs;
+
+interface
+
+const
+
+  XPMFileNew : array [0..16] of string = (
+      '11 13 3 1',
+      '. c None',
+      'x c #000000',  // black
+      'o c #FFFFFF',  // white
+      'xxxxxxxx...',
+      'xooooooxx..',
+      'xooooooxox.',
+      'xooooooxxxx',
+      'xooooooooox',
+      'xooooooooox',
+      'xooooooooox',
+      'xooooooooox',
+      'xooooooooox',
+      'xooooooooox',
+      'xooooooooox',
+      'xooooooooox',
+      'xxxxxxxxxxx');
+
+  XPMFileOpen : array [0..17] of string = (
+      '16 13 4 1',
+      '. c None',     // no color
+      '# c #000000',  // black
+      'y c #ffff00',  // yellow
+      'g c #AFAF00',  // grayed yellow
+      '.......#####....',
+      '............#.#.',
+      '.............##.',
+      '.####.......###.',
+      '#yyyy######.....',
+      '#yyyyyyyyy#.....',
+      '#yyyyyyyyy#.....',
+      '#yyyy###########',
+      '#yyy#ggggggggg#.',
+      '#yy#ggggggggg#..',
+      '#y#ggggggggg#...',
+      '##ggggggggg#....',
+      '###########.....');
+
+  XPMFileSave : array [0..17] of string = (
+      '14 14 4 1',
+      '. c None',     // no color
+      '# c #000000',  // black
+      'g c #AFAF00',  // grayed yellow
+      '* c #C0C0C0',  // light gray
+      '##############',
+      '#g#********#*#',
+      '#g#********###',
+      '#g#********#g#',
+      '#g#********#g#',
+      '#g#********#g#',
+      '#gg#########g#',
+      '#gggggggggggg#',
+      '#gg#########g#',
+      '#gg#######*#g#',
+      '#gg#######*#g#',
+      '#gg#######*#g#',
+      '.#############');
+
+  XPMEditAdd : array [0..16] of string = (
+          '15 13 3 1',
+          '. c None',      // None
+          'o c #000000',   // Black
+          '- c #FFFFFF',   // White
+          '...............',
+          '...oooooo......',
+          '...o----oo.....',
+          '...o----o-o....',
+          '...o----oooo...',
+          '...o-------o...',
+          '...o-------o...',
+          '...o-------o...',
+          '...o-------o...',
+          '...o-------o...',
+          '...ooooooooo...',
+          '...............',
+          '...............');
+
+  XPMEditCopy : array [0..17] of string = (
+          '15 13 4 1',
+          '. c None',      // None
+          '# c #000000',   // Black
+          '- c #FFFFFF',   // White
+          'o c #0000FF',   // Blue
+          '######.........',
+          '#----##........',
+          '#----#-#.......',
+          '#-##-#oooooo...',
+          '#-----o----oo..',
+          '#-####o----o-o.',
+          '#-----o-##-oooo',
+          '#-####o-------o',
+          '#-----o-#####-o',
+          '######o-------o',
+          '......o-#####-o',
+          '......o-------o',
+          '......ooooooooo');
+
+  XPMEditDelete : array [0..17] of string = (
+          '14 13 4 1',
+          '. c None',      // None
+          '# c #000000',   // Black
+          '- c #FFFFFF',   // White
+          'r c #FF0000',   // Red
+          'rr-........rr-',
+          'rrrr-####.rr-.',
+          '.rrrr----rr-..',
+          '...rrr--rr-...',
+          '...#rrrrr--#..',
+          '...#-rrr---#..',
+          '...#rrrrr--#..',
+          '...rrr--rr-#..',
+          '..rrr----rr-..',
+          '.rrr------r-..',
+          '.rrr-######r-.',
+          '..r-..........',
+          '............r-');
+
+  XPMEditUp : array [0..15] of string = (
+          '7 13 2 1',
+          '. c None',
+          'x c #000000',
+          '...x...',
+          '...x...',
+          '..xxx..',
+          '..xxx..',
+          '.xxxxx.',
+          '.xxxxx.',
+          'xxxxxxx',
+          'xxxxxxx',
+          '..xxx..',
+          '..xxx..',
+          '..xxx..',
+          '..xxx..',
+          '..xxx..');
+  XPMEditDown : array [0..15] of string = (
+          '7 13 2 1',
+          '. c None',
+          'x c #000000',
+          '..xxx..',
+          '..xxx..',
+          '..xxx..',
+          '..xxx..',
+          '..xxx..',
+          'xxxxxxx',
+          'xxxxxxx',
+          '.xxxxx.',
+          '.xxxxx.',
+          '..xxx..',
+          '..xxx..',
+          '...x...',
+          '...x...');
+
+  XPMGenerate : array [0..24] of string = (
+          '15 17 7 1',
+          '. c None',      // None
+          '# c #000000',   // Black
+          '- c #FFFFFF',   // White
+          'x c #808080',   // Dark Gray
+          'r c #800000',   // Dark Red
+          '* c #C0C0C0',   // Light Gray
+          'y c #FFFF00',   // Yellow
+          '.....xxxxx.....',
+          '.xxx#-****#xxx.',
+          'x---#######---#',
+          'x-------------#',
+          'x--------###--#',
+          'x--------#rr#-#',
+          'x-------#y##--#',
+          'x-------#yx#--#',
+          'x------#y*#---#',
+          'x------#yx#---#',
+          'x-----#y*#----#',
+          'x-----#yx#----#',
+          'x-----###-----#',
+          'x-----##------#',
+          'x-#-#-#-------#',
+          'x-------------#',
+          '.#############.');
+
+  XPMPropField : array [0..18] of string = (
+      '15 15 3 1',
+      '. c None',     // no color
+      '* c #000000',  // black
+      '+ c #0000FF',  // color blue
+      '...............',
+      '...............',
+      '...............',
+      '..+++++++++++..',
+      '..+.........+..',
+      '..+.........+..',
+      '..+.........+..',
+      '..+.........+..',
+      '..+.........+..',
+      '..+.........+..',
+      '..+.........+..',
+      '..+++++++++++..',
+      '...............',
+      '...............',
+      '...............');
+
+  XPMPropProperty : array [0..18] of string = (
+      '15 15 3 1',
+      '. c None',     // no color
+      '* c #000000',  // black
+      '+ c #0000FF',  // color blue
+      '...............',
+      '.+++++++++++++.',
+      '.+...........+.',
+      '.+...........+.',
+      '.+...+**.....+.',
+      '.+.....+*....+.',
+      '.+.+*+*++**..+.',
+      '.+.++++++++*.+.',
+      '.+.+*+*++**..+.',
+      '.+.....+*....+.',
+      '.+...+**.....+.',
+      '.+...........+.',
+      '.+...........+.',
+      '.+++++++++++++.',
+      '...............');
+
+  XPMPropFunction : array [0..18] of string = (
+      '15 15 3 1',
+      '. c None',     // no color
+      '* c #000000',  // black
+      '+ c #00FF00',  // color green
+      '...............',
+      '...............',
+      '...............',
+      '..***..........',
+      '...++**........',
+      '.....++*.......',
+      '+*+*+*++**..*+*',
+      '++++++++++*.+++',
+      '+*+*+*++**..*+*',
+      '.....++*.......',
+      '...++**........',
+      '..***..........',
+      '...............',
+      '...............',
+      '...............');
+
+  XPMPropProcedure : array [0..18] of string = (
+      '15 15 3 1',
+      '. c None',     // no color
+      '* c #000000',  // black
+      '+ c #00FF00',  // color green
+      '...............',
+      '...............',
+      '...............',
+      '....***........',
+      '.....++**......',
+      '.......++*.....',
+      '+*+*+*+*++**...',
+      '++++++++++++*..',
+      '+*+*+*+*++**...',
+      '.......++*.....',
+      '.....++**......',
+      '....***........',
+      '...............',
+      '...............',
+      '...............');
+
+  XPMPropHelperProc : array [0..18] of string = (
+      '15 15 3 1',
+      '. c None',     // no color
+      '* c #000000',  // black
+      '+ c #FFFF00',  // color yellow
+      '...............',
+      '...............',
+      '...............',
+      '....***........',
+      '.....++**......',
+      '.......++*.....',
+      '+*+*+*+*++**...',
+      '++++++++++++*..',
+      '+*+*+*+*++**...',
+      '.......++*.....',
+      '.....++**......',
+      '....***........',
+      '...............',
+      '...............',
+      '...............');
+
+  XPMPropHelperFunc : array [0..18] of string = (
+      '15 15 3 1',
+      '. c None',     // no color
+      '* c #000000',  // black
+      '+ c #FFFF00',  // color yelow
+      '...............',
+      '...............',
+      '...............',
+      '..***..........',
+      '...++**........',
+      '.....++*.......',
+      '+*+*+*++**..*+*',
+      '++++++++++*.+++',
+      '+*+*+*++**..*+*',
+      '.....++*.......',
+      '...++**........',
+      '..***..........',
+      '...............',
+      '...............',
+      '...............');
+
+  XPMPropSignalType : array [0..18] of string = (
+      '15 15 3 1',
+      '. c None',     // no color
+      '* c #000000',  // black
+      '+ c #0000FF',  // color blue
+      '...............',
+      '+++.........+++',
+      '++...........++',
+      '+.+.........+.+',
+      '...+.......+...',
+      '....+.....+....',
+      '...............',
+      '.......*.......',
+      '...............',
+      '....+.....+....',
+      '...+.......+...',
+      '+.+.........+.+',
+      '++...........++',
+      '+++.........+++',
+      '...............');
+
+  XPMPropSignal : array [0..18] of string = (
+      '15 15 3 1',
+      '. c None',     // no color
+      '* c #000000',  // black
+      '+ c #0000FF',  // color blue
+      '...............',
+      '+++.........+++',
+      '++...........++',
+      '+.+.........+.+',
+      '...+*******+...',
+      '...*+.....+*...',
+      '...*.+...+.*...',
+      '...*...*...*...',
+      '...*.+...+.*...',
+      '...*+.....+*...',
+      '...+*******+...',
+      '+.+.........+.+',
+      '++...........++',
+      '+++.........+++',
+      '...............');
+
+  XPMPropdeclar : array [0..18] of string = (
+      '15 15 3 1',
+      '. c None',     // no color
+      '* c #FFFFFF',  // white
+      '+ c #FFFF00',  // color yelow
+      '.......+.......',
+      '......+++......',
+      '.....+++++*....',
+      '.....+++++*....',
+      '.....+++++*....',
+      '.....+++++*....',
+      '......+++**....',
+      '......+++*.....',
+      '.......+**.....',
+      '.......+*......',
+      '......+++......',
+      '.....+++++*....',
+      '.....+++++*....',
+      '......+++**....',
+      '.......+**.....');
+
+  XPMPropTypeDecl : array [0..18] of string = (
+      '15 15 3 1',
+      '. c None',     // no color
+      '* c #FFFFFF',  // white
+      '+ c #00FF00',  // color green
+      '.......+.......',
+      '......+++......',
+      '.....+++++*....',
+      '.....+++++*....',
+      '.....+++++*....',
+      '.....+++++*....',
+      '......+++**....',
+      '......+++*.....',
+      '.......+**.....',
+      '.......+*......',
+      '......+++......',
+      '.....+++++*....',
+      '.....+++++*....',
+      '......+++**....',
+      '.......+**.....');
+
+  XPMPropConstr : array [0..18] of string = (
+      '15 15 3 1',
+      '. c None',     // no color
+      '* c #000000',  // black
+      '+ c #0000FF',  // color blue
+      '...............',
+      '...............',
+      '...............',
+      '..***.....++++*',
+      '...++**...+++++',
+      '.....++*.....+*',
+      '+*+*+*++**...++',
+      '++++++++++*..+*',
+      '+*+*+*++**...++',
+      '.....++*.....+*',
+      '...++**...+++++',
+      '..***.....*+*+*',
+      '...............',
+      '...............',
+      '...............');
+
+  XPMPropDestr : array [0..19] of string = (
+      '15 15 4 1',
+      '. c None',     // no color
+      '* c #000000',  // black
+      '+ c #0000FF',  // color blue
+      '- c #FF0000',  // color red
+      '............-..',
+      '...........--..',
+      '..........--...',
+      '......***--....',
+      '.......+--*....',
+      '.......--++*...',
+      '+*+*+*--+*++**.',
+      '+++++--+++++++*',
+      '+*+*--+*+*++**.',
+      '...--....++*...',
+      '..--...++**....',
+      '.--...***......',
+      '--.............',
+      '-..............',
+      '...............');
+
+  XPMPropInitial : array [0..18] of string = (
+      '15 15 3 1',
+      '. c None',     // no color
+      '* c #000000',  // black
+      '+ c #0000FF',  // color blue
+      '+*.............',
+      '+*.............',
+      '+*.............',
+      '+*....***......',
+      '+*.....++**....',
+      '+*.......++*...',
+      '+*+*+*+*+*++**.',
+      '++++++++++++++*',
+      '+*+*+*+*+*++**.',
+      '+*.......++*...',
+      '+*.....++**....',
+      '+*....***......',
+      '+*.............',
+      '+*.............',
+      '+*.............');
+
+  XPMPropFinal : array [0..18] of string = (
+      '15 15 3 1',
+      '. c None',     // no color
+      '* c #000000',  // black
+      '+ c #0000FF',  // color blue
+      '.............+*',
+      '.............+*',
+      '.............+*',
+      '....***......+*',
+      '.....++**....+*',
+      '.......++*...+*',
+      '+*+*+*+*++**.+*',
+      '++++++++++++*+*',
+      '+*+*+*+*++**.+*',
+      '.......++*...+*',
+      '.....++**....+*',
+      '....***......+*',
+      '.............+*',
+      '.............+*',
+      '.............+*');
+
+
+implementation
+
+end.

+ 240 - 0
packages/extra/fpgtk/fpglib.pp

@@ -0,0 +1,240 @@
+{$mode objfpc}{$h+}
+unit FPGlib;
+
+interface
+
+uses classes, glib;
+
+type
+
+  TLukForEachProcedure = procedure (item : pointer; data : pointer) of object;
+
+  TLList = class (TList)
+  private
+    FGSList : PGSList;
+    FGList : PGList;
+    FNotUpdating,
+    FClassesChanged,FSlistChanged,FListChanged : Boolean;
+    procedure FreeList;
+    procedure FreeSList;
+    function CreateGList : PGList;
+    function GetTheGtkList : PGList;
+    procedure SetGtkList (Value : PGList);
+    function CreateGSList : PGSList;
+    function GetTheGtkSList : PGSlist;
+    procedure SetGtkSList (Value : PGSList);
+    procedure BuildFromGtkList;
+    procedure BuildFromGtkSList;
+  protected
+    procedure Notify (Ptr: Pointer; Action: TListNotification); override;
+    function GetData (index : integer) : pointer; dynamic;
+    function UngetData (data : pointer) : pointer; dynamic;
+    // GetData needs to give the pointer to the data in the List or SList of GTK
+    // UngetData needs to give the item in this list from the datapointer of GTK
+  public
+    constructor create;
+    destructor destroy; override;
+    function GetGtkList (buffered : boolean) : PGList;
+    function GetGtkSList (buffered : boolean) : PGSlist;
+    procedure BeginUpdate;  // Currently only changes in 1 list are possible
+    procedure EndUpdate;    // without memory leaks and/or errors in the list
+    procedure ForEach (Proc : TLukForEachprocedure; data : pointer);
+    property GtkList : PGList read GetTheGtkList write SetGtkList;
+    property GtkSList : PGSList read GetTheGtkSList write SetGtkSList;
+  end;
+
+implementation
+
+{ TLList }
+
+procedure TLList.FreeList;
+begin
+  if FGList <> null then
+    begin
+    g_list_free (FGList);
+    FGList := null;
+    end;
+end;
+
+procedure TLList.FreeSList;
+begin
+  if FGSList <> null then
+    begin
+    g_slist_free (FGSList);
+    FGSlist := null;
+    end;
+end;
+
+procedure TLList.Notify(Ptr: Pointer; Action: TListNotification);
+begin
+  inherited;
+  FClassesChanged := True;
+end;
+
+constructor TLList.create;
+begin
+  inherited create;
+  FClassesChanged := False;
+  FListChanged := false;
+  FSListChanged := False;
+  FGList := null;
+  FGSList := null;
+  FNotUpdating := True;
+end;
+
+destructor TLList.destroy;
+begin
+  FreeList;
+  FreeSList;
+  inherited Destroy;
+end;
+
+function TLList.GetGtkList (buffered : boolean) : PGList;
+begin
+  if buffered then
+    if FClasseschanged then
+      result := CreateGList
+    else if FSListChanged then
+      begin
+      BuildFromGtkSList;
+      result := CreateGList;
+      end
+    else
+      result := FGlist
+  else
+    result := CreateGList;
+end;
+
+function TLList.GetGtkSList (buffered : boolean) : PGSList;
+begin
+  if buffered then
+    if FClassesChanged then
+      result := CreateGSList
+    else if FListChanged then
+      begin
+      BuildFromGtkList;
+      result := CreateGSList;
+      end
+    else
+      result := FGSlist
+  else
+    result := CreateGSList;
+end;
+
+function TLList.CreateGList : PGList;
+var r : integer;
+begin
+  FreeList;
+  result := null;
+  for r := pred(count) downto 0 do
+    result := g_list_prepend (result, GetData(r));
+  FGList := result;
+end;
+
+function TLList.CreateGSList : PGSList;
+var r : integer;
+begin
+  FreeSList;
+  result := null;
+  for r := pred(count) downto 0 do
+    result := g_slist_prepend (result, GetData(r));
+  FGSList := result;
+end;
+
+function TLList.GetData (index : integer) : pointer;
+begin
+  result := items[index];
+end;
+
+function TLList.UngetData (data : pointer) : pointer;
+begin
+  result := data
+end;
+
+function TLList.GetTheGtkList : PGList;
+begin
+  result := GetGtkList (True);
+end;
+
+procedure TLList.SetGtkList (Value : PGList);
+begin
+  FGList := Value;
+  if FNotUpdating then
+    BuildFromGtkList
+  else
+    FListChanged := True;
+end;
+
+function TLList.GetTheGtkSList : PGSlist;
+begin
+  result := GetGtkSList (True);
+end;
+
+procedure TLList.SetGtkSList (Value : PGSList);
+begin
+  FGSlist := Value;
+  if FNotUpdating then
+    BuildFromGtkSList
+  else
+    FSListChanged := True;
+end;
+
+procedure TLList.BuildFromGtkList;
+var p : PGList;
+begin
+  clear;
+  p := FGList;
+  while p <> null do
+    begin
+    add (UngetData(p^.data));
+    p := p^.Next;
+    end;
+  FListChanged := False;
+  FSListChanged := False;
+  FClassesChanged := False;
+  FreeSList;
+end;
+
+procedure TLList.BuildFromGtkSList;
+var p :PGSList;
+begin
+  clear;
+  p := FGSList;
+  while p <> null do
+    begin
+    add (UngetData(p^.data));
+    p := p^.Next;
+    end;
+  FListChanged := False;
+  FSListChanged := False;
+  FClassesChanged := False;
+  FreeList;
+end;
+
+procedure TLList.BeginUpdate;
+begin
+  FNotUpdating := False;
+end;
+
+procedure TLList.EndUpdate;
+begin
+  FNotUpdating := True;
+  if FlistChanged then
+    BuildFromGtkSList
+  else if FSListChanged then
+    BuildFromGtkSList
+  else if FClassesChanged then
+    begin
+    FreeSList;
+    FreeList;
+    end;
+end;
+
+procedure TLList.ForEach (Proc : TLukForEachProcedure; data : pointer);
+var r: integer;
+begin
+  for r := 0 to pred(count) do
+    Proc (items[r], data);
+end;
+
+end.

+ 8489 - 0
packages/extra/fpgtk/fpgtk.def

@@ -0,0 +1,8489 @@
+definition
+  GtkPrefix=gtk
+  UsesList=classes, sysutils, gtk, gdk, glib, FPglib
+  UnitName=FPgtk
+  Count=96
+  Object=Object
+    GtkFuncName=object
+    WithPointer
+    Count=52
+    Prop=Signal
+      PropType=SignalType
+      Count=2
+      Param=Sender
+        PascalType=TFPgtkObject
+      Param=Data
+        PascalType=pointer
+    Prop=BooleanSignal
+      PropType=SignalType
+      Code=begin,end
+      Count=3
+      Param=Sender
+        PascalType=TFPgtkObject
+      Param=Bool
+        PascalType=boolean
+      Param=data
+        PascalType=pointer
+    Prop=Types to help
+      PropType=TypeDeclaration
+      Code="  FPgtkException = class (Exception) end;","  PPascalClassData = ^TPascalClassData;","  TPascalClassData = record","    TheInstance : TFPgtkObject;","  end;","  PSignalData = ^TSignalData;","  TSignalData = record","    TheData : pointer;","    TheWidget : TFPgtkObject;","    TheSignalProc : TFPgtkSignalFunction;","  end;","  TDestroyState = (dsAlive, dsWaiting, dsDestroying);","  TFPgtkObjectClass = Class of TFPgtkObject;"
+      Count=0
+    Prop=private decl
+      PropType=Declarations
+      Section=Private
+      Code=const,"  dtPascalInstance = 'Pascal_Instance';",,type,"  TIntegerPointer = record","    case word of ","      0 : (i : integer);","      1 : (p : pointer);","  end;",,var,"  ObjectsToFree : TList;","  ip : TIntegerPointer;"
+      Count=0
+    Prop=
+      PropType=Initialization
+      Code="ObjectsToFree := TList.Create;"
+      Count=0
+    Prop=
+      PropType=Finilization
+      Code=ObjectsToFree.Free;
+      Count=0
+    Prop=GetPascalInstance
+      PropType=HelperFunc
+      PascalType=TFPgtkObject
+      Code=begin,"  result := GetPascalInstance(GtkObject);","  if not assigned(result) and assigned(GtkObject) then","    result := ObjClass.CreateFromObject (GtkObject);",end;
+      Overload
+      Count=2
+      Param=gtkObject
+        PascalType=PGtkObject
+      Param=ObjClass
+        PascalType=TFPgtkObjectClass
+    Prop=GetPascalInstance
+      PropType=HelperFunc
+      PascalType=TFPgtkObject
+      Code="var p : pointer;",begin,"  result := nil;","  if assigned (gtkobject) then","    begin","    p := gtk_object_get_data (gtkObject, dtPascalInstance);","    if assigned(p) then","      result := PPascalClassData(p)^.TheInstance;","    end;",end;
+      Overload
+      Count=1
+      Param=gtkObject
+        PascalType=PGtkObject
+    Prop=ConvertToGtkObject
+      PropType=HelperFunc
+      PascalType=PGtkObject
+      Code=begin,"  if assigned(AnObject) then","    result := AnObject.TheGtkObject","  else","    result := nil;",end;
+      Count=1
+      Param=AnObject
+        PascalType=TFPgtkObject
+    Prop=ConvertToPgChar
+      PropType=HelperFunc
+      PascalType=PgChar
+      Code=begin,"  result := pointer(aString);",end;
+      Count=1
+      Param=AString
+        PascalType=string
+    Prop=ConvertSignalData
+      PropType=Function
+      Section=Private
+      PascalType=PSignalData
+      Code=begin,"  new (result);","  with result^ do","    begin","    TheSignalProc := proc;","    TheWidget := self;","    TheData := data;","    end;","  if FreeIt then","    SignalDatas.Add (result);",end;
+      Count=3
+      Param=proc
+        PascalType=TFPgtkSignalFunction
+      Param=data
+        PascalType=pointer
+      Param=FreeIt
+        PascalType=boolean
+    Prop=FGtkObject
+      PropType=Field
+      Section=Protected
+      PascalType=PGtkObject
+      Count=0
+    Prop=NotifyList
+      PropType=Field
+      Section=Private
+      PascalType=TList
+      Count=0
+    Prop=SignalDatas
+      PropType=Field
+      Section=Private
+      PascalType=TList
+      Count=0
+    Prop=ConvertDatas
+      PropType=Field
+      Section=Private
+      PascalType=TStringList
+      Count=0
+    Prop=PascalInstance
+      PropType=Field
+      Section=Private
+      PascalType=TPascalClassData
+      Count=0
+    Prop=FreeFPgtkObjects
+      PropType=HelperFunc
+      PascalType=longbool
+      Code="var r : integer;","    obj : TFPgtkObject;",begin,"  for r := ObjectsToFree.Count-1 downto 0 do","    begin","    obj := TFPgtkObject(ObjectsToFree[r]);","    if assigned (Obj) then","      Obj.Free;","    end;","  ObjectsToFree.Clear;","  result := False;",end;
+      Cdecl
+      Count=1
+      Param=Data
+        PascalType=pointer
+    Prop=FreeClass
+      PropType=Procedure
+      Section=Private
+      Code=begin,"  if FDestroying = dsAlive then","    begin","    if ObjectsToFree.Count = 0 then","      g_idle_Add (@FreeFPgtkObjects, null);","    ObjectsToFree.Add (self);","    FGtkObject := null;","    FDestroying := dsWaiting;","    end;",end;
+      Count=2
+      Param=Sender
+        PascalType=TFPgtkObject
+      Param=Data
+        PascalType=pointer
+    Prop=CheckConvertDatas
+      PropType=Procedure
+      Section=Private
+      Code=begin,"  if not assigned (ConvertDatas) then","    begin","    ConvertDatas := TStringList.Create;","    ConvertDatas.Sorted := True;","    end;",end;
+      Count=0
+    Prop=CheckNotifyList
+      PropType=Procedure
+      Section=Private
+      Code=begin,"  if not assigned (Notifylist) then","    NotifyList := TList.Create;",end;
+      Count=0
+    Prop=InitCreate
+      PropType=Procedure
+      Section=Private
+      Code=begin,"  inherited create;","  SignalDatas := TList.Create;",end;
+      Count=0
+    Prop=CreateGtkObject
+      PropType=Procedure
+      Section=Protected
+      Virtual
+      Abstract
+      Count=0
+    Prop=FinalCreate
+      PropType=Procedure
+      Section=Private
+      Code=begin,"  PascalInstance.TheInstance := Self;","  SetData (dtPascalInstance, @PascalInstance);","  ConnectDestroy (@FreeClass, nil);",end;
+      Count=0
+    Prop=Create
+      PropType=Constructor
+      Code=begin,"  InitCreate;","  CreateGtkObject;","  FinalCreate;",end;
+      Count=0
+    Prop=CreateFromObject
+      PropType=Constructor
+      Code=begin,"  InitCreate;","  FGtkObject := GtkObject;","  FinalCreate;",end;
+      Count=1
+      Param=GtkObject
+        PascalType=PGtkObject
+    Prop=Destroying
+      PropType=Property
+      PascalType=TDestroyState
+      ReadFuncType=Field
+      WriteProcType=NotImplemented
+      Count=0
+    Prop=AskNotification
+      PropType=Procedure
+      Code=begin,"  CheckNotifyList;","  with NotifyList do","    if indexof(AnObject) < 0 then","      begin","      Add (AnObject);","      AnObject.AskNotification (Self);","      end;",end;
+      Count=1
+      Param=AnObject
+        PascalType=TFPgtkObject
+    Prop=Destroy
+      PropType=Destructor
+      Code="var r : integer;","    datapointer : PSignalData;",begin,"  FDestroying := dsDestroying;","  if assigned(NotifyList) then","    begin","    for r := 0 to NotifyList.count-1 do","      TFPgtkObject(NotifyList[r]).NotifyDestroy (Self);","    NotifyList.Free;","    NotifyList := nil;","    end;","  if assigned(FGtkObject) and not Gtk_Object_destroyed(FGtkObject) then","    begin","    gtk_object_destroy (FGtkObject);","    FGtkObject := nil;","    end;","  for r := 0 to SignalDatas.count-1 do","    begin","    datapointer := signaldatas[r];","    dispose (datapointer);","    end;","  signaldatas.Free;","  if assigned (convertDatas) then","    ConvertDatas.Free;","  r := ObjectsToFree.indexof (self);","  if r >= 0 then","    ObjectsToFree[r] := nil;","  inherited destroy;",end;
+      Override
+      Count=0
+    Prop=NotifyDestroy
+      PropType=Procedure
+      Section=Protected
+      Code="var r : integer;",begin,"  if assigned(NotifyList) then","    begin","    r := NotifyList.indexOf (AnObject);","    if r >= 0 then","      NotifyList.Delete (r);","    end;",end;
+      Virtual
+      Count=1
+      Param=AnObject
+        PascalType=TFPgtkObject
+    Prop=Destroy
+      PropType=Signal
+      PascalType=Signal
+      GtkName=destroy
+      Count=0
+    Prop=SignalDisconnect
+      PropType=Procedure
+      Code=begin,"  gtk_signal_disconnect (TheGtkObject, SignalHandler);",end;
+      Count=1
+      Param=SignalHandler
+        PascalType=guint
+    Prop=SignalBlockHandler
+      PropType=Procedure
+      Code=begin,"  gtk_signal_handler_block (TheGtkObject, SignalHandler);",end;
+      Count=1
+      Param=SignalHandler
+        PascalType=guint
+    Prop=SignalUnblockHandler
+      PropType=Procedure
+      Code=begin,"  gtk_signal_handler_unblock (TheGtkObject, SignalHandler);",end;
+      Count=1
+      Param=SignalHandler
+        PascalType=guint
+    Prop=SignalEmit
+      PropType=Procedure
+      Code=begin,"  gtk_signal_emit_by_name (TheGtkObject, pgchar(aName), Args);",end;
+      Count=2
+      Param=aName
+        Convert
+        PascalType=string
+      Param=Args
+        PascalType=array of const
+    Prop=SignalNEmissions
+      PropType=Function
+      PascalType=guint
+      Code=begin,"  result := gtk_signal_n_emissions_by_name (FGtkObject, pgchar(aName));",end;
+      Count=1
+      Param=aName
+        Convert
+        PascalType=string
+    Prop=SignalEmitStop
+      PropType=Procedure
+      Code=begin,"  gtk_signal_emit_stop_by_name (FGtkObject, pgchar(aName));",end;
+      Count=1
+      Param=aName
+        Convert
+        PascalType=string
+    Prop=SetData
+      PropType=Procedure
+      GtkName=set_data
+      Count=2
+      Param=Key
+        Convert
+        PascalType=string
+      Param=Data
+        PascalType=pointer
+    Prop=UserData
+      PropType=Property
+      PascalType=pointer
+      GtkName=user_data
+      WriteGtkName=user_data
+      Count=0
+    Prop=SetDataFull
+      PropType=Procedure
+      Code=begin,"  gtk_object_set_data_full (TheGtkObject, pgChar(Key), ConvertSignalData (Destroyer, data, false), TGtkDestroyNotify(@DestroyData));","  CheckConvertDatas;","  ConvertDatas.Add (Key);",end;
+      Count=3
+      Param=Key
+        PascalType=string
+      Param=Data
+        PascalType=pointer
+      Param=Destroyer
+        PascalType=TFPgtkSignalFunction
+    Prop=RemoveData
+      PropType=Procedure
+      Code="var r : integer;",begin,"  gtk_object_remove_data (TheGtkObject, pgChar(Key));","  if assigned (ConvertDatas) then","    begin","    r := ConvertDatas.indexof (Key);","    if r >= 0 then","    ConvertDatas.Delete (r);","    end;",end;
+      Count=1
+      Param=Key
+        PascalType=string
+    Prop=GetData
+      PropType=Function
+      PascalType=pointer
+      Code="var p  : pointer;",begin,"  p := gtk_object_get_data (TheGtkObject, pgChar(Key));","  if assigned(ConvertDatas) and (ConvertDatas.IndexOf (Key) >= 0) then","    result := PPascalClassData (PSignalData(p)^.TheData)^.TheInstance","  else","    result := p;",end;
+      Count=1
+      Param=Key
+        PascalType=string
+    Prop=DestroyData
+      PropType=HelperProc
+      Code=begin,"  with PSignaldata(data)^ do","    TheSignalProc (TheWidget, TheData);",end;
+      Cdecl
+      Count=1
+      Param=data
+        PascalType=pointer
+    Prop=IntToPointer
+      PropType=HelperFunc
+      PascalType=pointer
+      Code=begin,"  ip.i := Value;","  result := ip.p;",end;
+      Count=1
+      Param=Value
+        PascalType=integer
+    Prop=PointerToInt
+      PropType=HelperFunc
+      PascalType=integer
+      Code=begin,"  ip.p := Value;","  result := ip.i;",end;
+      Count=1
+      Param=Value
+        PascalType=pointer
+    Prop=GtkDestroyed
+      PropType=Function
+      PascalType=boolean
+      GtkName=destroyed
+      Count=0
+    Prop=Constructed
+      PropType=Procedure
+      GtkName=constructed
+      Count=0
+    Prop=ConstructedDefault
+      PropType=Procedure
+      GtkName=default_construct
+      Count=0
+    Prop=Sink
+      PropType=Procedure
+      GtkName=sink
+      Count=0
+    Prop=Ref
+      PropType=Procedure
+      GtkName=ref
+      Count=0
+    Prop=Unref
+      PropType=Procedure
+      GtkName=unref
+      Count=0
+    Prop=WeakRef
+      PropType=Procedure
+      Code=begin,"  gtk_object_weakref (TheGtkObject, TGtkDestroyNotify(@DestroyData), ConvertSignalData (Notify, data, true));",end;
+      Count=2
+      Param=Notify
+        PascalType=TFPgtkSignalFunction
+      Param=data
+        PascalType=pointer
+    Prop=WeakUnref
+      PropType=Procedure
+      Code=begin,"  gtk_object_weakunref (TheGtkObject, TGtkDestroyNotify(@DestroyData), ConvertSignalData (Notify, data, true));",end;
+      Count=2
+      Param=notify
+        PascalType=TFPgtkSignalFunction
+      Param=data
+        PascalType=pointer
+  Object=Data
+    Inherit=Object
+    GtkFuncName=data
+    Count=1
+    Prop=Disconnect
+      PropType=Signal
+      PascalType=Signal
+      GtkName=disconnect
+      Count=0
+  Object=Adjustment
+    Inherit=Data
+    GtkFuncName=Adjustment
+    CreateParams=0,0,10,1,2,2
+    CreateObject
+    Count=12
+    Prop=Configure
+      PropType=Procedure
+      Code=begin,"  Lower := aLower;","  Upper := anUpper;","  Value := aValue;","  StepIncrement := aStepInc;","  PageIncrement := aPageInc;","  PageSize := aPageSize;",end;
+      Count=6
+      Param=aLower
+        PascalType=gfloat
+      Param=anUpper
+        PascalType=gfloat
+      Param=aValue
+        PascalType=gfloat
+      Param=aStepInc
+        PascalType=gfloat
+      Param=aPageInc
+        PascalType=gfloat
+      Param=aPageSize
+        PascalType=gfloat
+    Prop=ValueChanged
+      PropType=Signal
+      PascalType=Signal
+      GtkName=Value_Changed
+      Count=0
+    Prop=Changed
+      PropType=Signal
+      PascalType=Signal
+      GtkName=Changed
+      Count=0
+    Prop=ValueChanged
+      PropType=Procedure
+      GtkName=Value_Changed
+      Count=0
+    Prop=Changed
+      PropType=Procedure
+      GtkName=Changed
+      Count=0
+    Prop=ClampPage
+      PropType=Procedure
+      GtkName=Clamp_Page
+      Count=2
+      Param=aLower
+        PascalType=gfloat
+      Param=aUpper
+        PascalType=gfloat
+    Prop=Value
+      PropType=Property
+      PascalType=gfloat
+      GtkName=Value
+      ReadFuncType=ObjField
+      WriteGtkName=Value
+      Count=0
+    Prop=Lower
+      PropType=Property
+      PascalType=gfloat
+      GtkName=Lower
+      ReadFuncType=ObjField
+      WriteProcType=ObjField
+      WriteGtkName=Lower
+      Count=0
+    Prop=Upper
+      PropType=Property
+      PascalType=gfloat
+      GtkName=Upper
+      ReadFuncType=ObjField
+      WriteProcType=ObjField
+      WriteGtkName=Upper
+      Count=0
+    Prop=StepIncrement
+      PropType=Property
+      PascalType=gfloat
+      GtkName=Step_Increment
+      ReadFuncType=ObjField
+      WriteProcType=ObjField
+      WriteGtkName=Step_Increment
+      Count=0
+    Prop=PageIncrement
+      PropType=Property
+      PascalType=gfloat
+      GtkName=Page_Increment
+      ReadFuncType=ObjField
+      WriteProcType=ObjField
+      WriteGtkName=Page_increment
+      Count=0
+    Prop=PageSize
+      PropType=Property
+      PascalType=gfloat
+      GtkName=Page_Size
+      ReadFuncType=ObjField
+      WriteProcType=ObjField
+      WriteGtkName=Page_Size
+      Count=0
+  Object=ToolTips
+    Inherit=Data
+    GtkFuncName=tooltips
+    CreateObject
+    Count=13
+    Prop=SetColors
+      PropType=Procedure
+      GtkName=set_colors
+      Count=2
+      Param=Fore
+        PascalType=PGdkColor
+      Param=Back
+        PascalType=PGdkColor
+    Prop=SetTip
+      PropType=Procedure
+      GtkName=set_tip
+      Count=3
+      Param=Widget
+        Convert
+        PascalType=TFPgtkWidget
+      Param=TipText
+        Convert
+        PascalType=string
+      Param=TipPrivate
+        Convert
+        PascalType=string
+    Prop=Enabled
+      PropType=Property
+      PascalType=boolean
+      GtkName=enabled
+      ReadConvert
+      ReadFuncType=ObjFunc
+      WriteProcType=Proc
+      WriteCode=begin,"  if TheValue then","    gtk_tooltips_enable (TheGtkObject)","  else","    gtk_tooltips_disable (TheGtkObject);",end;
+      Count=0
+    Prop=Delay
+      PropType=Property
+      PascalType=integer
+      GtkName=delay
+      ReadFuncType=ObjFunc
+      WriteGtkName=delay
+      Count=0
+    Prop=ColorForeground
+      PropType=Property
+      PascalType=PGdkColor
+      GtkName=foreground
+      ReadFuncType=ObjField
+      WriteProcType=Proc
+      WriteGtkName=SetColorForeground
+      WriteCode=begin,"  SetColors (TheValue, ColorBackGround);",end;
+      Count=0
+    Prop=ColorBackground
+      PropType=Property
+      PascalType=PGdkColor
+      GtkName=background
+      ReadFuncType=ObjField
+      WriteProcType=Proc
+      WriteGtkName=SetColorBackground
+      WriteCode=begin,"  SetColors (ColorForeground, TheValue);",end;
+      Count=0
+    Prop=GetTooltipsData
+      PropType=HelperFunc
+      PascalType=PGtkTooltipsData
+      Code=begin,"  result := gtk_tooltips_data_get (ConvertToGtkWidget(Widget));",end;
+      Count=1
+      Param=Widget
+        PascalType=TFPgtkWidget
+    Prop=ComposeTooltip
+      PropType=HelperFunc
+      PascalType=string
+      Code=begin,"  result := TooltipText;","  if PrivText <> '' then","    result := result + '|' + PrivText;",end;
+      Count=2
+      Param=TooltipText
+        PascalType=string
+      Param=PrivText
+        PascalType=string
+    Prop=DecomposeTooltip
+      PropType=HelperProc
+      Code="var r : integer;",begin,"  r := pos ('|', tooltip);","  if r > 0 then","    begin","    TooltipText := copy(Tooltip, 1, r-1);","    PrivText := copy (Tooltip, r+1, maxint);","    end","  else","    begin","    TooltipText := Tooltip;","    PrivText := '';","    end;",end;
+      Count=3
+      Param=Tooltip
+        PascalType=string
+      Param=TooltipText
+        PascalType=string
+        ParamType=Var
+      Param=PrivText
+        PascalType=string
+        ParamType=Var
+    Prop=TheTooltips
+      PropType=Declarations
+      Code="var ","  TheTooltips : TFPgtkTooltips;"
+      Count=0
+    Prop=CheckTooltips
+      PropType=HelperProc
+      Section=Private
+      Code=begin,"if not assigned (TheTooltips) then","  TheTooltips := TFPgtkTooltips.Create;",end;
+      Count=0
+    Prop=
+      PropType=Finilization
+      Code="if assigned (TheTooltips) then","  TheTooltips.Free;"
+      Count=0
+    Prop=ForceWindow
+      PropType=Procedure
+      GtkName=force_window
+      Count=0
+  Object=Widget
+    Inherit=Object
+    GtkFuncName=widget
+    Count=107
+    Prop=TheGtkWidget
+      PropType=Property
+      PascalType=PGtkWidget
+      Code=begin,"  result := PGtkWidget (TheGtkObject);",end;
+      ReadFuncType=Proc
+      WriteProcType=Proc
+      WriteCode=begin,"  FGtkObject := PgtkObject (TheValue);",end;
+      Count=0
+    Prop=GetPascalInstance
+      PropType=HelperFunc
+      PascalType=TFPgtkWidget
+      Code=begin,"  result := TFPgtkWidget (GetPascalInstance (PGtkObject(widget)));",end;
+      Overload
+      Count=1
+      Param=Widget
+        PascalType=PGtkWidget
+    Prop=GetPascalInstance
+      PropType=HelperFunc
+      PascalType=TFPgtkWidget
+      Code=begin,"  result := TFPgtkWidget (GetPascalInstance (PGtkObject(Widget), ObjClass));",end;
+      Overload
+      Count=2
+      Param=Widget
+        PascalType=PGtkWidget
+      Param=ObjClass
+        PascalType=TFPgtkObjectClass
+    Prop=ConvertToGtkWidget
+      PropType=HelperFunc
+      PascalType=PGtkWidget
+      Code=begin,"  if assigned(AnObject) then","    result := AnObject.TheGtkWidget","  else","    result := nil;",end;
+      Count=1
+      Param=AnObject
+        PascalType=TFPgtkWidget
+    Prop=WidgetSignal
+      PropType=SignalType
+      Count=3
+      Param=Sender
+        PascalType=TFPgtkObject
+      Param=Widget
+        Convert
+        PascalType=TFPgtkWidget
+      Param=Data
+        PascalType=pointer
+    Prop=SetFlags
+      PropType=Procedure
+      Section=Protected
+      GtkName=set_flags
+      Count=1
+      Param=NewFlags
+        PascalType=longint
+    Prop=UnsetFlags
+      PropType=Procedure
+      Section=Protected
+      GtkName=unset_flags
+      Count=1
+      Param=NewUnsetFlags
+        PascalType=longint
+    Prop=Map
+      PropType=Procedure
+      Section=Protected
+      GtkName=map
+      Count=0
+    Prop=Unmap
+      PropType=Procedure
+      Section=Protected
+      GtkName=unmap
+      Count=0
+    Prop=QueueDraw
+      PropType=Procedure
+      Section=Protected
+      GtkName=queue_draw
+      Count=0
+    Prop=QueueResize
+      PropType=Procedure
+      Section=Protected
+      GtkName=queue_resize
+      Count=0
+    Prop=Draw
+      PropType=Procedure
+      GtkName=draw
+      Overload
+      Count=1
+      Param=Rectangle
+        PascalType=PGdkRectangle
+    Prop=DrawFocus
+      PropType=Procedure
+      Section=Protected
+      GtkName=draw_focus
+      Count=0
+    Prop=DrawDefault
+      PropType=Procedure
+      Section=Protected
+      GtkName=draw_default
+      Count=0
+    Prop=Show
+      PropType=Procedure
+      GtkName=show
+      Count=0
+    Prop=Hide
+      PropType=Procedure
+      GtkName=hide
+      Count=0
+    Prop=Realize
+      PropType=Procedure
+      GtkName=realize
+      Count=0
+    Prop=Unrealize
+      PropType=Procedure
+      GtkName=unrealize
+      Count=0
+    Prop=ShowNow
+      PropType=Procedure
+      GtkName=show_now
+      Count=0
+    Prop=ShowAll
+      PropType=Procedure
+      GtkName=show_all
+      Count=0
+    Prop=HideAll
+      PropType=Procedure
+      GtkName=hide_all
+      Count=0
+    Prop=SetAllocation
+      PropType=Procedure
+      Code=begin,"  with AnAllocation do","    SetAllocation (x, y, width, height);",end;
+      Overload
+      Count=1
+      Param=AnAllocation
+        PascalType=TGtkAllocation
+    Prop=SetAllocation
+      PropType=Procedure
+      Code=begin,"  SetUPosition (x, y);","  SetUSize (width, height);",end;
+      Overload
+      Count=4
+      Param=x
+        PascalType=integer
+      Param=y
+        PascalType=integer
+      Param=width
+        PascalType=integer
+      Param=height
+        PascalType=integer
+    Prop=Allocation
+      PropType=Property
+      PascalType=TGtkAllocation
+      GtkName=allocation
+      ReadFuncType=ObjField
+      WriteProcType=ExistingProc
+      WriteGtkName=SetAllocation
+      Count=0
+    Prop=SetUPosition
+      PropType=Procedure
+      GtkName=set_uposition
+      Count=2
+      Param=x
+        PascalType=integer
+      Param=y
+        PascalType=integer
+    Prop=SetUsize
+      PropType=Procedure
+      GtkName=set_usize
+      Count=2
+      Param=width
+        PascalType=integer
+      Param=height
+        PascalType=integer
+    Prop=Name
+      PropType=Property
+      PascalType=string
+      GtkName=name
+      WriteGtkName=name
+      WriteConvert
+      Count=0
+    Prop=Flags
+      PropType=Property
+      PascalType=longint
+      GtkName=GetPropFlags
+      Code=begin,"  result := gtk_widget_Flags (TheGtkObject);",end;
+      ReadFuncType=Proc
+      WriteProcType=Proc
+      WriteGtkName=SetPropFlags
+      WriteCode="var f : integer;",begin,"  f := GetPropFlags;","  UnsetFlags (f and not TheValue);","  SetFlags (not f and TheValue);",end;
+      Count=0
+    Prop=State
+      PropType=Property
+      PascalType=longint
+      GtkName=State
+      ReadFuncType=GtkMacro
+      WriteProcType=NotImplemented
+      Count=0
+    Prop=SavedState
+      PropType=Property
+      PascalType=longint
+      GtkName=Saved_State
+      ReadFuncType=GtkMacro
+      WriteProcType=NotImplemented
+      Count=0
+    Prop=Parent
+      PropType=Property
+      PascalType=TFPgtkWidget
+      Code="var gtkparent : PgtkWidget;","    o : TFPgtkObject;",begin,"  gtkParent := TheGtkObject^.parent;","  o := GetPascalInstance (PgtkObject(GtkParent));","  if o is TFPgtkWidget then","    result := TFPgtkWidget(o)","  else","    result := nil;",end;
+      ReadFuncType=Proc
+      WriteProcType=Proc
+      WriteCode="var gtkparent : PgtkWidget;",begin,"  gtkParent := TheGtkObject^.parent;","  if assigned(TheValue) then","    if assigned(gtkParent) then","      reparent (TheValue)","    else","      gtk_widget_set_parent (TheGtkWidget, ConvertToGtkWidget(TheValue))","  else","    if assigned(gtkParent) then","      gtk_widget_unparent (TheGtkWidget);","end;    ","      "
+      Count=0
+    Prop=ParentWindow
+      PropType=Property
+      PascalType=PGdkWindow
+      GtkName=parent_window
+      WriteGtkName=parent_window
+      Count=0
+    Prop=Unparent
+      PropType=Procedure
+      GtkName=unparent
+      Count=0
+    Prop=Reparent
+      PropType=Procedure
+      Section=Private
+      Code=begin,"  if (NewParent is TFpgtkContainer) then","    begin","    ref;","    TFPgtkContainer(Parent).remove (self);","    TFPgtkContainer(NewParent).Add (Self);","    unref;","    end;",end;
+      Count=1
+      Param=NewParent
+        PascalType=TFPgtkWidget
+    Prop=Visible
+      PropType=Property
+      PascalType=boolean
+      GtkName=Visible
+      ReadFuncType=GtkMacro
+      WriteProcType=Proc
+      WriteCode=begin,"  if TheValue then","    Show","  else","    Hide;",end;
+      Count=0
+    Prop=NoWindow
+      PropType=Property
+      PascalType=boolean
+      GtkName=No_Window
+      ReadFuncType=GtkMacro
+      WriteProcType=Proc
+      WriteCode=begin,"  if TheValue then","    SetFlags (GTK_NO_WINDOW)","  else","    UnSetFlags (GTK_NO_WINDOW);",end;
+      Count=0
+    Prop=Realized
+      PropType=Property
+      PascalType=boolean
+      GtkName=realized
+      ReadFuncType=GtkMacro
+      WriteProcType=Proc
+      WriteCode=begin,"  if TheValue then ","    Realize","  else","    Unrealize;",end;
+      Count=0
+    Prop=Mapped
+      PropType=Property
+      PascalType=boolean
+      GtkName=Mapped
+      ReadFuncType=GtkMacro
+      WriteProcType=Proc
+      WriteCode=begin,"  if TheValue then","    Map","  else","    Unmap;",end;
+      Count=0
+    Prop=Drawable
+      PropType=Property
+      PascalType=boolean
+      GtkName=Drawable
+      ReadFuncType=GtkMacro
+      WriteProcType=NotImplemented
+      Count=0
+    Prop=IsSensitive
+      PropType=Property
+      PascalType=boolean
+      GtkName=Is_Sensitive
+      ReadFuncType=GtkMacro
+      WriteProcType=NotImplemented
+      Count=0
+    Prop=Sensitive
+      PropType=Property
+      PascalType=boolean
+      GtkName=Sensitive
+      ReadFuncType=GtkMacro
+      WriteGtkName=sensitive
+      Count=0
+    Prop=ParentSensitive
+      PropType=Property
+      PascalType=boolean
+      GtkName=Parent_Sensitive
+      ReadFuncType=GtkMacro
+      WriteProcType=Proc
+      WriteCode=begin,"  if TheValue then","    SetFlags (GTK_PARENT_SENSITIVE)","  else","    UnSetFlags (GTK_PARENT_SENSITIVE);",end;
+      Count=0
+    Prop=AppPaintable
+      PropType=Property
+      PascalType=boolean
+      GtkName=App_Paintable
+      ReadFuncType=GtkMacro
+      WriteProcType=NotImplemented
+      WriteGtkName=app_paintable
+      WriteCode="// conditional compile ; niet bij gtkwin"
+      Count=0
+    Prop=CanFocus
+      PropType=Property
+      PascalType=boolean
+      GtkName=Can_Focus
+      ReadFuncType=GtkMacro
+      WriteProcType=Proc
+      WriteCode=begin,"  if TheValue then","    SetFlags (GTK_CAN_FOCUS)","  else","    UnSetFlags (GTK_CAN_FOCUS);",end;
+      Count=0
+    Prop=GrabFocus
+      PropType=Procedure
+      GtkName=grab_focus
+      Count=0
+    Prop=HasFocus
+      PropType=Property
+      PascalType=boolean
+      GtkName=Has_Focus
+      ReadFuncType=GtkMacro
+      WriteProcType=NotImplemented
+      Count=0
+    Prop=CanDefault
+      PropType=Property
+      PascalType=boolean
+      GtkName=Can_Default
+      ReadFuncType=GtkMacro
+      WriteProcType=Proc
+      WriteCode=begin,"  if TheValue then","    SetFlags (GTK_CAN_DEFAULT)","  else","    UnSetFlags (GTK_CAN_DEFAULT);",end;
+      Count=0
+    Prop=GrabDefault
+      PropType=Procedure
+      GtkName=grab_default
+      Count=0
+    Prop=HasDefault
+      PropType=Property
+      PascalType=boolean
+      GtkName=Has_Default
+      ReadFuncType=GtkMacro
+      WriteProcType=NotImplemented
+      Count=0
+    Prop=ReceivesDefault
+      PropType=Property
+      PascalType=boolean
+      GtkName=Receives_Default
+      ReadFuncType=GtkMacro
+      WriteProcType=NotImplemented
+      Count=0
+    Prop=CompositeChild
+      PropType=Property
+      PascalType=boolean
+      GtkName=Composite_Child
+      ReadFuncType=GtkMacro
+      WriteProcType=NotImplemented
+      Count=0
+    Prop=Tooltip
+      PropType=Property
+      PascalType=string
+      Code="var data : PGtkTooltipsData;",begin,"  data := Gtk_Tooltips_Data_Get (TheGtkObject);","  if assigned(data) then","    with data^ do","      result := ComposeTooltip (Tip_Text, tip_private)","  else","    result := '';",end;
+      ReadFuncType=Proc
+      WriteProcType=Proc
+      WriteCode="var t, p : string;","    ttdata : PGtkTooltipsData;",begin,"  if TheValue = '' then","    begin","    ttdata := GetTooltipsData (Self);","    if assigned (ttdata) then","      ; // find a way to remove the hint. Setting '' does not remove","    end","  else","    begin","    CheckTooltips;","    DecomposeTooltip (TheValue, t, p);","    TheToolTips.SetTip (self, t, p);","    end;",end;
+      Count=0
+    Prop=HideOnDelete
+      PropType=Procedure
+      GtkName=hide_on_delete
+      Count=0
+    Prop=Colormap
+      PropType=Property
+      PascalType=PGdkColormap
+      GtkName=colormap
+      WriteGtkName=colormap
+      Count=0
+    Prop=Show
+      PropType=Signal
+      PascalType=Signal
+      GtkName=show
+      Count=0
+    Prop=hide
+      PropType=Signal
+      PascalType=Signal
+      GtkName=hide
+      Count=0
+    Prop=map
+      PropType=Signal
+      PascalType=Signal
+      GtkName=map
+      Count=0
+    Prop=unmap
+      PropType=Signal
+      PascalType=Signal
+      GtkName=unmap
+      Count=0
+    Prop=realize
+      PropType=Signal
+      PascalType=Signal
+      GtkName=realize
+      Count=0
+    Prop=unrealize
+      PropType=Signal
+      PascalType=Signal
+      GtkName=unrealize
+      Count=0
+    Prop=DrawFocus
+      PropType=Signal
+      PascalType=Signal
+      GtkName=draw-focus
+      Count=0
+    Prop=DrawDefault
+      PropType=Signal
+      PascalType=Signal
+      GtkName=draw-defaut
+      Count=0
+    Prop=ParentSet
+      PropType=Signal
+      PascalType=WidgetSignal
+      GtkName=parent-set
+      Count=0
+    Prop=GrabFocus
+      PropType=Signal
+      PascalType=Signal
+      GtkName=grab-focus
+      Count=0
+    Prop=Event
+      PropType=SignalType
+      PascalType=boolean
+      Count=3
+      Param=Sender
+        Convert
+        PascalType=TFPgtkWidget
+      Param=Event
+        PascalType=PGdkEvent
+      Param=data
+        PascalType=pointer
+    Prop=Event
+      PropType=Signal
+      PascalType=Event
+      GtkName=event
+      Count=0
+    Prop=EventButton
+      PropType=SignalType
+      PascalType=boolean
+      Count=3
+      Param=Sender
+        Convert
+        PascalType=TFPgtkWidget
+      Param=Event
+        PascalType=PGdkEventButton
+      Param=data
+        PascalType=pointer
+    Prop=ButtonPressEvent
+      PropType=Signal
+      PascalType=EventButton
+      GtkName=button-press-event
+      Count=0
+    Prop=ButtonReleaseEvent
+      PropType=Signal
+      PascalType=EventButton
+      GtkName=button-release-event
+      Count=0
+    Prop=EventMotion
+      PropType=SignalType
+      PascalType=boolean
+      Count=3
+      Param=Sender
+        Convert
+        PascalType=TFPgtkWidget
+      Param=Event
+        PascalType=PGdkEventMotion
+      Param=data
+        PascalType=pointer
+    Prop=MotionNotifyEvent
+      PropType=Signal
+      PascalType=EventMotion
+      GtkName=motion-notify-event
+      Count=0
+    Prop=DeleteEvent
+      PropType=Signal
+      PascalType=Event
+      GtkName=delete-event
+      Count=0
+    Prop=DestroyEvent
+      PropType=Signal
+      PascalType=Event
+      GtkName=destroy-event
+      Count=0
+    Prop=EventExpose
+      PropType=SignalType
+      PascalType=boolean
+      Count=3
+      Param=Sender
+        Convert
+        PascalType=TFPgtkWidget
+      Param=Event
+        PascalType=PGdkEventExpose
+      Param=data
+        PascalType=pointer
+    Prop=ExposeEvent
+      PropType=Signal
+      PascalType=EventExpose
+      GtkName=expose-event
+      Count=0
+    Prop=EventKey
+      PropType=SignalType
+      PascalType=boolean
+      Count=3
+      Param=Sender
+        Convert
+        PascalType=TFPgtkWidget
+      Param=Event
+        PascalType=PGdkEventKey
+      Param=data
+        PascalType=pointer
+    Prop=KeyPressEvent
+      PropType=Signal
+      PascalType=EventKey
+      GtkName=key-press-event
+      Count=0
+    Prop=KeyReleaseEvent
+      PropType=Signal
+      PascalType=EventKey
+      GtkName=key-release-event
+      Count=0
+    Prop=EventCrossing
+      PropType=SignalType
+      PascalType=boolean
+      Count=3
+      Param=Sender
+        Convert
+        PascalType=TFPgtkWidget
+      Param=Event
+        PascalType=PGdkEventCrossing
+      Param=data
+        PascalType=pointer
+    Prop=EnterNotifyEvent
+      PropType=Signal
+      PascalType=EventCrossing
+      GtkName=enter-notify-event
+      Count=0
+    Prop=LeaveNotifyEvent
+      PropType=Signal
+      PascalType=EventCrossing
+      GtkName=leave-notify-event
+      Count=0
+    Prop=EventConfigure
+      PropType=SignalType
+      PascalType=boolean
+      Count=3
+      Param=Sender
+        Convert
+        PascalType=TFPgtkWidget
+      Param=Event
+        PascalType=PGdkEventConfigure
+      Param=data
+        PascalType=pointer
+    Prop=ConfigureEvent
+      PropType=Signal
+      PascalType=EventConfigure
+      GtkName=configure-event
+      Count=0
+    Prop=EventFocus
+      PropType=SignalType
+      PascalType=boolean
+      Count=3
+      Param=Sender
+        Convert
+        PascalType=TFPgtkWidget
+      Param=Event
+        PascalType=PGdkEventFocus
+      Param=data
+        PascalType=pointer
+    Prop=FocusInEvent
+      PropType=Signal
+      PascalType=EventFocus
+      GtkName=focus-in-event
+      Count=0
+    Prop=FocusOutEvent
+      PropType=Signal
+      PascalType=EventFocus
+      GtkName=focus-out-event
+      Count=0
+    Prop=MapEvent
+      PropType=Signal
+      PascalType=Event
+      GtkName=map-event
+      Count=0
+    Prop=UnmapEvent
+      PropType=Signal
+      PascalType=Event
+      GtkName=unmap-event
+      Count=0
+    Prop=EventProperty
+      PropType=SignalType
+      PascalType=boolean
+      Count=3
+      Param=Sender
+        Convert
+        PascalType=TFPgtkWidget
+      Param=Event
+        PascalType=PGdkEventProperty
+      Param=data
+        PascalType=pointer
+    Prop=PropertyNotifyEvent
+      PropType=Signal
+      PascalType=EventProperty
+      GtkName=property-notify-event
+      Count=0
+    Prop=EventSelection
+      PropType=SignalType
+      PascalType=boolean
+      Count=3
+      Param=Sender
+        Convert
+        PascalType=TFPgtkWidget
+      Param=Event
+        PascalType=PGdkEventSelection
+      Param=data
+        PascalType=pointer
+    Prop=SelectionClearEvent
+      PropType=Signal
+      PascalType=EventSelection
+      GtkName=selection-clear-event
+      Count=0
+    Prop=SelectionRequestEvent
+      PropType=Signal
+      PascalType=EventSelection
+      GtkName=selection-request-event
+      Count=0
+    Prop=SelectionNotifyEvent
+      PropType=Signal
+      PascalType=EventSelection
+      GtkName=selection-notify-event
+      Count=0
+    Prop=EventProximity
+      PropType=SignalType
+      PascalType=boolean
+      Count=3
+      Param=Sender
+        Convert
+        PascalType=TFPgtkWidget
+      Param=Event
+        PascalType=PGdkEventProximity
+      Param=data
+        PascalType=pointer
+    Prop=ProximityInEvent
+      PropType=Signal
+      PascalType=EventProximity
+      GtkName=proximity-in-event
+      Count=0
+    Prop=ProximityOutEvent
+      PropType=Signal
+      PascalType=EventProximity
+      GtkName=proximity-out-event
+      Count=0
+    Prop=EventClient
+      PropType=SignalType
+      PascalType=boolean
+      Count=3
+      Param=Sender
+        Convert
+        PascalType=TFPgtkWidget
+      Param=Event
+        PascalType=PGdkEventClient
+      Param=data
+        PascalType=pointer
+    Prop=ClientEvent
+      PropType=Signal
+      PascalType=EventClient
+      GtkName=client-event
+      Count=0
+    Prop=EventNoExpose
+      PropType=SignalType
+      PascalType=boolean
+      Count=3
+      Param=Sender
+        Convert
+        PascalType=TFPgtkWidget
+      Param=Event
+        PascalType=PGdkEventNoExpose
+      Param=data
+        PascalType=pointer
+    Prop=NoExposeEvent
+      PropType=Signal
+      PascalType=EventNoExpose
+      GtkName=no-expose-event
+      Count=0
+    Prop=VisibilityNotifyEvent
+      PropType=Signal
+      PascalType=Event
+      GtkName=visibility-notify-event
+      Count=0
+    Prop=LockAccelerators
+      PropType=Procedure
+      GtkName=lock_accelerators
+      Count=0
+    Prop=UnlockAccelerators
+      PropType=Procedure
+      GtkName=unlock_accelerators
+      Count=0
+    Prop=RemoveAccelerators
+      PropType=Procedure
+      GtkName=remove_accelerators
+      Count=2
+      Param=aSignal
+        Convert
+        PascalType=string
+      Param=OnlyVisible
+        Convert
+        PascalType=boolean
+    Prop=ActivateAccelGroups
+      PropType=Procedure
+      Code=begin,"  gtk_accel_groups_activate (FGtkObject, Key, Mods);",end;
+      Count=2
+      Param=Key
+        PascalType=guint
+      Param=Mods
+        PascalType=TGdkModifierType
+    Prop=AcceleratorAdd
+      PropType=Procedure
+      Code=begin,"  gtk_widget_add_accelerator (TheGtkWidget, pgchar(aSignal),","        AG, Key, Mods, acFlags);",end;
+      Overload
+      Count=5
+      Param=AG
+        PascalType=PGtkAccelGroup
+      Param=aSignal
+        PascalType=string
+      Param=Key
+        PascalType=guint
+      Param=Mods
+        PascalType=TGdkModifierType
+      Param=acFlags
+        PascalType=TGtkAccelFlags
+  Object=Group
+    Inherit=*List
+    Count=26
+    Prop=FGSList
+      PropType=Field
+      Section=Private
+      PascalType=PGSList
+      Count=0
+    Prop=FGList
+      PropType=Field
+      Section=Private
+      PascalType=PGList
+      Count=0
+    Prop=FNotUpdating
+      PropType=Field
+      Section=Private
+      PascalType=boolean
+      Count=0
+    Prop=FClassesChanged
+      PropType=Field
+      Section=Private
+      PascalType=boolean
+      Count=0
+    Prop=FSListChanged
+      PropType=Field
+      Section=Private
+      PascalType=boolean
+      Count=0
+    Prop=FListChanged
+      PropType=Field
+      Section=Private
+      PascalType=boolean
+      Count=0
+    Prop=ManageLists
+      PropType=Property
+      PascalType=boolean
+      ReadFuncType=Field
+      WriteProcType=Field
+      Count=0
+    Prop=FreeList
+      PropType=Procedure
+      Section=Private
+      Code=begin,"  if FGList <> null then","    begin","    if FManageLists then","      g_list_free (FGList);","    FGList := null;","    end;",end;
+      Count=0
+    Prop=FreeSList
+      PropType=Procedure
+      Section=Private
+      Code=begin,"  if FGSList <> null then","    begin","    if FManageLists then","      g_slist_free (FGSList);","    FGSlist := null;","    end;",end;
+      Count=0
+    Prop=CreateGList
+      PropType=Function
+      Section=Private
+      PascalType=PGList
+      Code="var r : integer;",begin,"  FreeList;","  result := null;","  for r := pred(count) downto 0 do","    result := g_list_prepend (result, GetData(r));","  FGList := result;",end;
+      Count=0
+    Prop=CreateGSList
+      PropType=Function
+      Section=Private
+      PascalType=PGSList
+      Code="var r : integer;",begin,"  FreeSList;","  result := null;","  for r := pred(count) downto 0 do","    result := g_slist_prepend (result, GetData(r));","  FGSList := result;",end;
+      Count=0
+    Prop=BuildFromGtkList
+      PropType=Procedure
+      Section=Protected
+      Code="var p : PGList;",begin,"  clear;","  p := FGList;","  while p <> null do","    begin","    add (UngetData(p^.data));","    p := p^.Next;","    end;","  FListChanged := False;","  FSListChanged := False;","  FClassesChanged := False;","  FreeSList;",end;
+      Count=0
+    Prop=BuildFromGtkSList
+      PropType=Procedure
+      Section=Protected
+      Code="var p :PGSList;",begin,"  clear;","  p := FGSList;","  while p <> null do","    begin","    add (UngetData(p^.data));","    p := p^.Next;","    end;","  FListChanged := False;","  FSListChanged := False;","  FClassesChanged := False;","  FreeList;",end;
+      Count=0
+    Prop=Notify
+      PropType=Procedure
+      Section=Protected
+      Code=begin,"  inherited;","  FClassesChanged := True;",end;
+      Override
+      Count=2
+      Param=ptr
+        PascalType=pointer
+      Param=Action
+        PascalType=TListNotification
+    Prop=GetData
+      PropType=Function
+      Section=Protected
+      PascalType=pointer
+      Code="// GetData needs to give the pointer to the data in the List or SList of GTK",begin,"  result := items[index];",end;
+      Dynamic
+      Count=1
+      Param=index
+        PascalType=integer
+    Prop=UngetData
+      PropType=Function
+      Section=Protected
+      PascalType=pointer
+      Code="// UngetData needs to give the item in this list from the datapointer of GTK",begin,"  result := data",end;
+      Dynamic
+      Count=1
+      Param=data
+        PascalType=pointer
+    Prop=Create
+      PropType=Constructor
+      Code=begin,"  inherited create;","  FClassesChanged := False;","  FListChanged := false;","  FSListChanged := False;","  FGList := null;","  FGSList := null;","  FNotUpdating := True;","  FManageLists := True;",end;
+      Count=0
+    Prop=Destroy
+      PropType=Destructor
+      Code=begin,"  if ManageLists then","    begin","    FreeList;","    FreeSList;","    end;","  inherited Destroy;",end;
+      Override
+      Count=0
+    Prop=GetGtkList
+      PropType=Function
+      PascalType=PGList
+      Code=begin,"  if buffered then","    if FClasseschanged then","      result := CreateGList","    else if FSListChanged then","      begin","      BuildFromGtkSList;","      result := CreateGList;","      end","    else","      result := FGlist","  else","    result := CreateGList;",end;
+      Count=1
+      Param=buffered
+        PascalType=boolean
+    Prop=GetGtkSList
+      PropType=Function
+      PascalType=PGSList
+      Code=begin,"  if buffered then","    if FClassesChanged then","      result := CreateGSList","    else if FListChanged then","      begin","      BuildFromGtkList;","      result := CreateGSList;","      end","    else","      result := FGSlist","  else","    result := CreateGSList;",end;
+      Count=1
+      Param=buffered
+        PascalType=boolean
+    Prop=BeginUpdate
+      PropType=Procedure
+      Code=begin,"  FNotUpdating := False;",end;
+      Count=0
+    Prop=EndUpdate
+      PropType=Procedure
+      Code=begin,"  FNotUpdating := True;","  if FlistChanged then","    BuildFromGtkSList","  else if FSListChanged then","    BuildFromGtkSList","  else if FClassesChanged then","    begin","    FreeSList;","    FreeList;","    end;",end;
+      Count=0
+    Prop=ForEachFunction
+      PropType=TypeDeclaration
+      Code="  TFPgtkForEachProcedure = procedure (item : pointer; data : pointer) of object;"
+      Count=0
+    Prop=ForEach
+      PropType=Procedure
+      Code="var r: integer;",begin,"  for r := 0 to pred(count) do","    Proc (items[r], data);",end;
+      Count=2
+      Param=Proc
+        PascalType=TFPgtkForEachProcedure
+      Param=data
+        PascalType=pointer
+    Prop=GtkList
+      PropType=Property
+      PascalType=PGList
+      GtkName=GetGtkListProp
+      Code=begin,"  result := GetGtkList (True);",end;
+      ReadFuncType=Proc
+      WriteProcType=Proc
+      WriteGtkName=SetGtkListProp
+      WriteCode=begin,"  FGList := TheValue;","  if FNotUpdating then","    BuildFromGtkList","  else","    FListChanged := True;",end;
+      Count=0
+    Prop=GtkSList
+      PropType=Property
+      PascalType=PGSList
+      GtkName=GetGtkSListProp
+      Code=begin,"  result := GetGtkSList (True);",end;
+      ReadFuncType=Proc
+      WriteProcType=Proc
+      WriteGtkName=SetGtkSListProp
+      WriteCode=begin,"  FGSlist := TheValue;","  if FNotUpdating then","    BuildFromGtkSList","  else","    FSListChanged := True;",end;
+      Count=0
+  Object=WidgetGroup
+    Inherit=Group
+    Count=6
+    Prop=GetData
+      PropType=Function
+      PascalType=pointer
+      Code=begin,"  result := items[index].FgtkObject;",end;
+      Override
+      Count=1
+      Param=index
+        PascalType=integer
+    Prop=UnGetData
+      PropType=Function
+      PascalType=pointer
+      Code=begin,"  result := GetPascalInstance (PGtkObject(Data));",end;
+      Override
+      Count=1
+      Param=data
+        PascalType=pointer
+    Prop=AddToContainer
+      PropType=Procedure
+      Code="var r : integer;",begin,"  for r := 0 to pred(count) do","    Container.Add (items[r]);",end;
+      Count=1
+      Param=Container
+        PascalType=TFPgtkContainer
+    Prop=PackInBox
+      PropType=Procedure
+      Code="var r : integer;",begin,"  if AtStart then","    for r := 0 to pred(Count) do","      box.PackStart (items[r], expanding, fill, padding)","  else","    for r := pred(Count) downto 0 do","      box.PackEnd (items[r], expanding, fill, padding);",end;
+      Count=5
+      Param=box
+        PascalType=TFPgtkBox
+      Param=AtStart
+        PascalType=boolean
+      Param=Expanding
+        PascalType=boolean
+      Param=Fill
+        PascalType=boolean
+      Param=Padding
+        PascalType=integer
+    Prop=Items
+      PropType=Property
+      PascalType=TFPgtkWidget
+      GtkName=GetItem
+      Code=begin,"  result := TFPgtkWidget (Inherited items[index]);",end;
+      ReadFuncType=Proc
+      WriteProcType=Proc
+      WriteGtkName=SetItem
+      WriteCode=begin,"  inherited items[index] := TheValue;",end;
+      Count=1
+      Param=Index
+        PascalType=integer
+    Prop=Tooltips
+      PropType=Property
+      PascalType=string
+      Code=begin,"  result := items[index].Tooltip;",end;
+      ReadFuncType=Proc
+      WriteProcType=Proc
+      WriteCode=begin,"  Items[index].Tooltip := TheValue;",end;
+      Count=1
+      Param=index
+        PascalType=integer
+  Object=Misc
+    Inherit=Widget
+    GtkFuncName=misc
+    Count=6
+    Prop=SetAlignment
+      PropType=Procedure
+      GtkName=set_alignment
+      Count=2
+      Param=x
+        PascalType=gfloat
+      Param=y
+        PascalType=gfloat
+    Prop=SetPadding
+      PropType=Procedure
+      GtkName=set_padding
+      Count=2
+      Param=x
+        PascalType=word
+      Param=y
+        PascalType=word
+    Prop=XAlign
+      PropType=Property
+      PascalType=gfloat
+      GtkName=XAlign
+      ReadFuncType=ObjField
+      WriteProcType=Proc
+      WriteCode=begin,"  SetAlignment (TheValue, YAlign);",end;
+      Count=0
+    Prop=YAlign
+      PropType=Property
+      PascalType=gfloat
+      GtkName=YAlign
+      ReadFuncType=ObjField
+      WriteProcType=Proc
+      WriteCode=begin,"  SetAlignment (XAlign, TheValue);",end;
+      Count=0
+    Prop=XPad
+      PropType=Property
+      PascalType=word
+      GtkName=XPad
+      ReadFuncType=ObjField
+      WriteProcType=Proc
+      WriteCode=begin,"  SetPadding (TheValue, YPad);",end;
+      Count=0
+    Prop=YPad
+      PropType=Property
+      PascalType=word
+      GtkName=YPad
+      ReadFuncType=ObjField
+      WriteProcType=Proc
+      WriteCode=begin,"  SetPadding (XPad, TheValue);",end;
+      Count=0
+  Object=Label
+    Inherit=Misc
+    GtkFuncName=label
+    CreateParams=null
+    CreateObject
+    Count=7
+    Prop=Create
+      PropType=Constructor
+      Code=begin,"  inherited create;","  Text := aText;","  SetAlignment (0.0, 0.5);",end;
+      Count=1
+      Param=aText
+        PascalType=string
+    Prop=Text
+      PropType=Property
+      PascalType=string
+      GtkName=TheLabel
+      ReadFuncType=ObjField
+      WriteGtkName=text
+      WriteConvert
+      Count=0
+    Prop=Pattern
+      PropType=Property
+      PascalType=string
+      GtkName=pattern
+      ReadConvert
+      ReadFuncType=ObjField
+      WriteGtkName=pattern
+      WriteConvert
+      Count=0
+    Prop=Justify
+      PropType=Property
+      PascalType=TGtkJustification
+      GtkName=jtype
+      ReadFuncType=ObjFunc
+      WriteGtkName=justify
+      Count=0
+    Prop=LineWrap
+      PropType=Property
+      PascalType=boolean
+      GtkName=wrap
+      ReadFuncType=ObjField
+      WriteGtkName=line_wrap
+      Count=0
+    Prop=ParseUline
+      PropType=Function
+      PascalType=guint
+      GtkName=parse_uline
+      Count=1
+      Param=aText
+        Convert
+        PascalType=string
+    Prop=LabelClass
+      PropType=TypeDeclaration
+      Code="  TFPgtkLabelClass = class of TFPgtkLabel;"
+      Count=0
+  Object=AccelLabel
+    Inherit=Label
+    GtkFuncName=accel_label
+    CreateParams=''
+    CreateObject
+    Count=3
+    Prop=AccelWidget
+      PropType=Property
+      PascalType=TFPgtkWidget
+      GtkName=accel_widget
+      ReadConvert
+      ReadFuncType=ObjField
+      WriteGtkName=accel_widget
+      WriteConvert
+      Count=0
+    Prop=AccelText
+      PropType=Function
+      PascalType=string
+      Code=begin,"  result := TheGtkObject^.accel_string;",end;
+      Count=0
+    Prop=Refetch
+      PropType=Procedure
+      GtkName=refetch
+      Count=0
+  Object=TipsQuery
+    Inherit=Label
+    GtkFuncName=tips_query
+    CreateObject
+    Count=0
+  Object=Arrow
+    Inherit=Misc
+    GtkFuncName=arrow
+    CreateParams=GTK_ARROW_LEFT,GTK_SHADOW_NONE
+    CreateObject
+    Count=4
+    Prop=ArrowType
+      PropType=Property
+      PascalType=TGtkArrowType
+      Code=begin,"  result := TGtkArrowType (TheGtkObject^.arrow_type);",end;
+      ReadFuncType=Proc
+      WriteProcType=Proc
+      WriteCode=begin,"  gtk_arrow_set (TheGtkObject, TheValue, ShadowType);",end;
+      Count=0
+    Prop=ShadowType
+      PropType=Property
+      PascalType=TGtkShadowType
+      Code=begin,"  result := TGtkShadowtype (TheGtkObject^.shadow_type);",end;
+      ReadFuncType=Proc
+      WriteProcType=Proc
+      WriteCode=begin,"  gtk_arrow_set (TheGtkObject, ArrowType, TheValue);",end;
+      Count=0
+    Prop=SetTypes
+      PropType=Procedure
+      GtkName=set
+      Count=2
+      Param=AnArrowType
+        PascalType=TGtkArrowType
+      Param=AShadowtype
+        PascalType=TGtkShadowType
+    Prop=Create
+      PropType=Constructor
+      Code=begin,"  inherited create;","  SetTypes (AnArrowType, AShadowType);",end;
+      Count=2
+      Param=AnArrowType
+        PascalType=TGtkArrowType
+      Param=AShadowType
+        PascalType=TGtkShadowType
+  Object=Image
+    Inherit=Misc
+    GtkFuncName=image
+    CreateParams=FImage, FMask
+    CreateObject
+    Count=7
+    Prop=FImage
+      PropType=Field
+      PascalType=PGdkImage
+      Count=0
+    Prop=FMask
+      PropType=Field
+      PascalType=PGdkBitMap
+      Count=0
+    Prop=Image
+      PropType=Property
+      PascalType=PGdkImage
+      GtkName=GetImageProp
+      Code="var m : PGdkBitmap;",begin,"  gtk_image_get (TheGtkObject, @result, @m);",end;
+      ReadFuncType=Proc
+      WriteProcType=Proc
+      WriteGtkName=SetImageProp
+      WriteCode=begin,"  gtk_Image_set (TheGtkObject, TheValue, nil);",end;
+      Count=0
+    Prop=Mask
+      PropType=Property
+      PascalType=PGdkBitMap
+      Code="var p : PGdkPixmap;",begin,"  gtk_image_get (TheGtkObject, @p, @result);",end;
+      ReadFuncType=Proc
+      WriteProcType=Proc
+      WriteCode=begin,"  gtk_image_set (TheGtkObject, Image, TheValue);",end;
+      Count=0
+    Prop=SetImage
+      PropType=Procedure
+      GtkName=set
+      Count=2
+      Param=anImage
+        PascalType=PGdkImage
+      Param=aMask
+        PascalType=PGdkBitmap
+    Prop=Create
+      PropType=Constructor
+      Code=begin,"  FImage := anImage;","  FMask := aMask;","  inherited create;",end;
+      Count=2
+      Param=anImage
+        PascalType=PGdkImage
+      Param=aMask
+        PascalType=PGdkBitmap
+    Prop=NewImage
+      PropType=HelperFunc
+      PascalType=PGdkImage
+      Code=begin,"  result := gdk_image_new (gdk_image_fastest, gdk_visual_get_system, aWidth, aHeight);",end;
+      Count=2
+      Param=aWidth
+        PascalType=integer
+      Param=aHeight
+        PascalType=integer
+  Object=Pixmap
+    Inherit=Misc
+    GtkFuncName=pixmap
+    CreateParams=FPixMap, FMask
+    CreateObject
+    Count=20
+    Prop=EmptyBitMap
+      PropType=Declarations
+      Section=Private
+      Code=var,"  EmptyBitmap : PGdkPixmap;"
+      Count=0
+    Prop=PStringArray
+      PropType=TypeDeclaration
+      Code="  TStringArray = array[0..32000] of pgchar;","  PStringArray = ^TStringArray;"
+      Count=0
+    Prop=StringsToPPgchar
+      PropType=HelperFunc
+      PascalType=PPgchar
+      Code="var r : integer;","    a : PStringArray;",begin,"  getmem (a, sizeof (pgchar) * Data.count);","  for r := 0 to Data.Count-1 do","    a^[r] := pchar (Data[r]);","  result := ppgchar (a);",end;
+      Count=1
+      Param=Data
+        PascalType=TStrings
+    Prop=ArrayToPPgchar
+      PropType=HelperFunc
+      PascalType=PPgchar
+      Code="var r,t : integer;","    a : PStringArray;",begin,"  getmem (a, sizeof (pgchar) * (high(data)-low(data)+1));","  t := 0;","  for r := low(data) to high(data) do","    begin","    a^[r] := pchar (data[t]);","    inc (t);","    end;","  result := ppgchar (a);",end;
+      Count=1
+      Param=Data
+        PascalType=array of string
+    Prop=BuildInsensitive
+      PropType=Property
+      PascalType=longbool
+      GtkName=build_insensitive
+      ReadConvert
+      ReadFuncType=ObjFunc
+      WriteGtkName=build_insensitive
+      WriteConvert
+      Count=0
+    Prop=Create
+      PropType=Constructor
+      Code=begin,"  if not assigned (EmptyBitmap) then","    EmptyBitmap := gdk_pixmap_new (null, 1, 1, 1);","  FPixMap := EmptyBitmap;","  FMask := PGdkBitmap (EmptyBitmap);","  inherited create;",end;
+      Count=0
+    Prop=CreateFromFile
+      PropType=Constructor
+      Code=begin,"  FPixMap := gdk_pixmap_create_from_xpm (ConvertToGtkWidget(Window)^.window, @FMask, nil, pgchar(Filename));","  inherited create;",end;
+      Count=2
+      Param=Filename
+        PascalType=string
+      Param=Window
+        PascalType=TFPgtkWidget
+    Prop=CreateFromStrings
+      PropType=Constructor
+      Code="var ppdata : ppgchar;",begin,"  ppdata := StringsToPPgchar(Data);","  FPixMap := gdk_pixmap_create_from_xpm_d (ConvertToGtkWidget(Window)^.window, @FMask, nil, ppdata);","  inherited create;","  freemem (ppdata, sizeof (pgchar) * Data.count);",end;
+      Count=2
+      Param=Data
+        PascalType=TStrings
+      Param=Window
+        PascalType=TFPgtkWidget
+    Prop=CreateFromText
+      PropType=Constructor
+      Code="var l : TStrings;",begin,"  l := TStringList.Create;","  try","    l.Text := data;","    CreateFromStrings (l, Window);","  finally","    l.Free;","  end;",end;
+      Count=2
+      Param=Data
+        PascalType=string
+      Param=Window
+        PascalType=TFPgtkWidget
+    Prop=FPixMap
+      PropType=Field
+      PascalType=PGdkPixmap
+      Count=0
+    Prop=FMask
+      PropType=Field
+      PascalType=PGdkBitMap
+      Count=0
+    Prop=PixMap
+      PropType=Property
+      PascalType=PGdkPixMap
+      GtkName=GetPixmapProp
+      Code="var m : PGdkBitmap;",begin,"  gtk_pixmap_get (TheGtkObject, @result, @m);",end;
+      ReadFuncType=Proc
+      WriteProcType=Proc
+      WriteGtkName=SetPixmapProp
+      WriteCode=begin,"  gtk_pixmap_set (TheGtkObject, TheValue, nil);",end;
+      Count=0
+    Prop=Mask
+      PropType=Property
+      PascalType=PGdkBitMap
+      Code="var p : PGdkPixmap;",begin,"  gtk_pixmap_get (TheGtkObject, @p, @result);",end;
+      ReadFuncType=Proc
+      WriteProcType=Proc
+      WriteCode=begin,"  gtk_pixmap_set (TheGtkObject, Pixmap, TheValue);",end;
+      Count=0
+    Prop=SetPixmap
+      PropType=Procedure
+      GtkName=set
+      Count=2
+      Param=aPixmap
+        PascalType=PGdkPixMap
+      Param=aMask
+        PascalType=PGdkBitmap
+    Prop=GetPixmap
+      PropType=Procedure
+      Code="var P:PGdkPixmap; ","   M:PGdkBitmap;",begin,"  gtk_pixmap_get (TheGtkObject, @p, @m);","  apixmap := p;","  amask := m;",end;
+      Count=2
+      Param=aPixmap
+        PascalType=PGdkPixmap
+        ParamType=Var
+      Param=aMask
+        PascalType=PGdkBitmap
+        ParamType=Var
+    Prop=LoadFromFile
+      PropType=Procedure
+      Code="var bm : PGdkBitmap;","    pm : PGdkPixmap;",begin,"  pm := gdk_pixmap_colormap_create_from_xpm (nil, Colormap, @bm, nil, pgchar(Filename));","  SetPixmap (pm, bm);",end;
+      Count=1
+      Param=Filename
+        PascalType=string
+    Prop=LoadFromStrings
+      PropType=Procedure
+      Code="var bm : PGdkBitmap;","    pm : PGdkPixmap;","    ppdata : ppgchar;",begin,"  ppdata := StringsToPPgchar(Data);","  pm := gdk_pixmap_colormap_create_from_xpm_d (nil, Colormap, @bm, nil, ppdata);","  SetPixmap (pm, bm);","  freemem (ppdata, sizeof (pgchar) * Data.count);",end;
+      Count=1
+      Param=data
+        PascalType=TStrings
+    Prop=LoadFromText
+      PropType=Procedure
+      Code="var l : TStrings;",begin,"  l := TStringList.Create;","  try","    l.Text := data;","    LoadFromStrings (l);","  finally","    l.Free;","  end;",end;
+      Count=1
+      Param=data
+        PascalType=string
+    Prop=LoadFromArray
+      PropType=Procedure
+      Code="var bm : PGdkBitmap;","    pm : PGdkPixmap;","    ppdata : ppgchar;",begin,"  ppdata := ArrayToPPgchar(Data);","  pm := gdk_pixmap_colormap_create_from_xpm_d (nil, Colormap, @bm, nil, ppdata);","  SetPixmap (pm, bm);","  freemem (ppdata, sizeof (pgchar) * (high(data)-low(data)+1));",end;
+      Count=1
+      Param=data
+        PascalType=array of string
+    Prop=CreateGdkPixmap
+      PropType=HelperProc
+      Code="var ppdata : ppgchar;",begin,"  ppdata := ArrayToPPgchar(Data);","  ThePixmap := gdk_pixmap_create_from_xpm_d (aWindow, @TheMask, nil, ppdata);","  freemem (ppdata, sizeof (pgchar) * (high(data)-low(data)+1));",end;
+      Count=4
+      Param=ThePixmap
+        PascalType=PGdkPixmap
+        ParamType=Var
+      Param=TheMask
+        PascalType=PGdkBitmap
+        ParamType=Var
+      Param=aWindow
+        PascalType=PGdkWindow
+      Param=data
+        PascalType=array of string
+  Object=Container
+    Inherit=Widget
+    GtkFuncName=container
+    Count=19
+    Prop=Border
+      PropType=Property
+      PascalType=integer
+      GtkName=border_width
+      ReadFuncType=ObjFunc
+      WriteGtkName=border_width
+      Count=0
+    Prop=Add
+      PropType=Procedure
+      Code=begin,"  gtk_container_add (TheGtkObject, ConvertToGtkWidget(AWidget));","  if IsVisible then","    AWidget.Show;",end;
+      Overload
+      Count=2
+      Param=AWidget
+        PascalType=TFPgtkWidget
+      Param=IsVisible
+        PascalType=boolean
+    Prop=Add
+      PropType=Procedure
+      Code=begin,"  gtk_container_add (TheGtkObject, ConvertToGtkWidget(AWidget));","  AWidget.Show;",end;
+      Overload
+      Count=1
+      Param=AWidget
+        PascalType=TFPgtkWidget
+    Prop=Remove
+      PropType=Procedure
+      GtkName=remove
+      Count=1
+      Param=AWidget
+        Convert
+        PascalType=TFPgtkWidget
+    Prop=Create
+      PropType=Constructor
+      Code=begin,"  inherited create;","  FChildren := TFPgtkWidgetGroup.Create;",end;
+      Count=0
+    Prop=Destroy
+      PropType=Destructor
+      Code=begin,"  if assigned(FChildren) then","    FChildren.Free;","  inherited destroy;",end;
+      Override
+      Count=0
+    Prop=Children
+      PropType=Property
+      PascalType=TFPgtkWidgetGroup
+      Code=begin,"  FChildren.GtkList := gtk_container_children (TheGtkObject);","  result := FChildren;",end;
+      ReadFuncType=Proc
+      WriteProcType=NotImplemented
+      Count=0
+    Prop=FChildren
+      PropType=Field
+      PascalType=TFPgtkWidgetGroup
+      Count=0
+    Prop=Focus
+      PropType=Procedure
+      GtkName=focus
+      Count=1
+      Param=Direction
+        PascalType=TGtkDirectionType
+    Prop=FocusChild
+      PropType=Procedure
+      GtkName=set_focus_child
+      Count=1
+      Param=Child
+        Convert
+        PascalType=TFPgtkWidget
+    Prop=RegisterToplevel
+      PropType=Procedure
+      GtkName=register_toplevel
+      Count=0
+    Prop=UnregisterToplevel
+      PropType=Procedure
+      GtkName=unregister_toplevel
+      Count=0
+    Prop=ResizeChildren
+      PropType=Procedure
+      GtkName=resize_children
+      Count=0
+    Prop=DirectionFunctionSignal
+      PropType=SignalType
+      PascalType=TGtkDirectionType
+      Count=3
+      Param=Sender
+        PascalType=TFPgtkObject
+      Param=Direction
+        PascalType=TGtkDirectionType
+      Param=data
+        PascalType=pointer
+    Prop=Add
+      PropType=Signal
+      PascalType=WidgetSignal
+      GtkName=add
+      Count=0
+    Prop=Remove
+      PropType=Signal
+      PascalType=WidgetSignal
+      GtkName=remove
+      Count=0
+    Prop=CheckResize
+      PropType=Signal
+      PascalType=Signal
+      GtkName=check-resize
+      Count=0
+    Prop=Focus
+      PropType=Signal
+      PascalType=DirectionFunctionSignal
+      GtkName=focus
+      Count=0
+    Prop=SetFocusChild
+      PropType=Signal
+      PascalType=WidgetSignal
+      GtkName=set-focus
+      Count=0
+  Object=Bin
+    Inherit=Container
+    GtkFuncName=bin
+    Count=1
+    Prop=Child
+      PropType=Property
+      Section=Protected
+      PascalType=TFPgtkWidget
+      GtkName=Child
+      ReadConvert
+      ReadFuncType=ObjField
+      WriteProcType=Proc
+      WriteCode=begin,"  Add (TheValue);",end;
+      Count=0
+  Object=Alignment
+    Inherit=Bin
+    GtkFuncName=alignment
+    CreateParams=0,0,1,1
+    Count=1
+    Prop=Configure
+      PropType=Procedure
+      GtkName=set
+      Count=4
+      Param=anXAlign
+        PascalType=gfloat
+      Param=anYAlign
+        PascalType=gfloat
+      Param=anXScale
+        PascalType=gfloat
+      Param=anYScale
+        PascalType=gfloat
+  Object=Frame
+    Inherit=Bin
+    GtkFuncName=frame
+    CreateParams=nil
+    CreateObject
+    Count=3
+    Prop=Text
+      PropType=Property
+      PascalType=string
+      GtkName=thelabel
+      ReadConvert
+      ReadFuncType=ObjField
+      WriteGtkName=label
+      WriteConvert
+      Count=0
+    Prop=Alignment
+      PropType=Property
+      PascalType=gfloat
+      GtkName=label_xalign
+      ReadFuncType=ObjField
+      WriteProcType=Proc
+      WriteCode=begin,"  gtk_frame_set_label_align (ThegtkObject, TheValue, 0.0);",end;
+      Count=0
+    Prop=ShadowType
+      PropType=Property
+      PascalType=TgtkShadowType
+      GtkName=shadow_type
+      ReadFuncType=ObjField
+      WriteGtkName=shadow_type
+      Count=0
+  Object=AspectFrame
+    Inherit=Frame
+    GtkFuncName=aspect_frame
+    CreateParams=nil,0,0,1,1
+    CreateObject
+    Count=1
+    Prop=Configure
+      PropType=Procedure
+      GtkName=set
+      Count=4
+      Param=anXAlign
+        PascalType=gfloat
+      Param=anYAlign
+        PascalType=gfloat
+      Param=Ratio
+        PascalType=gfloat
+      Param=ObeyChild
+        Convert
+        PascalType=longbool
+  Object=Button
+    Inherit=Bin
+    GtkFuncName=button
+    CreateObject
+    Count=23
+    Prop=LabelClass
+      PropType=Function
+      Section=Protected
+      PascalType=TFPgtkLabelClass
+      Code=begin,"  result := TFPgtkLabel;",end;
+      Virtual
+      Count=0
+    Prop=CreateLabel
+      PropType=Procedure
+      Section=Private
+      Code=begin,"if not assigned (FLabel) then","  begin","  FLabel := LabelClass.Create ('');","  with FLabel do","    begin","    AskNotification (Self);","    FAccelKey := ParseULine (aText);","    end;","  if assigned(AddContainer) then","    AddContainer.Add (FLabel)","  else","    Add (FLabel);","  LabelCreated;  ","  end;",end;
+      Count=1
+      Param=aText
+        PascalType=string
+    Prop=NotifyDestroy
+      PropType=Procedure
+      Section=Protected
+      Code=begin,"  inherited;","  if AnObject = FLabel then","    FLabel := nil;",end;
+      Override
+      Count=1
+      Param=AnObject
+        PascalType=TFPgtkObject
+    Prop=Clicked
+      PropType=Signal
+      PascalType=Signal
+      GtkName=Clicked
+      Count=0
+    Prop=Pressed
+      PropType=Signal
+      PascalType=Signal
+      GtkName=Pressed
+      Count=0
+    Prop=Released
+      PropType=Signal
+      PascalType=Signal
+      GtkName=Released
+      Count=0
+    Prop=Enter
+      PropType=Signal
+      PascalType=Signal
+      GtkName=Enter
+      Count=0
+    Prop=Leave
+      PropType=Signal
+      PascalType=Signal
+      GtkName=Leave
+      Count=0
+    Prop=Clicked
+      PropType=Procedure
+      GtkName=Clicked
+      Count=0
+    Prop=Pressed
+      PropType=Procedure
+      GtkName=Pressed
+      Count=0
+    Prop=Released
+      PropType=Procedure
+      GtkName=Released
+      Count=0
+    Prop=Enter
+      PropType=Procedure
+      GtkName=Enter
+      Count=0
+    Prop=Leave
+      PropType=Procedure
+      GtkName=Leave
+      Count=0
+    Prop=Create
+      PropType=Constructor
+      Code=begin,"  inherited create;","  FAddContainer := nil;",end;
+      Count=0
+    Prop=CreateWithLabel
+      PropType=Constructor
+      Code=begin,"  create;","  Text := aText;",end;
+      Overload
+      Count=1
+      Param=aText
+        PascalType=string
+    Prop=CreateWithLabel
+      PropType=Constructor
+      Code=begin,"  create;","  Text := aText;","  if (FAccelKey <> 0) and assigned(AccelGroup) then","    AcceleratorAdd (AccelGroup, sgClicked, FAccelKey, DefaultButtonModifiers, GTK_ACCEL_Visible);",end;
+      Overload
+      Count=2
+      Param=aText
+        PascalType=string
+      Param=AccelGroup
+        PascalType=PGtkAccelGroup
+    Prop=TheLabel
+      PropType=Property
+      PascalType=TFPgtkLabel
+      GtkName=FLabel
+      ReadFuncType=Field
+      WriteProcType=NotImplemented
+      Count=0
+    Prop=Text
+      PropType=Property
+      PascalType=string
+      Code=begin,"  if assigned (FLabel) then","    result := FLabel.Text","  else","    result := '';",end;
+      ReadFuncType=Proc
+      WriteProcType=Proc
+      WriteCode=begin,"  if assigned (FLabel) then","    FLabel.Text := TheValue","  else","    if TheValue <> '' then","      CreateLabel (TheValue);",end;
+      Count=0
+    Prop=ReliefStyle
+      PropType=Property
+      PascalType=TGtkReliefStyle
+      GtkName=relief
+      WriteGtkName=relief
+      Count=0
+    Prop=AddContainer
+      PropType=Property
+      PascalType=TFPgtkContainer
+      GtkName=FAddContainer
+      ReadFuncType=Field
+      WriteProcType=Field
+      WriteGtkName=FAddContainer
+      Count=0
+    Prop=LabelCreated
+      PropType=Procedure
+      Section=Protected
+      Code=begin,"  FLabel.setalignment (0.5,0.5);",end;
+      Virtual
+      Count=0
+    Prop=AccelKey
+      PropType=Property
+      PascalType=guint
+      GtkName=FAccelKey
+      ReadFuncType=Field
+      WriteProcType=NotImplemented
+      Count=0
+    Prop=New
+      PropType=Declarations
+      Code=const,"  DefaultButtonModifiers : TGdkModifierType = GDK_MOD1_MASK;"
+      Count=0
+  Object=ToggleButton
+    Inherit=Button
+    GtkFuncName=toggle_button
+    CreateObject
+    Count=4
+    Prop=Toggled
+      PropType=Signal
+      PascalType=Signal
+      GtkName=toggled
+      Count=0
+    Prop=Toggled
+      PropType=Procedure
+      GtkName=toggled
+      Count=0
+    Prop=Active
+      PropType=Property
+      PascalType=boolean
+      GtkName=active
+      WriteGtkName=active
+      Count=0
+    Prop=DrawIndicator
+      PropType=Property
+      PascalType=boolean
+      GtkName=draw_indicator
+      ReadConvert
+      ReadFuncType=ObjFunc
+      WriteProcType=ObjFunc
+      WriteGtkName=draw_indicator
+      WriteConvert
+      Count=0
+  Object=CheckButton
+    Inherit=ToggleButton
+    GtkFuncName=check_button
+    CreateObject
+    Count=0
+  Object=RadioButton
+    Inherit=CheckButton
+    GtkFuncName=radio_button
+    Count=4
+    Prop=FGroup
+      PropType=Field
+      PascalType=TFPgtkRadioButtonGroup
+      Count=0
+    Prop=Create
+      PropType=Constructor
+      Code=begin,"  FGroup := AGroup;","  inherited create;",end;
+      Count=1
+      Param=AGroup
+        PascalType=TFPgtkRadioButtonGroup
+    Prop=CreateWithLabel
+      PropType=Constructor
+      Code=begin,"  FGroup := AGroup;","  inherited CreateWithLabel (aText);",end;
+      Count=2
+      Param=AGroup
+        PascalType=TFPgtkRadioButtonGroup
+      Param=aText
+        PascalType=string
+    Prop=CreateGtkObject
+      PropType=Procedure
+      Section=Protected
+      Code=begin,"  if not assigned (FGroup) then","    FGroup := TFPgtkRadioButtonGroup.Create;","  TheGtkWidget := gtk_radio_button_new (FGroup.GtkSList);","  FGroup.GtkSList := gtk_radio_button_group (TheGtkObject);",end;
+      Override
+      Count=0
+  Object=RadioButtonGroup
+    Inherit=WidgetGroup
+    Count=5
+    Prop=Items
+      PropType=Property
+      PascalType=TFPgtkRadioButton
+      GtkName=GetItem
+      Code=begin,"  result := TFPgtkRadioButton(Inherited items[index]);",end;
+      ReadFuncType=Proc
+      WriteProcType=Proc
+      WriteGtkName=SetItem
+      WriteCode=begin,"  inherited items[index] := TheValue;",end;
+      Count=1
+      Param=index
+        PascalType=integer
+    Prop=ActiveButtonText
+      PropType=Function
+      PascalType=string
+      Code=begin,"  result := ActiveButton.Text;",end;
+      Count=0
+    Prop=ActiveButtonIndex
+      PropType=Function
+      PascalType=integer
+      Code=begin,"  Result := pred(count);","  while (Result >= 0) and (not items[Result].Active) do","    dec (Result);",end;
+      Count=0
+    Prop=ActiveButton
+      PropType=Function
+      PascalType=TFPgtkRadioButton
+      Code="var r : integer;",begin,"  r := ActiveButtonIndex;","  if r >= 0 then","    result := items[r]","  else","    result := nil;",end;
+      Count=0
+    Prop=RadioButtonGroupCreateFromStrings
+      PropType=HelperFunc
+      PascalType=TFPgtkRadioButtonGroup
+      Code="var r : integer;","    b : TFPgtkRadioButton;",begin,"  result := TFPgtkRadioButtonGroup.Create;","  result.BeginUpdate;","  for r := TheItems.count-1 downto 0 do","    begin","    b := TFPgtkRadioButton.CreateWithLabel (result, TheItems[r]);","    if assigned(toggledfunction) then","      b.connecttoggled (ToggledFunction, IntToPointer(r));","    end;","  b.active := true;","  result.EndUpdate;",end;
+      Count=2
+      Param=TheItems
+        PascalType=TStrings
+      Param=ToggledFunction
+        PascalType=TFPgtkSignalFunction
+  Object=OptionMenu
+    Inherit=Button
+    GtkFuncName=option_menu
+    CreateObject
+    Count=4
+    Prop=Menu
+      PropType=Property
+      PascalType=TFPgtkMenu
+      GtkName=menu
+      ReadConvert
+      WriteProcType=Proc
+      WriteGtkName=setmenu
+      WriteCode=begin,"  gtk_option_menu_set_menu(TheGtkObject, ConvertToGtkWidget(TheValue));",end;
+      Count=0
+    Prop=RemoveMenu
+      PropType=Procedure
+      GtkName=remove_menu
+      Count=0
+    Prop=SetHistory
+      PropType=Procedure
+      GtkName=set_history
+      Count=1
+      Param=index
+        PascalType=integer
+    Prop=Clear
+      PropType=Procedure
+      Code="var w : TFPgtkWidget;",begin,"  w := Menu;","  if assigned(w) then","    begin","    w := TFPgtkMenu(w).Active;","    if assigned (w) then","      TFPgtkItem(w).Deselect;","    end;",end;
+      Count=0
+  Object=Item
+    Inherit=Bin
+    GtkFuncName=item
+    Count=17
+    Prop=LabelClass
+      PropType=Function
+      Section=Protected
+      PascalType=TFPgtkLabelClass
+      Code=begin,"  result := TFPgtkLabel;",end;
+      Virtual
+      Count=0
+    Prop=CreateLabel
+      PropType=Procedure
+      Section=Private
+      Code=begin,"  if not assigned (FLabel) then","    begin","    FLabel := LabelClass.Create ('');","    with FLabel do","      begin","      AskNotification (Self);","      FAccelKey := ParseULine (aText);","      end;","    if assigned(AddContainer) then","      AddContainer.Add (FLabel)","    else","      Add (FLabel);","    LabelCreated;","    end;",end;
+      Count=1
+      Param=aText
+        PascalType=string
+    Prop=NotifyDestroy
+      PropType=Procedure
+      Section=Protected
+      Code=begin,"  inherited;","  if AnObject = FLabel then","    FLabel := nil;",end;
+      Override
+      Count=1
+      Param=AnObject
+        PascalType=TFPgtkObject
+    Prop=Select
+      PropType=Signal
+      PascalType=Signal
+      GtkName=Select
+      Count=0
+    Prop=Deselect
+      PropType=Signal
+      PascalType=Signal
+      GtkName=Deselect
+      Count=0
+    Prop=Toggle
+      PropType=Signal
+      PascalType=Signal
+      GtkName=Toggle
+      Count=0
+    Prop=Select
+      PropType=Procedure
+      GtkName=Select
+      Count=0
+    Prop=Deselect
+      PropType=Procedure
+      GtkName=Deselect
+      Count=0
+    Prop=Toggle
+      PropType=Procedure
+      GtkName=Toggle
+      Count=0
+    Prop=Create
+      PropType=Constructor
+      Code=begin,"  inherited;","  FAddContainer := nil;",end;
+      Count=0
+    Prop=CreateWithLabel
+      PropType=Constructor
+      Code=begin,"  inherited create;","  Text := aText;",end;
+      Count=1
+      Param=aText
+        PascalType=string
+    Prop=TheLabel
+      PropType=Property
+      PascalType=TFPgtkLabel
+      GtkName=FLabel
+      ReadFuncType=Field
+      WriteProcType=NotImplemented
+      Count=0
+    Prop=Text
+      PropType=Property
+      PascalType=string
+      Code=begin,"  if assigned (FLabel) then","    result := FLabel.Text","  else","    result := '';",end;
+      ReadFuncType=Proc
+      WriteProcType=Proc
+      WriteCode=begin,"  if assigned (FLabel) then","    FLabel.Text := TheValue","  else","    if TheValue <> '' then","      CreateLabel (TheValue);",end;
+      Count=0
+    Prop=ItemClass
+      PropType=TypeDeclaration
+      Code="  TFPgtkItemClass = class of TFPgtkItem;"
+      Count=0
+    Prop=AddContainer
+      PropType=Property
+      PascalType=TFPgtkContainer
+      GtkName=FAddContainer
+      ReadFuncType=Field
+      WriteProcType=Field
+      WriteGtkName=FAddContainer
+      Count=0
+    Prop=LabelCreated
+      PropType=Procedure
+      Section=Protected
+      Code=begin,end;
+      Virtual
+      Count=0
+    Prop=AccelKey
+      PropType=Property
+      PascalType=guint
+      GtkName=FAccelKey
+      ReadFuncType=Field
+      WriteProcType=NotImplemented
+      Count=0
+  Object=ItemGroup
+    Inherit=WidgetGroup
+    Count=8
+    Prop=Items
+      PropType=Property
+      PascalType=TFPgtkItem
+      GtkName=GetItem
+      Code=begin,"  result := TFPgtkItem (inherited items[index]);",end;
+      ReadFuncType=Proc
+      WriteProcType=Proc
+      WriteGtkName=SetItem
+      WriteCode=begin,"  inherited items[index] := TheValue;",end;
+      Count=1
+      Param=index
+        PascalType=integer
+    Prop=FillFromList
+      PropType=Procedure
+      Code="var r : integer;","    i : TFPgtkItem;",begin,"  BeginUpdate;","  for r := 0 to aList.count-1 do","    begin","    i := FItemClass.CreateWithLabel (aList[r]);","    add (i);","    i.Show;","    end;","  EndUpdate;",end;
+      Count=1
+      Param=aList
+        PascalType=TStrings
+    Prop=FillFromCommaText
+      PropType=Procedure
+      Code="var l : TStrings;",begin,"  l := TStringList.Create;","  try","    l.commatext := aList;","    FillFromList (l);","  finally","    l.Free;","  end;",end;
+      Count=1
+      Param=aList
+        PascalType=string
+    Prop=FillFromArray
+      PropType=Procedure
+      Code="var r : integer;","    l : TStrings;",begin,"  l := TStringlist.Create;","  try","    for r := low (aList) to high(aList) do","      l.Add (aList[r]);","    FillFromList (l);","  finally","    l.Free;","  end;",end;
+      Count=1
+      Param=aList
+        PascalType=array of string
+    Prop=ItemClass
+      PropType=Property
+      PascalType=TFPgtkItemClass
+      ReadFuncType=Field
+      WriteProcType=Field
+      Count=0
+    Prop=SignalConnect
+      PropType=Procedure
+      Code="var r : integer;",begin,"  if assigned (Proc) then","    for r := 0 to count-1 do","      Items[r].SignalConnect (Signal, proc, data);",end;
+      Count=3
+      Param=Signal
+        PascalType=string
+      Param=proc
+        PascalType=TFPgtkSignalFunction
+      Param=data
+        PascalType=pointer
+    Prop=create
+      PropType=Constructor
+      Code=begin,"  inherited create;","  FItemClass := AnItemClass;",end;
+      Count=1
+      Param=AnItemClass
+        PascalType=TFPgtkItemClass
+    Prop=AddTextItem
+      PropType=Function
+      PascalType=TFPgtkItem
+      Code=begin,"  result := FItemClass.CreateWithLabel (aText);","  Add (result);","  result.Show;",end;
+      Count=1
+      Param=aText
+        PascalType=string
+  Object=MenuItem
+    Inherit=Item
+    GtkFuncName=menu_item
+    CreateObject
+    Count=14
+    Prop=Activate
+      PropType=Signal
+      PascalType=signal
+      GtkName=activate
+      Count=0
+    Prop=ActivateItem
+      PropType=Signal
+      PascalType=signal
+      GtkName=activate-item
+      Count=0
+    Prop=Activate
+      PropType=Procedure
+      GtkName=activate
+      Count=0
+    Prop=SetSubMenu
+      PropType=Procedure
+      GtkName=Set_submenu
+      Count=1
+      Param=aSubMenu
+        Convert
+        PascalType=TFPgtkWidget
+    Prop=RemoveSubMenu
+      PropType=Procedure
+      GtkName=remove_submenu
+      Count=0
+    Prop=Configure
+      PropType=Procedure
+      Code=begin,"  gtk_menu_item_configure (TheGtkObject, ord(ShowToggleIndicator), ord(ShowSubmenuIndicator));",end;
+      Count=2
+      Param=ShowToggleIndicator
+        Convert
+        PascalType=boolean
+      Param=ShowSubmenuIndicator
+        Convert
+        PascalType=boolean
+    Prop=RightJustify
+      PropType=Procedure
+      GtkName=right_justify
+      Count=0
+    Prop=Placement
+      PropType=Property
+      PascalType=TGtkSubmenuPlacement
+      Code=begin,"  result := TGtkSubmenuPlacement(submenu_placement(TheGtkObject^));",end;
+      ReadConvert
+      ReadFuncType=Proc
+      WriteGtkName=placement
+      Count=0
+    Prop=ToggleIndicator
+      PropType=Property
+      PascalType=boolean
+      GtkName=show_toggle_indicator
+      ReadConvert
+      ReadFuncType=ObjFunc
+      WriteProcType=Proc
+      WriteCode=begin,"  Configure (TheValue, SubMenuIndicator);",end;
+      Count=0
+    Prop=SubMenuIndicator
+      PropType=Property
+      PascalType=boolean
+      GtkName=show_submenu_indicator
+      ReadConvert
+      ReadFuncType=ObjFunc
+      WriteProcType=Proc
+      WriteCode=begin,"  configure (ToggleIndicator, TheValue);",end;
+      Count=0
+    Prop=JustifyRight
+      PropType=Property
+      PascalType=boolean
+      GtkName=right_justify
+      ReadConvert
+      ReadFuncType=ObjFunc
+      WriteProcType=ObjFunc
+      WriteGtkName=right_justify
+      WriteConvert
+      Count=0
+    Prop=SubMenu
+      PropType=Property
+      PascalType=TFPgtkMenuShell
+      GtkName=submenu
+      ReadConvert
+      ReadFuncType=ObjField
+      WriteProcType=Proc
+      WriteGtkName=SetPropSubMenu
+      WriteCode=begin,"  SetSubMenu (TheValue);",end;
+      Count=0
+    Prop=LabelClass
+      PropType=Function
+      Section=Protected
+      PascalType=TFPgtkLabelClass
+      Code=begin,"  result := TFPgtkAccelLabel;",end;
+      Override
+      Count=0
+    Prop=LabelCreated
+      PropType=Procedure
+      Section=Protected
+      Code=begin,"  with (TheLabel as TFPgtkAccelLabel) do","    AccelWidget := Self;",end;
+      Override
+      Count=0
+  Object=CheckMenuItem
+    Inherit=MenuItem
+    GtkFuncName=check_menu_item
+    CreateObject
+    Count=4
+    Prop=Toggled
+      PropType=Signal
+      PascalType=signal
+      GtkName=toggled
+      Count=0
+    Prop=Toggled
+      PropType=Procedure
+      GtkName=toggled
+      Count=0
+    Prop=Active
+      PropType=Property
+      PascalType=boolean
+      GtkName=active
+      ReadConvert
+      ReadFuncType=ObjFunc
+      WriteGtkName=active
+      Count=0
+    Prop=ShowToggle
+      PropType=Property
+      PascalType=boolean
+      GtkName=always_show_toggle
+      ReadConvert
+      ReadFuncType=ObjFunc
+      WriteGtkName=show_toggle
+      Count=0
+  Object=RadioMenuItem
+    Inherit=CheckMenuItem
+    GtkFuncName=radio_menu_item
+    Count=4
+    Prop=CreateGtkObject
+      PropType=Procedure
+      Section=Protected
+      Code=begin,"  if not assigned(FGroup) then","    FGroup := TFPgtkRadioMenuGroup.Create;","  TheGtkWidget := gtk_radio_menu_item_new (FGroup.GtkSList);","  FGroup.GtkSList := gtk_radio_menu_item_group (TheGtkObject);",end;
+      Override
+      Count=0
+    Prop=Create
+      PropType=Constructor
+      Code=begin,"  FGroup := AGroup;","  inherited create;",end;
+      Count=1
+      Param=AGroup
+        PascalType=TFPgtkRadioMenuGroup
+    Prop=CreateWithLabel
+      PropType=Constructor
+      Code=begin,"  FGroup := Agroup;","  inherited CreateWithLabel (aText);",end;
+      Count=2
+      Param=Agroup
+        PascalType=TFPgtkRadioMenuGroup
+      Param=aText
+        PascalType=string
+    Prop=Group
+      PropType=Property
+      PascalType=TFPgtkRadioMenuGroup
+      GtkName=FGroup
+      ReadFuncType=Field
+      WriteProcType=NotImplemented
+      WriteConvert
+      Count=0
+  Object=RadioMenuGroup
+    Inherit=ItemGroup
+    Count=5
+    Prop=Items
+      PropType=Property
+      PascalType=TFPgtkRadioMenuItem
+      GtkName=GetItem
+      Code=begin,"  result := TFPgtkRadioMenuItem(Inherited items[index]);",end;
+      ReadFuncType=Proc
+      WriteProcType=Proc
+      WriteGtkName=SetItem
+      WriteCode=begin,"  inherited items[index] := TheValue;",end;
+      Count=1
+      Param=index
+        PascalType=integer
+    Prop=ActiveMenuText
+      PropType=Function
+      PascalType=string
+      Code=begin,"  result := ActiveMenu.Text;",end;
+      Count=0
+    Prop=ActiveMenuIndex
+      PropType=Function
+      PascalType=integer
+      Code=begin,"  Result := pred(count);","  while (Result >= 0) and (not items[Result].Active) do","    dec (Result);",end;
+      Count=0
+    Prop=ActiveMenu
+      PropType=Function
+      PascalType=TFPgtkRadioMenuItem
+      Code="var r : integer;",begin,"  r := ActiveMenuIndex;","  if r >= 0 then","    result := items[r]","  else","    result := nil;",end;
+      Count=0
+    Prop=create
+      PropType=Constructor
+      Code=begin,"  inherited create (TFPgtkRadioMenuItem);",end;
+      Count=0
+  Object=TearOffMenuItem
+    Inherit=MenuItem
+    GtkFuncName=tearoff_menu_item
+    CreateObject
+    Count=0
+  Object=ListItem
+    Inherit=Item
+    GtkFuncName=list_item
+    CreateObject
+    Count=14
+    Prop=ScrollSignal
+      PropType=SignalType
+      Count=4
+      Param=Sender
+        Convert
+        PascalType=TFPgtkObject
+      Param=ScrollType
+        PascalType=TgtkScrollType
+      Param=position
+        PascalType=gfloat
+      Param=data
+        PascalType=pointer
+    Prop=ScrollBooleanSignal
+      PropType=SignalType
+      Count=5
+      Param=Sender
+        Convert
+        PascalType=TFPgtkObject
+      Param=ScrolType
+        PascalType=TgtkScrollType
+      Param=Position
+        PascalType=gfloat
+      Param=AutoStartSelection
+        PascalType=boolean
+      Param=data
+        PascalType=pointer
+    Prop=ToggleFocusRow
+      PropType=Signal
+      PascalType=Signal
+      GtkName=toggle-focus-row
+      Count=0
+    Prop=SelectAll
+      PropType=Signal
+      PascalType=Signal
+      GtkName=select-all
+      Count=0
+    Prop=UnselectAll
+      PropType=Signal
+      PascalType=Signal
+      GtkName=unselect-all
+      Count=0
+    Prop=UndoSelection
+      PropType=Signal
+      PascalType=Signal
+      GtkName=undo-selection
+      Count=0
+    Prop=StartSelection
+      PropType=Signal
+      PascalType=Signal
+      GtkName=start-selection
+      Count=0
+    Prop=EndSelection
+      PropType=Signal
+      PascalType=Signal
+      GtkName=end-selection
+      Count=0
+    Prop=ToggleAddMode
+      PropType=Signal
+      PascalType=Signal
+      GtkName=toggle-add-mode
+      Count=0
+    Prop=ExtendSelection
+      PropType=Signal
+      PascalType=ScrollBooleanSignal
+      GtkName=extend-selection
+      Count=0
+    Prop=ScrollVertical
+      PropType=Signal
+      PascalType=ScrollSignal
+      GtkName=scroll-vertical
+      Count=0
+    Prop=ScrollHorizontal
+      PropType=Signal
+      PascalType=ScrollSignal
+      GtkName=scroll-horizontal
+      Count=0
+    Prop=Select
+      PropType=Procedure
+      GtkName=select
+      Count=0
+    Prop=Deselect
+      PropType=Procedure
+      GtkName=deselect
+      Count=0
+  Object=ListItemGroup
+    Inherit=ItemGroup
+    Count=1
+    Prop=create
+      PropType=Constructor
+      Code=begin,"  inherited create (TFPgtkListItem);","  ManageLists := false;",end;
+      Count=0
+  Object=TreeItem
+    Inherit=Item
+    GtkFuncName=tree_item
+    CreateObject
+    Count=10
+    Prop=SubTree
+      PropType=Property
+      PascalType=TFPgtkWidget
+      GtkName=subtree
+      ReadConvert
+      ReadFuncType=GtkMacro
+      WriteProcType=Proc
+      WriteCode=begin,"  if assigned(TheValue) then","    gtk_tree_item_set_subtree (TheGtkObject, ConvertToGtkWidget(TheValue))","  else","    gtk_tree_item_remove_subtree (TheGtkObject);",end;
+      WriteConvert
+      Count=0
+    Prop=PixPlus
+      PropType=Property
+      PascalType=TFPgtkWidget
+      GtkName=plus_pix_widget
+      ReadConvert
+      ReadFuncType=ObjField
+      WriteProcType=NotImplemented
+      Count=0
+    Prop=PixMinus
+      PropType=Property
+      PascalType=TFPgtkWidget
+      GtkName=minus_pix_widget
+      ReadConvert
+      ReadFuncType=ObjField
+      WriteProcType=NotImplemented
+      Count=0
+    Prop=Expanded
+      PropType=Property
+      PascalType=boolean
+      GtkName=expanded
+      ReadConvert
+      ReadFuncType=ObjFunc
+      WriteProcType=Proc
+      WriteCode=begin,"  if TheValue then","    Expand","  else","    collapse;",end;
+      Count=0
+    Prop=Select
+      PropType=Procedure
+      GtkName=select
+      Count=0
+    Prop=Deselect
+      PropType=Procedure
+      GtkName=deselect
+      Count=0
+    Prop=Expand
+      PropType=Procedure
+      GtkName=expand
+      Count=0
+    Prop=Collapse
+      PropType=Procedure
+      GtkName=collapse
+      Count=0
+    Prop=Collapse
+      PropType=Signal
+      PascalType=Signal
+      GtkName=collapse
+      Count=0
+    Prop=Expand
+      PropType=Signal
+      PascalType=Signal
+      GtkName=expand
+      Count=0
+  Object=Window
+    Inherit=Bin
+    GtkFuncName=window
+    CreateParams=TheWindowType
+    CreateObject
+    Count=46
+    Prop=TheWindowType
+      PropType=Field
+      Section=Private
+      PascalType=TGtkWindowType
+      Count=0
+    Prop=Create
+      PropType=Constructor
+      Code=begin,"  TheWindowType := AType;","  inherited Create;","  FAccelGroups := TList.Create;","  FMainLevel := NoMainLevel;",end;
+      Count=1
+      Param=AType
+        PascalType=TGtkWindowType
+    Prop=Destroy
+      PropType=Destructor
+      Code=begin,"  FAccelGroups.Free;","  inherited;",end;
+      Override
+      Count=0
+    Prop=WindowType
+      PropType=Property
+      PascalType=TGtkWindowType
+      GtkName=thetype
+      ReadFuncType=ObjField
+      WriteProcType=ObjField
+      WriteGtkName=thetype
+      Count=0
+    Prop=Title
+      PropType=Property
+      PascalType=string
+      GtkName=title
+      ReadConvert
+      ReadFuncType=ObjField
+      WriteGtkName=title
+      WriteConvert
+      Count=0
+    Prop=Modal
+      PropType=Property
+      PascalType=boolean
+      GtkName=modal
+      ReadConvert
+      ReadFuncType=ObjFunc
+      WriteGtkName=modal
+      Count=0
+    Prop=DialogResult constants
+      PropType=Declarations
+      Code=const,"  drNone = 0;","  drOk = 1;","  drCancel = 2;","  drYes = 3;","  drNo = 4;","  drRetry = 5;","  NoMainLevel = high (guint);"
+      Count=0
+    Prop=DialogCallback
+      PropType=TypeDeclaration
+      Section=Published
+      Code="  DialogResultCallback = procedure (Sender:TFPgtkWindow; DialogResult:pointer; ","                                    Action:integer; initiator:TFPgtkObject) of object;","  DialogInitCallback = procedure (Sender : TFPgtkWindow; InitData : pointer) of object;","  TFPgtkWindowClass = class of TFPgtkWindow;"
+      Count=0
+    Prop=DialogResult
+      PropType=Property
+      Section=Protected
+      PascalType=pointer
+      GtkName=FDialogResult
+      ReadFuncType=Field
+      WriteProcType=Field
+      WriteGtkName=FDialogResult
+      Count=0
+    Prop=DoDialogResult
+      PropType=Procedure
+      Section=Protected
+      Code=begin,"  if assigned (OnDialogResult) then","    OnDialogResult (self, FDialogResult, Action, Sender);",end;
+      Virtual
+      Count=2
+      Param=Action
+        PascalType=integer
+      Param=Sender
+        PascalType=TFPgtkObject
+    Prop=OnDialogResult
+      PropType=Property
+      PascalType=DialogResultCallback
+      ReadFuncType=Field
+      WriteProcType=Field
+      Count=0
+    Prop=DoDialogInit
+      PropType=Procedure
+      Section=Protected
+      Code=begin,"  if assigned (OnDialogInit) then","    OnDialogInit (self, InitData);","  FDialogResult := InitData;",end;
+      Virtual
+      Count=1
+      Param=InitData
+        PascalType=pointer
+    Prop=OnDialogInit
+      PropType=Property
+      PascalType=DialogInitCallback
+      ReadFuncType=Field
+      WriteProcType=Field
+      Count=0
+    Prop=Close
+      PropType=Procedure
+      Code=begin,"  if (FDestroying = dsAlive) then","    gtk_widget_destroy (TheGtkWidget);",end;
+      Count=0
+    Prop=CloseWindow
+      PropType=Procedure
+      Code=begin,"  Close;",end;
+      Count=2
+      Param=Sender
+        PascalType=TFPgtkObject
+      Param=data
+        PascalType=pointer
+    Prop=CloseWithResult
+      PropType=Procedure
+      Code=begin,"  ModalAction := pointertoint(data);",end;
+      Count=2
+      Param=Sender
+        PascalType=TFPgtkObject
+      Param=data
+        PascalType=pointer
+    Prop=ModalAction
+      PropType=Property
+      PascalType=integer
+      GtkName=FModalAction
+      ReadFuncType=Field
+      WriteProcType=Proc
+      WriteCode=begin,"  FModalAction := TheValue;","  if TheValue <> 0 then","    begin","    DoDialogResult (FModalAction, self);","    close;","    end;",end;
+      Count=0
+    Prop=MainLevel
+      PropType=Property
+      PascalType=guint
+      GtkName=FMainLevel
+      ReadFuncType=Field
+      WriteProcType=NotImplemented
+      Count=0
+    Prop=ExecuteEnds
+      PropType=Procedure
+      Section=Private
+      Code=begin,"  if gtk_main_level = FMainLevel then","    gtk_main_quit;",end;
+      Count=2
+      Param=Sender
+        PascalType=TFPgtkObject
+      Param=data
+        PascalType=pointer
+    Prop=Execute
+      PropType=Function
+      PascalType=integer
+      Code=begin,"  FModalAction := drNone;","  if assigned (anOnDialogInit) then","    OnDialogInit := anOnDialogInit;","  DoDialogInit (anInitData);","  if assigned (anOnDialogResult) then","    OnDialogResult := anOnDialogResult;","  ConnectDestroy (@ExecuteEnds, nil);","  Modal := True;","  Show;","  FMainLevel := gtk_main_level + 1;","  try","    gtk_main;","    result := FModalAction;","  finally","    FMainLevel := NoMainLevel;","  end;",end;
+      Count=3
+      Param=anOnDialogInit
+        PascalType=DialogInitCallBack
+      Param=anInitData
+        PascalType=pointer
+      Param=anOnDialogResult
+        PascalType=DialogResultCallBack
+    Prop=SetFocus
+      PropType=Signal
+      PascalType=WidgetSignal
+      GtkName=set-focus
+      Count=0
+    Prop=SetTransientFor
+      PropType=Procedure
+      GtkName=set_transient_for
+      Count=1
+      Param=aParent
+        Convert
+        PascalType=TFPgtkWindow
+    Prop=DefaultWidget
+      PropType=Procedure
+      PascalType=TFPgtkWidget
+      GtkName=set_default
+      Count=1
+      Param=Widget
+        Convert
+        PascalType=TFPgtkWidget
+    Prop=FocusedWidget
+      PropType=Procedure
+      GtkName=set_focus
+      Count=1
+      Param=NewFocus
+        Convert
+        PascalType=TFPgtkWidget
+    Prop=UserSizable
+      PropType=Property
+      PascalType=boolean
+      Code=begin,"  result := (allow_grow(TheGtkObject^)=1) and (auto_shrink(TheGtkObject^)=0);",end;
+      ReadFuncType=Proc
+      WriteProcType=Proc
+      WriteCode=begin,"  if TheValue then","    gtk_window_set_policy (TheGtkObject, gint(FALSE), gint(TRUE), gint(FALSE))","  else","    gtk_window_set_policy (TheGtkObject, gint(FALSE), gint(FALSE), gint(TRUE));",end;
+      Count=0
+    Prop=ActivateFocus
+      PropType=Procedure
+      GtkName=activate_focus
+      Count=0
+    Prop=ActivateDefault
+      PropType=Procedure
+      GtkName=activate_default
+      Count=0
+    Prop=SetDefaultSize
+      PropType=Procedure
+      GtkName=set_default_size
+      Count=2
+      Param=Width
+        PascalType=gint
+      Param=Height
+        PascalType=gint
+    Prop=Position
+      PropType=Property
+      PascalType=TGtkWindowPosition
+      Code=begin,"  result := TGtkWindowPosition (gtk.position (TheGtkObject^));",end;
+      ReadFuncType=Proc
+      WriteGtkName=position
+      Count=0
+    Prop=AccelGroups
+      PropType=Finilization
+      PascalType=PGtk_accel_group
+      Count=1
+      Param=index
+        PascalType=integer
+    Prop=FAccelGroups
+      PropType=Field
+      Section=Private
+      PascalType=TList
+      Count=0
+    Prop=AccelGroups
+      PropType=Property
+      PascalType=PGtkAccelGroup
+      Code=begin,"  result := FAccelGroups[ID];","  if result = nil then","    result := FAccelGroups[-1];",end;
+      ReadFuncType=Proc
+      WriteProcType=NotImplemented
+      Count=1
+      Param=ID
+        PascalType=integer
+    Prop=AccelGroupNew
+      PropType=Function
+      PascalType=integer
+      Code="var ag : Pgtkaccelgroup;",begin,"  result := FAccelGroups.Count;","  ag := gtk_accel_group_new;","  FAccelGroups.Add (ag);","  gtk_window_add_accel_group (TheGtkObject, ag);",end;
+      Count=0
+    Prop=AccelGroupDelete
+      PropType=Procedure
+      Code=begin,"  gtk_accel_group_detach (FAccelGroups[ID], FGtkObject);","  FAccelGroups[ID] := nil;",end;
+      Count=1
+      Param=ID
+        PascalType=integer
+    Prop=AcceleratorAdd
+      PropType=Procedure
+      Code=begin,"  gtk_widget_add_accelerator (ConvertToGtkWidget(aWidget), pgchar(aSignal),","        AccelGroups[AG], Key, Mods, acFlags);",end;
+      Overload
+      Count=6
+      Param=AG
+        PascalType=integer
+      Param=aWidget
+        PascalType=TFPgtkWidget
+      Param=aSignal
+        PascalType=string
+      Param=Key
+        PascalType=guint
+      Param=Mods
+        PascalType=TGdkModifierType
+      Param=acFlags
+        PascalType=TGtkAccelFlags
+    Prop=AcceleratorAdd
+      PropType=HelperProc
+      Code=begin,"  gtk_widget_add_accelerator (ConvertToGtkWidget(aWidget), pgchar(aSignal),","        AG, Key, Mods, Flags);",end;
+      Count=6
+      Param=AG
+        PascalType=PGtkAccelGroup
+      Param=aWidget
+        PascalType=TFPgtkWidget
+      Param=aSignal
+        PascalType=string
+      Param=Key
+        PascalType=guint
+      Param=Mods
+        PascalType=TGdkModifierType
+      Param=Flags
+        PascalType=TGtkAccelFlags
+    Prop=AcceleratorRemove
+      PropType=Procedure
+      Code=begin,"  gtk_widget_remove_accelerator (ConvertToGtkWidget(aWidget), AccelGroups[AG], Key, Mods);",end;
+      Overload
+      Count=4
+      Param=AG
+        PascalType=integer
+      Param=aWidget
+        PascalType=TFPgtkWidget
+      Param=Key
+        PascalType=guint
+      Param=Mods
+        PascalType=TGdkModifierType
+    Prop=AcceleratorRemove
+      PropType=HelperProc
+      Code=begin,"  gtk_widget_remove_accelerator (ConvertToGtkWidget(aWidget), AG, Key, Mods);",end;
+      Overload
+      Count=4
+      Param=AG
+        PascalType=PGtkAccelGroup
+      Param=aWidget
+        PascalType=TFPgtkWidget
+      Param=Key
+        PascalType=guint
+      Param=Mods
+        PascalType=TGdkModifierType
+    Prop=AccelGroupLock
+      PropType=Procedure
+      Code=begin,"  gtk_accel_group_lock (AccelGroups[AG]);",end;
+      Count=1
+      Param=AG
+        PascalType=integer
+    Prop=AccelGroupLock
+      PropType=HelperProc
+      Code=begin,"  gtk_accel_group_lock (AG);",end;
+      Count=1
+      Param=AG
+        PascalType=PGtkAccelGroup
+    Prop=AccelGroupUnlock
+      PropType=Procedure
+      Code=begin,"  gtk_accel_group_unlock (AccelGroups[AG]);",end;
+      Count=1
+      Param=AG
+        PascalType=integer
+    Prop=AccelGroupUnlock
+      PropType=HelperProc
+      Code=begin,"  gtk_accel_group_unlock (AG);",end;
+      Count=1
+      Param=AG
+        PascalType=PGtkAccelGroup
+    Prop=AccelKeyName
+      PropType=HelperFunc
+      PascalType=string
+      Code=begin,"  result := string (gtk_accelerator_name(Key, Mods));",end;
+      Count=2
+      Param=Key
+        PascalType=guint
+      Param=Mods
+        PascalType=TGdkModifierType
+    Prop=AccelKeyParse
+      PropType=HelperProc
+      Code="var k : guint;","    m : TGdkModifierType;",begin,"  gtk_accelerator_parse (pgchar(AccelName), @k, @m);","  Key := k;","  Mods := m;",end;
+      Count=3
+      Param=AccelName
+        PascalType=string
+      Param=Key
+        PascalType=guint
+        ParamType=Var
+      Param=Mods
+        PascalType=TGdkModifierType
+        ParamType=Var
+    Prop=AccelGroupActivate
+      PropType=Procedure
+      Code=begin,"  gtk_accel_group_activate (AccelGroups[AG], Key, Mods);",end;
+      Count=3
+      Param=AG
+        PascalType=integer
+      Param=Key
+        PascalType=guint
+      Param=Mods
+        PascalType=TGdkModifierType
+    Prop=AccelGroupActivate
+      PropType=HelperProc
+      Code=begin,"  gtk_accel_group_activate (AG, Key, Mods);",end;
+      Count=3
+      Param=AG
+        PascalType=PGtkAccelGroup
+      Param=Key
+        PascalType=guint
+      Param=Mods
+        PascalType=TGdkModifierType
+  Object=ColorSelectionDialog
+    Inherit=Window
+    GtkFuncName=color_selection_dialog
+    CreateParams=''
+    CreateObject
+    Count=4
+    Prop=ColorSel
+      PropType=Property
+      PascalType=TFPgtkColorSelection
+      GtkName=Colorsel
+      ReadConvert
+      ReadFuncType=ObjField
+      WriteProcType=NotImplemented
+      Count=0
+    Prop=ButtonOK
+      PropType=Property
+      PascalType=TFPgtkButton
+      GtkName=ok_button
+      ReadConvert
+      ReadFuncType=ObjField
+      WriteProcType=NotImplemented
+      Count=0
+    Prop=ButtonCancel
+      PropType=Property
+      PascalType=TFPgtkButton
+      GtkName=cancel_button
+      ReadConvert
+      ReadFuncType=ObjField
+      WriteProcType=NotImplemented
+      Count=0
+    Prop=ButtonHelp
+      PropType=Property
+      PascalType=TFPgtkButton
+      GtkName=help_button
+      ReadConvert
+      ReadFuncType=ObjField
+      WriteProcType=NotImplemented
+      Count=0
+  Object=Dialog
+    Inherit=Window
+    GtkFuncName=dialog
+    CreateObject
+    Count=3
+    Prop=ActionArea
+      PropType=Property
+      PascalType=TFPgtkHBox
+      GtkName=action_area
+      ReadConvert
+      ReadFuncType=ObjField
+      WriteProcType=NotImplemented
+      Count=0
+    Prop=VBox
+      PropType=Property
+      PascalType=TFPgtkVBox
+      GtkName=vbox
+      ReadConvert
+      ReadFuncType=ObjField
+      WriteProcType=NotImplemented
+      Count=0
+    Prop=create
+      PropType=Constructor
+      Code=begin,"  inherited create (gtk_window_dialog);",end;
+      Count=0
+  Object=InputDialog
+    Inherit=Dialog
+    GtkFuncName=input_dialog
+    CreateObject
+    Count=5
+    Prop=ButtonClose
+      PropType=Property
+      PascalType=TFPgtkButton
+      GtkName=close_button
+      ReadConvert
+      ReadFuncType=ObjField
+      WriteProcType=NotImplemented
+      Count=0
+    Prop=ButtonSave
+      PropType=Property
+      PascalType=TFPgtkButton
+      GtkName=save_button
+      ReadConvert
+      ReadFuncType=ObjField
+      WriteProcType=NotImplemented
+      Count=0
+    Prop=DeviceSignal
+      PropType=SignalType
+      Count=3
+      Param=Sender
+        Convert
+        PascalType=TFPgtkInputDialog
+      Param=DeviceID
+        PascalType=integer
+      Param=Data
+        PascalType=pointer
+    Prop=EnableDevice
+      PropType=Signal
+      PascalType=DeviceSignal
+      GtkName=enable-device
+      Count=0
+    Prop=DisableDevice
+      PropType=Signal
+      PascalType=DeviceSignal
+      GtkName=disable-device
+      Count=0
+  Object=FileSelection
+    Inherit=Window
+    GtkFuncName=file_selection
+    CreateParams='Select a file'
+    CreateObject
+    Count=13
+    Prop=Filename
+      PropType=Property
+      PascalType=string
+      GtkName=filename
+      ReadConvert
+      WriteProcType=Proc
+      WriteCode=begin,"  gtk_file_selection_set_filename(TheGtkObject,Pgchar(TheValue));",end;
+      WriteConvert
+      Count=0
+    Prop=Complete
+      PropType=Procedure
+      GtkName=complete
+      Count=1
+      Param=Pattern
+        Convert
+        PascalType=string
+    Prop=ShowFileOpButtons
+      PropType=Procedure
+      GtkName=show_fileop_buttons
+      Count=0
+    Prop=HideFileOpButtons
+      PropType=Procedure
+      GtkName=hide_fileop_buttons
+      Count=0
+    Prop=DirList
+      PropType=Property
+      PascalType=TFPgtkCList
+      GtkName=dir_list
+      ReadConvert
+      ReadFuncType=ObjField
+      WriteProcType=NotImplemented
+      Count=0
+    Prop=FileList
+      PropType=Property
+      PascalType=TFPgtkCList
+      GtkName=file_list
+      ReadConvert
+      ReadFuncType=ObjField
+      WriteProcType=NotImplemented
+      Count=0
+    Prop=OkButton
+      PropType=Property
+      PascalType=TFPgtkButton
+      GtkName=ok_button
+      ReadConvert
+      ReadFuncType=ObjField
+      WriteProcType=NotImplemented
+      Count=0
+    Prop=CancelButton
+      PropType=Property
+      PascalType=TFPgtkButton
+      GtkName=cancel_button
+      ReadConvert
+      ReadFuncType=ObjField
+      WriteProcType=NotImplemented
+      Count=0
+    Prop=HistoryPulldown
+      PropType=Property
+      PascalType=TFPgtkOptionMenu
+      GtkName=history_pulldown
+      ReadConvert
+      ReadFuncType=ObjField
+      WriteProcType=NotImplemented
+      Count=0
+    Prop=FileOpDialog
+      PropType=Property
+      PascalType=TFPgtkDialog
+      GtkName=fileop_dialog
+      ReadConvert
+      ReadFuncType=ObjField
+      WriteProcType=NotImplemented
+      Count=0
+    Prop=FileOpCreateDir
+      PropType=Property
+      PascalType=TFPgtkButton
+      GtkName=fileop_c_dir
+      ReadConvert
+      ReadFuncType=ObjField
+      WriteProcType=NotImplemented
+      Count=0
+    Prop=FileOpDelFile
+      PropType=Property
+      PascalType=TFPgtkButton
+      GtkName=fileop_del_file
+      ReadConvert
+      ReadFuncType=ObjField
+      WriteProcType=NotImplemented
+      Count=0
+    Prop=FileOpRenFile
+      PropType=Property
+      PascalType=TFPgtkButton
+      GtkName=fileop_ren_file
+      ReadConvert
+      ReadFuncType=ObjField
+      WriteProcType=NotImplemented
+      Count=0
+  Object=FontSelectionDialog
+    Inherit=Window
+    GtkFuncName=font_selection_dialog
+    CreateParams=''
+    CreateObject
+    Count=4
+    Prop=FontSel
+      PropType=Property
+      PascalType=TFPgtkFontSelection
+      GtkName=fontsel
+      ReadConvert
+      ReadFuncType=ObjField
+      WriteProcType=NotImplemented
+      Count=0
+    Prop=ButtonOk
+      PropType=Property
+      PascalType=TFPgtkButton
+      GtkName=ok_button
+      ReadConvert
+      ReadFuncType=ObjField
+      WriteProcType=NotImplemented
+      Count=0
+    Prop=ButtonApply
+      PropType=Property
+      PascalType=TFPgtkButton
+      GtkName=apply_button
+      ReadConvert
+      ReadFuncType=ObjField
+      WriteProcType=NotImplemented
+      Count=0
+    Prop=ButtonCancel
+      PropType=Property
+      PascalType=TFPgtkButton
+      GtkName=cancel_button
+      ReadConvert
+      ReadFuncType=ObjField
+      WriteProcType=NotImplemented
+      Count=0
+  Object=EventBox
+    Inherit=Bin
+    GtkFuncName=event_box
+    CreateObject
+    Count=0
+  Object=HandleBox
+    Inherit=Bin
+    GtkFuncName=handle_box
+    CreateObject
+    Count=6
+    Prop=ShadowType
+      PropType=Property
+      PascalType=TGtkShadowtype
+      GtkName=shadow_type
+      ReadFuncType=ObjField
+      WriteGtkName=shadow_type
+      Count=0
+    Prop=HandlePosition
+      PropType=Property
+      PascalType=TGtkPositionType
+      Code=begin,"  result := TGtkPositionType (gtk.handle_position(TheGtkObject^));",end;
+      ReadFuncType=Proc
+      WriteGtkName=handle_position
+      Count=0
+    Prop=SnapEdge
+      PropType=Property
+      PascalType=TGtkPositionType
+      Code=begin,"  result := TGtkPositionType (gtk.snap_edge(TheGtkObject^));",end;
+      ReadFuncType=Proc
+      WriteGtkName=snap_edge
+      Count=0
+    Prop=ChildDetached
+      PropType=Property
+      PascalType=boolean
+      GtkName=child_detached
+      ReadConvert
+      ReadFuncType=ObjFunc
+      WriteProcType=NotImplemented
+      Count=0
+    Prop=ChildAttached
+      PropType=Signal
+      PascalType=WidgetSignal
+      GtkName=child-attached
+      Count=0
+    Prop=ChildDetached
+      PropType=Signal
+      PascalType=WidgetSignal
+      GtkName=child-detached
+      Count=0
+  Object=ScrolledWindow
+    Inherit=Bin
+    GtkFuncName=scrolled_window
+    Count=15
+    Prop=FHScroll
+      PropType=Field
+      Section=Private
+      PascalType=TFPgtkAdjustment
+      Count=0
+    Prop=FVScroll
+      PropType=Field
+      Section=Private
+      PascalType=TFPgtkAdjustment
+      Count=0
+    Prop=CreateGtkObject
+      PropType=Procedure
+      Section=Protected
+      Code="var h, v : PgtkAdjustment;",begin,"  if assigned (FHScroll) then","    h := PGtkAdjustment(ConvertToGtkObject(FHScroll))","  else","    h := null;","  if assigned (FVScroll) then","    v := PGtkAdjustment(ConvertToGtkObject(FVScroll))","  else","    v := null;","  FGtkObject := PGtkObject (gtk_scrolled_window_new (h, v));",end;
+      Override
+      Count=0
+    Prop=Create
+      PropType=Constructor
+      Code=begin,"  FVScroll := vadj;","  FHScroll := hadj;","  inherited create;","  setusize (200,170);",end;
+      Count=2
+      Param=hadj
+        PascalType=TFPgtkAdjustment
+      Param=vadj
+        PascalType=TFPgtkAdjustment
+    Prop=HPolicy
+      PropType=Property
+      PascalType=TGtkPolicyType
+      GtkName=hscrollbar_policy
+      ReadFuncType=ObjFunc
+      WriteProcType=Proc
+      WriteCode=begin,"  gtk_scrolled_window_set_policy (TheGtkObject, TheValue, VPolicy);",end;
+      Count=0
+    Prop=VPolicy
+      PropType=Property
+      PascalType=TGtkPolicyType
+      GtkName=vscrollbar_policy
+      ReadFuncType=ObjFunc
+      WriteProcType=Proc
+      WriteCode=begin,"  gtk_scrolled_window_set_policy (TheGtkObject, HPolicy, TheValue);",end;
+      Count=0
+    Prop=SetPolicy
+      PropType=Procedure
+      GtkName=set_policy
+      Overload
+      Count=2
+      Param=aHScrollBar
+        PascalType=TGtkPolicyType
+      Param=aVScrollbar
+        PascalType=TGtkPolicyType
+    Prop=SetPolicy
+      PropType=Procedure
+      Code=begin,"  SetPolicy (aPolicy, aPolicy);",end;
+      Overload
+      Count=1
+      Param=aPolicy
+        PascalType=TGtkPolicyType
+    Prop=HAdjustment
+      PropType=Property
+      PascalType=TFPgtkAdjustment
+      GtkName=hadjustment
+      ReadConvert
+      WriteGtkName=hadjustment
+      WriteConvert
+      Count=0
+    Prop=VAdjustment
+      PropType=Property
+      PascalType=TFPgtkAdjustment
+      GtkName=vadjustment
+      ReadConvert
+      WriteGtkName=vadjustment
+      WriteConvert
+      Count=0
+    Prop=AddWithViewport
+      PropType=Procedure
+      Code=begin,"  gtk_scrolled_window_add_with_viewport (TheGtkObject, ConvertToGtkWidget(aChild));","  TFPgtkViewport.createFromObject (PGtkObject(PGtkBin(TheGtkObject)^.child));","  aChild.Show;",end;
+      Count=1
+      Param=aChild
+        Convert
+        PascalType=TFPgtkWidget
+    Prop=Placement
+      PropType=Property
+      PascalType=TGtkCornerType
+      GtkName=window_placement
+      ReadFuncType=ObjFunc
+      WriteGtkName=placement
+      Count=0
+    Prop=HScrollbar
+      PropType=Property
+      PascalType=TFPgtkScrollbar
+      Code="var w : TFPgtkObject;","    gtkwidg : PGtkObject;",begin,"  gtkwidg := PGtkObject(TheGtkObject^.hscrollbar);","  w := GetPascalInstance (gtkwidg);","  if assigned (w) then","    result := (w as TFPgtkScrollbar)","  else","    result := TFPgtkHScrollbar.CreateFromObject (gtkwidg);",end;
+      ReadFuncType=Proc
+      WriteProcType=NotImplemented
+      Count=0
+    Prop=VScrollbar
+      PropType=Property
+      PascalType=TFPgtkScrollbar
+      Code="var w : TFPgtkObject;","    gtkwidg : PGtkObject;",begin,"  gtkwidg := PGtkObject(TheGtkObject^.vscrollbar);","  w := GetPascalInstance (gtkwidg);","  if assigned (w) then","    result := (w as TFPgtkScrollbar)","  else","    result := TFPgtkVScrollbar.CreateFromObject (gtkwidg);",end;
+      ReadFuncType=Proc
+      WriteProcType=NotImplemented
+      Count=0
+    Prop=UpdatePolicy
+      PropType=Procedure
+      Code="var sb : TFpgtkScrollbar;",begin,"  sb := HScrollbar;","  if assigned(sb) then","    sb.UpdatePolicy := UpdPolicy;","  sb := VScrollbar;","  if assigned(sb) then","    sb.UpdatePolicy := UpdPolicy;",end;
+      Count=1
+      Param=UpdPolicy
+        PascalType=TGtkUpdateType
+  Object=Viewport
+    Inherit=Bin
+    GtkFuncName=viewport
+    Count=7
+    Prop=FHScroll
+      PropType=Field
+      Section=Private
+      PascalType=TFPgtkAdjustment
+      Count=0
+    Prop=FVScroll
+      PropType=Field
+      Section=Private
+      PascalType=TFPgtkAdjustment
+      Count=0
+    Prop=CreateGtkObject
+      PropType=Procedure
+      Section=Protected
+      Code="var h, v : PgtkAdjustment;",begin,"  if assigned (FHScroll) then","    h := PGtkAdjustment(ConvertToGtkObject(FHScroll))","  else","    h := null;","  if assigned (FVScroll) then","    v := PGtkAdjustment(ConvertToGtkObject(FVScroll))","  else","    v := null;","  FGtkObject := PGtkObject (gtk_scrolled_window_new (h, v));",end;
+      Override
+      Count=0
+    Prop=Create
+      PropType=Constructor
+      Code=begin,"  FVScroll := vadj;","  FHScroll := hadj;","  inherited create;",end;
+      Count=2
+      Param=hadj
+        PascalType=TFPgtkAdjustment
+      Param=vadj
+        PascalType=TFPgtkAdjustment
+    Prop=HAdjustment
+      PropType=Property
+      PascalType=TFPgtkAdjustment
+      GtkName=hadjustment
+      ReadConvert
+      WriteGtkName=hadjustment
+      WriteConvert
+      Count=0
+    Prop=VAdjustment
+      PropType=Property
+      PascalType=TFPgtkAdjustment
+      GtkName=vadjustment
+      ReadConvert
+      WriteGtkName=vadjustment
+      WriteConvert
+      Count=0
+    Prop=ShadowType
+      PropType=Property
+      PascalType=TgtkShadowType
+      GtkName=shadow_type
+      ReadFuncType=ObjField
+      WriteGtkName=shadow_type
+      Count=0
+  Object=Box
+    Inherit=Container
+    GtkFuncName=Box
+    Count=13
+    Prop=Homogeneous
+      PropType=Property
+      PascalType=boolean
+      GtkName=homogeneous
+      ReadConvert
+      ReadFuncType=ObjFunc
+      WriteGtkName=homogeneous
+      Count=0
+    Prop=Spacing
+      PropType=Property
+      PascalType=integer
+      GtkName=spacing
+      ReadFuncType=ObjField
+      WriteGtkName=spacing
+      Count=0
+    Prop=ReorderChild
+      PropType=Procedure
+      GtkName=reorder_child
+      Count=2
+      Param=Widget
+        Convert
+        PascalType=TFPgtkWidget
+      Param=Position
+        PascalType=integer
+    Prop=GetChildPacking
+      PropType=Procedure
+      Code="var PT : PGtkPackType;",begin,"  pt := @PackType;","  gtk_box_query_child_packing (TheGtkObject, ConvertToGtkWidget(Widget), ","                               @expand, @fill, @padding, pt);",end;
+      Count=5
+      Param=Widget
+        PascalType=TFPgtkWidget
+      Param=Expand
+        PascalType=boolean
+        ParamType=Var
+      Param=Fill
+        PascalType=boolean
+        ParamType=Var
+      Param=Padding
+        PascalType=integer
+        ParamType=Var
+      Param=PackType
+        PascalType=TGtkPackType
+        ParamType=Var
+    Prop=SetChildPacking
+      PropType=Procedure
+      GtkName=set_child_packing
+      Count=5
+      Param=Widget
+        Convert
+        PascalType=TFPgtkWidget
+      Param=Expand
+        PascalType=boolean
+      Param=Fill
+        PascalType=boolean
+      Param=Padding
+        PascalType=integer
+      Param=PackType
+        PascalType=TGtkPackType
+    Prop=PackStart
+      PropType=Procedure
+      Code=begin,"  gtk_box_pack_start_defaults (TheGtkObject, ConvertToGtkWidget(Widget));","  widget.Show;",end;
+      Overload
+      Count=1
+      Param=Widget
+        PascalType=TFPgtkWidget
+    Prop=PackStart
+      PropType=Procedure
+      Code=begin,"  gtk_box_pack_start_defaults (TheGtkObject, ConvertToGtkWidget(Widget));","  if isvisible then","    widget.Show;",end;
+      Overload
+      Count=2
+      Param=Widget
+        PascalType=TFPgtkWidget
+      Param=IsVisible
+        PascalType=boolean
+    Prop=PackStart
+      PropType=Procedure
+      Code=begin,"  gtk_box_pack_start (TheGtkObject, ConvertToGtkWidget(Widget), expand, fill, padding);","  widget.Show;",end;
+      Overload
+      Count=4
+      Param=Widget
+        PascalType=TFPgtkWidget
+      Param=expand
+        PascalType=boolean
+      Param=fill
+        PascalType=boolean
+      Param=padding
+        PascalType=integer
+    Prop=PackStart
+      PropType=Procedure
+      Code=begin,"  gtk_box_pack_start (TheGtkObject, ConvertToGtkWidget(Widget), expand, fill, padding);","  if isvisible then","    widget.Show;",end;
+      Overload
+      Count=5
+      Param=Widget
+        PascalType=TFPgtkWidget
+      Param=expand
+        PascalType=boolean
+      Param=fill
+        PascalType=boolean
+      Param=padding
+        PascalType=integer
+      Param=IsVisible
+        PascalType=boolean
+    Prop=PackEnd
+      PropType=Procedure
+      Code=begin,"  gtk_box_pack_end_defaults (TheGtkObject, ConvertToGtkWidget(Widget));","  widget.Show;",end;
+      Overload
+      Count=1
+      Param=Widget
+        PascalType=TFPgtkWidget
+    Prop=PackEnd
+      PropType=Procedure
+      Code=begin,"  gtk_box_pack_end_defaults (TheGtkObject, ConvertToGtkWidget(Widget));","  if isvisible then","    widget.Show;",end;
+      Overload
+      Count=2
+      Param=Widget
+        PascalType=TFPgtkWidget
+      Param=IsVisible
+        PascalType=boolean
+    Prop=PackEnd
+      PropType=Procedure
+      Code=begin,"  gtk_box_pack_end (TheGtkObject, ConvertToGtkWidget(Widget), expand, fill, padding);","  widget.Show;",end;
+      Overload
+      Count=4
+      Param=Widget
+        PascalType=TFPgtkWidget
+      Param=expand
+        PascalType=boolean
+      Param=fill
+        PascalType=boolean
+      Param=padding
+        PascalType=integer
+    Prop=PackEnd
+      PropType=Procedure
+      Code=begin,"  gtk_box_pack_end (TheGtkObject, ConvertToGtkWidget(Widget), expand, fill, padding);","  if isvisible then","    widget.Show;",end;
+      Overload
+      Count=5
+      Param=Widget
+        PascalType=TFPgtkWidget
+      Param=expand
+        PascalType=boolean
+      Param=fill
+        PascalType=boolean
+      Param=padding
+        PascalType=integer
+      Param=IsVisible
+        PascalType=boolean
+  Object=ButtonBox
+    Inherit=Box
+    GtkFuncName=button_box
+    Count=10
+    Prop=SetButtonBoxDefaultSize
+      PropType=HelperProc
+      PascalType=integer
+      Code=begin,"  gtk_button_box_set_child_size_default (aMinWidth, aMinheight);",end;
+      Count=2
+      Param=aMinWidth
+        PascalType=integer
+      Param=aMinHeight
+        PascalType=integer
+    Prop=GetButtonBoxDefaultSize
+      PropType=HelperProc
+      PascalType=integer
+      Code=begin,"  gtk_button_box_get_child_size_default (@aMinWidth, @aMinheight);",end;
+      Count=2
+      Param=aMinWidth
+        PascalType=integer
+        ParamType=Var
+      Param=aMinHeight
+        PascalType=integer
+        ParamType=Var
+    Prop=SetButtonBoxDefaultPadding
+      PropType=HelperProc
+      PascalType=integer
+      Code=begin,"  gtk_button_box_set_child_size_default (aIPadX, aIPadY);",end;
+      Count=2
+      Param=aIPadX
+        PascalType=integer
+      Param=aIPadY
+        PascalType=integer
+    Prop=GetButtonBoxDefaultPadding
+      PropType=HelperProc
+      PascalType=integer
+      Code=begin,"  gtk_button_box_get_child_size_default (@aIPadX, @aIPadY);",end;
+      Count=2
+      Param=aIPadX
+        PascalType=integer
+        ParamType=Var
+      Param=aIPadY
+        PascalType=integer
+        ParamType=Var
+    Prop=Spacing
+      PropType=Property
+      PascalType=integer
+      GtkName=spacing
+      WriteGtkName=spacing
+      Count=0
+    Prop=Layout
+      PropType=Property
+      PascalType=TGtkButtonBoxStyle
+      GtkName=layout
+      WriteGtkName=layout
+      Count=0
+    Prop=ChildMinWidth
+      PropType=Property
+      PascalType=integer
+      GtkName=GetMinWidth
+      Code="var x, y : integer;",begin,"  gtk_button_box_get_child_size (TheGtkObject, @x, @y);","  result := x;",end;
+      ReadFuncType=Proc
+      WriteProcType=Proc
+      WriteGtkName=SetMinWidth
+      WriteCode=begin,"  gtk_button_box_set_child_size (TheGtkObject, TheValue, ChildMinHeight);",end;
+      Count=0
+    Prop=ChildMinHeight
+      PropType=Property
+      PascalType=integer
+      GtkName=GetMinHeight
+      Code="var x, y : integer;",begin,"  gtk_button_box_get_child_size (TheGtkObject, @x, @y);","  result := y;",end;
+      ReadFuncType=Proc
+      WriteProcType=Proc
+      WriteGtkName=SetMinHeight
+      WriteCode=begin,"  gtk_button_box_set_child_size (TheGtkObject, ChildMinWidth, TheValue);",end;
+      Count=0
+    Prop=ChildPadX
+      PropType=Property
+      PascalType=integer
+      GtkName=GetChildPadX
+      Code="var x, y : integer;",begin,"  gtk_button_box_get_child_ipadding (TheGtkObject, @x, @y);","  result := x;",end;
+      ReadFuncType=Proc
+      WriteProcType=Proc
+      WriteGtkName=SetChildPadX
+      WriteCode=begin,"  gtk_button_box_set_child_ipadding (TheGtkObject, TheValue, ChildPadY);",end;
+      Count=0
+    Prop=ChildPadY
+      PropType=Property
+      PascalType=integer
+      GtkName=GetChildPadY
+      Code="var x, y : integer;",begin,"  gtk_button_box_get_child_ipadding (TheGtkObject, @x, @y);","  result := y;",end;
+      ReadFuncType=Proc
+      WriteProcType=Proc
+      WriteGtkName=SetChildPadY
+      WriteCode=begin,"  gtk_button_box_set_child_ipadding (TheGtkObject, ChildPadX, TheValue);",end;
+      Count=0
+  Object=HButtonBox
+    Inherit=ButtonBox
+    GtkFuncName=hbutton_box
+    CreateObject
+    Count=0
+  Object=VButtonBox
+    Inherit=ButtonBox
+    GtkFuncName=vbutton_box
+    CreateObject
+    Count=0
+  Object=VBox
+    Inherit=Box
+    GtkFuncName=VBox
+    CreateParams=False, 1
+    CreateObject
+    Count=0
+  Object=ColorSelection
+    Inherit=VBox
+    GtkFuncName=color_selection
+    CreateObject
+    Count=3
+    Prop=UpdatePolicy
+      PropType=Property
+      PascalType=TGtkUpdateType
+      GtkName=policy
+      ReadFuncType=ObjField
+      WriteGtkName=update_policy
+      Count=0
+    Prop=Color
+      PropType=Property
+      PascalType=double
+      Code="var c : double;",begin,"  gtk_color_selection_get_color (TheGtkObject, @c);","  result := c;",end;
+      ReadFuncType=Proc
+      WriteProcType=Proc
+      WriteCode=begin,"  gtk_color_selection_set_color (TheGtkObject, @TheValue);",end;
+      Count=0
+    Prop=UseOpacity
+      PropType=Property
+      PascalType=longbool
+      Code=begin,"  result := longbool(TheGtkObject^.use_opacity);",end;
+      ReadConvert
+      ReadFuncType=Proc
+      WriteGtkName=opacity
+      WriteConvert
+      Count=0
+  Object=GammaCurve
+    Inherit=VBOX
+    GtkFuncName=gamma_curve
+    CreateObject
+    Count=0
+  Object=HBox
+    Inherit=Box
+    GtkFuncName=HBox
+    CreateParams=False, 1
+    CreateObject
+    Count=0
+  Object=Combo
+    Inherit=HBox
+    GtkFuncName=combo
+    CreateObject
+    Count=11
+    Prop=Entry
+      PropType=Property
+      PascalType=TFPgtkEntry
+      Code=begin,"  result := GetPascalInstance(PGtkObject(TheGtkObject^.entry), TFPgtkEntry) as tfpgtkentry;",end;
+      ReadConvert
+      ReadFuncType=Proc
+      WriteProcType=NotImplemented
+      Count=0
+    Prop=List
+      PropType=Property
+      PascalType=TFPgtkList
+      Code=begin,"  result := GetPascalInstance(PGtkObject(TheGtkObject^.list), TFPgtkList) as TFPgtkList;",end;
+      ReadConvert
+      ReadFuncType=Proc
+      WriteProcType=NotImplemented
+      Count=0
+    Prop=Button
+      PropType=Property
+      PascalType=TFpGtkButton
+      Code=begin,"  result := GetPascalInstance(PGtkObject(TheGtkObject^.button), TFPgtkButton) as TFPgtkButton;",end;
+      ReadConvert
+      ReadFuncType=Proc
+      WriteProcType=NotImplemented
+      Count=0
+    Prop=ValueInList
+      PropType=Property
+      PascalType=longbool
+      GtkName=value_in_list
+      ReadConvert
+      ReadFuncType=ObjFunc
+      WriteProcType=Proc
+      WriteGtkName=SetValueInListProp
+      WriteCode=begin,"  gtk_combo_set_value_in_list (TheGtkObject, gint(TheValue), gint(OkIfEmpty));",end;
+      Count=0
+    Prop=OkIfEmpty
+      PropType=Property
+      PascalType=longbool
+      GtkName=ok_if_empty
+      ReadConvert
+      ReadFuncType=ObjFunc
+      WriteProcType=Proc
+      WriteCode=begin,"  gtk_combo_set_value_in_list (TheGtkObject, gint(ValueInList), gint(TheValue));",end;
+      Count=0
+    Prop=UseArrows
+      PropType=Property
+      PascalType=longbool
+      GtkName=use_arrows
+      ReadConvert
+      ReadFuncType=ObjFunc
+      WriteGtkName=use_arrows
+      WriteConvert
+      Count=0
+    Prop=UseArrowsAlways
+      PropType=Property
+      PascalType=longbool
+      GtkName=use_arrows_always
+      ReadConvert
+      ReadFuncType=ObjFunc
+      WriteGtkName=use_arrows_always
+      WriteConvert
+      Count=0
+    Prop=CaseSensitive
+      PropType=Property
+      PascalType=longbool
+      GtkName=case_sensitive
+      ReadConvert
+      ReadFuncType=ObjFunc
+      WriteGtkName=case_sensitive
+      WriteConvert
+      Count=0
+    Prop=SetItemString
+      PropType=Procedure
+      GtkName=set_item_string
+      Count=2
+      Param=Item
+        Convert
+        PascalType=TFPgtkItem
+      Param=ItemValue
+        Convert
+        PascalType=string
+    Prop=DisableActivate
+      PropType=Procedure
+      GtkName=disable_activate
+      Count=0
+    Prop=SetValueInList
+      PropType=Procedure
+      GtkName=set_value_in_list
+      Count=2
+      Param=Val
+        Convert
+        PascalType=longbool
+      Param=IsOkIfEmpty
+        Convert
+        PascalType=longbool
+  Object=Statusbar
+    Inherit=HBox
+    GtkFuncName=statusbar
+    CreateObject
+    Count=7
+    Prop=GetContextID
+      PropType=Function
+      PascalType=integer
+      GtkName=get_context_id
+      Count=1
+      Param=ContextDescr
+        Convert
+        PascalType=string
+    Prop=Push
+      PropType=Function
+      PascalType=integer
+      GtkName=push
+      Count=2
+      Param=contextID
+        PascalType=integer
+      Param=text
+        Convert
+        PascalType=string
+    Prop=Pop
+      PropType=Procedure
+      GtkName=pop
+      Count=1
+      Param=contextID
+        PascalType=integer
+    Prop=Remove
+      PropType=Procedure
+      GtkName=remove
+      Count=2
+      Param=contextID
+        PascalType=integer
+      Param=MessageID
+        PascalType=integer
+    Prop=StatusbarSignal
+      PropType=SignalType
+      Count=4
+      Param=Sender
+        Convert
+        PascalType=TFPgtkObject
+      Param=contextID
+        PascalType=integer
+      Param=text
+        Convert
+        PascalType=string
+      Param=data
+        PascalType=pointer
+    Prop=TextPopped
+      PropType=Signal
+      PascalType=StatusbarSignal
+      GtkName=text-popped
+      Count=0
+    Prop=TextPushed
+      PropType=Signal
+      PascalType=StatusbarSignal
+      GtkName=test-pushed
+      Count=0
+  Object=CList
+    Inherit=Container
+    GtkFuncName=clist
+    CreateParams=FColumnCount
+    CreateObject
+    Count=89
+    Prop=Create
+      PropType=Constructor
+      Code=begin,"  FColumnCount := aColumnCount;","  inherited create;",end;
+      Count=1
+      Param=aColumnCount
+        PascalType=integer
+    Prop=ColumnCount
+      PropType=Property
+      PascalType=integer
+      GtkName=FColumnCount
+      ReadFuncType=Field
+      WriteProcType=NotImplemented
+      Count=0
+    Prop=ShadowType
+      PropType=Property
+      PascalType=TGtkShadowType
+      GtkName=shadow_type
+      ReadFuncType=ObjField
+      WriteGtkName=shadow_type
+      Count=0
+    Prop=SelectionMode
+      PropType=Property
+      PascalType=TGtkSelectionMode
+      GtkName=selection_mode
+      ReadFuncType=ObjField
+      WriteGtkName=selection_mode
+      Count=0
+    Prop=Freeze
+      PropType=Procedure
+      GtkName=freeze
+      Count=0
+    Prop=Thaw
+      PropType=Procedure
+      GtkName=thaw
+      Count=0
+    Prop=ShowTitles
+      PropType=Procedure
+      GtkName=Column_titles_show
+      Count=0
+    Prop=HideTitles
+      PropType=Procedure
+      GtkName=column_titles_hide
+      Count=0
+    Prop=ActiveTitles
+      PropType=Procedure
+      GtkName=column_titles_active
+      Count=0
+    Prop=PassiveTitles
+      PropType=Procedure
+      GtkName=column_titles_passive
+      Count=0
+    Prop=ActiveTitle
+      PropType=Procedure
+      GtkName=column_title_active
+      Count=1
+      Param=column
+        PascalType=integer
+    Prop=PassiveTitle
+      PropType=Procedure
+      GtkName=column_title_passive
+      Count=1
+      Param=column
+        PascalType=integer
+    Prop=ColumnTitle
+      PropType=Property
+      PascalType=string
+      GtkName=column_title
+      ReadConvert
+      WriteGtkName=column_title
+      WriteConvert
+      Count=1
+      Param=column
+        PascalType=integer
+    Prop=ColumnWidget
+      PropType=Property
+      PascalType=TFPgtkWidget
+      GtkName=column_widget
+      ReadConvert
+      WriteGtkName=column_widget
+      WriteConvert
+      Count=1
+      Param=column
+        PascalType=integer
+    Prop=SetColumnJustification
+      PropType=Procedure
+      GtkName=set_column_justification
+      Count=2
+      Param=column
+        PascalType=integer
+      Param=justification
+        PascalType=TGtkJustification
+    Prop=SetColumnVisibility
+      PropType=Procedure
+      GtkName=set_column_visibility
+      Count=2
+      Param=column
+        PascalType=integer
+      Param=aVisible
+        PascalType=boolean
+    Prop=SetColumnResizeable
+      PropType=Procedure
+      GtkName=set_column_resizeable
+      Count=2
+      Param=column
+        PascalType=integer
+      Param=Resizeable
+        PascalType=boolean
+    Prop=SetColumnAutoResize
+      PropType=Procedure
+      GtkName=set_column_auto_resize
+      Count=2
+      Param=column
+        PascalType=integer
+      Param=autoResize
+        PascalType=boolean
+    Prop=OptimalColumnWidth
+      PropType=Function
+      PascalType=integer
+      GtkName=optimal_column_width
+      Code=,
+      Count=1
+      Param=column
+        PascalType=integer
+    Prop=SetColumnWidth
+      PropType=Procedure
+      GtkName=set_column_width
+      Count=2
+      Param=column
+        PascalType=integer
+      Param=width
+        PascalType=integer
+    Prop=SetColumnMinWidth
+      PropType=Procedure
+      GtkName=set_column_min_width
+      Count=2
+      Param=column
+        PascalType=integer
+      Param=MinWidth
+        PascalType=integer
+    Prop=SetColumnMaxWidth
+      PropType=Procedure
+      GtkName=set_column_max_width
+      Count=2
+      Param=column
+        PascalType=integer
+      Param=MaxWidth
+        PascalType=integer
+    Prop=AutoSizeColumns
+      PropType=Function
+      PascalType=integer
+      GtkName=columns_autosize
+      Count=0
+    Prop=ConfigureColumnWidth
+      PropType=Procedure
+      Code=begin,"  SetColumnWidth (column, Width);","  SetColumnMaxWidth (column, MaxWidth);","  SetColumnMinWidth (column, MinWidth);",end;
+      Count=4
+      Param=column
+        PascalType=integer
+      Param=Width
+        PascalType=integer
+      Param=MinWidth
+        PascalType=integer
+      Param=MaxWidth
+        PascalType=integer
+    Prop=ConfigureColumn
+      PropType=Procedure
+      Code=begin,"  SetColumnJustification (column, Justification);","  SetColumnVisibility (column, Visibility);","  SetColumnResizeable (column, Resizeable);","  SetColumnAutoResize (column, AutoSize);",end;
+      Count=5
+      Param=column
+        PascalType=integer
+      Param=Justification
+        PascalType=TGtkJustification
+      Param=Visibility
+        PascalType=boolean
+      Param=Resizeable
+        PascalType=boolean
+      Param=AutoSize
+        PascalType=boolean
+    Prop=SetRowHeight
+      PropType=Procedure
+      GtkName=set_row_height
+      Count=1
+      Param=height
+        PascalType=integer
+    Prop=MoveTo
+      PropType=Procedure
+      GtkName=moveto
+      Count=4
+      Param=row
+        PascalType=integer
+      Param=column
+        PascalType=integer
+      Param=RowAlign
+        PascalType=gfloat
+      Param=ColAlign
+        PascalType=gfloat
+    Prop=RowIsVisible
+      PropType=Function
+      PascalType=TGtkVisibility
+      GtkName=row_is_visible
+      Count=1
+      Param=Row
+        PascalType=integer
+    Prop=GetCellType
+      PropType=Function
+      PascalType=TGtkCellType
+      GtkName=get_cell_type
+      Count=2
+      Param=Row
+        PascalType=integer
+      Param=column
+        PascalType=integer
+    Prop=CellText
+      PropType=Property
+      PascalType=string
+      Code="var s : pgchar;","    r : integer;",begin,"  r := gtk_clist_get_text (TheGtkObject, row, column, @s);","  if (r = 0) then","    result := ''","  else","    result := string(s^);",end;
+      ReadFuncType=Proc
+      WriteGtkName=text
+      WriteConvert
+      Count=2
+      Param=Row
+        PascalType=integer
+      Param=Column
+        PascalType=integer
+    Prop=SetPixmap
+      PropType=Procedure
+      GtkName=set_pixmap
+      Count=4
+      Param=row
+        PascalType=integer
+      Param=column
+        PascalType=integer
+      Param=pixmap
+        Convert
+        PascalType=PGdkPixmap
+      Param=mask
+        PascalType=PGdkBitmap
+    Prop=GetPixmap
+      PropType=Procedure
+      Code=begin,"  gtk_clist_get_pixmap (TheGtkObject, row, column, @pixmap, @mask);",end;
+      Count=4
+      Param=row
+        PascalType=integer
+      Param=column
+        PascalType=integer
+      Param=pixmap
+        PascalType=PGdkPixmap
+        ParamType=Var
+      Param=mask
+        PascalType=PGdkBitmap
+        ParamType=Var
+    Prop=SetPixText
+      PropType=Procedure
+      GtkName=set_pixtext
+      Count=6
+      Param=row
+        PascalType=integer
+      Param=column
+        PascalType=integer
+      Param=text
+        Convert
+        PascalType=string
+      Param=spacing
+        PascalType=guint8
+      Param=pixmap
+        PascalType=PGdkPixmap
+      Param=mask
+        PascalType=PGdkBitmap
+    Prop=GetPixText
+      PropType=Procedure
+      Code="var r : integer;","    s : PPgchar;",begin,"  s := nil;","  r := gtk_clist_get_pixtext (TheGtkObject, row, column, s, @aspacing, @pixmap, @mask);","  if r = 0 then","    begin","    text := '';","    pixmap := nil;","    mask := nil;","    end","  else","    text := string (s^);",end;
+      Count=6
+      Param=row
+        PascalType=integer
+      Param=column
+        PascalType=integer
+      Param=text
+        PascalType=string
+        ParamType=Var
+      Param=aspacing
+        PascalType=guint8
+        ParamType=Var
+      Param=pixmap
+        PascalType=PGdkPixmap
+        ParamType=Var
+      Param=mask
+        PascalType=PGdkBitmap
+        ParamType=Var
+    Prop=SetForeground
+      PropType=Procedure
+      GtkName=set_foreground
+      Count=2
+      Param=row
+        PascalType=integer
+      Param=color
+        PascalType=PGdkColor
+    Prop=SetBackground
+      PropType=Procedure
+      GtkName=set_background
+      Count=2
+      Param=row
+        PascalType=integer
+      Param=color
+        PascalType=PGdkColor
+    Prop=CellStyle
+      PropType=Property
+      PascalType=PGtkStyle
+      GtkName=cell_style
+      WriteGtkName=cell_style
+      Count=2
+      Param=row
+        PascalType=integer
+      Param=column
+        PascalType=integer
+    Prop=RowStyle
+      PropType=Property
+      PascalType=PGtkStyle
+      GtkName=row_style
+      WriteGtkName=row_style
+      Count=1
+      Param=row
+        PascalType=integer
+    Prop=SetShift
+      PropType=Procedure
+      GtkName=set_shift
+      Count=4
+      Param=row
+        PascalType=integer
+      Param=column
+        PascalType=integer
+      Param=vertical
+        PascalType=integer
+      Param=horizontal
+        PascalType=integer
+    Prop=Remove
+      PropType=Procedure
+      GtkName=remove
+      Count=1
+      Param=row
+        PascalType=integer
+    Prop=Prepend
+      PropType=Procedure
+      Code="var ppdata : ppgchar;",begin,"  ppdata := StringsToPPgchar (Data);","  gtk_clist_prepend (TheGtkObject, ppdata);","  freemem (ppdata, sizeof (pgchar) * data.count);",end;
+      Overload
+      Count=1
+      Param=Data
+        PascalType=TStrings
+    Prop=Prepend
+      PropType=Procedure
+      Code="var l : TStrings;","    s : string;",begin,"  l := TStringList.Create;","  try","    if pos('""',separator) = 0 then","      s := stringreplace (Text, '""', '""""', [rfReplaceAll]);","    if separator <> '' then","      s := stringreplace(Text, separator, '"",""', [rfReplaceAll]);","    l.CommaText := '""'+s+'""';","    Prepend (l);","  finally","    l.Free;","  end;",end;
+      Overload
+      Count=2
+      Param=Text
+        PascalType=string
+      Param=separator
+        PascalType=string
+    Prop=Prepend
+      PropType=Procedure
+      Code="var ppdata : ppgchar;",begin,"  ppdata := ArrayToPPgchar (Data);","  gtk_clist_prepend (TheGtkObject, ppdata);","  freemem (ppdata, sizeof (pgchar) * (high(data)-low(data)+1));",end;
+      Overload
+      Count=1
+      Param=data
+        PascalType=array of string
+    Prop=Append
+      PropType=Procedure
+      Code="var ppdata : ppgchar;",begin,"  ppdata := StringsToPPgchar (Data);","  gtk_clist_append (TheGtkObject, ppdata);","  freemem (ppdata, sizeof (pgchar) * data.count);",end;
+      Overload
+      Count=1
+      Param=data
+        PascalType=TStrings
+    Prop=Append
+      PropType=Procedure
+      Code="var l : TStrings;","    s : string;",begin,"  l := TStringList.Create;","  try","    if pos('""',separator) = 0 then","      s := stringreplace (Text, '""', '""""', [rfReplaceAll]);","    if separator <> '' then","      s := stringreplace(Text, separator, '"",""', [rfReplaceAll]);","    l.CommaText := '""' + s + '""';","    Append (l);","  finally","    l.Free;","  end;",end;
+      Overload
+      Count=2
+      Param=Text
+        PascalType=string
+      Param=Separator
+        PascalType=string
+    Prop=Append
+      PropType=Procedure
+      Code="var ppdata : ppgchar;",begin,"  ppdata := ArrayToPPgchar (Data);","  gtk_clist_append (TheGtkObject, ppdata);","  freemem (ppdata, sizeof (pgchar) * (high(data)-low(data)+1));",end;
+      Overload
+      Count=1
+      Param=data
+        PascalType=array of string
+    Prop=Insert
+      PropType=Procedure
+      Code="var ppdata : ppgchar;",begin,"  ppdata := StringsToPPgchar (Data);","  gtk_clist_insert (TheGtkObject, row, ppdata);","  freemem (ppdata, sizeof (pgchar) * data.count);",end;
+      Overload
+      Count=2
+      Param=row
+        PascalType=integer
+      Param=data
+        PascalType=TStrings
+    Prop=Insert
+      PropType=Procedure
+      Code="var l : TStrings;","    s : string;",begin,"  l := TStringList.Create;","  try","    if pos('""',separator) = 0 then","      s := stringreplace (Text, '""', '""""', [rfReplaceAll]);","    if separator <> '' then","      s := stringreplace(Text, separator, '"",""', [rfReplaceAll]);","    l.CommaText := '""' + s + '""';","    Insert (row, l);","  finally","    l.Free;","  end;",end;
+      Overload
+      Count=3
+      Param=row
+        PascalType=integer
+      Param=Text
+        PascalType=string
+      Param=Separator
+        PascalType=string
+    Prop=Insert
+      PropType=Procedure
+      Code="var ppdata : ppgchar;",begin,"  ppdata := ArrayToPPgchar (Data);","  gtk_clist_insert (TheGtkObject, row, ppdata);","  freemem (ppdata, sizeof (pgchar) * (high(data)-low(data)+1));",end;
+      Overload
+      Count=2
+      Param=row
+        PascalType=integer
+      Param=data
+        PascalType=array of string
+    Prop=RowData
+      PropType=Property
+      PascalType=pointer
+      GtkName=row_data
+      WriteGtkName=row_data
+      Count=1
+      Param=row
+        PascalType=integer
+    Prop=FindRowFromData
+      PropType=Function
+      PascalType=integer
+      GtkName=find_row_from_data
+      Count=1
+      Param=data
+        PascalType=pointer
+    Prop=SelectRow
+      PropType=Procedure
+      GtkName=select_row
+      Count=2
+      Param=row
+        PascalType=integer
+      Param=column
+        PascalType=integer
+    Prop=UnselectRow
+      PropType=Procedure
+      GtkName=unselect_row
+      Count=2
+      Param=row
+        PascalType=integer
+      Param=column
+        PascalType=integer
+    Prop=Clear
+      PropType=Procedure
+      GtkName=clear
+      Count=0
+    Prop=SelectAll
+      PropType=Procedure
+      GtkName=select_all
+      Count=0
+    Prop=UnselectAll
+      PropType=Procedure
+      GtkName=unselect_all
+      Count=0
+    Prop=SwapRows
+      PropType=Procedure
+      GtkName=swap_rows
+      Count=2
+      Param=row1
+        PascalType=integer
+      Param=row2
+        PascalType=integer
+    Prop=RowMove
+      PropType=Procedure
+      Code=begin,"  if sourceRow = DestRow then","    Exit;","  gtk_clist_row_move (TheGtkObject, sourceRow, destRow);",end;
+      Count=2
+      Param=sourceRow
+        PascalType=integer
+      Param=destRow
+        PascalType=integer
+    Prop=Sort
+      PropType=Procedure
+      GtkName=sort
+      Count=0
+    Prop=CompareFunc
+      PropType=Property
+      PascalType=TGtkCListCompareFunc
+      GtkName=compare
+      ReadFuncType=Field
+      WriteGtkName=Compare_func
+      Count=0
+    Prop=SortColumn
+      PropType=Property
+      PascalType=integer
+      GtkName=sort_column
+      ReadFuncType=ObjField
+      WriteGtkName=sort_column
+      Count=0
+    Prop=SetSortType
+      PropType=Property
+      PascalType=TGtkSortType
+      GtkName=sort_type
+      ReadFuncType=ObjField
+      WriteGtkName=sort_type
+      Count=0
+    Prop=SetAutoSort
+      PropType=Procedure
+      GtkName=set_auto_sort
+      Count=1
+      Param=autoSort
+        PascalType=boolean
+    Prop=HAdjustment
+      PropType=Property
+      PascalType=TFPgtkAdjustment
+      GtkName=hadjustment
+      ReadConvert
+      WriteGtkName=hadjustment
+      WriteConvert
+      Count=0
+    Prop=VAdjustment
+      PropType=Property
+      PascalType=TFPgtkAdjustment
+      GtkName=vadjustment
+      ReadConvert
+      WriteGtkName=vadjustment
+      WriteCode=,
+      WriteConvert
+      Count=0
+    Prop=SetReorderable
+      PropType=Procedure
+      GtkName=set_reorderable
+      Count=1
+      Param=reorderable
+        PascalType=boolean
+    Prop=Count
+      PropType=Function
+      PascalType=integer
+      Code=begin,"  result := TheGtkObject^.rows;",end;
+      Count=0
+    Prop=CListScrollSignal
+      PropType=SignalType
+      Count=4
+      Param=Sender
+        Convert
+        PascalType=TFPgtkObject
+      Param=ScrollType
+        PascalType=TgtkScrollType
+      Param=position
+        PascalType=gfloat
+      Param=data
+        PascalType=pointer
+    Prop=CListScrollBooleanSignal
+      PropType=SignalType
+      Count=5
+      Param=Sender
+        Convert
+        PascalType=TFPgtkObject
+      Param=ScrollType
+        PascalType=TgtkScrollType
+      Param=Position
+        PascalType=gfloat
+      Param=AutoStartSelection
+        PascalType=boolean
+      Param=data
+        PascalType=pointer
+    Prop=SelectRowSignal
+      PropType=SignalType
+      Count=5
+      Param=Sender
+        PascalType=TFPgtkObject
+      Param=row
+        PascalType=integer
+      Param=column
+        PascalType=integer
+      Param=event
+        PascalType=PGdkEventButton
+      Param=data
+        PascalType=pointer
+    Prop=SelectRow
+      PropType=Signal
+      PascalType=SelectRowSignal
+      GtkName=select-row
+      Count=0
+    Prop=UnselectRow
+      PropType=Signal
+      PascalType=SelectRowSignal
+      GtkName=unselect-row
+      Count=0
+    Prop=MoveSignal
+      PropType=SignalType
+      Count=4
+      Param=Sender
+        PascalType=TFPgtkObject
+      Param=arg1
+        PascalType=integer
+      Param=arg2
+        PascalType=integer
+      Param=data
+        PascalType=pointer
+    Prop=RowMove
+      PropType=Signal
+      PascalType=MoveSignal
+      GtkName=row-move
+      Count=0
+    Prop=ScrollVertical
+      PropType=Signal
+      PascalType=CListScrollSignal
+      GtkName=scroll-vertical
+      Count=0
+    Prop=ScrolHorizontal
+      PropType=Signal
+      PascalType=CListScrollSignal
+      GtkName=scroll-horizontal
+      Count=0
+    Prop=ToggleFocusRow
+      PropType=Signal
+      PascalType=Signal
+      GtkName=toggle-focus-row
+      Count=0
+    Prop=SelectAll
+      PropType=Signal
+      PascalType=Signal
+      GtkName=select-all
+      Count=0
+    Prop=UnselectAll
+      PropType=Signal
+      PascalType=signal
+      GtkName=unselect-all
+      Count=0
+    Prop=UndoSelection
+      PropType=Signal
+      PascalType=signal
+      GtkName=undo-selection
+      Count=0
+    Prop=StartSelection
+      PropType=Signal
+      PascalType=signal
+      GtkName=start-selection
+      Count=0
+    Prop=EndSelection
+      PropType=Signal
+      PascalType=signal
+      GtkName=end-selection
+      Count=0
+    Prop=ToggleAddMode
+      PropType=Signal
+      PascalType=signal
+      GtkName=toggle-add-mode
+      Count=0
+    Prop=AbortColumnResize
+      PropType=Signal
+      PascalType=signal
+      GtkName=abort-column-resize
+      Count=0
+    Prop=ExtendSelection
+      PropType=Signal
+      PascalType=CListScrollBooleanSignal
+      GtkName=extend-selection
+      Count=0
+    Prop=ColumnClickedSignal
+      PropType=SignalType
+      Count=3
+      Param=Sender
+        PascalType=TFPgtkObject
+      Param=column
+        PascalType=integer
+      Param=data
+        PascalType=pointer
+    Prop=ClickColumn
+      PropType=Signal
+      PascalType=ColumnClickedSignal
+      GtkName=click-column
+      Count=0
+    Prop=ResizeColumnSignal
+      PropType=SignalType
+      Count=4
+      Param=Sender
+        PascalType=TFPgtkObject
+      Param=column
+        PascalType=integer
+      Param=width
+        PascalType=integer
+      Param=data
+        PascalType=pointer
+    Prop=ResizeColumn
+      PropType=Signal
+      PascalType=ResizeColumnSignal
+      GtkName=resize-column
+      Count=0
+  Object=CTree
+    Inherit=CList
+    GtkFuncName=ctree
+    CreateParams=FColumnCount, FTreeColumn
+    Count=55
+    Prop=LineStyle
+      PropType=Property
+      PascalType=TGtkCTreeLineStyle
+      Code=begin,"  result := TGtkCTreeLineStyle(gtk.line_style(TheGtkObject^));",end;
+      ReadConvert
+      ReadFuncType=Proc
+      WriteGtkName=line_style
+      Count=0
+    Prop=ShowStub
+      PropType=Property
+      PascalType=boolean
+      Code=begin,"  result := boolean(gtk.show_stub(TheGtkObject^));",end;
+      ReadConvert
+      ReadFuncType=Proc
+      WriteGtkName=show_stub
+      WriteCode=,
+      Count=0
+    Prop=ExpanderStyle
+      PropType=Property
+      PascalType=TGtkCTreeExpanderStyle
+      Code=begin,"  result := TGtkCTreeExpanderStyle(gtk.expander_style(TheGtkObject^));",end;
+      ReadFuncType=Proc
+      WriteGtkName=expander_style
+      Count=0
+    Prop=Spacing
+      PropType=Property
+      PascalType=guint
+      GtkName=tree_spacing
+      ReadFuncType=ObjField
+      WriteGtkName=spacing
+      Count=0
+    Prop=Indent
+      PropType=Property
+      PascalType=guint
+      GtkName=tree_indent
+      ReadFuncType=ObjField
+      WriteGtkName=indent
+      Count=0
+    Prop=FTreeColumn
+      PropType=Field
+      Section=Private
+      PascalType=integer
+      Count=0
+    Prop=TreeColumn
+      PropType=Property
+      PascalType=integer
+      GtkName=tree_column
+      ReadFuncType=ObjField
+      WriteProcType=NotImplemented
+      Count=0
+    Prop=Create
+      PropType=Constructor
+      Code=begin,"  FTreeColumn := aTreeColumn;","  inherited Create (aColumnCount);",end;
+      Count=2
+      Param=aColumnCount
+        PascalType=integer
+      Param=aTreeColumn
+        PascalType=integer
+    Prop=RemoveNode
+      PropType=Procedure
+      GtkName=remove_node
+      Count=1
+      Param=node
+        PascalType=PGtkCTreeNode
+    Prop=InsertNode
+      PropType=Function
+      PascalType=PGtkCTreeNode
+      GtkName=insert_node
+      Overload
+      Count=10
+      Param=aParent
+        PascalType=PGtkCTreeNode
+      Param=Sibling
+        PascalType=PGtkCTreeNode
+      Param=data
+        Convert
+        PascalType=string
+      Param=aSpacing
+        PascalType=guint8
+      Param=PixmapClosed
+        PascalType=PGdkPixmap
+      Param=MaskClosed
+        PascalType=PGdkBitmap
+      Param=PixmapOpened
+        PascalType=PGdkPixmap
+      Param=MaskOpened
+        PascalType=PGdkBitmap
+      Param=IsLeaf
+        PascalType=boolean
+      Param=Expanded
+        PascalType=boolean
+    Prop=InsertNode
+      PropType=Function
+      PascalType=PGtkCTreeNode
+      Code=begin,"  result := InsertNode (aParent, Sibling, data, aSpacing, nil, nil, nil, nil, IsLeaf, Expanded);",end;
+      Overload
+      Count=6
+      Param=aParent
+        PascalType=PGtkCTreeNode
+      Param=Sibling
+        PascalType=PGtkCTreeNode
+      Param=data
+        Convert
+        PascalType=string
+      Param=aSpacing
+        PascalType=guint8
+      Param=IsLeaf
+        PascalType=boolean
+      Param=Expanded
+        PascalType=boolean
+    Prop=FunctionTypes
+      PropType=TypeDeclaration
+      Code="  TFPgtkCTreeFunction = procedure (TheTree:TFPgtkCTree; TheNode:PGtkCTreeNode; data:pointer) of object;"
+      Count=0
+    Prop=FPgtkCTreeFunc
+      PropType=HelperProc
+      Section=Private
+      Code="var p : TFPgtkCTreeFunction;",begin,"  with PSignalData(data)^ do","  begin","    p := TFPgtkCTreeFunction (TheSignalProc);","    p (TFPgtkCTree(GetPascalInstance(PgtkObject(Tree))), Node, data);","  end;",end;
+      Cdecl
+      Count=3
+      Param=Tree
+        PascalType=PGtkCTree
+      Param=Node
+        PascalType=PGtkCTreeNode
+      Param=data
+        PascalType=pointer
+    Prop=PostRecursive
+      PropType=Procedure
+      Code=begin,"  gtk_CTree_post_recursive (TheGtkObject, aNode, @FPgtkCTreeFunc, ","        ConvertSignalData(TFPgtkSignalFunction(func), data, true));",end;
+      Count=3
+      Param=aNode
+        PascalType=PGtkCTreeNode
+      Param=func
+        PascalType=TFPgtkCTreeFunction
+      Param=data
+        PascalType=pointer
+    Prop=PostRecursiveToDepth
+      PropType=Procedure
+      Code=begin,"  gtk_CTree_post_recursive_to_depth (TheGtkObject, aNode, aDepth, @FPgtkCTreeFunc, ","        ConvertSignalData(TFPgtkSignalFunction(func), data, true));",end;
+      Count=4
+      Param=aNode
+        PascalType=PGtkCTreeNode
+      Param=aDepth
+        PascalType=integer
+      Param=func
+        PascalType=TFPgtkCTreeFunction
+      Param=data
+        PascalType=pointer
+    Prop=PreRecursive
+      PropType=Procedure
+      Code=begin,"  gtk_CTree_pre_recursive (TheGtkObject, aNode, @FPgtkCTreeFunc, ","        ConvertSignalData(TFPgtkSignalFunction(func), data, true));",end;
+      Count=3
+      Param=aNode
+        PascalType=PGtkCTreeNode
+      Param=func
+        PascalType=TFPgtkCTreeFunction
+      Param=data
+        PascalType=pointer
+    Prop=PreRecursiveToDepth
+      PropType=Procedure
+      Code=begin,"  gtk_CTree_pre_recursive_to_depth (TheGtkObject, aNode, aDepth, @FPgtkCTreeFunc, ","        ConvertSignalData(TFPgtkSignalFunction(func), data, true));",end;
+      Count=4
+      Param=aNode
+        PascalType=PGtkCTreeNode
+      Param=aDepth
+        PascalType=integer
+      Param=func
+        PascalType=TFPgtkCTreeFunction
+      Param=data
+        PascalType=pointer
+    Prop=IsViewable
+      PropType=Procedure
+      GtkName=is_viewable
+      Count=1
+      Param=aNode
+        PascalType=PGtkCTreeNode
+    Prop=LastChild
+      PropType=Procedure
+      GtkName=last
+      Count=1
+      Param=aNode
+        PascalType=PGtkCTreeNode
+    Prop=IsChild
+      PropType=Function
+      PascalType=boolean
+      GtkName=find
+      Count=2
+      Param=anAncestor
+        PascalType=PGtkCTreeNode
+      Param=aChild
+        PascalType=PGtkCTreeNode
+    Prop=IsAncestor
+      PropType=Function
+      PascalType=boolean
+      GtkName=is_ancestor
+      Count=2
+      Param=anAncestor
+        PascalType=PGtkCTreeNode
+      Param=aChild
+        PascalType=PGtkCTreeNode
+    Prop=IsHotSpot
+      PropType=Function
+      PascalType=boolean
+      GtkName=is_hot_spot
+      Count=2
+      Param=X
+        PascalType=integer
+      Param=Y
+        PascalType=integer
+    Prop=MoveNode
+      PropType=Procedure
+      GtkName=move
+      Count=3
+      Param=aNode
+        PascalType=PGtkCTreeNode
+      Param=NewParent
+        PascalType=PGtkCTreeNode
+      Param=NewSibling
+        PascalType=PGtkCTreeNode
+    Prop=Expand
+      PropType=Procedure
+      GtkName=expand
+      Count=1
+      Param=aNode
+        PascalType=PGtkCTreeNode
+    Prop=ExpandRecursive
+      PropType=Procedure
+      GtkName=expand_recursive
+      Count=1
+      Param=aNode
+        PascalType=PGtkCTreeNode
+    Prop=ExpandToDepth
+      PropType=Procedure
+      GtkName=expand_to_depth
+      Count=2
+      Param=aNode
+        PascalType=PGtkCTreeNode
+      Param=aDepth
+        PascalType=integer
+    Prop=Collapse
+      PropType=Procedure
+      GtkName=collapse
+      Count=1
+      Param=aNode
+        PascalType=PGtkCTreeNode
+    Prop=CollapseRecursive
+      PropType=Procedure
+      GtkName=collapse_recursive
+      Count=1
+      Param=aNode
+        PascalType=PGtkCTreeNode
+    Prop=CollapseToDepth
+      PropType=Procedure
+      GtkName=collapse_to_depth
+      Count=2
+      Param=aNode
+        PascalType=PGtkCTreeNode
+      Param=aDepth
+        PascalType=integer
+    Prop=SelectNode
+      PropType=Procedure
+      GtkName=select
+      Count=1
+      Param=aNode
+        PascalType=PGtkCTreeNode
+    Prop=SelectRecursive
+      PropType=Procedure
+      GtkName=select_recursive
+      Count=1
+      Param=aNode
+        PascalType=PGtkCTreeNode
+    Prop=UnselectNode
+      PropType=Procedure
+      GtkName=unselect
+      Count=1
+      Param=aNode
+        PascalType=PGtkCTreeNode
+    Prop=UnselectRecursive
+      PropType=Procedure
+      GtkName=unselect_recursive
+      Count=1
+      Param=aNode
+        PascalType=PGtkCTreeNode
+    Prop=RealSelectRecursive
+      PropType=Procedure
+      Code=begin,"  gtk_ctree_real_select_recursive (TheGtkObject, aNode, ord(aState));",end;
+      Count=2
+      Param=aNode
+        PascalType=PGtkCTreeNode
+      Param=aState
+        PascalType=boolean
+    Prop=NodeGetCellType
+      PropType=Function
+      PascalType=TGtkCellType
+      GtkName=node_get_cell_type
+      Count=2
+      Param=Node
+        PascalType=PGtkCTreeNode
+      Param=column
+        PascalType=integer
+    Prop=NodeCellText
+      PropType=Property
+      PascalType=string
+      Code="var s : pgchar;","    r : integer;",begin,"  r := gtk_ctree_node_get_text (TheGtkObject, node, column, @s);","  if (r = 0) then","    result := ''","  else","    result := string(s^);",end;
+      ReadFuncType=Proc
+      WriteProcType=GtkMacro
+      WriteGtkName=node_set_text
+      WriteConvert
+      Count=2
+      Param=Node
+        PascalType=PGtkCTreeNode
+      Param=Column
+        PascalType=integer
+    Prop=NodeSetPixmap
+      PropType=Procedure
+      GtkName=node_set_pixmap
+      Count=4
+      Param=Node
+        PascalType=PGtkCTreeNode
+      Param=column
+        PascalType=integer
+      Param=pixmap
+        Convert
+        PascalType=PGdkPixmap
+      Param=mask
+        PascalType=PGdkBitmap
+    Prop=NodeGetPixmap
+      PropType=Procedure
+      Code=begin,"  gtk_ctree_node_get_pixmap (TheGtkObject, node, column, @pixmap, @mask);",end;
+      Count=4
+      Param=Node
+        PascalType=PGtkCTreeNode
+      Param=column
+        PascalType=integer
+      Param=pixmap
+        PascalType=PGdkPixmap
+        ParamType=Var
+      Param=mask
+        PascalType=PGdkBitmap
+        ParamType=Var
+    Prop=NodeSetPixText
+      PropType=Procedure
+      GtkName=node_set_pixtext
+      Count=6
+      Param=Node
+        PascalType=PGtkCTreeNode
+      Param=column
+        PascalType=integer
+      Param=text
+        Convert
+        PascalType=string
+      Param=aspacing
+        PascalType=guint8
+      Param=pixmap
+        PascalType=PGdkPixmap
+      Param=mask
+        PascalType=PGdkBitmap
+    Prop=NodeGetPixText
+      PropType=Procedure
+      Code="var r : integer;","    s : PPgchar;",begin,"  s := nil;","  r := gtk_ctree_node_get_pixtext (TheGtkObject, node, column, s, @aspacing, @pixmap, @mask);","  if r = 0 then","    begin","    text := '';","    pixmap := nil;","    mask := nil;","    end","  else","    text := string (s^);",end;
+      Count=6
+      Param=Node
+        PascalType=PGtkCTreeNode
+      Param=column
+        PascalType=integer
+      Param=text
+        PascalType=string
+        ParamType=Var
+      Param=aspacing
+        PascalType=guint8
+        ParamType=Var
+      Param=pixmap
+        PascalType=PGdkPixmap
+        ParamType=Var
+      Param=mask
+        PascalType=PGdkBitmap
+        ParamType=Var
+    Prop=SetNodeInfo
+      PropType=Procedure
+      GtkName=set_node_info
+      Overload
+      Count=9
+      Param=aNode
+        PascalType=PGtkCTreeNode
+      Param=aText
+        Convert
+        PascalType=string
+      Param=aSpacing
+        PascalType=guint8
+      Param=PixmapClosed
+        PascalType=PGdkPixmap
+      Param=MaskClosed
+        PascalType=PGdkBitmap
+      Param=PixmapOpened
+        PascalType=PGdkPixmap
+      Param=MaskOpened
+        PascalType=PGdkBitmap
+      Param=IsLeaf
+        PascalType=boolean
+      Param=Expanded
+        PascalType=boolean
+    Prop=GetNodeInfo
+      PropType=Procedure
+      Code="var r : integer;","    s : PPgchar;",begin,"  s := nil;","  r := gtk_ctree_get_node_info (TheGtkObject, aNode, s, ","      @aspacing, @pixmapClosed, @maskClosed, @pixmapOpened, @maskOpened,","      @IsLeaf, @expanded);","  if r = 0 then","    begin","    atext := '';","    Spacing := 0;","    pixmapClosed := nil;","    maskClosed := nil;","    pixmapOpened := nil;","    maskOpened := nil;","    IsLeaf := false;","    Expanded := false;","    end","  else","    atext := string (s^);",end;
+      Overload
+      Count=9
+      Param=aNode
+        PascalType=PGtkCTreeNode
+      Param=aText
+        Convert
+        PascalType=string
+        ParamType=Var
+      Param=aSpacing
+        Convert
+        PascalType=guint8
+        ParamType=Var
+      Param=PixmapClosed
+        Convert
+        PascalType=PGdkPixmap
+        ParamType=Var
+      Param=MaskClosed
+        Convert
+        PascalType=PGdkBitmap
+        ParamType=Var
+      Param=PixmapOpened
+        Convert
+        PascalType=PGdkPixmap
+        ParamType=Var
+      Param=MaskOpened
+        Convert
+        PascalType=PGdkBitmap
+        ParamType=Var
+      Param=IsLeaf
+        Convert
+        PascalType=boolean
+        ParamType=Var
+      Param=Expanded
+        Convert
+        PascalType=boolean
+        ParamType=Var
+    Prop=NodeSetShift
+      PropType=Procedure
+      GtkName=node_set_shift
+      Count=4
+      Param=Node
+        PascalType=PGtkCTreeNode
+      Param=column
+        PascalType=integer
+      Param=vertical
+        Convert
+        PascalType=integer
+      Param=horizontal
+        PascalType=integer
+    Prop=NodeSelectable
+      PropType=Property
+      PascalType=boolean
+      GtkName=node_get_selectable
+      ReadFuncType=GtkMacro
+      WriteProcType=GtkMacro
+      WriteGtkName=node_set_selectable
+      Count=1
+      Param=Node
+        PascalType=PGtkCTreeNode
+    Prop=NodeSetForeground
+      PropType=Procedure
+      GtkName=node_set_foreground
+      Count=2
+      Param=Node
+        PascalType=PGtkCTreeNode
+      Param=color
+        PascalType=PGdkColor
+    Prop=NodeSetBackground
+      PropType=Procedure
+      GtkName=node_set_background
+      Count=2
+      Param=Node
+        PascalType=PGtkCTreeNode
+      Param=color
+        PascalType=PGdkColor
+    Prop=NodeCellStyle
+      PropType=Property
+      PascalType=PGtkStyle
+      GtkName=node_get_cell_style
+      ReadFuncType=GtkMacro
+      WriteProcType=GtkMacro
+      WriteGtkName=node_set_cell_style
+      Count=2
+      Param=Node
+        PascalType=PGtkCTreeNode
+      Param=column
+        PascalType=integer
+    Prop=NodeRowStyle
+      PropType=Property
+      PascalType=PGtkStyle
+      GtkName=node_get_row_style
+      ReadFuncType=GtkMacro
+      WriteProcType=GtkMacro
+      WriteGtkName=node_set_row_style
+      Count=1
+      Param=Node
+        PascalType=PGtkCTreeNode
+    Prop=NodeData
+      PropType=Property
+      PascalType=pointer
+      GtkName=node_get_row_data
+      ReadFuncType=GtkMacro
+      WriteProcType=GtkMacro
+      WriteGtkName=node_set_row_data
+      Count=1
+      Param=Node
+        PascalType=PGtkCTreeNode
+    Prop=NodeMoveTo
+      PropType=Procedure
+      GtkName=node_moveto
+      Count=4
+      Param=aNode
+        PascalType=PGtkCTreeNode
+      Param=column
+        PascalType=integer
+      Param=RowAlign
+        PascalType=gfloat
+      Param=ColAlign
+        PascalType=gfloat
+    Prop=IsVisible
+      PropType=Function
+      PascalType=TGtkVisibility
+      GtkName=node_is_visible
+      Count=1
+      Param=aNode
+        PascalType=PGtkCTreeNode
+    Prop=CompareDragFunc
+      PropType=Property
+      PascalType=TGtkCTreeCompareDragFunc
+      GtkName=drag_compare
+      ReadFuncType=ObjField
+      WriteGtkName=drag_compare_func
+      Count=0
+    Prop=SortNode
+      PropType=Procedure
+      GtkName=sort_node
+      Count=1
+      Param=aNode
+        PascalType=PGtkCTreeNode
+    Prop=SortRecursive
+      PropType=Procedure
+      GtkName=sort_recursive
+      Count=1
+      Param=aNode
+        PascalType=PGtkCTreeNode
+    Prop=NthNode
+      PropType=Function
+      PascalType=PGtkCTreeNode
+      GtkName=node_Nth
+      Count=1
+      Param=Row
+        PascalType=integer
+  Object=Fixed
+    Inherit=Container
+    GtkFuncName=fixed
+    CreateObject
+    Count=3
+    Prop=Put
+      PropType=Procedure
+      GtkName=put
+      Count=3
+      Param=Widget
+        Convert
+        PascalType=TFPgtkWidget
+      Param=x
+        PascalType=integer
+      Param=y
+        PascalType=integer
+    Prop=Move
+      PropType=Procedure
+      GtkName=move
+      Count=3
+      Param=Widget
+        Convert
+        PascalType=TFPgtkWidget
+      Param=x
+        PascalType=integer
+      Param=y
+        PascalType=integer
+    Prop=GetPos
+      PropType=Procedure
+      Code="var g : TFPgtkGroup;","    r : integer;",begin,"  g := TFPgtkGroup.Create;","  try","    g.ManageLists := false;","    g.gtkList := TheGtkObject^.children;","    r := g.indexof (Widget);","    if r < 0 then","      begin","      PosX := -1;","      PosY := -1;","      end","    else","      with PGtkFixedChild(g.Items[r])^ do","        begin","        PosX := x;","        PosY := Y;","        end;","  finally","    g.Free;","  end;",end;
+      Count=3
+      Param=Widget
+        PascalType=TFPgtkWidget
+      Param=PosX
+        PascalType=integer
+        ParamType=Var
+      Param=PosY
+        PascalType=integer
+        ParamType=Var
+  Object=Notebook
+    Inherit=Container
+    GtkFuncName=notebook
+    CreateObject
+    Count=32
+    Prop=AppendPage
+      PropType=Procedure
+      Code=begin,"  gtk_notebook_append_page (TheGtkObject, ConvertTogtkWidget(Child), ConvertTogtkWidget(TabLabel));","  Child.Show;",end;
+      Count=2
+      Param=Child
+        Convert
+        PascalType=TFPgtkWidget
+      Param=TabLabel
+        Convert
+        PascalType=TFPgtkWidget
+    Prop=AppendPageFull
+      PropType=Procedure
+      Code=begin,"  if assigned (MenuLabel) then","    gtk_notebook_append_page_menu (TheGtkObject, ConvertTogtkWidget(Child), ConvertTogtkWidget(TabLabel), ConvertTogtkWidget(MenuLabel))","  else","    gtk_notebook_append_page (TheGtkObject, ConvertTogtkWidget(Child), ConvertTogtkWidget(TabLabel));","  if isvisible then","    Child.Show;",end;
+      Count=4
+      Param=Child
+        Convert
+        PascalType=TFPgtkWidget
+      Param=TabLabel
+        Convert
+        PascalType=TFPgtkWidget
+      Param=MenuLabel
+        Convert
+        PascalType=TFPgtkWidget
+      Param=IsVisible
+        PascalType=boolean
+    Prop=PrependPage
+      PropType=Procedure
+      GtkName=Prepend_page
+      Code=begin,"  gtk_notebook_prepend_page (TheGtkObject, ConvertTogtkWidget(Child), ConvertTogtkWidget(TabLabel));","  Child.Show;",end;
+      Count=2
+      Param=Child
+        Convert
+        PascalType=TFPgtkWidget
+      Param=TabLabel
+        Convert
+        PascalType=TFPgtkWidget
+    Prop=PrependPageFull
+      PropType=Procedure
+      Code=begin,"  if assigned (MenuLabel) then","    gtk_notebook_prepend_page_menu (TheGtkObject, ConvertTogtkWidget(Child), ConvertTogtkWidget(TabLabel), ConvertTogtkWidget(MenuLabel))","  else","    gtk_notebook_prepend_page (TheGtkObject, ConvertTogtkWidget(Child), ConvertTogtkWidget(TabLabel));","  if isvisible then","    Child.Show;",end;
+      Count=4
+      Param=Child
+        Convert
+        PascalType=TFPgtkWidget
+      Param=TabLabel
+        Convert
+        PascalType=TFPgtkWidget
+      Param=MenuLabel
+        Convert
+        PascalType=TFPgtkWidget
+      Param=IsVisible
+        PascalType=boolean
+    Prop=InsertPage
+      PropType=Procedure
+      GtkName=insert_page
+      Code=begin,"  gtk_notebook_insert_page (TheGtkObject, ConvertTogtkWidget(Child), ConvertTogtkWidget(TabLabel), position);","  Child.Show;",end;
+      Count=3
+      Param=Child
+        Convert
+        PascalType=TFPgtkWidget
+      Param=TabLabel
+        Convert
+        PascalType=TFPgtkWidget
+      Param=Position
+        PascalType=integer
+    Prop=InsertPageFull
+      PropType=Procedure
+      Code=begin,"  if assigned (MenuLabel) then","    gtk_notebook_insert_page_menu (TheGtkObject, ConvertTogtkWidget(Child), ConvertTogtkWidget(TabLabel), ConvertTogtkWidget(MenuLabel), position)","  else","    gtk_notebook_insert_page (TheGtkObject, ConvertTogtkWidget(Child), ConvertTogtkWidget(TabLabel), position);","  if isvisible then","    Child.Show;",end;
+      Count=5
+      Param=Child
+        Convert
+        PascalType=TFPgtkWidget
+      Param=TabLabel
+        Convert
+        PascalType=TFPgtkWidget
+      Param=MenuLabel
+        Convert
+        PascalType=TFPgtkWidget
+      Param=IsVisible
+        PascalType=boolean
+      Param=Position
+        PascalType=integer
+    Prop=RemovePage
+      PropType=Procedure
+      GtkName=remove_page
+      Count=1
+      Param=PageNumber
+        PascalType=integer
+    Prop=PageNumberOf
+      PropType=Function
+      PascalType=integer
+      GtkName=page_num
+      Count=1
+      Param=Child
+        Convert
+        PascalType=TFPgtkWidget
+    Prop=NextPage
+      PropType=Procedure
+      GtkName=next_page
+      Count=0
+    Prop=PrevPage
+      PropType=Procedure
+      GtkName=prev_page
+      Count=0
+    Prop=ReorderPage
+      PropType=Procedure
+      GtkName=reorder_child
+      Count=2
+      Param=Child
+        Convert
+        PascalType=TFPgtkWidget
+      Param=PageNum
+        PascalType=integer
+    Prop=PageIndex
+      PropType=Property
+      PascalType=integer
+      GtkName=current_page
+      WriteGtkName=page
+      Count=0
+    Prop=Page
+      PropType=Property
+      PascalType=TFPgtkWidget
+      Code=begin,"  result := GetChildOnPage (PageIndex);",end;
+      ReadFuncType=Proc
+      WriteProcType=Proc
+      WriteCode="var r : integer;",begin,"  r := PageNumberOf (TheValue);","  if r > -1 then","    PageIndex := r;",end;
+      Count=0
+    Prop=TabPos
+      PropType=Property
+      PascalType=TGtkPositionType
+      GtkName=tab_pos
+      ReadFuncType=ObjFunc
+      WriteGtkName=tab_pos
+      Count=0
+    Prop=ShowTabs
+      PropType=Property
+      PascalType=boolean
+      GtkName=show_tabs
+      ReadConvert
+      ReadFuncType=ObjFunc
+      WriteGtkName=show_tabs
+      Count=0
+    Prop=ShowBorder
+      PropType=Property
+      PascalType=boolean
+      GtkName=show_border
+      ReadConvert
+      ReadFuncType=ObjFunc
+      WriteGtkName=show_border
+      Count=0
+    Prop=Scrollable
+      PropType=Property
+      PascalType=boolean
+      GtkName=scrollable
+      ReadConvert
+      ReadFuncType=ObjFunc
+      WriteGtkName=scrollable
+      Count=0
+    Prop=Homogenous
+      PropType=Property
+      PascalType=boolean
+      GtkName=homogeneous
+      ReadConvert
+      ReadFuncType=ObjFunc
+      WriteGtkName=homogeneous_tabs
+      Count=0
+    Prop=TabHBorder
+      PropType=Property
+      PascalType=word
+      GtkName=tab_hborder
+      ReadFuncType=ObjField
+      WriteGtkName=tab_hborder
+      Count=0
+    Prop=TabVBorder
+      PropType=Property
+      PascalType=word
+      GtkName=tab_vborder
+      ReadFuncType=ObjField
+      WriteGtkName=tab_vborder
+      Count=0
+    Prop=SetTabBorders
+      PropType=Procedure
+      GtkName=set_tab_border
+      ReadFuncType=ObjField
+      WriteGtkName=tab_border
+      Count=1
+      Param=BorderWidth
+        PascalType=word
+    Prop=GetMenuLabelOf
+      PropType=Function
+      PascalType=TFPgtkWidget
+      Code=begin,"  result := GetPascalInstance (PGtkObject(gtk_notebook_get_menu_label (TheGtkObject, ConvertTogtkWidget(Child)))) as TFPgtkWidget;",end;
+      Count=1
+      Param=Child
+        Convert
+        PascalType=TFPgtkWidget
+    Prop=SetMenuLabel
+      PropType=Procedure
+      GtkName=set_menu_label
+      Count=2
+      Param=Child
+        Convert
+        PascalType=TFPgtkWidget
+      Param=MenuLabel
+        Convert
+        PascalType=TFPgtkWidget
+    Prop=GetTabLabelOf
+      PropType=Function
+      PascalType=TFPgtkWidget
+      Code=begin,"  result := GetPascalInstance (PGtkObject(gtk_notebook_get_tab_label (TheGtkObject, ConvertTogtkWidget(Child)))) as TFPgtkWidget;",end;
+      Count=1
+      Param=Child
+        Convert
+        PascalType=TFPgtkWidget
+    Prop=SetTabLabel
+      PropType=Procedure
+      GtkName=set_tab_label
+      Count=2
+      Param=Child
+        Convert
+        PascalType=TFPgtkWidget
+      Param=TabLabel
+        Convert
+        PascalType=TFPgtkWidget
+    Prop=GetChildOnPage
+      PropType=Function
+      PascalType=TFPgtkWidget
+      Code=begin,"  result := GetPascalInstance (PGtkObject(gtk_notebook_get_nth_page (TheGtkObject, PageNum))) as TFPgtkWidget;",end;
+      Count=1
+      Param=PageNum
+        PascalType=integer
+    Prop=GetTabLabelPacking
+      PropType=Procedure
+      Code="var PT : PGtkPackType;",begin,"  pt := @PackType;","  gtk_notebook_query_tab_label_packing (TheGtkObject, ConvertTogtkWidget(widget), ","                               @expand, @fill, pt);",end;
+      Count=4
+      Param=Widget
+        Convert
+        PascalType=TFPgtkWidget
+      Param=Expand
+        PascalType=boolean
+        ParamType=Var
+      Param=Fill
+        PascalType=boolean
+        ParamType=Var
+      Param=PackType
+        PascalType=TGtkPackType
+        ParamType=Var
+    Prop=SetTabLabelPacking
+      PropType=Procedure
+      GtkName=set_tab_label_packing
+      Count=4
+      Param=Widget
+        Convert
+        PascalType=TFPgtkWidget
+      Param=Expand
+        PascalType=boolean
+      Param=Fill
+        PascalType=boolean
+      Param=PackType
+        PascalType=TGtkPackType
+    Prop=EnablePopup
+      PropType=Procedure
+      GtkName=popup_enable
+      Count=0
+    Prop=DisablePopup
+      PropType=Procedure
+      GtkName=popup_disable
+      Count=0
+    Prop=PageSwitchSignal
+      PropType=SignalType
+      Count=4
+      Param=Sender
+        Convert
+        PascalType=TFPgtkObject
+      Param=PageRec
+        PascalType=PGtkNotebookPage
+      Param=aPageNum
+        PascalType=integer
+      Param=data
+        PascalType=pointer
+    Prop=SwitchPage
+      PropType=Signal
+      PascalType=PageSwitchSignal
+      GtkName=switch-page
+      Count=0
+  Object=FontSelection
+    Inherit=Notebook
+    GtkFuncName=font_selection
+    CreateObject
+    Count=5
+    Prop=resourcestrings
+      PropType=Declarations
+      Code=resourcestring,"  sFontNotFound = 'Can''t find font ""%s"" on this system';"
+      Count=0
+    Prop=FontName
+      PropType=Property
+      PascalType=string
+      GtkName=font_name
+      ReadConvert
+      WriteProcType=Proc
+      WriteCode=begin,"  if not gtk_font_selection_set_font_name (TheGtkObject, pgchar(TheValue)) then","    raise exception.CreateFmt (sFontNotFound, [TheValue]);",end;
+      Count=0
+    Prop=GetFont
+      PropType=Function
+      PascalType=PGdkFont
+      GtkName=get_font
+      Count=0
+    Prop=PreviewText
+      PropType=Property
+      PascalType=string
+      GtkName=preview_text
+      ReadConvert
+      WriteGtkName=preview_text
+      WriteConvert
+      Count=0
+    Prop=SetFilter
+      PropType=Procedure
+      Code="var ppF, ppW, ppSl, ppSW, ppSp, ppC : ppgchar;",,"  function MakePP (data : array of string) : ppgchar;","  begin","    if high(data) > low(data) then","      result := ArrayToPPgchar(data)","    else","      result := nil;","  end;",,"  procedure FreePP (ppdata : ppgchar; data : array of string);","  begin","    if assigned (ppdata) then","      freemem (ppdata, sizeof (pgchar) * (high(data)-low(data)+1));","  end;",,begin,"  ppF := MakePP(Foundries);","  ppW := MakePP(Weights);","  ppSl := MakePP(Slants);","  ppSW := MakePP(SetWidths);","  ppSp := MakePP(Spacings);","  ppC := MakePP(CharSets);","  gtk_font_selection_set_filter (TheGtkObject, FilterType, FontType, ppF, ppW, ppSl, ppSW, ppSp, ppC);","  FreePP (ppF, Foundries);","  FreePP (ppW, Weights);","  FreePP (ppSl, Slants);","  FreePP (ppSW, SetWidths);","  FreePP (ppSp, Spacings);","  FreePP (ppC, CharSets);",end;
+      Count=8
+      Param=FilterType
+        PascalType=TGtkFontFilterType
+      Param=FontType
+        PascalType=TGtkFontType
+      Param=Foundries
+        PascalType=array of string
+      Param=Weights
+        PascalType=array of string
+      Param=Slants
+        PascalType=array of string
+      Param=SetWidths
+        PascalType=array of string
+      Param=Spacings
+        PascalType=array of string
+      Param=CharSets
+        PascalType=array of string
+  Object=Paned
+    Inherit=Container
+    GtkFuncName=paned
+    Count=12
+    Prop=GutterSize
+      PropType=Property
+      PascalType=word
+      GtkName=gutter_size
+      ReadFuncType=ObjField
+      WriteProcType=Proc
+      WriteCode=begin,"  {$ifdef gtkwin}","  TheGtkObject^.gutter_size := TheValue;","  {$else}","  gtk_paned_set_gutter_size(TheGtkObject,TheValue);","  {$endif}",end;
+      Count=0
+    Prop=HandleSize
+      PropType=Property
+      PascalType=word
+      GtkName=handle_size
+      ReadFuncType=ObjField
+      WriteGtkName=handle_size
+      Count=0
+    Prop=Position
+      PropType=Property
+      PascalType=integer
+      GtkName=child1_size
+      ReadFuncType=ObjField
+      WriteGtkName=position
+      Count=0
+    Prop=ComputePosition
+      PropType=Procedure
+      GtkName=compute_position
+      Count=3
+      Param=AnAllocation
+        PascalType=integer
+      Param=Child1Req
+        PascalType=integer
+      Param=Child2Req
+        PascalType=integer
+    Prop=Add1
+      PropType=Procedure
+      Code=begin,"  gtk_paned_add1 (TheGtkObject, ConvertToGtkWidget(Child));","  Child.Show;",end;
+      Overload
+      Count=1
+      Param=Child
+        Convert
+        PascalType=TFPgtkWidget
+    Prop=Pack1
+      PropType=Procedure
+      Code=begin,"  gtk_paned_pack1 (TheGtkObject, ConvertToGtkWidget(Child), Resize, Shrink);","  Child.Show;",end;
+      Overload
+      Count=3
+      Param=Child
+        Convert
+        PascalType=TFPgtkWidget
+      Param=Resize
+        Convert
+        PascalType=boolean
+      Param=Shrink
+        Convert
+        PascalType=boolean
+    Prop=Add1
+      PropType=Procedure
+      Code=begin,"  gtk_paned_add1 (TheGtkObject, ConvertToGtkWidget(Child));","  if isvisible then","    Child.Show;",end;
+      Overload
+      Count=2
+      Param=Child
+        Convert
+        PascalType=TFPgtkWidget
+      Param=isVisible
+        PascalType=boolean
+    Prop=Pack1
+      PropType=Procedure
+      Code=begin,"  gtk_paned_pack1 (TheGtkObject, ConvertToGtkWidget(Child), Resize, Shrink);","  if isvisible then","    Child.Show;",end;
+      Overload
+      Count=4
+      Param=Child
+        Convert
+        PascalType=TFPgtkWidget
+      Param=Resize
+        Convert
+        PascalType=boolean
+      Param=Shrink
+        Convert
+        PascalType=boolean
+      Param=IsVisible
+        PascalType=boolean
+    Prop=Add2
+      PropType=Procedure
+      Code=begin,"  gtk_paned_add2 (TheGtkObject, ConvertToGtkWidget(Child));","  Child.Show;",end;
+      Overload
+      Count=1
+      Param=Child
+        Convert
+        PascalType=TFPgtkWidget
+    Prop=Pack2
+      PropType=Procedure
+      Code=begin,"  gtk_paned_pack2 (TheGtkObject, ConvertToGtkWidget(Child), Resize, Shrink);","  Child.Show;",end;
+      Overload
+      Count=3
+      Param=Child
+        Convert
+        PascalType=TFPgtkWidget
+      Param=Resize
+        Convert
+        PascalType=boolean
+      Param=Shrink
+        Convert
+        PascalType=boolean
+    Prop=Add2
+      PropType=Procedure
+      Code=begin,"  gtk_paned_add2 (TheGtkObject, ConvertToGtkWidget(Child));","  if isvisible then","    Child.Show;",end;
+      Overload
+      Count=2
+      Param=Child
+        Convert
+        PascalType=TFPgtkWidget
+      Param=IsVisible
+        PascalType=boolean
+    Prop=Pack2
+      PropType=Procedure
+      Code=begin,"  gtk_paned_pack2 (TheGtkObject, ConvertToGtkWidget(Child), Resize, Shrink);","  if isvisible then","    Child.Show;",end;
+      Overload
+      Count=4
+      Param=Child
+        Convert
+        PascalType=TFPgtkWidget
+      Param=Resize
+        Convert
+        PascalType=boolean
+      Param=Shrink
+        Convert
+        PascalType=boolean
+      Param=IsVisible
+        PascalType=boolean
+  Object=HPaned
+    Inherit=Paned
+    GtkFuncName=hpaned
+    CreateObject
+    Count=0
+  Object=VPaned
+    Inherit=Paned
+    GtkFuncName=vpaned
+    CreateObject
+    Count=0
+  Object=Layout
+    Inherit=Container
+    GtkFuncName=layout
+    CreateParams=nil,nil
+    CreateObject
+    Count=8
+    Prop=HAdj
+      PropType=Property
+      PascalType=TFPgtkAdjustment
+      GtkName=hadjustment
+      ReadConvert
+      WriteGtkName=hadjustment
+      WriteConvert
+      Count=0
+    Prop=VAdj
+      PropType=Property
+      PascalType=TFPgtkAdjustment
+      GtkName=vadjustment
+      ReadConvert
+      WriteGtkName=vadjustment
+      WriteConvert
+      Count=0
+    Prop=Freeze
+      PropType=Procedure
+      GtkName=freeze
+      Count=0
+    Prop=Thaw
+      PropType=Procedure
+      GtkName=thaw
+      Count=0
+    Prop=Put
+      PropType=Procedure
+      Code=begin,"  gtk_layout_put (TheGtkObject, PGtkwidget(ConvertToGtkObject(aWidget)), X, Y);","  aWidget.Show;",end;
+      Overload
+      Count=3
+      Param=aWidget
+        Convert
+        PascalType=TFPgtkWidget
+      Param=X
+        PascalType=integer
+      Param=Y
+        PascalType=integer
+    Prop=Put
+      PropType=Procedure
+      Code=begin,"  gtk_layout_put (TheGtkObject, PGtkwidget(ConvertToGtkObject(aWidget)), X, Y);","  if aVisible then","    aWidget.Show;",end;
+      Overload
+      Count=4
+      Param=aWidget
+        Convert
+        PascalType=TFPgtkWidget
+      Param=X
+        PascalType=integer
+      Param=Y
+        PascalType=integer
+      Param=aVisible
+        PascalType=boolean
+    Prop=Move
+      PropType=Procedure
+      GtkName=move
+      Count=3
+      Param=aWidget
+        Convert
+        PascalType=TFPgtkWidget
+      Param=X
+        PascalType=integer
+      Param=Y
+        PascalType=integer
+    Prop=SetSize
+      PropType=Procedure
+      GtkName=set_size
+      Count=2
+      Param=aWidth
+        PascalType=integer
+      Param=aHeight
+        PascalType=integer
+  Object=List
+    Inherit=Container
+    GtkFuncName=list
+    CreateObject
+    Count=29
+    Prop=SelectionChanged
+      PropType=Signal
+      PascalType=signal
+      GtkName=selection-changed
+      Count=0
+    Prop=SelectChild
+      PropType=Signal
+      PascalType=WidgetSignal
+      GtkName=select-child
+      Count=0
+    Prop=UnselectChild
+      PropType=Signal
+      PascalType=WidgetSignal
+      GtkName=unselect-child
+      Count=0
+    Prop=SelectionMode
+      PropType=Property
+      PascalType=TGtkSelectionMode
+      Code=begin,"  result := TGtkSelectionMode(Selection_mode(TheGtkObject^));",end;
+      ReadFuncType=Proc
+      WriteGtkName=selection_mode
+      Count=0
+    Prop=InsertItems
+      PropType=Procedure
+      Code=begin,"  gtk_list_insert_items (TheGtkObject, TheItems.GtkList, position);",end;
+      Count=2
+      Param=TheItems
+        PascalType=TFPgtkListItemGroup
+      Param=position
+        PascalType=integer
+    Prop=AppendItems
+      PropType=Procedure
+      Code=begin,"  gtk_list_append_items (TheGtkObject, TheItems.GtkList);",end;
+      Count=1
+      Param=TheItems
+        PascalType=TFPgtkListItemGroup
+    Prop=PrependItems
+      PropType=Procedure
+      Code=begin,"  gtk_list_prepend_items (TheGtkObject, TheItems.GtkList);",end;
+      Count=1
+      Param=TheItems
+        PascalType=TFPgtkListItemGroup
+    Prop=RemoveItems
+      PropType=Procedure
+      Code=begin,"  gtk_list_remove_items (TheGtkObject, TheItems.GtkList);",end;
+      Count=1
+      Param=TheItems
+        PascalType=TFPgtkListItemGroup
+    Prop=RemoveItemsNoUnref
+      PropType=Procedure
+      Code=begin,"  gtk_list_remove_items_no_unref (TheGtkObject, TheItems.GtkList);",end;
+      Count=1
+      Param=TheItems
+        PascalType=TFPgtkListItemGroup
+    Prop=ClearItems
+      PropType=Procedure
+      Code=begin,"  if ToItem >= 0 then","    inc (ToItem);","  gtk_list_clear_items (TheGtkObject, FromItem, ToItem);",end;
+      Count=2
+      Param=FromItem
+        PascalType=integer
+      Param=ToItem
+        PascalType=integer
+    Prop=ClearAll
+      PropType=Procedure
+      Code=begin,"  ClearItems (0,-1);",end;
+      Count=0
+    Prop=SelectItem
+      PropType=Procedure
+      GtkName=select_item
+      Count=1
+      Param=Item
+        PascalType=integer
+    Prop=UnselectItem
+      PropType=Procedure
+      GtkName=unselect_item
+      Count=1
+      Param=Item
+        PascalType=integer
+    Prop=SelectChild
+      PropType=Procedure
+      GtkName=select_child
+      Count=1
+      Param=Child
+        Convert
+        PascalType=TFPgtkWidget
+    Prop=UnselectChild
+      PropType=Procedure
+      GtkName=unselect_child
+      Count=1
+      Param=Child
+        Convert
+        PascalType=TFPgtkWidget
+    Prop=ChildPosition
+      PropType=Function
+      PascalType=integer
+      GtkName=child_position
+      Count=1
+      Param=Child
+        Convert
+        PascalType=TFPgtkWidget
+    Prop=ExtendSelection
+      PropType=Procedure
+      GtkName=extend_selection
+      Count=3
+      Param=ScrollType
+        PascalType=TGtkScrollType
+      Param=Position
+        PascalType=gfloat
+      Param=AutoStartSelection
+        PascalType=boolean
+    Prop=StartSelection
+      PropType=Procedure
+      GtkName=start_selection
+      Count=0
+    Prop=EndSelection
+      PropType=Procedure
+      GtkName=end_selection
+      Count=0
+    Prop=SelectAll
+      PropType=Procedure
+      GtkName=select_all
+      Count=0
+    Prop=UnselectAll
+      PropType=Procedure
+      GtkName=unselect_all
+      Count=0
+    Prop=ScrollHorizontal
+      PropType=Procedure
+      GtkName=scroll_horizontal
+      Count=2
+      Param=ScrollType
+        PascalType=TGtkScrollType
+      Param=Position
+        PascalType=gfloat
+    Prop=ScrollVertical
+      PropType=Procedure
+      GtkName=scroll_vertical
+      Count=2
+      Param=ScrollType
+        PascalType=TGtkScrollType
+      Param=Position
+        PascalType=gfloat
+    Prop=ToggleAddMode
+      PropType=Procedure
+      GtkName=toggle_add_mode
+      Count=0
+    Prop=ToggleFocusRow
+      PropType=Procedure
+      GtkName=toggle_focus_row
+      Count=0
+    Prop=ToggleRow
+      PropType=Procedure
+      GtkName=toggle_row
+      Count=1
+      Param=Child
+        Convert
+        PascalType=TFPgtkWidget
+    Prop=UndoSelection
+      PropType=Procedure
+      GtkName=undo_selection
+      Count=0
+    Prop=EndDragSelection
+      PropType=Procedure
+      GtkName=end_drag_selection
+      Count=0
+    Prop=GetSelection
+      PropType=Procedure
+      Code=begin,"  with aGroup do","    begin","    ManageLists := False;","    GtkList := TheGtkObject^.Selection;","    end;",end;
+      Count=1
+      Param=aGroup
+        PascalType=TFPgtkGroup
+  Object=MenuShell
+    Inherit=Container
+    GtkFuncName=menu_shell
+    Count=18
+    Prop=MoveCurrentSignal
+      PropType=SignalType
+      Count=3
+      Param=Sender
+        PascalType=TFPgtkObject
+      Param=dir
+        PascalType=TGtkMenuDirectionType
+      Param=data
+        PascalType=pointer
+    Prop=GtkPrepend
+      PropType=Procedure
+      Section=Protected
+      GtkName=prepend
+      Virtual
+      Count=1
+      Param=MenuItem
+        Convert
+        PascalType=TFPgtkWidget
+    Prop=GtkInsert
+      PropType=Procedure
+      Section=Protected
+      GtkName=insert
+      Virtual
+      Count=2
+      Param=MenuItem
+        Convert
+        PascalType=TFPgtkWidget
+      Param=position
+        PascalType=integer
+    Prop=GtkAppend
+      PropType=Procedure
+      Section=Protected
+      GtkName=append
+      Virtual
+      Count=1
+      Param=MenuItem
+        Convert
+        PascalType=TFPgtkWidget
+    Prop=ActivateItem
+      PropType=Procedure
+      GtkName=activate_item
+      Count=2
+      Param=MenuItem
+        Convert
+        PascalType=TFPgtkWidget
+      Param=ForceDeactivate
+        PascalType=boolean
+    Prop=SelectItem
+      PropType=Procedure
+      GtkName=select_item
+      Count=1
+      Param=MenuItem
+        Convert
+        PascalType=TFPgtkWidget
+    Prop=DeActivate
+      PropType=Procedure
+      GtkName=deactivate
+      Count=0
+    Prop=Prepend
+      PropType=Procedure
+      Code=begin,"  GtkPrepend (MenuItem);","  MenuItem.Show;",end;
+      Overload
+      Count=1
+      Param=MenuItem
+        Convert
+        PascalType=TFPgtkWidget
+    Prop=Prepend
+      PropType=Procedure
+      Code=begin,"  GtkPrepend (MenuItem);","  if createvisible then","    MenuItem.Show;",end;
+      Overload
+      Count=2
+      Param=MenuItem
+        Convert
+        PascalType=TFPgtkWidget
+      Param=CreateVisible
+        PascalType=boolean
+    Prop=Insert
+      PropType=Procedure
+      Code=begin,"  GtkInsert (MenuItem, position);","  MenuItem.Show;",end;
+      Overload
+      Count=2
+      Param=MenuItem
+        Convert
+        PascalType=TFPgtkWidget
+      Param=position
+        PascalType=integer
+    Prop=Insert
+      PropType=Procedure
+      Code=begin,"  GtkInsert (MenuItem, position);","  if createvisible then","    MenuItem.Show;",end;
+      Overload
+      Count=3
+      Param=MenuItem
+        Convert
+        PascalType=TFPgtkWidget
+      Param=position
+        PascalType=integer
+      Param=CreateVisible
+        PascalType=boolean
+    Prop=Append
+      PropType=Procedure
+      Code=begin,"  GtkAppend (MenuItem);","  MenuItem.Show;",end;
+      Overload
+      Count=1
+      Param=MenuItem
+        Convert
+        PascalType=TFPgtkWidget
+    Prop=Append
+      PropType=Procedure
+      Code=begin,"  GtkAppend (MenuItem);","  if createvisible then","    MenuItem.Show;",end;
+      Overload
+      Count=2
+      Param=MenuItem
+        Convert
+        PascalType=TFPgtkWidget
+      Param=CreateVisible
+        PascalType=boolean
+    Prop=DeActivate
+      PropType=Signal
+      PascalType=Signal
+      GtkName=deactivate
+      Count=0
+    Prop=SelectionDone
+      PropType=Signal
+      PascalType=Signal
+      GtkName=selection-done
+      Count=0
+    Prop=Cancel
+      PropType=Signal
+      PascalType=Signal
+      GtkName=cancel
+      Count=0
+    Prop=MoveCurrent
+      PropType=Signal
+      PascalType=MoveCurrentSignal
+      GtkName=move-current
+      Count=0
+    Prop=ActivateCurrent
+      PropType=Signal
+      PascalType=BooleanSignal
+      GtkName=activate-current
+      Count=0
+  Object=MenuBar
+    Inherit=MenuShell
+    GtkFuncName=menu_bar
+    CreateObject
+    Count=4
+    Prop=GtkPrepend
+      PropType=Procedure
+      Section=Protected
+      GtkName=prepend
+      Override
+      Count=1
+      Param=MenuItem
+        Convert
+        PascalType=TFPgtkWidget
+    Prop=GtkInsert
+      PropType=Procedure
+      Section=Protected
+      GtkName=insert
+      Override
+      Count=2
+      Param=MenuItem
+        Convert
+        PascalType=TFPgtkWidget
+      Param=position
+        PascalType=integer
+    Prop=GtkAppend
+      PropType=Procedure
+      Section=Protected
+      GtkName=append
+      Override
+      Count=1
+      Param=MenuItem
+        Convert
+        PascalType=TFPgtkWidget
+    Prop=Shadow
+      PropType=Property
+      PascalType=TgtkShadowType
+      GtkName=shadow_type
+      ReadFuncType=ObjField
+      WriteGtkName=shadow_type
+      Count=0
+  Object=Menu
+    Inherit=MenuShell
+    GtkFuncName=menu
+    CreateObject
+    Count=20
+    Prop=GtkPrepend
+      PropType=Procedure
+      Section=Protected
+      GtkName=prepend
+      Override
+      Count=1
+      Param=MenuItem
+        Convert
+        PascalType=TFPgtkWidget
+    Prop=GtkInsert
+      PropType=Procedure
+      Section=Protected
+      GtkName=insert
+      Override
+      Count=2
+      Param=MenuItem
+        Convert
+        PascalType=TFPgtkWidget
+      Param=position
+        PascalType=integer
+    Prop=GtkAppend
+      PropType=Procedure
+      Section=Protected
+      GtkName=append
+      Override
+      Count=1
+      Param=MenuItem
+        Convert
+        PascalType=TFPgtkWidget
+    Prop=Functiontypes
+      PropType=TypeDeclaration
+      Code="  TFPgtkMenuDetachFunction = procedure (Widget:TFPgtkWidget; menu:TFPgtkMenu) of object;","  TFPgtkMenuPosFunction = procedure (menu:TFPgtkMenu; var x,y:integer; data:pointer) of object;"
+      Count=0
+    Prop=FPgtkMenuPos
+      PropType=HelperProc
+      Section=Private
+      Code="var p : TFPgtkMenuPosFunction;",begin,"  with PSignalData (data)^ do","    begin","    p := TFPgtkMenuPosFunction (TheSignalProc);","    p(TFPgtkMenu(GetPascalInstance(PgtkObject(Sender))), x^, y^, data);","    end;",end;
+      Cdecl
+      Count=4
+      Param=Sender
+        PascalType=PgtkMenu
+      Param=x
+        PascalType=pgint
+      Param=y
+        PascalType=pgint
+      Param=data
+        PascalType=pointer
+    Prop=FPgtkMenuDetacher
+      PropType=HelperProc
+      Section=Private
+      Code="var m : TFPgtkMenu;","    a : TFPgtkWidget;",begin,"  m := (GetPascalInstance(PgtkObject(TheMenu)) as TFPgtkMenu);","  if assigned(m) and assigned(m.FDetacher) then","    begin","    a := TFPgtkWidget (GetPascalInstance(PgtkObject(AttachedWidget)));","    m.FDetacher (a, m);","    end",end;
+      Cdecl
+      Count=2
+      Param=AttachedWidget
+        PascalType=PgtkWidget
+      Param=TheMenu
+        PascalType=PgtkMenu
+    Prop=FDetacher
+      PropType=Field
+      PascalType=TFPgtkMenuDetachFunction
+      Count=0
+    Prop=ReorderChild
+      PropType=Procedure
+      GtkName=reorder_child
+      Count=2
+      Param=MenuItem
+        Convert
+        PascalType=TFPgtkWidget
+      Param=position
+        PascalType=integer
+    Prop=Popup
+      PropType=Procedure
+      Code=begin,"  gtk_menu_popup (TheGtkObject, null, null, null, null, button, 0);",end;
+      Overload
+      Count=1
+      Param=button
+        PascalType=guint
+    Prop=Popup
+      PropType=Procedure
+      Code=begin,"  gtk_menu_popup (TheGtkObject, ConvertTogtkWidget(ParentShell), ConvertTogtkWidget(ParentItem),","      @FPgtkMenuPos, ConvertSignalData(TFPgtkSignalFunction(func), data, true), button, ActivateTime);",end;
+      Overload
+      Count=6
+      Param=ParentShell
+        PascalType=TFPgtkWidget
+      Param=ParentItem
+        PascalType=TFPgtkWidget
+      Param=func
+        PascalType=TFPgtkMenuPosFunction
+      Param=data
+        PascalType=pointer
+      Param=button
+        PascalType=guint
+      Param=ActivateTime
+        PascalType=guint32
+    Prop=PopDown
+      PropType=Procedure
+      GtkName=popdown
+      Count=0
+    Prop=Reposition
+      PropType=Procedure
+      GtkName=reposition
+      Count=0
+    Prop=AttachToWidget
+      PropType=Procedure
+      Code=begin,"  FDetacher := detacher;","  gtk_menu_attach_to_widget (TheGtkObject, ConvertTogtkWidget(Widget), @FPgtkMenuDetacher);",end;
+      Count=2
+      Param=Widget
+        PascalType=TFPgtkWidget
+      Param=detacher
+        PascalType=TFPgtkMenuDetachFunction
+    Prop=Detach
+      PropType=Procedure
+      GtkName=detach
+      Count=0
+    Prop=Title
+      PropType=Property
+      PascalType=string
+      ReadFuncType=NotImplemented
+      WriteProcType=Proc
+      WriteCode=begin,"  gtk_menu_set_title(TheGtkObject,Pgchar(TheValue));",end;
+      WriteConvert
+      Count=0
+    Prop=Active
+      PropType=Property
+      PascalType=TFPgtkWidget
+      GtkName=active
+      ReadConvert
+      WriteProcType=Proc
+      WriteCode="var r : integer;",begin,"  r := Children.indexof (TheValue);","  if r >= 0 then","    SetActiveIndex (r);",end;
+      Count=0
+    Prop=ActiveIndex
+      PropType=Property
+      PascalType=integer
+      Code=begin,"  result := Children.indexof (GetActive);",end;
+      ReadFuncType=Proc
+      WriteGtkName=active
+      Count=0
+    Prop=TearOffState
+      PropType=Property
+      PascalType=boolean
+      GtkName=torn_off
+      ReadConvert
+      ReadFuncType=ObjFunc
+      WriteGtkName=tearoff_state
+      Count=0
+    Prop=AttachedTo
+      PropType=Property
+      PascalType=TFPgtkWidget
+      GtkName=attach_widget
+      ReadConvert
+      WriteProcType=Proc
+      WriteCode=begin,"  AttachToWidget (TheValue, nil);",end;
+      Count=0
+    Prop=AccelGroup
+      PropType=Property
+      PascalType=PGtkAccelGroup
+      GtkName=ensure_uline_accel_group
+      ReadFuncType=GtkMacro
+      WriteGtkName=accel_group
+      Count=0
+  Object=Packer
+    Inherit=Container
+    GtkFuncName=packer
+    CreateObject
+    Count=10
+    Prop=Add
+      PropType=Procedure
+      Code=begin,"  gtk_packer_add_defaults (TheGtkObject, Child.TheGtkWidget, Side, anchor, options);","  Child.Show;",end;
+      Overload
+      Count=4
+      Param=Child
+        PascalType=TFPgtkWidget
+      Param=Side
+        PascalType=TGtkSideType
+      Param=Anchor
+        PascalType=TGtkAnchorType
+      Param=options
+        PascalType=TGtkPackerOptions
+    Prop=Add
+      PropType=Procedure
+      Code=begin,"  gtk_packer_add_defaults (TheGtkObject, Child.TheGtkWidget, Side, anchor, options);","  if aVisible then","    Child.Show;",end;
+      Overload
+      Count=5
+      Param=Child
+        PascalType=TFPgtkWidget
+      Param=Side
+        PascalType=TGtkSideType
+      Param=Anchor
+        PascalType=TGtkAnchorType
+      Param=options
+        PascalType=TGtkPackerOptions
+      Param=aVisible
+        PascalType=boolean
+    Prop=Add
+      PropType=Procedure
+      Code=begin,"  gtk_packer_add (TheGtkObject, Child.TheGtkWidget, Side, anchor, options, aborder, padX, PadY, IPadX, IPadY);","  Child.Show;",end;
+      Overload
+      Count=9
+      Param=Child
+        PascalType=TFPgtkWidget
+      Param=Side
+        PascalType=TGtkSideType
+      Param=Anchor
+        PascalType=TGtkAnchorType
+      Param=options
+        PascalType=TGtkPackerOptions
+      Param=aBorder
+        PascalType=guint
+      Param=PadX
+        PascalType=Guint
+      Param=PadY
+        PascalType=guint
+      Param=IPadX
+        PascalType=guint
+      Param=IPadY
+        PascalType=guint
+    Prop=Add
+      PropType=Procedure
+      Code=begin,"  gtk_packer_add (TheGtkObject, Child.TheGtkWidget, Side, anchor, options, aborder, padX, PadY, IPadX, IPadY);","  if aVisible then","    Child.Show;",end;
+      Overload
+      Count=10
+      Param=Child
+        PascalType=TFPgtkWidget
+      Param=Side
+        PascalType=TGtkSideType
+      Param=Anchor
+        PascalType=TGtkAnchorType
+      Param=options
+        PascalType=TGtkPackerOptions
+      Param=aBorder
+        PascalType=guint
+      Param=PadX
+        PascalType=Guint
+      Param=PadY
+        PascalType=guint
+      Param=IPadX
+        PascalType=guint
+      Param=IPadY
+        PascalType=guint
+      Param=aVisible
+        PascalType=boolean
+    Prop=ReorderChild
+      PropType=Procedure
+      GtkName=reorder_child
+      Count=2
+      Param=aChild
+        Convert
+        PascalType=TFPgtkWidget
+      Param=position
+        PascalType=integer
+    Prop=Spacing
+      PropType=Property
+      PascalType=guint
+      GtkName=spacing
+      ReadFuncType=ObjField
+      WriteGtkName=spacing
+      Count=0
+    Prop=DefaultBorder
+      PropType=Procedure
+      PascalType=guint
+      GtkName=set_default_border_width
+      WriteGtkName=border_width
+      Count=1
+      Param=aBorder
+        PascalType=guint
+    Prop=DefaultPad
+      PropType=Procedure
+      PascalType=guint
+      GtkName=set_default_pad
+      WriteGtkName=border_width
+      Count=2
+      Param=PadX
+        PascalType=guint
+      Param=PadY
+        PascalType=guint
+    Prop=DefaultIPad
+      PropType=Procedure
+      PascalType=guint
+      GtkName=set_default_ipad
+      WriteGtkName=border_width
+      Count=2
+      Param=IPadX
+        PascalType=guint
+      Param=IPadY
+        PascalType=guint
+    Prop=Configure
+      PropType=Procedure
+      GtkName=set_child_packing
+      Overload
+      Count=9
+      Param=aChild
+        Convert
+        PascalType=TFPgtkWidget
+      Param=Side
+        PascalType=TGtkSideType
+      Param=Anchor
+        PascalType=TGtkAnchorType
+      Param=options
+        PascalType=TGtkPackerOptions
+      Param=aBorder
+        PascalType=guint
+      Param=PadX
+        PascalType=Guint
+      Param=PadY
+        PascalType=guint
+      Param=IPadX
+        PascalType=guint
+      Param=IPadY
+        PascalType=guint
+  Object=Table
+    Inherit=Container
+    GtkFuncName=table
+    CreateParams=1,1,False
+    CreateObject
+    Count=13
+    Prop=Create
+      PropType=Constructor
+      Code=begin,"  inherited create;","  resize (AColumns, ARows);",end;
+      Count=2
+      Param=AColumns
+        PascalType=integer
+      Param=ARows
+        PascalType=integer
+    Prop=Resize
+      PropType=Procedure
+      Code=begin,"  gtk_table_resize (TheGtkObject, ARows, AColumns);",end;
+      Count=2
+      Param=AColumns
+        PascalType=integer
+      Param=ARows
+        PascalType=integer
+    Prop=Attach
+      PropType=Procedure
+      Code=begin,"  gtk_table_attach (TheGtkObject, ConvertToGtkWidget(Widget), left, right, top, bottom,","                    XOptions, YOptions, XPadding, YPadding);","  if isvisible then","    widget.Show;",end;
+      Count=10
+      Param=Widget
+        PascalType=TFPgtkWidget
+      Param=left
+        PascalType=integer
+      Param=right
+        PascalType=integer
+      Param=top
+        PascalType=integer
+      Param=bottom
+        PascalType=integer
+      Param=XOptions
+        PascalType=integer
+      Param=YOptions
+        PascalType=integer
+      Param=XPadding
+        PascalType=integer
+      Param=YPadding
+        PascalType=integer
+      Param=IsVisible
+        PascalType=boolean
+    Prop=Attach
+      PropType=Procedure
+      Code=begin,"  gtk_table_attach (TheGtkObject, ConvertTogtkWidget(Widget), left, right, top, bottom,","                    XOptions, YOptions, XPadding, YPadding);","  widget.Show;",end;
+      Count=9
+      Param=Widget
+        PascalType=TFPgtkWidget
+      Param=left
+        PascalType=integer
+      Param=right
+        PascalType=integer
+      Param=top
+        PascalType=integer
+      Param=bottom
+        PascalType=integer
+      Param=XOptions
+        PascalType=integer
+      Param=YOptions
+        PascalType=integer
+      Param=XPadding
+        PascalType=integer
+      Param=YPadding
+        PascalType=integer
+    Prop=Attach
+      PropType=Procedure
+      Code=begin,"  gtk_table_attach_defaults (TheGtkObject, ConvertTogtkWidget(Widget), left, right, top, bottom);","  if isvisible then","    widget.Show;",end;
+      Count=6
+      Param=Widget
+        PascalType=TFPgtkWidget
+      Param=left
+        PascalType=integer
+      Param=right
+        PascalType=integer
+      Param=top
+        PascalType=integer
+      Param=bottom
+        PascalType=integer
+      Param=IsVisible
+        PascalType=boolean
+    Prop=Attach
+      PropType=Procedure
+      Code=begin,"  gtk_table_attach_defaults (TheGtkObject, ConvertTogtkWidget(Widget), left, right, top, bottom);","  widget.Show;",end;
+      Count=5
+      Param=Widget
+        PascalType=TFPgtkWidget
+      Param=left
+        PascalType=integer
+      Param=right
+        PascalType=integer
+      Param=top
+        PascalType=integer
+      Param=bottom
+        PascalType=integer
+    Prop=RowCount
+      PropType=Property
+      PascalType=integer
+      GtkName=nrows
+      ReadFuncType=ObjField
+      WriteProcType=NotImplemented
+      Count=0
+    Prop=ColCount
+      PropType=Property
+      PascalType=integer
+      GtkName=ncols
+      ReadFuncType=ObjField
+      WriteProcType=NotImplemented
+      Count=0
+    Prop=Homogeneous
+      PropType=Property
+      PascalType=boolean
+      GtkName=homogeneous
+      ReadConvert
+      ReadFuncType=ObjFunc
+      WriteGtkName=homogeneous
+      Count=0
+    Prop=RowSpacings
+      PropType=Property
+      PascalType=integer
+      GtkName=column_spacing
+      ReadFuncType=ObjField
+      WriteGtkName=row_spacings
+      Count=0
+    Prop=ColSpacings
+      PropType=Property
+      PascalType=integer
+      GtkName=row_spacing
+      ReadFuncType=ObjField
+      WriteGtkName=col_spacings
+      Count=0
+    Prop=SetOneRowSpacing
+      PropType=Procedure
+      GtkName=set_row_spacing
+      Count=2
+      Param=row
+        PascalType=integer
+      Param=TheValue
+        PascalType=integer
+    Prop=SetOneColSpacing
+      PropType=Procedure
+      GtkName=set_col_spacing
+      Count=2
+      Param=Column
+        PascalType=integer
+      Param=TheValue
+        PascalType=integer
+  Object=Toolbar
+    Inherit=Container
+    GtkFuncName=toolbar
+    CreateParams=GTK_ORIENTATION_HORIZONTAL,GTK_TOOLBAR_BOTH
+    CreateObject
+    Count=22
+    Prop=ButtonRelief
+      PropType=Property
+      PascalType=TGtkReliefStyle
+      GtkName=button_relief
+      WriteGtkName=button_relief
+      Count=0
+    Prop=Tooltips
+      PropType=Property
+      PascalType=TFPgtkTooltips
+      GtkName=tooltips
+      ReadConvert
+      ReadFuncType=ObjField
+      WriteProcType=NotImplemented
+      Count=0
+    Prop=EnableTooltips
+      PropType=Property
+      PascalType=longbool
+      Code=begin,"  result := tooltips.enabled;",end;
+      ReadFuncType=Proc
+      WriteGtkName=tooltips
+      WriteConvert
+      Count=0
+    Prop=SpaceStyle
+      PropType=Property
+      PascalType=TGtkToolbarSpaceStyle
+      GtkName=space_style
+      ReadFuncType=ObjField
+      WriteGtkName=space_style
+      Count=0
+    Prop=SpaceSize
+      PropType=Property
+      PascalType=integer
+      GtkName=space_size
+      ReadFuncType=ObjField
+      WriteGtkName=space_size
+      Count=0
+    Prop=Style
+      PropType=Property
+      PascalType=TGtkToolbarStyle
+      GtkName=style
+      ReadFuncType=ObjField
+      WriteGtkName=style
+      Count=0
+    Prop=Orientation
+      PropType=Property
+      PascalType=tGtkOrientation
+      GtkName=orientation
+      ReadFuncType=ObjField
+      WriteGtkName=orientation
+      Count=0
+    Prop=InsertWidget
+      PropType=Procedure
+      Code=begin,"  gtk_toolbar_insert_widget (TheGtkObject, ConvertToGtkWidget(Widget), ConvertToPgchar(TooltipText), ConvertTopgchar(TooltipPrivate), Position);","  Widget.Show;",end;
+      Count=4
+      Param=Widget
+        Convert
+        PascalType=TFPgtkWidget
+      Param=TooltipText
+        Convert
+        PascalType=string
+      Param=TooltipPrivate
+        Convert
+        PascalType=string
+      Param=Position
+        PascalType=integer
+    Prop=PrependWidget
+      PropType=Procedure
+      Code=begin,"  gtk_toolbar_prepend_widget (TheGtkObject, ConvertToGtkWidget(Widget), ConvertTopgchar(TooltipText), ConvertTopgchar(TooltipPrivate));","  Widget.Show;",end;
+      Count=3
+      Param=Widget
+        Convert
+        PascalType=TFPgtkWidget
+      Param=TooltipText
+        Convert
+        PascalType=string
+      Param=TooltipPrivate
+        Convert
+        PascalType=string
+    Prop=AppendWidget
+      PropType=Procedure
+      Code=begin,"  gtk_toolbar_append_widget (TheGtkObject, ConvertToGtkWidget(Widget), ConvertTopgchar(TooltipText), ConvertTopgchar(TooltipPrivate));","  Widget.Show;",end;
+      Count=3
+      Param=Widget
+        Convert
+        PascalType=TFPgtkWidget
+      Param=TooltipText
+        Convert
+        PascalType=string
+      Param=TooltipPrivate
+        Convert
+        PascalType=string
+    Prop=InsertElement
+      PropType=Function
+      PascalType=TFPgtkWidget
+      Code="var w : PGtkWidget;","    t : TFPgtkObjectClass;",begin,"  w := gtk_toolbar_insert_element (TheGtkObject, ButtonType, ","           ConvertToGtkwidget(PrevRadioBut), ConvertTopgchar(Text), ","           ConvertTopgchar(TooltipText), ConvertTopgchar(TooltipPrivate), ","           ConvertToGtkwidget(Icon), ","           gtk_signal_func(@SignalProc), ","           ConvertSignalData(TFPgtkSignalFunction(callback), data, true), ","           position);","  if assigned (w) then","    begin","    case ButtonType of","      GTK_TOOLBAR_CHILD_WIDGET:","        t := TFPgtkWidget;","      GTK_TOOLBAR_CHILD_BUTTON:","        t := TFPgtkButton;","      GTK_TOOLBAR_CHILD_TOGGLEBUTTON:","        t := TFPgtkToggleButton;","      GTK_TOOLBAR_CHILD_RADIOBUTTON:","        t := TFPgtkRadioButton;","    end;","    if t = TFPgtkWidget then","      result := GetPascalInstance (w)","    else","      result := GetPascalInstance (w, t);","    end","  else","    result := nil;",end;
+      Count=9
+      Param=ButtonType
+        PascalType=TGtkToolbarChildType
+      Param=PrevRadioBut
+        Convert
+        PascalType=TFPgtkWidget
+      Param=Text
+        Convert
+        PascalType=string
+      Param=TooltipText
+        Convert
+        PascalType=string
+      Param=TooltipPrivate
+        Convert
+        PascalType=string
+      Param=Icon
+        Convert
+        PascalType=TFPgtkWidget
+      Param=CallBack
+        Convert
+        PascalType=TFPgtkSignalFunction
+      Param=data
+        PascalType=pointer
+      Param=position
+        PascalType=integer
+    Prop=AppendElement
+      PropType=Function
+      PascalType=TFPgtkWidget
+      Code="var w : PGtkWidget;","    t : TFPgtkObjectClass;",begin,"  w := gtk_toolbar_append_element (TheGtkObject, ButtonType, ConvertToGtkwidget(PrevRadioBut), ","          ConvertTopgchar(Text), ConvertTopgchar(TooltipText), ConvertTopgchar(TooltipPrivate), ","          ConvertToGtkwidget(Icon), gtk_signal_func(@SignalProc), ","          ConvertSignalData(TFPgtkSignalFunction(callback), data, true));","  if assigned (w) then","    begin","    case ButtonType of","      GTK_TOOLBAR_CHILD_WIDGET:","        t := TFPgtkWidget;","      GTK_TOOLBAR_CHILD_BUTTON:","        t := TFPgtkButton;","      GTK_TOOLBAR_CHILD_TOGGLEBUTTON:","        t := TFPgtkToggleButton;","      GTK_TOOLBAR_CHILD_RADIOBUTTON:","        t := TFPgtkRadioButton;","    end;","    if t = TFPgtkWidget then","      result := GetPascalInstance (w)","    else","      result := GetPascalInstance (w, t);","    end","  else","    result := nil;",end;
+      Count=8
+      Param=ButtonType
+        PascalType=TGtkToolbarChildType
+      Param=PrevRadioBut
+        Convert
+        PascalType=TFPgtkWidget
+      Param=Text
+        Convert
+        PascalType=string
+      Param=TooltipText
+        Convert
+        PascalType=string
+      Param=TooltipPrivate
+        Convert
+        PascalType=string
+      Param=Icon
+        Convert
+        PascalType=TFPgtkWidget
+      Param=CallBack
+        Convert
+        PascalType=TFPgtkSignalFunction
+      Param=data
+        PascalType=pointer
+    Prop=PrependElement
+      PropType=Function
+      PascalType=TFPgtkWidget
+      Code="var w : PGtkWidget;","    t : TFPgtkObjectClass;",begin,"  w := gtk_toolbar_prepend_element (TheGtkObject, ButtonType, ConvertToGtkwidget(PrevRadioBut), ","          ConvertTopgchar(Text), ConvertTopgchar(TooltipText), ConvertTopgchar(TooltipPrivate), ","          ConvertToGtkwidget(Icon), gtk_signal_func(@SignalProc), ","          ConvertSignalData(TFPgtkSignalFunction(callback), data, true));","  if assigned (w) then","    begin","    case ButtonType of","      GTK_TOOLBAR_CHILD_WIDGET:","        t := TFPgtkWidget;","      GTK_TOOLBAR_CHILD_BUTTON:","        t := TFPgtkButton;","      GTK_TOOLBAR_CHILD_TOGGLEBUTTON:","        t := TFPgtkToggleButton;","      GTK_TOOLBAR_CHILD_RADIOBUTTON:","        t := TFPgtkRadioButton;","    end;","    if t = TFPgtkWidget then","      result := GetPascalInstance (w)","    else","      result := GetPascalInstance (w, t);","    end","  else","    result := nil;",end;
+      Count=8
+      Param=ButtonType
+        PascalType=TGtkToolbarChildType
+      Param=PrevRadioBut
+        Convert
+        PascalType=TFPgtkWidget
+      Param=Text
+        Convert
+        PascalType=string
+      Param=TooltipText
+        Convert
+        PascalType=string
+      Param=TooltipPrivate
+        Convert
+        PascalType=string
+      Param=Icon
+        Convert
+        PascalType=TFPgtkWidget
+      Param=CallBack
+        Convert
+        PascalType=TFPgtkSignalFunction
+      Param=data
+        PascalType=pointer
+    Prop=InsertItem
+      PropType=Function
+      PascalType=TFPgtkWidget
+      Code=begin,"  result := GetPascalInstance (","      gtk_toolbar_insert_item (TheGtkObject, ConvertTopgchar(Text), ConvertTopgchar(TooltipText), ConvertTopgchar(TooltipPrivate), ConvertToGtkWidget(Icon), ","              gtk_signal_func(@SignalProc), ConvertSignalData(TFPgtkSignalFunction(callback), data, true), position),","      TFPgtkButton);",end;
+      Overload
+      Count=7
+      Param=Text
+        Convert
+        PascalType=string
+      Param=TooltipText
+        Convert
+        PascalType=string
+      Param=TooltipPrivate
+        Convert
+        PascalType=string
+      Param=Icon
+        Convert
+        PascalType=TFPgtkWidget
+      Param=CallBack
+        Convert
+        PascalType=TFPgtkSignalFunction
+      Param=data
+        PascalType=pointer
+      Param=position
+        PascalType=integer
+    Prop=AppendItem
+      PropType=Function
+      PascalType=TFPgtkWidget
+      Code=begin,"  result := GetPascalInstance (","      gtk_toolbar_append_item (TheGtkObject, ConvertTopgchar(Text), ConvertTopgchar(TooltipText), ConvertTopgchar(TooltipPrivate), ","              ConvertToGtkWidget(Icon), gtk_signal_func(@SignalProc), ConvertSignalData(TFPgtkSignalFunction(callback), data, true)),","      TFPgtkButton);",end;
+      Overload
+      Count=6
+      Param=Text
+        Convert
+        PascalType=string
+      Param=TooltipText
+        Convert
+        PascalType=string
+      Param=TooltipPrivate
+        Convert
+        PascalType=string
+      Param=Icon
+        Convert
+        PascalType=TFPgtkWidget
+      Param=CallBack
+        Convert
+        PascalType=TFPgtkSignalFunction
+      Param=data
+        PascalType=pointer
+    Prop=PrependItem
+      PropType=Function
+      PascalType=TFPgtkWidget
+      Code=begin,"  result := GetPascalInstance (","      gtk_toolbar_prepend_item (TheGtkObject, Converttopgchar(Text), Converttopgchar(TooltipText), ","              Converttopgchar(TooltipPrivate), ConvertToGtkWidget(Icon), gtk_signal_func(@SignalProc), ","              ConvertSignalData(TFPgtkSignalFunction(callback), data, true)), ","      TFPgtkButton);",end;
+      Overload
+      Count=6
+      Param=Text
+        Convert
+        PascalType=string
+      Param=TooltipText
+        Convert
+        PascalType=string
+      Param=TooltipPrivate
+        Convert
+        PascalType=string
+      Param=Icon
+        Convert
+        PascalType=TFPgtkWidget
+      Param=CallBack
+        Convert
+        PascalType=TFPgtkSignalFunction
+      Param=data
+        PascalType=pointer
+    Prop=InsertItem
+      PropType=Function
+      PascalType=TFPgtkWidget
+      Code="var pm : TFPgtkPixmap;",begin,"  if low(icon) < high(icon) then","    begin","    pm := TFPgtkPixmap.Create;","    pm.loadFromArray (icon);","    end","  else","    pm := nil;","  result := GetPascalInstance (","      gtk_toolbar_insert_item (TheGtkObject, ConvertTopgchar(Text), ConvertTopgchar(TooltipText), ConvertTopgchar(TooltipPrivate), ConvertToGtkWidget(pm), ","              gtk_signal_func(@SignalProc), ConvertSignalData(TFPgtkSignalFunction(callback), data, true), position),","      TFPgtkButton);",end;
+      Overload
+      Count=7
+      Param=Text
+        Convert
+        PascalType=string
+      Param=TooltipText
+        Convert
+        PascalType=string
+      Param=TooltipPrivate
+        Convert
+        PascalType=string
+      Param=Icon
+        Convert
+        PascalType=array of string
+      Param=CallBack
+        Convert
+        PascalType=TFPgtkSignalFunction
+      Param=data
+        PascalType=pointer
+      Param=position
+        PascalType=integer
+    Prop=AppendItem
+      PropType=Function
+      PascalType=TFPgtkWidget
+      Code="var pm : TFPgtkPixmap;",begin,"  if low(icon) < high(icon) then","    begin","    pm := TFPgtkPixmap.Create;","    pm.loadFromArray (icon);","    end","  else","    pm := nil;","  result := GetPascalInstance (","      gtk_toolbar_append_item (TheGtkObject, ConvertTopgchar(Text), ConvertTopgchar(TooltipText), ConvertTopgchar(TooltipPrivate), ","              ConvertToGtkWidget(pm), gtk_signal_func(@SignalProc), ConvertSignalData(TFPgtkSignalFunction(callback), data, true)),","      TFPgtkButton);",end;
+      Overload
+      Count=6
+      Param=Text
+        Convert
+        PascalType=string
+      Param=TooltipText
+        Convert
+        PascalType=string
+      Param=TooltipPrivate
+        Convert
+        PascalType=string
+      Param=Icon
+        Convert
+        PascalType=array of string
+      Param=CallBack
+        Convert
+        PascalType=TFPgtkSignalFunction
+      Param=data
+        PascalType=pointer
+    Prop=PrependItem
+      PropType=Function
+      PascalType=TFPgtkWidget
+      Code="var pm : TFPgtkPixmap;",begin,"  if low(icon) < high(icon) then","    begin","    pm := TFPgtkPixmap.Create;","    pm.loadFromArray (icon);","    end","  else","    pm := nil;","  result := GetPascalInstance (","      gtk_toolbar_prepend_item (TheGtkObject, Converttopgchar(Text), Converttopgchar(TooltipText), ","              Converttopgchar(TooltipPrivate), ConvertToGtkWidget(pm), gtk_signal_func(@SignalProc), ","              ConvertSignalData(TFPgtkSignalFunction(callback), data, true)), ","      TFPgtkButton);",end;
+      Overload
+      Count=6
+      Param=Text
+        Convert
+        PascalType=string
+      Param=TooltipText
+        Convert
+        PascalType=string
+      Param=TooltipPrivate
+        Convert
+        PascalType=string
+      Param=Icon
+        Convert
+        PascalType=array of string
+      Param=CallBack
+        Convert
+        PascalType=TFPgtkSignalFunction
+      Param=data
+        PascalType=pointer
+    Prop=InsertSpace
+      PropType=Procedure
+      GtkName=insert_space
+      Count=1
+      Param=position
+        PascalType=integer
+    Prop=AppendSpace
+      PropType=Procedure
+      GtkName=append_space
+      Count=0
+    Prop=PrependSpace
+      PropType=Procedure
+      GtkName=prepend_space
+      Count=0
+  Object=Tree
+    Inherit=Container
+    GtkFuncName=tree
+    CreateObject
+    Count=20
+    Prop=SelectionChanged
+      PropType=Signal
+      PascalType=Signal
+      GtkName=selection-changed
+      Count=0
+    Prop=SelectChild
+      PropType=Signal
+      PascalType=WidgetSignal
+      GtkName=select-child
+      Count=0
+    Prop=UnselectChild
+      PropType=Signal
+      PascalType=WidgetSignal
+      GtkName=unselect-child
+      Count=0
+    Prop=SelectionMode
+      PropType=Property
+      PascalType=TGtkSelectionMode
+      GtkName=selection_mode
+      ReadFuncType=ObjFunc
+      WriteGtkName=selection_mode
+      Count=0
+    Prop=ViewLines
+      PropType=Property
+      PascalType=boolean
+      GtkName=view_line
+      ReadConvert
+      ReadFuncType=ObjFunc
+      WriteProcType=Proc
+      WriteCode=begin,"  gtk_tree_set_view_lines(TheGtkObject,guint(TheValue));",end;
+      WriteConvert
+      Count=0
+    Prop=ViewMode
+      PropType=Property
+      PascalType=TGtkTreeViewMode
+      GtkName=view_mode
+      ReadFuncType=ObjFunc
+      WriteGtkName=view_mode
+      Count=0
+    Prop=Append
+      PropType=Procedure
+      Code=begin,"  gtk_tree_append (TheGtkObject, PGtkwidget(ConvertToGtkObject(TreeItem)));","  TreeItem.Show;",end;
+      Count=1
+      Param=TreeItem
+        Convert
+        PascalType=TFPgtkWidget
+    Prop=Prepend
+      PropType=Procedure
+      Code=begin,"  gtk_tree_prepend (TheGtkObject, PGtkwidget(ConvertToGtkObject(TreeItem)));","  TreeItem.Show;",end;
+      Count=1
+      Param=TreeItem
+        Convert
+        PascalType=TFPgtkWidget
+    Prop=Insert
+      PropType=Procedure
+      Code=begin,"  gtk_tree_insert (TheGtkObject, PGtkwidget(ConvertToGtkObject(TreeItem)),position);","  TreeItem.show;",end;
+      Count=2
+      Param=TreeItem
+        Convert
+        PascalType=TFPgtkWidget
+      Param=position
+        PascalType=integer
+    Prop=Remove
+      PropType=Procedure
+      Code="var l : PGList;",begin,"{$ifndef win32}","  gtk_tree_remove_item (TheGtkObject, ConvertToGtkWidget(TreeItem));",{$else},"  l := null;","  l := g_list_append (l, ConvertToGtkWidget(TreeItem));","  gtk_tree_remove_items (TheGtkObject, l);","  g_list_free (l);",{$endif},end;
+      Count=1
+      Param=TreeItem
+        Convert
+        PascalType=TFPgtkWidget
+    Prop=ClearItems
+      PropType=Procedure
+      GtkName=clear_items
+      Count=2
+      Param=StartPos
+        PascalType=integer
+      Param=EndPos
+        PascalType=integer
+    Prop=SelectItem
+      PropType=Procedure
+      GtkName=select_item
+      Count=1
+      Param=Item
+        Convert
+        PascalType=integer
+    Prop=UnselectItem
+      PropType=Procedure
+      GtkName=unselect_item
+      Count=1
+      Param=Item
+        PascalType=integer
+    Prop=SelectChild
+      PropType=Procedure
+      GtkName=select_child
+      Count=1
+      Param=TreeItem
+        Convert
+        PascalType=TFPgtkWidget
+    Prop=UnselectChild
+      PropType=Procedure
+      GtkName=unselect_child
+      Count=1
+      Param=TreeItem
+        Convert
+        PascalType=TFPgtkWidget
+    Prop=ChildPosition
+      PropType=Function
+      PascalType=integer
+      GtkName=child_position
+      Count=1
+      Param=TreeItem
+        Convert
+        PascalType=TFPgtkWidget
+    Prop=RootTree
+      PropType=Function
+      PascalType=TFPgtkTree
+      Code=begin,"  result := GetPascalInstance(PGtkObject(GTK_TREE_ROOT_TREE(TheGtkObject))) as TFPgtkTree;",end;
+      Count=0
+    Prop=IsRootTree
+      PropType=Function
+      PascalType=boolean
+      Code=begin,"  result := GTK_IS_ROOT_TREE (TheGtkObject);",end;
+      Count=0
+    Prop=GetSelection
+      PropType=Procedure
+      PascalType=TFPgtkTreeItemGroup
+      Code=begin,"  aGroup.ManageLists := false;","  aGroup.GtkList := Gtk_Tree_selection (TheGtkObject);",end;
+      Count=1
+      Param=aGroup
+        PascalType=TFPgtkGroup
+    Prop=Level
+      PropType=Function
+      PascalType=integer
+      Code=begin,"  result := TheGtkObject^.level;",end;
+      Count=0
+  Object=Calendar
+    Inherit=Widget
+    GtkFuncName=calendar
+    CreateObject
+    Count=16
+    Prop=SelectMonth
+      PropType=Function
+      PascalType=integer
+      Code=begin,"  result := gtk_calendar_select_month (TheGtkObject, aMonth-1, aYear);",end;
+      Count=2
+      Param=aMonth
+        PascalType=guint
+      Param=aYear
+        PascalType=guint
+    Prop=SelectDay
+      PropType=Procedure
+      GtkName=select_day
+      Count=1
+      Param=aDay
+        PascalType=guint
+    Prop=MarkDay
+      PropType=Function
+      PascalType=integer
+      GtkName=mark_day
+      Count=1
+      Param=aDay
+        PascalType=guint
+    Prop=UnmarkDay
+      PropType=Function
+      PascalType=integer
+      GtkName=unmark_day
+      Count=1
+      Param=aDay
+        PascalType=guint
+    Prop=ClearMarks
+      PropType=Procedure
+      GtkName=clear_marks
+      Count=0
+    Prop=DisplayOptions
+      PropType=Property
+      PascalType=TGtkCalendarDisplayOptions
+      GtkName=display_flags
+      ReadFuncType=ObjField
+      WriteProcType=GtkMacro
+      WriteGtkName=display_options
+      Count=0
+    Prop=Date
+      PropType=Property
+      PascalType=TDatetime
+      Code="var y, m, d : guint;",begin,"  gtk_calendar_get_date (TheGtkObject, @y, @m, @d);","  result := encodedate (y,m+1,d);",end;
+      ReadFuncType=Proc
+      WriteProcType=Proc
+      WriteCode="var y,m,d : word;",begin,"  decodedate (TheValue, y,m,d);","  SelectMonth(m,y);","  SelectDay(d);",end;
+      Count=0
+    Prop=Freeze
+      PropType=Procedure
+      GtkName=freeze
+      Count=0
+    Prop=Thaw
+      PropType=Procedure
+      GtkName=thaw
+      Count=0
+    Prop=MonthChanged
+      PropType=Signal
+      PascalType=signal
+      GtkName=month-changed
+      Count=0
+    Prop=DaySelected
+      PropType=Signal
+      PascalType=signal
+      GtkName=day-selected
+      Count=0
+    Prop=DaySelectedDoubleClick
+      PropType=Signal
+      PascalType=signal
+      GtkName=day-selected-double-click
+      Count=0
+    Prop=PrevMonth
+      PropType=Signal
+      PascalType=signal
+      GtkName=prev-month
+      Count=0
+    Prop=NextMonth
+      PropType=Signal
+      PascalType=signal
+      GtkName=next-month
+      Count=0
+    Prop=PrevYear
+      PropType=Signal
+      PascalType=signal
+      GtkName=prev-year
+      Count=0
+    Prop=NextYear
+      PropType=Signal
+      PascalType=signal
+      GtkName=next-year
+      Count=0
+  Object=DrawingArea
+    Inherit=Widget
+    GtkFuncName=drawing_area
+    CreateObject
+    Count=1
+    Prop=SetSize
+      PropType=Procedure
+      GtkName=Size
+      Count=2
+      Param=Width
+        PascalType=integer
+      Param=Height
+        PascalType=integer
+  Object=Curve
+    Inherit=DrawingArea
+    GtkFuncName=curve
+    CreateObject
+    Count=4
+    Prop=SetRange
+      PropType=Procedure
+      GtkName=set_range
+      Count=4
+      Param=MinX
+        PascalType=float
+      Param=MaxX
+        PascalType=float
+      Param=MinY
+        PascalType=float
+      Param=MaxY
+        PascalType=float
+    Prop=Reset
+      PropType=Procedure
+      GtkName=reset
+      Count=0
+    Prop=SetGamma
+      PropType=Procedure
+      GtkName=set_gamma
+      Count=1
+      Param=GammaValue
+        PascalType=float
+    Prop=CurveType
+      PropType=Property
+      PascalType=TGtkCurveType
+      GtkName=curve_type
+      ReadFuncType=ObjField
+      WriteGtkName=curve_type
+      Count=0
+  Object=Editable
+    Inherit=Widget
+    GtkFuncName=Editable
+    Count=45
+    Prop=GetHasSelection
+      PropType=Function
+      Section=Protected
+      PascalType=boolean
+      Code=begin,"  result := SelectionStart <> SelectionEnd;",end;
+      Dynamic
+      Count=0
+    Prop=HasSelection
+      PropType=Property
+      PascalType=boolean
+      GtkName=GetHasSelection
+      ReadConvert
+      ReadFuncType=ExistingProc
+      WriteProcType=NotImplemented
+      WriteConvert
+      Count=0
+    Prop=Editable
+      PropType=Property
+      PascalType=boolean
+      GtkName=editable
+      ReadConvert
+      ReadFuncType=ObjFunc
+      WriteGtkName=editable
+      Count=0
+    Prop=Visible
+      PropType=Property
+      PascalType=boolean
+      GtkName=visible
+      ReadConvert
+      ReadFuncType=ObjFunc
+      WriteProcType=ObjFunc
+      WriteGtkName=visible
+      WriteConvert
+      Count=0
+    Prop=Position
+      PropType=Property
+      PascalType=integer
+      GtkName=position
+      WriteGtkName=position
+      Count=0
+    Prop=SelectionStart
+      PropType=Property
+      PascalType=integer
+      GtkName=selection_start_pos
+      ReadFuncType=ObjField
+      WriteProcType=Proc
+      WriteCode=begin,"  gtk_editable_select_region (TheGtkObject, TheValue, SelectionEnd);",end;
+      Count=0
+    Prop=SelectionEnd
+      PropType=Property
+      PascalType=integer
+      GtkName=Selection_end_pos
+      ReadFuncType=ObjField
+      WriteProcType=Proc
+      WriteCode=begin,"  gtk_editable_select_region (TheGtkObject, SelectionStart, TheValue);",end;
+      Count=0
+    Prop=SetSelection
+      PropType=Procedure
+      Section=Protected
+      Code="var b : integer;",begin,"  if HasSelection then","    begin","    b := SelectionStart;","    deleteText (SelectionStart, SelectionEnd);","    end","  else","    b := position;","  InsertText (TheValue, b);","  Position := b + length(TheValue);","  SelectRegion (b, position);","end;  "
+      Dynamic
+      Count=1
+      Param=TheValue
+        PascalType=string
+    Prop=Selection
+      PropType=Property
+      PascalType=string
+      Code="var c : pgchar;",begin,"  c := gtk_editable_get_chars (TheGtkObject, SelectionStart, SelectionEnd);","  result := string (c);","  g_free (c);",end;
+      ReadFuncType=Proc
+      WriteProcType=ExistingProc
+      WriteGtkName=SetSelection
+      Count=0
+    Prop=GetText
+      PropType=Function
+      Section=Protected
+      PascalType=string
+      Code="var c : pgchar;",begin,"  c := gtk_editable_get_chars (TheGtkObject, 0, -1);","  result := string (c);","  g_free (c);",end;
+      Dynamic
+      Count=0
+    Prop=SetText
+      PropType=Procedure
+      Section=Protected
+      Dynamic
+      Abstract
+      Count=1
+      Param=TheValue
+        PascalType=string
+    Prop=Text
+      PropType=Property
+      PascalType=string
+      GtkName=GetText
+      ReadFuncType=ExistingProc
+      WriteProcType=ExistingProc
+      WriteGtkName=SetText
+      Count=0
+    Prop=Changed
+      PropType=Procedure
+      GtkName=Changed
+      Count=0
+    Prop=InsertText
+      PropType=Procedure
+      Code="var p : integer;",begin,"  p := AtPosition;","  gtk_editable_insert_text (TheGtkObject, pgchar(NewText), length(NewText), @p);",end;
+      Count=2
+      Param=NewText
+        PascalType=string
+      Param=AtPosition
+        PascalType=integer
+    Prop=DeleteText
+      PropType=Procedure
+      GtkName=Delete_Text
+      Count=2
+      Param=StartPos
+        PascalType=integer
+      Param=EndPos
+        PascalType=integer
+    Prop=GetChars
+      PropType=Procedure
+      PascalType=string
+      GtkName=get_chars
+      Count=2
+      Param=StartPos
+        PascalType=integer
+      Param=EndPos
+        PascalType=integer
+    Prop=CutClipboard
+      PropType=Procedure
+      GtkName=cut_clipboard
+      Count=0
+    Prop=CopyClipboard
+      PropType=Procedure
+      GtkName=copy_clipboard
+      Count=0
+    Prop=PasteClipboard
+      PropType=Procedure
+      GtkName=paste_clipboard
+      Count=0
+    Prop=SelectRegion
+      PropType=Procedure
+      GtkName=select_region
+      Count=2
+      Param=StartPos
+        PascalType=integer
+      Param=EndPos
+        PascalType=integer
+    Prop=ClaimSelection
+      PropType=Procedure
+      GtkName=claim_selection
+      Count=2
+      Param=claim
+        PascalType=boolean
+      Param=time
+        PascalType=guint32
+    Prop=DeleteSelection
+      PropType=Procedure
+      GtkName=delete_selection
+      Count=0
+    Prop=Clear
+      PropType=Procedure
+      Code=begin,"  DeleteText (0,-1);",end;
+      Count=0
+    Prop=InsertSignal
+      PropType=SignalType
+      Count=5
+      Param=Sender
+        PascalType=TFPgtkObject
+      Param=NewText
+        Convert
+        PascalType=string
+      Param=TextLength
+        PascalType=integer
+      Param=Position
+        PascalType=integer
+        ParamType=Var
+      Param=data
+        PascalType=pointer
+    Prop=DeleteSignal
+      PropType=SignalType
+      Count=4
+      Param=Sender
+        PascalType=TFPgtkObject
+      Param=StartPos
+        PascalType=integer
+      Param=EndPos
+        PascalType=integer
+      Param=data
+        PascalType=pointer
+    Prop=XYSignal
+      PropType=SignalType
+      Count=4
+      Param=Sender
+        PascalType=TFPgtkObject
+      Param=x
+        PascalType=integer
+      Param=y
+        PascalType=integer
+      Param=data
+        PascalType=pointer
+    Prop=DirectionSignal
+      PropType=SignalType
+      Count=3
+      Param=Sender
+        PascalType=TFPgtkObject
+      Param=Direction
+        PascalType=integer
+      Param=data
+        PascalType=pointer
+    Prop=MoveWordSignal
+      PropType=SignalType
+      Count=3
+      Param=Sender
+        PascalType=TFPgtkObject
+      Param=NumWords
+        PascalType=integer
+      Param=data
+        PascalType=pointer
+    Prop=MovetoSignal
+      PropType=SignalType
+      Count=3
+      Param=Sender
+        PascalType=TFPgtkObject
+      Param=MoveTo
+        PascalType=integer
+      Param=data
+        PascalType=pointer
+    Prop=Changed
+      PropType=Signal
+      PascalType=Signal
+      GtkName=changed
+      Count=0
+    Prop=Activate
+      PropType=Signal
+      PascalType=Signal
+      GtkName=activate
+      Count=0
+    Prop=InsertText
+      PropType=Signal
+      PascalType=InsertSignal
+      GtkName=insert-text
+      Count=0
+    Prop=DeleteText
+      PropType=Signal
+      PascalType=DeleteSignal
+      GtkName=delete-text
+      Count=0
+    Prop=SetEditable
+      PropType=Signal
+      PascalType=BooleanSignal
+      GtkName=set-editable
+      Count=0
+    Prop=MoveCursor
+      PropType=Signal
+      PascalType=XYSignal
+      GtkName=move-cursor
+      Count=0
+    Prop=MoveWord
+      PropType=Signal
+      PascalType=MoveWordSignal
+      GtkName=move-word
+      Count=0
+    Prop=MovePage
+      PropType=Signal
+      PascalType=XYSignal
+      GtkName=move-page
+      Count=0
+    Prop=MoveToRow
+      PropType=Signal
+      PascalType=MoveToSignal
+      GtkName=move-to-row
+      Count=0
+    Prop=MoveToCol
+      PropType=Signal
+      PascalType=MoveToSignal
+      GtkName=move-to-column
+      Count=0
+    Prop=KillChar
+      PropType=Signal
+      PascalType=DirectionSignal
+      GtkName=kill-char
+      Count=0
+    Prop=KillWord
+      PropType=Signal
+      PascalType=DirectionSignal
+      GtkName=kill-word
+      Count=0
+    Prop=KillLine
+      PropType=Signal
+      PascalType=DirectionSignal
+      GtkName=kill-line
+      Count=0
+    Prop=CutClipboard
+      PropType=Signal
+      PascalType=Signal
+      GtkName=cut-clipboard
+      Count=0
+    Prop=CopyClipboard
+      PropType=Signal
+      PascalType=Signal
+      GtkName=copy-clipboard
+      Count=0
+    Prop=PasteClipboard
+      PropType=Signal
+      PascalType=Signal
+      GtkName=paste-clipboard
+      Count=0
+  Object=Entry
+    Inherit=Editable
+    GtkFuncName=Entry
+    CreateObject
+    Count=5
+    Prop=SetText
+      PropType=Procedure
+      Section=Protected
+      Code=begin,"  gtk_Entry_set_text (TheGtkObject, Pgchar(TheValue));",end;
+      Override
+      Count=1
+      Param=TheValue
+        PascalType=string
+    Prop=AppendText
+      PropType=Procedure
+      GtkName=append_text
+      Count=1
+      Param=aText
+        Convert
+        PascalType=string
+    Prop=PrependText
+      PropType=Procedure
+      GtkName=prepend_text
+      Count=1
+      Param=aText
+        Convert
+        PascalType=string
+    Prop=Visibility
+      PropType=Property
+      PascalType=boolean
+      GtkName=visible
+      ReadConvert
+      ReadFuncType=ObjFunc
+      WriteGtkName=visibility
+      Count=0
+    Prop=MaxLength
+      PropType=Property
+      PascalType=word
+      GtkName=text_max_length
+      ReadFuncType=ObjField
+      WriteGtkName=max_length
+      Count=0
+  Object=SpinButton
+    Inherit=Entry
+    GtkFuncName=spin_button
+    CreateParams=TFPgtkAdjustment.Create.TheGtkObject,1,0
+    CreateObject
+    Count=13
+    Prop=Configure
+      PropType=Procedure
+      Code=begin,"  if assigned (Adj) then","    gtk_spin_button_configure (TheGtkObject, PGtkadjustment(Adj.TheGtkObject), aClimbRate, aDigits)","  else","    gtk_spin_button_configure (TheGtkObject, nil, aClimbRate, aDigits);",end;
+      Count=3
+      Param=Adj
+        Convert
+        PascalType=TFPgtkAdjustment
+      Param=aClimbRate
+        PascalType=gfloat
+      Param=aDigits
+        PascalType=integer
+    Prop=Adjustment
+      PropType=Property
+      PascalType=TFPgtkAdjustment
+      Code=begin,"  result := GetPascalInstance(PGtkObject(gtk_spin_button_get_adjustment(TheGtkObject)),TFPGtkAdjustment) as TFPgtkAdjustment;",end;
+      ReadConvert
+      ReadFuncType=Proc
+      WriteGtkName=adjustment
+      WriteConvert
+      Count=0
+    Prop=ClimbRate
+      PropType=Property
+      PascalType=gfloat
+      GtkName=climb_rate
+      ReadFuncType=ObjField
+      WriteProcType=ObjField
+      WriteGtkName=climb_rate
+      Count=0
+    Prop=Digits
+      PropType=Property
+      PascalType=integer
+      GtkName=digits
+      ReadFuncType=ObjFunc
+      WriteGtkName=digits
+      Count=0
+    Prop=AsInteger
+      PropType=Property
+      PascalType=integer
+      GtkName=value_as_int
+      WriteGtkName=Value
+      Count=0
+    Prop=AsFloat
+      PropType=Property
+      PascalType=gfloat
+      GtkName=value_as_int
+      WriteGtkName=Value
+      Count=0
+    Prop=UpdatePolicy
+      PropType=Property
+      PascalType=TGtkSpinButtonUpdatePolicy
+      GtkName=update_policy
+      ReadFuncType=ObjField
+      WriteGtkName=update_policy
+      Count=0
+    Prop=Numeric
+      PropType=Property
+      PascalType=boolean
+      GtkName=numeric
+      ReadConvert
+      ReadFuncType=ObjFunc
+      WriteGtkName=numeric
+      Count=0
+    Prop=Spin
+      PropType=Procedure
+      GtkName=spin
+      Count=2
+      Param=direction
+        PascalType=TGtkSpinType
+      Param=increment
+        PascalType=gfloat
+    Prop=Wrap
+      PropType=Property
+      PascalType=boolean
+      GtkName=wrap
+      ReadConvert
+      ReadFuncType=ObjFunc
+      WriteGtkName=wrap
+      Count=0
+    Prop=ShadowType
+      PropType=Property
+      PascalType=TGtkShadowType
+      GtkName=shadow_type
+      ReadFuncType=ObjField
+      WriteGtkName=shadow_type
+      Count=0
+    Prop=SnapToTicks
+      PropType=Property
+      PascalType=boolean
+      GtkName=snap_to_ticks
+      ReadConvert
+      ReadFuncType=ObjFunc
+      WriteGtkName=snap_to_ticks
+      Count=0
+    Prop=Update
+      PropType=Procedure
+      GtkName=update
+      Code=,
+      Count=0
+  Object=Text
+    Inherit=Editable
+    GtkFuncName=Text
+    CreateParams=null,null
+    CreateObject
+    Count=20
+    Prop=FIsChanged
+      PropType=Field
+      Section=Private
+      PascalType=boolean
+      Count=0
+    Prop=FLines
+      PropType=Field
+      Section=Private
+      PascalType=TStrings
+      Count=0
+    Prop=Create
+      PropType=Constructor
+      Code=begin,"  inherited create;","  editable := true;","  wordwrap := true;","  linewrap := true;","  FLines := TStringlist.Create;","  ConnectChanged (@SigChanged, nil);",end;
+      Count=0
+    Prop=Destroy
+      PropType=Destructor
+      Code=begin,"  FLines.Free;","  inherited;",end;
+      Override
+      Count=0
+    Prop=SigChanged
+      PropType=Procedure
+      Section=Private
+      Code=begin,"  FIsChanged := True;",end;
+      Count=2
+      Param=Sender
+        PascalType=TFPgtkObject
+      Param=data
+        PascalType=pointer
+    Prop=RefreshLines
+      PropType=Procedure
+      Section=Protected
+      Code=begin,"  if not assigned (FLines) then","    FLines := TStringlist.Create;","  FLines.Text := Text;",end;
+      Count=0
+    Prop=Lines
+      PropType=Property
+      PascalType=TStrings
+      Code=begin,"  if FIsChanged then","    RefreshLines;","  result := FLines;",end;
+      ReadFuncType=Proc
+      WriteProcType=NotImplemented
+      Count=0
+    Prop=Freeze
+      PropType=Procedure
+      GtkName=Freeze
+      Count=0
+    Prop=Thaw
+      PropType=Procedure
+      GtkName=Thaw
+      Count=0
+    Prop=TextLength
+      PropType=Function
+      PascalType=guint
+      GtkName=get_length
+      Count=0
+    Prop=Insert
+      PropType=Procedure
+      Code=begin,"  gtk_text_insert (TheGtkObject, font, fore, back, pgchar(TheText), length(TheText));",end;
+      Count=4
+      Param=font
+        PascalType=PgdkFont
+      Param=fore
+        PascalType=PgdkColor
+      Param=back
+        PascalType=PgdkColor
+      Param=TheText
+        Convert
+        PascalType=string
+    Prop=DeleteBackward
+      PropType=Procedure
+      GtkName=Backward_Delete
+      Count=1
+      Param=number
+        PascalType=longword
+    Prop=DeleteForward
+      PropType=Procedure
+      GtkName=Forward_Delete
+      Count=1
+      Param=number
+        PascalType=longword
+    Prop=WordWrap
+      PropType=Property
+      PascalType=boolean
+      GtkName=word_wrap
+      ReadConvert
+      ReadFuncType=ObjFunc
+      WriteProcType=Proc
+      WriteCode=begin,"  gtk_text_set_word_wrap (TheGtkObject,gint(TheValue));",end;
+      WriteConvert
+      Count=0
+    Prop=LineWrap
+      PropType=Property
+      PascalType=boolean
+      GtkName=Line_Wrap
+      ReadConvert
+      ReadFuncType=ObjFunc
+      WriteProcType=Proc
+      WriteCode=begin,"{$IFDEF win32 or go32v2}","  Set_Line_Wrap (TheGtkObject^, gint(TheValue));",{$ELSE},"  gtk_Text_Set_Line_Wrap (TheGtkObject, gint(TheValue));",{$ENDIF},end;
+      Count=0
+    Prop=Point
+      PropType=Property
+      PascalType=integer
+      GtkName=Point
+      WriteGtkName=Point
+      Count=0
+    Prop=SetAdjustments
+      PropType=Procedure
+      Code=begin,"  gtk_text_set_adjustments (TheGtkObject, hadj.TheGtkObject, vadj.TheGtkObject);",end;
+      Count=2
+      Param=hadj
+        PascalType=TFPgtkAdjustment
+      Param=vadj
+        PascalType=TFPgtkAdjustment
+    Prop=HAdjustment
+      PropType=Property
+      PascalType=TFPgtkAdjustment
+      GtkName=hadj
+      ReadConvert
+      ReadFuncType=ObjField
+      WriteProcType=Proc
+      WriteCode=begin,"  gtk_Text_Set_Adjustments(TheGtkObject, TheValue.TheGtkObject, TheGtkObject^.vadj);",end;
+      Count=0
+    Prop=VAdjustment
+      PropType=Property
+      PascalType=TFPgtkAdjustment
+      GtkName=vadj
+      ReadConvert
+      ReadFuncType=ObjField
+      WriteProcType=Proc
+      WriteCode=begin,"  gtk_Text_Set_Adjustments(TheGtkObject, TheGtkObject^.hadj, TheValue.TheGtkObject);",end;
+      Count=0
+    Prop=SetText
+      PropType=Procedure
+      Section=Protected
+      Code=begin,"  Freeze;","  {$ifdef gtkwin}","  TheValue := stringreplace (TheValue, #13#10, #10, [rfReplaceAll]);","  {$endif}","  clear;","  Insert (null, null, null, TheValue);","  Thaw;",end;
+      Override
+      Count=1
+      Param=TheValue
+        PascalType=string
+  Object=Ruler
+    Inherit=Widget
+    GtkFuncName=ruler
+    Count=2
+    Prop=SetMetric
+      PropType=Procedure
+      PascalType=TGtkMetricType
+      GtkName=set_metric
+      Count=1
+      Param=aMetric
+        PascalType=TGtkMetricType
+    Prop=SetRange
+      PropType=Procedure
+      GtkName=set_range
+      Count=4
+      Param=Lower
+        PascalType=float
+      Param=Upper
+        PascalType=float
+      Param=Position
+        PascalType=float
+      Param=MaxSize
+        PascalType=float
+  Object=HRuler
+    Inherit=Ruler
+    GtkFuncName=hruler
+    CreateObject
+    Count=0
+  Object=VRuler
+    Inherit=Ruler
+    GtkFuncName=vruler
+    CreateObject
+    Count=0
+  Object=Range
+    Inherit=Widget
+    GtkFuncName=Range
+    Count=18
+    Prop=Adjustment
+      PropType=Property
+      PascalType=TFPgtkAdjustment
+      GtkName=Adjustment
+      ReadConvert
+      WriteGtkName=adjustment
+      WriteConvert
+      Count=0
+    Prop=UpdatePolicy
+      PropType=Property
+      PascalType=TgtkUpdateType
+      GtkName=policy
+      ReadFuncType=ObjFunc
+      WriteGtkName=update_policy
+      Count=0
+    Prop=FAdj
+      PropType=Field
+      Section=Protected
+      PascalType=TFPgtkAdjustment
+      Count=0
+    Prop=Create
+      PropType=Constructor
+      Code=begin,"  FAdj := AnAdjustment;","  inherited create;",end;
+      Count=1
+      Param=AnAdjustment
+        PascalType=TFPgtkAdjustment
+    Prop=DrawBackground
+      PropType=Procedure
+      GtkName=draw_background
+      Count=0
+    Prop=DrawTrough
+      PropType=Procedure
+      GtkName=draw_trough
+      Count=0
+    Prop=DrawStepForw
+      PropType=Procedure
+      GtkName=draw_step_forw
+      Count=0
+    Prop=DrawStepBack
+      PropType=Procedure
+      GtkName=draw_step_back
+      Count=0
+    Prop=DrawSlider
+      PropType=Procedure
+      GtkName=draw_slider
+      Count=0
+    Prop=SliderUpdate
+      PropType=Procedure
+      GtkName=slider_update
+      Count=0
+    Prop=TroughClick
+      PropType=Function
+      PascalType=integer
+      Code=begin,"  result := gtk_Range_trough_click (TheGtkObject, X, Y, @JumpPerc);",end;
+      Count=3
+      Param=X
+        PascalType=integer
+      Param=Y
+        PascalType=integer
+      Param=JumpPerc
+        PascalType=gfloat
+        ParamType=Var
+    Prop=DefaultHSliderUpdate
+      PropType=Procedure
+      GtkName=default_hslider_update
+      Count=0
+    Prop=DefaultVSliderUpdate
+      PropType=Procedure
+      GtkName=default_vslider_update
+      Count=0
+    Prop=DefaultHTroughClick
+      PropType=Function
+      PascalType=integer
+      Code=begin,"  result := gtk_Range_default_htrough_click (TheGtkObject, X, Y, @JumpPerc);",end;
+      Count=3
+      Param=X
+        PascalType=integer
+      Param=Y
+        PascalType=integer
+      Param=JumpPerc
+        PascalType=gfloat
+        ParamType=Var
+    Prop=DefaultVTroughClick
+      PropType=Function
+      PascalType=integer
+      Code=begin,"  result := gtk_Range_default_vtrough_click (TheGtkObject, X, Y, @JumpPerc);",end;
+      Count=3
+      Param=X
+        PascalType=integer
+      Param=Y
+        PascalType=integer
+      Param=JumpPerc
+        PascalType=gfloat
+        ParamType=Var
+    Prop=defaultHMotion
+      PropType=Procedure
+      GtkName=default_hmotion
+      Count=2
+      Param=XDelta
+        PascalType=integer
+      Param=YDelta
+        PascalType=integer
+    Prop=defaultVMotion
+      PropType=Procedure
+      GtkName=default_vmotion
+      Count=2
+      Param=XDelta
+        PascalType=integer
+      Param=YDelta
+        PascalType=integer
+    Prop=ClearBackground
+      PropType=Procedure
+      GtkName=clear_background
+      Count=0
+  Object=Scale
+    Inherit=Range
+    GtkFuncName=scale
+    Count=3
+    Prop=SetDigits
+      PropType=Procedure
+      GtkName=set_digits
+      ReadFuncType=ObjField
+      Count=1
+      Param=TheValue
+        PascalType=integer
+    Prop=DrawValue
+      PropType=Property
+      PascalType=boolean
+      GtkName=draw_value
+      ReadConvert
+      ReadFuncType=ObjFunc
+      WriteGtkName=draw_value
+      WriteConvert
+      Count=0
+    Prop=ValuePos
+      PropType=Property
+      PascalType=TGtkPositionType
+      GtkName=value_pos
+      ReadFuncType=ObjFunc
+      WriteGtkName=value_pos
+      Count=0
+  Object=HScale
+    Inherit=Scale
+    GtkFuncName=hscale
+    CreateParams=nil
+    CreateObject
+    Count=0
+  Object=VScale
+    Inherit=Scale
+    GtkFuncName=vscale
+    CreateParams=nil
+    CreateObject
+    Count=0
+  Object=Scrollbar
+    Inherit=Range
+    GtkFuncName=Scrollbar
+    Count=0
+  Object=HScrollbar
+    Inherit=Scrollbar
+    GtkFuncName=hscrollbar
+    Count=1
+    Prop=CreateGtkObject
+      PropType=Procedure
+      Section=Protected
+      Code="var a : PgtkAdjustment;",begin,"  if assigned (FAdj) then","    a := FAdj.TheGtkObject","  else","    a := null;","  FGtkObject := PgtkObject (gtk_hscrollbar_new (a));","  FAdj := nil;",end;
+      Override
+      Count=0
+  Object=VScrollbar
+    Inherit=Scrollbar
+    Count=1
+    Prop=CreateGtkObject
+      PropType=Procedure
+      Section=Protected
+      Code="var a : PgtkAdjustment;",begin,"  if assigned (FAdj) then","    a := FAdj.TheGtkObject","  else","    a := null;","  FGtkObject := PgtkObject (gtk_vscrollbar_new (a));","  FAdj := nil;",end;
+      Override
+      Count=0
+  Object=Separator
+    Inherit=Widget
+    GtkFuncName=Separator
+    Count=0
+  Object=HSeparator
+    Inherit=Separator
+    GtkFuncName=HSeparator
+    CreateObject
+    Count=0
+  Object=VSeparator
+    Inherit=Separator
+    GtkFuncName=VSeparator
+    CreateObject
+    Count=0
+  Object=Preview
+    Inherit=Widget
+    GtkFuncName=preview
+    CreateParams=GTK_PREVIEW_COLOR
+    CreateObject
+    Count=6
+    Prop=Size
+      PropType=Procedure
+      GtkName=size
+      Count=2
+      Param=aWidth
+        PascalType=integer
+      Param=aHeight
+        PascalType=integer
+    Prop=Put
+      PropType=Procedure
+      GtkName=put
+      Count=8
+      Param=aWindow
+        PascalType=PGdkWindow
+      Param=gc
+        PascalType=PGdkGC
+      Param=SrcX
+        PascalType=integer
+      Param=SrcY
+        PascalType=integer
+      Param=destX
+        PascalType=integer
+      Param=DestY
+        PascalType=integer
+      Param=aWidth
+        PascalType=integer
+      Param=aHeight
+        PascalType=integer
+    Prop=DrawRow
+      PropType=Procedure
+      GtkName=draw_row
+      Count=4
+      Param=data
+        PascalType=pguchar
+      Param=X
+        PascalType=integer
+      Param=Y
+        PascalType=integer
+      Param=W
+        PascalType=integer
+    Prop=SetGamma
+      PropType=HelperProc
+      Code=begin,"  gtk_preview_set_gamma (aGamma);",end;
+      Count=1
+      Param=aGamma
+        PascalType=double
+    Prop=Expand
+      PropType=Property
+      PascalType=longbool
+      GtkName=expand
+      ReadConvert
+      ReadFuncType=ObjFunc
+      WriteGtkName=expand
+      WriteConvert
+      Count=0
+    Prop=Dither
+      PropType=Property
+      PascalType=TGdkRgbDither
+      GtkName=dither
+      ReadFuncType=ObjField
+      WriteGtkName=dither
+      Count=0
+  Object=Progress
+    Inherit=Widget
+    GtkFuncName=progress
+    Count=13
+    Prop=Showtext
+      PropType=Property
+      PascalType=longbool
+      GtkName=show_text
+      ReadConvert
+      ReadFuncType=ObjFunc
+      WriteGtkName=show_text
+      WriteConvert
+      Count=0
+    Prop=TextXAlign
+      PropType=Property
+      PascalType=gfloat
+      GtkName=x_align
+      ReadFuncType=ObjField
+      WriteProcType=Proc
+      WriteCode=begin,"  gtk_progress_set_text_alignment (TheGtkObject, TheValue, TextYAlign);",end;
+      Count=0
+    Prop=TextYAlign
+      PropType=Property
+      PascalType=gfloat
+      GtkName=y_align
+      ReadFuncType=ObjField
+      WriteProcType=Proc
+      WriteCode=begin,"  gtk_progress_set_text_alignment (TheGtkObject, TextXAlign, TheValue);",end;
+      Count=0
+    Prop=SetTextAlignment
+      PropType=Procedure
+      GtkName=set_text_alignment
+      Count=2
+      Param=anXalign
+        PascalType=gfloat
+      Param=anYAlign
+        PascalType=gfloat
+    Prop=CurrentValue
+      PropType=Property
+      PascalType=float
+      GtkName=Value
+      WriteProcType=Proc
+      WriteCode=begin,"  gtk_progress_Set_value (TheGtkObject, TheValue);","  Draw (nil);",end;
+      Count=0
+    Prop=Percentage
+      PropType=Property
+      PascalType=float
+      GtkName=current_percentage
+      WriteGtkName=percentage
+      Count=0
+    Prop=PercentageFromValue
+      PropType=Function
+      PascalType=gfloat
+      GtkName=get_percentage_from_value
+      Count=1
+      Param=aValue
+        PascalType=gfloat
+    Prop=FormatString
+      PropType=Property
+      PascalType=string
+      GtkName=format
+      ReadConvert
+      ReadFuncType=ObjField
+      WriteGtkName=format_string
+      WriteConvert
+      Count=0
+    Prop=Adjustment
+      PropType=Property
+      PascalType=TFPgtkAdjustment
+      Code=begin,"  result := GetPascalInstance (PGtkObject(TheGtkObject^.adjustment), TFPgtkAdjustment) as TFPgtkAdjustment;",end;
+      ReadFuncType=Proc
+      WriteGtkName=adjustment
+      WriteConvert
+      Count=0
+    Prop=ActivityMode
+      PropType=Property
+      PascalType=longbool
+      GtkName=activity_mode
+      ReadConvert
+      ReadFuncType=ObjFunc
+      WriteGtkName=activity_mode
+      WriteConvert
+      Count=0
+    Prop=CurrentText
+      PropType=Function
+      PascalType=string
+      GtkName=get_current_text
+      Count=0
+    Prop=TextFromValue
+      PropType=Function
+      PascalType=string
+      GtkName=get_text_from_value
+      Count=1
+      Param=aValue
+        PascalType=gfloat
+    Prop=Configure
+      PropType=Procedure
+      GtkName=configure
+      Count=3
+      Param=aValue
+        PascalType=gfloat
+      Param=aMin
+        PascalType=gfloat
+      Param=aMax
+        PascalType=gfloat
+  Object=ProgressBar
+    Inherit=Progress
+    GtkFuncName=progress_bar
+    Count=8
+    Prop=Create
+      PropType=Constructor
+      Code=begin,"  FAdj := adj;","  inherited create;",end;
+      Count=1
+      Param=adj
+        PascalType=TFPgtkAdjustment
+    Prop=CreateGtkObject
+      PropType=Procedure
+      Section=Protected
+      Code=begin,"  if assigned (FAdj) then","    TheGtkWidget := gtk_progress_bar_new_with_adjustment (FAdj.TheGtkObject)","  else","    TheGtkWidget := gtk_progress_bar_new;",end;
+      Override
+      Count=0
+    Prop=FAdj
+      PropType=Field
+      Section=Private
+      PascalType=TFPgtkAdjustment
+      Count=0
+    Prop=BarStyle
+      PropType=Property
+      PascalType=TGtkProgressBarStyle
+      GtkName=bar_style
+      ReadFuncType=ObjField
+      WriteGtkName=bar_style
+      Count=0
+    Prop=DiscreteBlocks
+      PropType=Property
+      PascalType=longword
+      GtkName=blocks
+      ReadFuncType=ObjField
+      WriteGtkName=discrete_blocks
+      Count=0
+    Prop=ActivityStep
+      PropType=Property
+      PascalType=longword
+      GtkName=activity_step
+      ReadFuncType=ObjField
+      WriteGtkName=activity_step
+      Count=0
+    Prop=ActivityBlocks
+      PropType=Property
+      PascalType=longword
+      GtkName=activity_blocks
+      ReadFuncType=ObjField
+      WriteGtkName=activity_blocks
+      Count=0
+    Prop=Orientation
+      PropType=Property
+      PascalType=TGtkProgressBarOrientation
+      GtkName=orientation
+      ReadFuncType=ObjField
+      WriteGtkName=orientation
+      Count=0
+  Object=ItemFactory
+    Inherit=Object
+    Count=0

+ 12082 - 0
packages/extra/fpgtk/fpgtk.pp

@@ -0,0 +1,12082 @@
+{$mode objfpc}{$h+} {$ifdef win32}{$define gtkwin}{$endif}
+UNIT FPgtk;
+
+// Generated with GtkWrite by Luk Vandelaer (version 1.08)
+
+INTERFACE
+
+USES classes, sysutils, gtk, gdk, glib, FPglib;
+
+TYPE
+
+  TFPgtkObject = class;
+  TFPgtkData = class;
+  TFPgtkAdjustment = class;
+  TFPgtkToolTips = class;
+  TFPgtkWidget = class;
+  TFPgtkGroup = class;
+  TFPgtkWidgetGroup = class;
+  TFPgtkMisc = class;
+  TFPgtkLabel = class;
+  TFPgtkAccelLabel = class;
+  TFPgtkTipsQuery = class;
+  TFPgtkArrow = class;
+  TFPgtkImage = class;
+  TFPgtkPixmap = class;
+  TFPgtkContainer = class;
+  TFPgtkBin = class;
+  TFPgtkAlignment = class;
+  TFPgtkFrame = class;
+  TFPgtkAspectFrame = class;
+  TFPgtkButton = class;
+  TFPgtkToggleButton = class;
+  TFPgtkCheckButton = class;
+  TFPgtkRadioButton = class;
+  TFPgtkRadioButtonGroup = class;
+  TFPgtkOptionMenu = class;
+  TFPgtkItem = class;
+  TFPgtkItemGroup = class;
+  TFPgtkMenuItem = class;
+  TFPgtkCheckMenuItem = class;
+  TFPgtkRadioMenuItem = class;
+  TFPgtkRadioMenuGroup = class;
+  TFPgtkTearOffMenuItem = class;
+  TFPgtkListItem = class;
+  TFPgtkListItemGroup = class;
+  TFPgtkTreeItem = class;
+  TFPgtkWindow = class;
+  TFPgtkColorSelectionDialog = class;
+  TFPgtkDialog = class;
+  TFPgtkInputDialog = class;
+  TFPgtkFileSelection = class;
+  TFPgtkFontSelectionDialog = class;
+  TFPgtkEventBox = class;
+  TFPgtkHandleBox = class;
+  TFPgtkScrolledWindow = class;
+  TFPgtkViewport = class;
+  TFPgtkBox = class;
+  TFPgtkButtonBox = class;
+  TFPgtkHButtonBox = class;
+  TFPgtkVButtonBox = class;
+  TFPgtkVBox = class;
+  TFPgtkColorSelection = class;
+  TFPgtkGammaCurve = class;
+  TFPgtkHBox = class;
+  TFPgtkCombo = class;
+  TFPgtkStatusbar = class;
+  TFPgtkCList = class;
+  TFPgtkCTree = class;
+  TFPgtkFixed = class;
+  TFPgtkNotebook = class;
+  TFPgtkFontSelection = class;
+  TFPgtkPaned = class;
+  TFPgtkHPaned = class;
+  TFPgtkVPaned = class;
+  TFPgtkLayout = class;
+  TFPgtkList = class;
+  TFPgtkMenuShell = class;
+  TFPgtkMenuBar = class;
+  TFPgtkMenu = class;
+  TFPgtkPacker = class;
+  TFPgtkTable = class;
+  TFPgtkToolbar = class;
+  TFPgtkTree = class;
+  TFPgtkCalendar = class;
+  TFPgtkDrawingArea = class;
+  TFPgtkCurve = class;
+  TFPgtkEditable = class;
+  TFPgtkEntry = class;
+  TFPgtkSpinButton = class;
+  TFPgtkText = class;
+  TFPgtkRuler = class;
+  TFPgtkHRuler = class;
+  TFPgtkVRuler = class;
+  TFPgtkRange = class;
+  TFPgtkScale = class;
+  TFPgtkHScale = class;
+  TFPgtkVScale = class;
+  TFPgtkScrollbar = class;
+  TFPgtkHScrollbar = class;
+  TFPgtkVScrollbar = class;
+  TFPgtkSeparator = class;
+  TFPgtkHSeparator = class;
+  TFPgtkVSeparator = class;
+  TFPgtkPreview = class;
+  TFPgtkProgress = class;
+  TFPgtkProgressBar = class;
+  TFPgtkItemFactory = class;
+
+  TFPgtkSignalFunction = procedure (Sender:TFPgtkObject; Data:pointer) of Object;
+  TFPgtkBooleanSignalFunction = procedure (Sender:TFPgtkObject; Bool:boolean; data:pointer) of Object;
+  FPgtkException = class (Exception) end;
+  PPascalClassData = ^TPascalClassData;
+  TPascalClassData = record
+    TheInstance : TFPgtkObject;
+  end;
+  PSignalData = ^TSignalData;
+  TSignalData = record
+    TheData : pointer;
+    TheWidget : TFPgtkObject;
+    TheSignalProc : TFPgtkSignalFunction;
+  end;
+  TDestroyState = (dsAlive, dsWaiting, dsDestroying);
+  TFPgtkObjectClass = Class of TFPgtkObject;
+
+  PFPgtkObject = ^TFPgtkObject;
+  TFPgtkObject = class
+  Private
+    FDestroying : TDestroyState;
+    PascalInstance:TPascalClassData;
+    ConvertDatas:TStringList;
+    SignalDatas:TList;
+    NotifyList:TList;
+    function ConvertSignalData (proc:TFPgtkSignalFunction; data:pointer; FreeIt:boolean) : PSignalData;
+    procedure FreeClass (Sender:TFPgtkObject; Data:pointer);
+    procedure CheckConvertDatas;
+    procedure CheckNotifyList;
+    procedure InitCreate;
+    procedure FinalCreate;
+    function GetUserData : pointer;
+    procedure SetUserData (TheValue : pointer);
+  Protected
+    FGtkObject:PGtkObject;
+    procedure CreateGtkObject; Virtual; Abstract;
+    procedure NotifyDestroy (AnObject:TFPgtkObject); Virtual;
+  Public
+    function TheGtkObject : PGtkObject;
+    function SignalConnect (Signal:string; Proc:TFPgtkSignalFunction; data:pointer) : guint;
+    function SignalConnectAfter (Signal:string; Proc:TFPgtkSignalFunction; data:pointer) : guint;
+    function BooleanSignalConnect (Signal:string; Proc:TFPgtkBooleanSignalFunction; data:pointer) : guint;
+    function BooleanSignalConnectAfter (Signal:string; Proc:TFPgtkBooleanSignalFunction; data:pointer) : guint;
+    constructor Create;
+    constructor CreateFromObject (GtkObject:PGtkObject);
+    property Destroying : TDestroyState read FDestroying;
+    procedure AskNotification (AnObject:TFPgtkObject);
+    destructor Destroy; Override;
+    function ConnectDestroy (proc:TFPgtkSignalFunction; data:pointer) : guint;
+    function ConnectAfterDestroy (proc:TFPgtkSignalFunction; data:pointer) : guint;
+    procedure SignalDisconnect (SignalHandler:guint);
+    procedure SignalBlockHandler (SignalHandler:guint);
+    procedure SignalUnblockHandler (SignalHandler:guint);
+    procedure SignalEmit (aName:string; Args:array of const);
+    function SignalNEmissions (aName:string) : guint;
+    procedure SignalEmitStop (aName:string);
+    procedure SetData (Key:string; Data:pointer);
+    property UserData : pointer read GetUserData write SetUserData;
+    procedure SetDataFull (Key:string; Data:pointer; Destroyer:TFPgtkSignalFunction);
+    procedure RemoveData (Key:string);
+    function GetData (Key:string) : pointer;
+    function GtkDestroyed : boolean;
+    procedure Constructed;
+    procedure ConstructedDefault;
+    procedure Sink;
+    procedure Ref;
+    procedure Unref;
+    procedure WeakRef (Notify:TFPgtkSignalFunction; data:pointer);
+    procedure WeakUnref (notify:TFPgtkSignalFunction; data:pointer);
+  end;
+
+
+  TFPgtkData = class (TFPgtkObject)
+  Public
+    function TheGtkObject : PGtkData;
+    function ConnectDisconnect (proc:TFPgtkSignalFunction; data:pointer) : guint;
+    function ConnectAfterDisconnect (proc:TFPgtkSignalFunction; data:pointer) : guint;
+  end;
+
+
+  TFPgtkAdjustment = class (TFPgtkData)
+  Private
+    function GetValue : gfloat;
+    procedure SetValue (TheValue : gfloat);
+    function GetLower : gfloat;
+    procedure SetLower (TheValue : gfloat);
+    function GetUpper : gfloat;
+    procedure SetUpper (TheValue : gfloat);
+    function GetStepIncrement : gfloat;
+    procedure SetStepIncrement (TheValue : gfloat);
+    function GetPageIncrement : gfloat;
+    procedure SetPageIncrement (TheValue : gfloat);
+    function GetPageSize : gfloat;
+    procedure SetPageSize (TheValue : gfloat);
+  Protected
+    procedure CreateGtkObject; override;
+  Public
+    function TheGtkObject : PGtkAdjustment;
+    procedure Configure (aLower:gfloat; anUpper:gfloat; aValue:gfloat; aStepInc:gfloat; aPageInc:gfloat; aPageSize:gfloat);
+    function ConnectValueChanged (proc:TFPgtkSignalFunction; data:pointer) : guint;
+    function ConnectAfterValueChanged (proc:TFPgtkSignalFunction; data:pointer) : guint;
+    function ConnectChanged (proc:TFPgtkSignalFunction; data:pointer) : guint;
+    function ConnectAfterChanged (proc:TFPgtkSignalFunction; data:pointer) : guint;
+    procedure ValueChanged;
+    procedure Changed;
+    procedure ClampPage (aLower:gfloat; aUpper:gfloat);
+    property Value : gfloat read GetValue write SetValue;
+    property Lower : gfloat read GetLower write SetLower;
+    property Upper : gfloat read GetUpper write SetUpper;
+    property StepIncrement : gfloat read GetStepIncrement write SetStepIncrement;
+    property PageIncrement : gfloat read GetPageIncrement write SetPageIncrement;
+    property PageSize : gfloat read GetPageSize write SetPageSize;
+  end;
+
+
+  TFPgtkToolTips = class (TFPgtkData)
+  Private
+    function GetEnabled : boolean;
+    procedure SetEnabled (TheValue : boolean);
+    function GetDelay : integer;
+    procedure SetDelay (TheValue : integer);
+    function GetColorForeground : PGdkColor;
+    procedure SetColorForeground (TheValue : PGdkColor);
+    function GetColorBackground : PGdkColor;
+    procedure SetColorBackground (TheValue : PGdkColor);
+  Protected
+    procedure CreateGtkObject; override;
+  Public
+    function TheGtkObject : PGtkToolTips;
+    procedure SetColors (Fore:PGdkColor; Back:PGdkColor);
+    procedure SetTip (Widget:TFPgtkWidget; TipText:string; TipPrivate:string);
+    property Enabled : boolean read GetEnabled write SetEnabled;
+    property Delay : integer read GetDelay write SetDelay;
+    property ColorForeground : PGdkColor read GetColorForeground write SetColorForeground;
+    property ColorBackground : PGdkColor read GetColorBackground write SetColorBackground;
+    procedure ForceWindow;
+  end;
+
+  TFPgtkWidgetSignalFunction = procedure (Sender:TFPgtkObject; Widget:TFPgtkWidget; Data:pointer) of Object;
+  TFPgtkEventFunction = function (Sender:TFPgtkWidget; Event:PGdkEvent; data:pointer): boolean of Object;
+  TFPgtkEventButtonFunction = function (Sender:TFPgtkWidget; Event:PGdkEventButton; data:pointer): boolean of Object;
+  TFPgtkEventMotionFunction = function (Sender:TFPgtkWidget; Event:PGdkEventMotion; data:pointer): boolean of Object;
+  TFPgtkEventExposeFunction = function (Sender:TFPgtkWidget; Event:PGdkEventExpose; data:pointer): boolean of Object;
+  TFPgtkEventKeyFunction = function (Sender:TFPgtkWidget; Event:PGdkEventKey; data:pointer): boolean of Object;
+  TFPgtkEventCrossingFunction = function (Sender:TFPgtkWidget; Event:PGdkEventCrossing; data:pointer): boolean of Object;
+  TFPgtkEventConfigureFunction = function (Sender:TFPgtkWidget; Event:PGdkEventConfigure; data:pointer): boolean of Object;
+  TFPgtkEventFocusFunction = function (Sender:TFPgtkWidget; Event:PGdkEventFocus; data:pointer): boolean of Object;
+  TFPgtkEventPropertyFunction = function (Sender:TFPgtkWidget; Event:PGdkEventProperty; data:pointer): boolean of Object;
+  TFPgtkEventSelectionFunction = function (Sender:TFPgtkWidget; Event:PGdkEventSelection; data:pointer): boolean of Object;
+  TFPgtkEventProximityFunction = function (Sender:TFPgtkWidget; Event:PGdkEventProximity; data:pointer): boolean of Object;
+  TFPgtkEventClientFunction = function (Sender:TFPgtkWidget; Event:PGdkEventClient; data:pointer): boolean of Object;
+  TFPgtkEventNoExposeFunction = function (Sender:TFPgtkWidget; Event:PGdkEventNoExpose; data:pointer): boolean of Object;
+
+  TFPgtkWidget = class (TFPgtkObject)
+  Private
+    function GetTheGtkWidget : PGtkWidget;
+    procedure SetTheGtkWidget (TheValue : PGtkWidget);
+    function GetAllocation : TGtkAllocation;
+    function GetName : string;
+    procedure SetName (TheValue : string);
+    function GetPropFlags : longint;
+    procedure SetPropFlags (TheValue : longint);
+    function GetState : longint;
+    function GetSavedState : longint;
+    function GetParent : TFPgtkWidget;
+    procedure SetParent (TheValue : TFPgtkWidget);
+    function GetParentWindow : PGdkWindow;
+    procedure SetParentWindow (TheValue : PGdkWindow);
+    procedure Reparent (NewParent:TFPgtkWidget);
+    function GetVisible : boolean;
+    procedure SetVisible (TheValue : boolean);
+    function GetNoWindow : boolean;
+    procedure SetNoWindow (TheValue : boolean);
+    function GetRealized : boolean;
+    procedure SetRealized (TheValue : boolean);
+    function GetMapped : boolean;
+    procedure SetMapped (TheValue : boolean);
+    function GetDrawable : boolean;
+    function GetIsSensitive : boolean;
+    function GetSensitive : boolean;
+    procedure SetSensitive (TheValue : boolean);
+    function GetParentSensitive : boolean;
+    procedure SetParentSensitive (TheValue : boolean);
+    function GetAppPaintable : boolean;
+    function GetCanFocus : boolean;
+    procedure SetCanFocus (TheValue : boolean);
+    function GetHasFocus : boolean;
+    function GetCanDefault : boolean;
+    procedure SetCanDefault (TheValue : boolean);
+    function GetHasDefault : boolean;
+    function GetReceivesDefault : boolean;
+    function GetCompositeChild : boolean;
+    function GetTooltip : string;
+    procedure SetTooltip (TheValue : string);
+    function GetColormap : PGdkColormap;
+    procedure SetColormap (TheValue : PGdkColormap);
+  Protected
+    procedure SetFlags (NewFlags:longint);
+    procedure UnsetFlags (NewUnsetFlags:longint);
+    procedure Map;
+    procedure Unmap;
+    procedure QueueDraw;
+    procedure QueueResize;
+    procedure DrawFocus;
+    procedure DrawDefault;
+  Public
+    function TheGtkObject : PGtkWidget;
+    property TheGtkWidget : PGtkWidget read GetTheGtkWidget write SetTheGtkWidget;
+    function WidgetSignalConnect (Signal:string; Proc:TFPgtkWidgetSignalFunction; data:pointer) : guint;
+    function WidgetSignalConnectAfter (Signal:string; Proc:TFPgtkWidgetSignalFunction; data:pointer) : guint;
+    procedure Draw (Rectangle:PGdkRectangle); Overload;
+    procedure Show;
+    procedure Hide;
+    procedure Realize;
+    procedure Unrealize;
+    procedure ShowNow;
+    procedure ShowAll;
+    procedure HideAll;
+    procedure SetAllocation (AnAllocation:TGtkAllocation); Overload;
+    procedure SetAllocation (x:integer; y:integer; width:integer; height:integer); Overload;
+    property Allocation : TGtkAllocation read GetAllocation write SetAllocation;
+    procedure SetUPosition (x:integer; y:integer);
+    procedure SetUsize (width:integer; height:integer);
+    property Name : string read GetName write SetName;
+    property Flags : longint read GetPropFlags write SetPropFlags;
+    property State : longint read GetState;
+    property SavedState : longint read GetSavedState;
+    property Parent : TFPgtkWidget read GetParent write SetParent;
+    property ParentWindow : PGdkWindow read GetParentWindow write SetParentWindow;
+    procedure Unparent;
+    property Visible : boolean read GetVisible write SetVisible;
+    property NoWindow : boolean read GetNoWindow write SetNoWindow;
+    property Realized : boolean read GetRealized write SetRealized;
+    property Mapped : boolean read GetMapped write SetMapped;
+    property Drawable : boolean read GetDrawable;
+    property IsSensitive : boolean read GetIsSensitive;
+    property Sensitive : boolean read GetSensitive write SetSensitive;
+    property ParentSensitive : boolean read GetParentSensitive write SetParentSensitive;
+    property AppPaintable : boolean read GetAppPaintable;
+    property CanFocus : boolean read GetCanFocus write SetCanFocus;
+    procedure GrabFocus;
+    property HasFocus : boolean read GetHasFocus;
+    property CanDefault : boolean read GetCanDefault write SetCanDefault;
+    procedure GrabDefault;
+    property HasDefault : boolean read GetHasDefault;
+    property ReceivesDefault : boolean read GetReceivesDefault;
+    property CompositeChild : boolean read GetCompositeChild;
+    property Tooltip : string read GetTooltip write SetTooltip;
+    procedure HideOnDelete;
+    property Colormap : PGdkColormap read GetColormap write SetColormap;
+    function ConnectShow (proc:TFPgtkSignalFunction; data:pointer) : guint;
+    function ConnectAfterShow (proc:TFPgtkSignalFunction; data:pointer) : guint;
+    function Connecthide (proc:TFPgtkSignalFunction; data:pointer) : guint;
+    function ConnectAfterhide (proc:TFPgtkSignalFunction; data:pointer) : guint;
+    function Connectmap (proc:TFPgtkSignalFunction; data:pointer) : guint;
+    function ConnectAftermap (proc:TFPgtkSignalFunction; data:pointer) : guint;
+    function Connectunmap (proc:TFPgtkSignalFunction; data:pointer) : guint;
+    function ConnectAfterunmap (proc:TFPgtkSignalFunction; data:pointer) : guint;
+    function Connectrealize (proc:TFPgtkSignalFunction; data:pointer) : guint;
+    function ConnectAfterrealize (proc:TFPgtkSignalFunction; data:pointer) : guint;
+    function Connectunrealize (proc:TFPgtkSignalFunction; data:pointer) : guint;
+    function ConnectAfterunrealize (proc:TFPgtkSignalFunction; data:pointer) : guint;
+    function ConnectDrawFocus (proc:TFPgtkSignalFunction; data:pointer) : guint;
+    function ConnectAfterDrawFocus (proc:TFPgtkSignalFunction; data:pointer) : guint;
+    function ConnectDrawDefault (proc:TFPgtkSignalFunction; data:pointer) : guint;
+    function ConnectAfterDrawDefault (proc:TFPgtkSignalFunction; data:pointer) : guint;
+    function ConnectParentSet (proc:TFPgtkWidgetSignalFunction; data:pointer) : guint;
+    function ConnectAfterParentSet (proc:TFPgtkWidgetSignalFunction; data:pointer) : guint;
+    function ConnectGrabFocus (proc:TFPgtkSignalFunction; data:pointer) : guint;
+    function ConnectAfterGrabFocus (proc:TFPgtkSignalFunction; data:pointer) : guint;
+    function EventConnect (Signal:string; Proc:TFPgtkEventFunction; data:pointer) : guint;
+    function EventConnectAfter (Signal:string; Proc:TFPgtkEventFunction; data:pointer) : guint;
+    function ConnectEvent (proc:TFPgtkEventFunction; data:pointer) : guint;
+    function ConnectAfterEvent (proc:TFPgtkEventFunction; data:pointer) : guint;
+    function EventButtonConnect (Signal:string; Proc:TFPgtkEventButtonFunction; data:pointer) : guint;
+    function EventButtonConnectAfter (Signal:string; Proc:TFPgtkEventButtonFunction; data:pointer) : guint;
+    function ConnectButtonPressEvent (proc:TFPgtkEventButtonFunction; data:pointer) : guint;
+    function ConnectAfterButtonPressEvent (proc:TFPgtkEventButtonFunction; data:pointer) : guint;
+    function ConnectButtonReleaseEvent (proc:TFPgtkEventButtonFunction; data:pointer) : guint;
+    function ConnectAfterButtonReleaseEvent (proc:TFPgtkEventButtonFunction; data:pointer) : guint;
+    function EventMotionConnect (Signal:string; Proc:TFPgtkEventMotionFunction; data:pointer) : guint;
+    function EventMotionConnectAfter (Signal:string; Proc:TFPgtkEventMotionFunction; data:pointer) : guint;
+    function ConnectMotionNotifyEvent (proc:TFPgtkEventMotionFunction; data:pointer) : guint;
+    function ConnectAfterMotionNotifyEvent (proc:TFPgtkEventMotionFunction; data:pointer) : guint;
+    function ConnectDeleteEvent (proc:TFPgtkEventFunction; data:pointer) : guint;
+    function ConnectAfterDeleteEvent (proc:TFPgtkEventFunction; data:pointer) : guint;
+    function ConnectDestroyEvent (proc:TFPgtkEventFunction; data:pointer) : guint;
+    function ConnectAfterDestroyEvent (proc:TFPgtkEventFunction; data:pointer) : guint;
+    function EventExposeConnect (Signal:string; Proc:TFPgtkEventExposeFunction; data:pointer) : guint;
+    function EventExposeConnectAfter (Signal:string; Proc:TFPgtkEventExposeFunction; data:pointer) : guint;
+    function ConnectExposeEvent (proc:TFPgtkEventExposeFunction; data:pointer) : guint;
+    function ConnectAfterExposeEvent (proc:TFPgtkEventExposeFunction; data:pointer) : guint;
+    function EventKeyConnect (Signal:string; Proc:TFPgtkEventKeyFunction; data:pointer) : guint;
+    function EventKeyConnectAfter (Signal:string; Proc:TFPgtkEventKeyFunction; data:pointer) : guint;
+    function ConnectKeyPressEvent (proc:TFPgtkEventKeyFunction; data:pointer) : guint;
+    function ConnectAfterKeyPressEvent (proc:TFPgtkEventKeyFunction; data:pointer) : guint;
+    function ConnectKeyReleaseEvent (proc:TFPgtkEventKeyFunction; data:pointer) : guint;
+    function ConnectAfterKeyReleaseEvent (proc:TFPgtkEventKeyFunction; data:pointer) : guint;
+    function EventCrossingConnect (Signal:string; Proc:TFPgtkEventCrossingFunction; data:pointer) : guint;
+    function EventCrossingConnectAfter (Signal:string; Proc:TFPgtkEventCrossingFunction; data:pointer) : guint;
+    function ConnectEnterNotifyEvent (proc:TFPgtkEventCrossingFunction; data:pointer) : guint;
+    function ConnectAfterEnterNotifyEvent (proc:TFPgtkEventCrossingFunction; data:pointer) : guint;
+    function ConnectLeaveNotifyEvent (proc:TFPgtkEventCrossingFunction; data:pointer) : guint;
+    function ConnectAfterLeaveNotifyEvent (proc:TFPgtkEventCrossingFunction; data:pointer) : guint;
+    function EventConfigureConnect (Signal:string; Proc:TFPgtkEventConfigureFunction; data:pointer) : guint;
+    function EventConfigureConnectAfter (Signal:string; Proc:TFPgtkEventConfigureFunction; data:pointer) : guint;
+    function ConnectConfigureEvent (proc:TFPgtkEventConfigureFunction; data:pointer) : guint;
+    function ConnectAfterConfigureEvent (proc:TFPgtkEventConfigureFunction; data:pointer) : guint;
+    function EventFocusConnect (Signal:string; Proc:TFPgtkEventFocusFunction; data:pointer) : guint;
+    function EventFocusConnectAfter (Signal:string; Proc:TFPgtkEventFocusFunction; data:pointer) : guint;
+    function ConnectFocusInEvent (proc:TFPgtkEventFocusFunction; data:pointer) : guint;
+    function ConnectAfterFocusInEvent (proc:TFPgtkEventFocusFunction; data:pointer) : guint;
+    function ConnectFocusOutEvent (proc:TFPgtkEventFocusFunction; data:pointer) : guint;
+    function ConnectAfterFocusOutEvent (proc:TFPgtkEventFocusFunction; data:pointer) : guint;
+    function ConnectMapEvent (proc:TFPgtkEventFunction; data:pointer) : guint;
+    function ConnectAfterMapEvent (proc:TFPgtkEventFunction; data:pointer) : guint;
+    function ConnectUnmapEvent (proc:TFPgtkEventFunction; data:pointer) : guint;
+    function ConnectAfterUnmapEvent (proc:TFPgtkEventFunction; data:pointer) : guint;
+    function EventPropertyConnect (Signal:string; Proc:TFPgtkEventPropertyFunction; data:pointer) : guint;
+    function EventPropertyConnectAfter (Signal:string; Proc:TFPgtkEventPropertyFunction; data:pointer) : guint;
+    function ConnectPropertyNotifyEvent (proc:TFPgtkEventPropertyFunction; data:pointer) : guint;
+    function ConnectAfterPropertyNotifyEvent (proc:TFPgtkEventPropertyFunction; data:pointer) : guint;
+    function EventSelectionConnect (Signal:string; Proc:TFPgtkEventSelectionFunction; data:pointer) : guint;
+    function EventSelectionConnectAfter (Signal:string; Proc:TFPgtkEventSelectionFunction; data:pointer) : guint;
+    function ConnectSelectionClearEvent (proc:TFPgtkEventSelectionFunction; data:pointer) : guint;
+    function ConnectAfterSelectionClearEvent (proc:TFPgtkEventSelectionFunction; data:pointer) : guint;
+    function ConnectSelectionRequestEvent (proc:TFPgtkEventSelectionFunction; data:pointer) : guint;
+    function ConnectAfterSelectionRequestEvent (proc:TFPgtkEventSelectionFunction; data:pointer) : guint;
+    function ConnectSelectionNotifyEvent (proc:TFPgtkEventSelectionFunction; data:pointer) : guint;
+    function ConnectAfterSelectionNotifyEvent (proc:TFPgtkEventSelectionFunction; data:pointer) : guint;
+    function EventProximityConnect (Signal:string; Proc:TFPgtkEventProximityFunction; data:pointer) : guint;
+    function EventProximityConnectAfter (Signal:string; Proc:TFPgtkEventProximityFunction; data:pointer) : guint;
+    function ConnectProximityInEvent (proc:TFPgtkEventProximityFunction; data:pointer) : guint;
+    function ConnectAfterProximityInEvent (proc:TFPgtkEventProximityFunction; data:pointer) : guint;
+    function ConnectProximityOutEvent (proc:TFPgtkEventProximityFunction; data:pointer) : guint;
+    function ConnectAfterProximityOutEvent (proc:TFPgtkEventProximityFunction; data:pointer) : guint;
+    function EventClientConnect (Signal:string; Proc:TFPgtkEventClientFunction; data:pointer) : guint;
+    function EventClientConnectAfter (Signal:string; Proc:TFPgtkEventClientFunction; data:pointer) : guint;
+    function ConnectClientEvent (proc:TFPgtkEventClientFunction; data:pointer) : guint;
+    function ConnectAfterClientEvent (proc:TFPgtkEventClientFunction; data:pointer) : guint;
+    function EventNoExposeConnect (Signal:string; Proc:TFPgtkEventNoExposeFunction; data:pointer) : guint;
+    function EventNoExposeConnectAfter (Signal:string; Proc:TFPgtkEventNoExposeFunction; data:pointer) : guint;
+    function ConnectNoExposeEvent (proc:TFPgtkEventNoExposeFunction; data:pointer) : guint;
+    function ConnectAfterNoExposeEvent (proc:TFPgtkEventNoExposeFunction; data:pointer) : guint;
+    function ConnectVisibilityNotifyEvent (proc:TFPgtkEventFunction; data:pointer) : guint;
+    function ConnectAfterVisibilityNotifyEvent (proc:TFPgtkEventFunction; data:pointer) : guint;
+    procedure LockAccelerators;
+    procedure UnlockAccelerators;
+    procedure RemoveAccelerators (aSignal:string; OnlyVisible:boolean);
+    procedure ActivateAccelGroups (Key:guint; Mods:TGdkModifierType);
+    procedure AcceleratorAdd (AG:PGtkAccelGroup; aSignal:string; Key:guint; Mods:TGdkModifierType; acFlags:TGtkAccelFlags); Overload;
+  end;
+
+  TFPgtkForEachProcedure = procedure (item : pointer; data : pointer) of object;
+
+  TFPgtkGroup = class (TList)
+  Private
+    FManageLists : boolean;
+    FListChanged:boolean;
+    FSListChanged:boolean;
+    FClassesChanged:boolean;
+    FNotUpdating:boolean;
+    FGList:PGList;
+    FGSList:PGSList;
+    procedure FreeList;
+    procedure FreeSList;
+    function CreateGList : PGList;
+    function CreateGSList : PGSList;
+    function GetGtkListProp : PGList;
+    procedure SetGtkListProp (TheValue : PGList);
+    function GetGtkSListProp : PGSList;
+    procedure SetGtkSListProp (TheValue : PGSList);
+  Protected
+    procedure BuildFromGtkList;
+    procedure BuildFromGtkSList;
+    procedure Notify (ptr:pointer; Action:TListNotification); Override;
+    function GetData (index:integer) : pointer; Dynamic;
+    function UngetData (data:pointer) : pointer; Dynamic;
+  Public
+    property ManageLists : boolean read FManageLists write FManageLists;
+    constructor Create;
+    destructor Destroy; Override;
+    function GetGtkList (buffered:boolean) : PGList;
+    function GetGtkSList (buffered:boolean) : PGSList;
+    procedure BeginUpdate;
+    procedure EndUpdate;
+    procedure ForEach (Proc:TFPgtkForEachProcedure; data:pointer);
+    property GtkList : PGList read GetGtkListProp write SetGtkListProp;
+    property GtkSList : PGSList read GetGtkSListProp write SetGtkSListProp;
+  end;
+
+
+  TFPgtkWidgetGroup = class (TFPgtkGroup)
+  Private
+    function GetItem(Index:integer) : TFPgtkWidget;
+    procedure SetItem (Index:integer; TheValue : TFPgtkWidget);
+    function GetTooltips(index:integer) : string;
+    procedure SetTooltips (index:integer; TheValue : string);
+  Public
+    function GetData (index:integer) : pointer; Override;
+    function UnGetData (data:pointer) : pointer; Override;
+    procedure AddToContainer (Container:TFPgtkContainer);
+    procedure PackInBox (box:TFPgtkBox; AtStart:boolean; Expanding:boolean; Fill:boolean; Padding:integer);
+    property Items [Index:integer]  : TFPgtkWidget read GetItem write SetItem;
+    property Tooltips [index:integer]  : string read GetTooltips write SetTooltips;
+  end;
+
+
+  TFPgtkMisc = class (TFPgtkWidget)
+  Private
+    function GetXAlign : gfloat;
+    procedure SetXAlign (TheValue : gfloat);
+    function GetYAlign : gfloat;
+    procedure SetYAlign (TheValue : gfloat);
+    function GetXPad : word;
+    procedure SetXPad (TheValue : word);
+    function GetYPad : word;
+    procedure SetYPad (TheValue : word);
+  Public
+    function TheGtkObject : PGtkMisc;
+    procedure SetAlignment (x:gfloat; y:gfloat);
+    procedure SetPadding (x:word; y:word);
+    property XAlign : gfloat read GetXAlign write SetXAlign;
+    property YAlign : gfloat read GetYAlign write SetYAlign;
+    property XPad : word read GetXPad write SetXPad;
+    property YPad : word read GetYPad write SetYPad;
+  end;
+
+  TFPgtkLabelClass = class of TFPgtkLabel;
+
+  TFPgtkLabel = class (TFPgtkMisc)
+  Private
+    function GetText : string;
+    procedure SetText (TheValue : string);
+    function GetPattern : string;
+    procedure SetPattern (TheValue : string);
+    function GetJustify : TGtkJustification;
+    procedure SetJustify (TheValue : TGtkJustification);
+    function GetLineWrap : boolean;
+    procedure SetLineWrap (TheValue : boolean);
+  Protected
+    procedure CreateGtkObject; override;
+  Public
+    function TheGtkObject : PGtkLabel;
+    constructor Create (aText:string);
+    property Text : string read GetText write SetText;
+    property Pattern : string read GetPattern write SetPattern;
+    property Justify : TGtkJustification read GetJustify write SetJustify;
+    property LineWrap : boolean read GetLineWrap write SetLineWrap;
+    function ParseUline (aText:string) : guint;
+  end;
+
+
+  TFPgtkAccelLabel = class (TFPgtkLabel)
+  Private
+    function GetAccelWidget : TFPgtkWidget;
+    procedure SetAccelWidget (TheValue : TFPgtkWidget);
+  Protected
+    procedure CreateGtkObject; override;
+  Public
+    function TheGtkObject : PGtkAccelLabel;
+    property AccelWidget : TFPgtkWidget read GetAccelWidget write SetAccelWidget;
+    function AccelText : string;
+    procedure Refetch;
+  end;
+
+
+  TFPgtkTipsQuery = class (TFPgtkLabel)
+  Protected
+    procedure CreateGtkObject; override;
+  Public
+    function TheGtkObject : PGtkTipsQuery;
+  end;
+
+
+  TFPgtkArrow = class (TFPgtkMisc)
+  Private
+    function GetArrowType : TGtkArrowType;
+    procedure SetArrowType (TheValue : TGtkArrowType);
+    function GetShadowType : TGtkShadowType;
+    procedure SetShadowType (TheValue : TGtkShadowType);
+  Protected
+    procedure CreateGtkObject; override;
+  Public
+    function TheGtkObject : PGtkArrow;
+    property ArrowType : TGtkArrowType read GetArrowType write SetArrowType;
+    property ShadowType : TGtkShadowType read GetShadowType write SetShadowType;
+    procedure SetTypes (AnArrowType:TGtkArrowType; AShadowtype:TGtkShadowType);
+    constructor Create (AnArrowType:TGtkArrowType; AShadowType:TGtkShadowType);
+  end;
+
+
+  TFPgtkImage = class (TFPgtkMisc)
+  Private
+    function GetImageProp : PGdkImage;
+    procedure SetImageProp (TheValue : PGdkImage);
+    function GetMask : PGdkBitMap;
+    procedure SetMask (TheValue : PGdkBitMap);
+  Protected
+    procedure CreateGtkObject; override;
+  Public
+    function TheGtkObject : PGtkImage;
+    FMask:PGdkBitMap;
+    FImage:PGdkImage;
+    property Image : PGdkImage read GetImageProp write SetImageProp;
+    property Mask : PGdkBitMap read GetMask write SetMask;
+    procedure SetImage (anImage:PGdkImage; aMask:PGdkBitmap);
+    constructor Create (anImage:PGdkImage; aMask:PGdkBitmap);
+  end;
+
+  TStringArray = array[0..32000] of pgchar;
+  PStringArray = ^TStringArray;
+
+  TFPgtkPixmap = class (TFPgtkMisc)
+  Private
+    function GetBuildInsensitive : longbool;
+    procedure SetBuildInsensitive (TheValue : longbool);
+    function GetPixmapProp : PGdkPixMap;
+    procedure SetPixmapProp (TheValue : PGdkPixMap);
+    function GetMask : PGdkBitMap;
+    procedure SetMask (TheValue : PGdkBitMap);
+  Protected
+    procedure CreateGtkObject; override;
+  Public
+    function TheGtkObject : PGtkPixmap;
+    FMask:PGdkBitMap;
+    FPixMap:PGdkPixmap;
+    property BuildInsensitive : longbool read GetBuildInsensitive write SetBuildInsensitive;
+    constructor Create;
+    constructor CreateFromFile (Filename:string; Window:TFPgtkWidget);
+    constructor CreateFromStrings (Data:TStrings; Window:TFPgtkWidget);
+    constructor CreateFromText (Data:string; Window:TFPgtkWidget);
+    property PixMap : PGdkPixMap read GetPixmapProp write SetPixmapProp;
+    property Mask : PGdkBitMap read GetMask write SetMask;
+    procedure SetPixmap (aPixmap:PGdkPixMap; aMask:PGdkBitmap);
+    procedure GetPixmap (var aPixmap:PGdkPixmap; var aMask:PGdkBitmap);
+    procedure LoadFromFile (Filename:string);
+    procedure LoadFromStrings (data:TStrings);
+    procedure LoadFromText (data:string);
+    procedure LoadFromArray (data:array of string);
+  end;
+
+  TFPgtkDirectionFunctionSignalFunction = function (Sender:TFPgtkObject; Direction:TGtkDirectionType; data:pointer): TGtkDirectionType of Object;
+
+  TFPgtkContainer = class (TFPgtkWidget)
+  Private
+    function GetBorder : integer;
+    procedure SetBorder (TheValue : integer);
+    function GetChildren : TFPgtkWidgetGroup;
+  Public
+    function TheGtkObject : PGtkContainer;
+    FChildren:TFPgtkWidgetGroup;
+    property Border : integer read GetBorder write SetBorder;
+    procedure Add (AWidget:TFPgtkWidget; IsVisible:boolean); Overload;
+    procedure Add (AWidget:TFPgtkWidget); Overload;
+    procedure Remove (AWidget:TFPgtkWidget);
+    constructor Create;
+    destructor Destroy; Override;
+    property Children : TFPgtkWidgetGroup read GetChildren;
+    procedure Focus (Direction:TGtkDirectionType);
+    procedure FocusChild (Child:TFPgtkWidget);
+    procedure RegisterToplevel;
+    procedure UnregisterToplevel;
+    procedure ResizeChildren;
+    function DirectionFunctionSignalConnect (Signal:string; Proc:TFPgtkDirectionFunctionSignalFunction; data:pointer) : guint;
+    function DirectionFunctionSignalConnectAfter (Signal:string; Proc:TFPgtkDirectionFunctionSignalFunction; data:pointer) : guint;
+    function ConnectAdd (proc:TFPgtkWidgetSignalFunction; data:pointer) : guint;
+    function ConnectAfterAdd (proc:TFPgtkWidgetSignalFunction; data:pointer) : guint;
+    function ConnectRemove (proc:TFPgtkWidgetSignalFunction; data:pointer) : guint;
+    function ConnectAfterRemove (proc:TFPgtkWidgetSignalFunction; data:pointer) : guint;
+    function ConnectCheckResize (proc:TFPgtkSignalFunction; data:pointer) : guint;
+    function ConnectAfterCheckResize (proc:TFPgtkSignalFunction; data:pointer) : guint;
+    function ConnectFocus (proc:TFPgtkDirectionFunctionSignalFunction; data:pointer) : guint;
+    function ConnectAfterFocus (proc:TFPgtkDirectionFunctionSignalFunction; data:pointer) : guint;
+    function ConnectSetFocusChild (proc:TFPgtkWidgetSignalFunction; data:pointer) : guint;
+    function ConnectAfterSetFocusChild (proc:TFPgtkWidgetSignalFunction; data:pointer) : guint;
+  end;
+
+
+  TFPgtkBin = class (TFPgtkContainer)
+  Private
+    function GetChild : TFPgtkWidget;
+    procedure SetChild (TheValue : TFPgtkWidget);
+  Protected
+    property Child : TFPgtkWidget read GetChild write SetChild;
+  Public
+    function TheGtkObject : PGtkBin;
+  end;
+
+
+  TFPgtkAlignment = class (TFPgtkBin)
+  Public
+    function TheGtkObject : PGtkAlignment;
+    procedure Configure (anXAlign:gfloat; anYAlign:gfloat; anXScale:gfloat; anYScale:gfloat);
+  end;
+
+
+  TFPgtkFrame = class (TFPgtkBin)
+  Private
+    function GetText : string;
+    procedure SetText (TheValue : string);
+    function GetAlignment : gfloat;
+    procedure SetAlignment (TheValue : gfloat);
+    function GetShadowType : TgtkShadowType;
+    procedure SetShadowType (TheValue : TgtkShadowType);
+  Protected
+    procedure CreateGtkObject; override;
+  Public
+    function TheGtkObject : PGtkFrame;
+    property Text : string read GetText write SetText;
+    property Alignment : gfloat read GetAlignment write SetAlignment;
+    property ShadowType : TgtkShadowType read GetShadowType write SetShadowType;
+  end;
+
+
+  TFPgtkAspectFrame = class (TFPgtkFrame)
+  Protected
+    procedure CreateGtkObject; override;
+  Public
+    function TheGtkObject : PGtkAspectFrame;
+    procedure Configure (anXAlign:gfloat; anYAlign:gfloat; Ratio:gfloat; ObeyChild:longbool);
+  end;
+
+
+  TFPgtkButton = class (TFPgtkBin)
+  Private
+    FAccelKey : guint;
+    FAddContainer : TFPgtkContainer;
+    FLabel : TFPgtkLabel;
+    procedure CreateLabel (aText:string);
+    function GetText : string;
+    procedure SetText (TheValue : string);
+    function GetReliefStyle : TGtkReliefStyle;
+    procedure SetReliefStyle (TheValue : TGtkReliefStyle);
+  Protected
+    procedure CreateGtkObject; override;
+    function LabelClass : TFPgtkLabelClass; Virtual;
+    procedure NotifyDestroy (AnObject:TFPgtkObject); Override;
+    procedure LabelCreated; Virtual;
+  Public
+    function TheGtkObject : PGtkButton;
+    function ConnectClicked (proc:TFPgtkSignalFunction; data:pointer) : guint;
+    function ConnectAfterClicked (proc:TFPgtkSignalFunction; data:pointer) : guint;
+    function ConnectPressed (proc:TFPgtkSignalFunction; data:pointer) : guint;
+    function ConnectAfterPressed (proc:TFPgtkSignalFunction; data:pointer) : guint;
+    function ConnectReleased (proc:TFPgtkSignalFunction; data:pointer) : guint;
+    function ConnectAfterReleased (proc:TFPgtkSignalFunction; data:pointer) : guint;
+    function ConnectEnter (proc:TFPgtkSignalFunction; data:pointer) : guint;
+    function ConnectAfterEnter (proc:TFPgtkSignalFunction; data:pointer) : guint;
+    function ConnectLeave (proc:TFPgtkSignalFunction; data:pointer) : guint;
+    function ConnectAfterLeave (proc:TFPgtkSignalFunction; data:pointer) : guint;
+    procedure Clicked;
+    procedure Pressed;
+    procedure Released;
+    procedure Enter;
+    procedure Leave;
+    constructor Create;
+    constructor CreateWithLabel (aText:string); Overload;
+    constructor CreateWithLabel (aText:string; AccelGroup:PGtkAccelGroup); Overload;
+    property TheLabel : TFPgtkLabel read FLabel;
+    property Text : string read GetText write SetText;
+    property ReliefStyle : TGtkReliefStyle read GetReliefStyle write SetReliefStyle;
+    property AddContainer : TFPgtkContainer read FAddContainer write FAddContainer;
+    property AccelKey : guint read FAccelKey;
+  end;
+
+
+  TFPgtkToggleButton = class (TFPgtkButton)
+  Private
+    function GetActive : boolean;
+    procedure SetActive (TheValue : boolean);
+    function GetDrawIndicator : boolean;
+    procedure SetDrawIndicator (TheValue : boolean);
+  Protected
+    procedure CreateGtkObject; override;
+  Public
+    function TheGtkObject : PGtkToggleButton;
+    function ConnectToggled (proc:TFPgtkSignalFunction; data:pointer) : guint;
+    function ConnectAfterToggled (proc:TFPgtkSignalFunction; data:pointer) : guint;
+    procedure Toggled;
+    property Active : boolean read GetActive write SetActive;
+    property DrawIndicator : boolean read GetDrawIndicator write SetDrawIndicator;
+  end;
+
+
+  TFPgtkCheckButton = class (TFPgtkToggleButton)
+  Protected
+    procedure CreateGtkObject; override;
+  Public
+    function TheGtkObject : PGtkCheckButton;
+  end;
+
+
+  TFPgtkRadioButton = class (TFPgtkCheckButton)
+  Protected
+    procedure CreateGtkObject; Override;
+  Public
+    function TheGtkObject : PGtkRadioButton;
+    FGroup:TFPgtkRadioButtonGroup;
+    constructor Create (AGroup:TFPgtkRadioButtonGroup);
+    constructor CreateWithLabel (AGroup:TFPgtkRadioButtonGroup; aText:string);
+  end;
+
+
+  TFPgtkRadioButtonGroup = class (TFPgtkWidgetGroup)
+  Private
+    function GetItem(index:integer) : TFPgtkRadioButton;
+    procedure SetItem (index:integer; TheValue : TFPgtkRadioButton);
+  Public
+    property Items [index:integer]  : TFPgtkRadioButton read GetItem write SetItem;
+    function ActiveButtonText : string;
+    function ActiveButtonIndex : integer;
+    function ActiveButton : TFPgtkRadioButton;
+  end;
+
+
+  TFPgtkOptionMenu = class (TFPgtkButton)
+  Private
+    function GetMenu : TFPgtkMenu;
+    procedure setmenu (TheValue : TFPgtkMenu);
+  Protected
+    procedure CreateGtkObject; override;
+  Public
+    function TheGtkObject : PGtkOptionMenu;
+    property Menu : TFPgtkMenu read GetMenu write setmenu;
+    procedure RemoveMenu;
+    procedure SetHistory (index:integer);
+    procedure Clear;
+  end;
+
+  TFPgtkItemClass = class of TFPgtkItem;
+
+  TFPgtkItem = class (TFPgtkBin)
+  Private
+    FAccelKey : guint;
+    FAddContainer : TFPgtkContainer;
+    FLabel : TFPgtkLabel;
+    procedure CreateLabel (aText:string);
+    function GetText : string;
+    procedure SetText (TheValue : string);
+  Protected
+    function LabelClass : TFPgtkLabelClass; Virtual;
+    procedure NotifyDestroy (AnObject:TFPgtkObject); Override;
+    procedure LabelCreated; Virtual;
+  Public
+    function TheGtkObject : PGtkItem;
+    function ConnectSelect (proc:TFPgtkSignalFunction; data:pointer) : guint;
+    function ConnectAfterSelect (proc:TFPgtkSignalFunction; data:pointer) : guint;
+    function ConnectDeselect (proc:TFPgtkSignalFunction; data:pointer) : guint;
+    function ConnectAfterDeselect (proc:TFPgtkSignalFunction; data:pointer) : guint;
+    function ConnectToggle (proc:TFPgtkSignalFunction; data:pointer) : guint;
+    function ConnectAfterToggle (proc:TFPgtkSignalFunction; data:pointer) : guint;
+    procedure Select;
+    procedure Deselect;
+    procedure Toggle;
+    constructor Create;
+    constructor CreateWithLabel (aText:string);
+    property TheLabel : TFPgtkLabel read FLabel;
+    property Text : string read GetText write SetText;
+    property AddContainer : TFPgtkContainer read FAddContainer write FAddContainer;
+    property AccelKey : guint read FAccelKey;
+  end;
+
+
+  TFPgtkItemGroup = class (TFPgtkWidgetGroup)
+  Private
+    FItemClass : TFPgtkItemClass;
+    function GetItem(index:integer) : TFPgtkItem;
+    procedure SetItem (index:integer; TheValue : TFPgtkItem);
+  Public
+    property Items [index:integer]  : TFPgtkItem read GetItem write SetItem;
+    procedure FillFromList (aList:TStrings);
+    procedure FillFromCommaText (aList:string);
+    procedure FillFromArray (aList:array of string);
+    property ItemClass : TFPgtkItemClass read FItemClass write FItemClass;
+    procedure SignalConnect (Signal:string; proc:TFPgtkSignalFunction; data:pointer);
+    constructor create (AnItemClass:TFPgtkItemClass);
+    function AddTextItem (aText:string) : TFPgtkItem;
+  end;
+
+
+  TFPgtkMenuItem = class (TFPgtkItem)
+  Private
+    function GetPlacement : TGtkSubmenuPlacement;
+    procedure SetPlacement (TheValue : TGtkSubmenuPlacement);
+    function GetToggleIndicator : boolean;
+    procedure SetToggleIndicator (TheValue : boolean);
+    function GetSubMenuIndicator : boolean;
+    procedure SetSubMenuIndicator (TheValue : boolean);
+    function GetJustifyRight : boolean;
+    procedure SetJustifyRight (TheValue : boolean);
+    function GetSubMenu : TFPgtkMenuShell;
+    procedure SetPropSubMenu (TheValue : TFPgtkMenuShell);
+  Protected
+    procedure CreateGtkObject; override;
+    function LabelClass : TFPgtkLabelClass; Override;
+    procedure LabelCreated; Override;
+  Public
+    function TheGtkObject : PGtkMenuItem;
+    function ConnectActivate (proc:TFPgtksignalFunction; data:pointer) : guint;
+    function ConnectAfterActivate (proc:TFPgtksignalFunction; data:pointer) : guint;
+    function ConnectActivateItem (proc:TFPgtksignalFunction; data:pointer) : guint;
+    function ConnectAfterActivateItem (proc:TFPgtksignalFunction; data:pointer) : guint;
+    procedure Activate;
+    procedure SetSubMenu (aSubMenu:TFPgtkWidget);
+    procedure RemoveSubMenu;
+    procedure Configure (ShowToggleIndicator:boolean; ShowSubmenuIndicator:boolean);
+    procedure RightJustify;
+    property Placement : TGtkSubmenuPlacement read GetPlacement write SetPlacement;
+    property ToggleIndicator : boolean read GetToggleIndicator write SetToggleIndicator;
+    property SubMenuIndicator : boolean read GetSubMenuIndicator write SetSubMenuIndicator;
+    property JustifyRight : boolean read GetJustifyRight write SetJustifyRight;
+    property SubMenu : TFPgtkMenuShell read GetSubMenu write SetPropSubMenu;
+  end;
+
+
+  TFPgtkCheckMenuItem = class (TFPgtkMenuItem)
+  Private
+    function GetActive : boolean;
+    procedure SetActive (TheValue : boolean);
+    function GetShowToggle : boolean;
+    procedure SetShowToggle (TheValue : boolean);
+  Protected
+    procedure CreateGtkObject; override;
+  Public
+    function TheGtkObject : PGtkCheckMenuItem;
+    function ConnectToggled (proc:TFPgtksignalFunction; data:pointer) : guint;
+    function ConnectAfterToggled (proc:TFPgtksignalFunction; data:pointer) : guint;
+    procedure Toggled;
+    property Active : boolean read GetActive write SetActive;
+    property ShowToggle : boolean read GetShowToggle write SetShowToggle;
+  end;
+
+
+  TFPgtkRadioMenuItem = class (TFPgtkCheckMenuItem)
+  Private
+    FGroup : TFPgtkRadioMenuGroup;
+  Protected
+    procedure CreateGtkObject; Override;
+  Public
+    function TheGtkObject : PGtkRadioMenuItem;
+    constructor Create (AGroup:TFPgtkRadioMenuGroup);
+    constructor CreateWithLabel (Agroup:TFPgtkRadioMenuGroup; aText:string);
+    property Group : TFPgtkRadioMenuGroup read FGroup;
+  end;
+
+
+  TFPgtkRadioMenuGroup = class (TFPgtkItemGroup)
+  Private
+    function GetItem(index:integer) : TFPgtkRadioMenuItem;
+    procedure SetItem (index:integer; TheValue : TFPgtkRadioMenuItem);
+  Public
+    property Items [index:integer]  : TFPgtkRadioMenuItem read GetItem write SetItem;
+    function ActiveMenuText : string;
+    function ActiveMenuIndex : integer;
+    function ActiveMenu : TFPgtkRadioMenuItem;
+    constructor create;
+  end;
+
+
+  TFPgtkTearOffMenuItem = class (TFPgtkMenuItem)
+  Protected
+    procedure CreateGtkObject; override;
+  Public
+    function TheGtkObject : PGtkTearOffMenuItem;
+  end;
+
+  TFPgtkScrollSignalFunction = procedure (Sender:TFPgtkObject; ScrollType:TgtkScrollType; position:gfloat; data:pointer) of Object;
+  TFPgtkScrollBooleanSignalFunction = procedure (Sender:TFPgtkObject; ScrolType:TgtkScrollType; Position:gfloat; AutoStartSelection:boolean; data:pointer) of Object;
+
+  TFPgtkListItem = class (TFPgtkItem)
+  Protected
+    procedure CreateGtkObject; override;
+  Public
+    function TheGtkObject : PGtkListItem;
+    function ScrollSignalConnect (Signal:string; Proc:TFPgtkScrollSignalFunction; data:pointer) : guint;
+    function ScrollSignalConnectAfter (Signal:string; Proc:TFPgtkScrollSignalFunction; data:pointer) : guint;
+    function ScrollBooleanSignalConnect (Signal:string; Proc:TFPgtkScrollBooleanSignalFunction; data:pointer) : guint;
+    function ScrollBooleanSignalConnectAfter (Signal:string; Proc:TFPgtkScrollBooleanSignalFunction; data:pointer) : guint;
+    function ConnectToggleFocusRow (proc:TFPgtkSignalFunction; data:pointer) : guint;
+    function ConnectAfterToggleFocusRow (proc:TFPgtkSignalFunction; data:pointer) : guint;
+    function ConnectSelectAll (proc:TFPgtkSignalFunction; data:pointer) : guint;
+    function ConnectAfterSelectAll (proc:TFPgtkSignalFunction; data:pointer) : guint;
+    function ConnectUnselectAll (proc:TFPgtkSignalFunction; data:pointer) : guint;
+    function ConnectAfterUnselectAll (proc:TFPgtkSignalFunction; data:pointer) : guint;
+    function ConnectUndoSelection (proc:TFPgtkSignalFunction; data:pointer) : guint;
+    function ConnectAfterUndoSelection (proc:TFPgtkSignalFunction; data:pointer) : guint;
+    function ConnectStartSelection (proc:TFPgtkSignalFunction; data:pointer) : guint;
+    function ConnectAfterStartSelection (proc:TFPgtkSignalFunction; data:pointer) : guint;
+    function ConnectEndSelection (proc:TFPgtkSignalFunction; data:pointer) : guint;
+    function ConnectAfterEndSelection (proc:TFPgtkSignalFunction; data:pointer) : guint;
+    function ConnectToggleAddMode (proc:TFPgtkSignalFunction; data:pointer) : guint;
+    function ConnectAfterToggleAddMode (proc:TFPgtkSignalFunction; data:pointer) : guint;
+    function ConnectExtendSelection (proc:TFPgtkScrollBooleanSignalFunction; data:pointer) : guint;
+    function ConnectAfterExtendSelection (proc:TFPgtkScrollBooleanSignalFunction; data:pointer) : guint;
+    function ConnectScrollVertical (proc:TFPgtkScrollSignalFunction; data:pointer) : guint;
+    function ConnectAfterScrollVertical (proc:TFPgtkScrollSignalFunction; data:pointer) : guint;
+    function ConnectScrollHorizontal (proc:TFPgtkScrollSignalFunction; data:pointer) : guint;
+    function ConnectAfterScrollHorizontal (proc:TFPgtkScrollSignalFunction; data:pointer) : guint;
+    procedure Select;
+    procedure Deselect;
+  end;
+
+
+  TFPgtkListItemGroup = class (TFPgtkItemGroup)
+  Public
+    constructor create;
+  end;
+
+
+  TFPgtkTreeItem = class (TFPgtkItem)
+  Private
+    function GetSubTree : TFPgtkWidget;
+    procedure SetSubTree (TheValue : TFPgtkWidget);
+    function GetPixPlus : TFPgtkWidget;
+    function GetPixMinus : TFPgtkWidget;
+    function GetExpanded : boolean;
+    procedure SetExpanded (TheValue : boolean);
+  Protected
+    procedure CreateGtkObject; override;
+  Public
+    function TheGtkObject : PGtkTreeItem;
+    property SubTree : TFPgtkWidget read GetSubTree write SetSubTree;
+    property PixPlus : TFPgtkWidget read GetPixPlus;
+    property PixMinus : TFPgtkWidget read GetPixMinus;
+    property Expanded : boolean read GetExpanded write SetExpanded;
+    procedure Select;
+    procedure Deselect;
+    procedure Expand;
+    procedure Collapse;
+    function ConnectCollapse (proc:TFPgtkSignalFunction; data:pointer) : guint;
+    function ConnectAfterCollapse (proc:TFPgtkSignalFunction; data:pointer) : guint;
+    function ConnectExpand (proc:TFPgtkSignalFunction; data:pointer) : guint;
+    function ConnectAfterExpand (proc:TFPgtkSignalFunction; data:pointer) : guint;
+  end;
+
+  DialogResultCallback = procedure (Sender:TFPgtkWindow; DialogResult:pointer; 
+                                    Action:integer; initiator:TFPgtkObject) of object;
+  DialogInitCallback = procedure (Sender : TFPgtkWindow; InitData : pointer) of object;
+  TFPgtkWindowClass = class of TFPgtkWindow;
+
+  TFPgtkWindow = class (TFPgtkBin)
+  Private
+    FAccelGroups:TList;
+    FMainLevel : guint;
+    FModalAction : integer;
+    FOnDialogInit : DialogInitCallback;
+    FOnDialogResult : DialogResultCallback;
+    FDialogResult : pointer;
+    TheWindowType:TGtkWindowType;
+    function GetWindowType : TGtkWindowType;
+    procedure SetWindowType (TheValue : TGtkWindowType);
+    function GetTitle : string;
+    procedure SetTitle (TheValue : string);
+    function GetModal : boolean;
+    procedure SetModal (TheValue : boolean);
+    procedure SetModalAction (TheValue : integer);
+    procedure ExecuteEnds (Sender:TFPgtkObject; data:pointer);
+    function GetUserSizable : boolean;
+    procedure SetUserSizable (TheValue : boolean);
+    function GetPosition : TGtkWindowPosition;
+    procedure SetPosition (TheValue : TGtkWindowPosition);
+    function GetAccelGroups(ID:integer) : PGtkAccelGroup;
+  Protected
+    procedure CreateGtkObject; override;
+    property DialogResult : pointer read FDialogResult write FDialogResult;
+    procedure DoDialogResult (Action:integer; Sender:TFPgtkObject); Virtual;
+    procedure DoDialogInit (InitData:pointer); Virtual;
+  Public
+    function TheGtkObject : PGtkWindow;
+    constructor Create (AType:TGtkWindowType);
+    destructor Destroy; Override;
+    property WindowType : TGtkWindowType read GetWindowType write SetWindowType;
+    property Title : string read GetTitle write SetTitle;
+    property Modal : boolean read GetModal write SetModal;
+    property OnDialogResult : DialogResultCallback read FOnDialogResult write FOnDialogResult;
+    property OnDialogInit : DialogInitCallback read FOnDialogInit write FOnDialogInit;
+    procedure Close;
+    procedure CloseWindow (Sender:TFPgtkObject; data:pointer);
+    procedure CloseWithResult (Sender:TFPgtkObject; data:pointer);
+    property ModalAction : integer read FModalAction write SetModalAction;
+    property MainLevel : guint read FMainLevel;
+    function Execute (anOnDialogInit:DialogInitCallBack; anInitData:pointer; anOnDialogResult:DialogResultCallBack) : integer;
+    function ConnectSetFocus (proc:TFPgtkWidgetSignalFunction; data:pointer) : guint;
+    function ConnectAfterSetFocus (proc:TFPgtkWidgetSignalFunction; data:pointer) : guint;
+    procedure SetTransientFor (aParent:TFPgtkWindow);
+    procedure DefaultWidget (Widget:TFPgtkWidget);
+    procedure FocusedWidget (NewFocus:TFPgtkWidget);
+    property UserSizable : boolean read GetUserSizable write SetUserSizable;
+    procedure ActivateFocus;
+    procedure ActivateDefault;
+    procedure SetDefaultSize (Width:gint; Height:gint);
+    property Position : TGtkWindowPosition read GetPosition write SetPosition;
+    property AccelGroups [ID:integer]  : PGtkAccelGroup read GetAccelGroups;
+    function AccelGroupNew : integer;
+    procedure AccelGroupDelete (ID:integer);
+    procedure AcceleratorAdd (AG:integer; aWidget:TFPgtkWidget; aSignal:string; Key:guint; Mods:TGdkModifierType; acFlags:TGtkAccelFlags); Overload;
+    procedure AcceleratorRemove (AG:integer; aWidget:TFPgtkWidget; Key:guint; Mods:TGdkModifierType); Overload;
+    procedure AccelGroupLock (AG:integer);
+    procedure AccelGroupUnlock (AG:integer);
+    procedure AccelGroupActivate (AG:integer; Key:guint; Mods:TGdkModifierType);
+  end;
+
+
+  TFPgtkColorSelectionDialog = class (TFPgtkWindow)
+  Private
+    function GetColorSel : TFPgtkColorSelection;
+    function GetButtonOK : TFPgtkButton;
+    function GetButtonCancel : TFPgtkButton;
+    function GetButtonHelp : TFPgtkButton;
+  Protected
+    procedure CreateGtkObject; override;
+  Public
+    function TheGtkObject : PGtkColorSelectionDialog;
+    property ColorSel : TFPgtkColorSelection read GetColorSel;
+    property ButtonOK : TFPgtkButton read GetButtonOK;
+    property ButtonCancel : TFPgtkButton read GetButtonCancel;
+    property ButtonHelp : TFPgtkButton read GetButtonHelp;
+  end;
+
+
+  TFPgtkDialog = class (TFPgtkWindow)
+  Private
+    function GetActionArea : TFPgtkHBox;
+    function GetVBox : TFPgtkVBox;
+  Protected
+    procedure CreateGtkObject; override;
+  Public
+    function TheGtkObject : PGtkDialog;
+    property ActionArea : TFPgtkHBox read GetActionArea;
+    property VBox : TFPgtkVBox read GetVBox;
+    constructor create;
+  end;
+
+  TFPgtkDeviceSignalFunction = procedure (Sender:TFPgtkInputDialog; DeviceID:integer; Data:pointer) of Object;
+
+  TFPgtkInputDialog = class (TFPgtkDialog)
+  Private
+    function GetButtonClose : TFPgtkButton;
+    function GetButtonSave : TFPgtkButton;
+  Protected
+    procedure CreateGtkObject; override;
+  Public
+    function TheGtkObject : PGtkInputDialog;
+    property ButtonClose : TFPgtkButton read GetButtonClose;
+    property ButtonSave : TFPgtkButton read GetButtonSave;
+    function DeviceSignalConnect (Signal:string; Proc:TFPgtkDeviceSignalFunction; data:pointer) : guint;
+    function DeviceSignalConnectAfter (Signal:string; Proc:TFPgtkDeviceSignalFunction; data:pointer) : guint;
+    function ConnectEnableDevice (proc:TFPgtkDeviceSignalFunction; data:pointer) : guint;
+    function ConnectAfterEnableDevice (proc:TFPgtkDeviceSignalFunction; data:pointer) : guint;
+    function ConnectDisableDevice (proc:TFPgtkDeviceSignalFunction; data:pointer) : guint;
+    function ConnectAfterDisableDevice (proc:TFPgtkDeviceSignalFunction; data:pointer) : guint;
+  end;
+
+
+  TFPgtkFileSelection = class (TFPgtkWindow)
+  Private
+    function GetFilename : string;
+    procedure SetFilename (TheValue : string);
+    function GetDirList : TFPgtkCList;
+    function GetFileList : TFPgtkCList;
+    function GetOkButton : TFPgtkButton;
+    function GetCancelButton : TFPgtkButton;
+    function GetHistoryPulldown : TFPgtkOptionMenu;
+    function GetFileOpDialog : TFPgtkDialog;
+    function GetFileOpCreateDir : TFPgtkButton;
+    function GetFileOpDelFile : TFPgtkButton;
+    function GetFileOpRenFile : TFPgtkButton;
+  Protected
+    procedure CreateGtkObject; override;
+  Public
+    function TheGtkObject : PGtkFileSelection;
+    property Filename : string read GetFilename write SetFilename;
+    procedure Complete (Pattern:string);
+    procedure ShowFileOpButtons;
+    procedure HideFileOpButtons;
+    property DirList : TFPgtkCList read GetDirList;
+    property FileList : TFPgtkCList read GetFileList;
+    property OkButton : TFPgtkButton read GetOkButton;
+    property CancelButton : TFPgtkButton read GetCancelButton;
+    property HistoryPulldown : TFPgtkOptionMenu read GetHistoryPulldown;
+    property FileOpDialog : TFPgtkDialog read GetFileOpDialog;
+    property FileOpCreateDir : TFPgtkButton read GetFileOpCreateDir;
+    property FileOpDelFile : TFPgtkButton read GetFileOpDelFile;
+    property FileOpRenFile : TFPgtkButton read GetFileOpRenFile;
+  end;
+
+
+  TFPgtkFontSelectionDialog = class (TFPgtkWindow)
+  Private
+    function GetFontSel : TFPgtkFontSelection;
+    function GetButtonOk : TFPgtkButton;
+    function GetButtonApply : TFPgtkButton;
+    function GetButtonCancel : TFPgtkButton;
+  Protected
+    procedure CreateGtkObject; override;
+  Public
+    function TheGtkObject : PGtkFontSelectionDialog;
+    property FontSel : TFPgtkFontSelection read GetFontSel;
+    property ButtonOk : TFPgtkButton read GetButtonOk;
+    property ButtonApply : TFPgtkButton read GetButtonApply;
+    property ButtonCancel : TFPgtkButton read GetButtonCancel;
+  end;
+
+
+  TFPgtkEventBox = class (TFPgtkBin)
+  Protected
+    procedure CreateGtkObject; override;
+  Public
+    function TheGtkObject : PGtkEventBox;
+  end;
+
+
+  TFPgtkHandleBox = class (TFPgtkBin)
+  Private
+    function GetShadowType : TGtkShadowtype;
+    procedure SetShadowType (TheValue : TGtkShadowtype);
+    function GetHandlePosition : TGtkPositionType;
+    procedure SetHandlePosition (TheValue : TGtkPositionType);
+    function GetSnapEdge : TGtkPositionType;
+    procedure SetSnapEdge (TheValue : TGtkPositionType);
+    function GetChildDetached : boolean;
+  Protected
+    procedure CreateGtkObject; override;
+  Public
+    function TheGtkObject : PGtkHandleBox;
+    property ShadowType : TGtkShadowtype read GetShadowType write SetShadowType;
+    property HandlePosition : TGtkPositionType read GetHandlePosition write SetHandlePosition;
+    property SnapEdge : TGtkPositionType read GetSnapEdge write SetSnapEdge;
+    property ChildDetached : boolean read GetChildDetached;
+    function ConnectChildAttached (proc:TFPgtkWidgetSignalFunction; data:pointer) : guint;
+    function ConnectAfterChildAttached (proc:TFPgtkWidgetSignalFunction; data:pointer) : guint;
+    function ConnectChildDetached (proc:TFPgtkWidgetSignalFunction; data:pointer) : guint;
+    function ConnectAfterChildDetached (proc:TFPgtkWidgetSignalFunction; data:pointer) : guint;
+  end;
+
+
+  TFPgtkScrolledWindow = class (TFPgtkBin)
+  Private
+    FVScroll:TFPgtkAdjustment;
+    FHScroll:TFPgtkAdjustment;
+    function GetHPolicy : TGtkPolicyType;
+    procedure SetHPolicy (TheValue : TGtkPolicyType);
+    function GetVPolicy : TGtkPolicyType;
+    procedure SetVPolicy (TheValue : TGtkPolicyType);
+    function GetHAdjustment : TFPgtkAdjustment;
+    procedure SetHAdjustment (TheValue : TFPgtkAdjustment);
+    function GetVAdjustment : TFPgtkAdjustment;
+    procedure SetVAdjustment (TheValue : TFPgtkAdjustment);
+    function GetPlacement : TGtkCornerType;
+    procedure SetPlacement (TheValue : TGtkCornerType);
+    function GetHScrollbar : TFPgtkScrollbar;
+    function GetVScrollbar : TFPgtkScrollbar;
+  Protected
+    procedure CreateGtkObject; Override;
+  Public
+    function TheGtkObject : PGtkScrolledWindow;
+    constructor Create (hadj:TFPgtkAdjustment; vadj:TFPgtkAdjustment);
+    property HPolicy : TGtkPolicyType read GetHPolicy write SetHPolicy;
+    property VPolicy : TGtkPolicyType read GetVPolicy write SetVPolicy;
+    procedure SetPolicy (aHScrollBar:TGtkPolicyType; aVScrollbar:TGtkPolicyType); Overload;
+    procedure SetPolicy (aPolicy:TGtkPolicyType); Overload;
+    property HAdjustment : TFPgtkAdjustment read GetHAdjustment write SetHAdjustment;
+    property VAdjustment : TFPgtkAdjustment read GetVAdjustment write SetVAdjustment;
+    procedure AddWithViewport (aChild:TFPgtkWidget);
+    property Placement : TGtkCornerType read GetPlacement write SetPlacement;
+    property HScrollbar : TFPgtkScrollbar read GetHScrollbar;
+    property VScrollbar : TFPgtkScrollbar read GetVScrollbar;
+    procedure UpdatePolicy (UpdPolicy:TGtkUpdateType);
+  end;
+
+
+  TFPgtkViewport = class (TFPgtkBin)
+  Private
+    FVScroll:TFPgtkAdjustment;
+    FHScroll:TFPgtkAdjustment;
+    function GetHAdjustment : TFPgtkAdjustment;
+    procedure SetHAdjustment (TheValue : TFPgtkAdjustment);
+    function GetVAdjustment : TFPgtkAdjustment;
+    procedure SetVAdjustment (TheValue : TFPgtkAdjustment);
+    function GetShadowType : TgtkShadowType;
+    procedure SetShadowType (TheValue : TgtkShadowType);
+  Protected
+    procedure CreateGtkObject; Override;
+  Public
+    function TheGtkObject : PGtkViewport;
+    constructor Create (hadj:TFPgtkAdjustment; vadj:TFPgtkAdjustment);
+    property HAdjustment : TFPgtkAdjustment read GetHAdjustment write SetHAdjustment;
+    property VAdjustment : TFPgtkAdjustment read GetVAdjustment write SetVAdjustment;
+    property ShadowType : TgtkShadowType read GetShadowType write SetShadowType;
+  end;
+
+
+  TFPgtkBox = class (TFPgtkContainer)
+  Private
+    function GetHomogeneous : boolean;
+    procedure SetHomogeneous (TheValue : boolean);
+    function GetSpacing : integer;
+    procedure SetSpacing (TheValue : integer);
+  Public
+    function TheGtkObject : PGtkBox;
+    property Homogeneous : boolean read GetHomogeneous write SetHomogeneous;
+    property Spacing : integer read GetSpacing write SetSpacing;
+    procedure ReorderChild (Widget:TFPgtkWidget; Position:integer);
+    procedure GetChildPacking (Widget:TFPgtkWidget; var Expand:boolean; var Fill:boolean; var Padding:integer; var PackType:TGtkPackType);
+    procedure SetChildPacking (Widget:TFPgtkWidget; Expand:boolean; Fill:boolean; Padding:integer; PackType:TGtkPackType);
+    procedure PackStart (Widget:TFPgtkWidget); Overload;
+    procedure PackStart (Widget:TFPgtkWidget; IsVisible:boolean); Overload;
+    procedure PackStart (Widget:TFPgtkWidget; expand:boolean; fill:boolean; padding:integer); Overload;
+    procedure PackStart (Widget:TFPgtkWidget; expand:boolean; fill:boolean; padding:integer; IsVisible:boolean); Overload;
+    procedure PackEnd (Widget:TFPgtkWidget); Overload;
+    procedure PackEnd (Widget:TFPgtkWidget; IsVisible:boolean); Overload;
+    procedure PackEnd (Widget:TFPgtkWidget; expand:boolean; fill:boolean; padding:integer); Overload;
+    procedure PackEnd (Widget:TFPgtkWidget; expand:boolean; fill:boolean; padding:integer; IsVisible:boolean); Overload;
+  end;
+
+
+  TFPgtkButtonBox = class (TFPgtkBox)
+  Private
+    function GetSpacing : integer;
+    procedure SetSpacing (TheValue : integer);
+    function GetLayout : TGtkButtonBoxStyle;
+    procedure SetLayout (TheValue : TGtkButtonBoxStyle);
+    function GetMinWidth : integer;
+    procedure SetMinWidth (TheValue : integer);
+    function GetMinHeight : integer;
+    procedure SetMinHeight (TheValue : integer);
+    function GetChildPadX : integer;
+    procedure SetChildPadX (TheValue : integer);
+    function GetChildPadY : integer;
+    procedure SetChildPadY (TheValue : integer);
+  Public
+    function TheGtkObject : PGtkButtonBox;
+    property Spacing : integer read GetSpacing write SetSpacing;
+    property Layout : TGtkButtonBoxStyle read GetLayout write SetLayout;
+    property ChildMinWidth : integer read GetMinWidth write SetMinWidth;
+    property ChildMinHeight : integer read GetMinHeight write SetMinHeight;
+    property ChildPadX : integer read GetChildPadX write SetChildPadX;
+    property ChildPadY : integer read GetChildPadY write SetChildPadY;
+  end;
+
+
+  TFPgtkHButtonBox = class (TFPgtkButtonBox)
+  Protected
+    procedure CreateGtkObject; override;
+  Public
+    function TheGtkObject : PGtkHButtonBox;
+  end;
+
+
+  TFPgtkVButtonBox = class (TFPgtkButtonBox)
+  Protected
+    procedure CreateGtkObject; override;
+  Public
+    function TheGtkObject : PGtkVButtonBox;
+  end;
+
+
+  TFPgtkVBox = class (TFPgtkBox)
+  Protected
+    procedure CreateGtkObject; override;
+  Public
+    function TheGtkObject : PGtkVBox;
+  end;
+
+
+  TFPgtkColorSelection = class (TFPgtkVBox)
+  Private
+    function GetUpdatePolicy : TGtkUpdateType;
+    procedure SetUpdatePolicy (TheValue : TGtkUpdateType);
+    function GetColor : double;
+    procedure SetColor (TheValue : double);
+    function GetUseOpacity : longbool;
+    procedure SetUseOpacity (TheValue : longbool);
+  Protected
+    procedure CreateGtkObject; override;
+  Public
+    function TheGtkObject : PGtkColorSelection;
+    property UpdatePolicy : TGtkUpdateType read GetUpdatePolicy write SetUpdatePolicy;
+    property Color : double read GetColor write SetColor;
+    property UseOpacity : longbool read GetUseOpacity write SetUseOpacity;
+  end;
+
+
+  TFPgtkGammaCurve = class (TFPgtkVBOX)
+  Protected
+    procedure CreateGtkObject; override;
+  Public
+    function TheGtkObject : PGtkGammaCurve;
+  end;
+
+
+  TFPgtkHBox = class (TFPgtkBox)
+  Protected
+    procedure CreateGtkObject; override;
+  Public
+    function TheGtkObject : PGtkHBox;
+  end;
+
+
+  TFPgtkCombo = class (TFPgtkHBox)
+  Private
+    function GetEntry : TFPgtkEntry;
+    function GetList : TFPgtkList;
+    function GetButton : TFpGtkButton;
+    function GetValueInList : longbool;
+    procedure SetValueInListProp (TheValue : longbool);
+    function GetOkIfEmpty : longbool;
+    procedure SetOkIfEmpty (TheValue : longbool);
+    function GetUseArrows : longbool;
+    procedure SetUseArrows (TheValue : longbool);
+    function GetUseArrowsAlways : longbool;
+    procedure SetUseArrowsAlways (TheValue : longbool);
+    function GetCaseSensitive : longbool;
+    procedure SetCaseSensitive (TheValue : longbool);
+  Protected
+    procedure CreateGtkObject; override;
+  Public
+    function TheGtkObject : PGtkCombo;
+    property Entry : TFPgtkEntry read GetEntry;
+    property List : TFPgtkList read GetList;
+    property Button : TFpGtkButton read GetButton;
+    property ValueInList : longbool read GetValueInList write SetValueInListProp;
+    property OkIfEmpty : longbool read GetOkIfEmpty write SetOkIfEmpty;
+    property UseArrows : longbool read GetUseArrows write SetUseArrows;
+    property UseArrowsAlways : longbool read GetUseArrowsAlways write SetUseArrowsAlways;
+    property CaseSensitive : longbool read GetCaseSensitive write SetCaseSensitive;
+    procedure SetItemString (Item:TFPgtkItem; ItemValue:string);
+    procedure DisableActivate;
+    procedure SetValueInList (Val:longbool; IsOkIfEmpty:longbool);
+  end;
+
+  TFPgtkStatusbarSignalFunction = procedure (Sender:TFPgtkObject; contextID:integer; text:string; data:pointer) of Object;
+
+  TFPgtkStatusbar = class (TFPgtkHBox)
+  Protected
+    procedure CreateGtkObject; override;
+  Public
+    function TheGtkObject : PGtkStatusbar;
+    function GetContextID (ContextDescr:string) : integer;
+    function Push (contextID:integer; text:string) : integer;
+    procedure Pop (contextID:integer);
+    procedure Remove (contextID:integer; MessageID:integer);
+    function StatusbarSignalConnect (Signal:string; Proc:TFPgtkStatusbarSignalFunction; data:pointer) : guint;
+    function StatusbarSignalConnectAfter (Signal:string; Proc:TFPgtkStatusbarSignalFunction; data:pointer) : guint;
+    function ConnectTextPopped (proc:TFPgtkStatusbarSignalFunction; data:pointer) : guint;
+    function ConnectAfterTextPopped (proc:TFPgtkStatusbarSignalFunction; data:pointer) : guint;
+    function ConnectTextPushed (proc:TFPgtkStatusbarSignalFunction; data:pointer) : guint;
+    function ConnectAfterTextPushed (proc:TFPgtkStatusbarSignalFunction; data:pointer) : guint;
+  end;
+
+  TFPgtkCListScrollSignalFunction = procedure (Sender:TFPgtkObject; ScrollType:TgtkScrollType; position:gfloat; data:pointer) of Object;
+  TFPgtkCListScrollBooleanSignalFunction = procedure (Sender:TFPgtkObject; ScrollType:TgtkScrollType; Position:gfloat; AutoStartSelection:boolean; data:pointer) of Object;
+  TFPgtkSelectRowSignalFunction = procedure (Sender:TFPgtkObject; row:integer; column:integer; event:PGdkEventButton; data:pointer) of Object;
+  TFPgtkMoveSignalFunction = procedure (Sender:TFPgtkObject; arg1:integer; arg2:integer; data:pointer) of Object;
+  TFPgtkColumnClickedSignalFunction = procedure (Sender:TFPgtkObject; column:integer; data:pointer) of Object;
+  TFPgtkResizeColumnSignalFunction = procedure (Sender:TFPgtkObject; column:integer; width:integer; data:pointer) of Object;
+
+  TFPgtkCList = class (TFPgtkContainer)
+  Private
+    compare : TGtkCListCompareFunc;
+    FColumnCount : integer;
+    function GetShadowType : TGtkShadowType;
+    procedure SetShadowType (TheValue : TGtkShadowType);
+    function GetSelectionMode : TGtkSelectionMode;
+    procedure SetSelectionMode (TheValue : TGtkSelectionMode);
+    function GetColumnTitle(column:integer) : string;
+    procedure SetColumnTitle (column:integer; TheValue : string);
+    function GetColumnWidget(column:integer) : TFPgtkWidget;
+    procedure SetColumnWidget (column:integer; TheValue : TFPgtkWidget);
+    function GetCellText(Row:integer; Column:integer) : string;
+    procedure SetCellText (Row:integer; Column:integer; TheValue : string);
+    function GetCellStyle(row:integer; column:integer) : PGtkStyle;
+    procedure SetCellStyle (row:integer; column:integer; TheValue : PGtkStyle);
+    function GetRowStyle(row:integer) : PGtkStyle;
+    procedure SetRowStyle (row:integer; TheValue : PGtkStyle);
+    function GetRowData(row:integer) : pointer;
+    procedure SetRowData (row:integer; TheValue : pointer);
+    procedure SetCompareFunc (TheValue : TGtkCListCompareFunc);
+    function GetSortColumn : integer;
+    procedure SetSortColumn (TheValue : integer);
+    function GetSetSortType : TGtkSortType;
+    procedure SetSetSortType (TheValue : TGtkSortType);
+    function GetHAdjustment : TFPgtkAdjustment;
+    procedure SetHAdjustment (TheValue : TFPgtkAdjustment);
+    function GetVAdjustment : TFPgtkAdjustment;
+    procedure SetVAdjustment (TheValue : TFPgtkAdjustment);
+  Protected
+    procedure CreateGtkObject; override;
+  Public
+    function TheGtkObject : PGtkCList;
+    constructor Create (aColumnCount:integer);
+    property ColumnCount : integer read FColumnCount;
+    property ShadowType : TGtkShadowType read GetShadowType write SetShadowType;
+    property SelectionMode : TGtkSelectionMode read GetSelectionMode write SetSelectionMode;
+    procedure Freeze;
+    procedure Thaw;
+    procedure ShowTitles;
+    procedure HideTitles;
+    procedure ActiveTitles;
+    procedure PassiveTitles;
+    procedure ActiveTitle (column:integer);
+    procedure PassiveTitle (column:integer);
+    property ColumnTitle [column:integer]  : string read GetColumnTitle write SetColumnTitle;
+    property ColumnWidget [column:integer]  : TFPgtkWidget read GetColumnWidget write SetColumnWidget;
+    procedure SetColumnJustification (column:integer; justification:TGtkJustification);
+    procedure SetColumnVisibility (column:integer; aVisible:boolean);
+    procedure SetColumnResizeable (column:integer; Resizeable:boolean);
+    procedure SetColumnAutoResize (column:integer; autoResize:boolean);
+    function OptimalColumnWidth (column:integer) : integer;
+    procedure SetColumnWidth (column:integer; width:integer);
+    procedure SetColumnMinWidth (column:integer; MinWidth:integer);
+    procedure SetColumnMaxWidth (column:integer; MaxWidth:integer);
+    function AutoSizeColumns : integer;
+    procedure ConfigureColumnWidth (column:integer; Width:integer; MinWidth:integer; MaxWidth:integer);
+    procedure ConfigureColumn (column:integer; Justification:TGtkJustification; Visibility:boolean; Resizeable:boolean; AutoSize:boolean);
+    procedure SetRowHeight (height:integer);
+    procedure MoveTo (row:integer; column:integer; RowAlign:gfloat; ColAlign:gfloat);
+    function RowIsVisible (Row:integer) : TGtkVisibility;
+    function GetCellType (Row:integer; column:integer) : TGtkCellType;
+    property CellText [Row:integer; Column:integer]  : string read GetCellText write SetCellText;
+    procedure SetPixmap (row:integer; column:integer; pixmap:PGdkPixmap; mask:PGdkBitmap);
+    procedure GetPixmap (row:integer; column:integer; var pixmap:PGdkPixmap; var mask:PGdkBitmap);
+    procedure SetPixText (row:integer; column:integer; text:string; spacing:guint8; pixmap:PGdkPixmap; mask:PGdkBitmap);
+    procedure GetPixText (row:integer; column:integer; var text:string; var aspacing:guint8; var pixmap:PGdkPixmap; var mask:PGdkBitmap);
+    procedure SetForeground (row:integer; color:PGdkColor);
+    procedure SetBackground (row:integer; color:PGdkColor);
+    property CellStyle [row:integer; column:integer]  : PGtkStyle read GetCellStyle write SetCellStyle;
+    property RowStyle [row:integer]  : PGtkStyle read GetRowStyle write SetRowStyle;
+    procedure SetShift (row:integer; column:integer; vertical:integer; horizontal:integer);
+    procedure Remove (row:integer);
+    procedure Prepend (Data:TStrings); Overload;
+    procedure Prepend (Text:string; separator:string); Overload;
+    procedure Prepend (data:array of string); Overload;
+    procedure Append (data:TStrings); Overload;
+    procedure Append (Text:string; Separator:string); Overload;
+    procedure Append (data:array of string); Overload;
+    procedure Insert (row:integer; data:TStrings); Overload;
+    procedure Insert (row:integer; Text:string; Separator:string); Overload;
+    procedure Insert (row:integer; data:array of string); Overload;
+    property RowData [row:integer]  : pointer read GetRowData write SetRowData;
+    function FindRowFromData (data:pointer) : integer;
+    procedure SelectRow (row:integer; column:integer);
+    procedure UnselectRow (row:integer; column:integer);
+    procedure Clear;
+    procedure SelectAll;
+    procedure UnselectAll;
+    procedure SwapRows (row1:integer; row2:integer);
+    procedure RowMove (sourceRow:integer; destRow:integer);
+    procedure Sort;
+    property CompareFunc : TGtkCListCompareFunc read compare write SetCompareFunc;
+    property SortColumn : integer read GetSortColumn write SetSortColumn;
+    property SetSortType : TGtkSortType read GetSetSortType write SetSetSortType;
+    procedure SetAutoSort (autoSort:boolean);
+    property HAdjustment : TFPgtkAdjustment read GetHAdjustment write SetHAdjustment;
+    property VAdjustment : TFPgtkAdjustment read GetVAdjustment write SetVAdjustment;
+    procedure SetReorderable (reorderable:boolean);
+    function Count : integer;
+    function CListScrollSignalConnect (Signal:string; Proc:TFPgtkCListScrollSignalFunction; data:pointer) : guint;
+    function CListScrollSignalConnectAfter (Signal:string; Proc:TFPgtkCListScrollSignalFunction; data:pointer) : guint;
+    function CListScrollBooleanSignalConnect (Signal:string; Proc:TFPgtkCListScrollBooleanSignalFunction; data:pointer) : guint;
+    function CListScrollBooleanSignalConnectAfter (Signal:string; Proc:TFPgtkCListScrollBooleanSignalFunction; data:pointer) : guint;
+    function SelectRowSignalConnect (Signal:string; Proc:TFPgtkSelectRowSignalFunction; data:pointer) : guint;
+    function SelectRowSignalConnectAfter (Signal:string; Proc:TFPgtkSelectRowSignalFunction; data:pointer) : guint;
+    function ConnectSelectRow (proc:TFPgtkSelectRowSignalFunction; data:pointer) : guint;
+    function ConnectAfterSelectRow (proc:TFPgtkSelectRowSignalFunction; data:pointer) : guint;
+    function ConnectUnselectRow (proc:TFPgtkSelectRowSignalFunction; data:pointer) : guint;
+    function ConnectAfterUnselectRow (proc:TFPgtkSelectRowSignalFunction; data:pointer) : guint;
+    function MoveSignalConnect (Signal:string; Proc:TFPgtkMoveSignalFunction; data:pointer) : guint;
+    function MoveSignalConnectAfter (Signal:string; Proc:TFPgtkMoveSignalFunction; data:pointer) : guint;
+    function ConnectRowMove (proc:TFPgtkMoveSignalFunction; data:pointer) : guint;
+    function ConnectAfterRowMove (proc:TFPgtkMoveSignalFunction; data:pointer) : guint;
+    function ConnectScrollVertical (proc:TFPgtkCListScrollSignalFunction; data:pointer) : guint;
+    function ConnectAfterScrollVertical (proc:TFPgtkCListScrollSignalFunction; data:pointer) : guint;
+    function ConnectScrolHorizontal (proc:TFPgtkCListScrollSignalFunction; data:pointer) : guint;
+    function ConnectAfterScrolHorizontal (proc:TFPgtkCListScrollSignalFunction; data:pointer) : guint;
+    function ConnectToggleFocusRow (proc:TFPgtkSignalFunction; data:pointer) : guint;
+    function ConnectAfterToggleFocusRow (proc:TFPgtkSignalFunction; data:pointer) : guint;
+    function ConnectSelectAll (proc:TFPgtkSignalFunction; data:pointer) : guint;
+    function ConnectAfterSelectAll (proc:TFPgtkSignalFunction; data:pointer) : guint;
+    function ConnectUnselectAll (proc:TFPgtksignalFunction; data:pointer) : guint;
+    function ConnectAfterUnselectAll (proc:TFPgtksignalFunction; data:pointer) : guint;
+    function ConnectUndoSelection (proc:TFPgtksignalFunction; data:pointer) : guint;
+    function ConnectAfterUndoSelection (proc:TFPgtksignalFunction; data:pointer) : guint;
+    function ConnectStartSelection (proc:TFPgtksignalFunction; data:pointer) : guint;
+    function ConnectAfterStartSelection (proc:TFPgtksignalFunction; data:pointer) : guint;
+    function ConnectEndSelection (proc:TFPgtksignalFunction; data:pointer) : guint;
+    function ConnectAfterEndSelection (proc:TFPgtksignalFunction; data:pointer) : guint;
+    function ConnectToggleAddMode (proc:TFPgtksignalFunction; data:pointer) : guint;
+    function ConnectAfterToggleAddMode (proc:TFPgtksignalFunction; data:pointer) : guint;
+    function ConnectAbortColumnResize (proc:TFPgtksignalFunction; data:pointer) : guint;
+    function ConnectAfterAbortColumnResize (proc:TFPgtksignalFunction; data:pointer) : guint;
+    function ConnectExtendSelection (proc:TFPgtkCListScrollBooleanSignalFunction; data:pointer) : guint;
+    function ConnectAfterExtendSelection (proc:TFPgtkCListScrollBooleanSignalFunction; data:pointer) : guint;
+    function ColumnClickedSignalConnect (Signal:string; Proc:TFPgtkColumnClickedSignalFunction; data:pointer) : guint;
+    function ColumnClickedSignalConnectAfter (Signal:string; Proc:TFPgtkColumnClickedSignalFunction; data:pointer) : guint;
+    function ConnectClickColumn (proc:TFPgtkColumnClickedSignalFunction; data:pointer) : guint;
+    function ConnectAfterClickColumn (proc:TFPgtkColumnClickedSignalFunction; data:pointer) : guint;
+    function ResizeColumnSignalConnect (Signal:string; Proc:TFPgtkResizeColumnSignalFunction; data:pointer) : guint;
+    function ResizeColumnSignalConnectAfter (Signal:string; Proc:TFPgtkResizeColumnSignalFunction; data:pointer) : guint;
+    function ConnectResizeColumn (proc:TFPgtkResizeColumnSignalFunction; data:pointer) : guint;
+    function ConnectAfterResizeColumn (proc:TFPgtkResizeColumnSignalFunction; data:pointer) : guint;
+  end;
+
+  TFPgtkCTreeFunction = procedure (TheTree:TFPgtkCTree; TheNode:PGtkCTreeNode; data:pointer) of object;
+
+  TFPgtkCTree = class (TFPgtkCList)
+  Private
+    FTreeColumn:integer;
+    function GetLineStyle : TGtkCTreeLineStyle;
+    procedure SetLineStyle (TheValue : TGtkCTreeLineStyle);
+    function GetShowStub : boolean;
+    procedure SetShowStub (TheValue : boolean);
+    function GetExpanderStyle : TGtkCTreeExpanderStyle;
+    procedure SetExpanderStyle (TheValue : TGtkCTreeExpanderStyle);
+    function GetSpacing : guint;
+    procedure SetSpacing (TheValue : guint);
+    function GetIndent : guint;
+    procedure SetIndent (TheValue : guint);
+    function GetTreeColumn : integer;
+    function GetNodeCellText(Node:PGtkCTreeNode; Column:integer) : string;
+    procedure SetNodeCellText (Node:PGtkCTreeNode; Column:integer; TheValue : string);
+    function GetNodeSelectable(Node:PGtkCTreeNode) : boolean;
+    procedure SetNodeSelectable (Node:PGtkCTreeNode; TheValue : boolean);
+    function GetNodeCellStyle(Node:PGtkCTreeNode; column:integer) : PGtkStyle;
+    procedure SetNodeCellStyle (Node:PGtkCTreeNode; column:integer; TheValue : PGtkStyle);
+    function GetNodeRowStyle(Node:PGtkCTreeNode) : PGtkStyle;
+    procedure SetNodeRowStyle (Node:PGtkCTreeNode; TheValue : PGtkStyle);
+    function GetNodeData(Node:PGtkCTreeNode) : pointer;
+    procedure SetNodeData (Node:PGtkCTreeNode; TheValue : pointer);
+    function GetCompareDragFunc : TGtkCTreeCompareDragFunc;
+    procedure SetCompareDragFunc (TheValue : TGtkCTreeCompareDragFunc);
+  Public
+    function TheGtkObject : PGtkCTree;
+    property LineStyle : TGtkCTreeLineStyle read GetLineStyle write SetLineStyle;
+    property ShowStub : boolean read GetShowStub write SetShowStub;
+    property ExpanderStyle : TGtkCTreeExpanderStyle read GetExpanderStyle write SetExpanderStyle;
+    property Spacing : guint read GetSpacing write SetSpacing;
+    property Indent : guint read GetIndent write SetIndent;
+    property TreeColumn : integer read GetTreeColumn;
+    constructor Create (aColumnCount:integer; aTreeColumn:integer);
+    procedure RemoveNode (node:PGtkCTreeNode);
+    function InsertNode (aParent:PGtkCTreeNode; Sibling:PGtkCTreeNode; data:string; aSpacing:guint8; PixmapClosed:PGdkPixmap; MaskClosed:PGdkBitmap; PixmapOpened:PGdkPixmap; MaskOpened:PGdkBitmap; IsLeaf:boolean; Expanded:boolean) : PGtkCTreeNode; Overload;
+    function InsertNode (aParent:PGtkCTreeNode; Sibling:PGtkCTreeNode; data:string; aSpacing:guint8; IsLeaf:boolean; Expanded:boolean) : PGtkCTreeNode; Overload;
+    procedure PostRecursive (aNode:PGtkCTreeNode; func:TFPgtkCTreeFunction; data:pointer);
+    procedure PostRecursiveToDepth (aNode:PGtkCTreeNode; aDepth:integer; func:TFPgtkCTreeFunction; data:pointer);
+    procedure PreRecursive (aNode:PGtkCTreeNode; func:TFPgtkCTreeFunction; data:pointer);
+    procedure PreRecursiveToDepth (aNode:PGtkCTreeNode; aDepth:integer; func:TFPgtkCTreeFunction; data:pointer);
+    procedure IsViewable (aNode:PGtkCTreeNode);
+    procedure LastChild (aNode:PGtkCTreeNode);
+    function IsChild (anAncestor:PGtkCTreeNode; aChild:PGtkCTreeNode) : boolean;
+    function IsAncestor (anAncestor:PGtkCTreeNode; aChild:PGtkCTreeNode) : boolean;
+    function IsHotSpot (X:integer; Y:integer) : boolean;
+    procedure MoveNode (aNode:PGtkCTreeNode; NewParent:PGtkCTreeNode; NewSibling:PGtkCTreeNode);
+    procedure Expand (aNode:PGtkCTreeNode);
+    procedure ExpandRecursive (aNode:PGtkCTreeNode);
+    procedure ExpandToDepth (aNode:PGtkCTreeNode; aDepth:integer);
+    procedure Collapse (aNode:PGtkCTreeNode);
+    procedure CollapseRecursive (aNode:PGtkCTreeNode);
+    procedure CollapseToDepth (aNode:PGtkCTreeNode; aDepth:integer);
+    procedure SelectNode (aNode:PGtkCTreeNode);
+    procedure SelectRecursive (aNode:PGtkCTreeNode);
+    procedure UnselectNode (aNode:PGtkCTreeNode);
+    procedure UnselectRecursive (aNode:PGtkCTreeNode);
+    procedure RealSelectRecursive (aNode:PGtkCTreeNode; aState:boolean);
+    function NodeGetCellType (Node:PGtkCTreeNode; column:integer) : TGtkCellType;
+    property NodeCellText [Node:PGtkCTreeNode; Column:integer]  : string read GetNodeCellText write SetNodeCellText;
+    procedure NodeSetPixmap (Node:PGtkCTreeNode; column:integer; pixmap:PGdkPixmap; mask:PGdkBitmap);
+    procedure NodeGetPixmap (Node:PGtkCTreeNode; column:integer; var pixmap:PGdkPixmap; var mask:PGdkBitmap);
+    procedure NodeSetPixText (Node:PGtkCTreeNode; column:integer; text:string; aspacing:guint8; pixmap:PGdkPixmap; mask:PGdkBitmap);
+    procedure NodeGetPixText (Node:PGtkCTreeNode; column:integer; var text:string; var aspacing:guint8; var pixmap:PGdkPixmap; var mask:PGdkBitmap);
+    procedure SetNodeInfo (aNode:PGtkCTreeNode; aText:string; aSpacing:guint8; PixmapClosed:PGdkPixmap; MaskClosed:PGdkBitmap; PixmapOpened:PGdkPixmap; MaskOpened:PGdkBitmap; IsLeaf:boolean; Expanded:boolean); Overload;
+    procedure GetNodeInfo (aNode:PGtkCTreeNode; var aText:string; var aSpacing:guint8; var PixmapClosed:PGdkPixmap; var MaskClosed:PGdkBitmap; var PixmapOpened:PGdkPixmap; var MaskOpened:PGdkBitmap; var IsLeaf:boolean; var Expanded:boolean); Overload;
+    procedure NodeSetShift (Node:PGtkCTreeNode; column:integer; vertical:integer; horizontal:integer);
+    property NodeSelectable [Node:PGtkCTreeNode]  : boolean read GetNodeSelectable write SetNodeSelectable;
+    procedure NodeSetForeground (Node:PGtkCTreeNode; color:PGdkColor);
+    procedure NodeSetBackground (Node:PGtkCTreeNode; color:PGdkColor);
+    property NodeCellStyle [Node:PGtkCTreeNode; column:integer]  : PGtkStyle read GetNodeCellStyle write SetNodeCellStyle;
+    property NodeRowStyle [Node:PGtkCTreeNode]  : PGtkStyle read GetNodeRowStyle write SetNodeRowStyle;
+    property NodeData [Node:PGtkCTreeNode]  : pointer read GetNodeData write SetNodeData;
+    procedure NodeMoveTo (aNode:PGtkCTreeNode; column:integer; RowAlign:gfloat; ColAlign:gfloat);
+    function IsVisible (aNode:PGtkCTreeNode) : TGtkVisibility;
+    property CompareDragFunc : TGtkCTreeCompareDragFunc read GetCompareDragFunc write SetCompareDragFunc;
+    procedure SortNode (aNode:PGtkCTreeNode);
+    procedure SortRecursive (aNode:PGtkCTreeNode);
+    function NthNode (Row:integer) : PGtkCTreeNode;
+  end;
+
+
+  TFPgtkFixed = class (TFPgtkContainer)
+  Protected
+    procedure CreateGtkObject; override;
+  Public
+    function TheGtkObject : PGtkFixed;
+    procedure Put (Widget:TFPgtkWidget; x:integer; y:integer);
+    procedure Move (Widget:TFPgtkWidget; x:integer; y:integer);
+    procedure GetPos (Widget:TFPgtkWidget; var PosX:integer; var PosY:integer);
+  end;
+
+  TFPgtkPageSwitchSignalFunction = procedure (Sender:TFPgtkObject; PageRec:PGtkNotebookPage; aPageNum:integer; data:pointer) of Object;
+
+  TFPgtkNotebook = class (TFPgtkContainer)
+  Private
+    function GetPageIndex : integer;
+    procedure SetPageIndex (TheValue : integer);
+    function GetPage : TFPgtkWidget;
+    procedure SetPage (TheValue : TFPgtkWidget);
+    function GetTabPos : TGtkPositionType;
+    procedure SetTabPos (TheValue : TGtkPositionType);
+    function GetShowTabs : boolean;
+    procedure SetShowTabs (TheValue : boolean);
+    function GetShowBorder : boolean;
+    procedure SetShowBorder (TheValue : boolean);
+    function GetScrollable : boolean;
+    procedure SetScrollable (TheValue : boolean);
+    function GetHomogenous : boolean;
+    procedure SetHomogenous (TheValue : boolean);
+    function GetTabHBorder : word;
+    procedure SetTabHBorder (TheValue : word);
+    function GetTabVBorder : word;
+    procedure SetTabVBorder (TheValue : word);
+  Protected
+    procedure CreateGtkObject; override;
+  Public
+    function TheGtkObject : PGtkNotebook;
+    procedure AppendPage (Child:TFPgtkWidget; TabLabel:TFPgtkWidget);
+    procedure AppendPageFull (Child:TFPgtkWidget; TabLabel:TFPgtkWidget; MenuLabel:TFPgtkWidget; IsVisible:boolean);
+    procedure PrependPage (Child:TFPgtkWidget; TabLabel:TFPgtkWidget);
+    procedure PrependPageFull (Child:TFPgtkWidget; TabLabel:TFPgtkWidget; MenuLabel:TFPgtkWidget; IsVisible:boolean);
+    procedure InsertPage (Child:TFPgtkWidget; TabLabel:TFPgtkWidget; Position:integer);
+    procedure InsertPageFull (Child:TFPgtkWidget; TabLabel:TFPgtkWidget; MenuLabel:TFPgtkWidget; IsVisible:boolean; Position:integer);
+    procedure RemovePage (PageNumber:integer);
+    function PageNumberOf (Child:TFPgtkWidget) : integer;
+    procedure NextPage;
+    procedure PrevPage;
+    procedure ReorderPage (Child:TFPgtkWidget; PageNum:integer);
+    property PageIndex : integer read GetPageIndex write SetPageIndex;
+    property Page : TFPgtkWidget read GetPage write SetPage;
+    property TabPos : TGtkPositionType read GetTabPos write SetTabPos;
+    property ShowTabs : boolean read GetShowTabs write SetShowTabs;
+    property ShowBorder : boolean read GetShowBorder write SetShowBorder;
+    property Scrollable : boolean read GetScrollable write SetScrollable;
+    property Homogenous : boolean read GetHomogenous write SetHomogenous;
+    property TabHBorder : word read GetTabHBorder write SetTabHBorder;
+    property TabVBorder : word read GetTabVBorder write SetTabVBorder;
+    procedure SetTabBorders (BorderWidth:word);
+    function GetMenuLabelOf (Child:TFPgtkWidget) : TFPgtkWidget;
+    procedure SetMenuLabel (Child:TFPgtkWidget; MenuLabel:TFPgtkWidget);
+    function GetTabLabelOf (Child:TFPgtkWidget) : TFPgtkWidget;
+    procedure SetTabLabel (Child:TFPgtkWidget; TabLabel:TFPgtkWidget);
+    function GetChildOnPage (PageNum:integer) : TFPgtkWidget;
+    procedure GetTabLabelPacking (Widget:TFPgtkWidget; var Expand:boolean; var Fill:boolean; var PackType:TGtkPackType);
+    procedure SetTabLabelPacking (Widget:TFPgtkWidget; Expand:boolean; Fill:boolean; PackType:TGtkPackType);
+    procedure EnablePopup;
+    procedure DisablePopup;
+    function PageSwitchSignalConnect (Signal:string; Proc:TFPgtkPageSwitchSignalFunction; data:pointer) : guint;
+    function PageSwitchSignalConnectAfter (Signal:string; Proc:TFPgtkPageSwitchSignalFunction; data:pointer) : guint;
+    function ConnectSwitchPage (proc:TFPgtkPageSwitchSignalFunction; data:pointer) : guint;
+    function ConnectAfterSwitchPage (proc:TFPgtkPageSwitchSignalFunction; data:pointer) : guint;
+  end;
+
+
+  TFPgtkFontSelection = class (TFPgtkNotebook)
+  Private
+    function GetFontName : string;
+    procedure SetFontName (TheValue : string);
+    function GetPreviewText : string;
+    procedure SetPreviewText (TheValue : string);
+  Protected
+    procedure CreateGtkObject; override;
+  Public
+    function TheGtkObject : PGtkFontSelection;
+    property FontName : string read GetFontName write SetFontName;
+    function GetFont : PGdkFont;
+    property PreviewText : string read GetPreviewText write SetPreviewText;
+    procedure SetFilter (FilterType:TGtkFontFilterType; FontType:TGtkFontType; Foundries:array of string; Weights:array of string; Slants:array of string; SetWidths:array of string; Spacings:array of string; CharSets:array of string);
+  end;
+
+
+  TFPgtkPaned = class (TFPgtkContainer)
+  Private
+    function GetGutterSize : word;
+    procedure SetGutterSize (TheValue : word);
+    function GetHandleSize : word;
+    procedure SetHandleSize (TheValue : word);
+    function GetPosition : integer;
+    procedure SetPosition (TheValue : integer);
+  Public
+    function TheGtkObject : PGtkPaned;
+    property GutterSize : word read GetGutterSize write SetGutterSize;
+    property HandleSize : word read GetHandleSize write SetHandleSize;
+    property Position : integer read GetPosition write SetPosition;
+    procedure ComputePosition (AnAllocation:integer; Child1Req:integer; Child2Req:integer);
+    procedure Add1 (Child:TFPgtkWidget); Overload;
+    procedure Pack1 (Child:TFPgtkWidget; Resize:boolean; Shrink:boolean); Overload;
+    procedure Add1 (Child:TFPgtkWidget; isVisible:boolean); Overload;
+    procedure Pack1 (Child:TFPgtkWidget; Resize:boolean; Shrink:boolean; IsVisible:boolean); Overload;
+    procedure Add2 (Child:TFPgtkWidget); Overload;
+    procedure Pack2 (Child:TFPgtkWidget; Resize:boolean; Shrink:boolean); Overload;
+    procedure Add2 (Child:TFPgtkWidget; IsVisible:boolean); Overload;
+    procedure Pack2 (Child:TFPgtkWidget; Resize:boolean; Shrink:boolean; IsVisible:boolean); Overload;
+  end;
+
+
+  TFPgtkHPaned = class (TFPgtkPaned)
+  Protected
+    procedure CreateGtkObject; override;
+  Public
+    function TheGtkObject : PGtkHPaned;
+  end;
+
+
+  TFPgtkVPaned = class (TFPgtkPaned)
+  Protected
+    procedure CreateGtkObject; override;
+  Public
+    function TheGtkObject : PGtkVPaned;
+  end;
+
+
+  TFPgtkLayout = class (TFPgtkContainer)
+  Private
+    function GetHAdj : TFPgtkAdjustment;
+    procedure SetHAdj (TheValue : TFPgtkAdjustment);
+    function GetVAdj : TFPgtkAdjustment;
+    procedure SetVAdj (TheValue : TFPgtkAdjustment);
+  Protected
+    procedure CreateGtkObject; override;
+  Public
+    function TheGtkObject : PGtkLayout;
+    property HAdj : TFPgtkAdjustment read GetHAdj write SetHAdj;
+    property VAdj : TFPgtkAdjustment read GetVAdj write SetVAdj;
+    procedure Freeze;
+    procedure Thaw;
+    procedure Put (aWidget:TFPgtkWidget; X:integer; Y:integer); Overload;
+    procedure Put (aWidget:TFPgtkWidget; X:integer; Y:integer; aVisible:boolean); Overload;
+    procedure Move (aWidget:TFPgtkWidget; X:integer; Y:integer);
+    procedure SetSize (aWidth:integer; aHeight:integer);
+  end;
+
+
+  TFPgtkList = class (TFPgtkContainer)
+  Private
+    function GetSelectionMode : TGtkSelectionMode;
+    procedure SetSelectionMode (TheValue : TGtkSelectionMode);
+  Protected
+    procedure CreateGtkObject; override;
+  Public
+    function TheGtkObject : PGtkList;
+    function ConnectSelectionChanged (proc:TFPgtksignalFunction; data:pointer) : guint;
+    function ConnectAfterSelectionChanged (proc:TFPgtksignalFunction; data:pointer) : guint;
+    function ConnectSelectChild (proc:TFPgtkWidgetSignalFunction; data:pointer) : guint;
+    function ConnectAfterSelectChild (proc:TFPgtkWidgetSignalFunction; data:pointer) : guint;
+    function ConnectUnselectChild (proc:TFPgtkWidgetSignalFunction; data:pointer) : guint;
+    function ConnectAfterUnselectChild (proc:TFPgtkWidgetSignalFunction; data:pointer) : guint;
+    property SelectionMode : TGtkSelectionMode read GetSelectionMode write SetSelectionMode;
+    procedure InsertItems (TheItems:TFPgtkListItemGroup; position:integer);
+    procedure AppendItems (TheItems:TFPgtkListItemGroup);
+    procedure PrependItems (TheItems:TFPgtkListItemGroup);
+    procedure RemoveItems (TheItems:TFPgtkListItemGroup);
+    procedure RemoveItemsNoUnref (TheItems:TFPgtkListItemGroup);
+    procedure ClearItems (FromItem:integer; ToItem:integer);
+    procedure ClearAll;
+    procedure SelectItem (Item:integer);
+    procedure UnselectItem (Item:integer);
+    procedure SelectChild (Child:TFPgtkWidget);
+    procedure UnselectChild (Child:TFPgtkWidget);
+    function ChildPosition (Child:TFPgtkWidget) : integer;
+    procedure ExtendSelection (ScrollType:TGtkScrollType; Position:gfloat; AutoStartSelection:boolean);
+    procedure StartSelection;
+    procedure EndSelection;
+    procedure SelectAll;
+    procedure UnselectAll;
+    procedure ScrollHorizontal (ScrollType:TGtkScrollType; Position:gfloat);
+    procedure ScrollVertical (ScrollType:TGtkScrollType; Position:gfloat);
+    procedure ToggleAddMode;
+    procedure ToggleFocusRow;
+    procedure ToggleRow (Child:TFPgtkWidget);
+    procedure UndoSelection;
+    procedure EndDragSelection;
+    procedure GetSelection (aGroup:TFPgtkGroup);
+  end;
+
+  TFPgtkMoveCurrentSignalFunction = procedure (Sender:TFPgtkObject; dir:TGtkMenuDirectionType; data:pointer) of Object;
+
+  TFPgtkMenuShell = class (TFPgtkContainer)
+  Protected
+    procedure GtkPrepend (MenuItem:TFPgtkWidget); Virtual;
+    procedure GtkInsert (MenuItem:TFPgtkWidget; position:integer); Virtual;
+    procedure GtkAppend (MenuItem:TFPgtkWidget); Virtual;
+  Public
+    function TheGtkObject : PGtkMenuShell;
+    function MoveCurrentSignalConnect (Signal:string; Proc:TFPgtkMoveCurrentSignalFunction; data:pointer) : guint;
+    function MoveCurrentSignalConnectAfter (Signal:string; Proc:TFPgtkMoveCurrentSignalFunction; data:pointer) : guint;
+    procedure ActivateItem (MenuItem:TFPgtkWidget; ForceDeactivate:boolean);
+    procedure SelectItem (MenuItem:TFPgtkWidget);
+    procedure DeActivate;
+    procedure Prepend (MenuItem:TFPgtkWidget); Overload;
+    procedure Prepend (MenuItem:TFPgtkWidget; CreateVisible:boolean); Overload;
+    procedure Insert (MenuItem:TFPgtkWidget; position:integer); Overload;
+    procedure Insert (MenuItem:TFPgtkWidget; position:integer; CreateVisible:boolean); Overload;
+    procedure Append (MenuItem:TFPgtkWidget); Overload;
+    procedure Append (MenuItem:TFPgtkWidget; CreateVisible:boolean); Overload;
+    function ConnectDeActivate (proc:TFPgtkSignalFunction; data:pointer) : guint;
+    function ConnectAfterDeActivate (proc:TFPgtkSignalFunction; data:pointer) : guint;
+    function ConnectSelectionDone (proc:TFPgtkSignalFunction; data:pointer) : guint;
+    function ConnectAfterSelectionDone (proc:TFPgtkSignalFunction; data:pointer) : guint;
+    function ConnectCancel (proc:TFPgtkSignalFunction; data:pointer) : guint;
+    function ConnectAfterCancel (proc:TFPgtkSignalFunction; data:pointer) : guint;
+    function ConnectMoveCurrent (proc:TFPgtkMoveCurrentSignalFunction; data:pointer) : guint;
+    function ConnectAfterMoveCurrent (proc:TFPgtkMoveCurrentSignalFunction; data:pointer) : guint;
+    function ConnectActivateCurrent (proc:TFPgtkBooleanSignalFunction; data:pointer) : guint;
+    function ConnectAfterActivateCurrent (proc:TFPgtkBooleanSignalFunction; data:pointer) : guint;
+  end;
+
+
+  TFPgtkMenuBar = class (TFPgtkMenuShell)
+  Private
+    function GetShadow : TgtkShadowType;
+    procedure SetShadow (TheValue : TgtkShadowType);
+  Protected
+    procedure CreateGtkObject; override;
+    procedure GtkPrepend (MenuItem:TFPgtkWidget); Override;
+    procedure GtkInsert (MenuItem:TFPgtkWidget; position:integer); Override;
+    procedure GtkAppend (MenuItem:TFPgtkWidget); Override;
+  Public
+    function TheGtkObject : PGtkMenuBar;
+    property Shadow : TgtkShadowType read GetShadow write SetShadow;
+  end;
+
+  TFPgtkMenuDetachFunction = procedure (Widget:TFPgtkWidget; menu:TFPgtkMenu) of object;
+  TFPgtkMenuPosFunction = procedure (menu:TFPgtkMenu; var x,y:integer; data:pointer) of object;
+
+  TFPgtkMenu = class (TFPgtkMenuShell)
+  Private
+    procedure SetTitle (TheValue : string);
+    function GetActive : TFPgtkWidget;
+    procedure SetActive (TheValue : TFPgtkWidget);
+    function GetActiveIndex : integer;
+    procedure SetActiveIndex (TheValue : integer);
+    function GetTearOffState : boolean;
+    procedure SetTearOffState (TheValue : boolean);
+    function GetAttachedTo : TFPgtkWidget;
+    procedure SetAttachedTo (TheValue : TFPgtkWidget);
+    function GetAccelGroup : PGtkAccelGroup;
+    procedure SetAccelGroup (TheValue : PGtkAccelGroup);
+  Protected
+    procedure CreateGtkObject; override;
+    procedure GtkPrepend (MenuItem:TFPgtkWidget); Override;
+    procedure GtkInsert (MenuItem:TFPgtkWidget; position:integer); Override;
+    procedure GtkAppend (MenuItem:TFPgtkWidget); Override;
+  Public
+    function TheGtkObject : PGtkMenu;
+    FDetacher:TFPgtkMenuDetachFunction;
+    procedure ReorderChild (MenuItem:TFPgtkWidget; position:integer);
+    procedure Popup (button:guint); Overload;
+    procedure Popup (ParentShell:TFPgtkWidget; ParentItem:TFPgtkWidget; func:TFPgtkMenuPosFunction; data:pointer; button:guint; ActivateTime:guint32); Overload;
+    procedure PopDown;
+    procedure Reposition;
+    procedure AttachToWidget (Widget:TFPgtkWidget; detacher:TFPgtkMenuDetachFunction);
+    procedure Detach;
+    property Title : string write SetTitle;
+    property Active : TFPgtkWidget read GetActive write SetActive;
+    property ActiveIndex : integer read GetActiveIndex write SetActiveIndex;
+    property TearOffState : boolean read GetTearOffState write SetTearOffState;
+    property AttachedTo : TFPgtkWidget read GetAttachedTo write SetAttachedTo;
+    property AccelGroup : PGtkAccelGroup read GetAccelGroup write SetAccelGroup;
+  end;
+
+
+  TFPgtkPacker = class (TFPgtkContainer)
+  Private
+    function GetSpacing : guint;
+    procedure SetSpacing (TheValue : guint);
+  Protected
+    procedure CreateGtkObject; override;
+  Public
+    function TheGtkObject : PGtkPacker;
+    procedure Add (Child:TFPgtkWidget; Side:TGtkSideType; Anchor:TGtkAnchorType; options:TGtkPackerOptions); Overload;
+    procedure Add (Child:TFPgtkWidget; Side:TGtkSideType; Anchor:TGtkAnchorType; options:TGtkPackerOptions; aVisible:boolean); Overload;
+    procedure Add (Child:TFPgtkWidget; Side:TGtkSideType; Anchor:TGtkAnchorType; options:TGtkPackerOptions; aBorder:guint; PadX:Guint; PadY:guint; IPadX:guint; IPadY:guint); Overload;
+    procedure Add (Child:TFPgtkWidget; Side:TGtkSideType; Anchor:TGtkAnchorType; options:TGtkPackerOptions; aBorder:guint; PadX:Guint; PadY:guint; IPadX:guint; IPadY:guint; aVisible:boolean); Overload;
+    procedure ReorderChild (aChild:TFPgtkWidget; position:integer);
+    property Spacing : guint read GetSpacing write SetSpacing;
+    procedure DefaultBorder (aBorder:guint);
+    procedure DefaultPad (PadX:guint; PadY:guint);
+    procedure DefaultIPad (IPadX:guint; IPadY:guint);
+    procedure Configure (aChild:TFPgtkWidget; Side:TGtkSideType; Anchor:TGtkAnchorType; options:TGtkPackerOptions; aBorder:guint; PadX:Guint; PadY:guint; IPadX:guint; IPadY:guint); Overload;
+  end;
+
+
+  TFPgtkTable = class (TFPgtkContainer)
+  Private
+    function GetRowCount : integer;
+    function GetColCount : integer;
+    function GetHomogeneous : boolean;
+    procedure SetHomogeneous (TheValue : boolean);
+    function GetRowSpacings : integer;
+    procedure SetRowSpacings (TheValue : integer);
+    function GetColSpacings : integer;
+    procedure SetColSpacings (TheValue : integer);
+  Protected
+    procedure CreateGtkObject; override;
+  Public
+    function TheGtkObject : PGtkTable;
+    constructor Create (AColumns:integer; ARows:integer);
+    procedure Resize (AColumns:integer; ARows:integer);
+    procedure Attach (Widget:TFPgtkWidget; left:integer; right:integer; top:integer; bottom:integer; XOptions:integer; YOptions:integer; XPadding:integer; YPadding:integer; IsVisible:boolean);
+    procedure Attach (Widget:TFPgtkWidget; left:integer; right:integer; top:integer; bottom:integer; XOptions:integer; YOptions:integer; XPadding:integer; YPadding:integer);
+    procedure Attach (Widget:TFPgtkWidget; left:integer; right:integer; top:integer; bottom:integer; IsVisible:boolean);
+    procedure Attach (Widget:TFPgtkWidget; left:integer; right:integer; top:integer; bottom:integer);
+    property RowCount : integer read GetRowCount;
+    property ColCount : integer read GetColCount;
+    property Homogeneous : boolean read GetHomogeneous write SetHomogeneous;
+    property RowSpacings : integer read GetRowSpacings write SetRowSpacings;
+    property ColSpacings : integer read GetColSpacings write SetColSpacings;
+    procedure SetOneRowSpacing (row:integer; TheValue:integer);
+    procedure SetOneColSpacing (Column:integer; TheValue:integer);
+  end;
+
+
+  TFPgtkToolbar = class (TFPgtkContainer)
+  Private
+    function GetButtonRelief : TGtkReliefStyle;
+    procedure SetButtonRelief (TheValue : TGtkReliefStyle);
+    function GetTooltips : TFPgtkTooltips;
+    function GetEnableTooltips : longbool;
+    procedure SetEnableTooltips (TheValue : longbool);
+    function GetSpaceStyle : TGtkToolbarSpaceStyle;
+    procedure SetSpaceStyle (TheValue : TGtkToolbarSpaceStyle);
+    function GetSpaceSize : integer;
+    procedure SetSpaceSize (TheValue : integer);
+    function GetStyle : TGtkToolbarStyle;
+    procedure SetStyle (TheValue : TGtkToolbarStyle);
+    function GetOrientation : tGtkOrientation;
+    procedure SetOrientation (TheValue : tGtkOrientation);
+  Protected
+    procedure CreateGtkObject; override;
+  Public
+    function TheGtkObject : PGtkToolbar;
+    property ButtonRelief : TGtkReliefStyle read GetButtonRelief write SetButtonRelief;
+    property Tooltips : TFPgtkTooltips read GetTooltips;
+    property EnableTooltips : longbool read GetEnableTooltips write SetEnableTooltips;
+    property SpaceStyle : TGtkToolbarSpaceStyle read GetSpaceStyle write SetSpaceStyle;
+    property SpaceSize : integer read GetSpaceSize write SetSpaceSize;
+    property Style : TGtkToolbarStyle read GetStyle write SetStyle;
+    property Orientation : tGtkOrientation read GetOrientation write SetOrientation;
+    procedure InsertWidget (Widget:TFPgtkWidget; TooltipText:string; TooltipPrivate:string; Position:integer);
+    procedure PrependWidget (Widget:TFPgtkWidget; TooltipText:string; TooltipPrivate:string);
+    procedure AppendWidget (Widget:TFPgtkWidget; TooltipText:string; TooltipPrivate:string);
+    function InsertElement (ButtonType:TGtkToolbarChildType; PrevRadioBut:TFPgtkWidget; Text:string; TooltipText:string; TooltipPrivate:string; Icon:TFPgtkWidget; CallBack:TFPgtkSignalFunction; data:pointer; position:integer) : TFPgtkWidget;
+    function AppendElement (ButtonType:TGtkToolbarChildType; PrevRadioBut:TFPgtkWidget; Text:string; TooltipText:string; TooltipPrivate:string; Icon:TFPgtkWidget; CallBack:TFPgtkSignalFunction; data:pointer) : TFPgtkWidget;
+    function PrependElement (ButtonType:TGtkToolbarChildType; PrevRadioBut:TFPgtkWidget; Text:string; TooltipText:string; TooltipPrivate:string; Icon:TFPgtkWidget; CallBack:TFPgtkSignalFunction; data:pointer) : TFPgtkWidget;
+    function InsertItem (Text:string; TooltipText:string; TooltipPrivate:string; Icon:TFPgtkWidget; CallBack:TFPgtkSignalFunction; data:pointer; position:integer) : TFPgtkWidget; Overload;
+    function AppendItem (Text:string; TooltipText:string; TooltipPrivate:string; Icon:TFPgtkWidget; CallBack:TFPgtkSignalFunction; data:pointer) : TFPgtkWidget; Overload;
+    function PrependItem (Text:string; TooltipText:string; TooltipPrivate:string; Icon:TFPgtkWidget; CallBack:TFPgtkSignalFunction; data:pointer) : TFPgtkWidget; Overload;
+    function InsertItem (Text:string; TooltipText:string; TooltipPrivate:string; Icon:array of string; CallBack:TFPgtkSignalFunction; data:pointer; position:integer) : TFPgtkWidget; Overload;
+    function AppendItem (Text:string; TooltipText:string; TooltipPrivate:string; Icon:array of string; CallBack:TFPgtkSignalFunction; data:pointer) : TFPgtkWidget; Overload;
+    function PrependItem (Text:string; TooltipText:string; TooltipPrivate:string; Icon:array of string; CallBack:TFPgtkSignalFunction; data:pointer) : TFPgtkWidget; Overload;
+    procedure InsertSpace (position:integer);
+    procedure AppendSpace;
+    procedure PrependSpace;
+  end;
+
+
+  TFPgtkTree = class (TFPgtkContainer)
+  Private
+    function GetSelectionMode : TGtkSelectionMode;
+    procedure SetSelectionMode (TheValue : TGtkSelectionMode);
+    function GetViewLines : boolean;
+    procedure SetViewLines (TheValue : boolean);
+    function GetViewMode : TGtkTreeViewMode;
+    procedure SetViewMode (TheValue : TGtkTreeViewMode);
+  Protected
+    procedure CreateGtkObject; override;
+  Public
+    function TheGtkObject : PGtkTree;
+    function ConnectSelectionChanged (proc:TFPgtkSignalFunction; data:pointer) : guint;
+    function ConnectAfterSelectionChanged (proc:TFPgtkSignalFunction; data:pointer) : guint;
+    function ConnectSelectChild (proc:TFPgtkWidgetSignalFunction; data:pointer) : guint;
+    function ConnectAfterSelectChild (proc:TFPgtkWidgetSignalFunction; data:pointer) : guint;
+    function ConnectUnselectChild (proc:TFPgtkWidgetSignalFunction; data:pointer) : guint;
+    function ConnectAfterUnselectChild (proc:TFPgtkWidgetSignalFunction; data:pointer) : guint;
+    property SelectionMode : TGtkSelectionMode read GetSelectionMode write SetSelectionMode;
+    property ViewLines : boolean read GetViewLines write SetViewLines;
+    property ViewMode : TGtkTreeViewMode read GetViewMode write SetViewMode;
+    procedure Append (TreeItem:TFPgtkWidget);
+    procedure Prepend (TreeItem:TFPgtkWidget);
+    procedure Insert (TreeItem:TFPgtkWidget; position:integer);
+    procedure Remove (TreeItem:TFPgtkWidget);
+    procedure ClearItems (StartPos:integer; EndPos:integer);
+    procedure SelectItem (Item:integer);
+    procedure UnselectItem (Item:integer);
+    procedure SelectChild (TreeItem:TFPgtkWidget);
+    procedure UnselectChild (TreeItem:TFPgtkWidget);
+    function ChildPosition (TreeItem:TFPgtkWidget) : integer;
+    function RootTree : TFPgtkTree;
+    function IsRootTree : boolean;
+    procedure GetSelection (aGroup:TFPgtkGroup);
+    function Level : integer;
+  end;
+
+
+  TFPgtkCalendar = class (TFPgtkWidget)
+  Private
+    function GetDisplayOptions : TGtkCalendarDisplayOptions;
+    procedure SetDisplayOptions (TheValue : TGtkCalendarDisplayOptions);
+    function GetDate : TDatetime;
+    procedure SetDate (TheValue : TDatetime);
+  Protected
+    procedure CreateGtkObject; override;
+  Public
+    function TheGtkObject : PGtkCalendar;
+    function SelectMonth (aMonth:guint; aYear:guint) : integer;
+    procedure SelectDay (aDay:guint);
+    function MarkDay (aDay:guint) : integer;
+    function UnmarkDay (aDay:guint) : integer;
+    procedure ClearMarks;
+    property DisplayOptions : TGtkCalendarDisplayOptions read GetDisplayOptions write SetDisplayOptions;
+    property Date : TDatetime read GetDate write SetDate;
+    procedure Freeze;
+    procedure Thaw;
+    function ConnectMonthChanged (proc:TFPgtksignalFunction; data:pointer) : guint;
+    function ConnectAfterMonthChanged (proc:TFPgtksignalFunction; data:pointer) : guint;
+    function ConnectDaySelected (proc:TFPgtksignalFunction; data:pointer) : guint;
+    function ConnectAfterDaySelected (proc:TFPgtksignalFunction; data:pointer) : guint;
+    function ConnectDaySelectedDoubleClick (proc:TFPgtksignalFunction; data:pointer) : guint;
+    function ConnectAfterDaySelectedDoubleClick (proc:TFPgtksignalFunction; data:pointer) : guint;
+    function ConnectPrevMonth (proc:TFPgtksignalFunction; data:pointer) : guint;
+    function ConnectAfterPrevMonth (proc:TFPgtksignalFunction; data:pointer) : guint;
+    function ConnectNextMonth (proc:TFPgtksignalFunction; data:pointer) : guint;
+    function ConnectAfterNextMonth (proc:TFPgtksignalFunction; data:pointer) : guint;
+    function ConnectPrevYear (proc:TFPgtksignalFunction; data:pointer) : guint;
+    function ConnectAfterPrevYear (proc:TFPgtksignalFunction; data:pointer) : guint;
+    function ConnectNextYear (proc:TFPgtksignalFunction; data:pointer) : guint;
+    function ConnectAfterNextYear (proc:TFPgtksignalFunction; data:pointer) : guint;
+  end;
+
+
+  TFPgtkDrawingArea = class (TFPgtkWidget)
+  Protected
+    procedure CreateGtkObject; override;
+  Public
+    function TheGtkObject : PGtkDrawingArea;
+    procedure SetSize (Width:integer; Height:integer);
+  end;
+
+
+  TFPgtkCurve = class (TFPgtkDrawingArea)
+  Private
+    function GetCurveType : TGtkCurveType;
+    procedure SetCurveType (TheValue : TGtkCurveType);
+  Protected
+    procedure CreateGtkObject; override;
+  Public
+    function TheGtkObject : PGtkCurve;
+    procedure SetRange (MinX:float; MaxX:float; MinY:float; MaxY:float);
+    procedure Reset;
+    procedure SetGamma (GammaValue:float);
+    property CurveType : TGtkCurveType read GetCurveType write SetCurveType;
+  end;
+
+  TFPgtkInsertSignalFunction = procedure (Sender:TFPgtkObject; NewText:string; TextLength:integer; var Position:integer; data:pointer) of Object;
+  TFPgtkDeleteSignalFunction = procedure (Sender:TFPgtkObject; StartPos:integer; EndPos:integer; data:pointer) of Object;
+  TFPgtkXYSignalFunction = procedure (Sender:TFPgtkObject; x:integer; y:integer; data:pointer) of Object;
+  TFPgtkDirectionSignalFunction = procedure (Sender:TFPgtkObject; Direction:integer; data:pointer) of Object;
+  TFPgtkMoveWordSignalFunction = procedure (Sender:TFPgtkObject; NumWords:integer; data:pointer) of Object;
+  TFPgtkMovetoSignalFunction = procedure (Sender:TFPgtkObject; MoveTo:integer; data:pointer) of Object;
+
+  TFPgtkEditable = class (TFPgtkWidget)
+  Private
+    function GetEditable : boolean;
+    procedure SetEditable (TheValue : boolean);
+    function GetVisible : boolean;
+    procedure SetVisible (TheValue : boolean);
+    function GetPosition : integer;
+    procedure SetPosition (TheValue : integer);
+    function GetSelectionStart : integer;
+    procedure SetSelectionStart (TheValue : integer);
+    function GetSelectionEnd : integer;
+    procedure SetSelectionEnd (TheValue : integer);
+    function GetSelection : string;
+  Protected
+    function GetHasSelection : boolean; Dynamic;
+    procedure SetSelection (TheValue:string); Dynamic;
+    function GetText : string; Dynamic;
+    procedure SetText (TheValue:string); Dynamic; Abstract;
+  Public
+    function TheGtkObject : PGtkEditable;
+    property HasSelection : boolean read GetHasSelection;
+    property Editable : boolean read GetEditable write SetEditable;
+    property Visible : boolean read GetVisible write SetVisible;
+    property Position : integer read GetPosition write SetPosition;
+    property SelectionStart : integer read GetSelectionStart write SetSelectionStart;
+    property SelectionEnd : integer read GetSelectionEnd write SetSelectionEnd;
+    property Selection : string read GetSelection write SetSelection;
+    property Text : string read GetText write SetText;
+    procedure Changed;
+    procedure InsertText (NewText:string; AtPosition:integer);
+    procedure DeleteText (StartPos:integer; EndPos:integer);
+    procedure GetChars (StartPos:integer; EndPos:integer);
+    procedure CutClipboard;
+    procedure CopyClipboard;
+    procedure PasteClipboard;
+    procedure SelectRegion (StartPos:integer; EndPos:integer);
+    procedure ClaimSelection (claim:boolean; time:guint32);
+    procedure DeleteSelection;
+    procedure Clear;
+    function InsertSignalConnect (Signal:string; Proc:TFPgtkInsertSignalFunction; data:pointer) : guint;
+    function InsertSignalConnectAfter (Signal:string; Proc:TFPgtkInsertSignalFunction; data:pointer) : guint;
+    function DeleteSignalConnect (Signal:string; Proc:TFPgtkDeleteSignalFunction; data:pointer) : guint;
+    function DeleteSignalConnectAfter (Signal:string; Proc:TFPgtkDeleteSignalFunction; data:pointer) : guint;
+    function XYSignalConnect (Signal:string; Proc:TFPgtkXYSignalFunction; data:pointer) : guint;
+    function XYSignalConnectAfter (Signal:string; Proc:TFPgtkXYSignalFunction; data:pointer) : guint;
+    function DirectionSignalConnect (Signal:string; Proc:TFPgtkDirectionSignalFunction; data:pointer) : guint;
+    function DirectionSignalConnectAfter (Signal:string; Proc:TFPgtkDirectionSignalFunction; data:pointer) : guint;
+    function MoveWordSignalConnect (Signal:string; Proc:TFPgtkMoveWordSignalFunction; data:pointer) : guint;
+    function MoveWordSignalConnectAfter (Signal:string; Proc:TFPgtkMoveWordSignalFunction; data:pointer) : guint;
+    function MovetoSignalConnect (Signal:string; Proc:TFPgtkMovetoSignalFunction; data:pointer) : guint;
+    function MovetoSignalConnectAfter (Signal:string; Proc:TFPgtkMovetoSignalFunction; data:pointer) : guint;
+    function ConnectChanged (proc:TFPgtkSignalFunction; data:pointer) : guint;
+    function ConnectAfterChanged (proc:TFPgtkSignalFunction; data:pointer) : guint;
+    function ConnectActivate (proc:TFPgtkSignalFunction; data:pointer) : guint;
+    function ConnectAfterActivate (proc:TFPgtkSignalFunction; data:pointer) : guint;
+    function ConnectInsertText (proc:TFPgtkInsertSignalFunction; data:pointer) : guint;
+    function ConnectAfterInsertText (proc:TFPgtkInsertSignalFunction; data:pointer) : guint;
+    function ConnectDeleteText (proc:TFPgtkDeleteSignalFunction; data:pointer) : guint;
+    function ConnectAfterDeleteText (proc:TFPgtkDeleteSignalFunction; data:pointer) : guint;
+    function ConnectSetEditable (proc:TFPgtkBooleanSignalFunction; data:pointer) : guint;
+    function ConnectAfterSetEditable (proc:TFPgtkBooleanSignalFunction; data:pointer) : guint;
+    function ConnectMoveCursor (proc:TFPgtkXYSignalFunction; data:pointer) : guint;
+    function ConnectAfterMoveCursor (proc:TFPgtkXYSignalFunction; data:pointer) : guint;
+    function ConnectMoveWord (proc:TFPgtkMoveWordSignalFunction; data:pointer) : guint;
+    function ConnectAfterMoveWord (proc:TFPgtkMoveWordSignalFunction; data:pointer) : guint;
+    function ConnectMovePage (proc:TFPgtkXYSignalFunction; data:pointer) : guint;
+    function ConnectAfterMovePage (proc:TFPgtkXYSignalFunction; data:pointer) : guint;
+    function ConnectMoveToRow (proc:TFPgtkMoveToSignalFunction; data:pointer) : guint;
+    function ConnectAfterMoveToRow (proc:TFPgtkMoveToSignalFunction; data:pointer) : guint;
+    function ConnectMoveToCol (proc:TFPgtkMoveToSignalFunction; data:pointer) : guint;
+    function ConnectAfterMoveToCol (proc:TFPgtkMoveToSignalFunction; data:pointer) : guint;
+    function ConnectKillChar (proc:TFPgtkDirectionSignalFunction; data:pointer) : guint;
+    function ConnectAfterKillChar (proc:TFPgtkDirectionSignalFunction; data:pointer) : guint;
+    function ConnectKillWord (proc:TFPgtkDirectionSignalFunction; data:pointer) : guint;
+    function ConnectAfterKillWord (proc:TFPgtkDirectionSignalFunction; data:pointer) : guint;
+    function ConnectKillLine (proc:TFPgtkDirectionSignalFunction; data:pointer) : guint;
+    function ConnectAfterKillLine (proc:TFPgtkDirectionSignalFunction; data:pointer) : guint;
+    function ConnectCutClipboard (proc:TFPgtkSignalFunction; data:pointer) : guint;
+    function ConnectAfterCutClipboard (proc:TFPgtkSignalFunction; data:pointer) : guint;
+    function ConnectCopyClipboard (proc:TFPgtkSignalFunction; data:pointer) : guint;
+    function ConnectAfterCopyClipboard (proc:TFPgtkSignalFunction; data:pointer) : guint;
+    function ConnectPasteClipboard (proc:TFPgtkSignalFunction; data:pointer) : guint;
+    function ConnectAfterPasteClipboard (proc:TFPgtkSignalFunction; data:pointer) : guint;
+  end;
+
+
+  TFPgtkEntry = class (TFPgtkEditable)
+  Private
+    function GetVisibility : boolean;
+    procedure SetVisibility (TheValue : boolean);
+    function GetMaxLength : word;
+    procedure SetMaxLength (TheValue : word);
+  Protected
+    procedure CreateGtkObject; override;
+    procedure SetText (TheValue:string); Override;
+  Public
+    function TheGtkObject : PGtkEntry;
+    procedure AppendText (aText:string);
+    procedure PrependText (aText:string);
+    property Visibility : boolean read GetVisibility write SetVisibility;
+    property MaxLength : word read GetMaxLength write SetMaxLength;
+  end;
+
+
+  TFPgtkSpinButton = class (TFPgtkEntry)
+  Private
+    function GetAdjustment : TFPgtkAdjustment;
+    procedure SetAdjustment (TheValue : TFPgtkAdjustment);
+    function GetClimbRate : gfloat;
+    procedure SetClimbRate (TheValue : gfloat);
+    function GetDigits : integer;
+    procedure SetDigits (TheValue : integer);
+    function GetAsInteger : integer;
+    procedure SetAsInteger (TheValue : integer);
+    function GetAsFloat : gfloat;
+    procedure SetAsFloat (TheValue : gfloat);
+    function GetUpdatePolicy : TGtkSpinButtonUpdatePolicy;
+    procedure SetUpdatePolicy (TheValue : TGtkSpinButtonUpdatePolicy);
+    function GetNumeric : boolean;
+    procedure SetNumeric (TheValue : boolean);
+    function GetWrap : boolean;
+    procedure SetWrap (TheValue : boolean);
+    function GetShadowType : TGtkShadowType;
+    procedure SetShadowType (TheValue : TGtkShadowType);
+    function GetSnapToTicks : boolean;
+    procedure SetSnapToTicks (TheValue : boolean);
+  Protected
+    procedure CreateGtkObject; override;
+  Public
+    function TheGtkObject : PGtkSpinButton;
+    procedure Configure (Adj:TFPgtkAdjustment; aClimbRate:gfloat; aDigits:integer);
+    property Adjustment : TFPgtkAdjustment read GetAdjustment write SetAdjustment;
+    property ClimbRate : gfloat read GetClimbRate write SetClimbRate;
+    property Digits : integer read GetDigits write SetDigits;
+    property AsInteger : integer read GetAsInteger write SetAsInteger;
+    property AsFloat : gfloat read GetAsFloat write SetAsFloat;
+    property UpdatePolicy : TGtkSpinButtonUpdatePolicy read GetUpdatePolicy write SetUpdatePolicy;
+    property Numeric : boolean read GetNumeric write SetNumeric;
+    procedure Spin (direction:TGtkSpinType; increment:gfloat);
+    property Wrap : boolean read GetWrap write SetWrap;
+    property ShadowType : TGtkShadowType read GetShadowType write SetShadowType;
+    property SnapToTicks : boolean read GetSnapToTicks write SetSnapToTicks;
+    procedure Update;
+  end;
+
+
+  TFPgtkText = class (TFPgtkEditable)
+  Private
+    FLines:TStrings;
+    FIsChanged:boolean;
+    procedure SigChanged (Sender:TFPgtkObject; data:pointer);
+    function GetLines : TStrings;
+    function GetWordWrap : boolean;
+    procedure SetWordWrap (TheValue : boolean);
+    function GetLineWrap : boolean;
+    procedure SetLineWrap (TheValue : boolean);
+    function GetPoint : integer;
+    procedure SetPoint (TheValue : integer);
+    function GetHAdjustment : TFPgtkAdjustment;
+    procedure SetHAdjustment (TheValue : TFPgtkAdjustment);
+    function GetVAdjustment : TFPgtkAdjustment;
+    procedure SetVAdjustment (TheValue : TFPgtkAdjustment);
+  Protected
+    procedure CreateGtkObject; override;
+    procedure RefreshLines;
+    procedure SetText (TheValue:string); Override;
+  Public
+    function TheGtkObject : PGtkText;
+    constructor Create;
+    destructor Destroy; Override;
+    property Lines : TStrings read GetLines;
+    procedure Freeze;
+    procedure Thaw;
+    function TextLength : guint;
+    procedure Insert (font:PgdkFont; fore:PgdkColor; back:PgdkColor; TheText:string);
+    procedure DeleteBackward (number:longword);
+    procedure DeleteForward (number:longword);
+    property WordWrap : boolean read GetWordWrap write SetWordWrap;
+    property LineWrap : boolean read GetLineWrap write SetLineWrap;
+    property Point : integer read GetPoint write SetPoint;
+    procedure SetAdjustments (hadj:TFPgtkAdjustment; vadj:TFPgtkAdjustment);
+    property HAdjustment : TFPgtkAdjustment read GetHAdjustment write SetHAdjustment;
+    property VAdjustment : TFPgtkAdjustment read GetVAdjustment write SetVAdjustment;
+  end;
+
+
+  TFPgtkRuler = class (TFPgtkWidget)
+  Public
+    function TheGtkObject : PGtkRuler;
+    procedure SetMetric (aMetric:TGtkMetricType);
+    procedure SetRange (Lower:float; Upper:float; Position:float; MaxSize:float);
+  end;
+
+
+  TFPgtkHRuler = class (TFPgtkRuler)
+  Protected
+    procedure CreateGtkObject; override;
+  Public
+    function TheGtkObject : PGtkHRuler;
+  end;
+
+
+  TFPgtkVRuler = class (TFPgtkRuler)
+  Protected
+    procedure CreateGtkObject; override;
+  Public
+    function TheGtkObject : PGtkVRuler;
+  end;
+
+
+  TFPgtkRange = class (TFPgtkWidget)
+  Private
+    function GetAdjustment : TFPgtkAdjustment;
+    procedure SetAdjustment (TheValue : TFPgtkAdjustment);
+    function GetUpdatePolicy : TgtkUpdateType;
+    procedure SetUpdatePolicy (TheValue : TgtkUpdateType);
+  Protected
+    FAdj:TFPgtkAdjustment;
+  Public
+    function TheGtkObject : PGtkRange;
+    property Adjustment : TFPgtkAdjustment read GetAdjustment write SetAdjustment;
+    property UpdatePolicy : TgtkUpdateType read GetUpdatePolicy write SetUpdatePolicy;
+    constructor Create (AnAdjustment:TFPgtkAdjustment);
+    procedure DrawBackground;
+    procedure DrawTrough;
+    procedure DrawStepForw;
+    procedure DrawStepBack;
+    procedure DrawSlider;
+    procedure SliderUpdate;
+    function TroughClick (X:integer; Y:integer; var JumpPerc:gfloat) : integer;
+    procedure DefaultHSliderUpdate;
+    procedure DefaultVSliderUpdate;
+    function DefaultHTroughClick (X:integer; Y:integer; var JumpPerc:gfloat) : integer;
+    function DefaultVTroughClick (X:integer; Y:integer; var JumpPerc:gfloat) : integer;
+    procedure defaultHMotion (XDelta:integer; YDelta:integer);
+    procedure defaultVMotion (XDelta:integer; YDelta:integer);
+    procedure ClearBackground;
+  end;
+
+
+  TFPgtkScale = class (TFPgtkRange)
+  Private
+    function GetDrawValue : boolean;
+    procedure SetDrawValue (TheValue : boolean);
+    function GetValuePos : TGtkPositionType;
+    procedure SetValuePos (TheValue : TGtkPositionType);
+  Public
+    function TheGtkObject : PGtkScale;
+    procedure SetDigits (TheValue:integer);
+    property DrawValue : boolean read GetDrawValue write SetDrawValue;
+    property ValuePos : TGtkPositionType read GetValuePos write SetValuePos;
+  end;
+
+
+  TFPgtkHScale = class (TFPgtkScale)
+  Protected
+    procedure CreateGtkObject; override;
+  Public
+    function TheGtkObject : PGtkHScale;
+  end;
+
+
+  TFPgtkVScale = class (TFPgtkScale)
+  Protected
+    procedure CreateGtkObject; override;
+  Public
+    function TheGtkObject : PGtkVScale;
+  end;
+
+
+  TFPgtkScrollbar = class (TFPgtkRange)
+  Public
+    function TheGtkObject : PGtkScrollbar;
+  end;
+
+
+  TFPgtkHScrollbar = class (TFPgtkScrollbar)
+  Protected
+    procedure CreateGtkObject; Override;
+  Public
+    function TheGtkObject : PGtkHScrollbar;
+  end;
+
+
+  TFPgtkVScrollbar = class (TFPgtkScrollbar)
+  Protected
+    procedure CreateGtkObject; Override;
+  Public
+  end;
+
+
+  TFPgtkSeparator = class (TFPgtkWidget)
+  Public
+    function TheGtkObject : PGtkSeparator;
+  end;
+
+
+  TFPgtkHSeparator = class (TFPgtkSeparator)
+  Protected
+    procedure CreateGtkObject; override;
+  Public
+    function TheGtkObject : PGtkHSeparator;
+  end;
+
+
+  TFPgtkVSeparator = class (TFPgtkSeparator)
+  Protected
+    procedure CreateGtkObject; override;
+  Public
+    function TheGtkObject : PGtkVSeparator;
+  end;
+
+
+  TFPgtkPreview = class (TFPgtkWidget)
+  Private
+    function GetExpand : longbool;
+    procedure SetExpand (TheValue : longbool);
+    function GetDither : TGdkRgbDither;
+    procedure SetDither (TheValue : TGdkRgbDither);
+  Protected
+    procedure CreateGtkObject; override;
+  Public
+    function TheGtkObject : PGtkPreview;
+    procedure Size (aWidth:integer; aHeight:integer);
+    procedure Put (aWindow:PGdkWindow; gc:PGdkGC; SrcX:integer; SrcY:integer; destX:integer; DestY:integer; aWidth:integer; aHeight:integer);
+    procedure DrawRow (data:pguchar; X:integer; Y:integer; W:integer);
+    property Expand : longbool read GetExpand write SetExpand;
+    property Dither : TGdkRgbDither read GetDither write SetDither;
+  end;
+
+
+  TFPgtkProgress = class (TFPgtkWidget)
+  Private
+    function GetShowtext : longbool;
+    procedure SetShowtext (TheValue : longbool);
+    function GetTextXAlign : gfloat;
+    procedure SetTextXAlign (TheValue : gfloat);
+    function GetTextYAlign : gfloat;
+    procedure SetTextYAlign (TheValue : gfloat);
+    function GetCurrentValue : float;
+    procedure SetCurrentValue (TheValue : float);
+    function GetPercentage : float;
+    procedure SetPercentage (TheValue : float);
+    function GetFormatString : string;
+    procedure SetFormatString (TheValue : string);
+    function GetAdjustment : TFPgtkAdjustment;
+    procedure SetAdjustment (TheValue : TFPgtkAdjustment);
+    function GetActivityMode : longbool;
+    procedure SetActivityMode (TheValue : longbool);
+  Public
+    function TheGtkObject : PGtkProgress;
+    property Showtext : longbool read GetShowtext write SetShowtext;
+    property TextXAlign : gfloat read GetTextXAlign write SetTextXAlign;
+    property TextYAlign : gfloat read GetTextYAlign write SetTextYAlign;
+    procedure SetTextAlignment (anXalign:gfloat; anYAlign:gfloat);
+    property CurrentValue : float read GetCurrentValue write SetCurrentValue;
+    property Percentage : float read GetPercentage write SetPercentage;
+    function PercentageFromValue (aValue:gfloat) : gfloat;
+    property FormatString : string read GetFormatString write SetFormatString;
+    property Adjustment : TFPgtkAdjustment read GetAdjustment write SetAdjustment;
+    property ActivityMode : longbool read GetActivityMode write SetActivityMode;
+    function CurrentText : string;
+    function TextFromValue (aValue:gfloat) : string;
+    procedure Configure (aValue:gfloat; aMin:gfloat; aMax:gfloat);
+  end;
+
+
+  TFPgtkProgressBar = class (TFPgtkProgress)
+  Private
+    FAdj:TFPgtkAdjustment;
+    function GetBarStyle : TGtkProgressBarStyle;
+    procedure SetBarStyle (TheValue : TGtkProgressBarStyle);
+    function GetDiscreteBlocks : longword;
+    procedure SetDiscreteBlocks (TheValue : longword);
+    function GetActivityStep : longword;
+    procedure SetActivityStep (TheValue : longword);
+    function GetActivityBlocks : longword;
+    procedure SetActivityBlocks (TheValue : longword);
+    function GetOrientation : TGtkProgressBarOrientation;
+    procedure SetOrientation (TheValue : TGtkProgressBarOrientation);
+  Protected
+    procedure CreateGtkObject; Override;
+  Public
+    function TheGtkObject : PGtkProgressBar;
+    constructor Create (adj:TFPgtkAdjustment);
+    property BarStyle : TGtkProgressBarStyle read GetBarStyle write SetBarStyle;
+    property DiscreteBlocks : longword read GetDiscreteBlocks write SetDiscreteBlocks;
+    property ActivityStep : longword read GetActivityStep write SetActivityStep;
+    property ActivityBlocks : longword read GetActivityBlocks write SetActivityBlocks;
+    property Orientation : TGtkProgressBarOrientation read GetOrientation write SetOrientation;
+  end;
+
+
+  TFPgtkItemFactory = class (TFPgtkObject)
+  Public
+  end;
+
+{ TFPgtkToolTips }
+var 
+  TheTooltips : TFPgtkTooltips;
+{ TFPgtkButton }
+const
+  DefaultButtonModifiers : TGdkModifierType = GDK_MOD1_MASK;
+{ TFPgtkWindow }
+const
+  drNone = 0;
+  drOk = 1;
+  drCancel = 2;
+  drYes = 3;
+  drNo = 4;
+  drRetry = 5;
+  NoMainLevel = high (guint);
+{ TFPgtkFontSelection }
+resourcestring
+  sFontNotFound = 'Can''t find font "%s" on this system';
+
+Const
+// TFPgtkObject
+  sgDestroy = 'destroy';
+// TFPgtkData
+  sgDisconnect = 'disconnect';
+// TFPgtkAdjustment
+  sgValueChanged = 'value_changed';
+  sgChanged = 'changed';
+// TFPgtkWidget
+  sgShow = 'show';
+  sghide = 'hide';
+  sgmap = 'map';
+  sgunmap = 'unmap';
+  sgrealize = 'realize';
+  sgunrealize = 'unrealize';
+  sgDrawFocus = 'draw-focus';
+  sgDrawDefault = 'draw-defaut';
+  sgParentSet = 'parent-set';
+  sgGrabFocus = 'grab-focus';
+  sgEvent = 'event';
+  sgButtonPressEvent = 'button-press-event';
+  sgButtonReleaseEvent = 'button-release-event';
+  sgMotionNotifyEvent = 'motion-notify-event';
+  sgDeleteEvent = 'delete-event';
+  sgDestroyEvent = 'destroy-event';
+  sgExposeEvent = 'expose-event';
+  sgKeyPressEvent = 'key-press-event';
+  sgKeyReleaseEvent = 'key-release-event';
+  sgEnterNotifyEvent = 'enter-notify-event';
+  sgLeaveNotifyEvent = 'leave-notify-event';
+  sgConfigureEvent = 'configure-event';
+  sgFocusInEvent = 'focus-in-event';
+  sgFocusOutEvent = 'focus-out-event';
+  sgMapEvent = 'map-event';
+  sgUnmapEvent = 'unmap-event';
+  sgPropertyNotifyEvent = 'property-notify-event';
+  sgSelectionClearEvent = 'selection-clear-event';
+  sgSelectionRequestEvent = 'selection-request-event';
+  sgSelectionNotifyEvent = 'selection-notify-event';
+  sgProximityInEvent = 'proximity-in-event';
+  sgProximityOutEvent = 'proximity-out-event';
+  sgClientEvent = 'client-event';
+  sgNoExposeEvent = 'no-expose-event';
+  sgVisibilityNotifyEvent = 'visibility-notify-event';
+// TFPgtkContainer
+  sgAdd = 'add';
+  sgRemove = 'remove';
+  sgCheckResize = 'check-resize';
+  sgFocus = 'focus';
+  sgSetFocusChild = 'set-focus';
+// TFPgtkButton
+  sgClicked = 'clicked';
+  sgPressed = 'pressed';
+  sgReleased = 'released';
+  sgEnter = 'enter';
+  sgLeave = 'leave';
+// TFPgtkToggleButton
+  sgToggled = 'toggled';
+// TFPgtkItem
+  sgSelect = 'select';
+  sgDeselect = 'deselect';
+  sgToggle = 'toggle';
+// TFPgtkMenuItem
+  sgActivate = 'activate';
+  sgActivateItem = 'activate-item';
+// TFPgtkListItem
+  sgToggleFocusRow = 'toggle-focus-row';
+  sgSelectAll = 'select-all';
+  sgUnselectAll = 'unselect-all';
+  sgUndoSelection = 'undo-selection';
+  sgStartSelection = 'start-selection';
+  sgEndSelection = 'end-selection';
+  sgToggleAddMode = 'toggle-add-mode';
+  sgExtendSelection = 'extend-selection';
+  sgScrollVertical = 'scroll-vertical';
+  sgScrollHorizontal = 'scroll-horizontal';
+// TFPgtkTreeItem
+  sgCollapse = 'collapse';
+  sgExpand = 'expand';
+// TFPgtkWindow
+  sgSetFocus = 'set-focus';
+// TFPgtkInputDialog
+  sgEnableDevice = 'enable-device';
+  sgDisableDevice = 'disable-device';
+// TFPgtkHandleBox
+  sgChildAttached = 'child-attached';
+  sgChildDetached = 'child-detached';
+// TFPgtkStatusbar
+  sgTextPopped = 'text-popped';
+  sgTextPushed = 'test-pushed';
+// TFPgtkCList
+  sgSelectRow = 'select-row';
+  sgUnselectRow = 'unselect-row';
+  sgRowMove = 'row-move';
+  sgScrolHorizontal = 'scroll-horizontal';
+  sgAbortColumnResize = 'abort-column-resize';
+  sgClickColumn = 'click-column';
+  sgResizeColumn = 'resize-column';
+// TFPgtkNotebook
+  sgSwitchPage = 'switch-page';
+// TFPgtkList
+  sgSelectionChanged = 'selection-changed';
+  sgSelectChild = 'select-child';
+  sgUnselectChild = 'unselect-child';
+// TFPgtkMenuShell
+  sgDeActivate = 'deactivate';
+  sgSelectionDone = 'selection-done';
+  sgCancel = 'cancel';
+  sgMoveCurrent = 'move-current';
+  sgActivateCurrent = 'activate-current';
+// TFPgtkCalendar
+  sgMonthChanged = 'month-changed';
+  sgDaySelected = 'day-selected';
+  sgDaySelectedDoubleClick = 'day-selected-double-click';
+  sgPrevMonth = 'prev-month';
+  sgNextMonth = 'next-month';
+  sgPrevYear = 'prev-year';
+  sgNextYear = 'next-year';
+// TFPgtkEditable
+  sgInsertText = 'insert-text';
+  sgDeleteText = 'delete-text';
+  sgSetEditable = 'set-editable';
+  sgMoveCursor = 'move-cursor';
+  sgMoveWord = 'move-word';
+  sgMovePage = 'move-page';
+  sgMoveToRow = 'move-to-row';
+  sgMoveToCol = 'move-to-column';
+  sgKillChar = 'kill-char';
+  sgKillWord = 'kill-word';
+  sgKillLine = 'kill-line';
+  sgCutClipboard = 'cut-clipboard';
+  sgCopyClipboard = 'copy-clipboard';
+  sgPasteClipboard = 'paste-clipboard';
+
+// TFPgtkObject
+function GetPascalInstance (gtkObject:PGtkObject; ObjClass:TFPgtkObjectClass) : TFPgtkObject; Overload;
+function GetPascalInstance (gtkObject:PGtkObject) : TFPgtkObject; Overload;
+function ConvertToGtkObject (AnObject:TFPgtkObject) : PGtkObject;
+function ConvertToPgChar (AString:string) : PgChar;
+function FreeFPgtkObjects (Data:pointer) : longbool; Cdecl;
+procedure DestroyData (data:pointer); Cdecl;
+function IntToPointer (Value:integer) : pointer;
+function PointerToInt (Value:pointer) : integer;
+// TFPgtkToolTips
+function GetTooltipsData (Widget:TFPgtkWidget) : PGtkTooltipsData;
+function ComposeTooltip (TooltipText:string; PrivText:string) : string;
+procedure DecomposeTooltip (Tooltip:string; var TooltipText:string; var PrivText:string);
+// TFPgtkWidget
+function GetPascalInstance (Widget:PGtkWidget) : TFPgtkWidget; Overload;
+function GetPascalInstance (Widget:PGtkWidget; ObjClass:TFPgtkObjectClass) : TFPgtkWidget; Overload;
+function ConvertToGtkWidget (AnObject:TFPgtkWidget) : PGtkWidget;
+// TFPgtkImage
+function NewImage (aWidth:integer; aHeight:integer) : PGdkImage;
+// TFPgtkPixmap
+function StringsToPPgchar (Data:TStrings) : PPgchar;
+function ArrayToPPgchar (Data:array of string) : PPgchar;
+procedure CreateGdkPixmap (var ThePixmap:PGdkPixmap; var TheMask:PGdkBitmap; aWindow:PGdkWindow; data:array of string);
+// TFPgtkRadioButtonGroup
+function RadioButtonGroupCreateFromStrings (TheItems:TStrings; ToggledFunction:TFPgtkSignalFunction) : TFPgtkRadioButtonGroup;
+// TFPgtkWindow
+procedure AcceleratorAdd (AG:PGtkAccelGroup; aWidget:TFPgtkWidget; aSignal:string; Key:guint; Mods:TGdkModifierType; Flags:TGtkAccelFlags);
+procedure AcceleratorRemove (AG:PGtkAccelGroup; aWidget:TFPgtkWidget; Key:guint; Mods:TGdkModifierType); Overload;
+procedure AccelGroupLock (AG:PGtkAccelGroup);
+procedure AccelGroupUnlock (AG:PGtkAccelGroup);
+function AccelKeyName (Key:guint; Mods:TGdkModifierType) : string;
+procedure AccelKeyParse (AccelName:string; var Key:guint; var Mods:TGdkModifierType);
+procedure AccelGroupActivate (AG:PGtkAccelGroup; Key:guint; Mods:TGdkModifierType);
+// TFPgtkButtonBox
+procedure SetButtonBoxDefaultSize (aMinWidth:integer; aMinHeight:integer);
+procedure GetButtonBoxDefaultSize (var aMinWidth:integer; var aMinHeight:integer);
+procedure SetButtonBoxDefaultPadding (aIPadX:integer; aIPadY:integer);
+procedure GetButtonBoxDefaultPadding (var aIPadX:integer; var aIPadY:integer);
+// TFPgtkPreview
+procedure SetGamma (aGamma:double);
+
+IMPLEMENTATION
+
+ { TFPgtkObject }
+
+function TFPgtkObject.TheGtkObject : PGtkObject;
+begin
+  result := PgtkObject(FGtkObject);
+end;
+
+const
+  dtPascalInstance = 'Pascal_Instance';
+
+type
+  TIntegerPointer = record
+    case word of 
+      0 : (i : integer);
+      1 : (p : pointer);
+  end;
+
+var
+  ObjectsToFree : TList;
+  ip : TIntegerPointer;
+
+procedure Signalproc (Sender:PGtkobject; Data:pointer); cdecl;
+var p : TFPgtkSignalFunction;
+begin
+with PSignalData(data)^ do
+  begin
+  p := TFPgtkSignalFunction (TheSignalProc);
+  p (TheWidget as TFPgtkObject, TheData)
+  end;
+end;
+
+function TFPgtkObject.SignalConnect (signal:string; proc:TFPgtkSignalFunction; data:pointer) : guint;
+begin
+  result := gtk_signal_connect (FGtkObject, pgChar(signal), gtk_signal_func(@Signalproc), ConvertSignalData(TFPgtkSignalFunction(proc), data, true));
+end;
+
+function TFPgtkObject.SignalConnectAfter (signal:string; proc:TFPgtkSignalFunction; data:pointer) : guint;
+begin
+  result := gtk_signal_connect_After (FGtkObject, pgChar(signal), gtk_signal_func(@Signalproc), ConvertSignalData(TFPgtkSignalFunction(proc), data, true));
+end;
+
+procedure BooleanSignalproc (Sender:PGtkobject; Bool:boolean; data:pointer); cdecl;
+var p : TFPgtkBooleanSignalFunction;
+begin
+with PSignalData(data)^ do
+  begin
+  p := TFPgtkBooleanSignalFunction (TheSignalProc);
+  p (TheWidget as TFPgtkObject, Bool, TheData)
+  end;
+end;
+
+function TFPgtkObject.BooleanSignalConnect (signal:string; proc:TFPgtkBooleanSignalFunction; data:pointer) : guint;
+begin
+  result := gtk_signal_connect (FGtkObject, pgChar(signal), gtk_signal_func(@BooleanSignalproc), ConvertSignalData(TFPgtkSignalFunction(proc), data, true));
+end;
+
+function TFPgtkObject.BooleanSignalConnectAfter (signal:string; proc:TFPgtkBooleanSignalFunction; data:pointer) : guint;
+begin
+  result := gtk_signal_connect_After (FGtkObject, pgChar(signal), gtk_signal_func(@BooleanSignalproc), ConvertSignalData(TFPgtkSignalFunction(proc), data, true));
+end;
+
+function GetPascalInstance (gtkObject:PGtkObject; ObjClass:TFPgtkObjectClass) : TFPgtkObject; Overload;
+begin
+  result := GetPascalInstance(GtkObject);
+  if not assigned(result) and assigned(GtkObject) then
+    result := ObjClass.CreateFromObject (GtkObject);
+end;
+
+
+function GetPascalInstance (gtkObject:PGtkObject) : TFPgtkObject; Overload;
+var p : pointer;
+begin
+  result := nil;
+  if assigned (gtkobject) then
+    begin
+    p := gtk_object_get_data (gtkObject, dtPascalInstance);
+    if assigned(p) then
+      result := PPascalClassData(p)^.TheInstance;
+    end;
+end;
+
+
+function ConvertToGtkObject (AnObject:TFPgtkObject) : PGtkObject;
+begin
+  if assigned(AnObject) then
+    result := AnObject.TheGtkObject
+  else
+    result := nil;
+end;
+
+
+function ConvertToPgChar (AString:string) : PgChar;
+begin
+  result := pointer(aString);
+end;
+
+
+function TFPgtkObject.ConvertSignalData (proc:TFPgtkSignalFunction; data:pointer; FreeIt:boolean) : PSignalData;
+begin
+  new (result);
+  with result^ do
+    begin
+    TheSignalProc := proc;
+    TheWidget := self;
+    TheData := data;
+    end;
+  if FreeIt then
+    SignalDatas.Add (result);
+end;
+
+function FreeFPgtkObjects (Data:pointer) : longbool; Cdecl;
+var r : integer;
+    obj : TFPgtkObject;
+begin
+  for r := ObjectsToFree.Count-1 downto 0 do
+    begin
+    obj := TFPgtkObject(ObjectsToFree[r]);
+    if assigned (Obj) then
+      Obj.Free;
+    end;
+  ObjectsToFree.Clear;
+  result := False;
+end;
+
+
+procedure TFPgtkObject.FreeClass (Sender:TFPgtkObject; Data:pointer);
+begin
+  if FDestroying = dsAlive then
+    begin
+    if ObjectsToFree.Count = 0 then
+      g_idle_Add (@FreeFPgtkObjects, null);
+    ObjectsToFree.Add (self);
+    FGtkObject := null;
+    FDestroying := dsWaiting;
+    end;
+end;
+
+procedure TFPgtkObject.CheckConvertDatas;
+begin
+  if not assigned (ConvertDatas) then
+    begin
+    ConvertDatas := TStringList.Create;
+    ConvertDatas.Sorted := True;
+    end;
+end;
+
+procedure TFPgtkObject.CheckNotifyList;
+begin
+  if not assigned (Notifylist) then
+    NotifyList := TList.Create;
+end;
+
+procedure TFPgtkObject.InitCreate;
+begin
+  inherited create;
+  SignalDatas := TList.Create;
+end;
+
+procedure TFPgtkObject.FinalCreate;
+begin
+  PascalInstance.TheInstance := Self;
+  SetData (dtPascalInstance, @PascalInstance);
+  ConnectDestroy (@FreeClass, nil);
+end;
+
+constructor TFPgtkObject.Create;
+begin
+  InitCreate;
+  CreateGtkObject;
+  FinalCreate;
+end;
+
+
+constructor TFPgtkObject.CreateFromObject (GtkObject:PGtkObject);
+begin
+  InitCreate;
+  FGtkObject := GtkObject;
+  FinalCreate;
+end;
+
+
+procedure TFPgtkObject.AskNotification (AnObject:TFPgtkObject);
+begin
+  CheckNotifyList;
+  with NotifyList do
+    if indexof(AnObject) < 0 then
+      begin
+      Add (AnObject);
+      AnObject.AskNotification (Self);
+      end;
+end;
+
+destructor TFPgtkObject.Destroy;
+var r : integer;
+    datapointer : PSignalData;
+begin
+  FDestroying := dsDestroying;
+  if assigned(NotifyList) then
+    begin
+    for r := 0 to NotifyList.count-1 do
+      TFPgtkObject(NotifyList[r]).NotifyDestroy (Self);
+    NotifyList.Free;
+    NotifyList := nil;
+    end;
+  if assigned(FGtkObject) and not Gtk_Object_destroyed(FGtkObject) then
+    begin
+    gtk_object_destroy (FGtkObject);
+    FGtkObject := nil;
+    end;
+  for r := 0 to SignalDatas.count-1 do
+    begin
+    datapointer := signaldatas[r];
+    dispose (datapointer);
+    end;
+  signaldatas.Free;
+  if assigned (convertDatas) then
+    ConvertDatas.Free;
+  r := ObjectsToFree.indexof (self);
+  if r >= 0 then
+    ObjectsToFree[r] := nil;
+  inherited destroy;
+end;
+
+
+procedure TFPgtkObject.NotifyDestroy (AnObject:TFPgtkObject);
+var r : integer;
+begin
+  if assigned(NotifyList) then
+    begin
+    r := NotifyList.indexOf (AnObject);
+    if r >= 0 then
+      NotifyList.Delete (r);
+    end;
+end;
+
+function TFPgtkObject.ConnectDestroy (proc:TFPgtkSignalFunction; data:pointer) : guint;
+begin
+  result := SignalConnect (sgDestroy, proc, data);
+end;
+
+function TFPgtkObject.ConnectAfterDestroy (proc:TFPgtkSignalFunction; data:pointer) : guint;
+begin
+  result := SignalConnectAfter (sgDestroy, proc, data);
+end;
+
+procedure TFPgtkObject.SignalDisconnect (SignalHandler:guint);
+begin
+  gtk_signal_disconnect (TheGtkObject, SignalHandler);
+end;
+
+procedure TFPgtkObject.SignalBlockHandler (SignalHandler:guint);
+begin
+  gtk_signal_handler_block (TheGtkObject, SignalHandler);
+end;
+
+procedure TFPgtkObject.SignalUnblockHandler (SignalHandler:guint);
+begin
+  gtk_signal_handler_unblock (TheGtkObject, SignalHandler);
+end;
+
+procedure TFPgtkObject.SignalEmit (aName:string; Args:array of const);
+begin
+  gtk_signal_emit_by_name (TheGtkObject, pgchar(aName), Args);
+end;
+
+function TFPgtkObject.SignalNEmissions (aName:string) : guint;
+begin
+  result := gtk_signal_n_emissions_by_name (FGtkObject, pgchar(aName));
+end;
+
+procedure TFPgtkObject.SignalEmitStop (aName:string);
+begin
+  gtk_signal_emit_stop_by_name (FGtkObject, pgchar(aName));
+end;
+
+procedure TFPgtkObject.SetData (Key:string; Data:pointer);
+begin
+  gtk_object_set_data (TheGtkObject, ConvertToPgchar(Key), Data);
+end;
+
+function TFPgtkObject.GetUserData : pointer;
+begin
+  result := gtk_object_get_user_data(TheGtkObject);
+end;
+
+procedure TFPgtkObject.SetUserData (TheValue:pointer);
+begin
+  gtk_object_set_user_data(TheGtkObject,TheValue);
+end;
+
+procedure TFPgtkObject.SetDataFull (Key:string; Data:pointer; Destroyer:TFPgtkSignalFunction);
+begin
+  gtk_object_set_data_full (TheGtkObject, pgChar(Key), ConvertSignalData (Destroyer, data, false), TGtkDestroyNotify(@DestroyData));
+  CheckConvertDatas;
+  ConvertDatas.Add (Key);
+end;
+
+procedure TFPgtkObject.RemoveData (Key:string);
+var r : integer;
+begin
+  gtk_object_remove_data (TheGtkObject, pgChar(Key));
+  if assigned (ConvertDatas) then
+    begin
+    r := ConvertDatas.indexof (Key);
+    if r >= 0 then
+    ConvertDatas.Delete (r);
+    end;
+end;
+
+function TFPgtkObject.GetData (Key:string) : pointer;
+var p  : pointer;
+begin
+  p := gtk_object_get_data (TheGtkObject, pgChar(Key));
+  if assigned(ConvertDatas) and (ConvertDatas.IndexOf (Key) >= 0) then
+    result := PPascalClassData (PSignalData(p)^.TheData)^.TheInstance
+  else
+    result := p;
+end;
+
+procedure DestroyData (data:pointer); Cdecl;
+begin
+  with PSignaldata(data)^ do
+    TheSignalProc (TheWidget, TheData);
+end;
+
+
+function IntToPointer (Value:integer) : pointer;
+begin
+  ip.i := Value;
+  result := ip.p;
+end;
+
+
+function PointerToInt (Value:pointer) : integer;
+begin
+  ip.p := Value;
+  result := ip.i;
+end;
+
+
+function TFPgtkObject.GtkDestroyed : boolean;
+begin
+  result := gtk_object_destroyed (TheGtkObject);
+end;
+
+procedure TFPgtkObject.Constructed;
+begin
+  gtk_object_constructed (TheGtkObject);
+end;
+
+procedure TFPgtkObject.ConstructedDefault;
+begin
+  gtk_object_default_construct (TheGtkObject);
+end;
+
+procedure TFPgtkObject.Sink;
+begin
+  gtk_object_sink (TheGtkObject);
+end;
+
+procedure TFPgtkObject.Ref;
+begin
+  gtk_object_ref (TheGtkObject);
+end;
+
+procedure TFPgtkObject.Unref;
+begin
+  gtk_object_unref (TheGtkObject);
+end;
+
+procedure TFPgtkObject.WeakRef (Notify:TFPgtkSignalFunction; data:pointer);
+begin
+  gtk_object_weakref (TheGtkObject, TGtkDestroyNotify(@DestroyData), ConvertSignalData (Notify, data, true));
+end;
+
+procedure TFPgtkObject.WeakUnref (notify:TFPgtkSignalFunction; data:pointer);
+begin
+  gtk_object_weakunref (TheGtkObject, TGtkDestroyNotify(@DestroyData), ConvertSignalData (Notify, data, true));
+end;
+
+ { TFPgtkData }
+
+function TFPgtkData.TheGtkObject : PGtkData;
+begin
+  result := PgtkData(FGtkObject);
+end;
+
+
+function TFPgtkData.ConnectDisconnect (proc:TFPgtkSignalFunction; data:pointer) : guint;
+begin
+  result := SignalConnect (sgDisconnect, proc, data);
+end;
+
+function TFPgtkData.ConnectAfterDisconnect (proc:TFPgtkSignalFunction; data:pointer) : guint;
+begin
+  result := SignalConnectAfter (sgDisconnect, proc, data);
+end;
+
+ { TFPgtkAdjustment }
+
+function TFPgtkAdjustment.TheGtkObject : PGtkAdjustment;
+begin
+  result := PgtkAdjustment(FGtkObject);
+end;
+
+procedure TFPgtkAdjustment.CreateGtkObject;
+begin
+  FGtkObject := PGtkObject(gtk_Adjustment_new (0,0,10,1,2,2));
+end;
+
+
+procedure TFPgtkAdjustment.Configure (aLower:gfloat; anUpper:gfloat; aValue:gfloat; aStepInc:gfloat; aPageInc:gfloat; aPageSize:gfloat);
+begin
+  Lower := aLower;
+  Upper := anUpper;
+  Value := aValue;
+  StepIncrement := aStepInc;
+  PageIncrement := aPageInc;
+  PageSize := aPageSize;
+end;
+
+function TFPgtkAdjustment.ConnectValueChanged (proc:TFPgtkSignalFunction; data:pointer) : guint;
+begin
+  result := SignalConnect (sgValueChanged, proc, data);
+end;
+
+function TFPgtkAdjustment.ConnectAfterValueChanged (proc:TFPgtkSignalFunction; data:pointer) : guint;
+begin
+  result := SignalConnectAfter (sgValueChanged, proc, data);
+end;
+
+function TFPgtkAdjustment.ConnectChanged (proc:TFPgtkSignalFunction; data:pointer) : guint;
+begin
+  result := SignalConnect (sgChanged, proc, data);
+end;
+
+function TFPgtkAdjustment.ConnectAfterChanged (proc:TFPgtkSignalFunction; data:pointer) : guint;
+begin
+  result := SignalConnectAfter (sgChanged, proc, data);
+end;
+
+procedure TFPgtkAdjustment.ValueChanged;
+begin
+  gtk_Adjustment_Value_Changed (TheGtkObject);
+end;
+
+procedure TFPgtkAdjustment.Changed;
+begin
+  gtk_Adjustment_Changed (TheGtkObject);
+end;
+
+procedure TFPgtkAdjustment.ClampPage (aLower:gfloat; aUpper:gfloat);
+begin
+  gtk_Adjustment_Clamp_Page (TheGtkObject, aLower, aUpper);
+end;
+
+function TFPgtkAdjustment.GetValue : gfloat;
+begin
+  result := TheGtkObject^.Value;
+end;
+
+procedure TFPgtkAdjustment.SetValue (TheValue:gfloat);
+begin
+  gtk_Adjustment_set_Value(TheGtkObject,TheValue);
+end;
+
+function TFPgtkAdjustment.GetLower : gfloat;
+begin
+  result := TheGtkObject^.Lower;
+end;
+
+procedure TFPgtkAdjustment.SetLower (TheValue:gfloat);
+begin
+  TheGtkObject^.Lower := TheValue;
+end;
+
+function TFPgtkAdjustment.GetUpper : gfloat;
+begin
+  result := TheGtkObject^.Upper;
+end;
+
+procedure TFPgtkAdjustment.SetUpper (TheValue:gfloat);
+begin
+  TheGtkObject^.Upper := TheValue;
+end;
+
+function TFPgtkAdjustment.GetStepIncrement : gfloat;
+begin
+  result := TheGtkObject^.Step_Increment;
+end;
+
+procedure TFPgtkAdjustment.SetStepIncrement (TheValue:gfloat);
+begin
+  TheGtkObject^.Step_Increment := TheValue;
+end;
+
+function TFPgtkAdjustment.GetPageIncrement : gfloat;
+begin
+  result := TheGtkObject^.Page_Increment;
+end;
+
+procedure TFPgtkAdjustment.SetPageIncrement (TheValue:gfloat);
+begin
+  TheGtkObject^.Page_increment := TheValue;
+end;
+
+function TFPgtkAdjustment.GetPageSize : gfloat;
+begin
+  result := TheGtkObject^.Page_Size;
+end;
+
+procedure TFPgtkAdjustment.SetPageSize (TheValue:gfloat);
+begin
+  TheGtkObject^.Page_Size := TheValue;
+end;
+
+ { TFPgtkToolTips }
+
+function TFPgtkToolTips.TheGtkObject : PGtkToolTips;
+begin
+  result := PgtkToolTips(FGtkObject);
+end;
+
+procedure TFPgtkToolTips.CreateGtkObject;
+begin
+  FGtkObject := PGtkObject(gtk_tooltips_new);
+end;
+
+
+procedure TFPgtkToolTips.SetColors (Fore:PGdkColor; Back:PGdkColor);
+begin
+  gtk_tooltips_set_colors (TheGtkObject, Fore, Back);
+end;
+
+procedure TFPgtkToolTips.SetTip (Widget:TFPgtkWidget; TipText:string; TipPrivate:string);
+begin
+  gtk_tooltips_set_tip (TheGtkObject, PGtkwidget(ConvertToGtkObject(Widget)), ConvertToPgchar(TipText), ConvertToPgchar(TipPrivate));
+end;
+
+function TFPgtkToolTips.GetEnabled : boolean;
+begin
+  result := boolean(gtk.enabled(TheGtkObject^));
+end;
+
+procedure TFPgtkToolTips.SetEnabled (TheValue:boolean);
+begin
+  if TheValue then
+    gtk_tooltips_enable (TheGtkObject)
+  else
+    gtk_tooltips_disable (TheGtkObject);
+end;
+
+function TFPgtkToolTips.GetDelay : integer;
+begin
+  result := gtk.delay(TheGtkObject^);
+end;
+
+procedure TFPgtkToolTips.SetDelay (TheValue:integer);
+begin
+  gtk_tooltips_set_delay(TheGtkObject,TheValue);
+end;
+
+function TFPgtkToolTips.GetColorForeground : PGdkColor;
+begin
+  result := TheGtkObject^.foreground;
+end;
+
+procedure TFPgtkToolTips.SetColorForeground (TheValue:PGdkColor);
+begin
+  SetColors (TheValue, ColorBackGround);
+end;
+
+function TFPgtkToolTips.GetColorBackground : PGdkColor;
+begin
+  result := TheGtkObject^.background;
+end;
+
+procedure TFPgtkToolTips.SetColorBackground (TheValue:PGdkColor);
+begin
+  SetColors (ColorForeground, TheValue);
+end;
+
+function GetTooltipsData (Widget:TFPgtkWidget) : PGtkTooltipsData;
+begin
+  result := gtk_tooltips_data_get (ConvertToGtkWidget(Widget));
+end;
+
+
+function ComposeTooltip (TooltipText:string; PrivText:string) : string;
+begin
+  result := TooltipText;
+  if PrivText <> '' then
+    result := result + '|' + PrivText;
+end;
+
+
+procedure DecomposeTooltip (Tooltip:string; var TooltipText:string; var PrivText:string);
+var r : integer;
+begin
+  r := pos ('|', tooltip);
+  if r > 0 then
+    begin
+    TooltipText := copy(Tooltip, 1, r-1);
+    PrivText := copy (Tooltip, r+1, maxint);
+    end
+  else
+    begin
+    TooltipText := Tooltip;
+    PrivText := '';
+    end;
+end;
+
+
+procedure CheckTooltips;
+begin
+if not assigned (TheTooltips) then
+  TheTooltips := TFPgtkTooltips.Create;
+end;
+
+
+procedure TFPgtkToolTips.ForceWindow;
+begin
+  gtk_tooltips_force_window (TheGtkObject);
+end;
+
+ { TFPgtkWidget }
+
+function TFPgtkWidget.TheGtkObject : PGtkWidget;
+begin
+  result := PgtkWidget(FGtkObject);
+end;
+
+
+function TFPgtkWidget.GetTheGtkWidget : PGtkWidget;
+begin
+  result := PGtkWidget (TheGtkObject);
+end;
+
+procedure TFPgtkWidget.SetTheGtkWidget (TheValue:PGtkWidget);
+begin
+  FGtkObject := PgtkObject (TheValue);
+end;
+
+function GetPascalInstance (Widget:PGtkWidget) : TFPgtkWidget; Overload;
+begin
+  result := TFPgtkWidget (GetPascalInstance (PGtkObject(widget)));
+end;
+
+
+function GetPascalInstance (Widget:PGtkWidget; ObjClass:TFPgtkObjectClass) : TFPgtkWidget; Overload;
+begin
+  result := TFPgtkWidget (GetPascalInstance (PGtkObject(Widget), ObjClass));
+end;
+
+
+function ConvertToGtkWidget (AnObject:TFPgtkWidget) : PGtkWidget;
+begin
+  if assigned(AnObject) then
+    result := AnObject.TheGtkWidget
+  else
+    result := nil;
+end;
+
+
+procedure WidgetSignalproc (Sender:PGtkobject; Widget:PGtkwidget; Data:pointer); cdecl;
+var p : TFPgtkWidgetSignalFunction;
+begin
+with PSignalData(data)^ do
+  begin
+  p := TFPgtkWidgetSignalFunction (TheSignalProc);
+  p (TheWidget as TFPgtkObject, GetPascalInstance(PGtkObject(Widget),TFPgtkwidget) as TFPgtkwidget, TheData)
+  end;
+end;
+
+function TFPgtkWidget.WidgetSignalConnect (signal:string; proc:TFPgtkWidgetSignalFunction; data:pointer) : guint;
+begin
+  result := gtk_signal_connect (FGtkObject, pgChar(signal), gtk_signal_func(@WidgetSignalproc), ConvertSignalData(TFPgtkSignalFunction(proc), data, true));
+end;
+
+function TFPgtkWidget.WidgetSignalConnectAfter (signal:string; proc:TFPgtkWidgetSignalFunction; data:pointer) : guint;
+begin
+  result := gtk_signal_connect_After (FGtkObject, pgChar(signal), gtk_signal_func(@WidgetSignalproc), ConvertSignalData(TFPgtkSignalFunction(proc), data, true));
+end;
+
+procedure TFPgtkWidget.SetFlags (NewFlags:longint);
+begin
+  gtk_widget_set_flags (TheGtkObject, NewFlags);
+end;
+
+procedure TFPgtkWidget.UnsetFlags (NewUnsetFlags:longint);
+begin
+  gtk_widget_unset_flags (TheGtkObject, NewUnsetFlags);
+end;
+
+procedure TFPgtkWidget.Map;
+begin
+  gtk_widget_map (TheGtkObject);
+end;
+
+procedure TFPgtkWidget.Unmap;
+begin
+  gtk_widget_unmap (TheGtkObject);
+end;
+
+procedure TFPgtkWidget.QueueDraw;
+begin
+  gtk_widget_queue_draw (TheGtkObject);
+end;
+
+procedure TFPgtkWidget.QueueResize;
+begin
+  gtk_widget_queue_resize (TheGtkObject);
+end;
+
+procedure TFPgtkWidget.Draw (Rectangle:PGdkRectangle); Overload;
+begin
+  gtk_widget_draw (TheGtkObject, Rectangle);
+end;
+
+procedure TFPgtkWidget.DrawFocus;
+begin
+  gtk_widget_draw_focus (TheGtkObject);
+end;
+
+procedure TFPgtkWidget.DrawDefault;
+begin
+  gtk_widget_draw_default (TheGtkObject);
+end;
+
+procedure TFPgtkWidget.Show;
+begin
+  gtk_widget_show (TheGtkObject);
+end;
+
+procedure TFPgtkWidget.Hide;
+begin
+  gtk_widget_hide (TheGtkObject);
+end;
+
+procedure TFPgtkWidget.Realize;
+begin
+  gtk_widget_realize (TheGtkObject);
+end;
+
+procedure TFPgtkWidget.Unrealize;
+begin
+  gtk_widget_unrealize (TheGtkObject);
+end;
+
+procedure TFPgtkWidget.ShowNow;
+begin
+  gtk_widget_show_now (TheGtkObject);
+end;
+
+procedure TFPgtkWidget.ShowAll;
+begin
+  gtk_widget_show_all (TheGtkObject);
+end;
+
+procedure TFPgtkWidget.HideAll;
+begin
+  gtk_widget_hide_all (TheGtkObject);
+end;
+
+procedure TFPgtkWidget.SetAllocation (AnAllocation:TGtkAllocation); Overload;
+begin
+  with AnAllocation do
+    SetAllocation (x, y, width, height);
+end;
+
+procedure TFPgtkWidget.SetAllocation (x:integer; y:integer; width:integer; height:integer); Overload;
+begin
+  SetUPosition (x, y);
+  SetUSize (width, height);
+end;
+
+function TFPgtkWidget.GetAllocation : TGtkAllocation;
+begin
+  result := TheGtkObject^.allocation;
+end;
+
+procedure TFPgtkWidget.SetUPosition (x:integer; y:integer);
+begin
+  gtk_widget_set_uposition (TheGtkObject, x, y);
+end;
+
+procedure TFPgtkWidget.SetUsize (width:integer; height:integer);
+begin
+  gtk_widget_set_usize (TheGtkObject, width, height);
+end;
+
+function TFPgtkWidget.GetName : string;
+begin
+  result := gtk_widget_get_name(TheGtkObject);
+end;
+
+procedure TFPgtkWidget.SetName (TheValue:string);
+begin
+  gtk_widget_set_name(TheGtkObject,ConvertToPgchar(TheValue));
+end;
+
+function TFPgtkWidget.GetPropFlags : longint;
+begin
+  result := gtk_widget_Flags (TheGtkObject);
+end;
+
+procedure TFPgtkWidget.SetPropFlags (TheValue:longint);
+var f : integer;
+begin
+  f := GetPropFlags;
+  UnsetFlags (f and not TheValue);
+  SetFlags (not f and TheValue);
+end;
+
+function TFPgtkWidget.GetState : longint;
+begin
+  result := gtk_widget_State(TheGtkObject);
+end;
+
+function TFPgtkWidget.GetSavedState : longint;
+begin
+  result := gtk_widget_Saved_State(TheGtkObject);
+end;
+
+function TFPgtkWidget.GetParent : TFPgtkWidget;
+var gtkparent : PgtkWidget;
+    o : TFPgtkObject;
+begin
+  gtkParent := TheGtkObject^.parent;
+  o := GetPascalInstance (PgtkObject(GtkParent));
+  if o is TFPgtkWidget then
+    result := TFPgtkWidget(o)
+  else
+    result := nil;
+end;
+
+procedure TFPgtkWidget.SetParent (TheValue:TFPgtkWidget);
+var gtkparent : PgtkWidget;
+begin
+  gtkParent := TheGtkObject^.parent;
+  if assigned(TheValue) then
+    if assigned(gtkParent) then
+      reparent (TheValue)
+    else
+      gtk_widget_set_parent (TheGtkWidget, ConvertToGtkWidget(TheValue))
+  else
+    if assigned(gtkParent) then
+      gtk_widget_unparent (TheGtkWidget);
+end;    
+      
+
+function TFPgtkWidget.GetParentWindow : PGdkWindow;
+begin
+  result := gtk_widget_get_parent_window(TheGtkObject);
+end;
+
+procedure TFPgtkWidget.SetParentWindow (TheValue:PGdkWindow);
+begin
+  gtk_widget_set_parent_window(TheGtkObject,TheValue);
+end;
+
+procedure TFPgtkWidget.Unparent;
+begin
+  gtk_widget_unparent (TheGtkObject);
+end;
+
+procedure TFPgtkWidget.Reparent (NewParent:TFPgtkWidget);
+begin
+  if (NewParent is TFpgtkContainer) then
+    begin
+    ref;
+    TFPgtkContainer(Parent).remove (self);
+    TFPgtkContainer(NewParent).Add (Self);
+    unref;
+    end;
+end;
+
+function TFPgtkWidget.GetVisible : boolean;
+begin
+  result := gtk_widget_Visible(TheGtkObject);
+end;
+
+procedure TFPgtkWidget.SetVisible (TheValue:boolean);
+begin
+  if TheValue then
+    Show
+  else
+    Hide;
+end;
+
+function TFPgtkWidget.GetNoWindow : boolean;
+begin
+  result := gtk_widget_No_Window(TheGtkObject);
+end;
+
+procedure TFPgtkWidget.SetNoWindow (TheValue:boolean);
+begin
+  if TheValue then
+    SetFlags (GTK_NO_WINDOW)
+  else
+    UnSetFlags (GTK_NO_WINDOW);
+end;
+
+function TFPgtkWidget.GetRealized : boolean;
+begin
+  result := gtk_widget_realized(TheGtkObject);
+end;
+
+procedure TFPgtkWidget.SetRealized (TheValue:boolean);
+begin
+  if TheValue then 
+    Realize
+  else
+    Unrealize;
+end;
+
+function TFPgtkWidget.GetMapped : boolean;
+begin
+  result := gtk_widget_Mapped(TheGtkObject);
+end;
+
+procedure TFPgtkWidget.SetMapped (TheValue:boolean);
+begin
+  if TheValue then
+    Map
+  else
+    Unmap;
+end;
+
+function TFPgtkWidget.GetDrawable : boolean;
+begin
+  result := gtk_widget_Drawable(TheGtkObject);
+end;
+
+function TFPgtkWidget.GetIsSensitive : boolean;
+begin
+  result := gtk_widget_Is_Sensitive(TheGtkObject);
+end;
+
+function TFPgtkWidget.GetSensitive : boolean;
+begin
+  result := gtk_widget_Sensitive(TheGtkObject);
+end;
+
+procedure TFPgtkWidget.SetSensitive (TheValue:boolean);
+begin
+  gtk_widget_set_sensitive(TheGtkObject,TheValue);
+end;
+
+function TFPgtkWidget.GetParentSensitive : boolean;
+begin
+  result := gtk_widget_Parent_Sensitive(TheGtkObject);
+end;
+
+procedure TFPgtkWidget.SetParentSensitive (TheValue:boolean);
+begin
+  if TheValue then
+    SetFlags (GTK_PARENT_SENSITIVE)
+  else
+    UnSetFlags (GTK_PARENT_SENSITIVE);
+end;
+
+function TFPgtkWidget.GetAppPaintable : boolean;
+begin
+  result := gtk_widget_App_Paintable(TheGtkObject);
+end;
+
+function TFPgtkWidget.GetCanFocus : boolean;
+begin
+  result := gtk_widget_Can_Focus(TheGtkObject);
+end;
+
+procedure TFPgtkWidget.SetCanFocus (TheValue:boolean);
+begin
+  if TheValue then
+    SetFlags (GTK_CAN_FOCUS)
+  else
+    UnSetFlags (GTK_CAN_FOCUS);
+end;
+
+procedure TFPgtkWidget.GrabFocus;
+begin
+  gtk_widget_grab_focus (TheGtkObject);
+end;
+
+function TFPgtkWidget.GetHasFocus : boolean;
+begin
+  result := gtk_widget_Has_Focus(TheGtkObject);
+end;
+
+function TFPgtkWidget.GetCanDefault : boolean;
+begin
+  result := gtk_widget_Can_Default(TheGtkObject);
+end;
+
+procedure TFPgtkWidget.SetCanDefault (TheValue:boolean);
+begin
+  if TheValue then
+    SetFlags (GTK_CAN_DEFAULT)
+  else
+    UnSetFlags (GTK_CAN_DEFAULT);
+end;
+
+procedure TFPgtkWidget.GrabDefault;
+begin
+  gtk_widget_grab_default (TheGtkObject);
+end;
+
+function TFPgtkWidget.GetHasDefault : boolean;
+begin
+  result := gtk_widget_Has_Default(TheGtkObject);
+end;
+
+function TFPgtkWidget.GetReceivesDefault : boolean;
+begin
+  result := gtk_widget_Receives_Default(TheGtkObject);
+end;
+
+function TFPgtkWidget.GetCompositeChild : boolean;
+begin
+  result := gtk_widget_Composite_Child(TheGtkObject);
+end;
+
+function TFPgtkWidget.GetTooltip : string;
+var data : PGtkTooltipsData;
+begin
+  data := Gtk_Tooltips_Data_Get (TheGtkObject);
+  if assigned(data) then
+    with data^ do
+      result := ComposeTooltip (Tip_Text, tip_private)
+  else
+    result := '';
+end;
+
+procedure TFPgtkWidget.SetTooltip (TheValue:string);
+var t, p : string;
+    ttdata : PGtkTooltipsData;
+begin
+  if TheValue = '' then
+    begin
+    ttdata := GetTooltipsData (Self);
+    if assigned (ttdata) then
+      ; // find a way to remove the hint. Setting '' does not remove
+    end
+  else
+    begin
+    CheckTooltips;
+    DecomposeTooltip (TheValue, t, p);
+    TheToolTips.SetTip (self, t, p);
+    end;
+end;
+
+procedure TFPgtkWidget.HideOnDelete;
+begin
+  gtk_widget_hide_on_delete (TheGtkObject);
+end;
+
+function TFPgtkWidget.GetColormap : PGdkColormap;
+begin
+  result := gtk_widget_get_colormap(TheGtkObject);
+end;
+
+procedure TFPgtkWidget.SetColormap (TheValue:PGdkColormap);
+begin
+  gtk_widget_set_colormap(TheGtkObject,TheValue);
+end;
+
+function TFPgtkWidget.ConnectShow (proc:TFPgtkSignalFunction; data:pointer) : guint;
+begin
+  result := SignalConnect (sgShow, proc, data);
+end;
+
+function TFPgtkWidget.ConnectAfterShow (proc:TFPgtkSignalFunction; data:pointer) : guint;
+begin
+  result := SignalConnectAfter (sgShow, proc, data);
+end;
+
+function TFPgtkWidget.Connecthide (proc:TFPgtkSignalFunction; data:pointer) : guint;
+begin
+  result := SignalConnect (sghide, proc, data);
+end;
+
+function TFPgtkWidget.ConnectAfterhide (proc:TFPgtkSignalFunction; data:pointer) : guint;
+begin
+  result := SignalConnectAfter (sghide, proc, data);
+end;
+
+function TFPgtkWidget.Connectmap (proc:TFPgtkSignalFunction; data:pointer) : guint;
+begin
+  result := SignalConnect (sgmap, proc, data);
+end;
+
+function TFPgtkWidget.ConnectAftermap (proc:TFPgtkSignalFunction; data:pointer) : guint;
+begin
+  result := SignalConnectAfter (sgmap, proc, data);
+end;
+
+function TFPgtkWidget.Connectunmap (proc:TFPgtkSignalFunction; data:pointer) : guint;
+begin
+  result := SignalConnect (sgunmap, proc, data);
+end;
+
+function TFPgtkWidget.ConnectAfterunmap (proc:TFPgtkSignalFunction; data:pointer) : guint;
+begin
+  result := SignalConnectAfter (sgunmap, proc, data);
+end;
+
+function TFPgtkWidget.Connectrealize (proc:TFPgtkSignalFunction; data:pointer) : guint;
+begin
+  result := SignalConnect (sgrealize, proc, data);
+end;
+
+function TFPgtkWidget.ConnectAfterrealize (proc:TFPgtkSignalFunction; data:pointer) : guint;
+begin
+  result := SignalConnectAfter (sgrealize, proc, data);
+end;
+
+function TFPgtkWidget.Connectunrealize (proc:TFPgtkSignalFunction; data:pointer) : guint;
+begin
+  result := SignalConnect (sgunrealize, proc, data);
+end;
+
+function TFPgtkWidget.ConnectAfterunrealize (proc:TFPgtkSignalFunction; data:pointer) : guint;
+begin
+  result := SignalConnectAfter (sgunrealize, proc, data);
+end;
+
+function TFPgtkWidget.ConnectDrawFocus (proc:TFPgtkSignalFunction; data:pointer) : guint;
+begin
+  result := SignalConnect (sgDrawFocus, proc, data);
+end;
+
+function TFPgtkWidget.ConnectAfterDrawFocus (proc:TFPgtkSignalFunction; data:pointer) : guint;
+begin
+  result := SignalConnectAfter (sgDrawFocus, proc, data);
+end;
+
+function TFPgtkWidget.ConnectDrawDefault (proc:TFPgtkSignalFunction; data:pointer) : guint;
+begin
+  result := SignalConnect (sgDrawDefault, proc, data);
+end;
+
+function TFPgtkWidget.ConnectAfterDrawDefault (proc:TFPgtkSignalFunction; data:pointer) : guint;
+begin
+  result := SignalConnectAfter (sgDrawDefault, proc, data);
+end;
+
+function TFPgtkWidget.ConnectParentSet (proc:TFPgtkWidgetSignalFunction; data:pointer) : guint;
+begin
+  result := WidgetSignalConnect (sgParentSet, proc, data);
+end;
+
+function TFPgtkWidget.ConnectAfterParentSet (proc:TFPgtkWidgetSignalFunction; data:pointer) : guint;
+begin
+  result := WidgetSignalConnectAfter (sgParentSet, proc, data);
+end;
+
+function TFPgtkWidget.ConnectGrabFocus (proc:TFPgtkSignalFunction; data:pointer) : guint;
+begin
+  result := SignalConnect (sgGrabFocus, proc, data);
+end;
+
+function TFPgtkWidget.ConnectAfterGrabFocus (proc:TFPgtkSignalFunction; data:pointer) : guint;
+begin
+  result := SignalConnectAfter (sgGrabFocus, proc, data);
+end;
+
+function Eventfunc (Sender:PGtkwidget; Event:PGdkEvent; data:pointer) : boolean; cdecl;
+var p : TFPgtkEventFunction;
+begin
+with PSignalData(data)^ do
+  begin
+  p := TFPgtkEventFunction (TheSignalProc);
+  result := p (TheWidget as TFPgtkWidget, Event, TheData)
+  end;
+end;
+
+function TFPgtkWidget.EventConnect (signal:string; proc:TFPgtkEventFunction; data:pointer) : guint;
+begin
+  result := gtk_signal_connect (FGtkObject, pgChar(signal), gtk_signal_func(@Eventfunc), ConvertSignalData(TFPgtkSignalFunction(proc), data, true));
+end;
+
+function TFPgtkWidget.EventConnectAfter (signal:string; proc:TFPgtkEventFunction; data:pointer) : guint;
+begin
+  result := gtk_signal_connect_After (FGtkObject, pgChar(signal), gtk_signal_func(@Eventfunc), ConvertSignalData(TFPgtkSignalFunction(proc), data, true));
+end;
+
+function TFPgtkWidget.ConnectEvent (proc:TFPgtkEventFunction; data:pointer) : guint;
+begin
+  result := EventConnect (sgEvent, proc, data);
+end;
+
+function TFPgtkWidget.ConnectAfterEvent (proc:TFPgtkEventFunction; data:pointer) : guint;
+begin
+  result := EventConnectAfter (sgEvent, proc, data);
+end;
+
+function EventButtonfunc (Sender:PGtkwidget; Event:PGdkEventButton; data:pointer) : boolean; cdecl;
+var p : TFPgtkEventButtonFunction;
+begin
+with PSignalData(data)^ do
+  begin
+  p := TFPgtkEventButtonFunction (TheSignalProc);
+  result := p (TheWidget as TFPgtkWidget, Event, TheData)
+  end;
+end;
+
+function TFPgtkWidget.EventButtonConnect (signal:string; proc:TFPgtkEventButtonFunction; data:pointer) : guint;
+begin
+  result := gtk_signal_connect (FGtkObject, pgChar(signal), gtk_signal_func(@EventButtonfunc), ConvertSignalData(TFPgtkSignalFunction(proc), data, true));
+end;
+
+function TFPgtkWidget.EventButtonConnectAfter (signal:string; proc:TFPgtkEventButtonFunction; data:pointer) : guint;
+begin
+  result := gtk_signal_connect_After (FGtkObject, pgChar(signal), gtk_signal_func(@EventButtonfunc), ConvertSignalData(TFPgtkSignalFunction(proc), data, true));
+end;
+
+function TFPgtkWidget.ConnectButtonPressEvent (proc:TFPgtkEventButtonFunction; data:pointer) : guint;
+begin
+  result := EventButtonConnect (sgButtonPressEvent, proc, data);
+end;
+
+function TFPgtkWidget.ConnectAfterButtonPressEvent (proc:TFPgtkEventButtonFunction; data:pointer) : guint;
+begin
+  result := EventButtonConnectAfter (sgButtonPressEvent, proc, data);
+end;
+
+function TFPgtkWidget.ConnectButtonReleaseEvent (proc:TFPgtkEventButtonFunction; data:pointer) : guint;
+begin
+  result := EventButtonConnect (sgButtonReleaseEvent, proc, data);
+end;
+
+function TFPgtkWidget.ConnectAfterButtonReleaseEvent (proc:TFPgtkEventButtonFunction; data:pointer) : guint;
+begin
+  result := EventButtonConnectAfter (sgButtonReleaseEvent, proc, data);
+end;
+
+function EventMotionfunc (Sender:PGtkwidget; Event:PGdkEventMotion; data:pointer) : boolean; cdecl;
+var p : TFPgtkEventMotionFunction;
+begin
+with PSignalData(data)^ do
+  begin
+  p := TFPgtkEventMotionFunction (TheSignalProc);
+  result := p (TheWidget as TFPgtkWidget, Event, TheData)
+  end;
+end;
+
+function TFPgtkWidget.EventMotionConnect (signal:string; proc:TFPgtkEventMotionFunction; data:pointer) : guint;
+begin
+  result := gtk_signal_connect (FGtkObject, pgChar(signal), gtk_signal_func(@EventMotionfunc), ConvertSignalData(TFPgtkSignalFunction(proc), data, true));
+end;
+
+function TFPgtkWidget.EventMotionConnectAfter (signal:string; proc:TFPgtkEventMotionFunction; data:pointer) : guint;
+begin
+  result := gtk_signal_connect_After (FGtkObject, pgChar(signal), gtk_signal_func(@EventMotionfunc), ConvertSignalData(TFPgtkSignalFunction(proc), data, true));
+end;
+
+function TFPgtkWidget.ConnectMotionNotifyEvent (proc:TFPgtkEventMotionFunction; data:pointer) : guint;
+begin
+  result := EventMotionConnect (sgMotionNotifyEvent, proc, data);
+end;
+
+function TFPgtkWidget.ConnectAfterMotionNotifyEvent (proc:TFPgtkEventMotionFunction; data:pointer) : guint;
+begin
+  result := EventMotionConnectAfter (sgMotionNotifyEvent, proc, data);
+end;
+
+function TFPgtkWidget.ConnectDeleteEvent (proc:TFPgtkEventFunction; data:pointer) : guint;
+begin
+  result := EventConnect (sgDeleteEvent, proc, data);
+end;
+
+function TFPgtkWidget.ConnectAfterDeleteEvent (proc:TFPgtkEventFunction; data:pointer) : guint;
+begin
+  result := EventConnectAfter (sgDeleteEvent, proc, data);
+end;
+
+function TFPgtkWidget.ConnectDestroyEvent (proc:TFPgtkEventFunction; data:pointer) : guint;
+begin
+  result := EventConnect (sgDestroyEvent, proc, data);
+end;
+
+function TFPgtkWidget.ConnectAfterDestroyEvent (proc:TFPgtkEventFunction; data:pointer) : guint;
+begin
+  result := EventConnectAfter (sgDestroyEvent, proc, data);
+end;
+
+function EventExposefunc (Sender:PGtkwidget; Event:PGdkEventExpose; data:pointer) : boolean; cdecl;
+var p : TFPgtkEventExposeFunction;
+begin
+with PSignalData(data)^ do
+  begin
+  p := TFPgtkEventExposeFunction (TheSignalProc);
+  result := p (TheWidget as TFPgtkWidget, Event, TheData)
+  end;
+end;
+
+function TFPgtkWidget.EventExposeConnect (signal:string; proc:TFPgtkEventExposeFunction; data:pointer) : guint;
+begin
+  result := gtk_signal_connect (FGtkObject, pgChar(signal), gtk_signal_func(@EventExposefunc), ConvertSignalData(TFPgtkSignalFunction(proc), data, true));
+end;
+
+function TFPgtkWidget.EventExposeConnectAfter (signal:string; proc:TFPgtkEventExposeFunction; data:pointer) : guint;
+begin
+  result := gtk_signal_connect_After (FGtkObject, pgChar(signal), gtk_signal_func(@EventExposefunc), ConvertSignalData(TFPgtkSignalFunction(proc), data, true));
+end;
+
+function TFPgtkWidget.ConnectExposeEvent (proc:TFPgtkEventExposeFunction; data:pointer) : guint;
+begin
+  result := EventExposeConnect (sgExposeEvent, proc, data);
+end;
+
+function TFPgtkWidget.ConnectAfterExposeEvent (proc:TFPgtkEventExposeFunction; data:pointer) : guint;
+begin
+  result := EventExposeConnectAfter (sgExposeEvent, proc, data);
+end;
+
+function EventKeyfunc (Sender:PGtkwidget; Event:PGdkEventKey; data:pointer) : boolean; cdecl;
+var p : TFPgtkEventKeyFunction;
+begin
+with PSignalData(data)^ do
+  begin
+  p := TFPgtkEventKeyFunction (TheSignalProc);
+  result := p (TheWidget as TFPgtkWidget, Event, TheData)
+  end;
+end;
+
+function TFPgtkWidget.EventKeyConnect (signal:string; proc:TFPgtkEventKeyFunction; data:pointer) : guint;
+begin
+  result := gtk_signal_connect (FGtkObject, pgChar(signal), gtk_signal_func(@EventKeyfunc), ConvertSignalData(TFPgtkSignalFunction(proc), data, true));
+end;
+
+function TFPgtkWidget.EventKeyConnectAfter (signal:string; proc:TFPgtkEventKeyFunction; data:pointer) : guint;
+begin
+  result := gtk_signal_connect_After (FGtkObject, pgChar(signal), gtk_signal_func(@EventKeyfunc), ConvertSignalData(TFPgtkSignalFunction(proc), data, true));
+end;
+
+function TFPgtkWidget.ConnectKeyPressEvent (proc:TFPgtkEventKeyFunction; data:pointer) : guint;
+begin
+  result := EventKeyConnect (sgKeyPressEvent, proc, data);
+end;
+
+function TFPgtkWidget.ConnectAfterKeyPressEvent (proc:TFPgtkEventKeyFunction; data:pointer) : guint;
+begin
+  result := EventKeyConnectAfter (sgKeyPressEvent, proc, data);
+end;
+
+function TFPgtkWidget.ConnectKeyReleaseEvent (proc:TFPgtkEventKeyFunction; data:pointer) : guint;
+begin
+  result := EventKeyConnect (sgKeyReleaseEvent, proc, data);
+end;
+
+function TFPgtkWidget.ConnectAfterKeyReleaseEvent (proc:TFPgtkEventKeyFunction; data:pointer) : guint;
+begin
+  result := EventKeyConnectAfter (sgKeyReleaseEvent, proc, data);
+end;
+
+function EventCrossingfunc (Sender:PGtkwidget; Event:PGdkEventCrossing; data:pointer) : boolean; cdecl;
+var p : TFPgtkEventCrossingFunction;
+begin
+with PSignalData(data)^ do
+  begin
+  p := TFPgtkEventCrossingFunction (TheSignalProc);
+  result := p (TheWidget as TFPgtkWidget, Event, TheData)
+  end;
+end;
+
+function TFPgtkWidget.EventCrossingConnect (signal:string; proc:TFPgtkEventCrossingFunction; data:pointer) : guint;
+begin
+  result := gtk_signal_connect (FGtkObject, pgChar(signal), gtk_signal_func(@EventCrossingfunc), ConvertSignalData(TFPgtkSignalFunction(proc), data, true));
+end;
+
+function TFPgtkWidget.EventCrossingConnectAfter (signal:string; proc:TFPgtkEventCrossingFunction; data:pointer) : guint;
+begin
+  result := gtk_signal_connect_After (FGtkObject, pgChar(signal), gtk_signal_func(@EventCrossingfunc), ConvertSignalData(TFPgtkSignalFunction(proc), data, true));
+end;
+
+function TFPgtkWidget.ConnectEnterNotifyEvent (proc:TFPgtkEventCrossingFunction; data:pointer) : guint;
+begin
+  result := EventCrossingConnect (sgEnterNotifyEvent, proc, data);
+end;
+
+function TFPgtkWidget.ConnectAfterEnterNotifyEvent (proc:TFPgtkEventCrossingFunction; data:pointer) : guint;
+begin
+  result := EventCrossingConnectAfter (sgEnterNotifyEvent, proc, data);
+end;
+
+function TFPgtkWidget.ConnectLeaveNotifyEvent (proc:TFPgtkEventCrossingFunction; data:pointer) : guint;
+begin
+  result := EventCrossingConnect (sgLeaveNotifyEvent, proc, data);
+end;
+
+function TFPgtkWidget.ConnectAfterLeaveNotifyEvent (proc:TFPgtkEventCrossingFunction; data:pointer) : guint;
+begin
+  result := EventCrossingConnectAfter (sgLeaveNotifyEvent, proc, data);
+end;
+
+function EventConfigurefunc (Sender:PGtkwidget; Event:PGdkEventConfigure; data:pointer) : boolean; cdecl;
+var p : TFPgtkEventConfigureFunction;
+begin
+with PSignalData(data)^ do
+  begin
+  p := TFPgtkEventConfigureFunction (TheSignalProc);
+  result := p (TheWidget as TFPgtkWidget, Event, TheData)
+  end;
+end;
+
+function TFPgtkWidget.EventConfigureConnect (signal:string; proc:TFPgtkEventConfigureFunction; data:pointer) : guint;
+begin
+  result := gtk_signal_connect (FGtkObject, pgChar(signal), gtk_signal_func(@EventConfigurefunc), ConvertSignalData(TFPgtkSignalFunction(proc), data, true));
+end;
+
+function TFPgtkWidget.EventConfigureConnectAfter (signal:string; proc:TFPgtkEventConfigureFunction; data:pointer) : guint;
+begin
+  result := gtk_signal_connect_After (FGtkObject, pgChar(signal), gtk_signal_func(@EventConfigurefunc), ConvertSignalData(TFPgtkSignalFunction(proc), data, true));
+end;
+
+function TFPgtkWidget.ConnectConfigureEvent (proc:TFPgtkEventConfigureFunction; data:pointer) : guint;
+begin
+  result := EventConfigureConnect (sgConfigureEvent, proc, data);
+end;
+
+function TFPgtkWidget.ConnectAfterConfigureEvent (proc:TFPgtkEventConfigureFunction; data:pointer) : guint;
+begin
+  result := EventConfigureConnectAfter (sgConfigureEvent, proc, data);
+end;
+
+function EventFocusfunc (Sender:PGtkwidget; Event:PGdkEventFocus; data:pointer) : boolean; cdecl;
+var p : TFPgtkEventFocusFunction;
+begin
+with PSignalData(data)^ do
+  begin
+  p := TFPgtkEventFocusFunction (TheSignalProc);
+  result := p (TheWidget as TFPgtkWidget, Event, TheData)
+  end;
+end;
+
+function TFPgtkWidget.EventFocusConnect (signal:string; proc:TFPgtkEventFocusFunction; data:pointer) : guint;
+begin
+  result := gtk_signal_connect (FGtkObject, pgChar(signal), gtk_signal_func(@EventFocusfunc), ConvertSignalData(TFPgtkSignalFunction(proc), data, true));
+end;
+
+function TFPgtkWidget.EventFocusConnectAfter (signal:string; proc:TFPgtkEventFocusFunction; data:pointer) : guint;
+begin
+  result := gtk_signal_connect_After (FGtkObject, pgChar(signal), gtk_signal_func(@EventFocusfunc), ConvertSignalData(TFPgtkSignalFunction(proc), data, true));
+end;
+
+function TFPgtkWidget.ConnectFocusInEvent (proc:TFPgtkEventFocusFunction; data:pointer) : guint;
+begin
+  result := EventFocusConnect (sgFocusInEvent, proc, data);
+end;
+
+function TFPgtkWidget.ConnectAfterFocusInEvent (proc:TFPgtkEventFocusFunction; data:pointer) : guint;
+begin
+  result := EventFocusConnectAfter (sgFocusInEvent, proc, data);
+end;
+
+function TFPgtkWidget.ConnectFocusOutEvent (proc:TFPgtkEventFocusFunction; data:pointer) : guint;
+begin
+  result := EventFocusConnect (sgFocusOutEvent, proc, data);
+end;
+
+function TFPgtkWidget.ConnectAfterFocusOutEvent (proc:TFPgtkEventFocusFunction; data:pointer) : guint;
+begin
+  result := EventFocusConnectAfter (sgFocusOutEvent, proc, data);
+end;
+
+function TFPgtkWidget.ConnectMapEvent (proc:TFPgtkEventFunction; data:pointer) : guint;
+begin
+  result := EventConnect (sgMapEvent, proc, data);
+end;
+
+function TFPgtkWidget.ConnectAfterMapEvent (proc:TFPgtkEventFunction; data:pointer) : guint;
+begin
+  result := EventConnectAfter (sgMapEvent, proc, data);
+end;
+
+function TFPgtkWidget.ConnectUnmapEvent (proc:TFPgtkEventFunction; data:pointer) : guint;
+begin
+  result := EventConnect (sgUnmapEvent, proc, data);
+end;
+
+function TFPgtkWidget.ConnectAfterUnmapEvent (proc:TFPgtkEventFunction; data:pointer) : guint;
+begin
+  result := EventConnectAfter (sgUnmapEvent, proc, data);
+end;
+
+function EventPropertyfunc (Sender:PGtkwidget; Event:PGdkEventProperty; data:pointer) : boolean; cdecl;
+var p : TFPgtkEventPropertyFunction;
+begin
+with PSignalData(data)^ do
+  begin
+  p := TFPgtkEventPropertyFunction (TheSignalProc);
+  result := p (TheWidget as TFPgtkWidget, Event, TheData)
+  end;
+end;
+
+function TFPgtkWidget.EventPropertyConnect (signal:string; proc:TFPgtkEventPropertyFunction; data:pointer) : guint;
+begin
+  result := gtk_signal_connect (FGtkObject, pgChar(signal), gtk_signal_func(@EventPropertyfunc), ConvertSignalData(TFPgtkSignalFunction(proc), data, true));
+end;
+
+function TFPgtkWidget.EventPropertyConnectAfter (signal:string; proc:TFPgtkEventPropertyFunction; data:pointer) : guint;
+begin
+  result := gtk_signal_connect_After (FGtkObject, pgChar(signal), gtk_signal_func(@EventPropertyfunc), ConvertSignalData(TFPgtkSignalFunction(proc), data, true));
+end;
+
+function TFPgtkWidget.ConnectPropertyNotifyEvent (proc:TFPgtkEventPropertyFunction; data:pointer) : guint;
+begin
+  result := EventPropertyConnect (sgPropertyNotifyEvent, proc, data);
+end;
+
+function TFPgtkWidget.ConnectAfterPropertyNotifyEvent (proc:TFPgtkEventPropertyFunction; data:pointer) : guint;
+begin
+  result := EventPropertyConnectAfter (sgPropertyNotifyEvent, proc, data);
+end;
+
+function EventSelectionfunc (Sender:PGtkwidget; Event:PGdkEventSelection; data:pointer) : boolean; cdecl;
+var p : TFPgtkEventSelectionFunction;
+begin
+with PSignalData(data)^ do
+  begin
+  p := TFPgtkEventSelectionFunction (TheSignalProc);
+  result := p (TheWidget as TFPgtkWidget, Event, TheData)
+  end;
+end;
+
+function TFPgtkWidget.EventSelectionConnect (signal:string; proc:TFPgtkEventSelectionFunction; data:pointer) : guint;
+begin
+  result := gtk_signal_connect (FGtkObject, pgChar(signal), gtk_signal_func(@EventSelectionfunc), ConvertSignalData(TFPgtkSignalFunction(proc), data, true));
+end;
+
+function TFPgtkWidget.EventSelectionConnectAfter (signal:string; proc:TFPgtkEventSelectionFunction; data:pointer) : guint;
+begin
+  result := gtk_signal_connect_After (FGtkObject, pgChar(signal), gtk_signal_func(@EventSelectionfunc), ConvertSignalData(TFPgtkSignalFunction(proc), data, true));
+end;
+
+function TFPgtkWidget.ConnectSelectionClearEvent (proc:TFPgtkEventSelectionFunction; data:pointer) : guint;
+begin
+  result := EventSelectionConnect (sgSelectionClearEvent, proc, data);
+end;
+
+function TFPgtkWidget.ConnectAfterSelectionClearEvent (proc:TFPgtkEventSelectionFunction; data:pointer) : guint;
+begin
+  result := EventSelectionConnectAfter (sgSelectionClearEvent, proc, data);
+end;
+
+function TFPgtkWidget.ConnectSelectionRequestEvent (proc:TFPgtkEventSelectionFunction; data:pointer) : guint;
+begin
+  result := EventSelectionConnect (sgSelectionRequestEvent, proc, data);
+end;
+
+function TFPgtkWidget.ConnectAfterSelectionRequestEvent (proc:TFPgtkEventSelectionFunction; data:pointer) : guint;
+begin
+  result := EventSelectionConnectAfter (sgSelectionRequestEvent, proc, data);
+end;
+
+function TFPgtkWidget.ConnectSelectionNotifyEvent (proc:TFPgtkEventSelectionFunction; data:pointer) : guint;
+begin
+  result := EventSelectionConnect (sgSelectionNotifyEvent, proc, data);
+end;
+
+function TFPgtkWidget.ConnectAfterSelectionNotifyEvent (proc:TFPgtkEventSelectionFunction; data:pointer) : guint;
+begin
+  result := EventSelectionConnectAfter (sgSelectionNotifyEvent, proc, data);
+end;
+
+function EventProximityfunc (Sender:PGtkwidget; Event:PGdkEventProximity; data:pointer) : boolean; cdecl;
+var p : TFPgtkEventProximityFunction;
+begin
+with PSignalData(data)^ do
+  begin
+  p := TFPgtkEventProximityFunction (TheSignalProc);
+  result := p (TheWidget as TFPgtkWidget, Event, TheData)
+  end;
+end;
+
+function TFPgtkWidget.EventProximityConnect (signal:string; proc:TFPgtkEventProximityFunction; data:pointer) : guint;
+begin
+  result := gtk_signal_connect (FGtkObject, pgChar(signal), gtk_signal_func(@EventProximityfunc), ConvertSignalData(TFPgtkSignalFunction(proc), data, true));
+end;
+
+function TFPgtkWidget.EventProximityConnectAfter (signal:string; proc:TFPgtkEventProximityFunction; data:pointer) : guint;
+begin
+  result := gtk_signal_connect_After (FGtkObject, pgChar(signal), gtk_signal_func(@EventProximityfunc), ConvertSignalData(TFPgtkSignalFunction(proc), data, true));
+end;
+
+function TFPgtkWidget.ConnectProximityInEvent (proc:TFPgtkEventProximityFunction; data:pointer) : guint;
+begin
+  result := EventProximityConnect (sgProximityInEvent, proc, data);
+end;
+
+function TFPgtkWidget.ConnectAfterProximityInEvent (proc:TFPgtkEventProximityFunction; data:pointer) : guint;
+begin
+  result := EventProximityConnectAfter (sgProximityInEvent, proc, data);
+end;
+
+function TFPgtkWidget.ConnectProximityOutEvent (proc:TFPgtkEventProximityFunction; data:pointer) : guint;
+begin
+  result := EventProximityConnect (sgProximityOutEvent, proc, data);
+end;
+
+function TFPgtkWidget.ConnectAfterProximityOutEvent (proc:TFPgtkEventProximityFunction; data:pointer) : guint;
+begin
+  result := EventProximityConnectAfter (sgProximityOutEvent, proc, data);
+end;
+
+function EventClientfunc (Sender:PGtkwidget; Event:PGdkEventClient; data:pointer) : boolean; cdecl;
+var p : TFPgtkEventClientFunction;
+begin
+with PSignalData(data)^ do
+  begin
+  p := TFPgtkEventClientFunction (TheSignalProc);
+  result := p (TheWidget as TFPgtkWidget, Event, TheData)
+  end;
+end;
+
+function TFPgtkWidget.EventClientConnect (signal:string; proc:TFPgtkEventClientFunction; data:pointer) : guint;
+begin
+  result := gtk_signal_connect (FGtkObject, pgChar(signal), gtk_signal_func(@EventClientfunc), ConvertSignalData(TFPgtkSignalFunction(proc), data, true));
+end;
+
+function TFPgtkWidget.EventClientConnectAfter (signal:string; proc:TFPgtkEventClientFunction; data:pointer) : guint;
+begin
+  result := gtk_signal_connect_After (FGtkObject, pgChar(signal), gtk_signal_func(@EventClientfunc), ConvertSignalData(TFPgtkSignalFunction(proc), data, true));
+end;
+
+function TFPgtkWidget.ConnectClientEvent (proc:TFPgtkEventClientFunction; data:pointer) : guint;
+begin
+  result := EventClientConnect (sgClientEvent, proc, data);
+end;
+
+function TFPgtkWidget.ConnectAfterClientEvent (proc:TFPgtkEventClientFunction; data:pointer) : guint;
+begin
+  result := EventClientConnectAfter (sgClientEvent, proc, data);
+end;
+
+function EventNoExposefunc (Sender:PGtkwidget; Event:PGdkEventNoExpose; data:pointer) : boolean; cdecl;
+var p : TFPgtkEventNoExposeFunction;
+begin
+with PSignalData(data)^ do
+  begin
+  p := TFPgtkEventNoExposeFunction (TheSignalProc);
+  result := p (TheWidget as TFPgtkWidget, Event, TheData)
+  end;
+end;
+
+function TFPgtkWidget.EventNoExposeConnect (signal:string; proc:TFPgtkEventNoExposeFunction; data:pointer) : guint;
+begin
+  result := gtk_signal_connect (FGtkObject, pgChar(signal), gtk_signal_func(@EventNoExposefunc), ConvertSignalData(TFPgtkSignalFunction(proc), data, true));
+end;
+
+function TFPgtkWidget.EventNoExposeConnectAfter (signal:string; proc:TFPgtkEventNoExposeFunction; data:pointer) : guint;
+begin
+  result := gtk_signal_connect_After (FGtkObject, pgChar(signal), gtk_signal_func(@EventNoExposefunc), ConvertSignalData(TFPgtkSignalFunction(proc), data, true));
+end;
+
+function TFPgtkWidget.ConnectNoExposeEvent (proc:TFPgtkEventNoExposeFunction; data:pointer) : guint;
+begin
+  result := EventNoExposeConnect (sgNoExposeEvent, proc, data);
+end;
+
+function TFPgtkWidget.ConnectAfterNoExposeEvent (proc:TFPgtkEventNoExposeFunction; data:pointer) : guint;
+begin
+  result := EventNoExposeConnectAfter (sgNoExposeEvent, proc, data);
+end;
+
+function TFPgtkWidget.ConnectVisibilityNotifyEvent (proc:TFPgtkEventFunction; data:pointer) : guint;
+begin
+  result := EventConnect (sgVisibilityNotifyEvent, proc, data);
+end;
+
+function TFPgtkWidget.ConnectAfterVisibilityNotifyEvent (proc:TFPgtkEventFunction; data:pointer) : guint;
+begin
+  result := EventConnectAfter (sgVisibilityNotifyEvent, proc, data);
+end;
+
+procedure TFPgtkWidget.LockAccelerators;
+begin
+  gtk_widget_lock_accelerators (TheGtkObject);
+end;
+
+procedure TFPgtkWidget.UnlockAccelerators;
+begin
+  gtk_widget_unlock_accelerators (TheGtkObject);
+end;
+
+procedure TFPgtkWidget.RemoveAccelerators (aSignal:string; OnlyVisible:boolean);
+begin
+  gtk_widget_remove_accelerators (TheGtkObject, ConvertToPgchar(aSignal), OnlyVisible);
+end;
+
+procedure TFPgtkWidget.ActivateAccelGroups (Key:guint; Mods:TGdkModifierType);
+begin
+  gtk_accel_groups_activate (FGtkObject, Key, Mods);
+end;
+
+procedure TFPgtkWidget.AcceleratorAdd (AG:PGtkAccelGroup; aSignal:string; Key:guint; Mods:TGdkModifierType; acFlags:TGtkAccelFlags); Overload;
+begin
+  gtk_widget_add_accelerator (TheGtkWidget, pgchar(aSignal),
+        AG, Key, Mods, acFlags);
+end;
+
+ { TFPgtkGroup }
+
+
+procedure TFPgtkGroup.FreeList;
+begin
+  if FGList <> null then
+    begin
+    if FManageLists then
+      g_list_free (FGList);
+    FGList := null;
+    end;
+end;
+
+procedure TFPgtkGroup.FreeSList;
+begin
+  if FGSList <> null then
+    begin
+    if FManageLists then
+      g_slist_free (FGSList);
+    FGSlist := null;
+    end;
+end;
+
+function TFPgtkGroup.CreateGList : PGList;
+var r : integer;
+begin
+  FreeList;
+  result := null;
+  for r := pred(count) downto 0 do
+    result := g_list_prepend (result, GetData(r));
+  FGList := result;
+end;
+
+function TFPgtkGroup.CreateGSList : PGSList;
+var r : integer;
+begin
+  FreeSList;
+  result := null;
+  for r := pred(count) downto 0 do
+    result := g_slist_prepend (result, GetData(r));
+  FGSList := result;
+end;
+
+procedure TFPgtkGroup.BuildFromGtkList;
+var p : PGList;
+begin
+  clear;
+  p := FGList;
+  while p <> null do
+    begin
+    add (UngetData(p^.data));
+    p := p^.Next;
+    end;
+  FListChanged := False;
+  FSListChanged := False;
+  FClassesChanged := False;
+  FreeSList;
+end;
+
+procedure TFPgtkGroup.BuildFromGtkSList;
+var p :PGSList;
+begin
+  clear;
+  p := FGSList;
+  while p <> null do
+    begin
+    add (UngetData(p^.data));
+    p := p^.Next;
+    end;
+  FListChanged := False;
+  FSListChanged := False;
+  FClassesChanged := False;
+  FreeList;
+end;
+
+procedure TFPgtkGroup.Notify (ptr:pointer; Action:TListNotification);
+begin
+  inherited;
+  FClassesChanged := True;
+end;
+
+function TFPgtkGroup.GetData (index:integer) : pointer;
+// GetData needs to give the pointer to the data in the List or SList of GTK
+begin
+  result := items[index];
+end;
+
+function TFPgtkGroup.UngetData (data:pointer) : pointer;
+// UngetData needs to give the item in this list from the datapointer of GTK
+begin
+  result := data
+end;
+
+constructor TFPgtkGroup.Create;
+begin
+  inherited create;
+  FClassesChanged := False;
+  FListChanged := false;
+  FSListChanged := False;
+  FGList := null;
+  FGSList := null;
+  FNotUpdating := True;
+  FManageLists := True;
+end;
+
+
+destructor TFPgtkGroup.Destroy;
+begin
+  if ManageLists then
+    begin
+    FreeList;
+    FreeSList;
+    end;
+  inherited Destroy;
+end;
+
+
+function TFPgtkGroup.GetGtkList (buffered:boolean) : PGList;
+begin
+  if buffered then
+    if FClasseschanged then
+      result := CreateGList
+    else if FSListChanged then
+      begin
+      BuildFromGtkSList;
+      result := CreateGList;
+      end
+    else
+      result := FGlist
+  else
+    result := CreateGList;
+end;
+
+function TFPgtkGroup.GetGtkSList (buffered:boolean) : PGSList;
+begin
+  if buffered then
+    if FClassesChanged then
+      result := CreateGSList
+    else if FListChanged then
+      begin
+      BuildFromGtkList;
+      result := CreateGSList;
+      end
+    else
+      result := FGSlist
+  else
+    result := CreateGSList;
+end;
+
+procedure TFPgtkGroup.BeginUpdate;
+begin
+  FNotUpdating := False;
+end;
+
+procedure TFPgtkGroup.EndUpdate;
+begin
+  FNotUpdating := True;
+  if FlistChanged then
+    BuildFromGtkSList
+  else if FSListChanged then
+    BuildFromGtkSList
+  else if FClassesChanged then
+    begin
+    FreeSList;
+    FreeList;
+    end;
+end;
+
+procedure TFPgtkGroup.ForEach (Proc:TFPgtkForEachProcedure; data:pointer);
+var r: integer;
+begin
+  for r := 0 to pred(count) do
+    Proc (items[r], data);
+end;
+
+function TFPgtkGroup.GetGtkListProp : PGList;
+begin
+  result := GetGtkList (True);
+end;
+
+procedure TFPgtkGroup.SetGtkListProp (TheValue:PGList);
+begin
+  FGList := TheValue;
+  if FNotUpdating then
+    BuildFromGtkList
+  else
+    FListChanged := True;
+end;
+
+function TFPgtkGroup.GetGtkSListProp : PGSList;
+begin
+  result := GetGtkSList (True);
+end;
+
+procedure TFPgtkGroup.SetGtkSListProp (TheValue:PGSList);
+begin
+  FGSlist := TheValue;
+  if FNotUpdating then
+    BuildFromGtkSList
+  else
+    FSListChanged := True;
+end;
+
+ { TFPgtkWidgetGroup }
+
+
+function TFPgtkWidgetGroup.GetData (index:integer) : pointer;
+begin
+  result := items[index].FgtkObject;
+end;
+
+function TFPgtkWidgetGroup.UnGetData (data:pointer) : pointer;
+begin
+  result := GetPascalInstance (PGtkObject(Data));
+end;
+
+procedure TFPgtkWidgetGroup.AddToContainer (Container:TFPgtkContainer);
+var r : integer;
+begin
+  for r := 0 to pred(count) do
+    Container.Add (items[r]);
+end;
+
+procedure TFPgtkWidgetGroup.PackInBox (box:TFPgtkBox; AtStart:boolean; Expanding:boolean; Fill:boolean; Padding:integer);
+var r : integer;
+begin
+  if AtStart then
+    for r := 0 to pred(Count) do
+      box.PackStart (items[r], expanding, fill, padding)
+  else
+    for r := pred(Count) downto 0 do
+      box.PackEnd (items[r], expanding, fill, padding);
+end;
+
+function TFPgtkWidgetGroup.GetItem (Index:integer) : TFPgtkWidget;
+begin
+  result := TFPgtkWidget (Inherited items[index]);
+end;
+
+procedure TFPgtkWidgetGroup.SetItem (Index:integer; TheValue:TFPgtkWidget);
+begin
+  inherited items[index] := TheValue;
+end;
+
+function TFPgtkWidgetGroup.GetTooltips (index:integer) : string;
+begin
+  result := items[index].Tooltip;
+end;
+
+procedure TFPgtkWidgetGroup.SetTooltips (index:integer; TheValue:string);
+begin
+  Items[index].Tooltip := TheValue;
+end;
+
+ { TFPgtkMisc }
+
+function TFPgtkMisc.TheGtkObject : PGtkMisc;
+begin
+  result := PgtkMisc(FGtkObject);
+end;
+
+
+procedure TFPgtkMisc.SetAlignment (x:gfloat; y:gfloat);
+begin
+  gtk_misc_set_alignment (TheGtkObject, x, y);
+end;
+
+procedure TFPgtkMisc.SetPadding (x:word; y:word);
+begin
+  gtk_misc_set_padding (TheGtkObject, x, y);
+end;
+
+function TFPgtkMisc.GetXAlign : gfloat;
+begin
+  result := TheGtkObject^.XAlign;
+end;
+
+procedure TFPgtkMisc.SetXAlign (TheValue:gfloat);
+begin
+  SetAlignment (TheValue, YAlign);
+end;
+
+function TFPgtkMisc.GetYAlign : gfloat;
+begin
+  result := TheGtkObject^.YAlign;
+end;
+
+procedure TFPgtkMisc.SetYAlign (TheValue:gfloat);
+begin
+  SetAlignment (XAlign, TheValue);
+end;
+
+function TFPgtkMisc.GetXPad : word;
+begin
+  result := TheGtkObject^.XPad;
+end;
+
+procedure TFPgtkMisc.SetXPad (TheValue:word);
+begin
+  SetPadding (TheValue, YPad);
+end;
+
+function TFPgtkMisc.GetYPad : word;
+begin
+  result := TheGtkObject^.YPad;
+end;
+
+procedure TFPgtkMisc.SetYPad (TheValue:word);
+begin
+  SetPadding (XPad, TheValue);
+end;
+
+ { TFPgtkLabel }
+
+function TFPgtkLabel.TheGtkObject : PGtkLabel;
+begin
+  result := PgtkLabel(FGtkObject);
+end;
+
+procedure TFPgtkLabel.CreateGtkObject;
+begin
+  FGtkObject := PGtkObject(gtk_label_new (null));
+end;
+
+
+constructor TFPgtkLabel.Create (aText:string);
+begin
+  inherited create;
+  Text := aText;
+  SetAlignment (0.0, 0.5);
+end;
+
+
+function TFPgtkLabel.GetText : string;
+begin
+  result := TheGtkObject^.TheLabel;
+end;
+
+procedure TFPgtkLabel.SetText (TheValue:string);
+begin
+  gtk_label_set_text(TheGtkObject,ConvertToPgchar(TheValue));
+end;
+
+function TFPgtkLabel.GetPattern : string;
+begin
+  result := TheGtkObject^.pattern;
+end;
+
+procedure TFPgtkLabel.SetPattern (TheValue:string);
+begin
+  gtk_label_set_pattern(TheGtkObject,ConvertToPgchar(TheValue));
+end;
+
+function TFPgtkLabel.GetJustify : TGtkJustification;
+begin
+  result := gtk.jtype(TheGtkObject^);
+end;
+
+procedure TFPgtkLabel.SetJustify (TheValue:TGtkJustification);
+begin
+  gtk_label_set_justify(TheGtkObject,TheValue);
+end;
+
+function TFPgtkLabel.GetLineWrap : boolean;
+begin
+  result := TheGtkObject^.wrap;
+end;
+
+procedure TFPgtkLabel.SetLineWrap (TheValue:boolean);
+begin
+  gtk_label_set_line_wrap(TheGtkObject,TheValue);
+end;
+
+function TFPgtkLabel.ParseUline (aText:string) : guint;
+begin
+  result := gtk_label_parse_uline (TheGtkObject, ConvertToPgchar(aText));
+end;
+
+ { TFPgtkAccelLabel }
+
+function TFPgtkAccelLabel.TheGtkObject : PGtkAccelLabel;
+begin
+  result := PgtkAccelLabel(FGtkObject);
+end;
+
+procedure TFPgtkAccelLabel.CreateGtkObject;
+begin
+  FGtkObject := PGtkObject(gtk_accel_label_new (''));
+end;
+
+
+function TFPgtkAccelLabel.GetAccelWidget : TFPgtkWidget;
+begin
+  result := GetPascalInstance(PGtkObject(TheGtkObject^.accel_widget),tfpgtkwidget) as tfpgtkwidget;
+end;
+
+procedure TFPgtkAccelLabel.SetAccelWidget (TheValue:TFPgtkWidget);
+begin
+  gtk_accel_label_set_accel_widget(TheGtkObject,PGtkwidget(ConvertToGtkObject(TheValue)));
+end;
+
+function TFPgtkAccelLabel.AccelText : string;
+begin
+  result := TheGtkObject^.accel_string;
+end;
+
+procedure TFPgtkAccelLabel.Refetch;
+begin
+  gtk_accel_label_refetch (TheGtkObject);
+end;
+
+ { TFPgtkTipsQuery }
+
+function TFPgtkTipsQuery.TheGtkObject : PGtkTipsQuery;
+begin
+  result := PgtkTipsQuery(FGtkObject);
+end;
+
+procedure TFPgtkTipsQuery.CreateGtkObject;
+begin
+  FGtkObject := PGtkObject(gtk_tips_query_new);
+end;
+
+
+ { TFPgtkArrow }
+
+function TFPgtkArrow.TheGtkObject : PGtkArrow;
+begin
+  result := PgtkArrow(FGtkObject);
+end;
+
+procedure TFPgtkArrow.CreateGtkObject;
+begin
+  FGtkObject := PGtkObject(gtk_arrow_new (GTK_ARROW_LEFT,GTK_SHADOW_NONE));
+end;
+
+
+function TFPgtkArrow.GetArrowType : TGtkArrowType;
+begin
+  result := TGtkArrowType (TheGtkObject^.arrow_type);
+end;
+
+procedure TFPgtkArrow.SetArrowType (TheValue:TGtkArrowType);
+begin
+  gtk_arrow_set (TheGtkObject, TheValue, ShadowType);
+end;
+
+function TFPgtkArrow.GetShadowType : TGtkShadowType;
+begin
+  result := TGtkShadowtype (TheGtkObject^.shadow_type);
+end;
+
+procedure TFPgtkArrow.SetShadowType (TheValue:TGtkShadowType);
+begin
+  gtk_arrow_set (TheGtkObject, ArrowType, TheValue);
+end;
+
+procedure TFPgtkArrow.SetTypes (AnArrowType:TGtkArrowType; AShadowtype:TGtkShadowType);
+begin
+  gtk_arrow_set (TheGtkObject, AnArrowType, AShadowtype);
+end;
+
+constructor TFPgtkArrow.Create (AnArrowType:TGtkArrowType; AShadowType:TGtkShadowType);
+begin
+  inherited create;
+  SetTypes (AnArrowType, AShadowType);
+end;
+
+
+ { TFPgtkImage }
+
+function TFPgtkImage.TheGtkObject : PGtkImage;
+begin
+  result := PgtkImage(FGtkObject);
+end;
+
+procedure TFPgtkImage.CreateGtkObject;
+begin
+  FGtkObject := PGtkObject(gtk_image_new (FImage, FMask));
+end;
+
+
+function TFPgtkImage.GetImageProp : PGdkImage;
+var m : PGdkBitmap;
+begin
+  gtk_image_get (TheGtkObject, @result, @m);
+end;
+
+procedure TFPgtkImage.SetImageProp (TheValue:PGdkImage);
+begin
+  gtk_Image_set (TheGtkObject, TheValue, nil);
+end;
+
+function TFPgtkImage.GetMask : PGdkBitMap;
+var p : PGdkPixmap;
+begin
+  gtk_image_get (TheGtkObject, @p, @result);
+end;
+
+procedure TFPgtkImage.SetMask (TheValue:PGdkBitMap);
+begin
+  gtk_image_set (TheGtkObject, Image, TheValue);
+end;
+
+procedure TFPgtkImage.SetImage (anImage:PGdkImage; aMask:PGdkBitmap);
+begin
+  gtk_image_set (TheGtkObject, anImage, aMask);
+end;
+
+constructor TFPgtkImage.Create (anImage:PGdkImage; aMask:PGdkBitmap);
+begin
+  FImage := anImage;
+  FMask := aMask;
+  inherited create;
+end;
+
+
+function NewImage (aWidth:integer; aHeight:integer) : PGdkImage;
+begin
+  result := gdk_image_new (gdk_image_fastest, gdk_visual_get_system, aWidth, aHeight);
+end;
+
+
+ { TFPgtkPixmap }
+
+function TFPgtkPixmap.TheGtkObject : PGtkPixmap;
+begin
+  result := PgtkPixmap(FGtkObject);
+end;
+
+procedure TFPgtkPixmap.CreateGtkObject;
+begin
+  FGtkObject := PGtkObject(gtk_pixmap_new (FPixMap, FMask));
+end;
+
+var
+  EmptyBitmap : PGdkPixmap;
+
+function StringsToPPgchar (Data:TStrings) : PPgchar;
+var r : integer;
+    a : PStringArray;
+begin
+  getmem (a, sizeof (pgchar) * Data.count);
+  for r := 0 to Data.Count-1 do
+    a^[r] := pchar (Data[r]);
+  result := ppgchar (a);
+end;
+
+
+function ArrayToPPgchar (Data:array of string) : PPgchar;
+var r,t : integer;
+    a : PStringArray;
+begin
+  getmem (a, sizeof (pgchar) * (high(data)-low(data)+1));
+  t := 0;
+  for r := low(data) to high(data) do
+    begin
+    a^[r] := pchar (data[t]);
+    inc (t);
+    end;
+  result := ppgchar (a);
+end;
+
+
+function TFPgtkPixmap.GetBuildInsensitive : longbool;
+begin
+  result := longbool(gtk.build_insensitive(TheGtkObject^));
+end;
+
+procedure TFPgtkPixmap.SetBuildInsensitive (TheValue:longbool);
+begin
+  gtk_pixmap_set_build_insensitive(TheGtkObject,gint(TheValue));
+end;
+
+constructor TFPgtkPixmap.Create;
+begin
+  if not assigned (EmptyBitmap) then
+    EmptyBitmap := gdk_pixmap_new (null, 1, 1, 1);
+  FPixMap := EmptyBitmap;
+  FMask := PGdkBitmap (EmptyBitmap);
+  inherited create;
+end;
+
+
+constructor TFPgtkPixmap.CreateFromFile (Filename:string; Window:TFPgtkWidget);
+begin
+  FPixMap := gdk_pixmap_create_from_xpm (ConvertToGtkWidget(Window)^.window, @FMask, nil, pgchar(Filename));
+  inherited create;
+end;
+
+
+constructor TFPgtkPixmap.CreateFromStrings (Data:TStrings; Window:TFPgtkWidget);
+var ppdata : ppgchar;
+begin
+  ppdata := StringsToPPgchar(Data);
+  FPixMap := gdk_pixmap_create_from_xpm_d (ConvertToGtkWidget(Window)^.window, @FMask, nil, ppdata);
+  inherited create;
+  freemem (ppdata, sizeof (pgchar) * Data.count);
+end;
+
+
+constructor TFPgtkPixmap.CreateFromText (Data:string; Window:TFPgtkWidget);
+var l : TStrings;
+begin
+  l := TStringList.Create;
+  try
+    l.Text := data;
+    CreateFromStrings (l, Window);
+  finally
+    l.Free;
+  end;
+end;
+
+
+function TFPgtkPixmap.GetPixmapProp : PGdkPixMap;
+var m : PGdkBitmap;
+begin
+  gtk_pixmap_get (TheGtkObject, @result, @m);
+end;
+
+procedure TFPgtkPixmap.SetPixmapProp (TheValue:PGdkPixMap);
+begin
+  gtk_pixmap_set (TheGtkObject, TheValue, nil);
+end;
+
+function TFPgtkPixmap.GetMask : PGdkBitMap;
+var p : PGdkPixmap;
+begin
+  gtk_pixmap_get (TheGtkObject, @p, @result);
+end;
+
+procedure TFPgtkPixmap.SetMask (TheValue:PGdkBitMap);
+begin
+  gtk_pixmap_set (TheGtkObject, Pixmap, TheValue);
+end;
+
+procedure TFPgtkPixmap.SetPixmap (aPixmap:PGdkPixMap; aMask:PGdkBitmap);
+begin
+  gtk_pixmap_set (TheGtkObject, aPixmap, aMask);
+end;
+
+procedure TFPgtkPixmap.GetPixmap (var aPixmap:PGdkPixmap; var aMask:PGdkBitmap);
+var P:PGdkPixmap; 
+   M:PGdkBitmap;
+begin
+  gtk_pixmap_get (TheGtkObject, @p, @m);
+  apixmap := p;
+  amask := m;
+end;
+
+procedure TFPgtkPixmap.LoadFromFile (Filename:string);
+var bm : PGdkBitmap;
+    pm : PGdkPixmap;
+begin
+  pm := gdk_pixmap_colormap_create_from_xpm (nil, Colormap, @bm, nil, pgchar(Filename));
+  SetPixmap (pm, bm);
+end;
+
+procedure TFPgtkPixmap.LoadFromStrings (data:TStrings);
+var bm : PGdkBitmap;
+    pm : PGdkPixmap;
+    ppdata : ppgchar;
+begin
+  ppdata := StringsToPPgchar(Data);
+  pm := gdk_pixmap_colormap_create_from_xpm_d (nil, Colormap, @bm, nil, ppdata);
+  SetPixmap (pm, bm);
+  freemem (ppdata, sizeof (pgchar) * Data.count);
+end;
+
+procedure TFPgtkPixmap.LoadFromText (data:string);
+var l : TStrings;
+begin
+  l := TStringList.Create;
+  try
+    l.Text := data;
+    LoadFromStrings (l);
+  finally
+    l.Free;
+  end;
+end;
+
+procedure TFPgtkPixmap.LoadFromArray (data:array of string);
+var bm : PGdkBitmap;
+    pm : PGdkPixmap;
+    ppdata : ppgchar;
+begin
+  ppdata := ArrayToPPgchar(Data);
+  pm := gdk_pixmap_colormap_create_from_xpm_d (nil, Colormap, @bm, nil, ppdata);
+  SetPixmap (pm, bm);
+  freemem (ppdata, sizeof (pgchar) * (high(data)-low(data)+1));
+end;
+
+procedure CreateGdkPixmap (var ThePixmap:PGdkPixmap; var TheMask:PGdkBitmap; aWindow:PGdkWindow; data:array of string);
+var ppdata : ppgchar;
+begin
+  ppdata := ArrayToPPgchar(Data);
+  ThePixmap := gdk_pixmap_create_from_xpm_d (aWindow, @TheMask, nil, ppdata);
+  freemem (ppdata, sizeof (pgchar) * (high(data)-low(data)+1));
+end;
+
+
+ { TFPgtkContainer }
+
+function TFPgtkContainer.TheGtkObject : PGtkContainer;
+begin
+  result := PgtkContainer(FGtkObject);
+end;
+
+
+function TFPgtkContainer.GetBorder : integer;
+begin
+  result := gtk.border_width(TheGtkObject^);
+end;
+
+procedure TFPgtkContainer.SetBorder (TheValue:integer);
+begin
+  gtk_container_set_border_width(TheGtkObject,TheValue);
+end;
+
+procedure TFPgtkContainer.Add (AWidget:TFPgtkWidget; IsVisible:boolean); Overload;
+begin
+  gtk_container_add (TheGtkObject, ConvertToGtkWidget(AWidget));
+  if IsVisible then
+    AWidget.Show;
+end;
+
+procedure TFPgtkContainer.Add (AWidget:TFPgtkWidget); Overload;
+begin
+  gtk_container_add (TheGtkObject, ConvertToGtkWidget(AWidget));
+  AWidget.Show;
+end;
+
+procedure TFPgtkContainer.Remove (AWidget:TFPgtkWidget);
+begin
+  gtk_container_remove (TheGtkObject, PGtkwidget(ConvertToGtkObject(AWidget)));
+end;
+
+constructor TFPgtkContainer.Create;
+begin
+  inherited create;
+  FChildren := TFPgtkWidgetGroup.Create;
+end;
+
+
+destructor TFPgtkContainer.Destroy;
+begin
+  if assigned(FChildren) then
+    FChildren.Free;
+  inherited destroy;
+end;
+
+
+function TFPgtkContainer.GetChildren : TFPgtkWidgetGroup;
+begin
+  FChildren.GtkList := gtk_container_children (TheGtkObject);
+  result := FChildren;
+end;
+
+procedure TFPgtkContainer.Focus (Direction:TGtkDirectionType);
+begin
+  gtk_container_focus (TheGtkObject, Direction);
+end;
+
+procedure TFPgtkContainer.FocusChild (Child:TFPgtkWidget);
+begin
+  gtk_container_set_focus_child (TheGtkObject, PGtkwidget(ConvertToGtkObject(Child)));
+end;
+
+procedure TFPgtkContainer.RegisterToplevel;
+begin
+  gtk_container_register_toplevel (TheGtkObject);
+end;
+
+procedure TFPgtkContainer.UnregisterToplevel;
+begin
+  gtk_container_unregister_toplevel (TheGtkObject);
+end;
+
+procedure TFPgtkContainer.ResizeChildren;
+begin
+  gtk_container_resize_children (TheGtkObject);
+end;
+
+function DirectionFunctionSignalfunc (Sender:PGtkobject; Direction:TGtkDirectionType; data:pointer) : TGtkDirectionType; cdecl;
+var p : TFPgtkDirectionFunctionSignalFunction;
+begin
+with PSignalData(data)^ do
+  begin
+  p := TFPgtkDirectionFunctionSignalFunction (TheSignalProc);
+  result := p (TheWidget as TFPgtkObject, Direction, TheData)
+  end;
+end;
+
+function TFPgtkContainer.DirectionFunctionSignalConnect (signal:string; proc:TFPgtkDirectionFunctionSignalFunction; data:pointer) : guint;
+begin
+  result := gtk_signal_connect (FGtkObject, pgChar(signal), gtk_signal_func(@DirectionFunctionSignalfunc), ConvertSignalData(TFPgtkSignalFunction(proc), data, true));
+end;
+
+function TFPgtkContainer.DirectionFunctionSignalConnectAfter (signal:string; proc:TFPgtkDirectionFunctionSignalFunction; data:pointer) : guint;
+begin
+  result := gtk_signal_connect_After (FGtkObject, pgChar(signal), gtk_signal_func(@DirectionFunctionSignalfunc), ConvertSignalData(TFPgtkSignalFunction(proc), data, true));
+end;
+
+function TFPgtkContainer.ConnectAdd (proc:TFPgtkWidgetSignalFunction; data:pointer) : guint;
+begin
+  result := WidgetSignalConnect (sgAdd, proc, data);
+end;
+
+function TFPgtkContainer.ConnectAfterAdd (proc:TFPgtkWidgetSignalFunction; data:pointer) : guint;
+begin
+  result := WidgetSignalConnectAfter (sgAdd, proc, data);
+end;
+
+function TFPgtkContainer.ConnectRemove (proc:TFPgtkWidgetSignalFunction; data:pointer) : guint;
+begin
+  result := WidgetSignalConnect (sgRemove, proc, data);
+end;
+
+function TFPgtkContainer.ConnectAfterRemove (proc:TFPgtkWidgetSignalFunction; data:pointer) : guint;
+begin
+  result := WidgetSignalConnectAfter (sgRemove, proc, data);
+end;
+
+function TFPgtkContainer.ConnectCheckResize (proc:TFPgtkSignalFunction; data:pointer) : guint;
+begin
+  result := SignalConnect (sgCheckResize, proc, data);
+end;
+
+function TFPgtkContainer.ConnectAfterCheckResize (proc:TFPgtkSignalFunction; data:pointer) : guint;
+begin
+  result := SignalConnectAfter (sgCheckResize, proc, data);
+end;
+
+function TFPgtkContainer.ConnectFocus (proc:TFPgtkDirectionFunctionSignalFunction; data:pointer) : guint;
+begin
+  result := DirectionFunctionSignalConnect (sgFocus, proc, data);
+end;
+
+function TFPgtkContainer.ConnectAfterFocus (proc:TFPgtkDirectionFunctionSignalFunction; data:pointer) : guint;
+begin
+  result := DirectionFunctionSignalConnectAfter (sgFocus, proc, data);
+end;
+
+function TFPgtkContainer.ConnectSetFocusChild (proc:TFPgtkWidgetSignalFunction; data:pointer) : guint;
+begin
+  result := WidgetSignalConnect (sgSetFocusChild, proc, data);
+end;
+
+function TFPgtkContainer.ConnectAfterSetFocusChild (proc:TFPgtkWidgetSignalFunction; data:pointer) : guint;
+begin
+  result := WidgetSignalConnectAfter (sgSetFocusChild, proc, data);
+end;
+
+ { TFPgtkBin }
+
+function TFPgtkBin.TheGtkObject : PGtkBin;
+begin
+  result := PgtkBin(FGtkObject);
+end;
+
+
+function TFPgtkBin.GetChild : TFPgtkWidget;
+begin
+  result := GetPascalInstance(PGtkObject(TheGtkObject^.Child),tfpgtkwidget) as tfpgtkwidget;
+end;
+
+procedure TFPgtkBin.SetChild (TheValue:TFPgtkWidget);
+begin
+  Add (TheValue);
+end;
+
+ { TFPgtkAlignment }
+
+function TFPgtkAlignment.TheGtkObject : PGtkAlignment;
+begin
+  result := PgtkAlignment(FGtkObject);
+end;
+
+
+procedure TFPgtkAlignment.Configure (anXAlign:gfloat; anYAlign:gfloat; anXScale:gfloat; anYScale:gfloat);
+begin
+  gtk_alignment_set (TheGtkObject, anXAlign, anYAlign, anXScale, anYScale);
+end;
+
+ { TFPgtkFrame }
+
+function TFPgtkFrame.TheGtkObject : PGtkFrame;
+begin
+  result := PgtkFrame(FGtkObject);
+end;
+
+procedure TFPgtkFrame.CreateGtkObject;
+begin
+  FGtkObject := PGtkObject(gtk_frame_new (nil));
+end;
+
+
+function TFPgtkFrame.GetText : string;
+begin
+  result := TheGtkObject^.thelabel;
+end;
+
+procedure TFPgtkFrame.SetText (TheValue:string);
+begin
+  gtk_frame_set_label(TheGtkObject,ConvertToPgchar(TheValue));
+end;
+
+function TFPgtkFrame.GetAlignment : gfloat;
+begin
+  result := TheGtkObject^.label_xalign;
+end;
+
+procedure TFPgtkFrame.SetAlignment (TheValue:gfloat);
+begin
+  gtk_frame_set_label_align (ThegtkObject, TheValue, 0.0);
+end;
+
+function TFPgtkFrame.GetShadowType : TgtkShadowType;
+begin
+  result := TheGtkObject^.shadow_type;
+end;
+
+procedure TFPgtkFrame.SetShadowType (TheValue:TgtkShadowType);
+begin
+  gtk_frame_set_shadow_type(TheGtkObject,TheValue);
+end;
+
+ { TFPgtkAspectFrame }
+
+function TFPgtkAspectFrame.TheGtkObject : PGtkAspectFrame;
+begin
+  result := PgtkAspectFrame(FGtkObject);
+end;
+
+procedure TFPgtkAspectFrame.CreateGtkObject;
+begin
+  FGtkObject := PGtkObject(gtk_aspect_frame_new (nil,0,0,1,1));
+end;
+
+
+procedure TFPgtkAspectFrame.Configure (anXAlign:gfloat; anYAlign:gfloat; Ratio:gfloat; ObeyChild:longbool);
+begin
+  gtk_aspect_frame_set (TheGtkObject, anXAlign, anYAlign, Ratio, gint(ObeyChild));
+end;
+
+ { TFPgtkButton }
+
+function TFPgtkButton.TheGtkObject : PGtkButton;
+begin
+  result := PgtkButton(FGtkObject);
+end;
+
+procedure TFPgtkButton.CreateGtkObject;
+begin
+  FGtkObject := PGtkObject(gtk_button_new);
+end;
+
+
+function TFPgtkButton.LabelClass : TFPgtkLabelClass;
+begin
+  result := TFPgtkLabel;
+end;
+
+procedure TFPgtkButton.CreateLabel (aText:string);
+begin
+if not assigned (FLabel) then
+  begin
+  FLabel := LabelClass.Create ('');
+  with FLabel do
+    begin
+    AskNotification (Self);
+    FAccelKey := ParseULine (aText);
+    end;
+  if assigned(AddContainer) then
+    AddContainer.Add (FLabel)
+  else
+    Add (FLabel);
+  LabelCreated;  
+  end;
+end;
+
+procedure TFPgtkButton.NotifyDestroy (AnObject:TFPgtkObject);
+begin
+  inherited;
+  if AnObject = FLabel then
+    FLabel := nil;
+end;
+
+function TFPgtkButton.ConnectClicked (proc:TFPgtkSignalFunction; data:pointer) : guint;
+begin
+  result := SignalConnect (sgClicked, proc, data);
+end;
+
+function TFPgtkButton.ConnectAfterClicked (proc:TFPgtkSignalFunction; data:pointer) : guint;
+begin
+  result := SignalConnectAfter (sgClicked, proc, data);
+end;
+
+function TFPgtkButton.ConnectPressed (proc:TFPgtkSignalFunction; data:pointer) : guint;
+begin
+  result := SignalConnect (sgPressed, proc, data);
+end;
+
+function TFPgtkButton.ConnectAfterPressed (proc:TFPgtkSignalFunction; data:pointer) : guint;
+begin
+  result := SignalConnectAfter (sgPressed, proc, data);
+end;
+
+function TFPgtkButton.ConnectReleased (proc:TFPgtkSignalFunction; data:pointer) : guint;
+begin
+  result := SignalConnect (sgReleased, proc, data);
+end;
+
+function TFPgtkButton.ConnectAfterReleased (proc:TFPgtkSignalFunction; data:pointer) : guint;
+begin
+  result := SignalConnectAfter (sgReleased, proc, data);
+end;
+
+function TFPgtkButton.ConnectEnter (proc:TFPgtkSignalFunction; data:pointer) : guint;
+begin
+  result := SignalConnect (sgEnter, proc, data);
+end;
+
+function TFPgtkButton.ConnectAfterEnter (proc:TFPgtkSignalFunction; data:pointer) : guint;
+begin
+  result := SignalConnectAfter (sgEnter, proc, data);
+end;
+
+function TFPgtkButton.ConnectLeave (proc:TFPgtkSignalFunction; data:pointer) : guint;
+begin
+  result := SignalConnect (sgLeave, proc, data);
+end;
+
+function TFPgtkButton.ConnectAfterLeave (proc:TFPgtkSignalFunction; data:pointer) : guint;
+begin
+  result := SignalConnectAfter (sgLeave, proc, data);
+end;
+
+procedure TFPgtkButton.Clicked;
+begin
+  gtk_button_Clicked (TheGtkObject);
+end;
+
+procedure TFPgtkButton.Pressed;
+begin
+  gtk_button_Pressed (TheGtkObject);
+end;
+
+procedure TFPgtkButton.Released;
+begin
+  gtk_button_Released (TheGtkObject);
+end;
+
+procedure TFPgtkButton.Enter;
+begin
+  gtk_button_Enter (TheGtkObject);
+end;
+
+procedure TFPgtkButton.Leave;
+begin
+  gtk_button_Leave (TheGtkObject);
+end;
+
+constructor TFPgtkButton.Create;
+begin
+  inherited create;
+  FAddContainer := nil;
+end;
+
+
+constructor TFPgtkButton.CreateWithLabel (aText:string);
+begin
+  create;
+  Text := aText;
+end;
+
+
+constructor TFPgtkButton.CreateWithLabel (aText:string; AccelGroup:PGtkAccelGroup);
+begin
+  create;
+  Text := aText;
+  if (FAccelKey <> 0) and assigned(AccelGroup) then
+    AcceleratorAdd (AccelGroup, sgClicked, FAccelKey, DefaultButtonModifiers, GTK_ACCEL_Visible);
+end;
+
+
+function TFPgtkButton.GetText : string;
+begin
+  if assigned (FLabel) then
+    result := FLabel.Text
+  else
+    result := '';
+end;
+
+procedure TFPgtkButton.SetText (TheValue:string);
+begin
+  if assigned (FLabel) then
+    FLabel.Text := TheValue
+  else
+    if TheValue <> '' then
+      CreateLabel (TheValue);
+end;
+
+function TFPgtkButton.GetReliefStyle : TGtkReliefStyle;
+begin
+  result := gtk_button_get_relief(TheGtkObject);
+end;
+
+procedure TFPgtkButton.SetReliefStyle (TheValue:TGtkReliefStyle);
+begin
+  gtk_button_set_relief(TheGtkObject,TheValue);
+end;
+
+procedure TFPgtkButton.LabelCreated;
+begin
+  FLabel.setalignment (0.5,0.5);
+end;
+
+ { TFPgtkToggleButton }
+
+function TFPgtkToggleButton.TheGtkObject : PGtkToggleButton;
+begin
+  result := PgtkToggleButton(FGtkObject);
+end;
+
+procedure TFPgtkToggleButton.CreateGtkObject;
+begin
+  FGtkObject := PGtkObject(gtk_toggle_button_new);
+end;
+
+
+function TFPgtkToggleButton.ConnectToggled (proc:TFPgtkSignalFunction; data:pointer) : guint;
+begin
+  result := SignalConnect (sgToggled, proc, data);
+end;
+
+function TFPgtkToggleButton.ConnectAfterToggled (proc:TFPgtkSignalFunction; data:pointer) : guint;
+begin
+  result := SignalConnectAfter (sgToggled, proc, data);
+end;
+
+procedure TFPgtkToggleButton.Toggled;
+begin
+  gtk_toggle_button_toggled (TheGtkObject);
+end;
+
+function TFPgtkToggleButton.GetActive : boolean;
+begin
+  result := gtk_toggle_button_get_active(TheGtkObject);
+end;
+
+procedure TFPgtkToggleButton.SetActive (TheValue:boolean);
+begin
+  gtk_toggle_button_set_active(TheGtkObject,TheValue);
+end;
+
+function TFPgtkToggleButton.GetDrawIndicator : boolean;
+begin
+  result := boolean(gtk.draw_indicator(TheGtkObject^));
+end;
+
+procedure TFPgtkToggleButton.SetDrawIndicator (TheValue:boolean);
+begin
+  gtk.Set_draw_indicator(TheGtkObject^,guint(TheValue))
+end;
+
+ { TFPgtkCheckButton }
+
+function TFPgtkCheckButton.TheGtkObject : PGtkCheckButton;
+begin
+  result := PgtkCheckButton(FGtkObject);
+end;
+
+procedure TFPgtkCheckButton.CreateGtkObject;
+begin
+  FGtkObject := PGtkObject(gtk_check_button_new);
+end;
+
+
+ { TFPgtkRadioButton }
+
+function TFPgtkRadioButton.TheGtkObject : PGtkRadioButton;
+begin
+  result := PgtkRadioButton(FGtkObject);
+end;
+
+
+constructor TFPgtkRadioButton.Create (AGroup:TFPgtkRadioButtonGroup);
+begin
+  FGroup := AGroup;
+  inherited create;
+end;
+
+
+constructor TFPgtkRadioButton.CreateWithLabel (AGroup:TFPgtkRadioButtonGroup; aText:string);
+begin
+  FGroup := AGroup;
+  inherited CreateWithLabel (aText);
+end;
+
+
+procedure TFPgtkRadioButton.CreateGtkObject;
+begin
+  if not assigned (FGroup) then
+    FGroup := TFPgtkRadioButtonGroup.Create;
+  TheGtkWidget := gtk_radio_button_new (FGroup.GtkSList);
+  FGroup.GtkSList := gtk_radio_button_group (TheGtkObject);
+end;
+
+ { TFPgtkRadioButtonGroup }
+
+
+function TFPgtkRadioButtonGroup.GetItem (index:integer) : TFPgtkRadioButton;
+begin
+  result := TFPgtkRadioButton(Inherited items[index]);
+end;
+
+procedure TFPgtkRadioButtonGroup.SetItem (index:integer; TheValue:TFPgtkRadioButton);
+begin
+  inherited items[index] := TheValue;
+end;
+
+function TFPgtkRadioButtonGroup.ActiveButtonText : string;
+begin
+  result := ActiveButton.Text;
+end;
+
+function TFPgtkRadioButtonGroup.ActiveButtonIndex : integer;
+begin
+  Result := pred(count);
+  while (Result >= 0) and (not items[Result].Active) do
+    dec (Result);
+end;
+
+function TFPgtkRadioButtonGroup.ActiveButton : TFPgtkRadioButton;
+var r : integer;
+begin
+  r := ActiveButtonIndex;
+  if r >= 0 then
+    result := items[r]
+  else
+    result := nil;
+end;
+
+function RadioButtonGroupCreateFromStrings (TheItems:TStrings; ToggledFunction:TFPgtkSignalFunction) : TFPgtkRadioButtonGroup;
+var r : integer;
+    b : TFPgtkRadioButton;
+begin
+  result := TFPgtkRadioButtonGroup.Create;
+  result.BeginUpdate;
+  for r := TheItems.count-1 downto 0 do
+    begin
+    b := TFPgtkRadioButton.CreateWithLabel (result, TheItems[r]);
+    if assigned(toggledfunction) then
+      b.connecttoggled (ToggledFunction, IntToPointer(r));
+    end;
+  b.active := true;
+  result.EndUpdate;
+end;
+
+
+ { TFPgtkOptionMenu }
+
+function TFPgtkOptionMenu.TheGtkObject : PGtkOptionMenu;
+begin
+  result := PgtkOptionMenu(FGtkObject);
+end;
+
+procedure TFPgtkOptionMenu.CreateGtkObject;
+begin
+  FGtkObject := PGtkObject(gtk_option_menu_new);
+end;
+
+
+function TFPgtkOptionMenu.GetMenu : TFPgtkMenu;
+begin
+  result := GetPascalInstance(PGtkObject(gtk_option_menu_get_menu(TheGtkObject)),tfpgtkmenu) as tfpgtkmenu;
+end;
+
+procedure TFPgtkOptionMenu.setmenu (TheValue:TFPgtkMenu);
+begin
+  gtk_option_menu_set_menu(TheGtkObject, ConvertToGtkWidget(TheValue));
+end;
+
+procedure TFPgtkOptionMenu.RemoveMenu;
+begin
+  gtk_option_menu_remove_menu (TheGtkObject);
+end;
+
+procedure TFPgtkOptionMenu.SetHistory (index:integer);
+begin
+  gtk_option_menu_set_history (TheGtkObject, index);
+end;
+
+procedure TFPgtkOptionMenu.Clear;
+var w : TFPgtkWidget;
+begin
+  w := Menu;
+  if assigned(w) then
+    begin
+    w := TFPgtkMenu(w).Active;
+    if assigned (w) then
+      TFPgtkItem(w).Deselect;
+    end;
+end;
+
+ { TFPgtkItem }
+
+function TFPgtkItem.TheGtkObject : PGtkItem;
+begin
+  result := PgtkItem(FGtkObject);
+end;
+
+
+function TFPgtkItem.LabelClass : TFPgtkLabelClass;
+begin
+  result := TFPgtkLabel;
+end;
+
+procedure TFPgtkItem.CreateLabel (aText:string);
+begin
+  if not assigned (FLabel) then
+    begin
+    FLabel := LabelClass.Create ('');
+    with FLabel do
+      begin
+      AskNotification (Self);
+      FAccelKey := ParseULine (aText);
+      end;
+    if assigned(AddContainer) then
+      AddContainer.Add (FLabel)
+    else
+      Add (FLabel);
+    LabelCreated;
+    end;
+end;
+
+procedure TFPgtkItem.NotifyDestroy (AnObject:TFPgtkObject);
+begin
+  inherited;
+  if AnObject = FLabel then
+    FLabel := nil;
+end;
+
+function TFPgtkItem.ConnectSelect (proc:TFPgtkSignalFunction; data:pointer) : guint;
+begin
+  result := SignalConnect (sgSelect, proc, data);
+end;
+
+function TFPgtkItem.ConnectAfterSelect (proc:TFPgtkSignalFunction; data:pointer) : guint;
+begin
+  result := SignalConnectAfter (sgSelect, proc, data);
+end;
+
+function TFPgtkItem.ConnectDeselect (proc:TFPgtkSignalFunction; data:pointer) : guint;
+begin
+  result := SignalConnect (sgDeselect, proc, data);
+end;
+
+function TFPgtkItem.ConnectAfterDeselect (proc:TFPgtkSignalFunction; data:pointer) : guint;
+begin
+  result := SignalConnectAfter (sgDeselect, proc, data);
+end;
+
+function TFPgtkItem.ConnectToggle (proc:TFPgtkSignalFunction; data:pointer) : guint;
+begin
+  result := SignalConnect (sgToggle, proc, data);
+end;
+
+function TFPgtkItem.ConnectAfterToggle (proc:TFPgtkSignalFunction; data:pointer) : guint;
+begin
+  result := SignalConnectAfter (sgToggle, proc, data);
+end;
+
+procedure TFPgtkItem.Select;
+begin
+  gtk_item_Select (TheGtkObject);
+end;
+
+procedure TFPgtkItem.Deselect;
+begin
+  gtk_item_Deselect (TheGtkObject);
+end;
+
+procedure TFPgtkItem.Toggle;
+begin
+  gtk_item_Toggle (TheGtkObject);
+end;
+
+constructor TFPgtkItem.Create;
+begin
+  inherited;
+  FAddContainer := nil;
+end;
+
+
+constructor TFPgtkItem.CreateWithLabel (aText:string);
+begin
+  inherited create;
+  Text := aText;
+end;
+
+
+function TFPgtkItem.GetText : string;
+begin
+  if assigned (FLabel) then
+    result := FLabel.Text
+  else
+    result := '';
+end;
+
+procedure TFPgtkItem.SetText (TheValue:string);
+begin
+  if assigned (FLabel) then
+    FLabel.Text := TheValue
+  else
+    if TheValue <> '' then
+      CreateLabel (TheValue);
+end;
+
+procedure TFPgtkItem.LabelCreated;
+begin
+end;
+
+ { TFPgtkItemGroup }
+
+
+function TFPgtkItemGroup.GetItem (index:integer) : TFPgtkItem;
+begin
+  result := TFPgtkItem (inherited items[index]);
+end;
+
+procedure TFPgtkItemGroup.SetItem (index:integer; TheValue:TFPgtkItem);
+begin
+  inherited items[index] := TheValue;
+end;
+
+procedure TFPgtkItemGroup.FillFromList (aList:TStrings);
+var r : integer;
+    i : TFPgtkItem;
+begin
+  BeginUpdate;
+  for r := 0 to aList.count-1 do
+    begin
+    i := FItemClass.CreateWithLabel (aList[r]);
+    add (i);
+    i.Show;
+    end;
+  EndUpdate;
+end;
+
+procedure TFPgtkItemGroup.FillFromCommaText (aList:string);
+var l : TStrings;
+begin
+  l := TStringList.Create;
+  try
+    l.commatext := aList;
+    FillFromList (l);
+  finally
+    l.Free;
+  end;
+end;
+
+procedure TFPgtkItemGroup.FillFromArray (aList:array of string);
+var r : integer;
+    l : TStrings;
+begin
+  l := TStringlist.Create;
+  try
+    for r := low (aList) to high(aList) do
+      l.Add (aList[r]);
+    FillFromList (l);
+  finally
+    l.Free;
+  end;
+end;
+
+procedure TFPgtkItemGroup.SignalConnect (Signal:string; proc:TFPgtkSignalFunction; data:pointer);
+var r : integer;
+begin
+  if assigned (Proc) then
+    for r := 0 to count-1 do
+      Items[r].SignalConnect (Signal, proc, data);
+end;
+
+constructor TFPgtkItemGroup.create (AnItemClass:TFPgtkItemClass);
+begin
+  inherited create;
+  FItemClass := AnItemClass;
+end;
+
+
+function TFPgtkItemGroup.AddTextItem (aText:string) : TFPgtkItem;
+begin
+  result := FItemClass.CreateWithLabel (aText);
+  Add (result);
+  result.Show;
+end;
+
+ { TFPgtkMenuItem }
+
+function TFPgtkMenuItem.TheGtkObject : PGtkMenuItem;
+begin
+  result := PgtkMenuItem(FGtkObject);
+end;
+
+procedure TFPgtkMenuItem.CreateGtkObject;
+begin
+  FGtkObject := PGtkObject(gtk_menu_item_new);
+end;
+
+
+function TFPgtkMenuItem.ConnectActivate (proc:TFPgtksignalFunction; data:pointer) : guint;
+begin
+  result := signalConnect (sgActivate, proc, data);
+end;
+
+function TFPgtkMenuItem.ConnectAfterActivate (proc:TFPgtksignalFunction; data:pointer) : guint;
+begin
+  result := signalConnectAfter (sgActivate, proc, data);
+end;
+
+function TFPgtkMenuItem.ConnectActivateItem (proc:TFPgtksignalFunction; data:pointer) : guint;
+begin
+  result := signalConnect (sgActivateItem, proc, data);
+end;
+
+function TFPgtkMenuItem.ConnectAfterActivateItem (proc:TFPgtksignalFunction; data:pointer) : guint;
+begin
+  result := signalConnectAfter (sgActivateItem, proc, data);
+end;
+
+procedure TFPgtkMenuItem.Activate;
+begin
+  gtk_menu_item_activate (TheGtkObject);
+end;
+
+procedure TFPgtkMenuItem.SetSubMenu (aSubMenu:TFPgtkWidget);
+begin
+  gtk_menu_item_Set_submenu (TheGtkObject, PGtkwidget(ConvertToGtkObject(aSubMenu)));
+end;
+
+procedure TFPgtkMenuItem.RemoveSubMenu;
+begin
+  gtk_menu_item_remove_submenu (TheGtkObject);
+end;
+
+procedure TFPgtkMenuItem.Configure (ShowToggleIndicator:boolean; ShowSubmenuIndicator:boolean);
+begin
+  gtk_menu_item_configure (TheGtkObject, ord(ShowToggleIndicator), ord(ShowSubmenuIndicator));
+end;
+
+procedure TFPgtkMenuItem.RightJustify;
+begin
+  gtk_menu_item_right_justify (TheGtkObject);
+end;
+
+function TFPgtkMenuItem.GetPlacement : TGtkSubmenuPlacement;
+begin
+  result := TGtkSubmenuPlacement(submenu_placement(TheGtkObject^));
+end;
+
+procedure TFPgtkMenuItem.SetPlacement (TheValue:TGtkSubmenuPlacement);
+begin
+  gtk_menu_item_set_placement(TheGtkObject,TheValue);
+end;
+
+function TFPgtkMenuItem.GetToggleIndicator : boolean;
+begin
+  result := boolean(gtk.show_toggle_indicator(TheGtkObject^));
+end;
+
+procedure TFPgtkMenuItem.SetToggleIndicator (TheValue:boolean);
+begin
+  Configure (TheValue, SubMenuIndicator);
+end;
+
+function TFPgtkMenuItem.GetSubMenuIndicator : boolean;
+begin
+  result := boolean(gtk.show_submenu_indicator(TheGtkObject^));
+end;
+
+procedure TFPgtkMenuItem.SetSubMenuIndicator (TheValue:boolean);
+begin
+  configure (ToggleIndicator, TheValue);
+end;
+
+function TFPgtkMenuItem.GetJustifyRight : boolean;
+begin
+  result := boolean(gtk.right_justify(TheGtkObject^));
+end;
+
+procedure TFPgtkMenuItem.SetJustifyRight (TheValue:boolean);
+begin
+  gtk.Set_right_justify(TheGtkObject^,guint(TheValue))
+end;
+
+function TFPgtkMenuItem.GetSubMenu : TFPgtkMenuShell;
+begin
+  result := GetPascalInstance(PGtkObject(TheGtkObject^.submenu),tfpgtkmenushell) as tfpgtkmenushell;
+end;
+
+procedure TFPgtkMenuItem.SetPropSubMenu (TheValue:TFPgtkMenuShell);
+begin
+  SetSubMenu (TheValue);
+end;
+
+function TFPgtkMenuItem.LabelClass : TFPgtkLabelClass;
+begin
+  result := TFPgtkAccelLabel;
+end;
+
+procedure TFPgtkMenuItem.LabelCreated;
+begin
+  with (TheLabel as TFPgtkAccelLabel) do
+    AccelWidget := Self;
+end;
+
+ { TFPgtkCheckMenuItem }
+
+function TFPgtkCheckMenuItem.TheGtkObject : PGtkCheckMenuItem;
+begin
+  result := PgtkCheckMenuItem(FGtkObject);
+end;
+
+procedure TFPgtkCheckMenuItem.CreateGtkObject;
+begin
+  FGtkObject := PGtkObject(gtk_check_menu_item_new);
+end;
+
+
+function TFPgtkCheckMenuItem.ConnectToggled (proc:TFPgtksignalFunction; data:pointer) : guint;
+begin
+  result := signalConnect (sgToggled, proc, data);
+end;
+
+function TFPgtkCheckMenuItem.ConnectAfterToggled (proc:TFPgtksignalFunction; data:pointer) : guint;
+begin
+  result := signalConnectAfter (sgToggled, proc, data);
+end;
+
+procedure TFPgtkCheckMenuItem.Toggled;
+begin
+  gtk_check_menu_item_toggled (TheGtkObject);
+end;
+
+function TFPgtkCheckMenuItem.GetActive : boolean;
+begin
+  result := boolean(gtk.active(TheGtkObject^));
+end;
+
+procedure TFPgtkCheckMenuItem.SetActive (TheValue:boolean);
+begin
+  gtk_check_menu_item_set_active(TheGtkObject,TheValue);
+end;
+
+function TFPgtkCheckMenuItem.GetShowToggle : boolean;
+begin
+  result := boolean(gtk.always_show_toggle(TheGtkObject^));
+end;
+
+procedure TFPgtkCheckMenuItem.SetShowToggle (TheValue:boolean);
+begin
+  gtk_check_menu_item_set_show_toggle(TheGtkObject,TheValue);
+end;
+
+ { TFPgtkRadioMenuItem }
+
+function TFPgtkRadioMenuItem.TheGtkObject : PGtkRadioMenuItem;
+begin
+  result := PgtkRadioMenuItem(FGtkObject);
+end;
+
+
+procedure TFPgtkRadioMenuItem.CreateGtkObject;
+begin
+  if not assigned(FGroup) then
+    FGroup := TFPgtkRadioMenuGroup.Create;
+  TheGtkWidget := gtk_radio_menu_item_new (FGroup.GtkSList);
+  FGroup.GtkSList := gtk_radio_menu_item_group (TheGtkObject);
+end;
+
+constructor TFPgtkRadioMenuItem.Create (AGroup:TFPgtkRadioMenuGroup);
+begin
+  FGroup := AGroup;
+  inherited create;
+end;
+
+
+constructor TFPgtkRadioMenuItem.CreateWithLabel (Agroup:TFPgtkRadioMenuGroup; aText:string);
+begin
+  FGroup := Agroup;
+  inherited CreateWithLabel (aText);
+end;
+
+
+ { TFPgtkRadioMenuGroup }
+
+
+function TFPgtkRadioMenuGroup.GetItem (index:integer) : TFPgtkRadioMenuItem;
+begin
+  result := TFPgtkRadioMenuItem(Inherited items[index]);
+end;
+
+procedure TFPgtkRadioMenuGroup.SetItem (index:integer; TheValue:TFPgtkRadioMenuItem);
+begin
+  inherited items[index] := TheValue;
+end;
+
+function TFPgtkRadioMenuGroup.ActiveMenuText : string;
+begin
+  result := ActiveMenu.Text;
+end;
+
+function TFPgtkRadioMenuGroup.ActiveMenuIndex : integer;
+begin
+  Result := pred(count);
+  while (Result >= 0) and (not items[Result].Active) do
+    dec (Result);
+end;
+
+function TFPgtkRadioMenuGroup.ActiveMenu : TFPgtkRadioMenuItem;
+var r : integer;
+begin
+  r := ActiveMenuIndex;
+  if r >= 0 then
+    result := items[r]
+  else
+    result := nil;
+end;
+
+constructor TFPgtkRadioMenuGroup.create;
+begin
+  inherited create (TFPgtkRadioMenuItem);
+end;
+
+
+ { TFPgtkTearOffMenuItem }
+
+function TFPgtkTearOffMenuItem.TheGtkObject : PGtkTearOffMenuItem;
+begin
+  result := PgtkTearOffMenuItem(FGtkObject);
+end;
+
+procedure TFPgtkTearOffMenuItem.CreateGtkObject;
+begin
+  FGtkObject := PGtkObject(gtk_tearoff_menu_item_new);
+end;
+
+
+ { TFPgtkListItem }
+
+function TFPgtkListItem.TheGtkObject : PGtkListItem;
+begin
+  result := PgtkListItem(FGtkObject);
+end;
+
+procedure TFPgtkListItem.CreateGtkObject;
+begin
+  FGtkObject := PGtkObject(gtk_list_item_new);
+end;
+
+
+procedure ScrollSignalproc (Sender:PGtkobject; ScrollType:TgtkScrollType; position:gfloat; data:pointer); cdecl;
+var p : TFPgtkScrollSignalFunction;
+begin
+with PSignalData(data)^ do
+  begin
+  p := TFPgtkScrollSignalFunction (TheSignalProc);
+  p (TheWidget as TFPgtkObject, ScrollType, position, TheData)
+  end;
+end;
+
+function TFPgtkListItem.ScrollSignalConnect (signal:string; proc:TFPgtkScrollSignalFunction; data:pointer) : guint;
+begin
+  result := gtk_signal_connect (FGtkObject, pgChar(signal), gtk_signal_func(@ScrollSignalproc), ConvertSignalData(TFPgtkSignalFunction(proc), data, true));
+end;
+
+function TFPgtkListItem.ScrollSignalConnectAfter (signal:string; proc:TFPgtkScrollSignalFunction; data:pointer) : guint;
+begin
+  result := gtk_signal_connect_After (FGtkObject, pgChar(signal), gtk_signal_func(@ScrollSignalproc), ConvertSignalData(TFPgtkSignalFunction(proc), data, true));
+end;
+
+procedure ScrollBooleanSignalproc (Sender:PGtkobject; ScrolType:TgtkScrollType; Position:gfloat; AutoStartSelection:boolean; data:pointer); cdecl;
+var p : TFPgtkScrollBooleanSignalFunction;
+begin
+with PSignalData(data)^ do
+  begin
+  p := TFPgtkScrollBooleanSignalFunction (TheSignalProc);
+  p (TheWidget as TFPgtkObject, ScrolType, Position, AutoStartSelection, TheData)
+  end;
+end;
+
+function TFPgtkListItem.ScrollBooleanSignalConnect (signal:string; proc:TFPgtkScrollBooleanSignalFunction; data:pointer) : guint;
+begin
+  result := gtk_signal_connect (FGtkObject, pgChar(signal), gtk_signal_func(@ScrollBooleanSignalproc), ConvertSignalData(TFPgtkSignalFunction(proc), data, true));
+end;
+
+function TFPgtkListItem.ScrollBooleanSignalConnectAfter (signal:string; proc:TFPgtkScrollBooleanSignalFunction; data:pointer) : guint;
+begin
+  result := gtk_signal_connect_After (FGtkObject, pgChar(signal), gtk_signal_func(@ScrollBooleanSignalproc), ConvertSignalData(TFPgtkSignalFunction(proc), data, true));
+end;
+
+function TFPgtkListItem.ConnectToggleFocusRow (proc:TFPgtkSignalFunction; data:pointer) : guint;
+begin
+  result := SignalConnect (sgToggleFocusRow, proc, data);
+end;
+
+function TFPgtkListItem.ConnectAfterToggleFocusRow (proc:TFPgtkSignalFunction; data:pointer) : guint;
+begin
+  result := SignalConnectAfter (sgToggleFocusRow, proc, data);
+end;
+
+function TFPgtkListItem.ConnectSelectAll (proc:TFPgtkSignalFunction; data:pointer) : guint;
+begin
+  result := SignalConnect (sgSelectAll, proc, data);
+end;
+
+function TFPgtkListItem.ConnectAfterSelectAll (proc:TFPgtkSignalFunction; data:pointer) : guint;
+begin
+  result := SignalConnectAfter (sgSelectAll, proc, data);
+end;
+
+function TFPgtkListItem.ConnectUnselectAll (proc:TFPgtkSignalFunction; data:pointer) : guint;
+begin
+  result := SignalConnect (sgUnselectAll, proc, data);
+end;
+
+function TFPgtkListItem.ConnectAfterUnselectAll (proc:TFPgtkSignalFunction; data:pointer) : guint;
+begin
+  result := SignalConnectAfter (sgUnselectAll, proc, data);
+end;
+
+function TFPgtkListItem.ConnectUndoSelection (proc:TFPgtkSignalFunction; data:pointer) : guint;
+begin
+  result := SignalConnect (sgUndoSelection, proc, data);
+end;
+
+function TFPgtkListItem.ConnectAfterUndoSelection (proc:TFPgtkSignalFunction; data:pointer) : guint;
+begin
+  result := SignalConnectAfter (sgUndoSelection, proc, data);
+end;
+
+function TFPgtkListItem.ConnectStartSelection (proc:TFPgtkSignalFunction; data:pointer) : guint;
+begin
+  result := SignalConnect (sgStartSelection, proc, data);
+end;
+
+function TFPgtkListItem.ConnectAfterStartSelection (proc:TFPgtkSignalFunction; data:pointer) : guint;
+begin
+  result := SignalConnectAfter (sgStartSelection, proc, data);
+end;
+
+function TFPgtkListItem.ConnectEndSelection (proc:TFPgtkSignalFunction; data:pointer) : guint;
+begin
+  result := SignalConnect (sgEndSelection, proc, data);
+end;
+
+function TFPgtkListItem.ConnectAfterEndSelection (proc:TFPgtkSignalFunction; data:pointer) : guint;
+begin
+  result := SignalConnectAfter (sgEndSelection, proc, data);
+end;
+
+function TFPgtkListItem.ConnectToggleAddMode (proc:TFPgtkSignalFunction; data:pointer) : guint;
+begin
+  result := SignalConnect (sgToggleAddMode, proc, data);
+end;
+
+function TFPgtkListItem.ConnectAfterToggleAddMode (proc:TFPgtkSignalFunction; data:pointer) : guint;
+begin
+  result := SignalConnectAfter (sgToggleAddMode, proc, data);
+end;
+
+function TFPgtkListItem.ConnectExtendSelection (proc:TFPgtkScrollBooleanSignalFunction; data:pointer) : guint;
+begin
+  result := ScrollBooleanSignalConnect (sgExtendSelection, proc, data);
+end;
+
+function TFPgtkListItem.ConnectAfterExtendSelection (proc:TFPgtkScrollBooleanSignalFunction; data:pointer) : guint;
+begin
+  result := ScrollBooleanSignalConnectAfter (sgExtendSelection, proc, data);
+end;
+
+function TFPgtkListItem.ConnectScrollVertical (proc:TFPgtkScrollSignalFunction; data:pointer) : guint;
+begin
+  result := ScrollSignalConnect (sgScrollVertical, proc, data);
+end;
+
+function TFPgtkListItem.ConnectAfterScrollVertical (proc:TFPgtkScrollSignalFunction; data:pointer) : guint;
+begin
+  result := ScrollSignalConnectAfter (sgScrollVertical, proc, data);
+end;
+
+function TFPgtkListItem.ConnectScrollHorizontal (proc:TFPgtkScrollSignalFunction; data:pointer) : guint;
+begin
+  result := ScrollSignalConnect (sgScrollHorizontal, proc, data);
+end;
+
+function TFPgtkListItem.ConnectAfterScrollHorizontal (proc:TFPgtkScrollSignalFunction; data:pointer) : guint;
+begin
+  result := ScrollSignalConnectAfter (sgScrollHorizontal, proc, data);
+end;
+
+procedure TFPgtkListItem.Select;
+begin
+  gtk_list_item_select (TheGtkObject);
+end;
+
+procedure TFPgtkListItem.Deselect;
+begin
+  gtk_list_item_deselect (TheGtkObject);
+end;
+
+ { TFPgtkListItemGroup }
+
+
+constructor TFPgtkListItemGroup.create;
+begin
+  inherited create (TFPgtkListItem);
+  ManageLists := false;
+end;
+
+
+ { TFPgtkTreeItem }
+
+function TFPgtkTreeItem.TheGtkObject : PGtkTreeItem;
+begin
+  result := PgtkTreeItem(FGtkObject);
+end;
+
+procedure TFPgtkTreeItem.CreateGtkObject;
+begin
+  FGtkObject := PGtkObject(gtk_tree_item_new);
+end;
+
+
+function TFPgtkTreeItem.GetSubTree : TFPgtkWidget;
+begin
+  result := GetPascalInstance(PGtkObject(gtk_tree_item_subtree(TheGtkObject)),tfpgtkwidget) as tfpgtkwidget;
+end;
+
+procedure TFPgtkTreeItem.SetSubTree (TheValue:TFPgtkWidget);
+begin
+  if assigned(TheValue) then
+    gtk_tree_item_set_subtree (TheGtkObject, ConvertToGtkWidget(TheValue))
+  else
+    gtk_tree_item_remove_subtree (TheGtkObject);
+end;
+
+function TFPgtkTreeItem.GetPixPlus : TFPgtkWidget;
+begin
+  result := GetPascalInstance(PGtkObject(TheGtkObject^.plus_pix_widget),tfpgtkwidget) as tfpgtkwidget;
+end;
+
+function TFPgtkTreeItem.GetPixMinus : TFPgtkWidget;
+begin
+  result := GetPascalInstance(PGtkObject(TheGtkObject^.minus_pix_widget),tfpgtkwidget) as tfpgtkwidget;
+end;
+
+function TFPgtkTreeItem.GetExpanded : boolean;
+begin
+  result := boolean(gtk.expanded(TheGtkObject^));
+end;
+
+procedure TFPgtkTreeItem.SetExpanded (TheValue:boolean);
+begin
+  if TheValue then
+    Expand
+  else
+    collapse;
+end;
+
+procedure TFPgtkTreeItem.Select;
+begin
+  gtk_tree_item_select (TheGtkObject);
+end;
+
+procedure TFPgtkTreeItem.Deselect;
+begin
+  gtk_tree_item_deselect (TheGtkObject);
+end;
+
+procedure TFPgtkTreeItem.Expand;
+begin
+  gtk_tree_item_expand (TheGtkObject);
+end;
+
+procedure TFPgtkTreeItem.Collapse;
+begin
+  gtk_tree_item_collapse (TheGtkObject);
+end;
+
+function TFPgtkTreeItem.ConnectCollapse (proc:TFPgtkSignalFunction; data:pointer) : guint;
+begin
+  result := SignalConnect (sgCollapse, proc, data);
+end;
+
+function TFPgtkTreeItem.ConnectAfterCollapse (proc:TFPgtkSignalFunction; data:pointer) : guint;
+begin
+  result := SignalConnectAfter (sgCollapse, proc, data);
+end;
+
+function TFPgtkTreeItem.ConnectExpand (proc:TFPgtkSignalFunction; data:pointer) : guint;
+begin
+  result := SignalConnect (sgExpand, proc, data);
+end;
+
+function TFPgtkTreeItem.ConnectAfterExpand (proc:TFPgtkSignalFunction; data:pointer) : guint;
+begin
+  result := SignalConnectAfter (sgExpand, proc, data);
+end;
+
+ { TFPgtkWindow }
+
+function TFPgtkWindow.TheGtkObject : PGtkWindow;
+begin
+  result := PgtkWindow(FGtkObject);
+end;
+
+procedure TFPgtkWindow.CreateGtkObject;
+begin
+  FGtkObject := PGtkObject(gtk_window_new (TheWindowType));
+end;
+
+
+constructor TFPgtkWindow.Create (AType:TGtkWindowType);
+begin
+  TheWindowType := AType;
+  inherited Create;
+  FAccelGroups := TList.Create;
+  FMainLevel := NoMainLevel;
+end;
+
+
+destructor TFPgtkWindow.Destroy;
+begin
+  FAccelGroups.Free;
+  inherited;
+end;
+
+
+function TFPgtkWindow.GetWindowType : TGtkWindowType;
+begin
+  result := TheGtkObject^.thetype;
+end;
+
+procedure TFPgtkWindow.SetWindowType (TheValue:TGtkWindowType);
+begin
+  TheGtkObject^.thetype := TheValue;
+end;
+
+function TFPgtkWindow.GetTitle : string;
+begin
+  result := TheGtkObject^.title;
+end;
+
+procedure TFPgtkWindow.SetTitle (TheValue:string);
+begin
+  gtk_window_set_title(TheGtkObject,ConvertToPgchar(TheValue));
+end;
+
+function TFPgtkWindow.GetModal : boolean;
+begin
+  result := boolean(gtk.modal(TheGtkObject^));
+end;
+
+procedure TFPgtkWindow.SetModal (TheValue:boolean);
+begin
+  gtk_window_set_modal(TheGtkObject,TheValue);
+end;
+
+procedure TFPgtkWindow.DoDialogResult (Action:integer; Sender:TFPgtkObject);
+begin
+  if assigned (OnDialogResult) then
+    OnDialogResult (self, FDialogResult, Action, Sender);
+end;
+
+procedure TFPgtkWindow.DoDialogInit (InitData:pointer);
+begin
+  if assigned (OnDialogInit) then
+    OnDialogInit (self, InitData);
+  FDialogResult := InitData;
+end;
+
+procedure TFPgtkWindow.Close;
+begin
+  if (FDestroying = dsAlive) then
+    gtk_widget_destroy (TheGtkWidget);
+end;
+
+procedure TFPgtkWindow.CloseWindow (Sender:TFPgtkObject; data:pointer);
+begin
+  Close;
+end;
+
+procedure TFPgtkWindow.CloseWithResult (Sender:TFPgtkObject; data:pointer);
+begin
+  ModalAction := pointertoint(data);
+end;
+
+procedure TFPgtkWindow.SetModalAction (TheValue:integer);
+begin
+  FModalAction := TheValue;
+  if TheValue <> 0 then
+    begin
+    DoDialogResult (FModalAction, self);
+    close;
+    end;
+end;
+
+procedure TFPgtkWindow.ExecuteEnds (Sender:TFPgtkObject; data:pointer);
+begin
+  if gtk_main_level = FMainLevel then
+    gtk_main_quit;
+end;
+
+function TFPgtkWindow.Execute (anOnDialogInit:DialogInitCallBack; anInitData:pointer; anOnDialogResult:DialogResultCallBack) : integer;
+begin
+  FModalAction := drNone;
+  if assigned (anOnDialogInit) then
+    OnDialogInit := anOnDialogInit;
+  DoDialogInit (anInitData);
+  if assigned (anOnDialogResult) then
+    OnDialogResult := anOnDialogResult;
+  ConnectDestroy (@ExecuteEnds, nil);
+  Modal := True;
+  Show;
+  FMainLevel := gtk_main_level + 1;
+  try
+    gtk_main;
+    result := FModalAction;
+  finally
+    FMainLevel := NoMainLevel;
+  end;
+end;
+
+function TFPgtkWindow.ConnectSetFocus (proc:TFPgtkWidgetSignalFunction; data:pointer) : guint;
+begin
+  result := WidgetSignalConnect (sgSetFocus, proc, data);
+end;
+
+function TFPgtkWindow.ConnectAfterSetFocus (proc:TFPgtkWidgetSignalFunction; data:pointer) : guint;
+begin
+  result := WidgetSignalConnectAfter (sgSetFocus, proc, data);
+end;
+
+procedure TFPgtkWindow.SetTransientFor (aParent:TFPgtkWindow);
+begin
+  gtk_window_set_transient_for (TheGtkObject, PGtkwindow(ConvertToGtkObject(aParent)));
+end;
+
+procedure TFPgtkWindow.DefaultWidget (Widget:TFPgtkWidget);
+begin
+  gtk_window_set_default (TheGtkObject, PGtkwidget(ConvertToGtkObject(Widget)));
+end;
+
+procedure TFPgtkWindow.FocusedWidget (NewFocus:TFPgtkWidget);
+begin
+  gtk_window_set_focus (TheGtkObject, PGtkwidget(ConvertToGtkObject(NewFocus)));
+end;
+
+function TFPgtkWindow.GetUserSizable : boolean;
+begin
+  result := (allow_grow(TheGtkObject^)=1) and (auto_shrink(TheGtkObject^)=0);
+end;
+
+procedure TFPgtkWindow.SetUserSizable (TheValue:boolean);
+begin
+  if TheValue then
+    gtk_window_set_policy (TheGtkObject, gint(FALSE), gint(TRUE), gint(FALSE))
+  else
+    gtk_window_set_policy (TheGtkObject, gint(FALSE), gint(FALSE), gint(TRUE));
+end;
+
+procedure TFPgtkWindow.ActivateFocus;
+begin
+  gtk_window_activate_focus (TheGtkObject);
+end;
+
+procedure TFPgtkWindow.ActivateDefault;
+begin
+  gtk_window_activate_default (TheGtkObject);
+end;
+
+procedure TFPgtkWindow.SetDefaultSize (Width:gint; Height:gint);
+begin
+  gtk_window_set_default_size (TheGtkObject, Width, Height);
+end;
+
+function TFPgtkWindow.GetPosition : TGtkWindowPosition;
+begin
+  result := TGtkWindowPosition (gtk.position (TheGtkObject^));
+end;
+
+procedure TFPgtkWindow.SetPosition (TheValue:TGtkWindowPosition);
+begin
+  gtk_window_set_position(TheGtkObject,TheValue);
+end;
+
+function TFPgtkWindow.GetAccelGroups (ID:integer) : PGtkAccelGroup;
+begin
+  result := FAccelGroups[ID];
+  if result = nil then
+    result := FAccelGroups[-1];
+end;
+
+function TFPgtkWindow.AccelGroupNew : integer;
+var ag : Pgtkaccelgroup;
+begin
+  result := FAccelGroups.Count;
+  ag := gtk_accel_group_new;
+  FAccelGroups.Add (ag);
+  gtk_window_add_accel_group (TheGtkObject, ag);
+end;
+
+procedure TFPgtkWindow.AccelGroupDelete (ID:integer);
+begin
+  gtk_accel_group_detach (FAccelGroups[ID], FGtkObject);
+  FAccelGroups[ID] := nil;
+end;
+
+procedure TFPgtkWindow.AcceleratorAdd (AG:integer; aWidget:TFPgtkWidget; aSignal:string; Key:guint; Mods:TGdkModifierType; acFlags:TGtkAccelFlags); Overload;
+begin
+  gtk_widget_add_accelerator (ConvertToGtkWidget(aWidget), pgchar(aSignal),
+        AccelGroups[AG], Key, Mods, acFlags);
+end;
+
+procedure AcceleratorAdd (AG:PGtkAccelGroup; aWidget:TFPgtkWidget; aSignal:string; Key:guint; Mods:TGdkModifierType; Flags:TGtkAccelFlags);
+begin
+  gtk_widget_add_accelerator (ConvertToGtkWidget(aWidget), pgchar(aSignal),
+        AG, Key, Mods, Flags);
+end;
+
+
+procedure TFPgtkWindow.AcceleratorRemove (AG:integer; aWidget:TFPgtkWidget; Key:guint; Mods:TGdkModifierType); Overload;
+begin
+  gtk_widget_remove_accelerator (ConvertToGtkWidget(aWidget), AccelGroups[AG], Key, Mods);
+end;
+
+procedure AcceleratorRemove (AG:PGtkAccelGroup; aWidget:TFPgtkWidget; Key:guint; Mods:TGdkModifierType); Overload;
+begin
+  gtk_widget_remove_accelerator (ConvertToGtkWidget(aWidget), AG, Key, Mods);
+end;
+
+
+procedure TFPgtkWindow.AccelGroupLock (AG:integer);
+begin
+  gtk_accel_group_lock (AccelGroups[AG]);
+end;
+
+procedure AccelGroupLock (AG:PGtkAccelGroup);
+begin
+  gtk_accel_group_lock (AG);
+end;
+
+
+procedure TFPgtkWindow.AccelGroupUnlock (AG:integer);
+begin
+  gtk_accel_group_unlock (AccelGroups[AG]);
+end;
+
+procedure AccelGroupUnlock (AG:PGtkAccelGroup);
+begin
+  gtk_accel_group_unlock (AG);
+end;
+
+
+function AccelKeyName (Key:guint; Mods:TGdkModifierType) : string;
+begin
+  result := string (gtk_accelerator_name(Key, Mods));
+end;
+
+
+procedure AccelKeyParse (AccelName:string; var Key:guint; var Mods:TGdkModifierType);
+var k : guint;
+    m : TGdkModifierType;
+begin
+  gtk_accelerator_parse (pgchar(AccelName), @k, @m);
+  Key := k;
+  Mods := m;
+end;
+
+
+procedure TFPgtkWindow.AccelGroupActivate (AG:integer; Key:guint; Mods:TGdkModifierType);
+begin
+  gtk_accel_group_activate (AccelGroups[AG], Key, Mods);
+end;
+
+procedure AccelGroupActivate (AG:PGtkAccelGroup; Key:guint; Mods:TGdkModifierType);
+begin
+  gtk_accel_group_activate (AG, Key, Mods);
+end;
+
+
+ { TFPgtkColorSelectionDialog }
+
+function TFPgtkColorSelectionDialog.TheGtkObject : PGtkColorSelectionDialog;
+begin
+  result := PgtkColorSelectionDialog(FGtkObject);
+end;
+
+procedure TFPgtkColorSelectionDialog.CreateGtkObject;
+begin
+  FGtkObject := PGtkObject(gtk_color_selection_dialog_new (''));
+end;
+
+
+function TFPgtkColorSelectionDialog.GetColorSel : TFPgtkColorSelection;
+begin
+  result := GetPascalInstance(PGtkObject(TheGtkObject^.Colorsel),tfpgtkcolorselection) as tfpgtkcolorselection;
+end;
+
+function TFPgtkColorSelectionDialog.GetButtonOK : TFPgtkButton;
+begin
+  result := GetPascalInstance(PGtkObject(TheGtkObject^.ok_button),tfpgtkbutton) as tfpgtkbutton;
+end;
+
+function TFPgtkColorSelectionDialog.GetButtonCancel : TFPgtkButton;
+begin
+  result := GetPascalInstance(PGtkObject(TheGtkObject^.cancel_button),tfpgtkbutton) as tfpgtkbutton;
+end;
+
+function TFPgtkColorSelectionDialog.GetButtonHelp : TFPgtkButton;
+begin
+  result := GetPascalInstance(PGtkObject(TheGtkObject^.help_button),tfpgtkbutton) as tfpgtkbutton;
+end;
+
+ { TFPgtkDialog }
+
+function TFPgtkDialog.TheGtkObject : PGtkDialog;
+begin
+  result := PgtkDialog(FGtkObject);
+end;
+
+procedure TFPgtkDialog.CreateGtkObject;
+begin
+  FGtkObject := PGtkObject(gtk_dialog_new);
+end;
+
+
+function TFPgtkDialog.GetActionArea : TFPgtkHBox;
+begin
+  result := GetPascalInstance(PGtkObject(TheGtkObject^.action_area),tfpgtkhbox) as tfpgtkhbox;
+end;
+
+function TFPgtkDialog.GetVBox : TFPgtkVBox;
+begin
+  result := GetPascalInstance(PGtkObject(TheGtkObject^.vbox),tfpgtkvbox) as tfpgtkvbox;
+end;
+
+constructor TFPgtkDialog.create;
+begin
+  inherited create (gtk_window_dialog);
+end;
+
+
+ { TFPgtkInputDialog }
+
+function TFPgtkInputDialog.TheGtkObject : PGtkInputDialog;
+begin
+  result := PgtkInputDialog(FGtkObject);
+end;
+
+procedure TFPgtkInputDialog.CreateGtkObject;
+begin
+  FGtkObject := PGtkObject(gtk_input_dialog_new);
+end;
+
+
+function TFPgtkInputDialog.GetButtonClose : TFPgtkButton;
+begin
+  result := GetPascalInstance(PGtkObject(TheGtkObject^.close_button),tfpgtkbutton) as tfpgtkbutton;
+end;
+
+function TFPgtkInputDialog.GetButtonSave : TFPgtkButton;
+begin
+  result := GetPascalInstance(PGtkObject(TheGtkObject^.save_button),tfpgtkbutton) as tfpgtkbutton;
+end;
+
+procedure DeviceSignalproc (Sender:PGtkinputdialog; DeviceID:integer; Data:pointer); cdecl;
+var p : TFPgtkDeviceSignalFunction;
+begin
+with PSignalData(data)^ do
+  begin
+  p := TFPgtkDeviceSignalFunction (TheSignalProc);
+  p (TheWidget as TFPgtkInputDialog, DeviceID, TheData)
+  end;
+end;
+
+function TFPgtkInputDialog.DeviceSignalConnect (signal:string; proc:TFPgtkDeviceSignalFunction; data:pointer) : guint;
+begin
+  result := gtk_signal_connect (FGtkObject, pgChar(signal), gtk_signal_func(@DeviceSignalproc), ConvertSignalData(TFPgtkSignalFunction(proc), data, true));
+end;
+
+function TFPgtkInputDialog.DeviceSignalConnectAfter (signal:string; proc:TFPgtkDeviceSignalFunction; data:pointer) : guint;
+begin
+  result := gtk_signal_connect_After (FGtkObject, pgChar(signal), gtk_signal_func(@DeviceSignalproc), ConvertSignalData(TFPgtkSignalFunction(proc), data, true));
+end;
+
+function TFPgtkInputDialog.ConnectEnableDevice (proc:TFPgtkDeviceSignalFunction; data:pointer) : guint;
+begin
+  result := DeviceSignalConnect (sgEnableDevice, proc, data);
+end;
+
+function TFPgtkInputDialog.ConnectAfterEnableDevice (proc:TFPgtkDeviceSignalFunction; data:pointer) : guint;
+begin
+  result := DeviceSignalConnectAfter (sgEnableDevice, proc, data);
+end;
+
+function TFPgtkInputDialog.ConnectDisableDevice (proc:TFPgtkDeviceSignalFunction; data:pointer) : guint;
+begin
+  result := DeviceSignalConnect (sgDisableDevice, proc, data);
+end;
+
+function TFPgtkInputDialog.ConnectAfterDisableDevice (proc:TFPgtkDeviceSignalFunction; data:pointer) : guint;
+begin
+  result := DeviceSignalConnectAfter (sgDisableDevice, proc, data);
+end;
+
+ { TFPgtkFileSelection }
+
+function TFPgtkFileSelection.TheGtkObject : PGtkFileSelection;
+begin
+  result := PgtkFileSelection(FGtkObject);
+end;
+
+procedure TFPgtkFileSelection.CreateGtkObject;
+begin
+  FGtkObject := PGtkObject(gtk_file_selection_new ('Select a file'));
+end;
+
+
+function TFPgtkFileSelection.GetFilename : string;
+begin
+  result := gtk_file_selection_get_filename(TheGtkObject);
+end;
+
+procedure TFPgtkFileSelection.SetFilename (TheValue:string);
+begin
+  gtk_file_selection_set_filename(TheGtkObject,Pgchar(TheValue));
+end;
+
+procedure TFPgtkFileSelection.Complete (Pattern:string);
+begin
+  gtk_file_selection_complete (TheGtkObject, ConvertToPgchar(Pattern));
+end;
+
+procedure TFPgtkFileSelection.ShowFileOpButtons;
+begin
+  gtk_file_selection_show_fileop_buttons (TheGtkObject);
+end;
+
+procedure TFPgtkFileSelection.HideFileOpButtons;
+begin
+  gtk_file_selection_hide_fileop_buttons (TheGtkObject);
+end;
+
+function TFPgtkFileSelection.GetDirList : TFPgtkCList;
+begin
+  result := GetPascalInstance(PGtkObject(TheGtkObject^.dir_list),tfpgtkclist) as tfpgtkclist;
+end;
+
+function TFPgtkFileSelection.GetFileList : TFPgtkCList;
+begin
+  result := GetPascalInstance(PGtkObject(TheGtkObject^.file_list),tfpgtkclist) as tfpgtkclist;
+end;
+
+function TFPgtkFileSelection.GetOkButton : TFPgtkButton;
+begin
+  result := GetPascalInstance(PGtkObject(TheGtkObject^.ok_button),tfpgtkbutton) as tfpgtkbutton;
+end;
+
+function TFPgtkFileSelection.GetCancelButton : TFPgtkButton;
+begin
+  result := GetPascalInstance(PGtkObject(TheGtkObject^.cancel_button),tfpgtkbutton) as tfpgtkbutton;
+end;
+
+function TFPgtkFileSelection.GetHistoryPulldown : TFPgtkOptionMenu;
+begin
+  result := GetPascalInstance(PGtkObject(TheGtkObject^.history_pulldown),tfpgtkoptionmenu) as tfpgtkoptionmenu;
+end;
+
+function TFPgtkFileSelection.GetFileOpDialog : TFPgtkDialog;
+begin
+  result := GetPascalInstance(PGtkObject(TheGtkObject^.fileop_dialog),tfpgtkdialog) as tfpgtkdialog;
+end;
+
+function TFPgtkFileSelection.GetFileOpCreateDir : TFPgtkButton;
+begin
+  result := GetPascalInstance(PGtkObject(TheGtkObject^.fileop_c_dir),tfpgtkbutton) as tfpgtkbutton;
+end;
+
+function TFPgtkFileSelection.GetFileOpDelFile : TFPgtkButton;
+begin
+  result := GetPascalInstance(PGtkObject(TheGtkObject^.fileop_del_file),tfpgtkbutton) as tfpgtkbutton;
+end;
+
+function TFPgtkFileSelection.GetFileOpRenFile : TFPgtkButton;
+begin
+  result := GetPascalInstance(PGtkObject(TheGtkObject^.fileop_ren_file),tfpgtkbutton) as tfpgtkbutton;
+end;
+
+ { TFPgtkFontSelectionDialog }
+
+function TFPgtkFontSelectionDialog.TheGtkObject : PGtkFontSelectionDialog;
+begin
+  result := PgtkFontSelectionDialog(FGtkObject);
+end;
+
+procedure TFPgtkFontSelectionDialog.CreateGtkObject;
+begin
+  FGtkObject := PGtkObject(gtk_font_selection_dialog_new (''));
+end;
+
+
+function TFPgtkFontSelectionDialog.GetFontSel : TFPgtkFontSelection;
+begin
+  result := GetPascalInstance(PGtkObject(TheGtkObject^.fontsel),tfpgtkfontselection) as tfpgtkfontselection;
+end;
+
+function TFPgtkFontSelectionDialog.GetButtonOk : TFPgtkButton;
+begin
+  result := GetPascalInstance(PGtkObject(TheGtkObject^.ok_button),tfpgtkbutton) as tfpgtkbutton;
+end;
+
+function TFPgtkFontSelectionDialog.GetButtonApply : TFPgtkButton;
+begin
+  result := GetPascalInstance(PGtkObject(TheGtkObject^.apply_button),tfpgtkbutton) as tfpgtkbutton;
+end;
+
+function TFPgtkFontSelectionDialog.GetButtonCancel : TFPgtkButton;
+begin
+  result := GetPascalInstance(PGtkObject(TheGtkObject^.cancel_button),tfpgtkbutton) as tfpgtkbutton;
+end;
+
+ { TFPgtkEventBox }
+
+function TFPgtkEventBox.TheGtkObject : PGtkEventBox;
+begin
+  result := PgtkEventBox(FGtkObject);
+end;
+
+procedure TFPgtkEventBox.CreateGtkObject;
+begin
+  FGtkObject := PGtkObject(gtk_event_box_new);
+end;
+
+
+ { TFPgtkHandleBox }
+
+function TFPgtkHandleBox.TheGtkObject : PGtkHandleBox;
+begin
+  result := PgtkHandleBox(FGtkObject);
+end;
+
+procedure TFPgtkHandleBox.CreateGtkObject;
+begin
+  FGtkObject := PGtkObject(gtk_handle_box_new);
+end;
+
+
+function TFPgtkHandleBox.GetShadowType : TGtkShadowtype;
+begin
+  result := TheGtkObject^.shadow_type;
+end;
+
+procedure TFPgtkHandleBox.SetShadowType (TheValue:TGtkShadowtype);
+begin
+  gtk_handle_box_set_shadow_type(TheGtkObject,TheValue);
+end;
+
+function TFPgtkHandleBox.GetHandlePosition : TGtkPositionType;
+begin
+  result := TGtkPositionType (gtk.handle_position(TheGtkObject^));
+end;
+
+procedure TFPgtkHandleBox.SetHandlePosition (TheValue:TGtkPositionType);
+begin
+  gtk_handle_box_set_handle_position(TheGtkObject,TheValue);
+end;
+
+function TFPgtkHandleBox.GetSnapEdge : TGtkPositionType;
+begin
+  result := TGtkPositionType (gtk.snap_edge(TheGtkObject^));
+end;
+
+procedure TFPgtkHandleBox.SetSnapEdge (TheValue:TGtkPositionType);
+begin
+  gtk_handle_box_set_snap_edge(TheGtkObject,TheValue);
+end;
+
+function TFPgtkHandleBox.GetChildDetached : boolean;
+begin
+  result := boolean(gtk.child_detached(TheGtkObject^));
+end;
+
+function TFPgtkHandleBox.ConnectChildAttached (proc:TFPgtkWidgetSignalFunction; data:pointer) : guint;
+begin
+  result := WidgetSignalConnect (sgChildAttached, proc, data);
+end;
+
+function TFPgtkHandleBox.ConnectAfterChildAttached (proc:TFPgtkWidgetSignalFunction; data:pointer) : guint;
+begin
+  result := WidgetSignalConnectAfter (sgChildAttached, proc, data);
+end;
+
+function TFPgtkHandleBox.ConnectChildDetached (proc:TFPgtkWidgetSignalFunction; data:pointer) : guint;
+begin
+  result := WidgetSignalConnect (sgChildDetached, proc, data);
+end;
+
+function TFPgtkHandleBox.ConnectAfterChildDetached (proc:TFPgtkWidgetSignalFunction; data:pointer) : guint;
+begin
+  result := WidgetSignalConnectAfter (sgChildDetached, proc, data);
+end;
+
+ { TFPgtkScrolledWindow }
+
+function TFPgtkScrolledWindow.TheGtkObject : PGtkScrolledWindow;
+begin
+  result := PgtkScrolledWindow(FGtkObject);
+end;
+
+
+procedure TFPgtkScrolledWindow.CreateGtkObject;
+var h, v : PgtkAdjustment;
+begin
+  if assigned (FHScroll) then
+    h := PGtkAdjustment(ConvertToGtkObject(FHScroll))
+  else
+    h := null;
+  if assigned (FVScroll) then
+    v := PGtkAdjustment(ConvertToGtkObject(FVScroll))
+  else
+    v := null;
+  FGtkObject := PGtkObject (gtk_scrolled_window_new (h, v));
+end;
+
+constructor TFPgtkScrolledWindow.Create (hadj:TFPgtkAdjustment; vadj:TFPgtkAdjustment);
+begin
+  FVScroll := vadj;
+  FHScroll := hadj;
+  inherited create;
+  setusize (200,170);
+end;
+
+
+function TFPgtkScrolledWindow.GetHPolicy : TGtkPolicyType;
+begin
+  result := gtk.hscrollbar_policy(TheGtkObject^);
+end;
+
+procedure TFPgtkScrolledWindow.SetHPolicy (TheValue:TGtkPolicyType);
+begin
+  gtk_scrolled_window_set_policy (TheGtkObject, TheValue, VPolicy);
+end;
+
+function TFPgtkScrolledWindow.GetVPolicy : TGtkPolicyType;
+begin
+  result := gtk.vscrollbar_policy(TheGtkObject^);
+end;
+
+procedure TFPgtkScrolledWindow.SetVPolicy (TheValue:TGtkPolicyType);
+begin
+  gtk_scrolled_window_set_policy (TheGtkObject, HPolicy, TheValue);
+end;
+
+procedure TFPgtkScrolledWindow.SetPolicy (aHScrollBar:TGtkPolicyType; aVScrollbar:TGtkPolicyType); Overload;
+begin
+  gtk_scrolled_window_set_policy (TheGtkObject, aHScrollBar, aVScrollbar);
+end;
+
+procedure TFPgtkScrolledWindow.SetPolicy (aPolicy:TGtkPolicyType); Overload;
+begin
+  SetPolicy (aPolicy, aPolicy);
+end;
+
+function TFPgtkScrolledWindow.GetHAdjustment : TFPgtkAdjustment;
+begin
+  result := GetPascalInstance(PGtkObject(gtk_scrolled_window_get_hadjustment(TheGtkObject)),tfpgtkadjustment) as tfpgtkadjustment;
+end;
+
+procedure TFPgtkScrolledWindow.SetHAdjustment (TheValue:TFPgtkAdjustment);
+begin
+  gtk_scrolled_window_set_hadjustment(TheGtkObject,PGtkadjustment(ConvertToGtkObject(TheValue)));
+end;
+
+function TFPgtkScrolledWindow.GetVAdjustment : TFPgtkAdjustment;
+begin
+  result := GetPascalInstance(PGtkObject(gtk_scrolled_window_get_vadjustment(TheGtkObject)),tfpgtkadjustment) as tfpgtkadjustment;
+end;
+
+procedure TFPgtkScrolledWindow.SetVAdjustment (TheValue:TFPgtkAdjustment);
+begin
+  gtk_scrolled_window_set_vadjustment(TheGtkObject,PGtkadjustment(ConvertToGtkObject(TheValue)));
+end;
+
+procedure TFPgtkScrolledWindow.AddWithViewport (aChild:TFPgtkWidget);
+begin
+  gtk_scrolled_window_add_with_viewport (TheGtkObject, ConvertToGtkWidget(aChild));
+  TFPgtkViewport.createFromObject (PGtkObject(PGtkBin(TheGtkObject)^.child));
+  aChild.Show;
+end;
+
+function TFPgtkScrolledWindow.GetPlacement : TGtkCornerType;
+begin
+  result := gtk.window_placement(TheGtkObject^);
+end;
+
+procedure TFPgtkScrolledWindow.SetPlacement (TheValue:TGtkCornerType);
+begin
+  gtk_scrolled_window_set_placement(TheGtkObject,TheValue);
+end;
+
+function TFPgtkScrolledWindow.GetHScrollbar : TFPgtkScrollbar;
+var w : TFPgtkObject;
+    gtkwidg : PGtkObject;
+begin
+  gtkwidg := PGtkObject(TheGtkObject^.hscrollbar);
+  w := GetPascalInstance (gtkwidg);
+  if assigned (w) then
+    result := (w as TFPgtkScrollbar)
+  else
+    result := TFPgtkHScrollbar.CreateFromObject (gtkwidg);
+end;
+
+function TFPgtkScrolledWindow.GetVScrollbar : TFPgtkScrollbar;
+var w : TFPgtkObject;
+    gtkwidg : PGtkObject;
+begin
+  gtkwidg := PGtkObject(TheGtkObject^.vscrollbar);
+  w := GetPascalInstance (gtkwidg);
+  if assigned (w) then
+    result := (w as TFPgtkScrollbar)
+  else
+    result := TFPgtkVScrollbar.CreateFromObject (gtkwidg);
+end;
+
+procedure TFPgtkScrolledWindow.UpdatePolicy (UpdPolicy:TGtkUpdateType);
+var sb : TFpgtkScrollbar;
+begin
+  sb := HScrollbar;
+  if assigned(sb) then
+    sb.UpdatePolicy := UpdPolicy;
+  sb := VScrollbar;
+  if assigned(sb) then
+    sb.UpdatePolicy := UpdPolicy;
+end;
+
+ { TFPgtkViewport }
+
+function TFPgtkViewport.TheGtkObject : PGtkViewport;
+begin
+  result := PgtkViewport(FGtkObject);
+end;
+
+
+procedure TFPgtkViewport.CreateGtkObject;
+var h, v : PgtkAdjustment;
+begin
+  if assigned (FHScroll) then
+    h := PGtkAdjustment(ConvertToGtkObject(FHScroll))
+  else
+    h := null;
+  if assigned (FVScroll) then
+    v := PGtkAdjustment(ConvertToGtkObject(FVScroll))
+  else
+    v := null;
+  FGtkObject := PGtkObject (gtk_scrolled_window_new (h, v));
+end;
+
+constructor TFPgtkViewport.Create (hadj:TFPgtkAdjustment; vadj:TFPgtkAdjustment);
+begin
+  FVScroll := vadj;
+  FHScroll := hadj;
+  inherited create;
+end;
+
+
+function TFPgtkViewport.GetHAdjustment : TFPgtkAdjustment;
+begin
+  result := GetPascalInstance(PGtkObject(gtk_viewport_get_hadjustment(TheGtkObject)),tfpgtkadjustment) as tfpgtkadjustment;
+end;
+
+procedure TFPgtkViewport.SetHAdjustment (TheValue:TFPgtkAdjustment);
+begin
+  gtk_viewport_set_hadjustment(TheGtkObject,PGtkadjustment(ConvertToGtkObject(TheValue)));
+end;
+
+function TFPgtkViewport.GetVAdjustment : TFPgtkAdjustment;
+begin
+  result := GetPascalInstance(PGtkObject(gtk_viewport_get_vadjustment(TheGtkObject)),tfpgtkadjustment) as tfpgtkadjustment;
+end;
+
+procedure TFPgtkViewport.SetVAdjustment (TheValue:TFPgtkAdjustment);
+begin
+  gtk_viewport_set_vadjustment(TheGtkObject,PGtkadjustment(ConvertToGtkObject(TheValue)));
+end;
+
+function TFPgtkViewport.GetShadowType : TgtkShadowType;
+begin
+  result := TheGtkObject^.shadow_type;
+end;
+
+procedure TFPgtkViewport.SetShadowType (TheValue:TgtkShadowType);
+begin
+  gtk_viewport_set_shadow_type(TheGtkObject,TheValue);
+end;
+
+ { TFPgtkBox }
+
+function TFPgtkBox.TheGtkObject : PGtkBox;
+begin
+  result := PgtkBox(FGtkObject);
+end;
+
+
+function TFPgtkBox.GetHomogeneous : boolean;
+begin
+  result := boolean(gtk.homogeneous(TheGtkObject^));
+end;
+
+procedure TFPgtkBox.SetHomogeneous (TheValue:boolean);
+begin
+  gtk_Box_set_homogeneous(TheGtkObject,TheValue);
+end;
+
+function TFPgtkBox.GetSpacing : integer;
+begin
+  result := TheGtkObject^.spacing;
+end;
+
+procedure TFPgtkBox.SetSpacing (TheValue:integer);
+begin
+  gtk_Box_set_spacing(TheGtkObject,TheValue);
+end;
+
+procedure TFPgtkBox.ReorderChild (Widget:TFPgtkWidget; Position:integer);
+begin
+  gtk_Box_reorder_child (TheGtkObject, PGtkwidget(ConvertToGtkObject(Widget)), Position);
+end;
+
+procedure TFPgtkBox.GetChildPacking (Widget:TFPgtkWidget; var Expand:boolean; var Fill:boolean; var Padding:integer; var PackType:TGtkPackType);
+var PT : PGtkPackType;
+begin
+  pt := @PackType;
+  gtk_box_query_child_packing (TheGtkObject, ConvertToGtkWidget(Widget), 
+                               @expand, @fill, @padding, pt);
+end;
+
+procedure TFPgtkBox.SetChildPacking (Widget:TFPgtkWidget; Expand:boolean; Fill:boolean; Padding:integer; PackType:TGtkPackType);
+begin
+  gtk_Box_set_child_packing (TheGtkObject, PGtkwidget(ConvertToGtkObject(Widget)), Expand, Fill, Padding, PackType);
+end;
+
+procedure TFPgtkBox.PackStart (Widget:TFPgtkWidget); Overload;
+begin
+  gtk_box_pack_start_defaults (TheGtkObject, ConvertToGtkWidget(Widget));
+  widget.Show;
+end;
+
+procedure TFPgtkBox.PackStart (Widget:TFPgtkWidget; IsVisible:boolean); Overload;
+begin
+  gtk_box_pack_start_defaults (TheGtkObject, ConvertToGtkWidget(Widget));
+  if isvisible then
+    widget.Show;
+end;
+
+procedure TFPgtkBox.PackStart (Widget:TFPgtkWidget; expand:boolean; fill:boolean; padding:integer); Overload;
+begin
+  gtk_box_pack_start (TheGtkObject, ConvertToGtkWidget(Widget), expand, fill, padding);
+  widget.Show;
+end;
+
+procedure TFPgtkBox.PackStart (Widget:TFPgtkWidget; expand:boolean; fill:boolean; padding:integer; IsVisible:boolean); Overload;
+begin
+  gtk_box_pack_start (TheGtkObject, ConvertToGtkWidget(Widget), expand, fill, padding);
+  if isvisible then
+    widget.Show;
+end;
+
+procedure TFPgtkBox.PackEnd (Widget:TFPgtkWidget); Overload;
+begin
+  gtk_box_pack_end_defaults (TheGtkObject, ConvertToGtkWidget(Widget));
+  widget.Show;
+end;
+
+procedure TFPgtkBox.PackEnd (Widget:TFPgtkWidget; IsVisible:boolean); Overload;
+begin
+  gtk_box_pack_end_defaults (TheGtkObject, ConvertToGtkWidget(Widget));
+  if isvisible then
+    widget.Show;
+end;
+
+procedure TFPgtkBox.PackEnd (Widget:TFPgtkWidget; expand:boolean; fill:boolean; padding:integer); Overload;
+begin
+  gtk_box_pack_end (TheGtkObject, ConvertToGtkWidget(Widget), expand, fill, padding);
+  widget.Show;
+end;
+
+procedure TFPgtkBox.PackEnd (Widget:TFPgtkWidget; expand:boolean; fill:boolean; padding:integer; IsVisible:boolean); Overload;
+begin
+  gtk_box_pack_end (TheGtkObject, ConvertToGtkWidget(Widget), expand, fill, padding);
+  if isvisible then
+    widget.Show;
+end;
+
+ { TFPgtkButtonBox }
+
+function TFPgtkButtonBox.TheGtkObject : PGtkButtonBox;
+begin
+  result := PgtkButtonBox(FGtkObject);
+end;
+
+
+procedure SetButtonBoxDefaultSize (aMinWidth:integer; aMinHeight:integer);
+begin
+  gtk_button_box_set_child_size_default (aMinWidth, aMinheight);
+end;
+
+
+procedure GetButtonBoxDefaultSize (var aMinWidth:integer; var aMinHeight:integer);
+begin
+  gtk_button_box_get_child_size_default (@aMinWidth, @aMinheight);
+end;
+
+
+procedure SetButtonBoxDefaultPadding (aIPadX:integer; aIPadY:integer);
+begin
+  gtk_button_box_set_child_size_default (aIPadX, aIPadY);
+end;
+
+
+procedure GetButtonBoxDefaultPadding (var aIPadX:integer; var aIPadY:integer);
+begin
+  gtk_button_box_get_child_size_default (@aIPadX, @aIPadY);
+end;
+
+
+function TFPgtkButtonBox.GetSpacing : integer;
+begin
+  result := gtk_button_box_get_spacing(TheGtkObject);
+end;
+
+procedure TFPgtkButtonBox.SetSpacing (TheValue:integer);
+begin
+  gtk_button_box_set_spacing(TheGtkObject,TheValue);
+end;
+
+function TFPgtkButtonBox.GetLayout : TGtkButtonBoxStyle;
+begin
+  result := gtk_button_box_get_layout(TheGtkObject);
+end;
+
+procedure TFPgtkButtonBox.SetLayout (TheValue:TGtkButtonBoxStyle);
+begin
+  gtk_button_box_set_layout(TheGtkObject,TheValue);
+end;
+
+function TFPgtkButtonBox.GetMinWidth : integer;
+var x, y : integer;
+begin
+  gtk_button_box_get_child_size (TheGtkObject, @x, @y);
+  result := x;
+end;
+
+procedure TFPgtkButtonBox.SetMinWidth (TheValue:integer);
+begin
+  gtk_button_box_set_child_size (TheGtkObject, TheValue, ChildMinHeight);
+end;
+
+function TFPgtkButtonBox.GetMinHeight : integer;
+var x, y : integer;
+begin
+  gtk_button_box_get_child_size (TheGtkObject, @x, @y);
+  result := y;
+end;
+
+procedure TFPgtkButtonBox.SetMinHeight (TheValue:integer);
+begin
+  gtk_button_box_set_child_size (TheGtkObject, ChildMinWidth, TheValue);
+end;
+
+function TFPgtkButtonBox.GetChildPadX : integer;
+var x, y : integer;
+begin
+  gtk_button_box_get_child_ipadding (TheGtkObject, @x, @y);
+  result := x;
+end;
+
+procedure TFPgtkButtonBox.SetChildPadX (TheValue:integer);
+begin
+  gtk_button_box_set_child_ipadding (TheGtkObject, TheValue, ChildPadY);
+end;
+
+function TFPgtkButtonBox.GetChildPadY : integer;
+var x, y : integer;
+begin
+  gtk_button_box_get_child_ipadding (TheGtkObject, @x, @y);
+  result := y;
+end;
+
+procedure TFPgtkButtonBox.SetChildPadY (TheValue:integer);
+begin
+  gtk_button_box_set_child_ipadding (TheGtkObject, ChildPadX, TheValue);
+end;
+
+ { TFPgtkHButtonBox }
+
+function TFPgtkHButtonBox.TheGtkObject : PGtkHButtonBox;
+begin
+  result := PgtkHButtonBox(FGtkObject);
+end;
+
+procedure TFPgtkHButtonBox.CreateGtkObject;
+begin
+  FGtkObject := PGtkObject(gtk_hbutton_box_new);
+end;
+
+
+ { TFPgtkVButtonBox }
+
+function TFPgtkVButtonBox.TheGtkObject : PGtkVButtonBox;
+begin
+  result := PgtkVButtonBox(FGtkObject);
+end;
+
+procedure TFPgtkVButtonBox.CreateGtkObject;
+begin
+  FGtkObject := PGtkObject(gtk_vbutton_box_new);
+end;
+
+
+ { TFPgtkVBox }
+
+function TFPgtkVBox.TheGtkObject : PGtkVBox;
+begin
+  result := PgtkVBox(FGtkObject);
+end;
+
+procedure TFPgtkVBox.CreateGtkObject;
+begin
+  FGtkObject := PGtkObject(gtk_VBox_new (False, 1));
+end;
+
+
+ { TFPgtkColorSelection }
+
+function TFPgtkColorSelection.TheGtkObject : PGtkColorSelection;
+begin
+  result := PgtkColorSelection(FGtkObject);
+end;
+
+procedure TFPgtkColorSelection.CreateGtkObject;
+begin
+  FGtkObject := PGtkObject(gtk_color_selection_new);
+end;
+
+
+function TFPgtkColorSelection.GetUpdatePolicy : TGtkUpdateType;
+begin
+  result := TheGtkObject^.policy;
+end;
+
+procedure TFPgtkColorSelection.SetUpdatePolicy (TheValue:TGtkUpdateType);
+begin
+  gtk_color_selection_set_update_policy(TheGtkObject,TheValue);
+end;
+
+function TFPgtkColorSelection.GetColor : double;
+var c : double;
+begin
+  gtk_color_selection_get_color (TheGtkObject, @c);
+  result := c;
+end;
+
+procedure TFPgtkColorSelection.SetColor (TheValue:double);
+begin
+  gtk_color_selection_set_color (TheGtkObject, @TheValue);
+end;
+
+function TFPgtkColorSelection.GetUseOpacity : longbool;
+begin
+  result := longbool(TheGtkObject^.use_opacity);
+end;
+
+procedure TFPgtkColorSelection.SetUseOpacity (TheValue:longbool);
+begin
+  gtk_color_selection_set_opacity(TheGtkObject,gint(TheValue));
+end;
+
+ { TFPgtkGammaCurve }
+
+function TFPgtkGammaCurve.TheGtkObject : PGtkGammaCurve;
+begin
+  result := PgtkGammaCurve(FGtkObject);
+end;
+
+procedure TFPgtkGammaCurve.CreateGtkObject;
+begin
+  FGtkObject := PGtkObject(gtk_gamma_curve_new);
+end;
+
+
+ { TFPgtkHBox }
+
+function TFPgtkHBox.TheGtkObject : PGtkHBox;
+begin
+  result := PgtkHBox(FGtkObject);
+end;
+
+procedure TFPgtkHBox.CreateGtkObject;
+begin
+  FGtkObject := PGtkObject(gtk_HBox_new (False, 1));
+end;
+
+
+ { TFPgtkCombo }
+
+function TFPgtkCombo.TheGtkObject : PGtkCombo;
+begin
+  result := PgtkCombo(FGtkObject);
+end;
+
+procedure TFPgtkCombo.CreateGtkObject;
+begin
+  FGtkObject := PGtkObject(gtk_combo_new);
+end;
+
+
+function TFPgtkCombo.GetEntry : TFPgtkEntry;
+begin
+  result := GetPascalInstance(PGtkObject(TheGtkObject^.entry), TFPgtkEntry) as tfpgtkentry;
+end;
+
+function TFPgtkCombo.GetList : TFPgtkList;
+begin
+  result := GetPascalInstance(PGtkObject(TheGtkObject^.list), TFPgtkList) as TFPgtkList;
+end;
+
+function TFPgtkCombo.GetButton : TFpGtkButton;
+begin
+  result := GetPascalInstance(PGtkObject(TheGtkObject^.button), TFPgtkButton) as TFPgtkButton;
+end;
+
+function TFPgtkCombo.GetValueInList : longbool;
+begin
+  result := longbool(gtk.value_in_list(TheGtkObject^));
+end;
+
+procedure TFPgtkCombo.SetValueInListProp (TheValue:longbool);
+begin
+  gtk_combo_set_value_in_list (TheGtkObject, gint(TheValue), gint(OkIfEmpty));
+end;
+
+function TFPgtkCombo.GetOkIfEmpty : longbool;
+begin
+  result := longbool(gtk.ok_if_empty(TheGtkObject^));
+end;
+
+procedure TFPgtkCombo.SetOkIfEmpty (TheValue:longbool);
+begin
+  gtk_combo_set_value_in_list (TheGtkObject, gint(ValueInList), gint(TheValue));
+end;
+
+function TFPgtkCombo.GetUseArrows : longbool;
+begin
+  result := longbool(gtk.use_arrows(TheGtkObject^));
+end;
+
+procedure TFPgtkCombo.SetUseArrows (TheValue:longbool);
+begin
+  gtk_combo_set_use_arrows(TheGtkObject,gint(TheValue));
+end;
+
+function TFPgtkCombo.GetUseArrowsAlways : longbool;
+begin
+  result := longbool(gtk.use_arrows_always(TheGtkObject^));
+end;
+
+procedure TFPgtkCombo.SetUseArrowsAlways (TheValue:longbool);
+begin
+  gtk_combo_set_use_arrows_always(TheGtkObject,gint(TheValue));
+end;
+
+function TFPgtkCombo.GetCaseSensitive : longbool;
+begin
+  result := longbool(gtk.case_sensitive(TheGtkObject^));
+end;
+
+procedure TFPgtkCombo.SetCaseSensitive (TheValue:longbool);
+begin
+  gtk_combo_set_case_sensitive(TheGtkObject,gint(TheValue));
+end;
+
+procedure TFPgtkCombo.SetItemString (Item:TFPgtkItem; ItemValue:string);
+begin
+  gtk_combo_set_item_string (TheGtkObject, PGtkitem(ConvertToGtkObject(Item)), ConvertToPgchar(ItemValue));
+end;
+
+procedure TFPgtkCombo.DisableActivate;
+begin
+  gtk_combo_disable_activate (TheGtkObject);
+end;
+
+procedure TFPgtkCombo.SetValueInList (Val:longbool; IsOkIfEmpty:longbool);
+begin
+  gtk_combo_set_value_in_list (TheGtkObject, gint(Val), gint(IsOkIfEmpty));
+end;
+
+ { TFPgtkStatusbar }
+
+function TFPgtkStatusbar.TheGtkObject : PGtkStatusbar;
+begin
+  result := PgtkStatusbar(FGtkObject);
+end;
+
+procedure TFPgtkStatusbar.CreateGtkObject;
+begin
+  FGtkObject := PGtkObject(gtk_statusbar_new);
+end;
+
+
+function TFPgtkStatusbar.GetContextID (ContextDescr:string) : integer;
+begin
+  result := gtk_statusbar_get_context_id (TheGtkObject, ConvertToPgchar(ContextDescr));
+end;
+
+function TFPgtkStatusbar.Push (contextID:integer; text:string) : integer;
+begin
+  result := gtk_statusbar_push (TheGtkObject, contextID, ConvertToPgchar(text));
+end;
+
+procedure TFPgtkStatusbar.Pop (contextID:integer);
+begin
+  gtk_statusbar_pop (TheGtkObject, contextID);
+end;
+
+procedure TFPgtkStatusbar.Remove (contextID:integer; MessageID:integer);
+begin
+  gtk_statusbar_remove (TheGtkObject, contextID, MessageID);
+end;
+
+procedure StatusbarSignalproc (Sender:PGtkobject; contextID:integer; text:pgChar; data:pointer); cdecl;
+var p : TFPgtkStatusbarSignalFunction;
+begin
+with PSignalData(data)^ do
+  begin
+  p := TFPgtkStatusbarSignalFunction (TheSignalProc);
+  p (TheWidget as TFPgtkObject, contextID, text, TheData)
+  end;
+end;
+
+function TFPgtkStatusbar.StatusbarSignalConnect (signal:string; proc:TFPgtkStatusbarSignalFunction; data:pointer) : guint;
+begin
+  result := gtk_signal_connect (FGtkObject, pgChar(signal), gtk_signal_func(@StatusbarSignalproc), ConvertSignalData(TFPgtkSignalFunction(proc), data, true));
+end;
+
+function TFPgtkStatusbar.StatusbarSignalConnectAfter (signal:string; proc:TFPgtkStatusbarSignalFunction; data:pointer) : guint;
+begin
+  result := gtk_signal_connect_After (FGtkObject, pgChar(signal), gtk_signal_func(@StatusbarSignalproc), ConvertSignalData(TFPgtkSignalFunction(proc), data, true));
+end;
+
+function TFPgtkStatusbar.ConnectTextPopped (proc:TFPgtkStatusbarSignalFunction; data:pointer) : guint;
+begin
+  result := StatusbarSignalConnect (sgTextPopped, proc, data);
+end;
+
+function TFPgtkStatusbar.ConnectAfterTextPopped (proc:TFPgtkStatusbarSignalFunction; data:pointer) : guint;
+begin
+  result := StatusbarSignalConnectAfter (sgTextPopped, proc, data);
+end;
+
+function TFPgtkStatusbar.ConnectTextPushed (proc:TFPgtkStatusbarSignalFunction; data:pointer) : guint;
+begin
+  result := StatusbarSignalConnect (sgTextPushed, proc, data);
+end;
+
+function TFPgtkStatusbar.ConnectAfterTextPushed (proc:TFPgtkStatusbarSignalFunction; data:pointer) : guint;
+begin
+  result := StatusbarSignalConnectAfter (sgTextPushed, proc, data);
+end;
+
+ { TFPgtkCList }
+
+function TFPgtkCList.TheGtkObject : PGtkCList;
+begin
+  result := PgtkCList(FGtkObject);
+end;
+
+procedure TFPgtkCList.CreateGtkObject;
+begin
+  FGtkObject := PGtkObject(gtk_clist_new (FColumnCount));
+end;
+
+
+constructor TFPgtkCList.Create (aColumnCount:integer);
+begin
+  FColumnCount := aColumnCount;
+  inherited create;
+end;
+
+
+function TFPgtkCList.GetShadowType : TGtkShadowType;
+begin
+  result := TheGtkObject^.shadow_type;
+end;
+
+procedure TFPgtkCList.SetShadowType (TheValue:TGtkShadowType);
+begin
+  gtk_clist_set_shadow_type(TheGtkObject,TheValue);
+end;
+
+function TFPgtkCList.GetSelectionMode : TGtkSelectionMode;
+begin
+  result := TheGtkObject^.selection_mode;
+end;
+
+procedure TFPgtkCList.SetSelectionMode (TheValue:TGtkSelectionMode);
+begin
+  gtk_clist_set_selection_mode(TheGtkObject,TheValue);
+end;
+
+procedure TFPgtkCList.Freeze;
+begin
+  gtk_clist_freeze (TheGtkObject);
+end;
+
+procedure TFPgtkCList.Thaw;
+begin
+  gtk_clist_thaw (TheGtkObject);
+end;
+
+procedure TFPgtkCList.ShowTitles;
+begin
+  gtk_clist_Column_titles_show (TheGtkObject);
+end;
+
+procedure TFPgtkCList.HideTitles;
+begin
+  gtk_clist_column_titles_hide (TheGtkObject);
+end;
+
+procedure TFPgtkCList.ActiveTitles;
+begin
+  gtk_clist_column_titles_active (TheGtkObject);
+end;
+
+procedure TFPgtkCList.PassiveTitles;
+begin
+  gtk_clist_column_titles_passive (TheGtkObject);
+end;
+
+procedure TFPgtkCList.ActiveTitle (column:integer);
+begin
+  gtk_clist_column_title_active (TheGtkObject, column);
+end;
+
+procedure TFPgtkCList.PassiveTitle (column:integer);
+begin
+  gtk_clist_column_title_passive (TheGtkObject, column);
+end;
+
+function TFPgtkCList.GetColumnTitle (column:integer) : string;
+begin
+  result := gtk_clist_get_column_title(TheGtkObject,column);
+end;
+
+procedure TFPgtkCList.SetColumnTitle (column:integer; TheValue:string);
+begin
+  gtk_clist_set_column_title(TheGtkObject,column,ConvertToPgchar(TheValue));
+end;
+
+function TFPgtkCList.GetColumnWidget (column:integer) : TFPgtkWidget;
+begin
+  result := GetPascalInstance(PGtkObject(gtk_clist_get_column_widget(TheGtkObject,column)),tfpgtkwidget) as tfpgtkwidget;
+end;
+
+procedure TFPgtkCList.SetColumnWidget (column:integer; TheValue:TFPgtkWidget);
+begin
+  gtk_clist_set_column_widget(TheGtkObject,column,PGtkwidget(ConvertToGtkObject(TheValue)));
+end;
+
+procedure TFPgtkCList.SetColumnJustification (column:integer; justification:TGtkJustification);
+begin
+  gtk_clist_set_column_justification (TheGtkObject, column, justification);
+end;
+
+procedure TFPgtkCList.SetColumnVisibility (column:integer; aVisible:boolean);
+begin
+  gtk_clist_set_column_visibility (TheGtkObject, column, aVisible);
+end;
+
+procedure TFPgtkCList.SetColumnResizeable (column:integer; Resizeable:boolean);
+begin
+  gtk_clist_set_column_resizeable (TheGtkObject, column, Resizeable);
+end;
+
+procedure TFPgtkCList.SetColumnAutoResize (column:integer; autoResize:boolean);
+begin
+  gtk_clist_set_column_auto_resize (TheGtkObject, column, autoResize);
+end;
+
+function TFPgtkCList.OptimalColumnWidth (column:integer) : integer;
+begin
+  result := gtk_clist_optimal_column_width (TheGtkObject, column);
+end;
+
+procedure TFPgtkCList.SetColumnWidth (column:integer; width:integer);
+begin
+  gtk_clist_set_column_width (TheGtkObject, column, width);
+end;
+
+procedure TFPgtkCList.SetColumnMinWidth (column:integer; MinWidth:integer);
+begin
+  gtk_clist_set_column_min_width (TheGtkObject, column, MinWidth);
+end;
+
+procedure TFPgtkCList.SetColumnMaxWidth (column:integer; MaxWidth:integer);
+begin
+  gtk_clist_set_column_max_width (TheGtkObject, column, MaxWidth);
+end;
+
+function TFPgtkCList.AutoSizeColumns : integer;
+begin
+  result := gtk_clist_columns_autosize (TheGtkObject);
+end;
+
+procedure TFPgtkCList.ConfigureColumnWidth (column:integer; Width:integer; MinWidth:integer; MaxWidth:integer);
+begin
+  SetColumnWidth (column, Width);
+  SetColumnMaxWidth (column, MaxWidth);
+  SetColumnMinWidth (column, MinWidth);
+end;
+
+procedure TFPgtkCList.ConfigureColumn (column:integer; Justification:TGtkJustification; Visibility:boolean; Resizeable:boolean; AutoSize:boolean);
+begin
+  SetColumnJustification (column, Justification);
+  SetColumnVisibility (column, Visibility);
+  SetColumnResizeable (column, Resizeable);
+  SetColumnAutoResize (column, AutoSize);
+end;
+
+procedure TFPgtkCList.SetRowHeight (height:integer);
+begin
+  gtk_clist_set_row_height (TheGtkObject, height);
+end;
+
+procedure TFPgtkCList.MoveTo (row:integer; column:integer; RowAlign:gfloat; ColAlign:gfloat);
+begin
+  gtk_clist_moveto (TheGtkObject, row, column, RowAlign, ColAlign);
+end;
+
+function TFPgtkCList.RowIsVisible (Row:integer) : TGtkVisibility;
+begin
+  result := gtk_clist_row_is_visible (TheGtkObject, Row);
+end;
+
+function TFPgtkCList.GetCellType (Row:integer; column:integer) : TGtkCellType;
+begin
+  result := gtk_clist_get_cell_type (TheGtkObject, Row, column);
+end;
+
+function TFPgtkCList.GetCellText (Row:integer; Column:integer) : string;
+var s : pgchar;
+    r : integer;
+begin
+  r := gtk_clist_get_text (TheGtkObject, row, column, @s);
+  if (r = 0) then
+    result := ''
+  else
+    result := string(s^);
+end;
+
+procedure TFPgtkCList.SetCellText (Row:integer; Column:integer; TheValue:string);
+begin
+  gtk_clist_set_text(TheGtkObject,Row, Column,ConvertToPgchar(TheValue));
+end;
+
+procedure TFPgtkCList.SetPixmap (row:integer; column:integer; pixmap:PGdkPixmap; mask:PGdkBitmap);
+begin
+  gtk_clist_set_pixmap (TheGtkObject, row, column, pixmap, mask);
+end;
+
+procedure TFPgtkCList.GetPixmap (row:integer; column:integer; var pixmap:PGdkPixmap; var mask:PGdkBitmap);
+begin
+  gtk_clist_get_pixmap (TheGtkObject, row, column, @pixmap, @mask);
+end;
+
+procedure TFPgtkCList.SetPixText (row:integer; column:integer; text:string; spacing:guint8; pixmap:PGdkPixmap; mask:PGdkBitmap);
+begin
+  gtk_clist_set_pixtext (TheGtkObject, row, column, ConvertToPgchar(text), spacing, pixmap, mask);
+end;
+
+procedure TFPgtkCList.GetPixText (row:integer; column:integer; var text:string; var aspacing:guint8; var pixmap:PGdkPixmap; var mask:PGdkBitmap);
+var r : integer;
+    s : PPgchar;
+begin
+  s := nil;
+  r := gtk_clist_get_pixtext (TheGtkObject, row, column, s, @aspacing, @pixmap, @mask);
+  if r = 0 then
+    begin
+    text := '';
+    pixmap := nil;
+    mask := nil;
+    end
+  else
+    text := string (s^);
+end;
+
+procedure TFPgtkCList.SetForeground (row:integer; color:PGdkColor);
+begin
+  gtk_clist_set_foreground (TheGtkObject, row, color);
+end;
+
+procedure TFPgtkCList.SetBackground (row:integer; color:PGdkColor);
+begin
+  gtk_clist_set_background (TheGtkObject, row, color);
+end;
+
+function TFPgtkCList.GetCellStyle (row:integer; column:integer) : PGtkStyle;
+begin
+  result := gtk_clist_get_cell_style(TheGtkObject,row, column);
+end;
+
+procedure TFPgtkCList.SetCellStyle (row:integer; column:integer; TheValue:PGtkStyle);
+begin
+  gtk_clist_set_cell_style(TheGtkObject,row, column,TheValue);
+end;
+
+function TFPgtkCList.GetRowStyle (row:integer) : PGtkStyle;
+begin
+  result := gtk_clist_get_row_style(TheGtkObject,row);
+end;
+
+procedure TFPgtkCList.SetRowStyle (row:integer; TheValue:PGtkStyle);
+begin
+  gtk_clist_set_row_style(TheGtkObject,row,TheValue);
+end;
+
+procedure TFPgtkCList.SetShift (row:integer; column:integer; vertical:integer; horizontal:integer);
+begin
+  gtk_clist_set_shift (TheGtkObject, row, column, vertical, horizontal);
+end;
+
+procedure TFPgtkCList.Remove (row:integer);
+begin
+  gtk_clist_remove (TheGtkObject, row);
+end;
+
+procedure TFPgtkCList.Prepend (Data:TStrings); Overload;
+var ppdata : ppgchar;
+begin
+  ppdata := StringsToPPgchar (Data);
+  gtk_clist_prepend (TheGtkObject, ppdata);
+  freemem (ppdata, sizeof (pgchar) * data.count);
+end;
+
+procedure TFPgtkCList.Prepend (Text:string; separator:string); Overload;
+var l : TStrings;
+    s : string;
+begin
+  l := TStringList.Create;
+  try
+    if pos('"',separator) = 0 then
+      s := stringreplace (Text, '"', '""', [rfReplaceAll]);
+    if separator <> '' then
+      s := stringreplace(Text, separator, '","', [rfReplaceAll]);
+    l.CommaText := '"'+s+'"';
+    Prepend (l);
+  finally
+    l.Free;
+  end;
+end;
+
+procedure TFPgtkCList.Prepend (data:array of string); Overload;
+var ppdata : ppgchar;
+begin
+  ppdata := ArrayToPPgchar (Data);
+  gtk_clist_prepend (TheGtkObject, ppdata);
+  freemem (ppdata, sizeof (pgchar) * (high(data)-low(data)+1));
+end;
+
+procedure TFPgtkCList.Append (data:TStrings); Overload;
+var ppdata : ppgchar;
+begin
+  ppdata := StringsToPPgchar (Data);
+  gtk_clist_append (TheGtkObject, ppdata);
+  freemem (ppdata, sizeof (pgchar) * data.count);
+end;
+
+procedure TFPgtkCList.Append (Text:string; Separator:string); Overload;
+var l : TStrings;
+    s : string;
+begin
+  l := TStringList.Create;
+  try
+    if pos('"',separator) = 0 then
+      s := stringreplace (Text, '"', '""', [rfReplaceAll]);
+    if separator <> '' then
+      s := stringreplace(Text, separator, '","', [rfReplaceAll]);
+    l.CommaText := '"' + s + '"';
+    Append (l);
+  finally
+    l.Free;
+  end;
+end;
+
+procedure TFPgtkCList.Append (data:array of string); Overload;
+var ppdata : ppgchar;
+begin
+  ppdata := ArrayToPPgchar (Data);
+  gtk_clist_append (TheGtkObject, ppdata);
+  freemem (ppdata, sizeof (pgchar) * (high(data)-low(data)+1));
+end;
+
+procedure TFPgtkCList.Insert (row:integer; data:TStrings); Overload;
+var ppdata : ppgchar;
+begin
+  ppdata := StringsToPPgchar (Data);
+  gtk_clist_insert (TheGtkObject, row, ppdata);
+  freemem (ppdata, sizeof (pgchar) * data.count);
+end;
+
+procedure TFPgtkCList.Insert (row:integer; Text:string; Separator:string); Overload;
+var l : TStrings;
+    s : string;
+begin
+  l := TStringList.Create;
+  try
+    if pos('"',separator) = 0 then
+      s := stringreplace (Text, '"', '""', [rfReplaceAll]);
+    if separator <> '' then
+      s := stringreplace(Text, separator, '","', [rfReplaceAll]);
+    l.CommaText := '"' + s + '"';
+    Insert (row, l);
+  finally
+    l.Free;
+  end;
+end;
+
+procedure TFPgtkCList.Insert (row:integer; data:array of string); Overload;
+var ppdata : ppgchar;
+begin
+  ppdata := ArrayToPPgchar (Data);
+  gtk_clist_insert (TheGtkObject, row, ppdata);
+  freemem (ppdata, sizeof (pgchar) * (high(data)-low(data)+1));
+end;
+
+function TFPgtkCList.GetRowData (row:integer) : pointer;
+begin
+  result := gtk_clist_get_row_data(TheGtkObject,row);
+end;
+
+procedure TFPgtkCList.SetRowData (row:integer; TheValue:pointer);
+begin
+  gtk_clist_set_row_data(TheGtkObject,row,TheValue);
+end;
+
+function TFPgtkCList.FindRowFromData (data:pointer) : integer;
+begin
+  result := gtk_clist_find_row_from_data (TheGtkObject, data);
+end;
+
+procedure TFPgtkCList.SelectRow (row:integer; column:integer);
+begin
+  gtk_clist_select_row (TheGtkObject, row, column);
+end;
+
+procedure TFPgtkCList.UnselectRow (row:integer; column:integer);
+begin
+  gtk_clist_unselect_row (TheGtkObject, row, column);
+end;
+
+procedure TFPgtkCList.Clear;
+begin
+  gtk_clist_clear (TheGtkObject);
+end;
+
+procedure TFPgtkCList.SelectAll;
+begin
+  gtk_clist_select_all (TheGtkObject);
+end;
+
+procedure TFPgtkCList.UnselectAll;
+begin
+  gtk_clist_unselect_all (TheGtkObject);
+end;
+
+procedure TFPgtkCList.SwapRows (row1:integer; row2:integer);
+begin
+  gtk_clist_swap_rows (TheGtkObject, row1, row2);
+end;
+
+procedure TFPgtkCList.RowMove (sourceRow:integer; destRow:integer);
+begin
+  if sourceRow = DestRow then
+    Exit;
+  gtk_clist_row_move (TheGtkObject, sourceRow, destRow);
+end;
+
+procedure TFPgtkCList.Sort;
+begin
+  gtk_clist_sort (TheGtkObject);
+end;
+
+procedure TFPgtkCList.SetCompareFunc (TheValue:TGtkCListCompareFunc);
+begin
+  gtk_clist_set_Compare_func(TheGtkObject,TheValue);
+end;
+
+function TFPgtkCList.GetSortColumn : integer;
+begin
+  result := TheGtkObject^.sort_column;
+end;
+
+procedure TFPgtkCList.SetSortColumn (TheValue:integer);
+begin
+  gtk_clist_set_sort_column(TheGtkObject,TheValue);
+end;
+
+function TFPgtkCList.GetSetSortType : TGtkSortType;
+begin
+  result := TheGtkObject^.sort_type;
+end;
+
+procedure TFPgtkCList.SetSetSortType (TheValue:TGtkSortType);
+begin
+  gtk_clist_set_sort_type(TheGtkObject,TheValue);
+end;
+
+procedure TFPgtkCList.SetAutoSort (autoSort:boolean);
+begin
+  gtk_clist_set_auto_sort (TheGtkObject, autoSort);
+end;
+
+function TFPgtkCList.GetHAdjustment : TFPgtkAdjustment;
+begin
+  result := GetPascalInstance(PGtkObject(gtk_clist_get_hadjustment(TheGtkObject)),tfpgtkadjustment) as tfpgtkadjustment;
+end;
+
+procedure TFPgtkCList.SetHAdjustment (TheValue:TFPgtkAdjustment);
+begin
+  gtk_clist_set_hadjustment(TheGtkObject,PGtkadjustment(ConvertToGtkObject(TheValue)));
+end;
+
+function TFPgtkCList.GetVAdjustment : TFPgtkAdjustment;
+begin
+  result := GetPascalInstance(PGtkObject(gtk_clist_get_vadjustment(TheGtkObject)),tfpgtkadjustment) as tfpgtkadjustment;
+end;
+
+procedure TFPgtkCList.SetVAdjustment (TheValue:TFPgtkAdjustment);
+begin
+  gtk_clist_set_vadjustment(TheGtkObject,PGtkadjustment(ConvertToGtkObject(TheValue)));
+end;
+
+procedure TFPgtkCList.SetReorderable (reorderable:boolean);
+begin
+  gtk_clist_set_reorderable (TheGtkObject, reorderable);
+end;
+
+function TFPgtkCList.Count : integer;
+begin
+  result := TheGtkObject^.rows;
+end;
+
+procedure CListScrollSignalproc (Sender:PGtkobject; ScrollType:TgtkScrollType; position:gfloat; data:pointer); cdecl;
+var p : TFPgtkCListScrollSignalFunction;
+begin
+with PSignalData(data)^ do
+  begin
+  p := TFPgtkCListScrollSignalFunction (TheSignalProc);
+  p (TheWidget as TFPgtkObject, ScrollType, position, TheData)
+  end;
+end;
+
+function TFPgtkCList.CListScrollSignalConnect (signal:string; proc:TFPgtkCListScrollSignalFunction; data:pointer) : guint;
+begin
+  result := gtk_signal_connect (FGtkObject, pgChar(signal), gtk_signal_func(@CListScrollSignalproc), ConvertSignalData(TFPgtkSignalFunction(proc), data, true));
+end;
+
+function TFPgtkCList.CListScrollSignalConnectAfter (signal:string; proc:TFPgtkCListScrollSignalFunction; data:pointer) : guint;
+begin
+  result := gtk_signal_connect_After (FGtkObject, pgChar(signal), gtk_signal_func(@CListScrollSignalproc), ConvertSignalData(TFPgtkSignalFunction(proc), data, true));
+end;
+
+procedure CListScrollBooleanSignalproc (Sender:PGtkobject; ScrollType:TgtkScrollType; Position:gfloat; AutoStartSelection:boolean; data:pointer); cdecl;
+var p : TFPgtkCListScrollBooleanSignalFunction;
+begin
+with PSignalData(data)^ do
+  begin
+  p := TFPgtkCListScrollBooleanSignalFunction (TheSignalProc);
+  p (TheWidget as TFPgtkObject, ScrollType, Position, AutoStartSelection, TheData)
+  end;
+end;
+
+function TFPgtkCList.CListScrollBooleanSignalConnect (signal:string; proc:TFPgtkCListScrollBooleanSignalFunction; data:pointer) : guint;
+begin
+  result := gtk_signal_connect (FGtkObject, pgChar(signal), gtk_signal_func(@CListScrollBooleanSignalproc), ConvertSignalData(TFPgtkSignalFunction(proc), data, true));
+end;
+
+function TFPgtkCList.CListScrollBooleanSignalConnectAfter (signal:string; proc:TFPgtkCListScrollBooleanSignalFunction; data:pointer) : guint;
+begin
+  result := gtk_signal_connect_After (FGtkObject, pgChar(signal), gtk_signal_func(@CListScrollBooleanSignalproc), ConvertSignalData(TFPgtkSignalFunction(proc), data, true));
+end;
+
+procedure SelectRowSignalproc (Sender:PGtkobject; row:integer; column:integer; event:PGdkEventButton; data:pointer); cdecl;
+var p : TFPgtkSelectRowSignalFunction;
+begin
+with PSignalData(data)^ do
+  begin
+  p := TFPgtkSelectRowSignalFunction (TheSignalProc);
+  p (TheWidget as TFPgtkObject, row, column, event, TheData)
+  end;
+end;
+
+function TFPgtkCList.SelectRowSignalConnect (signal:string; proc:TFPgtkSelectRowSignalFunction; data:pointer) : guint;
+begin
+  result := gtk_signal_connect (FGtkObject, pgChar(signal), gtk_signal_func(@SelectRowSignalproc), ConvertSignalData(TFPgtkSignalFunction(proc), data, true));
+end;
+
+function TFPgtkCList.SelectRowSignalConnectAfter (signal:string; proc:TFPgtkSelectRowSignalFunction; data:pointer) : guint;
+begin
+  result := gtk_signal_connect_After (FGtkObject, pgChar(signal), gtk_signal_func(@SelectRowSignalproc), ConvertSignalData(TFPgtkSignalFunction(proc), data, true));
+end;
+
+function TFPgtkCList.ConnectSelectRow (proc:TFPgtkSelectRowSignalFunction; data:pointer) : guint;
+begin
+  result := SelectRowSignalConnect (sgSelectRow, proc, data);
+end;
+
+function TFPgtkCList.ConnectAfterSelectRow (proc:TFPgtkSelectRowSignalFunction; data:pointer) : guint;
+begin
+  result := SelectRowSignalConnectAfter (sgSelectRow, proc, data);
+end;
+
+function TFPgtkCList.ConnectUnselectRow (proc:TFPgtkSelectRowSignalFunction; data:pointer) : guint;
+begin
+  result := SelectRowSignalConnect (sgUnselectRow, proc, data);
+end;
+
+function TFPgtkCList.ConnectAfterUnselectRow (proc:TFPgtkSelectRowSignalFunction; data:pointer) : guint;
+begin
+  result := SelectRowSignalConnectAfter (sgUnselectRow, proc, data);
+end;
+
+procedure MoveSignalproc (Sender:PGtkobject; arg1:integer; arg2:integer; data:pointer); cdecl;
+var p : TFPgtkMoveSignalFunction;
+begin
+with PSignalData(data)^ do
+  begin
+  p := TFPgtkMoveSignalFunction (TheSignalProc);
+  p (TheWidget as TFPgtkObject, arg1, arg2, TheData)
+  end;
+end;
+
+function TFPgtkCList.MoveSignalConnect (signal:string; proc:TFPgtkMoveSignalFunction; data:pointer) : guint;
+begin
+  result := gtk_signal_connect (FGtkObject, pgChar(signal), gtk_signal_func(@MoveSignalproc), ConvertSignalData(TFPgtkSignalFunction(proc), data, true));
+end;
+
+function TFPgtkCList.MoveSignalConnectAfter (signal:string; proc:TFPgtkMoveSignalFunction; data:pointer) : guint;
+begin
+  result := gtk_signal_connect_After (FGtkObject, pgChar(signal), gtk_signal_func(@MoveSignalproc), ConvertSignalData(TFPgtkSignalFunction(proc), data, true));
+end;
+
+function TFPgtkCList.ConnectRowMove (proc:TFPgtkMoveSignalFunction; data:pointer) : guint;
+begin
+  result := MoveSignalConnect (sgRowMove, proc, data);
+end;
+
+function TFPgtkCList.ConnectAfterRowMove (proc:TFPgtkMoveSignalFunction; data:pointer) : guint;
+begin
+  result := MoveSignalConnectAfter (sgRowMove, proc, data);
+end;
+
+function TFPgtkCList.ConnectScrollVertical (proc:TFPgtkCListScrollSignalFunction; data:pointer) : guint;
+begin
+  result := CListScrollSignalConnect (sgScrollVertical, proc, data);
+end;
+
+function TFPgtkCList.ConnectAfterScrollVertical (proc:TFPgtkCListScrollSignalFunction; data:pointer) : guint;
+begin
+  result := CListScrollSignalConnectAfter (sgScrollVertical, proc, data);
+end;
+
+function TFPgtkCList.ConnectScrolHorizontal (proc:TFPgtkCListScrollSignalFunction; data:pointer) : guint;
+begin
+  result := CListScrollSignalConnect (sgScrolHorizontal, proc, data);
+end;
+
+function TFPgtkCList.ConnectAfterScrolHorizontal (proc:TFPgtkCListScrollSignalFunction; data:pointer) : guint;
+begin
+  result := CListScrollSignalConnectAfter (sgScrolHorizontal, proc, data);
+end;
+
+function TFPgtkCList.ConnectToggleFocusRow (proc:TFPgtkSignalFunction; data:pointer) : guint;
+begin
+  result := SignalConnect (sgToggleFocusRow, proc, data);
+end;
+
+function TFPgtkCList.ConnectAfterToggleFocusRow (proc:TFPgtkSignalFunction; data:pointer) : guint;
+begin
+  result := SignalConnectAfter (sgToggleFocusRow, proc, data);
+end;
+
+function TFPgtkCList.ConnectSelectAll (proc:TFPgtkSignalFunction; data:pointer) : guint;
+begin
+  result := SignalConnect (sgSelectAll, proc, data);
+end;
+
+function TFPgtkCList.ConnectAfterSelectAll (proc:TFPgtkSignalFunction; data:pointer) : guint;
+begin
+  result := SignalConnectAfter (sgSelectAll, proc, data);
+end;
+
+function TFPgtkCList.ConnectUnselectAll (proc:TFPgtksignalFunction; data:pointer) : guint;
+begin
+  result := signalConnect (sgUnselectAll, proc, data);
+end;
+
+function TFPgtkCList.ConnectAfterUnselectAll (proc:TFPgtksignalFunction; data:pointer) : guint;
+begin
+  result := signalConnectAfter (sgUnselectAll, proc, data);
+end;
+
+function TFPgtkCList.ConnectUndoSelection (proc:TFPgtksignalFunction; data:pointer) : guint;
+begin
+  result := signalConnect (sgUndoSelection, proc, data);
+end;
+
+function TFPgtkCList.ConnectAfterUndoSelection (proc:TFPgtksignalFunction; data:pointer) : guint;
+begin
+  result := signalConnectAfter (sgUndoSelection, proc, data);
+end;
+
+function TFPgtkCList.ConnectStartSelection (proc:TFPgtksignalFunction; data:pointer) : guint;
+begin
+  result := signalConnect (sgStartSelection, proc, data);
+end;
+
+function TFPgtkCList.ConnectAfterStartSelection (proc:TFPgtksignalFunction; data:pointer) : guint;
+begin
+  result := signalConnectAfter (sgStartSelection, proc, data);
+end;
+
+function TFPgtkCList.ConnectEndSelection (proc:TFPgtksignalFunction; data:pointer) : guint;
+begin
+  result := signalConnect (sgEndSelection, proc, data);
+end;
+
+function TFPgtkCList.ConnectAfterEndSelection (proc:TFPgtksignalFunction; data:pointer) : guint;
+begin
+  result := signalConnectAfter (sgEndSelection, proc, data);
+end;
+
+function TFPgtkCList.ConnectToggleAddMode (proc:TFPgtksignalFunction; data:pointer) : guint;
+begin
+  result := signalConnect (sgToggleAddMode, proc, data);
+end;
+
+function TFPgtkCList.ConnectAfterToggleAddMode (proc:TFPgtksignalFunction; data:pointer) : guint;
+begin
+  result := signalConnectAfter (sgToggleAddMode, proc, data);
+end;
+
+function TFPgtkCList.ConnectAbortColumnResize (proc:TFPgtksignalFunction; data:pointer) : guint;
+begin
+  result := signalConnect (sgAbortColumnResize, proc, data);
+end;
+
+function TFPgtkCList.ConnectAfterAbortColumnResize (proc:TFPgtksignalFunction; data:pointer) : guint;
+begin
+  result := signalConnectAfter (sgAbortColumnResize, proc, data);
+end;
+
+function TFPgtkCList.ConnectExtendSelection (proc:TFPgtkCListScrollBooleanSignalFunction; data:pointer) : guint;
+begin
+  result := CListScrollBooleanSignalConnect (sgExtendSelection, proc, data);
+end;
+
+function TFPgtkCList.ConnectAfterExtendSelection (proc:TFPgtkCListScrollBooleanSignalFunction; data:pointer) : guint;
+begin
+  result := CListScrollBooleanSignalConnectAfter (sgExtendSelection, proc, data);
+end;
+
+procedure ColumnClickedSignalproc (Sender:PGtkobject; column:integer; data:pointer); cdecl;
+var p : TFPgtkColumnClickedSignalFunction;
+begin
+with PSignalData(data)^ do
+  begin
+  p := TFPgtkColumnClickedSignalFunction (TheSignalProc);
+  p (TheWidget as TFPgtkObject, column, TheData)
+  end;
+end;
+
+function TFPgtkCList.ColumnClickedSignalConnect (signal:string; proc:TFPgtkColumnClickedSignalFunction; data:pointer) : guint;
+begin
+  result := gtk_signal_connect (FGtkObject, pgChar(signal), gtk_signal_func(@ColumnClickedSignalproc), ConvertSignalData(TFPgtkSignalFunction(proc), data, true));
+end;
+
+function TFPgtkCList.ColumnClickedSignalConnectAfter (signal:string; proc:TFPgtkColumnClickedSignalFunction; data:pointer) : guint;
+begin
+  result := gtk_signal_connect_After (FGtkObject, pgChar(signal), gtk_signal_func(@ColumnClickedSignalproc), ConvertSignalData(TFPgtkSignalFunction(proc), data, true));
+end;
+
+function TFPgtkCList.ConnectClickColumn (proc:TFPgtkColumnClickedSignalFunction; data:pointer) : guint;
+begin
+  result := ColumnClickedSignalConnect (sgClickColumn, proc, data);
+end;
+
+function TFPgtkCList.ConnectAfterClickColumn (proc:TFPgtkColumnClickedSignalFunction; data:pointer) : guint;
+begin
+  result := ColumnClickedSignalConnectAfter (sgClickColumn, proc, data);
+end;
+
+procedure ResizeColumnSignalproc (Sender:PGtkobject; column:integer; width:integer; data:pointer); cdecl;
+var p : TFPgtkResizeColumnSignalFunction;
+begin
+with PSignalData(data)^ do
+  begin
+  p := TFPgtkResizeColumnSignalFunction (TheSignalProc);
+  p (TheWidget as TFPgtkObject, column, width, TheData)
+  end;
+end;
+
+function TFPgtkCList.ResizeColumnSignalConnect (signal:string; proc:TFPgtkResizeColumnSignalFunction; data:pointer) : guint;
+begin
+  result := gtk_signal_connect (FGtkObject, pgChar(signal), gtk_signal_func(@ResizeColumnSignalproc), ConvertSignalData(TFPgtkSignalFunction(proc), data, true));
+end;
+
+function TFPgtkCList.ResizeColumnSignalConnectAfter (signal:string; proc:TFPgtkResizeColumnSignalFunction; data:pointer) : guint;
+begin
+  result := gtk_signal_connect_After (FGtkObject, pgChar(signal), gtk_signal_func(@ResizeColumnSignalproc), ConvertSignalData(TFPgtkSignalFunction(proc), data, true));
+end;
+
+function TFPgtkCList.ConnectResizeColumn (proc:TFPgtkResizeColumnSignalFunction; data:pointer) : guint;
+begin
+  result := ResizeColumnSignalConnect (sgResizeColumn, proc, data);
+end;
+
+function TFPgtkCList.ConnectAfterResizeColumn (proc:TFPgtkResizeColumnSignalFunction; data:pointer) : guint;
+begin
+  result := ResizeColumnSignalConnectAfter (sgResizeColumn, proc, data);
+end;
+
+ { TFPgtkCTree }
+
+function TFPgtkCTree.TheGtkObject : PGtkCTree;
+begin
+  result := PgtkCTree(FGtkObject);
+end;
+
+
+function TFPgtkCTree.GetLineStyle : TGtkCTreeLineStyle;
+begin
+  result := TGtkCTreeLineStyle(gtk.line_style(TheGtkObject^));
+end;
+
+procedure TFPgtkCTree.SetLineStyle (TheValue:TGtkCTreeLineStyle);
+begin
+  gtk_ctree_set_line_style(TheGtkObject,TheValue);
+end;
+
+function TFPgtkCTree.GetShowStub : boolean;
+begin
+  result := boolean(gtk.show_stub(TheGtkObject^));
+end;
+
+procedure TFPgtkCTree.SetShowStub (TheValue:boolean);
+begin
+  gtk_ctree_set_show_stub(TheGtkObject,TheValue);
+end;
+
+function TFPgtkCTree.GetExpanderStyle : TGtkCTreeExpanderStyle;
+begin
+  result := TGtkCTreeExpanderStyle(gtk.expander_style(TheGtkObject^));
+end;
+
+procedure TFPgtkCTree.SetExpanderStyle (TheValue:TGtkCTreeExpanderStyle);
+begin
+  gtk_ctree_set_expander_style(TheGtkObject,TheValue);
+end;
+
+function TFPgtkCTree.GetSpacing : guint;
+begin
+  result := TheGtkObject^.tree_spacing;
+end;
+
+procedure TFPgtkCTree.SetSpacing (TheValue:guint);
+begin
+  gtk_ctree_set_spacing(TheGtkObject,TheValue);
+end;
+
+function TFPgtkCTree.GetIndent : guint;
+begin
+  result := TheGtkObject^.tree_indent;
+end;
+
+procedure TFPgtkCTree.SetIndent (TheValue:guint);
+begin
+  gtk_ctree_set_indent(TheGtkObject,TheValue);
+end;
+
+function TFPgtkCTree.GetTreeColumn : integer;
+begin
+  result := TheGtkObject^.tree_column;
+end;
+
+constructor TFPgtkCTree.Create (aColumnCount:integer; aTreeColumn:integer);
+begin
+  FTreeColumn := aTreeColumn;
+  inherited Create (aColumnCount);
+end;
+
+
+procedure TFPgtkCTree.RemoveNode (node:PGtkCTreeNode);
+begin
+  gtk_ctree_remove_node (TheGtkObject, node);
+end;
+
+function TFPgtkCTree.InsertNode (aParent:PGtkCTreeNode; Sibling:PGtkCTreeNode; data:string; aSpacing:guint8; PixmapClosed:PGdkPixmap; MaskClosed:PGdkBitmap; PixmapOpened:PGdkPixmap; MaskOpened:PGdkBitmap; IsLeaf:boolean; Expanded:boolean) : PGtkCTreeNode; Overload;
+begin
+  result := gtk_ctree_insert_node (TheGtkObject, aParent, Sibling, ConvertToPgchar(data), aSpacing, PixmapClosed, MaskClosed, PixmapOpened, MaskOpened, IsLeaf, Expanded);
+end;
+
+function TFPgtkCTree.InsertNode (aParent:PGtkCTreeNode; Sibling:PGtkCTreeNode; data:string; aSpacing:guint8; IsLeaf:boolean; Expanded:boolean) : PGtkCTreeNode; Overload;
+begin
+  result := InsertNode (aParent, Sibling, data, aSpacing, nil, nil, nil, nil, IsLeaf, Expanded);
+end;
+
+procedure FPgtkCTreeFunc (Tree:PGtkCTree; Node:PGtkCTreeNode; data:pointer); Cdecl;
+var p : TFPgtkCTreeFunction;
+begin
+  with PSignalData(data)^ do
+  begin
+    p := TFPgtkCTreeFunction (TheSignalProc);
+    p (TFPgtkCTree(GetPascalInstance(PgtkObject(Tree))), Node, data);
+  end;
+end;
+
+
+procedure TFPgtkCTree.PostRecursive (aNode:PGtkCTreeNode; func:TFPgtkCTreeFunction; data:pointer);
+begin
+  gtk_CTree_post_recursive (TheGtkObject, aNode, @FPgtkCTreeFunc, 
+        ConvertSignalData(TFPgtkSignalFunction(func), data, true));
+end;
+
+procedure TFPgtkCTree.PostRecursiveToDepth (aNode:PGtkCTreeNode; aDepth:integer; func:TFPgtkCTreeFunction; data:pointer);
+begin
+  gtk_CTree_post_recursive_to_depth (TheGtkObject, aNode, aDepth, @FPgtkCTreeFunc, 
+        ConvertSignalData(TFPgtkSignalFunction(func), data, true));
+end;
+
+procedure TFPgtkCTree.PreRecursive (aNode:PGtkCTreeNode; func:TFPgtkCTreeFunction; data:pointer);
+begin
+  gtk_CTree_pre_recursive (TheGtkObject, aNode, @FPgtkCTreeFunc, 
+        ConvertSignalData(TFPgtkSignalFunction(func), data, true));
+end;
+
+procedure TFPgtkCTree.PreRecursiveToDepth (aNode:PGtkCTreeNode; aDepth:integer; func:TFPgtkCTreeFunction; data:pointer);
+begin
+  gtk_CTree_pre_recursive_to_depth (TheGtkObject, aNode, aDepth, @FPgtkCTreeFunc, 
+        ConvertSignalData(TFPgtkSignalFunction(func), data, true));
+end;
+
+procedure TFPgtkCTree.IsViewable (aNode:PGtkCTreeNode);
+begin
+  gtk_ctree_is_viewable (TheGtkObject, aNode);
+end;
+
+procedure TFPgtkCTree.LastChild (aNode:PGtkCTreeNode);
+begin
+  gtk_ctree_last (TheGtkObject, aNode);
+end;
+
+function TFPgtkCTree.IsChild (anAncestor:PGtkCTreeNode; aChild:PGtkCTreeNode) : boolean;
+begin
+  result := gtk_ctree_find (TheGtkObject, anAncestor, aChild);
+end;
+
+function TFPgtkCTree.IsAncestor (anAncestor:PGtkCTreeNode; aChild:PGtkCTreeNode) : boolean;
+begin
+  result := gtk_ctree_is_ancestor (TheGtkObject, anAncestor, aChild);
+end;
+
+function TFPgtkCTree.IsHotSpot (X:integer; Y:integer) : boolean;
+begin
+  result := gtk_ctree_is_hot_spot (TheGtkObject, X, Y);
+end;
+
+procedure TFPgtkCTree.MoveNode (aNode:PGtkCTreeNode; NewParent:PGtkCTreeNode; NewSibling:PGtkCTreeNode);
+begin
+  gtk_ctree_move (TheGtkObject, aNode, NewParent, NewSibling);
+end;
+
+procedure TFPgtkCTree.Expand (aNode:PGtkCTreeNode);
+begin
+  gtk_ctree_expand (TheGtkObject, aNode);
+end;
+
+procedure TFPgtkCTree.ExpandRecursive (aNode:PGtkCTreeNode);
+begin
+  gtk_ctree_expand_recursive (TheGtkObject, aNode);
+end;
+
+procedure TFPgtkCTree.ExpandToDepth (aNode:PGtkCTreeNode; aDepth:integer);
+begin
+  gtk_ctree_expand_to_depth (TheGtkObject, aNode, aDepth);
+end;
+
+procedure TFPgtkCTree.Collapse (aNode:PGtkCTreeNode);
+begin
+  gtk_ctree_collapse (TheGtkObject, aNode);
+end;
+
+procedure TFPgtkCTree.CollapseRecursive (aNode:PGtkCTreeNode);
+begin
+  gtk_ctree_collapse_recursive (TheGtkObject, aNode);
+end;
+
+procedure TFPgtkCTree.CollapseToDepth (aNode:PGtkCTreeNode; aDepth:integer);
+begin
+  gtk_ctree_collapse_to_depth (TheGtkObject, aNode, aDepth);
+end;
+
+procedure TFPgtkCTree.SelectNode (aNode:PGtkCTreeNode);
+begin
+  gtk_ctree_select (TheGtkObject, aNode);
+end;
+
+procedure TFPgtkCTree.SelectRecursive (aNode:PGtkCTreeNode);
+begin
+  gtk_ctree_select_recursive (TheGtkObject, aNode);
+end;
+
+procedure TFPgtkCTree.UnselectNode (aNode:PGtkCTreeNode);
+begin
+  gtk_ctree_unselect (TheGtkObject, aNode);
+end;
+
+procedure TFPgtkCTree.UnselectRecursive (aNode:PGtkCTreeNode);
+begin
+  gtk_ctree_unselect_recursive (TheGtkObject, aNode);
+end;
+
+procedure TFPgtkCTree.RealSelectRecursive (aNode:PGtkCTreeNode; aState:boolean);
+begin
+  gtk_ctree_real_select_recursive (TheGtkObject, aNode, ord(aState));
+end;
+
+function TFPgtkCTree.NodeGetCellType (Node:PGtkCTreeNode; column:integer) : TGtkCellType;
+begin
+  result := gtk_ctree_node_get_cell_type (TheGtkObject, Node, column);
+end;
+
+function TFPgtkCTree.GetNodeCellText (Node:PGtkCTreeNode; Column:integer) : string;
+var s : pgchar;
+    r : integer;
+begin
+  r := gtk_ctree_node_get_text (TheGtkObject, node, column, @s);
+  if (r = 0) then
+    result := ''
+  else
+    result := string(s^);
+end;
+
+procedure TFPgtkCTree.SetNodeCellText (Node:PGtkCTreeNode; Column:integer; TheValue:string);
+begin
+  gtk_ctree_node_set_text(TheGtkObject,Node, Column,ConvertToPgchar(TheValue));
+end;
+
+procedure TFPgtkCTree.NodeSetPixmap (Node:PGtkCTreeNode; column:integer; pixmap:PGdkPixmap; mask:PGdkBitmap);
+begin
+  gtk_ctree_node_set_pixmap (TheGtkObject, Node, column, pixmap, mask);
+end;
+
+procedure TFPgtkCTree.NodeGetPixmap (Node:PGtkCTreeNode; column:integer; var pixmap:PGdkPixmap; var mask:PGdkBitmap);
+begin
+  gtk_ctree_node_get_pixmap (TheGtkObject, node, column, @pixmap, @mask);
+end;
+
+procedure TFPgtkCTree.NodeSetPixText (Node:PGtkCTreeNode; column:integer; text:string; aspacing:guint8; pixmap:PGdkPixmap; mask:PGdkBitmap);
+begin
+  gtk_ctree_node_set_pixtext (TheGtkObject, Node, column, ConvertToPgchar(text), aspacing, pixmap, mask);
+end;
+
+procedure TFPgtkCTree.NodeGetPixText (Node:PGtkCTreeNode; column:integer; var text:string; var aspacing:guint8; var pixmap:PGdkPixmap; var mask:PGdkBitmap);
+var r : integer;
+    s : PPgchar;
+begin
+  s := nil;
+  r := gtk_ctree_node_get_pixtext (TheGtkObject, node, column, s, @aspacing, @pixmap, @mask);
+  if r = 0 then
+    begin
+    text := '';
+    pixmap := nil;
+    mask := nil;
+    end
+  else
+    text := string (s^);
+end;
+
+procedure TFPgtkCTree.SetNodeInfo (aNode:PGtkCTreeNode; aText:string; aSpacing:guint8; PixmapClosed:PGdkPixmap; MaskClosed:PGdkBitmap; PixmapOpened:PGdkPixmap; MaskOpened:PGdkBitmap; IsLeaf:boolean; Expanded:boolean); Overload;
+begin
+  gtk_ctree_set_node_info (TheGtkObject, aNode, ConvertToPgchar(aText), aSpacing, PixmapClosed, MaskClosed, PixmapOpened, MaskOpened, IsLeaf, Expanded);
+end;
+
+procedure TFPgtkCTree.GetNodeInfo (aNode:PGtkCTreeNode; var aText:string; var aSpacing:guint8; var PixmapClosed:PGdkPixmap; var MaskClosed:PGdkBitmap; var PixmapOpened:PGdkPixmap; var MaskOpened:PGdkBitmap; var IsLeaf:boolean; var Expanded:boolean); Overload;
+var r : integer;
+    s : PPgchar;
+begin
+  s := nil;
+  r := gtk_ctree_get_node_info (TheGtkObject, aNode, s, 
+      @aspacing, @pixmapClosed, @maskClosed, @pixmapOpened, @maskOpened,
+      @IsLeaf, @expanded);
+  if r = 0 then
+    begin
+    atext := '';
+    Spacing := 0;
+    pixmapClosed := nil;
+    maskClosed := nil;
+    pixmapOpened := nil;
+    maskOpened := nil;
+    IsLeaf := false;
+    Expanded := false;
+    end
+  else
+    atext := string (s^);
+end;
+
+procedure TFPgtkCTree.NodeSetShift (Node:PGtkCTreeNode; column:integer; vertical:integer; horizontal:integer);
+begin
+  gtk_ctree_node_set_shift (TheGtkObject, Node, column, vertical, horizontal);
+end;
+
+function TFPgtkCTree.GetNodeSelectable (Node:PGtkCTreeNode) : boolean;
+begin
+  result := gtk_ctree_node_get_selectable(TheGtkObject,Node);
+end;
+
+procedure TFPgtkCTree.SetNodeSelectable (Node:PGtkCTreeNode; TheValue:boolean);
+begin
+  gtk_ctree_node_set_selectable(TheGtkObject,Node,TheValue);
+end;
+
+procedure TFPgtkCTree.NodeSetForeground (Node:PGtkCTreeNode; color:PGdkColor);
+begin
+  gtk_ctree_node_set_foreground (TheGtkObject, Node, color);
+end;
+
+procedure TFPgtkCTree.NodeSetBackground (Node:PGtkCTreeNode; color:PGdkColor);
+begin
+  gtk_ctree_node_set_background (TheGtkObject, Node, color);
+end;
+
+function TFPgtkCTree.GetNodeCellStyle (Node:PGtkCTreeNode; column:integer) : PGtkStyle;
+begin
+  result := gtk_ctree_node_get_cell_style(TheGtkObject,Node, column);
+end;
+
+procedure TFPgtkCTree.SetNodeCellStyle (Node:PGtkCTreeNode; column:integer; TheValue:PGtkStyle);
+begin
+  gtk_ctree_node_set_cell_style(TheGtkObject,Node, column,TheValue);
+end;
+
+function TFPgtkCTree.GetNodeRowStyle (Node:PGtkCTreeNode) : PGtkStyle;
+begin
+  result := gtk_ctree_node_get_row_style(TheGtkObject,Node);
+end;
+
+procedure TFPgtkCTree.SetNodeRowStyle (Node:PGtkCTreeNode; TheValue:PGtkStyle);
+begin
+  gtk_ctree_node_set_row_style(TheGtkObject,Node,TheValue);
+end;
+
+function TFPgtkCTree.GetNodeData (Node:PGtkCTreeNode) : pointer;
+begin
+  result := gtk_ctree_node_get_row_data(TheGtkObject,Node);
+end;
+
+procedure TFPgtkCTree.SetNodeData (Node:PGtkCTreeNode; TheValue:pointer);
+begin
+  gtk_ctree_node_set_row_data(TheGtkObject,Node,TheValue);
+end;
+
+procedure TFPgtkCTree.NodeMoveTo (aNode:PGtkCTreeNode; column:integer; RowAlign:gfloat; ColAlign:gfloat);
+begin
+  gtk_ctree_node_moveto (TheGtkObject, aNode, column, RowAlign, ColAlign);
+end;
+
+function TFPgtkCTree.IsVisible (aNode:PGtkCTreeNode) : TGtkVisibility;
+begin
+  result := gtk_ctree_node_is_visible (TheGtkObject, aNode);
+end;
+
+function TFPgtkCTree.GetCompareDragFunc : TGtkCTreeCompareDragFunc;
+begin
+  result := TheGtkObject^.drag_compare;
+end;
+
+procedure TFPgtkCTree.SetCompareDragFunc (TheValue:TGtkCTreeCompareDragFunc);
+begin
+  gtk_ctree_set_drag_compare_func(TheGtkObject,TheValue);
+end;
+
+procedure TFPgtkCTree.SortNode (aNode:PGtkCTreeNode);
+begin
+  gtk_ctree_sort_node (TheGtkObject, aNode);
+end;
+
+procedure TFPgtkCTree.SortRecursive (aNode:PGtkCTreeNode);
+begin
+  gtk_ctree_sort_recursive (TheGtkObject, aNode);
+end;
+
+function TFPgtkCTree.NthNode (Row:integer) : PGtkCTreeNode;
+begin
+  result := gtk_ctree_node_Nth (TheGtkObject, Row);
+end;
+
+ { TFPgtkFixed }
+
+function TFPgtkFixed.TheGtkObject : PGtkFixed;
+begin
+  result := PgtkFixed(FGtkObject);
+end;
+
+procedure TFPgtkFixed.CreateGtkObject;
+begin
+  FGtkObject := PGtkObject(gtk_fixed_new);
+end;
+
+
+procedure TFPgtkFixed.Put (Widget:TFPgtkWidget; x:integer; y:integer);
+begin
+  gtk_fixed_put (TheGtkObject, PGtkwidget(ConvertToGtkObject(Widget)), x, y);
+end;
+
+procedure TFPgtkFixed.Move (Widget:TFPgtkWidget; x:integer; y:integer);
+begin
+  gtk_fixed_move (TheGtkObject, PGtkwidget(ConvertToGtkObject(Widget)), x, y);
+end;
+
+procedure TFPgtkFixed.GetPos (Widget:TFPgtkWidget; var PosX:integer; var PosY:integer);
+var g : TFPgtkGroup;
+    r : integer;
+begin
+  g := TFPgtkGroup.Create;
+  try
+    g.ManageLists := false;
+    g.gtkList := TheGtkObject^.children;
+    r := g.indexof (Widget);
+    if r < 0 then
+      begin
+      PosX := -1;
+      PosY := -1;
+      end
+    else
+      with PGtkFixedChild(g.Items[r])^ do
+        begin
+        PosX := x;
+        PosY := Y;
+        end;
+  finally
+    g.Free;
+  end;
+end;
+
+ { TFPgtkNotebook }
+
+function TFPgtkNotebook.TheGtkObject : PGtkNotebook;
+begin
+  result := PgtkNotebook(FGtkObject);
+end;
+
+procedure TFPgtkNotebook.CreateGtkObject;
+begin
+  FGtkObject := PGtkObject(gtk_notebook_new);
+end;
+
+
+procedure TFPgtkNotebook.AppendPage (Child:TFPgtkWidget; TabLabel:TFPgtkWidget);
+begin
+  gtk_notebook_append_page (TheGtkObject, ConvertTogtkWidget(Child), ConvertTogtkWidget(TabLabel));
+  Child.Show;
+end;
+
+procedure TFPgtkNotebook.AppendPageFull (Child:TFPgtkWidget; TabLabel:TFPgtkWidget; MenuLabel:TFPgtkWidget; IsVisible:boolean);
+begin
+  if assigned (MenuLabel) then
+    gtk_notebook_append_page_menu (TheGtkObject, ConvertTogtkWidget(Child), ConvertTogtkWidget(TabLabel), ConvertTogtkWidget(MenuLabel))
+  else
+    gtk_notebook_append_page (TheGtkObject, ConvertTogtkWidget(Child), ConvertTogtkWidget(TabLabel));
+  if isvisible then
+    Child.Show;
+end;
+
+procedure TFPgtkNotebook.PrependPage (Child:TFPgtkWidget; TabLabel:TFPgtkWidget);
+begin
+  gtk_notebook_Prepend_page (TheGtkObject, PGtkwidget(ConvertToGtkObject(Child)), PGtkwidget(ConvertToGtkObject(TabLabel)));
+end;
+
+procedure TFPgtkNotebook.PrependPageFull (Child:TFPgtkWidget; TabLabel:TFPgtkWidget; MenuLabel:TFPgtkWidget; IsVisible:boolean);
+begin
+  if assigned (MenuLabel) then
+    gtk_notebook_prepend_page_menu (TheGtkObject, ConvertTogtkWidget(Child), ConvertTogtkWidget(TabLabel), ConvertTogtkWidget(MenuLabel))
+  else
+    gtk_notebook_prepend_page (TheGtkObject, ConvertTogtkWidget(Child), ConvertTogtkWidget(TabLabel));
+  if isvisible then
+    Child.Show;
+end;
+
+procedure TFPgtkNotebook.InsertPage (Child:TFPgtkWidget; TabLabel:TFPgtkWidget; Position:integer);
+begin
+  gtk_notebook_insert_page (TheGtkObject, PGtkwidget(ConvertToGtkObject(Child)), PGtkwidget(ConvertToGtkObject(TabLabel)), Position);
+end;
+
+procedure TFPgtkNotebook.InsertPageFull (Child:TFPgtkWidget; TabLabel:TFPgtkWidget; MenuLabel:TFPgtkWidget; IsVisible:boolean; Position:integer);
+begin
+  if assigned (MenuLabel) then
+    gtk_notebook_insert_page_menu (TheGtkObject, ConvertTogtkWidget(Child), ConvertTogtkWidget(TabLabel), ConvertTogtkWidget(MenuLabel), position)
+  else
+    gtk_notebook_insert_page (TheGtkObject, ConvertTogtkWidget(Child), ConvertTogtkWidget(TabLabel), position);
+  if isvisible then
+    Child.Show;
+end;
+
+procedure TFPgtkNotebook.RemovePage (PageNumber:integer);
+begin
+  gtk_notebook_remove_page (TheGtkObject, PageNumber);
+end;
+
+function TFPgtkNotebook.PageNumberOf (Child:TFPgtkWidget) : integer;
+begin
+  result := gtk_notebook_page_num (TheGtkObject, PGtkwidget(ConvertToGtkObject(Child)));
+end;
+
+procedure TFPgtkNotebook.NextPage;
+begin
+  gtk_notebook_next_page (TheGtkObject);
+end;
+
+procedure TFPgtkNotebook.PrevPage;
+begin
+  gtk_notebook_prev_page (TheGtkObject);
+end;
+
+procedure TFPgtkNotebook.ReorderPage (Child:TFPgtkWidget; PageNum:integer);
+begin
+  gtk_notebook_reorder_child (TheGtkObject, PGtkwidget(ConvertToGtkObject(Child)), PageNum);
+end;
+
+function TFPgtkNotebook.GetPageIndex : integer;
+begin
+  result := gtk_notebook_get_current_page(TheGtkObject);
+end;
+
+procedure TFPgtkNotebook.SetPageIndex (TheValue:integer);
+begin
+  gtk_notebook_set_page(TheGtkObject,TheValue);
+end;
+
+function TFPgtkNotebook.GetPage : TFPgtkWidget;
+begin
+  result := GetChildOnPage (PageIndex);
+end;
+
+procedure TFPgtkNotebook.SetPage (TheValue:TFPgtkWidget);
+var r : integer;
+begin
+  r := PageNumberOf (TheValue);
+  if r > -1 then
+    PageIndex := r;
+end;
+
+function TFPgtkNotebook.GetTabPos : TGtkPositionType;
+begin
+  result := gtk.tab_pos(TheGtkObject^);
+end;
+
+procedure TFPgtkNotebook.SetTabPos (TheValue:TGtkPositionType);
+begin
+  gtk_notebook_set_tab_pos(TheGtkObject,TheValue);
+end;
+
+function TFPgtkNotebook.GetShowTabs : boolean;
+begin
+  result := boolean(gtk.show_tabs(TheGtkObject^));
+end;
+
+procedure TFPgtkNotebook.SetShowTabs (TheValue:boolean);
+begin
+  gtk_notebook_set_show_tabs(TheGtkObject,TheValue);
+end;
+
+function TFPgtkNotebook.GetShowBorder : boolean;
+begin
+  result := boolean(gtk.show_border(TheGtkObject^));
+end;
+
+procedure TFPgtkNotebook.SetShowBorder (TheValue:boolean);
+begin
+  gtk_notebook_set_show_border(TheGtkObject,TheValue);
+end;
+
+function TFPgtkNotebook.GetScrollable : boolean;
+begin
+  result := boolean(gtk.scrollable(TheGtkObject^));
+end;
+
+procedure TFPgtkNotebook.SetScrollable (TheValue:boolean);
+begin
+  gtk_notebook_set_scrollable(TheGtkObject,TheValue);
+end;
+
+function TFPgtkNotebook.GetHomogenous : boolean;
+begin
+  result := boolean(gtk.homogeneous(TheGtkObject^));
+end;
+
+procedure TFPgtkNotebook.SetHomogenous (TheValue:boolean);
+begin
+  gtk_notebook_set_homogeneous_tabs(TheGtkObject,TheValue);
+end;
+
+function TFPgtkNotebook.GetTabHBorder : word;
+begin
+  result := TheGtkObject^.tab_hborder;
+end;
+
+procedure TFPgtkNotebook.SetTabHBorder (TheValue:word);
+begin
+  gtk_notebook_set_tab_hborder(TheGtkObject,TheValue);
+end;
+
+function TFPgtkNotebook.GetTabVBorder : word;
+begin
+  result := TheGtkObject^.tab_vborder;
+end;
+
+procedure TFPgtkNotebook.SetTabVBorder (TheValue:word);
+begin
+  gtk_notebook_set_tab_vborder(TheGtkObject,TheValue);
+end;
+
+procedure TFPgtkNotebook.SetTabBorders (BorderWidth:word);
+begin
+  gtk_notebook_set_tab_border (TheGtkObject, BorderWidth);
+end;
+
+function TFPgtkNotebook.GetMenuLabelOf (Child:TFPgtkWidget) : TFPgtkWidget;
+begin
+  result := GetPascalInstance (PGtkObject(gtk_notebook_get_menu_label (TheGtkObject, ConvertTogtkWidget(Child)))) as TFPgtkWidget;
+end;
+
+procedure TFPgtkNotebook.SetMenuLabel (Child:TFPgtkWidget; MenuLabel:TFPgtkWidget);
+begin
+  gtk_notebook_set_menu_label (TheGtkObject, PGtkwidget(ConvertToGtkObject(Child)), PGtkwidget(ConvertToGtkObject(MenuLabel)));
+end;
+
+function TFPgtkNotebook.GetTabLabelOf (Child:TFPgtkWidget) : TFPgtkWidget;
+begin
+  result := GetPascalInstance (PGtkObject(gtk_notebook_get_tab_label (TheGtkObject, ConvertTogtkWidget(Child)))) as TFPgtkWidget;
+end;
+
+procedure TFPgtkNotebook.SetTabLabel (Child:TFPgtkWidget; TabLabel:TFPgtkWidget);
+begin
+  gtk_notebook_set_tab_label (TheGtkObject, PGtkwidget(ConvertToGtkObject(Child)), PGtkwidget(ConvertToGtkObject(TabLabel)));
+end;
+
+function TFPgtkNotebook.GetChildOnPage (PageNum:integer) : TFPgtkWidget;
+begin
+  result := GetPascalInstance (PGtkObject(gtk_notebook_get_nth_page (TheGtkObject, PageNum))) as TFPgtkWidget;
+end;
+
+procedure TFPgtkNotebook.GetTabLabelPacking (Widget:TFPgtkWidget; var Expand:boolean; var Fill:boolean; var PackType:TGtkPackType);
+var PT : PGtkPackType;
+begin
+  pt := @PackType;
+  gtk_notebook_query_tab_label_packing (TheGtkObject, ConvertTogtkWidget(widget), 
+                               @expand, @fill, pt);
+end;
+
+procedure TFPgtkNotebook.SetTabLabelPacking (Widget:TFPgtkWidget; Expand:boolean; Fill:boolean; PackType:TGtkPackType);
+begin
+  gtk_notebook_set_tab_label_packing (TheGtkObject, PGtkwidget(ConvertToGtkObject(Widget)), Expand, Fill, PackType);
+end;
+
+procedure TFPgtkNotebook.EnablePopup;
+begin
+  gtk_notebook_popup_enable (TheGtkObject);
+end;
+
+procedure TFPgtkNotebook.DisablePopup;
+begin
+  gtk_notebook_popup_disable (TheGtkObject);
+end;
+
+procedure PageSwitchSignalproc (Sender:PGtkobject; PageRec:PGtkNotebookPage; aPageNum:integer; data:pointer); cdecl;
+var p : TFPgtkPageSwitchSignalFunction;
+begin
+with PSignalData(data)^ do
+  begin
+  p := TFPgtkPageSwitchSignalFunction (TheSignalProc);
+  p (TheWidget as TFPgtkObject, PageRec, aPageNum, TheData)
+  end;
+end;
+
+function TFPgtkNotebook.PageSwitchSignalConnect (signal:string; proc:TFPgtkPageSwitchSignalFunction; data:pointer) : guint;
+begin
+  result := gtk_signal_connect (FGtkObject, pgChar(signal), gtk_signal_func(@PageSwitchSignalproc), ConvertSignalData(TFPgtkSignalFunction(proc), data, true));
+end;
+
+function TFPgtkNotebook.PageSwitchSignalConnectAfter (signal:string; proc:TFPgtkPageSwitchSignalFunction; data:pointer) : guint;
+begin
+  result := gtk_signal_connect_After (FGtkObject, pgChar(signal), gtk_signal_func(@PageSwitchSignalproc), ConvertSignalData(TFPgtkSignalFunction(proc), data, true));
+end;
+
+function TFPgtkNotebook.ConnectSwitchPage (proc:TFPgtkPageSwitchSignalFunction; data:pointer) : guint;
+begin
+  result := PageSwitchSignalConnect (sgSwitchPage, proc, data);
+end;
+
+function TFPgtkNotebook.ConnectAfterSwitchPage (proc:TFPgtkPageSwitchSignalFunction; data:pointer) : guint;
+begin
+  result := PageSwitchSignalConnectAfter (sgSwitchPage, proc, data);
+end;
+
+ { TFPgtkFontSelection }
+
+function TFPgtkFontSelection.TheGtkObject : PGtkFontSelection;
+begin
+  result := PgtkFontSelection(FGtkObject);
+end;
+
+procedure TFPgtkFontSelection.CreateGtkObject;
+begin
+  FGtkObject := PGtkObject(gtk_font_selection_new);
+end;
+
+
+function TFPgtkFontSelection.GetFontName : string;
+begin
+  result := gtk_font_selection_get_font_name(TheGtkObject);
+end;
+
+procedure TFPgtkFontSelection.SetFontName (TheValue:string);
+begin
+  if not gtk_font_selection_set_font_name (TheGtkObject, pgchar(TheValue)) then
+    raise exception.CreateFmt (sFontNotFound, [TheValue]);
+end;
+
+function TFPgtkFontSelection.GetFont : PGdkFont;
+begin
+  result := gtk_font_selection_get_font (TheGtkObject);
+end;
+
+function TFPgtkFontSelection.GetPreviewText : string;
+begin
+  result := gtk_font_selection_get_preview_text(TheGtkObject);
+end;
+
+procedure TFPgtkFontSelection.SetPreviewText (TheValue:string);
+begin
+  gtk_font_selection_set_preview_text(TheGtkObject,ConvertToPgchar(TheValue));
+end;
+
+procedure TFPgtkFontSelection.SetFilter (FilterType:TGtkFontFilterType; FontType:TGtkFontType; Foundries:array of string; Weights:array of string; Slants:array of string; SetWidths:array of string; Spacings:array of string; CharSets:array of string);
+var ppF, ppW, ppSl, ppSW, ppSp, ppC : ppgchar;
+
+  function MakePP (data : array of string) : ppgchar;
+  begin
+    if high(data) > low(data) then
+      result := ArrayToPPgchar(data)
+    else
+      result := nil;
+  end;
+
+  procedure FreePP (ppdata : ppgchar; data : array of string);
+  begin
+    if assigned (ppdata) then
+      freemem (ppdata, sizeof (pgchar) * (high(data)-low(data)+1));
+  end;
+
+begin
+  ppF := MakePP(Foundries);
+  ppW := MakePP(Weights);
+  ppSl := MakePP(Slants);
+  ppSW := MakePP(SetWidths);
+  ppSp := MakePP(Spacings);
+  ppC := MakePP(CharSets);
+  gtk_font_selection_set_filter (TheGtkObject, FilterType, FontType, ppF, ppW, ppSl, ppSW, ppSp, ppC);
+  FreePP (ppF, Foundries);
+  FreePP (ppW, Weights);
+  FreePP (ppSl, Slants);
+  FreePP (ppSW, SetWidths);
+  FreePP (ppSp, Spacings);
+  FreePP (ppC, CharSets);
+end;
+
+ { TFPgtkPaned }
+
+function TFPgtkPaned.TheGtkObject : PGtkPaned;
+begin
+  result := PgtkPaned(FGtkObject);
+end;
+
+
+function TFPgtkPaned.GetGutterSize : word;
+begin
+  result := TheGtkObject^.gutter_size;
+end;
+
+procedure TFPgtkPaned.SetGutterSize (TheValue:word);
+begin
+  {$ifdef gtkwin}
+  TheGtkObject^.gutter_size := TheValue;
+  {$else}
+  gtk_paned_set_gutter_size(TheGtkObject,TheValue);
+  {$endif}
+end;
+
+function TFPgtkPaned.GetHandleSize : word;
+begin
+  result := TheGtkObject^.handle_size;
+end;
+
+procedure TFPgtkPaned.SetHandleSize (TheValue:word);
+begin
+  gtk_paned_set_handle_size(TheGtkObject,TheValue);
+end;
+
+function TFPgtkPaned.GetPosition : integer;
+begin
+  result := TheGtkObject^.child1_size;
+end;
+
+procedure TFPgtkPaned.SetPosition (TheValue:integer);
+begin
+  gtk_paned_set_position(TheGtkObject,TheValue);
+end;
+
+procedure TFPgtkPaned.ComputePosition (AnAllocation:integer; Child1Req:integer; Child2Req:integer);
+begin
+  gtk_paned_compute_position (TheGtkObject, AnAllocation, Child1Req, Child2Req);
+end;
+
+procedure TFPgtkPaned.Add1 (Child:TFPgtkWidget); Overload;
+begin
+  gtk_paned_add1 (TheGtkObject, ConvertToGtkWidget(Child));
+  Child.Show;
+end;
+
+procedure TFPgtkPaned.Pack1 (Child:TFPgtkWidget; Resize:boolean; Shrink:boolean); Overload;
+begin
+  gtk_paned_pack1 (TheGtkObject, ConvertToGtkWidget(Child), Resize, Shrink);
+  Child.Show;
+end;
+
+procedure TFPgtkPaned.Add1 (Child:TFPgtkWidget; isVisible:boolean); Overload;
+begin
+  gtk_paned_add1 (TheGtkObject, ConvertToGtkWidget(Child));
+  if isvisible then
+    Child.Show;
+end;
+
+procedure TFPgtkPaned.Pack1 (Child:TFPgtkWidget; Resize:boolean; Shrink:boolean; IsVisible:boolean); Overload;
+begin
+  gtk_paned_pack1 (TheGtkObject, ConvertToGtkWidget(Child), Resize, Shrink);
+  if isvisible then
+    Child.Show;
+end;
+
+procedure TFPgtkPaned.Add2 (Child:TFPgtkWidget); Overload;
+begin
+  gtk_paned_add2 (TheGtkObject, ConvertToGtkWidget(Child));
+  Child.Show;
+end;
+
+procedure TFPgtkPaned.Pack2 (Child:TFPgtkWidget; Resize:boolean; Shrink:boolean); Overload;
+begin
+  gtk_paned_pack2 (TheGtkObject, ConvertToGtkWidget(Child), Resize, Shrink);
+  Child.Show;
+end;
+
+procedure TFPgtkPaned.Add2 (Child:TFPgtkWidget; IsVisible:boolean); Overload;
+begin
+  gtk_paned_add2 (TheGtkObject, ConvertToGtkWidget(Child));
+  if isvisible then
+    Child.Show;
+end;
+
+procedure TFPgtkPaned.Pack2 (Child:TFPgtkWidget; Resize:boolean; Shrink:boolean; IsVisible:boolean); Overload;
+begin
+  gtk_paned_pack2 (TheGtkObject, ConvertToGtkWidget(Child), Resize, Shrink);
+  if isvisible then
+    Child.Show;
+end;
+
+ { TFPgtkHPaned }
+
+function TFPgtkHPaned.TheGtkObject : PGtkHPaned;
+begin
+  result := PgtkHPaned(FGtkObject);
+end;
+
+procedure TFPgtkHPaned.CreateGtkObject;
+begin
+  FGtkObject := PGtkObject(gtk_hpaned_new);
+end;
+
+
+ { TFPgtkVPaned }
+
+function TFPgtkVPaned.TheGtkObject : PGtkVPaned;
+begin
+  result := PgtkVPaned(FGtkObject);
+end;
+
+procedure TFPgtkVPaned.CreateGtkObject;
+begin
+  FGtkObject := PGtkObject(gtk_vpaned_new);
+end;
+
+
+ { TFPgtkLayout }
+
+function TFPgtkLayout.TheGtkObject : PGtkLayout;
+begin
+  result := PgtkLayout(FGtkObject);
+end;
+
+procedure TFPgtkLayout.CreateGtkObject;
+begin
+  FGtkObject := PGtkObject(gtk_layout_new (nil,nil));
+end;
+
+
+function TFPgtkLayout.GetHAdj : TFPgtkAdjustment;
+begin
+  result := GetPascalInstance(PGtkObject(gtk_layout_get_hadjustment(TheGtkObject)),tfpgtkadjustment) as tfpgtkadjustment;
+end;
+
+procedure TFPgtkLayout.SetHAdj (TheValue:TFPgtkAdjustment);
+begin
+  gtk_layout_set_hadjustment(TheGtkObject,PGtkadjustment(ConvertToGtkObject(TheValue)));
+end;
+
+function TFPgtkLayout.GetVAdj : TFPgtkAdjustment;
+begin
+  result := GetPascalInstance(PGtkObject(gtk_layout_get_vadjustment(TheGtkObject)),tfpgtkadjustment) as tfpgtkadjustment;
+end;
+
+procedure TFPgtkLayout.SetVAdj (TheValue:TFPgtkAdjustment);
+begin
+  gtk_layout_set_vadjustment(TheGtkObject,PGtkadjustment(ConvertToGtkObject(TheValue)));
+end;
+
+procedure TFPgtkLayout.Freeze;
+begin
+  gtk_layout_freeze (TheGtkObject);
+end;
+
+procedure TFPgtkLayout.Thaw;
+begin
+  gtk_layout_thaw (TheGtkObject);
+end;
+
+procedure TFPgtkLayout.Put (aWidget:TFPgtkWidget; X:integer; Y:integer); Overload;
+begin
+  gtk_layout_put (TheGtkObject, PGtkwidget(ConvertToGtkObject(aWidget)), X, Y);
+  aWidget.Show;
+end;
+
+procedure TFPgtkLayout.Put (aWidget:TFPgtkWidget; X:integer; Y:integer; aVisible:boolean); Overload;
+begin
+  gtk_layout_put (TheGtkObject, PGtkwidget(ConvertToGtkObject(aWidget)), X, Y);
+  if aVisible then
+    aWidget.Show;
+end;
+
+procedure TFPgtkLayout.Move (aWidget:TFPgtkWidget; X:integer; Y:integer);
+begin
+  gtk_layout_move (TheGtkObject, PGtkwidget(ConvertToGtkObject(aWidget)), X, Y);
+end;
+
+procedure TFPgtkLayout.SetSize (aWidth:integer; aHeight:integer);
+begin
+  gtk_layout_set_size (TheGtkObject, aWidth, aHeight);
+end;
+
+ { TFPgtkList }
+
+function TFPgtkList.TheGtkObject : PGtkList;
+begin
+  result := PgtkList(FGtkObject);
+end;
+
+procedure TFPgtkList.CreateGtkObject;
+begin
+  FGtkObject := PGtkObject(gtk_list_new);
+end;
+
+
+function TFPgtkList.ConnectSelectionChanged (proc:TFPgtksignalFunction; data:pointer) : guint;
+begin
+  result := signalConnect (sgSelectionChanged, proc, data);
+end;
+
+function TFPgtkList.ConnectAfterSelectionChanged (proc:TFPgtksignalFunction; data:pointer) : guint;
+begin
+  result := signalConnectAfter (sgSelectionChanged, proc, data);
+end;
+
+function TFPgtkList.ConnectSelectChild (proc:TFPgtkWidgetSignalFunction; data:pointer) : guint;
+begin
+  result := WidgetSignalConnect (sgSelectChild, proc, data);
+end;
+
+function TFPgtkList.ConnectAfterSelectChild (proc:TFPgtkWidgetSignalFunction; data:pointer) : guint;
+begin
+  result := WidgetSignalConnectAfter (sgSelectChild, proc, data);
+end;
+
+function TFPgtkList.ConnectUnselectChild (proc:TFPgtkWidgetSignalFunction; data:pointer) : guint;
+begin
+  result := WidgetSignalConnect (sgUnselectChild, proc, data);
+end;
+
+function TFPgtkList.ConnectAfterUnselectChild (proc:TFPgtkWidgetSignalFunction; data:pointer) : guint;
+begin
+  result := WidgetSignalConnectAfter (sgUnselectChild, proc, data);
+end;
+
+function TFPgtkList.GetSelectionMode : TGtkSelectionMode;
+begin
+  result := TGtkSelectionMode(Selection_mode(TheGtkObject^));
+end;
+
+procedure TFPgtkList.SetSelectionMode (TheValue:TGtkSelectionMode);
+begin
+  gtk_list_set_selection_mode(TheGtkObject,TheValue);
+end;
+
+procedure TFPgtkList.InsertItems (TheItems:TFPgtkListItemGroup; position:integer);
+begin
+  gtk_list_insert_items (TheGtkObject, TheItems.GtkList, position);
+end;
+
+procedure TFPgtkList.AppendItems (TheItems:TFPgtkListItemGroup);
+begin
+  gtk_list_append_items (TheGtkObject, TheItems.GtkList);
+end;
+
+procedure TFPgtkList.PrependItems (TheItems:TFPgtkListItemGroup);
+begin
+  gtk_list_prepend_items (TheGtkObject, TheItems.GtkList);
+end;
+
+procedure TFPgtkList.RemoveItems (TheItems:TFPgtkListItemGroup);
+begin
+  gtk_list_remove_items (TheGtkObject, TheItems.GtkList);
+end;
+
+procedure TFPgtkList.RemoveItemsNoUnref (TheItems:TFPgtkListItemGroup);
+begin
+  gtk_list_remove_items_no_unref (TheGtkObject, TheItems.GtkList);
+end;
+
+procedure TFPgtkList.ClearItems (FromItem:integer; ToItem:integer);
+begin
+  if ToItem >= 0 then
+    inc (ToItem);
+  gtk_list_clear_items (TheGtkObject, FromItem, ToItem);
+end;
+
+procedure TFPgtkList.ClearAll;
+begin
+  ClearItems (0,-1);
+end;
+
+procedure TFPgtkList.SelectItem (Item:integer);
+begin
+  gtk_list_select_item (TheGtkObject, Item);
+end;
+
+procedure TFPgtkList.UnselectItem (Item:integer);
+begin
+  gtk_list_unselect_item (TheGtkObject, Item);
+end;
+
+procedure TFPgtkList.SelectChild (Child:TFPgtkWidget);
+begin
+  gtk_list_select_child (TheGtkObject, PGtkwidget(ConvertToGtkObject(Child)));
+end;
+
+procedure TFPgtkList.UnselectChild (Child:TFPgtkWidget);
+begin
+  gtk_list_unselect_child (TheGtkObject, PGtkwidget(ConvertToGtkObject(Child)));
+end;
+
+function TFPgtkList.ChildPosition (Child:TFPgtkWidget) : integer;
+begin
+  result := gtk_list_child_position (TheGtkObject, PGtkwidget(ConvertToGtkObject(Child)));
+end;
+
+procedure TFPgtkList.ExtendSelection (ScrollType:TGtkScrollType; Position:gfloat; AutoStartSelection:boolean);
+begin
+  gtk_list_extend_selection (TheGtkObject, ScrollType, Position, AutoStartSelection);
+end;
+
+procedure TFPgtkList.StartSelection;
+begin
+  gtk_list_start_selection (TheGtkObject);
+end;
+
+procedure TFPgtkList.EndSelection;
+begin
+  gtk_list_end_selection (TheGtkObject);
+end;
+
+procedure TFPgtkList.SelectAll;
+begin
+  gtk_list_select_all (TheGtkObject);
+end;
+
+procedure TFPgtkList.UnselectAll;
+begin
+  gtk_list_unselect_all (TheGtkObject);
+end;
+
+procedure TFPgtkList.ScrollHorizontal (ScrollType:TGtkScrollType; Position:gfloat);
+begin
+  gtk_list_scroll_horizontal (TheGtkObject, ScrollType, Position);
+end;
+
+procedure TFPgtkList.ScrollVertical (ScrollType:TGtkScrollType; Position:gfloat);
+begin
+  gtk_list_scroll_vertical (TheGtkObject, ScrollType, Position);
+end;
+
+procedure TFPgtkList.ToggleAddMode;
+begin
+  gtk_list_toggle_add_mode (TheGtkObject);
+end;
+
+procedure TFPgtkList.ToggleFocusRow;
+begin
+  gtk_list_toggle_focus_row (TheGtkObject);
+end;
+
+procedure TFPgtkList.ToggleRow (Child:TFPgtkWidget);
+begin
+  gtk_list_toggle_row (TheGtkObject, PGtkwidget(ConvertToGtkObject(Child)));
+end;
+
+procedure TFPgtkList.UndoSelection;
+begin
+  gtk_list_undo_selection (TheGtkObject);
+end;
+
+procedure TFPgtkList.EndDragSelection;
+begin
+  gtk_list_end_drag_selection (TheGtkObject);
+end;
+
+procedure TFPgtkList.GetSelection (aGroup:TFPgtkGroup);
+begin
+  with aGroup do
+    begin
+    ManageLists := False;
+    GtkList := TheGtkObject^.Selection;
+    end;
+end;
+
+ { TFPgtkMenuShell }
+
+function TFPgtkMenuShell.TheGtkObject : PGtkMenuShell;
+begin
+  result := PgtkMenuShell(FGtkObject);
+end;
+
+
+procedure MoveCurrentSignalproc (Sender:PGtkobject; dir:TGtkMenuDirectionType; data:pointer); cdecl;
+var p : TFPgtkMoveCurrentSignalFunction;
+begin
+with PSignalData(data)^ do
+  begin
+  p := TFPgtkMoveCurrentSignalFunction (TheSignalProc);
+  p (TheWidget as TFPgtkObject, dir, TheData)
+  end;
+end;
+
+function TFPgtkMenuShell.MoveCurrentSignalConnect (signal:string; proc:TFPgtkMoveCurrentSignalFunction; data:pointer) : guint;
+begin
+  result := gtk_signal_connect (FGtkObject, pgChar(signal), gtk_signal_func(@MoveCurrentSignalproc), ConvertSignalData(TFPgtkSignalFunction(proc), data, true));
+end;
+
+function TFPgtkMenuShell.MoveCurrentSignalConnectAfter (signal:string; proc:TFPgtkMoveCurrentSignalFunction; data:pointer) : guint;
+begin
+  result := gtk_signal_connect_After (FGtkObject, pgChar(signal), gtk_signal_func(@MoveCurrentSignalproc), ConvertSignalData(TFPgtkSignalFunction(proc), data, true));
+end;
+
+procedure TFPgtkMenuShell.GtkPrepend (MenuItem:TFPgtkWidget);
+begin
+  gtk_menu_shell_prepend (TheGtkObject, PGtkwidget(ConvertToGtkObject(MenuItem)));
+end;
+
+procedure TFPgtkMenuShell.GtkInsert (MenuItem:TFPgtkWidget; position:integer);
+begin
+  gtk_menu_shell_insert (TheGtkObject, PGtkwidget(ConvertToGtkObject(MenuItem)), position);
+end;
+
+procedure TFPgtkMenuShell.GtkAppend (MenuItem:TFPgtkWidget);
+begin
+  gtk_menu_shell_append (TheGtkObject, PGtkwidget(ConvertToGtkObject(MenuItem)));
+end;
+
+procedure TFPgtkMenuShell.ActivateItem (MenuItem:TFPgtkWidget; ForceDeactivate:boolean);
+begin
+  gtk_menu_shell_activate_item (TheGtkObject, PGtkwidget(ConvertToGtkObject(MenuItem)), ForceDeactivate);
+end;
+
+procedure TFPgtkMenuShell.SelectItem (MenuItem:TFPgtkWidget);
+begin
+  gtk_menu_shell_select_item (TheGtkObject, PGtkwidget(ConvertToGtkObject(MenuItem)));
+end;
+
+procedure TFPgtkMenuShell.DeActivate;
+begin
+  gtk_menu_shell_deactivate (TheGtkObject);
+end;
+
+procedure TFPgtkMenuShell.Prepend (MenuItem:TFPgtkWidget); Overload;
+begin
+  GtkPrepend (MenuItem);
+  MenuItem.Show;
+end;
+
+procedure TFPgtkMenuShell.Prepend (MenuItem:TFPgtkWidget; CreateVisible:boolean); Overload;
+begin
+  GtkPrepend (MenuItem);
+  if createvisible then
+    MenuItem.Show;
+end;
+
+procedure TFPgtkMenuShell.Insert (MenuItem:TFPgtkWidget; position:integer); Overload;
+begin
+  GtkInsert (MenuItem, position);
+  MenuItem.Show;
+end;
+
+procedure TFPgtkMenuShell.Insert (MenuItem:TFPgtkWidget; position:integer; CreateVisible:boolean); Overload;
+begin
+  GtkInsert (MenuItem, position);
+  if createvisible then
+    MenuItem.Show;
+end;
+
+procedure TFPgtkMenuShell.Append (MenuItem:TFPgtkWidget); Overload;
+begin
+  GtkAppend (MenuItem);
+  MenuItem.Show;
+end;
+
+procedure TFPgtkMenuShell.Append (MenuItem:TFPgtkWidget; CreateVisible:boolean); Overload;
+begin
+  GtkAppend (MenuItem);
+  if createvisible then
+    MenuItem.Show;
+end;
+
+function TFPgtkMenuShell.ConnectDeActivate (proc:TFPgtkSignalFunction; data:pointer) : guint;
+begin
+  result := SignalConnect (sgDeActivate, proc, data);
+end;
+
+function TFPgtkMenuShell.ConnectAfterDeActivate (proc:TFPgtkSignalFunction; data:pointer) : guint;
+begin
+  result := SignalConnectAfter (sgDeActivate, proc, data);
+end;
+
+function TFPgtkMenuShell.ConnectSelectionDone (proc:TFPgtkSignalFunction; data:pointer) : guint;
+begin
+  result := SignalConnect (sgSelectionDone, proc, data);
+end;
+
+function TFPgtkMenuShell.ConnectAfterSelectionDone (proc:TFPgtkSignalFunction; data:pointer) : guint;
+begin
+  result := SignalConnectAfter (sgSelectionDone, proc, data);
+end;
+
+function TFPgtkMenuShell.ConnectCancel (proc:TFPgtkSignalFunction; data:pointer) : guint;
+begin
+  result := SignalConnect (sgCancel, proc, data);
+end;
+
+function TFPgtkMenuShell.ConnectAfterCancel (proc:TFPgtkSignalFunction; data:pointer) : guint;
+begin
+  result := SignalConnectAfter (sgCancel, proc, data);
+end;
+
+function TFPgtkMenuShell.ConnectMoveCurrent (proc:TFPgtkMoveCurrentSignalFunction; data:pointer) : guint;
+begin
+  result := MoveCurrentSignalConnect (sgMoveCurrent, proc, data);
+end;
+
+function TFPgtkMenuShell.ConnectAfterMoveCurrent (proc:TFPgtkMoveCurrentSignalFunction; data:pointer) : guint;
+begin
+  result := MoveCurrentSignalConnectAfter (sgMoveCurrent, proc, data);
+end;
+
+function TFPgtkMenuShell.ConnectActivateCurrent (proc:TFPgtkBooleanSignalFunction; data:pointer) : guint;
+begin
+  result := BooleanSignalConnect (sgActivateCurrent, proc, data);
+end;
+
+function TFPgtkMenuShell.ConnectAfterActivateCurrent (proc:TFPgtkBooleanSignalFunction; data:pointer) : guint;
+begin
+  result := BooleanSignalConnectAfter (sgActivateCurrent, proc, data);
+end;
+
+ { TFPgtkMenuBar }
+
+function TFPgtkMenuBar.TheGtkObject : PGtkMenuBar;
+begin
+  result := PgtkMenuBar(FGtkObject);
+end;
+
+procedure TFPgtkMenuBar.CreateGtkObject;
+begin
+  FGtkObject := PGtkObject(gtk_menu_bar_new);
+end;
+
+
+procedure TFPgtkMenuBar.GtkPrepend (MenuItem:TFPgtkWidget);
+begin
+  gtk_menu_bar_prepend (TheGtkObject, PGtkwidget(ConvertToGtkObject(MenuItem)));
+end;
+
+procedure TFPgtkMenuBar.GtkInsert (MenuItem:TFPgtkWidget; position:integer);
+begin
+  gtk_menu_bar_insert (TheGtkObject, PGtkwidget(ConvertToGtkObject(MenuItem)), position);
+end;
+
+procedure TFPgtkMenuBar.GtkAppend (MenuItem:TFPgtkWidget);
+begin
+  gtk_menu_bar_append (TheGtkObject, PGtkwidget(ConvertToGtkObject(MenuItem)));
+end;
+
+function TFPgtkMenuBar.GetShadow : TgtkShadowType;
+begin
+  result := TheGtkObject^.shadow_type;
+end;
+
+procedure TFPgtkMenuBar.SetShadow (TheValue:TgtkShadowType);
+begin
+  gtk_menu_bar_set_shadow_type(TheGtkObject,TheValue);
+end;
+
+ { TFPgtkMenu }
+
+function TFPgtkMenu.TheGtkObject : PGtkMenu;
+begin
+  result := PgtkMenu(FGtkObject);
+end;
+
+procedure TFPgtkMenu.CreateGtkObject;
+begin
+  FGtkObject := PGtkObject(gtk_menu_new);
+end;
+
+
+procedure TFPgtkMenu.GtkPrepend (MenuItem:TFPgtkWidget);
+begin
+  gtk_menu_prepend (TheGtkObject, PGtkwidget(ConvertToGtkObject(MenuItem)));
+end;
+
+procedure TFPgtkMenu.GtkInsert (MenuItem:TFPgtkWidget; position:integer);
+begin
+  gtk_menu_insert (TheGtkObject, PGtkwidget(ConvertToGtkObject(MenuItem)), position);
+end;
+
+procedure TFPgtkMenu.GtkAppend (MenuItem:TFPgtkWidget);
+begin
+  gtk_menu_append (TheGtkObject, PGtkwidget(ConvertToGtkObject(MenuItem)));
+end;
+
+procedure FPgtkMenuPos (Sender:PgtkMenu; x:pgint; y:pgint; data:pointer); Cdecl;
+var p : TFPgtkMenuPosFunction;
+begin
+  with PSignalData (data)^ do
+    begin
+    p := TFPgtkMenuPosFunction (TheSignalProc);
+    p(TFPgtkMenu(GetPascalInstance(PgtkObject(Sender))), x^, y^, data);
+    end;
+end;
+
+
+procedure FPgtkMenuDetacher (AttachedWidget:PgtkWidget; TheMenu:PgtkMenu); Cdecl;
+var m : TFPgtkMenu;
+    a : TFPgtkWidget;
+begin
+  m := (GetPascalInstance(PgtkObject(TheMenu)) as TFPgtkMenu);
+  if assigned(m) and assigned(m.FDetacher) then
+    begin
+    a := TFPgtkWidget (GetPascalInstance(PgtkObject(AttachedWidget)));
+    m.FDetacher (a, m);
+    end
+end;
+
+
+procedure TFPgtkMenu.ReorderChild (MenuItem:TFPgtkWidget; position:integer);
+begin
+  gtk_menu_reorder_child (TheGtkObject, PGtkwidget(ConvertToGtkObject(MenuItem)), position);
+end;
+
+procedure TFPgtkMenu.Popup (button:guint); Overload;
+begin
+  gtk_menu_popup (TheGtkObject, null, null, null, null, button, 0);
+end;
+
+procedure TFPgtkMenu.Popup (ParentShell:TFPgtkWidget; ParentItem:TFPgtkWidget; func:TFPgtkMenuPosFunction; data:pointer; button:guint; ActivateTime:guint32); Overload;
+begin
+  gtk_menu_popup (TheGtkObject, ConvertTogtkWidget(ParentShell), ConvertTogtkWidget(ParentItem),
+      @FPgtkMenuPos, ConvertSignalData(TFPgtkSignalFunction(func), data, true), button, ActivateTime);
+end;
+
+procedure TFPgtkMenu.PopDown;
+begin
+  gtk_menu_popdown (TheGtkObject);
+end;
+
+procedure TFPgtkMenu.Reposition;
+begin
+  gtk_menu_reposition (TheGtkObject);
+end;
+
+procedure TFPgtkMenu.AttachToWidget (Widget:TFPgtkWidget; detacher:TFPgtkMenuDetachFunction);
+begin
+  FDetacher := detacher;
+  gtk_menu_attach_to_widget (TheGtkObject, ConvertTogtkWidget(Widget), @FPgtkMenuDetacher);
+end;
+
+procedure TFPgtkMenu.Detach;
+begin
+  gtk_menu_detach (TheGtkObject);
+end;
+
+procedure TFPgtkMenu.SetTitle (TheValue:string);
+begin
+  gtk_menu_set_title(TheGtkObject,Pgchar(TheValue));
+end;
+
+function TFPgtkMenu.GetActive : TFPgtkWidget;
+begin
+  result := GetPascalInstance(PGtkObject(gtk_menu_get_active(TheGtkObject)),tfpgtkwidget) as tfpgtkwidget;
+end;
+
+procedure TFPgtkMenu.SetActive (TheValue:TFPgtkWidget);
+var r : integer;
+begin
+  r := Children.indexof (TheValue);
+  if r >= 0 then
+    SetActiveIndex (r);
+end;
+
+function TFPgtkMenu.GetActiveIndex : integer;
+begin
+  result := Children.indexof (GetActive);
+end;
+
+procedure TFPgtkMenu.SetActiveIndex (TheValue:integer);
+begin
+  gtk_menu_set_active(TheGtkObject,TheValue);
+end;
+
+function TFPgtkMenu.GetTearOffState : boolean;
+begin
+  result := boolean(gtk.torn_off(TheGtkObject^));
+end;
+
+procedure TFPgtkMenu.SetTearOffState (TheValue:boolean);
+begin
+  gtk_menu_set_tearoff_state(TheGtkObject,TheValue);
+end;
+
+function TFPgtkMenu.GetAttachedTo : TFPgtkWidget;
+begin
+  result := GetPascalInstance(PGtkObject(gtk_menu_get_attach_widget(TheGtkObject)),tfpgtkwidget) as tfpgtkwidget;
+end;
+
+procedure TFPgtkMenu.SetAttachedTo (TheValue:TFPgtkWidget);
+begin
+  AttachToWidget (TheValue, nil);
+end;
+
+function TFPgtkMenu.GetAccelGroup : PGtkAccelGroup;
+begin
+  result := gtk_menu_ensure_uline_accel_group(TheGtkObject);
+end;
+
+procedure TFPgtkMenu.SetAccelGroup (TheValue:PGtkAccelGroup);
+begin
+  gtk_menu_set_accel_group(TheGtkObject,TheValue);
+end;
+
+ { TFPgtkPacker }
+
+function TFPgtkPacker.TheGtkObject : PGtkPacker;
+begin
+  result := PgtkPacker(FGtkObject);
+end;
+
+procedure TFPgtkPacker.CreateGtkObject;
+begin
+  FGtkObject := PGtkObject(gtk_packer_new);
+end;
+
+
+procedure TFPgtkPacker.Add (Child:TFPgtkWidget; Side:TGtkSideType; Anchor:TGtkAnchorType; options:TGtkPackerOptions); Overload;
+begin
+  gtk_packer_add_defaults (TheGtkObject, Child.TheGtkWidget, Side, anchor, options);
+  Child.Show;
+end;
+
+procedure TFPgtkPacker.Add (Child:TFPgtkWidget; Side:TGtkSideType; Anchor:TGtkAnchorType; options:TGtkPackerOptions; aVisible:boolean); Overload;
+begin
+  gtk_packer_add_defaults (TheGtkObject, Child.TheGtkWidget, Side, anchor, options);
+  if aVisible then
+    Child.Show;
+end;
+
+procedure TFPgtkPacker.Add (Child:TFPgtkWidget; Side:TGtkSideType; Anchor:TGtkAnchorType; options:TGtkPackerOptions; aBorder:guint; PadX:Guint; PadY:guint; IPadX:guint; IPadY:guint); Overload;
+begin
+  gtk_packer_add (TheGtkObject, Child.TheGtkWidget, Side, anchor, options, aborder, padX, PadY, IPadX, IPadY);
+  Child.Show;
+end;
+
+procedure TFPgtkPacker.Add (Child:TFPgtkWidget; Side:TGtkSideType; Anchor:TGtkAnchorType; options:TGtkPackerOptions; aBorder:guint; PadX:Guint; PadY:guint; IPadX:guint; IPadY:guint; aVisible:boolean); Overload;
+begin
+  gtk_packer_add (TheGtkObject, Child.TheGtkWidget, Side, anchor, options, aborder, padX, PadY, IPadX, IPadY);
+  if aVisible then
+    Child.Show;
+end;
+
+procedure TFPgtkPacker.ReorderChild (aChild:TFPgtkWidget; position:integer);
+begin
+  gtk_packer_reorder_child (TheGtkObject, PGtkwidget(ConvertToGtkObject(aChild)), position);
+end;
+
+function TFPgtkPacker.GetSpacing : guint;
+begin
+  result := TheGtkObject^.spacing;
+end;
+
+procedure TFPgtkPacker.SetSpacing (TheValue:guint);
+begin
+  gtk_packer_set_spacing(TheGtkObject,TheValue);
+end;
+
+procedure TFPgtkPacker.DefaultBorder (aBorder:guint);
+begin
+  gtk_packer_set_default_border_width (TheGtkObject, aBorder);
+end;
+
+procedure TFPgtkPacker.DefaultPad (PadX:guint; PadY:guint);
+begin
+  gtk_packer_set_default_pad (TheGtkObject, PadX, PadY);
+end;
+
+procedure TFPgtkPacker.DefaultIPad (IPadX:guint; IPadY:guint);
+begin
+  gtk_packer_set_default_ipad (TheGtkObject, IPadX, IPadY);
+end;
+
+procedure TFPgtkPacker.Configure (aChild:TFPgtkWidget; Side:TGtkSideType; Anchor:TGtkAnchorType; options:TGtkPackerOptions; aBorder:guint; PadX:Guint; PadY:guint; IPadX:guint; IPadY:guint); Overload;
+begin
+  gtk_packer_set_child_packing (TheGtkObject, PGtkwidget(ConvertToGtkObject(aChild)), Side, Anchor, options, aBorder, PadX, PadY, IPadX, IPadY);
+end;
+
+ { TFPgtkTable }
+
+function TFPgtkTable.TheGtkObject : PGtkTable;
+begin
+  result := PgtkTable(FGtkObject);
+end;
+
+procedure TFPgtkTable.CreateGtkObject;
+begin
+  FGtkObject := PGtkObject(gtk_table_new (1,1,False));
+end;
+
+
+constructor TFPgtkTable.Create (AColumns:integer; ARows:integer);
+begin
+  inherited create;
+  resize (AColumns, ARows);
+end;
+
+
+procedure TFPgtkTable.Resize (AColumns:integer; ARows:integer);
+begin
+  gtk_table_resize (TheGtkObject, ARows, AColumns);
+end;
+
+procedure TFPgtkTable.Attach (Widget:TFPgtkWidget; left:integer; right:integer; top:integer; bottom:integer; XOptions:integer; YOptions:integer; XPadding:integer; YPadding:integer; IsVisible:boolean);
+begin
+  gtk_table_attach (TheGtkObject, ConvertToGtkWidget(Widget), left, right, top, bottom,
+                    XOptions, YOptions, XPadding, YPadding);
+  if isvisible then
+    widget.Show;
+end;
+
+procedure TFPgtkTable.Attach (Widget:TFPgtkWidget; left:integer; right:integer; top:integer; bottom:integer; XOptions:integer; YOptions:integer; XPadding:integer; YPadding:integer);
+begin
+  gtk_table_attach (TheGtkObject, ConvertTogtkWidget(Widget), left, right, top, bottom,
+                    XOptions, YOptions, XPadding, YPadding);
+  widget.Show;
+end;
+
+procedure TFPgtkTable.Attach (Widget:TFPgtkWidget; left:integer; right:integer; top:integer; bottom:integer; IsVisible:boolean);
+begin
+  gtk_table_attach_defaults (TheGtkObject, ConvertTogtkWidget(Widget), left, right, top, bottom);
+  if isvisible then
+    widget.Show;
+end;
+
+procedure TFPgtkTable.Attach (Widget:TFPgtkWidget; left:integer; right:integer; top:integer; bottom:integer);
+begin
+  gtk_table_attach_defaults (TheGtkObject, ConvertTogtkWidget(Widget), left, right, top, bottom);
+  widget.Show;
+end;
+
+function TFPgtkTable.GetRowCount : integer;
+begin
+  result := TheGtkObject^.nrows;
+end;
+
+function TFPgtkTable.GetColCount : integer;
+begin
+  result := TheGtkObject^.ncols;
+end;
+
+function TFPgtkTable.GetHomogeneous : boolean;
+begin
+  result := boolean(gtk.homogeneous(TheGtkObject^));
+end;
+
+procedure TFPgtkTable.SetHomogeneous (TheValue:boolean);
+begin
+  gtk_table_set_homogeneous(TheGtkObject,TheValue);
+end;
+
+function TFPgtkTable.GetRowSpacings : integer;
+begin
+  result := TheGtkObject^.column_spacing;
+end;
+
+procedure TFPgtkTable.SetRowSpacings (TheValue:integer);
+begin
+  gtk_table_set_row_spacings(TheGtkObject,TheValue);
+end;
+
+function TFPgtkTable.GetColSpacings : integer;
+begin
+  result := TheGtkObject^.row_spacing;
+end;
+
+procedure TFPgtkTable.SetColSpacings (TheValue:integer);
+begin
+  gtk_table_set_col_spacings(TheGtkObject,TheValue);
+end;
+
+procedure TFPgtkTable.SetOneRowSpacing (row:integer; TheValue:integer);
+begin
+  gtk_table_set_row_spacing (TheGtkObject, row, TheValue);
+end;
+
+procedure TFPgtkTable.SetOneColSpacing (Column:integer; TheValue:integer);
+begin
+  gtk_table_set_col_spacing (TheGtkObject, Column, TheValue);
+end;
+
+ { TFPgtkToolbar }
+
+function TFPgtkToolbar.TheGtkObject : PGtkToolbar;
+begin
+  result := PgtkToolbar(FGtkObject);
+end;
+
+procedure TFPgtkToolbar.CreateGtkObject;
+begin
+  FGtkObject := PGtkObject(gtk_toolbar_new (GTK_ORIENTATION_HORIZONTAL,GTK_TOOLBAR_BOTH));
+end;
+
+
+function TFPgtkToolbar.GetButtonRelief : TGtkReliefStyle;
+begin
+  result := gtk_toolbar_get_button_relief(TheGtkObject);
+end;
+
+procedure TFPgtkToolbar.SetButtonRelief (TheValue:TGtkReliefStyle);
+begin
+  gtk_toolbar_set_button_relief(TheGtkObject,TheValue);
+end;
+
+function TFPgtkToolbar.GetTooltips : TFPgtkTooltips;
+begin
+  result := GetPascalInstance(PGtkObject(TheGtkObject^.tooltips),tfpgtktooltips) as tfpgtktooltips;
+end;
+
+function TFPgtkToolbar.GetEnableTooltips : longbool;
+begin
+  result := tooltips.enabled;
+end;
+
+procedure TFPgtkToolbar.SetEnableTooltips (TheValue:longbool);
+begin
+  gtk_toolbar_set_tooltips(TheGtkObject,gint(TheValue));
+end;
+
+function TFPgtkToolbar.GetSpaceStyle : TGtkToolbarSpaceStyle;
+begin
+  result := TheGtkObject^.space_style;
+end;
+
+procedure TFPgtkToolbar.SetSpaceStyle (TheValue:TGtkToolbarSpaceStyle);
+begin
+  gtk_toolbar_set_space_style(TheGtkObject,TheValue);
+end;
+
+function TFPgtkToolbar.GetSpaceSize : integer;
+begin
+  result := TheGtkObject^.space_size;
+end;
+
+procedure TFPgtkToolbar.SetSpaceSize (TheValue:integer);
+begin
+  gtk_toolbar_set_space_size(TheGtkObject,TheValue);
+end;
+
+function TFPgtkToolbar.GetStyle : TGtkToolbarStyle;
+begin
+  result := TheGtkObject^.style;
+end;
+
+procedure TFPgtkToolbar.SetStyle (TheValue:TGtkToolbarStyle);
+begin
+  gtk_toolbar_set_style(TheGtkObject,TheValue);
+end;
+
+function TFPgtkToolbar.GetOrientation : tGtkOrientation;
+begin
+  result := TheGtkObject^.orientation;
+end;
+
+procedure TFPgtkToolbar.SetOrientation (TheValue:tGtkOrientation);
+begin
+  gtk_toolbar_set_orientation(TheGtkObject,TheValue);
+end;
+
+procedure TFPgtkToolbar.InsertWidget (Widget:TFPgtkWidget; TooltipText:string; TooltipPrivate:string; Position:integer);
+begin
+  gtk_toolbar_insert_widget (TheGtkObject, ConvertToGtkWidget(Widget), ConvertToPgchar(TooltipText), ConvertTopgchar(TooltipPrivate), Position);
+  Widget.Show;
+end;
+
+procedure TFPgtkToolbar.PrependWidget (Widget:TFPgtkWidget; TooltipText:string; TooltipPrivate:string);
+begin
+  gtk_toolbar_prepend_widget (TheGtkObject, ConvertToGtkWidget(Widget), ConvertTopgchar(TooltipText), ConvertTopgchar(TooltipPrivate));
+  Widget.Show;
+end;
+
+procedure TFPgtkToolbar.AppendWidget (Widget:TFPgtkWidget; TooltipText:string; TooltipPrivate:string);
+begin
+  gtk_toolbar_append_widget (TheGtkObject, ConvertToGtkWidget(Widget), ConvertTopgchar(TooltipText), ConvertTopgchar(TooltipPrivate));
+  Widget.Show;
+end;
+
+function TFPgtkToolbar.InsertElement (ButtonType:TGtkToolbarChildType; PrevRadioBut:TFPgtkWidget; Text:string; TooltipText:string; TooltipPrivate:string; Icon:TFPgtkWidget; CallBack:TFPgtkSignalFunction; data:pointer; position:integer) : TFPgtkWidget;
+var w : PGtkWidget;
+    t : TFPgtkObjectClass;
+begin
+  w := gtk_toolbar_insert_element (TheGtkObject, ButtonType, 
+           ConvertToGtkwidget(PrevRadioBut), ConvertTopgchar(Text), 
+           ConvertTopgchar(TooltipText), ConvertTopgchar(TooltipPrivate), 
+           ConvertToGtkwidget(Icon), 
+           gtk_signal_func(@SignalProc), 
+           ConvertSignalData(TFPgtkSignalFunction(callback), data, true), 
+           position);
+  if assigned (w) then
+    begin
+    case ButtonType of
+      GTK_TOOLBAR_CHILD_WIDGET:
+        t := TFPgtkWidget;
+      GTK_TOOLBAR_CHILD_BUTTON:
+        t := TFPgtkButton;
+      GTK_TOOLBAR_CHILD_TOGGLEBUTTON:
+        t := TFPgtkToggleButton;
+      GTK_TOOLBAR_CHILD_RADIOBUTTON:
+        t := TFPgtkRadioButton;
+    end;
+    if t = TFPgtkWidget then
+      result := GetPascalInstance (w)
+    else
+      result := GetPascalInstance (w, t);
+    end
+  else
+    result := nil;
+end;
+
+function TFPgtkToolbar.AppendElement (ButtonType:TGtkToolbarChildType; PrevRadioBut:TFPgtkWidget; Text:string; TooltipText:string; TooltipPrivate:string; Icon:TFPgtkWidget; CallBack:TFPgtkSignalFunction; data:pointer) : TFPgtkWidget;
+var w : PGtkWidget;
+    t : TFPgtkObjectClass;
+begin
+  w := gtk_toolbar_append_element (TheGtkObject, ButtonType, ConvertToGtkwidget(PrevRadioBut), 
+          ConvertTopgchar(Text), ConvertTopgchar(TooltipText), ConvertTopgchar(TooltipPrivate), 
+          ConvertToGtkwidget(Icon), gtk_signal_func(@SignalProc), 
+          ConvertSignalData(TFPgtkSignalFunction(callback), data, true));
+  if assigned (w) then
+    begin
+    case ButtonType of
+      GTK_TOOLBAR_CHILD_WIDGET:
+        t := TFPgtkWidget;
+      GTK_TOOLBAR_CHILD_BUTTON:
+        t := TFPgtkButton;
+      GTK_TOOLBAR_CHILD_TOGGLEBUTTON:
+        t := TFPgtkToggleButton;
+      GTK_TOOLBAR_CHILD_RADIOBUTTON:
+        t := TFPgtkRadioButton;
+    end;
+    if t = TFPgtkWidget then
+      result := GetPascalInstance (w)
+    else
+      result := GetPascalInstance (w, t);
+    end
+  else
+    result := nil;
+end;
+
+function TFPgtkToolbar.PrependElement (ButtonType:TGtkToolbarChildType; PrevRadioBut:TFPgtkWidget; Text:string; TooltipText:string; TooltipPrivate:string; Icon:TFPgtkWidget; CallBack:TFPgtkSignalFunction; data:pointer) : TFPgtkWidget;
+var w : PGtkWidget;
+    t : TFPgtkObjectClass;
+begin
+  w := gtk_toolbar_prepend_element (TheGtkObject, ButtonType, ConvertToGtkwidget(PrevRadioBut), 
+          ConvertTopgchar(Text), ConvertTopgchar(TooltipText), ConvertTopgchar(TooltipPrivate), 
+          ConvertToGtkwidget(Icon), gtk_signal_func(@SignalProc), 
+          ConvertSignalData(TFPgtkSignalFunction(callback), data, true));
+  if assigned (w) then
+    begin
+    case ButtonType of
+      GTK_TOOLBAR_CHILD_WIDGET:
+        t := TFPgtkWidget;
+      GTK_TOOLBAR_CHILD_BUTTON:
+        t := TFPgtkButton;
+      GTK_TOOLBAR_CHILD_TOGGLEBUTTON:
+        t := TFPgtkToggleButton;
+      GTK_TOOLBAR_CHILD_RADIOBUTTON:
+        t := TFPgtkRadioButton;
+    end;
+    if t = TFPgtkWidget then
+      result := GetPascalInstance (w)
+    else
+      result := GetPascalInstance (w, t);
+    end
+  else
+    result := nil;
+end;
+
+function TFPgtkToolbar.InsertItem (Text:string; TooltipText:string; TooltipPrivate:string; Icon:TFPgtkWidget; CallBack:TFPgtkSignalFunction; data:pointer; position:integer) : TFPgtkWidget; Overload;
+begin
+  result := GetPascalInstance (
+      gtk_toolbar_insert_item (TheGtkObject, ConvertTopgchar(Text), ConvertTopgchar(TooltipText), ConvertTopgchar(TooltipPrivate), ConvertToGtkWidget(Icon), 
+              gtk_signal_func(@SignalProc), ConvertSignalData(TFPgtkSignalFunction(callback), data, true), position),
+      TFPgtkButton);
+end;
+
+function TFPgtkToolbar.AppendItem (Text:string; TooltipText:string; TooltipPrivate:string; Icon:TFPgtkWidget; CallBack:TFPgtkSignalFunction; data:pointer) : TFPgtkWidget; Overload;
+begin
+  result := GetPascalInstance (
+      gtk_toolbar_append_item (TheGtkObject, ConvertTopgchar(Text), ConvertTopgchar(TooltipText), ConvertTopgchar(TooltipPrivate), 
+              ConvertToGtkWidget(Icon), gtk_signal_func(@SignalProc), ConvertSignalData(TFPgtkSignalFunction(callback), data, true)),
+      TFPgtkButton);
+end;
+
+function TFPgtkToolbar.PrependItem (Text:string; TooltipText:string; TooltipPrivate:string; Icon:TFPgtkWidget; CallBack:TFPgtkSignalFunction; data:pointer) : TFPgtkWidget; Overload;
+begin
+  result := GetPascalInstance (
+      gtk_toolbar_prepend_item (TheGtkObject, Converttopgchar(Text), Converttopgchar(TooltipText), 
+              Converttopgchar(TooltipPrivate), ConvertToGtkWidget(Icon), gtk_signal_func(@SignalProc), 
+              ConvertSignalData(TFPgtkSignalFunction(callback), data, true)), 
+      TFPgtkButton);
+end;
+
+function TFPgtkToolbar.InsertItem (Text:string; TooltipText:string; TooltipPrivate:string; Icon:array of string; CallBack:TFPgtkSignalFunction; data:pointer; position:integer) : TFPgtkWidget; Overload;
+var pm : TFPgtkPixmap;
+begin
+  if low(icon) < high(icon) then
+    begin
+    pm := TFPgtkPixmap.Create;
+    pm.loadFromArray (icon);
+    end
+  else
+    pm := nil;
+  result := GetPascalInstance (
+      gtk_toolbar_insert_item (TheGtkObject, ConvertTopgchar(Text), ConvertTopgchar(TooltipText), ConvertTopgchar(TooltipPrivate), ConvertToGtkWidget(pm), 
+              gtk_signal_func(@SignalProc), ConvertSignalData(TFPgtkSignalFunction(callback), data, true), position),
+      TFPgtkButton);
+end;
+
+function TFPgtkToolbar.AppendItem (Text:string; TooltipText:string; TooltipPrivate:string; Icon:array of string; CallBack:TFPgtkSignalFunction; data:pointer) : TFPgtkWidget; Overload;
+var pm : TFPgtkPixmap;
+begin
+  if low(icon) < high(icon) then
+    begin
+    pm := TFPgtkPixmap.Create;
+    pm.loadFromArray (icon);
+    end
+  else
+    pm := nil;
+  result := GetPascalInstance (
+      gtk_toolbar_append_item (TheGtkObject, ConvertTopgchar(Text), ConvertTopgchar(TooltipText), ConvertTopgchar(TooltipPrivate), 
+              ConvertToGtkWidget(pm), gtk_signal_func(@SignalProc), ConvertSignalData(TFPgtkSignalFunction(callback), data, true)),
+      TFPgtkButton);
+end;
+
+function TFPgtkToolbar.PrependItem (Text:string; TooltipText:string; TooltipPrivate:string; Icon:array of string; CallBack:TFPgtkSignalFunction; data:pointer) : TFPgtkWidget; Overload;
+var pm : TFPgtkPixmap;
+begin
+  if low(icon) < high(icon) then
+    begin
+    pm := TFPgtkPixmap.Create;
+    pm.loadFromArray (icon);
+    end
+  else
+    pm := nil;
+  result := GetPascalInstance (
+      gtk_toolbar_prepend_item (TheGtkObject, Converttopgchar(Text), Converttopgchar(TooltipText), 
+              Converttopgchar(TooltipPrivate), ConvertToGtkWidget(pm), gtk_signal_func(@SignalProc), 
+              ConvertSignalData(TFPgtkSignalFunction(callback), data, true)), 
+      TFPgtkButton);
+end;
+
+procedure TFPgtkToolbar.InsertSpace (position:integer);
+begin
+  gtk_toolbar_insert_space (TheGtkObject, position);
+end;
+
+procedure TFPgtkToolbar.AppendSpace;
+begin
+  gtk_toolbar_append_space (TheGtkObject);
+end;
+
+procedure TFPgtkToolbar.PrependSpace;
+begin
+  gtk_toolbar_prepend_space (TheGtkObject);
+end;
+
+ { TFPgtkTree }
+
+function TFPgtkTree.TheGtkObject : PGtkTree;
+begin
+  result := PgtkTree(FGtkObject);
+end;
+
+procedure TFPgtkTree.CreateGtkObject;
+begin
+  FGtkObject := PGtkObject(gtk_tree_new);
+end;
+
+
+function TFPgtkTree.ConnectSelectionChanged (proc:TFPgtkSignalFunction; data:pointer) : guint;
+begin
+  result := SignalConnect (sgSelectionChanged, proc, data);
+end;
+
+function TFPgtkTree.ConnectAfterSelectionChanged (proc:TFPgtkSignalFunction; data:pointer) : guint;
+begin
+  result := SignalConnectAfter (sgSelectionChanged, proc, data);
+end;
+
+function TFPgtkTree.ConnectSelectChild (proc:TFPgtkWidgetSignalFunction; data:pointer) : guint;
+begin
+  result := WidgetSignalConnect (sgSelectChild, proc, data);
+end;
+
+function TFPgtkTree.ConnectAfterSelectChild (proc:TFPgtkWidgetSignalFunction; data:pointer) : guint;
+begin
+  result := WidgetSignalConnectAfter (sgSelectChild, proc, data);
+end;
+
+function TFPgtkTree.ConnectUnselectChild (proc:TFPgtkWidgetSignalFunction; data:pointer) : guint;
+begin
+  result := WidgetSignalConnect (sgUnselectChild, proc, data);
+end;
+
+function TFPgtkTree.ConnectAfterUnselectChild (proc:TFPgtkWidgetSignalFunction; data:pointer) : guint;
+begin
+  result := WidgetSignalConnectAfter (sgUnselectChild, proc, data);
+end;
+
+function TFPgtkTree.GetSelectionMode : TGtkSelectionMode;
+begin
+  result := gtk.selection_mode(TheGtkObject^);
+end;
+
+procedure TFPgtkTree.SetSelectionMode (TheValue:TGtkSelectionMode);
+begin
+  gtk_tree_set_selection_mode(TheGtkObject,TheValue);
+end;
+
+function TFPgtkTree.GetViewLines : boolean;
+begin
+  result := boolean(gtk.view_line(TheGtkObject^));
+end;
+
+procedure TFPgtkTree.SetViewLines (TheValue:boolean);
+begin
+  gtk_tree_set_view_lines(TheGtkObject,guint(TheValue));
+end;
+
+function TFPgtkTree.GetViewMode : TGtkTreeViewMode;
+begin
+  result := gtk.view_mode(TheGtkObject^);
+end;
+
+procedure TFPgtkTree.SetViewMode (TheValue:TGtkTreeViewMode);
+begin
+  gtk_tree_set_view_mode(TheGtkObject,TheValue);
+end;
+
+procedure TFPgtkTree.Append (TreeItem:TFPgtkWidget);
+begin
+  gtk_tree_append (TheGtkObject, PGtkwidget(ConvertToGtkObject(TreeItem)));
+  TreeItem.Show;
+end;
+
+procedure TFPgtkTree.Prepend (TreeItem:TFPgtkWidget);
+begin
+  gtk_tree_prepend (TheGtkObject, PGtkwidget(ConvertToGtkObject(TreeItem)));
+  TreeItem.Show;
+end;
+
+procedure TFPgtkTree.Insert (TreeItem:TFPgtkWidget; position:integer);
+begin
+  gtk_tree_insert (TheGtkObject, PGtkwidget(ConvertToGtkObject(TreeItem)),position);
+  TreeItem.show;
+end;
+
+procedure TFPgtkTree.Remove (TreeItem:TFPgtkWidget);
+var l : PGList;
+begin
+{$ifndef win32}
+  gtk_tree_remove_item (TheGtkObject, ConvertToGtkWidget(TreeItem));
+{$else}
+  l := null;
+  l := g_list_append (l, ConvertToGtkWidget(TreeItem));
+  gtk_tree_remove_items (TheGtkObject, l);
+  g_list_free (l);
+{$endif}
+end;
+
+procedure TFPgtkTree.ClearItems (StartPos:integer; EndPos:integer);
+begin
+  gtk_tree_clear_items (TheGtkObject, StartPos, EndPos);
+end;
+
+procedure TFPgtkTree.SelectItem (Item:integer);
+begin
+  gtk_tree_select_item (TheGtkObject, Item);
+end;
+
+procedure TFPgtkTree.UnselectItem (Item:integer);
+begin
+  gtk_tree_unselect_item (TheGtkObject, Item);
+end;
+
+procedure TFPgtkTree.SelectChild (TreeItem:TFPgtkWidget);
+begin
+  gtk_tree_select_child (TheGtkObject, PGtkwidget(ConvertToGtkObject(TreeItem)));
+end;
+
+procedure TFPgtkTree.UnselectChild (TreeItem:TFPgtkWidget);
+begin
+  gtk_tree_unselect_child (TheGtkObject, PGtkwidget(ConvertToGtkObject(TreeItem)));
+end;
+
+function TFPgtkTree.ChildPosition (TreeItem:TFPgtkWidget) : integer;
+begin
+  result := gtk_tree_child_position (TheGtkObject, PGtkwidget(ConvertToGtkObject(TreeItem)));
+end;
+
+function TFPgtkTree.RootTree : TFPgtkTree;
+begin
+  result := GetPascalInstance(PGtkObject(GTK_TREE_ROOT_TREE(TheGtkObject))) as TFPgtkTree;
+end;
+
+function TFPgtkTree.IsRootTree : boolean;
+begin
+  result := GTK_IS_ROOT_TREE (TheGtkObject);
+end;
+
+procedure TFPgtkTree.GetSelection (aGroup:TFPgtkGroup);
+begin
+  aGroup.ManageLists := false;
+  aGroup.GtkList := Gtk_Tree_selection (TheGtkObject);
+end;
+
+function TFPgtkTree.Level : integer;
+begin
+  result := TheGtkObject^.level;
+end;
+
+ { TFPgtkCalendar }
+
+function TFPgtkCalendar.TheGtkObject : PGtkCalendar;
+begin
+  result := PgtkCalendar(FGtkObject);
+end;
+
+procedure TFPgtkCalendar.CreateGtkObject;
+begin
+  FGtkObject := PGtkObject(gtk_calendar_new);
+end;
+
+
+function TFPgtkCalendar.SelectMonth (aMonth:guint; aYear:guint) : integer;
+begin
+  result := gtk_calendar_select_month (TheGtkObject, aMonth-1, aYear);
+end;
+
+procedure TFPgtkCalendar.SelectDay (aDay:guint);
+begin
+  gtk_calendar_select_day (TheGtkObject, aDay);
+end;
+
+function TFPgtkCalendar.MarkDay (aDay:guint) : integer;
+begin
+  result := gtk_calendar_mark_day (TheGtkObject, aDay);
+end;
+
+function TFPgtkCalendar.UnmarkDay (aDay:guint) : integer;
+begin
+  result := gtk_calendar_unmark_day (TheGtkObject, aDay);
+end;
+
+procedure TFPgtkCalendar.ClearMarks;
+begin
+  gtk_calendar_clear_marks (TheGtkObject);
+end;
+
+function TFPgtkCalendar.GetDisplayOptions : TGtkCalendarDisplayOptions;
+begin
+  result := TheGtkObject^.display_flags;
+end;
+
+procedure TFPgtkCalendar.SetDisplayOptions (TheValue:TGtkCalendarDisplayOptions);
+begin
+  gtk_calendar_display_options(TheGtkObject,TheValue);
+end;
+
+function TFPgtkCalendar.GetDate : TDatetime;
+var y, m, d : guint;
+begin
+  gtk_calendar_get_date (TheGtkObject, @y, @m, @d);
+  result := encodedate (y,m+1,d);
+end;
+
+procedure TFPgtkCalendar.SetDate (TheValue:TDatetime);
+var y,m,d : word;
+begin
+  decodedate (TheValue, y,m,d);
+  SelectMonth(m,y);
+  SelectDay(d);
+end;
+
+procedure TFPgtkCalendar.Freeze;
+begin
+  gtk_calendar_freeze (TheGtkObject);
+end;
+
+procedure TFPgtkCalendar.Thaw;
+begin
+  gtk_calendar_thaw (TheGtkObject);
+end;
+
+function TFPgtkCalendar.ConnectMonthChanged (proc:TFPgtksignalFunction; data:pointer) : guint;
+begin
+  result := signalConnect (sgMonthChanged, proc, data);
+end;
+
+function TFPgtkCalendar.ConnectAfterMonthChanged (proc:TFPgtksignalFunction; data:pointer) : guint;
+begin
+  result := signalConnectAfter (sgMonthChanged, proc, data);
+end;
+
+function TFPgtkCalendar.ConnectDaySelected (proc:TFPgtksignalFunction; data:pointer) : guint;
+begin
+  result := signalConnect (sgDaySelected, proc, data);
+end;
+
+function TFPgtkCalendar.ConnectAfterDaySelected (proc:TFPgtksignalFunction; data:pointer) : guint;
+begin
+  result := signalConnectAfter (sgDaySelected, proc, data);
+end;
+
+function TFPgtkCalendar.ConnectDaySelectedDoubleClick (proc:TFPgtksignalFunction; data:pointer) : guint;
+begin
+  result := signalConnect (sgDaySelectedDoubleClick, proc, data);
+end;
+
+function TFPgtkCalendar.ConnectAfterDaySelectedDoubleClick (proc:TFPgtksignalFunction; data:pointer) : guint;
+begin
+  result := signalConnectAfter (sgDaySelectedDoubleClick, proc, data);
+end;
+
+function TFPgtkCalendar.ConnectPrevMonth (proc:TFPgtksignalFunction; data:pointer) : guint;
+begin
+  result := signalConnect (sgPrevMonth, proc, data);
+end;
+
+function TFPgtkCalendar.ConnectAfterPrevMonth (proc:TFPgtksignalFunction; data:pointer) : guint;
+begin
+  result := signalConnectAfter (sgPrevMonth, proc, data);
+end;
+
+function TFPgtkCalendar.ConnectNextMonth (proc:TFPgtksignalFunction; data:pointer) : guint;
+begin
+  result := signalConnect (sgNextMonth, proc, data);
+end;
+
+function TFPgtkCalendar.ConnectAfterNextMonth (proc:TFPgtksignalFunction; data:pointer) : guint;
+begin
+  result := signalConnectAfter (sgNextMonth, proc, data);
+end;
+
+function TFPgtkCalendar.ConnectPrevYear (proc:TFPgtksignalFunction; data:pointer) : guint;
+begin
+  result := signalConnect (sgPrevYear, proc, data);
+end;
+
+function TFPgtkCalendar.ConnectAfterPrevYear (proc:TFPgtksignalFunction; data:pointer) : guint;
+begin
+  result := signalConnectAfter (sgPrevYear, proc, data);
+end;
+
+function TFPgtkCalendar.ConnectNextYear (proc:TFPgtksignalFunction; data:pointer) : guint;
+begin
+  result := signalConnect (sgNextYear, proc, data);
+end;
+
+function TFPgtkCalendar.ConnectAfterNextYear (proc:TFPgtksignalFunction; data:pointer) : guint;
+begin
+  result := signalConnectAfter (sgNextYear, proc, data);
+end;
+
+ { TFPgtkDrawingArea }
+
+function TFPgtkDrawingArea.TheGtkObject : PGtkDrawingArea;
+begin
+  result := PgtkDrawingArea(FGtkObject);
+end;
+
+procedure TFPgtkDrawingArea.CreateGtkObject;
+begin
+  FGtkObject := PGtkObject(gtk_drawing_area_new);
+end;
+
+
+procedure TFPgtkDrawingArea.SetSize (Width:integer; Height:integer);
+begin
+  gtk_drawing_area_Size (TheGtkObject, Width, Height);
+end;
+
+ { TFPgtkCurve }
+
+function TFPgtkCurve.TheGtkObject : PGtkCurve;
+begin
+  result := PgtkCurve(FGtkObject);
+end;
+
+procedure TFPgtkCurve.CreateGtkObject;
+begin
+  FGtkObject := PGtkObject(gtk_curve_new);
+end;
+
+
+procedure TFPgtkCurve.SetRange (MinX:float; MaxX:float; MinY:float; MaxY:float);
+begin
+  gtk_curve_set_range (TheGtkObject, MinX, MaxX, MinY, MaxY);
+end;
+
+procedure TFPgtkCurve.Reset;
+begin
+  gtk_curve_reset (TheGtkObject);
+end;
+
+procedure TFPgtkCurve.SetGamma (GammaValue:float);
+begin
+  gtk_curve_set_gamma (TheGtkObject, GammaValue);
+end;
+
+function TFPgtkCurve.GetCurveType : TGtkCurveType;
+begin
+  result := TheGtkObject^.curve_type;
+end;
+
+procedure TFPgtkCurve.SetCurveType (TheValue:TGtkCurveType);
+begin
+  gtk_curve_set_curve_type(TheGtkObject,TheValue);
+end;
+
+ { TFPgtkEditable }
+
+function TFPgtkEditable.TheGtkObject : PGtkEditable;
+begin
+  result := PgtkEditable(FGtkObject);
+end;
+
+
+function TFPgtkEditable.GetHasSelection : boolean;
+begin
+  result := SelectionStart <> SelectionEnd;
+end;
+
+function TFPgtkEditable.GetEditable : boolean;
+begin
+  result := boolean(gtk.editable(TheGtkObject^));
+end;
+
+procedure TFPgtkEditable.SetEditable (TheValue:boolean);
+begin
+  gtk_Editable_set_editable(TheGtkObject,TheValue);
+end;
+
+function TFPgtkEditable.GetVisible : boolean;
+begin
+  result := boolean(gtk.visible(TheGtkObject^));
+end;
+
+procedure TFPgtkEditable.SetVisible (TheValue:boolean);
+begin
+  gtk.Set_visible(TheGtkObject^,guint(TheValue))
+end;
+
+function TFPgtkEditable.GetPosition : integer;
+begin
+  result := gtk_Editable_get_position(TheGtkObject);
+end;
+
+procedure TFPgtkEditable.SetPosition (TheValue:integer);
+begin
+  gtk_Editable_set_position(TheGtkObject,TheValue);
+end;
+
+function TFPgtkEditable.GetSelectionStart : integer;
+begin
+  result := TheGtkObject^.selection_start_pos;
+end;
+
+procedure TFPgtkEditable.SetSelectionStart (TheValue:integer);
+begin
+  gtk_editable_select_region (TheGtkObject, TheValue, SelectionEnd);
+end;
+
+function TFPgtkEditable.GetSelectionEnd : integer;
+begin
+  result := TheGtkObject^.Selection_end_pos;
+end;
+
+procedure TFPgtkEditable.SetSelectionEnd (TheValue:integer);
+begin
+  gtk_editable_select_region (TheGtkObject, SelectionStart, TheValue);
+end;
+
+procedure TFPgtkEditable.SetSelection (TheValue:string);
+var b : integer;
+begin
+  if HasSelection then
+    begin
+    b := SelectionStart;
+    deleteText (SelectionStart, SelectionEnd);
+    end
+  else
+    b := position;
+  InsertText (TheValue, b);
+  Position := b + length(TheValue);
+  SelectRegion (b, position);
+end;  
+
+function TFPgtkEditable.GetSelection : string;
+var c : pgchar;
+begin
+  c := gtk_editable_get_chars (TheGtkObject, SelectionStart, SelectionEnd);
+  result := string (c);
+  g_free (c);
+end;
+
+function TFPgtkEditable.GetText : string;
+var c : pgchar;
+begin
+  c := gtk_editable_get_chars (TheGtkObject, 0, -1);
+  result := string (c);
+  g_free (c);
+end;
+
+procedure TFPgtkEditable.Changed;
+begin
+  gtk_Editable_Changed (TheGtkObject);
+end;
+
+procedure TFPgtkEditable.InsertText (NewText:string; AtPosition:integer);
+var p : integer;
+begin
+  p := AtPosition;
+  gtk_editable_insert_text (TheGtkObject, pgchar(NewText), length(NewText), @p);
+end;
+
+procedure TFPgtkEditable.DeleteText (StartPos:integer; EndPos:integer);
+begin
+  gtk_Editable_Delete_Text (TheGtkObject, StartPos, EndPos);
+end;
+
+procedure TFPgtkEditable.GetChars (StartPos:integer; EndPos:integer);
+begin
+  gtk_Editable_get_chars (TheGtkObject, StartPos, EndPos);
+end;
+
+procedure TFPgtkEditable.CutClipboard;
+begin
+  gtk_Editable_cut_clipboard (TheGtkObject);
+end;
+
+procedure TFPgtkEditable.CopyClipboard;
+begin
+  gtk_Editable_copy_clipboard (TheGtkObject);
+end;
+
+procedure TFPgtkEditable.PasteClipboard;
+begin
+  gtk_Editable_paste_clipboard (TheGtkObject);
+end;
+
+procedure TFPgtkEditable.SelectRegion (StartPos:integer; EndPos:integer);
+begin
+  gtk_Editable_select_region (TheGtkObject, StartPos, EndPos);
+end;
+
+procedure TFPgtkEditable.ClaimSelection (claim:boolean; time:guint32);
+begin
+  gtk_Editable_claim_selection (TheGtkObject, claim, time);
+end;
+
+procedure TFPgtkEditable.DeleteSelection;
+begin
+  gtk_Editable_delete_selection (TheGtkObject);
+end;
+
+procedure TFPgtkEditable.Clear;
+begin
+  DeleteText (0,-1);
+end;
+
+procedure InsertSignalproc (Sender:PGtkobject; NewText:pgChar; TextLength:integer; var Position:integer; data:pointer); cdecl;
+var p : TFPgtkInsertSignalFunction;
+begin
+with PSignalData(data)^ do
+  begin
+  p := TFPgtkInsertSignalFunction (TheSignalProc);
+  p (TheWidget as TFPgtkObject, NewText, TextLength, Position, TheData)
+  end;
+end;
+
+function TFPgtkEditable.InsertSignalConnect (signal:string; proc:TFPgtkInsertSignalFunction; data:pointer) : guint;
+begin
+  result := gtk_signal_connect (FGtkObject, pgChar(signal), gtk_signal_func(@InsertSignalproc), ConvertSignalData(TFPgtkSignalFunction(proc), data, true));
+end;
+
+function TFPgtkEditable.InsertSignalConnectAfter (signal:string; proc:TFPgtkInsertSignalFunction; data:pointer) : guint;
+begin
+  result := gtk_signal_connect_After (FGtkObject, pgChar(signal), gtk_signal_func(@InsertSignalproc), ConvertSignalData(TFPgtkSignalFunction(proc), data, true));
+end;
+
+procedure DeleteSignalproc (Sender:PGtkobject; StartPos:integer; EndPos:integer; data:pointer); cdecl;
+var p : TFPgtkDeleteSignalFunction;
+begin
+with PSignalData(data)^ do
+  begin
+  p := TFPgtkDeleteSignalFunction (TheSignalProc);
+  p (TheWidget as TFPgtkObject, StartPos, EndPos, TheData)
+  end;
+end;
+
+function TFPgtkEditable.DeleteSignalConnect (signal:string; proc:TFPgtkDeleteSignalFunction; data:pointer) : guint;
+begin
+  result := gtk_signal_connect (FGtkObject, pgChar(signal), gtk_signal_func(@DeleteSignalproc), ConvertSignalData(TFPgtkSignalFunction(proc), data, true));
+end;
+
+function TFPgtkEditable.DeleteSignalConnectAfter (signal:string; proc:TFPgtkDeleteSignalFunction; data:pointer) : guint;
+begin
+  result := gtk_signal_connect_After (FGtkObject, pgChar(signal), gtk_signal_func(@DeleteSignalproc), ConvertSignalData(TFPgtkSignalFunction(proc), data, true));
+end;
+
+procedure XYSignalproc (Sender:PGtkobject; x:integer; y:integer; data:pointer); cdecl;
+var p : TFPgtkXYSignalFunction;
+begin
+with PSignalData(data)^ do
+  begin
+  p := TFPgtkXYSignalFunction (TheSignalProc);
+  p (TheWidget as TFPgtkObject, x, y, TheData)
+  end;
+end;
+
+function TFPgtkEditable.XYSignalConnect (signal:string; proc:TFPgtkXYSignalFunction; data:pointer) : guint;
+begin
+  result := gtk_signal_connect (FGtkObject, pgChar(signal), gtk_signal_func(@XYSignalproc), ConvertSignalData(TFPgtkSignalFunction(proc), data, true));
+end;
+
+function TFPgtkEditable.XYSignalConnectAfter (signal:string; proc:TFPgtkXYSignalFunction; data:pointer) : guint;
+begin
+  result := gtk_signal_connect_After (FGtkObject, pgChar(signal), gtk_signal_func(@XYSignalproc), ConvertSignalData(TFPgtkSignalFunction(proc), data, true));
+end;
+
+procedure DirectionSignalproc (Sender:PGtkobject; Direction:integer; data:pointer); cdecl;
+var p : TFPgtkDirectionSignalFunction;
+begin
+with PSignalData(data)^ do
+  begin
+  p := TFPgtkDirectionSignalFunction (TheSignalProc);
+  p (TheWidget as TFPgtkObject, Direction, TheData)
+  end;
+end;
+
+function TFPgtkEditable.DirectionSignalConnect (signal:string; proc:TFPgtkDirectionSignalFunction; data:pointer) : guint;
+begin
+  result := gtk_signal_connect (FGtkObject, pgChar(signal), gtk_signal_func(@DirectionSignalproc), ConvertSignalData(TFPgtkSignalFunction(proc), data, true));
+end;
+
+function TFPgtkEditable.DirectionSignalConnectAfter (signal:string; proc:TFPgtkDirectionSignalFunction; data:pointer) : guint;
+begin
+  result := gtk_signal_connect_After (FGtkObject, pgChar(signal), gtk_signal_func(@DirectionSignalproc), ConvertSignalData(TFPgtkSignalFunction(proc), data, true));
+end;
+
+procedure MoveWordSignalproc (Sender:PGtkobject; NumWords:integer; data:pointer); cdecl;
+var p : TFPgtkMoveWordSignalFunction;
+begin
+with PSignalData(data)^ do
+  begin
+  p := TFPgtkMoveWordSignalFunction (TheSignalProc);
+  p (TheWidget as TFPgtkObject, NumWords, TheData)
+  end;
+end;
+
+function TFPgtkEditable.MoveWordSignalConnect (signal:string; proc:TFPgtkMoveWordSignalFunction; data:pointer) : guint;
+begin
+  result := gtk_signal_connect (FGtkObject, pgChar(signal), gtk_signal_func(@MoveWordSignalproc), ConvertSignalData(TFPgtkSignalFunction(proc), data, true));
+end;
+
+function TFPgtkEditable.MoveWordSignalConnectAfter (signal:string; proc:TFPgtkMoveWordSignalFunction; data:pointer) : guint;
+begin
+  result := gtk_signal_connect_After (FGtkObject, pgChar(signal), gtk_signal_func(@MoveWordSignalproc), ConvertSignalData(TFPgtkSignalFunction(proc), data, true));
+end;
+
+procedure MovetoSignalproc (Sender:PGtkobject; MoveTo:integer; data:pointer); cdecl;
+var p : TFPgtkMovetoSignalFunction;
+begin
+with PSignalData(data)^ do
+  begin
+  p := TFPgtkMovetoSignalFunction (TheSignalProc);
+  p (TheWidget as TFPgtkObject, MoveTo, TheData)
+  end;
+end;
+
+function TFPgtkEditable.MovetoSignalConnect (signal:string; proc:TFPgtkMovetoSignalFunction; data:pointer) : guint;
+begin
+  result := gtk_signal_connect (FGtkObject, pgChar(signal), gtk_signal_func(@MovetoSignalproc), ConvertSignalData(TFPgtkSignalFunction(proc), data, true));
+end;
+
+function TFPgtkEditable.MovetoSignalConnectAfter (signal:string; proc:TFPgtkMovetoSignalFunction; data:pointer) : guint;
+begin
+  result := gtk_signal_connect_After (FGtkObject, pgChar(signal), gtk_signal_func(@MovetoSignalproc), ConvertSignalData(TFPgtkSignalFunction(proc), data, true));
+end;
+
+function TFPgtkEditable.ConnectChanged (proc:TFPgtkSignalFunction; data:pointer) : guint;
+begin
+  result := SignalConnect (sgChanged, proc, data);
+end;
+
+function TFPgtkEditable.ConnectAfterChanged (proc:TFPgtkSignalFunction; data:pointer) : guint;
+begin
+  result := SignalConnectAfter (sgChanged, proc, data);
+end;
+
+function TFPgtkEditable.ConnectActivate (proc:TFPgtkSignalFunction; data:pointer) : guint;
+begin
+  result := SignalConnect (sgActivate, proc, data);
+end;
+
+function TFPgtkEditable.ConnectAfterActivate (proc:TFPgtkSignalFunction; data:pointer) : guint;
+begin
+  result := SignalConnectAfter (sgActivate, proc, data);
+end;
+
+function TFPgtkEditable.ConnectInsertText (proc:TFPgtkInsertSignalFunction; data:pointer) : guint;
+begin
+  result := InsertSignalConnect (sgInsertText, proc, data);
+end;
+
+function TFPgtkEditable.ConnectAfterInsertText (proc:TFPgtkInsertSignalFunction; data:pointer) : guint;
+begin
+  result := InsertSignalConnectAfter (sgInsertText, proc, data);
+end;
+
+function TFPgtkEditable.ConnectDeleteText (proc:TFPgtkDeleteSignalFunction; data:pointer) : guint;
+begin
+  result := DeleteSignalConnect (sgDeleteText, proc, data);
+end;
+
+function TFPgtkEditable.ConnectAfterDeleteText (proc:TFPgtkDeleteSignalFunction; data:pointer) : guint;
+begin
+  result := DeleteSignalConnectAfter (sgDeleteText, proc, data);
+end;
+
+function TFPgtkEditable.ConnectSetEditable (proc:TFPgtkBooleanSignalFunction; data:pointer) : guint;
+begin
+  result := BooleanSignalConnect (sgSetEditable, proc, data);
+end;
+
+function TFPgtkEditable.ConnectAfterSetEditable (proc:TFPgtkBooleanSignalFunction; data:pointer) : guint;
+begin
+  result := BooleanSignalConnectAfter (sgSetEditable, proc, data);
+end;
+
+function TFPgtkEditable.ConnectMoveCursor (proc:TFPgtkXYSignalFunction; data:pointer) : guint;
+begin
+  result := XYSignalConnect (sgMoveCursor, proc, data);
+end;
+
+function TFPgtkEditable.ConnectAfterMoveCursor (proc:TFPgtkXYSignalFunction; data:pointer) : guint;
+begin
+  result := XYSignalConnectAfter (sgMoveCursor, proc, data);
+end;
+
+function TFPgtkEditable.ConnectMoveWord (proc:TFPgtkMoveWordSignalFunction; data:pointer) : guint;
+begin
+  result := MoveWordSignalConnect (sgMoveWord, proc, data);
+end;
+
+function TFPgtkEditable.ConnectAfterMoveWord (proc:TFPgtkMoveWordSignalFunction; data:pointer) : guint;
+begin
+  result := MoveWordSignalConnectAfter (sgMoveWord, proc, data);
+end;
+
+function TFPgtkEditable.ConnectMovePage (proc:TFPgtkXYSignalFunction; data:pointer) : guint;
+begin
+  result := XYSignalConnect (sgMovePage, proc, data);
+end;
+
+function TFPgtkEditable.ConnectAfterMovePage (proc:TFPgtkXYSignalFunction; data:pointer) : guint;
+begin
+  result := XYSignalConnectAfter (sgMovePage, proc, data);
+end;
+
+function TFPgtkEditable.ConnectMoveToRow (proc:TFPgtkMoveToSignalFunction; data:pointer) : guint;
+begin
+  result := MoveToSignalConnect (sgMoveToRow, proc, data);
+end;
+
+function TFPgtkEditable.ConnectAfterMoveToRow (proc:TFPgtkMoveToSignalFunction; data:pointer) : guint;
+begin
+  result := MoveToSignalConnectAfter (sgMoveToRow, proc, data);
+end;
+
+function TFPgtkEditable.ConnectMoveToCol (proc:TFPgtkMoveToSignalFunction; data:pointer) : guint;
+begin
+  result := MoveToSignalConnect (sgMoveToCol, proc, data);
+end;
+
+function TFPgtkEditable.ConnectAfterMoveToCol (proc:TFPgtkMoveToSignalFunction; data:pointer) : guint;
+begin
+  result := MoveToSignalConnectAfter (sgMoveToCol, proc, data);
+end;
+
+function TFPgtkEditable.ConnectKillChar (proc:TFPgtkDirectionSignalFunction; data:pointer) : guint;
+begin
+  result := DirectionSignalConnect (sgKillChar, proc, data);
+end;
+
+function TFPgtkEditable.ConnectAfterKillChar (proc:TFPgtkDirectionSignalFunction; data:pointer) : guint;
+begin
+  result := DirectionSignalConnectAfter (sgKillChar, proc, data);
+end;
+
+function TFPgtkEditable.ConnectKillWord (proc:TFPgtkDirectionSignalFunction; data:pointer) : guint;
+begin
+  result := DirectionSignalConnect (sgKillWord, proc, data);
+end;
+
+function TFPgtkEditable.ConnectAfterKillWord (proc:TFPgtkDirectionSignalFunction; data:pointer) : guint;
+begin
+  result := DirectionSignalConnectAfter (sgKillWord, proc, data);
+end;
+
+function TFPgtkEditable.ConnectKillLine (proc:TFPgtkDirectionSignalFunction; data:pointer) : guint;
+begin
+  result := DirectionSignalConnect (sgKillLine, proc, data);
+end;
+
+function TFPgtkEditable.ConnectAfterKillLine (proc:TFPgtkDirectionSignalFunction; data:pointer) : guint;
+begin
+  result := DirectionSignalConnectAfter (sgKillLine, proc, data);
+end;
+
+function TFPgtkEditable.ConnectCutClipboard (proc:TFPgtkSignalFunction; data:pointer) : guint;
+begin
+  result := SignalConnect (sgCutClipboard, proc, data);
+end;
+
+function TFPgtkEditable.ConnectAfterCutClipboard (proc:TFPgtkSignalFunction; data:pointer) : guint;
+begin
+  result := SignalConnectAfter (sgCutClipboard, proc, data);
+end;
+
+function TFPgtkEditable.ConnectCopyClipboard (proc:TFPgtkSignalFunction; data:pointer) : guint;
+begin
+  result := SignalConnect (sgCopyClipboard, proc, data);
+end;
+
+function TFPgtkEditable.ConnectAfterCopyClipboard (proc:TFPgtkSignalFunction; data:pointer) : guint;
+begin
+  result := SignalConnectAfter (sgCopyClipboard, proc, data);
+end;
+
+function TFPgtkEditable.ConnectPasteClipboard (proc:TFPgtkSignalFunction; data:pointer) : guint;
+begin
+  result := SignalConnect (sgPasteClipboard, proc, data);
+end;
+
+function TFPgtkEditable.ConnectAfterPasteClipboard (proc:TFPgtkSignalFunction; data:pointer) : guint;
+begin
+  result := SignalConnectAfter (sgPasteClipboard, proc, data);
+end;
+
+ { TFPgtkEntry }
+
+function TFPgtkEntry.TheGtkObject : PGtkEntry;
+begin
+  result := PgtkEntry(FGtkObject);
+end;
+
+procedure TFPgtkEntry.CreateGtkObject;
+begin
+  FGtkObject := PGtkObject(gtk_Entry_new);
+end;
+
+
+procedure TFPgtkEntry.SetText (TheValue:string);
+begin
+  gtk_Entry_set_text (TheGtkObject, Pgchar(TheValue));
+end;
+
+procedure TFPgtkEntry.AppendText (aText:string);
+begin
+  gtk_Entry_append_text (TheGtkObject, ConvertToPgchar(aText));
+end;
+
+procedure TFPgtkEntry.PrependText (aText:string);
+begin
+  gtk_Entry_prepend_text (TheGtkObject, ConvertToPgchar(aText));
+end;
+
+function TFPgtkEntry.GetVisibility : boolean;
+begin
+  result := boolean(gtk.visible(TheGtkObject^));
+end;
+
+procedure TFPgtkEntry.SetVisibility (TheValue:boolean);
+begin
+  gtk_Entry_set_visibility(TheGtkObject,TheValue);
+end;
+
+function TFPgtkEntry.GetMaxLength : word;
+begin
+  result := TheGtkObject^.text_max_length;
+end;
+
+procedure TFPgtkEntry.SetMaxLength (TheValue:word);
+begin
+  gtk_Entry_set_max_length(TheGtkObject,TheValue);
+end;
+
+ { TFPgtkSpinButton }
+
+function TFPgtkSpinButton.TheGtkObject : PGtkSpinButton;
+begin
+  result := PgtkSpinButton(FGtkObject);
+end;
+
+procedure TFPgtkSpinButton.CreateGtkObject;
+begin
+  FGtkObject := PGtkObject(gtk_spin_button_new (TFPgtkAdjustment.Create.TheGtkObject,1,0));
+end;
+
+
+procedure TFPgtkSpinButton.Configure (Adj:TFPgtkAdjustment; aClimbRate:gfloat; aDigits:integer);
+begin
+  if assigned (Adj) then
+    gtk_spin_button_configure (TheGtkObject, PGtkadjustment(Adj.TheGtkObject), aClimbRate, aDigits)
+  else
+    gtk_spin_button_configure (TheGtkObject, nil, aClimbRate, aDigits);
+end;
+
+function TFPgtkSpinButton.GetAdjustment : TFPgtkAdjustment;
+begin
+  result := GetPascalInstance(PGtkObject(gtk_spin_button_get_adjustment(TheGtkObject)),TFPGtkAdjustment) as TFPgtkAdjustment;
+end;
+
+procedure TFPgtkSpinButton.SetAdjustment (TheValue:TFPgtkAdjustment);
+begin
+  gtk_spin_button_set_adjustment(TheGtkObject,PGtkadjustment(ConvertToGtkObject(TheValue)));
+end;
+
+function TFPgtkSpinButton.GetClimbRate : gfloat;
+begin
+  result := TheGtkObject^.climb_rate;
+end;
+
+procedure TFPgtkSpinButton.SetClimbRate (TheValue:gfloat);
+begin
+  TheGtkObject^.climb_rate := TheValue;
+end;
+
+function TFPgtkSpinButton.GetDigits : integer;
+begin
+  result := gtk.digits(TheGtkObject^);
+end;
+
+procedure TFPgtkSpinButton.SetDigits (TheValue:integer);
+begin
+  gtk_spin_button_set_digits(TheGtkObject,TheValue);
+end;
+
+function TFPgtkSpinButton.GetAsInteger : integer;
+begin
+  result := gtk_spin_button_get_value_as_int(TheGtkObject);
+end;
+
+procedure TFPgtkSpinButton.SetAsInteger (TheValue:integer);
+begin
+  gtk_spin_button_set_Value(TheGtkObject,TheValue);
+end;
+
+function TFPgtkSpinButton.GetAsFloat : gfloat;
+begin
+  result := gtk_spin_button_get_value_as_int(TheGtkObject);
+end;
+
+procedure TFPgtkSpinButton.SetAsFloat (TheValue:gfloat);
+begin
+  gtk_spin_button_set_Value(TheGtkObject,TheValue);
+end;
+
+function TFPgtkSpinButton.GetUpdatePolicy : TGtkSpinButtonUpdatePolicy;
+begin
+  result := TheGtkObject^.update_policy;
+end;
+
+procedure TFPgtkSpinButton.SetUpdatePolicy (TheValue:TGtkSpinButtonUpdatePolicy);
+begin
+  gtk_spin_button_set_update_policy(TheGtkObject,TheValue);
+end;
+
+function TFPgtkSpinButton.GetNumeric : boolean;
+begin
+  result := boolean(gtk.numeric(TheGtkObject^));
+end;
+
+procedure TFPgtkSpinButton.SetNumeric (TheValue:boolean);
+begin
+  gtk_spin_button_set_numeric(TheGtkObject,TheValue);
+end;
+
+procedure TFPgtkSpinButton.Spin (direction:TGtkSpinType; increment:gfloat);
+begin
+  gtk_spin_button_spin (TheGtkObject, direction, increment);
+end;
+
+function TFPgtkSpinButton.GetWrap : boolean;
+begin
+  result := boolean(gtk.wrap(TheGtkObject^));
+end;
+
+procedure TFPgtkSpinButton.SetWrap (TheValue:boolean);
+begin
+  gtk_spin_button_set_wrap(TheGtkObject,TheValue);
+end;
+
+function TFPgtkSpinButton.GetShadowType : TGtkShadowType;
+begin
+  result := TheGtkObject^.shadow_type;
+end;
+
+procedure TFPgtkSpinButton.SetShadowType (TheValue:TGtkShadowType);
+begin
+  gtk_spin_button_set_shadow_type(TheGtkObject,TheValue);
+end;
+
+function TFPgtkSpinButton.GetSnapToTicks : boolean;
+begin
+  result := boolean(gtk.snap_to_ticks(TheGtkObject^));
+end;
+
+procedure TFPgtkSpinButton.SetSnapToTicks (TheValue:boolean);
+begin
+  gtk_spin_button_set_snap_to_ticks(TheGtkObject,TheValue);
+end;
+
+procedure TFPgtkSpinButton.Update;
+begin
+  gtk_spin_button_update (TheGtkObject);
+end;
+
+ { TFPgtkText }
+
+function TFPgtkText.TheGtkObject : PGtkText;
+begin
+  result := PgtkText(FGtkObject);
+end;
+
+procedure TFPgtkText.CreateGtkObject;
+begin
+  FGtkObject := PGtkObject(gtk_Text_new (null,null));
+end;
+
+
+constructor TFPgtkText.Create;
+begin
+  inherited create;
+  editable := true;
+  wordwrap := true;
+  linewrap := true;
+  FLines := TStringlist.Create;
+  ConnectChanged (@SigChanged, nil);
+end;
+
+
+destructor TFPgtkText.Destroy;
+begin
+  FLines.Free;
+  inherited;
+end;
+
+
+procedure TFPgtkText.SigChanged (Sender:TFPgtkObject; data:pointer);
+begin
+  FIsChanged := True;
+end;
+
+procedure TFPgtkText.RefreshLines;
+begin
+  if not assigned (FLines) then
+    FLines := TStringlist.Create;
+  FLines.Text := Text;
+end;
+
+function TFPgtkText.GetLines : TStrings;
+begin
+  if FIsChanged then
+    RefreshLines;
+  result := FLines;
+end;
+
+procedure TFPgtkText.Freeze;
+begin
+  gtk_Text_Freeze (TheGtkObject);
+end;
+
+procedure TFPgtkText.Thaw;
+begin
+  gtk_Text_Thaw (TheGtkObject);
+end;
+
+function TFPgtkText.TextLength : guint;
+begin
+  result := gtk_Text_get_length (TheGtkObject);
+end;
+
+procedure TFPgtkText.Insert (font:PgdkFont; fore:PgdkColor; back:PgdkColor; TheText:string);
+begin
+  gtk_text_insert (TheGtkObject, font, fore, back, pgchar(TheText), length(TheText));
+end;
+
+procedure TFPgtkText.DeleteBackward (number:longword);
+begin
+  gtk_Text_Backward_Delete (TheGtkObject, number);
+end;
+
+procedure TFPgtkText.DeleteForward (number:longword);
+begin
+  gtk_Text_Forward_Delete (TheGtkObject, number);
+end;
+
+function TFPgtkText.GetWordWrap : boolean;
+begin
+  result := boolean(gtk.word_wrap(TheGtkObject^));
+end;
+
+procedure TFPgtkText.SetWordWrap (TheValue:boolean);
+begin
+  gtk_text_set_word_wrap (TheGtkObject,gint(TheValue));
+end;
+
+function TFPgtkText.GetLineWrap : boolean;
+begin
+  result := boolean(gtk.Line_Wrap(TheGtkObject^));
+end;
+
+procedure TFPgtkText.SetLineWrap (TheValue:boolean);
+begin
+{$IFDEF win32 or go32v2}
+  Set_Line_Wrap (TheGtkObject^, gint(TheValue));
+{$ELSE}
+  gtk_Text_Set_Line_Wrap (TheGtkObject, gint(TheValue));
+{$ENDIF}
+end;
+
+function TFPgtkText.GetPoint : integer;
+begin
+  result := gtk_Text_get_Point(TheGtkObject);
+end;
+
+procedure TFPgtkText.SetPoint (TheValue:integer);
+begin
+  gtk_Text_set_Point(TheGtkObject,TheValue);
+end;
+
+procedure TFPgtkText.SetAdjustments (hadj:TFPgtkAdjustment; vadj:TFPgtkAdjustment);
+begin
+  gtk_text_set_adjustments (TheGtkObject, hadj.TheGtkObject, vadj.TheGtkObject);
+end;
+
+function TFPgtkText.GetHAdjustment : TFPgtkAdjustment;
+begin
+  result := GetPascalInstance(PGtkObject(TheGtkObject^.hadj),tfpgtkadjustment) as tfpgtkadjustment;
+end;
+
+procedure TFPgtkText.SetHAdjustment (TheValue:TFPgtkAdjustment);
+begin
+  gtk_Text_Set_Adjustments(TheGtkObject, TheValue.TheGtkObject, TheGtkObject^.vadj);
+end;
+
+function TFPgtkText.GetVAdjustment : TFPgtkAdjustment;
+begin
+  result := GetPascalInstance(PGtkObject(TheGtkObject^.vadj),tfpgtkadjustment) as tfpgtkadjustment;
+end;
+
+procedure TFPgtkText.SetVAdjustment (TheValue:TFPgtkAdjustment);
+begin
+  gtk_Text_Set_Adjustments(TheGtkObject, TheGtkObject^.hadj, TheValue.TheGtkObject);
+end;
+
+procedure TFPgtkText.SetText (TheValue:string);
+begin
+  Freeze;
+  {$ifdef gtkwin}
+  TheValue := stringreplace (TheValue, #13#10, #10, [rfReplaceAll]);
+  {$endif}
+  clear;
+  Insert (null, null, null, TheValue);
+  Thaw;
+end;
+
+ { TFPgtkRuler }
+
+function TFPgtkRuler.TheGtkObject : PGtkRuler;
+begin
+  result := PgtkRuler(FGtkObject);
+end;
+
+
+procedure TFPgtkRuler.SetMetric (aMetric:TGtkMetricType);
+begin
+  gtk_ruler_set_metric (TheGtkObject, aMetric);
+end;
+
+procedure TFPgtkRuler.SetRange (Lower:float; Upper:float; Position:float; MaxSize:float);
+begin
+  gtk_ruler_set_range (TheGtkObject, Lower, Upper, Position, MaxSize);
+end;
+
+ { TFPgtkHRuler }
+
+function TFPgtkHRuler.TheGtkObject : PGtkHRuler;
+begin
+  result := PgtkHRuler(FGtkObject);
+end;
+
+procedure TFPgtkHRuler.CreateGtkObject;
+begin
+  FGtkObject := PGtkObject(gtk_hruler_new);
+end;
+
+
+ { TFPgtkVRuler }
+
+function TFPgtkVRuler.TheGtkObject : PGtkVRuler;
+begin
+  result := PgtkVRuler(FGtkObject);
+end;
+
+procedure TFPgtkVRuler.CreateGtkObject;
+begin
+  FGtkObject := PGtkObject(gtk_vruler_new);
+end;
+
+
+ { TFPgtkRange }
+
+function TFPgtkRange.TheGtkObject : PGtkRange;
+begin
+  result := PgtkRange(FGtkObject);
+end;
+
+
+function TFPgtkRange.GetAdjustment : TFPgtkAdjustment;
+begin
+  result := GetPascalInstance(PGtkObject(gtk_Range_get_Adjustment(TheGtkObject)),tfpgtkadjustment) as tfpgtkadjustment;
+end;
+
+procedure TFPgtkRange.SetAdjustment (TheValue:TFPgtkAdjustment);
+begin
+  gtk_Range_set_adjustment(TheGtkObject,PGtkadjustment(ConvertToGtkObject(TheValue)));
+end;
+
+function TFPgtkRange.GetUpdatePolicy : TgtkUpdateType;
+begin
+  result := gtk.policy(TheGtkObject^);
+end;
+
+procedure TFPgtkRange.SetUpdatePolicy (TheValue:TgtkUpdateType);
+begin
+  gtk_Range_set_update_policy(TheGtkObject,TheValue);
+end;
+
+constructor TFPgtkRange.Create (AnAdjustment:TFPgtkAdjustment);
+begin
+  FAdj := AnAdjustment;
+  inherited create;
+end;
+
+
+procedure TFPgtkRange.DrawBackground;
+begin
+  gtk_Range_draw_background (TheGtkObject);
+end;
+
+procedure TFPgtkRange.DrawTrough;
+begin
+  gtk_Range_draw_trough (TheGtkObject);
+end;
+
+procedure TFPgtkRange.DrawStepForw;
+begin
+  gtk_Range_draw_step_forw (TheGtkObject);
+end;
+
+procedure TFPgtkRange.DrawStepBack;
+begin
+  gtk_Range_draw_step_back (TheGtkObject);
+end;
+
+procedure TFPgtkRange.DrawSlider;
+begin
+  gtk_Range_draw_slider (TheGtkObject);
+end;
+
+procedure TFPgtkRange.SliderUpdate;
+begin
+  gtk_Range_slider_update (TheGtkObject);
+end;
+
+function TFPgtkRange.TroughClick (X:integer; Y:integer; var JumpPerc:gfloat) : integer;
+begin
+  result := gtk_Range_trough_click (TheGtkObject, X, Y, @JumpPerc);
+end;
+
+procedure TFPgtkRange.DefaultHSliderUpdate;
+begin
+  gtk_Range_default_hslider_update (TheGtkObject);
+end;
+
+procedure TFPgtkRange.DefaultVSliderUpdate;
+begin
+  gtk_Range_default_vslider_update (TheGtkObject);
+end;
+
+function TFPgtkRange.DefaultHTroughClick (X:integer; Y:integer; var JumpPerc:gfloat) : integer;
+begin
+  result := gtk_Range_default_htrough_click (TheGtkObject, X, Y, @JumpPerc);
+end;
+
+function TFPgtkRange.DefaultVTroughClick (X:integer; Y:integer; var JumpPerc:gfloat) : integer;
+begin
+  result := gtk_Range_default_vtrough_click (TheGtkObject, X, Y, @JumpPerc);
+end;
+
+procedure TFPgtkRange.defaultHMotion (XDelta:integer; YDelta:integer);
+begin
+  gtk_Range_default_hmotion (TheGtkObject, XDelta, YDelta);
+end;
+
+procedure TFPgtkRange.defaultVMotion (XDelta:integer; YDelta:integer);
+begin
+  gtk_Range_default_vmotion (TheGtkObject, XDelta, YDelta);
+end;
+
+procedure TFPgtkRange.ClearBackground;
+begin
+  gtk_Range_clear_background (TheGtkObject);
+end;
+
+ { TFPgtkScale }
+
+function TFPgtkScale.TheGtkObject : PGtkScale;
+begin
+  result := PgtkScale(FGtkObject);
+end;
+
+
+procedure TFPgtkScale.SetDigits (TheValue:integer);
+begin
+  gtk_scale_set_digits (TheGtkObject, TheValue);
+end;
+
+function TFPgtkScale.GetDrawValue : boolean;
+begin
+  result := boolean(gtk.draw_value(TheGtkObject^));
+end;
+
+procedure TFPgtkScale.SetDrawValue (TheValue:boolean);
+begin
+  gtk_scale_set_draw_value(TheGtkObject,TheValue);
+end;
+
+function TFPgtkScale.GetValuePos : TGtkPositionType;
+begin
+  result := gtk.value_pos(TheGtkObject^);
+end;
+
+procedure TFPgtkScale.SetValuePos (TheValue:TGtkPositionType);
+begin
+  gtk_scale_set_value_pos(TheGtkObject,TheValue);
+end;
+
+ { TFPgtkHScale }
+
+function TFPgtkHScale.TheGtkObject : PGtkHScale;
+begin
+  result := PgtkHScale(FGtkObject);
+end;
+
+procedure TFPgtkHScale.CreateGtkObject;
+begin
+  FGtkObject := PGtkObject(gtk_hscale_new (nil));
+end;
+
+
+ { TFPgtkVScale }
+
+function TFPgtkVScale.TheGtkObject : PGtkVScale;
+begin
+  result := PgtkVScale(FGtkObject);
+end;
+
+procedure TFPgtkVScale.CreateGtkObject;
+begin
+  FGtkObject := PGtkObject(gtk_vscale_new (nil));
+end;
+
+
+ { TFPgtkScrollbar }
+
+function TFPgtkScrollbar.TheGtkObject : PGtkScrollbar;
+begin
+  result := PgtkScrollbar(FGtkObject);
+end;
+
+
+ { TFPgtkHScrollbar }
+
+function TFPgtkHScrollbar.TheGtkObject : PGtkHScrollbar;
+begin
+  result := PgtkHScrollbar(FGtkObject);
+end;
+
+
+procedure TFPgtkHScrollbar.CreateGtkObject;
+var a : PgtkAdjustment;
+begin
+  if assigned (FAdj) then
+    a := FAdj.TheGtkObject
+  else
+    a := null;
+  FGtkObject := PgtkObject (gtk_hscrollbar_new (a));
+  FAdj := nil;
+end;
+
+ { TFPgtkVScrollbar }
+
+
+procedure TFPgtkVScrollbar.CreateGtkObject;
+var a : PgtkAdjustment;
+begin
+  if assigned (FAdj) then
+    a := FAdj.TheGtkObject
+  else
+    a := null;
+  FGtkObject := PgtkObject (gtk_vscrollbar_new (a));
+  FAdj := nil;
+end;
+
+ { TFPgtkSeparator }
+
+function TFPgtkSeparator.TheGtkObject : PGtkSeparator;
+begin
+  result := PgtkSeparator(FGtkObject);
+end;
+
+
+ { TFPgtkHSeparator }
+
+function TFPgtkHSeparator.TheGtkObject : PGtkHSeparator;
+begin
+  result := PgtkHSeparator(FGtkObject);
+end;
+
+procedure TFPgtkHSeparator.CreateGtkObject;
+begin
+  FGtkObject := PGtkObject(gtk_HSeparator_new);
+end;
+
+
+ { TFPgtkVSeparator }
+
+function TFPgtkVSeparator.TheGtkObject : PGtkVSeparator;
+begin
+  result := PgtkVSeparator(FGtkObject);
+end;
+
+procedure TFPgtkVSeparator.CreateGtkObject;
+begin
+  FGtkObject := PGtkObject(gtk_VSeparator_new);
+end;
+
+
+ { TFPgtkPreview }
+
+function TFPgtkPreview.TheGtkObject : PGtkPreview;
+begin
+  result := PgtkPreview(FGtkObject);
+end;
+
+procedure TFPgtkPreview.CreateGtkObject;
+begin
+  FGtkObject := PGtkObject(gtk_preview_new (GTK_PREVIEW_COLOR));
+end;
+
+
+procedure TFPgtkPreview.Size (aWidth:integer; aHeight:integer);
+begin
+  gtk_preview_size (TheGtkObject, aWidth, aHeight);
+end;
+
+procedure TFPgtkPreview.Put (aWindow:PGdkWindow; gc:PGdkGC; SrcX:integer; SrcY:integer; destX:integer; DestY:integer; aWidth:integer; aHeight:integer);
+begin
+  gtk_preview_put (TheGtkObject, aWindow, gc, SrcX, SrcY, destX, DestY, aWidth, aHeight);
+end;
+
+procedure TFPgtkPreview.DrawRow (data:pguchar; X:integer; Y:integer; W:integer);
+begin
+  gtk_preview_draw_row (TheGtkObject, data, X, Y, W);
+end;
+
+procedure SetGamma (aGamma:double);
+begin
+  gtk_preview_set_gamma (aGamma);
+end;
+
+
+function TFPgtkPreview.GetExpand : longbool;
+begin
+  result := longbool(gtk.expand(TheGtkObject^));
+end;
+
+procedure TFPgtkPreview.SetExpand (TheValue:longbool);
+begin
+  gtk_preview_set_expand(TheGtkObject,gint(TheValue));
+end;
+
+function TFPgtkPreview.GetDither : TGdkRgbDither;
+begin
+  result := TheGtkObject^.dither;
+end;
+
+procedure TFPgtkPreview.SetDither (TheValue:TGdkRgbDither);
+begin
+  gtk_preview_set_dither(TheGtkObject,TheValue);
+end;
+
+ { TFPgtkProgress }
+
+function TFPgtkProgress.TheGtkObject : PGtkProgress;
+begin
+  result := PgtkProgress(FGtkObject);
+end;
+
+
+function TFPgtkProgress.GetShowtext : longbool;
+begin
+  result := longbool(gtk.show_text(TheGtkObject^));
+end;
+
+procedure TFPgtkProgress.SetShowtext (TheValue:longbool);
+begin
+  gtk_progress_set_show_text(TheGtkObject,gint(TheValue));
+end;
+
+function TFPgtkProgress.GetTextXAlign : gfloat;
+begin
+  result := TheGtkObject^.x_align;
+end;
+
+procedure TFPgtkProgress.SetTextXAlign (TheValue:gfloat);
+begin
+  gtk_progress_set_text_alignment (TheGtkObject, TheValue, TextYAlign);
+end;
+
+function TFPgtkProgress.GetTextYAlign : gfloat;
+begin
+  result := TheGtkObject^.y_align;
+end;
+
+procedure TFPgtkProgress.SetTextYAlign (TheValue:gfloat);
+begin
+  gtk_progress_set_text_alignment (TheGtkObject, TextXAlign, TheValue);
+end;
+
+procedure TFPgtkProgress.SetTextAlignment (anXalign:gfloat; anYAlign:gfloat);
+begin
+  gtk_progress_set_text_alignment (TheGtkObject, anXalign, anYAlign);
+end;
+
+function TFPgtkProgress.GetCurrentValue : float;
+begin
+  result := gtk_progress_get_Value(TheGtkObject);
+end;
+
+procedure TFPgtkProgress.SetCurrentValue (TheValue:float);
+begin
+  gtk_progress_Set_value (TheGtkObject, TheValue);
+  Draw (nil);
+end;
+
+function TFPgtkProgress.GetPercentage : float;
+begin
+  result := gtk_progress_get_current_percentage(TheGtkObject);
+end;
+
+procedure TFPgtkProgress.SetPercentage (TheValue:float);
+begin
+  gtk_progress_set_percentage(TheGtkObject,TheValue);
+end;
+
+function TFPgtkProgress.PercentageFromValue (aValue:gfloat) : gfloat;
+begin
+  result := gtk_progress_get_percentage_from_value (TheGtkObject, aValue);
+end;
+
+function TFPgtkProgress.GetFormatString : string;
+begin
+  result := TheGtkObject^.format;
+end;
+
+procedure TFPgtkProgress.SetFormatString (TheValue:string);
+begin
+  gtk_progress_set_format_string(TheGtkObject,ConvertToPgchar(TheValue));
+end;
+
+function TFPgtkProgress.GetAdjustment : TFPgtkAdjustment;
+begin
+  result := GetPascalInstance (PGtkObject(TheGtkObject^.adjustment), TFPgtkAdjustment) as TFPgtkAdjustment;
+end;
+
+procedure TFPgtkProgress.SetAdjustment (TheValue:TFPgtkAdjustment);
+begin
+  gtk_progress_set_adjustment(TheGtkObject,PGtkadjustment(ConvertToGtkObject(TheValue)));
+end;
+
+function TFPgtkProgress.GetActivityMode : longbool;
+begin
+  result := longbool(gtk.activity_mode(TheGtkObject^));
+end;
+
+procedure TFPgtkProgress.SetActivityMode (TheValue:longbool);
+begin
+  gtk_progress_set_activity_mode(TheGtkObject,gint(TheValue));
+end;
+
+function TFPgtkProgress.CurrentText : string;
+begin
+  result := gtk_progress_get_current_text (TheGtkObject);
+end;
+
+function TFPgtkProgress.TextFromValue (aValue:gfloat) : string;
+begin
+  result := gtk_progress_get_text_from_value (TheGtkObject, aValue);
+end;
+
+procedure TFPgtkProgress.Configure (aValue:gfloat; aMin:gfloat; aMax:gfloat);
+begin
+  gtk_progress_configure (TheGtkObject, aValue, aMin, aMax);
+end;
+
+ { TFPgtkProgressBar }
+
+function TFPgtkProgressBar.TheGtkObject : PGtkProgressBar;
+begin
+  result := PgtkProgressBar(FGtkObject);
+end;
+
+
+constructor TFPgtkProgressBar.Create (adj:TFPgtkAdjustment);
+begin
+  FAdj := adj;
+  inherited create;
+end;
+
+
+procedure TFPgtkProgressBar.CreateGtkObject;
+begin
+  if assigned (FAdj) then
+    TheGtkWidget := gtk_progress_bar_new_with_adjustment (FAdj.TheGtkObject)
+  else
+    TheGtkWidget := gtk_progress_bar_new;
+end;
+
+function TFPgtkProgressBar.GetBarStyle : TGtkProgressBarStyle;
+begin
+  result := TheGtkObject^.bar_style;
+end;
+
+procedure TFPgtkProgressBar.SetBarStyle (TheValue:TGtkProgressBarStyle);
+begin
+  gtk_progress_bar_set_bar_style(TheGtkObject,TheValue);
+end;
+
+function TFPgtkProgressBar.GetDiscreteBlocks : longword;
+begin
+  result := TheGtkObject^.blocks;
+end;
+
+procedure TFPgtkProgressBar.SetDiscreteBlocks (TheValue:longword);
+begin
+  gtk_progress_bar_set_discrete_blocks(TheGtkObject,TheValue);
+end;
+
+function TFPgtkProgressBar.GetActivityStep : longword;
+begin
+  result := TheGtkObject^.activity_step;
+end;
+
+procedure TFPgtkProgressBar.SetActivityStep (TheValue:longword);
+begin
+  gtk_progress_bar_set_activity_step(TheGtkObject,TheValue);
+end;
+
+function TFPgtkProgressBar.GetActivityBlocks : longword;
+begin
+  result := TheGtkObject^.activity_blocks;
+end;
+
+procedure TFPgtkProgressBar.SetActivityBlocks (TheValue:longword);
+begin
+  gtk_progress_bar_set_activity_blocks(TheGtkObject,TheValue);
+end;
+
+function TFPgtkProgressBar.GetOrientation : TGtkProgressBarOrientation;
+begin
+  result := TheGtkObject^.orientation;
+end;
+
+procedure TFPgtkProgressBar.SetOrientation (TheValue:TGtkProgressBarOrientation);
+begin
+  gtk_progress_bar_set_orientation(TheGtkObject,TheValue);
+end;
+
+ { TFPgtkItemFactory }
+
+
+INITIALIZATION
+ObjectsToFree := TList.Create;
+
+FINALIZATION
+ObjectsToFree.Free;
+if assigned (TheTooltips) then
+  TheTooltips.Free;
+
+End.

+ 1137 - 0
packages/extra/fpgtk/fpgtkext.pp

@@ -0,0 +1,1137 @@
+{$mode objfpc}{$h+}
+unit FPgtkExt;
+
+interface
+
+uses FPgtk, gtk, gdk, glib, sysutils, classes;
+
+{ ==== Application object ==== }
+
+type
+  TFPgtkApplication = class
+  Private
+    FMainwindow : TFPgtkWindow;
+    FMainDestroysignal : guint;
+    procedure SetMainWindow (Value:TFPgtkWindow);
+    procedure MainDestroyed (Sender:TFPgtkObject; data:pointer);
+  Public
+    constructor Create;
+    destructor Destroy; override;
+    procedure Run;
+    property Mainwindow : TFPgtkWindow read FMainwindow write SetMainwindow;
+  end;
+
+var
+  Application : TFPgtkApplication;
+
+{ ==== Extra Widgets ==== }
+
+type
+
+  TFPgtkFileEntry = class (TFPgtkHBox)
+  private
+    FEdit : TFPgtkEntry;
+    FButton : TFPgtkButton;
+    FImage : TFPgtkPixmap;
+    procedure OpenFileSelection (Sender : TFPgtkObject; data : pointer);
+    procedure CloseFileSelection (Sender:TFPgtkWindow; DialogResult:pointer; 
+                                    Action:integer; initiator:TFPgtkObject);
+    procedure SetFilename (Value : string);
+    function GetFilename : string;
+  public
+    constructor create;
+    property Edit : TFPgtkEntry read FEdit;
+    property Button : TFPgtkButton read FButton;
+    property Image : TFPgtkPixmap read FImage;
+    property Filename : string read GetFilename write SetFilename;
+  end;
+
+  TFPgtkCheckedButton = class (TFPgtkToggleButton)
+  private
+    FChecked, FUnchecked : TFPgtkPixmap;
+    procedure ChangeCheck (Sender:TFPgtkObject; data:pointer);
+  public
+    constructor Create;
+    constructor CreateWithLabel (aText:string);
+    constructor CreateWithLabel (aText:string; AccelGroup : PGtkAccelGroup);
+  end;
+
+{ ==== Widget who needs a scrollwindow ==== }
+
+type
+
+  TFPgtkScrollText = class (TFPgtkScrolledWindow)
+  private
+    FText : TFPgtkText;
+    procedure SetTooltip (Value : string);
+    function GetTooltip : string;
+    function GetUdpatePolicy : TGtkUpdateType;
+    procedure SetUpdatePolicy (Value : TGtkUpdateType);
+    function GetText : string;
+    procedure SetText (Value : string);
+    function GetLines : TStrings;
+  public
+    constructor create;
+    procedure Clear;
+    property TheText : TFPgtkText read FText;
+    property Tooltip : string read GetTooltip write SetTooltip;
+    property UpdatePolicy : TGtkUpdateType read GetUdpatePolicy write SetUpdatePolicy;
+    property Text : string read GetText write SetText;
+    property Lines : TStrings read GetLines;
+  end;
+
+  TFPgtkScrollList = class (TFPgtkScrolledWindow)
+  private
+    FList : TFPgtkList;
+  public
+    constructor create;
+    property List : TFPgtkList read FList;
+  end;
+
+  TFPgtkScrollCList = class (TFPgtkScrolledWindow)
+  private
+    FCList : TFPgtkCList;
+  public
+    constructor create (CountColumns : integer);
+    property CList : TFPgtkCList read FCList;
+  end;
+
+  TFPgtkScrollTree = class (TFPgtkScrolledWindow)
+  private
+    FTree : TFPgtkTree;
+  public
+    constructor create;
+    property Tree : TFPgtkTree read FTree;
+  end;
+
+{ ==== Message dialogs ==== }
+
+type
+  TModalResult = Low(Integer)..High(Integer);
+  
+  TMsgDlgType = (mtWarning, mtError, mtInformation, mtConfirmation, mtCustom);
+  TMsgDlgBtn = (mbYes, mbNo, mbOK, mbCancel, mbAbort, mbRetry, mbIgnore,
+                mbAll, mbNoToAll, mbYesToAll, mbHelp);
+  TMsgDlgButtons = set of TMsgDlgBtn;
+
+const
+  mbYesNo            = [mbYes,mbNo];
+  mbYesNoCancel      = [mbYes, mbNo, mbCancel];
+  mbOKCancel         = [mbOK, mbCancel];
+  mbAbortRetryIgnore = [mbAbort, mbRetry, mbIgnore];
+  
+  mrNone = 0;
+  mrOK = mrNone + 1;
+  mrCancel = mrNone + 2;
+  mrAbort = mrNone + 3;
+  mrRetry = mrNone + 4;
+  mrIgnore = mrNone + 5;
+  mrYes = mrNone + 6;
+  mrNo = mrNone + 7;
+  mrAll = mrNone + 8;
+  mrNoToAll = mrNone + 9;
+  mrYesToAll = mrNone + 10;
+                                 
+function MessageDlg(const aMsg: string; DlgType: TMsgDlgType;
+                    Buttons: TMsgDlgButtons; HelpCtx: Longint): Integer;
+                
+
+function MessageDlg(const Fmt: string; Args : Array of const; DlgType: TMsgDlgType;
+                    Buttons: TMsgDlgButtons; HelpCtx: Longint): Integer;
+                                                              
+procedure ShowMessage (const aTitle, aMessage : string);
+
+{ ==== Menu handling ==== }
+
+type
+  TAccelKeyDef = record
+    Key : guint;
+    Mods : TGdkModifierType;
+    AG : PGtkAccelGroup;
+  end;
+  PAccelKeyDef = ^TAccelKeyDef;
+
+  TAccelModifier = (amShift, amLock, amControl, amMod1, amMod2, amMod3, amMod4,
+                    amMod5, amButton1, amButton2, amButton3, amButton4, amButton5,
+                    amRelease);
+  TAccelModifiersSet = set of TAccelModifier;
+
+const
+  amAlt = amMod1;
+  gdk_Alt_mask = gdk_mod1_Mask;
+  DefaultAccelFlags : TGtkAccelFlags = GTK_ACCEL_VISIBLE;
+
+function RemoveUnderscore (s : string) : string;
+function ConvertAccelModifier (amSet : TAccelModifiersSet) : TGdkModifierType;
+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 : TAccelModifiersSet) : PAccelKeyDef; overload;
+function MakeAccelKeyDef (anAG : PGtkAccelGroup; aKey : guint; aMods : TGdkModifierType) : PAccelKeyDef; overload;
+function MakeAccelKeyDef (anAG : PGtkAccelGroup; aKey : guint; aMods : TAccelModifiersSet) : PAccelKeyDef; overload;
+
+function NewMenuBar (items : array of TFPgtkMenuItem) : TFPgtkMenuBar;
+function NewMenu (ATitle : string; items : array of TFPgtkMenuItem) : TFPgtkMenu;
+
+function NewMenuItem (ACaption, AToolTip, AprivText : string; Accelerator : PAccelKeyDef;
+                      ActivateFunc : TFPgtkSignalFunction; AData : pointer) : TFPgtkMenuItem; overload;
+function NewMenuItem (ACaption, AToolTip, AprivText : string;
+                      ActivateFunc : TFPgtkSignalFunction; AData : pointer) : TFPgtkMenuItem; overload;
+function NewMenuItem (ACaption : string; Accelerator : PAccelKeyDef;
+                      ActivateFunc : TFPgtkSignalFunction; AData : pointer) : TFPgtkMenuItem; overload;
+function NewMenuItem (ACaption : string; ActivateFunc : TFPgtkSignalFunction; AData : pointer) : TFPgtkMenuItem; overload;
+function NewMenuItem (ACaption : string) : TFPgtkMenuItem; overload;
+
+function NewLine : TFPgtkMenuItem;
+function NewTearOffMenu : TFPgtkTearOffMenuItem;
+
+function NewSubMenu (ACaption, ATooltip, AprivText : string; Accelerator : PAccelKeyDef;
+                     Items : array of TFPgtkMenuItem) : TFPgtkMenuItem; Overload;
+function NewSubMenu (ACaption, ATooltip, AprivText : string;
+                     Items : array of TFPgtkMenuItem) : TFPgtkMenuItem; Overload;
+function NewSubMenu (ACaption : string; Accelerator : PAccelKeyDef;
+                     Items : array of TFPgtkMenuItem) : TFPgtkMenuItem; Overload;
+function NewSubMenu (ACaption : string; Items : array of TFPgtkMenuItem) : TFPgtkMenuItem; Overload;
+
+function NewCheckMenuItem (ACaption, AToolTip, AprivText : string; Accelerator : PAccelKeyDef;
+                      ToggledFunc : TFPgtkSignalFunction; AData : pointer) : TFPgtkCheckMenuItem; Overload;
+function NewCheckMenuItem (ACaption, AToolTip, AprivText : string;
+                      ToggledFunc : TFPgtkSignalFunction; AData : pointer) : TFPgtkCheckMenuItem; Overload;
+function NewCheckMenuItem (ACaption : string; Accelerator : PAccelKeyDef;
+                      ToggledFunc : TFPgtkSignalFunction; AData : pointer) : TFPgtkCheckMenuItem; Overload;
+function NewCheckMenuItem (ACaption : string; ToggledFunc : TFPgtkSignalFunction; AData : pointer) : TFPgtkCheckMenuItem; Overload;
+
+procedure InsertMenuItemGroup (InMenu : TFPgtkMenuShell; position : integer; MenuItems : TFPgtkItemGroup); Overload;
+procedure InsertMenuItemGroup (InMenu : TFPgtkMenuShell; position : integer;
+                 MenuItems : TFPgtkItemGroup; ActivateProc : TFPgtkSignalFunction; ActivateData : pointer); Overload;
+procedure AppendMenuItemGroup (InMenu : TFPgtkmenuShell; MenuItems : TFPgtkItemGroup); Overload;
+procedure AppendMenuItemGroup (InMenu : TFPgtkmenuShell; MenuItems : TFPgtkItemGroup;
+                               ActivateProc : TFPgtkSignalFunction; ActivateData : pointer); Overload;
+procedure PrependMenuItemGroup (InMenu : TFPgtkmenuShell; MenuItems : TFPgtkItemGroup); Overload;
+procedure PrependMenuItemGroup (InMenu : TFPgtkmenuShell; MenuItems : TFPgtkItemGroup;
+                                ActivateProc : TFPgtkSignalFunction; ActivateData : pointer); Overload;
+
+implementation
+
+resourcestring
+  rsNothingToRun = 'No main window defined, nothing to do...';
+  rsErrorTitle = 'Error occured';
+  rsMessageTitle = 'Message';
+  sErrWrongItemType = 'Items in list are not from TFPgtkMenuItem class.';
+
+ { TFPgtkApplication }
+
+constructor TFPgtkApplication.Create;
+begin
+  gtk_init (@argc, @argv);
+  inherited create;
+  FMainWindow := nil;
+end;
+
+destructor TFPgtkApplication.Destroy;
+begin
+  if assigned (FMainWindow) then
+    FMainWindow.Free;
+  gtk_Exit (0);
+  inherited;
+end;
+
+procedure TFPgtkApplication.SetMainWindow (Value : TFPgtkWindow);
+begin
+  if FMainWindow <> Value then
+    begin
+    if assigned (FMainWindow) and (FMainDestroySignal > 0) then
+      FMainWindow.signalDisconnect (FMainDestroySignal);
+    FMainWindow := Value;
+    if Assigned (Value) then
+      FMainDestroySignal := FMainWindow.ConnectDestroy (@MainDestroyed, nil);
+    end;
+end;
+
+procedure TFPgtkApplication.MainDestroyed (Sender:TFPgtkObject; data:pointer);
+begin
+  FMainWindow := nil;
+  FMainDestroySignal := 0;
+  gtk_main_quit;
+end;
+
+procedure TFPgtkApplication.Run;
+begin
+  if assigned (FMainWindow) then
+    while assigned (FMainWindow) do
+      try
+        FMainWindow.execute (nil, nil, nil);
+        //gtk_main;
+        FreeFPgtkObjects (nil);
+      except
+        on e : exception do
+          ShowMessage (rsErrorTitle, e.message);
+      end
+  else
+    ShowMessage (rsMessageTitle, rsNothingToRun);
+end;
+
+{ TFPgtkScrollText }
+
+constructor TFPgtkScrollText.create;
+begin
+  inherited create (nil,nil);
+  FText := TFPgtkText.Create;
+  Add (FText);
+  HPolicy := Gtk_Policy_Never;
+end;
+
+function TFPgtkScrollText.GetTooltip : string;
+begin
+  result := inherited Tooltip;
+end;
+
+procedure TFPgtkScrollText.SetTooltip (Value : string);
+begin
+  TheText.Tooltip := Value;
+  inherited Tooltip := Value;
+end;
+
+function TFPgtkScrollText.GetUdpatePolicy : TGtkUpdateType;
+begin
+  result := VScrollbar.UpdatePolicy;
+end;
+
+procedure TFPgtkScrollText.Clear;
+begin
+  if assigned(TheText) then
+    TheText.Clear;
+end;
+
+procedure TFPgtkScrollText.SetUpdatePolicy (Value : TGtkUpdateType);
+begin
+  VScrollbar.UpdatePolicy := Value;
+  {$ifndef gtkwin}
+  HScrollbar.UpdatePolicy := Value;
+  {$endif}
+end;
+
+function TFPgtkScrollText.GetText : string;
+begin
+  if assigned(TheText) then
+    begin
+    result := TheText.Text;
+    end
+  else
+    begin
+    result := '';
+    end;
+end;
+
+procedure TFPgtkScrollText.SetText (Value : string);
+begin
+  if assigned (TheText) then
+    TheText.Text := Value;
+end;
+
+function TFPgtkScrollText.GetLines : TStrings;
+begin
+  if assigned (TheText) then
+    result := TheText.Lines
+  else
+    result := nil;
+end;
+
+{ TFPgtkScrollList }
+
+constructor TFPgtkScrollList.create;
+begin
+  inherited create (nil, nil);
+  setusize (100, 40);
+  FList := TFPgtkList.Create;
+  AddWithViewport (FList);
+end;
+
+{ TFPgtkScrollCList }
+
+constructor TFPgtkScrollCList.create (CountColumns : integer);
+begin
+  inherited create (nil, nil);
+  setusize (100, 40);
+  FCList := TFPgtkCList.Create (CountColumns);
+  Add (FCList);
+end;
+
+{ TFPgtkScrollTree }
+
+constructor TFPgtkScrollTree.create;
+begin
+  inherited create (nil, nil);
+  FTree := TFPgtkTree.Create;
+  AddWithViewport (FTree);
+  FTree.Show;
+end;
+
+{ Menu functions }
+
+function RemoveUnderscore (s : string) : string;
+begin
+  result := stringreplace (s, '_', '', [rfReplaceAll]);
+end;
+
+type
+  TFPgtkMenuItemType = class of TFPgtkMenuItem;
+
+function MakeAccelKeyDef (aWindow : TFPgtkWindow; anAG : integer; aKey : guint; aMods : TGdkModifierType) : PAccelKeyDef;
+begin
+  new (result);
+  with result^ do
+    begin
+    AG := aWindow.AccelGroups[anAG];
+    Key := aKey;
+    Mods := aMods;
+    end;
+end;
+
+function MakeAccelKeyDef (aWindow : TFPgtkWindow; anAG : integer; aKey : guint; aMods : TAccelModifiersSet) : PAccelKeyDef;
+begin
+  new (result);
+  with result^ do
+    begin
+    AG := aWindow.AccelGroups[anAG];
+    Key := aKey;
+    Mods := ConvertAccelModifier (aMods);
+    end;
+end;
+
+function MakeAccelKeyDef (anAG : PGtkAccelGroup; aKey : guint; aMods : TGdkModifierType) : PAccelKeyDef;
+begin
+  new (result);
+  with result^ do
+    begin
+    AG := anAG;
+    Key := aKey;
+    Mods := aMods;
+    end;
+end;
+
+function MakeAccelKeyDef (anAG : PGtkAccelGroup; aKey : guint; aMods : TAccelModifiersSet) : PAccelKeyDef;
+begin
+  new (result);
+  with result^ do
+    begin
+    AG := anAG;
+    Key := aKey;
+    Mods := ConvertAccelModifier (aMods);
+    end;
+end;
+
+function ConvertAccelModifier (amSet : TAccelModifiersSet) : TGdkModifierType;
+var am : TAccelModifier;
+begin
+  result := 0;
+  for am := low(TAccelModifier) to high (TAccelModifier) do
+    if am in amSet then
+      result := result + (1 shl ord(am));
+end;
+
+function ConvertModifierType (Mods : TGdkModifierType) : TAccelModifiersSet;
+var am : TAccelModifier;
+begin
+  result := [];
+  for am := low(TAccelModifier) to high (TAccelModifier) do
+    if (Mods and (1 shl ord(am))) <> 0 then
+      result := result + [am];
+end;
+
+function NewMenuBar (items : array of TFPgtkMenuItem) : TFPgtkMenuBar;
+var r : integer;
+begin
+  result := TFPgtkMenuBar.Create;
+  with result do
+    for r := low(items) to high (items) do
+      append (items[r]);
+end;
+
+function NewMenu (ATitle : string; items : array of TFPgtkMenuItem) : TFPgtkMenu;
+var r : integer;
+    AG : PGtkAccelGroup;
+    m : TFPgtkMenuItem;
+begin
+  result := TFPgtkMenu.Create;
+  with result do
+    begin
+    Title := ATitle;
+    ag := AccelGroup;
+    for r := low(items) to high(items) do
+      begin
+      m := items[r];
+      Append (m);
+      if m.AccelKey <> 0 then
+        m.AcceleratorAdd (AG, sgActivateItem, m.AccelKey, 0, TGtkAccelFlags(0));
+      end;
+    end;
+end;
+
+function CreateMenuItem (Atype : TFPgtkMenuItemType; ACaption, ATooltip,
+                         APrivText : string; Accelerator : PAccelKeyDef) : TFPgtkMenuItem;
+begin
+  result := AType.CreateWithLabel (ACaption);
+  if (ATooltip <> '') or (APrivText <> '') then
+    result.Tooltip := ComposeTooltip (ATooltip, APrivText);
+  if assigned(accelerator) then
+    begin
+    with Accelerator^ do
+      result.AcceleratorAdd (AG, sgActivateItem, Key, Mods, DefaultAccelFlags);
+    dispose (Accelerator);
+    end;
+end;
+
+function NewMenuItem (ACaption, AToolTip, AprivText : string; Accelerator : PAccelKeyDef;
+                      ActivateFunc : TFPgtkSignalFunction; AData : pointer) : TFPgtkMenuItem;
+begin
+  result := CreateMenuItem (TFPgtkMenuItem, ACaption, ATooltip, APrivtext, Accelerator);
+  if assigned (ActivateFunc) then
+    result.ConnectActivate (ActivateFunc, AData);
+end;
+
+function NewMenuItem (ACaption, AToolTip, AprivText : string;
+                      ActivateFunc : TFPgtkSignalFunction; AData : pointer) : TFPgtkMenuItem;
+begin
+  result := NewMenuItem (aCaption, aTooltip, aPrivText, nil, ActivateFunc, aData);
+end;
+
+function NewMenuItem (ACaption : string; Accelerator : PAccelKeyDef;
+                      ActivateFunc : TFPgtkSignalFunction; AData : pointer) : TFPgtkMenuItem;
+begin
+  result := NewMenuItem (aCaption, '', '', Accelerator, ActivateFunc, aData);
+end;
+
+function NewMenuItem (ACaption : string; ActivateFunc : TFPgtkSignalFunction; AData : pointer) : TFPgtkMenuItem;
+begin
+  result := NewMenuItem (aCaption, '', '', nil, ActivateFunc, aData);
+end;
+
+function NewMenuItem (ACaption : string) : TFPgtkMenuItem;
+begin
+  result := NewMenuItem (aCaption, '', '', nil, nil, nil);
+end;
+
+function NewLine : TFPgtkMenuItem;
+begin
+  result := TFPgtkMenuItem.Create;
+end;
+
+function NewTearOffMenu : TFPgtkTearOffMenuItem;
+begin
+  result := TFPgtkTearOffMenuItem.create;
+end;
+
+function NewSubMenu (ACaption, ATooltip, AprivText : string; Accelerator : PAccelKeyDef;
+                     Items : array of TFPgtkMenuItem) : TFPgtkMenuItem;
+begin
+  result := CreateMenuItem (TFPgtkMenuItem, ACaption, ATooltip, APrivText, Accelerator);
+  result.SetSubmenu (NewMenu ('', Items));
+end;
+
+function NewSubMenu (ACaption, ATooltip, AprivText : string;
+                     Items : array of TFPgtkMenuItem) : TFPgtkMenuItem;
+begin
+  result := NewSubMenu (aCaption, aTooltip, aPrivText, nil, Items);
+end;
+
+function NewSubMenu (ACaption : string; Accelerator : PAccelKeyDef;
+                     Items : array of TFPgtkMenuItem) : TFPgtkMenuItem;
+begin
+  result := NewSubMenu (aCaption, '', '', Accelerator, Items);
+end;
+
+function NewSubMenu (ACaption : string; Items : array of TFPgtkMenuItem) : TFPgtkMenuItem;
+begin
+  result := NewSubMenu (aCaption, '', '', nil, Items);
+end;
+
+function NewCheckMenuItem (ACaption, AToolTip, AprivText : string; Accelerator : PAccelKeyDef;
+                      ToggledFunc : TFPgtkSignalFunction; AData : pointer) : TFPgtkCheckMenuItem;
+begin
+  result := TFPgtkCheckMenuItem(CreateMenuItem (TFPgtkCheckMenuItem, ACaption, ATooltip, APrivText, Accelerator));
+  if assigned (ToggledFunc) then
+    Result.ConnectToggled (ToggledFunc, AData);
+end;
+
+function NewCheckMenuItem (ACaption, AToolTip, AprivText : string;
+                      ToggledFunc : TFPgtkSignalFunction; AData : pointer) : TFPgtkCheckMenuItem;
+begin
+  result := NewCheckMenuItem (aCaption, aToolTip, aPrivText, nil, ToggledFunc, AData);
+end;
+
+function NewCheckMenuItem (ACaption : string; Accelerator : PAccelKeyDef;
+                      ToggledFunc : TFPgtkSignalFunction; AData : pointer) : TFPgtkCheckMenuItem;
+begin
+  result := NewCheckMenuItem (aCaption, '', '', Accelerator, ToggledFunc, AData);
+end;
+
+function NewCheckMenuItem (ACaption : string; ToggledFunc : TFPgtkSignalFunction; AData : pointer) : TFPgtkCheckMenuItem;
+begin
+  result := NewCheckMenuItem (aCaption, '', '', nil, ToggledFunc, AData);
+end;
+
+procedure InsertMenuItemGroup (InMenu : TFPgtkMenuShell; position : integer; MenuItems : TFPgtkItemGroup);
+begin
+  InsertMenuItemGroup (InMenu, position, MenuItems, nil, nil);
+end;
+
+procedure InsertMenuItemGroup (InMenu : TFPgtkMenuShell; position : integer;
+                 MenuItems : TFPgtkItemGroup; ActivateProc : TFPgtkSignalFunction; ActivateData : pointer);
+var r : integer;
+begin
+  if (MenuItems.count > 0) then
+    if (MenuItems.items[0] is TFPgtkMenuItem) then
+      with InMenu do
+        for r := MenuItems.count-1 downto 0 do
+          begin
+          if assigned(ActivateProc) then
+            if assigned (ActivateData) then
+              TFPgtkMenuItem(MenuItems.items[r]).ConnectActivate (ActivateProc, ActivateData)
+            else
+              TFPgtkMenuItem(MenuItems.items[r]).ConnectActivate (ActivateProc, inttopointer(r));
+          Insert (TFPgtkMenuItem(MenuItems.items[r]), position);
+          end
+    else
+      raise FPgtkException.Create (sErrWrongItemType);
+end;
+
+procedure AppendMenuItemGroup (InMenu : TFPgtkmenuShell; MenuItems : TFPgtkItemGroup);
+begin
+  AppendMenuItemGroup (InMenu, MenuItems, nil, nil);
+end;
+
+procedure AppendMenuItemGroup (InMenu : TFPgtkmenuShell; MenuItems : TFPgtkItemGroup;
+                                ActivateProc : TFPgtkSignalFunction; ActivateData : pointer);
+var r : integer;
+begin
+  if (MenuItems.count > 0) then
+    if MenuItems.items[0] is TFPgtkMenuItem then
+      with InMenu do
+        for r := 0 to MenuItems.count-1 do
+          begin
+          if assigned(ActivateProc) then
+            if assigned (ActivateData) then
+              TFPgtkMenuItem(MenuItems.items[r]).ConnectActivate (ActivateProc, ActivateData)
+            else
+              TFPgtkMenuItem(MenuItems.items[r]).ConnectActivate (ActivateProc, inttopointer(r));
+          Append (TFPgtkMenuItem(MenuItems.items[r]));
+          end
+    else
+      raise FPgtkException.Create (sErrWrongItemType);
+end;
+
+procedure PrependMenuItemGroup (InMenu : TFPgtkmenuShell; MenuItems : TFPgtkItemGroup);
+begin
+  PrependMenuItemGroup (InMenu, MenuItems, nil, nil);
+end;
+
+procedure PrependMenuItemGroup (InMenu : TFPgtkmenuShell; MenuItems : TFPgtkItemGroup;
+                                ActivateProc : TFPgtkSignalFunction; ActivateData : pointer);
+var r : integer;
+begin
+  if (MenuItems.count > 0) then
+    if MenuItems.items[0] is TFPgtkMenuItem then
+      with InMenu do
+        for r := MenuItems.count-1 downto 0 do
+          begin
+          if assigned(ActivateProc) then
+            if assigned (ActivateData) then
+              TFPgtkMenuItem(MenuItems.items[r]).ConnectActivate (ActivateProc, ActivateData)
+            else
+              TFPgtkMenuItem(MenuItems.items[r]).ConnectActivate (ActivateProc, inttopointer(r));
+          Prepend (TFPgtkMenuItem(MenuItems.items[r]));
+          end
+    else
+      raise FPgtkException.Create (sErrWrongItemType);
+end;
+
+{ TFileEntryDialog }
+
+type
+  TFileEntryDialog = class (TFPgtkFileSelection)
+  public
+    constructor create (AType:TGtkWindowType);
+    procedure DoDialogInit (InitData : pointer); override;
+  end;
+
+  PFileEntryData = ^TFileEntryData;
+  TFileEntryData = record
+    aFilename : string;
+  end;
+
+constructor TFileEntryDialog.Create (AType:TGtkWindowType);
+begin
+  inherited;
+  OKButton.ConnectClicked (@CloseWithResult, inttopointer(drOk));
+  CancelButton.ConnectClicked (@CloseWindow, nil);
+end;
+
+procedure TFileEntryDialog.DoDialogInit (InitData : pointer);
+begin
+  with PFileEntryData(InitData)^ do
+    Filename := aFilename;
+end;
+
+{ TFPgtkFileEntry }
+
+const
+  FileEntryXPM =
+      '16 13 4 1'#13#10+
+      '. c None'#13#10+     // no color
+      '# c #000000'#13#10+  // black
+      'y c #ffff00'#13#10+  // yellow
+      'g c #AFAF00'#13#10+  // grayed yellow
+      '.......#####....'#13#10+
+      '............#.#.'#13#10+
+      '.............##.'#13#10+
+      '..####......###.'#13#10+
+      '##yyyy#####.....'#13#10+
+      '#yyyyyyyyy#.....'#13#10+
+      '#yyyyyyyyy#.....'#13#10+
+      '#yyyy###########'#13#10+
+      '#yyy#ggggggggg#.'#13#10+
+      '#yy#ggggggggg#..'#13#10+
+      '#y#ggggggggg#...'#13#10+
+      '##ggggggggg#....'#13#10+
+      '###########.....';
+
+var
+  DefFileEntryPixmap : PGdkPixmap;
+  DefFileEntryBitmask : PGdkBitmap;
+
+constructor TFPgtkFileEntry.create;
+begin
+  inherited;
+  FEdit := TFPgtkEntry.Create;
+  FButton := TFPgtkButton.Create;
+  FImage := TFPgtkPixMap.Create;
+  with FImage do
+    if assigned (DefFileEntryPixmap) then
+      SetPixmap (DefFileEntryPixmap, DefFileEntryBitmask)
+    else
+      begin
+      loadfromtext (FileEntryXPM);
+      GetPixmap (DefFileEntryPixmap, DefFileEntryBitmask);
+      end;
+  with FButton do
+    begin
+    Add (FImage);
+    ConnectClicked (@OpenFileSelection, self);
+    end;
+  PackStart (FEdit, true, true, 0);
+  PackStart (FButton, false, true, 0);
+end;
+
+procedure TFPgtkFileEntry.SetFilename (Value : string);
+begin
+  FEdit.Text := Value;
+end;
+
+function TFPgtkFileEntry.GetFilename : string;
+begin
+  result := FEdit.Text;
+end;
+
+procedure TFPgtkFileEntry.OpenFileSelection (Sender : TFPgtkObject; data : pointer);
+var d : TFileEntryData;
+begin
+  d.aFilename := Filename;
+  with TFileEntryDialog.Create(gtk_window_dialog) do
+    Execute (nil, @d, @CloseFileSelection);
+end;
+
+procedure TFPgtkFileEntry.CloseFileSelection (Sender:TFPgtkWindow; DialogResult:pointer; 
+                                    Action:integer; initiator:TFPgtkObject);
+begin
+  if action = drOk then
+    Filename := (Sender as TFileEntryDialog).Filename;
+end;
+
+{ TFPgtkCheckedButton }
+
+const
+  XPMChecked : array [0..17] of ansistring = (
+          '15 13 4 1',
+          '. c None',      // None
+          '# c #000000',   // Black
+          '- c #FFFFFF',   // White
+          'o c #0000FF',   // Blue
+          '..............o',
+          '.............o-',
+          '............o-.',
+          '..########.o-..',
+          '..#......#o-...',
+          '..#......o-....',
+          '..o-....oo-....',
+          '.ooo-..oo-.....',
+          '..ooo-oo-#.....',
+          '..#oooo-.#.....',
+          '..##ooo-##.....',
+          '.....o-........',
+          '...............');
+
+  XPMUnChecked : array [0..17] of ansistring = (
+          '15 13 4 1',
+          '. c None',      // None
+          '# c #000000',   // Black
+          '- c #FFFFFF',   // White
+          'o c #0000FF',   // Blue
+          '...............',
+          '...............',
+          '...............',
+          '..########.....',
+          '..#......#.....',
+          '..#......#.....',
+          '..#......#.....',
+          '..#......#.....',
+          '..#......#.....',
+          '..#......#.....',
+          '..########.....',
+          '...............',
+          '...............');
+
+var
+  DefChecked, DefUnchecked : PGdkPixmap;
+  DefCheckedBM, DefUncheckedBM : PGdkBitmap;
+
+procedure TFPgtkCheckedButton.ChangeCheck (Sender:TFPgtkObject; data:pointer);
+var b : boolean;
+begin
+  b := Active;
+  FChecked.visible := b;
+  FUnchecked.visible := not b;
+end;
+
+constructor TFPgtkCheckedButton.CreateWithLabel (aText:string);
+begin
+  create;
+  Text := aText;
+end;
+
+constructor TFPgtkCheckedButton.CreateWithLabel (aText:string; AccelGroup : PGtkAccelGroup);
+begin
+  create;
+  Text := aText;
+  if (AccelKey <> 0) and assigned(AccelGroup) then
+    AcceleratorAdd (AccelGroup, sgClicked, AccelKey, DefaultButtonModifiers, GTK_ACCEL_Visible);
+end;
+
+constructor TFPgtkCheckedButton.create;
+begin
+  inherited;
+  DrawIndicator := False;
+  AddContainer := TFPgtkHBox.Create;
+  Add (AddContainer);
+  FChecked := TFPgtkPixMap.Create;
+  with FChecked do
+    if assigned (DefChecked) then
+      SetPixmap (DefChecked, DefCheckedBM)
+    else
+      begin
+      loadfromArray (XPMChecked);
+      GetPixmap (DefChecked, DefCheckedBM);
+      end;
+  FUnchecked := TFPgtkPixMap.Create;
+  with FUnchecked do
+    if assigned (DefUnchecked) then
+      SetPixmap (DefUnchecked, DefUncheckedBM)
+    else
+      begin
+      loadfromArray (XPMUnchecked);
+      GetPixmap (DefUnchecked, DefUncheckedBM);
+      end;
+  with TFPgtkBox(AddContainer) do
+    begin
+    PackStart (FChecked, false, false, 0);
+    PackStart (FUnChecked, false, false, 0);
+    end;
+  ChangeCheck (self, nil);
+  ConnectToggled (@ChangeCheck, nil);
+end;
+
+{ ShowMessage }
+
+resourcestring
+  rsOk = '   Ok   ';
+
+function MessageWindow (aTitle, aMessage : string) : TFPgtkWindow;
+var b : TFPgtkBox;
+    but : TFPgtkButton;
+    l : TFPgtkLabel;
+    AG : integer;
+    bb : TFPgtkButtonBox;
+begin
+  result := TFPgtkWindow.create (gtk_window_dialog);
+
+  result.setDefaultSize (200,25);
+  result.title := aTitle;
+
+  AG := result.AccelGroupNew;
+
+  b := TFPgtkVBox.create;
+  b.Homogeneous := false;
+  b.border := 15;
+  b.spacing := 15;
+
+  l := TFPgtkLabel.Create (aMessage);
+  b.Packstart (l, true, true, 0); // Text to show
+
+  bb := TFPgtkHButtonBox.create;
+  bb.Layout := GTK_BUTTONBOX_DEFAULT_STYLE;
+  b.PackEnd (bb, false, false, 0);
+
+  but := TFPgtkButton.CreateWithLabel (rsOk);                 // Ok button to close
+  but.ConnectClicked (@(result.CloseWindow), nil);
+  result.AcceleratorAdd (AG, but, sgClicked, gdk_Cancel, 0, TGTKAccelFlags(0));
+  result.AcceleratorAdd (AG, but, sgClicked, gdk_Return, 0, TGTKAccelFlags(0));
+  bb.add (but);
+
+  result.Add (b);
+end;
+
+procedure ShowMessage (const aTitle, aMessage : string);
+begin
+  with MessageWindow (aTitle, aMessage) do
+    Execute (nil, nil, nil);
+end;
+
+{ MessageDialog }
+
+type
+  TMessageDialogWindow = Class(TFPgtkWindow)
+    FImage : TFPGtkPixMap;
+    FLabel : TFPGtkLabel;
+    FLTable : TFPgtkTable;
+    FVBox : TFPgtkVBox;
+    FButtonBox: TFPgtkButtonBox;
+    Constructor Create(AMsg:String; DlgType:TMsgDlgType; Buttons: TMsgDlgButtons);
+    Procedure CreateButtons(Buttons: TMsgDlgButtons);
+  end;
+
+const
+
+IMGInfo : Array[1..37] of string = ('32 32 4 1',
+  '. c None',
+  '  c None',
+  'a c #ffffff', //#c3c3c3',
+  '# c #0000ff',
+  '............#######.............',
+  '.........###aaaaaaa###..........',
+  '.......##aaaaaaaaaaaaa##........',
+  '......#aaaaaaa###aaaaaaa#.......',
+  '.....#aaaaaaa#####aaaaaaa#......',
+  '....#aaaaaaa#######aaaaaaa#.....',
+  '...#aaaaaaaa#######aaaaaaaa#....',
+  '..#aaaaaaaaa#######aaaaaaaaa#...',
+  '..#aaaaaaaaaa#####aaaaaaaaaa#...',
+  '.#aaaaaaaaaaaa###aaaaaaaaaaaa#..',
+  '.#aaaaaaaaaaaaaaaaaaaaaaaaaaa#..',
+  '.#aaaaaaaaaaa#####aaaaaaaaaaa#..',
+  '#aaaaaaaaaaaa#####aaaaaaaaaaaa#.',
+  '#aaaaaaaaaaaa#####aaaaaaaaaaaa#.',
+  '#aaaaaaaaaaaa#####aaaaaaaaaaaa#.',
+  '#aaaaaaaaaaaa#####aaaaaaaaaaaa#.',
+  '#aaaaaaaaaaaa#####aaaaaaaaaaaa#.',
+  '#aaaaaaaaaaaa#####aaaaaaaaaaaa#.',
+  '#aaaaaaaaaaaa#####aaaaaaaaaaaa#.',
+  '.#aaaaaaaaaaa#####aaaaaaaaaaa#..',
+  '.#aaaaaaaaaaa#####aaaaaaaaaaa#..',
+  '.#aaaaaaaaaa#######aaaaaaaaaa#..',
+  '..#aaaaaaaaa#######aaaaaaaaa#...',
+  '..#aaaaaaaaa#######aaaaaaaaa#...',
+  '...#aaaaaaaaaaaaaaaaaaaaaaa#....',
+  '....#aaaaaaaaaaaaaaaaaaaaa#.....',
+  '.....#aaaaaaaaaaaaaaaaaaa#......',
+  '......#aaaaaaaaaaaaaaaaa#.......',
+  '.......##aaaaaaaaaaaaa##........',
+  '.........###aaaaaaa###..........',
+  '............#######.............',
+  '................................');
+
+IMGWarning :Array[1..37] of string = ('32 32 4 1',
+  '# c #000000',
+  'b c #9c999c',
+  '. c None',
+  'a c #ffff00',
+  '.............###................',
+  '............#aaa#...............',
+  '...........#aaaaa#b.............',
+  '...........#aaaaa#bb............',
+  '..........#aaaaaaa#bb...........',
+  '..........#aaaaaaa#bb...........',
+  '.........#aaaaaaaaa#bb..........',
+  '.........#aaaaaaaaa#bb..........',
+  '........#aaaaaaaaaaa#bb.........',
+  '........#aaaa###aaaa#bb.........',
+  '.......#aaaa#####aaaa#bb........',
+  '.......#aaaa#####aaaa#bb........',
+  '......#aaaaa#####aaaaa#bb.......',
+  '......#aaaaa#####aaaaa#bb.......',
+  '.....#aaaaaa#####aaaaaa#bb......',
+  '.....#aaaaaa#####aaaaaa#bb......',
+  '....#aaaaaaaa###aaaaaaaa#bb.....',
+  '....#aaaaaaaa###aaaaaaaa#bb.....',
+  '...#aaaaaaaaa###aaaaaaaaa#bb....',
+  '...#aaaaaaaaaa#aaaaaaaaaa#bb....',
+  '..#aaaaaaaaaaa#aaaaaaaaaaa#bb...',
+  '..#aaaaaaaaaaaaaaaaaaaaaaa#bb...',
+  '.#aaaaaaaaaaaa##aaaaaaaaaaa#bb..',
+  '.#aaaaaaaaaaa####aaaaaaaaaa#bb..',
+  '#aaaaaaaaaaaa####aaaaaaaaaaa#bb.',
+  '#aaaaaaaaaaaaa##aaaaaaaaaaaa#bb.',
+  '#aaaaaaaaaaaaaaaaaaaaaaaaaaa#bbb',
+  '#aaaaaaaaaaaaaaaaaaaaaaaaaaa#bbb',
+  '.#aaaaaaaaaaaaaaaaaaaaaaaaa#bbbb',
+  '..#########################bbbbb',
+  '....bbbbbbbbbbbbbbbbbbbbbbbbbbb.',
+  '.....bbbbbbbbbbbbbbbbbbbbbbbbb..');
+
+IMGError : Array[1..37] of string = ('32 32 4 1',
+  '. c None',
+  'b c #808080',
+  '# c #c00000',
+  'a c #ffffff',
+  '................................',
+  '................................',
+  '................................',
+  '............#######.............',
+  '...........###########..........',
+  '........###############.........',
+  '.......##################.......',
+  '......####################......',
+  '.....###aa############aa###.....',
+  '.....###aaa##########aaa###.....',
+  '....#####aaa########aaa#####....',
+  '....######aaa######aaa######....',
+  '...########aaa####aaa########...',
+  '...#########aaa##aaa#########b..',
+  '...##########aaaaaa##########b..',
+  '...###########aaaa###########b..',
+  '...###########aaaa###########b..',
+  '...##########aaaaaa##########b..',
+  '...#########aaa##aaa#########b..',
+  '...########aaa####aaa#######bb..',
+  '....######aaa######aaa######bb..',
+  '.....####aaa########aaa#####bb..',
+  '.....###aaa##########aaa###bbb..',
+  '.....###aa############aa##bbb...',
+  '......####################bb....',
+  '.......##################bb.....',
+  '.........###############bb......',
+  '..........###########bbbb.......',
+  '.............#######bbb.........',
+  '................................',
+  '................................',
+  '................................');
+
+IMGConfirmation : Array[1..37] of string = ('32 32 4 1',
+  '. c None',
+  'b c #808080',
+  'a c #c00000',
+  '# c #ffffff',
+  '................................',
+  '................................',
+  '................................',
+  '................................',
+  '.............######.............',
+  '..........###########...........',
+  '.........##############.........',
+  '........################........',
+  '.......##################.......',
+  '......########aaaaa#######......',
+  '.....########aaaaaaa#######.....',
+  '.....#######aa#####aa######.....',
+  '.....#######a######aa#######....',
+  '....###############aa#######b...',
+  '....###############aa#######bb..',
+  '....##############aa########bb..',
+  '....#############aa#########bb..',
+  '....############aa##########bb..',
+  '....###########aa###########bb..',
+  '.....##########aa##########bbb..',
+  '.....##########aa##########bbb..',
+  '.....##########aa##########bb...',
+  '......#########aa#########bb....',
+  '.......##################bbb....',
+  '........#######aa#######bbb.....',
+  '.........######aa######bbb......',
+  '...........###########bbb.......',
+  '.............######bbbbb........',
+  '................................',
+  '................................',
+  '................................',
+  '................................');
+
+
+Constructor TMessageDialogWindow.Create(AMsg : String;DlgType:TMsgDlgType;Buttons: TMsgDlgButtons);
+const
+  OH = GTK_FILL OR GTK_EXPAND;
+begin
+  Inherited Create(GTK_WINDOW_DIALOG);
+  FVBox:=TFPGtkVBox.Create;
+  FVBox.Spacing:=4;
+  FVBox.Border:=8;
+  Add(FVBox);
+  FLTable:=TFpgtkTable.Create(10,1);
+  if DlgType <> mtCustom then
+    begin
+    FImage:=TFPGtkPixMap.Create;
+    With FImage do
+      Case DlgType of
+        mtInformation  : LoadFromArray(Imginfo);
+        mtWarning      : LoadFromArray(imgWarning);
+        mtConfirmation : LoadFromArray(imgConfirmation);
+        mtError        : LoadFromArray(imgError);
+      end;
+    FLTable.Attach(FImage,1,2,0,1,OH,OH,0,0);
+    end;
+  FLabel:=TFPGtkLabel.Create(Amsg);
+  FLTable.Attach(FLabel,4,9,0,1,OH,OH,0,0);
+  FButtonBox:=TFPgtkHButtonBox.Create;
+  with FButtonBox do
+    begin
+    Layout := GTK_BUTTONBOX_DEFAULT_STYLE;
+    spacing := 4;
+    end;
+  CreateButtons(Buttons);
+  FVBox.PackStart(FLTable,false,False,8);
+  FVBox.PackStart(FButtonBox,false,False,8);
+end;
+
+Const 
+  ButtonText : Array[TMsgDlgBtn] of string  =
+       ('Yes', 'No', 'OK', 'Cancel','Abort', 'Retry', 'Ignore',
+        'All', 'NoToAll', 'YesToAll', 'Help');
+  ButtonResult : array [TMsgDlgbtn] of TModalResult =
+       (mrYes, mrNo, mrOK, mrCAncel, mrAbort, mrRetry, mrIgnore, 
+        mrAll, mrNoToAll, mrYesToAll, 0);
+                         
+Procedure TMessageDialogWindow.CreateButtons(Buttons: TMsgDlgButtons);
+Var
+  b : TMsgDlgBtn;
+  bw : TFPGtkButton;
+begin
+  For B:=Low(TMsgDlgBtn) to high(TMsgDlgBtn) do
+    If b in Buttons then
+      begin
+      BW:=TFPGtkButton.CreateWithLabel(ButtonText[b]);
+      BW.ConnectClicked(@CloseWithResult,IntToPointer(ButtonResult[b]));
+      BW.Setusize(50,25);
+      FButtonBox.PackStart(BW,False,False,4);
+      end;
+end;
+
+function MessageDlg(const aMsg: string; DlgType: TMsgDlgType;
+                    Buttons: TMsgDlgButtons; HelpCtx: Longint): Integer;
+begin
+  With TMessageDialogWindow.Create(AMsg,DlgType,Buttons) do
+    Result:=Execute(Nil,Nil,Nil);
+end;  
+
+function MessageDlg(const Fmt: string; Args : Array of const; DlgType: TMsgDlgType;
+                    Buttons: TMsgDlgButtons; HelpCtx: Longint): Integer;
+begin
+  Result:=MessageDlg(Format(Fmt,Args),Dlgtype,Buttons,HelpCtx);
+end;
+
+end.

+ 58 - 0
packages/extra/fpgtk/pgtk/pgtk.pp

@@ -0,0 +1,58 @@
+program PGtk;
+
+Uses sysutils, ObjectDef, classes;
+
+type
+  PGtkexception = class (Exception);
+
+procedure DataRead (Filename:string; var Descr:TObjectDefs);
+var StrStream : TFileStream;
+    BinStream : TMemoryStream;
+begin
+  if fileExists (filename) then
+    begin
+    StrStream := TFileStream.Create(filename, fmOpenRead);
+    try
+      BinStream := TMemoryStream.Create;
+      try
+        writeln ('Reading...');
+        ObjectTextToBinary(StrStream, BinStream);
+        BinStream.Seek(0, soFromBeginning);
+        BinStream.ReadComponent(Descr);
+      finally
+        BinStream.Free;
+      end;
+    finally
+      StrStream.Free;
+    end;
+    end
+  else
+    raise PGtkException.Create ('Error: Can''t find file "'+filename+'"');
+end;
+
+procedure Convert (DescrFilename, UnitFilename : string);
+var GTK : TObjectDefs;
+    l : TStrings;
+begin
+  l := TStringlist.Create;
+  GTK := TObjectdefs.create (nil);
+  try
+    DataRead (DescrFilename, GTK);
+    writeln ('Filling Stringlist');
+    GTK.Write (l, nil, nil);
+    writeln ('Writing to file');
+    L.SaveToFile (UnitFilename);
+  finally
+    GTK.Free;
+    l.Free;
+  end;
+end;
+
+
+begin
+
+  if paramcount = 2 then
+    Convert (Paramstr(1), Paramstr(2))
+  else
+    writeln ('Give 2 filenames :'#10#13'   First the object description file'#10#13'   Second the Pascal unit filename');
+end.

+ 105 - 0
packages/extra/fpgtk/pgtk/pgtk.ppr

@@ -0,0 +1,105 @@
+[RunParams]
+ExeHost=
+ExeParams=
+[General]
+MainName=%PRJPATH\PGtk.pp
+[DefaultProjectSettings]
+MsgOnlyErrors=0
+MsgGeneralInfo=1
+MsgWarnings=1
+MsgNotes=1
+MsgHints=1
+MsgLineNum=0
+MsgFilesOpen=0
+MsgFilesTriedOpen=0
+MsgPrintProcFunc=0
+MsgWarnConditional=0
+MsgDefinedMacros=0
+MsgAdditionalDbg=0
+MsgWriteAll=0
+MsgNoMessages=0
+MsgDeclOnOverloadErr=0
+MsgOutputExeInfo=0
+MsgRhideMode=0
+MsgSaveErrors=1
+GenerateAssm=0
+AssmDonNotDelete=0
+AssmIncludeSrc=0
+AssmRegInfo=0
+AssmTempInfo=0
+AssmGNU=0
+AssmNasm=0
+AssmObjNasm=0
+AssmObjMasm=0
+AssmObjTasm=0
+OutBrowseInfo=0
+OutIncLocal=0
+OutDll=0
+OutExe=1
+HeapSize=8000000
+OutIO=1
+OutNoLink=0
+OutOverflow=1
+OutRange=1
+StackSize=1048576
+OutStatic=0
+OutStackCheck=0
+OutSmartLink=1
+OutDbgGDB=0
+OutDbgDBX=0
+OutHeaptrc=0
+OutGprof=0
+OutNoLinkNoAsm=0
+OutStripSym=1
+OutLink=0
+OutLinkDll=0
+OutLinkStatic=0
+OtmSize=0
+OtmSpeed=1
+OtmReg=0
+OtmUncertain=0
+OtmLevels=1
+OtmLevel1=0
+OtmLevel2=1
+OtmLevel3=0
+OtmProcessor=0
+Otm386=0
+OtmPentium=0
+OtmPII=0
+OtmNoOptimization=0
+LangATT=1
+LangIntel=0
+LangDirect=0
+LangDelphi2=1
+LangCOperators=0
+LangDelphiCompatible=1
+LangStopOnFirst=0
+LangSupportLabel=0
+LangAnsiStrings=0
+LangCInline=0
+LangCMacros=0
+LangTP=0
+LangGPC=0
+LangConDes=0
+LangAllowStatic=0
+LangNoCheckUnit=0
+LangCompSys=0
+WBaseAddress=268435456
+WRelocation=1
+WConsole=1
+TargetType=0
+[ProjectDirs]
+OutFileName=PGtk.exe
+CondDef=
+CondUnDef=
+OutPath=
+UnitOutPath=
+UnitPath=..;e:\pp\units\win32;e:\pp\units\win32\rtl;e:\pp\units\win32\fcl;e:\pp\units\win32\gtk
+LibPath=
+IncPath=
+ObjPath=
+[OpenFiles]
+NumOpenFiles=1
+OpenFile1=%PRJPATH\PGtk.pp
+[ProjectFiles]
+NumProjectFiles=0