lide framework


SUBMITTED BY: dcanoh

DATE: Jan. 12, 2017, 5:07 a.m.

FORMAT: reStructuredText

SIZE: 3.5 kB

HITS: 3113

  1. Lide Framework
  2. ==============
  3. Lide Framework is a library that allows you to create multiplatform graphical interfaces from Lua language.
  4. Lide uses wxWidgets to build controls and windows, this ensures the integration of your applications
  5. with GTK+ on Linux and really native controls in Windows.
  6. .. image:: https://travis-ci.org/lidesdk/framework.svg?branch=master
  7. :target: https://travis-ci.org/lidesdk/framework
  8. Installation
  9. ============
  10. * Make sure you have the lua5.1 interpreter and dependencies installed on your machine.
  11. ============ ======================================================================================
  12. Platform Installation
  13. ============ ======================================================================================
  14. Windows Download `LuaForWindows_v5.1.4-33.exe <http://files.luaforge.net/releases/luaforwindows/luaforwindows/5.1.4-33/LuaForWindows_v5.1.4-33.exe>`_.
  15. Ubuntu ``$ sudo apt-get install lua5.1 libwxgtk2.8``
  16. Archlinux ``# pacman -S lua5.1 wxgtk2.8``
  17. ============ ======================================================================================
  18. Windows Installation
  19. ********************
  20. .. code-block:: bash
  21. $ mkdir lide_app
  22. $ cd lide_app
  23. $ git clone https://github.com/LideSDK/framework.git lide
  24. Luarocks Installation
  25. *********************
  26. If you have luarocks installed in your machine:
  27. .. code-block:: bash
  28. $ luarocks install https://raw.githubusercontent.com/LideSDK/framework/master/lide-0.0-0.rockspec --local
  29. GNU/Linux Installation
  30. **********************
  31. .. code-block:: bash
  32. $ mkdir lide_app
  33. $ cd lide_app
  34. $ git clone https://github.com/LideSDK/framework.git lide
  35. $ sudo cp ./lide/bin/x86/libwxlua_lua51-wx28gtk2u-2.8.12.3.so /usr/lib/libwxlua_lua51-wx28gtk2u-2.8.12.3.so
  36. $ sudo cp ./lide/bin/x86/wx.so /usr/lib/lua/5.1/wx.so
  37. How to use it
  38. =============
  39. * Create a file ``main.lua`` into the folder lide_app.
  40. .. code-block:: bash
  41. $ nano main.lua
  42. .. code-block:: lua
  43. local Form = lide.classes.widgets.form
  44. local Button = lide.classes.widgets.button
  45. local MessageBox = lide.core.base.messagebox
  46. form1 = Form:new { Name = 'form1',
  47. Title = 'Window Caption'
  48. };
  49. button1 = Button:new { Name = 'button1', Parent = form1,
  50. PosX = 10, PosY = 30,
  51. Text = 'Click me!',
  52. };
  53. button1.onClick : setHandler ( function ( ... )
  54. MessageBox 'Hello world!'
  55. end );
  56. form1:show(true)
  57. With the above code we are creating a new form and putting a button inside it
  58. at position (10, 30), clicking inside the button a message "Hello World" is displayed.
  59. * Run the file ``main.lua`` with the following command:
  60. .. code-block:: bash
  61. $ lua5.1 -l lide.init main.lua
  62. This is all you need to start building applications, **should be noted that these instructions work**
  63. similarly to Windows or GNU/Linux.
  64. Help & Documentation
  65. ====================
  66. If you want to know more please read our official framework's documentation:
  67. `- Lide Framework readthedocs <http://lide-framework.rtfd.io>`_
  68. Credits and Authors
  69. ===================
  70. Lide was founded in 2014 by Hernán D. Cano (`@dariocanoh <https://github.com/dariocanoh>`_) and Jesús H. Cano (`@jhernancanom <https://github.com/jhernancanom>`_ ) for private purposes, today is accessible to the public.
  71. Lide is currently active and developing, today is maintained by (`@dariocanoh <https://github.com/dariocanoh>`_)

comments powered by Disqus