C# Class Bloom.Edit.EditingView

Show file Open project: BloomBooks/BloomDesktop Class Usage Examples

Public Methods

Method Description
AddMessageEventListener ( string eventName, Action action ) : void
CleanHtmlAndCopyToPageDom ( ) : void

this started as an experiment, where our textareas were not being read when we saved because of the need to change the picture

ClearOutDisplay ( ) : void
EditingView ( EditingModel model, PageListView pageListView, CutCommand cutCommand, CopyCommand copyCommand, PasteCommand pasteCommand, UndoCommand undoCommand, DuplicatePageCommand duplicatePageCommand, DeletePageCommand deletePageCommand, NavigationIsolator isolator, ControlKeyEvent controlKeyEvent ) : System
GetInstructionsForUnlockingBook ( ) : string
GetPageBody ( ) : GeckoElement
GetShowToolboxCheckbox ( ) : GeckoInputElement
OnVisibleChanged ( bool visible ) : void

this is called by our model, as a result of a "SelectedTabChangedEvent". So it's a lot more reliable than the normal winforms one.

RemoveMessageEventListener ( string eventName ) : void
ShowAddPageDialog ( ) : void
UpdateButtonLocalizations ( ) : void
UpdateDisplay ( ) : void
UpdateEditButtons ( ) : void
UpdatePageList ( bool emptyThumbnailCache ) : void
UpdateSingleDisplayedPage ( IPage page ) : void
UpdateThumbnailAsync ( IPage page ) : void

Protected Methods

Method Description
OnLoad ( EventArgs e ) : void
OnParentChanged ( EventArgs e ) : void

Private Methods

Method Description
AddDropdownItemSafely ( ToolStripDropDownButton button, string text ) : ToolStripMenuItem

Add a menu item to a dropdown button and return it. Avoid creating a ToolStripSeparator instead of a ToolStripMenuItem even for a hyphen.

See https://silbloom.myjetbrains.com/youtrack/issue/BL-3796.

BackgroundColorsForLinux ( ) : void
CheckFontAvailablility ( ) : void
CheckIfLockedAndWarn ( string imagePath ) : bool

Returns true if it is either: a) OK to change images, or b) user overrides Returns false if user cancels message box

CopyImageToClipboard ( DomEventArgs ge, string bookFolderPath ) : bool
CycleEditButtons ( ) : void
CycleOneButton ( Button button, Command command ) : void
ExecuteCommandSafely ( Command cmdObject ) : void
GetImageFromClipboard ( ) : PalasoImage
GetImageNode ( DomEventArgs ge ) : GeckoHtmlElement
HandleControlKeyEvent ( object keyData ) : void
OnBrowserFocusChanged ( object sender, GeckoDomEventArgs e ) : void
OnChangeImage ( DomEventArgs ge ) : void
OnContentLanguageDropdownItem_CheckedChanged ( object sender, EventArgs e ) : void
OnCopyImage ( DomEventArgs ge ) : void
OnCutImage ( DomEventArgs ge ) : void
OnEditImageMetdata ( DomEventArgs ge ) : void
OnGeckoReady ( object sender, EventArgs e ) : void
OnPaperSizeAndOrientationMenuClick ( object sender, EventArgs e ) : void
OnPasteImage ( DomEventArgs ge ) : void
OnShowBookMetadataEditor ( ) : void
ParentForm_Activated ( object sender, EventArgs e ) : void
RememberSourceTabChoice ( GeckoHtmlElement target ) : void
RepositionButtonsForMono ( ) : void
RunJavaScript ( string script ) : string
SaveChangedImage ( GeckoHtmlElement imageElement, PalasoImage imageInfo, string exceptionMsg ) : void
SetModalState ( string isModal ) : void

Prevent navigation while a dialog box is showing in the browser control

SetTranslationPanelVisibility ( ) : void
SetupBrowserContextMenu ( ) : void
SetupThumnailLists ( ) : void
ShouldBailOutBecauseUserAgreedNotToUseJpeg ( PalasoImage imageInfo ) : bool
ShowChangeLayoutDialog ( IPage page ) : void
UpdateButtonEnabled ( Button button, Command command ) : void
VisibleNowAddSlowContents ( object sender, EventArgs e ) : void
WebBrowser_DocumentCompleted ( object sender, EventArgs e ) : void

Flag the PageSelection object that the current (former?) page selection has completed, so it's safe to select another page now.

WebBrowser_ReadyStateChanged ( object sender, EventArgs e ) : void
_browser1_OnBrowserClick ( object sender, EventArgs e ) : void
_copyButton_Click ( object sender, EventArgs e ) : void
_cutButton_Click ( object sender, EventArgs e ) : void
_deletePageButton_Click_1 ( object sender, EventArgs e ) : void
_duplicatePageButton_Click ( object sender, EventArgs e ) : void
_editButtonsUpdateTimer_Tick ( object sender, EventArgs e ) : void
_handleMessageTimer_Tick ( object sender, EventArgs e ) : void
_pasteButton_Click ( object sender, EventArgs e ) : void
_undoButton_Click ( object sender, EventArgs e ) : void

Method Details

AddMessageEventListener() public method

public AddMessageEventListener ( string eventName, Action action ) : void
eventName string
action Action
return void

CleanHtmlAndCopyToPageDom() public method

this started as an experiment, where our textareas were not being read when we saved because of the need to change the picture
public CleanHtmlAndCopyToPageDom ( ) : void
return void

ClearOutDisplay() public method

public ClearOutDisplay ( ) : void
return void

EditingView() public method

public EditingView ( EditingModel model, PageListView pageListView, CutCommand cutCommand, CopyCommand copyCommand, PasteCommand pasteCommand, UndoCommand undoCommand, DuplicatePageCommand duplicatePageCommand, DeletePageCommand deletePageCommand, NavigationIsolator isolator, ControlKeyEvent controlKeyEvent ) : System
model EditingModel
pageListView PageListView
cutCommand CutCommand
copyCommand CopyCommand
pasteCommand PasteCommand
undoCommand UndoCommand
duplicatePageCommand DuplicatePageCommand
deletePageCommand DeletePageCommand
isolator NavigationIsolator
controlKeyEvent ControlKeyEvent
return System

GetInstructionsForUnlockingBook() public static method

public static GetInstructionsForUnlockingBook ( ) : string
return string

GetPageBody() public method

public GetPageBody ( ) : GeckoElement
return GeckoElement

GetShowToolboxCheckbox() public method

public GetShowToolboxCheckbox ( ) : GeckoInputElement
return GeckoInputElement

OnLoad() protected method

protected OnLoad ( EventArgs e ) : void
e EventArgs
return void

OnParentChanged() protected method

protected OnParentChanged ( EventArgs e ) : void
e EventArgs
return void

OnVisibleChanged() public method

this is called by our model, as a result of a "SelectedTabChangedEvent". So it's a lot more reliable than the normal winforms one.
public OnVisibleChanged ( bool visible ) : void
visible bool
return void

RemoveMessageEventListener() public method

public RemoveMessageEventListener ( string eventName ) : void
eventName string
return void

ShowAddPageDialog() public method

public ShowAddPageDialog ( ) : void
return void

UpdateButtonLocalizations() public method

public UpdateButtonLocalizations ( ) : void
return void

UpdateDisplay() public method

public UpdateDisplay ( ) : void
return void

UpdateEditButtons() public method

public UpdateEditButtons ( ) : void
return void

UpdatePageList() public method

public UpdatePageList ( bool emptyThumbnailCache ) : void
emptyThumbnailCache bool
return void

UpdateSingleDisplayedPage() public method

public UpdateSingleDisplayedPage ( IPage page ) : void
page IPage
return void

UpdateThumbnailAsync() public method

public UpdateThumbnailAsync ( IPage page ) : void
page IPage
return void