]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/xforms/FormBrowser.C
Yet more dialog tweaking from Rob.
[lyx.git] / src / frontends / xforms / FormBrowser.C
index 96b35f9b13dea629959a500a7d6a603f421f1cb2..9439e0c2ea81b265e9a46b558ec22d398f69d884 100644 (file)
@@ -1,65 +1,32 @@
-/* FormBrowser.C
- * (C) 2001 LyX Team
- * John Levon, moz@compsoc.man.ac.uk
+/**
+ * \file FormBrowser.C
+ * This file is part of LyX, the document processor.
+ * Licence details can be found in the file COPYING.
+ *
+ * \author John Levon
+ *
+ * Full author contact details are available in file CREDITS
  */
 
 #include <config.h>
 
-#include FORMS_H_LOCATION
-
 #ifdef __GNUG__
 #pragma implementation
 #endif
 
-#include "gettext.h"
 #include "FormBrowser.h"
-#include "form_browser.h"
-#include "LyXView.h"
-#include "Dialogs.h"
-#include "lyxrc.h"
-#include "buffer.h"
+#include "forms/form_browser.h"
+#include "xformsBC.h"
 
-#ifdef SIGC_CXX_NAMESPACES
-using SigC::slot;
-#endif
+FormBrowser::FormBrowser(string const & t, bool allowResize)
+       : FormDB<FD_browser>(t, allowResize)
+{}
 
-FormBrowser::FormBrowser(LyXView * lv, Dialogs * d, const string & name)
-       : FormBaseBD(lv, d, name, new OkViewPolicy),
-         dialog_(0)
-{
-}
-
-FormBrowser::~FormBrowser()
-{
-       delete dialog_;
-}
 
 void FormBrowser::build()
 {
-       dialog_ = build_browser();
-
-       // Workaround dumb xforms sizing bug
-       minw_ = form()->w;
-       minh_ = form()->h;
+       dialog_.reset(build_browser(this));
 
        // Manage the close button
-       bc_.setOK(dialog_->button_close);
-       bc_.refresh();
-}
-
-FL_FORM * FormBrowser::form() const
-{
-       if (dialog_)
-               return dialog_->form;
-       return 0;
-}
-
-void FormBrowser::update()
-{
-}
-
-bool FormBrowser::input(FL_OBJECT *, long)
-{
-       update();
-       return true;
+       bc().setCancel(dialog_->button_close);
 }