Code enhancement: Use C++11 =default & =delete for the constructor & destructor
This commit is contained in:
parent
c34d3c9a4b
commit
93a9962fde
@ -45,7 +45,7 @@ struct PluginCommand
|
||||
|
||||
struct PluginInfo
|
||||
{
|
||||
PluginInfo() {}
|
||||
PluginInfo() = default;
|
||||
~PluginInfo()
|
||||
{
|
||||
if (_pluginMenu)
|
||||
@ -55,17 +55,17 @@ struct PluginInfo
|
||||
::FreeLibrary(_hLib);
|
||||
}
|
||||
|
||||
HINSTANCE _hLib = NULL;
|
||||
HMENU _pluginMenu = NULL;
|
||||
HINSTANCE _hLib = nullptr;
|
||||
HMENU _pluginMenu = nullptr;
|
||||
|
||||
PFUNCSETINFO _pFuncSetInfo = NULL;
|
||||
PFUNCGETNAME _pFuncGetName = NULL;
|
||||
PBENOTIFIED _pBeNotified = NULL;
|
||||
PFUNCGETFUNCSARRAY _pFuncGetFuncsArray = NULL;
|
||||
PMESSAGEPROC _pMessageProc = NULL;
|
||||
PFUNCISUNICODE _pFuncIsUnicode = NULL;
|
||||
PFUNCSETINFO _pFuncSetInfo = nullptr;
|
||||
PFUNCGETNAME _pFuncGetName = nullptr;
|
||||
PBENOTIFIED _pBeNotified = nullptr;
|
||||
PFUNCGETFUNCSARRAY _pFuncGetFuncsArray = nullptr;
|
||||
PMESSAGEPROC _pMessageProc = nullptr;
|
||||
PFUNCISUNICODE _pFuncIsUnicode = nullptr;
|
||||
|
||||
FuncItem *_funcItems = NULL;
|
||||
FuncItem *_funcItems = nullptr;
|
||||
int _nbFuncItem = 0;
|
||||
generic_string _moduleName;
|
||||
generic_string _funcName;
|
||||
|
@ -37,13 +37,13 @@ const int extNameLen = 32;
|
||||
class RegExtDlg : public StaticDialog
|
||||
{
|
||||
public :
|
||||
RegExtDlg() : _isCustomize(false){};
|
||||
~RegExtDlg(){};
|
||||
RegExtDlg() = default;
|
||||
~RegExtDlg() = default;
|
||||
void doDialog(bool isRTL = false);
|
||||
|
||||
|
||||
private :
|
||||
bool _isCustomize;
|
||||
bool _isCustomize = false;
|
||||
|
||||
INT_PTR CALLBACK run_dlgProc(UINT Message, WPARAM wParam, LPARAM lParam);
|
||||
|
||||
|
@ -24,7 +24,7 @@ enum hashType {hash_md5, hash_sha256};
|
||||
class HashFromFilesDlg : public StaticDialog
|
||||
{
|
||||
public :
|
||||
HashFromFilesDlg() : StaticDialog() {};
|
||||
HashFromFilesDlg() = default;
|
||||
|
||||
void doDialog(bool isRTL = false);
|
||||
virtual void destroy() {};
|
||||
@ -38,7 +38,7 @@ protected :
|
||||
class HashFromTextDlg : public StaticDialog
|
||||
{
|
||||
public :
|
||||
HashFromTextDlg() : StaticDialog() {};
|
||||
HashFromTextDlg() = default;
|
||||
|
||||
void doDialog(bool isRTL = false);
|
||||
virtual void destroy() {};
|
||||
|
@ -36,6 +36,7 @@ const size_t tagMaxLen = 256;
|
||||
class ScintillaEditView;
|
||||
|
||||
struct MatchedCharInserted {
|
||||
MatchedCharInserted() = delete;
|
||||
char _c;
|
||||
int _pos;
|
||||
MatchedCharInserted(char c, int pos) : _c(c), _pos(pos) {};
|
||||
|
@ -117,10 +117,10 @@ public:
|
||||
|
||||
private:
|
||||
struct LoadedFileFormat {
|
||||
LoadedFileFormat() {};
|
||||
LangType _language;
|
||||
int _encoding;
|
||||
EolType _eolFormat;
|
||||
LoadedFileFormat() = default;
|
||||
LangType _language = L_TEXT;
|
||||
int _encoding = 0;
|
||||
EolType _eolFormat = EolType::osdefault;
|
||||
};
|
||||
|
||||
FileManager() = default;
|
||||
|
@ -227,12 +227,12 @@ friend class FindIncrementDlg;
|
||||
public :
|
||||
static FindOption _options;
|
||||
static FindOption* _env;
|
||||
FindReplaceDlg() : StaticDialog(), _pFinder(NULL), _isRTL(false),\
|
||||
_fileNameLenMax(1024) {
|
||||
FindReplaceDlg() {
|
||||
_uniFileName = new char[(_fileNameLenMax + 3) * 2];
|
||||
_winVer = (NppParameters::getInstance()).getWinVersion();
|
||||
_env = &_options;
|
||||
};
|
||||
|
||||
~FindReplaceDlg();
|
||||
|
||||
void init(HINSTANCE hInst, HWND hPere, ScintillaEditView **ppEditView) {
|
||||
@ -354,8 +354,8 @@ private :
|
||||
RECT _countInSelFramePos, _replaceInSelFramePos;
|
||||
RECT _countInSelCheckPos, _replaceInSelCheckPos;
|
||||
|
||||
ScintillaEditView **_ppEditView;
|
||||
Finder *_pFinder;
|
||||
ScintillaEditView **_ppEditView = nullptr;
|
||||
Finder *_pFinder = nullptr;
|
||||
|
||||
std::vector<Finder *> _findersOfFinder;
|
||||
|
||||
@ -363,22 +363,21 @@ private :
|
||||
HWND _2ButtonsTip = nullptr;
|
||||
|
||||
|
||||
bool _isRTL;
|
||||
bool _isRTL = false;
|
||||
|
||||
int _findAllResult;
|
||||
TCHAR _findAllResultStr[1024];
|
||||
|
||||
int _fileNameLenMax;
|
||||
int _fileNameLenMax = 1024;
|
||||
char *_uniFileName;
|
||||
|
||||
TabBar _tab;
|
||||
winVer _winVer;
|
||||
winVer _winVer = winVer::WV_UNKNOWN;
|
||||
StatusBar _statusBar;
|
||||
FindStatus _statusbarFindStatus;
|
||||
|
||||
HFONT _hMonospaceFont = nullptr;
|
||||
|
||||
|
||||
void enableReplaceFunc(bool isEnable);
|
||||
void enableFindInFilesControls(bool isEnable = true);
|
||||
void enableFindInFilesFunc();
|
||||
@ -417,7 +416,7 @@ private :
|
||||
class FindIncrementDlg : public StaticDialog
|
||||
{
|
||||
public :
|
||||
FindIncrementDlg() {};
|
||||
FindIncrementDlg() = default;
|
||||
void init(HINSTANCE hInst, HWND hPere, FindReplaceDlg *pFRDlg, bool isRTL = false);
|
||||
virtual void destroy();
|
||||
virtual void display(bool toShow = true) const;
|
||||
@ -452,6 +451,10 @@ public:
|
||||
explicit Progress(HINSTANCE hInst);
|
||||
~Progress();
|
||||
|
||||
// Disable copy construction and operator=
|
||||
Progress(const Progress&) = delete;
|
||||
const Progress& operator=(const Progress&) = delete;
|
||||
|
||||
HWND open(HWND hCallerWnd = NULL, const TCHAR* header = NULL);
|
||||
void close();
|
||||
|
||||
@ -484,22 +487,18 @@ private:
|
||||
static DWORD WINAPI threadFunc(LPVOID data);
|
||||
static LRESULT APIENTRY wndProc(HWND hwnd, UINT umsg, WPARAM wparam, LPARAM lparam);
|
||||
|
||||
// Disable copy construction and operator=
|
||||
Progress(const Progress&);
|
||||
const Progress& operator=(const Progress&);
|
||||
|
||||
int thread();
|
||||
int createProgressWindow();
|
||||
RECT adjustSizeAndPos(int width, int height);
|
||||
|
||||
HINSTANCE _hInst;
|
||||
volatile HWND _hwnd;
|
||||
HWND _hCallerWnd;
|
||||
TCHAR _header[128];
|
||||
HANDLE _hThread;
|
||||
HANDLE _hActiveState;
|
||||
HWND _hPText;
|
||||
HWND _hPBar;
|
||||
HWND _hBtn;
|
||||
HINSTANCE _hInst = nullptr;
|
||||
volatile HWND _hwnd = nullptr;
|
||||
HWND _hCallerWnd = nullptr;
|
||||
TCHAR _header[128] = {'\0'};
|
||||
HANDLE _hThread = nullptr;
|
||||
HANDLE _hActiveState = nullptr;
|
||||
HWND _hPText = nullptr;
|
||||
HWND _hPBar = nullptr;
|
||||
HWND _hBtn = nullptr;
|
||||
};
|
||||
|
||||
|
@ -33,7 +33,7 @@
|
||||
class GoToLineDlg : public StaticDialog
|
||||
{
|
||||
public :
|
||||
GoToLineDlg() : StaticDialog() {};
|
||||
GoToLineDlg() = default;
|
||||
|
||||
void init(HINSTANCE hInst, HWND hPere, ScintillaEditView **ppEditView) {
|
||||
Window::init(hInst, hPere);
|
||||
|
@ -45,7 +45,8 @@ struct NPP_RangeToFormat {
|
||||
class Printer
|
||||
{
|
||||
public :
|
||||
Printer(){};
|
||||
Printer() = default;
|
||||
|
||||
void init(HINSTANCE hInst, HWND hwnd, ScintillaEditView *pSEView, bool showDialog, int startPos, int endPos, bool isRTL = false);
|
||||
size_t doPrint() {
|
||||
if (!::PrintDlg(&_pdlg))
|
||||
|
@ -252,7 +252,7 @@ class SharedParametersDialog : public StaticDialog
|
||||
{
|
||||
friend class StylerDlg;
|
||||
public:
|
||||
SharedParametersDialog() {};
|
||||
SharedParametersDialog() = default;
|
||||
virtual void updateDlg() = 0;
|
||||
protected :
|
||||
//Shared data
|
||||
@ -266,7 +266,7 @@ protected :
|
||||
class FolderStyleDialog : public SharedParametersDialog
|
||||
{
|
||||
public:
|
||||
FolderStyleDialog(): SharedParametersDialog() {};
|
||||
FolderStyleDialog() = default;
|
||||
void updateDlg();
|
||||
protected :
|
||||
INT_PTR CALLBACK run_dlgProc(UINT Message, WPARAM wParam, LPARAM lParam);
|
||||
@ -279,7 +279,7 @@ private :
|
||||
class KeyWordsStyleDialog : public SharedParametersDialog
|
||||
{
|
||||
public:
|
||||
KeyWordsStyleDialog(): SharedParametersDialog() {};
|
||||
KeyWordsStyleDialog() = default;
|
||||
void updateDlg();
|
||||
protected :
|
||||
INT_PTR CALLBACK run_dlgProc(UINT Message, WPARAM wParam, LPARAM lParam);
|
||||
@ -289,7 +289,7 @@ protected :
|
||||
class CommentStyleDialog : public SharedParametersDialog
|
||||
{
|
||||
public :
|
||||
CommentStyleDialog(): SharedParametersDialog() {};
|
||||
CommentStyleDialog() = default;
|
||||
void updateDlg();
|
||||
protected :
|
||||
INT_PTR CALLBACK run_dlgProc(UINT Message, WPARAM wParam, LPARAM lParam);
|
||||
@ -301,7 +301,7 @@ private :
|
||||
class SymbolsStyleDialog : public SharedParametersDialog
|
||||
{
|
||||
public :
|
||||
SymbolsStyleDialog(): SharedParametersDialog() {};
|
||||
SymbolsStyleDialog() = default;
|
||||
void updateDlg();
|
||||
protected :
|
||||
INT_PTR CALLBACK run_dlgProc(UINT Message, WPARAM wParam, LPARAM lParam);
|
||||
@ -398,7 +398,7 @@ protected :
|
||||
class StringDlg : public StaticDialog
|
||||
{
|
||||
public :
|
||||
StringDlg() : StaticDialog() {};
|
||||
StringDlg() = default;
|
||||
void init(HINSTANCE hInst, HWND parent, const TCHAR *title, const TCHAR *staticName, const TCHAR *text2Set, int txtLen = 0, const TCHAR* restrictedChars = nullptr, bool bGotoCenter = false) {
|
||||
Window::init(hInst, parent);
|
||||
_title = title;
|
||||
|
@ -38,8 +38,7 @@ const bool activeNumeric = false;
|
||||
class ColumnEditorDlg : public StaticDialog
|
||||
{
|
||||
public :
|
||||
ColumnEditorDlg() : StaticDialog() {};
|
||||
|
||||
ColumnEditorDlg() = default;
|
||||
void init(HINSTANCE hInst, HWND hPere, ScintillaEditView **ppEditView);
|
||||
|
||||
virtual void create(int dialogID, bool isRTL = false, bool msgDestParent = true) {
|
||||
@ -55,18 +54,13 @@ public :
|
||||
};
|
||||
|
||||
virtual void display(bool toShow = true) const;
|
||||
|
||||
void switchTo(bool toText);
|
||||
|
||||
UCHAR getFormat();
|
||||
|
||||
protected :
|
||||
virtual INT_PTR CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam);
|
||||
|
||||
private :
|
||||
|
||||
ScintillaEditView **_ppEditView = nullptr;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
@ -51,7 +51,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.")
|
||||
class AboutDlg : public StaticDialog
|
||||
{
|
||||
public :
|
||||
AboutDlg() : StaticDialog() {};
|
||||
AboutDlg() = default;
|
||||
|
||||
void doDialog();
|
||||
|
||||
@ -72,7 +72,7 @@ private :
|
||||
class DebugInfoDlg : public StaticDialog
|
||||
{
|
||||
public:
|
||||
DebugInfoDlg() : StaticDialog() {};
|
||||
DebugInfoDlg() = default;
|
||||
|
||||
void init(HINSTANCE hInst, HWND parent, bool isAdmin, const generic_string& loadedPlugins) {
|
||||
_isAdmin = isAdmin;
|
||||
@ -100,7 +100,7 @@ private:
|
||||
class DoSaveOrNotBox : public StaticDialog
|
||||
{
|
||||
public:
|
||||
DoSaveOrNotBox() : StaticDialog() {};
|
||||
DoSaveOrNotBox() = default;
|
||||
|
||||
void init(HINSTANCE hInst, HWND parent, const TCHAR* fn, bool isMulti) {
|
||||
Window::init(hInst, parent);
|
||||
@ -112,8 +112,7 @@ public:
|
||||
|
||||
void doDialog(bool isRTL = false);
|
||||
|
||||
virtual void destroy() {
|
||||
};
|
||||
virtual void destroy() {};
|
||||
|
||||
int getClickedButtonId() const {
|
||||
return clickedButtonId;
|
||||
|
@ -43,8 +43,8 @@ struct columnInfo {
|
||||
class ListView : public Window
|
||||
{
|
||||
public:
|
||||
ListView() : Window() {};
|
||||
virtual ~ListView() {};
|
||||
ListView() = default;
|
||||
virtual ~ListView() = default;
|
||||
|
||||
enum SortDirection {
|
||||
sortEncrease = 0,
|
||||
|
@ -37,8 +37,8 @@ class ColourPopup;
|
||||
class ColourPicker : public Window
|
||||
{
|
||||
public :
|
||||
ColourPicker() : Window(), _currentColour(RGB(0xFF, 0x00, 0x00)), _pColourPopup(NULL), _isEnabled(true) {};
|
||||
~ColourPicker(){};
|
||||
ColourPicker() = default;
|
||||
~ColourPicker() = default;
|
||||
virtual void init(HINSTANCE hInst, HWND parent);
|
||||
virtual void destroy();
|
||||
void setColour(COLORREF c) {
|
||||
@ -50,10 +50,10 @@ public :
|
||||
void setEnabled(bool enabled) {_isEnabled = enabled;};
|
||||
|
||||
private :
|
||||
COLORREF _currentColour;
|
||||
WNDPROC _buttonDefaultProc;
|
||||
ColourPopup *_pColourPopup;
|
||||
bool _isEnabled;
|
||||
COLORREF _currentColour = RGB(0xFF, 0x00, 0x00);
|
||||
WNDPROC _buttonDefaultProc = nullptr;
|
||||
ColourPopup *_pColourPopup = nullptr;
|
||||
bool _isEnabled = true;
|
||||
|
||||
static LRESULT CALLBACK staticWinProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lParam) {
|
||||
return (((ColourPicker *)(::GetWindowLongPtr(hwnd, GWLP_USERDATA)))->runProc(Message, wParam, lParam));
|
||||
|
@ -68,7 +68,7 @@ private :
|
||||
class WordStyleDlg : public StaticDialog
|
||||
{
|
||||
public :
|
||||
WordStyleDlg() {};
|
||||
WordStyleDlg() = default;
|
||||
|
||||
void init(HINSTANCE hInst, HWND parent) {
|
||||
Window::init(hInst, parent);
|
||||
@ -125,19 +125,18 @@ private :
|
||||
int _currentLexerIndex = 0;
|
||||
int _currentThemeIndex = 0;
|
||||
|
||||
HWND _hCheckBold;
|
||||
HWND _hCheckItalic;
|
||||
HWND _hCheckUnderline;
|
||||
HWND _hFontNameCombo;
|
||||
HWND _hFontSizeCombo;
|
||||
HWND _hSwitch2ThemeCombo;
|
||||
HWND _hCheckBold = nullptr;
|
||||
HWND _hCheckItalic = nullptr;
|
||||
HWND _hCheckUnderline = nullptr;
|
||||
HWND _hFontNameCombo = nullptr;
|
||||
HWND _hFontSizeCombo = nullptr;
|
||||
HWND _hSwitch2ThemeCombo = nullptr;
|
||||
|
||||
HWND _hFgColourStaticText;
|
||||
HWND _hBgColourStaticText;
|
||||
HWND _hFontNameStaticText;
|
||||
HWND _hFontSizeStaticText;
|
||||
HWND _hStyleInfoStaticText;
|
||||
//TCHAR _originalWarning[256];
|
||||
HWND _hFgColourStaticText = nullptr;
|
||||
HWND _hBgColourStaticText = nullptr;
|
||||
HWND _hFontNameStaticText = nullptr;
|
||||
HWND _hFontSizeStaticText = nullptr;
|
||||
HWND _hStyleInfoStaticText = nullptr;
|
||||
|
||||
LexerStylerArray _lsArray;
|
||||
StyleArray _globalStyles;
|
||||
|
@ -45,8 +45,8 @@
|
||||
class DockingSplitter : public Window
|
||||
{
|
||||
public :
|
||||
DockingSplitter() : _isLeftButtonDown(FALSE), _hMessage(NULL) {};
|
||||
~DockingSplitter(){};
|
||||
DockingSplitter() = default;
|
||||
~DockingSplitter() = default;
|
||||
|
||||
virtual void destroy() {};
|
||||
|
||||
@ -59,14 +59,14 @@ protected:
|
||||
LRESULT runProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam);
|
||||
|
||||
private:
|
||||
HWND _hMessage;
|
||||
HWND _hMessage = nullptr;
|
||||
|
||||
BOOL _isLeftButtonDown;
|
||||
POINT _ptOldPos;
|
||||
UINT _flags;
|
||||
BOOL _isLeftButtonDown = FALSE;
|
||||
POINT _ptOldPos = {0, 0};
|
||||
UINT _flags = 0;
|
||||
|
||||
static BOOL _isVertReg;
|
||||
static BOOL _isHoriReg;
|
||||
static BOOL _isVertReg;
|
||||
static BOOL _isHoriReg;
|
||||
};
|
||||
|
||||
#endif // DOCKINGSPLITTER_H
|
||||
|
@ -38,17 +38,15 @@ struct MapPosition;
|
||||
|
||||
class DocumentPeeker : public StaticDialog {
|
||||
public:
|
||||
DocumentPeeker(): StaticDialog() {};
|
||||
DocumentPeeker() = default;
|
||||
|
||||
void init(HINSTANCE hInst, HWND hPere) {
|
||||
Window::init(hInst, hPere);
|
||||
};
|
||||
|
||||
void doDialog(POINT p, Buffer *buf, ScintillaEditView & scintSource);
|
||||
|
||||
void syncDisplay(Buffer *buf, ScintillaEditView & scintSource);
|
||||
|
||||
|
||||
void setParent(HWND parent2set){
|
||||
_hParent = parent2set;
|
||||
};
|
||||
|
@ -58,12 +58,12 @@ friend class FileBrowser;
|
||||
friend class FolderInfo;
|
||||
|
||||
public:
|
||||
FileInfo() = delete; // constructor by default is forbidden
|
||||
FileInfo(const generic_string & name, FolderInfo *parent) : _name(name), _parent(parent) {};
|
||||
generic_string getName() const { return _name; };
|
||||
void setName(generic_string name) { _name = name; };
|
||||
|
||||
private:
|
||||
FileInfo(){}; // constructor by default is forbidden
|
||||
FolderInfo *_parent = nullptr;
|
||||
generic_string _name;
|
||||
};
|
||||
@ -75,6 +75,7 @@ friend class FileBrowser;
|
||||
friend class FolderUpdater;
|
||||
|
||||
public:
|
||||
FolderInfo() = delete; // constructor by default is forbidden
|
||||
FolderInfo(const generic_string & name, FolderInfo *parent) : _name(name), _parent(parent) {};
|
||||
void setRootPath(const generic_string& rootPath) { _rootPath = rootPath; };
|
||||
generic_string getRootPath() const { return _rootPath; };
|
||||
@ -88,7 +89,6 @@ public:
|
||||
bool renameInStructure(std::vector<generic_string> linarPathArrayFrom, std::vector<generic_string> linarPathArrayTo);
|
||||
|
||||
private:
|
||||
FolderInfo(){}; // constructor by default is forbidden
|
||||
std::vector<FolderInfo> _subFolders;
|
||||
std::vector<FileInfo> _files;
|
||||
FolderInfo *_parent = nullptr;
|
||||
@ -104,8 +104,7 @@ class FolderUpdater {
|
||||
friend class FileBrowser;
|
||||
public:
|
||||
FolderUpdater(const FolderInfo& fi, FileBrowser *pFileBrowser) : _rootFolder(fi), _pFileBrowser(pFileBrowser) {};
|
||||
~FolderUpdater() {};
|
||||
//bool updateTree(DWORD action, const std::vector<generic_string> & file2Change); // postMessage to FileBrowser to upgrade GUI
|
||||
~FolderUpdater() = default;
|
||||
|
||||
void startWatcher();
|
||||
void stopWatcher();
|
||||
|
@ -40,7 +40,7 @@
|
||||
class FindCharsInRangeDlg : public StaticDialog
|
||||
{
|
||||
public :
|
||||
FindCharsInRangeDlg() : StaticDialog() {};
|
||||
FindCharsInRangeDlg() = default;
|
||||
|
||||
void init(HINSTANCE hInst, HWND hPere, ScintillaEditView **ppEditView) {
|
||||
Window::init(hInst, hPere);
|
||||
|
@ -49,7 +49,8 @@ public:
|
||||
virtual void parse(std::vector<foundInfo> & foundInfos, size_t begin, size_t end, ScintillaEditView **ppEditView, generic_string classStructName = TEXT("")) = 0;
|
||||
void funcParse(std::vector<foundInfo> & foundInfos, size_t begin, size_t end, ScintillaEditView **ppEditView, generic_string classStructName = TEXT(""), const std::vector< std::pair<int, int> > * commentZones = NULL);
|
||||
bool isInZones(int pos2Test, const std::vector< std::pair<int, int> > & zones);
|
||||
virtual ~FunctionParser() {};
|
||||
virtual ~FunctionParser() = default;
|
||||
|
||||
protected:
|
||||
generic_string _id;
|
||||
generic_string _displayName;
|
||||
@ -66,6 +67,7 @@ protected:
|
||||
class FunctionZoneParser : public FunctionParser
|
||||
{
|
||||
public:
|
||||
FunctionZoneParser() = delete;
|
||||
FunctionZoneParser(const TCHAR *id, const TCHAR *displayName, const TCHAR *commentExpr, const generic_string& rangeExpr, const generic_string& openSymbole, const generic_string& closeSymbole,
|
||||
const std::vector<generic_string>& classNameExprArray, const generic_string& functionExpr, const std::vector<generic_string>& functionNameExprArray):
|
||||
FunctionParser(id, displayName, commentExpr, functionExpr, functionNameExprArray, classNameExprArray), _rangeExpr(rangeExpr), _openSymbole(openSymbole), _closeSymbole(closeSymbole) {};
|
||||
|
@ -35,8 +35,9 @@
|
||||
class BabyGridWrapper : public Window
|
||||
{
|
||||
public :
|
||||
BabyGridWrapper() : Window(){};
|
||||
~BabyGridWrapper(){};
|
||||
BabyGridWrapper() = default;
|
||||
~BabyGridWrapper() = default;
|
||||
|
||||
virtual void init(HINSTANCE hInst, HWND parent, int16_t id);
|
||||
virtual void destroy() {
|
||||
::DestroyWindow(_hSelf);
|
||||
|
@ -41,7 +41,7 @@ public:
|
||||
_shortcutFilter = TEXT("");
|
||||
_dialogInitDone = false;
|
||||
};
|
||||
~ShortcutMapper() {};
|
||||
~ShortcutMapper() = default;
|
||||
|
||||
void init(HINSTANCE hInst, HWND parent, GridState initState = STATE_MENU) {
|
||||
Window::init(hInst, parent);
|
||||
|
@ -38,7 +38,7 @@ const int nbMax = 45;
|
||||
class IconList
|
||||
{
|
||||
public :
|
||||
IconList() {};
|
||||
IconList() = default;
|
||||
void create(HINSTANCE hInst, int iconSize);
|
||||
void create(int iconSize, HINSTANCE hInst, int *iconIDArray, int iconIDArraySize);
|
||||
|
||||
@ -76,7 +76,7 @@ typedef std::vector<IconList> IconListVector;
|
||||
class IconLists
|
||||
{
|
||||
public :
|
||||
IconLists() {};
|
||||
IconLists() = default;
|
||||
HIMAGELIST getImageListHandle(int index) const {
|
||||
return _iconListVector[index].getHandle();
|
||||
};
|
||||
@ -92,7 +92,7 @@ const int HLIST_DISABLE = 2;
|
||||
class ToolBarIcons : public IconLists
|
||||
{
|
||||
public :
|
||||
ToolBarIcons() : _nbCmd(0) {};
|
||||
ToolBarIcons() = default;
|
||||
|
||||
void init(ToolBarButtonUnit *buttonUnitArray, int arraySize);
|
||||
void create(HINSTANCE hInst, int iconSize);
|
||||
@ -133,6 +133,6 @@ public :
|
||||
|
||||
private :
|
||||
ToolBarIconIDs _tbiis;
|
||||
unsigned int _nbCmd;
|
||||
unsigned int _nbCmd = 0;
|
||||
};
|
||||
|
||||
|
@ -44,7 +44,7 @@ struct Version
|
||||
unsigned long _patch = 0;
|
||||
unsigned long _build = 0;
|
||||
|
||||
Version() {};
|
||||
Version() = default;
|
||||
Version(const generic_string& versionStr);
|
||||
|
||||
void setVersionFrom(const generic_string& filePath);
|
||||
@ -89,7 +89,7 @@ struct PluginUpdateInfo
|
||||
bool _isVisible = true; // if false then it should not be displayed
|
||||
|
||||
generic_string describe();
|
||||
PluginUpdateInfo() {};
|
||||
PluginUpdateInfo() = default;
|
||||
PluginUpdateInfo(const generic_string& fullFilePath, const generic_string& fileName);
|
||||
};
|
||||
|
||||
@ -126,7 +126,7 @@ struct SortDisplayNameDecrease final
|
||||
class PluginViewList
|
||||
{
|
||||
public:
|
||||
PluginViewList() {};
|
||||
PluginViewList() = default;
|
||||
~PluginViewList() {
|
||||
_ui.destroy();
|
||||
for (auto i : _list)
|
||||
@ -172,7 +172,7 @@ class PluginsAdminDlg final : public StaticDialog
|
||||
{
|
||||
public :
|
||||
PluginsAdminDlg();
|
||||
~PluginsAdminDlg() {};
|
||||
~PluginsAdminDlg() = default;
|
||||
|
||||
void init(HINSTANCE hInst, HWND parent) {
|
||||
Window::init(hInst, parent);
|
||||
|
@ -38,7 +38,7 @@
|
||||
class SettingsDlg : public StaticDialog
|
||||
{
|
||||
public :
|
||||
SettingsDlg() {};
|
||||
SettingsDlg() = default;
|
||||
|
||||
private :
|
||||
INT_PTR CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam);
|
||||
@ -47,7 +47,7 @@ private :
|
||||
class BarsDlg : public StaticDialog
|
||||
{
|
||||
public :
|
||||
BarsDlg() {};
|
||||
BarsDlg() = default;
|
||||
private :
|
||||
INT_PTR CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam);
|
||||
};
|
||||
@ -55,7 +55,7 @@ private :
|
||||
class MarginsDlg : public StaticDialog
|
||||
{
|
||||
public :
|
||||
MarginsDlg() {};
|
||||
MarginsDlg() = default;
|
||||
virtual void destroy() {
|
||||
_verticalEdgeLineNbColVal.destroy();
|
||||
};
|
||||
@ -76,7 +76,7 @@ struct LangID_Name
|
||||
class DefaultNewDocDlg : public StaticDialog
|
||||
{
|
||||
public :
|
||||
DefaultNewDocDlg() {};
|
||||
DefaultNewDocDlg() = default;
|
||||
|
||||
private :
|
||||
std::vector<LangID_Name> _langList;
|
||||
@ -91,7 +91,7 @@ private :
|
||||
class DefaultDirectoryDlg : public StaticDialog
|
||||
{
|
||||
public :
|
||||
DefaultDirectoryDlg() {};
|
||||
DefaultDirectoryDlg() = default;
|
||||
|
||||
private :
|
||||
INT_PTR CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam);
|
||||
@ -100,7 +100,7 @@ private :
|
||||
class RecentFilesHistoryDlg : public StaticDialog
|
||||
{
|
||||
public :
|
||||
RecentFilesHistoryDlg() {};
|
||||
RecentFilesHistoryDlg() = default;
|
||||
virtual void destroy() {
|
||||
_nbHistoryVal.destroy();
|
||||
_customLenVal.destroy();
|
||||
@ -116,7 +116,7 @@ private :
|
||||
class LangMenuDlg : public StaticDialog
|
||||
{
|
||||
public :
|
||||
LangMenuDlg() {};
|
||||
LangMenuDlg() = default;
|
||||
virtual void destroy() {
|
||||
_tabSizeVal.destroy();
|
||||
};
|
||||
@ -131,7 +131,7 @@ private :
|
||||
class Highlighting : public StaticDialog
|
||||
{
|
||||
public :
|
||||
Highlighting() {};
|
||||
Highlighting() = default;
|
||||
|
||||
private :
|
||||
|
||||
@ -148,7 +148,8 @@ struct strCouple {
|
||||
class PrintSettingsDlg : public StaticDialog
|
||||
{
|
||||
public :
|
||||
PrintSettingsDlg(){};
|
||||
PrintSettingsDlg() = default;
|
||||
|
||||
private :
|
||||
INT_PTR CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam);
|
||||
std::vector<strCouple> varList;
|
||||
@ -158,7 +159,8 @@ private :
|
||||
class BackupDlg : public StaticDialog
|
||||
{
|
||||
public :
|
||||
BackupDlg() {};
|
||||
BackupDlg() = default;
|
||||
|
||||
private :
|
||||
void updateBackupGUI();
|
||||
INT_PTR CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam);
|
||||
@ -168,7 +170,7 @@ private :
|
||||
class AutoCompletionDlg : public StaticDialog
|
||||
{
|
||||
public :
|
||||
AutoCompletionDlg() {};
|
||||
AutoCompletionDlg() = default;
|
||||
private :
|
||||
URLCtrl _nbCharVal;
|
||||
INT_PTR CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam);
|
||||
@ -177,7 +179,7 @@ private :
|
||||
class MultiInstDlg : public StaticDialog
|
||||
{
|
||||
public :
|
||||
MultiInstDlg() {};
|
||||
MultiInstDlg() = default;
|
||||
|
||||
private :
|
||||
INT_PTR CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam);
|
||||
@ -186,7 +188,7 @@ private :
|
||||
class DelimiterSettingsDlg : public StaticDialog
|
||||
{
|
||||
public :
|
||||
DelimiterSettingsDlg() {};
|
||||
DelimiterSettingsDlg() = default;
|
||||
~DelimiterSettingsDlg() {
|
||||
if (_tip)
|
||||
::DestroyWindow(_tip);
|
||||
@ -206,7 +208,7 @@ private :
|
||||
class SettingsOnCloudDlg : public StaticDialog
|
||||
{
|
||||
public :
|
||||
SettingsOnCloudDlg() {};
|
||||
SettingsOnCloudDlg() = default;
|
||||
|
||||
private :
|
||||
INT_PTR CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam);
|
||||
@ -215,7 +217,7 @@ private :
|
||||
class SearchEngineChoiceDlg : public StaticDialog
|
||||
{
|
||||
public :
|
||||
SearchEngineChoiceDlg() {};
|
||||
SearchEngineChoiceDlg() = default;
|
||||
|
||||
private :
|
||||
INT_PTR CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam);
|
||||
@ -226,7 +228,7 @@ class PreferenceDlg : public StaticDialog
|
||||
friend class NativeLangSpeaker;
|
||||
|
||||
public :
|
||||
PreferenceDlg(){};
|
||||
PreferenceDlg() = default;
|
||||
|
||||
void init(HINSTANCE hInst, HWND parent) {
|
||||
Window::init(hInst, parent);
|
||||
|
@ -145,8 +145,8 @@ protected:
|
||||
class FileRelocalizerDlg : public StaticDialog
|
||||
{
|
||||
public :
|
||||
FileRelocalizerDlg() : StaticDialog() {};
|
||||
void init(HINSTANCE hInst, HWND parent){
|
||||
FileRelocalizerDlg() = default;
|
||||
void init(HINSTANCE hInst, HWND parent) {
|
||||
Window::init(hInst, parent);
|
||||
};
|
||||
|
||||
|
@ -44,9 +44,9 @@ struct TreeStateNode {
|
||||
|
||||
class TreeView : public Window {
|
||||
public:
|
||||
TreeView() : Window(), _isItemDragged(false) {};
|
||||
TreeView() = default;
|
||||
virtual ~TreeView() = default;
|
||||
|
||||
virtual ~TreeView() {};
|
||||
virtual void init(HINSTANCE hInst, HWND parent, int treeViewID);
|
||||
virtual void destroy();
|
||||
HTREEITEM addItem(const TCHAR *itemName, HTREEITEM hParentItem, int iImage, const TCHAR *filePath = NULL);
|
||||
@ -131,7 +131,7 @@ protected:
|
||||
// Drag and Drop operations
|
||||
HTREEITEM _draggedItem;
|
||||
HIMAGELIST _draggedImageList;
|
||||
bool _isItemDragged;
|
||||
bool _isItemDragged = false;
|
||||
std::vector<int> _canNotDragOutList;
|
||||
std::vector<int> _canNotDropInList;
|
||||
bool canBeDropped(HTREEITEM draggedItem, HTREEITEM targetItem);
|
||||
|
@ -39,7 +39,7 @@ void expandNppEnvironmentStrs(const TCHAR *strSrc, TCHAR *stringDest, size_t str
|
||||
|
||||
class Command {
|
||||
public :
|
||||
Command(){};
|
||||
Command() = default;
|
||||
explicit Command(TCHAR *cmd) : _cmdLine(cmd){};
|
||||
explicit Command(const generic_string& cmd) : _cmdLine(cmd){};
|
||||
HINSTANCE run(HWND hWnd);
|
||||
@ -54,7 +54,7 @@ private :
|
||||
class RunDlg : public Command, public StaticDialog
|
||||
{
|
||||
public :
|
||||
RunDlg() : StaticDialog() {};
|
||||
RunDlg() = default;
|
||||
|
||||
void doDialog(bool isRTL = false);
|
||||
virtual void destroy() {};
|
||||
|
@ -68,8 +68,8 @@ struct TBHDR
|
||||
class TabBar : public Window
|
||||
{
|
||||
public:
|
||||
TabBar() : Window() {};
|
||||
virtual ~TabBar() {};
|
||||
TabBar() = default;
|
||||
virtual ~TabBar() = default;
|
||||
virtual void destroy();
|
||||
virtual void init(HINSTANCE hInst, HWND hwnd, bool isVertical = false, bool isMultiLine = false);
|
||||
virtual void reSizeTo(RECT & rc2Ajust);
|
||||
@ -143,7 +143,7 @@ struct CloseButtonZone
|
||||
class TabBarPlus : public TabBar
|
||||
{
|
||||
public :
|
||||
TabBarPlus() : TabBar() {};
|
||||
TabBarPlus() = default;
|
||||
enum tabColourIndex {
|
||||
activeText, activeFocusedTop, activeUnfocusedTop, inactiveText, inactiveBg
|
||||
};
|
||||
|
@ -46,7 +46,7 @@ public:
|
||||
_rc.bottom = 0;
|
||||
};
|
||||
|
||||
virtual ~TaskList() {};
|
||||
virtual ~TaskList() = default;
|
||||
void init(HINSTANCE hInst, HWND hwnd, HIMAGELIST hImaLst, int nbItem, int index2set);
|
||||
virtual void destroy();
|
||||
void setFont(const TCHAR *fontName, int fontSize);
|
||||
|
@ -67,8 +67,8 @@ class TiXmlNode;
|
||||
class ToolBar : public Window
|
||||
{
|
||||
public :
|
||||
ToolBar():Window() {};
|
||||
virtual ~ToolBar(){};
|
||||
ToolBar() = default;
|
||||
virtual ~ToolBar() = default;
|
||||
|
||||
void initTheme(TiXmlDocument *toolIconsDocRoot);
|
||||
virtual bool init(HINSTANCE hInst, HWND hPere, toolBarStatusType type,
|
||||
|
@ -35,7 +35,7 @@
|
||||
class ToolTip : public Window
|
||||
{
|
||||
public :
|
||||
ToolTip() {};
|
||||
ToolTip() = default;
|
||||
|
||||
void destroy(){
|
||||
::DestroyWindow(_hSelf);
|
||||
|
@ -42,15 +42,17 @@ typedef Buffer * BufferID; //each buffer has unique ID by which it can be retrie
|
||||
struct SwitcherFileInfo {
|
||||
BufferID _bufID;
|
||||
int _iView;
|
||||
|
||||
SwitcherFileInfo() = delete;
|
||||
SwitcherFileInfo(BufferID buf, int view) : _bufID(buf), _iView(view){};
|
||||
};
|
||||
|
||||
class VerticalFileSwitcherListView : public Window
|
||||
{
|
||||
public:
|
||||
VerticalFileSwitcherListView() : Window() {};
|
||||
VerticalFileSwitcherListView() = default;
|
||||
virtual ~VerticalFileSwitcherListView() = default;
|
||||
|
||||
virtual ~VerticalFileSwitcherListView() {};
|
||||
virtual void init(HINSTANCE hInst, HWND parent, HIMAGELIST hImaLst);
|
||||
virtual void destroy();
|
||||
void initList();
|
||||
|
@ -39,9 +39,8 @@
|
||||
class RunMacroDlg : public StaticDialog
|
||||
{
|
||||
public :
|
||||
RunMacroDlg() : StaticDialog() {};
|
||||
~RunMacroDlg() {
|
||||
};
|
||||
RunMacroDlg() = default;
|
||||
~RunMacroDlg() = default;
|
||||
|
||||
void init(HINSTANCE hInst, HWND hPere/*, ScintillaEditView **ppEditView*/) {
|
||||
Window::init(hInst, hPere);
|
||||
|
@ -352,7 +352,7 @@ private :
|
||||
class Accelerator { //Handles accelerator keys for Notepad++ menu, including custom commands
|
||||
friend class ShortcutMapper;
|
||||
public:
|
||||
Accelerator() {};
|
||||
Accelerator() = default;
|
||||
~Accelerator() {
|
||||
if (_hAccTable)
|
||||
::DestroyAcceleratorTable(_hAccTable);
|
||||
@ -388,7 +388,7 @@ private:
|
||||
|
||||
class ScintillaAccelerator { //Handles accelerator keys for scintilla
|
||||
public:
|
||||
ScintillaAccelerator() {};
|
||||
ScintillaAccelerator() = default;
|
||||
void init(std::vector<HWND> * vScintillas, HMENU hMenu, HWND menuParent);
|
||||
void updateKeys();
|
||||
size_t nbScintillas() { return _vScintillas.size(); };
|
||||
|
@ -86,8 +86,8 @@ public:
|
||||
private:
|
||||
// X and Y DPI values are provided, though to date all
|
||||
// Windows OS releases have equal X and Y scale values
|
||||
int _dpiX;
|
||||
int _dpiY;
|
||||
int _dpiX = 0;
|
||||
int _dpiY = 0;
|
||||
|
||||
|
||||
void init() {
|
||||
|
@ -44,8 +44,6 @@ class LastRecentFileList
|
||||
public:
|
||||
LastRecentFileList() {
|
||||
_userMax = (NppParameters::getInstance()).getNbMaxRecentFile();
|
||||
for (int i = 0; i < NB_MAX_LRF_FILE; i++)
|
||||
_idFreeArray[i] = false;
|
||||
};
|
||||
|
||||
void initMenu(HMENU hMenu, int idBase, int posBase, Accelerator *accelerator, bool doSubMenu = false);
|
||||
@ -107,12 +105,11 @@ private:
|
||||
HMENU _hMenu = nullptr;
|
||||
int _posBase = -1;
|
||||
int _idBase = -1;
|
||||
bool _idFreeArray[NB_MAX_LRF_FILE];
|
||||
bool _idFreeArray[NB_MAX_LRF_FILE] = {false};
|
||||
bool _hasSeparators = false;
|
||||
bool _locked = false;
|
||||
|
||||
int find(const TCHAR *fn);
|
||||
|
||||
int popFirstAvailableID();
|
||||
void setAvailable(int id);
|
||||
};
|
||||
|
@ -36,7 +36,7 @@ const int DEFAULT_NB_NUMBER = 2;
|
||||
class ValueDlg : public StaticDialog
|
||||
{
|
||||
public :
|
||||
ValueDlg() : StaticDialog() {};
|
||||
ValueDlg() = default;
|
||||
void init(HINSTANCE hInst, HWND parent, int valueToSet, const TCHAR *text);
|
||||
int doDialog(POINT p, bool isRTL = false);
|
||||
void setNBNumber(int nbNumber) {
|
||||
@ -53,7 +53,7 @@ private :
|
||||
int _nbNumber = DEFAULT_NB_NUMBER;
|
||||
int _defaultValue = 0;
|
||||
generic_string _name;
|
||||
POINT _p;
|
||||
POINT _p = {0, 0};
|
||||
};
|
||||
|
||||
// 0 : sans fullscreen
|
||||
@ -66,32 +66,32 @@ const int buttonStatus_postit = 2;
|
||||
class ButtonDlg : public StaticDialog
|
||||
{
|
||||
public :
|
||||
ButtonDlg() : StaticDialog(), _buttonStatus(buttonStatus_nada) {};
|
||||
void init(HINSTANCE hInst, HWND parent){
|
||||
Window::init(hInst, parent);
|
||||
};
|
||||
ButtonDlg() = default;
|
||||
void init(HINSTANCE hInst, HWND parent){
|
||||
Window::init(hInst, parent);
|
||||
};
|
||||
|
||||
void doDialog(bool isRTL = false);
|
||||
void destroy() {};
|
||||
int getButtonStatus() const {
|
||||
return _buttonStatus;
|
||||
};
|
||||
void setButtonStatus(int buttonStatus) {
|
||||
_buttonStatus = buttonStatus;
|
||||
};
|
||||
void doDialog(bool isRTL = false);
|
||||
void destroy() {};
|
||||
int getButtonStatus() const {
|
||||
return _buttonStatus;
|
||||
};
|
||||
void setButtonStatus(int buttonStatus) {
|
||||
_buttonStatus = buttonStatus;
|
||||
};
|
||||
|
||||
void display(bool toShow = true) const {
|
||||
int cmdToShow = toShow?SW_SHOW:SW_HIDE;
|
||||
if (!toShow)
|
||||
{
|
||||
cmdToShow = (_buttonStatus != buttonStatus_nada)?SW_SHOW:SW_HIDE;
|
||||
}
|
||||
::ShowWindow(_hSelf, cmdToShow);
|
||||
};
|
||||
void display(bool toShow = true) const {
|
||||
int cmdToShow = toShow?SW_SHOW:SW_HIDE;
|
||||
if (!toShow)
|
||||
{
|
||||
cmdToShow = (_buttonStatus != buttonStatus_nada)?SW_SHOW:SW_HIDE;
|
||||
}
|
||||
::ShowWindow(_hSelf, cmdToShow);
|
||||
};
|
||||
|
||||
protected :
|
||||
INT_PTR CALLBACK run_dlgProc(UINT Message, WPARAM wParam, LPARAM);
|
||||
int _buttonStatus;
|
||||
int _buttonStatus = buttonStatus_nada;
|
||||
|
||||
};
|
||||
#endif //TABSIZE_DLG_H
|
||||
|
Loading…
Reference in New Issue
Block a user