00001 /* 00002 * Sudoku: A plug-in for the Video Disk Recorder 00003 * 00004 * Copyright (C) 2005-2010, Thomas Günther <tom@toms-cafe.de> 00005 * 00006 * This program is free software; you can redistribute it and/or modify 00007 * it under the terms of the GNU General Public License as published by 00008 * the Free Software Foundation; either version 2 of the License, or 00009 * (at your option) any later version. 00010 * 00011 * This program is distributed in the hope that it will be useful, 00012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00014 * GNU General Public License for more details. 00015 * 00016 * You should have received a copy of the GNU General Public License along 00017 * with this program; if not, write to the Free Software Foundation, Inc., 00018 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 00019 */ 00020 00021 #ifndef VDR_SUDOKU_SETUP_H 00022 #define VDR_SUDOKU_SETUP_H 00023 00024 #include "sudoku.h" 00025 #include <vdr/config.h> 00026 #include <vdr/menuitems.h> 00027 #include <vdr/font.h> 00028 00029 00030 namespace SudokuPlugin 00031 { 00032 00033 //--- class SudokuPlugin::SetupData ------------------------------------------ 00034 00035 /** Setup parameters of the plugin */ 00036 class SetupData 00037 { 00038 public: 00039 int givens_count; 00040 int symmetric; 00041 int mark_errors; 00042 int mark_ambiguous; 00043 int show_possibles_pattern; 00044 int show_possibles_digits; 00045 int clear_marks; 00046 int key_red; 00047 int key_green; 00048 int key_yellow; 00049 char maxi_font[MAXFONTNAME]; 00050 int maxi_font_height; 00051 int maxi_font_width; 00052 char mini_font[MAXFONTNAME]; 00053 int mini_font_height; 00054 int mini_font_width; 00055 int transparency; 00056 00057 /** Constructor */ 00058 SetupData(); 00059 00060 /** Parse the setup parameters of the plugin. */ 00061 bool parse(const char* name, const char* value); 00062 }; 00063 00064 00065 //--- class SudokuPlugin::SetupPage ------------------------------------------ 00066 00067 /** Setup menu page to adjust the setup parameters of the plugin */ 00068 class SetupPage : public cMenuSetupPage 00069 { 00070 SetupData& setup; 00071 SetupData data; 00072 cStringList maxi_font_names, mini_font_names; 00073 int maxi_font_index, mini_font_index; 00074 00075 public: 00076 00077 /** Constructor */ 00078 SetupPage(SetupData& setup); 00079 00080 protected: 00081 00082 /** Store the setup parameters of the plugin. */ 00083 virtual void Store(); 00084 }; 00085 00086 } // namespace SudokuPlugin 00087 00088 #endif // VDR_SUDOKU_SETUP_H