Use delegated constructors and in-class default member initializers

This commit is contained in:
Markus Gans 2018-12-03 03:22:36 +01:00
parent 4046f05a0c
commit 3537152c28
104 changed files with 851 additions and 1840 deletions

View File

@ -1,5 +1,9 @@
2018-12-01 Markus Gans <guru.mail@muenster.de> 2018-12-01 Markus Gans <guru.mail@muenster.de>
* Improved wheel mouse support * Switched to the language standard C++11
* Use delegated constructors and in-class default member initializers
2018-12-01 Markus Gans <guru.mail@muenster.de>
* Improved gpm wheel mouse support
* Fix compile in optimization level 2 for newer gcc * Fix compile in optimization level 2 for newer gcc
2018-11-27 Markus Gans <guru.mail@muenster.de> 2018-11-27 Markus Gans <guru.mail@muenster.de>

View File

@ -27,7 +27,7 @@ int main (int argc, char* argv[])
} }
``` ```
*(Note: You can close the dialog with the mouse, *(Note: You can close the dialog with the mouse,
<kbd>Shift</kbd>+<kbd>F10</kbd> or <kbd>Ctrl</kbd>+<kbd>^</kbd>.)* <kbd>Shift</kbd>+<kbd>F10</kbd> or <kbd>Ctrl</kbd>+<kbd>^</kbd>)*
After entering the source code in *dialog.cpp* you can compile After entering the source code in *dialog.cpp* you can compile

View File

@ -29,7 +29,7 @@ endif
all: $(OBJS) all: $(OBJS)
debug: debug:
$(MAKE) $(MAKEFILE) DEBUG="-g -D DEBUG -Wall -Wextra -Wpedantic -Weverything -Wpadded -Wno-reserved-id-macro" $(MAKE) $(MAKEFILE) DEBUG="-g -D DEBUG -Wall -Wextra -Wpedantic -Weverything -Wpadded -Wno-c++98-compat -Wno-implicit-fallthrough -Wno-reserved-id-macro"
profile: profile:
$(MAKE) $(MAKEFILE) PROFILE="-pg" $(MAKE) $(MAKEFILE) PROFILE="-pg"

View File

@ -53,14 +53,13 @@ class Button : public finalcut::FButton
private: private:
// Data Member // Data Member
bool checked; bool checked{false};
}; };
#pragma pack(pop) #pragma pack(pop)
//---------------------------------------------------------------------- //----------------------------------------------------------------------
Button::Button (finalcut::FWidget* parent) Button::Button (finalcut::FWidget* parent)
: finalcut::FButton(parent) : finalcut::FButton(parent)
, checked(false)
{ } { }
//---------------------------------------------------------------------- //----------------------------------------------------------------------
@ -217,17 +216,18 @@ class Calc : public finalcut::FDialog
void mapKeyFunctions(); void mapKeyFunctions();
// Data Members // Data Members
bool error; bool error{false};
bool arcus_mode; bool arcus_mode{false};
bool hyperbolic_mode; bool hyperbolic_mode{false};
lDouble a, b; lDouble a{0.0L};
lDouble infinity; lDouble b{0.0L};
uInt max_char; lDouble infinity{std::numeric_limits<lDouble>::infinity()};
int last_key; uInt max_char{33};
char infix_operator; int last_key{-1};
char last_infix_operator; char infix_operator{'\0'};
finalcut::FString input; char last_infix_operator{'\0'};
int button_no[Calc::NUM_OF_BUTTONS]; finalcut::FString input{""};
int button_no[Calc::NUM_OF_BUTTONS]{};
struct stack_data struct stack_data
{ {
@ -235,29 +235,15 @@ class Calc : public finalcut::FDialog
char infix_operator; char infix_operator;
}; };
std::stack<stack_data> bracket_stack; std::stack<stack_data> bracket_stack{};
std::map<Calc::button, Button*> calculator_buttons; std::map<Calc::button, Button*> calculator_buttons{};
std::map<Calc::button, keyFunction> key_map; std::map<Calc::button, keyFunction> key_map{};
}; };
#pragma pack(pop) #pragma pack(pop)
//---------------------------------------------------------------------- //----------------------------------------------------------------------
Calc::Calc (FWidget* parent) Calc::Calc (FWidget* parent)
: finalcut::FDialog(parent) : finalcut::FDialog(parent)
, error(false)
, arcus_mode(false)
, hyperbolic_mode(false)
, a(0.0L)
, b(0.0L)
, infinity(std::numeric_limits<lDouble>::infinity())
, max_char(33)
, last_key(-1)
, infix_operator('\0')
, last_infix_operator('\0')
, input("")
, bracket_stack()
, calculator_buttons()
, key_map()
{ {
mapKeyFunctions(); mapKeyFunctions();
clearInfixOperator(); clearInfixOperator();

View File

@ -60,16 +60,14 @@ class CheckList : public finalcut::FDialog
void cb_showList (finalcut::FWidget*, data_ptr); void cb_showList (finalcut::FWidget*, data_ptr);
// Data Members // Data Members
finalcut::FListView listView; finalcut::FListView listView{this};
finalcut::FStatusBar status_bar; finalcut::FStatusBar status_bar{this};
}; };
#pragma pack(pop) #pragma pack(pop)
//---------------------------------------------------------------------- //----------------------------------------------------------------------
CheckList::CheckList (finalcut::FWidget* parent) CheckList::CheckList (finalcut::FWidget* parent)
: finalcut::FDialog(parent) : finalcut::FDialog(parent)
, listView(this)
, status_bar(this)
{ {
setText (L"Shopping list"); setText (L"Shopping list");
setShadow(); setShadow();

View File

@ -91,22 +91,17 @@ class Listbox : public finalcut::FDialog
virtual void onClose (finalcut::FCloseEvent*); virtual void onClose (finalcut::FCloseEvent*);
// Data Member // Data Member
std::list<double> double_list; std::list<double> double_list{};
finalcut::FListBox list1; finalcut::FListBox list1{this};
finalcut::FListBox list2; finalcut::FListBox list2{this};
finalcut::FListBox list3; finalcut::FListBox list3{this};
finalcut::FButton Quit; finalcut::FButton Quit{this};
}; };
#pragma pack(pop) #pragma pack(pop)
//---------------------------------------------------------------------- //----------------------------------------------------------------------
Listbox::Listbox (finalcut::FWidget* parent) Listbox::Listbox (finalcut::FWidget* parent)
: finalcut::FDialog(parent) : finalcut::FDialog(parent)
, double_list()
, list1(this)
, list2(this)
, list3(this)
, Quit(this)
{ {
temp_str = new finalcut::FString; temp_str = new finalcut::FString;

View File

@ -59,16 +59,14 @@ class Listview : public finalcut::FDialog
void cb_showInMessagebox (finalcut::FWidget*, data_ptr); void cb_showInMessagebox (finalcut::FWidget*, data_ptr);
// Data Members // Data Members
finalcut::FListView listView; finalcut::FListView listView{this};
finalcut::FButton Quit; finalcut::FButton Quit{this};
}; };
#pragma pack(pop) #pragma pack(pop)
//---------------------------------------------------------------------- //----------------------------------------------------------------------
Listview::Listview (finalcut::FWidget* parent) Listview::Listview (finalcut::FWidget* parent)
: finalcut::FDialog(parent) : finalcut::FDialog(parent)
, listView(this)
, Quit(this)
{ {
// Set FListView geometry // Set FListView geometry
listView.setGeometry(2, 1, 33, 14); listView.setGeometry(2, 1, 33, 14);

View File

@ -63,110 +63,61 @@ class Menu : public finalcut::FDialog
void cb_message (finalcut::FWidget*, data_ptr); void cb_message (finalcut::FWidget*, data_ptr);
// Data Members // Data Members
finalcut::FString line; finalcut::FString line{13, wchar_t(finalcut::fc::BoxDrawingsHorizontal)};
finalcut::FMenuBar Menubar; finalcut::FMenuBar Menubar{this};
finalcut::FMenu File; finalcut::FMenu File{"&File", &Menubar};
finalcut::FMenu Edit; finalcut::FMenu Edit{"&Edit", &Menubar};
finalcut::FMenu Choice; finalcut::FMenu Choice{"&Choice", &Menubar};
finalcut::FMenuItem Window; finalcut::FMenuItem Window{"&Window", &Menubar};
finalcut::FMenuItem Help; finalcut::FMenuItem Help{"&Help", &Menubar};
finalcut::FMenuItem New; finalcut::FMenuItem New{"&New", &File};
finalcut::FMenuItem Open; finalcut::FMenuItem Open{"&Open...", &File};
finalcut::FMenuItem Save; finalcut::FMenuItem Save{"&Save", &File};
finalcut::FMenuItem SaveAs; finalcut::FMenuItem SaveAs{"&Save as...", &File};
finalcut::FMenuItem Close; finalcut::FMenuItem Close{"&Close", &File};
finalcut::FMenuItem Line1; finalcut::FMenuItem Line1{&File};
finalcut::FMenuItem Print; finalcut::FMenuItem Print{"&Print", &File};
finalcut::FMenuItem Line2; finalcut::FMenuItem Line2{&File};
finalcut::FMenuItem Quit; finalcut::FMenuItem Quit{"&Quit", &File};
finalcut::FMenuItem Undo; finalcut::FMenuItem Undo{finalcut::fc::Fckey_z, "&Undo", &Edit};
finalcut::FMenuItem Redo; finalcut::FMenuItem Redo{finalcut::fc::Fckey_y, "&Redo", &Edit};
finalcut::FMenuItem Line3; finalcut::FMenuItem Line3{&Edit};
finalcut::FMenuItem Cut; finalcut::FMenuItem Cut{finalcut::fc::Fckey_x, "Cu&t", &Edit};
finalcut::FMenuItem Copy; finalcut::FMenuItem Copy{finalcut::fc::Fckey_c, "&Copy", &Edit};
finalcut::FMenuItem Paste; finalcut::FMenuItem Paste{finalcut::fc::Fckey_v, "&Paste", &Edit};
finalcut::FMenuItem Line4; finalcut::FMenuItem Line4{&Edit};
finalcut::FMenuItem Search; finalcut::FMenuItem Search{finalcut::fc::Fckey_f, "&Search", &Edit};
finalcut::FMenuItem Next; finalcut::FMenuItem Next{finalcut::fc::Fkey_f3, "Search &next", &Edit};
finalcut::FMenuItem Line5; finalcut::FMenuItem Line5{&Edit};
finalcut::FMenuItem SelectAll; finalcut::FMenuItem SelectAll{finalcut::fc::Fckey_a, "Select &all", &Edit};
finalcut::FMenu Color; finalcut::FMenu Color{"&Color", &Choice};
finalcut::FMenu Style; finalcut::FMenu Style{"&Style", &Choice};
finalcut::FMenu Border; finalcut::FMenu Border{"&Border", &Choice};
finalcut::FRadioMenuItem Color1; finalcut::FRadioMenuItem Color1{"Red", &Color};
finalcut::FRadioMenuItem Color2; finalcut::FRadioMenuItem Color2{"Green", &Color};
finalcut::FRadioMenuItem Color3; finalcut::FRadioMenuItem Color3{"Yellow", &Color};
finalcut::FRadioMenuItem Color4; finalcut::FRadioMenuItem Color4{"Brue", &Color};
finalcut::FRadioMenuItem Color5; finalcut::FRadioMenuItem Color5{"Black", &Color};
finalcut::FCheckMenuItem Bold; finalcut::FCheckMenuItem Bold{"Bold", &Style};
finalcut::FCheckMenuItem Italic; finalcut::FCheckMenuItem Italic{"Italic", &Style};
finalcut::FMenu BColor; finalcut::FMenu BColor{"&Color", &Border};
finalcut::FMenu BStyle; finalcut::FMenu BStyle{"&Style", &Border};
finalcut::FRadioMenuItem BColor1; finalcut::FRadioMenuItem BColor1{"Red", &BColor};
finalcut::FRadioMenuItem BColor2; finalcut::FRadioMenuItem BColor2{"Blue", &BColor};
finalcut::FRadioMenuItem BStyle1; finalcut::FRadioMenuItem BStyle1{line, &BStyle};
finalcut::FRadioMenuItem BStyle2; finalcut::FRadioMenuItem BStyle2{"-------------", &BStyle};
finalcut::FRadioMenuItem BStyle3; finalcut::FRadioMenuItem BStyle3{"- - - - - - -", &BStyle};
finalcut::FRadioMenuItem BStyle4; finalcut::FRadioMenuItem BStyle4{"- - - - -", &BStyle};
finalcut::FStatusBar Statusbar; finalcut::FStatusBar Statusbar{this};
finalcut::FLabel Headline1; finalcut::FLabel Headline1{this};
finalcut::FLabel Headline2; finalcut::FLabel Headline2{this};
finalcut::FLabel Info; finalcut::FLabel Info{this};
}; };
#pragma pack(pop) #pragma pack(pop)
//---------------------------------------------------------------------- //----------------------------------------------------------------------
Menu::Menu (finalcut::FWidget* parent) Menu::Menu (finalcut::FWidget* parent)
: finalcut::FDialog(parent) : finalcut::FDialog(parent)
, line(13, wchar_t(finalcut::fc::BoxDrawingsHorizontal))
, Menubar(this)
, File("&File", &Menubar)
, Edit("&Edit", &Menubar)
, Choice("&Choice", &Menubar)
, Window("&Window", &Menubar)
, Help("&Help", &Menubar)
, New("&New", &File)
, Open("&Open...", &File)
, Save("&Save", &File)
, SaveAs("&Save as...", &File)
, Close("&Close", &File)
, Line1(&File)
, Print("&Print", &File)
, Line2(&File)
, Quit("&Quit", &File)
, Undo(finalcut::fc::Fckey_z, "&Undo", &Edit)
, Redo(finalcut::fc::Fckey_y, "&Redo", &Edit)
, Line3(&Edit)
, Cut(finalcut::fc::Fckey_x, "Cu&t", &Edit)
, Copy(finalcut::fc::Fckey_c, "&Copy", &Edit)
, Paste(finalcut::fc::Fckey_v, "&Paste", &Edit)
, Line4(&Edit)
, Search(finalcut::fc::Fckey_f, "&Search", &Edit)
, Next(finalcut::fc::Fkey_f3, "Search &next", &Edit)
, Line5(&Edit)
, SelectAll(finalcut::fc::Fckey_a, "Select &all", &Edit)
, Color("&Color", &Choice)
, Style("&Style", &Choice)
, Border("&Border", &Choice)
, Color1("Red", &Color)
, Color2("Green", &Color)
, Color3("Yellow", &Color)
, Color4("Brue", &Color)
, Color5("Black", &Color)
, Bold("Bold", &Style)
, Italic("Italic", &Style)
, BColor("&Color", &Border)
, BStyle("&Style", &Border)
, BColor1("Red", &BColor)
, BColor2("Blue", &BColor)
, BStyle1(line, &BStyle)
, BStyle2("-------------", &BStyle)
, BStyle3("- - - - - - -", &BStyle)
, BStyle4("- - - - -", &BStyle)
, Statusbar(this)
, Headline1(this)
, Headline2(this)
, Info(this)
{ {
// Menu bar itms // Menu bar itms
File.setStatusbarMessage ("File management commands"); File.setStatusbarMessage ("File management commands");

View File

@ -56,18 +56,15 @@ class ColorChooser : public finalcut::FWidget
virtual void onMouseDown (finalcut::FMouseEvent*); virtual void onMouseDown (finalcut::FMouseEvent*);
// Data Members // Data Members
FColor fg_color; FColor fg_color{finalcut::fc::White};
FColor bg_color; FColor bg_color{finalcut::fc::Black};
finalcut::FLabel headline; finalcut::FLabel headline{this};
}; };
#pragma pack(pop) #pragma pack(pop)
//---------------------------------------------------------------------- //----------------------------------------------------------------------
ColorChooser::ColorChooser (finalcut::FWidget* parent) ColorChooser::ColorChooser (finalcut::FWidget* parent)
: FWidget(parent) : FWidget(parent)
, fg_color(finalcut::fc::White)
, bg_color(finalcut::fc::Black)
, headline(this)
{ {
setSize (8, 12); setSize (8, 12);
setFixedSize (8, 12); setFixedSize (8, 12);
@ -199,20 +196,16 @@ class Brushes : public finalcut::FWidget
virtual void onMouseDown (finalcut::FMouseEvent*); virtual void onMouseDown (finalcut::FMouseEvent*);
// Data Members // Data Members
wchar_t brush; wchar_t brush{L' '};
FColor fg_color; FColor fg_color{finalcut::fc::White};
FColor bg_color; FColor bg_color{finalcut::fc::Black};
finalcut::FLabel headline; finalcut::FLabel headline{this};
}; };
#pragma pack(pop) #pragma pack(pop)
//---------------------------------------------------------------------- //----------------------------------------------------------------------
Brushes::Brushes (finalcut::FWidget* parent) Brushes::Brushes (finalcut::FWidget* parent)
: FWidget(parent) : FWidget(parent)
, brush(L' ')
, fg_color(finalcut::fc::White)
, bg_color(finalcut::fc::Black)
, headline(this)
{ {
setSize (8, 4); setSize (8, 4);
setFixedSize (8, 4); setFixedSize (8, 4);
@ -349,18 +342,15 @@ 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; term_area* canvas{0};
ColorChooser c_chooser; ColorChooser c_chooser{this};
Brushes brush; Brushes brush{this};
}; };
#pragma pack(pop) #pragma pack(pop)
//---------------------------------------------------------------------- //----------------------------------------------------------------------
MouseDraw::MouseDraw (finalcut::FWidget* parent) MouseDraw::MouseDraw (finalcut::FWidget* parent)
: finalcut::FDialog(parent) : finalcut::FDialog(parent)
, canvas(0)
, c_chooser(this)
, brush(this)
{ {
setText ("Drawing with the mouse"); setText ("Drawing with the mouse");
c_chooser.setPos (1, 1); c_chooser.setPos (1, 1);

View File

@ -58,28 +58,20 @@ class Scrollview : public finalcut::FScrollView
void cb_go_north (finalcut::FWidget*, data_ptr); void cb_go_north (finalcut::FWidget*, data_ptr);
// Data Members // Data Members
wchar_t pointer_right; wchar_t pointer_right{finalcut::fc::BlackRightPointingPointer};
wchar_t pointer_down; wchar_t pointer_down{finalcut::fc::BlackDownPointingTriangle};
wchar_t pointer_left; wchar_t pointer_left{finalcut::fc::BlackLeftPointingPointer};
wchar_t pointer_up; wchar_t pointer_up{finalcut::fc::BlackUpPointingTriangle};
finalcut::FButton go_east; finalcut::FButton go_east{pointer_right, this};
finalcut::FButton go_south; finalcut::FButton go_south{pointer_down, this};
finalcut::FButton go_west; finalcut::FButton go_west{pointer_left, this};
finalcut::FButton go_north; finalcut::FButton go_north{pointer_up, this};
}; };
#pragma pack(pop) #pragma pack(pop)
//---------------------------------------------------------------------- //----------------------------------------------------------------------
Scrollview::Scrollview (finalcut::FWidget* parent) Scrollview::Scrollview (finalcut::FWidget* parent)
: finalcut::FScrollView(parent) : finalcut::FScrollView(parent)
, pointer_right(wchar_t(finalcut::fc::BlackRightPointingPointer))
, pointer_down(wchar_t(finalcut::fc::BlackDownPointingTriangle))
, pointer_left(wchar_t(finalcut::fc::BlackLeftPointingPointer))
, pointer_up(wchar_t(finalcut::fc::BlackUpPointingTriangle))
, go_east(pointer_right, this)
, go_south(pointer_down, this)
, go_west(pointer_left, this)
, go_north(pointer_up, this)
{ {
// Sets the navigation button geometry // Sets the navigation button geometry
go_east.setGeometry (1, 1, 5, 1); go_east.setGeometry (1, 1, 5, 1);
@ -210,9 +202,9 @@ class Scrollviewdemo : public finalcut::FDialog
void cb_quit (finalcut::FWidget* = 0, data_ptr = 0); void cb_quit (finalcut::FWidget* = 0, data_ptr = 0);
// Data Members // Data Members
Scrollview sview; Scrollview sview{this};
finalcut::FButton quit_btn; finalcut::FButton quit_btn{"&Quit", this};
finalcut::FLabel label; finalcut::FLabel label{this};
}; };
#pragma pack(pop) #pragma pack(pop)
@ -220,9 +212,6 @@ class Scrollviewdemo : public finalcut::FDialog
//---------------------------------------------------------------------- //----------------------------------------------------------------------
Scrollviewdemo::Scrollviewdemo (finalcut::FWidget* parent) Scrollviewdemo::Scrollviewdemo (finalcut::FWidget* parent)
: finalcut::FDialog(parent) : finalcut::FDialog(parent)
, sview(this)
, quit_btn("&Quit", this)
, label(this)
{ {
setGeometry (16, 3, 50, 19); setGeometry (16, 3, 50, 19);
setText ("Scrolling viewport example"); setText ("Scrolling viewport example");

View File

@ -61,8 +61,8 @@ class AttribDlg : public finalcut::FDialog
virtual void adjustSize(); virtual void adjustSize();
// Data Members // Data Members
finalcut::FButton next_button; finalcut::FButton next_button{"&Next >", this};
finalcut::FButton back_button; finalcut::FButton back_button{"< &Back", this};
}; };
#pragma pack(pop) #pragma pack(pop)
@ -70,8 +70,6 @@ class AttribDlg : public finalcut::FDialog
AttribDlg::AttribDlg (finalcut::FWidget* parent) AttribDlg::AttribDlg (finalcut::FWidget* parent)
: finalcut::FDialog(parent) : finalcut::FDialog(parent)
, bgcolor(wc.label_bg) , bgcolor(wc.label_bg)
, next_button("&Next >", this)
, back_button("< &Back", this)
{ {
setText ( "A terminal attributes test (" setText ( "A terminal attributes test ("
+ finalcut::FString(getTermType()) + finalcut::FString(getTermType())

View File

@ -182,24 +182,18 @@ class MainWindow : public finalcut::FDialog
} }
// Data Members // Data Members
finalcut::FString line1; finalcut::FString line1{};
finalcut::FString line2; finalcut::FString line2{};
Transparent* transpwin; Transparent* transpwin{0};
Transparent* shadowwin; Transparent* shadowwin{0};
Transparent* ibg; Transparent* ibg{0};
finalcut::FStatusBar status_bar; finalcut::FStatusBar status_bar{this};
}; };
#pragma pack(pop) #pragma pack(pop)
//---------------------------------------------------------------------- //----------------------------------------------------------------------
MainWindow::MainWindow (finalcut::FWidget* parent) MainWindow::MainWindow (finalcut::FWidget* parent)
: FDialog(parent) : FDialog(parent)
, line1()
, line2()
, transpwin(0)
, shadowwin(0)
, ibg(0)
, status_bar(this)
{ {
line1 = " .-. .-. .-."; line1 = " .-. .-. .-.";
line2 = "`._.' `._.' `._.' "; line2 = "`._.' `._.' `._.' ";

View File

@ -134,9 +134,9 @@ class Treeview : public finalcut::FDialog
void onClose (finalcut::FCloseEvent*); void onClose (finalcut::FCloseEvent*);
// Data Members // Data Members
bool initialized; bool initialized{false};
finalcut::FListView listView; finalcut::FListView listView{this};
finalcut::FButton Quit; finalcut::FButton Quit{this};
static TreeItem africa[]; static TreeItem africa[];
static TreeItem asia[]; static TreeItem asia[];
static TreeItem europe[]; static TreeItem europe[];
@ -298,9 +298,6 @@ Treeview::TreeItem Treeview::oceania[] =
//---------------------------------------------------------------------- //----------------------------------------------------------------------
Treeview::Treeview (finalcut::FWidget* parent) Treeview::Treeview (finalcut::FWidget* parent)
: finalcut::FDialog(parent) : finalcut::FDialog(parent)
, initialized(false)
, listView(this)
, Quit(this)
{ {
// Set FListView geometry // Set FListView geometry
listView.setGeometry(2, 1, 53, 14); listView.setGeometry(2, 1, 53, 14);

View File

@ -59,20 +59,16 @@ class ProgressDialog : public finalcut::FDialog
void cb_exit_bar (finalcut::FWidget*, data_ptr); void cb_exit_bar (finalcut::FWidget*, data_ptr);
// Data Members // Data Members
finalcut::FProgressbar progressBar; finalcut::FProgressbar progressBar{this};
finalcut::FButton reset; finalcut::FButton reset{this};
finalcut::FButton more; finalcut::FButton more{this};
finalcut::FButton quit; finalcut::FButton quit{this};
}; };
#pragma pack(pop) #pragma pack(pop)
//---------------------------------------------------------------------- //----------------------------------------------------------------------
ProgressDialog::ProgressDialog (finalcut::FWidget* parent) ProgressDialog::ProgressDialog (finalcut::FWidget* parent)
: finalcut::FDialog(parent) : finalcut::FDialog(parent)
, progressBar(this)
, reset(this)
, more(this)
, quit(this)
{ {
setGeometry (int((getParentWidget()->getWidth() - 40) / 2), 7, 40, 10); setGeometry (int((getParentWidget()->getWidth() - 40) / 2), 7, 40, 10);
setText("Progress bar"); setText("Progress bar");
@ -203,14 +199,13 @@ class TextWindow : public finalcut::FDialog
virtual void adjustSize(); virtual void adjustSize();
// Data Members // Data Members
finalcut::FTextView scrollText; finalcut::FTextView scrollText{this};
}; };
#pragma pack(pop) #pragma pack(pop)
//---------------------------------------------------------------------- //----------------------------------------------------------------------
TextWindow::TextWindow (finalcut::FWidget* parent) TextWindow::TextWindow (finalcut::FWidget* parent)
: finalcut::FDialog(parent) : finalcut::FDialog(parent)
, scrollText(this)
{ {
scrollText.ignorePadding(); scrollText.ignorePadding();
scrollText.setGeometry (1, 2, getWidth(), getHeight() - 1); scrollText.setGeometry (1, 2, getWidth(), getHeight() - 1);
@ -302,108 +297,67 @@ class MyDialog : public finalcut::FDialog
void cb_setInput (finalcut::FWidget*, data_ptr); void cb_setInput (finalcut::FWidget*, data_ptr);
// Data Members // Data Members
bool initialized; bool initialized{false};
finalcut::FMenuBar Menubar; finalcut::FMenuBar Menubar{this};
finalcut::FMenu File; // Menu bar items // Menu bar items
finalcut::FMenu Edit; finalcut::FMenu File{"&File", &Menubar};
finalcut::FMenu View; finalcut::FMenu Edit{"&Edit", &Menubar};
finalcut::FMenuItem Options; finalcut::FMenu View{"&View", &Menubar};
finalcut::FDialogListMenu Window; finalcut::FMenuItem Options{"&Options", &Menubar};
finalcut::FMenuItem Help; finalcut::FDialogListMenu Window{"&Window", &Menubar};
finalcut::FMenuItem Open; // "File" menu items finalcut::FMenuItem Help{"&Help", &Menubar};
finalcut::FMenu Recent; // "File" menu items
finalcut::FMenuItem Line1; finalcut::FMenuItem Open{"&Open...", &File};
finalcut::FMenuItem Quit; finalcut::FMenu Recent{"&System files", &File};
finalcut::FMenuItem File1; // "Recent" menu items finalcut::FMenuItem Line1{&File};
finalcut::FMenuItem File2; finalcut::FMenuItem Quit{"&Quit", &File};
finalcut::FMenuItem File3; // "Recent" menu items
finalcut::FMenuItem Undo; finalcut::FMenuItem File1{"/etc/services", &Recent};
finalcut::FMenuItem Redo; finalcut::FMenuItem File2{"/etc/fstab", &Recent};
finalcut::FMenuItem Line2; finalcut::FMenuItem File3{"/etc/passwd", &Recent};
finalcut::FMenuItem Cut; // "Edit" menu items
finalcut::FMenuItem Copy; finalcut::FMenuItem Undo{finalcut::fc::Fckey_z, "Undo", &Edit};
finalcut::FMenuItem Paste; finalcut::FMenuItem Redo{finalcut::fc::Fckey_y, "Redo", &Edit};
finalcut::FMenuItem Clear; finalcut::FMenuItem Line2{&Edit};
finalcut::FMenuItem Env; finalcut::FMenuItem Cut{finalcut::fc::Fckey_x, "Cu&t", &Edit};
finalcut::FMenuItem Drive; finalcut::FMenuItem Copy{finalcut::fc::Fckey_c, "&Copy", &Edit};
finalcut::FStatusBar Statusbar; finalcut::FMenuItem Paste{finalcut::fc::Fckey_v, "&Paste", &Edit};
finalcut::FStatusKey key_F1; finalcut::FMenuItem Clear{finalcut::fc::Fkey_dc, "C&lear", &Edit};
finalcut::FStatusKey key_F2; // "View" menu items
finalcut::FStatusKey key_F3; finalcut::FMenuItem Env{"&Terminal...", &View};
finalcut::FButton MyButton1; finalcut::FMenuItem Drive{"&Drive symbols...", &View};
finalcut::FButton MyButton2; // Statusbar
finalcut::FButton MyButton3; finalcut::FStatusBar Statusbar{this};
finalcut::FButtonGroup radioButtonGroup; finalcut::FStatusKey key_F1{finalcut::fc::Fkey_f1, "About", &Statusbar};
finalcut::FRadioButton radio1; finalcut::FStatusKey key_F2{finalcut::fc::Fkey_f2, "View", &Statusbar};
finalcut::FRadioButton radio2; finalcut::FStatusKey key_F3{finalcut::fc::Fkey_f3, "Quit", &Statusbar};
finalcut::FButtonGroup checkButtonGroup; // Dialog widgets
finalcut::FCheckBox check1; finalcut::FButton MyButton1{this};
finalcut::FCheckBox check2; finalcut::FButton MyButton2{this};
finalcut::FLineEdit myLineEdit; finalcut::FButton MyButton3{this};
finalcut::FButton MyButton4; finalcut::FButtonGroup radioButtonGroup{"Button", this};
finalcut::FButton MyButton5; finalcut::FRadioButton radio1{"E&nable", &radioButtonGroup};
finalcut::FButton MyButton6; finalcut::FRadioButton radio2{&radioButtonGroup};
finalcut::FListBox myList; finalcut::FButtonGroup checkButtonGroup{"Options", this};
finalcut::FLabel headline; finalcut::FCheckBox check1{"&Bitmode", &checkButtonGroup};
finalcut::FLabel tagged; finalcut::FCheckBox check2{"&8-Bit", &checkButtonGroup};
finalcut::FLabel tagged_count; finalcut::FLineEdit myLineEdit{this};
finalcut::FLabel sum; finalcut::FButton MyButton4{this};
finalcut::FLabel sum_count; finalcut::FButton MyButton5{this};
finalcut::FString clipboard; finalcut::FButton MyButton6{this};
finalcut::FListBox myList{this};
finalcut::FLabel headline{this};
finalcut::FLabel tagged{L"Tagged:", this};
finalcut::FLabel tagged_count{this};
finalcut::FLabel sum{L"Sum:", this};
finalcut::FLabel sum_count{this};
finalcut::FString clipboard{};
}; };
#pragma pack(pop) #pragma pack(pop)
//---------------------------------------------------------------------- //----------------------------------------------------------------------
MyDialog::MyDialog (finalcut::FWidget* parent) MyDialog::MyDialog (finalcut::FWidget* parent)
: finalcut::FDialog(parent) : finalcut::FDialog(parent)
, initialized(false)
, Menubar(this)
, File("&File", &Menubar)
, Edit("&Edit", &Menubar)
, View("&View", &Menubar)
, Options("&Options", &Menubar)
, Window("&Window", &Menubar)
, Help("&Help", &Menubar)
, Open("&Open...", &File)
, Recent("&System files", &File)
, Line1(&File)
, Quit("&Quit", &File)
, File1("/etc/services", &Recent)
, File2("/etc/fstab", &Recent)
, File3("/etc/passwd", &Recent)
, Undo(finalcut::fc::Fckey_z, "Undo", &Edit)
, Redo(finalcut::fc::Fckey_y, "Redo", &Edit)
, Line2(&Edit)
, Cut(finalcut::fc::Fckey_x, "Cu&t", &Edit)
, Copy(finalcut::fc::Fckey_c, "&Copy", &Edit)
, Paste(finalcut::fc::Fckey_v, "&Paste", &Edit)
, Clear(finalcut::fc::Fkey_dc, "C&lear", &Edit)
, Env("&Terminal...", &View)
, Drive("&Drive symbols...", &View)
, Statusbar(this)
, key_F1(finalcut::fc::Fkey_f1, "About", &Statusbar)
, key_F2(finalcut::fc::Fkey_f2, "View", &Statusbar)
, key_F3(finalcut::fc::Fkey_f3, "Quit", &Statusbar)
, MyButton1(this)
, MyButton2(this)
, MyButton3(this)
, radioButtonGroup("Button", this)
, radio1("E&nable", &radioButtonGroup)
, radio2(&radioButtonGroup)
, checkButtonGroup("Options", this)
, check1("&Bitmode", &checkButtonGroup)
, check2("&8-Bit", &checkButtonGroup)
, myLineEdit(this)
, MyButton4(this)
, MyButton5(this)
, MyButton6(this)
, myList(this)
, headline(this)
, tagged(L"Tagged:", this)
, tagged_count(this)
, sum(L"Sum:", this)
, sum_count(this)
, clipboard()
{ {
initMenu(); // Initialize the program menu initMenu(); // Initialize the program menu
initMenuCallbacks(); // Initialize program menu callbacks initMenuCallbacks(); // Initialize program menu callbacks

View File

@ -63,24 +63,18 @@ class Watch : public finalcut::FDialog
Watch& operator = (const Watch&); Watch& operator = (const Watch&);
// Data Members // Data Members
bool sec; bool sec{true};
finalcut::FLabel time_label; finalcut::FLabel time_label{L"Time", this};
finalcut::FLabel time_str; finalcut::FLabel time_str{L"--:--:--", this};
finalcut::FSwitch clock_sw; finalcut::FSwitch clock_sw{L"Clock", this};
finalcut::FSwitch seconds_sw; finalcut::FSwitch seconds_sw{L"Seconds", this};
finalcut::FButton quit_btn; finalcut::FButton quit_btn{L"&Quit", this};
}; };
#pragma pack(pop) #pragma pack(pop)
//---------------------------------------------------------------------- //----------------------------------------------------------------------
Watch::Watch (FWidget* parent) Watch::Watch (FWidget* parent)
: finalcut::FDialog(parent) : finalcut::FDialog(parent)
, sec(true)
, time_label(L"Time", this)
, time_str(L"--:--:--", this)
, clock_sw(L"Clock", this)
, seconds_sw(L"Seconds", this)
, quit_btn(L"&Quit", this)
{ {
setText ("Watch"); setText ("Watch");
int pw = int(getParentWidget()->getWidth()); int pw = int(getParentWidget()->getWidth());

View File

@ -55,22 +55,17 @@ class SmallWindow : public finalcut::FDialog
virtual void onTimer (finalcut::FTimerEvent*); virtual void onTimer (finalcut::FTimerEvent*);
// Data Members // Data Members
finalcut::FLabel left_arrow; finalcut::FLabel left_arrow{this};
finalcut::FLabel right_arrow; finalcut::FLabel right_arrow{this};
finalcut::FLabel top_left_label; finalcut::FLabel top_left_label{this};
finalcut::FLabel top_right_label; finalcut::FLabel top_right_label{this};
finalcut::FLabel bottom_label; finalcut::FLabel bottom_label{this};
}; };
#pragma pack(pop) #pragma pack(pop)
//---------------------------------------------------------------------- //----------------------------------------------------------------------
SmallWindow::SmallWindow (finalcut::FWidget* parent) SmallWindow::SmallWindow (finalcut::FWidget* parent)
: finalcut::FDialog(parent) : finalcut::FDialog(parent)
, left_arrow(this)
, right_arrow(this)
, top_left_label(this)
, top_right_label(this)
, bottom_label(this)
{ {
wchar_t arrow_up, arrow_down; wchar_t arrow_up, arrow_down;
arrow_up = finalcut::fc::BlackUpPointingTriangle; arrow_up = finalcut::fc::BlackUpPointingTriangle;
@ -227,44 +222,28 @@ class Window : public finalcut::FDialog
void cb_destroyWindow (finalcut::FWidget*, data_ptr); void cb_destroyWindow (finalcut::FWidget*, data_ptr);
// Data Members // Data Members
std::vector<win_data*> windows; std::vector<win_data*> windows{};
finalcut::FString drop_down_symbol; finalcut::FString drop_down_symbol{finalcut::fc::BlackDownPointingTriangle};
finalcut::FMenuBar Menubar; finalcut::FMenuBar Menubar{this};
finalcut::FMenu File; finalcut::FMenu File{"&File", &Menubar};
finalcut::FDialogListMenu DglList; finalcut::FDialogListMenu DglList{drop_down_symbol, &Menubar};
finalcut::FStatusBar Statusbar; finalcut::FStatusBar Statusbar{this};
finalcut::FMenuItem New; finalcut::FMenuItem New{"&New", &File};
finalcut::FMenuItem Close; finalcut::FMenuItem Close{"&Close", &File};
finalcut::FMenuItem Line1; finalcut::FMenuItem Line1{&File};
finalcut::FMenuItem Next; finalcut::FMenuItem Next{"Ne&xt window", &File};
finalcut::FMenuItem Previous; finalcut::FMenuItem Previous{"&Previous window", &File};
finalcut::FMenuItem Line2; finalcut::FMenuItem Line2{&File};
finalcut::FMenuItem Quit; finalcut::FMenuItem Quit{"&Quit", &File};
finalcut::FButton CreateButton; finalcut::FButton CreateButton{this};
finalcut::FButton CloseButton; finalcut::FButton CloseButton{this};
finalcut::FButton QuitButton; finalcut::FButton QuitButton{this};
}; };
#pragma pack(pop) #pragma pack(pop)
//---------------------------------------------------------------------- //----------------------------------------------------------------------
Window::Window (finalcut::FWidget* parent) Window::Window (finalcut::FWidget* parent)
: finalcut::FDialog(parent) : finalcut::FDialog(parent)
, windows()
, drop_down_symbol(wchar_t(finalcut::fc::BlackDownPointingTriangle))
, Menubar(this)
, File("&File", &Menubar)
, DglList(drop_down_symbol, &Menubar)
, Statusbar(this)
, New("&New", &File)
, Close("&Close", &File)
, Line1(&File)
, Next("Ne&xt window", &File)
, Previous("&Previous window", &File)
, Line2(&File)
, Quit("&Quit", &File)
, CreateButton(this)
, CloseButton(this)
, QuitButton(this)
{ {
// Menu bar item // Menu bar item
File.setStatusbarMessage ("File management commands"); File.setStatusbarMessage ("File management commands");

View File

@ -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-reserved-id-macro" $(MAKE) $(MAKEFILE) DEBUG="-g -D DEBUG -Wall -Wextra -Wpedantic -Weverything -Wpadded -Wno-c++98-compat -Wno-implicit-fallthrough -Wno-reserved-id-macro"
profile: profile:
$(MAKE) $(MAKEFILE) PROFILE="-pg" $(MAKE) $(MAKEFILE) PROFILE="-pg"
@ -179,7 +179,7 @@ clean:
$(RM) $(LIB)* $(OBJS) .depend *.gcno *.gcda *.gch *.plist *~ $(RM) $(LIB)* $(OBJS) .depend *.gcno *.gcda *.gch *.plist *~
dep: dep:
$(CXX) $(INCLUDES) -DCOMPILE_FINAL_CUT -MM *.cpp >.depend $(CXX) $(INCLUDES) -std=c++11 -DCOMPILE_FINAL_CUT -MM *.cpp >.depend
# #
# include .depend if it exists # include .depend if it exists

View File

@ -178,7 +178,7 @@ clean:
$(RM) $(LIB)* $(OBJS) .depend *.gcno *.gcda *.prof *~ $(RM) $(LIB)* $(OBJS) .depend *.gcno *.gcda *.prof *~
dep: dep:
$(CXX) $(INCLUDES) -MM -DCOMPILE_FINAL_CUT *.cpp >.depend $(CXX) $(INCLUDES) -std=c++11 -MM -DCOMPILE_FINAL_CUT *.cpp >.depend
# #
# include .depend if it exists # include .depend if it exists

View File

@ -64,10 +64,8 @@ FApplication::FApplication ( const int& _argc
, char* _argv[] , char* _argv[]
, bool disable_alt_screen ) , bool disable_alt_screen )
: FWidget(processParameters(_argc, _argv), disable_alt_screen) : FWidget(processParameters(_argc, _argv), disable_alt_screen)
, app_argc(_argc) , app_argc{_argc}
, app_argv(_argv) , app_argv{_argv}
, key_timeout(100000) // 100 ms
, dblclick_interval(500000) // 500 ms
{ {
assert ( ! app_object assert ( ! app_object
&& "FApplication: There should be only one application object" ); && "FApplication: There should be only one application object" );

View File

@ -35,24 +35,6 @@ namespace finalcut
//---------------------------------------------------------------------- //----------------------------------------------------------------------
FButton::FButton(FWidget* parent) FButton::FButton(FWidget* parent)
: FWidget(parent) : FWidget(parent)
, text()
, button_down(false)
, active_focus(false)
, click_animation(true)
, click_time(150)
, space_char(int(' '))
, hotkeypos(NOT_SET)
, indent(0)
, center_offset(0)
, vcenter_offset(0)
, txtlength(0)
, button_fg(wc.button_active_fg)
, button_bg(wc.button_active_bg)
, button_hotkey_fg(wc.button_hotkey_fg)
, button_focus_fg(wc.button_active_focus_fg)
, button_focus_bg(wc.button_active_focus_bg)
, button_inactive_fg(wc.button_inactive_fg)
, button_inactive_bg(wc.button_inactive_bg)
{ {
init(); init();
} }
@ -60,27 +42,9 @@ FButton::FButton(FWidget* parent)
//---------------------------------------------------------------------- //----------------------------------------------------------------------
FButton::FButton (const FString& txt, FWidget* parent) FButton::FButton (const FString& txt, FWidget* parent)
: FWidget(parent) : FWidget(parent)
, text(txt) , text{txt}
, button_down(false)
, active_focus(false)
, click_animation(true)
, click_time(150)
, space_char(int(' '))
, hotkeypos(NOT_SET)
, indent(0)
, center_offset(0)
, vcenter_offset(0)
, txtlength(0)
, button_fg(wc.button_active_fg)
, button_bg(wc.button_active_bg)
, button_hotkey_fg(wc.button_hotkey_fg)
, button_focus_fg(wc.button_active_focus_fg)
, button_focus_bg(wc.button_active_focus_bg)
, button_inactive_fg(wc.button_inactive_fg)
, button_inactive_bg(wc.button_inactive_bg)
{ {
init(); init();
detectHotkey();
} }
//---------------------------------------------------------------------- //----------------------------------------------------------------------
@ -449,6 +413,9 @@ void FButton::init()
setForegroundColor (wc.button_active_fg); setForegroundColor (wc.button_active_fg);
setBackgroundColor (wc.button_active_bg); setBackgroundColor (wc.button_active_bg);
setShadow(); setShadow();
if ( ! text.isEmpty() )
detectHotkey();
} }
//---------------------------------------------------------------------- //----------------------------------------------------------------------

View File

@ -37,8 +37,6 @@ namespace finalcut
//---------------------------------------------------------------------- //----------------------------------------------------------------------
FButtonGroup::FButtonGroup(FWidget* parent) FButtonGroup::FButtonGroup(FWidget* parent)
: FScrollView(parent) : FScrollView(parent)
, text()
, buttonlist()
{ {
init(); init();
} }
@ -46,8 +44,7 @@ FButtonGroup::FButtonGroup(FWidget* parent)
//---------------------------------------------------------------------- //----------------------------------------------------------------------
FButtonGroup::FButtonGroup (const FString& txt, FWidget* parent) FButtonGroup::FButtonGroup (const FString& txt, FWidget* parent)
: FScrollView(parent) : FScrollView(parent)
, text(txt) , text{txt}
, buttonlist()
{ {
init(); init();
setText(txt); setText(txt);

View File

@ -27,18 +27,10 @@ namespace finalcut
//---------------------------------------------------------------------- //----------------------------------------------------------------------
// class FColorPalette // class FColorPalette
//----------------------------------------------------------------------
// constructors and destructor
//----------------------------------------------------------------------
FColorPalette::FColorPalette()
{ }
//---------------------------------------------------------------------- //----------------------------------------------------------------------
FColorPalette::~FColorPalette() // destructor FColorPalette::~FColorPalette() // destructor
{ } { }
// public methods of FColorPalette // public methods of FColorPalette
//---------------------------------------------------------------------- //----------------------------------------------------------------------
void FColorPalette::set8ColorPalette (funcp setPalette) void FColorPalette::set8ColorPalette (funcp setPalette)

View File

@ -35,21 +35,6 @@ namespace finalcut
//---------------------------------------------------------------------- //----------------------------------------------------------------------
FDialog::FDialog (FWidget* parent) FDialog::FDialog (FWidget* parent)
: FWindow(parent) : FWindow(parent)
, tb_text()
, result_code(FDialog::Reject)
, zoom_button_pressed(false)
, zoom_button_active(false)
, setPos_error(false)
, setSize_error(false)
, titlebar_click_pos()
, resize_click_pos()
, save_geometry()
, dialog_menu()
, dgl_menuitem()
, move_size_item()
, zoom_item()
, close_item()
, tooltip()
{ {
init(); init();
} }
@ -58,20 +43,6 @@ FDialog::FDialog (FWidget* parent)
FDialog::FDialog (const FString& txt, FWidget* parent) FDialog::FDialog (const FString& txt, FWidget* parent)
: FWindow(parent) : FWindow(parent)
, tb_text(txt) , tb_text(txt)
, result_code(FDialog::Reject)
, zoom_button_pressed(false)
, zoom_button_active(false)
, setPos_error(false)
, setSize_error(false)
, titlebar_click_pos()
, resize_click_pos()
, save_geometry()
, dialog_menu()
, dgl_menuitem()
, move_size_item()
, zoom_item()
, close_item()
, tooltip(0)
{ {
init(); init();
} }

View File

@ -32,7 +32,7 @@ namespace finalcut
//---------------------------------------------------------------------- //----------------------------------------------------------------------
FEvent::FEvent(int ev_type) // constructor FEvent::FEvent(int ev_type) // constructor
: t(ev_type) : t{ev_type}
{ } { }
//---------------------------------------------------------------------- //----------------------------------------------------------------------
@ -50,8 +50,7 @@ int FEvent::type() const
FKeyEvent::FKeyEvent (int ev_type, FKey key_num) // constructor FKeyEvent::FKeyEvent (int ev_type, FKey key_num) // constructor
: FEvent(ev_type) : FEvent(ev_type)
, k(key_num) , k{key_num}
, accpt(false)
{ } { }
//---------------------------------------------------------------------- //----------------------------------------------------------------------
@ -81,22 +80,19 @@ void FKeyEvent::ignore()
FMouseEvent::FMouseEvent ( int ev_type // constructor FMouseEvent::FMouseEvent ( int ev_type // constructor
, const FPoint& pos , const FPoint& pos
, const FPoint& termPos
, int button ) , int button )
: FEvent(ev_type) : FEvent(ev_type)
, p(pos) , p{pos}
, tp() , tp{termPos}
, b(button) , b{button}
{ } { }
//---------------------------------------------------------------------- //----------------------------------------------------------------------
FMouseEvent::FMouseEvent ( int ev_type // constructor FMouseEvent::FMouseEvent ( int ev_type // constructor
, const FPoint& pos , const FPoint& pos
, const FPoint& termPos
, int button ) , int button )
: FEvent(ev_type) : FMouseEvent(ev_type, pos, FPoint(), button)
, p(pos)
, tp(termPos)
, b(button)
{ } { }
//---------------------------------------------------------------------- //----------------------------------------------------------------------
@ -138,22 +134,19 @@ int FMouseEvent::getButton() const
FWheelEvent::FWheelEvent ( int ev_type // constructor FWheelEvent::FWheelEvent ( int ev_type // constructor
, const FPoint& pos , const FPoint& pos
, const FPoint& termPos
, int wheel ) , int wheel )
: FEvent(ev_type) : FEvent(ev_type)
, p(pos) , p{pos}
, tp() , tp{termPos}
, w(wheel) , w{wheel}
{ } { }
//---------------------------------------------------------------------- //----------------------------------------------------------------------
FWheelEvent::FWheelEvent ( int ev_type // constructor FWheelEvent::FWheelEvent ( int ev_type // constructor
, const FPoint& pos , const FPoint& pos
, const FPoint& termPos
, int wheel ) , int wheel )
: FEvent(ev_type) : FWheelEvent(ev_type, pos, FPoint(), wheel)
, p(pos)
, tp(termPos)
, w(wheel)
{ } { }
//---------------------------------------------------------------------- //----------------------------------------------------------------------
@ -195,8 +188,6 @@ int FWheelEvent::getWheel() const
FFocusEvent::FFocusEvent (int ev_type) // constructor FFocusEvent::FFocusEvent (int ev_type) // constructor
: FEvent(ev_type) : FEvent(ev_type)
, accpt(true)
, focus_type(fc::FocusDefiniteWidget)
{ } { }
//---------------------------------------------------------------------- //----------------------------------------------------------------------
@ -242,8 +233,7 @@ void FFocusEvent::ignore()
FAccelEvent::FAccelEvent(int ev_type, void* focused) // constructor FAccelEvent::FAccelEvent(int ev_type, void* focused) // constructor
: FEvent(ev_type) : FEvent(ev_type)
, accpt(false) , focus_widget{focused}
, focus_widget(focused)
{ } { }
//---------------------------------------------------------------------- //----------------------------------------------------------------------
@ -273,7 +263,6 @@ void FAccelEvent::ignore()
FResizeEvent::FResizeEvent(int ev_type) // constructor FResizeEvent::FResizeEvent(int ev_type) // constructor
: FEvent(ev_type) : FEvent(ev_type)
, accpt(false)
{ } { }
//---------------------------------------------------------------------- //----------------------------------------------------------------------
@ -323,7 +312,6 @@ FHideEvent::~FHideEvent() // destructor
FCloseEvent::FCloseEvent(int ev_type) // constructor FCloseEvent::FCloseEvent(int ev_type) // constructor
: FEvent(ev_type) : FEvent(ev_type)
, accpt(false)
{ } { }
//---------------------------------------------------------------------- //----------------------------------------------------------------------
@ -349,7 +337,7 @@ void FCloseEvent::ignore()
FTimerEvent::FTimerEvent(int ev_type, int timer_id) // constructor FTimerEvent::FTimerEvent(int ev_type, int timer_id) // constructor
: FEvent(ev_type) : FEvent(ev_type)
, id(timer_id) , id{timer_id}
{ } { }
//---------------------------------------------------------------------- //----------------------------------------------------------------------

View File

@ -56,17 +56,6 @@ bool sortDirFirst ( const FFileDialog::dir_entry& lhs
//---------------------------------------------------------------------- //----------------------------------------------------------------------
FFileDialog::FFileDialog (FWidget* parent) FFileDialog::FFileDialog (FWidget* parent)
: FDialog(parent) : FDialog(parent)
, directory_stream(0)
, dir_entries()
, directory()
, filter_pattern()
, filename()
, filebrowser()
, hidden()
, cancel()
, open()
, dlg_type(FFileDialog::Open)
, show_hidden(false)
{ {
init(); init();
} }
@ -74,20 +63,9 @@ FFileDialog::FFileDialog (FWidget* parent)
//---------------------------------------------------------------------- //----------------------------------------------------------------------
FFileDialog::FFileDialog (const FFileDialog& fdlg) FFileDialog::FFileDialog (const FFileDialog& fdlg)
: FDialog(fdlg.getParentWidget()) : FDialog(fdlg.getParentWidget())
, directory_stream(0)
, dir_entries()
, directory(fdlg.directory)
, filter_pattern(fdlg.filter_pattern)
, filename()
, filebrowser()
, hidden()
, cancel()
, open()
, dlg_type(fdlg.dlg_type)
, show_hidden(fdlg.show_hidden)
{ {
if ( directory ) if ( fdlg.directory )
setPath(directory); setPath(fdlg.directory);
init(); init();
} }
@ -98,17 +76,8 @@ FFileDialog::FFileDialog ( const FString& dirname
, DialogType type , DialogType type
, FWidget* parent ) , FWidget* parent )
: FDialog(parent) : FDialog(parent)
, directory_stream(0)
, dir_entries()
, directory()
, filter_pattern(filter) , filter_pattern(filter)
, filename(this)
, filebrowser(this)
, hidden(this)
, cancel(this)
, open(this)
, dlg_type(type) , dlg_type(type)
, show_hidden(false)
{ {
if ( ! dirname.isNull() ) if ( ! dirname.isNull() )
setPath(dirname); setPath(dirname);

View File

@ -45,12 +45,9 @@ struct timeval FKeyboard::time_keypressed;
//---------------------------------------------------------------------- //----------------------------------------------------------------------
FKeyboardCommand::FKeyboardCommand ( FApplication* object FKeyboardCommand::FKeyboardCommand ( FApplication* object
, void(FApplication::*method)() ) , void(FApplication::*method)() )
: instance(0) : instance(object)
, handler(0) , handler(method)
{ { }
instance = object;
handler = method;
}
// public methods of FKeyboardCommand // public methods of FKeyboardCommand
//---------------------------------------------------------------------- //----------------------------------------------------------------------
@ -67,18 +64,6 @@ void FKeyboardCommand::execute()
// constructors and destructor // constructors and destructor
//---------------------------------------------------------------------- //----------------------------------------------------------------------
FKeyboard::FKeyboard() FKeyboard::FKeyboard()
: key(0)
, fifo_offset(0)
, fifo_in_use(false)
, stdin_status_flags(0)
, input_data_pending(false)
, utf8_input(false)
, mouse_support(true)
, non_blocking_stdin(false)
, keypressed_cmd()
, keyreleased_cmd()
, escape_key_cmd()
, key_map(0)
{ {
// Initialize keyboard values // Initialize keyboard values
time_keypressed.tv_sec = 0; time_keypressed.tv_sec = 0;

View File

@ -35,15 +35,6 @@ namespace finalcut
//---------------------------------------------------------------------- //----------------------------------------------------------------------
FLabel::FLabel(FWidget* parent) FLabel::FLabel(FWidget* parent)
: FWidget(parent) : FWidget(parent)
, multiline_text()
, multiline(false)
, text()
, alignment(fc::alignLeft)
, emphasis_color(wc.label_emphasis_fg)
, ellipsis_color(wc.label_ellipsis_fg)
, emphasis(false)
, reverse_mode(false)
, accel_widget(0)
{ {
init(); init();
} }
@ -51,15 +42,7 @@ FLabel::FLabel(FWidget* parent)
//---------------------------------------------------------------------- //----------------------------------------------------------------------
FLabel::FLabel (const FString& txt, FWidget* parent) FLabel::FLabel (const FString& txt, FWidget* parent)
: FWidget(parent) : FWidget(parent)
, multiline_text()
, multiline(false)
, text(txt) , text(txt)
, alignment(fc::alignLeft)
, emphasis_color(wc.label_emphasis_fg)
, ellipsis_color(wc.label_ellipsis_fg)
, emphasis(false)
, reverse_mode(false)
, accel_widget(0)
{ {
init(); init();
setText(txt); setText(txt);

View File

@ -35,16 +35,7 @@ namespace finalcut
//---------------------------------------------------------------------- //----------------------------------------------------------------------
FLineEdit::FLineEdit(FWidget* parent) FLineEdit::FLineEdit(FWidget* parent)
: FWidget(parent) : FWidget(parent)
, text("") , label{new FLabel("", parent)}
, label_text("")
, label(new FLabel("", parent))
, label_orientation(FLineEdit::label_left)
, drag_scroll(FLineEdit::noScroll)
, scroll_timer(false)
, scroll_repeat(100)
, insert_mode(true)
, cursor_pos(0)
, text_offset(0)
{ {
init(); init();
} }
@ -53,15 +44,7 @@ FLineEdit::FLineEdit(FWidget* parent)
FLineEdit::FLineEdit (const FString& txt, FWidget* parent) FLineEdit::FLineEdit (const FString& txt, FWidget* parent)
: FWidget(parent) : FWidget(parent)
, text(txt) , text(txt)
, label_text("") , label{new FLabel("", parent)}
, label(new FLabel("", parent))
, label_orientation(FLineEdit::label_left)
, drag_scroll(FLineEdit::noScroll)
, scroll_timer(false)
, scroll_repeat(100)
, insert_mode(true)
, cursor_pos(0)
, text_offset(0)
{ {
init(); init();
setText(txt); setText(txt);
@ -537,7 +520,8 @@ void FLineEdit::onTimer (FTimerEvent*)
break; break;
case FLineEdit::scrollRight: case FLineEdit::scrollRight:
if ( text_offset == len - getWidth() + 2 ) if ( len < getWidth() - 2
|| text_offset == len - getWidth() + 2 )
{ {
drag_scroll = FLineEdit::noScroll; drag_scroll = FLineEdit::noScroll;
return; return;

View File

@ -37,10 +37,6 @@ namespace finalcut
// constructor and destructor // constructor and destructor
//---------------------------------------------------------------------- //----------------------------------------------------------------------
FListBoxItem::FListBoxItem() FListBoxItem::FListBoxItem()
: text()
, data_pointer(0)
, brackets(fc::NoBrackets)
, selected(false)
{ } { }
//---------------------------------------------------------------------- //----------------------------------------------------------------------
@ -55,8 +51,6 @@ FListBoxItem::FListBoxItem (const FListBoxItem& item)
FListBoxItem::FListBoxItem (const FString& txt, FWidget::data_ptr data) FListBoxItem::FListBoxItem (const FString& txt, FWidget::data_ptr data)
: text(txt) : text(txt)
, data_pointer(data) , data_pointer(data)
, brackets(fc::NoBrackets)
, selected(false)
{ } { }
//---------------------------------------------------------------------- //----------------------------------------------------------------------
@ -90,28 +84,6 @@ FListBoxItem& FListBoxItem::operator = (const FListBoxItem& item)
//---------------------------------------------------------------------- //----------------------------------------------------------------------
FListBox::FListBox (FWidget* parent) FListBox::FListBox (FWidget* parent)
: FWidget(parent) : FWidget(parent)
, convertToItem(0)
, itemlist()
, source_container(0)
, conv_type(FListBox::no_convert)
, vbar(0)
, hbar(0)
, text()
, inc_search()
, multi_select(false)
, mouse_select(false)
, drag_scroll(fc::noScroll)
, scroll_timer(false)
, scroll_repeat(100)
, scroll_distance(1)
, current(0)
, last_current(-1)
, secect_from_item(-1)
, xoffset(0)
, yoffset(0)
, last_yoffset(-1)
, nf_offset(0)
, max_line_width(0)
{ {
init(); init();
} }
@ -1051,53 +1023,15 @@ inline void FListBox::drawListLine ( int y
//---------------------------------------------------------------------- //----------------------------------------------------------------------
inline void FListBox::printLeftBracket (fc::brackets_type bracket_type) inline void FListBox::printLeftBracket (fc::brackets_type bracket_type)
{ {
switch ( bracket_type ) if ( bracket_type != fc::NoBrackets )
{ print ("\0[({<"[bracket_type]);
case fc::NoBrackets:
break;
case fc::SquareBrackets:
print ('[');
break;
case fc::Parenthesis:
print ('(');
break;
case fc::CurlyBrackets:
print ('{');
break;
case fc::AngleBrackets:
print ('<');
break;
}
} }
//---------------------------------------------------------------------- //----------------------------------------------------------------------
inline void FListBox::printRightBracket (fc::brackets_type bracket_type) inline void FListBox::printRightBracket (fc::brackets_type bracket_type)
{ {
switch ( bracket_type ) if ( bracket_type != fc::NoBrackets )
{ print ("\0])}>"[bracket_type]);
case fc::NoBrackets:
break;
case fc::SquareBrackets:
print (']');
break;
case fc::Parenthesis:
print (')');
break;
case fc::CurlyBrackets:
print ('}');
break;
case fc::AngleBrackets:
print ('>');
break;
}
} }
//---------------------------------------------------------------------- //----------------------------------------------------------------------

View File

@ -163,12 +163,6 @@ FListViewItem::FListViewItem (const FListViewItem& item)
: FObject(item.getParent()) : FObject(item.getParent())
, column_list(item.column_list) , column_list(item.column_list)
, data_pointer(item.data_pointer) , data_pointer(item.data_pointer)
, root()
, visible_lines(1)
, expandable(false)
, is_expand(false)
, checkable(false)
, is_checked(false)
{ {
FObject* parent = getParent(); FObject* parent = getParent();
@ -188,14 +182,6 @@ FListViewItem::FListViewItem (const FListViewItem& item)
//---------------------------------------------------------------------- //----------------------------------------------------------------------
FListViewItem::FListViewItem (FObjectIterator parent_iter) FListViewItem::FListViewItem (FObjectIterator parent_iter)
: FObject((*parent_iter)->getParent()) : FObject((*parent_iter)->getParent())
, column_list()
, data_pointer(0)
, root()
, visible_lines(1)
, expandable(false)
, is_expand(false)
, checkable(false)
, is_checked(false)
{ {
insert (this, parent_iter); insert (this, parent_iter);
} }
@ -207,12 +193,6 @@ FListViewItem::FListViewItem ( const FStringList& cols
: FObject(0) : FObject(0)
, column_list(cols) , column_list(cols)
, data_pointer(data) , data_pointer(data)
, root()
, visible_lines(1)
, expandable(false)
, is_expand(false)
, checkable(false)
, is_checked(false)
{ {
if ( cols.empty() ) if ( cols.empty() )
return; return;
@ -457,18 +437,9 @@ void FListViewItem::resetVisibleLineCounter()
//---------------------------------------------------------------------- //----------------------------------------------------------------------
// constructor and destructor // constructor and destructor
//----------------------------------------------------------------------
FListViewIterator::FListViewIterator ()
: iter_path()
, node()
, position(0)
{ }
//---------------------------------------------------------------------- //----------------------------------------------------------------------
FListViewIterator::FListViewIterator (FObjectIterator iter) FListViewIterator::FListViewIterator (FObjectIterator iter)
: iter_path() : node(iter)
, node(iter)
, position(0)
{ } { }
@ -615,34 +586,6 @@ void FListViewIterator::parentElement()
//---------------------------------------------------------------------- //----------------------------------------------------------------------
FListView::FListView (FWidget* parent) FListView::FListView (FWidget* parent)
: FWidget(parent) : FWidget(parent)
, root()
, selflist()
, itemlist()
, current_iter()
, first_visible_line()
, last_visible_line()
, header()
, headerline()
, vbar(0)
, hbar(0)
, drag_scroll(fc::noScroll)
, scroll_repeat(100)
, scroll_distance(1)
, scroll_timer(false)
, tree_view(false)
, hide_sort_indicator(false)
, has_checkable_items(false)
, clicked_expander_pos(-1, -1)
, clicked_header_pos(-1, -1)
, clicked_checkbox_item(0)
, xoffset(0)
, nf_offset(0)
, max_line_width(1)
, sort_column(-1)
, sort_type()
, sort_order(fc::unsorted)
, user_defined_ascending(0)
, user_defined_descending(0)
{ {
init(); init();
} }

View File

@ -38,14 +38,6 @@ namespace finalcut
//---------------------------------------------------------------------- //----------------------------------------------------------------------
FMenu::FMenu(FWidget* parent) FMenu::FMenu(FWidget* parent)
: FWindow(parent) : FWindow(parent)
, item()
, super_menu(0)
, opened_sub_menu(0)
, shown_sub_menu(0)
, max_item_width(0)
, hotkeypos(NOT_SET)
, mouse_down(false)
, has_checkable_items(false)
{ {
init(parent); init(parent);
} }
@ -54,13 +46,6 @@ FMenu::FMenu(FWidget* parent)
FMenu::FMenu (const FString& txt, FWidget* parent) FMenu::FMenu (const FString& txt, FWidget* parent)
: FWindow(parent) : FWindow(parent)
, item(txt, parent) , item(txt, parent)
, super_menu(0)
, opened_sub_menu(0)
, shown_sub_menu(0)
, max_item_width(0)
, hotkeypos(NOT_SET)
, mouse_down(false)
, has_checkable_items(false)
{ {
init(parent); init(parent);
} }

View File

@ -37,10 +37,6 @@ namespace finalcut
//---------------------------------------------------------------------- //----------------------------------------------------------------------
FMenuBar::FMenuBar(FWidget* parent) FMenuBar::FMenuBar(FWidget* parent)
: FWindow(parent) : FWindow(parent)
, mouse_down(false)
, drop_down(false)
, focus_changed(false)
, screenWidth(80)
{ {
init(); init();
} }

View File

@ -39,19 +39,6 @@ namespace finalcut
//---------------------------------------------------------------------- //----------------------------------------------------------------------
FMenuItem::FMenuItem (FWidget* parent) FMenuItem::FMenuItem (FWidget* parent)
: FWidget(parent) : FWidget(parent)
, text()
, selected(false)
, separator(false)
, checkable(false)
, checked(false)
, radio_button(false)
, dialog_index(false)
, text_length(0)
, hotkey(0)
, accel_key(0)
, menu(0)
, super_menu(0)
, associated_window(0)
{ {
init (parent); init (parent);
} }
@ -60,18 +47,6 @@ FMenuItem::FMenuItem (FWidget* parent)
FMenuItem::FMenuItem (const FString& txt, FWidget* parent) FMenuItem::FMenuItem (const FString& txt, FWidget* parent)
: FWidget(parent) : FWidget(parent)
, text(txt) , text(txt)
, selected(false)
, separator(false)
, checkable(false)
, checked(false)
, radio_button(false)
, dialog_index(false)
, text_length(0)
, hotkey(0)
, accel_key(0)
, menu(0)
, super_menu(0)
, associated_window(0)
{ {
init (parent); init (parent);
} }
@ -80,18 +55,7 @@ FMenuItem::FMenuItem (const FString& txt, FWidget* parent)
FMenuItem::FMenuItem (FKey k, const FString& txt, FWidget* parent) FMenuItem::FMenuItem (FKey k, const FString& txt, FWidget* parent)
: FWidget(parent) : FWidget(parent)
, text(txt) , text(txt)
, selected(false)
, separator(false)
, checkable(false)
, checked(false)
, radio_button(false)
, dialog_index(false)
, text_length(0)
, hotkey(0)
, accel_key(k) , accel_key(k)
, menu(0)
, super_menu(0)
, associated_window(0)
{ {
init (parent); init (parent);
} }

View File

@ -3,7 +3,7 @@
* * * *
* This file is part of the Final Cut widget toolkit * * This file is part of the Final Cut widget toolkit *
* * * *
* Copyright 2015-2017 Markus Gans * * Copyright 2015-2018 Markus Gans *
* * * *
* The Final Cut is free software; you can redistribute it and/or * * The Final Cut is free software; you can redistribute it and/or *
* modify it under the terms of the GNU Lesser General Public License * * modify it under the terms of the GNU Lesser General Public License *
@ -32,12 +32,6 @@ namespace finalcut
//---------------------------------------------------------------------- //----------------------------------------------------------------------
// constructor and destructor // constructor and destructor
//----------------------------------------------------------------------
FMenuList::FMenuList()
: selected_item()
, item_list()
{ }
//---------------------------------------------------------------------- //----------------------------------------------------------------------
FMenuList::~FMenuList() // destructor FMenuList::~FMenuList() // destructor
{ {

View File

@ -49,17 +49,6 @@ static const char* const button_text[] =
//---------------------------------------------------------------------- //----------------------------------------------------------------------
FMessageBox::FMessageBox (FWidget* parent) FMessageBox::FMessageBox (FWidget* parent)
: FDialog(parent) : FDialog(parent)
, headline_text()
, text()
, text_components(0)
, text_split()
, max_line_width(0)
, center_text(false)
, emphasis_color(wc.dialog_emphasis_fg)
, num_buttons(0)
, text_num_lines(0)
, button_digit()
, button()
{ {
setTitlebarText("Message for you"); setTitlebarText("Message for you");
init(FMessageBox::Ok, 0, 0); init(FMessageBox::Ok, 0, 0);
@ -77,8 +66,6 @@ FMessageBox::FMessageBox (const FMessageBox& mbox)
, emphasis_color(mbox.emphasis_color) , emphasis_color(mbox.emphasis_color)
, num_buttons(mbox.num_buttons) , num_buttons(mbox.num_buttons)
, text_num_lines(mbox.text_num_lines) , text_num_lines(mbox.text_num_lines)
, button_digit()
, button()
{ {
setTitlebarText (mbox.getTitlebarText()); setTitlebarText (mbox.getTitlebarText());
init ( mbox.button_digit[0] init ( mbox.button_digit[0]
@ -94,17 +81,7 @@ FMessageBox::FMessageBox ( const FString& caption
, int button2 , int button2
, FWidget* parent ) , FWidget* parent )
: FDialog(parent) : FDialog(parent)
, headline_text()
, text(message) , text(message)
, text_components(0)
, text_split()
, max_line_width(0)
, center_text(false)
, emphasis_color(wc.dialog_emphasis_fg)
, num_buttons(0)
, text_num_lines(0)
, button_digit()
, button()
{ {
setTitlebarText(caption); setTitlebarText(caption);
init(button0, button1, button2); init(button0, button1, button2);

View File

@ -40,16 +40,6 @@ namespace finalcut
// constructors and destructor // constructors and destructor
//---------------------------------------------------------------------- //----------------------------------------------------------------------
FMouse::FMouse() FMouse::FMouse()
: b_state()
, mouse_event_occurred(false)
, input_data_pending(false)
, dblclick_interval(500000) // 500 ms
, max_width(80)
, max_height(25)
, time_mousepressed()
, zero_point(0, 0) // zero point (x=0, y=0)
, mouse(0, 0) // mouse click position
, new_mouse_position()
{ {
time_mousepressed.tv_sec = 0; time_mousepressed.tv_sec = 0;
time_mousepressed.tv_usec = 0; time_mousepressed.tv_usec = 0;
@ -237,10 +227,6 @@ bool FMouse::isDblclickTimeout (timeval* time)
//---------------------------------------------------------------------- //----------------------------------------------------------------------
FMouseGPM::FMouseGPM() FMouseGPM::FMouseGPM()
: FMouse() : FMouse()
, gpm_ev()
, has_gpm_mouse_data(false)
, gpm_mouse_enabled(false)
, stdin_no(0)
{ {
gpm_ev.x = -1; gpm_ev.x = -1;
} }
@ -497,8 +483,6 @@ int FMouseGPM::gpmEvent (bool clear)
//---------------------------------------------------------------------- //----------------------------------------------------------------------
FMouseX11::FMouseX11() FMouseX11::FMouseX11()
: FMouse() : FMouse()
, x11_mouse()
, x11_button_state(all_buttons_released)
{ {
x11_mouse[0] = '\0'; x11_mouse[0] = '\0';
} }
@ -699,8 +683,6 @@ void FMouseX11::setButtonState (int btn, struct timeval* time)
//---------------------------------------------------------------------- //----------------------------------------------------------------------
FMouseSGR::FMouseSGR() FMouseSGR::FMouseSGR()
: FMouse() : FMouse()
, sgr_mouse()
, sgr_button_state(0x23)
{ {
sgr_mouse[0] = '\0'; sgr_mouse[0] = '\0';
} }
@ -953,8 +935,6 @@ void FMouseSGR::setReleasedButtonState (int btn)
//---------------------------------------------------------------------- //----------------------------------------------------------------------
FMouseUrxvt::FMouseUrxvt() FMouseUrxvt::FMouseUrxvt()
: FMouse() : FMouse()
, urxvt_mouse()
, urxvt_button_state(0x23)
{ {
urxvt_mouse[0] = '\0'; urxvt_mouse[0] = '\0';
} }
@ -1230,11 +1210,6 @@ void FMouseUrxvt::setButtonState (int btn, struct timeval* time)
// constructors and destructor // constructors and destructor
//---------------------------------------------------------------------- //----------------------------------------------------------------------
FMouseControl::FMouseControl() FMouseControl::FMouseControl()
: mouse_protocol()
, iter()
, zero_point(0, 0)
, use_gpm_mouse(false)
, use_xterm_mouse(false)
{ {
#ifdef F_HAVE_LIBGPM #ifdef F_HAVE_LIBGPM
mouse_protocol[FMouse::gpm] = FMouse::createMouseObject(FMouse::gpm); mouse_protocol[FMouse::gpm] = FMouse::createMouseObject(FMouse::gpm);

View File

@ -37,10 +37,7 @@ const FString* fc::emptyFString::empty_string = 0;
// constructors and destructor // constructors and destructor
//---------------------------------------------------------------------- //----------------------------------------------------------------------
FObject::FObject (FObject* parent) FObject::FObject (FObject* parent)
: widget_object(false) : parent_obj(parent)
, parent_obj(parent)
, children_list() // no children yet
, has_parent(false)
{ {
if ( parent ) // add object to parent if ( parent ) // add object to parent
{ {

View File

@ -34,51 +34,6 @@ namespace finalcut
// constructors and destructor // constructors and destructor
//---------------------------------------------------------------------- //----------------------------------------------------------------------
FOptiAttr::FOptiAttr() FOptiAttr::FOptiAttr()
: F_enter_bold_mode()
, F_exit_bold_mode()
, F_enter_dim_mode()
, F_exit_dim_mode()
, F_enter_italics_mode()
, F_exit_italics_mode()
, F_enter_underline_mode()
, F_exit_underline_mode()
, F_enter_blink_mode()
, F_exit_blink_mode()
, F_enter_reverse_mode()
, F_exit_reverse_mode()
, F_enter_standout_mode()
, F_exit_standout_mode()
, F_enter_secure_mode()
, F_exit_secure_mode()
, F_enter_protected_mode()
, F_exit_protected_mode()
, F_enter_crossed_out_mode()
, F_exit_crossed_out_mode()
, F_enter_dbl_underline_mode()
, F_exit_dbl_underline_mode()
, F_set_attributes()
, F_exit_attribute_mode()
, F_enter_alt_charset_mode()
, F_exit_alt_charset_mode()
, F_enter_pc_charset_mode()
, F_exit_pc_charset_mode()
, F_set_a_foreground()
, F_set_a_background()
, F_set_foreground()
, F_set_background()
, F_set_color_pair()
, F_orig_pair()
, F_orig_colors()
, on()
, off()
, reset_byte_mask()
, max_color(1)
, attr_without_color(0)
, ansi_default_color(false)
, alt_equal_pc_charset(false)
, monochron(true)
, fake_reverse(false)
, attr_ptr(attr_buf)
{ {
attr_buf[0] = '\0'; attr_buf[0] = '\0';
// Set to 0 to reset // Set to 0 to reset

View File

@ -35,34 +35,7 @@ namespace finalcut
// constructors and destructor // constructors and destructor
//---------------------------------------------------------------------- //----------------------------------------------------------------------
FOptiMove::FOptiMove (int baud) FOptiMove::FOptiMove (int baud)
: F_cursor_home() : baudrate(baud)
, F_carriage_return()
, F_cursor_to_ll()
, F_tab()
, F_back_tab()
, F_cursor_up()
, F_cursor_down()
, F_cursor_left()
, F_cursor_right()
, F_cursor_address()
, F_column_address()
, F_row_address()
, F_parm_up_cursor()
, F_parm_down_cursor()
, F_parm_left_cursor()
, F_parm_right_cursor()
, F_erase_chars()
, F_repeat_char()
, F_clr_bol()
, F_clr_eol()
, automatic_left_margin(false)
, eat_nl_glitch(false)
, move_buf()
, char_duration(1)
, baudrate(baud)
, tabstop(0)
, screen_width(80)
, screen_height(24)
{ {
assert ( baud >= 0 ); assert ( baud >= 0 );

View File

@ -33,8 +33,6 @@ namespace finalcut
//---------------------------------------------------------------------- //----------------------------------------------------------------------
FProgressbar::FProgressbar(FWidget* parent) FProgressbar::FProgressbar(FWidget* parent)
: FWidget(parent) : FWidget(parent)
, percentage(NOT_SET)
, bar_length(getWidth())
{ {
unsetFocusable(); unsetFocusable();
setShadow(); setShadow();

View File

@ -35,24 +35,6 @@ namespace finalcut
//---------------------------------------------------------------------- //----------------------------------------------------------------------
FScrollbar::FScrollbar(FWidget* parent) FScrollbar::FScrollbar(FWidget* parent)
: FWidget(parent) : FWidget(parent)
, scroll_type(FScrollbar::noScroll)
, threshold_reached(false)
, threshold_time(500)
, repeat_time(10)
, slider_click_pos(-1)
, slider_click_stop_pos(-1)
, current_slider_pos(-1)
, slider_pos(0)
, slider_length(18) // = bar_length
, bar_length(18) // = length - 2
, val(0)
, min(0)
, max(99)
, steps(1)
, pagesize(0)
, length(20)
, bar_orientation(fc::vertical)
, max_color(getMaxColor())
{ {
// The default scrollbar orientation is vertical // The default scrollbar orientation is vertical
setGeometry(1, 1, 1, length, false); setGeometry(1, 1, 1, length, false);
@ -62,24 +44,6 @@ FScrollbar::FScrollbar(FWidget* parent)
//---------------------------------------------------------------------- //----------------------------------------------------------------------
FScrollbar::FScrollbar(int o, FWidget* parent) FScrollbar::FScrollbar(int o, FWidget* parent)
: FWidget(parent) : FWidget(parent)
, scroll_type(FScrollbar::noScroll)
, threshold_reached(false)
, threshold_time(500)
, repeat_time(10)
, slider_click_pos(-1)
, slider_click_stop_pos(-1)
, current_slider_pos(-1)
, slider_pos(0)
, slider_length(18) // = bar_length
, bar_length(18) // = length - 2
, val(0)
, min(0)
, max(99)
, steps(1)
, pagesize(0)
, length(20)
, bar_orientation(fc::vertical)
, max_color(getMaxColor())
{ {
setOrientation (o); setOrientation (o);
init(); init();

View File

@ -35,17 +35,6 @@ namespace finalcut
//---------------------------------------------------------------------- //----------------------------------------------------------------------
FScrollView::FScrollView (FWidget* parent) FScrollView::FScrollView (FWidget* parent)
: FWidget(parent) : FWidget(parent)
, scroll_geometry(1, 1, 1, 1)
, viewport_geometry()
, viewport(0)
, vbar(0)
, hbar(0)
, nf_offset(0)
, border(true)
, use_own_print_area(false)
, update_scrollbar(true)
, vMode(fc::Auto)
, hMode(fc::Auto)
{ {
init(parent); init(parent);
} }

View File

@ -35,11 +35,6 @@ namespace finalcut
//---------------------------------------------------------------------- //----------------------------------------------------------------------
FStatusKey::FStatusKey(FWidget* parent) FStatusKey::FStatusKey(FWidget* parent)
: FWidget(parent) : FWidget(parent)
, key(0)
, text()
, active(false)
, mouse_focus(false)
, bar(0)
{ {
init (parent); init (parent);
} }
@ -49,9 +44,6 @@ FStatusKey::FStatusKey (FKey k, const FString& txt, FWidget* parent)
: FWidget(parent) : FWidget(parent)
, key(k) , key(k)
, text(txt) , text(txt)
, active(false)
, mouse_focus(false)
, bar(0)
{ {
init (parent); init (parent);
} }
@ -133,13 +125,6 @@ void FStatusKey::processActivate()
//---------------------------------------------------------------------- //----------------------------------------------------------------------
FStatusBar::FStatusBar(FWidget* parent) FStatusBar::FStatusBar(FWidget* parent)
: FWindow(parent) : FWindow(parent)
, key_list()
, text("")
, mouse_down()
, screenWidth(80)
, keyname_len(0)
, x(-1)
, x_msg(-1)
{ {
init(); init();
} }

View File

@ -33,20 +33,8 @@ namespace finalcut
//---------------------------------------------------------------------- //----------------------------------------------------------------------
// constructors and destructor // constructors and destructor
//----------------------------------------------------------------------
FString::FString()
: string(0)
, length(0)
, bufsize(0)
, c_string(0)
{ }
//---------------------------------------------------------------------- //----------------------------------------------------------------------
FString::FString (int len) FString::FString (int len)
: string(0)
, length(0)
, bufsize(0)
, c_string(0)
{ {
if ( len > 0 ) if ( len > 0 )
initLength(std::size_t(len)); initLength(std::size_t(len));
@ -56,20 +44,12 @@ FString::FString (int len)
//---------------------------------------------------------------------- //----------------------------------------------------------------------
FString::FString (std::size_t len) FString::FString (std::size_t len)
: string(0)
, length(0)
, bufsize(0)
, c_string(0)
{ {
initLength(len); initLength(len);
} }
//---------------------------------------------------------------------- //----------------------------------------------------------------------
FString::FString (std::size_t len, wchar_t c) FString::FString (std::size_t len, wchar_t c)
: string(0)
, length(0)
, bufsize(0)
, c_string(0)
{ {
wchar_t* ps; wchar_t* ps;
wchar_t* pe; wchar_t* pe;
@ -84,10 +64,6 @@ FString::FString (std::size_t len, wchar_t c)
//---------------------------------------------------------------------- //----------------------------------------------------------------------
FString::FString (std::size_t len, char c) FString::FString (std::size_t len, char c)
: string(0)
, length(0)
, bufsize(0)
, c_string(0)
{ {
wchar_t* ps; wchar_t* ps;
wchar_t* pe; wchar_t* pe;
@ -102,10 +78,6 @@ FString::FString (std::size_t len, char c)
//---------------------------------------------------------------------- //----------------------------------------------------------------------
FString::FString (const FString& s) // copy constructor FString::FString (const FString& s) // copy constructor
: string(0)
, length(0)
, bufsize(0)
, c_string(0)
{ {
if ( ! s.isNull() ) if ( ! s.isNull() )
_assign (s.string); _assign (s.string);
@ -113,10 +85,6 @@ FString::FString (const FString& s) // copy constructor
//---------------------------------------------------------------------- //----------------------------------------------------------------------
FString::FString (const std::wstring& s) FString::FString (const std::wstring& s)
: string(0)
, length(0)
, bufsize(0)
, c_string(0)
{ {
if ( ! s.empty() ) if ( ! s.empty() )
_assign (s.c_str()); _assign (s.c_str());
@ -124,10 +92,6 @@ FString::FString (const std::wstring& s)
//---------------------------------------------------------------------- //----------------------------------------------------------------------
FString::FString (const wchar_t s[]) FString::FString (const wchar_t s[])
: string(0)
, length(0)
, bufsize(0)
, c_string(0)
{ {
if ( s ) if ( s )
_assign (s); _assign (s);
@ -135,10 +99,6 @@ FString::FString (const wchar_t s[])
//---------------------------------------------------------------------- //----------------------------------------------------------------------
FString::FString (const std::string& s) FString::FString (const std::string& s)
: string(0)
, length(0)
, bufsize(0)
, c_string(0)
{ {
if ( ! s.empty() ) if ( ! s.empty() )
{ {
@ -150,10 +110,6 @@ FString::FString (const std::string& s)
//---------------------------------------------------------------------- //----------------------------------------------------------------------
FString::FString (const char s[]) FString::FString (const char s[])
: string(0)
, length(0)
, bufsize(0)
, c_string(0)
{ {
if ( s ) if ( s )
{ {
@ -165,10 +121,6 @@ FString::FString (const char s[])
//---------------------------------------------------------------------- //----------------------------------------------------------------------
FString::FString (const wchar_t c) FString::FString (const wchar_t c)
: string(0)
, length(0)
, bufsize(0)
, c_string(0)
{ {
if ( c ) if ( c )
{ {
@ -181,10 +133,6 @@ FString::FString (const wchar_t c)
//---------------------------------------------------------------------- //----------------------------------------------------------------------
FString::FString (const char c) FString::FString (const char c)
: string(0)
, length(0)
, bufsize(0)
, c_string(0)
{ {
if ( c ) if ( c )
{ {

View File

@ -33,8 +33,6 @@ namespace finalcut
//---------------------------------------------------------------------- //----------------------------------------------------------------------
FSwitch::FSwitch(FWidget* parent) FSwitch::FSwitch(FWidget* parent)
: FToggleButton(parent) : FToggleButton(parent)
, switch_offset_pos(0)
, button_pressed(false)
{ {
button_width = 11; button_width = 11;
} }
@ -42,8 +40,6 @@ FSwitch::FSwitch(FWidget* parent)
//---------------------------------------------------------------------- //----------------------------------------------------------------------
FSwitch::FSwitch (const FString& txt, FWidget* parent) FSwitch::FSwitch (const FString& txt, FWidget* parent)
: FToggleButton(txt, parent) : FToggleButton(txt, parent)
, switch_offset_pos(0)
, button_pressed(false)
{ {
switch_offset_pos = txt.getLength() + 1; switch_offset_pos = txt.getLength() + 1;
button_width = 11; button_width = 11;

View File

@ -30,19 +30,10 @@ namespace finalcut
//---------------------------------------------------------------------- //----------------------------------------------------------------------
// class FTermBuffer // class FTermBuffer
//----------------------------------------------------------------------
// constructors and destructor
//----------------------------------------------------------------------
FTermBuffer::FTermBuffer()
: data()
{ }
//---------------------------------------------------------------------- //----------------------------------------------------------------------
FTermBuffer::~FTermBuffer() // destructor FTermBuffer::~FTermBuffer() // destructor
{ } { }
// public methods of FTermBuffer // public methods of FTermBuffer
//---------------------------------------------------------------------- //----------------------------------------------------------------------
int FTermBuffer::writef (const FString format, ...) int FTermBuffer::writef (const FString format, ...)

View File

@ -48,15 +48,6 @@ FTermDetection* FTermcap::term_detection = 0;
// class FTermcap // class FTermcap
//---------------------------------------------------------------------- //----------------------------------------------------------------------
// constructors and destructor
//----------------------------------------------------------------------
FTermcap::FTermcap()
{ }
//----------------------------------------------------------------------
FTermcap::~FTermcap() // destructor
{ }
/* Terminal capability data base /* Terminal capability data base
* ----------------------------- * -----------------------------
* Info under: man 5 terminfo * Info under: man 5 terminfo

View File

@ -39,15 +39,6 @@ namespace finalcut
// class FTermFreeBSD // class FTermFreeBSD
//---------------------------------------------------------------------- //----------------------------------------------------------------------
// constructors and destructor
//----------------------------------------------------------------------
FTermFreeBSD::FTermFreeBSD()
{ }
//----------------------------------------------------------------------
FTermFreeBSD::~FTermFreeBSD() // destructor
{ }
// public methods of FTermFreeBSD // public methods of FTermFreeBSD
//---------------------------------------------------------------------- //----------------------------------------------------------------------
#if defined(__FreeBSD__) || defined(__DragonFly__) #if defined(__FreeBSD__) || defined(__DragonFly__)

View File

@ -51,7 +51,6 @@ FTermios::FTermios()
FTermios::~FTermios() // destructor FTermios::~FTermios() // destructor
{ } { }
// public methods of FTermios // public methods of FTermios
//---------------------------------------------------------------------- //----------------------------------------------------------------------
void FTermios::init() void FTermios::init()

View File

@ -57,10 +57,6 @@ namespace finalcut
//---------------------------------------------------------------------- //----------------------------------------------------------------------
// constructors and destructor // constructors and destructor
//----------------------------------------------------------------------
FTermLinux::FTermLinux()
{ }
//---------------------------------------------------------------------- //----------------------------------------------------------------------
FTermLinux::~FTermLinux() // destructor FTermLinux::~FTermLinux() // destructor
{ {

View File

@ -36,15 +36,6 @@ namespace finalcut
// class FTermOpenBSD // class FTermOpenBSD
//---------------------------------------------------------------------- //----------------------------------------------------------------------
// constructors and destructor
//----------------------------------------------------------------------
FTermOpenBSD::FTermOpenBSD()
{ }
//----------------------------------------------------------------------
FTermOpenBSD::~FTermOpenBSD() // destructor
{ }
// public methods of FTermOpenBSD // public methods of FTermOpenBSD
//---------------------------------------------------------------------- //----------------------------------------------------------------------
#if defined(__NetBSD__) || defined(__OpenBSD__) #if defined(__NetBSD__) || defined(__OpenBSD__)

View File

@ -35,14 +35,6 @@ namespace finalcut
//---------------------------------------------------------------------- //----------------------------------------------------------------------
FTextView::FTextView(FWidget* parent) FTextView::FTextView(FWidget* parent)
: FWidget(parent) : FWidget(parent)
, data()
, vbar(0)
, hbar(0)
, update_scrollbar(true)
, xoffset(0)
, yoffset(0)
, nf_offset(0)
, maxLineWidth(0)
{ {
init(); init();
} }

View File

@ -36,12 +36,6 @@ namespace finalcut
//---------------------------------------------------------------------- //----------------------------------------------------------------------
FToggleButton::FToggleButton (FWidget* parent) FToggleButton::FToggleButton (FWidget* parent)
: FWidget(parent) : FWidget(parent)
, checked(false)
, label_offset_pos(0)
, button_width(0)
, button_group(0)
, focus_inside_group(true)
, text()
{ {
init(); init();
@ -57,12 +51,6 @@ FToggleButton::FToggleButton (FWidget* parent)
//---------------------------------------------------------------------- //----------------------------------------------------------------------
FToggleButton::FToggleButton (const FString& txt, FWidget* parent) FToggleButton::FToggleButton (const FString& txt, FWidget* parent)
: FWidget(parent) : FWidget(parent)
, checked(false)
, label_offset_pos(0)
, button_width(0)
, button_group(0)
, focus_inside_group(true)
, text()
{ {
FToggleButton::setText(txt); // call own method FToggleButton::setText(txt); // call own method
init(); init();

View File

@ -34,11 +34,6 @@ namespace finalcut
//---------------------------------------------------------------------- //----------------------------------------------------------------------
FToolTip::FToolTip (FWidget* parent) FToolTip::FToolTip (FWidget* parent)
: FWindow(parent) : FWindow(parent)
, text()
, text_components(0)
, text_split()
, max_line_width(0)
, text_num_lines(0)
{ {
init(); init();
} }
@ -47,10 +42,6 @@ FToolTip::FToolTip (FWidget* parent)
FToolTip::FToolTip (const FString& txt, FWidget* parent) FToolTip::FToolTip (const FString& txt, FWidget* parent)
: FWindow(parent) : FWindow(parent)
, text(txt) , text(txt)
, text_components(0)
, text_split()
, max_line_width(0)
, text_num_lines(0)
{ {
init(); init();
} }

View File

@ -68,9 +68,6 @@ FVTerm::charData FVTerm::i_ch;
// constructors and destructor // constructors and destructor
//---------------------------------------------------------------------- //----------------------------------------------------------------------
FVTerm::FVTerm (bool initialize, bool disable_alt_screen) FVTerm::FVTerm (bool initialize, bool disable_alt_screen)
: print_area(0)
, child_print_area(0)
, vwin(0)
{ {
terminal_update_complete = false; terminal_update_complete = false;

View File

@ -57,26 +57,6 @@ uInt FWidget::modal_dialogs;
FWidget::FWidget (FWidget* parent, bool disable_alt_screen) FWidget::FWidget (FWidget* parent, bool disable_alt_screen)
: FVTerm(bool(! parent), disable_alt_screen) : FVTerm(bool(! parent), disable_alt_screen)
, FObject(parent) , FObject(parent)
, accelerator_list(0)
, flags()
, callback_objects()
, member_callback_objects()
, widget_cursor_position(-1, -1)
, size_hints()
, double_flatline_mask()
, padding()
, ignore_padding(false)
, wsize(1, 1, 1, 1)
, adjust_wsize(1, 1, 1, 1)
, adjust_wsize_term()
, adjust_wsize_shadow()
, adjust_wsize_term_shadow()
, offset()
, client_offset()
, wshadow(0, 0)
, foreground_color(fc::Default)
, background_color(fc::Default)
, statusbar_message()
{ {
// init bit field with 0 // init bit field with 0
memset (&flags, 0, sizeof(flags)); memset (&flags, 0, sizeof(flags));

View File

@ -40,10 +40,6 @@ FWindow* FWindow::previous_window = 0;
//---------------------------------------------------------------------- //----------------------------------------------------------------------
FWindow::FWindow(FWidget* parent) FWindow::FWindow(FWidget* parent)
: FWidget(parent) : FWidget(parent)
, window_active(false)
, zoomed(false)
, win_focus_widget(0)
, normalGeometry()
{ {
setWindowWidget(); setWindowWidget();
FRect geometry = getTermGeometry(); FRect geometry = getTermGeometry();

View File

@ -179,8 +179,8 @@ class FApplication : public FWidget
// Data Members // Data Members
int app_argc; int app_argc;
char** app_argv; char** app_argv;
long key_timeout; long key_timeout{100000}; // 100 ms
long dblclick_interval; long dblclick_interval{500000}; // 500 ms
static FMouseControl* mouse; static FMouseControl* mouse;
static eventQueue* event_queue; static eventQueue* event_queue;
static int quit_code; static int quit_code;

View File

@ -157,24 +157,24 @@ class FButton : public FWidget
void processClick(); void processClick();
// Data Members // Data Members
FString text; FString text{};
bool button_down; bool button_down{false};
bool active_focus; bool active_focus{false};
bool click_animation; bool click_animation{true};
int click_time; int click_time{150};
int space_char; int space_char{int(' ')};
std::size_t hotkeypos; std::size_t hotkeypos{NOT_SET};
std::size_t indent; std::size_t indent{0};
std::size_t center_offset; std::size_t center_offset{0};
std::size_t vcenter_offset; std::size_t vcenter_offset{0};
std::size_t txtlength; std::size_t txtlength{0};
FColor button_fg; FColor button_fg{wc.button_active_fg};
FColor button_bg; FColor button_bg{wc.button_active_bg};
FColor button_hotkey_fg; FColor button_hotkey_fg{wc.button_hotkey_fg};
FColor button_focus_fg; FColor button_focus_fg{wc.button_active_focus_fg};
FColor button_focus_bg; FColor button_focus_bg{wc.button_active_focus_bg};
FColor button_inactive_fg; FColor button_inactive_fg{wc.button_inactive_fg};
FColor button_inactive_bg; FColor button_inactive_bg{wc.button_inactive_bg};
}; };
#pragma pack(pop) #pragma pack(pop)

View File

@ -144,8 +144,8 @@ class FButtonGroup : public FScrollView
void directFocus(); void directFocus();
// Data Members // Data Members
FString text; FString text{};
FObjectList buttonlist; FObjectList buttonlist{};
}; };
#pragma pack(pop) #pragma pack(pop)

View File

@ -93,7 +93,7 @@ enum encoding
}; };
// VT100 line graphic keys // VT100 line graphic keys
enum vt100_keys enum vt100_keys : char
{ {
vt100_key_rarrow = '+', // ► - arrow pointing right vt100_key_rarrow = '+', // ► - arrow pointing right
vt100_key_larrow = ',', // ◄ - arrow pointing left vt100_key_larrow = ',', // ◄ - arrow pointing left
@ -136,7 +136,7 @@ enum vt100_keys
}; };
// Unicode characters // Unicode characters
enum SpecialCharacter enum SpecialCharacter : wchar_t
{ {
Euro = 0x20ac, // € Euro = 0x20ac, // €
Pound = 0x00a3, // £ Pound = 0x00a3, // £
@ -237,7 +237,7 @@ enum SpecialCharacter
*/ */
// keyboard - single keys // keyboard - single keys
enum keys enum keys : FKey
{ {
Fckey_a = 0x00000001, // control-a Fckey_a = 0x00000001, // control-a
Fckey_b = 0x00000002, // control-b Fckey_b = 0x00000002, // control-b
@ -440,7 +440,7 @@ enum keys
}; };
// Keyboard - modifier key combinations // Keyboard - modifier key combinations
enum metakeys enum metakeys : FKey
{ {
Fmkey_ic = 0x01500100, // M-insert Fmkey_ic = 0x01500100, // M-insert
Fmkey_dc = 0x01500101, // M-delete Fmkey_dc = 0x01500101, // M-delete
@ -651,7 +651,7 @@ enum metakeys
}; };
// Console color names // Console color names
enum colornames enum colornames : FColor
{ {
Black = 0, Black = 0,
Blue = 1, Blue = 1,

View File

@ -51,7 +51,7 @@ class FColorPalette
{ {
public: public:
// Constructor // Constructor
FColorPalette(); FColorPalette() = default;
// Destructor // Destructor
virtual ~FColorPalette(); virtual ~FColorPalette();

View File

@ -222,21 +222,21 @@ class FDialog : public FWindow
void cb_close (FWidget*, data_ptr); void cb_close (FWidget*, data_ptr);
// Data Members // Data Members
FString tb_text; // title bar text FString tb_text{}; // title bar text
DialogCode result_code; DialogCode result_code{FDialog::Reject};
bool zoom_button_pressed; bool zoom_button_pressed{false};
bool zoom_button_active; bool zoom_button_active{false};
bool setPos_error; bool setPos_error{false};
bool setSize_error; bool setSize_error{false};
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; FMenu* dialog_menu{0};
FMenuItem* dgl_menuitem; FMenuItem* dgl_menuitem{0};
FMenuItem* move_size_item; FMenuItem* move_size_item{0};
FMenuItem* zoom_item; FMenuItem* zoom_item{0};
FMenuItem* close_item; FMenuItem* close_item{0};
FToolTip* tooltip; FToolTip* tooltip{0};
// Friend function from FMenu // Friend function from FMenu
friend void FMenu::hideSuperMenus(); friend void FMenu::hideSuperMenus();

View File

@ -92,12 +92,13 @@ namespace finalcut
class FEvent // event base class class FEvent // event base class
{ {
public: public:
FEvent() = default;
explicit FEvent(int); explicit FEvent(int);
virtual ~FEvent(); virtual ~FEvent();
int type() const; int type() const;
protected: protected:
int t; int t{fc::None_Event};
}; };
#pragma pack(pop) #pragma pack(pop)
@ -113,6 +114,7 @@ class FEvent // event base class
class FKeyEvent : public FEvent // keyboard event class FKeyEvent : public FEvent // keyboard event
{ {
public: public:
FKeyEvent() = default;
FKeyEvent (int, FKey); FKeyEvent (int, FKey);
~FKeyEvent(); ~FKeyEvent();
@ -122,8 +124,8 @@ class FKeyEvent : public FEvent // keyboard event
void ignore(); void ignore();
protected: protected:
FKey k; FKey k{0};
bool accpt; bool accpt{false};
}; };
#pragma pack(pop) #pragma pack(pop)
@ -139,8 +141,9 @@ class FKeyEvent : public FEvent // keyboard event
class FMouseEvent : public FEvent // mouse event class FMouseEvent : public FEvent // mouse event
{ {
public: public:
FMouseEvent (int, const FPoint&, int); FMouseEvent() = default;
FMouseEvent (int, const FPoint&, const FPoint&, int); FMouseEvent (int, const FPoint&, const FPoint&, int);
FMouseEvent (int, const FPoint&, int);
~FMouseEvent(); ~FMouseEvent();
const FPoint& getPos() const; const FPoint& getPos() const;
@ -170,6 +173,7 @@ class FMouseEvent : public FEvent // mouse event
class FWheelEvent : public FEvent // wheel event class FWheelEvent : public FEvent // wheel event
{ {
public: public:
FWheelEvent() = default;
FWheelEvent (int, const FPoint&, int); FWheelEvent (int, const FPoint&, int);
FWheelEvent (int, const FPoint&, const FPoint&, int); FWheelEvent (int, const FPoint&, const FPoint&, int);
~FWheelEvent(); ~FWheelEvent();
@ -201,6 +205,7 @@ class FWheelEvent : public FEvent // wheel event
class FFocusEvent : public FEvent // focus event class FFocusEvent : public FEvent // focus event
{ {
public: public:
FFocusEvent() = default;
explicit FFocusEvent (int); explicit FFocusEvent (int);
~FFocusEvent(); ~FFocusEvent();
@ -212,8 +217,8 @@ class FFocusEvent : public FEvent // focus event
void accept(); void accept();
void ignore(); void ignore();
protected: protected:
bool accpt; bool accpt{true};
fc::FocusTypes focus_type; fc::FocusTypes focus_type{fc::FocusDefiniteWidget};
}; };
#pragma pack(pop) #pragma pack(pop)
@ -228,13 +233,8 @@ class FFocusEvent : public FEvent // focus event
class FAccelEvent : public FEvent // focus event class FAccelEvent : public FEvent // focus event
{ {
private:
// Disable copy constructor
FAccelEvent (const FAccelEvent&);
// Disable assignment operator (=)
FAccelEvent& operator = (const FAccelEvent&);
public: public:
FAccelEvent() = default;
FAccelEvent (int, void*); FAccelEvent (int, void*);
~FAccelEvent(); ~FAccelEvent();
@ -244,8 +244,14 @@ class FAccelEvent : public FEvent // focus event
void ignore(); void ignore();
protected: protected:
bool accpt; bool accpt{false};
void* focus_widget; void* focus_widget;
private:
// Disable copy constructor
FAccelEvent (const FAccelEvent&);
// Disable assignment operator (=)
FAccelEvent& operator = (const FAccelEvent&);
}; };
#pragma pack(pop) #pragma pack(pop)
@ -258,6 +264,7 @@ class FAccelEvent : public FEvent // focus event
class FResizeEvent : public FEvent // resize event class FResizeEvent : public FEvent // resize event
{ {
public: public:
FResizeEvent() = default;
explicit FResizeEvent (int); explicit FResizeEvent (int);
~FResizeEvent(); ~FResizeEvent();
@ -266,7 +273,7 @@ class FResizeEvent : public FEvent // resize event
void ignore(); void ignore();
protected: protected:
bool accpt; bool accpt{false};
}; };
@ -278,6 +285,7 @@ class FResizeEvent : public FEvent // resize event
class FShowEvent : public FEvent // show event class FShowEvent : public FEvent // show event
{ {
public: public:
FShowEvent() = default;
explicit FShowEvent (int); explicit FShowEvent (int);
~FShowEvent(); ~FShowEvent();
}; };
@ -291,6 +299,7 @@ class FShowEvent : public FEvent // show event
class FHideEvent : public FEvent // hide event class FHideEvent : public FEvent // hide event
{ {
public: public:
FHideEvent() = default;
explicit FHideEvent (int); explicit FHideEvent (int);
~FHideEvent(); ~FHideEvent();
}; };
@ -304,6 +313,7 @@ class FHideEvent : public FEvent // hide event
class FCloseEvent : public FEvent // close event class FCloseEvent : public FEvent // close event
{ {
public: public:
FCloseEvent() = default;
explicit FCloseEvent(int); explicit FCloseEvent(int);
~FCloseEvent(); ~FCloseEvent();
@ -312,7 +322,7 @@ class FCloseEvent : public FEvent // close event
void ignore(); void ignore();
protected: protected:
bool accpt; bool accpt{false};
}; };
@ -327,6 +337,7 @@ class FCloseEvent : public FEvent // close event
class FTimerEvent : public FEvent // timer event class FTimerEvent : public FEvent // timer event
{ {
public: public:
FTimerEvent() = default;
FTimerEvent(int, int); FTimerEvent(int, int);
~FTimerEvent(); ~FTimerEvent();

View File

@ -186,17 +186,17 @@ class FFileDialog : public FDialog
void cb_processShowHidden (FWidget*, data_ptr); void cb_processShowHidden (FWidget*, data_ptr);
// Data Members // Data Members
DIR* directory_stream; DIR* directory_stream{0};
dirEntries dir_entries; dirEntries dir_entries{};
FString directory; FString directory{};
FString filter_pattern; FString filter_pattern{};
FLineEdit filename; FLineEdit filename{this};
FListBox filebrowser; FListBox filebrowser{this};
FCheckBox hidden; FCheckBox hidden{this};
FButton cancel; FButton cancel{this};
FButton open; FButton open{this};
DialogType dlg_type; DialogType dlg_type{FFileDialog::Open};
bool show_hidden; bool show_hidden{false};
// Friend functions // Friend functions
friend bool sortByName ( const FFileDialog::dir_entry& friend bool sortByName ( const FFileDialog::dir_entry&

View File

@ -67,8 +67,8 @@ class FKeyboardCommand
private: private:
// Data Members // Data Members
FApplication* instance; FApplication* instance{0};
void (FApplication::*handler)(); void (FApplication::*handler)(){0};
}; };
#pragma pack(pop) #pragma pack(pop)
@ -84,7 +84,7 @@ class FKeyboard
{ {
public: public:
// Constants // Constants
static const std::size_t FIFO_BUF_SIZE = 512; static const std::size_t FIFO_BUF_SIZE{512};
// Typedef // Typedef
typedef char keybuffer[FIFO_BUF_SIZE]; typedef char keybuffer[FIFO_BUF_SIZE];
@ -131,7 +131,7 @@ class FKeyboard
private: private:
// Constants // Constants
static const std::size_t READ_BUF_SIZE = 1024; static const std::size_t READ_BUF_SIZE{1024};
static const FKey NOT_SET = static_cast<FKey>(-1); static const FKey NOT_SET = static_cast<FKey>(-1);
// Disable copy constructor // Disable copy constructor
@ -166,23 +166,23 @@ class FKeyboard
void escapeKeyPressed(); void escapeKeyPressed();
// Data Members // Data Members
FKey key; FKey key{0};
char read_buf[READ_BUF_SIZE]; char read_buf[READ_BUF_SIZE]{};
char fifo_buf[FIFO_BUF_SIZE]; char fifo_buf[FIFO_BUF_SIZE]{};
int fifo_offset; int fifo_offset{0};
bool fifo_in_use; bool fifo_in_use{false};
int stdin_status_flags; int stdin_status_flags{0};
static long key_timeout; static long key_timeout;
bool input_data_pending; bool input_data_pending{false};
bool utf8_input; bool utf8_input{false};
bool mouse_support; bool mouse_support{true};
bool non_blocking_stdin; bool non_blocking_stdin{false};
FKeyboardCommand keypressed_cmd; FKeyboardCommand keypressed_cmd{};
FKeyboardCommand keyreleased_cmd; FKeyboardCommand keyreleased_cmd{};
FKeyboardCommand escape_key_cmd; FKeyboardCommand escape_key_cmd{};
static timeval time_keypressed; static timeval time_keypressed;
fc::fkeymap* key_map; fc::fkeymap* key_map{0};
#if defined(__linux__) #if defined(__linux__)
#undef linux #undef linux

View File

@ -153,15 +153,15 @@ class FLabel : public FWidget
, std::size_t, std::size_t = 0 ); , std::size_t, std::size_t = 0 );
// Data Members // Data Members
FStringList multiline_text; FStringList multiline_text{};
bool multiline; bool multiline{false};
FString text; FString text{};
fc::text_alignment alignment; fc::text_alignment alignment{fc::alignLeft};
FColor emphasis_color; FColor emphasis_color{wc.label_emphasis_fg};
FColor ellipsis_color; FColor ellipsis_color{wc.label_ellipsis_fg};
bool emphasis; bool emphasis{false};
bool reverse_mode; bool reverse_mode{false};
FWidget* accel_widget; FWidget* accel_widget{0};
}; };
#pragma pack(pop) #pragma pack(pop)

View File

@ -170,16 +170,16 @@ class FLineEdit : public FWidget
void processChanged(); void processChanged();
// Data Members // Data Members
FString text; FString text{""};
FString label_text; FString label_text{""};
FLabel* label; FLabel* label{};
label_o label_orientation; label_o label_orientation{FLineEdit::label_left};
dragScroll drag_scroll; dragScroll drag_scroll{FLineEdit::noScroll};
bool scroll_timer; bool scroll_timer{false};
int scroll_repeat; int scroll_repeat{100};
bool insert_mode; bool insert_mode{true};
std::size_t cursor_pos; std::size_t cursor_pos{0};
std::size_t text_offset; std::size_t text_offset{0};
}; };
#pragma pack(pop) #pragma pack(pop)

View File

@ -99,10 +99,10 @@ class FListBoxItem
friend class FListBox; friend class FListBox;
// Data Members // Data Members
FString text; FString text{};
FWidget::data_ptr data_pointer; FWidget::data_ptr data_pointer{0};
fc::brackets_type brackets; fc::brackets_type brackets{fc::NoBrackets};
bool selected; bool selected{false};
}; };
#pragma pack(pop) #pragma pack(pop)
@ -299,30 +299,30 @@ class FListBox : public FWidget
// Function Pointer // Function Pointer
void (*convertToItem) ( FListBoxItem& void (*convertToItem) ( FListBoxItem&
, FWidget::data_ptr , FWidget::data_ptr
, int index ); , int index ){0};
// Data Members // Data Members
listBoxItems itemlist; listBoxItems itemlist{};
FWidget::data_ptr source_container; FWidget::data_ptr source_container{0};
convert_type conv_type; convert_type conv_type{FListBox::no_convert};
FScrollbar* vbar; FScrollbar* vbar{0};
FScrollbar* hbar; FScrollbar* hbar{0};
FString text; FString text{};
FString inc_search; FString inc_search{};
bool multi_select; bool multi_select{false};
bool mouse_select; bool mouse_select{false};
fc::dragScroll drag_scroll; fc::dragScroll drag_scroll{fc::noScroll};
bool scroll_timer; bool scroll_timer{false};
int scroll_repeat; int scroll_repeat{100};
int scroll_distance; int scroll_distance{1};
std::size_t current; std::size_t current{0};
int last_current; int last_current{-1};
int secect_from_item; int secect_from_item{-1};
int xoffset; int xoffset{0};
int yoffset; int yoffset{0};
int last_yoffset; int last_yoffset{-1};
std::size_t nf_offset; std::size_t nf_offset{0};
std::size_t max_line_width; std::size_t max_line_width{0};
}; };
#pragma pack(pop) #pragma pack(pop)
@ -335,28 +335,6 @@ inline FListBox::FListBox ( Iterator first
, InsertConverter convert , InsertConverter convert
, FWidget* parent ) , FWidget* parent )
: FWidget(parent) : FWidget(parent)
, convertToItem(0)
, itemlist()
, source_container(0)
, conv_type(FListBox::no_convert)
, vbar(0)
, hbar(0)
, text()
, inc_search()
, multi_select(false)
, mouse_select(false)
, drag_scroll(fc::noScroll)
, scroll_timer(false)
, scroll_repeat(100)
, scroll_distance(1)
, current(0)
, last_current(-1)
, secect_from_item(-1)
, xoffset(0)
, yoffset(0)
, last_yoffset(-1)
, nf_offset(0)
, max_line_width(0)
{ {
init(); init();
@ -373,28 +351,6 @@ inline FListBox::FListBox ( Container container
, LazyConverter convert , LazyConverter convert
, FWidget* parent ) , FWidget* parent )
: FWidget(parent) : FWidget(parent)
, convertToItem(0)
, itemlist()
, source_container(0)
, conv_type(FListBox::no_convert)
, vbar(0)
, hbar(0)
, text()
, inc_search()
, multi_select(false)
, mouse_select(false)
, drag_scroll(fc::noScroll)
, scroll_timer(false)
, scroll_repeat(100)
, scroll_distance(1)
, current(0)
, last_current(-1)
, secect_from_item(-1)
, xoffset(0)
, yoffset(0)
, last_yoffset(-1)
, nf_offset(0)
, max_line_width(0)
{ {
init(); init();
insert (container, convert); insert (container, convert);

View File

@ -128,14 +128,14 @@ class FListViewItem : public FObject
void resetVisibleLineCounter(); void resetVisibleLineCounter();
// Data Members // Data Members
FStringList column_list; FStringList column_list{};
FWidget::data_ptr data_pointer; FWidget::data_ptr data_pointer{0};
FObjectIterator root; FObjectIterator root{};
std::size_t visible_lines; std::size_t visible_lines{1};
bool expandable; bool expandable{false};
bool is_expand; bool is_expand{false};
bool checkable; bool checkable{false};
bool is_checked; bool is_checked{false};
// Friend class // Friend class
friend class FListView; friend class FListView;
@ -198,7 +198,7 @@ class FListViewIterator
typedef std::stack<FObjectIterator> FObjectIteratorStack; typedef std::stack<FObjectIterator> FObjectIteratorStack;
// Constructor // Constructor
FListViewIterator (); FListViewIterator () = default;
FListViewIterator (FObjectIterator); FListViewIterator (FObjectIterator);
// Overloaded operators // Overloaded operators
@ -226,9 +226,9 @@ class FListViewIterator
void prevElement (FObjectIterator&); void prevElement (FObjectIterator&);
// Data Members // Data Members
FObjectIteratorStack iter_path; FObjectIteratorStack iter_path{};
FObjectIterator node; FObjectIterator node{};
int position; int position{0};
}; };
#pragma pack(pop) #pragma pack(pop)
@ -422,34 +422,34 @@ class FListView : public FWidget
void cb_HBarChange (FWidget*, data_ptr); void cb_HBarChange (FWidget*, data_ptr);
// Data Members // Data Members
FObjectIterator root; FObjectIterator root{};
FObjectList selflist; FObjectList selflist{};
FObjectList itemlist; FObjectList itemlist{};
FListViewIterator current_iter; FListViewIterator current_iter{};
FListViewIterator first_visible_line; FListViewIterator first_visible_line{};
FListViewIterator last_visible_line; FListViewIterator last_visible_line{};
headerItems header; headerItems header{};
FTermBuffer headerline; FTermBuffer headerline{};
FScrollbar* vbar; FScrollbar* vbar{0};
FScrollbar* hbar; FScrollbar* hbar{0};
fc::dragScroll drag_scroll; fc::dragScroll drag_scroll{fc::noScroll};
int scroll_repeat; int scroll_repeat{100};
int scroll_distance; int scroll_distance{1};
bool scroll_timer; bool scroll_timer{false};
bool tree_view; bool tree_view{false};
bool hide_sort_indicator; bool hide_sort_indicator{false};
bool has_checkable_items; bool has_checkable_items{false};
FPoint clicked_expander_pos; FPoint clicked_expander_pos{-1, -1};
FPoint clicked_header_pos; FPoint clicked_header_pos{-1, -1};
const FListViewItem* clicked_checkbox_item; const FListViewItem* clicked_checkbox_item{0};
int xoffset; int xoffset{0};
int nf_offset; int nf_offset{0};
int max_line_width; int max_line_width{1};
int sort_column; int sort_column{-1};
sortTypes sort_type; sortTypes sort_type{};
fc::sorting_order sort_order; fc::sorting_order sort_order{fc::unsorted};
bool (*user_defined_ascending) (const FObject*, const FObject*); bool (*user_defined_ascending) (const FObject*, const FObject*){0};
bool (*user_defined_descending) (const FObject*, const FObject*); bool (*user_defined_descending) (const FObject*, const FObject*){0};
// Friend class // Friend class
friend class FListViewItem; friend class FListViewItem;

View File

@ -231,14 +231,14 @@ class FMenu : public FWindow, public FMenuList
friend class FRadioMenuItem; friend class FRadioMenuItem;
// Data Members // Data Members
FMenuItem item; FMenuItem item{};
FWidget* super_menu; FWidget* super_menu{0};
FMenu* opened_sub_menu; FMenu* opened_sub_menu{0};
FMenu* shown_sub_menu; FMenu* shown_sub_menu{0};
std::size_t max_item_width; std::size_t max_item_width{0};
std::size_t hotkeypos; std::size_t hotkeypos{NOT_SET};
bool mouse_down; bool mouse_down{false};
bool has_checkable_items; bool has_checkable_items{false};
}; };
#pragma pack(pop) #pragma pack(pop)

View File

@ -154,10 +154,10 @@ class FMenuBar : public FWindow, public FMenuList
friend class FMenuItem; friend class FMenuItem;
// Data Members // Data Members
bool mouse_down; bool mouse_down{false};
bool drop_down; bool drop_down{false};
bool focus_changed; bool focus_changed{false};
std::size_t screenWidth; std::size_t screenWidth{80};
}; };
#pragma pack(pop) #pragma pack(pop)

View File

@ -145,19 +145,19 @@ class FMenuItem : public FWidget
bool isMenu (FWidget*) const; bool isMenu (FWidget*) const;
// Data Members // Data Members
FString text; FString text{};
bool selected; bool selected{false};
bool separator; bool separator{false};
bool checkable; bool checkable{false};
bool checked; bool checked{false};
bool radio_button; bool radio_button{false};
bool dialog_index; bool dialog_index{false};
std::size_t text_length; std::size_t text_length{0};
uChar hotkey; uChar hotkey{0};
FKey accel_key; FKey accel_key{0};
FMenu* menu; FMenu* menu{0};
FWidget* super_menu; FWidget* super_menu{0};
FDialog* associated_window; FDialog* associated_window{0};
private: private:
// Disable copy constructor // Disable copy constructor

View File

@ -62,7 +62,7 @@ class FMenuList
{ {
public: public:
// Constructor // Constructor
FMenuList(); FMenuList() = default;
// Destructor // Destructor
virtual ~FMenuList(); virtual ~FMenuList();
@ -91,8 +91,8 @@ class FMenuList
void unselectItem(); void unselectItem();
protected: protected:
FMenuItem* selected_item; FMenuItem* selected_item{};
std::vector<FMenuItem*> item_list; std::vector<FMenuItem*> item_list{};
private: private:
// Disable copy constructor // Disable copy constructor

View File

@ -159,17 +159,17 @@ class FMessageBox : public FDialog
void adjustButtons(); void adjustButtons();
// Data Members // Data Members
FString headline_text; FString headline_text{};
FString text; FString text{};
FString* text_components; FString* text_components{0};
FStringList text_split; FStringList text_split{};
std::size_t max_line_width; std::size_t max_line_width{0};
bool center_text; bool center_text{false};
FColor emphasis_color; FColor emphasis_color{wc.dialog_emphasis_fg};
uInt num_buttons; uInt num_buttons{0};
uInt text_num_lines; uInt text_num_lines{0};
int button_digit[3]; int button_digit[3]{};
FButton* button[3]; FButton* button[3]{0};
}; };
#pragma pack(pop) #pragma pack(pop)

View File

@ -170,16 +170,16 @@ class FMouse
bool isDblclickTimeout (timeval*); bool isDblclickTimeout (timeval*);
// Data Members // Data Members
button b_state; button b_state{};
bool mouse_event_occurred; bool mouse_event_occurred{false};
bool input_data_pending; bool input_data_pending{false};
long dblclick_interval; long dblclick_interval{500000}; // 500 ms
short max_width; short max_width{80};
short max_height; short max_height{25};
struct timeval time_mousepressed; struct timeval time_mousepressed{};
FPoint zero_point; FPoint zero_point{0, 0}; // zero point (x=0, y=0)
FPoint mouse; // mouse click position FPoint mouse{0, 0}; // mouse click position
FPoint new_mouse_position; FPoint new_mouse_position{};
}; };
#pragma pack(pop) #pragma pack(pop)
@ -236,10 +236,10 @@ class FMouseGPM : public FMouse
int gpmEvent (bool = true); int gpmEvent (bool = true);
// Data Member // Data Member
Gpm_Event gpm_ev; Gpm_Event gpm_ev{};
bool has_gpm_mouse_data; bool has_gpm_mouse_data{false};
bool gpm_mouse_enabled; bool gpm_mouse_enabled{false};
int stdin_no; int stdin_no{0};
}; };
#pragma pack(pop) #pragma pack(pop)
@ -314,8 +314,8 @@ class FMouseX11 : public FMouse
void setButtonState (int, struct timeval*); void setButtonState (int, struct timeval*);
// Data Member // Data Member
char x11_mouse[MOUSE_BUF_SIZE]; char x11_mouse[MOUSE_BUF_SIZE]{};
uChar x11_button_state; uChar x11_button_state{all_buttons_released};
}; };
#pragma pack(pop) #pragma pack(pop)
@ -377,8 +377,8 @@ class FMouseSGR : public FMouse
void setReleasedButtonState (int); void setReleasedButtonState (int);
// Data Members // Data Members
char sgr_mouse[MOUSE_BUF_SIZE]; char sgr_mouse[MOUSE_BUF_SIZE]{};
uChar sgr_button_state; uChar sgr_button_state{0x23};
}; };
#pragma pack(pop) #pragma pack(pop)
@ -440,8 +440,8 @@ class FMouseUrxvt : public FMouse
void setButtonState (int, struct timeval*); void setButtonState (int, struct timeval*);
// Data Members // Data Members
char urxvt_mouse[MOUSE_BUF_SIZE]; char urxvt_mouse[MOUSE_BUF_SIZE]{};
uChar urxvt_button_state; uChar urxvt_button_state{all_buttons_released};
}; };
#pragma pack(pop) #pragma pack(pop)
@ -511,11 +511,11 @@ class FMouseControl
void disableXTermMouse(); void disableXTermMouse();
// Data Member // Data Member
std::map<FMouse::mouse_type, FMouse*> mouse_protocol; std::map<FMouse::mouse_type, FMouse*> mouse_protocol{};
std::map<FMouse::mouse_type, FMouse*>::iterator iter; std::map<FMouse::mouse_type, FMouse*>::iterator iter{};
FPoint zero_point; FPoint zero_point{0, 0};
bool use_gpm_mouse; bool use_gpm_mouse{false};
bool use_xterm_mouse; bool use_xterm_mouse{false};
}; };
#pragma pack(pop) #pragma pack(pop)

View File

@ -133,7 +133,7 @@ class FObject
virtual void onTimer (FTimerEvent*); virtual void onTimer (FTimerEvent*);
// Data Member // Data Member
bool widget_object; bool widget_object{false};
private: private:
// Disable copy constructor // Disable copy constructor
@ -146,9 +146,9 @@ 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{};
FObjectList children_list; FObjectList children_list{}; // no children yet
bool has_parent; bool has_parent{false};
static bool timer_modify_lock; static bool timer_modify_lock;
static TimerList* timer_list; static TimerList* timer_list;
}; };

View File

@ -326,54 +326,54 @@ class FOptiAttr
bool append_sequence (char[]); bool append_sequence (char[]);
// Data Members // Data Members
capability F_enter_bold_mode; capability F_enter_bold_mode{};
capability F_exit_bold_mode; capability F_exit_bold_mode{};
capability F_enter_dim_mode; capability F_enter_dim_mode{};
capability F_exit_dim_mode; capability F_exit_dim_mode{};
capability F_enter_italics_mode; capability F_enter_italics_mode{};
capability F_exit_italics_mode; capability F_exit_italics_mode{};
capability F_enter_underline_mode; capability F_enter_underline_mode{};
capability F_exit_underline_mode; capability F_exit_underline_mode{};
capability F_enter_blink_mode; capability F_enter_blink_mode{};
capability F_exit_blink_mode; capability F_exit_blink_mode{};
capability F_enter_reverse_mode; capability F_enter_reverse_mode{};
capability F_exit_reverse_mode; capability F_exit_reverse_mode{};
capability F_enter_standout_mode; capability F_enter_standout_mode{};
capability F_exit_standout_mode; capability F_exit_standout_mode{};
capability F_enter_secure_mode; capability F_enter_secure_mode{};
capability F_exit_secure_mode; capability F_exit_secure_mode{};
capability F_enter_protected_mode; capability F_enter_protected_mode{};
capability F_exit_protected_mode; capability F_exit_protected_mode{};
capability F_enter_crossed_out_mode; capability F_enter_crossed_out_mode{};
capability F_exit_crossed_out_mode; capability F_exit_crossed_out_mode{};
capability F_enter_dbl_underline_mode; capability F_enter_dbl_underline_mode{};
capability F_exit_dbl_underline_mode; capability F_exit_dbl_underline_mode{};
capability F_set_attributes; capability F_set_attributes{};
capability F_exit_attribute_mode; capability F_exit_attribute_mode{};
capability F_enter_alt_charset_mode; capability F_enter_alt_charset_mode{};
capability F_exit_alt_charset_mode; capability F_exit_alt_charset_mode{};
capability F_enter_pc_charset_mode; capability F_enter_pc_charset_mode{};
capability F_exit_pc_charset_mode; capability F_exit_pc_charset_mode{};
capability F_set_a_foreground; capability F_set_a_foreground{};
capability F_set_a_background; capability F_set_a_background{};
capability F_set_foreground; capability F_set_foreground{};
capability F_set_background; capability F_set_background{};
capability F_set_color_pair; capability F_set_color_pair{};
capability F_orig_pair; capability F_orig_pair{};
capability F_orig_colors; capability F_orig_colors{};
charData on; charData on{};
charData off; charData off{};
charData reset_byte_mask; charData reset_byte_mask{};
int max_color; int max_color{1};
int attr_without_color; int attr_without_color{0};
bool ansi_default_color; bool ansi_default_color{false};
bool alt_equal_pc_charset; bool alt_equal_pc_charset{false};
bool monochron; bool monochron{true};
bool fake_reverse; bool fake_reverse{false};
char attr_buf[8192]; char attr_buf[8192]{};
char* attr_ptr; char* attr_ptr{attr_buf};
}; };
#pragma pack(pop) #pragma pack(pop)

View File

@ -169,7 +169,7 @@ class FOptiMove
private: private:
// Constant // Constant
static const std::size_t BUF_SIZE = 512; static const std::size_t BUF_SIZE{512};
// Typedef // Typedef
typedef struct typedef struct
@ -180,9 +180,9 @@ class FOptiMove
} capability; } capability;
// Constants // Constants
static const int LONG_DURATION = INT_MAX; static const int LONG_DURATION{INT_MAX};
// value for a long capability waiting time // value for a long capability waiting time
static const int MOVE_LIMIT = 7; static const int MOVE_LIMIT{7};
// maximum character distance to avoid direct cursor addressing // maximum character distance to avoid direct cursor addressing
// Methods // Methods
@ -211,35 +211,35 @@ class FOptiMove
friend void printDurations (const FOptiMove&); friend void printDurations (const FOptiMove&);
// Data Members // Data Members
capability F_cursor_home; capability F_cursor_home{};
capability F_carriage_return; capability F_carriage_return{};
capability F_cursor_to_ll; capability F_cursor_to_ll{};
capability F_tab; capability F_tab{};
capability F_back_tab; capability F_back_tab{};
capability F_cursor_up; capability F_cursor_up{};
capability F_cursor_down; capability F_cursor_down{};
capability F_cursor_left; capability F_cursor_left{};
capability F_cursor_right; capability F_cursor_right{};
capability F_cursor_address; capability F_cursor_address{};
capability F_column_address; capability F_column_address{};
capability F_row_address; capability F_row_address{};
capability F_parm_up_cursor; capability F_parm_up_cursor{};
capability F_parm_down_cursor; capability F_parm_down_cursor{};
capability F_parm_left_cursor; capability F_parm_left_cursor{};
capability F_parm_right_cursor; capability F_parm_right_cursor{};
capability F_erase_chars; capability F_erase_chars{};
capability F_repeat_char; capability F_repeat_char{};
capability F_clr_bol; capability F_clr_bol{};
capability F_clr_eol; capability F_clr_eol{};
bool automatic_left_margin; bool automatic_left_margin{false};
bool eat_nl_glitch; bool eat_nl_glitch{false};
char move_buf[BUF_SIZE]; char move_buf[BUF_SIZE]{};
int char_duration; int char_duration{1};
int baudrate; int baudrate{9600};
int tabstop; int tabstop{0};
std::size_t screen_width; std::size_t screen_width{80};
std::size_t screen_height; std::size_t screen_height{24};
}; };
#pragma pack(pop) #pragma pack(pop)

View File

@ -52,7 +52,7 @@ class FPoint
{ {
public: public:
// Constructors // Constructors
FPoint (); FPoint () = default;
FPoint (const FPoint&); // copy constructor FPoint (const FPoint&); // copy constructor
FPoint (int, int); FPoint (int, int);
@ -89,19 +89,13 @@ class FPoint
private: private:
// Data Members // Data Members
int xpos; int xpos{0};
int ypos; int ypos{0};
}; };
#pragma pack(pop) #pragma pack(pop)
// FPoint inline functions // FPoint inline functions
//----------------------------------------------------------------------
inline FPoint::FPoint()
: xpos(0)
, ypos(0)
{ }
//---------------------------------------------------------------------- //----------------------------------------------------------------------
inline FPoint::FPoint (const FPoint& p) // copy constructor inline FPoint::FPoint (const FPoint& p) // copy constructor
: xpos(p.xpos) : xpos(p.xpos)

View File

@ -104,8 +104,8 @@ class FProgressbar : public FWidget
void drawBar(); void drawBar();
// Data Members // Data Members
std::size_t percentage; std::size_t percentage{NOT_SET};
std::size_t bar_length; std::size_t bar_length{getWidth()};
}; };
#pragma pack(pop) #pragma pack(pop)

View File

@ -52,7 +52,7 @@ class FRect
{ {
public: public:
// Constructors // Constructors
FRect (); FRect () = default;
FRect (const FRect&); // copy constructor FRect (const FRect&); // copy constructor
FRect (int, int, std::size_t, std::size_t); FRect (int, int, std::size_t, std::size_t);
FRect (const FPoint&, const FPoint&); FRect (const FPoint&, const FPoint&);
@ -124,23 +124,15 @@ class FRect
private: private:
// Data Members // Data Members
int X1; int X1{0};
int Y1; int Y1{0};
int X2; int X2{-1};
int Y2; int Y2{-1};
}; };
#pragma pack(pop) #pragma pack(pop)
// FRect inline functions // FRect inline functions
//----------------------------------------------------------------------
inline FRect::FRect()
: X1(0)
, Y1(0)
, X2(-1)
, Y2(-1)
{ }
//---------------------------------------------------------------------- //----------------------------------------------------------------------
inline FRect::FRect (const FRect& r) // copy constructor inline FRect::FRect (const FRect& r) // copy constructor
: X1(r.X1) : X1(r.X1)

View File

@ -141,24 +141,24 @@ class FScrollbar : public FWidget
void processScroll(); void processScroll();
// Data Members // Data Members
sType scroll_type; sType scroll_type{FScrollbar::noScroll};
bool threshold_reached; bool threshold_reached{false};
int threshold_time; int threshold_time{500};
int repeat_time; int repeat_time{10};
int slider_click_pos; int slider_click_pos{-1};
int slider_click_stop_pos; int slider_click_stop_pos{-1};
int current_slider_pos; int current_slider_pos{-1};
int slider_pos; int slider_pos{0};
std::size_t slider_length; std::size_t slider_length{18}; // = bar_length
std::size_t bar_length; std::size_t bar_length{18}; // = length - 2
int val; int val{0};
int min; int min{0};
int max; int max{99};
double steps; double steps{1};
int pagesize; int pagesize{0};
std::size_t length; std::size_t length{20};
int bar_orientation; int bar_orientation{fc::vertical};
int max_color; int max_color{getMaxColor()};
}; };
#pragma pack(pop) #pragma pack(pop)

View File

@ -176,17 +176,17 @@ class FScrollView : public FWidget
void cb_HBarChange (FWidget*, data_ptr); void cb_HBarChange (FWidget*, data_ptr);
// Data Members // Data Members
FRect scroll_geometry; FRect scroll_geometry{1, 1, 1, 1};
FRect viewport_geometry; FRect viewport_geometry{};
term_area* viewport; // virtual scroll content term_area* viewport{0}; // virtual scroll content
FScrollbar* vbar; FScrollbar* vbar{0};
FScrollbar* hbar; FScrollbar* hbar{0};
uInt8 nf_offset; uInt8 nf_offset{0};
bool border; bool border{true};
bool use_own_print_area; bool use_own_print_area{false};
bool update_scrollbar; bool update_scrollbar{true};
fc::scrollBarMode vMode; // fc:Auto, fc::Hidden or fc::Scroll fc::scrollBarMode vMode{fc::Auto}; // fc:Auto, fc::Hidden or fc::Scroll
fc::scrollBarMode hMode; fc::scrollBarMode hMode{fc::Auto};
}; };
#pragma pack(pop) #pragma pack(pop)

View File

@ -124,11 +124,11 @@ class FStatusKey : public FWidget
friend class FStatusBar; friend class FStatusBar;
// Data Members // Data Members
FKey key; FKey key{0};
FString text; FString text{};
bool active; bool active{false};
bool mouse_focus; bool mouse_focus{false};
FStatusBar* bar; FStatusBar* bar{0};
}; };
#pragma pack(pop) #pragma pack(pop)
@ -250,13 +250,13 @@ class FStatusBar : public FWindow
void drawActiveKey (keyList::const_iterator); void drawActiveKey (keyList::const_iterator);
// Data Members // Data Members
keyList key_list; keyList key_list{};
FString text; FString text{""};
bool mouse_down; bool mouse_down{};
std::size_t screenWidth; std::size_t screenWidth{80};
int keyname_len; int keyname_len{0};
int x; int x{-1};
int x_msg; int x_msg{-1};
}; };
#pragma pack(pop) #pragma pack(pop)

View File

@ -82,7 +82,7 @@ class FString
typedef const wchar_t* iterator; typedef const wchar_t* iterator;
// Constructors // Constructors
FString (); FString () = default;
explicit FString (int); explicit FString (int);
explicit FString (std::size_t); explicit FString (std::size_t);
FString (std::size_t, wchar_t); FString (std::size_t, wchar_t);
@ -276,10 +276,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; wchar_t* string{0};
std::size_t length; std::size_t length{0};
std::size_t bufsize; std::size_t bufsize{0};
mutable char* c_string; mutable char* c_string{0};
}; };
#pragma pack(pop) #pragma pack(pop)

View File

@ -104,8 +104,8 @@ class FSwitch : public FToggleButton
void drawUnchecked(); void drawUnchecked();
// Data Members // Data Members
std::size_t switch_offset_pos; std::size_t switch_offset_pos{0};
bool button_pressed; bool button_pressed{false};
}; };
#pragma pack(pop) #pragma pack(pop)

View File

@ -59,7 +59,7 @@ class FTermBuffer
typedef FOptiAttr::charData charData; typedef FOptiAttr::charData charData;
// Constructor // Constructor
FTermBuffer(); FTermBuffer() = default;
// Destructor // Destructor
virtual ~FTermBuffer(); virtual ~FTermBuffer();
@ -87,7 +87,7 @@ class FTermBuffer
std::vector<charData> getBuffer(); std::vector<charData> getBuffer();
private: private:
std::vector<charData> data; std::vector<charData> data{};
}; };
#pragma pack(pop) #pragma pack(pop)

View File

@ -87,10 +87,10 @@ class FTermcap
tcap_map; tcap_map;
// Constructors // Constructors
FTermcap(); FTermcap() = default;
// Destructor // Destructor
~FTermcap(); ~FTermcap() = default;
// Accessors // Accessors
const char* getClassName() const; const char* getClassName() const;

View File

@ -128,31 +128,31 @@ class FTermData
FTermData& operator = (const FTermData&); FTermData& operator = (const FTermData&);
// Data Members // Data Members
encodingMap encoding_list; encodingMap encoding_list{};
fc::encoding term_encoding; fc::encoding term_encoding{fc::UNKNOWN};
FRect term_geometry; // current terminal geometry FRect term_geometry{}; // current terminal geometry
int fd_tty; int fd_tty{-1}; // Teletype (tty) file descriptor is still undefined
uInt baudrate; uInt baudrate{0};
bool shadow_character; bool shadow_character{true};
bool half_block_character; bool half_block_character{true};
bool cursor_optimisation; bool cursor_optimisation{true};
bool hidden_cursor; bool hidden_cursor{false}; // Global cursor hidden state
bool use_alternate_screen; bool use_alternate_screen{true};
bool ascii_console; bool ascii_console{false};
bool vt100_console; bool vt100_console{false};
bool utf8_console; bool utf8_console{false};
bool utf8_state; bool utf8_state{false};
bool new_font; bool new_font{false};
bool vga_font; bool vga_font{false};
bool monochron; bool monochron{false};
bool resize_term; bool resize_term{false};
char termtype[256]; char termtype[256]{};
char termfilename[256]; char termfilename[256]{};
FString xterm_font; FString xterm_font{};
FString xterm_title; FString xterm_title{};
#if DEBUG #if DEBUG
int framebuffer_bpp; int framebuffer_bpp{-1};
#endif #endif
}; };
#pragma pack(pop) #pragma pack(pop)
@ -160,31 +160,6 @@ class FTermData
// FTermData inline functions // FTermData inline functions
//---------------------------------------------------------------------- //----------------------------------------------------------------------
inline FTermData::FTermData() inline FTermData::FTermData()
: encoding_list()
, term_encoding(fc::UNKNOWN)
, term_geometry()
, fd_tty(-1) // Teletype (tty) file descriptor is still undefined
, baudrate(0)
, shadow_character(true)
, half_block_character(true)
, cursor_optimisation(true)
, hidden_cursor(false) // Global cursor hidden state
, use_alternate_screen(true)
, ascii_console(false)
, vt100_console(false)
, utf8_console(false)
, utf8_state(false)
, new_font(false)
, vga_font(false)
, monochron(false)
, resize_term(false)
, termtype()
, termfilename()
, xterm_font()
, xterm_title()
#if DEBUG
, framebuffer_bpp(-1)
#endif
{ {
// Initialize arrays with '\0' // Initialize arrays with '\0'
std::fill_n (termtype, sizeof(termtype), '\0'); std::fill_n (termtype, sizeof(termtype), '\0');

View File

@ -47,10 +47,10 @@ class FTermDebugData
{ {
public: public:
// Constructors // Constructors
FTermDebugData(); FTermDebugData() = default;
// Destructor // Destructor
~FTermDebugData(); ~FTermDebugData() = default;
// Accessors // Accessors
const FString& getAnswerbackString(); const FString& getAnswerbackString();
@ -73,21 +73,11 @@ class FTermDebugData
FTermDebugData& operator = (const FTermDebugData&); FTermDebugData& operator = (const FTermDebugData&);
// Data Members // Data Members
FTermDetection* term_detection; FTermDetection* term_detection{0};
FTermData* data; FTermData* data{0};
}; };
// FTermDebugData inline functions // FTermDebugData inline functions
//----------------------------------------------------------------------
inline FTermDebugData::FTermDebugData()
: term_detection(0)
, data(0)
{ }
//----------------------------------------------------------------------
inline FTermDebugData::~FTermDebugData()
{ }
//---------------------------------------------------------------------- //----------------------------------------------------------------------
inline void FTermDebugData::setFTermDetection (FTermDetection* obj) inline void FTermDebugData::setFTermDetection (FTermDetection* obj)
{ term_detection = obj; } { term_detection = obj; }

View File

@ -63,10 +63,10 @@ class FTermFreeBSD
typedef fc::freebsdConsoleCursorStyle CursorStyle; typedef fc::freebsdConsoleCursorStyle CursorStyle;
// Constructors // Constructors
FTermFreeBSD(); FTermFreeBSD() = default;
// Destructor // Destructor
virtual ~FTermFreeBSD(); virtual ~FTermFreeBSD() = default;
// Accessors // Accessors
const char* getClassName() const; const char* getClassName() const;

View File

@ -70,7 +70,7 @@ class FTermLinux
{ {
public: public:
// Constructors // Constructors
FTermLinux(); FTermLinux() = default;
// Destructor // Destructor
virtual ~FTermLinux(); virtual ~FTermLinux();

View File

@ -56,10 +56,10 @@ class FTermOpenBSD
{ {
public: public:
// Constructors // Constructors
FTermOpenBSD(); FTermOpenBSD() = default;
// Destructor // Destructor
virtual ~FTermOpenBSD(); virtual ~FTermOpenBSD() = default;
// Accessor // Accessor
const char* getClassName() const; const char* getClassName() const;

View File

@ -146,14 +146,14 @@ class FTextView : public FWidget
void cb_HBarChange (FWidget*, data_ptr); void cb_HBarChange (FWidget*, data_ptr);
// Data Members // Data Members
FStringList data; FStringList data{};
FScrollbar* vbar; FScrollbar* vbar{0};
FScrollbar* hbar; FScrollbar* hbar{0};
bool update_scrollbar; bool update_scrollbar{true};
int xoffset; int xoffset{0};
int yoffset; int yoffset{0};
int nf_offset; int nf_offset{0};
std::size_t maxLineWidth; std::size_t maxLineWidth{0};
}; };
#pragma pack(pop) #pragma pack(pop)

View File

@ -138,9 +138,9 @@ class FToggleButton : public FWidget
virtual void onKeyPress (FKeyEvent*); virtual void onKeyPress (FKeyEvent*);
// Data Members // Data Members
bool checked; bool checked{false};
std::size_t label_offset_pos; std::size_t label_offset_pos{0};
std::size_t button_width; // plus margin spaces std::size_t button_width{0}; // plus margin spaces
private: private:
// Constants // Constants
@ -164,9 +164,9 @@ class FToggleButton : public FWidget
friend class FButtonGroup; friend class FButtonGroup;
// Data Members // Data Members
FButtonGroup* button_group; FButtonGroup* button_group{0};
bool focus_inside_group; bool focus_inside_group{true};
FString text; FString text{};
}; };
#pragma pack(pop) #pragma pack(pop)

View File

@ -109,11 +109,11 @@ class FToolTip : public FWindow
virtual void adjustSize(); virtual void adjustSize();
// Data Members // Data Members
FString text; FString text{};
FString* text_components; FString* text_components{0};
FStringList text_split; FStringList text_split{};
std::size_t max_line_width; std::size_t max_line_width{0};
std::size_t text_num_lines; std::size_t text_num_lines{0};
}; };
#pragma pack(pop) #pragma pack(pop)

View File

@ -426,9 +426,9 @@ class FVTerm
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; // print area for this object term_area* print_area{0}; // print area for this object
term_area* child_print_area; // print area for children term_area* child_print_area{0}; // print area for children
term_area* vwin; // virtual window term_area* vwin{0}; // virtual window
private: private:
// Typedef and Enumeration // Typedef and Enumeration
@ -528,46 +528,26 @@ class FVTerm
struct FVTerm::term_area // define virtual terminal character properties struct FVTerm::term_area // define virtual terminal character properties
{ {
public: public:
term_area() term_area() = default;
: offset_left (0) ~term_area() = default;
, offset_top (0)
, width (-1)
, height (-1)
, right_shadow (0)
, bottom_shadow (0)
, cursor_x (0)
, cursor_y (0)
, input_cursor_x (-1)
, input_cursor_y (-1)
, widget()
, preprocessing_call()
, changes (0)
, text (0)
, input_cursor_visible (false)
, has_changes (false)
, visible (false)
{ }
~term_area() int offset_left{0}; // Distance from left terminal side
{ } int offset_top{0}; // Distance from top of the terminal
int width{-1}; // Window width
int offset_left; // Distance from left terminal side int height{-1}; // Window height
int offset_top; // Distance from top of the terminal int right_shadow{0}; // Right window shadow
int width; // Window width int bottom_shadow{0}; // Bottom window shadow
int height; // Window height int cursor_x{0}; // X-position for the next write operation
int right_shadow; // Right window shadow int cursor_y{0}; // Y-position for the next write operation
int bottom_shadow; // Bottom window shadow int input_cursor_x{-1}; // X-position input cursor
int cursor_x; // X-position for the next write operation int input_cursor_y{-1}; // Y-position input cursor
int cursor_y; // Y-position for the next write operation FWidget* widget{}; // Widget that owns this term_area
int input_cursor_x; // X-position input cursor FPreprocessing preprocessing_call{};
int input_cursor_y; // Y-position input cursor line_changes* changes{0};
FWidget* widget; // Widget that owns this term_area charData* text{0}; // Text data for the output
FPreprocessing preprocessing_call; bool input_cursor_visible{false};
line_changes* changes; bool has_changes{false};
charData* text; // Text data for the output bool visible{false};
bool input_cursor_visible;
bool has_changes;
bool visible;
private: private:
// Disable copy constructor // Disable copy constructor

View File

@ -334,7 +334,7 @@ class FWidget : public FVTerm, public FObject
// Data Members // Data Members
static widgetList* window_list; static widgetList* window_list;
Accelerators* accelerator_list; Accelerators* accelerator_list{0};
protected: protected:
struct callback_data struct callback_data
@ -396,14 +396,14 @@ class FWidget : public FVTerm, public FObject
virtual void onClose (FCloseEvent*); virtual void onClose (FCloseEvent*);
// Data Members // Data Members
struct widget_flags flags; struct widget_flags flags{};
static uInt modal_dialogs; static uInt modal_dialogs;
static FWidgetColors wc; static FWidgetColors wc;
static widgetList* dialog_list; static widgetList* dialog_list;
static widgetList* always_on_top_list; static widgetList* always_on_top_list;
static widgetList* close_widget; static widgetList* close_widget;
CallbackObjects callback_objects; CallbackObjects callback_objects{};
MemberCallbackObjects member_callback_objects; MemberCallbackObjects member_callback_objects{};
private: private:
// Disable copy constructor // Disable copy constructor
@ -430,19 +430,12 @@ class FWidget : public FVTerm, public FObject
static void setColorTheme(); static void setColorTheme();
// Data Members // Data Members
FPoint widget_cursor_position; FPoint widget_cursor_position{-1, -1};
struct widget_size_hints struct widget_size_hints
{ {
widget_size_hints() widget_size_hints() = default;
: min_width (0) ~widget_size_hints() = default;
, min_height (0)
, max_width (INT_MAX)
, max_height (INT_MAX)
{ }
~widget_size_hints()
{ }
void setMinimum (std::size_t w, std::size_t h) void setMinimum (std::size_t w, std::size_t h)
{ {
@ -456,60 +449,54 @@ class FWidget : public FVTerm, public FObject
max_height = h; max_height = h;
} }
std::size_t min_width; std::size_t min_width{0};
std::size_t min_height; std::size_t min_height{0};
std::size_t max_width; std::size_t max_width{INT_MAX};
std::size_t max_height; std::size_t max_height{INT_MAX};
} size_hints; } size_hints{};
struct dbl_line_mask struct dbl_line_mask
{ {
dbl_line_mask() : top(), right(), bottom(), left() dbl_line_mask() = default;
{ } ~dbl_line_mask() = default;
~dbl_line_mask() std::vector<bool> top{};
{ } std::vector<bool> right{};
std::vector<bool> bottom{};
std::vector<bool> top; std::vector<bool> left{};
std::vector<bool> right; } double_flatline_mask{};
std::vector<bool> bottom;
std::vector<bool> left;
} double_flatline_mask;
struct widget_padding struct widget_padding
{ {
widget_padding() : top(0), left(0), bottom(0), right(0) widget_padding() = default;
{ } ~widget_padding() = default;
~widget_padding() int top{0};
{ } int left{0};
int bottom{0};
int right{0};
} padding{};
int top; bool ignore_padding{false};
int left;
int bottom;
int right;
} padding;
bool ignore_padding;
// widget size // widget size
FRect wsize; FRect wsize{1, 1, 1, 1};
FRect adjust_wsize; FRect adjust_wsize{1, 1, 1, 1};
FRect adjust_wsize_term; FRect adjust_wsize_term{};
FRect adjust_wsize_shadow; FRect adjust_wsize_shadow{};
FRect adjust_wsize_term_shadow; FRect adjust_wsize_term_shadow{};
// widget offset // widget offset
FRect offset; FRect offset{};
// offset of the widget client area // offset of the widget client area
FRect client_offset; FRect client_offset{};
// widget shadow size (on the right and bottom side) // widget shadow size (on the right and bottom side)
FPoint wshadow; FPoint wshadow{0, 0};
// default widget foreground and background color // default widget foreground and background color
FColor foreground_color; FColor foreground_color{fc::Default};
FColor background_color; FColor background_color{fc::Default};
FString statusbar_message; FString statusbar_message{};
static FStatusBar* statusbar; static FStatusBar* statusbar;
static FMenuBar* menubar; static FMenuBar* menubar;
static FWidget* main_widget; static FWidget* main_widget;

View File

@ -55,90 +55,90 @@ class FWidgetColors
void set16ColorTheme(); void set16ColorTheme();
// Data Members // Data Members
FColor term_fg; FColor term_fg{fc::Default};
FColor term_bg; FColor term_bg{fc::Default};
FColor list_fg; FColor list_fg{fc::Default};
FColor list_bg; FColor list_bg{fc::Default};
FColor selected_list_fg; FColor selected_list_fg{fc::Default};
FColor selected_list_bg; FColor selected_list_bg{fc::Default};
FColor current_element_focus_fg; FColor current_element_focus_fg{fc::Default};
FColor current_element_focus_bg; FColor current_element_focus_bg{fc::Default};
FColor current_element_fg; FColor current_element_fg{fc::Default};
FColor current_element_bg; FColor current_element_bg{fc::Default};
FColor current_inc_search_element_fg; FColor current_inc_search_element_fg{fc::Default};
FColor selected_current_element_focus_fg; FColor selected_current_element_focus_fg{fc::Default};
FColor selected_current_element_focus_bg; FColor selected_current_element_focus_bg{fc::Default};
FColor selected_current_element_fg; FColor selected_current_element_fg{fc::Default};
FColor selected_current_element_bg; FColor selected_current_element_bg{fc::Default};
FColor label_fg; FColor label_fg{fc::Default};
FColor label_bg; FColor label_bg{fc::Default};
FColor label_inactive_fg; FColor label_inactive_fg{fc::Default};
FColor label_inactive_bg; FColor label_inactive_bg{fc::Default};
FColor label_hotkey_fg; FColor label_hotkey_fg{fc::Default};
FColor label_hotkey_bg; FColor label_hotkey_bg{fc::Default};
FColor label_emphasis_fg; FColor label_emphasis_fg{fc::Default};
FColor label_ellipsis_fg; FColor label_ellipsis_fg{fc::Default};
FColor inputfield_active_focus_fg; FColor inputfield_active_focus_fg{fc::Default};
FColor inputfield_active_focus_bg; FColor inputfield_active_focus_bg{fc::Default};
FColor inputfield_active_fg; FColor inputfield_active_fg{fc::Default};
FColor inputfield_active_bg; FColor inputfield_active_bg{fc::Default};
FColor inputfield_inactive_fg; FColor inputfield_inactive_fg{fc::Default};
FColor inputfield_inactive_bg; FColor inputfield_inactive_bg{fc::Default};
FColor dialog_fg; FColor dialog_fg{fc::Default};
FColor dialog_resize_fg; FColor dialog_resize_fg{fc::Default};
FColor dialog_emphasis_fg; FColor dialog_emphasis_fg{fc::Default};
FColor dialog_bg; FColor dialog_bg{fc::Default};
FColor error_box_fg; FColor error_box_fg{fc::Default};
FColor error_box_emphasis_fg; FColor error_box_emphasis_fg{fc::Default};
FColor error_box_bg; FColor error_box_bg{fc::Default};
FColor tooltip_fg; FColor tooltip_fg{fc::Default};
FColor tooltip_bg; FColor tooltip_bg{fc::Default};
FColor shadow_fg; FColor shadow_fg{fc::Default};
FColor shadow_bg; FColor shadow_bg{fc::Default};
FColor toggle_button_active_focus_fg; FColor toggle_button_active_focus_fg{fc::Default};
FColor toggle_button_active_focus_bg; FColor toggle_button_active_focus_bg{fc::Default};
FColor toggle_button_active_fg; FColor toggle_button_active_fg{fc::Default};
FColor toggle_button_active_bg; FColor toggle_button_active_bg{fc::Default};
FColor toggle_button_inactive_fg; FColor toggle_button_inactive_fg{fc::Default};
FColor toggle_button_inactive_bg; FColor toggle_button_inactive_bg{fc::Default};
FColor button_active_focus_fg; FColor button_active_focus_fg{fc::Default};
FColor button_active_focus_bg; FColor button_active_focus_bg{fc::Default};
FColor button_active_fg; FColor button_active_fg{fc::Default};
FColor button_active_bg; FColor button_active_bg{fc::Default};
FColor button_inactive_fg; FColor button_inactive_fg{fc::Default};
FColor button_inactive_bg; FColor button_inactive_bg{fc::Default};
FColor button_hotkey_fg; FColor button_hotkey_fg{fc::Default};
FColor titlebar_active_fg; FColor titlebar_active_fg{fc::Default};
FColor titlebar_active_bg; FColor titlebar_active_bg{fc::Default};
FColor titlebar_inactive_fg; FColor titlebar_inactive_fg{fc::Default};
FColor titlebar_inactive_bg; FColor titlebar_inactive_bg{fc::Default};
FColor titlebar_button_fg; FColor titlebar_button_fg{fc::Default};
FColor titlebar_button_bg; FColor titlebar_button_bg{fc::Default};
FColor titlebar_button_focus_fg; FColor titlebar_button_focus_fg{fc::Default};
FColor titlebar_button_focus_bg; FColor titlebar_button_focus_bg{fc::Default};
FColor menu_active_focus_fg; FColor menu_active_focus_fg{fc::Default};
FColor menu_active_focus_bg; FColor menu_active_focus_bg{fc::Default};
FColor menu_active_fg; FColor menu_active_fg{fc::Default};
FColor menu_active_bg; FColor menu_active_bg{fc::Default};
FColor menu_inactive_fg; FColor menu_inactive_fg{fc::Default};
FColor menu_inactive_bg; FColor menu_inactive_bg{fc::Default};
FColor menu_hotkey_fg; FColor menu_hotkey_fg{fc::Default};
FColor menu_hotkey_bg; FColor menu_hotkey_bg{fc::Default};
FColor statusbar_fg; FColor statusbar_fg{fc::Default};
FColor statusbar_bg; FColor statusbar_bg{fc::Default};
FColor statusbar_hotkey_fg; FColor statusbar_hotkey_fg{fc::Default};
FColor statusbar_hotkey_bg; FColor statusbar_hotkey_bg{fc::Default};
FColor statusbar_separator_fg; FColor statusbar_separator_fg{fc::Default};
FColor statusbar_active_fg; FColor statusbar_active_fg{fc::Default};
FColor statusbar_active_bg; FColor statusbar_active_bg{fc::Default};
FColor statusbar_active_hotkey_fg; FColor statusbar_active_hotkey_fg{fc::Default};
FColor statusbar_active_hotkey_bg; FColor statusbar_active_hotkey_bg{fc::Default};
FColor scrollbar_fg; FColor scrollbar_fg{fc::Default};
FColor scrollbar_bg; FColor scrollbar_bg{fc::Default};
FColor scrollbar_button_fg; FColor scrollbar_button_fg{fc::Default};
FColor scrollbar_button_bg; FColor scrollbar_button_bg{fc::Default};
FColor progressbar_fg; FColor progressbar_fg{fc::Default};
FColor progressbar_bg; FColor progressbar_bg{fc::Default};
}; };
#pragma pack(pop) #pragma pack(pop)

Some files were not shown because too many files have changed in this diff Show More