Stricter use of the keyword virtual
This commit is contained in:
parent
fcefd8251c
commit
4ad8335556
|
@ -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
|
||||||
|
|
|
@ -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,9 +118,9 @@ 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);
|
||||||
|
@ -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();
|
||||||
|
|
||||||
|
|
|
@ -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();
|
||||||
};
|
};
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
|
|
|
@ -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;
|
||||||
|
|
|
@ -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);
|
||||||
|
|
|
@ -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)
|
||||||
|
|
||||||
|
|
|
@ -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);
|
||||||
|
|
|
@ -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);
|
||||||
|
|
|
@ -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);
|
||||||
|
|
|
@ -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;
|
||||||
|
|
|
@ -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*);
|
||||||
};
|
};
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
|
|
|
@ -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;
|
||||||
|
|
|
@ -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();
|
||||||
|
|
|
@ -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);
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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);
|
||||||
|
|
|
@ -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
|
||||||
|
|
||||||
|
|
|
@ -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 (¤tTime);
|
getCurrentTime (¤tTime);
|
||||||
|
|
||||||
|
@ -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();
|
||||||
|
|
|
@ -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();
|
||||||
|
|
|
@ -288,9 +288,6 @@ FListViewIterator::FListViewIterator (FObjectIterator iter)
|
||||||
, position(0)
|
, position(0)
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
|
||||||
FListViewIterator::~FListViewIterator() // destructor
|
|
||||||
{ }
|
|
||||||
|
|
||||||
// FListViewIterator operators
|
// FListViewIterator operators
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
|
|
|
@ -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()
|
||||||
{
|
{
|
||||||
|
|
|
@ -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);
|
||||||
|
|
|
@ -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() )
|
||||||
|
|
|
@ -93,7 +93,7 @@ class FApplication : public FWidget
|
||||||
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();
|
||||||
|
|
||||||
|
|
|
@ -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();
|
||||||
|
|
|
@ -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);
|
||||||
|
|
|
@ -91,7 +91,7 @@ class FCheckBox : public FToggleButton
|
||||||
|
|
||||||
// Methods
|
// Methods
|
||||||
void init();
|
void init();
|
||||||
void draw();
|
virtual void draw();
|
||||||
void drawCheckButton();
|
void drawCheckButton();
|
||||||
};
|
};
|
||||||
#pragma pack(pop)
|
#pragma pack(pop)
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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();
|
||||||
|
|
|
@ -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);
|
||||||
|
|
|
@ -104,13 +104,13 @@ class FLineEdit : public FWidget
|
||||||
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();
|
||||||
|
@ -119,23 +119,23 @@ class FLineEdit : public FWidget
|
||||||
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
|
||||||
|
@ -155,7 +155,7 @@ class FLineEdit : public FWidget
|
||||||
// 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();
|
||||||
|
|
|
@ -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
|
||||||
|
@ -245,7 +244,7 @@ class FListBox : public FWidget
|
||||||
|
|
||||||
// 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);
|
||||||
|
|
|
@ -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;
|
||||||
|
|
|
@ -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);
|
||||||
|
|
|
@ -86,16 +86,16 @@ class FMenuBar : public FWindow, public FMenuList
|
||||||
virtual const char* getClassName() const;
|
virtual const char* getClassName() const;
|
||||||
|
|
||||||
// Methods
|
// Methods
|
||||||
void hide();
|
|
||||||
void resetMenu();
|
void resetMenu();
|
||||||
void adjustSize();
|
virtual void hide();
|
||||||
|
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);
|
||||||
|
@ -127,7 +127,7 @@ class FMenuBar : public FWindow, public FMenuList
|
||||||
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*);
|
||||||
|
|
|
@ -97,10 +97,10 @@ class FMenuItem : public FWidget
|
||||||
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();
|
||||||
|
@ -118,19 +118,19 @@ class FMenuItem : public FWidget
|
||||||
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
|
||||||
|
|
|
@ -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);
|
||||||
|
|
|
@ -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&);
|
||||||
|
|
|
@ -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;
|
||||||
|
|
|
@ -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:
|
||||||
|
|
|
@ -91,7 +91,7 @@ class FRadioButton : public FToggleButton
|
||||||
|
|
||||||
// Methods
|
// Methods
|
||||||
void init();
|
void init();
|
||||||
void draw();
|
virtual void draw();
|
||||||
void drawRadioButton();
|
void drawRadioButton();
|
||||||
};
|
};
|
||||||
#pragma pack(pop)
|
#pragma pack(pop)
|
||||||
|
|
|
@ -103,22 +103,22 @@ class FScrollbar : public FWidget
|
||||||
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
|
||||||
|
@ -129,7 +129,7 @@ class FScrollbar : public FWidget
|
||||||
|
|
||||||
// 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);
|
||||||
|
|
|
@ -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:
|
||||||
|
|
|
@ -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);
|
||||||
|
|
|
@ -83,12 +83,12 @@ class FSwitch : public FToggleButton
|
||||||
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,7 +98,7 @@ 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();
|
||||||
|
|
|
@ -65,7 +65,7 @@ class FTermcap
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
// Destructor
|
// Destructor
|
||||||
~FTermcap()
|
virtual ~FTermcap()
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
// Accessors
|
// Accessors
|
||||||
|
|
|
@ -57,7 +57,7 @@ class FTermcapQuirks
|
||||||
FTermcapQuirks();
|
FTermcapQuirks();
|
||||||
|
|
||||||
// Destructor
|
// Destructor
|
||||||
~FTermcapQuirks();
|
virtual ~FTermcapQuirks();
|
||||||
|
|
||||||
// Accessor
|
// Accessor
|
||||||
const char* getClassName() const;
|
const char* getClassName() const;
|
||||||
|
|
|
@ -91,7 +91,7 @@ class FTermDetection
|
||||||
FTermDetection();
|
FTermDetection();
|
||||||
|
|
||||||
// Destructor
|
// Destructor
|
||||||
~FTermDetection();
|
virtual ~FTermDetection();
|
||||||
|
|
||||||
// Accessor
|
// Accessor
|
||||||
const char* getClassName() const;
|
const char* getClassName() const;
|
||||||
|
|
|
@ -66,7 +66,7 @@ class FTermFreeBSD
|
||||||
FTermFreeBSD();
|
FTermFreeBSD();
|
||||||
|
|
||||||
// Destructor
|
// Destructor
|
||||||
~FTermFreeBSD();
|
virtual ~FTermFreeBSD();
|
||||||
|
|
||||||
// Accessors
|
// Accessors
|
||||||
const char* getClassName() const;
|
const char* getClassName() const;
|
||||||
|
|
|
@ -57,7 +57,7 @@ class FTermios
|
||||||
FTermios();
|
FTermios();
|
||||||
|
|
||||||
// Destructor
|
// Destructor
|
||||||
~FTermios();
|
virtual ~FTermios();
|
||||||
|
|
||||||
// Accessors
|
// Accessors
|
||||||
const char* getClassName() const;
|
const char* getClassName() const;
|
||||||
|
|
|
@ -73,7 +73,7 @@ class FTermLinux
|
||||||
FTermLinux();
|
FTermLinux();
|
||||||
|
|
||||||
// Destructor
|
// Destructor
|
||||||
~FTermLinux();
|
virtual ~FTermLinux();
|
||||||
|
|
||||||
// Accessors
|
// Accessors
|
||||||
const char* getClassName() const;
|
const char* getClassName() const;
|
||||||
|
|
|
@ -59,7 +59,7 @@ class FTermOpenBSD
|
||||||
FTermOpenBSD();
|
FTermOpenBSD();
|
||||||
|
|
||||||
// Destructor
|
// Destructor
|
||||||
~FTermOpenBSD();
|
virtual ~FTermOpenBSD();
|
||||||
|
|
||||||
// Accessor
|
// Accessor
|
||||||
const char* getClassName() const;
|
const char* getClassName() const;
|
||||||
|
|
|
@ -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*);
|
||||||
|
|
|
@ -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();
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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&);
|
||||||
|
|
|
@ -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*);
|
||||||
|
|
|
@ -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*);
|
||||||
|
|
|
@ -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);
|
||||||
|
|
Loading…
Reference in New Issue