;*************************************************************
;* actions.inc
;*
;* This file contains Actions data.
;*
;* You must include it somewhere in data section of the program.
;*
;* You can use this work for any purpose, only don't forget to
;* write somewhere in docs: "Based on work of John Found" or
;* something similar. :)
;*
;* '2003 John Found
;*************************************************************


ImageChecked    = 11   ; index of the Image used for checked menu items, when there is no icon.


CoolData:

ActionList MainActionList, Accelerators,                                                                         \
  actNew,         0, '&New...',         <Ctrl, 'N'>,         'Opens new file dialog.',     OnNew,               \
  actNewApplication, -1, 'New &Application', <Ctrl+Shift, 'N'>, 'Creates new application project from template.', NewFromTemplate, \
  actOpen,        1, '&Open',           <Ctrl, 'O'>,         'Open file',                  OnOpen,              \
  actSave,        2, '&Save',           <Ctrl, 'S'>,         'Save file',                  OnSave,              \
  actSaveAs,     22, 'Sa&ve As',        <NONE>,              'Save file with new name',    OnSaveAs,            \
  actSaveAll,    23, 'Save a&ll',       <Ctrl + Shift, 'S'>, 'Save all',                   OnSaveAll,           \
  actFileClose,  21, 'Close current page', <Ctrl, VK_F4>,    'Closes current file from source editor.', OnFileClose,    \
  actCloseAll,   24, 'Close whole project', <NONE>,          'Closes all current open files and project', OnCloseAll,  \
  actExit,       -1, 'E&xit',           <Alt,  'X'>,         'Exit program',               OnExit,              \
  actCleanupMRU, -1, '&Cleanup list',   <NONE>,              'Cleans the reopen list',     OnCleanupMRU,        \
\
  actUndo,       31, '&Undo',           <Ctrl, 'Z'>,         'Undo last change',           OnUndo,              \
  actCut ,        3, 'Cu&t',            <Ctrl, 'X'>,         'Cut to clipboard',           OnCut,               \
  actCopy,        4, '&Copy',           <Ctrl, 'C'>,         'Copy to clipboard',          OnCopy,              \
  actPaste,       5, '&Paste',          <Ctrl, 'V'>,         'Paste from clipboard',       OnPaste,             \
  actDelete,     -1, '&Delete',         <Ctrl, VK_DELETE>,   'Delete selection',           OnDelete,            \
  actInclude,    -1, '&Include',        <Ctrl + Alt, 'I'>,   'Insert "include" statement.', OnIncludeFile,      \
\
  actIndent,     16, '&Indent',         <Ctrl + Shift, 'I'>, 'Moves selected block to right.', OnIndent,         \
  actOutdent,    17, '&Outdent',        <Ctrl + Shift, 'U'>, 'Moves selected block to left.',  OnOutdent,        \
  actComment,    18, '&Comment',        <Ctrl + Shift, 'R'>, 'Comments selected text.',         OnComment,           \
  actUncomment,  19, 'Uncomm&ent',      <Ctrl + Shift, 'E'>, 'Uncomments selected text.',      OnUncomment,         \
\
  actFindFirst,  28, '&Find...',        <Ctrl, 'F'>,         'Search in sources for specified string',  OnFindFirst,\
  actFindNext,   -1, 'Find &next',      <0, VK_F3>,          'Search in sources for next occurence of specified string',  OnFindNext,\
  actReplace,    29, '&Replace...',     <Ctrl, 'H'>,         'Replaces specified string by another',  OnReplace,\
  actOpenFileAtCursor, -1, '&Open file at cursor', <Ctrl, VK_RETURN>, 'Opens the file with name under cursor', OnOpenFileAtCursor,       \
\
  actToggleBM,   12, '&Toggle bookmark',<Ctrl, 'B'>,         'Toggle bookmark',            OnToggleBM,          \
  actNextBM,     14, '&Next bookmark',  <Ctrl, VK_DOWN>,     'Next bookmark',              OnNextBM,            \
  actPrevBM,     13, '&Previous bookmark',<Ctrl, VK_UP>,     'Previous bookmark',          OnPrevBM,            \
  actClearBM,    15, '&Clear bookmarks',<NONE>,              'Clear bookmarks',            OnClearBM,           \
\
  actShowForm,   -1, 'Switch &form/source', <0, VK_F12>,     'Switch between form and source', OnShowForm,      \
  actViewGrid,    7, '&Grid visible',   <NONE>,              'Show/Hide form grid lines.', OnGridView,          \
  actSnapToGrid,  8, '&Snap to grid',   <NONE>,              'On/Off snap to grid',        OnSnap,              \
  actPartSelect, 10, '&Partial select', <NONE>,              'On/Off partial select',      OnPartialSelect,     \
  actViewProjMan,-1, 'View p&roject manager', <Ctrl, 'P'>,   'Project manager is visible when checked', OnViewProjMan,          \
  actViewPropEditor,-1, 'View properties', <NONE>,           'Property editor is visible when checked', OnViewPropEditor,      \
\;  actViewSourceEditor,-1, 'View &editor', <Ctrl, 'E'>,       'Source editor is visible when checked',   OnViewSourceEditor,     \
  actViewPalette,     -1, 'View pa&lette', <Ctrl, 'L'>,      'Component palette is visible when checked', OnViewPalette,        \
  actViewLister,      -1, 'View scratchpad', <Ctrl, 'J'>,    'Scratchpad is visible when checked', OnViewLister,                \
\
  actSetMainFile, 27, '&Set main file', <NONE>,              'Set the main file of the project', OnSetMainFile,                 \
  actAddCategory, 26, 'Add ca&tegory', <NONE>,               'Add new category in the project.', OnAddCategory,                 \
  actAddFile,    25, '&Add file(s)',   <NONE>,               'Add a file(s) to the project',  OnAddFile,                        \
  actDelCategory, -1, '&Delete category', <NONE>,            'Delete the category and all files from the project.', OnDelCategory,   \
  actDelFile,     -1, '&Remove file(s)', <NONE>,             'Remove the file from the project.', OnDelFile,                    \
  actEditCategory,  -1, 'Category &properties', <NONE>, 'Edit category properties', OnEditCategory,                             \
  actAddToProject, 25, '&Add to project', <NONE>,              'Add current editor file to the project.', OnAddToProject,       \
  actSetCurrentMain, 27, '&Set as main', <NONE>,               'Set current editor file as main file.',  OnSetCurrentAsMain,    \
  actCompile,     9, '&Compile',       <Ctrl, VK_F9>,        'Compiles the project.',      OnCompile,                           \
  actShowMessages, -1, 'Show/Hide &messages', <Ctrl, 'M'>,   'Show/Hide message window.', OnShowMessages,                       \
  actExplorer,   -1, 'Labels &explorer', <NONE>,              'Shows all labels defined in the project.',  OnExplorer,          \
  actShowNotUsed, -1, 'Show not &used', <NONE>,       'Show not used labels.', OnShowNotUsed,                                   \
  actGotoAddr,    -1, '&Goto address',         <Ctrl, 'G'>,       'Find what row in the source is on given address.', OnGotoAddr,  \
  actGotoDefinition, -1, 'Goto &definition',   <Ctrl, 'D'>,   'Find definition of the symbol under caret.', OnGotoDefinition,       \
  actGotoInterface, -1, 'Goto &interface',   <Ctrl+Shift, 'D'>,   'Find the interface definition of the procedure under caret.', OnGotoInterface,  \
  actCrossReference, -1, 'Cross &Reference',   <Ctrl, 'R'>,   'Display information and cross reference for the symbol under caret.', OnShowXRef,   \
  actProjectOptions, -1, 'Project &options',   <Ctrl, VK_F12>,'Edit project options.', OnProjectOptions,                       \
  actUnrollMacro,    -1, '&Unroll macro', <Ctrl, 'U'>, 'Unroll the macro line and show the listing.', OnUnrollLine,             \
\
  actHistoryBack,    36, 'Go &Back',           <Ctrl, '1'>, 'Browse source back.', OnHistoryBack,                            \
  actHistoryForward, 37, 'Go &Forward',        <Ctrl, '2'>,'Browse source forward.', OnHistoryForward,                      \
\
  actMoveCategoryUp, -1, 'Move &Up', <NONE>, <NONE>, OnMoveCategory,    \
  actMoveCategoryDn, -1, 'Move &Down', <NONE>, <NONE>, OnMoveCategory,  \
\
  actRun,        30, '&Run',           <0, VK_F9>,           'Compiles and runs the project', OnRun,                             \
  actRunDirect,  -1, 'Run &direct',    <Shift, VK_F9>,       'Compiles and runs the project without debuging feature.', OnRunDirect, \
  actPause,      32, '&Pause',         <0, VK_PAUSE>,        'Pause debugged process.', OnPause,                                  \
  actStepOver,   33, 'Step &over',      <0, VK_F8>,       'Step over calls.', OnStepOver,                                         \
  actStepInto,   34, 'Step &into',      <0, VK_F7>,       'Step into calls.', OnStepInto,                                         \
  actStop,       35, '&Stop',            <Alt, VK_PAUSE>, 'Terminate debuged process.', OnStop,                                  \
  actShowListing,-1, 'Sho&w listing',    <Ctrl+Shift, 'L'>, 'Show listing file.', OnShowListing,                                 \
  actOpenTerminal,  38, 'Open Linux &terminal', <Ctrl, 'T'>,       'Opens the default terminal', OnOpenTerminal,      \
\
  actDebug,      -1, '&External debugger',         <Shift, VK_F8>,           'Runs the project in debugger.', OnDebug,            \
\
  actIDEOptions,  -1, '&IDE options',   <NONE>,              <NONE>,                       OnIDEOptions,                \
\;  actEditOptions, -1, '&Editor options', <NONE>,             <NONE>,                       OnEditorOptions,             \
  actReloadVCL,  -1, '&Reload visual components', <NONE>,    <NONE>,                       OnReloadVCL,                 \
\
  actAutoArrange,-1, '&Auto arrange windows', <NONE>,         'Arranges the Fresh windows.', OnAutoArrange,             \
  actNextWindow, -1, '&Next file',     <Ctrl, VK_TAB>,        'Move to the next editor window', OnNextWindow,           \
  actPrevWindow, -1, '&Previous file', <Ctrl+Shift, VK_TAB>,  'Move to the previous editor window', OnPrevWindow,       \
\
  actHelp,       -1, '&Help',          <0, VK_F1>,              'Show context help for the word under the editor cursor',  OnHelp,        \
  actHelpFile,   -1, 'Help &file',     <Ctrl, VK_F1>,           'Opens one of the configured help files.', OnOpenHelpFile,                \
  actAbout,      -1, '&About Fresh...', <NONE>,              <NONE>,                       OnAbout,                                       \
\ ; Graphic tools
  actSelectTool, 0, '&Select', <NONE>, <NONE>, OnNotImplemented,       \
  actWandTool, 1, '&Magic wand', <NONE>, <NONE>, OnNotImplemented,         \
  actPenTool, 2, '&Pen', <NONE>, <NONE>, OnNotImplemented,       \
  actFillTool, 4, '&Fill', <NONE>, <NONE>, OnNotImplemented,     \
\ ; Debugger actions
  actDumpAddress, -1, '&Dump memory', <0, VK_F5>, 'Dumps the memory of debugged process.', OnDumpAddress


CoolMenu MainMenu,                      \
  mfSubmenu, '&File',                   \
    mfNormal,    actNewApplication,     \
    mfNormal,    actNew,                \
    mfNormal,    actOpen,               \
    mfSubmenu, '&Reopen',               \
      mfNormal, actCleanupMRU,          \
      mfSeparator, NONE,                \
    mfEnd, END,                         \
    mfSeparator, NONE,                  \
    mfNormal,    actSave,               \
    mfNormal,    actSaveAs,             \
    mfNormal,    actSaveAll,            \
    mfSeparator, NONE,                  \
    mfNormal, actFileClose,             \
    mfNormal, actCloseAll,              \
    mfSeparator, NONE,                  \
    mfNormal,    actExit,               \
  mfEnd, END,                           \
  mfSubmenu, '&Edit',                   \
    mfNormal,    actUndo,               \
    mfSeparator, NONE,                  \
    mfNormal,    actCut,                \
    mfNormal,    actCopy,               \
    mfNormal,    actPaste,              \
    mfSeparator, NONE,                  \
    mfNormal,    actFindFirst,          \
    mfNormal,    actFindNext,           \
    mfNormal,    actReplace,            \
    mfSeparator, NONE,                  \
    mfNormal,    actIndent,             \
    mfNormal,    actOutdent,            \
    mfSeparator, NONE,                  \
    mfNormal,    actComment,            \
    mfNormal,    actUncomment,          \
    mfSeparator, NONE,                  \
    mfNormal,    actInclude,            \
    mfNormal,    actDelete,             \
  mfEnd, END,                           \
  mfSubmenu, '&View',                   \
    mfNormal,     actShowForm,          \
    mfSeparator,  NONE,                 \
    mfChecked,    actViewGrid,          \
    mfChecked,    actSnapToGrid,        \
    mfChecked,    actPartSelect,        \
    mfSeparator,  NONE,                 \
    mfChecked,    actViewProjMan,       \
    mfChecked,    actViewPropEditor,    \
\;    mfChecked,    actViewSourceEditor,  \
    mfChecked,    actViewPalette,       \
    mfNormal,     actViewLister,        \
    mfNormal,     actShowMessages,      \
  mfEnd, END,                           \
  mfSubmenu, '&Bookmarks',              \
    mfNormal,    actToggleBM,           \
    mfSeparator, NONE,                  \
    mfNormal,    actNextBM,             \
    mfNormal,    actPrevBM,             \
    mfSeparator, NONE,                  \
    mfNormal,    actClearBM,            \
  mfEnd, END,                           \
  mfSubmenu, '&Navigation',             \
    mfNormal,    actHistoryBack,        \
    mfNormal,    actHistoryForward,     \
  mfEnd, END,                           \
  mfSubmenu, '&Project',                \
    mfNormal, actSetMainFile,           \
    mfNormal, actAddFile,               \
    mfNormal, actAddCategory,           \
    mfNormal, actEditCategory,          \
    mfSeparator, NONE,                  \
    mfNormal, actCompile,               \
    mfSeparator, NONE,                  \
    mfNormal, actShowNotUsed,           \
    mfNormal, actExplorer,              \
    mfSeparator, NONE,                  \
    mfNormal, actProjectOptions,        \
  mfEnd, END,                           \
  mfSubmenu, '&Debug',                  \
    mfNormal, actRun,                   \
    mfNormal, actRunDirect,             \
    mfSeparator, NONE,                  \
    mfNormal, actPause,                 \
    mfNormal, actStop,                  \
    mfSeparator, NONE,                  \
    mfNormal, actStepInto,              \
    mfNormal, actStepOver,              \
    mfSeparator, NONE,                  \
    mfNormal, actGotoAddr,              \
    mfNormal, actDebug,                 \
    mfSeparator, NONE,                  \
    mfNormal, actOpenTerminal,          \
    mfSeparator, NONE,                  \
    mfNormal, actShowListing,           \
  mfEnd, END,                           \
  mfSubmenu, '&Options',                \
    mfNormal, actIDEOptions,             \
\;    mfNormal, actEditOptions,            \
    mfSeparator, NONE,                  \
    mfNormal, actReloadVCL,             \
  mfEnd, END,                           \
  mfSubmenu, '&Window',                \
    mfNormal, actFileClose,             \
    mfNormal, actCloseAll,              \
    mfNormal, actAutoArrange,           \
    mfSeparator,  NONE,                 \
    mfNormal, actNextWindow,            \
    mfNormal, actPrevWindow,            \
  mfEnd, END,                           \
  mfSubmenu, '&Help',                   \
    mfNormal, actHelp,                  \
    mfNormal, actHelpFile,              \
    mfSeparator, NONE,                  \
    mfNormal, actAbout,                 \
  mfEnd, END




CoolToolbar MainToolbar,                \
    bfButton,    actNew,                \
    bfDropDown,  actOpen,               \
    bfButton,    actSave,               \
    bfButton,    actSaveAll,            \
    bfSeparator, NONE,                  \
    bfButton,    actUndo,               \
    bfSeparator, NONE,                  \
    bfButton,    actCut,                \
    bfButton,    actCopy,               \
    bfButton,    actPaste,              \
    bfSeparator, NONE,                  \
    bfButton,    actHistoryBack,        \
    bfButton,    actHistoryForward,     \
    bfSeparator, NONE,                  \
    bfButton,    actCompile,            \
    bfSeparator, NONE,                  \
    bfButton,    actRun,                \
    bfButton,    actStop,               \
    bfButton,    actPause,              \
    bfButton,    actStepInto,           \
    bfButton,    actStepOver,           \
    bfSeparator, NONE,                  \
    bfCheck or bfChecked, actViewGrid,  \
    bfCheck or bfChecked, actSnapToGrid,\
    bfCheck or bfChecked, actPartSelect,\
    bfSeparator, NONE,                  \
    bfButton,    actIndent,             \
    bfButton,    actOutdent,            \
    bfSeparator, NONE,                  \
    bfButton,    actComment,            \
    bfButton,    actUncomment,          \
    bfSeparator, NONE,                  \
    bfButton,    actToggleBM,           \
    bfButton,    actPrevBM,             \
    bfButton,    actNextBM,             \
    bfButton,    actClearBM,            \
    bfSeparator, NONE,                  \
    bfButton,    actOpenTerminal


    DispSize 'actions data', ($-CoolData)