A class where application code can register functions to be called when an event occurs.
More...
|
bool | onLeftdown () |
|
void | onRightDown () |
|
void | onMouseUp () |
|
void | onDoubleClick () |
|
void | onDraw (PAINTSTRUCT &ps) |
|
void | onResize (int w, int h) |
|
void | onScrollH (int code) |
|
void | onScrollV (int code) |
|
void | onMenuCommand (int id) |
|
void | onKeydown (int keycode) |
|
void | onMouseMove (WPARAM wParam, LPARAM lParam) |
|
void | onMouseEnter () |
|
void | onMouseWheel (int dist) |
|
void | onMouseLeave () |
|
void | onTimer (int id) |
|
bool | onSelect (unsigned short id) |
|
bool | onChange (unsigned short id) |
|
void | onSlid (unsigned short id) |
|
void | onDropStart (HDROP hDrop) |
|
void | onDrop (const std::vector< std::string > &files) |
|
void | onAsyncReadComplete (int id) |
|
void | onTcpServerAccept () |
|
void | onTcpServerReadComplete () |
|
bool | onQuitApp () |
|
void | onDatePicked (int idFrom, LPNMDATETIMECHANGE date) |
|
void | click (std::function< void(void)> f, bool propogate=false) |
| register click event handler More...
|
|
void | clickWex (std::function< void(void)> f) |
| register a function to do some housekeeping when clicked, before calling handler registered by application code More...
|
|
void | clickPropogate (bool f=true) |
| specify that click event should propogate to parent window after currently registered click event handler runs
|
|
void | clickRight (std::function< void(void)> f) |
|
void | clickDouble (std::function< void(void)> f) |
|
void | draw (std::function< void(PAINTSTRUCT &ps)> f) |
|
void | resize (std::function< void(int w, int h)> f) |
|
void | scrollH (std::function< void(int code)> f) |
|
void | scrollV (std::function< void(int code)> f) |
|
int | menuCommand (std::function< void(const std::string &title)> f, const std::string &title) |
| Register function to run when menu item clicked. More...
|
|
void | select (int id, std::function< void(void)> f) |
|
void | change (int id, std::function< void(void)> f) |
| register function to call when control changes More...
|
|
void | keydown (std::function< void(int keydown)> f) |
| register function to call when key pressed. Function is passed key code.
|
|
void | mouseEnter (std::function< void(void)> f) |
|
void | mouseMove (std::function< void(sMouse &m)> f) |
|
void | mouseWheel (std::function< void(int dist)> f) |
|
void | mouseUp (std::function< void(void)> f) |
|
void | mouseLeave (std::function< void(void)> f) |
|
void | timer (std::function< void(int id)> f) |
|
void | slid (std::function< void(int pos)> f) |
|
void | dropStart (std::function< void(HDROP hDrop)> f) |
| register function to call when user drops files. App code should NOT call this!
|
|
void | drop (std::function< void(const std::vector< std::string > &files)> f) |
| register function to call when files dropped by user have been extracted. App code use this!
|
|
void | asyncReadComplete (std::function< void(int id)> f) |
| register function to call when an asynchronous read completes. More...
|
|
void | tcpServerAccept (std::function< void(void)> f) |
|
void | tcpRead (std::function< void(void)> f) |
| register function to call when tcp read accurs
|
|
void | quitApp (std::function< bool(void)> f) |
| register function to call when application is about to quit The function should return true to allow the quit to proceed.
|
|
void | datePick (std::function< void(int, LPNMDATETIMECHANGE)> f) |
| Register function to call when a date is picked. More...
|
|
A class where application code can register functions to be called when an event occurs.
void wex::eventhandler::datePick |
( |
std::function< void(int, LPNMDATETIMECHANGE)> |
f | ) |
|
|
inline |
Register function to call when a date is picked.
- Parameters
-
The notification is sent to the date picker widget's parent
The function is passed the id of the date picker widget and a pointer to the date change structure which can be used like this
fm.events().datePick(
[](int id,LPNMDATETIMECHANGE date)
{
std::cout << "id " << id << " date changed to "
<< date->st.wYear << "/"
<< date->st.wMonth << "/"
<< date->st.wDay << " "
<< date->dwFlags << "\n";
});
Selecting a new date may call this funtion TWICE So if processing the new date is expensive check if the data has actually changed