Only <final/final.h> can now be directly integrated in programs

This commit is contained in:
Markus Gans 2017-10-31 00:41:59 +01:00
parent 686283cb01
commit 3a36ca3dbd
70 changed files with 237 additions and 117 deletions

View File

@ -1,6 +1,7 @@
2017-10-30 Markus Gans <guru.mail@muenster.de> 2017-10-30 Markus Gans <guru.mail@muenster.de>
* Fix scrollview functionality with new inheritance structure * Fix scrollview functionality with new inheritance structure
* Add a standardized close confirmation dialog * Add a standardized close confirmation dialog
* Only <final/final.h> can now be directly integrated in programs
2017-10-29 Markus Gans <guru.mail@muenster.de> 2017-10-29 Markus Gans <guru.mail@muenster.de>
* Adaptation of the inheritance diagrams in the header files * Adaptation of the inheritance diagrams in the header files

View File

@ -26,9 +26,7 @@
#include <map> #include <map>
#include <stack> #include <stack>
#include <final/fapplication.h> #include <final/final.h>
#include <final/fdialog.h>
#include <final/fmessagebox.h>
const lDouble PI = 3.141592653589793238L; const lDouble PI = 3.141592653589793238L;

View File

@ -19,12 +19,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * * along with this program. If not, see <http://www.gnu.org/licenses/>. *
************************************************************************/ ************************************************************************/
#include <final/fapplication.h> #include <final/final.h>
#include <final/fbutton.h>
#include <final/fbuttongroup.h>
#include <final/fdialog.h>
#include <final/fradiobutton.h>
#include <final/ftooltip.h>
// function prototypes // function prototypes
void cb_quit (FWidget*, FWidget::data_ptr); void cb_quit (FWidget*, FWidget::data_ptr);

View File

@ -19,10 +19,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * * along with this program. If not, see <http://www.gnu.org/licenses/>. *
************************************************************************/ ************************************************************************/
#include <final/fapplication.h> #include <final/final.h>
#include <final/fbutton.h>
#include <final/fdialog.h>
#include <final/flabel.h>
// function prototype // function prototype
void cb_quit (FWidget*, FWidget::data_ptr); void cb_quit (FWidget*, FWidget::data_ptr);

View File

@ -19,8 +19,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * * along with this program. If not, see <http://www.gnu.org/licenses/>. *
************************************************************************/ ************************************************************************/
#include <final/fapplication.h> #include <final/final.h>
#include <final/fmessagebox.h>
int main (int argc, char* argv[]) int main (int argc, char* argv[])

View File

@ -19,13 +19,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * * along with this program. If not, see <http://www.gnu.org/licenses/>. *
************************************************************************/ ************************************************************************/
#include <final/fapplication.h> #include <final/final.h>
#include <final/fbutton.h>
#include <final/fbuttongroup.h>
#include <final/fcheckbox.h>
#include <final/fdialog.h>
#include <final/flineedit.h>
#include <final/fradiobutton.h>
// function prototypes // function prototypes
void cb_quit (FWidget*, FWidget::data_ptr); void cb_quit (FWidget*, FWidget::data_ptr);

View File

@ -24,10 +24,7 @@
#include <map> #include <map>
#include <fstream> #include <fstream>
#include <final/fapplication.h> #include <final/final.h>
#include <final/fdialog.h>
#include <final/flistbox.h>
#include <final/fmessagebox.h>
// Global application object // Global application object

View File

@ -24,10 +24,7 @@
#include <string> #include <string>
#include <vector> #include <vector>
#include <final/fapplication.h> #include <final/final.h>
#include <final/fdialog.h>
#include <final/flistview.h>
#include <final/fmessagebox.h>
//---------------------------------------------------------------------- //----------------------------------------------------------------------

View File

@ -19,9 +19,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * * along with this program. If not, see <http://www.gnu.org/licenses/>. *
************************************************************************/ ************************************************************************/
#include <final/fapplication.h> #include <final/final.h>
#include <final/fdialog.h>
#include <final/fmessagebox.h>
//---------------------------------------------------------------------- //----------------------------------------------------------------------

View File

@ -19,15 +19,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * * along with this program. If not, see <http://www.gnu.org/licenses/>. *
************************************************************************/ ************************************************************************/
#include <final/fapplication.h> #include <final/final.h>
#include <final/fcheckmenuitem.h>
#include <final/fdialog.h>
#include <final/flabel.h>
#include <final/fmenubar.h>
#include <final/fmenu.h>
#include <final/fmessagebox.h>
#include <final/fradiomenuitem.h>
#include <final/fstatusbar.h>
//---------------------------------------------------------------------- //----------------------------------------------------------------------

View File

@ -19,10 +19,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * * along with this program. If not, see <http://www.gnu.org/licenses/>. *
************************************************************************/ ************************************************************************/
#include <final/fapplication.h> #include <final/final.h>
#include <final/fdialog.h>
#include <final/flabel.h>
#include <final/fmessagebox.h>
//---------------------------------------------------------------------- //----------------------------------------------------------------------

View File

@ -22,8 +22,7 @@
#include <iomanip> #include <iomanip>
#include <string> #include <string>
#include <final/fapplication.h> #include <final/final.h>
#include <final/fvterm.h>
// global FVTerm object // global FVTerm object
@ -149,27 +148,28 @@ void move (int xold, int yold, int xnew, int ynew)
//---------------------------------------------------------------------- //----------------------------------------------------------------------
int main (int argc, char* argv[]) int main (int argc, char* argv[])
{ {
bool init = true;
int xmax, ymax; int xmax, ymax;
// Create the application object // Create the application object
FApplication app(argc, argv); FApplication TermApp(argc, argv);
// Create a FVTerm object as virtual terminal // Pointer to the global virtual terminal object
terminal = new FVTerm(init); terminal = static_cast<FVTerm*>(&TermApp);
xmax = terminal->getColumnNumber() - 1;
ymax = terminal->getLineNumber() - 1; // Get screen dimension
xmax = TermApp.getColumnNumber() - 1;
ymax = TermApp.getLineNumber() - 1;
FString line(xmax + 1, '-'); FString line(xmax + 1, '-');
// Place the cursor in the upper left corner // Place the cursor in the upper left corner
terminal->setTermXY(0,0); TermApp.setTermXY(0,0);
// Reset all terminal attributes // Reset all terminal attributes
terminal->setNormal(); TermApp.setNormal();
// Clear the screen // Clear the screen
terminal->clearArea(); TermApp.clearArea();
// Show the determined terminal name and text resolution // Show the determined terminal name and text resolution
std::cout << "Terminal: " << terminal->getTermType() << "\r\n"; std::cout << "Terminal: " << TermApp.getTermType() << "\r\n";
std::cout << " Columns: 0.." << xmax << "\r\n"; std::cout << " Columns: 0.." << xmax << "\r\n";
std::cout << " Lines: 0.." << ymax << "\r\n"; std::cout << " Lines: 0.." << ymax << "\r\n";
@ -202,7 +202,7 @@ int main (int argc, char* argv[])
// Show terminal speed and milliseconds for all cursor movement sequence // Show terminal speed and milliseconds for all cursor movement sequence
std::cout << "\r" << line; std::cout << "\r" << line;
terminal->printMoveDurations(); TermApp.printMoveDurations();
// Waiting for keypress // Waiting for keypress
keyPressed(); keyPressed();

View File

@ -19,12 +19,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * * along with this program. If not, see <http://www.gnu.org/licenses/>. *
************************************************************************/ ************************************************************************/
#include <final/fapplication.h> #include <final/final.h>
#include <final/fbutton.h>
#include <final/fdialog.h>
#include <final/flabel.h>
#include <final/fmessagebox.h>
#include <final/fscrollview.h>
//---------------------------------------------------------------------- //----------------------------------------------------------------------

View File

@ -20,7 +20,6 @@
************************************************************************/ ************************************************************************/
#include <langinfo.h> #include <langinfo.h>
#include <term.h>
#include <unistd.h> #include <unistd.h>
#include <clocale> #include <clocale>
@ -28,7 +27,7 @@
#include <string> #include <string>
#include <vector> #include <vector>
#include <final/fstring.h> #include <final/final.h>
int main (int, char**) int main (int, char**)

View File

@ -19,10 +19,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * * along with this program. If not, see <http://www.gnu.org/licenses/>. *
************************************************************************/ ************************************************************************/
#include <final/fapplication.h> #include <final/final.h>
#include <final/fbutton.h>
#include <final/fdialog.h>
#include <final/fmessagebox.h>
//---------------------------------------------------------------------- //----------------------------------------------------------------------
// class AttribDlg // class AttribDlg

View File

@ -23,9 +23,7 @@
#include <iostream> #include <iostream>
#include <string> #include <string>
#include <final/fapplication.h> #include <final/final.h>
#include <final/ftermcap.h>
#include <final/fvterm.h>
// global FVTerm object // global FVTerm object
@ -106,32 +104,31 @@ void tcapString (const std::string& name, const char* cap_str)
//---------------------------------------------------------------------- //----------------------------------------------------------------------
int main (int argc, char* argv[]) int main (int argc, char* argv[])
{ {
bool init = true;
bool disable_alt_screen = true; bool disable_alt_screen = true;
FApplication app (argc, argv, disable_alt_screen); FApplication TermApp (argc, argv, disable_alt_screen);
terminal = new FVTerm(init);
// Pointer to the global virtual terminal object
terminal = static_cast<FVTerm*>(&TermApp);
FTermcap::tcap_map* tcap = 0; FTermcap::tcap_map* tcap = 0;
tcap = FTermcap::getTermcapMap(); tcap = FTermcap::getTermcapMap();
std::cout << "--------\r\nFTermcap\r\n--------\r\n\n"; std::cout << "--------\r\nFTermcap\r\n--------\r\n\n";
std::cout << "Terminal: " << terminal->getTermType() << "\r\n"; std::cout << "Terminal: " << TermApp.getTermType() << "\r\n";
#if DEBUG #if DEBUG
std::cout << "\n.------------------- debug -------------------\r\n"; std::cout << "\n.------------------- debug -------------------\r\n";
std::cout << "| after init_256colorTerminal(): " std::cout << "| after init_256colorTerminal(): "
<< terminal->termtype_256color << "\r\n"; << TermApp.termtype_256color << "\r\n";
std::cout << "| after parseAnswerbackMsg(): " std::cout << "| after parseAnswerbackMsg(): "
<< terminal->termtype_Answerback << "\r\n"; << TermApp.termtype_Answerback << "\r\n";
std::cout << "| after parseSecDA(): " std::cout << "| after parseSecDA(): "
<< terminal->termtype_SecDA << "\r\n"; << TermApp.termtype_SecDA << "\r\n";
if ( const FString& s = terminal->getAnswerbackString() ) if ( const FString& s = TermApp.getAnswerbackString() )
tcapString ("| The answerback String", s); tcapString ("| The answerback String", s);
if ( const FString& s = TermApp.getSecDAString() )
if ( const FString& s = terminal->getSecDAString() )
tcapString ("| The SecDA String", s); tcapString ("| The SecDA String", s);
std::cout << "`------------------- debug -------------------\r\n"; std::cout << "`------------------- debug -------------------\r\n";

View File

@ -19,12 +19,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * * along with this program. If not, see <http://www.gnu.org/licenses/>. *
************************************************************************/ ************************************************************************/
#include <final/fapplication.h> #include <final/final.h>
#include <final/fdialog.h>
#include <final/flabel.h>
#include <final/fmessagebox.h>
#include <final/fstatusbar.h>
#include <final/fstring.h>
//---------------------------------------------------------------------- //----------------------------------------------------------------------

View File

@ -24,10 +24,7 @@
#include <string> #include <string>
#include <vector> #include <vector>
#include <final/fapplication.h> #include <final/final.h>
#include <final/fdialog.h>
#include <final/flistview.h>
#include <final/fmessagebox.h>
//---------------------------------------------------------------------- //----------------------------------------------------------------------

View File

@ -20,12 +20,7 @@
************************************************************************/ ************************************************************************/
#include <ctime> #include <ctime>
#include <final/final.h>
#include <final/fapplication.h>
#include <final/flabel.h>
#include <final/fdialog.h>
#include <final/fmessagebox.h>
#include <final/fswitch.h>
//---------------------------------------------------------------------- //----------------------------------------------------------------------

View File

@ -20,16 +20,7 @@
************************************************************************/ ************************************************************************/
#include <vector> #include <vector>
#include <final/final.h>
#include <final/fapplication.h>
#include <final/fdialog.h>
#include <final/fdialoglistmenu.h>
#include <final/flabel.h>
#include <final/fmenubar.h>
#include <final/fmenu.h>
#include <final/fmessagebox.h>
#include <final/fstatusbar.h>
#include <final/fstring.h>
//---------------------------------------------------------------------- //----------------------------------------------------------------------

View File

@ -55,6 +55,10 @@
#ifndef FAPPLICATION_H #ifndef FAPPLICATION_H
#define FAPPLICATION_H #define FAPPLICATION_H
#if !defined (USE_FINAL_H) && !defined (COMPILE_FINAL_CUT)
#error "Only <final/final.h> can be included directly."
#endif
#include <getopt.h> #include <getopt.h>
#include <deque> #include <deque>
#include <string> #include <string>

View File

@ -47,6 +47,10 @@
#ifndef FBUTTON_H #ifndef FBUTTON_H
#define FBUTTON_H #define FBUTTON_H
#if !defined (USE_FINAL_H) && !defined (COMPILE_FINAL_CUT)
#error "Only <final/final.h> can be included directly."
#endif
#include "final/fwidget.h" #include "final/fwidget.h"

View File

@ -48,6 +48,10 @@
#ifndef FBUTTONGROUP_H #ifndef FBUTTONGROUP_H
#define FBUTTONGROUP_H #define FBUTTONGROUP_H
#if !defined (USE_FINAL_H) && !defined (COMPILE_FINAL_CUT)
#error "Only <final/final.h> can be included directly."
#endif
#include "final/fscrollview.h" #include "final/fscrollview.h"

View File

@ -30,6 +30,10 @@
#ifndef FC_H #ifndef FC_H
#define FC_H #define FC_H
#if !defined (USE_FINAL_H) && !defined (COMPILE_FINAL_CUT)
#error "Only <final/final.h> can be included directly."
#endif
#include "final/fstring.h" #include "final/fstring.h"
// ascii sequences // ascii sequences

View File

@ -22,6 +22,10 @@
#ifndef FCHARMAP_H #ifndef FCHARMAP_H
#define FCHARMAP_H #define FCHARMAP_H
#if !defined (USE_FINAL_H) && !defined (COMPILE_FINAL_CUT)
#error "Only <final/final.h> can be included directly."
#endif
static uInt character[][fc::NUM_OF_ENCODINGS] = static uInt character[][fc::NUM_OF_ENCODINGS] =
{ {
// .--------------------- Unicode (UTF-8) // .--------------------- Unicode (UTF-8)

View File

@ -52,6 +52,10 @@
#ifndef FCHECKBOX_H #ifndef FCHECKBOX_H
#define FCHECKBOX_H #define FCHECKBOX_H
#if !defined (USE_FINAL_H) && !defined (COMPILE_FINAL_CUT)
#error "Only <final/final.h> can be included directly."
#endif
#include "final/ftogglebutton.h" #include "final/ftogglebutton.h"

View File

@ -52,6 +52,10 @@
#ifndef FCHECKMENUITEM_H #ifndef FCHECKMENUITEM_H
#define FCHECKMENUITEM_H #define FCHECKMENUITEM_H
#if !defined (USE_FINAL_H) && !defined (COMPILE_FINAL_CUT)
#error "Only <final/final.h> can be included directly."
#endif
#include "final/fmenuitem.h" #include "final/fmenuitem.h"

View File

@ -52,6 +52,10 @@
#ifndef FDIALOG_H #ifndef FDIALOG_H
#define FDIALOG_H #define FDIALOG_H
#if !defined (USE_FINAL_H) && !defined (COMPILE_FINAL_CUT)
#error "Only <final/final.h> can be included directly."
#endif
#include "final/fmenu.h" #include "final/fmenu.h"
#include "final/fmenuitem.h" #include "final/fmenuitem.h"
#include "final/ftooltip.h" #include "final/ftooltip.h"

View File

@ -59,6 +59,10 @@
#ifndef FDIALOGLISTMENU_H #ifndef FDIALOGLISTMENU_H
#define FDIALOGLISTMENU_H #define FDIALOGLISTMENU_H
#if !defined (USE_FINAL_H) && !defined (COMPILE_FINAL_CUT)
#error "Only <final/final.h> can be included directly."
#endif
#include "final/fmenu.h" #include "final/fmenu.h"

View File

@ -71,6 +71,10 @@
#ifndef FEVENT_H #ifndef FEVENT_H
#define FEVENT_H #define FEVENT_H
#if !defined (USE_FINAL_H) && !defined (COMPILE_FINAL_CUT)
#error "Only <final/final.h> can be included directly."
#endif
#include "final/fc.h" #include "final/fc.h"
#include "final/fpoint.h" #include "final/fpoint.h"

View File

@ -57,6 +57,10 @@
#ifndef FFILEDIALOG_H #ifndef FFILEDIALOG_H
#define FFILEDIALOG_H #define FFILEDIALOG_H
#if !defined (USE_FINAL_H) && !defined (COMPILE_FINAL_CUT)
#error "Only <final/final.h> can be included directly."
#endif
#include <sys/param.h> #include <sys/param.h>
#include <dirent.h> #include <dirent.h>

View File

@ -23,6 +23,8 @@
#ifndef FINAL_H #ifndef FINAL_H
#define FINAL_H #define FINAL_H
#define USE_FINAL_H
#include <final/fapplication.h> #include <final/fapplication.h>
#include <final/fbuttongroup.h> #include <final/fbuttongroup.h>
#include <final/fbutton.h> #include <final/fbutton.h>
@ -34,6 +36,7 @@
#include <final/flabel.h> #include <final/flabel.h>
#include <final/flineedit.h> #include <final/flineedit.h>
#include <final/flistbox.h> #include <final/flistbox.h>
#include <final/flistview.h>
#include <final/fmenubar.h> #include <final/fmenubar.h>
#include <final/fmenu.h> #include <final/fmenu.h>
#include <final/fmenuitem.h> #include <final/fmenuitem.h>
@ -52,4 +55,6 @@
#include <final/ftooltip.h> #include <final/ftooltip.h>
#include <final/fwidget.h> #include <final/fwidget.h>
#undef USE_FINAL_H
#endif // FINAL_H #endif // FINAL_H

View File

@ -22,6 +22,10 @@
#ifndef FKEYMAP_H #ifndef FKEYMAP_H
#define FKEYMAP_H #define FKEYMAP_H
#if !defined (USE_FINAL_H) && !defined (COMPILE_FINAL_CUT)
#error "Only <final/final.h> can be included directly."
#endif
#include <string> #include <string>
#pragma pack(push) #pragma pack(push)

View File

@ -47,6 +47,10 @@
#ifndef FLABEL_H #ifndef FLABEL_H
#define FLABEL_H #define FLABEL_H
#if !defined (USE_FINAL_H) && !defined (COMPILE_FINAL_CUT)
#error "Only <final/final.h> can be included directly."
#endif
#include <vector> #include <vector>
#include "final/fwidget.h" #include "final/fwidget.h"

View File

@ -47,6 +47,10 @@
#ifndef FLINEEDIT_H #ifndef FLINEEDIT_H
#define FLINEEDIT_H #define FLINEEDIT_H
#if !defined (USE_FINAL_H) && !defined (COMPILE_FINAL_CUT)
#error "Only <final/final.h> can be included directly."
#endif
#include "final/fwidget.h" #include "final/fwidget.h"
#include "final/flabel.h" #include "final/flabel.h"

View File

@ -48,6 +48,10 @@
#ifndef FLISTBOX_H #ifndef FLISTBOX_H
#define FLISTBOX_H #define FLISTBOX_H
#if !defined (USE_FINAL_H) && !defined (COMPILE_FINAL_CUT)
#error "Only <final/final.h> can be included directly."
#endif
#include <vector> #include <vector>
#include "final/fscrollbar.h" #include "final/fscrollbar.h"

View File

@ -47,6 +47,10 @@
#ifndef FLISTVIEW_H #ifndef FLISTVIEW_H
#define FLISTVIEW_H #define FLISTVIEW_H
#if !defined (USE_FINAL_H) && !defined (COMPILE_FINAL_CUT)
#error "Only <final/final.h> can be included directly."
#endif
#include <stack> #include <stack>
#include <vector> #include <vector>

View File

@ -54,6 +54,10 @@
#ifndef FMENU_H #ifndef FMENU_H
#define FMENU_H #define FMENU_H
#if !defined (USE_FINAL_H) && !defined (COMPILE_FINAL_CUT)
#error "Only <final/final.h> can be included directly."
#endif
#include "final/fwindow.h" #include "final/fwindow.h"
#include "final/fmenubar.h" #include "final/fmenubar.h"
#include "final/fmenulist.h" #include "final/fmenulist.h"

View File

@ -54,6 +54,10 @@
#ifndef FMENUBAR_H #ifndef FMENUBAR_H
#define FMENUBAR_H #define FMENUBAR_H
#if !defined (USE_FINAL_H) && !defined (COMPILE_FINAL_CUT)
#error "Only <final/final.h> can be included directly."
#endif
#include "final/fmenu.h" #include "final/fmenu.h"
#include "final/fmenulist.h" #include "final/fmenulist.h"
#include "final/fwindow.h" #include "final/fwindow.h"

View File

@ -51,6 +51,10 @@
#ifndef FMENUITEM_H #ifndef FMENUITEM_H
#define FMENUITEM_H #define FMENUITEM_H
#if !defined (USE_FINAL_H) && !defined (COMPILE_FINAL_CUT)
#error "Only <final/final.h> can be included directly."
#endif
#include "final/fwidget.h" #include "final/fwidget.h"
// class forward declaration // class forward declaration

View File

@ -38,6 +38,10 @@
#ifndef FMENULIST_H #ifndef FMENULIST_H
#define FMENULIST_H #define FMENULIST_H
#if !defined (USE_FINAL_H) && !defined (COMPILE_FINAL_CUT)
#error "Only <final/final.h> can be included directly."
#endif
#include <vector> #include <vector>
#include "final/fmenuitem.h" #include "final/fmenuitem.h"

View File

@ -57,6 +57,10 @@
#ifndef FMESSAGEBOX_H #ifndef FMESSAGEBOX_H
#define FMESSAGEBOX_H #define FMESSAGEBOX_H
#if !defined (USE_FINAL_H) && !defined (COMPILE_FINAL_CUT)
#error "Only <final/final.h> can be included directly."
#endif
#include <cstring> #include <cstring>
#include "final/fbutton.h" #include "final/fbutton.h"

View File

@ -30,6 +30,10 @@
#ifndef FOBJECT_H #ifndef FOBJECT_H
#define FOBJECT_H #define FOBJECT_H
#if !defined (USE_FINAL_H) && !defined (COMPILE_FINAL_CUT)
#error "Only <final/final.h> can be included directly."
#endif
#include <stdint.h> #include <stdint.h>
#include <sys/time.h> // need for gettimeofday #include <sys/time.h> // need for gettimeofday
#include <cstdlib> #include <cstdlib>

View File

@ -30,6 +30,10 @@
#ifndef FOPTIATTR_H #ifndef FOPTIATTR_H
#define FOPTIATTR_H #define FOPTIATTR_H
#if !defined (USE_FINAL_H) && !defined (COMPILE_FINAL_CUT)
#error "Only <final/final.h> can be included directly."
#endif
#include <assert.h> #include <assert.h>
#include <term.h> // need for tparm #include <term.h> // need for tparm

View File

@ -33,6 +33,10 @@
#ifndef FOPTIMOVE_H #ifndef FOPTIMOVE_H
#define FOPTIMOVE_H #define FOPTIMOVE_H
#if !defined (USE_FINAL_H) && !defined (COMPILE_FINAL_CUT)
#error "Only <final/final.h> can be included directly."
#endif
#include <assert.h> #include <assert.h>
#include <term.h> // need for tparm #include <term.h> // need for tparm

View File

@ -30,6 +30,11 @@
#ifndef FPOINT_H #ifndef FPOINT_H
#define FPOINT_H #define FPOINT_H
#if !defined (USE_FINAL_H) && !defined (COMPILE_FINAL_CUT)
#error "Only <final/final.h> can be included directly."
#endif
//---------------------------------------------------------------------- //----------------------------------------------------------------------
// class FPoint // class FPoint
//---------------------------------------------------------------------- //----------------------------------------------------------------------

View File

@ -47,6 +47,10 @@
#ifndef FPROGRESSBAR_H #ifndef FPROGRESSBAR_H
#define FPROGRESSBAR_H #define FPROGRESSBAR_H
#if !defined (USE_FINAL_H) && !defined (COMPILE_FINAL_CUT)
#error "Only <final/final.h> can be included directly."
#endif
#include "final/fwidget.h" #include "final/fwidget.h"

View File

@ -52,6 +52,10 @@
#ifndef FRADIOBUTTON_H #ifndef FRADIOBUTTON_H
#define FRADIOBUTTON_H #define FRADIOBUTTON_H
#if !defined (USE_FINAL_H) && !defined (COMPILE_FINAL_CUT)
#error "Only <final/final.h> can be included directly."
#endif
#include "final/ftogglebutton.h" #include "final/ftogglebutton.h"

View File

@ -52,6 +52,10 @@
#ifndef FRADIOMENUITEM_H #ifndef FRADIOMENUITEM_H
#define FRADIOMENUITEM_H #define FRADIOMENUITEM_H
#if !defined (USE_FINAL_H) && !defined (COMPILE_FINAL_CUT)
#error "Only <final/final.h> can be included directly."
#endif
#include "final/fmenuitem.h" #include "final/fmenuitem.h"

View File

@ -30,6 +30,10 @@
#ifndef FRECT_H #ifndef FRECT_H
#define FRECT_H #define FRECT_H
#if !defined (USE_FINAL_H) && !defined (COMPILE_FINAL_CUT)
#error "Only <final/final.h> can be included directly."
#endif
#include <algorithm> #include <algorithm>
#include "final/fpoint.h" #include "final/fpoint.h"

View File

@ -47,6 +47,10 @@
#ifndef FSCROLLBAR_H #ifndef FSCROLLBAR_H
#define FSCROLLBAR_H #define FSCROLLBAR_H
#if !defined (USE_FINAL_H) && !defined (COMPILE_FINAL_CUT)
#error "Only <final/final.h> can be included directly."
#endif
#include "final/fwidget.h" #include "final/fwidget.h"

View File

@ -48,6 +48,10 @@
#ifndef FSCROLLVIEW_H #ifndef FSCROLLVIEW_H
#define FSCROLLVIEW_H #define FSCROLLVIEW_H
#if !defined (USE_FINAL_H) && !defined (COMPILE_FINAL_CUT)
#error "Only <final/final.h> can be included directly."
#endif
#include "final/fscrollbar.h" #include "final/fscrollbar.h"
#include "final/fwidget.h" #include "final/fwidget.h"

View File

@ -54,6 +54,10 @@
#ifndef FSTATUSBAR_H #ifndef FSTATUSBAR_H
#define FSTATUSBAR_H #define FSTATUSBAR_H
#if !defined (USE_FINAL_H) && !defined (COMPILE_FINAL_CUT)
#error "Only <final/final.h> can be included directly."
#endif
#include <vector> #include <vector>
#include "final/fwindow.h" #include "final/fwindow.h"

View File

@ -30,6 +30,10 @@
#ifndef FSTRING_H #ifndef FSTRING_H
#define FSTRING_H #define FSTRING_H
#if !defined (USE_FINAL_H) && !defined (COMPILE_FINAL_CUT)
#error "Only <final/final.h> can be included directly."
#endif
#include <langinfo.h> #include <langinfo.h>
#include <stdint.h> #include <stdint.h>

View File

@ -52,6 +52,10 @@
#ifndef FSWITCH_H #ifndef FSWITCH_H
#define FSWITCH_H #define FSWITCH_H
#if !defined (USE_FINAL_H) && !defined (COMPILE_FINAL_CUT)
#error "Only <final/final.h> can be included directly."
#endif
#include "final/ftogglebutton.h" #include "final/ftogglebutton.h"

View File

@ -22,6 +22,10 @@
#ifndef FTCAPMAP_H #ifndef FTCAPMAP_H
#define FTCAPMAP_H #define FTCAPMAP_H
#if !defined (USE_FINAL_H) && !defined (COMPILE_FINAL_CUT)
#error "Only <final/final.h> can be included directly."
#endif
#include "final/ftermcap.h" #include "final/ftermcap.h"
static FTermcap::tcap_map term_caps[] = static FTermcap::tcap_map term_caps[] =

View File

@ -46,6 +46,10 @@
#ifndef FTERM_H #ifndef FTERM_H
#define FTERM_H #define FTERM_H
#if !defined (USE_FINAL_H) && !defined (COMPILE_FINAL_CUT)
#error "Only <final/final.h> can be included directly."
#endif
#include "final/fconfig.h" #include "final/fconfig.h"
#ifdef F_HAVE_LIBGPM #ifdef F_HAVE_LIBGPM

View File

@ -30,6 +30,10 @@
#ifndef FTERMBUFFER_H #ifndef FTERMBUFFER_H
#define FTERMBUFFER_H #define FTERMBUFFER_H
#if !defined (USE_FINAL_H) && !defined (COMPILE_FINAL_CUT)
#error "Only <final/final.h> can be included directly."
#endif
#include <sstream> // std::stringstream #include <sstream> // std::stringstream
#include <string> #include <string>
#include <vector> #include <vector>

View File

@ -30,6 +30,10 @@
#ifndef FTERMCAP_H #ifndef FTERMCAP_H
#define FTERMCAP_H #define FTERMCAP_H
#if !defined (USE_FINAL_H) && !defined (COMPILE_FINAL_CUT)
#error "Only <final/final.h> can be included directly."
#endif
// FTermcap string macro // FTermcap string macro
#define TCAP(s) tcap[(s)].string #define TCAP(s) tcap[(s)].string

View File

@ -47,6 +47,10 @@
#ifndef FTEXTVIEW_H #ifndef FTEXTVIEW_H
#define FTEXTVIEW_H #define FTEXTVIEW_H
#if !defined (USE_FINAL_H) && !defined (COMPILE_FINAL_CUT)
#error "Only <final/final.h> can be included directly."
#endif
#include <vector> #include <vector>
#include "final/fapplication.h" #include "final/fapplication.h"

View File

@ -47,6 +47,10 @@
#ifndef FTOGGLEBUTTON_H #ifndef FTOGGLEBUTTON_H
#define FTOGGLEBUTTON_H #define FTOGGLEBUTTON_H
#if !defined (USE_FINAL_H) && !defined (COMPILE_FINAL_CUT)
#error "Only <final/final.h> can be included directly."
#endif
#include "final/fwidget.h" #include "final/fwidget.h"

View File

@ -52,6 +52,10 @@
#ifndef FTOOLTIP_H #ifndef FTOOLTIP_H
#define FTOOLTIP_H #define FTOOLTIP_H
#if !defined (USE_FINAL_H) && !defined (COMPILE_FINAL_CUT)
#error "Only <final/final.h> can be included directly."
#endif
#include <vector> #include <vector>
#include "final/fwindow.h" #include "final/fwindow.h"

View File

@ -22,6 +22,10 @@
#ifndef FTYPES_H #ifndef FTYPES_H
#define FTYPES_H #define FTYPES_H
#if !defined (USE_FINAL_H) && !defined (COMPILE_FINAL_CUT)
#error "Only <final/final.h> can be included directly."
#endif
#include <sys/types.h> #include <sys/types.h>
#define null NULL #define null NULL

View File

@ -43,6 +43,10 @@
#ifndef FVTERM_H #ifndef FVTERM_H
#define FVTERM_H #define FVTERM_H
#if !defined (USE_FINAL_H) && !defined (COMPILE_FINAL_CUT)
#error "Only <final/final.h> can be included directly."
#endif
#include <sstream> // std::stringstream #include <sstream> // std::stringstream
#include "final/fterm.h" #include "final/fterm.h"

View File

@ -90,6 +90,10 @@
#ifndef FWIDGET_H #ifndef FWIDGET_H
#define FWIDGET_H #define FWIDGET_H
#if !defined (USE_FINAL_H) && !defined (COMPILE_FINAL_CUT)
#error "Only <final/final.h> can be included directly."
#endif
#include <vector> #include <vector>
#include "final/fvterm.h" #include "final/fvterm.h"

View File

@ -55,6 +55,10 @@
#ifndef FWINDOW_H #ifndef FWINDOW_H
#define FWINDOW_H #define FWINDOW_H
#if !defined (USE_FINAL_H) && !defined (COMPILE_FINAL_CUT)
#error "Only <final/final.h> can be included directly."
#endif
#include "final/fwidget.h" #include "final/fwidget.h"

View File

@ -4,7 +4,7 @@
SUBDIRS = fonts SUBDIRS = fonts
AM_CPPFLAGS = -I../include -Wall -Werror AM_CPPFLAGS = -I../include -Wall -Werror -DCOMPILE_FINAL_CUT
lib_LTLIBRARIES = libfinal.la lib_LTLIBRARIES = libfinal.la

View File

@ -51,7 +51,7 @@ INCLUDE_HEADERS = \
# compiler parameter # compiler parameter
CXX = clang++ CXX = clang++
CCXFLAGS = $(OPTIMIZE) $(PROFILE) $(DEBUG) $(VER) $(GPM) -march=x86-64 -frtti -fexceptions CCXFLAGS = $(OPTIMIZE) $(PROFILE) -DCOMPILE_FINAL_CUT $(DEBUG) $(VER) $(GPM) -march=x86-64 -frtti -fexceptions
MAKEFILE = -f Makefile.clang MAKEFILE = -f Makefile.clang
LDFLAGS = $(TERMCAP) -lgpm LDFLAGS = $(TERMCAP) -lgpm
INCLUDES = -I../include INCLUDES = -I../include
@ -153,7 +153,7 @@ clean:
$(RM) $(LIB)* $(OBJS) .depend *.gch *.plist *~ $(RM) $(LIB)* $(OBJS) .depend *.gch *.plist *~
dep: dep:
$(CXX) $(INCLUDES) -MM *.cpp >.depend $(CXX) $(INCLUDES) -DCOMPILE_FINAL_CUT -MM *.cpp >.depend
# #
# include .depend if it exists # include .depend if it exists

View File

@ -51,7 +51,7 @@ INCLUDE_HEADERS = \
# compiler parameter # compiler parameter
CXX = g++ CXX = g++
CCXFLAGS = $(OPTIMIZE) $(PROFILE) $(DEBUG) $(VER) $(GPM) -march=x86-64 -frtti -fexceptions CCXFLAGS = $(OPTIMIZE) $(PROFILE) -DCOMPILE_FINAL_CUT $(DEBUG) $(VER) $(GPM) -march=x86-64 -frtti -fexceptions
MAKEFILE = -f Makefile.gcc MAKEFILE = -f Makefile.gcc
LDFLAGS = $(TERMCAP) -lgpm LDFLAGS = $(TERMCAP) -lgpm
INCLUDES = -I../include INCLUDES = -I../include
@ -153,7 +153,7 @@ clean:
$(RM) $(LIB)* $(OBJS) .depend *.prof *~ $(RM) $(LIB)* $(OBJS) .depend *.prof *~
dep: dep:
$(CXX) $(INCLUDES) -MM *.cpp >.depend $(CXX) $(INCLUDES) -MM -DCOMPILE_FINAL_CUT *.cpp >.depend
# #
# include .depend if it exists # include .depend if it exists

View File

@ -373,7 +373,7 @@ top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@ top_builddir = @top_builddir@
top_srcdir = @top_srcdir@ top_srcdir = @top_srcdir@
SUBDIRS = fonts SUBDIRS = fonts
AM_CPPFLAGS = -I../include -Wall -Werror AM_CPPFLAGS = -I../include -Wall -Werror -DCOMPILE_FINAL_CUT
lib_LTLIBRARIES = libfinal.la lib_LTLIBRARIES = libfinal.la
libfinal_la_SOURCES = \ libfinal_la_SOURCES = \
fstring.cpp \ fstring.cpp \