CARDS 2.3.99
Package manager for the NuTyX GNU/Linux distribution
mainWindow.h
1 /*
2  * mainWindow.h
3  *
4  * Copyright 2017 Gianni Peschiutta <artemia@nutyx.org>
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19  * MA 02110-1301, USA.
20  *
21  *
22  */
23 
24 #ifndef MAINWINDOW_H
25 #define MAINWINDOW_H
26 
27 //Global Includes
28 #include <FL/Fl.H>
29 #include <FL/Fl_Double_Window.H>
30 #include <FL/fl_ask.H>
31 #include <FL/Fl_Input.H>
32 #include <FL/Fl_Menu_Bar.H>
33 #include <FL/Fl_Table.H>
34 #include <FL/Fl_Text_Display.H>
35 #include <FL/Fl_Multiline_Output.H>
36 #include <FL/Fl_Button.H>
37 #include <string>
38 #include <vector>
39 
40 //Project Includes
41 #include "pixmaps/flcards.xpm"
42 #include "tableau.h"
43 #include "cards_wrapper.h"
44 
45 using namespace std;
46 
57 class mainWindow : public Fl_Window, public Cards_event_handler
58 {
59 public:
66  mainWindow(int W, int H, string Title);
67 
68  virtual ~mainWindow();
69 
70 protected:
71 //Widgets callbacks
72 static void SyncButton_CB(Fl_Widget*,void* pInstance);
73 static void ApplyButton_CB(Fl_Widget*,void* pInstance);
74 static void SearchInput_CB(Fl_Widget*,void* pInstance);
75 static void OnExit_CB(Fl_Widget*,void* pInstance);
76 
77 //Cards Wrapper virtual events callabacks overrides
78  void OnLogMessage(const string& pMessage);
79  void OnSyncFinished(const CEH_RC rc);
80  void OnJobListChange(const CEH_RC rc);
81 
82 private:
83  Tableau* _tab;
84  Fl_Input* _search;
85  Fl_Text_Display* _console;
86  Fl_Text_Buffer * _tbuff;
87  Fl_Button* _btnSync;
88  Fl_Button* _btnApply;
89  Cards_wrapper* _cards;
90 };
91 
92 #endif // MAINWINDOW_H
GUI interfacing wrapper for CARDS.
Definition: cards_wrapper.h:47
widget to manage cards package list
Definition: tableau.h:74
Abstract class to handle event from cards_wrapper.
Definition: cards_event_handler.h:51
FTLTK Main window of application.
Definition: mainWindow.h:57