-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Héctor Barreras Almarcha
committed
Jun 29, 2016
1 parent
0f387b8
commit 1bceff4
Showing
6 changed files
with
140 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,3 +22,6 @@ docs/ | |
|
||
# Code coverage | ||
*.lst | ||
|
||
#Project custom | ||
out/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"name": "puppeteer-gui", | ||
"description": "GUI frontend for the puppeteer library", | ||
|
||
"authors": ["Héctor Barreras Almarcha @Dechcaudron"], | ||
"license": "GPL-3.0", | ||
|
||
"dependencies" : { | ||
"puppeteer" : "~>0.6.0", | ||
"gtk-d": "~>3.3.1", | ||
"ggplotd": "~>0.9.4" | ||
}, | ||
|
||
"subConfigurations": { | ||
|
||
}, | ||
|
||
"targetPath" : "out" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"fileVersion": 1, | ||
"versions": { | ||
"arith-eval": "0.4.0", | ||
"painlesstraits": "0.2.0", | ||
"cairod": "0.0.1-alpha.3+1.10.2", | ||
"gtk-d": "3.3.1", | ||
"x11": "1.0.14", | ||
"derelict-ft": "1.0.2", | ||
"puppeteer": "0.6.0", | ||
"ggplotd": "0.9.4", | ||
"pegged": "0.3.2", | ||
"derelict-util": "2.0.6", | ||
"windows-headers": "1.0.1", | ||
"dstats": "1.0.3", | ||
"onyx-serial": "0.5.0", | ||
"onyx-config": "2.0.5", | ||
"dunit": "1.0.12" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import std.stdio; | ||
import puppeteer_gui.gui.igui; | ||
|
||
void main(string[] args) | ||
{ | ||
IGUI gui = IGUI.getInstance(args); | ||
|
||
IWindow mainWindow = gui.createMainWindow("Main"); | ||
mainWindow.show(); | ||
|
||
gui.run(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
module puppeteer_gui.gui.gtkd.wrapper; | ||
|
||
import puppeteer_gui.gui.igui; | ||
|
||
import gtk.Main; | ||
|
||
public class GTKGuiWrapper : IGUI | ||
{ | ||
this(string[] args) | ||
{ | ||
Main.init(args); | ||
} | ||
|
||
public IWindow createMainWindow(string title) | ||
{ | ||
return new GTKMainWindow(title); | ||
} | ||
|
||
public IWindow createWindow(string title) | ||
{ | ||
return new GTKWindow(title); | ||
} | ||
|
||
public void run() | ||
{ | ||
Main.run(); | ||
} | ||
} | ||
|
||
private class GTKWindow : IWindow | ||
{ | ||
import gtk.Window; | ||
|
||
Window window; | ||
|
||
this(string title) | ||
{ | ||
generateWindow(title); | ||
} | ||
|
||
void generateWindow(string title) | ||
{ | ||
window = new Window(title); | ||
} | ||
|
||
void show() | ||
{ | ||
window.show(); | ||
} | ||
} | ||
|
||
private class GTKMainWindow : GTKWindow | ||
{ | ||
import gtk.MainWindow; | ||
|
||
this(string title) | ||
{ | ||
super(title); | ||
} | ||
|
||
override void generateWindow(string title) | ||
{ | ||
window = new MainWindow(title); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
module puppeteer_gui.gui.igui; | ||
|
||
import puppeteer_gui.gui.gtkd.wrapper; | ||
|
||
public interface IGUI | ||
{ | ||
static IGUI getInstance(string[] args) | ||
{ | ||
return new GTKGuiWrapper(args); | ||
} | ||
|
||
IWindow createMainWindow(string title); | ||
IWindow createWindow(string title); | ||
|
||
void run(); | ||
} | ||
|
||
public interface IWindow | ||
{ | ||
void show(); | ||
} |