Use nullptr instead of 0 to initialize a pointer values
This commit is contained in:
parent
fe0c22abe4
commit
6ce8c5cb27
|
@ -1,6 +1,7 @@
|
||||||
2018-12-09 Markus Gans <guru.mail@muenster.de>
|
2018-12-09 Markus Gans <guru.mail@muenster.de>
|
||||||
* Better handling of the scrollbar maximum
|
* Better handling of the scrollbar maximum
|
||||||
* Deactivate copy constructor and assignment operator with "= delete"
|
* Deactivate copy constructor and assignment operator with "= delete"
|
||||||
|
* Use nullptr instead of 0 to initialize a pointer values
|
||||||
|
|
||||||
2018-12-06 Markus Gans <guru.mail@muenster.de>
|
2018-12-06 Markus Gans <guru.mail@muenster.de>
|
||||||
* Easier handling of fc::SpecialCharacter
|
* Easier handling of fc::SpecialCharacter
|
||||||
|
|
|
@ -29,7 +29,7 @@ endif
|
||||||
all: $(OBJS)
|
all: $(OBJS)
|
||||||
|
|
||||||
debug:
|
debug:
|
||||||
$(MAKE) $(MAKEFILE) DEBUG="-g -D DEBUG -Wall -Wextra -Wpedantic -Weverything -Wpadded -Wno-c++98-compat -Wno-implicit-fallthrough -Wno-reserved-id-macro"
|
$(MAKE) $(MAKEFILE) DEBUG="-g -D DEBUG -Wall -Wextra -Wpedantic -Weverything -Wpadded -Wno-c++98-compat -Wno-c++98-compat-pedantic -Wno-implicit-fallthrough -Wno-reserved-id-macro"
|
||||||
|
|
||||||
profile:
|
profile:
|
||||||
$(MAKE) $(MAKEFILE) PROFILE="-pg"
|
$(MAKE) $(MAKEFILE) PROFILE="-pg"
|
||||||
|
|
|
@ -43,7 +43,7 @@ class Button : public finalcut::FButton
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
// Constructor
|
// Constructor
|
||||||
explicit Button (FWidget* = 0);
|
explicit Button (FWidget* = nullptr);
|
||||||
|
|
||||||
// Method
|
// Method
|
||||||
void setChecked(bool);
|
void setChecked(bool);
|
||||||
|
@ -111,7 +111,7 @@ class Calc : public finalcut::FDialog
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
// Constructor
|
// Constructor
|
||||||
explicit Calc (finalcut::FWidget* parent = 0);
|
explicit Calc (finalcut::FWidget* parent = nullptr);
|
||||||
|
|
||||||
// Destructor
|
// Destructor
|
||||||
~Calc();
|
~Calc();
|
||||||
|
|
|
@ -39,7 +39,7 @@ class CheckList : public finalcut::FDialog
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
// Constructor
|
// Constructor
|
||||||
explicit CheckList (finalcut::FWidget* = 0);
|
explicit CheckList (finalcut::FWidget* = nullptr);
|
||||||
// Disable copy constructor
|
// Disable copy constructor
|
||||||
CheckList (const CheckList&) = delete;
|
CheckList (const CheckList&) = delete;
|
||||||
// Destructor
|
// Destructor
|
||||||
|
|
|
@ -30,7 +30,7 @@ class Keyboard : public finalcut::FWidget
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
// Constructor
|
// Constructor
|
||||||
explicit Keyboard (finalcut::FWidget* = 0);
|
explicit Keyboard (finalcut::FWidget* = nullptr);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// Event handlers
|
// Event handlers
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
|
|
||||||
|
|
||||||
// Global application object
|
// Global application object
|
||||||
static finalcut::FString* temp_str = 0;
|
static finalcut::FString* temp_str = nullptr;
|
||||||
|
|
||||||
|
|
||||||
// Function prototypes
|
// Function prototypes
|
||||||
|
@ -77,7 +77,7 @@ class Listbox : public finalcut::FDialog
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
// Constructor
|
// Constructor
|
||||||
explicit Listbox (FWidget* = 0);
|
explicit Listbox (FWidget* = nullptr);
|
||||||
// Disable copy constructor
|
// Disable copy constructor
|
||||||
Listbox (const Listbox&) = delete;
|
Listbox (const Listbox&) = delete;
|
||||||
// Destructor
|
// Destructor
|
||||||
|
|
|
@ -39,7 +39,7 @@ class Listview : public finalcut::FDialog
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
// Constructor
|
// Constructor
|
||||||
explicit Listview (finalcut::FWidget* = 0);
|
explicit Listview (finalcut::FWidget* = nullptr);
|
||||||
// Disable copy constructor
|
// Disable copy constructor
|
||||||
Listview (const Listview&) = delete;
|
Listview (const Listview&) = delete;
|
||||||
// Destructor
|
// Destructor
|
||||||
|
|
|
@ -34,7 +34,7 @@ class Mandelbrot : public finalcut::FDialog
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
// Constructor
|
// Constructor
|
||||||
explicit Mandelbrot (finalcut::FWidget* = 0);
|
explicit Mandelbrot (finalcut::FWidget* = nullptr);
|
||||||
|
|
||||||
// Destructor
|
// Destructor
|
||||||
~Mandelbrot();
|
~Mandelbrot();
|
||||||
|
|
|
@ -34,7 +34,7 @@ class Menu : public finalcut::FDialog
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
// Constructor
|
// Constructor
|
||||||
explicit Menu (finalcut::FWidget* = 0);
|
explicit Menu (finalcut::FWidget* = nullptr);
|
||||||
// Disable copy constructor
|
// Disable copy constructor
|
||||||
Menu (const Menu&) = delete;
|
Menu (const Menu&) = delete;
|
||||||
// Destructor
|
// Destructor
|
||||||
|
|
|
@ -34,7 +34,7 @@ class ColorChooser : public finalcut::FWidget
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
// Constructor
|
// Constructor
|
||||||
explicit ColorChooser (finalcut::FWidget* = 0);
|
explicit ColorChooser (finalcut::FWidget* = nullptr);
|
||||||
// Disable copy constructor
|
// Disable copy constructor
|
||||||
ColorChooser (const ColorChooser&) = delete;
|
ColorChooser (const ColorChooser&) = delete;
|
||||||
// Destructor
|
// Destructor
|
||||||
|
@ -170,7 +170,7 @@ class Brushes : public finalcut::FWidget
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
// Constructor
|
// Constructor
|
||||||
explicit Brushes (finalcut::FWidget* = 0);
|
explicit Brushes (finalcut::FWidget* = nullptr);
|
||||||
// Disable copy constructor
|
// Disable copy constructor
|
||||||
Brushes (const Brushes&) = delete;
|
Brushes (const Brushes&) = delete;
|
||||||
// Destructor
|
// Destructor
|
||||||
|
@ -308,7 +308,7 @@ class MouseDraw : public finalcut::FDialog
|
||||||
using FWidget::setGeometry;
|
using FWidget::setGeometry;
|
||||||
|
|
||||||
// Constructor
|
// Constructor
|
||||||
explicit MouseDraw (finalcut::FWidget* = 0);
|
explicit MouseDraw (finalcut::FWidget* = nullptr);
|
||||||
// Disable copy constructor
|
// Disable copy constructor
|
||||||
MouseDraw (const MouseDraw&) = delete;
|
MouseDraw (const MouseDraw&) = delete;
|
||||||
// Destructor
|
// Destructor
|
||||||
|
@ -339,7 +339,7 @@ class MouseDraw : public finalcut::FDialog
|
||||||
void cb_colorChanged (finalcut::FWidget*, data_ptr);
|
void cb_colorChanged (finalcut::FWidget*, data_ptr);
|
||||||
|
|
||||||
// Data Members
|
// Data Members
|
||||||
term_area* canvas{0};
|
term_area* canvas{nullptr};
|
||||||
ColorChooser c_chooser{this};
|
ColorChooser c_chooser{this};
|
||||||
Brushes brush{this};
|
Brushes brush{this};
|
||||||
};
|
};
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
static finalcut::FVTerm* terminal;
|
static finalcut::FVTerm* terminal;
|
||||||
|
|
||||||
// Global FApplication object
|
// Global FApplication object
|
||||||
static finalcut::FApplication* app;
|
static finalcut::FApplication* app = nullptr;
|
||||||
|
|
||||||
// function prototype
|
// function prototype
|
||||||
bool keyPressed();
|
bool keyPressed();
|
||||||
|
@ -201,5 +201,5 @@ int main (int argc, char* argv[])
|
||||||
|
|
||||||
// Waiting for keypress
|
// Waiting for keypress
|
||||||
keyPressed();
|
keyPressed();
|
||||||
app = 0; // End of TermApp object scope
|
app = nullptr; // End of TermApp object scope
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,7 +34,7 @@ class Scrollview : public finalcut::FScrollView
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
// Constructor
|
// Constructor
|
||||||
explicit Scrollview (finalcut::FWidget* = 0);
|
explicit Scrollview (finalcut::FWidget* = nullptr);
|
||||||
// Disable copy constructor
|
// Disable copy constructor
|
||||||
Scrollview (const Scrollview&) = delete;
|
Scrollview (const Scrollview&) = delete;
|
||||||
// Destructor
|
// Destructor
|
||||||
|
@ -189,7 +189,7 @@ class Scrollviewdemo : public finalcut::FDialog
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
// Constructor
|
// Constructor
|
||||||
explicit Scrollviewdemo (finalcut::FWidget* = 0);
|
explicit Scrollviewdemo (finalcut::FWidget* = nullptr);
|
||||||
|
|
||||||
// Destructor
|
// Destructor
|
||||||
~Scrollviewdemo();
|
~Scrollviewdemo();
|
||||||
|
@ -198,7 +198,7 @@ class Scrollviewdemo : public finalcut::FDialog
|
||||||
virtual void onClose (finalcut::FCloseEvent*);
|
virtual void onClose (finalcut::FCloseEvent*);
|
||||||
|
|
||||||
// Callback method
|
// Callback method
|
||||||
void cb_quit (finalcut::FWidget* = 0, data_ptr = 0);
|
void cb_quit (finalcut::FWidget* = nullptr, data_ptr = nullptr);
|
||||||
|
|
||||||
// Data Members
|
// Data Members
|
||||||
Scrollview sview{this};
|
Scrollview sview{this};
|
||||||
|
|
|
@ -187,7 +187,7 @@ void streamingFromFStringExample()
|
||||||
std::wcout << "stream out: " << stream_wstring << std::endl;
|
std::wcout << "stream out: " << stream_wstring << std::endl;
|
||||||
|
|
||||||
// ...to wide character
|
// ...to wide character
|
||||||
wchar_t stream_wchar_t = 0;
|
wchar_t stream_wchar_t = L'\0';
|
||||||
finalcut::FString("w") >> stream_wchar_t;
|
finalcut::FString("w") >> stream_wchar_t;
|
||||||
std::wcout << "stream out: " << stream_wchar_t << std::endl;
|
std::wcout << "stream out: " << stream_wchar_t << std::endl;
|
||||||
|
|
||||||
|
|
|
@ -34,7 +34,7 @@ class AttribDlg : public finalcut::FDialog
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
// Constructor
|
// Constructor
|
||||||
explicit AttribDlg (finalcut::FWidget* = 0);
|
explicit AttribDlg (finalcut::FWidget* = nullptr);
|
||||||
// Disable copy constructor
|
// Disable copy constructor
|
||||||
AttribDlg (const AttribDlg&) = delete;
|
AttribDlg (const AttribDlg&) = delete;
|
||||||
// Destructor
|
// Destructor
|
||||||
|
@ -49,8 +49,8 @@ class AttribDlg : public finalcut::FDialog
|
||||||
virtual void onClose (finalcut::FCloseEvent*);
|
virtual void onClose (finalcut::FCloseEvent*);
|
||||||
|
|
||||||
// Callback methods
|
// Callback methods
|
||||||
void cb_next (finalcut::FWidget* = 0, data_ptr = 0);
|
void cb_next (finalcut::FWidget* = nullptr, data_ptr = nullptr);
|
||||||
void cb_back (finalcut::FWidget* = 0, data_ptr = 0);
|
void cb_back (finalcut::FWidget* = nullptr, data_ptr = nullptr);
|
||||||
|
|
||||||
// Data Members
|
// Data Members
|
||||||
FColor bgcolor;
|
FColor bgcolor;
|
||||||
|
@ -185,7 +185,7 @@ class AttribDemo : public finalcut::FWidget
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
// Constructor
|
// Constructor
|
||||||
explicit AttribDemo (FWidget* = 0);
|
explicit AttribDemo (FWidget* = nullptr);
|
||||||
|
|
||||||
// Destructor
|
// Destructor
|
||||||
~AttribDemo()
|
~AttribDemo()
|
||||||
|
|
|
@ -313,7 +313,7 @@ int main (int argc, char* argv[])
|
||||||
// Pointer to the global virtual terminal object
|
// Pointer to the global virtual terminal object
|
||||||
terminal = static_cast<finalcut::FVTerm*>(&TermApp);
|
terminal = static_cast<finalcut::FVTerm*>(&TermApp);
|
||||||
|
|
||||||
finalcut::FTermcap::tcap_map* tcap = 0;
|
finalcut::FTermcap::tcap_map* tcap = nullptr;
|
||||||
tcap = finalcut::FTermcap::getTermcapMap();
|
tcap = finalcut::FTermcap::getTermcapMap();
|
||||||
|
|
||||||
std::cout << "--------\r\nFTermcap\r\n--------\r\n\n";
|
std::cout << "--------\r\nFTermcap\r\n--------\r\n\n";
|
||||||
|
|
|
@ -31,7 +31,7 @@ class Timer : public finalcut::FWidget
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
// Constructor
|
// Constructor
|
||||||
explicit Timer (finalcut::FWidget* = 0);
|
explicit Timer (finalcut::FWidget* = nullptr);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// Method
|
// Method
|
||||||
|
|
|
@ -42,7 +42,8 @@ class Transparent : public finalcut::FDialog
|
||||||
} trans_type;
|
} trans_type;
|
||||||
|
|
||||||
// Constructor
|
// Constructor
|
||||||
explicit Transparent (finalcut::FWidget* = 0, trans_type = transparent);
|
explicit Transparent ( finalcut::FWidget* = nullptr
|
||||||
|
, trans_type = transparent );
|
||||||
// Disable copy constructor
|
// Disable copy constructor
|
||||||
Transparent (const Transparent&) = delete;
|
Transparent (const Transparent&) = delete;
|
||||||
// Destructor
|
// Destructor
|
||||||
|
@ -149,7 +150,7 @@ class MainWindow : public finalcut::FDialog
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
// Constructor
|
// Constructor
|
||||||
explicit MainWindow (finalcut::FWidget* = 0);
|
explicit MainWindow (finalcut::FWidget* = nullptr);
|
||||||
// Disable copy constructor
|
// Disable copy constructor
|
||||||
MainWindow (const MainWindow&) = delete;
|
MainWindow (const MainWindow&) = delete;
|
||||||
// Destructor
|
// Destructor
|
||||||
|
@ -183,9 +184,9 @@ class MainWindow : public finalcut::FDialog
|
||||||
// Data Members
|
// Data Members
|
||||||
finalcut::FString line1{};
|
finalcut::FString line1{};
|
||||||
finalcut::FString line2{};
|
finalcut::FString line2{};
|
||||||
Transparent* transpwin{0};
|
Transparent* transpwin{nullptr};
|
||||||
Transparent* shadowwin{0};
|
Transparent* shadowwin{nullptr};
|
||||||
Transparent* ibg{0};
|
Transparent* ibg{nullptr};
|
||||||
finalcut::FStatusBar status_bar{this};
|
finalcut::FStatusBar status_bar{this};
|
||||||
};
|
};
|
||||||
#pragma pack(pop)
|
#pragma pack(pop)
|
||||||
|
|
|
@ -114,7 +114,7 @@ class Treeview : public finalcut::FDialog
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
// Constructor
|
// Constructor
|
||||||
explicit Treeview (finalcut::FWidget* = 0);
|
explicit Treeview (finalcut::FWidget* = nullptr);
|
||||||
// Disable copy constructor
|
// Disable copy constructor
|
||||||
Treeview (const Treeview&) = delete;
|
Treeview (const Treeview&) = delete;
|
||||||
// Destructor
|
// Destructor
|
||||||
|
|
|
@ -38,7 +38,7 @@ class ProgressDialog : public finalcut::FDialog
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
// Constructor
|
// Constructor
|
||||||
explicit ProgressDialog (finalcut::FWidget* = 0);
|
explicit ProgressDialog (finalcut::FWidget* = nullptr);
|
||||||
// Disable copy constructor
|
// Disable copy constructor
|
||||||
ProgressDialog (const ProgressDialog&) = delete;
|
ProgressDialog (const ProgressDialog&) = delete;
|
||||||
// Destructor
|
// Destructor
|
||||||
|
@ -181,7 +181,7 @@ class TextWindow : public finalcut::FDialog
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
// Constructor
|
// Constructor
|
||||||
explicit TextWindow (finalcut::FWidget* = 0);
|
explicit TextWindow (finalcut::FWidget* = nullptr);
|
||||||
// Disable copy constructor
|
// Disable copy constructor
|
||||||
TextWindow (const TextWindow&) = delete;
|
TextWindow (const TextWindow&) = delete;
|
||||||
// Destructor
|
// Destructor
|
||||||
|
@ -249,7 +249,7 @@ class MyDialog : public finalcut::FDialog
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
// Constructor
|
// Constructor
|
||||||
explicit MyDialog (finalcut::FWidget* = 0);
|
explicit MyDialog (finalcut::FWidget* = nullptr);
|
||||||
// Disable copy constructor
|
// Disable copy constructor
|
||||||
MyDialog (const MyDialog&) = delete;
|
MyDialog (const MyDialog&) = delete;
|
||||||
// Destructor
|
// Destructor
|
||||||
|
|
|
@ -35,7 +35,7 @@ class Watch : public finalcut::FDialog
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
// Constructor
|
// Constructor
|
||||||
explicit Watch (finalcut::FWidget* = 0);
|
explicit Watch (finalcut::FWidget* = nullptr);
|
||||||
// Disable copy constructor
|
// Disable copy constructor
|
||||||
Watch (const Watch&) = delete;
|
Watch (const Watch&) = delete;
|
||||||
// Destructor
|
// Destructor
|
||||||
|
|
|
@ -35,7 +35,7 @@ class SmallWindow : public finalcut::FDialog
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
// Constructor
|
// Constructor
|
||||||
explicit SmallWindow (finalcut::FWidget* = 0);
|
explicit SmallWindow (finalcut::FWidget* = nullptr);
|
||||||
// Disable copy constructor
|
// Disable copy constructor
|
||||||
SmallWindow (const SmallWindow&) = delete;
|
SmallWindow (const SmallWindow&) = delete;
|
||||||
// Destructor
|
// Destructor
|
||||||
|
@ -164,7 +164,7 @@ class Window : public finalcut::FDialog
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
// Constructor
|
// Constructor
|
||||||
explicit Window (finalcut::FWidget* = 0);
|
explicit Window (finalcut::FWidget* = nullptr);
|
||||||
// Disable copy constructor
|
// Disable copy constructor
|
||||||
Window (const Window&) = delete;
|
Window (const Window&) = delete;
|
||||||
// Destructor
|
// Destructor
|
||||||
|
@ -181,11 +181,7 @@ class Window : public finalcut::FDialog
|
||||||
struct win_data
|
struct win_data
|
||||||
{
|
{
|
||||||
// Constructor
|
// Constructor
|
||||||
win_data()
|
win_data() = default;
|
||||||
: is_open(false)
|
|
||||||
, title()
|
|
||||||
, dgl(0)
|
|
||||||
{ }
|
|
||||||
// Disable copy constructor
|
// Disable copy constructor
|
||||||
win_data (const win_data&) = delete;
|
win_data (const win_data&) = delete;
|
||||||
|
|
||||||
|
@ -193,9 +189,9 @@ class Window : public finalcut::FDialog
|
||||||
win_data& operator = (const win_data&) = delete;
|
win_data& operator = (const win_data&) = delete;
|
||||||
|
|
||||||
// Data Members
|
// Data Members
|
||||||
bool is_open;
|
bool is_open{false};
|
||||||
finalcut::FString title;
|
finalcut::FString title{};
|
||||||
SmallWindow* dgl;
|
SmallWindow* dgl{nullptr};
|
||||||
};
|
};
|
||||||
|
|
||||||
// Method
|
// Method
|
||||||
|
@ -552,7 +548,7 @@ void Window::cb_destroyWindow (finalcut::FWidget*, data_ptr data)
|
||||||
if ( win_dat )
|
if ( win_dat )
|
||||||
{
|
{
|
||||||
win_dat->is_open = false;
|
win_dat->is_open = false;
|
||||||
win_dat->dgl = 0;
|
win_dat->dgl = nullptr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -149,7 +149,7 @@ all: dep $(OBJS)
|
||||||
$(LIB): all
|
$(LIB): all
|
||||||
|
|
||||||
debug:
|
debug:
|
||||||
$(MAKE) $(MAKEFILE) DEBUG="-g -D DEBUG -Wall -Wextra -Wpedantic -Weverything -Wpadded -Wno-c++98-compat -Wno-implicit-fallthrough -Wno-reserved-id-macro"
|
$(MAKE) $(MAKEFILE) DEBUG="-g -D DEBUG -Wall -Wextra -Wpedantic -Weverything -Wpadded -Wno-c++98-compat -Wno-c++98-compat-pedantic -Wno-implicit-fallthrough -Wno-reserved-id-macro"
|
||||||
|
|
||||||
profile:
|
profile:
|
||||||
$(MAKE) $(MAKEFILE) PROFILE="-pg"
|
$(MAKE) $(MAKEFILE) PROFILE="-pg"
|
||||||
|
|
|
@ -32,26 +32,26 @@ namespace finalcut
|
||||||
{
|
{
|
||||||
|
|
||||||
// Global application object
|
// Global application object
|
||||||
static FApplication* app_object = 0;
|
static FApplication* app_object = nullptr;
|
||||||
|
|
||||||
// Flag to exit the local event loop
|
// Flag to exit the local event loop
|
||||||
static bool app_exit_loop = false;
|
static bool app_exit_loop = false;
|
||||||
|
|
||||||
// Static attributes
|
// Static attributes
|
||||||
FWidget* FWidget::main_widget = 0; // main application widget
|
FWidget* FWidget::main_widget = nullptr; // main application widget
|
||||||
FWidget* FWidget::active_window = 0; // the active window
|
FWidget* FWidget::active_window = nullptr; // the active window
|
||||||
FWidget* FWidget::focus_widget = 0; // has keyboard input focus
|
FWidget* FWidget::focus_widget = nullptr; // has keyboard input focus
|
||||||
FWidget* FWidget::clicked_widget = 0; // is focused by click
|
FWidget* FWidget::clicked_widget = nullptr; // is focused by click
|
||||||
FWidget* FWidget::open_menu = 0; // currently open menu
|
FWidget* FWidget::open_menu = nullptr; // currently open menu
|
||||||
FWidget* FWidget::move_size_widget = 0; // move/size by keyboard
|
FWidget* FWidget::move_size_widget = nullptr; // move/size by keyboard
|
||||||
FWidget* FApplication::keyboard_widget = 0; // has the keyboard focus
|
FWidget* FApplication::keyboard_widget = nullptr; // has the keyboard focus
|
||||||
FKeyboard* FApplication::keyboard = 0; // keyboard access
|
FKeyboard* FApplication::keyboard = nullptr; // keyboard access
|
||||||
FMouseControl* FApplication::mouse = 0; // mouse control
|
FMouseControl* FApplication::mouse = nullptr; // mouse control
|
||||||
int FApplication::loop_level = 0; // event loop level
|
int FApplication::loop_level = 0; // event loop level
|
||||||
int FApplication::quit_code = 0;
|
int FApplication::quit_code = 0;
|
||||||
bool FApplication::quit_now = false;
|
bool FApplication::quit_now = false;
|
||||||
|
|
||||||
FApplication::eventQueue* FApplication::event_queue = 0;
|
FApplication::eventQueue* FApplication::event_queue = nullptr;
|
||||||
|
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
|
@ -87,7 +87,7 @@ FApplication::~FApplication() // destructor
|
||||||
if ( event_queue )
|
if ( event_queue )
|
||||||
delete event_queue;
|
delete event_queue;
|
||||||
|
|
||||||
app_object = 0;
|
app_object = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -498,7 +498,7 @@ inline void FApplication::findKeyboardWidget()
|
||||||
{
|
{
|
||||||
// Find the widget that has the keyboard focus
|
// Find the widget that has the keyboard focus
|
||||||
|
|
||||||
FWidget* widget = 0;
|
FWidget* widget = nullptr;
|
||||||
FWidget* focus = getFocusWidget();
|
FWidget* focus = getFocusWidget();
|
||||||
FWidget* move_size = getMoveSizeWidget();
|
FWidget* move_size = getMoveSizeWidget();
|
||||||
|
|
||||||
|
|
|
@ -618,7 +618,7 @@ inline void FButton::drawButtonTextLine (wchar_t button_text[])
|
||||||
else
|
else
|
||||||
center_offset = (getWidth() - txtlength - 1) / 2;
|
center_offset = (getWidth() - txtlength - 1) / 2;
|
||||||
|
|
||||||
// Print button text line --------
|
// Print button text line
|
||||||
for (pos = 0; pos < center_offset; pos++)
|
for (pos = 0; pos < center_offset; pos++)
|
||||||
print (space_char); // █
|
print (space_char); // █
|
||||||
|
|
||||||
|
|
|
@ -53,9 +53,9 @@ FDialog::~FDialog() // destructor
|
||||||
FApplication* fapp = static_cast<FApplication*>(getRootWidget());
|
FApplication* fapp = static_cast<FApplication*>(getRootWidget());
|
||||||
bool is_quit = fapp->isQuit();
|
bool is_quit = fapp->isQuit();
|
||||||
delete dialog_menu;
|
delete dialog_menu;
|
||||||
dgl_menuitem = 0;
|
dgl_menuitem = nullptr;
|
||||||
delete accelerator_list;
|
delete accelerator_list;
|
||||||
accelerator_list = 0;
|
accelerator_list = nullptr;
|
||||||
|
|
||||||
if ( ! is_quit )
|
if ( ! is_quit )
|
||||||
switchToPrevWindow(this);
|
switchToPrevWindow(this);
|
||||||
|
@ -779,7 +779,7 @@ void FDialog::draw()
|
||||||
if ( tooltip && ! getMoveSizeWidget() )
|
if ( tooltip && ! getMoveSizeWidget() )
|
||||||
{
|
{
|
||||||
delete tooltip;
|
delete tooltip;
|
||||||
tooltip = 0;
|
tooltip = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Fill the background
|
// Fill the background
|
||||||
|
@ -1623,7 +1623,7 @@ inline void FDialog::acceptMoveSize()
|
||||||
if ( tooltip )
|
if ( tooltip )
|
||||||
delete tooltip;
|
delete tooltip;
|
||||||
|
|
||||||
tooltip = 0;
|
tooltip = nullptr;
|
||||||
redraw();
|
redraw();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1635,7 +1635,7 @@ inline void FDialog::cancelMoveSize()
|
||||||
if ( tooltip )
|
if ( tooltip )
|
||||||
delete tooltip;
|
delete tooltip;
|
||||||
|
|
||||||
tooltip = 0;
|
tooltip = nullptr;
|
||||||
setPos (save_geometry.getPos());
|
setPos (save_geometry.getPos());
|
||||||
|
|
||||||
if ( isResizeable() )
|
if ( isResizeable() )
|
||||||
|
|
|
@ -34,7 +34,7 @@ long FKeyboard::key_timeout = 100000; // 100 ms (default timeout for keypress)
|
||||||
struct timeval FKeyboard::time_keypressed{};
|
struct timeval FKeyboard::time_keypressed{};
|
||||||
|
|
||||||
#if defined(__linux__)
|
#if defined(__linux__)
|
||||||
FTermLinux* FKeyboard::linux = 0;
|
FTermLinux* FKeyboard::linux = nullptr;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
|
|
|
@ -348,7 +348,7 @@ void FLabel::onAccel (FAccelEvent* ev)
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
void FLabel::cb_accel_widget_destroyed (FWidget*, data_ptr)
|
void FLabel::cb_accel_widget_destroyed (FWidget*, data_ptr)
|
||||||
{
|
{
|
||||||
accel_widget = 0;
|
accel_widget = nullptr;
|
||||||
delAccelerator();
|
delAccelerator();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1128,7 +1128,7 @@ void FListView::onMouseUp (FMouseEvent* ev)
|
||||||
|
|
||||||
clicked_expander_pos.setPoint(-1, -1);
|
clicked_expander_pos.setPoint(-1, -1);
|
||||||
clicked_header_pos.setPoint(-1, -1);
|
clicked_header_pos.setPoint(-1, -1);
|
||||||
clicked_checkbox_item = 0;
|
clicked_checkbox_item = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
|
|
|
@ -183,7 +183,7 @@ void FMenu::onKeyPress (FKeyEvent* ev)
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
void FMenu::onMouseDown (FMouseEvent* ev)
|
void FMenu::onMouseDown (FMouseEvent* ev)
|
||||||
{
|
{
|
||||||
shown_sub_menu = 0;
|
shown_sub_menu = nullptr;
|
||||||
|
|
||||||
if ( ev->getButton() != fc::LeftButton )
|
if ( ev->getButton() != fc::LeftButton )
|
||||||
{
|
{
|
||||||
|
@ -269,7 +269,7 @@ void FMenu::onMouseMove (FMouseEvent* ev)
|
||||||
isMouseOverMenuBar (ev->getTermPos())
|
isMouseOverMenuBar (ev->getTermPos())
|
||||||
};
|
};
|
||||||
|
|
||||||
shown_sub_menu = 0;
|
shown_sub_menu = nullptr;
|
||||||
|
|
||||||
// Mouse pointer over an entry in the menu list
|
// Mouse pointer over an entry in the menu list
|
||||||
mouseMoveOverList (ev->getPos(), ms);
|
mouseMoveOverList (ev->getPos(), ms);
|
||||||
|
@ -611,7 +611,7 @@ void FMenu::closeOpenedSubMenu()
|
||||||
|
|
||||||
opened_sub_menu->hideSubMenus();
|
opened_sub_menu->hideSubMenus();
|
||||||
opened_sub_menu->hide();
|
opened_sub_menu->hide();
|
||||||
opened_sub_menu = 0;
|
opened_sub_menu = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
|
@ -622,7 +622,7 @@ void FMenu::hideSubMenus()
|
||||||
{
|
{
|
||||||
opened_sub_menu->hideSubMenus();
|
opened_sub_menu->hideSubMenus();
|
||||||
opened_sub_menu->hide();
|
opened_sub_menu->hide();
|
||||||
opened_sub_menu = 0;
|
opened_sub_menu = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
unselectItem();
|
unselectItem();
|
||||||
|
|
|
@ -459,7 +459,7 @@ void FMenuItem::onAccel (FAccelEvent* ev)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
unsetSelected();
|
unsetSelected();
|
||||||
mbar->selected_item = 0;
|
mbar->selected_item = nullptr;
|
||||||
mbar->redraw();
|
mbar->redraw();
|
||||||
processClicked();
|
processClicked();
|
||||||
mbar->drop_down = false;
|
mbar->drop_down = false;
|
||||||
|
@ -536,7 +536,7 @@ FMenuList* FMenuItem::getFMenuList (FWidget& widget)
|
||||||
menu_list = static_cast<FMenuList*>(Menubar);
|
menu_list = static_cast<FMenuList*>(Menubar);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
menu_list = 0;
|
menu_list = nullptr;
|
||||||
|
|
||||||
return menu_list;
|
return menu_list;
|
||||||
}
|
}
|
||||||
|
@ -751,7 +751,7 @@ void FMenuItem::cb_destroyDialog (FWidget* widget, data_ptr)
|
||||||
{
|
{
|
||||||
delAccelerator(win);
|
delAccelerator(win);
|
||||||
delCallback(win);
|
delCallback(win);
|
||||||
associated_window = 0;
|
associated_window = nullptr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -27,8 +27,8 @@ namespace finalcut
|
||||||
|
|
||||||
// static class attributes
|
// static class attributes
|
||||||
bool FObject::timer_modify_lock;
|
bool FObject::timer_modify_lock;
|
||||||
FObject::TimerList* FObject::timer_list = 0;
|
FObject::TimerList* FObject::timer_list = nullptr;
|
||||||
const FString* fc::emptyFString::empty_string = 0;
|
const FString* fc::emptyFString::empty_string = nullptr;
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
// class FObject
|
// class FObject
|
||||||
|
@ -71,7 +71,7 @@ FObject::~FObject() // destructor
|
||||||
if ( ! has_parent && timer_list )
|
if ( ! has_parent && timer_list )
|
||||||
{
|
{
|
||||||
delete timer_list;
|
delete timer_list;
|
||||||
timer_list = 0;
|
timer_list = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! has_parent && ! fc::emptyFString::isNull() )
|
if ( ! has_parent && ! fc::emptyFString::isNull() )
|
||||||
|
@ -80,22 +80,16 @@ FObject::~FObject() // destructor
|
||||||
// Delete children objects
|
// Delete children objects
|
||||||
if ( hasChildren() )
|
if ( hasChildren() )
|
||||||
{
|
{
|
||||||
constFObjectIterator iter, last;
|
auto delete_list = children_list;
|
||||||
FObjectList delete_list = children_list;
|
|
||||||
iter = delete_list.begin();
|
|
||||||
last = delete_list.end();
|
|
||||||
|
|
||||||
while ( iter != last )
|
for (auto&& obj : delete_list)
|
||||||
{
|
delete obj;
|
||||||
delete *iter;
|
|
||||||
++iter;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( parent_obj )
|
if ( parent_obj )
|
||||||
parent_obj->delChild(this);
|
parent_obj->delChild(this);
|
||||||
|
|
||||||
parent_obj = 0;
|
parent_obj = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
// public methods of FObject
|
// public methods of FObject
|
||||||
|
@ -110,8 +104,7 @@ FObject* FObject::getChild (int index) const
|
||||||
if ( index <= 0 || index > numOfChildren() )
|
if ( index <= 0 || index > numOfChildren() )
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
constFObjectIterator iter;
|
auto iter = begin();
|
||||||
iter = begin();
|
|
||||||
std::advance (iter, index - 1);
|
std::advance (iter, index - 1);
|
||||||
return *iter;
|
return *iter;
|
||||||
}
|
}
|
||||||
|
@ -121,7 +114,7 @@ bool FObject::isChild (FObject* obj) const
|
||||||
{
|
{
|
||||||
// Find out if obj is a child object of mine
|
// Find out if obj is a child object of mine
|
||||||
|
|
||||||
FObject* p_obj = 0;
|
FObject* p_obj = nullptr;
|
||||||
|
|
||||||
while ( obj && (p_obj = obj->getParent()) )
|
while ( obj && (p_obj = obj->getParent()) )
|
||||||
{
|
{
|
||||||
|
@ -169,7 +162,7 @@ void FObject::delChild (FObject* obj)
|
||||||
|
|
||||||
if ( hasChildren() )
|
if ( hasChildren() )
|
||||||
{
|
{
|
||||||
obj->parent_obj = 0;
|
obj->parent_obj = nullptr;
|
||||||
obj->has_parent = false;
|
obj->has_parent = false;
|
||||||
children_list.remove(obj);
|
children_list.remove(obj);
|
||||||
}
|
}
|
||||||
|
@ -233,7 +226,6 @@ int FObject::addTimer (int interval)
|
||||||
// Create a timer and returns the timer identifier number
|
// Create a timer and returns the timer identifier number
|
||||||
// (interval in ms)
|
// (interval in ms)
|
||||||
|
|
||||||
FObject::TimerList::iterator iter, last;
|
|
||||||
timeval time_interval;
|
timeval time_interval;
|
||||||
timeval currentTime;
|
timeval currentTime;
|
||||||
int id = 1;
|
int id = 1;
|
||||||
|
@ -242,8 +234,8 @@ int FObject::addTimer (int interval)
|
||||||
// find an unused timer id
|
// find an unused timer id
|
||||||
if ( ! timer_list->empty() )
|
if ( ! timer_list->empty() )
|
||||||
{
|
{
|
||||||
iter = timer_list->begin();
|
auto iter = timer_list->begin();
|
||||||
last = timer_list->end();
|
auto last = timer_list->end();
|
||||||
|
|
||||||
while ( iter != last )
|
while ( iter != last )
|
||||||
{
|
{
|
||||||
|
@ -267,8 +259,8 @@ int FObject::addTimer (int interval)
|
||||||
timer_data t = { id, time_interval, timeout, this };
|
timer_data t = { id, time_interval, timeout, this };
|
||||||
|
|
||||||
// insert in list sorted by timeout
|
// insert in list sorted by timeout
|
||||||
iter = timer_list->begin();
|
auto iter = timer_list->begin();
|
||||||
last = timer_list->end();
|
auto last = timer_list->end();
|
||||||
|
|
||||||
while ( iter != last && iter->timeout < t.timeout )
|
while ( iter != last && iter->timeout < t.timeout )
|
||||||
++iter;
|
++iter;
|
||||||
|
@ -284,14 +276,12 @@ bool FObject::delTimer (int id)
|
||||||
{
|
{
|
||||||
// Deletes a timer by using the timer identifier number
|
// Deletes a timer by using the timer identifier number
|
||||||
|
|
||||||
FObject::TimerList::iterator iter, last;
|
|
||||||
|
|
||||||
if ( id <= 0 )
|
if ( id <= 0 )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
timer_modify_lock = true;
|
timer_modify_lock = true;
|
||||||
iter = timer_list->begin();
|
auto iter = timer_list->begin();
|
||||||
last = timer_list->end();
|
auto last = timer_list->end();
|
||||||
|
|
||||||
while ( iter != last && iter->id != id )
|
while ( iter != last && iter->id != id )
|
||||||
++iter;
|
++iter;
|
||||||
|
@ -312,8 +302,6 @@ bool FObject::delOwnTimer()
|
||||||
{
|
{
|
||||||
// Deletes all timers of this object
|
// Deletes all timers of this object
|
||||||
|
|
||||||
FObject::TimerList::iterator iter;
|
|
||||||
|
|
||||||
if ( ! timer_list )
|
if ( ! timer_list )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
@ -321,7 +309,7 @@ bool FObject::delOwnTimer()
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
timer_modify_lock = true;
|
timer_modify_lock = true;
|
||||||
iter = timer_list->begin();
|
auto iter = timer_list->begin();
|
||||||
|
|
||||||
while ( iter != timer_list->end() )
|
while ( iter != timer_list->end() )
|
||||||
{
|
{
|
||||||
|
@ -375,7 +363,6 @@ void FObject::onTimer (FTimerEvent*)
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
uInt FObject::processTimerEvent()
|
uInt FObject::processTimerEvent()
|
||||||
{
|
{
|
||||||
FObject::TimerList::iterator iter, last;
|
|
||||||
timeval currentTime;
|
timeval currentTime;
|
||||||
uInt activated = 0;
|
uInt activated = 0;
|
||||||
|
|
||||||
|
@ -390,27 +377,23 @@ uInt FObject::processTimerEvent()
|
||||||
if ( timer_list->empty() )
|
if ( timer_list->empty() )
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
iter = timer_list->begin();
|
for (auto&& timer : *timer_list)
|
||||||
last = timer_list->end();
|
|
||||||
|
|
||||||
while ( iter != last )
|
|
||||||
{
|
{
|
||||||
if ( ! iter->id
|
if ( ! timer.id
|
||||||
|| ! iter->object
|
|| ! timer.object
|
||||||
|| currentTime < iter->timeout ) // no timer expired
|
|| currentTime < timer.timeout ) // no timer expired
|
||||||
break;
|
break;
|
||||||
|
|
||||||
iter->timeout += iter->interval;
|
timer.timeout += timer.interval;
|
||||||
|
|
||||||
if ( iter->timeout < currentTime )
|
if ( timer.timeout < currentTime )
|
||||||
iter->timeout = currentTime + iter->interval;
|
timer.timeout = currentTime + timer.interval;
|
||||||
|
|
||||||
if ( iter->interval.tv_usec > 0 || iter->interval.tv_sec > 0 )
|
if ( timer.interval.tv_usec > 0 || timer.interval.tv_sec > 0 )
|
||||||
activated++;
|
activated++;
|
||||||
|
|
||||||
FTimerEvent t_ev(fc::Timer_Event, iter->id);
|
FTimerEvent t_ev(fc::Timer_Event, timer.id);
|
||||||
performTimerAction (iter->object, &t_ev);
|
performTimerAction (timer.object, &t_ev);
|
||||||
++iter;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return activated;
|
return activated;
|
||||||
|
|
|
@ -121,7 +121,7 @@ void FOptiMove::set_cursor_home (char cap[])
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
F_cursor_home.cap = 0;
|
F_cursor_home.cap = nullptr;
|
||||||
F_cursor_home.duration = \
|
F_cursor_home.duration = \
|
||||||
F_cursor_home.length = LONG_DURATION;
|
F_cursor_home.length = LONG_DURATION;
|
||||||
}
|
}
|
||||||
|
@ -138,7 +138,7 @@ void FOptiMove::set_cursor_to_ll (char cap[])
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
F_cursor_to_ll.cap = 0;
|
F_cursor_to_ll.cap = nullptr;
|
||||||
F_cursor_to_ll.duration = \
|
F_cursor_to_ll.duration = \
|
||||||
F_cursor_to_ll.length = LONG_DURATION;
|
F_cursor_to_ll.length = LONG_DURATION;
|
||||||
}
|
}
|
||||||
|
@ -155,7 +155,7 @@ void FOptiMove::set_carriage_return (char cap[])
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
F_carriage_return.cap = 0;
|
F_carriage_return.cap = nullptr;
|
||||||
F_carriage_return.duration = \
|
F_carriage_return.duration = \
|
||||||
F_carriage_return.length = LONG_DURATION;
|
F_carriage_return.length = LONG_DURATION;
|
||||||
}
|
}
|
||||||
|
@ -172,7 +172,7 @@ void FOptiMove::set_tabular (char cap[])
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
F_tab.cap = 0;
|
F_tab.cap = nullptr;
|
||||||
F_tab.duration = \
|
F_tab.duration = \
|
||||||
F_tab.length = LONG_DURATION;
|
F_tab.length = LONG_DURATION;
|
||||||
}
|
}
|
||||||
|
@ -189,7 +189,7 @@ void FOptiMove::set_back_tab (char cap[])
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
F_back_tab.cap = 0;
|
F_back_tab.cap = nullptr;
|
||||||
F_back_tab.duration = \
|
F_back_tab.duration = \
|
||||||
F_back_tab.length = LONG_DURATION;
|
F_back_tab.length = LONG_DURATION;
|
||||||
}
|
}
|
||||||
|
@ -206,7 +206,7 @@ void FOptiMove::set_cursor_up (char cap[])
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
F_cursor_up.cap = 0;
|
F_cursor_up.cap = nullptr;
|
||||||
F_cursor_up.duration = \
|
F_cursor_up.duration = \
|
||||||
F_cursor_up.length = LONG_DURATION;
|
F_cursor_up.length = LONG_DURATION;
|
||||||
}
|
}
|
||||||
|
@ -223,7 +223,7 @@ void FOptiMove::set_cursor_down (char cap[])
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
F_cursor_down.cap = 0;
|
F_cursor_down.cap = nullptr;
|
||||||
F_cursor_down.duration = \
|
F_cursor_down.duration = \
|
||||||
F_cursor_down.length = LONG_DURATION;
|
F_cursor_down.length = LONG_DURATION;
|
||||||
}
|
}
|
||||||
|
@ -240,7 +240,7 @@ void FOptiMove::set_cursor_left (char cap[])
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
F_cursor_left.cap = 0;
|
F_cursor_left.cap = nullptr;
|
||||||
F_cursor_left.duration = \
|
F_cursor_left.duration = \
|
||||||
F_cursor_left.length = LONG_DURATION;
|
F_cursor_left.length = LONG_DURATION;
|
||||||
}
|
}
|
||||||
|
@ -257,7 +257,7 @@ void FOptiMove::set_cursor_right (char cap[])
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
F_cursor_right.cap = 0;
|
F_cursor_right.cap = nullptr;
|
||||||
F_cursor_right.duration = \
|
F_cursor_right.duration = \
|
||||||
F_cursor_right.length = LONG_DURATION;
|
F_cursor_right.length = LONG_DURATION;
|
||||||
}
|
}
|
||||||
|
@ -275,7 +275,7 @@ void FOptiMove::set_cursor_address (char cap[])
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
F_cursor_address.cap = 0;
|
F_cursor_address.cap = nullptr;
|
||||||
F_cursor_address.duration = \
|
F_cursor_address.duration = \
|
||||||
F_cursor_address.length = LONG_DURATION;
|
F_cursor_address.length = LONG_DURATION;
|
||||||
}
|
}
|
||||||
|
@ -293,7 +293,7 @@ void FOptiMove::set_column_address (char cap[])
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
F_column_address.cap = 0;
|
F_column_address.cap = nullptr;
|
||||||
F_column_address.duration = \
|
F_column_address.duration = \
|
||||||
F_column_address.length = LONG_DURATION;
|
F_column_address.length = LONG_DURATION;
|
||||||
}
|
}
|
||||||
|
@ -311,7 +311,7 @@ void FOptiMove::set_row_address (char cap[])
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
F_row_address.cap = 0;
|
F_row_address.cap = nullptr;
|
||||||
F_row_address.duration = \
|
F_row_address.duration = \
|
||||||
F_row_address.length = LONG_DURATION;
|
F_row_address.length = LONG_DURATION;
|
||||||
}
|
}
|
||||||
|
@ -329,7 +329,7 @@ void FOptiMove::set_parm_up_cursor (char cap[])
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
F_parm_up_cursor.cap = 0;
|
F_parm_up_cursor.cap = nullptr;
|
||||||
F_parm_up_cursor.duration = \
|
F_parm_up_cursor.duration = \
|
||||||
F_parm_up_cursor.length = LONG_DURATION;
|
F_parm_up_cursor.length = LONG_DURATION;
|
||||||
}
|
}
|
||||||
|
@ -347,7 +347,7 @@ void FOptiMove::set_parm_down_cursor (char cap[])
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
F_parm_down_cursor.cap = 0;
|
F_parm_down_cursor.cap = nullptr;
|
||||||
F_parm_down_cursor.duration = \
|
F_parm_down_cursor.duration = \
|
||||||
F_parm_down_cursor.length = LONG_DURATION;
|
F_parm_down_cursor.length = LONG_DURATION;
|
||||||
}
|
}
|
||||||
|
@ -365,7 +365,7 @@ void FOptiMove::set_parm_left_cursor (char cap[])
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
F_parm_left_cursor.cap = 0;
|
F_parm_left_cursor.cap = nullptr;
|
||||||
F_parm_left_cursor.duration = \
|
F_parm_left_cursor.duration = \
|
||||||
F_parm_left_cursor.length = LONG_DURATION;
|
F_parm_left_cursor.length = LONG_DURATION;
|
||||||
}
|
}
|
||||||
|
@ -383,7 +383,7 @@ void FOptiMove::set_parm_right_cursor (char cap[])
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
F_parm_right_cursor.cap = 0;
|
F_parm_right_cursor.cap = nullptr;
|
||||||
F_parm_right_cursor.duration = \
|
F_parm_right_cursor.duration = \
|
||||||
F_parm_right_cursor.length = LONG_DURATION;
|
F_parm_right_cursor.length = LONG_DURATION;
|
||||||
}
|
}
|
||||||
|
@ -401,7 +401,7 @@ void FOptiMove::set_erase_chars (char cap[])
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
F_erase_chars.cap = 0;
|
F_erase_chars.cap = nullptr;
|
||||||
F_erase_chars.duration = \
|
F_erase_chars.duration = \
|
||||||
F_erase_chars.length = LONG_DURATION;
|
F_erase_chars.length = LONG_DURATION;
|
||||||
}
|
}
|
||||||
|
@ -419,7 +419,7 @@ void FOptiMove::set_repeat_char (char cap[])
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
F_repeat_char.cap = 0;
|
F_repeat_char.cap = nullptr;
|
||||||
F_repeat_char.duration = \
|
F_repeat_char.duration = \
|
||||||
F_repeat_char.length = LONG_DURATION;
|
F_repeat_char.length = LONG_DURATION;
|
||||||
}
|
}
|
||||||
|
@ -436,7 +436,7 @@ void FOptiMove::set_clr_bol (char cap[])
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
F_clr_bol.cap = 0;
|
F_clr_bol.cap = nullptr;
|
||||||
F_clr_bol.duration = \
|
F_clr_bol.duration = \
|
||||||
F_clr_bol.length = LONG_DURATION;
|
F_clr_bol.length = LONG_DURATION;
|
||||||
}
|
}
|
||||||
|
@ -453,7 +453,7 @@ void FOptiMove::set_clr_eol (char cap[])
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
F_clr_eol.cap = 0;
|
F_clr_eol.cap = nullptr;
|
||||||
F_clr_eol.duration = \
|
F_clr_eol.duration = \
|
||||||
F_clr_eol.length = LONG_DURATION;
|
F_clr_eol.length = LONG_DURATION;
|
||||||
}
|
}
|
||||||
|
|
|
@ -45,7 +45,7 @@ FScrollView::~FScrollView() // destructor
|
||||||
delete vbar;
|
delete vbar;
|
||||||
delete hbar;
|
delete hbar;
|
||||||
removeArea (viewport);
|
removeArea (viewport);
|
||||||
child_print_area = viewport = 0;
|
child_print_area = viewport = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -600,7 +600,7 @@ FVTerm::term_area* FScrollView::getPrintArea()
|
||||||
|
|
||||||
if ( use_own_print_area || ! viewport )
|
if ( use_own_print_area || ! viewport )
|
||||||
{
|
{
|
||||||
child_print_area = 0;
|
child_print_area = nullptr;
|
||||||
term_area* area = FWidget::getPrintArea();
|
term_area* area = FWidget::getPrintArea();
|
||||||
child_print_area = viewport;
|
child_print_area = viewport;
|
||||||
return area;
|
return area;
|
||||||
|
@ -984,7 +984,7 @@ void FScrollView::cb_HBarChange (FWidget*, data_ptr)
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
inline void FScrollView::redrawHBar()
|
inline void FScrollView::redrawHBar()
|
||||||
{
|
{
|
||||||
child_print_area = 0;
|
child_print_area = nullptr;
|
||||||
|
|
||||||
if ( hbar->isVisible() )
|
if ( hbar->isVisible() )
|
||||||
hbar->redraw();
|
hbar->redraw();
|
||||||
|
@ -995,7 +995,7 @@ inline void FScrollView::redrawHBar()
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
inline void FScrollView::redrawVBar()
|
inline void FScrollView::redrawVBar()
|
||||||
{
|
{
|
||||||
child_print_area = 0;
|
child_print_area = nullptr;
|
||||||
|
|
||||||
if ( vbar->isVisible() )
|
if ( vbar->isVisible() )
|
||||||
vbar->redraw();
|
vbar->redraw();
|
||||||
|
@ -1006,7 +1006,7 @@ inline void FScrollView::redrawVBar()
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
inline void FScrollView::drawHBar()
|
inline void FScrollView::drawHBar()
|
||||||
{
|
{
|
||||||
child_print_area = 0;
|
child_print_area = nullptr;
|
||||||
|
|
||||||
if ( hbar->isVisible() )
|
if ( hbar->isVisible() )
|
||||||
hbar->drawBar();
|
hbar->drawBar();
|
||||||
|
@ -1017,7 +1017,7 @@ inline void FScrollView::drawHBar()
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
inline void FScrollView::drawVBar()
|
inline void FScrollView::drawVBar()
|
||||||
{
|
{
|
||||||
child_print_area = 0;
|
child_print_area = nullptr;
|
||||||
|
|
||||||
if ( vbar->isVisible() )
|
if ( vbar->isVisible() )
|
||||||
vbar->drawBar();
|
vbar->drawBar();
|
||||||
|
|
|
@ -448,7 +448,7 @@ FString FString::clear()
|
||||||
|
|
||||||
length = 0;
|
length = 0;
|
||||||
bufsize = 0;
|
bufsize = 0;
|
||||||
string = 0;
|
string = nullptr;
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -876,7 +876,7 @@ FStringList FString::split (const FString& delimiter)
|
||||||
if ( ! (string && *string) )
|
if ( ! (string && *string) )
|
||||||
return string_list;
|
return string_list;
|
||||||
|
|
||||||
rest = 0;
|
rest = nullptr;
|
||||||
token = extractToken(&rest, s.string, delimiter.wc_str());
|
token = extractToken(&rest, s.string, delimiter.wc_str());
|
||||||
|
|
||||||
while ( token )
|
while ( token )
|
||||||
|
@ -1628,7 +1628,7 @@ inline char* FString::wc_to_c_str (const wchar_t s[]) const
|
||||||
if ( mblength == -1 && errno != EILSEQ )
|
if ( mblength == -1 && errno != EILSEQ )
|
||||||
{
|
{
|
||||||
delete[](c_string);
|
delete[](c_string);
|
||||||
c_string = 0;
|
c_string = nullptr;
|
||||||
return const_cast<char*>("");
|
return const_cast<char*>("");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -32,7 +32,7 @@ namespace finalcut
|
||||||
{
|
{
|
||||||
|
|
||||||
// global FTerm object
|
// global FTerm object
|
||||||
static FTerm* init_term_object = 0;
|
static FTerm* init_term_object = nullptr;
|
||||||
|
|
||||||
// global init state
|
// global init state
|
||||||
static bool term_initialized = false;
|
static bool term_initialized = false;
|
||||||
|
@ -42,25 +42,25 @@ int (*FTerm::Fputchar)(int);
|
||||||
|
|
||||||
// static class attributes
|
// static class attributes
|
||||||
FTerm::initializationValues FTerm::init_values;
|
FTerm::initializationValues FTerm::init_values;
|
||||||
FTermData* FTerm::data = 0;
|
FTermData* FTerm::data = nullptr;
|
||||||
FTermcap::tcap_map* FTerm::tcap = 0;
|
FTermcap::tcap_map* FTerm::tcap = nullptr;
|
||||||
FOptiMove* FTerm::opti_move = 0;
|
FOptiMove* FTerm::opti_move = nullptr;
|
||||||
FOptiAttr* FTerm::opti_attr = 0;
|
FOptiAttr* FTerm::opti_attr = nullptr;
|
||||||
FTermDetection* FTerm::term_detection = 0;
|
FTermDetection* FTerm::term_detection = nullptr;
|
||||||
FTermXTerminal* FTerm::xterm = 0;
|
FTermXTerminal* FTerm::xterm = nullptr;
|
||||||
FKeyboard* FTerm::keyboard = 0;
|
FKeyboard* FTerm::keyboard = nullptr;
|
||||||
FMouseControl* FTerm::mouse = 0;
|
FMouseControl* FTerm::mouse = nullptr;
|
||||||
|
|
||||||
#if defined(__linux__)
|
#if defined(__linux__)
|
||||||
FTermLinux* FTerm::linux = 0;
|
FTermLinux* FTerm::linux = nullptr;
|
||||||
#elif defined(__FreeBSD__) || defined(__DragonFly__)
|
#elif defined(__FreeBSD__) || defined(__DragonFly__)
|
||||||
FTermFreeBSD* FTerm::freebsd = 0;
|
FTermFreeBSD* FTerm::freebsd = nullptr;
|
||||||
#elif defined(__NetBSD__) || defined(__OpenBSD__)
|
#elif defined(__NetBSD__) || defined(__OpenBSD__)
|
||||||
FTermOpenBSD* FTerm::openbsd = 0;
|
FTermOpenBSD* FTerm::openbsd = nullptr;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
FTermDebugData* FTerm::debug_data = 0;
|
FTermDebugData* FTerm::debug_data = nullptr;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// function prototypes
|
// function prototypes
|
||||||
|
@ -384,7 +384,7 @@ char* FTerm::cursorsVisibility (bool on)
|
||||||
{
|
{
|
||||||
// Hides or shows the input cursor on the terminal
|
// Hides or shows the input cursor on the terminal
|
||||||
|
|
||||||
char* visibility_str = 0;
|
char* visibility_str = nullptr;
|
||||||
|
|
||||||
if ( on == data->isCursorHidden() )
|
if ( on == data->isCursorHidden() )
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -665,7 +665,7 @@ void FTerm::setEncoding (fc::encoding enc)
|
||||||
{
|
{
|
||||||
if ( enc == fc::VT100 || enc == fc::PC )
|
if ( enc == fc::VT100 || enc == fc::PC )
|
||||||
{
|
{
|
||||||
char* empty = 0;
|
char* empty = nullptr;
|
||||||
opti_move->set_tabular (empty);
|
opti_move->set_tabular (empty);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -1407,7 +1407,7 @@ void FTerm::init_tab_quirks()
|
||||||
|
|
||||||
if ( enc == fc::VT100 || enc == fc::PC )
|
if ( enc == fc::VT100 || enc == fc::PC )
|
||||||
{
|
{
|
||||||
char* empty = 0;
|
char* empty = nullptr;
|
||||||
opti_move->set_tabular (empty);
|
opti_move->set_tabular (empty);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -40,8 +40,8 @@ bool FTermcap::no_utf8_acs_chars = false;
|
||||||
int FTermcap::max_color = 1;
|
int FTermcap::max_color = 1;
|
||||||
int FTermcap::tabstop = 8;
|
int FTermcap::tabstop = 8;
|
||||||
int FTermcap::attr_without_color = 0;
|
int FTermcap::attr_without_color = 0;
|
||||||
FTermData* FTermcap::fterm_data = 0;
|
FTermData* FTermcap::fterm_data = nullptr;
|
||||||
FTermDetection* FTermcap::term_detection = 0;
|
FTermDetection* FTermcap::term_detection = nullptr;
|
||||||
|
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
|
|
|
@ -26,9 +26,9 @@ namespace finalcut
|
||||||
{
|
{
|
||||||
|
|
||||||
// static class attributes
|
// static class attributes
|
||||||
FTermcap::tcap_map* FTermcapQuirks::tcap = 0;
|
FTermcap::tcap_map* FTermcapQuirks::tcap = nullptr;
|
||||||
FTermData* FTermcapQuirks::fterm_data = 0;
|
FTermData* FTermcapQuirks::fterm_data = nullptr;
|
||||||
FTermDetection* FTermcapQuirks::term_detection = 0;
|
FTermDetection* FTermcapQuirks::term_detection = nullptr;
|
||||||
|
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
|
@ -210,16 +210,16 @@ void FTermcapQuirks::linux()
|
||||||
TCAP(fc::t_exit_bold_mode) = C_STR(CSI "22m");
|
TCAP(fc::t_exit_bold_mode) = C_STR(CSI "22m");
|
||||||
TCAP(fc::t_exit_blink_mode) = C_STR(CSI "25m");
|
TCAP(fc::t_exit_blink_mode) = C_STR(CSI "25m");
|
||||||
TCAP(fc::t_exit_reverse_mode) = C_STR(CSI "27m");
|
TCAP(fc::t_exit_reverse_mode) = C_STR(CSI "27m");
|
||||||
TCAP(fc::t_exit_secure_mode) = 0;
|
TCAP(fc::t_exit_secure_mode) = nullptr;
|
||||||
TCAP(fc::t_exit_protected_mode) = 0;
|
TCAP(fc::t_exit_protected_mode) = nullptr;
|
||||||
TCAP(fc::t_exit_crossed_out_mode) = 0;
|
TCAP(fc::t_exit_crossed_out_mode) = nullptr;
|
||||||
TCAP(fc::t_orig_pair) = C_STR(CSI "39;49;25m");
|
TCAP(fc::t_orig_pair) = C_STR(CSI "39;49;25m");
|
||||||
|
|
||||||
// Avoid underline and dim mode
|
// Avoid underline and dim mode
|
||||||
TCAP(fc::t_enter_dim_mode) = 0;
|
TCAP(fc::t_enter_dim_mode) = nullptr;
|
||||||
TCAP(fc::t_exit_dim_mode) = 0;
|
TCAP(fc::t_exit_dim_mode) = nullptr;
|
||||||
TCAP(fc::t_enter_underline_mode) = 0;
|
TCAP(fc::t_enter_underline_mode) = nullptr;
|
||||||
TCAP(fc::t_exit_underline_mode) = 0;
|
TCAP(fc::t_exit_underline_mode) = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
|
|
|
@ -31,14 +31,14 @@ FTermDetection::terminalType FTermDetection::terminal_type = \
|
||||||
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
|
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
|
||||||
FTermDetection::colorEnv FTermDetection::color_env;
|
FTermDetection::colorEnv FTermDetection::color_env;
|
||||||
FTermDetection::secondaryDA FTermDetection::secondary_da;
|
FTermDetection::secondaryDA FTermDetection::secondary_da;
|
||||||
FTermData* FTermDetection::fterm_data = 0;
|
FTermData* FTermDetection::fterm_data = nullptr;
|
||||||
char FTermDetection::termtype[256] = { };
|
char FTermDetection::termtype[256] = { };
|
||||||
char FTermDetection::ttytypename[256] = { };
|
char FTermDetection::ttytypename[256] = { };
|
||||||
bool FTermDetection::decscusr_support;
|
bool FTermDetection::decscusr_support;
|
||||||
bool FTermDetection::terminal_detection;
|
bool FTermDetection::terminal_detection;
|
||||||
bool FTermDetection::color256;
|
bool FTermDetection::color256;
|
||||||
const FString* FTermDetection::answer_back = 0;
|
const FString* FTermDetection::answer_back = nullptr;
|
||||||
const FString* FTermDetection::sec_da = 0;
|
const FString* FTermDetection::sec_da = nullptr;
|
||||||
int FTermDetection::gnome_terminal_id;
|
int FTermDetection::gnome_terminal_id;
|
||||||
|
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
|
@ -182,7 +182,7 @@ bool FTermDetection::getTTYtype()
|
||||||
{
|
{
|
||||||
char* name;
|
char* name;
|
||||||
char* type;
|
char* type;
|
||||||
type = name = 0; // 0 == not found
|
type = name = nullptr; // nullptr == not found
|
||||||
p = str;
|
p = str;
|
||||||
|
|
||||||
while ( *p )
|
while ( *p )
|
||||||
|
@ -311,7 +311,7 @@ void FTermDetection::detectTerminal()
|
||||||
{
|
{
|
||||||
// Terminal detection
|
// Terminal detection
|
||||||
|
|
||||||
char* new_termtype = 0;
|
char* new_termtype = nullptr;
|
||||||
|
|
||||||
if ( terminal_detection )
|
if ( terminal_detection )
|
||||||
{
|
{
|
||||||
|
@ -359,7 +359,7 @@ void FTermDetection::detectTerminal()
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
char* FTermDetection::init_256colorTerminal()
|
char* FTermDetection::init_256colorTerminal()
|
||||||
{
|
{
|
||||||
char* new_termtype = 0;
|
char* new_termtype = nullptr;
|
||||||
|
|
||||||
if ( get256colorEnvString() )
|
if ( get256colorEnvString() )
|
||||||
color256 = true;
|
color256 = true;
|
||||||
|
@ -422,7 +422,7 @@ bool FTermDetection::get256colorEnvString()
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
char* FTermDetection::termtype_256color_quirks()
|
char* FTermDetection::termtype_256color_quirks()
|
||||||
{
|
{
|
||||||
char* new_termtype = 0;
|
char* new_termtype = nullptr;
|
||||||
|
|
||||||
if ( ! color256 )
|
if ( ! color256 )
|
||||||
return new_termtype;
|
return new_termtype;
|
||||||
|
|
|
@ -44,7 +44,7 @@ namespace finalcut
|
||||||
bool FTermLinux::half_block_character = true;
|
bool FTermLinux::half_block_character = true;
|
||||||
bool FTermLinux::has_saved_palette = false;
|
bool FTermLinux::has_saved_palette = false;
|
||||||
|
|
||||||
FTermDetection* FTermLinux::term_detection = 0;
|
FTermDetection* FTermLinux::term_detection = nullptr;
|
||||||
fc::linuxConsoleCursorStyle FTermLinux::linux_console_cursor_style;
|
fc::linuxConsoleCursorStyle FTermLinux::linux_console_cursor_style;
|
||||||
FTermLinux::ColorMap FTermLinux::saved_color_map;
|
FTermLinux::ColorMap FTermLinux::saved_color_map;
|
||||||
FTermLinux::ColorMap FTermLinux::cmap;
|
FTermLinux::ColorMap FTermLinux::cmap;
|
||||||
|
@ -148,8 +148,8 @@ void FTermLinux::init()
|
||||||
{
|
{
|
||||||
// initialize Linux console
|
// initialize Linux console
|
||||||
|
|
||||||
screen_unicode_map.entries = 0;
|
screen_unicode_map.entries = nullptr;
|
||||||
screen_font.data = 0;
|
screen_font.data = nullptr;
|
||||||
|
|
||||||
if ( FTerm::openConsole() == 0 )
|
if ( FTerm::openConsole() == 0 )
|
||||||
{
|
{
|
||||||
|
@ -342,7 +342,7 @@ bool FTermLinux::loadOldFont (uInt char_map[][fc::NUM_OF_ENCODINGS])
|
||||||
, screen_font.height
|
, screen_font.height
|
||||||
, true );
|
, true );
|
||||||
delete[] screen_font.data;
|
delete[] screen_font.data;
|
||||||
screen_font.data = 0;
|
screen_font.data = nullptr;
|
||||||
|
|
||||||
if ( ret == 0 )
|
if ( ret == 0 )
|
||||||
retval = true;
|
retval = true;
|
||||||
|
@ -353,7 +353,7 @@ bool FTermLinux::loadOldFont (uInt char_map[][fc::NUM_OF_ENCODINGS])
|
||||||
setUnicodeMap (&screen_unicode_map);
|
setUnicodeMap (&screen_unicode_map);
|
||||||
initCharMap(char_map);
|
initCharMap(char_map);
|
||||||
delete[] screen_unicode_map.entries;
|
delete[] screen_unicode_map.entries;
|
||||||
screen_unicode_map.entries = 0;
|
screen_unicode_map.entries = nullptr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -569,7 +569,7 @@ bool FTermLinux::getUnicodeMap()
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
screen_unicode_map.entry_ct = 0;
|
screen_unicode_map.entry_ct = 0;
|
||||||
screen_unicode_map.entries = 0;
|
screen_unicode_map.entries = nullptr;
|
||||||
|
|
||||||
// get count
|
// get count
|
||||||
ret = ioctl (fd_tty, GIO_UNIMAP, &screen_unicode_map);
|
ret = ioctl (fd_tty, GIO_UNIMAP, &screen_unicode_map);
|
||||||
|
|
|
@ -33,16 +33,16 @@ bool FTermXTerminal::meta_sends_esc;
|
||||||
bool FTermXTerminal::xterm_default_colors;
|
bool FTermXTerminal::xterm_default_colors;
|
||||||
std::size_t FTermXTerminal::term_width = 80;
|
std::size_t FTermXTerminal::term_width = 80;
|
||||||
std::size_t FTermXTerminal::term_height = 24;
|
std::size_t FTermXTerminal::term_height = 24;
|
||||||
const FString* FTermXTerminal::xterm_font = 0;
|
const FString* FTermXTerminal::xterm_font = nullptr;
|
||||||
const FString* FTermXTerminal::xterm_title = 0;
|
const FString* FTermXTerminal::xterm_title = nullptr;
|
||||||
const FString* FTermXTerminal::foreground_color = 0;
|
const FString* FTermXTerminal::foreground_color = nullptr;
|
||||||
const FString* FTermXTerminal::background_color = 0;
|
const FString* FTermXTerminal::background_color = nullptr;
|
||||||
const FString* FTermXTerminal::cursor_color = 0;
|
const FString* FTermXTerminal::cursor_color = nullptr;
|
||||||
const FString* FTermXTerminal::mouse_foreground_color = 0;
|
const FString* FTermXTerminal::mouse_foreground_color = nullptr;
|
||||||
const FString* FTermXTerminal::mouse_background_color = 0;
|
const FString* FTermXTerminal::mouse_background_color = nullptr;
|
||||||
const FString* FTermXTerminal::highlight_background_color = 0;
|
const FString* FTermXTerminal::highlight_background_color = nullptr;
|
||||||
FTermcap::tcap_map* FTermXTerminal::tcap = 0;
|
FTermcap::tcap_map* FTermXTerminal::tcap = nullptr;
|
||||||
FTermDetection* FTermXTerminal::term_detection = 0;
|
FTermDetection* FTermXTerminal::term_detection = nullptr;
|
||||||
fc::xtermCursorStyle FTermXTerminal::cursor_style = fc::unknown_cursor_style;
|
fc::xtermCursorStyle FTermXTerminal::cursor_style = fc::unknown_cursor_style;
|
||||||
|
|
||||||
|
|
||||||
|
@ -257,7 +257,7 @@ void FTermXTerminal::resetForeground()
|
||||||
if ( foreground_color )
|
if ( foreground_color )
|
||||||
delete foreground_color;
|
delete foreground_color;
|
||||||
|
|
||||||
foreground_color = 0;
|
foreground_color = nullptr;
|
||||||
resetXTermForeground();
|
resetXTermForeground();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -269,7 +269,7 @@ void FTermXTerminal::resetBackground()
|
||||||
if ( background_color )
|
if ( background_color )
|
||||||
delete background_color;
|
delete background_color;
|
||||||
|
|
||||||
background_color = 0;
|
background_color = nullptr;
|
||||||
resetXTermBackground();
|
resetXTermBackground();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -281,7 +281,7 @@ void FTermXTerminal::resetCursorColor()
|
||||||
if ( cursor_color )
|
if ( cursor_color )
|
||||||
delete cursor_color;
|
delete cursor_color;
|
||||||
|
|
||||||
cursor_color = 0;
|
cursor_color = nullptr;
|
||||||
resetXTermCursorColor();
|
resetXTermCursorColor();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -293,7 +293,7 @@ void FTermXTerminal::resetMouseForeground()
|
||||||
if ( mouse_foreground_color )
|
if ( mouse_foreground_color )
|
||||||
delete mouse_foreground_color;
|
delete mouse_foreground_color;
|
||||||
|
|
||||||
mouse_foreground_color = 0;
|
mouse_foreground_color = nullptr;
|
||||||
resetXTermMouseForeground();
|
resetXTermMouseForeground();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -305,7 +305,7 @@ void FTermXTerminal::resetMouseBackground()
|
||||||
if ( mouse_background_color )
|
if ( mouse_background_color )
|
||||||
delete mouse_background_color;
|
delete mouse_background_color;
|
||||||
|
|
||||||
mouse_background_color = 0;
|
mouse_background_color = nullptr;
|
||||||
resetXTermMouseBackground();
|
resetXTermMouseBackground();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -317,7 +317,7 @@ void FTermXTerminal::resetHighlightBackground()
|
||||||
if ( highlight_background_color )
|
if ( highlight_background_color )
|
||||||
delete highlight_background_color;
|
delete highlight_background_color;
|
||||||
|
|
||||||
highlight_background_color = 0;
|
highlight_background_color = nullptr;
|
||||||
resetXTermHighlightBackground();
|
resetXTermHighlightBackground();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -54,7 +54,7 @@ FToolTip::~FToolTip() // destructor
|
||||||
if ( fapp->isQuit() )
|
if ( fapp->isQuit() )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
FWindow* parent_win = 0;
|
FWindow* parent_win = nullptr;
|
||||||
|
|
||||||
if ( FWidget* parent = getParentWidget() )
|
if ( FWidget* parent = getParentWidget() )
|
||||||
parent_win = getWindowWidget(parent);
|
parent_win = getWindowWidget(parent);
|
||||||
|
|
|
@ -34,7 +34,7 @@ namespace finalcut
|
||||||
{
|
{
|
||||||
|
|
||||||
// global FVTerm object
|
// global FVTerm object
|
||||||
static FVTerm* init_object = 0;
|
static FVTerm* init_object = nullptr;
|
||||||
|
|
||||||
// static class attributes
|
// static class attributes
|
||||||
bool FVTerm::terminal_update_complete;
|
bool FVTerm::terminal_update_complete;
|
||||||
|
@ -47,14 +47,14 @@ uInt FVTerm::repeat_char_length;
|
||||||
uInt FVTerm::clr_bol_length;
|
uInt FVTerm::clr_bol_length;
|
||||||
uInt FVTerm::clr_eol_length;
|
uInt FVTerm::clr_eol_length;
|
||||||
uInt FVTerm::cursor_address_length;
|
uInt FVTerm::cursor_address_length;
|
||||||
std::queue<int>* FVTerm::output_buffer = 0;
|
std::queue<int>* FVTerm::output_buffer = nullptr;
|
||||||
FPoint* FVTerm::term_pos = 0;
|
FPoint* FVTerm::term_pos = nullptr;
|
||||||
FTerm* FVTerm::fterm = 0;
|
FTerm* FVTerm::fterm = nullptr;
|
||||||
FVTerm::term_area* FVTerm::vterm = 0;
|
FVTerm::term_area* FVTerm::vterm = nullptr;
|
||||||
FVTerm::term_area* FVTerm::vdesktop = 0;
|
FVTerm::term_area* FVTerm::vdesktop = nullptr;
|
||||||
FVTerm::term_area* FVTerm::active_area = 0;
|
FVTerm::term_area* FVTerm::active_area = nullptr;
|
||||||
FTermcap::tcap_map* FVTerm::tcap = 0;
|
FTermcap::tcap_map* FVTerm::tcap = nullptr;
|
||||||
FKeyboard* FVTerm::keyboard = 0;
|
FKeyboard* FVTerm::keyboard = nullptr;
|
||||||
FVTerm::charData FVTerm::term_attribute;
|
FVTerm::charData FVTerm::term_attribute;
|
||||||
FVTerm::charData FVTerm::next_attribute;
|
FVTerm::charData FVTerm::next_attribute;
|
||||||
FVTerm::charData FVTerm::s_ch;
|
FVTerm::charData FVTerm::s_ch;
|
||||||
|
@ -790,17 +790,17 @@ void FVTerm::removeArea (term_area*& area)
|
||||||
if ( area->changes != 0 )
|
if ( area->changes != 0 )
|
||||||
{
|
{
|
||||||
delete[] area->changes;
|
delete[] area->changes;
|
||||||
area->changes = 0;
|
area->changes = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( area->text != 0 )
|
if ( area->text != 0 )
|
||||||
{
|
{
|
||||||
delete[] area->text;
|
delete[] area->text;
|
||||||
area->text = 0;
|
area->text = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
delete area;
|
delete area;
|
||||||
area = 0;
|
area = nullptr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1972,8 +1972,8 @@ void FVTerm::flush_out()
|
||||||
void FVTerm::init (bool disable_alt_screen)
|
void FVTerm::init (bool disable_alt_screen)
|
||||||
{
|
{
|
||||||
init_object = this;
|
init_object = this;
|
||||||
vterm = 0;
|
vterm = nullptr;
|
||||||
vdesktop = 0;
|
vdesktop = nullptr;
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|
|
@ -31,17 +31,17 @@ namespace finalcut
|
||||||
{
|
{
|
||||||
|
|
||||||
// global FWidget object
|
// global FWidget object
|
||||||
static FWidget* rootObject = 0;
|
static FWidget* rootObject = nullptr;
|
||||||
|
|
||||||
// static class attributes
|
// static class attributes
|
||||||
FStatusBar* FWidget::statusbar = 0;
|
FStatusBar* FWidget::statusbar = nullptr;
|
||||||
FMenuBar* FWidget::menubar = 0;
|
FMenuBar* FWidget::menubar = nullptr;
|
||||||
FWidget* FWidget::show_root_widget = 0;
|
FWidget* FWidget::show_root_widget = nullptr;
|
||||||
FWidget* FWidget::redraw_root_widget = 0;
|
FWidget* FWidget::redraw_root_widget = nullptr;
|
||||||
FWidget::widgetList* FWidget::window_list = 0;
|
FWidget::widgetList* FWidget::window_list = nullptr;
|
||||||
FWidget::widgetList* FWidget::dialog_list = 0;
|
FWidget::widgetList* FWidget::dialog_list = nullptr;
|
||||||
FWidget::widgetList* FWidget::always_on_top_list = 0;
|
FWidget::widgetList* FWidget::always_on_top_list = nullptr;
|
||||||
FWidget::widgetList* FWidget::close_widget = 0;
|
FWidget::widgetList* FWidget::close_widget = nullptr;
|
||||||
FWidgetColors FWidget::wc;
|
FWidgetColors FWidget::wc;
|
||||||
bool FWidget::init_desktop;
|
bool FWidget::init_desktop;
|
||||||
bool FWidget::hideable;
|
bool FWidget::hideable;
|
||||||
|
@ -73,10 +73,10 @@ FWidget::FWidget (FWidget* parent, bool disable_alt_screen)
|
||||||
&& "FTerm: There should be only one root object" );
|
&& "FTerm: There should be only one root object" );
|
||||||
|
|
||||||
rootObject = this;
|
rootObject = this;
|
||||||
show_root_widget = 0;
|
show_root_widget = nullptr;
|
||||||
redraw_root_widget = 0;
|
redraw_root_widget = nullptr;
|
||||||
modal_dialogs = 0;
|
modal_dialogs = 0;
|
||||||
statusbar = 0;
|
statusbar = nullptr;
|
||||||
init();
|
init();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -1017,7 +1017,7 @@ void FWidget::redraw()
|
||||||
{
|
{
|
||||||
updateTerminal();
|
updateTerminal();
|
||||||
flush_out();
|
flush_out();
|
||||||
redraw_root_widget = 0;
|
redraw_root_widget = nullptr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1094,7 +1094,7 @@ void FWidget::show()
|
||||||
finishTerminalUpdate();
|
finishTerminalUpdate();
|
||||||
updateTerminal();
|
updateTerminal();
|
||||||
flush_out();
|
flush_out();
|
||||||
show_root_widget = 0;
|
show_root_widget = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
FShowEvent show_ev (fc::Show_Event);
|
FShowEvent show_ev (fc::Show_Event);
|
||||||
|
@ -1669,7 +1669,7 @@ bool FWidget::focusNextChild()
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
FWidget* next = 0;
|
FWidget* next = nullptr;
|
||||||
constFObjectIterator next_element;
|
constFObjectIterator next_element;
|
||||||
next_element = iter;
|
next_element = iter;
|
||||||
|
|
||||||
|
@ -1730,7 +1730,7 @@ bool FWidget::focusPrevChild()
|
||||||
if ( w != this )
|
if ( w != this )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
FWidget* prev = 0;
|
FWidget* prev = nullptr;
|
||||||
constFObjectIterator prev_element;
|
constFObjectIterator prev_element;
|
||||||
prev_element = iter;
|
prev_element = iter;
|
||||||
|
|
||||||
|
@ -1979,30 +1979,30 @@ void FWidget::init()
|
||||||
void FWidget::finish()
|
void FWidget::finish()
|
||||||
{
|
{
|
||||||
delete accelerator_list;
|
delete accelerator_list;
|
||||||
accelerator_list = 0;
|
accelerator_list = nullptr;
|
||||||
|
|
||||||
if ( close_widget )
|
if ( close_widget )
|
||||||
{
|
{
|
||||||
delete close_widget;
|
delete close_widget;
|
||||||
close_widget = 0;
|
close_widget = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( dialog_list )
|
if ( dialog_list )
|
||||||
{
|
{
|
||||||
delete dialog_list;
|
delete dialog_list;
|
||||||
dialog_list = 0;
|
dialog_list = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( always_on_top_list )
|
if ( always_on_top_list )
|
||||||
{
|
{
|
||||||
delete always_on_top_list;
|
delete always_on_top_list;
|
||||||
always_on_top_list = 0;
|
always_on_top_list = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( window_list )
|
if ( window_list )
|
||||||
{
|
{
|
||||||
delete window_list;
|
delete window_list;
|
||||||
window_list = 0;
|
window_list = nullptr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,7 @@ namespace finalcut
|
||||||
{
|
{
|
||||||
|
|
||||||
// static attributes
|
// static attributes
|
||||||
FWindow* FWindow::previous_window = 0;
|
FWindow* FWindow::previous_window = nullptr;
|
||||||
|
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
|
@ -54,7 +54,7 @@ FWindow::~FWindow() // destructor
|
||||||
FApplication* fapp = static_cast<FApplication*>(getRootWidget());
|
FApplication* fapp = static_cast<FApplication*>(getRootWidget());
|
||||||
|
|
||||||
if ( previous_window == this )
|
if ( previous_window == this )
|
||||||
previous_window = 0;
|
previous_window = nullptr;
|
||||||
|
|
||||||
if ( isAlwaysOnTop() )
|
if ( isAlwaysOnTop() )
|
||||||
deleteFromAlwaysOnTopList (this);
|
deleteFromAlwaysOnTopList (this);
|
||||||
|
|
|
@ -92,7 +92,7 @@ inline const FString& emptyFString::get()
|
||||||
inline void emptyFString::clear()
|
inline void emptyFString::clear()
|
||||||
{
|
{
|
||||||
delete empty_string;
|
delete empty_string;
|
||||||
empty_string = 0;
|
empty_string = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace fc
|
} // namespace fc
|
||||||
|
|
|
@ -68,8 +68,8 @@ class FButton : public FWidget
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
// Constructors
|
// Constructors
|
||||||
explicit FButton (FWidget* = 0);
|
explicit FButton (FWidget* = nullptr);
|
||||||
explicit FButton (const FString&, FWidget* = 0);
|
explicit FButton (const FString&, FWidget* = nullptr);
|
||||||
// Disable copy constructor
|
// Disable copy constructor
|
||||||
FButton (const FButton&) = delete;
|
FButton (const FButton&) = delete;
|
||||||
// Destructor
|
// Destructor
|
||||||
|
|
|
@ -72,8 +72,8 @@ class FButtonGroup : public FScrollView
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
// Constructors
|
// Constructors
|
||||||
explicit FButtonGroup (FWidget* = 0);
|
explicit FButtonGroup (FWidget* = nullptr);
|
||||||
explicit FButtonGroup (const FString&, FWidget* = 0);
|
explicit FButtonGroup (const FString&, FWidget* = nullptr);
|
||||||
// Disable copy constructor
|
// Disable copy constructor
|
||||||
FButtonGroup (const FButtonGroup&) = delete;
|
FButtonGroup (const FButtonGroup&) = delete;
|
||||||
// Destructor
|
// Destructor
|
||||||
|
|
|
@ -73,8 +73,8 @@ class FCheckBox : public FToggleButton
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
// Constructors
|
// Constructors
|
||||||
explicit FCheckBox (FWidget* = 0);
|
explicit FCheckBox (FWidget* = nullptr);
|
||||||
explicit FCheckBox (const FString&, FWidget* = 0);
|
explicit FCheckBox (const FString&, FWidget* = nullptr);
|
||||||
// Disable copy constructor
|
// Disable copy constructor
|
||||||
FCheckBox (const FCheckBox&) = delete;
|
FCheckBox (const FCheckBox&) = delete;
|
||||||
// Destructor
|
// Destructor
|
||||||
|
|
|
@ -73,8 +73,8 @@ class FCheckMenuItem : public FMenuItem
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
// Constructors
|
// Constructors
|
||||||
explicit FCheckMenuItem (FWidget* = 0);
|
explicit FCheckMenuItem (FWidget* = nullptr);
|
||||||
explicit FCheckMenuItem (const FString&, FWidget* = 0);
|
explicit FCheckMenuItem (const FString&, FWidget* = nullptr);
|
||||||
// Disable copy constructor
|
// Disable copy constructor
|
||||||
FCheckMenuItem (const FCheckMenuItem&) = delete;
|
FCheckMenuItem (const FCheckMenuItem&) = delete;
|
||||||
// Destructor
|
// Destructor
|
||||||
|
|
|
@ -87,8 +87,8 @@ class FDialog : public FWindow
|
||||||
};
|
};
|
||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
explicit FDialog (FWidget* = 0);
|
explicit FDialog (FWidget* = nullptr);
|
||||||
explicit FDialog (const FString&, FWidget* = 0);
|
explicit FDialog (const FString&, FWidget* = nullptr);
|
||||||
// Disable copy constructor
|
// Disable copy constructor
|
||||||
FDialog (const FDialog&) = delete;
|
FDialog (const FDialog&) = delete;
|
||||||
// Destructor
|
// Destructor
|
||||||
|
@ -229,12 +229,12 @@ class FDialog : public FWindow
|
||||||
FPoint titlebar_click_pos{};
|
FPoint titlebar_click_pos{};
|
||||||
FPoint resize_click_pos{};
|
FPoint resize_click_pos{};
|
||||||
FRect save_geometry{}; // required by keyboard move/size
|
FRect save_geometry{}; // required by keyboard move/size
|
||||||
FMenu* dialog_menu{0};
|
FMenu* dialog_menu{nullptr};
|
||||||
FMenuItem* dgl_menuitem{0};
|
FMenuItem* dgl_menuitem{nullptr};
|
||||||
FMenuItem* move_size_item{0};
|
FMenuItem* move_size_item{nullptr};
|
||||||
FMenuItem* zoom_item{0};
|
FMenuItem* zoom_item{nullptr};
|
||||||
FMenuItem* close_item{0};
|
FMenuItem* close_item{nullptr};
|
||||||
FToolTip* tooltip{0};
|
FToolTip* tooltip{nullptr};
|
||||||
|
|
||||||
// Friend function from FMenu
|
// Friend function from FMenu
|
||||||
friend void FMenu::hideSuperMenus();
|
friend void FMenu::hideSuperMenus();
|
||||||
|
|
|
@ -79,8 +79,8 @@ class FDialogListMenu : public FMenu
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
// Constructors
|
// Constructors
|
||||||
explicit FDialogListMenu (FWidget* = 0);
|
explicit FDialogListMenu (FWidget* = nullptr);
|
||||||
explicit FDialogListMenu (const FString&, FWidget* = 0);
|
explicit FDialogListMenu (const FString&, FWidget* = nullptr);
|
||||||
// Disable copy constructor
|
// Disable copy constructor
|
||||||
FDialogListMenu (const FDialogListMenu&) = delete;
|
FDialogListMenu (const FDialogListMenu&) = delete;
|
||||||
// Destructor
|
// Destructor
|
||||||
|
|
|
@ -102,12 +102,12 @@ class FFileDialog : public FDialog
|
||||||
};
|
};
|
||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
explicit FFileDialog (FWidget* = 0);
|
explicit FFileDialog (FWidget* = nullptr);
|
||||||
FFileDialog (const FFileDialog&); // copy constructor
|
FFileDialog (const FFileDialog&); // copy constructor
|
||||||
FFileDialog ( const FString&
|
FFileDialog ( const FString&
|
||||||
, const FString&
|
, const FString&
|
||||||
, DialogType = FFileDialog::Open
|
, DialogType = FFileDialog::Open
|
||||||
, FWidget* = 0 );
|
, FWidget* = nullptr );
|
||||||
// Destructor
|
// Destructor
|
||||||
virtual ~FFileDialog();
|
virtual ~FFileDialog();
|
||||||
|
|
||||||
|
@ -186,7 +186,7 @@ class FFileDialog : public FDialog
|
||||||
void cb_processShowHidden (FWidget*, data_ptr);
|
void cb_processShowHidden (FWidget*, data_ptr);
|
||||||
|
|
||||||
// Data Members
|
// Data Members
|
||||||
DIR* directory_stream{0};
|
DIR* directory_stream{nullptr};
|
||||||
dirEntries dir_entries{};
|
dirEntries dir_entries{};
|
||||||
FString directory{};
|
FString directory{};
|
||||||
FString filter_pattern{};
|
FString filter_pattern{};
|
||||||
|
|
|
@ -60,15 +60,16 @@ class FKeyboardCommand
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
// Constructor
|
// Constructor
|
||||||
explicit FKeyboardCommand (FApplication* = 0, void(FApplication::*)() = 0);
|
explicit FKeyboardCommand ( FApplication* = nullptr
|
||||||
|
, void(FApplication::*)() = nullptr);
|
||||||
|
|
||||||
// Method
|
// Method
|
||||||
void execute();
|
void execute();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Data Members
|
// Data Members
|
||||||
FApplication* instance{0};
|
FApplication* instance{nullptr};
|
||||||
void (FApplication::*handler)(){0};
|
void (FApplication::*handler)(){nullptr};
|
||||||
};
|
};
|
||||||
#pragma pack(pop)
|
#pragma pack(pop)
|
||||||
|
|
||||||
|
@ -180,7 +181,7 @@ class FKeyboard
|
||||||
FKeyboardCommand escape_key_cmd{};
|
FKeyboardCommand escape_key_cmd{};
|
||||||
|
|
||||||
static timeval time_keypressed;
|
static timeval time_keypressed;
|
||||||
fc::fkeymap* key_map{0};
|
fc::fkeymap* key_map{nullptr};
|
||||||
|
|
||||||
#if defined(__linux__)
|
#if defined(__linux__)
|
||||||
#undef linux
|
#undef linux
|
||||||
|
|
|
@ -73,8 +73,8 @@ class FLabel : public FWidget
|
||||||
using FWidget::setEnable;
|
using FWidget::setEnable;
|
||||||
|
|
||||||
// Constructor
|
// Constructor
|
||||||
explicit FLabel (FWidget* = 0);
|
explicit FLabel (FWidget* = nullptr);
|
||||||
explicit FLabel (const FString&, FWidget* = 0);
|
explicit FLabel (const FString&, FWidget* = nullptr);
|
||||||
// Disable copy constructor
|
// Disable copy constructor
|
||||||
FLabel (const FLabel&) = delete;
|
FLabel (const FLabel&) = delete;
|
||||||
// Destructor
|
// Destructor
|
||||||
|
@ -104,7 +104,7 @@ class FLabel : public FWidget
|
||||||
FString& getText();
|
FString& getText();
|
||||||
|
|
||||||
// Mutators
|
// Mutators
|
||||||
void setAccelWidget (FWidget* = 0);
|
void setAccelWidget (FWidget* = nullptr);
|
||||||
void setAlignment(fc::text_alignment);
|
void setAlignment(fc::text_alignment);
|
||||||
bool setEmphasis(bool);
|
bool setEmphasis(bool);
|
||||||
bool setEmphasis();
|
bool setEmphasis();
|
||||||
|
@ -160,7 +160,7 @@ class FLabel : public FWidget
|
||||||
FColor ellipsis_color{wc.label_ellipsis_fg};
|
FColor ellipsis_color{wc.label_ellipsis_fg};
|
||||||
bool emphasis{false};
|
bool emphasis{false};
|
||||||
bool reverse_mode{false};
|
bool reverse_mode{false};
|
||||||
FWidget* accel_widget{0};
|
FWidget* accel_widget{nullptr};
|
||||||
};
|
};
|
||||||
#pragma pack(pop)
|
#pragma pack(pop)
|
||||||
|
|
||||||
|
|
|
@ -76,8 +76,8 @@ class FLineEdit : public FWidget
|
||||||
};
|
};
|
||||||
|
|
||||||
// Constructor
|
// Constructor
|
||||||
explicit FLineEdit (FWidget* = 0);
|
explicit FLineEdit (FWidget* = nullptr);
|
||||||
explicit FLineEdit (const FString&, FWidget* = 0);
|
explicit FLineEdit (const FString&, FWidget* = nullptr);
|
||||||
// Disable copy constructor
|
// Disable copy constructor
|
||||||
FLineEdit (const FLineEdit&) = delete;
|
FLineEdit (const FLineEdit&) = delete;
|
||||||
// Destructor
|
// Destructor
|
||||||
|
|
|
@ -75,7 +75,7 @@ class FListBoxItem
|
||||||
// Constructors
|
// Constructors
|
||||||
FListBoxItem ();
|
FListBoxItem ();
|
||||||
FListBoxItem (const FListBoxItem&); // copy constructor
|
FListBoxItem (const FListBoxItem&); // copy constructor
|
||||||
explicit FListBoxItem (const FString&, FWidget::data_ptr = 0);
|
explicit FListBoxItem (const FString&, FWidget::data_ptr = nullptr);
|
||||||
|
|
||||||
// Destructor
|
// Destructor
|
||||||
virtual ~FListBoxItem();
|
virtual ~FListBoxItem();
|
||||||
|
@ -100,7 +100,7 @@ class FListBoxItem
|
||||||
|
|
||||||
// Data Members
|
// Data Members
|
||||||
FString text{};
|
FString text{};
|
||||||
FWidget::data_ptr data_pointer{0};
|
FWidget::data_ptr data_pointer{nullptr};
|
||||||
fc::brackets_type brackets{fc::NoBrackets};
|
fc::brackets_type brackets{fc::NoBrackets};
|
||||||
bool selected{false};
|
bool selected{false};
|
||||||
};
|
};
|
||||||
|
@ -146,11 +146,11 @@ class FListBox : public FWidget
|
||||||
using FWidget::setGeometry;
|
using FWidget::setGeometry;
|
||||||
|
|
||||||
// Constructor
|
// Constructor
|
||||||
explicit FListBox (FWidget* = 0);
|
explicit FListBox (FWidget* = nullptr);
|
||||||
template <typename Iterator, typename InsertConverter>
|
template <typename Iterator, typename InsertConverter>
|
||||||
FListBox (Iterator, Iterator, InsertConverter, FWidget* = 0);
|
FListBox (Iterator, Iterator, InsertConverter, FWidget* = nullptr);
|
||||||
template <typename Container, typename LazyConverter>
|
template <typename Container, typename LazyConverter>
|
||||||
FListBox (Container, LazyConverter, FWidget* = 0);
|
FListBox (Container, LazyConverter, FWidget* = nullptr);
|
||||||
// Disable copy constructor
|
// Disable copy constructor
|
||||||
FListBox (const FListBox&) = delete;
|
FListBox (const FListBox&) = delete;
|
||||||
// Destructor
|
// Destructor
|
||||||
|
@ -204,11 +204,11 @@ class FListBox : public FWidget
|
||||||
void insert ( const FString&
|
void insert ( const FString&
|
||||||
, fc::brackets_type = fc::NoBrackets
|
, fc::brackets_type = fc::NoBrackets
|
||||||
, bool = false
|
, bool = false
|
||||||
, data_ptr = 0 );
|
, data_ptr = nullptr );
|
||||||
void insert ( long
|
void insert ( long
|
||||||
, fc::brackets_type = fc::NoBrackets
|
, fc::brackets_type = fc::NoBrackets
|
||||||
, bool = false
|
, bool = false
|
||||||
, data_ptr = 0 );
|
, data_ptr = nullptr );
|
||||||
void remove (std::size_t);
|
void remove (std::size_t);
|
||||||
void clear();
|
void clear();
|
||||||
|
|
||||||
|
@ -297,14 +297,14 @@ class FListBox : public FWidget
|
||||||
// Function Pointer
|
// Function Pointer
|
||||||
void (*convertToItem) ( FListBoxItem&
|
void (*convertToItem) ( FListBoxItem&
|
||||||
, FWidget::data_ptr
|
, FWidget::data_ptr
|
||||||
, int index ){0};
|
, int index ){nullptr};
|
||||||
|
|
||||||
// Data Members
|
// Data Members
|
||||||
listBoxItems itemlist{};
|
listBoxItems itemlist{};
|
||||||
FWidget::data_ptr source_container{0};
|
FWidget::data_ptr source_container{nullptr};
|
||||||
convert_type conv_type{FListBox::no_convert};
|
convert_type conv_type{FListBox::no_convert};
|
||||||
FScrollbar* vbar{0};
|
FScrollbar* vbar{nullptr};
|
||||||
FScrollbar* hbar{0};
|
FScrollbar* hbar{nullptr};
|
||||||
FString text{};
|
FString text{};
|
||||||
FString inc_search{};
|
FString inc_search{};
|
||||||
bool multi_select{false};
|
bool multi_select{false};
|
||||||
|
|
|
@ -129,7 +129,7 @@ class FListViewItem : public FObject
|
||||||
|
|
||||||
// Data Members
|
// Data Members
|
||||||
FStringList column_list{};
|
FStringList column_list{};
|
||||||
FWidget::data_ptr data_pointer{0};
|
FWidget::data_ptr data_pointer{nullptr};
|
||||||
FObjectIterator root{};
|
FObjectIterator root{};
|
||||||
std::size_t visible_lines{1};
|
std::size_t visible_lines{1};
|
||||||
bool expandable{false};
|
bool expandable{false};
|
||||||
|
@ -272,7 +272,7 @@ class FListView : public FWidget
|
||||||
using FWidget::setGeometry;
|
using FWidget::setGeometry;
|
||||||
|
|
||||||
// Constructor
|
// Constructor
|
||||||
explicit FListView (FWidget* = 0);
|
explicit FListView (FWidget* = nullptr);
|
||||||
// Disable copy constructor
|
// Disable copy constructor
|
||||||
FListView (const FListView&) = delete;
|
FListView (const FListView&) = delete;
|
||||||
// Destructor
|
// Destructor
|
||||||
|
@ -315,14 +315,14 @@ class FListView : public FWidget
|
||||||
FObjectIterator insert (FListViewItem*);
|
FObjectIterator insert (FListViewItem*);
|
||||||
FObjectIterator insert (FListViewItem*, FObjectIterator);
|
FObjectIterator insert (FListViewItem*, FObjectIterator);
|
||||||
FObjectIterator insert ( const FStringList&
|
FObjectIterator insert ( const FStringList&
|
||||||
, data_ptr = 0 );
|
, data_ptr = nullptr );
|
||||||
FObjectIterator insert ( const FStringList&
|
FObjectIterator insert ( const FStringList&
|
||||||
, FObjectIterator );
|
, FObjectIterator );
|
||||||
FObjectIterator insert ( const FStringList&
|
FObjectIterator insert ( const FStringList&
|
||||||
, data_ptr
|
, data_ptr
|
||||||
, FObjectIterator );
|
, FObjectIterator );
|
||||||
FObjectIterator insert ( const std::vector<long>&
|
FObjectIterator insert ( const std::vector<long>&
|
||||||
, data_ptr = 0 );
|
, data_ptr = nullptr );
|
||||||
FObjectIterator insert ( const std::vector<long>&
|
FObjectIterator insert ( const std::vector<long>&
|
||||||
, FObjectIterator );
|
, FObjectIterator );
|
||||||
FObjectIterator insert ( const std::vector<long>&
|
FObjectIterator insert ( const std::vector<long>&
|
||||||
|
@ -428,8 +428,8 @@ class FListView : public FWidget
|
||||||
FListViewIterator last_visible_line{};
|
FListViewIterator last_visible_line{};
|
||||||
headerItems header{};
|
headerItems header{};
|
||||||
FTermBuffer headerline{};
|
FTermBuffer headerline{};
|
||||||
FScrollbar* vbar{0};
|
FScrollbar* vbar{nullptr};
|
||||||
FScrollbar* hbar{0};
|
FScrollbar* hbar{nullptr};
|
||||||
fc::dragScroll drag_scroll{fc::noScroll};
|
fc::dragScroll drag_scroll{fc::noScroll};
|
||||||
int scroll_repeat{100};
|
int scroll_repeat{100};
|
||||||
int scroll_distance{1};
|
int scroll_distance{1};
|
||||||
|
@ -439,15 +439,15 @@ class FListView : public FWidget
|
||||||
bool has_checkable_items{false};
|
bool has_checkable_items{false};
|
||||||
FPoint clicked_expander_pos{-1, -1};
|
FPoint clicked_expander_pos{-1, -1};
|
||||||
FPoint clicked_header_pos{-1, -1};
|
FPoint clicked_header_pos{-1, -1};
|
||||||
const FListViewItem* clicked_checkbox_item{0};
|
const FListViewItem* clicked_checkbox_item{nullptr};
|
||||||
int xoffset{0};
|
int xoffset{0};
|
||||||
std::size_t nf_offset{0};
|
std::size_t nf_offset{0};
|
||||||
std::size_t max_line_width{1};
|
std::size_t max_line_width{1};
|
||||||
int sort_column{-1};
|
int sort_column{-1};
|
||||||
sortTypes sort_type{};
|
sortTypes sort_type{};
|
||||||
fc::sorting_order sort_order{fc::unsorted};
|
fc::sorting_order sort_order{fc::unsorted};
|
||||||
bool (*user_defined_ascending) (const FObject*, const FObject*){0};
|
bool (*user_defined_ascending) (const FObject*, const FObject*){nullptr};
|
||||||
bool (*user_defined_descending) (const FObject*, const FObject*){0};
|
bool (*user_defined_descending) (const FObject*, const FObject*){nullptr};
|
||||||
|
|
||||||
// Friend class
|
// Friend class
|
||||||
friend class FListViewItem;
|
friend class FListViewItem;
|
||||||
|
|
|
@ -78,8 +78,8 @@ class FMenu : public FWindow, public FMenuList
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
// Constructor
|
// Constructor
|
||||||
explicit FMenu (FWidget* = 0);
|
explicit FMenu (FWidget* = nullptr);
|
||||||
explicit FMenu (const FString&, FWidget* = 0);
|
explicit FMenu (const FString&, FWidget* = nullptr);
|
||||||
// Disable copy constructor
|
// Disable copy constructor
|
||||||
FMenu (const FMenu&) = delete;
|
FMenu (const FMenu&) = delete;
|
||||||
// Destructor
|
// Destructor
|
||||||
|
@ -230,9 +230,9 @@ class FMenu : public FWindow, public FMenuList
|
||||||
|
|
||||||
// Data Members
|
// Data Members
|
||||||
FMenuItem item{};
|
FMenuItem item{};
|
||||||
FWidget* super_menu{0};
|
FWidget* super_menu{nullptr};
|
||||||
FMenu* opened_sub_menu{0};
|
FMenu* opened_sub_menu{nullptr};
|
||||||
FMenu* shown_sub_menu{0};
|
FMenu* shown_sub_menu{nullptr};
|
||||||
std::size_t max_item_width{0};
|
std::size_t max_item_width{0};
|
||||||
std::size_t hotkeypos{NOT_SET};
|
std::size_t hotkeypos{NOT_SET};
|
||||||
bool mouse_down{false};
|
bool mouse_down{false};
|
||||||
|
|
|
@ -77,7 +77,7 @@ class FMenuBar : public FWindow, public FMenuList
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
// Constructor
|
// Constructor
|
||||||
explicit FMenuBar (FWidget* = 0);
|
explicit FMenuBar (FWidget* = nullptr);
|
||||||
// Disable copy constructor
|
// Disable copy constructor
|
||||||
FMenuBar (const FMenuBar&) = delete;
|
FMenuBar (const FMenuBar&) = delete;
|
||||||
// Destructor
|
// Destructor
|
||||||
|
|
|
@ -82,9 +82,9 @@ class FMenuItem : public FWidget
|
||||||
using FWidget::setEnable;
|
using FWidget::setEnable;
|
||||||
|
|
||||||
// Constructor
|
// Constructor
|
||||||
explicit FMenuItem (FWidget* = 0);
|
explicit FMenuItem (FWidget* = nullptr);
|
||||||
explicit FMenuItem (const FString&, FWidget* = 0);
|
explicit FMenuItem (const FString&, FWidget* = nullptr);
|
||||||
FMenuItem (FKey, const FString&, FWidget* = 0);
|
FMenuItem (FKey, const FString&, FWidget* = nullptr);
|
||||||
// Disable copy constructor
|
// Disable copy constructor
|
||||||
FMenuItem (const FMenuItem&) = delete;
|
FMenuItem (const FMenuItem&) = delete;
|
||||||
// Destructor
|
// Destructor
|
||||||
|
@ -159,9 +159,9 @@ class FMenuItem : public FWidget
|
||||||
std::size_t text_length{0};
|
std::size_t text_length{0};
|
||||||
uChar hotkey{0};
|
uChar hotkey{0};
|
||||||
FKey accel_key{0};
|
FKey accel_key{0};
|
||||||
FMenu* menu{0};
|
FMenu* menu{nullptr};
|
||||||
FWidget* super_menu{0};
|
FWidget* super_menu{nullptr};
|
||||||
FDialog* associated_window{0};
|
FDialog* associated_window{nullptr};
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Accessor
|
// Accessor
|
||||||
|
|
|
@ -95,11 +95,11 @@ class FMessageBox : public FDialog
|
||||||
};
|
};
|
||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
explicit FMessageBox (FWidget* = 0);
|
explicit FMessageBox (FWidget* = nullptr);
|
||||||
FMessageBox (const FMessageBox&); // copy constructor
|
FMessageBox (const FMessageBox&); // copy constructor
|
||||||
FMessageBox ( const FString&, const FString&
|
FMessageBox ( const FString&, const FString&
|
||||||
, int, int, int
|
, int, int, int
|
||||||
, FWidget* = 0 );
|
, FWidget* = nullptr );
|
||||||
// Destructor
|
// Destructor
|
||||||
virtual ~FMessageBox();
|
virtual ~FMessageBox();
|
||||||
|
|
||||||
|
@ -161,7 +161,7 @@ class FMessageBox : public FDialog
|
||||||
// Data Members
|
// Data Members
|
||||||
FString headline_text{};
|
FString headline_text{};
|
||||||
FString text{};
|
FString text{};
|
||||||
FString* text_components{0};
|
FString* text_components{nullptr};
|
||||||
FStringList text_split{};
|
FStringList text_split{};
|
||||||
std::size_t max_line_width{0};
|
std::size_t max_line_width{0};
|
||||||
bool center_text{false};
|
bool center_text{false};
|
||||||
|
@ -169,7 +169,7 @@ class FMessageBox : public FDialog
|
||||||
uInt num_buttons{0};
|
uInt num_buttons{0};
|
||||||
uInt text_num_lines{0};
|
uInt text_num_lines{0};
|
||||||
int button_digit[3]{0};
|
int button_digit[3]{0};
|
||||||
FButton* button[3]{0};
|
FButton* button[3]{nullptr};
|
||||||
};
|
};
|
||||||
#pragma pack(pop)
|
#pragma pack(pop)
|
||||||
|
|
||||||
|
|
|
@ -71,7 +71,7 @@ class FObject
|
||||||
typedef FObjectList::const_iterator constFObjectIterator;
|
typedef FObjectList::const_iterator constFObjectIterator;
|
||||||
|
|
||||||
// Constructor
|
// Constructor
|
||||||
explicit FObject (FObject* = 0);
|
explicit FObject (FObject* = nullptr);
|
||||||
// Disable copy constructor
|
// Disable copy constructor
|
||||||
FObject (const FObject&) = delete;
|
FObject (const FObject&) = delete;
|
||||||
// Destructor
|
// Destructor
|
||||||
|
@ -144,7 +144,7 @@ class FObject
|
||||||
virtual void performTimerAction (const FObject*, const FEvent*);
|
virtual void performTimerAction (const FObject*, const FEvent*);
|
||||||
|
|
||||||
// Data Members
|
// Data Members
|
||||||
FObject* parent_obj{};
|
FObject* parent_obj{nullptr};
|
||||||
FObjectList children_list{}; // no children yet
|
FObjectList children_list{}; // no children yet
|
||||||
bool has_parent{false};
|
bool has_parent{false};
|
||||||
bool widget_object{false};
|
bool widget_object{false};
|
||||||
|
|
|
@ -71,7 +71,7 @@ class FProgressbar : public FWidget
|
||||||
using FWidget::setGeometry;
|
using FWidget::setGeometry;
|
||||||
|
|
||||||
// Constructor
|
// Constructor
|
||||||
explicit FProgressbar(FWidget* = 0);
|
explicit FProgressbar(FWidget* = nullptr);
|
||||||
|
|
||||||
// Destructor
|
// Destructor
|
||||||
virtual ~FProgressbar();
|
virtual ~FProgressbar();
|
||||||
|
|
|
@ -73,8 +73,8 @@ class FRadioButton : public FToggleButton
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
// Constructors
|
// Constructors
|
||||||
explicit FRadioButton (FWidget* = 0);
|
explicit FRadioButton (FWidget* = nullptr);
|
||||||
explicit FRadioButton (const FString&, FWidget* = 0);
|
explicit FRadioButton (const FString&, FWidget* = nullptr);
|
||||||
// Disable copy constructor
|
// Disable copy constructor
|
||||||
FRadioButton (const FRadioButton&) = delete;
|
FRadioButton (const FRadioButton&) = delete;
|
||||||
// Destructor
|
// Destructor
|
||||||
|
|
|
@ -73,8 +73,8 @@ class FRadioMenuItem : public FMenuItem
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
// Constructors
|
// Constructors
|
||||||
explicit FRadioMenuItem (FWidget* = 0);
|
explicit FRadioMenuItem (FWidget* = nullptr);
|
||||||
explicit FRadioMenuItem (const FString&, FWidget* = 0);
|
explicit FRadioMenuItem (const FString&, FWidget* = nullptr);
|
||||||
// Disable copy constructor
|
// Disable copy constructor
|
||||||
FRadioMenuItem (const FRadioMenuItem&) = delete;
|
FRadioMenuItem (const FRadioMenuItem&) = delete;
|
||||||
// Destructor
|
// Destructor
|
||||||
|
|
|
@ -84,8 +84,8 @@ class FScrollbar : public FWidget
|
||||||
};
|
};
|
||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
explicit FScrollbar (FWidget* = 0);
|
explicit FScrollbar (FWidget* = nullptr);
|
||||||
explicit FScrollbar (int = fc::vertical, FWidget* = 0);
|
explicit FScrollbar (int = fc::vertical, FWidget* = nullptr);
|
||||||
// Disable copy constructor
|
// Disable copy constructor
|
||||||
FScrollbar (const FScrollbar&) = delete;
|
FScrollbar (const FScrollbar&) = delete;
|
||||||
// Destructor
|
// Destructor
|
||||||
|
|
|
@ -75,7 +75,7 @@ class FScrollView : public FWidget
|
||||||
using FWidget::setPos;
|
using FWidget::setPos;
|
||||||
|
|
||||||
// Constructor
|
// Constructor
|
||||||
explicit FScrollView (FWidget* = 0);
|
explicit FScrollView (FWidget* = nullptr);
|
||||||
// Disable copy constructor
|
// Disable copy constructor
|
||||||
FScrollView (const FScrollView&) = delete;
|
FScrollView (const FScrollView&) = delete;
|
||||||
// Destructor
|
// Destructor
|
||||||
|
@ -176,9 +176,9 @@ class FScrollView : public FWidget
|
||||||
// Data Members
|
// Data Members
|
||||||
FRect scroll_geometry{1, 1, 1, 1};
|
FRect scroll_geometry{1, 1, 1, 1};
|
||||||
FRect viewport_geometry{};
|
FRect viewport_geometry{};
|
||||||
term_area* viewport{0}; // virtual scroll content
|
term_area* viewport{nullptr}; // virtual scroll content
|
||||||
FScrollbar* vbar{0};
|
FScrollbar* vbar{nullptr};
|
||||||
FScrollbar* hbar{0};
|
FScrollbar* hbar{nullptr};
|
||||||
uInt8 nf_offset{0};
|
uInt8 nf_offset{0};
|
||||||
bool border{true};
|
bool border{true};
|
||||||
bool use_own_print_area{false};
|
bool use_own_print_area{false};
|
||||||
|
|
|
@ -80,8 +80,8 @@ class FStatusKey : public FWidget
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
// Constructors
|
// Constructors
|
||||||
explicit FStatusKey (FWidget* = 0);
|
explicit FStatusKey (FWidget* = nullptr);
|
||||||
FStatusKey (FKey, const FString&, FWidget* = 0);
|
FStatusKey (FKey, const FString&, FWidget* = nullptr);
|
||||||
// Disable copy constructor
|
// Disable copy constructor
|
||||||
FStatusKey (const FStatusKey&) = delete;
|
FStatusKey (const FStatusKey&) = delete;
|
||||||
// Destructor
|
// Destructor
|
||||||
|
@ -126,7 +126,7 @@ class FStatusKey : public FWidget
|
||||||
FString text{};
|
FString text{};
|
||||||
bool active{false};
|
bool active{false};
|
||||||
bool mouse_focus{false};
|
bool mouse_focus{false};
|
||||||
FStatusBar* bar{0};
|
FStatusBar* bar{nullptr};
|
||||||
};
|
};
|
||||||
#pragma pack(pop)
|
#pragma pack(pop)
|
||||||
|
|
||||||
|
@ -192,7 +192,7 @@ class FStatusBar : public FWindow
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
// Constructor
|
// Constructor
|
||||||
explicit FStatusBar (FWidget* = 0);
|
explicit FStatusBar (FWidget* = nullptr);
|
||||||
// Disable copy constructor
|
// Disable copy constructor
|
||||||
FStatusBar (const FStatusBar&) = delete;
|
FStatusBar (const FStatusBar&) = delete;
|
||||||
// Destructor
|
// Destructor
|
||||||
|
|
|
@ -278,10 +278,10 @@ class FString
|
||||||
wchar_t* extractToken (wchar_t*[], const wchar_t[], const wchar_t[]);
|
wchar_t* extractToken (wchar_t*[], const wchar_t[], const wchar_t[]);
|
||||||
|
|
||||||
// Data Members
|
// Data Members
|
||||||
wchar_t* string{0};
|
wchar_t* string{nullptr};
|
||||||
std::size_t length{0};
|
std::size_t length{0};
|
||||||
std::size_t bufsize{0};
|
std::size_t bufsize{0};
|
||||||
mutable char* c_string{0};
|
mutable char* c_string{nullptr};
|
||||||
};
|
};
|
||||||
#pragma pack(pop)
|
#pragma pack(pop)
|
||||||
|
|
||||||
|
|
|
@ -73,8 +73,8 @@ class FSwitch : public FToggleButton
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
// Constructors
|
// Constructors
|
||||||
explicit FSwitch (FWidget* = 0);
|
explicit FSwitch (FWidget* = nullptr);
|
||||||
explicit FSwitch (const FString&, FWidget* = 0);
|
explicit FSwitch (const FString&, FWidget* = nullptr);
|
||||||
// Disable copy constructor
|
// Disable copy constructor
|
||||||
FSwitch (const FSwitch&) = delete;
|
FSwitch (const FSwitch&) = delete;
|
||||||
// Destructor
|
// Destructor
|
||||||
|
|
|
@ -71,8 +71,8 @@ class FTermDebugData
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Data Members
|
// Data Members
|
||||||
FTermDetection* term_detection{0};
|
FTermDetection* term_detection{nullptr};
|
||||||
FTermData* data{0};
|
FTermData* data{nullptr};
|
||||||
};
|
};
|
||||||
|
|
||||||
// FTermDebugData inline functions
|
// FTermDebugData inline functions
|
||||||
|
|
|
@ -215,13 +215,13 @@ class FTermDetection
|
||||||
{
|
{
|
||||||
void setDefault()
|
void setDefault()
|
||||||
{
|
{
|
||||||
string1 = 0;
|
string1 = nullptr;
|
||||||
string2 = 0;
|
string2 = nullptr;
|
||||||
string3 = 0;
|
string3 = nullptr;
|
||||||
string4 = 0;
|
string4 = nullptr;
|
||||||
string5 = 0;
|
string5 = nullptr;
|
||||||
string6 = 0;
|
string6 = nullptr;
|
||||||
string7 = 0;
|
string7 = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
char* string1;
|
char* string1;
|
||||||
|
|
|
@ -77,7 +77,7 @@ class FTextView : public FWidget
|
||||||
using FWidget::setGeometry;
|
using FWidget::setGeometry;
|
||||||
|
|
||||||
// Constructor
|
// Constructor
|
||||||
explicit FTextView (FWidget* = 0);
|
explicit FTextView (FWidget* = nullptr);
|
||||||
// Disable copy constructor
|
// Disable copy constructor
|
||||||
FTextView (const FTextView&) = delete;
|
FTextView (const FTextView&) = delete;
|
||||||
// Destructor
|
// Destructor
|
||||||
|
@ -145,8 +145,8 @@ class FTextView : public FWidget
|
||||||
|
|
||||||
// Data Members
|
// Data Members
|
||||||
FStringList data{};
|
FStringList data{};
|
||||||
FScrollbar* vbar{0};
|
FScrollbar* vbar{nullptr};
|
||||||
FScrollbar* hbar{0};
|
FScrollbar* hbar{nullptr};
|
||||||
bool update_scrollbar{true};
|
bool update_scrollbar{true};
|
||||||
int xoffset{0};
|
int xoffset{0};
|
||||||
int yoffset{0};
|
int yoffset{0};
|
||||||
|
|
|
@ -74,8 +74,8 @@ class FToggleButton : public FWidget
|
||||||
using FWidget::setGeometry;
|
using FWidget::setGeometry;
|
||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
explicit FToggleButton (FWidget* = 0);
|
explicit FToggleButton (FWidget* = nullptr);
|
||||||
explicit FToggleButton (const FString&, FWidget* = 0);
|
explicit FToggleButton (const FString&, FWidget* = nullptr);
|
||||||
// Disable copy constructor
|
// Disable copy constructor
|
||||||
FToggleButton (const FToggleButton&) = delete;
|
FToggleButton (const FToggleButton&) = delete;
|
||||||
// Destructor
|
// Destructor
|
||||||
|
@ -162,7 +162,7 @@ class FToggleButton : public FWidget
|
||||||
friend class FButtonGroup;
|
friend class FButtonGroup;
|
||||||
|
|
||||||
// Data Members
|
// Data Members
|
||||||
FButtonGroup* button_group{0};
|
FButtonGroup* button_group{nullptr};
|
||||||
bool focus_inside_group{true};
|
bool focus_inside_group{true};
|
||||||
FString text{};
|
FString text{};
|
||||||
};
|
};
|
||||||
|
|
|
@ -75,8 +75,8 @@ class FToolTip : public FWindow
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
// Constructor
|
// Constructor
|
||||||
explicit FToolTip (FWidget* = 0);
|
explicit FToolTip (FWidget* = nullptr);
|
||||||
explicit FToolTip (const FString&, FWidget* = 0);
|
explicit FToolTip (const FString&, FWidget* = nullptr);
|
||||||
// Disable copy constructor
|
// Disable copy constructor
|
||||||
FToolTip (const FToolTip&) = delete;
|
FToolTip (const FToolTip&) = delete;
|
||||||
// Destructor
|
// Destructor
|
||||||
|
@ -108,7 +108,7 @@ class FToolTip : public FWindow
|
||||||
|
|
||||||
// Data Members
|
// Data Members
|
||||||
FString text{};
|
FString text{};
|
||||||
FString* text_components{0};
|
FString* text_components{nullptr};
|
||||||
FStringList text_split{};
|
FStringList text_split{};
|
||||||
std::size_t max_line_width{0};
|
std::size_t max_line_width{0};
|
||||||
std::size_t text_num_lines{0};
|
std::size_t text_num_lines{0};
|
||||||
|
|
|
@ -427,12 +427,12 @@ class FVTerm
|
||||||
;
|
;
|
||||||
|
|
||||||
// Data Members
|
// Data Members
|
||||||
static term_area* vterm; // virtual terminal
|
static term_area* vterm; // virtual terminal
|
||||||
static term_area* vdesktop; // virtual desktop
|
static term_area* vdesktop; // virtual desktop
|
||||||
static term_area* active_area; // active area
|
static term_area* active_area; // active area
|
||||||
term_area* print_area{0}; // print area for this object
|
term_area* print_area{nullptr}; // print area for this object
|
||||||
term_area* child_print_area{0}; // print area for children
|
term_area* child_print_area{nullptr}; // print area for children
|
||||||
term_area* vwin{0}; // virtual window
|
term_area* vwin{nullptr}; // virtual window
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Typedef and Enumeration
|
// Typedef and Enumeration
|
||||||
|
@ -536,20 +536,20 @@ struct FVTerm::term_area // define virtual terminal character properties
|
||||||
// Disable assignment operator (=)
|
// Disable assignment operator (=)
|
||||||
term_area& operator = (const term_area&) = delete;
|
term_area& operator = (const term_area&) = delete;
|
||||||
|
|
||||||
int offset_left{0}; // Distance from left terminal side
|
int offset_left{0}; // Distance from left terminal side
|
||||||
int offset_top{0}; // Distance from top of the terminal
|
int offset_top{0}; // Distance from top of the terminal
|
||||||
int width{-1}; // Window width
|
int width{-1}; // Window width
|
||||||
int height{-1}; // Window height
|
int height{-1}; // Window height
|
||||||
int right_shadow{0}; // Right window shadow
|
int right_shadow{0}; // Right window shadow
|
||||||
int bottom_shadow{0}; // Bottom window shadow
|
int bottom_shadow{0}; // Bottom window shadow
|
||||||
int cursor_x{0}; // X-position for the next write operation
|
int cursor_x{0}; // X-position for the next write operation
|
||||||
int cursor_y{0}; // Y-position for the next write operation
|
int cursor_y{0}; // Y-position for the next write operation
|
||||||
int input_cursor_x{-1}; // X-position input cursor
|
int input_cursor_x{-1}; // X-position input cursor
|
||||||
int input_cursor_y{-1}; // Y-position input cursor
|
int input_cursor_y{-1}; // Y-position input cursor
|
||||||
FWidget* widget{}; // Widget that owns this term_area
|
FWidget* widget{nullptr}; // Widget that owns this term_area
|
||||||
FPreprocessing preprocessing_call{};
|
FPreprocessing preprocessing_call{};
|
||||||
line_changes* changes{0};
|
line_changes* changes{nullptr};
|
||||||
charData* text{0}; // Text data for the output
|
charData* text{nullptr}; // Text data for the output
|
||||||
bool input_cursor_visible{false};
|
bool input_cursor_visible{false};
|
||||||
bool has_changes{false};
|
bool has_changes{false};
|
||||||
bool visible{false};
|
bool visible{false};
|
||||||
|
|
|
@ -166,7 +166,7 @@ class FWidget : public FVTerm, public FObject
|
||||||
};
|
};
|
||||||
|
|
||||||
// Constructor
|
// Constructor
|
||||||
explicit FWidget (FWidget* = 0, bool = false);
|
explicit FWidget (FWidget* = nullptr, bool = false);
|
||||||
// Disable copy constructor
|
// Disable copy constructor
|
||||||
FWidget (const FWidget&) = delete;
|
FWidget (const FWidget&) = delete;
|
||||||
// Destructor
|
// Destructor
|
||||||
|
@ -305,11 +305,11 @@ class FWidget : public FVTerm, public FObject
|
||||||
void clearStatusbarMessage();
|
void clearStatusbarMessage();
|
||||||
void addCallback ( const FString&
|
void addCallback ( const FString&
|
||||||
, FCallback
|
, FCallback
|
||||||
, data_ptr = null );
|
, data_ptr = nullptr );
|
||||||
void addCallback ( const FString&
|
void addCallback ( const FString&
|
||||||
, FWidget*
|
, FWidget*
|
||||||
, FMemberCallback
|
, FMemberCallback
|
||||||
, data_ptr = null );
|
, data_ptr = nullptr );
|
||||||
void delCallback (FCallback);
|
void delCallback (FCallback);
|
||||||
void delCallback (FWidget*);
|
void delCallback (FWidget*);
|
||||||
void delCallbacks();
|
void delCallbacks();
|
||||||
|
@ -338,7 +338,7 @@ class FWidget : public FVTerm, public FObject
|
||||||
|
|
||||||
// Data Members
|
// Data Members
|
||||||
static widgetList* window_list;
|
static widgetList* window_list;
|
||||||
Accelerators* accelerator_list{0};
|
Accelerators* accelerator_list{nullptr};
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
struct callback_data
|
struct callback_data
|
||||||
|
|
|
@ -82,7 +82,7 @@ class FWindow : public FWidget
|
||||||
using FWidget::move;
|
using FWidget::move;
|
||||||
|
|
||||||
// Constructor
|
// Constructor
|
||||||
explicit FWindow (FWidget* = 0);
|
explicit FWindow (FWidget* = nullptr);
|
||||||
// Disable copy constructor
|
// Disable copy constructor
|
||||||
FWindow (const FWindow&) = delete;
|
FWindow (const FWindow&) = delete;
|
||||||
// Destructor
|
// Destructor
|
||||||
|
@ -179,7 +179,7 @@ class FWindow : public FWidget
|
||||||
// Data Members
|
// Data Members
|
||||||
bool window_active{false};
|
bool window_active{false};
|
||||||
bool zoomed{false};
|
bool zoomed{false};
|
||||||
FWidget* win_focus_widget{0};
|
FWidget* win_focus_widget{nullptr};
|
||||||
FRect normalGeometry{};
|
FRect normalGeometry{};
|
||||||
};
|
};
|
||||||
#pragma pack(pop)
|
#pragma pack(pop)
|
||||||
|
|
|
@ -29,7 +29,7 @@ endif
|
||||||
all: $(OBJS)
|
all: $(OBJS)
|
||||||
|
|
||||||
debug:
|
debug:
|
||||||
$(MAKE) $(MAKEFILE) DEBUG="-g -D DEBUG -Wall -Wextra -Wpedantic -Wpadded -Wno-c++98-compat -Wno-implicit-fallthrough"
|
$(MAKE) $(MAKEFILE) DEBUG="-g -D DEBUG -Wall -Wextra -Wpedantic -Wpadded -Wno-c++98-compat -Wno-c++98-compat-pedantic -Wno-implicit-fallthrough"
|
||||||
|
|
||||||
check: test
|
check: test
|
||||||
test: debug
|
test: debug
|
||||||
|
|
|
@ -279,7 +279,7 @@ class FKeyboardTest : public CPPUNIT_NS::TestFixture
|
||||||
FKey key_pressed{0};
|
FKey key_pressed{0};
|
||||||
FKey key_released{0};
|
FKey key_released{0};
|
||||||
int number_of_keys{0};
|
int number_of_keys{0};
|
||||||
finalcut::FKeyboard* keyboard{0};
|
finalcut::FKeyboard* keyboard{nullptr};
|
||||||
};
|
};
|
||||||
#pragma pack(pop)
|
#pragma pack(pop)
|
||||||
|
|
||||||
|
|
|
@ -133,7 +133,7 @@ void FOptiAttrTest::noArgumentTest()
|
||||||
CPPUNIT_ASSERT ( oa.isNormal(ch) );
|
CPPUNIT_ASSERT ( oa.isNormal(ch) );
|
||||||
|
|
||||||
// Null test
|
// Null test
|
||||||
finalcut::FOptiAttr::charData* ch_null = 0;
|
finalcut::FOptiAttr::charData* ch_null = nullptr;
|
||||||
CPPUNIT_ASSERT ( oa.changeAttribute(ch, ch) == 0 );
|
CPPUNIT_ASSERT ( oa.changeAttribute(ch, ch) == 0 );
|
||||||
CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(ch, ch_null), C_STR("") );
|
CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(ch, ch_null), C_STR("") );
|
||||||
CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(ch_null, ch), C_STR("") );
|
CPPUNIT_ASSERT_CSTRING ( oa.changeAttribute(ch_null, ch), C_STR("") );
|
||||||
|
|
|
@ -95,7 +95,7 @@ void FPointTest::classNameTest()
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
void FPointTest::noArgumentTest()
|
void FPointTest::noArgumentTest()
|
||||||
{
|
{
|
||||||
const finalcut::FPoint point;
|
const finalcut::FPoint point{};
|
||||||
CPPUNIT_ASSERT ( point.getX() == 0 );
|
CPPUNIT_ASSERT ( point.getX() == 0 );
|
||||||
CPPUNIT_ASSERT ( point.getY() == 0 );
|
CPPUNIT_ASSERT ( point.getY() == 0 );
|
||||||
CPPUNIT_ASSERT ( point.isNull() );
|
CPPUNIT_ASSERT ( point.isNull() );
|
||||||
|
@ -226,8 +226,8 @@ void FPointTest::equalTest()
|
||||||
CPPUNIT_ASSERT ( p1 == p2 );
|
CPPUNIT_ASSERT ( p1 == p2 );
|
||||||
CPPUNIT_ASSERT ( finalcut::FPoint(1,2) == p2 );
|
CPPUNIT_ASSERT ( finalcut::FPoint(1,2) == p2 );
|
||||||
CPPUNIT_ASSERT ( p1 == finalcut::FPoint(1,2) );
|
CPPUNIT_ASSERT ( p1 == finalcut::FPoint(1,2) );
|
||||||
const finalcut::FPoint p3;
|
const finalcut::FPoint p3{};
|
||||||
const finalcut::FPoint p4;
|
const finalcut::FPoint p4{};
|
||||||
CPPUNIT_ASSERT ( p3 == p4 );
|
CPPUNIT_ASSERT ( p3 == p4 );
|
||||||
CPPUNIT_ASSERT ( p3 == -p4 );
|
CPPUNIT_ASSERT ( p3 == -p4 );
|
||||||
}
|
}
|
||||||
|
|
|
@ -99,7 +99,7 @@ void FRectTest::classNameTest()
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
void FRectTest::noArgumentTest()
|
void FRectTest::noArgumentTest()
|
||||||
{
|
{
|
||||||
const finalcut::FRect rectangle;
|
const finalcut::FRect rectangle{};
|
||||||
CPPUNIT_ASSERT ( rectangle.getX1() == 0 );
|
CPPUNIT_ASSERT ( rectangle.getX1() == 0 );
|
||||||
CPPUNIT_ASSERT ( rectangle.getY1() == 0 );
|
CPPUNIT_ASSERT ( rectangle.getY1() == 0 );
|
||||||
CPPUNIT_ASSERT ( rectangle.getX2() == -1 );
|
CPPUNIT_ASSERT ( rectangle.getX2() == -1 );
|
||||||
|
@ -299,8 +299,8 @@ void FRectTest::equalTest()
|
||||||
CPPUNIT_ASSERT ( r1 == r2 );
|
CPPUNIT_ASSERT ( r1 == r2 );
|
||||||
CPPUNIT_ASSERT ( finalcut::FRect(1, 2, 10, 20) == r2 );
|
CPPUNIT_ASSERT ( finalcut::FRect(1, 2, 10, 20) == r2 );
|
||||||
CPPUNIT_ASSERT ( r1 == finalcut::FRect(1, 2, 10, 20) );
|
CPPUNIT_ASSERT ( r1 == finalcut::FRect(1, 2, 10, 20) );
|
||||||
const finalcut::FRect r3;
|
const finalcut::FRect r3{};
|
||||||
const finalcut::FRect r4;
|
const finalcut::FRect r4{};
|
||||||
CPPUNIT_ASSERT ( r3 == r4 );
|
CPPUNIT_ASSERT ( r3 == r4 );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -584,8 +584,8 @@ void FStringTest::equalTest()
|
||||||
const std::wstring wst = L"abc";
|
const std::wstring wst = L"abc";
|
||||||
CPPUNIT_ASSERT ( str == wst );
|
CPPUNIT_ASSERT ( str == wst );
|
||||||
|
|
||||||
const finalcut::FString null_str1;
|
const finalcut::FString null_str1{};
|
||||||
const finalcut::FString null_str2;
|
const finalcut::FString null_str2{};
|
||||||
CPPUNIT_ASSERT ( ! (str == null_str2) );
|
CPPUNIT_ASSERT ( ! (str == null_str2) );
|
||||||
CPPUNIT_ASSERT ( ! (null_str1 == str) );
|
CPPUNIT_ASSERT ( ! (null_str1 == str) );
|
||||||
CPPUNIT_ASSERT ( null_str1 == null_str2 );
|
CPPUNIT_ASSERT ( null_str1 == null_str2 );
|
||||||
|
@ -635,8 +635,8 @@ void FStringTest::notEqualTest()
|
||||||
const std::wstring wst = L"abc";
|
const std::wstring wst = L"abc";
|
||||||
CPPUNIT_ASSERT ( s1 != wst );
|
CPPUNIT_ASSERT ( s1 != wst );
|
||||||
|
|
||||||
const finalcut::FString null_str1;
|
const finalcut::FString null_str1{};
|
||||||
const finalcut::FString null_str2;
|
const finalcut::FString null_str2{};
|
||||||
CPPUNIT_ASSERT ( s1 != null_str2 );
|
CPPUNIT_ASSERT ( s1 != null_str2 );
|
||||||
CPPUNIT_ASSERT ( null_str1 != s1 );
|
CPPUNIT_ASSERT ( null_str1 != s1 );
|
||||||
CPPUNIT_ASSERT ( ! (null_str1 != null_str2) );
|
CPPUNIT_ASSERT ( ! (null_str1 != null_str2) );
|
||||||
|
@ -680,8 +680,8 @@ void FStringTest::lessEqualTest()
|
||||||
CPPUNIT_ASSERT ( s1 <= wst1 && s1 == wst1 );
|
CPPUNIT_ASSERT ( s1 <= wst1 && s1 == wst1 );
|
||||||
CPPUNIT_ASSERT ( s1 <= wst2 && s1 != wst2 );
|
CPPUNIT_ASSERT ( s1 <= wst2 && s1 != wst2 );
|
||||||
|
|
||||||
const finalcut::FString null_str1;
|
const finalcut::FString null_str1{};
|
||||||
const finalcut::FString null_str2;
|
const finalcut::FString null_str2{};
|
||||||
const finalcut::FString empty("");
|
const finalcut::FString empty("");
|
||||||
CPPUNIT_ASSERT ( ! (s1 <= null_str2) );
|
CPPUNIT_ASSERT ( ! (s1 <= null_str2) );
|
||||||
CPPUNIT_ASSERT ( null_str1 <= s2 );
|
CPPUNIT_ASSERT ( null_str1 <= s2 );
|
||||||
|
@ -715,8 +715,8 @@ void FStringTest::lessTest()
|
||||||
const std::wstring wst = L"xzz";
|
const std::wstring wst = L"xzz";
|
||||||
CPPUNIT_ASSERT ( s1 < wst );
|
CPPUNIT_ASSERT ( s1 < wst );
|
||||||
|
|
||||||
const finalcut::FString null_str1;
|
const finalcut::FString null_str1{};
|
||||||
const finalcut::FString null_str2;
|
const finalcut::FString null_str2{};
|
||||||
CPPUNIT_ASSERT ( ! (s1 < null_str2) );
|
CPPUNIT_ASSERT ( ! (s1 < null_str2) );
|
||||||
CPPUNIT_ASSERT ( null_str1 < s2 );
|
CPPUNIT_ASSERT ( null_str1 < s2 );
|
||||||
CPPUNIT_ASSERT ( ! (null_str1 < null_str2) );
|
CPPUNIT_ASSERT ( ! (null_str1 < null_str2) );
|
||||||
|
@ -758,8 +758,8 @@ void FStringTest::greaterEqualTest()
|
||||||
CPPUNIT_ASSERT ( s1 >= wst1 && s1 == wst1 );
|
CPPUNIT_ASSERT ( s1 >= wst1 && s1 == wst1 );
|
||||||
CPPUNIT_ASSERT ( s1 >= wst2 && s1 != wst2 );
|
CPPUNIT_ASSERT ( s1 >= wst2 && s1 != wst2 );
|
||||||
|
|
||||||
const finalcut::FString null_str1;
|
const finalcut::FString null_str1{};
|
||||||
const finalcut::FString null_str2;
|
const finalcut::FString null_str2{};
|
||||||
const finalcut::FString empty("");
|
const finalcut::FString empty("");
|
||||||
CPPUNIT_ASSERT ( s1 >= null_str2 );
|
CPPUNIT_ASSERT ( s1 >= null_str2 );
|
||||||
CPPUNIT_ASSERT ( ! (null_str1 >= s2) );
|
CPPUNIT_ASSERT ( ! (null_str1 >= s2) );
|
||||||
|
@ -793,8 +793,8 @@ void FStringTest::greaterTest()
|
||||||
const std::wstring wst = L"xww";
|
const std::wstring wst = L"xww";
|
||||||
CPPUNIT_ASSERT ( s1 > wst );
|
CPPUNIT_ASSERT ( s1 > wst );
|
||||||
|
|
||||||
const finalcut::FString null_str1;
|
const finalcut::FString null_str1{};
|
||||||
const finalcut::FString null_str2;
|
const finalcut::FString null_str2{};
|
||||||
CPPUNIT_ASSERT ( s1 > null_str2 );
|
CPPUNIT_ASSERT ( s1 > null_str2 );
|
||||||
CPPUNIT_ASSERT ( ! (null_str1 > s2) );
|
CPPUNIT_ASSERT ( ! (null_str1 > s2) );
|
||||||
CPPUNIT_ASSERT ( ! (null_str1 > null_str2) );
|
CPPUNIT_ASSERT ( ! (null_str1 > null_str2) );
|
||||||
|
@ -1032,7 +1032,7 @@ void FStringTest::formatTest()
|
||||||
CPPUNIT_ASSERT ( str2 == "Add a looo" + finalcut::FString(2048, 'o')
|
CPPUNIT_ASSERT ( str2 == "Add a looo" + finalcut::FString(2048, 'o')
|
||||||
+ "ooong string" );
|
+ "ooong string" );
|
||||||
|
|
||||||
const finalcut::FString null_fstring;
|
const finalcut::FString null_fstring{};
|
||||||
str2.sprintf (null_fstring, 0);
|
str2.sprintf (null_fstring, 0);
|
||||||
CPPUNIT_ASSERT ( str2.isNull() );
|
CPPUNIT_ASSERT ( str2.isNull() );
|
||||||
|
|
||||||
|
@ -1272,7 +1272,7 @@ void FStringTest::trimTest()
|
||||||
CPPUNIT_ASSERT ( trim_str2.ltrim().getLength() == 0 );
|
CPPUNIT_ASSERT ( trim_str2.ltrim().getLength() == 0 );
|
||||||
CPPUNIT_ASSERT ( trim_str2.ltrim().capacity() == 0 );
|
CPPUNIT_ASSERT ( trim_str2.ltrim().capacity() == 0 );
|
||||||
|
|
||||||
const finalcut::FString trim_str3;
|
const finalcut::FString trim_str3{};
|
||||||
CPPUNIT_ASSERT ( trim_str3.ltrim().isEmpty() );
|
CPPUNIT_ASSERT ( trim_str3.ltrim().isEmpty() );
|
||||||
CPPUNIT_ASSERT ( trim_str3.ltrim().isEmpty() );
|
CPPUNIT_ASSERT ( trim_str3.ltrim().isEmpty() );
|
||||||
CPPUNIT_ASSERT ( trim_str3.ltrim().getLength() == 0 );
|
CPPUNIT_ASSERT ( trim_str3.ltrim().getLength() == 0 );
|
||||||
|
@ -1663,7 +1663,7 @@ void FStringTest::removeTest()
|
||||||
void FStringTest::includesTest()
|
void FStringTest::includesTest()
|
||||||
{
|
{
|
||||||
const finalcut::FString str = "Look behind you, a three-headed monkey!";
|
const finalcut::FString str = "Look behind you, a three-headed monkey!";
|
||||||
const finalcut::FString empty1;
|
const finalcut::FString empty1{};
|
||||||
const wchar_t* empty2 = 0;
|
const wchar_t* empty2 = 0;
|
||||||
const char* empty3 = 0;
|
const char* empty3 = 0;
|
||||||
const finalcut::FString search1 = "you";
|
const finalcut::FString search1 = "you";
|
||||||
|
|
|
@ -436,7 +436,7 @@ class FTermDetectionTest : public CPPUNIT_NS::TestFixture
|
||||||
#pragma pack(pop)
|
#pragma pack(pop)
|
||||||
|
|
||||||
// static class attributes
|
// static class attributes
|
||||||
bool* FTermDetectionTest::shared_state = 0;
|
bool* FTermDetectionTest::shared_state = nullptr;
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
FTermDetectionTest::FTermDetectionTest()
|
FTermDetectionTest::FTermDetectionTest()
|
||||||
|
|
Loading…
Reference in New Issue