2013-06-17 13:42:53 +04:00
|
|
|
// TODO(grosbouddha): put under pskl namespace.
|
2013-09-28 23:10:12 +04:00
|
|
|
var Events = {
|
2013-09-29 02:01:18 +04:00
|
|
|
|
2015-04-14 19:02:33 +03:00
|
|
|
TOOL_SELECTED : 'TOOL_SELECTED',
|
|
|
|
SELECT_TOOL : 'SELECT_TOOL',
|
2014-08-21 02:50:59 +04:00
|
|
|
|
2015-04-14 19:02:33 +03:00
|
|
|
TOOL_RELEASED : 'TOOL_RELEASED',
|
|
|
|
TOOL_PRESSED : 'TOOL_PRESSED',
|
|
|
|
SELECT_PRIMARY_COLOR: 'SELECT_PRIMARY_COLOR',
|
|
|
|
SELECT_SECONDARY_COLOR: 'SELECT_SECONDARY_COLOR',
|
2014-03-30 04:10:00 +04:00
|
|
|
PRIMARY_COLOR_SELECTED : 'PRIMARY_COLOR_SELECTED',
|
|
|
|
SECONDARY_COLOR_SELECTED : 'SECONDARY_COLOR_SELECTED',
|
2012-09-03 03:24:55 +04:00
|
|
|
|
2014-04-12 01:32:28 +04:00
|
|
|
CURSOR_MOVED : 'CURSOR_MOVED',
|
|
|
|
DRAG_START : 'DRAG_START',
|
|
|
|
DRAG_END : 'DRAG_END',
|
|
|
|
|
2014-03-26 10:41:45 +04:00
|
|
|
DIALOG_DISPLAY : 'DIALOG_DISPLAY',
|
2014-03-30 04:10:00 +04:00
|
|
|
DIALOG_HIDE : 'DIALOG_HIDE',
|
|
|
|
|
|
|
|
PALETTE_LIST_UPDATED : 'PALETTE_LIST_UPDATED',
|
2014-03-26 10:41:45 +04:00
|
|
|
|
2013-08-10 14:11:16 +04:00
|
|
|
/**
|
|
|
|
* Fired each time a user setting change.
|
|
|
|
* The payload will be:
|
|
|
|
* 1st argument: Name of the settings
|
|
|
|
* 2nd argument: New value
|
|
|
|
*/
|
2015-04-14 19:02:33 +03:00
|
|
|
USER_SETTINGS_CHANGED: 'USER_SETTINGS_CHANGED',
|
2015-10-11 01:52:24 +03:00
|
|
|
SHORTCUTS_CHANGED: 'SHORTCUTS_CHANGED',
|
2013-09-29 02:01:18 +04:00
|
|
|
|
2015-04-14 19:02:33 +03:00
|
|
|
CLOSE_SETTINGS_DRAWER : 'CLOSE_SETTINGS_DRAWER',
|
2013-10-23 03:01:35 +04:00
|
|
|
|
2013-08-10 14:11:16 +04:00
|
|
|
/**
|
|
|
|
* The framesheet was reseted and is now probably drastically different.
|
|
|
|
* Number of frames, content of frames, color used for the palette may have changed.
|
|
|
|
*/
|
2015-04-14 19:02:33 +03:00
|
|
|
PISKEL_RESET: 'PISKEL_RESET',
|
|
|
|
PISKEL_SAVE_STATE: 'PISKEL_SAVE_STATE',
|
2015-10-01 02:07:29 +03:00
|
|
|
PISKEL_DESCRIPTOR_UPDATED : 'PISKEL_DESCRIPTOR_UPDATED',
|
|
|
|
PISKEL_SAVED_STATUS_UPDATE : 'PISKEL_SAVED_STATUS_UPDATE',
|
2012-09-12 14:01:47 +04:00
|
|
|
|
2015-04-14 19:02:33 +03:00
|
|
|
HISTORY_STATE_SAVED: 'HISTORY_STATE_SAVED',
|
|
|
|
HISTORY_STATE_LOADED: 'HISTORY_STATE_LOADED',
|
2015-02-28 01:54:18 +03:00
|
|
|
|
2015-11-17 02:19:25 +03:00
|
|
|
PEN_SIZE_CHANGED : 'PEN_SIZE_CHANGED',
|
|
|
|
|
2015-09-20 12:19:17 +03:00
|
|
|
/**
|
|
|
|
* Fired when a Piskel is successfully saved
|
|
|
|
*/
|
2015-04-14 19:02:33 +03:00
|
|
|
PISKEL_SAVED: 'PISKEL_SAVED',
|
2015-09-20 12:19:17 +03:00
|
|
|
/**
|
|
|
|
* Fired when a save action starts
|
|
|
|
*/
|
2015-09-19 23:54:37 +03:00
|
|
|
BEFORE_SAVING_PISKEL: 'BEFORE_SAVING_PISKEL',
|
2015-09-20 12:19:17 +03:00
|
|
|
/**
|
|
|
|
* Fired when a save action ends. Always fires, even if saving was not successful
|
|
|
|
*/
|
2015-09-19 23:54:37 +03:00
|
|
|
AFTER_SAVING_PISKEL: 'AFTER_SAVING_PISKEL',
|
2014-02-12 02:42:38 +04:00
|
|
|
|
2015-04-14 19:02:33 +03:00
|
|
|
FRAME_SIZE_CHANGED : 'FRAME_SIZE_CHANGED',
|
2012-09-16 20:48:32 +04:00
|
|
|
|
2015-04-14 19:02:33 +03:00
|
|
|
SELECTION_CREATED: 'SELECTION_CREATED',
|
|
|
|
SELECTION_MOVE_REQUEST: 'SELECTION_MOVE_REQUEST',
|
|
|
|
SELECTION_DISMISSED: 'SELECTION_DISMISSED',
|
2016-07-30 13:04:34 +03:00
|
|
|
SELECTION_COPY: 'SELECTION_COPY',
|
|
|
|
SELECTION_CUT: 'SELECTION_CUT',
|
|
|
|
SELECTION_PASTE: 'SELECTION_PASTE',
|
2013-09-29 02:01:18 +04:00
|
|
|
|
2015-04-14 19:02:33 +03:00
|
|
|
SHOW_NOTIFICATION: 'SHOW_NOTIFICATION',
|
|
|
|
HIDE_NOTIFICATION: 'HIDE_NOTIFICATION',
|
2012-09-12 14:01:47 +04:00
|
|
|
|
2015-04-14 19:02:33 +03:00
|
|
|
SHOW_PROGRESS: 'SHOW_PROGRESS',
|
|
|
|
UPDATE_PROGRESS: 'UPDATE_PROGRESS',
|
|
|
|
HIDE_PROGRESS: 'HIDE_PROGRESS',
|
2014-09-23 01:51:28 +04:00
|
|
|
|
2015-04-14 19:02:33 +03:00
|
|
|
ZOOM_CHANGED : 'ZOOM_CHANGED',
|
2016-05-29 11:45:19 +03:00
|
|
|
EXPORT_SCALE_CHANGED : 'EXPORT_SCALE_CHANGED',
|
2014-05-07 02:43:28 +04:00
|
|
|
|
2015-04-14 19:02:33 +03:00
|
|
|
CURRENT_COLORS_UPDATED : 'CURRENT_COLORS_UPDATED',
|
2014-08-21 02:50:59 +04:00
|
|
|
|
|
|
|
// Tests
|
2015-08-25 00:56:09 +03:00
|
|
|
MOUSE_EVENT : 'MOUSE_EVENT',
|
|
|
|
KEYBOARD_EVENT : 'KEYBOARD_EVENT',
|
2015-10-02 02:27:59 +03:00
|
|
|
TRANSFORMATION_EVENT : 'TRANSFORMATION_EVENT',
|
2015-04-14 19:02:33 +03:00
|
|
|
TEST_RECORD_END : 'TEST_RECORD_END',
|
|
|
|
TEST_CASE_END : 'TEST_CASE_END',
|
|
|
|
TEST_SUITE_END : 'TEST_SUITE_END'
|
|
|
|
};
|