wxpowereventthe power events are generated when the system power state changes, e.g. the system is suspended, hibernated, plugged into or unplugged from the wall socket and so on. notice that currently only suspend and resume events are generated and only under ms windows platform. to avoid the need to change the code using this event later when these events are implemented on the other platforms please use the test ifdef wxhas_power_events instead of directly testing for the platform in your code: this symbol will be defined for all platforms supporting the power events. event table macros to process power events, use these macros to handle them in member functions that take a wxpowerevent argument.
include files <wx/power.h> see also wxgetpowertype, wxgetbatterystate members
wxpowerevent::vetovoid veto() call this to prevent suspend from taking place in wxevt_power_suspending handler (it is ignored for all the others).
|