/* * Copyright � 2015 Matthieu DUVAL, Rudy DUCHE * * This file is part of RizzleHash. * * RizzleHash is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * RizzleHash is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with RizzleHash. If not, see */ #ifndef RH_GUI_H #define RH_GUI_H #include "RH_Constants.h" #include "CPUID.h" #include #include #include #include #include #include using namespace std; class GUI { public: GUI(); virtual ~GUI(); void displayHeader(); void displayProcessPerfs(string host, string processName, int WordsSeconds, string currentWord); void displayProcessPerfsList(string host, list processName, list WordsSeconds, list curentWord); void displayTotalPerfs(string host,int WordsSeconds); void displayError(string host,string errorCode,string errorMessage); void displayMessage(string host,string message); void displayResult(string value,time_t secondes); void displayCopyright(); void displayShortHelp(); void displayFullHelp(); void displayVersion(); void clearScreen(); //interation avec l'utilisateur int getInputInt(string question); string getInputString(string question); int displayMenuInt(string title,list entryList, string margin); string displayMenuString(string title,list entryList, string margin); private: void setLocale(); list prepareHeader(); string separationLineCreator(string leftBroder, string rightBorder, string separator, int lenGui); string centredLine(string leftBroder, string rightBorder, string offsetChar, int lenGui,string value); string tableLine(string value1, string value2, string offsetChar, int lenMaxValue1); string leftAlignLine(string leftBroder, string rightBorder, string offsetChar, int lenGui,string value); private: time_t guiTime; list headerLines; /*struct time { string day; string hours; string minutes; string seconds; };*/ }; #endif