Remove #pragma pack() directive lines

This commit is contained in:
Markus Gans 2019-09-08 02:04:24 +02:00
parent 81e00a22d3
commit bc3afa6235
114 changed files with 283 additions and 796 deletions

View File

@ -1,3 +1,7 @@
2019-09-08 Markus Gans <guru.mail@muenster.de>
* Remove the lines of the #pragma pack() directive from the code
because they caused a misaligned address
2019-09-06 Markus Gans <guru.mail@muenster.de> 2019-09-06 Markus Gans <guru.mail@muenster.de>
* Outsourcing the initialization data to a separate struct * Outsourcing the initialization data to a separate struct

View File

@ -44,9 +44,6 @@ namespace finalcut
// class FClassName // class FClassName
//---------------------------------------------------------------------- //----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class FClassName class FClassName
{ {
public: public:
@ -121,7 +118,7 @@ class FClassName
// Friend class // Friend class
}; };
#pragma pack(pop)
// FClassName inline functions // FClassName inline functions
//---------------------------------------------------------------------- //----------------------------------------------------------------------

View File

@ -36,9 +36,6 @@ using finalcut::FSize;
// class TextWindow // class TextWindow
//---------------------------------------------------------------------- //----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class SegmentView : public finalcut::FDialog class SegmentView : public finalcut::FDialog
{ {
public: public:
@ -69,7 +66,6 @@ class SegmentView : public finalcut::FDialog
finalcut::FLineEdit Input{"0123", this}; finalcut::FLineEdit Input{"0123", this};
finalcut::FButton Exit{"E&xit", this}; finalcut::FButton Exit{"E&xit", this};
}; };
#pragma pack(pop)
//---------------------------------------------------------------------- //----------------------------------------------------------------------
SegmentView::SegmentView (finalcut::FWidget* parent) SegmentView::SegmentView (finalcut::FWidget* parent)

View File

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

View File

@ -42,9 +42,6 @@ constexpr lDouble PI{3.141592653589793238L};
// class Button // class Button
//---------------------------------------------------------------------- //----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class Button : public finalcut::FButton class Button : public finalcut::FButton
{ {
public: public:
@ -61,7 +58,6 @@ class Button : public finalcut::FButton
// Data member // Data member
bool checked{false}; bool checked{false};
}; };
#pragma pack(pop)
//---------------------------------------------------------------------- //----------------------------------------------------------------------
Button::Button (finalcut::FWidget* parent) Button::Button (finalcut::FWidget* parent)
@ -110,9 +106,6 @@ void Button::onKeyPress (finalcut::FKeyEvent* ev)
// class Calc // class Calc
//---------------------------------------------------------------------- //----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class Calc : public finalcut::FDialog class Calc : public finalcut::FDialog
{ {
public: public:
@ -244,7 +237,6 @@ class Calc : public finalcut::FDialog
std::map<Calc::button, std::shared_ptr<Button> > calculator_buttons{}; std::map<Calc::button, std::shared_ptr<Button> > calculator_buttons{};
std::map<Calc::button, keyFunction> key_map{}; std::map<Calc::button, keyFunction> key_map{};
}; };
#pragma pack(pop)
//---------------------------------------------------------------------- //----------------------------------------------------------------------
Calc::Calc (FWidget* parent) Calc::Calc (FWidget* parent)

View File

@ -36,9 +36,6 @@ using finalcut::FSize;
// class CheckList // class CheckList
//---------------------------------------------------------------------- //----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class CheckList : public finalcut::FDialog class CheckList : public finalcut::FDialog
{ {
public: public:
@ -69,7 +66,6 @@ class CheckList : public finalcut::FDialog
finalcut::FListView listView{this}; finalcut::FListView listView{this};
finalcut::FStatusBar status_bar{this}; finalcut::FStatusBar status_bar{this};
}; };
#pragma pack(pop)
//---------------------------------------------------------------------- //----------------------------------------------------------------------
CheckList::CheckList (finalcut::FWidget* parent) CheckList::CheckList (finalcut::FWidget* parent)

View File

@ -76,9 +76,6 @@ FString& mapToString ( std::map<FString
// class Listbox // class Listbox
//---------------------------------------------------------------------- //----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class Listbox : public FDialog class Listbox : public FDialog
{ {
public: public:
@ -105,7 +102,6 @@ class Listbox : public FDialog
FListBox list3{this}; FListBox list3{this};
FButton Quit{this}; FButton Quit{this};
}; };
#pragma pack(pop)
//---------------------------------------------------------------------- //----------------------------------------------------------------------
Listbox::Listbox (FWidget* parent) Listbox::Listbox (FWidget* parent)

View File

@ -36,9 +36,6 @@ using finalcut::FSize;
// class Listview // class Listview
//---------------------------------------------------------------------- //----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class Listview : public finalcut::FDialog class Listview : public finalcut::FDialog
{ {
public: public:
@ -68,7 +65,6 @@ class Listview : public finalcut::FDialog
finalcut::FListView listView{this}; finalcut::FListView listView{this};
finalcut::FButton Quit{this}; finalcut::FButton Quit{this};
}; };
#pragma pack(pop)
//---------------------------------------------------------------------- //----------------------------------------------------------------------
Listview::Listview (finalcut::FWidget* parent) Listview::Listview (finalcut::FWidget* parent)

View File

@ -31,9 +31,6 @@ using finalcut::FSize;
// class Mandelbrot // class Mandelbrot
//---------------------------------------------------------------------- //----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class Mandelbrot : public finalcut::FDialog class Mandelbrot : public finalcut::FDialog
{ {
public: public:
@ -52,7 +49,7 @@ class Mandelbrot : public finalcut::FDialog
void draw() override; void draw() override;
void adjustSize() override; void adjustSize() override;
}; };
#pragma pack(pop)
//---------------------------------------------------------------------- //----------------------------------------------------------------------
Mandelbrot::Mandelbrot (finalcut::FWidget* parent) Mandelbrot::Mandelbrot (finalcut::FWidget* parent)

View File

@ -31,9 +31,6 @@ using finalcut::FSize;
// class Menu // class Menu
//---------------------------------------------------------------------- //----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class Menu : public finalcut::FDialog class Menu : public finalcut::FDialog
{ {
public: public:
@ -117,7 +114,6 @@ class Menu : public finalcut::FDialog
finalcut::FLabel Headline2{this}; finalcut::FLabel Headline2{this};
finalcut::FLabel Info{this}; finalcut::FLabel Info{this};
}; };
#pragma pack(pop)
//---------------------------------------------------------------------- //----------------------------------------------------------------------
Menu::Menu (finalcut::FWidget* parent) Menu::Menu (finalcut::FWidget* parent)

View File

@ -33,9 +33,6 @@ using finalcut::FSize;
// class ColorChooser // class ColorChooser
//---------------------------------------------------------------------- //----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class ColorChooser : public finalcut::FWidget class ColorChooser : public finalcut::FWidget
{ {
public: public:
@ -68,7 +65,6 @@ class ColorChooser : public finalcut::FWidget
FColor bg_color{fc::Black}; FColor bg_color{fc::Black};
finalcut::FLabel headline{this}; finalcut::FLabel headline{this};
}; };
#pragma pack(pop)
//---------------------------------------------------------------------- //----------------------------------------------------------------------
ColorChooser::ColorChooser (finalcut::FWidget* parent) ColorChooser::ColorChooser (finalcut::FWidget* parent)
@ -176,9 +172,6 @@ inline FColor ColorChooser::getBackground()
// class Brushes // class Brushes
//---------------------------------------------------------------------- //----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class Brushes : public finalcut::FWidget class Brushes : public finalcut::FWidget
{ {
public: public:
@ -215,7 +208,6 @@ class Brushes : public finalcut::FWidget
FColor bg_color{fc::Black}; FColor bg_color{fc::Black};
finalcut::FLabel headline{this}; finalcut::FLabel headline{this};
}; };
#pragma pack(pop)
//---------------------------------------------------------------------- //----------------------------------------------------------------------
Brushes::Brushes (finalcut::FWidget* parent) Brushes::Brushes (finalcut::FWidget* parent)
@ -318,9 +310,6 @@ inline void Brushes::setBackground (FColor color)
// class MouseDraw // class MouseDraw
//---------------------------------------------------------------------- //----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class MouseDraw : public finalcut::FDialog class MouseDraw : public finalcut::FDialog
{ {
public: public:
@ -365,7 +354,7 @@ class MouseDraw : public finalcut::FDialog
ColorChooser c_chooser{this}; ColorChooser c_chooser{this};
Brushes brush{this}; Brushes brush{this};
}; };
#pragma pack(pop)
//---------------------------------------------------------------------- //----------------------------------------------------------------------
MouseDraw::MouseDraw (finalcut::FWidget* parent) MouseDraw::MouseDraw (finalcut::FWidget* parent)

View File

@ -31,9 +31,6 @@ using finalcut::FSize;
// class Scrollview // class Scrollview
//---------------------------------------------------------------------- //----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class Scrollview : public finalcut::FScrollView class Scrollview : public finalcut::FScrollView
{ {
public: public:
@ -72,7 +69,6 @@ class Scrollview : public finalcut::FScrollView
finalcut::FButton go_west{pointer_left, this}; finalcut::FButton go_west{pointer_left, this};
finalcut::FButton go_north{pointer_up, this}; finalcut::FButton go_north{pointer_up, this};
}; };
#pragma pack(pop)
//---------------------------------------------------------------------- //----------------------------------------------------------------------
Scrollview::Scrollview (finalcut::FWidget* parent) Scrollview::Scrollview (finalcut::FWidget* parent)
@ -194,9 +190,6 @@ void Scrollview::cb_go_north (finalcut::FWidget*, FDataPtr)
// class Scrollviewdemo // class Scrollviewdemo
//---------------------------------------------------------------------- //----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class Scrollviewdemo : public finalcut::FDialog class Scrollviewdemo : public finalcut::FDialog
{ {
public: public:
@ -217,7 +210,6 @@ class Scrollviewdemo : public finalcut::FDialog
finalcut::FButton quit_btn{"&Quit", this}; finalcut::FButton quit_btn{"&Quit", this};
finalcut::FLabel label{this}; finalcut::FLabel label{this};
}; };
#pragma pack(pop)
//---------------------------------------------------------------------- //----------------------------------------------------------------------

View File

@ -34,9 +34,6 @@ using finalcut::FColorPair;
// class AttribDlg // class AttribDlg
//---------------------------------------------------------------------- //----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class AttribDlg : public finalcut::FDialog class AttribDlg : public finalcut::FDialog
{ {
public: public:
@ -72,7 +69,6 @@ class AttribDlg : public finalcut::FDialog
finalcut::FButton next_button{"&Next >", this}; finalcut::FButton next_button{"&Next >", this};
finalcut::FButton back_button{"< &Back", this}; finalcut::FButton back_button{"< &Back", this};
}; };
#pragma pack(pop)
//---------------------------------------------------------------------- //----------------------------------------------------------------------
AttribDlg::AttribDlg (finalcut::FWidget* parent) AttribDlg::AttribDlg (finalcut::FWidget* parent)
@ -197,9 +193,6 @@ void AttribDlg::adjustSize()
// class AttribDemo // class AttribDemo
//---------------------------------------------------------------------- //----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class AttribDemo : public finalcut::FWidget class AttribDemo : public finalcut::FWidget
{ {
public: public:
@ -241,7 +234,6 @@ class AttribDemo : public finalcut::FWidget
// Data member // Data member
int colors; int colors;
}; };
#pragma pack(pop)
//---------------------------------------------------------------------- //----------------------------------------------------------------------
AttribDemo::AttribDemo (finalcut::FWidget* parent) AttribDemo::AttribDemo (finalcut::FWidget* parent)

View File

@ -45,9 +45,6 @@ void string();
// struct data // struct data
//---------------------------------------------------------------------- //----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
struct data struct data
{ {
static int getNumberOfItems(); static int getNumberOfItems();
@ -60,7 +57,6 @@ struct data
static termcap_string strings[]; static termcap_string strings[];
}; };
#pragma pack(pop)
//---------------------------------------------------------------------- //----------------------------------------------------------------------
// struct data - string data array // struct data - string data array

View File

@ -31,9 +31,6 @@ using finalcut::FSize;
// class Transparent // class Transparent
//---------------------------------------------------------------------- //----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class Transparent : public finalcut::FDialog class Transparent : public finalcut::FDialog
{ {
public: public:
@ -68,7 +65,6 @@ class Transparent : public finalcut::FDialog
// Data members // Data members
trans_type type; trans_type type;
}; };
#pragma pack(pop)
//---------------------------------------------------------------------- //----------------------------------------------------------------------
Transparent::Transparent ( finalcut::FWidget* parent Transparent::Transparent ( finalcut::FWidget* parent
@ -147,9 +143,6 @@ void Transparent::onKeyPress (finalcut::FKeyEvent* ev)
// class MainWindow // class MainWindow
//---------------------------------------------------------------------- //----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class MainWindow : public finalcut::FDialog class MainWindow : public finalcut::FDialog
{ {
public: public:
@ -195,7 +188,7 @@ class MainWindow : public finalcut::FDialog
Transparent* ibg{nullptr}; Transparent* ibg{nullptr};
finalcut::FStatusBar status_bar{this}; finalcut::FStatusBar status_bar{this};
}; };
#pragma pack(pop)
//---------------------------------------------------------------------- //----------------------------------------------------------------------
MainWindow::MainWindow (finalcut::FWidget* parent) MainWindow::MainWindow (finalcut::FWidget* parent)

View File

@ -112,9 +112,6 @@ bool sortDescending ( const finalcut::FObject* lhs
// class Treeview // class Treeview
//---------------------------------------------------------------------- //----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class Treeview : public finalcut::FDialog class Treeview : public finalcut::FDialog
{ {
public: public:
@ -151,15 +148,12 @@ class Treeview : public finalcut::FDialog
static TreeItem south_america[]; static TreeItem south_america[];
static TreeItem oceania[]; static TreeItem oceania[];
}; };
#pragma pack(pop)
//---------------------------------------------------------------------- //----------------------------------------------------------------------
// struct Treeview::TreeItem // struct Treeview::TreeItem
//---------------------------------------------------------------------- //----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
struct Treeview::TreeItem struct Treeview::TreeItem
{ {
const char* const* begin() const const char* const* begin() const
@ -174,7 +168,6 @@ struct Treeview::TreeItem
const char* density; const char* density;
TreeItem* child_element; TreeItem* child_element;
}; };
#pragma pack(pop)
//---------------------------------------------------------------------- //----------------------------------------------------------------------
// class Treeview - array data // class Treeview - array data

View File

@ -37,9 +37,6 @@ using finalcut::FSize;
// class ProgressDialog // class ProgressDialog
//---------------------------------------------------------------------- //----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class ProgressDialog : public finalcut::FDialog class ProgressDialog : public finalcut::FDialog
{ {
public: public:
@ -71,7 +68,6 @@ class ProgressDialog : public finalcut::FDialog
finalcut::FButton more{this}; finalcut::FButton more{this};
finalcut::FButton quit{this}; finalcut::FButton quit{this};
}; };
#pragma pack(pop)
//---------------------------------------------------------------------- //----------------------------------------------------------------------
ProgressDialog::ProgressDialog (finalcut::FWidget* parent) ProgressDialog::ProgressDialog (finalcut::FWidget* parent)
@ -183,9 +179,6 @@ void ProgressDialog::cb_exit_bar (finalcut::FWidget*, FDataPtr)
// class TextWindow // class TextWindow
//---------------------------------------------------------------------- //----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class TextWindow : public finalcut::FDialog class TextWindow : public finalcut::FDialog
{ {
public: public:
@ -211,7 +204,6 @@ class TextWindow : public finalcut::FDialog
// Data members // Data members
finalcut::FTextView scrollText{this}; finalcut::FTextView scrollText{this};
}; };
#pragma pack(pop)
//---------------------------------------------------------------------- //----------------------------------------------------------------------
TextWindow::TextWindow (finalcut::FWidget* parent) TextWindow::TextWindow (finalcut::FWidget* parent)
@ -253,9 +245,6 @@ void TextWindow::adjustSize()
// class MyDialog // class MyDialog
//---------------------------------------------------------------------- //----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class MyDialog : public finalcut::FDialog class MyDialog : public finalcut::FDialog
{ {
public: public:
@ -365,7 +354,6 @@ class MyDialog : public finalcut::FDialog
finalcut::FLabel sum_count{this}; finalcut::FLabel sum_count{this};
finalcut::FString clipboard{}; finalcut::FString clipboard{};
}; };
#pragma pack(pop)
//---------------------------------------------------------------------- //----------------------------------------------------------------------
MyDialog::MyDialog (finalcut::FWidget* parent) MyDialog::MyDialog (finalcut::FWidget* parent)

View File

@ -31,9 +31,6 @@ using finalcut::FSize;
// class Watch // class Watch
//---------------------------------------------------------------------- //----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class Watch : public finalcut::FDialog class Watch : public finalcut::FDialog
{ {
public: public:
@ -73,7 +70,6 @@ class Watch : public finalcut::FDialog
finalcut::FSwitch seconds_sw{L"Seconds", this}; finalcut::FSwitch seconds_sw{L"Seconds", this};
finalcut::FButton quit_btn{L"&Quit", this}; finalcut::FButton quit_btn{L"&Quit", this};
}; };
#pragma pack(pop)
//---------------------------------------------------------------------- //----------------------------------------------------------------------
Watch::Watch (FWidget* parent) Watch::Watch (FWidget* parent)

View File

@ -32,9 +32,6 @@ using finalcut::FSize;
// class SmallWindow // class SmallWindow
//---------------------------------------------------------------------- //----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class SmallWindow : public finalcut::FDialog class SmallWindow : public finalcut::FDialog
{ {
public: public:
@ -65,7 +62,7 @@ class SmallWindow : public finalcut::FDialog
finalcut::FLabel top_right_label{this}; finalcut::FLabel top_right_label{this};
finalcut::FLabel bottom_label{this}; finalcut::FLabel bottom_label{this};
}; };
#pragma pack(pop)
//---------------------------------------------------------------------- //----------------------------------------------------------------------
SmallWindow::SmallWindow (finalcut::FWidget* parent) SmallWindow::SmallWindow (finalcut::FWidget* parent)
@ -167,9 +164,6 @@ void SmallWindow::onTimer (finalcut::FTimerEvent*)
// class Window // class Window
//---------------------------------------------------------------------- //----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class Window : public finalcut::FDialog class Window : public finalcut::FDialog
{ {
public: public:
@ -242,7 +236,7 @@ class Window : public finalcut::FDialog
finalcut::FButton CloseButton{this}; finalcut::FButton CloseButton{this};
finalcut::FButton QuitButton{this}; finalcut::FButton QuitButton{this};
}; };
#pragma pack(pop)
//---------------------------------------------------------------------- //----------------------------------------------------------------------
Window::Window (finalcut::FWidget* parent) Window::Window (finalcut::FWidget* parent)

View File

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

View File

@ -691,7 +691,7 @@ bool FApplication::processDialogSwitchAccelerator()
if ( move_size ) if ( move_size )
{ {
auto w = move_size; auto w = move_size;
setMoveSizeWidget(0); setMoveSizeWidget(nullptr);
w->redraw(); w->redraw();
} }
@ -729,7 +729,7 @@ bool FApplication::processAccelerator (const FWidget*& widget)
if ( move_size ) if ( move_size )
{ {
auto w = move_size; auto w = move_size;
setMoveSizeWidget(0); setMoveSizeWidget(nullptr);
w->redraw(); w->redraw();
} }
@ -807,7 +807,7 @@ void FApplication::unsetMoveSizeMode()
if ( move_size ) if ( move_size )
{ {
auto w = move_size; auto w = move_size;
setMoveSizeWidget(0); setMoveSizeWidget(nullptr);
w->redraw(); w->redraw();
} }
} }
@ -1011,7 +1011,7 @@ void FApplication::sendMouseLeftClickEvent ( const FPoint& widgetMousePos
if ( ! mouse->isRightButtonPressed() if ( ! mouse->isRightButtonPressed()
&& ! mouse->isMiddleButtonPressed() ) && ! mouse->isMiddleButtonPressed() )
setClickedWidget(0); setClickedWidget(nullptr);
sendEvent (released_widget, &m_up_ev); sendEvent (released_widget, &m_up_ev);
} }
@ -1045,7 +1045,7 @@ void FApplication::sendMouseRightClickEvent ( const FPoint& widgetMousePos
if ( ! mouse->isLeftButtonPressed() if ( ! mouse->isLeftButtonPressed()
&& ! mouse->isMiddleButtonPressed() ) && ! mouse->isMiddleButtonPressed() )
setClickedWidget(0); setClickedWidget(nullptr);
sendEvent (released_widget, &m_up_ev); sendEvent (released_widget, &m_up_ev);
} }
@ -1071,7 +1071,7 @@ void FApplication::sendMouseMiddleClickEvent ( const FPoint& widgetMousePos
// gnome-terminal sends no released on middle click // gnome-terminal sends no released on middle click
if ( isGnomeTerminal() ) if ( isGnomeTerminal() )
setClickedWidget(0); setClickedWidget(nullptr);
} }
else if ( mouse->isMiddleButtonReleased() ) else if ( mouse->isMiddleButtonReleased() )
{ {
@ -1084,7 +1084,7 @@ void FApplication::sendMouseMiddleClickEvent ( const FPoint& widgetMousePos
if ( ! mouse->isLeftButtonPressed() if ( ! mouse->isLeftButtonPressed()
&& ! mouse->isRightButtonPressed() ) && ! mouse->isRightButtonPressed() )
{ {
setClickedWidget(0); setClickedWidget(nullptr);
} }
sendEvent (released_widget, &m_up_ev); sendEvent (released_widget, &m_up_ev);
@ -1107,7 +1107,7 @@ void FApplication::sendWheelEvent ( const FPoint& widgetMousePos
, mouse_position , mouse_position
, fc::WheelUp ); , fc::WheelUp );
auto scroll_over_widget = clicked; auto scroll_over_widget = clicked;
setClickedWidget(0); setClickedWidget(nullptr);
sendEvent(scroll_over_widget, &wheel_ev); sendEvent(scroll_over_widget, &wheel_ev);
} }
@ -1118,7 +1118,7 @@ void FApplication::sendWheelEvent ( const FPoint& widgetMousePos
, mouse_position , mouse_position
, fc::WheelDown ); , fc::WheelDown );
auto scroll_over_widget = clicked; auto scroll_over_widget = clicked;
setClickedWidget(0); setClickedWidget(nullptr);
sendEvent (scroll_over_widget, &wheel_ev); sendEvent (scroll_over_widget, &wheel_ev);
} }
} }

View File

@ -63,7 +63,7 @@ FButtonGroup::~FButtonGroup() // destructor
while ( iter != buttonlist.end() ) while ( iter != buttonlist.end() )
{ {
auto toggle_button = static_cast<FToggleButton*>(*iter); auto toggle_button = static_cast<FToggleButton*>(*iter);
toggle_button->setGroup(0); toggle_button->setGroup(nullptr);
iter = buttonlist.erase(iter); iter = buttonlist.erase(iter);
} }
} }
@ -272,7 +272,7 @@ void FButtonGroup::remove (FToggleButton* button)
if ( toggle_button == button ) if ( toggle_button == button )
{ {
iter = buttonlist.erase(iter); iter = buttonlist.erase(iter);
button->setGroup(0); button->setGroup(nullptr);
button->delCallback(this); button->delCallback(this);
break; break;
} }

View File

@ -606,7 +606,7 @@ void FDialog::onMouseDoubleClick (FMouseEvent* ev)
if ( window_focus_widget ) if ( window_focus_widget )
window_focus_widget->setFocus(); window_focus_widget->setFocus();
setClickedWidget(0); setClickedWidget(nullptr);
if ( isModal() ) if ( isModal() )
done (FDialog::Reject); done (FDialog::Reject);
@ -1566,7 +1566,7 @@ void FDialog::cancelMouseResize()
//---------------------------------------------------------------------- //----------------------------------------------------------------------
inline void FDialog::acceptMoveSize() inline void FDialog::acceptMoveSize()
{ {
setMoveSizeWidget(0); setMoveSizeWidget(nullptr);
if ( tooltip ) if ( tooltip )
delete tooltip; delete tooltip;
@ -1578,7 +1578,7 @@ inline void FDialog::acceptMoveSize()
//---------------------------------------------------------------------- //----------------------------------------------------------------------
inline void FDialog::cancelMoveSize() inline void FDialog::cancelMoveSize()
{ {
setMoveSizeWidget(0); setMoveSizeWidget(nullptr);
if ( tooltip ) if ( tooltip )
delete tooltip; delete tooltip;
@ -1677,7 +1677,7 @@ void FDialog::cb_zoom (FWidget*, FDataPtr)
{ {
dialog_menu->unselectItem(); dialog_menu->unselectItem();
dialog_menu->hide(); dialog_menu->hide();
setClickedWidget(0); setClickedWidget(nullptr);
drawTitleBar(); drawTitleBar();
zoomWindow(); zoomWindow();
setZoomItem(); setZoomItem();
@ -1688,7 +1688,7 @@ void FDialog::cb_close (FWidget*, FDataPtr)
{ {
dialog_menu->unselectItem(); dialog_menu->unselectItem();
dialog_menu->hide(); dialog_menu->hide();
setClickedWidget(0); setClickedWidget(nullptr);
drawTitleBar(); drawTitleBar();
close(); close();
} }

View File

@ -196,7 +196,7 @@ FListViewItem::FListViewItem (FObjectIterator parent_iter)
FListViewItem::FListViewItem ( const FStringList& cols FListViewItem::FListViewItem ( const FStringList& cols
, FDataPtr data , FDataPtr data
, FObjectIterator parent_iter ) , FObjectIterator parent_iter )
: FObject(0) : FObject(nullptr)
, column_list(cols) , column_list(cols)
, data_pointer(data) , data_pointer(data)
{ {

View File

@ -111,7 +111,7 @@ void FMenu::hide()
if ( openmenu && openmenu != this ) if ( openmenu && openmenu != this )
openmenu->hide(); openmenu->hide();
setOpenMenu(0); setOpenMenu(nullptr);
} }
mouse_down = false; mouse_down = false;
@ -882,7 +882,7 @@ void FMenu::mouseMoveDeselection (FMenuItem* m_item, mouseStates& ms)
m_item->unsetFocus(); m_item->unsetFocus();
if ( getSelectedItem() == m_item ) if ( getSelectedItem() == m_item )
setSelectedItem(0); setSelectedItem(nullptr);
ms.focus_changed = true; ms.focus_changed = true;
} }

View File

@ -49,7 +49,7 @@ FMenuBar::FMenuBar(FWidget* parent)
//---------------------------------------------------------------------- //----------------------------------------------------------------------
FMenuBar::~FMenuBar() // destructor FMenuBar::~FMenuBar() // destructor
{ {
setMenuBar(0); setMenuBar(nullptr);
} }
@ -456,7 +456,7 @@ bool FMenuBar::hotkeyMenu (FKeyEvent*& ev)
} }
else else
{ {
setSelectedItem(0); setSelectedItem(nullptr);
redraw(); redraw();
drop_down = false; drop_down = false;
(*iter)->processClicked(); (*iter)->processClicked();
@ -785,7 +785,7 @@ bool FMenuBar::clickItem (FMenuItem* item)
if ( getSelectedItem() == item ) if ( getSelectedItem() == item )
{ {
setSelectedItem(0); setSelectedItem(nullptr);
leaveMenuBar(); leaveMenuBar();
drop_down = false; drop_down = false;
item->processClicked(); item->processClicked();
@ -805,7 +805,7 @@ void FMenuBar::unselectMenuItem (FMenuItem* item)
drop_down = false; drop_down = false;
if ( getSelectedItem() == item ) if ( getSelectedItem() == item )
setSelectedItem(0); setSelectedItem(nullptr);
} }
//---------------------------------------------------------------------- //----------------------------------------------------------------------

View File

@ -46,7 +46,7 @@ FMenuList::~FMenuList() // destructor
while ( iter != item_list.end() ) while ( iter != item_list.end() )
{ {
(*iter)->setSuperMenu(0); (*iter)->setSuperMenu(nullptr);
iter = item_list.erase(iter); iter = item_list.erase(iter);
} }
} }
@ -74,7 +74,7 @@ void FMenuList::remove (FMenuItem* i)
if ( (*iter) == i ) if ( (*iter) == i )
{ {
iter = item_list.erase(iter); iter = item_list.erase(iter);
i->setSuperMenu(0); i->setSuperMenu(nullptr);
break; break;
} }
else else
@ -131,7 +131,7 @@ void FMenuList::unselectItem()
if ( hasSelectedItem() ) if ( hasSelectedItem() )
getSelectedItem()->unsetSelected(); getSelectedItem()->unsetSelected();
setSelectedItem(0); setSelectedItem(nullptr);
} }
} // namespace finalcut } // namespace finalcut

View File

@ -63,10 +63,10 @@ FMessageBox::FMessageBox (const FMessageBox& mbox)
, text_components(mbox.text_components) , text_components(mbox.text_components)
, text_split(mbox.text_split) , text_split(mbox.text_split)
, max_line_width(mbox.max_line_width) , max_line_width(mbox.max_line_width)
, center_text(mbox.center_text)
, emphasis_color(mbox.emphasis_color) , emphasis_color(mbox.emphasis_color)
, num_buttons(mbox.num_buttons) , num_buttons(mbox.num_buttons)
, text_num_lines(mbox.text_num_lines) , text_num_lines(mbox.text_num_lines)
, center_text(mbox.center_text)
{ {
setTitlebarText (mbox.getTitlebarText()); setTitlebarText (mbox.getTitlebarText());
init ( mbox.button_digit[0] init ( mbox.button_digit[0]

View File

@ -56,10 +56,6 @@ void FOptiAttr::setTermEnvironment (termEnv& term_env)
// Set all required termcap values at once // Set all required termcap values at once
// and initialize the FOptiAttr environment // and initialize the FOptiAttr environment
ansi_default_color = term_env.ansi_default_color;
max_color = term_env.max_color;
attr_without_color = term_env.attr_without_color;
set_enter_bold_mode (term_env.t_enter_bold_mode); set_enter_bold_mode (term_env.t_enter_bold_mode);
set_exit_bold_mode (term_env.t_exit_bold_mode); set_exit_bold_mode (term_env.t_exit_bold_mode);
set_enter_dim_mode (term_env.t_enter_dim_mode); set_enter_dim_mode (term_env.t_enter_dim_mode);
@ -96,6 +92,10 @@ void FOptiAttr::setTermEnvironment (termEnv& term_env)
set_orig_pair (term_env.t_orig_pair); set_orig_pair (term_env.t_orig_pair);
set_orig_orig_colors (term_env.t_orig_colors); set_orig_orig_colors (term_env.t_orig_colors);
max_color = term_env.max_color;
attr_without_color = term_env.attr_without_color;
ansi_default_color = term_env.ansi_default_color;
initialize(); initialize();
} }

View File

@ -85,9 +85,6 @@ void FOptiMove::setTermEnvironment (termEnv& term_env)
{ {
// Set all required termcap values at once // Set all required termcap values at once
set_auto_left_margin (term_env.automatic_left_margin);
set_eat_newline_glitch (term_env.eat_nl_glitch);
setTabStop (term_env.tabstop);
set_cursor_home (term_env.t_cursor_home); set_cursor_home (term_env.t_cursor_home);
set_cursor_to_ll (term_env.t_cursor_to_ll); set_cursor_to_ll (term_env.t_cursor_to_ll);
set_carriage_return (term_env.t_carriage_return); set_carriage_return (term_env.t_carriage_return);
@ -108,6 +105,9 @@ void FOptiMove::setTermEnvironment (termEnv& term_env)
set_repeat_char (term_env.t_repeat_char); set_repeat_char (term_env.t_repeat_char);
set_clr_bol (term_env.t_clr_bol); set_clr_bol (term_env.t_clr_bol);
set_clr_eol (term_env.t_clr_eol); set_clr_eol (term_env.t_clr_eol);
setTabStop (term_env.tabstop);
set_auto_left_margin (term_env.automatic_left_margin);
set_eat_newline_glitch (term_env.eat_nl_glitch);
} }
//---------------------------------------------------------------------- //----------------------------------------------------------------------
@ -601,7 +601,7 @@ int FOptiMove::repeatedAppend ( const capability& o
, char* dst ) , char* dst )
{ {
std::size_t src_len = std::strlen(o.cap); std::size_t src_len = std::strlen(o.cap);
std::size_t dst_len = ( dst != 0 ) ? std::strlen(dst) : 0; std::size_t dst_len = ( dst != nullptr ) ? std::strlen(dst) : 0;
int total{0}; int total{0};
if ( (dst_len + uInt(count) * src_len) < BUF_SIZE - 1 ) if ( (dst_len + uInt(count) * src_len) < BUF_SIZE - 1 )
@ -611,7 +611,7 @@ int FOptiMove::repeatedAppend ( const capability& o
if ( dst ) if ( dst )
{ {
dst += dst_len; dst += dst_len;
std::size_t free = BUF_SIZE - dst_len; std::size_t free = BUF_SIZE - dst_len - 2;
while ( count-- > 0 ) while ( count-- > 0 )
{ {
@ -921,9 +921,8 @@ inline bool FOptiMove::isMethod1Faster ( int& move_time
if ( xold >= 0 && yold >= 0 ) if ( xold >= 0 && yold >= 0 )
{ {
char null_result[BUF_SIZE]; char null_result[BUF_SIZE];
char* null_ptr = null_result; int new_time = relativeMove (null_result, xold, yold, xnew, ynew);
int new_time = relativeMove (null_ptr, xold, yold, xnew, ynew);
if ( new_time < LONG_DURATION && new_time < move_time ) if ( new_time < LONG_DURATION && new_time < move_time )
{ {
@ -944,9 +943,8 @@ inline bool FOptiMove::isMethod2Faster ( int& move_time
if ( yold >= 0 && F_carriage_return.cap ) if ( yold >= 0 && F_carriage_return.cap )
{ {
char null_result[BUF_SIZE]; char null_result[BUF_SIZE];
char* null_ptr = null_result; int new_time = relativeMove (null_result, 0, yold, xnew, ynew);
int new_time = relativeMove (null_ptr, 0, yold, xnew, ynew);
if ( new_time < LONG_DURATION if ( new_time < LONG_DURATION
&& F_carriage_return.duration + new_time < move_time ) && F_carriage_return.duration + new_time < move_time )
@ -967,9 +965,8 @@ inline bool FOptiMove::isMethod3Faster ( int& move_time
if ( F_cursor_home.cap ) if ( F_cursor_home.cap )
{ {
char null_result[BUF_SIZE]; char null_result[BUF_SIZE];
char* null_ptr = null_result; int new_time = relativeMove (null_result, 0, 0, xnew, ynew);
int new_time = relativeMove (null_ptr, 0, 0, xnew, ynew);
if ( new_time < LONG_DURATION if ( new_time < LONG_DURATION
&& F_cursor_home.duration + new_time < move_time ) && F_cursor_home.duration + new_time < move_time )
@ -989,11 +986,10 @@ inline bool FOptiMove::isMethod4Faster ( int& move_time
// Test method 4: home-down + local movement // Test method 4: home-down + local movement
if ( F_cursor_to_ll.cap ) if ( F_cursor_to_ll.cap )
{ {
char null_result[BUF_SIZE]; char null_result[BUF_SIZE];
char* null_ptr = null_result; int new_time = relativeMove ( null_result
int new_time = relativeMove ( null_ptr , 0, int(screen_height) - 1
, 0, int(screen_height) - 1 , xnew, ynew );
, xnew, ynew );
if ( new_time < LONG_DURATION if ( new_time < LONG_DURATION
&& F_cursor_to_ll.duration + new_time < move_time ) && F_cursor_to_ll.duration + new_time < move_time )
@ -1017,11 +1013,10 @@ inline bool FOptiMove::isMethod5Faster ( int& move_time
&& yold > 0 && yold > 0
&& F_cursor_left.cap ) && F_cursor_left.cap )
{ {
char null_result[BUF_SIZE]; char null_result[BUF_SIZE];
char* null_ptr = null_result; int new_time = relativeMove ( null_result
int new_time = relativeMove ( null_ptr , int(screen_width) - 1, yold - 1
, int(screen_width) - 1, yold - 1 , xnew, ynew );
, xnew, ynew );
if ( new_time < LONG_DURATION if ( new_time < LONG_DURATION
&& F_carriage_return.cap && F_carriage_return.cap
@ -1030,6 +1025,7 @@ inline bool FOptiMove::isMethod5Faster ( int& move_time
{ {
move_time = F_carriage_return.duration move_time = F_carriage_return.duration
+ F_cursor_left.duration + new_time; + F_cursor_left.duration + new_time;
return true; return true;
} }
} }

View File

@ -44,8 +44,8 @@ FStatusKey::FStatusKey(FWidget* parent)
//---------------------------------------------------------------------- //----------------------------------------------------------------------
FStatusKey::FStatusKey (FKey k, const FString& txt, FWidget* parent) FStatusKey::FStatusKey (FKey k, const FString& txt, FWidget* parent)
: FWidget(parent) : FWidget(parent)
, key(k)
, text(txt) , text(txt)
, key(k)
{ {
init (parent); init (parent);
} }
@ -141,13 +141,13 @@ FStatusBar::~FStatusBar() // destructor
while ( iter != key_list.end() ) while ( iter != key_list.end() )
{ {
(*iter)->setConnectedStatusbar(0); (*iter)->setConnectedStatusbar(nullptr);
delAccelerator (*iter); delAccelerator (*iter);
iter = key_list.erase(iter); iter = key_list.erase(iter);
} }
} }
setStatusBar(0); setStatusBar(nullptr);
} }
@ -286,7 +286,7 @@ void FStatusBar::remove (FStatusKey* skey)
if ( (*iter) == skey ) if ( (*iter) == skey )
{ {
iter = key_list.erase(iter); iter = key_list.erase(iter);
skey->setConnectedStatusbar(0); skey->setConnectedStatusbar(nullptr);
break; break;
} }
else else

View File

@ -1614,9 +1614,6 @@ void FTerm::init_optiMove()
FOptiMove::termEnv optimove_env = FOptiMove::termEnv optimove_env =
{ {
FTermcap::automatic_left_margin,
FTermcap::eat_nl_glitch,
FTermcap::tabstop,
TCAP(fc::t_cursor_home), TCAP(fc::t_cursor_home),
TCAP(fc::t_carriage_return), TCAP(fc::t_carriage_return),
TCAP(fc::t_cursor_to_ll), TCAP(fc::t_cursor_to_ll),
@ -1636,7 +1633,10 @@ void FTerm::init_optiMove()
TCAP(fc::t_erase_chars), TCAP(fc::t_erase_chars),
TCAP(fc::t_repeat_char), TCAP(fc::t_repeat_char),
TCAP(fc::t_clr_bol), TCAP(fc::t_clr_bol),
TCAP(fc::t_clr_eol) TCAP(fc::t_clr_eol),
FTermcap::tabstop,
FTermcap::automatic_left_margin,
FTermcap::eat_nl_glitch
}; };
opti_move->setTermEnvironment(optimove_env); opti_move->setTermEnvironment(optimove_env);
@ -1649,9 +1649,6 @@ void FTerm::init_optiAttr()
FOptiAttr::termEnv optiattr_env = FOptiAttr::termEnv optiattr_env =
{ {
FTermcap::ansi_default_color,
FTermcap::max_color,
FTermcap::attr_without_color,
TCAP(fc::t_enter_bold_mode), TCAP(fc::t_enter_bold_mode),
TCAP(fc::t_exit_bold_mode), TCAP(fc::t_exit_bold_mode),
TCAP(fc::t_enter_dim_mode), TCAP(fc::t_enter_dim_mode),
@ -1686,7 +1683,10 @@ void FTerm::init_optiAttr()
TCAP(fc::t_set_background), TCAP(fc::t_set_background),
TCAP(fc::t_orig_pair), TCAP(fc::t_orig_pair),
TCAP(fc::t_orig_pair), TCAP(fc::t_orig_pair),
TCAP(fc::t_orig_colors) TCAP(fc::t_orig_colors),
FTermcap::max_color,
FTermcap::attr_without_color,
FTermcap::ansi_default_color
}; };
opti_attr->setTermEnvironment(optiattr_env); opti_attr->setTermEnvironment(optiattr_env);

View File

@ -539,7 +539,7 @@ char* FTermDetection::determineMaxColor (char current_termtype[])
} }
//---------------------------------------------------------------------- //----------------------------------------------------------------------
const FString FTermDetection::getXTermColorName (int color) const FString FTermDetection::getXTermColorName (FColor color)
{ {
FString color_str{""}; FString color_str{""};
fd_set ifds{}; fd_set ifds{};
@ -547,7 +547,7 @@ const FString FTermDetection::getXTermColorName (int color)
int stdin_no = FTermios::getStdIn(); int stdin_no = FTermios::getStdIn();
char temp[512]{}; char temp[512]{};
std::fprintf (stdout, OSC "4;%d;?" BEL, color); // get color std::fprintf (stdout, OSC "4;%hu;?" BEL, color); // get color
std::fflush(stdout); std::fflush(stdout);
FD_ZERO(&ifds); FD_ZERO(&ifds);
@ -558,7 +558,7 @@ const FString FTermDetection::getXTermColorName (int color)
// read the terminal answer // read the terminal answer
if ( select (stdin_no + 1, &ifds, 0, 0, &tv) > 0 ) if ( select (stdin_no + 1, &ifds, 0, 0, &tv) > 0 )
{ {
if ( std::scanf("\033]4;%10d;%509[^\n]s", &color, temp) == 2 ) if ( std::scanf("\033]4;%10hu;%509[^\n]s", &color, temp) == 2 )
{ {
std::size_t n = std::strlen(temp); std::size_t n = std::strlen(temp);

View File

@ -112,7 +112,7 @@ void FToolTip::hide()
//---------------------------------------------------------------------- //----------------------------------------------------------------------
void FToolTip::onMouseDown (FMouseEvent*) void FToolTip::onMouseDown (FMouseEvent*)
{ {
setClickedWidget(0); setClickedWidget(nullptr);
close(); close();
} }

View File

@ -645,7 +645,7 @@ void FVTerm::createArea ( const FRect& box
return; return;
} }
area->widget = static_cast<FWidget*>(this); area->widget = reinterpret_cast<FWidget*>(this);
resizeArea (box, shadow, area); resizeArea (box, shadow, area);
} }

View File

@ -30,6 +30,7 @@
#include "final/ftermdata.h" #include "final/ftermdata.h"
#include "final/fwidget.h" #include "final/fwidget.h"
#include "final/fwidgetcolors.h" #include "final/fwidgetcolors.h"
#include "final/fwindow.h"
namespace finalcut namespace finalcut
{ {
@ -102,23 +103,23 @@ FWidget::~FWidget() // destructor
// unset clicked widget // unset clicked widget
if ( this == getClickedWidget() ) if ( this == getClickedWidget() )
setClickedWidget(0); setClickedWidget(nullptr);
// unset the local window widget focus // unset the local window widget focus
if ( flags.focus ) if ( flags.focus )
{ {
if ( auto window = FWindow::getWindowWidget(this) ) if ( auto window = FWindow::getWindowWidget(this) )
window->setWindowFocusWidget(0); window->setWindowFocusWidget(nullptr);
} }
// unset the global widget focus // unset the global widget focus
if ( this == FWidget::getFocusWidget() ) if ( this == FWidget::getFocusWidget() )
FWidget::setFocusWidget(0); FWidget::setFocusWidget(nullptr);
// unset main widget // unset main widget
if ( this == getMainWidget() ) if ( this == getMainWidget() )
{ {
setMainWidget(0); setMainWidget(nullptr);
quit(); quit();
} }
@ -833,6 +834,7 @@ bool FWidget::close()
if ( ! flags.modal ) if ( ! flags.modal )
close_widget->push_back(this); close_widget->push_back(this);
} }
return true; return true;
} }
else else

View File

@ -144,10 +144,10 @@ void FWindow::setActiveWindow (FWindow* window)
} }
//---------------------------------------------------------------------- //----------------------------------------------------------------------
void FWindow::setWindowFocusWidget (const FWidget* obj) void FWindow::setWindowFocusWidget (FWidget* obj)
{ {
// set focus widget of this window // set focus widget of this window
win_focus_widget = const_cast<FWidget*>(obj); win_focus_widget = obj;
} }
//---------------------------------------------------------------------- //----------------------------------------------------------------------
@ -167,7 +167,7 @@ bool FWindow::activateWindow (bool enable)
void FWindow::unsetActiveWindow() void FWindow::unsetActiveWindow()
{ {
// unset the active FWindow object // unset the active FWindow object
FWidget::setActiveWindow (0); FWidget::setActiveWindow (nullptr);
} }
//---------------------------------------------------------------------- //----------------------------------------------------------------------
@ -499,7 +499,7 @@ FWindow* FWindow::getWindowWidget (const FWidget* obj)
} }
if ( obj->isWindowWidget() ) if ( obj->isWindowWidget() )
return const_cast<FWindow*>(static_cast<const FWindow*>(obj)); return const_cast<FWindow*>(reinterpret_cast<const FWindow*>(obj));
else else
return 0; return 0;
} }

View File

@ -39,9 +39,6 @@ namespace fc
// class emptyFString // class emptyFString
//---------------------------------------------------------------------- //----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class emptyFString final class emptyFString final
{ {
public: public:
@ -62,7 +59,6 @@ private:
// Data member // Data member
static const FString* empty_string; static const FString* empty_string;
}; };
#pragma pack(pop)
// emptyFString inline functions // emptyFString inline functions
//---------------------------------------------------------------------- //----------------------------------------------------------------------

View File

@ -90,9 +90,6 @@ class FObject;
// class FApplication // class FApplication
//---------------------------------------------------------------------- //----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class FApplication : public FWidget class FApplication : public FWidget
{ {
public: public:
@ -201,8 +198,6 @@ class FApplication : public FWidget
static FKeyboard* keyboard; static FKeyboard* keyboard;
static FWidget* keyboard_widget; static FWidget* keyboard_widget;
}; };
#pragma pack(pop)
// FApplication inline functions // FApplication inline functions
//---------------------------------------------------------------------- //----------------------------------------------------------------------

View File

@ -62,9 +62,6 @@ namespace finalcut
// class FButton // class FButton
//---------------------------------------------------------------------- //----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class FButton : public FWidget class FButton : public FWidget
{ {
public: public:
@ -165,11 +162,6 @@ class FButton : public FWidget
bool click_animation{true}; bool click_animation{true};
int click_time{150}; int click_time{150};
int space_char{int(' ')}; int space_char{int(' ')};
std::size_t hotkeypos{NOT_SET};
std::size_t indent{0};
std::size_t center_offset{0};
std::size_t vcenter_offset{0};
std::size_t txtlength{0};
FColor button_fg{getFWidgetColors().button_active_fg}; FColor button_fg{getFWidgetColors().button_active_fg};
FColor button_bg{getFWidgetColors().button_active_bg}; FColor button_bg{getFWidgetColors().button_active_bg};
FColor button_hotkey_fg{getFWidgetColors().button_hotkey_fg}; FColor button_hotkey_fg{getFWidgetColors().button_hotkey_fg};
@ -177,9 +169,12 @@ class FButton : public FWidget
FColor button_focus_bg{getFWidgetColors().button_active_focus_bg}; FColor button_focus_bg{getFWidgetColors().button_active_focus_bg};
FColor button_inactive_fg{getFWidgetColors().button_inactive_fg}; FColor button_inactive_fg{getFWidgetColors().button_inactive_fg};
FColor button_inactive_bg{getFWidgetColors().button_inactive_bg}; FColor button_inactive_bg{getFWidgetColors().button_inactive_bg};
std::size_t hotkeypos{NOT_SET};
std::size_t indent{0};
std::size_t center_offset{0};
std::size_t vcenter_offset{0};
std::size_t txtlength{0};
}; };
#pragma pack(pop)
// FButton inline functions // FButton inline functions
//---------------------------------------------------------------------- //----------------------------------------------------------------------

View File

@ -66,9 +66,6 @@ class FToggleButton;
// class FButtonGroup // class FButtonGroup
//---------------------------------------------------------------------- //----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class FButtonGroup : public FScrollView class FButtonGroup : public FScrollView
{ {
public: public:
@ -144,8 +141,6 @@ class FButtonGroup : public FScrollView
FString text{}; FString text{};
FObjectList buttonlist{}; FObjectList buttonlist{};
}; };
#pragma pack(pop)
// FButtonGroup inline functions // FButtonGroup inline functions
//---------------------------------------------------------------------- //----------------------------------------------------------------------

View File

@ -66,9 +66,6 @@ namespace finalcut
// class FCheckBox // class FCheckBox
//---------------------------------------------------------------------- //----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class FCheckBox : public FToggleButton class FCheckBox : public FToggleButton
{ {
public: public:
@ -96,8 +93,6 @@ class FCheckBox : public FToggleButton
void drawChecked(); void drawChecked();
void drawUnchecked(); void drawUnchecked();
}; };
#pragma pack(pop)
// FCheckBox inline functions // FCheckBox inline functions
//---------------------------------------------------------------------- //----------------------------------------------------------------------

View File

@ -66,9 +66,6 @@ namespace finalcut
// class FCheckMenuItem // class FCheckMenuItem
//---------------------------------------------------------------------- //----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class FCheckMenuItem : public FMenuItem class FCheckMenuItem : public FMenuItem
{ {
public: public:
@ -94,8 +91,6 @@ class FCheckMenuItem : public FMenuItem
void processToggle(); void processToggle();
void processClicked() override; void processClicked() override;
}; };
#pragma pack(pop)
// FCheckMenuItem inline functions // FCheckMenuItem inline functions
//---------------------------------------------------------------------- //----------------------------------------------------------------------

View File

@ -45,9 +45,6 @@ namespace finalcut
// class FColorPair // class FColorPair
//---------------------------------------------------------------------- //----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class FColorPair class FColorPair
{ {
public: public:
@ -114,7 +111,6 @@ class FColorPair
FColor fg_color; // Foreground color FColor fg_color; // Foreground color
FColor bg_color; // Background color FColor bg_color; // Background color
}; };
#pragma pack(pop)
} // namespace finalcut } // namespace finalcut

View File

@ -42,9 +42,6 @@ namespace finalcut
// class FColorPalette // class FColorPalette
//---------------------------------------------------------------------- //----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class FColorPalette final class FColorPalette final
{ {
public: public:
@ -66,7 +63,6 @@ class FColorPalette final
static void reset8ColorPalette (funcp); static void reset8ColorPalette (funcp);
static void reset16ColorPalette (funcp); static void reset16ColorPalette (funcp);
}; };
#pragma pack(pop)
// FColorPalette inline functions // FColorPalette inline functions
//---------------------------------------------------------------------- //----------------------------------------------------------------------

View File

@ -69,9 +69,6 @@ class FToolTip;
// class FDialog // class FDialog
//---------------------------------------------------------------------- //----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class FDialog : public FWindow class FDialog : public FWindow
{ {
public: public:
@ -238,7 +235,6 @@ class FDialog : public FWindow
// Friend function from FMenu // Friend function from FMenu
friend void FMenu::hideSuperMenus(); friend void FMenu::hideSuperMenus();
}; };
#pragma pack(pop)
// FDialog inline functions // FDialog inline functions
//---------------------------------------------------------------------- //----------------------------------------------------------------------

View File

@ -72,9 +72,6 @@ namespace finalcut
// class FDialogListMenu // class FDialogListMenu
//---------------------------------------------------------------------- //----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class FDialogListMenu : public FMenu class FDialogListMenu : public FMenu
{ {
public: public:
@ -98,7 +95,6 @@ class FDialogListMenu : public FMenu
// Method // Method
void init(); void init();
}; };
#pragma pack(pop)
// FDialogListMenu inline functions // FDialogListMenu inline functions

View File

@ -94,9 +94,6 @@ class FPoint;
// class FEvent // class FEvent
//---------------------------------------------------------------------- //----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class FEvent // event base class class FEvent // event base class
{ {
public: public:
@ -108,16 +105,11 @@ class FEvent // event base class
fc::events t{fc::None_Event}; fc::events t{fc::None_Event};
}; };
#pragma pack(pop)
//---------------------------------------------------------------------- //----------------------------------------------------------------------
// class FKeyEvent // class FKeyEvent
//---------------------------------------------------------------------- //----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class FKeyEvent : public FEvent // keyboard event class FKeyEvent : public FEvent // keyboard event
{ {
public: public:
@ -125,26 +117,21 @@ class FKeyEvent : public FEvent // keyboard event
FKeyEvent (fc::events, FKey); FKeyEvent (fc::events, FKey);
~FKeyEvent(); ~FKeyEvent();
FKey key() const; FKey key() const;
bool isAccepted() const; bool isAccepted() const;
void accept(); void accept();
void ignore(); void ignore();
private: private:
FKey k{0}; FKey k{0};
bool accpt{false}; bool accpt{false};
}; };
#pragma pack(pop)
//---------------------------------------------------------------------- //----------------------------------------------------------------------
// class FMouseEvent // class FMouseEvent
//---------------------------------------------------------------------- //----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class FMouseEvent : public FEvent // mouse event class FMouseEvent : public FEvent // mouse event
{ {
public: public:
@ -153,30 +140,25 @@ class FMouseEvent : public FEvent // mouse event
FMouseEvent (fc::events, const FPoint&, int); FMouseEvent (fc::events, const FPoint&, int);
~FMouseEvent(); ~FMouseEvent();
const FPoint& getPos() const; const FPoint& getPos() const;
const FPoint& getTermPos() const; const FPoint& getTermPos() const;
int getX() const; int getX() const;
int getY() const; int getY() const;
int getTermX() const; int getTermX() const;
int getTermY() const; int getTermY() const;
int getButton() const; int getButton() const;
private: private:
FPoint p{}; FPoint p{};
FPoint tp{}; FPoint tp{};
int b{}; int b{};
}; };
#pragma pack(pop)
//---------------------------------------------------------------------- //----------------------------------------------------------------------
// class FWheelEvent // class FWheelEvent
//---------------------------------------------------------------------- //----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class FWheelEvent : public FEvent // wheel event class FWheelEvent : public FEvent // wheel event
{ {
public: public:
@ -185,30 +167,25 @@ class FWheelEvent : public FEvent // wheel event
FWheelEvent (fc::events, const FPoint&, const FPoint&, int); FWheelEvent (fc::events, const FPoint&, const FPoint&, int);
~FWheelEvent(); ~FWheelEvent();
const FPoint& getPos() const; const FPoint& getPos() const;
const FPoint& getTermPos() const; const FPoint& getTermPos() const;
int getX() const; int getX() const;
int getY() const; int getY() const;
int getTermX() const; int getTermX() const;
int getTermY() const; int getTermY() const;
int getWheel() const; int getWheel() const;
private: private:
FPoint p; FPoint p;
FPoint tp; FPoint tp;
int w; int w;
}; };
#pragma pack(pop)
//---------------------------------------------------------------------- //----------------------------------------------------------------------
// class FFocusEvent // class FFocusEvent
//---------------------------------------------------------------------- //----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class FFocusEvent : public FEvent // focus event class FFocusEvent : public FEvent // focus event
{ {
public: public:
@ -216,29 +193,24 @@ class FFocusEvent : public FEvent // focus event
explicit FFocusEvent (fc::events); explicit FFocusEvent (fc::events);
~FFocusEvent(); ~FFocusEvent();
bool gotFocus() const; bool gotFocus() const;
bool lostFocus() const; bool lostFocus() const;
fc::FocusTypes getFocusType() const; fc::FocusTypes getFocusType() const;
void setFocusType(fc::FocusTypes); void setFocusType(fc::FocusTypes);
bool isAccepted() const; bool isAccepted() const;
void accept(); void accept();
void ignore(); void ignore();
private: private:
bool accpt{true}; bool accpt{true};
fc::FocusTypes focus_type{fc::FocusDefiniteWidget}; fc::FocusTypes focus_type{fc::FocusDefiniteWidget};
}; };
#pragma pack(pop)
//---------------------------------------------------------------------- //----------------------------------------------------------------------
// class FAccelEvent // class FAccelEvent
//---------------------------------------------------------------------- //----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class FAccelEvent : public FEvent // focus event class FAccelEvent : public FEvent // focus event
{ {
public: public:
@ -258,8 +230,6 @@ class FAccelEvent : public FEvent // focus event
void* focus_widget{}; void* focus_widget{};
}; };
#pragma pack(pop)
//---------------------------------------------------------------------- //----------------------------------------------------------------------
// class FResizeEvent // class FResizeEvent
@ -272,12 +242,12 @@ class FResizeEvent : public FEvent // resize event
explicit FResizeEvent (fc::events); explicit FResizeEvent (fc::events);
~FResizeEvent(); ~FResizeEvent();
bool isAccepted() const; bool isAccepted() const;
void accept(); void accept();
void ignore(); void ignore();
private: private:
bool accpt{false}; bool accpt{false};
}; };
@ -318,12 +288,12 @@ class FCloseEvent : public FEvent // close event
explicit FCloseEvent(fc::events); explicit FCloseEvent(fc::events);
~FCloseEvent(); ~FCloseEvent();
bool isAccepted() const; bool isAccepted() const;
void accept(); void accept();
void ignore(); void ignore();
private: private:
bool accpt{false}; bool accpt{false};
}; };
@ -331,9 +301,6 @@ class FCloseEvent : public FEvent // close event
// class FTimerEvent // class FTimerEvent
//---------------------------------------------------------------------- //----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class FTimerEvent : public FEvent // timer event class FTimerEvent : public FEvent // timer event
{ {
public: public:
@ -341,22 +308,17 @@ class FTimerEvent : public FEvent // timer event
FTimerEvent (fc::events, int); FTimerEvent (fc::events, int);
~FTimerEvent(); ~FTimerEvent();
int getTimerId() const; int getTimerId() const;
private: private:
int id{0}; int id{0};
}; };
#pragma pack(pop)
//---------------------------------------------------------------------- //----------------------------------------------------------------------
// class FUserEvent // class FUserEvent
//---------------------------------------------------------------------- //----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class FUserEvent : public FEvent // timer event class FUserEvent : public FEvent // timer event
{ {
public: public:
@ -371,17 +333,15 @@ class FUserEvent : public FEvent // timer event
// Disable assignment operator (=) // Disable assignment operator (=)
FUserEvent& operator = (const FUserEvent&) = delete; FUserEvent& operator = (const FUserEvent&) = delete;
int getUserId() const; int getUserId() const;
FDataPtr getData() const; FDataPtr getData() const;
void setData (FDataPtr); void setData (FDataPtr);
private: private:
int uid{0}; int uid{0};
FDataPtr data_pointer{nullptr}; FDataPtr data_pointer{nullptr};
}; };
#pragma pack(pop)
} // namespace finalcut } // namespace finalcut
#endif // FEVENT_H #endif // FEVENT_H

View File

@ -92,9 +92,6 @@ class FSystem;
// class FFileDialog // class FFileDialog
//---------------------------------------------------------------------- //----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class FFileDialog : public FDialog class FFileDialog : public FDialog
{ {
public: public:
@ -216,8 +213,6 @@ class FFileDialog : public FDialog
friend bool sortDirFirst ( const FFileDialog::dir_entry& friend bool sortDirFirst ( const FFileDialog::dir_entry&
, const FFileDialog::dir_entry& ); , const FFileDialog::dir_entry& );
}; };
#pragma pack(pop)
// FMessageBox inline functions // FMessageBox inline functions
//---------------------------------------------------------------------- //----------------------------------------------------------------------

View File

@ -50,9 +50,6 @@ class FTermLinux;
// class FKeyboardCommand // class FKeyboardCommand
//---------------------------------------------------------------------- //----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class FKeyboardCommand final class FKeyboardCommand final
{ {
public: public:
@ -68,16 +65,12 @@ class FKeyboardCommand final
FApplication* instance{nullptr}; FApplication* instance{nullptr};
void (FApplication::*handler)(){nullptr}; void (FApplication::*handler)(){nullptr};
}; };
#pragma pack(pop)
//---------------------------------------------------------------------- //----------------------------------------------------------------------
// class FKeyboard // class FKeyboard
//---------------------------------------------------------------------- //----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class FKeyboard final class FKeyboard final
{ {
public: public:
@ -160,30 +153,29 @@ class FKeyboard final
void escapeKeyPressed(); void escapeKeyPressed();
// Data members // Data members
FKey key{0};
char read_buf[READ_BUF_SIZE]{'\0'};
char fifo_buf[FIFO_BUF_SIZE]{'\0'};
int fifo_offset{0};
bool fifo_in_use{false};
int stdin_status_flags{0};
static uInt64 key_timeout;
bool input_data_pending{false};
bool utf8_input{false};
bool mouse_support{true};
bool non_blocking_stdin{false};
FKeyboardCommand keypressed_cmd{}; FKeyboardCommand keypressed_cmd{};
FKeyboardCommand keyreleased_cmd{}; FKeyboardCommand keyreleased_cmd{};
FKeyboardCommand escape_key_cmd{}; FKeyboardCommand escape_key_cmd{};
static timeval time_keypressed;
fc::fkeymap* key_map{nullptr};
#if defined(__linux__) #if defined(__linux__)
#undef linux #undef linux
static FTermLinux* linux; static FTermLinux* linux;
#endif #endif
static timeval time_keypressed;
static uInt64 key_timeout;
fc::fkeymap* key_map{nullptr};
FKey key{0};
char read_buf[READ_BUF_SIZE]{'\0'};
char fifo_buf[FIFO_BUF_SIZE]{'\0'};
int fifo_offset{0};
int stdin_status_flags{0};
bool fifo_in_use{false};
bool input_data_pending{false};
bool utf8_input{false};
bool mouse_support{true};
bool non_blocking_stdin{false};
}; };
#pragma pack(pop)
// FKeyboard inline functions // FKeyboard inline functions
//---------------------------------------------------------------------- //----------------------------------------------------------------------

View File

@ -64,9 +64,6 @@ namespace finalcut
// class FLabel // class FLabel
//---------------------------------------------------------------------- //----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class FLabel : public FWidget class FLabel : public FWidget
{ {
public: public:
@ -153,18 +150,16 @@ class FLabel : public FWidget
, std::size_t, std::size_t = 0 ); , std::size_t, std::size_t = 0 );
// Data members // Data members
FStringList multiline_text{}; FStringList multiline_text{};
bool multiline{false}; FString text{};
FString text{}; FWidget* accel_widget{nullptr};
fc::text_alignment alignment{fc::alignLeft}; fc::text_alignment alignment{fc::alignLeft};
FColor emphasis_color{getFWidgetColors().label_emphasis_fg}; FColor emphasis_color{getFWidgetColors().label_emphasis_fg};
FColor ellipsis_color{getFWidgetColors().label_ellipsis_fg}; FColor ellipsis_color{getFWidgetColors().label_ellipsis_fg};
bool emphasis{false}; bool multiline{false};
bool reverse_mode{false}; bool emphasis{false};
FWidget* accel_widget{nullptr}; bool reverse_mode{false};
}; };
#pragma pack(pop)
// FLabel inline functions // FLabel inline functions
//---------------------------------------------------------------------- //----------------------------------------------------------------------

View File

@ -65,9 +65,6 @@ class FLabel;
// class FLineEdit // class FLineEdit
//---------------------------------------------------------------------- //----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class FLineEdit : public FWidget class FLineEdit : public FWidget
{ {
public: public:
@ -189,17 +186,16 @@ class FLineEdit : public FWidget
FString text{""}; FString text{""};
FString label_text{""}; FString label_text{""};
FLabel* label{}; FLabel* label{};
label_o label_orientation{FLineEdit::label_left};
std::wstring input_filter{}; std::wstring input_filter{};
dragScroll drag_scroll{FLineEdit::noScroll}; dragScroll drag_scroll{FLineEdit::noScroll};
bool scroll_timer{false}; label_o label_orientation{FLineEdit::label_left};
int scroll_repeat{100}; int scroll_repeat{100};
bool scroll_timer{false};
bool insert_mode{true}; bool insert_mode{true};
std::size_t cursor_pos{0}; std::size_t cursor_pos{0};
std::size_t text_offset{0}; std::size_t text_offset{0};
std::size_t max_length{std::numeric_limits<std::size_t>::max()}; std::size_t max_length{std::numeric_limits<std::size_t>::max()};
}; };
#pragma pack(pop)
// FLineEdit inline functions // FLineEdit inline functions

View File

@ -69,9 +69,6 @@ class FString;
// class FListBoxItem // class FListBoxItem
//---------------------------------------------------------------------- //----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class FListBoxItem class FListBoxItem
{ {
public: public:
@ -108,7 +105,6 @@ class FListBoxItem
fc::brackets_type brackets{fc::NoBrackets}; fc::brackets_type brackets{fc::NoBrackets};
bool selected{false}; bool selected{false};
}; };
#pragma pack(pop)
// FListBoxItem inline functions // FListBoxItem inline functions
@ -141,9 +137,6 @@ inline void FListBoxItem::clear()
// class FListBox // class FListBox
//---------------------------------------------------------------------- //----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class FListBox : public FWidget class FListBox : public FWidget
{ {
public: public:
@ -329,27 +322,26 @@ class FListBox : public FWidget
// Data members // Data members
listBoxItems itemlist{}; listBoxItems itemlist{};
FDataPtr source_container{nullptr}; FDataPtr source_container{nullptr};
convert_type conv_type{FListBox::no_convert};
FScrollbarPtr vbar{nullptr}; FScrollbarPtr vbar{nullptr};
FScrollbarPtr hbar{nullptr}; FScrollbarPtr hbar{nullptr};
FString text{}; FString text{};
FString inc_search{}; FString inc_search{};
bool multi_select{false}; convert_type conv_type{FListBox::no_convert};
bool mouse_select{false};
fc::dragScroll drag_scroll{fc::noScroll}; fc::dragScroll drag_scroll{fc::noScroll};
bool scroll_timer{false};
int scroll_repeat{100}; int scroll_repeat{100};
int scroll_distance{1}; int scroll_distance{1};
std::size_t current{0};
int last_current{-1}; int last_current{-1};
int secect_from_item{-1}; int secect_from_item{-1};
int xoffset{0}; int xoffset{0};
int yoffset{0}; int yoffset{0};
int last_yoffset{-1}; int last_yoffset{-1};
std::size_t current{0};
std::size_t nf_offset{0}; std::size_t nf_offset{0};
std::size_t max_line_width{0}; std::size_t max_line_width{0};
bool multi_select{false};
bool mouse_select{false};
bool scroll_timer{false};
}; };
#pragma pack(pop)
// FListBox inline functions // FListBox inline functions

View File

@ -72,9 +72,6 @@ class FString;
// class FListViewItem // class FListViewItem
//---------------------------------------------------------------------- //----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class FListViewItem : public FObject class FListViewItem : public FObject
{ {
public: public:
@ -142,7 +139,6 @@ class FListViewItem : public FObject
friend class FListView; friend class FListView;
friend class FListViewIterator; friend class FListViewIterator;
}; };
#pragma pack(pop)
// FListViewItem inline functions // FListViewItem inline functions
@ -187,9 +183,6 @@ inline bool FListViewItem::isCheckable() const
// class FListViewIterator // class FListViewIterator
//---------------------------------------------------------------------- //----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class FListViewIterator class FListViewIterator
{ {
public: public:
@ -231,7 +224,6 @@ class FListViewIterator
FObjectIterator node{}; FObjectIterator node{};
int position{0}; int position{0};
}; };
#pragma pack(pop)
// FListViewIterator inline functions // FListViewIterator inline functions
@ -263,9 +255,6 @@ inline int FListViewIterator::getPosition() const
// class FListView // class FListView
//---------------------------------------------------------------------- //----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class FListView : public FWidget class FListView : public FWidget
{ {
public: public:
@ -458,48 +447,46 @@ class FListView : public FWidget
FTermBuffer headerline{}; FTermBuffer headerline{};
FScrollbarPtr vbar{nullptr}; FScrollbarPtr vbar{nullptr};
FScrollbarPtr hbar{nullptr}; FScrollbarPtr hbar{nullptr};
sortTypes sort_type{};
FPoint clicked_expander_pos{-1, -1};
FPoint clicked_header_pos{-1, -1};
const FListViewItem* clicked_checkbox_item{nullptr};
std::size_t nf_offset{0};
std::size_t max_line_width{1};
fc::dragScroll drag_scroll{fc::noScroll}; fc::dragScroll drag_scroll{fc::noScroll};
int scroll_repeat{100}; int scroll_repeat{100};
int scroll_distance{1}; int scroll_distance{1};
int xoffset{0};
int sort_column{-1};
fc::sorting_order sort_order{fc::unsorted};
bool scroll_timer{false}; bool scroll_timer{false};
bool tree_view{false}; bool tree_view{false};
bool hide_sort_indicator{false}; bool hide_sort_indicator{false};
bool has_checkable_items{false}; bool has_checkable_items{false};
FPoint clicked_expander_pos{-1, -1};
FPoint clicked_header_pos{-1, -1}; // Function Pointer
const FListViewItem* clicked_checkbox_item{nullptr};
int xoffset{0};
std::size_t nf_offset{0};
std::size_t max_line_width{1};
int sort_column{-1};
sortTypes sort_type{};
fc::sorting_order sort_order{fc::unsorted};
bool (*user_defined_ascending) (const FObject*, const FObject*){nullptr}; bool (*user_defined_ascending) (const FObject*, const FObject*){nullptr};
bool (*user_defined_descending) (const FObject*, const FObject*){nullptr}; bool (*user_defined_descending) (const FObject*, const FObject*){nullptr};
// Friend class // Friend class
friend class FListViewItem; friend class FListViewItem;
}; };
#pragma pack(pop)
//---------------------------------------------------------------------- //----------------------------------------------------------------------
// struct FListView::Header // struct FListView::Header
//---------------------------------------------------------------------- //----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
struct FListView::Header struct FListView::Header
{ {
public: public:
Header() = default; Header() = default;
FString name{}; FString name{};
fc::text_alignment alignment{fc::alignLeft};
int width{0}; int width{0};
bool fixed_width{false}; bool fixed_width{false};
fc::text_alignment alignment{fc::alignLeft};
}; };
#pragma pack(pop)
// FListView inline functions // FListView inline functions

View File

@ -73,9 +73,6 @@ class FMenuItem;
// class FMenu // class FMenu
//---------------------------------------------------------------------- //----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class FMenu : public FWindow, public FMenuList class FMenu : public FWindow, public FMenuList
{ {
public: public:
@ -239,7 +236,6 @@ class FMenu : public FWindow, public FMenuList
bool mouse_down{false}; bool mouse_down{false};
bool has_checkable_items{false}; bool has_checkable_items{false};
}; };
#pragma pack(pop)
// FMenu inline functions // FMenu inline functions

View File

@ -72,9 +72,6 @@ class FMenu;
// class FMenuBar // class FMenuBar
//---------------------------------------------------------------------- //----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class FMenuBar : public FWindow, public FMenuList class FMenuBar : public FWindow, public FMenuList
{ {
public: public:
@ -155,12 +152,11 @@ class FMenuBar : public FWindow, public FMenuList
friend class FMenuItem; friend class FMenuItem;
// Data members // Data members
std::size_t screenWidth{80};
bool mouse_down{false}; bool mouse_down{false};
bool drop_down{false}; bool drop_down{false};
bool focus_changed{false}; bool focus_changed{false};
std::size_t screenWidth{80};
}; };
#pragma pack(pop)
// FMenuBar inline functions // FMenuBar inline functions

View File

@ -70,9 +70,6 @@ class FMenuList;
// class FMenuItem // class FMenuItem
//---------------------------------------------------------------------- //----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class FMenuItem : public FWidget class FMenuItem : public FWidget
{ {
public: public:
@ -178,18 +175,18 @@ class FMenuItem : public FWidget
// Data members // Data members
FString text{}; FString text{};
FMenu* menu{nullptr};
FWidget* super_menu{nullptr};
FDialog* associated_window{nullptr};
std::size_t text_length{0};
FKey accel_key{0};
uChar hotkey{0};
bool selected{false}; bool selected{false};
bool separator{false}; bool separator{false};
bool checkable{false}; bool checkable{false};
bool checked{false}; bool checked{false};
bool radio_button{false}; bool radio_button{false};
bool dialog_index{false}; bool dialog_index{false};
std::size_t text_length{0};
uChar hotkey{0};
FKey accel_key{0};
FMenu* menu{nullptr};
FWidget* super_menu{nullptr};
FDialog* associated_window{nullptr};
// Friend classes // Friend classes
friend class FDialogListMenu; friend class FDialogListMenu;
@ -197,7 +194,6 @@ class FMenuItem : public FWidget
friend class FMenuBar; friend class FMenuBar;
friend class FMenu; friend class FMenu;
}; };
#pragma pack(pop)
// FMenuItem inline functions // FMenuItem inline functions

View File

@ -55,9 +55,6 @@ namespace finalcut
// class FMenuList // class FMenuList
//---------------------------------------------------------------------- //----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class FMenuList class FMenuList
{ {
public: public:
@ -103,7 +100,6 @@ class FMenuList
FMenuItem* selected_item{}; FMenuItem* selected_item{};
std::vector<FMenuItem*> item_list{}; std::vector<FMenuItem*> item_list{};
}; };
#pragma pack(pop)
// FMenuList inline functions // FMenuList inline functions

View File

@ -77,9 +77,6 @@ class FButton;
// class FMessageBox // class FMessageBox
//---------------------------------------------------------------------- //----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class FMessageBox : public FDialog class FMessageBox : public FDialog
{ {
public: public:
@ -160,15 +157,14 @@ class FMessageBox : public FDialog
FString text{}; FString text{};
FString* text_components{nullptr}; FString* text_components{nullptr};
FStringList text_split{}; FStringList text_split{};
FButton* button[3]{nullptr};
std::size_t max_line_width{0}; std::size_t max_line_width{0};
bool center_text{false};
FColor emphasis_color{getFWidgetColors().dialog_emphasis_fg}; FColor emphasis_color{getFWidgetColors().dialog_emphasis_fg};
int button_digit[3]{0};
uInt num_buttons{0}; uInt num_buttons{0};
uInt text_num_lines{0}; uInt text_num_lines{0};
int button_digit[3]{0}; bool center_text{false};
FButton* button[3]{nullptr};
}; };
#pragma pack(pop)
// FMessageBox inline functions // FMessageBox inline functions

View File

@ -81,9 +81,6 @@ namespace finalcut
// class FMouse // class FMouse
//---------------------------------------------------------------------- //----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class FMouse class FMouse
{ {
public: public:
@ -193,7 +190,6 @@ class FMouse
FPoint mouse{0, 0}; // mouse click position FPoint mouse{0, 0}; // mouse click position
FPoint new_mouse_position{}; FPoint new_mouse_position{};
}; };
#pragma pack(pop)
#ifdef F_HAVE_LIBGPM #ifdef F_HAVE_LIBGPM
@ -201,9 +197,6 @@ class FMouse
// class FMouseGPM // class FMouseGPM
//---------------------------------------------------------------------- //----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class FMouseGPM final : public FMouse class FMouseGPM final : public FMouse
{ {
public: public:
@ -253,7 +246,6 @@ class FMouseGPM final : public FMouse
bool gpm_mouse_enabled{false}; bool gpm_mouse_enabled{false};
int stdin_no{0}; int stdin_no{0};
}; };
#pragma pack(pop)
//---------------------------------------------------------------------- //----------------------------------------------------------------------
inline bool FMouseGPM::enableGpmMouse() inline bool FMouseGPM::enableGpmMouse()
@ -273,9 +265,6 @@ inline bool FMouseGPM::isGpmMouseEnabled()
// class FMouseX11 // class FMouseX11
//---------------------------------------------------------------------- //----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class FMouseX11 final : public FMouse class FMouseX11 final : public FMouse
{ {
public: public:
@ -329,16 +318,12 @@ class FMouseX11 final : public FMouse
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};
}; };
#pragma pack(pop)
//---------------------------------------------------------------------- //----------------------------------------------------------------------
// class FMouseSGR // class FMouseSGR
//---------------------------------------------------------------------- //----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class FMouseSGR final : public FMouse class FMouseSGR final : public FMouse
{ {
public: public:
@ -392,16 +377,12 @@ class FMouseSGR final : public FMouse
char sgr_mouse[MOUSE_BUF_SIZE]{'\0'}; char sgr_mouse[MOUSE_BUF_SIZE]{'\0'};
uChar sgr_button_state{0x23}; uChar sgr_button_state{0x23};
}; };
#pragma pack(pop)
//---------------------------------------------------------------------- //----------------------------------------------------------------------
// class FMouseUrxvt // class FMouseUrxvt
//---------------------------------------------------------------------- //----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class FMouseUrxvt final : public FMouse class FMouseUrxvt final : public FMouse
{ {
public: public:
@ -455,15 +436,12 @@ class FMouseUrxvt final : public FMouse
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};
}; };
#pragma pack(pop)
//---------------------------------------------------------------------- //----------------------------------------------------------------------
// class FMouseControl // class FMouseControl
//---------------------------------------------------------------------- //----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class FMouseControl class FMouseControl
{ {
public: public:
@ -531,7 +509,6 @@ class FMouseControl
bool use_gpm_mouse{false}; bool use_gpm_mouse{false};
bool use_xterm_mouse{false}; bool use_xterm_mouse{false};
}; };
#pragma pack(pop)
// FMouseControl inline functions // FMouseControl inline functions
//---------------------------------------------------------------------- //----------------------------------------------------------------------

View File

@ -68,9 +68,6 @@ class FUserEvent;
// class FObject // class FObject
//---------------------------------------------------------------------- //----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class FObject class FObject
{ {
public: public:
@ -158,15 +155,14 @@ class FObject
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};
bool widget_object{false}; bool widget_object{false};
static bool timer_modify_lock; static bool timer_modify_lock;
static TimerList* timer_list; static TimerList* timer_list;
}; };
#pragma pack(pop)
//---------------------------------------------------------------------- //----------------------------------------------------------------------
inline const char* FObject::getClassName() const inline const char* FObject::getClassName() const

View File

@ -65,18 +65,12 @@ namespace finalcut
// class FOptiAttr // class FOptiAttr
//---------------------------------------------------------------------- //----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class FOptiAttr final class FOptiAttr final
{ {
public: public:
// Typedef // Typedef
typedef struct typedef struct
{ {
bool ansi_default_color;
int max_color;
int attr_without_color;
char* t_enter_bold_mode; char* t_enter_bold_mode;
char* t_exit_bold_mode; char* t_exit_bold_mode;
char* t_enter_dim_mode; char* t_enter_dim_mode;
@ -112,6 +106,9 @@ class FOptiAttr final
char* t_set_color_pair; char* t_set_color_pair;
char* t_orig_pair; char* t_orig_pair;
char* t_orig_colors; char* t_orig_colors;
int max_color;
int attr_without_color;
bool ansi_default_color;
} termEnv; } termEnv;
// Constructor // Constructor
@ -185,7 +182,7 @@ class FOptiAttr final
private: private:
// Typedefs and Enumerations // Typedefs and Enumerations
typedef struct alignas(alignof(char*)) typedef struct
{ {
char* cap; char* cap;
bool caused_reset; bool caused_reset;
@ -327,14 +324,13 @@ class FOptiAttr final
int max_color{1}; int max_color{1};
int attr_without_color{0}; int attr_without_color{0};
char* attr_ptr{attr_buf};
char attr_buf[8192]{'\0'};
bool ansi_default_color{false}; bool ansi_default_color{false};
bool alt_equal_pc_charset{false}; bool alt_equal_pc_charset{false};
bool monochron{true}; bool monochron{true};
bool fake_reverse{false}; bool fake_reverse{false};
char attr_buf[8192]{'\0'};
char* attr_ptr{attr_buf};
}; };
#pragma pack(pop)
// FOptiAttr inline functions // FOptiAttr inline functions

View File

@ -70,18 +70,12 @@ namespace finalcut
// class FOptiMove // class FOptiMove
//---------------------------------------------------------------------- //----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class FOptiMove final class FOptiMove final
{ {
public: public:
// Typedef // Typedef
typedef struct typedef struct
{ {
bool automatic_left_margin;
bool eat_nl_glitch;
int tabstop;
char* t_cursor_home; char* t_cursor_home;
char* t_carriage_return; char* t_carriage_return;
char* t_cursor_to_ll; char* t_cursor_to_ll;
@ -102,6 +96,9 @@ class FOptiMove final
char* t_repeat_char; char* t_repeat_char;
char* t_clr_bol; char* t_clr_bol;
char* t_clr_eol; char* t_clr_eol;
int tabstop;
bool automatic_left_margin;
bool eat_nl_glitch;
} termEnv; } termEnv;
// Constructor // Constructor
@ -158,8 +155,8 @@ class FOptiMove final
void set_repeat_char (char[]); void set_repeat_char (char[]);
void set_clr_bol (char[]); void set_clr_bol (char[]);
void set_clr_eol (char[]); void set_clr_eol (char[]);
void set_auto_left_margin (const bool&); void set_auto_left_margin (bool);
void set_eat_newline_glitch (const bool&); void set_eat_newline_glitch (bool);
// Methods // Methods
void check_boundaries (int&, int&, int&, int&); void check_boundaries (int&, int&, int&, int&);
@ -230,16 +227,15 @@ class FOptiMove final
capability F_clr_bol{}; capability F_clr_bol{};
capability F_clr_eol{}; capability F_clr_eol{};
bool automatic_left_margin{false}; std::size_t screen_width{80};
bool eat_nl_glitch{false}; std::size_t screen_height{24};
char move_buf[BUF_SIZE]{'\0'};
int char_duration{1}; int char_duration{1};
int baudrate{9600}; int baudrate{9600};
int tabstop{0}; int tabstop{0};
std::size_t screen_width{80}; char move_buf[BUF_SIZE]{'\0'};
std::size_t screen_height{24}; bool automatic_left_margin{false};
bool eat_nl_glitch{false};
}; };
#pragma pack(pop)
// FOptiMove inline functions // FOptiMove inline functions
@ -328,11 +324,11 @@ inline uInt FOptiMove::getClrEolLength() const
{ return uInt(F_clr_eol.length); } { return uInt(F_clr_eol.length); }
//---------------------------------------------------------------------- //----------------------------------------------------------------------
inline void FOptiMove::set_auto_left_margin (const bool& bcap) inline void FOptiMove::set_auto_left_margin (bool bcap)
{ automatic_left_margin = bcap; } { automatic_left_margin = bcap; }
//---------------------------------------------------------------------- //----------------------------------------------------------------------
inline void FOptiMove::set_eat_newline_glitch (const bool& bcap) inline void FOptiMove::set_eat_newline_glitch (bool bcap)
{ eat_nl_glitch = bcap; } { eat_nl_glitch = bcap; }

View File

@ -44,9 +44,6 @@ namespace finalcut
// class FPoint // class FPoint
//---------------------------------------------------------------------- //----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class FPoint class FPoint
{ {
public: public:
@ -94,7 +91,6 @@ class FPoint
int xpos{0}; int xpos{0};
int ypos{0}; int ypos{0};
}; };
#pragma pack(pop)
// FPoint inline functions // FPoint inline functions

View File

@ -61,9 +61,6 @@ namespace finalcut
// class FProgressbar // class FProgressbar
//---------------------------------------------------------------------- //----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class FProgressbar : public FWidget class FProgressbar : public FWidget
{ {
public: public:
@ -110,7 +107,6 @@ class FProgressbar : public FWidget
std::size_t percentage{NOT_SET}; std::size_t percentage{NOT_SET};
std::size_t bar_length{getWidth()}; std::size_t bar_length{getWidth()};
}; };
#pragma pack(pop)
// FProgressbar inline functions // FProgressbar inline functions

View File

@ -66,9 +66,6 @@ namespace finalcut
// class FRadioButton // class FRadioButton
//---------------------------------------------------------------------- //----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class FRadioButton : public FToggleButton class FRadioButton : public FToggleButton
{ {
public: public:
@ -96,7 +93,6 @@ class FRadioButton : public FToggleButton
void drawChecked(); void drawChecked();
void drawUnchecked(); void drawUnchecked();
}; };
#pragma pack(pop)
// FRadioButton inline functions // FRadioButton inline functions

View File

@ -66,9 +66,6 @@ namespace finalcut
// class FRadioMenuItem // class FRadioMenuItem
//---------------------------------------------------------------------- //----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class FRadioMenuItem : public FMenuItem class FRadioMenuItem : public FMenuItem
{ {
public: public:
@ -94,8 +91,6 @@ class FRadioMenuItem : public FMenuItem
void processToggle(); void processToggle();
void processClicked() override; void processClicked() override;
}; };
#pragma pack(pop)
// FRadioMenuItem inline functions // FRadioMenuItem inline functions
//---------------------------------------------------------------------- //----------------------------------------------------------------------

View File

@ -52,9 +52,6 @@ class FSize;
// class FRect // class FRect
//---------------------------------------------------------------------- //----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class FRect class FRect
{ {
public: public:
@ -144,8 +141,6 @@ class FRect
int X2{-1}; int X2{-1};
int Y2{-1}; int Y2{-1};
}; };
#pragma pack(pop)
// FRect inline functions // FRect inline functions
//---------------------------------------------------------------------- //----------------------------------------------------------------------

View File

@ -61,9 +61,6 @@ namespace finalcut
// class FScrollbar // class FScrollbar
//---------------------------------------------------------------------- //----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class FScrollbar : public FWidget class FScrollbar : public FWidget
{ {
public: public:
@ -144,27 +141,25 @@ class FScrollbar : public FWidget
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};
int repeat_time{10}; int repeat_time{10};
int slider_click_pos{-1}; int slider_click_pos{-1};
int slider_click_stop_pos{-1}; int slider_click_stop_pos{-1};
int current_slider_pos{-1}; int current_slider_pos{-1};
int slider_pos{0}; int slider_pos{0};
std::size_t slider_length{18}; // = bar_length std::size_t slider_length{18}; // = bar_length
std::size_t bar_length{18}; // = length - 2 std::size_t bar_length{18}; // = length - 2
int val{0}; int val{0};
int min{0}; int min{0};
int max{99}; int max{99};
double steps{1}; int pagesize{0};
int pagesize{0}; double steps{1};
std::size_t length{20}; std::size_t length{20};
fc::orientation bar_orientation{fc::vertical}; fc::orientation bar_orientation{fc::vertical};
int max_color{getMaxColor()}; int max_color{getMaxColor()};
}; };
#pragma pack(pop)
// FScrollbar inline functions // FScrollbar inline functions
//---------------------------------------------------------------------- //----------------------------------------------------------------------

View File

@ -65,9 +65,6 @@ namespace finalcut
// class FScrollView // class FScrollView
//---------------------------------------------------------------------- //----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class FScrollView : public FWidget class FScrollView : public FWidget
{ {
public: public:
@ -194,8 +191,6 @@ class FScrollView : public FWidget
fc::scrollBarMode vMode{fc::Auto}; // fc:Auto, fc::Hidden or fc::Scroll fc::scrollBarMode vMode{fc::Auto}; // fc:Auto, fc::Hidden or fc::Scroll
fc::scrollBarMode hMode{fc::Auto}; fc::scrollBarMode hMode{fc::Auto};
}; };
#pragma pack(pop)
// FScrollView inline functions // FScrollView inline functions
//---------------------------------------------------------------------- //----------------------------------------------------------------------

View File

@ -47,9 +47,6 @@ namespace finalcut
// class FSize // class FSize
//---------------------------------------------------------------------- //----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class FSize class FSize
{ {
public: public:
@ -102,8 +99,6 @@ class FSize
std::size_t width{0}; std::size_t width{0};
std::size_t height{0}; std::size_t height{0};
}; };
#pragma pack(pop)
// FSize inline functions // FSize inline functions
//---------------------------------------------------------------------- //----------------------------------------------------------------------

View File

@ -42,9 +42,6 @@ namespace finalcut
// class FStartOptions // class FStartOptions
//---------------------------------------------------------------------- //----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
struct FStartOptions struct FStartOptions
{ {
public: public:
@ -86,7 +83,6 @@ struct FStartOptions
uInt8 : 7; // padding bits uInt8 : 7; // padding bits
#endif #endif
}; };
#pragma pack(pop)
static struct FStartOptions start_options{}; static struct FStartOptions start_options{};

View File

@ -74,9 +74,6 @@ class FStatusBar;
// class FStatusKey // class FStatusKey
//---------------------------------------------------------------------- //----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class FStatusKey : public FWidget class FStatusKey : public FWidget
{ {
public: public:
@ -125,13 +122,12 @@ class FStatusKey : public FWidget
friend class FStatusBar; friend class FStatusBar;
// Data members // Data members
FKey key{0};
FString text{}; FString text{};
FStatusBar* bar{nullptr};
FKey key{0};
bool active{false}; bool active{false};
bool mouse_focus{false}; bool mouse_focus{false};
FStatusBar* bar{nullptr};
}; };
#pragma pack(pop)
// FStatusKey inline functions // FStatusKey inline functions
@ -188,9 +184,6 @@ inline void FStatusKey::setConnectedStatusbar (FStatusBar* sb)
// class FStatusBar // class FStatusBar
//---------------------------------------------------------------------- //----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class FStatusBar : public FWindow class FStatusBar : public FWindow
{ {
public: public:
@ -253,13 +246,12 @@ class FStatusBar : public FWindow
// Data members // Data members
keyList key_list{}; keyList key_list{};
FString text{""}; FString text{""};
bool mouse_down{};
std::size_t screenWidth{80}; std::size_t screenWidth{80};
int keyname_len{0}; int keyname_len{0};
int x{-1}; int x{-1};
int x_msg{-1}; int x_msg{-1};
bool mouse_down{};
}; };
#pragma pack(pop)
// FStatusBar inline functions // FStatusBar inline functions

View File

@ -74,9 +74,6 @@ typedef std::vector<FString> FStringList;
// class FString // class FString
//---------------------------------------------------------------------- //----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class FString class FString
{ {
public: public:
@ -280,7 +277,7 @@ class FString
std::size_t bufsize{0}; std::size_t bufsize{0};
mutable char* c_string{nullptr}; mutable char* c_string{nullptr};
}; };
#pragma pack(pop)
// FString inline functions // FString inline functions
//---------------------------------------------------------------------- //----------------------------------------------------------------------

View File

@ -66,9 +66,6 @@ namespace finalcut
// class FSwitch // class FSwitch
//---------------------------------------------------------------------- //----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class FSwitch : public FToggleButton class FSwitch : public FToggleButton
{ {
public: public:
@ -107,8 +104,6 @@ class FSwitch : public FToggleButton
std::size_t switch_offset_pos{0}; std::size_t switch_offset_pos{0};
bool button_pressed{false}; bool button_pressed{false};
}; };
#pragma pack(pop)
// FSwitch inline functions // FSwitch inline functions
//---------------------------------------------------------------------- //----------------------------------------------------------------------

View File

@ -45,9 +45,6 @@ namespace finalcut
// class FSystem // class FSystem
//---------------------------------------------------------------------- //----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class FSystem class FSystem
{ {
public: public:
@ -74,7 +71,6 @@ class FSystem
, size_t, struct passwd**) = 0; , size_t, struct passwd**) = 0;
virtual char* realpath (const char*, char*) = 0; virtual char* realpath (const char*, char*) = 0;
}; };
#pragma pack(pop)
} // namespace finalcut } // namespace finalcut

View File

@ -82,9 +82,6 @@ namespace finalcut
// class FSystemImpl // class FSystemImpl
//---------------------------------------------------------------------- //----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class FSystemImpl : public FSystem class FSystemImpl : public FSystem
{ {
public: public:
@ -210,7 +207,6 @@ class FSystemImpl : public FSystem
return ::realpath(path, resolved_path); return ::realpath(path, resolved_path);
} }
}; };
#pragma pack(pop)
} // namespace finalcut } // namespace finalcut

View File

@ -149,9 +149,6 @@ class FTermXTerminal;
// class FTerm // class FTerm
//---------------------------------------------------------------------- //----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class FTerm final class FTerm final
{ {
public: public:
@ -388,7 +385,6 @@ class FTerm final
#endif #endif
}; };
#pragma pack(pop)
// FTerm inline functions // FTerm inline functions
//---------------------------------------------------------------------- //----------------------------------------------------------------------

View File

@ -49,9 +49,6 @@ class FColorPair;
// class FTermBuffer // class FTermBuffer
//---------------------------------------------------------------------- //----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class FTermBuffer class FTermBuffer
{ {
public: public:
@ -94,7 +91,6 @@ class FTermBuffer
private: private:
charDataVector data{}; charDataVector data{};
}; };
#pragma pack(pop)
// FTermBuffer inline functions // FTermBuffer inline functions

View File

@ -71,8 +71,6 @@ class FTermDetection;
//---------------------------------------------------------------------- //----------------------------------------------------------------------
// class FTermcap // class FTermcap
//---------------------------------------------------------------------- //----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class FTermcap final class FTermcap final
{ {
@ -126,7 +124,7 @@ class FTermcap final
static FTermData* fterm_data; static FTermData* fterm_data;
static FTermDetection* term_detection; static FTermDetection* term_detection;
}; };
#pragma pack(pop)
// FTermcap inline functions // FTermcap inline functions
//---------------------------------------------------------------------- //----------------------------------------------------------------------

View File

@ -46,9 +46,6 @@ class FTermDetection;
// class FTermcapsQuirks // class FTermcapsQuirks
//---------------------------------------------------------------------- //----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class FTermcapQuirks final class FTermcapQuirks final
{ {
public: public:
@ -85,7 +82,6 @@ class FTermcapQuirks final
static FTermData* fterm_data; static FTermData* fterm_data;
static FTermDetection* term_detection; static FTermDetection* term_detection;
}; };
#pragma pack(pop)
// FTermcapQuirks inline functions // FTermcapQuirks inline functions
//---------------------------------------------------------------------- //----------------------------------------------------------------------

View File

@ -50,9 +50,6 @@ namespace finalcut
// class FTermData // class FTermData
//---------------------------------------------------------------------- //----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class FTermData final class FTermData final
{ {
public: public:
@ -131,10 +128,19 @@ class FTermData final
// Data members // Data members
encodingMap encoding_list{}; encodingMap encoding_list{};
charSubstitution char_substitution_map{}; charSubstitution char_substitution_map{};
fc::encoding term_encoding{fc::UNKNOWN};
FRect term_geometry{}; // current terminal geometry FRect term_geometry{}; // current terminal geometry
FString xterm_font{};
FString xterm_title{};
fc::encoding term_encoding{fc::UNKNOWN};
int fd_tty{-1}; // Teletype (tty) file descriptor is still undefined int fd_tty{-1}; // Teletype (tty) file descriptor is still undefined
#if DEBUG
int framebuffer_bpp{-1};
#endif
uInt baudrate{0}; uInt baudrate{0};
char termtype[256]{'\0'};
char termfilename[256]{'\0'};
bool shadow_character{true}; bool shadow_character{true};
bool half_block_character{true}; bool half_block_character{true};
bool cursor_optimisation{true}; bool cursor_optimisation{true};
@ -148,15 +154,7 @@ class FTermData final
bool vga_font{false}; bool vga_font{false};
bool monochron{false}; bool monochron{false};
bool resize_term{false}; bool resize_term{false};
char termtype[256]{'\0'};
char termfilename[256]{'\0'};
FString xterm_font{};
FString xterm_title{};
#if DEBUG
int framebuffer_bpp{-1};
#endif
}; };
#pragma pack(pop)
// FTermData inline functions // FTermData inline functions
//---------------------------------------------------------------------- //----------------------------------------------------------------------

View File

@ -48,9 +48,6 @@ namespace finalcut
// class FTermDetection // class FTermDetection
//---------------------------------------------------------------------- //----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class FTermDetection final class FTermDetection final
{ {
public: public:
@ -166,7 +163,7 @@ class FTermDetection final
static bool get256colorEnvString(); static bool get256colorEnvString();
static char* termtype_256color_quirks(); static char* termtype_256color_quirks();
static char* determineMaxColor (char[]); static char* determineMaxColor (char[]);
static const FString getXTermColorName (int); static const FString getXTermColorName (FColor);
static char* parseAnswerbackMsg (char[]); static char* parseAnswerbackMsg (char[]);
static const FString getAnswerbackMsg(); static const FString getAnswerbackMsg();
static char* parseSecDA (char[]); static char* parseSecDA (char[]);
@ -222,7 +219,6 @@ class FTermDetection final
int terminal_id_hardware{-1}; int terminal_id_hardware{-1};
} secondary_da; } secondary_da;
}; };
#pragma pack(pop)
// FTermDetection inline functions // FTermDetection inline functions
//---------------------------------------------------------------------- //----------------------------------------------------------------------

View File

@ -76,9 +76,6 @@ class FTermData;
// class FTermFreeBSD // class FTermFreeBSD
//---------------------------------------------------------------------- //----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class FTermFreeBSD final class FTermFreeBSD final
{ {
public: public:
@ -134,7 +131,7 @@ class FTermFreeBSD final
static FSystem* fsystem; static FSystem* fsystem;
static FTermData* fterm_data; static FTermData* fterm_data;
}; };
#pragma pack(pop)
// FTermFreeBSD inline functions // FTermFreeBSD inline functions
//---------------------------------------------------------------------- //----------------------------------------------------------------------

View File

@ -47,9 +47,6 @@ namespace finalcut
// class FTermios // class FTermios
//---------------------------------------------------------------------- //----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class FTermios final class FTermios final
{ {
public: public:
@ -92,7 +89,7 @@ class FTermios final
static bool raw_mode; static bool raw_mode;
static struct termios term_init; static struct termios term_init;
}; };
#pragma pack(pop)
// FTermios inline functions // FTermios inline functions
//---------------------------------------------------------------------- //----------------------------------------------------------------------

View File

@ -66,9 +66,6 @@ class FTermDetection;
// class FTermLinux // class FTermLinux
//---------------------------------------------------------------------- //----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class FTermLinux final class FTermLinux final
{ {
public: public:
@ -193,7 +190,7 @@ class FTermLinux final
static int framebuffer_bpp; static int framebuffer_bpp;
#endif // defined(__linux__) #endif // defined(__linux__)
}; };
#pragma pack(pop)
// FTermLinux inline functions // FTermLinux inline functions
//---------------------------------------------------------------------- //----------------------------------------------------------------------

View File

@ -71,9 +71,6 @@ class FSystem;
// class FTermOpenBSD // class FTermOpenBSD
//---------------------------------------------------------------------- //----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class FTermOpenBSD final class FTermOpenBSD final
{ {
public: public:
@ -119,7 +116,7 @@ class FTermOpenBSD final
static FSystem* fsystem; static FSystem* fsystem;
#endif // defined(__NetBSD__) || defined(__OpenBSD__) || defined(UNIT_TEST) #endif // defined(__NetBSD__) || defined(__OpenBSD__) || defined(UNIT_TEST)
}; };
#pragma pack(pop)
// FTermOpenBSD inline functions // FTermOpenBSD inline functions
//---------------------------------------------------------------------- //----------------------------------------------------------------------

View File

@ -47,9 +47,6 @@ class FTermDetection;
// class FTermXTerminal // class FTermXTerminal
//---------------------------------------------------------------------- //----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class FTermXTerminal final class FTermXTerminal final
{ {
public: public:
@ -156,7 +153,7 @@ class FTermXTerminal final
static FTermDetection* term_detection; static FTermDetection* term_detection;
static fc::xtermCursorStyle cursor_style; static fc::xtermCursorStyle cursor_style;
}; };
#pragma pack(pop)
// FTermXTerminal inline functions // FTermXTerminal inline functions
//---------------------------------------------------------------------- //----------------------------------------------------------------------

View File

@ -67,9 +67,6 @@ class FString;
// class FTextView // class FTextView
//---------------------------------------------------------------------- //----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class FTextView : public FWidget class FTextView : public FWidget
{ {
public: public:
@ -167,8 +164,6 @@ class FTextView : public FWidget
int nf_offset{0}; int nf_offset{0};
std::size_t maxLineWidth{0}; std::size_t maxLineWidth{0};
}; };
#pragma pack(pop)
// FListBox inline functions // FListBox inline functions
//---------------------------------------------------------------------- //----------------------------------------------------------------------

View File

@ -64,9 +64,6 @@ class FButtonGroup;
// class FToggleButton - abstract class for FRadioButton, FCheckBox, ... // class FToggleButton - abstract class for FRadioButton, FCheckBox, ...
//---------------------------------------------------------------------- //----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class FToggleButton : public FWidget class FToggleButton : public FWidget
{ {
public: public:
@ -167,8 +164,6 @@ class FToggleButton : public FWidget
bool focus_inside_group{true}; bool focus_inside_group{true};
bool checked{false}; bool checked{false};
}; };
#pragma pack(pop)
// FRadioButton inline functions // FRadioButton inline functions
//---------------------------------------------------------------------- //----------------------------------------------------------------------

View File

@ -68,9 +68,6 @@ namespace finalcut
// class FToolTip // class FToolTip
//---------------------------------------------------------------------- //----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class FToolTip : public FWindow class FToolTip : public FWindow
{ {
public: public:
@ -115,7 +112,6 @@ class FToolTip : public FWindow
std::size_t max_line_width{0}; std::size_t max_line_width{0};
std::size_t text_num_lines{0}; std::size_t text_num_lines{0};
}; };
#pragma pack(pop)
// FToolTip inline functions // FToolTip inline functions

View File

@ -106,9 +106,6 @@ struct getPrecision
typedef std::unordered_map<wchar_t, wchar_t> charSubstitution; typedef std::unordered_map<wchar_t, wchar_t> charSubstitution;
#pragma pack(push)
#pragma pack(1)
typedef struct typedef struct
{ {
wchar_t code; // character code wchar_t code; // character code
@ -118,7 +115,7 @@ typedef struct
union attribute union attribute
{ {
struct alignas(4) struct
{ {
// Attribute byte #0 // Attribute byte #0
uInt8 bold : 1; // bold uInt8 bold : 1; // bold
@ -142,17 +139,17 @@ typedef struct
uInt8 no_changes : 1; // no changes required uInt8 no_changes : 1; // no changes required
uInt8 printed : 1; // is printed to VTerm uInt8 printed : 1; // is printed to VTerm
uInt8 : 6; // padding bits uInt8 : 6; // padding bits
// Attribute byte #3
uInt8 : 8; // padding byte
} bit; } bit;
alignas(4) uInt8 byte[3]; uInt8 byte[4];
} attr; } attr;
} charData; } charData;
#pragma pack(pop)
namespace fc namespace fc
{ {
#pragma pack(push)
#pragma pack(1)
typedef struct typedef struct
{ {
FKey num; FKey num;
@ -174,7 +171,6 @@ typedef struct
char string[25]; char string[25];
} }
keyname; keyname;
#pragma pack(pop)
} // namespace fc } // namespace fc

View File

@ -82,9 +82,6 @@ class FWidget;
// class FVTerm // class FVTerm
//---------------------------------------------------------------------- //----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class FVTerm class FVTerm
{ {
public: public:
@ -492,16 +489,12 @@ class FVTerm
static uInt cursor_address_length; static uInt cursor_address_length;
}; };
#pragma pack(pop)
//---------------------------------------------------------------------- //----------------------------------------------------------------------
// struct FVTerm::term_area // struct FVTerm::term_area
//---------------------------------------------------------------------- //----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
struct FVTerm::term_area // define virtual terminal character properties struct FVTerm::term_area // define virtual terminal character properties
{ {
public: public:
@ -533,7 +526,6 @@ struct FVTerm::term_area // define virtual terminal character properties
bool has_changes{false}; bool has_changes{false};
bool visible{false}; bool visible{false};
}; };
#pragma pack(pop)
// FVTerm inline functions // FVTerm inline functions

View File

@ -128,9 +128,6 @@ class FWidgetColors;
// class FWidget // class FWidget
//---------------------------------------------------------------------- //----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class FWidget : public FVTerm, public FObject class FWidget : public FVTerm, public FObject
{ {
public: public:
@ -140,7 +137,7 @@ class FWidget : public FVTerm, public FObject
struct accelerator struct accelerator
{ {
FKey key; alignas(8) FKey key;
FWidget* object; FWidget* object;
}; };
@ -525,7 +522,6 @@ class FWidget : public FVTerm, public FObject
friend class FScrollView; friend class FScrollView;
}; };
#pragma pack(pop)
// non-member function forward declarations // non-member function forward declarations
//---------------------------------------------------------------------- //----------------------------------------------------------------------

View File

@ -44,9 +44,6 @@ namespace finalcut
// class FWidgetColors // class FWidgetColors
//---------------------------------------------------------------------- //----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class FWidgetColors final class FWidgetColors final
{ {
public: public:
@ -140,7 +137,6 @@ class FWidgetColors final
FColor progressbar_fg{fc::Default}; FColor progressbar_fg{fc::Default};
FColor progressbar_bg{fc::Default}; FColor progressbar_bg{fc::Default};
}; };
#pragma pack(pop)
} // namespace finalcut } // namespace finalcut

View File

@ -69,9 +69,6 @@ namespace finalcut
// class FWindow // class FWindow
//---------------------------------------------------------------------- //----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class FWindow : public FWidget class FWindow : public FWidget
{ {
public: public:
@ -101,7 +98,7 @@ class FWindow : public FWidget
bool setWindowWidget(); bool setWindowWidget();
bool unsetWindowWidget(); bool unsetWindowWidget();
static void setActiveWindow (FWindow*); static void setActiveWindow (FWindow*);
void setWindowFocusWidget (const FWidget*); void setWindowFocusWidget (FWidget*);
bool activateWindow (bool); bool activateWindow (bool);
bool activateWindow(); bool activateWindow();
void unsetActiveWindow(); void unsetActiveWindow();
@ -175,13 +172,12 @@ class FWindow : public FWidget
static void processAlwaysOnTop(); static void processAlwaysOnTop();
// Data members // Data members
bool window_active{false};
bool zoomed{false};
FWidget* win_focus_widget{nullptr}; FWidget* win_focus_widget{nullptr};
FRect normalGeometry{}; FRect normalGeometry{};
static FWindow* previous_window; static FWindow* previous_window;
bool window_active{false};
bool zoomed{false};
}; };
#pragma pack(pop)
// FWindow inline functions // FWindow inline functions

View File

@ -29,7 +29,7 @@ endif
all: $(OBJS) all: $(OBJS)
debug: debug:
$(MAKE) $(MAKEFILE) DEBUG="-g -D DEBUG -DUNIT_TEST -Wall -Wextra -Wpedantic -Wpadded -Wno-c++98-compat -Wno-c++98-compat-pedantic -Wno-implicit-fallthrough" $(MAKE) $(MAKEFILE) DEBUG="-g -D DEBUG -DUNIT_TEST -Wall -Wextra -Wpedantic -Wno-padded -Wno-c++98-compat -Wno-c++98-compat-pedantic -Wno-implicit-fallthrough"
check: test check: test
test: debug test: debug

View File

@ -43,9 +43,6 @@ namespace test
// class ConEmu // class ConEmu
//---------------------------------------------------------------------- //----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class ConEmu class ConEmu
{ {
public: public:
@ -142,7 +139,6 @@ class ConEmu
static bool* shared_state; static bool* shared_state;
static char* colorname[]; static char* colorname[];
}; };
#pragma pack(pop)
// static class attributes // static class attributes
bool* ConEmu::shared_state = nullptr; bool* ConEmu::shared_state = nullptr;

View File

@ -36,9 +36,6 @@
// class FColorPairTest // class FColorPairTest
//---------------------------------------------------------------------- //----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class FColorPairTest : public CPPUNIT_NS::TestFixture class FColorPairTest : public CPPUNIT_NS::TestFixture
{ {
public: public:
@ -68,7 +65,7 @@ class FColorPairTest : public CPPUNIT_NS::TestFixture
// End of test suite definition // End of test suite definition
CPPUNIT_TEST_SUITE_END(); CPPUNIT_TEST_SUITE_END();
}; };
#pragma pack(pop)
//---------------------------------------------------------------------- //----------------------------------------------------------------------
void FColorPairTest::classNameTest() void FColorPairTest::classNameTest()

View File

@ -34,8 +34,6 @@
namespace test namespace test
{ {
#pragma pack(push)
#pragma pack(1)
typedef struct typedef struct
{ {
int num; int num;
@ -43,7 +41,6 @@ typedef struct
char tname[4]; char tname[4];
} }
fkeymap; fkeymap;
#pragma pack(pop)
fkeymap Fkey[] = fkeymap Fkey[] =
{ {
@ -227,9 +224,6 @@ fkeymap Fkey[] =
// class FKeyboardTest // class FKeyboardTest
//---------------------------------------------------------------------- //----------------------------------------------------------------------
#pragma pack(push)
#pragma pack(1)
class FKeyboardTest : public CPPUNIT_NS::TestFixture class FKeyboardTest : public CPPUNIT_NS::TestFixture
{ {
public: public:
@ -282,7 +276,6 @@ class FKeyboardTest : public CPPUNIT_NS::TestFixture
int number_of_keys{0}; int number_of_keys{0};
finalcut::FKeyboard* keyboard{nullptr}; finalcut::FKeyboard* keyboard{nullptr};
}; };
#pragma pack(pop)
//---------------------------------------------------------------------- //----------------------------------------------------------------------
FKeyboardTest::FKeyboardTest() FKeyboardTest::FKeyboardTest()

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