]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/xforms/XMiniBuffer.C
Introduce LFUN_PRINT.
[lyx.git] / src / frontends / xforms / XMiniBuffer.C
index 5a8b85bb93a84dc748412aa540f69993f51b5724..aa0216888b6320c113be41e26245ed3fc2dfba41 100644 (file)
@@ -1,38 +1,32 @@
-// -*- C++ -*-
 /**
  * \file XMiniBuffer.C
  * This file is part of LyX, the document processor.
  * Licence details can be found in the file COPYING.
  *
  * \author Lars
- * \author Asger and Juergen
+ * \author Asger and JΓΌrgen
  *
- * Full author contact details are available in file CREDITS
+ * Full author contact details are available in file CREDITS.
  */
 
 #include <config.h>
 
 #include "XMiniBuffer.h"
-#include "ControlCommandBuffer.h"
+
 #include "freebrowser.h"
 #include "xforms_helpers.h"
 
-#include "gettext.h"
+#include "controllers/ControlCommandBuffer.h"
 
 #include "frontends/Timeout.h"
 
-#include "support/lstrings.h"
+#include "gettext.h"
 
 #include <boost/bind.hpp>
 
-#include <vector>
-
-#ifndef CXX_GLOBAL_CSTD
-using std::isprint;
-#endif
 
-using std::endl;
 using std::vector;
+using std::string;
 
 
 namespace {
@@ -43,8 +37,6 @@ FL_OBJECT * create_input_box(void * parent, int type,
 
 FL_FREEBROWSER * create_freebrowser(void * parent);
 
-FL_OBJECT * get_freebrowser_browser(boost::shared_ptr<FL_FREEBROWSER> &);
-
 } // namespace anon
 
 
@@ -55,7 +47,7 @@ XMiniBuffer::XMiniBuffer(ControlCommandBuffer & control,
 {
        input_ = create_input_box(this, FL_NORMAL_INPUT, x, y, h, w);
        freebrowser_.reset(create_freebrowser(this), fl_free_freebrowser);
-       
+
        info_timer_.reset(new Timeout(1500));
        idle_timer_.reset(new Timeout(6000));
        info_con = info_timer_->timeout.connect(boost::bind(&XMiniBuffer::info_timeout, this));
@@ -89,7 +81,7 @@ void XMiniBuffer::freebrowserCB(int action)
        } else {
                // Fill the input widget with the selected
                // browser entry.
-               FL_OBJECT * browser = get_freebrowser_browser(freebrowser_);
+               FL_OBJECT * browser = freebrowser_->browser;
                string const str = getString(browser);
 
                if (!str.empty()) {
@@ -172,8 +164,7 @@ int XMiniBuffer::peek_event(FL_OBJECT * ob, int event,
 
                        // Fill freebrowser_'s browser with the list of
                        // available completions
-                       FL_OBJECT * browser =
-                               get_freebrowser_browser(freebrowser_);
+                       FL_OBJECT * browser = freebrowser_->browser;
                        fl_clear_browser(browser);
                        vector<string>::const_iterator cit = comp.begin();
                        vector<string>::const_iterator end = comp.end();
@@ -351,10 +342,4 @@ FL_FREEBROWSER * create_freebrowser(void * parent)
        return fb;
 }
 
-FL_OBJECT * get_freebrowser_browser(boost::shared_ptr<FL_FREEBROWSER> & fb)
-{
-       FL_FREEBROWSER * ptr = fb.get();
-       return ptr ? fl_get_freebrowser_browser(ptr) : 0;
-}
-
 } // namespace anon