]> git.lyx.org Git - lyx.git/blobdiff - src/minibuffer.h
More fixes to insettabular/text (and some missing features added).
[lyx.git] / src / minibuffer.h
index c8495b8f3a661feea793ed9dac38942f03cceb3f..9bdf1c4600ed9ba324402b395323375de47046a8 100644 (file)
@@ -5,6 +5,7 @@
 #include FORMS_H_LOCATION
 #include "LString.h"
 #include "gettext.h"
+#include "Timeout.h"
 
 #ifdef __GNUG__
 #pragma interface
 
 class LyXView;
 
+#ifdef SIGC_CXX_NAMESPACES
+using SigC::Object;
+#endif
+
 ///
-class MiniBuffer {
+class MiniBuffer : public Object{
 public:
        ///
        MiniBuffer(LyXView * o,
@@ -21,15 +26,17 @@ public:
 
        ///
        bool shows_no_match;
+
        ///
-       void setTimer(int a) {
-               fl_set_timer(timer, a);
+       void setTimer(unsigned int a) {
+               timer.setTimeout(a * 1000);
        }
+
        ///
        void Set(string const & = string(),
                 string const & = string(),
                 string const & = string(),
-                int delay_secs= 6);
+                unsigned int delay_secs = 6);
        /// 
        string const GetText() const { return text; }
        ///
@@ -47,9 +54,7 @@ public:
        ///
        void Deactivate();
        ///
-       static void ExecutingCB(FL_OBJECT *ob, long);
-       ///
-       static void TimerCB(FL_OBJECT *ob, long);
+       static void ExecutingCB(FL_OBJECT * ob, long);
        ///
         static int  peek_event(FL_OBJECT *, int, FL_Coord, FL_Coord,
                               int, void *);
@@ -62,8 +67,8 @@ private:
        string text_stored;
        ///
        FL_OBJECT * add(int, FL_Coord, FL_Coord, FL_Coord, FL_Coord);
-        ///
-       FL_OBJECT * timer;
+       ///
+       Timeout timer;
        ///
        FL_OBJECT * the_buffer;
        ///
@@ -87,6 +92,8 @@ private:
                history_idx = history_cnt;
        }
         ///
-        string const getHistory() const { return history[history_idx % MAX_HISTORY]; }
+        string const getHistory() const {
+               return history[history_idx % MAX_HISTORY];
+       }
 };
 #endif