linuxconf Howto/FAQ

Howto index

Some details to know about the HTML mode

The Linuxconf UI toolkit supports Text, Graphical and HTML mode. It is all transparent to the programmer. While the programmer is allowed to use passthrough and tailor his dialogs to take advantage of one specific user interface, in general, the same code behave properly in all mode.

The HTML mode is somewhat special. One has to understand the web and HTTP to better figure out the trickery behind the HTML mode in Linuxconf.

Linuxconf use a programming model called "modal programming" (or sometime called classical programming). This model is illustrate by this sample code

	DIALOG dia;
	SSTRING name,phone;
	dia.newf_str ("Your name",name);
	dia.newf_str ("Your phone",phone);
	int nof=0;
	while (1){
		MENU_STATUS code = dia.edit ("title","",help_nil,nof);
		if (code == MENU_CANCEL || code == MENU_ESCAPE){
		}else if (code == MENU_ACCEPT){
			if (some_validation){
				// process the result
				xconf_error ("Some errors");