All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
DM_ModifierKeys Class Reference

Definition of a modifier key context. More...

#include <DM_ModifierKeys.h>

Public Member Functions

int findMatch (const UI_Event *event) const
bool match (const UI_Event *event, int modifier_id) const
void append (int modifier_id)
void append (int modifier_id, short modifier_key_flags)
void append (const DM_ModifierKeys &src_context)
void update ()
 Call after appending any modifier(s). More...
void clear ()
exint entries () const
bool resolveDescription (int modifier_id, UT_WorkBuffer &buffer) const

Static Public Member Functions

static int registerModifier (const char *modifier_token)

Detailed Description

Definition of a modifier key context.

A modifier key context consists of a list of modifier key states, each mapping to an integer identifier. A UI_Event can then be mapped to the appropriate identifier by its myAltFlags member.

Definition at line 26 of file DM_ModifierKeys.h.

Member Function Documentation

void DM_ModifierKeys::append ( int  modifier_id)

Append a modifier. The order these modifiers are appended is what determines their relative priorities. When modifier_key_flags is supplied, that value overrides any loaded from the configuration files.

TODO: Specify whether the modifier can be combined with other modifiers or must stand alone.

void DM_ModifierKeys::append ( int  modifier_id,
short  modifier_key_flags 
void DM_ModifierKeys::append ( const DM_ModifierKeys src_context)
void DM_ModifierKeys::clear ( )

Definition at line 51 of file DM_ModifierKeys.h.

exint DM_ModifierKeys::entries ( ) const

Definition at line 53 of file DM_ModifierKeys.h.

int DM_ModifierKeys::findMatch ( const UI_Event event) const

Returns the identifier for the modifier matching the event, if any. In the event of no matching modifier, a value of -1 is returned.

bool DM_ModifierKeys::match ( const UI_Event event,
int  modifier_id 
) const

Returns whether the event matches the specified modifier identifier. An event with multiple modifier keys set can match multiple modifier identifiers when the matched modifiers are proper subsets.

static int DM_ModifierKeys::registerModifier ( const char *  modifier_token)

Register a new modifier token and return the corresponding identifier to use in instances of this class.

bool DM_ModifierKeys::resolveDescription ( int  modifier_id,
UT_WorkBuffer buffer 
) const

Query the description string for the specified modifier. Returns false if the modifier is not found or is in conflict with a higher priority modifier.

void DM_ModifierKeys::update ( )

Call after appending any modifier(s).

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