<kbd id="afajh"><form id="afajh"></form></kbd>
<strong id="afajh"><dl id="afajh"></dl></strong>
    <del id="afajh"><form id="afajh"></form></del>
        1. <th id="afajh"><progress id="afajh"></progress></th>
          <b id="afajh"><abbr id="afajh"></abbr></b>
          <th id="afajh"><progress id="afajh"></progress></th>

          wxLuaLua的GUI框架

          聯合創(chuàng)作 · 2023-09-28 08:14

          wxLua是一個把wxWidgets庫和lua綁定的項目,可以方便的使用lua寫GUI。

          實例代碼

          frame = wx.wxFrame(wx.NULL, wx.wxID_ANY, "wxLua Minimal Demo",
                             wx.wxDefaultPosition, wx.wxSize(450, 450),
                             wx.wxDEFAULT_FRAME_STYLE)
          
          -- create a simple file menu
          local fileMenu = wx.wxMenu()
          fileMenu:Append(wx.wxID_EXIT, "E&xit", "Quit the program")
          
          -- create a simple help menu
          local helpMenu = wx.wxMenu()
          helpMenu:Append(wx.wxID_ABOUT, "&About",
                          "About the wxLua Minimal Application")
          
          -- create a menu bar and append the file and help menus
          local menuBar = wx.wxMenuBar()
          menuBar:Append(fileMenu, "&File")
          menuBar:Append(helpMenu, "&Help")
          
          -- attach the menu bar into the frame
          frame:SetMenuBar(menuBar)
          
          -- create a simple status bar
          frame:CreateStatusBar(1)
          frame:SetStatusText("Welcome to wxLua.")
          
          -- connect the selection event of the exit menu item to an
          -- event handler that closes the window
          frame:Connect(wx.wxID_EXIT, wx.wxEVT_COMMAND_MENU_SELECTED,
                        function (event) frame:Close(true) end )
          
          -- connect the selection event of the about menu item
          frame:Connect(wx.wxID_ABOUT, wx.wxEVT_COMMAND_MENU_SELECTED,
                  function (event)
                      wx.wxMessageBox('This is the "About" dialog of the Minimal wxLua sample.',
                                      "About wxLua",
                                      wx.wxOK + wx.wxICON_INFORMATION,
                                      frame)
                  end )
          
          -- finally, show the frame window
          frame:Show(true)
          瀏覽 27
          點贊
          評論
          收藏
          分享

          手機掃一掃分享

          編輯 分享
          舉報
          評論
          圖片
          表情
          推薦
          點贊
          評論
          收藏
          分享

          手機掃一掃分享

          編輯 分享
          舉報
          <kbd id="afajh"><form id="afajh"></form></kbd>
          <strong id="afajh"><dl id="afajh"></dl></strong>
            <del id="afajh"><form id="afajh"></form></del>
                1. <th id="afajh"><progress id="afajh"></progress></th>
                  <b id="afajh"><abbr id="afajh"></abbr></b>
                  <th id="afajh"><progress id="afajh"></progress></th>
                  爱爱综合日韩 | 人妻巨大乳HD免费看 | 91插穴| 日韩中文字幕视频 | 免费无码在线播放 |