LibreOffice Module sfx2 (master) 1
Public Member Functions | Private Member Functions | Private Attributes | List of all members
SfxHintPoster Class Referencefinal

[Description] More...

#include <hintpost.hxx>

Inheritance diagram for SfxHintPoster:
Collaboration diagram for SfxHintPoster:

Public Member Functions

 SfxHintPoster (std::function< void(std::unique_ptr< SfxRequest >)> aLink)
void Post (std::unique_ptr< SfxRequest > pHint)
void SetEventHdl (const std::function< void(std::unique_ptr< SfxRequest >)> &rLink)
- Public Member Functions inherited from SvRefBase
 SvRefBase ()
 SvRefBase (const SvRefBase &)
SvRefBaseoperator= (const SvRefBase &)
void RestoreNoDelete ()
void AddNextRef ()
void AddFirstRef ()
void ReleaseRef ()
unsigned int GetRefCount () const

Private Member Functions

 DECL_LINK (DoEvent_Impl, void *, void)
virtual ~SfxHintPoster () override

Private Attributes

std::function< void(std::unique_ptr< SfxRequest >)> m_Link

Additional Inherited Members

- Protected Member Functions inherited from SvRefBase

Detailed Description


This class allows sending unique events via VCL's Application::PostUserEvent(). When the User-Event is dispatched, the handler <Event()> is called, which calls the Link provided with SetEventHdl().

The instances are held via Ref-Count until a possibly sent event has arrived. If the target dies before delivery, the connection must be severed with SetEventHdl(Link()).

Definition at line 41 of file hintpost.hxx.

Constructor & Destructor Documentation

◆ ~SfxHintPoster()

SfxHintPoster::~SfxHintPoster ( )

Definition at line 31 of file hintpost.cxx.

◆ SfxHintPoster()

SfxHintPoster::SfxHintPoster ( std::function< void(std::unique_ptr< SfxRequest >)>  aLink)

Definition at line 26 of file hintpost.cxx.

Member Function Documentation


SfxHintPoster::DECL_LINK ( DoEvent_Impl  ,
void *  ,

◆ Post()

void SfxHintPoster::Post ( std::unique_ptr< SfxRequest pHint)

Definition at line 33 of file hintpost.cxx.

References SvRefBase::AddFirstRef(), LINK, and Application::PostUserEvent().

◆ SetEventHdl()

void SfxHintPoster::SetEventHdl ( const std::function< void(std::unique_ptr< SfxRequest >)> &  rLink)

Definition at line 49 of file hintpost.cxx.

References m_Link.

Member Data Documentation

◆ m_Link

std::function<void (std::unique_ptr<SfxRequest>)> SfxHintPoster::m_Link

Definition at line 44 of file hintpost.hxx.

Referenced by SetEventHdl().

The documentation for this class was generated from the following files: