install fix with final/ftermdata.h

This commit is contained in:
Markus Gans 2018-11-20 21:11:04 +01:00
parent 801147161d
commit 167b7c97bc
39 changed files with 130 additions and 86 deletions

View File

@ -416,7 +416,6 @@ void Calc::zero (lDouble&)
input += '0';
else
input = '0';
}
//----------------------------------------------------------------------
@ -830,6 +829,7 @@ void Calc::tangent (lDouble& x)
if ( arcus_mode )
x = std::atan(x) * 180.0L / PI;
else
{
// Test if (x / 180) != 0 and x / 90 == 0
if ( std::fabs(std::fmod(x, 180.0L)) > LDBL_EPSILON
&& std::fabs(std::fmod(x, 90.0L)) < LDBL_EPSILON )
@ -839,6 +839,7 @@ void Calc::tangent (lDouble& x)
else
x = std::tan(x * PI / 180.0L);
}
}
if ( errno == EDOM )
error = true;

View File

@ -131,7 +131,8 @@ void CheckList::populate()
{
const finalcut::FStringList line (&list[i][0], &list[i][0] + 2);
finalcut::FObject::FObjectIterator iter = listView.insert (line);
finalcut::FListViewItem* item = static_cast<finalcut::FListViewItem*>(*iter);
finalcut::FListViewItem* item = \
static_cast<finalcut::FListViewItem*>(*iter);
item->setCheckable(true);
}
}
@ -167,10 +168,12 @@ void CheckList::cb_showList (finalcut::FWidget*, data_ptr)
while ( iter != listView.endOfList() )
{
const finalcut::FListViewItem* item = static_cast<finalcut::FListViewItem*>(*iter);
const finalcut::FListViewItem* item = \
static_cast<finalcut::FListViewItem*>(*iter);
if ( item->isChecked() )
shopping_list << wchar_t(finalcut::fc::Bullet) << ' ' << item->getText(1) << '\n';
shopping_list << wchar_t(finalcut::fc::Bullet) << ' '
<< item->getText(1) << '\n';
++iter;
}

View File

@ -20,6 +20,7 @@
* <http://www.gnu.org/licenses/>. *
***********************************************************************/
#include <vector>
#include <final/final.h>

View File

@ -382,11 +382,12 @@ MouseDraw::~MouseDraw()
{ }
//----------------------------------------------------------------------
void MouseDraw::setGeometry (int x, int y, std::size_t w, std::size_t h, bool adjust)
void MouseDraw::setGeometry ( int x, int y
, std::size_t w, std::size_t h
, bool adjust )
{
int old_w, old_h;
finalcut::FDialog::setGeometry (x, y, w, h, adjust);
finalcut::FPoint no_shadow(0, 0);
finalcut::FRect scroll_geometry (0, 0, w - 11, h - 3);
old_w = canvas->width;

View File

@ -84,7 +84,8 @@ Scrollview::Scrollview (finalcut::FWidget* parent)
// Sets the navigation button geometry
go_east.setGeometry (1, 1, 5, 1);
go_south.setGeometry (int(getScrollWidth()) - 5, 1, 5, 1);
go_west.setGeometry (int(getScrollWidth()) - 5, int(getScrollHeight()) - 2, 5, 1);
go_west.setGeometry ( int(getScrollWidth()) - 5
, int(getScrollHeight()) - 2, 5, 1);
go_north.setGeometry (1, int(getScrollHeight()) - 2, 5, 1);
// Add scroll function callbacks to the buttons

View File

@ -512,7 +512,8 @@ void convertToNumberExample()
try
{
const double double_num = finalcut::FString("2.7182818284590452353").toDouble();
const double double_num = \
finalcut::FString("2.7182818284590452353").toDouble();
std::ios_base::fmtflags save_flags = std::cout.flags();
std::cout << " toDouble: " << std::setprecision(11)
<< double_num << std::endl;

View File

@ -169,8 +169,10 @@ void AttribDlg::adjustSize()
y = 1;
setGeometry(x, y, 69, 21, false);
next_button.setGeometry(int(getWidth()) - 13, int(getHeight()) - 4, 10, 1, false);
back_button.setGeometry(int(getWidth()) - 25, int(getHeight()) - 4, 10, 1, false);
next_button.setGeometry ( int(getWidth()) - 13, int(getHeight()) - 4
, 10, 1, false );
back_button.setGeometry ( int(getWidth()) - 25, int(getHeight()) - 4
, 10, 1, false );
finalcut::FDialog::adjustSize();
}

View File

@ -119,6 +119,7 @@ finalcutinclude_HEADERS = \
include/final/ftermdetection.h \
include/final/ftermios.h \
include/final/fterm.h \
include/final/ftermdata.h \
include/final/fvterm.h \
include/final/ftextview.h \
include/final/ftogglebutton.h \

View File

@ -45,6 +45,7 @@ INCLUDE_HEADERS = \
fkeyboard.h \
ftermcap.h \
fterm.h \
ftermdata.h \
ftermios.h \
ftermdetection.h \
ftermcapquirks.h \

View File

@ -45,6 +45,7 @@ INCLUDE_HEADERS = \
fkeyboard.h \
ftermcap.h \
fterm.h \
ftermdata.h \
ftermios.h \
ftermdetection.h \
ftermcapquirks.h \

View File

@ -75,7 +75,7 @@ void FCheckMenuItem::processToggle()
//----------------------------------------------------------------------
void FCheckMenuItem::processClicked()
{
checked = not checked;
checked = ! checked;
processToggle();
emitCallback("clicked");
}

View File

@ -912,7 +912,7 @@ void FFileDialog::cb_processOpen (FWidget*, data_ptr)
//----------------------------------------------------------------------
void FFileDialog::cb_processShowHidden (FWidget*, data_ptr)
{
setShowHiddenFiles(not show_hidden);
setShowHiddenFiles(! show_hidden);
}
} // namespace finalcut

View File

@ -234,10 +234,9 @@ inline int FKeyboard::getTermcapKey()
if ( ! key_map )
return -1;
fc::fkeymap* keymap = reinterpret_cast<fc::fkeymap*>(key_map);
for (int i = 0; keymap[i].tname[0] != 0; i++)
for (int i = 0; key_map[i].tname[0] != 0; i++)
{
char* k = keymap[i].string;
char* k = key_map[i].string;
std::size_t len = ( k ) ? std::strlen(k) : 0;
if ( k && std::strncmp(k, fifo_buf, len) == 0 ) // found
@ -486,17 +485,17 @@ int FKeyboard::parseKeyString()
{
int keycode = getMouseProtocolKey();
if ( keycode > 0 )
if ( keycode != -1 )
return keycode;
keycode = getTermcapKey();
if ( keycode > 0 )
if ( keycode != -1 )
return keycode;
keycode = getMetaKey();
if ( keycode > 0 )
if ( keycode != -1 )
return keycode;
if ( ! isKeypressTimeout() )

View File

@ -645,7 +645,8 @@ void FLineEdit::adjustLabel()
break;
case label_left:
label->setGeometry(getX() - int(label_length) - 1, getY(), label_length, 1);
label->setGeometry(getX() - int(label_length) - 1, getY()
, label_length, 1);
break;
}
}
@ -853,7 +854,7 @@ inline void FLineEdit::keyBackspace()
//----------------------------------------------------------------------
inline void FLineEdit::keyInsert()
{
insert_mode = not insert_mode;
insert_mode = ! insert_mode;
if ( insert_mode )
setInsertCursor();

View File

@ -1564,7 +1564,7 @@ void FListBox::nextListItem (int distance)
//----------------------------------------------------------------------
void FListBox::scrollToX (int val)
{
static const std::size_t padding_space = 2; // 1 leading space + 1 trailing space
static const std::size_t padding_space = 2; // 1 leading + 1 trailing space
std::size_t xoffset_end = max_line_width - getClientWidth() + padding_space;
if ( xoffset == val )
@ -1621,7 +1621,7 @@ void FListBox::scrollLeft (int distance)
//----------------------------------------------------------------------
void FListBox::scrollRight (int distance)
{
static const std::size_t padding_space = 2; // 1 leading space + 1 trailing space
static const std::size_t padding_space = 2; // 1 leading + 1 trailing space
std::size_t xoffset_end = max_line_width - getClientWidth() + padding_space;
xoffset += distance;

View File

@ -68,7 +68,9 @@ void FProgressbar::setPercentage (std::size_t percentage_value)
}
//----------------------------------------------------------------------
void FProgressbar::setGeometry (int x, int y, std::size_t w, std::size_t h, bool adjust)
void FProgressbar::setGeometry ( int x, int y
, std::size_t w, std::size_t h
, bool adjust )
{
// Set the progress bar geometry

View File

@ -174,7 +174,9 @@ void FScrollbar::setOrientation (int o)
}
//----------------------------------------------------------------------
void FScrollbar::setGeometry (int x, int y, std::size_t w, std::size_t h, bool adjust)
void FScrollbar::setGeometry ( int x, int y
, std::size_t w, std::size_t h
, bool adjust )
{
// Set the scrollbar geometry
@ -419,11 +421,13 @@ void FScrollbar::onMouseDown (FMouseEvent* ev)
if ( bar_orientation == fc::vertical )
slider_click_stop_pos = mouse_y - 2;
else
{
if ( isNewFont() )
slider_click_stop_pos = mouse_x - 3;
else
slider_click_stop_pos = mouse_x - 2;
}
}
else
slider_click_stop_pos = -1;

View File

@ -20,6 +20,9 @@
* <http://www.gnu.org/licenses/>. *
***********************************************************************/
#include <algorithm>
#include <vector>
#include "final/ftermcap.h"
namespace finalcut
@ -339,7 +342,7 @@ FTermcap::tcap_map FTermcap::tcap[] =
// .------------- term string
// | .-------- Tcap-code
// | | // variable name -> description
//-----------------------------------------------------------------------------
//------------------------------------------------------------------------------
{ 0, "bl" }, // bell -> audible signal (bell) (P)
{ 0, "ec" }, // erase_chars -> erase #1 characters (P)
{ 0, "cl" }, // clear_screen -> clear screen and home cursor (P*)

View File

@ -20,6 +20,8 @@
* <http://www.gnu.org/licenses/>. *
***********************************************************************/
#include <map>
#include "final/ftermios.h"
#include "final/fterm.h"

View File

@ -88,7 +88,9 @@ FToggleButton::~FToggleButton() // destructor
// public methods of FToggleButton
//----------------------------------------------------------------------
void FToggleButton::setGeometry (int x, int y, std::size_t w, std::size_t h, bool adjust)
void FToggleButton::setGeometry ( int x, int y
, std::size_t w, std::size_t h
, bool adjust )
{
// Set the toggle button geometry
@ -286,7 +288,7 @@ void FToggleButton::onMouseUp (FMouseEvent* ev)
}
else
{
checked = not checked;
checked = ! checked;
processToggle();
}
@ -332,7 +334,7 @@ void FToggleButton::onAccel (FAccelEvent* ev)
}
else
{
checked = not checked;
checked = ! checked;
processToggle();
}
@ -550,7 +552,7 @@ void FToggleButton::onKeyPress (FKeyEvent* ev)
}
else
{
checked = not checked;
checked = ! checked;
processToggle();
}
processClick();
@ -674,7 +676,7 @@ void FToggleButton::drawText ( wchar_t LabelText[]
}
if ( isMonochron() )
setReverse(false);;
setReverse(false);
}
} // namespace finalcut

View File

@ -69,7 +69,7 @@ class FButton : public FWidget
public:
// Constructors
explicit FButton (FWidget* = 0);
FButton (const FString&, FWidget* = 0);
explicit FButton (const FString&, FWidget* = 0);
// Destructor
virtual ~FButton();

View File

@ -88,7 +88,7 @@ class FDialog : public FWindow
// Constructors
explicit FDialog (FWidget* = 0);
FDialog (const FString&, FWidget* = 0);
explicit FDialog (const FString&, FWidget* = 0);
// Destructor
virtual ~FDialog();

View File

@ -46,6 +46,12 @@ namespace finalcut
class FTermDebugData
{
public:
// Constructors
FTermDebugData();
// Destructor
~FTermDebugData();
// Accessors
const FString& getAnswerbackString();
const FString& getSecDAString();
@ -64,6 +70,17 @@ class FTermDebugData
FTermData* data;
};
// FTermDebugData inline functions
//----------------------------------------------------------------------
inline FTermDebugData::FTermDebugData()
: term_detection(0)
, data(0)
{ }
//----------------------------------------------------------------------
inline FTermDebugData::~FTermDebugData()
{ }
//----------------------------------------------------------------------
inline void FTermDebugData::setFTermDetection (FTermDetection* obj)
{ term_detection = obj; }

View File

@ -76,7 +76,7 @@ class FToolTip : public FWindow
public:
// Constructor
explicit FToolTip (FWidget* = 0);
FToolTip (const FString&, FWidget* = 0);
explicit FToolTip (const FString&, FWidget* = 0);
// Destructor
virtual ~FToolTip ();

View File

@ -95,6 +95,7 @@
#error "Only <final/final.h> can be included directly."
#endif
#include <utility>
#include <vector>
#include "final/fvterm.h"