$CLASSNAME$
	HISTORY
$SUMMARY$
	Class are destined to control listing of history.
$LANG_RU$
	     ""
$ABOUT$
	Class are destined to control listing of history.
$LANG_RU$
	     ""
$SYNTAX$
	HistoryObj(nLrow, nLcol, nRrow, nRcol, sColor) --> QUEUE object
$ATTRIBUTES$
	<ClassName> 	HISTORY
	<Lrow> 		Numeric, a HISTORY viewport coordinates
	<Lcol>         	Numeric, a HISTORY viewport coordinates
	<Rrow>       	Numeric, a HISTORY viewport coordinates
	<Rcol>        	Numeric, a HISTORY viewport coordinates
	<History>	Array, array of history items
	<Header>	String, the history box header
	<Size>		Numeric, the max size history array
	<ColorSpec>	String, color specification.
			"clr1, clr2, clr3, clr4"
			clr1 - border and items color
			clr2 - current item colors if object in focus
			clr3 - current item colors if object outof focus
			clr4 - title colors
$LANG_RU$
	<ClassName> 	HISTORY
	<Lrow> 		Numeric,    HISTORY
	<Lcol>         	Numeric,    HISTORY
	<Rrow>       	Numeric,    HISTORY
	<Rcol>        	Numeric,    HISTORY
	<History>	Array,   ""
	<Header>	String,  
	<Size>		Numeric,    ""
	<ColorSpec>	String,  .

			"clr1, clr2, clr3, clr4"
			clr1 -     
			clr2 -   ,    
			clr3 -   ,     
			clr4 -  

$METHODNAME$
	HistoryObj()
$SUMMARY$
	HISTORY object constructor.
$LANG_RU$
	  HISTORY.
$SYNTAX$
	HistoryObj(nLrow, nLcol, nRrow, nRcol, sColor) --> QUEUE object
$ARGUMENTS$
	<nLrow>		Numeric, a HISTORY viewport coordinates
	<nLcol>         Numeric, a HISTORY viewport coordinates
	<nRrow>         Numeric, a HISTORY viewport coordinates
	<nRCol>         Numeric, a HISTORY viewport coordinates
	<sColor>        String, color specification.
$LANG_RU$
	<nLrow>		Numeric,    HISTORY
	<nLcol>         Numeric,    HISTORY
	<nRrow>         Numeric,    HISTORY
	<nRCol>         Numeric,    HISTORY
	<sColor>        String,  .
$RETURNS$
	Method returns new HISTORY object.
$LANG_RU$
	    HISTORY.
$DESCRIPTION$
	HistoryObj() is constructs and returns new HISTORY object.
	That class can be use to manipulating listing of history( for example,
	history listing of loaded files)
$LANG_RU$
	HistoryObj()       HISTORY.
	       ""
	(,  ""  )
$ENDMETHOD$

$METHODNAME$
	InsertToFirst()
$SUMMARY$
	Insert item to first position.
$LANG_RU$
	    .
$SYNTAX$
	InsertToFirst(<sData>) --> NIL
$ARGUMENTS$
	<sData>  - String, data to inserting
$LANG_RU$
	<sData>	 - String,     ""
$RETURNS$
	Returns NIL.
$LANG_RU$
	 NIL.
$DESCRIPTION$
	InsertToFirst() is inserts data <sData> to history array <::History> begin with
	first position. All items with one will be shifted down one position.

	If <sData> already exist within <::History>, it removes from old place and
	insert to first position.
$LANG_RU$
	InsertToFirst()    "" <sData>   
	  <::History>

	 <sData>     <::History>,   
	  .
$ENDMETHOD$

$METHODNAME$
	Add()
$SUMMARY$
	Add item into history.
$LANG_RU$
	 .
$SYNTAX$
	Add(<sData>) --> NIL
$ARGUMENTS$
	<sData>  - String, data to adding
$LANG_RU$
	<sData>	 - String,     ""
$RETURNS$
	Returns NIL.
$LANG_RU$
	 NIL.
$DESCRIPTION$
	Add() is addes data <sData> to the end of history array <::History>.

	If <sData> already exist within <::History>, it removes from old place and
	addes to the end of <::History>.
$LANG_RU$
	Add()    <sData>    <::History>

	 <sData>     <::History>,    
	     <::History>.
$ENDMETHOD$

$METHODNAME$
	Delete()
$SUMMARY$
	Delete item from history.
$LANG_RU$
	 .
$SYNTAX$
	Delete(<sData>) --> TRUE || FALSE
$ARGUMENTS$
	<sData>  - String, data to deleting
$LANG_RU$
	<sData>	 - String,   .
$RETURNS$
	Returns TRUE if element <sData> exists and removes.
$LANG_RU$
	 TRUE   <sData>   .
$DESCRIPTION$
	Delete() is deletes data <sData> from the history array <::History>.
	The size of <::History> not changes.

	If <sData> exist into <::History>, it removes, all lower items shift up one
	position  and Delete() returns TRUE.
$LANG_RU$
	Delete()   <sData>   <::History>. 
	<::History>  .

	  <sData>    <::History>,    
	,       Delete()  TRUE.
$ENDMETHOD$

$METHODNAME$
	SetSize()
$SUMMARY$
	Set new size history array.
$LANG_RU$
	   ""
$SYNTAX$
	SetSize(<nSize>) -->
$ARGUMENTS$
	<sSize>  - Numeric, new history array size.
$LANG_RU$
	<sSize>  - Numeric,   
$RETURNS$
	Returns NIL.
$LANG_RU$
	 NIL.
$DESCRIPTION$
	SetSize() set new size <nSize> for history array <::History>.
$LANG_RU$
	SetSize()      <::History>  <nSize>
$ENDMETHOD$

$METHODNAME$
	First()
$SUMMARY$
	Get first item.
$LANG_RU$
	  .
$SYNTAX$
	First() --> <sData>
$ARGUMENTS$
$RETURNS$
	Returns first item of <::History>.
$LANG_RU$
	   <::History>.
$DESCRIPTION$
	First() returns first item of history array <::History> as string <sData>
	without removes element from array.
$LANG_RU$
	First()      <::History>    
	.
$ENDMETHOD$

$METHODNAME$
	Set()
$SUMMARY$
	Init history.
$LANG_RU$
	 "".
$SYNTAX$
	Set(<aArr>[, <nSize>]) --> NIL
$ARGUMENTS$
	<aArr>		Array, array of strings - new history items
	<nSize>		Numeric, the size of history buffer.
$LANG_RU$
	<aArr>		Array,   -   ""
	<nSize>		Numeric,  .
$RETURNS$
	Returns NIL.
$LANG_RU$
	 NIL.
$DESCRIPTION$
	Set() truncates <::History> to zero and addes to <::History>
	items from <aArr>.

	New size of history buffer is <nSize>. If <nSize> not specified, then
	new size is size of <aArr>
$LANG_RU$
	Set()     <::History>  0    
	   <aArr>.

	  "" - <nSize>.   <nSize>  , 
	      <aArr>.
$ENDMETHOD$

$METHODNAME$
	Run()
$SUMMARY$
	Run history.
$LANG_RU$
	 ""
$SYNTAX$
	Run([<nPos>][, <lItem>]) --> <vData>
$ARGUMENTS$
	<nPos>		Numeric, the current position into <::History>(default 1)
	<lItem>		Logical, if TRUE(default) returns items value, else returns item number.
$LANG_RU$
	<nPos>		Numeric,     <::History>(  1)
	<lItem>		Logical,  TRUE( )    ,  -  .
$RETURNS$
	Returns value or index of selected item.
$LANG_RU$
	     .
$DESCRIPTION$
	Run() is drows history and it
	is simple key handler and returns by press <ENTER> value or index of selected item.
$LANG_RU$
	Run()   HISTORY,      
	<ENTER>     .
$ENDMETHOD$

$EXAMPLES$

History := HistoryObj(5, 5, 10, 30)
do while .t.
	fname := fileDialog()
	if !empty(fname)
		History:InsertToFirst(fname)
	else
		exit
	endif
enddo

do while .t.
	fname := History:Run()
	str := memoread(fname)
	memoedit(str, 0, 0, maxrow(), maxcol())
enddo

$PLATFORMS$
   No dependies of platform.
$LANG_RU$
	   .
$SEEALSO$
$AUTHOR$
ITK
$LASTDATE$




