1 #ifndef SAMPEDITCLASS_H
2 #define SAMPEDITCLASS_H
6 ** Copyright (C) 1995,96 by Bernardo Innocenti
8 ** Sample editor class built on top of the "gadgetclass".
10 ** Note: Use 4 chars wide TABs to read this file.
14 #define SAMPEDITNAME "gadgets/sampedit.gadget"
15 #define SAMPEDITCLASS "sampeditclass"
16 #define SAMPEDITVERS 1
19 /********************/
20 /* Class Attributes */
21 /********************/
23 #define SEA_CursXPos (TAG_USER+1)
24 #define SEA_CursYPos (TAG_USER+2)
25 /* (IGSNU) Cursor position. CursYPos is unused.
28 #define SEA_XStart (TAG_USER+2)
29 #define SEA_YStart (TAG_USER+3)
30 /* (IGSNU) Left and top offsett of the display relative to the start of the sample.
33 #define SEA_XRatio (TAG_USER+4)
34 #define SEA_YRatio (TAG_USER+5)
35 /* (ISGNU) Fixed point 16+16 bit number for the zoom factor. The upper word holds
36 * the integer part and the low word represents the decimals. Setting the ratio
37 * to 65536 sets the zoom factor to 1:1. Bigger numbers produce an higher zoom
38 * factor (e.g.: 131072 is 2:1).
41 #define SEA_ScrollLeft (TAG_USER+6)
42 #define SEA_ScrollRight (TAG_USER+7)
43 #define SEA_ScrollUp (TAG_USER+8)
44 #define SEA_ScrollDown (TAG_USER+9)
45 #define SEA_CursLeft (TAG_USER+10)
46 #define SEA_CursRight (TAG_USER+11)
47 #define SEA_CursUp (TAG_USER+12)
48 #define SEA_CursDown (TAG_USER+13)
49 /* (S) SEA_ScrollLeft and SEA_ScrollRight scroll the display left
50 * and right one unit. SEA_ScrollUp and SEA_ScrollDown move the
51 * display up and down of one unit. SEA_Curs#? attributes move
52 * the cursor one position towards the direction specified. The
53 * contents of ti_Data is meaningless for all these attributes.
56 #define SEA_UndoChange (TAG_USER+14)
57 /* (S) If ti_Data is > 0, one change made to the pattern is
58 * undone. If ti_Data is < 0, a previously undone change is
59 * redone. The cursor is always moved on the affected position.
62 #define SEA_Changes (TAG_USER+15)
63 /* (IGS) ti_Data contains the number of changes made to the sample.
66 #define SEA_MarkRegion (TAG_USER+16)
67 /* (GS) ti_Data points to a struct Rectangle containing the
68 * limits (tracks and lines) of a pattern sub-region.
69 * When set, this attribute automatically starts range mode.
70 * Passing NULL in ti_Data causes the editor to clear the
71 * marked region. Passing ~0 in ti_Data toggles mark mode.
72 * Getting this attribute returns a copy of the currently
73 * marked region, or {0,0,0,0} if no region is currently
77 #define SEA_Flags (TAG_USER+17)
78 /* (IGSN) See PEF_#? flags definitions below.
81 #define SEA_Instrument (TAG_USER+18)
82 /* (ISGU) ti_Data is a pointer to the Instrument
83 * structure to be displayed by the SampleEditor.
86 #define SEA_MaxUndoLevels (TAG_USER+19)
87 /* (IS) ti_Data is the maximum size of the undo buffer in number
88 * of slots. 0 disables undo feature. Defaults to 8.
91 #define SEA_MaxUndoMem (TAG_USER+20)
92 /* (IS) ti_Data is the maximum memory used by the undo buffers.
93 * Setting it to 0 means unlimited memory. Defaults to 32768 bytes.
96 #define SEA_BackgroundPen (TAG_USER+21)
97 #define SEA_LinePen (TAG_USER+22)
98 #define SEA_FillPen (TAG_USER+23)
99 #define SEA_GridPen (TAG_USER+24)
100 /* (IS) Pens to be used to render the various editor elements.
101 * SEA_TextPen must be a power of two (1, 2, 4, 8...) because
102 * the text is rendered on one bitplane only. SEA_LinesPen
103 * and SEA_TinyLinesPen must not have the SEA_TextPen bit
104 * set because text scrolling happens on the text bitplane only
105 * and must not disturb the other elements. The defaults are
106 * 1 for SEA_TextPen and 2 for both SEA_LinesPen and
112 /* Definitions for SEA_Flags attribute */
114 #define SEF_MARKING (1<<0) /* Range mode */
115 #define SEF_LOGMODE (1<<1) /* Logaritmic mode on */
116 #define SEF_DOGRID (1<<2) /* Show superimposed grid */
118 /* Private flags - Not settable by application */
119 #define SEF_SCROLLING (1<<30) /* View is scrolling (read only) */
120 #define SEF_DRAGGING (1<<31) /* Cursor drag mode (read only) */
123 #endif /* SAMPEDITCLASS_H */