Gallio.Common.Splash Invokes a delegate when disposed. This type is useful for creating APIs that leverage the C# "using" syntax for scoping. using (document.BeginStyle(Style.Default)) // returns a DisposableCookie { document.AppendText("Hello world"); } Creates a disposable cookie. The action to perform when is called. Thrown if is null. Invokes the dispose action. Specifies the action to perform when is called. An embedded image wraps an so that it can be embedded in a Splash document. An embedded object that can be drawn into a . Creates an instance of an embedded object client attached to the specified site. The site. The client. Creates an embedded image. The image to draw into the client area. Thrown if is null. Gets the image. Gets or sets the margin around the image. Gets or sets the baseline of the image. The default value is 0 which positions the bottom of the image in line with the baseline of surrounding text. Use a positive value to raise the image above the text baseline or a negative value to lower it below the text baseline. Represents an instance of an embedded object that has been attached to a particular site. When the client is disposed, it should release all attachments to its site. Measure the client. The embedded object measurements. Shows the embedded object and sets its bounds. The bounds of the embedded object. True if the current reading order is right to left. Hides the embedded object. Paints the embedded object. The graphics context. Not null. The paint options. Not null. The bounds of the embedded object. True if the current reading order is right to left. Returns true if the method should be called or false if the client paints itself by other means. An embedded image wraps a so that it can be embedded in a Splash document. Creates an embedded control. The control to draw into the client area. Thrown if is null. Gets the control. Gets or sets the margin around the control. Gets or sets the baseline of the control. The default value is 0 which positions the bottom of the control in line with the baseline of surrounding text. Use a positive value to raise the control above the text baseline or a negative value to lower it below the text baseline. Describes the measurements of an embedded object. Initializes the measurements. The size of the embedded object. Gets or sets the size of the embedded object. Gets or sets the margin around the embedded object. Gets or sets the descent height of the object in pixels. The descent is the number of pixels from the baseline of the object to its bottom. It used to align the baseline of the object with the baseline of the text that surrounds it on the line. Describes the environment of an embedded object. Gets the index of the character that represents the embedded object for selection and hit testing in the document. Gets the control of the containing view. Gets the style of the paragraph that contains the embedded object. Gets the style of the inline run that contains the embedded object. A low-level wrapper for a graphics context. Gets or sets the layout bounds relative to the layout origin. This is set during the main layout operation and cached until relayout occurs. Internal structure describing a paragraph in the document. Each paragraph consists of a number of characters subdivided into runs that have the same style or that represent embedded objects. Packed into 16 bytes per Paragraph. Keep it that way or make it smaller. Internal structure describing a run of text or an embedded object in the document. Packed into 4 bytes per Run. Keep it that way. Internal structure that maps a visual line onto a particular range of runs within a paragraph and includes the character position of required line breaks. The absolute vertical offset of the line in the document when rendered. The absolute horizontal offset of the line in the document when rendered. The height of the line. The descent height of the line (below text baseline). The index of the paragraph that appears on the line. The index of the paragraph's first script run that appears on the line. The number of script runs that appear on the line. The number of leading chars in the first script run to truncate due to word wrap. The number of trailing chars in the last script run to truncate due to word wrap. The ascent height of the line (above text baseline). Internal structure with script information necessary for layout and display of a paragraph. Includes script information for each run in the paragraph. We pool allocated script paragraph structures and cache them to improve performance and reduce the number of memory allocations. Internal structure with script information necessary for layout and display of a run. A single run may be subdivided into multiple script runs. Since a script paragraph can contain many script runs and each one uses a variable amount of storage for buffers of various kinds, this structure contains indices into shared buffers managed by the containing script paragraph. This reduces the number of required memory allocations per paragraph. The script analysis for the run produced during itemization. The index of the first character of the run relative to the first character of its containing paragraph. The index of the first glyph of the run relative to the first glyph of its containing paragraph. The number of glyphs in the run. The height of the run excluding its margins. The descent height of the run (below text baseline). The top margin of the run. The bottom margin of the run. The advance width spacing of the run. The ascent height of the run (above text baseline). A strongly-typed key to be used together with an associative array to help the compiler perform better type checking of the value associated with the key. The type of value associated with the key. Creates a new key. The unique name of the key. Thrown if is null. Gets the unique name of the key. Provides style parameters for painting. Initializes paint options to system defaults. Gets or sets the background color. Gets or sets the selected text color. Gets or sets the selected background color. Arguments for the event raised when a paragraph is changed. Creates event arguments for paragraph changed. The index of the paragraph that was changed. Gets the index of the paragraph that was changed. A tab stop ruler based on per-pixel offsets. Describes the strategy for advancing to tab stops. Advances the X position to the next tab stop. The X position to advance. The advanced X position. Creates a tab stop ruler based on per-pixel offsets. The number of pixels per tab stop, or 0 to always advance the minimum tab width. The minimum tab width, or 0 if there is no minimum. Thrown if or is less than 0. Gets the number of pixels per tab stop, or 0 to always advance the minimum tab width. Gets the minimum tab width. Provides the result of mapping a screen position to a character index. Initializes a snap result. The snap kind. The character index of the snap, or -1 if no snap. Gets the snap kind. Gets the character index of the snap, or -1 if no snap. Describes the kind of snap. The character snap did not succeed. The position was outside the bounds of the document. The character snap was exact. The character snap was before the actual character or at a position above the start of the document. (eg. To the left of the character if the reading order is left-to-right.) The character snap was after the actual character or at a position above the start of the document. (eg. To the right of the character if the reading order is left-to-right.) A splash document contains styled text and embedded objects and retains layout information for presentation. The character used as a placeholder for text itemizing when a paragraph contains an object run. The maximum number of characters that a text run can contain. The maximum number of distinct objects supported by the implementation. The maximum number of distinct styles supported by the implementation. 256 Creates an empty splash document. Clears the text in the document. Gets a range of the document text. The start character index. The length of the range. The text in the specified range. Thrown if or are negative or refer to a range that exceeds the document length. Gets the style of the text at the specified character index. The character index. The style. Thrown if is outside of the bounds of the document. Gets the embedded object at the specified character index, or null if none. The character index. The embedded object, or null if none. Thrown if is outside of the bounds of the document. Gets the annotation with the specified key at the specified character index. The annotation key. The character index. Set to the annotation value, or default if none. True if an annotation was found. Thrown if is outside of the bounds of the document. Gets the current annotation with the specified key. The annotation key. Set to the annotation value, or default if none. True if there is a current annotation. Appends text to the document. The text to append. Thrown if is null. Appends a new line to the document. Appends an object to the document. The object to append. Thrown if is null. Pushes a new style onto the style stack. Subsequently appended content will use the new style. using (document.BeginStyle(linkStyle)) { using (document.BeginAnnotation("href", "http://www.gallio.org")) { document.AppendText("Gallio"); } } The style to use. A value that when disposed automatically calls . Used with the C# "using" syntax to end the style at the end of a block scope. Thrown if is null. Thrown if more than distinct styles are used. Pops the current style off the style stack. Subsequently appended content will use the previous style. Thrown if the style stack only contains the default style. Pushes an annotation value onto the keyed annotation stack. Subsequently appended content will acquire the new annotation value. Each annotation key has its own separate stack. using (document.BeginStyle(linkStyle)) { using (document.BeginAnnotation("href", "http://www.gallio.org")) { document.AppendText("Gallio"); } } The annotation key. The annotation value. A value that when disposed automatically calls . Used with the C# "using" syntax to end the annotation at the end of a block scope. Pushes an annotation value onto the keyed annotation stack. Subsequently appended content will acquire the new annotation value. Each annotation key has its own separate stack. The annotation key. Thrown if there is no current annotation with the specified key. Returns the plain text content of the document as a string. Event raised when the document is cleared. Event raised when a paragraph is changed. Gets the number of paragraphs in the document. This number is guaranteed to always be at least 1 even in an empty document. Gets the number of characters in the document. Gets the current style. The A spacing of the character. The A spacing is the distance to add to the current position before drawing the character glyph. The B spacing of the character. The B spacing is the width of the drawn portion of the character glyph. The C spacing of the character. The C spacing is the distance to add to the current position to provide white space to the right of the character glyph. Describes the layout of a splash document. Much of this implementation is based on information from the amazing Neatpad tutorial by James Brown. http://www.catch22.net/tuts/neatpad Creates a layout for a document. The document. The parent control to which embedded objects can attach themselves. Thrown if or is null. Disposes the layout. Disposes the layout. True if was called explicitly. Resets all layout information and frees internal buffers. Updates the layout. Call this method some time after UpdateRequired is raised or whenever the layout origin changes. The origin of the document layout area in the parent control. Gets the snap position that corresponds to a point in the control. The point to check. The origin of the document layout area in the parent control. The character snap. Paints a region of text. Be sure to update the layout before calling this method. The graphics context. The origin of the document layout area in the parent control. The clip rectangle of the region to paint in the device context. The paint options. The index of the first selected character. Ignored if the number of selected characters is 0. The number of selected characters or 0 if none. May be negative if the selection is reversed. Thrown if or is null. Computes the layout of a and appends one or more s to the . The HDC state. The paragraph index to layout. Gets a fully analyzed by paragraph index. Analyzes a to populate a . Event raised when a layout property changes and requires an update. Gets the document this layout is for. Gets the parent control to which embedded objects can attach themselves. Gets or sets the desired layout width. Gets or sets the desired reading order for the layout. Gets or sets the current layout width which may differ from the desired layout width if a relayout is pending. Gets or sets the current layout height which may differ from the expected layout height if a relayout is pending. Gets or sets the current reading order which may differ from the desired reading order if a relayout is pending. Describes the style of a text run. A style is immutable once created and can be compared for equality with other styles. Gets a default style based on current system font and color settings. The style. Gets the font. This is an inline style property. Gets the color. This is an inline style property. Gets the tab stop ruler. This is a paragraph style property. Gets whether to perform word-wrapping. This is a paragraph style property. Gets the left margin width in pixels. This is a paragraph style property. Gets the right margin width in pixels. This is a paragraph style property. Gets the first line indent in pixels. This is a paragraph style property. Builds objects. Creates a builder with all style properties inherited. Creates a builder initialized as a copy of an existing style. The style to copy. Thrown if is null. Creates a builder initialized as a copy of an existing style builder. The style builder to copy. Thrown if is null. Creates an immutable style object from the builder's properties. The style to inherit. The new style object. Thrown if is null. Creates an immutable style object from the builder's properties and supplies any inherited properties from . The new style object. Gets or sets the font. This is an inline style property. Thrown if contains null. Gets or sets the color. This is an inline style property. Gets or sets the tab stop ruler. This is a paragraph style property. Thrown if contains null. Gets or sets whether to perform word-wrapping. This is a paragraph style property. Gets or sets the left margin width in pixels. This is a paragraph style property. Gets or sets the right margin width in pixels. This is a paragraph style property. Gets or sets the first line indent in pixels. This is a paragraph style property. Specifies a style property that may either be set explicitly or inherited from another style. The type of value held by the property. Gets a special value that indicates that a style property value is inherited. Creates a style property with the specified value. The value. Gets the value of the property if it is not inherited otherwise returns the inherited value. The inherited value. The value. Creates a style property with the specified value. The value. The style property. Returns true if the properties are equal. Returns true if the properties are not equal. Returns true if the property value is inherited. Gets the value of the property if it is not inherited. Thrown if the property is inherited. Manages a collection of styles. Creates an empty stylesheet. Adds a style to the stylesheet. The style name. The style to add. Thrown if or is null. Thrown if there is already a style with name . Gets a style by name. The style name. The default style to return if no style is present with the specified name. The style. Thrown if is null. A SplashView is a custom control to display styled text intermixed with embedded content such as images. This control is optimized for high-performance append-only text output such as scrolling consoles. Consequently, the control does not support editing or modifications to currently displayed content (besides clearing it). Display updates are performed asynchronously in batches. Creates an empty SplashView. Gets the snap position that corresponds to a point in the control. The point relative to the layout origin. The character snap. Sets the selection. The selection start character index. The selection length or 0 if none. Thrown if or is less than 0. Sets the selection to include all text in the document. Clears the selection. Gets the currently selected text in the document, or an empty string if there is no selection. The selected text. Copies the selected text to the clipboard. Does nothing if there is no current selection. True if some text was copied, false if there was no current selection. Called when the selection changes. The event arguments. Maps a mouse position to a layout point. The mouse position. The layout point. Updates the context menu in time for pop-up. Event raised when the selection has changed. Gets or sets the selected text color. Gets or sets the selected text color. Gets the selection start character index. Gets the selection length, or 0 if none. Gets or sets the minimum width of the text area. If the control is resized to less than this width, then the control will automatically display a horizontal scrollbar. Gets the document displayed in the view.