Debian Codegraph @

plugins/aiksaurus/aiksaurusgtk3/AiksaurusGTK_history.h

raw
1 /*
2 * AiksaurusGTK - A GTK interface to the AikSaurus library
3 * Copyright (C) 2001 by Jared Davis
4 *
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License
7 * as published by the Free Software Foundation; either version 2
8 * of the License, or (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
18 * 02111-1307, USA.
19 */
20
21 #ifndef INCLUDED_GPL_JARED_AIKSAURUSGTK_HISTORY_H
22 #define INCLUDED_GPL_JARED_AIKSAURUSGTK_HISTORY_H
23
24 #include "AiksaurusGTK_strlist.h"
25
26 class AiksaurusGTK_history
27 {
28 private:
29
30 AiksaurusGTK_strlist d_back;
31 AiksaurusGTK_strlist d_forward;
32
33 AiksaurusGTK_history(const AiksaurusGTK_history& rhs);
34 const AiksaurusGTK_history& operator=(const AiksaurusGTK_history& rhs);
35
36 char* d_current_ptr;
37
38 int d_maxentries;
39
40 mutable char* d_forward_tip_ptr;
41 mutable char* d_back_tip_ptr;
42
43 public:
44
45 AiksaurusGTK_history();
46 ~AiksaurusGTK_history();
47
48 void search(const char* str);
49
50 void move_back();
51 void move_forward();
52
53 void move_back_to(GList* element);
54 void move_forward_to(GList* element);
55
56 const char* tip_back() const;
57 const char* tip_forward() const;
58
59 const char* current() const;
60
61 unsigned int size_back() const;
62 unsigned int size_forward() const;
63
64 const AiksaurusGTK_strlist& list_back() const;
65 const AiksaurusGTK_strlist& list_forward() const;
66
67 #ifndef NDEBUG
68 void debug();
69 #endif
70 };
71
72 #endif // INCLUDED_GPL_JARED_AIKSAURUS_HISTORY_H