diff options
| author | Greg Ercolano <erco@seriss.com> | 2014-05-23 23:32:27 +0000 |
|---|---|---|
| committer | Greg Ercolano <erco@seriss.com> | 2014-05-23 23:32:27 +0000 |
| commit | b04ec356b3eb8e36307315418b0a4be722f4a005 (patch) | |
| tree | bee6221ce31731bd59a03ac1b1382a5cada36027 /test | |
| parent | ecb31ba5e85e96e44b232751013813f571326766 (diff) | |
Added as per RFC on fltk.coredev 05/23/2014.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10164 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'test')
| -rw-r--r-- | test/editor.cxx | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/editor.cxx b/test/editor.cxx index 54245ab42..0bbe6bc6d 100644 --- a/test/editor.cxx +++ b/test/editor.cxx @@ -528,6 +528,17 @@ void linenumbers_cb(Fl_Widget *w, void* v) { e->redraw(); } +void wordwrap_cb(Fl_Widget *w, void* v) { + EditorWindow* e = (EditorWindow*)v; + Fl_Menu_Bar* m = (Fl_Menu_Bar*)w; + const Fl_Menu_Item* i = m->mvalue(); + if ( i->value() ) + e->editor->wrap_mode(Fl_Text_Display::WRAP_AT_BOUNDS, 0); + else + e->editor->wrap_mode(Fl_Text_Display::WRAP_NONE, 0); + e->redraw(); +} + void find_cb(Fl_Widget* w, void* v) { EditorWindow* e = (EditorWindow*)v; const char *val; @@ -766,6 +777,7 @@ Fl_Menu_Item menuitems[] = { { "&Delete", 0, (Fl_Callback *)delete_cb }, { "Preferences", 0, 0, 0, FL_SUBMENU }, { "Line Numbers", FL_COMMAND + 'l', (Fl_Callback *)linenumbers_cb, 0, FL_MENU_TOGGLE }, + { "Word Wrap", 0, (Fl_Callback *)wordwrap_cb, 0, FL_MENU_TOGGLE }, { 0 }, { 0 }, |
