public WindowImpl(IAvaloniaNativeFactory factory) { using (var e = new WindowEvents(this)) { Init(_native = factory.CreateWindow(e), factory.CreateScreens()); } }
public AvaloniaNativeMenuExporter(IAvnWindow nativeWindow, IAvaloniaNativeFactory factory) { _factory = factory; _nativeWindow = nativeWindow; DoLayoutReset(); }
public WindowImpl(IAvaloniaNativeFactory factory, AvaloniaNativePlatformOptions opts) : base(opts) { using (var e = new WindowEvents(this)) { Init(_native = factory.CreateWindow(e), factory.CreateScreens()); } }
public AvaloniaNativeMenuExporter(IAvnWindow nativeWindow, IAvaloniaNativeFactory factory) { _factory = factory; _nativeWindow = nativeWindow; _applicationCommands = _factory.CreateApplicationCommands(); DoLayoutReset(); }
public WindowImpl(IAvaloniaNativeFactory factory, AvaloniaNativePlatformOptions opts) : base(opts) { _factory = factory; _opts = opts; using (var e = new WindowEvents(this)) { Init(_native = factory.CreateWindow(e), factory.CreateScreens()); } //NativeMenuExporter = new AvaloniaNativeMenuExporter(_native, factory); }
internal WindowImpl(IAvaloniaNativeFactory factory, AvaloniaNativePlatformOptions opts, AvaloniaNativePlatformOpenGlInterface glFeature) : base(opts, glFeature) { _factory = factory; _opts = opts; _glFeature = glFeature; using (var e = new WindowEvents(this)) { var context = _opts.UseGpu ? glFeature?.MainContext : null; Init(_native = factory.CreateWindow(e, context?.Context), factory.CreateScreens(), context); } NativeMenuExporter = new AvaloniaNativeMenuExporter(_native, factory); }
internal WindowImpl(IAvaloniaNativeFactory factory, AvaloniaNativePlatformOptions opts, GlPlatformFeature glFeature) : base(opts, glFeature) { _factory = factory; _opts = opts; _glFeature = glFeature; using (var e = new WindowEvents(this)) { Init(_native = factory.CreateWindow(e, _opts.UseGpu ? glFeature?.DeferredContext.Context : null), factory.CreateScreens()); } NativeMenuExporter = new AvaloniaNativeMenuExporter(_native, factory); }
private void SetMenu(IAvnWindow avnWindow, ICollection <NativeMenuItemBase> menuItems) { if (menuItems is null) { menuItems = new List <NativeMenuItemBase>(); } var appMenu = avnWindow.ObtainMainMenu(); if (appMenu is null) { appMenu = _factory.CreateMenu(); } appMenu.Clear(); AddItemsToMenu(appMenu, menuItems); avnWindow.SetMainMenu(appMenu); }
private void SetMenu(IAvnWindow avnWindow, NativeMenu menu) { var setMenu = false; if (_nativeMenu is null) { _nativeMenu = __MicroComIAvnMenuProxy.Create(_factory); _nativeMenu.Initialise(this, menu, ""); setMenu = true; } _nativeMenu.Update(_factory, menu); if (setMenu) { avnWindow.SetMainMenu(_nativeMenu); } }