Use the override specifier

This commit is contained in:
Markus Gans 2018-12-31 06:18:39 +01:00
parent 0d1f6a5e51
commit 719e9b0586
54 changed files with 1177 additions and 1155 deletions

View File

@ -1,3 +1,6 @@
2018-12-31 Markus Gans <guru.mail@muenster.de>
* Use the override specifier
2018-12-30 Markus Gans <guru.mail@muenster.de>
* Cygwin compiled fix for C++11

View File

@ -50,7 +50,7 @@ class Button : public finalcut::FButton
void setChecked(bool);
// Event handler
virtual void onKeyPress (finalcut::FKeyEvent*);
virtual void onKeyPress (finalcut::FKeyEvent*) override;
private:
// Data Member
@ -118,9 +118,9 @@ class Calc : public finalcut::FDialog
~Calc();
// Event handlers
virtual void onKeyPress (finalcut::FKeyEvent*);
virtual void onAccel (finalcut::FAccelEvent*);
virtual void onClose (finalcut::FCloseEvent*);
virtual void onKeyPress (finalcut::FKeyEvent*) override;
virtual void onAccel (finalcut::FAccelEvent*) override;
virtual void onClose (finalcut::FCloseEvent*) override;
// Callback method
void cb_buttonClicked (finalcut::FWidget*, FDataPtr);
@ -170,7 +170,7 @@ class Calc : public finalcut::FDialog
// Methods
void drawDispay();
virtual void draw();
virtual void draw() override;
void clear (lDouble&);
void zero (lDouble&);
void one (lDouble&);
@ -212,7 +212,7 @@ class Calc : public finalcut::FDialog
void setInfixOperator (char);
void clearInfixOperator();
void calcInfixOperator();
virtual void adjustSize();
virtual void adjustSize() override;
const wchar_t* getButtonText (std::size_t);
void mapKeyFunctions();

View File

@ -55,8 +55,8 @@ class CheckList : public finalcut::FDialog
void populate();
// Event handlers
virtual void onKeyPress (finalcut::FKeyEvent*);
virtual void onClose (finalcut::FCloseEvent*);
virtual void onKeyPress (finalcut::FKeyEvent*) override;
virtual void onClose (finalcut::FCloseEvent*) override;
// Callback method
void cb_showList (finalcut::FWidget*, FDataPtr);

View File

@ -34,12 +34,12 @@ class Keyboard : public finalcut::FWidget
protected:
// Event handlers
virtual void onKeyPress (finalcut::FKeyEvent*);
virtual void onAccel (finalcut::FAccelEvent*);
virtual void onKeyPress (finalcut::FKeyEvent*) override;
virtual void onAccel (finalcut::FAccelEvent*) override;
private:
// Methods
virtual void draw();
virtual void draw() override;
};
//----------------------------------------------------------------------

View File

@ -93,7 +93,7 @@ class Listbox : public FDialog
private:
// Event handlers
virtual void onClose (FCloseEvent*);
virtual void onClose (FCloseEvent*) override;
// Data Member
std::list<double> double_list{};

View File

@ -55,7 +55,7 @@ class Listview : public finalcut::FDialog
void populate();
// Event handlers
virtual void onClose (finalcut::FCloseEvent*);
virtual void onClose (finalcut::FCloseEvent*) override;
// Callback method
void cb_showInMessagebox (finalcut::FWidget*, FDataPtr);

View File

@ -40,13 +40,13 @@ class Mandelbrot : public finalcut::FDialog
~Mandelbrot();
// Event handlers
virtual void onAccel (finalcut::FAccelEvent*);
virtual void onClose (finalcut::FCloseEvent*);
virtual void onAccel (finalcut::FAccelEvent*) override;
virtual void onClose (finalcut::FCloseEvent*) override;
private:
// Methods
virtual void draw();
virtual void adjustSize();
virtual void draw() override;
virtual void adjustSize() override;
};
#pragma pack(pop)

View File

@ -54,10 +54,10 @@ class Menu : public finalcut::FDialog
void configureStyleMenuItems();
void configureBorderMenuItems();
void defaultCallback (finalcut::FMenuList*);
virtual void adjustSize();
virtual void adjustSize() override;
// Event handler
virtual void onClose (finalcut::FCloseEvent*);
virtual void onClose (finalcut::FCloseEvent*) override;
// Callback method
void cb_message (finalcut::FWidget*, FDataPtr);

View File

@ -51,10 +51,10 @@ class ColorChooser : public finalcut::FWidget
private:
// Method
virtual void draw();
virtual void draw() override;
// Event handler
virtual void onMouseDown (finalcut::FMouseEvent*);
virtual void onMouseDown (finalcut::FMouseEvent*) override;
// Data Members
FColor fg_color{finalcut::fc::White};
@ -192,10 +192,10 @@ class Brushes : public finalcut::FWidget
private:
// Method
virtual void draw();
virtual void draw() override;
// Event handler
virtual void onMouseDown (finalcut::FMouseEvent*);
virtual void onMouseDown (finalcut::FMouseEvent*) override;
// Data Members
wchar_t brush{L' '};
@ -327,19 +327,19 @@ class MouseDraw : public finalcut::FDialog
void setGeometry (int, int, std::size_t, std::size_t, bool = true);
// Event handlers
virtual void onAccel (finalcut::FAccelEvent*);
virtual void onClose (finalcut::FCloseEvent*);
virtual void onAccel (finalcut::FAccelEvent*) override;
virtual void onClose (finalcut::FCloseEvent*) override;
private:
// Methods
virtual void draw();
virtual void draw() override;
void drawBrush (int, int, bool = false);
void drawCanvas();
virtual void adjustSize();
virtual void adjustSize() override;
// Event handler
virtual void onMouseDown (finalcut::FMouseEvent*);
virtual void onMouseMove (finalcut::FMouseEvent*);
virtual void onMouseDown (finalcut::FMouseEvent*) override;
virtual void onMouseMove (finalcut::FMouseEvent*) override;
// Callback methods
void cb_colorChanged (finalcut::FWidget*, FDataPtr);

View File

@ -50,7 +50,7 @@ class Scrollview : public finalcut::FScrollView
private:
// Method
virtual void draw();
virtual void draw() override;
// Callback methods
void cb_go_east (finalcut::FWidget*, FDataPtr);
@ -197,7 +197,7 @@ class Scrollviewdemo : public finalcut::FDialog
~Scrollviewdemo();
// Event handler
virtual void onClose (finalcut::FCloseEvent*);
virtual void onClose (finalcut::FCloseEvent*) override;
// Callback method
void cb_quit (finalcut::FWidget* = nullptr, FDataPtr = nullptr);

View File

@ -47,9 +47,9 @@ class AttribDlg : public finalcut::FDialog
AttribDlg& operator = (const AttribDlg&) = delete;
// Event handlers
virtual void onAccel (finalcut::FAccelEvent*);
virtual void onWheel (finalcut::FWheelEvent*);
virtual void onClose (finalcut::FCloseEvent*);
virtual void onAccel (finalcut::FAccelEvent*) override;
virtual void onWheel (finalcut::FWheelEvent*) override;
virtual void onClose (finalcut::FCloseEvent*) override;
// Callback methods
void cb_next (finalcut::FWidget* = nullptr, FDataPtr = nullptr);
@ -60,7 +60,7 @@ class AttribDlg : public finalcut::FDialog
private:
// Method
virtual void adjustSize();
virtual void adjustSize() override;
// Data Members
finalcut::FButton next_button{"&Next >", this};
@ -195,7 +195,7 @@ class AttribDemo : public finalcut::FWidget
{ }
// Event handler
virtual void onWheel (finalcut::FWheelEvent* ev)
virtual void onWheel (finalcut::FWheelEvent* ev) override
{
auto p = static_cast<AttribDlg*>(getParentWidget());
@ -220,7 +220,7 @@ class AttribDemo : public finalcut::FWidget
void printStandout();
void printInvisible();
void printProtected();
virtual void draw();
virtual void draw() override;
// Data Member
int colors;

View File

@ -35,11 +35,11 @@ class Timer : public finalcut::FWidget
protected:
// Method
virtual void draw();
virtual void draw() override;
// Event handlers
virtual void onTimer (finalcut::FTimerEvent*);
virtual void onAccel (finalcut::FAccelEvent*);
virtual void onTimer (finalcut::FTimerEvent*) override;
virtual void onAccel (finalcut::FAccelEvent*) override;
};
//----------------------------------------------------------------------

View File

@ -56,10 +56,10 @@ class Transparent : public finalcut::FDialog
private:
// Method
virtual void draw();
virtual void draw() override;
// Event handlers
virtual void onKeyPress (finalcut::FKeyEvent* ev);
virtual void onKeyPress (finalcut::FKeyEvent* ev) override;
// Data Members
trans_type type;
@ -165,13 +165,13 @@ class MainWindow : public finalcut::FDialog
private:
// Method
virtual void draw();
virtual void draw() override;
// Event handlers
virtual void onClose (finalcut::FCloseEvent*);
virtual void onShow (finalcut::FShowEvent*);
virtual void onTimer (finalcut::FTimerEvent*);
virtual void onKeyPress (finalcut::FKeyEvent* ev)
virtual void onClose (finalcut::FCloseEvent*) override;
virtual void onShow (finalcut::FShowEvent*) override;
virtual void onTimer (finalcut::FTimerEvent*) override;
virtual void onKeyPress (finalcut::FKeyEvent* ev) override
{
if ( ! ev )
return;

View File

@ -131,7 +131,7 @@ class Treeview : public finalcut::FDialog
struct TreeItem; // forward declaration
// Methods
virtual void adjustSize();
virtual void adjustSize() override;
// Event handler
void onClose (finalcut::FCloseEvent*);

View File

@ -51,8 +51,8 @@ class ProgressDialog : public finalcut::FDialog
private:
// Event handlers
virtual void onShow (finalcut::FShowEvent*);
virtual void onTimer (finalcut::FTimerEvent*);
virtual void onShow (finalcut::FShowEvent*) override;
virtual void onTimer (finalcut::FTimerEvent*) override;
// Callback methods
void cb_reset_bar (finalcut::FWidget*, FDataPtr);
@ -199,7 +199,7 @@ class TextWindow : public finalcut::FDialog
private:
// Method
virtual void adjustSize();
virtual void adjustSize() override;
// Data Members
finalcut::FTextView scrollText{this};
@ -279,10 +279,10 @@ class MyDialog : public finalcut::FDialog
void initButtons();
void initLabels();
void initWidgetsCallbacks();
virtual void adjustSize();
virtual void adjustSize() override;
// Event handlers
virtual void onClose (finalcut::FCloseEvent*);
virtual void onClose (finalcut::FCloseEvent*) override;
// Callback methods
void cb_noFunctionMsg (finalcut::FWidget*, FDataPtr);

View File

@ -50,8 +50,8 @@ class Watch : public finalcut::FDialog
void printTime();
// Event handlers
virtual void onTimer (finalcut::FTimerEvent*);
virtual void onClose (finalcut::FCloseEvent*);
virtual void onTimer (finalcut::FTimerEvent*) override;
virtual void onClose (finalcut::FCloseEvent*) override;
// Callback methods
void cb_clock (finalcut::FWidget*, FDataPtr);
@ -59,7 +59,7 @@ class Watch : public finalcut::FDialog
protected:
// Method
virtual void adjustSize();
virtual void adjustSize() override;
private:
// Data Members

View File

@ -48,11 +48,11 @@ class SmallWindow : public finalcut::FDialog
private:
// Method
virtual void adjustSize();
virtual void adjustSize() override;
// Event handlers
virtual void onShow (finalcut::FShowEvent*);
virtual void onTimer (finalcut::FTimerEvent*);
virtual void onShow (finalcut::FShowEvent*) override;
virtual void onTimer (finalcut::FTimerEvent*) override;
// Data Members
finalcut::FLabel left_arrow{this};
@ -202,12 +202,12 @@ class Window : public finalcut::FDialog
void configureFileMenuItems();
void configureDialogButtons();
void activateWindow (finalcut::FDialog*);
virtual void adjustSize();
virtual void adjustSize() override;
void addClickedCallback (finalcut::FWidget*, WindowCallback);
void addClickedCallback (finalcut::FWidget*, FAppCallback);
// Event handlers
virtual void onClose (finalcut::FCloseEvent*);
virtual void onClose (finalcut::FCloseEvent*) override;
// Callback methods
void cb_createWindows (finalcut::FWidget*, FDataPtr);

View File

@ -707,7 +707,7 @@ void FDialog::onWindowActive (FEvent*)
void FDialog::onWindowInactive (FEvent*)
{
if ( dialog_menu && ! dialog_menu->isVisible() )
FWindow::previous_window = this;
FWindow::setPreviousWindow(this);
if ( isVisible() && isEnabled() )
drawTitleBar();

View File

@ -29,7 +29,7 @@ namespace finalcut
// static class attributes
bool FObject::timer_modify_lock;
FObject::TimerListPtr FObject::timer_list = nullptr;
FObject::TimerList* FObject::timer_list = nullptr;
const FString* fc::emptyFString::empty_string = nullptr;
@ -55,7 +55,7 @@ FObject::FObject (FObject* parent)
{
try
{
timer_list = std::make_shared<TimerList>();
timer_list = new TimerList;
}
catch (const std::bad_alloc& ex)
{
@ -72,7 +72,10 @@ FObject::~FObject() // destructor
delOwnTimer(); // Delete all timers of this object
if ( ! has_parent && timer_list )
{
delete timer_list;
timer_list = nullptr;
}
if ( ! has_parent && ! fc::emptyFString::isNull() )
fc::emptyFString::clear();

View File

@ -96,7 +96,7 @@ class FApplication : public FWidget
FApplication& operator = (const FApplication&) = delete;
// Accessors
const char* getClassName() const;
virtual const char* getClassName() const override;
int getArgc() const;
char** getArgv() const;
static FApplication* getApplicationObject();
@ -172,7 +172,7 @@ class FApplication : public FWidget
void processCloseWidget();
bool processNextEvent();
virtual void performTimerAction ( const FObject*
, const FEvent* );
, const FEvent* ) override;
// Data Members
int app_argc;

View File

@ -84,7 +84,7 @@ class FButton : public FWidget
FButton& operator = (const FString&);
// Accessors
const char* getClassName() const;
virtual const char* getClassName() const override;
FString& getText();
// Mutators
@ -98,13 +98,13 @@ class FButton : public FWidget
bool setNoUnderline(bool);
bool setNoUnderline();
bool unsetNoUnderline();
virtual bool setEnable(bool);
virtual bool setEnable();
virtual bool unsetEnable();
virtual bool setDisable();
virtual bool setFocus(bool);
virtual bool setFocus();
virtual bool unsetFocus();
virtual bool setEnable(bool) override;
virtual bool setEnable() override;
virtual bool unsetEnable() override;
virtual bool setDisable() override;
virtual bool setFocus(bool) override;
virtual bool setFocus() override;
virtual bool unsetFocus() override;
bool setFlat(bool);
bool setFlat();
bool unsetFlat();
@ -126,17 +126,17 @@ class FButton : public FWidget
bool hasClickAnimation();
// Methods
virtual void hide();
virtual void hide() override;
// Event handlers
virtual void onKeyPress (FKeyEvent*);
virtual void onMouseDown (FMouseEvent*);
virtual void onMouseUp (FMouseEvent*);
virtual void onMouseMove (FMouseEvent*);
virtual void onTimer (FTimerEvent*);
virtual void onAccel (FAccelEvent*);
virtual void onFocusIn (FFocusEvent*);
virtual void onFocusOut (FFocusEvent*);
virtual void onKeyPress (FKeyEvent*) override;
virtual void onMouseDown (FMouseEvent*) override;
virtual void onMouseUp (FMouseEvent*) override;
virtual void onMouseMove (FMouseEvent*) override;
virtual void onTimer (FTimerEvent*) override;
virtual void onAccel (FAccelEvent*) override;
virtual void onFocusIn (FFocusEvent*) override;
virtual void onFocusOut (FFocusEvent*) override;
private:
// Constants
@ -154,7 +154,7 @@ class FButton : public FWidget
void drawMarginRight();
void drawTopBottomBackground();
void drawButtonTextLine (wchar_t[]);
virtual void draw();
virtual void draw() override;
void updateStatusBar();
void updateButtonColor();
void processClick();

View File

@ -85,7 +85,7 @@ class FButtonGroup : public FScrollView
FButtonGroup& operator = (const FButtonGroup&) = delete;
// Accessor
const char* getClassName() const;
virtual const char* getClassName() const override;
FToggleButton* getFirstButton();
FToggleButton* getLastButton();
FToggleButton* getButton (int) const;
@ -93,10 +93,10 @@ class FButtonGroup : public FScrollView
FString& getText();
// Mutator
virtual bool setEnable(bool);
virtual bool setEnable();
virtual bool unsetEnable();
virtual bool setDisable();
virtual bool setEnable(bool) override;
virtual bool setEnable() override;
virtual bool unsetEnable() override;
virtual bool setDisable() override;
void setText (const FString&);
// Inquiries
@ -105,16 +105,16 @@ class FButtonGroup : public FScrollView
bool hasCheckedButton() const;
// Methods
virtual void hide();
virtual void hide() override;
void insert (FToggleButton*);
void remove (FToggleButton*);
void checkScrollSize (FToggleButton*);
void checkScrollSize (const FRect&);
// Event handlers
virtual void onMouseDown (FMouseEvent*);
virtual void onAccel (FAccelEvent*);
virtual void onFocusIn (FFocusEvent*);
virtual void onMouseDown (FMouseEvent*) override;
virtual void onAccel (FAccelEvent*) override;
virtual void onFocusIn (FFocusEvent*) override;
// Callback method
void cb_buttonToggled (FWidget*, FDataPtr);
@ -127,7 +127,7 @@ class FButtonGroup : public FScrollView
void setHotkeyAccelerator();
// Methods
virtual void draw();
virtual void draw() override;
void drawLabel();
private:

View File

@ -67,10 +67,10 @@ static uInt character[][fc::NUM_OF_ENCODINGS] =
{0x2592, 'a', 0xb0, '#'}, // ▒ - MediumShade
{0x2588, '0', 0xdb, '#'}, // █ - FullBlock
{0x25ae, '_', 0xfe, '#'}, // ▮ - BlackVerticalRectangle (1)
{0x258c, 0 , 0xdd, ' '}, // ▌ - LeftHalfBlock
{0x2590, 0 , 0xde, ' '}, // ▐ - RightHalfBlock
{0x2584, 0 , 0xdc, ' '}, // ▄ - LowerHalfBlock
{0x2580, 0 , 0xdf, ' '}, // ▀ - UpperHalfBlock
{0x258c, 0, 0xdd, ' '}, // ▌ - LeftHalfBlock
{0x2590, 0, 0xde, ' '}, // ▐ - RightHalfBlock
{0x2584, 0, 0xdc, ' '}, // ▄ - LowerHalfBlock
{0x2580, 0, 0xdf, ' '}, // ▀ - UpperHalfBlock
{0x2500, 'q', 0xc4, '-'}, // ─ - BoxDrawingsHorizontal
{0x2502, 'x', 0xb3, '|'}, // │ - BoxDrawingsVertical
{0x250c, 'l', 0xda, '.'}, // ┌ - BoxDrawingsDownAndRight

View File

@ -86,12 +86,12 @@ class FCheckBox : public FToggleButton
FCheckBox& operator = (const FCheckBox&) = delete;
// Accessor
const char* getClassName() const;
virtual const char* getClassName() const override;
private:
// Methods
void init();
virtual void draw();
virtual void draw() override;
void drawCheckButton();
};
#pragma pack(pop)

View File

@ -86,7 +86,7 @@ class FCheckMenuItem : public FMenuItem
FCheckMenuItem& operator = (const FCheckMenuItem&) = delete;
// Accessor
const char* getClassName() const;
virtual const char* getClassName() const override;
private:
// Methods

View File

@ -100,7 +100,7 @@ class FDialog : public FWindow
FDialog& operator = (const FDialog&) = delete;
// Accessors
virtual const char* getClassName() const;
virtual const char* getClassName() const override;
FString getText() const;
// Mutators
@ -110,7 +110,7 @@ class FDialog : public FWindow
bool setModal (bool);
bool setModal();
bool unsetModal();
virtual bool setResizeable (bool);
virtual bool setResizeable (bool) override;
bool setScrollable (bool);
bool setScrollable();
bool unsetScrollable();
@ -121,16 +121,16 @@ class FDialog : public FWindow
bool isScrollable();
// Methods
virtual void show();
virtual void hide();
virtual void show() override;
virtual void hide() override;
int exec();
virtual void setPos (int, int, bool = true);
virtual void move (int, int);
virtual void setPos (int, int, bool = true) override;
virtual void move (int, int) override;
bool moveUp (int);
bool moveDown (int);
bool moveLeft (int);
bool moveRight (int);
virtual void setSize (std::size_t, std::size_t, bool = true);
virtual void setSize (std::size_t, std::size_t, bool = true) override;
bool reduceHeight (int);
bool expandHeight (int);
bool reduceWidth (int);
@ -138,27 +138,27 @@ class FDialog : public FWindow
void activateDialog();
// Event handlers
virtual void onKeyPress (FKeyEvent*);
virtual void onMouseDown (FMouseEvent*);
virtual void onMouseUp (FMouseEvent*);
virtual void onMouseMove (FMouseEvent*);
virtual void onMouseDoubleClick (FMouseEvent*);
virtual void onAccel (FAccelEvent*);
virtual void onWindowActive (FEvent*);
virtual void onWindowInactive (FEvent*);
virtual void onWindowRaised (FEvent*);
virtual void onWindowLowered (FEvent*);
virtual void onKeyPress (FKeyEvent*) override;
virtual void onMouseDown (FMouseEvent*) override;
virtual void onMouseUp (FMouseEvent*) override;
virtual void onMouseMove (FMouseEvent*) override;
virtual void onMouseDoubleClick (FMouseEvent*) override;
virtual void onAccel (FAccelEvent*) override;
virtual void onWindowActive (FEvent*) override;
virtual void onWindowInactive (FEvent*) override;
virtual void onWindowRaised (FEvent*) override;
virtual void onWindowLowered (FEvent*) override;
protected:
// Methods
virtual void done (int);
virtual void draw();
virtual void draw() override;
void drawDialogShadow();
// Event handlers
virtual void onShow (FShowEvent*);
virtual void onHide (FHideEvent*);
virtual void onClose (FCloseEvent*);
virtual void onShow (FShowEvent*) override;
virtual void onHide (FHideEvent*) override;
virtual void onClose (FCloseEvent*) override;
private:
// Typedef
@ -184,7 +184,7 @@ class FDialog : public FWindow
void initMoveSizeMenuItem (FMenu*);
void initZoomMenuItem (FMenu*);
void initCloseMenuItem (FMenu*);
virtual void drawBorder();
virtual void drawBorder() override;
void drawTitleBar();
void drawBarButton();
void drawZoomButton();

View File

@ -92,7 +92,7 @@ class FDialogListMenu : public FMenu
FDialogListMenu& operator = (const FDialogListMenu&) = delete;
// Accessors
virtual const char* getClassName() const;
virtual const char* getClassName() const override;
private:
// Method

View File

@ -116,7 +116,7 @@ class FFileDialog : public FDialog
FFileDialog& operator = (const FFileDialog&);
// Accessors
const char* getClassName() const;
virtual const char* getClassName() const override;
const FString getPath() const;
const FString getFilter() const;
const FString getSelectedFile() const;
@ -130,7 +130,7 @@ class FFileDialog : public FDialog
bool unsetShowHiddenFiles();
// Event handler
virtual void onKeyPress (FKeyEvent*);
virtual void onKeyPress (FKeyEvent*) override;
// Methods
static const FString fileOpenChooser ( FWidget*
@ -142,7 +142,7 @@ class FFileDialog : public FDialog
protected:
// Method
virtual void adjustSize();
virtual void adjustSize() override;
private:
// Typedef

View File

@ -100,7 +100,7 @@ class FLabel : public FWidget
const FLabel& operator >> (FString&);
// Accessors
const char* getClassName() const;
virtual const char* getClassName() const override;
FWidget* getAccelWidget();
fc::text_alignment getAlignment();
FString& getText();
@ -114,7 +114,7 @@ class FLabel : public FWidget
bool setReverseMode(bool);
bool setReverseMode();
bool unsetReverseMode();
virtual bool setEnable (bool);
virtual bool setEnable (bool) override;
void setNumber (uLong);
void setNumber (long);
void setNumber (float, int = FLT_DIG);
@ -127,12 +127,12 @@ class FLabel : public FWidget
bool hasReverseMode();
// Methods
virtual void hide();
virtual void hide() override;
void clear();
// Event handlers
virtual void onMouseDown (FMouseEvent*);
virtual void onAccel (FAccelEvent*);
virtual void onMouseDown (FMouseEvent*) override;
virtual void onAccel (FAccelEvent*) override;
// Callback method
void cb_accel_widget_destroyed (FWidget*, FDataPtr);
@ -147,7 +147,7 @@ class FLabel : public FWidget
std::size_t getHotkeyPos (wchar_t[], wchar_t[], std::size_t);
void setHotkeyAccelerator();
std::size_t getAlignOffset (std::size_t);
virtual void draw();
virtual void draw() override;
void drawMultiLine();
void drawSingleLine();
void printLine ( wchar_t[], std::size_t

View File

@ -103,7 +103,7 @@ class FLineEdit : public FWidget
const FLineEdit& operator >> (FString&);
// Accessors
const char* getClassName() const;
virtual const char* getClassName() const override;
FString getText() const;
int getLabelOrientation();
@ -111,13 +111,13 @@ class FLineEdit : public FWidget
void setText (const FString&);
void setLabelText (const FString&);
void setLabelOrientation(const label_o);
virtual bool setEnable(bool);
virtual bool setEnable();
virtual bool unsetEnable();
virtual bool setDisable();
virtual bool setFocus(bool);
virtual bool setFocus();
virtual bool unsetFocus();
virtual bool setEnable(bool) override;
virtual bool setEnable() override;
virtual bool unsetEnable() override;
virtual bool setDisable() override;
virtual bool setFocus(bool) override;
virtual bool setFocus() override;
virtual bool unsetFocus() override;
bool setShadow(bool);
bool setShadow();
bool unsetShadow();
@ -126,23 +126,23 @@ class FLineEdit : public FWidget
bool hasShadow();
// Methods
virtual void hide();
virtual void hide() override;
void clear();
// Event handlers
virtual void onKeyPress (FKeyEvent*);
virtual void onMouseDown (FMouseEvent*);
virtual void onMouseUp (FMouseEvent*);
virtual void onMouseMove (FMouseEvent*);
virtual void onTimer (FTimerEvent*);
virtual void onAccel (FAccelEvent*);
virtual void onHide (FHideEvent*);
virtual void onFocusIn (FFocusEvent*);
virtual void onFocusOut (FFocusEvent*);
virtual void onKeyPress (FKeyEvent*) override;
virtual void onMouseDown (FMouseEvent*) override;
virtual void onMouseUp (FMouseEvent*) override;
virtual void onMouseMove (FMouseEvent*) override;
virtual void onTimer (FTimerEvent*) override;
virtual void onAccel (FAccelEvent*) override;
virtual void onHide (FHideEvent*) override;
virtual void onFocusIn (FFocusEvent*) override;
virtual void onFocusOut (FFocusEvent*) override;
protected:
void adjustLabel();
virtual void adjustSize();
virtual void adjustSize() override;
private:
// Enumeration
@ -156,7 +156,7 @@ class FLineEdit : public FWidget
// Methods
void init();
bool hasHotkey();
virtual void draw();
virtual void draw() override;
void drawInputField();
void keyLeft();
void keyRight();

View File

@ -85,6 +85,7 @@ class FListBoxItem
FListBoxItem& operator = (const FListBoxItem&);
// Accessors
virtual const char* getClassName() const;
virtual FString& getText();
virtual FDataPtr getData() const;
@ -109,6 +110,10 @@ class FListBoxItem
// FListBoxItem inline functions
//----------------------------------------------------------------------
inline const char* FListBoxItem::getClassName() const
{ return "FListBoxItem"; }
//----------------------------------------------------------------------
inline FString& FListBoxItem::getText()
{ return text; }
@ -163,7 +168,7 @@ class FListBox : public FWidget
FListBox& operator = (const FListBox&) = delete;
// Accessors
const char* getClassName() const;
virtual const char* getClassName() const override;
std::size_t getCount() const;
FListBoxItem getItem (std::size_t);
FListBoxItem getItem (listBoxItems::iterator) const;
@ -182,14 +187,14 @@ class FListBox : public FWidget
void showNoBrackets (listBoxItems::iterator);
virtual void setGeometry ( int, int
, std::size_t, std::size_t
, bool = true );
, bool = true ) override;
void setMultiSelection (bool);
void setMultiSelection ();
void unsetMultiSelection ();
virtual bool setDisable();
virtual bool setFocus (bool);
virtual bool setFocus();
virtual bool unsetFocus();
virtual bool setDisable() override;
virtual bool setFocus (bool) override;
virtual bool setFocus() override;
virtual bool unsetFocus() override;
void setText (const FString&);
// Inquiries
@ -200,7 +205,7 @@ class FListBox : public FWidget
bool hasBrackets (listBoxItems::iterator) const;
// Methods
virtual void hide();
virtual void hide() override;
template <typename Iterator, typename InsertConverter>
void insert (Iterator, Iterator, InsertConverter);
template <typename Container, typename LazyConverter>
@ -215,20 +220,20 @@ class FListBox : public FWidget
void clear();
// Event handlers
virtual void onKeyPress (FKeyEvent*);
virtual void onMouseDown (FMouseEvent*);
virtual void onMouseUp (FMouseEvent*);
virtual void onMouseMove (FMouseEvent*);
virtual void onMouseDoubleClick (FMouseEvent*);
virtual void onWheel (FWheelEvent*);
virtual void onTimer (FTimerEvent*);
virtual void onFocusIn (FFocusEvent*);
virtual void onFocusOut (FFocusEvent*);
virtual void onKeyPress (FKeyEvent*) override;
virtual void onMouseDown (FMouseEvent*) override;
virtual void onMouseUp (FMouseEvent*) override;
virtual void onMouseMove (FMouseEvent*) override;
virtual void onMouseDoubleClick (FMouseEvent*) override;
virtual void onWheel (FWheelEvent*) override;
virtual void onTimer (FTimerEvent*) override;
virtual void onFocusIn (FFocusEvent*) override;
virtual void onFocusOut (FFocusEvent*) override;
protected:
// Methods
void adjustYOffset (std::size_t);
virtual void adjustSize();
virtual void adjustSize() override;
private:
// Typedef
@ -247,7 +252,7 @@ class FListBox : public FWidget
// Methods
void init();
virtual void draw();
virtual void draw() override;
void drawHeadline();
void drawList();
void drawListLine (int, listBoxItems::iterator, bool);

View File

@ -92,7 +92,7 @@ class FListViewItem : public FObject
FListViewItem& operator = (const FListViewItem&);
// Accessors
const char* getClassName() const;
virtual const char* getClassName() const;
uInt getColumnCount() const;
int getSortColumn() const;
FString getText (int) const;
@ -215,7 +215,7 @@ class FListViewIterator
bool operator != (const FListViewIterator&) const;
// Accessor
const char* getClassName() const;
virtual const char* getClassName() const;
int getPosition() const;
// Methods
@ -285,7 +285,7 @@ class FListView : public FWidget
FListView& operator = (const FListView&) = delete;
// Accessors
const char* getClassName() const;
virtual const char* getClassName() const override;
std::size_t getCount();
fc::text_alignment getColumnAlignment (int) const;
FString getColumnText (int) const;
@ -297,7 +297,7 @@ class FListView : public FWidget
// Mutators
virtual void setGeometry ( int, int
, std::size_t, std::size_t
, bool = true );
, bool = true ) override;
void setColumnAlignment (int, fc::text_alignment);
void setColumnText (int, const FString&);
void setColumnSortType (int, fc::sorting_type \
@ -336,15 +336,15 @@ class FListView : public FWidget
virtual void sort();
// Event handlers
virtual void onKeyPress (FKeyEvent*);
virtual void onMouseDown (FMouseEvent*);
virtual void onMouseUp (FMouseEvent*);
virtual void onMouseMove (FMouseEvent*);
virtual void onMouseDoubleClick (FMouseEvent*);
virtual void onWheel (FWheelEvent*);
virtual void onTimer (FTimerEvent*);
virtual void onFocusIn (FFocusEvent*);
virtual void onFocusOut (FFocusEvent*);
virtual void onKeyPress (FKeyEvent*) override;
virtual void onMouseDown (FMouseEvent*) override;
virtual void onMouseUp (FMouseEvent*) override;
virtual void onMouseMove (FMouseEvent*) override;
virtual void onMouseDoubleClick (FMouseEvent*) override;
virtual void onWheel (FWheelEvent*) override;
virtual void onTimer (FTimerEvent*) override;
virtual void onFocusIn (FFocusEvent*) override;
virtual void onFocusOut (FFocusEvent*) override;
// Data Members
static FObjectIterator null_iter;
@ -352,7 +352,7 @@ class FListView : public FWidget
protected:
// Methods
void adjustViewport (int);
virtual void adjustSize();
virtual void adjustSize() override;
private:
// Typedef
@ -371,7 +371,7 @@ class FListView : public FWidget
std::size_t getAlignOffset ( fc::text_alignment
, std::size_t
, std::size_t );
virtual void draw();
virtual void draw() override;
void drawHeadlines();
void drawList();
void drawListLine (const FListViewItem*, bool, bool);

View File

@ -91,21 +91,21 @@ class FMenu : public FWindow, public FMenuList
FMenu& operator = (const FMenu&) = delete;
// Accessors
virtual const char* getClassName() const;
virtual const char* getClassName() const override;
FString getText() const;
FMenuItem* getItem();
// Mutators
virtual bool setEnable(bool);
virtual bool setEnable();
virtual bool unsetEnable();
virtual bool setDisable();
virtual bool setEnable(bool) override;
virtual bool setEnable() override;
virtual bool unsetEnable() override;
virtual bool setDisable() override;
void setSelected();
void unsetSelected();
bool setMenuWidget (bool);
bool setMenuWidget();
bool unsetMenuWidget();
virtual void setStatusbarMessage (const FString&);
virtual void setStatusbarMessage (const FString&) override;
void setMenu (FMenu*);
void setText (const FString&);
@ -116,15 +116,15 @@ class FMenu : public FWindow, public FMenuList
bool hasMenu() const;
// Methods
virtual void show();
virtual void hide();
virtual void show() override;
virtual void hide() override;
// Event handlers
virtual void onKeyPress (FKeyEvent*);
virtual void onMouseDown (FMouseEvent*);
virtual void onMouseUp (FMouseEvent*);
virtual void onMouseMove (FMouseEvent*);
virtual void onAccel (FAccelEvent*);
virtual void onKeyPress (FKeyEvent*) override;
virtual void onMouseDown (FMouseEvent*) override;
virtual void onMouseUp (FMouseEvent*) override;
virtual void onMouseMove (FMouseEvent*) override;
virtual void onAccel (FAccelEvent*) override;
// Callback method
void cb_menuitem_toggled (FWidget*, FDataPtr);
@ -201,7 +201,7 @@ class FMenu : public FWindow, public FMenuList
void keypressMenuBar (FKeyEvent*);
bool hotkeyMenu (FKeyEvent*);
std::size_t getHotkeyPos (wchar_t[], wchar_t[], std::size_t);
virtual void draw();
virtual void draw() override;
void drawItems();
void drawSeparator (int);
void drawMenuLine (FMenuItem*, int);

View File

@ -89,19 +89,19 @@ class FMenuBar : public FWindow, public FMenuList
FMenuBar& operator = (const FMenuBar&) = delete;
// Accessors
virtual const char* getClassName() const;
virtual const char* getClassName() const override;
// Methods
void resetMenu();
virtual void hide();
virtual void adjustSize();
virtual void hide() override;
virtual void adjustSize() override;
// Event handlers
virtual void onKeyPress (FKeyEvent*);
virtual void onMouseDown (FMouseEvent*);
virtual void onMouseUp (FMouseEvent*);
virtual void onMouseMove (FMouseEvent*);
virtual void onAccel (FAccelEvent*);
virtual void onKeyPress (FKeyEvent*) override;
virtual void onMouseDown (FMouseEvent*) override;
virtual void onMouseUp (FMouseEvent*) override;
virtual void onMouseMove (FMouseEvent*) override;
virtual void onAccel (FAccelEvent*) override;
// Callback methods
void cb_item_deactivated (FWidget*, FDataPtr);
@ -130,7 +130,7 @@ class FMenuBar : public FWindow, public FMenuList
bool selectPrevItem();
bool hotkeyMenu (FKeyEvent*&);
std::size_t getHotkeyPos (wchar_t[], wchar_t[], std::size_t);
virtual void draw();
virtual void draw() override;
void drawItems();
void drawItem (FMenuItem*, std::size_t&);
void setLineAttributes (FMenuItem*);

View File

@ -96,17 +96,17 @@ class FMenuItem : public FWidget
FMenuItem& operator = (const FMenuItem&) = delete;
// Accessors
const char* getClassName() const;
virtual const char* getClassName() const override;
uChar getHotkey() const;
FMenu* getMenu() const;
std::size_t getTextLength() const;
FString getText() const;
// Mutators
virtual bool setEnable (bool);
virtual bool setFocus (bool);
virtual bool setFocus();
virtual bool unsetFocus();
virtual bool setEnable (bool) override;
virtual bool setFocus (bool) override;
virtual bool setFocus() override;
virtual bool unsetFocus() override;
void setSelected();
void unsetSelected();
void setSeparator();
@ -124,19 +124,19 @@ class FMenuItem : public FWidget
bool hasMenu() const;
// Methods
virtual void addAccelerator (FKey, FWidget*);
virtual void delAccelerator (FWidget*);
virtual void addAccelerator (FKey, FWidget*) override;
virtual void delAccelerator (FWidget*) override;
void openMenu();
// Event handlers
virtual void onKeyPress (FKeyEvent*);
virtual void onMouseDoubleClick (FMouseEvent*);
virtual void onMouseDown (FMouseEvent*);
virtual void onMouseUp (FMouseEvent*);
virtual void onMouseMove (FMouseEvent*);
virtual void onAccel (FAccelEvent*);
virtual void onFocusIn (FFocusEvent*);
virtual void onFocusOut (FFocusEvent*);
virtual void onKeyPress (FKeyEvent*) override;
virtual void onMouseDoubleClick (FMouseEvent*) override;
virtual void onMouseDown (FMouseEvent*) override;
virtual void onMouseUp (FMouseEvent*) override;
virtual void onMouseMove (FMouseEvent*) override;
virtual void onAccel (FAccelEvent*) override;
virtual void onFocusIn (FFocusEvent*) override;
virtual void onFocusOut (FFocusEvent*) override;
protected:
// Accessor

View File

@ -107,7 +107,7 @@ class FMessageBox : public FDialog
FMessageBox& operator = (const FMessageBox&);
// Accessor
const char* getClassName() const;
virtual const char* getClassName() const override;
const FString getTitlebarText() const;
const FString getHeadline() const;
const FString getText() const;
@ -137,7 +137,7 @@ class FMessageBox : public FDialog
, int = 0 );
protected:
// Method
virtual void adjustSize();
virtual void adjustSize() override;
// Callback method
void cb_processClick (FWidget*, FDataPtr);
@ -149,7 +149,7 @@ class FMessageBox : public FDialog
void deallocation();
void initCallbacks();
void calculateDimensions();
virtual void draw();
virtual void draw() override;
void resizeButtons();
void adjustButtons();

View File

@ -208,12 +208,12 @@ class FMouseGPM : public FMouse
void setStdinNo(int);
// Inquiry
virtual bool hasData();
virtual bool hasData() override;
bool isGpmMouseEnabled();
// Methods
virtual void setRawData (FKeyboard::keybuffer&);
virtual void processEvent (struct timeval*);
virtual void setRawData (FKeyboard::keybuffer&) override;
virtual void processEvent (struct timeval*) override;
bool gpmMouse (bool);
bool enableGpmMouse();
bool disableGpmMouse();
@ -277,11 +277,11 @@ class FMouseX11 : public FMouse
virtual const char* getClassName() const;
// Inquiry
virtual bool hasData();
virtual bool hasData() override;
// Methods
virtual void setRawData (FKeyboard::keybuffer&);
virtual void processEvent (struct timeval*);
virtual void setRawData (FKeyboard::keybuffer&) override;
virtual void processEvent (struct timeval*) override;
private:
// Enumeration
@ -340,11 +340,11 @@ class FMouseSGR : public FMouse
virtual const char* getClassName() const;
// Inquiry
virtual bool hasData();
virtual bool hasData() override;
// Methods
virtual void setRawData (FKeyboard::keybuffer&);
virtual void processEvent (struct timeval*);
virtual void setRawData (FKeyboard::keybuffer&) override;
virtual void processEvent (struct timeval*) override;
private:
// Enumeration
@ -403,11 +403,11 @@ class FMouseUrxvt : public FMouse
virtual const char* getClassName() const;
// Inquiry
virtual bool hasData();
virtual bool hasData() override;
// Methods
virtual void setRawData (FKeyboard::keybuffer&);
virtual void processEvent (struct timeval*);
virtual void setRawData (FKeyboard::keybuffer&) override;
virtual void processEvent (struct timeval*) override;
private:
// Enumeration

View File

@ -131,7 +131,6 @@ class FObject
// Typedefs
typedef std::vector<timer_data> TimerList;
typedef std::shared_ptr<TimerList> TimerListPtr;
// Accessor
TimerList* getTimerList() const;
@ -156,7 +155,7 @@ class FObject
bool has_parent{false};
bool widget_object{false};
static bool timer_modify_lock;
static TimerListPtr timer_list;
static TimerList* timer_list;
};
#pragma pack(pop)
@ -223,7 +222,7 @@ inline bool FObject::isTimerInUpdating() const
//----------------------------------------------------------------------
inline FObject::TimerList* FObject::getTimerList() const
{ return timer_list.get(); }
{ return timer_list; }
//----------------------------------------------------------------------
inline void FObject::setWidgetProperty (bool property)

View File

@ -77,12 +77,14 @@ class FProgressbar : public FWidget
virtual ~FProgressbar();
// Accessors
const char* getClassName() const;
virtual const char* getClassName() const override;
std::size_t getPercentage();
// Mutators
void setPercentage (std::size_t);
virtual void setGeometry (int, int, std::size_t, std::size_t, bool = true);
virtual void setGeometry ( int, int
, std::size_t, std::size_t
, bool = true) override;
bool setShadow (bool);
bool setShadow();
bool unsetShadow();
@ -91,7 +93,7 @@ class FProgressbar : public FWidget
bool hasShadow();
// Methods
virtual void hide();
virtual void hide() override;
void reset();
private:
@ -99,7 +101,7 @@ class FProgressbar : public FWidget
static constexpr std::size_t NOT_SET = static_cast<std::size_t>(-1);
// Methods
virtual void draw();
virtual void draw() override;
void drawPercentage();
void drawBar();

View File

@ -86,12 +86,12 @@ class FRadioButton : public FToggleButton
FRadioButton& operator = (const FRadioButton&) = delete;
// Accessor
const char* getClassName() const;
virtual const char* getClassName() const override;
private:
// Methods
void init();
virtual void draw();
virtual void draw() override;
void drawRadioButton();
};
#pragma pack(pop)

View File

@ -86,7 +86,7 @@ class FRadioMenuItem : public FMenuItem
FRadioMenuItem& operator = (const FRadioMenuItem&) = delete;
// Accessor
const char* getClassName() const;
virtual const char* getClassName() const override;
private:
// Methods

View File

@ -97,7 +97,7 @@ class FScrollbar : public FWidget
FScrollbar& operator = (const FScrollbar&) = delete;
// Accessors
const char* getClassName() const;
virtual const char* getClassName() const override;
int getValue() const;
sType getScrollType() const;
@ -109,27 +109,29 @@ class FScrollbar : public FWidget
void setSteps (double);
void setPageSize (int, int);
void setOrientation (int);
virtual void setGeometry (int, int, std::size_t, std::size_t, bool = true);
virtual void setGeometry ( int, int
, std::size_t, std::size_t
, bool = true) override;
// Methods
virtual void resize();
virtual void redraw();
virtual void resize() override;
virtual void redraw() override;
void calculateSliderValues();
void drawVerticalBar();
void drawHorizontalBar();
void drawBar();
// Event handlers
virtual void onMouseDown (FMouseEvent*);
virtual void onMouseUp (FMouseEvent*);
virtual void onMouseMove (FMouseEvent*);
virtual void onWheel (FWheelEvent*);
virtual void onTimer (FTimerEvent*);
virtual void onMouseDown (FMouseEvent*) override;
virtual void onMouseUp (FMouseEvent*) override;
virtual void onMouseMove (FMouseEvent*) override;
virtual void onWheel (FWheelEvent*) override;
virtual void onTimer (FTimerEvent*) override;
private:
// Methods
void init();
virtual void draw();
virtual void draw() override;
void drawButtons();
sType getClickedScrollType (int, int);
sType getVerticalClickedScrollType (int);

View File

@ -89,7 +89,7 @@ class FScrollView : public FWidget
FScrollView& operator = (const FScrollView&) = delete;
// Accessors
const char* getClassName() const;
virtual const char* getClassName() const override;
std::size_t getViewportWidth() const;
std::size_t getViewportHeight() const;
std::size_t getScrollWidth() const;
@ -102,15 +102,15 @@ class FScrollView : public FWidget
virtual void setScrollWidth (std::size_t);
virtual void setScrollHeight (std::size_t);
virtual void setScrollSize (std::size_t, std::size_t);
virtual void setX (int, bool = true);
virtual void setY (int, bool = true);
virtual void setPos (int, int, bool = true);
virtual void setWidth (std::size_t, bool = true);
virtual void setHeight (std::size_t, bool = true);
virtual void setSize (std::size_t, std::size_t, bool = true);
virtual void setX (int, bool = true) override;
virtual void setY (int, bool = true) override;
virtual void setPos (int, int, bool = true) override;
virtual void setWidth (std::size_t, bool = true) override;
virtual void setHeight (std::size_t, bool = true) override;
virtual void setSize (std::size_t, std::size_t, bool = true) override;
virtual void setGeometry ( int, int
, std::size_t, std::size_t
, bool = true );
, bool = true ) override;
void setCursorPos (int, int);
void setPrintPos (int, int);
bool setViewportPrint (bool);
@ -127,20 +127,20 @@ class FScrollView : public FWidget
bool isViewportPrint();
// Method
virtual void clearArea (int = ' ');
virtual void clearArea (int = ' ') override;
void scrollToX (int);
void scrollToY (int);
void scrollTo (const FPoint&);
void scrollTo (int, int);
void scrollBy (int, int);
virtual void draw();
virtual void draw() override;
// Event handlers
virtual void onKeyPress (FKeyEvent*);
virtual void onWheel (FWheelEvent*);
virtual void onFocusIn (FFocusEvent*);
virtual void onChildFocusIn (FFocusEvent*);
virtual void onChildFocusOut (FFocusEvent*);
virtual void onKeyPress (FKeyEvent*) override;
virtual void onWheel (FWheelEvent*) override;
virtual void onFocusIn (FFocusEvent*) override;
virtual void onChildFocusIn (FFocusEvent*) override;
virtual void onChildFocusOut (FFocusEvent*) override;
protected:
// Using-declaration
@ -150,7 +150,7 @@ class FScrollView : public FWidget
term_area* getPrintArea();
// Method
virtual void adjustSize();
virtual void adjustSize() override;
void copy2area();
private:

View File

@ -93,7 +93,7 @@ class FStatusKey : public FWidget
FStatusKey& operator = (const FStatusKey&) = delete;
// Accessors
virtual const char* getClassName() const;
virtual const char* getClassName() const override;
virtual FKey getKey() const;
virtual FString getText() const;
@ -111,7 +111,7 @@ class FStatusKey : public FWidget
bool hasMouseFocus() const;
// Event handler
virtual void onAccel (FAccelEvent*);
virtual void onAccel (FAccelEvent*) override;
private:
// Methods
@ -206,7 +206,7 @@ class FStatusBar : public FWindow
FStatusBar& operator = (const FStatusBar&) = delete;
// Accessors
virtual const char* getClassName() const;
virtual const char* getClassName() const override;
FStatusKey* getStatusKey (int) const;
FString getMessage() const;
std::size_t getCount() const;
@ -221,19 +221,19 @@ class FStatusBar : public FWindow
bool hasActivatedKey();
// Methods
virtual void hide();
virtual void hide() override;
void drawMessage();
void clearMessage();
void insert (FStatusKey*);
void remove (FStatusKey*);
void remove (int);
void clear();
virtual void adjustSize();
virtual void adjustSize() override;
// Event handlers
virtual void onMouseDown (FMouseEvent*);
virtual void onMouseUp (FMouseEvent*);
virtual void onMouseMove (FMouseEvent*);
virtual void onMouseDown (FMouseEvent*) override;
virtual void onMouseUp (FMouseEvent*) override;
virtual void onMouseMove (FMouseEvent*) override;
// Callback method
void cb_statuskey_activated (FWidget*, FDataPtr);
@ -244,7 +244,7 @@ class FStatusBar : public FWindow
// Methods
void init();
virtual void draw();
virtual void draw() override;
void drawKeys();
void drawKey (keyList::const_iterator);
void drawActiveKey (keyList::const_iterator);

View File

@ -86,19 +86,19 @@ class FSwitch : public FToggleButton
FSwitch& operator = (const FSwitch&) = delete;
// Accessor
const char* getClassName() const;
virtual const char* getClassName() const override;
// Mutator
virtual void setText (const FString&);
virtual void setText (const FString&) override;
// Event handlers
virtual void onKeyPress (FKeyEvent*);
virtual void onMouseDown (FMouseEvent*);
virtual void onMouseUp (FMouseEvent*);
virtual void onKeyPress (FKeyEvent*) override;
virtual void onMouseDown (FMouseEvent*) override;
virtual void onMouseUp (FMouseEvent*) override;
private:
// Methods
virtual void draw();
virtual void draw() override;
void drawCheckButton();
void drawChecked();
void drawUnchecked();

View File

@ -93,7 +93,7 @@ class FTermcap
~FTermcap() = default;
// Accessors
const char* getClassName() const;
virtual const char* getClassName() const;
static tcap_map* getTermcapMap()
{

View File

@ -61,7 +61,7 @@ class FTermcapQuirks
virtual ~FTermcapQuirks();
// Accessor
const char* getClassName() const;
virtual const char* getClassName() const;
// Mutator
static void setFTermData (FTermData*);

View File

@ -90,7 +90,7 @@ class FTextView : public FWidget
FTextView& operator = (const FTextView&) = delete;
// Accessors
const char* getClassName() const;
virtual const char* getClassName() const override;
std::size_t getColumns() const;
std::size_t getRows() const;
const FString getText() const;
@ -99,7 +99,7 @@ class FTextView : public FWidget
// Mutators
virtual void setGeometry ( int, int
, std::size_t, std::size_t
, bool = true );
, bool = true ) override;
void setText (const FString&);
void scrollToX (int);
void scrollToY (int);
@ -108,7 +108,7 @@ class FTextView : public FWidget
void scrollBy (int, int);
// Methods
virtual void hide();
virtual void hide() override;
void append (const FString&);
void insert (const FString&, int);
void replaceRange (const FString&, int, int);
@ -117,17 +117,17 @@ class FTextView : public FWidget
void clear();
// Event handlers
virtual void onKeyPress (FKeyEvent*);
virtual void onMouseDown (FMouseEvent*);
virtual void onMouseUp (FMouseEvent*);
virtual void onMouseMove (FMouseEvent*);
virtual void onWheel (FWheelEvent*);
virtual void onFocusIn (FFocusEvent*);
virtual void onFocusOut (FFocusEvent*);
virtual void onKeyPress (FKeyEvent*) override;
virtual void onMouseDown (FMouseEvent*) override;
virtual void onMouseUp (FMouseEvent*) override;
virtual void onMouseMove (FMouseEvent*) override;
virtual void onWheel (FWheelEvent*) override;
virtual void onFocusIn (FFocusEvent*) override;
virtual void onFocusOut (FFocusEvent*) override;
protected:
// Method
virtual void adjustSize();
virtual void adjustSize() override;
private:
// Typedef
@ -143,7 +143,7 @@ class FTextView : public FWidget
// Methods
void init();
virtual void draw();
virtual void draw() override;
void drawText();
void processChanged();
void drawHBar();

View File

@ -87,21 +87,23 @@ class FToggleButton : public FWidget
FToggleButton& operator = (const FToggleButton&) = delete;
// Accessors
virtual const char* getClassName() const;
virtual const char* getClassName() const override;
FString& getText();
// Mutators
virtual void setGeometry (int, int, std::size_t, std::size_t, bool = true);
virtual void setGeometry ( int, int
, std::size_t, std::size_t
, bool = true) override;
bool setNoUnderline (bool);
bool setNoUnderline();
bool unsetNoUnderline();
virtual bool setEnable (bool);
virtual bool setEnable();
virtual bool unsetEnable();
virtual bool setDisable();
virtual bool setFocus (bool);
virtual bool setFocus();
virtual bool unsetFocus();
virtual bool setEnable (bool) override;
virtual bool setEnable() override;
virtual bool unsetEnable() override;
virtual bool setDisable() override;
virtual bool setFocus (bool) override;
virtual bool setFocus() override;
virtual bool unsetFocus() override;
bool setChecked (bool);
bool setChecked();
bool unsetChecked();
@ -111,15 +113,15 @@ class FToggleButton : public FWidget
bool isChecked();
// Methods
virtual void hide();
virtual void hide() override;
// Event handlers
virtual void onMouseDown (FMouseEvent*);
virtual void onMouseUp (FMouseEvent*);
virtual void onWheel (FWheelEvent*);
virtual void onAccel (FAccelEvent*);
virtual void onFocusIn (FFocusEvent*);
virtual void onFocusOut (FFocusEvent*);
virtual void onMouseDown (FMouseEvent*) override;
virtual void onMouseUp (FMouseEvent*) override;
virtual void onWheel (FWheelEvent*) override;
virtual void onAccel (FAccelEvent*) override;
virtual void onFocusIn (FFocusEvent*) override;
virtual void onFocusOut (FFocusEvent*) override;
protected:
// Accessor
@ -135,13 +137,13 @@ class FToggleButton : public FWidget
bool hasGroup() const;
// Methods
virtual void draw();
virtual void draw() override;
void drawLabel();
void processClick();
void processToggle();
// Event handler
virtual void onKeyPress (FKeyEvent*);
virtual void onKeyPress (FKeyEvent*) override;
// Data Members
bool checked{false};

View File

@ -88,25 +88,25 @@ class FToolTip : public FWindow
FToolTip& operator = (const FToolTip&) = delete;
// Accessors
const char* getClassName() const;
virtual const char* getClassName() const override;
const FString getText() const;
// Mutators
void setText (const FString&);
// Methods
virtual void draw();
virtual void show();
virtual void hide();
virtual void draw() override;
virtual void show() override;
virtual void hide() override;
// Event handler
virtual void onMouseDown (FMouseEvent*);
virtual void onMouseDown (FMouseEvent*) override;
private:
// Methods
void init();
void calculateDimensions();
virtual void adjustSize();
virtual void adjustSize() override;
// Data Members
FString text{};

View File

@ -177,7 +177,7 @@ class FWidget : public FVTerm, public FObject
FWidget& operator = (const FWidget&) = delete;
// Accessors
const char* getClassName() const;
virtual const char* getClassName() const override;
FWidget* getRootWidget() const;
FWidget* getParentWidget() const;
static FWidget*& getMainWidget();

View File

@ -94,7 +94,7 @@ class FWindow : public FWidget
FWindow& operator = (const FWindow&) = delete;
// Accessors
const char* getClassName() const;
virtual const char* getClassName() const override;
static FWindow* getWindowWidget (const FWidget*);
static int getWindowLayer (const FWidget*);
FWidget* getWindowFocusWidget() const;
@ -132,19 +132,19 @@ class FWindow : public FWidget
bool hasShadow() const;
// Methods
virtual void drawBorder();
virtual void show();
virtual void hide();
virtual void setX (int, bool = true);
virtual void setY (int, bool = true);
virtual void setPos (int, int, bool = true);
virtual void setWidth (std::size_t, bool = true);
virtual void setHeight (std::size_t, bool = true);
virtual void setSize (std::size_t, std::size_t, bool = true);
void setGeometry ( int, int
virtual void drawBorder() override;
virtual void show() override;
virtual void hide() override;
virtual void setX (int, bool = true) override;
virtual void setY (int, bool = true) override;
virtual void setPos (int, int, bool = true) override;
virtual void setWidth (std::size_t, bool = true) override;
virtual void setHeight (std::size_t, bool = true) override;
virtual void setSize (std::size_t, std::size_t, bool = true) override;
virtual void setGeometry ( int, int
, std::size_t, std::size_t
, bool = true );
virtual void move (int, int);
, bool = true ) override;
virtual void move (int, int) override;
static FWindow* getWindowWidgetAt (const FPoint&);
static FWindow* getWindowWidgetAt (int, int);
static void addWindow (FWidget*);
@ -157,22 +157,22 @@ class FWindow : public FWidget
bool zoomWindow ();
static void switchToPrevWindow (FWidget*);
static bool activatePrevWindow();
virtual void setShadowSize (int, int);
virtual void setShadowSize (int, int) override;
protected:
// Method
virtual void adjustSize();
virtual void adjustSize() override;
// Mutator
static void setPreviousWindow (FWindow*);
// Event handlers
virtual bool event (FEvent*);
virtual bool event (FEvent*) override;
virtual void onWindowActive (FEvent*);
virtual void onWindowInactive (FEvent*);
virtual void onWindowRaised (FEvent*);
virtual void onWindowLowered (FEvent*);
// Data Members
static FWindow* previous_window;
private:
// Methods
static void deleteFromAlwaysOnTopList (FWidget*);
@ -183,6 +183,8 @@ class FWindow : public FWidget
bool zoomed{false};
FWidget* win_focus_widget{nullptr};
FRect normalGeometry{};
static FWindow* previous_window;
};
#pragma pack(pop)
@ -276,6 +278,10 @@ inline bool FWindow::raiseWindow()
inline bool FWindow::lowerWindow()
{ return lowerWindow(this); }
//----------------------------------------------------------------------
inline void FWindow::setPreviousWindow (FWindow* w)
{ previous_window = w; }
} // namespace finalcut
#endif // FWINDOW_H