wex v24.04.0
Public Types | Public Member Functions | List of all members
wex::function_repeat Class Reference

Offers a class that allows repeating a function on an event handler (window). More...

#include <wex/core/function-repeat.h>

Public Types

typedef std::function< void(wxTimerEvent &) repeat_t)
 Callback for event action.
 

Public Member Functions

 function_repeat (const std::string &name, wxEvtHandler *evt, repeat_t t)
 Constructor.
 
 ~function_repeat ()
 Destructor.
 
bool activate (bool start=true)
 Starts or stops repeating.
 
const std::string & name () const
 Returns name.
 

Detailed Description

Offers a class that allows repeating a function on an event handler (window).

Constructor & Destructor Documentation

◆ function_repeat()

wex::function_repeat::function_repeat ( const std::string & name,
wxEvtHandler * evt,
repeat_t t )

Constructor.

Parameters
namename for the repeater
evtwhere event will be handled
tthe function to be repeated

Member Function Documentation

◆ activate()

bool wex::function_repeat::activate ( bool start = true)

Starts or stops repeating.

Returns true if action is successful.