summaryrefslogtreecommitdiff
path: root/fluid/function_panel.fl
diff options
context:
space:
mode:
authorMichael R Sweet <michael.r.sweet@gmail.com>2005-03-20 04:00:48 +0000
committerMichael R Sweet <michael.r.sweet@gmail.com>2005-03-20 04:00:48 +0000
commita2f4b27b271098c9414721ae9e0b38654a5e900c (patch)
treecfafa53db99127fde016d5379078306365e6358d /fluid/function_panel.fl
parent665a2c1b7d2a4b8c5e9a78ebbebf72817b72822e (diff)
Undo/redo support for FLUID.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4142 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'fluid/function_panel.fl')
-rw-r--r--fluid/function_panel.fl11
1 files changed, 9 insertions, 2 deletions
diff --git a/fluid/function_panel.fl b/fluid/function_panel.fl
index e70956b2a..84bcd557f 100644
--- a/fluid/function_panel.fl
+++ b/fluid/function_panel.fl
@@ -35,6 +35,8 @@ decl {\#include <FL/Fl_Pixmap.H>} {}
decl {\#include "Fl_Type.h"} {}
+decl {\#include "undo.h"} {}
+
decl {extern class Fl_Pixmap *pixmap[];} {}
decl {extern class Fl_Type *Fl_Type_make(const char*);} {}
@@ -265,8 +267,13 @@ Function {make_comment_panel()} {open
Function {type_make_cb(Fl_Widget*w,void*d)} {open return_type void
} {
- code {Fl_Type *t = Fl_Type_make((char*)d);
-if (t) {select_only(t); set_modflag(1); t->open();}} {}
+ code {undo_checkpoint();
+ Fl_Type *t = Fl_Type_make((char*)d);
+ if (t) {
+ select_only(t);
+ set_modflag(1);
+ t->open();
+ }} {}
}
Function {make_widgetbin()} {open