mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-09-21 23:51:25 +00:00
d0a3af12d9
I'm committing all the little, but uncontroversial, changes that have built up in my tree. This will result in an almost total recompilation for you all but will mean that things are less painfull when the other changes go in! * Rename files syscall.[Ch] as systemcall.[Ch]. * Rename class Systemcalls as class Systemcall as one instance of the class represents a single child process. Remove the default constructor too. * Add a running() method to class Timeout. Results in recompilation of almost the entire tree because pretty well everything depends on LyXView.h which #includes "frontends/Timeout.h", so... * Make the Timeout instances in classes LyXView and minibuffer pointers, allowing us to forward declare class Timeout. * Add LFUN_FORKS_SHOW and LFUN_FORKS_KILL to commandtags.h in anticipation of something wonderful! * Add a signal showForks to Dialogs.h, again anticipating some real code. * wrap the structs firster, seconder in frontends/controllers/helper_funcs.h in a namespace to prevent a clash with similarly named structs in support/lyxalgo.h As you see, lots of irritating bits and pieces which don't make much sense in themselves but do in light of the other changes I've got here. I'll post the big changes to the list for proper perusal. Angus git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3566 a592a061-630c-0410-9148-cb99ea01b6c8
115 lines
2.0 KiB
C++
115 lines
2.0 KiB
C++
// -*- C++ -*-
|
|
#ifndef MINIBUFFER_H
|
|
#define MINIBUFFER_H
|
|
|
|
#include <sigc++/signal_system.h>
|
|
#include <vector>
|
|
|
|
#include FORMS_H_LOCATION
|
|
#include "LString.h"
|
|
|
|
#ifdef __GNUG__
|
|
#pragma interface
|
|
#endif
|
|
|
|
class LyXView;
|
|
class DropDown;
|
|
class Timeout;
|
|
|
|
///
|
|
class MiniBuffer : public SigC::Object {
|
|
public:
|
|
enum State {
|
|
spaces,
|
|
nospaces
|
|
};
|
|
|
|
///
|
|
MiniBuffer(LyXView * o,
|
|
FL_Coord x, FL_Coord y, FL_Coord h, FL_Coord w);
|
|
|
|
/// destructor
|
|
~MiniBuffer();
|
|
|
|
/// create drop down
|
|
void dd_init();
|
|
|
|
///
|
|
void addSet(string const &,
|
|
string const & = string());
|
|
|
|
///
|
|
void message(string const & str);
|
|
///
|
|
void messagePush(string const & str);
|
|
///
|
|
void messagePop();
|
|
|
|
/** Makes the minibuffer wait for a string to be inserted.
|
|
Waits for a string to be inserted into the minibuffer, when
|
|
the string has been inserted the signal stringReady is
|
|
emitted.
|
|
*/
|
|
void getString(State space,
|
|
std::vector<string> const & completion,
|
|
std::vector<string> & history);
|
|
///
|
|
void redraw();
|
|
///
|
|
int peek_event(FL_OBJECT *, int, int);
|
|
///
|
|
SigC::Signal1<void, string const &> stringReady;
|
|
///
|
|
//SigC::Signal0<void> escape;
|
|
///
|
|
SigC::Signal0<void> timeout;
|
|
private:
|
|
///
|
|
void activate();
|
|
///
|
|
void deactivate();
|
|
///
|
|
void prepare();
|
|
///
|
|
void stored_slot();
|
|
///
|
|
void stored_set(string const &);
|
|
/// set the minibuffer content if str non-empty
|
|
void set_complete_input(string const &);
|
|
/// append c to the current contents
|
|
void append_char(char c);
|
|
/// set the minibuffer content
|
|
void set_input(string const &);
|
|
///
|
|
void init();
|
|
///
|
|
string stored_input;
|
|
///
|
|
bool stored_;
|
|
///
|
|
LyXView * owner_;
|
|
///
|
|
string text;
|
|
///
|
|
string text_stored;
|
|
///
|
|
FL_OBJECT * add(int, FL_Coord, FL_Coord, FL_Coord, FL_Coord);
|
|
///
|
|
Timeout * timer;
|
|
///
|
|
Timeout * stored_timer;
|
|
/// the dropdown menu
|
|
DropDown * dropdown_;
|
|
///
|
|
FL_OBJECT * the_buffer;
|
|
///
|
|
std::vector<string> completion_;
|
|
///
|
|
std::vector<string> * history_;
|
|
///
|
|
std::vector<string>::iterator hist_iter;
|
|
///
|
|
State state_;
|
|
};
|
|
#endif
|