C# 클래스 Bloom.Browser

파일 보기 프로젝트 열기: BloomBooks/BloomDesktop

보호된 프로퍼티들

프로퍼티 타입 설명
_browser GeckoWebBrowser

Private Properties

프로퍼티 타입 설명
AddOpenPageInFFItem MenuItem
AddOtherMenuItemsForDebugging void
Browser_Resize void
CleanupAfterNavigation void
InitializeComponent void
IsThereACurrentTextSelection bool
LoadPageDomFromBrowser void
OnConsoleMessage void
OnJavascriptError void
OnOpenAboutCache void
OnOpenAboutConfig void
OnOpenAboutMemory void
OnUpdateDisplayTick void
Paste void
SaveCustomizedCssRules void
SetNewDependent void
UpdateDisplay void
_browser_DocumentCompleted void

공개 메소드들

메소드 설명
AddMessageEventListener ( string eventName, Action action ) : void

Only the first call per browser per event name takes effect. (Unless RemoveMessageEventListener is called explicitly for the event name.)

AddScriptContent ( string content ) : void
AddScriptSource ( string filename ) : void

add a jscript source file

Browser ( ) : System
Copy ( ) : void
GetPathToStylizer ( ) : string
HandleLinkClick ( GeckoAnchorElement anchor, DomEventArgs eventArgs, string workingDirectoryForFileLinks ) : void

When you receive a OnBrowserClick and have determined that nothing was clicked on that the c# needs to pay attention to, pass it on to this method. It will either let the browser handle it normally, or redirect it to the operating system so that it can open the file or external website itself.

NamesOfFontsThatBrowserCanRender ( ) : IEnumerable

See https://jira.sil.org/browse/BL-802 and https://bugzilla.mozilla.org/show_bug.cgi?id=1108866 Until that gets fixed, we're better off not listing those fonts that are just going to cause confusion

Navigate ( HtmlDom htmlDom, HtmlDom htmlEditDom = null, bool setAsCurrentPageForDebugging = false ) : void
Navigate ( string url, bool cleanupFileAfterNavigating ) : void
NavigateRawHtml ( string html ) : void
OnGetTroubleShootingInformation ( object sender, EventArgs e ) : void
OnOpenPageInStylizer ( object sender, EventArgs e ) : void
OnOpenPageInSystemBrowser ( object sender, EventArgs e ) : void
RaiseGeckoReady ( ) : void
ReadEditableAreasNow ( ) : void

This is needed if we want to save before getting a natural Validating event.

RemoveMessageEventListener ( string eventName ) : void

Remove a previously installed event handler.

RunJavaScript ( string script ) : string
SaveHTML ( string path ) : void
SetEditingCommands ( CutCommand cutCommand, CopyCommand copyCommand, PasteCommand pasteCommand, UndoCommand undoCommand ) : void
SetUpXulRunner ( ) : void
ShowHtml ( string html ) : void
UpdateEditButtons ( ) : void

보호된 메소드들

메소드 설명
Application_Idle ( object sender, EventArgs e ) : void
Dispose ( bool disposing ) : void

Clean up any resources being used.

OnBrowser_DomClick ( object sender, DomEventArgs e ) : void
OnDomKeyPress ( object sender, DomKeyEventArgs e ) : void

Prevent a CTRL+V pasting when we have the Paste button disabled, e.g. when pictures are on the clipboard. Also handle CTRL+N creating a new page on Linux/Mono.

OnLoad ( EventArgs e ) : void
OnShowContextMenu ( object sender, GeckoContextMenuEventArgs e ) : void
_browser_Navigating ( object sender, GeckoNavigatingEventArgs e ) : void

비공개 메소드들

메소드 설명
AddOpenPageInFFItem ( GeckoContextMenuEventArgs e ) : MenuItem
AddOtherMenuItemsForDebugging ( GeckoContextMenuEventArgs e ) : void
Browser_Resize ( object sender, EventArgs e ) : void
CleanupAfterNavigation ( object sender, GeckoNavigatedEventArgs e ) : void
InitializeComponent ( ) : void

Required method for Designer support - do not modify the contents of this method with the code editor.

IsThereACurrentTextSelection ( ) : bool

Workaround suggested by Tom Hindle, since GeckoFx-45's CanXSelection properties aren't working.

LoadPageDomFromBrowser ( ) : void

What's going on here: the browser is just /editting displaying a copy of one page of the document. So we need to copy any changes back to the real DOM.

OnConsoleMessage ( object sender, ConsoleMessageEventArgs e ) : void
OnJavascriptError ( object sender, JavascriptErrorEventArgs e ) : void
OnOpenAboutCache ( object sender, EventArgs e ) : void
OnOpenAboutConfig ( object sender, EventArgs e ) : void
OnOpenAboutMemory ( object sender, EventArgs e ) : void
OnUpdateDisplayTick ( object sender, EventArgs e ) : void
Paste ( ) : void
SaveCustomizedCssRules ( GeckoStyleSheet userModifiedStyleSheet ) : void
SetNewDependent ( IDisposable dependent ) : void
UpdateDisplay ( ) : void
_browser_DocumentCompleted ( object sender, EventArgs e ) : void

메소드 상세

AddMessageEventListener() 공개 메소드

Only the first call per browser per event name takes effect. (Unless RemoveMessageEventListener is called explicitly for the event name.)
public AddMessageEventListener ( string eventName, Action action ) : void
eventName string
action Action
리턴 void

AddScriptContent() 공개 메소드

public AddScriptContent ( string content ) : void
content string
리턴 void

AddScriptSource() 공개 메소드

add a jscript source file
public AddScriptSource ( string filename ) : void
filename string
리턴 void

Application_Idle() 보호된 메소드

protected Application_Idle ( object sender, EventArgs e ) : void
sender object
e EventArgs
리턴 void

Browser() 공개 메소드

public Browser ( ) : System
리턴 System

Copy() 공개 메소드

public Copy ( ) : void
리턴 void

Dispose() 보호된 메소드

Clean up any resources being used.
protected Dispose ( bool disposing ) : void
disposing bool true if managed resources should be disposed; otherwise, false.
리턴 void

GetPathToStylizer() 공개 정적인 메소드

public static GetPathToStylizer ( ) : string
리턴 string

HandleLinkClick() 공개 메소드

When you receive a OnBrowserClick and have determined that nothing was clicked on that the c# needs to pay attention to, pass it on to this method. It will either let the browser handle it normally, or redirect it to the operating system so that it can open the file or external website itself.
public HandleLinkClick ( GeckoAnchorElement anchor, DomEventArgs eventArgs, string workingDirectoryForFileLinks ) : void
anchor GeckoAnchorElement
eventArgs DomEventArgs
workingDirectoryForFileLinks string
리턴 void

NamesOfFontsThatBrowserCanRender() 공개 정적인 메소드

See https://jira.sil.org/browse/BL-802 and https://bugzilla.mozilla.org/show_bug.cgi?id=1108866 Until that gets fixed, we're better off not listing those fonts that are just going to cause confusion
public static NamesOfFontsThatBrowserCanRender ( ) : IEnumerable
리턴 IEnumerable

Navigate() 공개 메소드

public Navigate ( HtmlDom htmlDom, HtmlDom htmlEditDom = null, bool setAsCurrentPageForDebugging = false ) : void
htmlDom HtmlDom
htmlEditDom HtmlDom
setAsCurrentPageForDebugging bool
리턴 void

Navigate() 공개 메소드

public Navigate ( string url, bool cleanupFileAfterNavigating ) : void
url string
cleanupFileAfterNavigating bool
리턴 void

NavigateRawHtml() 공개 메소드

public NavigateRawHtml ( string html ) : void
html string
리턴 void

OnBrowser_DomClick() 보호된 메소드

protected OnBrowser_DomClick ( object sender, DomEventArgs e ) : void
sender object
e DomEventArgs
리턴 void

OnDomKeyPress() 보호된 메소드

Prevent a CTRL+V pasting when we have the Paste button disabled, e.g. when pictures are on the clipboard. Also handle CTRL+N creating a new page on Linux/Mono.
protected OnDomKeyPress ( object sender, DomKeyEventArgs e ) : void
sender object
e DomKeyEventArgs
리턴 void

OnGetTroubleShootingInformation() 공개 메소드

public OnGetTroubleShootingInformation ( object sender, EventArgs e ) : void
sender object
e EventArgs
리턴 void

OnLoad() 보호된 메소드

protected OnLoad ( EventArgs e ) : void
e EventArgs
리턴 void

OnOpenPageInStylizer() 공개 메소드

public OnOpenPageInStylizer ( object sender, EventArgs e ) : void
sender object
e EventArgs
리턴 void

OnOpenPageInSystemBrowser() 공개 메소드

public OnOpenPageInSystemBrowser ( object sender, EventArgs e ) : void
sender object
e EventArgs
리턴 void

OnShowContextMenu() 보호된 메소드

protected OnShowContextMenu ( object sender, GeckoContextMenuEventArgs e ) : void
sender object
e GeckoContextMenuEventArgs
리턴 void

RaiseGeckoReady() 공개 메소드

public RaiseGeckoReady ( ) : void
리턴 void

ReadEditableAreasNow() 공개 메소드

This is needed if we want to save before getting a natural Validating event.
public ReadEditableAreasNow ( ) : void
리턴 void

RemoveMessageEventListener() 공개 메소드

Remove a previously installed event handler.
public RemoveMessageEventListener ( string eventName ) : void
eventName string
리턴 void

RunJavaScript() 공개 메소드

public RunJavaScript ( string script ) : string
script string
리턴 string

SaveHTML() 공개 메소드

public SaveHTML ( string path ) : void
path string
리턴 void

SetEditingCommands() 공개 메소드

public SetEditingCommands ( CutCommand cutCommand, CopyCommand copyCommand, PasteCommand pasteCommand, UndoCommand undoCommand ) : void
cutCommand CutCommand
copyCommand CopyCommand
pasteCommand PasteCommand
undoCommand UndoCommand
리턴 void

SetUpXulRunner() 공개 정적인 메소드

public static SetUpXulRunner ( ) : void
리턴 void

ShowHtml() 공개 메소드

public ShowHtml ( string html ) : void
html string
리턴 void

UpdateEditButtons() 공개 메소드

public UpdateEditButtons ( ) : void
리턴 void

_browser_Navigating() 보호된 메소드

protected _browser_Navigating ( object sender, GeckoNavigatingEventArgs e ) : void
sender object
e GeckoNavigatingEventArgs
리턴 void

프로퍼티 상세

_browser 보호되어 있는 프로퍼티

protected GeckoWebBrowser _browser
리턴 GeckoWebBrowser