Cygwin and Linux console do not use cp437 character encoding by default
This commit is contained in:
parent
69db7417ad
commit
d1fedfec9f
|
@ -1,3 +1,7 @@
|
||||||
|
2019-09-04 Markus Gans <guru.mail@muenster.de>
|
||||||
|
* The Cygwin and Linux console do not use cp437 character encoding
|
||||||
|
by default anymore
|
||||||
|
|
||||||
2019-09-01 Markus Gans <guru.mail@muenster.de>
|
2019-09-01 Markus Gans <guru.mail@muenster.de>
|
||||||
* Removing public + protected data members from classes
|
* Removing public + protected data members from classes
|
||||||
|
|
||||||
|
|
|
@ -82,7 +82,7 @@ class FClassName
|
||||||
|
|
||||||
// Callback methods
|
// Callback methods
|
||||||
|
|
||||||
// Data Members
|
// Data members
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// Typedefs and Enumerations
|
// Typedefs and Enumerations
|
||||||
|
@ -99,7 +99,7 @@ class FClassName
|
||||||
|
|
||||||
// Callback methods
|
// Callback methods
|
||||||
|
|
||||||
// Data Members
|
// Data members
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Typedefs and Enumerations
|
// Typedefs and Enumerations
|
||||||
|
@ -116,7 +116,7 @@ class FClassName
|
||||||
|
|
||||||
// Callback methods
|
// Callback methods
|
||||||
|
|
||||||
// Data Members
|
// Data members
|
||||||
|
|
||||||
// Friend class
|
// Friend class
|
||||||
|
|
||||||
|
|
|
@ -63,7 +63,7 @@ class SegmentView : public finalcut::FDialog
|
||||||
void get7Segment (const wchar_t);
|
void get7Segment (const wchar_t);
|
||||||
void draw() override;
|
void draw() override;
|
||||||
|
|
||||||
// Data Members
|
// Data members
|
||||||
std::map<wchar_t, sevenSegment> code{};
|
std::map<wchar_t, sevenSegment> code{};
|
||||||
finalcut::FString line[3];
|
finalcut::FString line[3];
|
||||||
finalcut::FLineEdit Input{"0123", this};
|
finalcut::FLineEdit Input{"0123", this};
|
||||||
|
|
|
@ -58,7 +58,7 @@ class Button : public finalcut::FButton
|
||||||
void onKeyPress (finalcut::FKeyEvent*) override;
|
void onKeyPress (finalcut::FKeyEvent*) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Data Member
|
// Data member
|
||||||
bool checked{false};
|
bool checked{false};
|
||||||
};
|
};
|
||||||
#pragma pack(pop)
|
#pragma pack(pop)
|
||||||
|
@ -220,7 +220,7 @@ class Calc : public finalcut::FDialog
|
||||||
const wchar_t* getButtonText (std::size_t);
|
const wchar_t* getButtonText (std::size_t);
|
||||||
void mapKeyFunctions();
|
void mapKeyFunctions();
|
||||||
|
|
||||||
// Data Members
|
// Data members
|
||||||
bool error{false};
|
bool error{false};
|
||||||
bool arcus_mode{false};
|
bool arcus_mode{false};
|
||||||
bool hyperbolic_mode{false};
|
bool hyperbolic_mode{false};
|
||||||
|
|
|
@ -65,7 +65,7 @@ class CheckList : public finalcut::FDialog
|
||||||
// Callback method
|
// Callback method
|
||||||
void cb_showList (finalcut::FWidget*, FDataPtr);
|
void cb_showList (finalcut::FWidget*, FDataPtr);
|
||||||
|
|
||||||
// Data Members
|
// Data members
|
||||||
finalcut::FListView listView{this};
|
finalcut::FListView listView{this};
|
||||||
finalcut::FStatusBar status_bar{this};
|
finalcut::FStatusBar status_bar{this};
|
||||||
};
|
};
|
||||||
|
|
|
@ -98,7 +98,7 @@ class Listbox : public FDialog
|
||||||
// Event handlers
|
// Event handlers
|
||||||
void onClose (FCloseEvent*) override;
|
void onClose (FCloseEvent*) override;
|
||||||
|
|
||||||
// Data Member
|
// Data member
|
||||||
std::list<double> double_list{};
|
std::list<double> double_list{};
|
||||||
FListBox list1{this};
|
FListBox list1{this};
|
||||||
FListBox list2{this};
|
FListBox list2{this};
|
||||||
|
|
|
@ -64,7 +64,7 @@ class Listview : public finalcut::FDialog
|
||||||
// Callback method
|
// Callback method
|
||||||
void cb_showInMessagebox (finalcut::FWidget*, FDataPtr);
|
void cb_showInMessagebox (finalcut::FWidget*, FDataPtr);
|
||||||
|
|
||||||
// Data Members
|
// Data members
|
||||||
finalcut::FListView listView{this};
|
finalcut::FListView listView{this};
|
||||||
finalcut::FButton Quit{this};
|
finalcut::FButton Quit{this};
|
||||||
};
|
};
|
||||||
|
|
|
@ -66,7 +66,7 @@ class Menu : public finalcut::FDialog
|
||||||
// Callback method
|
// Callback method
|
||||||
void cb_message (finalcut::FWidget*, FDataPtr);
|
void cb_message (finalcut::FWidget*, FDataPtr);
|
||||||
|
|
||||||
// Data Members
|
// Data members
|
||||||
finalcut::FString line{13, fc::BoxDrawingsHorizontal};
|
finalcut::FString line{13, fc::BoxDrawingsHorizontal};
|
||||||
finalcut::FMenuBar Menubar{this};
|
finalcut::FMenuBar Menubar{this};
|
||||||
finalcut::FMenu File{"&File", &Menubar};
|
finalcut::FMenu File{"&File", &Menubar};
|
||||||
|
|
|
@ -63,7 +63,7 @@ class ColorChooser : public finalcut::FWidget
|
||||||
// Event handler
|
// Event handler
|
||||||
void onMouseDown (finalcut::FMouseEvent*) override;
|
void onMouseDown (finalcut::FMouseEvent*) override;
|
||||||
|
|
||||||
// Data Members
|
// Data members
|
||||||
FColor fg_color{fc::White};
|
FColor fg_color{fc::White};
|
||||||
FColor bg_color{fc::Black};
|
FColor bg_color{fc::Black};
|
||||||
finalcut::FLabel headline{this};
|
finalcut::FLabel headline{this};
|
||||||
|
@ -209,7 +209,7 @@ class Brushes : public finalcut::FWidget
|
||||||
// Event handler
|
// Event handler
|
||||||
void onMouseDown (finalcut::FMouseEvent*) override;
|
void onMouseDown (finalcut::FMouseEvent*) override;
|
||||||
|
|
||||||
// Data Members
|
// Data members
|
||||||
wchar_t brush{L' '};
|
wchar_t brush{L' '};
|
||||||
FColor fg_color{fc::White};
|
FColor fg_color{fc::White};
|
||||||
FColor bg_color{fc::Black};
|
FColor bg_color{fc::Black};
|
||||||
|
@ -360,7 +360,7 @@ class MouseDraw : public finalcut::FDialog
|
||||||
// Callback methods
|
// Callback methods
|
||||||
void cb_colorChanged (finalcut::FWidget*, FDataPtr);
|
void cb_colorChanged (finalcut::FWidget*, FDataPtr);
|
||||||
|
|
||||||
// Data Members
|
// Data members
|
||||||
term_area* canvas{nullptr};
|
term_area* canvas{nullptr};
|
||||||
ColorChooser c_chooser{this};
|
ColorChooser c_chooser{this};
|
||||||
Brushes brush{this};
|
Brushes brush{this};
|
||||||
|
|
|
@ -62,7 +62,7 @@ class Scrollview : public finalcut::FScrollView
|
||||||
void cb_go_west (finalcut::FWidget*, FDataPtr);
|
void cb_go_west (finalcut::FWidget*, FDataPtr);
|
||||||
void cb_go_north (finalcut::FWidget*, FDataPtr);
|
void cb_go_north (finalcut::FWidget*, FDataPtr);
|
||||||
|
|
||||||
// Data Members
|
// Data members
|
||||||
wchar_t pointer_right{fc::BlackRightPointingPointer};
|
wchar_t pointer_right{fc::BlackRightPointingPointer};
|
||||||
wchar_t pointer_down{fc::BlackDownPointingTriangle};
|
wchar_t pointer_down{fc::BlackDownPointingTriangle};
|
||||||
wchar_t pointer_left{fc::BlackLeftPointingPointer};
|
wchar_t pointer_left{fc::BlackLeftPointingPointer};
|
||||||
|
@ -212,7 +212,7 @@ class Scrollviewdemo : public finalcut::FDialog
|
||||||
// Callback method
|
// Callback method
|
||||||
void cb_quit (finalcut::FWidget* = nullptr, FDataPtr = nullptr);
|
void cb_quit (finalcut::FWidget* = nullptr, FDataPtr = nullptr);
|
||||||
|
|
||||||
// Data Members
|
// Data members
|
||||||
Scrollview sview{this};
|
Scrollview sview{this};
|
||||||
finalcut::FButton quit_btn{"&Quit", this};
|
finalcut::FButton quit_btn{"&Quit", this};
|
||||||
finalcut::FLabel label{this};
|
finalcut::FLabel label{this};
|
||||||
|
|
|
@ -61,14 +61,14 @@ class AttribDlg : public finalcut::FDialog
|
||||||
void cb_next (finalcut::FWidget* = nullptr, FDataPtr = nullptr);
|
void cb_next (finalcut::FWidget* = nullptr, FDataPtr = nullptr);
|
||||||
void cb_back (finalcut::FWidget* = nullptr, FDataPtr = nullptr);
|
void cb_back (finalcut::FWidget* = nullptr, FDataPtr = nullptr);
|
||||||
|
|
||||||
// Data Members
|
// Data members
|
||||||
FColor bgcolor;
|
FColor bgcolor;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Method
|
// Method
|
||||||
void adjustSize() override;
|
void adjustSize() override;
|
||||||
|
|
||||||
// Data Members
|
// Data members
|
||||||
finalcut::FButton next_button{"&Next >", this};
|
finalcut::FButton next_button{"&Next >", this};
|
||||||
finalcut::FButton back_button{"< &Back", this};
|
finalcut::FButton back_button{"< &Back", this};
|
||||||
};
|
};
|
||||||
|
@ -238,7 +238,7 @@ class AttribDemo : public finalcut::FWidget
|
||||||
void printProtected();
|
void printProtected();
|
||||||
void draw() override;
|
void draw() override;
|
||||||
|
|
||||||
// Data Member
|
// Data member
|
||||||
int colors;
|
int colors;
|
||||||
};
|
};
|
||||||
#pragma pack(pop)
|
#pragma pack(pop)
|
||||||
|
|
|
@ -52,7 +52,7 @@ struct data
|
||||||
{
|
{
|
||||||
static int getNumberOfItems();
|
static int getNumberOfItems();
|
||||||
|
|
||||||
struct termcap_string
|
struct alignas(alignof(std::string)) termcap_string
|
||||||
{
|
{
|
||||||
const std::string name;
|
const std::string name;
|
||||||
const fc::termcaps cap;
|
const fc::termcaps cap;
|
||||||
|
|
|
@ -65,7 +65,7 @@ class Transparent : public finalcut::FDialog
|
||||||
// Event handlers
|
// Event handlers
|
||||||
void onKeyPress (finalcut::FKeyEvent* ev) override;
|
void onKeyPress (finalcut::FKeyEvent* ev) override;
|
||||||
|
|
||||||
// Data Members
|
// Data members
|
||||||
trans_type type;
|
trans_type type;
|
||||||
};
|
};
|
||||||
#pragma pack(pop)
|
#pragma pack(pop)
|
||||||
|
@ -187,7 +187,7 @@ class MainWindow : public finalcut::FDialog
|
||||||
finalcut::FDialog::onKeyPress(ev);
|
finalcut::FDialog::onKeyPress(ev);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Data Members
|
// Data members
|
||||||
finalcut::FString line1{};
|
finalcut::FString line1{};
|
||||||
finalcut::FString line2{};
|
finalcut::FString line2{};
|
||||||
Transparent* transpwin{nullptr};
|
Transparent* transpwin{nullptr};
|
||||||
|
|
|
@ -140,7 +140,7 @@ class Treeview : public finalcut::FDialog
|
||||||
// Event handler
|
// Event handler
|
||||||
void onClose (finalcut::FCloseEvent*) override;
|
void onClose (finalcut::FCloseEvent*) override;
|
||||||
|
|
||||||
// Data Members
|
// Data members
|
||||||
bool initialized{false};
|
bool initialized{false};
|
||||||
finalcut::FListView listView{this};
|
finalcut::FListView listView{this};
|
||||||
finalcut::FButton Quit{this};
|
finalcut::FButton Quit{this};
|
||||||
|
@ -168,7 +168,7 @@ struct Treeview::TreeItem
|
||||||
const char* const* end() const
|
const char* const* end() const
|
||||||
{ return reinterpret_cast<const char* const*>(&child_element); }
|
{ return reinterpret_cast<const char* const*>(&child_element); }
|
||||||
|
|
||||||
// Data Members
|
// Data members
|
||||||
const char* name;
|
const char* name;
|
||||||
const char* population;
|
const char* population;
|
||||||
const char* density;
|
const char* density;
|
||||||
|
|
|
@ -65,7 +65,7 @@ class ProgressDialog : public finalcut::FDialog
|
||||||
void cb_more_bar (finalcut::FWidget*, FDataPtr);
|
void cb_more_bar (finalcut::FWidget*, FDataPtr);
|
||||||
void cb_exit_bar (finalcut::FWidget*, FDataPtr);
|
void cb_exit_bar (finalcut::FWidget*, FDataPtr);
|
||||||
|
|
||||||
// Data Members
|
// Data members
|
||||||
finalcut::FProgressbar progressBar{this};
|
finalcut::FProgressbar progressBar{this};
|
||||||
finalcut::FButton reset{this};
|
finalcut::FButton reset{this};
|
||||||
finalcut::FButton more{this};
|
finalcut::FButton more{this};
|
||||||
|
@ -208,7 +208,7 @@ class TextWindow : public finalcut::FDialog
|
||||||
// Method
|
// Method
|
||||||
void adjustSize() override;
|
void adjustSize() override;
|
||||||
|
|
||||||
// Data Members
|
// Data members
|
||||||
finalcut::FTextView scrollText{this};
|
finalcut::FTextView scrollText{this};
|
||||||
};
|
};
|
||||||
#pragma pack(pop)
|
#pragma pack(pop)
|
||||||
|
@ -308,7 +308,7 @@ class MyDialog : public finalcut::FDialog
|
||||||
void cb_view (finalcut::FWidget*, FDataPtr);
|
void cb_view (finalcut::FWidget*, FDataPtr);
|
||||||
void cb_setInput (finalcut::FWidget*, FDataPtr);
|
void cb_setInput (finalcut::FWidget*, FDataPtr);
|
||||||
|
|
||||||
// Data Members
|
// Data members
|
||||||
bool initialized{false};
|
bool initialized{false};
|
||||||
finalcut::FMenuBar Menubar{this};
|
finalcut::FMenuBar Menubar{this};
|
||||||
// Menu bar items
|
// Menu bar items
|
||||||
|
|
|
@ -65,7 +65,7 @@ class Watch : public finalcut::FDialog
|
||||||
void adjustSize() override;
|
void adjustSize() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Data Members
|
// Data members
|
||||||
bool sec{true};
|
bool sec{true};
|
||||||
finalcut::FLabel time_label{L"Time", this};
|
finalcut::FLabel time_label{L"Time", this};
|
||||||
finalcut::FLabel time_str{L"--:--:--", this};
|
finalcut::FLabel time_str{L"--:--:--", this};
|
||||||
|
|
|
@ -58,7 +58,7 @@ class SmallWindow : public finalcut::FDialog
|
||||||
void onShow (finalcut::FShowEvent*) override;
|
void onShow (finalcut::FShowEvent*) override;
|
||||||
void onTimer (finalcut::FTimerEvent*) override;
|
void onTimer (finalcut::FTimerEvent*) override;
|
||||||
|
|
||||||
// Data Members
|
// Data members
|
||||||
finalcut::FLabel left_arrow{this};
|
finalcut::FLabel left_arrow{this};
|
||||||
finalcut::FLabel right_arrow{this};
|
finalcut::FLabel right_arrow{this};
|
||||||
finalcut::FLabel top_left_label{this};
|
finalcut::FLabel top_left_label{this};
|
||||||
|
@ -200,7 +200,7 @@ class Window : public finalcut::FDialog
|
||||||
// Disable assignment operator (=)
|
// Disable assignment operator (=)
|
||||||
win_data& operator = (const win_data&) = delete;
|
win_data& operator = (const win_data&) = delete;
|
||||||
|
|
||||||
// Data Members
|
// Data members
|
||||||
bool is_open{false};
|
bool is_open{false};
|
||||||
finalcut::FString title{};
|
finalcut::FString title{};
|
||||||
SmallWindow* dgl{nullptr};
|
SmallWindow* dgl{nullptr};
|
||||||
|
@ -224,7 +224,7 @@ class Window : public finalcut::FDialog
|
||||||
void cb_previous (finalcut::FWidget*, FDataPtr);
|
void cb_previous (finalcut::FWidget*, FDataPtr);
|
||||||
void cb_destroyWindow (finalcut::FWidget*, FDataPtr);
|
void cb_destroyWindow (finalcut::FWidget*, FDataPtr);
|
||||||
|
|
||||||
// Data Members
|
// Data members
|
||||||
std::vector<win_data*> windows{};
|
std::vector<win_data*> windows{};
|
||||||
finalcut::FString drop_down_symbol{fc::BlackDownPointingTriangle};
|
finalcut::FString drop_down_symbol{fc::BlackDownPointingTriangle};
|
||||||
finalcut::FMenuBar Menubar{this};
|
finalcut::FMenuBar Menubar{this};
|
||||||
|
|
|
@ -54,8 +54,8 @@ FCheckBox::~FCheckBox() // destructor
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
void FCheckBox::init()
|
void FCheckBox::init()
|
||||||
{
|
{
|
||||||
label_offset_pos = 4;
|
setLabelOffsetPos(4);
|
||||||
button_width = 4;
|
setButtonWidth(4);
|
||||||
setVisibleCursor();
|
setVisibleCursor();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -84,7 +84,7 @@ void FCheckBox::drawCheckButton()
|
||||||
setReverse(true);
|
setReverse(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( checked )
|
if ( isChecked() )
|
||||||
drawChecked();
|
drawChecked();
|
||||||
else
|
else
|
||||||
drawUnchecked();
|
drawUnchecked();
|
||||||
|
|
|
@ -54,8 +54,8 @@ FRadioButton::~FRadioButton() // destructor
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
void FRadioButton::init()
|
void FRadioButton::init()
|
||||||
{
|
{
|
||||||
label_offset_pos = 4;
|
setLabelOffsetPos(4);
|
||||||
button_width = 4;
|
setButtonWidth(4);
|
||||||
setVisibleCursor();
|
setVisibleCursor();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -84,7 +84,7 @@ void FRadioButton::drawRadioButton()
|
||||||
setReverse(true);
|
setReverse(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( checked )
|
if ( isChecked() )
|
||||||
drawChecked();
|
drawChecked();
|
||||||
else
|
else
|
||||||
drawUnchecked();
|
drawUnchecked();
|
||||||
|
|
|
@ -705,11 +705,11 @@ void FScrollView::copy2area()
|
||||||
, y_end = int(getViewportHeight())
|
, y_end = int(getViewportHeight())
|
||||||
, x_end = int(getViewportWidth());
|
, x_end = int(getViewportWidth());
|
||||||
|
|
||||||
// viewport width does not fit into the print_area
|
// viewport width does not fit into the printarea
|
||||||
if ( printarea->width <= ax + x_end )
|
if ( printarea->width <= ax + x_end )
|
||||||
x_end = printarea->width - ax;
|
x_end = printarea->width - ax;
|
||||||
|
|
||||||
// viewport height does not fit into the print_area
|
// viewport height does not fit into the printarea
|
||||||
if ( printarea->height <= ay + y_end )
|
if ( printarea->height <= ay + y_end )
|
||||||
y_end = printarea->height - ay;
|
y_end = printarea->height - ay;
|
||||||
|
|
||||||
|
|
|
@ -37,7 +37,7 @@ namespace finalcut
|
||||||
FSwitch::FSwitch(FWidget* parent)
|
FSwitch::FSwitch(FWidget* parent)
|
||||||
: FToggleButton(parent)
|
: FToggleButton(parent)
|
||||||
{
|
{
|
||||||
button_width = 11;
|
setButtonWidth(11);
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
|
@ -45,7 +45,7 @@ FSwitch::FSwitch (const FString& txt, FWidget* parent)
|
||||||
: FToggleButton(txt, parent)
|
: FToggleButton(txt, parent)
|
||||||
{
|
{
|
||||||
switch_offset_pos = txt.getLength() + 1;
|
switch_offset_pos = txt.getLength() + 1;
|
||||||
button_width = 11;
|
setButtonWidth(11);
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
|
@ -132,7 +132,7 @@ void FSwitch::drawCheckButton()
|
||||||
{
|
{
|
||||||
print() << FPoint(1 + int(switch_offset_pos), 1);
|
print() << FPoint(1 + int(switch_offset_pos), 1);
|
||||||
|
|
||||||
if ( checked )
|
if ( isChecked() )
|
||||||
drawChecked();
|
drawChecked();
|
||||||
else
|
else
|
||||||
drawUnchecked();
|
drawUnchecked();
|
||||||
|
|
|
@ -1828,9 +1828,7 @@ void FTerm::init_term_encoding()
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
void FTerm::init_individual_term_encoding()
|
void FTerm::init_individual_term_encoding()
|
||||||
{
|
{
|
||||||
if ( isLinuxTerm()
|
if ( isNewFont()
|
||||||
|| isCygwinTerminal()
|
|
||||||
|| isNewFont()
|
|
||||||
|| (isPuttyTerminal() && ! data->isUTF8())
|
|| (isPuttyTerminal() && ! data->isUTF8())
|
||||||
|| (isTeraTerm() && ! data->isUTF8()) )
|
|| (isTeraTerm() && ! data->isUTF8()) )
|
||||||
{
|
{
|
||||||
|
@ -1839,9 +1837,7 @@ void FTerm::init_individual_term_encoding()
|
||||||
|
|
||||||
if ( hasUTF8() && init_values.encoding == fc::UNKNOWN )
|
if ( hasUTF8() && init_values.encoding == fc::UNKNOWN )
|
||||||
{
|
{
|
||||||
if ( isLinuxTerm() )
|
if ( isXTerminal() )
|
||||||
setUTF8(false);
|
|
||||||
else if ( isXTerminal() )
|
|
||||||
Fputchar = &FTerm::putchar_UTF8; // function pointer
|
Fputchar = &FTerm::putchar_UTF8; // function pointer
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -100,7 +100,7 @@ int FTermBuffer::write (wchar_t c)
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
void FTermBuffer::write (const FColorPair& pair)
|
void FTermBuffer::write (const FColorPair& pair)
|
||||||
{
|
{
|
||||||
FVTerm::setColor(pair.fg_color, pair.bg_color);
|
FVTerm::setColor(pair.getForegroundColor(), pair.getBackgroundColor());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -599,7 +599,7 @@ void FVTerm::print (const FPoint& p)
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
void FVTerm::print (const FColorPair& pair)
|
void FVTerm::print (const FColorPair& pair)
|
||||||
{
|
{
|
||||||
setColor (pair.fg_color, pair.bg_color);
|
setColor (pair.getForegroundColor(), pair.getBackgroundColor());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -59,7 +59,7 @@ public:
|
||||||
static void clear();
|
static void clear();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Data Member
|
// Data member
|
||||||
static const FString* empty_string;
|
static const FString* empty_string;
|
||||||
};
|
};
|
||||||
#pragma pack(pop)
|
#pragma pack(pop)
|
||||||
|
|
|
@ -187,7 +187,7 @@ class FApplication : public FWidget
|
||||||
void performTimerAction ( const FObject*
|
void performTimerAction ( const FObject*
|
||||||
, const FEvent* ) override;
|
, const FEvent* ) override;
|
||||||
|
|
||||||
// Data Members
|
// Data members
|
||||||
int app_argc;
|
int app_argc;
|
||||||
char** app_argv;
|
char** app_argv;
|
||||||
uInt64 key_timeout{100000}; // 100 ms
|
uInt64 key_timeout{100000}; // 100 ms
|
||||||
|
|
|
@ -158,7 +158,7 @@ class FButton : public FWidget
|
||||||
void updateButtonColor();
|
void updateButtonColor();
|
||||||
void processClick();
|
void processClick();
|
||||||
|
|
||||||
// Data Members
|
// Data members
|
||||||
FString text{};
|
FString text{};
|
||||||
bool button_down{false};
|
bool button_down{false};
|
||||||
bool active_focus{false};
|
bool active_focus{false};
|
||||||
|
|
|
@ -140,7 +140,7 @@ class FButtonGroup : public FScrollView
|
||||||
// Callback method
|
// Callback method
|
||||||
void cb_buttonToggled (FWidget*, FDataPtr);
|
void cb_buttonToggled (FWidget*, FDataPtr);
|
||||||
|
|
||||||
// Data Members
|
// Data members
|
||||||
FString text{};
|
FString text{};
|
||||||
FObjectList buttonlist{};
|
FObjectList buttonlist{};
|
||||||
};
|
};
|
||||||
|
|
|
@ -53,14 +53,14 @@ class FColorPair
|
||||||
public:
|
public:
|
||||||
// Constructors
|
// Constructors
|
||||||
explicit FColorPair (FColor fg = fc::Default, FColor bg = fc::Default)
|
explicit FColorPair (FColor fg = fc::Default, FColor bg = fc::Default)
|
||||||
: fg_color(fg)
|
: fg_color{fg}
|
||||||
, bg_color(bg)
|
, bg_color{bg}
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
// Copy constructor
|
// Copy constructor
|
||||||
FColorPair (const FColorPair& pair)
|
FColorPair (const FColorPair& pair)
|
||||||
: fg_color(pair.fg_color)
|
: fg_color{pair.fg_color}
|
||||||
, bg_color(pair.bg_color)
|
, bg_color{pair.bg_color}
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
// Destructor
|
// Destructor
|
||||||
|
@ -78,13 +78,39 @@ class FColorPair
|
||||||
const char* getClassName() const
|
const char* getClassName() const
|
||||||
{ return "FColorPair"; }
|
{ return "FColorPair"; }
|
||||||
|
|
||||||
|
FColor getForegroundColor() const
|
||||||
|
{ return fg_color; }
|
||||||
|
|
||||||
|
FColor getBackgroundColor() const
|
||||||
|
{ return bg_color; }
|
||||||
|
|
||||||
|
// Mutators
|
||||||
|
void setForegroundColor (FColor color)
|
||||||
|
{ fg_color = color; }
|
||||||
|
|
||||||
|
void setBackgroundColor (FColor color)
|
||||||
|
{ bg_color = color; }
|
||||||
|
|
||||||
|
void setColorPair (const FColorPair& pair)
|
||||||
|
{
|
||||||
|
fg_color = pair.fg_color;
|
||||||
|
bg_color = pair.bg_color;
|
||||||
|
}
|
||||||
|
|
||||||
|
void setColorPair (FColor fg, FColor bg)
|
||||||
|
{
|
||||||
|
fg_color = fg;
|
||||||
|
bg_color = bg;
|
||||||
|
}
|
||||||
|
|
||||||
// Methods
|
// Methods
|
||||||
void swap()
|
void swap()
|
||||||
{
|
{
|
||||||
std::swap (fg_color, bg_color);
|
std::swap (fg_color, bg_color);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Data Members
|
private:
|
||||||
|
// Data members
|
||||||
FColor fg_color; // Foreground color
|
FColor fg_color; // Foreground color
|
||||||
FColor bg_color; // Background color
|
FColor bg_color; // Background color
|
||||||
};
|
};
|
||||||
|
|
|
@ -218,7 +218,7 @@ class FDialog : public FWindow
|
||||||
void cb_zoom (FWidget*, FDataPtr);
|
void cb_zoom (FWidget*, FDataPtr);
|
||||||
void cb_close (FWidget*, FDataPtr);
|
void cb_close (FWidget*, FDataPtr);
|
||||||
|
|
||||||
// Data Members
|
// Data members
|
||||||
FString tb_text{}; // title bar text
|
FString tb_text{}; // title bar text
|
||||||
int result_code{FDialog::Reject};
|
int result_code{FDialog::Reject};
|
||||||
bool zoom_button_pressed{false};
|
bool zoom_button_pressed{false};
|
||||||
|
|
|
@ -196,7 +196,7 @@ class FFileDialog : public FDialog
|
||||||
void cb_processOpen (FWidget*, FDataPtr);
|
void cb_processOpen (FWidget*, FDataPtr);
|
||||||
void cb_processShowHidden (FWidget*, FDataPtr);
|
void cb_processShowHidden (FWidget*, FDataPtr);
|
||||||
|
|
||||||
// Data Members
|
// Data members
|
||||||
static FSystem* fsystem;
|
static FSystem* fsystem;
|
||||||
DIR* directory_stream{nullptr};
|
DIR* directory_stream{nullptr};
|
||||||
dirEntries dir_entries{};
|
dirEntries dir_entries{};
|
||||||
|
|
|
@ -64,7 +64,7 @@ class FKeyboardCommand final
|
||||||
void execute();
|
void execute();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Data Members
|
// Data members
|
||||||
FApplication* instance{nullptr};
|
FApplication* instance{nullptr};
|
||||||
void (FApplication::*handler)(){nullptr};
|
void (FApplication::*handler)(){nullptr};
|
||||||
};
|
};
|
||||||
|
@ -159,7 +159,7 @@ class FKeyboard final
|
||||||
void keyReleased();
|
void keyReleased();
|
||||||
void escapeKeyPressed();
|
void escapeKeyPressed();
|
||||||
|
|
||||||
// Data Members
|
// Data members
|
||||||
FKey key{0};
|
FKey key{0};
|
||||||
char read_buf[READ_BUF_SIZE]{'\0'};
|
char read_buf[READ_BUF_SIZE]{'\0'};
|
||||||
char fifo_buf[FIFO_BUF_SIZE]{'\0'};
|
char fifo_buf[FIFO_BUF_SIZE]{'\0'};
|
||||||
|
|
|
@ -152,7 +152,7 @@ class FLabel : public FWidget
|
||||||
void printLine ( wchar_t[], std::size_t
|
void printLine ( wchar_t[], std::size_t
|
||||||
, std::size_t, std::size_t = 0 );
|
, std::size_t, std::size_t = 0 );
|
||||||
|
|
||||||
// Data Members
|
// Data members
|
||||||
FStringList multiline_text{};
|
FStringList multiline_text{};
|
||||||
bool multiline{false};
|
bool multiline{false};
|
||||||
FString text{};
|
FString text{};
|
||||||
|
|
|
@ -185,7 +185,7 @@ class FLineEdit : public FWidget
|
||||||
void processActivate();
|
void processActivate();
|
||||||
void processChanged();
|
void processChanged();
|
||||||
|
|
||||||
// Data Members
|
// Data members
|
||||||
FString text{""};
|
FString text{""};
|
||||||
FString label_text{""};
|
FString label_text{""};
|
||||||
FLabel* label{};
|
FLabel* label{};
|
||||||
|
|
|
@ -102,7 +102,7 @@ class FListBoxItem
|
||||||
// Friend classes
|
// Friend classes
|
||||||
friend class FListBox;
|
friend class FListBox;
|
||||||
|
|
||||||
// Data Members
|
// Data members
|
||||||
FString text{};
|
FString text{};
|
||||||
FDataPtr data_pointer{nullptr};
|
FDataPtr data_pointer{nullptr};
|
||||||
fc::brackets_type brackets{fc::NoBrackets};
|
fc::brackets_type brackets{fc::NoBrackets};
|
||||||
|
@ -326,7 +326,7 @@ class FListBox : public FWidget
|
||||||
, FDataPtr
|
, FDataPtr
|
||||||
, int index ){nullptr};
|
, int index ){nullptr};
|
||||||
|
|
||||||
// Data Members
|
// Data members
|
||||||
listBoxItems itemlist{};
|
listBoxItems itemlist{};
|
||||||
FDataPtr source_container{nullptr};
|
FDataPtr source_container{nullptr};
|
||||||
convert_type conv_type{FListBox::no_convert};
|
convert_type conv_type{FListBox::no_convert};
|
||||||
|
|
|
@ -128,7 +128,7 @@ class FListViewItem : public FObject
|
||||||
std::size_t getVisibleLines();
|
std::size_t getVisibleLines();
|
||||||
void resetVisibleLineCounter();
|
void resetVisibleLineCounter();
|
||||||
|
|
||||||
// Data Members
|
// Data members
|
||||||
FStringList column_list{};
|
FStringList column_list{};
|
||||||
FDataPtr data_pointer{nullptr};
|
FDataPtr data_pointer{nullptr};
|
||||||
FObjectIterator root{};
|
FObjectIterator root{};
|
||||||
|
@ -226,7 +226,7 @@ class FListViewIterator
|
||||||
void nextElement (FObjectIterator&);
|
void nextElement (FObjectIterator&);
|
||||||
void prevElement (FObjectIterator&);
|
void prevElement (FObjectIterator&);
|
||||||
|
|
||||||
// Data Members
|
// Data members
|
||||||
FObjectIteratorStack iter_path{};
|
FObjectIteratorStack iter_path{};
|
||||||
FObjectIterator node{};
|
FObjectIterator node{};
|
||||||
int position{0};
|
int position{0};
|
||||||
|
@ -360,7 +360,7 @@ class FListView : public FWidget
|
||||||
void onFocusIn (FFocusEvent*) override;
|
void onFocusIn (FFocusEvent*) override;
|
||||||
void onFocusOut (FFocusEvent*) override;
|
void onFocusOut (FFocusEvent*) override;
|
||||||
|
|
||||||
// Data Members
|
// Data members
|
||||||
static FObjectIterator null_iter;
|
static FObjectIterator null_iter;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
@ -447,7 +447,7 @@ class FListView : public FWidget
|
||||||
void cb_VBarChange (FWidget*, FDataPtr);
|
void cb_VBarChange (FWidget*, FDataPtr);
|
||||||
void cb_HBarChange (FWidget*, FDataPtr);
|
void cb_HBarChange (FWidget*, FDataPtr);
|
||||||
|
|
||||||
// Data Members
|
// Data members
|
||||||
FObjectIterator root{};
|
FObjectIterator root{};
|
||||||
FObjectList selflist{};
|
FObjectList selflist{};
|
||||||
FObjectList itemlist{};
|
FObjectList itemlist{};
|
||||||
|
|
|
@ -229,7 +229,7 @@ class FMenu : public FWindow, public FMenuList
|
||||||
friend class FMenuItem;
|
friend class FMenuItem;
|
||||||
friend class FRadioMenuItem;
|
friend class FRadioMenuItem;
|
||||||
|
|
||||||
// Data Members
|
// Data members
|
||||||
FMenuItem item{};
|
FMenuItem item{};
|
||||||
FWidget* super_menu{nullptr};
|
FWidget* super_menu{nullptr};
|
||||||
FMenu* opened_sub_menu{nullptr};
|
FMenu* opened_sub_menu{nullptr};
|
||||||
|
|
|
@ -154,7 +154,7 @@ class FMenuBar : public FWindow, public FMenuList
|
||||||
friend class FMenu;
|
friend class FMenu;
|
||||||
friend class FMenuItem;
|
friend class FMenuItem;
|
||||||
|
|
||||||
// Data Members
|
// Data members
|
||||||
bool mouse_down{false};
|
bool mouse_down{false};
|
||||||
bool drop_down{false};
|
bool drop_down{false};
|
||||||
bool focus_changed{false};
|
bool focus_changed{false};
|
||||||
|
|
|
@ -176,7 +176,7 @@ class FMenuItem : public FWidget
|
||||||
|
|
||||||
virtual void processClicked();
|
virtual void processClicked();
|
||||||
|
|
||||||
// Data Members
|
// Data members
|
||||||
FString text{};
|
FString text{};
|
||||||
bool selected{false};
|
bool selected{false};
|
||||||
bool separator{false};
|
bool separator{false};
|
||||||
|
|
|
@ -99,7 +99,7 @@ class FMenuList
|
||||||
void unselectItem();
|
void unselectItem();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Data Members
|
// Data members
|
||||||
FMenuItem* selected_item{};
|
FMenuItem* selected_item{};
|
||||||
std::vector<FMenuItem*> item_list{};
|
std::vector<FMenuItem*> item_list{};
|
||||||
};
|
};
|
||||||
|
|
|
@ -155,7 +155,7 @@ class FMessageBox : public FDialog
|
||||||
void resizeButtons();
|
void resizeButtons();
|
||||||
void adjustButtons();
|
void adjustButtons();
|
||||||
|
|
||||||
// Data Members
|
// Data members
|
||||||
FString headline_text{};
|
FString headline_text{};
|
||||||
FString text{};
|
FString text{};
|
||||||
FString* text_components{nullptr};
|
FString* text_components{nullptr};
|
||||||
|
|
|
@ -182,7 +182,7 @@ class FMouse
|
||||||
bool isDblclickTimeout (timeval*);
|
bool isDblclickTimeout (timeval*);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Data Members
|
// Data members
|
||||||
button b_state{};
|
button b_state{};
|
||||||
bool mouse_event_occurred{false};
|
bool mouse_event_occurred{false};
|
||||||
bool input_data_pending{false};
|
bool input_data_pending{false};
|
||||||
|
@ -247,7 +247,7 @@ class FMouseGPM final : public FMouse
|
||||||
// Method
|
// Method
|
||||||
int gpmEvent (bool = true);
|
int gpmEvent (bool = true);
|
||||||
|
|
||||||
// Data Member
|
// Data member
|
||||||
Gpm_Event gpm_ev{};
|
Gpm_Event gpm_ev{};
|
||||||
bool has_gpm_mouse_data{false};
|
bool has_gpm_mouse_data{false};
|
||||||
bool gpm_mouse_enabled{false};
|
bool gpm_mouse_enabled{false};
|
||||||
|
@ -325,7 +325,7 @@ class FMouseX11 final : public FMouse
|
||||||
void setMoveState (const FPoint&, int);
|
void setMoveState (const FPoint&, int);
|
||||||
void setButtonState (int, struct timeval*);
|
void setButtonState (int, struct timeval*);
|
||||||
|
|
||||||
// Data Member
|
// Data member
|
||||||
char x11_mouse[MOUSE_BUF_SIZE]{'\0'};
|
char x11_mouse[MOUSE_BUF_SIZE]{'\0'};
|
||||||
uChar x11_button_state{all_buttons_released};
|
uChar x11_button_state{all_buttons_released};
|
||||||
};
|
};
|
||||||
|
@ -388,7 +388,7 @@ class FMouseSGR final : public FMouse
|
||||||
void setPressedButtonState (int, struct timeval*);
|
void setPressedButtonState (int, struct timeval*);
|
||||||
void setReleasedButtonState (int);
|
void setReleasedButtonState (int);
|
||||||
|
|
||||||
// Data Members
|
// Data members
|
||||||
char sgr_mouse[MOUSE_BUF_SIZE]{'\0'};
|
char sgr_mouse[MOUSE_BUF_SIZE]{'\0'};
|
||||||
uChar sgr_button_state{0x23};
|
uChar sgr_button_state{0x23};
|
||||||
};
|
};
|
||||||
|
@ -451,7 +451,7 @@ class FMouseUrxvt final : public FMouse
|
||||||
void setMoveState (const FPoint&, int);
|
void setMoveState (const FPoint&, int);
|
||||||
void setButtonState (int, struct timeval*);
|
void setButtonState (int, struct timeval*);
|
||||||
|
|
||||||
// Data Members
|
// Data members
|
||||||
char urxvt_mouse[MOUSE_BUF_SIZE]{'\0'};
|
char urxvt_mouse[MOUSE_BUF_SIZE]{'\0'};
|
||||||
uChar urxvt_button_state{all_buttons_released};
|
uChar urxvt_button_state{all_buttons_released};
|
||||||
};
|
};
|
||||||
|
@ -525,7 +525,7 @@ class FMouseControl
|
||||||
void enableXTermMouse();
|
void enableXTermMouse();
|
||||||
void disableXTermMouse();
|
void disableXTermMouse();
|
||||||
|
|
||||||
// Data Member
|
// Data member
|
||||||
FMouseProtocol mouse_protocol{};
|
FMouseProtocol mouse_protocol{};
|
||||||
FPoint zero_point{0, 0};
|
FPoint zero_point{0, 0};
|
||||||
bool use_gpm_mouse{false};
|
bool use_gpm_mouse{false};
|
||||||
|
|
|
@ -157,7 +157,7 @@ class FObject
|
||||||
// Method
|
// Method
|
||||||
virtual void performTimerAction (const FObject*, const FEvent*);
|
virtual void performTimerAction (const FObject*, const FEvent*);
|
||||||
|
|
||||||
// Data Members
|
// Data members
|
||||||
FObject* parent_obj{nullptr};
|
FObject* parent_obj{nullptr};
|
||||||
FObjectList children_list{}; // no children yet
|
FObjectList children_list{}; // no children yet
|
||||||
bool has_parent{false};
|
bool has_parent{false};
|
||||||
|
|
|
@ -185,7 +185,7 @@ class FOptiAttr final
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Typedefs and Enumerations
|
// Typedefs and Enumerations
|
||||||
typedef struct
|
typedef struct alignas(alignof(char*))
|
||||||
{
|
{
|
||||||
char* cap;
|
char* cap;
|
||||||
bool caused_reset;
|
bool caused_reset;
|
||||||
|
@ -284,7 +284,7 @@ class FOptiAttr final
|
||||||
bool switchOff();
|
bool switchOff();
|
||||||
bool append_sequence (char[]);
|
bool append_sequence (char[]);
|
||||||
|
|
||||||
// Data Members
|
// Data members
|
||||||
capability F_enter_bold_mode{};
|
capability F_enter_bold_mode{};
|
||||||
capability F_exit_bold_mode{};
|
capability F_exit_bold_mode{};
|
||||||
capability F_enter_dim_mode{};
|
capability F_enter_dim_mode{};
|
||||||
|
|
|
@ -208,7 +208,7 @@ class FOptiMove final
|
||||||
// Friend function
|
// Friend function
|
||||||
friend void printDurations (const FOptiMove&);
|
friend void printDurations (const FOptiMove&);
|
||||||
|
|
||||||
// Data Members
|
// Data members
|
||||||
capability F_cursor_home{};
|
capability F_cursor_home{};
|
||||||
capability F_carriage_return{};
|
capability F_carriage_return{};
|
||||||
capability F_cursor_to_ll{};
|
capability F_cursor_to_ll{};
|
||||||
|
|
|
@ -90,7 +90,7 @@ class FPoint
|
||||||
int& y_ref();
|
int& y_ref();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Data Members
|
// Data members
|
||||||
int xpos{0};
|
int xpos{0};
|
||||||
int ypos{0};
|
int ypos{0};
|
||||||
};
|
};
|
||||||
|
|
|
@ -106,7 +106,7 @@ class FProgressbar : public FWidget
|
||||||
std::size_t drawProgressIndicator();
|
std::size_t drawProgressIndicator();
|
||||||
void drawProgressBackground (std::size_t);
|
void drawProgressBackground (std::size_t);
|
||||||
|
|
||||||
// Data Members
|
// Data members
|
||||||
std::size_t percentage{NOT_SET};
|
std::size_t percentage{NOT_SET};
|
||||||
std::size_t bar_length{getWidth()};
|
std::size_t bar_length{getWidth()};
|
||||||
};
|
};
|
||||||
|
|
|
@ -138,7 +138,7 @@ class FRect
|
||||||
FRect combined (const FRect&) const;
|
FRect combined (const FRect&) const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Data Members
|
// Data members
|
||||||
int X1{0};
|
int X1{0};
|
||||||
int Y1{0};
|
int Y1{0};
|
||||||
int X2{-1};
|
int X2{-1};
|
||||||
|
|
|
@ -143,7 +143,7 @@ class FScrollbar : public FWidget
|
||||||
void avoidScrollOvershoot();
|
void avoidScrollOvershoot();
|
||||||
void processScroll();
|
void processScroll();
|
||||||
|
|
||||||
// Data Members
|
// Data members
|
||||||
sType scroll_type{FScrollbar::noScroll};
|
sType scroll_type{FScrollbar::noScroll};
|
||||||
bool threshold_reached{false};
|
bool threshold_reached{false};
|
||||||
int threshold_time{500};
|
int threshold_time{500};
|
||||||
|
|
|
@ -181,7 +181,7 @@ class FScrollView : public FWidget
|
||||||
void cb_VBarChange (FWidget*, FDataPtr);
|
void cb_VBarChange (FWidget*, FDataPtr);
|
||||||
void cb_HBarChange (FWidget*, FDataPtr);
|
void cb_HBarChange (FWidget*, FDataPtr);
|
||||||
|
|
||||||
// Data Members
|
// Data members
|
||||||
FRect scroll_geometry{1, 1, 1, 1};
|
FRect scroll_geometry{1, 1, 1, 1};
|
||||||
FRect viewport_geometry{};
|
FRect viewport_geometry{};
|
||||||
term_area* viewport{nullptr}; // virtual scroll content
|
term_area* viewport{nullptr}; // virtual scroll content
|
||||||
|
|
|
@ -98,7 +98,7 @@ class FSize
|
||||||
std::size_t& height_ref();
|
std::size_t& height_ref();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Data Members
|
// Data members
|
||||||
std::size_t width{0};
|
std::size_t width{0};
|
||||||
std::size_t height{0};
|
std::size_t height{0};
|
||||||
};
|
};
|
||||||
|
|
|
@ -124,7 +124,7 @@ class FStatusKey : public FWidget
|
||||||
// Friend class
|
// Friend class
|
||||||
friend class FStatusBar;
|
friend class FStatusBar;
|
||||||
|
|
||||||
// Data Members
|
// Data members
|
||||||
FKey key{0};
|
FKey key{0};
|
||||||
FString text{};
|
FString text{};
|
||||||
bool active{false};
|
bool active{false};
|
||||||
|
@ -250,7 +250,7 @@ class FStatusBar : public FWindow
|
||||||
void drawKey (keyList::const_iterator);
|
void drawKey (keyList::const_iterator);
|
||||||
void drawActiveKey (keyList::const_iterator);
|
void drawActiveKey (keyList::const_iterator);
|
||||||
|
|
||||||
// Data Members
|
// Data members
|
||||||
keyList key_list{};
|
keyList key_list{};
|
||||||
FString text{""};
|
FString text{""};
|
||||||
bool mouse_down{};
|
bool mouse_down{};
|
||||||
|
|
|
@ -274,7 +274,7 @@ class FString
|
||||||
wchar_t* c_to_wc_str (const char[]) const;
|
wchar_t* c_to_wc_str (const char[]) const;
|
||||||
wchar_t* extractToken (wchar_t*[], const wchar_t[], const wchar_t[]);
|
wchar_t* extractToken (wchar_t*[], const wchar_t[], const wchar_t[]);
|
||||||
|
|
||||||
// Data Members
|
// Data members
|
||||||
wchar_t* string{nullptr};
|
wchar_t* string{nullptr};
|
||||||
std::size_t length{0};
|
std::size_t length{0};
|
||||||
std::size_t bufsize{0};
|
std::size_t bufsize{0};
|
||||||
|
|
|
@ -103,7 +103,7 @@ class FSwitch : public FToggleButton
|
||||||
void drawChecked();
|
void drawChecked();
|
||||||
void drawUnchecked();
|
void drawUnchecked();
|
||||||
|
|
||||||
// Data Members
|
// Data members
|
||||||
std::size_t switch_offset_pos{0};
|
std::size_t switch_offset_pos{0};
|
||||||
bool button_pressed{false};
|
bool button_pressed{false};
|
||||||
};
|
};
|
||||||
|
|
|
@ -305,7 +305,7 @@ class FTerm final
|
||||||
__attribute__((noreturn))
|
__attribute__((noreturn))
|
||||||
#endif
|
#endif
|
||||||
;
|
;
|
||||||
// Data Members
|
// Data members
|
||||||
static struct initializationValues
|
static struct initializationValues
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
@ -401,7 +401,7 @@ class FTerm final
|
||||||
static void resetSignalHandler();
|
static void resetSignalHandler();
|
||||||
static void signal_handler (int);
|
static void signal_handler (int);
|
||||||
|
|
||||||
// Data Members
|
// Data members
|
||||||
static FTermData* data;
|
static FTermData* data;
|
||||||
static FSystem* fsys;
|
static FSystem* fsys;
|
||||||
static FOptiMove* opti_move;
|
static FOptiMove* opti_move;
|
||||||
|
|
|
@ -97,7 +97,7 @@ class FTermcap final
|
||||||
// Methods
|
// Methods
|
||||||
static void init();
|
static void init();
|
||||||
|
|
||||||
// Data Members
|
// Data members
|
||||||
static bool background_color_erase;
|
static bool background_color_erase;
|
||||||
static bool can_change_color_palette;
|
static bool can_change_color_palette;
|
||||||
static bool automatic_left_margin;
|
static bool automatic_left_margin;
|
||||||
|
@ -122,7 +122,7 @@ class FTermcap final
|
||||||
static void termcapKeys (char*&);
|
static void termcapKeys (char*&);
|
||||||
static void termcapKeysVt100 (char*&);
|
static void termcapKeysVt100 (char*&);
|
||||||
|
|
||||||
// Data Member
|
// Data member
|
||||||
static FTermData* fterm_data;
|
static FTermData* fterm_data;
|
||||||
static FTermDetection* term_detection;
|
static FTermDetection* term_detection;
|
||||||
};
|
};
|
||||||
|
|
|
@ -81,7 +81,7 @@ class FTermcapQuirks final
|
||||||
static void general();
|
static void general();
|
||||||
static void ecma48();
|
static void ecma48();
|
||||||
|
|
||||||
// Data Members
|
// Data members
|
||||||
static FTermData* fterm_data;
|
static FTermData* fterm_data;
|
||||||
static FTermDetection* term_detection;
|
static FTermDetection* term_detection;
|
||||||
};
|
};
|
||||||
|
|
|
@ -128,7 +128,7 @@ class FTermData final
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Data Members
|
// Data members
|
||||||
encodingMap encoding_list{};
|
encodingMap encoding_list{};
|
||||||
charSubstitution char_substitution_map{};
|
charSubstitution char_substitution_map{};
|
||||||
fc::encoding term_encoding{fc::UNKNOWN};
|
fc::encoding term_encoding{fc::UNKNOWN};
|
||||||
|
|
|
@ -77,7 +77,7 @@ class FTermDebugData final
|
||||||
static void init();
|
static void init();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Data Members
|
// Data members
|
||||||
static FTermData* data;
|
static FTermData* data;
|
||||||
static FTermDetection* term_detection;
|
static FTermDetection* term_detection;
|
||||||
};
|
};
|
||||||
|
|
|
@ -186,7 +186,7 @@ class FTermDetection final
|
||||||
static char* secDA_Analysis_85 (char[]);
|
static char* secDA_Analysis_85 (char[]);
|
||||||
static char* secDA_Analysis_vte (char[]);
|
static char* secDA_Analysis_vte (char[]);
|
||||||
|
|
||||||
// Data Members
|
// Data members
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
static char termtype_256color[256];
|
static char termtype_256color[256];
|
||||||
static char termtype_Answerback[256];
|
static char termtype_Answerback[256];
|
||||||
|
|
|
@ -126,7 +126,7 @@ class FTermFreeBSD final
|
||||||
static bool resetFreeBSDAlt2Meta();
|
static bool resetFreeBSDAlt2Meta();
|
||||||
static bool setFreeBSDCursorStyle (CursorStyle);
|
static bool setFreeBSDCursorStyle (CursorStyle);
|
||||||
|
|
||||||
// Data Members
|
// Data members
|
||||||
static uInt bsd_alt_keymap;
|
static uInt bsd_alt_keymap;
|
||||||
static CursorStyle cursor_style;
|
static CursorStyle cursor_style;
|
||||||
static bool change_cursorstyle;
|
static bool change_cursorstyle;
|
||||||
|
|
|
@ -85,7 +85,7 @@ class FTermios final
|
||||||
static uInt getBaudRate();
|
static uInt getBaudRate();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Data Members
|
// Data members
|
||||||
static int stdin_no;
|
static int stdin_no;
|
||||||
static int stdout_no;
|
static int stdout_no;
|
||||||
static int stderr_no;
|
static int stderr_no;
|
||||||
|
|
|
@ -177,7 +177,7 @@ class FTermLinux final
|
||||||
static void initSpecialCharacter();
|
static void initSpecialCharacter();
|
||||||
static void characterFallback (wchar_t, std::vector<wchar_t>);
|
static void characterFallback (wchar_t, std::vector<wchar_t>);
|
||||||
|
|
||||||
// Data Members
|
// Data members
|
||||||
#if defined(__linux__)
|
#if defined(__linux__)
|
||||||
static bool vga_font;
|
static bool vga_font;
|
||||||
static bool new_font;
|
static bool new_font;
|
||||||
|
|
|
@ -113,7 +113,7 @@ class FTermOpenBSD final
|
||||||
static bool setBSDConsoleMetaEsc();
|
static bool setBSDConsoleMetaEsc();
|
||||||
static bool resetBSDConsoleEncoding();
|
static bool resetBSDConsoleEncoding();
|
||||||
|
|
||||||
// Data Members
|
// Data members
|
||||||
static kbd_t bsd_keyboard_encoding;
|
static kbd_t bsd_keyboard_encoding;
|
||||||
static bool meta_sends_escape;
|
static bool meta_sends_escape;
|
||||||
static FSystem* fsystem;
|
static FSystem* fsystem;
|
||||||
|
|
|
@ -138,7 +138,7 @@ class FTermXTerminal final
|
||||||
static void enableXTermMetaSendsESC();
|
static void enableXTermMetaSendsESC();
|
||||||
static void disableXTermMetaSendsESC();
|
static void disableXTermMetaSendsESC();
|
||||||
|
|
||||||
// Data Members
|
// Data members
|
||||||
static bool mouse_support;
|
static bool mouse_support;
|
||||||
static bool meta_sends_esc;
|
static bool meta_sends_esc;
|
||||||
static bool xterm_default_colors;
|
static bool xterm_default_colors;
|
||||||
|
|
|
@ -157,7 +157,7 @@ class FTextView : public FWidget
|
||||||
void cb_VBarChange (FWidget*, FDataPtr);
|
void cb_VBarChange (FWidget*, FDataPtr);
|
||||||
void cb_HBarChange (FWidget*, FDataPtr);
|
void cb_HBarChange (FWidget*, FDataPtr);
|
||||||
|
|
||||||
// Data Members
|
// Data members
|
||||||
FStringList data{};
|
FStringList data{};
|
||||||
FScrollbarPtr vbar{nullptr};
|
FScrollbarPtr vbar{nullptr};
|
||||||
FScrollbarPtr hbar{nullptr};
|
FScrollbarPtr hbar{nullptr};
|
||||||
|
|
|
@ -128,6 +128,8 @@ class FToggleButton : public FWidget
|
||||||
|
|
||||||
// Mutator
|
// Mutator
|
||||||
void setHotkeyAccelerator();
|
void setHotkeyAccelerator();
|
||||||
|
void setButtonWidth (std::size_t);
|
||||||
|
void setLabelOffsetPos (std::size_t);
|
||||||
|
|
||||||
// Inquiries
|
// Inquiries
|
||||||
bool isRadioButton() const;
|
bool isRadioButton() const;
|
||||||
|
@ -143,11 +145,6 @@ class FToggleButton : public FWidget
|
||||||
// Event handler
|
// Event handler
|
||||||
void onKeyPress (FKeyEvent*) override;
|
void onKeyPress (FKeyEvent*) override;
|
||||||
|
|
||||||
// Data Members
|
|
||||||
bool checked{false};
|
|
||||||
std::size_t label_offset_pos{0};
|
|
||||||
std::size_t button_width{0}; // plus margin spaces
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Constants
|
// Constants
|
||||||
static constexpr std::size_t NOT_SET = static_cast<std::size_t>(-1);
|
static constexpr std::size_t NOT_SET = static_cast<std::size_t>(-1);
|
||||||
|
@ -162,10 +159,13 @@ class FToggleButton : public FWidget
|
||||||
// Friend classes
|
// Friend classes
|
||||||
friend class FButtonGroup;
|
friend class FButtonGroup;
|
||||||
|
|
||||||
// Data Members
|
// Data members
|
||||||
FButtonGroup* button_group{nullptr};
|
FButtonGroup* button_group{nullptr};
|
||||||
bool focus_inside_group{true};
|
|
||||||
FString text{};
|
FString text{};
|
||||||
|
std::size_t label_offset_pos{0};
|
||||||
|
std::size_t button_width{0}; // plus margin spaces
|
||||||
|
bool focus_inside_group{true};
|
||||||
|
bool checked{false};
|
||||||
};
|
};
|
||||||
#pragma pack(pop)
|
#pragma pack(pop)
|
||||||
|
|
||||||
|
@ -223,6 +223,14 @@ inline bool FToggleButton::isChecked()
|
||||||
inline FButtonGroup* FToggleButton::getGroup() const
|
inline FButtonGroup* FToggleButton::getGroup() const
|
||||||
{ return button_group; }
|
{ return button_group; }
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------
|
||||||
|
inline void FToggleButton::setButtonWidth (std::size_t width)
|
||||||
|
{ button_width = width; }
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------
|
||||||
|
inline void FToggleButton::setLabelOffsetPos (std::size_t offset)
|
||||||
|
{ label_offset_pos = offset; }
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
inline bool FToggleButton::hasGroup() const
|
inline bool FToggleButton::hasGroup() const
|
||||||
{ return button_group; }
|
{ return button_group; }
|
||||||
|
|
|
@ -108,7 +108,7 @@ class FToolTip : public FWindow
|
||||||
void calculateDimensions();
|
void calculateDimensions();
|
||||||
void adjustSize() override;
|
void adjustSize() override;
|
||||||
|
|
||||||
// Data Members
|
// Data members
|
||||||
FString text{};
|
FString text{};
|
||||||
FString* text_components{nullptr};
|
FString* text_components{nullptr};
|
||||||
FStringList text_split{};
|
FStringList text_split{};
|
||||||
|
|
|
@ -118,7 +118,7 @@ typedef struct
|
||||||
|
|
||||||
union attribute
|
union attribute
|
||||||
{
|
{
|
||||||
struct
|
struct alignas(4)
|
||||||
{
|
{
|
||||||
// Attribute byte #0
|
// Attribute byte #0
|
||||||
uInt8 bold : 1; // bold
|
uInt8 bold : 1; // bold
|
||||||
|
@ -144,7 +144,7 @@ typedef struct
|
||||||
uInt8 : 6; // padding bits
|
uInt8 : 6; // padding bits
|
||||||
} bit;
|
} bit;
|
||||||
|
|
||||||
uInt8 byte[3];
|
alignas(4) uInt8 byte[3];
|
||||||
} attr;
|
} attr;
|
||||||
} charData;
|
} charData;
|
||||||
#pragma pack(pop)
|
#pragma pack(pop)
|
||||||
|
|
|
@ -414,13 +414,6 @@ class FVTerm
|
||||||
__attribute__((noreturn))
|
__attribute__((noreturn))
|
||||||
#endif
|
#endif
|
||||||
;
|
;
|
||||||
|
|
||||||
// Data Members
|
|
||||||
private:
|
|
||||||
term_area* print_area{nullptr}; // print area for this object
|
|
||||||
term_area* child_print_area{nullptr}; // print area for children
|
|
||||||
term_area* vwin{nullptr}; // virtual window
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Enumeration
|
// Enumeration
|
||||||
enum exit_state
|
enum exit_state
|
||||||
|
@ -472,7 +465,10 @@ class FVTerm
|
||||||
static void appendOutputBuffer (const char[]);
|
static void appendOutputBuffer (const char[]);
|
||||||
static int appendOutputBuffer (int);
|
static int appendOutputBuffer (int);
|
||||||
|
|
||||||
// Data Members
|
// Data members
|
||||||
|
term_area* print_area{nullptr}; // print area for this object
|
||||||
|
term_area* child_print_area{nullptr}; // print area for children
|
||||||
|
term_area* vwin{nullptr}; // virtual window
|
||||||
static FSystem* fsystem;
|
static FSystem* fsystem;
|
||||||
static FTerm* fterm;
|
static FTerm* fterm;
|
||||||
static term_area* vterm; // virtual terminal
|
static term_area* vterm; // virtual terminal
|
||||||
|
@ -495,6 +491,7 @@ class FVTerm
|
||||||
static uInt clr_bol_length;
|
static uInt clr_bol_length;
|
||||||
static uInt clr_eol_length;
|
static uInt clr_eol_length;
|
||||||
static uInt cursor_address_length;
|
static uInt cursor_address_length;
|
||||||
|
|
||||||
};
|
};
|
||||||
#pragma pack(pop)
|
#pragma pack(pop)
|
||||||
|
|
||||||
|
|
|
@ -429,7 +429,7 @@ class FWidget : public FVTerm, public FObject
|
||||||
void drawBlockShadow (int, int, int, int);
|
void drawBlockShadow (int, int, int, int);
|
||||||
static void setColorTheme();
|
static void setColorTheme();
|
||||||
|
|
||||||
// Data Members
|
// Data members
|
||||||
FPoint widget_cursor_position{-1, -1};
|
FPoint widget_cursor_position{-1, -1};
|
||||||
|
|
||||||
struct widget_size_hints
|
struct widget_size_hints
|
||||||
|
|
|
@ -54,7 +54,7 @@ class FWidgetColors final
|
||||||
void set8ColorTheme();
|
void set8ColorTheme();
|
||||||
void set16ColorTheme();
|
void set16ColorTheme();
|
||||||
|
|
||||||
// Data Members
|
// Data members
|
||||||
FColor term_fg{fc::Default};
|
FColor term_fg{fc::Default};
|
||||||
FColor term_bg{fc::Default};
|
FColor term_bg{fc::Default};
|
||||||
FColor list_fg{fc::Default};
|
FColor list_fg{fc::Default};
|
||||||
|
|
|
@ -174,7 +174,7 @@ class FWindow : public FWidget
|
||||||
static void deleteFromAlwaysOnTopList (FWidget*);
|
static void deleteFromAlwaysOnTopList (FWidget*);
|
||||||
static void processAlwaysOnTop();
|
static void processAlwaysOnTop();
|
||||||
|
|
||||||
// Data Members
|
// Data members
|
||||||
bool window_active{false};
|
bool window_active{false};
|
||||||
bool zoomed{false};
|
bool zoomed{false};
|
||||||
FWidget* win_focus_widget{nullptr};
|
FWidget* win_focus_widget{nullptr};
|
||||||
|
|
|
@ -131,7 +131,7 @@ class ConEmu
|
||||||
void closeSlavePTY();
|
void closeSlavePTY();
|
||||||
void parseTerminalBuffer (std::size_t, console);
|
void parseTerminalBuffer (std::size_t, console);
|
||||||
|
|
||||||
// Data Members
|
// Data members
|
||||||
int fd_stdin{fileno(stdin)};
|
int fd_stdin{fileno(stdin)};
|
||||||
int fd_stdout{fileno(stdout)};
|
int fd_stdout{fileno(stdout)};
|
||||||
int fd_stderr{fileno(stderr)};
|
int fd_stderr{fileno(stderr)};
|
||||||
|
@ -148,7 +148,7 @@ class ConEmu
|
||||||
bool* ConEmu::shared_state = nullptr;
|
bool* ConEmu::shared_state = nullptr;
|
||||||
|
|
||||||
|
|
||||||
// private Data Member of ConEmu
|
// private data member of ConEmu
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
char* ConEmu::colorname[] =
|
char* ConEmu::colorname[] =
|
||||||
{
|
{
|
||||||
|
|
|
@ -50,6 +50,7 @@ class FColorPairTest : public CPPUNIT_NS::TestFixture
|
||||||
void noArgumentTest();
|
void noArgumentTest();
|
||||||
void copyConstructorTest();
|
void copyConstructorTest();
|
||||||
void assignmentTest();
|
void assignmentTest();
|
||||||
|
void setColorTest();
|
||||||
void swapTest();
|
void swapTest();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -61,6 +62,7 @@ class FColorPairTest : public CPPUNIT_NS::TestFixture
|
||||||
CPPUNIT_TEST (noArgumentTest);
|
CPPUNIT_TEST (noArgumentTest);
|
||||||
CPPUNIT_TEST (copyConstructorTest);
|
CPPUNIT_TEST (copyConstructorTest);
|
||||||
CPPUNIT_TEST (assignmentTest);
|
CPPUNIT_TEST (assignmentTest);
|
||||||
|
CPPUNIT_TEST (setColorTest);
|
||||||
CPPUNIT_TEST (swapTest);
|
CPPUNIT_TEST (swapTest);
|
||||||
|
|
||||||
// End of test suite definition
|
// End of test suite definition
|
||||||
|
@ -80,8 +82,8 @@ void FColorPairTest::classNameTest()
|
||||||
void FColorPairTest::noArgumentTest()
|
void FColorPairTest::noArgumentTest()
|
||||||
{
|
{
|
||||||
const finalcut::FColorPair pair{};
|
const finalcut::FColorPair pair{};
|
||||||
CPPUNIT_ASSERT ( pair.fg_color == finalcut::fc::Default );
|
CPPUNIT_ASSERT ( pair.getForegroundColor() == finalcut::fc::Default );
|
||||||
CPPUNIT_ASSERT ( pair.bg_color == finalcut::fc::Default );
|
CPPUNIT_ASSERT ( pair.getBackgroundColor() == finalcut::fc::Default );
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
|
@ -89,18 +91,18 @@ void FColorPairTest::copyConstructorTest()
|
||||||
{
|
{
|
||||||
const finalcut::FColorPair p1a;
|
const finalcut::FColorPair p1a;
|
||||||
finalcut::FColorPair p1b (p1a);
|
finalcut::FColorPair p1b (p1a);
|
||||||
CPPUNIT_ASSERT ( p1b.fg_color == finalcut::fc::Default );
|
CPPUNIT_ASSERT ( p1b.getForegroundColor() == finalcut::fc::Default );
|
||||||
CPPUNIT_ASSERT ( p1b.bg_color == finalcut::fc::Default );
|
CPPUNIT_ASSERT ( p1b.getBackgroundColor() == finalcut::fc::Default );
|
||||||
|
|
||||||
const finalcut::FColorPair p2a (finalcut::fc::Yellow );
|
const finalcut::FColorPair p2a (finalcut::fc::Yellow );
|
||||||
const finalcut::FColorPair p2b (p2a);
|
const finalcut::FColorPair p2b (p2a);
|
||||||
CPPUNIT_ASSERT ( p2b.fg_color == finalcut::fc::Yellow );
|
CPPUNIT_ASSERT ( p2b.getForegroundColor() == finalcut::fc::Yellow );
|
||||||
CPPUNIT_ASSERT ( p2b.bg_color == finalcut::fc::Default );
|
CPPUNIT_ASSERT ( p2b.getBackgroundColor() == finalcut::fc::Default );
|
||||||
|
|
||||||
const finalcut::FColorPair p3a (finalcut::fc::Red, finalcut::fc::Black);
|
const finalcut::FColorPair p3a (finalcut::fc::Red, finalcut::fc::Black);
|
||||||
const finalcut::FColorPair p3b (p3a);
|
const finalcut::FColorPair p3b (p3a);
|
||||||
CPPUNIT_ASSERT ( p3b.fg_color == finalcut::fc::Red );
|
CPPUNIT_ASSERT ( p3b.getForegroundColor() == finalcut::fc::Red );
|
||||||
CPPUNIT_ASSERT ( p3b.bg_color == finalcut::fc::Black );
|
CPPUNIT_ASSERT ( p3b.getBackgroundColor() == finalcut::fc::Black );
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
|
@ -108,18 +110,41 @@ void FColorPairTest::assignmentTest()
|
||||||
{
|
{
|
||||||
const finalcut::FColorPair p1a;
|
const finalcut::FColorPair p1a;
|
||||||
const finalcut::FColorPair p1b = p1a;
|
const finalcut::FColorPair p1b = p1a;
|
||||||
CPPUNIT_ASSERT ( p1b.fg_color == finalcut::fc::Default );
|
CPPUNIT_ASSERT ( p1b.getForegroundColor() == finalcut::fc::Default );
|
||||||
CPPUNIT_ASSERT ( p1b.bg_color == finalcut::fc::Default );
|
CPPUNIT_ASSERT ( p1b.getBackgroundColor() == finalcut::fc::Default );
|
||||||
|
|
||||||
const finalcut::FColorPair p2a (finalcut::fc::Yellow );
|
const finalcut::FColorPair p2a (finalcut::fc::Yellow );
|
||||||
const finalcut::FColorPair p2b = p2a;
|
const finalcut::FColorPair p2b = p2a;
|
||||||
CPPUNIT_ASSERT ( p2b.fg_color == finalcut::fc::Yellow );
|
CPPUNIT_ASSERT ( p2b.getForegroundColor() == finalcut::fc::Yellow );
|
||||||
CPPUNIT_ASSERT ( p2b.bg_color == finalcut::fc::Default );
|
CPPUNIT_ASSERT ( p2b.getBackgroundColor() == finalcut::fc::Default );
|
||||||
|
|
||||||
const finalcut::FColorPair p3a (finalcut::fc::Red, finalcut::fc::Black);
|
const finalcut::FColorPair p3a (finalcut::fc::Red, finalcut::fc::Black);
|
||||||
const finalcut::FColorPair p3b = p3a;
|
const finalcut::FColorPair p3b = p3a;
|
||||||
CPPUNIT_ASSERT ( p3b.fg_color == finalcut::fc::Red );
|
CPPUNIT_ASSERT ( p3b.getForegroundColor() == finalcut::fc::Red );
|
||||||
CPPUNIT_ASSERT ( p3b.bg_color == finalcut::fc::Black );
|
CPPUNIT_ASSERT ( p3b.getBackgroundColor() == finalcut::fc::Black );
|
||||||
|
}
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------
|
||||||
|
void FColorPairTest::setColorTest()
|
||||||
|
{
|
||||||
|
finalcut::FColorPair p1;
|
||||||
|
p1.setForegroundColor (finalcut::fc::DarkGreen);
|
||||||
|
CPPUNIT_ASSERT ( p1.getForegroundColor() == finalcut::fc::DarkGreen );
|
||||||
|
CPPUNIT_ASSERT ( p1.getBackgroundColor() == finalcut::fc::Default );
|
||||||
|
|
||||||
|
finalcut::FColorPair p2 (finalcut::fc::Yellow);
|
||||||
|
p2.setBackgroundColor (finalcut::fc::DeepSkyBlue1);
|
||||||
|
CPPUNIT_ASSERT ( p2.getForegroundColor() == finalcut::fc::Yellow );
|
||||||
|
CPPUNIT_ASSERT ( p2.getBackgroundColor() == finalcut::fc::DeepSkyBlue1 );
|
||||||
|
|
||||||
|
finalcut::FColorPair p3 (finalcut::fc::Red, finalcut::fc::Black);
|
||||||
|
p3.setColorPair (finalcut::fc::NavyBlue, finalcut::fc::SandyBrown);
|
||||||
|
CPPUNIT_ASSERT ( p3.getForegroundColor() == finalcut::fc::NavyBlue );
|
||||||
|
CPPUNIT_ASSERT ( p3.getBackgroundColor() == finalcut::fc::SandyBrown );
|
||||||
|
finalcut::FColorPair p4 (finalcut::fc::DarkBlue, finalcut::fc::Grey66);
|
||||||
|
p3.setColorPair (p4);
|
||||||
|
CPPUNIT_ASSERT ( p3.getForegroundColor() == finalcut::fc::DarkBlue );
|
||||||
|
CPPUNIT_ASSERT ( p3.getBackgroundColor() == finalcut::fc::Grey66 );
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
|
@ -127,18 +152,18 @@ void FColorPairTest::swapTest()
|
||||||
{
|
{
|
||||||
finalcut::FColorPair p1;
|
finalcut::FColorPair p1;
|
||||||
p1.swap();
|
p1.swap();
|
||||||
CPPUNIT_ASSERT ( p1.fg_color == finalcut::fc::Default );
|
CPPUNIT_ASSERT ( p1.getForegroundColor() == finalcut::fc::Default );
|
||||||
CPPUNIT_ASSERT ( p1.bg_color == finalcut::fc::Default );
|
CPPUNIT_ASSERT ( p1.getBackgroundColor() == finalcut::fc::Default );
|
||||||
|
|
||||||
finalcut::FColorPair p2 (finalcut::fc::LightBlue );
|
finalcut::FColorPair p2 (finalcut::fc::LightBlue );
|
||||||
p2.swap();
|
p2.swap();
|
||||||
CPPUNIT_ASSERT ( p2.fg_color == finalcut::fc::Default );
|
CPPUNIT_ASSERT ( p2.getForegroundColor() == finalcut::fc::Default );
|
||||||
CPPUNIT_ASSERT ( p2.bg_color == finalcut::fc::LightBlue );
|
CPPUNIT_ASSERT ( p2.getBackgroundColor() == finalcut::fc::LightBlue );
|
||||||
|
|
||||||
finalcut::FColorPair p3 (finalcut::fc::Cyan, finalcut::fc::White);
|
finalcut::FColorPair p3 (finalcut::fc::Cyan, finalcut::fc::White);
|
||||||
p3.swap();
|
p3.swap();
|
||||||
CPPUNIT_ASSERT ( p3.fg_color == finalcut::fc::White );
|
CPPUNIT_ASSERT ( p3.getForegroundColor() == finalcut::fc::White );
|
||||||
CPPUNIT_ASSERT ( p3.bg_color == finalcut::fc::Cyan );
|
CPPUNIT_ASSERT ( p3.getBackgroundColor() == finalcut::fc::Cyan );
|
||||||
}
|
}
|
||||||
|
|
||||||
// Put the test suite in the registry
|
// Put the test suite in the registry
|
||||||
|
|
|
@ -276,7 +276,7 @@ class FKeyboardTest : public CPPUNIT_NS::TestFixture
|
||||||
void keyReleased();
|
void keyReleased();
|
||||||
void escapeKeyPressed();
|
void escapeKeyPressed();
|
||||||
|
|
||||||
// Data Members
|
// Data members
|
||||||
FKey key_pressed{0};
|
FKey key_pressed{0};
|
||||||
FKey key_released{0};
|
FKey key_released{0};
|
||||||
int number_of_keys{0};
|
int number_of_keys{0};
|
||||||
|
|
|
@ -79,7 +79,7 @@ class FObject_protected : public finalcut::FObject
|
||||||
count++;
|
count++;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Data Member
|
// Data member
|
||||||
uInt count;
|
uInt count;
|
||||||
};
|
};
|
||||||
#pragma pack(pop)
|
#pragma pack(pop)
|
||||||
|
@ -107,7 +107,7 @@ class FObject_timer : public finalcut::FObject
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Data Member
|
// Data member
|
||||||
int value{0};
|
int value{0};
|
||||||
};
|
};
|
||||||
#pragma pack(pop)
|
#pragma pack(pop)
|
||||||
|
@ -135,7 +135,7 @@ class FObject_userEvent : public finalcut::FObject
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Data Member
|
// Data member
|
||||||
int value{0};
|
int value{0};
|
||||||
};
|
};
|
||||||
#pragma pack(pop)
|
#pragma pack(pop)
|
||||||
|
|
|
@ -75,7 +75,7 @@ class FSystemTest : public finalcut::FSystem
|
||||||
struct keymap_t& getTerminalKeymap();
|
struct keymap_t& getTerminalKeymap();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Data Members
|
// Data members
|
||||||
std::string characters;
|
std::string characters;
|
||||||
int cursor_type = 0;
|
int cursor_type = 0;
|
||||||
static keymap_t keymap;
|
static keymap_t keymap;
|
||||||
|
@ -83,7 +83,7 @@ class FSystemTest : public finalcut::FSystem
|
||||||
};
|
};
|
||||||
#pragma pack(pop)
|
#pragma pack(pop)
|
||||||
|
|
||||||
// private Data Member of FSystemTest
|
// private data member of FSystemTest
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
keymap_t FSystemTest::keymap =
|
keymap_t FSystemTest::keymap =
|
||||||
{
|
{
|
||||||
|
|
|
@ -130,7 +130,7 @@ class FSystemTest : public finalcut::FSystem
|
||||||
static void initVScreenInfo();
|
static void initVScreenInfo();
|
||||||
static void initFScreenInfo();
|
static void initFScreenInfo();
|
||||||
|
|
||||||
// Data Members
|
// Data members
|
||||||
std::string characters;
|
std::string characters;
|
||||||
static shiftstate shift_state;
|
static shiftstate shift_state;
|
||||||
static rgb terminal_color[16];
|
static rgb terminal_color[16];
|
||||||
|
@ -158,7 +158,7 @@ class FSystemTest : public finalcut::FSystem
|
||||||
#pragma pack(pop)
|
#pragma pack(pop)
|
||||||
|
|
||||||
|
|
||||||
// private Data Member of FSystemTest
|
// private data member of FSystemTest
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
uChar FSystemTest::vga8x16[] =
|
uChar FSystemTest::vga8x16[] =
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue