OPT PREPROCESS

MODULE 'feelin','libraries/feelin'

PROC main()
   DEF c,w,id

   IF feelinbase := OpenLibrary('feelin.library',0)
	  c := ClientObject, FA_Client_Signal,$1000,
		 Child, w := WindowObject, FA_Window_Title, 'Feelin\a', FA_Window_ScreenTitle, 'Feelin\a : Some buttons',
			Child, VGroup, NoFrame, FA_ID,'Root', ->FA_Back,FI_None,
			   Child, VGroup, FA_Frame_Title, 'Poids différents...', FA_ID, 'Grp Weight',
				  Child, HGroup, NoFrame, FA_ID, 'Grp Smpl',
					 Child, SimpleButton('_Lotan'),
					 Child, SimpleButton('_is'),
->                     Child, AreaObject, FA_Back,FI_Shine, FA_Hidden,TRUE, End,
					 Child, SimpleButton('my L_ord'),
				  End,

				  Child, HBar(2),

				  Child, HGroup, NoFrame, FA_Group_RelSizing,TRUE, FA_ID,'Grp Rel',
					 Child, SimpleButton('Lotan'),
					 Child, SimpleButton('is'),
					 Child, SimpleButton('my Lord'),
				  End,

				  Child, HBar(2),

				  Child, HGroup, NoFrame,
					 Child, SimpleButton('Loooooooooootan'),
					 Child, SimpleButton('is'),
					 Child, SimpleButton('my Lord'),
				  End,
			   End,

->               Child, RectangleObject, FA_ID, 'Bar1', FA_FixedHeight,TRUE, FA_Rectangle_Bar,TRUE, FA_Rectangle_BarTitle,'Inputs', End,
->               Child, RectangleObject, FA_ID, 'Bar2', FA_FixedHeight,TRUE, FA_Rectangle_Bar,TRUE, FA_Rectangle_BarTitle,'Very long line name, that is very long indeed', End,

			   Child, HGroup, FA_Frame_Title,'Inputs, very long long so long line', FA_ID, 'Grp Input',
				  Child, button('I_mmediate',FV_InputMode_Immediate),
				  Child, button('_Toggle',FV_InputMode_Toggle),
				  Child, button('Release',FV_InputMode_Release),
			   End,
			End,
		 End,
	  End

	  IF c
		 F_DoA(c,FM_Notify,[FA_Client_Signal, $1000,    FV_Notify_Self,  2,FM_Client_ReturnID,FV_Client_Quit])
		 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
/*
		 REPEAT
			id := F_DoA(c,FM_Client_WaitEvent,NIL)
		 UNTIL (id = FV_Client_Quit) OR (id = $1000)
*/
		 F_DisposeObj(c)
	  ENDIF

	  CloseLibrary(feelinbase)
   ELSE
	  WriteF('Unable to open feelin.library\n')
   ENDIF
ENDPROC

PROC button(name,input)
   RETURN TextObject, FA_ID, name, FA_Text,name, /*FrameXen, FA_Back, FI_Shadow, FA_AltBack, FI_Shine, FA_Inner,[3,1,3,1]:CHAR,*/ ButtonFrame, FA_Back, FI_Back_Button, FA_FixedHeight,TRUE, FA_Text_PreParse,'\ec', FA_InputMode,input, End
ENDPROC
