Add keyword 'explicit' to some constructors
This commit is contained in:
parent
1ebd703f05
commit
7789ee4fba
|
@ -31,7 +31,7 @@ class FButton : public FWidget
|
||||||
friend class FDialog;
|
friend class FDialog;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
FButton (FWidget* parent=0); // constructor
|
explicit FButton (FWidget* parent=0); // constructor
|
||||||
FButton (const FString&, FWidget* parent=0); // constructor
|
FButton (const FString&, FWidget* parent=0); // constructor
|
||||||
virtual ~FButton(); // destructor
|
virtual ~FButton(); // destructor
|
||||||
|
|
||||||
|
|
|
@ -38,7 +38,7 @@ class FButtonGroup : public FWidget
|
||||||
void drawLabel();
|
void drawLabel();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
FButtonGroup (FWidget* parent=0); // constructor
|
explicit FButtonGroup (FWidget* parent=0); // constructor
|
||||||
FButtonGroup (const FString&, FWidget* parent=0); // constructor
|
FButtonGroup (const FString&, FWidget* parent=0); // constructor
|
||||||
virtual ~FButtonGroup(); // destructor
|
virtual ~FButtonGroup(); // destructor
|
||||||
const char* getClassName() const;
|
const char* getClassName() const;
|
||||||
|
|
|
@ -23,7 +23,7 @@ class FCheckBox : public FToggleButton
|
||||||
void drawCheckButton();
|
void drawCheckButton();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
FCheckBox (FWidget* parent=0); // constructor
|
explicit FCheckBox (FWidget* parent=0); // constructor
|
||||||
FCheckBox (const FString&, FWidget* parent=0); // constructor
|
FCheckBox (const FString&, FWidget* parent=0); // constructor
|
||||||
virtual ~FCheckBox(); // destructor
|
virtual ~FCheckBox(); // destructor
|
||||||
const char* getClassName() const;
|
const char* getClassName() const;
|
||||||
|
|
|
@ -46,7 +46,7 @@ class FDialog : public FWindow
|
||||||
virtual void onClose (FCloseEvent*);
|
virtual void onClose (FCloseEvent*);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
FDialog (FWidget* parent=0); // constructor
|
explicit FDialog (FWidget* parent=0); // constructor
|
||||||
FDialog (const FString&, FWidget* parent=0); // constructor
|
FDialog (const FString&, FWidget* parent=0); // constructor
|
||||||
virtual ~FDialog(); // destructor
|
virtual ~FDialog(); // destructor
|
||||||
virtual const char* getClassName() const;
|
virtual const char* getClassName() const;
|
||||||
|
|
12
src/fevent.h
12
src/fevent.h
|
@ -40,7 +40,7 @@
|
||||||
class FEvent // event base class
|
class FEvent // event base class
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
FEvent(int);
|
explicit FEvent(int);
|
||||||
~FEvent();
|
~FEvent();
|
||||||
int type() const;
|
int type() const;
|
||||||
|
|
||||||
|
@ -190,7 +190,7 @@ enum FocusTypes
|
||||||
class FFocusEvent : public FEvent // focus event
|
class FFocusEvent : public FEvent // focus event
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
FFocusEvent (int);
|
explicit FFocusEvent (int);
|
||||||
bool gotFocus() const;
|
bool gotFocus() const;
|
||||||
bool lostFocus() const;
|
bool lostFocus() const;
|
||||||
FocusTypes getFocusType() const;
|
FocusTypes getFocusType() const;
|
||||||
|
@ -239,7 +239,7 @@ class FAccelEvent : public FEvent // focus event
|
||||||
class FResizeEvent : public FEvent // resize event
|
class FResizeEvent : public FEvent // resize event
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
FResizeEvent (int);
|
explicit FResizeEvent (int);
|
||||||
bool isAccepted() const;
|
bool isAccepted() const;
|
||||||
void accept();
|
void accept();
|
||||||
void ignore();
|
void ignore();
|
||||||
|
@ -258,7 +258,7 @@ class FResizeEvent : public FEvent // resize event
|
||||||
class FShowEvent : public FEvent // show event
|
class FShowEvent : public FEvent // show event
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
FShowEvent (int);
|
explicit FShowEvent (int);
|
||||||
};
|
};
|
||||||
|
|
||||||
#define F_SHOW_EVENT(x) ((FShowEvent*)x)
|
#define F_SHOW_EVENT(x) ((FShowEvent*)x)
|
||||||
|
@ -271,7 +271,7 @@ class FShowEvent : public FEvent // show event
|
||||||
class FHideEvent : public FEvent // hide event
|
class FHideEvent : public FEvent // hide event
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
FHideEvent (int);
|
explicit FHideEvent (int);
|
||||||
};
|
};
|
||||||
|
|
||||||
#define F_HIDE_EVENT(x) ((FHideEvent*)x)
|
#define F_HIDE_EVENT(x) ((FHideEvent*)x)
|
||||||
|
@ -284,7 +284,7 @@ class FHideEvent : public FEvent // hide event
|
||||||
class FCloseEvent : public FEvent // close event
|
class FCloseEvent : public FEvent // close event
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
FCloseEvent(int);
|
explicit FCloseEvent(int);
|
||||||
bool isAccepted() const;
|
bool isAccepted() const;
|
||||||
void accept();
|
void accept();
|
||||||
void ignore();
|
void ignore();
|
||||||
|
|
|
@ -83,7 +83,7 @@ class FFileDialog : public FDialog
|
||||||
void adjustSize();
|
void adjustSize();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
FFileDialog (FWidget* parent=0);
|
explicit FFileDialog (FWidget* parent=0);
|
||||||
FFileDialog (const FString&,
|
FFileDialog (const FString&,
|
||||||
const FString&,
|
const FString&,
|
||||||
DialogType type = FFileDialog::Open,
|
DialogType type = FFileDialog::Open,
|
||||||
|
|
|
@ -39,7 +39,7 @@ class FLabel : public FWidget
|
||||||
void draw();
|
void draw();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
FLabel (FWidget* parent=0); // constructor
|
explicit FLabel (FWidget* parent=0); // constructor
|
||||||
FLabel (const FString&, FWidget* parent=0); // constructor
|
FLabel (const FString&, FWidget* parent=0); // constructor
|
||||||
virtual ~FLabel(); // destructor
|
virtual ~FLabel(); // destructor
|
||||||
const char* getClassName() const;
|
const char* getClassName() const;
|
||||||
|
|
|
@ -56,7 +56,7 @@ class FLineEdit : public FWidget
|
||||||
void adjustSize();
|
void adjustSize();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
FLineEdit (FWidget* parent=0); // constructor
|
explicit FLineEdit (FWidget* parent=0); // constructor
|
||||||
FLineEdit (const FString&, FWidget* parent=0); // constructor
|
FLineEdit (const FString&, FWidget* parent=0); // constructor
|
||||||
virtual ~FLineEdit(); // destructor
|
virtual ~FLineEdit(); // destructor
|
||||||
const char* getClassName() const;
|
const char* getClassName() const;
|
||||||
|
|
|
@ -25,9 +25,9 @@ class FListBoxItem
|
||||||
bool selected;
|
bool selected;
|
||||||
public:
|
public:
|
||||||
FListBoxItem ();
|
FListBoxItem ();
|
||||||
FListBoxItem (FString&);
|
explicit FListBoxItem (FString&);
|
||||||
FListBoxItem (const std::string&);
|
explicit FListBoxItem (const std::string&);
|
||||||
FListBoxItem (const char*);
|
explicit FListBoxItem (const char*);
|
||||||
virtual ~FListBoxItem();
|
virtual ~FListBoxItem();
|
||||||
virtual FString getText() const;
|
virtual FString getText() const;
|
||||||
protected:
|
protected:
|
||||||
|
@ -111,7 +111,7 @@ class FListBox : public FWidget
|
||||||
void adjustSize();
|
void adjustSize();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
FListBox (FWidget* parent=0); // constructor
|
explicit FListBox (FWidget* parent=0); // constructor
|
||||||
~FListBox(); // destructor
|
~FListBox(); // destructor
|
||||||
const char* getClassName() const;
|
const char* getClassName() const;
|
||||||
|
|
||||||
|
|
|
@ -58,7 +58,7 @@ class FMessageBox : public FDialog
|
||||||
void cb_processClick (FWidget*, void*);
|
void cb_processClick (FWidget*, void*);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
FMessageBox (FWidget* parent=0);
|
explicit FMessageBox (FWidget* parent=0);
|
||||||
FMessageBox (const FString&, const FString&,
|
FMessageBox (const FString&, const FString&,
|
||||||
int, int, int,
|
int, int, int,
|
||||||
FWidget* parent=0);
|
FWidget* parent=0);
|
||||||
|
|
|
@ -58,7 +58,7 @@ class FObject
|
||||||
friend class FApplication;
|
friend class FApplication;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
FObject (FObject* parent=0);
|
explicit FObject (FObject* parent=0);
|
||||||
virtual ~FObject();
|
virtual ~FObject();
|
||||||
virtual const char* getClassName() const;
|
virtual const char* getClassName() const;
|
||||||
|
|
||||||
|
|
|
@ -78,7 +78,7 @@ class FOptiMove
|
||||||
bool isWideMove (int, int, int, int);
|
bool isWideMove (int, int, int, int);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
FOptiMove(int baud=0); // constructor
|
explicit FOptiMove(int baud=0); // constructor
|
||||||
~FOptiMove(); // destructor
|
~FOptiMove(); // destructor
|
||||||
|
|
||||||
void setBaudRate (int);
|
void setBaudRate (int);
|
||||||
|
|
|
@ -29,7 +29,7 @@ class FProgressbar : public FWidget
|
||||||
virtual void draw();
|
virtual void draw();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
FProgressbar(FWidget* parent=0); // constructor
|
explicit FProgressbar(FWidget* parent=0); // constructor
|
||||||
virtual ~FProgressbar();
|
virtual ~FProgressbar();
|
||||||
const char* getClassName() const;
|
const char* getClassName() const;
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,7 @@ class FRadioButton : public FToggleButton
|
||||||
void drawRadioButton();
|
void drawRadioButton();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
FRadioButton (FWidget* parent=0); // constructor
|
explicit FRadioButton (FWidget* parent=0); // constructor
|
||||||
FRadioButton (const FString&, FWidget* parent=0); // constructor
|
FRadioButton (const FString&, FWidget* parent=0); // constructor
|
||||||
virtual ~FRadioButton(); // destructor
|
virtual ~FRadioButton(); // destructor
|
||||||
const char* getClassName() const;
|
const char* getClassName() const;
|
||||||
|
|
|
@ -59,7 +59,7 @@ class FScrollbar : public FWidget
|
||||||
void processScroll();
|
void processScroll();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
FScrollbar(FWidget* parent=0); // constructor
|
explicit FScrollbar(FWidget* parent=0); // constructor
|
||||||
FScrollbar(int o=fc::vertical, FWidget* parent=0); // constructor
|
FScrollbar(int o=fc::vertical, FWidget* parent=0); // constructor
|
||||||
virtual ~FScrollbar();
|
virtual ~FScrollbar();
|
||||||
const char* getClassName() const;
|
const char* getClassName() const;
|
||||||
|
|
|
@ -33,7 +33,7 @@ class FStatusKey : public FWidget
|
||||||
void setStatusbar (FStatusBar*);
|
void setStatusbar (FStatusBar*);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
FStatusKey (FWidget* parent=0);
|
explicit FStatusKey (FWidget* parent=0);
|
||||||
FStatusKey (int, FString&, FWidget* parent=0);
|
FStatusKey (int, FString&, FWidget* parent=0);
|
||||||
FStatusKey (int, const std::string&, FWidget* parent=0);
|
FStatusKey (int, const std::string&, FWidget* parent=0);
|
||||||
FStatusKey (int, const char*, FWidget* parent=0);
|
FStatusKey (int, const char*, FWidget* parent=0);
|
||||||
|
@ -133,7 +133,7 @@ class FStatusBar : public FWindow
|
||||||
void adjustSize();
|
void adjustSize();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
FStatusBar (FWidget* parent=0); // constructor
|
explicit FStatusBar (FWidget* parent=0); // constructor
|
||||||
virtual ~FStatusBar(); // destructor
|
virtual ~FStatusBar(); // destructor
|
||||||
virtual const char* getClassName() const;
|
virtual const char* getClassName() const;
|
||||||
|
|
||||||
|
|
|
@ -753,7 +753,7 @@ const FString operator + (const std::string& s1, const FString& s2)
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
const FString operator + (const char* s1, const FString& s2)
|
const FString operator + (const char* s1, const FString& s2)
|
||||||
{
|
{
|
||||||
FString tmp = s1;
|
FString tmp(s1);
|
||||||
tmp._insert ( tmp.getLength(),
|
tmp._insert ( tmp.getLength(),
|
||||||
uInt(wcslen(s2.wc_str())),
|
uInt(wcslen(s2.wc_str())),
|
||||||
s2.wc_str() );
|
s2.wc_str() );
|
||||||
|
@ -763,7 +763,7 @@ const FString operator + (const char* s1, const FString& s2)
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
const FString operator + (const wchar_t c, const FString& s)
|
const FString operator + (const wchar_t c, const FString& s)
|
||||||
{
|
{
|
||||||
FString tmp = c;
|
FString tmp(c);
|
||||||
tmp._insert (1, uInt(wcslen(s.wc_str())), s.wc_str());
|
tmp._insert (1, uInt(wcslen(s.wc_str())), s.wc_str());
|
||||||
return (tmp);
|
return (tmp);
|
||||||
}
|
}
|
||||||
|
@ -771,7 +771,7 @@ const FString operator + (const wchar_t c, const FString& s)
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
const FString operator + (const char c, const FString& s)
|
const FString operator + (const char c, const FString& s)
|
||||||
{
|
{
|
||||||
FString tmp = c;
|
FString tmp(c);
|
||||||
tmp._insert (1, uInt(wcslen(s.wc_str())), s.wc_str());
|
tmp._insert (1, uInt(wcslen(s.wc_str())), s.wc_str());
|
||||||
return (tmp);
|
return (tmp);
|
||||||
}
|
}
|
||||||
|
@ -1832,7 +1832,7 @@ FString FString::expandTabs (uInt tabstop) const
|
||||||
{
|
{
|
||||||
uLong end;
|
uLong end;
|
||||||
FString instr(this->string);
|
FString instr(this->string);
|
||||||
FString outstr = "";
|
FString outstr("");
|
||||||
|
|
||||||
std::vector<FString> tab_split = instr.split("\t");
|
std::vector<FString> tab_split = instr.split("\t");
|
||||||
end = tab_split.size();
|
end = tab_split.size();
|
||||||
|
|
|
@ -71,8 +71,8 @@ class FString
|
||||||
|
|
||||||
public:
|
public:
|
||||||
FString (); // constructor
|
FString (); // constructor
|
||||||
FString (int); // constructor
|
explicit FString (int); // constructor
|
||||||
FString (uInt); // constructor
|
explicit FString (uInt); // constructor
|
||||||
FString (int, wchar_t); // constructor
|
FString (int, wchar_t); // constructor
|
||||||
FString (uInt, wchar_t); // constructor
|
FString (uInt, wchar_t); // constructor
|
||||||
FString (int, char); // constructor
|
FString (int, char); // constructor
|
||||||
|
@ -83,7 +83,7 @@ class FString
|
||||||
FString (const std::string&); // constructor
|
FString (const std::string&); // constructor
|
||||||
FString (const char*); // constructor
|
FString (const char*); // constructor
|
||||||
FString (const wchar_t); // constructor
|
FString (const wchar_t); // constructor
|
||||||
FString (const char); // constructor
|
explicit FString (const char); // constructor
|
||||||
virtual ~FString (); // destructor
|
virtual ~FString (); // destructor
|
||||||
|
|
||||||
bool isNull() const;
|
bool isNull() const;
|
||||||
|
|
|
@ -45,7 +45,7 @@ class FTextView : public FWidget
|
||||||
void adjustSize();
|
void adjustSize();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
FTextView (FWidget* parent=0); // constructor
|
explicit FTextView (FWidget* parent=0); // constructor
|
||||||
~FTextView(); // destructor
|
~FTextView(); // destructor
|
||||||
const char* getClassName() const;
|
const char* getClassName() const;
|
||||||
|
|
||||||
|
|
|
@ -45,7 +45,7 @@ class FToggleButton : public FWidget
|
||||||
virtual void onKeyPress (FKeyEvent*);
|
virtual void onKeyPress (FKeyEvent*);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
FToggleButton (FWidget* parent=0); // constructor
|
explicit FToggleButton (FWidget* parent=0); // constructor
|
||||||
FToggleButton (const FString&, FWidget* parent=0); // constructor
|
FToggleButton (const FString&, FWidget* parent=0); // constructor
|
||||||
virtual ~FToggleButton(); // destructor
|
virtual ~FToggleButton(); // destructor
|
||||||
virtual const char* getClassName() const;
|
virtual const char* getClassName() const;
|
||||||
|
|
|
@ -220,7 +220,7 @@ class FWidget : public FObject, public FTerm
|
||||||
virtual bool focusPrevChild (void);
|
virtual bool focusPrevChild (void);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
FWidget (FWidget* parent=0); // constructor
|
explicit FWidget (FWidget* parent=0); // constructor
|
||||||
~FWidget(); // destructor
|
~FWidget(); // destructor
|
||||||
|
|
||||||
const char* getClassName() const;
|
const char* getClassName() const;
|
||||||
|
|
|
@ -31,7 +31,7 @@ class FWindow : public FWidget
|
||||||
virtual void onWindowLowered (FEvent*);
|
virtual void onWindowLowered (FEvent*);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
FWindow (FWidget* parent=0); // constructor
|
explicit FWindow (FWidget* parent=0); // constructor
|
||||||
~FWindow (); // destructor
|
~FWindow (); // destructor
|
||||||
|
|
||||||
const char* getClassName() const;
|
const char* getClassName() const;
|
||||||
|
|
|
@ -17,7 +17,7 @@ class Mandelbrot : public FDialog
|
||||||
virtual void draw();
|
virtual void draw();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
Mandelbrot (FWidget* parent=0); // constructor
|
explicit Mandelbrot (FWidget* parent=0); // constructor
|
||||||
~Mandelbrot(); // destructor
|
~Mandelbrot(); // destructor
|
||||||
void onAccel (FAccelEvent*);
|
void onAccel (FAccelEvent*);
|
||||||
void onClose (FCloseEvent*);
|
void onClose (FCloseEvent*);
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
class timer : public FWidget
|
class timer : public FWidget
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
timer (FWidget* parent = 0);
|
explicit timer (FWidget* parent = 0);
|
||||||
protected:
|
protected:
|
||||||
virtual void draw();
|
virtual void draw();
|
||||||
void onTimer (FTimerEvent*);
|
void onTimer (FTimerEvent*);
|
||||||
|
|
|
@ -21,7 +21,7 @@ class ProgressDialog : public FDialog
|
||||||
FProgressbar* progressBar;
|
FProgressbar* progressBar;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
ProgressDialog (FWidget* parent=0); // constructor
|
explicit ProgressDialog (FWidget* parent=0); // constructor
|
||||||
~ProgressDialog(); // destructor
|
~ProgressDialog(); // destructor
|
||||||
|
|
||||||
void onShow (FShowEvent*);
|
void onShow (FShowEvent*);
|
||||||
|
@ -149,7 +149,7 @@ class MyDialog : public FDialog
|
||||||
private:
|
private:
|
||||||
FListBox* myList;
|
FListBox* myList;
|
||||||
public:
|
public:
|
||||||
MyDialog (FWidget* parent=0); // constructor
|
explicit MyDialog (FWidget* parent=0); // constructor
|
||||||
~MyDialog(); // destructor
|
~MyDialog(); // destructor
|
||||||
void onClose (FCloseEvent*);
|
void onClose (FCloseEvent*);
|
||||||
void cb_noFunctionMsg (FWidget*, void*);
|
void cb_noFunctionMsg (FWidget*, void*);
|
||||||
|
|
Loading…
Reference in New Issue