Use the override specifier
This commit is contained in:
parent
0d1f6a5e51
commit
719e9b0586
|
@ -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>
|
2018-12-30 Markus Gans <guru.mail@muenster.de>
|
||||||
* Cygwin compiled fix for C++11
|
* Cygwin compiled fix for C++11
|
||||||
|
|
||||||
|
|
|
@ -50,7 +50,7 @@ class Button : public finalcut::FButton
|
||||||
void setChecked(bool);
|
void setChecked(bool);
|
||||||
|
|
||||||
// Event handler
|
// Event handler
|
||||||
virtual void onKeyPress (finalcut::FKeyEvent*);
|
virtual void onKeyPress (finalcut::FKeyEvent*) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Data Member
|
// Data Member
|
||||||
|
@ -118,9 +118,9 @@ class Calc : public finalcut::FDialog
|
||||||
~Calc();
|
~Calc();
|
||||||
|
|
||||||
// Event handlers
|
// Event handlers
|
||||||
virtual void onKeyPress (finalcut::FKeyEvent*);
|
virtual void onKeyPress (finalcut::FKeyEvent*) override;
|
||||||
virtual void onAccel (finalcut::FAccelEvent*);
|
virtual void onAccel (finalcut::FAccelEvent*) override;
|
||||||
virtual void onClose (finalcut::FCloseEvent*);
|
virtual void onClose (finalcut::FCloseEvent*) override;
|
||||||
|
|
||||||
// Callback method
|
// Callback method
|
||||||
void cb_buttonClicked (finalcut::FWidget*, FDataPtr);
|
void cb_buttonClicked (finalcut::FWidget*, FDataPtr);
|
||||||
|
@ -170,7 +170,7 @@ class Calc : public finalcut::FDialog
|
||||||
|
|
||||||
// Methods
|
// Methods
|
||||||
void drawDispay();
|
void drawDispay();
|
||||||
virtual void draw();
|
virtual void draw() override;
|
||||||
void clear (lDouble&);
|
void clear (lDouble&);
|
||||||
void zero (lDouble&);
|
void zero (lDouble&);
|
||||||
void one (lDouble&);
|
void one (lDouble&);
|
||||||
|
@ -212,7 +212,7 @@ class Calc : public finalcut::FDialog
|
||||||
void setInfixOperator (char);
|
void setInfixOperator (char);
|
||||||
void clearInfixOperator();
|
void clearInfixOperator();
|
||||||
void calcInfixOperator();
|
void calcInfixOperator();
|
||||||
virtual void adjustSize();
|
virtual void adjustSize() override;
|
||||||
const wchar_t* getButtonText (std::size_t);
|
const wchar_t* getButtonText (std::size_t);
|
||||||
void mapKeyFunctions();
|
void mapKeyFunctions();
|
||||||
|
|
||||||
|
|
|
@ -55,8 +55,8 @@ class CheckList : public finalcut::FDialog
|
||||||
void populate();
|
void populate();
|
||||||
|
|
||||||
// Event handlers
|
// Event handlers
|
||||||
virtual void onKeyPress (finalcut::FKeyEvent*);
|
virtual void onKeyPress (finalcut::FKeyEvent*) override;
|
||||||
virtual void onClose (finalcut::FCloseEvent*);
|
virtual void onClose (finalcut::FCloseEvent*) override;
|
||||||
|
|
||||||
// Callback method
|
// Callback method
|
||||||
void cb_showList (finalcut::FWidget*, FDataPtr);
|
void cb_showList (finalcut::FWidget*, FDataPtr);
|
||||||
|
|
|
@ -34,12 +34,12 @@ class Keyboard : public finalcut::FWidget
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// Event handlers
|
// Event handlers
|
||||||
virtual void onKeyPress (finalcut::FKeyEvent*);
|
virtual void onKeyPress (finalcut::FKeyEvent*) override;
|
||||||
virtual void onAccel (finalcut::FAccelEvent*);
|
virtual void onAccel (finalcut::FAccelEvent*) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Methods
|
// Methods
|
||||||
virtual void draw();
|
virtual void draw() override;
|
||||||
};
|
};
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
|
|
|
@ -93,7 +93,7 @@ class Listbox : public FDialog
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Event handlers
|
// Event handlers
|
||||||
virtual void onClose (FCloseEvent*);
|
virtual void onClose (FCloseEvent*) override;
|
||||||
|
|
||||||
// Data Member
|
// Data Member
|
||||||
std::list<double> double_list{};
|
std::list<double> double_list{};
|
||||||
|
|
|
@ -55,7 +55,7 @@ class Listview : public finalcut::FDialog
|
||||||
void populate();
|
void populate();
|
||||||
|
|
||||||
// Event handlers
|
// Event handlers
|
||||||
virtual void onClose (finalcut::FCloseEvent*);
|
virtual void onClose (finalcut::FCloseEvent*) override;
|
||||||
|
|
||||||
// Callback method
|
// Callback method
|
||||||
void cb_showInMessagebox (finalcut::FWidget*, FDataPtr);
|
void cb_showInMessagebox (finalcut::FWidget*, FDataPtr);
|
||||||
|
|
|
@ -40,13 +40,13 @@ class Mandelbrot : public finalcut::FDialog
|
||||||
~Mandelbrot();
|
~Mandelbrot();
|
||||||
|
|
||||||
// Event handlers
|
// Event handlers
|
||||||
virtual void onAccel (finalcut::FAccelEvent*);
|
virtual void onAccel (finalcut::FAccelEvent*) override;
|
||||||
virtual void onClose (finalcut::FCloseEvent*);
|
virtual void onClose (finalcut::FCloseEvent*) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Methods
|
// Methods
|
||||||
virtual void draw();
|
virtual void draw() override;
|
||||||
virtual void adjustSize();
|
virtual void adjustSize() override;
|
||||||
};
|
};
|
||||||
#pragma pack(pop)
|
#pragma pack(pop)
|
||||||
|
|
||||||
|
|
|
@ -54,10 +54,10 @@ class Menu : public finalcut::FDialog
|
||||||
void configureStyleMenuItems();
|
void configureStyleMenuItems();
|
||||||
void configureBorderMenuItems();
|
void configureBorderMenuItems();
|
||||||
void defaultCallback (finalcut::FMenuList*);
|
void defaultCallback (finalcut::FMenuList*);
|
||||||
virtual void adjustSize();
|
virtual void adjustSize() override;
|
||||||
|
|
||||||
// Event handler
|
// Event handler
|
||||||
virtual void onClose (finalcut::FCloseEvent*);
|
virtual void onClose (finalcut::FCloseEvent*) override;
|
||||||
|
|
||||||
// Callback method
|
// Callback method
|
||||||
void cb_message (finalcut::FWidget*, FDataPtr);
|
void cb_message (finalcut::FWidget*, FDataPtr);
|
||||||
|
|
|
@ -51,10 +51,10 @@ class ColorChooser : public finalcut::FWidget
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Method
|
// Method
|
||||||
virtual void draw();
|
virtual void draw() override;
|
||||||
|
|
||||||
// Event handler
|
// Event handler
|
||||||
virtual void onMouseDown (finalcut::FMouseEvent*);
|
virtual void onMouseDown (finalcut::FMouseEvent*) override;
|
||||||
|
|
||||||
// Data Members
|
// Data Members
|
||||||
FColor fg_color{finalcut::fc::White};
|
FColor fg_color{finalcut::fc::White};
|
||||||
|
@ -192,10 +192,10 @@ class Brushes : public finalcut::FWidget
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Method
|
// Method
|
||||||
virtual void draw();
|
virtual void draw() override;
|
||||||
|
|
||||||
// Event handler
|
// Event handler
|
||||||
virtual void onMouseDown (finalcut::FMouseEvent*);
|
virtual void onMouseDown (finalcut::FMouseEvent*) override;
|
||||||
|
|
||||||
// Data Members
|
// Data Members
|
||||||
wchar_t brush{L' '};
|
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);
|
void setGeometry (int, int, std::size_t, std::size_t, bool = true);
|
||||||
|
|
||||||
// Event handlers
|
// Event handlers
|
||||||
virtual void onAccel (finalcut::FAccelEvent*);
|
virtual void onAccel (finalcut::FAccelEvent*) override;
|
||||||
virtual void onClose (finalcut::FCloseEvent*);
|
virtual void onClose (finalcut::FCloseEvent*) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Methods
|
// Methods
|
||||||
virtual void draw();
|
virtual void draw() override;
|
||||||
void drawBrush (int, int, bool = false);
|
void drawBrush (int, int, bool = false);
|
||||||
void drawCanvas();
|
void drawCanvas();
|
||||||
virtual void adjustSize();
|
virtual void adjustSize() override;
|
||||||
|
|
||||||
// Event handler
|
// Event handler
|
||||||
virtual void onMouseDown (finalcut::FMouseEvent*);
|
virtual void onMouseDown (finalcut::FMouseEvent*) override;
|
||||||
virtual void onMouseMove (finalcut::FMouseEvent*);
|
virtual void onMouseMove (finalcut::FMouseEvent*) override;
|
||||||
|
|
||||||
// Callback methods
|
// Callback methods
|
||||||
void cb_colorChanged (finalcut::FWidget*, FDataPtr);
|
void cb_colorChanged (finalcut::FWidget*, FDataPtr);
|
||||||
|
|
|
@ -50,7 +50,7 @@ class Scrollview : public finalcut::FScrollView
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Method
|
// Method
|
||||||
virtual void draw();
|
virtual void draw() override;
|
||||||
|
|
||||||
// Callback methods
|
// Callback methods
|
||||||
void cb_go_east (finalcut::FWidget*, FDataPtr);
|
void cb_go_east (finalcut::FWidget*, FDataPtr);
|
||||||
|
@ -197,7 +197,7 @@ class Scrollviewdemo : public finalcut::FDialog
|
||||||
~Scrollviewdemo();
|
~Scrollviewdemo();
|
||||||
|
|
||||||
// Event handler
|
// Event handler
|
||||||
virtual void onClose (finalcut::FCloseEvent*);
|
virtual void onClose (finalcut::FCloseEvent*) override;
|
||||||
|
|
||||||
// Callback method
|
// Callback method
|
||||||
void cb_quit (finalcut::FWidget* = nullptr, FDataPtr = nullptr);
|
void cb_quit (finalcut::FWidget* = nullptr, FDataPtr = nullptr);
|
||||||
|
|
|
@ -47,9 +47,9 @@ class AttribDlg : public finalcut::FDialog
|
||||||
AttribDlg& operator = (const AttribDlg&) = delete;
|
AttribDlg& operator = (const AttribDlg&) = delete;
|
||||||
|
|
||||||
// Event handlers
|
// Event handlers
|
||||||
virtual void onAccel (finalcut::FAccelEvent*);
|
virtual void onAccel (finalcut::FAccelEvent*) override;
|
||||||
virtual void onWheel (finalcut::FWheelEvent*);
|
virtual void onWheel (finalcut::FWheelEvent*) override;
|
||||||
virtual void onClose (finalcut::FCloseEvent*);
|
virtual void onClose (finalcut::FCloseEvent*) override;
|
||||||
|
|
||||||
// Callback methods
|
// Callback methods
|
||||||
void cb_next (finalcut::FWidget* = nullptr, FDataPtr = nullptr);
|
void cb_next (finalcut::FWidget* = nullptr, FDataPtr = nullptr);
|
||||||
|
@ -60,7 +60,7 @@ class AttribDlg : public finalcut::FDialog
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Method
|
// Method
|
||||||
virtual void adjustSize();
|
virtual void adjustSize() override;
|
||||||
|
|
||||||
// Data Members
|
// Data Members
|
||||||
finalcut::FButton next_button{"&Next >", this};
|
finalcut::FButton next_button{"&Next >", this};
|
||||||
|
@ -195,7 +195,7 @@ class AttribDemo : public finalcut::FWidget
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
// Event handler
|
// Event handler
|
||||||
virtual void onWheel (finalcut::FWheelEvent* ev)
|
virtual void onWheel (finalcut::FWheelEvent* ev) override
|
||||||
{
|
{
|
||||||
auto p = static_cast<AttribDlg*>(getParentWidget());
|
auto p = static_cast<AttribDlg*>(getParentWidget());
|
||||||
|
|
||||||
|
@ -220,7 +220,7 @@ class AttribDemo : public finalcut::FWidget
|
||||||
void printStandout();
|
void printStandout();
|
||||||
void printInvisible();
|
void printInvisible();
|
||||||
void printProtected();
|
void printProtected();
|
||||||
virtual void draw();
|
virtual void draw() override;
|
||||||
|
|
||||||
// Data Member
|
// Data Member
|
||||||
int colors;
|
int colors;
|
||||||
|
|
|
@ -35,11 +35,11 @@ class Timer : public finalcut::FWidget
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// Method
|
// Method
|
||||||
virtual void draw();
|
virtual void draw() override;
|
||||||
|
|
||||||
// Event handlers
|
// Event handlers
|
||||||
virtual void onTimer (finalcut::FTimerEvent*);
|
virtual void onTimer (finalcut::FTimerEvent*) override;
|
||||||
virtual void onAccel (finalcut::FAccelEvent*);
|
virtual void onAccel (finalcut::FAccelEvent*) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
|
|
|
@ -56,10 +56,10 @@ class Transparent : public finalcut::FDialog
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Method
|
// Method
|
||||||
virtual void draw();
|
virtual void draw() override;
|
||||||
|
|
||||||
// Event handlers
|
// Event handlers
|
||||||
virtual void onKeyPress (finalcut::FKeyEvent* ev);
|
virtual void onKeyPress (finalcut::FKeyEvent* ev) override;
|
||||||
|
|
||||||
// Data Members
|
// Data Members
|
||||||
trans_type type;
|
trans_type type;
|
||||||
|
@ -165,13 +165,13 @@ class MainWindow : public finalcut::FDialog
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Method
|
// Method
|
||||||
virtual void draw();
|
virtual void draw() override;
|
||||||
|
|
||||||
// Event handlers
|
// Event handlers
|
||||||
virtual void onClose (finalcut::FCloseEvent*);
|
virtual void onClose (finalcut::FCloseEvent*) override;
|
||||||
virtual void onShow (finalcut::FShowEvent*);
|
virtual void onShow (finalcut::FShowEvent*) override;
|
||||||
virtual void onTimer (finalcut::FTimerEvent*);
|
virtual void onTimer (finalcut::FTimerEvent*) override;
|
||||||
virtual void onKeyPress (finalcut::FKeyEvent* ev)
|
virtual void onKeyPress (finalcut::FKeyEvent* ev) override
|
||||||
{
|
{
|
||||||
if ( ! ev )
|
if ( ! ev )
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -131,7 +131,7 @@ class Treeview : public finalcut::FDialog
|
||||||
struct TreeItem; // forward declaration
|
struct TreeItem; // forward declaration
|
||||||
|
|
||||||
// Methods
|
// Methods
|
||||||
virtual void adjustSize();
|
virtual void adjustSize() override;
|
||||||
|
|
||||||
// Event handler
|
// Event handler
|
||||||
void onClose (finalcut::FCloseEvent*);
|
void onClose (finalcut::FCloseEvent*);
|
||||||
|
|
|
@ -51,8 +51,8 @@ class ProgressDialog : public finalcut::FDialog
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Event handlers
|
// Event handlers
|
||||||
virtual void onShow (finalcut::FShowEvent*);
|
virtual void onShow (finalcut::FShowEvent*) override;
|
||||||
virtual void onTimer (finalcut::FTimerEvent*);
|
virtual void onTimer (finalcut::FTimerEvent*) override;
|
||||||
|
|
||||||
// Callback methods
|
// Callback methods
|
||||||
void cb_reset_bar (finalcut::FWidget*, FDataPtr);
|
void cb_reset_bar (finalcut::FWidget*, FDataPtr);
|
||||||
|
@ -199,7 +199,7 @@ class TextWindow : public finalcut::FDialog
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Method
|
// Method
|
||||||
virtual void adjustSize();
|
virtual void adjustSize() override;
|
||||||
|
|
||||||
// Data Members
|
// Data Members
|
||||||
finalcut::FTextView scrollText{this};
|
finalcut::FTextView scrollText{this};
|
||||||
|
@ -279,10 +279,10 @@ class MyDialog : public finalcut::FDialog
|
||||||
void initButtons();
|
void initButtons();
|
||||||
void initLabels();
|
void initLabels();
|
||||||
void initWidgetsCallbacks();
|
void initWidgetsCallbacks();
|
||||||
virtual void adjustSize();
|
virtual void adjustSize() override;
|
||||||
|
|
||||||
// Event handlers
|
// Event handlers
|
||||||
virtual void onClose (finalcut::FCloseEvent*);
|
virtual void onClose (finalcut::FCloseEvent*) override;
|
||||||
|
|
||||||
// Callback methods
|
// Callback methods
|
||||||
void cb_noFunctionMsg (finalcut::FWidget*, FDataPtr);
|
void cb_noFunctionMsg (finalcut::FWidget*, FDataPtr);
|
||||||
|
|
|
@ -50,8 +50,8 @@ class Watch : public finalcut::FDialog
|
||||||
void printTime();
|
void printTime();
|
||||||
|
|
||||||
// Event handlers
|
// Event handlers
|
||||||
virtual void onTimer (finalcut::FTimerEvent*);
|
virtual void onTimer (finalcut::FTimerEvent*) override;
|
||||||
virtual void onClose (finalcut::FCloseEvent*);
|
virtual void onClose (finalcut::FCloseEvent*) override;
|
||||||
|
|
||||||
// Callback methods
|
// Callback methods
|
||||||
void cb_clock (finalcut::FWidget*, FDataPtr);
|
void cb_clock (finalcut::FWidget*, FDataPtr);
|
||||||
|
@ -59,7 +59,7 @@ class Watch : public finalcut::FDialog
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// Method
|
// Method
|
||||||
virtual void adjustSize();
|
virtual void adjustSize() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Data Members
|
// Data Members
|
||||||
|
|
|
@ -48,11 +48,11 @@ class SmallWindow : public finalcut::FDialog
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Method
|
// Method
|
||||||
virtual void adjustSize();
|
virtual void adjustSize() override;
|
||||||
|
|
||||||
// Event handlers
|
// Event handlers
|
||||||
virtual void onShow (finalcut::FShowEvent*);
|
virtual void onShow (finalcut::FShowEvent*) override;
|
||||||
virtual void onTimer (finalcut::FTimerEvent*);
|
virtual void onTimer (finalcut::FTimerEvent*) override;
|
||||||
|
|
||||||
// Data Members
|
// Data Members
|
||||||
finalcut::FLabel left_arrow{this};
|
finalcut::FLabel left_arrow{this};
|
||||||
|
@ -202,12 +202,12 @@ class Window : public finalcut::FDialog
|
||||||
void configureFileMenuItems();
|
void configureFileMenuItems();
|
||||||
void configureDialogButtons();
|
void configureDialogButtons();
|
||||||
void activateWindow (finalcut::FDialog*);
|
void activateWindow (finalcut::FDialog*);
|
||||||
virtual void adjustSize();
|
virtual void adjustSize() override;
|
||||||
void addClickedCallback (finalcut::FWidget*, WindowCallback);
|
void addClickedCallback (finalcut::FWidget*, WindowCallback);
|
||||||
void addClickedCallback (finalcut::FWidget*, FAppCallback);
|
void addClickedCallback (finalcut::FWidget*, FAppCallback);
|
||||||
|
|
||||||
// Event handlers
|
// Event handlers
|
||||||
virtual void onClose (finalcut::FCloseEvent*);
|
virtual void onClose (finalcut::FCloseEvent*) override;
|
||||||
|
|
||||||
// Callback methods
|
// Callback methods
|
||||||
void cb_createWindows (finalcut::FWidget*, FDataPtr);
|
void cb_createWindows (finalcut::FWidget*, FDataPtr);
|
||||||
|
|
|
@ -707,7 +707,7 @@ void FDialog::onWindowActive (FEvent*)
|
||||||
void FDialog::onWindowInactive (FEvent*)
|
void FDialog::onWindowInactive (FEvent*)
|
||||||
{
|
{
|
||||||
if ( dialog_menu && ! dialog_menu->isVisible() )
|
if ( dialog_menu && ! dialog_menu->isVisible() )
|
||||||
FWindow::previous_window = this;
|
FWindow::setPreviousWindow(this);
|
||||||
|
|
||||||
if ( isVisible() && isEnabled() )
|
if ( isVisible() && isEnabled() )
|
||||||
drawTitleBar();
|
drawTitleBar();
|
||||||
|
|
|
@ -29,7 +29,7 @@ namespace finalcut
|
||||||
|
|
||||||
// static class attributes
|
// static class attributes
|
||||||
bool FObject::timer_modify_lock;
|
bool FObject::timer_modify_lock;
|
||||||
FObject::TimerListPtr FObject::timer_list = nullptr;
|
FObject::TimerList* FObject::timer_list = nullptr;
|
||||||
const FString* fc::emptyFString::empty_string = nullptr;
|
const FString* fc::emptyFString::empty_string = nullptr;
|
||||||
|
|
||||||
|
|
||||||
|
@ -55,7 +55,7 @@ FObject::FObject (FObject* parent)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
timer_list = std::make_shared<TimerList>();
|
timer_list = new TimerList;
|
||||||
}
|
}
|
||||||
catch (const std::bad_alloc& ex)
|
catch (const std::bad_alloc& ex)
|
||||||
{
|
{
|
||||||
|
@ -72,7 +72,10 @@ FObject::~FObject() // destructor
|
||||||
delOwnTimer(); // Delete all timers of this object
|
delOwnTimer(); // Delete all timers of this object
|
||||||
|
|
||||||
if ( ! has_parent && timer_list )
|
if ( ! has_parent && timer_list )
|
||||||
|
{
|
||||||
|
delete timer_list;
|
||||||
timer_list = nullptr;
|
timer_list = nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
if ( ! has_parent && ! fc::emptyFString::isNull() )
|
if ( ! has_parent && ! fc::emptyFString::isNull() )
|
||||||
fc::emptyFString::clear();
|
fc::emptyFString::clear();
|
||||||
|
|
|
@ -96,9 +96,9 @@ class FApplication : public FWidget
|
||||||
FApplication& operator = (const FApplication&) = delete;
|
FApplication& operator = (const FApplication&) = delete;
|
||||||
|
|
||||||
// Accessors
|
// Accessors
|
||||||
const char* getClassName() const;
|
virtual const char* getClassName() const override;
|
||||||
int getArgc() const;
|
int getArgc() const;
|
||||||
char** getArgv() const;
|
char** getArgv() const;
|
||||||
static FApplication* getApplicationObject();
|
static FApplication* getApplicationObject();
|
||||||
|
|
||||||
// Inquiry
|
// Inquiry
|
||||||
|
@ -172,7 +172,7 @@ class FApplication : public FWidget
|
||||||
void processCloseWidget();
|
void processCloseWidget();
|
||||||
bool processNextEvent();
|
bool processNextEvent();
|
||||||
virtual void performTimerAction ( const FObject*
|
virtual void performTimerAction ( const FObject*
|
||||||
, const FEvent* );
|
, const FEvent* ) override;
|
||||||
|
|
||||||
// Data Members
|
// Data Members
|
||||||
int app_argc;
|
int app_argc;
|
||||||
|
|
|
@ -84,80 +84,80 @@ class FButton : public FWidget
|
||||||
FButton& operator = (const FString&);
|
FButton& operator = (const FString&);
|
||||||
|
|
||||||
// Accessors
|
// Accessors
|
||||||
const char* getClassName() const;
|
virtual const char* getClassName() const override;
|
||||||
FString& getText();
|
FString& getText();
|
||||||
|
|
||||||
// Mutators
|
// Mutators
|
||||||
void setForegroundColor (FColor);
|
void setForegroundColor (FColor);
|
||||||
void setBackgroundColor (FColor);
|
void setBackgroundColor (FColor);
|
||||||
void setHotkeyForegroundColor (FColor);
|
void setHotkeyForegroundColor (FColor);
|
||||||
void setFocusForegroundColor (FColor);
|
void setFocusForegroundColor (FColor);
|
||||||
void setFocusBackgroundColor (FColor);
|
void setFocusBackgroundColor (FColor);
|
||||||
void setInactiveForegroundColor (FColor);
|
void setInactiveForegroundColor (FColor);
|
||||||
void setInactiveBackgroundColor (FColor);
|
void setInactiveBackgroundColor (FColor);
|
||||||
bool setNoUnderline(bool);
|
bool setNoUnderline(bool);
|
||||||
bool setNoUnderline();
|
bool setNoUnderline();
|
||||||
bool unsetNoUnderline();
|
bool unsetNoUnderline();
|
||||||
virtual bool setEnable(bool);
|
virtual bool setEnable(bool) override;
|
||||||
virtual bool setEnable();
|
virtual bool setEnable() override;
|
||||||
virtual bool unsetEnable();
|
virtual bool unsetEnable() override;
|
||||||
virtual bool setDisable();
|
virtual bool setDisable() override;
|
||||||
virtual bool setFocus(bool);
|
virtual bool setFocus(bool) override;
|
||||||
virtual bool setFocus();
|
virtual bool setFocus() override;
|
||||||
virtual bool unsetFocus();
|
virtual bool unsetFocus() override;
|
||||||
bool setFlat(bool);
|
bool setFlat(bool);
|
||||||
bool setFlat();
|
bool setFlat();
|
||||||
bool unsetFlat();
|
bool unsetFlat();
|
||||||
bool setShadow(bool);
|
bool setShadow(bool);
|
||||||
bool setShadow();
|
bool setShadow();
|
||||||
bool unsetShadow();
|
bool unsetShadow();
|
||||||
bool setDown(bool);
|
bool setDown(bool);
|
||||||
bool setDown();
|
bool setDown();
|
||||||
bool setUp();
|
bool setUp();
|
||||||
bool setClickAnimation(bool);
|
bool setClickAnimation(bool);
|
||||||
bool setClickAnimation();
|
bool setClickAnimation();
|
||||||
bool unsetClickAnimation();
|
bool unsetClickAnimation();
|
||||||
void setText (const FString&);
|
void setText (const FString&);
|
||||||
|
|
||||||
// Inquiries
|
// Inquiries
|
||||||
bool isFlat() const;
|
bool isFlat() const;
|
||||||
bool isDown() const;
|
bool isDown() const;
|
||||||
bool hasShadow() const;
|
bool hasShadow() const;
|
||||||
bool hasClickAnimation();
|
bool hasClickAnimation();
|
||||||
|
|
||||||
// Methods
|
// Methods
|
||||||
virtual void hide();
|
virtual void hide() override;
|
||||||
|
|
||||||
// Event handlers
|
// Event handlers
|
||||||
virtual void onKeyPress (FKeyEvent*);
|
virtual void onKeyPress (FKeyEvent*) override;
|
||||||
virtual void onMouseDown (FMouseEvent*);
|
virtual void onMouseDown (FMouseEvent*) override;
|
||||||
virtual void onMouseUp (FMouseEvent*);
|
virtual void onMouseUp (FMouseEvent*) override;
|
||||||
virtual void onMouseMove (FMouseEvent*);
|
virtual void onMouseMove (FMouseEvent*) override;
|
||||||
virtual void onTimer (FTimerEvent*);
|
virtual void onTimer (FTimerEvent*) override;
|
||||||
virtual void onAccel (FAccelEvent*);
|
virtual void onAccel (FAccelEvent*) override;
|
||||||
virtual void onFocusIn (FFocusEvent*);
|
virtual void onFocusIn (FFocusEvent*) override;
|
||||||
virtual void onFocusOut (FFocusEvent*);
|
virtual void onFocusOut (FFocusEvent*) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Constants
|
// Constants
|
||||||
static constexpr std::size_t NOT_SET = static_cast<std::size_t>(-1);
|
static constexpr std::size_t NOT_SET = static_cast<std::size_t>(-1);
|
||||||
|
|
||||||
// Methods
|
// Methods
|
||||||
void init();
|
void init();
|
||||||
uChar getHotkey();
|
uChar getHotkey();
|
||||||
void setHotkeyAccelerator();
|
void setHotkeyAccelerator();
|
||||||
void detectHotkey();
|
void detectHotkey();
|
||||||
std::size_t getHotkeyPos (wchar_t[], wchar_t[], std::size_t);
|
std::size_t getHotkeyPos (wchar_t[], wchar_t[], std::size_t);
|
||||||
std::size_t clickAnimationIndent (FWidget*);
|
std::size_t clickAnimationIndent (FWidget*);
|
||||||
void clearRightMargin (FWidget*);
|
void clearRightMargin (FWidget*);
|
||||||
void drawMarginLeft();
|
void drawMarginLeft();
|
||||||
void drawMarginRight();
|
void drawMarginRight();
|
||||||
void drawTopBottomBackground();
|
void drawTopBottomBackground();
|
||||||
void drawButtonTextLine (wchar_t[]);
|
void drawButtonTextLine (wchar_t[]);
|
||||||
virtual void draw();
|
virtual void draw() override;
|
||||||
void updateStatusBar();
|
void updateStatusBar();
|
||||||
void updateButtonColor();
|
void updateButtonColor();
|
||||||
void processClick();
|
void processClick();
|
||||||
|
|
||||||
// Data Members
|
// Data Members
|
||||||
FString text{};
|
FString text{};
|
||||||
|
|
|
@ -85,63 +85,63 @@ class FButtonGroup : public FScrollView
|
||||||
FButtonGroup& operator = (const FButtonGroup&) = delete;
|
FButtonGroup& operator = (const FButtonGroup&) = delete;
|
||||||
|
|
||||||
// Accessor
|
// Accessor
|
||||||
const char* getClassName() const;
|
virtual const char* getClassName() const override;
|
||||||
FToggleButton* getFirstButton();
|
FToggleButton* getFirstButton();
|
||||||
FToggleButton* getLastButton();
|
FToggleButton* getLastButton();
|
||||||
FToggleButton* getButton (int) const;
|
FToggleButton* getButton (int) const;
|
||||||
std::size_t getCount() const;
|
std::size_t getCount() const;
|
||||||
FString& getText();
|
FString& getText();
|
||||||
|
|
||||||
// Mutator
|
// Mutator
|
||||||
virtual bool setEnable(bool);
|
virtual bool setEnable(bool) override;
|
||||||
virtual bool setEnable();
|
virtual bool setEnable() override;
|
||||||
virtual bool unsetEnable();
|
virtual bool unsetEnable() override;
|
||||||
virtual bool setDisable();
|
virtual bool setDisable() override;
|
||||||
void setText (const FString&);
|
void setText (const FString&);
|
||||||
|
|
||||||
// Inquiries
|
// Inquiries
|
||||||
bool isChecked(int) const;
|
bool isChecked(int) const;
|
||||||
bool hasFocusedButton() const;
|
bool hasFocusedButton() const;
|
||||||
bool hasCheckedButton() const;
|
bool hasCheckedButton() const;
|
||||||
|
|
||||||
// Methods
|
// Methods
|
||||||
virtual void hide();
|
virtual void hide() override;
|
||||||
void insert (FToggleButton*);
|
void insert (FToggleButton*);
|
||||||
void remove (FToggleButton*);
|
void remove (FToggleButton*);
|
||||||
void checkScrollSize (FToggleButton*);
|
void checkScrollSize (FToggleButton*);
|
||||||
void checkScrollSize (const FRect&);
|
void checkScrollSize (const FRect&);
|
||||||
|
|
||||||
// Event handlers
|
// Event handlers
|
||||||
virtual void onMouseDown (FMouseEvent*);
|
virtual void onMouseDown (FMouseEvent*) override;
|
||||||
virtual void onAccel (FAccelEvent*);
|
virtual void onAccel (FAccelEvent*) override;
|
||||||
virtual void onFocusIn (FFocusEvent*);
|
virtual void onFocusIn (FFocusEvent*) override;
|
||||||
|
|
||||||
// Callback method
|
// Callback method
|
||||||
void cb_buttonToggled (FWidget*, FDataPtr);
|
void cb_buttonToggled (FWidget*, FDataPtr);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// Accessor
|
// Accessor
|
||||||
uChar getHotkey();
|
uChar getHotkey();
|
||||||
|
|
||||||
// Mutator
|
// Mutator
|
||||||
void setHotkeyAccelerator();
|
void setHotkeyAccelerator();
|
||||||
|
|
||||||
// Methods
|
// Methods
|
||||||
virtual void draw();
|
virtual void draw() override;
|
||||||
void drawLabel();
|
void drawLabel();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Constants
|
// Constants
|
||||||
static constexpr std::size_t NOT_SET = static_cast<std::size_t>(-1);
|
static constexpr std::size_t NOT_SET = static_cast<std::size_t>(-1);
|
||||||
|
|
||||||
// Inquiries
|
// Inquiries
|
||||||
bool isRadioButton (FToggleButton*) const;
|
bool isRadioButton (FToggleButton*) const;
|
||||||
|
|
||||||
// Methods
|
// Methods
|
||||||
void init();
|
void init();
|
||||||
std::size_t getHotkeyPos (wchar_t[], wchar_t[], std::size_t);
|
std::size_t getHotkeyPos (wchar_t[], wchar_t[], std::size_t);
|
||||||
void drawText (wchar_t[], std::size_t, std::size_t);
|
void drawText (wchar_t[], std::size_t, std::size_t);
|
||||||
void directFocus();
|
void directFocus();
|
||||||
|
|
||||||
// Data Members
|
// Data Members
|
||||||
FString text{};
|
FString text{};
|
||||||
|
|
|
@ -67,10 +67,10 @@ static uInt character[][fc::NUM_OF_ENCODINGS] =
|
||||||
{0x2592, 'a', 0xb0, '#'}, // ▒ - MediumShade
|
{0x2592, 'a', 0xb0, '#'}, // ▒ - MediumShade
|
||||||
{0x2588, '0', 0xdb, '#'}, // █ - FullBlock
|
{0x2588, '0', 0xdb, '#'}, // █ - FullBlock
|
||||||
{0x25ae, '_', 0xfe, '#'}, // ▮ - BlackVerticalRectangle (1)
|
{0x25ae, '_', 0xfe, '#'}, // ▮ - BlackVerticalRectangle (1)
|
||||||
{0x258c, 0 , 0xdd, ' '}, // ▌ - LeftHalfBlock
|
{0x258c, 0, 0xdd, ' '}, // ▌ - LeftHalfBlock
|
||||||
{0x2590, 0 , 0xde, ' '}, // ▐ - RightHalfBlock
|
{0x2590, 0, 0xde, ' '}, // ▐ - RightHalfBlock
|
||||||
{0x2584, 0 , 0xdc, ' '}, // ▄ - LowerHalfBlock
|
{0x2584, 0, 0xdc, ' '}, // ▄ - LowerHalfBlock
|
||||||
{0x2580, 0 , 0xdf, ' '}, // ▀ - UpperHalfBlock
|
{0x2580, 0, 0xdf, ' '}, // ▀ - UpperHalfBlock
|
||||||
{0x2500, 'q', 0xc4, '-'}, // ─ - BoxDrawingsHorizontal
|
{0x2500, 'q', 0xc4, '-'}, // ─ - BoxDrawingsHorizontal
|
||||||
{0x2502, 'x', 0xb3, '|'}, // │ - BoxDrawingsVertical
|
{0x2502, 'x', 0xb3, '|'}, // │ - BoxDrawingsVertical
|
||||||
{0x250c, 'l', 0xda, '.'}, // ┌ - BoxDrawingsDownAndRight
|
{0x250c, 'l', 0xda, '.'}, // ┌ - BoxDrawingsDownAndRight
|
||||||
|
|
|
@ -86,13 +86,13 @@ class FCheckBox : public FToggleButton
|
||||||
FCheckBox& operator = (const FCheckBox&) = delete;
|
FCheckBox& operator = (const FCheckBox&) = delete;
|
||||||
|
|
||||||
// Accessor
|
// Accessor
|
||||||
const char* getClassName() const;
|
virtual const char* getClassName() const override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Methods
|
// Methods
|
||||||
void init();
|
void init();
|
||||||
virtual void draw();
|
virtual void draw() override;
|
||||||
void drawCheckButton();
|
void drawCheckButton();
|
||||||
};
|
};
|
||||||
#pragma pack(pop)
|
#pragma pack(pop)
|
||||||
|
|
||||||
|
|
|
@ -86,13 +86,13 @@ class FCheckMenuItem : public FMenuItem
|
||||||
FCheckMenuItem& operator = (const FCheckMenuItem&) = delete;
|
FCheckMenuItem& operator = (const FCheckMenuItem&) = delete;
|
||||||
|
|
||||||
// Accessor
|
// Accessor
|
||||||
const char* getClassName() const;
|
virtual const char* getClassName() const override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Methods
|
// Methods
|
||||||
void init (FWidget*);
|
void init (FWidget*);
|
||||||
void processToggle();
|
void processToggle();
|
||||||
void processClicked();
|
void processClicked();
|
||||||
};
|
};
|
||||||
#pragma pack(pop)
|
#pragma pack(pop)
|
||||||
|
|
||||||
|
|
|
@ -100,7 +100,7 @@ class FDialog : public FWindow
|
||||||
FDialog& operator = (const FDialog&) = delete;
|
FDialog& operator = (const FDialog&) = delete;
|
||||||
|
|
||||||
// Accessors
|
// Accessors
|
||||||
virtual const char* getClassName() const;
|
virtual const char* getClassName() const override;
|
||||||
FString getText() const;
|
FString getText() const;
|
||||||
|
|
||||||
// Mutators
|
// Mutators
|
||||||
|
@ -110,7 +110,7 @@ class FDialog : public FWindow
|
||||||
bool setModal (bool);
|
bool setModal (bool);
|
||||||
bool setModal();
|
bool setModal();
|
||||||
bool unsetModal();
|
bool unsetModal();
|
||||||
virtual bool setResizeable (bool);
|
virtual bool setResizeable (bool) override;
|
||||||
bool setScrollable (bool);
|
bool setScrollable (bool);
|
||||||
bool setScrollable();
|
bool setScrollable();
|
||||||
bool unsetScrollable();
|
bool unsetScrollable();
|
||||||
|
@ -121,16 +121,16 @@ class FDialog : public FWindow
|
||||||
bool isScrollable();
|
bool isScrollable();
|
||||||
|
|
||||||
// Methods
|
// Methods
|
||||||
virtual void show();
|
virtual void show() override;
|
||||||
virtual void hide();
|
virtual void hide() override;
|
||||||
int exec();
|
int exec();
|
||||||
virtual void setPos (int, int, bool = true);
|
virtual void setPos (int, int, bool = true) override;
|
||||||
virtual void move (int, int);
|
virtual void move (int, int) override;
|
||||||
bool moveUp (int);
|
bool moveUp (int);
|
||||||
bool moveDown (int);
|
bool moveDown (int);
|
||||||
bool moveLeft (int);
|
bool moveLeft (int);
|
||||||
bool moveRight (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 reduceHeight (int);
|
||||||
bool expandHeight (int);
|
bool expandHeight (int);
|
||||||
bool reduceWidth (int);
|
bool reduceWidth (int);
|
||||||
|
@ -138,27 +138,27 @@ class FDialog : public FWindow
|
||||||
void activateDialog();
|
void activateDialog();
|
||||||
|
|
||||||
// Event handlers
|
// Event handlers
|
||||||
virtual void onKeyPress (FKeyEvent*);
|
virtual void onKeyPress (FKeyEvent*) override;
|
||||||
virtual void onMouseDown (FMouseEvent*);
|
virtual void onMouseDown (FMouseEvent*) override;
|
||||||
virtual void onMouseUp (FMouseEvent*);
|
virtual void onMouseUp (FMouseEvent*) override;
|
||||||
virtual void onMouseMove (FMouseEvent*);
|
virtual void onMouseMove (FMouseEvent*) override;
|
||||||
virtual void onMouseDoubleClick (FMouseEvent*);
|
virtual void onMouseDoubleClick (FMouseEvent*) override;
|
||||||
virtual void onAccel (FAccelEvent*);
|
virtual void onAccel (FAccelEvent*) override;
|
||||||
virtual void onWindowActive (FEvent*);
|
virtual void onWindowActive (FEvent*) override;
|
||||||
virtual void onWindowInactive (FEvent*);
|
virtual void onWindowInactive (FEvent*) override;
|
||||||
virtual void onWindowRaised (FEvent*);
|
virtual void onWindowRaised (FEvent*) override;
|
||||||
virtual void onWindowLowered (FEvent*);
|
virtual void onWindowLowered (FEvent*) override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// Methods
|
// Methods
|
||||||
virtual void done (int);
|
virtual void done (int);
|
||||||
virtual void draw();
|
virtual void draw() override;
|
||||||
void drawDialogShadow();
|
void drawDialogShadow();
|
||||||
|
|
||||||
// Event handlers
|
// Event handlers
|
||||||
virtual void onShow (FShowEvent*);
|
virtual void onShow (FShowEvent*) override;
|
||||||
virtual void onHide (FHideEvent*);
|
virtual void onHide (FHideEvent*) override;
|
||||||
virtual void onClose (FCloseEvent*);
|
virtual void onClose (FCloseEvent*) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Typedef
|
// Typedef
|
||||||
|
@ -184,7 +184,7 @@ class FDialog : public FWindow
|
||||||
void initMoveSizeMenuItem (FMenu*);
|
void initMoveSizeMenuItem (FMenu*);
|
||||||
void initZoomMenuItem (FMenu*);
|
void initZoomMenuItem (FMenu*);
|
||||||
void initCloseMenuItem (FMenu*);
|
void initCloseMenuItem (FMenu*);
|
||||||
virtual void drawBorder();
|
virtual void drawBorder() override;
|
||||||
void drawTitleBar();
|
void drawTitleBar();
|
||||||
void drawBarButton();
|
void drawBarButton();
|
||||||
void drawZoomButton();
|
void drawZoomButton();
|
||||||
|
|
|
@ -92,7 +92,7 @@ class FDialogListMenu : public FMenu
|
||||||
FDialogListMenu& operator = (const FDialogListMenu&) = delete;
|
FDialogListMenu& operator = (const FDialogListMenu&) = delete;
|
||||||
|
|
||||||
// Accessors
|
// Accessors
|
||||||
virtual const char* getClassName() const;
|
virtual const char* getClassName() const override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Method
|
// Method
|
||||||
|
|
|
@ -116,21 +116,21 @@ class FFileDialog : public FDialog
|
||||||
FFileDialog& operator = (const FFileDialog&);
|
FFileDialog& operator = (const FFileDialog&);
|
||||||
|
|
||||||
// Accessors
|
// Accessors
|
||||||
const char* getClassName() const;
|
virtual const char* getClassName() const override;
|
||||||
const FString getPath() const;
|
const FString getPath() const;
|
||||||
const FString getFilter() const;
|
const FString getFilter() const;
|
||||||
const FString getSelectedFile() const;
|
const FString getSelectedFile() const;
|
||||||
bool getShowHiddenFiles();
|
bool getShowHiddenFiles();
|
||||||
|
|
||||||
// Mutators
|
// Mutators
|
||||||
void setPath (const FString&);
|
void setPath (const FString&);
|
||||||
void setFilter (const FString&);
|
void setFilter (const FString&);
|
||||||
bool setShowHiddenFiles(bool);
|
bool setShowHiddenFiles(bool);
|
||||||
bool setShowHiddenFiles();
|
bool setShowHiddenFiles();
|
||||||
bool unsetShowHiddenFiles();
|
bool unsetShowHiddenFiles();
|
||||||
|
|
||||||
// Event handler
|
// Event handler
|
||||||
virtual void onKeyPress (FKeyEvent*);
|
virtual void onKeyPress (FKeyEvent*) override;
|
||||||
|
|
||||||
// Methods
|
// Methods
|
||||||
static const FString fileOpenChooser ( FWidget*
|
static const FString fileOpenChooser ( FWidget*
|
||||||
|
@ -142,7 +142,7 @@ class FFileDialog : public FDialog
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// Method
|
// Method
|
||||||
virtual void adjustSize();
|
virtual void adjustSize() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Typedef
|
// Typedef
|
||||||
|
@ -163,42 +163,42 @@ class FFileDialog : public FDialog
|
||||||
typedef std::vector<dir_entry> dirEntries;
|
typedef std::vector<dir_entry> dirEntries;
|
||||||
|
|
||||||
// Method
|
// Method
|
||||||
void init();
|
void init();
|
||||||
void widgetSettings (int, int);
|
void widgetSettings (int, int);
|
||||||
void initCallbacks();
|
void initCallbacks();
|
||||||
bool pattern_match (const char* const, char[]);
|
bool pattern_match (const char* const, char[]);
|
||||||
void clear();
|
void clear();
|
||||||
int numOfDirs();
|
int numOfDirs();
|
||||||
void sortDir();
|
void sortDir();
|
||||||
int readDir();
|
int readDir();
|
||||||
void getEntry (const char* const, struct dirent*);
|
void getEntry (const char* const, struct dirent*);
|
||||||
void followSymLink (const char* const, dir_entry&);
|
void followSymLink (const char* const, dir_entry&);
|
||||||
void dirEntriesToList();
|
void dirEntriesToList();
|
||||||
void selectDirectoryEntry (const char* const);
|
void selectDirectoryEntry (const char* const);
|
||||||
int changeDir (const FString&);
|
int changeDir (const FString&);
|
||||||
void printPath (const FString&);
|
void printPath (const FString&);
|
||||||
static const FString getHomeDir();
|
static const FString getHomeDir();
|
||||||
|
|
||||||
// Callback methods
|
// Callback methods
|
||||||
void cb_processActivate (FWidget*, FDataPtr);
|
void cb_processActivate (FWidget*, FDataPtr);
|
||||||
void cb_processRowChanged (FWidget*, FDataPtr);
|
void cb_processRowChanged (FWidget*, FDataPtr);
|
||||||
void cb_processClicked (FWidget*, FDataPtr);
|
void cb_processClicked (FWidget*, FDataPtr);
|
||||||
void cb_processCancel (FWidget*, FDataPtr);
|
void cb_processCancel (FWidget*, FDataPtr);
|
||||||
void cb_processOpen (FWidget*, FDataPtr);
|
void cb_processOpen (FWidget*, FDataPtr);
|
||||||
void cb_processShowHidden (FWidget*, FDataPtr);
|
void cb_processShowHidden (FWidget*, FDataPtr);
|
||||||
|
|
||||||
// Data Members
|
// Data Members
|
||||||
DIR* directory_stream{nullptr};
|
DIR* directory_stream{nullptr};
|
||||||
dirEntries dir_entries{};
|
dirEntries dir_entries{};
|
||||||
FString directory{};
|
FString directory{};
|
||||||
FString filter_pattern{};
|
FString filter_pattern{};
|
||||||
FLineEdit filename{this};
|
FLineEdit filename{this};
|
||||||
FListBox filebrowser{this};
|
FListBox filebrowser{this};
|
||||||
FCheckBox hidden{this};
|
FCheckBox hidden{this};
|
||||||
FButton cancel{this};
|
FButton cancel{this};
|
||||||
FButton open{this};
|
FButton open{this};
|
||||||
DialogType dlg_type{FFileDialog::Open};
|
DialogType dlg_type{FFileDialog::Open};
|
||||||
bool show_hidden{false};
|
bool show_hidden{false};
|
||||||
|
|
||||||
// Friend functions
|
// Friend functions
|
||||||
friend bool sortByName ( const FFileDialog::dir_entry&
|
friend bool sortByName ( const FFileDialog::dir_entry&
|
||||||
|
|
|
@ -100,58 +100,58 @@ class FLabel : public FWidget
|
||||||
const FLabel& operator >> (FString&);
|
const FLabel& operator >> (FString&);
|
||||||
|
|
||||||
// Accessors
|
// Accessors
|
||||||
const char* getClassName() const;
|
virtual const char* getClassName() const override;
|
||||||
FWidget* getAccelWidget();
|
FWidget* getAccelWidget();
|
||||||
fc::text_alignment getAlignment();
|
fc::text_alignment getAlignment();
|
||||||
FString& getText();
|
FString& getText();
|
||||||
|
|
||||||
// Mutators
|
// Mutators
|
||||||
void setAccelWidget (FWidget* = nullptr);
|
void setAccelWidget (FWidget* = nullptr);
|
||||||
void setAlignment(fc::text_alignment);
|
void setAlignment(fc::text_alignment);
|
||||||
bool setEmphasis(bool);
|
bool setEmphasis(bool);
|
||||||
bool setEmphasis();
|
bool setEmphasis();
|
||||||
bool unsetEmphasis();
|
bool unsetEmphasis();
|
||||||
bool setReverseMode(bool);
|
bool setReverseMode(bool);
|
||||||
bool setReverseMode();
|
bool setReverseMode();
|
||||||
bool unsetReverseMode();
|
bool unsetReverseMode();
|
||||||
virtual bool setEnable (bool);
|
virtual bool setEnable (bool) override;
|
||||||
void setNumber (uLong);
|
void setNumber (uLong);
|
||||||
void setNumber (long);
|
void setNumber (long);
|
||||||
void setNumber (float, int = FLT_DIG);
|
void setNumber (float, int = FLT_DIG);
|
||||||
void setNumber (double, int = DBL_DIG);
|
void setNumber (double, int = DBL_DIG);
|
||||||
void setNumber (lDouble, int = LDBL_DIG);
|
void setNumber (lDouble, int = LDBL_DIG);
|
||||||
void setText (const FString&);
|
void setText (const FString&);
|
||||||
|
|
||||||
// Inquiries
|
// Inquiries
|
||||||
bool hasEmphasis();
|
bool hasEmphasis();
|
||||||
bool hasReverseMode();
|
bool hasReverseMode();
|
||||||
|
|
||||||
// Methods
|
// Methods
|
||||||
virtual void hide();
|
virtual void hide() override;
|
||||||
void clear();
|
void clear();
|
||||||
|
|
||||||
// Event handlers
|
// Event handlers
|
||||||
virtual void onMouseDown (FMouseEvent*);
|
virtual void onMouseDown (FMouseEvent*) override;
|
||||||
virtual void onAccel (FAccelEvent*);
|
virtual void onAccel (FAccelEvent*) override;
|
||||||
|
|
||||||
// Callback method
|
// Callback method
|
||||||
void cb_accel_widget_destroyed (FWidget*, FDataPtr);
|
void cb_accel_widget_destroyed (FWidget*, FDataPtr);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Constants
|
// Constants
|
||||||
static constexpr std::size_t NOT_SET = static_cast<std::size_t>(-1);
|
static constexpr std::size_t NOT_SET = static_cast<std::size_t>(-1);
|
||||||
|
|
||||||
// Methods
|
// Methods
|
||||||
void init();
|
void init();
|
||||||
uChar getHotkey();
|
uChar getHotkey();
|
||||||
std::size_t getHotkeyPos (wchar_t[], wchar_t[], std::size_t);
|
std::size_t getHotkeyPos (wchar_t[], wchar_t[], std::size_t);
|
||||||
void setHotkeyAccelerator();
|
void setHotkeyAccelerator();
|
||||||
std::size_t getAlignOffset (std::size_t);
|
std::size_t getAlignOffset (std::size_t);
|
||||||
virtual void draw();
|
virtual void draw() override;
|
||||||
void drawMultiLine();
|
void drawMultiLine();
|
||||||
void drawSingleLine();
|
void drawSingleLine();
|
||||||
void printLine ( wchar_t[], std::size_t
|
void printLine ( wchar_t[], std::size_t
|
||||||
, std::size_t, std::size_t = 0 );
|
, std::size_t, std::size_t = 0 );
|
||||||
|
|
||||||
// Data Members
|
// Data Members
|
||||||
FStringList multiline_text{};
|
FStringList multiline_text{};
|
||||||
|
|
|
@ -103,46 +103,46 @@ class FLineEdit : public FWidget
|
||||||
const FLineEdit& operator >> (FString&);
|
const FLineEdit& operator >> (FString&);
|
||||||
|
|
||||||
// Accessors
|
// Accessors
|
||||||
const char* getClassName() const;
|
virtual const char* getClassName() const override;
|
||||||
FString getText() const;
|
FString getText() const;
|
||||||
int getLabelOrientation();
|
int getLabelOrientation();
|
||||||
|
|
||||||
// Mutators
|
// Mutators
|
||||||
void setText (const FString&);
|
void setText (const FString&);
|
||||||
void setLabelText (const FString&);
|
void setLabelText (const FString&);
|
||||||
void setLabelOrientation(const label_o);
|
void setLabelOrientation(const label_o);
|
||||||
virtual bool setEnable(bool);
|
virtual bool setEnable(bool) override;
|
||||||
virtual bool setEnable();
|
virtual bool setEnable() override;
|
||||||
virtual bool unsetEnable();
|
virtual bool unsetEnable() override;
|
||||||
virtual bool setDisable();
|
virtual bool setDisable() override;
|
||||||
virtual bool setFocus(bool);
|
virtual bool setFocus(bool) override;
|
||||||
virtual bool setFocus();
|
virtual bool setFocus() override;
|
||||||
virtual bool unsetFocus();
|
virtual bool unsetFocus() override;
|
||||||
bool setShadow(bool);
|
bool setShadow(bool);
|
||||||
bool setShadow();
|
bool setShadow();
|
||||||
bool unsetShadow();
|
bool unsetShadow();
|
||||||
|
|
||||||
// Inquiry
|
// Inquiry
|
||||||
bool hasShadow();
|
bool hasShadow();
|
||||||
|
|
||||||
// Methods
|
// Methods
|
||||||
virtual void hide();
|
virtual void hide() override;
|
||||||
void clear();
|
void clear();
|
||||||
|
|
||||||
// Event handlers
|
// Event handlers
|
||||||
virtual void onKeyPress (FKeyEvent*);
|
virtual void onKeyPress (FKeyEvent*) override;
|
||||||
virtual void onMouseDown (FMouseEvent*);
|
virtual void onMouseDown (FMouseEvent*) override;
|
||||||
virtual void onMouseUp (FMouseEvent*);
|
virtual void onMouseUp (FMouseEvent*) override;
|
||||||
virtual void onMouseMove (FMouseEvent*);
|
virtual void onMouseMove (FMouseEvent*) override;
|
||||||
virtual void onTimer (FTimerEvent*);
|
virtual void onTimer (FTimerEvent*) override;
|
||||||
virtual void onAccel (FAccelEvent*);
|
virtual void onAccel (FAccelEvent*) override;
|
||||||
virtual void onHide (FHideEvent*);
|
virtual void onHide (FHideEvent*) override;
|
||||||
virtual void onFocusIn (FFocusEvent*);
|
virtual void onFocusIn (FFocusEvent*) override;
|
||||||
virtual void onFocusOut (FFocusEvent*);
|
virtual void onFocusOut (FFocusEvent*) override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void adjustLabel();
|
void adjustLabel();
|
||||||
virtual void adjustSize();
|
virtual void adjustSize() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Enumeration
|
// Enumeration
|
||||||
|
@ -154,21 +154,21 @@ class FLineEdit : public FWidget
|
||||||
};
|
};
|
||||||
|
|
||||||
// Methods
|
// Methods
|
||||||
void init();
|
void init();
|
||||||
bool hasHotkey();
|
bool hasHotkey();
|
||||||
virtual void draw();
|
virtual void draw() override;
|
||||||
void drawInputField();
|
void drawInputField();
|
||||||
void keyLeft();
|
void keyLeft();
|
||||||
void keyRight();
|
void keyRight();
|
||||||
void keyHome();
|
void keyHome();
|
||||||
void keyEnd();
|
void keyEnd();
|
||||||
void keyDel();
|
void keyDel();
|
||||||
void keyBackspace();
|
void keyBackspace();
|
||||||
void keyInsert();
|
void keyInsert();
|
||||||
void keyEnter();
|
void keyEnter();
|
||||||
bool keyInput (FKey);
|
bool keyInput (FKey);
|
||||||
void processActivate();
|
void processActivate();
|
||||||
void processChanged();
|
void processChanged();
|
||||||
|
|
||||||
// Data Members
|
// Data Members
|
||||||
FString text{""};
|
FString text{""};
|
||||||
|
|
|
@ -85,15 +85,16 @@ class FListBoxItem
|
||||||
FListBoxItem& operator = (const FListBoxItem&);
|
FListBoxItem& operator = (const FListBoxItem&);
|
||||||
|
|
||||||
// Accessors
|
// Accessors
|
||||||
virtual FString& getText();
|
virtual const char* getClassName() const;
|
||||||
virtual FDataPtr getData() const;
|
virtual FString& getText();
|
||||||
|
virtual FDataPtr getData() const;
|
||||||
|
|
||||||
// Mutators
|
// Mutators
|
||||||
void setText (const FString&);
|
void setText (const FString&);
|
||||||
void setData (FDataPtr);
|
void setData (FDataPtr);
|
||||||
|
|
||||||
// Methods
|
// Methods
|
||||||
void clear();
|
void clear();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Friend classes
|
// Friend classes
|
||||||
|
@ -109,6 +110,10 @@ class FListBoxItem
|
||||||
|
|
||||||
|
|
||||||
// FListBoxItem inline functions
|
// FListBoxItem inline functions
|
||||||
|
//----------------------------------------------------------------------
|
||||||
|
inline const char* FListBoxItem::getClassName() const
|
||||||
|
{ return "FListBoxItem"; }
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
inline FString& FListBoxItem::getText()
|
inline FString& FListBoxItem::getText()
|
||||||
{ return text; }
|
{ return text; }
|
||||||
|
@ -163,72 +168,72 @@ class FListBox : public FWidget
|
||||||
FListBox& operator = (const FListBox&) = delete;
|
FListBox& operator = (const FListBox&) = delete;
|
||||||
|
|
||||||
// Accessors
|
// Accessors
|
||||||
const char* getClassName() const;
|
virtual const char* getClassName() const override;
|
||||||
std::size_t getCount() const;
|
std::size_t getCount() const;
|
||||||
FListBoxItem getItem (std::size_t);
|
FListBoxItem getItem (std::size_t);
|
||||||
FListBoxItem getItem (listBoxItems::iterator) const;
|
FListBoxItem getItem (listBoxItems::iterator) const;
|
||||||
std::size_t currentItem() const;
|
std::size_t currentItem() const;
|
||||||
FString& getText();
|
FString& getText();
|
||||||
|
|
||||||
// Mutators
|
// Mutators
|
||||||
void setCurrentItem (std::size_t);
|
void setCurrentItem (std::size_t);
|
||||||
void setCurrentItem (listBoxItems::iterator);
|
void setCurrentItem (listBoxItems::iterator);
|
||||||
void selectItem (std::size_t);
|
void selectItem (std::size_t);
|
||||||
void selectItem (listBoxItems::iterator);
|
void selectItem (listBoxItems::iterator);
|
||||||
void unselectItem (std::size_t);
|
void unselectItem (std::size_t);
|
||||||
void unselectItem (listBoxItems::iterator);
|
void unselectItem (listBoxItems::iterator);
|
||||||
void showInsideBrackets (std::size_t, fc::brackets_type);
|
void showInsideBrackets (std::size_t, fc::brackets_type);
|
||||||
void showNoBrackets (std::size_t);
|
void showNoBrackets (std::size_t);
|
||||||
void showNoBrackets (listBoxItems::iterator);
|
void showNoBrackets (listBoxItems::iterator);
|
||||||
virtual void setGeometry ( int, int
|
virtual void setGeometry ( int, int
|
||||||
, std::size_t, std::size_t
|
, std::size_t, std::size_t
|
||||||
, bool = true );
|
, bool = true ) override;
|
||||||
void setMultiSelection (bool);
|
void setMultiSelection (bool);
|
||||||
void setMultiSelection ();
|
void setMultiSelection ();
|
||||||
void unsetMultiSelection ();
|
void unsetMultiSelection ();
|
||||||
virtual bool setDisable();
|
virtual bool setDisable() override;
|
||||||
virtual bool setFocus (bool);
|
virtual bool setFocus (bool) override;
|
||||||
virtual bool setFocus();
|
virtual bool setFocus() override;
|
||||||
virtual bool unsetFocus();
|
virtual bool unsetFocus() override;
|
||||||
void setText (const FString&);
|
void setText (const FString&);
|
||||||
|
|
||||||
// Inquiries
|
// Inquiries
|
||||||
bool isSelected (std::size_t);
|
bool isSelected (std::size_t);
|
||||||
bool isSelected (listBoxItems::iterator) const;
|
bool isSelected (listBoxItems::iterator) const;
|
||||||
bool isMultiSelection() const;
|
bool isMultiSelection() const;
|
||||||
bool hasBrackets (std::size_t);
|
bool hasBrackets (std::size_t);
|
||||||
bool hasBrackets (listBoxItems::iterator) const;
|
bool hasBrackets (listBoxItems::iterator) const;
|
||||||
|
|
||||||
// Methods
|
// Methods
|
||||||
virtual void hide();
|
virtual void hide() override;
|
||||||
template <typename Iterator, typename InsertConverter>
|
template <typename Iterator, typename InsertConverter>
|
||||||
void insert (Iterator, Iterator, InsertConverter);
|
void insert (Iterator, Iterator, InsertConverter);
|
||||||
template <typename Container, typename LazyConverter>
|
template <typename Container, typename LazyConverter>
|
||||||
void insert (Container, LazyConverter);
|
void insert (Container, LazyConverter);
|
||||||
void insert (FListBoxItem);
|
void insert (FListBoxItem);
|
||||||
template <typename ItemT>
|
template <typename ItemT>
|
||||||
void insert ( const ItemT&
|
void insert ( const ItemT&
|
||||||
, fc::brackets_type = fc::NoBrackets
|
, fc::brackets_type = fc::NoBrackets
|
||||||
, bool = false
|
, bool = false
|
||||||
, FDataPtr = nullptr );
|
, FDataPtr = nullptr );
|
||||||
void remove (std::size_t);
|
void remove (std::size_t);
|
||||||
void clear();
|
void clear();
|
||||||
|
|
||||||
// Event handlers
|
// Event handlers
|
||||||
virtual void onKeyPress (FKeyEvent*);
|
virtual void onKeyPress (FKeyEvent*) override;
|
||||||
virtual void onMouseDown (FMouseEvent*);
|
virtual void onMouseDown (FMouseEvent*) override;
|
||||||
virtual void onMouseUp (FMouseEvent*);
|
virtual void onMouseUp (FMouseEvent*) override;
|
||||||
virtual void onMouseMove (FMouseEvent*);
|
virtual void onMouseMove (FMouseEvent*) override;
|
||||||
virtual void onMouseDoubleClick (FMouseEvent*);
|
virtual void onMouseDoubleClick (FMouseEvent*) override;
|
||||||
virtual void onWheel (FWheelEvent*);
|
virtual void onWheel (FWheelEvent*) override;
|
||||||
virtual void onTimer (FTimerEvent*);
|
virtual void onTimer (FTimerEvent*) override;
|
||||||
virtual void onFocusIn (FFocusEvent*);
|
virtual void onFocusIn (FFocusEvent*) override;
|
||||||
virtual void onFocusOut (FFocusEvent*);
|
virtual void onFocusOut (FFocusEvent*) override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// Methods
|
// Methods
|
||||||
void adjustYOffset (std::size_t);
|
void adjustYOffset (std::size_t);
|
||||||
virtual void adjustSize();
|
virtual void adjustSize() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Typedef
|
// Typedef
|
||||||
|
@ -243,89 +248,89 @@ class FListBox : public FWidget
|
||||||
};
|
};
|
||||||
|
|
||||||
// Accessors
|
// Accessors
|
||||||
static FString& getString (listBoxItems::iterator);
|
static FString& getString (listBoxItems::iterator);
|
||||||
|
|
||||||
// Methods
|
// Methods
|
||||||
void init();
|
void init();
|
||||||
virtual void draw();
|
virtual void draw() override;
|
||||||
void drawHeadline();
|
void drawHeadline();
|
||||||
void drawList();
|
void drawList();
|
||||||
void drawListLine (int, listBoxItems::iterator, bool);
|
void drawListLine (int, listBoxItems::iterator, bool);
|
||||||
void printLeftBracket (fc::brackets_type);
|
void printLeftBracket (fc::brackets_type);
|
||||||
void printRightBracket (fc::brackets_type);
|
void printRightBracket (fc::brackets_type);
|
||||||
void drawListBracketsLine (int, listBoxItems::iterator, bool);
|
void drawListBracketsLine (int, listBoxItems::iterator, bool);
|
||||||
void setLineAttributes (int, bool, bool, bool&);
|
void setLineAttributes (int, bool, bool, bool&);
|
||||||
void unsetAttributes();
|
void unsetAttributes();
|
||||||
void updateDrawing (bool, bool);
|
void updateDrawing (bool, bool);
|
||||||
void recalculateHorizontalBar (std::size_t, bool);
|
void recalculateHorizontalBar (std::size_t, bool);
|
||||||
void recalculateVerticalBar (std::size_t);
|
void recalculateVerticalBar (std::size_t);
|
||||||
void getWidgetFocus();
|
void getWidgetFocus();
|
||||||
void multiSelection (std::size_t);
|
void multiSelection (std::size_t);
|
||||||
void multiSelectionUpTo (std::size_t);
|
void multiSelectionUpTo (std::size_t);
|
||||||
void wheelUp (int);
|
void wheelUp (int);
|
||||||
void wheelDown (int);
|
void wheelDown (int);
|
||||||
bool dragScrollUp();
|
bool dragScrollUp();
|
||||||
bool dragScrollDown();
|
bool dragScrollDown();
|
||||||
void dragUp (int);
|
void dragUp (int);
|
||||||
void dragDown (int);
|
void dragDown (int);
|
||||||
void stopDragScroll();
|
void stopDragScroll();
|
||||||
void prevListItem (int);
|
void prevListItem (int);
|
||||||
void nextListItem (int);
|
void nextListItem (int);
|
||||||
void scrollToX (int);
|
void scrollToX (int);
|
||||||
void scrollToY (int);
|
void scrollToY (int);
|
||||||
void scrollLeft (int);
|
void scrollLeft (int);
|
||||||
void scrollRight (int);
|
void scrollRight (int);
|
||||||
void keyUp();
|
void keyUp();
|
||||||
void keyDown();
|
void keyDown();
|
||||||
void keyLeft();
|
void keyLeft();
|
||||||
void keyRight();
|
void keyRight();
|
||||||
void keyPgUp();
|
void keyPgUp();
|
||||||
void keyPgDn();
|
void keyPgDn();
|
||||||
void keyHome();
|
void keyHome();
|
||||||
void keyEnd();
|
void keyEnd();
|
||||||
bool keyEsc();
|
bool keyEsc();
|
||||||
void keyEnter();
|
void keyEnter();
|
||||||
bool keySpace();
|
bool keySpace();
|
||||||
bool keyInsert();
|
bool keyInsert();
|
||||||
bool keyBackspace();
|
bool keyBackspace();
|
||||||
bool keyIncSearchInput (FKey);
|
bool keyIncSearchInput (FKey);
|
||||||
void processClick();
|
void processClick();
|
||||||
void processSelect();
|
void processSelect();
|
||||||
void processChanged();
|
void processChanged();
|
||||||
void lazyConvert (listBoxItems::iterator, int);
|
void lazyConvert (listBoxItems::iterator, int);
|
||||||
listBoxItems::iterator index2iterator (std::size_t);
|
listBoxItems::iterator index2iterator (std::size_t);
|
||||||
|
|
||||||
// Callback methods
|
// Callback methods
|
||||||
void cb_VBarChange (FWidget*, FDataPtr);
|
void cb_VBarChange (FWidget*, FDataPtr);
|
||||||
void cb_HBarChange (FWidget*, FDataPtr);
|
void cb_HBarChange (FWidget*, FDataPtr);
|
||||||
|
|
||||||
// Function Pointer
|
// Function Pointer
|
||||||
void (*convertToItem) ( FListBoxItem&
|
void (*convertToItem) ( FListBoxItem&
|
||||||
, FDataPtr
|
, FDataPtr
|
||||||
, int index ){nullptr};
|
, int index ){nullptr};
|
||||||
|
|
||||||
// Data Members
|
// Data Members
|
||||||
listBoxItems itemlist{};
|
listBoxItems itemlist{};
|
||||||
FDataPtr source_container{nullptr};
|
FDataPtr source_container{nullptr};
|
||||||
convert_type conv_type{FListBox::no_convert};
|
convert_type conv_type{FListBox::no_convert};
|
||||||
FScrollbarPtr vbar{nullptr};
|
FScrollbarPtr vbar{nullptr};
|
||||||
FScrollbarPtr hbar{nullptr};
|
FScrollbarPtr hbar{nullptr};
|
||||||
FString text{};
|
FString text{};
|
||||||
FString inc_search{};
|
FString inc_search{};
|
||||||
bool multi_select{false};
|
bool multi_select{false};
|
||||||
bool mouse_select{false};
|
bool mouse_select{false};
|
||||||
fc::dragScroll drag_scroll{fc::noScroll};
|
fc::dragScroll drag_scroll{fc::noScroll};
|
||||||
bool scroll_timer{false};
|
bool scroll_timer{false};
|
||||||
int scroll_repeat{100};
|
int scroll_repeat{100};
|
||||||
int scroll_distance{1};
|
int scroll_distance{1};
|
||||||
std::size_t current{0};
|
std::size_t current{0};
|
||||||
int last_current{-1};
|
int last_current{-1};
|
||||||
int secect_from_item{-1};
|
int secect_from_item{-1};
|
||||||
int xoffset{0};
|
int xoffset{0};
|
||||||
int yoffset{0};
|
int yoffset{0};
|
||||||
int last_yoffset{-1};
|
int last_yoffset{-1};
|
||||||
std::size_t nf_offset{0};
|
std::size_t nf_offset{0};
|
||||||
std::size_t max_line_width{0};
|
std::size_t max_line_width{0};
|
||||||
};
|
};
|
||||||
#pragma pack(pop)
|
#pragma pack(pop)
|
||||||
|
|
||||||
|
|
|
@ -92,51 +92,51 @@ class FListViewItem : public FObject
|
||||||
FListViewItem& operator = (const FListViewItem&);
|
FListViewItem& operator = (const FListViewItem&);
|
||||||
|
|
||||||
// Accessors
|
// Accessors
|
||||||
const char* getClassName() const;
|
virtual const char* getClassName() const;
|
||||||
uInt getColumnCount() const;
|
uInt getColumnCount() const;
|
||||||
int getSortColumn() const;
|
int getSortColumn() const;
|
||||||
FString getText (int) const;
|
FString getText (int) const;
|
||||||
FDataPtr getData() const;
|
FDataPtr getData() const;
|
||||||
uInt getDepth() const;
|
uInt getDepth() const;
|
||||||
|
|
||||||
// Mutators
|
// Mutators
|
||||||
void setText (int, const FString&);
|
void setText (int, const FString&);
|
||||||
void setData (FDataPtr);
|
void setData (FDataPtr);
|
||||||
void setCheckable (bool);
|
void setCheckable (bool);
|
||||||
void setChecked (bool);
|
void setChecked (bool);
|
||||||
|
|
||||||
// Inquiry
|
// Inquiry
|
||||||
bool isChecked() const;
|
bool isChecked() const;
|
||||||
bool isExpand() const;
|
bool isExpand() const;
|
||||||
|
|
||||||
// Methods
|
// Methods
|
||||||
FObjectIterator insert (FListViewItem*);
|
FObjectIterator insert (FListViewItem*);
|
||||||
FObjectIterator insert (FListViewItem*, FObjectIterator);
|
FObjectIterator insert (FListViewItem*, FObjectIterator);
|
||||||
void expand();
|
void expand();
|
||||||
void collapse();
|
void collapse();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Inquiry
|
// Inquiry
|
||||||
bool isExpandable() const;
|
bool isExpandable() const;
|
||||||
bool isCheckable() const;
|
bool isCheckable() const;
|
||||||
|
|
||||||
// Methods
|
// Methods
|
||||||
template <typename Compare>
|
template <typename Compare>
|
||||||
void sort (Compare);
|
void sort (Compare);
|
||||||
FObjectIterator appendItem (FListViewItem*);
|
FObjectIterator appendItem (FListViewItem*);
|
||||||
void replaceControlCodes();
|
void replaceControlCodes();
|
||||||
std::size_t getVisibleLines();
|
std::size_t getVisibleLines();
|
||||||
void resetVisibleLineCounter();
|
void resetVisibleLineCounter();
|
||||||
|
|
||||||
// Data Members
|
// Data Members
|
||||||
FStringList column_list{};
|
FStringList column_list{};
|
||||||
FDataPtr data_pointer{nullptr};
|
FDataPtr data_pointer{nullptr};
|
||||||
FObjectIterator root{};
|
FObjectIterator root{};
|
||||||
std::size_t visible_lines{1};
|
std::size_t visible_lines{1};
|
||||||
bool expandable{false};
|
bool expandable{false};
|
||||||
bool is_expand{false};
|
bool is_expand{false};
|
||||||
bool checkable{false};
|
bool checkable{false};
|
||||||
bool is_checked{false};
|
bool is_checked{false};
|
||||||
|
|
||||||
// Friend class
|
// Friend class
|
||||||
friend class FListView;
|
friend class FListView;
|
||||||
|
@ -215,16 +215,16 @@ class FListViewIterator
|
||||||
bool operator != (const FListViewIterator&) const;
|
bool operator != (const FListViewIterator&) const;
|
||||||
|
|
||||||
// Accessor
|
// Accessor
|
||||||
const char* getClassName() const;
|
virtual const char* getClassName() const;
|
||||||
int getPosition() const;
|
int getPosition() const;
|
||||||
|
|
||||||
// Methods
|
// Methods
|
||||||
void parentElement();
|
void parentElement();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Methods
|
// Methods
|
||||||
void nextElement (FObjectIterator&);
|
void nextElement (FObjectIterator&);
|
||||||
void prevElement (FObjectIterator&);
|
void prevElement (FObjectIterator&);
|
||||||
|
|
||||||
// Data Members
|
// Data Members
|
||||||
FObjectIteratorStack iter_path{};
|
FObjectIteratorStack iter_path{};
|
||||||
|
@ -285,7 +285,7 @@ class FListView : public FWidget
|
||||||
FListView& operator = (const FListView&) = delete;
|
FListView& operator = (const FListView&) = delete;
|
||||||
|
|
||||||
// Accessors
|
// Accessors
|
||||||
const char* getClassName() const;
|
virtual const char* getClassName() const override;
|
||||||
std::size_t getCount();
|
std::size_t getCount();
|
||||||
fc::text_alignment getColumnAlignment (int) const;
|
fc::text_alignment getColumnAlignment (int) const;
|
||||||
FString getColumnText (int) const;
|
FString getColumnText (int) const;
|
||||||
|
@ -297,7 +297,7 @@ class FListView : public FWidget
|
||||||
// Mutators
|
// Mutators
|
||||||
virtual void setGeometry ( int, int
|
virtual void setGeometry ( int, int
|
||||||
, std::size_t, std::size_t
|
, std::size_t, std::size_t
|
||||||
, bool = true );
|
, bool = true ) override;
|
||||||
void setColumnAlignment (int, fc::text_alignment);
|
void setColumnAlignment (int, fc::text_alignment);
|
||||||
void setColumnText (int, const FString&);
|
void setColumnText (int, const FString&);
|
||||||
void setColumnSortType (int, fc::sorting_type \
|
void setColumnSortType (int, fc::sorting_type \
|
||||||
|
@ -336,15 +336,15 @@ class FListView : public FWidget
|
||||||
virtual void sort();
|
virtual void sort();
|
||||||
|
|
||||||
// Event handlers
|
// Event handlers
|
||||||
virtual void onKeyPress (FKeyEvent*);
|
virtual void onKeyPress (FKeyEvent*) override;
|
||||||
virtual void onMouseDown (FMouseEvent*);
|
virtual void onMouseDown (FMouseEvent*) override;
|
||||||
virtual void onMouseUp (FMouseEvent*);
|
virtual void onMouseUp (FMouseEvent*) override;
|
||||||
virtual void onMouseMove (FMouseEvent*);
|
virtual void onMouseMove (FMouseEvent*) override;
|
||||||
virtual void onMouseDoubleClick (FMouseEvent*);
|
virtual void onMouseDoubleClick (FMouseEvent*) override;
|
||||||
virtual void onWheel (FWheelEvent*);
|
virtual void onWheel (FWheelEvent*) override;
|
||||||
virtual void onTimer (FTimerEvent*);
|
virtual void onTimer (FTimerEvent*) override;
|
||||||
virtual void onFocusIn (FFocusEvent*);
|
virtual void onFocusIn (FFocusEvent*) override;
|
||||||
virtual void onFocusOut (FFocusEvent*);
|
virtual void onFocusOut (FFocusEvent*) override;
|
||||||
|
|
||||||
// Data Members
|
// Data Members
|
||||||
static FObjectIterator null_iter;
|
static FObjectIterator null_iter;
|
||||||
|
@ -352,7 +352,7 @@ class FListView : public FWidget
|
||||||
protected:
|
protected:
|
||||||
// Methods
|
// Methods
|
||||||
void adjustViewport (int);
|
void adjustViewport (int);
|
||||||
virtual void adjustSize();
|
virtual void adjustSize() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Typedef
|
// Typedef
|
||||||
|
@ -371,7 +371,7 @@ class FListView : public FWidget
|
||||||
std::size_t getAlignOffset ( fc::text_alignment
|
std::size_t getAlignOffset ( fc::text_alignment
|
||||||
, std::size_t
|
, std::size_t
|
||||||
, std::size_t );
|
, std::size_t );
|
||||||
virtual void draw();
|
virtual void draw() override;
|
||||||
void drawHeadlines();
|
void drawHeadlines();
|
||||||
void drawList();
|
void drawList();
|
||||||
void drawListLine (const FListViewItem*, bool, bool);
|
void drawListLine (const FListViewItem*, bool, bool);
|
||||||
|
|
|
@ -91,21 +91,21 @@ class FMenu : public FWindow, public FMenuList
|
||||||
FMenu& operator = (const FMenu&) = delete;
|
FMenu& operator = (const FMenu&) = delete;
|
||||||
|
|
||||||
// Accessors
|
// Accessors
|
||||||
virtual const char* getClassName() const;
|
virtual const char* getClassName() const override;
|
||||||
FString getText() const;
|
FString getText() const;
|
||||||
FMenuItem* getItem();
|
FMenuItem* getItem();
|
||||||
|
|
||||||
// Mutators
|
// Mutators
|
||||||
virtual bool setEnable(bool);
|
virtual bool setEnable(bool) override;
|
||||||
virtual bool setEnable();
|
virtual bool setEnable() override;
|
||||||
virtual bool unsetEnable();
|
virtual bool unsetEnable() override;
|
||||||
virtual bool setDisable();
|
virtual bool setDisable() override;
|
||||||
void setSelected();
|
void setSelected();
|
||||||
void unsetSelected();
|
void unsetSelected();
|
||||||
bool setMenuWidget (bool);
|
bool setMenuWidget (bool);
|
||||||
bool setMenuWidget();
|
bool setMenuWidget();
|
||||||
bool unsetMenuWidget();
|
bool unsetMenuWidget();
|
||||||
virtual void setStatusbarMessage (const FString&);
|
virtual void setStatusbarMessage (const FString&) override;
|
||||||
void setMenu (FMenu*);
|
void setMenu (FMenu*);
|
||||||
void setText (const FString&);
|
void setText (const FString&);
|
||||||
|
|
||||||
|
@ -116,15 +116,15 @@ class FMenu : public FWindow, public FMenuList
|
||||||
bool hasMenu() const;
|
bool hasMenu() const;
|
||||||
|
|
||||||
// Methods
|
// Methods
|
||||||
virtual void show();
|
virtual void show() override;
|
||||||
virtual void hide();
|
virtual void hide() override;
|
||||||
|
|
||||||
// Event handlers
|
// Event handlers
|
||||||
virtual void onKeyPress (FKeyEvent*);
|
virtual void onKeyPress (FKeyEvent*) override;
|
||||||
virtual void onMouseDown (FMouseEvent*);
|
virtual void onMouseDown (FMouseEvent*) override;
|
||||||
virtual void onMouseUp (FMouseEvent*);
|
virtual void onMouseUp (FMouseEvent*) override;
|
||||||
virtual void onMouseMove (FMouseEvent*);
|
virtual void onMouseMove (FMouseEvent*) override;
|
||||||
virtual void onAccel (FAccelEvent*);
|
virtual void onAccel (FAccelEvent*) override;
|
||||||
|
|
||||||
// Callback method
|
// Callback method
|
||||||
void cb_menuitem_toggled (FWidget*, FDataPtr);
|
void cb_menuitem_toggled (FWidget*, FDataPtr);
|
||||||
|
@ -201,7 +201,7 @@ class FMenu : public FWindow, public FMenuList
|
||||||
void keypressMenuBar (FKeyEvent*);
|
void keypressMenuBar (FKeyEvent*);
|
||||||
bool hotkeyMenu (FKeyEvent*);
|
bool hotkeyMenu (FKeyEvent*);
|
||||||
std::size_t getHotkeyPos (wchar_t[], wchar_t[], std::size_t);
|
std::size_t getHotkeyPos (wchar_t[], wchar_t[], std::size_t);
|
||||||
virtual void draw();
|
virtual void draw() override;
|
||||||
void drawItems();
|
void drawItems();
|
||||||
void drawSeparator (int);
|
void drawSeparator (int);
|
||||||
void drawMenuLine (FMenuItem*, int);
|
void drawMenuLine (FMenuItem*, int);
|
||||||
|
|
|
@ -89,19 +89,19 @@ class FMenuBar : public FWindow, public FMenuList
|
||||||
FMenuBar& operator = (const FMenuBar&) = delete;
|
FMenuBar& operator = (const FMenuBar&) = delete;
|
||||||
|
|
||||||
// Accessors
|
// Accessors
|
||||||
virtual const char* getClassName() const;
|
virtual const char* getClassName() const override;
|
||||||
|
|
||||||
// Methods
|
// Methods
|
||||||
void resetMenu();
|
void resetMenu();
|
||||||
virtual void hide();
|
virtual void hide() override;
|
||||||
virtual void adjustSize();
|
virtual void adjustSize() override;
|
||||||
|
|
||||||
// Event handlers
|
// Event handlers
|
||||||
virtual void onKeyPress (FKeyEvent*);
|
virtual void onKeyPress (FKeyEvent*) override;
|
||||||
virtual void onMouseDown (FMouseEvent*);
|
virtual void onMouseDown (FMouseEvent*) override;
|
||||||
virtual void onMouseUp (FMouseEvent*);
|
virtual void onMouseUp (FMouseEvent*) override;
|
||||||
virtual void onMouseMove (FMouseEvent*);
|
virtual void onMouseMove (FMouseEvent*) override;
|
||||||
virtual void onAccel (FAccelEvent*);
|
virtual void onAccel (FAccelEvent*) override;
|
||||||
|
|
||||||
// Callback methods
|
// Callback methods
|
||||||
void cb_item_deactivated (FWidget*, FDataPtr);
|
void cb_item_deactivated (FWidget*, FDataPtr);
|
||||||
|
@ -130,7 +130,7 @@ class FMenuBar : public FWindow, public FMenuList
|
||||||
bool selectPrevItem();
|
bool selectPrevItem();
|
||||||
bool hotkeyMenu (FKeyEvent*&);
|
bool hotkeyMenu (FKeyEvent*&);
|
||||||
std::size_t getHotkeyPos (wchar_t[], wchar_t[], std::size_t);
|
std::size_t getHotkeyPos (wchar_t[], wchar_t[], std::size_t);
|
||||||
virtual void draw();
|
virtual void draw() override;
|
||||||
void drawItems();
|
void drawItems();
|
||||||
void drawItem (FMenuItem*, std::size_t&);
|
void drawItem (FMenuItem*, std::size_t&);
|
||||||
void setLineAttributes (FMenuItem*);
|
void setLineAttributes (FMenuItem*);
|
||||||
|
|
|
@ -96,59 +96,59 @@ class FMenuItem : public FWidget
|
||||||
FMenuItem& operator = (const FMenuItem&) = delete;
|
FMenuItem& operator = (const FMenuItem&) = delete;
|
||||||
|
|
||||||
// Accessors
|
// Accessors
|
||||||
const char* getClassName() const;
|
virtual const char* getClassName() const override;
|
||||||
uChar getHotkey() const;
|
uChar getHotkey() const;
|
||||||
FMenu* getMenu() const;
|
FMenu* getMenu() const;
|
||||||
std::size_t getTextLength() const;
|
std::size_t getTextLength() const;
|
||||||
FString getText() const;
|
FString getText() const;
|
||||||
|
|
||||||
// Mutators
|
// Mutators
|
||||||
virtual bool setEnable (bool);
|
virtual bool setEnable (bool) override;
|
||||||
virtual bool setFocus (bool);
|
virtual bool setFocus (bool) override;
|
||||||
virtual bool setFocus();
|
virtual bool setFocus() override;
|
||||||
virtual bool unsetFocus();
|
virtual bool unsetFocus() override;
|
||||||
void setSelected();
|
void setSelected();
|
||||||
void unsetSelected();
|
void unsetSelected();
|
||||||
void setSeparator();
|
void setSeparator();
|
||||||
void unsetSeparator();
|
void unsetSeparator();
|
||||||
void setChecked();
|
void setChecked();
|
||||||
void unsetChecked();
|
void unsetChecked();
|
||||||
void setMenu (FMenu*);
|
void setMenu (FMenu*);
|
||||||
void setText (const FString&);
|
void setText (const FString&);
|
||||||
|
|
||||||
// Inquiries
|
// Inquiries
|
||||||
bool isSelected() const;
|
bool isSelected() const;
|
||||||
bool isSeparator() const;
|
bool isSeparator() const;
|
||||||
bool isChecked() const;
|
bool isChecked() const;
|
||||||
bool hasHotkey() const;
|
bool hasHotkey() const;
|
||||||
bool hasMenu() const;
|
bool hasMenu() const;
|
||||||
|
|
||||||
// Methods
|
// Methods
|
||||||
virtual void addAccelerator (FKey, FWidget*);
|
virtual void addAccelerator (FKey, FWidget*) override;
|
||||||
virtual void delAccelerator (FWidget*);
|
virtual void delAccelerator (FWidget*) override;
|
||||||
void openMenu();
|
void openMenu();
|
||||||
|
|
||||||
// Event handlers
|
// Event handlers
|
||||||
virtual void onKeyPress (FKeyEvent*);
|
virtual void onKeyPress (FKeyEvent*) override;
|
||||||
virtual void onMouseDoubleClick (FMouseEvent*);
|
virtual void onMouseDoubleClick (FMouseEvent*) override;
|
||||||
virtual void onMouseDown (FMouseEvent*);
|
virtual void onMouseDown (FMouseEvent*) override;
|
||||||
virtual void onMouseUp (FMouseEvent*);
|
virtual void onMouseUp (FMouseEvent*) override;
|
||||||
virtual void onMouseMove (FMouseEvent*);
|
virtual void onMouseMove (FMouseEvent*) override;
|
||||||
virtual void onAccel (FAccelEvent*);
|
virtual void onAccel (FAccelEvent*) override;
|
||||||
virtual void onFocusIn (FFocusEvent*);
|
virtual void onFocusIn (FFocusEvent*) override;
|
||||||
virtual void onFocusOut (FFocusEvent*);
|
virtual void onFocusOut (FFocusEvent*) override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// Accessor
|
// Accessor
|
||||||
FWidget* getSuperMenu() const;
|
FWidget* getSuperMenu() const;
|
||||||
|
|
||||||
// Mutator
|
// Mutator
|
||||||
void setSuperMenu (FWidget*);
|
void setSuperMenu (FWidget*);
|
||||||
|
|
||||||
// Inquiries
|
// Inquiries
|
||||||
bool isWindowsMenu (FWidget*) const;
|
bool isWindowsMenu (FWidget*) const;
|
||||||
bool isMenuBar (FWidget*) const;
|
bool isMenuBar (FWidget*) const;
|
||||||
bool isMenu (FWidget*) const;
|
bool isMenu (FWidget*) const;
|
||||||
|
|
||||||
// Data Members
|
// Data Members
|
||||||
FString text{};
|
FString text{};
|
||||||
|
@ -167,22 +167,22 @@ class FMenuItem : public FWidget
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Accessor
|
// Accessor
|
||||||
FMenuList* getFMenuList (FWidget&);
|
FMenuList* getFMenuList (FWidget&);
|
||||||
|
|
||||||
// Methods
|
// Methods
|
||||||
void init (FWidget*);
|
void init (FWidget*);
|
||||||
uChar hotKey();
|
uChar hotKey();
|
||||||
void processActivate();
|
void processActivate();
|
||||||
void processDeactivate();
|
void processDeactivate();
|
||||||
void createDialogList (FMenu*);
|
void createDialogList (FMenu*);
|
||||||
template <typename T>
|
template <typename T>
|
||||||
void passMouseEvent (T, FMouseEvent*, fc::events);
|
void passMouseEvent (T, FMouseEvent*, fc::events);
|
||||||
|
|
||||||
// Callback methods
|
// Callback methods
|
||||||
void cb_switchToDialog (FWidget*, FDataPtr);
|
void cb_switchToDialog (FWidget*, FDataPtr);
|
||||||
void cb_destroyDialog (FWidget*, FDataPtr);
|
void cb_destroyDialog (FWidget*, FDataPtr);
|
||||||
|
|
||||||
virtual void processClicked();
|
virtual void processClicked();
|
||||||
|
|
||||||
// Friend classes
|
// Friend classes
|
||||||
friend class FDialogListMenu;
|
friend class FDialogListMenu;
|
||||||
|
|
|
@ -107,51 +107,51 @@ class FMessageBox : public FDialog
|
||||||
FMessageBox& operator = (const FMessageBox&);
|
FMessageBox& operator = (const FMessageBox&);
|
||||||
|
|
||||||
// Accessor
|
// Accessor
|
||||||
const char* getClassName() const;
|
virtual const char* getClassName() const override;
|
||||||
const FString getTitlebarText() const;
|
const FString getTitlebarText() const;
|
||||||
const FString getHeadline() const;
|
const FString getHeadline() const;
|
||||||
const FString getText() const;
|
const FString getText() const;
|
||||||
|
|
||||||
// Mutator
|
// Mutator
|
||||||
void setTitlebarText (const FString&);
|
void setTitlebarText (const FString&);
|
||||||
void setHeadline (const FString&);
|
void setHeadline (const FString&);
|
||||||
bool setCenterText(bool);
|
bool setCenterText(bool);
|
||||||
bool setCenterText();
|
bool setCenterText();
|
||||||
bool unsetCenterText();
|
bool unsetCenterText();
|
||||||
void setText (const FString&);
|
void setText (const FString&);
|
||||||
|
|
||||||
// Methods
|
// Methods
|
||||||
template <typename messageType>
|
template <typename messageType>
|
||||||
static int info ( FWidget*
|
static int info ( FWidget*
|
||||||
, const FString&
|
, const FString&
|
||||||
, const messageType&
|
, const messageType&
|
||||||
, int = FMessageBox::Ok
|
, int = FMessageBox::Ok
|
||||||
, int = 0
|
, int = 0
|
||||||
, int = 0 );
|
, int = 0 );
|
||||||
|
|
||||||
template <typename messageType>
|
template <typename messageType>
|
||||||
static int error ( FWidget*
|
static int error ( FWidget*
|
||||||
, const messageType&
|
, const messageType&
|
||||||
, int = FMessageBox::Ok
|
, int = FMessageBox::Ok
|
||||||
, int = 0
|
, int = 0
|
||||||
, int = 0 );
|
, int = 0 );
|
||||||
protected:
|
protected:
|
||||||
// Method
|
// Method
|
||||||
virtual void adjustSize();
|
virtual void adjustSize() override;
|
||||||
|
|
||||||
// Callback method
|
// Callback method
|
||||||
void cb_processClick (FWidget*, FDataPtr);
|
void cb_processClick (FWidget*, FDataPtr);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Methods
|
// Methods
|
||||||
void init (int, int, int);
|
void init (int, int, int);
|
||||||
void allocation (int, int, int);
|
void allocation (int, int, int);
|
||||||
void deallocation();
|
void deallocation();
|
||||||
void initCallbacks();
|
void initCallbacks();
|
||||||
void calculateDimensions();
|
void calculateDimensions();
|
||||||
virtual void draw();
|
virtual void draw() override;
|
||||||
void resizeButtons();
|
void resizeButtons();
|
||||||
void adjustButtons();
|
void adjustButtons();
|
||||||
|
|
||||||
// Data Members
|
// Data Members
|
||||||
FString headline_text{};
|
FString headline_text{};
|
||||||
|
|
|
@ -208,12 +208,12 @@ class FMouseGPM : public FMouse
|
||||||
void setStdinNo(int);
|
void setStdinNo(int);
|
||||||
|
|
||||||
// Inquiry
|
// Inquiry
|
||||||
virtual bool hasData();
|
virtual bool hasData() override;
|
||||||
bool isGpmMouseEnabled();
|
bool isGpmMouseEnabled();
|
||||||
|
|
||||||
// Methods
|
// Methods
|
||||||
virtual void setRawData (FKeyboard::keybuffer&);
|
virtual void setRawData (FKeyboard::keybuffer&) override;
|
||||||
virtual void processEvent (struct timeval*);
|
virtual void processEvent (struct timeval*) override;
|
||||||
bool gpmMouse (bool);
|
bool gpmMouse (bool);
|
||||||
bool enableGpmMouse();
|
bool enableGpmMouse();
|
||||||
bool disableGpmMouse();
|
bool disableGpmMouse();
|
||||||
|
@ -277,11 +277,11 @@ class FMouseX11 : public FMouse
|
||||||
virtual const char* getClassName() const;
|
virtual const char* getClassName() const;
|
||||||
|
|
||||||
// Inquiry
|
// Inquiry
|
||||||
virtual bool hasData();
|
virtual bool hasData() override;
|
||||||
|
|
||||||
// Methods
|
// Methods
|
||||||
virtual void setRawData (FKeyboard::keybuffer&);
|
virtual void setRawData (FKeyboard::keybuffer&) override;
|
||||||
virtual void processEvent (struct timeval*);
|
virtual void processEvent (struct timeval*) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Enumeration
|
// Enumeration
|
||||||
|
@ -340,11 +340,11 @@ class FMouseSGR : public FMouse
|
||||||
virtual const char* getClassName() const;
|
virtual const char* getClassName() const;
|
||||||
|
|
||||||
// Inquiry
|
// Inquiry
|
||||||
virtual bool hasData();
|
virtual bool hasData() override;
|
||||||
|
|
||||||
// Methods
|
// Methods
|
||||||
virtual void setRawData (FKeyboard::keybuffer&);
|
virtual void setRawData (FKeyboard::keybuffer&) override;
|
||||||
virtual void processEvent (struct timeval*);
|
virtual void processEvent (struct timeval*) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Enumeration
|
// Enumeration
|
||||||
|
@ -403,11 +403,11 @@ class FMouseUrxvt : public FMouse
|
||||||
virtual const char* getClassName() const;
|
virtual const char* getClassName() const;
|
||||||
|
|
||||||
// Inquiry
|
// Inquiry
|
||||||
virtual bool hasData();
|
virtual bool hasData() override;
|
||||||
|
|
||||||
// Methods
|
// Methods
|
||||||
virtual void setRawData (FKeyboard::keybuffer&);
|
virtual void setRawData (FKeyboard::keybuffer&) override;
|
||||||
virtual void processEvent (struct timeval*);
|
virtual void processEvent (struct timeval*) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Enumeration
|
// Enumeration
|
||||||
|
|
|
@ -131,7 +131,6 @@ class FObject
|
||||||
|
|
||||||
// Typedefs
|
// Typedefs
|
||||||
typedef std::vector<timer_data> TimerList;
|
typedef std::vector<timer_data> TimerList;
|
||||||
typedef std::shared_ptr<TimerList> TimerListPtr;
|
|
||||||
|
|
||||||
// Accessor
|
// Accessor
|
||||||
TimerList* getTimerList() const;
|
TimerList* getTimerList() const;
|
||||||
|
@ -156,7 +155,7 @@ class FObject
|
||||||
bool has_parent{false};
|
bool has_parent{false};
|
||||||
bool widget_object{false};
|
bool widget_object{false};
|
||||||
static bool timer_modify_lock;
|
static bool timer_modify_lock;
|
||||||
static TimerListPtr timer_list;
|
static TimerList* timer_list;
|
||||||
};
|
};
|
||||||
|
|
||||||
#pragma pack(pop)
|
#pragma pack(pop)
|
||||||
|
@ -223,7 +222,7 @@ inline bool FObject::isTimerInUpdating() const
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
inline FObject::TimerList* FObject::getTimerList() const
|
inline FObject::TimerList* FObject::getTimerList() const
|
||||||
{ return timer_list.get(); }
|
{ return timer_list; }
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
inline void FObject::setWidgetProperty (bool property)
|
inline void FObject::setWidgetProperty (bool property)
|
||||||
|
|
|
@ -74,18 +74,18 @@ class FPoint
|
||||||
|
|
||||||
// Accessors
|
// Accessors
|
||||||
virtual const char* getClassName();
|
virtual const char* getClassName();
|
||||||
int getX() const;
|
int getX() const;
|
||||||
int getY() const;
|
int getY() const;
|
||||||
void setX (int);
|
void setX (int);
|
||||||
void setY (int);
|
void setY (int);
|
||||||
void setPoint (int, int);
|
void setPoint (int, int);
|
||||||
|
|
||||||
// Inquiry
|
// Inquiry
|
||||||
bool isNull() const;
|
bool isNull() const;
|
||||||
|
|
||||||
// Point references
|
// Point references
|
||||||
int& x_ref();
|
int& x_ref();
|
||||||
int& y_ref();
|
int& y_ref();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Data Members
|
// Data Members
|
||||||
|
|
|
@ -77,31 +77,33 @@ class FProgressbar : public FWidget
|
||||||
virtual ~FProgressbar();
|
virtual ~FProgressbar();
|
||||||
|
|
||||||
// Accessors
|
// Accessors
|
||||||
const char* getClassName() const;
|
virtual const char* getClassName() const override;
|
||||||
std::size_t getPercentage();
|
std::size_t getPercentage();
|
||||||
|
|
||||||
// Mutators
|
// Mutators
|
||||||
void setPercentage (std::size_t);
|
void setPercentage (std::size_t);
|
||||||
virtual void setGeometry (int, int, std::size_t, std::size_t, bool = true);
|
virtual void setGeometry ( int, int
|
||||||
bool setShadow (bool);
|
, std::size_t, std::size_t
|
||||||
bool setShadow();
|
, bool = true) override;
|
||||||
bool unsetShadow();
|
bool setShadow (bool);
|
||||||
|
bool setShadow();
|
||||||
|
bool unsetShadow();
|
||||||
|
|
||||||
// Inquiries
|
// Inquiries
|
||||||
bool hasShadow();
|
bool hasShadow();
|
||||||
|
|
||||||
// Methods
|
// Methods
|
||||||
virtual void hide();
|
virtual void hide() override;
|
||||||
void reset();
|
void reset();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Constants
|
// Constants
|
||||||
static constexpr std::size_t NOT_SET = static_cast<std::size_t>(-1);
|
static constexpr std::size_t NOT_SET = static_cast<std::size_t>(-1);
|
||||||
|
|
||||||
// Methods
|
// Methods
|
||||||
virtual void draw();
|
virtual void draw() override;
|
||||||
void drawPercentage();
|
void drawPercentage();
|
||||||
void drawBar();
|
void drawBar();
|
||||||
|
|
||||||
// Data Members
|
// Data Members
|
||||||
std::size_t percentage{NOT_SET};
|
std::size_t percentage{NOT_SET};
|
||||||
|
|
|
@ -86,13 +86,13 @@ class FRadioButton : public FToggleButton
|
||||||
FRadioButton& operator = (const FRadioButton&) = delete;
|
FRadioButton& operator = (const FRadioButton&) = delete;
|
||||||
|
|
||||||
// Accessor
|
// Accessor
|
||||||
const char* getClassName() const;
|
virtual const char* getClassName() const override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Methods
|
// Methods
|
||||||
void init();
|
void init();
|
||||||
virtual void draw();
|
virtual void draw() override;
|
||||||
void drawRadioButton();
|
void drawRadioButton();
|
||||||
};
|
};
|
||||||
#pragma pack(pop)
|
#pragma pack(pop)
|
||||||
|
|
||||||
|
|
|
@ -86,7 +86,7 @@ class FRadioMenuItem : public FMenuItem
|
||||||
FRadioMenuItem& operator = (const FRadioMenuItem&) = delete;
|
FRadioMenuItem& operator = (const FRadioMenuItem&) = delete;
|
||||||
|
|
||||||
// Accessor
|
// Accessor
|
||||||
const char* getClassName() const;
|
virtual const char* getClassName() const override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Methods
|
// Methods
|
||||||
|
|
|
@ -72,55 +72,55 @@ class FRect
|
||||||
|
|
||||||
// Accessors
|
// Accessors
|
||||||
virtual const char* getClassName();
|
virtual const char* getClassName();
|
||||||
int getX1() const;
|
int getX1() const;
|
||||||
int getY1() const;
|
int getY1() const;
|
||||||
int getX2() const;
|
int getX2() const;
|
||||||
int getY2() const;
|
int getY2() const;
|
||||||
int getX() const;
|
int getX() const;
|
||||||
int getY() const;
|
int getY() const;
|
||||||
FPoint getPos() const;
|
FPoint getPos() const;
|
||||||
FPoint getUpperLeftPos() const;
|
FPoint getUpperLeftPos() const;
|
||||||
FPoint getUpperRightPos() const;
|
FPoint getUpperRightPos() const;
|
||||||
FPoint getLowerLeftPos() const;
|
FPoint getLowerLeftPos() const;
|
||||||
FPoint getLowerRightPos() const;
|
FPoint getLowerRightPos() const;
|
||||||
std::size_t getWidth() const;
|
std::size_t getWidth() const;
|
||||||
std::size_t getHeight() const;
|
std::size_t getHeight() const;
|
||||||
|
|
||||||
// Mutators
|
// Mutators
|
||||||
void setX1 (int);
|
void setX1 (int);
|
||||||
void setY1 (int);
|
void setY1 (int);
|
||||||
void setX2 (int);
|
void setX2 (int);
|
||||||
void setY2 (int);
|
void setY2 (int);
|
||||||
void setX (int);
|
void setX (int);
|
||||||
void setY (int);
|
void setY (int);
|
||||||
void setPos (int, int);
|
void setPos (int, int);
|
||||||
void setPos (const FPoint&);
|
void setPos (const FPoint&);
|
||||||
void setWidth (std::size_t);
|
void setWidth (std::size_t);
|
||||||
void setHeight (std::size_t);
|
void setHeight (std::size_t);
|
||||||
void setSize (std::size_t, std::size_t);
|
void setSize (std::size_t, std::size_t);
|
||||||
void setRect (const FRect&);
|
void setRect (const FRect&);
|
||||||
void setRect (int, int, std::size_t, std::size_t);
|
void setRect (int, int, std::size_t, std::size_t);
|
||||||
void setCoordinates (const FPoint&, const FPoint&);
|
void setCoordinates (const FPoint&, const FPoint&);
|
||||||
void setCoordinates (int, int, int, int);
|
void setCoordinates (int, int, int, int);
|
||||||
|
|
||||||
// Inquiry
|
// Inquiry
|
||||||
bool isNull() const;
|
bool isNull() const;
|
||||||
|
|
||||||
// Coordinate references
|
// Coordinate references
|
||||||
int& x1_ref();
|
int& x1_ref();
|
||||||
int& y1_ref();
|
int& y1_ref();
|
||||||
int& x2_ref();
|
int& x2_ref();
|
||||||
int& y2_ref();
|
int& y2_ref();
|
||||||
|
|
||||||
// Methods
|
// Methods
|
||||||
void move (int, int);
|
void move (int, int);
|
||||||
void move (const FPoint&);
|
void move (const FPoint&);
|
||||||
bool contains (int, int) const;
|
bool contains (int, int) const;
|
||||||
bool contains (const FPoint&) const;
|
bool contains (const FPoint&) const;
|
||||||
bool contains (const FRect&) const;
|
bool contains (const FRect&) const;
|
||||||
bool overlap (const FRect&) const;
|
bool overlap (const FRect&) const;
|
||||||
FRect intersect (const FRect&) const;
|
FRect intersect (const FRect&) const;
|
||||||
FRect combined (const FRect&) const;
|
FRect combined (const FRect&) const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Data Members
|
// Data Members
|
||||||
|
|
|
@ -97,48 +97,50 @@ class FScrollbar : public FWidget
|
||||||
FScrollbar& operator = (const FScrollbar&) = delete;
|
FScrollbar& operator = (const FScrollbar&) = delete;
|
||||||
|
|
||||||
// Accessors
|
// Accessors
|
||||||
const char* getClassName() const;
|
virtual const char* getClassName() const override;
|
||||||
int getValue() const;
|
int getValue() const;
|
||||||
sType getScrollType() const;
|
sType getScrollType() const;
|
||||||
|
|
||||||
// Mutators
|
// Mutators
|
||||||
void setMinimum (int);
|
void setMinimum (int);
|
||||||
void setMaximum (int);
|
void setMaximum (int);
|
||||||
void setRange (int, int);
|
void setRange (int, int);
|
||||||
void setValue (int);
|
void setValue (int);
|
||||||
void setSteps (double);
|
void setSteps (double);
|
||||||
void setPageSize (int, int);
|
void setPageSize (int, int);
|
||||||
void setOrientation (int);
|
void setOrientation (int);
|
||||||
virtual void setGeometry (int, int, std::size_t, std::size_t, bool = true);
|
virtual void setGeometry ( int, int
|
||||||
|
, std::size_t, std::size_t
|
||||||
|
, bool = true) override;
|
||||||
|
|
||||||
// Methods
|
// Methods
|
||||||
virtual void resize();
|
virtual void resize() override;
|
||||||
virtual void redraw();
|
virtual void redraw() override;
|
||||||
void calculateSliderValues();
|
void calculateSliderValues();
|
||||||
void drawVerticalBar();
|
void drawVerticalBar();
|
||||||
void drawHorizontalBar();
|
void drawHorizontalBar();
|
||||||
void drawBar();
|
void drawBar();
|
||||||
|
|
||||||
// Event handlers
|
// Event handlers
|
||||||
virtual void onMouseDown (FMouseEvent*);
|
virtual void onMouseDown (FMouseEvent*) override;
|
||||||
virtual void onMouseUp (FMouseEvent*);
|
virtual void onMouseUp (FMouseEvent*) override;
|
||||||
virtual void onMouseMove (FMouseEvent*);
|
virtual void onMouseMove (FMouseEvent*) override;
|
||||||
virtual void onWheel (FWheelEvent*);
|
virtual void onWheel (FWheelEvent*) override;
|
||||||
virtual void onTimer (FTimerEvent*);
|
virtual void onTimer (FTimerEvent*) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Methods
|
// Methods
|
||||||
void init();
|
void init();
|
||||||
virtual void draw();
|
virtual void draw() override;
|
||||||
void drawButtons();
|
void drawButtons();
|
||||||
sType getClickedScrollType (int, int);
|
sType getClickedScrollType (int, int);
|
||||||
sType getVerticalClickedScrollType (int);
|
sType getVerticalClickedScrollType (int);
|
||||||
sType getHorizontalClickedScrollType (int);
|
sType getHorizontalClickedScrollType (int);
|
||||||
int getSliderClickPos (int, int);
|
int getSliderClickPos (int, int);
|
||||||
void jumpToClickPos (int, int);
|
void jumpToClickPos (int, int);
|
||||||
void jumpToClickPos (int);
|
void jumpToClickPos (int);
|
||||||
void avoidScrollOvershoot();
|
void avoidScrollOvershoot();
|
||||||
void processScroll();
|
void processScroll();
|
||||||
|
|
||||||
// Data Members
|
// Data Members
|
||||||
sType scroll_type{FScrollbar::noScroll};
|
sType scroll_type{FScrollbar::noScroll};
|
||||||
|
|
|
@ -89,69 +89,69 @@ class FScrollView : public FWidget
|
||||||
FScrollView& operator = (const FScrollView&) = delete;
|
FScrollView& operator = (const FScrollView&) = delete;
|
||||||
|
|
||||||
// Accessors
|
// Accessors
|
||||||
const char* getClassName() const;
|
virtual const char* getClassName() const override;
|
||||||
std::size_t getViewportWidth() const;
|
std::size_t getViewportWidth() const;
|
||||||
std::size_t getViewportHeight() const;
|
std::size_t getViewportHeight() const;
|
||||||
std::size_t getScrollWidth() const;
|
std::size_t getScrollWidth() const;
|
||||||
std::size_t getScrollHeight() const;
|
std::size_t getScrollHeight() const;
|
||||||
const FPoint getScrollPos() const;
|
const FPoint getScrollPos() const;
|
||||||
int getScrollX() const;
|
int getScrollX() const;
|
||||||
int getScrollY() const;
|
int getScrollY() const;
|
||||||
|
|
||||||
// Mutator
|
// Mutator
|
||||||
virtual void setScrollWidth (std::size_t);
|
virtual void setScrollWidth (std::size_t);
|
||||||
virtual void setScrollHeight (std::size_t);
|
virtual void setScrollHeight (std::size_t);
|
||||||
virtual void setScrollSize (std::size_t, std::size_t);
|
virtual void setScrollSize (std::size_t, std::size_t);
|
||||||
virtual void setX (int, bool = true);
|
virtual void setX (int, bool = true) override;
|
||||||
virtual void setY (int, bool = true);
|
virtual void setY (int, bool = true) override;
|
||||||
virtual void setPos (int, int, bool = true);
|
virtual void setPos (int, int, bool = true) override;
|
||||||
virtual void setWidth (std::size_t, bool = true);
|
virtual void setWidth (std::size_t, bool = true) override;
|
||||||
virtual void setHeight (std::size_t, bool = true);
|
virtual void setHeight (std::size_t, bool = true) override;
|
||||||
virtual void setSize (std::size_t, std::size_t, bool = true);
|
virtual void setSize (std::size_t, std::size_t, bool = true) override;
|
||||||
virtual void setGeometry ( int, int
|
virtual void setGeometry ( int, int
|
||||||
, std::size_t, std::size_t
|
, std::size_t, std::size_t
|
||||||
, bool = true );
|
, bool = true ) override;
|
||||||
void setCursorPos (int, int);
|
void setCursorPos (int, int);
|
||||||
void setPrintPos (int, int);
|
void setPrintPos (int, int);
|
||||||
bool setViewportPrint (bool);
|
bool setViewportPrint (bool);
|
||||||
bool setViewportPrint();
|
bool setViewportPrint();
|
||||||
bool unsetViewportPrint();
|
bool unsetViewportPrint();
|
||||||
bool setBorder (bool);
|
bool setBorder (bool);
|
||||||
bool setBorder();
|
bool setBorder();
|
||||||
bool unsetBorder();
|
bool unsetBorder();
|
||||||
void setHorizontalScrollBarMode (fc::scrollBarMode);
|
void setHorizontalScrollBarMode (fc::scrollBarMode);
|
||||||
void setVerticalScrollBarMode (fc::scrollBarMode);
|
void setVerticalScrollBarMode (fc::scrollBarMode);
|
||||||
|
|
||||||
// Inquiries
|
// Inquiries
|
||||||
bool hasBorder();
|
bool hasBorder();
|
||||||
bool isViewportPrint();
|
bool isViewportPrint();
|
||||||
|
|
||||||
// Method
|
// Method
|
||||||
virtual void clearArea (int = ' ');
|
virtual void clearArea (int = ' ') override;
|
||||||
void scrollToX (int);
|
void scrollToX (int);
|
||||||
void scrollToY (int);
|
void scrollToY (int);
|
||||||
void scrollTo (const FPoint&);
|
void scrollTo (const FPoint&);
|
||||||
void scrollTo (int, int);
|
void scrollTo (int, int);
|
||||||
void scrollBy (int, int);
|
void scrollBy (int, int);
|
||||||
virtual void draw();
|
virtual void draw() override;
|
||||||
|
|
||||||
// Event handlers
|
// Event handlers
|
||||||
virtual void onKeyPress (FKeyEvent*);
|
virtual void onKeyPress (FKeyEvent*) override;
|
||||||
virtual void onWheel (FWheelEvent*);
|
virtual void onWheel (FWheelEvent*) override;
|
||||||
virtual void onFocusIn (FFocusEvent*);
|
virtual void onFocusIn (FFocusEvent*) override;
|
||||||
virtual void onChildFocusIn (FFocusEvent*);
|
virtual void onChildFocusIn (FFocusEvent*) override;
|
||||||
virtual void onChildFocusOut (FFocusEvent*);
|
virtual void onChildFocusOut (FFocusEvent*) override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// Using-declaration
|
// Using-declaration
|
||||||
using FVTerm::clearArea;
|
using FVTerm::clearArea;
|
||||||
|
|
||||||
// Accessor
|
// Accessor
|
||||||
term_area* getPrintArea();
|
term_area* getPrintArea();
|
||||||
|
|
||||||
// Method
|
// Method
|
||||||
virtual void adjustSize();
|
virtual void adjustSize() override;
|
||||||
void copy2area();
|
void copy2area();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Typedef
|
// Typedef
|
||||||
|
@ -162,23 +162,23 @@ class FScrollView : public FWidget
|
||||||
static constexpr int horizontal_border_spacing = 2;
|
static constexpr int horizontal_border_spacing = 2;
|
||||||
|
|
||||||
// Accessors
|
// Accessors
|
||||||
FPoint getViewportCursorPos();
|
FPoint getViewportCursorPos();
|
||||||
|
|
||||||
// Methods
|
// Methods
|
||||||
void init (FWidget*);
|
void init (FWidget*);
|
||||||
void init_scrollbar();
|
void init_scrollbar();
|
||||||
void calculateScrollbarPos();
|
void calculateScrollbarPos();
|
||||||
void setHorizontalScrollBarVisibility();
|
void setHorizontalScrollBarVisibility();
|
||||||
void setVerticalScrollBarVisibility();
|
void setVerticalScrollBarVisibility();
|
||||||
void setViewportCursor();
|
void setViewportCursor();
|
||||||
void redrawHBar();
|
void redrawHBar();
|
||||||
void redrawVBar();
|
void redrawVBar();
|
||||||
void drawHBar();
|
void drawHBar();
|
||||||
void drawVBar();
|
void drawVBar();
|
||||||
|
|
||||||
// Callback methods
|
// Callback methods
|
||||||
void cb_VBarChange (FWidget*, FDataPtr);
|
void cb_VBarChange (FWidget*, FDataPtr);
|
||||||
void cb_HBarChange (FWidget*, FDataPtr);
|
void cb_HBarChange (FWidget*, FDataPtr);
|
||||||
|
|
||||||
// Data Members
|
// Data Members
|
||||||
FRect scroll_geometry{1, 1, 1, 1};
|
FRect scroll_geometry{1, 1, 1, 1};
|
||||||
|
|
|
@ -93,7 +93,7 @@ class FStatusKey : public FWidget
|
||||||
FStatusKey& operator = (const FStatusKey&) = delete;
|
FStatusKey& operator = (const FStatusKey&) = delete;
|
||||||
|
|
||||||
// Accessors
|
// Accessors
|
||||||
virtual const char* getClassName() const;
|
virtual const char* getClassName() const override;
|
||||||
virtual FKey getKey() const;
|
virtual FKey getKey() const;
|
||||||
virtual FString getText() const;
|
virtual FString getText() const;
|
||||||
|
|
||||||
|
@ -111,7 +111,7 @@ class FStatusKey : public FWidget
|
||||||
bool hasMouseFocus() const;
|
bool hasMouseFocus() const;
|
||||||
|
|
||||||
// Event handler
|
// Event handler
|
||||||
virtual void onAccel (FAccelEvent*);
|
virtual void onAccel (FAccelEvent*) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Methods
|
// Methods
|
||||||
|
@ -206,7 +206,7 @@ class FStatusBar : public FWindow
|
||||||
FStatusBar& operator = (const FStatusBar&) = delete;
|
FStatusBar& operator = (const FStatusBar&) = delete;
|
||||||
|
|
||||||
// Accessors
|
// Accessors
|
||||||
virtual const char* getClassName() const;
|
virtual const char* getClassName() const override;
|
||||||
FStatusKey* getStatusKey (int) const;
|
FStatusKey* getStatusKey (int) const;
|
||||||
FString getMessage() const;
|
FString getMessage() const;
|
||||||
std::size_t getCount() const;
|
std::size_t getCount() const;
|
||||||
|
@ -221,19 +221,19 @@ class FStatusBar : public FWindow
|
||||||
bool hasActivatedKey();
|
bool hasActivatedKey();
|
||||||
|
|
||||||
// Methods
|
// Methods
|
||||||
virtual void hide();
|
virtual void hide() override;
|
||||||
void drawMessage();
|
void drawMessage();
|
||||||
void clearMessage();
|
void clearMessage();
|
||||||
void insert (FStatusKey*);
|
void insert (FStatusKey*);
|
||||||
void remove (FStatusKey*);
|
void remove (FStatusKey*);
|
||||||
void remove (int);
|
void remove (int);
|
||||||
void clear();
|
void clear();
|
||||||
virtual void adjustSize();
|
virtual void adjustSize() override;
|
||||||
|
|
||||||
// Event handlers
|
// Event handlers
|
||||||
virtual void onMouseDown (FMouseEvent*);
|
virtual void onMouseDown (FMouseEvent*) override;
|
||||||
virtual void onMouseUp (FMouseEvent*);
|
virtual void onMouseUp (FMouseEvent*) override;
|
||||||
virtual void onMouseMove (FMouseEvent*);
|
virtual void onMouseMove (FMouseEvent*) override;
|
||||||
|
|
||||||
// Callback method
|
// Callback method
|
||||||
void cb_statuskey_activated (FWidget*, FDataPtr);
|
void cb_statuskey_activated (FWidget*, FDataPtr);
|
||||||
|
@ -244,7 +244,7 @@ class FStatusBar : public FWindow
|
||||||
|
|
||||||
// Methods
|
// Methods
|
||||||
void init();
|
void init();
|
||||||
virtual void draw();
|
virtual void draw() override;
|
||||||
void drawKeys();
|
void drawKeys();
|
||||||
void drawKey (keyList::const_iterator);
|
void drawKey (keyList::const_iterator);
|
||||||
void drawActiveKey (keyList::const_iterator);
|
void drawActiveKey (keyList::const_iterator);
|
||||||
|
|
|
@ -86,22 +86,22 @@ class FSwitch : public FToggleButton
|
||||||
FSwitch& operator = (const FSwitch&) = delete;
|
FSwitch& operator = (const FSwitch&) = delete;
|
||||||
|
|
||||||
// Accessor
|
// Accessor
|
||||||
const char* getClassName() const;
|
virtual const char* getClassName() const override;
|
||||||
|
|
||||||
// Mutator
|
// Mutator
|
||||||
virtual void setText (const FString&);
|
virtual void setText (const FString&) override;
|
||||||
|
|
||||||
// Event handlers
|
// Event handlers
|
||||||
virtual void onKeyPress (FKeyEvent*);
|
virtual void onKeyPress (FKeyEvent*) override;
|
||||||
virtual void onMouseDown (FMouseEvent*);
|
virtual void onMouseDown (FMouseEvent*) override;
|
||||||
virtual void onMouseUp (FMouseEvent*);
|
virtual void onMouseUp (FMouseEvent*) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Methods
|
// Methods
|
||||||
virtual void draw();
|
virtual void draw() override;
|
||||||
void drawCheckButton();
|
void drawCheckButton();
|
||||||
void drawChecked();
|
void drawChecked();
|
||||||
void drawUnchecked();
|
void drawUnchecked();
|
||||||
|
|
||||||
// Data Members
|
// Data Members
|
||||||
std::size_t switch_offset_pos{0};
|
std::size_t switch_offset_pos{0};
|
||||||
|
|
|
@ -93,7 +93,7 @@ class FTermcap
|
||||||
~FTermcap() = default;
|
~FTermcap() = default;
|
||||||
|
|
||||||
// Accessors
|
// Accessors
|
||||||
const char* getClassName() const;
|
virtual const char* getClassName() const;
|
||||||
|
|
||||||
static tcap_map* getTermcapMap()
|
static tcap_map* getTermcapMap()
|
||||||
{
|
{
|
||||||
|
|
|
@ -61,7 +61,7 @@ class FTermcapQuirks
|
||||||
virtual ~FTermcapQuirks();
|
virtual ~FTermcapQuirks();
|
||||||
|
|
||||||
// Accessor
|
// Accessor
|
||||||
const char* getClassName() const;
|
virtual const char* getClassName() const;
|
||||||
|
|
||||||
// Mutator
|
// Mutator
|
||||||
static void setFTermData (FTermData*);
|
static void setFTermData (FTermData*);
|
||||||
|
|
|
@ -90,68 +90,68 @@ class FTextView : public FWidget
|
||||||
FTextView& operator = (const FTextView&) = delete;
|
FTextView& operator = (const FTextView&) = delete;
|
||||||
|
|
||||||
// Accessors
|
// Accessors
|
||||||
const char* getClassName() const;
|
virtual const char* getClassName() const override;
|
||||||
std::size_t getColumns() const;
|
std::size_t getColumns() const;
|
||||||
std::size_t getRows() const;
|
std::size_t getRows() const;
|
||||||
const FString getText() const;
|
const FString getText() const;
|
||||||
const FStringList& getLines() const;
|
const FStringList& getLines() const;
|
||||||
|
|
||||||
// Mutators
|
// Mutators
|
||||||
virtual void setGeometry ( int, int
|
virtual void setGeometry ( int, int
|
||||||
, std::size_t, std::size_t
|
, std::size_t, std::size_t
|
||||||
, bool = true );
|
, bool = true ) override;
|
||||||
void setText (const FString&);
|
void setText (const FString&);
|
||||||
void scrollToX (int);
|
void scrollToX (int);
|
||||||
void scrollToY (int);
|
void scrollToY (int);
|
||||||
void scrollTo (const FPoint&);
|
void scrollTo (const FPoint&);
|
||||||
void scrollTo (int, int);
|
void scrollTo (int, int);
|
||||||
void scrollBy (int, int);
|
void scrollBy (int, int);
|
||||||
|
|
||||||
// Methods
|
// Methods
|
||||||
virtual void hide();
|
virtual void hide() override;
|
||||||
void append (const FString&);
|
void append (const FString&);
|
||||||
void insert (const FString&, int);
|
void insert (const FString&, int);
|
||||||
void replaceRange (const FString&, int, int);
|
void replaceRange (const FString&, int, int);
|
||||||
void deleteRange (int, int);
|
void deleteRange (int, int);
|
||||||
void deleteLine (int);
|
void deleteLine (int);
|
||||||
void clear();
|
void clear();
|
||||||
|
|
||||||
// Event handlers
|
// Event handlers
|
||||||
virtual void onKeyPress (FKeyEvent*);
|
virtual void onKeyPress (FKeyEvent*) override;
|
||||||
virtual void onMouseDown (FMouseEvent*);
|
virtual void onMouseDown (FMouseEvent*) override;
|
||||||
virtual void onMouseUp (FMouseEvent*);
|
virtual void onMouseUp (FMouseEvent*) override;
|
||||||
virtual void onMouseMove (FMouseEvent*);
|
virtual void onMouseMove (FMouseEvent*) override;
|
||||||
virtual void onWheel (FWheelEvent*);
|
virtual void onWheel (FWheelEvent*) override;
|
||||||
virtual void onFocusIn (FFocusEvent*);
|
virtual void onFocusIn (FFocusEvent*) override;
|
||||||
virtual void onFocusOut (FFocusEvent*);
|
virtual void onFocusOut (FFocusEvent*) override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// Method
|
// Method
|
||||||
virtual void adjustSize();
|
virtual void adjustSize() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Typedef
|
// Typedef
|
||||||
typedef std::shared_ptr<FScrollbar> FScrollbarPtr;
|
typedef std::shared_ptr<FScrollbar> FScrollbarPtr;
|
||||||
|
|
||||||
// Accessors
|
// Accessors
|
||||||
std::size_t getTextHeight();
|
std::size_t getTextHeight();
|
||||||
std::size_t getTextWidth();
|
std::size_t getTextWidth();
|
||||||
|
|
||||||
// Inquiry
|
// Inquiry
|
||||||
bool isHorizontallyScrollable();
|
bool isHorizontallyScrollable();
|
||||||
bool isVerticallyScrollable();
|
bool isVerticallyScrollable();
|
||||||
|
|
||||||
// Methods
|
// Methods
|
||||||
void init();
|
void init();
|
||||||
virtual void draw();
|
virtual void draw() override;
|
||||||
void drawText();
|
void drawText();
|
||||||
void processChanged();
|
void processChanged();
|
||||||
void drawHBar();
|
void drawHBar();
|
||||||
void drawVBar();
|
void drawVBar();
|
||||||
|
|
||||||
// Callback methods
|
// Callback methods
|
||||||
void cb_VBarChange (FWidget*, FDataPtr);
|
void cb_VBarChange (FWidget*, FDataPtr);
|
||||||
void cb_HBarChange (FWidget*, FDataPtr);
|
void cb_HBarChange (FWidget*, FDataPtr);
|
||||||
|
|
||||||
// Data Members
|
// Data Members
|
||||||
FStringList data{};
|
FStringList data{};
|
||||||
|
|
|
@ -87,61 +87,63 @@ class FToggleButton : public FWidget
|
||||||
FToggleButton& operator = (const FToggleButton&) = delete;
|
FToggleButton& operator = (const FToggleButton&) = delete;
|
||||||
|
|
||||||
// Accessors
|
// Accessors
|
||||||
virtual const char* getClassName() const;
|
virtual const char* getClassName() const override;
|
||||||
FString& getText();
|
FString& getText();
|
||||||
|
|
||||||
// Mutators
|
// Mutators
|
||||||
virtual void setGeometry (int, int, std::size_t, std::size_t, bool = true);
|
virtual void setGeometry ( int, int
|
||||||
bool setNoUnderline (bool);
|
, std::size_t, std::size_t
|
||||||
bool setNoUnderline();
|
, bool = true) override;
|
||||||
bool unsetNoUnderline();
|
bool setNoUnderline (bool);
|
||||||
virtual bool setEnable (bool);
|
bool setNoUnderline();
|
||||||
virtual bool setEnable();
|
bool unsetNoUnderline();
|
||||||
virtual bool unsetEnable();
|
virtual bool setEnable (bool) override;
|
||||||
virtual bool setDisable();
|
virtual bool setEnable() override;
|
||||||
virtual bool setFocus (bool);
|
virtual bool unsetEnable() override;
|
||||||
virtual bool setFocus();
|
virtual bool setDisable() override;
|
||||||
virtual bool unsetFocus();
|
virtual bool setFocus (bool) override;
|
||||||
bool setChecked (bool);
|
virtual bool setFocus() override;
|
||||||
bool setChecked();
|
virtual bool unsetFocus() override;
|
||||||
bool unsetChecked();
|
bool setChecked (bool);
|
||||||
virtual void setText (const FString&);
|
bool setChecked();
|
||||||
|
bool unsetChecked();
|
||||||
|
virtual void setText (const FString&);
|
||||||
|
|
||||||
// Inquiries
|
// Inquiries
|
||||||
bool isChecked();
|
bool isChecked();
|
||||||
|
|
||||||
// Methods
|
// Methods
|
||||||
virtual void hide();
|
virtual void hide() override;
|
||||||
|
|
||||||
// Event handlers
|
// Event handlers
|
||||||
virtual void onMouseDown (FMouseEvent*);
|
virtual void onMouseDown (FMouseEvent*) override;
|
||||||
virtual void onMouseUp (FMouseEvent*);
|
virtual void onMouseUp (FMouseEvent*) override;
|
||||||
virtual void onWheel (FWheelEvent*);
|
virtual void onWheel (FWheelEvent*) override;
|
||||||
virtual void onAccel (FAccelEvent*);
|
virtual void onAccel (FAccelEvent*) override;
|
||||||
virtual void onFocusIn (FFocusEvent*);
|
virtual void onFocusIn (FFocusEvent*) override;
|
||||||
virtual void onFocusOut (FFocusEvent*);
|
virtual void onFocusOut (FFocusEvent*) override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// Accessor
|
// Accessor
|
||||||
uChar getHotkey();
|
uChar getHotkey();
|
||||||
FButtonGroup* getGroup() const;
|
FButtonGroup* getGroup() const;
|
||||||
|
|
||||||
// Mutator
|
// Mutator
|
||||||
void setHotkeyAccelerator();
|
void setHotkeyAccelerator();
|
||||||
|
|
||||||
// Inquiries
|
// Inquiries
|
||||||
bool isRadioButton() const;
|
bool isRadioButton() const;
|
||||||
bool isCheckboxButton() const;
|
bool isCheckboxButton() const;
|
||||||
bool hasGroup() const;
|
bool hasGroup() const;
|
||||||
|
|
||||||
// Methods
|
// Methods
|
||||||
virtual void draw();
|
virtual void draw() override;
|
||||||
void drawLabel();
|
void drawLabel();
|
||||||
void processClick();
|
void processClick();
|
||||||
void processToggle();
|
void processToggle();
|
||||||
|
|
||||||
// Event handler
|
// Event handler
|
||||||
virtual void onKeyPress (FKeyEvent*);
|
virtual void onKeyPress (FKeyEvent*) override;
|
||||||
|
|
||||||
// Data Members
|
// Data Members
|
||||||
bool checked{false};
|
bool checked{false};
|
||||||
|
@ -153,12 +155,12 @@ class FToggleButton : public FWidget
|
||||||
static constexpr std::size_t NOT_SET = static_cast<std::size_t>(-1);
|
static constexpr std::size_t NOT_SET = static_cast<std::size_t>(-1);
|
||||||
|
|
||||||
// Mutator
|
// Mutator
|
||||||
void setGroup (FButtonGroup*);
|
void setGroup (FButtonGroup*);
|
||||||
|
|
||||||
// Methods
|
// Methods
|
||||||
void init();
|
void init();
|
||||||
std::size_t getHotkeyPos (wchar_t[], wchar_t[], std::size_t);
|
std::size_t getHotkeyPos (wchar_t[], wchar_t[], std::size_t);
|
||||||
void drawText (wchar_t[], std::size_t , std::size_t);
|
void drawText (wchar_t[], std::size_t , std::size_t);
|
||||||
|
|
||||||
// Friend classes
|
// Friend classes
|
||||||
friend class FButtonGroup;
|
friend class FButtonGroup;
|
||||||
|
|
|
@ -88,25 +88,25 @@ class FToolTip : public FWindow
|
||||||
FToolTip& operator = (const FToolTip&) = delete;
|
FToolTip& operator = (const FToolTip&) = delete;
|
||||||
|
|
||||||
// Accessors
|
// Accessors
|
||||||
const char* getClassName() const;
|
virtual const char* getClassName() const override;
|
||||||
const FString getText() const;
|
const FString getText() const;
|
||||||
|
|
||||||
// Mutators
|
// Mutators
|
||||||
void setText (const FString&);
|
void setText (const FString&);
|
||||||
|
|
||||||
// Methods
|
// Methods
|
||||||
virtual void draw();
|
virtual void draw() override;
|
||||||
virtual void show();
|
virtual void show() override;
|
||||||
virtual void hide();
|
virtual void hide() override;
|
||||||
|
|
||||||
// Event handler
|
// Event handler
|
||||||
virtual void onMouseDown (FMouseEvent*);
|
virtual void onMouseDown (FMouseEvent*) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Methods
|
// Methods
|
||||||
void init();
|
void init();
|
||||||
void calculateDimensions();
|
void calculateDimensions();
|
||||||
virtual void adjustSize();
|
virtual void adjustSize() override;
|
||||||
|
|
||||||
// Data Members
|
// Data Members
|
||||||
FString text{};
|
FString text{};
|
||||||
|
|
|
@ -177,169 +177,169 @@ class FWidget : public FVTerm, public FObject
|
||||||
FWidget& operator = (const FWidget&) = delete;
|
FWidget& operator = (const FWidget&) = delete;
|
||||||
|
|
||||||
// Accessors
|
// Accessors
|
||||||
const char* getClassName() const;
|
virtual const char* getClassName() const override;
|
||||||
FWidget* getRootWidget() const;
|
FWidget* getRootWidget() const;
|
||||||
FWidget* getParentWidget() const;
|
FWidget* getParentWidget() const;
|
||||||
static FWidget*& getMainWidget();
|
static FWidget*& getMainWidget();
|
||||||
static FWidget*& getActiveWindow();
|
static FWidget*& getActiveWindow();
|
||||||
static FWidget*& getFocusWidget();
|
static FWidget*& getFocusWidget();
|
||||||
static FWidget*& getClickedWidget();
|
static FWidget*& getClickedWidget();
|
||||||
static FWidget*& getOpenMenu();
|
static FWidget*& getOpenMenu();
|
||||||
static FWidget*& getMoveSizeWidget();
|
static FWidget*& getMoveSizeWidget();
|
||||||
virtual FWidget* getFirstFocusableWidget (FObjectList);
|
virtual FWidget* getFirstFocusableWidget (FObjectList);
|
||||||
virtual FWidget* getLastFocusableWidget (FObjectList);
|
virtual FWidget* getLastFocusableWidget (FObjectList);
|
||||||
static FMenuBar* getMenuBar();
|
static FMenuBar* getMenuBar();
|
||||||
static FStatusBar* getStatusBar();
|
static FStatusBar* getStatusBar();
|
||||||
FString getStatusbarMessage() const;
|
FString getStatusbarMessage() const;
|
||||||
FColor getForegroundColor() const; // get the primary
|
FColor getForegroundColor() const; // get the primary
|
||||||
FColor getBackgroundColor() const; // widget colors
|
FColor getBackgroundColor() const; // widget colors
|
||||||
int getX() const; // positioning
|
int getX() const; // positioning
|
||||||
int getY() const;
|
int getY() const;
|
||||||
const FPoint getPos() const;
|
const FPoint getPos() const;
|
||||||
int getTermX() const;
|
int getTermX() const;
|
||||||
int getTermY() const;
|
int getTermY() const;
|
||||||
const FPoint getTermPos() const;
|
const FPoint getTermPos() const;
|
||||||
std::size_t getWidth() const;
|
std::size_t getWidth() const;
|
||||||
std::size_t getHeight() const;
|
std::size_t getHeight() const;
|
||||||
int getTopPadding() const;
|
int getTopPadding() const;
|
||||||
int getLeftPadding() const;
|
int getLeftPadding() const;
|
||||||
int getBottomPadding() const;
|
int getBottomPadding() const;
|
||||||
int getRightPadding() const;
|
int getRightPadding() const;
|
||||||
std::size_t getClientWidth() const;
|
std::size_t getClientWidth() const;
|
||||||
std::size_t getClientHeight() const;
|
std::size_t getClientHeight() const;
|
||||||
std::size_t getMaxWidth() const;
|
std::size_t getMaxWidth() const;
|
||||||
std::size_t getMaxHeight() const;
|
std::size_t getMaxHeight() const;
|
||||||
const FPoint& getShadow() const;
|
const FPoint& getShadow() const;
|
||||||
const FRect& getGeometry() const;
|
const FRect& getGeometry() const;
|
||||||
const FRect& getGeometryWithShadow();
|
const FRect& getGeometryWithShadow();
|
||||||
const FRect& getTermGeometry();
|
const FRect& getTermGeometry();
|
||||||
const FRect& getTermGeometryWithShadow();
|
const FRect& getTermGeometryWithShadow();
|
||||||
std::size_t getDesktopWidth();
|
std::size_t getDesktopWidth();
|
||||||
std::size_t getDesktopHeight();
|
std::size_t getDesktopHeight();
|
||||||
widget_flags getFlags() const;
|
widget_flags getFlags() const;
|
||||||
FPoint getCursorPos();
|
FPoint getCursorPos();
|
||||||
FPoint getPrintPos();
|
FPoint getPrintPos();
|
||||||
std::vector<bool>& doubleFlatLine_ref (fc::sides);
|
std::vector<bool>& doubleFlatLine_ref (fc::sides);
|
||||||
|
|
||||||
// Mutators
|
// Mutators
|
||||||
static void setMainWidget (FWidget*);
|
static void setMainWidget (FWidget*);
|
||||||
static void setFocusWidget (FWidget*);
|
static void setFocusWidget (FWidget*);
|
||||||
static void setClickedWidget (FWidget*);
|
static void setClickedWidget (FWidget*);
|
||||||
static void setMoveSizeWidget (FWidget*);
|
static void setMoveSizeWidget (FWidget*);
|
||||||
static void setActiveWindow (FWidget*);
|
static void setActiveWindow (FWidget*);
|
||||||
static void setOpenMenu (FWidget*);
|
static void setOpenMenu (FWidget*);
|
||||||
virtual void setStatusbarMessage (const FString&);
|
virtual void setStatusbarMessage (const FString&);
|
||||||
bool setVisible();
|
bool setVisible();
|
||||||
virtual bool setEnable (bool);
|
virtual bool setEnable (bool);
|
||||||
virtual bool setEnable();
|
virtual bool setEnable();
|
||||||
virtual bool unsetEnable();
|
virtual bool unsetEnable();
|
||||||
virtual bool setDisable();
|
virtual bool setDisable();
|
||||||
virtual bool setVisibleCursor (bool); // input cursor visibility
|
virtual bool setVisibleCursor (bool); // input cursor visibility
|
||||||
virtual bool setVisibleCursor(); // for the widget
|
virtual bool setVisibleCursor(); // for the widget
|
||||||
virtual bool unsetVisibleCursor();
|
virtual bool unsetVisibleCursor();
|
||||||
virtual bool setFocus (bool);
|
virtual bool setFocus (bool);
|
||||||
virtual bool setFocus();
|
virtual bool setFocus();
|
||||||
virtual bool unsetFocus();
|
virtual bool unsetFocus();
|
||||||
void setFocusable();
|
void setFocusable();
|
||||||
void unsetFocusable();
|
void unsetFocusable();
|
||||||
bool ignorePadding (bool); // ignore padding from
|
bool ignorePadding (bool); // ignore padding from
|
||||||
bool ignorePadding(); // the parent widget
|
bool ignorePadding(); // the parent widget
|
||||||
bool acceptPadding();
|
bool acceptPadding();
|
||||||
void setForegroundColor (FColor);
|
void setForegroundColor (FColor);
|
||||||
void setBackgroundColor (FColor);
|
void setBackgroundColor (FColor);
|
||||||
void setColor();
|
void setColor();
|
||||||
virtual void setX (int, bool = true); // positioning
|
virtual void setX (int, bool = true); // positioning
|
||||||
virtual void setY (int, bool = true);
|
virtual void setY (int, bool = true);
|
||||||
virtual void setPos (const FPoint&, bool = true);
|
virtual void setPos (const FPoint&, bool = true);
|
||||||
virtual void setPos (int, int, bool = true);
|
virtual void setPos (int, int, bool = true);
|
||||||
virtual void setWidth (std::size_t, bool = true);
|
virtual void setWidth (std::size_t, bool = true);
|
||||||
virtual void setHeight (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 setSize (std::size_t, std::size_t, bool = true);
|
||||||
void setTopPadding (int, bool = true);
|
void setTopPadding (int, bool = true);
|
||||||
void setLeftPadding (int, bool = true);
|
void setLeftPadding (int, bool = true);
|
||||||
void setBottomPadding (int, bool = true);
|
void setBottomPadding (int, bool = true);
|
||||||
void setRightPadding (int, bool = true);
|
void setRightPadding (int, bool = true);
|
||||||
void setParentOffset();
|
void setParentOffset();
|
||||||
void setTermOffset();
|
void setTermOffset();
|
||||||
void setTermOffsetWithPadding();
|
void setTermOffsetWithPadding();
|
||||||
void setTermSize (std::size_t, std::size_t);
|
void setTermSize (std::size_t, std::size_t);
|
||||||
virtual void setGeometry (const FRect&, bool = true);
|
virtual void setGeometry (const FRect&, bool = true);
|
||||||
virtual void setGeometry ( int, int
|
virtual void setGeometry ( int, int
|
||||||
, std::size_t, std::size_t
|
, std::size_t, std::size_t
|
||||||
, bool = true );
|
, bool = true );
|
||||||
virtual void setShadowSize (int, int);
|
virtual void setShadowSize (int, int);
|
||||||
void setMinimumWidth (std::size_t);
|
void setMinimumWidth (std::size_t);
|
||||||
void setMinimumHeight (std::size_t);
|
void setMinimumHeight (std::size_t);
|
||||||
void setMinimumSize (std::size_t, std::size_t);
|
void setMinimumSize (std::size_t, std::size_t);
|
||||||
void setMaximumWidth (std::size_t);
|
void setMaximumWidth (std::size_t);
|
||||||
void setMaximumHeight (std::size_t);
|
void setMaximumHeight (std::size_t);
|
||||||
void setMaximumSize (std::size_t, std::size_t);
|
void setMaximumSize (std::size_t, std::size_t);
|
||||||
void setFixedSize (std::size_t, std::size_t);
|
void setFixedSize (std::size_t, std::size_t);
|
||||||
bool setCursorPos (const FPoint&);
|
bool setCursorPos (const FPoint&);
|
||||||
bool setCursorPos (int, int);
|
bool setCursorPos (int, int);
|
||||||
void unsetCursorPos();
|
void unsetCursorPos();
|
||||||
void setPrintPos (const FPoint&);
|
void setPrintPos (const FPoint&);
|
||||||
void setPrintPos (int, int);
|
void setPrintPos (int, int);
|
||||||
void setDoubleFlatLine (fc::sides, bool = true);
|
void setDoubleFlatLine (fc::sides, bool = true);
|
||||||
void unsetDoubleFlatLine (fc::sides);
|
void unsetDoubleFlatLine (fc::sides);
|
||||||
void setDoubleFlatLine (fc::sides, int, bool = true);
|
void setDoubleFlatLine (fc::sides, int, bool = true);
|
||||||
void unsetDoubleFlatLine (fc::sides, int);
|
void unsetDoubleFlatLine (fc::sides, int);
|
||||||
|
|
||||||
// Inquiries
|
// Inquiries
|
||||||
bool isRootWidget() const;
|
bool isRootWidget() const;
|
||||||
bool isWindowWidget() const;
|
bool isWindowWidget() const;
|
||||||
bool isDialogWidget() const;
|
bool isDialogWidget() const;
|
||||||
bool isMenuWidget() const;
|
bool isMenuWidget() const;
|
||||||
bool isVisible() const;
|
bool isVisible() const;
|
||||||
bool isShown() const;
|
bool isShown() const;
|
||||||
bool isEnabled() const;
|
bool isEnabled() const;
|
||||||
bool hasVisibleCursor() const;
|
bool hasVisibleCursor() const;
|
||||||
bool hasFocus() const;
|
bool hasFocus() const;
|
||||||
bool acceptFocus() const; // is focusable
|
bool acceptFocus() const; // is focusable
|
||||||
bool isPaddingIgnored();
|
bool isPaddingIgnored();
|
||||||
|
|
||||||
// Methods
|
// Methods
|
||||||
static FWidget* childWidgetAt (FWidget*, const FPoint&);
|
static FWidget* childWidgetAt (FWidget*, const FPoint&);
|
||||||
static FWidget* childWidgetAt (FWidget*, int, int);
|
static FWidget* childWidgetAt (FWidget*, int, int);
|
||||||
int numOfFocusableChildren();
|
int numOfFocusableChildren();
|
||||||
virtual bool close();
|
virtual bool close();
|
||||||
void clearStatusbarMessage();
|
void clearStatusbarMessage();
|
||||||
void addCallback ( const FString&
|
void addCallback ( const FString&
|
||||||
, FCallback
|
, FCallback
|
||||||
, FDataPtr = nullptr );
|
, FDataPtr = nullptr );
|
||||||
void addCallback ( const FString&
|
void addCallback ( const FString&
|
||||||
, FWidget*
|
, FWidget*
|
||||||
, FMemberCallback
|
, FMemberCallback
|
||||||
, FDataPtr = nullptr );
|
, FDataPtr = nullptr );
|
||||||
void delCallback (FCallback);
|
void delCallback (FCallback);
|
||||||
void delCallback (FWidget*);
|
void delCallback (FWidget*);
|
||||||
void delCallbacks();
|
void delCallbacks();
|
||||||
void emitCallback (const FString&);
|
void emitCallback (const FString&);
|
||||||
void addAccelerator (FKey);
|
void addAccelerator (FKey);
|
||||||
virtual void addAccelerator (FKey, FWidget*);
|
virtual void addAccelerator (FKey, FWidget*);
|
||||||
void delAccelerator ();
|
void delAccelerator ();
|
||||||
virtual void delAccelerator (FWidget*);
|
virtual void delAccelerator (FWidget*);
|
||||||
virtual void redraw();
|
virtual void redraw();
|
||||||
virtual void resize();
|
virtual void resize();
|
||||||
virtual void show();
|
virtual void show();
|
||||||
virtual void hide();
|
virtual void hide();
|
||||||
virtual bool focusFirstChild(); // widget focusing
|
virtual bool focusFirstChild(); // widget focusing
|
||||||
virtual bool focusLastChild();
|
virtual bool focusLastChild();
|
||||||
FPoint termToWidgetPos (const FPoint&);
|
FPoint termToWidgetPos (const FPoint&);
|
||||||
void detectTermSize();
|
void detectTermSize();
|
||||||
virtual void move (const FPoint&);
|
virtual void move (const FPoint&);
|
||||||
virtual void move (int, int);
|
virtual void move (int, int);
|
||||||
void drawShadow();
|
void drawShadow();
|
||||||
void clearShadow();
|
void clearShadow();
|
||||||
void drawFlatBorder();
|
void drawFlatBorder();
|
||||||
void clearFlatBorder();
|
void clearFlatBorder();
|
||||||
virtual void drawBorder (int, int, int, int);
|
virtual void drawBorder (int, int, int, int);
|
||||||
virtual void drawBorder();
|
virtual void drawBorder();
|
||||||
static void quit();
|
static void quit();
|
||||||
|
|
||||||
// Data Members
|
// Data Members
|
||||||
static widgetList* window_list;
|
static widgetList* window_list;
|
||||||
Accelerators* accelerator_list{nullptr};
|
Accelerators* accelerator_list{nullptr};
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
struct callback_data
|
struct callback_data
|
||||||
|
@ -362,43 +362,43 @@ class FWidget : public FVTerm, public FObject
|
||||||
typedef std::vector<member_callback_data> MemberCallbackObjects;
|
typedef std::vector<member_callback_data> MemberCallbackObjects;
|
||||||
|
|
||||||
// Accessor
|
// Accessor
|
||||||
term_area* getPrintArea();
|
term_area* getPrintArea();
|
||||||
void addPreprocessingHandler ( FVTerm*
|
void addPreprocessingHandler ( FVTerm*
|
||||||
, FPreprocessingHandler );
|
, FPreprocessingHandler );
|
||||||
void delPreprocessingHandler (FVTerm*);
|
void delPreprocessingHandler (FVTerm*);
|
||||||
|
|
||||||
// Inquiry
|
// Inquiry
|
||||||
bool isChildPrintArea() const;
|
bool isChildPrintArea() const;
|
||||||
|
|
||||||
// Mutators
|
// Mutators
|
||||||
virtual void setStatusBar (FStatusBar*);
|
virtual void setStatusBar (FStatusBar*);
|
||||||
virtual void setMenuBar (FMenuBar*);
|
virtual void setMenuBar (FMenuBar*);
|
||||||
|
|
||||||
// Methods
|
// Methods
|
||||||
virtual void adjustSize();
|
virtual void adjustSize();
|
||||||
void adjustSizeGlobal();
|
void adjustSizeGlobal();
|
||||||
virtual bool focusNextChild(); // Change child...
|
virtual bool focusNextChild(); // Change child...
|
||||||
virtual bool focusPrevChild(); // ...focus
|
virtual bool focusPrevChild(); // ...focus
|
||||||
|
|
||||||
// Event handlers
|
// Event handlers
|
||||||
virtual bool event (FEvent*);
|
virtual bool event (FEvent*);
|
||||||
virtual void onKeyPress (FKeyEvent*);
|
virtual void onKeyPress (FKeyEvent*);
|
||||||
virtual void onKeyUp (FKeyEvent*);
|
virtual void onKeyUp (FKeyEvent*);
|
||||||
virtual void onKeyDown (FKeyEvent*);
|
virtual void onKeyDown (FKeyEvent*);
|
||||||
virtual void onMouseDown (FMouseEvent*);
|
virtual void onMouseDown (FMouseEvent*);
|
||||||
virtual void onMouseUp (FMouseEvent*);
|
virtual void onMouseUp (FMouseEvent*);
|
||||||
virtual void onMouseDoubleClick (FMouseEvent*);
|
virtual void onMouseDoubleClick (FMouseEvent*);
|
||||||
virtual void onWheel (FWheelEvent*);
|
virtual void onWheel (FWheelEvent*);
|
||||||
virtual void onMouseMove (FMouseEvent*);
|
virtual void onMouseMove (FMouseEvent*);
|
||||||
virtual void onFocusIn (FFocusEvent*);
|
virtual void onFocusIn (FFocusEvent*);
|
||||||
virtual void onFocusOut (FFocusEvent*);
|
virtual void onFocusOut (FFocusEvent*);
|
||||||
virtual void onChildFocusIn (FFocusEvent*);
|
virtual void onChildFocusIn (FFocusEvent*);
|
||||||
virtual void onChildFocusOut (FFocusEvent*);
|
virtual void onChildFocusOut (FFocusEvent*);
|
||||||
virtual void onAccel (FAccelEvent*);
|
virtual void onAccel (FAccelEvent*);
|
||||||
virtual void onResize (FResizeEvent*);
|
virtual void onResize (FResizeEvent*);
|
||||||
virtual void onShow (FShowEvent*);
|
virtual void onShow (FShowEvent*);
|
||||||
virtual void onHide (FHideEvent*);
|
virtual void onHide (FHideEvent*);
|
||||||
virtual void onClose (FCloseEvent*);
|
virtual void onClose (FCloseEvent*);
|
||||||
|
|
||||||
// Data Members
|
// Data Members
|
||||||
struct widget_flags flags{};
|
struct widget_flags flags{};
|
||||||
|
@ -412,21 +412,21 @@ class FWidget : public FVTerm, public FObject
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Methods
|
// Methods
|
||||||
void init();
|
void init();
|
||||||
void finish();
|
void finish();
|
||||||
void insufficientSpaceAdjust();
|
void insufficientSpaceAdjust();
|
||||||
void KeyPressEvent (FKeyEvent*);
|
void KeyPressEvent (FKeyEvent*);
|
||||||
void KeyDownEvent (FKeyEvent*);
|
void KeyDownEvent (FKeyEvent*);
|
||||||
bool changeFocus (FWidget*, FWidget*, fc::FocusTypes);
|
bool changeFocus (FWidget*, FWidget*, fc::FocusTypes);
|
||||||
void processDestroy();
|
void processDestroy();
|
||||||
virtual void draw();
|
virtual void draw();
|
||||||
void drawWindows();
|
void drawWindows();
|
||||||
void drawChildren();
|
void drawChildren();
|
||||||
void drawTransparentShadow (int, int, int, int);
|
void drawTransparentShadow (int, int, int, int);
|
||||||
void drawBlockShadow (int, int, int, int);
|
void drawBlockShadow (int, int, int, int);
|
||||||
void drawBox (int, int, int, int);
|
void drawBox (int, int, int, int);
|
||||||
void drawNewFontBox (int, int, int, int);
|
void drawNewFontBox (int, int, int, int);
|
||||||
static void setColorTheme();
|
static void setColorTheme();
|
||||||
|
|
||||||
// Data Members
|
// Data Members
|
||||||
FPoint widget_cursor_position{-1, -1};
|
FPoint widget_cursor_position{-1, -1};
|
||||||
|
|
|
@ -94,95 +94,97 @@ class FWindow : public FWidget
|
||||||
FWindow& operator = (const FWindow&) = delete;
|
FWindow& operator = (const FWindow&) = delete;
|
||||||
|
|
||||||
// Accessors
|
// Accessors
|
||||||
const char* getClassName() const;
|
virtual const char* getClassName() const override;
|
||||||
static FWindow* getWindowWidget (const FWidget*);
|
static FWindow* getWindowWidget (const FWidget*);
|
||||||
static int getWindowLayer (const FWidget*);
|
static int getWindowLayer (const FWidget*);
|
||||||
FWidget* getWindowFocusWidget() const;
|
FWidget* getWindowFocusWidget() const;
|
||||||
|
|
||||||
// Mutators
|
// Mutators
|
||||||
bool setWindowWidget (bool);
|
bool setWindowWidget (bool);
|
||||||
bool setWindowWidget();
|
bool setWindowWidget();
|
||||||
bool unsetWindowWidget();
|
bool unsetWindowWidget();
|
||||||
static void setActiveWindow (FWindow*);
|
static void setActiveWindow (FWindow*);
|
||||||
void setWindowFocusWidget (const FWidget*);
|
void setWindowFocusWidget (const FWidget*);
|
||||||
bool activateWindow (bool);
|
bool activateWindow (bool);
|
||||||
bool activateWindow();
|
bool activateWindow();
|
||||||
void unsetActiveWindow();
|
void unsetActiveWindow();
|
||||||
bool deactivateWindow();
|
bool deactivateWindow();
|
||||||
virtual bool setResizeable (bool);
|
virtual bool setResizeable (bool);
|
||||||
virtual bool setResizeable();
|
virtual bool setResizeable();
|
||||||
bool unsetResizeable();
|
bool unsetResizeable();
|
||||||
bool setTransparentShadow (bool);
|
bool setTransparentShadow (bool);
|
||||||
bool setTransparentShadow();
|
bool setTransparentShadow();
|
||||||
bool unsetTransparentShadow();
|
bool unsetTransparentShadow();
|
||||||
bool setShadow (bool);
|
bool setShadow (bool);
|
||||||
bool setShadow();
|
bool setShadow();
|
||||||
bool unsetShadow();
|
bool unsetShadow();
|
||||||
bool setAlwaysOnTop (bool);
|
bool setAlwaysOnTop (bool);
|
||||||
bool setAlwaysOnTop();
|
bool setAlwaysOnTop();
|
||||||
bool unsetAlwaysOnTop();
|
bool unsetAlwaysOnTop();
|
||||||
|
|
||||||
// Inquiries
|
// Inquiries
|
||||||
bool isZoomed() const;
|
bool isZoomed() const;
|
||||||
bool isWindowActive() const;
|
bool isWindowActive() const;
|
||||||
bool isWindowHidden() const;
|
bool isWindowHidden() const;
|
||||||
bool isResizeable() const;
|
bool isResizeable() const;
|
||||||
bool isAlwaysOnTop() const;
|
bool isAlwaysOnTop() const;
|
||||||
bool hasTransparentShadow() const;
|
bool hasTransparentShadow() const;
|
||||||
bool hasShadow() const;
|
bool hasShadow() const;
|
||||||
|
|
||||||
// Methods
|
// Methods
|
||||||
virtual void drawBorder();
|
virtual void drawBorder() override;
|
||||||
virtual void show();
|
virtual void show() override;
|
||||||
virtual void hide();
|
virtual void hide() override;
|
||||||
virtual void setX (int, bool = true);
|
virtual void setX (int, bool = true) override;
|
||||||
virtual void setY (int, bool = true);
|
virtual void setY (int, bool = true) override;
|
||||||
virtual void setPos (int, int, bool = true);
|
virtual void setPos (int, int, bool = true) override;
|
||||||
virtual void setWidth (std::size_t, bool = true);
|
virtual void setWidth (std::size_t, bool = true) override;
|
||||||
virtual void setHeight (std::size_t, bool = true);
|
virtual void setHeight (std::size_t, bool = true) override;
|
||||||
virtual void setSize (std::size_t, std::size_t, bool = true);
|
virtual void setSize (std::size_t, std::size_t, bool = true) override;
|
||||||
void setGeometry ( int, int
|
virtual void setGeometry ( int, int
|
||||||
, std::size_t, std::size_t
|
, std::size_t, std::size_t
|
||||||
, bool = true );
|
, bool = true ) override;
|
||||||
virtual void move (int, int);
|
virtual void move (int, int) override;
|
||||||
static FWindow* getWindowWidgetAt (const FPoint&);
|
static FWindow* getWindowWidgetAt (const FPoint&);
|
||||||
static FWindow* getWindowWidgetAt (int, int);
|
static FWindow* getWindowWidgetAt (int, int);
|
||||||
static void addWindow (FWidget*);
|
static void addWindow (FWidget*);
|
||||||
static void delWindow (FWidget*);
|
static void delWindow (FWidget*);
|
||||||
static void swapWindow (FWidget*, FWidget*);
|
static void swapWindow (FWidget*, FWidget*);
|
||||||
static bool raiseWindow (FWidget*);
|
static bool raiseWindow (FWidget*);
|
||||||
bool raiseWindow ();
|
bool raiseWindow ();
|
||||||
static bool lowerWindow (FWidget*);
|
static bool lowerWindow (FWidget*);
|
||||||
bool lowerWindow ();
|
bool lowerWindow ();
|
||||||
bool zoomWindow ();
|
bool zoomWindow ();
|
||||||
static void switchToPrevWindow (FWidget*);
|
static void switchToPrevWindow (FWidget*);
|
||||||
static bool activatePrevWindow();
|
static bool activatePrevWindow();
|
||||||
virtual void setShadowSize (int, int);
|
virtual void setShadowSize (int, int) override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// Method
|
// Method
|
||||||
virtual void adjustSize();
|
virtual void adjustSize() override;
|
||||||
|
|
||||||
|
// Mutator
|
||||||
|
static void setPreviousWindow (FWindow*);
|
||||||
|
|
||||||
// Event handlers
|
// Event handlers
|
||||||
virtual bool event (FEvent*);
|
virtual bool event (FEvent*) override;
|
||||||
virtual void onWindowActive (FEvent*);
|
virtual void onWindowActive (FEvent*);
|
||||||
virtual void onWindowInactive (FEvent*);
|
virtual void onWindowInactive (FEvent*);
|
||||||
virtual void onWindowRaised (FEvent*);
|
virtual void onWindowRaised (FEvent*);
|
||||||
virtual void onWindowLowered (FEvent*);
|
virtual void onWindowLowered (FEvent*);
|
||||||
|
|
||||||
// Data Members
|
|
||||||
static FWindow* previous_window;
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Methods
|
// Methods
|
||||||
static void deleteFromAlwaysOnTopList (FWidget*);
|
static void deleteFromAlwaysOnTopList (FWidget*);
|
||||||
static void processAlwaysOnTop();
|
static void processAlwaysOnTop();
|
||||||
|
|
||||||
// Data Members
|
// Data Members
|
||||||
bool window_active{false};
|
bool window_active{false};
|
||||||
bool zoomed{false};
|
bool zoomed{false};
|
||||||
FWidget* win_focus_widget{nullptr};
|
FWidget* win_focus_widget{nullptr};
|
||||||
FRect normalGeometry{};
|
FRect normalGeometry{};
|
||||||
|
static FWindow* previous_window;
|
||||||
|
|
||||||
};
|
};
|
||||||
#pragma pack(pop)
|
#pragma pack(pop)
|
||||||
|
|
||||||
|
@ -276,6 +278,10 @@ inline bool FWindow::raiseWindow()
|
||||||
inline bool FWindow::lowerWindow()
|
inline bool FWindow::lowerWindow()
|
||||||
{ return lowerWindow(this); }
|
{ return lowerWindow(this); }
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------
|
||||||
|
inline void FWindow::setPreviousWindow (FWindow* w)
|
||||||
|
{ previous_window = w; }
|
||||||
|
|
||||||
} // namespace finalcut
|
} // namespace finalcut
|
||||||
|
|
||||||
#endif // FWINDOW_H
|
#endif // FWINDOW_H
|
||||||
|
|
Loading…
Reference in New Issue