// Copyright (c) 2013-2021 Bruyère Jean-Philippe // // This code is licensed under the MIT license (MIT) (http://opensource.org/licenses/MIT) using System; using Crow; using System.IO; using System.Text; using Crow.IML; using System.Runtime.CompilerServices; using Glfw; using System.Diagnostics; using Crow.Text; using System.Collections.Generic; using Encoding = System.Text.Encoding; using Samples; namespace ShowCase { class Showcase : SampleBaseForEditor { DbgEvtType[] logEvts = { DbgEvtType.MouseEnter, DbgEvtType.MouseLeave, DbgEvtType.WidgetMouseDown, DbgEvtType.WidgetMouseUp, DbgEvtType.WidgetMouseClick, }; static void Main () { initDebugLog (); Environment.SetEnvironmentVariable ("FONTCONFIG_PATH", @"C:\Users\Jean-Philippe\source\vcpkg\installed\x64-windows\tools\fontconfig\fonts"); using (Showcase app = new Showcase ()) { app.WindowTitle = "C.R.O.W Showcase"; app.SetWindowIcon ("#Crow.Icons.crow.png"); //app.Theme = @"C:\Users\Jean-Philippe\source\Crow\Themes\TestTheme"; CurrentProgramInstance = app; //Interface.UPDATE_INTERVAL = 50; //Interface.POLLING_INTERVAL = 5; app.Run (); } } public Container crowContainer; Stopwatch reloadChrono = new Stopwatch (); public override string Source { get => source; set { if (source == value) return; source = value; CMDSave.CanExecute = IsDirty; if (!reloadChrono.IsRunning) reloadChrono.Restart (); NotifyValueChanged (source); NotifyValueChanged ("IsDirty", IsDirty); } } public bool EncloseInTemplatedControl { get => Configuration.Global.Get ("EncloseInTemplatedControl", false); set { if (EncloseInTemplatedControl == value) return; Configuration.Global.Set ("EncloseInTemplatedControl", value); NotifyValueChanged (value); if (!reloadChrono.IsRunning) reloadChrono.Restart (); } } public string TemplateContainerSource { get => Configuration.Global.Get ("TemplateContainerSource", "