# :stopdoc:
# This file is automatically generated by the WXRuby3 documentation
# generator. Do not alter this file.
# :startdoc:
module Wx::HTML
#
HTML_ALIGN_LEFT = 0
#
HTML_ALIGN_RIGHT = 2
#
HTML_ALIGN_JUSTIFY = 16
#
HTML_ALIGN_TOP = 4
#
HTML_ALIGN_BOTTOM = 8
#
HTML_ALIGN_CENTER = 1
#
HTML_CLR_FOREGROUND = 1
#
HTML_CLR_BACKGROUND = 2
#
HTML_CLR_TRANSPARENT_BACKGROUND = 4
#
HTML_UNITS_PIXELS = 1
#
HTML_UNITS_PERCENT = 2
#
HTML_INDENT_LEFT = 16
#
HTML_INDENT_RIGHT = 32
#
HTML_INDENT_TOP = 64
#
HTML_INDENT_BOTTOM = 128
#
HTML_INDENT_HORIZONTAL = 48
#
HTML_INDENT_VERTICAL = 192
#
HTML_INDENT_ALL = 240
#
HTML_COND_ISANCHOR = 1
#
HTML_COND_ISIMAGEMAP = 2
#
HTML_COND_USER = 10000
#
#
#
#
class HtmlSelectionState < Wx::Enum
#
#
HTML_SEL_OUT = Wx::HTML::HtmlSelectionState.new(0)
#
#
HTML_SEL_IN = Wx::HTML::HtmlSelectionState.new(1)
#
#
HTML_SEL_CHANGING = Wx::HTML::HtmlSelectionState.new(2)
end # HtmlSelectionState
#
#
HTML_FIND_EXACT = 1
#
#
HTML_FIND_NEAREST_BEFORE = 2
#
#
HTML_FIND_NEAREST_AFTER = 4
#
#
#
#
class HtmlScriptMode < Wx::Enum
#
#
HTML_SCRIPT_NORMAL = Wx::HTML::HtmlScriptMode.new(0)
#
#
HTML_SCRIPT_SUB = Wx::HTML::HtmlScriptMode.new(1)
#
#
HTML_SCRIPT_SUP = Wx::HTML::HtmlScriptMode.new(2)
end # HtmlScriptMode
# Internal data structure.
# It represents fragments of parsed HTML page, the so-called cell - a word, picture, table, horizontal line and so on. It is used by {Wx::HTML::HtmlWindow} and {Wx::HtmlWinParser} to represent HTML page in memory.
# You can divide cells into two groups : visible cells with non-zero width and height and helper cells (usually with zero width and height) that perform special actions such as color or font change.
# ===
#
# Category: {Wx::HTML}
# @see Cells and Containers
# @see Wx::HTML::HtmlContainerCell
#
#
class HtmlCell < Object
# Constructor.
# @return [Wx::HTML::HtmlCell]
def initialize; end
# Find a cell inside this cell positioned at the given coordinates (relative to this's positions).
# Returns NULL if no such cell exists. The flag can be used to specify whether to look for terminal or nonterminal cells or both. In either case, returned cell is deepest cell in cells tree that contains [x,y].
# @param x [Integer]
# @param y [Integer]
# @param flags [unsigned]
# @return [Wx::HTML::HtmlCell,Wx::HTML::HtmlContainerCell]
def find_cell_by_pos(x, y, flags=Wx::HTML::HTML_FIND_EXACT) end
# Returns descent value of the cell (m_Descent member).
# See explanation:
# @return [Integer]
def get_descent; end
alias_method :descent, :get_descent
# Returns pointer to the first cell in the list.
# You can then use child's {Wx::HTML::HtmlCell#get_next} method to obtain pointer to the next cell in list.
# This shouldn't be used by the end user. If you need some way of finding particular cell in the list, try {Wx::HTML::HtmlCell#find} method instead.
# @return [Wx::HTML::HtmlCell,Wx::HTML::HtmlContainerCell]
def get_first_child; end
alias_method :first_child, :get_first_child
# Returns height of the cell (m_Height member).
# @return [Integer]
def get_height; end
alias_method :height, :get_height
# Returns unique cell identifier if there is any, the empty string otherwise.
# @return [Wx::String]
def get_id; end
alias_method :id, :get_id
# Returns hypertext link if associated with this cell or NULL otherwise.
# See {Wx::HTML::HtmlLinkInfo}. (Note: this makes sense only for visible tags).
# @param x [Integer] Coordinates of position where the user pressed mouse button. These coordinates are used e.g. by COLORMAP. Values are relative to the upper left corner of THIS cell (i.e. from 0 to m_Width or m_Height)
# @param y [Integer]
# @return [Wx::HTML::HtmlLinkInfo]
def get_link(x=0, y=0) end
alias_method :link, :get_link
# Returns pointer to the next cell in list (see {Wx::htmlcell.h} if you're interested in details).
# @return [Wx::HTML::HtmlCell,Wx::HTML::HtmlContainerCell]
def get_next; end
alias_method :next_, :get_next
# Returns pointer to parent container.
# @return [Wx::HTML::HtmlContainerCell]
def get_parent; end
alias_method :parent, :get_parent
# Returns X position within parent (the value is relative to parent's upper left corner).
# The returned value is meaningful only if parent's {Wx::HTML::HtmlCell#layout} was called before!
# @return [Integer]
def get_pos_x; end
alias_method :pos_x, :get_pos_x
# Returns Y position within parent (the value is relative to parent's upper left corner).
# The returned value is meaningful only if parent's {Wx::HTML::HtmlCell#layout} was called before!
# @return [Integer]
def get_pos_y; end
alias_method :pos_y, :get_pos_y
# Returns width of the cell (m_Width member).
# @return [Integer]
def get_width; end
alias_method :width, :get_width
# Sets unique cell identifier.
# Default value is no identifier, i.e. empty string.
# @param id [String]
# @return [void]
def set_id(id) end
alias_method :id=, :set_id
# Sets the hypertext link associated with this cell.
# (Default value is {Wx::HTML::HtmlLinkInfo}("", "") (no link))
# @param link [Wx::HTML::HtmlLinkInfo]
# @return [void]
def set_link(link) end
alias_method :link=, :set_link
# Sets the next cell in the list.
# This shouldn't be called by user - it is to be used only by {Wx::HTML::HtmlContainerCell#insert_cell}.
# @param cell [Wx::HTML::HtmlCell]
# @return [void]
def set_next(cell) end
alias_method :next_=, :set_next
# Sets parent container of this cell.
# This is called from {Wx::HTML::HtmlContainerCell#insert_cell}.
# @param p [Wx::HTML::HtmlContainerCell]
# @return [void]
def set_parent(p) end
alias_method :parent=, :set_parent
# Sets the cell's position within parent container.
# @param x [Integer]
# @param y [Integer]
# @return [void]
def set_pos(x, y) end
# Converts the cell into text representation.
# If sel != NULL then only part of the cell inside the selection is converted.
# @param sel [Wx::HTML::HtmlSelection]
# @return [String]
def convert_to_text(sel) end
end # HtmlCell
# This class stores all necessary information about hypertext links (as represented by tag in HTML documents).
# In current implementation it stores URL and target frame name.
# Frames are not currently supported by {Wx::HTML}!
#
# ===
#
# Category: {Wx::HTML}
#
#
# @note This class is untracked and should not be derived from nor instances extended!
class HtmlLinkInfo < Object
# @overload initialize()
# Default ctor.
# @return [Wx::HTML::HtmlLinkInfo]
# @overload initialize(href, target=(''))
# Construct hypertext link from HREF (aka URL) and TARGET (name of target frame).
# @param href [String]
# @param target [String]
# @return [Wx::HTML::HtmlLinkInfo]
def initialize(*args) end
# Return pointer to event that generated OnLinkClicked() event.
# Valid only within {Wx::HTML::HtmlWindow#on_link_clicked}, NULL otherwise.
# @return [Wx::MouseEvent]
def get_event; end
alias_method :event, :get_event
# Return HREF value of the tag.
# @return [String]
def get_href; end
alias_method :href, :get_href
# Return pointer to the cell that was clicked.
# Valid only within {Wx::HTML::HtmlWindow#on_link_clicked}, NULL otherwise.
# @return [Wx::HTML::HtmlCell]
def get_html_cell; end
alias_method :html_cell, :get_html_cell
# Return TARGET value of the tag (this value is used to specify in which frame should be the page pointed by {Wx::HTML::HtmlLinkInfo#get_href} Href opened).
# @return [String]
def get_target; end
alias_method :target, :get_target
end # HtmlLinkInfo
# The {Wx::HTML::HtmlContainerCell} class is an implementation of a cell that may contain more cells in it.
# It is heavily used in the {Wx::HTML} layout algorithm.
# ===
#
# Category: {Wx::HTML}
# @see Cells and Containers
#
#
class HtmlContainerCell < HtmlCell
# Constructor.
# parent is pointer to parent container or NULL.
# @param parent [Wx::HTML::HtmlContainerCell]
# @return [Wx::HTML::HtmlContainerCell]
def initialize(parent) end
# Detach a child cell.
# Detaching a cell removes it from this container and allows reattaching it to another one by using {Wx::HTML::HtmlContainerCell#insert_cell}. Alternatively, this method can be used to selectively remove some elements of the HTML document tree by deleting the cell after calling it.
# @param cell [Wx::HTML::HtmlCell] Must be non-null and an immediate child of this cell.
# @return [void]
def detach(cell) end
# Returns container's horizontal alignment.
# @return [Integer]
def get_align_hor; end
alias_method :align_hor, :get_align_hor
# Returns container's vertical alignment.
# @return [Integer]
def get_align_ver; end
alias_method :align_ver, :get_align_ver
# Returns the background colour of the container or {Wx::NULL_COLOUR} if no background colour is set.
# @return [Wx::Colour]
def get_background_colour; end
alias_method :background_colour, :get_background_colour
# Returns the indentation.
# ind is one of the {Wx::HTML_INDENT_}* constants.
# You must call {Wx::HTML::HtmlContainerCell#get_indent_units} with same ind parameter in order to correctly interpret the returned integer value. It is NOT always in pixels!
# @param ind [Integer]
# @return [Integer]
def get_indent(ind) end
alias_method :indent, :get_indent
# Returns the units of indentation for ind where ind is one of the {Wx::HTML_INDENT_}* constants.
# @param ind [Integer]
# @return [Integer]
def get_indent_units(ind) end
alias_method :indent_units, :get_indent_units
# Inserts a new cell into the container.
# Note that the container takes ownership of the cell and will delete it when it itself is destroyed.
# @param cell [Wx::HTML::HtmlCell]
# @return [void]
def insert_cell(cell) end
# Sets the container's horizontal alignment.
# During {Wx::HTML::HtmlCell#layout} each line is aligned according to al value.
# @param al [Integer] new horizontal alignment. May be one of these values:
#
# - {Wx::HTML::HTML_ALIGN_LEFT}: lines are left-aligned (default)
# - {Wx::HTML::HTML_ALIGN_JUSTIFY}: lines are justified
# - {Wx::HTML::HTML_ALIGN_CENTER}: lines are centered
# - {Wx::HTML::HTML_ALIGN_RIGHT}: lines are right-aligned
# @return [void]
def set_align_hor(al) end
alias_method :align_hor=, :set_align_hor
# Sets the container's vertical alignment.
# This is per-line alignment!
# @param al [Integer] new vertical alignment. May be one of these values:
#
# - {Wx::HTML::HTML_ALIGN_BOTTOM}: cells are over the line (default)
# - {Wx::HTML::HTML_ALIGN_CENTER}: cells are centered on line
# - {Wx::HTML::HTML_ALIGN_TOP}: cells are under the line
# @return [void]
def set_align_ver(al) end
alias_method :align_ver=, :set_align_ver
# Sets the background colour for this container.
# @param clr [Wx::Colour,String,Symbol]
# @return [void]
def set_background_colour(clr) end
alias_method :background_colour=, :set_background_colour
# Sets the border (frame) colours.
# A border is a rectangle around the container.
# @param clr1 [Wx::Colour,String,Symbol] Colour of top and left lines
# @param clr2 [Wx::Colour,String,Symbol] Colour of bottom and right lines
# @param border [Integer] Size of the border in pixels
# @return [void]
def set_border(clr1, clr2, border=1) end
# Sets the indentation (free space between borders of container and subcells).
# @param i [Integer] Indentation value.
# @param what [Integer] Determines which of the four borders we're setting. It is OR combination of following constants:
#
# - {Wx::HTML::HTML_INDENT_TOP}: top border
# - {Wx::HTML::HTML_INDENT_BOTTOM}: bottom
# - {Wx::HTML::HTML_INDENT_LEFT}: left
# - {Wx::HTML::HTML_INDENT_RIGHT}: right
# - {Wx::HTML::HTML_INDENT_HORIZONTAL}: left and right
# - {Wx::HTML::HTML_INDENT_VERTICAL}: top and bottom
# - {Wx::HTML::HTML_INDENT_ALL}: all 4 borders
# @param units [Integer] Units of i. This parameter affects interpretation of value.
#
# - {Wx::HTML::HTML_UNITS_PIXELS}: i is number of pixels
# - {Wx::HTML::HTML_UNITS_PERCENT}: i is interpreted as percents of width of parent container
# @return [void]
def set_indent(i, what, units=Wx::HTML::HTML_UNITS_PIXELS) end
# Sets minimal height of the container.
# When container's {Wx::HTML::HtmlCell#layout} is called, m_Height is set depending on layout of subcells to the height of area covered by layed-out subcells. Calling this method guarantees you that the height of container is never smaller than h - even if the subcells cover much smaller area.
# @param h [Integer] The minimal height.
# @param align [Integer] If height of the container is lower than the minimum height, empty space must be inserted somewhere in order to ensure minimal height. This parameter is one of {Wx::HTML::HTML_ALIGN_TOP}, {Wx::HTML::HTML_ALIGN_BOTTOM}, {Wx::HTML::HTML_ALIGN_CENTER}. It refers to the contents, not to the empty place.
# @return [void]
def set_min_height(h, align=Wx::HTML::HTML_ALIGN_TOP) end
alias_method :min_height=, :set_min_height
end # HtmlContainerCell
#
#
#
#
# @note This class is untracked and should not be derived from nor instances extended!
class HtmlSelection < ::Object
# @return [Wx::HTML::HtmlSelection]
def initialize; end
# @overload set(fromPos, fromCell, toPos, toCell)
# @param fromPos [Array(Integer, Integer), Wx::Point]
# @param fromCell [Wx::HTML::HtmlCell]
# @param toPos [Array(Integer, Integer), Wx::Point]
# @param toCell [Wx::HTML::HtmlCell]
# @return [void]
# @overload set(fromCell, toCell)
# @param fromCell [Wx::HTML::HtmlCell]
# @param toCell [Wx::HTML::HtmlCell]
# @return [void]
def set(*args) end
# @return [Wx::HTML::HtmlCell]
def get_from_cell; end
alias_method :from_cell, :get_from_cell
# @return [Wx::HTML::HtmlCell]
def get_to_cell; end
alias_method :to_cell, :get_to_cell
# @return [Wx::Point]
def get_from_pos; end
alias_method :from_pos, :get_from_pos
# @return [Wx::Point]
def get_to_pos; end
alias_method :to_pos, :get_to_pos
# @return [void]
def clear_from_to_character_pos; end
# @return [Boolean]
def are_from_to_character_pos_set; end
# @param pos [Integer]
# @return [void]
def set_from_character_pos(pos) end
alias_method :from_character_pos=, :set_from_character_pos
# @param pos [Integer]
# @return [void]
def set_to_character_pos(pos) end
alias_method :to_character_pos=, :set_to_character_pos
# @return [Integer]
def get_from_character_pos; end
alias_method :from_character_pos, :get_from_character_pos
# @return [Integer]
def get_to_character_pos; end
alias_method :to_character_pos, :get_to_character_pos
# @return [Boolean]
def is_empty; end
alias_method :empty?, :is_empty
end # HtmlSelection
end