Small cleanups

This commit is contained in:
Markus Gans 2019-08-06 23:45:28 +02:00
parent 77b76b7a2a
commit 5257beb73a
74 changed files with 584 additions and 535 deletions

View File

@ -1,3 +1,11 @@
Build FINAL CUT with the clang c++ compiler
-------------------------------------------
openbsd# CXX=clang++ ./build.sh
Build FINAL CUT with eg++
-------------------------
openbsd# CXX=eg++ ./build.sh
Install egcc on OpenBSD
-----------------------
openbsd# pkg_add g++
@ -14,7 +22,3 @@ g++-8.3.0:libmpc-0.9p2: ok
g++-8.3.0:gcc-8.3.0: ok
g++-8.3.0: ok
Build FINAL CUT with eg++
-------------------------
openbsd# CXX=eg++ ./build.sh

View File

@ -27,7 +27,7 @@ How to use the library
At the beginning of this introduction to the Final Cut
we will start with a small example.
The following example creates an empty 30×10 character dialog.
The following example creates an empty 30??10 character dialog.
**File:** *dialog.cpp*
```cpp
@ -290,7 +290,7 @@ class dialogWidget : public FDialog
}
private:
virtual void onTimer (FTimerEvent* ev) override
void onTimer (FTimerEvent* ev) override
{
if ( id == ev->getTimerId() && n < 9999999999 )
{
@ -699,12 +699,12 @@ class dialogWidget : public FDialog
void setTemperature()
{
label.clear();
label << t << "°C";
label << t << "??C";
label.redraw();
}
int t = 20;
FLabel label{FString() << t << "°C", this};
FLabel label{FString() << t << "??C", this};
FButton plus {"&+", this};
FButton minus {"&-", this};
};
@ -795,7 +795,7 @@ class dialogWidget : public FDialog
input.setY (ly, false);
}
virtual void adjustSize() override
void adjustSize() override
{
// Calling super class method adjustSize()
FDialog::adjustSize();
@ -803,14 +803,14 @@ class dialogWidget : public FDialog
centerDialog();
}
virtual void setSize (const FSize& size, bool) override
void setSize (const FSize& size, bool) override
{
// Calling super class methods setSize() + adjustSize()
FDialog::setSize (size, false);
FDialog::adjustSize();
}
virtual void draw() override
void draw() override
{
adjustWidgets(); // Adjust widgets before drawing

View File

@ -1,3 +1,28 @@
/***********************************************************************
* 7segment.cpp - Seven-segment display *
* *
* This file is part of the Final Cut widget toolkit *
* *
* Copyright 2012-2019 Markus Gans *
* *
* The Final Cut is free software; you can redistribute it and/or *
* modify it under the terms of the GNU Lesser General Public License *
* as published by the Free Software Foundation; either version 3 of *
* the License, or (at your option) any later version. *
* *
* The Final Cut 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 Lesser General Public License for more details. *
* *
* You should have received a copy of the GNU Lesser General Public *
* License along with this program. If not, see *
* <http://www.gnu.org/licenses/>. *
***********************************************************************/
#include <map>
#include <vector>
#include <final/final.h>
namespace fc = finalcut::fc;
@ -35,7 +60,7 @@ class SegmentView : public finalcut::FDialog
// Methods
void hexEncoding();
void get7Segment (const wchar_t);
virtual void draw() override;
void draw() override;
// Data Members
std::map<wchar_t, sevenSegment> code{};

View File

@ -55,7 +55,7 @@ class Button : public finalcut::FButton
void setChecked(bool);
// Event handler
virtual void onKeyPress (finalcut::FKeyEvent*) override;
void onKeyPress (finalcut::FKeyEvent*) override;
private:
// Data Member
@ -122,8 +122,8 @@ class Calc : public finalcut::FDialog
~Calc();
// Event handlers
virtual void onKeyPress (finalcut::FKeyEvent*) override;
virtual void onClose (finalcut::FCloseEvent*) override;
void onKeyPress (finalcut::FKeyEvent*) override;
void onClose (finalcut::FCloseEvent*) override;
// Callback method
void cb_buttonClicked (finalcut::FWidget*, FDataPtr);
@ -173,7 +173,7 @@ class Calc : public finalcut::FDialog
// Methods
void drawDispay();
virtual void draw() override;
void draw() override;
void clear (lDouble&);
void zero (lDouble&);
void one (lDouble&);
@ -215,7 +215,7 @@ class Calc : public finalcut::FDialog
void setInfixOperator (char);
void clearInfixOperator();
void calcInfixOperator();
virtual void adjustSize() override;
void adjustSize() override;
const wchar_t* getButtonText (std::size_t);
void mapKeyFunctions();

View File

@ -59,8 +59,8 @@ class CheckList : public finalcut::FDialog
void populate();
// Event handlers
virtual void onKeyPress (finalcut::FKeyEvent*) override;
virtual void onClose (finalcut::FCloseEvent*) override;
void onKeyPress (finalcut::FKeyEvent*) override;
void onClose (finalcut::FCloseEvent*) override;
// Callback method
void cb_showList (finalcut::FWidget*, FDataPtr);

View File

@ -20,6 +20,7 @@
* <http://www.gnu.org/licenses/>. *
***********************************************************************/
#include <memory>
#include <vector>
#include <final/final.h>

View File

@ -34,12 +34,12 @@ class Keyboard : public finalcut::FWidget
protected:
// Event handlers
virtual void onKeyPress (finalcut::FKeyEvent*) override;
virtual void onAccel (finalcut::FAccelEvent*) override;
void onKeyPress (finalcut::FKeyEvent*) override;
void onAccel (finalcut::FAccelEvent*) override;
private:
// Methods
virtual void draw() override;
void draw() override;
};
//----------------------------------------------------------------------

View File

@ -23,6 +23,7 @@
#include <iostream>
#include <list>
#include <map>
#include <memory>
#include <fstream>
#include <final/final.h>
@ -95,7 +96,7 @@ class Listbox : public FDialog
private:
// Event handlers
virtual void onClose (FCloseEvent*) override;
void onClose (FCloseEvent*) override;
// Data Member
std::list<double> double_list{};

View File

@ -59,7 +59,7 @@ class Listview : public finalcut::FDialog
void populate();
// Event handlers
virtual void onClose (finalcut::FCloseEvent*) override;
void onClose (finalcut::FCloseEvent*) override;
// Callback method
void cb_showInMessagebox (finalcut::FWidget*, FDataPtr);

View File

@ -44,13 +44,13 @@ class Mandelbrot : public finalcut::FDialog
~Mandelbrot();
// Event handlers
virtual void onKeyPress (finalcut::FKeyEvent*) override;
virtual void onClose (finalcut::FCloseEvent*) override;
void onKeyPress (finalcut::FKeyEvent*) override;
void onClose (finalcut::FCloseEvent*) override;
private:
// Methods
virtual void draw() override;
virtual void adjustSize() override;
void draw() override;
void adjustSize() override;
};
#pragma pack(pop)

View File

@ -58,10 +58,10 @@ class Menu : public finalcut::FDialog
void configureStyleMenuItems();
void configureBorderMenuItems();
void defaultCallback (finalcut::FMenuList*);
virtual void adjustSize() override;
void adjustSize() override;
// Event handler
virtual void onClose (finalcut::FCloseEvent*) override;
void onClose (finalcut::FCloseEvent*) override;
// Callback method
void cb_message (finalcut::FWidget*, FDataPtr);

View File

@ -56,10 +56,10 @@ class ColorChooser : public finalcut::FWidget
private:
// Method
virtual void draw() override;
void draw() override;
// Event handler
virtual void onMouseDown (finalcut::FMouseEvent*) override;
void onMouseDown (finalcut::FMouseEvent*) override;
// Data Members
FColor fg_color{fc::White};
@ -195,10 +195,10 @@ class Brushes : public finalcut::FWidget
private:
// Method
virtual void draw() override;
void draw() override;
// Event handler
virtual void onMouseDown (finalcut::FMouseEvent*) override;
void onMouseDown (finalcut::FMouseEvent*) override;
// Data Members
wchar_t brush{L' '};
@ -329,19 +329,19 @@ class MouseDraw : public finalcut::FDialog
void setGeometry (const FPoint&, const FSize&, bool = true) override;
// Event handlers
virtual void onKeyPress (finalcut::FKeyEvent*) override;
virtual void onClose (finalcut::FCloseEvent*) override;
void onKeyPress (finalcut::FKeyEvent*) override;
void onClose (finalcut::FCloseEvent*) override;
private:
// Methods
virtual void draw() override;
void draw() override;
void drawBrush (int, int, bool = false);
void drawCanvas();
virtual void adjustSize() override;
void adjustSize() override;
// Event handler
virtual void onMouseDown (finalcut::FMouseEvent*) override;
virtual void onMouseMove (finalcut::FMouseEvent*) override;
void onMouseDown (finalcut::FMouseEvent*) override;
void onMouseMove (finalcut::FMouseEvent*) override;
// Callback methods
void cb_colorChanged (finalcut::FWidget*, FDataPtr);

View File

@ -54,7 +54,7 @@ class Scrollview : public finalcut::FScrollView
private:
// Method
virtual void draw() override;
void draw() override;
// Callback methods
void cb_go_east (finalcut::FWidget*, FDataPtr);
@ -206,7 +206,7 @@ class Scrollviewdemo : public finalcut::FDialog
~Scrollviewdemo();
// Event handler
virtual void onClose (finalcut::FCloseEvent*) override;
void onClose (finalcut::FCloseEvent*) override;
// Callback method
void cb_quit (finalcut::FWidget* = nullptr, FDataPtr = nullptr);

View File

@ -21,6 +21,7 @@
***********************************************************************/
#include <functional>
#include <vector>
#include <final/final.h>
namespace fc = finalcut::fc;
@ -52,9 +53,9 @@ class AttribDlg : public finalcut::FDialog
AttribDlg& operator = (const AttribDlg&) = delete;
// Event handlers
virtual void onKeyPress (finalcut::FKeyEvent*) override;
virtual void onWheel (finalcut::FWheelEvent*) override;
virtual void onClose (finalcut::FCloseEvent*) override;
void onKeyPress (finalcut::FKeyEvent*) override;
void onWheel (finalcut::FWheelEvent*) override;
void onClose (finalcut::FCloseEvent*) override;
// Callback methods
void cb_next (finalcut::FWidget* = nullptr, FDataPtr = nullptr);
@ -65,7 +66,7 @@ class AttribDlg : public finalcut::FDialog
private:
// Method
virtual void adjustSize() override;
void adjustSize() override;
// Data Members
finalcut::FButton next_button{"&Next >", this};
@ -210,7 +211,7 @@ class AttribDemo : public finalcut::FWidget
{ }
// Event handler
virtual void onWheel (finalcut::FWheelEvent* ev) override
void onWheel (finalcut::FWheelEvent* ev) override
{
auto p = static_cast<AttribDlg*>(getParentWidget());
@ -235,7 +236,7 @@ class AttribDemo : public finalcut::FWidget
void printStandout();
void printInvisible();
void printProtected();
virtual void draw() override;
void draw() override;
// Data Member
int colors;

View File

@ -37,11 +37,11 @@ class Timer : public finalcut::FWidget
protected:
// Method
virtual void draw() override;
void draw() override;
// Event handlers
virtual void onTimer (finalcut::FTimerEvent*) override;
virtual void onAccel (finalcut::FAccelEvent*) override;
void onTimer (finalcut::FTimerEvent*) override;
void onAccel (finalcut::FAccelEvent*) override;
};
//----------------------------------------------------------------------

View File

@ -60,10 +60,10 @@ class Transparent : public finalcut::FDialog
private:
// Method
virtual void draw() override;
void draw() override;
// Event handlers
virtual void onKeyPress (finalcut::FKeyEvent* ev) override;
void onKeyPress (finalcut::FKeyEvent* ev) override;
// Data Members
trans_type type;
@ -166,13 +166,13 @@ class MainWindow : public finalcut::FDialog
private:
// Method
virtual void draw() override;
void draw() override;
// Event handlers
virtual void onClose (finalcut::FCloseEvent*) override;
virtual void onShow (finalcut::FShowEvent*) override;
virtual void onTimer (finalcut::FTimerEvent*) override;
virtual void onKeyPress (finalcut::FKeyEvent* ev) override
void onClose (finalcut::FCloseEvent*) override;
void onShow (finalcut::FShowEvent*) override;
void onTimer (finalcut::FTimerEvent*) override;
void onKeyPress (finalcut::FKeyEvent* ev) override
{
if ( ! ev )
return;

View File

@ -135,7 +135,7 @@ class Treeview : public finalcut::FDialog
struct TreeItem; // forward declaration
// Methods
virtual void adjustSize() override;
void adjustSize() override;
// Event handler
void onClose (finalcut::FCloseEvent*) override;

View File

@ -1,5 +1,5 @@
/***********************************************************************
* ui.cpp - Example of a user interface *
* 7segment.cpp - Seven-segment display example *
* *
* This file is part of the Final Cut widget toolkit *
* *
@ -21,8 +21,10 @@
***********************************************************************/
#include <fstream>
#include <map>
#include <iostream>
#include <string>
#include <vector>
#include <final/final.h>
@ -55,8 +57,8 @@ class ProgressDialog : public finalcut::FDialog
private:
// Event handlers
virtual void onShow (finalcut::FShowEvent*) override;
virtual void onTimer (finalcut::FTimerEvent*) override;
void onShow (finalcut::FShowEvent*) override;
void onTimer (finalcut::FTimerEvent*) override;
// Callback methods
void cb_reset_bar (finalcut::FWidget*, FDataPtr);
@ -204,7 +206,7 @@ class TextWindow : public finalcut::FDialog
private:
// Method
virtual void adjustSize() override;
void adjustSize() override;
// Data Members
finalcut::FTextView scrollText{this};
@ -284,10 +286,10 @@ class MyDialog : public finalcut::FDialog
void initButtons();
void initLabels();
void initWidgetsCallbacks();
virtual void adjustSize() override;
void adjustSize() override;
// Event handlers
virtual void onClose (finalcut::FCloseEvent*) override;
void onClose (finalcut::FCloseEvent*) override;
// Callback methods
void cb_noFunctionMsg (finalcut::FWidget*, FDataPtr);

View File

@ -53,8 +53,8 @@ class Watch : public finalcut::FDialog
void printTime();
// Event handlers
virtual void onTimer (finalcut::FTimerEvent*) override;
virtual void onClose (finalcut::FCloseEvent*) override;
void onTimer (finalcut::FTimerEvent*) override;
void onClose (finalcut::FCloseEvent*) override;
// Callback methods
void cb_clock (finalcut::FWidget*, FDataPtr);
@ -62,7 +62,7 @@ class Watch : public finalcut::FDialog
protected:
// Method
virtual void adjustSize() override;
void adjustSize() override;
private:
// Data Members

View File

@ -52,11 +52,11 @@ class SmallWindow : public finalcut::FDialog
private:
// Method
virtual void adjustSize() override;
void adjustSize() override;
// Event handlers
virtual void onShow (finalcut::FShowEvent*) override;
virtual void onTimer (finalcut::FTimerEvent*) override;
void onShow (finalcut::FShowEvent*) override;
void onTimer (finalcut::FTimerEvent*) override;
// Data Members
finalcut::FLabel left_arrow{this};
@ -209,12 +209,12 @@ class Window : public finalcut::FDialog
void configureFileMenuItems();
void configureDialogButtons();
void activateWindow (finalcut::FDialog*);
virtual void adjustSize() override;
void adjustSize() override;
void addClickedCallback (finalcut::FWidget*, WindowCallback);
void addClickedCallback (finalcut::FWidget*, FAppCallback);
// Event handlers
virtual void onClose (finalcut::FCloseEvent*) override;
void onClose (finalcut::FCloseEvent*) override;
// Callback methods
void cb_createWindows (finalcut::FWidget*, FDataPtr);

View File

@ -449,12 +449,12 @@ void FFileDialog::clear()
}
//----------------------------------------------------------------------
int FFileDialog::numOfDirs()
long FFileDialog::numOfDirs()
{
if ( dir_entries.empty() )
return 0;
int n = std::count_if ( std::begin(dir_entries)
long n = std::count_if ( std::begin(dir_entries)
, std::end(dir_entries)
, [] (dir_entry& entry)
{
@ -468,7 +468,7 @@ int FFileDialog::numOfDirs()
//----------------------------------------------------------------------
void FFileDialog::sortDir()
{
int start, dir_num;
long start, dir_num;
if ( std::strcmp((*dir_entries.begin()).name, "..") == 0 )
start = 1;

View File

@ -20,6 +20,7 @@
* <http://www.gnu.org/licenses/>. *
***********************************************************************/
#include <limits>
#include "final/fsize.h"
namespace finalcut

View File

@ -21,6 +21,7 @@
***********************************************************************/
#include <string>
#include <utility>
#include <vector>
#include "final/fstring.h"

View File

@ -20,6 +20,8 @@
* <http://www.gnu.org/licenses/>. *
***********************************************************************/
#include <vector>
#include "final/fc.h"
#include "final/fcharmap.h"
#include "final/fsystem.h"
@ -573,17 +575,20 @@ bool FTermLinux::getScreenFont()
if ( fsystem )
ret = fsystem->ioctl (fd_tty, KDFONTOP, &font);
if ( ret == 0 )
if ( ret != 0 )
{
if ( font.data )
delete[] font.data;
return false;
}
screen_font.width = font.width;
screen_font.height = font.height;
screen_font.charcount = font.charcount;
screen_font.data = font.data;
return true;
}
else
return false;
}
//----------------------------------------------------------------------
bool FTermLinux::getUnicodeMap()

View File

@ -628,7 +628,6 @@ void FTermXTerminal::resetXTermColorMap()
oscPostfix();
std::fflush(stdout);
}
}
//----------------------------------------------------------------------

View File

@ -20,6 +20,8 @@
* <http://www.gnu.org/licenses/>. *
***********************************************************************/
#include <utility>
#include "final/fapplication.h"
#include "final/fevent.h"
#include "final/fmenubar.h"

View File

@ -109,7 +109,7 @@ class FApplication : public FWidget
FApplication& operator = (const FApplication&) = delete;
// Accessors
virtual const char* getClassName() const override;
const char* getClassName() const override;
int getArgc() const;
char** getArgv() const;
static FApplication* getApplicationObject();
@ -184,7 +184,7 @@ class FApplication : public FWidget
void processResizeEvent();
void processCloseWidget();
bool processNextEvent();
virtual void performTimerAction ( const FObject*
void performTimerAction ( const FObject*
, const FEvent* ) override;
// Data Members

View File

@ -85,7 +85,7 @@ class FButton : public FWidget
FButton& operator = (const FString&);
// Accessors
virtual const char* getClassName() const override;
const char* getClassName() const override;
FString& getText();
// Mutators
@ -99,13 +99,13 @@ class FButton : public FWidget
bool setNoUnderline(bool);
bool setNoUnderline();
bool unsetNoUnderline();
virtual bool setEnable(bool) override;
virtual bool setEnable() override;
virtual bool unsetEnable() override;
virtual bool setDisable() override;
virtual bool setFocus(bool) override;
virtual bool setFocus() override;
virtual bool unsetFocus() override;
bool setEnable(bool) override;
bool setEnable() override;
bool unsetEnable() override;
bool setDisable() override;
bool setFocus(bool) override;
bool setFocus() override;
bool unsetFocus() override;
bool setFlat(bool);
bool setFlat();
bool unsetFlat();
@ -127,17 +127,17 @@ class FButton : public FWidget
bool hasClickAnimation();
// Methods
virtual void hide() override;
void hide() override;
// Event handlers
virtual void onKeyPress (FKeyEvent*) override;
virtual void onMouseDown (FMouseEvent*) override;
virtual void onMouseUp (FMouseEvent*) override;
virtual void onMouseMove (FMouseEvent*) override;
virtual void onTimer (FTimerEvent*) override;
virtual void onAccel (FAccelEvent*) override;
virtual void onFocusIn (FFocusEvent*) override;
virtual void onFocusOut (FFocusEvent*) override;
void onKeyPress (FKeyEvent*) override;
void onMouseDown (FMouseEvent*) override;
void onMouseUp (FMouseEvent*) override;
void onMouseMove (FMouseEvent*) override;
void onTimer (FTimerEvent*) override;
void onAccel (FAccelEvent*) override;
void onFocusIn (FFocusEvent*) override;
void onFocusOut (FFocusEvent*) override;
private:
// Constants
@ -154,7 +154,7 @@ class FButton : public FWidget
void drawMarginRight();
void drawTopBottomBackground();
void drawButtonTextLine (wchar_t[]);
virtual void draw() override;
void draw() override;
void updateStatusBar();
void updateButtonColor();
void processClick();

View File

@ -86,7 +86,7 @@ class FButtonGroup : public FScrollView
FButtonGroup& operator = (const FButtonGroup&) = delete;
// Accessor
virtual const char* getClassName() const override;
const char* getClassName() const override;
FToggleButton* getFirstButton();
FToggleButton* getLastButton();
FToggleButton* getButton (int) const;
@ -94,10 +94,10 @@ class FButtonGroup : public FScrollView
FString& getText();
// Mutator
virtual bool setEnable(bool) override;
virtual bool setEnable() override;
virtual bool unsetEnable() override;
virtual bool setDisable() override;
bool setEnable(bool) override;
bool setEnable() override;
bool unsetEnable() override;
bool setDisable() override;
void setText (const FString&);
// Inquiries
@ -106,23 +106,23 @@ class FButtonGroup : public FScrollView
bool hasCheckedButton() const;
// Methods
virtual void hide() override;
void hide() override;
void insert (FToggleButton*);
void remove (FToggleButton*);
void checkScrollSize (FToggleButton*);
void checkScrollSize (const FRect&);
// Event handlers
virtual void onMouseDown (FMouseEvent*) override;
virtual void onAccel (FAccelEvent*) override;
virtual void onFocusIn (FFocusEvent*) override;
void onMouseDown (FMouseEvent*) override;
void onAccel (FAccelEvent*) override;
void onFocusIn (FFocusEvent*) override;
protected:
// Mutator
void setHotkeyAccelerator();
// Methods
virtual void draw() override;
void draw() override;
void drawLabel();
private:

View File

@ -3,7 +3,7 @@
* *
* This file is part of the Final Cut widget toolkit *
* *
* Copyright 2014-2018 Markus Gans *
* Copyright 2014-2019 Markus Gans *
* *
* The Final Cut is free software; you can redistribute it and/or *
* modify it under the terms of the GNU Lesser General Public License *
@ -86,12 +86,12 @@ class FCheckBox : public FToggleButton
FCheckBox& operator = (const FCheckBox&) = delete;
// Accessor
virtual const char* getClassName() const override;
const char* getClassName() const override;
private:
// Methods
void init();
virtual void draw() override;
void draw() override;
void drawCheckButton();
};
#pragma pack(pop)

View File

@ -86,13 +86,13 @@ class FCheckMenuItem : public FMenuItem
FCheckMenuItem& operator = (const FCheckMenuItem&) = delete;
// Accessor
virtual const char* getClassName() const override;
const char* getClassName() const override;
private:
// Methods
void init (FWidget*);
void processToggle();
virtual void processClicked() override;
void processClicked() override;
};
#pragma pack(pop)

View File

@ -52,7 +52,7 @@ class FColorPair
{
public:
// Constructors
FColorPair (FColor fg = fc::Default, FColor bg = fc::Default)
explicit FColorPair (FColor fg = fc::Default, FColor bg = fc::Default)
: fg_color(fg)
, bg_color(bg)
{ }

View File

@ -99,7 +99,7 @@ class FDialog : public FWindow
FDialog& operator = (const FDialog&) = delete;
// Accessors
virtual const char* getClassName() const override;
const char* getClassName() const override;
FString getText() const;
// Mutators
@ -109,7 +109,7 @@ class FDialog : public FWindow
bool setModal (bool);
bool setModal();
bool unsetModal();
virtual bool setResizeable (bool) override;
bool setResizeable (bool) override;
bool setScrollable (bool);
bool setScrollable();
bool unsetScrollable();
@ -120,16 +120,16 @@ class FDialog : public FWindow
bool isScrollable();
// Methods
virtual void show() override;
virtual void hide() override;
void show() override;
void hide() override;
int exec();
virtual void setPos (const FPoint&, bool = true) override;
virtual void move (const FPoint&) override;
void setPos (const FPoint&, bool = true) override;
void move (const FPoint&) override;
bool moveUp (int);
bool moveDown (int);
bool moveLeft (int);
bool moveRight (int);
virtual void setSize (const FSize&, bool = true) override;
void setSize (const FSize&, bool = true) override;
bool reduceHeight (int);
bool expandHeight (int);
bool reduceWidth (int);
@ -137,27 +137,27 @@ class FDialog : public FWindow
void activateDialog();
// Event handlers
virtual void onKeyPress (FKeyEvent*) override;
virtual void onMouseDown (FMouseEvent*) override;
virtual void onMouseUp (FMouseEvent*) override;
virtual void onMouseMove (FMouseEvent*) override;
virtual void onMouseDoubleClick (FMouseEvent*) override;
virtual void onAccel (FAccelEvent*) override;
virtual void onWindowActive (FEvent*) override;
virtual void onWindowInactive (FEvent*) override;
virtual void onWindowRaised (FEvent*) override;
virtual void onWindowLowered (FEvent*) override;
void onKeyPress (FKeyEvent*) override;
void onMouseDown (FMouseEvent*) override;
void onMouseUp (FMouseEvent*) override;
void onMouseMove (FMouseEvent*) override;
void onMouseDoubleClick (FMouseEvent*) override;
void onAccel (FAccelEvent*) override;
void onWindowActive (FEvent*) override;
void onWindowInactive (FEvent*) override;
void onWindowRaised (FEvent*) override;
void onWindowLowered (FEvent*) override;
protected:
// Methods
virtual void done (int);
virtual void draw() override;
void draw() override;
void drawDialogShadow();
// Event handlers
virtual void onShow (FShowEvent*) override;
virtual void onHide (FHideEvent*) override;
virtual void onClose (FCloseEvent*) override;
void onShow (FShowEvent*) override;
void onHide (FHideEvent*) override;
void onClose (FCloseEvent*) override;
private:
// Typedef
@ -183,7 +183,7 @@ class FDialog : public FWindow
void initMoveSizeMenuItem (FMenu*);
void initZoomMenuItem (FMenu*);
void initCloseMenuItem (FMenu*);
virtual void drawBorder() override;
void drawBorder() override;
void drawTitleBar();
void drawBarButton();
void drawZoomButton();

View File

@ -3,7 +3,7 @@
* *
* This file is part of the Final Cut widget toolkit *
* *
* Copyright 2016-2018 Markus Gans *
* Copyright 2016-2019 Markus Gans *
* *
* The Final Cut is free software; you can redistribute it and/or *
* modify it under the terms of the GNU Lesser General Public License *
@ -92,7 +92,7 @@ class FDialogListMenu : public FMenu
FDialogListMenu& operator = (const FDialogListMenu&) = delete;
// Accessors
virtual const char* getClassName() const override;
const char* getClassName() const override;
private:
// Method

View File

@ -118,7 +118,7 @@ class FFileDialog : public FDialog
FFileDialog& operator = (const FFileDialog&);
// Accessors
virtual const char* getClassName() const override;
const char* getClassName() const override;
const FString getPath() const;
const FString getFilter() const;
const FString getSelectedFile() const;
@ -132,7 +132,7 @@ class FFileDialog : public FDialog
bool unsetShowHiddenFiles();
// Event handler
virtual void onKeyPress (FKeyEvent*) override;
void onKeyPress (FKeyEvent*) override;
// Methods
static const FString fileOpenChooser ( FWidget*
@ -149,7 +149,7 @@ class FFileDialog : public FDialog
protected:
// Method
virtual void adjustSize() override;
void adjustSize() override;
private:
// Typedef
@ -175,7 +175,7 @@ class FFileDialog : public FDialog
void initCallbacks();
bool pattern_match (const char* const, char[]);
void clear();
int numOfDirs();
long numOfDirs();
void sortDir();
int readDir();
void getEntry (const char* const, struct dirent*);

View File

@ -35,6 +35,7 @@
#error "Only <final/final.h> can be included directly."
#endif
#include <sys/time.h>
#include "final/ftypes.h"
namespace finalcut

View File

@ -101,7 +101,7 @@ class FLabel : public FWidget
const FLabel& operator >> (FString&);
// Accessors
virtual const char* getClassName() const override;
const char* getClassName() const override;
FWidget* getAccelWidget();
fc::text_alignment getAlignment();
FString& getText();
@ -115,7 +115,7 @@ class FLabel : public FWidget
bool setReverseMode(bool);
bool setReverseMode();
bool unsetReverseMode();
virtual bool setEnable (bool) override;
bool setEnable (bool) override;
void setNumber (uLong);
void setNumber (long);
void setNumber (float, int = FLT_DIG);
@ -128,12 +128,12 @@ class FLabel : public FWidget
bool hasReverseMode();
// Methods
virtual void hide() override;
void hide() override;
void clear();
// Event handlers
virtual void onMouseDown (FMouseEvent*) override;
virtual void onAccel (FAccelEvent*) override;
void onMouseDown (FMouseEvent*) override;
void onAccel (FAccelEvent*) override;
// Callback method
void cb_accel_widget_destroyed (FWidget*, FDataPtr);
@ -147,7 +147,7 @@ class FLabel : public FWidget
std::size_t getHotkeyPos (wchar_t[], wchar_t[], std::size_t);
void setHotkeyAccelerator();
std::size_t getAlignOffset (std::size_t);
virtual void draw() override;
void draw() override;
void drawMultiLine();
void drawSingleLine();
void printLine ( wchar_t[], std::size_t

View File

@ -52,6 +52,7 @@
#error "Only <final/final.h> can be included directly."
#endif
#include <limits>
#include "final/fwidget.h"
namespace finalcut
@ -108,7 +109,7 @@ class FLineEdit : public FWidget
const FLineEdit& operator >> (FString&);
// Accessors
virtual const char* getClassName() const override;
const char* getClassName() const override;
FString getText() const;
std::size_t getMaxLength() const;
std::size_t getCursorPosition() const;
@ -122,15 +123,15 @@ class FLineEdit : public FWidget
void setCursorPosition (std::size_t);
void setLabelText (const FString&);
void setLabelOrientation (const label_o);
virtual void setGeometry ( const FPoint&, const FSize&
void setGeometry ( const FPoint&, const FSize&
, bool = true ) override;
virtual bool setEnable(bool) override;
virtual bool setEnable() override;
virtual bool unsetEnable() override;
virtual bool setDisable() override;
virtual bool setFocus(bool) override;
virtual bool setFocus() override;
virtual bool unsetFocus() override;
bool setEnable(bool) override;
bool setEnable() override;
bool unsetEnable() override;
bool setDisable() override;
bool setFocus(bool) override;
bool setFocus() override;
bool unsetFocus() override;
bool setShadow(bool);
bool setShadow();
bool unsetShadow();
@ -139,23 +140,23 @@ class FLineEdit : public FWidget
bool hasShadow();
// Methods
virtual void hide() override;
void hide() override;
void clear();
// Event handlers
virtual void onKeyPress (FKeyEvent*) override;
virtual void onMouseDown (FMouseEvent*) override;
virtual void onMouseUp (FMouseEvent*) override;
virtual void onMouseMove (FMouseEvent*) override;
virtual void onTimer (FTimerEvent*) override;
virtual void onAccel (FAccelEvent*) override;
virtual void onHide (FHideEvent*) override;
virtual void onFocusIn (FFocusEvent*) override;
virtual void onFocusOut (FFocusEvent*) override;
void onKeyPress (FKeyEvent*) override;
void onMouseDown (FMouseEvent*) override;
void onMouseUp (FMouseEvent*) override;
void onMouseMove (FMouseEvent*) override;
void onTimer (FTimerEvent*) override;
void onAccel (FAccelEvent*) override;
void onHide (FHideEvent*) override;
void onFocusIn (FFocusEvent*) override;
void onFocusOut (FFocusEvent*) override;
protected:
void adjustLabel();
virtual void adjustSize() override;
void adjustSize() override;
private:
// Enumeration
@ -169,7 +170,7 @@ class FLineEdit : public FWidget
// Methods
void init();
bool hasHotkey();
virtual void draw() override;
void draw() override;
void drawInputField();
void keyLeft();
void keyRight();

View File

@ -170,7 +170,7 @@ class FListBox : public FWidget
FListBox& operator = (const FListBox&) = delete;
// Accessors
virtual const char* getClassName() const override;
const char* getClassName() const override;
std::size_t getCount() const;
FListBoxItem getItem (std::size_t);
FListBoxItem getItem (listBoxItems::iterator) const;
@ -187,15 +187,15 @@ class FListBox : public FWidget
void showInsideBrackets (std::size_t, fc::brackets_type);
void showNoBrackets (std::size_t);
void showNoBrackets (listBoxItems::iterator);
virtual void setGeometry ( const FPoint&, const FSize&
void setGeometry ( const FPoint&, const FSize&
, bool = true ) override;
void setMultiSelection (bool);
void setMultiSelection ();
void unsetMultiSelection ();
virtual bool setDisable() override;
virtual bool setFocus (bool) override;
virtual bool setFocus() override;
virtual bool unsetFocus() override;
bool setDisable() override;
bool setFocus (bool) override;
bool setFocus() override;
bool unsetFocus() override;
void setText (const FString&);
// Inquiries
@ -206,7 +206,7 @@ class FListBox : public FWidget
bool hasBrackets (listBoxItems::iterator) const;
// Methods
virtual void hide() override;
void hide() override;
template <typename Iterator, typename InsertConverter>
void insert (Iterator, Iterator, InsertConverter);
template <typename Container, typename LazyConverter>
@ -227,20 +227,20 @@ class FListBox : public FWidget
void clear();
// Event handlers
virtual void onKeyPress (FKeyEvent*) override;
virtual void onMouseDown (FMouseEvent*) override;
virtual void onMouseUp (FMouseEvent*) override;
virtual void onMouseMove (FMouseEvent*) override;
virtual void onMouseDoubleClick (FMouseEvent*) override;
virtual void onWheel (FWheelEvent*) override;
virtual void onTimer (FTimerEvent*) override;
virtual void onFocusIn (FFocusEvent*) override;
virtual void onFocusOut (FFocusEvent*) override;
void onKeyPress (FKeyEvent*) override;
void onMouseDown (FMouseEvent*) override;
void onMouseUp (FMouseEvent*) override;
void onMouseMove (FMouseEvent*) override;
void onMouseDoubleClick (FMouseEvent*) override;
void onWheel (FWheelEvent*) override;
void onTimer (FTimerEvent*) override;
void onFocusIn (FFocusEvent*) override;
void onFocusOut (FFocusEvent*) override;
protected:
// Methods
void adjustYOffset (std::size_t);
virtual void adjustSize() override;
void adjustSize() override;
private:
// Typedef
@ -267,7 +267,7 @@ class FListBox : public FWidget
void initScrollbar ( FScrollbarPtr&
, fc::orientation
, FListBoxCallback );
virtual void draw() override;
void draw() override;
void drawHeadline();
void drawList();
void drawListLine (int, listBoxItems::iterator, bool);

View File

@ -92,7 +92,7 @@ class FListViewItem : public FObject
FListViewItem& operator = (const FListViewItem&);
// Accessors
virtual const char* getClassName() const override;
const char* getClassName() const override;
uInt getColumnCount() const;
int getSortColumn() const;
FString getText (int) const;
@ -285,7 +285,7 @@ class FListView : public FWidget
FListView& operator = (const FListView&) = delete;
// Accessors
virtual const char* getClassName() const override;
const char* getClassName() const override;
std::size_t getCount();
fc::text_alignment getColumnAlignment (int) const;
FString getColumnText (int) const;
@ -295,7 +295,7 @@ class FListView : public FWidget
FListViewItem* getCurrentItem();
// Mutators
virtual void setGeometry ( const FPoint&, const FSize&
void setGeometry ( const FPoint&, const FSize&
, bool = true ) override;
void setColumnAlignment (int, fc::text_alignment);
void setColumnText (int, const FString&);
@ -314,7 +314,7 @@ class FListView : public FWidget
// Methods
virtual int addColumn (const FString&, int = USE_MAX_SIZE);
virtual void hide() override;
void hide() override;
FObjectIterator insert (FListViewItem*);
FObjectIterator insert (FListViewItem*, FObjectIterator);
FObjectIterator insert ( const FStringList&
@ -350,15 +350,15 @@ class FListView : public FWidget
virtual void sort();
// Event handlers
virtual void onKeyPress (FKeyEvent*) override;
virtual void onMouseDown (FMouseEvent*) override;
virtual void onMouseUp (FMouseEvent*) override;
virtual void onMouseMove (FMouseEvent*) override;
virtual void onMouseDoubleClick (FMouseEvent*) override;
virtual void onWheel (FWheelEvent*) override;
virtual void onTimer (FTimerEvent*) override;
virtual void onFocusIn (FFocusEvent*) override;
virtual void onFocusOut (FFocusEvent*) override;
void onKeyPress (FKeyEvent*) override;
void onMouseDown (FMouseEvent*) override;
void onMouseUp (FMouseEvent*) override;
void onMouseMove (FMouseEvent*) override;
void onMouseDoubleClick (FMouseEvent*) override;
void onWheel (FWheelEvent*) override;
void onTimer (FTimerEvent*) override;
void onFocusIn (FFocusEvent*) override;
void onFocusOut (FFocusEvent*) override;
// Data Members
static FObjectIterator null_iter;
@ -366,7 +366,7 @@ class FListView : public FWidget
protected:
// Methods
void adjustViewport (int);
virtual void adjustSize() override;
void adjustSize() override;
private:
// Typedef
@ -393,7 +393,7 @@ class FListView : public FWidget
std::size_t getAlignOffset ( fc::text_alignment
, std::size_t
, std::size_t );
virtual void draw() override;
void draw() override;
void drawHeadlines();
void drawList();
void drawListLine (const FListViewItem*, bool, bool);

View File

@ -93,21 +93,21 @@ class FMenu : public FWindow, public FMenuList
FMenu& operator = (const FMenu&) = delete;
// Accessors
virtual const char* getClassName() const override;
const char* getClassName() const override;
FString getText() const;
FMenuItem* getItem();
// Mutators
virtual bool setEnable(bool) override;
virtual bool setEnable() override;
virtual bool unsetEnable() override;
virtual bool setDisable() override;
bool setEnable (bool) override;
bool setEnable() override;
bool unsetEnable() override;
bool setDisable() override;
void setSelected();
void unsetSelected();
bool setMenuWidget (bool);
bool setMenuWidget();
bool unsetMenuWidget();
virtual void setStatusbarMessage (const FString&) override;
void setStatusbarMessage (const FString&) override;
void setMenu (FMenu*);
void setText (const FString&);
@ -118,15 +118,15 @@ class FMenu : public FWindow, public FMenuList
bool hasMenu() const;
// Methods
virtual void show() override;
virtual void hide() override;
void show() override;
void hide() override;
// Event handlers
virtual void onKeyPress (FKeyEvent*) override;
virtual void onMouseDown (FMouseEvent*) override;
virtual void onMouseUp (FMouseEvent*) override;
virtual void onMouseMove (FMouseEvent*) override;
virtual void onAccel (FAccelEvent*) override;
void onKeyPress (FKeyEvent*) override;
void onMouseDown (FMouseEvent*) override;
void onMouseUp (FMouseEvent*) override;
void onMouseMove (FMouseEvent*) override;
void onAccel (FAccelEvent*) override;
// Callback method
void cb_menuitem_toggled (FWidget*, FDataPtr);
@ -203,7 +203,7 @@ class FMenu : public FWindow, public FMenuList
void keypressMenuBar (FKeyEvent*);
bool hotkeyMenu (FKeyEvent*);
std::size_t getHotkeyPos (wchar_t[], wchar_t[], std::size_t);
virtual void draw() override;
void draw() override;
void drawItems();
void drawSeparator (int);
void drawMenuLine (FMenuItem*, int);

View File

@ -91,19 +91,19 @@ class FMenuBar : public FWindow, public FMenuList
FMenuBar& operator = (const FMenuBar&) = delete;
// Accessors
virtual const char* getClassName() const override;
const char* getClassName() const override;
// Methods
void resetMenu();
virtual void hide() override;
virtual void adjustSize() override;
void hide() override;
void adjustSize() override;
// Event handlers
virtual void onKeyPress (FKeyEvent*) override;
virtual void onMouseDown (FMouseEvent*) override;
virtual void onMouseUp (FMouseEvent*) override;
virtual void onMouseMove (FMouseEvent*) override;
virtual void onAccel (FAccelEvent*) override;
void onKeyPress (FKeyEvent*) override;
void onMouseDown (FMouseEvent*) override;
void onMouseUp (FMouseEvent*) override;
void onMouseMove (FMouseEvent*) override;
void onAccel (FAccelEvent*) override;
// Callback methods
void cb_item_deactivated (FWidget*, FDataPtr);
@ -132,7 +132,7 @@ class FMenuBar : public FWindow, public FMenuList
bool selectPrevItem();
bool hotkeyMenu (FKeyEvent*&);
std::size_t getHotkeyPos (wchar_t[], wchar_t[], std::size_t);
virtual void draw() override;
void draw() override;
void drawItems();
void drawItem (FMenuItem*, std::size_t&);
void setLineAttributes (FMenuItem*);

View File

@ -96,17 +96,17 @@ class FMenuItem : public FWidget
FMenuItem& operator = (const FMenuItem&) = delete;
// Accessors
virtual const char* getClassName() const override;
const char* getClassName() const override;
uChar getHotkey() const;
FMenu* getMenu() const;
std::size_t getTextLength() const;
FString getText() const;
// Mutators
virtual bool setEnable (bool) override;
virtual bool setFocus (bool) override;
virtual bool setFocus() override;
virtual bool unsetFocus() override;
bool setEnable (bool) override;
bool setFocus (bool) override;
bool setFocus() override;
bool unsetFocus() override;
void setSelected();
void unsetSelected();
void setSeparator();
@ -124,19 +124,19 @@ class FMenuItem : public FWidget
bool hasMenu() const;
// Methods
virtual void addAccelerator (FKey, FWidget*) override;
virtual void delAccelerator (FWidget*) override;
void addAccelerator (FKey, FWidget*) override;
void delAccelerator (FWidget*) override;
void openMenu();
// Event handlers
virtual void onKeyPress (FKeyEvent*) override;
virtual void onMouseDoubleClick (FMouseEvent*) override;
virtual void onMouseDown (FMouseEvent*) override;
virtual void onMouseUp (FMouseEvent*) override;
virtual void onMouseMove (FMouseEvent*) override;
virtual void onAccel (FAccelEvent*) override;
virtual void onFocusIn (FFocusEvent*) override;
virtual void onFocusOut (FFocusEvent*) override;
void onKeyPress (FKeyEvent*) override;
void onMouseDoubleClick (FMouseEvent*) override;
void onMouseDown (FMouseEvent*) override;
void onMouseUp (FMouseEvent*) override;
void onMouseMove (FMouseEvent*) override;
void onAccel (FAccelEvent*) override;
void onFocusIn (FFocusEvent*) override;
void onFocusOut (FFocusEvent*) override;
protected:
// Accessor

View File

@ -109,7 +109,7 @@ class FMessageBox : public FDialog
FMessageBox& operator = (const FMessageBox&);
// Accessor
virtual const char* getClassName() const override;
const char* getClassName() const override;
const FString getTitlebarText() const;
const FString getHeadline() const;
const FString getText() const;
@ -139,7 +139,7 @@ class FMessageBox : public FDialog
, int = 0 );
protected:
// Method
virtual void adjustSize() override;
void adjustSize() override;
// Callback method
void cb_processClick (FWidget*, FDataPtr);
@ -151,7 +151,7 @@ class FMessageBox : public FDialog
void deallocation();
void initCallbacks();
void calculateDimensions();
virtual void draw() override;
void draw() override;
void resizeButtons();
void adjustButtons();

View File

@ -199,18 +199,18 @@ class FMouseGPM final : public FMouse
virtual ~FMouseGPM();
// Accessors
virtual const char* getClassName() const override;
const char* getClassName() const override;
// Mutators
void setStdinNo(int);
// Inquiry
virtual bool hasData() override;
bool hasData() override;
bool isGpmMouseEnabled();
// Methods
virtual void setRawData (FKeyboard::keybuffer&) override;
virtual void processEvent (struct timeval*) override;
void setRawData (FKeyboard::keybuffer&) override;
void processEvent (struct timeval*) override;
bool gpmMouse (bool);
bool enableGpmMouse();
bool disableGpmMouse();
@ -271,14 +271,14 @@ class FMouseX11 final : public FMouse
virtual ~FMouseX11() = default;
// Accessors
virtual const char* getClassName() const override;
const char* getClassName() const override;
// Inquiry
virtual bool hasData() override;
bool hasData() override;
// Methods
virtual void setRawData (FKeyboard::keybuffer&) override;
virtual void processEvent (struct timeval*) override;
void setRawData (FKeyboard::keybuffer&) override;
void processEvent (struct timeval*) override;
private:
// Enumeration
@ -334,14 +334,14 @@ class FMouseSGR final : public FMouse
virtual ~FMouseSGR() = default;
// Accessors
virtual const char* getClassName() const override;
const char* getClassName() const override;
// Inquiry
virtual bool hasData() override;
bool hasData() override;
// Methods
virtual void setRawData (FKeyboard::keybuffer&) override;
virtual void processEvent (struct timeval*) override;
void setRawData (FKeyboard::keybuffer&) override;
void processEvent (struct timeval*) override;
private:
// Enumeration
@ -397,14 +397,14 @@ class FMouseUrxvt final : public FMouse
virtual ~FMouseUrxvt() = default;
// Accessors
virtual const char* getClassName() const override;
const char* getClassName() const override;
// Inquiry
virtual bool hasData() override;
bool hasData() override;
// Methods
virtual void setRawData (FKeyboard::keybuffer&) override;
virtual void processEvent (struct timeval*) override;
void setRawData (FKeyboard::keybuffer&) override;
void processEvent (struct timeval*) override;
private:
// Enumeration

View File

@ -77,12 +77,12 @@ class FProgressbar : public FWidget
virtual ~FProgressbar();
// Accessors
virtual const char* getClassName() const override;
const char* getClassName() const override;
std::size_t getPercentage();
// Mutators
void setPercentage (std::size_t);
virtual void setGeometry ( const FPoint&, const FSize&
void setGeometry ( const FPoint&, const FSize&
, bool = true ) override;
bool setShadow (bool);
bool setShadow();
@ -92,7 +92,7 @@ class FProgressbar : public FWidget
bool hasShadow();
// Methods
virtual void hide() override;
void hide() override;
void reset();
private:
@ -100,7 +100,7 @@ class FProgressbar : public FWidget
static constexpr std::size_t NOT_SET = static_cast<std::size_t>(-1);
// Methods
virtual void draw() override;
void draw() override;
void drawProgressLabel();
void drawProgressBar();
std::size_t drawProgressIndicator();

View File

@ -3,7 +3,7 @@
* *
* This file is part of the Final Cut widget toolkit *
* *
* Copyright 2014-2018 Markus Gans *
* Copyright 2014-2019 Markus Gans *
* *
* The Final Cut is free software; you can redistribute it and/or *
* modify it under the terms of the GNU Lesser General Public License *
@ -86,12 +86,12 @@ class FRadioButton : public FToggleButton
FRadioButton& operator = (const FRadioButton&) = delete;
// Accessor
virtual const char* getClassName() const override;
const char* getClassName() const override;
private:
// Methods
void init();
virtual void draw() override;
void draw() override;
void drawRadioButton();
};
#pragma pack(pop)

View File

@ -86,13 +86,13 @@ class FRadioMenuItem : public FMenuItem
FRadioMenuItem& operator = (const FRadioMenuItem&) = delete;
// Accessor
virtual const char* getClassName() const override;
const char* getClassName() const override;
private:
// Methods
void init (FWidget*);
void processToggle();
virtual void processClicked() override;
void processClicked() override;
};
#pragma pack(pop)

View File

@ -97,7 +97,7 @@ class FScrollbar : public FWidget
FScrollbar& operator = (const FScrollbar&) = delete;
// Accessors
virtual const char* getClassName() const override;
const char* getClassName() const override;
int getValue() const;
sType getScrollType() const;
@ -109,28 +109,28 @@ class FScrollbar : public FWidget
void setSteps (double);
void setPageSize (int, int);
void setOrientation (fc::orientation);
virtual void setGeometry ( const FPoint&, const FSize&
void setGeometry ( const FPoint&, const FSize&
, bool = true ) override;
// Methods
virtual void resize() override;
virtual void redraw() override;
void resize() override;
void redraw() override;
void calculateSliderValues();
void drawVerticalBar();
void drawHorizontalBar();
void drawBar();
// Event handlers
virtual void onMouseDown (FMouseEvent*) override;
virtual void onMouseUp (FMouseEvent*) override;
virtual void onMouseMove (FMouseEvent*) override;
virtual void onWheel (FWheelEvent*) override;
virtual void onTimer (FTimerEvent*) override;
void onMouseDown (FMouseEvent*) override;
void onMouseUp (FMouseEvent*) override;
void onMouseMove (FMouseEvent*) override;
void onWheel (FWheelEvent*) override;
void onTimer (FTimerEvent*) override;
private:
// Methods
void init();
virtual void draw() override;
void draw() override;
void drawButtons();
sType getClickedScrollType (int, int);
sType getVerticalClickedScrollType (int);

View File

@ -87,7 +87,7 @@ class FScrollView : public FWidget
FScrollView& operator = (const FScrollView&) = delete;
// Accessors
virtual const char* getClassName() const override;
const char* getClassName() const override;
std::size_t getViewportWidth() const;
std::size_t getViewportHeight() const;
const FSize getViewportSize();
@ -102,13 +102,13 @@ class FScrollView : public FWidget
virtual void setScrollWidth (std::size_t);
virtual void setScrollHeight (std::size_t);
virtual void setScrollSize (const FSize&);
virtual void setX (int, bool = true) override;
virtual void setY (int, bool = true) override;
virtual void setPos (const FPoint&, bool = true) override;
virtual void setWidth (std::size_t, bool = true) override;
virtual void setHeight (std::size_t, bool = true) override;
virtual void setSize (const FSize&, bool = true) override;
virtual void setGeometry ( const FPoint&, const FSize&
void setX (int, bool = true) override;
void setY (int, bool = true) override;
void setPos (const FPoint&, bool = true) override;
void setWidth (std::size_t, bool = true) override;
void setHeight (std::size_t, bool = true) override;
void setSize (const FSize&, bool = true) override;
void setGeometry ( const FPoint&, const FSize&
, bool = true ) override;
void setCursorPos (const FPoint&);
void setPrintPos (const FPoint&);
@ -126,30 +126,30 @@ class FScrollView : public FWidget
bool isViewportPrint();
// Method
virtual void clearArea (int = ' ') override;
void clearArea (int = ' ') override;
void scrollToX (int);
void scrollToY (int);
void scrollTo (const FPoint&);
void scrollTo (int, int);
void scrollBy (int, int);
virtual void draw() override;
void draw() override;
// Event handlers
virtual void onKeyPress (FKeyEvent*) override;
virtual void onWheel (FWheelEvent*) override;
virtual void onFocusIn (FFocusEvent*) override;
virtual void onChildFocusIn (FFocusEvent*) override;
virtual void onChildFocusOut (FFocusEvent*) override;
void onKeyPress (FKeyEvent*) override;
void onWheel (FWheelEvent*) override;
void onFocusIn (FFocusEvent*) override;
void onChildFocusIn (FFocusEvent*) override;
void onChildFocusOut (FFocusEvent*) override;
protected:
// Using-declaration
using FVTerm::clearArea;
// Accessor
virtual term_area* getPrintArea() override;
term_area* getPrintArea() override;
// Method
virtual void adjustSize() override;
void adjustSize() override;
void copy2area();
private:

View File

@ -35,6 +35,7 @@
#error "Only <final/final.h> can be included directly."
#endif
#include <limits>
#include <iostream>
#include "final/ftypes.h"

View File

@ -94,7 +94,7 @@ class FStatusKey : public FWidget
FStatusKey& operator = (const FStatusKey&) = delete;
// Accessors
virtual const char* getClassName() const override;
const char* getClassName() const override;
virtual FKey getKey() const;
virtual FString getText() const;
@ -112,7 +112,7 @@ class FStatusKey : public FWidget
bool hasMouseFocus() const;
// Event handler
virtual void onAccel (FAccelEvent*) override;
void onAccel (FAccelEvent*) override;
private:
// Methods
@ -207,7 +207,7 @@ class FStatusBar : public FWindow
FStatusBar& operator = (const FStatusBar&) = delete;
// Accessors
virtual const char* getClassName() const override;
const char* getClassName() const override;
FStatusKey* getStatusKey (int) const;
FString getMessage() const;
std::size_t getCount() const;
@ -222,19 +222,19 @@ class FStatusBar : public FWindow
bool hasActivatedKey();
// Methods
virtual void hide() override;
void hide() override;
void drawMessage();
void clearMessage();
void insert (FStatusKey*);
void remove (FStatusKey*);
void remove (int);
void clear();
virtual void adjustSize() override;
void adjustSize() override;
// Event handlers
virtual void onMouseDown (FMouseEvent*) override;
virtual void onMouseUp (FMouseEvent*) override;
virtual void onMouseMove (FMouseEvent*) override;
void onMouseDown (FMouseEvent*) override;
void onMouseUp (FMouseEvent*) override;
void onMouseMove (FMouseEvent*) override;
// Callback method
void cb_statuskey_activated (FWidget*, FDataPtr);
@ -245,7 +245,7 @@ class FStatusBar : public FWindow
// Methods
void init();
virtual void draw() override;
void draw() override;
void drawKeys();
void drawKey (keyList::const_iterator);
void drawActiveKey (keyList::const_iterator);

View File

@ -3,7 +3,7 @@
* *
* This file is part of the Final Cut widget toolkit *
* *
* Copyright 2015-2018 Markus Gans *
* Copyright 2015-2019 Markus Gans *
* *
* The Final Cut is free software; you can redistribute it and/or *
* modify it under the terms of the GNU Lesser General Public License *
@ -86,19 +86,19 @@ class FSwitch : public FToggleButton
FSwitch& operator = (const FSwitch&) = delete;
// Accessor
virtual const char* getClassName() const override;
const char* getClassName() const override;
// Mutator
virtual void setText (const FString&) override;
void setText (const FString&) override;
// Event handlers
virtual void onKeyPress (FKeyEvent*) override;
virtual void onMouseDown (FMouseEvent*) override;
virtual void onMouseUp (FMouseEvent*) override;
void onKeyPress (FKeyEvent*) override;
void onMouseDown (FMouseEvent*) override;
void onMouseUp (FMouseEvent*) override;
private:
// Methods
virtual void draw() override;
void draw() override;
void drawCheckButton();
void drawChecked();
void drawUnchecked();

View File

@ -94,18 +94,18 @@ class FSystemImpl : public FSystem
// Methods
#if defined(__linux__)
#if defined(__x86_64__) || defined(__i386) || defined(__arm__)
virtual uChar inPortByte (uShort port) override
uChar inPortByte (uShort port) override
{
return ::inb (port);
}
#else
virtual uChar inPortByte (uShort) override
uChar inPortByte (uShort) override
{
return 0;
}
#endif
#else
virtual uChar inPortByte (uShort) override
uChar inPortByte (uShort) override
{
return 0;
}
@ -114,26 +114,26 @@ class FSystemImpl : public FSystem
#if defined(__linux__)
#if defined(__x86_64__) || defined(__i386) || defined(__arm__)
virtual void outPortByte (uChar value, uShort port) override
void outPortByte (uChar value, uShort port) override
{
::outb (value, port);
}
#else
virtual void outPortByte (uChar, uShort) override
void outPortByte (uChar, uShort) override
{ }
#endif
#else
virtual void outPortByte (uChar, uShort) override
void outPortByte (uChar, uShort) override
{ }
#endif
virtual int isTTY (int fd) override
int isTTY (int fd) override
{
return ::isatty(fd);
}
virtual int ioctl (int fd, uLong request, ...) override
int ioctl (int fd, uLong request, ...) override
{
va_list args;
va_start (args, request);
@ -143,7 +143,7 @@ class FSystemImpl : public FSystem
return ret;
}
virtual int open (const char* pathname, int flags, ...) override
int open (const char* pathname, int flags, ...) override
{
va_list args;
va_start (args, flags);
@ -153,22 +153,22 @@ class FSystemImpl : public FSystem
return ret;
}
virtual int close (int fildes) override
int close (int fildes) override
{
return ::close(fildes);
}
virtual FILE* fopen (const char* path, const char* mode) override
FILE* fopen (const char* path, const char* mode) override
{
return std::fopen (path, mode);
}
virtual int fclose (FILE* fp) override
int fclose (FILE* fp) override
{
return std::fclose (fp);
}
virtual int putchar (int c) override
int putchar (int c) override
{
#if defined(__sun) && defined(__SVR4)
return std::putchar(char(c));
@ -177,7 +177,7 @@ class FSystemImpl : public FSystem
#endif
}
virtual int tputs (const char* str, int affcnt, int (*putc)(int)) override
int tputs (const char* str, int affcnt, int (*putc)(int)) override
{
#if defined(__sun) && defined(__SVR4)
return ::tputs (C_STR(str), affcnt, reinterpret_cast<int (*)(char)>(putc));
@ -186,7 +186,7 @@ class FSystemImpl : public FSystem
#endif
}
virtual uid_t getuid() override
uid_t getuid() override
{
return ::getuid();
}

View File

@ -50,6 +50,7 @@
#include <cstdio> // need for sprintf
#include <cstring>
#include <vector>
#include "final/ftermdata.h"

View File

@ -89,14 +89,14 @@ class FTextView : public FWidget
FTextView& operator = (const FTextView&) = delete;
// Accessors
virtual const char* getClassName() const override;
const char* getClassName() const override;
std::size_t getColumns() const;
std::size_t getRows() const;
const FString getText() const;
const FStringList& getLines() const;
// Mutators
virtual void setGeometry ( const FPoint&, const FSize&
void setGeometry ( const FPoint&, const FSize&
, bool = true ) override;
void setText (const FString&);
void scrollToX (int);
@ -106,7 +106,7 @@ class FTextView : public FWidget
void scrollBy (int, int);
// Methods
virtual void hide() override;
void hide() override;
template<typename T>
void append (const std::initializer_list<T>&);
void append (const FString&);
@ -119,17 +119,17 @@ class FTextView : public FWidget
void clear();
// Event handlers
virtual void onKeyPress (FKeyEvent*) override;
virtual void onMouseDown (FMouseEvent*) override;
virtual void onMouseUp (FMouseEvent*) override;
virtual void onMouseMove (FMouseEvent*) override;
virtual void onWheel (FWheelEvent*) override;
virtual void onFocusIn (FFocusEvent*) override;
virtual void onFocusOut (FFocusEvent*) override;
void onKeyPress (FKeyEvent*) override;
void onMouseDown (FMouseEvent*) override;
void onMouseUp (FMouseEvent*) override;
void onMouseMove (FMouseEvent*) override;
void onWheel (FWheelEvent*) override;
void onFocusIn (FFocusEvent*) override;
void onFocusOut (FFocusEvent*) override;
protected:
// Method
virtual void adjustSize() override;
void adjustSize() override;
private:
// Typedef
@ -149,7 +149,7 @@ class FTextView : public FWidget
void initScrollbar ( FScrollbarPtr&
, fc::orientation
, FTextViewCallback );
virtual void draw() override;
void draw() override;
void drawText();
void processChanged();

View File

@ -87,22 +87,22 @@ class FToggleButton : public FWidget
FToggleButton& operator = (const FToggleButton&) = delete;
// Accessors
virtual const char* getClassName() const override;
const char* getClassName() const override;
FString& getText();
// Mutators
virtual void setGeometry ( const FPoint&, const FSize&
void setGeometry ( const FPoint&, const FSize&
, bool = true ) override;
bool setNoUnderline (bool);
bool setNoUnderline();
bool unsetNoUnderline();
virtual bool setEnable (bool) override;
virtual bool setEnable() override;
virtual bool unsetEnable() override;
virtual bool setDisable() override;
virtual bool setFocus (bool) override;
virtual bool setFocus() override;
virtual bool unsetFocus() override;
bool setEnable (bool) override;
bool setEnable() override;
bool unsetEnable() override;
bool setDisable() override;
bool setFocus (bool) override;
bool setFocus() override;
bool unsetFocus() override;
bool setChecked (bool);
bool setChecked();
bool unsetChecked();
@ -112,15 +112,15 @@ class FToggleButton : public FWidget
bool isChecked();
// Methods
virtual void hide() override;
void hide() override;
// Event handlers
virtual void onMouseDown (FMouseEvent*) override;
virtual void onMouseUp (FMouseEvent*) override;
virtual void onWheel (FWheelEvent*) override;
virtual void onAccel (FAccelEvent*) override;
virtual void onFocusIn (FFocusEvent*) override;
virtual void onFocusOut (FFocusEvent*) override;
void onMouseDown (FMouseEvent*) override;
void onMouseUp (FMouseEvent*) override;
void onWheel (FWheelEvent*) override;
void onAccel (FAccelEvent*) override;
void onFocusIn (FFocusEvent*) override;
void onFocusOut (FFocusEvent*) override;
protected:
// Accessor
@ -135,13 +135,13 @@ class FToggleButton : public FWidget
bool hasGroup() const;
// Methods
virtual void draw() override;
void draw() override;
void drawLabel();
void processClick();
void processToggle();
// Event handler
virtual void onKeyPress (FKeyEvent*) override;
void onKeyPress (FKeyEvent*) override;
// Data Members
bool checked{false};

View File

@ -3,7 +3,7 @@
* *
* This file is part of the Final Cut widget toolkit *
* *
* Copyright 2016-2018 Markus Gans *
* Copyright 2016-2019 Markus Gans *
* *
* The Final Cut is free software; you can redistribute it and/or *
* modify it under the terms of the GNU Lesser General Public License *
@ -88,25 +88,25 @@ class FToolTip : public FWindow
FToolTip& operator = (const FToolTip&) = delete;
// Accessors
virtual const char* getClassName() const override;
const char* getClassName() const override;
const FString getText() const;
// Mutators
void setText (const FString&);
// Methods
virtual void draw() override;
virtual void show() override;
virtual void hide() override;
void draw() override;
void show() override;
void hide() override;
// Event handler
virtual void onMouseDown (FMouseEvent*) override;
void onMouseDown (FMouseEvent*) override;
private:
// Methods
void init();
void calculateDimensions();
virtual void adjustSize() override;
void adjustSize() override;
// Data Members
FString text{};

View File

@ -186,7 +186,7 @@ class FWidget : public FVTerm, public FObject
FWidget& operator = (const FWidget&) = delete;
// Accessors
virtual const char* getClassName() const override;
const char* getClassName() const override;
FWidget* getRootWidget() const;
FWidget* getParentWidget() const;
static FWidget*& getMainWidget();
@ -333,7 +333,7 @@ class FWidget : public FVTerm, public FObject
virtual bool focusLastChild();
FPoint termToWidgetPos (const FPoint&);
void detectTermSize();
virtual void print (const FPoint& p) override;
void print (const FPoint& p) override;
virtual void move (const FPoint&);
void drawShadow();
void clearShadow();
@ -368,10 +368,10 @@ class FWidget : public FVTerm, public FObject
typedef std::vector<member_callback_data> MemberCallbackObjects;
// Accessor
virtual term_area* getPrintArea() override;
virtual void addPreprocessingHandler ( FVTerm*
term_area* getPrintArea() override;
void addPreprocessingHandler ( FVTerm*
, FPreprocessingHandler ) override;
virtual void delPreprocessingHandler (FVTerm*) override;
void delPreprocessingHandler (FVTerm*) override;
// Inquiry
bool isChildPrintArea() const;
@ -388,7 +388,7 @@ class FWidget : public FVTerm, public FObject
virtual bool focusPrevChild(); // ...focus
// Event handlers
virtual bool event (FEvent*) override;
bool event (FEvent*) override;
virtual void onKeyPress (FKeyEvent*);
virtual void onKeyUp (FKeyEvent*);
virtual void onKeyDown (FKeyEvent*);

View File

@ -92,7 +92,7 @@ class FWindow : public FWidget
FWindow& operator = (const FWindow&) = delete;
// Accessors
virtual const char* getClassName() const override;
const char* getClassName() const override;
static FWindow* getWindowWidget (const FWidget*);
static int getWindowLayer (const FWidget*);
FWidget* getWindowFocusWidget() const;
@ -130,18 +130,18 @@ class FWindow : public FWidget
bool hasShadow() const;
// Methods
virtual void drawBorder() override;
virtual void show() override;
virtual void hide() override;
virtual void setX (int, bool = true) override;
virtual void setY (int, bool = true) override;
virtual void setPos (const FPoint&, bool = true) override;
virtual void setWidth (std::size_t, bool = true) override;
virtual void setHeight (std::size_t, bool = true) override;
virtual void setSize (const FSize&, bool = true) override;
virtual void setGeometry ( const FPoint&, const FSize&
void drawBorder() override;
void show() override;
void hide() override;
void setX (int, bool = true) override;
void setY (int, bool = true) override;
void setPos (const FPoint&, bool = true) override;
void setWidth (std::size_t, bool = true) override;
void setHeight (std::size_t, bool = true) override;
void setSize (const FSize&, bool = true) override;
void setGeometry ( const FPoint&, const FSize&
, bool = true ) override;
virtual void move (const FPoint&) override;
void move (const FPoint&) override;
static FWindow* getWindowWidgetAt (const FPoint&);
static FWindow* getWindowWidgetAt (int, int);
static void addWindow (FWidget*);
@ -154,17 +154,17 @@ class FWindow : public FWidget
bool zoomWindow ();
static void switchToPrevWindow (FWidget*);
static bool activatePrevWindow();
virtual void setShadowSize (const FSize&) override;
void setShadowSize (const FSize&) override;
protected:
// Method
virtual void adjustSize() override;
void adjustSize() override;
// Mutator
static void setPreviousWindow (FWindow*);
// Event handlers
virtual bool event (FEvent*) override;
bool event (FEvent*) override;
virtual void onWindowActive (FEvent*);
virtual void onWindowInactive (FEvent*);
virtual void onWindowRaised (FEvent*);
@ -181,7 +181,6 @@ class FWindow : public FWidget
FWidget* win_focus_widget{nullptr};
FRect normalGeometry{};
static FWindow* previous_window;
};
#pragma pack(pop)

View File

@ -29,7 +29,7 @@ endif
all: $(OBJS)
debug:
$(MAKE) $(MAKEFILE) DEBUG="-g -D DEBUG -Wall -Wextra -Wpedantic -Wpadded -Wno-c++98-compat -Wno-c++98-compat-pedantic -Wno-implicit-fallthrough"
$(MAKE) $(MAKEFILE) DEBUG="-g -D DEBUG -DUNIT_TEST -Wall -Wextra -Wpedantic -Wpadded -Wno-c++98-compat -Wno-c++98-compat-pedantic -Wno-implicit-fallthrough"
check: test
test: debug

View File

@ -29,7 +29,7 @@ endif
all: $(OBJS)
debug:
$(MAKE) $(MAKEFILE) DEBUG="-g -D DEBUG -Wall -Wextra -Wpedantic"
$(MAKE) $(MAKEFILE) DEBUG="-g -D DEBUG -DUNIT_TEST -Wall -Wextra -Wpedantic"
check: test
test: debug

View File

@ -3,7 +3,7 @@
* *
* This file is part of the Final Cut widget toolkit *
* *
* Copyright 2018 Markus Gans *
* Copyright 2018-2019 Markus Gans *
* *
* The Final Cut is free software; you can redistribute it and/or *
* modify it under the terms of the GNU Lesser General Public License *
@ -28,6 +28,7 @@
#include <cppunit/TestResultCollector.h>
#include <cppunit/TestRunner.h>
#include <string>
#include <final/final.h>
namespace test

View File

@ -32,6 +32,7 @@
#include <cppunit/TestAssert.h>
#include <iomanip>
#include <string>
#include <final/final.h>

View File

@ -3,7 +3,7 @@
* *
* This file is part of the Final Cut widget toolkit *
* *
* Copyright 2018 Markus Gans *
* Copyright 2018-2019 Markus Gans *
* *
* The Final Cut is free software; you can redistribute it and/or *
* modify it under the terms of the GNU Lesser General Public License *
@ -32,6 +32,7 @@
#include <cppunit/TestAssert.h>
#include <iomanip>
#include <string>
#include <final/final.h>

View File

@ -21,6 +21,7 @@
***********************************************************************/
#include <limits>
#include <utility>
#include <cppunit/BriefTestProgressListener.h>
#include <cppunit/CompilerOutputter.h>

View File

@ -28,6 +28,7 @@
#include <cppunit/TestResultCollector.h>
#include <cppunit/TestRunner.h>
#include <utility>
#include <final/final.h>
//----------------------------------------------------------------------

View File

@ -21,6 +21,7 @@
***********************************************************************/
#include <limits>
#include <utility>
#include <cppunit/BriefTestProgressListener.h>
#include <cppunit/CompilerOutputter.h>

View File

@ -28,6 +28,7 @@
#include <cppunit/TestResultCollector.h>
#include <cppunit/TestRunner.h>
#include <string>
#include <final/final.h>
#define CPPUNIT_ASSERT_CSTRING(expected, actual) \

View File

@ -20,8 +20,6 @@
* <http://www.gnu.org/licenses/>. *
***********************************************************************/
#include <limits>
#include <cppunit/BriefTestProgressListener.h>
#include <cppunit/CompilerOutputter.h>
#include <cppunit/extensions/HelperMacros.h>
@ -31,7 +29,10 @@
#include <cppunit/TestRunner.h>
#include <unistd.h>
#include <conemu.h>
#include <limits>
#include <string>
#include "conemu.h"
#include <final/final.h>
namespace test
@ -54,17 +55,17 @@ class FSystemTest : public finalcut::FSystem
virtual ~FSystemTest();
// Methods
virtual uChar inPortByte (uShort) override;
virtual void outPortByte (uChar, uShort) override;
virtual int isTTY (int) override;
virtual int ioctl (int, uLong, ...) override;
virtual int open (const char*, int, ...) override;
virtual int close (int) override;
virtual FILE* fopen (const char*, const char*) override;
virtual int fclose (FILE*) override;
virtual int putchar (int) override;
virtual int tputs (const char*, int, int (*)(int)) override;
virtual uid_t getuid() override;
uChar inPortByte (uShort) override;
void outPortByte (uChar, uShort) override;
int isTTY (int) override;
int ioctl (int, uLong, ...) override;
int open (const char*, int, ...) override;
int close (int) override;
FILE* fopen (const char*, const char*) override;
int fclose (FILE*) override;
int putchar (int) override;
int tputs (const char*, int, int (*)(int)) override;
uid_t getuid() override;
std::string& getCharacters();
int& getCursorType();
struct keymap_t& getTerminalKeymap();
@ -73,14 +74,14 @@ class FSystemTest : public finalcut::FSystem
// Data Members
std::string characters;
int cursor_type = 0;
static struct keymap_t keymap;
static struct keymap_t terminal_keymap;
static keymap_t keymap;
static keymap_t terminal_keymap;
};
#pragma pack(pop)
// private Data Member of FSystemTest
//----------------------------------------------------------------------
struct keymap_t FSystemTest::keymap =
keymap_t FSystemTest::keymap =
{
109, // Number of keys
{
@ -363,7 +364,7 @@ struct keymap_t FSystemTest::keymap =
// static class attributes
//----------------------------------------------------------------------
struct keymap_t FSystemTest::terminal_keymap{};
keymap_t FSystemTest::terminal_keymap{};
// constructors and destructor
//----------------------------------------------------------------------
@ -587,14 +588,12 @@ class ftermfreebsdTest : public CPPUNIT_NS::TestFixture, test::ConEmu
//----------------------------------------------------------------------
ftermfreebsdTest::ftermfreebsdTest()
{
}
{ }
//----------------------------------------------------------------------
void ftermfreebsdTest::classNameTest()
{
const finalcut::FTermFreeBSD p;
const finalcut::FTermFreeBSD p{};
const char* const classname = p.getClassName();
CPPUNIT_ASSERT ( std::strcmp(classname, "FTermFreeBSD") == 0 );
}

View File

@ -21,6 +21,7 @@
***********************************************************************/
#include <limits>
#include <string>
#include <cppunit/BriefTestProgressListener.h>
#include <cppunit/CompilerOutputter.h>
@ -86,17 +87,17 @@ class FSystemTest : public finalcut::FSystem
virtual ~FSystemTest();
// Methods
virtual uChar inPortByte (uShort) override;
virtual void outPortByte (uChar, uShort) override;
virtual int isTTY (int) override;
virtual int ioctl (int, uLong, ...) override;
virtual int open (const char*, int, ...) override;
virtual int close (int) override;
virtual FILE* fopen (const char*, const char*) override;
virtual int fclose (FILE*) override;
virtual int putchar (int) override;
virtual int tputs (const char*, int, int (*)(int)) override;
virtual uid_t getuid() override;
uChar inPortByte (uShort) override;
void outPortByte (uChar, uShort) override;
int isTTY (int) override;
int ioctl (int, uLong, ...) override;
int open (const char*, int, ...) override;
int close (int) override;
FILE* fopen (const char*, const char*) override;
int fclose (FILE*) override;
int putchar (int) override;
int tputs (const char*, int, int (*)(int)) override;
uid_t getuid() override;
rgb& getRGB (std::size_t);
console_font_op& getConsoleFont();
shiftstate& getShiftState();
@ -1470,14 +1471,12 @@ class FTermLinuxTest : public CPPUNIT_NS::TestFixture, test::ConEmu
//----------------------------------------------------------------------
FTermLinuxTest::FTermLinuxTest()
{
}
{ }
//----------------------------------------------------------------------
void FTermLinuxTest::classNameTest()
{
const finalcut::FTermLinux p;
const finalcut::FTermLinux p{};
const char* const classname = p.getClassName();
CPPUNIT_ASSERT ( std::strcmp(classname, "FTermLinux") == 0 );
}
@ -2210,7 +2209,7 @@ void FTermLinuxTest::modifierKeyTest()
{
FKey keycode;
FKey mod_keycode;
const finalcut::FTermLinux linux;
const finalcut::FTermLinux linux{};
finalcut::FSystem* fsys;
fsys = new test::FSystemTest();
test::FSystemTest* fsystest = static_cast<test::FSystemTest*>(fsys);

View File

@ -21,6 +21,7 @@
***********************************************************************/
#include <limits>
#include <string>
#include <cppunit/BriefTestProgressListener.h>
#include <cppunit/CompilerOutputter.h>
@ -72,17 +73,17 @@ class FSystemTest : public finalcut::FSystem
virtual ~FSystemTest();
// Methods
virtual uChar inPortByte (uShort) override;
virtual void outPortByte (uChar, uShort) override;
virtual int isTTY (int) override;
virtual int ioctl (int, uLong, ...) override;
virtual int open (const char*, int, ...) override;
virtual int close (int) override;
virtual FILE* fopen (const char*, const char*) override;
virtual int fclose (FILE*) override;
virtual int putchar (int) override;
virtual int tputs (const char*, int, int (*)(int)) override;
virtual uid_t getuid() override;
uChar inPortByte (uShort) override;
void outPortByte (uChar, uShort) override;
int isTTY (int) override;
int ioctl (int, uLong, ...) override;
int open (const char*, int, ...) override;
int close (int) override;
FILE* fopen (const char*, const char*) override;
int fclose (FILE*) override;
int putchar (int) override;
int tputs (const char*, int, int (*)(int)) override;
uid_t getuid() override;
private:
kbd_t kbdencoding = 512;
@ -265,14 +266,12 @@ class ftermopenbsdTest : public CPPUNIT_NS::TestFixture, test::ConEmu
//----------------------------------------------------------------------
ftermopenbsdTest::ftermopenbsdTest()
{
}
{ }
//----------------------------------------------------------------------
void ftermopenbsdTest::classNameTest()
{
const finalcut::FTermOpenBSD p;
const finalcut::FTermOpenBSD p{};
const char* const classname = p.getClassName();
CPPUNIT_ASSERT ( std::strcmp(classname, "FTermOpenBSD") == 0 );
}