diff options
Diffstat (limited to 'plugins/StartPosition/src/options.h')
-rw-r--r-- | plugins/StartPosition/src/options.h | 93 |
1 files changed, 93 insertions, 0 deletions
diff --git a/plugins/StartPosition/src/options.h b/plugins/StartPosition/src/options.h new file mode 100644 index 0000000000..8066cddbf7 --- /dev/null +++ b/plugins/StartPosition/src/options.h @@ -0,0 +1,93 @@ +/* +Copyright (C) 2012-17 Miranda NG project (https://miranda-ng.org) + +This program is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License +as published by the Free Software Foundation version 2 +of the License. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see <http://www.gnu.org/licenses/>. +*/ + +#pragma once + +#include "stdafx.h" + +enum ClistAlign : BYTE +{ + left, + right +}; + +enum ClistState : BYTE +{ + hidden, + minimized, + normal +}; + +struct ClistOptions +{ + CMOption<BYTE> isDocked; + CMOption<BYTE> state; + + CMOption<DWORD> x; + CMOption<DWORD> y; + CMOption<DWORD> width; + CMOption<DWORD> height; + + ClistOptions() : + isDocked(CLIST_MODULE_NAME, "Docked", 0), + state(CLIST_MODULE_NAME, "State", ClistState::normal), + x(CLIST_MODULE_NAME, "x", 0), + y(CLIST_MODULE_NAME, "y", 0), + width(CLIST_MODULE_NAME, "Width", 150), + height(CLIST_MODULE_NAME, "Height", 350) + { } +}; + +struct StartPositionOptions +{ + CMOption<BYTE> setTopPosition; + CMOption<BYTE> setBottomPosition; + CMOption<BYTE> setSidePosition; + CMOption<BYTE> clistAlign; + CMOption<BYTE> setClistWidth; + CMOption<BYTE> setClistStartState; + CMOption<BYTE> clistState; + + CMOption<DWORD> pixelsFromTop; + CMOption<DWORD> pixelsFromBottom; + CMOption<DWORD> pixelsFromSide; + CMOption<DWORD> clistWidth; + + StartPositionOptions(); +}; + +class COptionsDlg : public CPluginDlgBase +{ + CCtrlCheck chkPositionTop, chkPositionBottom, chkPositionSide, chkFromLeft, chkFromRight, chkWidth; + CCtrlEdit edtPositionTop, edtPositionBottom, edtPositionSide, edtWidth; + CCtrlCheck chkStartState, chkStartHidden, chkStartNormal; + +public: + COptionsDlg(); + + virtual void OnInitDialog() override; + virtual void OnApply() override; + +private: + void removeOldSettings(); + + void onCheck_PositionTop(CCtrlCheck*); + void onCheck_PositionBottom(CCtrlCheck*); + void onCheck_PositionSide(CCtrlCheck*); + void onCheck_Width(CCtrlCheck*); + void onCheck_StartState(CCtrlCheck*); +}; |