*****************************************************************
***                ToolBar AkelPad plugin v12.5               ***
*****************************************************************

2006-2016   aka Instructor (Shengalts@mail.ru)


***  ***

   .


:
-    (       Ctrl)  
           .


***  ***

ToolBar::Main
      .


***  ***

:
  %f   
  %d    
  %a   AkelPad'
  %m     (handle)
  %i   
  %bl       
  %bt       
  %br       
  %bb       
  %%  %
  % %

:
  # 
  ; 

 :
  SEPARATOR
     .
  SEPARATOR1
    ,   SEPARATOR, ,    SEPARATOR1 ,     SEPARATOR1.
  BREAK
          (  ).    SEPARATOR,  
       . BREAK      .
  SET([,  ])
        (   ).   :
      SET(1)
          ,    SDI.
      SET(2)
          ,    MDI.
      SET(4)
          ,    PMDI.
      SET(32, "%a\AkelFiles\Plugs\Scripts.dll")
          ,   "Scripts.dll" .
      SET(64, If(""[, , ]))
          ,     .
          ""
              :
            -  :
              +, -, *, /, %, &, |, ^.
            -  :
              >, <, ==, !=, >=, <=, &&, ||, x?y:z.
            - :
              /**/
            - :
              SendMain(nMessage, wParam, lParam)
                nMessage
                  ,     .
                wParam
                   .
                lParam
                   .
              SendEdit(nMessage, wParam, lParam)
                nMessage
                  ,     .
                wParam
                   .
                lParam
                   .
              Call("::"[,  ])
                -   ,        &nResult. &nResult    ,        .
                  SET(64, If(`Call("Coder::CodeFold", 1, &nResult)`)
                      ,    CodeFold.
                -   ,      2  4,         AkelPad.ScriptExitCode.
                  SET(64, If(`Call("Scripts::Main", 4, "EvalCmd.js", 'if (AkelPad.GetEditFile(0)) AkelPad.ScriptExitCode(1);')`)
                      ,     .
                -    Scripts  .   SET(128).
                  SET(64, If(`AkelPad.Constants._X64 == 1`))
                      ,     x64.
          
             ,    -  (  ).
          
             ,    -  ( ).
        SET(64, If(`SendMain(1222 /*AKD_GETMAININFO*/, 5 /*MI_SAVESETTINGS*/, 0) == 2 /*SS_INI*/`))
            ,     ini .
      SET(128, If(""[, , ]))
          .
          ""
            .  SET(64).  SET(128)   .
          
            0x0 //IFS_NORMAL     .
            0x1 //IFS_CHECKED    () .
            0x2 //IFS_GRAYED    ,  .
            0x4 //IFS_DISABLED   .
          
            0x0 //IFS_NORMAL     .
            0x1 //IFS_CHECKED    () .
            0x2 //IFS_GRAYED    ,  .
            0x4 //IFS_DISABLED   .
        SET(128, If("SendMain(1223 /*AKD_GETFRAMEINFO*/, 69 /*FI_CARETOPTIONS*/, 0) & 0x2 /*CO_CARETVERTLINE*/", 0x1, 0x0))
            ,    .
        SET(128, If(`Call("Scripts::Main", 5, "SearchReplace.js", 2 /*SH_THISSCRIPT*/, &nResult)`, 0x1, 0x0))
            ,    SearchReplace.js.
        SET(128, If(`AkelPad.IsPluginRunning("Coder::HighLight")`, 0x1, 0x0))
            ,   Coder::HighLight.
UNSET(128)
  UNSET()
       . . SET()  .

 :
  [-]"[ ]" [Command() | Call() | +Call() | Exec() | OpenFile() | SaveFile() | Font() | Recode() | Insert() | Menu()] Icon()

  [-]"[ ]"
    " "
          ,     .
    -" "
         ,    -    
      ( , ).
    ""
         ,     Command(),  
        ,     Command().

    Command()
      Command(4162)
              4162.     
             "  ...".
           : . AkelHelp-Rus.htm  AkelDLL.h    .
    Call("::"[,  ])
      Call("Scripts::Main")
           Scripts   Main.
    +Call("::"[,  ])
      +Call("LineBoard::Main")
           LineBoard   Main.     
         .
    Exec(" "[, " "][, ][, ])
      " "
         .
      " "
         .   "".
      
          . 1 - , 0 -   ( ).
       (  ):
        0  .
        1    ( ).
        2  .
        3  .
        6 ,   .
        9   .
        :     .
      Exec("notepad.exe")
          .
      Exec(`notepad.exe`)
          .
      Exec('notepad.exe')
          .
      Exec('%windir%\notepad.exe')
          .
      Exec(`rundll32.exe shell32,ShellExec_RunDLL "%f"`, "%d")
                Windows.
    OpenFile(""[, ][, BOM])
      ""
          .
      
         .  -1   ,    .
      BOM
         BOM .  -1   ,    .
      OpenFile("C:\File.txt", 65001, -1)
             UTF-8.
    SaveFile(""[, ][, BOM])
      ""
             .
      
         .  -1   ,    .
      BOM
         BOM . 1 - , 0 - , -1    -   BOM.
      SaveFile("C:\File.txt", 65001, 0)
             UTF-8  BOM.
    Font("", , )
      ""
         , , "Courier".  ,  "".
       (  ):
        0  .
        1   .
        2   .
        3   .
        4    .
      
         .  ,  0.
      Font("Courier", 4, 10)
            Courier   10 pt.
    Recode(, )
      
         .  -1,    .
      
         .  -1,    .
      Recode(1251, 866)
             1251  866.
    Insert(""[, Esc-])
      ""
         .
      Esc-:
        0  ""   Esc- ( ).
        1  ""  Esc-.   
            /  ,  :
           "\s" -       ;
           "\|" -       .
      Insert(" ")
             .
      Insert("<B>\s</B>", 1)
              .
      Insert("\[0031 0032 0033]", 1)
            "123".

    Menu(" ")
      " "
           " ContextMenu::Show" (ContextMenu ).
            ,   Command(),       .
           ,           .
        :
          1.   .
               " " +Call("SpecialChar::Main") Menu("SPECIALCHAR") Icon("%a\AkelFiles\Plugs\SpecialChar.dll", 0)
          2.   .    " ->->...->ContextMenu::Main",
              " ContextMenu::Show"    :
               "SPECIALCHAR"
               {
                 "..." Call("SpecialChar::Settings")
               }

    Icon([""][, ])
      Icon("Shell32.dll", 47)
            Shell32.dll   47.
      Icon("%a\AkelFiles\Plugs\Explorer.dll")
            Explorer.dll   0.
      Icon("%a\AkelFiles\Plugs\Toolbar\MyIcon.ico")
            MyIcon.ico.
      Icon(12)
            ToolBar.dll   12.

:
  " " Command(4182) Icon(0)
  "" Command(4182) Icon(0)
  " " Call("Format::LineSortStrAsc") Icon(0)
  -" " Call("Scripts::Main", 1, "SpellCheck.js", "") Icon(0)
  " " +Call("Coder::Highlight") Icon(0)
  " " Exec("regedit.exe") Icon("regedit.exe")


***   ***

Call("ToolBar::Main", 1, "ROWS(SHOW)")
  :
    1
           . .  BREAK.
         , :
      -       ,   ;
      -        ,         .
    "ROWS(SHOW)"
             ()  . : "1,2,4"  "1(1),2(-1),4".
       "",    .
      ROWS
         .
      SHOW
          (  ):
          -2     .
          -1    .
           0   .
           1    ( ).


***   ***

SidePriority
      (  ):
    1      ,     ( ).
    2      ,    .
ArrowOverlay
        Menu()   (  ):
   -1   ,    BTNS_WHOLEDROPDOWN.
    0   .
    1   .
    2     , ..          ( ).
GrayedIcons
       (  ):
    0        ( ).
    1       .
