Inheritance: SplitContainer
示例#1
0
文件: Window.cs 项目: mono/uia2atk
		internal override void PreRemoveChild (Atk.Object childToRemove)
		{
			if (splitter != null && childToRemove == splitter) {
				splitter = null;
				ParentAdapter parentAdapter = childToRemove as ParentAdapter;
				int count = parentAdapter.NAccessibleChildren;
				while (count > 0) {
					Atk.Object obj = parentAdapter.RefAccessibleChild (0);
					parentAdapter.RemoveChild (obj, false);
					SetParent (obj, this);
					AddOneChild (obj);
					count--;
				}
			}
			base.PreRemoveChild (childToRemove);
		}
示例#2
0
文件: Window.cs 项目: mono/uia2atk
		internal override void AddOneChild (Atk.Object child)
		{
			if (splitter != null) {
				splitter.AddOneChild (child);
				return;
			}

			base.AddOneChild (child);
			if (child is Splitter) {
				splitter = (Splitter)child;
				// Remove any other existing children and
				// add them to the splitter
				int count = NAccessibleChildren;
				for (int i = 0; i < count;) {
					Atk.Object obj = RefAccessibleChild (i);
					if (obj == child) {
						i++;
						continue;
					}
					RemoveChild (obj, false);
					SetParent (obj, child);
					splitter.AddOneChild (obj);
					count--;
				}
			//LAMESPEC: yeah, atk docs just mention this subtle difference between a Frame and a Dialog...
			} else if (child is MenuBar && Role == Atk.Role.Dialog)
				Role = Atk.Role.Frame;
		}