/* okay kids.. this is the main part of the module */ #include #include #include #include "pslaveconf.h" #include "pslaveconf.m" #include "ps_confset.cc" #include "ps_portset.cc" /* shows and manage the main menu */ /* when it returns the module is supposed to quit */ void manage_mainmenu(void) { MENU_STATUS my_button=MENU_STATUS(0); int my_selection=0; DIALOG_MENU dia_mymenu; dia_mymenu.new_menuitem("", "", MSG_U(M_SETTINGS_DEFAULTS, "Configuration for Settings and Defaults")); dia_mymenu.new_menuitem("", "", MSG_U(M_NODES_CONFIG, "Nodes' configuration")); while(1){ my_button=dia_mymenu.editmenu(MSG_U(T_PORTSLAVE_CONFIGURATOR, "Portslave configurator"), "", help_nil, my_selection, MENUBUT_QUIT); if((my_button==MENU_QUIT)||(my_button==MENU_ESCAPE)) return; switch(my_selection){ case 0: manage_configuration_settings(); break; case 1: manage_ports_settings(); break; } } } /* this part if so complex i'm afraid some people won't be able to understand */ void lets_go(void) { manage_mainmenu(); }