add three lfuns, comment out old code, add iterator methods

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@1925 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Lars Gullik Bjønnes 2001-04-17 13:54:24 +00:00
parent a014900f15
commit 57b5d0651c
4 changed files with 47 additions and 1 deletions

View File

@ -1,5 +1,17 @@
2001-04-17 Lars Gullik Bjønnes <larsbj@birdstep.com>
* commandtags.h: comment out LFUN_FOOTMELT, LFUN_MARGINMELT,
LFUN_FLOATSOPERATE, LFUN_MELT, add LFUN_MESSAGE,
LFUN_MESSAGE_PUSH, LFUN_MESSAGE_POP
* LyXAction.h: inherit privately from noncopyable, add methods
func_begin, func_end, returning iterators to the func map.
* LyXAction.C (init): comment out LFUN_FLOATSOPERATE, LFUN_MELT,
add entries for LFUN_MESSAGE, LFUN_MESSAGE_PUSH, LFUN_MESSAGE_POP
(func_begin): new method
(func_end): new method
* CutAndPaste.C (cutSelection): split into two versons (NEW_INSETS
and not)
(copySelection): ditto

View File

@ -203,7 +203,9 @@ void LyXAction::init()
{ LFUN_MENUSEARCH, "find-replace", N_("Find & Replace"),
ReadOnly },
{ LFUN_INSET_FLOAT, "float-insert", "", Noop },
#if 0
{ LFUN_FLOATSOPERATE, "floats-operate", "", ReadOnly },
#endif
{ LFUN_BOLD, "font-bold", N_("Toggle bold"), Noop },
{ LFUN_CODE, "font-code", N_("Toggle code style"), Noop },
{ LFUN_DEFAULT, "font-default", N_("Default font style"),
@ -322,7 +324,9 @@ void LyXAction::init()
{ LFUN_MATH_NUMBER, "math-number", "", Noop },
{ LFUN_MATH_PANEL, "math-panel", "", Noop },
{ LFUN_MATH_SIZE, "math-size", "", Noop },
#if 0
{ LFUN_MELT, "melt", N_("Melt"), Noop },
#endif
{ LFUN_MENU_OPEN_BY_NAME, "menu-open", "", NoBuffer },
{ LFUN_MENU_SEPARATOR, "menu-separator-insert", "", Noop },
{ LFUN_META_FAKE, "meta-prefix", "", NoBuffer },
@ -426,6 +430,14 @@ void LyXAction::init()
{ LFUN_WORDRIGHTSEL, "word-forward-select", "", ReadOnly },
{ LFUN_LOWCASE_WORD, "word-lowcase", "", Noop },
{ LFUN_UPCASE_WORD, "word-upcase", "", Noop },
{ LFUN_MESSAGE, "message",
N_("Show message in minibuffer"), NoBuffer },
{ LFUN_MESSAGE_PUSH, "message-push",
N_("Push old message and show this one in minibuffer"),
NoBuffer },
{ LFUN_MESSAGE_POP, "message-pop",
N_("Pop old message and show it in the minibuffer"),
NoBuffer },
{ LFUN_NOACTION, "", "", Noop }
};
@ -676,6 +688,18 @@ bool LyXAction::funcHasFlag(kb_action action,
}
LyXAction::const_func_iterator LyXAction::func_begin() const
{
return lyx_func_map.begin();
}
LyXAction::const_func_iterator LyXAction::func_end() const
{
return lyx_func_map.end();
}
ostream & operator<<(ostream & o, kb_action action)
{
return o << int(action);

View File

@ -14,7 +14,7 @@
/** This class encapsulates LyX action and user command operations.
*/
class LyXAction : public boost::noncopyable {
class LyXAction : boost::noncopyable {
private:
///
struct func_info {
@ -97,6 +97,9 @@ public:
/// True if the command has `flag' set
bool funcHasFlag(kb_action action, func_attrib flag) const;
typedef func_map::const_iterator const_func_iterator;
const_func_iterator func_begin() const;
const_func_iterator func_end() const;
private:
///
void init();

View File

@ -50,9 +50,11 @@ enum kb_action {
LFUN_DEPTH,
LFUN_FREE, // 30
LFUN_TEX,
#if 0
LFUN_FOOTMELT, // schedule for deletion
LFUN_MARGINMELT, // schedule for deletion
LFUN_FLOATSOPERATE, //schedule for deletion?
#endif
LFUN_EMPH,
LFUN_BOLD,
LFUN_ROMAN,
@ -141,7 +143,9 @@ enum kb_action {
LFUN_MATH_MACROARG, // ale970510 // 120
LFUN_MATH_PANEL,
LFUN_FIGURE,
#if 0
LFUN_MELT,
#endif
LFUN_DELETE_WORD_FORWARD,
LFUN_DELETE_WORD_BACKWARD,
LFUN_DELETE_LINE_FORWARD,
@ -275,6 +279,9 @@ enum kb_action {
LFUN_BOOKMARK_SAVE, // Dekel 20010127
LFUN_BOOKMARK_GOTO, // Dekel 20010127
LFUN_SELECT_FILE_SYNC, // Levon 20010214
LFUN_MESSAGE, // Lgb 20010408
LFUN_MESSAGE_PUSH, // Lgb 20010410
LFUN_MESSAGE_POP, // Lgb 20010410
LFUN_LASTACTION /* this marks the end of the table */
};