Collab
Closed this issue · 5 comments
Hey Andrea, let's stick with your repo here since you got npm and Travis set up already.
Will integrate some of my code into the code base by next week. :) Think it would be better if the window function is structured like this:
const window = new libui.Window({
title: 'Cool',
width: 700,
height: 700,
hasMenu: true,
margined: false,
onClosing: (err) => {
console.log('exited')
},
});
And also integrate some of my menu code:
const menu = new libui.Menu('File', [
{
label: 'Open',
type: 'item',
onClick: () => {
const filepath = window.openFile();
if (!filepath) {
window.msgBox('No file selected', "Don't be alarmed");
return;
}
window.msgBox('File selected', filepath);
}
},
{
label: 'Save',
type: 'item',
onClick: () => {
const filepath = window.saveFile();
if (!filepath) {
window.msgBox('No file selected', "Don't be alarmed");
return;
}
window.msgBox('File selected', filepath);
},
},
{
type: 'about',
onClick: () => {
console.log('about');
},
},
{
type: 'check',
label: 'Check this',
onClick: () => {
console.log('check');
},
},
{
type: 'preferences',
onClick: () => {
console.log('preferences');
},
},
]);
My long term plan is to use libui-node and make React components out of it. So others can create desktop apps with React.
Hey Andrea, let's stick with your repo here since you got npm and Travis set up already.
👍 I'll add you as collaborator here and on NPM
Will integrate some of my code into the code base by next week. :)
Awesome!
My long term plan is to use libui-node and make React components out of it. So others can create desktop apps with React.
Agreed. I'm planning to do same.
Think it would be better if the window function is structured like this:
What I was thinking is to provide here a barebone API similar to that of libui (using plain functions) and then provide two other modules, one with an imperative API (like the one you started) and another one React Native like.
Anyway, I don't have strong feeling about, I just started and, to be honest, even though I have some year of js - node experience, this is my first native addon, so I'm not sure this make sense (one of the advantages of this plan for me is to reduce amount on C++ code where I'm not so experienced...)
Yeap let's go with barebones. And I'm similar to you. Years of js/node knowledge but I don't really have any knowledge making addons. Pretty new to C++.
Oh that's unfortunate... Well, let's learn together!
Do you have an account on NPM? I'll add you as owner of the package
I'm mavenave on npm also :)
Obviously... Added!