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> 2018-09-20 Markus Gans <guru.mail@muenster.de>
* Added pkg-config file finalcut.pc * Added pkg-config file finalcut.pc
* The entire library source code is now encapsulated under * The entire library source code is now encapsulated under

View File

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

View File

@ -34,10 +34,12 @@ class Keyboard : public finalcut::FWidget
protected: protected:
// Event handlers // Event handlers
void onKeyPress (finalcut::FKeyEvent*); virtual void onKeyPress (finalcut::FKeyEvent*);
void onAccel (finalcut::FAccelEvent*); 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&); Listbox& operator = (const Listbox&);
// Event handlers // Event handlers
void onClose (finalcut::FCloseEvent*); virtual void onClose (finalcut::FCloseEvent*);
// Data Member // Data Member
std::list<double>* double_list; std::list<double>* double_list;

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -87,10 +87,10 @@ class FButtonGroup : public FScrollView
FString& getText(); FString& getText();
// Mutator // Mutator
bool setEnable(bool); virtual bool setEnable(bool);
bool setEnable(); virtual bool setEnable();
bool unsetEnable(); virtual bool unsetEnable();
bool setDisable(); virtual bool setDisable();
void setText (const FString&); void setText (const FString&);
// Inquiries // Inquiries
@ -99,16 +99,16 @@ class FButtonGroup : public FScrollView
bool hasCheckedButton() const; bool hasCheckedButton() const;
// Methods // Methods
void hide(); virtual void hide();
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
void onMouseDown (FMouseEvent*); virtual void onMouseDown (FMouseEvent*);
void onAccel (FAccelEvent*); virtual void onAccel (FAccelEvent*);
void onFocusIn (FFocusEvent*); virtual void onFocusIn (FFocusEvent*);
// Callback method // Callback method
void cb_buttonToggled (FWidget*, data_ptr); void cb_buttonToggled (FWidget*, data_ptr);

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -153,7 +153,7 @@ class FListBox : public FWidget
FListBox (Container, LazyConverter, FWidget* = 0); FListBox (Container, LazyConverter, FWidget* = 0);
// Destructor // Destructor
~FListBox(); virtual ~FListBox();
// Accessors // Accessors
const char* getClassName() const; const char* getClassName() const;
@ -173,14 +173,14 @@ class FListBox : public FWidget
void showInsideBrackets (int, fc::brackets_type); void showInsideBrackets (int, fc::brackets_type);
void showNoBrackets (int); void showNoBrackets (int);
void showNoBrackets (listBoxItems::iterator); 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 (bool);
void setMultiSelection (); void setMultiSelection ();
void unsetMultiSelection (); void unsetMultiSelection ();
bool setDisable(); virtual bool setDisable();
bool setFocus (bool); virtual bool setFocus (bool);
bool setFocus(); virtual bool setFocus();
bool unsetFocus(); virtual bool unsetFocus();
void setText (const FString&); void setText (const FString&);
// Inquiries // Inquiries
@ -191,7 +191,7 @@ class FListBox : public FWidget
bool hasBrackets (listBoxItems::iterator) const; bool hasBrackets (listBoxItems::iterator) const;
// Methods // Methods
void hide(); virtual void hide();
template <class Iterator, class InsertConverter> template <class Iterator, class InsertConverter>
void insert (Iterator, Iterator, InsertConverter); void insert (Iterator, Iterator, InsertConverter);
template <class Container, class LazyConverter> template <class Container, class LazyConverter>
@ -209,21 +209,20 @@ class FListBox : public FWidget
void clear(); void clear();
// Event handlers // Event handlers
void onKeyPress (FKeyEvent*); virtual void onKeyPress (FKeyEvent*);
void onMouseDown (FMouseEvent*); virtual void onMouseDown (FMouseEvent*);
void onMouseUp (FMouseEvent*); virtual void onMouseUp (FMouseEvent*);
void onMouseMove (FMouseEvent*); virtual void onMouseMove (FMouseEvent*);
void onMouseDoubleClick (FMouseEvent*); virtual void onMouseDoubleClick (FMouseEvent*);
void onWheel (FWheelEvent*); virtual void onWheel (FWheelEvent*);
void onTimer (FTimerEvent*); virtual void onTimer (FTimerEvent*);
void onFocusIn (FFocusEvent*); virtual void onFocusIn (FFocusEvent*);
void onFocusOut (FFocusEvent*); virtual void onFocusOut (FFocusEvent*);
protected: protected:
// Methods // Methods
void adjustYOffset(); void adjustYOffset();
void adjustSize(); virtual void adjustSize();
private: private:
// Enumeration // Enumeration
@ -244,53 +243,53 @@ class FListBox : public FWidget
static FString& getString (listBoxItems::iterator); static FString& getString (listBoxItems::iterator);
// Methods // Methods
void init(); void init();
void draw(); virtual void draw();
void drawLabel(); void drawLabel();
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 (int, bool); void recalculateHorizontalBar (int, bool);
void recalculateVerticalBar (int); void recalculateVerticalBar (int);
void getWidgetFocus(); void getWidgetFocus();
void multiSelection (int); void multiSelection (int);
void multiSelectionUpTo (int); void multiSelectionUpTo (int);
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 (int); bool keyIncSearchInput (int);
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 (int); listBoxItems::iterator index2iterator (int);
// Callback methods // Callback methods
@ -298,9 +297,9 @@ class FListBox : public FWidget
void cb_HBarChange (FWidget*, data_ptr); void cb_HBarChange (FWidget*, data_ptr);
// Function Pointer // Function Pointer
void (*convertToItem) ( FListBoxItem& void (*convertToItem) ( FListBoxItem&
, FWidget::data_ptr , FWidget::data_ptr
, int index ); , int index );
// Data Members // Data Members
listBoxItems itemlist; listBoxItems itemlist;

View File

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

View File

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

View File

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

View File

@ -90,74 +90,74 @@ class FMenuItem : public FWidget
virtual ~FMenuItem(); virtual ~FMenuItem();
// Accessors // Accessors
const char* getClassName() const; const char* getClassName() const;
int getHotkey() const; int getHotkey() const;
FMenu* getMenu() const; FMenu* getMenu() const;
uInt getTextLength() const; uInt getTextLength() const;
FString getText() const; FString getText() const;
// Mutators // Mutators
bool setEnable (bool); virtual bool setEnable (bool);
bool setFocus (bool); virtual bool setFocus (bool);
bool setFocus(); virtual bool setFocus();
bool unsetFocus(); virtual bool unsetFocus();
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
void addAccelerator (int, FWidget*); virtual void addAccelerator (int, FWidget*);
void delAccelerator (FWidget*); virtual void delAccelerator (FWidget*);
void openMenu(); void openMenu();
// Event handlers // Event handlers
void onKeyPress (FKeyEvent*); virtual void onKeyPress (FKeyEvent*);
void onMouseDoubleClick (FMouseEvent*); virtual void onMouseDoubleClick (FMouseEvent*);
void onMouseDown (FMouseEvent*); virtual void onMouseDown (FMouseEvent*);
void onMouseUp (FMouseEvent*); virtual void onMouseUp (FMouseEvent*);
void onMouseMove (FMouseEvent*); virtual void onMouseMove (FMouseEvent*);
void onAccel (FAccelEvent*); virtual void onAccel (FAccelEvent*);
void onFocusIn (FFocusEvent*); virtual void onFocusIn (FFocusEvent*);
void onFocusOut (FFocusEvent*); virtual void onFocusOut (FFocusEvent*);
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;
bool selected; bool selected;
bool separator; bool separator;
bool checkable; bool checkable;
bool checked; bool checked;
bool radio_button; bool radio_button;
bool dialog_index; bool dialog_index;
uInt text_length; uInt text_length;
int hotkey; int hotkey;
int accel_key; int accel_key;
FMenu* menu; FMenu* menu;
FWidget* super_menu; FWidget* super_menu;
FDialog* associated_window; FDialog* associated_window;
private: private:
// Disable copy constructor // Disable copy constructor
@ -167,17 +167,17 @@ class FMenuItem : public FWidget
FMenuItem& operator = (const FMenuItem&); FMenuItem& operator = (const FMenuItem&);
// 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<class T> template<class T>
void passMouseEvent (T, FMouseEvent*, fc::events); void passMouseEvent (T, FMouseEvent*, fc::events);
// Callback methods // Callback methods
void cb_switchToDialog (FWidget*, data_ptr); void cb_switchToDialog (FWidget*, data_ptr);
void cb_destroyDialog (FWidget*, data_ptr); void cb_destroyDialog (FWidget*, data_ptr);
virtual void processClicked(); virtual void processClicked();

View File

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

View File

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

View File

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

View File

@ -82,7 +82,7 @@ class FProgressbar : public FWidget
// Mutators // Mutators
void setPercentage (int); 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);
bool setShadow(); bool setShadow();
bool unsetShadow(); bool unsetShadow();
@ -91,7 +91,7 @@ class FProgressbar : public FWidget
bool hasShadow(); bool hasShadow();
// Methods // Methods
void hide(); virtual void hide();
void reset(); void reset();
private: private:

View File

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

View File

@ -91,34 +91,34 @@ class FScrollbar : public FWidget
virtual ~FScrollbar(); virtual ~FScrollbar();
// Accessors // Accessors
const char* getClassName() const; const char* getClassName() const;
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);
void setGeometry (int, int, int, int, bool = true); virtual void setGeometry (int, int, int, int, bool = true);
// Methods // Methods
void resize(); virtual void resize();
void redraw(); virtual void redraw();
void calculateSliderValues(); void calculateSliderValues();
void drawVerticalBar(); void drawVerticalBar();
void drawHorizontalBar(); void drawHorizontalBar();
void drawBar(); void drawBar();
// Event handlers // Event handlers
void onMouseDown (FMouseEvent*); virtual void onMouseDown (FMouseEvent*);
void onMouseUp (FMouseEvent*); virtual void onMouseUp (FMouseEvent*);
void onMouseMove (FMouseEvent*); virtual void onMouseMove (FMouseEvent*);
void onWheel (FWheelEvent*); virtual void onWheel (FWheelEvent*);
void onTimer (FTimerEvent*); virtual void onTimer (FTimerEvent*);
private: private:
// Disable copy constructor // Disable copy constructor
@ -128,37 +128,37 @@ class FScrollbar : public FWidget
FScrollbar& operator = (const FScrollbar&); FScrollbar& operator = (const FScrollbar&);
// Methods // Methods
void init(); void init();
void draw(); virtual void draw();
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; sType scroll_type;
bool threshold_reached; bool threshold_reached;
int threshold_time; int threshold_time;
int repeat_time; int repeat_time;
int slider_click_pos; int slider_click_pos;
int slider_click_stop_pos; int slider_click_stop_pos;
int current_slider_pos; int current_slider_pos;
int slider_pos; int slider_pos;
int slider_length; int slider_length;
int bar_length; int bar_length;
int val; int val;
int min; int min;
int max; int max;
double steps; double steps;
int pagesize; int pagesize;
int length; int length;
int bar_orientation; int bar_orientation;
int max_color; int max_color;
}; };
#pragma pack(pop) #pragma pack(pop)

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -116,7 +116,7 @@ class FVTerm : public FTerm
explicit FVTerm (bool, bool = false); explicit FVTerm (bool, bool = false);
// Destructor // Destructor
~FVTerm(); virtual ~FVTerm();
// Overloaded operators // Overloaded operators
template<class type> FVTerm& operator << (const type&); 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); explicit FWidget (FWidget* = 0, bool = false);
// Destructor // Destructor
~FWidget(); virtual ~FWidget();
// Accessors // Accessors
const char* getClassName() const; const char* getClassName() const;
@ -349,7 +349,7 @@ class FWidget : public FVTerm, public FObject
virtual bool focusPrevChild(); // ...focus virtual bool focusPrevChild(); // ...focus
// Event handlers // Event handlers
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*);
@ -860,7 +860,7 @@ inline FPoint FWidget::termToWidgetPos (const FPoint& tPos)
//---------------------------------------------------------------------- //----------------------------------------------------------------------
inline void FWidget::move (const FPoint& pos) inline void FWidget::move (const FPoint& pos)
{ move( pos.getX(), pos.getY() ); } { move(pos.getX(), pos.getY()); }
//---------------------------------------------------------------------- //----------------------------------------------------------------------
inline void FWidget::drawBorder() inline void FWidget::drawBorder()

View File

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

View File

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