PageRenderTime 120ms CodeModel.GetById 20ms app.highlight 88ms RepoModel.GetById 0ms app.codeStats 2ms

/packages/fpgtk/src/fpgtk.pp

https://github.com/slibre/freepascal
Puppet | 12085 lines | 10076 code | 2009 blank | 0 comment | 182 complexity | b337937eb034893336e893d80f99a453 MD5 | raw file
Possible License(s): LGPL-2.0, LGPL-2.1, LGPL-3.0

Large files files are truncated, but you can click here to view the full file

   1{$mode objfpc}{$h+} {$ifdef win32}{$define gtkwin}{$endif}
   2UNIT FPgtk;
   3
   4// Generated with GtkWrite by Luk Vandelaer (version 1.08)
   5
   6INTERFACE
   7
   8USES classes, sysutils, gtk, gdk, glib, FPglib;
   9
  10TYPE
  11
  12  TFPgtkObject = class;
  13  TFPgtkData = class;
  14  TFPgtkAdjustment = class;
  15  TFPgtkToolTips = class;
  16  TFPgtkWidget = class;
  17  TFPgtkGroup = class;
  18  TFPgtkWidgetGroup = class;
  19  TFPgtkMisc = class;
  20  TFPgtkLabel = class;
  21  TFPgtkAccelLabel = class;
  22  TFPgtkTipsQuery = class;
  23  TFPgtkArrow = class;
  24  TFPgtkImage = class;
  25  TFPgtkPixmap = class;
  26  TFPgtkContainer = class;
  27  TFPgtkBin = class;
  28  TFPgtkAlignment = class;
  29  TFPgtkFrame = class;
  30  TFPgtkAspectFrame = class;
  31  TFPgtkButton = class;
  32  TFPgtkToggleButton = class;
  33  TFPgtkCheckButton = class;
  34  TFPgtkRadioButton = class;
  35  TFPgtkRadioButtonGroup = class;
  36  TFPgtkOptionMenu = class;
  37  TFPgtkItem = class;
  38  TFPgtkItemGroup = class;
  39  TFPgtkMenuItem = class;
  40  TFPgtkCheckMenuItem = class;
  41  TFPgtkRadioMenuItem = class;
  42  TFPgtkRadioMenuGroup = class;
  43  TFPgtkTearOffMenuItem = class;
  44  TFPgtkListItem = class;
  45  TFPgtkListItemGroup = class;
  46  TFPgtkTreeItem = class;
  47  TFPgtkWindow = class;
  48  TFPgtkColorSelectionDialog = class;
  49  TFPgtkDialog = class;
  50  TFPgtkInputDialog = class;
  51  TFPgtkFileSelection = class;
  52  TFPgtkFontSelectionDialog = class;
  53  TFPgtkEventBox = class;
  54  TFPgtkHandleBox = class;
  55  TFPgtkScrolledWindow = class;
  56  TFPgtkViewport = class;
  57  TFPgtkBox = class;
  58  TFPgtkButtonBox = class;
  59  TFPgtkHButtonBox = class;
  60  TFPgtkVButtonBox = class;
  61  TFPgtkVBox = class;
  62  TFPgtkColorSelection = class;
  63  TFPgtkGammaCurve = class;
  64  TFPgtkHBox = class;
  65  TFPgtkCombo = class;
  66  TFPgtkStatusbar = class;
  67  TFPgtkCList = class;
  68  TFPgtkCTree = class;
  69  TFPgtkFixed = class;
  70  TFPgtkNotebook = class;
  71  TFPgtkFontSelection = class;
  72  TFPgtkPaned = class;
  73  TFPgtkHPaned = class;
  74  TFPgtkVPaned = class;
  75  TFPgtkLayout = class;
  76  TFPgtkList = class;
  77  TFPgtkMenuShell = class;
  78  TFPgtkMenuBar = class;
  79  TFPgtkMenu = class;
  80  TFPgtkPacker = class;
  81  TFPgtkTable = class;
  82  TFPgtkToolbar = class;
  83  TFPgtkTree = class;
  84  TFPgtkCalendar = class;
  85  TFPgtkDrawingArea = class;
  86  TFPgtkCurve = class;
  87  TFPgtkEditable = class;
  88  TFPgtkEntry = class;
  89  TFPgtkSpinButton = class;
  90  TFPgtkText = class;
  91  TFPgtkRuler = class;
  92  TFPgtkHRuler = class;
  93  TFPgtkVRuler = class;
  94  TFPgtkRange = class;
  95  TFPgtkScale = class;
  96  TFPgtkHScale = class;
  97  TFPgtkVScale = class;
  98  TFPgtkScrollbar = class;
  99  TFPgtkHScrollbar = class;
 100  TFPgtkVScrollbar = class;
 101  TFPgtkSeparator = class;
 102  TFPgtkHSeparator = class;
 103  TFPgtkVSeparator = class;
 104  TFPgtkPreview = class;
 105  TFPgtkProgress = class;
 106  TFPgtkProgressBar = class;
 107  TFPgtkItemFactory = class;
 108
 109  TFPgtkSignalFunction = procedure (Sender:TFPgtkObject; Data:pointer) of Object;
 110  TFPgtkBooleanSignalFunction = procedure (Sender:TFPgtkObject; Bool:boolean; data:pointer) of Object;
 111  FPgtkException = class (Exception) end;
 112  PPascalClassData = ^TPascalClassData;
 113  TPascalClassData = record
 114    TheInstance : TFPgtkObject;
 115  end;
 116  PSignalData = ^TSignalData;
 117  TSignalData = record
 118    TheData : pointer;
 119    TheWidget : TFPgtkObject;
 120    TheSignalProc : TFPgtkSignalFunction;
 121  end;
 122  TDestroyState = (dsAlive, dsWaiting, dsDestroying);
 123  TFPgtkObjectClass = Class of TFPgtkObject;
 124
 125  PFPgtkObject = ^TFPgtkObject;
 126  TFPgtkObject = class
 127  Private
 128    FDestroying : TDestroyState;
 129    PascalInstance:TPascalClassData;
 130    ConvertDatas:TStringList;
 131    SignalDatas:TList;
 132    NotifyList:TList;
 133    function ConvertSignalData (proc:TFPgtkSignalFunction; data:pointer; FreeIt:boolean) : PSignalData;
 134    procedure FreeClass (Sender:TFPgtkObject; Data:pointer);
 135    procedure CheckConvertDatas;
 136    procedure CheckNotifyList;
 137    procedure InitCreate;
 138    procedure FinalCreate;
 139    function GetUserData : pointer;
 140    procedure SetUserData (TheValue : pointer);
 141  Protected
 142    FGtkObject:PGtkObject;
 143    procedure CreateGtkObject; Virtual; Abstract;
 144    procedure NotifyDestroy (AnObject:TFPgtkObject); Virtual;
 145  Public
 146    function TheGtkObject : PGtkObject;
 147    function SignalConnect (Signal:string; Proc:TFPgtkSignalFunction; data:pointer) : guint;
 148    function SignalConnectAfter (Signal:string; Proc:TFPgtkSignalFunction; data:pointer) : guint;
 149    function BooleanSignalConnect (Signal:string; Proc:TFPgtkBooleanSignalFunction; data:pointer) : guint;
 150    function BooleanSignalConnectAfter (Signal:string; Proc:TFPgtkBooleanSignalFunction; data:pointer) : guint;
 151    constructor Create;
 152    constructor CreateFromObject (GtkObject:PGtkObject);
 153    property Destroying : TDestroyState read FDestroying;
 154    procedure AskNotification (AnObject:TFPgtkObject);
 155    destructor Destroy; Override;
 156    function ConnectDestroy (proc:TFPgtkSignalFunction; data:pointer) : guint;
 157    function ConnectAfterDestroy (proc:TFPgtkSignalFunction; data:pointer) : guint;
 158    procedure SignalDisconnect (SignalHandler:guint);
 159    procedure SignalBlockHandler (SignalHandler:guint);
 160    procedure SignalUnblockHandler (SignalHandler:guint);
 161    procedure SignalEmit (aName:string; Args:array of const);
 162    function SignalNEmissions (aName:string) : guint;
 163    procedure SignalEmitStop (aName:string);
 164    procedure SetData (Key:string; Data:pointer);
 165    property UserData : pointer read GetUserData write SetUserData;
 166    procedure SetDataFull (Key:string; Data:pointer; Destroyer:TFPgtkSignalFunction);
 167    procedure RemoveData (Key:string);
 168    function GetData (Key:string) : pointer;
 169    function GtkDestroyed : boolean;
 170    procedure Constructed;
 171    procedure ConstructedDefault;
 172    procedure Sink;
 173    procedure Ref;
 174    procedure Unref;
 175    procedure WeakRef (Notify:TFPgtkSignalFunction; data:pointer);
 176    procedure WeakUnref (notify:TFPgtkSignalFunction; data:pointer);
 177  end;
 178
 179
 180  TFPgtkData = class (TFPgtkObject)
 181  Public
 182    function TheGtkObject : PGtkData;
 183    function ConnectDisconnect (proc:TFPgtkSignalFunction; data:pointer) : guint;
 184    function ConnectAfterDisconnect (proc:TFPgtkSignalFunction; data:pointer) : guint;
 185  end;
 186
 187
 188  TFPgtkAdjustment = class (TFPgtkData)
 189  Private
 190    function GetValue : gfloat;
 191    procedure SetValue (TheValue : gfloat);
 192    function GetLower : gfloat;
 193    procedure SetLower (TheValue : gfloat);
 194    function GetUpper : gfloat;
 195    procedure SetUpper (TheValue : gfloat);
 196    function GetStepIncrement : gfloat;
 197    procedure SetStepIncrement (TheValue : gfloat);
 198    function GetPageIncrement : gfloat;
 199    procedure SetPageIncrement (TheValue : gfloat);
 200    function GetPageSize : gfloat;
 201    procedure SetPageSize (TheValue : gfloat);
 202  Protected
 203    procedure CreateGtkObject; override;
 204  Public
 205    function TheGtkObject : PGtkAdjustment;
 206    procedure Configure (aLower:gfloat; anUpper:gfloat; aValue:gfloat; aStepInc:gfloat; aPageInc:gfloat; aPageSize:gfloat);
 207    function ConnectValueChanged (proc:TFPgtkSignalFunction; data:pointer) : guint;
 208    function ConnectAfterValueChanged (proc:TFPgtkSignalFunction; data:pointer) : guint;
 209    function ConnectChanged (proc:TFPgtkSignalFunction; data:pointer) : guint;
 210    function ConnectAfterChanged (proc:TFPgtkSignalFunction; data:pointer) : guint;
 211    procedure ValueChanged;
 212    procedure Changed;
 213    procedure ClampPage (aLower:gfloat; aUpper:gfloat);
 214    property Value : gfloat read GetValue write SetValue;
 215    property Lower : gfloat read GetLower write SetLower;
 216    property Upper : gfloat read GetUpper write SetUpper;
 217    property StepIncrement : gfloat read GetStepIncrement write SetStepIncrement;
 218    property PageIncrement : gfloat read GetPageIncrement write SetPageIncrement;
 219    property PageSize : gfloat read GetPageSize write SetPageSize;
 220  end;
 221
 222
 223  TFPgtkToolTips = class (TFPgtkData)
 224  Private
 225    function GetEnabled : boolean;
 226    procedure SetEnabled (TheValue : boolean);
 227    function GetDelay : integer;
 228    procedure SetDelay (TheValue : integer);
 229    function GetColorForeground : PGdkColor;
 230    procedure SetColorForeground (TheValue : PGdkColor);
 231    function GetColorBackground : PGdkColor;
 232    procedure SetColorBackground (TheValue : PGdkColor);
 233  Protected
 234    procedure CreateGtkObject; override;
 235  Public
 236    function TheGtkObject : PGtkToolTips;
 237    procedure SetColors (Fore:PGdkColor; Back:PGdkColor);
 238    procedure SetTip (Widget:TFPgtkWidget; TipText:string; TipPrivate:string);
 239    property Enabled : boolean read GetEnabled write SetEnabled;
 240    property Delay : integer read GetDelay write SetDelay;
 241    property ColorForeground : PGdkColor read GetColorForeground write SetColorForeground;
 242    property ColorBackground : PGdkColor read GetColorBackground write SetColorBackground;
 243    procedure ForceWindow;
 244  end;
 245
 246  TFPgtkWidgetSignalFunction = procedure (Sender:TFPgtkObject; Widget:TFPgtkWidget; Data:pointer) of Object;
 247  TFPgtkEventFunction = function (Sender:TFPgtkWidget; Event:PGdkEvent; data:pointer): boolean of Object;
 248  TFPgtkEventButtonFunction = function (Sender:TFPgtkWidget; Event:PGdkEventButton; data:pointer): boolean of Object;
 249  TFPgtkEventMotionFunction = function (Sender:TFPgtkWidget; Event:PGdkEventMotion; data:pointer): boolean of Object;
 250  TFPgtkEventExposeFunction = function (Sender:TFPgtkWidget; Event:PGdkEventExpose; data:pointer): boolean of Object;
 251  TFPgtkEventKeyFunction = function (Sender:TFPgtkWidget; Event:PGdkEventKey; data:pointer): boolean of Object;
 252  TFPgtkEventCrossingFunction = function (Sender:TFPgtkWidget; Event:PGdkEventCrossing; data:pointer): boolean of Object;
 253  TFPgtkEventConfigureFunction = function (Sender:TFPgtkWidget; Event:PGdkEventConfigure; data:pointer): boolean of Object;
 254  TFPgtkEventFocusFunction = function (Sender:TFPgtkWidget; Event:PGdkEventFocus; data:pointer): boolean of Object;
 255  TFPgtkEventPropertyFunction = function (Sender:TFPgtkWidget; Event:PGdkEventProperty; data:pointer): boolean of Object;
 256  TFPgtkEventSelectionFunction = function (Sender:TFPgtkWidget; Event:PGdkEventSelection; data:pointer): boolean of Object;
 257  TFPgtkEventProximityFunction = function (Sender:TFPgtkWidget; Event:PGdkEventProximity; data:pointer): boolean of Object;
 258  TFPgtkEventClientFunction = function (Sender:TFPgtkWidget; Event:PGdkEventClient; data:pointer): boolean of Object;
 259  TFPgtkEventNoExposeFunction = function (Sender:TFPgtkWidget; Event:PGdkEventNoExpose; data:pointer): boolean of Object;
 260
 261  TFPgtkWidget = class (TFPgtkObject)
 262  Private
 263    function GetTheGtkWidget : PGtkWidget;
 264    procedure SetTheGtkWidget (TheValue : PGtkWidget);
 265    function GetAllocation : TGtkAllocation;
 266    function GetName : string;
 267    procedure SetName (TheValue : string);
 268    function GetPropFlags : longint;
 269    procedure SetPropFlags (TheValue : longint);
 270    function GetState : longint;
 271    function GetSavedState : longint;
 272    function GetParent : TFPgtkWidget;
 273    procedure SetParent (TheValue : TFPgtkWidget);
 274    function GetParentWindow : PGdkWindow;
 275    procedure SetParentWindow (TheValue : PGdkWindow);
 276    procedure Reparent (NewParent:TFPgtkWidget);
 277    function GetVisible : boolean;
 278    procedure SetVisible (TheValue : boolean);
 279    function GetNoWindow : boolean;
 280    procedure SetNoWindow (TheValue : boolean);
 281    function GetRealized : boolean;
 282    procedure SetRealized (TheValue : boolean);
 283    function GetMapped : boolean;
 284    procedure SetMapped (TheValue : boolean);
 285    function GetDrawable : boolean;
 286    function GetIsSensitive : boolean;
 287    function GetSensitive : boolean;
 288    procedure SetSensitive (TheValue : boolean);
 289    function GetParentSensitive : boolean;
 290    procedure SetParentSensitive (TheValue : boolean);
 291    function GetAppPaintable : boolean;
 292    function GetCanFocus : boolean;
 293    procedure SetCanFocus (TheValue : boolean);
 294    function GetHasFocus : boolean;
 295    function GetCanDefault : boolean;
 296    procedure SetCanDefault (TheValue : boolean);
 297    function GetHasDefault : boolean;
 298    function GetReceivesDefault : boolean;
 299    function GetCompositeChild : boolean;
 300    function GetTooltip : string;
 301    procedure SetTooltip (TheValue : string);
 302    function GetColormap : PGdkColormap;
 303    procedure SetColormap (TheValue : PGdkColormap);
 304  Protected
 305    procedure SetFlags (NewFlags:longint);
 306    procedure UnsetFlags (NewUnsetFlags:longint);
 307    procedure Map;
 308    procedure Unmap;
 309    procedure QueueDraw;
 310    procedure QueueResize;
 311    procedure DrawFocus;
 312    procedure DrawDefault;
 313  Public
 314    function TheGtkObject : PGtkWidget;
 315    property TheGtkWidget : PGtkWidget read GetTheGtkWidget write SetTheGtkWidget;
 316    function WidgetSignalConnect (Signal:string; Proc:TFPgtkWidgetSignalFunction; data:pointer) : guint;
 317    function WidgetSignalConnectAfter (Signal:string; Proc:TFPgtkWidgetSignalFunction; data:pointer) : guint;
 318    procedure Draw (Rectangle:PGdkRectangle); Overload;
 319    procedure Show;
 320    procedure Hide;
 321    procedure Realize;
 322    procedure Unrealize;
 323    procedure ShowNow;
 324    procedure ShowAll;
 325    procedure HideAll;
 326    procedure SetAllocation (AnAllocation:TGtkAllocation); Overload;
 327    procedure SetAllocation (x:integer; y:integer; width:integer; height:integer); Overload;
 328    property Allocation : TGtkAllocation read GetAllocation write SetAllocation;
 329    procedure SetUPosition (x:integer; y:integer);
 330    procedure SetUsize (width:integer; height:integer);
 331    property Name : string read GetName write SetName;
 332    property Flags : longint read GetPropFlags write SetPropFlags;
 333    property State : longint read GetState;
 334    property SavedState : longint read GetSavedState;
 335    property Parent : TFPgtkWidget read GetParent write SetParent;
 336    property ParentWindow : PGdkWindow read GetParentWindow write SetParentWindow;
 337    procedure Unparent;
 338    property Visible : boolean read GetVisible write SetVisible;
 339    property NoWindow : boolean read GetNoWindow write SetNoWindow;
 340    property Realized : boolean read GetRealized write SetRealized;
 341    property Mapped : boolean read GetMapped write SetMapped;
 342    property Drawable : boolean read GetDrawable;
 343    property IsSensitive : boolean read GetIsSensitive;
 344    property Sensitive : boolean read GetSensitive write SetSensitive;
 345    property ParentSensitive : boolean read GetParentSensitive write SetParentSensitive;
 346    property AppPaintable : boolean read GetAppPaintable;
 347    property CanFocus : boolean read GetCanFocus write SetCanFocus;
 348    procedure GrabFocus;
 349    property HasFocus : boolean read GetHasFocus;
 350    property CanDefault : boolean read GetCanDefault write SetCanDefault;
 351    procedure GrabDefault;
 352    property HasDefault : boolean read GetHasDefault;
 353    property ReceivesDefault : boolean read GetReceivesDefault;
 354    property CompositeChild : boolean read GetCompositeChild;
 355    property Tooltip : string read GetTooltip write SetTooltip;
 356    procedure HideOnDelete;
 357    property Colormap : PGdkColormap read GetColormap write SetColormap;
 358    function ConnectShow (proc:TFPgtkSignalFunction; data:pointer) : guint;
 359    function ConnectAfterShow (proc:TFPgtkSignalFunction; data:pointer) : guint;
 360    function Connecthide (proc:TFPgtkSignalFunction; data:pointer) : guint;
 361    function ConnectAfterhide (proc:TFPgtkSignalFunction; data:pointer) : guint;
 362    function Connectmap (proc:TFPgtkSignalFunction; data:pointer) : guint;
 363    function ConnectAftermap (proc:TFPgtkSignalFunction; data:pointer) : guint;
 364    function Connectunmap (proc:TFPgtkSignalFunction; data:pointer) : guint;
 365    function ConnectAfterunmap (proc:TFPgtkSignalFunction; data:pointer) : guint;
 366    function Connectrealize (proc:TFPgtkSignalFunction; data:pointer) : guint;
 367    function ConnectAfterrealize (proc:TFPgtkSignalFunction; data:pointer) : guint;
 368    function Connectunrealize (proc:TFPgtkSignalFunction; data:pointer) : guint;
 369    function ConnectAfterunrealize (proc:TFPgtkSignalFunction; data:pointer) : guint;
 370    function ConnectDrawFocus (proc:TFPgtkSignalFunction; data:pointer) : guint;
 371    function ConnectAfterDrawFocus (proc:TFPgtkSignalFunction; data:pointer) : guint;
 372    function ConnectDrawDefault (proc:TFPgtkSignalFunction; data:pointer) : guint;
 373    function ConnectAfterDrawDefault (proc:TFPgtkSignalFunction; data:pointer) : guint;
 374    function ConnectParentSet (proc:TFPgtkWidgetSignalFunction; data:pointer) : guint;
 375    function ConnectAfterParentSet (proc:TFPgtkWidgetSignalFunction; data:pointer) : guint;
 376    function ConnectGrabFocus (proc:TFPgtkSignalFunction; data:pointer) : guint;
 377    function ConnectAfterGrabFocus (proc:TFPgtkSignalFunction; data:pointer) : guint;
 378    function EventConnect (Signal:string; Proc:TFPgtkEventFunction; data:pointer) : guint;
 379    function EventConnectAfter (Signal:string; Proc:TFPgtkEventFunction; data:pointer) : guint;
 380    function ConnectEvent (proc:TFPgtkEventFunction; data:pointer) : guint;
 381    function ConnectAfterEvent (proc:TFPgtkEventFunction; data:pointer) : guint;
 382    function EventButtonConnect (Signal:string; Proc:TFPgtkEventButtonFunction; data:pointer) : guint;
 383    function EventButtonConnectAfter (Signal:string; Proc:TFPgtkEventButtonFunction; data:pointer) : guint;
 384    function ConnectButtonPressEvent (proc:TFPgtkEventButtonFunction; data:pointer) : guint;
 385    function ConnectAfterButtonPressEvent (proc:TFPgtkEventButtonFunction; data:pointer) : guint;
 386    function ConnectButtonReleaseEvent (proc:TFPgtkEventButtonFunction; data:pointer) : guint;
 387    function ConnectAfterButtonReleaseEvent (proc:TFPgtkEventButtonFunction; data:pointer) : guint;
 388    function EventMotionConnect (Signal:string; Proc:TFPgtkEventMotionFunction; data:pointer) : guint;
 389    function EventMotionConnectAfter (Signal:string; Proc:TFPgtkEventMotionFunction; data:pointer) : guint;
 390    function ConnectMotionNotifyEvent (proc:TFPgtkEventMotionFunction; data:pointer) : guint;
 391    function ConnectAfterMotionNotifyEvent (proc:TFPgtkEventMotionFunction; data:pointer) : guint;
 392    function ConnectDeleteEvent (proc:TFPgtkEventFunction; data:pointer) : guint;
 393    function ConnectAfterDeleteEvent (proc:TFPgtkEventFunction; data:pointer) : guint;
 394    function ConnectDestroyEvent (proc:TFPgtkEventFunction; data:pointer) : guint;
 395    function ConnectAfterDestroyEvent (proc:TFPgtkEventFunction; data:pointer) : guint;
 396    function EventExposeConnect (Signal:string; Proc:TFPgtkEventExposeFunction; data:pointer) : guint;
 397    function EventExposeConnectAfter (Signal:string; Proc:TFPgtkEventExposeFunction; data:pointer) : guint;
 398    function ConnectExposeEvent (proc:TFPgtkEventExposeFunction; data:pointer) : guint;
 399    function ConnectAfterExposeEvent (proc:TFPgtkEventExposeFunction; data:pointer) : guint;
 400    function EventKeyConnect (Signal:string; Proc:TFPgtkEventKeyFunction; data:pointer) : guint;
 401    function EventKeyConnectAfter (Signal:string; Proc:TFPgtkEventKeyFunction; data:pointer) : guint;
 402    function ConnectKeyPressEvent (proc:TFPgtkEventKeyFunction; data:pointer) : guint;
 403    function ConnectAfterKeyPressEvent (proc:TFPgtkEventKeyFunction; data:pointer) : guint;
 404    function ConnectKeyReleaseEvent (proc:TFPgtkEventKeyFunction; data:pointer) : guint;
 405    function ConnectAfterKeyReleaseEvent (proc:TFPgtkEventKeyFunction; data:pointer) : guint;
 406    function EventCrossingConnect (Signal:string; Proc:TFPgtkEventCrossingFunction; data:pointer) : guint;
 407    function EventCrossingConnectAfter (Signal:string; Proc:TFPgtkEventCrossingFunction; data:pointer) : guint;
 408    function ConnectEnterNotifyEvent (proc:TFPgtkEventCrossingFunction; data:pointer) : guint;
 409    function ConnectAfterEnterNotifyEvent (proc:TFPgtkEventCrossingFunction; data:pointer) : guint;
 410    function ConnectLeaveNotifyEvent (proc:TFPgtkEventCrossingFunction; data:pointer) : guint;
 411    function ConnectAfterLeaveNotifyEvent (proc:TFPgtkEventCrossingFunction; data:pointer) : guint;
 412    function EventConfigureConnect (Signal:string; Proc:TFPgtkEventConfigureFunction; data:pointer) : guint;
 413    function EventConfigureConnectAfter (Signal:string; Proc:TFPgtkEventConfigureFunction; data:pointer) : guint;
 414    function ConnectConfigureEvent (proc:TFPgtkEventConfigureFunction; data:pointer) : guint;
 415    function ConnectAfterConfigureEvent (proc:TFPgtkEventConfigureFunction; data:pointer) : guint;
 416    function EventFocusConnect (Signal:string; Proc:TFPgtkEventFocusFunction; data:pointer) : guint;
 417    function EventFocusConnectAfter (Signal:string; Proc:TFPgtkEventFocusFunction; data:pointer) : guint;
 418    function ConnectFocusInEvent (proc:TFPgtkEventFocusFunction; data:pointer) : guint;
 419    function ConnectAfterFocusInEvent (proc:TFPgtkEventFocusFunction; data:pointer) : guint;
 420    function ConnectFocusOutEvent (proc:TFPgtkEventFocusFunction; data:pointer) : guint;
 421    function ConnectAfterFocusOutEvent (proc:TFPgtkEventFocusFunction; data:pointer) : guint;
 422    function ConnectMapEvent (proc:TFPgtkEventFunction; data:pointer) : guint;
 423    function ConnectAfterMapEvent (proc:TFPgtkEventFunction; data:pointer) : guint;
 424    function ConnectUnmapEvent (proc:TFPgtkEventFunction; data:pointer) : guint;
 425    function ConnectAfterUnmapEvent (proc:TFPgtkEventFunction; data:pointer) : guint;
 426    function EventPropertyConnect (Signal:string; Proc:TFPgtkEventPropertyFunction; data:pointer) : guint;
 427    function EventPropertyConnectAfter (Signal:string; Proc:TFPgtkEventPropertyFunction; data:pointer) : guint;
 428    function ConnectPropertyNotifyEvent (proc:TFPgtkEventPropertyFunction; data:pointer) : guint;
 429    function ConnectAfterPropertyNotifyEvent (proc:TFPgtkEventPropertyFunction; data:pointer) : guint;
 430    function EventSelectionConnect (Signal:string; Proc:TFPgtkEventSelectionFunction; data:pointer) : guint;
 431    function EventSelectionConnectAfter (Signal:string; Proc:TFPgtkEventSelectionFunction; data:pointer) : guint;
 432    function ConnectSelectionClearEvent (proc:TFPgtkEventSelectionFunction; data:pointer) : guint;
 433    function ConnectAfterSelectionClearEvent (proc:TFPgtkEventSelectionFunction; data:pointer) : guint;
 434    function ConnectSelectionRequestEvent (proc:TFPgtkEventSelectionFunction; data:pointer) : guint;
 435    function ConnectAfterSelectionRequestEvent (proc:TFPgtkEventSelectionFunction; data:pointer) : guint;
 436    function ConnectSelectionNotifyEvent (proc:TFPgtkEventSelectionFunction; data:pointer) : guint;
 437    function ConnectAfterSelectionNotifyEvent (proc:TFPgtkEventSelectionFunction; data:pointer) : guint;
 438    function EventProximityConnect (Signal:string; Proc:TFPgtkEventProximityFunction; data:pointer) : guint;
 439    function EventProximityConnectAfter (Signal:string; Proc:TFPgtkEventProximityFunction; data:pointer) : guint;
 440    function ConnectProximityInEvent (proc:TFPgtkEventProximityFunction; data:pointer) : guint;
 441    function ConnectAfterProximityInEvent (proc:TFPgtkEventProximityFunction; data:pointer) : guint;
 442    function ConnectProximityOutEvent (proc:TFPgtkEventProximityFunction; data:pointer) : guint;
 443    function ConnectAfterProximityOutEvent (proc:TFPgtkEventProximityFunction; data:pointer) : guint;
 444    function EventClientConnect (Signal:string; Proc:TFPgtkEventClientFunction; data:pointer) : guint;
 445    function EventClientConnectAfter (Signal:string; Proc:TFPgtkEventClientFunction; data:pointer) : guint;
 446    function ConnectClientEvent (proc:TFPgtkEventClientFunction; data:pointer) : guint;
 447    function ConnectAfterClientEvent (proc:TFPgtkEventClientFunction; data:pointer) : guint;
 448    function EventNoExposeConnect (Signal:string; Proc:TFPgtkEventNoExposeFunction; data:pointer) : guint;
 449    function EventNoExposeConnectAfter (Signal:string; Proc:TFPgtkEventNoExposeFunction; data:pointer) : guint;
 450    function ConnectNoExposeEvent (proc:TFPgtkEventNoExposeFunction; data:pointer) : guint;
 451    function ConnectAfterNoExposeEvent (proc:TFPgtkEventNoExposeFunction; data:pointer) : guint;
 452    function ConnectVisibilityNotifyEvent (proc:TFPgtkEventFunction; data:pointer) : guint;
 453    function ConnectAfterVisibilityNotifyEvent (proc:TFPgtkEventFunction; data:pointer) : guint;
 454    procedure LockAccelerators;
 455    procedure UnlockAccelerators;
 456    procedure RemoveAccelerators (aSignal:string; OnlyVisible:boolean);
 457    procedure ActivateAccelGroups (Key:guint; Mods:TGdkModifierType);
 458    procedure AcceleratorAdd (AG:PGtkAccelGroup; aSignal:string; Key:guint; Mods:TGdkModifierType; acFlags:TGtkAccelFlags); Overload;
 459  end;
 460
 461  TFPgtkForEachProcedure = procedure (item : pointer; data : pointer) of object;
 462
 463  TFPgtkGroup = class (TList)
 464  Private
 465    FManageLists : boolean;
 466    FListChanged:boolean;
 467    FSListChanged:boolean;
 468    FClassesChanged:boolean;
 469    FNotUpdating:boolean;
 470    FGList:PGList;
 471    FGSList:PGSList;
 472    procedure FreeList;
 473    procedure FreeSList;
 474    function CreateGList : PGList;
 475    function CreateGSList : PGSList;
 476    function GetGtkListProp : PGList;
 477    procedure SetGtkListProp (TheValue : PGList);
 478    function GetGtkSListProp : PGSList;
 479    procedure SetGtkSListProp (TheValue : PGSList);
 480  Protected
 481    procedure BuildFromGtkList;
 482    procedure BuildFromGtkSList;
 483    procedure Notify (ptr:pointer; Action:TListNotification); Override;
 484    function GetData (index:integer) : pointer; Dynamic;
 485    function UngetData (data:pointer) : pointer; Dynamic;
 486  Public
 487    property ManageLists : boolean read FManageLists write FManageLists;
 488    constructor Create;
 489    destructor Destroy; Override;
 490    function GetGtkList (buffered:boolean) : PGList;
 491    function GetGtkSList (buffered:boolean) : PGSList;
 492    procedure BeginUpdate;
 493    procedure EndUpdate;
 494    procedure ForEach (Proc:TFPgtkForEachProcedure; data:pointer);
 495    property GtkList : PGList read GetGtkListProp write SetGtkListProp;
 496    property GtkSList : PGSList read GetGtkSListProp write SetGtkSListProp;
 497  end;
 498
 499
 500  TFPgtkWidgetGroup = class (TFPgtkGroup)
 501  Private
 502    function GetItem(Index:integer) : TFPgtkWidget;
 503    procedure SetItem (Index:integer; TheValue : TFPgtkWidget);
 504    function GetTooltips(index:integer) : string;
 505    procedure SetTooltips (index:integer; TheValue : string);
 506  Public
 507    function GetData (index:integer) : pointer; Override;
 508    function UnGetData (data:pointer) : pointer; Override;
 509    procedure AddToContainer (Container:TFPgtkContainer);
 510    procedure PackInBox (box:TFPgtkBox; AtStart:boolean; Expanding:boolean; Fill:boolean; Padding:integer);
 511    property Items [Index:integer]  : TFPgtkWidget read GetItem write SetItem;
 512    property Tooltips [index:integer]  : string read GetTooltips write SetTooltips;
 513  end;
 514
 515
 516  TFPgtkMisc = class (TFPgtkWidget)
 517  Private
 518    function GetXAlign : gfloat;
 519    procedure SetXAlign (TheValue : gfloat);
 520    function GetYAlign : gfloat;
 521    procedure SetYAlign (TheValue : gfloat);
 522    function GetXPad : word;
 523    procedure SetXPad (TheValue : word);
 524    function GetYPad : word;
 525    procedure SetYPad (TheValue : word);
 526  Public
 527    function TheGtkObject : PGtkMisc;
 528    procedure SetAlignment (x:gfloat; y:gfloat);
 529    procedure SetPadding (x:word; y:word);
 530    property XAlign : gfloat read GetXAlign write SetXAlign;
 531    property YAlign : gfloat read GetYAlign write SetYAlign;
 532    property XPad : word read GetXPad write SetXPad;
 533    property YPad : word read GetYPad write SetYPad;
 534  end;
 535
 536  TFPgtkLabelClass = class of TFPgtkLabel;
 537
 538  TFPgtkLabel = class (TFPgtkMisc)
 539  Private
 540    function GetText : string;
 541    procedure SetText (TheValue : string);
 542    function GetPattern : string;
 543    procedure SetPattern (TheValue : string);
 544    function GetJustify : TGtkJustification;
 545    procedure SetJustify (TheValue : TGtkJustification);
 546    function GetLineWrap : boolean;
 547    procedure SetLineWrap (TheValue : boolean);
 548  Protected
 549    procedure CreateGtkObject; override;
 550  Public
 551    function TheGtkObject : PGtkLabel;
 552    constructor Create (aText:string);
 553    property Text : string read GetText write SetText;
 554    property Pattern : string read GetPattern write SetPattern;
 555    property Justify : TGtkJustification read GetJustify write SetJustify;
 556    property LineWrap : boolean read GetLineWrap write SetLineWrap;
 557    function ParseUline (aText:string) : guint;
 558  end;
 559
 560
 561  TFPgtkAccelLabel = class (TFPgtkLabel)
 562  Private
 563    function GetAccelWidget : TFPgtkWidget;
 564    procedure SetAccelWidget (TheValue : TFPgtkWidget);
 565  Protected
 566    procedure CreateGtkObject; override;
 567  Public
 568    function TheGtkObject : PGtkAccelLabel;
 569    property AccelWidget : TFPgtkWidget read GetAccelWidget write SetAccelWidget;
 570    function AccelText : string;
 571    procedure Refetch;
 572  end;
 573
 574
 575  TFPgtkTipsQuery = class (TFPgtkLabel)
 576  Protected
 577    procedure CreateGtkObject; override;
 578  Public
 579    function TheGtkObject : PGtkTipsQuery;
 580  end;
 581
 582
 583  TFPgtkArrow = class (TFPgtkMisc)
 584  Private
 585    function GetArrowType : TGtkArrowType;
 586    procedure SetArrowType (TheValue : TGtkArrowType);
 587    function GetShadowType : TGtkShadowType;
 588    procedure SetShadowType (TheValue : TGtkShadowType);
 589  Protected
 590    procedure CreateGtkObject; override;
 591  Public
 592    function TheGtkObject : PGtkArrow;
 593    property ArrowType : TGtkArrowType read GetArrowType write SetArrowType;
 594    property ShadowType : TGtkShadowType read GetShadowType write SetShadowType;
 595    procedure SetTypes (AnArrowType:TGtkArrowType; AShadowtype:TGtkShadowType);
 596    constructor Create (AnArrowType:TGtkArrowType; AShadowType:TGtkShadowType);
 597  end;
 598
 599
 600  TFPgtkImage = class (TFPgtkMisc)
 601  Private
 602    function GetImageProp : PGdkImage;
 603    procedure SetImageProp (TheValue : PGdkImage);
 604    function GetMask : PGdkBitMap;
 605    procedure SetMask (TheValue : PGdkBitMap);
 606  Protected
 607    procedure CreateGtkObject; override;
 608  Public
 609    FMask:PGdkBitMap;
 610    FImage:PGdkImage;
 611    function TheGtkObject : PGtkImage;
 612    property Image : PGdkImage read GetImageProp write SetImageProp;
 613    property Mask : PGdkBitMap read GetMask write SetMask;
 614    procedure SetImage (anImage:PGdkImage; aMask:PGdkBitmap);
 615    constructor Create (anImage:PGdkImage; aMask:PGdkBitmap);
 616  end;
 617
 618  TStringArray = array[0..32000] of pgchar;
 619  PStringArray = ^TStringArray;
 620
 621  TFPgtkPixmap = class (TFPgtkMisc)
 622  Private
 623    function GetBuildInsensitive : longbool;
 624    procedure SetBuildInsensitive (TheValue : longbool);
 625    function GetPixmapProp : PGdkPixMap;
 626    procedure SetPixmapProp (TheValue : PGdkPixMap);
 627    function GetMask : PGdkBitMap;
 628    procedure SetMask (TheValue : PGdkBitMap);
 629  Protected
 630    procedure CreateGtkObject; override;
 631  Public
 632    FMask:PGdkBitMap;
 633    FPixMap:PGdkPixmap;
 634    function TheGtkObject : PGtkPixmap;
 635    property BuildInsensitive : longbool read GetBuildInsensitive write SetBuildInsensitive;
 636    constructor Create;
 637    constructor CreateFromFile (Filename:string; Window:TFPgtkWidget);
 638    constructor CreateFromStrings (Data:TStrings; Window:TFPgtkWidget);
 639    constructor CreateFromText (Data:string; Window:TFPgtkWidget);
 640    property PixMap : PGdkPixMap read GetPixmapProp write SetPixmapProp;
 641    property Mask : PGdkBitMap read GetMask write SetMask;
 642    procedure SetPixmap (aPixmap:PGdkPixMap; aMask:PGdkBitmap);
 643    procedure GetPixmap (var aPixmap:PGdkPixmap; var aMask:PGdkBitmap);
 644    procedure LoadFromFile (Filename:string);
 645    procedure LoadFromStrings (data:TStrings);
 646    procedure LoadFromText (data:string);
 647    procedure LoadFromArray (data:array of string);
 648  end;
 649
 650  TFPgtkDirectionFunctionSignalFunction = function (Sender:TFPgtkObject; Direction:TGtkDirectionType; data:pointer): TGtkDirectionType of Object;
 651
 652  TFPgtkContainer = class (TFPgtkWidget)
 653  Private
 654    function GetBorder : integer;
 655    procedure SetBorder (TheValue : integer);
 656    function GetChildren : TFPgtkWidgetGroup;
 657  Public
 658    FChildren:TFPgtkWidgetGroup;
 659    function TheGtkObject : PGtkContainer;
 660    property Border : integer read GetBorder write SetBorder;
 661    procedure Add (AWidget:TFPgtkWidget; IsVisible:boolean); Overload;
 662    procedure Add (AWidget:TFPgtkWidget); Overload;
 663    procedure Remove (AWidget:TFPgtkWidget);
 664    constructor Create;
 665    destructor Destroy; Override;
 666    property Children : TFPgtkWidgetGroup read GetChildren;
 667    procedure Focus (Direction:TGtkDirectionType);
 668    procedure FocusChild (Child:TFPgtkWidget);
 669    procedure RegisterToplevel;
 670    procedure UnregisterToplevel;
 671    procedure ResizeChildren;
 672    function DirectionFunctionSignalConnect (Signal:string; Proc:TFPgtkDirectionFunctionSignalFunction; data:pointer) : guint;
 673    function DirectionFunctionSignalConnectAfter (Signal:string; Proc:TFPgtkDirectionFunctionSignalFunction; data:pointer) : guint;
 674    function ConnectAdd (proc:TFPgtkWidgetSignalFunction; data:pointer) : guint;
 675    function ConnectAfterAdd (proc:TFPgtkWidgetSignalFunction; data:pointer) : guint;
 676    function ConnectRemove (proc:TFPgtkWidgetSignalFunction; data:pointer) : guint;
 677    function ConnectAfterRemove (proc:TFPgtkWidgetSignalFunction; data:pointer) : guint;
 678    function ConnectCheckResize (proc:TFPgtkSignalFunction; data:pointer) : guint;
 679    function ConnectAfterCheckResize (proc:TFPgtkSignalFunction; data:pointer) : guint;
 680    function ConnectFocus (proc:TFPgtkDirectionFunctionSignalFunction; data:pointer) : guint;
 681    function ConnectAfterFocus (proc:TFPgtkDirectionFunctionSignalFunction; data:pointer) : guint;
 682    function ConnectSetFocusChild (proc:TFPgtkWidgetSignalFunction; data:pointer) : guint;
 683    function ConnectAfterSetFocusChild (proc:TFPgtkWidgetSignalFunction; data:pointer) : guint;
 684  end;
 685
 686
 687  TFPgtkBin = class (TFPgtkContainer)
 688  Private
 689    function GetChild : TFPgtkWidget;
 690    procedure SetChild (TheValue : TFPgtkWidget);
 691  Protected
 692    property Child : TFPgtkWidget read GetChild write SetChild;
 693  Public
 694    function TheGtkObject : PGtkBin;
 695  end;
 696
 697
 698  TFPgtkAlignment = class (TFPgtkBin)
 699  Public
 700    function TheGtkObject : PGtkAlignment;
 701    procedure Configure (anXAlign:gfloat; anYAlign:gfloat; anXScale:gfloat; anYScale:gfloat);
 702  end;
 703
 704
 705  TFPgtkFrame = class (TFPgtkBin)
 706  Private
 707    function GetText : string;
 708    procedure SetText (TheValue : string);
 709    function GetAlignment : gfloat;
 710    procedure SetAlignment (TheValue : gfloat);
 711    function GetShadowType : TgtkShadowType;
 712    procedure SetShadowType (TheValue : TgtkShadowType);
 713  Protected
 714    procedure CreateGtkObject; override;
 715  Public
 716    function TheGtkObject : PGtkFrame;
 717    property Text : string read GetText write SetText;
 718    property Alignment : gfloat read GetAlignment write SetAlignment;
 719    property ShadowType : TgtkShadowType read GetShadowType write SetShadowType;
 720  end;
 721
 722
 723  TFPgtkAspectFrame = class (TFPgtkFrame)
 724  Protected
 725    procedure CreateGtkObject; override;
 726  Public
 727    function TheGtkObject : PGtkAspectFrame;
 728    procedure Configure (anXAlign:gfloat; anYAlign:gfloat; Ratio:gfloat; ObeyChild:longbool);
 729  end;
 730
 731
 732  TFPgtkButton = class (TFPgtkBin)
 733  Private
 734    FAccelKey : guint;
 735    FAddContainer : TFPgtkContainer;
 736    FLabel : TFPgtkLabel;
 737    procedure CreateLabel (aText:string);
 738    function GetText : string;
 739    procedure SetText (TheValue : string);
 740    function GetReliefStyle : TGtkReliefStyle;
 741    procedure SetReliefStyle (TheValue : TGtkReliefStyle);
 742  Protected
 743    procedure CreateGtkObject; override;
 744    function LabelClass : TFPgtkLabelClass; Virtual;
 745    procedure NotifyDestroy (AnObject:TFPgtkObject); Override;
 746    procedure LabelCreated; Virtual;
 747  Public
 748    function TheGtkObject : PGtkButton;
 749    function ConnectClicked (proc:TFPgtkSignalFunction; data:pointer) : guint;
 750    function ConnectAfterClicked (proc:TFPgtkSignalFunction; data:pointer) : guint;
 751    function ConnectPressed (proc:TFPgtkSignalFunction; data:pointer) : guint;
 752    function ConnectAfterPressed (proc:TFPgtkSignalFunction; data:pointer) : guint;
 753    function ConnectReleased (proc:TFPgtkSignalFunction; data:pointer) : guint;
 754    function ConnectAfterReleased (proc:TFPgtkSignalFunction; data:pointer) : guint;
 755    function ConnectEnter (proc:TFPgtkSignalFunction; data:pointer) : guint;
 756    function ConnectAfterEnter (proc:TFPgtkSignalFunction; data:pointer) : guint;
 757    function ConnectLeave (proc:TFPgtkSignalFunction; data:pointer) : guint;
 758    function ConnectAfterLeave (proc:TFPgtkSignalFunction; data:pointer) : guint;
 759    procedure Clicked;
 760    procedure Pressed;
 761    procedure Released;
 762    procedure Enter;
 763    procedure Leave;
 764    constructor Create;
 765    constructor CreateWithLabel (aText:string); Overload;
 766    constructor CreateWithLabel (aText:string; AccelGroup:PGtkAccelGroup); Overload;
 767    property TheLabel : TFPgtkLabel read FLabel;
 768    property Text : string read GetText write SetText;
 769    property ReliefStyle : TGtkReliefStyle read GetReliefStyle write SetReliefStyle;
 770    property AddContainer : TFPgtkContainer read FAddContainer write FAddContainer;
 771    property AccelKey : guint read FAccelKey;
 772  end;
 773
 774
 775  TFPgtkToggleButton = class (TFPgtkButton)
 776  Private
 777    function GetActive : boolean;
 778    procedure SetActive (TheValue : boolean);
 779    function GetDrawIndicator : boolean;
 780    procedure SetDrawIndicator (TheValue : boolean);
 781  Protected
 782    procedure CreateGtkObject; override;
 783  Public
 784    function TheGtkObject : PGtkToggleButton;
 785    function ConnectToggled (proc:TFPgtkSignalFunction; data:pointer) : guint;
 786    function ConnectAfterToggled (proc:TFPgtkSignalFunction; data:pointer) : guint;
 787    procedure Toggled;
 788    property Active : boolean read GetActive write SetActive;
 789    property DrawIndicator : boolean read GetDrawIndicator write SetDrawIndicator;
 790  end;
 791
 792
 793  TFPgtkCheckButton = class (TFPgtkToggleButton)
 794  Protected
 795    procedure CreateGtkObject; override;
 796  Public
 797    function TheGtkObject : PGtkCheckButton;
 798  end;
 799
 800
 801  TFPgtkRadioButton = class (TFPgtkCheckButton)
 802  Protected
 803    procedure CreateGtkObject; Override;
 804  Public
 805    FGroup:TFPgtkRadioButtonGroup;
 806    function TheGtkObject : PGtkRadioButton;
 807    constructor Create (AGroup:TFPgtkRadioButtonGroup);
 808    constructor CreateWithLabel (AGroup:TFPgtkRadioButtonGroup; aText:string);
 809  end;
 810
 811
 812  TFPgtkRadioButtonGroup = class (TFPgtkWidgetGroup)
 813  Private
 814    function GetItem(index:integer) : TFPgtkRadioButton;
 815    procedure SetItem (index:integer; TheValue : TFPgtkRadioButton);
 816  Public
 817    property Items [index:integer]  : TFPgtkRadioButton read GetItem write SetItem;
 818    function ActiveButtonText : string;
 819    function ActiveButtonIndex : integer;
 820    function ActiveButton : TFPgtkRadioButton;
 821  end;
 822
 823
 824  TFPgtkOptionMenu = class (TFPgtkButton)
 825  Private
 826    function GetMenu : TFPgtkMenu;
 827    procedure setmenu (TheValue : TFPgtkMenu);
 828  Protected
 829    procedure CreateGtkObject; override;
 830  Public
 831    function TheGtkObject : PGtkOptionMenu;
 832    property Menu : TFPgtkMenu read GetMenu write setmenu;
 833    procedure RemoveMenu;
 834    procedure SetHistory (index:integer);
 835    procedure Clear;
 836  end;
 837
 838  TFPgtkItemClass = class of TFPgtkItem;
 839
 840  TFPgtkItem = class (TFPgtkBin)
 841  Private
 842    FAccelKey : guint;
 843    FAddContainer : TFPgtkContainer;
 844    FLabel : TFPgtkLabel;
 845    procedure CreateLabel (aText:string);
 846    function GetText : string;
 847    procedure SetText (TheValue : string);
 848  Protected
 849    function LabelClass : TFPgtkLabelClass; Virtual;
 850    procedure NotifyDestroy (AnObject:TFPgtkObject); Override;
 851    procedure LabelCreated; Virtual;
 852  Public
 853    function TheGtkObject : PGtkItem;
 854    function ConnectSelect (proc:TFPgtkSignalFunction; data:pointer) : guint;
 855    function ConnectAfterSelect (proc:TFPgtkSignalFunction; data:pointer) : guint;
 856    function ConnectDeselect (proc:TFPgtkSignalFunction; data:pointer) : guint;
 857    function ConnectAfterDeselect (proc:TFPgtkSignalFunction; data:pointer) : guint;
 858    function ConnectToggle (proc:TFPgtkSignalFunction; data:pointer) : guint;
 859    function ConnectAfterToggle (proc:TFPgtkSignalFunction; data:pointer) : guint;
 860    procedure Select;
 861    procedure Deselect;
 862    procedure Toggle;
 863    constructor Create;
 864    constructor CreateWithLabel (aText:string);
 865    property TheLabel : TFPgtkLabel read FLabel;
 866    property Text : string read GetText write SetText;
 867    property AddContainer : TFPgtkContainer read FAddContainer write FAddContainer;
 868    property AccelKey : guint read FAccelKey;
 869  end;
 870
 871
 872  TFPgtkItemGroup = class (TFPgtkWidgetGroup)
 873  Private
 874    FItemClass : TFPgtkItemClass;
 875    function GetItem(index:integer) : TFPgtkItem;
 876    procedure SetItem (index:integer; TheValue : TFPgtkItem);
 877  Public
 878    property Items [index:integer]  : TFPgtkItem read GetItem write SetItem;
 879    procedure FillFromList (aList:TStrings);
 880    procedure FillFromCommaText (aList:string);
 881    procedure FillFromArray (aList:array of string);
 882    property ItemClass : TFPgtkItemClass read FItemClass write FItemClass;
 883    procedure SignalConnect (Signal:string; proc:TFPgtkSignalFunction; data:pointer);
 884    constructor create (AnItemClass:TFPgtkItemClass);
 885    function AddTextItem (aText:string) : TFPgtkItem;
 886  end;
 887
 888
 889  TFPgtkMenuItem = class (TFPgtkItem)
 890  Private
 891    function GetPlacement : TGtkSubmenuPlacement;
 892    procedure SetPlacement (TheValue : TGtkSubmenuPlacement);
 893    function GetToggleIndicator : boolean;
 894    procedure SetToggleIndicator (TheValue : boolean);
 895    function GetSubMenuIndicator : boolean;
 896    procedure SetSubMenuIndicator (TheValue : boolean);
 897    function GetJustifyRight : boolean;
 898    procedure SetJustifyRight (TheValue : boolean);
 899    function GetSubMenu : TFPgtkMenuShell;
 900    procedure SetPropSubMenu (TheValue : TFPgtkMenuShell);
 901  Protected
 902    procedure CreateGtkObject; override;
 903    function LabelClass : TFPgtkLabelClass; Override;
 904    procedure LabelCreated; Override;
 905  Public
 906    function TheGtkObject : PGtkMenuItem;
 907    function ConnectActivate (proc:TFPgtksignalFunction; data:pointer) : guint;
 908    function ConnectAfterActivate (proc:TFPgtksignalFunction; data:pointer) : guint;
 909    function ConnectActivateItem (proc:TFPgtksignalFunction; data:pointer) : guint;
 910    function ConnectAfterActivateItem (proc:TFPgtksignalFunction; data:pointer) : guint;
 911    procedure Activate;
 912    procedure SetSubMenu (aSubMenu:TFPgtkWidget);
 913    procedure RemoveSubMenu;
 914    procedure Configure (ShowToggleIndicator:boolean; ShowSubmenuIndicator:boolean);
 915    procedure RightJustify;
 916    property Placement : TGtkSubmenuPlacement read GetPlacement write SetPlacement;
 917    property ToggleIndicator : boolean read GetToggleIndicator write SetToggleIndicator;
 918    property SubMenuIndicator : boolean read GetSubMenuIndicator write SetSubMenuIndicator;
 919    property JustifyRight : boolean read GetJustifyRight write SetJustifyRight;
 920    property SubMenu : TFPgtkMenuShell read GetSubMenu write SetPropSubMenu;
 921  end;
 922
 923
 924  TFPgtkCheckMenuItem = class (TFPgtkMenuItem)
 925  Private
 926    function GetActive : boolean;
 927    procedure SetActive (TheValue : boolean);
 928    function GetShowToggle : boolean;
 929    procedure SetShowToggle (TheValue : boolean);
 930  Protected
 931    procedure CreateGtkObject; override;
 932  Public
 933    function TheGtkObject : PGtkCheckMenuItem;
 934    function ConnectToggled (proc:TFPgtksignalFunction; data:pointer) : guint;
 935    function ConnectAfterToggled (proc:TFPgtksignalFunction; data:pointer) : guint;
 936    procedure Toggled;
 937    property Active : boolean read GetActive write SetActive;
 938    property ShowToggle : boolean read GetShowToggle write SetShowToggle;
 939  end;
 940
 941
 942  TFPgtkRadioMenuItem = class (TFPgtkCheckMenuItem)
 943  Private
 944    FGroup : TFPgtkRadioMenuGroup;
 945  Protected
 946    procedure CreateGtkObject; Override;
 947  Public
 948    function TheGtkObject : PGtkRadioMenuItem;
 949    constructor Create (AGroup:TFPgtkRadioMenuGroup);
 950    constructor CreateWithLabel (Agroup:TFPgtkRadioMenuGroup; aText:string);
 951    property Group : TFPgtkRadioMenuGroup read FGroup;
 952  end;
 953
 954
 955  TFPgtkRadioMenuGroup = class (TFPgtkItemGroup)
 956  Private
 957    function GetItem(index:integer) : TFPgtkRadioMenuItem;
 958    procedure SetItem (index:integer; TheValue : TFPgtkRadioMenuItem);
 959  Public
 960    property Items [index:integer]  : TFPgtkRadioMenuItem read GetItem write SetItem;
 961    function ActiveMenuText : string;
 962    function ActiveMenuIndex : integer;
 963    function ActiveMenu : TFPgtkRadioMenuItem;
 964    constructor create;
 965  end;
 966
 967
 968  TFPgtkTearOffMenuItem = class (TFPgtkMenuItem)
 969  Protected
 970    procedure CreateGtkObject; override;
 971  Public
 972    function TheGtkObject : PGtkTearOffMenuItem;
 973  end;
 974
 975  TFPgtkScrollSignalFunction = procedure (Sender:TFPgtkObject; ScrollType:TgtkScrollType; position:gfloat; data:pointer) of Object;
 976  TFPgtkScrollBooleanSignalFunction = procedure (Sender:TFPgtkObject; ScrolType:TgtkScrollType; Position:gfloat; AutoStartSelection:boolean; data:pointer) of Object;
 977
 978  TFPgtkListItem = class (TFPgtkItem)
 979  Protected
 980    procedure CreateGtkObject; override;
 981  Public
 982    function TheGtkObject : PGtkListItem;
 983    function ScrollSignalConnect (Signal:string; Proc:TFPgtkScrollSignalFunction; data:pointer) : guint;
 984    function ScrollSignalConnectAfter (Signal:string; Proc:TFPgtkScrollSignalFunction; data:pointer) : guint;
 985    function ScrollBooleanSignalConnect (Signal:string; Proc:TFPgtkScrollBooleanSignalFunction; data:pointer) : guint;
 986    function ScrollBooleanSignalConnectAfter (Signal:string; Proc:TFPgtkScrollBooleanSignalFunction; data:pointer) : guint;
 987    function ConnectToggleFocusRow (proc:TFPgtkSignalFunction; data:pointer) : guint;
 988    function ConnectAfterToggleFocusRow (proc:TFPgtkSignalFunction; data:pointer) : guint;
 989    function ConnectSelectAll (proc:TFPgtkSignalFunction; data:pointer) : guint;
 990    function ConnectAfterSelectAll (proc:TFPgtkSignalFunction; data:pointer) : guint;
 991    function ConnectUnselectAll (proc:TFPgtkSignalFunction; data:pointer) : guint;
 992    function ConnectAfterUnselectAll (proc:TFPgtkSignalFunction; data:pointer) : guint;
 993    function ConnectUndoSelection (proc:TFPgtkSignalFunction; data:pointer) : guint;
 994    function ConnectAfterUndoSelection (proc:TFPgtkSignalFunction; data:pointer) : guint;
 995    function ConnectStartSelection (proc:TFPgtkSignalFunction; data:pointer) : guint;
 996    function ConnectAfterStartSelection (proc:TFPgtkSignalFunction; data:pointer) : guint;
 997    function ConnectEndSelection (proc:TFPgtkSignalFunction; data:pointer) : guint;
 998    function ConnectAfterEndSelection (proc:TFPgtkSignalFunction; data:pointer) : guint;
 999    function ConnectToggleAddMode (proc:TFPgtkSignalFunction; data:pointer) : guint;
1000    function ConnectAfterToggleAddMode (proc:TFPgtkSignalFunction; data:pointer) : guint;
1001    function ConnectExtendSelection (proc:TFPgtkScrollBooleanSignalFunction; data:pointer) : guint;
1002    function ConnectAfterExtendSelection (proc:TFPgtkScrollBooleanSignalFunction; data:pointer) : guint;
1003    function ConnectScrollVertical (proc:TFPgtkScrollSignalFunction; data:pointer) : guint;
1004    function ConnectAfterScrollVertical (proc:TFPgtkScrollSignalFunction; data:pointer) : guint;
1005    function ConnectScrollHorizontal (proc:TFPgtkScrollSignalFunction; data:pointer) : guint;
1006    function ConnectAfterScrollHorizontal (proc:TFPgtkScrollSignalFunction; data:pointer) : guint;
1007    procedure Select;
1008    procedure Deselect;
1009  end;
1010
1011
1012  TFPgtkListItemGroup = class (TFPgtkItemGroup)
1013  Public
1014    constructor create;
1015  end;
1016
1017
1018  TFPgtkTreeItem = class (TFPgtkItem)
1019  Private
1020    function GetSubTree : TFPgtkWidget;
1021    procedure SetSubTree (TheValue : TFPgtkWidget);
1022    function GetPixPlus : TFPgtkWidget;
1023    function GetPixMinus : TFPgtkWidget;
1024    function GetExpanded : boolean;
1025    procedure SetExpanded (TheValue : boolean);
1026  Protected
1027    procedure CreateGtkObject; override;
1028  Public
1029    function TheGtkObject : PGtkTreeItem;
1030    property SubTree : TFPgtkWidget read GetSubTree write SetSubTree;
1031    property PixPlus : TFPgtkWidget read GetPixPlus;
1032    property PixMinus : TFPgtkWidget read GetPixMinus;
1033    property Expanded : boolean read GetExpanded write SetExpanded;
1034    procedure Select;
1035    procedure Deselect;
1036    procedure Expand;
1037    procedure Collapse;
1038    function ConnectCollapse (proc:TFPgtkSignalFunction; data:pointer) : guint;
1039    function ConnectAfterCollapse (proc:TFPgtkSignalFunction; data:pointer) : guint;
1040    function ConnectExpand (proc:TFPgtkSignalFunction; data:pointer) : guint;
1041    function ConnectAfterExpand (proc:TFPgtkSignalFunction; data:pointer) : guint;
1042  end;
1043
1044  DialogResultCallback = procedure (Sender:TFPgtkWindow; DialogResult:pointer;
1045                                    Action:integer; initiator:TFPgtkObject) of object;
1046  DialogInitCallback = procedure (Sender : TFPgtkWindow; InitData : pointer) of object;
1047  TFPgtkWindowClass = class of TFPgtkWindow;
1048
1049  TFPgtkWindow = class (TFPgtkBin)
1050  Private
1051    FAccelGroups:TList;
1052    FMainLevel : guint;
1053    FModalAction : integer;
1054    FOnDialogInit : DialogInitCallback;
1055    FOnDialogResult : DialogResultCallback;
1056    FDialogResult : pointer;
1057    TheWindowType:TGtkWindowType;
1058    function GetWindowType : TGtkWindowType;
1059    procedure SetWindowType (TheValue : TGtkWindowType);
1060    function GetTitle : string;
1061    procedure SetTitle (TheValue : string);
1062    function GetModal : boolean;
1063    procedure SetModal (TheValue : boolean);
1064    procedure SetModalAction (TheValue : integer);
1065    procedure ExecuteEnds (Sender:TFPgtkObject; data:pointer);
1066    function GetUserSizable : boolean;
1067    procedure SetUserSizable (TheValue : boolean);
1068    function GetPosition : TGtkWindowPosition;
1069    procedure SetPosition (TheValue : TGtkWindowPosition);
1070    function GetAccelGroups(ID:integer) : PGtkAccelGroup;
1071  Protected
1072    procedure CreateGtkObject; override;
1073    property DialogResult : pointer read FDialogResult write FDialogResult;
1074    procedure DoDialogResult (Action:integer; Sender:TFPgtkObject); Virtual;
1075    procedure DoDialogInit (InitData:pointer); Virtual;
1076  Public
1077    function TheGtkObject : PGtkWindow;
1078    constructor Create (AType:TGtkWindowType);
1079    destructor Destroy; Override;
1080    property WindowType : TGtkWindowType read GetWindowType write SetWindowType;
1081    property Title : string read GetTitle write SetTitle;
1082    property Modal : boolean read GetModal write SetModal;
1083    property OnDialogResult : DialogResultCallback read FOnDialogResult write FOnDialogResult;
1084    property OnDialogInit : DialogInitCa

Large files files are truncated, but you can click here to view the full file