Stricter use of the keyword virtual

This commit is contained in:
Markus Gans 2018-09-24 04:02:35 +02:00
parent fcefd8251c
commit 4ad8335556
60 changed files with 533 additions and 537 deletions

View File

@ -1,3 +1,6 @@
2018-09-24 Markus Gans <guru.mail@muenster.de>
* Stricter use of the keyword virtual
2018-09-20 Markus Gans <guru.mail@muenster.de>
* Added pkg-config file finalcut.pc
* The entire library source code is now encapsulated under

View File

@ -49,7 +49,7 @@ class Button : public finalcut::FButton
void setChecked(bool);
// Event handler
void onKeyPress (finalcut::FKeyEvent*);
virtual void onKeyPress (finalcut::FKeyEvent*);
private:
// Data Member
@ -118,12 +118,12 @@ class Calc : public finalcut::FDialog
~Calc();
// Event handlers
void onKeyPress (finalcut::FKeyEvent*);
void onAccel (finalcut::FAccelEvent*);
void onClose (finalcut::FCloseEvent*);
virtual void onKeyPress (finalcut::FKeyEvent*);
virtual void onAccel (finalcut::FAccelEvent*);
virtual void onClose (finalcut::FCloseEvent*);
// Callback method
void cb_buttonClicked (finalcut::FWidget*, data_ptr);
void cb_buttonClicked (finalcut::FWidget*, data_ptr);
private:
// Typedef and Enumeration
@ -212,7 +212,7 @@ class Calc : public finalcut::FDialog
void setInfixOperator (char);
void clearInfixOperator();
void calcInfixOperator();
void adjustSize();
virtual void adjustSize();
const wchar_t* getButtonText (int);
void mapKeyFunctions();

View File

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

View File

@ -88,7 +88,7 @@ class Listbox : public finalcut::FDialog
Listbox& operator = (const Listbox&);
// Event handlers
void onClose (finalcut::FCloseEvent*);
virtual void onClose (finalcut::FCloseEvent*);
// Data Member
std::list<double>* double_list;

View File

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

View File

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

View File

@ -56,10 +56,10 @@ class Menu : public finalcut::FDialog
void createBorderColorMenuItems (finalcut::FMenu*);
void createBorderStyleMenuItems (finalcut::FMenu*);
void defaultCallback (finalcut::FMenuList*);
void adjustSize();
virtual void adjustSize();
// Event handler
void onClose (finalcut::FCloseEvent*);
virtual void onClose (finalcut::FCloseEvent*);
// Callback method
void cb_message (finalcut::FWidget*, data_ptr);

View File

@ -50,10 +50,10 @@ class ColorChooser : public finalcut::FWidget
ColorChooser& operator = (const ColorChooser&);
// Method
void draw();
virtual void draw();
// Event handler
void onMouseDown (finalcut::FMouseEvent*);
virtual void onMouseDown (finalcut::FMouseEvent*);
// Data Members
short fg_color;
@ -188,10 +188,10 @@ class Brushes : public finalcut::FWidget
Brushes& operator = (const Brushes&);
// Method
void draw();
virtual void draw();
// Event handler
void onMouseDown (finalcut::FMouseEvent*);
virtual void onMouseDown (finalcut::FMouseEvent*);
// Data Members
wchar_t brush;
@ -316,8 +316,8 @@ class MouseDraw : public finalcut::FDialog
void setGeometry (int, int, int, int, bool = true);
// Event handlers
void onAccel (finalcut::FAccelEvent*);
void onClose (finalcut::FCloseEvent*);
virtual void onAccel (finalcut::FAccelEvent*);
virtual void onClose (finalcut::FCloseEvent*);
private:
// Disable copy constructor
@ -329,11 +329,11 @@ class MouseDraw : public finalcut::FDialog
virtual void draw();
void drawBrush (int, int, bool = false);
void drawCanvas();
void adjustSize();
virtual void adjustSize();
// Event handler
void onMouseDown (finalcut::FMouseEvent*);
void onMouseMove (finalcut::FMouseEvent*);
virtual void onMouseDown (finalcut::FMouseEvent*);
virtual void onMouseMove (finalcut::FMouseEvent*);
// Callback methods
void cb_colorChanged (finalcut::FWidget*, data_ptr);

View File

@ -49,7 +49,7 @@ class Scrollview : public finalcut::FScrollView
Scrollview& operator = (const Scrollview&);
// Method
void draw();
virtual void draw();
// Callback methods
void cb_go_east (finalcut::FWidget*, data_ptr);
@ -206,7 +206,7 @@ class Scrollviewdemo : public finalcut::FDialog
~Scrollviewdemo();
// Event handler
void onClose (finalcut::FCloseEvent*);
virtual void onClose (finalcut::FCloseEvent*);
// Callback method
void cb_quit (finalcut::FWidget* = 0, data_ptr = 0);

View File

@ -40,9 +40,9 @@ class AttribDlg : public finalcut::FDialog
~AttribDlg();
// Event handlers
void onAccel (finalcut::FAccelEvent*);
void onWheel (finalcut::FWheelEvent*);
void onClose (finalcut::FCloseEvent*);
virtual void onAccel (finalcut::FAccelEvent*);
virtual void onWheel (finalcut::FWheelEvent*);
virtual void onClose (finalcut::FCloseEvent*);
// Callback methods
void cb_next (finalcut::FWidget* = 0, data_ptr = 0);
@ -58,7 +58,7 @@ class AttribDlg : public finalcut::FDialog
AttribDlg& operator = (const AttribDlg&);
// Method
void adjustSize();
virtual void adjustSize();
// Data Members
finalcut::FButton* next_button;
@ -191,7 +191,7 @@ class AttribDemo : public finalcut::FWidget
{ }
// Event handler
void onWheel (finalcut::FWheelEvent* ev)
virtual void onWheel (finalcut::FWheelEvent* ev)
{
AttribDlg* p = static_cast<AttribDlg*>(getParentWidget());
@ -216,7 +216,7 @@ class AttribDemo : public finalcut::FWidget
void printStandout();
void printInvisible();
void printProtected();
void draw();
virtual void draw();
// Data Member
int colors;

View File

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

View File

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

View File

@ -53,7 +53,7 @@ class Treeview : public finalcut::FDialog
Treeview& operator = (const Treeview&);
// Methods
void adjustSize();
virtual void adjustSize();
TreeItem* getAfrica();
TreeItem* getAsia();
TreeItem* getEurope();

View File

@ -50,8 +50,8 @@ class ProgressDialog : public finalcut::FDialog
ProgressDialog& operator = (const ProgressDialog&);
// Event handlers
void onShow (finalcut::FShowEvent*);
void onTimer (finalcut::FTimerEvent*);
virtual void onShow (finalcut::FShowEvent*);
virtual void onTimer (finalcut::FTimerEvent*);
// Callback methods
void cb_reset_bar (finalcut::FWidget*, data_ptr);
@ -208,7 +208,7 @@ class TextWindow : public finalcut::FDialog
TextWindow& operator = (const TextWindow&);
// Method
void adjustSize();
virtual void adjustSize();
// Data Members
finalcut::FTextView* scrollText;
@ -289,10 +289,10 @@ class MyDialog : public finalcut::FDialog
void initButtons();
void initLabels();
void initWidgetsCallbacks();
void adjustSize();
virtual void adjustSize();
// Event handlers
void onClose (finalcut::FCloseEvent*);
virtual void onClose (finalcut::FCloseEvent*);
// Callback methods
void cb_noFunctionMsg (finalcut::FWidget*, data_ptr);

View File

@ -44,8 +44,8 @@ class Watch : public finalcut::FDialog
void printTime();
// Event handlers
void onTimer (finalcut::FTimerEvent*);
void onClose (finalcut::FCloseEvent*);
virtual void onTimer (finalcut::FTimerEvent*);
virtual void onClose (finalcut::FCloseEvent*);
// Callback methods
void cb_clock (finalcut::FWidget*, data_ptr);
@ -53,7 +53,7 @@ class Watch : public finalcut::FDialog
protected:
// Method
void adjustSize();
virtual void adjustSize();
private:
// Disable copy constructor

View File

@ -48,11 +48,11 @@ class SmallWindow : public finalcut::FDialog
SmallWindow& operator = (const SmallWindow&);
// Method
void adjustSize();
virtual void adjustSize();
// Event handlers
void onShow (finalcut::FShowEvent*);
void onTimer (finalcut::FTimerEvent*);
virtual void onShow (finalcut::FShowEvent*);
virtual void onTimer (finalcut::FTimerEvent*);
// Data Members
finalcut::FLabel* left_arrow;
@ -201,12 +201,12 @@ class Window : public finalcut::FDialog
void createFileMenuItems (finalcut::FMenu*);
void createDialogButtons();
void activateWindow (finalcut::FDialog*);
void adjustSize();
virtual void adjustSize();
void addClickedCallback (finalcut::FWidget*, WindowCallback);
void addClickedCallback (finalcut::FWidget*, FAppCallback);
// Event handlers
void onClose (finalcut::FCloseEvent*);
virtual void onClose (finalcut::FCloseEvent*);
// Callback methods
void cb_createWindows (finalcut::FWidget*, data_ptr);

View File

@ -2,8 +2,8 @@
if [ $# -gt 0 ]
then
eval cppcheck --force --enable=all -I../include/ "$@"
eval cppcheck --force --enable=all -I../scr/include/ "$@"
else
eval cppcheck --force --enable=all -I../include/ ../src/ ../examples/
eval cppcheck --force --enable=all -I../src/include/ ../src/ ../examples/
fi

View File

@ -1150,11 +1150,11 @@ void FApplication::processResizeEvent()
}
//----------------------------------------------------------------------
int FApplication::processTimerEvent()
uInt FApplication::processTimerEvent()
{
FObject::TimerList::iterator iter, last;
timeval currentTime;
int activated = 0;
uInt activated = 0;
getCurrentTime (&currentTime);
@ -1219,7 +1219,7 @@ void FApplication::processCloseWidget()
//----------------------------------------------------------------------
bool FApplication::processNextEvent()
{
int num_events = 0;
uInt num_events = 0;
processKeyboardEvent();
processMouseEvent();

View File

@ -1554,9 +1554,9 @@ void FDialog::resizeMouseDown (mouseStates& ms)
// Click on the lower right resize corner
if ( isResizeable()
&& ( (ms.mouse_x == getWidth() && ms.mouse_y == getHeight())
|| (ms.mouse_x == getWidth() - 1 && ms.mouse_y == getHeight())
|| (ms.mouse_x == getWidth() && ms.mouse_y == getHeight() - 1) ) )
&& ( (ms.mouse_x == getWidth() && ms.mouse_y == getHeight() - 1)
|| ( (ms.mouse_x == getWidth() - 1
|| ms.mouse_x == getWidth()) && ms.mouse_y == getHeight()) ) )
{
resize_click_pos = ms.termPos;
FPoint lower_right_pos = getTermGeometry().getLowerRightPos();

View File

@ -288,9 +288,6 @@ FListViewIterator::FListViewIterator (FObjectIterator iter)
, position(0)
{ }
//----------------------------------------------------------------------
FListViewIterator::~FListViewIterator() // destructor
{ }
// FListViewIterator operators
//----------------------------------------------------------------------

View File

@ -53,6 +53,13 @@ FMenuBar::~FMenuBar() // destructor
// public methods of FMenuBar
//----------------------------------------------------------------------
void FMenuBar::resetMenu()
{
unselectItem();
drop_down = false;
}
//----------------------------------------------------------------------
void FMenuBar::hide()
{
@ -85,13 +92,6 @@ void FMenuBar::hide()
delete[] blank;
}
//----------------------------------------------------------------------
void FMenuBar::resetMenu()
{
unselectItem();
drop_down = false;
}
//----------------------------------------------------------------------
void FMenuBar::adjustSize()
{

View File

@ -57,6 +57,7 @@ FOptiMove::FOptiMove (int baud)
, F_clr_eol()
, automatic_left_margin(false)
, eat_nl_glitch(false)
, move_buf()
, char_duration(1)
, baudrate(baud)
, tabstop(0)
@ -830,7 +831,7 @@ inline int FOptiMove::horizontalMove (char hmove[], int from_x, int to_x)
// Move to fixed column position1
std::strncat ( hmove
, tparm(F_column_address.cap, to_x, 0, 0, 0, 0, 0, 0, 0, 0)
, BUF_SIZE - std::strlen(hmove) );
, BUF_SIZE - std::strlen(hmove) - 1);
hmove[BUF_SIZE - 1] = '\0';
htime = F_column_address.duration;
}
@ -853,7 +854,7 @@ inline void FOptiMove::rightMove ( char hmove[], int& htime
{
std::strncpy ( hmove
, tparm(F_parm_right_cursor.cap, num, 0, 0, 0, 0, 0, 0, 0, 0)
, BUF_SIZE );
, BUF_SIZE - 1);
hmove[BUF_SIZE - 1] = '\0';
htime = F_parm_right_cursor.duration;
}
@ -908,7 +909,7 @@ inline void FOptiMove::leftMove ( char hmove[], int& htime
{
std::strncpy ( hmove
, tparm(F_parm_left_cursor.cap, num, 0, 0, 0, 0, 0, 0, 0, 0)
, BUF_SIZE );
, BUF_SIZE - 1);
hmove[BUF_SIZE - 1] = '\0';
htime = F_parm_left_cursor.duration;
}
@ -973,7 +974,7 @@ inline bool FOptiMove::isMethod0Faster ( int& move_time
if ( move_xy )
{
char* move_ptr = move_buf;
std::strncpy (move_ptr, move_xy, BUF_SIZE);
std::strncpy (move_ptr, move_xy, BUF_SIZE - 1);
move_ptr[BUF_SIZE - 1] = '\0';
move_time = F_cursor_address.duration;
return true;
@ -1123,7 +1124,7 @@ void FOptiMove::moveByMethod ( int method
case 2:
if ( F_carriage_return.cap )
{
std::strncpy (move_ptr, F_carriage_return.cap, BUF_SIZE);
std::strncpy (move_ptr, F_carriage_return.cap, BUF_SIZE - 1);
move_ptr[BUF_SIZE - 1] ='\0';
move_ptr += F_carriage_return.length;
relativeMove (move_ptr, 0, yold, xnew, ynew);
@ -1131,14 +1132,14 @@ void FOptiMove::moveByMethod ( int method
break;
case 3:
std::strncpy (move_ptr, F_cursor_home.cap, BUF_SIZE);
std::strncpy (move_ptr, F_cursor_home.cap, BUF_SIZE - 1);
move_ptr[BUF_SIZE - 1] ='\0';
move_ptr += F_cursor_home.length;
relativeMove (move_ptr, 0, 0, xnew, ynew);
break;
case 4:
std::strncpy (move_ptr, F_cursor_to_ll.cap, BUF_SIZE);
std::strncpy (move_ptr, F_cursor_to_ll.cap, BUF_SIZE - 1);
move_ptr[BUF_SIZE - 1] ='\0';
move_ptr += F_cursor_to_ll.length;
relativeMove (move_ptr, 0, screen_height - 1, xnew, ynew);

View File

@ -453,9 +453,9 @@ char* FTerm::enableCursor()
char*& ve = TCAP(fc::t_cursor_normal);
if ( ve )
std::strncpy (enable_str, ve, SIZE);
std::strncpy (enable_str, ve, SIZE - 1);
else if ( vs )
std::strncpy (enable_str, vs, SIZE);
std::strncpy (enable_str, vs, SIZE - 1);
#if defined(__linux__)
if ( isLinuxTerm() )

View File

@ -89,11 +89,11 @@ class FApplication : public FWidget
virtual ~FApplication();
// Accessors
const char* getClassName() const;
int getArgc() const;
char** getArgv() const;
FWidget* getMainWidget() const;
FWidget* getFocusWidget() const;
const char* getClassName() const;
int getArgc() const;
char** getArgv() const;
FWidget* getMainWidget() const;
virtual FWidget* getFocusWidget() const;
// Mutator
void setMainWidget (FWidget*);
@ -175,7 +175,7 @@ class FApplication : public FWidget
void sendWheelEvent (const FPoint&, const FPoint&);
void processMouseEvent();
void processResizeEvent();
int processTimerEvent();
uInt processTimerEvent();
void processCloseWidget();
bool processNextEvent();

View File

@ -89,13 +89,13 @@ class FButton : public FWidget
bool setNoUnderline(bool);
bool setNoUnderline();
bool unsetNoUnderline();
bool setEnable(bool);
bool setEnable();
bool unsetEnable();
bool setDisable();
bool setFocus(bool);
bool setFocus();
bool unsetFocus();
virtual bool setEnable(bool);
virtual bool setEnable();
virtual bool unsetEnable();
virtual bool setDisable();
virtual bool setFocus(bool);
virtual bool setFocus();
virtual bool unsetFocus();
bool setFlat(bool);
bool setFlat();
bool unsetFlat();
@ -117,17 +117,17 @@ class FButton : public FWidget
bool hasClickAnimation();
// Methods
void hide();
virtual void hide();
// Event handlers
void onKeyPress (FKeyEvent*);
void onMouseDown (FMouseEvent*);
void onMouseUp (FMouseEvent*);
void onMouseMove (FMouseEvent*);
void onTimer (FTimerEvent*);
void onAccel (FAccelEvent*);
void onFocusIn (FFocusEvent*);
void onFocusOut (FFocusEvent*);
virtual void onKeyPress (FKeyEvent*);
virtual void onMouseDown (FMouseEvent*);
virtual void onMouseUp (FMouseEvent*);
virtual void onMouseMove (FMouseEvent*);
virtual void onTimer (FTimerEvent*);
virtual void onAccel (FAccelEvent*);
virtual void onFocusIn (FFocusEvent*);
virtual void onFocusOut (FFocusEvent*);
private:
// Disable copy constructor
@ -149,7 +149,7 @@ class FButton : public FWidget
void drawMarginRight();
void drawTopBottomBackground();
void drawButtonTextLine (wchar_t[]);
void draw();
virtual void draw();
void updateStatusBar();
void updateButtonColor();
void processClick();

View File

@ -87,10 +87,10 @@ class FButtonGroup : public FScrollView
FString& getText();
// Mutator
bool setEnable(bool);
bool setEnable();
bool unsetEnable();
bool setDisable();
virtual bool setEnable(bool);
virtual bool setEnable();
virtual bool unsetEnable();
virtual bool setDisable();
void setText (const FString&);
// Inquiries
@ -99,16 +99,16 @@ class FButtonGroup : public FScrollView
bool hasCheckedButton() const;
// Methods
void hide();
virtual void hide();
void insert (FToggleButton*);
void remove (FToggleButton*);
void checkScrollSize (FToggleButton*);
void checkScrollSize (const FRect&);
// Event handlers
void onMouseDown (FMouseEvent*);
void onAccel (FAccelEvent*);
void onFocusIn (FFocusEvent*);
virtual void onMouseDown (FMouseEvent*);
virtual void onAccel (FAccelEvent*);
virtual void onFocusIn (FFocusEvent*);
// Callback method
void cb_buttonToggled (FWidget*, data_ptr);

View File

@ -90,9 +90,9 @@ class FCheckBox : public FToggleButton
FCheckBox& operator = (const FCheckBox&);
// Methods
void init();
void draw();
void drawCheckButton();
void init();
virtual void draw();
void drawCheckButton();
};
#pragma pack(pop)

View File

@ -104,7 +104,7 @@ class FDialog : public FWindow
bool setModal (bool);
bool setModal();
bool unsetModal();
bool setResizeable (bool);
virtual bool setResizeable (bool);
bool setScrollable (bool);
bool setScrollable();
bool unsetScrollable();
@ -115,16 +115,16 @@ class FDialog : public FWindow
bool isScrollable();
// Methods
void show();
void hide();
virtual void show();
virtual void hide();
int exec();
void setPos (int, int, bool = true);
void move (int, int);
virtual void setPos (int, int, bool = true);
virtual void move (int, int);
bool moveUp (int);
bool moveDown (int);
bool moveLeft (int);
bool moveRight (int);
void setSize (int, int, bool = true);
virtual void setSize (int, int, bool = true);
bool reduceHeight (int);
bool expandHeight (int);
bool reduceWidth (int);
@ -132,16 +132,16 @@ class FDialog : public FWindow
void activateDialog();
// Event handlers
void onKeyPress (FKeyEvent*);
void onMouseDown (FMouseEvent*);
void onMouseUp (FMouseEvent*);
void onMouseMove (FMouseEvent*);
void onMouseDoubleClick (FMouseEvent*);
void onAccel (FAccelEvent*);
void onWindowActive (FEvent*);
void onWindowInactive (FEvent*);
void onWindowRaised (FEvent*);
void onWindowLowered (FEvent*);
virtual void onKeyPress (FKeyEvent*);
virtual void onMouseDown (FMouseEvent*);
virtual void onMouseUp (FMouseEvent*);
virtual void onMouseMove (FMouseEvent*);
virtual void onMouseDoubleClick (FMouseEvent*);
virtual void onAccel (FAccelEvent*);
virtual void onWindowActive (FEvent*);
virtual void onWindowInactive (FEvent*);
virtual void onWindowRaised (FEvent*);
virtual void onWindowLowered (FEvent*);
protected:
// Methods

View File

@ -109,7 +109,7 @@ class FFileDialog : public FDialog
, DialogType = FFileDialog::Open
, FWidget* = 0 );
// Destructor
~FFileDialog();
virtual ~FFileDialog();
// Assignment operator (=)
FFileDialog& operator = (const FFileDialog&);
@ -129,7 +129,7 @@ class FFileDialog : public FDialog
bool unsetShowHiddenFiles();
// Event handler
void onKeyPress (FKeyEvent*);
virtual void onKeyPress (FKeyEvent*);
// Methods
static const FString fileOpenChooser ( FWidget*
@ -141,7 +141,7 @@ class FFileDialog : public FDialog
protected:
// Method
void adjustSize();
virtual void adjustSize();
private:
// Typedef
@ -166,7 +166,7 @@ class FFileDialog : public FDialog
void allocation (int, int);
void deallocation();
void initCallbacks();
inline bool pattern_match (const char* const, char[]);
bool pattern_match (const char* const, char[]);
void clear();
int numOfDirs();
void sortDir();

View File

@ -107,7 +107,7 @@ class FLabel : public FWidget
bool setReverseMode(bool);
bool setReverseMode();
bool unsetReverseMode();
bool setEnable (bool);
virtual bool setEnable (bool);
void setNumber (uLong);
void setNumber (long);
void setNumber (float, int = FLT_DIG);
@ -120,12 +120,12 @@ class FLabel : public FWidget
bool hasReverseMode();
// Methods
void hide();
virtual void hide();
void clear();
// Event handlers
void onMouseDown (FMouseEvent*);
void onAccel (FAccelEvent*);
virtual void onMouseDown (FMouseEvent*);
virtual void onAccel (FAccelEvent*);
// Callback method
void cb_accel_widget_destroyed (FWidget*, data_ptr);
@ -143,7 +143,7 @@ class FLabel : public FWidget
int getHotkeyPos (wchar_t[], wchar_t[], uInt);
void setHotkeyAccelerator();
int getAlignOffset (int);
void draw();
virtual void draw();
void drawMultiLine();
void drawSingleLine();
void printLine (wchar_t[], uInt, int, int = 0);

View File

@ -96,46 +96,46 @@ class FLineEdit : public FWidget
const FLineEdit& operator >> (FString&);
// Accessors
const char* getClassName() const;
FString getText() const;
int getLabelOrientation();
const char* getClassName() const;
FString getText() const;
int getLabelOrientation();
// Mutators
void setText (const FString&);
void setLabelText (const FString&);
void setLabelOrientation(const label_o);
bool setEnable(bool);
bool setEnable();
bool unsetEnable();
bool setDisable();
bool setFocus(bool);
bool setFocus();
bool unsetFocus();
bool setShadow(bool);
bool setShadow();
bool unsetShadow();
void setText (const FString&);
void setLabelText (const FString&);
void setLabelOrientation(const label_o);
virtual bool setEnable(bool);
virtual bool setEnable();
virtual bool unsetEnable();
virtual bool setDisable();
virtual bool setFocus(bool);
virtual bool setFocus();
virtual bool unsetFocus();
bool setShadow(bool);
bool setShadow();
bool unsetShadow();
// Inquiry
bool hasShadow();
bool hasShadow();
// Methods
void hide();
void clear();
virtual void hide();
void clear();
// Event handlers
void onKeyPress (FKeyEvent*);
void onMouseDown (FMouseEvent*);
void onMouseUp (FMouseEvent*);
void onMouseMove (FMouseEvent*);
void onTimer (FTimerEvent*);
void onAccel (FAccelEvent*);
void onHide (FHideEvent*);
void onFocusIn (FFocusEvent*);
void onFocusOut (FFocusEvent*);
virtual void onKeyPress (FKeyEvent*);
virtual void onMouseDown (FMouseEvent*);
virtual void onMouseUp (FMouseEvent*);
virtual void onMouseMove (FMouseEvent*);
virtual void onTimer (FTimerEvent*);
virtual void onAccel (FAccelEvent*);
virtual void onHide (FHideEvent*);
virtual void onFocusIn (FFocusEvent*);
virtual void onFocusOut (FFocusEvent*);
protected:
void adjustLabel();
void adjustSize();
void adjustLabel();
virtual void adjustSize();
private:
// Enumeration
@ -153,33 +153,33 @@ class FLineEdit : public FWidget
FLineEdit& operator = (const FLineEdit&);
// Methods
void init();
bool hasHotkey();
void draw();
void drawInputField();
void keyLeft();
void keyRight();
void keyHome();
void keyEnd();
void keyDel();
void keyBackspace();
void keyInsert();
void keyEnter();
bool keyInput (int);
void processActivate();
void processChanged();
void init();
bool hasHotkey();
virtual void draw();
void drawInputField();
void keyLeft();
void keyRight();
void keyHome();
void keyEnd();
void keyDel();
void keyBackspace();
void keyInsert();
void keyEnter();
bool keyInput (int);
void processActivate();
void processChanged();
// Data Members
FString text;
FString label_text;
FLabel* label;
label_o label_orientation;
dragScroll drag_scroll;
bool scroll_timer;
int scroll_repeat;
bool insert_mode;
int cursor_pos;
int text_offset;
FString text;
FString label_text;
FLabel* label;
label_o label_orientation;
dragScroll drag_scroll;
bool scroll_timer;
int scroll_repeat;
bool insert_mode;
int cursor_pos;
int text_offset;
};
#pragma pack(pop)

View File

@ -153,7 +153,7 @@ class FListBox : public FWidget
FListBox (Container, LazyConverter, FWidget* = 0);
// Destructor
~FListBox();
virtual ~FListBox();
// Accessors
const char* getClassName() const;
@ -173,14 +173,14 @@ class FListBox : public FWidget
void showInsideBrackets (int, fc::brackets_type);
void showNoBrackets (int);
void showNoBrackets (listBoxItems::iterator);
void setGeometry (int, int, int, int, bool = true);
virtual void setGeometry (int, int, int, int, bool = true);
void setMultiSelection (bool);
void setMultiSelection ();
void unsetMultiSelection ();
bool setDisable();
bool setFocus (bool);
bool setFocus();
bool unsetFocus();
virtual bool setDisable();
virtual bool setFocus (bool);
virtual bool setFocus();
virtual bool unsetFocus();
void setText (const FString&);
// Inquiries
@ -191,7 +191,7 @@ class FListBox : public FWidget
bool hasBrackets (listBoxItems::iterator) const;
// Methods
void hide();
virtual void hide();
template <class Iterator, class InsertConverter>
void insert (Iterator, Iterator, InsertConverter);
template <class Container, class LazyConverter>
@ -209,21 +209,20 @@ class FListBox : public FWidget
void clear();
// Event handlers
void onKeyPress (FKeyEvent*);
void onMouseDown (FMouseEvent*);
void onMouseUp (FMouseEvent*);
void onMouseMove (FMouseEvent*);
void onMouseDoubleClick (FMouseEvent*);
void onWheel (FWheelEvent*);
void onTimer (FTimerEvent*);
void onFocusIn (FFocusEvent*);
void onFocusOut (FFocusEvent*);
virtual void onKeyPress (FKeyEvent*);
virtual void onMouseDown (FMouseEvent*);
virtual void onMouseUp (FMouseEvent*);
virtual void onMouseMove (FMouseEvent*);
virtual void onMouseDoubleClick (FMouseEvent*);
virtual void onWheel (FWheelEvent*);
virtual void onTimer (FTimerEvent*);
virtual void onFocusIn (FFocusEvent*);
virtual void onFocusOut (FFocusEvent*);
protected:
// Methods
void adjustYOffset();
void adjustSize();
void adjustYOffset();
virtual void adjustSize();
private:
// Enumeration
@ -244,53 +243,53 @@ class FListBox : public FWidget
static FString& getString (listBoxItems::iterator);
// Methods
void init();
void draw();
void drawLabel();
void drawList();
void drawListLine (int, listBoxItems::iterator, bool);
void printLeftBracket (fc::brackets_type);
void printRightBracket (fc::brackets_type);
void drawListBracketsLine (int, listBoxItems::iterator, bool);
void setLineAttributes (int, bool, bool, bool&);
void unsetAttributes();
void updateDrawing (bool, bool);
void recalculateHorizontalBar (int, bool);
void recalculateVerticalBar (int);
void getWidgetFocus();
void multiSelection (int);
void multiSelectionUpTo (int);
void wheelUp (int);
void wheelDown (int);
bool dragScrollUp();
bool dragScrollDown();
void dragUp (int);
void dragDown (int);
void stopDragScroll();
void prevListItem (int);
void nextListItem (int);
void scrollToX (int);
void scrollToY (int);
void scrollLeft (int);
void scrollRight (int);
void keyUp();
void keyDown();
void keyLeft();
void keyRight();
void keyPgUp();
void keyPgDn();
void keyHome();
void keyEnd();
bool keyEsc();
void keyEnter();
bool keySpace();
bool keyInsert();
bool keyBackspace();
bool keyIncSearchInput (int);
void processClick();
void processSelect();
void processChanged();
void lazyConvert (listBoxItems::iterator, int);
void init();
virtual void draw();
void drawLabel();
void drawList();
void drawListLine (int, listBoxItems::iterator, bool);
void printLeftBracket (fc::brackets_type);
void printRightBracket (fc::brackets_type);
void drawListBracketsLine (int, listBoxItems::iterator, bool);
void setLineAttributes (int, bool, bool, bool&);
void unsetAttributes();
void updateDrawing (bool, bool);
void recalculateHorizontalBar (int, bool);
void recalculateVerticalBar (int);
void getWidgetFocus();
void multiSelection (int);
void multiSelectionUpTo (int);
void wheelUp (int);
void wheelDown (int);
bool dragScrollUp();
bool dragScrollDown();
void dragUp (int);
void dragDown (int);
void stopDragScroll();
void prevListItem (int);
void nextListItem (int);
void scrollToX (int);
void scrollToY (int);
void scrollLeft (int);
void scrollRight (int);
void keyUp();
void keyDown();
void keyLeft();
void keyRight();
void keyPgUp();
void keyPgDn();
void keyHome();
void keyEnd();
bool keyEsc();
void keyEnter();
bool keySpace();
bool keyInsert();
bool keyBackspace();
bool keyIncSearchInput (int);
void processClick();
void processSelect();
void processChanged();
void lazyConvert (listBoxItems::iterator, int);
listBoxItems::iterator index2iterator (int);
// Callback methods
@ -298,9 +297,9 @@ class FListBox : public FWidget
void cb_HBarChange (FWidget*, data_ptr);
// Function Pointer
void (*convertToItem) ( FListBoxItem&
, FWidget::data_ptr
, int index );
void (*convertToItem) ( FListBoxItem&
, FWidget::data_ptr
, int index );
// Data Members
listBoxItems itemlist;

View File

@ -84,7 +84,7 @@ class FListViewItem : public FObject
, FObjectIterator );
// Destructor
~FListViewItem();
virtual ~FListViewItem();
// Assignment operator (=)
FListViewItem& operator = (const FListViewItem&);
@ -98,7 +98,6 @@ class FListViewItem : public FObject
// Mutator
void setText (int, const FString&);
// Inquiry
bool isExpand() const;
@ -166,12 +165,9 @@ class FListViewIterator
typedef std::stack<FObjectIterator> FObjectIteratorStack;
// Constructor
FListViewIterator ();
explicit FListViewIterator ();
FListViewIterator (FObjectIterator);
// Destructor
~FListViewIterator();
// Overloaded operators
FListViewIterator& operator ++ (); // prefix
FListViewIterator operator ++ (int); // postfix
@ -246,7 +242,7 @@ class FListView : public FWidget
explicit FListView (FWidget* = 0);
// Destructor
~FListView();
virtual ~FListView();
// Accessors
const char* getClassName() const;
@ -256,7 +252,7 @@ class FListView : public FWidget
FListViewItem* getCurrentItem();
// Mutators
void setGeometry (int, int, int, int, bool = true);
virtual void setGeometry (int, int, int, int, bool = true);
void setColumnAlignment (int, fc::text_alignment);
void setColumnText (int, const FString&);
bool setTreeView (bool);
@ -285,15 +281,15 @@ class FListView : public FWidget
FObjectIterator endOfList();
// Event handlers
void onKeyPress (FKeyEvent*);
void onMouseDown (FMouseEvent*);
void onMouseUp (FMouseEvent*);
void onMouseMove (FMouseEvent*);
void onMouseDoubleClick (FMouseEvent*);
void onWheel (FWheelEvent*);
void onTimer (FTimerEvent*);
void onFocusIn (FFocusEvent*);
void onFocusOut (FFocusEvent*);
virtual void onKeyPress (FKeyEvent*);
virtual void onMouseDown (FMouseEvent*);
virtual void onMouseUp (FMouseEvent*);
virtual void onMouseMove (FMouseEvent*);
virtual void onMouseDoubleClick (FMouseEvent*);
virtual void onWheel (FWheelEvent*);
virtual void onTimer (FTimerEvent*);
virtual void onFocusIn (FFocusEvent*);
virtual void onFocusOut (FFocusEvent*);
// Data Members
static FObjectIterator null_iter;
@ -301,7 +297,7 @@ class FListView : public FWidget
protected:
// Methods
void adjustViewport();
void adjustSize();
virtual void adjustSize();
private:
// Typedef
@ -320,7 +316,7 @@ class FListView : public FWidget
// Methods
void init();
uInt getAlignOffset (fc::text_alignment, uInt, uInt);
void draw();
virtual void draw();
void drawColumnLabels();
void drawList();
void drawListLine (const FListViewItem*, bool, bool);
@ -399,16 +395,13 @@ class FListView : public FWidget
struct FListView::Header
{
public:
Header()
explicit Header()
: name()
, width (0)
, fixed_width (false)
, alignment (fc::alignLeft)
{ }
~Header()
{ }
FString name;
int width;
bool fixed_width;

View File

@ -90,16 +90,16 @@ class FMenu : public FWindow, public FMenuList
FMenuItem* getItem() const;
// Mutators
bool setEnable(bool);
bool setEnable();
bool unsetEnable();
bool setDisable();
virtual bool setEnable(bool);
virtual bool setEnable();
virtual bool unsetEnable();
virtual bool setDisable();
void setSelected();
void unsetSelected();
bool setMenuWidget (bool);
bool setMenuWidget();
bool unsetMenuWidget();
void setStatusbarMessage (const FString&);
virtual void setStatusbarMessage (const FString&);
void setMenu (FMenu*);
void setText (const FString&);
@ -110,15 +110,15 @@ class FMenu : public FWindow, public FMenuList
bool hasMenu() const;
// Methods
void show();
void hide();
virtual void show();
virtual void hide();
// Event handlers
void onKeyPress (FKeyEvent*);
void onMouseDown (FMouseEvent*);
void onMouseUp (FMouseEvent*);
void onMouseMove (FMouseEvent*);
void onAccel (FAccelEvent*);
virtual void onKeyPress (FKeyEvent*);
virtual void onMouseDown (FMouseEvent*);
virtual void onMouseUp (FMouseEvent*);
virtual void onMouseMove (FMouseEvent*);
virtual void onAccel (FAccelEvent*);
// Callback method
void cb_menuitem_toggled (FWidget*, data_ptr);
@ -200,7 +200,7 @@ class FMenu : public FWindow, public FMenuList
void keypressMenuBar (FKeyEvent*);
bool hotkeyMenu (FKeyEvent*);
int getHotkeyPos (wchar_t[], wchar_t[], uInt);
void draw();
virtual void draw();
void drawItems();
void drawSeparator (int);
void drawMenuLine (FMenuItem*, int);

View File

@ -86,19 +86,19 @@ class FMenuBar : public FWindow, public FMenuList
virtual const char* getClassName() const;
// Methods
void hide();
void resetMenu();
void adjustSize();
void resetMenu();
virtual void hide();
virtual void adjustSize();
// Event handlers
void onKeyPress (FKeyEvent*);
void onMouseDown (FMouseEvent*);
void onMouseUp (FMouseEvent*);
void onMouseMove (FMouseEvent*);
void onAccel (FAccelEvent*);
virtual void onKeyPress (FKeyEvent*);
virtual void onMouseDown (FMouseEvent*);
virtual void onMouseUp (FMouseEvent*);
virtual void onMouseMove (FMouseEvent*);
virtual void onAccel (FAccelEvent*);
// Callback methods
void cb_item_deactivated (FWidget*, data_ptr);
void cb_item_deactivated (FWidget*, data_ptr);
private:
// Typedef
@ -115,46 +115,46 @@ class FMenuBar : public FWindow, public FMenuList
FMenuBar (const FMenuBar&);
// Disable assignment operator (=)
FMenuBar& operator = (const FMenuBar&);
FMenuBar& operator = (const FMenuBar&);
// Inquiry
bool isMenu (FMenuItem*) const;
bool isMenu (FMenuItem*) const;
// Methods
void init();
void calculateDimensions();
bool selectNextItem();
bool selectPrevItem();
bool hotkeyMenu (FKeyEvent*&);
int getHotkeyPos (wchar_t[], wchar_t[], uInt);
void draw();
void drawItems();
void drawItem (FMenuItem*, int&);
void setLineAttributes (FMenuItem*);
void drawMenuText (menuText&);
void drawEllipsis (menuText&, int);
void drawLeadingSpace (int&);
void drawTrailingSpace (int&);
void adjustItems();
bool activateMenu (FMenuItem*);
bool clickItem (FMenuItem*);
void unselectMenuItem (FMenuItem*);
void selectMenuItem (FMenuItem*);
void mouseDownOverList (FMouseEvent*);
void mouseUpOverList (FMouseEvent*);
void mouseMoveOverList (FMouseEvent*);
void passEventToMenu (FMouseEvent*&);
void leaveMenuBar();
void init();
void calculateDimensions();
bool selectNextItem();
bool selectPrevItem();
bool hotkeyMenu (FKeyEvent*&);
int getHotkeyPos (wchar_t[], wchar_t[], uInt);
virtual void draw();
void drawItems();
void drawItem (FMenuItem*, int&);
void setLineAttributes (FMenuItem*);
void drawMenuText (menuText&);
void drawEllipsis (menuText&, int);
void drawLeadingSpace (int&);
void drawTrailingSpace (int&);
void adjustItems();
bool activateMenu (FMenuItem*);
bool clickItem (FMenuItem*);
void unselectMenuItem (FMenuItem*);
void selectMenuItem (FMenuItem*);
void mouseDownOverList (FMouseEvent*);
void mouseUpOverList (FMouseEvent*);
void mouseMoveOverList (FMouseEvent*);
void passEventToMenu (FMouseEvent*&);
void leaveMenuBar();
// Friend classes
friend class FMenu;
friend class FMenuItem;
// Data Members
bool mouse_down;
bool drop_down;
bool focus_changed;
int screenWidth;
bool mouse_down;
bool drop_down;
bool focus_changed;
int screenWidth;
};
#pragma pack(pop)

View File

@ -90,74 +90,74 @@ class FMenuItem : public FWidget
virtual ~FMenuItem();
// Accessors
const char* getClassName() const;
int getHotkey() const;
FMenu* getMenu() const;
uInt getTextLength() const;
FString getText() const;
const char* getClassName() const;
int getHotkey() const;
FMenu* getMenu() const;
uInt getTextLength() const;
FString getText() const;
// Mutators
bool setEnable (bool);
bool setFocus (bool);
bool setFocus();
bool unsetFocus();
void setSelected();
void unsetSelected();
void setSeparator();
void unsetSeparator();
void setChecked();
void unsetChecked();
void setMenu (FMenu*);
void setText (const FString&);
virtual bool setEnable (bool);
virtual bool setFocus (bool);
virtual bool setFocus();
virtual bool unsetFocus();
void setSelected();
void unsetSelected();
void setSeparator();
void unsetSeparator();
void setChecked();
void unsetChecked();
void setMenu (FMenu*);
void setText (const FString&);
// Inquiries
bool isSelected() const;
bool isSeparator() const;
bool isChecked() const;
bool hasHotkey() const;
bool hasMenu() const;
bool isSelected() const;
bool isSeparator() const;
bool isChecked() const;
bool hasHotkey() const;
bool hasMenu() const;
// Methods
void addAccelerator (int, FWidget*);
void delAccelerator (FWidget*);
void openMenu();
virtual void addAccelerator (int, FWidget*);
virtual void delAccelerator (FWidget*);
void openMenu();
// Event handlers
void onKeyPress (FKeyEvent*);
void onMouseDoubleClick (FMouseEvent*);
void onMouseDown (FMouseEvent*);
void onMouseUp (FMouseEvent*);
void onMouseMove (FMouseEvent*);
void onAccel (FAccelEvent*);
void onFocusIn (FFocusEvent*);
void onFocusOut (FFocusEvent*);
virtual void onKeyPress (FKeyEvent*);
virtual void onMouseDoubleClick (FMouseEvent*);
virtual void onMouseDown (FMouseEvent*);
virtual void onMouseUp (FMouseEvent*);
virtual void onMouseMove (FMouseEvent*);
virtual void onAccel (FAccelEvent*);
virtual void onFocusIn (FFocusEvent*);
virtual void onFocusOut (FFocusEvent*);
protected:
// Accessor
FWidget* getSuperMenu() const;
FWidget* getSuperMenu() const;
// Mutator
void setSuperMenu (FWidget*);
void setSuperMenu (FWidget*);
// Inquiries
bool isWindowsMenu (FWidget*) const;
bool isMenuBar (FWidget*) const;
bool isMenu (FWidget*) const;
bool isWindowsMenu (FWidget*) const;
bool isMenuBar (FWidget*) const;
bool isMenu (FWidget*) const;
// Data Members
FString text;
bool selected;
bool separator;
bool checkable;
bool checked;
bool radio_button;
bool dialog_index;
uInt text_length;
int hotkey;
int accel_key;
FMenu* menu;
FWidget* super_menu;
FDialog* associated_window;
FString text;
bool selected;
bool separator;
bool checkable;
bool checked;
bool radio_button;
bool dialog_index;
uInt text_length;
int hotkey;
int accel_key;
FMenu* menu;
FWidget* super_menu;
FDialog* associated_window;
private:
// Disable copy constructor
@ -167,17 +167,17 @@ class FMenuItem : public FWidget
FMenuItem& operator = (const FMenuItem&);
// Methods
void init (FWidget*);
uChar hotKey();
void processActivate();
void processDeactivate();
void createDialogList (FMenu*);
void init (FWidget*);
uChar hotKey();
void processActivate();
void processDeactivate();
void createDialogList (FMenu*);
template<class T>
void passMouseEvent (T, FMouseEvent*, fc::events);
void passMouseEvent (T, FMouseEvent*, fc::events);
// Callback methods
void cb_switchToDialog (FWidget*, data_ptr);
void cb_destroyDialog (FWidget*, data_ptr);
void cb_switchToDialog (FWidget*, data_ptr);
void cb_destroyDialog (FWidget*, data_ptr);
virtual void processClicked();

View File

@ -101,7 +101,7 @@ class FMessageBox : public FDialog
, int, int, int
, FWidget* = 0 );
// Destructor
~FMessageBox();
virtual ~FMessageBox();
// Assignment operator (=)
FMessageBox& operator = (const FMessageBox&);
@ -142,7 +142,7 @@ class FMessageBox : public FDialog
, int = 0 );
protected:
// Method
void adjustSize();
virtual void adjustSize();
// Callback method
void cb_processClick (FWidget*, data_ptr);

View File

@ -159,7 +159,7 @@ class FOptiAttr
explicit FOptiAttr();
// Destructor
~FOptiAttr();
virtual ~FOptiAttr();
// Friend operator functions
friend bool operator == (const charData&, const charData&);

View File

@ -110,7 +110,7 @@ class FOptiMove
explicit FOptiMove (int = 0);
// Destructor
~FOptiMove();
virtual ~FOptiMove();
// Accessors
const char* getClassName() const;

View File

@ -82,7 +82,7 @@ class FProgressbar : public FWidget
// Mutators
void setPercentage (int);
void setGeometry (int, int, int, int, bool = true);
virtual void setGeometry (int, int, int, int, bool = true);
bool setShadow (bool);
bool setShadow();
bool unsetShadow();
@ -91,7 +91,7 @@ class FProgressbar : public FWidget
bool hasShadow();
// Methods
void hide();
virtual void hide();
void reset();
private:

View File

@ -90,9 +90,9 @@ class FRadioButton : public FToggleButton
FRadioButton& operator = (const FRadioButton&);
// Methods
void init();
void draw();
void drawRadioButton();
void init();
virtual void draw();
void drawRadioButton();
};
#pragma pack(pop)

View File

@ -91,34 +91,34 @@ class FScrollbar : public FWidget
virtual ~FScrollbar();
// Accessors
const char* getClassName() const;
int getValue() const;
sType getScrollType() const;
const char* getClassName() const;
int getValue() const;
sType getScrollType() const;
// Mutators
void setMinimum (int);
void setMaximum (int);
void setRange (int, int);
void setValue (int);
void setSteps (double);
void setPageSize (int, int);
void setOrientation (int);
void setGeometry (int, int, int, int, bool = true);
void setMinimum (int);
void setMaximum (int);
void setRange (int, int);
void setValue (int);
void setSteps (double);
void setPageSize (int, int);
void setOrientation (int);
virtual void setGeometry (int, int, int, int, bool = true);
// Methods
void resize();
void redraw();
void calculateSliderValues();
void drawVerticalBar();
void drawHorizontalBar();
void drawBar();
virtual void resize();
virtual void redraw();
void calculateSliderValues();
void drawVerticalBar();
void drawHorizontalBar();
void drawBar();
// Event handlers
void onMouseDown (FMouseEvent*);
void onMouseUp (FMouseEvent*);
void onMouseMove (FMouseEvent*);
void onWheel (FWheelEvent*);
void onTimer (FTimerEvent*);
virtual void onMouseDown (FMouseEvent*);
virtual void onMouseUp (FMouseEvent*);
virtual void onMouseMove (FMouseEvent*);
virtual void onWheel (FWheelEvent*);
virtual void onTimer (FTimerEvent*);
private:
// Disable copy constructor
@ -128,37 +128,37 @@ class FScrollbar : public FWidget
FScrollbar& operator = (const FScrollbar&);
// Methods
void init();
void draw();
void drawButtons();
sType getClickedScrollType (int, int);
sType getVerticalClickedScrollType (int);
sType getHorizontalClickedScrollType (int);
int getSliderClickPos (int, int);
void jumpToClickPos (int, int);
void jumpToClickPos (int);
void avoidScrollOvershoot();
void processScroll();
void init();
virtual void draw();
void drawButtons();
sType getClickedScrollType (int, int);
sType getVerticalClickedScrollType (int);
sType getHorizontalClickedScrollType (int);
int getSliderClickPos (int, int);
void jumpToClickPos (int, int);
void jumpToClickPos (int);
void avoidScrollOvershoot();
void processScroll();
// Data Members
sType scroll_type;
bool threshold_reached;
int threshold_time;
int repeat_time;
int slider_click_pos;
int slider_click_stop_pos;
int current_slider_pos;
int slider_pos;
int slider_length;
int bar_length;
int val;
int min;
int max;
double steps;
int pagesize;
int length;
int bar_orientation;
int max_color;
sType scroll_type;
bool threshold_reached;
int threshold_time;
int repeat_time;
int slider_click_pos;
int slider_click_stop_pos;
int current_slider_pos;
int slider_pos;
int slider_length;
int bar_length;
int val;
int min;
int max;
double steps;
int pagesize;
int length;
int bar_orientation;
int max_color;
};
#pragma pack(pop)

View File

@ -100,7 +100,7 @@ class FScrollView : public FWidget
virtual void setWidth (int, bool = true);
virtual void setHeight (int, bool = true);
virtual void setSize (int, int, bool = true);
void setGeometry (int, int, int, int, bool = true);
virtual void setGeometry (int, int, int, int, bool = true);
void setCursorPos (int, int);
void setPrintPos (int, int);
bool setViewportPrint (bool);
@ -126,11 +126,11 @@ class FScrollView : public FWidget
virtual void draw();
// Event handlers
void onKeyPress (FKeyEvent*);
void onWheel (FWheelEvent*);
void onFocusIn (FFocusEvent*);
void onChildFocusIn (FFocusEvent*);
void onChildFocusOut (FFocusEvent*);
virtual void onKeyPress (FKeyEvent*);
virtual void onWheel (FWheelEvent*);
virtual void onFocusIn (FFocusEvent*);
virtual void onChildFocusIn (FFocusEvent*);
virtual void onChildFocusOut (FFocusEvent*);
protected:
// Using-declaration
@ -140,7 +140,7 @@ class FScrollView : public FWidget
term_area* getPrintArea();
// Method
void adjustSize();
virtual void adjustSize();
void copy2area();
private:

View File

@ -103,7 +103,7 @@ class FStatusKey : public FWidget
bool hasMouseFocus() const;
// Event handler
void onAccel (FAccelEvent*);
virtual void onAccel (FAccelEvent*);
protected:
// Mutators
@ -218,19 +218,19 @@ class FStatusBar : public FWindow
bool hasActivatedKey();
// Methods
void hide();
virtual void hide();
void drawMessage();
void clearMessage();
void insert (FStatusKey*);
void remove (FStatusKey*);
void remove (int);
void clear();
void adjustSize();
virtual void adjustSize();
// Event handlers
void onMouseDown (FMouseEvent*);
void onMouseUp (FMouseEvent*);
void onMouseMove (FMouseEvent*);
virtual void onMouseDown (FMouseEvent*);
virtual void onMouseUp (FMouseEvent*);
virtual void onMouseMove (FMouseEvent*);
// Callback method
void cb_statuskey_activated (FWidget*, data_ptr);
@ -247,7 +247,7 @@ class FStatusBar : public FWindow
// Methods
void init();
void draw();
virtual void draw();
void drawKeys();
void drawKey (keyList::const_iterator);
void drawActiveKey (keyList::const_iterator);

View File

@ -80,15 +80,15 @@ class FSwitch : public FToggleButton
virtual ~FSwitch();
// Accessor
const char* getClassName() const;
const char* getClassName() const;
// Mutator
void setText (const FString&);
virtual void setText (const FString&);
// Event handlers
void onKeyPress (FKeyEvent*);
void onMouseDown (FMouseEvent*);
void onMouseUp (FMouseEvent*);
virtual void onKeyPress (FKeyEvent*);
virtual void onMouseDown (FMouseEvent*);
virtual void onMouseUp (FMouseEvent*);
private:
// Disable copy constructor
@ -98,14 +98,14 @@ class FSwitch : public FToggleButton
FSwitch& operator = (const FSwitch&);
// Methods
void draw();
void drawCheckButton();
void drawChecked();
void drawUnchecked();
virtual void draw();
void drawCheckButton();
void drawChecked();
void drawUnchecked();
// Data Members
int switch_offset_pos;
bool button_pressed;
int switch_offset_pos;
bool button_pressed;
};
#pragma pack(pop)

View File

@ -65,7 +65,7 @@ class FTermcap
{ }
// Destructor
~FTermcap()
virtual ~FTermcap()
{ }
// Accessors

View File

@ -57,7 +57,7 @@ class FTermcapQuirks
FTermcapQuirks();
// Destructor
~FTermcapQuirks();
virtual ~FTermcapQuirks();
// Accessor
const char* getClassName() const;

View File

@ -91,7 +91,7 @@ class FTermDetection
FTermDetection();
// Destructor
~FTermDetection();
virtual ~FTermDetection();
// Accessor
const char* getClassName() const;

View File

@ -66,7 +66,7 @@ class FTermFreeBSD
FTermFreeBSD();
// Destructor
~FTermFreeBSD();
virtual ~FTermFreeBSD();
// Accessors
const char* getClassName() const;

View File

@ -57,7 +57,7 @@ class FTermios
FTermios();
// Destructor
~FTermios();
virtual ~FTermios();
// Accessors
const char* getClassName() const;

View File

@ -73,7 +73,7 @@ class FTermLinux
FTermLinux();
// Destructor
~FTermLinux();
virtual ~FTermLinux();
// Accessors
const char* getClassName() const;

View File

@ -59,7 +59,7 @@ class FTermOpenBSD
FTermOpenBSD();
// Destructor
~FTermOpenBSD();
virtual ~FTermOpenBSD();
// Accessor
const char* getClassName() const;

View File

@ -57,7 +57,7 @@ class FTermXTerminal
FTermXTerminal();
// Destructor
~FTermXTerminal();
virtual ~FTermXTerminal();
// Mutators
static void setTermcapMap (FTermcap::tcap_map*);

View File

@ -80,7 +80,7 @@ class FTextView : public FWidget
explicit FTextView (FWidget* = 0);
// Destructor
~FTextView();
virtual ~FTextView();
// Accessors
const char* getClassName() const;
@ -90,7 +90,7 @@ class FTextView : public FWidget
const FStringList& getLines() const;
// Mutators
void setGeometry (int, int, int, int, bool = true);
virtual void setGeometry (int, int, int, int, bool = true);
void setText (const FString&);
void scrollToX (int);
void scrollToY (int);
@ -99,7 +99,7 @@ class FTextView : public FWidget
void scrollBy (int, int);
// Methods
void hide();
virtual void hide();
void append (const FString&);
void insert (const FString&, int);
void replaceRange (const FString&, int, int);
@ -108,17 +108,17 @@ class FTextView : public FWidget
void clear();
// Event handlers
void onKeyPress (FKeyEvent*);
void onMouseDown (FMouseEvent*);
void onMouseUp (FMouseEvent*);
void onMouseMove (FMouseEvent*);
void onWheel (FWheelEvent*);
void onFocusIn (FFocusEvent*);
void onFocusOut (FFocusEvent*);
virtual void onKeyPress (FKeyEvent*);
virtual void onMouseDown (FMouseEvent*);
virtual void onMouseUp (FMouseEvent*);
virtual void onMouseMove (FMouseEvent*);
virtual void onWheel (FWheelEvent*);
virtual void onFocusIn (FFocusEvent*);
virtual void onFocusOut (FFocusEvent*);
protected:
// Method
void adjustSize();
virtual void adjustSize();
private:
// Disable copy constructor
@ -133,7 +133,7 @@ class FTextView : public FWidget
// Methods
void init();
void draw();
virtual void draw();
void drawText();
void processChanged();
void drawHBar();

View File

@ -85,17 +85,17 @@ class FToggleButton : public FWidget
FString& getText();
// Mutators
void setGeometry (int, int, int, int, bool = true);
virtual void setGeometry (int, int, int, int, bool = true);
bool setNoUnderline (bool);
bool setNoUnderline();
bool unsetNoUnderline();
bool setEnable (bool);
bool setEnable();
bool unsetEnable();
bool setDisable();
bool setFocus (bool);
bool setFocus();
bool unsetFocus();
virtual bool setEnable (bool);
virtual bool setEnable();
virtual bool unsetEnable();
virtual bool setDisable();
virtual bool setFocus (bool);
virtual bool setFocus();
virtual bool unsetFocus();
bool setChecked (bool);
bool setChecked();
bool unsetChecked();
@ -105,15 +105,15 @@ class FToggleButton : public FWidget
bool isChecked();
// Methods
void hide();
virtual void hide();
// Event handlers
void onMouseDown (FMouseEvent*);
void onMouseUp (FMouseEvent*);
void onWheel (FWheelEvent*);
void onAccel (FAccelEvent*);
void onFocusIn (FFocusEvent*);
void onFocusOut (FFocusEvent*);
virtual void onMouseDown (FMouseEvent*);
virtual void onMouseUp (FMouseEvent*);
virtual void onWheel (FWheelEvent*);
virtual void onAccel (FAccelEvent*);
virtual void onFocusIn (FFocusEvent*);
virtual void onFocusOut (FFocusEvent*);
protected:
// Accessor

View File

@ -90,11 +90,11 @@ class FToolTip : public FWindow
// Methods
virtual void draw();
void show();
void hide();
virtual void show();
virtual void hide();
// Event handler
void onMouseDown (FMouseEvent*);
virtual void onMouseDown (FMouseEvent*);
private:
// Disable copy constructor

View File

@ -116,7 +116,7 @@ class FVTerm : public FTerm
explicit FVTerm (bool, bool = false);
// Destructor
~FVTerm();
virtual ~FVTerm();
// Overloaded operators
template<class type> FVTerm& operator << (const type&);

View File

@ -146,7 +146,7 @@ class FWidget : public FVTerm, public FObject
explicit FWidget (FWidget* = 0, bool = false);
// Destructor
~FWidget();
virtual ~FWidget();
// Accessors
const char* getClassName() const;
@ -349,7 +349,7 @@ class FWidget : public FVTerm, public FObject
virtual bool focusPrevChild(); // ...focus
// Event handlers
bool event (FEvent*);
virtual bool event (FEvent*);
virtual void onKeyPress (FKeyEvent*);
virtual void onKeyUp (FKeyEvent*);
virtual void onKeyDown (FKeyEvent*);
@ -860,7 +860,7 @@ inline FPoint FWidget::termToWidgetPos (const FPoint& tPos)
//----------------------------------------------------------------------
inline void FWidget::move (const FPoint& pos)
{ move( pos.getX(), pos.getY() ); }
{ move(pos.getX(), pos.getY()); }
//----------------------------------------------------------------------
inline void FWidget::drawBorder()

View File

@ -85,7 +85,7 @@ class FWindow : public FWidget
explicit FWindow (FWidget* = 0);
// Destructor
~FWindow ();
virtual ~FWindow ();
// Accessors
const char* getClassName() const;
@ -157,7 +157,7 @@ class FWindow : public FWidget
virtual void adjustSize();
// Event handlers
bool event (FEvent*);
virtual bool event (FEvent*);
virtual void onWindowActive (FEvent*);
virtual void onWindowInactive (FEvent*);
virtual void onWindowRaised (FEvent*);

View File

@ -442,6 +442,7 @@ FTermDetectionTest::FTermDetectionTest()
, fd_master(-1)
, fd_slave(-1)
, debug(false)
, buffer()
{
// Map shared memory
void* ptr = mmap ( NULL
@ -2086,14 +2087,10 @@ pid_t FTermDetectionTest::forkProcess()
// Initialize buffer with '\0'
std::fill_n (buffer, sizeof(buffer), '\0');
bool result = openMasterPTY();
if ( ! result )
if ( ! openMasterPTY() )
return -1;
result = openSlavePTY();
if ( ! result )
if ( ! openSlavePTY() )
return -1;
pid_t pid = fork(); // Create a child process
@ -2119,7 +2116,11 @@ pid_t FTermDetectionTest::forkProcess()
#endif
// Get current terminal settings
result = tcgetattr(fd_slave, &term_settings);
if ( tcgetattr(fd_slave, &term_settings) == -1 )
{
*shared_state = true;
return -1;
}
// Set raw mode on the slave side of the PTY
cfmakeraw (&term_settings);