]>
git.saurik.com Git - wxWidgets.git/blob - utils/tex2rtf/src/readshg.h
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: Petr Smilauer's .SHG (Segmented Hypergraphics file) reading
5 // Note: .SHG is undocumented (anywhere!) so this is
7 // and guesswork at its best.
8 // Author: Petr Smilauer
12 // Copyright: (c) Petr Smilauer
13 // Licence: wxWindows licence
14 /////////////////////////////////////////////////////////////////////////////
22 typedef enum { TypePopup
= 0xE2, TypeJump
= 0xE3, TypeMacro
= 0xC8} HotspotType
;
24 #define NOT_VISIBLE 0x04
28 unsigned char hotspotType
;// combines HotspotType /w NOT_VISIBLE if appropriate
29 unsigned char flag
; // NOT_VISIBLE or 0 ??
30 unsigned char skip
; // 0, always??
33 width
, // left+width/top+height give right/bottom,
34 height
; // =>right and bottom edge are not 'included'
35 unsigned char magic
[4]; // wonderful numbers: for macros, this seems
36 // (at least first 2 bytes) to represent offset into macro-strings block.
37 } ShgInfoBlock
; // whole block is just 15 bytes long. How weird!
39 #define OFF_OFFSET 0x20 // this is offset, where WORD (?) lies
40 #define OFFSET_DELTA 9 // we must add this to get real offset from file beginning
49 wxChar szHlpTopic_Macro
[65];
53 // Returns the number of hotspots, and the array of hotspots.
56 // int n = ParseSHG("thing.shg", &array);
58 extern int ParseSHG( const wxChar
* fileName
, HotSpot
**hotspots
);
60 // Converts Windows .SHG file to HTML map file
61 extern bool SHGToMap(const wxChar
*filename
, const wxChar
*defaultFile
);