A library for creating native cross-platform GUI apps

Related tags

GUI yue
Overview

Yue

A library for creating native cross-platform GUI apps.

Getting started

Examples

Issues

Feel free to ask any kind of questions in the issues page, but please use English since other users may find your questions valuable.

License

The Yue project is licensed under LGPL v2.1 with following exception:

  • If you did not modify Yue's source code, you have the permission to statically link Yue with your project, regardless of the license of your project.

The source code of Yue can also be distributed under other proprietary software friendly licenses if you make a commercial contract with the owners of the Yue project.

Contributor license agreement

By sending a pull request, you hereby grant to owners and users of Yue project a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, sublicense, and distribute your contributions and such derivative works.

The owners of the Yue project will also be granted the right to relicense the contributed source code and its derivative works.

The files under docs/, scripts/ and sample_app/ are published under public domain, and contributions to those works will also be licensed so.

Issues
  • Problems creating Tables

    Problems creating Tables

    I am trying to create a simple app that only shows a table on screen using simpleTableModel with no luck, here are the attempts I've made without success and the errors that I've received:

    local contentView = gui.Container.create()
    win:setcontentview(contentView)
    local tabela = gui.SimpleTableModel.create(1)
    contentView:addchildview(tabela)
    
    >>>
    
    lua5.3: error converting arg at index 2 from yue.SimpleTableModel to yue.View
    stack traceback:
            [C]: in ?
            [C]: in method 'addchildview'
            teste.lua:14: in main chunk
            [C]: in ?
    
    local contentView = gui.Container.create()
    win:setcontentview(contentView)
    local tabela = gui.SimpleTableModel:create(1)
    contentView:addchildview(tabela)
    
    >>>
    
    lua5.3: error converting arg at index 1 from table to integer
    stack traceback:
            [C]: in method 'create'
            teste.lua:13: in main chunk
            [C]: in ?
    

    Since the manual don't have examples, I'm having problems working with this element. Adding rows to the table don't change the error FYI...

    bug 
    opened by gustavohmsilva 9
  • Toolbar Item

    Toolbar Item

    Hi,

    I sadly can't find any way to add a toolbar item to my toolbar on macOS.

    There is a definition of a toolbar item but I couldn't find how to append it to the toolbar.

    Thank you for your help!

    question 
    opened by eveningkid 7
  • Irregular behavior between addrow() and removerowat()

    Irregular behavior between addrow() and removerowat()

    I've noticed that although in this example below, the line disappear from the table view:

    btn_deletar.onclick = function() 
                    db.delete(conexao, entry_id:gettext()) 
                    tabela:removerowat(entry_id:gettext())
                    conexao:commit()
            end
    

    In this example, the exact opposite do not happen, the view isn't getting updated...

    btn_cadastrar.onclick = function() 
                    db.create(
                            conexao, entry_filme:gettext(), 
                            entry_produtora:gettext(), 
                            entry_ano:gettext()
                    ) 
                    tabela:addrow{
                            entry_filme:gettext(), 
                            entry_produtora:gettext(), 
                            entry_ano:gettext()
                    }
                    conexao:commit()
            end
    

    Is this intentional? As the table view don't have a :reloadview() or something similar, it is my understanding the both operations, adding rows and removing them should auto reload the table view. But when creating the new row, the database receive the data OK (proving that the data is flowing ok) but the view aren't reloaded as in removerowat()

    needs-more-information 
    opened by gustavohmsilva 6
  • High processor usage at solving non html url

    High processor usage at solving non html url

    When I tried to resolve url with extension other than .html - usage of processor drasticly increments. From about 0,5% of usage to about 26% at resolving that non-html url. And nothing change over time. Process still have that high processor usage. Second try of it make usage about 50%, third on about 75%.

    Reproducing To be able to reproduce this bug just use the sample code in the form of "Mugan", add two files test.html and test.css and make two anchors, one for each of them:

    <a href='mugan://app/test.html'>test.html</a>
    <a href='mugan://app/test.css'>test.css</a>
    

    First of them works great. But second makes process usage higher for nothing.

    bug windows 
    opened by MrMaxie 6
  • [Lua] TextEdit.shouldinsertnewline doesn't work

    [Lua] TextEdit.shouldinsertnewline doesn't work

    Code:

    local pickFolderForm = gui.TextEdit.create()
    pickFolderForm:setstyle{width= 400, height: 25}
    pickFolderForm:settext("Type in folder")
    
    function pickFolderForm.shouldinsertnewline( self )
        print(self)
        return false
    end
    

    Video: https://streamable.com/jpn4p

    bug needs-more-information windows 
    opened by khanhas 6
  • Compile with /MD?

    Compile with /MD?

    The current compile option is MT, and statically linked Lua. When using lua.exe to load yue.dll, it crashes. For example, a memory created by lua.exe is freed within yue.dll.

    enhancement needs-more-information windows 
    opened by actboy168 6
  • use scoped_refptr to create containter may cause segmentation fault on ubuntu16.04

    use scoped_refptr to create containter may cause segmentation fault on ubuntu16.04

    environment:

    ubuntu 16.04

    issue description

    ref-counted container may cause segmentation fault if setting on_draw event.

    sample code

      scoped_refptr<nu::Container> radarView = new nu::Container;
      radarView->SetStyle("position", "absolute", "width", radar_view_size, "height", radar_view_size, "top", 0, "right", 0);
      radarView->on_draw.Connect([&](nu::Container* self, nu::Painter* painter, const nu::RectF& dirty){
        std::cout << "container on_draw on rect: " << self->GetBounds().ToString() << std::endl;
        scoped_refptr<nu::Canvas> temp_canvas = new nu::Canvas(nu::SizeF(radar_view_size, radar_view_size), 1.0f);
        nu::RectF bounds = self->GetBounds();
        painter->DrawCanvas(temp_canvas.get(), nu::RectF(0, 0, bounds.width(), bounds.height()));
      });
    
    needs-more-information 
    opened by sunbingfengPI 6
  • Label component does not works as expected

    Label component does not works as expected

    There is some issue with the label component.

    1. The alignment is seems to not be "start" as pointed in https://libyue.com/docs/latest/js/api/textattributes.html, but may be center
    2. The wrap does not work in next example, but if change the label to "Lorem\nIpsum is ..." (adding new line in some place) then it works

    Example code:

    
    const main = () => {
      console.log('main window')
      this.window = gui.Window.create({})
      this.window.setContentSize({ width: 280, height: 300 })
      this.window.setTitle(`Some window`)
      this.window.setAlwaysOnTop(true)
      const contentView = gui.Container.create()
    
      const appNameElement = gui.Label.create('Some title')
    
      const messageElement = gui.Label.create('Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry\'s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged.It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.')
      let defaultFont = gui.Font.default()
      messageElement.setFont(gui.Font.create(defaultFont.getName(), defaultFont.getSize() * 0.86, defaultFont.getWeight(), defaultFont.getStyle()))
      messageElement.setStyle({
        padding: 5,
        wrap: true,
        ellipsis: true,
        height: 80
      })
    
      contentView.addChildView(appNameElement)
      contentView.addChildView(messageElement)
      this.window.setContentView(contentView)
    
      this.window.setVisible(true)
      this.window.activate()
    }
    
    
    bug 
    opened by dimitrov-adrian 5
  • Way to package the app into a single executive?

    Way to package the app into a single executive?

    I really like the idea of yue, unfortunately the fact that it relies on a fork of node makes it incompatible with all the app packagers I've stumbled upon. Is there any way to turn a yue app to a simple to distribute executable?

    enhancement 
    opened by kuba-orlik 5
  • Cannot use mac menubar

    Cannot use mac menubar

    First of all, thank you for this awesome library! Do you have a patreon or github sponsorship option for this project I can contribute to? You should set one up if not!

    Here is the bug:

    Steps to reproduce:

    • Run muban example app (or any other yue app) under Mac OSX
    • Try to click menubar, note you cannot click items
    • Switch to another app, then back to muban
    • Note you can now click the menubar

    I am on Mac OSX 10.15 in case that matters. Yode v14.2.0

    I've tried things in code like deactivating and activating the window, hiding/showing the window, nothing seems to help. Only if you switch to another app, then back to a yue app does the menubar start working.

    Let me know if you need any other info or if you can think of a workaround. Thanks!

    opened by johnsusek 4
  • The text displayed by the label is incomplete

    The text displayed by the label is incomplete

    #30 has been fixed, but there are still bugs in some cases.

    local gui = require('yue.gui')
    
    local win = gui.Window.create{}
    win.onclose = function() gui.MessageLoop.quit() end
    
    local view1 = gui.Container.create()
    view1:setstyle { FlexGrow = 1 } 
    
    local view2 = gui.Container.create()
    view2:setstyle { Position = 'absolute' }
    view1:addchildview(view2)
    
    local label = gui.Label.create('测试测试')
    view2:addchildview(label) 
    
    win:setcontentview(view1)
    win:setcontentsize{width=400, height=400}
    win:center()
    win:activate()
    
    gui.MessageLoop.run()
    

    os : win10

    p

    bug windows 
    opened by actboy168 4
  • When window frame is false,SetResizable function is useless

    When window frame is false,SetResizable function is useless

    Yue Version: latest Operating System: windows 10

    This is great project. Thanks very much!

    When window frame is false. The window can not be resizeable. even if I call SetResizable(true).

      nu::Window::Options winOption;
      winOption.frame = false;
      scoped_refptr<nu::Window> window(new nu::Window(winOption));
      window->SetResizable(true);
      window->SetContentSize(nu::SizeF(400, 200));
      window->Center();
    
    bug needs-more-information windows 
    opened by xland 2
  • MessageLoop: exposing a step method

    MessageLoop: exposing a step method

    This is a feature suggestion.

    I would love if Yue exposed the wrapped event loop in a way it is possible to integrate it into some other event loop. For example, integrating Yue with the libuv bindings for Lua, Luv.

    All we would need to this is either a step method, each time that method is called the event loop would tick once, or, a way of yielding the MessageLoop allowing some other loop to tick (and possibly offering a callback that is called on each MessageLoop tick).

    Perhaps, it would make sense to have this on the roadmap of 1.0.0?

    enhancement 
    opened by Bilal2453 3
  • macOS+Lua notification center events not working

    macOS+Lua notification center events not working

    Yue Version: 0.10.2 Operating System: macOS

    Notification center event handlers seem to never be called. I've tried assigning to gui.notificationcenter.onnotificationshow, gui.notificationcenter.onnotificationclose, gui.notificationcenter.onnotificationclick, and gui.notificationcenter.onnotificationaction. Calling the :connect method on those slots (e.g. .onnotificationshow:connect()) fails with "attempt to index a nil value". Reading through the C++ code it looks like something should be there (all the names seem correct), but I don't understand the code well enough to guess what the issue might be.

    bug needs-more-information mac lua 
    opened by wahern 2
  • Lua in Windows does not work

    Lua in Windows does not work

    Yue Version: lua_yue_lua_5.1_v0.10.2_win_x64.zip, lua_yue_lua_5.4_v0.10.2_win_x64 Operating System: Windows 10, Windows 11 arm64

    .\lua.exe .\drawing.lua C:\nc\nc-server\test\yue\lua.exe: error loading module 'yue.gui' from file 'C:\nc\nc-server\test\yue\yue.dll': The operating system cannot run %1.

    This works in OSX but does not work in Windows with lua5.1, Luajit, or Lua 5.4. I also tried v0.10.1 and in Windows 11 arm64. Luajit was built with MinGW or native VS 2017. Both fail, always with the same error.

    question 
    opened by stuta 3
Releases(v0.11.0)
Purely native C++ cross-platform GUI framework for Android and iOS development. https://www.boden.io

BODEN CROSS-PLATFORM FRAMEWORK Build purely native cross-platform experiences with Boden Website ⬡ Getting Started ⬡ API Reference ⬡ Guides ⬡ Twitter

Ashampoo Systems GmbH & Co KG 1.5k Jun 26, 2022
wxWidgets is a free and open source cross-platform C++ framework for writing advanced GUI applications using native controls.

About wxWidgets is a free and open source cross-platform C++ framework for writing advanced GUI applications using native controls. wxWidgets allows y

null 4.4k Jun 28, 2022
DeskGap is a framework for building cross-platform desktop apps with web technologies (JavaScript, HTML and CSS).

A cross-platform desktop app framework based on Node.js and the system webview

Wang, Chi 1.8k Jun 24, 2022
A tiny cross-platform webview library for C/C++/Golang to build modern cross-platform GUIs.

webview for golang and c/c++ A tiny cross-platform webview library for C/C++/Golang to build modern cross-platform GUIs. The goal of the project is to

polevpn 12 Jun 7, 2022
A single-header ANSI C immediate mode cross-platform GUI library

Nuklear This is a minimal-state, immediate-mode graphical user interface toolkit written in ANSI C and licensed under public domain. It was designed a

Immediate Mode UIs, Nuklear, etc. 5.8k Jul 1, 2022
Cross-platform GUI library

Harbour Nuklear backend This backend provides support for Nuklear. It works on on all supported platforms with an OpenGL backend, including iOS and An

Rafał Jopek 2 Jan 19, 2022
U++ is a C++ cross-platform rapid application development framework focused on programmer's productivity. It includes a set of libraries (GUI, SQL, Network etc.), and integrated development environment (TheIDE).

Ultimate++ Ultimate++ is a C++ cross-platform rapid application development framework focused on programmers productivity. It includes a set of librar

Ultimate++ 454 Jun 25, 2022
A cross-platform GUI for jzIntv

jzIntvImGui Welcome to jzIntvImGui! It's an all-in-one powerful Dear ImGui interface which allows you to manage your collection of Intellivision games

null 4 May 8, 2022
FLTK - Fast Light Tool Kit - a cross-platform C++ GUI toolkit for UNIX(r)/Linux(r) (X11)

FLTK - Fast Light Tool Kit - a cross-platform C++ GUI toolkit for UNIX(r)/Linux(r) (X11)

The FLTK Team 909 Jun 22, 2022
This is a collection of widgets and utilities for the immediate mode GUI (imgui) that I am developing for the critic2 GUI

ImGui Goodies This is a collection of widgets and utilities for the immediate mode GUI (imgui) that I am developing for the critic2 GUI. Currently, th

null 95 Jun 22, 2022
Build performant, native and cross-platform desktop applications with Node.js and CSS like styling. 🚀

NodeGui Build performant, native and cross-platform desktop applications with Node.js and CSS like styling. ?? NodeGUI is powered by Qt5 ?? which make

NodeGui 7.7k Jun 25, 2022
GTK is a multi-platform toolkit for creating graphical user interfaces.

GTK — The GTK toolkit General information GTK is a multi-platform toolkit for creating graphical user interfaces. Offering a complete set of widgets,

GNOME Github Mirror 1k Jun 25, 2022
Create macOS universal binaries of your Qt apps

With Apple transition from Intel to Apple Silicon (arm64) CPUs, developers have to deal with Universal binaries in macOS (again) in order to support t

CrystalIDEA Software 49 Jun 3, 2022
Arcan is a powerful development framework for creating virtually anything from user interfaces

Arcan is a powerful development framework for creating virtually anything from user interfaces for specialized embedded applications all the way to full-blown standalone desktop environments.

Bjorn Stahl 1.1k Jul 2, 2022
Cross-platform malware development library for anti-analysis techniques

The Anti-Analysis Menagerie Cross-platform malware development library for anti-analysis techniques. Design Goals Provide a rich and convenient interf

Alan 19 Jun 23, 2022
Open Source, cross platform C++ library providing integration of VulkanSceneGraph with Qt windowing

Open Source, cross platform C++ library providing integration of VulkanSceneGraph with Qt windowing. Supports Windows, Linux and macOS.

Vulkan made easy 9 May 21, 2022
Tiny cross-platform webview library for C/C++/Golang. Uses WebKit (Gtk/Cocoa) and Edge (Windows)

A tiny cross-platform webview library for C/C++/Golang to build modern cross-platform GUIs. Also, there are Rust bindings, Python bindings, Nim bindings, Haskell, C# bindings and Java bindings available.

webview 10.2k Jun 24, 2022
NanoGUI is a minimalistic cross-platform widget library for OpenGL 3.x/DirectX11[12]/Vulkan

NanoGUI NanoGUI is a minimalistic cross-platform widget library for OpenGL 3.x/DirectX11[12]/Vulkan. It supports automatic layout generation, stateful

dalerank 68 Mar 26, 2022
Elements C++ GUI library

Elements C++ GUI library Introduction Elements is a lightweight, fine-grained, resolution independent, modular GUI library. Elements is designed with

Cycfi Research 2.3k Jun 25, 2022