]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/xforms/FormText.C
Change glob() API to accept a dir parameter.
[lyx.git] / src / frontends / xforms / FormText.C
index 868b9e7611560d2cc3d55b96cacd3aa8d1ca741a..95af628a270c620982cf962827e431398c67954b 100644 (file)
@@ -5,20 +5,31 @@
  *
  * \author Angus Leeming
  *
- * Full author contact details are available in file CREDITS
+ * Full author contact details are available in file CREDITS.
  */
 
 #include <config.h>
 
-#include "xformsBC.h"
-#include "ControlCommand.h"
 #include "FormText.h"
+#include "ControlCommand.h"
 #include "forms/form_text.h"
+
+#include "xformsBC.h"
 #include "forms_gettext.h"
 
+#include "controllers/ButtonController.h"
+
 #include "support/lstrings.h"
 
-#include FORMS_H_LOCATION
+#include "lyx_forms.h"
+
+using std::string;
+
+namespace lyx {
+
+using support::trim;
+
+namespace frontend {
 
 typedef FormController<ControlCommand, FormView<FD_text> > base_class;
 
@@ -38,12 +49,12 @@ void FormText::build()
        fl_set_button_shortcut(dialog_->input_text, scex(label_).c_str(), 1);
 
        // Manage the ok, apply, restore and cancel/close buttons
-       bc().setOK(dialog_->button_ok);
-       bc().setApply(dialog_->button_apply);
-       bc().setCancel(dialog_->button_close);
-       bc().setRestore(dialog_->button_restore);
+       bcview().setOK(dialog_->button_ok);
+       bcview().setApply(dialog_->button_apply);
+       bcview().setCancel(dialog_->button_close);
+       bcview().setRestore(dialog_->button_restore);
 
-       bc().addReadOnly(dialog_->input_text);
+       bcview().addReadOnly(dialog_->input_text);
 }
 
 
@@ -60,3 +71,6 @@ void FormText::apply()
 {
        controller().params().setContents(fl_get_input(dialog_->input_text));
 }
+
+} // namespace frontend
+} // namespace lyx