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