Method name changes
This commit is contained in:
parent
8f383a4def
commit
07127634fd
|
@ -1,3 +1,9 @@
|
|||
2020-07-19 Markus Gans <guru.mail@muenster.de>
|
||||
* API: Some method name changes:
|
||||
FObject::delOwnTimer() -> FObject::delOwnTimers()
|
||||
FObject::delAllTimer() -> FObject::delAllTimers()
|
||||
FWidget::delCallbacks() -> FWidget::delAllCallbacks()
|
||||
|
||||
2020-07-08 Markus Gans <guru.mail@muenster.de>
|
||||
* New data wrapper class FData
|
||||
|
||||
|
|
|
@ -549,7 +549,7 @@ void FWidget::addCallback ( const FString& cb_signal
|
|||
There are two macros `F_FUNCTION_CALLBACK` and `F_METHOD_CALLBACK` to avoid
|
||||
having to deal with necessary type conversions. With `delCallback()` you can
|
||||
remove a connection to a signal handler or a widget. Alternatively, you can
|
||||
use `delCallbacks()` to remove all existing callbacks from an object.
|
||||
use `delAllCallbacks()` to remove all existing callbacks from an object.
|
||||
|
||||
|
||||
### The FINAL CUT widgets emit the following default signals ###
|
||||
|
|
|
@ -100,7 +100,7 @@ void Dialog::adjustSize()
|
|||
//----------------------------------------------------------------------
|
||||
void Dialog::onTimer (finalcut::FTimerEvent*)
|
||||
{
|
||||
delOwnTimer();
|
||||
delOwnTimers();
|
||||
busy_indicator.stop();
|
||||
}
|
||||
|
||||
|
|
|
@ -126,7 +126,7 @@ ProgressDialog::ProgressDialog (finalcut::FWidget* parent)
|
|||
//----------------------------------------------------------------------
|
||||
ProgressDialog::~ProgressDialog() // destructor
|
||||
{
|
||||
delOwnTimer();
|
||||
delOwnTimers();
|
||||
delCallback(&quit);
|
||||
delCallback(&more);
|
||||
delCallback(&reset);
|
||||
|
@ -149,7 +149,7 @@ void ProgressDialog::onTimer (finalcut::FTimerEvent*)
|
|||
if ( p != 100 )
|
||||
return;
|
||||
|
||||
delOwnTimer();
|
||||
delOwnTimers();
|
||||
activateWindow();
|
||||
raiseWindow();
|
||||
reset.setEnable();
|
||||
|
|
|
@ -161,7 +161,7 @@ void Watch::cb_clock (const finalcut::FWidget*, const FDataPtr)
|
|||
}
|
||||
else
|
||||
{
|
||||
delAllTimer(); // Delete all timers and stop updating the time
|
||||
delAllTimers(); // Delete all timers and stop updating the time
|
||||
time_str = "--:--:--";
|
||||
time_str.redraw();
|
||||
}
|
||||
|
|
|
@ -152,7 +152,7 @@ void SmallWindow::onTimer (finalcut::FTimerEvent*)
|
|||
bottom_label.unsetEmphasis();
|
||||
bottom_label.redraw();
|
||||
updateTerminal();
|
||||
delOwnTimer();
|
||||
delOwnTimers();
|
||||
}
|
||||
|
||||
|
||||
|
@ -277,7 +277,7 @@ Window::~Window()
|
|||
|
||||
// Remove all callbacks before Window::cb_destroyWindow() will be called
|
||||
if ( win_dat->is_open && win_dat->dgl )
|
||||
win_dat->dgl->delCallbacks();
|
||||
win_dat->dgl->delAllCallbacks();
|
||||
|
||||
delete win_dat;
|
||||
iter = windows.erase(iter);
|
||||
|
|
|
@ -56,7 +56,7 @@ void FBusyIndicator::start()
|
|||
//----------------------------------------------------------------------
|
||||
void FBusyIndicator::stop()
|
||||
{
|
||||
delOwnTimer();
|
||||
delOwnTimers();
|
||||
running = false;
|
||||
hide();
|
||||
updateTerminal();
|
||||
|
|
|
@ -53,7 +53,7 @@ FButton::FButton (const FString& txt, FWidget* parent)
|
|||
FButton::~FButton() // destructor
|
||||
{
|
||||
delAccelerator();
|
||||
delOwnTimer();
|
||||
delOwnTimers();
|
||||
}
|
||||
|
||||
// FButton operator
|
||||
|
|
|
@ -405,7 +405,7 @@ void FLineEdit::onMouseUp (FMouseEvent*)
|
|||
{
|
||||
if ( drag_scroll != FLineEdit::noScroll )
|
||||
{
|
||||
delOwnTimer();
|
||||
delOwnTimers();
|
||||
drag_scroll = FLineEdit::noScroll;
|
||||
scroll_timer = false;
|
||||
}
|
||||
|
@ -446,7 +446,7 @@ void FLineEdit::onMouseMove (FMouseEvent* ev)
|
|||
|
||||
if ( text_offset == 0 )
|
||||
{
|
||||
delOwnTimer();
|
||||
delOwnTimers();
|
||||
drag_scroll = FLineEdit::noScroll;
|
||||
}
|
||||
}
|
||||
|
@ -462,14 +462,14 @@ void FLineEdit::onMouseMove (FMouseEvent* ev)
|
|||
|
||||
if ( cursor_pos == len )
|
||||
{
|
||||
delOwnTimer();
|
||||
delOwnTimers();
|
||||
drag_scroll = FLineEdit::noScroll;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// no dragging
|
||||
delOwnTimer();
|
||||
delOwnTimers();
|
||||
scroll_timer = false;
|
||||
drag_scroll = FLineEdit::noScroll;
|
||||
}
|
||||
|
|
|
@ -95,7 +95,7 @@ FListBox::FListBox (FWidget* parent)
|
|||
//----------------------------------------------------------------------
|
||||
FListBox::~FListBox() // destructor
|
||||
{
|
||||
delOwnTimer();
|
||||
delOwnTimers();
|
||||
}
|
||||
|
||||
|
||||
|
@ -572,7 +572,7 @@ void FListBox::onFocusOut (FFocusEvent*)
|
|||
getStatusBar()->drawMessage();
|
||||
}
|
||||
|
||||
delOwnTimer();
|
||||
delOwnTimers();
|
||||
inc_search.clear();
|
||||
}
|
||||
|
||||
|
@ -1306,7 +1306,7 @@ void FListBox::dragUp (int mouse_button)
|
|||
|
||||
if ( current == 1 )
|
||||
{
|
||||
delOwnTimer();
|
||||
delOwnTimers();
|
||||
drag_scroll = fc::noScroll;
|
||||
}
|
||||
}
|
||||
|
@ -1331,7 +1331,7 @@ void FListBox::dragDown (int mouse_button)
|
|||
|
||||
if ( current == getCount() )
|
||||
{
|
||||
delOwnTimer();
|
||||
delOwnTimers();
|
||||
drag_scroll = fc::noScroll;
|
||||
}
|
||||
}
|
||||
|
@ -1339,7 +1339,7 @@ void FListBox::dragDown (int mouse_button)
|
|||
//----------------------------------------------------------------------
|
||||
void FListBox::stopDragScroll()
|
||||
{
|
||||
delOwnTimer();
|
||||
delOwnTimers();
|
||||
drag_scroll = fc::noScroll;
|
||||
scroll_distance = 1;
|
||||
scroll_timer = false;
|
||||
|
|
|
@ -691,7 +691,7 @@ FListView::FListView (FWidget* parent)
|
|||
//----------------------------------------------------------------------
|
||||
FListView::~FListView() // destructor
|
||||
{
|
||||
delOwnTimer();
|
||||
delOwnTimers();
|
||||
}
|
||||
|
||||
// public methods of FListView
|
||||
|
@ -1408,7 +1408,7 @@ void FListView::onFocusOut (FFocusEvent*)
|
|||
getStatusBar()->drawMessage();
|
||||
}
|
||||
|
||||
delOwnTimer();
|
||||
delOwnTimers();
|
||||
}
|
||||
|
||||
|
||||
|
@ -2447,7 +2447,7 @@ void FListView::dragUp (int mouse_button)
|
|||
|
||||
if ( current_iter.getPosition() == 0 )
|
||||
{
|
||||
delOwnTimer();
|
||||
delOwnTimers();
|
||||
drag_scroll = fc::noScroll;
|
||||
}
|
||||
}
|
||||
|
@ -2472,7 +2472,7 @@ void FListView::dragDown (int mouse_button)
|
|||
|
||||
if ( current_iter.getPosition() - 1 == int(getCount()) )
|
||||
{
|
||||
delOwnTimer();
|
||||
delOwnTimers();
|
||||
drag_scroll = fc::noScroll;
|
||||
}
|
||||
}
|
||||
|
@ -2480,7 +2480,7 @@ void FListView::dragDown (int mouse_button)
|
|||
//----------------------------------------------------------------------
|
||||
void FListView::stopDragScroll()
|
||||
{
|
||||
delOwnTimer();
|
||||
delOwnTimers();
|
||||
scroll_timer = false;
|
||||
scroll_distance = 1;
|
||||
drag_scroll = fc::noScroll;
|
||||
|
|
|
@ -72,7 +72,7 @@ FObject::FObject (FObject* parent)
|
|||
//----------------------------------------------------------------------
|
||||
FObject::~FObject() // destructor
|
||||
{
|
||||
delOwnTimer(); // Delete all timers of this object
|
||||
delOwnTimers(); // Delete all timers of this object
|
||||
|
||||
if ( ! has_parent && timer_list )
|
||||
{
|
||||
|
@ -333,7 +333,7 @@ bool FObject::delTimer (int id) const
|
|||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
bool FObject::delOwnTimer() const
|
||||
bool FObject::delOwnTimers() const
|
||||
{
|
||||
// Deletes all timers of this object
|
||||
|
||||
|
@ -359,7 +359,7 @@ bool FObject::delOwnTimer() const
|
|||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
bool FObject::delAllTimer() const
|
||||
bool FObject::delAllTimers() const
|
||||
{
|
||||
// Deletes all timers of all objects
|
||||
|
||||
|
|
|
@ -55,7 +55,7 @@ FScrollbar::FScrollbar(fc::orientation o, FWidget* parent)
|
|||
//----------------------------------------------------------------------
|
||||
FScrollbar::~FScrollbar() // destructor
|
||||
{
|
||||
delOwnTimer();
|
||||
delOwnTimers();
|
||||
}
|
||||
|
||||
|
||||
|
@ -305,7 +305,7 @@ void FScrollbar::onMouseUp (FMouseEvent* ev)
|
|||
|
||||
if ( scroll_type != FScrollbar::noScroll )
|
||||
{
|
||||
delOwnTimer();
|
||||
delOwnTimers();
|
||||
scroll_type = FScrollbar::noScroll;
|
||||
}
|
||||
}
|
||||
|
@ -360,7 +360,7 @@ void FScrollbar::onMouseMove (FMouseEvent* ev)
|
|||
if ( mouse_x < 1 || mouse_x > int(getWidth())
|
||||
|| mouse_y < 1 || mouse_y > int(getHeight()) )
|
||||
{
|
||||
delOwnTimer();
|
||||
delOwnTimers();
|
||||
}
|
||||
else if ( scroll_type != FScrollbar::scrollJump )
|
||||
{
|
||||
|
@ -369,7 +369,7 @@ void FScrollbar::onMouseMove (FMouseEvent* ev)
|
|||
|
||||
if ( scroll_type != new_scroll_type )
|
||||
{
|
||||
delOwnTimer();
|
||||
delOwnTimers();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -380,7 +380,7 @@ void FScrollbar::onWheel (FWheelEvent* ev)
|
|||
|
||||
if ( scroll_type != FScrollbar::noScroll )
|
||||
{
|
||||
delOwnTimer();
|
||||
delOwnTimers();
|
||||
scroll_type = FScrollbar::noScroll;
|
||||
}
|
||||
|
||||
|
@ -401,7 +401,7 @@ void FScrollbar::onTimer (FTimerEvent*)
|
|||
if ( ! threshold_reached )
|
||||
{
|
||||
threshold_reached = true;
|
||||
delOwnTimer();
|
||||
delOwnTimers();
|
||||
addTimer(repeat_time);
|
||||
}
|
||||
|
||||
|
@ -426,7 +426,7 @@ void FScrollbar::onTimer (FTimerEvent*)
|
|||
processScroll();
|
||||
}
|
||||
|
||||
delOwnTimer();
|
||||
delOwnTimers();
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -787,7 +787,7 @@ void FScrollbar::avoidScrollOvershoot()
|
|||
&& slider_pos > slider_click_stop_pos ) )
|
||||
{
|
||||
jumpToClickPos (slider_click_stop_pos);
|
||||
delOwnTimer();
|
||||
delOwnTimers();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -235,13 +235,13 @@ void FSpinBox::onMouseDown (FMouseEvent* ev)
|
|||
addTimer(threshold_time);
|
||||
}
|
||||
else
|
||||
delOwnTimer();
|
||||
delOwnTimers();
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
void FSpinBox::onMouseUp (FMouseEvent*)
|
||||
{
|
||||
delOwnTimer();
|
||||
delOwnTimers();
|
||||
spining_state = FSpinBox::noSpin;
|
||||
}
|
||||
|
||||
|
@ -250,7 +250,7 @@ void FSpinBox::onWheel (FWheelEvent* ev)
|
|||
{
|
||||
const int wheel = ev->getWheel();
|
||||
|
||||
delOwnTimer();
|
||||
delOwnTimers();
|
||||
forceFocus();
|
||||
spining_state = FSpinBox::noSpin;
|
||||
|
||||
|
@ -277,7 +277,7 @@ void FSpinBox::onTimer (FTimerEvent*)
|
|||
if ( ! threshold_reached )
|
||||
{
|
||||
threshold_reached = true;
|
||||
delOwnTimer();
|
||||
delOwnTimers();
|
||||
addTimer(repeat_time);
|
||||
}
|
||||
|
||||
|
@ -382,7 +382,7 @@ inline void FSpinBox::increaseValue()
|
|||
processChanged();
|
||||
}
|
||||
else
|
||||
delOwnTimer();
|
||||
delOwnTimers();
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
@ -394,7 +394,7 @@ inline void FSpinBox::decreaseValue()
|
|||
processChanged();
|
||||
}
|
||||
else
|
||||
delOwnTimer();
|
||||
delOwnTimers();
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
|
|
@ -2417,7 +2417,7 @@ inline void FVTerm::replaceNonPrintableFullwidth ( uInt x
|
|||
|
||||
//----------------------------------------------------------------------
|
||||
void FVTerm::printCharacter ( uInt& x, uInt y, bool min_and_not_max
|
||||
, FChar*& print_char)
|
||||
, FChar*& print_char) const
|
||||
{
|
||||
// General character output on terminal
|
||||
|
||||
|
|
|
@ -101,7 +101,7 @@ FWidget::FWidget (FWidget* parent)
|
|||
FWidget::~FWidget() // destructor
|
||||
{
|
||||
processDestroy();
|
||||
delCallbacks();
|
||||
delAllCallbacks();
|
||||
auto app_object = FApplication::getApplicationObject();
|
||||
app_object->removeQueuedEvent(this);
|
||||
|
||||
|
@ -858,7 +858,7 @@ void FWidget::addCallback ( const FString& cb_signal
|
|||
//----------------------------------------------------------------------
|
||||
void FWidget::delCallback (const FCallback& cb_function)
|
||||
{
|
||||
// Delete cb_function form callback list
|
||||
// Deletes entries with cb_function form the callback list
|
||||
|
||||
if ( callback_objects.empty() )
|
||||
return;
|
||||
|
@ -877,7 +877,7 @@ void FWidget::delCallback (const FCallback& cb_function)
|
|||
//----------------------------------------------------------------------
|
||||
void FWidget::delCallback (const FWidget* cb_instance)
|
||||
{
|
||||
// Delete all member function pointer from cb_instance
|
||||
// Deletes entries with cb_instance from the callback list
|
||||
|
||||
if ( callback_objects.empty() )
|
||||
return;
|
||||
|
@ -894,7 +894,7 @@ void FWidget::delCallback (const FWidget* cb_instance)
|
|||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
void FWidget::delCallbacks()
|
||||
void FWidget::delAllCallbacks()
|
||||
{
|
||||
// Delete all callbacks from this widget
|
||||
|
||||
|
|
|
@ -125,8 +125,8 @@ class FObject
|
|||
static bool isTimeout (const timeval*, uInt64);
|
||||
int addTimer (int);
|
||||
bool delTimer (int) const;
|
||||
bool delOwnTimer() const;
|
||||
bool delAllTimer() const;
|
||||
bool delOwnTimers() const;
|
||||
bool delAllTimers() const;
|
||||
|
||||
protected:
|
||||
struct FTimerData
|
||||
|
|
|
@ -392,7 +392,7 @@ class FVTerm
|
|||
bool skipUnchangedCharacters (uInt&, uInt, uInt) const;
|
||||
void printRange (uInt, uInt, uInt, bool);
|
||||
void replaceNonPrintableFullwidth (uInt, FChar*&) const;
|
||||
void printCharacter (uInt&, uInt, bool, FChar*&);
|
||||
void printCharacter (uInt&, uInt, bool, FChar*&) const;
|
||||
void printFullWidthCharacter (uInt&, uInt, FChar*&) const;
|
||||
void printFullWidthPaddingCharacter (uInt&, uInt, FChar*&) const;
|
||||
void printHalfCovertFullWidthCharacter (uInt&, uInt, FChar*&) const;
|
||||
|
|
|
@ -332,7 +332,7 @@ class FWidget : public FVTerm, public FObject
|
|||
, FDataPtr = nullptr );
|
||||
void delCallback (const FCallback&);
|
||||
void delCallback (const FWidget*);
|
||||
void delCallbacks();
|
||||
void delAllCallbacks();
|
||||
void emitCallback (const FString&);
|
||||
void addAccelerator (FKey);
|
||||
virtual void addAccelerator (FKey, FWidget*);
|
||||
|
|
|
@ -514,7 +514,7 @@ void FObjectTest::timerTest()
|
|||
CPPUNIT_ASSERT ( t1.getTimerList()->size() == 0 );
|
||||
|
||||
CPPUNIT_ASSERT ( ! t1.delTimer (id1) ); // id double delete
|
||||
CPPUNIT_ASSERT ( ! t1.delAllTimer() );
|
||||
CPPUNIT_ASSERT ( ! t1.delAllTimers() );
|
||||
|
||||
t1.addTimer(250);
|
||||
t1.addTimer(500);
|
||||
|
@ -524,7 +524,7 @@ void FObjectTest::timerTest()
|
|||
CPPUNIT_ASSERT ( t1.getTimerList()->size() == 4 );
|
||||
CPPUNIT_ASSERT ( t2.getTimerList()->size() == 4 );
|
||||
|
||||
t1.delOwnTimer();
|
||||
t1.delOwnTimers();
|
||||
CPPUNIT_ASSERT ( t1.getTimerList()->size() == 2 );
|
||||
CPPUNIT_ASSERT ( t2.getTimerList()->size() == 2 );
|
||||
|
||||
|
@ -532,7 +532,7 @@ void FObjectTest::timerTest()
|
|||
CPPUNIT_ASSERT ( t1.getTimerList()->size() == 3 );
|
||||
CPPUNIT_ASSERT ( t2.getTimerList()->size() == 3 );
|
||||
|
||||
t2.delAllTimer();
|
||||
t2.delAllTimers();
|
||||
CPPUNIT_ASSERT ( t1.getTimerList()->empty() );
|
||||
CPPUNIT_ASSERT ( t2.getTimerList()->empty() );
|
||||
CPPUNIT_ASSERT ( t1.getTimerList()->size() == 0 );
|
||||
|
|
Loading…
Reference in New Issue