Giter Club home page Giter Club logo

gominiblink's Introduction

GoMiniblink

介绍

  1. 不使用CGO
  2. 面向对象
  3. 跨平台设计,但目前只有一个windows实现
  4. 组件和窗体两种模式
  5. JS互操作
  6. 监控与拦截请求
  7. 透明窗体
  8. 支持本地目录加载模式

简单的例子

package main

import (
	gm "gitee.com/aochulai/GoMiniblink"
	cs "gitee.com/aochulai/GoMiniblink/forms/controls"
	ws "gitee.com/aochulai/GoMiniblink/forms/windows"
)

func main() {
    //windows版本初始化
    cs.App = new(ws.Provider).Init()
    
    //创建一个窗体并设置基本属性
    frm := new(cs.Form).Init()
    frm.SetTitle("普通窗口")
    frm.SetSize(800, 500)
	
    //创建浏览器控件并设置基本属性
    mb := new(gm.MiniblinkBrowser).Init()
    mb.SetSize(700, 400)
    
    //添加浏览器控件到窗体
    frm.AddChild(mb)
    //注册回调, EvLoad回调在窗体首次显示前触发
    frm.EvLoad["回调名称"] = func(s cs.GUI) {
        //加载网址
        mb.LoadUri("https://www.baidu.com")
    }
    //将frm作为主窗口打开
    cs.Run(frm)
}

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.