-- author: Paul Kulchenko
---------------------------------------------------------
local ide = ide
-- ---------------------------------------------------------------------------
-- Create the Help menu and attach the callback functions
local frame = ide.frame
local menuBar = frame.menuBar
local mobdebug = require "mobdebug"
local helpMenu = wx.wxMenu{
{ ID_ABOUT, "&About\tF1", "About ZeroBrane Studio" },
}
menuBar:Append(helpMenu, "&Help")
local function DisplayAbout(event)
local page = [[
 |
ZeroBrane Studio (]]..ide.VERSION..[[; using MobDebug ]]..mobdebug._VERSION..[[)
Copyright © 2011-2012 ZeroBrane LLC
Paul Kulchenko
Licensed under The MIT License.
|
Based on Estrela Editor
Copyright © 2008-2011 Luxinia DevTeam
Christoph Kubisch, Eike Decker
Licensed under The MIT License.
|
Based on wxLua editor sample (]]..wxlua.wxLUA_VERSION_STRING..[[)
Copyright © 2002-2005 Lomtick Software
J. Winwood, John Labenski
Licensed under wxWindows Library License, Version 3.
|
|
Built with ]]..wx.wxVERSION_STRING..[[
|
|
]]
local dlg = wx.wxDialog(frame, wx.wxID_ANY, "About ZeroBane Studio")
local html = wx.wxLuaHtmlWindow(dlg, wx.wxID_ANY,
wx.wxDefaultPosition, wx.wxSize(440, 270),
wx.wxHW_SCROLLBAR_NEVER)
local line = wx.wxStaticLine(dlg, wx.wxID_ANY)
local button = wx.wxButton(dlg, wx.wxID_OK, "OK")
button:SetDefault()
html:SetBorders(0)
html:SetPage(page)
html:SetSize(html:GetInternalRepresentation():GetWidth(),
html:GetInternalRepresentation():GetHeight())
local topsizer = wx.wxBoxSizer(wx.wxVERTICAL)
topsizer:Add(html, 1, wx.wxALL, 10)
topsizer:Add(line, 0, wx.wxEXPAND + wx.wxLEFT + wx.wxRIGHT, 10)
topsizer:Add(button, 0, wx.wxALL + wx.wxALIGN_RIGHT, 10)
dlg:SetAutoLayout(true)
dlg:SetSizer(topsizer)
topsizer:Fit(dlg)
dlg:ShowModal()
dlg:Destroy()
end
frame:Connect(ID_ABOUT, wx.wxEVT_COMMAND_MENU_SELECTED, DisplayAbout)