]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/xforms/FormSpellchecker.C
Change glob() API to accept a dir parameter.
[lyx.git] / src / frontends / xforms / FormSpellchecker.C
index 5273d8d6f4b957073c0001e2c53135b1a554f152..4f51c8d6640a88b1d6334e6e518bb527f4acb07c 100644 (file)
 
 #include <config.h>
 
-#include "xformsBC.h"
 #include "FormSpellchecker.h"
-#include "ControlSpellchecker.h"
 #include "forms/form_spellchecker.h"
 
-#include "forms_gettext.h"
+#include "controllers/ControlSpellchecker.h"
+
 #include "Tooltips.h"
 #include "xforms_helpers.h"
+#include "xformsBC.h"
+
 #include "support/tostr.h"
 
 #include "lyx_forms.h"
 
-using std::endl;
+using std::string;
+
+namespace lyx {
+namespace frontend {
 
-typedef FormCB<ControlSpellchecker, FormDB<FD_spellchecker> > base_class;
+typedef FormController<ControlSpellchecker, FormView<FD_spellchecker> > base_class;
 
-FormSpellchecker::FormSpellchecker()
-       : base_class(_("Spell-check Document"))
+FormSpellchecker::FormSpellchecker(Dialog & parent)
+       : base_class(parent, _("Spell-check document"))
 {}
 
 
@@ -48,7 +52,7 @@ void FormSpellchecker::build()
 
        // callback for double click in browser
        fl_set_browser_dblclick_callback(dialog_->browser_suggestions,
-                                        C_FormBaseInputCB, 2);
+                                        C_FormDialogView_InputCB, 2);
 
        // do not allow setting of slider by the mouse
        fl_deactivate_object(dialog_->slider_progress);
@@ -74,6 +78,12 @@ void FormSpellchecker::build()
 }
 
 
+void FormSpellchecker::update()
+{
+       controller().check();
+}
+
+
 void FormSpellchecker::partialUpdate(int s)
 {
        ControlSpellchecker::State const state =
@@ -150,3 +160,6 @@ ButtonPolicy::SMInput FormSpellchecker::input(FL_OBJECT * ob, long ob_value)
 
        return ButtonPolicy::SMI_VALID;
 }
+
+} // namespace frontend
+} // namespace lyx