GithubHelp home page GithubHelp logo

hdfsun / giu Goto Github PK

View Code? Open in Web Editor NEW

This project forked from allendang/giu

0.0 1.0 0.0 1.4 MB

Cross platform rapid GUI framework for golang based on Dear ImGui.

License: MIT License

Go 10.52% C++ 76.76% C 12.72%

giu's Introduction

giu

Join the chat at https://gitter.im/AllenDang-giu/community Go Report Card Build Status Godoc Card

Cross platform rapid GUI framework for golang based on Dear ImGui and the great golang binding imgui-go.

Any contribution (features, widgets, tutorials, documents and etc...) is appreciated!

Supported Platforms

giu is built upon GLFW v3.3, so idealy giu could support all platforms that GLFW v3.3 supports.

  • Windows (only tested on Windows 10 x64)
  • MacOS (only tested on MacOS v10.15)
  • Linux (thanks remeh to test it)
  • Raspberry pi 3b (thanks sndvaps to test it)

Features

Compare to other Dear ImGui golang bindings, giu has following features:

  • Live-update during the resizing of OS window (implemented on GLFW 3.3 and OpenGL 3.2).
  • Redraw only when user event occurred. Costs only 0.5% CPU usage with 60FPS.
  • Declarative UI (see examples for more detail).
  • DPI awareness (auto scale font and UI to adapte high DPI monitor).
  • Drop in usage, no need to implement render and platform.
  • Freetype font rendering support.
  • OS clipboard support.

Screenshot

Hello world

package main

import (
    "fmt"

    g "github.com/AllenDang/giu"
)

func onClickMe() {
    fmt.Println("Hello world!")
}

func onImSoCute() {
    fmt.Println("Im sooooooo cute!!")
}

func loop() {
    g.SingleWindow("hello world", g.Layout{
        g.Label("Hello world from giu"),
        g.Line(
            g.Button("Click Me", onClickMe),
            g.Button("I'm so cute", onImSoCute)),
        })
}

func main() {
    wnd := g.NewMasterWindow("Hello world", 400, 200, g.MasterWindowFlagsNotResizable, nil)
    wnd.Main(loop)
}

Here is result.

Helloworld

Document

Check Wiki

Projects using giu

PipeIt is a text transformation, conversion, cleansing and extraction tool.

PipeIt Demo

giu's People

Contributors

allendang avatar deanpdx avatar gitter-badger avatar bezrazli4n0 avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.