From dfb0f2dadb1569a79669a76e41849874b8a38b8f Mon Sep 17 00:00:00 2001 From: donho Date: Wed, 23 Jan 2008 00:26:07 +0000 Subject: [PATCH] [IN_PROGRESS] Add multiline and vertical capacity for tab bar. git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository@114 f5eea248-9336-0410-98b8-ebc06183d4e3 --- PowerEditor/src/Notepad_plus.cpp | 1 + PowerEditor/src/ScitillaComponent/DocTabView.h | 18 ++++++++++-------- .../WinControls/Preference/preferenceDlg.cpp | 2 ++ PowerEditor/src/WinControls/TabBar/TabBar.h | 6 +++++- 4 files changed, 18 insertions(+), 9 deletions(-) diff --git a/PowerEditor/src/Notepad_plus.cpp b/PowerEditor/src/Notepad_plus.cpp index ea96a90aa..7469bcf37 100644 --- a/PowerEditor/src/Notepad_plus.cpp +++ b/PowerEditor/src/Notepad_plus.cpp @@ -5743,6 +5743,7 @@ LRESULT Notepad_plus::runProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lPa TabBarPlus::setDbClk2Close((tabBarStatus & TAB_DBCLK2CLOSE) != 0); TabBarPlus::setVertical((tabBarStatus & TAB_VERTICAL) != 0); TabBarPlus::setMultiLine((tabBarStatus & TAB_MULTILINE) != 0); + //TabBarPlus::setNoTabBar((tabBarStatus & TAB_NOTABBAR) != 0); //--Splitter Section--// bool isVertical = (nppGUI._splitterPos == POS_VERTICAL); diff --git a/PowerEditor/src/ScitillaComponent/DocTabView.h b/PowerEditor/src/ScitillaComponent/DocTabView.h index 013c0b76c..b90ed7aed 100644 --- a/PowerEditor/src/ScitillaComponent/DocTabView.h +++ b/PowerEditor/src/ScitillaComponent/DocTabView.h @@ -74,16 +74,18 @@ public : }; virtual void reSizeTo(RECT & rc) { - if (!_hideTabBarStatus) + if (_hideTabBarStatus) { - //::ShowWindow(getHSelf(), SW_SHOW); - TabBar::reSizeTo(rc); - //rc.top += 2; - //rc.right -= 4; - //rc.bottom -= 26; + RECT rcTmp = rc; + + TabBar::reSizeTo(rcTmp); + _pView->reSizeTo(rc); + } + else + { + TabBar::reSizeTo(rc); + _pView->reSizeTo(rc); } - - _pView->reSizeTo(rc); }; private : diff --git a/PowerEditor/src/WinControls/Preference/preferenceDlg.cpp b/PowerEditor/src/WinControls/Preference/preferenceDlg.cpp index 338edd77b..3c0d4f645 100644 --- a/PowerEditor/src/WinControls/Preference/preferenceDlg.cpp +++ b/PowerEditor/src/WinControls/Preference/preferenceDlg.cpp @@ -143,6 +143,8 @@ BOOL CALLBACK BarsDlg::run_dlgProc(UINT Message, WPARAM wParam, LPARAM lParam) ::SendDlgItemMessage(_hSelf, IDC_CHECK_DRAWINACTIVE, BM_SETCHECK, tabBarStatus & TAB_DRAWINACTIVETAB, 0); ::SendDlgItemMessage(_hSelf, IDC_CHECK_ENABLETABCLOSE, BM_SETCHECK, tabBarStatus & TAB_CLOSEBUTTON, 0); ::SendDlgItemMessage(_hSelf, IDC_CHECK_DBCLICK2CLOSE, BM_SETCHECK, tabBarStatus & TAB_DBCLK2CLOSE, 0); + ::SendDlgItemMessage(_hSelf, IDC_CHECK_TAB_VERTICAL, BM_SETCHECK, tabBarStatus & TAB_VERTICAL, 0); + ::SendDlgItemMessage(_hSelf, IDC_CHECK_TAB_MULTILINE, BM_SETCHECK, tabBarStatus & TAB_MULTILINE, 0); ::SendDlgItemMessage(_hSelf, IDC_CHECK_SHOWSTATUSBAR, BM_SETCHECK, showStatus, 0); diff --git a/PowerEditor/src/WinControls/TabBar/TabBar.h b/PowerEditor/src/WinControls/TabBar/TabBar.h index 2c17200a5..417e9db0f 100644 --- a/PowerEditor/src/WinControls/TabBar/TabBar.h +++ b/PowerEditor/src/WinControls/TabBar/TabBar.h @@ -269,7 +269,11 @@ public : _isCtrlMultiLine = b; doMultiLine(); }; - +/* + static void setNoTabBar(bool b) { + + }; +*/ protected: // it's the boss to decide if we do the drag N drop static bool _doDragNDrop;