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