Struct xpcom::interfaces::nsITableEditor
[−]
[src]
#[repr(C)]pub struct nsITableEditor { /* fields omitted */ }
interface nsITableEditor : nsISupports
Methods
impl nsITableEditor
[src]
pub fn coerce<T: nsITableEditorCoerce>(&self) -> &T
[src]
Cast this nsITableEditor
to one of its base interfaces.
impl nsITableEditor
[src]
pub const eNoSearch: i64
eNoSearch: i64 = 0
pub const ePreviousColumn: i64
ePreviousColumn: i64 = 1
pub const ePreviousRow: i64
ePreviousRow: i64 = 2
pub unsafe fn InsertTableCell(&self, aNumber: int32_t, aAfter: bool) -> nsresult
[src]
/** Insert table methods
* Insert relative to the selected cell or the
* cell enclosing the selection anchor
* The selection is collapsed and is left in the new cell
* at the same row,col location as the original anchor cell
*
* @param aNumber Number of items to insert
* @param aAfter If TRUE, insert after the current cell,
* else insert before current cell
*/
void insertTableCell (in long aNumber, in boolean aAfter);
pub unsafe fn InsertTableColumn(
&self,
aNumber: int32_t,
aAfter: bool
) -> nsresult
[src]
&self,
aNumber: int32_t,
aAfter: bool
) -> nsresult
void insertTableColumn (in long aNumber, in boolean aAfter);
pub unsafe fn InsertTableRow(&self, aNumber: int32_t, aAfter: bool) -> nsresult
[src]
void insertTableRow (in long aNumber, in boolean aAfter);
pub unsafe fn DeleteTable(&self) -> nsresult
[src]
/** Delete table methods
* Delete starting at the selected cell or the
* cell (or table) enclosing the selection anchor
* The selection is collapsed and is left in the
* cell at the same row,col location as
* the previous selection anchor, if possible,
* else in the closest neigboring cell
*
* @param aNumber Number of items to insert/delete
*/
void deleteTable ();
pub unsafe fn DeleteTableCellContents(&self) -> nsresult
[src]
/** Delete just the cell contents
* This is what should happen when Delete key is used
* for selected cells, to minimize upsetting the table layout
*/
void deleteTableCellContents ();
pub unsafe fn DeleteTableCell(&self, aNumber: int32_t) -> nsresult
[src]
/** Delete cell elements as well as contents
* @param aNumber Number of contiguous cells, rows, or columns
*
* When there are more than 1 selected cells, aNumber is ignored.
* For Delete Rows or Columns, the complete columns or rows are
* determined by the selected cells. E.g., to delete 2 complete rows,
* user simply selects a cell in each, and they don't
* have to be contiguous.
*/
void deleteTableCell (in long aNumber);
pub unsafe fn DeleteTableColumn(&self, aNumber: int32_t) -> nsresult
[src]
void deleteTableColumn (in long aNumber);
pub unsafe fn DeleteTableRow(&self, aNumber: int32_t) -> nsresult
[src]
void deleteTableRow (in long aNumber);
pub unsafe fn SelectTableCell(&self) -> nsresult
[src]
/** Table Selection methods
* Selecting a row or column actually
* selects all cells (not TR in the case of rows)
*/
void selectTableCell ();
pub unsafe fn SelectBlockOfCells(
&self,
aStartCell: *const nsIDOMElement,
aEndCell: *const nsIDOMElement
) -> nsresult
[src]
&self,
aStartCell: *const nsIDOMElement,
aEndCell: *const nsIDOMElement
) -> nsresult
/** Select a rectangular block of cells:
* all cells falling within the row/column index of aStartCell
* to through the row/column index of the aEndCell
* aStartCell can be any location relative to aEndCell,
* as long as they are in the same table
* @param aStartCell starting cell in block
* @param aEndCell ending cell in block
*/
void selectBlockOfCells (in nsIDOMElement aStartCell, in nsIDOMElement aEndCell);
pub unsafe fn SelectTableRow(&self) -> nsresult
[src]
void selectTableRow ();
pub unsafe fn SelectTableColumn(&self) -> nsresult
[src]
void selectTableColumn ();
pub unsafe fn SelectTable(&self) -> nsresult
[src]
void selectTable ();
pub unsafe fn SelectAllTableCells(&self) -> nsresult
[src]
void selectAllTableCells ();
pub unsafe fn SwitchTableCellHeaderType(
&self,
aSourceCell: *const nsIDOMElement,
_retval: *mut *const nsIDOMElement
) -> nsresult
[src]
&self,
aSourceCell: *const nsIDOMElement,
_retval: *mut *const nsIDOMElement
) -> nsresult
/** Create a new TD or TH element, the opposite type of the supplied aSourceCell
* 1. Copy all attributes from aSourceCell to the new cell
* 2. Move all contents of aSourceCell to the new cell
* 3. Replace aSourceCell in the table with the new cell
*
* @param aSourceCell The cell to be replaced
* @return The new cell that replaces aSourceCell
*/
nsIDOMElement switchTableCellHeaderType (in nsIDOMElement aSourceCell);
pub unsafe fn JoinTableCells(
&self,
aMergeNonContiguousContents: bool
) -> nsresult
[src]
&self,
aMergeNonContiguousContents: bool
) -> nsresult
/** Merges contents of all selected cells
* for selected cells that are adjacent,
* this will result in a larger cell with appropriate
* rowspan and colspan, and original cells are deleted
* The resulting cell is in the location of the
* cell at the upper-left corner of the adjacent
* block of selected cells
*
* @param aMergeNonContiguousContents:
* If true:
* Non-contiguous cells are not deleted,
* but their contents are still moved
* to the upper-left cell
* If false: contiguous cells are ignored
*
* If there are no selected cells,
* and selection or caret is in a cell,
* that cell and the one to the right
* are merged
*/
void joinTableCells (in boolean aMergeNonContiguousContents);
pub unsafe fn SplitTableCell(&self) -> nsresult
[src]
/** Split a cell that has rowspan and/or colspan > 0
* into cells such that all new cells have
* rowspan = 1 and colspan = 1
* All of the contents are not touched --
* they will appear to be in the upper-left cell
*/
void splitTableCell ();
pub unsafe fn NormalizeTable(&self, aTable: *const nsIDOMElement) -> nsresult
[src]
/** Scan through all rows and add cells as needed so
* all locations in the cellmap are occupied.
* Used after inserting single cells or pasting
* a collection of cells that extend past the
* previous size of the table
* If aTable is null, it uses table enclosing the selection anchor
* This doesn't doesn't change the selection,
* thus it can be used to fixup all tables
* in a page independent of the selection
*/
void normalizeTable (in nsIDOMElement aTable);
pub unsafe fn GetCellIndexes(
&self,
aCell: *const nsIDOMElement,
aRowIndex: *mut int32_t,
aColIndex: *mut int32_t
) -> nsresult
[src]
&self,
aCell: *const nsIDOMElement,
aRowIndex: *mut int32_t,
aColIndex: *mut int32_t
) -> nsresult
/** Get the row an column index from the layout's cellmap
* If aCell is null, it will try to find enclosing table of selection anchor
*
*/
void getCellIndexes (in nsIDOMElement aCell, out long aRowIndex, out long aColIndex);
pub unsafe fn GetTableSize(
&self,
aTable: *const nsIDOMElement,
aRowCount: *mut int32_t,
aColCount: *mut int32_t
) -> nsresult
[src]
&self,
aTable: *const nsIDOMElement,
aRowCount: *mut int32_t,
aColCount: *mut int32_t
) -> nsresult
/** Get the number of rows and columns in a table from the layout's cellmap
* If aTable is null, it will try to find enclosing table of selection ancho
* Note that all rows in table will not have this many because of
* ROWSPAN effects or if table is not "rectangular" (has short rows)
*/
void getTableSize (in nsIDOMElement aTable, out long aRowCount, out long aColCount);
pub unsafe fn GetCellAt(
&self,
aTable: *const nsIDOMElement,
aRowIndex: int32_t,
aColIndex: int32_t,
_retval: *mut *const nsIDOMElement
) -> nsresult
[src]
&self,
aTable: *const nsIDOMElement,
aRowIndex: int32_t,
aColIndex: int32_t,
_retval: *mut *const nsIDOMElement
) -> nsresult
/** Get a cell element at cellmap grid coordinates
* A cell that spans across multiple cellmap locations will
* be returned multiple times, once for each location it occupies
*
* @param aTable A table in the document
* @param aRowIndex, aColIndex The 0-based cellmap indexes
*
* (in C++ returns: NS_EDITOR_ELEMENT_NOT_FOUND if an element is not found
* passes NS_SUCCEEDED macro)
*
* You can scan for all cells in a row or column
* by iterating through the appropriate indexes
* until the returned aCell is null
*/
nsIDOMElement getCellAt (in nsIDOMElement aTable, in long aRowIndex, in long aColIndex);
pub unsafe fn GetCellDataAt(
&self,
aTable: *const nsIDOMElement,
aRowIndex: int32_t,
aColIndex: int32_t,
aCell: *mut *const nsIDOMElement,
aStartRowIndex: *mut int32_t,
aStartColIndex: *mut int32_t,
aRowSpan: *mut int32_t,
aColSpan: *mut int32_t,
aActualRowSpan: *mut int32_t,
aActualColSpan: *mut int32_t,
aIsSelected: *mut bool
) -> nsresult
[src]
&self,
aTable: *const nsIDOMElement,
aRowIndex: int32_t,
aColIndex: int32_t,
aCell: *mut *const nsIDOMElement,
aStartRowIndex: *mut int32_t,
aStartColIndex: *mut int32_t,
aRowSpan: *mut int32_t,
aColSpan: *mut int32_t,
aActualRowSpan: *mut int32_t,
aActualColSpan: *mut int32_t,
aIsSelected: *mut bool
) -> nsresult
/** Get a cell at cellmap grid coordinates and associated data
* A cell that spans across multiple cellmap locations will
* be returned multiple times, once for each location it occupies
* Examine the returned aStartRowIndex and aStartColIndex to see
* if it is in the same layout column or layout row:
* A "layout row" is all cells sharing the same top edge
* A "layout column" is all cells sharing the same left edge
* This is important to determine what to do when inserting or deleting a column or row
*
* @param aTable A table in the document
* @param aRowIndex, aColIndex The 0-based cellmap indexes
* returns values:
* @param aCell The cell at this cellmap location
* @param aStartRowIndex The row index where cell starts
* @param aStartColIndex The col index where cell starts
* @param aRowSpan May be 0 (to span down entire table) or number of cells spanned
* @param aColSpan May be 0 (to span across entire table) or number of cells spanned
* @param aActualRowSpan The actual number of cellmap locations (rows) spanned by the cell
* @param aActualColSpan The actual number of cellmap locations (columns) spanned by the cell
* @param aIsSelected
* @param
*
* (in C++ returns: NS_EDITOR_ELEMENT_NOT_FOUND if an element is not found
* passes NS_SUCCEEDED macro)
*/
void getCellDataAt (in nsIDOMElement aTable, in long aRowIndex, in long aColIndex, out nsIDOMElement aCell, out long aStartRowIndex, out long aStartColIndex, out long aRowSpan, out long aColSpan, out long aActualRowSpan, out long aActualColSpan, out boolean aIsSelected);
pub unsafe fn GetFirstRow(
&self,
aTableElement: *const nsIDOMElement,
_retval: *mut *const nsIDOMNode
) -> nsresult
[src]
&self,
aTableElement: *const nsIDOMElement,
_retval: *mut *const nsIDOMNode
) -> nsresult
/** Get the first row element in a table
*
* @return The row at the requested index
* Returns null if there are no rows in table
* (in C++ returns: NS_EDITOR_ELEMENT_NOT_FOUND if an element is not found
* passes NS_SUCCEEDED macro)
*/
nsIDOMNode getFirstRow (in nsIDOMElement aTableElement);
pub unsafe fn GetNextRow(
&self,
aTableElement: *const nsIDOMNode,
_retval: *mut *const nsIDOMNode
) -> nsresult
[src]
&self,
aTableElement: *const nsIDOMNode,
_retval: *mut *const nsIDOMNode
) -> nsresult
/** Get the next row element starting the search from aTableElement
*
* @param aTableElement Any TR or child-of-TR element in the document
*
* @return The row to start search from
* and the row returned from the search
* Returns null if there isn't another row
* (in C++ returns: NS_EDITOR_ELEMENT_NOT_FOUND if an element is not found
* passes NS_SUCCEEDED macro)
*/
nsIDOMNode getNextRow (in nsIDOMNode aTableElement);
pub unsafe fn GetSelectedOrParentTableElement(
&self,
aTagName: &mut nsAString,
aCount: *mut int32_t,
_retval: *mut *const nsIDOMElement
) -> nsresult
[src]
&self,
aTagName: &mut nsAString,
aCount: *mut int32_t,
_retval: *mut *const nsIDOMElement
) -> nsresult
/** Preferred direction to search for neighboring cell
* when trying to locate a cell to place caret in after
* a table editing action.
* Used for aDirection param in SetSelectionAfterTableEdit
*/
/** Examine the current selection and find
* a selected TABLE, TD or TH, or TR element.
* or return the parent TD or TH if selection is inside a table cell
* Returns null if no table element is found.
*
* @param aTagName The tagname of returned element
* Note that "td" will be returned if name
* is actually "th"
* @param aCount How many table elements were selected
* This tells us if we have multiple cells selected
* (0 if element is a parent cell of selection)
* @return The table element (table, row, or first selected cell)
*
*/
nsIDOMElement getSelectedOrParentTableElement (out AString aTagName, out long aCount);
pub unsafe fn GetSelectedCellsType(
&self,
aElement: *const nsIDOMElement,
_retval: *mut uint32_t
) -> nsresult
[src]
&self,
aElement: *const nsIDOMElement,
_retval: *mut uint32_t
) -> nsresult
/** Generally used after GetSelectedOrParentTableElement
* to test if selected cells are complete rows or columns
*
* @param aElement Any table or cell element or any element
* inside a table
* Used to get enclosing table.
* If null, selection's anchorNode is used
*
* @return
* 0 aCellElement was not a cell
* (returned result = NS_ERROR_FAILURE)
* TABLESELECTION_CELL There are 1 or more cells selected but
* complete rows or columns are not selected
* TABLESELECTION_ROW All cells are in 1 or more rows
* and in each row, all cells selected
* Note: This is the value if all rows
* (thus all cells) are selected
* TABLESELECTION_COLUMN All cells are in 1 or more columns
* and in each column, all cells are selected
*/
uint32_t getSelectedCellsType (in nsIDOMElement aElement);
pub unsafe fn GetFirstSelectedCell(
&self,
aRange: *mut *const nsIDOMRange,
_retval: *mut *const nsIDOMElement
) -> nsresult
[src]
&self,
aRange: *mut *const nsIDOMRange,
_retval: *mut *const nsIDOMElement
) -> nsresult
/** Get first selected element from first selection range.
* (If multiple cells were selected this is the first in the order they were selected)
* Assumes cell-selection model where each cell
* is in a separate range (selection parent node is table row)
* @param aCell [OUT] Selected cell or null if ranges don't contain
* cell selections
* @param aRange [OUT] Optional: if not null, return the selection range
* associated with the cell
* Returns the DOM cell element
* (in C++: returns NS_EDITOR_ELEMENT_NOT_FOUND if an element is not found
* passes NS_SUCCEEDED macro)
*/
nsIDOMElement getFirstSelectedCell (out nsIDOMRange aRange);
pub unsafe fn GetFirstSelectedCellInTable(
&self,
aRowIndex: *mut int32_t,
aColIndex: *mut int32_t,
_retval: *mut *const nsIDOMElement
) -> nsresult
[src]
&self,
aRowIndex: *mut int32_t,
aColIndex: *mut int32_t,
_retval: *mut *const nsIDOMElement
) -> nsresult
/** Get first selected element in the table
* This is the upper-left-most selected cell in table,
* ignoring the order that the user selected them (order in the selection ranges)
* Assumes cell-selection model where each cell
* is in a separate range (selection parent node is table row)
* @param aCell Selected cell or null if ranges don't contain
* cell selections
* @param aRowIndex Optional: if not null, return row index of 1st cell
* @param aColIndex Optional: if not null, return column index of 1st cell
*
* Returns the DOM cell element
* (in C++: returns NS_EDITOR_ELEMENT_NOT_FOUND if an element is not found
* passes NS_SUCCEEDED macro)
*/
nsIDOMElement getFirstSelectedCellInTable (out long aRowIndex, out long aColIndex);
pub unsafe fn GetNextSelectedCell(
&self,
aRange: *mut *const nsIDOMRange,
_retval: *mut *const nsIDOMElement
) -> nsresult
[src]
&self,
aRange: *mut *const nsIDOMRange,
_retval: *mut *const nsIDOMElement
) -> nsresult
/** Get next selected cell element from first selection range.
* Assumes cell-selection model where each cell
* is in a separate range (selection parent node is table row)
* Always call GetFirstSelectedCell() to initialize stored index of "next" cell
* @param aCell Selected cell or null if no more selected cells
* or ranges don't contain cell selections
* @param aRange Optional: if not null, return the selection range
* associated with the cell
*
* Returns the DOM cell element
* (in C++: returns NS_EDITOR_ELEMENT_NOT_FOUND if an element is not found
* passes NS_SUCCEEDED macro)
*/
nsIDOMElement getNextSelectedCell (out nsIDOMRange aRange);
Methods from Deref<Target = nsISupports>
pub fn coerce<T: nsISupportsCoerce>(&self) -> &T
[src]
Cast this nsISupports
to one of its base interfaces.
pub unsafe fn QueryInterface(
&self,
uuid: &nsIID,
result: *mut *mut c_void
) -> nsresult
[src]
&self,
uuid: &nsIID,
result: *mut *mut c_void
) -> nsresult
void QueryInterface (in nsIIDRef uuid, [iid_is (uuid), retval] out nsQIResult result);
pub unsafe fn AddRef(&self) -> nsrefcnt
[src]
[noscript,notxpcom] nsrefcnt AddRef ();
pub unsafe fn Release(&self) -> nsrefcnt
[src]
[noscript,notxpcom] nsrefcnt Release ();
Trait Implementations
impl XpCom for nsITableEditor
[src]
const IID: nsIID
IID: nsIID = nsID(1208346244, 18873, 4563, [156, 228, 237, 96, 189, 108, 181, 188])
fn query_interface<T: XpCom>(&self) -> Option<RefPtr<T>>
[src]
Perform a QueryInterface call on this object, attempting to dynamically cast it to the requested interface type. Returns Some(RefPtr) if the cast succeeded, and None otherwise. Read more
impl RefCounted for nsITableEditor
[src]
unsafe fn addref(&self)
[src]
Increment the reference count.
unsafe fn release(&self)
[src]
Decrement the reference count, potentially freeing backing memory.
impl Deref for nsITableEditor
[src]
type Target = nsISupports
The resulting type after dereferencing.
fn deref(&self) -> &nsISupports
[src]
Dereferences the value.