install fix with final/ftermdata.h
This commit is contained in:
parent
801147161d
commit
167b7c97bc
|
@ -416,7 +416,6 @@ void Calc::zero (lDouble&)
|
||||||
input += '0';
|
input += '0';
|
||||||
else
|
else
|
||||||
input = '0';
|
input = '0';
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
|
@ -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 )
|
||||||
|
@ -839,6 +839,7 @@ void Calc::tangent (lDouble& x)
|
||||||
else
|
else
|
||||||
x = std::tan(x * PI / 180.0L);
|
x = std::tan(x * PI / 180.0L);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if ( errno == EDOM )
|
if ( errno == EDOM )
|
||||||
error = true;
|
error = true;
|
||||||
|
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
* <http://www.gnu.org/licenses/>. *
|
* <http://www.gnu.org/licenses/>. *
|
||||||
***********************************************************************/
|
***********************************************************************/
|
||||||
|
|
||||||
|
#include <vector>
|
||||||
#include <final/final.h>
|
#include <final/final.h>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -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 );
|
||||||
|
|
|
@ -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;
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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;
|
||||||
|
|
|
@ -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 )
|
||||||
|
|
|
@ -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";
|
||||||
|
|
|
@ -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 \
|
||||||
|
|
|
@ -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 \
|
||||||
|
|
|
@ -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 \
|
||||||
|
|
|
@ -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;
|
||||||
|
|
|
@ -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() )
|
||||||
|
|
|
@ -75,7 +75,7 @@ void FCheckMenuItem::processToggle()
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
void FCheckMenuItem::processClicked()
|
void FCheckMenuItem::processClicked()
|
||||||
{
|
{
|
||||||
checked = not checked;
|
checked = ! checked;
|
||||||
processToggle();
|
processToggle();
|
||||||
emitCallback("clicked");
|
emitCallback("clicked");
|
||||||
}
|
}
|
||||||
|
|
|
@ -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();
|
||||||
}
|
}
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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() )
|
||||||
|
|
|
@ -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();
|
||||||
|
|
|
@ -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;
|
||||||
|
|
||||||
|
|
|
@ -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);
|
||||||
|
|
|
@ -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)
|
||||||
{
|
{
|
||||||
|
|
|
@ -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 );
|
||||||
|
|
||||||
|
|
|
@ -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() )
|
||||||
|
|
|
@ -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,11 +421,13 @@ 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);
|
||||||
|
|
|
@ -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();
|
||||||
|
|
||||||
|
|
|
@ -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*)
|
||||||
|
|
|
@ -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"
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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();
|
||||||
|
|
|
@ -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;
|
||||||
|
|
|
@ -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();
|
||||||
|
|
|
@ -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();
|
||||||
|
|
|
@ -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; }
|
||||||
|
|
|
@ -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 ();
|
||||||
|
|
|
@ -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"
|
||||||
|
|
Loading…
Reference in New Issue