Hot Door CORE 0.8.2
Adobe® Illustrator® Plug-in Library
Loading...
Searching...
No Matches
hdicoreWebView.h
Go to the documentation of this file.
1
7#ifndef __HDI_CORE_WEBVIEW__
8#define __HDI_CORE_WEBVIEW__
9
10#include <vector>
11
12#include "hdicoreMacros.h"
13
14#include "hdicoreWidget.h"
15
16namespace hdi
17{
18 namespace core
19 {
20 class Callback;
21
25 class WebView : public Widget
26 {
27 public:
28 typedef std::vector<std::string> StringVector;
29
41
49 WebView(const WebView& wv_);
50
58 WebView(const Rect& frame_);
59
65 virtual ~WebView();
66
75 virtual WebView& operator=(const WebView& rhs_);
76
90 virtual WebView* clone() const;
91
102 virtual WebView* duplicate() const;
103
111 virtual std::string text() const;
112
120 virtual void setText(const std::string& text_);
121
129 virtual std::string tooltip() const;
130
138 virtual void setTooltip(const std::string& tip_);
139
147 virtual std::string currentURL() const;
148
156 virtual void loadURL(const std::string& url_);
157
163 virtual void stopLoading();
164
170 virtual void reload();
171
179 virtual bool goBack();
180
188 virtual bool goForward();
189
197 virtual bool isLoading() const;
198
214 const std::string& func_,
215 const StringVector& args_,
216 const Callback& callback_
217 );
218
230 virtual std::string javaScriptFunctionResult();
231
244 virtual bool javaScriptFunctionError(std::string& error_);
245
246 #if defined(MAC_ENV)
254 virtual double estimatedProgress() const;
255 #endif
256 };
257
258 typedef std::unique_ptr<WebView> WebViewUP;
259 typedef std::shared_ptr<WebView> WebViewSP;
260 typedef std::weak_ptr<WebView> WebViewWP;
261 }
262}
263
264#endif
265// __HDI_CORE_WEBVIEW__
Base class for templated __Callback class.
Definition: hdicoreCallback.h:68
Contains Point and Size objects to describe a rectangle that exists at a specific point of given dime...
Definition: hdicoreRect.h:34
WebView widget, for loading a website within a UI window.
Definition: hdicoreWebView.h:26
virtual void loadURL(const std::string &url_)
Loads the given HTTP(S) URL.
virtual std::string tooltip() const
Does nothing (web views do not have a tooltip)
virtual std::string text() const
Does nothing (web views do not have a text value)
virtual void callJavaScriptFunction(const std::string &func_, const StringVector &args_, const Callback &callback_)
Calls the provided JavaScript function, calling the callback when it has finished.
virtual bool goForward()
Goes forward one step in the browsing history.
virtual WebView * clone() const
Convenience method to clone a WebView object on the heap.
virtual void stopLoading()
Stops any page loading that might be occurring.
virtual ~WebView()
WebView destructor.
virtual bool javaScriptFunctionError(std::string &error_)
Returns the error state, if any, from a prior JavaScript function call via the callJavaScriptFunction...
WebView()
Constructs an empty WebView object.
virtual void reload()
Reloads the currently loaded page, if any.
virtual WebView * duplicate() const
Convenience method to duplicate a WebView object, creating a new and identical UI element to the targ...
WebView(const WebView &wv_)
Constructs a new WebView object from an existing WebView object (copy constructor)
virtual void setTooltip(const std::string &tip_)
Does nothing (web views do not have a tooltip)
WebView(const Rect &frame_)
Constructs a web view with a given frame.
virtual WebView & operator=(const WebView &rhs_)
Allows one WebView object to be assigned from another.
virtual bool goBack()
Goes back one step in the browsing history.
virtual std::string currentURL() const
Gets the currently loaded URL.
virtual bool isLoading() const
Gets whether the target web view is currently loading a page.
virtual void setText(const std::string &text_)
Does nothing (web views do not have a text value)
virtual std::string javaScriptFunctionResult()
Returns the result from a prior JavaScript function call via the callJavaScriptFunction() method.
Base class for all interface widgets; handles many common needs, e.g. text, position,...
Definition: hdicoreWidget.h:30
Header file for a variety of plugin convenience macros.
Header file for plugin user interface widgets.