:>> SimMX uni ui creator!

For W-XP and up...
Snippets are really sort of templates!
For quick demo without any compilers check down Html sample!
Win7 faster graphics: rightClick SUniGuiCreator.exe->properties->Compatibility->Disable desktop composition
Design mode buttons can be customized, check down [[ Customizing 'design mode' buttons ]]


[[ HowToUse ]]
  there should be 2 orange user tools at top - this are just an example; <=if'any.tool'DoesntHavePosYet,itCanBeUsedAs:dblClickAnywhereNearThisTwoAndChoose(anyfilename.tool<=shoudExist,posWillBeAdded)
  -testing 1st tool: just hit it, it should open cmd window with some stuff
  -testing simmxhdrtools(somethingLikeLinux1stLineScript) and in-file compiling:
   open zz_smx\testcommenttools.cpp.all - read - adjust as necesarry,
   and hit Export(or F12 or Alt-c) - testcommenttools.cpp should be created in same folder.
   now hit 2nd orange user tool - if everything goes right some cmd line windows will show,
     optionally new compiled testcommenttools.exe and 3progs(write notepad calc) opened.
   note that default ToolsInComment expects exported file!

If you read the 'config' - even if you don't want to tweak - it has some usefull info!
For simple template/wizard like sample, just click 'snippets'->'html'->'index5.html'.
Some icons/background images and MainSwf.swf are in resources.7z if needed.

Hover over 'save' for current loaded/saved file!

AsHexStructEditor: 1st load ...-binary.gfx(onlyMainTabIsUsed), then any file for editor - optionally save.


[[ Samples ]]
HaXe flash sample:
  -install haxe, then in tools\haxe-flash.bat modify path to it
  -in SUniGuiCreator:
     browserVer(open MainSwf.hx.all then sample.gfx and hit Export(hold down Shift while pressing OK, or dont and see if MainSwf gets executed-justCloseIfItRuns), then open index-haxe-swf.html.all) and hit Export
     flashPlayerVer-ifYouHaveFlPlayerTool-orDefaultSwfOpener(open MainSwf.hx.all and sample.gfx) and hit Export

Html sample:
  -open index5.html.all and sample.gfx, then hit Export - it should produce similar effect to upper haXe flash

Native windows sample:
  -open wnative.cpp.all(upper-txt) and wnative.gfx(lower-gfx)
  -compiler:
    msvc14: in tools\compile-wnd-msvc14.bat,modify path to this compiler(configuredForWXPsp2UpButTestedOnW7-target=x32)
    gcc: in tools\compile-wnd-gcc.bat,modify path to this compiler(configuredForGenericButTestedOnW7-target=x32), and modify header of opened wnative.cpp.all
    anotherOne: create file tools\compile-wnd-CompilerName.bat and modify header of opened wnative.cpp.all
  -export(itShouldCompileExeAndOpenThatApp)
  For 'class ids': BUTTON|EDIT|... [wndflagsNoWS_|exwndflagsNoWS_EX_|WS_...|WS_EX_...] [EXTRACLASSFLAGS] <=uppercaseAreAsTheyAreInHeaders,lowercaseAreWindowAndWindowExFlagsWithoutWS_orWS_EX_(thisIsSoThatHiddenCanBeUsed) <=updated so WS_ and WS_EX_ can be used!
    nativeClassesAreUsed-BUTTON,EDIT,etc-withAllUppercase, any flags can be added to this with 'space' as separator(allLowercase)
    and available flags can be found in upperSection of snippets\cpp\windows\ab_ui-create-exp.esc, eg: BUTTON hidden BS_FLAT WS_VSCROLL WS_EX_LEFTSCROLLBAR
    AllItemsHaveAutoAdded: visible|child, if hidden is spec then no visible is added.
  For LISTBOX/COMBOBOX: lastLineCanSpecifyWhichLineIsSelected,as in sample:"Line1\nLine2\nLine3\\r1" <=1=whichOne
  Alignment is not implemented in script template for now, if anybody adds this, it would be fine to uppload to upp site

ExportOnly sample:
  double click zz_zexp/export-and-compile.bat <=compiler-env-gcc.bat should have correct path set to gcc

note for cb-loop-items-any.any:
  for now only vecobjitems props are expanded multiple-times if used in vecobj-extra-code


[[ Customizing 'design mode' buttons ]]
This is primarily used for setting customized extra button tools(setusertools canBeUsed-lookDown)!
ByDefault dm-default-1.all in usertools dir will be executed when clicking 1stButton, yes, that is without intermediate .cpp.all,.c.all,etc.
Intermediate files(andExporting) in this case are not used, but headertools are
For setting current *.tool(orAnyOther) files, setusertools(1stNameOnly) can be used(assumingDir-tools/usertools/ut-*.tool), eg: setusertools("ut-sample);
UserToolsButtons: the one with ...>(justASample) have option to rightMouseButtonClick(lastOptOnLine nul ... in *.tool)

[[ Plugins ]]
Plugins can be created with any compiler that supports "printf" like functions to stdout,
native c/cpp like sample file(interIconSelect) is included in folder tools/plugins/iisSample.7z.
For now only esc functions gfxwnd...(lookDown) are more or less used to set gfx object parameters.
Plugins must be put in tools/plugins folder and accessed with executable nameOnly.

[[ Macros/tools ]]
Just click image only black button tool, it has a tooltip!
Check tools/usertools/ut-sample-tools.tool and ut-sample-macro.tool for more

[[ Parse func ]]
Parsing is done like so:
@cmd(eg:@tool,...) then
esc functions + @cmd(eg:@tool,...)(moreOrLessEscFuncsAreCalledInBetween-egForItems) + again esc functions.
It's 2xparse so escScripts with @... get's evaluated 1st!
And returning escScript may include @... which is evaluated too, chk esc-params-call.txt.all and snippets/abbrev-exp.esc.

[[ Project/Sessing/layout open/save ]]
Alt saves with absolute path.
Prj/SesFiles: when saved with absPath(Alt), it's remembered, remove @tid-comment abspath; from file if relPath is desired again.
Prj/SesFiles: have info about it, can be edited with Shift+rightAboutKnob(whichAutoSavesPrj/Ses) - for more check About
Project: opens all editor files and gfx file
Session: opens(sets) dmButtons+usertools + whatever project opens
Layout:  opens(sets) dmButtons+usertools 

[[ <<End sectionS>> ]]


In About are command line switches

That's it!



simmxtools
  can be downloaded from
    https://ws-tools.000webhostapp.com



Extra esc keywords(everyReturnIsAsString,"atStartAndEndMeansIt'sRealString):
  err(str)
  msgbox(str)
  str=input(text,title="Edit...",desc="")
  str=inputdbl(dbl,title="Edit...",desc="")
  dbl=dblinput(dbl,title="Edit...",desc="")
  vecStr=split(str,delimChOrStr,ignoreempty=0)    //vecStr=vector<string>, note that boolean is 0 and 1 - not false/true
  str=join(vecStr,delimStr);                      //vecStr=vector<string>
  str=mid(text,from,num)                          //from and num should be specified - this is internal version
  str=mid_ex(text,from,num=-pow(2,31))            //from:<0MeansFromEnd,num:-pow(2,31) means till end, eg mid(txt,-4) - note,from/num may be both negative
  bool=exists(map,key)
  int=find(text,find,from=0);                     //-1=notFound
  sleep(ms)                                       //just pause execution for milisec
  str=cmd(progAndArgs,detach=0)                   //by def will wait cmd to finish, ret:void=err
  str=run(progAndArgs,detach=1)                   //by def will return immediately - without waiting to finish, ret:asEmptyStr,void=err
  
  addopenedit(fname)                                    //can be used with custom scripts for saving/loading projects/sessions/layouts
  opengfx(fname,askIfModified=0)                        //--||--
  setusertools(name)                                    //anyToolsFrom'tools/usertools'dirWithNameOnly(noEndingPattern),eg: ut-default or dm-default
  uiselect(ui=3)                                        //ui=0..3(0=both,1editOnly,2=gfxOnly,3=none)
  embedapp(appfname,moveType=1,x=0,y=0,w=640,h=480)     //don'tUseForNow!appfname(""=clearAll),moveType(0=offAtAppWnd,1=offAfterMainButtons),negative(w/h)=from(Right/Bottom)frame; App should have only one main window
  
  txtsel(cursorFrom=-1,num=0)                           //-1(atEnd),num(-1=tillEnd)
  gfxget(gfxtabind,str,itemind=-1,cfgFromSnippets="");  //gfxtabind=0..15, str: any $<>,eg $<num-items> or $<painter-bgclr> or when itemind is spec - $<pos.x> etc; cfgFromSnippets may be as snippets\html\aa-snipptypesettings.cfg <=this is def, you can spec another
  gfxget(gfxtabind,str,itemind=-1,cfgFromSnippets=\"\")
  gfxseltab(ind=-1)                                     //-1(current,thisIsToSetFocusOnCanvas-ifItWasOnInputCtrlsOrText)
  gfxselitems(gfxtabind,itemIndOrIdFrom,itemIndOrIdTo=0)//itemIndOrIdFrom(negVals=numFromEnd) itemIndOrIdTo(0=1Item,-1=fromTillEnd,negativeValueRepresentNumItem)
  gfxwndMClick(ctrlItemName)                            //names are in gfxwnd-layout.ini
  gfxwndSetText(text)                                   //<= for gfx input ctrls
  sendkeys(text,keysDelay=0,finalDelay=0)               //<= keysDelay=50,finalDelay=100 are reasonable values when want to see writing
  str=$<esc{x=any; return any}>;                        //<= this can be done for any 'regular/static' $<> or @any; pre-parsing or
  str=$<esc{"script.esc"}>;                             //<= this can be done for any 'regular/static' $<> or @any; pre-parsing or
  str=@tid-str;                                         //<= this
  parse(str);                                           //parse any dynamically-whenThisCodeIsReached-butWithout@and;, eg parse("snippet \"html\index5.html\"");
  
  bool=fileexists(fname)                          //selfExplanatory
  bool=filecopy(src,dest)                         //dest may end with ".../dir/" so this can be used: filecopy("c:/files/main.txt","c:/backup/");
  bool=filedelete(fname)
  file=OpenFileIn(x)                              //methods: IsEof Get GetLine Close
  file=OpenFileOut(x)                             //methods: Put PutLine Close
  file=OpenFileAppend(x)                          //-||-


SendKeys-keys:
  "NUMPAD7",  XK_KP_7,          "BACK",    XK_BackSpace, 
  "NUMPAD8",  XK_KP_8,          "TAB",     XK_Tab,
  "NUMPAD9",  XK_KP_9,          "RETURN",  XK_Return,
  "MULTIPLY", XK_KP_Multiply,   "SHIFT",   XK_Shift_Lock,
  "ADD",      XK_KP_Add,        "CONTROL", XK_Control_L,
  "SEPARATOR",XK_KP_Separator,  "MENU",    XK_Super_L,
  "SUBTRACT", XK_KP_Subtract,   "PAUSE",   XK_Pause,
  "DECIMAL",  XK_KP_Decimal,    /*"CAPITAL",VK_CAPITAL,*/
  "DIVIDE",   XK_KP_Divide,     "ESCAPE",  XK_Escape,
  "F1",       XK_F1,            "SPACE",   XK_KP_Space,
  "F2",       XK_F2,            "END",     XK_End,
  "F3",       XK_F3,            "HOME",    XK_Home,
  "F4",       XK_F4,            "LEFT",    XK_Left,
  "F5",       XK_F5,            "UP",      XK_Up,
  "F6",       XK_F6,            "RIGHT",   XK_Right,
  "F7",       XK_F7,            "DOWN",    XK_Down,
  "F8",       XK_F8,            "PRINT",   XK_Sys_Req,
  "F9",       XK_F9,            /*"SNAPSHOT",VK_SNAPSHOT,*/
  "F10",      XK_F10,           "INSERT",  XK_Insert,
  "F11",      XK_F11,           "DELETE",  XK_Delete,
  "F12",      XK_F12,           "LWIN",    XK_Meta_L,
  "NUMLOCK",  XK_Num_Lock,      "RWIN",    XK_Meta_R,
  "SCROLL",   XK_Scroll_Lock,   "NUMPAD0", XK_KP_0,
  "LSHIFT",   XK_Shift_L,       "NUMPAD1", XK_KP_1,
  "RSHIFT",   XK_Shift_R,       "NUMPAD2", XK_KP_2,
  "LCONTROL", XK_Control_L,     "NUMPAD3", XK_KP_3,
  "RCONTROL", XK_Control_R,     "NUMPAD4", XK_KP_4,
  "LMENU",    XK_Super_L,       "NUMPAD5", XK_KP_5,
  "RMENU",    XK_Super_R,       "NUMPAD6", XK_KP_6,
  "PGUP",     XK_Page_Up,       "PGDOWN",  XK_Page_Down,
  "CAPSLOCK", XK_Caps_Lock,     "BACKSPACE",XK_BackSpace


InternalImages that can be used in *.tool as image
but combined with preimage,eg: simmximg:or0
simmximg are(tool/images/inter-simmximg.jpg):
sun_icon
sun_icon128
fire_icon
fire_icon128
cd temp bluehat bluesmile cdgalaxy_icon16 cdgalaxy_icon24 leaf_icon16 leaf_icon24 textclr
or0 or1 or2 or3
qb qbh qbp qbd
qr qrh qrp qrd
B Bh Bp Bd
S0 S0h S0p S0d
EBp
EBd
SB SBh SBp SBd
SBHT SBHTh SBHTp SBHTd
SBVT SBVTh SBVTp SBVTd
OkB OkBh OkBp OkBd
OBlack SBlack kDA kUA kLA kRA kSpU kSpD DA UA LA RA SpU SpD
--
CtrlImg are(tools/plugins/iconInterSelect_icons.jpg):
arrow exclamation information question error smallcheck smallup smalldown smallleft smallright spinup3 spinup2 spinup spindown3 spindown2 spindown
reporticon smallreporticon ibeam0 HandCursor HelpCursor0 HelpCursor1 write open save save_as print new_doc menu_window undo redo select_all
cut copy paste_vert paste sort remove menu_check menu_radio right_arrow white_right_arrow check white_check left_arrow white_left_arrow cross
up_arrow down_arrow plus selection MkDir Dir DirUp File Plus Minus Toggle Share CdRom Hd Diskette Computer Flash Network Group Var Home
MenuCheck1 MenuCheck0 Empty16x16 MenuRadio0 MenuRadio1 set_transparent wheel_cursor white_wheel_cursor column_cursor swap_color_cursor
fetch_color fetch_color_cursor tab_wheel hthumb hthumb1 vthumb vthumb1 treeplus tree0 tree1 tree2 treeminus Add Remove SmallDown SmallUp
SmallRight SmallLeft go_back go_forward font_size help focus_h focus_v checkers SmallDot SmallDotH BigDot BigDotH Bg SortUp SortDown color_edit
--
CtrlsImg are(tool/images/CtrlsImg.jpg):
B Bh Bp Bd
EB EBh EBp EBd
SB SBh SBp SBd
SBHT SBHTh SBHTp SBHTd
SBVT SBVTh SBVTp SBVTd
OkB OkBh OkBp OkBd
kDA kUA kLA kRA kSpU kSpD DA UA LA RA SpU SpD
