]> git.lyx.org Git - features.git/commitdiff
Martin's additional accents in the math panel patch.
authorAngus Leeming <leeming@lyx.org>
Mon, 28 Jan 2002 14:24:01 +0000 (14:24 +0000)
committerAngus Leeming <leeming@lyx.org>
Mon, 28 Jan 2002 14:24:01 +0000 (14:24 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3442 a592a061-630c-0410-9148-cb99ea01b6c8

images/ChangeLog
images/deco.xbm
src/frontends/xforms/ChangeLog
src/frontends/xforms/FormMathsDeco.C
src/frontends/xforms/FormMathsDeco.h
src/frontends/xforms/form_maths_deco.C
src/frontends/xforms/form_maths_deco.h
src/frontends/xforms/forms/form_maths_deco.fd

index 2ffcfb24a0dda4521e3b56ef0f132a54bb5d47e5..310755052c6c9664e4a30875100cc410e41bcbba 100644 (file)
@@ -1,3 +1,8 @@
+2002-01-28  Martin Vermeer <martin.vermeer@hut.fi>
+
+       * deco.xbm: added math accents as a separate bitmap to the Decorations
+        sub-panel of mathed. See Lamport Table 3.11.
+
 2002-01-17  Martin Vermeer <martin.vermeer@hut.fi>
 
        * ams_arrows.xbm:
index e975cd335a65a0f892ccaf4e2901ae4be58e8457..c47e55ba832c9aab508b628ea882a17fb9e79d0d 100644 (file)
@@ -1,6 +1,7 @@
-#define deco_width 137
-#define deco_height 90
-static unsigned char const deco_bits[] = {
+
+#define deco1_width 137
+#define deco1_height 90
+static unsigned char const deco1_bits[] = {
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
@@ -46,6 +47,9 @@ static unsigned char const deco_bits[] = {
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -98,9 +102,6 @@ static unsigned char const deco_bits[] = {
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xaa, 0x02, 0x00, 0x00,
   0x00, 0xa0, 0xaa, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -135,7 +136,122 @@ static unsigned char const deco_bits[] = {
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-  };
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
 
 
+#define deco2_width 120
+#define deco2_height 90
+static unsigned char const deco2_bits[] = {
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x80,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd8, 0x00,
+   0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00,
+   0x00, 0x04, 0x01, 0x00, 0x00, 0x20, 0x00, 0x00, 0xc0, 0xff, 0x01, 0x00,
+   0x00, 0x0e, 0x00, 0x00, 0x03, 0x06, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x80, 0x00, 0x08, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x55, 0x05, 0x00, 0x80, 0xaa, 0x02, 0x00, 0x40, 0x55, 0x01, 0x00,
+   0xa0, 0xaa, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x04, 0x00, 0x80, 0x00,
+   0x02, 0x00, 0x40, 0x00, 0x01, 0x00, 0x20, 0x80, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x01, 0x04, 0x00, 0x80, 0x00, 0x02, 0x00, 0x40, 0x00, 0x01, 0x00,
+   0x20, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x04, 0x00, 0x80, 0x00,
+   0x02, 0x00, 0x40, 0x00, 0x01, 0x00, 0x20, 0x80, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x01, 0x04, 0x00, 0x80, 0x00, 0x02, 0x00, 0x40, 0x00, 0x01, 0x00,
+   0x20, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x55, 0x05, 0x00, 0x80, 0xaa,
+   0x02, 0x00, 0x40, 0x55, 0x01, 0x00, 0xa0, 0xaa, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x01, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00,
+   0x00, 0x11, 0x00, 0x00, 0x06, 0x03, 0x00, 0x00, 0x08, 0x00, 0x00, 0xc0,
+   0xff, 0x01, 0x00, 0x80, 0x3b, 0x00, 0x00, 0xd8, 0x00, 0x00, 0x00, 0x10,
+   0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x20, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x55, 0x05, 0x00, 0x80, 0xaa, 0x02, 0x00, 0x40,
+   0x55, 0x01, 0x00, 0xa0, 0xaa, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x04,
+   0x00, 0x80, 0x00, 0x02, 0x00, 0x40, 0x00, 0x01, 0x00, 0x20, 0x80, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x01, 0x04, 0x00, 0x80, 0x00, 0x02, 0x00, 0x40,
+   0x00, 0x01, 0x00, 0x20, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x04,
+   0x00, 0x80, 0x00, 0x02, 0x00, 0x40, 0x00, 0x01, 0x00, 0x20, 0x80, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x01, 0x04, 0x00, 0x80, 0x00, 0x02, 0x00, 0x40,
+   0x00, 0x01, 0x00, 0x20, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x55, 0x05,
+   0x00, 0x80, 0xaa, 0x02, 0x00, 0x40, 0x55, 0x01, 0x00, 0xa0, 0xaa, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x02,
+   0x00, 0x00, 0x06, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x8c, 0x01, 0x00, 0x00, 0x89, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x80, 0x70, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x55, 0x05,
+   0x00, 0x80, 0xaa, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x01, 0x04, 0x00, 0x80, 0x00, 0x02, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x04,
+   0x00, 0x80, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x01, 0x04, 0x00, 0x80, 0x00, 0x02, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x04,
+   0x00, 0x80, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x55, 0x05, 0x00, 0x80, 0xaa, 0x02, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
index f1fd912487680262c00afc25c8c2a474186f3460..84075bbbd04680af3ccffb7b8a91d74ac439dadf 100644 (file)
@@ -1,3 +1,9 @@
+2002-01-28  Martin Vermeer <martin.vermeer@hut.fi>
+
+       * FormMathsDeco[hC]:
+       * forms/form_maths_deco.fd: added math accents as a separate bitmap to
+       the Decorations sub-panel of mathed. See Lamport Table 3.11.
+
 2002-01-25  Angus Leeming  <a.leeming@ic.ac.uk>
 
        * FormTabular.C (update): Remove redundant code.
index 7ba8a730167c5a0c1a184c6e7f1729aa62cc1f9a..533f27986decf9721dea6807df748edd42c0e178 100644 (file)
 
 static char const * decoration_names[] = {
        "widehat", "widetilde", "overbrace", "overleftarrow", "overrightarrow", 
-       "overline", "underbrace", "underline"
+       "overline", "underbrace", "underline",
+       "hat", "acute", "bar", "dot",
+       "check", "grave", "vec", "ddot", 
+       "breve", "tilde"
 };
 
 
@@ -33,7 +36,7 @@ static int const nr_decoration_names = sizeof(decoration_names) / sizeof(char co
  
 FormMathsDeco::FormMathsDeco(LyXView * lv, Dialogs * d,
                             FormMathsPanel const & p)
-       : FormMathsSub(lv, d, p, _("Maths Decorations"), false)
+       : FormMathsSub(lv, d, p, _("Maths Decorations & Accents"), false)
 {}
 
 
@@ -49,21 +52,37 @@ void FormMathsDeco::build()
 {
        dialog_.reset(build_maths_deco());
 
-       fl_set_bmtable_data(dialog_->bmtable, 3, 3,
-                           deco_width, deco_height, deco_bits);
-       fl_set_bmtable_maxitems(dialog_->bmtable, 8);
+       fl_set_bmtable_data(dialog_->bmtable_deco1, 3, 3,
+                           deco1_width, deco1_height, deco1_bits);
+       fl_set_bmtable_maxitems(dialog_->bmtable_deco1, 8);
+
+       fl_set_bmtable_data(dialog_->bmtable_deco2, 4, 3,
+                           deco2_width, deco2_height, deco2_bits);
+       fl_set_bmtable_maxitems(dialog_->bmtable_deco2, 10);
 
        bc().setCancel(dialog_->button_cancel);
-       bc().addReadOnly(dialog_->bmtable);
+       bc().addReadOnly(dialog_->bmtable_deco1);
+       bc().addReadOnly(dialog_->bmtable_deco2);
 }
 
 
 void FormMathsDeco::apply()
 {
-       int const i = fl_get_bmtable(dialog_->bmtable);
+       //int const i = fl_get_bmtable(dialog_->bmtable_deco1);
  
-       if (i >= nr_decoration_names)
+       if (deco_ >= nr_decoration_names)
                return;
  
-       parent_.insertSymbol(decoration_names[i]);
+       parent_.insertSymbol(decoration_names[deco_]);
+}
+
+bool FormMathsDeco::input(FL_OBJECT * ob, long)
+{
+       deco_ = fl_get_bmtable(ob);
+       if (deco_ < 0) return false;
+       //if (ob == dialog_->bmtable_deco1) deco_ += 0; 
+       if (ob == dialog_->bmtable_deco2) deco_ += 8;
+       apply();
+       return true;
 }
+                               
index 4d953d3614b954ae63522fb10863d3577752c744..d8dbcaaa635df6191618cd66cff04346f5caabea 100644 (file)
@@ -35,6 +35,8 @@ private:
        virtual void build();
        /// Apply from dialog (modify or create inset)
        virtual void apply();
+       /// Input selection:
+       virtual bool FormMathsDeco::input(FL_OBJECT *, long);
 
        /// Pointer to the actual instantiation of the xforms form
        virtual FL_FORM * form() const;
@@ -44,6 +46,10 @@ private:
        
        // Real GUI implementation
        boost::scoped_ptr<FD_form_maths_deco> dialog_;
+
+       /// Current choice
+       short deco_;
+
 };
 
 #endif //  FORM_MATHSDECO_H
index f42c57fa2a526db9f7f0bdfd90e5d90d8921b38a..84022115c06c587a3ce8dc2112fb2d7739be553d 100644 (file)
@@ -23,15 +23,18 @@ FD_form_maths_deco * FormMathsDeco::build_maths_deco()
   FL_OBJECT *obj;
   FD_form_maths_deco *fdui = new FD_form_maths_deco;
 
-  fdui->form = fl_bgn_form(FL_NO_BOX, 160, 150);
+  fdui->form = fl_bgn_form(FL_NO_BOX, 160, 257);
   fdui->form->u_vdata = this;
-  obj = fl_add_box(FL_UP_BOX, 0, 0, 160, 150, "");
-  fdui->bmtable = obj = fl_add_bmtable(FL_PUSH_BUTTON, 10, 10, 140, 90, "");
+  obj = fl_add_box(FL_UP_BOX, 0, 0, 160, 257, "");
+  fdui->bmtable_deco1 = obj = fl_add_bmtable(FL_PUSH_BUTTON, 10, 10, 140, 90, "");
     fl_set_object_lcolor(obj, FL_BLUE);
-    fl_set_object_callback(obj, C_FormBaseDeprecatedApplyCB, 0);
-  fdui->button_cancel = obj = fl_add_button(FL_RETURN_BUTTON, 30, 110, 100, 30, _("Close"));
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
+  fdui->button_cancel = obj = fl_add_button(FL_RETURN_BUTTON, 28, 214, 100, 30, _("Close"));
     fl_set_object_lsize(obj, FL_NORMAL_SIZE);
     fl_set_object_callback(obj, C_FormBaseDeprecatedCancelCB, 0);
+  fdui->bmtable_deco2 = obj = fl_add_bmtable(FL_PUSH_BUTTON, 20, 110, 120, 90, "");
+    fl_set_object_lcolor(obj, FL_BLUE);
+    fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
   fl_end_form();
 
   fdui->form->fdui = fdui;
index c316f173b94f3115f05d63d642b608811b4ac1d0..df8b32fa6ca8c2c627c5d294d643de0d9707c9b2 100644 (file)
@@ -5,7 +5,7 @@
 #define FD_form_maths_deco_h_
 
 /** Callbacks, globals and object handlers **/
-extern  "C" void C_FormBaseDeprecatedApplyCB(FL_OBJECT *, long);
+extern  "C" void C_FormBaseDeprecatedInputCB(FL_OBJECT *, long);
 extern  "C" void C_FormBaseDeprecatedCancelCB(FL_OBJECT *, long);
 
 
@@ -14,8 +14,9 @@ struct FD_form_maths_deco {
        ~FD_form_maths_deco();
 
        FL_FORM *form;
-       FL_OBJECT *bmtable;
+       FL_OBJECT *bmtable_deco1;
        FL_OBJECT *button_cancel;
+       FL_OBJECT *bmtable_deco2;
 };
 
 #endif /* FD_form_maths_deco_h_ */
index b11300902e25da8da26f703a37e5297f4facd352..75a549af8e45857c618ef583ab11b725abfa05d9 100644 (file)
@@ -10,13 +10,13 @@ SnapGrid: 2
 =============== FORM ===============
 Name: form_maths_deco
 Width: 160
-Height: 150
-Number of Objects: 3
+Height: 257
+Number of Objects: 4
 
 --------------------
 class: FL_BOX
 type: UP_BOX
-box: 0 0 160 150
+box: 0 0 160 257
 boxtype: FL_UP_BOX
 colors: FL_COL1 FL_COL1
 alignment: FL_ALIGN_CENTER
@@ -45,14 +45,14 @@ label:
 shortcut: 
 resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
-name: bmtable
-callback: C_FormBaseDeprecatedApplyCB
-argument:
+name: bmtable_deco1
+callback: C_FormBaseDeprecatedInputCB
+argument: 0
 
 --------------------
 class: FL_BUTTON
 type: RETURN_BUTTON
-box: 30 110 100 30
+box: 28 214 100 30
 boxtype: FL_UP_BOX
 colors: FL_COL1 FL_COL1
 alignment: FL_ALIGN_CENTER
@@ -65,7 +65,25 @@ resize: FL_RESIZE_ALL
 gravity: FL_NoGravity FL_NoGravity
 name: button_cancel
 callback: C_FormBaseDeprecatedCancelCB
-argument
+argument: 0
+
+--------------------
+class: FL_BUTTON
+type: PUSH_BUTTON
+box: 20 110 120 90
+boxtype: FL_UP_BOX
+colors: FL_COL1 FL_COL1
+alignment: FL_ALIGN_CENTER
+style: FL_NORMAL_STYLE
+size: FL_DEFAULT_SIZE
+lcol: FL_BLUE
+label: 
+shortcut: 
+resize: FL_RESIZE_ALL
+gravity: FL_NoGravity FL_NoGravity
+name: bmtable_deco2
+callback: C_FormBaseDeprecatedInputCB
+argument: 0
 
 ==============================
 create_the_forms