Latest available version: IDA and decompilers v8.4.240320sp1 see all releases
Hex-Rays logo State-of-the-art binary code analysis tools
email icon
action_handler_t Struct Referenceabstract

Manages the behavior of a registered action. More...

#include <kernwin.hpp>

Public Member Functions

 action_handler_t (int _f=0)
 Constructor.
 
virtual int idaapi activate (action_activation_ctx_t *ctx)=0
 Activate an action. More...
 
virtual action_state_t idaapi update (action_update_ctx_t *ctx)=0
 Update an action. More...
 
virtual ~action_handler_t ()
 Destructor.
 

Public Attributes

int flags
 internal - for version management
 

Detailed Description

Manages the behavior of a registered action.

Member Function Documentation

◆ activate()

virtual int idaapi action_handler_t::activate ( action_activation_ctx_t ctx)
pure virtual

Activate an action.

This function implements the core behavior of an action. It is called when the action is triggered, from a menu, from a popup menu, from the toolbar, or programmatically.

Returns
non-zero: all IDA windows will be refreshed

◆ update()

virtual action_state_t idaapi action_handler_t::update ( action_update_ctx_t ctx)
pure virtual

Update an action.

This is called when the context of the UI changed, and we need to let the action update some of its properties if needed (label, icon, ...)

In addition, this lets IDA know whether the action is enabled, and when it should be queried for availability again.

Note: This callback is not meant to change anything in the application's state, except by calling one (or many) of the "update_action_*()" functions on this very action.


The documentation for this struct was generated from the following file: