public void AppendTab(string name, View view) { StdString nameStr = StdString.Create(name); Window_c.AppendTab(Pointer, nameStr.Pointer, view.Pointer); Views.Add(view); }
public void Close() { if (!IsValid) { return; } Window_c.Close(Pointer); }
public TabView GetTabView() { IntPtr pTabView = Window_c.GetTabView(Pointer); if (pTabView == IntPtr.Zero) { return(null); } return(new TabView(pTabView)); }
public void Show(bool visible) { if (!IsValid) { return; } if (!IsVisible) { Window_c.Show(Pointer, visible); } }
public bool FindView <T>(string name, out T view) where T : View { view = null; IntPtr pView = Window_c.FindView(Pointer, StdString.Create(name).Pointer); if (pView == IntPtr.Zero) { return(false); } view = Activator.CreateInstance(typeof(T), BindingFlags.NonPublic | BindingFlags.Instance, null, new object[] { pView }, null) as T; return(true); }
public static Window Create(Rect rect, string name, string name2, WindowStyle style, WindowFlags flags) { if (UIController.FindWindow(name, out Window existingWindow)) { return(existingWindow); } IntPtr pWindow = Window_c.Create(rect, name, name2, style, flags); if (pWindow == IntPtr.Zero) { return(null); } return(new Window(pWindow)); }
public unsafe Rect GetBounds() { IntPtr pRect = Rect_c.Create(); Rect unmanagedRect = *(Rect *)Window_c.GetBounds(Pointer, pRect); Rect rect = new Rect() { MinX = unmanagedRect.MinX, MinY = unmanagedRect.MinY, MaxX = unmanagedRect.MaxX, MaxY = unmanagedRect.MaxY }; Rect_c.Deconstructor(pRect); return(rect); }
public void MoveToCenter() { Window_c.MoveToCenter(Pointer); }
public void AppendChild(View view, bool unk) { Window_c.AppendChild(Pointer, view.Pointer, unk); }
public void SetTitle(string name) { StdString nameStr = StdString.Create(name); Window_c.SetTitle(Pointer, nameStr.Pointer); }