// -*- C++ -*- /* This file is part of *====================================================== * *LyX,TheDocumentProcessor * *Copyright(C)19951996MatthiasEttrich *andtheLyXTeam. *
*======================================================*/
#ifndef _LASTFILES_H #define _LASTFILES_H
#ifdef __GNUG__ #pragma interface #endif
#include"LString.h"
/** The latest documents loaded Thisclasstakescareofthelast.lyxfilesusedbytheLyXuser.It bothreadsandwritesthisinformationtoafile.Thenumberoffiles keptareuserdefined,butdefaultstofour.
*/ class LastFiles
{ public: /**@name Constructors and Deconstructors */ //@{ /** Parametersare:nameoffiletoread.WhetheryouwantLastFiles tocheckforfileexistance,andthenumberoffilestoremember.
*/
LastFiles(LString const &, bool dostat = true, char num = 4); ///
~LastFiles(); //@}
/**@name Methods */ //@{ /** Thisfuntioninserts#file#intothelastfileslist.Ifthefile alreadyexistitismovedtothetopofthelist.Ifitdon't existitisplacedonthetopofthelist.Ifthelistalreadyis fullthelastvisitedfileinthelistispuchedoutanddeleted.
*/ void newFile(LString const &); /** Writes the lastfiles table to disk. A " is placed around the filenamestopreservespecialchars.(notallarepreserved anyway,butatleastspaceis.)
*/ void writeFile(LString const &) const; //@} private: /**@name const variables */ //@{ /// enum { ///
DEFAULTFILES = 4
}; /** There is no point in keeping more than this number of files atthesametime.Howeverperhapssomedaysomeonefindsusefor morefilesandwantstochangeit.Pleasedo.Butdon'tshow thefilesinamenu...
*/ enum { ///
ABSOLUTEMAXLASTFILES = 20
}; //@}
/**@name Variables */ //@{ /// an array of lastfiles
LString *files; /// number of files in the lastfiles list. char num_files; /// check for file existance or not. bool dostat; //@}
/**@name Methods */ //@{ /** reads the .lyx_lastfiles at the beginning of the LyX session. Thiswillreadthelastfilesfile(usually.lyx_lastfiles).It willnormallydiscardfilesthatdon'texistanymore,unless LastFileshasbeeninitializedwithdostat=false.
*/ void readFile(LString const &); /// used by the constructor to set the number of stored last files. void setNumberOfFiles(char num); //@}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.