7 * (C) Copyright 1998 Manuel Lemos.
8 * (C) Copyright 1996-1997 Ian J. Einman.
9 * (C) Copyright 1993-1996 Jaba Development.
10 * (C) Copyright 1993-1996 Jan van den Baard.
11 * All Rights Reserved.
14 * Revision 42.3 2004/06/16 20:16:48 verhaegs
15 * Use METHODPROTO, METHOD_END and REGFUNCPROTOn where needed.
17 * Revision 42.2 2000/05/15 19:27:02 stegerg
18 * another hundreds of REG() macro replacements in func headers/protos.
20 * Revision 42.1 2000/05/14 23:32:48 stegerg
21 * changed over 200 function headers which all use register
22 * parameters (oh boy ...), because the simple REG() macro
23 * doesn't work with AROS. And there are still hundreds
24 * of headers left to be fixed :(
26 * Many of these functions would also work with stack
27 * params, but since i have fixed every single one
28 * I encountered up to now, I guess will have to do
29 * the same for the rest.
31 * Revision 42.0 2000/05/09 22:10:23 mlemos
32 * Bumped to revision 42.0 before handing BGUI to AROS team
34 * Revision 41.11 2000/05/09 19:55:14 mlemos
35 * Merged with the branch Manuel_Lemos_fixes.
37 * Revision 41.10.2.2 1999/08/05 01:40:28 mlemos
38 * Added Jilles Tjoelker fix to assure that OM_GET always get a STRING_LongVal
39 * value within the integer range limits.
41 * Revision 41.10.2.1 1998/07/05 19:27:59 mlemos
42 * Made calls to RectFill be made to safe RectFill instead.
44 * Revision 41.10 1998/02/25 21:13:15 mlemos
47 * Revision 1.1 1998/02/25 17:09:52 mlemos
53 /// Class definitions.
55 #include "include/classdefs.h"
58 * Object instance data.
61 Object
*sd_StrGad
; /* strgclass object */
62 UBYTE
*sd_TextContents
; /* contents of the string gadget */
63 LONG sd_IntegerContents
; /* contents of the integer gadget */
64 LONG sd_IntegerMin
; /* minimum integer contents */
65 LONG sd_IntegerMax
; /* maximum integer contents */
66 struct TextFont
*sd_Font
; /* string gadget font */
67 ULONG sd_Pens
; /* Copy of user-pens. */
68 ULONG sd_Active
; /* " " " " */
69 ULONG sd_MinChars
; /* Min # of chars visible. */
70 UBYTE
*sd_Buffer
; /* BGUI allocated buffers */
71 UBYTE
*sd_UndoBuffer
; /* " " " */
72 UBYTE
*sd_WorkBuffer
; /* " " " */
73 UWORD sd_Flags
; /* See below */
77 struct RastPort
*sd_T_Buffer
;
78 struct Window
*sd_T_Window
;
81 #define SDF_STRINGACTIVE (1<<0) /* The strgclass object is active */
87 * Obtain the LongVal and TextVal
88 * values from the strgclass object.
90 STATIC ASM VOID
GetValues(REG(a0
) SD
*sd
)
93 Get_Attr(sd
->sd_StrGad
, STRINGA_TextVal
, (IPTR
*)&sd
->sd_TextContents
);
94 Get_Attr(sd
->sd_StrGad
, STRINGA_LongVal
, &tmp
);
95 sd
->sd_IntegerContents
= (LONG
)tmp
;
101 STATIC
METHOD(StringClassDispose
, Msg
, msg
)
103 SD
*sd
= INST_DATA(cl
, obj
);
106 * Dispose of the strgadget.
108 DisposeObject(sd
->sd_StrGad
);
113 if (sd
->sd_Buffer
) BGUI_FreePoolMem(sd
->sd_Buffer
);
114 if (sd
->sd_UndoBuffer
) BGUI_FreePoolMem(sd
->sd_UndoBuffer
);
115 if (sd
->sd_WorkBuffer
) BGUI_FreePoolMem(sd
->sd_WorkBuffer
);
118 * The rest is for the superclass.
120 return AsmDoSuperMethodA(cl
, obj
, msg
);
125 * Allocate buffers. (Only when maxchars > 128)
127 STATIC ASM BOOL
StringClassBuffers( REG(a0
) SD
*sd
, REG(a1
) struct TagItem
*tags
, REG(d0
) ULONG max
)
130 * We only allocate buffer when:
132 * A) The maximum amount of characters exceeds
134 * B) The user did not supply his/her own
137 if ( ! FindTagItem( STRINGA_Buffer
, tags
)) {
138 if ( ! ( sd
->sd_Buffer
= ( UBYTE
* )BGUI_AllocPoolMem( max
)))
141 if ( ! FindTagItem( STRINGA_UndoBuffer
, tags
)) {
142 if ( ! ( sd
->sd_UndoBuffer
= ( UBYTE
* )BGUI_AllocPoolMem( max
)))
145 if ( ! FindTagItem( STRINGA_WorkBuffer
, tags
)) {
146 if ( ! ( sd
->sd_WorkBuffer
= ( UBYTE
* )BGUI_AllocPoolMem( max
)))
153 * Create a shiny new object.
155 STATIC
METHOD(StringClassNew
, struct opSet
*, ops
)
158 struct TagItem
*tag
, *tags
;
161 tags
= DefTagList(BGUI_STRING_GADGET
, ops
->ops_AttrList
);
164 * First we let the superclass
167 if ((rc
= NewSuperObject(cl
, obj
, tags
)))
169 sd
= INST_DATA(cl
, rc
);
172 * Force activation flags.
174 GADGET(rc
)->Activation
|= GACT_RELVERIFY
;
179 sd
->sd_IntegerMin
= GetTagData(STRINGA_IntegerMin
, 0xEFFFFFFF, tags
);
180 sd
->sd_IntegerMax
= GetTagData(STRINGA_IntegerMax
, 0x0FFFFFFF, tags
);
183 * We take care of the GA_Disabled attribute
184 * so we don't let the strgclass see it.
186 if ((tag
= FindTagItem(GA_Disabled
, tags
)))
187 tag
->ti_Tag
= TAG_IGNORE
;
190 * Handle NULL-STRINGA_TextVal.
192 if ((tag
= FindTagItem(STRINGA_TextVal
, tags
)))
195 tag
->ti_Data
= (IPTR
)"";
197 else if ((tag
= FindTagItem(STRINGA_LongVal
, tags
)))
200 * Clamp the integer value between
203 tag
->ti_Data
= range((LONG
)tag
->ti_Data
, sd
->sd_IntegerMin
, sd
->sd_IntegerMax
);
207 * Work-around for STRINGA_MaxChars.
209 if ((tag
= FindTagItem(STRINGA_MaxChars
, tags
)))
213 * See if we need to allocate the
216 if (tag
->ti_Data
> 128)
218 if (!StringClassBuffers(sd
, tags
, tag
->ti_Data
))
224 * Create a strgclass object.
226 if ((sd
->sd_StrGad
= NewObject( NULL
, StrGClass
,
227 sd
->sd_Buffer
? STRINGA_Buffer
: TAG_IGNORE
, sd
->sd_Buffer
,
228 sd
->sd_UndoBuffer
? STRINGA_UndoBuffer
: TAG_IGNORE
, sd
->sd_UndoBuffer
,
229 sd
->sd_WorkBuffer
? STRINGA_WorkBuffer
: TAG_IGNORE
, sd
->sd_WorkBuffer
,
235 if ((tag
= FindTagItem(STRINGA_Pens
, tags
))) sd
->sd_Pens
= tag
->ti_Data
;
236 if ((tag
= FindTagItem(STRINGA_ActivePens
, tags
))) sd
->sd_Active
= tag
->ti_Data
;
239 * Obtain LongVal and TextVal values.
244 * Get the minimum number of chars always visible.
246 sd
->sd_MinChars
= GetTagData(STRINGA_MinCharsVisible
, 2, tags
);
247 if (sd
->sd_MinChars
< 2) sd
->sd_MinChars
= 2;
252 AsmCoerceMethod(cl
, (Object
*)rc
, OM_DISPOSE
);
263 * Change the object attributes.
265 STATIC
METHOD(StringClassSetUpdate
, struct opUpdate
*, opu
)
267 SD
*sd
= INST_DATA(cl
, obj
);
268 struct TagItem
*clones
, *tag
;
269 WORD dis
= GADGET( obj
)->Flags
& GFLG_DISABLED
, gv
= 0;
272 //BC *bc = BASE_DATA(obj);
273 struct GadgetInfo
*gi
= opu
->opu_GInfo
;
276 * First we let the superclass
277 * change what it can.
279 AsmDoSuperMethodA(cl
, obj
, (Msg
)opu
);
284 if ((clones
= CloneTagItems(opu
->opu_AttrList
)))
289 sd
->sd_IntegerMin
= GetTagData(STRINGA_IntegerMin
, sd
->sd_IntegerMin
, clones
);
290 sd
->sd_IntegerMax
= GetTagData(STRINGA_IntegerMax
, sd
->sd_IntegerMax
, clones
);
292 * Handle NULL-STRINGA_TextVal.
294 if ((tag
= FindTagItem(STRINGA_TextVal
, clones
)))
296 if (!tag
->ti_Data
) tag
->ti_Data
= (IPTR
)"";
299 else if ((tag
= FindTagItem(STRINGA_LongVal
, clones
)))
302 * Clamp value between min and max.
304 tag
->ti_Data
= range((LONG
)tag
->ti_Data
, sd
->sd_IntegerMin
, sd
->sd_IntegerMax
);
309 * We handle GA_Disabled.
311 if ((tag
= FindTagItem(GA_Disabled
, clones
)))
312 tag
->ti_Tag
= TAG_IGNORE
;
315 if (tag = FindTagItem(GA_Left, clones)) tag->ti_Data += bc->bc_InnerBox.Left - bc->bc_OuterBox.Left;
316 if (tag = FindTagItem(GA_Top, clones)) tag->ti_Data += bc->bc_InnerBox.Top - bc->bc_OuterBox.Top;
317 if (tag = FindTagItem(GA_Width, clones)) tag->ti_Data += bc->bc_InnerBox.Width - bc->bc_OuterBox.Width;
318 if (tag = FindTagItem(GA_Height, clones)) tag->ti_Data += bc->bc_InnerBox.Height - bc->bc_OuterBox.Height;
322 * Rendering inhibited?
324 Get_SuperAttr(cl
, obj
, BT_Inhibit
, &inhibit
);
327 * Set strgclass attributes.
329 AsmDoMethod(sd
->sd_StrGad
, opu
->MethodID
, clones
, inhibit
? NULL
: gi
, opu
->opu_Flags
);
332 * Force activation flags.
334 GADGET( obj
)->Activation
|= GACT_RELVERIFY
;
337 * Setting a new font? Save it..
339 if (opu
->MethodID
== OM_SET
)
341 if ((tag
= FindTagItem(BT_TextAttr
, clones
)))
343 Get_SuperAttr(cl
, obj
, BT_TextFont
, (IPTR
*)&sd
->sd_Font
);
344 DoSetMethodNG(sd
->sd_StrGad
, STRINGA_Font
, sd
->sd_Font
, TAG_END
);
349 if ((tag
= FindTagItem(STRINGA_Pens
, clones
))) sd
->sd_Pens
= tag
->ti_Data
;
350 if ((tag
= FindTagItem(STRINGA_ActivePens
, clones
))) sd
->sd_Active
= tag
->ti_Data
;
354 * Get the LongVal and TextVal values.
361 if (((GADGET(obj
)->Flags
& GFLG_DISABLED
) != dis
) || gv
)
362 DoRenderMethod(obj
, gi
, GREDRAW_UPDATE
);
365 * When GACT_LONGINT is set we notify
366 * STRINGA_LongVal when it changed. Otherwise
367 * we notify STRINGA_TextVal.
371 if (GADGET(sd
->sd_StrGad
)->Activation
& GACT_LONGINT
)
372 DoNotifyMethod(obj
, gi
, opu
->opu_Flags
, GA_ID
, GADGET(obj
)->GadgetID
, STRINGA_LongVal
, sd
->sd_IntegerContents
, TAG_END
);
374 DoNotifyMethod(obj
, gi
, opu
->opu_Flags
, GA_ID
, GADGET(obj
)->GadgetID
, STRINGA_TextVal
, sd
->sd_TextContents
, TAG_END
);
380 FreeTagItems(clones
);
392 METHOD(StringClassGet
, struct opGet
*, opg
)
394 SD
*sd
= INST_DATA(cl
, obj
);
396 IPTR
*store
= opg
->opg_Storage
;
398 switch (opg
->opg_AttrID
)
400 case STRINGA_StringInfo
:
402 * Give 'm the pointer to the
403 * StringInfo structure.
405 STORE
GADGET( sd
->sd_StrGad
)->SpecialInfo
;
410 * First we try the strgclass object.
412 rc
= AsmDoMethodA(sd
->sd_StrGad
, (Msg
)opg
);
415 * Then the superclass.
417 if (!rc
) rc
= AsmDoSuperMethodA(cl
, obj
, (Msg
)opg
);
420 * Clamp the integer value between min and max
421 * Use: if the program does GetAttr() when the user has typed a
422 * value but did not press return, or if the strgclass OM_GET failed
425 if (opg
->opg_AttrID
== STRINGA_LongVal
) {
426 *(opg
->opg_Storage
) = range(*(opg
->opg_Storage
), sd
->sd_IntegerMin
, sd
->sd_IntegerMax
);
438 METHOD(StringClassRender
, struct bmRender
*, bmr
)
440 SD
*sd
= INST_DATA(cl
, obj
);
441 BC
*bc
= BASE_DATA(obj
);
442 struct BaseInfo
*bi
= bmr
->bmr_BInfo
;
446 * First the superclass.
448 AsmDoSuperMethodA(cl
, obj
, (Msg
)bmr
);
451 * Setup default pens.
453 mypens
= PACKPENS(bi
->bi_Pens
[TEXTPEN
], bi
->bi_Pens
[BACKGROUNDPEN
]);
456 * Setup string object size and pens.
458 *GADGETBOX(sd
->sd_StrGad
) = bc
->bc_InnerBox
;
460 DoSetMethodNG(sd
->sd_StrGad
, STRINGA_Pens
, sd
->sd_Pens
? sd
->sd_Pens
: mypens
,
461 STRINGA_ActivePens
, sd
->sd_Active
? sd
->sd_Active
: mypens
,
465 * Let the strgclass render itself.
468 rc
= AsmDoMethod(sd
->sd_StrGad
, GM_RENDER
, bi
, bi
->bi_RPort
, GREDRAW_REDRAW
);
471 * Disable the gadget when necessary.
473 if (GADGET(obj
)->Flags
& GFLG_DISABLED
) BDisableBox(bi
, &bc
->bc_InnerBox
);
481 * Did they click in the strgclass object?
483 METHOD(StringClassHitTest
, struct gpHitTest
*, gph
)
485 SD
*sd
= INST_DATA(cl
, obj
);
489 * Only when not disabled.
491 if (!(GADGET(obj
)->Flags
& GFLG_DISABLED
))
494 * Hit inside the object?
496 if (AsmDoSuperMethodA(cl
, obj
, (Msg
)gph
) == GMR_GADGETHIT
)
499 * Pass on to the strgclass object.
501 rc
= AsmDoMethodA(sd
->sd_StrGad
, (Msg
)gph
);
510 * Go to the active state and/or handle the user input.
512 METHOD(StringClassGoActive
, struct gpInput
*, gpi
)
514 SD
*sd
= INST_DATA(cl
, obj
);
515 BC
*bc
= BASE_DATA(obj
);
516 ULONG rc
= GMR_NOREUSE
;
517 struct GadgetInfo
*gi
;
520 int x
, y
, w
, h
, wx1
, wy1
, wx2
, wy2
;
524 * Only if not disabled.
526 if (!(GADGET(obj
)->Flags
& GFLG_DISABLED
))
531 * Get coordinates of object.
533 Get_Attr(bc
->bc_View
, VIEW_AbsoluteX
, &tmp
);
535 Get_Attr(bc
->bc_View
, VIEW_AbsoluteY
, &tmp
);
541 x
= bc
->bc_OuterBox
.Left
+ x
- 2;
542 y
= bc
->bc_OuterBox
.Top
+ y
- 2;
543 w
= bc
->bc_OuterBox
.Width
+ 4;
544 h
= bc
->bc_OuterBox
.Height
+ 4;
547 * Get bounds of master group.
549 wx1
= win
->BorderLeft
;
550 wy1
= win
->BorderTop
;
551 wx2
= win
->Width
- win
->BorderRight
;
552 wy2
= win
->Height
- win
->BorderBottom
;
555 * Clip to fit in the master group.
557 if (x
< wx1
) x
= wx1
;
558 if (y
< wy1
) y
= wy1
;
560 if ((x
+ w
) > wx2
) x
-= (x
+ w
) - wx2
;
561 if ((y
+ h
) > wy2
) y
-= (y
+ h
) - wy2
;
563 if (x
< wx1
) { x
= wx1
; w
= wx2
- wx1
; };
564 if (y
< wy1
) { y
= wy1
; h
= wy2
- wy1
; };
566 if ((rp
= BGUI_ObtainGIRPort(gi
)))
568 if (!(sd
->sd_T_Buffer
= BGUI_CreateRPortBitMap(rp
, w
, h
, FGetDepth(rp
))))
577 sd
->sd_T_X
= (x
+ 2) - bc
->bc_OuterBox
.Left
;
578 sd
->sd_T_Y
= (y
+ 2) - bc
->bc_OuterBox
.Top
;
579 sd
->sd_T_W
= (w
- 4) - bc
->bc_OuterBox
.Width
;
580 sd
->sd_T_H
= (h
- 4) - bc
->bc_OuterBox
.Height
;
582 sd
->sd_T_Window
= win
;
583 sd
->sd_T_View
= bc
->bc_View
;
587 * Save area to buffer.
589 ClipBlit(rp
, x
, y
, sd
->sd_T_Buffer
, 0, 0, w
, h
, 0xC0);
591 AsmDoMethod(obj
, BASE_MOVEBOUNDS
, sd
->sd_T_X
, sd
->sd_T_Y
, sd
->sd_T_W
, sd
->sd_T_H
, TAG_DONE
);
594 * Clear the area and render the object.
597 SRectFill(rp
, x
, y
, x
+ w
- 1, y
+ h
- 1);
598 AsmDoMethod(obj
, GM_RENDER
, gi
, rp
, GREDRAW_REDRAW
);
605 * Let the superclass have a go...
607 AsmDoSuperMethodA(cl
, obj
, (Msg
)gpi
);
612 if ((rc
= AsmDoMethodA(sd
->sd_StrGad
, (Msg
)gpi
)) == GMR_MEACTIVE
)
616 sd
->sd_Flags
|= SDF_STRINGACTIVE
;
625 * Handle the user input.
627 METHOD(StringClassHandleInput
, struct gpInput
*, gpi
)
629 SD
*sd
= INST_DATA(cl
, obj
);
632 struct GadgetInfo
*gi
= gpi
->gpi_GInfo
;
636 * Pass on the message.
638 rc
= AsmDoMethodA(sd
->sd_StrGad
, (Msg
)gpi
);
641 * RETURN or TAB or SHIFT TAB?
648 * Check if the entered value of an integer object is in range and,
649 * if not, adjust it and don't go inactive.
651 if (GADGET(sd
->sd_StrGad
)->Activation
& GACT_LONGINT
)
656 Get_Attr(sd
->sd_StrGad
, STRINGA_LongVal
, &tmp
);
661 if (val
< sd
->sd_IntegerMin
)
663 val
= sd
->sd_IntegerMin
;
666 else if (val
> sd
->sd_IntegerMax
)
668 val
= sd
->sd_IntegerMax
;
671 if (rc
== GMR_MEACTIVE
)
673 sd
->sd_IntegerContents
= val
;
674 DisplayBeep(gi
->gi_Window
->WScreen
);
675 DoSetMethod(sd
->sd_StrGad
, gi
, STRINGA_LongVal
, val
, TAG_END
);
678 DoNotifyMethod(obj
, gi
, 0, GA_ID
, GADGET(obj
)->GadgetID
, STRINGA_LongVal
, sd
->sd_IntegerContents
, TAG_END
);
680 DoNotifyMethod(obj
, gi
, 0, GA_ID
, GADGET(obj
)->GadgetID
, STRINGA_TextVal
, sd
->sd_TextContents
, TAG_END
);
685 if (rc
& GMR_NEXTACTIVE
)
688 * Tell the window we're in
689 * to activate the previous
690 * GA_TabCycle object.
692 DoNotifyMethod(obj
, gi
, 0, GA_ID
, GADGET(obj
)->GadgetID
, STRINGA_Tabbed
, obj
, TAG_END
);
694 * We handle this ourselves.
696 rc
&= ~GMR_NEXTACTIVE
;
698 else if (rc
& GMR_PREVACTIVE
)
701 * Tell the window we're in
702 * to activate the next
703 * GA_TabCycle object.
705 DoNotifyMethod(obj
, gi
, 0, GA_ID
, GADGET(obj
)->GadgetID
, STRINGA_ShiftTabbed
, obj
, TAG_END
);
707 * We handle this ourselves.
709 rc
&= ~GMR_PREVACTIVE
;
720 METHOD(StringClassGoInActive
, struct gpGoInactive
*, gpi
)
722 SD
*sd
= INST_DATA(cl
, obj
);
723 BC
*bc
= BASE_DATA(obj
);
728 * Pass on to the string object
731 if (sd
->sd_Flags
& SDF_STRINGACTIVE
)
733 AsmDoMethodA(sd
->sd_StrGad
, (Msg
)gpi
);
735 * Were not active nomore.
737 sd
->sd_Flags
&= ~SDF_STRINGACTIVE
;
742 bc
->bc_View
= sd
->sd_T_View
;
743 sd
->sd_T_View
= NULL
;
745 x
= bc
->bc_OuterBox
.Left
- 2;
746 y
= bc
->bc_OuterBox
.Top
- 2;
747 w
= bc
->bc_OuterBox
.Width
+ 4;
748 h
= bc
->bc_OuterBox
.Height
+ 4;
750 AsmDoMethod(obj
, BASE_MOVEBOUNDS
, -sd
->sd_T_X
, -sd
->sd_T_Y
, -sd
->sd_T_W
, -sd
->sd_T_H
, TAG_DONE
);
752 ClipBlit(sd
->sd_T_Buffer
, 0, 0, sd
->sd_T_Window
->RPort
, x
, y
, w
, h
, 0xC0);
753 BGUI_DoGadgetMethod(obj
, sd
->sd_T_Window
, NULL
, GM_RENDER
, NULL
, sd
->sd_T_Window
->RPort
, GREDRAW_REDRAW
);
754 BGUI_FreeRPortBitMap(sd
->sd_T_Buffer
);
757 return AsmDoSuperMethodA(cl
, obj
, (Msg
)gpi
);
763 * The object size is requested.
765 METHOD(StringClassDimensions
, struct bmDimensions
*, bmd
)
767 SD
*sd
= INST_DATA(cl
, obj
);
768 struct BaseInfo
*bi
= bmd
->bmd_BInfo
;
771 if (sd
->sd_Font
) BSetFont(bi
, sd
->sd_Font
);
774 * We must make sure that at least sd_MinChars
775 * characters will fit.
777 tlen
= TextWidth(bi
->bi_RPort
, "M");
782 return CalcDimensions(cl
, obj
, bmd
, tlen
* sd
->sd_MinChars
+ (tlen
>> 1), bi
->bi_RPort
->TxHeight
);
788 * Keyboard activation.
790 METHOD(StringClassKeyActive
, struct wmKeyInput
*, wmki
)
793 * Let intuition do it.
795 return WMKF_ACTIVATE
;
801 * Format string to the string object.
803 METHOD(StringClassFString
, struct smFormatString
*, smfs
)
805 SD
*sd
= INST_DATA(cl
, obj
);
810 * Only on string objects.
812 if (!(GADGET(obj
)->Activation
& GACT_LONGINT
))
815 * Allocate string buffer.
817 if ((sb
= (UBYTE
*)BGUI_AllocPoolMem(CompStrlenF(smfs
->smfs_FStr
, (RAWARG
)&smfs
->smfs_Arg1
))))
822 DoSPrintF(sb
, smfs
->smfs_FStr
, (RAWARG
)&smfs
->smfs_Arg1
);
823 DoSetMethod(sd
->sd_StrGad
, smfs
->smfs_GInfo
, STRINGA_TextVal
, sb
, TAG_END
);
827 BGUI_FreePoolMem(sb
);
836 /// Class initialization.
838 * Class function table.
840 STATIC DPFUNC ClassFunc
[] = {
841 { BASE_RENDER
, StringClassRender
, },
842 { BASE_DIMENSIONS
, StringClassDimensions
, },
844 { OM_NEW
, StringClassNew
, },
845 { OM_SET
, StringClassSetUpdate
, },
846 { OM_UPDATE
, StringClassSetUpdate
, },
847 { OM_GET
, StringClassGet
, },
848 { OM_DISPOSE
, StringClassDispose
, },
849 { GM_HITTEST
, StringClassHitTest
, },
850 { GM_GOACTIVE
, StringClassGoActive
, },
851 { GM_HANDLEINPUT
, StringClassHandleInput
, },
852 { GM_GOINACTIVE
, StringClassGoInActive
, },
853 { WM_KEYACTIVE
, StringClassKeyActive
, },
854 { SM_FORMAT_STRING
, StringClassFString
, },
859 * Simple class initialization.
861 makeproto Class
*InitStringClass(void)
863 return BGUI_MakeClass(CLASS_SuperClassBGUI
, BGUI_BASE_GADGET
,
864 CLASS_ObjectSize
, sizeof(SD
),
865 CLASS_DFTable
, ClassFunc
,