Compare commits
89 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1881493b56 | ||
|
|
04599ea184 | ||
|
|
067ae87dc6 | ||
|
|
622db1313b | ||
|
|
89bb289c6a | ||
|
|
465ed72d51 | ||
|
|
62530ba937 | ||
|
|
1e4be39c29 | ||
|
|
bc69e56e07 | ||
|
|
8f7aa92de6 | ||
|
|
6b1407f8b3 | ||
|
|
78bd7c6b79 | ||
|
|
0890179044 | ||
|
|
57af369b66 | ||
|
|
ca758c03d1 | ||
|
|
77602703be | ||
|
|
097740d0ef | ||
|
|
585177f79f | ||
|
|
6aa3683823 | ||
|
|
cf272ca733 | ||
|
|
35199d5d98 | ||
|
|
c394cb7dec | ||
|
|
28490b1c78 | ||
|
|
4f30271665 | ||
|
|
3abddc50a1 | ||
|
|
614c43795a | ||
|
|
b734e8d34e | ||
|
|
01aa5d39b7 | ||
|
|
ed30948f7f | ||
|
|
ac8c5bbe53 | ||
|
|
67ac18af04 | ||
|
|
6dbf56f984 | ||
|
|
c7a66bb68b | ||
|
|
08d8630147 | ||
|
|
93abd740d8 | ||
|
|
8780a3b656 | ||
|
|
780d23f111 | ||
|
|
78736a94e5 | ||
|
|
249554a77c | ||
|
|
bc55f6a72d | ||
|
|
5af9d4d487 | ||
|
|
31e21d2e6a | ||
|
|
74e8021306 | ||
|
|
01a48dcfcc | ||
|
|
18005ea0c2 | ||
|
|
dce5f99130 | ||
|
|
af9d01727f | ||
|
|
8d09cc9c09 | ||
|
|
1bc9b287df | ||
|
|
1cc2fc1bf2 | ||
|
|
5c7beb0079 | ||
|
|
71d1ea13a8 | ||
|
|
9879660522 | ||
|
|
ae75c9823f | ||
|
|
bfbc5d2000 | ||
|
|
841beb31ce | ||
|
|
119a5eb2ae | ||
|
|
0729da3403 | ||
|
|
29e56be459 | ||
|
|
17bdb480c9 | ||
|
|
4da3dde68d | ||
|
|
9b330c26ca | ||
|
|
9bdb1d016b | ||
|
|
4a881cf855 | ||
|
|
411eb2d338 | ||
|
|
7fea9b4ec7 | ||
|
|
f0f9a37c7d | ||
|
|
e7c374c39f | ||
|
|
ba7a7c470d | ||
|
|
67b3e3fe5b | ||
|
|
32299a29b2 | ||
|
|
896e9f7c75 | ||
|
|
ab3caee258 | ||
|
|
3f1d617c8f | ||
|
|
b549f807bb | ||
|
|
d36dbc005c | ||
|
|
95fce2cdc8 | ||
|
|
a897472f05 | ||
|
|
23decac1de | ||
|
|
60994d0da8 | ||
|
|
af02cb2c24 | ||
|
|
c7d6f9726a | ||
|
|
655f3811de | ||
|
|
22f1540a5c | ||
|
|
f576e9000d | ||
|
|
589f7d94d2 | ||
|
|
16bb3cb6cb | ||
|
|
6da6153053 | ||
|
|
238a407a2c |
98
CHANGELOG.md
98
CHANGELOG.md
@@ -1,5 +1,98 @@
|
||||
# ZeroBrane Studio Changelog
|
||||
|
||||
## v0.34 (Dec 12 2012)
|
||||
|
||||
### Highlights
|
||||
- Added **internationalization** support (with Russian, Italian, Spanish, and French translations).
|
||||
- Added **key binding** configuration for menu and toolbar items.
|
||||
- Added **Corona SDK integration** with debugging and auto-complete.
|
||||
- Added **Moai scratchpad support**.
|
||||
- Added **color scheme support** with several schemes included.
|
||||
- Added **GSL-shell support**.
|
||||
- Added ability to pause and resume scratchpad.
|
||||
|
||||
### Special thanks
|
||||
- To Srdjan Markovic for Corona auto-complete support and Zenburn color scheme.
|
||||
- To Roland Yonaba for French translation.
|
||||
- To Leo Bartoloni for Italian translation.
|
||||
- To Inigo Sola for Spanish translation.
|
||||
- To toiffel for Russian translation and several patches.
|
||||
- To Fringale for spec and API files cleanup and update for Lua 5.2.
|
||||
- To Marcel van Herk for assistance with scratchpad break/resume functionality.
|
||||
|
||||
### Improvements
|
||||
- Added an option to specify the width of the calltip.
|
||||
- Added showing short descriptions in tooltip for functions without lib/package.
|
||||
- Added 'Project Directory' menu.
|
||||
- Added ability to pause scratchpad when the script is completed (closes #83).
|
||||
- Added ability to pause and resume scratchpad.
|
||||
- Added GSL-shell support (closes #72).
|
||||
- Added more color schemes (Solarized and Monokai).
|
||||
- Added customized yield function for debugging (MobDebug v0.508; closes #81).
|
||||
- Added proper hiding of current line marker during debugging (except when tracing).
|
||||
- Added Corona auto-complete support (thanks to Srdjan Markovic).
|
||||
- Added logic to show application windows without explicitly listing their class (closes #80); Windows only.
|
||||
- Added Moai scratchpad support.
|
||||
- Added missing constants to Moai API.
|
||||
- Added setting focus on the window when a file is loaded in the existing instance.
|
||||
- Added two more wxwindow window classes to the list of windows to show (Windows).
|
||||
- Added scheme picker script to test color schemes from the IDE.
|
||||
- Added Zenburn as a color scheme.
|
||||
- Added styling for markers and Output/Console windows.
|
||||
- Added Italian translation (thanks to Leo Bartoloni).
|
||||
- Added Spanish translation (thanks to Inigo Sola).
|
||||
- Added reporting of run-time errors from remote processes (helps #73).
|
||||
- Added 'tomorrow' color theme.
|
||||
- Added redirect of remote 'print' commands for Gideros applications.
|
||||
- Added check for 'main.lua' in Corona projects.
|
||||
- Added ability to suspend a running application even when there is no editor tab or file to activate.
|
||||
- Added serialization of remote 'print' results and an output filter for debugging (helps #73).
|
||||
- Added redirect of remote 'print' commands to the Output window in the IDE (helps #73).
|
||||
- Added Corona SDK support (closes #73).
|
||||
- Added French translation (thanks to Roland Yonaba).
|
||||
- Added (more) verbose output to debugger to assist in troubleshooting.
|
||||
- Added handling of LUA_DEV to make loading Lua for Windows libraries working out of the box (fixes #71).
|
||||
- Added internationalization support (closes #70).
|
||||
- Added notes about estrela being gone and compatibility.
|
||||
- Added multi-tab support for scratchpad.
|
||||
- Added documentation on accelerator/shortcut syntax.
|
||||
- Added key map to change key binding for menu and toolbar items from a config file (closes #64).
|
||||
- Added hiding IDE while closing and saving configuration.
|
||||
- Completed reorganization of front-end processing (closes #67 and #5).
|
||||
- Disabled editor autoactivation during debugging when tracing is on.
|
||||
- Disabled functions that are not available under Corona on OSX (helps #73).
|
||||
- Disabled showing auto-complete when the only option is already typed.
|
||||
- Disabled showing a calltip on mouse over when it's already active.
|
||||
- Extended list of default folders for interpreters where executables are searched for.
|
||||
- Finished Russian translation.
|
||||
- Limited auto-showing windows to Lua interpreter only (related to #80).
|
||||
- Removed window types from config as they are no longer needed to be listed.
|
||||
- Switched to showing short tooltips by default as some of the updated Lua API descriptions are very long.
|
||||
- Updated descriptions for io.* functions; moved file:* functions to a pseudo library (f); helps #84.
|
||||
- Updated LICENSE to add remdebug license information.
|
||||
- Updated tooltip to show shortened descriptions on mouse-over.
|
||||
- Updated spec and API files for Lua 5.2 (thanks to Fringale).
|
||||
- Updated MobDebug to v0.507 to fix serialization issues (closes #77).
|
||||
- Updated style processing to support styling of markup and allow dynamic switching of color schemes.
|
||||
- Updated Lua keyword definitions to improve grouping for styling (closes #79).
|
||||
- Updated love2d api to an updated version as of 11/1/2012 (fixes #78).
|
||||
|
||||
### Incompatibilities
|
||||
- The default port in the debugger has been changed from 8171 to 8172 to avoid conflicts with existing RemDebug implementations.
|
||||
|
||||
### Fixes
|
||||
- Fixed an issue with overlapping auto-complete suggestions.
|
||||
- Fixed auto-complete not working after closed brackets.
|
||||
- Fixed tooltip being shown when mouse moving outside of the editor area.
|
||||
- Fixed a font zooming bug with Ctrl+MouseWheel.
|
||||
- Fixed file marking in the project tree after opening a new file.
|
||||
- Fixed an issue with breakpoints not available after aborting tracing on Linux/OSX.
|
||||
- Fixed an issue with running scratchpad when entry points are configured.
|
||||
- Fixed Linux launcher to pass filename parameter to the IDE.
|
||||
- Fixed fold style to properly set background color.
|
||||
- Fixed an issue with a config file being loaded into the editor when specified in the command line.
|
||||
- Fixed an issue with markdown formatting not working after setting styles from a config file (fixes #74).
|
||||
|
||||
## v0.33 (Oct 22 2012)
|
||||
|
||||
### Highlights
|
||||
@@ -9,6 +102,11 @@
|
||||
- Added **syntax aware indentation**.
|
||||
- Added **re/storing open files and interpreter** when switching project folders.
|
||||
|
||||
### Special thanks
|
||||
- To Andy Bower and Atilim Cetin for their assistance with Gideros integration and live coding.
|
||||
- To toiffel for Linux/OSX/Windows CMake-based launcher build.
|
||||
- To Christoph Kubisch for help with Estrela merge.
|
||||
|
||||
### Improvements
|
||||
- Added configuration option to specify hostname when the default one is not reachable (fixes #68).
|
||||
- Added search for Moai and Love2d executables in default locations on OSX and Windows.
|
||||
|
||||
22
LICENSE
22
LICENSE
@@ -197,3 +197,25 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
|
||||
--[[ RemDebug License ]]---------------------------------------------------
|
||||
|
||||
Copyright (c) 2006 The Kepler Project.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
|
||||
23
README.md
23
README.md
@@ -2,8 +2,8 @@
|
||||
|
||||
[ZeroBrane Studio](http://studio.zerobrane.com/) is a lightweight Lua IDE with code completion, syntax
|
||||
highlighting, remote debugger, code analyzer, live coding, and debugging
|
||||
support for several Lua engines (LuaJIT, Löve 2D, Moai, Gideros, MobileLua,
|
||||
and others).
|
||||
support for several Lua engines (LuaJIT, Löve 2D, Moai, Gideros, Corona,
|
||||
MobileLua, GSL-shell, and others). It originated from the [Estrela Editor](http://www.luxinia.de/index.php/Estrela/).
|
||||
|
||||
## Features
|
||||
|
||||
@@ -15,11 +15,11 @@ and others).
|
||||
* Live coding with Lua ([demo](http://notebook.kulchenko.com/zerobrane/live-coding-in-lua-bret-victor-style)), Löve 2D ([demo](http://notebook.kulchenko.com/zerobrane/live-coding-with-love)), and Gideros ([demo](http://notebook.kulchenko.com/zerobrane/gideros-live-coding-with-zerobrane-studio-ide)).
|
||||
* Support for plugin-like components:
|
||||
- applications: overall control of applications settings;
|
||||
- specs (spec/): file syntax, lexer, keywords;
|
||||
- specs (spec/): file syntax, lexer, keywords (e.g. glsl);
|
||||
- apis (api/): for code-completion and tool-tips;
|
||||
- interpreters (interpreters/): how a project is run;
|
||||
- config (cfg/): contains style and basic editor settings;
|
||||
- tools (tools/): additional tools.
|
||||
- tools (tools/): additional tools (e.g. DirectX/Cg shader compiler...).
|
||||
|
||||
## Screenshot
|
||||
|
||||
@@ -29,15 +29,15 @@ and others).
|
||||
|
||||
```
|
||||
Open file(s):
|
||||
<zbstudio> <filename> [<filename>...]
|
||||
zbstudio <filename> [<filename>...]
|
||||
any non-option will be treated as filename
|
||||
|
||||
Overriding default configuration:
|
||||
<zbstudio> -cfg "<luacode overriding config>" [<filename>]
|
||||
zbstudio -cfg "<luacode overriding config>" [<filename>]
|
||||
e.g.: zbstudio -cfg "editor.fontsize=12" somefile.lua
|
||||
|
||||
Loading custom configuration:
|
||||
<zbstudio> -cfg "config/file.lua" [<filename>]
|
||||
zbstudio -cfg config/file.lua [<filename>]
|
||||
e.g.: zbstudio -cfg cfg/estrela.lua
|
||||
```
|
||||
|
||||
@@ -51,6 +51,15 @@ Loading custom configuration:
|
||||
|
||||
**Luxinia Dev:** Christoph Kubisch (crazybutcher@luxinia.de)
|
||||
|
||||
## Where is Estrela?
|
||||
|
||||
The projects have been merged again and zbstudio will lead the future.
|
||||
Please reassociate files with zbstudio. To keep your history of files and
|
||||
projects copy the contents of the `EstrelaEditor.ini` in your HOME directory
|
||||
to `ZeroBraneStudio.ini`. If you have used Estrela for graphics shader
|
||||
authoring or luxinia, create/modify the `cfg/user.lua` to include the content
|
||||
of `cfg/estrela.lua` to load all tools and specifications by default again.
|
||||
|
||||
## License
|
||||
|
||||
See LICENSE file.
|
||||
|
||||
1206
api/lua/baselib.lua
1206
api/lua/baselib.lua
File diff suppressed because it is too large
Load Diff
3795
api/lua/cg30.lua
3795
api/lua/cg30.lua
File diff suppressed because it is too large
Load Diff
@@ -1,572 +0,0 @@
|
||||
--[[// cggl cgGL | Cg OpenGL runtime
|
||||
typedef unsigned int GLuint;
|
||||
typedef unsigned int GLenum;
|
||||
typedef void GLvoid;
|
||||
typedef int GLsizei;
|
||||
typedef int GLint;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
CG_GL_MATRIX_IDENTITY = 0,
|
||||
CG_GL_MATRIX_TRANSPOSE = 1,
|
||||
CG_GL_MATRIX_INVERSE = 2,
|
||||
CG_GL_MATRIX_INVERSE_TRANSPOSE = 3,
|
||||
CG_GL_MODELVIEW_MATRIX = 4,
|
||||
CG_GL_PROJECTION_MATRIX = 5,
|
||||
CG_GL_TEXTURE_MATRIX = 6,
|
||||
CG_GL_MODELVIEW_PROJECTION_MATRIX = 7,
|
||||
CG_GL_VERTEX = 8,
|
||||
CG_GL_FRAGMENT = 9,
|
||||
CG_GL_GEOMETRY = 10,
|
||||
CG_GL_TESSELLATION_CONTROL = 11,
|
||||
CG_GL_TESSELLATION_EVALUATION = 12
|
||||
} CGGLenum;
|
||||
|
||||
CGbool cgGLIsProfileSupported(CGprofile profile);
|
||||
void cgGLEnableProfile(CGprofile profile);
|
||||
void cgGLDisableProfile(CGprofile profile);
|
||||
CGprofile cgGLGetLatestProfile(CGGLenum profile_type);
|
||||
void cgGLSetOptimalOptions(CGprofile profile);
|
||||
char const ** cgGLGetOptimalOptions(CGprofile profile);
|
||||
void cgGLLoadProgram(CGprogram program);
|
||||
void cgGLUnloadProgram(CGprogram program);
|
||||
CGbool cgGLIsProgramLoaded(CGprogram program);
|
||||
void cgGLBindProgram(CGprogram program);
|
||||
void cgGLUnbindProgram(CGprofile profile);
|
||||
GLuint cgGLGetProgramID(CGprogram program);
|
||||
void cgGLSetParameter1f(CGparameter param, float x);
|
||||
void cgGLSetParameter2f(CGparameter param, float x, float y);
|
||||
void cgGLSetParameter3f(CGparameter param, float x, float y, float z);
|
||||
void cgGLSetParameter4f(CGparameter param, float x, float y, float z, float w);
|
||||
void cgGLSetParameter1fv(CGparameter param, const float *v);
|
||||
void cgGLSetParameter2fv(CGparameter param, const float *v);
|
||||
void cgGLSetParameter3fv(CGparameter param, const float *v);
|
||||
void cgGLSetParameter4fv(CGparameter param, const float *v);
|
||||
void cgGLSetParameter1d(CGparameter param, double x);
|
||||
void cgGLSetParameter2d(CGparameter param, double x, double y);
|
||||
void cgGLSetParameter3d(CGparameter param, double x, double y, double z);
|
||||
void cgGLSetParameter4d(CGparameter param, double x, double y, double z, double w);
|
||||
void cgGLSetParameter1dv(CGparameter param, const double *v);
|
||||
void cgGLSetParameter2dv(CGparameter param, const double *v);
|
||||
void cgGLSetParameter3dv(CGparameter param, const double *v);
|
||||
void cgGLSetParameter4dv(CGparameter param, const double *v);
|
||||
void cgGLGetParameter1f(CGparameter param, float *v);
|
||||
void cgGLGetParameter2f(CGparameter param, float *v);
|
||||
void cgGLGetParameter3f(CGparameter param, float *v);
|
||||
void cgGLGetParameter4f(CGparameter param, float *v);
|
||||
void cgGLGetParameter1d(CGparameter param, double *v);
|
||||
void cgGLGetParameter2d(CGparameter param, double *v);
|
||||
void cgGLGetParameter3d(CGparameter param, double *v);
|
||||
void cgGLGetParameter4d(CGparameter param, double *v);
|
||||
void cgGLSetParameterArray1f(CGparameter param, long offset, long nelements, const float *v);
|
||||
void cgGLSetParameterArray2f(CGparameter param, long offset, long nelements, const float *v);
|
||||
void cgGLSetParameterArray3f(CGparameter param, long offset, long nelements, const float *v);
|
||||
void cgGLSetParameterArray4f(CGparameter param, long offset, long nelements, const float *v);
|
||||
void cgGLSetParameterArray1d(CGparameter param, long offset, long nelements, const double *v);
|
||||
void cgGLSetParameterArray2d(CGparameter param, long offset, long nelements, const double *v);
|
||||
void cgGLSetParameterArray3d(CGparameter param, long offset, long nelements, const double *v);
|
||||
void cgGLSetParameterArray4d(CGparameter param, long offset, long nelements, const double *v);
|
||||
void cgGLGetParameterArray1f(CGparameter param, long offset, long nelements, float *v);
|
||||
void cgGLGetParameterArray2f(CGparameter param, long offset, long nelements, float *v);
|
||||
void cgGLGetParameterArray3f(CGparameter param, long offset, long nelements, float *v);
|
||||
void cgGLGetParameterArray4f(CGparameter param, long offset, long nelements, float *v);
|
||||
void cgGLGetParameterArray1d(CGparameter param, long offset, long nelements, double *v);
|
||||
void cgGLGetParameterArray2d(CGparameter param, long offset, long nelements, double *v);
|
||||
void cgGLGetParameterArray3d(CGparameter param, long offset, long nelements, double *v);
|
||||
void cgGLGetParameterArray4d(CGparameter param, long offset, long nelements, double *v);
|
||||
void cgGLSetParameterPointer(CGparameter param, GLint fsize, GLenum type, GLsizei stride, const GLvoid *pointer);
|
||||
void cgGLEnableClientState(CGparameter param);
|
||||
void cgGLDisableClientState(CGparameter param);
|
||||
void cgGLSetMatrixParameterdr(CGparameter param, const double *matrix);
|
||||
void cgGLSetMatrixParameterfr(CGparameter param, const float *matrix);
|
||||
void cgGLSetMatrixParameterdc(CGparameter param, const double *matrix);
|
||||
void cgGLSetMatrixParameterfc(CGparameter param, const float *matrix);
|
||||
void cgGLGetMatrixParameterdr(CGparameter param, double *matrix);
|
||||
void cgGLGetMatrixParameterfr(CGparameter param, float *matrix);
|
||||
void cgGLGetMatrixParameterdc(CGparameter param, double *matrix);
|
||||
void cgGLGetMatrixParameterfc(CGparameter param, float *matrix);
|
||||
void cgGLSetStateMatrixParameter(CGparameter param, CGGLenum matrix, CGGLenum transform);
|
||||
void cgGLSetMatrixParameterArrayfc(CGparameter param, long offset, long nelements, const float *matrices);
|
||||
void cgGLSetMatrixParameterArrayfr(CGparameter param, long offset, long nelements, const float *matrices);
|
||||
void cgGLSetMatrixParameterArraydc(CGparameter param, long offset, long nelements, const double *matrices);
|
||||
void cgGLSetMatrixParameterArraydr(CGparameter param, long offset, long nelements, const double *matrices);
|
||||
void cgGLGetMatrixParameterArrayfc(CGparameter param, long offset, long nelements, float *matrices);
|
||||
void cgGLGetMatrixParameterArrayfr(CGparameter param, long offset, long nelements, float *matrices);
|
||||
void cgGLGetMatrixParameterArraydc(CGparameter param, long offset, long nelements, double *matrices);
|
||||
void cgGLGetMatrixParameterArraydr(CGparameter param, long offset, long nelements, double *matrices);
|
||||
void cgGLSetTextureParameter(CGparameter param, GLuint texobj);
|
||||
GLuint cgGLGetTextureParameter(CGparameter param);
|
||||
void cgGLEnableTextureParameter(CGparameter param);
|
||||
void cgGLDisableTextureParameter(CGparameter param);
|
||||
GLenum cgGLGetTextureEnum(CGparameter param);
|
||||
void cgGLSetManageTextureParameters(CGcontext ctx, CGbool flag);
|
||||
CGbool cgGLGetManageTextureParameters(CGcontext ctx);
|
||||
void cgGLSetupSampler(CGparameter param, GLuint texobj);
|
||||
void cgGLRegisterStates(CGcontext ctx);
|
||||
void cgGLEnableProgramProfiles(CGprogram program);
|
||||
void cgGLDisableProgramProfiles(CGprogram program);
|
||||
void cgGLSetDebugMode(CGbool debug);
|
||||
CGbuffer cgGLCreateBuffer(CGcontext context, int size, const void *data, GLenum bufferUsage);
|
||||
GLuint cgGLGetBufferObject(CGbuffer buffer);
|
||||
|
||||
]]
|
||||
--auto-generated api from ffi headers
|
||||
local api =
|
||||
{
|
||||
["CGGLenum"] = { type ='value', description = "", valuetype = nil, },
|
||||
["CG_GL_MATRIX_IDENTITY"] = { type ='value', },
|
||||
["CG_GL_MATRIX_TRANSPOSE"] = { type ='value', },
|
||||
["CG_GL_MATRIX_INVERSE"] = { type ='value', },
|
||||
["CG_GL_MATRIX_INVERSE_TRANSPOSE"] = { type ='value', },
|
||||
["CG_GL_MODELVIEW_MATRIX"] = { type ='value', },
|
||||
["CG_GL_PROJECTION_MATRIX"] = { type ='value', },
|
||||
["CG_GL_TEXTURE_MATRIX"] = { type ='value', },
|
||||
["CG_GL_MODELVIEW_PROJECTION_MATRIX"] = { type ='value', },
|
||||
["CG_GL_VERTEX"] = { type ='value', },
|
||||
["CG_GL_FRAGMENT"] = { type ='value', },
|
||||
["CG_GL_GEOMETRY"] = { type ='value', },
|
||||
["CG_GL_TESSELLATION_CONTROL"] = { type ='value', },
|
||||
["CG_GL_TESSELLATION_EVALUATION"] = { type ='value', },
|
||||
["cgGLIsProfileSupported"] = { type ='function',
|
||||
description = "",
|
||||
returns = "(CGbool)",
|
||||
valuetype = nil,
|
||||
args = "(CGprofile profile)", },
|
||||
["cgGLEnableProfile"] = { type ='function',
|
||||
description = "",
|
||||
returns = "(void)",
|
||||
valuetype = nil,
|
||||
args = "(CGprofile profile)", },
|
||||
["cgGLDisableProfile"] = { type ='function',
|
||||
description = "",
|
||||
returns = "(void)",
|
||||
valuetype = nil,
|
||||
args = "(CGprofile profile)", },
|
||||
["cgGLGetLatestProfile"] = { type ='function',
|
||||
description = "",
|
||||
returns = "(CGprofile)",
|
||||
valuetype = nil,
|
||||
args = "(CGGLenum profile_type)", },
|
||||
["cgGLSetOptimalOptions"] = { type ='function',
|
||||
description = "",
|
||||
returns = "(void)",
|
||||
valuetype = nil,
|
||||
args = "(CGprofile profile)", },
|
||||
["cgGLGetOptimalOptions"] = { type ='function',
|
||||
description = "",
|
||||
returns = "(char const **)",
|
||||
valuetype = nil,
|
||||
args = "(CGprofile profile)", },
|
||||
["cgGLLoadProgram"] = { type ='function',
|
||||
description = "",
|
||||
returns = "(void)",
|
||||
valuetype = nil,
|
||||
args = "(CGprogram program)", },
|
||||
["cgGLUnloadProgram"] = { type ='function',
|
||||
description = "",
|
||||
returns = "(void)",
|
||||
valuetype = nil,
|
||||
args = "(CGprogram program)", },
|
||||
["cgGLIsProgramLoaded"] = { type ='function',
|
||||
description = "",
|
||||
returns = "(CGbool)",
|
||||
valuetype = nil,
|
||||
args = "(CGprogram program)", },
|
||||
["cgGLBindProgram"] = { type ='function',
|
||||
description = "",
|
||||
returns = "(void)",
|
||||
valuetype = nil,
|
||||
args = "(CGprogram program)", },
|
||||
["cgGLUnbindProgram"] = { type ='function',
|
||||
description = "",
|
||||
returns = "(void)",
|
||||
valuetype = nil,
|
||||
args = "(CGprofile profile)", },
|
||||
["cgGLGetProgramID"] = { type ='function',
|
||||
description = "",
|
||||
returns = "(GLuint)",
|
||||
valuetype = nil,
|
||||
args = "(CGprogram program)", },
|
||||
["cgGLSetParameter1f"] = { type ='function',
|
||||
description = "",
|
||||
returns = "(void)",
|
||||
valuetype = nil,
|
||||
args = "(CGparameter param, float x)", },
|
||||
["cgGLSetParameter2f"] = { type ='function',
|
||||
description = "",
|
||||
returns = "(void)",
|
||||
valuetype = nil,
|
||||
args = "(CGparameter param, float x, float y)", },
|
||||
["cgGLSetParameter3f"] = { type ='function',
|
||||
description = "",
|
||||
returns = "(void)",
|
||||
valuetype = nil,
|
||||
args = "(CGparameter param, float x, float y, float z)", },
|
||||
["cgGLSetParameter4f"] = { type ='function',
|
||||
description = "",
|
||||
returns = "(void)",
|
||||
valuetype = nil,
|
||||
args = "(CGparameter param, float x, float y, float z, float w)", },
|
||||
["cgGLSetParameter1fv"] = { type ='function',
|
||||
description = "",
|
||||
returns = "(void)",
|
||||
valuetype = nil,
|
||||
args = "(CGparameter param, const float *v)", },
|
||||
["cgGLSetParameter2fv"] = { type ='function',
|
||||
description = "",
|
||||
returns = "(void)",
|
||||
valuetype = nil,
|
||||
args = "(CGparameter param, const float *v)", },
|
||||
["cgGLSetParameter3fv"] = { type ='function',
|
||||
description = "",
|
||||
returns = "(void)",
|
||||
valuetype = nil,
|
||||
args = "(CGparameter param, const float *v)", },
|
||||
["cgGLSetParameter4fv"] = { type ='function',
|
||||
description = "",
|
||||
returns = "(void)",
|
||||
valuetype = nil,
|
||||
args = "(CGparameter param, const float *v)", },
|
||||
["cgGLSetParameter1d"] = { type ='function',
|
||||
description = "",
|
||||
returns = "(void)",
|
||||
valuetype = nil,
|
||||
args = "(CGparameter param, double x)", },
|
||||
["cgGLSetParameter2d"] = { type ='function',
|
||||
description = "",
|
||||
returns = "(void)",
|
||||
valuetype = nil,
|
||||
args = "(CGparameter param, double x, double y)", },
|
||||
["cgGLSetParameter3d"] = { type ='function',
|
||||
description = "",
|
||||
returns = "(void)",
|
||||
valuetype = nil,
|
||||
args = "(CGparameter param, double x, double y, double z)", },
|
||||
["cgGLSetParameter4d"] = { type ='function',
|
||||
description = "",
|
||||
returns = "(void)",
|
||||
valuetype = nil,
|
||||
args = "(CGparameter param, double x, double y, double z, double w)", },
|
||||
["cgGLSetParameter1dv"] = { type ='function',
|
||||
description = "",
|
||||
returns = "(void)",
|
||||
valuetype = nil,
|
||||
args = "(CGparameter param, const double *v)", },
|
||||
["cgGLSetParameter2dv"] = { type ='function',
|
||||
description = "",
|
||||
returns = "(void)",
|
||||
valuetype = nil,
|
||||
args = "(CGparameter param, const double *v)", },
|
||||
["cgGLSetParameter3dv"] = { type ='function',
|
||||
description = "",
|
||||
returns = "(void)",
|
||||
valuetype = nil,
|
||||
args = "(CGparameter param, const double *v)", },
|
||||
["cgGLSetParameter4dv"] = { type ='function',
|
||||
description = "",
|
||||
returns = "(void)",
|
||||
valuetype = nil,
|
||||
args = "(CGparameter param, const double *v)", },
|
||||
["cgGLGetParameter1f"] = { type ='function',
|
||||
description = "",
|
||||
returns = "(void)",
|
||||
valuetype = nil,
|
||||
args = "(CGparameter param, float *v)", },
|
||||
["cgGLGetParameter2f"] = { type ='function',
|
||||
description = "",
|
||||
returns = "(void)",
|
||||
valuetype = nil,
|
||||
args = "(CGparameter param, float *v)", },
|
||||
["cgGLGetParameter3f"] = { type ='function',
|
||||
description = "",
|
||||
returns = "(void)",
|
||||
valuetype = nil,
|
||||
args = "(CGparameter param, float *v)", },
|
||||
["cgGLGetParameter4f"] = { type ='function',
|
||||
description = "",
|
||||
returns = "(void)",
|
||||
valuetype = nil,
|
||||
args = "(CGparameter param, float *v)", },
|
||||
["cgGLGetParameter1d"] = { type ='function',
|
||||
description = "",
|
||||
returns = "(void)",
|
||||
valuetype = nil,
|
||||
args = "(CGparameter param, double *v)", },
|
||||
["cgGLGetParameter2d"] = { type ='function',
|
||||
description = "",
|
||||
returns = "(void)",
|
||||
valuetype = nil,
|
||||
args = "(CGparameter param, double *v)", },
|
||||
["cgGLGetParameter3d"] = { type ='function',
|
||||
description = "",
|
||||
returns = "(void)",
|
||||
valuetype = nil,
|
||||
args = "(CGparameter param, double *v)", },
|
||||
["cgGLGetParameter4d"] = { type ='function',
|
||||
description = "",
|
||||
returns = "(void)",
|
||||
valuetype = nil,
|
||||
args = "(CGparameter param, double *v)", },
|
||||
["cgGLSetParameterArray1f"] = { type ='function',
|
||||
description = "",
|
||||
returns = "(void)",
|
||||
valuetype = nil,
|
||||
args = "(CGparameter param, long offset, long nelements, const float *v)", },
|
||||
["cgGLSetParameterArray2f"] = { type ='function',
|
||||
description = "",
|
||||
returns = "(void)",
|
||||
valuetype = nil,
|
||||
args = "(CGparameter param, long offset, long nelements, const float *v)", },
|
||||
["cgGLSetParameterArray3f"] = { type ='function',
|
||||
description = "",
|
||||
returns = "(void)",
|
||||
valuetype = nil,
|
||||
args = "(CGparameter param, long offset, long nelements, const float *v)", },
|
||||
["cgGLSetParameterArray4f"] = { type ='function',
|
||||
description = "",
|
||||
returns = "(void)",
|
||||
valuetype = nil,
|
||||
args = "(CGparameter param, long offset, long nelements, const float *v)", },
|
||||
["cgGLSetParameterArray1d"] = { type ='function',
|
||||
description = "",
|
||||
returns = "(void)",
|
||||
valuetype = nil,
|
||||
args = "(CGparameter param, long offset, long nelements, const double *v)", },
|
||||
["cgGLSetParameterArray2d"] = { type ='function',
|
||||
description = "",
|
||||
returns = "(void)",
|
||||
valuetype = nil,
|
||||
args = "(CGparameter param, long offset, long nelements, const double *v)", },
|
||||
["cgGLSetParameterArray3d"] = { type ='function',
|
||||
description = "",
|
||||
returns = "(void)",
|
||||
valuetype = nil,
|
||||
args = "(CGparameter param, long offset, long nelements, const double *v)", },
|
||||
["cgGLSetParameterArray4d"] = { type ='function',
|
||||
description = "",
|
||||
returns = "(void)",
|
||||
valuetype = nil,
|
||||
args = "(CGparameter param, long offset, long nelements, const double *v)", },
|
||||
["cgGLGetParameterArray1f"] = { type ='function',
|
||||
description = "",
|
||||
returns = "(void)",
|
||||
valuetype = nil,
|
||||
args = "(CGparameter param, long offset, long nelements, float *v)", },
|
||||
["cgGLGetParameterArray2f"] = { type ='function',
|
||||
description = "",
|
||||
returns = "(void)",
|
||||
valuetype = nil,
|
||||
args = "(CGparameter param, long offset, long nelements, float *v)", },
|
||||
["cgGLGetParameterArray3f"] = { type ='function',
|
||||
description = "",
|
||||
returns = "(void)",
|
||||
valuetype = nil,
|
||||
args = "(CGparameter param, long offset, long nelements, float *v)", },
|
||||
["cgGLGetParameterArray4f"] = { type ='function',
|
||||
description = "",
|
||||
returns = "(void)",
|
||||
valuetype = nil,
|
||||
args = "(CGparameter param, long offset, long nelements, float *v)", },
|
||||
["cgGLGetParameterArray1d"] = { type ='function',
|
||||
description = "",
|
||||
returns = "(void)",
|
||||
valuetype = nil,
|
||||
args = "(CGparameter param, long offset, long nelements, double *v)", },
|
||||
["cgGLGetParameterArray2d"] = { type ='function',
|
||||
description = "",
|
||||
returns = "(void)",
|
||||
valuetype = nil,
|
||||
args = "(CGparameter param, long offset, long nelements, double *v)", },
|
||||
["cgGLGetParameterArray3d"] = { type ='function',
|
||||
description = "",
|
||||
returns = "(void)",
|
||||
valuetype = nil,
|
||||
args = "(CGparameter param, long offset, long nelements, double *v)", },
|
||||
["cgGLGetParameterArray4d"] = { type ='function',
|
||||
description = "",
|
||||
returns = "(void)",
|
||||
valuetype = nil,
|
||||
args = "(CGparameter param, long offset, long nelements, double *v)", },
|
||||
["cgGLSetParameterPointer"] = { type ='function',
|
||||
description = "",
|
||||
returns = "(void)",
|
||||
valuetype = nil,
|
||||
args = "(CGparameter param, GLint fsize, GLenum type, GLsizei stride, const GLvoid *pointer)", },
|
||||
["cgGLEnableClientState"] = { type ='function',
|
||||
description = "",
|
||||
returns = "(void)",
|
||||
valuetype = nil,
|
||||
args = "(CGparameter param)", },
|
||||
["cgGLDisableClientState"] = { type ='function',
|
||||
description = "",
|
||||
returns = "(void)",
|
||||
valuetype = nil,
|
||||
args = "(CGparameter param)", },
|
||||
["cgGLSetMatrixParameterdr"] = { type ='function',
|
||||
description = "",
|
||||
returns = "(void)",
|
||||
valuetype = nil,
|
||||
args = "(CGparameter param, const double *matrix)", },
|
||||
["cgGLSetMatrixParameterfr"] = { type ='function',
|
||||
description = "",
|
||||
returns = "(void)",
|
||||
valuetype = nil,
|
||||
args = "(CGparameter param, const float *matrix)", },
|
||||
["cgGLSetMatrixParameterdc"] = { type ='function',
|
||||
description = "",
|
||||
returns = "(void)",
|
||||
valuetype = nil,
|
||||
args = "(CGparameter param, const double *matrix)", },
|
||||
["cgGLSetMatrixParameterfc"] = { type ='function',
|
||||
description = "",
|
||||
returns = "(void)",
|
||||
valuetype = nil,
|
||||
args = "(CGparameter param, const float *matrix)", },
|
||||
["cgGLGetMatrixParameterdr"] = { type ='function',
|
||||
description = "",
|
||||
returns = "(void)",
|
||||
valuetype = nil,
|
||||
args = "(CGparameter param, double *matrix)", },
|
||||
["cgGLGetMatrixParameterfr"] = { type ='function',
|
||||
description = "",
|
||||
returns = "(void)",
|
||||
valuetype = nil,
|
||||
args = "(CGparameter param, float *matrix)", },
|
||||
["cgGLGetMatrixParameterdc"] = { type ='function',
|
||||
description = "",
|
||||
returns = "(void)",
|
||||
valuetype = nil,
|
||||
args = "(CGparameter param, double *matrix)", },
|
||||
["cgGLGetMatrixParameterfc"] = { type ='function',
|
||||
description = "",
|
||||
returns = "(void)",
|
||||
valuetype = nil,
|
||||
args = "(CGparameter param, float *matrix)", },
|
||||
["cgGLSetStateMatrixParameter"] = { type ='function',
|
||||
description = "",
|
||||
returns = "(void)",
|
||||
valuetype = nil,
|
||||
args = "(CGparameter param, CGGLenum matrix, CGGLenum transform)", },
|
||||
["cgGLSetMatrixParameterArrayfc"] = { type ='function',
|
||||
description = "",
|
||||
returns = "(void)",
|
||||
valuetype = nil,
|
||||
args = "(CGparameter param, long offset, long nelements, const float *matrices)", },
|
||||
["cgGLSetMatrixParameterArrayfr"] = { type ='function',
|
||||
description = "",
|
||||
returns = "(void)",
|
||||
valuetype = nil,
|
||||
args = "(CGparameter param, long offset, long nelements, const float *matrices)", },
|
||||
["cgGLSetMatrixParameterArraydc"] = { type ='function',
|
||||
description = "",
|
||||
returns = "(void)",
|
||||
valuetype = nil,
|
||||
args = "(CGparameter param, long offset, long nelements, const double *matrices)", },
|
||||
["cgGLSetMatrixParameterArraydr"] = { type ='function',
|
||||
description = "",
|
||||
returns = "(void)",
|
||||
valuetype = nil,
|
||||
args = "(CGparameter param, long offset, long nelements, const double *matrices)", },
|
||||
["cgGLGetMatrixParameterArrayfc"] = { type ='function',
|
||||
description = "",
|
||||
returns = "(void)",
|
||||
valuetype = nil,
|
||||
args = "(CGparameter param, long offset, long nelements, float *matrices)", },
|
||||
["cgGLGetMatrixParameterArrayfr"] = { type ='function',
|
||||
description = "",
|
||||
returns = "(void)",
|
||||
valuetype = nil,
|
||||
args = "(CGparameter param, long offset, long nelements, float *matrices)", },
|
||||
["cgGLGetMatrixParameterArraydc"] = { type ='function',
|
||||
description = "",
|
||||
returns = "(void)",
|
||||
valuetype = nil,
|
||||
args = "(CGparameter param, long offset, long nelements, double *matrices)", },
|
||||
["cgGLGetMatrixParameterArraydr"] = { type ='function',
|
||||
description = "",
|
||||
returns = "(void)",
|
||||
valuetype = nil,
|
||||
args = "(CGparameter param, long offset, long nelements, double *matrices)", },
|
||||
["cgGLSetTextureParameter"] = { type ='function',
|
||||
description = "",
|
||||
returns = "(void)",
|
||||
valuetype = nil,
|
||||
args = "(CGparameter param, GLuint texobj)", },
|
||||
["cgGLGetTextureParameter"] = { type ='function',
|
||||
description = "",
|
||||
returns = "(GLuint)",
|
||||
valuetype = nil,
|
||||
args = "(CGparameter param)", },
|
||||
["cgGLEnableTextureParameter"] = { type ='function',
|
||||
description = "",
|
||||
returns = "(void)",
|
||||
valuetype = nil,
|
||||
args = "(CGparameter param)", },
|
||||
["cgGLDisableTextureParameter"] = { type ='function',
|
||||
description = "",
|
||||
returns = "(void)",
|
||||
valuetype = nil,
|
||||
args = "(CGparameter param)", },
|
||||
["cgGLGetTextureEnum"] = { type ='function',
|
||||
description = "",
|
||||
returns = "(GLenum)",
|
||||
valuetype = nil,
|
||||
args = "(CGparameter param)", },
|
||||
["cgGLSetManageTextureParameters"] = { type ='function',
|
||||
description = "",
|
||||
returns = "(void)",
|
||||
valuetype = nil,
|
||||
args = "(CGcontext ctx, CGbool flag)", },
|
||||
["cgGLGetManageTextureParameters"] = { type ='function',
|
||||
description = "",
|
||||
returns = "(CGbool)",
|
||||
valuetype = nil,
|
||||
args = "(CGcontext ctx)", },
|
||||
["cgGLSetupSampler"] = { type ='function',
|
||||
description = "",
|
||||
returns = "(void)",
|
||||
valuetype = nil,
|
||||
args = "(CGparameter param, GLuint texobj)", },
|
||||
["cgGLRegisterStates"] = { type ='function',
|
||||
description = "",
|
||||
returns = "(void)",
|
||||
valuetype = nil,
|
||||
args = "(CGcontext ctx)", },
|
||||
["cgGLEnableProgramProfiles"] = { type ='function',
|
||||
description = "",
|
||||
returns = "(void)",
|
||||
valuetype = nil,
|
||||
args = "(CGprogram program)", },
|
||||
["cgGLDisableProgramProfiles"] = { type ='function',
|
||||
description = "",
|
||||
returns = "(void)",
|
||||
valuetype = nil,
|
||||
args = "(CGprogram program)", },
|
||||
["cgGLSetDebugMode"] = { type ='function',
|
||||
description = "",
|
||||
returns = "(void)",
|
||||
valuetype = nil,
|
||||
args = "(CGbool debug)", },
|
||||
["cgGLCreateBuffer"] = { type ='function',
|
||||
description = "",
|
||||
returns = "(CGbuffer)",
|
||||
valuetype = nil,
|
||||
args = "(CGcontext context, int size, const void *data, GLenum bufferUsage)", },
|
||||
["cgGLGetBufferObject"] = { type ='function',
|
||||
description = "",
|
||||
returns = "(GLuint)",
|
||||
valuetype = nil,
|
||||
args = "(CGbuffer buffer)", },
|
||||
}
|
||||
return {
|
||||
cggl = {
|
||||
type = 'lib',
|
||||
description = "Cg OpenGL runtime",
|
||||
childs = api,
|
||||
},
|
||||
cgGL = {
|
||||
type = 'lib',
|
||||
description = "Cg OpenGL runtime",
|
||||
childs = api,
|
||||
},
|
||||
}
|
||||
1510
api/lua/corona.lua
Normal file
1510
api/lua/corona.lua
Normal file
File diff suppressed because it is too large
Load Diff
1422
api/lua/cuda32.lua
1422
api/lua/cuda32.lua
File diff suppressed because it is too large
Load Diff
@@ -1,79 +0,0 @@
|
||||
--[[// cugl cuGL | Cuda GL Interop
|
||||
/*
|
||||
* Copyright 1993-2010 NVIDIA Corporation. All rights reserved.
|
||||
*
|
||||
* NOTICE TO USER:
|
||||
*
|
||||
* This source code is subject to NVIDIA ownership rights under U.S. and
|
||||
* international Copyright laws. Users and possessors of this source code
|
||||
* are hereby granted a nonexclusive, royalty-free license to use this code
|
||||
* in individual and commercial software.
|
||||
*
|
||||
* NVIDIA MAKES NO REPRESENTATION ABOUT THE SUITABILITY OF THIS SOURCE
|
||||
* CODE FOR ANY PURPOSE. IT IS PROVIDED "AS IS" WITHOUT EXPRESS OR
|
||||
* IMPLIED WARRANTY OF ANY KIND. NVIDIA DISCLAIMS ALL WARRANTIES WITH
|
||||
* REGARD TO THIS SOURCE CODE, INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
* IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL,
|
||||
* OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
|
||||
* OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
|
||||
* OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE
|
||||
* OR PERFORMANCE OF THIS SOURCE CODE.
|
||||
*
|
||||
* U.S. Government End Users. This source code is a "commercial item" as
|
||||
* that term is defined at 48 C.F.R. 2.101 (OCT 1995), consisting of
|
||||
* "commercial computer software" and "commercial computer software
|
||||
* documentation" as such terms are used in 48 C.F.R. 12.212 (SEPT 1995)
|
||||
* and is provided to the U.S. Government only as a commercial end item.
|
||||
* Consistent with 48 C.F.R.12.212 and 48 C.F.R. 227.7202-1 through
|
||||
* 227.7202-4 (JUNE 1995), all U.S. Government End Users acquire the
|
||||
* source code with only those rights set forth herein.
|
||||
*
|
||||
* Any use of this source code in individual and commercial software must
|
||||
* include, in the user documentation and internal comments to the code,
|
||||
* the above Disclaimer and U.S. Government End Users Notice.
|
||||
*/
|
||||
|
||||
CUresult cuGLCtxCreate_v2(CUcontext *pCtx, unsigned int Flags, CUdevice device );
|
||||
CUresult cuGraphicsGLRegisterBuffer(CUgraphicsResource *pCudaResource, GLuint buffer, unsigned int Flags);
|
||||
CUresult cuGraphicsGLRegisterImage(CUgraphicsResource *pCudaResource, GLuint image, GLenum target, unsigned int Flags);
|
||||
|
||||
typedef void* HGPUNV;
|
||||
CUresult cuWGLGetDevice(CUdevice *pDevice, HGPUNV hGpu);
|
||||
]]
|
||||
--auto-generated api from ffi headers
|
||||
local api =
|
||||
{
|
||||
["cuGLCtxCreate_v2"] = { type ='function',
|
||||
description = "",
|
||||
returns = "(CUresult)",
|
||||
valuetype = nil,
|
||||
args = "(CUcontext *pCtx, unsigned int Flags, CUdevice device)", },
|
||||
["cuGraphicsGLRegisterBuffer"] = { type ='function',
|
||||
description = "",
|
||||
returns = "(CUresult)",
|
||||
valuetype = nil,
|
||||
args = "(CUgraphicsResource *pCudaResource, GLuint buffer, unsigned int Flags)", },
|
||||
["cuGraphicsGLRegisterImage"] = { type ='function',
|
||||
description = "",
|
||||
returns = "(CUresult)",
|
||||
valuetype = nil,
|
||||
args = "(CUgraphicsResource *pCudaResource, GLuint image, GLenum target, unsigned int Flags)", },
|
||||
["cuWGLGetDevice"] = { type ='function',
|
||||
description = "",
|
||||
returns = "(CUresult)",
|
||||
valuetype = nil,
|
||||
args = "(CUdevice *pDevice, HGPUNV hGpu)", },
|
||||
}
|
||||
return {
|
||||
cugl = {
|
||||
type = 'lib',
|
||||
description = "Cuda GL Interop",
|
||||
childs = api,
|
||||
},
|
||||
cuGL = {
|
||||
type = 'lib',
|
||||
description = "Cuda GL Interop",
|
||||
childs = api,
|
||||
},
|
||||
}
|
||||
@@ -1,3 +1,5 @@
|
||||
-- Copyright 2011-12 Paul Kulchenko, ZeroBrane LLC
|
||||
|
||||
-- converted from Resources/gideros_annot.api.
|
||||
-- the conversion script is at the bottom of this file.
|
||||
|
||||
|
||||
@@ -1,12 +1,37 @@
|
||||
-- Copyright 2011-12 Paul Kulchenko, ZeroBrane LLC
|
||||
|
||||
-- converted from love_api.lua (https://love2d.org/forums/viewtopic.php?f=3&t=1796&start=30)
|
||||
-- (as of Nov 1, 2012)
|
||||
-- the conversion script is at the bottom of this file
|
||||
-- there were several manual changes done to the "thread" methods that had
|
||||
-- incorrect structure (demand, set, and few others)
|
||||
-- manually removed "linear clamped", "exponent clamped", and "inverse clamped"
|
||||
-- values as those can't be entered through auto-complete.
|
||||
|
||||
local love = {
|
||||
childs = {
|
||||
audio = {
|
||||
childs = {
|
||||
DistanceModel = {
|
||||
childs = {
|
||||
exponent = {
|
||||
description = "Exponential attenuation.",
|
||||
type = "value"
|
||||
},
|
||||
inverse = {
|
||||
description = "Inverse distance attenuation.",
|
||||
type = "value"
|
||||
},
|
||||
linear = {
|
||||
description = "Linear attenuation.",
|
||||
type = "value"
|
||||
},
|
||||
none = {
|
||||
description = "Sources do not get attenuated.",
|
||||
type = "value"
|
||||
}
|
||||
},
|
||||
description = "class constants",
|
||||
type = "class"
|
||||
},
|
||||
Source = {
|
||||
childs = {
|
||||
getDirection = {
|
||||
@@ -18,7 +43,7 @@ local love = {
|
||||
getDistance = {
|
||||
args = "()",
|
||||
description = "Returns the reference and maximum distance of the source.",
|
||||
returns = "(ref: string, max: string)",
|
||||
returns = "(ref: number, max: number)",
|
||||
type = "function"
|
||||
},
|
||||
getPitch = {
|
||||
@@ -33,6 +58,12 @@ local love = {
|
||||
returns = "(x: number, y: number, z: number)",
|
||||
type = "function"
|
||||
},
|
||||
getRolloff = {
|
||||
args = "()",
|
||||
description = "Returns the rolloff factor of the source.",
|
||||
returns = "(rolloff: number)",
|
||||
type = "function"
|
||||
},
|
||||
getVelocity = {
|
||||
args = "()",
|
||||
description = "Gets the velocity of the Source.",
|
||||
@@ -45,6 +76,12 @@ local love = {
|
||||
returns = "(volume: number)",
|
||||
type = "function"
|
||||
},
|
||||
getVolumeLimits = {
|
||||
args = "()",
|
||||
description = "Returns the volume limits of the source.",
|
||||
returns = "(min: number, max: number)",
|
||||
type = "function"
|
||||
},
|
||||
isLooping = {
|
||||
args = "()",
|
||||
description = "Returns whether the Source will loop.",
|
||||
@@ -105,6 +142,12 @@ local love = {
|
||||
returns = "()",
|
||||
type = "function"
|
||||
},
|
||||
setDistance = {
|
||||
args = "(ref: number, max: number)",
|
||||
description = "Sets the reference and maximum distance of the source.",
|
||||
returns = "()",
|
||||
type = "function"
|
||||
},
|
||||
setLooping = {
|
||||
args = "(loop: boolean)",
|
||||
description = "Sets whether the Source should loop.",
|
||||
@@ -123,6 +166,12 @@ local love = {
|
||||
returns = "()",
|
||||
type = "function"
|
||||
},
|
||||
setRolloff = {
|
||||
args = "(rolloff: number)",
|
||||
description = "Sets the rolloff factor.",
|
||||
returns = "()",
|
||||
type = "function"
|
||||
},
|
||||
setVelocity = {
|
||||
args = "(x: number, y: number, z: number)",
|
||||
description = "Sets the velocity of the Source.\n\nThis does not change the position of the Source, but lets the application know how it has to calculate the doppler effect.",
|
||||
@@ -135,6 +184,12 @@ local love = {
|
||||
returns = "()",
|
||||
type = "function"
|
||||
},
|
||||
setVolumeLimits = {
|
||||
args = "(min: number, max: number)",
|
||||
description = "Sets the volume limits of the source. The limits have to be numbers from 0 to 1.",
|
||||
returns = "()",
|
||||
type = "function"
|
||||
},
|
||||
stop = {
|
||||
args = "()",
|
||||
description = "Stops a Source.",
|
||||
@@ -143,7 +198,7 @@ local love = {
|
||||
},
|
||||
tell = {
|
||||
args = "(unit: TimeUnit)",
|
||||
description = "Stops a Source.",
|
||||
description = "Gets the currently playing position of the Source.",
|
||||
returns = "(position: number)",
|
||||
type = "function"
|
||||
}
|
||||
@@ -182,7 +237,7 @@ local love = {
|
||||
getDistanceModel = {
|
||||
args = "()",
|
||||
description = "Returns the distance attenuation model.",
|
||||
returns = "(model: string)",
|
||||
returns = "(model: DistanceModel)",
|
||||
type = "function"
|
||||
},
|
||||
getNumSources = {
|
||||
@@ -216,7 +271,7 @@ local love = {
|
||||
type = "function"
|
||||
},
|
||||
newSource = {
|
||||
args = "(file: string, type: SourceType)",
|
||||
args = "(filename: string, type: SourceType)",
|
||||
description = "Creates a new Source from a file, SoundData, or Decoder. Sources created from SoundData are always static.",
|
||||
returns = "(source: Source)",
|
||||
type = "function"
|
||||
@@ -246,7 +301,7 @@ local love = {
|
||||
type = "function"
|
||||
},
|
||||
setDistanceModel = {
|
||||
args = "(model: string)",
|
||||
args = "(model: DistanceModel)",
|
||||
description = "Sets the distance attenuation model.",
|
||||
returns = "()",
|
||||
type = "function"
|
||||
@@ -312,7 +367,7 @@ local love = {
|
||||
type = "value"
|
||||
},
|
||||
keyreleased = {
|
||||
description = "Key releaed",
|
||||
description = "Key released",
|
||||
type = "value"
|
||||
},
|
||||
mousepressed = {
|
||||
@@ -364,7 +419,7 @@ local love = {
|
||||
wait = {
|
||||
args = "()",
|
||||
description = "Like love.event.poll(), but blocks until there is an event in the queue.",
|
||||
returns = "(e: Event, a: mixed, b: mixed, c: mixed)",
|
||||
returns = "(e: Event, a: mixed, b: mixed, c: mixed, d: mixed)",
|
||||
type = "function"
|
||||
}
|
||||
},
|
||||
@@ -412,7 +467,7 @@ local love = {
|
||||
type = "function"
|
||||
},
|
||||
seek = {
|
||||
args = "(pos: number)",
|
||||
args = "(position: number)",
|
||||
description = "Seek to a position in a file.",
|
||||
returns = "(success: boolean)",
|
||||
type = "function"
|
||||
@@ -575,7 +630,7 @@ local love = {
|
||||
},
|
||||
remove = {
|
||||
args = "(name: string)",
|
||||
description = "Removes a file (or directory).",
|
||||
description = "Removes a file or directory.",
|
||||
returns = "(ok: boolean)",
|
||||
type = "function"
|
||||
},
|
||||
@@ -618,7 +673,7 @@ local love = {
|
||||
type = "value"
|
||||
},
|
||||
Rasterizer = {
|
||||
description = "A Rasterizer handles font rendering, containing the font data (image or true-type font) and drawable glyphs.",
|
||||
description = "A Rasterizer handles font rendering, containing the font data (image or TrueType font font) and drawable glyphs.",
|
||||
type = "value"
|
||||
},
|
||||
newFontData = {
|
||||
@@ -665,20 +720,24 @@ local love = {
|
||||
},
|
||||
BlendMode = {
|
||||
childs = {
|
||||
canvas = {
|
||||
description = "Support for Canvas.",
|
||||
additive = {
|
||||
description = "Additive blend mode.",
|
||||
type = "value"
|
||||
},
|
||||
npot = {
|
||||
description = "Support for textures with non-power-of-two textures. See PO2 Syndrome.",
|
||||
alpha = {
|
||||
description = "Alpha blend mode (\"normal\").",
|
||||
type = "value"
|
||||
},
|
||||
pixeleffect = {
|
||||
description = "Support for PixelEffect.",
|
||||
multiplicative = {
|
||||
description = "Multiply blend mode.",
|
||||
type = "value"
|
||||
},
|
||||
premultiplied = {
|
||||
description = "Premultiplied blend mode.",
|
||||
type = "value"
|
||||
},
|
||||
subtractive = {
|
||||
description = "Support for the subtractive blend mode.",
|
||||
description = "Subtractive blend mode.",
|
||||
type = "value"
|
||||
}
|
||||
},
|
||||
@@ -693,6 +752,12 @@ local love = {
|
||||
returns = "()",
|
||||
type = "function"
|
||||
},
|
||||
getFilter = {
|
||||
args = "()",
|
||||
description = "Gets the filter mode of the Canvas.",
|
||||
returns = "(min: FilterMode, mag: FilterMode)",
|
||||
type = "function"
|
||||
},
|
||||
getImageData = {
|
||||
args = "()",
|
||||
description = "Returns the image data stored in the Canvas. Think of it as taking a screenshot of the hidden screen that is the Canvas.",
|
||||
@@ -711,6 +776,12 @@ local love = {
|
||||
returns = "()",
|
||||
type = "function"
|
||||
},
|
||||
setFilter = {
|
||||
args = "(min: FilterMode, mag: FilterMode)",
|
||||
description = "Sets the filter of the Canvas.",
|
||||
returns = "()",
|
||||
type = "function"
|
||||
},
|
||||
setWrap = {
|
||||
args = "(horiz: WrapMode, vert: WrapMode)",
|
||||
description = "Sets the wrapping properties of a Canvas.\n\n This function sets the way the edges of a Canvas are treated if it is scaled or rotated. If the WrapMode is set to \"clamp\", the edge will not be interpolated. If set to \"repeat\", the edge will be interpolated with the pixels on the opposing side of the framebuffer.",
|
||||
@@ -799,6 +870,28 @@ local love = {
|
||||
description = "Defines the shape of characters than can be drawn onto the screen.",
|
||||
type = "lib"
|
||||
},
|
||||
GraphicsFeature = {
|
||||
childs = {
|
||||
canvas = {
|
||||
description = "Support for Canvas.",
|
||||
type = "value"
|
||||
},
|
||||
npot = {
|
||||
description = "Support for textures with non-power-of-two textures.",
|
||||
type = "value"
|
||||
},
|
||||
pixeleffect = {
|
||||
description = "Support for PixelEffect.",
|
||||
type = "value"
|
||||
},
|
||||
subtractive = {
|
||||
description = "Support for the subtractive blend mode.",
|
||||
type = "value"
|
||||
}
|
||||
},
|
||||
description = "class constants",
|
||||
type = "class"
|
||||
},
|
||||
Image = {
|
||||
childs = {
|
||||
getFilter = {
|
||||
@@ -1118,21 +1211,21 @@ local love = {
|
||||
type = "function"
|
||||
}
|
||||
},
|
||||
description = "A quadrilateral with texture coordinate information.\n\nQuads can be used to select part of a texture to draw. In this way, one large Texture Atlas can be loaded, and then split up into sub-images.",
|
||||
description = "A quadrilateral with texture coordinate information.\n\nQuads can be used to select part of a texture to draw. In this way, one large texture atlas can be loaded, and then split up into sub-images.",
|
||||
type = "lib"
|
||||
},
|
||||
SpriteBatch = {
|
||||
childs = {
|
||||
add = {
|
||||
args = "(x: number, y: number, r: number, sx: number, sy: number, ox: number, oy: number)",
|
||||
args = "(x: number, y: number, r: number, sx: number, sy: number, ox: number, oy: number, kx: number, ky: number)",
|
||||
description = "Add a sprite to the batch.",
|
||||
returns = "()",
|
||||
returns = "(id: number)",
|
||||
type = "function"
|
||||
},
|
||||
addq = {
|
||||
args = "()",
|
||||
description = "Add a Quad to the batch.",
|
||||
returns = "(quad: Quad, x: number, y: number, r: number, sx: number, sy: number, ox: number, oy: number)",
|
||||
returns = "(id: number)",
|
||||
type = "function"
|
||||
},
|
||||
bind = {
|
||||
@@ -1147,12 +1240,36 @@ local love = {
|
||||
returns = "()",
|
||||
type = "function"
|
||||
},
|
||||
getImage = {
|
||||
args = "()",
|
||||
description = "Returns the image used by the SpriteBatch.",
|
||||
returns = "(image: Image)",
|
||||
type = "function"
|
||||
},
|
||||
set = {
|
||||
args = "()",
|
||||
description = "Changes a sprite in the batch. This requires the identifier returned by add and addq.",
|
||||
returns = "(id: number, x: number, y: number, r: number, sx: number, sy: number, ox: number, oy: number, kx: number, ky: number)",
|
||||
type = "function"
|
||||
},
|
||||
setColor = {
|
||||
args = "(r: number, g: number, b: number, a: number)",
|
||||
description = "Sets the color that will be used for the next add and set operations. Calling the function without arguments will clear the color.\n\nThe global color set with love.graphics.setColor will not work on the SpriteBatch if any of the sprites has its own color.",
|
||||
returns = "()",
|
||||
type = "function"
|
||||
},
|
||||
setImage = {
|
||||
args = "(image: Image)",
|
||||
description = "Replaces the image used for the sprites.",
|
||||
returns = "()",
|
||||
type = "function"
|
||||
},
|
||||
setq = {
|
||||
args = "()",
|
||||
description = "Changes a sprite with a quad in the batch. This requires the identifier returned by add and addq.",
|
||||
returns = "(id: number)",
|
||||
type = "function"
|
||||
},
|
||||
unbind = {
|
||||
args = "()",
|
||||
description = "Unbinds the SpriteBatch.",
|
||||
@@ -1267,12 +1384,6 @@ local love = {
|
||||
returns = "(height: number)",
|
||||
type = "function"
|
||||
},
|
||||
getLineStipple = {
|
||||
args = "()",
|
||||
description = "Gets the current line stipple.",
|
||||
returns = "(pattern: number, repeat: number)",
|
||||
type = "function"
|
||||
},
|
||||
getLineStyle = {
|
||||
args = "()",
|
||||
description = "Gets the line style.",
|
||||
@@ -1357,12 +1468,6 @@ local love = {
|
||||
returns = "()",
|
||||
type = "function"
|
||||
},
|
||||
["love.graphics.newStencil"] = {
|
||||
args = "(stencilFunction: function)",
|
||||
description = "Creates a new stencil.",
|
||||
returns = "(myStencil: function)",
|
||||
type = "function"
|
||||
},
|
||||
newCanvas = {
|
||||
args = "()",
|
||||
description = "Creates a new Canvas object for offscreen rendering.",
|
||||
@@ -1383,7 +1488,7 @@ local love = {
|
||||
},
|
||||
newImageFont = {
|
||||
args = "(image: Image, glyphs: string)",
|
||||
description = "Creates a new font by loading a specifically formatted image. There can be up to 256 glyphs.",
|
||||
description = "Creates a new font by loading a specifically formatted image. There can be up to 256 glyphs.\n\nExpects ISO 8859-1 encoding for the glyphs string.",
|
||||
returns = "(font: Font)",
|
||||
type = "function"
|
||||
},
|
||||
@@ -1395,7 +1500,7 @@ local love = {
|
||||
},
|
||||
newPixelEffect = {
|
||||
args = "(code: string)",
|
||||
description = "Creates a new PixelEffect object for hardware-accelerated pixel level effects.\n\nA PixelEffect contains at least one function, named effect, which is the effect itself, but it can contain additional functions.\n\nvec4 effect( vec4 color, sampler2D texture, vec2 texture_coords, vec2 pixel_coords )",
|
||||
description = "Creates a new PixelEffect object for hardware-accelerated pixel level effects.\n\nA PixelEffect contains at least one function, named effect, which is the effect itself, but it can contain additional functions.\n\nvec4 effect( vec4 color, Image texture, vec2 texture_coords, vec2 pixel_coords )",
|
||||
returns = "(pixeleffect: PixelEffect)",
|
||||
type = "function"
|
||||
},
|
||||
@@ -1417,6 +1522,12 @@ local love = {
|
||||
returns = "(spriteBatch: SpriteBatch)",
|
||||
type = "function"
|
||||
},
|
||||
newStencil = {
|
||||
args = "(stencilFunction: function)",
|
||||
description = "Creates a new stencil.",
|
||||
returns = "(myStencil: function)",
|
||||
type = "function"
|
||||
},
|
||||
point = {
|
||||
args = "(x: number, y: number)",
|
||||
description = "Draws a point.\n\nThe pixel grid is actually offset to the center of each pixel. So to get clean pixels drawn use 0.5 + integer increments.",
|
||||
@@ -1443,7 +1554,7 @@ local love = {
|
||||
},
|
||||
print = {
|
||||
args = "(text: string, x: number, y: number, r: number, sx: number, sy: number, ox: number, oy: number, kx: number, ky: number)",
|
||||
description = "Draws text on screen. If no Font is set, one will be created and set (once) if needed.\n\nAs of LÖVE 0.7.1, when using translation and scaling functions while drawing text, this function assumes the scale occurs first. If you don't script with this in mind, the text won't be in the right position, or possibly even on screen.\n\nDrawing uses the current color, but only if the ColorMode is \"modulate\" (which is the default). If your text is displayed as white, it is probably because the color mode is \"replace\" (which is useful when drawing sprites). Change the color model to \"modulate\" before drawing.\n\nlove.graphics.print stops at the first '\000' (null) character. This can bite you if you are appending keystrokes to form your string, as some of those are multi-byte unicode characters which will likely contain null bytes.",
|
||||
description = "Draws text on screen. If no Font is set, one will be created and set (once) if needed.\n\nWhen using translation and scaling functions while drawing text, this function assumes the scale occurs first. If you don't script with this in mind, the text won't be in the right position, or possibly even on screen.\n\nDrawing uses the current color, but only if the ColorMode is \"modulate\" (which is the default). If your text is displayed as white, it is probably because the color mode is \"replace\" (which is useful when drawing sprites). Change the color model to \"modulate\" before drawing.\n\nlove.graphics.print stops at the first '\000' (null) character. This can bite you if you are appending keystrokes to form your string, as some of those are multi-byte unicode characters which will likely contain null bytes.",
|
||||
returns = "()",
|
||||
type = "function"
|
||||
},
|
||||
@@ -1473,24 +1584,24 @@ local love = {
|
||||
},
|
||||
reset = {
|
||||
args = "()",
|
||||
description = "Resets the current graphics settings.\n\nCalling reset makes the current drawing color white, the current background color black, the window title empty and removes any scissor settings. It sets the BlendMode to alpha and ColorMode to modulate. It also sets both the point and line drawing modes to smooth and their sizes to 1.0 . Finally, it removes any stipple settings.",
|
||||
description = "Resets the current graphics settings.\n\nCalling reset makes the current drawing color white, the current background color black, the window title empty and removes any scissor settings. It sets the BlendMode to alpha and ColorMode to modulate. It also sets both the point and line drawing modes to smooth and their sizes to 1.0.",
|
||||
returns = "()",
|
||||
type = "function"
|
||||
},
|
||||
rotate = {
|
||||
args = "(angle: number)",
|
||||
description = "Rotates the coordinate system in two dimensions.\n\nCalling this function affects all future drawing operations by rotating the coordinate system around the origin by the given amount of radians. This change lasts until love.draw() exits.",
|
||||
description = "Rotates the coordinate system in two dimensions.\n\nCalling this function affects all future drawing operations by rotating the coordinate system around the origin by the given amount of radians. This change lasts until love.draw exits.",
|
||||
returns = "()",
|
||||
type = "function"
|
||||
},
|
||||
scale = {
|
||||
args = "(sx: number, sy: number)",
|
||||
description = "Scales the coordinate system in two dimensions.\n\nBy default the coordinate system in LÖVE corresponds to the display pixels in horizontal and vertical directions one-to-one, and the x-axis increases towards the right while the y-axis increases downwards. Scaling the coordinate system changes this relation.\n\nAfter scaling by sx and sy, all coordinates are treated as if they were multiplied by sx and sy. Every result of a drawing operation is also correspondingly scaled, so scaling by (2, 2) for example would mean making everything twice as large in both x- and y-directions. Scaling by a negative value flips the coordinate system in the corresponding direction, which also means everything will be drawn flipped or upside down, or both. Scaling by zero is not a useful operation.\n\nScale and translate are not commutative operations, therefore, calling them in different orders will change the outcome.\n\nScaling lasts until love.draw() exits.",
|
||||
description = "Scales the coordinate system in two dimensions.\n\nBy default the coordinate system in LÖVE corresponds to the display pixels in horizontal and vertical directions one-to-one, and the x-axis increases towards the right while the y-axis increases downwards. Scaling the coordinate system changes this relation.\n\nAfter scaling by sx and sy, all coordinates are treated as if they were multiplied by sx and sy. Every result of a drawing operation is also correspondingly scaled, so scaling by (2, 2) for example would mean making everything twice as large in both x- and y-directions. Scaling by a negative value flips the coordinate system in the corresponding direction, which also means everything will be drawn flipped or upside down, or both. Scaling by zero is not a useful operation.\n\nScale and translate are not commutative operations, therefore, calling them in different orders will change the outcome.\n\nScaling lasts until love.draw exits.",
|
||||
returns = "()",
|
||||
type = "function"
|
||||
},
|
||||
setBackgroundColor = {
|
||||
args = "(r: number, g: number, b: number)",
|
||||
args = "(r: number, g: number, b: number, a: number)",
|
||||
description = "Sets the background color.",
|
||||
returns = "()",
|
||||
type = "function"
|
||||
@@ -1545,7 +1656,7 @@ local love = {
|
||||
},
|
||||
setInvertedStencil = {
|
||||
args = "(stencilFunction: function)",
|
||||
description = "Defines an inverted stencil for the drawing operations or releases the active one.\n\nIt's the same as love.graphics.setStencil with the mask inverted.",
|
||||
description = "Defines an inverted stencil for the drawing operations or releases the active one.\n\nIt's the same as love.graphics.setStencil with the mask inverted.\n\nCalling the function without arguments releases the active stencil.",
|
||||
returns = "()",
|
||||
type = "function"
|
||||
},
|
||||
@@ -1555,12 +1666,6 @@ local love = {
|
||||
returns = "()",
|
||||
type = "function"
|
||||
},
|
||||
setLineStipple = {
|
||||
args = "(pattern: number, repeat: number)",
|
||||
description = "Sets the line stipple pattern.\n\nA stipple pattern is made up of a 16bit sequence of 0s and 1s, Just like binary.\n\nThe pattern is repeated to complete the line. Using the repeat will stretch the pattern and multiplies each 1 and 0. For example if three 1s are consecutively placed they are stretched to six if the repeat is 2. The maximum repeat is 255, and the minimum repeat is 1.\n\nA 1 is a a cue to draw a pixel whereas 0 is the opposite and does not draw a pixel, This is done per pixel for the given line.\n\nA pattern is read from back to front.\n\n0x3F07 would equal to 0011111100000111 in binary.\n\nYou can visualise the pattern by reading the binary sequence backwards.",
|
||||
returns = "()",
|
||||
type = "function"
|
||||
},
|
||||
setLineStyle = {
|
||||
args = "(style: LineStyle)",
|
||||
description = "Sets the line style.",
|
||||
@@ -1580,7 +1685,7 @@ local love = {
|
||||
type = "function"
|
||||
},
|
||||
setNewFont = {
|
||||
args = "(filename: string, size: number)",
|
||||
args = "(size: number)",
|
||||
description = "Creates and sets a new font.",
|
||||
returns = "(font: Font)",
|
||||
type = "function"
|
||||
@@ -1617,7 +1722,7 @@ local love = {
|
||||
},
|
||||
setStencil = {
|
||||
args = "(stencilFunction: function)",
|
||||
description = "Defines or releases a stencil for the drawing operations.\n\nThe passed function draws to the stencil instead of the screen, creating an image with transparent and opaque pixel. While active, it is used to test where pixel will be drawn or discarded.\n\nCalling the function without arguments releases the active stencil.",
|
||||
description = "Defines or releases a stencil for the drawing operations.\n\nThe passed function draws to the stencil instead of the screen, creating an image with transparent and opaque pixels. While active, it is used to test where pixels will be drawn or discarded.\n\nCalling the function without arguments releases the active stencil.",
|
||||
returns = "()",
|
||||
type = "function"
|
||||
},
|
||||
@@ -1635,7 +1740,7 @@ local love = {
|
||||
},
|
||||
translate = {
|
||||
args = "(dx: number, dy: number)",
|
||||
description = "Translates the coordinate system in two dimensions.\n\nWhen this function is called with two numbers, dx, and dy, all the following drawing operations take effect as if their x and y coordinates were x+dx and y+dy.\n\nScale and translate are not commutative operations, therefore, calling them in different orders will change the outcome.\n\nThis change lasts until love.draw() exits or else a love.graphics.pop reverts to a previous love.graphics.push.\n\nTranslating using whole numbers will prevent tearing/blurring of images and fonts draw after translating.",
|
||||
description = "Translates the coordinate system in two dimensions.\n\nWhen this function is called with two numbers, dx, and dy, all the following drawing operations take effect as if their x and y coordinates were x+dx and y+dy.\n\nScale and translate are not commutative operations, therefore, calling them in different orders will change the outcome.\n\nThis change lasts until love.draw exits or else a love.graphics.pop reverts to a previous love.graphics.push.\n\nTranslating using whole numbers will prevent tearing/blurring of images and fonts draw after translating.",
|
||||
returns = "()",
|
||||
type = "function"
|
||||
},
|
||||
@@ -1646,12 +1751,66 @@ local love = {
|
||||
type = "function"
|
||||
}
|
||||
},
|
||||
description = "The primary responsibility for the love.graphics module is the drawing of lines, shapes, text, Images and other Drawable objects onto the screen. Its secondary responsibilities include loading external files (including Images and Fonts) into memory, creating specialized objects (such as ParticleSystems or Framebuffers) and managing screen geometry.\n\nLÖVE's coordinate system is rooted in the upper-left corner of the screen, which is at location (0, 0). The x axis is horizontal: larger values are further to the right. The y axis is vertical: larger values are further towards the bottom.\n\nIn many cases, you draw images or shapes in terms of their upper-left corner (See the picture above).\n\nMany of the functions are used to manipulate the graphics coordinate system, which is essentially the the way coordinates are mapped to the display. You can change the position, scale, and even rotation in this way.",
|
||||
description = "The primary responsibility for the love.graphics module is the drawing of lines, shapes, text, Images and other Drawable objects onto the screen. Its secondary responsibilities include loading external files (including Images and Fonts) into memory, creating specialized objects (such as ParticleSystems or Framebuffers) and managing screen geometry.\n\nLÖVE's coordinate system is rooted in the upper-left corner of the screen, which is at location (0, 0). The x-axis is horizontal: larger values are further to the right. The y-axis is vertical: larger values are further towards the bottom.\n\nIn many cases, you draw images or shapes in terms of their upper-left corner (See the picture above).\n\nMany of the functions are used to manipulate the graphics coordinate system, which is essentially the the way coordinates are mapped to the display. You can change the position, scale, and even rotation in this way.",
|
||||
type = "class"
|
||||
},
|
||||
image = {
|
||||
childs = {
|
||||
ImageData = {
|
||||
childs = {
|
||||
encode = {
|
||||
args = "(outFile: string)",
|
||||
description = "Encodes the ImageData and writes it to the save directory.",
|
||||
returns = "()",
|
||||
type = "function"
|
||||
},
|
||||
getHeight = {
|
||||
args = "()",
|
||||
description = "Gets the height of the ImageData.",
|
||||
returns = "(height: number)",
|
||||
type = "function"
|
||||
},
|
||||
getPixel = {
|
||||
args = "(x: number, y: number)",
|
||||
description = "Gets the pixel at the specified position.\n\nValid x and y values start at 0 and go up to image width and height minus 1.",
|
||||
returns = "(r: number, g: number, b: number, a: number)",
|
||||
type = "function"
|
||||
},
|
||||
getString = {
|
||||
args = "()",
|
||||
description = "Gets the full ImageData as a string.",
|
||||
returns = "(pixels: string)",
|
||||
type = "function"
|
||||
},
|
||||
getWidth = {
|
||||
args = "()",
|
||||
description = "Gets the width of the ImageData.",
|
||||
returns = "(width: number)",
|
||||
type = "function"
|
||||
},
|
||||
mapPixel = {
|
||||
args = "(pixelFunction: function)",
|
||||
description = "Transform an image by applying a function to every pixel.\n\nThis function is a higher order function. It takes another function as a parameter, and calls it once for each pixel in the ImageData.\n\nThe function parameter is called with six parameters for each pixel in turn. The parameters are numbers that represent the x and y coordinates of the pixel and its red, green, blue and alpha values. The function parameter can return up to four number values, which become the new r, g, b and a values of the pixel. If the function returns fewer values, the remaining components are set to 0.",
|
||||
returns = "()",
|
||||
type = "function"
|
||||
},
|
||||
paste = {
|
||||
args = "(source: ImageData, dx: number, dy: number, sx: number, sy: number, sw: number, sh: number)",
|
||||
description = "Paste into ImageData from another source ImageData.",
|
||||
returns = "()",
|
||||
type = "function"
|
||||
},
|
||||
setPixel = {
|
||||
args = "(x: number, y: number, r: number, g: number, b: number, a: number)",
|
||||
description = "Sets the color of a pixel.\n\nValid x and y values start at 0 and go up to image width and height minus 1.",
|
||||
returns = "()",
|
||||
type = "function"
|
||||
}
|
||||
},
|
||||
description = "Raw (decoded) image data.\n\nYou can't draw ImageData directly to screen. See Image for that.",
|
||||
type = "lib"
|
||||
},
|
||||
ImageFormat = {
|
||||
childs = {
|
||||
bmp = {
|
||||
description = "BMP image format.",
|
||||
@@ -1677,12 +1836,6 @@ local love = {
|
||||
description = "class constants",
|
||||
type = "class"
|
||||
},
|
||||
newEncodedImageData = {
|
||||
args = "(imageData: ImageData, format: ImageFormat)",
|
||||
description = "Encodes ImageData.",
|
||||
returns = "(data: Data)",
|
||||
type = "function"
|
||||
},
|
||||
newImageData = {
|
||||
args = "(width: number, height: number)",
|
||||
description = "Create a new ImageData object.",
|
||||
@@ -1757,7 +1910,7 @@ local love = {
|
||||
},
|
||||
getBall = {
|
||||
args = "(joystick: number, ball: number)",
|
||||
description = "Returns the change in Ball position.",
|
||||
description = "Returns the change in ball position.",
|
||||
returns = "(dx: number, dy: number)",
|
||||
type = "function"
|
||||
},
|
||||
@@ -2053,7 +2206,7 @@ local love = {
|
||||
type = "value"
|
||||
},
|
||||
euro = {
|
||||
description = "Euro (€) key",
|
||||
description = "Euro (€) key",
|
||||
type = "value"
|
||||
},
|
||||
f = {
|
||||
@@ -2473,19 +2626,19 @@ local love = {
|
||||
},
|
||||
getX = {
|
||||
args = "()",
|
||||
description = "Returns the current x-position of the mouse.",
|
||||
description = "Returns the current x position of the mouse.",
|
||||
returns = "(x: number)",
|
||||
type = "function"
|
||||
},
|
||||
getY = {
|
||||
args = "()",
|
||||
description = "Returns the current y-position of the mouse.",
|
||||
description = "Returns the current y position of the mouse.",
|
||||
returns = "(y: number)",
|
||||
type = "function"
|
||||
},
|
||||
isDown = {
|
||||
args = "(button: MouseConstant)",
|
||||
description = "Checks whether a certain mouse button is down.",
|
||||
description = "Checks whether a certain mouse button is down. This function does not detect mousewheel scrolling; you must use the love.mousepressed callback for that.",
|
||||
returns = "(down: boolean)",
|
||||
type = "function"
|
||||
},
|
||||
@@ -2577,7 +2730,7 @@ local love = {
|
||||
},
|
||||
getAngle = {
|
||||
args = "()",
|
||||
description = "Get the angle of the body.\n\nThe angle is measured in radians. If you need to transform it to degrees, use math.deg.\n\nA value of 0 radians will mean \"looking to the right\". Although radians increase counter-clockwise, the y axis points down so it becomes clockwise from our point of view.",
|
||||
description = "Get the angle of the body.\n\nThe angle is measured in radians. If you need to transform it to degrees, use math.deg.\n\nA value of 0 radians will mean \"looking to the right\". Although radians increase counter-clockwise, the y-axis points down so it becomes clockwise from our point of view.",
|
||||
returns = "(angle: number)",
|
||||
type = "function"
|
||||
},
|
||||
@@ -2599,6 +2752,12 @@ local love = {
|
||||
returns = "(fixtures: table)",
|
||||
type = "function"
|
||||
},
|
||||
getGravityScale = {
|
||||
args = "()",
|
||||
description = "Returns the gravity scale factor.",
|
||||
returns = "(scale: number)",
|
||||
type = "function"
|
||||
},
|
||||
getInertia = {
|
||||
args = "()",
|
||||
description = "Gets the rotational inertia of the body.\n\nThe rotational inertia is how hard is it to make the body spin. It is set with the 4th argument to Body:setMass, or automatically with Body:setMassFromShapes.",
|
||||
@@ -2773,6 +2932,12 @@ local love = {
|
||||
returns = "()",
|
||||
type = "function"
|
||||
},
|
||||
setActive = {
|
||||
args = "(active: boolean)",
|
||||
description = "Sets whether the body is active in the world.\n\nAn inactive body does not take part in the simulation. It will not move or cause any collisions.",
|
||||
returns = "()",
|
||||
type = "function"
|
||||
},
|
||||
setAllowSleeping = {
|
||||
args = "(permission: boolean)",
|
||||
description = "Set the sleep behaviour of a body.\n\nA sleeping body is much more efficient to simulate than when awake.\n\nIf sleeping is allowed, a body that has come to rest will sleep.",
|
||||
@@ -2781,7 +2946,7 @@ local love = {
|
||||
},
|
||||
setAngle = {
|
||||
args = "(angle: number)",
|
||||
description = "Set the angle of the body.\n\nThe angle is measured in radians. If you need to transform it from degrees, use math.rad.\n\nA value of 0 radians will mean \"looking to the right\". .Although radians increase counter-clockwise, the y axis points down so it becomes clockwise from our point of view.\n\nIt is possible to cause a collision with another body by changing its angle.",
|
||||
description = "Set the angle of the body.\n\nThe angle is measured in radians. If you need to transform it from degrees, use math.rad.\n\nA value of 0 radians will mean \"looking to the right\". .Although radians increase counter-clockwise, the y-axis points down so it becomes clockwise from our point of view.\n\nIt is possible to cause a collision with another body by changing its angle.",
|
||||
returns = "()",
|
||||
type = "function"
|
||||
},
|
||||
@@ -2915,6 +3080,48 @@ local love = {
|
||||
description = "class constants",
|
||||
type = "class"
|
||||
},
|
||||
ChainShape = {
|
||||
childs = {
|
||||
getChildEdge = {
|
||||
args = "(index: number)",
|
||||
description = "Returns a child of the shape as an EdgeShape.",
|
||||
returns = "(EdgeShape: number)",
|
||||
type = "function"
|
||||
},
|
||||
getPoint = {
|
||||
args = "(index: number)",
|
||||
description = "Returns a point of the shape.",
|
||||
returns = "(x: number, y: number)",
|
||||
type = "function"
|
||||
},
|
||||
getPoints = {
|
||||
args = "()",
|
||||
description = "Returns all points of the shape.",
|
||||
returns = "(x1: number, y1: number, x2: number, y2: number, ...: number)",
|
||||
type = "function"
|
||||
},
|
||||
getVertexCount = {
|
||||
args = "()",
|
||||
description = "Returns the number of vertices the shape has.",
|
||||
returns = "(count: number)",
|
||||
type = "function"
|
||||
},
|
||||
setNextVertex = {
|
||||
args = "(x: number, y: number)",
|
||||
description = "Sets a vertex that establishes a connection to the next shape.\n\nThis can help prevent unwanted collisions when a flat shape slides along the edge and moves over to the new shape.",
|
||||
returns = "()",
|
||||
type = "function"
|
||||
},
|
||||
setPrevVertex = {
|
||||
args = "(x: number, y: number)",
|
||||
description = "Sets a vertex that establishes a connection to the previous shape.\n\nThis can help prevent unwanted collisions when a flat shape slides along the edge and moves over to the new shape.",
|
||||
returns = "()",
|
||||
type = "function"
|
||||
}
|
||||
},
|
||||
description = "A ChainShape consists of multiple line segments. It can be used to create the boundaries of your terrain. The shape does not have volume and can only collide with PolygonShape and CircleShape.\n\nUnlike the PolygonShape, the ChainShape does not have a vertices limit or has to form a convex shape, but self intersections are not supported. ",
|
||||
type = "lib"
|
||||
},
|
||||
CircleShape = {
|
||||
childs = {
|
||||
getLocalCenter = {
|
||||
@@ -2934,6 +3141,12 @@ local love = {
|
||||
description = "Get the center of the circle in world coordinates.",
|
||||
returns = "(wx: number, wy: number)",
|
||||
type = "function"
|
||||
},
|
||||
setRadius = {
|
||||
args = "(radius: number)",
|
||||
description = "Sets the radius of the circle.",
|
||||
returns = "()",
|
||||
type = "function"
|
||||
}
|
||||
},
|
||||
description = "Circle extends Shape and adds a radius and a local position.",
|
||||
@@ -2953,10 +3166,10 @@ local love = {
|
||||
returns = "(nx: number, ny: number)",
|
||||
type = "function"
|
||||
},
|
||||
getPosition = {
|
||||
getPositions = {
|
||||
args = "()",
|
||||
description = "Get the location of the contact point between two shapes.",
|
||||
returns = "(cx: number, cy: number)",
|
||||
description = "Returns the contact points of the two colliding fixtures. There can be one or two points.",
|
||||
returns = "(x1: number, y1: number, x2: number, y2: number)",
|
||||
type = "function"
|
||||
},
|
||||
getRestitution = {
|
||||
@@ -2971,10 +3184,46 @@ local love = {
|
||||
returns = "(distance: number)",
|
||||
type = "function"
|
||||
},
|
||||
getVelocity = {
|
||||
isEnabled = {
|
||||
args = "()",
|
||||
description = "Get the linear impact velocity of a contact.",
|
||||
returns = "(vx: number, vy: number)",
|
||||
description = "Returns whether the contact is enabled. The collision will be ignored if a contact gets disabled in the post solve callback.",
|
||||
returns = "(enabled: boolean)",
|
||||
type = "function"
|
||||
},
|
||||
isTouching = {
|
||||
args = "()",
|
||||
description = "Returns whether the two colliding fixtures are touching each other.",
|
||||
returns = "(touching: boolean)",
|
||||
type = "function"
|
||||
},
|
||||
resetFriction = {
|
||||
args = "()",
|
||||
description = "Resets the contact friction to the mixture value of both fixtures.",
|
||||
returns = "()",
|
||||
type = "function"
|
||||
},
|
||||
resetRestitution = {
|
||||
args = "()",
|
||||
description = "Resets the contact restitution to the mixture value of both fixtures.",
|
||||
returns = "()",
|
||||
type = "function"
|
||||
},
|
||||
setEnabled = {
|
||||
args = "(enabled: boolean)",
|
||||
description = "Enables or disables the contact.",
|
||||
returns = "()",
|
||||
type = "function"
|
||||
},
|
||||
setFriction = {
|
||||
args = "(friction: number)",
|
||||
description = "Sets the contact friction.",
|
||||
returns = "()",
|
||||
type = "function"
|
||||
},
|
||||
setRestitution = {
|
||||
args = "(restitution: number)",
|
||||
description = "Sets the contact restitution.",
|
||||
returns = "()",
|
||||
type = "function"
|
||||
}
|
||||
},
|
||||
@@ -3023,6 +3272,12 @@ local love = {
|
||||
description = "Keeps two bodies at the same distance.",
|
||||
type = "lib"
|
||||
},
|
||||
EdgeShape = {
|
||||
args = "()",
|
||||
description = "A EdgeShape is a line segment. They can be used to create the boundaries of your terrain. The shape does not have volume and can only collide with PolygonShape and CircleShape.",
|
||||
returns = "()",
|
||||
type = "function"
|
||||
},
|
||||
Fixture = {
|
||||
childs = {
|
||||
destroy = {
|
||||
@@ -3254,8 +3509,8 @@ local love = {
|
||||
type = "function"
|
||||
},
|
||||
getReactionTorque = {
|
||||
args = "()",
|
||||
description = "Gets the reaction torque on Body 2.",
|
||||
args = "(invdt: number)",
|
||||
description = "Returns the reaction torque on the second body.",
|
||||
returns = "(torque: number)",
|
||||
type = "function"
|
||||
},
|
||||
@@ -3307,6 +3562,18 @@ local love = {
|
||||
},
|
||||
MouseJoint = {
|
||||
childs = {
|
||||
getDampingRatio = {
|
||||
args = "()",
|
||||
description = "Returns the damping ratio.",
|
||||
returns = "(ratio: number)",
|
||||
type = "function"
|
||||
},
|
||||
getFrequency = {
|
||||
args = "()",
|
||||
description = "Returns the frequency.",
|
||||
returns = "(freq: number)",
|
||||
type = "function"
|
||||
},
|
||||
getMaxForce = {
|
||||
args = "()",
|
||||
description = "Gets the highest allowed force.",
|
||||
@@ -3319,6 +3586,18 @@ local love = {
|
||||
returns = "(x: number, y: number)",
|
||||
type = "function"
|
||||
},
|
||||
setDampingRatio = {
|
||||
args = "(ratio: number)",
|
||||
description = "Sets a new damping ratio.",
|
||||
returns = "()",
|
||||
type = "function"
|
||||
},
|
||||
setFrequency = {
|
||||
args = "(freq: number)",
|
||||
description = "Sets a new frequency.",
|
||||
returns = "()",
|
||||
type = "function"
|
||||
},
|
||||
setMaxForce = {
|
||||
args = "(f: number)",
|
||||
description = "Sets the highest allowed force.",
|
||||
@@ -3343,6 +3622,18 @@ local love = {
|
||||
},
|
||||
PrismaticJoint = {
|
||||
childs = {
|
||||
enableLimit = {
|
||||
args = "(enable: boolean)",
|
||||
description = "Enables or disables the limits of the joint.",
|
||||
returns = "()",
|
||||
type = "function"
|
||||
},
|
||||
enableMotor = {
|
||||
args = "(enable: boolean)",
|
||||
description = "Starts or stops the joint motor.",
|
||||
returns = "()",
|
||||
type = "function"
|
||||
},
|
||||
getJointSpeed = {
|
||||
args = "()",
|
||||
description = "Get the current joint angle speed.",
|
||||
@@ -3391,9 +3682,9 @@ local love = {
|
||||
returns = "(upper: number)",
|
||||
type = "function"
|
||||
},
|
||||
isLimitsEnabled = {
|
||||
isLimitEnabled = {
|
||||
args = "()",
|
||||
description = "Checks whether limits are enabled.",
|
||||
description = "Checks whether the limits are enabled.",
|
||||
returns = "(enabled: boolean)",
|
||||
type = "function"
|
||||
},
|
||||
@@ -3409,12 +3700,6 @@ local love = {
|
||||
returns = "()",
|
||||
type = "function"
|
||||
},
|
||||
setLimitsEnabled = {
|
||||
args = "(enable: boolean)",
|
||||
description = "Enables/disables the joint limit.",
|
||||
returns = "()",
|
||||
type = "function"
|
||||
},
|
||||
setLowerLimit = {
|
||||
args = "(lower: number)",
|
||||
description = "Sets the lower limit.",
|
||||
@@ -3427,12 +3712,6 @@ local love = {
|
||||
returns = "()",
|
||||
type = "function"
|
||||
},
|
||||
setMotorEnabled = {
|
||||
args = "(enable: boolean)",
|
||||
description = "Enables/disables the joint motor.",
|
||||
returns = "()",
|
||||
type = "function"
|
||||
},
|
||||
setMotorSpeed = {
|
||||
args = "(s: number)",
|
||||
description = "Sets the motor speed.",
|
||||
@@ -3463,13 +3742,13 @@ local love = {
|
||||
returns = "(a1x: number, a1y: number, a2x: number, a2y: number)",
|
||||
type = "function"
|
||||
},
|
||||
getLength1 = {
|
||||
getLengthA = {
|
||||
args = "()",
|
||||
description = "Get the current length of the rope segment attached to the first body.",
|
||||
returns = "(length: number)",
|
||||
type = "function"
|
||||
},
|
||||
getLength2 = {
|
||||
getLengthB = {
|
||||
args = "()",
|
||||
description = "Get the current length of the rope segment attached to the second body.",
|
||||
returns = "(length: number)",
|
||||
@@ -3511,9 +3790,15 @@ local love = {
|
||||
},
|
||||
RevoluteJoint = {
|
||||
childs = {
|
||||
enableLimits = {
|
||||
args = "(enable: boolean)",
|
||||
description = "Enables or disables the joint limits.",
|
||||
returns = "()",
|
||||
type = "function"
|
||||
},
|
||||
enableMotor = {
|
||||
args = "(enable: boolean)",
|
||||
description = "Enables/disables the joint motor.",
|
||||
description = "Starts or stops the joint motor.",
|
||||
returns = "()",
|
||||
type = "function"
|
||||
},
|
||||
@@ -3766,8 +4051,34 @@ local love = {
|
||||
type = "class"
|
||||
},
|
||||
WeldJoint = {
|
||||
childs = {
|
||||
getDampingRatio = {
|
||||
args = "()",
|
||||
description = "Returns the damping ratio of the joint.",
|
||||
returns = "(ratio: number)",
|
||||
type = "function"
|
||||
},
|
||||
getFrequency = {
|
||||
args = "()",
|
||||
description = "Returns the frequency.",
|
||||
returns = "(freq: number)",
|
||||
type = "function"
|
||||
},
|
||||
setDampingRatio = {
|
||||
args = "(ratio: number)",
|
||||
description = "The new damping ratio.",
|
||||
returns = "()",
|
||||
type = "function"
|
||||
},
|
||||
setFrequency = {
|
||||
args = "()",
|
||||
description = "Sets a new frequency.",
|
||||
returns = "(freq: number)",
|
||||
type = "function"
|
||||
}
|
||||
},
|
||||
description = "A WeldJoint essentially glues two bodies together.",
|
||||
type = "value"
|
||||
type = "lib"
|
||||
},
|
||||
World = {
|
||||
childs = {
|
||||
@@ -3797,8 +4108,8 @@ local love = {
|
||||
},
|
||||
getCallbacks = {
|
||||
args = "()",
|
||||
description = "Get functions to be called when two shapes collide.",
|
||||
returns = "(add: function, persist: function, remove: function, result: function)",
|
||||
description = "Returns functions for the callbacks during the world update.",
|
||||
returns = "(beginContact: function, endContact: function, preSolve: function, postSolve: function)",
|
||||
type = "function"
|
||||
},
|
||||
getContactCount = {
|
||||
@@ -3926,7 +4237,7 @@ local love = {
|
||||
type = "function"
|
||||
},
|
||||
newEdgeShape = {
|
||||
args = "(body1: Body, body2: Body, x: number, y: number)",
|
||||
args = "(x1: number, y1: number, x2: number, y2: number)",
|
||||
description = "Creates a edge shape.",
|
||||
returns = "(shape: EdgeShape)",
|
||||
type = "function"
|
||||
@@ -4008,6 +4319,12 @@ local love = {
|
||||
description = "Creates a new World.",
|
||||
returns = "(world: World)",
|
||||
type = "function"
|
||||
},
|
||||
setMeter = {
|
||||
args = "(scale: number)",
|
||||
description = "Sets the meter scale factor.\n\nAll coordinates in the physics module are divided by this number, creating a convenient way to draw the objects directly to the screen without the need for graphics transformations.\n\nIt is recommended to create shapes no larger than 10 times the scale. This is important because Box2D is tuned to work well with shape sizes from 0.1 to 10 meters.",
|
||||
returns = "()",
|
||||
type = "function"
|
||||
}
|
||||
},
|
||||
description = "Can simulate 2D rigid body physics in a realistic manner. This module is based on Box2D, and this API corresponds to the Box2D API as closely as possible.",
|
||||
@@ -4119,6 +4436,12 @@ local love = {
|
||||
returns = "(value: mixed)",
|
||||
type = "function"
|
||||
},
|
||||
getKeys = {
|
||||
args = "()",
|
||||
description = "Returns the names of all messages in a table.",
|
||||
returns = "(msgNames: table)",
|
||||
type = "function"
|
||||
},
|
||||
getName = {
|
||||
args = "()",
|
||||
description = "Get the name of a thread.",
|
||||
@@ -4167,7 +4490,7 @@ local love = {
|
||||
},
|
||||
newThread = {
|
||||
args = "(name: string, filename: string)",
|
||||
description = "Creates a new Thread from a File or Data Object.",
|
||||
description = "Creates a new Thread from a File or Data object.",
|
||||
returns = "(thread: Thread)",
|
||||
type = "function"
|
||||
}
|
||||
|
||||
720
api/lua/moai.lua
720
api/lua/moai.lua
@@ -1,3 +1,5 @@
|
||||
-- Copyright 2011-12 Paul Kulchenko, ZeroBrane LLC
|
||||
|
||||
return {
|
||||
MOAIAction = {
|
||||
type = "class",
|
||||
@@ -283,6 +285,18 @@ return {
|
||||
type = "class",
|
||||
description = "Box2D body.",
|
||||
childs = {
|
||||
DYNAMIC = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
KINEMATIC = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
STATIC = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
addChain = {
|
||||
type = "function",
|
||||
description = "Create and add a set of collision edges to teh body.",
|
||||
@@ -955,6 +969,30 @@ return {
|
||||
type = "class",
|
||||
description = "Box2D world.",
|
||||
childs = {
|
||||
DEBUG_DRAW_SHAPES = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
DEBUG_DRAW_JOINTS = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
DEBUG_DRAW_BOUNDS = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
DEBUG_DRAW_PAIRS = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
DEBUG_DRAW_CENTERS = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
DEBUG_DRAW_DEFAULT = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
addBody = {
|
||||
type = "function",
|
||||
description = "Create and add a body to the world.",
|
||||
@@ -1237,6 +1275,30 @@ return {
|
||||
type = "class",
|
||||
description = "Action to dynamically fit a camera transform to a set of targets given a viewport and world space constraints.",
|
||||
childs = {
|
||||
FITTING_MODE_SEEK_LOC = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
FITTING_MODE_SEEK_SCALE = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
FITTING_MODE_APPLY_ANCHORS = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
FITTING_MODE_APPLY_BOUNDS = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
FITTING_MODE_DEFAULT = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
FITTING_MODE_MASK = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
clearAnchors = {
|
||||
type = "function",
|
||||
description = "Remove all camera anchors from the fitter.",
|
||||
@@ -1477,6 +1539,18 @@ return {
|
||||
type = "class",
|
||||
description = "Chipmunk Body.",
|
||||
childs = {
|
||||
NONE = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
REMOVE_BODY = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
REMOVE_BODY_AND_SHAPES = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
activate = {
|
||||
type = "function",
|
||||
description = "Activates a body after it has been put to sleep (physics will now be processed for this body again).",
|
||||
@@ -2203,6 +2277,34 @@ return {
|
||||
type = "class",
|
||||
description = "Singleton for managing rendering of world space debug vectors.",
|
||||
childs = {
|
||||
PARTITION_CELLS = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
PARTITION_PADDED_CELLS = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
PROP_MODEL_BOUNDS = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
PROP_WORLD_BOUNDS = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
TEXT_BOX = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
TEXT_BOX_BASELINES = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
TEXT_BOX_LAYOUT = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
setStyle = {
|
||||
type = "function",
|
||||
description = "Sets the particulars of a given debug line style.",
|
||||
@@ -2481,6 +2583,26 @@ return {
|
||||
type = "class",
|
||||
description = "MOAIFileStream opens a system file handle for eading or writing.",
|
||||
childs = {
|
||||
READ = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
READ_WRITE = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
READ_WRITE_AFFIRM = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
READ_WRITE_NEW = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
WRITE = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
close = {
|
||||
type = "function",
|
||||
description = "Close and release the associated file handle.",
|
||||
@@ -2589,6 +2711,14 @@ return {
|
||||
type = "class",
|
||||
description = "MOAIFont is the top level object for managing sets of glyphs associated with a single font face. An instance of MOAIFont may contain glyph sets for multiple sizes of the font. Alternatively, a separate instance of MOAIFont may be used for each font size. Using a single font object for each size of a font face can make it easier to unload font sizes that are no longer needed.</p>",
|
||||
childs = {
|
||||
FONT_AUTOLOAD_KERNING = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
DEFAULT_FLAGS = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
getFilename = {
|
||||
type = "function",
|
||||
description = "Returns the filename of the font.",
|
||||
@@ -2727,6 +2857,10 @@ return {
|
||||
type = "class",
|
||||
description = "Interface to the graphics singleton.",
|
||||
childs = {
|
||||
EVENT_RESIZE = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
getMaxTextureUnits = {
|
||||
type = "function",
|
||||
description = "Returns the total number of texture units available on the device.",
|
||||
@@ -3093,6 +3227,58 @@ return {
|
||||
type = "class",
|
||||
description = "Represents spatial configuration of a grid. The grid is made up of cells. Inside of each cell is a tile. The tile can be larger or smaller than the cell and also offset from the cell. By default, tiles are the same size of their cells and are no offset.",
|
||||
childs = {
|
||||
TILE_BOTTOM_CENTER = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
TILE_CENTER = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
TILE_LEFT_BOTTOM = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
TILE_LEFT_CENTER = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
TILE_LEFT_TOP = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
TILE_RIGHT_BOTTOM = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
TILE_RIGHT_CENTER = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
TILE_RIGHT_TOP = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
TILE_TOP_CENTER = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
SQUARE_SHAPE = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
DIAMOND_SHAPE = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
OBLIQUE_SHAPE = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
HEX_SHAPE = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
cellAddrToCoord = {
|
||||
type = "function",
|
||||
description = "Returns the coordinate of a cell given an address.",
|
||||
@@ -3201,6 +3387,26 @@ return {
|
||||
type = "class",
|
||||
description = "Object for performing asynchronous HTTP/HTTPS tasks.",
|
||||
childs = {
|
||||
HTTP_GET = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
HTTP_HEAD = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
HTTP_POST = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
HTTP_PUT = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
HTTP_DELETE = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
getResponseHeader = {
|
||||
type = "function",
|
||||
description = "Returns the response header given its name, or nil if it wasn't provided by the server. Header names are case-insensitive and if multiple responses are given, they will be concatenated with a comma separating the values.",
|
||||
@@ -3309,6 +3515,14 @@ return {
|
||||
type = "class",
|
||||
description = "Image/bitmap class.",
|
||||
childs = {
|
||||
FILTER_LINEAR = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
FILTER_NEAREST = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
bleedRect = {
|
||||
type = "function",
|
||||
description = "'Bleeds' the interior of the rectangle out by one pixel.",
|
||||
@@ -3549,6 +3763,54 @@ return {
|
||||
type = "class",
|
||||
description = "Scene controls class.",
|
||||
childs = {
|
||||
SORT_NONE = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
SORT_ISO = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
SORT_PRIORITY_ASCENDING = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
SORT_PRIORITY_DESCENDING = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
SORT_X_ASCENDING = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
SORT_X_DESCENDING = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
SORT_Y_ASCENDING = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
SORT_Y_DESCENDING = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
SORT_Z_ASCENDING = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
SORT_Z_DESCENDING = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
SORT_VECTOR_ASCENDING = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
SORT_VECTOR_DESCENDING = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
clear = {
|
||||
type = "function",
|
||||
description = "Remove all props from the layer's partition.",
|
||||
@@ -3675,6 +3937,42 @@ return {
|
||||
type = "class",
|
||||
description = "2D layer.",
|
||||
childs = {
|
||||
SORT_NONE = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
SORT_PRIORITY_ASCENDING = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
SORT_PRIORITY_DESCENDING = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
SORT_X_ASCENDING = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
SORT_X_DESCENDING = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
SORT_Y_ASCENDING = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
SORT_Y_DESCENDING = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
SORT_VECTOR_ASCENDING = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
SORT_VECTOR_DESCENDING = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
clear = {
|
||||
type = "function",
|
||||
description = "Remove all props from the layer's partition.",
|
||||
@@ -3825,6 +4123,22 @@ return {
|
||||
type = "class",
|
||||
description = "Singleton for managing debug log messages and log level.",
|
||||
childs = {
|
||||
LOG_NONE = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
LOG_ERROR = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
LOG_WARNING = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
LOG_STATUS = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
closeFile = {
|
||||
type = "function",
|
||||
description = "Resets log output to stdout.",
|
||||
@@ -3891,6 +4205,34 @@ return {
|
||||
type = "class",
|
||||
description = "Loads a texture and renders the contents of a vertex buffer. Grid drawing not supported.",
|
||||
childs = {
|
||||
GL_POINTS = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
GL_LINES = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
GL_TRIANGLES = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
GL_LINE_LOOP = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
GL_LINE_STRIP = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
GL_TRIANGLE_FAN = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
GL_TRIANGLE_STRIP = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
setIndexBuffer = {
|
||||
type = "function",
|
||||
description = "Set the index buffer to render.",
|
||||
@@ -4143,6 +4485,18 @@ return {
|
||||
type = "class",
|
||||
description = "Particle force.",
|
||||
childs = {
|
||||
FORCE = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
GRAVITY = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
OFFSET = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
initAttractor = {
|
||||
type = "function",
|
||||
description = "Greater force is exerted on particles as they approach attractor.",
|
||||
@@ -4209,6 +4563,66 @@ return {
|
||||
type = "class",
|
||||
description = "Particle script.",
|
||||
childs = {
|
||||
PARTICLE_X = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
PARTICLE_Y = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
PARTICLE_DX = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
PARTICLE_DY = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
SPRITE_X_LOC = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
SPRITE_Y_LOC = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
SPRITE_ROT = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
SPRITE_X_SCL = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
SPRITE_Y_SCL = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
SPRITE_RED = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
SPRITE_GREEN = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
SPRITE_BLUE = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
SPRITE_OPACITY = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
SPRITE_GLOW = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
SPRITE_IDX = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
add = {
|
||||
type = "function",
|
||||
description = "r0 = v0 + v1",
|
||||
@@ -4491,6 +4905,18 @@ return {
|
||||
type = "class",
|
||||
description = "Class for optimizing spatial queries against sets of primitives. Configure for performance; default behavior is a simple list.",
|
||||
childs = {
|
||||
PLANE_XY = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
PLANE_XZ = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
PLANE_YZ = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
clear = {
|
||||
type = "function",
|
||||
description = "Remove all props from the partition.",
|
||||
@@ -4701,6 +5127,126 @@ return {
|
||||
type = "class",
|
||||
description = "Base class for props.",
|
||||
childs = {
|
||||
FRAME_FROM_DECK = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
FRAME_FROM_PARENT = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
FRAME_FROM_SELF = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
BLEND_NORMAL = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
BLEND_ADD = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
BLEND_MULTIPLY = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
GL_ONE = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
GL_ZERO = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
GL_DST_ALPHA = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
GL_DST_COLOR = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
GL_SRC_COLOR = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
GL_ONE_MINUS_DST_ALPHA = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
GL_ONE_MINUS_DST_COLOR = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
GL_ONE_MINUS_SRC_ALPHA = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
GL_ONE_MINUS_SRC_COLOR = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
GL_SRC_ALPHA = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
GL_SRC_ALPHA_SATURATE = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
DEPTH_TEST_DISABLE = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
DEPTH_TEST_NEVER = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
DEPTH_TEST_LESS = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
DEPTH_TEST_EQUAL = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
DEPTH_TEST_LESS_EQUAL = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
DEPTH_TEST_GREATER = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
DEPTH_TEST_NOTEQUAL = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
DEPTH_TEST_GREATER_EQUAL = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
DEPTH_TEST_ALWAYS = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
CULL_NONE = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
CULL_ALL = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
CULL_BACK = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
CULL_FRONT = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
getBounds = {
|
||||
type = "function",
|
||||
description = "Return the prop's local bounds or 'nil' if prop bounds is global or missing. The bounds are in model space and will be overidden by the prop's bounds if it's been set (using setBounds ())",
|
||||
@@ -5151,6 +5697,42 @@ return {
|
||||
type = "class",
|
||||
description = "Programmable shader class.",
|
||||
childs = {
|
||||
UNIFORM_COLOR = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
UNIFORM_FLOAT = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
UNIFORM_INT = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
UNIFORM_PEN_COLOR = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
UNIFORM_SAMPLER = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
UNIFORM_TRANSFORM = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
UNIFORM_VIEW_PROJ = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
UNIFORM_WORLD = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
UNIFORM_WORLD_VIEW_PROJ = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
clearUniform = {
|
||||
type = "function",
|
||||
description = "Clears a uniform mapping.",
|
||||
@@ -5217,6 +5799,50 @@ return {
|
||||
type = "class",
|
||||
description = "Sim timing and settings class.",
|
||||
childs = {
|
||||
EVENT_FINALIZE = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
SIM_LOOP_FORCE_STEP = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
SIM_LOOP_ALLOW_BOOST = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
SIM_LOOP_ALLOW_SPIN = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
SIM_LOOP_NO_DEFICIT = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
SIM_LOOP_NO_SURPLUS = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
SIM_LOOP_RESET_CLOCK = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
SIM_LOOP_ALLOW_SOAK = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
LOOP_FLAGS_DEFAULT = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
LOOP_FLAGS_FIXED = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
LOOP_FLAGS_MULTISTEP = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
DEFAULT_STEPS_PER_SECOND = {
|
||||
type = "value",
|
||||
description = "Value is 60",
|
||||
@@ -5435,6 +6061,18 @@ return {
|
||||
type = "class",
|
||||
description = "Interface for reading/writing binary data.",
|
||||
childs = {
|
||||
SEEK_CUR = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
SEEK_END = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
SEEK_SET = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
flush = {
|
||||
type = "function",
|
||||
description = "Forces any remaining buffered data into the stream.",
|
||||
@@ -5711,6 +6349,18 @@ return {
|
||||
type = "class",
|
||||
description = "The text box manages styling, laying out and displaying text. You can attach named styles to the text box to be applied to the text using style escapes. You can also inline style escapes to control color. Style escapes may be nested.</p>",
|
||||
childs = {
|
||||
LEFT_JUSTIFY = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
CENTER_JUSTIFY = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
RIGHT_JUSTIFY = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
clearHighlights = {
|
||||
type = "function",
|
||||
description = "Removes all highlights currently associated with the text box.",
|
||||
@@ -5927,6 +6577,30 @@ return {
|
||||
type = "class",
|
||||
description = "Base class for texture resources.",
|
||||
childs = {
|
||||
GL_LINEAR = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
GL_LINEAR_MIPMAP_LINEAR = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
GL_LINEAR_MIPMAP_NEAREST = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
GL_NEAREST = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
GL_NEAREST_MIPMAP_LINEAR = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
GL_NEAREST_MIPMAP_NEAREST = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
getSize = {
|
||||
type = "function",
|
||||
description = "Returns the width and height of the texture's source image. Avoid using the texture width and height to compute UV coordinates from pixels, as this will prevent texture resolution swapping.",
|
||||
@@ -6005,6 +6679,34 @@ return {
|
||||
type = "class",
|
||||
description = "Timer class for driving curves and animations.",
|
||||
childs = {
|
||||
NORMAL = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
REVERSE = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
CONTINUE = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
CONTINUE_REVERSE = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
LOOP = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
LOOP_REVERSE = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
PING_PONG = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
EVENT_TIMER_KEYFRAME = {
|
||||
type = "value",
|
||||
description = "ID of event stop callback. Signature is: nil onKeyframe ( MOAITimer self, number keyframe, number timesExecuted, number time, number value )",
|
||||
@@ -6069,6 +6771,22 @@ return {
|
||||
type = "class",
|
||||
description = "Multitouch sensor. Tracks up to 16 simultaneous touches.",
|
||||
childs = {
|
||||
TOUCH_DOWN = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
TOUCH_MOVE = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
TOUCH_UP = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
TOUCH_CANCEL = {
|
||||
type = "value",
|
||||
description = "",
|
||||
},
|
||||
down = {
|
||||
type = "function",
|
||||
description = "Checks to see if the screen was touched during the last iteration.",
|
||||
@@ -6724,7 +7442,7 @@ foreach my $cfile (@list) {
|
||||
# has closing */; just redo the processing if that's the case.
|
||||
redo if m!^\*/!;
|
||||
}
|
||||
push(@consts, [$1, $2]) if $lib && /\@const\s+(\S+)(?:\s+(.+))/;
|
||||
push(@consts, [$1, $2 || ""]) if $lib && /\@const\s+(\S+)(?:\s+(.+))?/;
|
||||
}
|
||||
}
|
||||
close(H);
|
||||
|
||||
BIN
bin/wx.dll
BIN
bin/wx.dll
Binary file not shown.
81
build/messages.lua
Normal file
81
build/messages.lua
Normal file
@@ -0,0 +1,81 @@
|
||||
-- This scrips extracts all text messages for ZeroBrane Studio and generates
|
||||
-- a file that can be used to provide translation to a particular language.
|
||||
-- The name of the file -- ll-cc.lua -- has two segments:
|
||||
-- ll (mandatory) -- two letter [language code](http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes);
|
||||
-- cc (optional) -- two letter [country code](http://en.wikipedia.org/wiki/ISO_3166-1#Officially_assigned_code_elements).
|
||||
|
||||
-- You can generate an empty file with all messages by running:
|
||||
-- > bin\lua.exe build/messages.lua
|
||||
-- You can also update an existing file with new messages by running:
|
||||
-- > bin\lua.exe build/messages.lua cfg/i18n/ru.lua
|
||||
|
||||
local iswindows = os.getenv('WINDIR') or (os.getenv('OS') or ''):match('[Ww]indows')
|
||||
if iswindows or not pcall(require, "wx") then
|
||||
package.cpath = (iswindows and 'bin/?.dll;' or 'bin/lib?.dylib;') .. package.cpath
|
||||
end
|
||||
|
||||
require "wx"
|
||||
|
||||
function FileSysGet(dir,spec)
|
||||
local content = {}
|
||||
local browse = wx.wxFileSystem()
|
||||
if not wx.wxFileName(dir):DirExists() then return content end
|
||||
local f = browse:FindFirst(dir,spec)
|
||||
while #f>0 do
|
||||
table.insert(content,(f:gsub("^file:",""))) -- drop file: protocol (wx2.9+)
|
||||
f = browse:FindNext()
|
||||
end
|
||||
return content
|
||||
end
|
||||
|
||||
function FileRead(file)
|
||||
local f = wx.wxFile(file, wx.wxFile.read)
|
||||
if not f:IsOpened() then
|
||||
error("Can't open file '"..file.."': "..wx.wxSysErrorMsg()) end
|
||||
local _, content = f:Read(f:Length())
|
||||
f:Close()
|
||||
return content
|
||||
end
|
||||
|
||||
local file = ... -- pass an existing file name as a parameter
|
||||
local messages = {}
|
||||
for _, mask in ipairs({"zbstudio/*.lua", "src/main.lua", "src/editor/*.lua"}) do
|
||||
for _, file in ipairs(FileSysGet(mask, wx.wxFILE)) do
|
||||
local content = FileRead(file)
|
||||
for msg in content:gmatch("[^%w]TR(%b())") do
|
||||
-- remove brackets aroung ("foo")
|
||||
-- extract message from ("foo", count)
|
||||
msg = msg:gsub("^%(", ""):gsub("%)$", ""):gsub([[(["']), .+]], "%1")
|
||||
messages[msg] = messages[msg] or {}
|
||||
messages[msg][file] = (messages[msg][file] or 0) + 1
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local existing = {}
|
||||
if file then
|
||||
local content = FileRead(file)
|
||||
for msg, translation in content:gmatch("%s*%[([^%]]+)%]%s*=%s*([^\010\013]+)") do
|
||||
if not translation:find('^nil') then existing[tonumber(msg) or msg] = translation end
|
||||
end
|
||||
end
|
||||
|
||||
local plural = existing[0] and (" [0] = "..existing[0].."\n") or ""
|
||||
existing[0] = nil
|
||||
|
||||
local msgs = {}
|
||||
for m, files in pairs(messages) do
|
||||
local str = " ["..m.."] = "..(existing[m] or 'nil, --')
|
||||
str = str:gsub(" %-%-.*$", "").." -- "
|
||||
for f in pairs(files) do str = str .. f .. ", " end
|
||||
msgs[#msgs+1] = str:gsub(", $", "")
|
||||
existing[m] = nil -- remove from the list of existing elements
|
||||
end
|
||||
|
||||
table.sort(msgs)
|
||||
print("return {\n"..plural..table.concat(msgs, "\n").."\n}")
|
||||
if next(existing) then
|
||||
local str = "-- no match found for the following elements: "
|
||||
for msg in pairs(existing) do str = str .. msg .. ", " end
|
||||
print((str:gsub(", $", "")))
|
||||
end
|
||||
@@ -1,38 +0,0 @@
|
||||
styles = {
|
||||
-- lexer specific (inherit fg/bg from text)
|
||||
lexerdef = {fg = {128, 128, 128},},
|
||||
comment = {fg = {0, 127, 0 },bg = {240, 240, 220}, fill= true,},
|
||||
stringtxt = {fg = {127, 0, 127},},
|
||||
stringeol = {fg = {0, 0, 0 },bg = {224, 192, 224}, fill = true, },
|
||||
preprocessor = {fg = {127, 127, 0 },},
|
||||
operator = {fg = {0, 0, 0 },},
|
||||
number = {fg = {90, 100, 0 },},
|
||||
|
||||
keywords0 = {fg = {0, 0, 127}, b = true,},
|
||||
keywords1 = {fg = {127, 0, 0}, b = true,},
|
||||
keywords2 = {fg = {0, 127, 0}, b = true,},
|
||||
keywords3 = {fg = {0, 0, 127}, b = true,},
|
||||
keywords4 = {fg = {127, 0, 95}, b = true,},
|
||||
keywords5 = {fg = {35, 95, 175}, b = true,},
|
||||
keywords6 = {fg = {0, 127, 127}, b = true,},
|
||||
keywords7 = {fg = {240, 255, 255}, b = true,},
|
||||
|
||||
-- common (inherit fg/bg from text)
|
||||
text = nil, -- let os pick
|
||||
linenumber = {fg = {90, 90, 80},},
|
||||
bracematch = {fg = {0, 0, 255}, b = true},
|
||||
bracemiss = {fg = {255, 0, 0 }, b = true},
|
||||
ctrlchar = nil,
|
||||
indent = {fg = {192, 192, 192},bg = {255, 255, 255},},
|
||||
calltip = nil,
|
||||
|
||||
-- common special (need custom fg & bg)
|
||||
calltipbg = nil,
|
||||
sel = nil,
|
||||
caret = nil,
|
||||
caretlinebg = nil,
|
||||
fold = nil,
|
||||
whitespace = {fg = {180, 180, 180,},},
|
||||
|
||||
fncall = {fg = {175,175,255}, st= wxstc.wxSTC_INDIC_BOX},
|
||||
}
|
||||
@@ -1,38 +0,0 @@
|
||||
styles = {
|
||||
-- lexer specific (inherit fg/bg from text)
|
||||
lexerdef = {fg = {128, 128, 128},},
|
||||
comment = {fg = {200, 230, 120 },bg = {30, 40, 30 }, fill= true,},
|
||||
stringtxt = {fg = {240,128,240},},
|
||||
stringeol = {fg = {240,128,200},bg = {48, 24, 24}, fill = true,},
|
||||
preprocessor = {fg = {220,175,140},},
|
||||
operator = {fg = {210, 230, 240 },},
|
||||
number = {fg = {210, 230, 255, },},
|
||||
|
||||
keywords0 = {fg = {240,240,0}},
|
||||
keywords1 = {fg = {255,64,64},},
|
||||
keywords2 = {fg = {0,240,240},},
|
||||
keywords3 = {fg = {140,140,240},},
|
||||
keywords4 = {fg = {255, 128, 0},},
|
||||
keywords5 = {fg = {200,200,240},},
|
||||
keywords6 = {fg = {64, 250, 64},},
|
||||
keywords7 = {fg = {255, 128, 128},},
|
||||
|
||||
-- common (inherit fg/bg from text)
|
||||
text = {fg = {240,240,240},bg = {24,24,24},},
|
||||
linenumber = {fg = {30, 30, 40},bg = {230, 230, 230},},
|
||||
bracematch = {fg = {255, 127, 0}, b = true},
|
||||
bracemiss = {fg = {255, 0,0}, b = true},
|
||||
ctrlchar = nil,
|
||||
indent = {fg = {80, 80, 80},bg = {24,24,24},},
|
||||
calltip = {fg = {255,255,255},bg = {10,10,10},},
|
||||
|
||||
-- common special (need custom fg & bg)
|
||||
calltipbg = {fg = {240,240,240},bg = {10,10,10},},
|
||||
sel = {fg = {180,220,140},bg = {70,105,100},},
|
||||
caret = {fg = {250,250,250},},
|
||||
caretlinebg = {fg = {180,220,140},bg = {24,44,44},},
|
||||
fold = nil,
|
||||
whitespace = {fg = {54,54,54},},
|
||||
|
||||
fncall = {fg = {140,140,0}, st = wxstc.wxSTC_INDIC_BOX},
|
||||
}
|
||||
@@ -1,38 +0,0 @@
|
||||
styles = {
|
||||
-- lexer specific (inherit fg/bg from text)
|
||||
lexerdef = {fg = {128, 128, 128},},
|
||||
comment = {fg = {100, 155, 65}, bg = {30, 35, 30 }, fill= true,},
|
||||
stringtxt = {fg = {200, 145, 145},},
|
||||
stringeol = {fg = {200, 145, 145},bg = {48, 24, 24}, fill = true,},
|
||||
preprocessor = {fg = {220, 175, 140},},
|
||||
operator = {fg = {210, 230, 240 },},
|
||||
number = {fg = {210, 230, 255, },},
|
||||
|
||||
keywords0 = {fg = {128,128,255},},
|
||||
keywords1 = {fg = {210,90,90},},
|
||||
keywords2 = {fg = {0,220,220},},
|
||||
keywords3 = {fg = {220,220,0},},
|
||||
keywords4 = {fg = {240, 128,0},},
|
||||
keywords5 = {fg = {200,200,240},},
|
||||
keywords6 = {fg = {64, 240, 64},},
|
||||
keywords7 = {fg = {255, 128, 128},},
|
||||
|
||||
-- common (inherit fg/bg from text)
|
||||
text = {fg = {200,200,200},bg = {18,24,26},},
|
||||
linenumber = {fg = {30, 30, 40},bg = {230, 230, 230},},
|
||||
bracematch = {fg = {255, 127, 0}, b = true},
|
||||
bracemiss = {fg = {255, 0,0}, b = true},
|
||||
ctrlchar = nil,
|
||||
indent = {fg = {80, 80, 80},bg = {24,24,24},},
|
||||
calltip = {fg = {255,255,255},bg = {10,10,10},},
|
||||
|
||||
-- common special (need custom fg & bg)
|
||||
calltipbg = {fg = {240,240,240},bg = {10,10,10},},
|
||||
sel = {fg = {180,220,140},bg = {70,105,100},},
|
||||
caret = {fg = {250,250,250},},
|
||||
caretlinebg = {fg = {180,220,140},bg = {24,44,44},},
|
||||
fold = nil,
|
||||
whitespace = {fg = {54,54,54},},
|
||||
|
||||
fncall = {fg = {75,75,150}, st= wxstc.wxSTC_INDIC_BOX},
|
||||
}
|
||||
@@ -1,67 +1,20 @@
|
||||
local G = ... -- point to the global environment in the script
|
||||
-- update app configuration to load all tools, specs, and interpreters
|
||||
G.ide.app.loadfilters.tools = function() return true end
|
||||
G.ide.app.loadfilters.specs = function() return true end
|
||||
G.ide.app.loadfilters.interpreters = function() return true end
|
||||
-- If you have used Estrela before, please copy this content
|
||||
-- to your user.lua file in the cfg/ directory
|
||||
|
||||
-- load all tools, specs, and interpreters
|
||||
local all = function() return true end
|
||||
load.tools(all)
|
||||
load.specs(all)
|
||||
load.interpreters(all)
|
||||
|
||||
-- this flag means that toggling between projects, will not affect the
|
||||
-- list of opened files (old estrela default).
|
||||
-- zbstudio defaults here to true, meaning that you get
|
||||
-- per-project list of openend files
|
||||
projectautoopen = false
|
||||
|
||||
-- default search paths for luxinia
|
||||
local luxpath = os.getenv("LUXINIA")
|
||||
path.luxinia = luxpath and luxpath.."/" or "../luxinia/engine/"
|
||||
local luxpath2 = os.getenv("LUXINIA2")
|
||||
path.luxinia2 = luxpath2 and luxpath2.."/" or "../luxinia2/runtime/bin_Windows_x86/"
|
||||
|
||||
interpreter = "luadeb"
|
||||
|
||||
editor.fontname = "Courier New"
|
||||
editor.caretline = true
|
||||
editor.showfncall = true
|
||||
editor.whitespace = true
|
||||
editor.usetabs = false
|
||||
editor.autotabs = true
|
||||
editor.tabwidth = 2
|
||||
|
||||
filehistorylength = 20
|
||||
|
||||
singleinstance = true
|
||||
singleinstanceport = 0xe493
|
||||
acandtip.shorttip = true
|
||||
acandtip.nodynwords = true
|
||||
acandtip.ignorecase = true
|
||||
|
||||
styles = {
|
||||
-- lexer specific (inherit fg/bg from text)
|
||||
lexerdef = {fg = {128, 128, 128},},
|
||||
comment = {fg = {0, 127, 0 },bg = {240, 240, 220}, fill= true,},
|
||||
stringtxt = {fg = {127, 0, 127},},
|
||||
stringeol = {fg = {0, 0, 0 },bg = {224, 192, 224}, fill = true, },
|
||||
preprocessor = {fg = {127, 127, 0 },},
|
||||
operator = {fg = {0, 0, 0 },},
|
||||
number = {fg = {90, 100, 0 },},
|
||||
|
||||
keywords0 = {fg = {0, 0, 127}, b = true,},
|
||||
keywords1 = {fg = {127, 0, 0}, b = true,},
|
||||
keywords2 = {fg = {0, 127, 0}, b = true,},
|
||||
keywords3 = {fg = {0, 0, 127}, b = true,},
|
||||
keywords4 = {fg = {127, 0, 95}, b = true,},
|
||||
keywords5 = {fg = {35, 95, 175}, b = true,},
|
||||
keywords6 = {fg = {0, 127, 127}, b = true,},
|
||||
keywords7 = {fg = {240, 255, 255}, b = true,},
|
||||
|
||||
-- common (inherit fg/bg from text)
|
||||
text = nil, -- let os pick
|
||||
linenumber = {fg = {90, 90, 80},},
|
||||
bracematch = {fg = {0, 0, 255}, b = true},
|
||||
bracemiss = {fg = {255, 0, 0 }, b = true},
|
||||
ctrlchar = nil,
|
||||
indent = {fg = {192, 192, 192},bg = {255, 255, 255},},
|
||||
calltip = nil,
|
||||
|
||||
-- common special (need custom fg & bg)
|
||||
calltipbg = nil,
|
||||
sel = nil,
|
||||
caret = nil,
|
||||
caretlinebg = nil,
|
||||
fold = nil,
|
||||
whitespace = nil,
|
||||
|
||||
fncall = {fg = {175,175,255}, st= wxstc.wxSTC_INDIC_BOX},
|
||||
}
|
||||
|
||||
4
cfg/i18n/en.lua
Normal file
4
cfg/i18n/en.lua
Normal file
@@ -0,0 +1,4 @@
|
||||
return {
|
||||
[0] = function(c) return c == 1 and 1 or 2 end, -- plural
|
||||
["traced %d instruction"] = {"traced %d instruction", "traced %d instructions"}, -- src\editor\debugger.lua
|
||||
}
|
||||
193
cfg/i18n/es.lua
Normal file
193
cfg/i18n/es.lua
Normal file
@@ -0,0 +1,193 @@
|
||||
-- Traducción realiazada por Iñigo Sola
|
||||
-- para la versión ZeroBrane Studio 17bdb48
|
||||
-- 10 de Noviembre de 2012
|
||||
return {
|
||||
[0] = function(c) return c == 1 and 1 or 2 end, -- plural
|
||||
["&About"] = "&Acerca de...", -- src\editor\menu_help.lua
|
||||
["&Add Watch"] = "Añadir observación", -- src\editor\debugger.lua
|
||||
["&Break"] = "Ruptura", -- src\editor\menu_project.lua
|
||||
["&Close page"] = "Cerrar página", -- src\editor\menu_file.lua
|
||||
["&Compile"] = "Compilar", -- src\editor\menu_project.lua
|
||||
["&Copy"] = "Copiar", -- src\editor\editor.lua, src\editor\menu_edit.lua
|
||||
["&Default Layout"] = "Diseño por defecto", -- src\editor\menu_view.lua
|
||||
["&Edit Watch"] = "Editar observación", -- src\editor\debugger.lua
|
||||
["&Edit"] = "Editar", -- src\editor\menu_edit.lua
|
||||
["&File"] = "Archivo", -- src\editor\menu_file.lua
|
||||
["&Find"] = "Buscar", -- src\editor\menu_search.lua
|
||||
["&Fold/Unfold All"] = "Plegar/desplegar todo", -- src\editor\menu_edit.lua
|
||||
["&Goto Line"] = "Ir a línea", -- src\editor\menu_search.lua
|
||||
["&Help"] = "Ayuda", -- src\editor\menu_help.lua
|
||||
["&New"] = "&Nuevo", -- src\editor\menu_file.lua
|
||||
["&Open..."] = "&Abrir...", -- src\editor\menu_file.lua
|
||||
["&Output/Console Window"] = "Salida/Consola", -- src\editor\menu_view.lua
|
||||
["&Paste"] = "Pegar", -- src\editor\editor.lua, src\editor\menu_edit.lua
|
||||
["&Project"] = "Proyecto", -- src\editor\menu_project.lua, src\editor\inspect.lua
|
||||
["&Redo"] = "Rehacer", -- src\editor\editor.lua, src\editor\menu_edit.lua
|
||||
["&Remove Watch"] = "Eliminar observación", -- src\editor\debugger.lua
|
||||
["&Replace"] = "Remplazar", -- src\editor\menu_search.lua
|
||||
["&Run"] = "Ejecutar", -- src\editor\menu_project.lua
|
||||
["&Save"] = "Guardar", -- src\editor\menu_file.lua
|
||||
["&Search"] = "Buscar", -- src\editor\menu_search.lua
|
||||
["&Sort"] = "Clasificar", -- src\editor\menu_search.lua
|
||||
["&Stack Window"] = "Ventana de la pila de ejecución", -- src\editor\menu_view.lua
|
||||
["&Start Debugger Server"] = "Lanzar servidor de depuración", -- src\editor\menu_project.lua
|
||||
["&Undo"] = "Deshacer", -- src\editor\editor.lua, src\editor\menu_edit.lua
|
||||
["&View"] = "Ver", -- src\editor\menu_view.lua
|
||||
["&Watch Window"] = "Ventana de observaciones", -- src\editor\menu_view.lua
|
||||
["&Watches"] = "Observaciones", -- src\editor\debugger.lua
|
||||
["About ZeroBrane Studio"] = "Acerca de ZeroBrane Studio", -- src\editor\menu_help.lua
|
||||
["Add Watch Expression"] = "Añadir expresión de observación", -- src\editor\editor.lua
|
||||
["Add to Scratchpad"] = "Añadir al borrador", -- src\editor\editor.lua
|
||||
["All files"] = "Todos los archivos", -- src\editor\commands.lua
|
||||
["Allow external process to start debugging"] = "Permitir proceso externo para iniciar depuración", -- src\editor\menu_project.lua
|
||||
["Analyze the source code"] = "Analizar el código fuente", -- src\editor\inspect.lua
|
||||
["Analyze"] = "Analizar", -- src\editor\inspect.lua
|
||||
["Auto Complete Identifiers"] = "Autocompletar identificadores", -- src\editor\menu_edit.lua
|
||||
["Auto complete while typing"] = "Autocompletar mientras se escribe", -- src\editor\menu_edit.lua
|
||||
["Break execution at the next executed line of code"] = "Parar ejecución en la siguiente línea de código", -- src\editor\menu_project.lua, src\editor\gui.lua
|
||||
["C&lear Output Window"] = "Limpiar ventana de Salida", -- src\editor\menu_project.lua
|
||||
["C&omment/Uncomment"] = "Comentar/descomentar", -- src\editor\menu_edit.lua
|
||||
["Can't debug the script in the active editor window."] = "No se puede depurar el script en la ventana activa del editor", -- src\editor\debugger.lua
|
||||
["Can't find file '%s' in the current project to activate for debugging. Update the project or open the file in the editor before debugging."] = "No se puede encontrar el archivo '%s' en el proyecto actual para activar la depuración. Actualiza el proyecto o abre el archivo en el editor antes de depurar.", -- src\editor\debugger.lua
|
||||
["Can't process auto-recovery record; invalid format: %s."] = "No se puede procesar la autorrecuperación; formato inválido: %s.", -- src\editor\commands.lua
|
||||
["Can't run the entry point script ('%s')."] = "No se pude ejecutar el punto de entrada del script (%s).", -- src\editor\debugger.lua
|
||||
["Can't start debugging session due to internal error '%s'."] = "No se puede iniciar la sesión de depuración debido a un error interno '%s'.'", -- src\editor\debugger.lua
|
||||
["Can't start debugging without an opened file or with the current file not being saved ('%s')."] = "No se puede iniciar la depuración sin abrir un archivo o si no ha sido guardado ('%s').", -- src\editor\debugger.lua
|
||||
["Choose a project directory"] = "Elegir el directorio del proyecto", -- src\editor\menu_project.lua
|
||||
["Clear &Dynamic Words"] = "Limpiar las palabras dinámicas", -- src\editor\menu_edit.lua
|
||||
["Clear the output window before compiling or debugging"] = "Limpiar la ventana de salida antes de compilar o depurar", -- src\editor\menu_project.lua
|
||||
["Close the current editor window"] = "Cerrar la ventana actual del editor", -- src\editor\menu_file.lua
|
||||
["Co&ntinue"] = "Continuar", -- src\editor\menu_project.lua
|
||||
["Col: %d"] = "Col: %d", -- src\editor\editor.lua
|
||||
["Comment or uncomment current or selected lines"] = {"Comentar o descomentar la línea activa (seleccionada)","Comentar o descomentar las líneas activas (seleccionadas)"}, -- src\editor\menu_edit.lua
|
||||
["Compilation error"] = "Error de compilación", -- src\editor\debugger.lua, src\editor\commands.lua
|
||||
["Compilation successful; %.0f%% success rate (%d/%d)."] = "Compilación exitosa; factor de éxito: %.0f%% (%d/%d).", -- src\editor\commands.lua
|
||||
["Compile the current file"] = "Compilar el archivo actual", -- src\editor\menu_project.lua
|
||||
["Complete &Identifier"] = "Completar identificador", -- src\editor\menu_edit.lua
|
||||
["Complete the current identifier"] = "Completar el actual identificador", -- src\editor\menu_edit.lua
|
||||
["Copy selected text to clipboard"] = "Copiar el texto seleccionado al portapapeles", -- src\editor\menu_edit.lua, src\editor\gui.lua
|
||||
["Couldn't activate file '%s' for debugging; continuing without it."] = "No se pudo activar el archivo '%s' para la depuración; continuar sin él.", -- src\editor\debugger.lua
|
||||
["Create an empty document"] = "Crear un documento en blanco", -- src\editor\menu_file.lua, src\editor\gui.lua
|
||||
["Cu&t"] = "Cortar", -- src\editor\editor.lua, src\editor\menu_edit.lua
|
||||
["Cut selected text to clipboard"] = "Cortar el texto selecionado al portapapeles", -- src\editor\menu_edit.lua, src\editor\gui.lua
|
||||
["Debugger server started at %s:%d."] = "Servidor de depuración inciado en %s:%s", -- src\editor\debugger.lua
|
||||
["Debugging session completed (%s)."] = "Sesión de depuración completada (%s).", -- src\editor\debugger.lua
|
||||
["Debugging session started in '%s'."] = "Sesión de depuración iniciada en '%s'.", -- src\editor\debugger.lua
|
||||
["Do you want to reload it?"] = "¿Quieres recargarlo?", -- src\editor\editor.lua
|
||||
["Do you want to save the changes to '%s'?"] = "¿Quieres guardar los cambios en '%s'?", -- src\editor\commands.lua
|
||||
["E&xit"] = "Salir", -- src\editor\menu_file.lua
|
||||
["Enter Lua code and press Enter to run it."] = "Introduce código Lua y pulsa <Entrer> para ejecutarlo.", -- src\editor\shellbox.lua
|
||||
["Enter line number"] = "Introduce número de línea", -- src\editor\menu_search.lua
|
||||
["Error while loading API file: %s"] = "Error mientras se cargaba el archivo de API: %s", -- src\editor\autocomplete.lua
|
||||
["Error while processing API file: %s"] = "Error mientras se procesaba el archivo de API: %s", -- src\editor\autocomplete.lua
|
||||
["Error"] = "Error", -- src\editor\commands.lua
|
||||
["Evaluate &Watches"] = "Evaluar las observaciones", -- src\editor\debugger.lua
|
||||
["Evaluate in Console"] = "Evaluar en consola", -- src\editor\editor.lua
|
||||
["Execute the current project/file and keep updating the code to see immediate results"] = "Ejecutar el proyecto/archivo actual y manteniendo actualizado el código para ver resultados en tiempo real", -- src\editor\menu_project.lua
|
||||
["Execute the current project/file"] = "Ejecutar el proyecto/archivo actual", -- src\editor\menu_project.lua
|
||||
["Execution error"] = "Error de ejecución", -- src\editor\debugger.lua
|
||||
["Exit program"] = "Salir del programa", -- src\editor\menu_file.lua
|
||||
["Expr"] = "Expr.", -- src\editor\debugger.lua
|
||||
["Expression"] = "Expresión", -- src\editor\debugger.lua
|
||||
["File '%s' has been modified on disk."] = "El archivo '%s' ha sido modificado en el disco.", -- src\editor\editor.lua
|
||||
["File '%s' has more recent timestamp than restored '%s'; please review before saving."] = "El archivo '%s' tiene una fecha más reciente que el restaurado '%s'; por favor, revísalo antes de guardar.", -- src\editor\commands.lua
|
||||
["File '%s' no longer exists."] = "El archivo '%s' no existe.", -- src\editor\editor.lua
|
||||
["File history"] = "Historial de archivos", -- src\editor\menu_file.lua
|
||||
["Find &In Files"] = "Buscar en archivos", -- src\editor\menu_search.lua
|
||||
["Find &Next"] = "Buscar siguiente", -- src\editor\menu_search.lua
|
||||
["Find &Previous"] = "Buscar anterior", -- src\editor\menu_search.lua
|
||||
["Find and replace text in files"] = "Buscar y remplazar texto en archivos", -- src\editor\menu_search.lua
|
||||
["Find and replace text"] = "Buscar y rempleazar texto", -- src\editor\menu_search.lua, src\editor\gui.lua
|
||||
["Find text in files"] = "Buscar texto en archivos", -- src\editor\menu_search.lua
|
||||
["Find text"] = "Buscar texto", -- src\editor\menu_search.lua, src\editor\gui.lua
|
||||
["Find the earlier text occurence"] = "Buscar la anterior aparición del texto", -- src\editor\menu_search.lua
|
||||
["Find the next text occurrence"] = "Buscar la siguiente aparecición del texto", -- src\editor\menu_search.lua
|
||||
["Fold or unfold all code folds"] = "Plegar o desplegar todo el código plegado", -- src\editor\menu_edit.lua
|
||||
["Found auto-recovery record and restored saved session."] = "Encontrada autorrecuperación y sesión restaurada.", -- src\editor\commands.lua
|
||||
["Full &Screen"] = "Pantalla completa", -- src\editor\menu_view.lua
|
||||
["Go to a selected line"] = "Ir a línea seleccionada", -- src\editor\menu_search.lua
|
||||
["Goto Line"] = "Ir a línea", -- src\editor\menu_search.lua
|
||||
["INS"] = "INS", -- src\editor\editor.lua
|
||||
["Jump to a function definition..."] = "Saltar a la definición de la función...", -- src\editor\editor.lua
|
||||
["Known Files"] = "Archivos conocidos", -- src\editor\commands.lua
|
||||
["Ln: %d"] = "Ln: %d", -- src\editor\editor.lua
|
||||
["Local console"] = "Consola local", -- src\editor\shellbox.lua, src\editor\gui.lua
|
||||
["Lua &Interpreter"] = "Intérprete Lua", -- src\editor\menu_project.lua
|
||||
["OVR"] = "OVR", -- src\editor\editor.lua
|
||||
["Open an existing document"] = "Abrir un documento existente", -- src\editor\menu_file.lua, src\editor\gui.lua
|
||||
["Open file"] = "Abrir archivo", -- src\editor\commands.lua
|
||||
["Output (running)"] = "Salida (en ejecución)", -- src\editor\output.lua
|
||||
["Output"] = "Salida", -- src\editor\output.lua, src\editor\settings.lua, src\editor\gui.lua
|
||||
["Paste text from the clipboard"] = "Pegar texto desde el portapapeles", -- src\editor\menu_edit.lua, src\editor\gui.lua
|
||||
["Prepend '=' to show complex values on multiple lines."] = "Antepón '=' para ver valores complejos en líneas múltiples", -- src\editor\shellbox.lua
|
||||
["Press cancel to abort."] = "Presiona cancelar para abortar.", -- src\editor\commands.lua
|
||||
["Program '%s' started in '%s' (pid: %d)."] = "Programa '%s' iniciado en '%s' (pid: %d).", -- src\editor\output.lua
|
||||
["Program can't start because conflicting process is running as '%s'."] = "El programa no puede iniciarse porque hay un proceso conflictivo en ejecución como '%s'.", -- src\editor\output.lua
|
||||
["Program completed in %.2f seconds (pid: %d)."] = "Programa completado en %.2f segundos (pid: %d).", -- src\editor\output.lua
|
||||
["Program starting as '%s'."] = "Programa iniciado como '%s'.", -- src\editor\output.lua
|
||||
["Program stopped (pid: %d)."] = "Programa parado (pid: %d).", -- src\editor\debugger.lua
|
||||
["Program unable to run as '%s'."] = "No se puede ejecutar el programa como '%s'.", -- src\editor\output.lua
|
||||
["Project"] = "Proyecto", -- src\editor\settings.lua, src\editor\gui.lua
|
||||
["Project/&FileTree Window"] = "Ventana de proyecto/árbol de archivos", -- src\editor\menu_view.lua
|
||||
["R/O"] = "R/O", -- src\editor\editor.lua
|
||||
["R/W"] = "R/W", -- src\editor\editor.lua
|
||||
["Re&place In Files"] = "Remplazar en archivos", -- src\editor\menu_search.lua
|
||||
["Recent Files"] = "Archivos recientes", -- src\editor\menu_file.lua
|
||||
["Redo last edit undone"] = "Rehacer la última edición deshecha", -- src\editor\menu_edit.lua, src\editor\gui.lua
|
||||
["Refused a request to start a new debugging session as there is one in progress already."] = "No se pudo lanzar una nueva sesión de depuración porque ya hay una en curso.", -- src\editor\debugger.lua
|
||||
["Remote console"] = "Consola remota", -- src\editor\shellbox.lua
|
||||
["Reset to default layout"] = "Restablecer el diseño por defecto", -- src\editor\menu_view.lua
|
||||
["Resets the dynamic word list for autocompletion"] = "Restablecer la lista dinámica de palabras para autocompletado", -- src\editor\menu_edit.lua
|
||||
["Run as Scratchpad"] = "Ejecutar como borrador", -- src\editor\menu_project.lua
|
||||
["S&top Debugging"] = "Parar depuración", -- src\editor\menu_project.lua
|
||||
["S&top Process"] = "Parar proceso", -- src\editor\menu_project.lua
|
||||
["Save &As..."] = "Guardar como...", -- src\editor\menu_file.lua
|
||||
["Save A&ll"] = "Guardar todo", -- src\editor\menu_file.lua
|
||||
["Save Changes?"] = "¿Guardar cambios?", -- src\editor\commands.lua
|
||||
["Save all open documents"] = "Guardar todos los documentos abiertos", -- src\editor\menu_file.lua, src\editor\gui.lua
|
||||
["Save file as"] = "Guardar archivo como", -- src\editor\commands.lua
|
||||
["Save file?"] = "¿Guardar archivo?", -- src\editor\commands.lua
|
||||
["Save the current document to a file with a new name"] = "Guardar el documento actual en un archivo con un nombre nuevo", -- src\editor\menu_file.lua
|
||||
["Save the current document"] = "Guardar el documento actual", -- src\editor\menu_file.lua, src\editor\gui.lua
|
||||
["Saved auto-recover at %s."] = "Guardar autorrecuperación en %s.", -- src\editor\commands.lua
|
||||
["Scratchpad error"] = "Error en el borrador", -- src\editor\debugger.lua
|
||||
["Select &All"] = "Seleccionar todo", -- src\editor\editor.lua, src\editor\menu_edit.lua
|
||||
["Select all text in the editor"] = "Seleccionar todo el texto en el editor", -- src\editor\menu_edit.lua
|
||||
["Set project directory from current file"] = "Establecer el directorio del proyecto del archivo actual", -- src\editor\gui.lua
|
||||
["Set the interpreter to be used"] = "Establecer el intérprete a ser usado", -- src\editor\menu_project.lua
|
||||
["Show &Tooltip"] = "Ver tooltip", -- src\editor\menu_edit.lua
|
||||
["Show tooltip for current position; place cursor after opening bracket of function"] = "Ver tooltip para la posición actual; posicionar el cursor después de abrir el paréntisis de los argumentos de la función", -- src\editor\menu_edit.lua
|
||||
["Sort selected lines"] = "Clasificar las líneas seleccionadas", -- src\editor\menu_search.lua
|
||||
["Stack Window"] = "Ventana de la pila de ejecución", -- src\editor\debugger.lua
|
||||
["Start &Debugging"] = "Comenzar depuración", -- src\editor\menu_project.lua
|
||||
["Start debugging"] = "Comenzar depuración", -- src\editor\menu_project.lua, src\editor\gui.lua
|
||||
["Step &Into"] = "Paso dentro", -- src\editor\menu_project.lua
|
||||
["Step &Over"] = "Paso sin entrar", -- src\editor\menu_project.lua
|
||||
["Step O&ut"] = "Paso fuera", -- src\editor\menu_project.lua
|
||||
["Step into"] = "Paso dentro", -- src\editor\menu_project.lua, src\editor\gui.lua
|
||||
["Step out of the current function"] = "Hasta salir de la función actual", -- src\editor\menu_project.lua, src\editor\gui.lua
|
||||
["Step over"] = "Paso sin entrar", -- src\editor\menu_project.lua, src\editor\gui.lua
|
||||
["Stop the currently running process"] = "Parar el proceso en ejecución", -- src\editor\menu_project.lua, src\editor\gui.lua
|
||||
["Switch to or from full screen mode"] = "Conmutar el modo de pantalla completa", -- src\editor\menu_view.lua
|
||||
["The API file must be located in a subdirectory of the API directory."] = "El archivo de API debe ser almacenado en un subdirectorio del directorio de API.", -- src\editor\autocomplete.lua
|
||||
["Toggle Break&point"] = "Conmutar punto de ruptura", -- src\editor\menu_project.lua
|
||||
["Toggle breakpoint"] = "Conmutar punto de ruptura", -- src\editor\menu_project.lua, src\editor\gui.lua
|
||||
["Tr&ace"] = "Traza", -- src\editor\menu_project.lua
|
||||
["Trace execution showing each executed line"] = "Traza de ejecución mostrando cada línea ejecutada", -- src\editor\menu_project.lua
|
||||
["Unable to load file '%s'."] = "No se pudo cargar el archivo '%s'.", -- src\editor\commands.lua
|
||||
["Unable to save file '%s': %s"] = "No se pudo guardar el archivo '%s': %s", -- src\editor\commands.lua
|
||||
["Unable to stop program (pid: %d), code %d."] = "No se puedo parar el programa (pid: %d), código %d.", -- src\editor\debugger.lua
|
||||
["Undo last edit"] = "Deshacer la última edición", -- src\editor\menu_edit.lua, src\editor\gui.lua
|
||||
["Use 'clear' to clear the shell output and the history."] = "Usa 'clear' para limpiar la consola de salida y el historial.", -- src\editor\shellbox.lua
|
||||
["Use Shift-Enter for multiline code."] = "Usa <Shift-Enter> para código multilínea.", -- src\editor\shellbox.lua
|
||||
["Value"] = "Valor", -- src\editor\debugger.lua
|
||||
["View the output/console window"] = "Ver ventana de salida/consola", -- src\editor\menu_view.lua
|
||||
["View the project/filetree window"] = "Ver la ventana de proyecto/árbol de archivos", -- src\editor\menu_view.lua
|
||||
["View the stack window"] = "Ver la ventana de la pila de ejecución", -- src\editor\menu_view.lua, src\editor\gui.lua
|
||||
["View the watch window"] = "Ver la ventana de observación", -- src\editor\menu_view.lua, src\editor\gui.lua
|
||||
["Watch Window"] = "Ventana de observación", -- src\editor\debugger.lua
|
||||
["Welcome to the interactive Lua interpreter."] = "Bienvenido al intérprete interactico de Lua.", -- src\editor\shellbox.lua
|
||||
["You must save the program first."] = "Debes guardar el programa primero", -- src\editor\commands.lua
|
||||
["on line %d"] = "en la línea %d", -- src\editor\debugger.lua, src\editor\commands.lua
|
||||
["traced %d instruction"] = {"%d instrucción trazada", "%d instrucciones trazadas"} -- src\editor\debugger.lua
|
||||
}
|
||||
190
cfg/i18n/fr.lua
Normal file
190
cfg/i18n/fr.lua
Normal file
@@ -0,0 +1,190 @@
|
||||
return {
|
||||
[0] = function(c) return c == 1 and 1 or 2 end, -- plural
|
||||
["&About"] = "&A propos", -- src\editor\menu_help.lua
|
||||
["&Add Watch"] = "Ajouter un point d'observation", -- src\editor\debugger.lua
|
||||
["&Break"] = "Interrompre", -- src\editor\menu_project.lua
|
||||
["&Close page"] = "Fermer la page", -- src\editor\menu_file.lua
|
||||
["&Compile"] = "Compiler", -- src\editor\menu_project.lua
|
||||
["&Copy"] = "Copier", -- src\editor\editor.lua, src\editor\menu_edit.lua
|
||||
["&Default Layout"] = "Affichage par défaut", -- src\editor\menu_view.lua
|
||||
["&Edit Watch"] = "Editer le point d'observation", -- src\editor\debugger.lua
|
||||
["&Edit"] = "Editer", -- src\editor\menu_edit.lua
|
||||
["&File"] = "Fichier", -- src\editor\menu_file.lua
|
||||
["&Find"] = "Trouver", -- src\editor\menu_search.lua
|
||||
["&Fold/Unfold All"] = "Replier/Déplier tout", -- src\editor\menu_edit.lua
|
||||
["&Goto Line"] = "Aller à la ligne", -- src\editor\menu_search.lua
|
||||
["&Help"] = "Aide", -- src\editor\menu_help.lua
|
||||
["&New"] = "&Nouveau", -- src\editor\menu_file.lua
|
||||
["&Open..."] = "&Ouvrir", -- src\editor\menu_file.lua
|
||||
["&Output/Console Window"] = "Sortie/Console", -- src\editor\menu_view.lua
|
||||
["&Paste"] = "Coller", -- src\editor\editor.lua, src\editor\menu_edit.lua
|
||||
["&Project"] = "Projet", -- src\editor\menu_project.lua, src\editor\inspect.lua
|
||||
["&Redo"] = "Répéter", -- src\editor\editor.lua, src\editor\menu_edit.lua
|
||||
["&Remove Watch"] = "Supprimer le point d'observation", -- src\editor\debugger.lua
|
||||
["&Replace"] = "Remplacer", -- src\editor\menu_search.lua
|
||||
["&Run"] = "Exécuter", -- src\editor\menu_project.lua
|
||||
["&Save"] = "Enregister", -- src\editor\menu_file.lua
|
||||
["&Search"] = "Rechercher", -- src\editor\menu_search.lua
|
||||
["&Sort"] = "Trier", -- src\editor\menu_search.lua
|
||||
["&Stack Window"] = "Pile d'exécution", -- src\editor\menu_view.lua
|
||||
["&Start Debugger Server"] = "Lancer le débogueur", -- src\editor\menu_project.lua
|
||||
["&Undo"] = "Défaire", -- src\editor\editor.lua, src\editor\menu_edit.lua
|
||||
["&View"] = "Vue", -- src\editor\menu_view.lua
|
||||
["&Watch Window"] = "Fenêtre d'observation", -- src\editor\menu_view.lua
|
||||
["&Watches"] = "Points d'observation", -- src\editor\debugger.lua
|
||||
["About ZeroBrane Studio"] = "A propos de ZeroBrane Studio", -- src\editor\menu_help.lua
|
||||
["Add Watch Expression"] = "Ajouter une expression", -- src\editor\editor.lua
|
||||
["Add to Scratchpad"] = "Ajouter au brouillon", -- src\editor\editor.lua
|
||||
["All files"] = "Tous les fichiers", -- src\editor\commands.lua
|
||||
["Allow external process to start debugging"] = "Autoriser aux processus externes le démarrage du débogueur", -- src\editor\menu_project.lua
|
||||
["Analyze the source code"] = "Analyser le code source", -- src\editor\inspect.lua
|
||||
["Analyze"] = "Analyser", -- src\editor\inspect.lua
|
||||
["Auto Complete Identifiers"] = "Identificateur d'auto-complétion", -- src\editor\menu_edit.lua
|
||||
["Auto complete while typing"] = "Auto-complémention en mode saisie", -- src\editor\menu_edit.lua
|
||||
["Break execution at the next executed line of code"] = "Interrompre l'exécution à la ligne suivante", -- src\editor\menu_project.lua, src\editor\gui.lua
|
||||
["C&lear Output Window"] = "Effacer la sortie console", -- src\editor\menu_project.lua
|
||||
["C&omment/Uncomment"] = "Commenter/Décommenter", -- src\editor\menu_edit.lua
|
||||
["Can't debug the script in the active editor window."] = "Impossible de déboguer le script dans la fenêtre d'édition active", -- src\editor\debugger.lua
|
||||
["Can't find file '%s' in the current project to activate for debugging. Update the project or open the file in the editor before debugging."] = "Fichier '%s' non trouvé dans le projet en cours pour le débogage. Mettez le projet à jour ou ouvrez le fichier dans l'éditeur avant débogage.", -- src\editor\debugger.lua
|
||||
["Can't process auto-recovery record; invalid format: %s."] = "Impossible de restaurer automatiquement l'enregistrement; Format invalide: %s.", -- src\editor\commands.lua
|
||||
["Can't run the entry point script ('%s')."] = "Impossible d'exécuter le point d'entrée du script (%s).", -- src\editor\debugger.lua
|
||||
["Can't start debugging session due to internal error '%s'."] = "Impossible de démarrer la session de débogage: erreur interne '%s'.'", -- src\editor\debugger.lua
|
||||
["Can't start debugging without an opened file or with the current file not being saved ('%s')."] = "Impossible de déboguer sans fichier ouvert ou si le fichier en cours d'édition n'a pas été enregistré ('%s').", -- src\editor\debugger.lua
|
||||
["Choose a project directory"] = "Choisissez un répertoire de projet", -- src\editor\menu_project.lua
|
||||
["Clear &Dynamic Words"] = "Effacer les mots dynamiques", -- src\editor\menu_edit.lua
|
||||
["Clear the output window before compiling or debugging"] = "Nettoyer la fenêtre de sortie avant compilation ou débogage", -- src\editor\menu_project.lua
|
||||
["Close the current editor window"] = "Fermer la fenêtre d'édition active", -- src\editor\menu_file.lua
|
||||
["Co&ntinue"] = "Continuer", -- src\editor\menu_project.lua
|
||||
["Col: %d"] = "Col: %d", -- src\editor\editor.lua
|
||||
["Comment or uncomment current or selected lines"] = "Commenter/Décommenter les lignes actives (sélectionnées)", -- src\editor\menu_edit.lua
|
||||
["Compilation error"] = "Erreur de commpilation", -- src\editor\debugger.lua, src\editor\commands.lua
|
||||
["Compilation successful; %.0f%% success rate (%d/%d)."] = "Compilation réussie; taux de succès : %.0f%% (%d/%d).", -- src\editor\commands.lua
|
||||
["Compile the current file"] = "Сompiler le fichier courant", -- src\editor\menu_project.lua
|
||||
["Complete &Identifier"] = "Complétion d'identificateur", -- src\editor\menu_edit.lua
|
||||
["Complete the current identifier"] = "Complétion de l'identificateur courant", -- src\editor\menu_edit.lua
|
||||
["Copy selected text to clipboard"] = "Copier le texte sélectionné dans le presse-papiers", -- src\editor\menu_edit.lua, src\editor\gui.lua
|
||||
["Couldn't activate file '%s' for debugging; continuing without it."] = "Echec d'activation du fichier '%s' pour débogage; Poursuite du processus en ignorant le fichier.", -- src\editor\debugger.lua
|
||||
["Create an empty document"] = "Créer un document vierge", -- src\editor\menu_file.lua, src\editor\gui.lua
|
||||
["Cu&t"] = "Couper", -- src\editor\editor.lua, src\editor\menu_edit.lua
|
||||
["Cut selected text to clipboard"] = "Couper le texte selectionné et copier dans le presse-papiers", -- src\editor\menu_edit.lua, src\editor\gui.lua
|
||||
["Debugger server started at %s:%d."] = "Débogueur démarré à %s:%s", -- src\editor\debugger.lua
|
||||
["Debugging session completed (%s)."] = "Session de débogage terminée (%s).", -- src\editor\debugger.lua
|
||||
["Debugging session started in '%s'."] = "Session de débogage démarrée dans '%s'.", -- src\editor\debugger.lua
|
||||
["Do you want to reload it?"] = "Voulez -vous le charger à nouveau?", -- src\editor\editor.lua
|
||||
["Do you want to save the changes to '%s'?"] = "Voulez-vous sauvegarder les changements dans '%s'?", -- src\editor\commands.lua
|
||||
["E&xit"] = "Sortie", -- src\editor\menu_file.lua
|
||||
["Enter Lua code and press Enter to run it."] = "Entrer du code Lua et pressez <Entrée> pour l`exécuter.", -- src\editor\shellbox.lua
|
||||
["Enter line number"] = "Entrez le numéro de ligne", -- src\editor\menu_search.lua
|
||||
["Error while loading API file: %s"] = "Erreur lors du chargement du fichier d'API: %s", -- src\editor\autocomplete.lua
|
||||
["Error while processing API file: %s"] = "Erreur lors de la lecture du fichier d'API: %s", -- src\editor\autocomplete.lua
|
||||
["Error"] = "Erreur", -- src\editor\commands.lua
|
||||
["Evaluate &Watches"] = "Evaluer les points d'observation", -- src\editor\debugger.lua
|
||||
["Evaluate in Console"] = "Evaluer en console", -- src\editor\editor.lua
|
||||
["Execute the current project/file and keep updating the code to see immediate results"] = "Exécuter le projet/fichier courant en mettant le code à jour afin de voir les résultats en temps réel", -- src\editor\menu_project.lua
|
||||
["Execute the current project/file"] = "Exécuter le projet/fichier courant", -- src\editor\menu_project.lua
|
||||
["Execution error"] = "Erreur d'exécution", -- src\editor\debugger.lua
|
||||
["Exit program"] = "Sortie du programme", -- src\editor\menu_file.lua
|
||||
["Expr"] = "Expr.", -- src\editor\debugger.lua
|
||||
["Expression"] = "Expresseion", -- src\editor\debugger.lua
|
||||
["File '%s' has been modified on disk."] = "Le fichier '%s' a été modifié sur le disque.", -- src\editor\editor.lua
|
||||
["File '%s' has more recent timestamp than restored '%s'; please review before saving."] = "Le fichier '%s' a un horodatage plus récent que celui restauré '%s'; veuillez vérifier avant enregistrement.", -- src\editor\commands.lua
|
||||
["File '%s' no longer exists."] = "Le fichier '%s' n'existe plus.", -- src\editor\editor.lua
|
||||
["File history"] = "Historique de fichier", -- src\editor\menu_file.lua
|
||||
["Find &In Files"] = "Rechercher dans les fichiers", -- src\editor\menu_search.lua
|
||||
["Find &Next"] = "Rechercher l'occurence suivante", -- src\editor\menu_search.lua
|
||||
["Find &Previous"] = "Rechercher l'occurence précédente", -- src\editor\menu_search.lua
|
||||
["Find and replace text in files"] = "Rechercher et remplacer le texte dans les fichiers", -- src\editor\menu_search.lua
|
||||
["Find and replace text"] = "Rechercher et remplacer le texte", -- src\editor\menu_search.lua, src\editor\gui.lua
|
||||
["Find text in files"] = "Rechercher le texte dans les fichiers", -- src\editor\menu_search.lua
|
||||
["Find text"] = "Rechercher le texte", -- src\editor\menu_search.lua, src\editor\gui.lua
|
||||
["Find the earlier text occurence"] = "Recherche l'occurence précédente du texte", -- src\editor\menu_search.lua
|
||||
["Find the next text occurrence"] = "Recherche l'occurence suivante du texte", -- src\editor\menu_search.lua
|
||||
["Fold or unfold all code folds"] = "Replier/Déplier tous les blocs de code repliés", -- src\editor\menu_edit.lua
|
||||
["Found auto-recovery record and restored saved session."] = "Enregistrement automatique trouvé et session restaurée", -- src\editor\commands.lua
|
||||
["Full &Screen"] = "Plein écran", -- src\editor\menu_view.lua
|
||||
["Go to a selected line"] = "Aller à la ligne sélectionnée", -- src\editor\menu_search.lua
|
||||
["Goto Line"] = "Aller à la ligne", -- src\editor\menu_search.lua
|
||||
["INS"] = "INS", -- src\editor\editor.lua
|
||||
["Jump to a function definition..."] = "Aller à la définition de fonction...", -- src\editor\editor.lua
|
||||
["Known Files"] = "Fichiers connus", -- src\editor\commands.lua
|
||||
["Ln: %d"] = "Ln: %d", -- src\editor\editor.lua
|
||||
["Local console"] = "Console locale", -- src\editor\shellbox.lua, src\editor\gui.lua
|
||||
["Lua &Interpreter"] = "Interpréteur Lua", -- src\editor\menu_project.lua
|
||||
["OVR"] = "OVR", -- src\editor\editor.lua
|
||||
["Open an existing document"] = "Ouvrir un document existant", -- src\editor\menu_file.lua, src\editor\gui.lua
|
||||
["Open file"] = "Ouvrir un fichier", -- src\editor\commands.lua
|
||||
["Output (running)"] = "Sortie (en cours d'exécution)", -- src\editor\output.lua
|
||||
["Output"] = "Sortie", -- src\editor\output.lua, src\editor\settings.lua, src\editor\gui.lua
|
||||
["Paste text from the clipboard"] = "Coller le texte depuis le presse-papiers", -- src\editor\menu_edit.lua, src\editor\gui.lua
|
||||
["Prepend '=' to show complex values on multiple lines."] = "Préfixer '=' afin de mettre en évidence les valeurs complexes sur les lignes multiples", -- src\editor\shellbox.lua
|
||||
["Press cancel to abort."] = "Appuyer annuler pour arrêter.", -- src\editor\commands.lua
|
||||
["Program '%s' started in '%s' (pid: %d)."] = "Programme '%s' démarré dans '%s' (pid: %d).", -- src\editor\output.lua
|
||||
["Program can't start because conflicting process is running as '%s'."] = "Le programme ne peut démarrer à cause d'un processus conflictuel '%s' en cours d'exécution.", -- src\editor\output.lua
|
||||
["Program completed in %.2f seconds (pid: %d)."] = "Programme terminé en %.2f secondes (pid: %d).", -- src\editor\output.lua
|
||||
["Program starting as '%s'."] = "Programme démarré en tant que '%s'.", -- src\editor\output.lua
|
||||
["Program stopped (pid: %d)."] = "Programme stoppé (pid: %d).", -- src\editor\debugger.lua
|
||||
["Program unable to run as '%s'."] = "Impossible d'écuter le programme en tant que '%s'.", -- src\editor\output.lua
|
||||
["Project"] = "Projet", -- src\editor\settings.lua, src\editor\gui.lua
|
||||
["Project/&FileTree Window"] = "Projet/Arborescence de fichiers", -- src\editor\menu_view.lua
|
||||
["R/O"] = "R/O", -- src\editor\editor.lua
|
||||
["R/W"] = "R/W", -- src\editor\editor.lua
|
||||
["Re&place In Files"] = "Remplacer dans les fichiers", -- src\editor\menu_search.lua
|
||||
["Recent Files"] = "Fichiers récents", -- src\editor\menu_file.lua
|
||||
["Redo last edit undone"] = "Refaire la dernière édition annulée", -- src\editor\menu_edit.lua, src\editor\gui.lua
|
||||
["Refused a request to start a new debugging session as there is one in progress already."] = "Impossible de lancer une nouvelle session de débogage en plus de celle en cours.", -- src\editor\debugger.lua
|
||||
["Remote console"] = "Console à distance", -- src\editor\shellbox.lua
|
||||
["Reset to default layout"] = "Retourner à l'affiche par défaut", -- src\editor\menu_view.lua
|
||||
["Resets the dynamic word list for autocompletion"] = "Redéfinir la liste des mots dynamiques pour auto-complétion", -- src\editor\menu_edit.lua
|
||||
["Run as Scratchpad"] = "Exécuter en Brouillon", -- src\editor\menu_project.lua
|
||||
["S&top Debugging"] = "Arrêter le débogueur", -- src\editor\menu_project.lua
|
||||
["S&top Process"] = "Arrêter le processus", -- src\editor\menu_project.lua
|
||||
["Save &As..."] = "Enregitrer sous...", -- src\editor\menu_file.lua
|
||||
["Save A&ll"] = "Enregister tout", -- src\editor\menu_file.lua
|
||||
["Save Changes?"] = "Enregister les modifications?", -- src\editor\commands.lua
|
||||
["Save all open documents"] = "Enregister tous les documents ouverts", -- src\editor\menu_file.lua, src\editor\gui.lua
|
||||
["Save file as"] = "Enregsitrer le fichier sous", -- src\editor\commands.lua
|
||||
["Save file?"] = "Enregister le fichier?", -- src\editor\commands.lua
|
||||
["Save the current document to a file with a new name"] = "Enregister une copie du document en cours sous", -- src\editor\menu_file.lua
|
||||
["Save the current document"] = "Enregister le document en cours", -- src\editor\menu_file.lua, src\editor\gui.lua
|
||||
["Saved auto-recover at %s."] = "Auto-enregistré à %s.", -- src\editor\commands.lua
|
||||
["Scratchpad error"] = "Erreur dans le Brouillon", -- src\editor\debugger.lua
|
||||
["Select &All"] = "Sélectionner tout", -- src\editor\editor.lua, src\editor\menu_edit.lua
|
||||
["Select all text in the editor"] = "Sélectionner tout le texte dans l'éditeur", -- src\editor\menu_edit.lua
|
||||
["Set project directory from current file"] = "Définir le répertoire de projet depuis le fichier courant", -- src\editor\gui.lua
|
||||
["Set the interpreter to be used"] = "Définir l'interpréteur à utiliser", -- src\editor\menu_project.lua
|
||||
["Show &Tooltip"] = "Affichier l'info-bulle", -- src\editor\menu_edit.lua
|
||||
["Show tooltip for current position; place cursor after opening bracket of function"] = "Afficher l'info-bulle pour la position actuelle; placer le curseur après avoir ouvert les parenthèses d'arguments de fontion", -- src\editor\menu_edit.lua
|
||||
["Sort selected lines"] = "trier les fichiers sélectionnés", -- src\editor\menu_search.lua
|
||||
["Stack Window"] = "Fenêtre de pile d'éxécution", -- src\editor\debugger.lua
|
||||
["Start &Debugging"] = "Démarrer le débogage", -- src\editor\menu_project.lua
|
||||
["Start debugging"] = "Démarrer le débogage", -- src\editor\menu_project.lua, src\editor\gui.lua
|
||||
["Step &Into"] = "Pas dans", -- src\editor\menu_project.lua
|
||||
["Step &Over"] = "Pas sur", -- src\editor\menu_project.lua
|
||||
["Step O&ut"] = "Pas en dehors de", -- src\editor\menu_project.lua
|
||||
["Step into"] = "Pas dans", -- src\editor\menu_project.lua, src\editor\gui.lua
|
||||
["Step out of the current function"] = "Pas en dehors de la fonction courante", -- src\editor\menu_project.lua, src\editor\gui.lua
|
||||
["Step over"] = "Pas par-dessus la fonction courante", -- src\editor\menu_project.lua, src\editor\gui.lua
|
||||
["Stop the currently running process"] = "Arrêter le processus en cours", -- src\editor\menu_project.lua, src\editor\gui.lua
|
||||
["Switch to or from full screen mode"] = "Passer au/Quitter le mode Plein Ecran", -- src\editor\menu_view.lua
|
||||
["The API file must be located in a subdirectory of the API directory."] = "Le fichier d'API doit être placé dans un sous-répertoire du répertoire d'API.", -- src\editor\autocomplete.lua
|
||||
["Toggle Break&point"] = "Basculer en Point d'Interruption", -- src\editor\menu_project.lua
|
||||
["Toggle breakpoint"] = "Basculer en point d'interruption", -- src\editor\menu_project.lua, src\editor\gui.lua
|
||||
["Tr&ace"] = "Tracer", -- src\editor\menu_project.lua
|
||||
["Trace execution showing each executed line"] = "Traçage d'exécution du code", -- src\editor\menu_project.lua
|
||||
["Unable to load file '%s'."] = "Impossible de charger le le fichier '%s'.", -- src\editor\commands.lua
|
||||
["Unable to save file '%s': %s"] = "Impossible d'enregistrer le fichier '%s': %s", -- src\editor\commands.lua
|
||||
["Unable to stop program (pid: %d), code %d."] = "Impossible d'arrêter le programme (pid: %d), code %d.", -- src\editor\debugger.lua
|
||||
["Undo last edit"] = "Défaire la dernière édition", -- src\editor\menu_edit.lua, src\editor\gui.lua
|
||||
["Use 'clear' to clear the shell output and the history."] = "Utiliser 'clear' pour effacer la sortie console et l`historique.", -- src\editor\shellbox.lua
|
||||
["Use Shift-Enter for multiline code."] = "Pressez <Shift-Entrée> pour du code multiligne.", -- src\editor\shellbox.lua
|
||||
["Value"] = "Valeur", -- src\editor\debugger.lua
|
||||
["View the output/console window"] = "Voir la sortie en console", -- src\editor\menu_view.lua
|
||||
["View the project/filetree window"] = "Voir l'arborescence des fichiers de projet", -- src\editor\menu_view.lua
|
||||
["View the stack window"] = "Voir la pile d'éxécution", -- src\editor\menu_view.lua, src\editor\gui.lua
|
||||
["View the watch window"] = "Voir la fenêtre d'observation", -- src\editor\menu_view.lua, src\editor\gui.lua
|
||||
["Watch Window"] = "Fenêtre d'observation", -- src\editor\debugger.lua
|
||||
["Welcome to the interactive Lua interpreter."] = "Bienvenue dans l`interpréteur interactif Lua.", -- src\editor\shellbox.lua
|
||||
["You must save the program first."] = "Enregistrez d'abord le programme", -- src\editor\commands.lua
|
||||
["on line %d"] = "à la ligne %d", -- src\editor\debugger.lua, src\editor\commands.lua
|
||||
["traced %d instruction"] = {"%d instruction tracée", "%d instructions tracées"} -- src\editor\debugger.lua
|
||||
}
|
||||
190
cfg/i18n/it.lua
Normal file
190
cfg/i18n/it.lua
Normal file
@@ -0,0 +1,190 @@
|
||||
return {
|
||||
[0] = function(c) return c == 1 and 1 or 2 end, -- plural
|
||||
["&About"] = "Informazioni", -- src\editor\menu_help.lua
|
||||
["&Add Watch"] = "&Aggiungi Espressione di Controllo", -- src\editor\debugger.lua
|
||||
["&Break"] = "Interrompi", -- src\editor\menu_project.lua
|
||||
["&Close page"] = "&Chiudi pagina", -- src\editor\menu_file.lua
|
||||
["&Compile"] = "&Compila", -- src\editor\menu_project.lua
|
||||
["&Copy"] = "&Copia", -- src\editor\editor.lua, src\editor\menu_edit.lua
|
||||
["&Default Layout"] = "Visualizzazione di &Default", -- src\editor\menu_view.lua
|
||||
["&Edit Watch"] = "Modifica Espressione di Controllo", -- src\editor\debugger.lua
|
||||
["&Edit"] = "Modifica", -- src\editor\menu_edit.lua
|
||||
["&File"] = "File", -- src\editor\menu_file.lua
|
||||
["&Find"] = "Ricerca", -- src\editor\menu_search.lua
|
||||
["&Fold/Unfold All"] = "Apri/Chiudi tutto", -- src\editor\menu_edit.lua
|
||||
["&Goto Line"] = "Vai a riga", -- src\editor\menu_search.lua
|
||||
["&Help"] = "Aiuto", -- src\editor\menu_help.lua
|
||||
["&New"] = "&Nuovo", -- src\editor\menu_file.lua
|
||||
["&Open..."] = "&Apri...", -- src\editor\menu_file.lua
|
||||
["&Output/Console Window"] = "Finestra di Output/Console", -- src\editor\menu_view.lua
|
||||
["&Paste"] = "Incolla", -- src\editor\editor.lua, src\editor\menu_edit.lua
|
||||
["&Project"] = "&Progetto", -- src\editor\menu_project.lua, src\editor\inspect.lua
|
||||
["&Redo"] = "&Ripeti", -- src\editor\editor.lua, src\editor\menu_edit.lua
|
||||
["&Remove Watch"] = "Elimina Espressione di Controllo", -- src\editor\debugger.lua
|
||||
["&Replace"] = "Sostituisci", -- src\editor\menu_search.lua
|
||||
["&Run"] = "Lancia", -- src\editor\menu_project.lua
|
||||
["&Save"] = "&Salva", -- src\editor\menu_file.lua
|
||||
["&Search"] = "Ricerca", -- src\editor\menu_search.lua
|
||||
["&Sort"] = "Ordina", -- src\editor\menu_search.lua
|
||||
["&Stack Window"] = "Stack di chiamate", -- src\editor\menu_view.lua
|
||||
["&Start Debugger Server"] = "Avvia Debugger Server", -- src\editor\menu_project.lua
|
||||
["&Undo"] = "Annulla", -- src\editor\editor.lua, src\editor\menu_edit.lua
|
||||
["&View"] = "Visualizza", -- src\editor\menu_view.lua
|
||||
["&Watch Window"] = "Finestra Espressioni di Controllo", -- src\editor\menu_view.lua
|
||||
["&Watches"] = "Espressioni di Controllo", -- src\editor\debugger.lua
|
||||
["About ZeroBrane Studio"] = "Informazioni su ZeroBrane Studio", -- src\editor\menu_help.lua
|
||||
["Add Watch Expression"] = "Aggiungi Espressione di Controllo", -- src\editor\editor.lua
|
||||
["Add to Scratchpad"] = "Aggiungi a Scratchpad ", -- src\editor\editor.lua
|
||||
["All files"] = "Tutti i files", -- src\editor\commands.lua
|
||||
["Allow external process to start debugging"] = "Permetti a processi esterni di avviare il debug", -- src\editor\menu_project.lua
|
||||
["Analyze the source code"] = "Analizza il codice", -- src\editor\inspect.lua
|
||||
["Analyze"] = "Analizza", -- src\editor\inspect.lua
|
||||
["Auto Complete Identifiers"] = "Autocompletamento identificatori", -- src\editor\menu_edit.lua
|
||||
["Auto complete while typing"] = "Autocompletamento in linea", -- src\editor\menu_edit.lua
|
||||
["Break execution at the next executed line of code"] = "Interrompi l'esecuzione alla successiva riga di codice ", -- src\editor\menu_project.lua, src\editor\gui.lua
|
||||
["C&lear Output Window"] = "Pulisci finestra di output", -- src\editor\menu_project.lua
|
||||
["C&omment/Uncomment"] = "Commenta/Scommenta", -- src\editor\menu_edit.lua
|
||||
["Can't debug the script in the active editor window."] = "Impossibile farte debug dello script nella finestra attiva", -- src\editor\debugger.lua
|
||||
["Can't find file '%s' in the current project to activate for debugging. Update the project or open the file in the editor before debugging."] = "File '%s' non trovato nel progetto per attivare il debug. Modificare il progetto o apire il file prima di lanciare il debug.", -- src\editor\debugger.lua
|
||||
["Can't process auto-recovery record; invalid format: %s."] = "Impossibile procedere all'auto-recovery; Formato non valido: %s.", -- src\editor\commands.lua
|
||||
["Can't run the entry point script ('%s')."] = "Impossibile eseguire il punto di ingresos dello script (%s).", -- src\editor\debugger.lua
|
||||
["Can't start debugging session due to internal error '%s'."] = "Impossibile lanciare la sessione di debug: errore interno '%s'.'", -- src\editor\debugger.lua
|
||||
["Can't start debugging without an opened file or with the current file not being saved ('%s')."] = "Impossibile lanciare il debug senza aver aperto un file o se il file corrente non è stato salvato ('%s').", -- src\editor\debugger.lua
|
||||
["Choose a project directory"] = "Scegli la directory di un progetto", -- src\editor\menu_project.lua
|
||||
["Clear &Dynamic Words"] = "Elimna le &Dynamic Words", -- src\editor\menu_edit.lua
|
||||
["Clear the output window before compiling or debugging"] = "Pulisci la finestra di output prima di compilare o lanciare debug", -- src\editor\menu_project.lua
|
||||
["Close the current editor window"] = "Chiude la finestra dell'edit corrente", -- src\editor\menu_file.lua
|
||||
["Co&ntinue"] = "Co&ntinua", -- src\editor\menu_project.lua
|
||||
["Col: %d"] = "Col: %d", -- src\editor\editor.lua
|
||||
["Comment or uncomment current or selected lines"] = "Commenta o scommenta la linea corrente o selezionat", -- src\editor\menu_edit.lua
|
||||
["Compilation error"] = "Errore di compilazione", -- src\editor\debugger.lua, src\editor\commands.lua
|
||||
["Compilation successful; %.0f%% success rate (%d/%d)."] = "Compilazione riuscita; tasso di successo : %.0f%% (%d/%d).", -- src\editor\commands.lua
|
||||
["Compile the current file"] = "Compila il file corrente", -- src\editor\menu_project.lua
|
||||
["Complete &Identifier"] = "Completa l'&Identificatore", -- src\editor\menu_edit.lua
|
||||
["Complete the current identifier"] = "Completa l'identificatore corrente", -- src\editor\menu_edit.lua
|
||||
["Copy selected text to clipboard"] = "Copia il testo selezionato negli appunti", -- src\editor\menu_edit.lua, src\editor\gui.lua
|
||||
["Couldn't activate file '%s' for debugging; continuing without it."] = "Impossibile attivare il file '%s' per debug; si prosegue senza.", -- src\editor\debugger.lua
|
||||
["Create an empty document"] = "Crea un documento vuoto", -- src\editor\menu_file.lua, src\editor\gui.lua
|
||||
["Cu&t"] = "&Taglia", -- src\editor\editor.lua, src\editor\menu_edit.lua
|
||||
["Cut selected text to clipboard"] = "Taglia il testo selezionato e mette negli appunti", -- src\editor\menu_edit.lua, src\editor\gui.lua
|
||||
["Debugger server started at %s:%d."] = "Server Debugger iniziato %s:%s", -- src\editor\debugger.lua
|
||||
["Debugging session completed (%s)."] = "Sessione di debug completata (%s).", -- src\editor\debugger.lua
|
||||
["Debugging session started in '%s'."] = "Sessione di debug iniziata da '%s'.", -- src\editor\debugger.lua
|
||||
["Do you want to reload it?"] = "Vuoi ricaricarlo?", -- src\editor\editor.lua
|
||||
["Do you want to save the changes to '%s'?"] = "Vuoi salvare le modifiche a '%s'?", -- src\editor\commands.lua
|
||||
["E&xit"] = "Uscita", -- src\editor\menu_file.lua
|
||||
["Enter Lua code and press Enter to run it."] = "Inserisci codice Lua e premi <Enter> per eseguirlo.", -- src\editor\shellbox.lua
|
||||
["Enter line number"] = "Inserisci il numero di linea", -- src\editor\menu_search.lua
|
||||
["Error while loading API file: %s"] = "Errore durante il caricamento del file API: %s", -- src\editor\autocomplete.lua
|
||||
["Error while processing API file: %s"] = "Errore durante l'elaborazione del file API: %s", -- src\editor\autocomplete.lua
|
||||
["Error"] = "Errore", -- src\editor\commands.lua
|
||||
["Evaluate &Watches"] = "Elabora Espressioni di Controllo", -- src\editor\debugger.lua
|
||||
["Evaluate in Console"] = "Elabora in console", -- src\editor\editor.lua
|
||||
["Execute the current project/file and keep updating the code to see immediate results"] = "Esegue il progetto/file corrente e permette di modificare il codice per vedere i risultati in tempo reale", -- src\editor\menu_project.lua
|
||||
["Execute the current project/file"] = "Esegue il progetto/file corrente", -- src\editor\menu_project.lua
|
||||
["Execution error"] = "Errore di esecuzione", -- src\editor\debugger.lua
|
||||
["Exit program"] = "Uscita dal programma", -- src\editor\menu_file.lua
|
||||
["Expr"] = "Expr.", -- src\editor\debugger.lua
|
||||
["Expression"] = "Espressione", -- src\editor\debugger.lua
|
||||
["File '%s' has been modified on disk."] = "Il file '%s' e' stato modificato sul disco.", -- src\editor\editor.lua
|
||||
["File '%s' has more recent timestamp than restored '%s'; please review before saving."] = "Il file '%s' ha un timestamp più recente di quello ripristinato '%s'; verificare prima di salvare.", -- src\editor\commands.lua
|
||||
["File '%s' no longer exists."] = "Il file '%s' non esiste piu'.", -- src\editor\editor.lua
|
||||
["File history"] = "Storia del file", -- src\editor\menu_file.lua
|
||||
["Find &In Files"] = "Ricerca nei files", -- src\editor\menu_search.lua
|
||||
["Find &Next"] = "Cerca il successivo", -- src\editor\menu_search.lua
|
||||
["Find &Previous"] = "Cerca il precedente", -- src\editor\menu_search.lua
|
||||
["Find and replace text in files"] = "Cerca e sostituisci testo nei files", -- src\editor\menu_search.lua
|
||||
["Find and replace text"] = "Cerca e sostituisci testo", -- src\editor\menu_search.lua, src\editor\gui.lua
|
||||
["Find text in files"] = "Cerca testo nei files", -- src\editor\menu_search.lua
|
||||
["Find text"] = "Cerca testo", -- src\editor\menu_search.lua, src\editor\gui.lua
|
||||
["Find the earlier text occurence"] = "Cerca la precedente occorrenza nel testo", -- src\editor\menu_search.lua
|
||||
["Find the next text occurrence"] = "Cerca la successiva occorrenza nel testo", -- src\editor\menu_search.lua
|
||||
["Fold or unfold all code folds"] = "Apri o chiudi tutti i blocchi di codice", -- src\editor\menu_edit.lua
|
||||
["Found auto-recovery record and restored saved session."] = "Trovato punto di auto-revcovery e ripristinata la sessione salvata", -- src\editor\commands.lua
|
||||
["Full &Screen"] = "Schermo pieno", -- src\editor\menu_view.lua
|
||||
["Go to a selected line"] = "Vai alla riga selezionata", -- src\editor\menu_search.lua
|
||||
["Goto Line"] = "Vai alla riga", -- src\editor\menu_search.lua
|
||||
["INS"] = "INS", -- src\editor\editor.lua
|
||||
["Jump to a function definition..."] = "Salta alla definizione della funzione...", -- src\editor\editor.lua
|
||||
["Known Files"] = "Files conosciuti", -- src\editor\commands.lua
|
||||
["Ln: %d"] = "Ln: %d", -- src\editor\editor.lua
|
||||
["Local console"] = "Console locale", -- src\editor\shellbox.lua, src\editor\gui.lua
|
||||
["Lua &Interpreter"] = "&Interprete Lua", -- src\editor\menu_project.lua
|
||||
["OVR"] = "OVR", -- src\editor\editor.lua
|
||||
["Open an existing document"] = "Apri un documento esistente", -- src\editor\menu_file.lua, src\editor\gui.lua
|
||||
["Open file"] = "Apri un file", -- src\editor\commands.lua
|
||||
["Output (running)"] = "Output (in corso d'esecuzione)", -- src\editor\output.lua
|
||||
["Output"] = "Output", -- src\editor\output.lua, src\editor\settings.lua, src\editor\gui.lua
|
||||
["Paste text from the clipboard"] = "Incolla testo dagli appunti", -- src\editor\menu_edit.lua, src\editor\gui.lua
|
||||
["Prepend '=' to show complex values on multiple lines."] = "Prefissa '=' per visualizzare valori complessi su piu` righe", -- src\editor\shellbox.lua
|
||||
["Press cancel to abort."] = "Premi cancel per bloccare.", -- src\editor\commands.lua
|
||||
["Program '%s' started in '%s' (pid: %d)."] = "Programma '%s' partito da '%s' (pid: %d).", -- src\editor\output.lua
|
||||
["Program can't start because conflicting process is running as '%s'."] = "Il programma non puo' partire perchè in conflitto con il processo in esecuzione '%s'.", -- src\editor\output.lua
|
||||
["Program completed in %.2f seconds (pid: %d)."] = "Programma completato in %.2f secondi (pid: %d).", -- src\editor\output.lua
|
||||
["Program starting as '%s'."] = "Programma partito da '%s'.", -- src\editor\output.lua
|
||||
["Program stopped (pid: %d)."] = "Programma fermato (pid: %d).", -- src\editor\debugger.lua
|
||||
["Program unable to run as '%s'."] = "Il programma non puo' partire '%s'.", -- src\editor\output.lua
|
||||
["Project"] = "Progetto", -- src\editor\settings.lua, src\editor\gui.lua
|
||||
["Project/&FileTree Window"] = "Progetto/Explorer", -- src\editor\menu_view.lua
|
||||
["R/O"] = "R/O", -- src\editor\editor.lua
|
||||
["R/W"] = "R/W", -- src\editor\editor.lua
|
||||
["Re&place In Files"] = "Sostituisci nei files", -- src\editor\menu_search.lua
|
||||
["Recent Files"] = "Files recenti", -- src\editor\menu_file.lua
|
||||
["Redo last edit undone"] = "Ripeti l'ultima azione annullata", -- src\editor\menu_edit.lua, src\editor\gui.lua
|
||||
["Refused a request to start a new debugging session as there is one in progress already."] = "Impossibile aprire una nuova sessione di debug in quanto ne esiste una in corso", -- src\editor\debugger.lua
|
||||
["Remote console"] = "Console remota", -- src\editor\shellbox.lua
|
||||
["Reset to default layout"] = "Ritorna al default layout", -- src\editor\menu_view.lua
|
||||
["Resets the dynamic word list for autocompletion"] = "Azzera la lista di dynamic words per l'autocompletamento", -- src\editor\menu_edit.lua
|
||||
["Run as Scratchpad"] = "Esegui in Scratchpad (Live coding)", -- src\editor\menu_project.lua
|
||||
["S&top Debugging"] = "Ferma il debugger", -- src\editor\menu_project.lua
|
||||
["S&top Process"] = "Ferma il processo", -- src\editor\menu_project.lua
|
||||
["Save &As..."] = "S&alva con nome...", -- src\editor\menu_file.lua
|
||||
["Save A&ll"] = "Sa&lva tutto", -- src\editor\menu_file.lua
|
||||
["Save Changes?"] = "Vuoi salvare le modifiche?", -- src\editor\commands.lua
|
||||
["Save all open documents"] = "Salva tutti i documenti aperti", -- src\editor\menu_file.lua, src\editor\gui.lua
|
||||
["Save file as"] = "Salva il file con nome", -- src\editor\commands.lua
|
||||
["Save file?"] = "Vuoi salvare il file?", -- src\editor\commands.lua
|
||||
["Save the current document to a file with a new name"] = "Salva il documento corrente in un file con un nuovo nome", -- src\editor\menu_file.lua
|
||||
["Save the current document"] = "Salva il documento corrente", -- src\editor\menu_file.lua, src\editor\gui.lua
|
||||
["Saved auto-recover at %s."] = "Salvato auto-recover a %s.", -- src\editor\commands.lua
|
||||
["Scratchpad error"] = "Errore durente Scratchpad", -- src\editor\debugger.lua
|
||||
["Select &All"] = "Selezion&a Tutto", -- src\editor\editor.lua, src\editor\menu_edit.lua
|
||||
["Select all text in the editor"] = "Seleziona tutto il testo nell'editor", -- src\editor\menu_edit.lua
|
||||
["Set project directory from current file"] = "Definisci la directory del progeetto dal file corrente", -- src\editor\gui.lua
|
||||
["Set the interpreter to be used"] = "Definisci l'interprete da utilizzare", -- src\editor\menu_project.lua
|
||||
["Show &Tooltip"] = "Mos&tra i consgli", -- src\editor\menu_edit.lua
|
||||
["Show tooltip for current position; place cursor after opening bracket of function"] = "Mostra i consigli per la posizione corrente; muovi il cursore dopo la parentesi o la funzione", -- src\editor\menu_edit.lua
|
||||
["Sort selected lines"] = "Ordina le righe selezionate", -- src\editor\menu_search.lua
|
||||
["Stack Window"] = "Finestra Stack", -- src\editor\debugger.lua
|
||||
["Start &Debugging"] = "Inizia il &Debug", -- src\editor\menu_project.lua
|
||||
["Start debugging"] = "Inizia il Debug", -- src\editor\menu_project.lua, src\editor\gui.lua
|
||||
["Step &Into"] = "Step &Into", -- src\editor\menu_project.lua
|
||||
["Step &Over"] = "Step &Over", -- src\editor\menu_project.lua
|
||||
["Step O&ut"] = "Step O&ut", -- src\editor\menu_project.lua
|
||||
["Step into"] = "Step into", -- src\editor\menu_project.lua, src\editor\gui.lua
|
||||
["Step out of the current function"] = "Contina fino all'uscita della funzione", -- src\editor\menu_project.lua, src\editor\gui.lua
|
||||
["Step over"] = "Continua senza entrare nella funzione", -- src\editor\menu_project.lua, src\editor\gui.lua
|
||||
["Stop the currently running process"] = "Ferma il processo in esecuzione", -- src\editor\menu_project.lua, src\editor\gui.lua
|
||||
["Switch to or from full screen mode"] = "Passa da tutto schermo a finestra", -- src\editor\menu_view.lua
|
||||
["The API file must be located in a subdirectory of the API directory."] = "Il file API deve essere presente in una sottodirectory o nella direcotory API.", -- src\editor\autocomplete.lua
|
||||
["Toggle Break&point"] = "Attiva/Disattiva Break&point", -- src\editor\menu_project.lua
|
||||
["Toggle breakpoint"] = "Attiva/Disattiva Breakpoint", -- src\editor\menu_project.lua, src\editor\gui.lua
|
||||
["Tr&ace"] = "Tr&ace", -- src\editor\menu_project.lua
|
||||
["Trace execution showing each executed line"] = "Traccia l'esecuzione mostrando le righe eseguite", -- src\editor\menu_project.lua
|
||||
["Unable to load file '%s'."] = "Impossibile aprire il file '%s'.", -- src\editor\commands.lua
|
||||
["Unable to save file '%s': %s"] = "Impossibile salvare il file '%s': %s", -- src\editor\commands.lua
|
||||
["Unable to stop program (pid: %d), code %d."] = "Impossibile fermare il programma (pid: %d), code %d.", -- src\editor\debugger.lua
|
||||
["Undo last edit"] = "Annulla l'ultima azione di edit", -- src\editor\menu_edit.lua, src\editor\gui.lua
|
||||
["Use 'clear' to clear the shell output and the history."] = "Utilizza 'clear' per pulire l`output e lo storico.", -- src\editor\shellbox.lua
|
||||
["Use Shift-Enter for multiline code."] = "Premi <Shift-Invio> per inserire piu` righe di codice.", -- src\editor\shellbox.lua
|
||||
["Value"] = "Valore", -- src\editor\debugger.lua
|
||||
["View the output/console window"] = "Mostra la finestra di output/console", -- src\editor\menu_view.lua
|
||||
["View the project/filetree window"] = "Mostra la finestra di progetto/explorer", -- src\editor\menu_view.lua
|
||||
["View the stack window"] = "Mostra la finestra dello Stack", -- src\editor\menu_view.lua, src\editor\gui.lua
|
||||
["View the watch window"] = "Mostra la finestra delle Espressioni di Controllo", -- src\editor\menu_view.lua, src\editor\gui.lua
|
||||
["Watch Window"] = "Finestra Espressioni di Controllo", -- src\editor\debugger.lua
|
||||
["Welcome to the interactive Lua interpreter."] = "Benvenuti nell`interprete interattivo Lua.", -- src\editor\shellbox.lua
|
||||
["You must save the program first."] = "Devi prima salvare il programma", -- src\editor\commands.lua
|
||||
["on line %d"] = "alla linea %d", -- src\editor\debugger.lua, src\editor\commands.lua
|
||||
["traced %d instruction"] = {"tracciata %d istruzione", "%d istruzioni tracciate"} -- src\editor\debugger.lua
|
||||
}
|
||||
190
cfg/i18n/ru.lua
Normal file
190
cfg/i18n/ru.lua
Normal file
@@ -0,0 +1,190 @@
|
||||
return {
|
||||
[0] = function(c) return (c%10 == 1 and c%100 ~= 11) and 1 or (c%10 >= 2 and c%10 <= 4 and (c%100 < 10 or c%100 >= 20) and 2) or 3 end, -- plural
|
||||
["&About"] = "&О программе", -- src\editor\menu_help.lua
|
||||
["&Add Watch"] = "&Добавить выражение", -- src\editor\debugger.lua
|
||||
["&Break"] = "Пр&ервать", -- src\editor\menu_project.lua
|
||||
["&Close page"] = "&Закрыть", -- src\editor\menu_file.lua
|
||||
["&Compile"] = "&Компилировать", -- src\editor\menu_project.lua
|
||||
["&Copy"] = "&Копировать", -- src\editor\editor.lua, src\editor\menu_edit.lua
|
||||
["&Default Layout"] = "Вид по &умолчанию", -- src\editor\menu_view.lua
|
||||
["&Edit Watch"] = "&Редактировать выражение", -- src\editor\debugger.lua
|
||||
["&Edit"] = "&Правка", -- src\editor\menu_edit.lua
|
||||
["&File"] = "&Файл", -- src\editor\menu_file.lua
|
||||
["&Find"] = "&Найти", -- src\editor\menu_search.lua
|
||||
["&Fold/Unfold All"] = "Св&ернуть/развернуть все", -- src\editor\menu_edit.lua
|
||||
["&Goto Line"] = "&Перейти к строке", -- src\editor\menu_search.lua
|
||||
["&Help"] = "&Справка", -- src\editor\menu_help.lua
|
||||
["&New"] = "Соз&дать", -- src\editor\menu_file.lua
|
||||
["&Open..."] = "&Открыть...", -- src\editor\menu_file.lua
|
||||
["&Output/Console Window"] = "Окно &вывода/консоли", -- src\editor\menu_view.lua
|
||||
["&Paste"] = "В&ставить", -- src\editor\editor.lua, src\editor\menu_edit.lua
|
||||
["&Project"] = "Пр&оект", -- src\editor\menu_project.lua, src\editor\inspect.lua
|
||||
["&Redo"] = "Верну&ть", -- src\editor\editor.lua, src\editor\menu_edit.lua
|
||||
["&Remove Watch"] = "&Удалить выражение", -- src\editor\debugger.lua
|
||||
["&Replace"] = "За&менить", -- src\editor\menu_search.lua
|
||||
["&Run"] = "За&пустить", -- src\editor\menu_project.lua
|
||||
["&Save"] = "&Сохранить", -- src\editor\menu_file.lua
|
||||
["&Search"] = "По&иск", -- src\editor\menu_search.lua
|
||||
["&Sort"] = "&Cортировать", -- src\editor\menu_search.lua
|
||||
["&Stack Window"] = "Окно &стека", -- src\editor\menu_view.lua
|
||||
["&Start Debugger Server"] = "Запустить сервер отла&дки", -- src\editor\menu_project.lua
|
||||
["&Undo"] = "&Отменить", -- src\editor\editor.lua, src\editor\menu_edit.lua
|
||||
["&View"] = "&Вид", -- src\editor\menu_view.lua
|
||||
["&Watch Window"] = "Окно &наблюдения", -- src\editor\menu_view.lua
|
||||
["&Watches"] = "&Выражения", -- src\editor\debugger.lua
|
||||
["About ZeroBrane Studio"] = "О ZeroBrane Studio", -- src\editor\menu_help.lua
|
||||
["Add Watch Expression"] = "Добавить в окно наблюдения", -- src\editor\editor.lua
|
||||
["Add to Scratchpad"] = "Добавить в черновик", -- src\editor\editor.lua
|
||||
["All files"] = "Все файлы", -- src\editor\commands.lua
|
||||
["Allow external process to start debugging"] = "Разрешить внешнему процессу начать отладку", -- src\editor\menu_project.lua
|
||||
["Analyze the source code"] = "Проанализировать исходный код", -- src\editor\inspect.lua
|
||||
["Analyze"] = "Анализировать", -- src\editor\inspect.lua
|
||||
["Auto Complete Identifiers"] = "Автодополнение идентификаторов", -- src\editor\menu_edit.lua
|
||||
["Auto complete while typing"] = "Автоматически дополнять идентификаторы при наборе", -- src\editor\menu_edit.lua
|
||||
["Break execution at the next executed line of code"] = "Прервать выполнение на следующей строке", -- src\editor\menu_project.lua, src\editor\gui.lua
|
||||
["C&lear Output Window"] = "Очистка ок&на вывода", -- src\editor\menu_project.lua
|
||||
["C&omment/Uncomment"] = "Зако&мментировать/раскомментировать", -- src\editor\menu_edit.lua
|
||||
["Can't debug the script in the active editor window."] = "Невозможно отладить скрипт в текущем окне редактирования.", -- src\editor\debugger.lua
|
||||
["Can't find file '%s' in the current project to activate for debugging. Update the project or open the file in the editor before debugging."] = "Файл '%s', необходимый для отладки, не найден в текущем проекте. Обновите проект или откройте файл в редакторе перед началом отладки.", -- src\editor\debugger.lua
|
||||
["Can't process auto-recovery record; invalid format: %s."] = "Ошибка обработки записи автоматического восстановления; неверный формат: %s.", -- src\editor\commands.lua
|
||||
["Can't run the entry point script ('%s')."] = "Ошибка выполнения стартового скрипта ('%s').", -- src\editor\debugger.lua
|
||||
["Can't start debugging session due to internal error '%s'."] = "Невозможно начать отладочную сессию из-за внутренней ошибки '%s'.", -- src\editor\debugger.lua
|
||||
["Can't start debugging without an opened file or with the current file not being saved ('%s')."] = "Невозможно начать отладку без открытого файла или с несохраненным текущим файлом ('%s').", -- src\editor\debugger.lua
|
||||
["Choose a project directory"] = "Выберите каталог проекта", -- src\editor\menu_project.lua
|
||||
["Clear &Dynamic Words"] = "Очистить &динамические слова", -- src\editor\menu_edit.lua
|
||||
["Clear the output window before compiling or debugging"] = "Очистить окно вывода перед компиляцией или отладкой", -- src\editor\menu_project.lua
|
||||
["Close the current editor window"] = "Закрыть текущее окно редактирования", -- src\editor\menu_file.lua
|
||||
["Co&ntinue"] = "Пр&одолжить", -- src\editor\menu_project.lua
|
||||
["Col: %d"] = "Стб: %d", -- src\editor\editor.lua
|
||||
["Comment or uncomment current or selected lines"] = "Закомментировать или раскомментировать текущую или выделенные строки", -- src\editor\menu_edit.lua
|
||||
["Compilation error"] = "Ошибка компиляции", -- src\editor\debugger.lua, src\editor\commands.lua
|
||||
["Compilation successful; %.0f%% success rate (%d/%d)."] = "Компиляция завершена успешно; процент успеха: %.0f%% (%d/%d).", -- src\editor\commands.lua
|
||||
["Compile the current file"] = "Скомпилировать текущий файл", -- src\editor\menu_project.lua
|
||||
["Complete &Identifier"] = "Дополнить &идентификатор", -- src\editor\menu_edit.lua
|
||||
["Complete the current identifier"] = "Дополнить текущий идентификатор", -- src\editor\menu_edit.lua
|
||||
["Copy selected text to clipboard"] = "Скопировать выделенный текст в буфер обмена", -- src\editor\menu_edit.lua, src\editor\gui.lua
|
||||
["Couldn't activate file '%s' for debugging; continuing without it."] = "Невозможно открыть файл '%s' для отладки; выполнение будет продолжено без него.", -- src\editor\debugger.lua
|
||||
["Create an empty document"] = "Создать новый документ", -- src\editor\menu_file.lua, src\editor\gui.lua
|
||||
["Cu&t"] = "Вы&резать", -- src\editor\editor.lua, src\editor\menu_edit.lua
|
||||
["Cut selected text to clipboard"] = "Вырезать выделенный текст в буфер обмена", -- src\editor\menu_edit.lua, src\editor\gui.lua
|
||||
["Debugger server started at %s:%d."] = "Сервер отладки запущен на %s:%d.", -- src\editor\debugger.lua
|
||||
["Debugging session completed (%s)."] = "Отладочная сессия завершена (%s).", -- src\editor\debugger.lua
|
||||
["Debugging session started in '%s'."] = "Отладочная сессия запущена в '%s'.", -- src\editor\debugger.lua
|
||||
["Do you want to reload it?"] = "Перезагрузить его?", -- src\editor\editor.lua
|
||||
["Do you want to save the changes to '%s'?"] = "Сохранить изменения в '%s'?", -- src\editor\commands.lua
|
||||
["E&xit"] = "Вы&ход", -- src\editor\menu_file.lua
|
||||
["Enter Lua code and press Enter to run it."] = "Введите код на Lua и нажмите Enter для выполнения.", -- src\editor\shellbox.lua
|
||||
["Enter line number"] = "Введите номер строки", -- src\editor\menu_search.lua
|
||||
["Error while loading API file: %s"] = "Ошибка загрузки файла определений API: %s", -- src\editor\autocomplete.lua
|
||||
["Error while processing API file: %s"] = "Ошибка обработки файла определений API: %s", -- src\editor\autocomplete.lua
|
||||
["Error"] = "Ошибка", -- src\editor\commands.lua
|
||||
["Evaluate &Watches"] = "&Вычислить выражения", -- src\editor\debugger.lua
|
||||
["Evaluate in Console"] = "Выполнить в консоли", -- src\editor\editor.lua
|
||||
["Execute the current project/file and keep updating the code to see immediate results"] = "Запустить текущий проект/файл и продолжать вносить изменения в код с немедленным выводом результатов", -- src\editor\menu_project.lua
|
||||
["Execute the current project/file"] = "Запустить текущий проект/файл", -- src\editor\menu_project.lua
|
||||
["Execution error"] = "Ошибка выполнения", -- src\editor\debugger.lua
|
||||
["Exit program"] = "Выйти из программы", -- src\editor\menu_file.lua
|
||||
["Expr"] = "Выр.", -- src\editor\debugger.lua
|
||||
["Expression"] = "Выражение", -- src\editor\debugger.lua
|
||||
["File '%s' has been modified on disk."] = "Файл '%s' был изменен на диске.", -- src\editor\editor.lua
|
||||
["File '%s' has more recent timestamp than restored '%s'; please review before saving."] = "Файл '%s' имеет более позднее время модификации, чем восстановленный '%s'; пожалуйста просмотрите его перед сохранением.", -- src\editor\commands.lua
|
||||
["File '%s' no longer exists."] = "Файл '%s' больше не существует.", -- src\editor\editor.lua
|
||||
["File history"] = "История файлов", -- src\editor\menu_file.lua
|
||||
["Find &In Files"] = "Н&айти в файлах", -- src\editor\menu_search.lua
|
||||
["Find &Next"] = "Найти &далее", -- src\editor\menu_search.lua
|
||||
["Find &Previous"] = "Найти &ранее", -- src\editor\menu_search.lua
|
||||
["Find and replace text in files"] = "Найти и заменить текст в файлах", -- src\editor\menu_search.lua
|
||||
["Find and replace text"] = "Найти и заменить текст", -- src\editor\menu_search.lua, src\editor\gui.lua
|
||||
["Find text in files"] = "Найти текст в файлах", -- src\editor\menu_search.lua
|
||||
["Find text"] = "Найти текст", -- src\editor\menu_search.lua, src\editor\gui.lua
|
||||
["Find the earlier text occurence"] = "Найти предыдущее вхождение текста", -- src\editor\menu_search.lua
|
||||
["Find the next text occurrence"] = "Найти следующее вхождение текста", -- src\editor\menu_search.lua
|
||||
["Fold or unfold all code folds"] = "Свернуть или развернуть все блоки кода", -- src\editor\menu_edit.lua
|
||||
["Found auto-recovery record and restored saved session."] = "Найдена запись авто-восстановления и восстановлена сохраненная сессия.", -- src\editor\commands.lua
|
||||
["Full &Screen"] = "Во весь экр&ан", -- src\editor\menu_view.lua
|
||||
["Go to a selected line"] = "Перейти к заданной строке", -- src\editor\menu_search.lua
|
||||
["Goto Line"] = "Перейти к строке", -- src\editor\menu_search.lua
|
||||
["INS"] = "ВСТ", -- src\editor\editor.lua
|
||||
["Jump to a function definition..."] = "Перейти к определению функции...", -- src\editor\editor.lua
|
||||
["Known Files"] = "Файлы Lua", -- src\editor\commands.lua
|
||||
["Ln: %d"] = "Стр: %d", -- src\editor\editor.lua
|
||||
["Local console"] = "Локальная консоль", -- src\editor\shellbox.lua, src\editor\gui.lua
|
||||
["Lua &Interpreter"] = "&Интерпретатор Lua", -- src\editor\menu_project.lua
|
||||
["OVR"] = "ЗАМ", -- src\editor\editor.lua
|
||||
["Open an existing document"] = "Открыть существующий документ", -- src\editor\menu_file.lua, src\editor\gui.lua
|
||||
["Open file"] = "Открыть файл", -- src\editor\commands.lua
|
||||
["Output (running)"] = "Вывод (запущен)", -- src\editor\output.lua
|
||||
["Output"] = "Вывод", -- src\editor\output.lua, src\editor\settings.lua, src\editor\gui.lua
|
||||
["Paste text from the clipboard"] = "Вставить текст из буфера обмена", -- src\editor\menu_edit.lua, src\editor\gui.lua
|
||||
["Prepend '=' to show complex values on multiple lines."] = "Укажите '=' в начале выражения для отображения сложных значений на нескольких строках.", -- src\editor\shellbox.lua
|
||||
["Press cancel to abort."] = "Нажмите Отмена для завершения.", -- src\editor\commands.lua
|
||||
["Program '%s' started in '%s' (pid: %d)."] = "Программа '%s' запущена в '%s' (pid: %d).", -- src\editor\output.lua
|
||||
["Program can't start because conflicting process is running as '%s'."] = "Программа не может быть запущена из-за конфликтующего процесса, выполняющегося как '%s'.", -- src\editor\output.lua
|
||||
["Program completed in %.2f seconds (pid: %d)."] = "Программа завершена за %.2f секунд (pid: %d).", -- src\editor\output.lua
|
||||
["Program starting as '%s'."] = "Программа запускается как '%s'.", -- src\editor\output.lua
|
||||
["Program stopped (pid: %d)."] = "Программа завершена (pid: %d).", -- src\editor\debugger.lua
|
||||
["Program unable to run as '%s'."] = "Программа не может быть запущена как '%s'.", -- src\editor\output.lua
|
||||
["Project"] = "Проект", -- src\editor\settings.lua, src\editor\gui.lua
|
||||
["Project/&FileTree Window"] = "Окно &проекта/списка файлов", -- src\editor\menu_view.lua
|
||||
["R/O"] = "R/O", -- src\editor\editor.lua
|
||||
["R/W"] = "R/W", -- src\editor\editor.lua
|
||||
["Re&place In Files"] = "Замени&ть в файлах", -- src\editor\menu_search.lua
|
||||
["Recent Files"] = "Недавние файлы", -- src\editor\menu_file.lua
|
||||
["Redo last edit undone"] = "Вернуть последнее отмененное изменение", -- src\editor\menu_edit.lua, src\editor\gui.lua
|
||||
["Refused a request to start a new debugging session as there is one in progress already."] = "Отказано в запросе на запуск новой отладочной сессии, поскольку одна сессия уже выполняется.", -- src\editor\debugger.lua
|
||||
["Remote console"] = "Удаленная консоль", -- src\editor\shellbox.lua
|
||||
["Reset to default layout"] = "Установить расположение окон по умолчанию", -- src\editor\menu_view.lua
|
||||
["Resets the dynamic word list for autocompletion"] = "Очистить список динамических слов для автодополнения", -- src\editor\menu_edit.lua
|
||||
["Run as Scratchpad"] = "Запустить как черновик", -- src\editor\menu_project.lua
|
||||
["S&top Debugging"] = "&Завершить отладку", -- src\editor\menu_project.lua
|
||||
["S&top Process"] = "&Завершить процесс", -- src\editor\menu_project.lua
|
||||
["Save &As..."] = "Сохранить &как...", -- src\editor\menu_file.lua
|
||||
["Save A&ll"] = "Сохранить &все", -- src\editor\menu_file.lua
|
||||
["Save Changes?"] = "Сохранить изменения?", -- src\editor\commands.lua
|
||||
["Save all open documents"] = "Сохранить все открытые документы", -- src\editor\menu_file.lua, src\editor\gui.lua
|
||||
["Save file as"] = "Сохранить файл как", -- src\editor\commands.lua
|
||||
["Save file?"] = "Сохранить файл?", -- src\editor\commands.lua
|
||||
["Save the current document to a file with a new name"] = "Сохранить текущий документ в файл под новым именем", -- src\editor\menu_file.lua
|
||||
["Save the current document"] = "Сохранить текущий документ", -- src\editor\menu_file.lua, src\editor\gui.lua
|
||||
["Saved auto-recover at %s."] = "Сохранено авто-восст в %s.", -- src\editor\commands.lua
|
||||
["Scratchpad error"] = "Ошибка в черновике", -- src\editor\debugger.lua
|
||||
["Select &All"] = "Выделить &все", -- src\editor\editor.lua, src\editor\menu_edit.lua
|
||||
["Select all text in the editor"] = "Выделить весь текст в редакторе", -- src\editor\menu_edit.lua
|
||||
["Set project directory from current file"] = "Установить каталог проекта по текущему файлу", -- src\editor\gui.lua
|
||||
["Set the interpreter to be used"] = "Установить используемый интерпретатор", -- src\editor\menu_project.lua
|
||||
["Show &Tooltip"] = "Показать &подсказку", -- src\editor\menu_edit.lua
|
||||
["Show tooltip for current position; place cursor after opening bracket of function"] = "Показать подсказку в текущей позиции; переместите курсор в позицию после открывающей скобки функции", -- src\editor\menu_edit.lua
|
||||
["Sort selected lines"] = "Отсортировать выделенные строки", -- src\editor\menu_search.lua
|
||||
["Stack Window"] = "Окно стека", -- src\editor\debugger.lua
|
||||
["Start &Debugging"] = "Начать &отладку", -- src\editor\menu_project.lua
|
||||
["Start debugging"] = "Начать отладку", -- src\editor\menu_project.lua, src\editor\gui.lua
|
||||
["Step &Into"] = "&Войти", -- src\editor\menu_project.lua
|
||||
["Step &Over"] = "&Следующая строка", -- src\editor\menu_project.lua
|
||||
["Step O&ut"] = "В&ыйти", -- src\editor\menu_project.lua
|
||||
["Step into"] = "Войти в функцию", -- src\editor\menu_project.lua, src\editor\gui.lua
|
||||
["Step out of the current function"] = "Выйти из текущей функции", -- src\editor\menu_project.lua, src\editor\gui.lua
|
||||
["Step over"] = "Перейти на следующую строку", -- src\editor\menu_project.lua, src\editor\gui.lua
|
||||
["Stop the currently running process"] = "Завершить текущий процесс", -- src\editor\menu_project.lua, src\editor\gui.lua
|
||||
["Switch to or from full screen mode"] = "Переключить полноэкранный режим", -- src\editor\menu_view.lua
|
||||
["The API file must be located in a subdirectory of the API directory."] = "Файл определений API должен быть расположен в подкаталоге каталога API.", -- src\editor\autocomplete.lua
|
||||
["Toggle Break&point"] = "&Точка останова", -- src\editor\menu_project.lua
|
||||
["Toggle breakpoint"] = "Переключить точку останова", -- src\editor\menu_project.lua, src\editor\gui.lua
|
||||
["Tr&ace"] = "Т&рассировка", -- src\editor\menu_project.lua
|
||||
["Trace execution showing each executed line"] = "Отслеживать выполнение, показывая каждую выполненную строку", -- src\editor\menu_project.lua
|
||||
["Unable to load file '%s'."] = "Ошибка загрузки файла '%s'.", -- src\editor\commands.lua
|
||||
["Unable to save file '%s': %s"] = "Ошибка сохранения файла '%s': %s", -- src\editor\commands.lua
|
||||
["Unable to stop program (pid: %d), code %d."] = "Невозможно завершить программу (pid: %d), код %d.", -- src\editor\debugger.lua
|
||||
["Undo last edit"] = "Отменить последнее действие", -- src\editor\menu_edit.lua, src\editor\gui.lua
|
||||
["Use 'clear' to clear the shell output and the history."] = "Используйте команду 'clear' для очистки содержимого окна и истории.", -- src\editor\shellbox.lua
|
||||
["Use Shift-Enter for multiline code."] = "Используйте Shift-Enter для многострочного кода.", -- src\editor\shellbox.lua
|
||||
["Value"] = "Значение", -- src\editor\debugger.lua
|
||||
["View the output/console window"] = "Показать окно вывода/консоли", -- src\editor\menu_view.lua
|
||||
["View the project/filetree window"] = "Показать окно проекта/списка файлов", -- src\editor\menu_view.lua
|
||||
["View the stack window"] = "Показать окно стека", -- src\editor\menu_view.lua, src\editor\gui.lua
|
||||
["View the watch window"] = "Показать окно наблюдения", -- src\editor\menu_view.lua, src\editor\gui.lua
|
||||
["Watch Window"] = "Окно наблюдения", -- src\editor\debugger.lua
|
||||
["Welcome to the interactive Lua interpreter."] = "Добро пожаловать в интерактивный интерпретатор Lua.", -- src\editor\shellbox.lua
|
||||
["You must save the program first."] = "Вы должны сначала сохранить программу.", -- src\editor\commands.lua
|
||||
["on line %d"] = "в строке %d", -- src\editor\debugger.lua, src\editor\commands.lua
|
||||
["traced %d instruction"] = {"выполнена %d инструкция", "выполнено %d инструкции", "выполнено %d инструкций"}, -- src\editor\debugger.lua
|
||||
}
|
||||
25
cfg/scheme-picker.lua
Normal file
25
cfg/scheme-picker.lua
Normal file
@@ -0,0 +1,25 @@
|
||||
--[[
|
||||
1. Pick a color scheme by clicking on a link:
|
||||
- [Tomorrow](macro:shell(ApplyStyleConfig('cfg/tomorrow.lua','Tomorrow')))
|
||||
- [TomorrowNight](macro:shell(ApplyStyleConfig('cfg/tomorrow.lua','TomorrowNight')))
|
||||
- [TomorrowNightBlue](macro:shell(ApplyStyleConfig('cfg/tomorrow.lua','TomorrowNightBlue')))
|
||||
- [TomorrowNightBright](macro:shell(ApplyStyleConfig('cfg/tomorrow.lua','TomorrowNightBright')))
|
||||
- [TomorrowNightEighties](macro:shell(ApplyStyleConfig('cfg/tomorrow.lua','TomorrowNightEighties')))
|
||||
- [Zenburn](macro:shell(ApplyStyleConfig('cfg/tomorrow.lua','Zenburn')))
|
||||
- [Monokai](macro:shell(ApplyStyleConfig('cfg/tomorrow.lua','Monokai')))
|
||||
- [SolarizedDark](macro:shell(ApplyStyleConfig('cfg/tomorrow.lua','SolarizedDark')))
|
||||
- [SolarizedLight](macro:shell(ApplyStyleConfig('cfg/tomorrow.lua','SolarizedLight')))
|
||||
|
||||
- [ZeroBrane Studio](macro:shell(ide.config.styles = StylesGetDefault(); ReApplySpecAndStyles()))
|
||||
|
||||
2. [Apply the same scheme to Output/Console windows](macro:shell(ide.config.stylesoutshell = ide.config.styles; ReApplySpecAndStyles())).
|
||||
|
||||
3. Add the following code with the scheme you selected to `cfg/user.lua`.
|
||||
--]]
|
||||
|
||||
local G = ...
|
||||
styles = G.loadfile('cfg/tomorrow.lua')('TomorrowNightBlue')
|
||||
stylesoutshell = styles -- also apply the same scheme to Output/Console windows
|
||||
|
||||
-- code example
|
||||
if false and true then func(1, 2, 3) end
|
||||
251
cfg/tomorrow.lua
Normal file
251
cfg/tomorrow.lua
Normal file
@@ -0,0 +1,251 @@
|
||||
-- This is a file that sets color scheme based on Tomorrow format.
|
||||
-- Copyright 2011-12 Paul Kulchenko, ZeroBrane LLC
|
||||
|
||||
-- Tomorrow colors from https://github.com/chriskempson/tomorrow-theme
|
||||
-- Zenburn colors from https://github.com/jnurmine/Zenburn/blob/master/colors/zenburn.vim (contributed by Srdjan Marković)
|
||||
-- Monokai colors from http://www.monokai.nl/blog/2006/07/15/textmate-color-theme/
|
||||
-- Solarized colors from https://github.com/altercation/vim-colors-solarized
|
||||
|
||||
local theme = ...
|
||||
|
||||
local function h2d(n) return 0+('0x'..n) end
|
||||
local function H(c, bg) c = c:gsub('#','')
|
||||
-- since alpha is not implemented, convert RGBA to RGB
|
||||
-- assuming 0 is transparent and 255 is opaque
|
||||
-- based on http://stackoverflow.com/a/2645218/1442917
|
||||
local bg = bg and H(bg) or {255, 255, 255}
|
||||
local a = #c > 6 and h2d(c:sub(7,8))/255 or 1
|
||||
local r, g, b = h2d(c:sub(1,2)), h2d(c:sub(3,4)), h2d(c:sub(5,6))
|
||||
return {
|
||||
math.min(255, math.floor((1-a)*bg[1]+a*r)),
|
||||
math.min(255, math.floor((1-a)*bg[2]+a*g)),
|
||||
math.min(255, math.floor((1-a)*bg[3]+a*b))}
|
||||
end
|
||||
|
||||
local colors = {
|
||||
Tomorrow = {
|
||||
Background = H'ffffff',
|
||||
CurrentLine = H'efefef',
|
||||
Selection = H'd6d6d6',
|
||||
Foreground = H'4d4d4c',
|
||||
Comment = H'8e908c',
|
||||
Red = H'c82829',
|
||||
Orange = H'f5871f',
|
||||
Yellow = H'eab700',
|
||||
Green = H'718c00',
|
||||
Aqua = H'3e999f',
|
||||
Blue = H'4271ae',
|
||||
Purple = H'8959a8',
|
||||
},
|
||||
TomorrowNight = {
|
||||
Background = H'1d1f21',
|
||||
CurrentLine = H'282a2e',
|
||||
Selection = H'373b41',
|
||||
Foreground = H'c5c8c6',
|
||||
Comment = H'969896',
|
||||
Red = H'cc6666',
|
||||
Orange = H'de935f',
|
||||
Yellow = H'f0c674',
|
||||
Green = H'b5bd68',
|
||||
Aqua = H'8abeb7',
|
||||
Blue = H'81a2be',
|
||||
Purple = H'b294bb',
|
||||
},
|
||||
TomorrowNightEighties = {
|
||||
Background = H'2d2d2d',
|
||||
CurrentLine = H'393939',
|
||||
Selection = H'515151',
|
||||
Foreground = H'cccccc',
|
||||
Comment = H'999999',
|
||||
Red = H'f2777a',
|
||||
Orange = H'f99157',
|
||||
Yellow = H'ffcc66',
|
||||
Green = H'99cc99',
|
||||
Aqua = H'66cccc',
|
||||
Blue = H'6699cc',
|
||||
Purple = H'cc99cc',
|
||||
},
|
||||
TomorrowNightBlue = {
|
||||
Background = H'002451',
|
||||
CurrentLine = H'00346e',
|
||||
Selection = H'003f8e',
|
||||
Foreground = H'ffffff',
|
||||
Comment = H'7285b7',
|
||||
Red = H'ff9da4',
|
||||
Orange = H'ffc58f',
|
||||
Yellow = H'ffeead',
|
||||
Green = H'd1f1a9',
|
||||
Aqua = H'99ffff',
|
||||
Blue = H'bbdaff',
|
||||
Purple = H'ebbbff',
|
||||
},
|
||||
TomorrowNightBright = {
|
||||
Background = H'000000',
|
||||
CurrentLine = H'2a2a2a',
|
||||
Selection = H'424242',
|
||||
Foreground = H'eaeaea',
|
||||
Comment = H'969896',
|
||||
Red = H'd54e53',
|
||||
Orange = H'e78c45',
|
||||
Yellow = H'e7c547',
|
||||
Green = H'b9ca4a',
|
||||
Aqua = H'70c0b1',
|
||||
Blue = H'7aa6da',
|
||||
Purple = H'c397d8',
|
||||
},
|
||||
Zenburn = {
|
||||
Background = H'3f3f3f',
|
||||
CurrentLine = H'363636',
|
||||
Selection = H'1f1f1f',
|
||||
Foreground = H'dcdccc',
|
||||
Comment = H'7f9f7f',
|
||||
Red = H'8cd0d3',
|
||||
Orange = H'dfaf8f',
|
||||
Yellow = H'e3ceab',
|
||||
Green = H'cc9393',
|
||||
Aqua = H'dca3a3',
|
||||
Blue = H'f0dfaf',
|
||||
Purple = H'efef8f',
|
||||
},
|
||||
Monokai = {
|
||||
Background = H'272822',
|
||||
CurrentLine = H'49483E',
|
||||
Selection = H'49483E',
|
||||
Foreground = H'F8F8F2',
|
||||
Comment = H'75715E',
|
||||
Red = H'AE81FF',
|
||||
Orange = H'AE81FF',
|
||||
Yellow = H'F8F8F2',
|
||||
Green = H'E6DB74',
|
||||
Aqua = H'66D9EF',
|
||||
Blue = H'F92672',
|
||||
Purple = H'A6E22E',
|
||||
},
|
||||
SolarizedDark = {
|
||||
Background = H'042029',
|
||||
CurrentLine = H'0A2933',
|
||||
Selection = H'073642',
|
||||
Foreground = H'839496',
|
||||
Comment = H'586E75',
|
||||
Red = H'D33682',
|
||||
Orange = H'B58900',
|
||||
Yellow = H'839496',
|
||||
Green = H'2AA198',
|
||||
Aqua = H'839496',
|
||||
Blue = H'859900',
|
||||
Purple = H'268BD2',
|
||||
},
|
||||
SolarizedLight = {
|
||||
Background = H'FDF6E3',
|
||||
CurrentLine = H'EEE8D5',
|
||||
Selection = H'E0E0D0',
|
||||
Foreground = H'586E75',
|
||||
Comment = H'93A1A1',
|
||||
Red = H'D33682',
|
||||
Orange = H'B58900',
|
||||
Yellow = H'586E75',
|
||||
Green = H'2AA198',
|
||||
Aqua = H'586E75',
|
||||
Blue = H'859900',
|
||||
Purple = H'268BD2',
|
||||
},
|
||||
}
|
||||
|
||||
-- add more of the specified color (keeping all in 0-255 range)
|
||||
local mixer = function(c, n, more)
|
||||
if not c or #c == 0 then return c end
|
||||
local c = {c[1], c[2], c[3]} -- create a copy, so it can be modified
|
||||
c[n] = c[n] + more
|
||||
local excess = c[n] - 255
|
||||
if excess > 0 then
|
||||
for clr = 1, 3 do
|
||||
c[clr] = n == clr and 255 or c[clr] > excess and c[clr] - excess or 0
|
||||
end
|
||||
end
|
||||
return c
|
||||
end
|
||||
|
||||
local C = colors[theme] or colors.Tomorrow
|
||||
return {
|
||||
-- wxstc.wxSTC_LUA_DEFAULT
|
||||
lexerdef = {fg = C.Foreground},
|
||||
-- wxstc.wxSTC_LUA_COMMENT, wxstc.wxSTC_LUA_COMMENTLINE, wxstc.wxSTC_LUA_COMMENTDOC
|
||||
comment = {fg = C.Comment, fill = true},
|
||||
-- wxstc.wxSTC_LUA_STRING, wxstc.wxSTC_LUA_CHARACTER, wxstc.wxSTC_LUA_LITERALSTRING
|
||||
stringtxt = {fg = C.Green},
|
||||
-- wxstc.wxSTC_LUA_STRINGEOL
|
||||
stringeol = {fg = C.Green, fill = true},
|
||||
-- wxstc.wxSTC_LUA_PREPROCESSOR
|
||||
preprocessor = {fg = C.Orange},
|
||||
-- wxstc.wxSTC_LUA_OPERATOR
|
||||
operator = {fg = C.Aqua},
|
||||
-- wxstc.wxSTC_LUA_NUMBER
|
||||
number = {fg = C.Red},
|
||||
|
||||
-- wxstc.wxSTC_LUA_WORD, wxstc.wxSTC_LUA_WORD#
|
||||
keywords0 = {fg = C.Blue, b = true},
|
||||
keywords1 = {fg = C.Aqua, b = false},
|
||||
keywords2 = {fg = C.Aqua, b = true},
|
||||
keywords3 = {fg = C.Purple, b = true},
|
||||
keywords4 = {fg = C.Purple, b = true},
|
||||
keywords5 = {fg = C.Purple, b = true},
|
||||
keywords6 = {fg = C.Purple, b = true},
|
||||
keywords7 = {fg = C.Purple, b = true},
|
||||
|
||||
-- common (inherit fg/bg from text)
|
||||
-- wxstc.wxSTC_LUA_IDENTIFIER
|
||||
text = {fg = C.Foreground, bg = C.Background},
|
||||
linenumber = {fg = C.Comment},
|
||||
bracematch = {fg = C.Orange, b = true},
|
||||
bracemiss = {fg = C.Red, b = true},
|
||||
ctrlchar = {fg = C.Yellow},
|
||||
indent = {fg = C.Comment},
|
||||
calltip = nil,
|
||||
|
||||
-- common special (need custom fg & bg)
|
||||
calltipbg = nil,
|
||||
sel = {bg = C.Selection},
|
||||
caret = {fg = C.Foreground},
|
||||
caretlinebg = {bg = C.CurrentLine},
|
||||
fold = {fg = C.Comment, bg = C.Background},
|
||||
whitespace = {fg = C.Comment, bg = C.Background},
|
||||
|
||||
fncall = {fg = C.Purple, st = wxstc.wxSTC_INDIC_PLAIN},
|
||||
--[[ other possible values are:
|
||||
wxSTC_INDIC_PLAIN Single-line underline
|
||||
wxSTC_INDIC_SQUIGGLE Squiggly underline
|
||||
wxSTC_INDIC_TT Line of small T-shapes
|
||||
wxSTC_INDIC_DIAGONAL Diagonal hatching
|
||||
wxSTC_INDIC_STRIKE Strike-out
|
||||
wxSTC_INDIC_BOX Box
|
||||
wxSTC_INDIC_ROUNDBOX Rounded Box (not suppored in the current version?)
|
||||
--]]
|
||||
|
||||
-- markup
|
||||
['['] = {hs = mixer(C.Comment, 3, 64)},
|
||||
['|'] = {fg = mixer(mixer(C.Comment, 1, 64), 3, 64)},
|
||||
|
||||
-- markers
|
||||
marker = {
|
||||
message = {bg = C.Selection},
|
||||
output = {bg = C.CurrentLine},
|
||||
prompt = {fg = C.Foreground, bg = C.Background},
|
||||
error = {bg = mixer(C.Background, 1, 32)},
|
||||
},
|
||||
}
|
||||
|
||||
--[[
|
||||
|
||||
---- Solarized license ----
|
||||
|
||||
Copyright (c) 2011 Ethan Schoonover
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
---- Zenburn license ----
|
||||
|
||||
GNU GPL, http://www.gnu.org/licenses/gpl.html
|
||||
|
||||
--]]
|
||||
@@ -10,26 +10,47 @@ Configuration files are loaded in the following order
|
||||
--]]--
|
||||
|
||||
-- an example of how loaded configuration can be modified from this file
|
||||
local G = ... -- this now points to the global environment in the script
|
||||
local luaspec = G.ide.specs['lua']
|
||||
luaspec.exts[#luaspec.exts+1] = "luaz"
|
||||
luaspec.keywords[1] = luaspec.keywords[1] .. ' foo'
|
||||
|
||||
-- change font size to 12
|
||||
-- to modify a key mapping; see the full list of IDs in src/editor/keymap.lua
|
||||
local G = ...
|
||||
keymap[G.ID_STARTDEBUG] = "Ctrl-Shift-D"
|
||||
|
||||
-- to change font size to 12
|
||||
editor.fontsize = 12 -- this is mapped to ide.config.editor.fontsize
|
||||
editor.fontname = "Courier New"
|
||||
filehistorylength = 20 -- this is mapped to ide.config.filehistorylength
|
||||
|
||||
-- specify full path to love2d *executable*; this is only needed
|
||||
-- to specify full path to love2d *executable*; this is only needed
|
||||
-- if the game folder and the executable are NOT in the same folder.
|
||||
path.love2d = 'd:/lua/love/love'
|
||||
|
||||
-- specify full path to moai *executable* if it's not in one of PATH folders
|
||||
-- to specify full path to moai *executable* if it's not in one of PATH folders
|
||||
path.moai = 'd:/lua/moai/moai'
|
||||
-- Moai config.lua file is searched in the following places: (1) MOAI_CONFIG,
|
||||
-- (2) project directory (if set) or folder with the current file,
|
||||
-- (3) folder with the moai executable.
|
||||
|
||||
-- specify full path to gideros *executable* if it's not in one of PATH folders
|
||||
-- to specify full path to gideros *executable* if it's not in one of PATH folders
|
||||
path.gideros = 'd:/Program Files/Gideros/GiderosPlayer.exe'
|
||||
|
||||
-- specify full path to lua interpreter if you need to use your own version
|
||||
-- to specify full path to corona *executable* if it's not in one of PATH folders
|
||||
path.corona = 'd:/path/to/Corona SDK/Corona Simulator.exe'
|
||||
|
||||
-- to specify full path to lua interpreter if you need to use your own version
|
||||
path.lua = 'd:/lua/lua'
|
||||
|
||||
-- fix an issue with 0d0d0a line endings in MOAI examples,
|
||||
-- to specify full path to GSL-shell *executable* if it's not in one of PATH folders
|
||||
path.gslshell = [[D:\Lua\gsl-shell\gsl-shell.exe]]
|
||||
|
||||
-- to provide output filter for those engines that support redirecting
|
||||
-- of "print" output to the IDE (like Corona SDK and Gideros)
|
||||
debugger.outputfilter = function(m) return #m < 124 and m or m:sub(1,120).."...\n" end
|
||||
|
||||
-- to fix an issue with 0d0d0a line endings in MOAI examples,
|
||||
-- which may negatively affect breakpoints during debugging
|
||||
editor.iofilter = "0d0d0aFix"
|
||||
|
||||
@@ -49,5 +70,29 @@ acandtip.startat = 4
|
||||
-- to automatically open files requested during debugging
|
||||
editor.autoactivate = true
|
||||
|
||||
-- specify a list of MOAI entrypoints
|
||||
-- to specify a list of MOAI entrypoints
|
||||
moai = { entrypoints = { "main.lua", "source/main.lua" } }
|
||||
|
||||
-- to specify language to use in the IDE (requires a file in cfg/i18n folder)
|
||||
language = "ru"
|
||||
|
||||
-- to change background color (or other colors in the IDE);
|
||||
-- see cfg/tomorrow.lua for example/details on what other colors to change
|
||||
styles.text = {bg = {240,240,220}}
|
||||
|
||||
-- to change the default color scheme; check tomorrow.lua for the list
|
||||
-- of supported schemes or use cfg/scheme-picker.lua to pick a scheme.
|
||||
local G = ...
|
||||
styles = G.loadfile('cfg/tomorrow.lua')('Tomorrow')
|
||||
-- also apply the same scheme to Output and Console windows
|
||||
stylesoutshell = styles
|
||||
|
||||
-- to change markers used in console and output windows
|
||||
styles.marker = styles.marker or {}
|
||||
styles.marker.message = {ch = wxstc.wxSTC_MARK_ARROWS, {0, 0, 0}, {240, 240, 240}}
|
||||
styles.marker.output = {ch = wxstc.wxSTC_MARK_BACKGROUND, {0, 0, 0}, {240, 240, 240}}
|
||||
styles.marker.prompt = {ch = wxstc.wxSTC_MARK_CHARACTER+('>'):byte(), {0, 0, 0}, {240, 240, 240}}
|
||||
stylesoutshell = styles
|
||||
|
||||
-- to disable indicators (underlining) on function calls
|
||||
editor.showfncall = false
|
||||
|
||||
75
interpreters/corona.lua
Normal file
75
interpreters/corona.lua
Normal file
@@ -0,0 +1,75 @@
|
||||
-- Copyright 2011-12 Paul Kulchenko, ZeroBrane LLC
|
||||
|
||||
local corona
|
||||
local win = ide.osname == "Windows"
|
||||
local mac = ide.osname == "Macintosh"
|
||||
|
||||
return {
|
||||
name = "Corona",
|
||||
description = "Corona SDK mobile framework",
|
||||
api = {"baselib", "corona"},
|
||||
frun = function(self,wfilename,rundebug)
|
||||
corona = corona or ide.config.path.corona -- check if the path is configured
|
||||
if not corona then
|
||||
local sep = win and ';' or ':'
|
||||
local default =
|
||||
win and ([[C:\Program Files\Corona SDK]]..sep..[[D:\Program Files\Corona SDK]]..sep..
|
||||
[[C:\Program Files\Corona Labs\Corona SDK]]..sep..[[D:\Program Files\Corona Labs\Corona SDK]]..sep..
|
||||
[[C:\Program Files (x86)\Corona SDK]]..sep..[[D:\Program Files (x86)\Corona SDK]]..sep..
|
||||
[[C:\Program Files (x86)\Corona Labs\Corona SDK]]..sep..[[D:\Program Files (x86)\Corona Labs\Corona SDK]]..sep)
|
||||
or mac and ('/Applications/CoronaSDK/Corona Simulator.app/Contents/MacOS'..sep)
|
||||
or ''
|
||||
local path = default
|
||||
..(os.getenv('PATH') or '')..sep
|
||||
..(os.getenv('HOME') and os.getenv('HOME') .. '/bin' or '')
|
||||
local paths = {}
|
||||
for p in path:gmatch("[^"..sep.."]+") do
|
||||
corona = corona or GetFullPathIfExists(p, win and 'Corona Simulator.exe' or 'Corona Simulator')
|
||||
table.insert(paths, p)
|
||||
end
|
||||
if not corona then
|
||||
DisplayOutput("Can't find corona executable in any of the folders in PATH: "
|
||||
..table.concat(paths, ", ").."\n")
|
||||
return
|
||||
end
|
||||
end
|
||||
|
||||
local file = GetFullPathIfExists(self:fworkdir(wfilename), 'main.lua')
|
||||
if not file then
|
||||
DisplayOutput("Can't find 'main.lua' file in the current project folder.\n")
|
||||
return
|
||||
end
|
||||
|
||||
-- can we really do debugging? do if asked and if not on mac OSX where it's not supported
|
||||
local debug = rundebug and not mac
|
||||
if rundebug then
|
||||
-- start running the application right away
|
||||
DebuggerAttachDefault({runstart=true, startwith = file,
|
||||
redirect = debug and "c", noshell = mac or nil, noeval = mac or nil})
|
||||
|
||||
-- copy mobdebug.lua to Resources/ folder on Win and to the project folder on OSX
|
||||
-- as copying it to Resources/ folder seems to break the signature of the app.
|
||||
local mdbc = mac and MergeFullPath(self:fworkdir(wfilename), "mobdebug.lua")
|
||||
or MergeFullPath(GetPathWithSep(corona), "Resources/mobdebug.lua")
|
||||
local mdbl = MergeFullPath(GetPathWithSep(ide.editorFilename), "lualibs/mobdebug/mobdebug.lua")
|
||||
if not wx.wxFileExists(mdbc)
|
||||
or GetFileModTime(mdbc):GetTicks() < GetFileModTime(mdbl):GetTicks() then
|
||||
FileCopy(mdbl, mdbc)
|
||||
DisplayOutput(("Copied ZeroBrane Studio debugger ('mobdebug.lua') to '%s' folder.\n"):format(mdbc))
|
||||
end
|
||||
end
|
||||
|
||||
local cmd = ('"%s" %s"%s"'):format(corona, debug and "-debug " or "", file)
|
||||
-- CommandLineRun(cmd,wdir,tooutput,nohide,stringcallback,uid,endcallback)
|
||||
return CommandLineRun(cmd,self:fworkdir(wfilename),true,false,nil,nil,
|
||||
function() ide.debugger.pid = nil end)
|
||||
end,
|
||||
fprojdir = function(self,wfilename)
|
||||
return wfilename:GetPath(wx.wxPATH_GET_VOLUME)
|
||||
end,
|
||||
fworkdir = function(self,wfilename)
|
||||
return ide.config.path.projectdir or wfilename:GetPath(wx.wxPATH_GET_VOLUME)
|
||||
end,
|
||||
hasdebugger = true,
|
||||
fattachdebug = function(self) DebuggerAttachDefault() end,
|
||||
}
|
||||
@@ -1,3 +1,5 @@
|
||||
-- Copyright 2011-12 Paul Kulchenko, ZeroBrane LLC
|
||||
|
||||
local gideros
|
||||
local win = ide.osname == "Windows"
|
||||
local mac = ide.osname == "Macintosh"
|
||||
@@ -11,7 +13,8 @@ return {
|
||||
if not gideros then
|
||||
local sep = win and ';' or ':'
|
||||
local default =
|
||||
win and ([[C:\Program Files\Gideros]]..sep..[[D:\Program Files\Gideros]]..sep)
|
||||
win and ([[C:\Program Files\Gideros]]..sep..[[D:\Program Files\Gideros]]..sep..
|
||||
[[C:\Program Files (x86)\Gideros]]..sep..[[D:\Program Files (x86)\Gideros]]..sep)
|
||||
or mac and ('/Applications/Gideros Studio/Gideros Player.app/Contents/MacOS'..sep)
|
||||
or ''
|
||||
local path = default
|
||||
@@ -57,7 +60,7 @@ return {
|
||||
return
|
||||
end
|
||||
|
||||
if rundebug then DebuggerAttachDefault() end
|
||||
if rundebug then DebuggerAttachDefault({redirect = "c"}) end
|
||||
|
||||
local cmd = ('"%s"'):format(gideros)
|
||||
-- CommandLineRun(cmd,wdir,tooutput,nohide,stringcallback,uid,endcallback)
|
||||
|
||||
71
interpreters/gslshell.lua
Normal file
71
interpreters/gslshell.lua
Normal file
@@ -0,0 +1,71 @@
|
||||
-- Copyright 2011-12 Paul Kulchenko, ZeroBrane LLC
|
||||
|
||||
local gslshell
|
||||
local win = ide.osname == "Windows"
|
||||
|
||||
return {
|
||||
name = "GSL-shell",
|
||||
description = "GSL-shell interpreter",
|
||||
api = {"baselib"},
|
||||
frun = function(self,wfilename,rundebug)
|
||||
gslshell = gslshell or ide.config.path.gslshell -- check if the path is configured
|
||||
if not gslshell then
|
||||
local sep = win and ';' or ':'
|
||||
local default =
|
||||
win and ([[C:\Program Files\gsl-shell]]..sep..[[D:\Program Files\gsl-shell]]..sep..
|
||||
[[C:\Program Files (x86)\gsl-shell]]..sep..[[D:\Program Files (x86)\gsl-shell]]..sep)
|
||||
or ''
|
||||
local path = default
|
||||
..(os.getenv('PATH') or '')..sep
|
||||
..(GetPathWithSep(self:fworkdir(wfilename)))..sep
|
||||
..(os.getenv('HOME') and GetPathWithSep(os.getenv('HOME'))..'bin' or '')
|
||||
local paths = {}
|
||||
for p in path:gmatch("[^"..sep.."]+") do
|
||||
gslshell = gslshell or GetFullPathIfExists(p, win and 'gsl-shell.exe' or 'gsl-shell')
|
||||
table.insert(paths, p)
|
||||
end
|
||||
if not gslshell then
|
||||
DisplayOutput("Can't find gsl-shell executable in any of the following folders: "
|
||||
..table.concat(paths, ", ").."\n")
|
||||
return
|
||||
end
|
||||
end
|
||||
|
||||
do
|
||||
-- add path to GSL-shell modules and templates/?.lua.in
|
||||
local gslpath = GetPathWithSep(gslshell)
|
||||
local luapath = gslpath.."gsl-shell/?.lua;"..gslpath.."gsl-shell/templates/?.lua.in"
|
||||
local luacpath = gslpath.."gsl-shell/?.dll"
|
||||
|
||||
-- add GSL-shell modules to the end of LUA_PATH
|
||||
local _, path = wx.wxGetEnv("LUA_PATH")
|
||||
if path and not path:find(gslpath, 1, true) then
|
||||
wx.wxSetEnv("LUA_PATH", path..";"..luapath)
|
||||
end
|
||||
|
||||
-- add GSL-shell modules to the beginning of LUA_CPATH to make luajit
|
||||
-- friendly luasocket to load before it loads luasocket shipped with ZBS
|
||||
local _, cpath = wx.wxGetEnv("LUA_CPATH")
|
||||
if cpath and not cpath:find(gslpath, 1, true) then
|
||||
wx.wxSetEnv("LUA_CPATH", luacpath..";"..cpath)
|
||||
end
|
||||
end
|
||||
|
||||
if rundebug then DebuggerAttachDefault() end
|
||||
|
||||
local cmd = ('"%s" "%s"'):format(gslshell, wfilename:GetFullPath())
|
||||
-- CommandLineRun(cmd,wdir,tooutput,nohide,stringcallback,uid,endcallback)
|
||||
return CommandLineRun(cmd,self:fworkdir(wfilename),true,false,nil,nil,
|
||||
function() ide.debugger.pid = nil end)
|
||||
end,
|
||||
fprojdir = function(self,wfilename)
|
||||
return wfilename:GetPath(wx.wxPATH_GET_VOLUME)
|
||||
end,
|
||||
fworkdir = function(self,wfilename)
|
||||
return ide.config.path.projectdir or wfilename:GetPath(wx.wxPATH_GET_VOLUME)
|
||||
end,
|
||||
hasdebugger = true,
|
||||
fattachdebug = function(self) DebuggerAttachDefault() end,
|
||||
skipcompile = true,
|
||||
unhideanywindow = true,
|
||||
}
|
||||
@@ -1,3 +1,5 @@
|
||||
-- Copyright 2011-12 Paul Kulchenko, ZeroBrane LLC
|
||||
|
||||
local love2d
|
||||
local win = ide.osname == "Windows"
|
||||
local mac = ide.osname == "Macintosh"
|
||||
@@ -11,7 +13,8 @@ return {
|
||||
if not love2d then
|
||||
local sep = win and ';' or ':'
|
||||
local default =
|
||||
win and ([[C:\Program Files\love]]..sep..[[D:\Program Files\love]]..sep)
|
||||
win and ([[C:\Program Files\love]]..sep..[[D:\Program Files\love]]..sep..
|
||||
[[C:\Program Files (x86)\love]]..sep..[[D:\Program Files (x86)\love]]..sep)
|
||||
or mac and ('/Applications/love.app/Contents/MacOS'..sep)
|
||||
or ''
|
||||
local path = default
|
||||
|
||||
@@ -48,4 +48,5 @@ return {
|
||||
hasdebugger = true,
|
||||
fattachdebug = function(self) DebuggerAttachDefault() end,
|
||||
scratchextloop = false,
|
||||
unhideanywindow = true,
|
||||
}
|
||||
|
||||
@@ -1,21 +1,31 @@
|
||||
if (not(ide.config.path.luxinia and
|
||||
wx.wxFileExists(ide.config.path.luxinia..'luxinia.exe'))) then
|
||||
return
|
||||
end
|
||||
|
||||
return {
|
||||
name = "Luxinia",
|
||||
description = "Luxinia project",
|
||||
api = {"luxiniaapi","baselib"},
|
||||
frun = function(self,wfilename,withdebug)
|
||||
if not ide.config.path.luxinia then wx.wxMessageBox("Please define 'path.luxinia' in your cfg/user.lua (see estrela.lua for examples)"); return end
|
||||
local projdir = ide.config.path.projectdir
|
||||
local endstr = (projdir and projdir:len()>0
|
||||
local args = (projdir and projdir:len()>0
|
||||
and " -p "..projdir or "")
|
||||
|
||||
local fname = wfilename:GetFullName()
|
||||
endstr = endstr..(fname and (" -t "..fname) or "")
|
||||
args = args..(fname and (" -t "..fname) or "")
|
||||
|
||||
if withdebug and ide.config.luxinia1debug then
|
||||
DebuggerAttachDefault({
|
||||
basedir=projdir,
|
||||
run=true, }
|
||||
)
|
||||
local editorDir = string.gsub(ide.editorFilename:gsub("[^/\\]+$",""),"\\","/")
|
||||
script = ""..
|
||||
"package.path=package.path..';"..editorDir.."lualibs/?/?.lua';"..
|
||||
"io.stdout:setvbuf('no'); mobdebug = require('mobdebug'); mobdebug.start('" .. ide.debugger.hostname.."',"..ide.debugger.portnumber..");"..
|
||||
"jit.debug();mobdebug.off();"
|
||||
|
||||
local cmd = 'luxinia.exe --nologo'..endstr
|
||||
args = args..' -b "'..script..'"'
|
||||
end
|
||||
|
||||
local cmd = 'luxinia.exe --nologo'..args
|
||||
CommandLineRun(cmd,ide.config.path.luxinia,true,true)
|
||||
end,
|
||||
fuid = function(self,wfilename) return "luxinia "..(ide.config.path.projectdir or "") end,
|
||||
@@ -30,4 +40,5 @@ return {
|
||||
|
||||
return path:sub(0,-2)
|
||||
end,
|
||||
hasdebugger = ide.config.luxinia1debug or false,
|
||||
}
|
||||
|
||||
@@ -1,15 +1,12 @@
|
||||
if (not(ide.config.path.luxinia2 and
|
||||
wx.wxFileExists(ide.config.path.luxinia2..'luajit.exe'))) then
|
||||
return
|
||||
end
|
||||
|
||||
return {
|
||||
name = "Luxinia2",
|
||||
description = "Luxinia2",
|
||||
api = {"baselib","cg30","cggl30","glfw","glewgl","assimp20","luxmath","luxgfx","luxscene","luajit2",},
|
||||
api = {"baselib","glfw","glewgl","assimp20","luxmath","luxgfx","luxscene","luajit2",},
|
||||
|
||||
finitclient = function(self)
|
||||
if (not CommandLineRunning(self:fuid(wfilename))) then return end
|
||||
if not ide.config.path.luxinia2 then wx.wxMessageBox("Please define 'path.luxinia2' in your cfg/user.lua (see estrela.lua for examples)"); return end
|
||||
local init = dofile(ide.config.path.luxinia2.."/../comserver/client.lua")
|
||||
local fenv = {}
|
||||
setmetatable(fenv,{__index = _G})
|
||||
|
||||
@@ -10,7 +10,8 @@ return {
|
||||
if not moai then
|
||||
local sep = win and ';' or ':'
|
||||
local default =
|
||||
win and ([[C:\Program Files\moai]]..sep..[[D:\Program Files\moai]]..sep)
|
||||
win and ([[C:\Program Files\moai]]..sep..[[D:\Program Files\moai]]..sep..
|
||||
[[C:\Program Files (x86)\moai]]..sep..[[D:\Program Files (x86)\moai]]..sep)
|
||||
or ''
|
||||
local path = default
|
||||
..(os.getenv('PATH') or '')..sep
|
||||
@@ -85,4 +86,5 @@ return {
|
||||
end,
|
||||
hasdebugger = true,
|
||||
fattachdebug = function(self) DebuggerAttachDefault() end,
|
||||
scratchextloop = true,
|
||||
}
|
||||
|
||||
@@ -1,15 +1,16 @@
|
||||
--
|
||||
-- MobDebug 0.502
|
||||
-- MobDebug 0.5084
|
||||
-- Copyright 2011-12 Paul Kulchenko
|
||||
-- Based on RemDebug 1.0 Copyright Kepler Project 2005
|
||||
--
|
||||
|
||||
local mobdebug = {
|
||||
_NAME = "mobdebug",
|
||||
_VERSION = 0.502,
|
||||
_VERSION = 0.5084,
|
||||
_COPYRIGHT = "Paul Kulchenko",
|
||||
_DESCRIPTION = "Mobile Remote Debugger for the Lua programming language",
|
||||
port = 8171
|
||||
port = os and os.getenv and os.getenv("MOBDEBUG_PORT") or 8172,
|
||||
yieldtimeout = 0.02,
|
||||
}
|
||||
|
||||
local coroutine = coroutine
|
||||
@@ -205,6 +206,8 @@ local step_level = 0
|
||||
local stack_level = 0
|
||||
local server
|
||||
local rset
|
||||
local outputs = {}
|
||||
local iobase = {print = print}
|
||||
local basedir = ""
|
||||
local deferror = "execution aborted at default debugee"
|
||||
local debugee = function ()
|
||||
@@ -215,7 +218,7 @@ end
|
||||
local function q(s) return s:gsub('([%(%)%.%%%+%-%*%?%[%^%$%]])','%%%1') end
|
||||
|
||||
local serpent = (function() ---- include Serpent module for serialization
|
||||
local n, v = "serpent", 0.18 -- (C) 2012 Paul Kulchenko; MIT License
|
||||
local n, v = "serpent", 0.20 -- (C) 2012 Paul Kulchenko; MIT License
|
||||
local c, d = "Paul Kulchenko", "Serializer and pretty printer of Lua data types"
|
||||
local snum = {[tostring(1/0)]='1/0 --[[math.huge]]',[tostring(-1/0)]='-1/0 --[[-math.huge]]',[tostring(0/0)]='0/0'}
|
||||
local badtype = {thread = true, userdata = true}
|
||||
@@ -266,7 +269,7 @@ local function s(t, opts)
|
||||
seen[t] = spath
|
||||
return tag..globerr(t, level)
|
||||
elseif ttype == 'function' then
|
||||
seen[t] = spath
|
||||
seen[t] = insref or spath
|
||||
local ok, res = pcall(string.dump, t)
|
||||
local func = ok and ((opts.nocode and "function() --[[..skipped..]] end" or
|
||||
"loadstring("..safestr(res)..",'@serialized')")..comment(t, level))
|
||||
@@ -274,6 +277,8 @@ local function s(t, opts)
|
||||
elseif ttype == "table" then
|
||||
if level >= maxl then return tag..'{}'..comment('max', level) end
|
||||
seen[t] = insref or spath -- set path to use as reference
|
||||
if getmetatable(t) and getmetatable(t).__tostring
|
||||
then return tag..safestr(tostring(t))..comment("meta", level) end
|
||||
if next(t) == nil then return tag..'{}'..comment(t, level) end -- table empty
|
||||
local maxn, o, out = #t, {}, {}
|
||||
for key = 1, maxn do table.insert(o, key) end
|
||||
@@ -404,9 +409,9 @@ local function restore_vars(vars)
|
||||
end
|
||||
end
|
||||
|
||||
local function capture_vars()
|
||||
local function capture_vars(level)
|
||||
local vars = {}
|
||||
local func = debug.getinfo(3, "f").func
|
||||
local func = debug.getinfo(level or 3, "f").func
|
||||
local i = 1
|
||||
while true do
|
||||
local name, value = debug.getupvalue(func, i)
|
||||
@@ -416,7 +421,7 @@ local function capture_vars()
|
||||
end
|
||||
i = 1
|
||||
while true do
|
||||
local name, value = debug.getlocal(3, i)
|
||||
local name, value = debug.getlocal(level or 3, i)
|
||||
if not name then break end
|
||||
if string.sub(name, 1, 1) ~= '(' then vars[name] = value end
|
||||
i = i + 1
|
||||
@@ -599,7 +604,7 @@ local function debugger_loop(sfile, sline)
|
||||
while true do
|
||||
local line, err
|
||||
local wx = rawget(genv, "wx") -- use rawread to make strict.lua happy
|
||||
if wx and server.settimeout then server:settimeout(0.1) end
|
||||
if (wx or mobdebug.yield) and server.settimeout then server:settimeout(mobdebug.yieldtimeout) end
|
||||
while true do
|
||||
line, err = server:receive()
|
||||
if not line and err == "timeout" then
|
||||
@@ -622,7 +627,10 @@ local function debugger_loop(sfile, sline)
|
||||
win:Connect(wx.wxEVT_TIMER, exitLoop)
|
||||
app:MainLoop()
|
||||
end
|
||||
elseif mobdebug.yield then mobdebug.yield()
|
||||
end
|
||||
elseif not line and err == "closed" then
|
||||
error("Debugger connection unexpectedly closed")
|
||||
else
|
||||
break
|
||||
end
|
||||
@@ -655,10 +663,10 @@ local function debugger_loop(sfile, sline)
|
||||
status, res = stringify_results(pcall(func))
|
||||
end
|
||||
if status then
|
||||
server:send("200 OK " .. string.len(res) .. "\n")
|
||||
server:send("200 OK " .. #res .. "\n")
|
||||
server:send(res)
|
||||
else
|
||||
server:send("401 Error in Expression " .. string.len(res) .. "\n")
|
||||
server:send("401 Error in Expression " .. #res .. "\n")
|
||||
server:send(res)
|
||||
end
|
||||
else
|
||||
@@ -694,7 +702,7 @@ local function debugger_loop(sfile, sline)
|
||||
debugee = func
|
||||
coroutine.yield("load")
|
||||
else
|
||||
server:send("401 Error in Expression " .. string.len(res) .. "\n")
|
||||
server:send("401 Error in Expression " .. #res .. "\n")
|
||||
server:send(res)
|
||||
end
|
||||
else
|
||||
@@ -712,7 +720,7 @@ local function debugger_loop(sfile, sline)
|
||||
watches[newidx] = func
|
||||
server:send("200 OK " .. newidx .. "\n")
|
||||
else
|
||||
server:send("401 Error in Expression " .. string.len(res) .. "\n")
|
||||
server:send("401 Error in Expression " .. #res .. "\n")
|
||||
server:send(res)
|
||||
end
|
||||
else
|
||||
@@ -740,7 +748,7 @@ local function debugger_loop(sfile, sline)
|
||||
elseif ev == events.RESTART then
|
||||
-- nothing to do
|
||||
else
|
||||
server:send("401 Error in Execution " .. string.len(file) .. "\n")
|
||||
server:send("401 Error in Execution " .. #file .. "\n")
|
||||
server:send(file)
|
||||
end
|
||||
elseif command == "STEP" then
|
||||
@@ -756,7 +764,7 @@ local function debugger_loop(sfile, sline)
|
||||
elseif ev == events.RESTART then
|
||||
-- nothing to do
|
||||
else
|
||||
server:send("401 Error in Execution " .. string.len(file) .. "\n")
|
||||
server:send("401 Error in Execution " .. #file .. "\n")
|
||||
server:send(file)
|
||||
end
|
||||
elseif command == "OVER" or command == "OUT" then
|
||||
@@ -777,7 +785,7 @@ local function debugger_loop(sfile, sline)
|
||||
elseif ev == events.RESTART then
|
||||
-- nothing to do
|
||||
else
|
||||
server:send("401 Error in Execution " .. string.len(file) .. "\n")
|
||||
server:send("401 Error in Execution " .. #file .. "\n")
|
||||
server:send(file)
|
||||
end
|
||||
elseif command == "BASEDIR" then
|
||||
@@ -807,6 +815,27 @@ local function debugger_loop(sfile, sline)
|
||||
server:send("401 Error in Expression 0\n")
|
||||
end
|
||||
end
|
||||
elseif command == "OUTPUT" then
|
||||
local _, _, stream, mode = string.find(line, "^[A-Z]+%s+(%w+)%s+([dcr])%s*$")
|
||||
if stream and mode and stream == "stdout" then
|
||||
-- assign "print" in the global environment
|
||||
genv.print = mode == 'd' and iobase.print or coroutine.wrap(function(...)
|
||||
-- wrapping into coroutine.wrap protects this function from
|
||||
-- being stepped through in the debugger
|
||||
local tbl = {...}
|
||||
while true do
|
||||
if mode == 'c' then iobase.print(unpack(tbl)) end
|
||||
for n = 1, #tbl do
|
||||
tbl[n] = serpent.line(tbl[n], {nocode = true, comment = false}) end
|
||||
local file = table.concat(tbl, "\t").."\n"
|
||||
server:send("204 Output " .. stream .. " " .. #file .. "\n" .. file)
|
||||
tbl = {coroutine.yield()}
|
||||
end
|
||||
end)
|
||||
server:send("200 OK\n")
|
||||
else
|
||||
server:send("400 Bad Request\n")
|
||||
end
|
||||
elseif command == "EXIT" then
|
||||
server:send("200 OK\n")
|
||||
coroutine.yield("exit")
|
||||
@@ -851,6 +880,11 @@ local function start(controller_host, controller_port)
|
||||
-- start from 16th frame, which is sufficiently large for this check.
|
||||
stack_level = stack_depth(16)
|
||||
|
||||
-- provide our own traceback function to report the error remotely
|
||||
do
|
||||
local dtraceback = debug.traceback
|
||||
debug.traceback = function (err) genv.print(dtraceback(err, 3)) end
|
||||
end
|
||||
coro_debugger = coroutine.create(debugger_loop)
|
||||
debug.sethook(debug_hook, "lcr")
|
||||
return coroutine.resume(coro_debugger, file, info.currentline)
|
||||
@@ -874,7 +908,7 @@ local function controller(controller_host, controller_port)
|
||||
|
||||
local function report(trace, err)
|
||||
local msg = err .. "\n" .. trace
|
||||
server:send("401 Error in Execution " .. string.len(msg) .. "\n")
|
||||
server:send("401 Error in Execution " .. #msg .. "\n")
|
||||
server:send(msg)
|
||||
return err
|
||||
end
|
||||
@@ -904,8 +938,8 @@ local function controller(controller_host, controller_port)
|
||||
report(debug.traceback(coro_debugee), tostring(err))
|
||||
if exitonerror then break end
|
||||
-- resume once more to clear the response the debugger wants to send
|
||||
local status, err = coroutine.resume(coro_debugger, events.RESTART)
|
||||
if status and err == "exit" then break end
|
||||
local status, err = coroutine.resume(coro_debugger, events.RESTART, capture_vars(2))
|
||||
if not status or status and err == "exit" then break end
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -956,45 +990,58 @@ local function off()
|
||||
end
|
||||
|
||||
-- Handles server debugging commands
|
||||
local function handle(params, client)
|
||||
local function handle(params, client, options)
|
||||
local _, _, command = string.find(params, "^([a-z]+)")
|
||||
local file, line, watch_idx
|
||||
if command == "run" or command == "step" or command == "out"
|
||||
or command == "over" or command == "exit" then
|
||||
client:send(string.upper(command) .. "\n")
|
||||
client:receive() -- this should consume the first '200 OK' response
|
||||
local breakpoint = client:receive()
|
||||
if not breakpoint then
|
||||
print("Program finished")
|
||||
os.exit()
|
||||
return -- use return here for those cases where os.exit() is not wanted
|
||||
end
|
||||
local _, _, status = string.find(breakpoint, "^(%d+)")
|
||||
if status == "200" then
|
||||
-- don't need to do anything
|
||||
elseif status == "202" then
|
||||
_, _, file, line = string.find(breakpoint, "^202 Paused%s+(.-)%s+(%d+)%s*$")
|
||||
if file and line then
|
||||
print("Paused at file " .. file .. " line " .. line)
|
||||
while true do
|
||||
local done = true
|
||||
local breakpoint = client:receive()
|
||||
if not breakpoint then
|
||||
print("Program finished")
|
||||
os.exit()
|
||||
return -- use return here for those cases where os.exit() is not wanted
|
||||
end
|
||||
elseif status == "203" then
|
||||
_, _, file, line, watch_idx = string.find(breakpoint, "^203 Paused%s+(.-)%s+(%d+)%s+(%d+)%s*$")
|
||||
if file and line and watch_idx then
|
||||
print("Paused at file " .. file .. " line " .. line .. " (watch expression " .. watch_idx .. ": [" .. watches[watch_idx] .. "])")
|
||||
end
|
||||
elseif status == "401" then
|
||||
local _, _, size = string.find(breakpoint, "^401 Error in Execution (%d+)$")
|
||||
if size then
|
||||
local msg = client:receive(tonumber(size))
|
||||
print("Error in remote application: " .. msg)
|
||||
local _, _, status = string.find(breakpoint, "^(%d+)")
|
||||
if status == "200" then
|
||||
-- don't need to do anything
|
||||
elseif status == "202" then
|
||||
_, _, file, line = string.find(breakpoint, "^202 Paused%s+(.-)%s+(%d+)%s*$")
|
||||
if file and line then
|
||||
print("Paused at file " .. file .. " line " .. line)
|
||||
end
|
||||
elseif status == "203" then
|
||||
_, _, file, line, watch_idx = string.find(breakpoint, "^203 Paused%s+(.-)%s+(%d+)%s+(%d+)%s*$")
|
||||
if file and line and watch_idx then
|
||||
print("Paused at file " .. file .. " line " .. line .. " (watch expression " .. watch_idx .. ": [" .. watches[watch_idx] .. "])")
|
||||
end
|
||||
elseif status == "204" then
|
||||
local _, _, stream, size = string.find(breakpoint, "^204 Output (%w+) (%d+)$")
|
||||
if stream and size then
|
||||
local msg = client:receive(tonumber(size))
|
||||
print(msg)
|
||||
if outputs[stream] then outputs[stream](msg) end
|
||||
-- this was just the output, so go back reading the response
|
||||
done = false
|
||||
end
|
||||
elseif status == "401" then
|
||||
local _, _, size = string.find(breakpoint, "^401 Error in Execution (%d+)$")
|
||||
if size then
|
||||
local msg = client:receive(tonumber(size))
|
||||
print("Error in remote application: " .. msg)
|
||||
os.exit(1)
|
||||
return nil, nil, msg -- use return here for those cases where os.exit() is not wanted
|
||||
end
|
||||
else
|
||||
print("Unknown error")
|
||||
os.exit(1)
|
||||
return nil, nil, msg -- use return here for those cases where os.exit() is not wanted
|
||||
-- use return here for those cases where os.exit() is not wanted
|
||||
return nil, nil, "Debugger error: unexpected response '" .. breakpoint .. "'"
|
||||
end
|
||||
else
|
||||
print("Unknown error")
|
||||
os.exit(1)
|
||||
-- use return here for those cases where os.exit() is not wanted
|
||||
return nil, nil, "Debugger error: unexpected response '" .. breakpoint .. "'"
|
||||
if done then break end
|
||||
end
|
||||
elseif command == "setb" then
|
||||
_, _, _, file, line = string.find(params, "^([a-z]+)%s+(.-)%s+(%d+)%s*$")
|
||||
@@ -1099,7 +1146,7 @@ local function handle(params, client)
|
||||
if not file then
|
||||
_, _, file, lines = string.find(exp, "^(%S+)%s+(.+)")
|
||||
end
|
||||
client:send("LOAD " .. string.len(lines) .. " " .. file .. "\n")
|
||||
client:send("LOAD " .. #lines .. " " .. file .. "\n")
|
||||
client:send(lines)
|
||||
else
|
||||
local file = io.open(exp, "r")
|
||||
@@ -1116,48 +1163,61 @@ local function handle(params, client)
|
||||
|
||||
local file = string.gsub(exp, "\\", "/") -- convert slash
|
||||
file = string.gsub(file, '^'..q(basedir), '') -- remove basedir
|
||||
client:send("LOAD " .. string.len(lines) .. " " .. file .. "\n")
|
||||
client:send("LOAD " .. #lines .. " " .. file .. "\n")
|
||||
client:send(lines)
|
||||
end
|
||||
local params = client:receive()
|
||||
if not params then
|
||||
return nil, nil, "Debugger error: missing response after EXEC/LOAD"
|
||||
end
|
||||
local _, _, status, len = string.find(params, "^(%d+).-%s+(%d+)%s*$")
|
||||
if status == "200" then
|
||||
len = tonumber(len)
|
||||
if len > 0 then
|
||||
local status, res
|
||||
local str = client:receive(len)
|
||||
-- handle serialized table with results
|
||||
local func, err = loadstring(str)
|
||||
if func then
|
||||
status, res = pcall(func)
|
||||
if not status then err = res
|
||||
elseif type(res) ~= "table" then
|
||||
err = "received "..type(res).." instead of expected 'table'"
|
||||
end
|
||||
end
|
||||
if err then
|
||||
print("Error in processing results: " .. err)
|
||||
return nil, nil, "Error in processing results: " .. err
|
||||
end
|
||||
print((table.unpack or unpack)(res))
|
||||
return res[1], res
|
||||
while true do
|
||||
local params = client:receive()
|
||||
if not params then
|
||||
return nil, nil, "Debugger error: missing response after EXEC/LOAD"
|
||||
end
|
||||
elseif status == "201" then
|
||||
_, _, file, line = string.find(params, "^201 Started%s+(.-)%s+(%d+)%s*$")
|
||||
elseif status == "202" or params == "200 OK" then
|
||||
-- do nothing; this only happens when RE/LOAD command gets the response
|
||||
-- that was for the original command that was aborted
|
||||
elseif status == "401" then
|
||||
len = tonumber(len)
|
||||
local res = client:receive(len)
|
||||
print("Error in expression: " .. res)
|
||||
return nil, nil, res
|
||||
else
|
||||
print("Unknown error")
|
||||
return nil, nil, "Debugger error: unexpected response after EXEC/LOAD '" .. params .. "'"
|
||||
local done = true
|
||||
local _, _, status, len = string.find(params, "^(%d+).-%s+(%d+)%s*$")
|
||||
if status == "200" then
|
||||
len = tonumber(len)
|
||||
if len > 0 then
|
||||
local status, res
|
||||
local str = client:receive(len)
|
||||
-- handle serialized table with results
|
||||
local func, err = loadstring(str)
|
||||
if func then
|
||||
status, res = pcall(func)
|
||||
if not status then err = res
|
||||
elseif type(res) ~= "table" then
|
||||
err = "received "..type(res).." instead of expected 'table'"
|
||||
end
|
||||
end
|
||||
if err then
|
||||
print("Error in processing results: " .. err)
|
||||
return nil, nil, "Error in processing results: " .. err
|
||||
end
|
||||
print((table.unpack or unpack)(res))
|
||||
return res[1], res
|
||||
end
|
||||
elseif status == "201" then
|
||||
_, _, file, line = string.find(params, "^201 Started%s+(.-)%s+(%d+)%s*$")
|
||||
elseif status == "202" or params == "200 OK" then
|
||||
-- do nothing; this only happens when RE/LOAD command gets the response
|
||||
-- that was for the original command that was aborted
|
||||
elseif status == "204" then
|
||||
local _, _, stream, size = string.find(params, "^204 Output (%w+) (%d+)$")
|
||||
if stream and size then
|
||||
local msg = client:receive(tonumber(size))
|
||||
print(msg)
|
||||
if outputs[stream] then outputs[stream](msg) end
|
||||
-- this was just the output, so go back reading the response
|
||||
done = false
|
||||
end
|
||||
elseif status == "401" then
|
||||
len = tonumber(len)
|
||||
local res = client:receive(len)
|
||||
print("Error in expression: " .. res)
|
||||
return nil, nil, res
|
||||
else
|
||||
print("Unknown error")
|
||||
return nil, nil, "Debugger error: unexpected response after EXEC/LOAD '" .. params .. "'"
|
||||
end
|
||||
if done then break end
|
||||
end
|
||||
else
|
||||
print("Invalid command")
|
||||
@@ -1209,6 +1269,22 @@ local function handle(params, client)
|
||||
print("Unknown error")
|
||||
return nil, nil, "Debugger error: unexpected response after STACK"
|
||||
end
|
||||
elseif command == "output" then
|
||||
local _, _, stream, mode = string.find(params, "^[a-z]+%s+(%w+)%s+([dcr])%s*$")
|
||||
if stream and mode then
|
||||
client:send("OUTPUT "..stream.." "..mode.."\n")
|
||||
local resp = client:receive()
|
||||
local _, _, status = string.find(resp, "^(%d+)%s+%w+%s*$")
|
||||
if status == "200" then
|
||||
print("Stream "..stream.." redirected")
|
||||
outputs[stream] = type(options) == 'table' and options.handler or nil
|
||||
else
|
||||
print("Unknown error")
|
||||
return nil, nil, "Debugger error: can't redirect "..stream
|
||||
end
|
||||
else
|
||||
print("Invalid command")
|
||||
end
|
||||
elseif command == "basedir" then
|
||||
local _, _, dir = string.find(params, "^[a-z]+%s+(.+)$")
|
||||
if dir then
|
||||
@@ -1247,6 +1323,7 @@ local function handle(params, client)
|
||||
print("load <file> -- loads a local file for debugging")
|
||||
print("reload -- restarts the current debugging session")
|
||||
print("stack -- reports stack trace")
|
||||
print("output stdout <d|c|r> -- capture and redirect io stream (default|copy|redirect)")
|
||||
print("basedir [<path>] -- sets the base path of the remote application, or shows the current one")
|
||||
print("exit -- exits debugger")
|
||||
else
|
||||
@@ -1339,6 +1416,7 @@ mobdebug.moai = moai
|
||||
mobdebug.coro = coro
|
||||
mobdebug.line = serpent.line
|
||||
mobdebug.dump = serpent.dump
|
||||
mobdebug.yield = nil -- callback
|
||||
|
||||
-- this is needed to make "require 'modebug'" to work when mobdebug
|
||||
-- module is loaded manually
|
||||
|
||||
52
spec/lua.lua
52
spec/lua.lua
@@ -168,36 +168,32 @@ return {
|
||||
},
|
||||
|
||||
keywords = {
|
||||
[[and break do else elseif end false for function if ipairs pairs
|
||||
in local nil not or repeat return then true until while]],
|
||||
[[and break do else elseif end for function goto if in local not or repeat return then until while]],
|
||||
|
||||
[[_VERSION assert collectgarbage dofile error gcinfo loadfile loadstring
|
||||
print rawget rawset require tonumber tostring type unpack]],
|
||||
[[_G _VERSION _ENV false io.stderr io.stdin io.stdout nil math.huge math.pi package.config
|
||||
package.cpath package.loaded package.loaders package.path package.preload package.searchers self true]],
|
||||
|
||||
[[_G getfenv getmetatable loadlib next pcall
|
||||
rawequal setfenv setmetatable xpcall
|
||||
string table math coroutine io os debug
|
||||
load module select]],
|
||||
[[assert collectgarbage dofile error getfenv getmetatable ipairs load loadfile loadstring
|
||||
module next pairs pcall print rawequal rawget rawlen rawset require
|
||||
select setfenv setmetatable tonumber tostring type unpack xpcall]],
|
||||
|
||||
[[string.byte string.char string.dump string.find string.len
|
||||
string.lower string.rep string.sub string.upper string.format string.gfind string.gsub
|
||||
table.concat table.foreach table.foreachi table.getn table.sort table.insert table.remove table.setn
|
||||
math.abs math.acos math.asin math.atan math.atan2 math.ceil math.cos math.deg math.exp
|
||||
math.floor math.frexp math.ldexp math.log math.log10 math.max math.min math.mod
|
||||
math.pi math.pow math.rad math.random math.randomseed math.sin math.sqrt math.tan
|
||||
string.gmatch string.match string.reverse table.maxn
|
||||
math.cosh math.fmod math.modf math.sinh math.tanh math.huge]],
|
||||
|
||||
[[coroutine.create coroutine.resume coroutine.status
|
||||
coroutine.wrap coroutine.yield
|
||||
io.close io.flush io.input io.lines io.open io.output io.read io.tmpfile io.type io.write
|
||||
io.stdin io.stdout io.stderr
|
||||
os.clock os.date os.difftime os.execute os.exit os.getenv os.remove os.rename
|
||||
os.setlocale os.time os.tmpname
|
||||
coroutine.running package.cpath package.loaded package.loadlib package.path
|
||||
package.preload package.seeall io.popen
|
||||
debug.debug debug.getfenv debug.gethook debug.getinfo debug.getlocal
|
||||
debug.getmetatable debug.getregistry debug.getupvalue debug.setfenv
|
||||
debug.sethook debug.setlocal debug.setmetatable debug.setupvalue debug.traceback]],
|
||||
[[bit32.arshift bit32.band bit32.bnot bit32.bor bit32.btest bit32.bxor bit32.extract
|
||||
bit32.lrotate bit32.lshift bit32.replace bit32.rrotate bit32.rshift
|
||||
coroutine.create coroutine.resume coroutine.running coroutine.status coroutine.wrap coroutine.yield
|
||||
debug.debug debug.getfenv debug.gethook debug.getinfo debug.getlocal
|
||||
debug.getmetatable debug.getregistry debug.getupvalue debug.getuservalue debug.setfenv
|
||||
debug.sethook debug.setlocal debug.setmetatable debug.setupvalue debug.setuservalue
|
||||
debug.traceback debug.upvalueid debug.upvaluejoin
|
||||
io.close io.flush io.input io.lines io.open io.output io.popen io.read io.tmpfile io.type io.write
|
||||
close flush lines read seek setvbuf write
|
||||
math.abs math.acos math.asin math.atan math.atan2 math.ceil math.cos math.cosh math.deg math.exp
|
||||
math.floor math.fmod math.frexp math.ldexp math.log math.log10 math.max math.min math.modf
|
||||
math.pow math.rad math.random math.randomseed math.sin math.sinh math.sqrt math.tan math.tanh
|
||||
os.clock os.date os.difftime os.execute os.exit os.getenv os.remove os.rename os.setlocale os.time os.tmpname
|
||||
package.loadlib package.searchpath package.seeall
|
||||
string.byte string.char string.dump string.find string.format string.gmatch string.gsub string.len
|
||||
string.lower string.match string.rep string.reverse string.sub string.upper
|
||||
byte find format gmatch gsub len lower match rep reverse sub upper
|
||||
table.concat table.insert table.maxn table.pack table.remove table.sort table.unpack]]
|
||||
},
|
||||
}
|
||||
|
||||
57
src/defs.lua
57
src/defs.lua
@@ -54,7 +54,7 @@ style = {
|
||||
linenumber = stattr,
|
||||
bracematch = stattr,
|
||||
bracemiss = stattr,
|
||||
escapechar = stattr,
|
||||
ctrlchar = stattr,
|
||||
indent = stattr,
|
||||
calltip = stattr,
|
||||
|
||||
@@ -81,14 +81,9 @@ style = {
|
||||
config = {
|
||||
appname = "zbstudio", -- by default the launcher name
|
||||
|
||||
path = {
|
||||
-- path for tools/interpreters
|
||||
luxinia = "C:/luxbin/",
|
||||
-- path to luxinia exe
|
||||
|
||||
projectdir = "",
|
||||
-- the project directory, used by
|
||||
-- some tools/interpreters
|
||||
path = { -- path for tools/interpreters
|
||||
luxinia = "C:/luxbin/", -- path to luxinia exe
|
||||
projectdir = "", -- the project directory, used by some tools/interpreters
|
||||
},
|
||||
editor = {
|
||||
fontname = "Courier New", -- default font
|
||||
@@ -115,14 +110,12 @@ config = {
|
||||
debugger = {
|
||||
verbose = false,
|
||||
hostname = nil, -- hostname to use when the detected one is incorrect
|
||||
port = nil, -- port number to use
|
||||
}
|
||||
|
||||
outputshell = {
|
||||
-- output and shell settings
|
||||
fontname = "Courier New",
|
||||
-- default font
|
||||
fontsize = 10,
|
||||
-- defult size
|
||||
outputshell = { -- output and shell settings
|
||||
fontname = "Courier New", -- default font
|
||||
fontsize = 10, -- defult size
|
||||
}
|
||||
|
||||
filetree = { -- filetree settings
|
||||
@@ -130,17 +123,16 @@ config = {
|
||||
fontsize = nil, -- no default size as it is system dependent
|
||||
}
|
||||
|
||||
styles = {},
|
||||
-- styles table as above for editor
|
||||
keymap = {}, -- mapping of menu IDs to hot keys
|
||||
messages = {}, -- list of messages in a particular language
|
||||
language = "en", -- current UI language
|
||||
|
||||
stylesoutshell = {},
|
||||
-- styles for output/shell
|
||||
styles = {}, -- styles table as above for editor
|
||||
stylesoutshell = {}, -- styles for output/shell
|
||||
|
||||
interpreter = "luadeb",
|
||||
-- the default "project" lua interpreter
|
||||
interpreter = "luadeb", -- the default "project" lua interpreter
|
||||
|
||||
autocomplete = true,
|
||||
-- whether autocomplete is on by default
|
||||
autocomplete = true, -- whether autocomplete is on by default
|
||||
|
||||
acandtip = {
|
||||
shorttip = false, -- tooltips are compact during typing
|
||||
@@ -151,23 +143,17 @@ config = {
|
||||
-- 0: is string comparison
|
||||
-- 1: substring leading characters (camel case or _ separated)
|
||||
-- 2: leading + any correctly ordered fragments (default)
|
||||
width = 60, -- width of the tooltip text (in characters)
|
||||
}
|
||||
|
||||
savebak = false,
|
||||
-- if bak files are created on save
|
||||
savebak = false, -- if bak files are created on save
|
||||
|
||||
filehistorylength = 20,
|
||||
-- historylength for files
|
||||
filehistorylength = 20, -- historylength for files
|
||||
|
||||
projecthistorylength = 15,
|
||||
-- historylength for project directories
|
||||
projecthistorylength = 15, -- historylength for project directories
|
||||
|
||||
singleinstance = true,
|
||||
-- if true creates a UDP server to exchange messages
|
||||
-- for loading commandline passed files
|
||||
|
||||
singleinstanceport = 0xe493,
|
||||
-- UDP port for single instance communication
|
||||
singleinstance = true, -- if true creates a UDP server to run IDE once and to load files
|
||||
singleinstanceport = 0xe493, -- UDP port for single instance communication
|
||||
|
||||
activateoutput = false, -- activate output/console on Run/Debug/Compile
|
||||
unhidewindow = false, -- to unhide a gui window
|
||||
@@ -322,4 +308,5 @@ interpreter = {
|
||||
-- nil, no support for scratchpad;
|
||||
-- false, scratchpad supported;
|
||||
-- true, scratchpad supported and requires handling for external loop.
|
||||
skipcompile = nil, -- don't compile before running if true
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ end
|
||||
local function addAPI(apifile,only,subapis,known) -- relative to API directory
|
||||
local ftype,fname = apifile:match("api[/\\]([^/\\]+)[/\\](.*)%.")
|
||||
if not ftype then
|
||||
print("The API file must be located in a subdirectory of the API directory\n")
|
||||
DisplayOutputLn(TR("The API file must be located in a subdirectory of the API directory."))
|
||||
return
|
||||
end
|
||||
if ((only and ftype ~= only) or (known and not known[ftype])) then
|
||||
@@ -56,15 +56,15 @@ local function addAPI(apifile,only,subapis,known) -- relative to API directory
|
||||
|
||||
local fn,err = loadfile(apifile)
|
||||
if err then
|
||||
DisplayOutput("Error while loading API file: "..err.."\n")
|
||||
DisplayOutputLn(TR("Error while loading API file: %s"):format(err))
|
||||
return
|
||||
end
|
||||
local env = apis[ftype] or newAPI()
|
||||
apis[ftype] = env
|
||||
env = env.ac.childs
|
||||
local suc,res = pcall(function()return fn(env)end)
|
||||
local suc,res = pcall(function()return fn(env) end)
|
||||
if (not suc) then
|
||||
DisplayOutput("Error while processing API file: "..res.."\n")
|
||||
DisplayOutputLn(TR("Error while processing API file: %s"):format(res))
|
||||
elseif (res) then
|
||||
local function gennames(tab,prefix)
|
||||
for i,v in pairs(tab) do
|
||||
@@ -79,7 +79,6 @@ local function addAPI(apifile,only,subapis,known) -- relative to API directory
|
||||
env[i] = v
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
local function loadallAPIs (only,subapis,known)
|
||||
@@ -96,6 +95,8 @@ end
|
||||
-- ToolTip and reserved words list
|
||||
-- also fixes function descriptions
|
||||
|
||||
local tipwidth = math.max(20, ide.config.acandtip.width or 60)
|
||||
local widthmask = ("[^\n]"):rep(tipwidth-10)..("[^\n]?"):rep(10)
|
||||
local function fillTips(api,apibasename,apiname)
|
||||
local apiac = api.ac
|
||||
local tclass = api.tip
|
||||
@@ -123,23 +124,19 @@ local function fillTips(api,apibasename,apiname)
|
||||
|
||||
-- fix description
|
||||
local frontname = (info.returns or "(?)").." "..libstr..key.." "..(info.args or "(?)")
|
||||
frontname = frontname:gsub("\n"," ")
|
||||
frontname = frontname:gsub("\t","")
|
||||
frontname = frontname:gsub("("..("[^\n]"):rep(60)..".-[%s,%)%]:%.])([^%)])","%1\n %2")
|
||||
frontname = frontname
|
||||
:gsub("\n"," ")
|
||||
:gsub("\t","")
|
||||
:gsub("("..widthmask..")[ \t]([^%)])","%1\n %2")
|
||||
|
||||
info.description = info.description:gsub("\n\n","<br>")
|
||||
info.description = info.description:gsub("[^%s]\n[^%s]","")
|
||||
info.description = info.description:gsub("\n"," ")
|
||||
info.description = info.description:gsub("<br>","\n")
|
||||
info.description = info.description:gsub("[^%s]\t[^%s]"," ")
|
||||
info.description = info.description:gsub("\t%s","")
|
||||
info.description = info.description:gsub("%s\t","")
|
||||
info.description = info.description:gsub("("..("[^\n]"):rep(60)..".-[%s,%)%]:%.])","%1\n")
|
||||
info.description = info.description
|
||||
:gsub("\n\n","<br>"):gsub("\n"," "):gsub("<br>","\n")
|
||||
:gsub("[ \t]+"," ")
|
||||
:gsub("("..widthmask..") ","%1\n")
|
||||
|
||||
-- build info
|
||||
local inf = frontname.."\n"..info.description
|
||||
local sentence = info.description:match("^([^\n]+)\n.*")
|
||||
sentence = sentence and sentence:match("([^%.]+)%..*$")
|
||||
local sentence = info.description:match("^(.-)%. ?\n")
|
||||
local infshort = frontname.."\n"..(sentence and sentence.."..." or info.description)
|
||||
local infshortbatch = (info.returns and info.args) and frontname or infshort
|
||||
|
||||
@@ -232,7 +229,7 @@ end
|
||||
|
||||
function GetTipInfo(editor, content, short)
|
||||
local caller = content:match("([%w_]+)%(%s*$")
|
||||
local class = caller and content:match("([%w_]+)[%.:]"..caller.."%(%s*$")
|
||||
local class = caller and content:match("([%w_]+)[%.:]"..caller.."%(%s*$") or ""
|
||||
local tip = editor.api.tip
|
||||
|
||||
local classtab = short and tip.shortfinfoclass or tip.finfoclass
|
||||
@@ -550,5 +547,4 @@ function CreateAutoCompList(editor,key)
|
||||
local li = (compstr .. dw)
|
||||
|
||||
return li ~= "" and (#li > 1024 and li:sub(1,1024).."..." or li)
|
||||
|
||||
end
|
||||
|
||||
@@ -7,6 +7,10 @@ local notebook = frame.notebook
|
||||
local openDocuments = ide.openDocuments
|
||||
local uimgr = frame.uimgr
|
||||
|
||||
local CURRENT_LINE_MARKER = StylesGetMarker("currentline")
|
||||
local CURRENT_LINE_MARKER_VALUE = 2^CURRENT_LINE_MARKER
|
||||
local BREAKPOINT_MARKER = StylesGetMarker("breakpoint")
|
||||
|
||||
function NewFile(event)
|
||||
local editor = CreateEditor()
|
||||
SetupKeywords(editor, "lua")
|
||||
@@ -105,23 +109,23 @@ local function getExtsString()
|
||||
end
|
||||
knownexts = knownexts:len() > 0 and knownexts:sub(1,-2) or nil
|
||||
|
||||
local exts = knownexts and "Known Files ("..knownexts..")|"..knownexts.."|" or ""
|
||||
exts = exts.."All files (*)|*"
|
||||
local exts = knownexts and TR("Known Files").." ("..knownexts..")|"..knownexts.."|" or ""
|
||||
exts = exts..TR("All files").." (*)|*"
|
||||
|
||||
return exts
|
||||
end
|
||||
|
||||
function OpenFile(event)
|
||||
local exts = getExtsString()
|
||||
local fileDialog = wx.wxFileDialog(ide.frame, "Open file",
|
||||
local fileDialog = wx.wxFileDialog(ide.frame, TR("Open file"),
|
||||
"",
|
||||
"",
|
||||
exts,
|
||||
wx.wxFD_OPEN + wx.wxFD_FILE_MUST_EXIST)
|
||||
if fileDialog:ShowModal() == wx.wxID_OK then
|
||||
if not LoadFile(fileDialog:GetPath(), nil, true) then
|
||||
wx.wxMessageBox("Unable to load file '"..fileDialog:GetPath().."'.",
|
||||
"Error",
|
||||
wx.wxMessageBox(TR("Unable to load file '%s'."):format(fileDialog:GetPath()),
|
||||
TR("Error"),
|
||||
wx.wxOK + wx.wxCENTRE, ide.frame)
|
||||
end
|
||||
end
|
||||
@@ -151,8 +155,8 @@ function SaveFile(editor, filePath)
|
||||
SetAutoRecoveryMark()
|
||||
return true
|
||||
else
|
||||
wx.wxMessageBox("Unable to save file '"..filePath.."': "..err,
|
||||
"Error",
|
||||
wx.wxMessageBox(TR("Unable to save file '%s': %s"):format(filePath, err),
|
||||
TR("Error"),
|
||||
wx.wxICON_ERROR + wx.wxOK + wx.wxCENTRE, ide.frame)
|
||||
end
|
||||
end
|
||||
@@ -173,7 +177,7 @@ function SaveFileAs(editor)
|
||||
fn:Normalize() -- want absolute path for dialog
|
||||
|
||||
local ext = fn:GetExt()
|
||||
local fileDialog = wx.wxFileDialog(ide.frame, "Save file as",
|
||||
local fileDialog = wx.wxFileDialog(ide.frame, TR("Save file as"),
|
||||
fn:GetPath(wx.wxPATH_GET_VOLUME),
|
||||
fn:GetFullName(),
|
||||
"*."..(ext and #ext > 0 and ext or "*"),
|
||||
@@ -262,7 +266,8 @@ function ClosePage(selection)
|
||||
DynamicWordsRemoveAll(editor)
|
||||
local debugger = ide.debugger
|
||||
-- check if the window with the scratchpad running is being closed
|
||||
if debugger and debugger.scratchpad and debugger.scratchpad.editor == editor then
|
||||
if debugger and debugger.scratchpad and debugger.scratchpad.editors
|
||||
and debugger.scratchpad.editors[editor] then
|
||||
DebuggerScratchpadOff()
|
||||
end
|
||||
-- check if the debugger is running and is using the current window
|
||||
@@ -289,12 +294,12 @@ function SaveModifiedDialog(editor, allow_cancel)
|
||||
local filePath = document.filePath
|
||||
local fileName = document.fileName
|
||||
if document.isModified then
|
||||
local message = "Do you want to save the changes to '"
|
||||
..(fileName or ide.config.default.name).."'?"
|
||||
local message = TR("Do you want to save the changes to '%s'?")
|
||||
:format(fileName or ide.config.default.name)
|
||||
local dlg_styles = wx.wxYES_NO + wx.wxCENTRE + wx.wxICON_QUESTION
|
||||
if allow_cancel then dlg_styles = dlg_styles + wx.wxCANCEL end
|
||||
local dialog = wx.wxMessageDialog(ide.frame, message,
|
||||
"Save Changes?",
|
||||
TR("Save Changes?"),
|
||||
dlg_styles)
|
||||
result = dialog:ShowModal()
|
||||
dialog:Destroy()
|
||||
@@ -421,13 +426,14 @@ function CompileProgram(editor, quiet)
|
||||
|
||||
compileTotal = compileTotal + 1
|
||||
if line_num > -1 then
|
||||
DisplayOutput("Compilation error on line "..tostring(line_num)..":\n"..
|
||||
errMsg:gsub("Lua:.-\n", "").."\n")
|
||||
DisplayOutput(TR("Compilation error")
|
||||
.." "..TR("on line %d"):format(line_num)
|
||||
..":\n"..errMsg:gsub("Lua:.-\n", ""))
|
||||
if not quiet then editor:GotoLine(line_num-1) end
|
||||
else
|
||||
compileOk = compileOk + 1
|
||||
if not quiet then
|
||||
DisplayOutput(("Compilation successful; %.0f%% success rate (%d/%d).\n")
|
||||
DisplayOutputLn(TR("Compilation successful; %.0f%% success rate (%d/%d).")
|
||||
:format(compileOk/compileTotal*100, compileOk, compileTotal))
|
||||
end
|
||||
end
|
||||
@@ -443,8 +449,9 @@ function SaveIfModified(editor)
|
||||
if openDocuments[id].isModified then
|
||||
local saved = false
|
||||
if not openDocuments[id].filePath then
|
||||
local ret = wx.wxMessageBox("You must save the program before running it.\nPress cancel to abort running.",
|
||||
"Save file?", wx.wxOK + wx.wxCANCEL + wx.wxCENTRE, ide.frame)
|
||||
local ret = wx.wxMessageBox(
|
||||
TR("You must save the program first.").."\n"..TR("Press cancel to abort."),
|
||||
TR("Save file?"), wx.wxOK + wx.wxCANCEL + wx.wxCENTRE, ide.frame)
|
||||
if ret == wx.wxOK then
|
||||
saved = SaveFileAs(editor)
|
||||
end
|
||||
@@ -538,10 +545,10 @@ function SetOpenTabs(params)
|
||||
local recovery, nametab = loadstring("return "..params.recovery)
|
||||
if recovery then recovery, nametab = pcall(recovery) end
|
||||
if not recovery then
|
||||
DisplayOutput("Can't process auto-recovery record; invalid format: "..nametab.."\n")
|
||||
DisplayOutputLn(TR("Can't process auto-recovery record; invalid format: %s."):format(nametab))
|
||||
return
|
||||
end
|
||||
DisplayOutput("Found auto-recovery record and restored saved session.\n")
|
||||
DisplayOutputLn(TR("Found auto-recovery record and restored saved session."))
|
||||
for _,doc in ipairs(nametab) do
|
||||
local editor = doc.filename and LoadFile(doc.filename,nil,true,true) or NewFile()
|
||||
local opendoc = openDocuments[editor:GetId()]
|
||||
@@ -549,8 +556,8 @@ function SetOpenTabs(params)
|
||||
notebook:SetPageText(opendoc.index, doc.tabname)
|
||||
editor:SetText(doc.content)
|
||||
if doc.filename and doc.modified < opendoc.modTime:GetTicks() then
|
||||
DisplayOutput("File '"..doc.filename.."' has more recent timestamp than restored '"..doc.tabname.."'."
|
||||
.." Please review before saving.\n")
|
||||
DisplayOutputLn(TR("File '%s' has more recent timestamp than restored '%s'; please review before saving.")
|
||||
:format(doc.filename, doc.tabname))
|
||||
end
|
||||
end
|
||||
editor:SetCurrentPos(doc.cursorpos or 0)
|
||||
@@ -600,7 +607,8 @@ local function saveAutoRecovery(event)
|
||||
ide.settings:Flush()
|
||||
end
|
||||
ide.session.lastsaved = os.time()
|
||||
ide.frame.statusBar:SetStatusText("Saved auto-recover at "..os.date("%H:%M:%S")..".", 1)
|
||||
ide.frame.statusBar:SetStatusText(
|
||||
TR("Saved auto-recover at %s."):format(os.date("%H:%M:%S")), 1)
|
||||
end
|
||||
|
||||
function StoreRestoreProjectTabs(curdir, newdir)
|
||||
@@ -675,6 +683,7 @@ function CloseWindow(event)
|
||||
end
|
||||
|
||||
ShowFullScreen(false)
|
||||
ide.frame:Hide() -- hide everything while the IDE exits
|
||||
SettingsSaveAll()
|
||||
if DebuggerCloseWatchWindow then DebuggerCloseWatchWindow() end
|
||||
if DebuggerCloseStackWindow then DebuggerCloseStackWindow() end
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
-- Integration with MobDebug
|
||||
-- Copyright 2011-12 Paul Kulchenko
|
||||
-- Copyright 2011-12 Paul Kulchenko, ZeroBrane LLC
|
||||
-- Original authors: Lomtik Software (J. Winwood & John Labenski)
|
||||
-- Luxinia Dev (Eike Decker & Christoph Kubisch)
|
||||
|
||||
@@ -12,7 +12,7 @@ local debugger = ide.debugger
|
||||
debugger.server = nil -- DebuggerServer object when debugging, else nil
|
||||
debugger.running = false -- true when the debuggee is running
|
||||
debugger.listening = false -- true when the debugger is listening for a client
|
||||
debugger.portnumber = mobdebug.port or 8171 -- the port # to use for debugging
|
||||
debugger.portnumber = ide.config.debugger.port or mobdebug.port -- the port # to use for debugging
|
||||
debugger.watchWindow = nil -- the watchWindow, nil when not created
|
||||
debugger.watchCtrl = nil -- the child ctrl in the watchWindow
|
||||
debugger.stackWindow = nil -- the stackWindow, nil when not created
|
||||
@@ -27,10 +27,15 @@ end)()
|
||||
|
||||
local notebook = ide.frame.notebook
|
||||
|
||||
local CURRENT_LINE_MARKER = StylesGetMarker("currentline")
|
||||
local CURRENT_LINE_MARKER_VALUE = 2^CURRENT_LINE_MARKER
|
||||
local BREAKPOINT_MARKER = StylesGetMarker("breakpoint")
|
||||
local BREAKPOINT_MARKER_VALUE = 2^BREAKPOINT_MARKER
|
||||
|
||||
local function updateWatchesSync(num)
|
||||
local watchCtrl = debugger.watchCtrl
|
||||
if watchCtrl and debugger.server
|
||||
and not debugger.running and not debugger.scratchpad then
|
||||
if watchCtrl and debugger.server and not debugger.running
|
||||
and not debugger.scratchpad and not (debugger.options or {}).noeval then
|
||||
for idx = 0, watchCtrl:GetItemCount() - 1 do
|
||||
if not num or idx == num then
|
||||
local expression = watchCtrl:GetItemText(idx)
|
||||
@@ -156,9 +161,9 @@ local function killClient()
|
||||
-- (at least on Windows Vista SP2)
|
||||
local ret = wx.wxProcess.Kill(debugger.pid, wx.wxSIGKILL, wx.wxKILL_CHILDREN)
|
||||
if ret == wx.wxKILL_OK then
|
||||
DisplayOutput(("Program stopped (pid: %d).\n"):format(debugger.pid))
|
||||
DisplayOutputLn(TR("Program stopped (pid: %d)."):format(debugger.pid))
|
||||
elseif ret ~= wx.wxKILL_NO_PROCESS then
|
||||
DisplayOutput(("Unable to stop program (pid: %d), code %d.\n")
|
||||
DisplayOutputLn(TR("Unable to stop program (pid: %d), code %d.")
|
||||
:format(debugger.pid, ret))
|
||||
end
|
||||
debugger.pid = nil
|
||||
@@ -192,7 +197,8 @@ local function activateDocument(file, line)
|
||||
end
|
||||
end
|
||||
|
||||
if not activated and not indebugger and ide.config.editor.autoactivate then
|
||||
if not activated and not indebugger and not debugger.loop
|
||||
and ide.config.editor.autoactivate then
|
||||
-- found file, but can't activate yet (because this part may be executed
|
||||
-- in a different co-routine), so schedule pending activation.
|
||||
if wx.wxFileName(file):FileExists() then
|
||||
@@ -202,7 +208,7 @@ local function activateDocument(file, line)
|
||||
|
||||
if not debugger.missing[file] then -- only report files once per session
|
||||
debugger.missing[file] = true
|
||||
DisplayOutput(("Couldn't activate file '%s' for debugging; continuing without it.\n")
|
||||
DisplayOutputLn(TR("Couldn't activate file '%s' for debugging; continuing without it.")
|
||||
:format(file))
|
||||
end
|
||||
end
|
||||
@@ -234,7 +240,8 @@ debugger.shell = function(expression, isstatement)
|
||||
-- check if the debugger is running and may be waiting for a response.
|
||||
-- allow that request to finish, otherwise updateWatchesSync() does nothing.
|
||||
if debugger.running then debugger.update() end
|
||||
if debugger.server and not debugger.running and not debugger.scratchpad then
|
||||
if debugger.server and not debugger.running
|
||||
and (not debugger.scratchpad or debugger.scratchpad.paused) then
|
||||
copas.addthread(function ()
|
||||
-- exec command is not expected to return anything.
|
||||
-- eval command returns 0 or more results.
|
||||
@@ -279,7 +286,7 @@ debugger.shell = function(expression, isstatement)
|
||||
end
|
||||
|
||||
-- refresh Stack and Watch windows if executed a statement (and no err)
|
||||
if isstatement and not err and not addret and #values == 0 then
|
||||
if isstatement and not err and not addedret and #values == 0 then
|
||||
updateStackSync() updateWatchesSync() end
|
||||
end)
|
||||
end
|
||||
@@ -287,17 +294,17 @@ end
|
||||
|
||||
debugger.listen = function()
|
||||
local server = socket.bind("*", debugger.portnumber)
|
||||
DisplayOutput(("Debugger server started at %s:%d.\n")
|
||||
DisplayOutputLn(TR("Debugger server started at %s:%d.")
|
||||
:format(debugger.hostname, debugger.portnumber))
|
||||
copas.autoclose = false
|
||||
copas.addserver(server, function (skt)
|
||||
if debugger.server then
|
||||
DisplayOutput("Refused a request to start a new debugging session as there is one in progress already.\n")
|
||||
DisplayOutputLn(TR("Refused a request to start a new debugging session as there is one in progress already."))
|
||||
return
|
||||
end
|
||||
|
||||
copas.setErrorHandler(function(error)
|
||||
DisplayOutput("Can't start debugging session due to internal error '" .. error .. "'.\n")
|
||||
DisplayOutputLn(TR("Can't start debugging session due to internal error '%s'."):format(error))
|
||||
debugger.terminate()
|
||||
end)
|
||||
|
||||
@@ -316,7 +323,8 @@ debugger.listen = function()
|
||||
or (wxfilepath and wxfilepath:GetFullPath())
|
||||
|
||||
if not startfile then
|
||||
DisplayOutput("Can't start debugging without an opened file or with the current file not being saved ('untitled.lua').\n")
|
||||
DisplayOutputLn(TR("Can't start debugging without an opened file or with the current file not being saved ('%s').")
|
||||
:format(ide.config.default.fullname))
|
||||
return debugger.terminate()
|
||||
end
|
||||
|
||||
@@ -331,18 +339,42 @@ debugger.listen = function()
|
||||
|
||||
reSetBreakpoints()
|
||||
|
||||
if options.redirect then
|
||||
debugger.handle("output stdout " .. options.redirect, nil,
|
||||
{ handler = function(m)
|
||||
if not debugger.server then return end
|
||||
|
||||
-- if it's an error returned, then handle the error
|
||||
if m and m:find("stack traceback:", 1, true) then
|
||||
-- this is an error message sent remotely
|
||||
local func = loadstring("return "..m)
|
||||
if func then
|
||||
DisplayOutputLn(func())
|
||||
debugger.terminate()
|
||||
return
|
||||
end
|
||||
end
|
||||
|
||||
if ide.config.debugger.outputfilter then
|
||||
m = ide.config.debugger.outputfilter(m)
|
||||
elseif m then
|
||||
local max = 240
|
||||
m = #m < max+4 and m or m:sub(1,max) .. "...\n"
|
||||
end
|
||||
if m then DisplayOutputNoMarker(m) end
|
||||
end})
|
||||
end
|
||||
|
||||
if (options.startwith) then
|
||||
local file, line, err = debugger.loadfile(options.startwith)
|
||||
if err then
|
||||
DisplayOutput(("Can't run the entry point script (%s). Compilation error:\n%s\n")
|
||||
:format(options.startwith, err))
|
||||
DisplayOutputLn(TR("Can't run the entry point script ('%s').")
|
||||
:format(options.startwith)
|
||||
.." "..TR("Compilation error")
|
||||
..":\n"..err)
|
||||
return debugger.terminate()
|
||||
end
|
||||
elseif (options.run) then
|
||||
-- do nothing here
|
||||
elseif (debugger.scratchpad) then
|
||||
debugger.scratchpad.updated = true
|
||||
else
|
||||
elseif not (options.run or debugger.scratchpad) then
|
||||
local file, line, err = debugger.loadfile(startfile)
|
||||
-- "load" can work in two ways: (1) it can load the requested file
|
||||
-- OR (2) it can "refuse" to load it if the client was started
|
||||
@@ -363,7 +395,7 @@ debugger.listen = function()
|
||||
end
|
||||
|
||||
if not activated then
|
||||
DisplayOutput(("Can't find file '%s' in the current project to activate for debugging. Update the project or open the file in the editor before debugging.\n")
|
||||
DisplayOutputLn(TR("Can't find file '%s' in the current project to activate for debugging. Update the project or open the file in the editor before debugging.")
|
||||
:format(file))
|
||||
return debugger.terminate()
|
||||
end
|
||||
@@ -372,8 +404,9 @@ debugger.listen = function()
|
||||
-- if the interpreter signals scratchpad support, so enable it.
|
||||
debugger.scratchable = ide.interpreter.scratchextloop ~= nil
|
||||
elseif err then
|
||||
DisplayOutput(("Can't debug the script in the active editor window. Compilation error:\n%s\n")
|
||||
:format(err))
|
||||
DisplayOutputLn(TR("Can't debug the script in the active editor window.")
|
||||
.." "..TR("Compilation error")
|
||||
..":\n"..err)
|
||||
return debugger.terminate()
|
||||
else
|
||||
debugger.scratchable = true
|
||||
@@ -388,37 +421,40 @@ debugger.listen = function()
|
||||
updateStackSync()
|
||||
updateWatchesSync()
|
||||
|
||||
DisplayOutput(("Debugging session started in '%s'.\n")
|
||||
:format(debugger.basedir))
|
||||
DisplayOutputLn(TR("Debugging session started in '%s'."):format(debugger.basedir))
|
||||
|
||||
if (options.runstart) then
|
||||
ClearAllCurrentLineMarkers()
|
||||
debugger.run()
|
||||
end
|
||||
|
||||
if (options.run) then
|
||||
local file, line = debugger.handle("run")
|
||||
activateDocument(file, line)
|
||||
if (debugger.scratchpad) then
|
||||
debugger.scratchpad.updated = true
|
||||
else
|
||||
if (options.runstart) then
|
||||
ClearAllCurrentLineMarkers()
|
||||
debugger.run()
|
||||
end
|
||||
if (options.run) then
|
||||
local file, line = debugger.handle("run")
|
||||
activateDocument(file, line)
|
||||
end
|
||||
end
|
||||
end)
|
||||
debugger.listening = true
|
||||
end
|
||||
|
||||
debugger.handle = function(command, server)
|
||||
local _G = _G
|
||||
local os = os
|
||||
os.exit = function () end
|
||||
_G.print = function (...)
|
||||
if (ide.config.debugger.verbose) then
|
||||
DisplayOutput(...)
|
||||
DisplayOutput("\n")
|
||||
end
|
||||
debugger.handle = function(command, server, options)
|
||||
local verbose = ide.config.debugger.verbose
|
||||
local osexit, gprint
|
||||
osexit, os.exit = os.exit, function () end
|
||||
if (verbose) then
|
||||
gprint, _G.print = _G.print, function (...) DisplayOutputLn(...) end
|
||||
end
|
||||
|
||||
debugger.running = true
|
||||
local file, line, err = mobdebug.handle(command, server or debugger.server)
|
||||
if verbose then DisplayOutputLn("Debugger sent (command):", command) end
|
||||
local file, line, err = mobdebug.handle(command, server or debugger.server, options)
|
||||
if verbose then DisplayOutputLn("Debugger received (file, line, err):", file, line, err) end
|
||||
debugger.running = false
|
||||
|
||||
os.exit = osexit
|
||||
if (verbose) then _G.print = gprint end
|
||||
return file, line, err
|
||||
end
|
||||
|
||||
@@ -426,13 +462,23 @@ debugger.exec = function(command)
|
||||
if debugger.server and not debugger.running then
|
||||
copas.addthread(function ()
|
||||
local out
|
||||
local attempts = 0
|
||||
while true do
|
||||
-- clear markers before running the command
|
||||
-- don't clear if running trace as the marker is then invisible,
|
||||
-- and it needs to be visible during tracing
|
||||
if not debugger.loop then ClearAllCurrentLineMarkers() end
|
||||
debugger.breaking = false
|
||||
local file, line, err = debugger.handle(out or command)
|
||||
if out then out = nil end
|
||||
if line == nil then
|
||||
if err then DisplayOutput(err .. "\n") end
|
||||
if err then DisplayOutputLn(err) end
|
||||
DebuggerStop()
|
||||
return
|
||||
elseif not debugger.server then
|
||||
-- it is possible that while debugger.handle call was executing
|
||||
-- the debugging was terminated; simply return in this case.
|
||||
return
|
||||
else
|
||||
if activateDocument(file, line) then
|
||||
debugger.stats.line = debugger.stats.line + 1
|
||||
@@ -444,6 +490,16 @@ debugger.exec = function(command)
|
||||
return
|
||||
end
|
||||
else
|
||||
-- clear the marker as it wasn't cleared earlier
|
||||
if debugger.loop then ClearAllCurrentLineMarkers() end
|
||||
-- we may be in some unknown location at this point;
|
||||
-- If this happens, stop and report allowing users to set
|
||||
-- breakpoints and step through.
|
||||
if debugger.breaking then
|
||||
DisplayOutputLn(TR("Debugging suspended at %s:%s (couldn't activate the file).")
|
||||
:format(file, line))
|
||||
return
|
||||
end
|
||||
-- redo now; if the call is from the debugger, then repeat
|
||||
-- the same command, except when it was "run" (switch to 'step');
|
||||
-- this is needed to "break" execution that happens in on() call.
|
||||
@@ -451,8 +507,13 @@ debugger.exec = function(command)
|
||||
-- don't get out of "mobdebug", because it may happen with
|
||||
-- start() or on() call, which will get us out of the current
|
||||
-- file, which is not what we want.
|
||||
out = (file:find('mobdebug%.lua$')
|
||||
and (command == 'run' and 'step' or command) or "out")
|
||||
-- Some engines (Corona SDK) report =?:0 as the current location.
|
||||
-- repeat the same command, but check if this has been tried
|
||||
-- too many times already; if so, get "out"
|
||||
out = ((tonumber(line) == 0 and attempts < 10) and command
|
||||
or (file:find('mobdebug%.lua$')
|
||||
and (command == 'run' and 'step' or command) or "out"))
|
||||
attempts = attempts + 1
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -518,6 +579,7 @@ debugger.breaknow = function(command)
|
||||
debugger.socket:settimeout(0)
|
||||
-- restore running status
|
||||
debugger.running = running
|
||||
debugger.breaking = true
|
||||
-- don't need to do anything else as the earlier call (run, step, etc.)
|
||||
-- will get the results (file, line) back and will update the UI
|
||||
return file, line, err
|
||||
@@ -527,7 +589,8 @@ debugger.breakpoint = function(file, line, state)
|
||||
debugger.handleAsync((state and "setb " or "delb ") .. file .. " " .. line)
|
||||
end
|
||||
debugger.quickeval = function(var, callback)
|
||||
if debugger.server and not debugger.running and not debugger.scratchpad then
|
||||
if debugger.server and not debugger.running
|
||||
and not debugger.scratchpad and not (debugger.options or {}).noeval then
|
||||
copas.addthread(function ()
|
||||
local _, values, err = debugger.evaluate(var)
|
||||
local val = err
|
||||
@@ -560,8 +623,8 @@ function DebuggerStop()
|
||||
ShellSupportRemote(nil)
|
||||
ClearAllCurrentLineMarkers()
|
||||
DebuggerScratchpadOff()
|
||||
DisplayOutput(("Debugging session completed (traced %d instruction%s).\n")
|
||||
:format(debugger.stats.line, debugger.stats.line == 1 and '' or 's'))
|
||||
local lines = TR("traced %d instruction", debugger.stats.line):format(debugger.stats.line)
|
||||
DisplayOutputLn(TR("Debugging session completed (%s)."):format(lines))
|
||||
else
|
||||
-- it's possible that the application couldn't start, or that the
|
||||
-- debugger in the application didn't start, which means there is
|
||||
@@ -604,13 +667,13 @@ function DebuggerCreateStackWindow()
|
||||
if (debugger.stackWindow) then return updateStackAndWatches() end
|
||||
local width = 360
|
||||
local stackWindow = wx.wxFrame(ide.frame, wx.wxID_ANY,
|
||||
"Stack Window",
|
||||
TR("Stack Window"),
|
||||
wx.wxDefaultPosition, wx.wxSize(width, 200),
|
||||
wx.wxDEFAULT_FRAME_STYLE + wx.wxFRAME_FLOAT_ON_PARENT)
|
||||
|
||||
debugger.stackWindow = stackWindow
|
||||
|
||||
local stackCtrl = wx.wxTreeCtrl(stackWindow, ID "debug.stack",
|
||||
local stackCtrl = wx.wxTreeCtrl(stackWindow, wx.wxID_ANY,
|
||||
wx.wxDefaultPosition, wx.wxDefaultSize,
|
||||
wx.wxTR_LINES_AT_ROOT + wx.wxTR_HAS_BUTTONS + wx.wxTR_SINGLE + wx.wxTR_HIDE_ROOT)
|
||||
|
||||
@@ -662,23 +725,23 @@ function DebuggerCreateWatchWindow()
|
||||
if (debugger.watchWindow) then return updateWatches() end
|
||||
local width = 360
|
||||
local watchWindow = wx.wxFrame(ide.frame, wx.wxID_ANY,
|
||||
"Watch Window",
|
||||
TR("Watch Window"),
|
||||
wx.wxDefaultPosition, wx.wxSize(width, 200),
|
||||
wx.wxDEFAULT_FRAME_STYLE + wx.wxFRAME_FLOAT_ON_PARENT)
|
||||
|
||||
debugger.watchWindow = watchWindow
|
||||
|
||||
local watchMenu = wx.wxMenu{
|
||||
{ ID_ADDWATCH, "&Add Watch\tIns" },
|
||||
{ ID_EDITWATCH, "&Edit Watch\tF2" },
|
||||
{ ID_REMOVEWATCH, "&Remove Watch\tDel" },
|
||||
{ ID_EVALUATEWATCH, "Evaluate &Watches" }}
|
||||
{ ID_ADDWATCH, TR("&Add Watch")..KSC(ID_ADDWATCH) },
|
||||
{ ID_EDITWATCH, TR("&Edit Watch")..KSC(ID_EDITWATCH) },
|
||||
{ ID_REMOVEWATCH, TR("&Remove Watch")..KSC(ID_REMOVEWATCH) },
|
||||
{ ID_EVALUATEWATCH, TR("Evaluate &Watches")..KSC(ID_EVALUATEWATCH) }}
|
||||
|
||||
local watchMenuBar = wx.wxMenuBar()
|
||||
watchMenuBar:Append(watchMenu, "&Watches")
|
||||
watchMenuBar:Append(watchMenu, TR("&Watches"))
|
||||
watchWindow:SetMenuBar(watchMenuBar)
|
||||
|
||||
local watchCtrl = wx.wxListCtrl(watchWindow, ID_WATCH_LISTCTRL,
|
||||
local watchCtrl = wx.wxListCtrl(watchWindow, wx.wxID_ANY,
|
||||
wx.wxDefaultPosition, wx.wxDefaultSize,
|
||||
wx.wxLC_REPORT + wx.wxLC_EDIT_LABELS)
|
||||
|
||||
@@ -686,11 +749,11 @@ function DebuggerCreateWatchWindow()
|
||||
|
||||
local info = wx.wxListItem()
|
||||
info:SetMask(wx.wxLIST_MASK_TEXT + wx.wxLIST_MASK_WIDTH)
|
||||
info:SetText("Expression")
|
||||
info:SetText(TR("Expression"))
|
||||
info:SetWidth(width * 0.32)
|
||||
watchCtrl:InsertColumn(0, info)
|
||||
|
||||
info:SetText("Value")
|
||||
info:SetText(TR("Value"))
|
||||
info:SetWidth(width * 0.56)
|
||||
watchCtrl:InsertColumn(1, info)
|
||||
|
||||
@@ -722,9 +785,9 @@ function DebuggerCreateWatchWindow()
|
||||
|
||||
watchWindow:Connect(ID_ADDWATCH, wx.wxEVT_COMMAND_MENU_SELECTED,
|
||||
function ()
|
||||
local row = watchCtrl:InsertItem(watchCtrl:GetItemCount(), "Expr")
|
||||
local row = watchCtrl:InsertItem(watchCtrl:GetItemCount(), TR("Expr"))
|
||||
watchCtrl:SetItem(row, 0, defaultExpr)
|
||||
watchCtrl:SetItem(row, 1, "Value")
|
||||
watchCtrl:SetItem(row, 1, TR("Value"))
|
||||
watchCtrl:EditLabel(row)
|
||||
end)
|
||||
|
||||
@@ -783,9 +846,9 @@ function DebuggerAddWatch(watch)
|
||||
if watchCtrl:GetItemText(idx) == watch then return end
|
||||
end
|
||||
|
||||
local row = watchCtrl:InsertItem(watchCtrl:GetItemCount(), "Expr")
|
||||
local row = watchCtrl:InsertItem(watchCtrl:GetItemCount(), TR("Expr"))
|
||||
watchCtrl:SetItem(row, 0, watch)
|
||||
watchCtrl:SetItem(row, 1, "Value")
|
||||
watchCtrl:SetItem(row, 1, TR("Value"))
|
||||
|
||||
updateWatches(row)
|
||||
end
|
||||
@@ -820,7 +883,7 @@ end
|
||||
|
||||
local function q(s) return s:gsub('([%(%)%.%%%+%-%*%?%[%^%$%]])','%%%1') end
|
||||
function DebuggerRefreshScratchpad()
|
||||
if debugger.scratchpad and debugger.scratchpad.updated then
|
||||
if debugger.scratchpad and debugger.scratchpad.updated and not debugger.scratchpad.paused then
|
||||
|
||||
local scratchpadEditor = debugger.scratchpad.editor
|
||||
local compiled, code = CompileProgram(scratchpadEditor, true)
|
||||
@@ -839,11 +902,14 @@ function DebuggerRefreshScratchpad()
|
||||
local filePath = DebuggerMakeFileName(scratchpadEditor,
|
||||
ide.openDocuments[scratchpadEditor:GetId()].filePath)
|
||||
|
||||
-- wrap into a function call to make "return" to work with scratchpad
|
||||
code = "(function()"..code.."\nend)()"
|
||||
|
||||
-- this is a special error message that is generated at the very end
|
||||
-- of each script to avoid exiting the (debugee) scratchpad process.
|
||||
-- these errors are handled and not reported to the user
|
||||
local errormsg = 'execution suspended at ' .. TimeGet()
|
||||
local stopper = "\ndo error('" .. errormsg .. "') end"
|
||||
local stopper = "error('" .. errormsg .. "')"
|
||||
-- store if interpreter requires a special handling for external loop
|
||||
local extloop = ide.interpreter.scratchextloop
|
||||
|
||||
@@ -869,20 +935,21 @@ function DebuggerRefreshScratchpad()
|
||||
|
||||
-- when execute() is used, it's not possible to distinguish between
|
||||
-- compilation and run-time error, so just report as "Scratchpad error"
|
||||
local prefix = extloop and "Scratchpad error" or "Compilation error"
|
||||
local prefix = extloop and TR("Scratchpad error") or TR("Compilation error")
|
||||
|
||||
if not err then
|
||||
_, _, err = debugger.handle("run")
|
||||
prefix = "Execution error"
|
||||
prefix = TR("Execution error")
|
||||
end
|
||||
if err and not err:find(errormsg) then
|
||||
local fragment, line = err:match('.-%[string "([^\010\013]+)"%]:(%d+)%s*:')
|
||||
-- make the code shorter to better see the error message
|
||||
if prefix == "Scratchpad error" and fragment and #fragment > 30 then
|
||||
if prefix == TR("Scratchpad error") and fragment and #fragment > 30 then
|
||||
err = err:gsub(q(fragment), function(s) return s:sub(1,30)..'...' end)
|
||||
end
|
||||
DisplayOutput(prefix .. (line and " on line " .. line or "") .. ":\n"
|
||||
.. err:gsub('stack traceback:.+', ''):gsub('\n+$', '') .. "\n")
|
||||
DisplayOutputLn(prefix
|
||||
..(line and (" "..TR("on line %d"):format(line)) or "")
|
||||
..":\n"..err:gsub('stack traceback:.+', ''):gsub('\n+$', ''))
|
||||
end
|
||||
debugger.scratchpad.running = false
|
||||
end
|
||||
@@ -895,19 +962,26 @@ end
|
||||
local numberStyle = wxstc.wxSTC_LUA_NUMBER
|
||||
|
||||
function DebuggerScratchpadOn(editor)
|
||||
debugger.scratchpad = {editor = editor}
|
||||
-- first check if there is already scratchpad editor.
|
||||
-- this may happen when more than one editor is being added...
|
||||
|
||||
-- check if the debugger is already running; this happens when
|
||||
-- scratchpad is turned on after external script has connected
|
||||
if debugger.server then
|
||||
debugger.scratchpad.updated = true
|
||||
ClearAllCurrentLineMarkers()
|
||||
SetAllEditorsReadOnly(false)
|
||||
ShellSupportRemote(nil) -- disable remote shell
|
||||
DebuggerRefreshScratchpad()
|
||||
elseif not ProjectDebug(true, "scratchpad") then
|
||||
debugger.scratchpad = nil
|
||||
return
|
||||
if debugger.scratchpad and debugger.scratchpad.editors then
|
||||
debugger.scratchpad.editors[editor] = true
|
||||
else
|
||||
debugger.scratchpad = {editor = editor, editors = {[editor] = true}}
|
||||
|
||||
-- check if the debugger is already running; this happens when
|
||||
-- scratchpad is turned on after external script has connected
|
||||
if debugger.server then
|
||||
debugger.scratchpad.updated = true
|
||||
ClearAllCurrentLineMarkers()
|
||||
SetAllEditorsReadOnly(false)
|
||||
ShellSupportRemote(nil) -- disable remote shell
|
||||
DebuggerRefreshScratchpad()
|
||||
elseif not ProjectDebug(true, "scratchpad") then
|
||||
debugger.scratchpad = nil
|
||||
return
|
||||
end
|
||||
end
|
||||
|
||||
local scratchpadEditor = editor
|
||||
@@ -922,6 +996,7 @@ function DebuggerScratchpadOn(editor)
|
||||
bit.band(evtype,wxstc.wxSTC_PERFORMED_UNDO) ~= 0 or
|
||||
bit.band(evtype,wxstc.wxSTC_PERFORMED_REDO) ~= 0) then
|
||||
debugger.scratchpad.updated = true
|
||||
debugger.scratchpad.editor = scratchpadEditor
|
||||
end
|
||||
event:Skip()
|
||||
end)
|
||||
@@ -968,7 +1043,7 @@ function DebuggerScratchpadOn(editor)
|
||||
scratchpadEditor:Connect(wx.wxEVT_LEFT_UP, function(event)
|
||||
if debugger.scratchpad and debugger.scratchpad.point then
|
||||
debugger.scratchpad.point = nil
|
||||
debugger.scratchpad.editor:ReleaseMouse()
|
||||
scratchpadEditor:ReleaseMouse()
|
||||
wx.wxSetCursor(wx.wxNullCursor) -- restore cursor
|
||||
else event:Skip() end
|
||||
end)
|
||||
@@ -1036,13 +1111,14 @@ end
|
||||
function DebuggerScratchpadOff()
|
||||
if not debugger.scratchpad then return end
|
||||
|
||||
local scratchpadEditor = debugger.scratchpad.editor
|
||||
scratchpadEditor:StyleSetUnderline(numberStyle, false)
|
||||
scratchpadEditor:Disconnect(wx.wxID_ANY, wx.wxID_ANY, wxstc.wxEVT_STC_MODIFIED)
|
||||
scratchpadEditor:Disconnect(wx.wxID_ANY, wx.wxID_ANY, wx.wxEVT_MOTION)
|
||||
scratchpadEditor:Disconnect(wx.wxID_ANY, wx.wxID_ANY, wx.wxEVT_LEFT_DOWN)
|
||||
scratchpadEditor:Disconnect(wx.wxID_ANY, wx.wxID_ANY, wx.wxEVT_LEFT_UP)
|
||||
scratchpadEditor:Disconnect(wx.wxID_ANY, wx.wxID_ANY, wx.wxEVT_SET_CURSOR)
|
||||
for scratchpadEditor in pairs(debugger.scratchpad.editors) do
|
||||
scratchpadEditor:StyleSetUnderline(numberStyle, false)
|
||||
scratchpadEditor:Disconnect(wx.wxID_ANY, wx.wxID_ANY, wxstc.wxEVT_STC_MODIFIED)
|
||||
scratchpadEditor:Disconnect(wx.wxID_ANY, wx.wxID_ANY, wx.wxEVT_MOTION)
|
||||
scratchpadEditor:Disconnect(wx.wxID_ANY, wx.wxID_ANY, wx.wxEVT_LEFT_DOWN)
|
||||
scratchpadEditor:Disconnect(wx.wxID_ANY, wx.wxID_ANY, wx.wxEVT_LEFT_UP)
|
||||
scratchpadEditor:Disconnect(wx.wxID_ANY, wx.wxID_ANY, wx.wxEVT_SET_CURSOR)
|
||||
end
|
||||
|
||||
wx.wxSetCursor(wx.wxNullCursor) -- restore cursor
|
||||
|
||||
|
||||
@@ -28,9 +28,9 @@ local function updateStatusText(editor)
|
||||
local col = 1 + pos - editor:PositionFromLine(line)
|
||||
|
||||
texts = {
|
||||
iff(editor:GetOvertype(), "OVR", "INS"),
|
||||
iff(editor:GetReadOnly(), "R/O", "R/W"),
|
||||
"Ln: "..tostring(line + 1).." Col: "..tostring(col) }
|
||||
iff(editor:GetOvertype(), TR("OVR"), TR("INS")),
|
||||
iff(editor:GetReadOnly(), TR("R/O"), TR("R/W")),
|
||||
TR("Ln: %d"):format(line + 1).." "..TR("Col: %d"):format(col) }
|
||||
end
|
||||
|
||||
if ide.frame then
|
||||
@@ -103,11 +103,14 @@ local function isFileAlteredOnDisk(editor)
|
||||
local modTime = GetFileModTime(filePath)
|
||||
if modTime == nil then
|
||||
openDocuments[id].modTime = nil
|
||||
wx.wxMessageBox(fileName.." is no longer on the disk.",
|
||||
wx.wxMessageBox(
|
||||
TR("File '%s' no longer exists."):format(fileName),
|
||||
GetIDEString("editormessage"),
|
||||
wx.wxOK + wx.wxCENTRE, ide.frame)
|
||||
elseif not editor:GetReadOnly() and modTime:IsValid() and oldModTime:IsEarlierThan(modTime) then
|
||||
local ret = wx.wxMessageBox(fileName.." has been modified on disk.\nDo you want to reload it?",
|
||||
local ret = wx.wxMessageBox(
|
||||
TR("File '%s' has been modified on disk."):format(fileName)
|
||||
.."\n"..TR("Do you want to reload it?"),
|
||||
GetIDEString("editormessage"),
|
||||
wx.wxYES_NO + wx.wxCENTRE, ide.frame)
|
||||
|
||||
@@ -141,15 +144,13 @@ function SetEditorSelection(selection)
|
||||
ide.frame:SetTitle(getFileTitle(editor))
|
||||
|
||||
if editor then
|
||||
if funclist:IsEmpty() then funclist:Append('Jump to a function definition...', 0) end
|
||||
if funclist:IsEmpty() then funclist:Append(TR("Jump to a function definition..."), 0) end
|
||||
funclist:SetSelection(0)
|
||||
|
||||
editor:SetFocus()
|
||||
editor:SetSTCFocus(true)
|
||||
local id = editor:GetId()
|
||||
if openDocuments[id] and openDocuments[id].filePath then
|
||||
FileTreeMarkSelected(openDocuments[id].filePath)
|
||||
end
|
||||
FileTreeMarkSelected(openDocuments[id] and openDocuments[id].filePath or '')
|
||||
else
|
||||
FileTreeMarkSelected('')
|
||||
end
|
||||
@@ -210,16 +211,13 @@ function EditorAutoComplete(editor)
|
||||
local localpos = pos-linestart
|
||||
|
||||
local lt = linetx:sub(1,localpos)
|
||||
lt = lt:gsub("%s*("..editor.spec.sep..")%s*",function(a) return a end)
|
||||
lt = lt:gsub("%s*%b[]%s*","")
|
||||
lt = lt:gsub("%s*%b()%s*","")
|
||||
lt = lt:gsub("%s*%b{}%s*","")
|
||||
lt = lt:gsub("%s*(["..editor.spec.sep.."])%s*", "%1")
|
||||
lt = lt:match("[^%[%(%s]*$")
|
||||
lt = lt:gsub("%s","")
|
||||
|
||||
-- know now which string is to be completed
|
||||
local userList = CreateAutoCompList(editor,lt)
|
||||
if userList and string.len(userList) > 0 then
|
||||
-- don't show the list if the only option is what's already typed
|
||||
if userList and #userList > 0 and userList ~= lt then
|
||||
editor:UserListShow(1, userList)
|
||||
elseif editor:AutoCompActive() then
|
||||
editor:AutoCompCancel()
|
||||
@@ -270,6 +268,10 @@ local function getValAtPosition(editor, pos)
|
||||
end
|
||||
|
||||
function EditorCallTip(editor, pos, x, y)
|
||||
-- don't show anything if the calltip is active; this may happen after
|
||||
-- typing function name, while the mouse is over a different function.
|
||||
if editor:CallTipActive() then return end
|
||||
|
||||
local var, linetxtopos = getValAtPosition(editor, pos)
|
||||
local tip = linetxtopos and GetTipInfo(editor,linetxtopos.."(",false)
|
||||
if ide.debugger and ide.debugger.server then
|
||||
@@ -286,6 +288,14 @@ function EditorCallTip(editor, pos, x, y)
|
||||
editor:CallTipShow(pos, val) end)
|
||||
end
|
||||
elseif tip then
|
||||
-- only shorten if shown on mouse-over. Use shortcut to get full info.
|
||||
local shortento = 450
|
||||
local showtooltip = ide.frame.menuBar:FindItem(ID_SHOWTOOLTIP)
|
||||
local suffix = "...\n"
|
||||
..TR("Use '%s' to see full description."):format(showtooltip:GetLabel())
|
||||
if x and y and #tip > shortento then
|
||||
tip = tip:sub(1, shortento-#suffix):gsub("%W*%w*$","")..suffix
|
||||
end
|
||||
editor:CallTipShow(pos, tip)
|
||||
end
|
||||
end
|
||||
@@ -330,8 +340,8 @@ function CreateEditor()
|
||||
editor:SetMarginType(1, wxstc.wxSTC_MARGIN_SYMBOL)
|
||||
editor:SetMarginSensitive(1, true)
|
||||
|
||||
editor:MarkerDefine(BREAKPOINT_MARKER, wxstc.wxSTC_MARK_ROUNDRECT, wx.wxWHITE, wx.wxRED)
|
||||
editor:MarkerDefine(CURRENT_LINE_MARKER, wxstc.wxSTC_MARK_ARROW, wx.wxBLACK, wx.wxGREEN)
|
||||
editor:MarkerDefine(StylesGetMarker("currentline"))
|
||||
editor:MarkerDefine(StylesGetMarker("breakpoint"))
|
||||
|
||||
editor:SetMarginWidth(2, 16) -- fold margin
|
||||
editor:SetMarginType(2, wxstc.wxSTC_MARGIN_SYMBOL)
|
||||
@@ -345,15 +355,17 @@ function CreateEditor()
|
||||
editor:SetProperty("fold.compact", "1")
|
||||
editor:SetProperty("fold.comment", "1")
|
||||
|
||||
local grey = wx.wxColour(128, 128, 128)
|
||||
editor:MarkerDefine(wxstc.wxSTC_MARKNUM_FOLDEROPEN, wxstc.wxSTC_MARK_BOXMINUS, wx.wxWHITE, grey)
|
||||
editor:MarkerDefine(wxstc.wxSTC_MARKNUM_FOLDER, wxstc.wxSTC_MARK_BOXPLUS, wx.wxWHITE, grey)
|
||||
editor:MarkerDefine(wxstc.wxSTC_MARKNUM_FOLDERSUB, wxstc.wxSTC_MARK_VLINE, wx.wxWHITE, grey)
|
||||
editor:MarkerDefine(wxstc.wxSTC_MARKNUM_FOLDERTAIL, wxstc.wxSTC_MARK_LCORNER, wx.wxWHITE, grey)
|
||||
editor:MarkerDefine(wxstc.wxSTC_MARKNUM_FOLDEREND, wxstc.wxSTC_MARK_BOXPLUSCONNECTED, wx.wxWHITE, grey)
|
||||
editor:MarkerDefine(wxstc.wxSTC_MARKNUM_FOLDEROPENMID, wxstc.wxSTC_MARK_BOXMINUSCONNECTED, wx.wxWHITE, grey)
|
||||
editor:MarkerDefine(wxstc.wxSTC_MARKNUM_FOLDERMIDTAIL, wxstc.wxSTC_MARK_TCORNER, wx.wxWHITE, grey)
|
||||
grey:delete()
|
||||
do
|
||||
local fg, bg = wx.wxWHITE, wx.wxColour(128, 128, 128)
|
||||
editor:MarkerDefine(wxstc.wxSTC_MARKNUM_FOLDEROPEN, wxstc.wxSTC_MARK_BOXMINUS, fg, bg)
|
||||
editor:MarkerDefine(wxstc.wxSTC_MARKNUM_FOLDER, wxstc.wxSTC_MARK_BOXPLUS, fg, bg)
|
||||
editor:MarkerDefine(wxstc.wxSTC_MARKNUM_FOLDERSUB, wxstc.wxSTC_MARK_VLINE, fg, bg)
|
||||
editor:MarkerDefine(wxstc.wxSTC_MARKNUM_FOLDERTAIL, wxstc.wxSTC_MARK_LCORNER, fg, bg)
|
||||
editor:MarkerDefine(wxstc.wxSTC_MARKNUM_FOLDEREND, wxstc.wxSTC_MARK_BOXPLUSCONNECTED, fg, bg)
|
||||
editor:MarkerDefine(wxstc.wxSTC_MARKNUM_FOLDEROPENMID, wxstc.wxSTC_MARK_BOXMINUSCONNECTED, fg, bg)
|
||||
editor:MarkerDefine(wxstc.wxSTC_MARKNUM_FOLDERMIDTAIL, wxstc.wxSTC_MARK_TCORNER, fg, bg)
|
||||
bg:delete()
|
||||
end
|
||||
|
||||
if ide.config.editor.calltipdelay and ide.config.editor.calltipdelay > 0 then
|
||||
editor:SetMouseDwellTime(ide.config.editor.calltipdelay)
|
||||
@@ -466,12 +478,13 @@ function CreateEditor()
|
||||
elseif ch == ("("):byte() then
|
||||
local tip = GetTipInfo(editor,linetxtopos,ide.config.acandtip.shorttip)
|
||||
if tip then
|
||||
if editor:CallTipActive() then editor:CallTipCancel() end
|
||||
editor:CallTipShow(pos,tip)
|
||||
end
|
||||
|
||||
elseif ide.config.autocomplete then -- code completion prompt
|
||||
local trigger = linetxtopos:match("["..editor.spec.sep.."%w_]+$")
|
||||
if (trigger and (#trigger > 1 or trigger:match("[%.:]"))) then
|
||||
if (trigger and (#trigger > 1 or trigger:match("["..editor.spec.sep.."]"))) then
|
||||
ide.frame:AddPendingEvent(wx.wxCommandEvent(
|
||||
wx.wxEVT_COMMAND_MENU_SELECTED, ID_AUTOCOMPLETE))
|
||||
end
|
||||
@@ -486,16 +499,20 @@ function CreateEditor()
|
||||
-- event:GetX and event:GetY, so instead we use wxGetMousePosition.
|
||||
local linux = ide.osname == 'Unix'
|
||||
if linux and editor ~= GetEditor() then return end
|
||||
|
||||
-- check if this editor has focus; it may not when Stack/Watch window
|
||||
-- is on top, but DWELL events are still triggered in this case.
|
||||
-- Don't want to show calltip as it is still shown when the focus
|
||||
-- is switched to a different application.
|
||||
local focus = editor:FindFocus()
|
||||
if focus and focus:GetId() ~= editor:GetId() then return end
|
||||
|
||||
-- event:GetX() and event:GetY() positions don't correspond to
|
||||
-- the correct positions calculated using ScreenToClient (at least
|
||||
-- on Windows and Linux), so use what's calculated.
|
||||
local mpos = wx.wxGetMousePosition()
|
||||
local cpos = editor:ScreenToClient(mpos)
|
||||
local position = editor:PositionFromPointClose(
|
||||
linux and cpos.x or event:GetX(), linux and cpos.y or event:GetY())
|
||||
local position = editor:PositionFromPointClose(cpos.x, cpos.y)
|
||||
if position ~= wxstc.wxSTC_INVALID_POSITION then
|
||||
EditorCallTip(editor, position, mpos.x, mpos.y)
|
||||
end
|
||||
@@ -623,16 +640,17 @@ function CreateEditor()
|
||||
editor:Connect(wx.wxEVT_CONTEXT_MENU,
|
||||
function (event)
|
||||
local menu = wx.wxMenu()
|
||||
menu:Append(wx.wxID_UNDO, "&Undo")
|
||||
menu:Append(wx.wxID_REDO, "&Redo")
|
||||
menu:Append(wx.wxID_UNDO, TR("&Undo"))
|
||||
menu:Append(wx.wxID_REDO, TR("&Redo"))
|
||||
menu:AppendSeparator()
|
||||
menu:Append(wx.wxID_CUT, "Cu&t")
|
||||
menu:Append(wx.wxID_COPY, "&Copy")
|
||||
menu:Append(wx.wxID_PASTE, "&Paste")
|
||||
menu:Append(wx.wxID_SELECTALL, "Select &All")
|
||||
menu:Append(wx.wxID_CUT, TR("Cu&t"))
|
||||
menu:Append(wx.wxID_COPY, TR("&Copy"))
|
||||
menu:Append(wx.wxID_PASTE, TR("&Paste"))
|
||||
menu:Append(wx.wxID_SELECTALL, TR("Select &All"))
|
||||
menu:AppendSeparator()
|
||||
menu:Append(ID_QUICKADDWATCH, "Add Watch Expression")
|
||||
menu:Append(ID_QUICKEVAL, "Evaluate in Console")
|
||||
menu:Append(ID_QUICKADDWATCH, TR("Add Watch Expression"))
|
||||
menu:Append(ID_QUICKEVAL, TR("Evaluate in Console"))
|
||||
menu:Append(ID_ADDTOSCRATCHPAD, TR("Add to Scratchpad"))
|
||||
|
||||
local point = editor:ScreenToClient(event:GetPosition())
|
||||
local pos = editor:PositionFromPointClose(point.x, point.y)
|
||||
@@ -640,6 +658,10 @@ function CreateEditor()
|
||||
menu:Enable(ID_QUICKADDWATCH, value ~= nil)
|
||||
menu:Enable(ID_QUICKEVAL, value ~= nil)
|
||||
|
||||
local debugger = ide.debugger
|
||||
menu:Enable(ID_ADDTOSCRATCHPAD, debugger.scratchpad
|
||||
and debugger.scratchpad.editors and not debugger.scratchpad.editors[editor])
|
||||
|
||||
-- cancel calltip as it interferes with popup menu
|
||||
if editor:CallTipActive() then editor:CallTipCancel() end
|
||||
editor:PopupMenu(menu)
|
||||
@@ -651,6 +673,9 @@ function CreateEditor()
|
||||
editor:Connect(ID_QUICKEVAL, wx.wxEVT_COMMAND_MENU_SELECTED,
|
||||
function(event) ShellExecuteCode(value) end)
|
||||
|
||||
editor:Connect(ID_ADDTOSCRATCHPAD, wx.wxEVT_COMMAND_MENU_SELECTED,
|
||||
function(event) DebuggerScratchpadOn(editor) end)
|
||||
|
||||
return editor
|
||||
end
|
||||
|
||||
|
||||
@@ -203,9 +203,10 @@ local projcombobox = wx.wxComboBox(projpanel, ID "filetree.proj.drivecb",
|
||||
wx.wxDefaultPosition, wx.wxDefaultSize,
|
||||
filetree.projdirTextArray, wx.wxTE_PROCESS_ENTER)
|
||||
|
||||
local projbutton = wx.wxButton(projpanel, ID "debug.projectdir.choose", "...",wx.wxDefaultPosition, wx.wxSize(26,20))
|
||||
local projbutton = wx.wxButton(projpanel, ID_PROJECTDIRCHOOSE,
|
||||
"...",wx.wxDefaultPosition, wx.wxSize(26,20))
|
||||
|
||||
local projtree = wx.wxTreeCtrl(projpanel, ID "filetree.projtree",
|
||||
local projtree = wx.wxTreeCtrl(projpanel, wx.wxID_ANY,
|
||||
wx.wxDefaultPosition, wx.wxDefaultSize,
|
||||
filetree.showroot
|
||||
and (wx.wxTR_LINES_AT_ROOT + wx.wxTR_HAS_BUTTONS + wx.wxTR_SINGLE)
|
||||
|
||||
@@ -3,13 +3,6 @@
|
||||
---------------------------------------------------------
|
||||
local ide = ide
|
||||
|
||||
-- Global variables
|
||||
-- Markers for editor marker margin
|
||||
BREAKPOINT_MARKER = 1
|
||||
BREAKPOINT_MARKER_VALUE = 2 -- = 2^BREAKPOINT_MARKER
|
||||
CURRENT_LINE_MARKER = 2
|
||||
CURRENT_LINE_MARKER_VALUE = 4 -- = 2^CURRENT_LINE_MARKER
|
||||
|
||||
-- Pick some reasonable fixed width fonts to use for the editor
|
||||
local function setFont(style, config, name, size)
|
||||
return wx.wxFont(config.fontsize or size or 10, wx.wxFONTFAMILY_MODERN, style,
|
||||
@@ -65,6 +58,11 @@ local function createFrame()
|
||||
return frame
|
||||
end
|
||||
|
||||
local function SCinB(id) -- shortcut in brackets
|
||||
local shortcut = KSC(id):gsub("\t","")
|
||||
return shortcut and #shortcut > 0 and (" ("..shortcut..")") or ""
|
||||
end
|
||||
|
||||
local function createToolBar(frame)
|
||||
local toolBar = wx.wxToolBar(frame, wx.wxID_ANY,
|
||||
wx.wxDefaultPosition, wx.wxDefaultSize, wx.wxTB_FLAT + wx.wxTB_NODIVIDER)
|
||||
@@ -77,35 +75,35 @@ local function createToolBar(frame)
|
||||
-- usually the bmp size isn't necessary, but the HELP icon is not the right size in MSW
|
||||
local getBitmap = (ide.app.createbitmap or wx.wxArtProvider.GetBitmap)
|
||||
local toolBmpSize = wx.wxSize(16, 16)
|
||||
toolBar:AddTool(ID_NEW, "New", getBitmap(wx.wxART_NORMAL_FILE, wx.wxART_TOOLBAR, toolBmpSize), "Create an empty document")
|
||||
toolBar:AddTool(ID_OPEN, "Open", getBitmap(wx.wxART_FILE_OPEN, wx.wxART_TOOLBAR, toolBmpSize), "Open an existing document")
|
||||
toolBar:AddTool(ID_SAVE, "Save", getBitmap(wx.wxART_FILE_SAVE, wx.wxART_TOOLBAR, toolBmpSize), "Save the current document")
|
||||
toolBar:AddTool(ID_SAVEALL, "Save All", getBitmap(wx.wxART_NEW_DIR, wx.wxART_TOOLBAR, toolBmpSize), "Save all documents")
|
||||
toolBar:AddTool(ID_NEW, "New", getBitmap(wx.wxART_NORMAL_FILE, wx.wxART_TOOLBAR, toolBmpSize), TR("Create an empty document")..SCinB(ID_NEW))
|
||||
toolBar:AddTool(ID_OPEN, "Open", getBitmap(wx.wxART_FILE_OPEN, wx.wxART_TOOLBAR, toolBmpSize), TR("Open an existing document")..SCinB(ID_OPEN))
|
||||
toolBar:AddTool(ID_SAVE, "Save", getBitmap(wx.wxART_FILE_SAVE, wx.wxART_TOOLBAR, toolBmpSize), TR("Save the current document")..SCinB(ID_SAVE))
|
||||
toolBar:AddTool(ID_SAVEALL, "Save All", getBitmap(wx.wxART_NEW_DIR, wx.wxART_TOOLBAR, toolBmpSize), TR("Save all open documents")..SCinB(ID_SAVEALL))
|
||||
toolBar:AddSeparator()
|
||||
toolBar:AddTool(ID_CUT, "Cut", getBitmap(wx.wxART_CUT, wx.wxART_TOOLBAR, toolBmpSize), "Cut the selection")
|
||||
toolBar:AddTool(ID_COPY, "Copy", getBitmap(wx.wxART_COPY, wx.wxART_TOOLBAR, toolBmpSize), "Copy the selection")
|
||||
toolBar:AddTool(ID_PASTE, "Paste", getBitmap(wx.wxART_PASTE, wx.wxART_TOOLBAR, toolBmpSize), "Paste text from the clipboard")
|
||||
toolBar:AddTool(ID_CUT, "Cut", getBitmap(wx.wxART_CUT, wx.wxART_TOOLBAR, toolBmpSize), TR("Cut selected text to clipboard")..SCinB(ID_CUT))
|
||||
toolBar:AddTool(ID_COPY, "Copy", getBitmap(wx.wxART_COPY, wx.wxART_TOOLBAR, toolBmpSize), TR("Copy selected text to clipboard")..SCinB(ID_COPY))
|
||||
toolBar:AddTool(ID_PASTE, "Paste", getBitmap(wx.wxART_PASTE, wx.wxART_TOOLBAR, toolBmpSize), TR("Paste text from the clipboard")..SCinB(ID_PASTE))
|
||||
toolBar:AddSeparator()
|
||||
toolBar:AddTool(ID_UNDO, "Undo", getBitmap(wx.wxART_UNDO, wx.wxART_TOOLBAR, toolBmpSize), "Undo last edit")
|
||||
toolBar:AddTool(ID_REDO, "Redo", getBitmap(wx.wxART_REDO, wx.wxART_TOOLBAR, toolBmpSize), "Redo last undo")
|
||||
toolBar:AddTool(ID_UNDO, "Undo", getBitmap(wx.wxART_UNDO, wx.wxART_TOOLBAR, toolBmpSize), TR("Undo last edit")..SCinB(ID_UNDO))
|
||||
toolBar:AddTool(ID_REDO, "Redo", getBitmap(wx.wxART_REDO, wx.wxART_TOOLBAR, toolBmpSize), TR("Redo last edit undone")..SCinB(ID_REDO))
|
||||
toolBar:AddSeparator()
|
||||
toolBar:AddTool(ID_FIND, "Find", getBitmap(wx.wxART_FIND, wx.wxART_TOOLBAR, toolBmpSize), "Find text")
|
||||
toolBar:AddTool(ID_REPLACE, "Replace", getBitmap(wx.wxART_FIND_AND_REPLACE, wx.wxART_TOOLBAR, toolBmpSize), "Find and replace text")
|
||||
toolBar:AddTool(ID_FIND, "Find", getBitmap(wx.wxART_FIND, wx.wxART_TOOLBAR, toolBmpSize), TR("Find text")..SCinB(ID_FIND))
|
||||
toolBar:AddTool(ID_REPLACE, "Replace", getBitmap(wx.wxART_FIND_AND_REPLACE, wx.wxART_TOOLBAR, toolBmpSize), TR("Find and replace text")..SCinB(ID_REPLACE))
|
||||
if ide.app.createbitmap then -- custom handler should handle all bitmaps
|
||||
toolBar:AddSeparator()
|
||||
toolBar:AddTool(ID_START_DEBUG, "Start Debugging", getBitmap("wxART_DEBUG_START", wx.wxART_TOOLBAR, toolBmpSize), "Start debugging")
|
||||
toolBar:AddTool(ID_STOP_DEBUG, "Stop Debugging", getBitmap("wxART_DEBUG_STOP", wx.wxART_TOOLBAR, toolBmpSize), "Stop debugging")
|
||||
toolBar:AddTool(ID_BREAK, "Break", getBitmap("wxART_DEBUG_BREAK", wx.wxART_TOOLBAR, toolBmpSize), "Break running process")
|
||||
toolBar:AddTool(ID_STEP, "Step into", getBitmap("wxART_DEBUG_STEP_INTO", wx.wxART_TOOLBAR, toolBmpSize), "Step into")
|
||||
toolBar:AddTool(ID_STEP_OVER, "Step over", getBitmap("wxART_DEBUG_STEP_OVER", wx.wxART_TOOLBAR, toolBmpSize), "Step over")
|
||||
toolBar:AddTool(ID_STEP_OUT, "Step out", getBitmap("wxART_DEBUG_STEP_OUT", wx.wxART_TOOLBAR, toolBmpSize), "Step out")
|
||||
toolBar:AddTool(ID_STARTDEBUG, "Start Debugging", getBitmap("wxART_DEBUG_START", wx.wxART_TOOLBAR, toolBmpSize), TR("Start debugging")..SCinB(ID_STARTDEBUG))
|
||||
toolBar:AddTool(ID_STOPDEBUG, "Stop Debugging", getBitmap("wxART_DEBUG_STOP", wx.wxART_TOOLBAR, toolBmpSize), TR("Stop the currently running process")..SCinB(ID_STOPDEBUG))
|
||||
toolBar:AddTool(ID_BREAK, "Break", getBitmap("wxART_DEBUG_BREAK", wx.wxART_TOOLBAR, toolBmpSize), TR("Break execution at the next executed line of code")..SCinB(ID_BREAK))
|
||||
toolBar:AddTool(ID_STEP, "Step into", getBitmap("wxART_DEBUG_STEP_INTO", wx.wxART_TOOLBAR, toolBmpSize), TR("Step into")..SCinB(ID_STEP))
|
||||
toolBar:AddTool(ID_STEPOVER, "Step over", getBitmap("wxART_DEBUG_STEP_OVER", wx.wxART_TOOLBAR, toolBmpSize), TR("Step over")..SCinB(ID_STEPOVER))
|
||||
toolBar:AddTool(ID_STEPOUT, "Step out", getBitmap("wxART_DEBUG_STEP_OUT", wx.wxART_TOOLBAR, toolBmpSize), TR("Step out of the current function")..SCinB(ID_STEPOUT))
|
||||
toolBar:AddSeparator()
|
||||
toolBar:AddTool(ID_TOGGLEBREAKPOINT, "Toggle breakpoint", getBitmap("wxART_DEBUG_BREAKPOINT_TOGGLE", wx.wxART_TOOLBAR, toolBmpSize), "Toggle breakpoint")
|
||||
toolBar:AddTool(ID_VIEWCALLSTACK, "Stack window", getBitmap("wxART_DEBUG_CALLSTACK", wx.wxART_TOOLBAR, toolBmpSize), "View stack window")
|
||||
toolBar:AddTool(ID_VIEWWATCHWINDOW, "Watch window", getBitmap("wxART_DEBUG_WATCH", wx.wxART_TOOLBAR, toolBmpSize), "View watch window")
|
||||
toolBar:AddTool(ID_TOGGLEBREAKPOINT, "Toggle breakpoint", getBitmap("wxART_DEBUG_BREAKPOINT_TOGGLE", wx.wxART_TOOLBAR, toolBmpSize), TR("Toggle breakpoint")..SCinB(ID_TOGGLEBREAKPOINT))
|
||||
toolBar:AddTool(ID_VIEWCALLSTACK, "Stack window", getBitmap("wxART_DEBUG_CALLSTACK", wx.wxART_TOOLBAR, toolBmpSize), TR("View the stack window")..SCinB(ID_VIEWCALLSTACK))
|
||||
toolBar:AddTool(ID_VIEWWATCHWINDOW, "Watch window", getBitmap("wxART_DEBUG_WATCH", wx.wxART_TOOLBAR, toolBmpSize), TR("View the watch window")..SCinB(ID_VIEWWATCHWINDOW))
|
||||
end
|
||||
toolBar:AddSeparator()
|
||||
toolBar:AddTool(ID "debug.projectdir.fromfile", "Update", getBitmap(wx.wxART_GO_DIR_UP , wx.wxART_TOOLBAR, toolBmpSize), "Set project directory from current file")
|
||||
toolBar:AddTool(ID_PROJECTDIRFROMFILE, "Update", getBitmap(wx.wxART_GO_DIR_UP , wx.wxART_TOOLBAR, toolBmpSize), TR("Set project directory from current file")..SCinB(ID_PROJECTDIRFROMFILE))
|
||||
toolBar:AddSeparator()
|
||||
toolBar:AddControl(funclist)
|
||||
toolBar:Realize()
|
||||
@@ -115,7 +113,6 @@ local function createToolBar(frame)
|
||||
return toolBar
|
||||
end
|
||||
|
||||
|
||||
local function createNotebook(frame)
|
||||
-- notebook for editors
|
||||
local notebook = wxaui.wxAuiNotebook(frame, wx.wxID_ANY,
|
||||
@@ -155,14 +152,14 @@ local function createBottomNotebook(frame)
|
||||
wxaui.wxAUI_NB_DEFAULT_STYLE + wxaui.wxAUI_NB_TAB_EXTERNAL_MOVE
|
||||
- wxaui.wxAUI_NB_CLOSE_ON_ACTIVE_TAB + wx.wxNO_BORDER)
|
||||
|
||||
local errorlog = wxstc.wxStyledTextCtrl(bottomnotebook, ID "output",
|
||||
local errorlog = wxstc.wxStyledTextCtrl(bottomnotebook, wx.wxID_ANY,
|
||||
wx.wxDefaultPosition, wx.wxDefaultSize, wx.wxBORDER_STATIC)
|
||||
|
||||
local shellbox = wxstc.wxStyledTextCtrl(bottomnotebook, ID "shell",
|
||||
local shellbox = wxstc.wxStyledTextCtrl(bottomnotebook, wx.wxID_ANY,
|
||||
wx.wxDefaultPosition, wx.wxDefaultSize, wx.wxBORDER_STATIC)
|
||||
|
||||
bottomnotebook:AddPage(errorlog, "Output", true)
|
||||
bottomnotebook:AddPage(shellbox, "Local console", false)
|
||||
bottomnotebook:AddPage(errorlog, TR("Output"), true)
|
||||
bottomnotebook:AddPage(shellbox, TR("Local console"), false)
|
||||
bottomnotebook:Connect(wxaui.wxEVT_COMMAND_AUINOTEBOOK_PAGE_CLOSE,
|
||||
function (event)
|
||||
event:Veto() -- don't allow closing pages in this notebook
|
||||
@@ -206,7 +203,7 @@ do
|
||||
CenterPane():PaneBorder(false):Hide())
|
||||
|
||||
mgr:AddPane(frame.projpanel, wxaui.wxAuiPaneInfo():
|
||||
Name("projpanel"):Caption("Project"):
|
||||
Name("projpanel"):Caption(TR("Project")):
|
||||
MinSize(200,200):FloatingSize(200,400):
|
||||
Left():Layer(1):Position(1):
|
||||
CloseButton(true):MaximizeButton(false):PinButton(true):Hide())
|
||||
|
||||
@@ -16,6 +16,7 @@ ID_CLOSE = NewID()
|
||||
ID_SAVE = wx.wxID_SAVE
|
||||
ID_SAVEAS = wx.wxID_SAVEAS
|
||||
ID_SAVEALL = NewID()
|
||||
ID_RECENTFILES = NewID()
|
||||
ID_EXIT = wx.wxID_EXIT
|
||||
-- Edit menu
|
||||
ID_CUT = wx.wxID_CUT
|
||||
@@ -24,43 +25,50 @@ ID_PASTE = wx.wxID_PASTE
|
||||
ID_SELECTALL = wx.wxID_SELECTALL
|
||||
ID_UNDO = wx.wxID_UNDO
|
||||
ID_REDO = wx.wxID_REDO
|
||||
ID_SHOWTOOLTIP = NewID()
|
||||
ID_AUTOCOMPLETE = NewID()
|
||||
ID_AUTOCOMPLETE_ENABLE = NewID()
|
||||
ID_AUTOCOMPLETEENABLE = NewID()
|
||||
ID_COMMENT = NewID()
|
||||
ID_FOLD = NewID()
|
||||
-- Find menu
|
||||
ID_CLEARDYNAMICWORDS = NewID()
|
||||
-- Search menu
|
||||
ID_FIND = wx.wxID_FIND
|
||||
ID_FINDNEXT = NewID()
|
||||
ID_FINDPREV = NewID()
|
||||
ID_REPLACE = NewID()
|
||||
ID_FIND_IN_FILES = NewID()
|
||||
ID_REPLACE_IN_FILES = NewID()
|
||||
ID_FINDINFILES = NewID()
|
||||
ID_REPLACEINFILES = NewID()
|
||||
ID_GOTOLINE = NewID()
|
||||
ID_SORT = NewID()
|
||||
-- Project/Debug menu
|
||||
ID_TOGGLEBREAKPOINT = NewID()
|
||||
ID_COMPILE = NewID()
|
||||
ID_RUN = NewID()
|
||||
ID_RUNNOW = NewID()
|
||||
ID_ATTACH_DEBUG = NewID()
|
||||
ID_START_DEBUG = NewID()
|
||||
ID_STOP_DEBUG = NewID()
|
||||
ID_STEP = NewID()
|
||||
ID_STEP_OVER = NewID()
|
||||
ID_STEP_OUT = NewID()
|
||||
ID_CONTINUE = NewID()
|
||||
ID_BREAK = NewID()
|
||||
ID_TRACE = NewID()
|
||||
-- View menu
|
||||
ID_VIEWFILETREE = NewID()
|
||||
ID_VIEWOUTPUT = NewID()
|
||||
ID_VIEWCALLSTACK = NewID()
|
||||
ID_VIEWWATCHWINDOW = NewID()
|
||||
ID_FULLSCREEN = NewID()
|
||||
ID_VIEWDEFAULTLAYOUT = NewID()
|
||||
ID_VIEWFULLSCREEN = NewID()
|
||||
-- Project menu
|
||||
ID_TOGGLEBREAKPOINT = NewID()
|
||||
ID_COMPILE = NewID()
|
||||
ID_ANALYZE = NewID()
|
||||
ID_RUN = NewID()
|
||||
ID_RUNNOW = NewID()
|
||||
ID_ATTACHDEBUG = NewID()
|
||||
ID_STARTDEBUG = NewID()
|
||||
ID_STOPDEBUG = NewID()
|
||||
ID_STEP = NewID()
|
||||
ID_STEPOVER = NewID()
|
||||
ID_STEPOUT = NewID()
|
||||
ID_BREAK = NewID()
|
||||
ID_TRACE = NewID()
|
||||
ID_CLEAROUTPUT = NewID()
|
||||
ID_PROJECTDIR = NewID()
|
||||
ID_INTERPRETER = NewID()
|
||||
ID_PROJECTDIR = NewID()
|
||||
ID_PROJECTDIRFROMFILE = NewID()
|
||||
ID_PROJECTDIRCHOOSE = NewID()
|
||||
-- Help menu
|
||||
ID_ABOUT = wx.wxID_ABOUT
|
||||
-- Watch window menu items
|
||||
ID_WATCH_LISTCTRL = NewID()
|
||||
ID_ADDWATCH = NewID()
|
||||
ID_EDITWATCH = NewID()
|
||||
ID_REMOVEWATCH = NewID()
|
||||
@@ -68,6 +76,7 @@ ID_EVALUATEWATCH = NewID()
|
||||
-- Editor popup menu items
|
||||
ID_QUICKADDWATCH = NewID()
|
||||
ID_QUICKEVAL = NewID()
|
||||
ID_ADDTOSCRATCHPAD = NewID()
|
||||
|
||||
local ids = {}
|
||||
function ID (name)
|
||||
|
||||
@@ -140,13 +140,12 @@ function M.show_warnings(top_ast)
|
||||
end
|
||||
|
||||
local frame = ide.frame
|
||||
local menu = frame.menuBar:GetMenu(frame.menuBar:FindMenu("&Project"))
|
||||
local ID_ANALYZE = ID "debug.analyze"
|
||||
local menu = frame.menuBar:GetMenu(frame.menuBar:FindMenu(TR("&Project")))
|
||||
|
||||
-- insert after "Compile" item
|
||||
for item = 0, menu:GetMenuItemCount()-1 do
|
||||
if menu:FindItemByPosition(item):GetId() == ID_COMPILE then
|
||||
menu:Insert(item+1, ID_ANALYZE, "Analyze\tShift-F7", "Analyze the source code")
|
||||
menu:Insert(item+1, ID_ANALYZE, TR("Analyze")..KSC(ID_ANALYZE), TR("Analyze the source code"))
|
||||
break
|
||||
end
|
||||
end
|
||||
|
||||
99
src/editor/keymap.lua
Normal file
99
src/editor/keymap.lua
Normal file
@@ -0,0 +1,99 @@
|
||||
local ide = ide
|
||||
|
||||
function KSC(id, default)
|
||||
-- this is only for the rare case of someone assigning a complete list
|
||||
-- to ide.config.keymap.
|
||||
local keymap = ide.config.keymap
|
||||
return keymap[id] and "\t"..keymap[id] or default or ""
|
||||
end
|
||||
|
||||
ide.config.keymap = {
|
||||
-- File menu
|
||||
[ID_NEW] = "Ctrl-N",
|
||||
[ID_OPEN] = "Ctrl-O",
|
||||
[ID_CLOSE] = "Ctrl-W",
|
||||
[ID_SAVE] = "Ctrl-S",
|
||||
[ID_SAVEAS] = "Alt-Shift-S",
|
||||
[ID_SAVEALL] = "",
|
||||
[ID_RECENTFILES] = "",
|
||||
[ID_EXIT] = "Ctrl-Q",
|
||||
-- Edit menu
|
||||
[ID_CUT] = "Ctrl-X",
|
||||
[ID_COPY] = "Ctrl-C",
|
||||
[ID_PASTE] = "Ctrl-V",
|
||||
[ID_SELECTALL] = "Ctrl-A",
|
||||
[ID_UNDO] = "Ctrl-Z",
|
||||
[ID_REDO] = "Ctrl-Y",
|
||||
[ID_SHOWTOOLTIP] = "Ctrl-T",
|
||||
[ID_AUTOCOMPLETE] = "Ctrl-K",
|
||||
[ID_AUTOCOMPLETEENABLE] = "",
|
||||
[ID_COMMENT] = "Ctrl-U",
|
||||
[ID_FOLD] = "F12",
|
||||
[ID_CLEARDYNAMICWORDS] = "",
|
||||
-- Search menu
|
||||
[ID_FIND] = "Ctrl-F",
|
||||
[ID_FINDNEXT] = "F3",
|
||||
[ID_FINDPREV] = "Shift-F3",
|
||||
[ID_REPLACE] = "Ctrl-R",
|
||||
[ID_FINDINFILES] = "Ctrl-Shift-F",
|
||||
[ID_REPLACEINFILES] = "Ctrl-Shift-R",
|
||||
[ID_GOTOLINE] = "Ctrl-G",
|
||||
[ID_SORT] = "",
|
||||
-- View menu
|
||||
[ID_VIEWFILETREE] = "Ctrl-Shift-P",
|
||||
[ID_VIEWOUTPUT] = "Ctrl-Shift-O",
|
||||
[ID_VIEWWATCHWINDOW] = "Ctrl-Shift-W",
|
||||
[ID_VIEWCALLSTACK] = "Ctrl-Shift-S",
|
||||
[ID_VIEWDEFAULTLAYOUT] = "",
|
||||
[ID_VIEWFULLSCREEN] = "Ctrl-Shift-A",
|
||||
-- Project menu
|
||||
[ID_RUN] = "F6",
|
||||
[ID_RUNNOW] = "Ctrl-F6",
|
||||
[ID_COMPILE] = "F7",
|
||||
[ID_ANALYZE] = "Shift-F7",
|
||||
[ID_STARTDEBUG] = "F5",
|
||||
[ID_ATTACHDEBUG] = "",
|
||||
[ID_STOPDEBUG] = "Shift-F5",
|
||||
[ID_STEP] = "F10",
|
||||
[ID_STEPOVER] = "Shift-F10",
|
||||
[ID_STEPOUT] = "Ctrl-F10",
|
||||
[ID_TRACE] = "",
|
||||
[ID_BREAK] = "Shift-F9",
|
||||
[ID_TOGGLEBREAKPOINT] = "F9",
|
||||
[ID_CLEAROUTPUT] = "",
|
||||
[ID_INTERPRETER] = "",
|
||||
[ID_PROJECTDIR] = "",
|
||||
-- Help menu
|
||||
[ID_ABOUT] = "F1",
|
||||
-- Watch window menu items
|
||||
[ID_ADDWATCH] = "Ins",
|
||||
[ID_EDITWATCH] = "F2",
|
||||
[ID_REMOVEWATCH] = "Del",
|
||||
[ID_EVALUATEWATCH] = "",
|
||||
-- Editor popup menu items
|
||||
[ID_QUICKADDWATCH] = "",
|
||||
[ID_QUICKEVAL] = "",
|
||||
}
|
||||
|
||||
--[[
|
||||
Accelerator general syntax is any combination of "CTRL", "ALT" and "SHIFT"
|
||||
strings (case doesn't matter) separated by either '-' or '+' characters and
|
||||
followed by the accelerator itself. The accelerator may be any alphanumeric
|
||||
character, any function key (from F1 to F12) or one of the special characters
|
||||
listed below (again, case doesn't matter):
|
||||
|
||||
DEL/DELETE Delete key
|
||||
INS/INSERT Insert key
|
||||
ENTER/RETURN Enter key
|
||||
PGUP PageUp key
|
||||
PGDN PageDown key
|
||||
LEFT Left cursor arrow key
|
||||
RIGHT Right cursor arrow key
|
||||
UP Up cursor arrow key
|
||||
DOWN Down cursor arrow key
|
||||
HOME Home key
|
||||
END End key
|
||||
SPACE Space
|
||||
TAB Tab key
|
||||
ESC/ESCAPE Escape key (Windows only)
|
||||
--]]
|
||||
@@ -1,8 +1,6 @@
|
||||
-- Copyright (C) Paul Kulchenko 2011-2012
|
||||
-- styles for comment markup
|
||||
|
||||
local styles = ide.config.styles
|
||||
local comment = styles.comment
|
||||
local MD_MARK_ITAL = '_' -- italic
|
||||
local MD_MARK_BOLD = '**' -- bold
|
||||
local MD_MARK_LINK = '[' -- link description start
|
||||
@@ -15,26 +13,38 @@ local MD_MARK_BOXD = '|' -- highlight
|
||||
local MD_MARK_MARK = ' ' -- separator
|
||||
local MD_LINK_NEWWINDOW = '+' -- indicator to open a new window for links
|
||||
local markup = {
|
||||
[MD_MARK_BOXD] = {st=25, fg={127,0,127}, bg=comment.bg, b=true},
|
||||
[MD_MARK_CODE] = {st=26, fg={127,127,127}, bg=comment.bg, fs=9},
|
||||
[MD_MARK_HEAD] = {st=27, fg=comment.fg, bg=comment.bg, fn="Lucida Console", b=true},
|
||||
[MD_MARK_LINK] = {st=28, fg=comment.fg, bg=comment.bg, u=true, hs={0, 0, 127}},
|
||||
[MD_MARK_BOLD] = {st=29, fg=comment.fg, bg=comment.bg, b=true, fs=11},
|
||||
[MD_MARK_ITAL] = {st=30, fg=comment.fg, bg=comment.bg, i=true},
|
||||
[MD_MARK_MARK] = {st=31, fg=comment.fg, bg=comment.bg, v=false},
|
||||
[MD_MARK_BOXD] = {st=25, fg={127,0,127}, b=true},
|
||||
[MD_MARK_CODE] = {st=26, fg={127,127,127}, fs=9},
|
||||
[MD_MARK_HEAD] = {st=27, fn="Lucida Console", b=true},
|
||||
[MD_MARK_LINK] = {st=28, u=true, hs={32,32,127}},
|
||||
[MD_MARK_BOLD] = {st=29, b=true},
|
||||
[MD_MARK_ITAL] = {st=30, i=true},
|
||||
[MD_MARK_MARK] = {st=31, v=false},
|
||||
}
|
||||
|
||||
-- allow other editor features to recognize this special markup
|
||||
function MarkupIsSpecial(style) return style == 31 end
|
||||
function MarkupIsAny(style) return style >= 25 and style <= 31 end
|
||||
function MarkupAddStyles(styles)
|
||||
local comment = styles.comment or {}
|
||||
for key,value in pairs(markup) do
|
||||
local style = styles[key] or {}
|
||||
-- copy all style features by value
|
||||
for feature in pairs(value) do
|
||||
style[feature] = style[feature] or value[feature] end
|
||||
style.fg = style.fg or comment.fg
|
||||
style.bg = style.bg or comment.bg
|
||||
styles[key] = style
|
||||
end
|
||||
end
|
||||
|
||||
local function q(s) return s:gsub('(.)','%%%1') end
|
||||
|
||||
local MD_MARK_PTRN = '' -- combination of all markup marks that can start styling
|
||||
for key,value in pairs(markup) do
|
||||
styles[key] = value
|
||||
if key ~= MD_MARK_MARK then MD_MARK_PTRN = MD_MARK_PTRN .. q(key) end
|
||||
end
|
||||
MarkupAddStyles(ide.config.styles)
|
||||
|
||||
function MarkupHotspotClick(pos, editor)
|
||||
-- check if this is "our" hotspot event
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
-- authors: Luxinia Dev (Eike Decker & Christoph Kubisch)
|
||||
---------------------------------------------------------
|
||||
local ide = ide
|
||||
|
||||
dofile "src/editor/menu_file.lua"
|
||||
dofile "src/editor/menu_edit.lua"
|
||||
dofile "src/editor/menu_search.lua"
|
||||
dofile "src/editor/menu_view.lua"
|
||||
dofile "src/editor/menu_project.lua"
|
||||
dofile "src/editor/menu_tools.lua"
|
||||
@@ -9,26 +9,26 @@ local frame = ide.frame
|
||||
local menuBar = frame.menuBar
|
||||
|
||||
local editMenu = wx.wxMenu{
|
||||
{ ID_CUT, "Cu&t\tCtrl-X", "Cut selected text to clipboard" },
|
||||
{ ID_COPY, "&Copy\tCtrl-C", "Copy selected text to the clipboard" },
|
||||
{ ID_PASTE, "&Paste\tCtrl-V", "Insert clipboard text at cursor" },
|
||||
{ ID_SELECTALL, "Select A&ll\tCtrl-A", "Select all text in the editor" },
|
||||
{ ID_CUT, TR("Cu&t")..KSC(ID_CUT), TR("Cut selected text to clipboard") },
|
||||
{ ID_COPY, TR("&Copy")..KSC(ID_COPY), TR("Copy selected text to clipboard") },
|
||||
{ ID_PASTE, TR("&Paste")..KSC(ID_PASTE), TR("Paste text from the clipboard") },
|
||||
{ ID_SELECTALL, TR("Select &All")..KSC(ID_SELECTALL), TR("Select all text in the editor") },
|
||||
{ },
|
||||
{ ID_UNDO, "&Undo\tCtrl-Z", "Undo the last action" },
|
||||
{ ID_REDO, "&Redo\tCtrl-Y", "Redo the last action undone" },
|
||||
{ ID_UNDO, TR("&Undo")..KSC(ID_UNDO), TR("Undo last edit") },
|
||||
{ ID_REDO, TR("&Redo")..KSC(ID_REDO), TR("Redo last edit undone") },
|
||||
{ },
|
||||
{ ID "edit.showtooltip", "Show &Tooltip\tCtrl-T", "Show tooltip for current position. Place cursor after opening bracket of function."},
|
||||
{ ID_AUTOCOMPLETE, "Complete &Identifier\tCtrl-K", "Complete the current identifier" },
|
||||
{ ID_AUTOCOMPLETE_ENABLE, "Auto complete Identifiers", "Auto complete while typing", wx.wxITEM_CHECK },
|
||||
{ ID_SHOWTOOLTIP, TR("Show &Tooltip")..KSC(ID_SHOWTOOLTIP), TR("Show tooltip for current position; place cursor after opening bracket of function") },
|
||||
{ ID_AUTOCOMPLETE, TR("Complete &Identifier")..KSC(ID_AUTOCOMPLETE), TR("Complete the current identifier") },
|
||||
{ ID_AUTOCOMPLETEENABLE, TR("Auto Complete Identifiers")..KSC(ID_AUTOCOMPLETEENABLE), TR("Auto complete while typing"), wx.wxITEM_CHECK },
|
||||
{ },
|
||||
{ ID_COMMENT, "C&omment/Uncomment\tCtrl-U", "Comment or uncomment current or selected lines"},
|
||||
{ ID_COMMENT, TR("C&omment/Uncomment")..KSC(ID_COMMENT), TR("Comment or uncomment current or selected lines") },
|
||||
{ },
|
||||
{ ID_FOLD, "&Fold/Unfold all\tF12", "Fold or unfold all code folds"},
|
||||
{ ID "edit.cleardynamics", "Clear &Dynamic Words", "Resets the dynamic word list for autcompletion."},
|
||||
{ ID_FOLD, TR("&Fold/Unfold All")..KSC(ID_FOLD), TR("Fold or unfold all code folds") },
|
||||
{ ID_CLEARDYNAMICWORDS, TR("Clear &Dynamic Words")..KSC(ID_CLEARDYNAMICWORDS), TR("Resets the dynamic word list for autocompletion") },
|
||||
}
|
||||
menuBar:Append(editMenu, "&Edit")
|
||||
menuBar:Append(editMenu, TR("&Edit"))
|
||||
|
||||
editMenu:Check(ID_AUTOCOMPLETE_ENABLE, ide.config.autocomplete)
|
||||
editMenu:Check(ID_AUTOCOMPLETEENABLE, ide.config.autocomplete)
|
||||
|
||||
local function getControlWithFocus()
|
||||
local editor = GetEditor()
|
||||
@@ -88,12 +88,10 @@ for _, event in pairs({ID_CUT, ID_COPY, ID_PASTE, ID_SELECTALL, ID_UNDO, ID_REDO
|
||||
frame:Connect(event, wx.wxEVT_UPDATE_UI, OnUpdateUIEditMenu)
|
||||
end
|
||||
|
||||
frame:Connect(ID "edit.cleardynamics", wx.wxEVT_COMMAND_MENU_SELECTED,
|
||||
function (event)
|
||||
DynamicWordsReset()
|
||||
end)
|
||||
frame:Connect(ID_CLEARDYNAMICWORDS, wx.wxEVT_COMMAND_MENU_SELECTED,
|
||||
function () DynamicWordsReset() end)
|
||||
|
||||
frame:Connect(ID "edit.showtooltip", wx.wxEVT_COMMAND_MENU_SELECTED,
|
||||
frame:Connect(ID_SHOWTOOLTIP, wx.wxEVT_COMMAND_MENU_SELECTED,
|
||||
function (event)
|
||||
local editor = GetEditor()
|
||||
|
||||
@@ -104,7 +102,7 @@ frame:Connect(ID "edit.showtooltip", wx.wxEVT_COMMAND_MENU_SELECTED,
|
||||
|
||||
EditorCallTip(editor, editor:GetCurrentPos())
|
||||
end)
|
||||
frame:Connect(ID "edit.showtooltip", wx.wxEVT_UPDATE_UI,
|
||||
frame:Connect(ID_SHOWTOOLTIP, wx.wxEVT_UPDATE_UI,
|
||||
function (event) event:Enable(GetEditor() ~= nil) end)
|
||||
|
||||
frame:Connect(ID_AUTOCOMPLETE, wx.wxEVT_COMMAND_MENU_SELECTED,
|
||||
@@ -113,7 +111,7 @@ frame:Connect(ID_AUTOCOMPLETE, wx.wxEVT_COMMAND_MENU_SELECTED,
|
||||
end)
|
||||
frame:Connect(ID_AUTOCOMPLETE, wx.wxEVT_UPDATE_UI, OnUpdateUIEditMenu)
|
||||
|
||||
frame:Connect(ID_AUTOCOMPLETE_ENABLE, wx.wxEVT_COMMAND_MENU_SELECTED,
|
||||
frame:Connect(ID_AUTOCOMPLETEENABLE, wx.wxEVT_COMMAND_MENU_SELECTED,
|
||||
function (event)
|
||||
ide.config.autocomplete = event:IsChecked()
|
||||
end)
|
||||
|
||||
@@ -2,28 +2,27 @@
|
||||
-- Luxinia Dev (Eike Decker & Christoph Kubisch)
|
||||
---------------------------------------------------------
|
||||
local ide = ide
|
||||
-- Create the File menu and attach the callback functions
|
||||
|
||||
local frame = ide.frame
|
||||
local menuBar = frame.menuBar
|
||||
local openDocuments = ide.openDocuments
|
||||
|
||||
local fileMenu = wx.wxMenu({
|
||||
{ ID_NEW, "&New\tCtrl-N", "Create an empty document" },
|
||||
{ ID_OPEN, "&Open...\tCtrl-O", "Open an existing document" },
|
||||
{ ID_CLOSE, "&Close page\tCtrl-W", "Close the current editor window" },
|
||||
{ ID_NEW, TR("&New")..KSC(ID_NEW), TR("Create an empty document") },
|
||||
{ ID_OPEN, TR("&Open...")..KSC(ID_OPEN), TR("Open an existing document") },
|
||||
{ ID_CLOSE, TR("&Close page")..KSC(ID_CLOSE), TR("Close the current editor window") },
|
||||
{ },
|
||||
{ ID_SAVE, "&Save\tCtrl-S", "Save the current document" },
|
||||
{ ID_SAVEAS, "Save &As...\tAlt-Shift-S", "Save the current document to a file with a new name" },
|
||||
{ ID_SAVEALL, "Save A&ll...", "Save all open documents" },
|
||||
{ ID_SAVE, TR("&Save")..KSC(ID_SAVE), TR("Save the current document") },
|
||||
{ ID_SAVEAS, TR("Save &As...")..KSC(ID_SAVEAS), TR("Save the current document to a file with a new name") },
|
||||
{ ID_SAVEALL, TR("Save A&ll")..KSC(ID_SAVEALL), TR("Save all open documents") },
|
||||
{ },
|
||||
--{ ID "file.recentfiles", "Recent files",},
|
||||
-- placeholder for ID_RECENTFILES
|
||||
{ },
|
||||
{ ID_EXIT, "E&xit", "Exit Program" }})
|
||||
menuBar:Append(fileMenu, "&File")
|
||||
{ ID_EXIT, TR("E&xit")..KSC(ID_EXIT), TR("Exit program") }})
|
||||
menuBar:Append(fileMenu, TR("&File"))
|
||||
|
||||
local filehistorymenu = wx.wxMenu({})
|
||||
local filehistory = wx.wxMenuItem(fileMenu,ID"file.recentfiles","Recent files", "File history", wx.wxITEM_NORMAL,filehistorymenu)
|
||||
local filehistory = wx.wxMenuItem(fileMenu, ID_RECENTFILES,
|
||||
TR("Recent Files")..KSC(ID_RECENTFILES), TR("File history"), wx.wxITEM_NORMAL, filehistorymenu)
|
||||
fileMenu:Insert(8,filehistory)
|
||||
function UpdateFileHistoryUI(list)
|
||||
-- remove all at first
|
||||
|
||||
@@ -9,9 +9,10 @@ local menuBar = frame.menuBar
|
||||
local mobdebug = require "mobdebug"
|
||||
|
||||
local helpMenu = wx.wxMenu{
|
||||
{ ID_ABOUT, "&About\tF1", "About ZeroBrane Studio" },
|
||||
{ ID_ABOUT, TR("&About")..KSC(ID_ABOUT), TR("About ZeroBrane Studio") },
|
||||
}
|
||||
menuBar:Append(helpMenu, "&Help")
|
||||
-- do not translate Help menu on Mac as it won't merge with "standard" menus
|
||||
menuBar:Append(helpMenu, ide.osname == 'Macintosh' and "&Help" or TR("&Help"))
|
||||
|
||||
local function DisplayAbout(event)
|
||||
local page = [[
|
||||
@@ -23,7 +24,7 @@ local function DisplayAbout(event)
|
||||
<table cellspacing="3" cellpadding="3" width="100%">
|
||||
<tr>
|
||||
<td>
|
||||
<b>ZeroBrane Studio (]]..ide.VERSION..[[; using MobDebug ]]..mobdebug._VERSION..[[)</b><br>
|
||||
<b>ZeroBrane Studio (]]..ide.VERSION..[[; MobDebug ]]..mobdebug._VERSION..[[)</b><br>
|
||||
<b>Copyright © 2011-2012 ZeroBrane LLC</b><br>
|
||||
Paul Kulchenko<br>
|
||||
Licensed under the MIT License.
|
||||
@@ -40,10 +41,10 @@ local function DisplayAbout(event)
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<b>Based on wxLua editor sample (]]..wxlua.wxLUA_VERSION_STRING..[[)</b><br>
|
||||
<b>Based on wxLua editor (]]..wxlua.wxLUA_VERSION_STRING..[[)</b><br>
|
||||
<b>Copyright © 2002-2005 Lomtick Software</b><br>
|
||||
J. Winwood, John Labenski<br>
|
||||
Licensed under wxWindows Library License, Version 3.
|
||||
Licensed under wxWindows Library License, v3.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -56,7 +57,7 @@ local function DisplayAbout(event)
|
||||
</body>
|
||||
</html>]]
|
||||
|
||||
local dlg = wx.wxDialog(frame, wx.wxID_ANY, "About ZeroBrane Studio")
|
||||
local dlg = wx.wxDialog(frame, wx.wxID_ANY, TR("About ZeroBrane Studio"))
|
||||
local html = wx.wxLuaHtmlWindow(dlg, wx.wxID_ANY,
|
||||
wx.wxDefaultPosition, wx.wxSize(440, 270),
|
||||
wx.wxHW_SCROLLBAR_NEVER)
|
||||
@@ -2,15 +2,10 @@
|
||||
-- Luxinia Dev (Eike Decker & Christoph Kubisch)
|
||||
---------------------------------------------------------
|
||||
local ide = ide
|
||||
|
||||
-- Create the Debug menu and attach the callback functions
|
||||
|
||||
local frame = ide.frame
|
||||
local menuBar = frame.menuBar
|
||||
|
||||
local openDocuments = ide.openDocuments
|
||||
local debugger = ide.debugger
|
||||
local filetree = ide.filetree
|
||||
local bottomnotebook = frame.bottomnotebook
|
||||
local uimgr = frame.uimgr
|
||||
|
||||
@@ -33,8 +28,8 @@ do
|
||||
table.sort(interpreternames)
|
||||
|
||||
local targetargs = {}
|
||||
for i,v in ipairs(interpreternames) do
|
||||
local id = ID ("debug.interpreter."..lkinterpreters[v])
|
||||
for _,v in ipairs(interpreternames) do
|
||||
local id = ID("debug.interpreter."..lkinterpreters[v])
|
||||
local inter = interpreters[id]
|
||||
table.insert(targetargs,{id,inter.name,inter.description,wx.wxITEM_CHECK})
|
||||
end
|
||||
@@ -42,45 +37,42 @@ do
|
||||
end
|
||||
|
||||
local debugTab = {
|
||||
{ ID_RUN, "&Run\tF6", "Execute the current project/file" },
|
||||
{ ID_RUNNOW, "Run as Scratchpad\tCtrl-F6", "Execute the current project/file and keep updating the code to see immediate results", wx.wxITEM_CHECK },
|
||||
{ ID_COMPILE, "&Compile\tF7", "Test compile the Lua file" },
|
||||
{ ID_START_DEBUG, "Start &Debugging\tF5", "Start a debugging session" },
|
||||
{ ID_ATTACH_DEBUG, "&Start Debugger Server", "Allow a client to start a debugging session" },
|
||||
{ ID_RUN, TR("&Run")..KSC(ID_RUN), TR("Execute the current project/file") },
|
||||
{ ID_RUNNOW, TR("Run as Scratchpad")..KSC(ID_RUNNOW), TR("Execute the current project/file and keep updating the code to see immediate results"), wx.wxITEM_CHECK },
|
||||
{ ID_COMPILE, TR("&Compile")..KSC(ID_COMPILE), TR("Compile the current file") },
|
||||
{ ID_STARTDEBUG, TR("Start &Debugging")..KSC(ID_STARTDEBUG), TR("Start debugging") },
|
||||
{ ID_ATTACHDEBUG, TR("&Start Debugger Server")..KSC(ID_ATTACHDEBUG), TR("Allow external process to start debugging") },
|
||||
{ },
|
||||
{ ID_STOP_DEBUG, "S&top Debugging\tShift-F12", "Stop the currently running process" },
|
||||
{ ID_STEP, "Step &Into\tF10", "Step into the next line" },
|
||||
{ ID_STEP_OVER, "Step &Over\tShift-F10", "Step over the next line" },
|
||||
{ ID_STEP_OUT, "Step O&ut\tCtrl-F10", "Step out of the current function" },
|
||||
{ ID_TRACE, "Tr&ace", "Trace execution showing each executed line" },
|
||||
{ ID_BREAK, "&Break\tShift-F9", "Stop execution of the program at the next executed line of code" },
|
||||
{ ID_STOPDEBUG, TR("S&top Debugging")..KSC(ID_STOPDEBUG), TR("Stop the currently running process") },
|
||||
{ ID_STEP, TR("Step &Into")..KSC(ID_STEP), TR("Step into") },
|
||||
{ ID_STEPOVER, TR("Step &Over")..KSC(ID_STEPOVER), TR("Step over") },
|
||||
{ ID_STEPOUT, TR("Step O&ut")..KSC(ID_STEPOUT), TR("Step out of the current function") },
|
||||
{ ID_TRACE, TR("Tr&ace")..KSC(ID_TRACE), TR("Trace execution showing each executed line") },
|
||||
{ ID_BREAK, TR("&Break")..KSC(ID_BREAK), TR("Break execution at the next executed line of code") },
|
||||
{ },
|
||||
{ ID_TOGGLEBREAKPOINT, "Toggle Break&point\tF9", "Toggle Breakpoint" },
|
||||
{ ID_TOGGLEBREAKPOINT, TR("Toggle Break&point")..KSC(ID_TOGGLEBREAKPOINT), TR("Toggle breakpoint") },
|
||||
{ },
|
||||
{ ID_CLEAROUTPUT, "C&lear Output Window", "Clear the output window before compiling or debugging", wx.wxITEM_CHECK },
|
||||
{ ID_CLEAROUTPUT, TR("C&lear Output Window")..KSC(ID_CLEAROUTPUT), TR("Clear the output window before compiling or debugging"), wx.wxITEM_CHECK },
|
||||
}
|
||||
|
||||
local debugMenu = wx.wxMenu(debugTab)
|
||||
local debugMenuRun = {start="Start &Debugging\tF5", continue="Co&ntinue\tF5"}
|
||||
local debugMenuStop = {debugging="S&top Debugging\tShift-F5", process="S&top Process\tShift-F5"}
|
||||
|
||||
local targetDirMenu = wx.wxMenu{
|
||||
{ID "debug.projectdir.choose","Choose ..."},
|
||||
{ID "debug.projectdir.fromfile","From current filepath"},
|
||||
{},
|
||||
{ID "debug.projectdir.currentdir",""}
|
||||
{ID_PROJECTDIRCHOOSE, TR("Choose ...")..KSC(ID_PROJECTDIRCHOOSE), TR("Choose a project directory")},
|
||||
{ID_PROJECTDIRFROMFILE, TR("Set From Current File")..KSC(ID_PROJECTDIRFROMFILE), TR("Set project directory from current file")},
|
||||
}
|
||||
|
||||
debugMenu:Append(ID_INTERPRETER,"Lua &Interpreter",targetMenu,"Set the interpreter to be used")
|
||||
debugMenu:Append(ID_PROJECTDIR,"Project Directory",targetDirMenu,"Set the project directory to be used")
|
||||
menuBar:Append(debugMenu, "&Project")
|
||||
local debugMenu = wx.wxMenu(debugTab)
|
||||
local debugMenuRun = {
|
||||
start=TR("Start &Debugging")..KSC(ID_STARTDEBUG), continue=TR("Co&ntinue")..KSC(ID_STARTDEBUG)}
|
||||
local debugMenuStop = {
|
||||
debugging=TR("S&top Debugging")..KSC(ID_STOPDEBUG), process=TR("S&top Process")..KSC(ID_STOPDEBUG)}
|
||||
debugMenu:Append(ID_PROJECTDIR, TR("Project Directory"), targetDirMenu, TR("Set the project directory to be used"))
|
||||
debugMenu:Append(ID_INTERPRETER, TR("Lua &Interpreter"), targetMenu, TR("Set the interpreter to be used"))
|
||||
menuBar:Append(debugMenu, TR("&Project"))
|
||||
|
||||
-----------------------------
|
||||
-- Project directory handling
|
||||
|
||||
function ProjectUpdateProjectDir(projdir,skiptree)
|
||||
ide.config.path.projectdir = projdir ~= "" and projdir or nil
|
||||
menuBar:SetLabel(ID "debug.projectdir.currentdir",projdir)
|
||||
frame:SetStatusText(projdir)
|
||||
if (not skiptree) then
|
||||
ide.filetree:updateProjectDir(projdir)
|
||||
@@ -90,26 +82,22 @@ ProjectUpdateProjectDir(ide.config.path.projectdir)
|
||||
|
||||
local function projChoose(event)
|
||||
local editor = GetEditor()
|
||||
local saved = false
|
||||
local fn = wx.wxFileName(
|
||||
editor and openDocuments[editor:GetId()].filePath or "")
|
||||
fn:Normalize() -- want absolute path for dialog
|
||||
|
||||
local projectdir = ide.config.path.projectdir
|
||||
|
||||
local filePicker = wx.wxDirDialog(frame, "Chose a project directory",
|
||||
local filePicker = wx.wxDirDialog(frame, TR("Choose a project directory"),
|
||||
projectdir ~= "" and projectdir or wx.wxGetCwd(),wx.wxFLP_USE_TEXTCTRL)
|
||||
local res = filePicker:ShowModal(true)
|
||||
if res == wx.wxID_OK then
|
||||
if filePicker:ShowModal(true) == wx.wxID_OK then
|
||||
ProjectUpdateProjectDir(filePicker:GetPath())
|
||||
end
|
||||
return true
|
||||
end
|
||||
|
||||
frame:Connect(ID "debug.projectdir.choose", wx.wxEVT_COMMAND_MENU_SELECTED,
|
||||
projChoose)
|
||||
frame:Connect(ID "debug.projectdir.choose", wx.wxEVT_COMMAND_BUTTON_CLICKED,
|
||||
projChoose)
|
||||
frame:Connect(ID_PROJECTDIRCHOOSE, wx.wxEVT_COMMAND_MENU_SELECTED, projChoose)
|
||||
frame:Connect(ID_PROJECTDIRCHOOSE, wx.wxEVT_COMMAND_BUTTON_CLICKED, projChoose)
|
||||
|
||||
local function projFromFile(event)
|
||||
local editor = GetEditor()
|
||||
@@ -120,10 +108,10 @@ local function projFromFile(event)
|
||||
local fn = wx.wxFileName(filepath)
|
||||
fn:Normalize() -- want absolute path for dialog
|
||||
|
||||
if ide.interpreter then ProjectUpdateProjectDir(ide.interpreter:fprojdir(fn)) end
|
||||
if ide.interpreter then
|
||||
ProjectUpdateProjectDir(ide.interpreter:fprojdir(fn)) end
|
||||
end
|
||||
frame:Connect(ID "debug.projectdir.fromfile", wx.wxEVT_COMMAND_MENU_SELECTED,
|
||||
projFromFile)
|
||||
frame:Connect(ID_PROJECTDIRFROMFILE, wx.wxEVT_COMMAND_MENU_SELECTED, projFromFile)
|
||||
|
||||
------------------------------------
|
||||
-- Interpreter Selection and Running
|
||||
@@ -153,14 +141,14 @@ local function evSelectInterpreter(event)
|
||||
selectInterpreter(event:GetId())
|
||||
end
|
||||
|
||||
for id,inter in pairs(interpreters) do
|
||||
for id in pairs(interpreters) do
|
||||
frame:Connect(id,wx.wxEVT_COMMAND_MENU_SELECTED,evSelectInterpreter)
|
||||
end
|
||||
|
||||
do
|
||||
local defaultid = (
|
||||
IDget("debug.interpreter."..ide.config.interpreter) or
|
||||
ID ("debug.interpreter."..lastinterpreter)
|
||||
ID("debug.interpreter."..lastinterpreter)
|
||||
)
|
||||
ide.interpreter = interpreters[defaultid]
|
||||
menuBar:Check(defaultid, true)
|
||||
@@ -171,9 +159,11 @@ local function getNameToRun(skipcheck)
|
||||
|
||||
-- test compile it before we run it, if successful then ask to save
|
||||
-- only compile if lua api
|
||||
if (editor.spec.apitype and
|
||||
if editor.spec.apitype and
|
||||
editor.spec.apitype == "lua" and
|
||||
(not CompileProgram(editor, true) and not skipcheck)) then
|
||||
(not skipcheck) and
|
||||
(not ide.interpreter.skipcompile) and
|
||||
(not CompileProgram(editor, true)) then
|
||||
return
|
||||
end
|
||||
|
||||
@@ -197,6 +187,7 @@ function ActivateOutput()
|
||||
end
|
||||
|
||||
local function runInterpreter(wfilename, withdebugger)
|
||||
if ide.frame.menuBar:IsChecked(ID_CLEAROUTPUT) then ClearOutput() end
|
||||
ActivateOutput()
|
||||
|
||||
ClearAllCurrentLineMarkers()
|
||||
@@ -218,8 +209,11 @@ local debuggers = {
|
||||
|
||||
function ProjectDebug(skipcheck, debtype)
|
||||
if (debugger.server ~= nil) then
|
||||
if (not debugger.running) then
|
||||
ClearAllCurrentLineMarkers()
|
||||
if (debugger.scratchpad and debugger.scratchpad.paused) then
|
||||
debugger.scratchpad.paused = nil
|
||||
debugger.scratchpad.updated = true
|
||||
ShellSupportRemote(nil) -- disable remote while Scratchpad running
|
||||
elseif (not debugger.running) then
|
||||
debugger.run()
|
||||
end
|
||||
else
|
||||
@@ -236,7 +230,7 @@ end
|
||||
-- Actions
|
||||
|
||||
frame:Connect(ID_TOGGLEBREAKPOINT, wx.wxEVT_COMMAND_MENU_SELECTED,
|
||||
function (event)
|
||||
function ()
|
||||
local editor = GetEditor()
|
||||
local line = editor:LineFromPosition(editor:GetCurrentPos())
|
||||
DebuggerToggleBreakpoint(editor, line)
|
||||
@@ -249,7 +243,7 @@ frame:Connect(ID_TOGGLEBREAKPOINT, wx.wxEVT_UPDATE_UI,
|
||||
end)
|
||||
|
||||
frame:Connect(ID_COMPILE, wx.wxEVT_COMMAND_MENU_SELECTED,
|
||||
function (event)
|
||||
function ()
|
||||
local editor = GetEditor()
|
||||
ActivateOutput()
|
||||
CompileProgram(editor)
|
||||
@@ -286,11 +280,11 @@ frame:Connect(ID_RUNNOW, wx.wxEVT_UPDATE_UI,
|
||||
and debugger.pid == nil or debugger.scratchpad ~= nil))
|
||||
end)
|
||||
|
||||
frame:Connect(ID_ATTACH_DEBUG, wx.wxEVT_COMMAND_MENU_SELECTED,
|
||||
function (event)
|
||||
frame:Connect(ID_ATTACHDEBUG, wx.wxEVT_COMMAND_MENU_SELECTED,
|
||||
function ()
|
||||
if (ide.interpreter.fattachdebug) then ide.interpreter:fattachdebug() end
|
||||
end)
|
||||
frame:Connect(ID_ATTACH_DEBUG, wx.wxEVT_UPDATE_UI,
|
||||
frame:Connect(ID_ATTACHDEBUG, wx.wxEVT_UPDATE_UI,
|
||||
function (event)
|
||||
local editor = GetEditor()
|
||||
event:Enable((ide.interpreter) and (ide.interpreter.fattachdebug)
|
||||
@@ -298,39 +292,36 @@ frame:Connect(ID_ATTACH_DEBUG, wx.wxEVT_UPDATE_UI,
|
||||
and (editor ~= nil) and (not debugger.scratchpad))
|
||||
end)
|
||||
|
||||
frame:Connect(ID_START_DEBUG, wx.wxEVT_COMMAND_MENU_SELECTED, function () ProjectDebug() end)
|
||||
frame:Connect(ID_START_DEBUG, wx.wxEVT_UPDATE_UI,
|
||||
frame:Connect(ID_STARTDEBUG, wx.wxEVT_COMMAND_MENU_SELECTED, function () ProjectDebug() end)
|
||||
frame:Connect(ID_STARTDEBUG, wx.wxEVT_UPDATE_UI,
|
||||
function (event)
|
||||
local editor = GetEditor()
|
||||
event:Enable((ide.interpreter) and (ide.interpreter.hasdebugger) and
|
||||
((debugger.server == nil and debugger.pid == nil) or
|
||||
(debugger.server ~= nil and not debugger.running)) and
|
||||
(editor ~= nil) and (not debugger.scratchpad))
|
||||
(editor ~= nil) and (not debugger.scratchpad or debugger.scratchpad.paused))
|
||||
local label = (debugger.server ~= nil)
|
||||
and debugMenuRun.continue or debugMenuRun.start
|
||||
if debugMenu:GetLabel(ID_START_DEBUG) ~= label then
|
||||
debugMenu:SetLabel(ID_START_DEBUG, label)
|
||||
if debugMenu:GetLabel(ID_STARTDEBUG) ~= label then
|
||||
debugMenu:SetLabel(ID_STARTDEBUG, label)
|
||||
end
|
||||
end)
|
||||
|
||||
frame:Connect(ID_STOP_DEBUG, wx.wxEVT_COMMAND_MENU_SELECTED,
|
||||
function (event)
|
||||
DebuggerShutdown()
|
||||
end)
|
||||
frame:Connect(ID_STOP_DEBUG, wx.wxEVT_UPDATE_UI,
|
||||
frame:Connect(ID_STOPDEBUG, wx.wxEVT_COMMAND_MENU_SELECTED,
|
||||
function () DebuggerShutdown() end)
|
||||
frame:Connect(ID_STOPDEBUG, wx.wxEVT_UPDATE_UI,
|
||||
function (event)
|
||||
local editor = GetEditor()
|
||||
event:Enable((debugger.server ~= nil or debugger.pid ~= nil) and (editor ~= nil))
|
||||
local label = (debugger.server == nil and debugger.pid ~= nil)
|
||||
and debugMenuStop.process or debugMenuStop.debugging
|
||||
if debugMenu:GetLabel(ID_STOP_DEBUG) ~= label then
|
||||
debugMenu:SetLabel(ID_STOP_DEBUG, label)
|
||||
if debugMenu:GetLabel(ID_STOPDEBUG) ~= label then
|
||||
debugMenu:SetLabel(ID_STOPDEBUG, label)
|
||||
end
|
||||
end)
|
||||
|
||||
frame:Connect(ID_STEP, wx.wxEVT_COMMAND_MENU_SELECTED,
|
||||
function (event)
|
||||
ClearAllCurrentLineMarkers()
|
||||
function ()
|
||||
debugger.step()
|
||||
end)
|
||||
frame:Connect(ID_STEP, wx.wxEVT_UPDATE_UI,
|
||||
@@ -340,24 +331,22 @@ frame:Connect(ID_STEP, wx.wxEVT_UPDATE_UI,
|
||||
and (editor ~= nil) and (not debugger.scratchpad))
|
||||
end)
|
||||
|
||||
frame:Connect(ID_STEP_OVER, wx.wxEVT_COMMAND_MENU_SELECTED,
|
||||
function (event)
|
||||
ClearAllCurrentLineMarkers()
|
||||
frame:Connect(ID_STEPOVER, wx.wxEVT_COMMAND_MENU_SELECTED,
|
||||
function ()
|
||||
debugger.over()
|
||||
end)
|
||||
frame:Connect(ID_STEP_OVER, wx.wxEVT_UPDATE_UI,
|
||||
frame:Connect(ID_STEPOVER, wx.wxEVT_UPDATE_UI,
|
||||
function (event)
|
||||
local editor = GetEditor()
|
||||
event:Enable((debugger.server ~= nil) and (not debugger.running)
|
||||
and (editor ~= nil) and (not debugger.scratchpad))
|
||||
end)
|
||||
|
||||
frame:Connect(ID_STEP_OUT, wx.wxEVT_COMMAND_MENU_SELECTED,
|
||||
function (event)
|
||||
ClearAllCurrentLineMarkers()
|
||||
frame:Connect(ID_STEPOUT, wx.wxEVT_COMMAND_MENU_SELECTED,
|
||||
function ()
|
||||
debugger.out()
|
||||
end)
|
||||
frame:Connect(ID_STEP_OUT, wx.wxEVT_UPDATE_UI,
|
||||
frame:Connect(ID_STEPOUT, wx.wxEVT_UPDATE_UI,
|
||||
function (event)
|
||||
local editor = GetEditor()
|
||||
event:Enable((debugger.server ~= nil) and (not debugger.running)
|
||||
@@ -365,8 +354,7 @@ frame:Connect(ID_STEP_OUT, wx.wxEVT_UPDATE_UI,
|
||||
end)
|
||||
|
||||
frame:Connect(ID_TRACE, wx.wxEVT_COMMAND_MENU_SELECTED,
|
||||
function (event)
|
||||
ClearAllCurrentLineMarkers()
|
||||
function ()
|
||||
debugger.trace()
|
||||
end)
|
||||
frame:Connect(ID_TRACE, wx.wxEVT_UPDATE_UI,
|
||||
@@ -377,16 +365,21 @@ frame:Connect(ID_TRACE, wx.wxEVT_UPDATE_UI,
|
||||
end)
|
||||
|
||||
frame:Connect(ID_BREAK, wx.wxEVT_COMMAND_MENU_SELECTED,
|
||||
function (event)
|
||||
function ()
|
||||
if debugger.server then
|
||||
debugger.breaknow()
|
||||
if debugger.scratchpad then
|
||||
debugger.scratchpad.paused = true
|
||||
ShellSupportRemote(debugger.shell)
|
||||
end
|
||||
end
|
||||
end)
|
||||
frame:Connect(ID_BREAK, wx.wxEVT_UPDATE_UI,
|
||||
function (event)
|
||||
local editor = GetEditor()
|
||||
event:Enable((debugger.server ~= nil) and (debugger.running)
|
||||
and (editor ~= nil) and (not debugger.scratchpad))
|
||||
event:Enable((debugger.server ~= nil) and (editor ~= nil)
|
||||
and (debugger.running
|
||||
or (debugger.scratchpad and not debugger.scratchpad.paused)))
|
||||
end)
|
||||
|
||||
frame:Connect(wx.wxEVT_IDLE,
|
||||
|
||||
@@ -10,18 +10,18 @@ local menuBar = frame.menuBar
|
||||
local findReplace = ide.findReplace
|
||||
|
||||
local findMenu = wx.wxMenu{
|
||||
{ ID_FIND, "&Find\tCtrl-F", "Find the specified text" },
|
||||
{ ID_FINDNEXT, "Find &Next\tF3", "Find the next occurrence of the specified text" },
|
||||
{ ID_FINDPREV, "Find &Previous\tShift-F3", "Repeat the search backwards in the file" },
|
||||
{ ID_REPLACE, "&Replace\tCtrl-R", "Replaces the specified text with different text" },
|
||||
{ ID_FIND, TR("&Find")..KSC(ID_FIND), TR("Find text") },
|
||||
{ ID_FINDNEXT, TR("Find &Next")..KSC(ID_FINDNEXT), TR("Find the next text occurrence") },
|
||||
{ ID_FINDPREV, TR("Find &Previous")..KSC(ID_FINDPREV), TR("Find the earlier text occurence") },
|
||||
{ ID_REPLACE, TR("&Replace")..KSC(ID_REPLACE), TR("Find and replace text") },
|
||||
{ },
|
||||
{ ID_FIND_IN_FILES, "Find &In Files\tCtrl-Shift-F", " Find specified text in files"},
|
||||
{ ID_REPLACE_IN_FILES, "Re&place In Files\tCtrl-Shift-R", " Replace specified text in files"},
|
||||
{ ID_FINDINFILES, TR("Find &In Files")..KSC(ID_FINDINFILES), TR("Find text in files") },
|
||||
{ ID_REPLACEINFILES, TR("Re&place In Files")..KSC(ID_REPLACEINFILES), TR("Find and replace text in files") },
|
||||
{ },
|
||||
{ ID_GOTOLINE, "&Goto line\tCtrl-G", "Go to a selected line" },
|
||||
{ ID_GOTOLINE, TR("&Goto Line")..KSC(ID_GOTOLINE), TR("Go to a selected line") },
|
||||
{ },
|
||||
{ ID_SORT, "&Sort", "Sort selected lines"}}
|
||||
menuBar:Append(findMenu, "&Search")
|
||||
{ ID_SORT, TR("&Sort")..KSC(ID_SORT), TR("Sort selected lines") }}
|
||||
menuBar:Append(findMenu, TR("&Search"))
|
||||
|
||||
function OnUpdateUISearchMenu(event) event:Enable(GetEditor() ~= nil) end
|
||||
|
||||
@@ -39,12 +39,12 @@ frame:Connect(ID_REPLACE, wx.wxEVT_COMMAND_MENU_SELECTED,
|
||||
end)
|
||||
frame:Connect(ID_REPLACE, wx.wxEVT_UPDATE_UI, OnUpdateUISearchMenu)
|
||||
|
||||
frame:Connect(ID_FIND_IN_FILES, wx.wxEVT_COMMAND_MENU_SELECTED,
|
||||
frame:Connect(ID_FINDINFILES, wx.wxEVT_COMMAND_MENU_SELECTED,
|
||||
function (event)
|
||||
findReplace:GetSelectedString()
|
||||
findReplace:Show(false,true)
|
||||
end)
|
||||
frame:Connect(ID_REPLACE_IN_FILES, wx.wxEVT_COMMAND_MENU_SELECTED,
|
||||
frame:Connect(ID_REPLACEINFILES, wx.wxEVT_COMMAND_MENU_SELECTED,
|
||||
function (event)
|
||||
findReplace:GetSelectedString()
|
||||
findReplace:Show(true,true)
|
||||
@@ -67,9 +67,9 @@ frame:Connect(ID_GOTOLINE, wx.wxEVT_COMMAND_MENU_SELECTED,
|
||||
local editor = GetEditor()
|
||||
local linecur = editor:LineFromPosition(editor:GetCurrentPos())
|
||||
local linemax = editor:LineFromPosition(editor:GetLength()) + 1
|
||||
local linenum = wx.wxGetNumberFromUser( "Enter line number",
|
||||
local linenum = wx.wxGetNumberFromUser(TR("Enter line number"),
|
||||
"1 .. "..tostring(linemax),
|
||||
"Goto Line",
|
||||
TR("Goto Line"),
|
||||
linecur, 1, linemax,
|
||||
frame)
|
||||
if linenum > 0 then
|
||||
|
||||
@@ -46,7 +46,7 @@ do
|
||||
local exec = tool.exec
|
||||
if (exec and cnt < maxcnt and exec.name and exec.fn and exec.description) then
|
||||
local id = ID("tools.exec."..tool.fname)
|
||||
table.insert(toolArgs,{id , exec.name.."\tCtrl-"..cnt, exec.description})
|
||||
table.insert(toolArgs,{id , exec.name, exec.description})
|
||||
-- flag it
|
||||
tool._execid = id
|
||||
cnt = cnt + 1
|
||||
|
||||
@@ -7,48 +7,38 @@ local menuBar = frame.menuBar
|
||||
local uimgr = frame.uimgr
|
||||
|
||||
local viewMenu = wx.wxMenu {
|
||||
-- NYI { ID "view.preferences", "&Preferences...", "Brings up dialog for settings (TODO)" },
|
||||
-- NYI { },
|
||||
{ ID "view.filetree.show", "Project/&FileTree Window\tCtrl-Shift-P", "View the project/filetree window" },
|
||||
{ ID "view.output.show", "&Output/Console Window\tCtrl-Shift-O", "View the output/console window" },
|
||||
{ ID_VIEWWATCHWINDOW, "&Watch Window\tCtrl-Shift-W", "View the Watch window" },
|
||||
{ ID_VIEWCALLSTACK, "&Stack Window\tCtrl-Shift-S", "View the Stack window" },
|
||||
{ ID_VIEWFILETREE, TR("Project/&FileTree Window")..KSC(ID_VIEWFILETREE), TR("View the project/filetree window") },
|
||||
{ ID_VIEWOUTPUT, TR("&Output/Console Window")..KSC(ID_VIEWOUTPUT), TR("View the output/console window") },
|
||||
{ ID_VIEWWATCHWINDOW, TR("&Watch Window")..KSC(ID_VIEWWATCHWINDOW), TR("View the watch window") },
|
||||
{ ID_VIEWCALLSTACK, TR("&Stack Window")..KSC(ID_VIEWCALLSTACK), TR("View the stack window") },
|
||||
{ },
|
||||
{ ID "view.defaultlayout", "&Default Layout", "Reset to default layout"},
|
||||
{ ID_FULLSCREEN, "Full &Screen\tCtrl-Shift-A", "Switch to or from full screen mode"},
|
||||
{ ID "view.style.loadconfig", "&Load Config Style...", "Load and apply style from config file (must contain .styles)"},
|
||||
{ ID_VIEWDEFAULTLAYOUT, TR("&Default Layout")..KSC(ID_VIEWDEFAULTLAYOUT), TR("Reset to default layout") },
|
||||
{ ID_VIEWFULLSCREEN, TR("Full &Screen")..KSC(ID_VIEWFULLSCREEN), TR("Switch to or from full screen mode") },
|
||||
}
|
||||
menuBar:Append(viewMenu, "&View")
|
||||
menuBar:Append(viewMenu, TR("&View"))
|
||||
|
||||
--frame:Connect(ID "view.preferences", wx.wxEVT_COMMAND_MENU_SELECTED,preferencesDialog.show)
|
||||
|
||||
frame:Connect(ID "view.style.loadconfig", wx.wxEVT_COMMAND_MENU_SELECTED,
|
||||
function (event)
|
||||
LoadConfigStyle()
|
||||
end)
|
||||
|
||||
frame:Connect(ID "view.defaultlayout", wx.wxEVT_COMMAND_MENU_SELECTED,
|
||||
frame:Connect(ID_VIEWDEFAULTLAYOUT, wx.wxEVT_COMMAND_MENU_SELECTED,
|
||||
function (event)
|
||||
uimgr:LoadPerspective(uimgr.defaultPerspective)
|
||||
uimgr:Update()
|
||||
end)
|
||||
|
||||
frame:Connect(ID "view.output.show", wx.wxEVT_COMMAND_MENU_SELECTED,
|
||||
function (event)
|
||||
frame:Connect(ID_VIEWOUTPUT, wx.wxEVT_COMMAND_MENU_SELECTED,
|
||||
function ()
|
||||
uimgr:GetPane("bottomnotebook"):Show(true)
|
||||
uimgr:Update()
|
||||
end)
|
||||
|
||||
frame:Connect(ID "view.filetree.show", wx.wxEVT_COMMAND_MENU_SELECTED,
|
||||
function (event)
|
||||
frame:Connect(ID_VIEWFILETREE, wx.wxEVT_COMMAND_MENU_SELECTED,
|
||||
function ()
|
||||
uimgr:GetPane("projpanel"):Show(true)
|
||||
uimgr:Update()
|
||||
end)
|
||||
|
||||
frame:Connect(ID_FULLSCREEN, wx.wxEVT_COMMAND_MENU_SELECTED, function ()
|
||||
frame:Connect(ID_VIEWFULLSCREEN, wx.wxEVT_COMMAND_MENU_SELECTED, function ()
|
||||
pcall(function() ShowFullScreen(not frame:IsFullScreen()) end)
|
||||
end)
|
||||
frame:Connect(ID_FULLSCREEN, wx.wxEVT_UPDATE_UI,
|
||||
frame:Connect(ID_VIEWFULLSCREEN, wx.wxEVT_UPDATE_UI,
|
||||
function (event) event:Enable(GetEditor() ~= nil) end)
|
||||
|
||||
frame:Connect(ID_VIEWWATCHWINDOW, wx.wxEVT_COMMAND_MENU_SELECTED,
|
||||
|
||||
@@ -9,8 +9,9 @@ local errorlog = bottomnotebook.errorlog
|
||||
|
||||
-------
|
||||
-- setup errorlog
|
||||
local INPUT_MARKER = 3
|
||||
local INPUT_MARKER_VALUE = 2^INPUT_MARKER
|
||||
local MESSAGE_MARKER = StylesGetMarker("message")
|
||||
local PROMPT_MARKER = StylesGetMarker("prompt")
|
||||
local PROMPT_MARKER_VALUE = 2^PROMPT_MARKER
|
||||
|
||||
errorlog:Show(true)
|
||||
errorlog:SetFont(ide.font.oNormal)
|
||||
@@ -18,9 +19,8 @@ errorlog:StyleSetFont(wxstc.wxSTC_STYLE_DEFAULT, ide.font.oNormal)
|
||||
errorlog:StyleClearAll()
|
||||
errorlog:SetMarginWidth(1, 16) -- marker margin
|
||||
errorlog:SetMarginType(1, wxstc.wxSTC_MARGIN_SYMBOL);
|
||||
errorlog:MarkerDefine(CURRENT_LINE_MARKER, wxstc.wxSTC_MARK_ARROWS, wx.wxBLACK, wx.wxWHITE)
|
||||
errorlog:MarkerDefine(INPUT_MARKER, wxstc.wxSTC_MARK_CHARACTER+string.byte('>'),
|
||||
wx.wxColour(127, 127, 127), wx.wxColour(240, 240, 240))
|
||||
errorlog:MarkerDefine(StylesGetMarker("message"))
|
||||
errorlog:MarkerDefine(StylesGetMarker("prompt"))
|
||||
errorlog:SetReadOnly(true)
|
||||
StylesApplyToEditor(ide.config.stylesoutshell,errorlog,ide.font.oNormal,ide.font.oItalic)
|
||||
|
||||
@@ -46,9 +46,13 @@ function DisplayOutputNoMarker(...)
|
||||
errorlog:GotoPos(errorlog:GetLength())
|
||||
end
|
||||
function DisplayOutput(...)
|
||||
errorlog:MarkerAdd(errorlog:GetLineCount()-1, CURRENT_LINE_MARKER)
|
||||
errorlog:MarkerAdd(errorlog:GetLineCount()-1, MESSAGE_MARKER)
|
||||
DisplayOutputNoMarker(...)
|
||||
end
|
||||
function DisplayOutputLn(...)
|
||||
DisplayOutput(...)
|
||||
DisplayOutputNoMarker("\n")
|
||||
end
|
||||
|
||||
local streamins = {}
|
||||
local streamerrs = {}
|
||||
@@ -88,14 +92,16 @@ local function unHideWindow(pidAssign)
|
||||
if pid and winapi then
|
||||
local wins = winapi.find_all_windows(function(w)
|
||||
return w:get_process():get_pid() == pid
|
||||
and ide.config.unhidewindow[w:get_class_name()]
|
||||
end)
|
||||
local any = ide.interpreter.unhideanywindow
|
||||
local show, hide, ignore = 1, 2, 0
|
||||
for _,win in pairs(wins) do
|
||||
-- win:get_class_name() can return nil if the window is already gone
|
||||
-- between getting the list and this check
|
||||
local show = (ide.config.unhidewindow[win:get_class_name()] or 0) > 0
|
||||
if show and not win:is_visible()
|
||||
or not show and win:is_visible() then
|
||||
-- between getting the list and this check.
|
||||
local action = ide.config.unhidewindow[win:get_class_name()]
|
||||
or (any and show or ignore)
|
||||
if action == show and not win:is_visible()
|
||||
or action == hide and win:is_visible() then
|
||||
-- use show_async call (ShowWindowAsync) to avoid blocking the IDE
|
||||
-- if the app is busy or is being debugged
|
||||
win:show_async(show and winapi.SW_SHOW or winapi.SW_HIDE)
|
||||
@@ -124,12 +130,12 @@ function CommandLineRun(cmd,wdir,tooutput,nohide,stringcallback,uid,endcallback)
|
||||
uid = uid or exename
|
||||
|
||||
if (CommandLineRunning(uid)) then
|
||||
DisplayOutput(("Program can't start because conflicting process is running as '%s'.\n")
|
||||
DisplayOutputLn(TR("Program can't start because conflicting process is running as '%s'.")
|
||||
:format(cmd))
|
||||
return
|
||||
end
|
||||
|
||||
DisplayOutput(("Program starting as '%s'.\n"):format(cmd))
|
||||
DisplayOutputLn(TR("Program starting as '%s'."):format(cmd))
|
||||
|
||||
local proc = wx.wxProcess(errorlog)
|
||||
if (tooutput) then proc:Redirect() end -- redirect the output if requested
|
||||
@@ -154,11 +160,11 @@ function CommandLineRun(cmd,wdir,tooutput,nohide,stringcallback,uid,endcallback)
|
||||
-- The return value of -1 in this case indicates that we didn't launch
|
||||
-- a new process, but connected to the running one (e.g. DDE under Windows).
|
||||
if not pid or pid == -1 or pid == 0 then
|
||||
DisplayOutput(("Program unable to run as '%s'\n"):format(cmd))
|
||||
DisplayOutputLn(TR("Program unable to run as '%s'."):format(cmd))
|
||||
return
|
||||
end
|
||||
|
||||
DisplayOutput(("Program '%s' started in '%s' (pid: %d).\n")
|
||||
DisplayOutputLn(TR("Program '%s' started in '%s' (pid: %d).")
|
||||
:format(uid, (wdir and wdir or wx.wxFileName.GetCwd()), pid))
|
||||
customprocs[pid] = {proc=proc, uid=uid, endcallback=endcallback, started = TimeGet()}
|
||||
|
||||
@@ -176,7 +182,7 @@ function CommandLineRun(cmd,wdir,tooutput,nohide,stringcallback,uid,endcallback)
|
||||
end
|
||||
|
||||
unHideWindow(pid)
|
||||
nameTab(errorlog, "Output (running)")
|
||||
nameTab(errorlog, TR("Output (running)"))
|
||||
|
||||
return pid
|
||||
end
|
||||
@@ -184,7 +190,7 @@ end
|
||||
local inputBound -- to track where partial output ends for input editing purposes
|
||||
local function getInputLine()
|
||||
local totalLines = errorlog:GetLineCount()
|
||||
return errorlog:MarkerPrevious(totalLines+1, INPUT_MARKER_VALUE)
|
||||
return errorlog:MarkerPrevious(totalLines+1, PROMPT_MARKER_VALUE)
|
||||
end
|
||||
local function getInputText(bound)
|
||||
return errorlog:GetTextRange(
|
||||
@@ -192,8 +198,8 @@ local function getInputText(bound)
|
||||
end
|
||||
local function updateInputMarker()
|
||||
local lastline = errorlog:GetLineCount()-1
|
||||
errorlog:MarkerDeleteAll(INPUT_MARKER)
|
||||
errorlog:MarkerAdd(lastline, INPUT_MARKER)
|
||||
errorlog:MarkerDeleteAll(PROMPT_MARKER)
|
||||
errorlog:MarkerAdd(lastline, PROMPT_MARKER)
|
||||
inputBound = #getInputText()
|
||||
end
|
||||
|
||||
@@ -246,13 +252,13 @@ errorlog:Connect(wx.wxEVT_END_PROCESS, function(event)
|
||||
if (pid ~= -1) then
|
||||
getStreams()
|
||||
-- delete markers and set focus to the editor if there is an input marker
|
||||
if errorlog:MarkerPrevious(errorlog:GetLineCount(), INPUT_MARKER_VALUE) > -1 then
|
||||
errorlog:MarkerDeleteAll(INPUT_MARKER)
|
||||
if errorlog:MarkerPrevious(errorlog:GetLineCount(), PROMPT_MARKER_VALUE) > -1 then
|
||||
errorlog:MarkerDeleteAll(PROMPT_MARKER)
|
||||
local editor = GetEditor()
|
||||
-- check if editor still exists; it may not if the window is closed
|
||||
if editor then editor:SetFocus() end
|
||||
end
|
||||
nameTab(errorlog, "Output")
|
||||
nameTab(errorlog, TR("Output"))
|
||||
local runtime = TimeGet() - customprocs[pid].started
|
||||
|
||||
streamins[pid] = nil
|
||||
@@ -264,7 +270,7 @@ errorlog:Connect(wx.wxEVT_END_PROCESS, function(event)
|
||||
customprocs[pid] = nil
|
||||
unHideWindow(0)
|
||||
DebuggerStop()
|
||||
DisplayOutput(("Program completed in %.2f seconds (pid: %d).\n")
|
||||
DisplayOutputLn(TR("Program completed in %.2f seconds (pid: %d).")
|
||||
:format(runtime, pid))
|
||||
end
|
||||
end)
|
||||
|
||||
@@ -306,25 +306,19 @@ local function loadNotebook(nb,str,fnIdConvert)
|
||||
local sel = nb:GetSelection()
|
||||
|
||||
-- store old pages
|
||||
local currentpages = {}
|
||||
local currentpages, order = {}, {}
|
||||
for i=1,cnt do
|
||||
local id = nb:GetPageText(i-1)
|
||||
local newid = fnIdConvert and fnIdConvert(id) or id
|
||||
currentpages[newid] = currentpages[newid] or {}
|
||||
table.insert(currentpages[newid], {page = nb:GetPage(i-1), text = id, index = i-1})
|
||||
end
|
||||
|
||||
-- remove them
|
||||
for i=cnt,1,-1 do
|
||||
nb:RemovePage(i-1)
|
||||
order[i] = newid
|
||||
end
|
||||
|
||||
-- remove them
|
||||
for i=cnt,1,-1 do nb:RemovePage(i-1) end
|
||||
|
||||
-- read them and perform splits
|
||||
local direction
|
||||
local splits = {
|
||||
X = wx.wxRIGHT,
|
||||
Y = wx.wxBOTTOM,
|
||||
}
|
||||
local t = 0
|
||||
local newsel
|
||||
local function finishPage(page)
|
||||
@@ -333,7 +327,9 @@ local function loadNotebook(nb,str,fnIdConvert)
|
||||
end
|
||||
t = t + 1
|
||||
end
|
||||
|
||||
|
||||
local direction
|
||||
local splits = { X = wx.wxRIGHT, Y = wx.wxBOTTOM }
|
||||
for cmd in str:gmatch("([^|]+)") do
|
||||
local instr = cmd:match("<(%w)>")
|
||||
if (not instr) then
|
||||
@@ -351,17 +347,17 @@ local function loadNotebook(nb,str,fnIdConvert)
|
||||
direction = instr and splits[instr]
|
||||
end
|
||||
|
||||
-- add anything we forgot
|
||||
for _,pagelist in pairs(currentpages) do
|
||||
-- add anything we forgot; make sure page groups are in the order specified
|
||||
for i=1,cnt do
|
||||
local pagelist = currentpages[order[i]]
|
||||
for _,page in pairs(pagelist) do
|
||||
nb:AddPage(page.page, page.text)
|
||||
finishPage(page)
|
||||
end
|
||||
end
|
||||
|
||||
if (newsel) then
|
||||
nb:SetSelection(newsel)
|
||||
end
|
||||
-- set the active page as it was before
|
||||
if (newsel) then nb:SetSelection(newsel) end
|
||||
end
|
||||
|
||||
function SettingsRestoreView()
|
||||
@@ -376,6 +372,10 @@ function SettingsRestoreView()
|
||||
local layout = settingsReadSafe(settings,"uimgrlayout",layoutcur)
|
||||
if (layout ~= layoutcur) then
|
||||
uimgr:LoadPerspective(layout)
|
||||
-- unfortunately need to explicitly (re-)assign the caption,
|
||||
-- as it's going to be restored from the config regardless of how
|
||||
-- it is set now (which affects its translation)
|
||||
uimgr:GetPane("projpanel"):Caption(TR("Project"))
|
||||
uimgr:Update()
|
||||
end
|
||||
|
||||
@@ -395,7 +395,9 @@ function SettingsRestoreView()
|
||||
local layout = settingsReadSafe(settings,"nbbtmlayout",layoutcur)
|
||||
if (layout ~= layoutcur) then
|
||||
loadNotebook(ide.frame.bottomnotebook,layout,
|
||||
function(name) return name:match("Output") or name end)
|
||||
-- treat "Output (running)" same as "Output"
|
||||
function(name) return
|
||||
name:match(TR("Output")) or name:match("Output") or name end)
|
||||
end
|
||||
|
||||
settings:SetPath(path)
|
||||
|
||||
@@ -7,10 +7,14 @@ local ide = ide
|
||||
|
||||
local bottomnotebook = ide.frame.bottomnotebook
|
||||
local out = bottomnotebook.shellbox
|
||||
|
||||
local OUTPUT_MARKER = 3
|
||||
local remotesend
|
||||
|
||||
local PROMPT_MARKER = StylesGetMarker("prompt")
|
||||
local PROMPT_MARKER_VALUE = 2^PROMPT_MARKER
|
||||
local ERROR_MARKER = StylesGetMarker("error")
|
||||
local OUTPUT_MARKER = StylesGetMarker("output")
|
||||
local MESSAGE_MARKER = StylesGetMarker("message")
|
||||
|
||||
out:SetFont(ide.font.oNormal)
|
||||
out:StyleSetFont(wxstc.wxSTC_STYLE_DEFAULT, ide.font.oNormal)
|
||||
out:StyleClearAll()
|
||||
@@ -27,16 +31,17 @@ out:SetWrapStartIndent(0)
|
||||
out:SetWrapVisualFlagsLocation(wxstc.wxSTC_WRAPVISUALFLAGLOC_END_BY_TEXT)
|
||||
out:SetWrapVisualFlags(wxstc.wxSTC_WRAPVISUALFLAG_END)
|
||||
|
||||
out:MarkerDefine(CURRENT_LINE_MARKER, wxstc.wxSTC_MARK_CHARACTER+string.byte('>'), wx.wxBLACK, wx.wxColour(240, 240, 240))
|
||||
out:MarkerDefine(BREAKPOINT_MARKER, wxstc.wxSTC_MARK_BACKGROUND, wx.wxBLACK, wx.wxColour(255, 220, 220))
|
||||
out:MarkerDefine(OUTPUT_MARKER, wxstc.wxSTC_MARK_BACKGROUND, wx.wxBLACK, wx.wxColour(240, 240, 240))
|
||||
out:MarkerDefine(StylesGetMarker("prompt"))
|
||||
out:MarkerDefine(StylesGetMarker("error"))
|
||||
out:MarkerDefine(StylesGetMarker("output"))
|
||||
out:MarkerDefine(StylesGetMarker("message"))
|
||||
out:SetReadOnly(false)
|
||||
|
||||
SetupKeywords(out,"lua",nil,ide.config.stylesoutshell,ide.font.oNormal,ide.font.oItalic)
|
||||
|
||||
local function getPromptLine()
|
||||
local totalLines = out:GetLineCount()
|
||||
return out:MarkerPrevious(totalLines+1, CURRENT_LINE_MARKER_VALUE)
|
||||
return out:MarkerPrevious(totalLines+1, PROMPT_MARKER_VALUE)
|
||||
end
|
||||
|
||||
local function getPromptText()
|
||||
@@ -84,13 +89,13 @@ local function getNextHistoryLine(forward, promptText)
|
||||
if currentHistory == nil then currentHistory = count end
|
||||
|
||||
if forward then
|
||||
currentHistory = out:MarkerNext(currentHistory+1, CURRENT_LINE_MARKER_VALUE)
|
||||
currentHistory = out:MarkerNext(currentHistory+1, PROMPT_MARKER_VALUE)
|
||||
if currentHistory == -1 then
|
||||
currentHistory = count
|
||||
return ""
|
||||
end
|
||||
else
|
||||
currentHistory = out:MarkerPrevious(currentHistory-1, CURRENT_LINE_MARKER_VALUE)
|
||||
currentHistory = out:MarkerPrevious(currentHistory-1, PROMPT_MARKER_VALUE)
|
||||
if currentHistory == -1 then
|
||||
currentHistory = -1
|
||||
return ""
|
||||
@@ -127,11 +132,11 @@ local function shellPrint(marker, ...)
|
||||
local linesAdded = out:GetLineCount() - lines
|
||||
|
||||
if marker then
|
||||
if promptLine then out:MarkerDelete(promptLine, CURRENT_LINE_MARKER) end
|
||||
if promptLine then out:MarkerDelete(promptLine, PROMPT_MARKER) end
|
||||
for line = insertLineAt, insertLineAt + linesAdded - 1 do
|
||||
out:MarkerAdd(line, marker)
|
||||
end
|
||||
if promptLine then out:MarkerAdd(promptLine+linesAdded, CURRENT_LINE_MARKER) end
|
||||
if promptLine then out:MarkerAdd(promptLine+linesAdded, PROMPT_MARKER) end
|
||||
end
|
||||
|
||||
out:EmptyUndoBuffer() -- don't allow the user to undo shell text
|
||||
@@ -143,14 +148,17 @@ DisplayShell = function (...)
|
||||
shellPrint(OUTPUT_MARKER, ...)
|
||||
end
|
||||
DisplayShellErr = function (...)
|
||||
shellPrint(BREAKPOINT_MARKER, ...)
|
||||
shellPrint(ERROR_MARKER, ...)
|
||||
end
|
||||
DisplayShellMsg = function (...)
|
||||
shellPrint(MESSAGE_MARKER, ...)
|
||||
end
|
||||
DisplayShellDirect = function (...)
|
||||
shellPrint(nil, ...)
|
||||
end
|
||||
DisplayShellPrompt = function (...)
|
||||
-- don't print anything; just mark the line with a prompt mark
|
||||
out:MarkerAdd(out:GetLineCount()-1, CURRENT_LINE_MARKER)
|
||||
out:MarkerAdd(out:GetLineCount()-1, PROMPT_MARKER)
|
||||
end
|
||||
|
||||
local function filterTraceError(err, addedret)
|
||||
@@ -308,7 +316,7 @@ function ShellSupportRemote(client)
|
||||
local index = bottomnotebook:GetPageIndex(out)
|
||||
if index then
|
||||
bottomnotebook:SetPageText(index,
|
||||
client and "Remote console" or "Local console")
|
||||
client and TR("Remote console") or TR("Local console"))
|
||||
end
|
||||
end
|
||||
|
||||
@@ -329,9 +337,11 @@ function ShellExecuteCode(code)
|
||||
end
|
||||
|
||||
local function displayShellIntro()
|
||||
DisplayShellDirect([[Welcome to the interactive Lua interpreter.
|
||||
Enter Lua code and press Enter to run it. Use Shift-Enter for multiline code.
|
||||
Use 'clear' to clear the shell output and the history. Prepend '=' to show complex values on multiple lines.]])
|
||||
DisplayShellMsg(TR("Welcome to the interactive Lua interpreter.").."\n"
|
||||
..TR("Enter Lua code and press Enter to run it.").." "
|
||||
..TR("Use Shift-Enter for multiline code.").."\n"
|
||||
..TR("Use 'clear' to clear the shell output and the history.").." "
|
||||
..TR("Prepend '=' to show complex values on multiple lines."))
|
||||
DisplayShellPrompt('')
|
||||
end
|
||||
|
||||
|
||||
@@ -50,8 +50,13 @@ if success then -- ok, server was started, we are solo
|
||||
svr:sendto(protocol.server.answerok,ip,port)
|
||||
local filename = msg:match(protocol.client.requestloading:gsub("%%s","(.+)$"))
|
||||
if filename then
|
||||
if LoadFile(filename, nil, true)
|
||||
then ide.frame:RequestUserAttention() -- let's let the user know we want his attention
|
||||
if LoadFile(filename, nil, true) then
|
||||
local frame = ide.frame
|
||||
frame:Iconize(false)
|
||||
frame:Raise()
|
||||
frame:Show(true)
|
||||
frame:SetFocus()
|
||||
frame:RequestUserAttention()
|
||||
else DisplayOutput("Can't open requested file '"..filename.."'.\n") end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -19,48 +19,68 @@
|
||||
function StylesGetDefault()
|
||||
return {
|
||||
-- lexer specific (inherit fg/bg from text)
|
||||
lexerdef = {fg = {128, 128, 128},},
|
||||
comment = {fg = {0, 127, 0 },bg = {240, 240, 220}, fill= true,},
|
||||
stringtxt = {fg = {127, 0, 127},},
|
||||
stringeol = {fg = {0, 0, 0 },bg = {224, 192, 224}, fill = true, b = true},
|
||||
preprocessor = {fg = {127, 127, 0 },},
|
||||
operator = {fg = {0, 0, 0 },},
|
||||
number = {fg = {90, 100, 0 },},
|
||||
lexerdef = {fg = {128, 128, 128}},
|
||||
comment = {fg = {32, 127, 32}, bg = {250, 250, 240}, fill= true},
|
||||
stringtxt = {fg = {127, 0, 127}},
|
||||
stringeol = {fg = {0, 0, 0}, bg = {224, 192, 224}, fill = true},
|
||||
preprocessor = {fg = {127, 127, 0}},
|
||||
operator = {fg = {0, 0, 0}},
|
||||
number = {fg = {90, 0, 255}},
|
||||
|
||||
keywords0 = {fg = {0, 0, 127}, b = true,},
|
||||
keywords1 = {fg = {127, 0, 0},},
|
||||
keywords2 = {fg = {0, 127, 0},},
|
||||
keywords3 = {fg = {0, 0, 127},},
|
||||
keywords4 = {fg = {127, 0, 95},},
|
||||
keywords5 = {fg = {35, 95, 175},},
|
||||
keywords6 = {fg = {0, 127, 127},},
|
||||
keywords7 = {fg = {240, 255, 255},},
|
||||
keywords0 = {fg = {0, 0, 127}, b = true},
|
||||
keywords1 = {fg = {127, 0, 0}, b = true},
|
||||
keywords2 = {fg = {0, 127, 0}, b = true},
|
||||
keywords3 = {fg = {0, 0, 127}, b = true},
|
||||
keywords4 = {fg = {127, 0, 95}, b = true},
|
||||
keywords5 = {fg = {35, 95, 175}, b = true},
|
||||
keywords6 = {fg = {0, 127, 127}, b = true},
|
||||
keywords7 = {fg = {240, 255, 255}, b = true},
|
||||
|
||||
-- common (inherit fg/bg from text)
|
||||
text = nil, -- let os pick
|
||||
linenumber = {fg = {192, 192, 192},},
|
||||
linenumber = {fg = {90, 90, 80}, bg = {240, 240, 240}},
|
||||
bracematch = {fg = {0, 0, 255}, b = true},
|
||||
bracemiss = {fg = {255, 0, 0 }, b = true},
|
||||
escapechar = nil,
|
||||
indent = {fg = {192, 192, 192},bg = {255, 255, 255},},
|
||||
ctrlchar = nil,
|
||||
indent = {fg = {192, 192, 192}, bg = {255, 255, 255}},
|
||||
calltip = nil,
|
||||
|
||||
-- common special (need custom fg & bg )
|
||||
-- common special (need custom fg & bg)
|
||||
calltipbg = nil,
|
||||
sel = nil,
|
||||
caret = nil,
|
||||
caretlinebg = nil,
|
||||
fold = nil,
|
||||
whitespace = {fg = {180, 180, 180},},
|
||||
sel = {bg = {192, 192, 192}},
|
||||
caret = {fg = {0, 0, 0}},
|
||||
caretlinebg = {bg = {240, 240, 230}},
|
||||
fold = {fg = {90, 90, 80}, bg = {250, 250, 250}},
|
||||
whitespace = nil,
|
||||
|
||||
-- indicators
|
||||
fncall = {fg = {175,175,255}, st= wxstc.wxSTC_INDIC_BOX},
|
||||
fncall = {fg = {175, 175, 255}, st = wxstc.wxSTC_INDIC_TT},
|
||||
|
||||
-- markup
|
||||
['|'] = {fg = {127, 0, 127}},
|
||||
['`'] = {fg = {127, 127, 127}},
|
||||
['['] = {hs = {32, 32, 127}},
|
||||
|
||||
-- markers
|
||||
marker = {
|
||||
currentline = {},
|
||||
breakpoint = {},
|
||||
message = {},
|
||||
output = {},
|
||||
prompt = {},
|
||||
error = {},
|
||||
}
|
||||
}
|
||||
end
|
||||
|
||||
-- used to fill unset bg colors
|
||||
local defaultfg = nil
|
||||
local defaultbg = nil
|
||||
local markers = {
|
||||
breakpoint = {1, wxstc.wxSTC_MARK_CIRCLE, wx.wxColour(220, 0, 0), wx.wxColour(220, 0, 0)},
|
||||
currentline = {2, wxstc.wxSTC_MARK_ARROW, wx.wxBLACK, wx.wxColour(0, 220, 0)},
|
||||
message = {3, wxstc.wxSTC_MARK_CHARACTER+(' '):byte(), wx.wxBLACK, wx.wxColour(220, 220, 220)},
|
||||
output = {4, wxstc.wxSTC_MARK_BACKGROUND, wx.wxBLACK, wx.wxColour(240, 240, 240)},
|
||||
prompt = {5, wxstc.wxSTC_MARK_ARROWS, wx.wxBLACK, wx.wxColour(220, 220, 220)},
|
||||
error = {6, wxstc.wxSTC_MARK_BACKGROUND, wx.wxBLACK, wx.wxColour(255, 220, 220)},
|
||||
}
|
||||
function StylesGetMarker(marker) return unpack(markers[marker] or {}) end
|
||||
|
||||
local function applymarker(editor,marker,clrfg,clrbg)
|
||||
if (clrfg) then
|
||||
@@ -75,23 +95,19 @@ local specialmapping = {
|
||||
if (style.fg) then
|
||||
editor:SetSelForeground(1,wx.wxColour(unpack(style.fg)))
|
||||
else
|
||||
editor:SetSelForeground(0)
|
||||
editor:SetSelForeground(0,wx.wxWHITE)
|
||||
end
|
||||
if (style.bg) then
|
||||
editor:SetSelBackground(1,wx.wxColour(unpack(style.bg)))
|
||||
else
|
||||
editor:SetSelBackground(0)
|
||||
editor:SetSelBackground(0,wx.wxWHITE)
|
||||
end
|
||||
|
||||
end,
|
||||
|
||||
caret = function(editor,style)
|
||||
if (style.fg) then
|
||||
editor:SetCaretForeground(wx.wxColour(unpack(style.fg)))
|
||||
end
|
||||
--if (style.bg) then
|
||||
-- editor:SetCaretBackground(wx.wxColour(unpack(style.bg)))
|
||||
--end
|
||||
end,
|
||||
|
||||
caretlinebg = function(editor,style)
|
||||
@@ -124,13 +140,37 @@ local specialmapping = {
|
||||
local clrbg = style.bg and wx.wxColour(unpack(style.bg))
|
||||
|
||||
if (clrfg or clrbg) then
|
||||
applymarker(editor,wxstc.wxSTC_MARKNUM_FOLDEROPEN, clrfg,clrbg)
|
||||
applymarker(editor,wxstc.wxSTC_MARKNUM_FOLDER, clrfg,clrbg)
|
||||
applymarker(editor,wxstc.wxSTC_MARKNUM_FOLDERSUB, clrfg,clrbg)
|
||||
applymarker(editor,wxstc.wxSTC_MARKNUM_FOLDERTAIL, clrfg,clrbg)
|
||||
applymarker(editor,wxstc.wxSTC_MARKNUM_FOLDEREND, clrfg,clrbg)
|
||||
applymarker(editor,wxstc.wxSTC_MARKNUM_FOLDEROPENMID, clrfg,clrbg)
|
||||
applymarker(editor,wxstc.wxSTC_MARKNUM_FOLDERMIDTAIL, clrfg,clrbg)
|
||||
-- foreground and background are defined as opposite to what I'd expect
|
||||
-- for fold markers in Scintilla's terminilogy:
|
||||
-- background is the color of fold lines/boxes and foreground is the color
|
||||
-- of everything around fold lines or inside fold boxes.
|
||||
-- in the following code fg and bg are simply reversed
|
||||
local clrfg, clrbg = clrbg, clrfg
|
||||
applymarker(editor,wxstc.wxSTC_MARKNUM_FOLDEROPEN, clrfg, clrbg)
|
||||
applymarker(editor,wxstc.wxSTC_MARKNUM_FOLDER, clrfg, clrbg)
|
||||
applymarker(editor,wxstc.wxSTC_MARKNUM_FOLDERSUB, clrfg, clrbg)
|
||||
applymarker(editor,wxstc.wxSTC_MARKNUM_FOLDERTAIL, clrfg, clrbg)
|
||||
applymarker(editor,wxstc.wxSTC_MARKNUM_FOLDEREND, clrfg, clrbg)
|
||||
applymarker(editor,wxstc.wxSTC_MARKNUM_FOLDEROPENMID, clrfg, clrbg)
|
||||
applymarker(editor,wxstc.wxSTC_MARKNUM_FOLDERMIDTAIL, clrfg, clrbg)
|
||||
end
|
||||
if clrbg then
|
||||
-- the earlier calls only color the actual markers, but not the
|
||||
-- overall fold background; SetFoldMargin calls below do this.
|
||||
-- http://community.activestate.com/forum-topic/fold-margin-colors
|
||||
-- http://www.scintilla.org/ScintillaDoc.html#SCI_SETFOLDMARGINCOLOUR
|
||||
editor:SetFoldMarginColour(true, clrbg)
|
||||
editor:SetFoldMarginHiColour(true, clrbg)
|
||||
end
|
||||
end,
|
||||
|
||||
marker = function(editor,markers)
|
||||
for m, style in pairs(markers) do
|
||||
local id, ch, fg, bg = StylesGetMarker(m)
|
||||
if style.ch then ch = style.ch end
|
||||
if style.fg then fg = wx.wxColour(unpack(style.fg)) end
|
||||
if style.bg then bg = wx.wxColour(unpack(style.bg)) end
|
||||
editor:MarkerDefine(id, ch, fg, bg)
|
||||
end
|
||||
end,
|
||||
}
|
||||
@@ -140,12 +180,15 @@ local defaultmapping = {
|
||||
linenumber = wxstc.wxSTC_STYLE_LINENUMBER,
|
||||
bracematch = wxstc.wxSTC_STYLE_BRACELIGHT,
|
||||
bracemiss = wxstc.wxSTC_STYLE_BRACEBAD,
|
||||
escapechar = wxstc.wxSTC_STYLE_CONTROLCHAR,
|
||||
ctrlchar = wxstc.wxSTC_STYLE_CONTROLCHAR,
|
||||
indent = wxstc.wxSTC_STYLE_INDENTGUIDE,
|
||||
calltip = wxstc.wxSTC_STYLE_CALLTIP,
|
||||
}
|
||||
|
||||
function StylesApplyToEditor(styles,editor,font,fontitalic,lexerconvert)
|
||||
local defaultfg = styles.text and styles.text.fg and wx.wxColour(unpack(styles.text.fg)) or nil
|
||||
local defaultbg = styles.text and styles.text.bg and wx.wxColour(unpack(styles.text.bg)) or nil
|
||||
|
||||
local function applystyle(style,id)
|
||||
editor:StyleSetFont(id, style.i and fontitalic or font)
|
||||
editor:StyleSetBold(id, style.b or false)
|
||||
@@ -174,6 +217,7 @@ function StylesApplyToEditor(styles,editor,font,fontitalic,lexerconvert)
|
||||
editor:StyleSetBackground(id, style.bg and wx.wxColour(unpack(style.bg)) or defaultbg)
|
||||
end
|
||||
end
|
||||
|
||||
editor:StyleResetDefault()
|
||||
editor:SetFont(font)
|
||||
if (styles.text) then
|
||||
@@ -183,18 +227,15 @@ function StylesApplyToEditor(styles,editor,font,fontitalic,lexerconvert)
|
||||
end
|
||||
editor:StyleClearAll()
|
||||
|
||||
defaultfg = styles.text and styles.text.fg and wx.wxColour(unpack(styles.text.fg)) or nil
|
||||
defaultbg = styles.text and styles.text.bg and wx.wxColour(unpack(styles.text.bg)) or nil
|
||||
|
||||
for name,style in pairs(styles) do
|
||||
if (specialmapping[name]) then
|
||||
specialmapping[name](editor,style)
|
||||
elseif (defaultmapping[name]) then
|
||||
applystyle(style,defaultmapping[name])
|
||||
end
|
||||
|
||||
if (lexerconvert and lexerconvert[name]) then
|
||||
local targets = lexerconvert[name]
|
||||
|
||||
for n,outid in pairs(targets) do
|
||||
applystyle(style,outid)
|
||||
end
|
||||
@@ -209,11 +250,13 @@ function StylesApplyToEditor(styles,editor,font,fontitalic,lexerconvert)
|
||||
editor:IndicatorSetStyle(0,styles.fncall and styles.fncall.st or wxstc.wxSTC_INDIC_BOX)
|
||||
editor:IndicatorSetForeground(0,wx.wxColour(unpack(styles.fncall and styles.fncall.fg or {128,128,128})))
|
||||
end
|
||||
|
||||
editor:Colourise(0, -1)
|
||||
end
|
||||
|
||||
function ReApplySpecAndStyles()
|
||||
-- re-register markup styles as they are special:
|
||||
-- these styles need to be updated as they are based on comment styles
|
||||
if MarkupAddStyles then MarkupAddStyles(ide.config.styles) end
|
||||
|
||||
local openDocuments = ide.openDocuments
|
||||
for i,doc in pairs(openDocuments) do
|
||||
if (doc.editor.spec) then
|
||||
@@ -229,89 +272,73 @@ function ReApplySpecAndStyles()
|
||||
StylesApplyToEditor(ide.config.stylesoutshell,errorlog,ide.font.oNormal,ide.font.oItalic)
|
||||
end
|
||||
|
||||
function LoadConfigStyle()
|
||||
function ApplyStyleConfig(config, style)
|
||||
if not wx.wxIsAbsolutePath(config)
|
||||
then config = MergeFullPath(GetPathWithSep(ide.editorFilename), config) end
|
||||
|
||||
local cfg = {wxstc = wxstc, math = math, print = DisplayOutputLn,
|
||||
path = {}, editor = {}, view ={}, acandtip = {}, outputshell = {}, debugger={}}
|
||||
local cfgfn, err = loadfile(config)
|
||||
if not cfgfn then
|
||||
DisplayOutputLn(TR("Error while loading configuration file: %s"):format(err))
|
||||
return
|
||||
end
|
||||
|
||||
setfenv(cfgfn,cfg)
|
||||
cfgfn, err = pcall(cfgfn,style)
|
||||
if not cfgfn then
|
||||
DisplayOutputLn(TR("Error while processing configuration file: %s"):format(err))
|
||||
return
|
||||
end
|
||||
|
||||
-- if no style assigned explicitly, but a table is returned, use it
|
||||
if not (cfg.styles or cfg.stylesoutshell) and type(err) == 'table' then
|
||||
cfg.styles = err
|
||||
end
|
||||
|
||||
if cfg.styles or cfg.stylesoutshell then
|
||||
if (cfg.styles) then
|
||||
ide.config.styles = StylesGetDefault()
|
||||
-- copy
|
||||
for i,s in pairs(cfg.styles) do
|
||||
ide.config.styles[i] = s
|
||||
end
|
||||
end
|
||||
if (cfg.stylesoutshell) then
|
||||
ide.config.stylesoutshell = StylesGetDefault()
|
||||
-- copy
|
||||
for i,s in pairs(cfg.stylesoutshell) do
|
||||
ide.config.stylesoutshell[i] = s
|
||||
end
|
||||
end
|
||||
ReApplySpecAndStyles()
|
||||
end
|
||||
end
|
||||
|
||||
function LoadStyleConfig()
|
||||
local fileDialog = wx.wxFileDialog(ide.frame, "Open Config File",
|
||||
"/cfg",
|
||||
"",
|
||||
"Lua file (*.lua)|*.lua|All files (*)|*",
|
||||
wx.wxFD_OPEN + wx.wxFD_FILE_MUST_EXIST)
|
||||
if fileDialog:ShowModal() == wx.wxID_OK then
|
||||
local cfg = {wxstc = wxstc, path = {}, editor = {}, view ={}, acandtip = {}, outputshell = {}, debugger={},}
|
||||
local cfgfn,err = loadfile(fileDialog:GetPath())
|
||||
if cfgfn then
|
||||
setfenv(cfgfn,cfg)
|
||||
cfgfn = xpcall(cfgfn,function(err)DisplayOutput("Error while executing configuration file: \n",debug.traceback(err))end)
|
||||
end
|
||||
|
||||
if not (cfgfn and (cfg.styles or cfg.stylesoutshell)) then
|
||||
wx.wxMessageBox("Unable to load config style '"..fileDialog:GetPath().."'.",
|
||||
"Error",
|
||||
wx.wxOK + wx.wxCENTRE, ide.frame)
|
||||
else
|
||||
if (cfg.styles) then
|
||||
ide.config.styles = StylesGetDefault()
|
||||
-- copy
|
||||
for i,s in pairs(cfg.styles) do
|
||||
ide.config.styles[i] = s
|
||||
end
|
||||
end
|
||||
if (cfg.stylesoutshell) then
|
||||
ide.config.stylesoutshell = StylesGetDefault()
|
||||
-- copy
|
||||
for i,s in pairs(cfg.stylesoutshell) do
|
||||
ide.config.stylesoutshell[i] = s
|
||||
end
|
||||
end
|
||||
ReApplySpecAndStyles()
|
||||
end
|
||||
ApplyStyleConfig(fileDialog:GetPath())
|
||||
end
|
||||
fileDialog:Destroy()
|
||||
|
||||
end
|
||||
|
||||
-- used lexers ?
|
||||
--[=[
|
||||
#define wxSTC_POV_DEFAULT 0
|
||||
#define wxSTC_POV_COMMENT 1
|
||||
#define wxSTC_POV_COMMENTLINE 2
|
||||
#define wxSTC_POV_NUMBER 3
|
||||
#define wxSTC_POV_OPERATOR 4
|
||||
#define wxSTC_POV_IDENTIFIER 5
|
||||
#define wxSTC_POV_STRING 6
|
||||
#define wxSTC_POV_STRINGEOL 7
|
||||
|
||||
%define wxSTC_C_DEFAULT
|
||||
%define wxSTC_C_COMMENT
|
||||
%define wxSTC_C_COMMENTLINE
|
||||
%define wxSTC_C_COMMENTDOC
|
||||
%define wxSTC_C_NUMBER
|
||||
%define wxSTC_C_WORD
|
||||
%define wxSTC_C_STRING
|
||||
%define wxSTC_C_CHARACTER
|
||||
%define wxSTC_C_UUID
|
||||
%define wxSTC_C_PREPROCESSOR
|
||||
%define wxSTC_C_OPERATOR
|
||||
%define wxSTC_C_IDENTIFIER
|
||||
%define wxSTC_C_STRINGEOL
|
||||
%define wxSTC_C_VERBATIM
|
||||
%define wxSTC_C_REGEX
|
||||
%define wxSTC_C_COMMENTLINEDOC
|
||||
%define wxSTC_C_WORD2
|
||||
%define wxSTC_C_COMMENTDOCKEYWORD
|
||||
%define wxSTC_C_COMMENTDOCKEYWORDERROR
|
||||
%define wxSTC_C_GLOBALCLASS
|
||||
|
||||
#define wxSTC_LUA_DEFAULT 0
|
||||
#define wxSTC_LUA_COMMENT 1
|
||||
#define wxSTC_LUA_COMMENTLINE 2
|
||||
#define wxSTC_LUA_COMMENTDOC 3
|
||||
#define wxSTC_LUA_NUMBER 4
|
||||
#define wxSTC_LUA_WORD 5
|
||||
#define wxSTC_LUA_STRING 6
|
||||
#define wxSTC_LUA_CHARACTER 7
|
||||
#define wxSTC_LUA_LITERALSTRING 8
|
||||
#define wxSTC_LUA_PREPROCESSOR 9
|
||||
#define wxSTC_LUA_OPERATOR 10
|
||||
#define wxSTC_LUA_IDENTIFIER 11
|
||||
#define wxSTC_LUA_STRINGEOL 12
|
||||
]=]
|
||||
--[[
|
||||
wxSTC_LUA_DEFAULT 0
|
||||
wxSTC_LUA_COMMENT 1
|
||||
wxSTC_LUA_COMMENTLINE 2
|
||||
wxSTC_LUA_COMMENTDOC 3
|
||||
wxSTC_LUA_NUMBER 4
|
||||
wxSTC_LUA_WORD 5
|
||||
wxSTC_LUA_STRING 6
|
||||
wxSTC_LUA_CHARACTER 7
|
||||
wxSTC_LUA_LITERALSTRING 8
|
||||
wxSTC_LUA_PREPROCESSOR 9
|
||||
wxSTC_LUA_OPERATOR 10
|
||||
wxSTC_LUA_IDENTIFIER 11
|
||||
wxSTC_LUA_STRINGEOL 12
|
||||
--]]
|
||||
|
||||
251
src/main.lua
251
src/main.lua
@@ -43,6 +43,7 @@ ide = {
|
||||
debugger = {
|
||||
verbose = false,
|
||||
hostname = nil,
|
||||
port = nil,
|
||||
},
|
||||
default = {
|
||||
name = 'untitled',
|
||||
@@ -51,6 +52,10 @@ ide = {
|
||||
outputshell = {},
|
||||
filetree = {},
|
||||
|
||||
keymap = {},
|
||||
messages = {},
|
||||
language = "en",
|
||||
|
||||
styles = StylesGetDefault(),
|
||||
stylesoutshell = StylesGetDefault(),
|
||||
interpreter = "_undefined_",
|
||||
@@ -60,6 +65,7 @@ ide = {
|
||||
shorttip = false,
|
||||
ignorecase = false,
|
||||
strategy = 2,
|
||||
width = 60,
|
||||
},
|
||||
|
||||
activateoutput = false, -- activate output/console on Run/Debug/Compile
|
||||
@@ -118,22 +124,37 @@ ide = {
|
||||
}
|
||||
}
|
||||
|
||||
function setLuaPaths(mainpath, os)
|
||||
dofile "src/editor/keymap.lua"
|
||||
|
||||
function setLuaPaths(mainpath, osname)
|
||||
-- use LUA_DEV to setup paths for Lua for Windows modules if installed
|
||||
local luadev = osname == "Windows" and os.getenv('LUA_DEV')
|
||||
local luadev_path = (luadev
|
||||
and ('LUA_DEV/?.lua;LUA_DEV/?/init.lua;LUA_DEV/lua/?.lua;LUA_DEV/lua/?/init.lua')
|
||||
:gsub('LUA_DEV', (luadev:gsub('[\\/]$','')))
|
||||
or "")
|
||||
local luadev_cpath = (luadev
|
||||
and ('LUA_DEV/?.dll;LUA_DEV/clibs/?.dll')
|
||||
:gsub('LUA_DEV', (luadev:gsub('[\\/]$','')))
|
||||
or "")
|
||||
|
||||
-- (luaconf.h) in Windows, any exclamation mark ('!') in the path is replaced
|
||||
-- by the path of the directory of the executable file of the current process.
|
||||
-- this effectively prevents any path with an exclamation mark from working.
|
||||
-- if the path has an excamation mark, allow Lua to expand it as this
|
||||
-- expansion happens only once.
|
||||
if os == "Windows" and mainpath:find('%!') then mainpath = "!/../" end
|
||||
if osname == "Windows" and mainpath:find('%!') then mainpath = "!/../" end
|
||||
wx.wxSetEnv("LUA_PATH", package.path .. ";"
|
||||
.. "./?.lua;./?/init.lua;./lua/?.lua;./lua/?/init.lua;"
|
||||
.. mainpath.."lualibs/?/?.lua;"..mainpath.."lualibs/?.lua")
|
||||
.. "./?.lua;./?/init.lua;./lua/?.lua;./lua/?/init.lua" .. ';'
|
||||
.. mainpath.."lualibs/?/?.lua;"..mainpath.."lualibs/?.lua" .. ';'
|
||||
.. luadev_path)
|
||||
|
||||
local clibs =
|
||||
os == "Windows" and mainpath.."bin/?.dll;"..mainpath.."bin/clibs/?.dll" or
|
||||
os == "Macintosh" and mainpath.."bin/lib?.dylib;"..mainpath.."bin/clibs/?.dylib" or
|
||||
os == "Unix" and mainpath.."bin/?.so;"..mainpath.."bin/clibs/?.so" or nil
|
||||
if clibs then wx.wxSetEnv("LUA_CPATH", package.cpath .. ';' .. clibs) end
|
||||
osname == "Windows" and mainpath.."bin/?.dll;"..mainpath.."bin/clibs/?.dll" or
|
||||
osname == "Macintosh" and mainpath.."bin/lib?.dylib;"..mainpath.."bin/clibs/?.dylib" or
|
||||
osname == "Unix" and mainpath.."bin/?.so;"..mainpath.."bin/clibs/?.so" or nil
|
||||
if clibs then wx.wxSetEnv("LUA_CPATH",
|
||||
package.cpath .. ';' .. clibs .. ';' .. luadev_cpath) end
|
||||
end
|
||||
|
||||
---------------
|
||||
@@ -170,8 +191,7 @@ do
|
||||
else
|
||||
table.insert(configs,str)
|
||||
end
|
||||
index = index+1
|
||||
else
|
||||
elseif arg[index-1] ~= "-cfg" then
|
||||
table.insert(filenames,arg[index])
|
||||
end
|
||||
end
|
||||
@@ -179,6 +199,86 @@ do
|
||||
setLuaPaths(GetPathWithSep(ide.editorFilename), ide.osname)
|
||||
end
|
||||
|
||||
----------------------
|
||||
-- process application
|
||||
|
||||
ide.app = dofile(ide.config.path.app.."/app.lua")
|
||||
local app = ide.app
|
||||
assert(app)
|
||||
|
||||
local function addToTab(tab,file)
|
||||
local cfgfn,err = loadfile(file)
|
||||
if not cfgfn then
|
||||
print(("Error while loading configuration file: %s"):format(err))
|
||||
else
|
||||
local name = file:match("([a-zA-Z_0-9]+)%.lua$")
|
||||
local success, result = pcall(function()return cfgfn(assert(_G or _ENV))end)
|
||||
if not success then
|
||||
print(("Error while processing configuration file: %s"):format(result))
|
||||
elseif name then
|
||||
if (tab[name]) then
|
||||
local out = tab[name]
|
||||
for i,v in pairs(result) do
|
||||
out[i] = v
|
||||
end
|
||||
else
|
||||
tab[name] = result
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
-- load interpreters
|
||||
local function loadInterpreters(filter)
|
||||
for _, file in ipairs(FileSysGet("interpreters/*.*", wx.wxFILE)) do
|
||||
if file:match "%.lua$" and (filter or app.loadfilters.interpreters)(file) then
|
||||
addToTab(ide.interpreters,file)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
-- load specs
|
||||
local function loadSpecs(filter)
|
||||
for _, file in ipairs(FileSysGet("spec/*.*", wx.wxFILE)) do
|
||||
if file:match "%.lua$" and (filter or app.loadfilters.specs)(file) then
|
||||
addToTab(ide.specs,file)
|
||||
end
|
||||
end
|
||||
|
||||
for _, spec in pairs(ide.specs) do
|
||||
spec.sep = spec.sep or ""
|
||||
spec.iscomment = {}
|
||||
spec.iskeyword0 = {}
|
||||
spec.isstring = {}
|
||||
if (spec.lexerstyleconvert) then
|
||||
if (spec.lexerstyleconvert.comment) then
|
||||
for _, s in pairs(spec.lexerstyleconvert.comment) do
|
||||
spec.iscomment[s] = true
|
||||
end
|
||||
end
|
||||
if (spec.lexerstyleconvert.keywords0) then
|
||||
for _, s in pairs(spec.lexerstyleconvert.keywords0) do
|
||||
spec.iskeyword0[s] = true
|
||||
end
|
||||
end
|
||||
if (spec.lexerstyleconvert.stringtxt) then
|
||||
for _, s in pairs(spec.lexerstyleconvert.stringtxt) do
|
||||
spec.isstring[s] = true
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
-- load tools
|
||||
local function loadTools(filter)
|
||||
for _, file in ipairs(FileSysGet("tools/*.*", wx.wxFILE)) do
|
||||
if file:match "%.lua$" and (filter or app.loadfilters.tools)(file) then
|
||||
addToTab(ide.tools,file)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
-- temporarily replace print() to capture reported error messages to show
|
||||
-- them later in the Output window after everything is loaded.
|
||||
local resumePrint do
|
||||
@@ -209,6 +309,8 @@ local function addConfig(filename,isstring)
|
||||
else
|
||||
ide.config.os = os
|
||||
ide.config.wxstc = wxstc
|
||||
ide.config.load = { interpreters = loadInterpreters,
|
||||
specs = loadSpecs, tools = loadTools }
|
||||
setfenv(cfgfn,ide.config)
|
||||
local _, err = pcall(function()cfgfn(assert(_G or _ENV))end)
|
||||
if err then
|
||||
@@ -217,102 +319,24 @@ local function addConfig(filename,isstring)
|
||||
end
|
||||
end
|
||||
|
||||
do
|
||||
addConfig(ide.config.path.app.."/config.lua")
|
||||
function GetIDEString(keyword, default)
|
||||
return app.stringtable[keyword] or default or keyword
|
||||
end
|
||||
|
||||
----------------------
|
||||
-- process application
|
||||
-- process config
|
||||
|
||||
ide.app = dofile(ide.config.path.app.."/app.lua")
|
||||
local app = ide.app
|
||||
assert(app)
|
||||
|
||||
do
|
||||
local app = ide.app
|
||||
function GetIDEString(keyword, default)
|
||||
return app.stringtable[keyword] or default or keyword
|
||||
end
|
||||
end
|
||||
addConfig(ide.config.path.app.."/config.lua")
|
||||
|
||||
----------------------
|
||||
-- process plugins
|
||||
|
||||
local function addToTab(tab,file)
|
||||
local cfgfn,err = loadfile(file)
|
||||
if not cfgfn then
|
||||
print(("Error while loading configuration file: %s"):format(err))
|
||||
else
|
||||
local name = file:match("([a-zA-Z_0-9]+)%.lua$")
|
||||
local success, result = pcall(function()return cfgfn(assert(_G or _ENV))end)
|
||||
if not success then
|
||||
print(("Error while processing configuration file: %s"):format(result))
|
||||
elseif name then
|
||||
if (tab[name]) then
|
||||
local out = tab[name]
|
||||
for i,v in pairs(result) do
|
||||
out[i] = v
|
||||
end
|
||||
else
|
||||
tab[name] = result
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
-- load interpreters
|
||||
local function loadInterpreters()
|
||||
for _, file in ipairs(FileSysGet("interpreters/*.*", wx.wxFILE)) do
|
||||
if file:match "%.lua$" and app.loadfilters.interpreters(file) then
|
||||
addToTab(ide.interpreters,file)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
-- load specs
|
||||
local function loadSpecs()
|
||||
for _, file in ipairs(FileSysGet("spec/*.*", wx.wxFILE)) do
|
||||
if file:match "%.lua$" and app.loadfilters.specs(file) then
|
||||
addToTab(ide.specs,file)
|
||||
end
|
||||
end
|
||||
|
||||
for _, spec in pairs(ide.specs) do
|
||||
spec.sep = spec.sep or ""
|
||||
spec.iscomment = {}
|
||||
spec.iskeyword0 = {}
|
||||
spec.isstring = {}
|
||||
if (spec.lexerstyleconvert) then
|
||||
if (spec.lexerstyleconvert.comment) then
|
||||
for _, s in pairs(spec.lexerstyleconvert.comment) do
|
||||
spec.iscomment[s] = true
|
||||
end
|
||||
end
|
||||
if (spec.lexerstyleconvert.keywords0) then
|
||||
for _, s in pairs(spec.lexerstyleconvert.keywords0) do
|
||||
spec.iskeyword0[s] = true
|
||||
end
|
||||
end
|
||||
if (spec.lexerstyleconvert.stringtxt) then
|
||||
for _, s in pairs(spec.lexerstyleconvert.stringtxt) do
|
||||
spec.isstring[s] = true
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
-- load tools
|
||||
local function loadTools()
|
||||
for _, file in ipairs(FileSysGet("tools/*.*", wx.wxFILE)) do
|
||||
if file:match "%.lua$" and app.loadfilters.tools(file) then
|
||||
addToTab(ide.tools,file)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if app.preinit then app.preinit() end
|
||||
|
||||
loadInterpreters()
|
||||
loadSpecs()
|
||||
loadTools()
|
||||
|
||||
do
|
||||
-- process user config
|
||||
for _, file in ipairs(FileSysGet("cfg/user.lua", wx.wxFILE)) do
|
||||
@@ -329,39 +353,30 @@ do
|
||||
addConfig(v, true)
|
||||
end
|
||||
configs = nil
|
||||
local sep = string_Pathsep
|
||||
if ide.config.language then
|
||||
addToTab(ide.config.messages, "cfg"..sep.."i18n"..sep..ide.config.language..".lua")
|
||||
end
|
||||
end
|
||||
|
||||
-- load this after preinit and processing configs to allow
|
||||
-- each of the lists to be modified
|
||||
loadInterpreters()
|
||||
loadSpecs()
|
||||
loadTools()
|
||||
|
||||
---------------
|
||||
-- Load App
|
||||
|
||||
dofile "src/editor/settings.lua"
|
||||
dofile "src/editor/singleinstance.lua"
|
||||
dofile "src/editor/iofilters.lua"
|
||||
|
||||
dofile "src/editor/gui.lua"
|
||||
dofile "src/editor/filetree.lua"
|
||||
dofile "src/editor/output.lua"
|
||||
dofile "src/editor/debugger.lua"
|
||||
dofile "src/editor/preferences.lua"
|
||||
|
||||
dofile "src/editor/editor.lua"
|
||||
dofile "src/editor/autocomplete.lua"
|
||||
dofile "src/editor/findreplace.lua"
|
||||
dofile "src/editor/commands.lua"
|
||||
|
||||
dofile "src/editor/shellbox.lua"
|
||||
|
||||
dofile "src/editor/menu.lua"
|
||||
for _, file in ipairs({
|
||||
"markup", "settings", "singleinstance", "iofilters",
|
||||
"gui", "filetree", "output", "debugger", "preferences",
|
||||
"editor", "findreplace", "commands", "autocomplete", "shellbox",
|
||||
"menu_file", "menu_edit", "menu_search",
|
||||
"menu_view", "menu_project", "menu_tools", "menu_help",
|
||||
"inspect" }) do
|
||||
dofile("src/editor/"..file..".lua")
|
||||
end
|
||||
|
||||
dofile "src/preferences/editor.lua"
|
||||
dofile "src/preferences/project.lua"
|
||||
|
||||
dofile "src/version.lua"
|
||||
|
||||
-- load rest of settings
|
||||
|
||||
@@ -125,7 +125,7 @@ end
|
||||
-- Get file modification time, returns a wxDateTime (check IsValid) or nil if
|
||||
-- the file doesn't exist
|
||||
function GetFileModTime(filePath)
|
||||
if filePath and (string.len(filePath) > 0) then
|
||||
if filePath and #filePath > 0 then
|
||||
local fn = wx.wxFileName(filePath)
|
||||
if fn:FileExists() then
|
||||
return fn:GetModificationTime()
|
||||
@@ -186,6 +186,15 @@ function GetFullPathIfExists(p, f)
|
||||
and file:GetFullPath())
|
||||
end
|
||||
|
||||
function MergeFullPath(p, f)
|
||||
if not p or not f then return end
|
||||
local file = wx.wxFileName(f)
|
||||
-- Normalize call is needed to make the case of p = '/abc/def' and
|
||||
-- f = 'xyz/main.lua' work correctly. Normalize() returns true if done.
|
||||
return (file:Normalize(wx.wxPATH_NORM_ALL, p)
|
||||
and file:GetFullPath())
|
||||
end
|
||||
|
||||
function FileWrite(file,content)
|
||||
local log = wx.wxLogNull() -- disable error reporting; will report as needed
|
||||
local file = wx.wxFile(file, wx.wxFile.write)
|
||||
@@ -208,14 +217,16 @@ end
|
||||
|
||||
function FileRename(file1, file2) return wx.wxRenameFile(file1, file2) end
|
||||
|
||||
function FileCopy(file1, file2) return wx.wxCopyFile(file1, file2) end
|
||||
|
||||
TimeGet = pcall(require, "socket") and socket.gettime or os.clock
|
||||
|
||||
function pairsSorted(t, f)
|
||||
local a = {}
|
||||
for n in pairs(t) do table.insert(a, n) end
|
||||
table.sort(a, f)
|
||||
local i = 0 -- iterator variable
|
||||
local iter = function () -- iterator function
|
||||
local i = 0 -- iterator variable
|
||||
local iter = function () -- iterator function
|
||||
i = i + 1
|
||||
if a[i] == nil then return nil
|
||||
else return a[i], t[a[i]]
|
||||
@@ -223,3 +234,13 @@ function pairsSorted(t, f)
|
||||
end
|
||||
return iter
|
||||
end
|
||||
|
||||
local messages, lang, counter
|
||||
function TR(msg, count)
|
||||
lang = lang or ide.config.language
|
||||
messages = messages or ide.config.messages
|
||||
counter = counter or (messages[lang] and messages[lang][0])
|
||||
local message = messages[lang] and messages[lang][msg]
|
||||
return count and counter and message and type(message) == 'table'
|
||||
and message[counter(count)] or message or msg
|
||||
end
|
||||
|
||||
43
tools/cg.lua
43
tools/cg.lua
@@ -1,12 +1,15 @@
|
||||
-- authors: Luxinia Dev (Eike Decker & Christoph Kubisch)
|
||||
---------------------------------------------------------
|
||||
|
||||
local cgbinpath = ide.config.path.cgbin or os.getenv("CG_BIN_PATH")
|
||||
local cgprofile = ide.config.cgprofile or "gp5"
|
||||
local cgglsles = ide.config.cgglsles
|
||||
local cgbinpath = os.getenv("CG_BIN_PATH")
|
||||
local cgprofile
|
||||
local cgglsles
|
||||
|
||||
return cgbinpath and {
|
||||
fninit = function(frame,menuBar)
|
||||
cgprofile = ide.config.cgprofile or "gp5"
|
||||
cgglsles = ide.config.cgglsles
|
||||
cgbinpath = ide.config.path.cgbin or os.getenv("CG_BIN_PATH")
|
||||
|
||||
local myMenu = wx.wxMenu{
|
||||
{ ID "cg.profile.arb", "&ARB VP/FP", "ARB program profile", wx.wxITEM_CHECK },
|
||||
@@ -22,11 +25,12 @@ return cgbinpath and {
|
||||
{ ID "cg.compile.input", "&Custom Args\tCtrl-L", "when set a popup for custom compiler args will be envoked", wx.wxITEM_CHECK },
|
||||
{ ID "cg.compile.gles", "GLSL-ES", "When GLSL file is source use GLSL-ES path", wx.wxITEM_CHECK },
|
||||
{ },
|
||||
{ ID "cg.compile.vertex", "Compile &Vertex\tCtrl-U", "Compile Vertex program (select entry word)" },
|
||||
{ ID "cg.compile.fragment", "Compile &Fragment\tCtrl-I", "Compile Fragment program (select entry word)" },
|
||||
{ ID "cg.compile.geometry", "Compile &Geometry\tCtrl-J", "Compile Geometry program (select entry word)" },
|
||||
{ ID "cg.compile.tessctrl", "Compile T.Ctrl", "Compile T.Ctrl program (select entry word)" },
|
||||
{ ID "cg.compile.tesseval", "Compile T.Eval", "Compile T.Eval program (select entry word)" },
|
||||
{ ID "cg.compile.vertex", "Compile &Vertex\tCtrl-1", "Compile Vertex program (select entry word)" },
|
||||
{ ID "cg.compile.fragment", "Compile &Fragment\tCtrl-2", "Compile Fragment program (select entry word)" },
|
||||
{ ID "cg.compile.geometry", "Compile &Geometry\tCtrl-3", "Compile Geometry program (select entry word)" },
|
||||
{ ID "cg.compile.tessctrl", "Compile T.Ctrl\tCtrl-4", "Compile T.Ctrl program (select entry word)" },
|
||||
{ ID "cg.compile.tesseval", "Compile T.Eval\tCtrl-5", "Compile T.Eval program (select entry word)" },
|
||||
{ ID "cg.compile.compute", "Compile Compute\tCtrl-6", "Compile Compute program (select entry word)" },
|
||||
{ },
|
||||
{ ID "cg.format.asm", "Annotate ASM", "indent and add comments to Cg ASM output" },
|
||||
{ ID "cg.format.master", "Build from master", "Creates a new cg file from a master containing special include instrctions." },
|
||||
@@ -44,17 +48,18 @@ return cgbinpath and {
|
||||
[ID "cg.compile.geometry"] = 3,
|
||||
[ID "cg.compile.tessctrl"] = 4,
|
||||
[ID "cg.compile.tesseval"] = 5,
|
||||
[ID "cg.compile.compute"] = 6,
|
||||
}
|
||||
data.profiles = {
|
||||
[ID "cg.profile.arb"] = {"arbvp1","arbfp1",false,false,false,ext=".glp", asm=true,},
|
||||
[ID "cg.profile.glsl"] = {"glslv","glslf","glslg",false,false,ext=".glsl"},
|
||||
[ID "cg.profile.nv40"] = {"vp40","fp40",false,false,false,ext=".glp",nvperf=true, asm=true,},
|
||||
[ID "cg.profile.gp4"] = {"gp4vp","gp4fp","gp4gp",false,false,ext=".glp",nvperf=true, asm=true,},
|
||||
[ID "cg.profile.gp5"] = {"gp5vp","gp5fp","gp5gp","gp5tcp","gp5tep",ext=".glp", asm=true,},
|
||||
[ID "cg.profile.dx_2x"] = {"vs_2_0","ps_2_x",false,false,false,ext=".txt"},
|
||||
[ID "cg.profile.dx_3"] = {"vs_3_0","ps_3_0",false,false,false,ext=".txt"},
|
||||
[ID "cg.profile.dx_4"] = {"vs_4_0","ps_4_0","gs_4_0",false,false,ext=".txt"},
|
||||
[ID "cg.profile.dx_5"] = {"vs_5_0","ps_5_0","gs_5_0","ds_5_0","hs_5_0",ext=".txt"},
|
||||
[ID "cg.profile.arb"] = {"arbvp1","arbfp1",false,false,false,false,ext=".glp", asm=true,},
|
||||
[ID "cg.profile.glsl"] = {"glslv","glslf","glslg",false,false,false,ext=".glsl"},
|
||||
[ID "cg.profile.nv40"] = {"vp40","fp40",false,false,false,false,ext=".glp",nvperf=true, asm=true,},
|
||||
[ID "cg.profile.gp4"] = {"gp4vp","gp4fp","gp4gp",false,false,false,ext=".glp",nvperf=true, asm=true,},
|
||||
[ID "cg.profile.gp5"] = {"gp5vp","gp5fp","gp5gp","gp5tcp","gp5tep","gp5cp",ext=".glp", asm=true,},
|
||||
[ID "cg.profile.dx_2x"] = {"vs_2_0","ps_2_x",false,false,false,false,ext=".txt"},
|
||||
[ID "cg.profile.dx_3"] = {"vs_3_0","ps_3_0",false,false,false,false,ext=".txt"},
|
||||
[ID "cg.profile.dx_4"] = {"vs_4_0","ps_4_0","gs_4_0",false,false,false,ext=".txt"},
|
||||
[ID "cg.profile.dx_5"] = {"vs_5_0","ps_5_0","gs_5_0","ds_5_0","hs_5_0",false,ext=".txt"},
|
||||
}
|
||||
data.domaindefs = {
|
||||
" -D_VERTEX_ ",
|
||||
@@ -62,6 +67,7 @@ return cgbinpath and {
|
||||
" -D_GEOMETRY_ ",
|
||||
" -D_TESS_CONTROL_ ",
|
||||
" -D_TESS_EVAL_ ",
|
||||
" -D_COMPUTE_ ",
|
||||
}
|
||||
-- Profile related
|
||||
menuBar:Check(data.profid, true)
|
||||
@@ -424,9 +430,9 @@ return cgbinpath and {
|
||||
outname = '"'..outname..'"'
|
||||
|
||||
local cmdglsl = data.gles and "-ogles -glslWerror -DGL_ES" or "-oglsl -glslWerror -po PaBO2 "
|
||||
|
||||
local cmdline = ' "'..fullname..'" -profile '..profile[domain].." "
|
||||
cmdline = glsl and cmdline..cmdglsl or cmdline
|
||||
cmdline = glsl and (data.profid == (ID "cg.profile.gp5")) and cmdline.."-po NV_shader_atomic_float -po NV_bindless_texture " or cmdline
|
||||
cmdline = args and cmdline..args.." " or cmdline
|
||||
cmdline = cmdline..data.domaindefs[domain]
|
||||
cmdline = cmdline.."-o "..outname.." "
|
||||
@@ -506,6 +512,7 @@ return cgbinpath and {
|
||||
frame:Connect(ID "cg.compile.geometry",wx.wxEVT_COMMAND_MENU_SELECTED,evCompile)
|
||||
frame:Connect(ID "cg.compile.tessctrl",wx.wxEVT_COMMAND_MENU_SELECTED,evCompile)
|
||||
frame:Connect(ID "cg.compile.tesseval",wx.wxEVT_COMMAND_MENU_SELECTED,evCompile)
|
||||
frame:Connect(ID "cg.compile.compute",wx.wxEVT_COMMAND_MENU_SELECTED,evCompile)
|
||||
|
||||
-- indent asm
|
||||
frame:Connect(ID "cg.format.asm", wx.wxEVT_COMMAND_MENU_SELECTED,
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
-- authors: Luxinia Dev (Eike Decker & Christoph Kubisch)
|
||||
---------------------------------------------------------
|
||||
|
||||
return {
|
||||
local clccbinpath = os.getenv("CLCC_BIN_PATH")
|
||||
|
||||
return clccbinpath and {
|
||||
fninit = function(frame,menuBar)
|
||||
local myMenu = wx.wxMenu{
|
||||
{ ID "cl.allplatforms", "&All", "Compiled with all available platforms (otherwise only first)", wx.wxITEM_CHECK },
|
||||
@@ -48,7 +50,7 @@ return {
|
||||
cmdline = cmdline..(data.output and "--output " or "")
|
||||
cmdline = cmdline..'"'..fullname..'"'
|
||||
|
||||
cmdline = "bin/clcc.exe"..cmdline
|
||||
cmdline = clccbinpath.."/clcc.exe"..cmdline
|
||||
|
||||
-- run compiler process
|
||||
CommandLineRun(cmdline,nil,true,nil,nil)
|
||||
|
||||
@@ -2,10 +2,11 @@
|
||||
---------------------------------------------------------
|
||||
|
||||
local dxpath = os.getenv("DXSDK_DIR")
|
||||
local dxprofile = ide.config.dxprofile or "dx_4"
|
||||
local dxprofile
|
||||
|
||||
return dxpath and {
|
||||
fninit = function(frame,menuBar)
|
||||
dxprofile = ide.config.dxprofile or "dx_4"
|
||||
|
||||
local myMenu = wx.wxMenu{
|
||||
{ ID "dx.profile.dx_2x", "DX SM&2_x", "DirectX sm2_x profile", wx.wxITEM_CHECK },
|
||||
|
||||
@@ -305,8 +305,8 @@ end
|
||||
|
||||
return {
|
||||
exec = {
|
||||
name = "luajit ffi string to Estrela api",
|
||||
description = "converts current file to api",
|
||||
name = "luajit ffi string to editor api",
|
||||
description = "converts current file to api, for autocompletion inside this editor",
|
||||
fn = exec,
|
||||
},
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@ return {
|
||||
name = "Luxinia Viewer",
|
||||
description = "sends current file to luxinia viewer",
|
||||
fn = function(wxfname,projectdir)
|
||||
if not ide.config.path.luxinia then wx.wxMessageBox("Please define 'path.luxinia' in your cfg/user.lua (see estrela.lua for examples)"); return end
|
||||
local endstr = projectdir and projectdir:len()>0
|
||||
and " -p "..projectdir or ""
|
||||
|
||||
|
||||
@@ -8,6 +8,9 @@ api/cg/*.lua
|
||||
api/README
|
||||
cfg/user-sample.lua
|
||||
cfg/estrela.lua
|
||||
cfg/scheme-picker.lua
|
||||
cfg/tomorrow.lua
|
||||
cfg/i18n/*.lua
|
||||
interpreters/*.lua
|
||||
lualibs/copas/copas.lua
|
||||
lualibs/coxpcall/coxpcall.lua
|
||||
@@ -61,10 +64,12 @@ src/editor/gui.lua
|
||||
src/editor/ids.lua
|
||||
src/editor/inspect.lua
|
||||
src/editor/iofilters.lua
|
||||
src/editor/keymap.lua
|
||||
src/editor/markup.lua
|
||||
src/editor/menu.lua
|
||||
src/editor/menu_edit.lua
|
||||
src/editor/menu_file.lua
|
||||
src/editor/menu_help.lua
|
||||
src/editor/menu_project.lua
|
||||
src/editor/menu_search.lua
|
||||
src/editor/menu_tools.lua
|
||||
@@ -83,7 +88,6 @@ src/version.lua
|
||||
tools/*.lua
|
||||
zbstudio/app.lua
|
||||
zbstudio/config.lua
|
||||
zbstudio/menu_help.lua
|
||||
zbstudio/res/16.ico
|
||||
zbstudio/res/16/LICENSE
|
||||
zbstudio/res/16/wxART_COPY.png
|
||||
|
||||
@@ -21,23 +21,7 @@ local app = {
|
||||
interpreters = function(file) return not file:find('estrela') end,
|
||||
},
|
||||
|
||||
preinit = function ()
|
||||
ide.config.interpreter = "luadeb"
|
||||
ide.config.unhidewindow = { -- allow unhiding of GUI windows
|
||||
-- 1 - unhide if hidden, 0 - hide if shown
|
||||
wxWindowClassNR = 1, -- wxwindows applications
|
||||
GLUT = 1, -- opengl applications (for example, moai)
|
||||
}
|
||||
ide.config.allowinteractivescript = true -- allow interaction in the output window
|
||||
|
||||
-- this needs to be in pre-init to load the styles
|
||||
dofile("src/editor/markup.lua")
|
||||
end,
|
||||
|
||||
postinit = function ()
|
||||
dofile("zbstudio/menu_help.lua")
|
||||
dofile("src/editor/inspect.lua")
|
||||
|
||||
local bundle = wx.wxIconBundle()
|
||||
local files = FileSysGet("zbstudio/res/", wx.wxFILE)
|
||||
local icons = 0
|
||||
@@ -50,14 +34,6 @@ local app = {
|
||||
if icons > 0 then ide.frame:SetIcons(bundle) end
|
||||
|
||||
local menuBar = ide.frame.menuBar
|
||||
local menu = menuBar:GetMenu(menuBar:FindMenu("&Project"))
|
||||
local itemid = menu:FindItem("Project Directory")
|
||||
if itemid ~= wx.wxNOT_FOUND then menu:Destroy(itemid) end
|
||||
|
||||
menu = menuBar:GetMenu(menuBar:FindMenu("&View"))
|
||||
itemid = menu:FindItem("&Load Config Style...")
|
||||
if itemid ~= wx.wxNOT_FOUND then menu:Destroy(itemid) end
|
||||
|
||||
menuBar:Check(ID_CLEAROUTPUT, true)
|
||||
|
||||
-- load myprograms/welcome.lua if exists and no projectdir
|
||||
|
||||
@@ -15,48 +15,19 @@ filehistorylength = 20
|
||||
singleinstance = true
|
||||
singleinstanceport = 0xe493
|
||||
|
||||
acandtip.shorttip = false
|
||||
acandtip.shorttip = true
|
||||
acandtip.nodynwords = true
|
||||
|
||||
activateoutput = true
|
||||
projectautoopen = true
|
||||
autorecoverinactivity = 10
|
||||
allowinteractivescript = true -- allow interaction in the output window
|
||||
|
||||
styles = {
|
||||
-- lexer specific (inherit fg/bg from text)
|
||||
lexerdef = {fg = {128, 128, 128}},
|
||||
comment = {fg = {32, 127, 32}, bg = {250, 250, 240}, fill= true},
|
||||
stringtxt = {fg = {127, 0, 127}},
|
||||
stringeol = {fg = {0, 0, 0}, bg = {224, 192, 224}, fill = true},
|
||||
preprocessor = {fg = {127, 127,0}},
|
||||
operator = {fg = {0, 0, 0}},
|
||||
number = {fg = {90, 0, 255}},
|
||||
|
||||
keywords0 = {fg = {0, 0, 127}, b = true},
|
||||
keywords1 = {fg = {127, 0, 0}, b = true},
|
||||
keywords2 = {fg = {0, 127, 0}, b = true},
|
||||
keywords3 = {fg = {0, 0, 127}, b = true},
|
||||
keywords4 = {fg = {127, 0, 95}, b = true},
|
||||
keywords5 = {fg = {35, 95, 175}, b = true},
|
||||
keywords6 = {fg = {0, 127, 127}, b = true},
|
||||
keywords7 = {fg = {240, 255, 255}, b = true},
|
||||
|
||||
-- common (inherit fg/bg from text)
|
||||
text = nil, -- let os pick
|
||||
linenumber = {fg = {90, 90, 80}},
|
||||
bracematch = {fg = {0, 0, 255}, b = true},
|
||||
bracemiss = {fg = {255, 0, 0 }, b = true},
|
||||
ctrlchar = nil,
|
||||
indent = {fg = {192, 192, 192}, bg = {255, 255, 255}},
|
||||
calltip = nil,
|
||||
|
||||
-- common special (need custom fg & bg)
|
||||
calltipbg = nil,
|
||||
sel = nil,
|
||||
caret = nil,
|
||||
caretlinebg = {bg = {240,240,230}},
|
||||
fold = nil,
|
||||
whitespace = nil,
|
||||
|
||||
fncall = {fg = {175,175,255}, st= wxstc.wxSTC_INDIC_TT},
|
||||
interpreter = "luadeb"
|
||||
unhidewindow = { -- allow unhiding of GUI windows
|
||||
-- 1 - show if hidden, 0 - ignore, 2 -- hide if shown
|
||||
ConsoleWindowClass = 0,
|
||||
IME = 0,
|
||||
['MSCTFIME UI'] = 0,
|
||||
GLUT = 1, -- opengl applications (for example, moai)
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
|
||||
cd "@IDE_DATADIR@"
|
||||
lua src/main.lua zbstudio
|
||||
lua src/main.lua zbstudio "$@"
|
||||
|
||||
Reference in New Issue
Block a user