1{%norun} 2{$mode objfpc} 3uses 4 types,math; 5 6type 7 PGtkWidget = pointer; 8 PGtkNotebook = pointer; 9 10function MyRect(Left,Top,Right,Bottom : Integer) : TRect; inline; 11 12begin 13 MyRect.Left:=Left; 14 MyRect.Top:=Top; 15 MyRect.Right:=Right; 16 MyRect.Bottom:=Bottom; 17end; 18 19function GetWidgetClientRect(TheWidget: PGtkWidget): TRect; 20var 21 Widget, ClientWidget: PGtkWidget; 22 AChild: PGtkWidget; 23 24 procedure GetNoteBookClientRect(NBWidget: PGtkNotebook); 25 var 26 PageIndex: LongInt; 27 PageWidget: PGtkWidget; 28 FrameBorders: TRect; 29 aWidth: LongInt; 30 aHeight: LongInt; 31 begin 32 Result:=MyRect(0,0, 33 Max(0,AWidth-FrameBorders.Left-FrameBorders.Right), 34 Max(0,aHeight-FrameBorders.Top-FrameBorders.Bottom)); 35 end; 36 37begin 38end; 39 40 41begin 42end. 43