Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members

FXHistoryList.h

Go to the documentation of this file.
00001 /********************************************************************************
00002 *                                                                               *
00003 *                  History list object                                          *
00004 *                                                                               *
00005 *********************************************************************************
00006 * Copyright (C) 2003 by Mathew Robertson.   All Rights Reserved.                *
00007 *********************************************************************************
00008 * This library is free software; you can redistribute it and/or                 *
00009 * modify it under the terms of the GNU Lesser General Public                    *
00010 * License as published by the Free Software Foundation; either                  *
00011 * version 2.1 of the License, or (at your option) any later version.            *
00012 *                                                                               *
00013 * This library is distributed in the hope that it will be useful,               *
00014 * but WITHOUT ANY WARRANTY; without even the implied warranty of                *
00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU             *
00016 * Lesser General Public License for more details.                               *
00017 *                                                                               *
00018 * You should have received a copy of the GNU Lesser General Public              *
00019 * License along with this library; if not, write to the Free Software           *
00020 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA.    *
00021 *********************************************************************************/
00022 #ifndef FXHISTORYLIST_H
00023 #define FXHISTORYLIST_H
00024 
00025 #ifndef FXHISTORYITEMS_H
00026 #include "FXHistoryItems.h"
00027 #endif
00028 namespace FXEX {
00029 
00030 /**
00031 * The History list manages a list of items that can be branched - eg an undo list or a URL list
00032 */
00033 class FXAPI FXHistoryList : public FXHistoryItems {
00034     FXDECLARE(FXHistoryList)
00035 
00036   private:
00037     FXHistoryList(const FXHistoryList&);
00038     FXHistoryList &operator=(const FXHistoryList&);
00039 
00040   protected:
00041     FXHistoryList(){}
00042 
00043   public:
00044     /**
00045      * Make new History list group with groupname gp,
00046      * capable of tracking unlimited (up to available memory) items
00047      */
00048     FXHistoryList(FXApp *a,const FXString& gp="History List",FXObject* tgt=NULL,FXSelector sel=0,FXint size=-1);
00049 
00050     /**
00051      * Add an item; all items newer than the current item pointed to (ie the index())
00052      * those are removed, and the items is added to the top of the list
00053      */
00054     virtual FXint add(const FXString& name,void* data=NULL);
00055   };
00056 
00057 } // namespace FXEX
00058 #endif // FXHISTORYLIST_H