Example #1
0
File: Screen.cs Project: abock/ctk
 protected override void OnChildAdded(Widget child)
 {
     if (ChildCount > 1) {
         Remove (child);
         throw new InvalidOperationException ("Ctk.Screen can have only one child");
     }
 }
Example #2
0
File: Box.cs Project: abock/ctk
 protected override void OnChildRemoved(Widget child)
 {
     packing_map.Remove (child);
 }
Example #3
0
File: Box.cs Project: abock/ctk
 protected override void OnChildAdded(Widget child)
 {
     if (!packing_map.ContainsKey (child)) {
         packing_map.Add (child, new Packing ());
     }
 }
Example #4
0
File: Box.cs Project: abock/ctk
 public void PackStart(Widget child, bool fill, bool expand, int spacing)
 {
     Pack (child, new Packing (fill, expand, spacing), false);
 }
Example #5
0
File: Box.cs Project: abock/ctk
 public void PackStart(Widget child)
 {
     Pack (child, new Packing (), false);
 }
Example #6
0
File: Box.cs Project: abock/ctk
 public void PackEnd(Widget child, bool fill, bool expand, int spacing)
 {
     Pack (child, new Packing (fill, expand, spacing), true);
 }
Example #7
0
File: Box.cs Project: abock/ctk
 public void PackEnd(Widget child)
 {
     Pack (child, new Packing (), true);
 }
Example #8
0
File: Box.cs Project: abock/ctk
 private void Pack(Widget child, Packing packing, bool end)
 {
     MapPacking (child, packing);
     Add (child);
 }
Example #9
0
File: Box.cs Project: abock/ctk
 private void MapPacking(Widget child, Packing packing)
 {
     if (packing_map.ContainsKey (child)) {
         packing_map[child] = packing;
     } else {
         packing_map.Add (child, packing);
     }
 }