[IN_PROGRESS] Add multiline and vertical capacity for tab bar.
git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository@115 f5eea248-9336-0410-98b8-ebc06183d4e3
This commit is contained in:
parent
dfb0f2dadb
commit
05ac5e63cb
@ -284,7 +284,7 @@ void Notepad_plus::init(HINSTANCE hInst, HWND parent, const char *cmdLine, CmdLi
|
||||
_pluginsManager.notify(&scnN);
|
||||
|
||||
::ShowWindow(_hSelf, nppGUI._isMaximized?SW_MAXIMIZE:SW_SHOW);
|
||||
if (cmdLineParams->_isNoTab)
|
||||
if (cmdLineParams->_isNoTab || (nppGUI._tabStatus & TAB_HIDE))
|
||||
{
|
||||
::SendMessage(_hSelf, NPPM_HIDETABBAR, 0, TRUE);
|
||||
}
|
||||
@ -7236,8 +7236,12 @@ LRESULT Notepad_plus::runProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lPa
|
||||
bool oldVal = _mainDocTab.setHideTabBarStatus(hide);
|
||||
_subDocTab.setHideTabBarStatus(hide);
|
||||
::SendMessage(_hSelf, WM_SIZE, 0, 0);
|
||||
//::ShowWindow(_mainDocTab.getHSelf(), hide?SW_FORCEMINIMIZE:SW_SHOW);
|
||||
//::ShowWindow(_subDocTab.getHSelf(), hide?SW_FORCEMINIMIZE:SW_SHOW);
|
||||
|
||||
NppGUI & nppGUI = (NppGUI &)((NppParameters::getInstance())->getNppGUI());
|
||||
if (hide)
|
||||
nppGUI._tabStatus |= TAB_HIDE;
|
||||
else
|
||||
nppGUI._tabStatus &= ~TAB_HIDE;
|
||||
|
||||
return oldVal;
|
||||
}
|
||||
|
@ -380,9 +380,9 @@ BEGIN
|
||||
MENUITEM "Clone to another view", IDM_VIEW_CLONE_TO_ANOTHER_VIEW
|
||||
MENUITEM "Synchronize Vertical Scrolling", IDM_VIEW_SYNSCROLLV
|
||||
MENUITEM "Synchronize Horizontal Scrolling", IDM_VIEW_SYNSCROLLH
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Veritcal", IDM_VIEW_DRAWTABBAR_VERTICAL
|
||||
MENUITEM "Multiline", IDM_VIEW_DRAWTABBAR_MULTILINE
|
||||
//MENUITEM SEPARATOR
|
||||
//MENUITEM "Veritcal", IDM_VIEW_DRAWTABBAR_VERTICAL
|
||||
//MENUITEM "Multiline", IDM_VIEW_DRAWTABBAR_MULTILINE
|
||||
END
|
||||
|
||||
POPUP "For&mat"
|
||||
|
@ -1791,7 +1791,16 @@ void NppParameters::feedGUIParameters(TiXmlNode *node)
|
||||
else
|
||||
isFailed = true;
|
||||
}
|
||||
|
||||
val = element->Attribute("hide");
|
||||
if (val)
|
||||
{
|
||||
if (!strcmp(val, "yes"))
|
||||
_nppGUI._tabStatus |= TAB_HIDE;
|
||||
else if (!strcmp(val, "no"))
|
||||
_nppGUI._tabStatus |= 0;
|
||||
else
|
||||
isFailed = true;
|
||||
}
|
||||
if (isFailed)
|
||||
_nppGUI._tabStatus = oldValue;
|
||||
|
||||
@ -2649,6 +2658,9 @@ bool NppParameters::writeGUIParams()
|
||||
pStr = (_nppGUI._tabStatus & TAB_MULTILINE)?"yes":"no";
|
||||
element->SetAttribute("multiLine", pStr);
|
||||
|
||||
pStr = (_nppGUI._tabStatus & TAB_HIDE)?"yes":"no";
|
||||
element->SetAttribute("hide", pStr);
|
||||
|
||||
}
|
||||
else if (!strcmp(nm, "ScintillaViewsSplitter"))
|
||||
{
|
||||
|
@ -43,14 +43,15 @@ const int UDD_DOCKED = 2; // 0000 0010
|
||||
// 2 : 0000 0010 hide & docked
|
||||
// 3 : 0000 0011 show & docked
|
||||
|
||||
const int TAB_DRAWTOPBAR = 1; // 0000 0001
|
||||
const int TAB_DRAWINACTIVETAB = 2; // 0000 0010
|
||||
const int TAB_DRAGNDROP = 4; // 0000 0100
|
||||
const int TAB_REDUCE = 8; // 0000 1000
|
||||
const int TAB_CLOSEBUTTON = 16; // 0001 0000
|
||||
const int TAB_DBCLK2CLOSE = 32; // 0010 0000
|
||||
const int TAB_VERTICAL = 64; // 0100 0000
|
||||
const int TAB_MULTILINE = 128; // 1000 0000
|
||||
const int TAB_DRAWTOPBAR = 1; // 0000 0001
|
||||
const int TAB_DRAWINACTIVETAB = 2; // 0000 0010
|
||||
const int TAB_DRAGNDROP = 4; // 0000 0100
|
||||
const int TAB_REDUCE = 8; // 0000 1000
|
||||
const int TAB_CLOSEBUTTON = 16; // 0001 0000
|
||||
const int TAB_DBCLK2CLOSE = 32; // 0010 0000
|
||||
const int TAB_VERTICAL = 64; // 0100 0000
|
||||
const int TAB_MULTILINE = 128; // 1000 0000
|
||||
const int TAB_HIDE = 256; //1 0000 0000
|
||||
|
||||
enum formatType {WIN_FORMAT, MAC_FORMAT, UNIX_FORMAT};
|
||||
|
||||
|
@ -145,6 +145,7 @@ BOOL CALLBACK BarsDlg::run_dlgProc(UINT Message, WPARAM wParam, LPARAM lParam)
|
||||
::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_TAB_HIDE, BM_SETCHECK, tabBarStatus & TAB_HIDE, 0);
|
||||
|
||||
::SendDlgItemMessage(_hSelf, IDC_CHECK_SHOWSTATUSBAR, BM_SETCHECK, showStatus, 0);
|
||||
|
||||
|
@ -145,8 +145,8 @@
|
||||
#define IDM_VIEW_REFRESHTABAR (IDM_VIEW + 40)
|
||||
#define IDM_VIEW_WRAP_SYMBOL (IDM_VIEW + 41)
|
||||
#define IDM_VIEW_HIDELINES (IDM_VIEW + 42)
|
||||
#define IDM_VIEW_DRAWTABBAR_VERTICAL (IDM_VIEW + 43)
|
||||
#define IDM_VIEW_DRAWTABBAR_MULTILINE (IDM_VIEW + 44)
|
||||
//#define IDM_VIEW_DRAWTABBAR_VERTICAL (IDM_VIEW + 43)
|
||||
//#define IDM_VIEW_DRAWTABBAR_MULTILINE (IDM_VIEW + 44)
|
||||
//#define (IDM_VIEW + 45)
|
||||
|
||||
#define IDM_VIEW_FOLD (IDM_VIEW + 50)
|
||||
|
Loading…
Reference in New Issue
Block a user