2#ifndef SEEN_SP_MODIFIERS_H
3#define SEEN_SP_MODIFIERS_H
98int add_keyval(
int state,
int keyval,
bool release =
false);
205 static std::vector<Modifier const *>
getList();
206 bool active(
int button_state)
const;
207 bool active(
int button_state,
int keyval,
bool release =
false)
const;
219 }
catch (std::out_of_range
const &) {
A convenience class for working with MessageStacks.
A class to represent ways functionality is driven by shift modifiers.
std::string get_config_user_not() const
unsigned long get_weight() const
static CategoryNames const & _category_names()
void set_user(KeyMask and_mask, KeyMask not_mask)
char const * get_name() const
bool active(int button_state) const
Test if this modifier is currently active.
unsigned long _weight_default
KeyMask _and_mask_default
KeyMask get_not_mask() const
unsigned long _weight_keys
void set_keys(KeyMask and_mask, KeyMask not_mask)
bool get_config_user_disabled() const
static Type which(Trigger trigger, int button_state)
Given a Trigger, find which modifier is active (category lookup)
std::string get_config_user_and() const
Modifier(char const *id, char const *name, char const *desc, const KeyMask and_mask, const Trigger category, const Trigger trigger)
Inititalizes the Modifier with the parameters.
static Container & _modifiers()
A table of all the created modifiers and their ID lookups.
unsigned long _weight_user
std::map< Trigger, std::string > CategoryNames
std::string get_category() const
Trigger get_trigger() const
KeyMask get_and_mask() const
char const * get_id() const
char const * get_description() const
std::string get_label() const
static Modifier * get(Type index)
A function to turn an enum index into a modifier object.
std::map< Type, Modifier > Container
An easy to use definition of the table of modifiers by Type and ID.
static std::vector< Modifier const * > getList()
List all the modifiers available.
Interface for locally managing a current status message.
Type
This anonymous enum is used to provide a list of the Shifts.
int add_keyval(int state, int keyval, bool release)
Add or remove the GDK keyval to the button state if it's one of the keys that define the key mask.
unsigned long calculate_weight(KeyMask mask)
Calculate the weight of this mask based on how many bits are set.
void responsive_tooltip(MessageContext *message_context, KeyEvent const &event, int num_args,...)
Set the responsive tooltip for this tool, given the selected types.
std::string generate_label(KeyMask mask, std::string sep)
Generate a label for any modifier keys based on the mask.
Helper class to stream background task notifications as a series of messages.