![]() |
Main Page
Class Hierarchy
Alphabetical List
Compound List
File List
Compound Members
![]() |
00001 /******************************************************************************** 00002 * * 00003 * Recent Items 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 FXRECENTITEMS_H 00023 #define FXRECENTITEMS_H 00024 00025 #ifndef FXHISTORYITEMS_H 00026 #include "FXHistoryItems.h" 00027 #endif 00028 namespace FXEX { 00029 00030 /** 00031 * The Recent items manages a most recently used items list (an MRU list) 00032 */ 00033 class FXAPI FXRecentItems : public FXHistoryItems { 00034 FXDECLARE(FXRecentItems) 00035 00036 private: 00037 FXRecentItems(const FXRecentItems&); 00038 FXRecentItems &operator=(const FXRecentItems&); 00039 00040 protected: 00041 FXRecentItems(){} 00042 00043 public: 00044 long onCmdItem(FXObject*,FXSelector sel,void*); 00045 00046 public: 00047 /// Make new Recent Items Group with groupname gp, 00048 /// capable of tracking ten items 00049 FXRecentItems(FXApp *a,const FXString& gp="Recent Items",FXObject* tgt=NULL,FXSelector sel=0,FXint size=10); 00050 00051 /// Add an item; its added to the top of the list. If it already exists, it is removed. 00052 virtual FXint add(const FXString& name, void *data=NULL); 00053 00054 ///dtor 00055 virtual ~FXRecentItems(){} 00056 }; 00057 00058 } // namespace FXEX 00059 #endif // FXRECENTITEMS_H