OPT PREPROCESS

MODULE 'feelin','libraries/feelin'

#define NoBack FA_Back,FI_None

PROC main()
   DEF c,w

   IF feelinbase := OpenLibrary('feelin.library',NIL)
	  c := ClientObject,
		 Child, w := WindowObject, FA_Window_Title, 'Feelin\a : Frames...', FA_Back,FI_Shine,
			Child, VGroup, NoFrame,
			   Child, HGroup, NoFrame,
				  Child, VGroup, FA_Frame_Title, 'Group 1', ->FA_Back,FI_Shade,
					 Child, area(FV_Frame_None,   FI_Fill, NIL, 'None',   '\ec',NIL),
					 Child, area(FV_Frame_Simple, FI_Fill, NIL, 'Simple', '\ec',NIL),
					 Child, area(FV_Frame_Cadre,  FI_Fill, NIL, 'Cadre',  '\ec',NIL),
					 Child, area(FV_Frame_CadreSmooth,  FI_Fill, NIL, 'Cadre(s)',  '\ec',NIL),
				  End,

				  Child, VGroup, FA_Frame_Title, 'Group 2', ->FA_Back,FI_Shade,
					 Child, area(FV_Frame_Deep,       FI_Fill, NIL, 'Deep',    '\ec',NIL),
					 Child, area(FV_Frame_DeepSmooth, FI_Fill, NIL, 'Deep(s)', '\ec',NIL),
				  End,

				  Child, VGroup, FA_Frame_Title, 'Group 3', ->FA_Back,FI_Shade,
					 Child, area(FV_Frame_Intuition,       FI_Fill, NIL, 'Intuition',    '\ec',NIL),
					 Child, area(FV_Frame_IntuitionSmooth, FI_Fill, NIL, 'Intuition(s)', '\ec',NIL),
					 Child, HBar(2),
					 Child, area(FV_Frame_Xen,             FI_Fill, NIL, 'Xen',          '\ec',NIL),
					 Child, area(FV_Frame_XenSmooth,       FI_Fill, NIL, 'Xen(s)',       '\ec',NIL),
				  End,
			   End,

			   Child, HGroup, NoFrame,
				  Child, VGroup, FA_Frame_Title, 'Group 4', ->FA_Back,FI_Shade,
					 Child, area(FV_Frame_Lotan,  FI_Fill, FI_HalfShadow, 'Lotan',  '\ec',NIL),
					 Child, area(FV_Frame_Melis,  FI_Fill, FI_HalfShadow, 'Melis',  '\ec',NIL),
					 Child, area(FV_Frame_Glow,   FI_Fill, FI_HalfShadow, 'Glow',   '\ec',NIL),
					 Child, HBar(2),
					 Child, area(FV_Frame_Shade,  NIL, NIL, 'Shade',  '\ec',NIL),
				  End,

				  Child, VGroup, FA_Frame_Title, 'Group 5', ->FA_Back,FI_Shade,
					 Child, area(FV_Frame_Feel,  FI_Fill, FI_Dark,  'Feel',  '\ec','\ec\e<1>'),
					 Child, area(FV_Frame_Be,    FI_Fill, FI_Dark,  'Be',    '\ec','\ec\e<1>'),
					 Child, HBar(2),
->                     Child, area(FV_Frame_Black, FI_Dark, FI_Shine, 'Black', '\ec\e<1>','\ec\e<0>'),
					 Child, area(FV_Frame_Black, FI_Fill, FI_Fill, 'Black', '\ec',NIL),
				  End,

				  Child, VGroup, FA_Frame_Title, 'Group 6', ->FA_Back,FI_Shade,
					 Child, area(FV_Frame_Soft,       FI_Fill, NIL, 'Soft',    '\ec',NIL),
					 Child, area(FV_Frame_SoftSmooth, FI_Fill, NIL, 'Soft(s)', '\ec',NIL),
				  End,
			   End,
			End,
		 End,
	  End

	  IF c
		 F_DoA(w,FM_Notify,[FA_Window_CloseRequest,TRUE,FV_Notify_Client,2,FM_Client_ReturnID,FV_Client_Quit])
		 F_Set(w,FA_Window_Open,TRUE)

		 WHILE F_DoA(c,FM_Client_WaitEvent,NIL) <> FV_Client_Quit DO NOP

		 F_DisposeObj(c)
	  ENDIF

	  CloseLibrary(feelinbase)
   ELSE
	  WriteF('Unable to open feelin.library\n')
   ENDIF
ENDPROC
PROC area(frame,back,aback,text,prep,aprep)
   DEF args[30]:ARRAY OF LONG

   MOVE.L   args,-(A7)

   ^args++ := FA_InputMode          ; ^args++ := FV_InputMode_Toggle
   ^args++ := FA_Inner              ; ^args++ := [3,1,3,1]:CHAR
   ^args++ := FA_Frame              ; ^args++ := frame
   ^args++ := FA_Back               ; ^args++ := back
   IF aback
   ^args++ := FA_AltBack            ; ^args++ := aback
   ENDIF
   ^args++ := FA_Text               ; ^args++ := text
   ^args++ := FA_Text_PreParse      ; ^args++ := prep
   IF aprep
   ^args++ := FA_Text_AltPreParse   ; ^args++ := aprep
   ENDIF
   ^args++ := FA_Text_VCenter       ; ^args++ := TRUE

   MOVE.L   (A7)+,args

ENDPROC F_NewObjA(FC_Text,args)
