00001 /* 00002 * AiksaurusGTK - A GTK interface to the AikSaurus library 00003 * Copyright (C) 2001 by Jared Davis 00004 * 00005 * This program is free software; you can redistribute it and/or 00006 * modify it under the terms of the GNU General Public License 00007 * as published by the Free Software Foundation; either version 2 00008 * of the License, or (at your option) any later version. 00009 * 00010 * This program is distributed in the hope that it will be useful, 00011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00013 * GNU General Public License for more details. 00014 * 00015 * You should have received a copy of the GNU General Public License 00016 * along with this program; if not, write to the Free Software 00017 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 00018 * 02111-1307, USA. 00019 */ 00020 00021 #ifndef INCLUDED_GPL_JARED_AIKSAURUSGTK_HISTORY_H 00022 #define INCLUDED_GPL_JARED_AIKSAURUSGTK_HISTORY_H 00023 00024 #include "AiksaurusGTK_strlist.h" 00025 00026 class AiksaurusGTK_history 00027 { 00028 private: 00029 00030 AiksaurusGTK_strlist d_back; 00031 AiksaurusGTK_strlist d_forward; 00032 00033 AiksaurusGTK_history(const AiksaurusGTK_history& rhs); 00034 const AiksaurusGTK_history& operator=(const AiksaurusGTK_history& rhs); 00035 00036 char* d_current_ptr; 00037 00038 int d_maxentries; 00039 00040 mutable char* d_forward_tip_ptr; 00041 mutable char* d_back_tip_ptr; 00042 00043 public: 00044 00045 AiksaurusGTK_history(); 00046 ~AiksaurusGTK_history(); 00047 00048 void search(const char* str); 00049 00050 void move_back(); 00051 void move_forward(); 00052 00053 void move_back_to(GList* element); 00054 void move_forward_to(GList* element); 00055 00056 const char* tip_back() const; 00057 const char* tip_forward() const; 00058 00059 const char* current() const; 00060 00061 unsigned int size_back() const; 00062 unsigned int size_forward() const; 00063 00064 const AiksaurusGTK_strlist& list_back() const; 00065 const AiksaurusGTK_strlist& list_forward() const; 00066 00067 #ifndef NDEBUG 00068 void debug(); 00069 #endif 00070 }; 00071 00072 #endif // INCLUDED_GPL_JARED_AIKSAURUS_HISTORY_H