aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/ring.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/ring.h')
-rw-r--r--src/ring.h22
1 files changed, 15 insertions, 7 deletions
diff --git a/src/ring.h b/src/ring.h
index 1fc135f..d259500 100644
--- a/src/ring.h
+++ b/src/ring.h
@@ -38,6 +38,8 @@ namespace SciTECO {
*/
class Buffer : private IOView {
+ TAILQ_ENTRY(Buffer) buffers;
+
class UndoTokenClose : public UndoToken {
Buffer *buffer;
@@ -48,9 +50,13 @@ class Buffer : private IOView {
void run(void);
};
-public:
- TAILQ_ENTRY(Buffer) buffers;
+ inline void
+ undo_close(void)
+ {
+ undo.push(new UndoTokenClose(this));
+ }
+public:
gchar *filename;
bool dirty;
@@ -115,11 +121,11 @@ public:
}
void save(const gchar *filename = NULL);
- inline void
- undo_close(void)
- {
- undo.push(new UndoTokenClose(this));
- }
+ /*
+ * Ring manages the buffer list and has privileged
+ * access.
+ */
+ friend class Ring;
};
/* object declared in main.cpp */
@@ -195,6 +201,8 @@ public:
{
current->undo_close();
}
+
+ void set_scintilla_undo(bool state);
} ring;
/*