API  0.9.7
 All Classes Files Functions Variables Macros Groups Pages
CPWebView Class Reference

#import <CPWebView.h>

+ Inheritance diagram for CPWebView:

Instance Methods

(WebBackForwardList) - backForwardList
 
(BOOL) - canGoBack
 
(BOOL) - canGoForward
 
(void) - close
 
(DOMCSSStyleDeclaration) - computedStyleForElement:pseudoElement:
 
(DOMWindow) - DOMWindow
 
(id) - downloadDelegate
 
(BOOL) - drawsBackground
 
(int) - effectiveScrollMode
 
(void) - encodeWithCoder:
 
(id) - frameLoadDelegate
 
(BOOL) - goBack
 
(action) - goBack:
 
(BOOL) - goForward
 
(action) - goForward:
 
(id) - initWithCoder:
 
(id) - initWithFrame:
 
(id) - initWithFrame:frameName:groupName:
 
(BOOL) - isLoading
 
(void) - loadHTMLString:
 
(void) - loadHTMLString:baseURL:
 
(CPString- mainFrameURL
 
(JSObject) - objectByEvaluatingJavaScriptFromString:
 
(id) - policyDelegate
 
(action) - print:
 
(action) - reload:
 
(id) - resourceLoadDelegate
 
(void) - setBackgroundColor:
 
(void) - setDownloadDelegate:
 
(void) - setDrawsBackground:
 
(void) - setFrameLoadDelegate:
 
(void) - setFrameSize:
 
(void) - setMainFrameURL:
 
(void) - setPolicyDelegate:
 
(void) - setResourceLoadDelegate:
 
(void) - setScrollMode:
 
(void) - setUIDelegate:
 
(action) - stopLoading:
 
(CPString- stringByEvaluatingJavaScriptFromString:
 
(action) - takeStringURLFrom:
 
(id) - UIDelegate
 
(void) - viewDidUnhide
 
(CPWebScriptObject- windowScriptObject
 

Detailed Description

CPWebView allows you to display arbitrary HTML or embed a webpage inside your application.

It's important to note that the same origin policy applies to this view. That is, if the web page being displayed is not located in the same origin (protocol, domain, and port) as the application, you will have limited control over the view and no access to its contents. Furthermore, Cappuccino style scrollbars can't be used to scroll it.

Definition at line 2 of file CPWebView.h.

Method Documentation

- (WebBackForwardList) backForwardList
implementation

Definition at line 654 of file CPWebView.j.

- (BOOL) canGoBack
implementation

Checks to see if the webview has a history stack you can navigate back through.

Returns
BOOL - YES if the receiver can navigate backward through history, otherwise NO.

Definition at line 638 of file CPWebView.j.

- (BOOL) canGoForward
implementation

Checks to see if the webview has a history stack you can navigate forward through.

Returns
BOOL - YES if the receiver can navigate forward through history, otherwise NO.

Definition at line 649 of file CPWebView.j.

- (void) close
implementation

Closes the webview by unloading the webpage. The webview will no longer respond to load requests or delegate methods once this is called.

Definition at line 664 of file CPWebView.j.

- (DOMCSSStyleDeclaration) computedStyleForElement: (DOMElement)  element
pseudoElement: (CPString pseudoElement 
implementation

Gets the computed style for an element.

Parameters
DOMElement- An Element.
pseudoElement- A pseudoElement.
Returns
DOMCSSStyleDeclaration - The computed style for an element.

Definition at line 737 of file CPWebView.j.

- (DOMWindow) DOMWindow
implementation

Returns the window object of the webview.

Returns
DOMWindow - The window object.

Definition at line 674 of file CPWebView.j.

- (id) downloadDelegate
implementation

Definition at line 875 of file CPWebView.j.

- (BOOL) drawsBackground
implementation
Returns
BOOL - YES if the webview draws its own background, otherwise NO.

Definition at line 753 of file CPWebView.j.

- (int) effectiveScrollMode
implementation

Returns the effective scroll mode of the receiver.

Valied values are: CPWebViewScrollAuto CPWebViewScrollAppKit CPWebViewScrollNative CPWebViewScrollNone

Definition at line 335 of file CPWebView.j.

- (void) encodeWithCoder: (CPCoder aCoder
implementation

Writes out the web view's instance information to a coder.

Parameters
aCoderthe coder to which to write the data

Provided by category CPWebView(CPCoding).

Definition at line 1041 of file CPWebView.j.

- (id) frameLoadDelegate
implementation

Definition at line 885 of file CPWebView.j.

- (BOOL) goBack
implementation

Tells the webview to navigate to the previous page.

Returns
BOOL - YES if the receiver was able to go back, otherwise NO.

Definition at line 591 of file CPWebView.j.

- (action) goBack: (id)  sender
implementation

Same as -goBack but takes a sender as a param.

Parameters
sender- the sender of the action.

Definition at line 813 of file CPWebView.j.

- (BOOL) goForward
implementation

Tells the receiver to go forward in page history.

Returns
- YES if the receiver was able to go forward, otherwise NO.

Definition at line 614 of file CPWebView.j.

- (action) goForward: (id)  sender
implementation

Same as -goForward but takes a sender as a param.

Parameters
sender- the sender of the action.

Definition at line 823 of file CPWebView.j.

- (id) initWithCoder: (CPCoder aCoder
implementation

Initializes the web view from the data in a coder.

Parameters
aCoderthe coder from which to read the data
Returns
the initialized web view

Provided by category CPWebView(CPCoding).

Definition at line 1011 of file CPWebView.j.

- (id) initWithFrame: (CGRect)  aFrame
implementation

Definition at line 137 of file CPWebView.j.

- (id) initWithFrame: (CGRect)  frameRect
frameName: (CPString frameName
groupName: (CPString groupName 
implementation

Definition at line 127 of file CPWebView.j.

- (BOOL) isLoading
implementation

Returns whether the web view is loading. Note: due to browser limitations this value is not particularly reliable.

Definition at line 555 of file CPWebView.j.

- (void) loadHTMLString: (CPString aString
implementation

Loads a string of HTML into the receiver.

Parameters
CPString- The string to load.

Definition at line 416 of file CPWebView.j.

- (void) loadHTMLString: (CPString aString
baseURL: (CPURL URL 
implementation

Loads a string of HTML into the receiver.

Parameters
CPString- The string to load.
CPURL- The base url of the string. (not implemented)

Definition at line 427 of file CPWebView.j.

- (CPString) mainFrameURL
implementation

Returns the URL of the main frame.

Returns
CPString - The URL of the main frame.

Definition at line 565 of file CPWebView.j.

- (JSObject) objectByEvaluatingJavaScriptFromString: (CPString script
implementation

Evaluates a string of javascript in the webview and returns the result.

Parameters
script- A string of javascript.
Returns
JSObject - A JSObject resulting from the evaluation.

Definition at line 725 of file CPWebView.j.

- (id) policyDelegate
implementation

Definition at line 895 of file CPWebView.j.

- (action) print: (id)  sender
implementation

Tells the webview to print. If the webview is unable to print due to browser restrictions the user is alerted to print from the file menu.

Parameters
sender- the sender of the receiver.

Definition at line 858 of file CPWebView.j.

- (action) reload: (id)  sender
implementation

Reloads the webview.

Parameters
sender- the sender of the action.

Definition at line 843 of file CPWebView.j.

- (id) resourceLoadDelegate
implementation

Definition at line 905 of file CPWebView.j.

- (void) setBackgroundColor: (CPColor aColor
implementation

Definition at line 779 of file CPWebView.j.

- (void) setDownloadDelegate: (id)  anObject
implementation

Definition at line 880 of file CPWebView.j.

- (void) setDrawsBackground: (BOOL)  drawsBackground
implementation

Sets whether the webview draws its own background when the displayed contents do not.

If you are trying to create a transparent iframe:

A) call this method with NO A) call setBackground:[CPColor transparent] B) ensure the content does not draw a background, e.g. it has <body style="background-color: transparent;">

Parameters
BOOL- YES if the webview should draw its background, otherwise NO.

Definition at line 769 of file CPWebView.j.

- (void) setFrameLoadDelegate: (id)  anObject
implementation

Definition at line 890 of file CPWebView.j.

- (void) setFrameSize: (CGSize)  aSize
implementation

Definition at line 222 of file CPWebView.j.

- (void) setMainFrameURL: (CPString URLString
implementation

Sets the URL of the main frame.

Parameters
CPString- the url to set.

Definition at line 575 of file CPWebView.j.

- (void) setPolicyDelegate: (id)  anObject
implementation

Definition at line 900 of file CPWebView.j.

- (void) setResourceLoadDelegate: (id)  anObject
implementation

Definition at line 910 of file CPWebView.j.

- (void) setScrollMode: (int)  aScrollMode
implementation

Sets the scroll mode of the receiver.

Valid values are: CPWebViewScrollAuto CPWebViewScrollAppKit CPWebViewScrollNative CPWebViewScrollNone

CPWebViewScrollAuto

Definition at line 316 of file CPWebView.j.

- (void) setUIDelegate: (id)  anObject
implementation

Definition at line 920 of file CPWebView.j.

- (action) stopLoading: (id)  sender
implementation

Stops loading the webview. (not yet implemented)

Parameters
sender- the sender of the action.

Definition at line 833 of file CPWebView.j.

- (CPString) stringByEvaluatingJavaScriptFromString: (CPString script
implementation

Evaluates a javascript string in the webview and returns the result of that evaluation as a string.

Parameters
script- A string of javascript.
Returns
CPString - The result of the evaluation.

Definition at line 713 of file CPWebView.j.

- (action) takeStringURLFrom: (id)  sender
implementation

Used with the target/action mechanism to automatically set the webviews mainFrameURL to the senders stringValue.

Parameters
sender- the sender of the action. Should respond to -stringValue.

Definition at line 803 of file CPWebView.j.

- (id) UIDelegate
implementation

Definition at line 915 of file CPWebView.j.

- (void) viewDidUnhide
implementation

Definition at line 228 of file CPWebView.j.

- (CPWebScriptObject) windowScriptObject
implementation

Returns the root Object of the webview as a CPWebScriptObject.

Returns
CPWebScriptObject - the Object of the webview.

Definition at line 691 of file CPWebView.j.


The documentation for this class was generated from the following files: