summaryrefslogtreecommitdiff
path: root/docview/src
diff options
context:
space:
mode:
authorGraeme Geldenhuys <graemeg@gmail.com>2009-12-30 01:01:39 +0200
committerGraeme Geldenhuys <graemeg@gmail.com>2009-12-30 01:01:39 +0200
commitae49231e2b1d7f076bbfe0ad034e82c926ed46dd (patch)
tree8c0be9b16b577e4d077bb1e273404b7a77997964 /docview/src
parent556c3ed5bc71972cd54198b1a6811832fee59716 (diff)
downloadfpGUI-ae49231e2b1d7f076bbfe0ad034e82c926ed46dd.tar.xz
History navigation.
* Tracks history of topics viewed. * Allows Back and Forward navigation in history. * Icons for remaining toolbar buttons.
Diffstat (limited to 'docview/src')
-rw-r--r--docview/src/arrows.inc380
-rw-r--r--docview/src/docview.lpi6
-rw-r--r--docview/src/frm_main.pas180
3 files changed, 540 insertions, 26 deletions
diff --git a/docview/src/arrows.inc b/docview/src/arrows.inc
new file mode 100644
index 00000000..bfe510a5
--- /dev/null
+++ b/docview/src/arrows.inc
@@ -0,0 +1,380 @@
+
+Const
+ usr_arrow_up : Array[0..1549] of byte = (
+ 66, 77, 14, 6, 0, 0, 0, 0, 0, 0, 54, 0, 0, 0, 40, 0, 0,
+ 0, 22, 0, 0, 0, 22, 0, 0, 0, 1, 0, 24, 0, 0, 0, 0, 0,
+ 216, 5, 0, 0, 19, 11, 0, 0, 19, 11, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
+ 255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255,
+ 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,
+ 255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
+ 255, 0, 0,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
+ 255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255,
+ 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,
+ 255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
+ 255, 0, 0,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
+ 255,255, 0,255, 4,115, 58, 4,115, 58, 4,115, 58, 4,115, 58, 4,
+ 115, 58, 4,115, 58, 4,115, 58, 4,115, 58, 4,115, 58, 4,115, 58,
+ 255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
+ 255, 0, 0,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
+ 255,255, 0,255, 4,115, 58,169,227,197,133,218,175,131,219,174,131,
+ 222,176,132,223,177,132,224,177,132,223,177,131,221,175, 4,115, 58,
+ 255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
+ 255, 0, 0,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
+ 255,255, 0,255, 4,115, 58,169,228,198, 30,189,108, 16,190,102, 18,
+ 196,106, 19,201,109, 20,203,110, 19,199,108,132,223,177, 4,115, 58,
+ 255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
+ 255, 0, 0,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
+ 255,255, 0,255, 4,115, 58,169,228,198, 41,193,116, 16,191,102, 18,
+ 198,107, 20,204,111, 21,208,113, 19,202,109,132,224,177, 4,115, 58,
+ 255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
+ 255, 0, 0,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
+ 255,255, 0,255, 4,115, 58,166,227,196, 56,195,124, 16,189,101, 17,
+ 195,105, 18,199,107, 19,200,108, 18,198,107,132,223,176, 4,115, 58,
+ 255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
+ 255, 0, 0,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
+ 255,255, 0,255, 4,115, 58,165,225,194, 74,199,135, 20,186,102, 16,
+ 189,101, 16,191,103, 17,192,103, 16,191,102,131,220,175, 4,115, 58,
+ 255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
+ 255, 0, 0,255, 0,255,255, 0,255, 4,117, 59, 4,115, 58, 4,115,
+ 58, 4,115, 58, 5,120, 61,162,222,192, 69,193,130, 42,187,114, 14,
+ 182, 96, 14,184, 97, 14,184, 98, 14,183, 97,130,217,172, 5,121, 62,
+ 4,115, 58, 4,115, 58, 4,115, 58, 4,118, 58,255, 0,255,255, 0,
+ 255, 0, 0,255, 0,255,255, 0,255, 3,114, 57, 40,138, 88,160,215,
+ 187,165,219,191,163,219,190,160,220,189, 65,187,125, 58,188,121, 25,
+ 179,101, 12,176, 92, 12,176, 92, 12,175, 92,129,213,170,128,211,169,
+ 128,209,168,121,203,160, 31,133, 79, 3,114, 59,255, 0,255,255, 0,
+ 255, 0, 0,255, 0,255,255, 0,255,255, 0,255, 4,115, 58, 55,148,
+ 100,152,213,181, 81,184,132, 65,181,121, 59,181,119, 52,180,115, 44,
+ 179,110, 17,170, 92, 10,168, 87, 9,167, 87, 9,166, 86, 23,168, 94,
+ 114,200,156, 41,142, 91, 4,117, 57,255, 0,255,255, 0,255,255, 0,
+ 255, 0, 0,255, 0,255,255, 0,255,255, 0,255,255, 0,255, 3,118,
+ 60, 73,161,116,141,209,173, 64,177,119, 52,173,111, 45,172,107, 39,
+ 171,104, 28,168, 97, 9,161, 83, 7,160, 81, 14,161, 86,106,195,149,
+ 57,154,104, 3,117, 60,255, 0,255,255, 0,255,255, 0,255,255, 0,
+ 255, 0, 0,255, 0,255,255, 0,255,255, 0,255,255, 0,255, 0, 85,
+ 85, 4,118, 58, 89,172,130,125,202,162, 49,172,108, 40,168,102, 33,
+ 165, 97, 26,162, 92, 15,158, 84, 8,155, 79, 95,190,141, 72,167,118,
+ 4,118, 59, 0,102, 51,255, 0,255,255, 0,255,255, 0,255,255, 0,
+ 255, 0, 0,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
+ 255, 0,118, 59, 3,118, 60,101,182,140,105,194,148, 35,166, 99, 28,
+ 163, 94, 22,160, 89, 14,157, 84, 80,184,131, 85,178,130, 3,117, 59,
+ 0,113, 57,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
+ 255, 0, 0,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
+ 255,255, 0,255, 0,114, 62, 9,118, 62,112,191,150, 82,185,133, 24,
+ 161, 90, 17,158, 86, 67,179,121,100,187,142, 8,120, 61, 7,118, 59,
+ 255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
+ 255, 0, 0,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
+ 255,255, 0,255,255, 0,255, 5,113, 59, 16,124, 69,118,195,156, 58,
+ 175,114, 53,173,111,109,193,150, 15,123, 68, 4,116, 56,255, 0,255,
+ 255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
+ 255, 0, 0,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
+ 255,255, 0,255,255, 0,255,255, 0,255, 3,117, 58, 24,129, 75,117,
+ 197,156,114,197,154, 23,131, 75, 5,117, 60,255, 0,255,255, 0,255,
+ 255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
+ 255, 0, 0,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
+ 255,255, 0,255,255, 0,255,255, 0,255,255, 0,255, 4,118, 59, 34,
+ 139, 85, 34,141, 85, 3,117, 60,255, 0,255,255, 0,255,255, 0,255,
+ 255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
+ 255, 0, 0,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
+ 255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255, 3,
+ 118, 60, 4,118, 60, 0, 85, 85,255, 0,255,255, 0,255,255, 0,255,
+ 255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
+ 255, 0, 0,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
+ 255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255,
+ 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,
+ 255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
+ 255, 0, 0,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
+ 255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255,
+ 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,
+ 255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
+ 255, 0, 0,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
+ 255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255,
+ 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,
+ 255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
+ 255, 0, 0);
+
+Const
+ usr_arrow_down : Array[0..1549] of byte = (
+ 66, 77, 14, 6, 0, 0, 0, 0, 0, 0, 54, 0, 0, 0, 40, 0, 0,
+ 0, 22, 0, 0, 0, 22, 0, 0, 0, 1, 0, 24, 0, 0, 0, 0, 0,
+ 216, 5, 0, 0, 19, 11, 0, 0, 19, 11, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
+ 255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255,
+ 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,
+ 255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
+ 255, 0, 0,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
+ 255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255,
+ 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,
+ 255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
+ 255, 0, 0,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
+ 255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255,
+ 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,
+ 255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
+ 255, 0, 0,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
+ 255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255, 3,
+ 109, 54, 5,112, 57,255, 0,255,255, 0,255,255, 0,255,255, 0,255,
+ 255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
+ 255, 0, 0,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
+ 255,255, 0,255,255, 0,255,255, 0,255,255, 0,255, 3,110, 57, 35,
+ 142, 87, 36,149, 90, 3,113, 57,255, 0,255,255, 0,255,255, 0,255,
+ 255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
+ 255, 0, 0,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
+ 255,255, 0,255,255, 0,255,255, 0,255, 3,117, 58, 22,130, 76,119,
+ 216,167,120,221,170, 24,137, 79, 5,117, 60,255, 0,255,255, 0,255,
+ 255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
+ 255, 0, 0,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
+ 255,255, 0,255,255, 0,255, 5,113, 59, 15,123, 68,114,209,161, 57,
+ 206,131, 59,211,134,117,221,169, 15,126, 69, 4,116, 56,255, 0,255,
+ 255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
+ 255, 0, 0,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
+ 255,255, 0,255, 0,114, 62, 9,119, 63,102,198,149, 72,204,137, 17,
+ 195,105, 19,200,108, 74,214,143,105,208,157, 9,122, 63, 7,118, 59,
+ 255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
+ 255, 0, 0,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
+ 255, 0,118, 59, 5,119, 60, 94,186,138, 85,201,142, 14,185, 98, 16,
+ 189,101, 17,193,103, 17,194,104, 87,211,148, 89,193,139, 4,118, 60,
+ 0,113, 57,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
+ 255, 0, 0,255, 0,255,255, 0,255,255, 0,255,255, 0,255, 0, 85,
+ 85, 4,118, 58, 89,175,131,129,211,169, 19,177, 96, 13,179, 94, 14,
+ 183, 97, 14,185, 98, 15,186, 99, 15,185, 99,100,208,153, 74,175,123,
+ 4,119, 60, 0,102, 51,255, 0,255,255, 0,255,255, 0,255,255, 0,
+ 255, 0, 0,255, 0,255,255, 0,255,255, 0,255,255, 0,255, 3,118,
+ 60, 73,160,116,144,212,177, 71,186,128, 52,183,116, 15,173, 93, 12,
+ 175, 92, 12,177, 93, 12,178, 94, 12,177, 93, 18,177, 96,108,204,156,
+ 57,157,105, 3,118, 60,255, 0,255,255, 0,255,255, 0,255,255, 0,
+ 255, 0, 0,255, 0,255,255, 0,255,255, 0,255, 4,115, 58, 55,149,
+ 100,154,213,182, 86,186,134, 70,182,125, 63,182,121, 51,180,114, 24,
+ 173, 96, 10,169, 88, 10,170, 88, 10,169, 88, 10,168, 87, 23,170, 95,
+ 114,201,156, 40,142, 91, 4,117, 57,255, 0,255,255, 0,255,255, 0,
+ 255, 0, 0,255, 0,255,255, 0,255, 3,114, 57, 41,138, 88,163,216,
+ 189,168,219,193,164,218,190,160,216,187, 65,178,121, 58,178,116, 49,
+ 176,111, 34,170,101, 9,162, 84, 8,161, 83,126,205,165,126,204,164,
+ 126,203,163,119,198,158, 29,131, 79, 3,114, 59,255, 0,255,255, 0,
+ 255, 0, 0,255, 0,255,255, 0,255, 4,117, 59, 4,115, 58, 4,115,
+ 58, 4,115, 58, 5,119, 60,162,217,189, 69,179,123, 60,176,116, 50,
+ 172,109, 42,168,103, 26,162, 92, 6,154, 78,126,202,163, 5,119, 60,
+ 4,115, 58, 4,115, 58, 4,115, 58, 4,117, 58,255, 0,255,255, 0,
+ 255, 0, 0,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
+ 255,255, 0,255, 4,115, 58,164,218,190, 71,180,124, 62,176,118, 52,
+ 173,111, 44,169,105, 35,165, 98, 17,158, 86,126,202,163, 4,115, 58,
+ 255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
+ 255, 0, 0,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
+ 255,255, 0,255, 4,115, 58,165,218,191, 73,181,125, 64,177,119, 54,
+ 173,112, 45,169,105, 36,166, 99, 24,161, 91,126,202,163, 4,115, 58,
+ 255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
+ 255, 0, 0,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
+ 255,255, 0,255, 4,115, 58,166,218,191, 74,181,126, 64,177,119, 54,
+ 173,112, 46,170,106, 37,166,100, 26,162, 92,127,203,164, 4,115, 58,
+ 255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
+ 255, 0, 0,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
+ 255,255, 0,255, 4,115, 58,166,218,191, 74,181,126, 64,177,119, 54,
+ 173,112, 46,170,106, 36,166, 99, 26,162, 92,127,203,164, 4,115, 58,
+ 255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
+ 255, 0, 0,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
+ 255,255, 0,255, 4,115, 58,165,218,191,160,216,187,156,214,184,150,
+ 212,180,146,210,177,141,208,174,136,206,170,128,203,164, 4,115, 58,
+ 255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
+ 255, 0, 0,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
+ 255,255, 0,255, 4,117, 58, 4,115, 58, 4,115, 58, 4,115, 58, 4,
+ 115, 58, 4,115, 58, 4,115, 58, 4,115, 58, 4,115, 58, 4,117, 58,
+ 255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
+ 255, 0, 0,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
+ 255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255,
+ 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,
+ 255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
+ 255, 0, 0,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
+ 255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255,
+ 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,
+ 255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
+ 255, 0, 0);
+
+Const
+ usr_arrow_left : Array[0..1549] of byte = (
+ 66, 77, 14, 6, 0, 0, 0, 0, 0, 0, 54, 0, 0, 0, 40, 0, 0,
+ 0, 22, 0, 0, 0, 22, 0, 0, 0, 1, 0, 24, 0, 0, 0, 0, 0,
+ 216, 5, 0, 0, 19, 11, 0, 0, 19, 11, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
+ 255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255,
+ 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,
+ 255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
+ 255, 0, 0,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
+ 255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255,
+ 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,
+ 255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
+ 255, 0, 0,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
+ 255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255,
+ 0,255, 0,102, 51, 3,110, 55,255, 0,255,255, 0,255,255, 0,255,
+ 255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
+ 255, 0, 0,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
+ 255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255, 3,
+ 89, 45, 27,129, 76, 6,116, 60,255, 0,255,255, 0,255,255, 0,255,
+ 255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
+ 255, 0, 0,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
+ 255,255, 0,255,255, 0,255,255, 0,255,255, 0,255, 2,101, 51, 37,
+ 139, 87,121,206,163, 8,118, 60,255, 0,255,255, 0,255,255, 0,255,
+ 255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
+ 255, 0, 0,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
+ 255,255, 0,255,255, 0,255,255, 0,255, 3,110, 55, 54,152,102,117,
+ 208,161,129,216,172, 8,118, 60,255, 0,255,255, 0,255,255, 0,255,
+ 255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
+ 255, 0, 0,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
+ 255,255, 0,255, 0,102, 51, 3,114, 58, 69,166,117,111,206,157, 28,
+ 185,105,128,219,173, 9,125, 65, 4,115, 58, 4,115, 58, 4,115, 58,
+ 4,115, 58, 4,115, 58, 4,115, 59,255, 0,255,255, 0,255,255, 0,
+ 255, 0, 0,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
+ 255, 3, 88, 44, 7,118, 60, 83,176,129, 99,198,148, 20,177, 97, 14,
+ 182, 96,128,221,174,132,225,178,134,230,181,133,229,180,132,225,178,
+ 131,221,175,130,217,173, 8,118, 60, 0,102, 51,255, 0,255,255, 0,
+ 255, 0, 0,255, 0,255,255, 0,255,255, 0,255,255, 0,255, 4,109,
+ 55, 13,121, 66, 97,185,140, 83,187,134, 12,165, 87, 11,172, 90, 13,
+ 180, 95, 15,187,100, 17,193,104, 18,198,107, 18,197,106, 17,193,103,
+ 15,186, 99,127,215,170, 8,117, 60, 0,102, 51,255, 0,255,255, 0,
+ 255, 0, 0,255, 0,255,255, 0,255, 0,128, 0, 4,116, 58, 21,130,
+ 73,108,192,149, 68,179,122, 6,154, 78, 7,160, 82, 9,167, 87, 11,
+ 174, 91, 13,180, 95, 14,184, 98, 15,187,100, 15,187, 99, 14,184, 98,
+ 13,179, 95,126,212,168, 8,117, 61, 0,128, 64,255, 0,255,255, 0,
+ 255, 0, 0,255, 0,255,255, 0,255, 3,119, 59, 32,138, 84,113,196,
+ 154, 54,173,112, 13,157, 83, 16,158, 85, 15,158, 84, 15,164, 87, 11,
+ 167, 87, 10,171, 89, 11,174, 91, 12,176, 92, 12,176, 92, 11,174, 91,
+ 11,170, 90,132,211,170, 8,117, 61, 0,128, 64,255, 0,255,255, 0,
+ 255, 0, 0,255, 0,255,255, 0,255, 3,117, 59, 32,136, 84,116,196,
+ 155, 62,177,117, 23,161, 90, 28,163, 94, 33,165, 97, 37,167,100, 43,
+ 171,105, 44,175,107, 40,176,106, 35,175,103, 35,175,103, 41,175,107,
+ 54,178,114,149,213,180, 8,117, 61, 0,128, 64,255, 0,255,255, 0,
+ 255, 0, 0,255, 0,255,255, 0,255,255, 0,255, 4,116, 58, 22,128,
+ 73,116,195,154, 85,186,135, 35,166, 99, 40,168,102, 45,170,106, 50,
+ 172,109, 54,173,112, 58,175,115, 61,176,117, 63,177,118, 65,178,120,
+ 65,178,120,154,214,184, 9,118, 62, 0,128, 64,255, 0,255,255, 0,
+ 255, 0, 0,255, 0,255,255, 0,255,255, 0,255,255, 0,255, 3,114,
+ 57, 15,123, 68,108,188,148,107,195,150, 49,172,109, 52,173,111, 57,
+ 175,114, 62,177,118, 66,178,120, 68,179,122, 71,181,125, 73,181,126,
+ 74,182,127,159,216,187, 10,118, 63, 0,128, 64,255, 0,255,255, 0,
+ 255, 0, 0,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
+ 255, 5,117, 58, 8,119, 61, 99,182,139,127,203,164, 66,178,120, 65,
+ 178,120,157,215,185,161,217,188,163,218,190,164,218,191,166,219,192,
+ 166,219,192,166,219,192, 10,118, 63, 0,128, 64,255, 0,255,255, 0,
+ 255, 0, 0,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
+ 255,255, 0,255, 0,118, 59, 4,116, 60, 85,170,126,142,209,175, 82,
+ 185,132,160,217,188, 11,123, 65, 4,115, 58, 4,115, 58, 4,115, 58,
+ 4,115, 58, 4,115, 58, 4,117, 59, 0,128, 64,255, 0,255,255, 0,
+ 255, 0, 0,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
+ 255,255, 0,255,255, 0,255, 0,116, 70, 4,117, 59, 69,158,113,152,
+ 212,181,165,218,191, 11,119, 63, 0,128, 64,255, 0,255,255, 0,255,
+ 255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
+ 255, 0, 0,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
+ 255,255, 0,255,255, 0,255,255, 0,255, 0,128, 0, 3,116, 58, 52,
+ 146, 98,159,214,186, 11,119, 63, 0,128, 64,255, 0,255,255, 0,255,
+ 255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
+ 255, 0, 0,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
+ 255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255, 5,
+ 117, 60, 37,136, 84, 7,117, 60, 0,128, 64,255, 0,255,255, 0,255,
+ 255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
+ 255, 0, 0,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
+ 255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255,
+ 0,255, 4,115, 57, 4,116, 58, 0,128, 64,255, 0,255,255, 0,255,
+ 255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
+ 255, 0, 0,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
+ 255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255,
+ 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,
+ 255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
+ 255, 0, 0,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
+ 255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255,
+ 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,
+ 255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
+ 255, 0, 0);
+
+Const
+ usr_arrow_right : Array[0..1549] of byte = (
+ 66, 77, 14, 6, 0, 0, 0, 0, 0, 0, 54, 0, 0, 0, 40, 0, 0,
+ 0, 22, 0, 0, 0, 22, 0, 0, 0, 1, 0, 24, 0, 0, 0, 0, 0,
+ 216, 5, 0, 0, 19, 11, 0, 0, 19, 11, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
+ 255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255,
+ 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,
+ 255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
+ 255, 0, 0,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
+ 255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255,
+ 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,
+ 255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
+ 255, 0, 0,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
+ 255,255, 0,255,255, 0,255,255, 0,255,255, 0,255, 3,110, 55, 2,
+ 82, 42,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,
+ 255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
+ 255, 0, 0,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
+ 255,255, 0,255,255, 0,255,255, 0,255,255, 0,255, 4,115, 58, 30,
+ 131, 78, 3, 93, 47,255, 0,255,255, 0,255,255, 0,255,255, 0,255,
+ 255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
+ 255, 0, 0,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
+ 255,255, 0,255,255, 0,255,255, 0,255,255, 0,255, 4,115, 58,122,
+ 207,164, 41,141, 90, 2,102, 51,255, 0,255,255, 0,255,255, 0,255,
+ 255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
+ 255, 0, 0,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
+ 255,255, 0,255,255, 0,255,255, 0,255,255, 0,255, 4,115, 58,130,
+ 216,172,118,214,166, 58,159,107, 4,112, 56,255, 0,255,255, 0,255,
+ 255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
+ 255, 0, 0,255, 0,255,255, 0,255,255, 0,255, 4,115, 57, 4,115,
+ 58, 4,115, 58, 4,115, 58, 4,115, 58, 4,115, 58, 5,119, 61,131,
+ 219,174, 31,198,113,114,222,167, 74,180,127, 4,116, 59,255, 0,255,
+ 255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
+ 255, 0, 0,255, 0,255,255, 0,255,255, 0,255, 4,115, 58,126,203,
+ 163,126,203,163,126,203,164,127,207,166,129,212,169,130,216,172,131,
+ 220,175, 17,195,105, 26,204,115,105,223,163, 90,195,142, 9,119, 62,
+ 2, 86, 44,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
+ 255, 0, 0,255, 0,255,255, 0,255,255, 0,255, 4,115, 58,126,203,
+ 163, 6,154, 78, 6,154, 78, 8,161, 82, 10,168, 87, 12,176, 92, 14,
+ 183, 97, 16,189,101, 17,193,103, 19,194,105, 89,211,149,103,201,152,
+ 15,125, 68, 4,110, 56,255, 0,255,255, 0,255,255, 0,255,255, 0,
+ 255, 0, 0,255, 0,255,255, 0,255,255, 0,255, 4,115, 58,126,203,
+ 163, 6,154, 78, 6,154, 78, 6,156, 79, 8,163, 84, 10,169, 88, 12,
+ 175, 92, 13,179, 94, 14,182, 96, 14,182, 96, 13,180, 95, 71,196,132,
+ 112,202,156, 22,131, 74, 3,119, 59, 0,128, 0,255, 0,255,255, 0,
+ 255, 0, 0,255, 0,255,255, 0,255,255, 0,255, 4,115, 58,133,205,
+ 168, 7,154, 79, 6,154, 78, 6,154, 78, 6,156, 79, 8,161, 82, 9,
+ 165, 85, 12,170, 88, 18,174, 94, 21,175, 96, 22,173, 97, 19,170, 93,
+ 58,182,119,117,199,157, 34,139, 85, 4,118, 59,255, 0,255,255, 0,
+ 255, 0, 0,255, 0,255,255, 0,255,255, 0,255, 4,115, 58,151,213,
+ 181, 52,173,111, 40,168,102, 33,165, 97, 33,165, 97, 39,167,102, 45,
+ 171,107, 46,173,107, 43,173,106, 39,171,104, 34,169,100, 28,165, 95,
+ 65,178,120,120,198,159, 34,138, 86, 3,117, 59,255, 0,255,255, 0,
+ 255, 0, 0,255, 0,255,255, 0,255,255, 0,255, 4,115, 58,156,215,
+ 185, 65,178,120, 65,178,120, 65,178,120, 63,177,118, 61,176,117, 58,
+ 175,115, 54,173,112, 50,172,109, 45,170,106, 40,168,102, 88,188,137,
+ 120,197,157, 24,129, 75, 4,115, 58,255, 0,255,255, 0,255,255, 0,
+ 255, 0, 0,255, 0,255,255, 0,255,255, 0,255, 4,115, 58,160,217,
+ 188, 74,182,127, 74,182,127, 73,181,126, 71,181,125, 68,179,122, 66,
+ 178,120, 62,177,118, 58,175,115, 54,174,112,111,197,152,113,191,151,
+ 16,124, 69, 3,116, 60,255, 0,255,255, 0,255,255, 0,255,255, 0,
+ 255, 0, 0,255, 0,255,255, 0,255,255, 0,255, 4,115, 58,166,219,
+ 192,166,219,192,166,219,192,166,219,192,164,218,191,163,218,190,161,
+ 217,188, 69,180,123, 71,180,124,130,204,166,103,183,141, 9,118, 61,
+ 5,114, 57,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
+ 255, 0, 0,255, 0,255,255, 0,255,255, 0,255, 4,117, 58, 4,115,
+ 58, 4,115, 58, 4,115, 58, 4,115, 58, 4,115, 58, 5,119, 60,165,
+ 218,191, 87,187,135,144,210,176, 91,173,131, 3,116, 59, 0,118, 55,
+ 255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
+ 255, 0, 0,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
+ 255,255, 0,255,255, 0,255,255, 0,255,255, 0,255, 4,115, 58,169,
+ 220,193,155,213,183, 74,161,116, 4,116, 59, 0,106, 64,255, 0,255,
+ 255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
+ 255, 0, 0,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
+ 255,255, 0,255,255, 0,255,255, 0,255,255, 0,255, 4,115, 58,164,
+ 217,190, 57,149,102, 3,118, 60, 0, 85, 85,255, 0,255,255, 0,255,
+ 255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
+ 255, 0, 0,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
+ 255,255, 0,255,255, 0,255,255, 0,255,255, 0,255, 4,115, 58, 41,
+ 137, 88, 5,117, 59,255, 0,255,255, 0,255,255, 0,255,255, 0,255,
+ 255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
+ 255, 0, 0,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
+ 255,255, 0,255,255, 0,255,255, 0,255,255, 0,255, 4,117, 59, 3,
+ 114, 57,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,
+ 255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
+ 255, 0, 0,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
+ 255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255,
+ 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,
+ 255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
+ 255, 0, 0,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
+ 255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255,
+ 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,
+ 255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,
+ 255, 0, 0);
diff --git a/docview/src/docview.lpi b/docview/src/docview.lpi
index 2996f4cf..49ed38aa 100644
--- a/docview/src/docview.lpi
+++ b/docview/src/docview.lpi
@@ -32,7 +32,7 @@
<PackageName Value="fpgui_toolkit"/>
</Item1>
</RequiredPackages>
- <Units Count="28">
+ <Units Count="29">
<Unit0>
<Filename Value="docview.lpr"/>
<IsPartOfProject Value="True"/>
@@ -171,6 +171,10 @@
<IsPartOfProject Value="True"/>
<UnitName Value="frm_configuration"/>
</Unit27>
+ <Unit28>
+ <Filename Value="arrows.inc"/>
+ <IsPartOfProject Value="True"/>
+ </Unit28>
</Units>
</ProjectOptions>
<CompilerOptions>
diff --git a/docview/src/frm_main.pas b/docview/src/frm_main.pas
index 9f968bb7..0735eb47 100644
--- a/docview/src/frm_main.pas
+++ b/docview/src/frm_main.pas
@@ -72,6 +72,7 @@ type
Files: TList; // current open help files.
Debug: boolean;
FFileOpenRecent: TfpgMenuItem;
+ FHistorySelection: Boolean;
LoadingFilenameList: TStringList;
LoadingFileIndex: integer;
@@ -85,7 +86,10 @@ type
ContentsLoaded: boolean;
DisplayedIndex: TStringList; // duplicate of index listbox, for fast case insensitive searching
CurrentTopic: TTopic; // so we can get easy access to current topic viewed
+ CurrentHistoryIndex: integer;
+ procedure btnBackHistClick(Sender: TObject);
+ procedure btnFwdHistClick(Sender: TObject);
procedure btnPrevClick(Sender: TObject);
procedure btnNextClick(Sender: TObject);
procedure RichViewClickLink(Sender: TRichTextView; Link: string);
@@ -114,9 +118,12 @@ type
procedure lbIndexDoubleClick(Sender: TObject; AButton: TMouseButton; AShift: TShiftState; const AMousePos: TPoint);
procedure lbIndexKeyPress(Sender: TObject; var KeyCode: word; var ShiftState: TShiftState; var Consumed: boolean);
procedure lbSearchResultsDoubleClick(Sender: TObject; AButton: TMouseButton; AShift: TShiftState; const AMousePos: TPoint);
+ procedure lbHistoryDoubleClick(Sender: TObject; AButton: TMouseButton; AShift: TShiftState; const AMousePos: TPoint);
+ procedure lbHistoryKeyPress(Sender: TObject; var KeyCode: word; var ShiftState: TShiftState; var Consumed: boolean);
procedure btnSearchClicked(Sender: TObject);
procedure IndexSearchEditOnChange(Sender: TObject);
procedure DisplaySelectedSearchResultTopic;
+ procedure NavigateToHistoryIndex(AIndex: integer);
procedure UpdateLocationPanel;
procedure EnableControls;
procedure ClearAllWordSequences;
@@ -147,6 +154,7 @@ type
procedure DisplaySelectedContentsTopic;
procedure DisplaySelectedIndexTopic;
procedure ProcessCommandLineParams;
+ procedure SaveNavigatePoint;
procedure ShowParamHelp;
function FindTopicForLink( Link: THelpLink ): TTopic;
function FindTopicByResourceID( ID: word ): TTopic;
@@ -187,6 +195,8 @@ const
cCreatedBy = 'Created by Graeme Geldenhuys';
cVersion = 'Version 0.7 (alpha)';
+{$I arrows.inc}
+
{@VFD_NEWFORM_IMPL}
procedure TMainForm.MainFormException(Sender: TObject; E: Exception);
@@ -204,6 +214,26 @@ begin
end
end;
+procedure TMainForm.btnBackHistClick(Sender: TObject);
+begin
+ if CurrentHistoryIndex > 0 then
+ begin
+ NavigateToHistoryIndex(CurrentHistoryIndex - 1);
+ //lbHistory.FocusItem := CurrentHistoryIndex - 1;
+ //DisplayTopic(TTopic(lbHistory.Items.Objects[lbHistory.FocusItem]));
+ end;
+end;
+
+procedure TMainForm.btnFwdHistClick(Sender: TObject);
+begin
+ if CurrentHistoryIndex < lbHistory.Items.Count-1 then
+ begin
+ NavigateToHistoryIndex(CurrentHistoryIndex + 1);
+ //lbHistory.FocusItem := CurrentHistoryIndex + 1;
+ //DisplayTopic(TTopic(lbHistory.Items.Objects[lbHistory.FocusItem]));
+ end;
+end;
+
procedure TMainForm.btnPrevClick(Sender: TObject);
begin
if CurrentOpenFiles.Count > 0 then
@@ -602,10 +632,12 @@ procedure TMainForm.PageControl1Change(Sender: TObject; NewActiveSheet: TfpgTabS
begin
if NewActiveSheet = tsIndex then
begin
- if not IndexLoaded then
- LoadIndex;
- IndexSearchEdit.SetFocus;
- end;
+ if not IndexLoaded then
+ LoadIndex;
+ IndexSearchEdit.SetFocus;
+ end
+ else if NewActiveSheet = tsHistory then
+ lbHistory.FocusItem := CurrentHistoryIndex;
end;
procedure TMainForm.tvContentsDoubleClick(Sender: TObject; AButton: TMouseButton;
@@ -633,6 +665,34 @@ begin
DisplaySelectedSearchResultTopic;
end;
+procedure TMainForm.lbHistoryDoubleClick(Sender: TObject;
+ AButton: TMouseButton; AShift: TShiftState; const AMousePos: TPoint);
+begin
+ try
+ FHistorySelection := True;
+ DisplayTopic(nil);
+ CurrentHistoryIndex := lbHistory.FocusItem;
+ finally
+ FHistorySelection := False;
+ end;
+end;
+
+procedure TMainForm.lbHistoryKeyPress(Sender: TObject; var KeyCode: word;
+ var ShiftState: TShiftState; var Consumed: boolean);
+begin
+ if (KeyCode = keyReturn) or (KeyCode = keyPEnter) then
+ begin
+ Consumed := True;
+ try
+ FHistorySelection := True;
+ DisplayTopic(nil);
+ CurrentHistoryIndex := lbHistory.FocusItem;
+ finally
+ FHistorySelection := False;
+ end;
+ end
+end;
+
procedure TMainForm.btnSearchClicked(Sender: TObject);
begin
DoSearch;
@@ -684,6 +744,18 @@ begin
DisplayTopic( Topic );
end;
+procedure TMainForm.NavigateToHistoryIndex(AIndex: integer);
+begin
+ try
+ FHistorySelection := True;
+ CurrentHistoryIndex := AIndex;
+ lbHistory.FocusItem := AIndex;
+ DisplayTopic(TTopic(lbHistory.Items.Objects[AIndex]));
+ finally
+ FHistorySelection := False;
+ end;
+end;
+
procedure TMainForm.UpdateLocationPanel;
var
i: integer;
@@ -1034,9 +1106,8 @@ begin
Result := true;
lbSearchResults.Items.Clear;
- { TODO : page history support }
-// PageHistory.Clear;
-// CurrentHistoryIndex := -1;
+ lbHistory.Items.Clear;
+ CurrentHistoryIndex := -1;
// Now that we have successfully loaded the new help file(s)
// close the existing one.
@@ -1085,9 +1156,8 @@ begin
if DisplayFirstTopic then
begin
LogEvent(LogStartup, 'Display first topic' );
- { TODO -oGraeme : Improved Display Topic method }
-// DisplaySelectedContentsTopic;
- DisplayTopic(nil);
+ DisplaySelectedContentsTopic;
+// DisplayTopic(nil);
end;
LogEvent(LogStartup, 'OpenFiles complete' );
@@ -1518,6 +1588,16 @@ Begin
Topic := TTopic(lbSearchResults.Items.Objects[lbSearchResults.FocusItem]);
ProfileEvent('Got Topic from Search Results listbox');
end;
+ 4: begin // History tab
+ if lbHistory.FocusItem = -1 then
+ begin
+ ShowMessage('You must select a history item first by clicking it.');
+ Exit; //==>
+ end
+ else
+ Topic := TTopic(lbHistory.Items.Objects[lbHistory.FocusItem]);
+ ProfileEvent('Got Topic from History listbox');
+ end;
end;
end // case..
else
@@ -1526,7 +1606,7 @@ Begin
if Topic = nil then
raise Exception.Create('Unable to locate the Topic');
- CurrentTopic:= Topic;
+ CurrentTopic := Topic;
RichView.Clear;
ImageIndices := TList.Create;
@@ -1569,6 +1649,7 @@ Begin
tvContents.Selection := tvContents.RootNode.FindSubNode(CurrentTopic, True);
tvContents.Invalidate;
+ SaveNavigatePoint;
UpdateLocationPanel;
end;
@@ -1605,8 +1686,28 @@ begin
AllFilesWordSequences := TList.Create;
CurrentOpenFiles := TList.Create;
DisplayedIndex := TStringList.Create;
+ CurrentHistoryIndex := -1;
+ FHistorySelection := False;
{ TODO -oGraeme : Make Debug a menu option }
Debug := False;
+
+ // load toolbar images
+ fpgImages.AddMaskedBMP(
+ 'dv.arrowleft', @usr_arrow_left,
+ sizeof(usr_arrow_left), 0, 0);
+
+ fpgImages.AddMaskedBMP(
+ 'dv.arrowright', @usr_arrow_right,
+ sizeof(usr_arrow_right), 0, 0);
+
+ fpgImages.AddMaskedBMP(
+ 'dv.arrowup', @usr_arrow_up,
+ sizeof(usr_arrow_up), 0, 0);
+
+ fpgImages.AddMaskedBMP(
+ 'dv.arrowdown', @usr_arrow_down,
+ sizeof(usr_arrow_down), 0, 0);
+
end;
destructor TMainForm.Destroy;
@@ -1627,6 +1728,7 @@ begin
Name := 'MainForm';
SetPosition(602, 274, 654, 386);
WindowTitle := 'fpGUI Documentation Viewer';
+ ShowHint := True;
WindowPosition := wpUser;
OnCloseQuery := @MainFormCloseQuery;
@@ -2004,6 +2106,8 @@ begin
HotTrack := False;
PopupFrame := False;
TabOrder := 0;
+ OnDoubleClick := @lbHistoryDoubleClick;
+ OnKeyPress := @lbHistoryKeyPress;
end;
Splitter1 := TfpgSplitter.Create(bvlBody);
@@ -2102,7 +2206,7 @@ begin
Text := '';
Embedded := True;
FontDesc := '#Label1';
- Hint := '';
+ Hint := 'Open a new help file.';
ImageMargin := 0;
ImageName := 'stdimg.open';
TabOrder := 0;
@@ -2119,7 +2223,7 @@ begin
Embedded := True;
FontDesc := '#Label1';
GroupIndex := 1;
- Hint := '';
+ Hint := 'Display or hide tabs';
ImageName := '';
TabOrder := 1;
Enabled := False;
@@ -2133,10 +2237,11 @@ begin
Text := '<';
Embedded := True;
FontDesc := '#Label1';
- Hint := '';
- ImageName := '';
+ Hint := 'Previous history item.';
+ ImageMargin := 0;
+ ImageName := 'dv.arrowleft';
TabOrder := 2;
- Enabled := False;
+ OnClick := @btnBackHistClick;
end;
btnFwd := TfpgButton.Create(ToolBar);
@@ -2147,10 +2252,11 @@ begin
Text := '>';
Embedded := True;
FontDesc := '#Label1';
- Hint := '';
- ImageName := '';
+ Hint := 'Next history item.';
+ ImageMargin := 0;
+ ImageName := 'dv.arrowright';
TabOrder := 3;
- Enabled := False;
+ OnClick := @btnFwdHistClick;
end;
btnPrev := TfpgButton.Create(ToolBar);
@@ -2161,8 +2267,9 @@ begin
Text := 'prev';
Embedded := True;
FontDesc := '#Label1';
- Hint := '';
- ImageName := '';
+ Hint := 'Previous Topic.';
+ ImageMargin := 0;
+ ImageName := 'dv.arrowup';
TabOrder := 4;
OnClick := @btnPrevClick;
end;
@@ -2175,8 +2282,9 @@ begin
Text := 'next';
Embedded := True;
FontDesc := '#Label1';
- Hint := '';
- ImageName := '';
+ Hint := 'Next Topic.';
+ ImageMargin := 0;
+ ImageName := 'dv.arrowdown';
TabOrder := 5;
OnClick :=@btnNextClick;
end;
@@ -2189,7 +2297,7 @@ begin
Text := '';
Embedded := True;
FontDesc := '#Label1';
- Hint := '';
+ Hint := 'Display Product Information.';
ImageMargin := -1;
ImageName := 'stdimg.help';
ImageSpacing := 0;
@@ -2200,6 +2308,12 @@ begin
{@VFD_BODY_END: MainForm}
{%endregion}
+ // remove toolbar button text
+ btnBack.Text := '';
+ btnFwd.Text := '';
+ btnNext.Text := '';
+ btnPrev.Text := '';
+
miOpenRecentMenu := TfpgPopupMenu.Create(nil);
with miOpenRecentMenu do
begin
@@ -2248,7 +2362,7 @@ End;
procedure TMainForm.DisplaySelectedIndexTopic;
var
Topic: TTopic;
-Begin
+begin
if lbIndex.FocusItem = -1 then
exit;
Topic := DisplayedIndex.Objects[ lbIndex.FocusItem ] as TTopic;
@@ -2306,6 +2420,22 @@ begin
end;
end;
+procedure TMainForm.SaveNavigatePoint;
+begin
+ // if we selected an item from history listbox, don't record that save point
+ if FHistorySelection then
+ Exit;
+
+ // delete rest of history
+ while CurrentHistoryIndex < lbHistory.Items.Count-1 do
+ lbHistory.Items.Delete(CurrentHistoryIndex + 1);
+
+ if CurrentTopic <> nil then
+ lbHistory.Items.AddObject(CurrentTopic.Title, CurrentTopic);
+
+ inc(CurrentHistoryIndex);
+end;
+
procedure TMainForm.ShowParamHelp;
const
le = LineEnding;