summaryrefslogtreecommitdiffstats
path: root/src/gui_w32.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2006-03-27 17:01:56 +0000
committerBram Moolenaar <Bram@vim.org>2006-03-27 17:01:56 +0000
commit3991dab8e0a3815bd5349c1ffa88476819971c48 (patch)
treecf81e7c822725142320f0ca0721357f34553cfb9 /src/gui_w32.c
parent899dddf88804af20d560b5277f1ca1bc4dd8e2b3 (diff)
updated for version 7.0cv7.0c
Diffstat (limited to 'src/gui_w32.c')
-rw-r--r--src/gui_w32.c51
1 files changed, 50 insertions, 1 deletions
diff --git a/src/gui_w32.c b/src/gui_w32.c
index 12d6071467..b25f50db9b 100644
--- a/src/gui_w32.c
+++ b/src/gui_w32.c
@@ -297,6 +297,10 @@ static void initialise_toolbar(void);
static int get_toolbar_bitmap(vimmenu_T *menu);
#endif
+#ifdef FEAT_GUI_TABLINE
+static void initialise_tabline(void);
+#endif
+
#ifdef FEAT_MBYTE_IME
static LRESULT _OnImeComposition(HWND hwnd, WPARAM dbcs, LPARAM param);
static char_u *GetResultStr(HWND hwnd, int GCS, int *lenp);
@@ -760,10 +764,11 @@ _WndProc(
case WM_SETTINGCHANGE:
return _OnSettingChange((UINT)wParam);
-#ifdef FEAT_TOOLBAR
+#if defined(FEAT_TOOLBAR) || defined(FEAT_GUI_TABLINE)
case WM_NOTIFY:
switch (((LPNMHDR) lParam)->code)
{
+# ifdef FEAT_TOOLBAR
case TTN_NEEDTEXT:
{
LPTOOLTIPTEXT lpttt;
@@ -785,7 +790,20 @@ _WndProc(
}
}
break;
+# endif
+# ifdef FEAT_GUI_TABLINE
+ case TCN_SELCHANGE:
+ if (gui_mch_showing_tabline()
+ && ((LPNMHDR)lParam)->hwndFrom == s_tabhwnd)
+ send_tabline_event(TabCtrl_GetCurSel(s_tabhwnd) + 1);
+ break;
+# endif
default:
+# ifdef FEAT_GUI_TABLINE
+ if (gui_mch_showing_tabline()
+ && ((LPNMHDR)lParam)->hwndFrom == s_tabhwnd)
+ return MyWindowProc(hwnd, uMsg, wParam, lParam);
+# endif
break;
}
break;
@@ -831,6 +849,19 @@ _WndProc(
result = MyWindowProc(hwnd, uMsg, wParam, lParam);
if (result == HTCLIENT)
{
+#ifdef FEAT_GUI_TABLINE
+ if (gui_mch_showing_tabline())
+ {
+ int yPos = GET_Y_LPARAM(lParam);
+ RECT rct;
+
+ /* If the cursor is on the GUI tabline, don't process this
+ * event */
+ GetWindowRect(s_textArea, &rct);
+ if (yPos < rct.top)
+ return result;
+ }
+#endif
gui_mch_get_winpos(&x, &y);
xPos -= x;
@@ -1280,6 +1311,12 @@ gui_mch_init(void)
*/
initialise_toolbar();
#endif
+#ifdef FEAT_GUI_TABLINE
+ /*
+ * Create the tabline
+ */
+ initialise_tabline();
+#endif
#ifdef MSWIN_FIND_REPLACE
/*
* Initialise the dialog box stuff
@@ -3884,6 +3921,18 @@ get_toolbar_bitmap(vimmenu_T *menu)
}
#endif
+#if defined(FEAT_GUI_TABLINE) || defined(PROTO)
+ static void
+initialise_tabline(void)
+{
+ InitCommonControls();
+
+ s_tabhwnd = CreateWindow(WC_TABCONTROL, "", WS_CHILD|TCS_FOCUSNEVER,
+ CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT,
+ CW_USEDEFAULT, s_hwnd, NULL, s_hinst, NULL);
+}
+#endif
+
#if defined(FEAT_OLE) || defined(FEAT_EVAL) || defined(PROTO)
/*
* Make the GUI window come to the foreground.