mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
Added the ability to select both delimiters at one click (based in part
on a patch sent by Pablo di Napoli, though I didn't chenged the GUI code, for the moment). Several fixes on misused symbols, reported by Martin Norb{ck. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@328 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
d9c0aa8195
commit
6f5a5fac30
@ -54,6 +54,18 @@ int delim_code[] = {
|
||||
LM_langle, LM_rangle, '|', LM_Vert, '.', 0
|
||||
};
|
||||
|
||||
// indexes to get the left and right versions of each delimiter
|
||||
// Contributed by Pablo De Napoli (pdenapo@dm.uba.ar)
|
||||
int delim_lversion[] = { 0,0,2,2,4,5,
|
||||
6,6,8,8,10,11,
|
||||
12,12,14,15,16,17,
|
||||
18,18,20,21,22,23 };
|
||||
|
||||
int delim_rversion[] = { 1,1,3,3,4,5,
|
||||
7,7,9,9,10,11,
|
||||
13,13,14,15,16,17,
|
||||
19,19,20,21,22,23 };
|
||||
|
||||
|
||||
static char const * deco_code[] = {
|
||||
"widehat", "widetilde", "overbrace", "overleftarrow", "overrightarrow",
|
||||
@ -146,16 +158,18 @@ void delim_cb(FL_OBJECT *, long data)
|
||||
case 2:
|
||||
{
|
||||
int i = fl_get_bmtable(fd_delim->menu);
|
||||
int button = fl_get_bmtable_numb(fd_delim->menu);
|
||||
bool both = (button==FL_MIDDLE_MOUSE);
|
||||
|
||||
if (i>= 0) {
|
||||
#if FL_REVISION > 85
|
||||
if (side || (fl_get_bmtable_numb(fd_delim->menu)!= FL_LEFT_MOUSE))
|
||||
#else
|
||||
if (side || (fl_get_bmtable_numb(fd_delim->menu)!= 1))
|
||||
|
||||
#endif
|
||||
right = i;
|
||||
else
|
||||
left = i;
|
||||
|
||||
if (side || (button== FL_RIGHT_MOUSE)) {
|
||||
right = i;
|
||||
} else {
|
||||
left = i;
|
||||
if (both)
|
||||
right = delim_rversion[i];
|
||||
}
|
||||
}
|
||||
p1 = fl_get_pixmap_pixmap(fd_delim->pix, &p1, &p2);
|
||||
fl_draw_bmtable_item(fd_delim->menu, left, p1, 0, 0);
|
||||
|
@ -11,7 +11,8 @@
|
||||
#define LM_Xi 0x58
|
||||
#define LM_Pi 0x50
|
||||
#define LM_Sigma 0x53
|
||||
#define LM_Upsilon 0x55
|
||||
//#define LM_Upsilon 0x55
|
||||
#define LM_Upsilon 0xa1
|
||||
#define LM_Phi 0x46
|
||||
#define LM_Psi 0x59
|
||||
#define LM_Omega 0x57
|
||||
@ -106,6 +107,9 @@
|
||||
#define LM_rfloor 0xfb
|
||||
#define LM_mid 0x7c
|
||||
|
||||
#define LM_angle 0xd0
|
||||
#define LM_vee 0xda
|
||||
|
||||
//#define LM_backslash '\\'
|
||||
|
||||
// Symbols that don't exist in X11 symbol font
|
||||
@ -124,11 +128,11 @@ enum Math_Symbols_enum {
|
||||
LM_vdash, LM_dashv, LM_bowtie,
|
||||
LM_mp, LM_bigtriangleup, LM_ominus, LM_uplus, LM_bigtriangledown,
|
||||
LM_sqcap, LM_triangleright, LM_sqcup, LM_triangleleft, LM_odot, LM_star,
|
||||
LM_vee, LM_amalg, LM_bigcirc, LM_setminus, LM_dagger, LM_circ, LM_wr,
|
||||
LM_amalg, LM_bigcirc, LM_setminus, LM_dagger, LM_circ, LM_wr,
|
||||
LM_ddagger,
|
||||
LM_oint, LM_coprod, LM_bigsqcup, LM_bigotimes, LM_bigodot, LM_bigoplus,
|
||||
LM_bigcap, LM_bigcup, LM_biguplus, LM_bigvee, LM_bigwedge,
|
||||
LM_ell, LM_imath, LM_jmath, LM_hbar, LM_angle, LM_top, LM_Vert, LM_flat,
|
||||
LM_ell, LM_imath, LM_jmath, LM_hbar, LM_top, LM_Vert, LM_flat,
|
||||
LM_natural, LM_triangle,
|
||||
LM_widehat, LM_widetilde, LM_underline, LM_overline, LM_underbrace,
|
||||
LM_overbrace, LM_overleftarrow, LM_overightarrow,
|
||||
|
Loading…
Reference in New Issue
Block a user