Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 16 additions & 15 deletions Info.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,22 @@

#define VERSION "1.0.4"
#define APPNAME "ServiceControl"
#define ABOUT_INFO "\n\
" APPNAME " " VERSION " \n\
\n\
Navigation keys: \n\
Up - move cursor up | Down - move cursor down \n\
right - move cursor right | left - move cursor left \n\
PgUp - move page up | PgDown - move page down \n\
/ - for search | ? - for this help \n\
Action keys: \n\
Space - anwählen/abwählen | F10 - exit | ESC - Close info/help\n\
F1 - start/stop unit | F2 - reload/update | TAB - switch Menu/ \n\
F3 - enabled unit | F4 - disabled unit | Servicelist/ \n\
F5 - unmasked unit | F6 - masked unit | Search \n\
---------------------------------------------------------------------------\n\
License: GPLv3 (c) Anthony Olszynski \n\
#define HELP_INFO "\n\
" APPNAME " " VERSION " \n\
\n\
Navigation keys: \n\
← ↓ ↑ → - move cursor into Menu Service List and Search field. \n\
PgUp / PgDown - move page up and down. \n\
Pos1 / End - jump from first to last \n\
? - Show this help. \n\
Action keys: \n\
Space - anwählen/abwählen | F10 - exit \n\
F1 - start/stop unit | ESC - Close Subwins info/help \n\
F3 - enabled/disable unit | TAB - switch Menu/ \n\
F5 - mask/unmasked unit | Servicelist/ \n\
F2 - reload/update | Search \n\
-------------------------------------------------------------------------\n\
License: GPLv3 (c) Anthony Olszynski \n\
"

#endif //_INFO_H
567 changes: 299 additions & 268 deletions MenuWinClass.cpp

Large diffs are not rendered by default.

32 changes: 17 additions & 15 deletions MenuWinClass.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ using namespace std;

enum WinID { MENUWIN = 0, MAINWIN = 1, INFOWIN = 2, LISTPAD = 3, DESCWIN = 4, TIMEWIN = 5, ENDWIN = 6 };
enum MenuID { DATEIMENU = 0, DAEMONMENU = 1, SYSTEMCTLMENU = 2, INFOMENU = 3, MAINMENU = 4, ENDMENU = 5 };
enum TabID { MainTab1 = 1, MainTab2 = 2, MainTab3 = 3 };

struct FENSTER {
int FEID {0};
Expand Down Expand Up @@ -41,6 +42,8 @@ struct FENSTER {
int WCXtime() {return static_cast<int>(roundf(20));};
WinID TimeWinID {TIMEWIN};
WINDOW *TimeWin = newwin(HRYtime(), WCXtime(), 0, (WCX() - 20));
WINDOW *TMPWIN; /* Temporäres Window, zwischen speicher */
TabID TabKeyHist[4] {MainTab3,MainTab1,MainTab2,MainTab3}; /*1. before 2. in use 3. next 4. after next*/
int TMPWinHigh {0};
FORM *TMPForm1 {nullptr};
FIELD **TMPField1 {nullptr};
Expand Down Expand Up @@ -122,6 +125,8 @@ struct HAUPTMENU {
string HMName;
MENU *HMMenu {nullptr};
ITEM **HMItem {nullptr};
MENU *TMPMENU; /* Temporärer Menu zwischen speicher */
int MeInAl {0};
//###############################################
struct UNTERMENU {
int UMID;
Expand Down Expand Up @@ -151,29 +156,27 @@ struct HAUPTMENU {
}
};
struct INAPPMENU {
friend class MenuWinClass;
int LMID;
std::string LMName;
MENU* LMenu {nullptr};
int LMID;
string LMName;
MENU* LMenu {nullptr};
ITEM** LMItem {nullptr};
string AktivName = "";

friend class MenuWinClass;
};

class MenuWinClass: public INAPPMENU {
class MenuWinClass {
public:
/*################################################*/
static FENSTER START;
static HAUPTMENU TOPMENU;
static int MeInAl;
static WINDOW *TMPWIN;
static MENU *TMPMENU;
static INAPPMENU SERVICEMENU;
static int LiMeInAl;
static WINDOW* LiTMPWIN;
static MENU* LiTMPMENU;
static string PATTERN;
static int TabKey;// {1};
static TabID TabKey; // {1};
//############################
static const int SucheStartWCX = 33;
char SearchChar[BUFSIZ];
string SearchPattern;
string Dummy;
static int MenuStart(int Key);
/*#############_WINDOW_###########################*/
static void StartWin();
static void StopWin();
Expand All @@ -193,7 +196,6 @@ class MenuWinClass: public INAPPMENU {
static WINDOW* TempWin(string Name, MenuID MID);
static void StartMenuAuswahl(string wahl);
static void RefreshWindows();
static int MenuStart(int Key);
/*#############_Constructor/De_###################*/
MenuWinClass();
~MenuWinClass();
Expand Down
Loading