Use delegated constructors and in-class default member initializers
This commit is contained in:
parent
4046f05a0c
commit
3537152c28
|
@ -1,5 +1,9 @@
|
|||
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
|
||||
|
||||
2018-11-27 Markus Gans <guru.mail@muenster.de>
|
||||
|
|
|
@ -27,7 +27,7 @@ int main (int argc, char* argv[])
|
|||
}
|
||||
```
|
||||
*(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
|
||||
|
|
|
@ -29,7 +29,7 @@ endif
|
|||
all: $(OBJS)
|
||||
|
||||
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:
|
||||
$(MAKE) $(MAKEFILE) PROFILE="-pg"
|
||||
|
|
|
@ -53,14 +53,13 @@ class Button : public finalcut::FButton
|
|||
|
||||
private:
|
||||
// Data Member
|
||||
bool checked;
|
||||
bool checked{false};
|
||||
};
|
||||
#pragma pack(pop)
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
Button::Button (finalcut::FWidget* parent)
|
||||
: finalcut::FButton(parent)
|
||||
, checked(false)
|
||||
{ }
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
@ -217,17 +216,18 @@ class Calc : public finalcut::FDialog
|
|||
void mapKeyFunctions();
|
||||
|
||||
// Data Members
|
||||
bool error;
|
||||
bool arcus_mode;
|
||||
bool hyperbolic_mode;
|
||||
lDouble a, b;
|
||||
lDouble infinity;
|
||||
uInt max_char;
|
||||
int last_key;
|
||||
char infix_operator;
|
||||
char last_infix_operator;
|
||||
finalcut::FString input;
|
||||
int button_no[Calc::NUM_OF_BUTTONS];
|
||||
bool error{false};
|
||||
bool arcus_mode{false};
|
||||
bool hyperbolic_mode{false};
|
||||
lDouble a{0.0L};
|
||||
lDouble b{0.0L};
|
||||
lDouble infinity{std::numeric_limits<lDouble>::infinity()};
|
||||
uInt max_char{33};
|
||||
int last_key{-1};
|
||||
char infix_operator{'\0'};
|
||||
char last_infix_operator{'\0'};
|
||||
finalcut::FString input{""};
|
||||
int button_no[Calc::NUM_OF_BUTTONS]{};
|
||||
|
||||
struct stack_data
|
||||
{
|
||||
|
@ -235,29 +235,15 @@ class Calc : public finalcut::FDialog
|
|||
char infix_operator;
|
||||
};
|
||||
|
||||
std::stack<stack_data> bracket_stack;
|
||||
std::map<Calc::button, Button*> calculator_buttons;
|
||||
std::map<Calc::button, keyFunction> key_map;
|
||||
std::stack<stack_data> bracket_stack{};
|
||||
std::map<Calc::button, Button*> calculator_buttons{};
|
||||
std::map<Calc::button, keyFunction> key_map{};
|
||||
};
|
||||
#pragma pack(pop)
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
Calc::Calc (FWidget* 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();
|
||||
clearInfixOperator();
|
||||
|
|
|
@ -60,16 +60,14 @@ class CheckList : public finalcut::FDialog
|
|||
void cb_showList (finalcut::FWidget*, data_ptr);
|
||||
|
||||
// Data Members
|
||||
finalcut::FListView listView;
|
||||
finalcut::FStatusBar status_bar;
|
||||
finalcut::FListView listView{this};
|
||||
finalcut::FStatusBar status_bar{this};
|
||||
};
|
||||
#pragma pack(pop)
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
CheckList::CheckList (finalcut::FWidget* parent)
|
||||
: finalcut::FDialog(parent)
|
||||
, listView(this)
|
||||
, status_bar(this)
|
||||
{
|
||||
setText (L"Shopping list");
|
||||
setShadow();
|
||||
|
|
|
@ -91,22 +91,17 @@ class Listbox : public finalcut::FDialog
|
|||
virtual void onClose (finalcut::FCloseEvent*);
|
||||
|
||||
// Data Member
|
||||
std::list<double> double_list;
|
||||
finalcut::FListBox list1;
|
||||
finalcut::FListBox list2;
|
||||
finalcut::FListBox list3;
|
||||
finalcut::FButton Quit;
|
||||
std::list<double> double_list{};
|
||||
finalcut::FListBox list1{this};
|
||||
finalcut::FListBox list2{this};
|
||||
finalcut::FListBox list3{this};
|
||||
finalcut::FButton Quit{this};
|
||||
};
|
||||
#pragma pack(pop)
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
Listbox::Listbox (finalcut::FWidget* parent)
|
||||
: finalcut::FDialog(parent)
|
||||
, double_list()
|
||||
, list1(this)
|
||||
, list2(this)
|
||||
, list3(this)
|
||||
, Quit(this)
|
||||
{
|
||||
temp_str = new finalcut::FString;
|
||||
|
||||
|
|
|
@ -59,16 +59,14 @@ class Listview : public finalcut::FDialog
|
|||
void cb_showInMessagebox (finalcut::FWidget*, data_ptr);
|
||||
|
||||
// Data Members
|
||||
finalcut::FListView listView;
|
||||
finalcut::FButton Quit;
|
||||
finalcut::FListView listView{this};
|
||||
finalcut::FButton Quit{this};
|
||||
};
|
||||
#pragma pack(pop)
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
Listview::Listview (finalcut::FWidget* parent)
|
||||
: finalcut::FDialog(parent)
|
||||
, listView(this)
|
||||
, Quit(this)
|
||||
{
|
||||
// Set FListView geometry
|
||||
listView.setGeometry(2, 1, 33, 14);
|
||||
|
|
|
@ -63,110 +63,61 @@ class Menu : public finalcut::FDialog
|
|||
void cb_message (finalcut::FWidget*, data_ptr);
|
||||
|
||||
// Data Members
|
||||
finalcut::FString line;
|
||||
finalcut::FMenuBar Menubar;
|
||||
finalcut::FMenu File;
|
||||
finalcut::FMenu Edit;
|
||||
finalcut::FMenu Choice;
|
||||
finalcut::FMenuItem Window;
|
||||
finalcut::FMenuItem Help;
|
||||
finalcut::FMenuItem New;
|
||||
finalcut::FMenuItem Open;
|
||||
finalcut::FMenuItem Save;
|
||||
finalcut::FMenuItem SaveAs;
|
||||
finalcut::FMenuItem Close;
|
||||
finalcut::FMenuItem Line1;
|
||||
finalcut::FMenuItem Print;
|
||||
finalcut::FMenuItem Line2;
|
||||
finalcut::FMenuItem Quit;
|
||||
finalcut::FMenuItem Undo;
|
||||
finalcut::FMenuItem Redo;
|
||||
finalcut::FMenuItem Line3;
|
||||
finalcut::FMenuItem Cut;
|
||||
finalcut::FMenuItem Copy;
|
||||
finalcut::FMenuItem Paste;
|
||||
finalcut::FMenuItem Line4;
|
||||
finalcut::FMenuItem Search;
|
||||
finalcut::FMenuItem Next;
|
||||
finalcut::FMenuItem Line5;
|
||||
finalcut::FMenuItem SelectAll;
|
||||
finalcut::FMenu Color;
|
||||
finalcut::FMenu Style;
|
||||
finalcut::FMenu Border;
|
||||
finalcut::FRadioMenuItem Color1;
|
||||
finalcut::FRadioMenuItem Color2;
|
||||
finalcut::FRadioMenuItem Color3;
|
||||
finalcut::FRadioMenuItem Color4;
|
||||
finalcut::FRadioMenuItem Color5;
|
||||
finalcut::FCheckMenuItem Bold;
|
||||
finalcut::FCheckMenuItem Italic;
|
||||
finalcut::FMenu BColor;
|
||||
finalcut::FMenu BStyle;
|
||||
finalcut::FRadioMenuItem BColor1;
|
||||
finalcut::FRadioMenuItem BColor2;
|
||||
finalcut::FRadioMenuItem BStyle1;
|
||||
finalcut::FRadioMenuItem BStyle2;
|
||||
finalcut::FRadioMenuItem BStyle3;
|
||||
finalcut::FRadioMenuItem BStyle4;
|
||||
finalcut::FStatusBar Statusbar;
|
||||
finalcut::FLabel Headline1;
|
||||
finalcut::FLabel Headline2;
|
||||
finalcut::FLabel Info;
|
||||
finalcut::FString line{13, wchar_t(finalcut::fc::BoxDrawingsHorizontal)};
|
||||
finalcut::FMenuBar Menubar{this};
|
||||
finalcut::FMenu File{"&File", &Menubar};
|
||||
finalcut::FMenu Edit{"&Edit", &Menubar};
|
||||
finalcut::FMenu Choice{"&Choice", &Menubar};
|
||||
finalcut::FMenuItem Window{"&Window", &Menubar};
|
||||
finalcut::FMenuItem Help{"&Help", &Menubar};
|
||||
finalcut::FMenuItem New{"&New", &File};
|
||||
finalcut::FMenuItem Open{"&Open...", &File};
|
||||
finalcut::FMenuItem Save{"&Save", &File};
|
||||
finalcut::FMenuItem SaveAs{"&Save as...", &File};
|
||||
finalcut::FMenuItem Close{"&Close", &File};
|
||||
finalcut::FMenuItem Line1{&File};
|
||||
finalcut::FMenuItem Print{"&Print", &File};
|
||||
finalcut::FMenuItem Line2{&File};
|
||||
finalcut::FMenuItem Quit{"&Quit", &File};
|
||||
finalcut::FMenuItem Undo{finalcut::fc::Fckey_z, "&Undo", &Edit};
|
||||
finalcut::FMenuItem Redo{finalcut::fc::Fckey_y, "&Redo", &Edit};
|
||||
finalcut::FMenuItem Line3{&Edit};
|
||||
finalcut::FMenuItem Cut{finalcut::fc::Fckey_x, "Cu&t", &Edit};
|
||||
finalcut::FMenuItem Copy{finalcut::fc::Fckey_c, "&Copy", &Edit};
|
||||
finalcut::FMenuItem Paste{finalcut::fc::Fckey_v, "&Paste", &Edit};
|
||||
finalcut::FMenuItem Line4{&Edit};
|
||||
finalcut::FMenuItem Search{finalcut::fc::Fckey_f, "&Search", &Edit};
|
||||
finalcut::FMenuItem Next{finalcut::fc::Fkey_f3, "Search &next", &Edit};
|
||||
finalcut::FMenuItem Line5{&Edit};
|
||||
finalcut::FMenuItem SelectAll{finalcut::fc::Fckey_a, "Select &all", &Edit};
|
||||
finalcut::FMenu Color{"&Color", &Choice};
|
||||
finalcut::FMenu Style{"&Style", &Choice};
|
||||
finalcut::FMenu Border{"&Border", &Choice};
|
||||
finalcut::FRadioMenuItem Color1{"Red", &Color};
|
||||
finalcut::FRadioMenuItem Color2{"Green", &Color};
|
||||
finalcut::FRadioMenuItem Color3{"Yellow", &Color};
|
||||
finalcut::FRadioMenuItem Color4{"Brue", &Color};
|
||||
finalcut::FRadioMenuItem Color5{"Black", &Color};
|
||||
finalcut::FCheckMenuItem Bold{"Bold", &Style};
|
||||
finalcut::FCheckMenuItem Italic{"Italic", &Style};
|
||||
finalcut::FMenu BColor{"&Color", &Border};
|
||||
finalcut::FMenu BStyle{"&Style", &Border};
|
||||
finalcut::FRadioMenuItem BColor1{"Red", &BColor};
|
||||
finalcut::FRadioMenuItem BColor2{"Blue", &BColor};
|
||||
finalcut::FRadioMenuItem BStyle1{line, &BStyle};
|
||||
finalcut::FRadioMenuItem BStyle2{"-------------", &BStyle};
|
||||
finalcut::FRadioMenuItem BStyle3{"- - - - - - -", &BStyle};
|
||||
finalcut::FRadioMenuItem BStyle4{"- - - - -", &BStyle};
|
||||
finalcut::FStatusBar Statusbar{this};
|
||||
finalcut::FLabel Headline1{this};
|
||||
finalcut::FLabel Headline2{this};
|
||||
finalcut::FLabel Info{this};
|
||||
};
|
||||
#pragma pack(pop)
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
Menu::Menu (finalcut::FWidget* 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
|
||||
File.setStatusbarMessage ("File management commands");
|
||||
|
|
|
@ -56,18 +56,15 @@ class ColorChooser : public finalcut::FWidget
|
|||
virtual void onMouseDown (finalcut::FMouseEvent*);
|
||||
|
||||
// Data Members
|
||||
FColor fg_color;
|
||||
FColor bg_color;
|
||||
finalcut::FLabel headline;
|
||||
FColor fg_color{finalcut::fc::White};
|
||||
FColor bg_color{finalcut::fc::Black};
|
||||
finalcut::FLabel headline{this};
|
||||
};
|
||||
#pragma pack(pop)
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
ColorChooser::ColorChooser (finalcut::FWidget* parent)
|
||||
: FWidget(parent)
|
||||
, fg_color(finalcut::fc::White)
|
||||
, bg_color(finalcut::fc::Black)
|
||||
, headline(this)
|
||||
{
|
||||
setSize (8, 12);
|
||||
setFixedSize (8, 12);
|
||||
|
@ -199,20 +196,16 @@ class Brushes : public finalcut::FWidget
|
|||
virtual void onMouseDown (finalcut::FMouseEvent*);
|
||||
|
||||
// Data Members
|
||||
wchar_t brush;
|
||||
FColor fg_color;
|
||||
FColor bg_color;
|
||||
finalcut::FLabel headline;
|
||||
wchar_t brush{L' '};
|
||||
FColor fg_color{finalcut::fc::White};
|
||||
FColor bg_color{finalcut::fc::Black};
|
||||
finalcut::FLabel headline{this};
|
||||
};
|
||||
#pragma pack(pop)
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
Brushes::Brushes (finalcut::FWidget* parent)
|
||||
: FWidget(parent)
|
||||
, brush(L' ')
|
||||
, fg_color(finalcut::fc::White)
|
||||
, bg_color(finalcut::fc::Black)
|
||||
, headline(this)
|
||||
{
|
||||
setSize (8, 4);
|
||||
setFixedSize (8, 4);
|
||||
|
@ -349,18 +342,15 @@ class MouseDraw : public finalcut::FDialog
|
|||
void cb_colorChanged (finalcut::FWidget*, data_ptr);
|
||||
|
||||
// Data Members
|
||||
term_area* canvas;
|
||||
ColorChooser c_chooser;
|
||||
Brushes brush;
|
||||
term_area* canvas{0};
|
||||
ColorChooser c_chooser{this};
|
||||
Brushes brush{this};
|
||||
};
|
||||
#pragma pack(pop)
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
MouseDraw::MouseDraw (finalcut::FWidget* parent)
|
||||
: finalcut::FDialog(parent)
|
||||
, canvas(0)
|
||||
, c_chooser(this)
|
||||
, brush(this)
|
||||
{
|
||||
setText ("Drawing with the mouse");
|
||||
c_chooser.setPos (1, 1);
|
||||
|
|
|
@ -58,28 +58,20 @@ class Scrollview : public finalcut::FScrollView
|
|||
void cb_go_north (finalcut::FWidget*, data_ptr);
|
||||
|
||||
// Data Members
|
||||
wchar_t pointer_right;
|
||||
wchar_t pointer_down;
|
||||
wchar_t pointer_left;
|
||||
wchar_t pointer_up;
|
||||
finalcut::FButton go_east;
|
||||
finalcut::FButton go_south;
|
||||
finalcut::FButton go_west;
|
||||
finalcut::FButton go_north;
|
||||
wchar_t pointer_right{finalcut::fc::BlackRightPointingPointer};
|
||||
wchar_t pointer_down{finalcut::fc::BlackDownPointingTriangle};
|
||||
wchar_t pointer_left{finalcut::fc::BlackLeftPointingPointer};
|
||||
wchar_t pointer_up{finalcut::fc::BlackUpPointingTriangle};
|
||||
finalcut::FButton go_east{pointer_right, this};
|
||||
finalcut::FButton go_south{pointer_down, this};
|
||||
finalcut::FButton go_west{pointer_left, this};
|
||||
finalcut::FButton go_north{pointer_up, this};
|
||||
};
|
||||
#pragma pack(pop)
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
Scrollview::Scrollview (finalcut::FWidget* 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
|
||||
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);
|
||||
|
||||
// Data Members
|
||||
Scrollview sview;
|
||||
finalcut::FButton quit_btn;
|
||||
finalcut::FLabel label;
|
||||
Scrollview sview{this};
|
||||
finalcut::FButton quit_btn{"&Quit", this};
|
||||
finalcut::FLabel label{this};
|
||||
};
|
||||
#pragma pack(pop)
|
||||
|
||||
|
@ -220,9 +212,6 @@ class Scrollviewdemo : public finalcut::FDialog
|
|||
//----------------------------------------------------------------------
|
||||
Scrollviewdemo::Scrollviewdemo (finalcut::FWidget* parent)
|
||||
: finalcut::FDialog(parent)
|
||||
, sview(this)
|
||||
, quit_btn("&Quit", this)
|
||||
, label(this)
|
||||
{
|
||||
setGeometry (16, 3, 50, 19);
|
||||
setText ("Scrolling viewport example");
|
||||
|
|
|
@ -61,8 +61,8 @@ class AttribDlg : public finalcut::FDialog
|
|||
virtual void adjustSize();
|
||||
|
||||
// Data Members
|
||||
finalcut::FButton next_button;
|
||||
finalcut::FButton back_button;
|
||||
finalcut::FButton next_button{"&Next >", this};
|
||||
finalcut::FButton back_button{"< &Back", this};
|
||||
};
|
||||
#pragma pack(pop)
|
||||
|
||||
|
@ -70,8 +70,6 @@ class AttribDlg : public finalcut::FDialog
|
|||
AttribDlg::AttribDlg (finalcut::FWidget* parent)
|
||||
: finalcut::FDialog(parent)
|
||||
, bgcolor(wc.label_bg)
|
||||
, next_button("&Next >", this)
|
||||
, back_button("< &Back", this)
|
||||
{
|
||||
setText ( "A terminal attributes test ("
|
||||
+ finalcut::FString(getTermType())
|
||||
|
|
|
@ -182,24 +182,18 @@ class MainWindow : public finalcut::FDialog
|
|||
}
|
||||
|
||||
// Data Members
|
||||
finalcut::FString line1;
|
||||
finalcut::FString line2;
|
||||
Transparent* transpwin;
|
||||
Transparent* shadowwin;
|
||||
Transparent* ibg;
|
||||
finalcut::FStatusBar status_bar;
|
||||
finalcut::FString line1{};
|
||||
finalcut::FString line2{};
|
||||
Transparent* transpwin{0};
|
||||
Transparent* shadowwin{0};
|
||||
Transparent* ibg{0};
|
||||
finalcut::FStatusBar status_bar{this};
|
||||
};
|
||||
#pragma pack(pop)
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
MainWindow::MainWindow (finalcut::FWidget* parent)
|
||||
: FDialog(parent)
|
||||
, line1()
|
||||
, line2()
|
||||
, transpwin(0)
|
||||
, shadowwin(0)
|
||||
, ibg(0)
|
||||
, status_bar(this)
|
||||
{
|
||||
line1 = " .-. .-. .-.";
|
||||
line2 = "`._.' `._.' `._.' ";
|
||||
|
|
|
@ -134,9 +134,9 @@ class Treeview : public finalcut::FDialog
|
|||
void onClose (finalcut::FCloseEvent*);
|
||||
|
||||
// Data Members
|
||||
bool initialized;
|
||||
finalcut::FListView listView;
|
||||
finalcut::FButton Quit;
|
||||
bool initialized{false};
|
||||
finalcut::FListView listView{this};
|
||||
finalcut::FButton Quit{this};
|
||||
static TreeItem africa[];
|
||||
static TreeItem asia[];
|
||||
static TreeItem europe[];
|
||||
|
@ -298,9 +298,6 @@ Treeview::TreeItem Treeview::oceania[] =
|
|||
//----------------------------------------------------------------------
|
||||
Treeview::Treeview (finalcut::FWidget* parent)
|
||||
: finalcut::FDialog(parent)
|
||||
, initialized(false)
|
||||
, listView(this)
|
||||
, Quit(this)
|
||||
{
|
||||
// Set FListView geometry
|
||||
listView.setGeometry(2, 1, 53, 14);
|
||||
|
|
166
examples/ui.cpp
166
examples/ui.cpp
|
@ -59,20 +59,16 @@ class ProgressDialog : public finalcut::FDialog
|
|||
void cb_exit_bar (finalcut::FWidget*, data_ptr);
|
||||
|
||||
// Data Members
|
||||
finalcut::FProgressbar progressBar;
|
||||
finalcut::FButton reset;
|
||||
finalcut::FButton more;
|
||||
finalcut::FButton quit;
|
||||
finalcut::FProgressbar progressBar{this};
|
||||
finalcut::FButton reset{this};
|
||||
finalcut::FButton more{this};
|
||||
finalcut::FButton quit{this};
|
||||
};
|
||||
#pragma pack(pop)
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
ProgressDialog::ProgressDialog (finalcut::FWidget* parent)
|
||||
: finalcut::FDialog(parent)
|
||||
, progressBar(this)
|
||||
, reset(this)
|
||||
, more(this)
|
||||
, quit(this)
|
||||
{
|
||||
setGeometry (int((getParentWidget()->getWidth() - 40) / 2), 7, 40, 10);
|
||||
setText("Progress bar");
|
||||
|
@ -203,14 +199,13 @@ class TextWindow : public finalcut::FDialog
|
|||
virtual void adjustSize();
|
||||
|
||||
// Data Members
|
||||
finalcut::FTextView scrollText;
|
||||
finalcut::FTextView scrollText{this};
|
||||
};
|
||||
#pragma pack(pop)
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
TextWindow::TextWindow (finalcut::FWidget* parent)
|
||||
: finalcut::FDialog(parent)
|
||||
, scrollText(this)
|
||||
{
|
||||
scrollText.ignorePadding();
|
||||
scrollText.setGeometry (1, 2, getWidth(), getHeight() - 1);
|
||||
|
@ -302,108 +297,67 @@ class MyDialog : public finalcut::FDialog
|
|||
void cb_setInput (finalcut::FWidget*, data_ptr);
|
||||
|
||||
// Data Members
|
||||
bool initialized;
|
||||
finalcut::FMenuBar Menubar;
|
||||
finalcut::FMenu File; // Menu bar items
|
||||
finalcut::FMenu Edit;
|
||||
finalcut::FMenu View;
|
||||
finalcut::FMenuItem Options;
|
||||
finalcut::FDialogListMenu Window;
|
||||
finalcut::FMenuItem Help;
|
||||
finalcut::FMenuItem Open; // "File" menu items
|
||||
finalcut::FMenu Recent;
|
||||
finalcut::FMenuItem Line1;
|
||||
finalcut::FMenuItem Quit;
|
||||
finalcut::FMenuItem File1; // "Recent" menu items
|
||||
finalcut::FMenuItem File2;
|
||||
finalcut::FMenuItem File3;
|
||||
finalcut::FMenuItem Undo;
|
||||
finalcut::FMenuItem Redo;
|
||||
finalcut::FMenuItem Line2;
|
||||
finalcut::FMenuItem Cut;
|
||||
finalcut::FMenuItem Copy;
|
||||
finalcut::FMenuItem Paste;
|
||||
finalcut::FMenuItem Clear;
|
||||
finalcut::FMenuItem Env;
|
||||
finalcut::FMenuItem Drive;
|
||||
finalcut::FStatusBar Statusbar;
|
||||
finalcut::FStatusKey key_F1;
|
||||
finalcut::FStatusKey key_F2;
|
||||
finalcut::FStatusKey key_F3;
|
||||
finalcut::FButton MyButton1;
|
||||
finalcut::FButton MyButton2;
|
||||
finalcut::FButton MyButton3;
|
||||
finalcut::FButtonGroup radioButtonGroup;
|
||||
finalcut::FRadioButton radio1;
|
||||
finalcut::FRadioButton radio2;
|
||||
finalcut::FButtonGroup checkButtonGroup;
|
||||
finalcut::FCheckBox check1;
|
||||
finalcut::FCheckBox check2;
|
||||
finalcut::FLineEdit myLineEdit;
|
||||
finalcut::FButton MyButton4;
|
||||
finalcut::FButton MyButton5;
|
||||
finalcut::FButton MyButton6;
|
||||
finalcut::FListBox myList;
|
||||
finalcut::FLabel headline;
|
||||
finalcut::FLabel tagged;
|
||||
finalcut::FLabel tagged_count;
|
||||
finalcut::FLabel sum;
|
||||
finalcut::FLabel sum_count;
|
||||
finalcut::FString clipboard;
|
||||
bool initialized{false};
|
||||
finalcut::FMenuBar Menubar{this};
|
||||
// Menu bar items
|
||||
finalcut::FMenu File{"&File", &Menubar};
|
||||
finalcut::FMenu Edit{"&Edit", &Menubar};
|
||||
finalcut::FMenu View{"&View", &Menubar};
|
||||
finalcut::FMenuItem Options{"&Options", &Menubar};
|
||||
finalcut::FDialogListMenu Window{"&Window", &Menubar};
|
||||
finalcut::FMenuItem Help{"&Help", &Menubar};
|
||||
// "File" menu items
|
||||
finalcut::FMenuItem Open{"&Open...", &File};
|
||||
finalcut::FMenu Recent{"&System files", &File};
|
||||
finalcut::FMenuItem Line1{&File};
|
||||
finalcut::FMenuItem Quit{"&Quit", &File};
|
||||
// "Recent" menu items
|
||||
finalcut::FMenuItem File1{"/etc/services", &Recent};
|
||||
finalcut::FMenuItem File2{"/etc/fstab", &Recent};
|
||||
finalcut::FMenuItem File3{"/etc/passwd", &Recent};
|
||||
// "Edit" menu items
|
||||
finalcut::FMenuItem Undo{finalcut::fc::Fckey_z, "Undo", &Edit};
|
||||
finalcut::FMenuItem Redo{finalcut::fc::Fckey_y, "Redo", &Edit};
|
||||
finalcut::FMenuItem Line2{&Edit};
|
||||
finalcut::FMenuItem Cut{finalcut::fc::Fckey_x, "Cu&t", &Edit};
|
||||
finalcut::FMenuItem Copy{finalcut::fc::Fckey_c, "&Copy", &Edit};
|
||||
finalcut::FMenuItem Paste{finalcut::fc::Fckey_v, "&Paste", &Edit};
|
||||
finalcut::FMenuItem Clear{finalcut::fc::Fkey_dc, "C&lear", &Edit};
|
||||
// "View" menu items
|
||||
finalcut::FMenuItem Env{"&Terminal...", &View};
|
||||
finalcut::FMenuItem Drive{"&Drive symbols...", &View};
|
||||
// Statusbar
|
||||
finalcut::FStatusBar Statusbar{this};
|
||||
finalcut::FStatusKey key_F1{finalcut::fc::Fkey_f1, "About", &Statusbar};
|
||||
finalcut::FStatusKey key_F2{finalcut::fc::Fkey_f2, "View", &Statusbar};
|
||||
finalcut::FStatusKey key_F3{finalcut::fc::Fkey_f3, "Quit", &Statusbar};
|
||||
// Dialog widgets
|
||||
finalcut::FButton MyButton1{this};
|
||||
finalcut::FButton MyButton2{this};
|
||||
finalcut::FButton MyButton3{this};
|
||||
finalcut::FButtonGroup radioButtonGroup{"Button", this};
|
||||
finalcut::FRadioButton radio1{"E&nable", &radioButtonGroup};
|
||||
finalcut::FRadioButton radio2{&radioButtonGroup};
|
||||
finalcut::FButtonGroup checkButtonGroup{"Options", this};
|
||||
finalcut::FCheckBox check1{"&Bitmode", &checkButtonGroup};
|
||||
finalcut::FCheckBox check2{"&8-Bit", &checkButtonGroup};
|
||||
finalcut::FLineEdit myLineEdit{this};
|
||||
finalcut::FButton MyButton4{this};
|
||||
finalcut::FButton MyButton5{this};
|
||||
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)
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
MyDialog::MyDialog (finalcut::FWidget* 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
|
||||
initMenuCallbacks(); // Initialize program menu callbacks
|
||||
|
|
|
@ -63,24 +63,18 @@ class Watch : public finalcut::FDialog
|
|||
Watch& operator = (const Watch&);
|
||||
|
||||
// Data Members
|
||||
bool sec;
|
||||
finalcut::FLabel time_label;
|
||||
finalcut::FLabel time_str;
|
||||
finalcut::FSwitch clock_sw;
|
||||
finalcut::FSwitch seconds_sw;
|
||||
finalcut::FButton quit_btn;
|
||||
bool sec{true};
|
||||
finalcut::FLabel time_label{L"Time", this};
|
||||
finalcut::FLabel time_str{L"--:--:--", this};
|
||||
finalcut::FSwitch clock_sw{L"Clock", this};
|
||||
finalcut::FSwitch seconds_sw{L"Seconds", this};
|
||||
finalcut::FButton quit_btn{L"&Quit", this};
|
||||
};
|
||||
#pragma pack(pop)
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
Watch::Watch (FWidget* 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");
|
||||
int pw = int(getParentWidget()->getWidth());
|
||||
|
|
|
@ -55,22 +55,17 @@ class SmallWindow : public finalcut::FDialog
|
|||
virtual void onTimer (finalcut::FTimerEvent*);
|
||||
|
||||
// Data Members
|
||||
finalcut::FLabel left_arrow;
|
||||
finalcut::FLabel right_arrow;
|
||||
finalcut::FLabel top_left_label;
|
||||
finalcut::FLabel top_right_label;
|
||||
finalcut::FLabel bottom_label;
|
||||
finalcut::FLabel left_arrow{this};
|
||||
finalcut::FLabel right_arrow{this};
|
||||
finalcut::FLabel top_left_label{this};
|
||||
finalcut::FLabel top_right_label{this};
|
||||
finalcut::FLabel bottom_label{this};
|
||||
};
|
||||
#pragma pack(pop)
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
SmallWindow::SmallWindow (finalcut::FWidget* 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;
|
||||
arrow_up = finalcut::fc::BlackUpPointingTriangle;
|
||||
|
@ -227,44 +222,28 @@ class Window : public finalcut::FDialog
|
|||
void cb_destroyWindow (finalcut::FWidget*, data_ptr);
|
||||
|
||||
// Data Members
|
||||
std::vector<win_data*> windows;
|
||||
finalcut::FString drop_down_symbol;
|
||||
finalcut::FMenuBar Menubar;
|
||||
finalcut::FMenu File;
|
||||
finalcut::FDialogListMenu DglList;
|
||||
finalcut::FStatusBar Statusbar;
|
||||
finalcut::FMenuItem New;
|
||||
finalcut::FMenuItem Close;
|
||||
finalcut::FMenuItem Line1;
|
||||
finalcut::FMenuItem Next;
|
||||
finalcut::FMenuItem Previous;
|
||||
finalcut::FMenuItem Line2;
|
||||
finalcut::FMenuItem Quit;
|
||||
finalcut::FButton CreateButton;
|
||||
finalcut::FButton CloseButton;
|
||||
finalcut::FButton QuitButton;
|
||||
std::vector<win_data*> windows{};
|
||||
finalcut::FString drop_down_symbol{finalcut::fc::BlackDownPointingTriangle};
|
||||
finalcut::FMenuBar Menubar{this};
|
||||
finalcut::FMenu File{"&File", &Menubar};
|
||||
finalcut::FDialogListMenu DglList{drop_down_symbol, &Menubar};
|
||||
finalcut::FStatusBar Statusbar{this};
|
||||
finalcut::FMenuItem New{"&New", &File};
|
||||
finalcut::FMenuItem Close{"&Close", &File};
|
||||
finalcut::FMenuItem Line1{&File};
|
||||
finalcut::FMenuItem Next{"Ne&xt window", &File};
|
||||
finalcut::FMenuItem Previous{"&Previous window", &File};
|
||||
finalcut::FMenuItem Line2{&File};
|
||||
finalcut::FMenuItem Quit{"&Quit", &File};
|
||||
finalcut::FButton CreateButton{this};
|
||||
finalcut::FButton CloseButton{this};
|
||||
finalcut::FButton QuitButton{this};
|
||||
};
|
||||
#pragma pack(pop)
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
Window::Window (finalcut::FWidget* 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
|
||||
File.setStatusbarMessage ("File management commands");
|
||||
|
|
|
@ -149,7 +149,7 @@ all: dep $(OBJS)
|
|||
$(LIB): all
|
||||
|
||||
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:
|
||||
$(MAKE) $(MAKEFILE) PROFILE="-pg"
|
||||
|
@ -179,7 +179,7 @@ clean:
|
|||
$(RM) $(LIB)* $(OBJS) .depend *.gcno *.gcda *.gch *.plist *~
|
||||
|
||||
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
|
||||
|
|
|
@ -178,7 +178,7 @@ clean:
|
|||
$(RM) $(LIB)* $(OBJS) .depend *.gcno *.gcda *.prof *~
|
||||
|
||||
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
|
||||
|
|
|
@ -64,10 +64,8 @@ FApplication::FApplication ( const int& _argc
|
|||
, char* _argv[]
|
||||
, bool disable_alt_screen )
|
||||
: FWidget(processParameters(_argc, _argv), disable_alt_screen)
|
||||
, app_argc(_argc)
|
||||
, app_argv(_argv)
|
||||
, key_timeout(100000) // 100 ms
|
||||
, dblclick_interval(500000) // 500 ms
|
||||
, app_argc{_argc}
|
||||
, app_argv{_argv}
|
||||
{
|
||||
assert ( ! app_object
|
||||
&& "FApplication: There should be only one application object" );
|
||||
|
|
|
@ -35,24 +35,6 @@ namespace finalcut
|
|||
//----------------------------------------------------------------------
|
||||
FButton::FButton(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();
|
||||
}
|
||||
|
@ -60,27 +42,9 @@ FButton::FButton(FWidget* parent)
|
|||
//----------------------------------------------------------------------
|
||||
FButton::FButton (const FString& txt, FWidget* parent)
|
||||
: FWidget(parent)
|
||||
, 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)
|
||||
, text{txt}
|
||||
{
|
||||
init();
|
||||
detectHotkey();
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
@ -449,6 +413,9 @@ void FButton::init()
|
|||
setForegroundColor (wc.button_active_fg);
|
||||
setBackgroundColor (wc.button_active_bg);
|
||||
setShadow();
|
||||
|
||||
if ( ! text.isEmpty() )
|
||||
detectHotkey();
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
|
|
@ -37,8 +37,6 @@ namespace finalcut
|
|||
//----------------------------------------------------------------------
|
||||
FButtonGroup::FButtonGroup(FWidget* parent)
|
||||
: FScrollView(parent)
|
||||
, text()
|
||||
, buttonlist()
|
||||
{
|
||||
init();
|
||||
}
|
||||
|
@ -46,8 +44,7 @@ FButtonGroup::FButtonGroup(FWidget* parent)
|
|||
//----------------------------------------------------------------------
|
||||
FButtonGroup::FButtonGroup (const FString& txt, FWidget* parent)
|
||||
: FScrollView(parent)
|
||||
, text(txt)
|
||||
, buttonlist()
|
||||
, text{txt}
|
||||
{
|
||||
init();
|
||||
setText(txt);
|
||||
|
|
|
@ -27,18 +27,10 @@ namespace finalcut
|
|||
|
||||
//----------------------------------------------------------------------
|
||||
// class FColorPalette
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
// constructors and destructor
|
||||
//----------------------------------------------------------------------
|
||||
FColorPalette::FColorPalette()
|
||||
{ }
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
FColorPalette::~FColorPalette() // destructor
|
||||
{ }
|
||||
|
||||
|
||||
// public methods of FColorPalette
|
||||
//----------------------------------------------------------------------
|
||||
void FColorPalette::set8ColorPalette (funcp setPalette)
|
||||
|
|
|
@ -35,21 +35,6 @@ namespace finalcut
|
|||
//----------------------------------------------------------------------
|
||||
FDialog::FDialog (FWidget* 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();
|
||||
}
|
||||
|
@ -58,20 +43,6 @@ FDialog::FDialog (FWidget* parent)
|
|||
FDialog::FDialog (const FString& txt, FWidget* parent)
|
||||
: FWindow(parent)
|
||||
, 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();
|
||||
}
|
||||
|
|
|
@ -32,7 +32,7 @@ namespace finalcut
|
|||
//----------------------------------------------------------------------
|
||||
|
||||
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
|
||||
: FEvent(ev_type)
|
||||
, k(key_num)
|
||||
, accpt(false)
|
||||
, k{key_num}
|
||||
{ }
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
@ -81,22 +80,19 @@ void FKeyEvent::ignore()
|
|||
|
||||
FMouseEvent::FMouseEvent ( int ev_type // constructor
|
||||
, const FPoint& pos
|
||||
, const FPoint& termPos
|
||||
, int button )
|
||||
: FEvent(ev_type)
|
||||
, p(pos)
|
||||
, tp()
|
||||
, b(button)
|
||||
, p{pos}
|
||||
, tp{termPos}
|
||||
, b{button}
|
||||
{ }
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
FMouseEvent::FMouseEvent ( int ev_type // constructor
|
||||
, const FPoint& pos
|
||||
, const FPoint& termPos
|
||||
, int button )
|
||||
: FEvent(ev_type)
|
||||
, p(pos)
|
||||
, tp(termPos)
|
||||
, b(button)
|
||||
: FMouseEvent(ev_type, pos, FPoint(), button)
|
||||
{ }
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
@ -138,22 +134,19 @@ int FMouseEvent::getButton() const
|
|||
|
||||
FWheelEvent::FWheelEvent ( int ev_type // constructor
|
||||
, const FPoint& pos
|
||||
, const FPoint& termPos
|
||||
, int wheel )
|
||||
: FEvent(ev_type)
|
||||
, p(pos)
|
||||
, tp()
|
||||
, w(wheel)
|
||||
, p{pos}
|
||||
, tp{termPos}
|
||||
, w{wheel}
|
||||
{ }
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
FWheelEvent::FWheelEvent ( int ev_type // constructor
|
||||
, const FPoint& pos
|
||||
, const FPoint& termPos
|
||||
, int wheel )
|
||||
: FEvent(ev_type)
|
||||
, p(pos)
|
||||
, tp(termPos)
|
||||
, w(wheel)
|
||||
: FWheelEvent(ev_type, pos, FPoint(), wheel)
|
||||
{ }
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
@ -195,8 +188,6 @@ int FWheelEvent::getWheel() const
|
|||
|
||||
FFocusEvent::FFocusEvent (int ev_type) // constructor
|
||||
: FEvent(ev_type)
|
||||
, accpt(true)
|
||||
, focus_type(fc::FocusDefiniteWidget)
|
||||
{ }
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
@ -242,8 +233,7 @@ void FFocusEvent::ignore()
|
|||
|
||||
FAccelEvent::FAccelEvent(int ev_type, void* focused) // constructor
|
||||
: FEvent(ev_type)
|
||||
, accpt(false)
|
||||
, focus_widget(focused)
|
||||
, focus_widget{focused}
|
||||
{ }
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
@ -273,7 +263,6 @@ void FAccelEvent::ignore()
|
|||
|
||||
FResizeEvent::FResizeEvent(int ev_type) // constructor
|
||||
: FEvent(ev_type)
|
||||
, accpt(false)
|
||||
{ }
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
@ -323,7 +312,6 @@ FHideEvent::~FHideEvent() // destructor
|
|||
|
||||
FCloseEvent::FCloseEvent(int ev_type) // constructor
|
||||
: FEvent(ev_type)
|
||||
, accpt(false)
|
||||
{ }
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
@ -349,7 +337,7 @@ void FCloseEvent::ignore()
|
|||
|
||||
FTimerEvent::FTimerEvent(int ev_type, int timer_id) // constructor
|
||||
: FEvent(ev_type)
|
||||
, id(timer_id)
|
||||
, id{timer_id}
|
||||
{ }
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
|
|
@ -56,17 +56,6 @@ bool sortDirFirst ( const FFileDialog::dir_entry& lhs
|
|||
//----------------------------------------------------------------------
|
||||
FFileDialog::FFileDialog (FWidget* parent)
|
||||
: FDialog(parent)
|
||||
, directory_stream(0)
|
||||
, dir_entries()
|
||||
, directory()
|
||||
, filter_pattern()
|
||||
, filename()
|
||||
, filebrowser()
|
||||
, hidden()
|
||||
, cancel()
|
||||
, open()
|
||||
, dlg_type(FFileDialog::Open)
|
||||
, show_hidden(false)
|
||||
{
|
||||
init();
|
||||
}
|
||||
|
@ -74,20 +63,9 @@ FFileDialog::FFileDialog (FWidget* parent)
|
|||
//----------------------------------------------------------------------
|
||||
FFileDialog::FFileDialog (const FFileDialog& fdlg)
|
||||
: 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 )
|
||||
setPath(directory);
|
||||
if ( fdlg.directory )
|
||||
setPath(fdlg.directory);
|
||||
|
||||
init();
|
||||
}
|
||||
|
@ -98,17 +76,8 @@ FFileDialog::FFileDialog ( const FString& dirname
|
|||
, DialogType type
|
||||
, FWidget* parent )
|
||||
: FDialog(parent)
|
||||
, directory_stream(0)
|
||||
, dir_entries()
|
||||
, directory()
|
||||
, filter_pattern(filter)
|
||||
, filename(this)
|
||||
, filebrowser(this)
|
||||
, hidden(this)
|
||||
, cancel(this)
|
||||
, open(this)
|
||||
, dlg_type(type)
|
||||
, show_hidden(false)
|
||||
{
|
||||
if ( ! dirname.isNull() )
|
||||
setPath(dirname);
|
||||
|
|
|
@ -45,12 +45,9 @@ struct timeval FKeyboard::time_keypressed;
|
|||
//----------------------------------------------------------------------
|
||||
FKeyboardCommand::FKeyboardCommand ( FApplication* object
|
||||
, void(FApplication::*method)() )
|
||||
: instance(0)
|
||||
, handler(0)
|
||||
{
|
||||
instance = object;
|
||||
handler = method;
|
||||
}
|
||||
: instance(object)
|
||||
, handler(method)
|
||||
{ }
|
||||
|
||||
// public methods of FKeyboardCommand
|
||||
//----------------------------------------------------------------------
|
||||
|
@ -67,18 +64,6 @@ void FKeyboardCommand::execute()
|
|||
// constructors and destructor
|
||||
//----------------------------------------------------------------------
|
||||
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
|
||||
time_keypressed.tv_sec = 0;
|
||||
|
|
|
@ -35,15 +35,6 @@ namespace finalcut
|
|||
//----------------------------------------------------------------------
|
||||
FLabel::FLabel(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();
|
||||
}
|
||||
|
@ -51,15 +42,7 @@ FLabel::FLabel(FWidget* parent)
|
|||
//----------------------------------------------------------------------
|
||||
FLabel::FLabel (const FString& txt, FWidget* parent)
|
||||
: FWidget(parent)
|
||||
, multiline_text()
|
||||
, multiline(false)
|
||||
, 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();
|
||||
setText(txt);
|
||||
|
|
|
@ -35,16 +35,7 @@ namespace finalcut
|
|||
//----------------------------------------------------------------------
|
||||
FLineEdit::FLineEdit(FWidget* parent)
|
||||
: FWidget(parent)
|
||||
, text("")
|
||||
, 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)
|
||||
, label{new FLabel("", parent)}
|
||||
{
|
||||
init();
|
||||
}
|
||||
|
@ -53,15 +44,7 @@ FLineEdit::FLineEdit(FWidget* parent)
|
|||
FLineEdit::FLineEdit (const FString& txt, FWidget* parent)
|
||||
: FWidget(parent)
|
||||
, text(txt)
|
||||
, 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)
|
||||
, label{new FLabel("", parent)}
|
||||
{
|
||||
init();
|
||||
setText(txt);
|
||||
|
@ -537,7 +520,8 @@ void FLineEdit::onTimer (FTimerEvent*)
|
|||
break;
|
||||
|
||||
case FLineEdit::scrollRight:
|
||||
if ( text_offset == len - getWidth() + 2 )
|
||||
if ( len < getWidth() - 2
|
||||
|| text_offset == len - getWidth() + 2 )
|
||||
{
|
||||
drag_scroll = FLineEdit::noScroll;
|
||||
return;
|
||||
|
|
|
@ -37,10 +37,6 @@ namespace finalcut
|
|||
// constructor and destructor
|
||||
//----------------------------------------------------------------------
|
||||
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)
|
||||
: text(txt)
|
||||
, data_pointer(data)
|
||||
, brackets(fc::NoBrackets)
|
||||
, selected(false)
|
||||
{ }
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
@ -90,28 +84,6 @@ FListBoxItem& FListBoxItem::operator = (const FListBoxItem& item)
|
|||
//----------------------------------------------------------------------
|
||||
FListBox::FListBox (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();
|
||||
}
|
||||
|
@ -1051,53 +1023,15 @@ inline void FListBox::drawListLine ( int y
|
|||
//----------------------------------------------------------------------
|
||||
inline void FListBox::printLeftBracket (fc::brackets_type bracket_type)
|
||||
{
|
||||
switch ( 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;
|
||||
}
|
||||
if ( bracket_type != fc::NoBrackets )
|
||||
print ("\0[({<"[bracket_type]);
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
inline void FListBox::printRightBracket (fc::brackets_type bracket_type)
|
||||
{
|
||||
switch ( 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;
|
||||
}
|
||||
if ( bracket_type != fc::NoBrackets )
|
||||
print ("\0])}>"[bracket_type]);
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
|
|
@ -163,12 +163,6 @@ FListViewItem::FListViewItem (const FListViewItem& item)
|
|||
: FObject(item.getParent())
|
||||
, column_list(item.column_list)
|
||||
, data_pointer(item.data_pointer)
|
||||
, root()
|
||||
, visible_lines(1)
|
||||
, expandable(false)
|
||||
, is_expand(false)
|
||||
, checkable(false)
|
||||
, is_checked(false)
|
||||
{
|
||||
FObject* parent = getParent();
|
||||
|
||||
|
@ -188,14 +182,6 @@ FListViewItem::FListViewItem (const FListViewItem& item)
|
|||
//----------------------------------------------------------------------
|
||||
FListViewItem::FListViewItem (FObjectIterator parent_iter)
|
||||
: 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);
|
||||
}
|
||||
|
@ -207,12 +193,6 @@ FListViewItem::FListViewItem ( const FStringList& cols
|
|||
: FObject(0)
|
||||
, column_list(cols)
|
||||
, data_pointer(data)
|
||||
, root()
|
||||
, visible_lines(1)
|
||||
, expandable(false)
|
||||
, is_expand(false)
|
||||
, checkable(false)
|
||||
, is_checked(false)
|
||||
{
|
||||
if ( cols.empty() )
|
||||
return;
|
||||
|
@ -457,18 +437,9 @@ void FListViewItem::resetVisibleLineCounter()
|
|||
//----------------------------------------------------------------------
|
||||
|
||||
// constructor and destructor
|
||||
//----------------------------------------------------------------------
|
||||
FListViewIterator::FListViewIterator ()
|
||||
: iter_path()
|
||||
, node()
|
||||
, position(0)
|
||||
{ }
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
FListViewIterator::FListViewIterator (FObjectIterator iter)
|
||||
: iter_path()
|
||||
, node(iter)
|
||||
, position(0)
|
||||
: node(iter)
|
||||
{ }
|
||||
|
||||
|
||||
|
@ -615,34 +586,6 @@ void FListViewIterator::parentElement()
|
|||
//----------------------------------------------------------------------
|
||||
FListView::FListView (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();
|
||||
}
|
||||
|
|
|
@ -38,14 +38,6 @@ namespace finalcut
|
|||
//----------------------------------------------------------------------
|
||||
FMenu::FMenu(FWidget* 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);
|
||||
}
|
||||
|
@ -54,13 +46,6 @@ FMenu::FMenu(FWidget* parent)
|
|||
FMenu::FMenu (const FString& txt, FWidget* parent)
|
||||
: FWindow(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);
|
||||
}
|
||||
|
|
|
@ -37,10 +37,6 @@ namespace finalcut
|
|||
//----------------------------------------------------------------------
|
||||
FMenuBar::FMenuBar(FWidget* parent)
|
||||
: FWindow(parent)
|
||||
, mouse_down(false)
|
||||
, drop_down(false)
|
||||
, focus_changed(false)
|
||||
, screenWidth(80)
|
||||
{
|
||||
init();
|
||||
}
|
||||
|
|
|
@ -39,19 +39,6 @@ namespace finalcut
|
|||
//----------------------------------------------------------------------
|
||||
FMenuItem::FMenuItem (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);
|
||||
}
|
||||
|
@ -60,18 +47,6 @@ FMenuItem::FMenuItem (FWidget* parent)
|
|||
FMenuItem::FMenuItem (const FString& txt, FWidget* parent)
|
||||
: FWidget(parent)
|
||||
, 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);
|
||||
}
|
||||
|
@ -80,18 +55,7 @@ FMenuItem::FMenuItem (const FString& txt, FWidget* parent)
|
|||
FMenuItem::FMenuItem (FKey k, const FString& txt, FWidget* parent)
|
||||
: FWidget(parent)
|
||||
, text(txt)
|
||||
, selected(false)
|
||||
, separator(false)
|
||||
, checkable(false)
|
||||
, checked(false)
|
||||
, radio_button(false)
|
||||
, dialog_index(false)
|
||||
, text_length(0)
|
||||
, hotkey(0)
|
||||
, accel_key(k)
|
||||
, menu(0)
|
||||
, super_menu(0)
|
||||
, associated_window(0)
|
||||
{
|
||||
init (parent);
|
||||
}
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* *
|
||||
* 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 *
|
||||
* modify it under the terms of the GNU Lesser General Public License *
|
||||
|
@ -32,12 +32,6 @@ namespace finalcut
|
|||
//----------------------------------------------------------------------
|
||||
|
||||
// constructor and destructor
|
||||
//----------------------------------------------------------------------
|
||||
FMenuList::FMenuList()
|
||||
: selected_item()
|
||||
, item_list()
|
||||
{ }
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
FMenuList::~FMenuList() // destructor
|
||||
{
|
||||
|
|
|
@ -49,17 +49,6 @@ static const char* const button_text[] =
|
|||
//----------------------------------------------------------------------
|
||||
FMessageBox::FMessageBox (FWidget* 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");
|
||||
init(FMessageBox::Ok, 0, 0);
|
||||
|
@ -77,8 +66,6 @@ FMessageBox::FMessageBox (const FMessageBox& mbox)
|
|||
, emphasis_color(mbox.emphasis_color)
|
||||
, num_buttons(mbox.num_buttons)
|
||||
, text_num_lines(mbox.text_num_lines)
|
||||
, button_digit()
|
||||
, button()
|
||||
{
|
||||
setTitlebarText (mbox.getTitlebarText());
|
||||
init ( mbox.button_digit[0]
|
||||
|
@ -94,17 +81,7 @@ FMessageBox::FMessageBox ( const FString& caption
|
|||
, int button2
|
||||
, FWidget* parent )
|
||||
: FDialog(parent)
|
||||
, headline_text()
|
||||
, 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);
|
||||
init(button0, button1, button2);
|
||||
|
|
|
@ -40,16 +40,6 @@ namespace finalcut
|
|||
// constructors and destructor
|
||||
//----------------------------------------------------------------------
|
||||
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_usec = 0;
|
||||
|
@ -237,10 +227,6 @@ bool FMouse::isDblclickTimeout (timeval* time)
|
|||
//----------------------------------------------------------------------
|
||||
FMouseGPM::FMouseGPM()
|
||||
: FMouse()
|
||||
, gpm_ev()
|
||||
, has_gpm_mouse_data(false)
|
||||
, gpm_mouse_enabled(false)
|
||||
, stdin_no(0)
|
||||
{
|
||||
gpm_ev.x = -1;
|
||||
}
|
||||
|
@ -497,8 +483,6 @@ int FMouseGPM::gpmEvent (bool clear)
|
|||
//----------------------------------------------------------------------
|
||||
FMouseX11::FMouseX11()
|
||||
: FMouse()
|
||||
, x11_mouse()
|
||||
, x11_button_state(all_buttons_released)
|
||||
{
|
||||
x11_mouse[0] = '\0';
|
||||
}
|
||||
|
@ -699,8 +683,6 @@ void FMouseX11::setButtonState (int btn, struct timeval* time)
|
|||
//----------------------------------------------------------------------
|
||||
FMouseSGR::FMouseSGR()
|
||||
: FMouse()
|
||||
, sgr_mouse()
|
||||
, sgr_button_state(0x23)
|
||||
{
|
||||
sgr_mouse[0] = '\0';
|
||||
}
|
||||
|
@ -953,8 +935,6 @@ void FMouseSGR::setReleasedButtonState (int btn)
|
|||
//----------------------------------------------------------------------
|
||||
FMouseUrxvt::FMouseUrxvt()
|
||||
: FMouse()
|
||||
, urxvt_mouse()
|
||||
, urxvt_button_state(0x23)
|
||||
{
|
||||
urxvt_mouse[0] = '\0';
|
||||
}
|
||||
|
@ -1230,11 +1210,6 @@ void FMouseUrxvt::setButtonState (int btn, struct timeval* time)
|
|||
// constructors and destructor
|
||||
//----------------------------------------------------------------------
|
||||
FMouseControl::FMouseControl()
|
||||
: mouse_protocol()
|
||||
, iter()
|
||||
, zero_point(0, 0)
|
||||
, use_gpm_mouse(false)
|
||||
, use_xterm_mouse(false)
|
||||
{
|
||||
#ifdef F_HAVE_LIBGPM
|
||||
mouse_protocol[FMouse::gpm] = FMouse::createMouseObject(FMouse::gpm);
|
||||
|
|
|
@ -37,10 +37,7 @@ const FString* fc::emptyFString::empty_string = 0;
|
|||
// constructors and destructor
|
||||
//----------------------------------------------------------------------
|
||||
FObject::FObject (FObject* parent)
|
||||
: widget_object(false)
|
||||
, parent_obj(parent)
|
||||
, children_list() // no children yet
|
||||
, has_parent(false)
|
||||
: parent_obj(parent)
|
||||
{
|
||||
if ( parent ) // add object to parent
|
||||
{
|
||||
|
|
|
@ -34,51 +34,6 @@ namespace finalcut
|
|||
// constructors and destructor
|
||||
//----------------------------------------------------------------------
|
||||
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';
|
||||
// Set to 0 to reset
|
||||
|
|
|
@ -35,34 +35,7 @@ namespace finalcut
|
|||
// constructors and destructor
|
||||
//----------------------------------------------------------------------
|
||||
FOptiMove::FOptiMove (int baud)
|
||||
: F_cursor_home()
|
||||
, 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)
|
||||
: baudrate(baud)
|
||||
{
|
||||
assert ( baud >= 0 );
|
||||
|
||||
|
|
|
@ -33,8 +33,6 @@ namespace finalcut
|
|||
//----------------------------------------------------------------------
|
||||
FProgressbar::FProgressbar(FWidget* parent)
|
||||
: FWidget(parent)
|
||||
, percentage(NOT_SET)
|
||||
, bar_length(getWidth())
|
||||
{
|
||||
unsetFocusable();
|
||||
setShadow();
|
||||
|
|
|
@ -35,24 +35,6 @@ namespace finalcut
|
|||
//----------------------------------------------------------------------
|
||||
FScrollbar::FScrollbar(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
|
||||
setGeometry(1, 1, 1, length, false);
|
||||
|
@ -62,24 +44,6 @@ FScrollbar::FScrollbar(FWidget* parent)
|
|||
//----------------------------------------------------------------------
|
||||
FScrollbar::FScrollbar(int o, 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);
|
||||
init();
|
||||
|
|
|
@ -35,17 +35,6 @@ namespace finalcut
|
|||
//----------------------------------------------------------------------
|
||||
FScrollView::FScrollView (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);
|
||||
}
|
||||
|
|
|
@ -35,11 +35,6 @@ namespace finalcut
|
|||
//----------------------------------------------------------------------
|
||||
FStatusKey::FStatusKey(FWidget* parent)
|
||||
: FWidget(parent)
|
||||
, key(0)
|
||||
, text()
|
||||
, active(false)
|
||||
, mouse_focus(false)
|
||||
, bar(0)
|
||||
{
|
||||
init (parent);
|
||||
}
|
||||
|
@ -49,9 +44,6 @@ FStatusKey::FStatusKey (FKey k, const FString& txt, FWidget* parent)
|
|||
: FWidget(parent)
|
||||
, key(k)
|
||||
, text(txt)
|
||||
, active(false)
|
||||
, mouse_focus(false)
|
||||
, bar(0)
|
||||
{
|
||||
init (parent);
|
||||
}
|
||||
|
@ -133,13 +125,6 @@ void FStatusKey::processActivate()
|
|||
//----------------------------------------------------------------------
|
||||
FStatusBar::FStatusBar(FWidget* parent)
|
||||
: FWindow(parent)
|
||||
, key_list()
|
||||
, text("")
|
||||
, mouse_down()
|
||||
, screenWidth(80)
|
||||
, keyname_len(0)
|
||||
, x(-1)
|
||||
, x_msg(-1)
|
||||
{
|
||||
init();
|
||||
}
|
||||
|
|
|
@ -33,20 +33,8 @@ namespace finalcut
|
|||
//----------------------------------------------------------------------
|
||||
|
||||
// constructors and destructor
|
||||
//----------------------------------------------------------------------
|
||||
FString::FString()
|
||||
: string(0)
|
||||
, length(0)
|
||||
, bufsize(0)
|
||||
, c_string(0)
|
||||
{ }
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
FString::FString (int len)
|
||||
: string(0)
|
||||
, length(0)
|
||||
, bufsize(0)
|
||||
, c_string(0)
|
||||
{
|
||||
if ( len > 0 )
|
||||
initLength(std::size_t(len));
|
||||
|
@ -56,20 +44,12 @@ FString::FString (int len)
|
|||
|
||||
//----------------------------------------------------------------------
|
||||
FString::FString (std::size_t len)
|
||||
: string(0)
|
||||
, length(0)
|
||||
, bufsize(0)
|
||||
, c_string(0)
|
||||
{
|
||||
initLength(len);
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
FString::FString (std::size_t len, wchar_t c)
|
||||
: string(0)
|
||||
, length(0)
|
||||
, bufsize(0)
|
||||
, c_string(0)
|
||||
{
|
||||
wchar_t* ps;
|
||||
wchar_t* pe;
|
||||
|
@ -84,10 +64,6 @@ FString::FString (std::size_t len, wchar_t c)
|
|||
|
||||
//----------------------------------------------------------------------
|
||||
FString::FString (std::size_t len, char c)
|
||||
: string(0)
|
||||
, length(0)
|
||||
, bufsize(0)
|
||||
, c_string(0)
|
||||
{
|
||||
wchar_t* ps;
|
||||
wchar_t* pe;
|
||||
|
@ -102,10 +78,6 @@ FString::FString (std::size_t len, char c)
|
|||
|
||||
//----------------------------------------------------------------------
|
||||
FString::FString (const FString& s) // copy constructor
|
||||
: string(0)
|
||||
, length(0)
|
||||
, bufsize(0)
|
||||
, c_string(0)
|
||||
{
|
||||
if ( ! s.isNull() )
|
||||
_assign (s.string);
|
||||
|
@ -113,10 +85,6 @@ FString::FString (const FString& s) // copy constructor
|
|||
|
||||
//----------------------------------------------------------------------
|
||||
FString::FString (const std::wstring& s)
|
||||
: string(0)
|
||||
, length(0)
|
||||
, bufsize(0)
|
||||
, c_string(0)
|
||||
{
|
||||
if ( ! s.empty() )
|
||||
_assign (s.c_str());
|
||||
|
@ -124,10 +92,6 @@ FString::FString (const std::wstring& s)
|
|||
|
||||
//----------------------------------------------------------------------
|
||||
FString::FString (const wchar_t s[])
|
||||
: string(0)
|
||||
, length(0)
|
||||
, bufsize(0)
|
||||
, c_string(0)
|
||||
{
|
||||
if ( s )
|
||||
_assign (s);
|
||||
|
@ -135,10 +99,6 @@ FString::FString (const wchar_t s[])
|
|||
|
||||
//----------------------------------------------------------------------
|
||||
FString::FString (const std::string& s)
|
||||
: string(0)
|
||||
, length(0)
|
||||
, bufsize(0)
|
||||
, c_string(0)
|
||||
{
|
||||
if ( ! s.empty() )
|
||||
{
|
||||
|
@ -150,10 +110,6 @@ FString::FString (const std::string& s)
|
|||
|
||||
//----------------------------------------------------------------------
|
||||
FString::FString (const char s[])
|
||||
: string(0)
|
||||
, length(0)
|
||||
, bufsize(0)
|
||||
, c_string(0)
|
||||
{
|
||||
if ( s )
|
||||
{
|
||||
|
@ -165,10 +121,6 @@ FString::FString (const char s[])
|
|||
|
||||
//----------------------------------------------------------------------
|
||||
FString::FString (const wchar_t c)
|
||||
: string(0)
|
||||
, length(0)
|
||||
, bufsize(0)
|
||||
, c_string(0)
|
||||
{
|
||||
if ( c )
|
||||
{
|
||||
|
@ -181,10 +133,6 @@ FString::FString (const wchar_t c)
|
|||
|
||||
//----------------------------------------------------------------------
|
||||
FString::FString (const char c)
|
||||
: string(0)
|
||||
, length(0)
|
||||
, bufsize(0)
|
||||
, c_string(0)
|
||||
{
|
||||
if ( c )
|
||||
{
|
||||
|
|
|
@ -33,8 +33,6 @@ namespace finalcut
|
|||
//----------------------------------------------------------------------
|
||||
FSwitch::FSwitch(FWidget* parent)
|
||||
: FToggleButton(parent)
|
||||
, switch_offset_pos(0)
|
||||
, button_pressed(false)
|
||||
{
|
||||
button_width = 11;
|
||||
}
|
||||
|
@ -42,8 +40,6 @@ FSwitch::FSwitch(FWidget* parent)
|
|||
//----------------------------------------------------------------------
|
||||
FSwitch::FSwitch (const FString& txt, FWidget* parent)
|
||||
: FToggleButton(txt, parent)
|
||||
, switch_offset_pos(0)
|
||||
, button_pressed(false)
|
||||
{
|
||||
switch_offset_pos = txt.getLength() + 1;
|
||||
button_width = 11;
|
||||
|
|
|
@ -30,19 +30,10 @@ namespace finalcut
|
|||
|
||||
//----------------------------------------------------------------------
|
||||
// class FTermBuffer
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
// constructors and destructor
|
||||
//----------------------------------------------------------------------
|
||||
FTermBuffer::FTermBuffer()
|
||||
: data()
|
||||
{ }
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
FTermBuffer::~FTermBuffer() // destructor
|
||||
{ }
|
||||
|
||||
|
||||
// public methods of FTermBuffer
|
||||
//----------------------------------------------------------------------
|
||||
int FTermBuffer::writef (const FString format, ...)
|
||||
|
|
|
@ -48,15 +48,6 @@ FTermDetection* FTermcap::term_detection = 0;
|
|||
// class FTermcap
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
// constructors and destructor
|
||||
//----------------------------------------------------------------------
|
||||
FTermcap::FTermcap()
|
||||
{ }
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
FTermcap::~FTermcap() // destructor
|
||||
{ }
|
||||
|
||||
/* Terminal capability data base
|
||||
* -----------------------------
|
||||
* Info under: man 5 terminfo
|
||||
|
|
|
@ -39,15 +39,6 @@ namespace finalcut
|
|||
// class FTermFreeBSD
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
// constructors and destructor
|
||||
//----------------------------------------------------------------------
|
||||
FTermFreeBSD::FTermFreeBSD()
|
||||
{ }
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
FTermFreeBSD::~FTermFreeBSD() // destructor
|
||||
{ }
|
||||
|
||||
// public methods of FTermFreeBSD
|
||||
//----------------------------------------------------------------------
|
||||
#if defined(__FreeBSD__) || defined(__DragonFly__)
|
||||
|
|
|
@ -51,7 +51,6 @@ FTermios::FTermios()
|
|||
FTermios::~FTermios() // destructor
|
||||
{ }
|
||||
|
||||
|
||||
// public methods of FTermios
|
||||
//----------------------------------------------------------------------
|
||||
void FTermios::init()
|
||||
|
|
|
@ -57,10 +57,6 @@ namespace finalcut
|
|||
//----------------------------------------------------------------------
|
||||
|
||||
// constructors and destructor
|
||||
//----------------------------------------------------------------------
|
||||
FTermLinux::FTermLinux()
|
||||
{ }
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
FTermLinux::~FTermLinux() // destructor
|
||||
{
|
||||
|
|
|
@ -36,15 +36,6 @@ namespace finalcut
|
|||
// class FTermOpenBSD
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
// constructors and destructor
|
||||
//----------------------------------------------------------------------
|
||||
FTermOpenBSD::FTermOpenBSD()
|
||||
{ }
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
FTermOpenBSD::~FTermOpenBSD() // destructor
|
||||
{ }
|
||||
|
||||
// public methods of FTermOpenBSD
|
||||
//----------------------------------------------------------------------
|
||||
#if defined(__NetBSD__) || defined(__OpenBSD__)
|
||||
|
|
|
@ -35,14 +35,6 @@ namespace finalcut
|
|||
//----------------------------------------------------------------------
|
||||
FTextView::FTextView(FWidget* parent)
|
||||
: FWidget(parent)
|
||||
, data()
|
||||
, vbar(0)
|
||||
, hbar(0)
|
||||
, update_scrollbar(true)
|
||||
, xoffset(0)
|
||||
, yoffset(0)
|
||||
, nf_offset(0)
|
||||
, maxLineWidth(0)
|
||||
{
|
||||
init();
|
||||
}
|
||||
|
|
|
@ -36,12 +36,6 @@ namespace finalcut
|
|||
//----------------------------------------------------------------------
|
||||
FToggleButton::FToggleButton (FWidget* parent)
|
||||
: FWidget(parent)
|
||||
, checked(false)
|
||||
, label_offset_pos(0)
|
||||
, button_width(0)
|
||||
, button_group(0)
|
||||
, focus_inside_group(true)
|
||||
, text()
|
||||
{
|
||||
init();
|
||||
|
||||
|
@ -57,12 +51,6 @@ FToggleButton::FToggleButton (FWidget* parent)
|
|||
//----------------------------------------------------------------------
|
||||
FToggleButton::FToggleButton (const FString& txt, 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
|
||||
init();
|
||||
|
|
|
@ -34,11 +34,6 @@ namespace finalcut
|
|||
//----------------------------------------------------------------------
|
||||
FToolTip::FToolTip (FWidget* parent)
|
||||
: FWindow(parent)
|
||||
, text()
|
||||
, text_components(0)
|
||||
, text_split()
|
||||
, max_line_width(0)
|
||||
, text_num_lines(0)
|
||||
{
|
||||
init();
|
||||
}
|
||||
|
@ -47,10 +42,6 @@ FToolTip::FToolTip (FWidget* parent)
|
|||
FToolTip::FToolTip (const FString& txt, FWidget* parent)
|
||||
: FWindow(parent)
|
||||
, text(txt)
|
||||
, text_components(0)
|
||||
, text_split()
|
||||
, max_line_width(0)
|
||||
, text_num_lines(0)
|
||||
{
|
||||
init();
|
||||
}
|
||||
|
|
|
@ -68,9 +68,6 @@ FVTerm::charData FVTerm::i_ch;
|
|||
// constructors and destructor
|
||||
//----------------------------------------------------------------------
|
||||
FVTerm::FVTerm (bool initialize, bool disable_alt_screen)
|
||||
: print_area(0)
|
||||
, child_print_area(0)
|
||||
, vwin(0)
|
||||
{
|
||||
terminal_update_complete = false;
|
||||
|
||||
|
|
|
@ -57,26 +57,6 @@ uInt FWidget::modal_dialogs;
|
|||
FWidget::FWidget (FWidget* parent, bool disable_alt_screen)
|
||||
: FVTerm(bool(! parent), disable_alt_screen)
|
||||
, 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
|
||||
memset (&flags, 0, sizeof(flags));
|
||||
|
|
|
@ -40,10 +40,6 @@ FWindow* FWindow::previous_window = 0;
|
|||
//----------------------------------------------------------------------
|
||||
FWindow::FWindow(FWidget* parent)
|
||||
: FWidget(parent)
|
||||
, window_active(false)
|
||||
, zoomed(false)
|
||||
, win_focus_widget(0)
|
||||
, normalGeometry()
|
||||
{
|
||||
setWindowWidget();
|
||||
FRect geometry = getTermGeometry();
|
||||
|
|
|
@ -179,8 +179,8 @@ class FApplication : public FWidget
|
|||
// Data Members
|
||||
int app_argc;
|
||||
char** app_argv;
|
||||
long key_timeout;
|
||||
long dblclick_interval;
|
||||
long key_timeout{100000}; // 100 ms
|
||||
long dblclick_interval{500000}; // 500 ms
|
||||
static FMouseControl* mouse;
|
||||
static eventQueue* event_queue;
|
||||
static int quit_code;
|
||||
|
|
|
@ -157,24 +157,24 @@ class FButton : public FWidget
|
|||
void processClick();
|
||||
|
||||
// Data Members
|
||||
FString text;
|
||||
bool button_down;
|
||||
bool active_focus;
|
||||
bool click_animation;
|
||||
int click_time;
|
||||
int space_char;
|
||||
std::size_t hotkeypos;
|
||||
std::size_t indent;
|
||||
std::size_t center_offset;
|
||||
std::size_t vcenter_offset;
|
||||
std::size_t txtlength;
|
||||
FColor button_fg;
|
||||
FColor button_bg;
|
||||
FColor button_hotkey_fg;
|
||||
FColor button_focus_fg;
|
||||
FColor button_focus_bg;
|
||||
FColor button_inactive_fg;
|
||||
FColor button_inactive_bg;
|
||||
FString text{};
|
||||
bool button_down{false};
|
||||
bool active_focus{false};
|
||||
bool click_animation{true};
|
||||
int click_time{150};
|
||||
int space_char{int(' ')};
|
||||
std::size_t hotkeypos{NOT_SET};
|
||||
std::size_t indent{0};
|
||||
std::size_t center_offset{0};
|
||||
std::size_t vcenter_offset{0};
|
||||
std::size_t txtlength{0};
|
||||
FColor button_fg{wc.button_active_fg};
|
||||
FColor button_bg{wc.button_active_bg};
|
||||
FColor button_hotkey_fg{wc.button_hotkey_fg};
|
||||
FColor button_focus_fg{wc.button_active_focus_fg};
|
||||
FColor button_focus_bg{wc.button_active_focus_bg};
|
||||
FColor button_inactive_fg{wc.button_inactive_fg};
|
||||
FColor button_inactive_bg{wc.button_inactive_bg};
|
||||
};
|
||||
#pragma pack(pop)
|
||||
|
||||
|
|
|
@ -144,8 +144,8 @@ class FButtonGroup : public FScrollView
|
|||
void directFocus();
|
||||
|
||||
// Data Members
|
||||
FString text;
|
||||
FObjectList buttonlist;
|
||||
FString text{};
|
||||
FObjectList buttonlist{};
|
||||
};
|
||||
#pragma pack(pop)
|
||||
|
||||
|
|
|
@ -93,7 +93,7 @@ enum encoding
|
|||
};
|
||||
|
||||
// VT100 line graphic keys
|
||||
enum vt100_keys
|
||||
enum vt100_keys : char
|
||||
{
|
||||
vt100_key_rarrow = '+', // ► - arrow pointing right
|
||||
vt100_key_larrow = ',', // ◄ - arrow pointing left
|
||||
|
@ -136,7 +136,7 @@ enum vt100_keys
|
|||
};
|
||||
|
||||
// Unicode characters
|
||||
enum SpecialCharacter
|
||||
enum SpecialCharacter : wchar_t
|
||||
{
|
||||
Euro = 0x20ac, // €
|
||||
Pound = 0x00a3, // £
|
||||
|
@ -237,7 +237,7 @@ enum SpecialCharacter
|
|||
*/
|
||||
|
||||
// keyboard - single keys
|
||||
enum keys
|
||||
enum keys : FKey
|
||||
{
|
||||
Fckey_a = 0x00000001, // control-a
|
||||
Fckey_b = 0x00000002, // control-b
|
||||
|
@ -440,7 +440,7 @@ enum keys
|
|||
};
|
||||
|
||||
// Keyboard - modifier key combinations
|
||||
enum metakeys
|
||||
enum metakeys : FKey
|
||||
{
|
||||
Fmkey_ic = 0x01500100, // M-insert
|
||||
Fmkey_dc = 0x01500101, // M-delete
|
||||
|
@ -651,7 +651,7 @@ enum metakeys
|
|||
};
|
||||
|
||||
// Console color names
|
||||
enum colornames
|
||||
enum colornames : FColor
|
||||
{
|
||||
Black = 0,
|
||||
Blue = 1,
|
||||
|
|
|
@ -51,7 +51,7 @@ class FColorPalette
|
|||
{
|
||||
public:
|
||||
// Constructor
|
||||
FColorPalette();
|
||||
FColorPalette() = default;
|
||||
|
||||
// Destructor
|
||||
virtual ~FColorPalette();
|
||||
|
|
|
@ -222,21 +222,21 @@ class FDialog : public FWindow
|
|||
void cb_close (FWidget*, data_ptr);
|
||||
|
||||
// Data Members
|
||||
FString tb_text; // title bar text
|
||||
DialogCode result_code;
|
||||
bool zoom_button_pressed;
|
||||
bool zoom_button_active;
|
||||
bool setPos_error;
|
||||
bool setSize_error;
|
||||
FPoint titlebar_click_pos;
|
||||
FPoint resize_click_pos;
|
||||
FRect save_geometry; // required by keyboard move/size
|
||||
FMenu* dialog_menu;
|
||||
FMenuItem* dgl_menuitem;
|
||||
FMenuItem* move_size_item;
|
||||
FMenuItem* zoom_item;
|
||||
FMenuItem* close_item;
|
||||
FToolTip* tooltip;
|
||||
FString tb_text{}; // title bar text
|
||||
DialogCode result_code{FDialog::Reject};
|
||||
bool zoom_button_pressed{false};
|
||||
bool zoom_button_active{false};
|
||||
bool setPos_error{false};
|
||||
bool setSize_error{false};
|
||||
FPoint titlebar_click_pos{};
|
||||
FPoint resize_click_pos{};
|
||||
FRect save_geometry{}; // required by keyboard move/size
|
||||
FMenu* dialog_menu{0};
|
||||
FMenuItem* dgl_menuitem{0};
|
||||
FMenuItem* move_size_item{0};
|
||||
FMenuItem* zoom_item{0};
|
||||
FMenuItem* close_item{0};
|
||||
FToolTip* tooltip{0};
|
||||
|
||||
// Friend function from FMenu
|
||||
friend void FMenu::hideSuperMenus();
|
||||
|
|
|
@ -92,12 +92,13 @@ namespace finalcut
|
|||
class FEvent // event base class
|
||||
{
|
||||
public:
|
||||
FEvent() = default;
|
||||
explicit FEvent(int);
|
||||
virtual ~FEvent();
|
||||
int type() const;
|
||||
|
||||
protected:
|
||||
int t;
|
||||
int t{fc::None_Event};
|
||||
};
|
||||
|
||||
#pragma pack(pop)
|
||||
|
@ -113,6 +114,7 @@ class FEvent // event base class
|
|||
class FKeyEvent : public FEvent // keyboard event
|
||||
{
|
||||
public:
|
||||
FKeyEvent() = default;
|
||||
FKeyEvent (int, FKey);
|
||||
~FKeyEvent();
|
||||
|
||||
|
@ -122,8 +124,8 @@ class FKeyEvent : public FEvent // keyboard event
|
|||
void ignore();
|
||||
|
||||
protected:
|
||||
FKey k;
|
||||
bool accpt;
|
||||
FKey k{0};
|
||||
bool accpt{false};
|
||||
};
|
||||
|
||||
#pragma pack(pop)
|
||||
|
@ -139,8 +141,9 @@ class FKeyEvent : public FEvent // keyboard event
|
|||
class FMouseEvent : public FEvent // mouse event
|
||||
{
|
||||
public:
|
||||
FMouseEvent (int, const FPoint&, int);
|
||||
FMouseEvent() = default;
|
||||
FMouseEvent (int, const FPoint&, const FPoint&, int);
|
||||
FMouseEvent (int, const FPoint&, int);
|
||||
~FMouseEvent();
|
||||
|
||||
const FPoint& getPos() const;
|
||||
|
@ -170,6 +173,7 @@ class FMouseEvent : public FEvent // mouse event
|
|||
class FWheelEvent : public FEvent // wheel event
|
||||
{
|
||||
public:
|
||||
FWheelEvent() = default;
|
||||
FWheelEvent (int, const FPoint&, int);
|
||||
FWheelEvent (int, const FPoint&, const FPoint&, int);
|
||||
~FWheelEvent();
|
||||
|
@ -201,6 +205,7 @@ class FWheelEvent : public FEvent // wheel event
|
|||
class FFocusEvent : public FEvent // focus event
|
||||
{
|
||||
public:
|
||||
FFocusEvent() = default;
|
||||
explicit FFocusEvent (int);
|
||||
~FFocusEvent();
|
||||
|
||||
|
@ -212,8 +217,8 @@ class FFocusEvent : public FEvent // focus event
|
|||
void accept();
|
||||
void ignore();
|
||||
protected:
|
||||
bool accpt;
|
||||
fc::FocusTypes focus_type;
|
||||
bool accpt{true};
|
||||
fc::FocusTypes focus_type{fc::FocusDefiniteWidget};
|
||||
};
|
||||
|
||||
#pragma pack(pop)
|
||||
|
@ -228,13 +233,8 @@ class FFocusEvent : 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:
|
||||
FAccelEvent() = default;
|
||||
FAccelEvent (int, void*);
|
||||
~FAccelEvent();
|
||||
|
||||
|
@ -244,8 +244,14 @@ class FAccelEvent : public FEvent // focus event
|
|||
void ignore();
|
||||
|
||||
protected:
|
||||
bool accpt;
|
||||
bool accpt{false};
|
||||
void* focus_widget;
|
||||
|
||||
private:
|
||||
// Disable copy constructor
|
||||
FAccelEvent (const FAccelEvent&);
|
||||
// Disable assignment operator (=)
|
||||
FAccelEvent& operator = (const FAccelEvent&);
|
||||
};
|
||||
|
||||
#pragma pack(pop)
|
||||
|
@ -258,6 +264,7 @@ class FAccelEvent : public FEvent // focus event
|
|||
class FResizeEvent : public FEvent // resize event
|
||||
{
|
||||
public:
|
||||
FResizeEvent() = default;
|
||||
explicit FResizeEvent (int);
|
||||
~FResizeEvent();
|
||||
|
||||
|
@ -266,7 +273,7 @@ class FResizeEvent : public FEvent // resize event
|
|||
void ignore();
|
||||
|
||||
protected:
|
||||
bool accpt;
|
||||
bool accpt{false};
|
||||
};
|
||||
|
||||
|
||||
|
@ -278,6 +285,7 @@ class FResizeEvent : public FEvent // resize event
|
|||
class FShowEvent : public FEvent // show event
|
||||
{
|
||||
public:
|
||||
FShowEvent() = default;
|
||||
explicit FShowEvent (int);
|
||||
~FShowEvent();
|
||||
};
|
||||
|
@ -291,6 +299,7 @@ class FShowEvent : public FEvent // show event
|
|||
class FHideEvent : public FEvent // hide event
|
||||
{
|
||||
public:
|
||||
FHideEvent() = default;
|
||||
explicit FHideEvent (int);
|
||||
~FHideEvent();
|
||||
};
|
||||
|
@ -304,6 +313,7 @@ class FHideEvent : public FEvent // hide event
|
|||
class FCloseEvent : public FEvent // close event
|
||||
{
|
||||
public:
|
||||
FCloseEvent() = default;
|
||||
explicit FCloseEvent(int);
|
||||
~FCloseEvent();
|
||||
|
||||
|
@ -312,7 +322,7 @@ class FCloseEvent : public FEvent // close event
|
|||
void ignore();
|
||||
|
||||
protected:
|
||||
bool accpt;
|
||||
bool accpt{false};
|
||||
};
|
||||
|
||||
|
||||
|
@ -327,6 +337,7 @@ class FCloseEvent : public FEvent // close event
|
|||
class FTimerEvent : public FEvent // timer event
|
||||
{
|
||||
public:
|
||||
FTimerEvent() = default;
|
||||
FTimerEvent(int, int);
|
||||
~FTimerEvent();
|
||||
|
||||
|
|
|
@ -186,17 +186,17 @@ class FFileDialog : public FDialog
|
|||
void cb_processShowHidden (FWidget*, data_ptr);
|
||||
|
||||
// Data Members
|
||||
DIR* directory_stream;
|
||||
dirEntries dir_entries;
|
||||
FString directory;
|
||||
FString filter_pattern;
|
||||
FLineEdit filename;
|
||||
FListBox filebrowser;
|
||||
FCheckBox hidden;
|
||||
FButton cancel;
|
||||
FButton open;
|
||||
DialogType dlg_type;
|
||||
bool show_hidden;
|
||||
DIR* directory_stream{0};
|
||||
dirEntries dir_entries{};
|
||||
FString directory{};
|
||||
FString filter_pattern{};
|
||||
FLineEdit filename{this};
|
||||
FListBox filebrowser{this};
|
||||
FCheckBox hidden{this};
|
||||
FButton cancel{this};
|
||||
FButton open{this};
|
||||
DialogType dlg_type{FFileDialog::Open};
|
||||
bool show_hidden{false};
|
||||
|
||||
// Friend functions
|
||||
friend bool sortByName ( const FFileDialog::dir_entry&
|
||||
|
|
|
@ -67,8 +67,8 @@ class FKeyboardCommand
|
|||
|
||||
private:
|
||||
// Data Members
|
||||
FApplication* instance;
|
||||
void (FApplication::*handler)();
|
||||
FApplication* instance{0};
|
||||
void (FApplication::*handler)(){0};
|
||||
};
|
||||
#pragma pack(pop)
|
||||
|
||||
|
@ -84,7 +84,7 @@ class FKeyboard
|
|||
{
|
||||
public:
|
||||
// Constants
|
||||
static const std::size_t FIFO_BUF_SIZE = 512;
|
||||
static const std::size_t FIFO_BUF_SIZE{512};
|
||||
|
||||
// Typedef
|
||||
typedef char keybuffer[FIFO_BUF_SIZE];
|
||||
|
@ -131,7 +131,7 @@ class FKeyboard
|
|||
|
||||
private:
|
||||
// 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);
|
||||
|
||||
// Disable copy constructor
|
||||
|
@ -166,23 +166,23 @@ class FKeyboard
|
|||
void escapeKeyPressed();
|
||||
|
||||
// Data Members
|
||||
FKey key;
|
||||
char read_buf[READ_BUF_SIZE];
|
||||
char fifo_buf[FIFO_BUF_SIZE];
|
||||
int fifo_offset;
|
||||
bool fifo_in_use;
|
||||
int stdin_status_flags;
|
||||
FKey key{0};
|
||||
char read_buf[READ_BUF_SIZE]{};
|
||||
char fifo_buf[FIFO_BUF_SIZE]{};
|
||||
int fifo_offset{0};
|
||||
bool fifo_in_use{false};
|
||||
int stdin_status_flags{0};
|
||||
static long key_timeout;
|
||||
bool input_data_pending;
|
||||
bool utf8_input;
|
||||
bool mouse_support;
|
||||
bool non_blocking_stdin;
|
||||
FKeyboardCommand keypressed_cmd;
|
||||
FKeyboardCommand keyreleased_cmd;
|
||||
FKeyboardCommand escape_key_cmd;
|
||||
bool input_data_pending{false};
|
||||
bool utf8_input{false};
|
||||
bool mouse_support{true};
|
||||
bool non_blocking_stdin{false};
|
||||
FKeyboardCommand keypressed_cmd{};
|
||||
FKeyboardCommand keyreleased_cmd{};
|
||||
FKeyboardCommand escape_key_cmd{};
|
||||
|
||||
static timeval time_keypressed;
|
||||
fc::fkeymap* key_map;
|
||||
fc::fkeymap* key_map{0};
|
||||
|
||||
#if defined(__linux__)
|
||||
#undef linux
|
||||
|
|
|
@ -153,15 +153,15 @@ class FLabel : public FWidget
|
|||
, std::size_t, std::size_t = 0 );
|
||||
|
||||
// Data Members
|
||||
FStringList multiline_text;
|
||||
bool multiline;
|
||||
FString text;
|
||||
fc::text_alignment alignment;
|
||||
FColor emphasis_color;
|
||||
FColor ellipsis_color;
|
||||
bool emphasis;
|
||||
bool reverse_mode;
|
||||
FWidget* accel_widget;
|
||||
FStringList multiline_text{};
|
||||
bool multiline{false};
|
||||
FString text{};
|
||||
fc::text_alignment alignment{fc::alignLeft};
|
||||
FColor emphasis_color{wc.label_emphasis_fg};
|
||||
FColor ellipsis_color{wc.label_ellipsis_fg};
|
||||
bool emphasis{false};
|
||||
bool reverse_mode{false};
|
||||
FWidget* accel_widget{0};
|
||||
};
|
||||
#pragma pack(pop)
|
||||
|
||||
|
|
|
@ -170,16 +170,16 @@ class FLineEdit : public FWidget
|
|||
void processChanged();
|
||||
|
||||
// Data Members
|
||||
FString text;
|
||||
FString label_text;
|
||||
FLabel* label;
|
||||
label_o label_orientation;
|
||||
dragScroll drag_scroll;
|
||||
bool scroll_timer;
|
||||
int scroll_repeat;
|
||||
bool insert_mode;
|
||||
std::size_t cursor_pos;
|
||||
std::size_t text_offset;
|
||||
FString text{""};
|
||||
FString label_text{""};
|
||||
FLabel* label{};
|
||||
label_o label_orientation{FLineEdit::label_left};
|
||||
dragScroll drag_scroll{FLineEdit::noScroll};
|
||||
bool scroll_timer{false};
|
||||
int scroll_repeat{100};
|
||||
bool insert_mode{true};
|
||||
std::size_t cursor_pos{0};
|
||||
std::size_t text_offset{0};
|
||||
};
|
||||
#pragma pack(pop)
|
||||
|
||||
|
|
|
@ -99,10 +99,10 @@ class FListBoxItem
|
|||
friend class FListBox;
|
||||
|
||||
// Data Members
|
||||
FString text;
|
||||
FWidget::data_ptr data_pointer;
|
||||
fc::brackets_type brackets;
|
||||
bool selected;
|
||||
FString text{};
|
||||
FWidget::data_ptr data_pointer{0};
|
||||
fc::brackets_type brackets{fc::NoBrackets};
|
||||
bool selected{false};
|
||||
};
|
||||
#pragma pack(pop)
|
||||
|
||||
|
@ -299,30 +299,30 @@ class FListBox : public FWidget
|
|||
// Function Pointer
|
||||
void (*convertToItem) ( FListBoxItem&
|
||||
, FWidget::data_ptr
|
||||
, int index );
|
||||
, int index ){0};
|
||||
|
||||
// Data Members
|
||||
listBoxItems itemlist;
|
||||
FWidget::data_ptr source_container;
|
||||
convert_type conv_type;
|
||||
FScrollbar* vbar;
|
||||
FScrollbar* hbar;
|
||||
FString text;
|
||||
FString inc_search;
|
||||
bool multi_select;
|
||||
bool mouse_select;
|
||||
fc::dragScroll drag_scroll;
|
||||
bool scroll_timer;
|
||||
int scroll_repeat;
|
||||
int scroll_distance;
|
||||
std::size_t current;
|
||||
int last_current;
|
||||
int secect_from_item;
|
||||
int xoffset;
|
||||
int yoffset;
|
||||
int last_yoffset;
|
||||
std::size_t nf_offset;
|
||||
std::size_t max_line_width;
|
||||
listBoxItems itemlist{};
|
||||
FWidget::data_ptr source_container{0};
|
||||
convert_type conv_type{FListBox::no_convert};
|
||||
FScrollbar* vbar{0};
|
||||
FScrollbar* hbar{0};
|
||||
FString text{};
|
||||
FString inc_search{};
|
||||
bool multi_select{false};
|
||||
bool mouse_select{false};
|
||||
fc::dragScroll drag_scroll{fc::noScroll};
|
||||
bool scroll_timer{false};
|
||||
int scroll_repeat{100};
|
||||
int scroll_distance{1};
|
||||
std::size_t current{0};
|
||||
int last_current{-1};
|
||||
int secect_from_item{-1};
|
||||
int xoffset{0};
|
||||
int yoffset{0};
|
||||
int last_yoffset{-1};
|
||||
std::size_t nf_offset{0};
|
||||
std::size_t max_line_width{0};
|
||||
};
|
||||
#pragma pack(pop)
|
||||
|
||||
|
@ -335,28 +335,6 @@ inline FListBox::FListBox ( Iterator first
|
|||
, InsertConverter convert
|
||||
, 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();
|
||||
|
||||
|
@ -373,28 +351,6 @@ inline FListBox::FListBox ( Container container
|
|||
, LazyConverter convert
|
||||
, 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();
|
||||
insert (container, convert);
|
||||
|
|
|
@ -128,14 +128,14 @@ class FListViewItem : public FObject
|
|||
void resetVisibleLineCounter();
|
||||
|
||||
// Data Members
|
||||
FStringList column_list;
|
||||
FWidget::data_ptr data_pointer;
|
||||
FObjectIterator root;
|
||||
std::size_t visible_lines;
|
||||
bool expandable;
|
||||
bool is_expand;
|
||||
bool checkable;
|
||||
bool is_checked;
|
||||
FStringList column_list{};
|
||||
FWidget::data_ptr data_pointer{0};
|
||||
FObjectIterator root{};
|
||||
std::size_t visible_lines{1};
|
||||
bool expandable{false};
|
||||
bool is_expand{false};
|
||||
bool checkable{false};
|
||||
bool is_checked{false};
|
||||
|
||||
// Friend class
|
||||
friend class FListView;
|
||||
|
@ -198,7 +198,7 @@ class FListViewIterator
|
|||
typedef std::stack<FObjectIterator> FObjectIteratorStack;
|
||||
|
||||
// Constructor
|
||||
FListViewIterator ();
|
||||
FListViewIterator () = default;
|
||||
FListViewIterator (FObjectIterator);
|
||||
|
||||
// Overloaded operators
|
||||
|
@ -226,9 +226,9 @@ class FListViewIterator
|
|||
void prevElement (FObjectIterator&);
|
||||
|
||||
// Data Members
|
||||
FObjectIteratorStack iter_path;
|
||||
FObjectIterator node;
|
||||
int position;
|
||||
FObjectIteratorStack iter_path{};
|
||||
FObjectIterator node{};
|
||||
int position{0};
|
||||
};
|
||||
#pragma pack(pop)
|
||||
|
||||
|
@ -422,34 +422,34 @@ class FListView : public FWidget
|
|||
void cb_HBarChange (FWidget*, data_ptr);
|
||||
|
||||
// Data Members
|
||||
FObjectIterator root;
|
||||
FObjectList selflist;
|
||||
FObjectList itemlist;
|
||||
FListViewIterator current_iter;
|
||||
FListViewIterator first_visible_line;
|
||||
FListViewIterator last_visible_line;
|
||||
headerItems header;
|
||||
FTermBuffer headerline;
|
||||
FScrollbar* vbar;
|
||||
FScrollbar* hbar;
|
||||
fc::dragScroll drag_scroll;
|
||||
int scroll_repeat;
|
||||
int scroll_distance;
|
||||
bool scroll_timer;
|
||||
bool tree_view;
|
||||
bool hide_sort_indicator;
|
||||
bool has_checkable_items;
|
||||
FPoint clicked_expander_pos;
|
||||
FPoint clicked_header_pos;
|
||||
const FListViewItem* clicked_checkbox_item;
|
||||
int xoffset;
|
||||
int nf_offset;
|
||||
int max_line_width;
|
||||
int sort_column;
|
||||
sortTypes sort_type;
|
||||
fc::sorting_order sort_order;
|
||||
bool (*user_defined_ascending) (const FObject*, const FObject*);
|
||||
bool (*user_defined_descending) (const FObject*, const FObject*);
|
||||
FObjectIterator root{};
|
||||
FObjectList selflist{};
|
||||
FObjectList itemlist{};
|
||||
FListViewIterator current_iter{};
|
||||
FListViewIterator first_visible_line{};
|
||||
FListViewIterator last_visible_line{};
|
||||
headerItems header{};
|
||||
FTermBuffer headerline{};
|
||||
FScrollbar* vbar{0};
|
||||
FScrollbar* hbar{0};
|
||||
fc::dragScroll drag_scroll{fc::noScroll};
|
||||
int scroll_repeat{100};
|
||||
int scroll_distance{1};
|
||||
bool scroll_timer{false};
|
||||
bool tree_view{false};
|
||||
bool hide_sort_indicator{false};
|
||||
bool has_checkable_items{false};
|
||||
FPoint clicked_expander_pos{-1, -1};
|
||||
FPoint clicked_header_pos{-1, -1};
|
||||
const FListViewItem* clicked_checkbox_item{0};
|
||||
int xoffset{0};
|
||||
int nf_offset{0};
|
||||
int max_line_width{1};
|
||||
int sort_column{-1};
|
||||
sortTypes sort_type{};
|
||||
fc::sorting_order sort_order{fc::unsorted};
|
||||
bool (*user_defined_ascending) (const FObject*, const FObject*){0};
|
||||
bool (*user_defined_descending) (const FObject*, const FObject*){0};
|
||||
|
||||
// Friend class
|
||||
friend class FListViewItem;
|
||||
|
|
|
@ -231,14 +231,14 @@ class FMenu : public FWindow, public FMenuList
|
|||
friend class FRadioMenuItem;
|
||||
|
||||
// Data Members
|
||||
FMenuItem item;
|
||||
FWidget* super_menu;
|
||||
FMenu* opened_sub_menu;
|
||||
FMenu* shown_sub_menu;
|
||||
std::size_t max_item_width;
|
||||
std::size_t hotkeypos;
|
||||
bool mouse_down;
|
||||
bool has_checkable_items;
|
||||
FMenuItem item{};
|
||||
FWidget* super_menu{0};
|
||||
FMenu* opened_sub_menu{0};
|
||||
FMenu* shown_sub_menu{0};
|
||||
std::size_t max_item_width{0};
|
||||
std::size_t hotkeypos{NOT_SET};
|
||||
bool mouse_down{false};
|
||||
bool has_checkable_items{false};
|
||||
};
|
||||
#pragma pack(pop)
|
||||
|
||||
|
|
|
@ -154,10 +154,10 @@ class FMenuBar : public FWindow, public FMenuList
|
|||
friend class FMenuItem;
|
||||
|
||||
// Data Members
|
||||
bool mouse_down;
|
||||
bool drop_down;
|
||||
bool focus_changed;
|
||||
std::size_t screenWidth;
|
||||
bool mouse_down{false};
|
||||
bool drop_down{false};
|
||||
bool focus_changed{false};
|
||||
std::size_t screenWidth{80};
|
||||
};
|
||||
#pragma pack(pop)
|
||||
|
||||
|
|
|
@ -145,19 +145,19 @@ class FMenuItem : public FWidget
|
|||
bool isMenu (FWidget*) const;
|
||||
|
||||
// Data Members
|
||||
FString text;
|
||||
bool selected;
|
||||
bool separator;
|
||||
bool checkable;
|
||||
bool checked;
|
||||
bool radio_button;
|
||||
bool dialog_index;
|
||||
std::size_t text_length;
|
||||
uChar hotkey;
|
||||
FKey accel_key;
|
||||
FMenu* menu;
|
||||
FWidget* super_menu;
|
||||
FDialog* associated_window;
|
||||
FString text{};
|
||||
bool selected{false};
|
||||
bool separator{false};
|
||||
bool checkable{false};
|
||||
bool checked{false};
|
||||
bool radio_button{false};
|
||||
bool dialog_index{false};
|
||||
std::size_t text_length{0};
|
||||
uChar hotkey{0};
|
||||
FKey accel_key{0};
|
||||
FMenu* menu{0};
|
||||
FWidget* super_menu{0};
|
||||
FDialog* associated_window{0};
|
||||
|
||||
private:
|
||||
// Disable copy constructor
|
||||
|
|
|
@ -62,7 +62,7 @@ class FMenuList
|
|||
{
|
||||
public:
|
||||
// Constructor
|
||||
FMenuList();
|
||||
FMenuList() = default;
|
||||
|
||||
// Destructor
|
||||
virtual ~FMenuList();
|
||||
|
@ -91,8 +91,8 @@ class FMenuList
|
|||
void unselectItem();
|
||||
|
||||
protected:
|
||||
FMenuItem* selected_item;
|
||||
std::vector<FMenuItem*> item_list;
|
||||
FMenuItem* selected_item{};
|
||||
std::vector<FMenuItem*> item_list{};
|
||||
|
||||
private:
|
||||
// Disable copy constructor
|
||||
|
|
|
@ -159,17 +159,17 @@ class FMessageBox : public FDialog
|
|||
void adjustButtons();
|
||||
|
||||
// Data Members
|
||||
FString headline_text;
|
||||
FString text;
|
||||
FString* text_components;
|
||||
FStringList text_split;
|
||||
std::size_t max_line_width;
|
||||
bool center_text;
|
||||
FColor emphasis_color;
|
||||
uInt num_buttons;
|
||||
uInt text_num_lines;
|
||||
int button_digit[3];
|
||||
FButton* button[3];
|
||||
FString headline_text{};
|
||||
FString text{};
|
||||
FString* text_components{0};
|
||||
FStringList text_split{};
|
||||
std::size_t max_line_width{0};
|
||||
bool center_text{false};
|
||||
FColor emphasis_color{wc.dialog_emphasis_fg};
|
||||
uInt num_buttons{0};
|
||||
uInt text_num_lines{0};
|
||||
int button_digit[3]{};
|
||||
FButton* button[3]{0};
|
||||
};
|
||||
#pragma pack(pop)
|
||||
|
||||
|
|
|
@ -170,16 +170,16 @@ class FMouse
|
|||
bool isDblclickTimeout (timeval*);
|
||||
|
||||
// Data Members
|
||||
button b_state;
|
||||
bool mouse_event_occurred;
|
||||
bool input_data_pending;
|
||||
long dblclick_interval;
|
||||
short max_width;
|
||||
short max_height;
|
||||
struct timeval time_mousepressed;
|
||||
FPoint zero_point;
|
||||
FPoint mouse; // mouse click position
|
||||
FPoint new_mouse_position;
|
||||
button b_state{};
|
||||
bool mouse_event_occurred{false};
|
||||
bool input_data_pending{false};
|
||||
long dblclick_interval{500000}; // 500 ms
|
||||
short max_width{80};
|
||||
short max_height{25};
|
||||
struct timeval time_mousepressed{};
|
||||
FPoint zero_point{0, 0}; // zero point (x=0, y=0)
|
||||
FPoint mouse{0, 0}; // mouse click position
|
||||
FPoint new_mouse_position{};
|
||||
};
|
||||
#pragma pack(pop)
|
||||
|
||||
|
@ -236,10 +236,10 @@ class FMouseGPM : public FMouse
|
|||
int gpmEvent (bool = true);
|
||||
|
||||
// Data Member
|
||||
Gpm_Event gpm_ev;
|
||||
bool has_gpm_mouse_data;
|
||||
bool gpm_mouse_enabled;
|
||||
int stdin_no;
|
||||
Gpm_Event gpm_ev{};
|
||||
bool has_gpm_mouse_data{false};
|
||||
bool gpm_mouse_enabled{false};
|
||||
int stdin_no{0};
|
||||
};
|
||||
#pragma pack(pop)
|
||||
|
||||
|
@ -314,8 +314,8 @@ class FMouseX11 : public FMouse
|
|||
void setButtonState (int, struct timeval*);
|
||||
|
||||
// Data Member
|
||||
char x11_mouse[MOUSE_BUF_SIZE];
|
||||
uChar x11_button_state;
|
||||
char x11_mouse[MOUSE_BUF_SIZE]{};
|
||||
uChar x11_button_state{all_buttons_released};
|
||||
};
|
||||
#pragma pack(pop)
|
||||
|
||||
|
@ -377,8 +377,8 @@ class FMouseSGR : public FMouse
|
|||
void setReleasedButtonState (int);
|
||||
|
||||
// Data Members
|
||||
char sgr_mouse[MOUSE_BUF_SIZE];
|
||||
uChar sgr_button_state;
|
||||
char sgr_mouse[MOUSE_BUF_SIZE]{};
|
||||
uChar sgr_button_state{0x23};
|
||||
};
|
||||
#pragma pack(pop)
|
||||
|
||||
|
@ -440,8 +440,8 @@ class FMouseUrxvt : public FMouse
|
|||
void setButtonState (int, struct timeval*);
|
||||
|
||||
// Data Members
|
||||
char urxvt_mouse[MOUSE_BUF_SIZE];
|
||||
uChar urxvt_button_state;
|
||||
char urxvt_mouse[MOUSE_BUF_SIZE]{};
|
||||
uChar urxvt_button_state{all_buttons_released};
|
||||
};
|
||||
#pragma pack(pop)
|
||||
|
||||
|
@ -511,11 +511,11 @@ class FMouseControl
|
|||
void disableXTermMouse();
|
||||
|
||||
// Data Member
|
||||
std::map<FMouse::mouse_type, FMouse*> mouse_protocol;
|
||||
std::map<FMouse::mouse_type, FMouse*>::iterator iter;
|
||||
FPoint zero_point;
|
||||
bool use_gpm_mouse;
|
||||
bool use_xterm_mouse;
|
||||
std::map<FMouse::mouse_type, FMouse*> mouse_protocol{};
|
||||
std::map<FMouse::mouse_type, FMouse*>::iterator iter{};
|
||||
FPoint zero_point{0, 0};
|
||||
bool use_gpm_mouse{false};
|
||||
bool use_xterm_mouse{false};
|
||||
};
|
||||
#pragma pack(pop)
|
||||
|
||||
|
|
|
@ -133,7 +133,7 @@ class FObject
|
|||
virtual void onTimer (FTimerEvent*);
|
||||
|
||||
// Data Member
|
||||
bool widget_object;
|
||||
bool widget_object{false};
|
||||
|
||||
private:
|
||||
// Disable copy constructor
|
||||
|
@ -146,9 +146,9 @@ class FObject
|
|||
virtual void performTimerAction (const FObject*, const FEvent*);
|
||||
|
||||
// Data Members
|
||||
FObject* parent_obj;
|
||||
FObjectList children_list;
|
||||
bool has_parent;
|
||||
FObject* parent_obj{};
|
||||
FObjectList children_list{}; // no children yet
|
||||
bool has_parent{false};
|
||||
static bool timer_modify_lock;
|
||||
static TimerList* timer_list;
|
||||
};
|
||||
|
|
|
@ -326,54 +326,54 @@ class FOptiAttr
|
|||
bool append_sequence (char[]);
|
||||
|
||||
// Data Members
|
||||
capability F_enter_bold_mode;
|
||||
capability F_exit_bold_mode;
|
||||
capability F_enter_dim_mode;
|
||||
capability F_exit_dim_mode;
|
||||
capability F_enter_italics_mode;
|
||||
capability F_exit_italics_mode;
|
||||
capability F_enter_underline_mode;
|
||||
capability F_exit_underline_mode;
|
||||
capability F_enter_blink_mode;
|
||||
capability F_exit_blink_mode;
|
||||
capability F_enter_reverse_mode;
|
||||
capability F_exit_reverse_mode;
|
||||
capability F_enter_standout_mode;
|
||||
capability F_exit_standout_mode;
|
||||
capability F_enter_secure_mode;
|
||||
capability F_exit_secure_mode;
|
||||
capability F_enter_protected_mode;
|
||||
capability F_exit_protected_mode;
|
||||
capability F_enter_crossed_out_mode;
|
||||
capability F_exit_crossed_out_mode;
|
||||
capability F_enter_dbl_underline_mode;
|
||||
capability F_exit_dbl_underline_mode;
|
||||
capability F_set_attributes;
|
||||
capability F_exit_attribute_mode;
|
||||
capability F_enter_alt_charset_mode;
|
||||
capability F_exit_alt_charset_mode;
|
||||
capability F_enter_pc_charset_mode;
|
||||
capability F_exit_pc_charset_mode;
|
||||
capability F_set_a_foreground;
|
||||
capability F_set_a_background;
|
||||
capability F_set_foreground;
|
||||
capability F_set_background;
|
||||
capability F_set_color_pair;
|
||||
capability F_orig_pair;
|
||||
capability F_orig_colors;
|
||||
capability F_enter_bold_mode{};
|
||||
capability F_exit_bold_mode{};
|
||||
capability F_enter_dim_mode{};
|
||||
capability F_exit_dim_mode{};
|
||||
capability F_enter_italics_mode{};
|
||||
capability F_exit_italics_mode{};
|
||||
capability F_enter_underline_mode{};
|
||||
capability F_exit_underline_mode{};
|
||||
capability F_enter_blink_mode{};
|
||||
capability F_exit_blink_mode{};
|
||||
capability F_enter_reverse_mode{};
|
||||
capability F_exit_reverse_mode{};
|
||||
capability F_enter_standout_mode{};
|
||||
capability F_exit_standout_mode{};
|
||||
capability F_enter_secure_mode{};
|
||||
capability F_exit_secure_mode{};
|
||||
capability F_enter_protected_mode{};
|
||||
capability F_exit_protected_mode{};
|
||||
capability F_enter_crossed_out_mode{};
|
||||
capability F_exit_crossed_out_mode{};
|
||||
capability F_enter_dbl_underline_mode{};
|
||||
capability F_exit_dbl_underline_mode{};
|
||||
capability F_set_attributes{};
|
||||
capability F_exit_attribute_mode{};
|
||||
capability F_enter_alt_charset_mode{};
|
||||
capability F_exit_alt_charset_mode{};
|
||||
capability F_enter_pc_charset_mode{};
|
||||
capability F_exit_pc_charset_mode{};
|
||||
capability F_set_a_foreground{};
|
||||
capability F_set_a_background{};
|
||||
capability F_set_foreground{};
|
||||
capability F_set_background{};
|
||||
capability F_set_color_pair{};
|
||||
capability F_orig_pair{};
|
||||
capability F_orig_colors{};
|
||||
|
||||
charData on;
|
||||
charData off;
|
||||
charData reset_byte_mask;
|
||||
charData on{};
|
||||
charData off{};
|
||||
charData reset_byte_mask{};
|
||||
|
||||
int max_color;
|
||||
int attr_without_color;
|
||||
bool ansi_default_color;
|
||||
bool alt_equal_pc_charset;
|
||||
bool monochron;
|
||||
bool fake_reverse;
|
||||
char attr_buf[8192];
|
||||
char* attr_ptr;
|
||||
int max_color{1};
|
||||
int attr_without_color{0};
|
||||
bool ansi_default_color{false};
|
||||
bool alt_equal_pc_charset{false};
|
||||
bool monochron{true};
|
||||
bool fake_reverse{false};
|
||||
char attr_buf[8192]{};
|
||||
char* attr_ptr{attr_buf};
|
||||
};
|
||||
#pragma pack(pop)
|
||||
|
||||
|
|
|
@ -169,7 +169,7 @@ class FOptiMove
|
|||
|
||||
private:
|
||||
// Constant
|
||||
static const std::size_t BUF_SIZE = 512;
|
||||
static const std::size_t BUF_SIZE{512};
|
||||
|
||||
// Typedef
|
||||
typedef struct
|
||||
|
@ -180,9 +180,9 @@ class FOptiMove
|
|||
} capability;
|
||||
|
||||
// Constants
|
||||
static const int LONG_DURATION = INT_MAX;
|
||||
static const int LONG_DURATION{INT_MAX};
|
||||
// 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
|
||||
|
||||
// Methods
|
||||
|
@ -211,35 +211,35 @@ class FOptiMove
|
|||
friend void printDurations (const FOptiMove&);
|
||||
|
||||
// Data Members
|
||||
capability F_cursor_home;
|
||||
capability F_carriage_return;
|
||||
capability F_cursor_to_ll;
|
||||
capability F_tab;
|
||||
capability F_back_tab;
|
||||
capability F_cursor_up;
|
||||
capability F_cursor_down;
|
||||
capability F_cursor_left;
|
||||
capability F_cursor_right;
|
||||
capability F_cursor_address;
|
||||
capability F_column_address;
|
||||
capability F_row_address;
|
||||
capability F_parm_up_cursor;
|
||||
capability F_parm_down_cursor;
|
||||
capability F_parm_left_cursor;
|
||||
capability F_parm_right_cursor;
|
||||
capability F_erase_chars;
|
||||
capability F_repeat_char;
|
||||
capability F_clr_bol;
|
||||
capability F_clr_eol;
|
||||
capability F_cursor_home{};
|
||||
capability F_carriage_return{};
|
||||
capability F_cursor_to_ll{};
|
||||
capability F_tab{};
|
||||
capability F_back_tab{};
|
||||
capability F_cursor_up{};
|
||||
capability F_cursor_down{};
|
||||
capability F_cursor_left{};
|
||||
capability F_cursor_right{};
|
||||
capability F_cursor_address{};
|
||||
capability F_column_address{};
|
||||
capability F_row_address{};
|
||||
capability F_parm_up_cursor{};
|
||||
capability F_parm_down_cursor{};
|
||||
capability F_parm_left_cursor{};
|
||||
capability F_parm_right_cursor{};
|
||||
capability F_erase_chars{};
|
||||
capability F_repeat_char{};
|
||||
capability F_clr_bol{};
|
||||
capability F_clr_eol{};
|
||||
|
||||
bool automatic_left_margin;
|
||||
bool eat_nl_glitch;
|
||||
char move_buf[BUF_SIZE];
|
||||
int char_duration;
|
||||
int baudrate;
|
||||
int tabstop;
|
||||
std::size_t screen_width;
|
||||
std::size_t screen_height;
|
||||
bool automatic_left_margin{false};
|
||||
bool eat_nl_glitch{false};
|
||||
char move_buf[BUF_SIZE]{};
|
||||
int char_duration{1};
|
||||
int baudrate{9600};
|
||||
int tabstop{0};
|
||||
std::size_t screen_width{80};
|
||||
std::size_t screen_height{24};
|
||||
};
|
||||
#pragma pack(pop)
|
||||
|
||||
|
|
|
@ -52,7 +52,7 @@ class FPoint
|
|||
{
|
||||
public:
|
||||
// Constructors
|
||||
FPoint ();
|
||||
FPoint () = default;
|
||||
FPoint (const FPoint&); // copy constructor
|
||||
FPoint (int, int);
|
||||
|
||||
|
@ -89,19 +89,13 @@ class FPoint
|
|||
|
||||
private:
|
||||
// Data Members
|
||||
int xpos;
|
||||
int ypos;
|
||||
int xpos{0};
|
||||
int ypos{0};
|
||||
};
|
||||
#pragma pack(pop)
|
||||
|
||||
|
||||
// FPoint inline functions
|
||||
//----------------------------------------------------------------------
|
||||
inline FPoint::FPoint()
|
||||
: xpos(0)
|
||||
, ypos(0)
|
||||
{ }
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
inline FPoint::FPoint (const FPoint& p) // copy constructor
|
||||
: xpos(p.xpos)
|
||||
|
|
|
@ -104,8 +104,8 @@ class FProgressbar : public FWidget
|
|||
void drawBar();
|
||||
|
||||
// Data Members
|
||||
std::size_t percentage;
|
||||
std::size_t bar_length;
|
||||
std::size_t percentage{NOT_SET};
|
||||
std::size_t bar_length{getWidth()};
|
||||
};
|
||||
#pragma pack(pop)
|
||||
|
||||
|
|
|
@ -52,7 +52,7 @@ class FRect
|
|||
{
|
||||
public:
|
||||
// Constructors
|
||||
FRect ();
|
||||
FRect () = default;
|
||||
FRect (const FRect&); // copy constructor
|
||||
FRect (int, int, std::size_t, std::size_t);
|
||||
FRect (const FPoint&, const FPoint&);
|
||||
|
@ -124,23 +124,15 @@ class FRect
|
|||
|
||||
private:
|
||||
// Data Members
|
||||
int X1;
|
||||
int Y1;
|
||||
int X2;
|
||||
int Y2;
|
||||
int X1{0};
|
||||
int Y1{0};
|
||||
int X2{-1};
|
||||
int Y2{-1};
|
||||
};
|
||||
#pragma pack(pop)
|
||||
|
||||
|
||||
// FRect inline functions
|
||||
//----------------------------------------------------------------------
|
||||
inline FRect::FRect()
|
||||
: X1(0)
|
||||
, Y1(0)
|
||||
, X2(-1)
|
||||
, Y2(-1)
|
||||
{ }
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
inline FRect::FRect (const FRect& r) // copy constructor
|
||||
: X1(r.X1)
|
||||
|
|
|
@ -141,24 +141,24 @@ class FScrollbar : public FWidget
|
|||
void processScroll();
|
||||
|
||||
// Data Members
|
||||
sType scroll_type;
|
||||
bool threshold_reached;
|
||||
int threshold_time;
|
||||
int repeat_time;
|
||||
int slider_click_pos;
|
||||
int slider_click_stop_pos;
|
||||
int current_slider_pos;
|
||||
int slider_pos;
|
||||
std::size_t slider_length;
|
||||
std::size_t bar_length;
|
||||
int val;
|
||||
int min;
|
||||
int max;
|
||||
double steps;
|
||||
int pagesize;
|
||||
std::size_t length;
|
||||
int bar_orientation;
|
||||
int max_color;
|
||||
sType scroll_type{FScrollbar::noScroll};
|
||||
bool threshold_reached{false};
|
||||
int threshold_time{500};
|
||||
int repeat_time{10};
|
||||
int slider_click_pos{-1};
|
||||
int slider_click_stop_pos{-1};
|
||||
int current_slider_pos{-1};
|
||||
int slider_pos{0};
|
||||
std::size_t slider_length{18}; // = bar_length
|
||||
std::size_t bar_length{18}; // = length - 2
|
||||
int val{0};
|
||||
int min{0};
|
||||
int max{99};
|
||||
double steps{1};
|
||||
int pagesize{0};
|
||||
std::size_t length{20};
|
||||
int bar_orientation{fc::vertical};
|
||||
int max_color{getMaxColor()};
|
||||
};
|
||||
#pragma pack(pop)
|
||||
|
||||
|
|
|
@ -176,17 +176,17 @@ class FScrollView : public FWidget
|
|||
void cb_HBarChange (FWidget*, data_ptr);
|
||||
|
||||
// Data Members
|
||||
FRect scroll_geometry;
|
||||
FRect viewport_geometry;
|
||||
term_area* viewport; // virtual scroll content
|
||||
FScrollbar* vbar;
|
||||
FScrollbar* hbar;
|
||||
uInt8 nf_offset;
|
||||
bool border;
|
||||
bool use_own_print_area;
|
||||
bool update_scrollbar;
|
||||
fc::scrollBarMode vMode; // fc:Auto, fc::Hidden or fc::Scroll
|
||||
fc::scrollBarMode hMode;
|
||||
FRect scroll_geometry{1, 1, 1, 1};
|
||||
FRect viewport_geometry{};
|
||||
term_area* viewport{0}; // virtual scroll content
|
||||
FScrollbar* vbar{0};
|
||||
FScrollbar* hbar{0};
|
||||
uInt8 nf_offset{0};
|
||||
bool border{true};
|
||||
bool use_own_print_area{false};
|
||||
bool update_scrollbar{true};
|
||||
fc::scrollBarMode vMode{fc::Auto}; // fc:Auto, fc::Hidden or fc::Scroll
|
||||
fc::scrollBarMode hMode{fc::Auto};
|
||||
};
|
||||
#pragma pack(pop)
|
||||
|
||||
|
|
|
@ -124,11 +124,11 @@ class FStatusKey : public FWidget
|
|||
friend class FStatusBar;
|
||||
|
||||
// Data Members
|
||||
FKey key;
|
||||
FString text;
|
||||
bool active;
|
||||
bool mouse_focus;
|
||||
FStatusBar* bar;
|
||||
FKey key{0};
|
||||
FString text{};
|
||||
bool active{false};
|
||||
bool mouse_focus{false};
|
||||
FStatusBar* bar{0};
|
||||
};
|
||||
#pragma pack(pop)
|
||||
|
||||
|
@ -250,13 +250,13 @@ class FStatusBar : public FWindow
|
|||
void drawActiveKey (keyList::const_iterator);
|
||||
|
||||
// Data Members
|
||||
keyList key_list;
|
||||
FString text;
|
||||
bool mouse_down;
|
||||
std::size_t screenWidth;
|
||||
int keyname_len;
|
||||
int x;
|
||||
int x_msg;
|
||||
keyList key_list{};
|
||||
FString text{""};
|
||||
bool mouse_down{};
|
||||
std::size_t screenWidth{80};
|
||||
int keyname_len{0};
|
||||
int x{-1};
|
||||
int x_msg{-1};
|
||||
};
|
||||
#pragma pack(pop)
|
||||
|
||||
|
|
|
@ -82,7 +82,7 @@ class FString
|
|||
typedef const wchar_t* iterator;
|
||||
|
||||
// Constructors
|
||||
FString ();
|
||||
FString () = default;
|
||||
explicit FString (int);
|
||||
explicit FString (std::size_t);
|
||||
FString (std::size_t, wchar_t);
|
||||
|
@ -276,10 +276,10 @@ class FString
|
|||
wchar_t* extractToken (wchar_t*[], const wchar_t[], const wchar_t[]);
|
||||
|
||||
// Data Members
|
||||
wchar_t* string;
|
||||
std::size_t length;
|
||||
std::size_t bufsize;
|
||||
mutable char* c_string;
|
||||
wchar_t* string{0};
|
||||
std::size_t length{0};
|
||||
std::size_t bufsize{0};
|
||||
mutable char* c_string{0};
|
||||
};
|
||||
#pragma pack(pop)
|
||||
|
||||
|
|
|
@ -104,8 +104,8 @@ class FSwitch : public FToggleButton
|
|||
void drawUnchecked();
|
||||
|
||||
// Data Members
|
||||
std::size_t switch_offset_pos;
|
||||
bool button_pressed;
|
||||
std::size_t switch_offset_pos{0};
|
||||
bool button_pressed{false};
|
||||
};
|
||||
#pragma pack(pop)
|
||||
|
||||
|
|
|
@ -59,7 +59,7 @@ class FTermBuffer
|
|||
typedef FOptiAttr::charData charData;
|
||||
|
||||
// Constructor
|
||||
FTermBuffer();
|
||||
FTermBuffer() = default;
|
||||
|
||||
// Destructor
|
||||
virtual ~FTermBuffer();
|
||||
|
@ -87,7 +87,7 @@ class FTermBuffer
|
|||
std::vector<charData> getBuffer();
|
||||
|
||||
private:
|
||||
std::vector<charData> data;
|
||||
std::vector<charData> data{};
|
||||
};
|
||||
#pragma pack(pop)
|
||||
|
||||
|
|
|
@ -87,10 +87,10 @@ class FTermcap
|
|||
tcap_map;
|
||||
|
||||
// Constructors
|
||||
FTermcap();
|
||||
FTermcap() = default;
|
||||
|
||||
// Destructor
|
||||
~FTermcap();
|
||||
~FTermcap() = default;
|
||||
|
||||
// Accessors
|
||||
const char* getClassName() const;
|
||||
|
|
|
@ -128,31 +128,31 @@ class FTermData
|
|||
FTermData& operator = (const FTermData&);
|
||||
|
||||
// Data Members
|
||||
encodingMap encoding_list;
|
||||
fc::encoding term_encoding;
|
||||
FRect term_geometry; // current terminal geometry
|
||||
int fd_tty;
|
||||
uInt baudrate;
|
||||
bool shadow_character;
|
||||
bool half_block_character;
|
||||
bool cursor_optimisation;
|
||||
bool hidden_cursor;
|
||||
bool use_alternate_screen;
|
||||
bool ascii_console;
|
||||
bool vt100_console;
|
||||
bool utf8_console;
|
||||
bool utf8_state;
|
||||
bool new_font;
|
||||
bool vga_font;
|
||||
bool monochron;
|
||||
bool resize_term;
|
||||
char termtype[256];
|
||||
char termfilename[256];
|
||||
FString xterm_font;
|
||||
FString xterm_title;
|
||||
encodingMap encoding_list{};
|
||||
fc::encoding term_encoding{fc::UNKNOWN};
|
||||
FRect term_geometry{}; // current terminal geometry
|
||||
int fd_tty{-1}; // Teletype (tty) file descriptor is still undefined
|
||||
uInt baudrate{0};
|
||||
bool shadow_character{true};
|
||||
bool half_block_character{true};
|
||||
bool cursor_optimisation{true};
|
||||
bool hidden_cursor{false}; // Global cursor hidden state
|
||||
bool use_alternate_screen{true};
|
||||
bool ascii_console{false};
|
||||
bool vt100_console{false};
|
||||
bool utf8_console{false};
|
||||
bool utf8_state{false};
|
||||
bool new_font{false};
|
||||
bool vga_font{false};
|
||||
bool monochron{false};
|
||||
bool resize_term{false};
|
||||
char termtype[256]{};
|
||||
char termfilename[256]{};
|
||||
FString xterm_font{};
|
||||
FString xterm_title{};
|
||||
|
||||
#if DEBUG
|
||||
int framebuffer_bpp;
|
||||
int framebuffer_bpp{-1};
|
||||
#endif
|
||||
};
|
||||
#pragma pack(pop)
|
||||
|
@ -160,31 +160,6 @@ class FTermData
|
|||
// FTermData inline functions
|
||||
//----------------------------------------------------------------------
|
||||
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'
|
||||
std::fill_n (termtype, sizeof(termtype), '\0');
|
||||
|
|
|
@ -47,10 +47,10 @@ class FTermDebugData
|
|||
{
|
||||
public:
|
||||
// Constructors
|
||||
FTermDebugData();
|
||||
FTermDebugData() = default;
|
||||
|
||||
// Destructor
|
||||
~FTermDebugData();
|
||||
~FTermDebugData() = default;
|
||||
|
||||
// Accessors
|
||||
const FString& getAnswerbackString();
|
||||
|
@ -73,21 +73,11 @@ class FTermDebugData
|
|||
FTermDebugData& operator = (const FTermDebugData&);
|
||||
|
||||
// Data Members
|
||||
FTermDetection* term_detection;
|
||||
FTermData* data;
|
||||
FTermDetection* term_detection{0};
|
||||
FTermData* data{0};
|
||||
};
|
||||
|
||||
// FTermDebugData inline functions
|
||||
//----------------------------------------------------------------------
|
||||
inline FTermDebugData::FTermDebugData()
|
||||
: term_detection(0)
|
||||
, data(0)
|
||||
{ }
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
inline FTermDebugData::~FTermDebugData()
|
||||
{ }
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
inline void FTermDebugData::setFTermDetection (FTermDetection* obj)
|
||||
{ term_detection = obj; }
|
||||
|
|
|
@ -63,10 +63,10 @@ class FTermFreeBSD
|
|||
typedef fc::freebsdConsoleCursorStyle CursorStyle;
|
||||
|
||||
// Constructors
|
||||
FTermFreeBSD();
|
||||
FTermFreeBSD() = default;
|
||||
|
||||
// Destructor
|
||||
virtual ~FTermFreeBSD();
|
||||
virtual ~FTermFreeBSD() = default;
|
||||
|
||||
// Accessors
|
||||
const char* getClassName() const;
|
||||
|
|
|
@ -70,7 +70,7 @@ class FTermLinux
|
|||
{
|
||||
public:
|
||||
// Constructors
|
||||
FTermLinux();
|
||||
FTermLinux() = default;
|
||||
|
||||
// Destructor
|
||||
virtual ~FTermLinux();
|
||||
|
|
|
@ -56,10 +56,10 @@ class FTermOpenBSD
|
|||
{
|
||||
public:
|
||||
// Constructors
|
||||
FTermOpenBSD();
|
||||
FTermOpenBSD() = default;
|
||||
|
||||
// Destructor
|
||||
virtual ~FTermOpenBSD();
|
||||
virtual ~FTermOpenBSD() = default;
|
||||
|
||||
// Accessor
|
||||
const char* getClassName() const;
|
||||
|
|
|
@ -146,14 +146,14 @@ class FTextView : public FWidget
|
|||
void cb_HBarChange (FWidget*, data_ptr);
|
||||
|
||||
// Data Members
|
||||
FStringList data;
|
||||
FScrollbar* vbar;
|
||||
FScrollbar* hbar;
|
||||
bool update_scrollbar;
|
||||
int xoffset;
|
||||
int yoffset;
|
||||
int nf_offset;
|
||||
std::size_t maxLineWidth;
|
||||
FStringList data{};
|
||||
FScrollbar* vbar{0};
|
||||
FScrollbar* hbar{0};
|
||||
bool update_scrollbar{true};
|
||||
int xoffset{0};
|
||||
int yoffset{0};
|
||||
int nf_offset{0};
|
||||
std::size_t maxLineWidth{0};
|
||||
};
|
||||
#pragma pack(pop)
|
||||
|
||||
|
|
|
@ -138,9 +138,9 @@ class FToggleButton : public FWidget
|
|||
virtual void onKeyPress (FKeyEvent*);
|
||||
|
||||
// Data Members
|
||||
bool checked;
|
||||
std::size_t label_offset_pos;
|
||||
std::size_t button_width; // plus margin spaces
|
||||
bool checked{false};
|
||||
std::size_t label_offset_pos{0};
|
||||
std::size_t button_width{0}; // plus margin spaces
|
||||
|
||||
private:
|
||||
// Constants
|
||||
|
@ -164,9 +164,9 @@ class FToggleButton : public FWidget
|
|||
friend class FButtonGroup;
|
||||
|
||||
// Data Members
|
||||
FButtonGroup* button_group;
|
||||
bool focus_inside_group;
|
||||
FString text;
|
||||
FButtonGroup* button_group{0};
|
||||
bool focus_inside_group{true};
|
||||
FString text{};
|
||||
};
|
||||
#pragma pack(pop)
|
||||
|
||||
|
|
|
@ -109,11 +109,11 @@ class FToolTip : public FWindow
|
|||
virtual void adjustSize();
|
||||
|
||||
// Data Members
|
||||
FString text;
|
||||
FString* text_components;
|
||||
FStringList text_split;
|
||||
std::size_t max_line_width;
|
||||
std::size_t text_num_lines;
|
||||
FString text{};
|
||||
FString* text_components{0};
|
||||
FStringList text_split{};
|
||||
std::size_t max_line_width{0};
|
||||
std::size_t text_num_lines{0};
|
||||
};
|
||||
#pragma pack(pop)
|
||||
|
||||
|
|
|
@ -426,9 +426,9 @@ class FVTerm
|
|||
static term_area* vterm; // virtual terminal
|
||||
static term_area* vdesktop; // virtual desktop
|
||||
static term_area* active_area; // active area
|
||||
term_area* print_area; // print area for this object
|
||||
term_area* child_print_area; // print area for children
|
||||
term_area* vwin; // virtual window
|
||||
term_area* print_area{0}; // print area for this object
|
||||
term_area* child_print_area{0}; // print area for children
|
||||
term_area* vwin{0}; // virtual window
|
||||
|
||||
private:
|
||||
// Typedef and Enumeration
|
||||
|
@ -528,46 +528,26 @@ class FVTerm
|
|||
struct FVTerm::term_area // define virtual terminal character properties
|
||||
{
|
||||
public:
|
||||
term_area()
|
||||
: offset_left (0)
|
||||
, 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() = default;
|
||||
~term_area() = default;
|
||||
|
||||
~term_area()
|
||||
{ }
|
||||
|
||||
int offset_left; // Distance from left terminal side
|
||||
int offset_top; // Distance from top of the terminal
|
||||
int width; // Window width
|
||||
int height; // Window height
|
||||
int right_shadow; // Right window shadow
|
||||
int bottom_shadow; // Bottom window shadow
|
||||
int cursor_x; // X-position for the next write operation
|
||||
int cursor_y; // Y-position for the next write operation
|
||||
int input_cursor_x; // X-position input cursor
|
||||
int input_cursor_y; // Y-position input cursor
|
||||
FWidget* widget; // Widget that owns this term_area
|
||||
FPreprocessing preprocessing_call;
|
||||
line_changes* changes;
|
||||
charData* text; // Text data for the output
|
||||
bool input_cursor_visible;
|
||||
bool has_changes;
|
||||
bool visible;
|
||||
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 height{-1}; // Window height
|
||||
int right_shadow{0}; // Right window shadow
|
||||
int bottom_shadow{0}; // Bottom window shadow
|
||||
int cursor_x{0}; // X-position for the next write operation
|
||||
int cursor_y{0}; // Y-position for the next write operation
|
||||
int input_cursor_x{-1}; // X-position input cursor
|
||||
int input_cursor_y{-1}; // Y-position input cursor
|
||||
FWidget* widget{}; // Widget that owns this term_area
|
||||
FPreprocessing preprocessing_call{};
|
||||
line_changes* changes{0};
|
||||
charData* text{0}; // Text data for the output
|
||||
bool input_cursor_visible{false};
|
||||
bool has_changes{false};
|
||||
bool visible{false};
|
||||
|
||||
private:
|
||||
// Disable copy constructor
|
||||
|
|
|
@ -334,7 +334,7 @@ class FWidget : public FVTerm, public FObject
|
|||
|
||||
// Data Members
|
||||
static widgetList* window_list;
|
||||
Accelerators* accelerator_list;
|
||||
Accelerators* accelerator_list{0};
|
||||
|
||||
protected:
|
||||
struct callback_data
|
||||
|
@ -396,14 +396,14 @@ class FWidget : public FVTerm, public FObject
|
|||
virtual void onClose (FCloseEvent*);
|
||||
|
||||
// Data Members
|
||||
struct widget_flags flags;
|
||||
struct widget_flags flags{};
|
||||
static uInt modal_dialogs;
|
||||
static FWidgetColors wc;
|
||||
static widgetList* dialog_list;
|
||||
static widgetList* always_on_top_list;
|
||||
static widgetList* close_widget;
|
||||
CallbackObjects callback_objects;
|
||||
MemberCallbackObjects member_callback_objects;
|
||||
CallbackObjects callback_objects{};
|
||||
MemberCallbackObjects member_callback_objects{};
|
||||
|
||||
private:
|
||||
// Disable copy constructor
|
||||
|
@ -430,19 +430,12 @@ class FWidget : public FVTerm, public FObject
|
|||
static void setColorTheme();
|
||||
|
||||
// Data Members
|
||||
FPoint widget_cursor_position;
|
||||
FPoint widget_cursor_position{-1, -1};
|
||||
|
||||
struct widget_size_hints
|
||||
{
|
||||
widget_size_hints()
|
||||
: min_width (0)
|
||||
, min_height (0)
|
||||
, max_width (INT_MAX)
|
||||
, max_height (INT_MAX)
|
||||
{ }
|
||||
|
||||
~widget_size_hints()
|
||||
{ }
|
||||
widget_size_hints() = default;
|
||||
~widget_size_hints() = default;
|
||||
|
||||
void setMinimum (std::size_t w, std::size_t h)
|
||||
{
|
||||
|
@ -456,60 +449,54 @@ class FWidget : public FVTerm, public FObject
|
|||
max_height = h;
|
||||
}
|
||||
|
||||
std::size_t min_width;
|
||||
std::size_t min_height;
|
||||
std::size_t max_width;
|
||||
std::size_t max_height;
|
||||
} size_hints;
|
||||
std::size_t min_width{0};
|
||||
std::size_t min_height{0};
|
||||
std::size_t max_width{INT_MAX};
|
||||
std::size_t max_height{INT_MAX};
|
||||
} size_hints{};
|
||||
|
||||
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> left;
|
||||
} double_flatline_mask;
|
||||
std::vector<bool> top{};
|
||||
std::vector<bool> right{};
|
||||
std::vector<bool> bottom{};
|
||||
std::vector<bool> left{};
|
||||
} double_flatline_mask{};
|
||||
|
||||
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;
|
||||
int left;
|
||||
int bottom;
|
||||
int right;
|
||||
} padding;
|
||||
|
||||
bool ignore_padding;
|
||||
bool ignore_padding{false};
|
||||
|
||||
// widget size
|
||||
FRect wsize;
|
||||
FRect adjust_wsize;
|
||||
FRect adjust_wsize_term;
|
||||
FRect adjust_wsize_shadow;
|
||||
FRect adjust_wsize_term_shadow;
|
||||
FRect wsize{1, 1, 1, 1};
|
||||
FRect adjust_wsize{1, 1, 1, 1};
|
||||
FRect adjust_wsize_term{};
|
||||
FRect adjust_wsize_shadow{};
|
||||
FRect adjust_wsize_term_shadow{};
|
||||
// widget offset
|
||||
FRect offset;
|
||||
FRect offset{};
|
||||
// offset of the widget client area
|
||||
FRect client_offset;
|
||||
FRect client_offset{};
|
||||
// widget shadow size (on the right and bottom side)
|
||||
FPoint wshadow;
|
||||
FPoint wshadow{0, 0};
|
||||
|
||||
// default widget foreground and background color
|
||||
FColor foreground_color;
|
||||
FColor background_color;
|
||||
FColor foreground_color{fc::Default};
|
||||
FColor background_color{fc::Default};
|
||||
|
||||
FString statusbar_message;
|
||||
FString statusbar_message{};
|
||||
static FStatusBar* statusbar;
|
||||
static FMenuBar* menubar;
|
||||
static FWidget* main_widget;
|
||||
|
|
|
@ -55,90 +55,90 @@ class FWidgetColors
|
|||
void set16ColorTheme();
|
||||
|
||||
// Data Members
|
||||
FColor term_fg;
|
||||
FColor term_bg;
|
||||
FColor list_fg;
|
||||
FColor list_bg;
|
||||
FColor selected_list_fg;
|
||||
FColor selected_list_bg;
|
||||
FColor current_element_focus_fg;
|
||||
FColor current_element_focus_bg;
|
||||
FColor current_element_fg;
|
||||
FColor current_element_bg;
|
||||
FColor current_inc_search_element_fg;
|
||||
FColor selected_current_element_focus_fg;
|
||||
FColor selected_current_element_focus_bg;
|
||||
FColor selected_current_element_fg;
|
||||
FColor selected_current_element_bg;
|
||||
FColor label_fg;
|
||||
FColor label_bg;
|
||||
FColor label_inactive_fg;
|
||||
FColor label_inactive_bg;
|
||||
FColor label_hotkey_fg;
|
||||
FColor label_hotkey_bg;
|
||||
FColor label_emphasis_fg;
|
||||
FColor label_ellipsis_fg;
|
||||
FColor inputfield_active_focus_fg;
|
||||
FColor inputfield_active_focus_bg;
|
||||
FColor inputfield_active_fg;
|
||||
FColor inputfield_active_bg;
|
||||
FColor inputfield_inactive_fg;
|
||||
FColor inputfield_inactive_bg;
|
||||
FColor dialog_fg;
|
||||
FColor dialog_resize_fg;
|
||||
FColor dialog_emphasis_fg;
|
||||
FColor dialog_bg;
|
||||
FColor error_box_fg;
|
||||
FColor error_box_emphasis_fg;
|
||||
FColor error_box_bg;
|
||||
FColor tooltip_fg;
|
||||
FColor tooltip_bg;
|
||||
FColor shadow_fg;
|
||||
FColor shadow_bg;
|
||||
FColor toggle_button_active_focus_fg;
|
||||
FColor toggle_button_active_focus_bg;
|
||||
FColor toggle_button_active_fg;
|
||||
FColor toggle_button_active_bg;
|
||||
FColor toggle_button_inactive_fg;
|
||||
FColor toggle_button_inactive_bg;
|
||||
FColor button_active_focus_fg;
|
||||
FColor button_active_focus_bg;
|
||||
FColor button_active_fg;
|
||||
FColor button_active_bg;
|
||||
FColor button_inactive_fg;
|
||||
FColor button_inactive_bg;
|
||||
FColor button_hotkey_fg;
|
||||
FColor titlebar_active_fg;
|
||||
FColor titlebar_active_bg;
|
||||
FColor titlebar_inactive_fg;
|
||||
FColor titlebar_inactive_bg;
|
||||
FColor titlebar_button_fg;
|
||||
FColor titlebar_button_bg;
|
||||
FColor titlebar_button_focus_fg;
|
||||
FColor titlebar_button_focus_bg;
|
||||
FColor menu_active_focus_fg;
|
||||
FColor menu_active_focus_bg;
|
||||
FColor menu_active_fg;
|
||||
FColor menu_active_bg;
|
||||
FColor menu_inactive_fg;
|
||||
FColor menu_inactive_bg;
|
||||
FColor menu_hotkey_fg;
|
||||
FColor menu_hotkey_bg;
|
||||
FColor statusbar_fg;
|
||||
FColor statusbar_bg;
|
||||
FColor statusbar_hotkey_fg;
|
||||
FColor statusbar_hotkey_bg;
|
||||
FColor statusbar_separator_fg;
|
||||
FColor statusbar_active_fg;
|
||||
FColor statusbar_active_bg;
|
||||
FColor statusbar_active_hotkey_fg;
|
||||
FColor statusbar_active_hotkey_bg;
|
||||
FColor scrollbar_fg;
|
||||
FColor scrollbar_bg;
|
||||
FColor scrollbar_button_fg;
|
||||
FColor scrollbar_button_bg;
|
||||
FColor progressbar_fg;
|
||||
FColor progressbar_bg;
|
||||
FColor term_fg{fc::Default};
|
||||
FColor term_bg{fc::Default};
|
||||
FColor list_fg{fc::Default};
|
||||
FColor list_bg{fc::Default};
|
||||
FColor selected_list_fg{fc::Default};
|
||||
FColor selected_list_bg{fc::Default};
|
||||
FColor current_element_focus_fg{fc::Default};
|
||||
FColor current_element_focus_bg{fc::Default};
|
||||
FColor current_element_fg{fc::Default};
|
||||
FColor current_element_bg{fc::Default};
|
||||
FColor current_inc_search_element_fg{fc::Default};
|
||||
FColor selected_current_element_focus_fg{fc::Default};
|
||||
FColor selected_current_element_focus_bg{fc::Default};
|
||||
FColor selected_current_element_fg{fc::Default};
|
||||
FColor selected_current_element_bg{fc::Default};
|
||||
FColor label_fg{fc::Default};
|
||||
FColor label_bg{fc::Default};
|
||||
FColor label_inactive_fg{fc::Default};
|
||||
FColor label_inactive_bg{fc::Default};
|
||||
FColor label_hotkey_fg{fc::Default};
|
||||
FColor label_hotkey_bg{fc::Default};
|
||||
FColor label_emphasis_fg{fc::Default};
|
||||
FColor label_ellipsis_fg{fc::Default};
|
||||
FColor inputfield_active_focus_fg{fc::Default};
|
||||
FColor inputfield_active_focus_bg{fc::Default};
|
||||
FColor inputfield_active_fg{fc::Default};
|
||||
FColor inputfield_active_bg{fc::Default};
|
||||
FColor inputfield_inactive_fg{fc::Default};
|
||||
FColor inputfield_inactive_bg{fc::Default};
|
||||
FColor dialog_fg{fc::Default};
|
||||
FColor dialog_resize_fg{fc::Default};
|
||||
FColor dialog_emphasis_fg{fc::Default};
|
||||
FColor dialog_bg{fc::Default};
|
||||
FColor error_box_fg{fc::Default};
|
||||
FColor error_box_emphasis_fg{fc::Default};
|
||||
FColor error_box_bg{fc::Default};
|
||||
FColor tooltip_fg{fc::Default};
|
||||
FColor tooltip_bg{fc::Default};
|
||||
FColor shadow_fg{fc::Default};
|
||||
FColor shadow_bg{fc::Default};
|
||||
FColor toggle_button_active_focus_fg{fc::Default};
|
||||
FColor toggle_button_active_focus_bg{fc::Default};
|
||||
FColor toggle_button_active_fg{fc::Default};
|
||||
FColor toggle_button_active_bg{fc::Default};
|
||||
FColor toggle_button_inactive_fg{fc::Default};
|
||||
FColor toggle_button_inactive_bg{fc::Default};
|
||||
FColor button_active_focus_fg{fc::Default};
|
||||
FColor button_active_focus_bg{fc::Default};
|
||||
FColor button_active_fg{fc::Default};
|
||||
FColor button_active_bg{fc::Default};
|
||||
FColor button_inactive_fg{fc::Default};
|
||||
FColor button_inactive_bg{fc::Default};
|
||||
FColor button_hotkey_fg{fc::Default};
|
||||
FColor titlebar_active_fg{fc::Default};
|
||||
FColor titlebar_active_bg{fc::Default};
|
||||
FColor titlebar_inactive_fg{fc::Default};
|
||||
FColor titlebar_inactive_bg{fc::Default};
|
||||
FColor titlebar_button_fg{fc::Default};
|
||||
FColor titlebar_button_bg{fc::Default};
|
||||
FColor titlebar_button_focus_fg{fc::Default};
|
||||
FColor titlebar_button_focus_bg{fc::Default};
|
||||
FColor menu_active_focus_fg{fc::Default};
|
||||
FColor menu_active_focus_bg{fc::Default};
|
||||
FColor menu_active_fg{fc::Default};
|
||||
FColor menu_active_bg{fc::Default};
|
||||
FColor menu_inactive_fg{fc::Default};
|
||||
FColor menu_inactive_bg{fc::Default};
|
||||
FColor menu_hotkey_fg{fc::Default};
|
||||
FColor menu_hotkey_bg{fc::Default};
|
||||
FColor statusbar_fg{fc::Default};
|
||||
FColor statusbar_bg{fc::Default};
|
||||
FColor statusbar_hotkey_fg{fc::Default};
|
||||
FColor statusbar_hotkey_bg{fc::Default};
|
||||
FColor statusbar_separator_fg{fc::Default};
|
||||
FColor statusbar_active_fg{fc::Default};
|
||||
FColor statusbar_active_bg{fc::Default};
|
||||
FColor statusbar_active_hotkey_fg{fc::Default};
|
||||
FColor statusbar_active_hotkey_bg{fc::Default};
|
||||
FColor scrollbar_fg{fc::Default};
|
||||
FColor scrollbar_bg{fc::Default};
|
||||
FColor scrollbar_button_fg{fc::Default};
|
||||
FColor scrollbar_button_bg{fc::Default};
|
||||
FColor progressbar_fg{fc::Default};
|
||||
FColor progressbar_bg{fc::Default};
|
||||
};
|
||||
#pragma pack(pop)
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue