2002-08-07 23:43:38 +00:00
|
|
|
|
/**
|
|
|
|
|
* \file funcrequest.h
|
|
|
|
|
* Copyright 2002 the LyX Team
|
|
|
|
|
* Read the file COPYING
|
|
|
|
|
*
|
|
|
|
|
* \author Andr<EFBFBD> P<EFBFBD>nitz
|
|
|
|
|
*/
|
|
|
|
|
|
2002-08-07 08:11:41 +00:00
|
|
|
|
#ifndef FUNCREQUEST_H
|
|
|
|
|
#define FUNCREQUEST_H
|
|
|
|
|
|
|
|
|
|
#include "commandtags.h"
|
|
|
|
|
#include "LString.h"
|
|
|
|
|
|
2002-08-07 23:43:38 +00:00
|
|
|
|
/**
|
|
|
|
|
* This class encapsulates a LyX action and its argument
|
|
|
|
|
* in order to pass it around easily.
|
2002-08-07 08:11:41 +00:00
|
|
|
|
*/
|
|
|
|
|
struct FuncRequest {
|
2002-08-07 23:43:38 +00:00
|
|
|
|
|
2002-08-07 08:11:41 +00:00
|
|
|
|
FuncRequest()
|
|
|
|
|
: action(LFUN_UNKNOWN_ACTION)
|
|
|
|
|
{}
|
2002-08-07 23:43:38 +00:00
|
|
|
|
|
2002-08-07 08:11:41 +00:00
|
|
|
|
FuncRequest(kb_action act)
|
|
|
|
|
: action(act)
|
|
|
|
|
{}
|
2002-08-07 23:43:38 +00:00
|
|
|
|
|
2002-08-07 08:11:41 +00:00
|
|
|
|
FuncRequest(kb_action act, string const & arg)
|
|
|
|
|
: action(act), argument(arg)
|
|
|
|
|
{}
|
|
|
|
|
|
2002-08-12 09:53:04 +00:00
|
|
|
|
/// for mouse events
|
|
|
|
|
FuncRequest(kb_action act, int ax, int ay, int aextra)
|
|
|
|
|
: action(act), argument(), x(ax), y(ay), extra(aextra)
|
|
|
|
|
{}
|
|
|
|
|
|
2002-08-07 23:43:38 +00:00
|
|
|
|
/// the action
|
2002-08-07 08:11:41 +00:00
|
|
|
|
kb_action action;
|
2002-08-07 23:43:38 +00:00
|
|
|
|
/// the action's string argument
|
2002-08-07 08:11:41 +00:00
|
|
|
|
string argument;
|
2002-08-12 09:53:04 +00:00
|
|
|
|
/// the x coordinate of a mouse press
|
|
|
|
|
int x;
|
|
|
|
|
/// the y coordinate of a mouse press
|
|
|
|
|
int y;
|
|
|
|
|
/// some extra information (like button number)
|
|
|
|
|
int extra;
|
2002-08-07 08:11:41 +00:00
|
|
|
|
};
|
|
|
|
|
|
2002-08-07 23:43:38 +00:00
|
|
|
|
#endif // FUNCREQUEST_H
|