%
% anyremote configuration file for  customization of GUI of Java client. (Server-mode)
%

% STATUS stable
% XTEST no
% SOUND no
% ENV no

GuiAppName=List example
GuiAppType=Example
GuiAppBinary=true
GuiAppProtocols=Server
GuiAppDesc=Example of anyRemote Android/J2ME clients list screen customization.

[Protocol]=Server

(Init)=Include($(CfgDir)/Utils/aliases-server.cfg);

%	Make(var,FromEncoding,by_value,WINDOWS-1251);
	
(Connect)=\
	Set(parameter,debug,on);\
	Set(status,);\
	Set(title,Use menu or buttons);\
	Set(icons,List Example,\
		1,fit,2,fit,3,fit,\
		4,fit,5,fit,6,fit,\
		7,fit,8,fit,9,fit,\
		*,question,0,fit,#,fit);\
	Macro(SET_MENU);

* *=Set(text,replace,Help,1 List add items\n2 List replace items\n3 List clear\n4 Small font\n5 Medium font\n6 Large font\n7 White On Black\n8 Yellow On Blue\n9 Black On White)

%SET_MENU=Set(menu,replace,Add items,Replace items,Clear items,Small font,Medium font,Large font,White On Black, Yellow On Blue, Black On White);
SET_MENU=Set(menu,replace,Add items,Replace items,Clear items,Small font,Medium font);
%SET_MENU=Set(menu,replace,Add items,Replace items,Clear items);

Back($$)  =Set(list,close);Macro(SET_MENU);
Select($$)=Set(list,close);Macro(SET_MENU);
Back      =Set(text,close);Macro(SET_MENU);
Push($$)  =Set(list,close);Set(status,$(Index) - $(Param));Macro(SET_MENU);

%1=ExecAndSet(list,add,Example,cat $HOME/win1251-txt.txt);
1=Macro(Add items)
2=Macro(Replace items)
3=Macro(Clear items)
4=Macro(Small font)
5=Macro(Medium font)
6=Macro(Large font)
7=Macro(White On Black)
8=Macro(Yellow On Blue)
9=Macro(Black On White)

% Handlers of menu of  "button-screen" 
Add items     =Set(list,add,Example,Item 1,Item 2,Item 3);Macro(SET_MENU);
Replace items =Set(list,replace,Example,Item1,Item2,Item3);Macro(SET_MENU);
Clear items   =Set(list,clear);Macro(SET_MENU);
Small font    =Set(list,font,small);Set(list,show);Macro(SET_MENU);
Medium font   =Set(list,font,medium);Set(list,show);Macro(SET_MENU);
Large font    =Set(list,font,large);Set(list,show);Macro(SET_MENU);
White On Black=Set(list,bg,0,0,0);Set(list,fg,255,255,255);Set(list,show);Macro(SET_MENU);
Black On White=Set(list,bg,255,255,255);Set(list,fg,0,0,0);Set(list,show);Macro(SET_MENU);
Yellow On Blue=Set(list,bg,0,128,255);Set(list,fg,255,255,0);Set(list,show);Macro(SET_MENU);

% Handlers of menu of "list-screen"
Add items($$)=\
	Exec(echo "Add items($(Index),$(Param))");\
	Set(list,add,Example,Item1,Item2,Item3);
Replace items($$)=\
	Exec(echo "Replace items($(Index),$(Param))");\
	Set(list,replace,Example,Item1,Item2,Item3);
Clear items($$)=\
	Exec(echo "Clear items($(Index),$(Param))");\
	Set(list,clear);
	
Small font($$)    =Set(list,font,small);
Medium font($$)   =Set(list,font,medium);
Large font($$)    =Set(list,font,large)
White On Black($$)=Set(list,bg,0,0,0);Set(list,fg,255,255,255);
Black On White($$)=Set(list,bg,255,255,255);Set(list,fg,0,0,0);
Yellow On Blue($$)=Set(list,bg,0,128,255);Set(list,fg,255,255,0);

[End]
