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 ();
        }
예제 #2
0
 public void Replace(Gtk.Bin parent)
 {
     Gtk.Widget c = parent.Child;
     parent.Remove(c);
     Add(c);
     parent.Add(this);
 }
예제 #3
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);
 }