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

@ -381,9 +381,9 @@ void Calc::drawDispay()
} }
else else
{ {
wchar_t vertical_and_right = wchar_t(finalcut::fc::BoxDrawingsVerticalAndRight); wchar_t vertical_and_right = wchar_t(finalcut::fc::BoxDrawingsVerticalAndRight);
wchar_t horizontal = wchar_t(finalcut::fc::BoxDrawingsHorizontal); wchar_t horizontal = wchar_t(finalcut::fc::BoxDrawingsHorizontal);
wchar_t vertical_and_left = wchar_t(finalcut::fc::BoxDrawingsVerticalAndLeft); wchar_t vertical_and_left = wchar_t(finalcut::fc::BoxDrawingsVerticalAndLeft);
finalcut::FString separator = finalcut::FString(vertical_and_right) finalcut::FString separator = finalcut::FString(vertical_and_right)
+ finalcut::FString(35, horizontal) + finalcut::FString(35, horizontal)
+ finalcut::FString(vertical_and_left); + finalcut::FString(vertical_and_left);
@ -416,7 +416,6 @@ void Calc::zero (lDouble&)
input += '0'; input += '0';
else else
input = '0'; input = '0';
} }
//---------------------------------------------------------------------- //----------------------------------------------------------------------
@ -550,8 +549,8 @@ void Calc::subtract (lDouble&)
//---------------------------------------------------------------------- //----------------------------------------------------------------------
void Calc::multiply (lDouble&) void Calc::multiply (lDouble&)
{ {
if ( ! isOperatorKey(last_key) ) if ( ! isOperatorKey(last_key) )
calcInfixOperator(); calcInfixOperator();
setDisplay(a); setDisplay(a);
setInfixOperator('*'); setInfixOperator('*');
@ -734,7 +733,7 @@ void Calc::arcus (lDouble& x)
//---------------------------------------------------------------------- //----------------------------------------------------------------------
void Calc::sine (lDouble& x) void Calc::sine (lDouble& x)
{ {
if ( hyperbolic_mode ) if ( hyperbolic_mode )
{ {
if ( arcus_mode ) if ( arcus_mode )
{ {
@ -830,6 +829,7 @@ void Calc::tangent (lDouble& x)
if ( arcus_mode ) if ( arcus_mode )
x = std::atan(x) * 180.0L / PI; x = std::atan(x) * 180.0L / PI;
else else
{
// Test if (x / 180) != 0 and x / 90 == 0 // Test if (x / 180) != 0 and x / 90 == 0
if ( std::fabs(std::fmod(x, 180.0L)) > LDBL_EPSILON if ( std::fabs(std::fmod(x, 180.0L)) > LDBL_EPSILON
&& std::fabs(std::fmod(x, 90.0L)) < LDBL_EPSILON ) && std::fabs(std::fmod(x, 90.0L)) < LDBL_EPSILON )
@ -838,6 +838,7 @@ void Calc::tangent (lDouble& x)
x = 0.0L; x = 0.0L;
else else
x = std::tan(x * PI / 180.0L); x = std::tan(x * PI / 180.0L);
}
} }
if ( errno == EDOM ) if ( errno == EDOM )

View File

@ -131,7 +131,8 @@ void CheckList::populate()
{ {
const finalcut::FStringList line (&list[i][0], &list[i][0] + 2); const finalcut::FStringList line (&list[i][0], &list[i][0] + 2);
finalcut::FObject::FObjectIterator iter = listView.insert (line); 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); item->setCheckable(true);
} }
} }
@ -167,10 +168,12 @@ void CheckList::cb_showList (finalcut::FWidget*, data_ptr)
while ( iter != listView.endOfList() ) 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() ) 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; ++iter;
} }

View File

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

View File

@ -35,7 +35,7 @@ static finalcut::FString* temp_str = 0;
// Function prototypes // Function prototypes
void doubleToItem ( finalcut::FListBoxItem& void doubleToItem ( finalcut::FListBoxItem&
, finalcut::FWidget::data_ptr container , finalcut::FWidget::data_ptr container
, int index) ; , int index);
finalcut::FString& doubleToString (std::list<double>::const_iterator iter); finalcut::FString& doubleToString (std::list<double>::const_iterator iter);
finalcut::FString& mapToString ( std::map<finalcut::FString finalcut::FString& mapToString ( std::map<finalcut::FString
, finalcut::FString>::const_iterator iter ); , finalcut::FString>::const_iterator iter );

View File

@ -372,7 +372,7 @@ MouseDraw::MouseDraw (finalcut::FWidget* parent)
brush.setPos (1, 12); brush.setPos (1, 12);
finalcut::FPoint no_shadow(0,0); finalcut::FPoint no_shadow(0, 0);
finalcut::FRect scroll_geometry(0, 0, 1, 1); finalcut::FRect scroll_geometry(0, 0, 1, 1);
createArea (scroll_geometry, no_shadow, canvas); createArea (scroll_geometry, no_shadow, canvas);
} }
@ -382,12 +382,13 @@ 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; int old_w, old_h;
finalcut::FDialog::setGeometry (x, y, w, h, adjust); finalcut::FDialog::setGeometry (x, y, w, h, adjust);
finalcut::FPoint no_shadow(0, 0);
finalcut::FPoint no_shadow(0,0);
finalcut::FRect scroll_geometry (0, 0, w - 11, h - 3); finalcut::FRect scroll_geometry (0, 0, w - 11, h - 3);
old_w = canvas->width; old_w = canvas->width;
old_h = canvas->height; old_h = canvas->height;

View File

@ -157,7 +157,7 @@ int main (int argc, char* argv[])
finalcut::FString line(std::size_t(xmax) + 1, '-'); finalcut::FString line(std::size_t(xmax) + 1, '-');
// Place the cursor in the upper left corner // Place the cursor in the upper left corner
TermApp.setTermXY(0,0); TermApp.setTermXY(0, 0);
// Reset all terminal attributes // Reset all terminal attributes
TermApp.setNormal(); TermApp.setNormal();
// Clear the screen // Clear the screen

View File

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

View File

@ -512,7 +512,8 @@ void convertToNumberExample()
try 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::ios_base::fmtflags save_flags = std::cout.flags();
std::cout << " toDouble: " << std::setprecision(11) std::cout << " toDouble: " << std::setprecision(11)
<< double_num << std::endl; << double_num << std::endl;

View File

@ -169,8 +169,10 @@ void AttribDlg::adjustSize()
y = 1; y = 1;
setGeometry(x, y, 69, 21, false); setGeometry(x, y, 69, 21, false);
next_button.setGeometry(int(getWidth()) - 13, int(getHeight()) - 4, 10, 1, false); next_button.setGeometry ( int(getWidth()) - 13, int(getHeight()) - 4
back_button.setGeometry(int(getWidth()) - 25, int(getHeight()) - 4, 10, 1, false); , 10, 1, false );
back_button.setGeometry ( int(getWidth()) - 25, int(getHeight()) - 4
, 10, 1, false );
finalcut::FDialog::adjustSize(); finalcut::FDialog::adjustSize();
} }
@ -258,7 +260,7 @@ void AttribDemo::printAltCharset()
if ( ! isMonochron() ) if ( ! isMonochron() )
setColor (wc.label_fg, wc.label_bg); setColor (wc.label_fg, wc.label_bg);
setPrintPos (1,1); setPrintPos (1, 1);
print("alternate charset: "); print("alternate charset: ");
if ( parent->bgcolor == finalcut::fc::Default ) if ( parent->bgcolor == finalcut::fc::Default )

View File

@ -59,7 +59,7 @@ Timer::Timer (finalcut::FWidget* parent)
//---------------------------------------------------------------------- //----------------------------------------------------------------------
void Timer::draw() void Timer::draw()
{ {
setPrintPos (1,1); setPrintPos (1, 1);
print() << "---------------\n" print() << "---------------\n"
<< "Press Q to quit\n" << "Press Q to quit\n"
<< "---------------\n"; << "---------------\n";

View File

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

View File

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

View File

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

View File

@ -217,12 +217,12 @@ bool FButton::setShadow (bool on)
&& getEncoding() != fc::ASCII ) && getEncoding() != fc::ASCII )
{ {
flags.shadow = true; flags.shadow = true;
setShadowSize(1,1); setShadowSize(1, 1);
} }
else else
{ {
flags.shadow = false; flags.shadow = false;
setShadowSize(0,0); setShadowSize(0, 0);
} }
return flags.shadow; return flags.shadow;
@ -665,7 +665,7 @@ inline void FButton::drawButtonTextLine (wchar_t button_text[])
, 1 + int(vcenter_offset) ); // hotkey , 1 + int(vcenter_offset) ); // hotkey
if ( ! flags.active && isMonochron() ) if ( ! flags.active && isMonochron() )
setReverse(true); // Light background setReverse(true); // Light background
if ( active_focus && (isMonochron() || getMaxColor() < 16) ) if ( active_focus && (isMonochron() || getMaxColor() < 16) )
setBold(); setBold();

View File

@ -72,7 +72,7 @@ void FCheckBox::drawCheckButton()
if ( ! isVisible() ) if ( ! isVisible() )
return; return;
setPrintPos (1,1); setPrintPos (1, 1);
setColor(); setColor();
if ( isMonochron() ) if ( isMonochron() )

View File

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

View File

@ -528,7 +528,7 @@ void FDialog::onMouseDown (FMouseEvent* ev)
&& ms.mouse_y == 1 ) && ms.mouse_y == 1 )
titlebar_click_pos.setPoint (ev->getTermX(), ev->getTermY()); titlebar_click_pos.setPoint (ev->getTermX(), ev->getTermY());
else else
titlebar_click_pos.setPoint (0,0); titlebar_click_pos.setPoint (0, 0);
// Click on titlebar menu button // Click on titlebar menu button
if ( ms.mouse_x < 4 && ms.mouse_y == 1 ) if ( ms.mouse_x < 4 && ms.mouse_y == 1 )
@ -1578,7 +1578,7 @@ void FDialog::resizeMouseDown (mouseStates& ms)
drawBorder(); drawBorder();
} }
else else
resize_click_pos.setPoint (0,0); resize_click_pos.setPoint (0, 0);
} }
//---------------------------------------------------------------------- //----------------------------------------------------------------------
@ -1622,7 +1622,7 @@ void FDialog::resizeMouseUpMove (mouseStates& ms, bool mouse_up)
if ( mouse_up ) if ( mouse_up )
{ {
// Reset the border color // Reset the border color
resize_click_pos.setPoint (0,0); resize_click_pos.setPoint (0, 0);
// redraw() is required to draw the standard (black) border // redraw() is required to draw the standard (black) border
// and client objects with ignorePadding() option. // and client objects with ignorePadding() option.
@ -1639,7 +1639,7 @@ void FDialog::cancelMouseResize()
if ( resize_click_pos.isNull() ) if ( resize_click_pos.isNull() )
return; return;
resize_click_pos.setPoint (0,0); resize_click_pos.setPoint (0, 0);
drawBorder(); drawBorder();
updateTerminal(); updateTerminal();
} }

View File

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

View File

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

View File

@ -240,12 +240,12 @@ bool FLineEdit::setShadow (bool on)
&& getEncoding() != fc::ASCII ) && getEncoding() != fc::ASCII )
{ {
flags.shadow = true; flags.shadow = true;
setShadowSize(1,1); setShadowSize(1, 1);
} }
else else
{ {
flags.shadow = false; flags.shadow = false;
setShadowSize(0,0); setShadowSize(0, 0);
} }
return flags.shadow; return flags.shadow;
@ -645,7 +645,8 @@ void FLineEdit::adjustLabel()
break; break;
case label_left: 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; break;
} }
} }
@ -853,7 +854,7 @@ inline void FLineEdit::keyBackspace()
//---------------------------------------------------------------------- //----------------------------------------------------------------------
inline void FLineEdit::keyInsert() inline void FLineEdit::keyInsert()
{ {
insert_mode = not insert_mode; insert_mode = ! insert_mode;
if ( insert_mode ) if ( insert_mode )
setInsertCursor(); setInsertCursor();

View File

@ -1564,7 +1564,7 @@ void FListBox::nextListItem (int distance)
//---------------------------------------------------------------------- //----------------------------------------------------------------------
void FListBox::scrollToX (int val) 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; std::size_t xoffset_end = max_line_width - getClientWidth() + padding_space;
if ( xoffset == val ) if ( xoffset == val )
@ -1621,7 +1621,7 @@ void FListBox::scrollLeft (int distance)
//---------------------------------------------------------------------- //----------------------------------------------------------------------
void FListBox::scrollRight (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; std::size_t xoffset_end = max_line_width - getClientWidth() + padding_space;
xoffset += distance; xoffset += distance;

View File

@ -2492,7 +2492,7 @@ void FListView::stepForward (int distance)
void FListView::stepBackward (int distance) void FListView::stepBackward (int distance)
{ {
if ( current_iter.getPosition() == 0 ) if ( current_iter.getPosition() == 0 )
return; return;
if ( current_iter.getPosition() - distance >= 0 ) if ( current_iter.getPosition() - distance >= 0 )
{ {

View File

@ -519,7 +519,7 @@ void FMenuBar::drawItems()
if ( item_list.empty() ) if ( item_list.empty() )
return; return;
setPrintPos (1,1); setPrintPos (1, 1);
if ( isMonochron() ) if ( isMonochron() )
setReverse(true); setReverse(true);

View File

@ -47,8 +47,8 @@ FMouse::FMouse()
, max_width(80) , max_width(80)
, max_height(25) , max_height(25)
, time_mousepressed() , time_mousepressed()
, zero_point(0,0) // zero point (x=0, y=0) , zero_point(0, 0) // zero point (x=0, y=0)
, mouse(0,0) // mouse click position , mouse(0, 0) // mouse click position
, new_mouse_position() , new_mouse_position()
{ {
time_mousepressed.tv_sec = 0; time_mousepressed.tv_sec = 0;
@ -1200,7 +1200,7 @@ void FMouseUrxvt::setButtonState (int btn, struct timeval* time)
FMouseControl::FMouseControl() FMouseControl::FMouseControl()
: mouse_protocol() : mouse_protocol()
, iter() , iter()
, zero_point(0,0) , zero_point(0, 0)
, use_gpm_mouse(false) , use_gpm_mouse(false)
, use_xterm_mouse(false) , use_xterm_mouse(false)
{ {
@ -1575,7 +1575,7 @@ bool FMouseControl::getGpmKeyPressed (bool)
if ( gpm_mouse ) if ( gpm_mouse )
return gpm_mouse->getGpmKeyPressed(pending); return gpm_mouse->getGpmKeyPressed(pending);
#endif // F_HAVE_LIBGPM #endif // F_HAVE_LIBGPM
return false; return false;
} }

View File

@ -794,7 +794,7 @@ inline bool FOptiAttr::unsetTermBlink (charData*& term)
if ( F_exit_blink_mode.caused_reset ) if ( F_exit_blink_mode.caused_reset )
reset(term); reset(term);
else else
term->attr.bit.blink = false; term->attr.bit.blink = false;
if ( append_sequence(F_exit_blink_mode.cap) ) if ( append_sequence(F_exit_blink_mode.cap) )
return true; return true;

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 // Set the progress bar geometry
@ -84,12 +86,12 @@ bool FProgressbar::setShadow (bool on)
&& getEncoding() != fc::ASCII ) && getEncoding() != fc::ASCII )
{ {
flags.shadow = true; flags.shadow = true;
setShadowSize(1,1); setShadowSize(1, 1);
} }
else else
{ {
flags.shadow = false; flags.shadow = false;
setShadowSize(0,0); setShadowSize(0, 0);
} }
return on; return on;
@ -193,7 +195,7 @@ void FProgressbar::drawBar()
{ {
std::size_t i = 0; std::size_t i = 0;
double length; double length;
setPrintPos (1,1); setPrintPos (1, 1);
setColor ( wc.progressbar_bg setColor ( wc.progressbar_bg
, wc.progressbar_fg ); , wc.progressbar_fg );

View File

@ -73,7 +73,7 @@ void FRadioButton::drawRadioButton()
if ( ! isVisible() ) if ( ! isVisible() )
return; return;
setPrintPos (1,1); setPrintPos (1, 1);
setColor(); setColor();
if ( isMonochron() ) if ( isMonochron() )

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 // Set the scrollbar geometry
@ -419,10 +421,12 @@ void FScrollbar::onMouseDown (FMouseEvent* ev)
if ( bar_orientation == fc::vertical ) if ( bar_orientation == fc::vertical )
slider_click_stop_pos = mouse_y - 2; slider_click_stop_pos = mouse_y - 2;
else else
{
if ( isNewFont() ) if ( isNewFont() )
slider_click_stop_pos = mouse_x - 3; slider_click_stop_pos = mouse_x - 3;
else else
slider_click_stop_pos = mouse_x - 2; slider_click_stop_pos = mouse_x - 2;
}
} }
else else
slider_click_stop_pos = -1; slider_click_stop_pos = -1;
@ -605,7 +609,7 @@ void FScrollbar::drawButtons()
if ( isNewFont() ) if ( isNewFont() )
{ {
setPrintPos (1,1); setPrintPos (1, 1);
if ( bar_orientation == fc::vertical ) if ( bar_orientation == fc::vertical )
{ {
@ -626,7 +630,7 @@ void FScrollbar::drawButtons()
} }
else else
{ {
setPrintPos (1,1); setPrintPos (1, 1);
if ( isMonochron() ) if ( isMonochron() )
setReverse(true); setReverse(true);

View File

@ -72,7 +72,7 @@ void FScrollView::setScrollWidth (std::size_t width)
if ( viewport ) if ( viewport )
{ {
FPoint no_shadow(0,0); FPoint no_shadow(0, 0);
scroll_geometry.setWidth (width); scroll_geometry.setWidth (width);
resizeArea (scroll_geometry, no_shadow, viewport); resizeArea (scroll_geometry, no_shadow, viewport);
@ -100,7 +100,7 @@ void FScrollView::setScrollHeight (std::size_t height)
if ( viewport ) if ( viewport )
{ {
FPoint no_shadow(0,0); FPoint no_shadow(0, 0);
scroll_geometry.setHeight (height); scroll_geometry.setHeight (height);
resizeArea (scroll_geometry, no_shadow, viewport); resizeArea (scroll_geometry, no_shadow, viewport);
addPreprocessingHandler addPreprocessingHandler
@ -133,7 +133,7 @@ void FScrollView::setScrollSize (std::size_t width, std::size_t height)
if ( viewport ) if ( viewport )
{ {
FPoint no_shadow(0,0); FPoint no_shadow(0, 0);
scroll_geometry.setSize (width, height); scroll_geometry.setSize (width, height);
resizeArea (scroll_geometry, no_shadow, viewport); resizeArea (scroll_geometry, no_shadow, viewport);
addPreprocessingHandler addPreprocessingHandler
@ -548,7 +548,7 @@ void FScrollView::onChildFocusIn (FFocusEvent*)
widget_geometry = focus_widget->getGeometryWithShadow(); widget_geometry = focus_widget->getGeometryWithShadow();
vp_geometry = viewport_geometry; vp_geometry = viewport_geometry;
vp_geometry.move(1,1); vp_geometry.move(1, 1);
if ( ! vp_geometry.contains(widget_geometry) ) if ( ! vp_geometry.contains(widget_geometry) )
{ {
@ -749,7 +749,7 @@ void FScrollView::init (FWidget* parent)
setBottomPadding (1 - (yoffset_end - getScrollY())); setBottomPadding (1 - (yoffset_end - getScrollY()));
setRightPadding (1 - (xoffset_end - getScrollX()) + nf_offset); setRightPadding (1 - (xoffset_end - getScrollX()) + nf_offset);
FPoint no_shadow(0,0); FPoint no_shadow(0, 0);
std::size_t w = getViewportWidth(); std::size_t w = getViewportWidth();
std::size_t h = getViewportHeight(); std::size_t h = getViewportHeight();

View File

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

View File

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

View File

@ -88,7 +88,9 @@ FToggleButton::~FToggleButton() // destructor
// public methods of FToggleButton // 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 // Set the toggle button geometry
@ -286,7 +288,7 @@ void FToggleButton::onMouseUp (FMouseEvent* ev)
} }
else else
{ {
checked = not checked; checked = ! checked;
processToggle(); processToggle();
} }
@ -332,7 +334,7 @@ void FToggleButton::onAccel (FAccelEvent* ev)
} }
else else
{ {
checked = not checked; checked = ! checked;
processToggle(); processToggle();
} }
@ -550,7 +552,7 @@ void FToggleButton::onKeyPress (FKeyEvent* ev)
} }
else else
{ {
checked = not checked; checked = ! checked;
processToggle(); processToggle();
} }
processClick(); processClick();
@ -674,7 +676,7 @@ void FToggleButton::drawText ( wchar_t LabelText[]
} }
if ( isMonochron() ) if ( isMonochron() )
setReverse(false);; setReverse(false);
} }
} // namespace finalcut } // namespace finalcut

View File

@ -98,7 +98,7 @@ FPoint FVTerm::getPrintCursor()
return FPoint ( win->offset_left + win->cursor_x return FPoint ( win->offset_left + win->cursor_x
, win->offset_top + win->cursor_y ); , win->offset_top + win->cursor_y );
return FPoint(0,0); return FPoint(0, 0);
} }
//---------------------------------------------------------------------- //----------------------------------------------------------------------
@ -184,7 +184,7 @@ void FVTerm::clearArea (int fillchar)
void FVTerm::createVTerm (const FRect& r) void FVTerm::createVTerm (const FRect& r)
{ {
// initialize virtual terminal // initialize virtual terminal
const FPoint shadow(0,0); const FPoint shadow(0, 0);
createArea (r, shadow, vterm); createArea (r, shadow, vterm);
} }
@ -198,7 +198,7 @@ void FVTerm::createVTerm (int width, int height)
//---------------------------------------------------------------------- //----------------------------------------------------------------------
void FVTerm::resizeVTerm (const FRect& r) void FVTerm::resizeVTerm (const FRect& r)
{ {
const FPoint shadow(0,0); const FPoint shadow(0, 0);
resizeArea (r, shadow, vterm); resizeArea (r, shadow, vterm);
} }
@ -2014,7 +2014,7 @@ void FVTerm::init (bool disable_alt_screen)
createVTerm (term_geometry); createVTerm (term_geometry);
// Create virtual desktop area // Create virtual desktop area
FPoint shadow_size(0,0); FPoint shadow_size(0, 0);
createArea (term_geometry, shadow_size, vdesktop); createArea (term_geometry, shadow_size, vdesktop);
vdesktop->visible = true; vdesktop->visible = true;
active_area = vdesktop; active_area = vdesktop;
@ -2191,7 +2191,7 @@ bool FVTerm::clearTerm (int fillchar)
if ( cl ) // Clear screen if ( cl ) // Clear screen
{ {
appendOutputBuffer (cl); appendOutputBuffer (cl);
term_pos->setPoint(0,0); term_pos->setPoint(0, 0);
} }
else if ( cd ) // Clear to end of screen else if ( cd ) // Clear to end of screen
{ {
@ -2209,7 +2209,7 @@ bool FVTerm::clearTerm (int fillchar)
appendOutputBuffer (cb); appendOutputBuffer (cb);
} }
setTermXY (0,0); setTermXY (0, 0);
} }
flush_out(); flush_out();

View File

@ -184,9 +184,9 @@ bool FWindow::setTransparentShadow (bool on)
flags.shadow = flags.trans_shadow = on; flags.shadow = flags.trans_shadow = on;
if ( on ) if ( on )
setShadowSize (2,1); setShadowSize (2, 1);
else else
setShadowSize (0,0); setShadowSize (0, 0);
return on; return on;
} }
@ -201,13 +201,13 @@ bool FWindow::setShadow (bool on)
{ {
flags.shadow = true; flags.shadow = true;
flags.trans_shadow = false; flags.trans_shadow = false;
setShadowSize (1,1); setShadowSize (1, 1);
} }
else else
{ {
flags.shadow = false; flags.shadow = false;
flags.trans_shadow = false; flags.trans_shadow = false;
setShadowSize (0,0); setShadowSize (0, 0);
} }
return on; return on;

View File

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

View File

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

View File

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

View File

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

View File

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