activated Idle actions

git-svn-id: trunk@5190 -
This commit is contained in:
mattias 2004-02-10 02:00:13 +00:00
parent f52b2cbb54
commit 3e893c428f
3 changed files with 22 additions and 14 deletions

View File

@ -799,7 +799,7 @@ type
procedure SetTitle(const AValue: String); override;
procedure StartHintTimer(Interval: integer; TimerType: TAppHintTimerType);
procedure UpdateVisible;
procedure DoActionIdle;
procedure DoIdleActions;
public
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;

View File

@ -301,6 +301,7 @@ begin
NotifyIdleHandler;
if Done then begin
// wait till something happens
DoIdleActions;
Include(FFlags,AppWaiting);
Exclude(FFlags,AppIdleEndSent);
InterfaceObject.WaitMessage;
@ -635,7 +636,7 @@ begin
end;
procedure TApplication.DoActionIdle;
procedure TApplication.DoIdleActions;
var
i: Integer;
CurForm: TCustomForm;
@ -1160,6 +1161,9 @@ end;
{ =============================================================================
$Log$
Revision 1.71 2004/02/10 02:00:13 mattias
activated Idle actions
Revision 1.70 2004/02/02 17:39:10 mattias
added TActionList - actions need testing

View File

@ -908,19 +908,20 @@ end;
procedure TCustomForm.UpdateActions;
procedure TraverseClients(Container: TWinControl);
procedure RecursiveInitiate(Container: TWinControl);
var
I: Integer;
Control: TControl;
i: Integer;
CurControl: TControl;
begin
if Container.Showing then
for I := 0 to Container.ControlCount - 1 do begin
Control := Container.Controls[I];
if (csActionClient in Control.ControlStyle) and Control.Visible then
Control.InitiateAction;
if Control is TWinControl then
TraverseClients(TWinControl(Control));
end;
if not Container.Showing then exit;
for i := 0 to Container.ControlCount - 1 do begin
CurControl := Container.Controls[i];
if (csActionClient in CurControl.ControlStyle)
and CurControl.Visible then
CurControl.InitiateAction;
if CurControl is TWinControl then
RecursiveInitiate(TWinControl(CurControl));
end;
end;
var
@ -935,7 +936,7 @@ begin
with Menu.Items[I] do
if Visible then InitiateAction;
// update all controls
TraverseClients(Self);
RecursiveInitiate(Self);
end;
{------------------------------------------------------------------------------}
@ -1581,6 +1582,9 @@ end;
{ =============================================================================
$Log$
Revision 1.126 2004/02/10 02:00:13 mattias
activated Idle actions
Revision 1.125 2004/02/02 17:39:10 mattias
added TActionList - actions need testing