Fixed: build with gcc < 5.5
This commit is contained in:
parent
226663889b
commit
c4b799d98f
|
@ -85,7 +85,7 @@ SegmentView::SegmentView (finalcut::FWidget* parent)
|
||||||
input.setGeometry (FPoint(2, 2), FSize{12, 1});
|
input.setGeometry (FPoint(2, 2), FSize{12, 1});
|
||||||
input.setLabelText (L"&Hex value");
|
input.setLabelText (L"&Hex value");
|
||||||
input.setLabelText (L"&Hex-digits or (.) (:) (H) (L) (P) (U)");
|
input.setLabelText (L"&Hex-digits or (.) (:) (H) (L) (P) (U)");
|
||||||
input.setLabelOrientation(finalcut::FLineEdit::label_above);
|
input.setLabelOrientation(finalcut::FLineEdit::LabelOrientation::above);
|
||||||
input.setMaxLength(9);
|
input.setMaxLength(9);
|
||||||
input.setInputFilter("[:.hHlLpPuU[:xdigit:]]");
|
input.setInputFilter("[:.hHlLpPuU[:xdigit:]]");
|
||||||
|
|
||||||
|
|
|
@ -99,7 +99,7 @@ Background::Background (finalcut::FWidget* parent)
|
||||||
|
|
||||||
// Combobox
|
// Combobox
|
||||||
color_choice.setGeometry (FPoint{2, 2}, FSize{18, 1});
|
color_choice.setGeometry (FPoint{2, 2}, FSize{18, 1});
|
||||||
color_choice.setLabelOrientation (finalcut::FLineEdit::label_above);
|
color_choice.setLabelOrientation (finalcut::FLineEdit::LabelOrientation::above);
|
||||||
color_choice.setLabelText ("Color choice");
|
color_choice.setLabelText ("Color choice");
|
||||||
color_choice.unsetEditable();
|
color_choice.unsetEditable();
|
||||||
|
|
||||||
|
@ -111,19 +111,19 @@ Background::Background (finalcut::FWidget* parent)
|
||||||
|
|
||||||
// Spin boxes
|
// Spin boxes
|
||||||
red.setGeometry (FPoint{2, 5}, FSize{7, 1});
|
red.setGeometry (FPoint{2, 5}, FSize{7, 1});
|
||||||
red.setLabelOrientation (finalcut::FLineEdit::label_above);
|
red.setLabelOrientation (finalcut::FLineEdit::LabelOrientation::above);
|
||||||
red.setLabelText ("Red");
|
red.setLabelText ("Red");
|
||||||
red.setRange (0, 255);
|
red.setRange (0, 255);
|
||||||
red.setValue (0x80);
|
red.setValue (0x80);
|
||||||
|
|
||||||
green.setGeometry (FPoint{12, 5}, FSize{7, 1});
|
green.setGeometry (FPoint{12, 5}, FSize{7, 1});
|
||||||
green.setLabelOrientation (finalcut::FLineEdit::label_above);
|
green.setLabelOrientation (finalcut::FLineEdit::LabelOrientation::above);
|
||||||
green.setLabelText ("Green");
|
green.setLabelText ("Green");
|
||||||
green.setRange (0, 255);
|
green.setRange (0, 255);
|
||||||
green.setValue (0xa4);
|
green.setValue (0xa4);
|
||||||
|
|
||||||
blue.setGeometry (FPoint{22, 5}, FSize{7, 1});
|
blue.setGeometry (FPoint{22, 5}, FSize{7, 1});
|
||||||
blue.setLabelOrientation (finalcut::FLineEdit::label_above);
|
blue.setLabelOrientation (finalcut::FLineEdit::LabelOrientation::above);
|
||||||
blue.setLabelText ("Blue");
|
blue.setLabelText ("Blue");
|
||||||
blue.setRange (0, 255);
|
blue.setRange (0, 255);
|
||||||
blue.setValue (0xec);
|
blue.setValue (0xec);
|
||||||
|
|
|
@ -76,7 +76,7 @@ int main (int argc, char* argv[])
|
||||||
finalcut::FLineEdit c_field {&dgl};
|
finalcut::FLineEdit c_field {&dgl};
|
||||||
|
|
||||||
// Set input type to password
|
// Set input type to password
|
||||||
pw_field.setInputType (finalcut::FLineEdit::password);
|
pw_field.setInputType (finalcut::FLineEdit::InputType::password);
|
||||||
|
|
||||||
name_field.setLabelText (L"&Name");
|
name_field.setLabelText (L"&Name");
|
||||||
pw_field.setLabelText (L"&Password");
|
pw_field.setLabelText (L"&Password");
|
||||||
|
|
|
@ -194,9 +194,9 @@ void Listview::cb_showInMessagebox()
|
||||||
"Temperature: " + item->getText(3) + "\n"
|
"Temperature: " + item->getText(3) + "\n"
|
||||||
" Humidity: " + item->getText(4) + "\n"
|
" Humidity: " + item->getText(4) + "\n"
|
||||||
" Pressure: " + item->getText(5)
|
" Pressure: " + item->getText(5)
|
||||||
, finalcut::FMessageBox::Ok
|
, finalcut::FMessageBox::ButtonType::Ok
|
||||||
, finalcut::FMessageBox::Reject
|
, finalcut::FMessageBox::ButtonType::Reject
|
||||||
, finalcut::FMessageBox::Reject
|
, finalcut::FMessageBox::ButtonType::Reject
|
||||||
, this );
|
, this );
|
||||||
info.show();
|
info.show();
|
||||||
}
|
}
|
||||||
|
|
|
@ -809,9 +809,9 @@ void MyDialog::cb_about()
|
||||||
, line + L" FINAL CUT " + line + L"\n\n"
|
, line + L" FINAL CUT " + line + L"\n\n"
|
||||||
L"Version " + libver + L"\n\n"
|
L"Version " + libver + L"\n\n"
|
||||||
L"(c) 2020 by Markus Gans"
|
L"(c) 2020 by Markus Gans"
|
||||||
, finalcut::FMessageBox::Ok
|
, finalcut::FMessageBox::ButtonType::Ok
|
||||||
, finalcut::FMessageBox::Reject
|
, finalcut::FMessageBox::ButtonType::Reject
|
||||||
, finalcut::FMessageBox::Reject
|
, finalcut::FMessageBox::ButtonType::Reject
|
||||||
, this );
|
, this );
|
||||||
info.setCenterText();
|
info.setCenterText();
|
||||||
info.show();
|
info.show();
|
||||||
|
@ -832,9 +832,9 @@ void MyDialog::cb_terminfo()
|
||||||
<< " Size: " << x << fc::Times
|
<< " Size: " << x << fc::Times
|
||||||
<< y << "\n"
|
<< y << "\n"
|
||||||
<< "Colors: " << finalcut::FTerm::getMaxColor()
|
<< "Colors: " << finalcut::FTerm::getMaxColor()
|
||||||
, finalcut::FMessageBox::Ok
|
, finalcut::FMessageBox::ButtonType::Ok
|
||||||
, finalcut::FMessageBox::Reject
|
, finalcut::FMessageBox::ButtonType::Reject
|
||||||
, finalcut::FMessageBox::Reject
|
, finalcut::FMessageBox::ButtonType::Reject
|
||||||
, this
|
, this
|
||||||
);
|
);
|
||||||
info1.setHeadline("Terminal:");
|
info1.setHeadline("Terminal:");
|
||||||
|
@ -850,9 +850,9 @@ void MyDialog::cb_drives()
|
||||||
, "Generic: \n\n"
|
, "Generic: \n\n"
|
||||||
"Network: \n\n"
|
"Network: \n\n"
|
||||||
" CD:"
|
" CD:"
|
||||||
, finalcut::FMessageBox::Ok
|
, finalcut::FMessageBox::ButtonType::Ok
|
||||||
, finalcut::FMessageBox::Reject
|
, finalcut::FMessageBox::ButtonType::Reject
|
||||||
, finalcut::FMessageBox::Reject
|
, finalcut::FMessageBox::ButtonType::Reject
|
||||||
, this
|
, this
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -365,12 +365,14 @@ void FApplication::setKeyboardWidget (FWidget* widget)
|
||||||
void FApplication::closeConfirmationDialog (FWidget* w, FCloseEvent* ev)
|
void FApplication::closeConfirmationDialog (FWidget* w, FCloseEvent* ev)
|
||||||
{
|
{
|
||||||
internal::var::app_object->unsetMoveSizeMode();
|
internal::var::app_object->unsetMoveSizeMode();
|
||||||
const int ret = FMessageBox::info ( w, "Quit"
|
const FMessageBox::ButtonType ret = \
|
||||||
|
FMessageBox::info ( w, "Quit"
|
||||||
, "Do you really want\n"
|
, "Do you really want\n"
|
||||||
"to quit the program ?"
|
"to quit the program ?"
|
||||||
, FMessageBox::Yes
|
, FMessageBox::ButtonType::Yes
|
||||||
, FMessageBox::No );
|
, FMessageBox::ButtonType::No );
|
||||||
if ( ret == FMessageBox::Yes )
|
|
||||||
|
if ( ret == FMessageBox::ButtonType::Yes )
|
||||||
ev->accept();
|
ev->accept();
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -1265,7 +1267,7 @@ void FApplication::processCloseWidget()
|
||||||
if ( ! getWidgetCloseList() || getWidgetCloseList()->empty() )
|
if ( ! getWidgetCloseList() || getWidgetCloseList()->empty() )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
setTerminalUpdates (FVTerm::stop_terminal_updates);
|
setTerminalUpdates (FVTerm::TerminalUpdate::Stop);
|
||||||
auto iter = getWidgetCloseList()->begin();
|
auto iter = getWidgetCloseList()->begin();
|
||||||
|
|
||||||
while ( iter != getWidgetCloseList()->end() && *iter )
|
while ( iter != getWidgetCloseList()->end() && *iter )
|
||||||
|
@ -1275,7 +1277,7 @@ void FApplication::processCloseWidget()
|
||||||
}
|
}
|
||||||
|
|
||||||
getWidgetCloseList()->clear();
|
getWidgetCloseList()->clear();
|
||||||
setTerminalUpdates (FVTerm::start_terminal_updates);
|
setTerminalUpdates (FVTerm::TerminalUpdate::Start);
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
|
|
|
@ -189,9 +189,9 @@ void FDialog::hide()
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
int FDialog::exec()
|
FDialog::ResultCode FDialog::exec()
|
||||||
{
|
{
|
||||||
result_code = FDialog::Reject;
|
result_code = ResultCode::Reject;
|
||||||
show();
|
show();
|
||||||
return result_code;
|
return result_code;
|
||||||
}
|
}
|
||||||
|
@ -484,7 +484,7 @@ void FDialog::onKeyPress (FKeyEvent* ev)
|
||||||
ev->accept();
|
ev->accept();
|
||||||
|
|
||||||
if ( isModal() )
|
if ( isModal() )
|
||||||
done (FDialog::Reject);
|
done (ResultCode::Reject);
|
||||||
else
|
else
|
||||||
close();
|
close();
|
||||||
}
|
}
|
||||||
|
@ -664,7 +664,7 @@ void FDialog::onMouseDoubleClick (FMouseEvent* ev)
|
||||||
setClickedWidget(nullptr);
|
setClickedWidget(nullptr);
|
||||||
|
|
||||||
if ( isModal() )
|
if ( isModal() )
|
||||||
done (FDialog::Reject);
|
done (ResultCode::Reject);
|
||||||
else
|
else
|
||||||
close();
|
close();
|
||||||
}
|
}
|
||||||
|
@ -761,7 +761,7 @@ void FDialog::onWindowLowered (FEvent*)
|
||||||
|
|
||||||
// protected methods of FDialog
|
// protected methods of FDialog
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
void FDialog::done(int result)
|
void FDialog::done (ResultCode result)
|
||||||
{
|
{
|
||||||
hide();
|
hide();
|
||||||
result_code = result;
|
result_code = result;
|
||||||
|
@ -807,7 +807,7 @@ void FDialog::drawDialogShadow()
|
||||||
void FDialog::onClose (FCloseEvent* ev)
|
void FDialog::onClose (FCloseEvent* ev)
|
||||||
{
|
{
|
||||||
ev->accept();
|
ev->accept();
|
||||||
result_code = FDialog::Reject;
|
result_code = ResultCode::Reject;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -81,7 +81,7 @@ FString fileChooser ( FWidget* parent
|
||||||
, type
|
, type
|
||||||
, parent );
|
, parent );
|
||||||
|
|
||||||
if ( fileopen.exec() == FDialog::Accept )
|
if ( fileopen.exec() == FDialog::ResultCode::Accept )
|
||||||
ret = fileopen.getPath() + fileopen.getSelectedFile();
|
ret = fileopen.getPath() + fileopen.getSelectedFile();
|
||||||
else
|
else
|
||||||
ret = FString{};
|
ret = FString{};
|
||||||
|
@ -261,7 +261,7 @@ FString FFileDialog::fileOpenChooser ( FWidget* parent
|
||||||
, const FString& dirname
|
, const FString& dirname
|
||||||
, const FString& filter )
|
, const FString& filter )
|
||||||
{
|
{
|
||||||
return fileChooser (parent, dirname, filter, FFileDialog::Open);
|
return fileChooser (parent, dirname, filter, DialogType::Open);
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
|
@ -269,7 +269,7 @@ FString FFileDialog::fileSaveChooser ( FWidget* parent
|
||||||
, const FString& dirname
|
, const FString& dirname
|
||||||
, const FString& filter )
|
, const FString& filter )
|
||||||
{
|
{
|
||||||
return fileChooser (parent, dirname, filter, FFileDialog::Save);
|
return fileChooser (parent, dirname, filter, DialogType::Save);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -334,7 +334,7 @@ void FFileDialog::init()
|
||||||
else
|
else
|
||||||
x = y = 1;
|
x = y = 1;
|
||||||
|
|
||||||
if ( dlg_type == FFileDialog::Save )
|
if ( dlg_type == DialogType::Save )
|
||||||
FDialog::setText("Save file");
|
FDialog::setText("Save file");
|
||||||
else
|
else
|
||||||
FDialog::setText("Open file");
|
FDialog::setText("Open file");
|
||||||
|
@ -362,7 +362,7 @@ inline void FFileDialog::widgetSettings (const FPoint& pos)
|
||||||
cancel_btn.setText ("&Cancel");
|
cancel_btn.setText ("&Cancel");
|
||||||
cancel_btn.setGeometry(FPoint{19, 10}, FSize{9, 1});
|
cancel_btn.setGeometry(FPoint{19, 10}, FSize{9, 1});
|
||||||
|
|
||||||
if ( dlg_type == FFileDialog::Save )
|
if ( dlg_type == DialogType::Save )
|
||||||
open_btn.setText ("&Save");
|
open_btn.setText ("&Save");
|
||||||
else
|
else
|
||||||
open_btn.setText ("&Open");
|
open_btn.setText ("&Open");
|
||||||
|
@ -788,7 +788,7 @@ void FFileDialog::cb_processActivate()
|
||||||
if ( found )
|
if ( found )
|
||||||
changeDir(input);
|
changeDir(input);
|
||||||
else
|
else
|
||||||
done (FDialog::Accept);
|
done (ResultCode::Accept);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -818,19 +818,19 @@ void FFileDialog::cb_processClicked()
|
||||||
if ( dir_entries[n].directory )
|
if ( dir_entries[n].directory )
|
||||||
changeDir(dir_entries[n].name);
|
changeDir(dir_entries[n].name);
|
||||||
else
|
else
|
||||||
done (FDialog::Accept);
|
done (ResultCode::Accept);
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
void FFileDialog::cb_processCancel()
|
void FFileDialog::cb_processCancel()
|
||||||
{
|
{
|
||||||
done (FDialog::Reject);
|
done (ResultCode::Reject);
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
void FFileDialog::cb_processOpen()
|
void FFileDialog::cb_processOpen()
|
||||||
{
|
{
|
||||||
done (FDialog::Accept);
|
done (ResultCode::Accept);
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
|
|
|
@ -214,7 +214,7 @@ void FLineEdit::setLabelText (const FString& ltxt)
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
void FLineEdit::setLabelOrientation (const label_o o)
|
void FLineEdit::setLabelOrientation (const LabelOrientation o)
|
||||||
{
|
{
|
||||||
label_orientation = o;
|
label_orientation = o;
|
||||||
adjustLabel();
|
adjustLabel();
|
||||||
|
@ -610,15 +610,15 @@ void FLineEdit::adjustLabel()
|
||||||
if ( hasHotkey() )
|
if ( hasHotkey() )
|
||||||
label_width--;
|
label_width--;
|
||||||
|
|
||||||
assert ( label_orientation == label_above
|
assert ( label_orientation == LabelOrientation::above
|
||||||
|| label_orientation == label_left );
|
|| label_orientation == LabelOrientation::left );
|
||||||
|
|
||||||
if ( label_orientation == label_above )
|
if ( label_orientation == LabelOrientation::above )
|
||||||
{
|
{
|
||||||
label->setGeometry ( FPoint{w->getX(), w->getY() - 1}
|
label->setGeometry ( FPoint{w->getX(), w->getY() - 1}
|
||||||
, FSize{label_width, 1} );
|
, FSize{label_width, 1} );
|
||||||
}
|
}
|
||||||
else if ( label_orientation == label_left )
|
else if ( label_orientation == LabelOrientation::left )
|
||||||
{
|
{
|
||||||
label->setGeometry ( FPoint{w->getX() - int(label_width) - 1, w->getY()}
|
label->setGeometry ( FPoint{w->getX() - int(label_width) - 1, w->getY()}
|
||||||
, FSize{label_width, 1} );
|
, FSize{label_width, 1} );
|
||||||
|
@ -710,15 +710,15 @@ void FLineEdit::drawInputField()
|
||||||
|
|
||||||
const std::size_t text_offset_column = [this] ()
|
const std::size_t text_offset_column = [this] ()
|
||||||
{
|
{
|
||||||
assert ( input_type == FLineEdit::textfield
|
assert ( input_type == InputType::textfield
|
||||||
|| input_type == FLineEdit::password );
|
|| input_type == InputType::password );
|
||||||
|
|
||||||
switch ( input_type )
|
switch ( input_type )
|
||||||
{
|
{
|
||||||
case FLineEdit::textfield:
|
case InputType::textfield:
|
||||||
return printTextField();
|
return printTextField();
|
||||||
|
|
||||||
case FLineEdit::password:
|
case InputType::password:
|
||||||
return printPassword();
|
return printPassword();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -782,11 +782,11 @@ inline std::size_t FLineEdit::printPassword()
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
inline std::size_t FLineEdit::getCursorColumnPos() const
|
inline std::size_t FLineEdit::getCursorColumnPos() const
|
||||||
{
|
{
|
||||||
if ( input_type == FLineEdit::textfield )
|
if ( input_type == InputType::textfield )
|
||||||
{
|
{
|
||||||
return getColumnWidth (print_text, cursor_pos);
|
return getColumnWidth (print_text, cursor_pos);
|
||||||
}
|
}
|
||||||
else if ( input_type == FLineEdit::password )
|
else if ( input_type == InputType::password )
|
||||||
{
|
{
|
||||||
return cursor_pos;
|
return cursor_pos;
|
||||||
}
|
}
|
||||||
|
@ -803,7 +803,7 @@ inline FString FLineEdit::getPasswordText() const
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
inline bool FLineEdit::isPasswordField() const
|
inline bool FLineEdit::isPasswordField() const
|
||||||
{
|
{
|
||||||
return bool( input_type == FLineEdit::password );
|
return bool( input_type == InputType::password );
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
|
|
|
@ -312,7 +312,7 @@ bool FMenuBar::selectNextItem()
|
||||||
if ( next == *iter )
|
if ( next == *iter )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
setTerminalUpdates (FVTerm::stop_terminal_updates);
|
setTerminalUpdates (FVTerm::TerminalUpdate::Stop);
|
||||||
unselectItem();
|
unselectItem();
|
||||||
next->setSelected();
|
next->setSelected();
|
||||||
setSelectedItem(next);
|
setSelectedItem(next);
|
||||||
|
@ -335,7 +335,7 @@ bool FMenuBar::selectNextItem()
|
||||||
getStatusBar()->drawMessage();
|
getStatusBar()->drawMessage();
|
||||||
|
|
||||||
redraw();
|
redraw();
|
||||||
setTerminalUpdates (FVTerm::start_terminal_updates);
|
setTerminalUpdates (FVTerm::TerminalUpdate::Start);
|
||||||
forceTerminalUpdate();
|
forceTerminalUpdate();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -377,7 +377,7 @@ bool FMenuBar::selectPrevItem()
|
||||||
if ( prev == *iter )
|
if ( prev == *iter )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
setTerminalUpdates (FVTerm::stop_terminal_updates);
|
setTerminalUpdates (FVTerm::TerminalUpdate::Stop);
|
||||||
unselectItem();
|
unselectItem();
|
||||||
prev->setSelected();
|
prev->setSelected();
|
||||||
prev->setFocus();
|
prev->setFocus();
|
||||||
|
@ -400,7 +400,7 @@ bool FMenuBar::selectPrevItem()
|
||||||
|
|
||||||
setSelectedItem(prev);
|
setSelectedItem(prev);
|
||||||
redraw();
|
redraw();
|
||||||
setTerminalUpdates (FVTerm::start_terminal_updates);
|
setTerminalUpdates (FVTerm::TerminalUpdate::Start);
|
||||||
forceTerminalUpdate();
|
forceTerminalUpdate();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -905,7 +905,7 @@ void FMenuBar::mouseMoveOverList (const FMouseEvent& ev)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Event handover to the menu
|
// Event handover to the menu
|
||||||
passEventToMenu(std::move(ev));
|
passEventToMenu(ev);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -926,7 +926,7 @@ void FMenuBar::mouseMoveOverList (const FMouseEvent& ev)
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
void FMenuBar::passEventToMenu (const FMouseEvent&& ev) const
|
void FMenuBar::passEventToMenu (const FMouseEvent& ev) const
|
||||||
{
|
{
|
||||||
if ( ! hasSelectedItem() || ! getSelectedItem()->hasMenu() )
|
if ( ! hasSelectedItem() || ! getSelectedItem()->hasMenu() )
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -51,31 +51,12 @@ constexpr std::array<const char* const, 8> button_text =
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
FMessageBox::FMessageBox (FWidget* parent)
|
FMessageBox::FMessageBox (FWidget* parent)
|
||||||
: FDialog{parent}
|
: FDialog{parent}
|
||||||
, button_digit{FMessageBox::Ok, FMessageBox::Reject, FMessageBox::Reject}
|
, button_digit{ButtonType::Ok, ButtonType::Reject, ButtonType::Reject}
|
||||||
{
|
{
|
||||||
setTitlebarText("Message for you");
|
setTitlebarText("Message for you");
|
||||||
init();
|
init();
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
|
||||||
FMessageBox::FMessageBox (const FMessageBox& mbox)
|
|
||||||
: FDialog{mbox.getParentWidget()}
|
|
||||||
, headline_text{mbox.headline_text}
|
|
||||||
, text{mbox.text}
|
|
||||||
, text_components{mbox.text_components}
|
|
||||||
, max_line_width{mbox.max_line_width}
|
|
||||||
, emphasis_color{mbox.emphasis_color}
|
|
||||||
, button_digit{mbox.button_digit[0],
|
|
||||||
mbox.button_digit[1],
|
|
||||||
mbox.button_digit[2]}
|
|
||||||
, num_buttons{mbox.num_buttons}
|
|
||||||
, text_num_lines{mbox.text_num_lines}
|
|
||||||
, center_text{mbox.center_text}
|
|
||||||
{
|
|
||||||
setTitlebarText (mbox.getTitlebarText());
|
|
||||||
init();
|
|
||||||
}
|
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
FMessageBox::FMessageBox ( const FString& caption
|
FMessageBox::FMessageBox ( const FString& caption
|
||||||
, const FString& message
|
, const FString& message
|
||||||
|
@ -151,15 +132,22 @@ void FMessageBox::setText (const FString& txt)
|
||||||
if ( button[0] )
|
if ( button[0] )
|
||||||
button[0]->setY (int(getHeight()) - 4, false);
|
button[0]->setY (int(getHeight()) - 4, false);
|
||||||
|
|
||||||
if ( button[1] && button_digit[1] != FMessageBox::Reject )
|
if ( button[1] && button_digit[1] != ButtonType::Reject )
|
||||||
button[1]->setY (int(getHeight()) - 4, false);
|
button[1]->setY (int(getHeight()) - 4, false);
|
||||||
|
|
||||||
if ( button[2] && button_digit[2] != FMessageBox::Reject )
|
if ( button[2] && button_digit[2] != ButtonType::Reject )
|
||||||
button[2]->setY (int(getHeight()) - 4, false);
|
button[2]->setY (int(getHeight()) - 4, false);
|
||||||
|
|
||||||
adjustButtons();
|
adjustButtons();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------
|
||||||
|
FMessageBox::ButtonType FMessageBox::exec()
|
||||||
|
{
|
||||||
|
result_code = ButtonType::Reject;
|
||||||
|
show();
|
||||||
|
return result_code;
|
||||||
|
}
|
||||||
|
|
||||||
// protected methods of FMessageBox
|
// protected methods of FMessageBox
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
|
@ -187,10 +175,17 @@ void FMessageBox::adjustSize()
|
||||||
FDialog::adjustSize();
|
FDialog::adjustSize();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------
|
||||||
|
void FMessageBox::done (ButtonType result)
|
||||||
|
{
|
||||||
|
hide();
|
||||||
|
result_code = result;
|
||||||
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
void FMessageBox::cb_processClick (ButtonType reply)
|
void FMessageBox::cb_processClick (ButtonType reply)
|
||||||
{
|
{
|
||||||
done(int(reply));
|
done(reply);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -200,21 +195,21 @@ void FMessageBox::init()
|
||||||
{
|
{
|
||||||
calculateDimensions();
|
calculateDimensions();
|
||||||
|
|
||||||
if ( (button_digit[2] != Reject && button_digit[1] == Reject)
|
if ( (button_digit[2] != ButtonType::Reject && button_digit[1] == ButtonType::Reject)
|
||||||
|| (button_digit[1] != Reject && button_digit[0] == Reject) )
|
|| (button_digit[1] != ButtonType::Reject && button_digit[0] == ButtonType::Reject) )
|
||||||
{
|
{
|
||||||
button_digit[0] = button_digit[1] \
|
button_digit[0] = button_digit[1] \
|
||||||
= button_digit[2] \
|
= button_digit[2] \
|
||||||
= FMessageBox::Reject;
|
= ButtonType::Reject;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( button_digit[0] == FMessageBox::Reject )
|
if ( button_digit[0] == ButtonType::Reject )
|
||||||
button_digit[0] = FMessageBox::Ok;
|
button_digit[0] = ButtonType::Ok;
|
||||||
|
|
||||||
if ( button_digit[1] == FMessageBox::Reject
|
if ( button_digit[1] == ButtonType::Reject
|
||||||
&& button_digit[2] == FMessageBox::Reject )
|
&& button_digit[2] == ButtonType::Reject )
|
||||||
num_buttons = 1;
|
num_buttons = 1;
|
||||||
else if ( button_digit[2] == FMessageBox::Reject )
|
else if ( button_digit[2] == ButtonType::Reject )
|
||||||
num_buttons = 2;
|
num_buttons = 2;
|
||||||
else
|
else
|
||||||
num_buttons = 3;
|
num_buttons = 3;
|
||||||
|
@ -232,25 +227,25 @@ inline void FMessageBox::allocation()
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
button[0].reset(new FButton (this));
|
button[0].reset(new FButton (this));
|
||||||
button[0]->setText(button_text[button_digit[0]]);
|
button[0]->setText(button_text[std::size_t(button_digit[0])]);
|
||||||
button[0]->setPos(FPoint{3, int(getHeight()) - 4}, false);
|
button[0]->setPos(FPoint{3, int(getHeight()) - 4}, false);
|
||||||
button[0]->setWidth(1, false);
|
button[0]->setWidth(1, false);
|
||||||
button[0]->setHeight(1, false);
|
button[0]->setHeight(1, false);
|
||||||
button[0]->setFocus();
|
button[0]->setFocus();
|
||||||
|
|
||||||
if ( button_digit[1] > FMessageBox::Reject )
|
if ( button_digit[1] > ButtonType::Reject )
|
||||||
{
|
{
|
||||||
button[1].reset(new FButton(this));
|
button[1].reset(new FButton(this));
|
||||||
button[1]->setText(button_text[button_digit[1]]);
|
button[1]->setText(button_text[std::size_t(button_digit[1])]);
|
||||||
button[1]->setPos(FPoint{17, int(getHeight()) - 4}, false);
|
button[1]->setPos(FPoint{17, int(getHeight()) - 4}, false);
|
||||||
button[1]->setWidth(0, false);
|
button[1]->setWidth(0, false);
|
||||||
button[1]->setHeight(1, false);
|
button[1]->setHeight(1, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( button_digit[2] > FMessageBox::Reject )
|
if ( button_digit[2] > ButtonType::Reject )
|
||||||
{
|
{
|
||||||
button[2].reset(new FButton(this));
|
button[2].reset(new FButton(this));
|
||||||
button[2]->setText(button_text[button_digit[2]]);
|
button[2]->setText(button_text[std::size_t(button_digit[2])]);
|
||||||
button[2]->setPos(FPoint{32, int(getHeight()) - 4}, false);
|
button[2]->setPos(FPoint{32, int(getHeight()) - 4}, false);
|
||||||
button[2]->setWidth(0, false);
|
button[2]->setWidth(0, false);
|
||||||
button[2]->setHeight(1, false);
|
button[2]->setHeight(1, false);
|
||||||
|
@ -266,7 +261,7 @@ inline void FMessageBox::allocation()
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
inline void FMessageBox::initCallbacks()
|
inline void FMessageBox::initCallbacks()
|
||||||
{
|
{
|
||||||
if ( button[0] && button_digit[0] != FMessageBox::Reject )
|
if ( button[0] && button_digit[0] != ButtonType::Reject )
|
||||||
{
|
{
|
||||||
button[0]->addCallback
|
button[0]->addCallback
|
||||||
(
|
(
|
||||||
|
@ -276,7 +271,7 @@ inline void FMessageBox::initCallbacks()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( button[1] && button_digit[1] != FMessageBox::Reject )
|
if ( button[1] && button_digit[1] != ButtonType::Reject )
|
||||||
{
|
{
|
||||||
button[1]->addCallback
|
button[1]->addCallback
|
||||||
(
|
(
|
||||||
|
@ -286,7 +281,7 @@ inline void FMessageBox::initCallbacks()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( button[2] && button_digit[2] != FMessageBox::Reject )
|
if ( button[2] && button_digit[2] != ButtonType::Reject )
|
||||||
{
|
{
|
||||||
button[2]->addCallback
|
button[2]->addCallback
|
||||||
(
|
(
|
||||||
|
|
|
@ -36,7 +36,7 @@ namespace finalcut
|
||||||
|
|
||||||
// constructor and destructor
|
// constructor and destructor
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
FRect::FRect (const FPoint& p, const FSize& s)
|
FRect::FRect (const FPoint& p, const FSize& s) noexcept
|
||||||
: X1{p.getX()}
|
: X1{p.getX()}
|
||||||
, Y1{p.getY()}
|
, Y1{p.getY()}
|
||||||
, X2{p.getX() + int(s.getWidth()) - 1}
|
, X2{p.getX() + int(s.getWidth()) - 1}
|
||||||
|
@ -44,7 +44,7 @@ FRect::FRect (const FPoint& p, const FSize& s)
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
FRect::FRect (const FPoint& p1, const FPoint& p2)
|
FRect::FRect (const FPoint& p1, const FPoint& p2) noexcept
|
||||||
: X1{p1.getX()}
|
: X1{p1.getX()}
|
||||||
, Y1{p1.getY()}
|
, Y1{p1.getY()}
|
||||||
, X2{p2.getX()}
|
, X2{p2.getX()}
|
||||||
|
|
|
@ -27,9 +27,6 @@
|
||||||
namespace finalcut
|
namespace finalcut
|
||||||
{
|
{
|
||||||
|
|
||||||
// static class attribute
|
|
||||||
FStartOptions* FStartOptions::start_options{};
|
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
// class FStartOptions
|
// class FStartOptions
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
|
|
|
@ -198,7 +198,7 @@ void FTermLinux::init()
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
void FTermLinux::initCharMap()
|
void FTermLinux::initCharMap() const
|
||||||
{
|
{
|
||||||
constexpr sInt16 NOT_FOUND = -1;
|
constexpr sInt16 NOT_FOUND = -1;
|
||||||
|
|
||||||
|
@ -767,7 +767,7 @@ inline uInt16 FTermLinux::getInputStatusRegisterOne() const
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
uChar FTermLinux::readAttributeController (uChar index)
|
uChar FTermLinux::readAttributeController (uChar index) const
|
||||||
{
|
{
|
||||||
// Reads a byte from the attribute controller from a given index
|
// Reads a byte from the attribute controller from a given index
|
||||||
|
|
||||||
|
@ -793,7 +793,7 @@ uChar FTermLinux::readAttributeController (uChar index)
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
void FTermLinux::writeAttributeController (uChar index, uChar data)
|
void FTermLinux::writeAttributeController (uChar index, uChar data) const
|
||||||
{
|
{
|
||||||
// Writes a byte from the attribute controller from a given index
|
// Writes a byte from the attribute controller from a given index
|
||||||
|
|
||||||
|
|
|
@ -153,19 +153,19 @@ void FVTerm::setTermXY (int x, int y) const
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
void FVTerm::setTerminalUpdates (terminal_update refresh_state) const
|
void FVTerm::setTerminalUpdates (TerminalUpdate refresh_state) const
|
||||||
{
|
{
|
||||||
if ( refresh_state == stop_terminal_updates )
|
if ( refresh_state == TerminalUpdate::Stop )
|
||||||
{
|
{
|
||||||
no_terminal_updates = true;
|
no_terminal_updates = true;
|
||||||
}
|
}
|
||||||
else if ( refresh_state == continue_terminal_updates
|
else if ( refresh_state == TerminalUpdate::Continue
|
||||||
|| refresh_state == start_terminal_updates )
|
|| refresh_state == TerminalUpdate::Start )
|
||||||
{
|
{
|
||||||
no_terminal_updates = false;
|
no_terminal_updates = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( refresh_state == start_terminal_updates )
|
if ( refresh_state == TerminalUpdate::Start )
|
||||||
updateTerminal();
|
updateTerminal();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -305,8 +305,9 @@ void FVTerm::addPreprocessingHandler ( const FVTerm* instance
|
||||||
|
|
||||||
if ( print_area )
|
if ( print_area )
|
||||||
{
|
{
|
||||||
FVTermPreprocessing obj{ instance, std::move(function) };
|
|
||||||
delPreprocessingHandler (instance);
|
delPreprocessingHandler (instance);
|
||||||
|
auto obj = make_unique<FVTermPreprocessing> \
|
||||||
|
(instance, std::forward<FPreprocessingFunction>(function));
|
||||||
print_area->preproc_list.emplace_back(std::move(obj));
|
print_area->preproc_list.emplace_back(std::move(obj));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -324,7 +325,7 @@ void FVTerm::delPreprocessingHandler (const FVTerm* instance)
|
||||||
|
|
||||||
while ( iter != print_area->preproc_list.end() )
|
while ( iter != print_area->preproc_list.end() )
|
||||||
{
|
{
|
||||||
if ( iter->instance.get() == instance )
|
if ( iter->get()->instance.get() == instance )
|
||||||
iter = print_area->preproc_list.erase(iter);
|
iter = print_area->preproc_list.erase(iter);
|
||||||
else
|
else
|
||||||
++iter;
|
++iter;
|
||||||
|
@ -803,7 +804,7 @@ bool FVTerm::updateVTermCursor (const FTermArea* area) const
|
||||||
|
|
||||||
if ( isInsideArea (FPoint{cx, cy}, area)
|
if ( isInsideArea (FPoint{cx, cy}, area)
|
||||||
&& isInsideTerminal (FPoint{x, y})
|
&& isInsideTerminal (FPoint{x, y})
|
||||||
&& isCovered (FPoint{x, y}, area) == non_covered )
|
&& isCovered (FPoint{x, y}, area) == CoveredState::non_covered )
|
||||||
{
|
{
|
||||||
vterm->input_cursor_x = x;
|
vterm->input_cursor_x = x;
|
||||||
vterm->input_cursor_y = y;
|
vterm->input_cursor_y = y;
|
||||||
|
@ -1362,15 +1363,15 @@ inline bool FVTerm::reallocateTextArea (FTermArea* area, std::size_t size)
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
FVTerm::covered_state FVTerm::isCovered ( const FPoint& pos
|
FVTerm::CoveredState FVTerm::isCovered ( const FPoint& pos
|
||||||
, const FTermArea* area )
|
, const FTermArea* area )
|
||||||
{
|
{
|
||||||
// Determines the covered state for the given position
|
// Determines the covered state for the given position
|
||||||
|
|
||||||
if ( ! area )
|
if ( ! area )
|
||||||
return non_covered;
|
return CoveredState::non_covered;
|
||||||
|
|
||||||
auto is_covered = non_covered;
|
auto is_covered = CoveredState::non_covered;
|
||||||
|
|
||||||
if ( FWidget::getWindowList() && ! FWidget::getWindowList()->empty() )
|
if ( FWidget::getWindowList() && ! FWidget::getWindowList()->empty() )
|
||||||
{
|
{
|
||||||
|
@ -1398,11 +1399,11 @@ FVTerm::covered_state FVTerm::isCovered ( const FPoint& pos
|
||||||
|
|
||||||
if ( tmp->attr.bit.color_overlay )
|
if ( tmp->attr.bit.color_overlay )
|
||||||
{
|
{
|
||||||
is_covered = half_covered;
|
is_covered = CoveredState::half_covered;
|
||||||
}
|
}
|
||||||
else if ( ! tmp->attr.bit.transparent )
|
else if ( ! tmp->attr.bit.transparent )
|
||||||
{
|
{
|
||||||
is_covered = fully_covered;
|
is_covered = CoveredState::fully_covered;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1524,10 +1525,10 @@ bool FVTerm::updateVTermCharacter ( const FTermArea* area
|
||||||
// Get covered state
|
// Get covered state
|
||||||
const auto is_covered = isCovered(terminal_pos, area);
|
const auto is_covered = isCovered(terminal_pos, area);
|
||||||
|
|
||||||
if ( is_covered == fully_covered )
|
if ( is_covered == CoveredState::fully_covered )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if ( is_covered == half_covered )
|
if ( is_covered == CoveredState::half_covered )
|
||||||
{
|
{
|
||||||
// Overlapped character
|
// Overlapped character
|
||||||
auto oc = getOverlappedCharacter (terminal_pos, area);
|
auto oc = getOverlappedCharacter (terminal_pos, area);
|
||||||
|
@ -1610,7 +1611,7 @@ void FVTerm::callPreprocessingHandler (const FTermArea* area)
|
||||||
for (auto&& pcall : area->preproc_list)
|
for (auto&& pcall : area->preproc_list)
|
||||||
{
|
{
|
||||||
// call the preprocessing handler
|
// call the preprocessing handler
|
||||||
auto preprocessingHandler = pcall.function;
|
auto preprocessingHandler = pcall->function;
|
||||||
preprocessingHandler();
|
preprocessingHandler();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1623,11 +1624,11 @@ bool FVTerm::hasChildAreaChanges (FTermArea* area) const
|
||||||
|
|
||||||
return std::any_of ( area->preproc_list.begin()
|
return std::any_of ( area->preproc_list.begin()
|
||||||
, area->preproc_list.end()
|
, area->preproc_list.end()
|
||||||
, [] (const FVTermPreprocessing& pcall)
|
, [] (const std::unique_ptr<FVTermPreprocessing>& pcall)
|
||||||
{
|
{
|
||||||
return pcall.instance
|
return pcall->instance
|
||||||
&& pcall.instance->child_print_area
|
&& pcall->instance->child_print_area
|
||||||
&& pcall.instance->child_print_area->has_changes;
|
&& pcall->instance->child_print_area->has_changes;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -1640,8 +1641,8 @@ void FVTerm::clearChildAreaChanges (const FTermArea* area) const
|
||||||
|
|
||||||
for (auto&& pcall : area->preproc_list)
|
for (auto&& pcall : area->preproc_list)
|
||||||
{
|
{
|
||||||
if ( pcall.instance && pcall.instance->child_print_area )
|
if ( pcall->instance && pcall->instance->child_print_area )
|
||||||
pcall.instance->child_print_area->has_changes = false;
|
pcall->instance->child_print_area->has_changes = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1830,7 +1831,7 @@ void FVTerm::init()
|
||||||
output_buffer->reserve(TERMINAL_OUTPUT_BUFFER_SIZE + 256);
|
output_buffer->reserve(TERMINAL_OUTPUT_BUFFER_SIZE + 256);
|
||||||
|
|
||||||
// term_attribute stores the current state of the terminal
|
// term_attribute stores the current state of the terminal
|
||||||
term_attribute.ch = { L'\0' };
|
term_attribute.ch = {{ L'\0' }};
|
||||||
term_attribute.fg_color = fc::Default;
|
term_attribute.fg_color = fc::Default;
|
||||||
term_attribute.bg_color = fc::Default;
|
term_attribute.bg_color = fc::Default;
|
||||||
term_attribute.attr.byte[0] = 0;
|
term_attribute.attr.byte[0] = 0;
|
||||||
|
@ -2718,7 +2719,7 @@ void FVTerm::printPaddingCharacter (FTermArea* area, const FChar& term_char)
|
||||||
|
|
||||||
if ( FTerm::getEncoding() == fc::UTF8 )
|
if ( FTerm::getEncoding() == fc::UTF8 )
|
||||||
{
|
{
|
||||||
pc.ch = { L'\0' };
|
pc.ch = {{ L'\0' }};
|
||||||
pc.attr.bit.fullwidth_padding = true;
|
pc.attr.bit.fullwidth_padding = true;
|
||||||
pc.attr.bit.char_width = 0;
|
pc.attr.bit.char_width = 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -681,7 +681,7 @@ void FWindow::switchToPrevWindow (const FWidget* widget)
|
||||||
// Disable terminal updates to avoid flickering
|
// Disable terminal updates to avoid flickering
|
||||||
// when redrawing the focused widget
|
// when redrawing the focused widget
|
||||||
if ( widget )
|
if ( widget )
|
||||||
widget->setTerminalUpdates (FVTerm::stop_terminal_updates);
|
widget->setTerminalUpdates (FVTerm::TerminalUpdate::Stop);
|
||||||
|
|
||||||
const bool is_activated = activatePrevWindow();
|
const bool is_activated = activatePrevWindow();
|
||||||
auto active_win = static_cast<FWindow*>(getActiveWindow());
|
auto active_win = static_cast<FWindow*>(getActiveWindow());
|
||||||
|
@ -729,7 +729,7 @@ void FWindow::switchToPrevWindow (const FWidget* widget)
|
||||||
|
|
||||||
// Enable terminal updates again
|
// Enable terminal updates again
|
||||||
if ( widget )
|
if ( widget )
|
||||||
widget->setTerminalUpdates (FVTerm::continue_terminal_updates);
|
widget->setTerminalUpdates (FVTerm::TerminalUpdate::Continue);
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
|
|
|
@ -134,6 +134,7 @@ class FComboBox : public FWidget
|
||||||
public:
|
public:
|
||||||
// Using-declaration
|
// Using-declaration
|
||||||
using FWidget::setGeometry;
|
using FWidget::setGeometry;
|
||||||
|
using LabelOrientation = FLineEdit::LabelOrientation;
|
||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
explicit FComboBox (FWidget* = nullptr);
|
explicit FComboBox (FWidget* = nullptr);
|
||||||
|
@ -155,7 +156,7 @@ class FComboBox : public FWidget
|
||||||
FString getText() const;
|
FString getText() const;
|
||||||
template <typename DT>
|
template <typename DT>
|
||||||
clean_fdata_t<DT>& getItemData();
|
clean_fdata_t<DT>& getItemData();
|
||||||
FLineEdit::label_o getLabelOrientation() const;
|
LabelOrientation getLabelOrientation() const;
|
||||||
|
|
||||||
// Mutators
|
// Mutators
|
||||||
void setSize (const FSize&, bool = true) override;
|
void setSize (const FSize&, bool = true) override;
|
||||||
|
@ -179,7 +180,7 @@ class FComboBox : public FWidget
|
||||||
void setText (const FString&);
|
void setText (const FString&);
|
||||||
void clearText();
|
void clearText();
|
||||||
void setLabelText (const FString&);
|
void setLabelText (const FString&);
|
||||||
void setLabelOrientation (const FLineEdit::label_o);
|
void setLabelOrientation (const LabelOrientation);
|
||||||
|
|
||||||
// Inquiries
|
// Inquiries
|
||||||
bool hasShadow() const;
|
bool hasShadow() const;
|
||||||
|
@ -261,7 +262,7 @@ inline clean_fdata_t<DT>& FComboBox::getItemData()
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
inline FLineEdit::label_o FComboBox::getLabelOrientation() const
|
inline FLineEdit::LabelOrientation FComboBox::getLabelOrientation() const
|
||||||
{ return input_field.getLabelOrientation(); }
|
{ return input_field.getLabelOrientation(); }
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
|
@ -342,7 +343,7 @@ inline void FComboBox::setLabelText (const FString& s)
|
||||||
{ input_field.setLabelText(s); }
|
{ input_field.setLabelText(s); }
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
inline void FComboBox::setLabelOrientation (const FLineEdit::label_o o)
|
inline void FComboBox::setLabelOrientation (const LabelOrientation o)
|
||||||
{ input_field.setLabelOrientation(o); }
|
{ input_field.setLabelOrientation(o); }
|
||||||
|
|
||||||
} // namespace finalcut
|
} // namespace finalcut
|
||||||
|
|
|
@ -65,7 +65,7 @@ template <typename T>
|
||||||
struct cleanCondition<T, false, false>
|
struct cleanCondition<T, false, false>
|
||||||
{
|
{
|
||||||
// Leave the type untouched
|
// Leave the type untouched
|
||||||
typedef T type;
|
using type = T;
|
||||||
};
|
};
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
|
@ -73,7 +73,7 @@ template <typename T>
|
||||||
struct cleanCondition<T, true, false>
|
struct cleanCondition<T, true, false>
|
||||||
{
|
{
|
||||||
// Array to pointer
|
// Array to pointer
|
||||||
typedef typename std::remove_extent<T>::type* type;
|
using type = typename std::remove_extent<T>::type*;
|
||||||
};
|
};
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
|
@ -81,7 +81,7 @@ template <typename T>
|
||||||
struct cleanCondition<T, false, true>
|
struct cleanCondition<T, false, true>
|
||||||
{
|
{
|
||||||
// Add pointer to function
|
// Add pointer to function
|
||||||
typedef typename std::add_pointer<T>::type type;
|
using type = typename std::add_pointer<T>::type;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace internal
|
} // namespace internal
|
||||||
|
@ -91,11 +91,11 @@ template <typename T>
|
||||||
class cleanFData
|
class cleanFData
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
typedef typename std::remove_reference<T>::type remove_ref;
|
using remove_ref = typename std::remove_reference<T>::type;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
// Similar to std::decay, but keeps const and volatile
|
// Similar to std::decay, but keeps const and volatile
|
||||||
typedef typename internal::cleanCondition<remove_ref>::type type;
|
using type = typename internal::cleanCondition<remove_ref>::type;
|
||||||
};
|
};
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
|
@ -153,7 +153,7 @@ template <typename T>
|
||||||
class FData : public FDataAccess
|
class FData : public FDataAccess
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
typedef typename std::remove_cv<T>::type T_nocv;
|
using T_nocv = typename std::remove_cv<T>::type;
|
||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
explicit FData (T& v) // constructor
|
explicit FData (T& v) // constructor
|
||||||
|
|
|
@ -71,7 +71,7 @@ class FDialog : public FWindow
|
||||||
using FWindow::setResizeable;
|
using FWindow::setResizeable;
|
||||||
|
|
||||||
// Enumeration
|
// Enumeration
|
||||||
enum DialogCode
|
enum class ResultCode : int
|
||||||
{
|
{
|
||||||
Reject = 0,
|
Reject = 0,
|
||||||
Accept = 1
|
Accept = 1
|
||||||
|
@ -119,7 +119,7 @@ class FDialog : public FWindow
|
||||||
// Methods
|
// Methods
|
||||||
void show() override;
|
void show() override;
|
||||||
void hide() override;
|
void hide() override;
|
||||||
int exec();
|
ResultCode exec();
|
||||||
void setPos (const FPoint&, bool = true) override;
|
void setPos (const FPoint&, bool = true) override;
|
||||||
void move (const FPoint&) override;
|
void move (const FPoint&) override;
|
||||||
bool moveUp (int);
|
bool moveUp (int);
|
||||||
|
@ -147,7 +147,7 @@ class FDialog : public FWindow
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// Methods
|
// Methods
|
||||||
virtual void done (int);
|
void done (ResultCode);
|
||||||
void draw() override;
|
void draw() override;
|
||||||
void drawDialogShadow();
|
void drawDialogShadow();
|
||||||
|
|
||||||
|
@ -217,7 +217,7 @@ class FDialog : public FWindow
|
||||||
|
|
||||||
// Data members
|
// Data members
|
||||||
FString tb_text{}; // title bar text
|
FString tb_text{}; // title bar text
|
||||||
int result_code{FDialog::Reject};
|
ResultCode result_code{ResultCode::Reject};
|
||||||
bool zoom_button_pressed{false};
|
bool zoom_button_pressed{false};
|
||||||
bool zoom_button_active{false};
|
bool zoom_button_active{false};
|
||||||
bool setPos_error{false};
|
bool setPos_error{false};
|
||||||
|
|
|
@ -88,7 +88,7 @@ class FFileDialog : public FDialog
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
// Enumeration
|
// Enumeration
|
||||||
enum DialogType
|
enum class DialogType
|
||||||
{
|
{
|
||||||
Open = 0,
|
Open = 0,
|
||||||
Save = 1
|
Save = 1
|
||||||
|
@ -99,7 +99,7 @@ class FFileDialog : public FDialog
|
||||||
FFileDialog (const FFileDialog&); // copy constructor
|
FFileDialog (const FFileDialog&); // copy constructor
|
||||||
FFileDialog ( const FString&
|
FFileDialog ( const FString&
|
||||||
, const FString&
|
, const FString&
|
||||||
, DialogType = FFileDialog::Open
|
, DialogType = DialogType::Open
|
||||||
, FWidget* = nullptr );
|
, FWidget* = nullptr );
|
||||||
|
|
||||||
// Destructor
|
// Destructor
|
||||||
|
@ -219,7 +219,7 @@ class FFileDialog : public FDialog
|
||||||
FCheckBox hidden_check{this};
|
FCheckBox hidden_check{this};
|
||||||
FButton cancel_btn{this};
|
FButton cancel_btn{this};
|
||||||
FButton open_btn{this};
|
FButton open_btn{this};
|
||||||
DialogType dlg_type{FFileDialog::Open};
|
DialogType dlg_type{DialogType::Open};
|
||||||
bool show_hidden{false};
|
bool show_hidden{false};
|
||||||
|
|
||||||
// Friend functions
|
// Friend functions
|
||||||
|
|
|
@ -69,13 +69,13 @@ class FLineEdit : public FWidget
|
||||||
using FWidget::setGeometry;
|
using FWidget::setGeometry;
|
||||||
|
|
||||||
// Enumerations
|
// Enumerations
|
||||||
enum label_o
|
enum class LabelOrientation
|
||||||
{
|
{
|
||||||
label_above = 0,
|
above = 0,
|
||||||
label_left = 1
|
left = 1
|
||||||
};
|
};
|
||||||
|
|
||||||
enum inputType
|
enum class InputType
|
||||||
{
|
{
|
||||||
textfield = 0,
|
textfield = 0,
|
||||||
password = 1
|
password = 1
|
||||||
|
@ -108,7 +108,7 @@ class FLineEdit : public FWidget
|
||||||
std::size_t getMaxLength() const;
|
std::size_t getMaxLength() const;
|
||||||
std::size_t getCursorPosition() const;
|
std::size_t getCursorPosition() const;
|
||||||
FLabel* getLabelObject() const;
|
FLabel* getLabelObject() const;
|
||||||
label_o getLabelOrientation() const;
|
LabelOrientation getLabelOrientation() const;
|
||||||
|
|
||||||
// Mutators
|
// Mutators
|
||||||
void setText (const FString&);
|
void setText (const FString&);
|
||||||
|
@ -117,8 +117,8 @@ class FLineEdit : public FWidget
|
||||||
void setMaxLength (std::size_t);
|
void setMaxLength (std::size_t);
|
||||||
void setCursorPosition (std::size_t);
|
void setCursorPosition (std::size_t);
|
||||||
void setLabelText (const FString&);
|
void setLabelText (const FString&);
|
||||||
void setInputType (const inputType);
|
void setInputType (const InputType);
|
||||||
void setLabelOrientation (const label_o);
|
void setLabelOrientation (const LabelOrientation);
|
||||||
void setLabelAssociatedWidget (FWidget*);
|
void setLabelAssociatedWidget (FWidget*);
|
||||||
void resetColors() override;
|
void resetColors() override;
|
||||||
void setSize (const FSize&, bool = true) override;
|
void setSize (const FSize&, bool = true) override;
|
||||||
|
@ -211,8 +211,8 @@ class FLineEdit : public FWidget
|
||||||
FWidget* label_associated_widget{this};
|
FWidget* label_associated_widget{this};
|
||||||
std::wstring input_filter{};
|
std::wstring input_filter{};
|
||||||
dragScroll drag_scroll{FLineEdit::noScroll};
|
dragScroll drag_scroll{FLineEdit::noScroll};
|
||||||
label_o label_orientation{FLineEdit::label_left};
|
LabelOrientation label_orientation{LabelOrientation::left};
|
||||||
inputType input_type{FLineEdit::textfield};
|
InputType input_type{InputType::textfield};
|
||||||
int scroll_repeat{100};
|
int scroll_repeat{100};
|
||||||
bool scroll_timer{false};
|
bool scroll_timer{false};
|
||||||
bool insert_mode{true};
|
bool insert_mode{true};
|
||||||
|
@ -257,7 +257,7 @@ inline FLabel* FLineEdit::getLabelObject() const
|
||||||
{ return label; }
|
{ return label; }
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
inline FLineEdit::label_o FLineEdit::getLabelOrientation() const
|
inline FLineEdit::LabelOrientation FLineEdit::getLabelOrientation() const
|
||||||
{ return label_orientation; }
|
{ return label_orientation; }
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
|
@ -269,7 +269,7 @@ inline void FLineEdit::clearInputFilter()
|
||||||
{ input_filter.clear(); }
|
{ input_filter.clear(); }
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
inline void FLineEdit::setInputType (const inputType type)
|
inline void FLineEdit::setInputType (const InputType type)
|
||||||
{ input_type = type; }
|
{ input_type = type; }
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
|
|
|
@ -221,6 +221,7 @@ class FListViewIterator
|
||||||
|
|
||||||
// Constructor
|
// Constructor
|
||||||
FListViewIterator () = default;
|
FListViewIterator () = default;
|
||||||
|
~FListViewIterator () = default;
|
||||||
FListViewIterator (Iterator);
|
FListViewIterator (Iterator);
|
||||||
FListViewIterator (const FListViewIterator&) = default;
|
FListViewIterator (const FListViewIterator&) = default;
|
||||||
FListViewIterator (FListViewIterator&& i) noexcept
|
FListViewIterator (FListViewIterator&& i) noexcept
|
||||||
|
|
|
@ -139,7 +139,7 @@ class FMenuBar : public FWindow, public FMenuList
|
||||||
void mouseDownOverList (const FMouseEvent*);
|
void mouseDownOverList (const FMouseEvent*);
|
||||||
void mouseUpOverList (const FMouseEvent*);
|
void mouseUpOverList (const FMouseEvent*);
|
||||||
void mouseMoveOverList (const FMouseEvent&);
|
void mouseMoveOverList (const FMouseEvent&);
|
||||||
void passEventToMenu (const FMouseEvent&&) const;
|
void passEventToMenu (const FMouseEvent&) const;
|
||||||
void leaveMenuBar();
|
void leaveMenuBar();
|
||||||
|
|
||||||
// Data members
|
// Data members
|
||||||
|
|
|
@ -80,7 +80,7 @@ class FMessageBox : public FDialog
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
// Enumeration
|
// Enumeration
|
||||||
enum ButtonType
|
enum class ButtonType : std::size_t
|
||||||
{
|
{
|
||||||
Reject = 0,
|
Reject = 0,
|
||||||
Ok = 1,
|
Ok = 1,
|
||||||
|
@ -94,10 +94,13 @@ class FMessageBox : public FDialog
|
||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
explicit FMessageBox (FWidget* = nullptr);
|
explicit FMessageBox (FWidget* = nullptr);
|
||||||
FMessageBox (const FMessageBox&); // copy constructor
|
|
||||||
|
FMessageBox (const FMessageBox&) = default; // copy constructor
|
||||||
|
|
||||||
FMessageBox ( const FString&, const FString&
|
FMessageBox ( const FString&, const FString&
|
||||||
, ButtonType, ButtonType, ButtonType
|
, ButtonType, ButtonType, ButtonType
|
||||||
, FWidget* = nullptr );
|
, FWidget* = nullptr );
|
||||||
|
|
||||||
// Destructor
|
// Destructor
|
||||||
~FMessageBox() noexcept override;
|
~FMessageBox() noexcept override;
|
||||||
|
|
||||||
|
@ -119,23 +122,25 @@ class FMessageBox : public FDialog
|
||||||
void setText (const FString&) override;
|
void setText (const FString&) override;
|
||||||
|
|
||||||
// Methods
|
// Methods
|
||||||
|
ButtonType exec();
|
||||||
template <typename messageType>
|
template <typename messageType>
|
||||||
static int info ( FWidget*
|
static ButtonType info ( FWidget*
|
||||||
, const FString&
|
, const FString&
|
||||||
, const messageType&
|
, const messageType&
|
||||||
, ButtonType = FMessageBox::Ok
|
, ButtonType = ButtonType::Ok
|
||||||
, ButtonType = FMessageBox::Reject
|
, ButtonType = ButtonType::Reject
|
||||||
, ButtonType = FMessageBox::Reject );
|
, ButtonType = ButtonType::Reject );
|
||||||
|
|
||||||
template <typename messageType>
|
template <typename messageType>
|
||||||
static int error ( FWidget*
|
static ButtonType error ( FWidget*
|
||||||
, const messageType&
|
, const messageType&
|
||||||
, ButtonType = FMessageBox::Ok
|
, ButtonType = ButtonType::Ok
|
||||||
, ButtonType = FMessageBox::Reject
|
, ButtonType = ButtonType::Reject
|
||||||
, ButtonType = FMessageBox::Reject );
|
, ButtonType = ButtonType::Reject );
|
||||||
protected:
|
protected:
|
||||||
// Method
|
// Method
|
||||||
void adjustSize() override;
|
void adjustSize() override;
|
||||||
|
void done (ButtonType);
|
||||||
|
|
||||||
// Callback method
|
// Callback method
|
||||||
void cb_processClick (ButtonType);
|
void cb_processClick (ButtonType);
|
||||||
|
@ -161,10 +166,11 @@ class FMessageBox : public FDialog
|
||||||
FString text{};
|
FString text{};
|
||||||
FStringList text_components{};
|
FStringList text_components{};
|
||||||
|
|
||||||
FButtons button;
|
FButtons button{};
|
||||||
std::size_t max_line_width{0};
|
std::size_t max_line_width{0};
|
||||||
FColor emphasis_color{getColorTheme()->dialog_emphasis_fg};
|
FColor emphasis_color{getColorTheme()->dialog_emphasis_fg};
|
||||||
ButtonType button_digit[MAX_BUTTONS]{FMessageBox::Reject};
|
ButtonType result_code{ButtonType::Reject};
|
||||||
|
ButtonType button_digit[MAX_BUTTONS]{ButtonType::Reject};
|
||||||
std::size_t num_buttons{0};
|
std::size_t num_buttons{0};
|
||||||
std::size_t text_num_lines{0};
|
std::size_t text_num_lines{0};
|
||||||
bool center_text{false};
|
bool center_text{false};
|
||||||
|
@ -209,7 +215,7 @@ inline bool FMessageBox::unsetCenterText()
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
template <typename messageType>
|
template <typename messageType>
|
||||||
int FMessageBox::info ( FWidget* parent
|
FMessageBox::ButtonType FMessageBox::info ( FWidget* parent
|
||||||
, const FString& caption
|
, const FString& caption
|
||||||
, const messageType& message
|
, const messageType& message
|
||||||
, ButtonType button0
|
, ButtonType button0
|
||||||
|
@ -220,13 +226,13 @@ int FMessageBox::info ( FWidget* parent
|
||||||
, FString() << message
|
, FString() << message
|
||||||
, button0, button1, button2
|
, button0, button1, button2
|
||||||
, parent );
|
, parent );
|
||||||
const int reply = mbox.exec();
|
const ButtonType reply = mbox.exec();
|
||||||
return reply;
|
return reply;
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
template <typename messageType>
|
template <typename messageType>
|
||||||
int FMessageBox::error ( FWidget* parent
|
FMessageBox::ButtonType FMessageBox::error ( FWidget* parent
|
||||||
, const messageType& message
|
, const messageType& message
|
||||||
, ButtonType button0
|
, ButtonType button0
|
||||||
, ButtonType button1
|
, ButtonType button1
|
||||||
|
@ -245,7 +251,7 @@ int FMessageBox::error ( FWidget* parent
|
||||||
mbox.setForegroundColor(wc->error_box_fg);
|
mbox.setForegroundColor(wc->error_box_fg);
|
||||||
mbox.setBackgroundColor(wc->error_box_bg);
|
mbox.setBackgroundColor(wc->error_box_bg);
|
||||||
mbox.emphasis_color = wc->error_box_emphasis_fg;
|
mbox.emphasis_color = wc->error_box_emphasis_fg;
|
||||||
const int reply = mbox.exec();
|
const ButtonType reply = mbox.exec();
|
||||||
return reply;
|
return reply;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -51,8 +51,8 @@ class FPoint
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
// Constructors
|
// Constructors
|
||||||
FPoint () = default;
|
FPoint () noexcept = default;
|
||||||
FPoint (int, int);
|
FPoint (int, int) noexcept;
|
||||||
|
|
||||||
// Overloaded operators
|
// Overloaded operators
|
||||||
FPoint& operator += (const FPoint&);
|
FPoint& operator += (const FPoint&);
|
||||||
|
@ -96,7 +96,7 @@ class FPoint
|
||||||
|
|
||||||
// FPoint inline functions
|
// FPoint inline functions
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
inline FPoint::FPoint (int x, int y)
|
inline FPoint::FPoint (int x, int y) noexcept
|
||||||
: xpos{x}
|
: xpos{x}
|
||||||
, ypos{y}
|
, ypos{y}
|
||||||
{ }
|
{ }
|
||||||
|
|
|
@ -59,10 +59,10 @@ class FRect
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
// Constructors
|
// Constructors
|
||||||
FRect () = default;
|
FRect () noexcept = default;
|
||||||
FRect (int, int, std::size_t, std::size_t);
|
FRect (int, int, std::size_t, std::size_t) noexcept;
|
||||||
FRect (const FPoint&, const FSize&);
|
FRect (const FPoint&, const FSize&) noexcept;
|
||||||
FRect (const FPoint&, const FPoint&);
|
FRect (const FPoint&, const FPoint&) noexcept;
|
||||||
|
|
||||||
// Accessors
|
// Accessors
|
||||||
FString getClassName() const;
|
FString getClassName() const;
|
||||||
|
@ -139,7 +139,7 @@ class FRect
|
||||||
|
|
||||||
// FRect inline functions
|
// FRect inline functions
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
inline FRect::FRect (int x, int y, std::size_t width, std::size_t height)
|
inline FRect::FRect (int x, int y, std::size_t width, std::size_t height) noexcept
|
||||||
: X1{x}
|
: X1{x}
|
||||||
, Y1{y}
|
, Y1{y}
|
||||||
, X2{x + int(width) - 1}
|
, X2{x + int(width) - 1}
|
||||||
|
|
|
@ -56,8 +56,8 @@ class FSize
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
// Constructors
|
// Constructors
|
||||||
FSize () = default;
|
FSize () noexcept = default;
|
||||||
FSize (std::size_t, std::size_t);
|
FSize (std::size_t, std::size_t) noexcept;
|
||||||
|
|
||||||
// Overloaded operators
|
// Overloaded operators
|
||||||
FSize& operator += (const FSize&);
|
FSize& operator += (const FSize&);
|
||||||
|
@ -105,7 +105,7 @@ class FSize
|
||||||
|
|
||||||
// FSize inline functions
|
// FSize inline functions
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
inline FSize::FSize (std::size_t w, std::size_t h)
|
inline FSize::FSize (std::size_t w, std::size_t h) noexcept
|
||||||
: width{w}
|
: width{w}
|
||||||
, height{h}
|
, height{h}
|
||||||
{ }
|
{ }
|
||||||
|
|
|
@ -66,6 +66,7 @@ class FSpinBox : public FWidget
|
||||||
public:
|
public:
|
||||||
// Using-declaration
|
// Using-declaration
|
||||||
using FWidget::setGeometry;
|
using FWidget::setGeometry;
|
||||||
|
using LabelOrientation = FLineEdit::LabelOrientation;
|
||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
explicit FSpinBox (FWidget* = nullptr);
|
explicit FSpinBox (FWidget* = nullptr);
|
||||||
|
@ -84,7 +85,7 @@ class FSpinBox : public FWidget
|
||||||
sInt64 getValue() const;
|
sInt64 getValue() const;
|
||||||
FString getPrefix() const;
|
FString getPrefix() const;
|
||||||
FString getSuffix() const;
|
FString getSuffix() const;
|
||||||
FLineEdit::label_o getLabelOrientation() const;
|
LabelOrientation getLabelOrientation() const;
|
||||||
|
|
||||||
// Mutators
|
// Mutators
|
||||||
void setSize (const FSize&, bool = true) override;
|
void setSize (const FSize&, bool = true) override;
|
||||||
|
@ -107,7 +108,7 @@ class FSpinBox : public FWidget
|
||||||
void setPrefix (const FString&);
|
void setPrefix (const FString&);
|
||||||
void setSuffix (const FString&);
|
void setSuffix (const FString&);
|
||||||
void setLabelText (const FString&);
|
void setLabelText (const FString&);
|
||||||
void setLabelOrientation (const FLineEdit::label_o);
|
void setLabelOrientation (const LabelOrientation);
|
||||||
|
|
||||||
// Inquiries
|
// Inquiries
|
||||||
bool hasShadow() const;
|
bool hasShadow() const;
|
||||||
|
@ -177,7 +178,7 @@ inline FString FSpinBox::getSuffix() const
|
||||||
{ return sfix; }
|
{ return sfix; }
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
inline FLineEdit::label_o FSpinBox::getLabelOrientation() const
|
inline FLineEdit::LabelOrientation FSpinBox::getLabelOrientation() const
|
||||||
{ return input_field.getLabelOrientation(); }
|
{ return input_field.getLabelOrientation(); }
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
|
@ -217,7 +218,7 @@ inline void FSpinBox::setLabelText (const FString& s)
|
||||||
{ input_field.setLabelText(s); }
|
{ input_field.setLabelText(s); }
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
inline void FSpinBox::setLabelOrientation (const FLineEdit::label_o o)
|
inline void FSpinBox::setLabelOrientation (const LabelOrientation o)
|
||||||
{ input_field.setLabelOrientation(o); }
|
{ input_field.setLabelOrientation(o); }
|
||||||
|
|
||||||
} // namespace finalcut
|
} // namespace finalcut
|
||||||
|
|
|
@ -95,7 +95,6 @@ class FStartOptions final
|
||||||
|
|
||||||
fc::encoding encoding{fc::UNKNOWN};
|
fc::encoding encoding{fc::UNKNOWN};
|
||||||
std::ofstream logfile_stream{};
|
std::ofstream logfile_stream{};
|
||||||
static FStartOptions* start_options;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
|
|
|
@ -105,7 +105,7 @@ class FTermLinux final
|
||||||
|
|
||||||
// Methods
|
// Methods
|
||||||
void init();
|
void init();
|
||||||
void initCharMap();
|
void initCharMap() const;
|
||||||
void finish();
|
void finish();
|
||||||
bool loadVGAFont();
|
bool loadVGAFont();
|
||||||
bool loadNewFont();
|
bool loadNewFont();
|
||||||
|
@ -154,8 +154,8 @@ class FTermLinux final
|
||||||
// Methods
|
// Methods
|
||||||
#if defined(ISA_SYSCTL_SUPPORT)
|
#if defined(ISA_SYSCTL_SUPPORT)
|
||||||
uInt16 getInputStatusRegisterOne() const;
|
uInt16 getInputStatusRegisterOne() const;
|
||||||
uChar readAttributeController (uChar);
|
uChar readAttributeController (uChar) const;
|
||||||
void writeAttributeController (uChar, uChar);
|
void writeAttributeController (uChar, uChar) const;
|
||||||
uChar getAttributeMode();
|
uChar getAttributeMode();
|
||||||
void setAttributeMode (uChar);
|
void setAttributeMode (uChar);
|
||||||
int setBlinkAsIntensity (bool);
|
int setBlinkAsIntensity (bool);
|
||||||
|
|
|
@ -98,21 +98,21 @@ class FVTerm
|
||||||
// Using-declarations
|
// Using-declarations
|
||||||
using FPreprocessingHandler = void (FVTerm::*)();
|
using FPreprocessingHandler = void (FVTerm::*)();
|
||||||
using FPreprocessingFunction = std::function<void()>;
|
using FPreprocessingFunction = std::function<void()>;
|
||||||
using FPreprocessing = std::vector<FVTermPreprocessing>;
|
using FPreprocessing = std::vector<std::unique_ptr<FVTermPreprocessing>>;
|
||||||
|
|
||||||
// Enumerations
|
// Enumerations
|
||||||
enum covered_state
|
enum class CoveredState
|
||||||
{
|
{
|
||||||
non_covered,
|
non_covered,
|
||||||
half_covered,
|
half_covered,
|
||||||
fully_covered
|
fully_covered
|
||||||
};
|
};
|
||||||
|
|
||||||
enum terminal_update
|
enum class TerminalUpdate
|
||||||
{
|
{
|
||||||
stop_terminal_updates, // No terminal refresh
|
Stop, // No terminal refresh
|
||||||
continue_terminal_updates, // Resuming terminal refresh
|
Continue, // Resuming terminal refresh
|
||||||
start_terminal_updates // Allowing terminal refresh
|
Start // Allowing terminal refresh
|
||||||
};
|
};
|
||||||
|
|
||||||
// Constructor
|
// Constructor
|
||||||
|
@ -150,7 +150,7 @@ class FVTerm
|
||||||
|
|
||||||
// Mutators
|
// Mutators
|
||||||
void setTermXY (int, int) const;
|
void setTermXY (int, int) const;
|
||||||
void setTerminalUpdates (terminal_update) const;
|
void setTerminalUpdates (TerminalUpdate) const;
|
||||||
void hideCursor (bool) const;
|
void hideCursor (bool) const;
|
||||||
void hideCursor() const;
|
void hideCursor() const;
|
||||||
void showCursor() const;
|
void showCursor() const;
|
||||||
|
@ -347,7 +347,7 @@ class FVTerm
|
||||||
, std::size_t );
|
, std::size_t );
|
||||||
static bool reallocateTextArea ( FTermArea*
|
static bool reallocateTextArea ( FTermArea*
|
||||||
, std::size_t );
|
, std::size_t );
|
||||||
static covered_state isCovered (const FPoint&, const FTermArea*);
|
static CoveredState isCovered (const FPoint&, const FTermArea*);
|
||||||
static void updateOverlappedColor (const FChar&, const FChar&, FChar&);
|
static void updateOverlappedColor (const FChar&, const FChar&, FChar&);
|
||||||
static void updateOverlappedCharacter (FChar&, FChar&);
|
static void updateOverlappedCharacter (FChar&, FChar&);
|
||||||
static void updateShadedCharacter (const FChar&, FChar&, FChar&);
|
static void updateShadedCharacter (const FChar&, FChar&, FChar&);
|
||||||
|
@ -509,7 +509,7 @@ struct FVTerm::FVTermPreprocessing
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
FVTermPreprocessing (const FVTermPreprocessing&) = delete;
|
FVTermPreprocessing (const FVTermPreprocessing&) = delete;
|
||||||
FVTermPreprocessing (FVTermPreprocessing&&) = default;
|
FVTermPreprocessing (FVTermPreprocessing&&) noexcept = default;
|
||||||
FVTermPreprocessing& operator = (const FVTermPreprocessing&) = delete;
|
FVTermPreprocessing& operator = (const FVTermPreprocessing&) = delete;
|
||||||
FVTermPreprocessing& operator = (FVTermPreprocessing&&) noexcept = default;
|
FVTermPreprocessing& operator = (FVTermPreprocessing&&) noexcept = default;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue