1 /***************************************************************************
3 BetterString.mcc - A better String gadget MUI Custom Class
4 Copyright (C) 1997-2000 Allan Odgaard
5 Copyright (C) 2005 by BetterString.mcc Open Source Team
7 This library is free software; you can redistribute it and/or
8 modify it under the terms of the GNU Lesser General Public
9 License as published by the Free Software Foundation; either
10 version 2.1 of the License, or (at your option) any later version.
12 This library is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 Lesser General Public License for more details.
17 BetterString class Support Site: http://www.sf.net/projects/bstring-mcc/
21 ***************************************************************************/
23 #ifndef BETTERSTRING_MCC_PRIV_H
24 #define BETTERSTRING_MCC_PRIV_H
26 #include <dos/exall.h>
27 #include <exec/types.h>
28 #include <intuition/classusr.h>
29 #include <libraries/mui.h>
34 #include <mcc_common.h>
35 #include <mcc_debug.h>
37 #include "BetterString_mcc.h"
42 struct ExAllData buffer
;
47 /* Normal stringgadget info */
49 STRPTR Original
; /* Amiga-q (toggle) */
50 STRPTR Undo
; /* Amiga-z (toggle) */
53 Object
*ForwardObject
;
54 Object
*Popup
; /* ctrl-p popup object */
62 /* Various system resources and data */
63 struct MUI_EventHandlerNode ehnode
;
64 struct RastPort rport
;
65 struct Locale
*locale
;
70 Object
*KeyUpFocus
, *KeyDownFocus
;
72 /* Filename completion */
73 struct FNCData
*FNCBuffer
;
78 /* For marking of text */
82 /* For double/triple clicking */
83 ULONG StartSecs
, StartMicros
;
86 /* The hotkey which activates the stringgadget */
90 STRPTR InactiveBackground
;
92 STRPTR ActiveBackground
;
96 ULONG MarkedTextColor
;
97 struct TextFont
*Font
;
100 #define FLG_Secret (1L << 0)
101 #define FLG_AdvanceOnCr (1L << 1)
102 #define FLG_BlockEnabled (1L << 2)
103 #define FLG_Active (1L << 3)
104 #define FLG_Ghosted (1L << 4)
105 #define FLG_Shown (1L << 5)
106 #define FLG_Original (1L << 6)
107 #define FLG_RedoAvailable (1L << 7)
108 #define FLG_StayActive (1L << 8)
109 #define FLG_SetFrame (1L << 9)
110 #define FLG_OwnFont (1L << 10)
111 #define FLG_OwnBackground (1L << 11)
112 #define FLG_NoInput (1L << 12)
113 #define FLG_DragOutside (1L << 13)
116 VOID
PrintString(struct IClass
*, Object
*);
117 ULONG
HandleInput(struct IClass
*, Object
*, struct MUIP_HandleEvent
*);
118 ULONG
ConvertKey(struct IntuiMessage
*);
119 VOID
DeleteBlock(struct InstData
*);
121 LONG
MyTextLength(struct TextFont
*, STRPTR
, LONG
);
122 LONG
MyTextFit(struct TextFont
*, STRPTR
, LONG
, LONG
, LONG
);
124 ULONG
Get(struct IClass
*, Object
*, struct opGet
*);
125 ULONG
Set(struct IClass
*, Object
*, struct opSet
*);
127 APTR
MyAllocPooled(APTR
, ULONG
);
128 VOID
MyFreePooled(APTR
, APTR
);
129 APTR
ExpandPool(APTR
, APTR
, ULONG
);
131 VOID
strcpyback(STRPTR
, STRPTR
);
133 BOOL
Overwrite(STRPTR
, UWORD
, UWORD
, struct InstData
*);
134 BOOL
OverwriteA(STRPTR
, UWORD
, UWORD
, UWORD
, struct InstData
*);
135 BOOL
FileNameComplete(Object
*, BOOL
, struct InstData
*);
136 LONG
FileNameStart(struct MUIP_BetterString_FileNameStart
*msg
);
138 WORD
CmpStrings(REG(a0
, STRPTR
), REG(a1
, STRPTR
));
140 VOID
InitConfig(Object
*, struct InstData
*);
141 VOID
FreeConfig(struct MUI_RenderInfo
*, struct InstData
*);
143 struct BitMap
* SAVEDS ASM
MUIG_AllocBitMap(REG(d0
, LONG
), REG(d1
, LONG
), REG(d2
, LONG
), REG(d3
, LONG flags
), REG(a0
, struct BitMap
*));
144 VOID SAVEDS ASM
MUIG_FreeBitMap(REG(a0
, struct BitMap
*));
146 #endif /* BETTERSTRING_MCC_PRIV_H */