- Added UfrmToolWindow

- Changed the tool windows to inherit from TfrmToolWindow
- Added a "close timer" to TfrmToolWindow to handle different focus behaviours of window managers
- Moved position changes for the tool windows to the appropriate TfrmToolWindow.FormShow event
This commit is contained in:
2009-09-02 03:21:39 +02:00
parent d769c7ddc3
commit b9ef61c0db
21 changed files with 1687 additions and 1700 deletions
+5 -30
View File
@@ -21,7 +21,7 @@
* CDDL HEADER END
*
*
* Portions Copyright 2008 Andreas Schneider
* Portions Copyright 2009 Andreas Schneider
*)
unit UfrmElevateSettings;
@@ -30,29 +30,21 @@ unit UfrmElevateSettings;
interface
uses
Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, LMessages,
LCLIntf, StdCtrls, Spin, ExtCtrls;
Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, StdCtrls,
Spin, ExtCtrls, UfrmToolWindow;
type
{ TfrmElevateSettings }
TfrmElevateSettings = class(TForm)
TfrmElevateSettings = class(TfrmToolWindow)
cbRandomHeight: TCheckBox;
Panel1: TPanel;
Panel2: TPanel;
Panel3: TPanel;
Panel4: TPanel;
rbRaise: TRadioButton;
rbLower: TRadioButton;
rbRaise: TRadioButton;
rbSet: TRadioButton;
seRandomHeight: TSpinEdit;
seZ: TSpinEdit;
procedure FormClose(Sender: TObject; var CloseAction: TCloseAction);
procedure FormDeactivate(Sender: TObject);
procedure seRandomHeightChange(Sender: TObject);
protected
procedure MouseLeave(var msg: TLMessage); message CM_MouseLeave;
public
{ public declarations }
end;
@@ -64,28 +56,11 @@ implementation
{ TfrmElevateSettings }
procedure TfrmElevateSettings.FormClose(Sender: TObject;
var CloseAction: TCloseAction);
begin
CloseAction := caHide;
end;
procedure TfrmElevateSettings.FormDeactivate(Sender: TObject);
begin
Close;
end;
procedure TfrmElevateSettings.seRandomHeightChange(Sender: TObject);
begin
cbRandomHeight.Checked := True;
end;
procedure TfrmElevateSettings.MouseLeave(var msg: TLMessage);
begin
if not PtInRect(ClientRect, ScreenToClient(Mouse.CursorPos)) then
Close;
end;
initialization
{$I UfrmElevateSettings.lrs}