mirror of
https://github.com/gnh1201/welsonjs.git
synced 2025-02-06 15:04:58 +00:00
Update gtkserver.js
This commit is contained in:
parent
38ae99300d
commit
d62a00c137
|
@ -2,6 +2,9 @@
|
|||
// GTKServer API
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// set binPath
|
||||
var binPath = "bin\\gtk-server.exe";
|
||||
|
||||
// Common (Elements)
|
||||
var GTKElements = [];
|
||||
|
||||
|
@ -37,7 +40,8 @@ var GTKElement = function(elementType) {
|
|||
// Window
|
||||
var Window = function() {
|
||||
GTKElement.apply(this, arguments);
|
||||
|
||||
|
||||
this.Type = "Window";
|
||||
this.Title = "WelsonJS GTK GUI Application";
|
||||
this.setTitle = function(title) {
|
||||
this.Title = title;
|
||||
|
@ -49,6 +53,8 @@ Window.prototype.constructor = Window;
|
|||
// Table
|
||||
var Table = function() {
|
||||
GTKElement.apply(this, arguments);
|
||||
|
||||
this.Type = "Table";
|
||||
this.attach = function(element, left, right, top, buttom) {
|
||||
// TODO: Table.Attach()
|
||||
};
|
||||
|
@ -59,7 +65,9 @@ Table.prototype.constructor = Table;
|
|||
// Button
|
||||
var Button = function() {
|
||||
GTKElement.apply(this, arguments);
|
||||
this.Text = "Button";
|
||||
|
||||
this.Type = "Button";
|
||||
this.Text = "New Button";
|
||||
this.setText = function(text) {
|
||||
this.Text = text;
|
||||
};
|
||||
|
@ -71,7 +79,9 @@ Button.prototype.constructor = Button;
|
|||
// Label
|
||||
var Label = function() {
|
||||
GTKElement.apply(this, arguments);
|
||||
this.Text = "Label";
|
||||
|
||||
this.Type = "Label";
|
||||
this.Text = "New Label";
|
||||
this.setText = function(text) {
|
||||
this.Text = text;
|
||||
};
|
||||
|
@ -82,7 +92,9 @@ Label.prototype.constructor = Label;
|
|||
// RadioBox
|
||||
var RadioBox = function() {
|
||||
GTKElement.apply(this, arguments);
|
||||
this.Text = "RadioBox";
|
||||
|
||||
this.Type = "RadioBox";
|
||||
this.Text = "New RadioBox";
|
||||
this.setText = function(text) {
|
||||
this.Text = text;
|
||||
};
|
||||
|
@ -93,7 +105,9 @@ RadioBox.prototype.constructor = RadioBox;
|
|||
// CheckBox
|
||||
var CheckBox = function() {
|
||||
GTKElement.apply(this, arguments);
|
||||
this.Text = "CheckBox";
|
||||
|
||||
this.Type = "CheckBox";
|
||||
this.Text = "New CheckBox";
|
||||
this.setText = function(text) {
|
||||
this.Text = text;
|
||||
};
|
||||
|
@ -103,10 +117,17 @@ CheckBox.prototype.constructor = CheckBox;
|
|||
|
||||
// TextBox
|
||||
var TextBox = function() {
|
||||
this.Text = "TextBox";
|
||||
GTKElement.apply(this, arguments);
|
||||
|
||||
this.Type = "TextBox";
|
||||
this.Text = "New TextBox";
|
||||
this.setText = function(text) {
|
||||
this.Text = text;
|
||||
};
|
||||
};
|
||||
TextBox.prototype = new GTKElement();
|
||||
TextBox.prototype.constructor = TextBox;
|
||||
|
||||
exports.start = function(callback) {
|
||||
// TODO: start
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue
Block a user