Added buttons

This commit is contained in:
Crom (Thibaut CHARLES) 2014-11-18 14:06:26 +01:00
parent 25b97424a5
commit 1035cd010a

View File

@ -15,11 +15,11 @@ import gtk.Entry;
import gtk.CellRenderer; import gtk.CellRenderer;
import gtk.CellRendererText; import gtk.CellRendererText;
import gtk.VBox; import gtk.VBox;
import gtk.Statusbar;
import gtk.Button; import gtk.Button;
import gtk.HBox;
void main(string[] args) void main(string[] args)
{ {
@ -34,10 +34,10 @@ void main(string[] args)
auto buttonSave = new Button("document-save-symbolic", GtkIconSize.MENU); auto buttonSave = new Button("document-save-symbolic", GtkIconSize.MENU);
auto buttonOpen = new Button("document-open-symbolic", GtkIconSize.MENU); auto buttonOpen = new Button("document-open-symbolic", GtkIconSize.MENU);
auto buttonInsert = new Button("format-text-direction-ltr-symbolic", GtkIconSize.SMALL_TOOLBAR);
auto buttonDelete = new Button("user-trash-symbolic", GtkIconSize.SMALL_TOOLBAR);
auto buttonRenumber = new Button("view-list-symbolic", GtkIconSize.SMALL_TOOLBAR);
//"user-trash-symbolic"
//"format-text-direction-ltr-symbolic"
//"view-list-symbolic"
version(Windows){ version(Windows){
//Menu bar //Menu bar
import gtk.HBox; import gtk.HBox;
@ -61,6 +61,13 @@ void main(string[] args)
header.packEnd(buttonSave); header.packEnd(buttonSave);
} }
//Status bar
auto statusbar = new HBox(false, 0);
cont.packEnd(statusbar, false, false, 5);
statusbar.packStart(buttonRenumber, false, false, 5);
statusbar.packStart(buttonInsert, false, false, 5);
statusbar.packStart(buttonDelete, false, false, 5);
//TreeView to display database //TreeView to display database
auto tree = new TreeView(); auto tree = new TreeView();
cont.packEnd(tree, true, true, 0); cont.packEnd(tree, true, true, 0);
@ -199,6 +206,8 @@ void Open(string file, ref TreeView tree, Object header){
//Autosize columns //Autosize columns
tree.columnsAutosize(); tree.columnsAutosize();
tree.setSizeRequest(50, 50);
} }