mirror of
https://github.com/aseprite/aseprite.git
synced 2024-10-05 22:39:47 +00:00
5b252c30f5
- Fixed issue #46: open .png files with Unicode chars - Fixed issue #150: ability to uncompress program in folders w/Unicode chars - Added base::utf8_iterator - Added base::FileHandle - Added base::get_app_path() - Modified ui::KeyMessage::ascii() -> unicodeChar() - Removed JI_NOTEXT flag - Added app::XmlDocumentRef class and app::open_xml() function - Added support for Unicode text exchange with Win32 clipboard
47 lines
986 B
C++
47 lines
986 B
C++
// Aseprite UI Library
|
|
// Copyright (C) 2001-2013 David Capello
|
|
//
|
|
// This source file is distributed under MIT license,
|
|
// please read LICENSE.txt for more information.
|
|
|
|
#ifndef UI_ACCELERATOR_H_INCLUDED
|
|
#define UI_ACCELERATOR_H_INCLUDED
|
|
|
|
#include <string>
|
|
#include <vector>
|
|
|
|
#include "ui/keys.h"
|
|
|
|
namespace ui {
|
|
|
|
class Accelerator
|
|
{
|
|
public:
|
|
void addKey(KeyModifiers modifiers, KeyScancode scancode, int unicodeChar);
|
|
|
|
// Adds keys from strings like "<Ctrl+Q> <ESC>"
|
|
void addKeysFromString(const char* string);
|
|
|
|
bool isEmpty() const { return m_combos.empty(); }
|
|
std::string toString();
|
|
|
|
bool check(KeyModifiers modifiers, KeyScancode scancode, int unicodeChar);
|
|
bool checkFromAllegroKeyArray();
|
|
|
|
private:
|
|
struct KeyCombo {
|
|
KeyModifiers modifiers;
|
|
KeyScancode scancode;
|
|
int unicodeChar;
|
|
|
|
std::string toString();
|
|
};
|
|
|
|
typedef std::vector<KeyCombo> KeyCombos;
|
|
KeyCombos m_combos;
|
|
};
|
|
|
|
} // namespace ui
|
|
|
|
#endif
|