wx.Html.HtmlTerminalCellIterator Class Reference

List of all members.

Public Member Functions

delegate bool DelegateProgressReport (int current, int end)
void Dispose ()
bool EquivalentToFindString (string alternativeFindString, FindReplaceFlags alternativeFlags)
 HtmlTerminalCellIterator (HtmlCell root, HtmlCell start, string findString, FindReplaceFlags findFlags)
 HtmlTerminalCellIterator (HtmlCell root, string findString, FindReplaceFlags findFlags)
 HtmlTerminalCellIterator (HtmlCell root, HtmlCell start)
 HtmlTerminalCellIterator (HtmlCell root)
bool MoveBack ()
bool MoveNext ()
void Reset ()
void SelectCurrent (HtmlWindow wnd)

Protected Member Functions

bool CompliesWithFindString (string[] cellWords)
bool CompliesWithFindString (string cellString)
virtual bool IsCellRelevant (HtmlCell cell)
virtual bool IsCellRelevant (System.Collections.Generic.Queue< HtmlCell > preceedingCells)

Properties

DelegateProgressReport CallbackProgressReport [get, set]
HtmlCell Current [get]
FindReplaceFlags FindFlags [get, set]
string FindString [get, set]
string[] FindStrings [get]
int NumberOfFoundCells [get]
HtmlCell[] RelevantCells [get]
bool VisitedAllRelevantCells [get]


Detailed Description

This is a pure .NET 2 implementation iterating over terminal siblings of an wx.HtmlCell. You may turn this off defining NET_1_1_ONLY on compilation.

You may increment or decrement the iterator. The iterator will complete a list of all terminal cells on demand. Once this list has been created, it will not be maintained. So, you probably will encounter problems if you edit cells while iterating thair siblings.


Constructor & Destructor Documentation

wx.Html.HtmlTerminalCellIterator.HtmlTerminalCellIterator ( HtmlCell  root  ) 

This will iterate all relevant cells that are siblings of root.

wx.Html.HtmlTerminalCellIterator.HtmlTerminalCellIterator ( HtmlCell  root,
HtmlCell  start 
)

This will iterate all relevant cells that are siblings of root starting after start. The start of iteration is not defined if start is not a sibling of root.

wx.Html.HtmlTerminalCellIterator.HtmlTerminalCellIterator ( HtmlCell  root,
string  findString,
FindReplaceFlags  findFlags 
)

Enumerates terminal cells below root that comprise text complying with findString. The text contents complies with findString if it is a word from findString.

wx.Html.HtmlTerminalCellIterator.HtmlTerminalCellIterator ( HtmlCell  root,
HtmlCell  start,
string  findString,
FindReplaceFlags  findFlags 
)

Enumerates terminal cells below root starting at position after start that comprise text complying with findString. The text contents complies with findString if it is a word from findString.

Refer to the remarks on the CTor defining a start position without a find string for details on setting the start position.


Member Function Documentation

bool wx.Html.HtmlTerminalCellIterator.CompliesWithFindString ( string[]  cellWords  )  [protected]

Use this to test text associated with a HTML cell agains the find string. If this iterator does filter according to string input, this is always true.

This method will be used within IsCellRelevant() to test with resp. to a find string. You may either reuse this in alternative implementations of IsCellRelevant() or you may replace this to implement alternative filters regarding text.

bool wx.Html.HtmlTerminalCellIterator.CompliesWithFindString ( string  cellString  )  [protected]

Use this to test text associated with a HTML cell agains the find string. If this iterator does filter according to string input, this is always true.

This method will be used within IsCellRelevant() to test with resp. to a find string. You may either reuse this in alternative implementations of IsCellRelevant() or you may replace this to implement alternative filters regarding text.

delegate bool wx.Html.HtmlTerminalCellIterator.DelegateProgressReport ( int  current,
int  end 
)

Something of this kind will be called on searching.

Parameters:
current snd end specify a measure for the progress.
end is the end point for current on completed search. However, if this is negative, progress report is not supported.
You may return false in order to stop searching and true to proceed.

void wx.Html.HtmlTerminalCellIterator.Dispose (  ) 

bool wx.Html.HtmlTerminalCellIterator.EquivalentToFindString ( string  alternativeFindString,
FindReplaceFlags  alternativeFlags 
)

This is true iff the argument is equivalent to the currently used find string.

virtual bool wx.Html.HtmlTerminalCellIterator.IsCellRelevant ( HtmlCell  cell  )  [protected, virtual]

Overload this to implement iterators selecting non-terminal or more specific terminal nodes. This method will be asked before selecting a new Current() node on MoveNext() and MoveBack(). This must be true for all Current() nodes.

Overload and change this to select different classes of nodes.

Currently, this will select terminal nodes which are not formatting nodes. If this iterations defines a find string then this method will also take

virtual bool wx.Html.HtmlTerminalCellIterator.IsCellRelevant ( System.Collections.Generic.Queue< HtmlCell preceedingCells  )  [protected, virtual]

Overload this to implement iterators selecting non-terminal or more specific terminal nodes. This method will be asked before selecting a new Current() node on MoveNext() and MoveBack(). This must be true for all Current() nodes.

Overload and change this to select different classes of nodes.

Currently, this will select terminal nodes which are not formatting nodes. If this iterations defines a find string then this method will also take

bool wx.Html.HtmlTerminalCellIterator.MoveBack (  ) 

Moves back to the previous position. If the current position is the initial position, this will move to the last terminal cell. The result will be true iff more elements exist in this direction.

bool wx.Html.HtmlTerminalCellIterator.MoveNext (  ) 

Moves one position forward to the next element. This must be called once before reading a current element. this will return true iff more elements exist in this direction.

void wx.Html.HtmlTerminalCellIterator.Reset (  ) 

Moves the iterator back to the initial position before the first element or behind the next.

void wx.Html.HtmlTerminalCellIterator.SelectCurrent ( HtmlWindow  wnd  ) 

Selects in the argument according to the currently enumerated selection. This iterator enumerated cells but also selections that may comprise more than cell. The current cell is always the last cell of this selection. However, if this searches for more than one word (searching e.g. for a quoted find string), then the resulting selection will comprise also cells preceeding the current. This iterator keeps track of this. So, if you want select in the searched dialog acording to this iterator, use this method.

Please note: wnd must comprise the root of this document.


Property Documentation

DelegateProgressReport wx.Html.HtmlTerminalCellIterator.CallbackProgressReport [get, set]

Set this if you want a specific function to be called regularly during search. This function may terminate the search returning false.

HtmlCell wx.Html.HtmlTerminalCellIterator.Current [get]

FindReplaceFlags wx.Html.HtmlTerminalCellIterator.FindFlags [get, set]

These are the flags that will be used for searching the HTML page.

string wx.Html.HtmlTerminalCellIterator.FindString [get, set]

The original strings that this dialog shall find. You may also set this here.

string [] wx.Html.HtmlTerminalCellIterator.FindStrings [get]

Returns the array of words that this instance uses as a filter. This might be null;

int wx.Html.HtmlTerminalCellIterator.NumberOfFoundCells [get]

Returns the number of yet found cells that comply.

HtmlCell [] wx.Html.HtmlTerminalCellIterator.RelevantCells [get]

The array of relevant cells.

bool wx.Html.HtmlTerminalCellIterator.VisitedAllRelevantCells [get]

True iff all relevant cells have been visited at least once.


Manual of the wx.NET   (c) 2003-2011 the wx.NET project at   Get wx.NET at SourceForge.net. Fast, secure and Free Open Source software downloads