Example #1
0
        private bool FindWebView(string webViewUrl, out WebView webView)
        {
            webView = null;
            string key = WebViewEditorWindow.MakeUrlKey(webViewUrl);

            return(this.m_RegisteredViews.TryGetValue(key, out webView));
        }
Example #2
0
        public static void RunTestScript(string path)
        {
            string sourcesPath = "file:///" + path;

            JSProxyMgr.GetInstance().AddGlobalObject("WebViewTestFunctions", new WebViewTestFunctions());
            WebViewEditorWindow.Create <WebViewEditorWindowTabs>("Test Window", sourcesPath, 0, 0, 0, 0).OnBatchMode();
        }
Example #3
0
        public static void RunTestScript(string path)
        {
            string sourcesPath = "file:///" + path;
            WebViewEditorWindow webViewEditorWindow = WebViewEditorWindow.Create <WebViewTestFunctions>("Test Window", sourcesPath, 0, 0, 0, 0);

            webViewEditorWindow.OnBatchMode();
        }
Example #4
0
        public static T CreateBase <T>(string title, string sourcesPath, int minWidth, int minHeight, int maxWidth, int maxHeight) where T : WebViewEditorWindow
        {
            T window = EditorWindow.GetWindow <T>(title);

            WebViewEditorWindow.CreateWindowCommon <T>((T)((object)window), title, sourcesPath, minWidth, minHeight, maxWidth, maxHeight);
            window.Show();
            return(window);
        }
Example #5
0
        public static T CreateUtility <T>(string title, string sourcesPath, int minWidth, int minHeight, int maxWidth, int maxHeight) where T : WebViewEditorWindow
        {
            T t = ScriptableObject.CreateInstance <T>();

            t.m_GlobalObjectTypeName = typeof(T).FullName;
            WebViewEditorWindow.CreateWindowCommon <T>((T)((object)t), title, sourcesPath, minWidth, minHeight, maxWidth, maxHeight);
            t.ShowUtility();
            return(t);
        }
Example #6
0
        public static WebViewEditorWindow CreateBase(string title, string sourcesPath, int minWidth, int minHeight, int maxWidth, int maxHeight)
        {
            WebViewEditorWindow window = EditorWindow.GetWindow <WebViewEditorWindow>(title);

            window.minSize                = new Vector2((float)minWidth, (float)minHeight);
            window.maxSize                = new Vector2((float)maxWidth, (float)maxHeight);
            window.m_InitialOpenURL       = sourcesPath;
            window.m_GlobalObjectTypeName = null;
            window.Init();
            window.Show();
            return(window);
        }
Example #7
0
        public static WebViewEditorWindow Create <T>(string title, string sourcesPath, int minWidth, int minHeight, int maxWidth, int maxHeight) where T : new()
        {
            WebViewEditorWindow window = ScriptableObject.CreateInstance <WebViewEditorWindow>();

            window.titleContent           = new GUIContent(title);
            window.minSize                = new Vector2((float)minWidth, (float)minHeight);
            window.maxSize                = new Vector2((float)maxWidth, (float)maxHeight);
            window.m_InitialOpenURL       = sourcesPath;
            window.m_GlobalObjectTypeName = typeof(T).FullName;
            window.Init();
            window.Show();
            return(window);
        }
 public static void RunTestScript(string path)
 {
     WebViewEditorWindow.Create <WebViewTestFunctions>("Test Window", "file:///" + path, 0, 0, 0, 0).OnBatchMode();
 }
Example #9
0
        public WebView GetWebViewFromURL(string url)
        {
            string key = WebViewEditorWindow.MakeUrlKey(url);

            return(this.m_RegisteredViews[key]);
        }
Example #10
0
        private void RegisterWebviewUrl(string webViewUrl, WebView view)
        {
            string key = WebViewEditorWindow.MakeUrlKey(webViewUrl);

            this.m_RegisteredViews[key] = view;
        }
Example #11
0
        protected void UnregisterWebviewUrl(string webViewUrl)
        {
            string key = WebViewEditorWindow.MakeUrlKey(webViewUrl);

            this.m_RegisteredViews[key] = null;
        }
Example #12
0
 protected void UnregisterWebviewUrl(string webViewUrl)
 {
     this.m_RegisteredViews[WebViewEditorWindow.MakeUrlKey(webViewUrl)] = (WebView)null;
 }