public ChessGameWidget(Widget board)
        {
            whiteLabel = new Label ();
            blackLabel = new Label ();

            blackClock = new ChessClock ();
            blackHBox = new HBox ();
            blackHBox.PackStart (blackLabel, true, true, 2);
            blackHBox.PackStart (blackClock, false, false, 2);

            whiteClock = new ChessClock ();
            whiteHBox = new HBox ();
            whiteHBox.PackStart (whiteLabel, true, true, 2);
            whiteHBox.PackStart (whiteClock, false, false, 2);

            topBin = new Frame ();
            bottomBin = new Frame ();

            whiteAtBottom = true;
            topBin.Add (blackHBox);
            bottomBin.Add (whiteHBox);

            PackStart (topBin, false, false, 2);
            PackStart (board, true, true, 2);
            PackStart (bottomBin, false, false, 2);

            topBin.ShowAll ();
            bottomBin.ShowAll ();
        }
Beispiel #2
0
 public void Replace(Gtk.Bin parent)
 {
     Gtk.Widget c = parent.Child;
     parent.Remove(c);
     Add(c);
     parent.Add(this);
 }
 public WorkspaceService(Gtk.Bin mainWindow, DrawingArea designArea, DrawingArea previewArea, PropertyGrid.PropertyGrid propertyGrid, Gtk.Label statusLabel)
 {
     this.designArea   = designArea;
     this.previewArea  = previewArea;
     this.propertyGrid = propertyGrid;
     this.mainControl  = mainWindow;
     this.StatusLabel  = statusLabel;
 }
Beispiel #4
0
 public static BinContainer Attach(Bin bin)
 {
     BinContainer bc = new BinContainer ();
     bin.SizeRequested += bc.OnSizeRequested;
     bin.SizeAllocated += bc.OnSizeAllocated;
     bin.Added += bc.OnAdded;
     return bc;
 }
 public WorkspaceService(Gtk.Bin mainWindow, DrawingArea designArea,DrawingArea previewArea, PropertyGrid.PropertyGrid propertyGrid,Gtk.Label statusLabel)
 {
     this.designArea = designArea;
     this.previewArea = previewArea;
     this.propertyGrid = propertyGrid;
     this.mainControl = mainWindow;
     this.StatusLabel = statusLabel;
 }
        public static BinContainer Attach(Gtk.Bin bin)
        {
            BinContainer bc = new BinContainer();

            bin.SizeRequested += new Gtk.SizeRequestedHandler(bc.OnSizeRequested);
            bin.SizeAllocated += new Gtk.SizeAllocatedHandler(bc.OnSizeAllocated);
            bin.Added         += new Gtk.AddedHandler(bc.OnAdded);
            return(bc);
        }
Beispiel #7
0
		private void CleanBin (Bin bin) 
		{
			if (bin.Child != null)
				bin.Remove (bin.Child);
		}
Beispiel #8
0
 void CreateCustomWidget(string wname)
 {
     Gtk.Widget w   = GladeCustomWidgetHandler(null, null, wname, null, null, 0, 0);
     Gtk.Bin    bin = (Gtk.Bin)gxml[wname + "_box"];
     bin.Add(w);
 }