Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
some gui for nodeJS
C++ C JavaScript CoffeeScript
Branch: dev
Pull request Compare This branch is even with tim-smart:dev.

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
src
.gitignore
Makefile
README.md
gtk.js
packages.json
test.js
wscript

README.md

Some basic GTK functions bindings

It's just an experement, but if you're interested, you can fork it! Now it works only with GTK, but you can write bindings for any toolkit.

Now works: var gui=require('./gtk');

var wnd = gui.window({
    title: 'Тестовое приложение',
    width: 600,
    height: 400,
    items: [
        gui.button({
            title: 'шапка',
        }),
        gui.h([
            gui.button({
                title: 'лево',
            }),
            gui.button({
                title: 'право',
                onClick: function() {
                    gui.alert('wow');
                }
            })
        ]),
        gui.button({
            title: 'футер',
        })
    ],
    onClose: function() {
        gui.alert('Good bie!');
    }
}).show();

Design, I suggest: var gui=require('./gtk');

var wnd=gui.window({
    name: "test Application",
    width: 300,
    height: 200,
    items: [
        gui.H([
            gui.label({
                text: 'Enter your name:'
            }),
            gui.input({
                value: 'Here'
            })
        ]),
        gui.V([
            gui.button({
                text: 'Save',
                onClick: function() {
                    save(wnd.items.H[0].input[0].value);
                }
            }),
            gui.button({
                text: 'Cancel',
                onClick: function() {
                    wnd.close();
                }
            })
        ])
    ]
}).show();

TODO:

GtkWindow

  • All Getters
  • Accelorator Groups (keyboard combos)
  • Focus (need to pass widgets around)
  • Pagers
  • Hints
  • Gravity
  • Make GtkWidget bindings and subclass it for shared methods
Something went wrong with that request. Please try again.