Commit e4c356ab authored by Robert Sprowson's avatar Robert Sprowson

Given hypenated date in info box.

Makefile changed so it can be put in ROM (ages ago!)
ROM versions of boot and run files changed to use !Help icon in Wimp sprites
file rather than trying to iconsprites its own copy (removed).
Mode changes bin then regrab the font handle in case eigen values changed.

Version 3.13. Tagged as 'Help2-3_13'
parent bbed6974
......@@ -22,6 +22,7 @@
# 31-Mar-98 RML Created
# 27-Apr-98 RML ROM build rules added
# 01-May-98 RML Creates rm directory
# 21-Sep-02 RPS For ROM,we'll make use of the sprites in the Wimp
#
# Program specific options:
......@@ -75,12 +76,10 @@ WRAPPER = RISC_OSLib:s.ModuleWrap
#
INCLUDES = -Itbox:,C:
FILES =\
${RDIR}.!Boot \
${LDIR}.!Help \
${RDIR}.!Run \
${RDIR}.!Sprites22 \
${RDIR}.!RunImage \
${LDIR}.Messages \
${LDIR}.Res
......@@ -121,15 +120,15 @@ install: ${FILES}
${CP} ${RDIR}.!Boot ${INSTDIR}.${APP}.!Boot ${CPFLAGS}
${CP} ${LDIR}.!Help ${INSTDIR}.${APP}.!Help ${CPFLAGS}
${CP} ${RDIR}.!Run ${INSTDIR}.${APP}.!Run ${CPFLAGS}
${CP} ${RDIR}.!Sprites22 ${INSTDIR}.${APP}.!Sprites22 ${CPFLAGS}
${CP} ${RDIR}.!RunImage ${INSTDIR}.${APP}.!RunImage ${CPFLAGS}
${CP} ${LDIR}.Messages ${INSTDIR}.${APP}.Messages ${CPFLAGS}
${CP} ${LDIR}.Res ${INSTDIR}.${APP}.Res ${CPFLAGS}
${CP} ${RDIR}.!Sprites22 ${INSTDIR}.${APP}.!Sprites22 ${CPFLAGS}
Access ${INSTDIR}.${APP}.* wr/r
@echo
@echo ${COMPONENT}: Application installed {Disc}
resources-ASM:
resources:
${MKDIR} ${RESAPP}
${MKDIR} ${RESDIR}
|
......@@ -137,13 +136,7 @@ resources-ASM:
${CP} ${RDIR}.ROM.!Run ${RESAPP}.!Run ${CPFLAGS}
${CP} ${RDIR}.ROM.!Boot ${RESAPP}.!Boot ${CPFLAGS}
|
${CP} ${RDIR}.!Sprites22 ${RESDIR}.!Sprites22 ${CPFLAGS}
${CP} ${LDIR}.Res ${RESDIR}.Res ${CPFLAGS}
resources-RES:
${MKDIR} ${RESDIR}
resources: resources-${TYPE}
${CP} ${LDIR}.Messages ${RESDIR}.Messages ${CPFLAGS}
|
@echo ${COMPONENT}: resource files copied to Messages module
......
| Allow other applications to start help by mentioning <Help$Start>,
| rather than giving the absolute pathname.
Set Help$Start <Obey$Dir>
| Load application sprites
Iconsprites <Help$Start>.!Sprites22
Iconsprites <Obey$Dir>.!Sprites22
\ No newline at end of file
| !Run for !Help
| !Run for disc based !Help
| Check if Help is already running
If "<Help$Dir>"<>"" Then Error Help is already running
Set Help$Dir <Obey$Dir>
| Ensure high enough OS version
| Ensure correct module versions
RMEnsure UtilityModule 3.10 Error This version of Help requires RISC OS 3.1 or later.
| Ensure correct Toolbox modules
RMEnsure Toolbox 1.36 RMLoad System:modules.toolbox.toolbox
RMEnsure Toolbox 1.36 Error You need Toolbox 1.36 or later to run Help
RMEnsure Window 1.41 RMLoad System:modules.toolbox.window
......@@ -20,10 +17,7 @@ RMEnsure ProgInfo 0.09 RMLoad System:modules.toolbox.proginfo
RMEnsure ProgInfo 0.09 Error You need ProgInfo 0.09 or later to run Help.
RMEnsure FontMenu 0.17 RMLoad System:modules.toolbox.fontmenu
RMEnsure FontMenu 0.17 Error You need FontMenu 0.17 or later to run Help.
| Load application sprites
Iconsprites <Help$Dir>.!Sprites22
| Start the application
Iconsprites <Obey$Dir>.!Sprites22
Wimpslot -min 64k -max 64k
Run <Help$Dir>.!RunImage
\ No newline at end of file
| Allow other applications to start help by mentioning <Help$Start>,
| rather than giving the absolute pathname.
Set Help$Start <Obey$Dir>
| Load application sprites
Iconsprites <Help$Start>.!Sprites22
Set Help$Start <Obey$Dir>
\ No newline at end of file
| !Run for !Help
| !Run for ROM !Help
| Check if Help is already running
If "<Help$Dir>"<>"" Then Error Help is already running
Set Help$Dir Resources:$.Resources.Help
| Ensure high enough OS version
Set Help$Dir Resources:Resources.Help
| Ensure correct module versions
RMEnsure UtilityModule 3.10 Error This version of Help requires RISC OS 3.1 or later.
| Ensure correct Toolbox modules
RMEnsure Toolbox 1.36 RMLoad System:modules.toolbox.toolbox
RMEnsure Toolbox 1.36 Error You need Toolbox 1.36 or later to run Help
RMEnsure Window 1.41 RMLoad System:modules.toolbox.window
......@@ -20,10 +17,6 @@ RMEnsure ProgInfo 0.09 RMLoad System:modules.toolbox.proginfo
RMEnsure ProgInfo 0.09 Error You need ProgInfo 0.09 or later to run Help.
RMEnsure FontMenu 0.17 RMLoad System:modules.toolbox.fontmenu
RMEnsure FontMenu 0.17 Error You need FontMenu 0.17 or later to run Help.
| Load application sprites
Iconsprites <Help$Start>.!Sprites22
| Start the application
Wimpslot -min 64k -max 64k
Run <Help$Dir>.!RunImage
\ No newline at end of file
No preview for this file type
/* (3.12)
/* (3.13)
*
* This file is automatically maintained by srccommit, do not edit manually.
* Last processed by srccommit version: 1.68.
*
*/
#define Module_MajorVersion_CMHG 3.12
#define Module_MajorVersion_CMHG 3.13
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 01 Oct 2001
#define Module_Date_CMHG 23 Jan 2003
#define Module_MajorVersion "3.12"
#define Module_Version 312
#define Module_MajorVersion "3.13"
#define Module_Version 313
#define Module_MinorVersion ""
#define Module_Date "01 Oct 2001"
#define Module_Date "23 Jan 2003"
#define Module_ApplicationDate2 "01-Oct-01"
#define Module_ApplicationDate4 "01-Oct-2001"
#define Module_ApplicationDate "23-Jan-03"
#define Module_ComponentName "Help2"
#define Module_ComponentPath "RiscOS/Sources/Apps/Help2"
#define Module_FullVersion "3.12"
#define Module_HelpVersion "3.12 (01 Oct 2001)"
#define Module_LibraryVersionInfo "3:12"
#define Module_FullVersion "3.13"
#define Module_HelpVersion "3.13 (23 Jan 2003)"
#define Module_LibraryVersionInfo "3:13"
......@@ -67,6 +67,8 @@ static int still_distance = 32; /* Distance mouse may move, bu
static int delay = DefaultDelay; /* Delay between help requests */
static int helpbox_font_handle = -1; /* font handle of the help text */
static int timeout = DefaultTimeout; /* timeout time */
static int fontsize; /* the chosen font size */
static char fontname[256]; /* the chosen font name */
/* Status variables */
static int screen_w, screen_h; /* Width and height of screen in the current mode */
......@@ -106,8 +108,7 @@ static void read_options(void)
char *item;
char *value;
char buffer[256];
char fontname[256];
int colon, fontsize, fh;
int colon, fh;
int more = 1;
/* Setup default options */
......@@ -583,6 +584,15 @@ static int mode_change(WimpMessage *event, void *handler)
{
common_read_screensize(&screen_w, &screen_h);
/* There's a chance the eigen values changed,regrab the font */
remove_help_box();
if (helpbox_font_handle != -1)
{
_swix(Font_LoseFont, _IN(0), helpbox_font_handle);
helpbox_font_handle = help_font_initialise(fontname, fontsize, &line_spacing);
}
helpbox_font_handle = help_font_initialise(fontname, fontsize, &line_spacing);
return 1;
}
......@@ -712,6 +722,20 @@ static int null_event(int event_code, WimpPollBlock *event, IdBlock *id_block, v
}
/*---------------------------------------------------------------------------*
* key_event *
* *
* Key pressed handler. Just pass them on. *
*---------------------------------------------------------------------------*/
static int key_event(int event_code, WimpPollBlock *event, IdBlock *id_block, void *handle)
{
error_trap(wimp_process_key(event->key_pressed.key_code), 0);
return 1;
}
/*---------------------------------------------------------------------------*
* message_quit *
* *
......@@ -762,6 +786,7 @@ static void initialise_toolbox_objects(void)
error_trap(event_register_message_handler(Wimp_MHelpEnable, help_enable, NULL), 0);
error_trap(event_register_wimp_handler(-1, Wimp_ENull, null_event, NULL), 0);
error_trap(event_register_wimp_handler(-1, Wimp_EUserMessageAcknowledge, message_ack, NULL), 0);
error_trap(event_register_wimp_handler(-1, Wimp_EKeyPressed, key_event, NULL), 0);
error_trap(event_register_toolbox_handler(iconbar_menu_id, Menu_Selection, iconbar_menu_select, NULL), 0);
error_trap(event_register_toolbox_handler(iconbar_id, Iconbar_Clicked, iconbar_click, NULL), 0);
......
......@@ -22,7 +22,7 @@
/* Current version */
#define TaskName "Help"
#include "VersionNum"
#define Version Module_MajorVersion " (" Module_Date ")"
#define Version Module_MajorVersion " (" Module_ApplicationDate ")"
/* Compile with support for Choices file? */
#define UseChoicesFile 1
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment