|
From: Andreas H. <ah...@us...> - 2004-12-26 15:45:50
|
Update of /cvsroot/jvcl/dev/JVCL3/run In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19354/run Modified Files: JvTabBar.pas Log Message: Bug fix (MouseUp called inherited MouseDown) Added Jedi.WinForms.VCL support Index: JvTabBar.pas =================================================================== RCS file: /cvsroot/jvcl/dev/JVCL3/run/JvTabBar.pas,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** JvTabBar.pas 24 Dec 2004 02:51:18 -0000 1.4 --- JvTabBar.pas 26 Dec 2004 15:45:41 -0000 1.5 *************** *** 27,34 **** --- 27,43 ---- {$I jvcl.inc} + {.$DEFINE WINFORMS} interface uses + {$IFDEF WINFORMS} + System.Windows.Forms, System.Drawing, + Borland.Vcl.Windows, Borland.Vcl.Messages, Borland.VCL.SysUtils, + Borland.Vcl.Classes, Borland.Vcl.Types, + Jedi.WinForms.VCL.Graphics, Jedi.WinForms.VCL.Controls, + Jedi.WinForms.VCL.Forms, Jedi.WinForms.VCL.ImgList, Jedi.WinForms.VCL.Menus, + Jedi.WinForms.VCL.Buttons; + {$ELSE} {$IFDEF VCL} Windows, Messages, Graphics, Controls, Forms, ImgList, Menus, Buttons, *************** *** 41,44 **** --- 50,54 ---- {$ENDIF VisualCLX} SysUtils, Classes; + {$ENDIF WINFORMS} type *************** *** 390,395 **** --- 400,407 ---- {$IFDEF VCL} + {$IFNDEF WINFORMS} property OnStartDock; property OnEndDock; + {$ENDIF ~WINFORMS} {$ENDIF VCL} end; *************** *** 397,406 **** implementation - {$IFDEF VCL} type TCanvasX = TCanvas; {$ENDIF VCL} {$IFDEF VisualCLX} - type TCanvasX = class(TCanvas) // LineTo under CLX draws the last point, Windows doesn't. This wrapper --- 409,417 ---- implementation type + {$IFDEF VCL} TCanvasX = TCanvas; {$ENDIF VCL} {$IFDEF VisualCLX} TCanvasX = class(TCanvas) // LineTo under CLX draws the last point, Windows doesn't. This wrapper *************** *** 806,810 **** SetClosingTab(nil); end; ! inherited MouseDown(Button, Shift, X, Y); end; --- 817,821 ---- SetClosingTab(nil); end; ! inherited MouseUp(Button, Shift, X, Y); end; *************** *** 875,879 **** Offset := 0; ! X := 0; // adjust for scrolled area Index := 0; for I := 0 to Tabs.Count - 1 do --- 886,890 ---- Offset := 0; ! X := Margin; // adjust for scrolled area Index := 0; for I := 0 to Tabs.Count - 1 do *************** *** 1050,1054 **** begin CalcTabsRects; ! if FRequiredWidth < ClientWidth then begin FreeAndNil(FBtnLeftScroll); --- 1061,1065 ---- begin CalcTabsRects; ! if (FRequiredWidth < ClientWidth) or ((FLeftIndex = 0) and (FLastTabRight <= ClientWidth)) then begin FreeAndNil(FBtnLeftScroll); *************** *** 1219,1232 **** case TabBar.Align of alBottom: ! begin ! Result := Rect(TabBar.Margin + FLeft, 0, ! TabBar.Margin + FLeft + TabBar.GetTabWidth(Self), ! 0 + TabBar.GetTabHeight(Self)); ! end; else // Top ! Result := Rect(TabBar.Margin + FLeft, TabBar.ClientHeight - TabBar.GetTabHeight(Self), ! TabBar.Margin + FLeft + TabBar.GetTabWidth(Self), ! TabBar.ClientHeight); end; end; --- 1230,1239 ---- case TabBar.Align of alBottom: ! Result := Rect(FLeft, 0, ! FLeft + TabBar.GetTabWidth(Self), 0 + TabBar.GetTabHeight(Self)); else // Top ! Result := Rect(FLeft, TabBar.ClientHeight - TabBar.GetTabHeight(Self), ! FLeft + TabBar.GetTabWidth(Self), TabBar.ClientHeight); end; end; |