home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
World of Shareware - Software Farm 2
/
wosw_2.zip
/
wosw_2
/
PASCAL
/
SLTPU70C.ZIP
/
STYLEDEF.REF
< prev
next >
Wrap
Text File
|
1993-09-16
|
6KB
|
179 lines
The follwing is a reference of the data types provided by STYLEDEF.TPU.
Note: do not attempt to compile this file. Doing so may cause the
updated STYLEDEF.TPU file to be incompatible with the other TPU files.
Const MaxStyles = 16; { Number of available styles }
Procedure RipStyleInit; { Opens file, clears stack, loads style 1 }
{ CONFIG file must be opened first }
Procedure WriteStyleHeader; { Update style file header }
Procedure CloseStyleFile; { Close styles file }
Procedure ClearStyleStack; { Clears style stack }
Procedure GetRipStyle (n: integer); { Loads style, doesn't save old style }
Procedure SetRipStyle (n: integer); { Loads style, saves old style on stack }
Procedure SaveRipStyle (n: integer); { Save global style to style file }
Procedure ResetRipStyle; { Restores old style from stack }
{ The following data types define what a 'Rip Style' looks like on disk
and in memory. The fields in these data types closely match what you see
in the CONFIG program when editing the RIP styles and RIP general setup
options. }
Type
Flagstype = array[1..2] of word;
WinPosType = (WP_CC,WP_TL,WP_TC,WP_TR,WP_CL,WP_CR,WP_BL,WP_BC,WP_BR,
WP_USER,WP_EXACT);
WinAttrType = record { These are the Window Attributes }
dfore,
bright,
dark, { Colors: foreground, bright, dark, etc. }
surface,
corner_col : integer;
font: byte; { Font. See below for possible values. }
fonthi: byte; { not used }
fontsize : integer; { Font size. Values range from 1 to 10. }
bevsize : integer; { Bevel size. }
flags : flagstype; { See note below }
winpos : WinPosType; { See note below }
disable : boolean; { If set, the window is disabled }
x0,y0,x1,y1 : integer; { Window position, if WinPos=WP_USER }
dback: integer; { Background color }
end;
TitPosType = ( TP_CENTER, TP_USER);
TitAttrType = record { These are the Title attributes }
dfore,
dback,
bright, { Colors }
dark,
surface,
corner_col : integer;
font: byte; { Font; see below }
fonthi: byte; { Not used }
fontsize : integer; { Font size, 1 to 10 }
bevsize : integer; { Bevel size }
flags : flagstype; { Flags; see below }
titpos : titpostype; { Title position; see below }
disable : boolean; { If true, the title is disabled }
extra : array [1..8] of byte;
end;
ButAttrType = record { These are the button attributes }
dfore,
dback,
bright, { Colors }
dark,
surface,
uline_col,
corner_col : integer;
font: byte; { Font; see below }
fonthi: byte; { Unused }
fontsize : integer; { Font size, 1 to 10 }
orient : integer; { Button orientation. See explanation below. }
wid,
hgt,
spc : integer; { Button width, height, and spacing }
bevsize : integer; { Bevel size }
flags : flagstype; { See flags explanation below }
extra : array[1..32] of byte;
end;
RIPFeatures = (RIPDialog,RIPopup,RIPEditor,RIPSubboard,
RIPBulletin,RIPQuote);
StyleHeaderType = record { This is the RIP General Setup info }
RipMenuSuspend: boolean; { 'RIP On All Help Levels' question }
NonRipMenu: boolean; { 'Display ANSI in RIP Mode' question }
Styles: array[RIPDialog..RIPQuote] of byte; { RIP styles for features }
extra: array[1..504] of byte;
end;
RipStyleType = record
Name : string[8]; { Name of the RIP style }
Desc : string[30]; { Description of the style }
WinAttr : WinAttrType; { Window attributes }
TitAttr : TitAttrType; { Title attributes }
ButAttr : ButAttrType; { Button attributes }
extra : array[1..344] of byte;
end;
Var RipStyle: RipStyleType; { Global RIP style record (current style) }
RipCf: StyleHeaderType; { RIP General Setup information }
CurrStyle: integer; { Currently set style number }
{ These are the values for 'Font':
0: Default
1: Triplex
2: Small
3: SansSerif
4: Gothic
5: Script
6: Simplex
7: TriScript
8: Complex
9: European
10: Bold
These are the values for 'WinPos':
0: Center
1: Top Left
2: Top Center
3: Top Right
4: Center Left
5: Center Right
6: Bottom Left
7: Bottom Center
8: Bottom Right
9: User Defined
These are the values for 'TitPos':
0: Top Center
1: User Defined
These are the values for 'Orient' (Button orientation):
0: Above
1: Left
2: Center
3: Right
4: Beneath
RIP Style Flags
Variables of type 'FlagsType' consist of two words; within each word,
bits are set to indicate special features. This structure corresponds
directly to RIPscrip data structures, although Searchlight does not
make use of all of the features defined by RIPscrip. Here is a bit by
bit layout (with Bit 0 being the first bit of each word) showing the
features we do use:
First Word:
Bit 3: Chiseled
Bit 4: Recessed
Bit 5: Drop Shadow
Bit 8: Beveled
Bit 10: Underline Hotkey
Bit 12: Adjust Vertical Center
Bit 14: Sunken
Second Word:
Bit 1: Highlight Hotkey
Bit 2: Explode
Bit 3: Left Justify Label
Bit 4: Right Justify Label
Note that Searchlight does not support all of these switches for all of
the style components. Refer to the CONFIG program to see which switches
are supported for Window, Title and Button attributes.
}