|
LibreOffice Module vcl (master) 1
|
An idle is a timer to be scheduled immediately. More...
#include <idle.hxx>
Public Member Functions | |
| Idle (const char *pDebugName) | |
| virtual void | Start (bool bStartTimer=true) override |
| Schedules the task for execution. More... | |
Public Member Functions inherited from Timer | |
| Timer (const char *pDebugName) | |
| Timer (const Timer &rTimer) | |
| virtual | ~Timer () override |
| Timer & | operator= (const Timer &rTimer) |
| virtual void | Invoke () override |
| Calls the maInvokeHandler with the parameter this. More... | |
| void | Invoke (Timer *arg) |
| Calls the maInvokeHandler with the parameter. More... | |
| void | SetInvokeHandler (const Link< Timer *, void > &rLink) |
| void | ClearInvokeHandler () |
| void | SetTimeout (sal_uInt64 nTimeoutMs) |
| sal_uInt64 | GetTimeout () const |
| virtual void | Start (bool bStartTimer=true) override |
| Schedules the task for execution. More... | |
Public Member Functions inherited from Task | |
| Task (const char *pDebugName) | |
| Task (const Task &rTask) | |
| virtual | ~Task () COVERITY_NOEXCEPT_FALSE |
| Task & | operator= (const Task &rTask) |
| void | SetPriority (TaskPriority ePriority) |
| TaskPriority | GetPriority () const |
| const char * | GetDebugName () const |
| virtual void | Invoke ()=0 |
| virtual void | Start (bool bStartTimer=true) |
| Schedules the task for execution. More... | |
| void | Stop () |
| bool | IsActive () const |
| void | SetStatic () |
| This function must be called for static tasks, so the Task destructor ignores the scheduler mutex, as it may not be available anymore. More... | |
| bool | IsStatic () const |
Protected Member Functions | |
| virtual sal_uInt64 | UpdateMinPeriod (sal_uInt64 nTimeNow) const override |
| How long (in MS) until the Task is ready to be dispatched? More... | |
| Idle (bool bAuto, const char *pDebugName) | |
Protected Member Functions inherited from Timer | |
| virtual void | SetDeletionFlags () override |
| virtual sal_uInt64 | UpdateMinPeriod (sal_uInt64 nTimeNow) const override |
| How long (in MS) until the Task is ready to be dispatched? More... | |
| Timer (bool bAuto, const char *pDebugName) | |
Protected Member Functions inherited from Task | |
| const ImplSchedulerData * | GetSchedulerData () const |
| virtual void | SetDeletionFlags () |
| virtual sal_uInt64 | UpdateMinPeriod (sal_uInt64 nTimeNow) const =0 |
| How long (in MS) until the Task is ready to be dispatched? More... | |
Private Member Functions | |
| void | SetTimeout (sal_uInt64 nTimeoutMs)=delete |
| sal_uInt64 | GetTimeout () const =delete |
Additional Inherited Members | |
Static Protected Member Functions inherited from Task | |
| static void | StartTimer (sal_uInt64 nMS) |
An idle is a timer to be scheduled immediately.
It's - more or less - just a convenience class.
Note: Despite the name, the timer is not necessarily invoked when idle. Use an idle priority such as TaskPriority::DEFAULT_IDLE to actually invoke the timer only when idle.
|
protected |
Definition at line 23 of file idle.cxx.
References DEFAULT_IDLE, and Task::SetPriority().
|
privatedelete |
|
privatedelete |
|
overridevirtual |
Schedules the task for execution.
If the timer is already active, it's reset! Check with Task::IsActive() to prevent reset.
If you unset bStartTimer, the Task must call Task::StartTimer(...) to be correctly scheduled! Otherwise it might just be picked up when the Scheduler runs the next time.
| bStartTimer | if false, don't schedule the Task by calling Task::StartTimer(0). |
Reimplemented from Timer.
Definition at line 34 of file idle.cxx.
References DEFAULT_IDLE, Scheduler::GetDeterministicMode(), Task::GetPriority(), Scheduler::ImmediateTimeoutMs, Scheduler::InfiniteTimeoutMs, LOWEST, Task::Start(), and Task::StartTimer().
Referenced by SalInstanceAssistant::append_page(), SvxIconChoiceCtrl_Impl::CallSelectHandler(), SvxIconChoiceCtrl_Impl::DocRectChanged(), IdleFormatter::DoIdleFormat(), SvInplaceEdit2::LoseFocus(), SvImpLBox::MouseButtonUp(), DockingWindow::queue_resize(), vcl::RoadmapWizard::queue_resize(), SalInstanceAssistant::set_page_index(), SalInstanceAssistant::set_page_sensitive(), SalInstanceAssistant::set_page_title(), SvxIconChoiceCtrl_Impl::SetEntryPos(), SvxIconChoiceCtrl_Impl::SetEntryPredecessor(), SvxIconChoiceCtrl_Impl::SetPositionMode(), InterimItemWindow::StartIdleLayout(), vcl::PrintDialog::updateNup(), and SvxIconChoiceCtrl_Impl::VisRectChanged().
|
overrideprotectedvirtual |
How long (in MS) until the Task is ready to be dispatched?
Simply return Scheduler::ImmediateTimeoutMs if you're ready, like an Idle. If you have to return Scheduler::InfiniteTimeoutMs, you probably need another mechanism to wake up the Scheduler or rely on other Tasks to be scheduled, or simply use a polling Timer.
| nTimeNow | the current time |
Reimplemented from Timer.
Definition at line 56 of file idle.cxx.
References Scheduler::ImmediateTimeoutMs.