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,9 +96,9 @@ class FApplication : public FWidget
FApplication& operator = (const FApplication&) = delete;
// Accessors
const char* getClassName() const;
int getArgc() const;
char** getArgv() const;
virtual const char* getClassName() const override;
int getArgc() const;
char** getArgv() const;
static FApplication* getApplicationObject();
// Inquiry
@ -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,80 +84,80 @@ class FButton : public FWidget
FButton& operator = (const FString&);
// Accessors
const char* getClassName() const;
FString& getText();
virtual const char* getClassName() const override;
FString& getText();
// Mutators
void setForegroundColor (FColor);
void setBackgroundColor (FColor);
void setHotkeyForegroundColor (FColor);
void setFocusForegroundColor (FColor);
void setFocusBackgroundColor (FColor);
void setInactiveForegroundColor (FColor);
void setInactiveBackgroundColor (FColor);
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();
bool setFlat(bool);
bool setFlat();
bool unsetFlat();
bool setShadow(bool);
bool setShadow();
bool unsetShadow();
bool setDown(bool);
bool setDown();
bool setUp();
bool setClickAnimation(bool);
bool setClickAnimation();
bool unsetClickAnimation();
void setText (const FString&);
void setForegroundColor (FColor);
void setBackgroundColor (FColor);
void setHotkeyForegroundColor (FColor);
void setFocusForegroundColor (FColor);
void setFocusBackgroundColor (FColor);
void setInactiveForegroundColor (FColor);
void setInactiveBackgroundColor (FColor);
bool setNoUnderline(bool);
bool setNoUnderline();
bool unsetNoUnderline();
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();
bool setShadow(bool);
bool setShadow();
bool unsetShadow();
bool setDown(bool);
bool setDown();
bool setUp();
bool setClickAnimation(bool);
bool setClickAnimation();
bool unsetClickAnimation();
void setText (const FString&);
// Inquiries
bool isFlat() const;
bool isDown() const;
bool hasShadow() const;
bool hasClickAnimation();
bool isFlat() const;
bool isDown() const;
bool hasShadow() const;
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
static constexpr std::size_t NOT_SET = static_cast<std::size_t>(-1);
// Methods
void init();
uChar getHotkey();
void setHotkeyAccelerator();
void detectHotkey();
std::size_t getHotkeyPos (wchar_t[], wchar_t[], std::size_t);
std::size_t clickAnimationIndent (FWidget*);
void clearRightMargin (FWidget*);
void drawMarginLeft();
void drawMarginRight();
void drawTopBottomBackground();
void drawButtonTextLine (wchar_t[]);
virtual void draw();
void updateStatusBar();
void updateButtonColor();
void processClick();
void init();
uChar getHotkey();
void setHotkeyAccelerator();
void detectHotkey();
std::size_t getHotkeyPos (wchar_t[], wchar_t[], std::size_t);
std::size_t clickAnimationIndent (FWidget*);
void clearRightMargin (FWidget*);
void drawMarginLeft();
void drawMarginRight();
void drawTopBottomBackground();
void drawButtonTextLine (wchar_t[]);
virtual void draw() override;
void updateStatusBar();
void updateButtonColor();
void processClick();
// Data Members
FString text{};

View File

@ -85,63 +85,63 @@ class FButtonGroup : public FScrollView
FButtonGroup& operator = (const FButtonGroup&) = delete;
// Accessor
const char* getClassName() const;
FToggleButton* getFirstButton();
FToggleButton* getLastButton();
FToggleButton* getButton (int) const;
std::size_t getCount() const;
FString& getText();
virtual const char* getClassName() const override;
FToggleButton* getFirstButton();
FToggleButton* getLastButton();
FToggleButton* getButton (int) const;
std::size_t getCount() const;
FString& getText();
// Mutator
virtual bool setEnable(bool);
virtual bool setEnable();
virtual bool unsetEnable();
virtual bool setDisable();
void setText (const FString&);
virtual bool setEnable(bool) override;
virtual bool setEnable() override;
virtual bool unsetEnable() override;
virtual bool setDisable() override;
void setText (const FString&);
// Inquiries
bool isChecked(int) const;
bool hasFocusedButton() const;
bool hasCheckedButton() const;
bool isChecked(int) const;
bool hasFocusedButton() const;
bool hasCheckedButton() const;
// Methods
virtual void hide();
void insert (FToggleButton*);
void remove (FToggleButton*);
void checkScrollSize (FToggleButton*);
void checkScrollSize (const FRect&);
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);
void cb_buttonToggled (FWidget*, FDataPtr);
protected:
// Accessor
uChar getHotkey();
uChar getHotkey();
// Mutator
void setHotkeyAccelerator();
void setHotkeyAccelerator();
// Methods
virtual void draw();
void drawLabel();
virtual void draw() override;
void drawLabel();
private:
// Constants
static constexpr std::size_t NOT_SET = static_cast<std::size_t>(-1);
// Inquiries
bool isRadioButton (FToggleButton*) const;
bool isRadioButton (FToggleButton*) const;
// Methods
void init();
std::size_t getHotkeyPos (wchar_t[], wchar_t[], std::size_t);
void drawText (wchar_t[], std::size_t, std::size_t);
void directFocus();
void init();
std::size_t getHotkeyPos (wchar_t[], wchar_t[], std::size_t);
void drawText (wchar_t[], std::size_t, std::size_t);
void directFocus();
// Data Members
FString text{};

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,13 +86,13 @@ 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();
void drawCheckButton();
void init();
virtual void draw() override;
void drawCheckButton();
};
#pragma pack(pop)

View File

@ -86,13 +86,13 @@ class FCheckMenuItem : public FMenuItem
FCheckMenuItem& operator = (const FCheckMenuItem&) = delete;
// Accessor
const char* getClassName() const;
virtual const char* getClassName() const override;
private:
// Methods
void init (FWidget*);
void processToggle();
void processClicked();
void init (FWidget*);
void processToggle();
void processClicked();
};
#pragma pack(pop)

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,21 +116,21 @@ class FFileDialog : public FDialog
FFileDialog& operator = (const FFileDialog&);
// Accessors
const char* getClassName() const;
const FString getPath() const;
const FString getFilter() const;
const FString getSelectedFile() const;
bool getShowHiddenFiles();
virtual const char* getClassName() const override;
const FString getPath() const;
const FString getFilter() const;
const FString getSelectedFile() const;
bool getShowHiddenFiles();
// Mutators
void setPath (const FString&);
void setFilter (const FString&);
bool setShowHiddenFiles(bool);
bool setShowHiddenFiles();
bool unsetShowHiddenFiles();
void setPath (const FString&);
void setFilter (const FString&);
bool setShowHiddenFiles(bool);
bool setShowHiddenFiles();
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
@ -163,42 +163,42 @@ class FFileDialog : public FDialog
typedef std::vector<dir_entry> dirEntries;
// Method
void init();
void widgetSettings (int, int);
void initCallbacks();
bool pattern_match (const char* const, char[]);
void clear();
int numOfDirs();
void sortDir();
int readDir();
void getEntry (const char* const, struct dirent*);
void followSymLink (const char* const, dir_entry&);
void dirEntriesToList();
void selectDirectoryEntry (const char* const);
int changeDir (const FString&);
void printPath (const FString&);
void init();
void widgetSettings (int, int);
void initCallbacks();
bool pattern_match (const char* const, char[]);
void clear();
int numOfDirs();
void sortDir();
int readDir();
void getEntry (const char* const, struct dirent*);
void followSymLink (const char* const, dir_entry&);
void dirEntriesToList();
void selectDirectoryEntry (const char* const);
int changeDir (const FString&);
void printPath (const FString&);
static const FString getHomeDir();
// Callback methods
void cb_processActivate (FWidget*, FDataPtr);
void cb_processRowChanged (FWidget*, FDataPtr);
void cb_processClicked (FWidget*, FDataPtr);
void cb_processCancel (FWidget*, FDataPtr);
void cb_processOpen (FWidget*, FDataPtr);
void cb_processShowHidden (FWidget*, FDataPtr);
void cb_processActivate (FWidget*, FDataPtr);
void cb_processRowChanged (FWidget*, FDataPtr);
void cb_processClicked (FWidget*, FDataPtr);
void cb_processCancel (FWidget*, FDataPtr);
void cb_processOpen (FWidget*, FDataPtr);
void cb_processShowHidden (FWidget*, FDataPtr);
// Data Members
DIR* directory_stream{nullptr};
dirEntries dir_entries{};
FString directory{};
FString filter_pattern{};
FLineEdit filename{this};
FListBox filebrowser{this};
FCheckBox hidden{this};
FButton cancel{this};
FButton open{this};
DialogType dlg_type{FFileDialog::Open};
bool show_hidden{false};
DIR* directory_stream{nullptr};
dirEntries dir_entries{};
FString directory{};
FString filter_pattern{};
FLineEdit filename{this};
FListBox filebrowser{this};
FCheckBox hidden{this};
FButton cancel{this};
FButton open{this};
DialogType dlg_type{FFileDialog::Open};
bool show_hidden{false};
// Friend functions
friend bool sortByName ( const FFileDialog::dir_entry&

View File

@ -100,58 +100,58 @@ class FLabel : public FWidget
const FLabel& operator >> (FString&);
// Accessors
const char* getClassName() const;
FWidget* getAccelWidget();
fc::text_alignment getAlignment();
FString& getText();
virtual const char* getClassName() const override;
FWidget* getAccelWidget();
fc::text_alignment getAlignment();
FString& getText();
// Mutators
void setAccelWidget (FWidget* = nullptr);
void setAlignment(fc::text_alignment);
bool setEmphasis(bool);
bool setEmphasis();
bool unsetEmphasis();
bool setReverseMode(bool);
bool setReverseMode();
bool unsetReverseMode();
virtual bool setEnable (bool);
void setNumber (uLong);
void setNumber (long);
void setNumber (float, int = FLT_DIG);
void setNumber (double, int = DBL_DIG);
void setNumber (lDouble, int = LDBL_DIG);
void setText (const FString&);
void setAccelWidget (FWidget* = nullptr);
void setAlignment(fc::text_alignment);
bool setEmphasis(bool);
bool setEmphasis();
bool unsetEmphasis();
bool setReverseMode(bool);
bool setReverseMode();
bool unsetReverseMode();
virtual bool setEnable (bool) override;
void setNumber (uLong);
void setNumber (long);
void setNumber (float, int = FLT_DIG);
void setNumber (double, int = DBL_DIG);
void setNumber (lDouble, int = LDBL_DIG);
void setText (const FString&);
// Inquiries
bool hasEmphasis();
bool hasReverseMode();
bool hasEmphasis();
bool hasReverseMode();
// Methods
virtual void hide();
void clear();
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);
void cb_accel_widget_destroyed (FWidget*, FDataPtr);
private:
// Constants
static constexpr std::size_t NOT_SET = static_cast<std::size_t>(-1);
// Methods
void init();
uChar getHotkey();
std::size_t getHotkeyPos (wchar_t[], wchar_t[], std::size_t);
void setHotkeyAccelerator();
std::size_t getAlignOffset (std::size_t);
virtual void draw();
void drawMultiLine();
void drawSingleLine();
void printLine ( wchar_t[], std::size_t
, std::size_t, std::size_t = 0 );
void init();
uChar getHotkey();
std::size_t getHotkeyPos (wchar_t[], wchar_t[], std::size_t);
void setHotkeyAccelerator();
std::size_t getAlignOffset (std::size_t);
virtual void draw() override;
void drawMultiLine();
void drawSingleLine();
void printLine ( wchar_t[], std::size_t
, std::size_t, std::size_t = 0 );
// Data Members
FStringList multiline_text{};

View File

@ -103,46 +103,46 @@ class FLineEdit : public FWidget
const FLineEdit& operator >> (FString&);
// Accessors
const char* getClassName() const;
FString getText() const;
int getLabelOrientation();
virtual const char* getClassName() const override;
FString getText() const;
int getLabelOrientation();
// Mutators
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();
bool setShadow(bool);
bool setShadow();
bool unsetShadow();
void setText (const FString&);
void setLabelText (const FString&);
void setLabelOrientation(const label_o);
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();
// Inquiry
bool hasShadow();
bool hasShadow();
// Methods
virtual void hide();
void clear();
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();
void adjustLabel();
virtual void adjustSize() override;
private:
// Enumeration
@ -154,21 +154,21 @@ class FLineEdit : public FWidget
};
// Methods
void init();
bool hasHotkey();
virtual void draw();
void drawInputField();
void keyLeft();
void keyRight();
void keyHome();
void keyEnd();
void keyDel();
void keyBackspace();
void keyInsert();
void keyEnter();
bool keyInput (FKey);
void processActivate();
void processChanged();
void init();
bool hasHotkey();
virtual void draw() override;
void drawInputField();
void keyLeft();
void keyRight();
void keyHome();
void keyEnd();
void keyDel();
void keyBackspace();
void keyInsert();
void keyEnter();
bool keyInput (FKey);
void processActivate();
void processChanged();
// Data Members
FString text{""};

View File

@ -85,15 +85,16 @@ class FListBoxItem
FListBoxItem& operator = (const FListBoxItem&);
// Accessors
virtual FString& getText();
virtual FDataPtr getData() const;
virtual const char* getClassName() const;
virtual FString& getText();
virtual FDataPtr getData() const;
// Mutators
void setText (const FString&);
void setData (FDataPtr);
void setText (const FString&);
void setData (FDataPtr);
// Methods
void clear();
void clear();
private:
// Friend classes
@ -109,6 +110,10 @@ class FListBoxItem
// FListBoxItem inline functions
//----------------------------------------------------------------------
inline const char* FListBoxItem::getClassName() const
{ return "FListBoxItem"; }
//----------------------------------------------------------------------
inline FString& FListBoxItem::getText()
{ return text; }
@ -163,72 +168,72 @@ class FListBox : public FWidget
FListBox& operator = (const FListBox&) = delete;
// Accessors
const char* getClassName() const;
std::size_t getCount() const;
FListBoxItem getItem (std::size_t);
FListBoxItem getItem (listBoxItems::iterator) const;
std::size_t currentItem() const;
FString& getText();
virtual const char* getClassName() const override;
std::size_t getCount() const;
FListBoxItem getItem (std::size_t);
FListBoxItem getItem (listBoxItems::iterator) const;
std::size_t currentItem() const;
FString& getText();
// Mutators
void setCurrentItem (std::size_t);
void setCurrentItem (listBoxItems::iterator);
void selectItem (std::size_t);
void selectItem (listBoxItems::iterator);
void unselectItem (std::size_t);
void unselectItem (listBoxItems::iterator);
void showInsideBrackets (std::size_t, fc::brackets_type);
void showNoBrackets (std::size_t);
void showNoBrackets (listBoxItems::iterator);
virtual void setGeometry ( int, int
, std::size_t, std::size_t
, bool = true );
void setMultiSelection (bool);
void setMultiSelection ();
void unsetMultiSelection ();
virtual bool setDisable();
virtual bool setFocus (bool);
virtual bool setFocus();
virtual bool unsetFocus();
void setText (const FString&);
void setCurrentItem (std::size_t);
void setCurrentItem (listBoxItems::iterator);
void selectItem (std::size_t);
void selectItem (listBoxItems::iterator);
void unselectItem (std::size_t);
void unselectItem (listBoxItems::iterator);
void showInsideBrackets (std::size_t, fc::brackets_type);
void showNoBrackets (std::size_t);
void showNoBrackets (listBoxItems::iterator);
virtual void setGeometry ( int, int
, std::size_t, std::size_t
, bool = true ) override;
void setMultiSelection (bool);
void setMultiSelection ();
void unsetMultiSelection ();
virtual bool setDisable() override;
virtual bool setFocus (bool) override;
virtual bool setFocus() override;
virtual bool unsetFocus() override;
void setText (const FString&);
// Inquiries
bool isSelected (std::size_t);
bool isSelected (listBoxItems::iterator) const;
bool isMultiSelection() const;
bool hasBrackets (std::size_t);
bool hasBrackets (listBoxItems::iterator) const;
bool isSelected (std::size_t);
bool isSelected (listBoxItems::iterator) const;
bool isMultiSelection() const;
bool hasBrackets (std::size_t);
bool hasBrackets (listBoxItems::iterator) const;
// Methods
virtual void hide();
virtual void hide() override;
template <typename Iterator, typename InsertConverter>
void insert (Iterator, Iterator, InsertConverter);
void insert (Iterator, Iterator, InsertConverter);
template <typename Container, typename LazyConverter>
void insert (Container, LazyConverter);
void insert (FListBoxItem);
void insert (Container, LazyConverter);
void insert (FListBoxItem);
template <typename ItemT>
void insert ( const ItemT&
, fc::brackets_type = fc::NoBrackets
, bool = false
, FDataPtr = nullptr );
void remove (std::size_t);
void clear();
void insert ( const ItemT&
, fc::brackets_type = fc::NoBrackets
, bool = false
, FDataPtr = nullptr );
void remove (std::size_t);
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();
void adjustYOffset (std::size_t);
virtual void adjustSize() override;
private:
// Typedef
@ -243,89 +248,89 @@ class FListBox : public FWidget
};
// Accessors
static FString& getString (listBoxItems::iterator);
static FString& getString (listBoxItems::iterator);
// Methods
void init();
virtual void draw();
void drawHeadline();
void drawList();
void drawListLine (int, listBoxItems::iterator, bool);
void printLeftBracket (fc::brackets_type);
void printRightBracket (fc::brackets_type);
void drawListBracketsLine (int, listBoxItems::iterator, bool);
void setLineAttributes (int, bool, bool, bool&);
void unsetAttributes();
void updateDrawing (bool, bool);
void recalculateHorizontalBar (std::size_t, bool);
void recalculateVerticalBar (std::size_t);
void getWidgetFocus();
void multiSelection (std::size_t);
void multiSelectionUpTo (std::size_t);
void wheelUp (int);
void wheelDown (int);
bool dragScrollUp();
bool dragScrollDown();
void dragUp (int);
void dragDown (int);
void stopDragScroll();
void prevListItem (int);
void nextListItem (int);
void scrollToX (int);
void scrollToY (int);
void scrollLeft (int);
void scrollRight (int);
void keyUp();
void keyDown();
void keyLeft();
void keyRight();
void keyPgUp();
void keyPgDn();
void keyHome();
void keyEnd();
bool keyEsc();
void keyEnter();
bool keySpace();
bool keyInsert();
bool keyBackspace();
bool keyIncSearchInput (FKey);
void processClick();
void processSelect();
void processChanged();
void lazyConvert (listBoxItems::iterator, int);
void init();
virtual void draw() override;
void drawHeadline();
void drawList();
void drawListLine (int, listBoxItems::iterator, bool);
void printLeftBracket (fc::brackets_type);
void printRightBracket (fc::brackets_type);
void drawListBracketsLine (int, listBoxItems::iterator, bool);
void setLineAttributes (int, bool, bool, bool&);
void unsetAttributes();
void updateDrawing (bool, bool);
void recalculateHorizontalBar (std::size_t, bool);
void recalculateVerticalBar (std::size_t);
void getWidgetFocus();
void multiSelection (std::size_t);
void multiSelectionUpTo (std::size_t);
void wheelUp (int);
void wheelDown (int);
bool dragScrollUp();
bool dragScrollDown();
void dragUp (int);
void dragDown (int);
void stopDragScroll();
void prevListItem (int);
void nextListItem (int);
void scrollToX (int);
void scrollToY (int);
void scrollLeft (int);
void scrollRight (int);
void keyUp();
void keyDown();
void keyLeft();
void keyRight();
void keyPgUp();
void keyPgDn();
void keyHome();
void keyEnd();
bool keyEsc();
void keyEnter();
bool keySpace();
bool keyInsert();
bool keyBackspace();
bool keyIncSearchInput (FKey);
void processClick();
void processSelect();
void processChanged();
void lazyConvert (listBoxItems::iterator, int);
listBoxItems::iterator index2iterator (std::size_t);
// Callback methods
void cb_VBarChange (FWidget*, FDataPtr);
void cb_HBarChange (FWidget*, FDataPtr);
void cb_VBarChange (FWidget*, FDataPtr);
void cb_HBarChange (FWidget*, FDataPtr);
// Function Pointer
void (*convertToItem) ( FListBoxItem&
, FDataPtr
, int index ){nullptr};
void (*convertToItem) ( FListBoxItem&
, FDataPtr
, int index ){nullptr};
// Data Members
listBoxItems itemlist{};
FDataPtr source_container{nullptr};
convert_type conv_type{FListBox::no_convert};
FScrollbarPtr vbar{nullptr};
FScrollbarPtr hbar{nullptr};
FString text{};
FString inc_search{};
bool multi_select{false};
bool mouse_select{false};
fc::dragScroll drag_scroll{fc::noScroll};
bool scroll_timer{false};
int scroll_repeat{100};
int scroll_distance{1};
std::size_t current{0};
int last_current{-1};
int secect_from_item{-1};
int xoffset{0};
int yoffset{0};
int last_yoffset{-1};
std::size_t nf_offset{0};
std::size_t max_line_width{0};
listBoxItems itemlist{};
FDataPtr source_container{nullptr};
convert_type conv_type{FListBox::no_convert};
FScrollbarPtr vbar{nullptr};
FScrollbarPtr hbar{nullptr};
FString text{};
FString inc_search{};
bool multi_select{false};
bool mouse_select{false};
fc::dragScroll drag_scroll{fc::noScroll};
bool scroll_timer{false};
int scroll_repeat{100};
int scroll_distance{1};
std::size_t current{0};
int last_current{-1};
int secect_from_item{-1};
int xoffset{0};
int yoffset{0};
int last_yoffset{-1};
std::size_t nf_offset{0};
std::size_t max_line_width{0};
};
#pragma pack(pop)

View File

@ -92,51 +92,51 @@ class FListViewItem : public FObject
FListViewItem& operator = (const FListViewItem&);
// Accessors
const char* getClassName() const;
uInt getColumnCount() const;
int getSortColumn() const;
FString getText (int) const;
FDataPtr getData() const;
uInt getDepth() const;
virtual const char* getClassName() const;
uInt getColumnCount() const;
int getSortColumn() const;
FString getText (int) const;
FDataPtr getData() const;
uInt getDepth() const;
// Mutators
void setText (int, const FString&);
void setData (FDataPtr);
void setCheckable (bool);
void setChecked (bool);
void setText (int, const FString&);
void setData (FDataPtr);
void setCheckable (bool);
void setChecked (bool);
// Inquiry
bool isChecked() const;
bool isExpand() const;
bool isChecked() const;
bool isExpand() const;
// Methods
FObjectIterator insert (FListViewItem*);
FObjectIterator insert (FListViewItem*, FObjectIterator);
void expand();
void collapse();
FObjectIterator insert (FListViewItem*);
FObjectIterator insert (FListViewItem*, FObjectIterator);
void expand();
void collapse();
private:
// Inquiry
bool isExpandable() const;
bool isCheckable() const;
bool isExpandable() const;
bool isCheckable() const;
// Methods
template <typename Compare>
void sort (Compare);
FObjectIterator appendItem (FListViewItem*);
void replaceControlCodes();
std::size_t getVisibleLines();
void resetVisibleLineCounter();
void sort (Compare);
FObjectIterator appendItem (FListViewItem*);
void replaceControlCodes();
std::size_t getVisibleLines();
void resetVisibleLineCounter();
// Data Members
FStringList column_list{};
FDataPtr data_pointer{nullptr};
FObjectIterator root{};
std::size_t visible_lines{1};
bool expandable{false};
bool is_expand{false};
bool checkable{false};
bool is_checked{false};
FStringList column_list{};
FDataPtr data_pointer{nullptr};
FObjectIterator root{};
std::size_t visible_lines{1};
bool expandable{false};
bool is_expand{false};
bool checkable{false};
bool is_checked{false};
// Friend class
friend class FListView;
@ -215,16 +215,16 @@ class FListViewIterator
bool operator != (const FListViewIterator&) const;
// Accessor
const char* getClassName() const;
int getPosition() const;
virtual const char* getClassName() const;
int getPosition() const;
// Methods
void parentElement();
void parentElement();
private:
// Methods
void nextElement (FObjectIterator&);
void prevElement (FObjectIterator&);
void nextElement (FObjectIterator&);
void prevElement (FObjectIterator&);
// Data Members
FObjectIteratorStack iter_path{};
@ -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,59 +96,59 @@ class FMenuItem : public FWidget
FMenuItem& operator = (const FMenuItem&) = delete;
// Accessors
const char* getClassName() const;
uChar getHotkey() const;
FMenu* getMenu() const;
std::size_t getTextLength() const;
FString getText() 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();
void setSelected();
void unsetSelected();
void setSeparator();
void unsetSeparator();
void setChecked();
void unsetChecked();
void setMenu (FMenu*);
void setText (const FString&);
virtual bool setEnable (bool) override;
virtual bool setFocus (bool) override;
virtual bool setFocus() override;
virtual bool unsetFocus() override;
void setSelected();
void unsetSelected();
void setSeparator();
void unsetSeparator();
void setChecked();
void unsetChecked();
void setMenu (FMenu*);
void setText (const FString&);
// Inquiries
bool isSelected() const;
bool isSeparator() const;
bool isChecked() const;
bool hasHotkey() const;
bool hasMenu() const;
bool isSelected() const;
bool isSeparator() const;
bool isChecked() const;
bool hasHotkey() const;
bool hasMenu() const;
// Methods
virtual void addAccelerator (FKey, FWidget*);
virtual void delAccelerator (FWidget*);
void openMenu();
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
FWidget* getSuperMenu() const;
FWidget* getSuperMenu() const;
// Mutator
void setSuperMenu (FWidget*);
void setSuperMenu (FWidget*);
// Inquiries
bool isWindowsMenu (FWidget*) const;
bool isMenuBar (FWidget*) const;
bool isMenu (FWidget*) const;
bool isWindowsMenu (FWidget*) const;
bool isMenuBar (FWidget*) const;
bool isMenu (FWidget*) const;
// Data Members
FString text{};
@ -167,22 +167,22 @@ class FMenuItem : public FWidget
private:
// Accessor
FMenuList* getFMenuList (FWidget&);
FMenuList* getFMenuList (FWidget&);
// Methods
void init (FWidget*);
uChar hotKey();
void processActivate();
void processDeactivate();
void createDialogList (FMenu*);
void init (FWidget*);
uChar hotKey();
void processActivate();
void processDeactivate();
void createDialogList (FMenu*);
template <typename T>
void passMouseEvent (T, FMouseEvent*, fc::events);
void passMouseEvent (T, FMouseEvent*, fc::events);
// Callback methods
void cb_switchToDialog (FWidget*, FDataPtr);
void cb_destroyDialog (FWidget*, FDataPtr);
void cb_switchToDialog (FWidget*, FDataPtr);
void cb_destroyDialog (FWidget*, FDataPtr);
virtual void processClicked();
virtual void processClicked();
// Friend classes
friend class FDialogListMenu;

View File

@ -107,51 +107,51 @@ class FMessageBox : public FDialog
FMessageBox& operator = (const FMessageBox&);
// Accessor
const char* getClassName() const;
const FString getTitlebarText() const;
const FString getHeadline() const;
const FString getText() const;
virtual const char* getClassName() const override;
const FString getTitlebarText() const;
const FString getHeadline() const;
const FString getText() const;
// Mutator
void setTitlebarText (const FString&);
void setHeadline (const FString&);
bool setCenterText(bool);
bool setCenterText();
bool unsetCenterText();
void setText (const FString&);
void setTitlebarText (const FString&);
void setHeadline (const FString&);
bool setCenterText(bool);
bool setCenterText();
bool unsetCenterText();
void setText (const FString&);
// Methods
template <typename messageType>
static int info ( FWidget*
, const FString&
, const messageType&
, int = FMessageBox::Ok
, int = 0
, int = 0 );
static int info ( FWidget*
, const FString&
, const messageType&
, int = FMessageBox::Ok
, int = 0
, int = 0 );
template <typename messageType>
static int error ( FWidget*
, const messageType&
, int = FMessageBox::Ok
, int = 0
, int = 0 );
static int error ( FWidget*
, const messageType&
, int = FMessageBox::Ok
, int = 0
, int = 0 );
protected:
// Method
virtual void adjustSize();
virtual void adjustSize() override;
// Callback method
void cb_processClick (FWidget*, FDataPtr);
void cb_processClick (FWidget*, FDataPtr);
private:
// Methods
void init (int, int, int);
void allocation (int, int, int);
void deallocation();
void initCallbacks();
void calculateDimensions();
virtual void draw();
void resizeButtons();
void adjustButtons();
void init (int, int, int);
void allocation (int, int, int);
void deallocation();
void initCallbacks();
void calculateDimensions();
virtual void draw() override;
void resizeButtons();
void adjustButtons();
// Data Members
FString headline_text{};

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

@ -74,18 +74,18 @@ class FPoint
// Accessors
virtual const char* getClassName();
int getX() const;
int getY() const;
void setX (int);
void setY (int);
void setPoint (int, int);
int getX() const;
int getY() const;
void setX (int);
void setY (int);
void setPoint (int, int);
// Inquiry
bool isNull() const;
bool isNull() const;
// Point references
int& x_ref();
int& y_ref();
int& x_ref();
int& y_ref();
private:
// Data Members

View File

@ -77,31 +77,33 @@ class FProgressbar : public FWidget
virtual ~FProgressbar();
// Accessors
const char* getClassName() const;
std::size_t getPercentage();
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);
bool setShadow (bool);
bool setShadow();
bool unsetShadow();
void setPercentage (std::size_t);
virtual void setGeometry ( int, int
, std::size_t, std::size_t
, bool = true) override;
bool setShadow (bool);
bool setShadow();
bool unsetShadow();
// Inquiries
bool hasShadow();
bool hasShadow();
// Methods
virtual void hide();
void reset();
virtual void hide() override;
void reset();
private:
// Constants
static constexpr std::size_t NOT_SET = static_cast<std::size_t>(-1);
// Methods
virtual void draw();
void drawPercentage();
void drawBar();
virtual void draw() override;
void drawPercentage();
void drawBar();
// Data Members
std::size_t percentage{NOT_SET};

View File

@ -86,13 +86,13 @@ 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();
void drawRadioButton();
void init();
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

@ -72,55 +72,55 @@ class FRect
// Accessors
virtual const char* getClassName();
int getX1() const;
int getY1() const;
int getX2() const;
int getY2() const;
int getX() const;
int getY() const;
FPoint getPos() const;
FPoint getUpperLeftPos() const;
FPoint getUpperRightPos() const;
FPoint getLowerLeftPos() const;
FPoint getLowerRightPos() const;
std::size_t getWidth() const;
std::size_t getHeight() const;
int getX1() const;
int getY1() const;
int getX2() const;
int getY2() const;
int getX() const;
int getY() const;
FPoint getPos() const;
FPoint getUpperLeftPos() const;
FPoint getUpperRightPos() const;
FPoint getLowerLeftPos() const;
FPoint getLowerRightPos() const;
std::size_t getWidth() const;
std::size_t getHeight() const;
// Mutators
void setX1 (int);
void setY1 (int);
void setX2 (int);
void setY2 (int);
void setX (int);
void setY (int);
void setPos (int, int);
void setPos (const FPoint&);
void setWidth (std::size_t);
void setHeight (std::size_t);
void setSize (std::size_t, std::size_t);
void setRect (const FRect&);
void setRect (int, int, std::size_t, std::size_t);
void setCoordinates (const FPoint&, const FPoint&);
void setCoordinates (int, int, int, int);
void setX1 (int);
void setY1 (int);
void setX2 (int);
void setY2 (int);
void setX (int);
void setY (int);
void setPos (int, int);
void setPos (const FPoint&);
void setWidth (std::size_t);
void setHeight (std::size_t);
void setSize (std::size_t, std::size_t);
void setRect (const FRect&);
void setRect (int, int, std::size_t, std::size_t);
void setCoordinates (const FPoint&, const FPoint&);
void setCoordinates (int, int, int, int);
// Inquiry
bool isNull() const;
bool isNull() const;
// Coordinate references
int& x1_ref();
int& y1_ref();
int& x2_ref();
int& y2_ref();
int& x1_ref();
int& y1_ref();
int& x2_ref();
int& y2_ref();
// Methods
void move (int, int);
void move (const FPoint&);
bool contains (int, int) const;
bool contains (const FPoint&) const;
bool contains (const FRect&) const;
bool overlap (const FRect&) const;
FRect intersect (const FRect&) const;
FRect combined (const FRect&) const;
void move (int, int);
void move (const FPoint&);
bool contains (int, int) const;
bool contains (const FPoint&) const;
bool contains (const FRect&) const;
bool overlap (const FRect&) const;
FRect intersect (const FRect&) const;
FRect combined (const FRect&) const;
private:
// Data Members

View File

@ -97,48 +97,50 @@ class FScrollbar : public FWidget
FScrollbar& operator = (const FScrollbar&) = delete;
// Accessors
const char* getClassName() const;
int getValue() const;
sType getScrollType() const;
virtual const char* getClassName() const override;
int getValue() const;
sType getScrollType() const;
// Mutators
void setMinimum (int);
void setMaximum (int);
void setRange (int, int);
void setValue (int);
void setSteps (double);
void setPageSize (int, int);
void setOrientation (int);
virtual void setGeometry (int, int, std::size_t, std::size_t, bool = true);
void setMinimum (int);
void setMaximum (int);
void setRange (int, int);
void setValue (int);
void setSteps (double);
void setPageSize (int, int);
void setOrientation (int);
virtual void setGeometry ( int, int
, std::size_t, std::size_t
, bool = true) override;
// Methods
virtual void resize();
virtual void redraw();
void calculateSliderValues();
void drawVerticalBar();
void drawHorizontalBar();
void drawBar();
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();
void drawButtons();
sType getClickedScrollType (int, int);
sType getVerticalClickedScrollType (int);
sType getHorizontalClickedScrollType (int);
int getSliderClickPos (int, int);
void jumpToClickPos (int, int);
void jumpToClickPos (int);
void avoidScrollOvershoot();
void processScroll();
void init();
virtual void draw() override;
void drawButtons();
sType getClickedScrollType (int, int);
sType getVerticalClickedScrollType (int);
sType getHorizontalClickedScrollType (int);
int getSliderClickPos (int, int);
void jumpToClickPos (int, int);
void jumpToClickPos (int);
void avoidScrollOvershoot();
void processScroll();
// Data Members
sType scroll_type{FScrollbar::noScroll};

View File

@ -89,69 +89,69 @@ class FScrollView : public FWidget
FScrollView& operator = (const FScrollView&) = delete;
// Accessors
const char* getClassName() const;
std::size_t getViewportWidth() const;
std::size_t getViewportHeight() const;
std::size_t getScrollWidth() const;
std::size_t getScrollHeight() const;
const FPoint getScrollPos() const;
int getScrollX() const;
int getScrollY() const;
virtual const char* getClassName() const override;
std::size_t getViewportWidth() const;
std::size_t getViewportHeight() const;
std::size_t getScrollWidth() const;
std::size_t getScrollHeight() const;
const FPoint getScrollPos() const;
int getScrollX() const;
int getScrollY() const;
// Mutator
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 setGeometry ( int, int
, std::size_t, std::size_t
, bool = true );
void setCursorPos (int, int);
void setPrintPos (int, int);
bool setViewportPrint (bool);
bool setViewportPrint();
bool unsetViewportPrint();
bool setBorder (bool);
bool setBorder();
bool unsetBorder();
void setHorizontalScrollBarMode (fc::scrollBarMode);
void setVerticalScrollBarMode (fc::scrollBarMode);
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) 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 ) override;
void setCursorPos (int, int);
void setPrintPos (int, int);
bool setViewportPrint (bool);
bool setViewportPrint();
bool unsetViewportPrint();
bool setBorder (bool);
bool setBorder();
bool unsetBorder();
void setHorizontalScrollBarMode (fc::scrollBarMode);
void setVerticalScrollBarMode (fc::scrollBarMode);
// Inquiries
bool hasBorder();
bool isViewportPrint();
bool hasBorder();
bool isViewportPrint();
// Method
virtual void clearArea (int = ' ');
void scrollToX (int);
void scrollToY (int);
void scrollTo (const FPoint&);
void scrollTo (int, int);
void scrollBy (int, int);
virtual void draw();
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() 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
using FVTerm::clearArea;
// Accessor
term_area* getPrintArea();
term_area* getPrintArea();
// Method
virtual void adjustSize();
void copy2area();
virtual void adjustSize() override;
void copy2area();
private:
// Typedef
@ -162,23 +162,23 @@ class FScrollView : public FWidget
static constexpr int horizontal_border_spacing = 2;
// Accessors
FPoint getViewportCursorPos();
FPoint getViewportCursorPos();
// Methods
void init (FWidget*);
void init_scrollbar();
void calculateScrollbarPos();
void setHorizontalScrollBarVisibility();
void setVerticalScrollBarVisibility();
void setViewportCursor();
void redrawHBar();
void redrawVBar();
void drawHBar();
void drawVBar();
void init (FWidget*);
void init_scrollbar();
void calculateScrollbarPos();
void setHorizontalScrollBarVisibility();
void setVerticalScrollBarVisibility();
void setViewportCursor();
void redrawHBar();
void redrawVBar();
void drawHBar();
void drawVBar();
// Callback methods
void cb_VBarChange (FWidget*, FDataPtr);
void cb_HBarChange (FWidget*, FDataPtr);
void cb_VBarChange (FWidget*, FDataPtr);
void cb_HBarChange (FWidget*, FDataPtr);
// Data Members
FRect scroll_geometry{1, 1, 1, 1};

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,22 +86,22 @@ 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();
void drawCheckButton();
void drawChecked();
void drawUnchecked();
virtual void draw() override;
void drawCheckButton();
void drawChecked();
void drawUnchecked();
// Data Members
std::size_t switch_offset_pos{0};

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,68 +90,68 @@ class FTextView : public FWidget
FTextView& operator = (const FTextView&) = delete;
// Accessors
const char* getClassName() const;
std::size_t getColumns() const;
std::size_t getRows() const;
const FString getText() const;
const FStringList& getLines() const;
virtual const char* getClassName() const override;
std::size_t getColumns() const;
std::size_t getRows() const;
const FString getText() const;
const FStringList& getLines() const;
// Mutators
virtual void setGeometry ( int, int
, std::size_t, std::size_t
, bool = true );
void setText (const FString&);
void scrollToX (int);
void scrollToY (int);
void scrollTo (const FPoint&);
void scrollTo (int, int);
void scrollBy (int, int);
virtual void setGeometry ( int, int
, std::size_t, std::size_t
, bool = true ) override;
void setText (const FString&);
void scrollToX (int);
void scrollToY (int);
void scrollTo (const FPoint&);
void scrollTo (int, int);
void scrollBy (int, int);
// Methods
virtual void hide();
void append (const FString&);
void insert (const FString&, int);
void replaceRange (const FString&, int, int);
void deleteRange (int, int);
void deleteLine (int);
void clear();
virtual void hide() override;
void append (const FString&);
void insert (const FString&, int);
void replaceRange (const FString&, int, int);
void deleteRange (int, int);
void deleteLine (int);
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
typedef std::shared_ptr<FScrollbar> FScrollbarPtr;
// Accessors
std::size_t getTextHeight();
std::size_t getTextWidth();
std::size_t getTextHeight();
std::size_t getTextWidth();
// Inquiry
bool isHorizontallyScrollable();
bool isVerticallyScrollable();
bool isHorizontallyScrollable();
bool isVerticallyScrollable();
// Methods
void init();
virtual void draw();
void drawText();
void processChanged();
void drawHBar();
void drawVBar();
void init();
virtual void draw() override;
void drawText();
void processChanged();
void drawHBar();
void drawVBar();
// Callback methods
void cb_VBarChange (FWidget*, FDataPtr);
void cb_HBarChange (FWidget*, FDataPtr);
void cb_VBarChange (FWidget*, FDataPtr);
void cb_HBarChange (FWidget*, FDataPtr);
// Data Members
FStringList data{};

View File

@ -87,61 +87,63 @@ class FToggleButton : public FWidget
FToggleButton& operator = (const FToggleButton&) = delete;
// Accessors
virtual const char* getClassName() const;
FString& getText();
virtual const char* getClassName() const override;
FString& getText();
// Mutators
virtual void setGeometry (int, int, std::size_t, std::size_t, bool = true);
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();
bool setChecked (bool);
bool setChecked();
bool unsetChecked();
virtual void setText (const FString&);
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) 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();
virtual void setText (const FString&);
// Inquiries
bool isChecked();
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
uChar getHotkey();
FButtonGroup* getGroup() const;
uChar getHotkey();
FButtonGroup* getGroup() const;
// Mutator
void setHotkeyAccelerator();
void setHotkeyAccelerator();
// Inquiries
bool isRadioButton() const;
bool isCheckboxButton() const;
bool hasGroup() const;
bool isRadioButton() const;
bool isCheckboxButton() const;
bool hasGroup() const;
// Methods
virtual void draw();
void drawLabel();
void processClick();
void processToggle();
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};
@ -153,12 +155,12 @@ class FToggleButton : public FWidget
static constexpr std::size_t NOT_SET = static_cast<std::size_t>(-1);
// Mutator
void setGroup (FButtonGroup*);
void setGroup (FButtonGroup*);
// Methods
void init();
std::size_t getHotkeyPos (wchar_t[], wchar_t[], std::size_t);
void drawText (wchar_t[], std::size_t , std::size_t);
void init();
std::size_t getHotkeyPos (wchar_t[], wchar_t[], std::size_t);
void drawText (wchar_t[], std::size_t , std::size_t);
// Friend classes
friend class FButtonGroup;

View File

@ -88,25 +88,25 @@ class FToolTip : public FWindow
FToolTip& operator = (const FToolTip&) = delete;
// Accessors
const char* getClassName() const;
const FString getText() const;
virtual const char* getClassName() const override;
const FString getText() const;
// Mutators
void setText (const FString&);
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();
void init();
void calculateDimensions();
virtual void adjustSize() override;
// Data Members
FString text{};

View File

@ -177,169 +177,169 @@ class FWidget : public FVTerm, public FObject
FWidget& operator = (const FWidget&) = delete;
// Accessors
const char* getClassName() const;
FWidget* getRootWidget() const;
FWidget* getParentWidget() const;
static FWidget*& getMainWidget();
static FWidget*& getActiveWindow();
static FWidget*& getFocusWidget();
static FWidget*& getClickedWidget();
static FWidget*& getOpenMenu();
static FWidget*& getMoveSizeWidget();
virtual FWidget* getFirstFocusableWidget (FObjectList);
virtual FWidget* getLastFocusableWidget (FObjectList);
static FMenuBar* getMenuBar();
static FStatusBar* getStatusBar();
FString getStatusbarMessage() const;
FColor getForegroundColor() const; // get the primary
FColor getBackgroundColor() const; // widget colors
int getX() const; // positioning
int getY() const;
const FPoint getPos() const;
int getTermX() const;
int getTermY() const;
const FPoint getTermPos() const;
std::size_t getWidth() const;
std::size_t getHeight() const;
int getTopPadding() const;
int getLeftPadding() const;
int getBottomPadding() const;
int getRightPadding() const;
std::size_t getClientWidth() const;
std::size_t getClientHeight() const;
std::size_t getMaxWidth() const;
std::size_t getMaxHeight() const;
const FPoint& getShadow() const;
const FRect& getGeometry() const;
const FRect& getGeometryWithShadow();
const FRect& getTermGeometry();
const FRect& getTermGeometryWithShadow();
std::size_t getDesktopWidth();
std::size_t getDesktopHeight();
widget_flags getFlags() const;
FPoint getCursorPos();
FPoint getPrintPos();
std::vector<bool>& doubleFlatLine_ref (fc::sides);
virtual const char* getClassName() const override;
FWidget* getRootWidget() const;
FWidget* getParentWidget() const;
static FWidget*& getMainWidget();
static FWidget*& getActiveWindow();
static FWidget*& getFocusWidget();
static FWidget*& getClickedWidget();
static FWidget*& getOpenMenu();
static FWidget*& getMoveSizeWidget();
virtual FWidget* getFirstFocusableWidget (FObjectList);
virtual FWidget* getLastFocusableWidget (FObjectList);
static FMenuBar* getMenuBar();
static FStatusBar* getStatusBar();
FString getStatusbarMessage() const;
FColor getForegroundColor() const; // get the primary
FColor getBackgroundColor() const; // widget colors
int getX() const; // positioning
int getY() const;
const FPoint getPos() const;
int getTermX() const;
int getTermY() const;
const FPoint getTermPos() const;
std::size_t getWidth() const;
std::size_t getHeight() const;
int getTopPadding() const;
int getLeftPadding() const;
int getBottomPadding() const;
int getRightPadding() const;
std::size_t getClientWidth() const;
std::size_t getClientHeight() const;
std::size_t getMaxWidth() const;
std::size_t getMaxHeight() const;
const FPoint& getShadow() const;
const FRect& getGeometry() const;
const FRect& getGeometryWithShadow();
const FRect& getTermGeometry();
const FRect& getTermGeometryWithShadow();
std::size_t getDesktopWidth();
std::size_t getDesktopHeight();
widget_flags getFlags() const;
FPoint getCursorPos();
FPoint getPrintPos();
std::vector<bool>& doubleFlatLine_ref (fc::sides);
// Mutators
static void setMainWidget (FWidget*);
static void setFocusWidget (FWidget*);
static void setClickedWidget (FWidget*);
static void setMoveSizeWidget (FWidget*);
static void setActiveWindow (FWidget*);
static void setOpenMenu (FWidget*);
virtual void setStatusbarMessage (const FString&);
bool setVisible();
virtual bool setEnable (bool);
virtual bool setEnable();
virtual bool unsetEnable();
virtual bool setDisable();
virtual bool setVisibleCursor (bool); // input cursor visibility
virtual bool setVisibleCursor(); // for the widget
virtual bool unsetVisibleCursor();
virtual bool setFocus (bool);
virtual bool setFocus();
virtual bool unsetFocus();
void setFocusable();
void unsetFocusable();
bool ignorePadding (bool); // ignore padding from
bool ignorePadding(); // the parent widget
bool acceptPadding();
void setForegroundColor (FColor);
void setBackgroundColor (FColor);
void setColor();
virtual void setX (int, bool = true); // positioning
virtual void setY (int, bool = true);
virtual void setPos (const FPoint&, 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 setTopPadding (int, bool = true);
void setLeftPadding (int, bool = true);
void setBottomPadding (int, bool = true);
void setRightPadding (int, bool = true);
void setParentOffset();
void setTermOffset();
void setTermOffsetWithPadding();
void setTermSize (std::size_t, std::size_t);
virtual void setGeometry (const FRect&, bool = true);
virtual void setGeometry ( int, int
, std::size_t, std::size_t
, bool = true );
virtual void setShadowSize (int, int);
void setMinimumWidth (std::size_t);
void setMinimumHeight (std::size_t);
void setMinimumSize (std::size_t, std::size_t);
void setMaximumWidth (std::size_t);
void setMaximumHeight (std::size_t);
void setMaximumSize (std::size_t, std::size_t);
void setFixedSize (std::size_t, std::size_t);
bool setCursorPos (const FPoint&);
bool setCursorPos (int, int);
void unsetCursorPos();
void setPrintPos (const FPoint&);
void setPrintPos (int, int);
void setDoubleFlatLine (fc::sides, bool = true);
void unsetDoubleFlatLine (fc::sides);
void setDoubleFlatLine (fc::sides, int, bool = true);
void unsetDoubleFlatLine (fc::sides, int);
static void setMainWidget (FWidget*);
static void setFocusWidget (FWidget*);
static void setClickedWidget (FWidget*);
static void setMoveSizeWidget (FWidget*);
static void setActiveWindow (FWidget*);
static void setOpenMenu (FWidget*);
virtual void setStatusbarMessage (const FString&);
bool setVisible();
virtual bool setEnable (bool);
virtual bool setEnable();
virtual bool unsetEnable();
virtual bool setDisable();
virtual bool setVisibleCursor (bool); // input cursor visibility
virtual bool setVisibleCursor(); // for the widget
virtual bool unsetVisibleCursor();
virtual bool setFocus (bool);
virtual bool setFocus();
virtual bool unsetFocus();
void setFocusable();
void unsetFocusable();
bool ignorePadding (bool); // ignore padding from
bool ignorePadding(); // the parent widget
bool acceptPadding();
void setForegroundColor (FColor);
void setBackgroundColor (FColor);
void setColor();
virtual void setX (int, bool = true); // positioning
virtual void setY (int, bool = true);
virtual void setPos (const FPoint&, 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 setTopPadding (int, bool = true);
void setLeftPadding (int, bool = true);
void setBottomPadding (int, bool = true);
void setRightPadding (int, bool = true);
void setParentOffset();
void setTermOffset();
void setTermOffsetWithPadding();
void setTermSize (std::size_t, std::size_t);
virtual void setGeometry (const FRect&, bool = true);
virtual void setGeometry ( int, int
, std::size_t, std::size_t
, bool = true );
virtual void setShadowSize (int, int);
void setMinimumWidth (std::size_t);
void setMinimumHeight (std::size_t);
void setMinimumSize (std::size_t, std::size_t);
void setMaximumWidth (std::size_t);
void setMaximumHeight (std::size_t);
void setMaximumSize (std::size_t, std::size_t);
void setFixedSize (std::size_t, std::size_t);
bool setCursorPos (const FPoint&);
bool setCursorPos (int, int);
void unsetCursorPos();
void setPrintPos (const FPoint&);
void setPrintPos (int, int);
void setDoubleFlatLine (fc::sides, bool = true);
void unsetDoubleFlatLine (fc::sides);
void setDoubleFlatLine (fc::sides, int, bool = true);
void unsetDoubleFlatLine (fc::sides, int);
// Inquiries
bool isRootWidget() const;
bool isWindowWidget() const;
bool isDialogWidget() const;
bool isMenuWidget() const;
bool isVisible() const;
bool isShown() const;
bool isEnabled() const;
bool hasVisibleCursor() const;
bool hasFocus() const;
bool acceptFocus() const; // is focusable
bool isPaddingIgnored();
bool isRootWidget() const;
bool isWindowWidget() const;
bool isDialogWidget() const;
bool isMenuWidget() const;
bool isVisible() const;
bool isShown() const;
bool isEnabled() const;
bool hasVisibleCursor() const;
bool hasFocus() const;
bool acceptFocus() const; // is focusable
bool isPaddingIgnored();
// Methods
static FWidget* childWidgetAt (FWidget*, const FPoint&);
static FWidget* childWidgetAt (FWidget*, int, int);
int numOfFocusableChildren();
virtual bool close();
void clearStatusbarMessage();
void addCallback ( const FString&
, FCallback
, FDataPtr = nullptr );
void addCallback ( const FString&
, FWidget*
, FMemberCallback
, FDataPtr = nullptr );
void delCallback (FCallback);
void delCallback (FWidget*);
void delCallbacks();
void emitCallback (const FString&);
void addAccelerator (FKey);
virtual void addAccelerator (FKey, FWidget*);
void delAccelerator ();
virtual void delAccelerator (FWidget*);
virtual void redraw();
virtual void resize();
virtual void show();
virtual void hide();
virtual bool focusFirstChild(); // widget focusing
virtual bool focusLastChild();
FPoint termToWidgetPos (const FPoint&);
void detectTermSize();
virtual void move (const FPoint&);
virtual void move (int, int);
void drawShadow();
void clearShadow();
void drawFlatBorder();
void clearFlatBorder();
virtual void drawBorder (int, int, int, int);
virtual void drawBorder();
static void quit();
static FWidget* childWidgetAt (FWidget*, const FPoint&);
static FWidget* childWidgetAt (FWidget*, int, int);
int numOfFocusableChildren();
virtual bool close();
void clearStatusbarMessage();
void addCallback ( const FString&
, FCallback
, FDataPtr = nullptr );
void addCallback ( const FString&
, FWidget*
, FMemberCallback
, FDataPtr = nullptr );
void delCallback (FCallback);
void delCallback (FWidget*);
void delCallbacks();
void emitCallback (const FString&);
void addAccelerator (FKey);
virtual void addAccelerator (FKey, FWidget*);
void delAccelerator ();
virtual void delAccelerator (FWidget*);
virtual void redraw();
virtual void resize();
virtual void show();
virtual void hide();
virtual bool focusFirstChild(); // widget focusing
virtual bool focusLastChild();
FPoint termToWidgetPos (const FPoint&);
void detectTermSize();
virtual void move (const FPoint&);
virtual void move (int, int);
void drawShadow();
void clearShadow();
void drawFlatBorder();
void clearFlatBorder();
virtual void drawBorder (int, int, int, int);
virtual void drawBorder();
static void quit();
// Data Members
static widgetList* window_list;
Accelerators* accelerator_list{nullptr};
static widgetList* window_list;
Accelerators* accelerator_list{nullptr};
protected:
struct callback_data
@ -362,43 +362,43 @@ class FWidget : public FVTerm, public FObject
typedef std::vector<member_callback_data> MemberCallbackObjects;
// Accessor
term_area* getPrintArea();
void addPreprocessingHandler ( FVTerm*
, FPreprocessingHandler );
void delPreprocessingHandler (FVTerm*);
term_area* getPrintArea();
void addPreprocessingHandler ( FVTerm*
, FPreprocessingHandler );
void delPreprocessingHandler (FVTerm*);
// Inquiry
bool isChildPrintArea() const;
bool isChildPrintArea() const;
// Mutators
virtual void setStatusBar (FStatusBar*);
virtual void setMenuBar (FMenuBar*);
virtual void setStatusBar (FStatusBar*);
virtual void setMenuBar (FMenuBar*);
// Methods
virtual void adjustSize();
void adjustSizeGlobal();
virtual bool focusNextChild(); // Change child...
virtual bool focusPrevChild(); // ...focus
virtual void adjustSize();
void adjustSizeGlobal();
virtual bool focusNextChild(); // Change child...
virtual bool focusPrevChild(); // ...focus
// Event handlers
virtual bool event (FEvent*);
virtual void onKeyPress (FKeyEvent*);
virtual void onKeyUp (FKeyEvent*);
virtual void onKeyDown (FKeyEvent*);
virtual void onMouseDown (FMouseEvent*);
virtual void onMouseUp (FMouseEvent*);
virtual void onMouseDoubleClick (FMouseEvent*);
virtual void onWheel (FWheelEvent*);
virtual void onMouseMove (FMouseEvent*);
virtual void onFocusIn (FFocusEvent*);
virtual void onFocusOut (FFocusEvent*);
virtual void onChildFocusIn (FFocusEvent*);
virtual void onChildFocusOut (FFocusEvent*);
virtual void onAccel (FAccelEvent*);
virtual void onResize (FResizeEvent*);
virtual void onShow (FShowEvent*);
virtual void onHide (FHideEvent*);
virtual void onClose (FCloseEvent*);
virtual bool event (FEvent*);
virtual void onKeyPress (FKeyEvent*);
virtual void onKeyUp (FKeyEvent*);
virtual void onKeyDown (FKeyEvent*);
virtual void onMouseDown (FMouseEvent*);
virtual void onMouseUp (FMouseEvent*);
virtual void onMouseDoubleClick (FMouseEvent*);
virtual void onWheel (FWheelEvent*);
virtual void onMouseMove (FMouseEvent*);
virtual void onFocusIn (FFocusEvent*);
virtual void onFocusOut (FFocusEvent*);
virtual void onChildFocusIn (FFocusEvent*);
virtual void onChildFocusOut (FFocusEvent*);
virtual void onAccel (FAccelEvent*);
virtual void onResize (FResizeEvent*);
virtual void onShow (FShowEvent*);
virtual void onHide (FHideEvent*);
virtual void onClose (FCloseEvent*);
// Data Members
struct widget_flags flags{};
@ -412,21 +412,21 @@ class FWidget : public FVTerm, public FObject
private:
// Methods
void init();
void finish();
void insufficientSpaceAdjust();
void KeyPressEvent (FKeyEvent*);
void KeyDownEvent (FKeyEvent*);
bool changeFocus (FWidget*, FWidget*, fc::FocusTypes);
void processDestroy();
virtual void draw();
void drawWindows();
void drawChildren();
void drawTransparentShadow (int, int, int, int);
void drawBlockShadow (int, int, int, int);
void drawBox (int, int, int, int);
void drawNewFontBox (int, int, int, int);
static void setColorTheme();
void init();
void finish();
void insufficientSpaceAdjust();
void KeyPressEvent (FKeyEvent*);
void KeyDownEvent (FKeyEvent*);
bool changeFocus (FWidget*, FWidget*, fc::FocusTypes);
void processDestroy();
virtual void draw();
void drawWindows();
void drawChildren();
void drawTransparentShadow (int, int, int, int);
void drawBlockShadow (int, int, int, int);
void drawBox (int, int, int, int);
void drawNewFontBox (int, int, int, int);
static void setColorTheme();
// Data Members
FPoint widget_cursor_position{-1, -1};

View File

@ -94,95 +94,97 @@ class FWindow : public FWidget
FWindow& operator = (const FWindow&) = delete;
// Accessors
const char* getClassName() const;
static FWindow* getWindowWidget (const FWidget*);
static int getWindowLayer (const FWidget*);
FWidget* getWindowFocusWidget() const;
virtual const char* getClassName() const override;
static FWindow* getWindowWidget (const FWidget*);
static int getWindowLayer (const FWidget*);
FWidget* getWindowFocusWidget() const;
// Mutators
bool setWindowWidget (bool);
bool setWindowWidget();
bool unsetWindowWidget();
static void setActiveWindow (FWindow*);
void setWindowFocusWidget (const FWidget*);
bool activateWindow (bool);
bool activateWindow();
void unsetActiveWindow();
bool deactivateWindow();
virtual bool setResizeable (bool);
virtual bool setResizeable();
bool unsetResizeable();
bool setTransparentShadow (bool);
bool setTransparentShadow();
bool unsetTransparentShadow();
bool setShadow (bool);
bool setShadow();
bool unsetShadow();
bool setAlwaysOnTop (bool);
bool setAlwaysOnTop();
bool unsetAlwaysOnTop();
bool setWindowWidget (bool);
bool setWindowWidget();
bool unsetWindowWidget();
static void setActiveWindow (FWindow*);
void setWindowFocusWidget (const FWidget*);
bool activateWindow (bool);
bool activateWindow();
void unsetActiveWindow();
bool deactivateWindow();
virtual bool setResizeable (bool);
virtual bool setResizeable();
bool unsetResizeable();
bool setTransparentShadow (bool);
bool setTransparentShadow();
bool unsetTransparentShadow();
bool setShadow (bool);
bool setShadow();
bool unsetShadow();
bool setAlwaysOnTop (bool);
bool setAlwaysOnTop();
bool unsetAlwaysOnTop();
// Inquiries
bool isZoomed() const;
bool isWindowActive() const;
bool isWindowHidden() const;
bool isResizeable() const;
bool isAlwaysOnTop() const;
bool hasTransparentShadow() const;
bool hasShadow() const;
bool isZoomed() const;
bool isWindowActive() const;
bool isWindowHidden() const;
bool isResizeable() const;
bool isAlwaysOnTop() const;
bool hasTransparentShadow() const;
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
, std::size_t, std::size_t
, bool = true );
virtual void move (int, int);
static FWindow* getWindowWidgetAt (const FPoint&);
static FWindow* getWindowWidgetAt (int, int);
static void addWindow (FWidget*);
static void delWindow (FWidget*);
static void swapWindow (FWidget*, FWidget*);
static bool raiseWindow (FWidget*);
bool raiseWindow ();
static bool lowerWindow (FWidget*);
bool lowerWindow ();
bool zoomWindow ();
static void switchToPrevWindow (FWidget*);
static bool activatePrevWindow();
virtual void setShadowSize (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 ) override;
virtual void move (int, int) override;
static FWindow* getWindowWidgetAt (const FPoint&);
static FWindow* getWindowWidgetAt (int, int);
static void addWindow (FWidget*);
static void delWindow (FWidget*);
static void swapWindow (FWidget*, FWidget*);
static bool raiseWindow (FWidget*);
bool raiseWindow ();
static bool lowerWindow (FWidget*);
bool lowerWindow ();
bool zoomWindow ();
static void switchToPrevWindow (FWidget*);
static bool activatePrevWindow();
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 void onWindowActive (FEvent*);
virtual void onWindowInactive (FEvent*);
virtual void onWindowRaised (FEvent*);
virtual void onWindowLowered (FEvent*);
// Data Members
static FWindow* previous_window;
virtual bool event (FEvent*) override;
virtual void onWindowActive (FEvent*);
virtual void onWindowInactive (FEvent*);
virtual void onWindowRaised (FEvent*);
virtual void onWindowLowered (FEvent*);
private:
// Methods
static void deleteFromAlwaysOnTopList (FWidget*);
static void processAlwaysOnTop();
static void deleteFromAlwaysOnTopList (FWidget*);
static void processAlwaysOnTop();
// Data Members
bool window_active{false};
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