1
0
forked from aniani/vim

updated for version 7.0c01

This commit is contained in:
Bram Moolenaar
2006-03-27 20:58:26 +00:00
parent 2e2a2815e5
commit afa24990b3
4 changed files with 48 additions and 15 deletions

View File

@@ -1776,7 +1776,7 @@ gui_mac_doInGrowClick(Point where, WindowPtr whichWindow)
newHeight = NewContentRect.bottom - NewContentRect.top;
gui_resize_shell(newWidth, newHeight);
gui_mch_set_bg_color(gui.back_pixel);
gui_set_shellsize(TRUE, FALSE);
gui_set_shellsize(TRUE, FALSE, RESIZE_BOTH);
}
/*
@@ -1820,7 +1820,7 @@ gui_mac_doInZoomClick(EventRecord *theEvent, WindowPtr whichWindow)
GetWindowBounds(whichWindow, kWindowContentRgn, &r);
gui_resize_shell(r.right - r.left, r.bottom - r.top);
gui_mch_set_bg_color(gui.back_pixel);
gui_set_shellsize(TRUE, FALSE);
gui_set_shellsize(TRUE, FALSE, RESIZE_BOTH);
}
/*
@@ -3202,7 +3202,8 @@ gui_mch_set_shellsize(
int min_width,
int min_height,
int base_width,
int base_height)
int base_height,
int direction)
{
CGrafPtr VimPort;
Rect VimBound;

View File

@@ -392,7 +392,7 @@ gui_ph_handle_window_cb( PtWidget_t *widget, void *data, PtCallbackInfo_t *info
height -= (pg_margin_top + pg_margin_bottom);
#endif
gui_resize_shell( *width, *height );
gui_set_shellsize( FALSE, FALSE );
gui_set_shellsize( FALSE, FALSE, RESIZE_BOTH );
is_ignore_draw = FALSE;
PtEndFlux( gui.vimContainer );
PtContainerRelease( gui.vimContainer );
@@ -825,7 +825,7 @@ gui_ph_handle_window_open(
void *data,
PtCallbackInfo_t *info )
{
gui_set_shellsize( FALSE, TRUE );
gui_set_shellsize( FALSE, TRUE, RESIZE_BOTH );
return( Pt_CONTINUE );
}
@@ -1660,7 +1660,8 @@ gui_mch_set_winpos(int x, int y)
void
gui_mch_set_shellsize(int width, int height,
int min_width, int min_height, int base_width, int base_height)
int min_width, int min_height, int base_width, int base_height,
int direction)
{
PhDim_t window_size = { width, height };
PhDim_t min_size = { min_width, min_height };

View File

@@ -456,7 +456,7 @@ gui_mswin_get_menu_height(
if (fix_window && menu_height != old_menu_height)
{
old_menu_height = menu_height;
gui_set_shellsize(FALSE, FALSE);
gui_set_shellsize(FALSE, FALSE, RESIZE_VERT);
}
return menu_height;
@@ -706,6 +706,29 @@ _WndProc(
HANDLE_MSG(hwnd, WM_WINDOWPOSCHANGED, _OnWindowPosChanged);
#endif
#ifdef FEAT_GUI_TABLINE
case WM_RBUTTONUP:
{
if (gui_mch_showing_tabline())
{
POINT pt;
RECT rect;
/*
* If the cursor is on the tabline, display the tab menu
*/
GetCursorPos((LPPOINT)&pt);
GetWindowRect(s_textArea, &rect);
if (pt.y < rect.top)
{
show_tabline_popup_menu();
return 0;
}
}
return MyWindowProc(hwnd, uMsg, wParam, lParam);
}
#endif
case WM_QUERYENDSESSION: /* System wants to go down. */
gui_shell_closed(); /* Will exit when no changed buffers. */
return FALSE; /* Do NOT allow system to go down. */
@@ -797,6 +820,12 @@ _WndProc(
&& ((LPNMHDR)lParam)->hwndFrom == s_tabhwnd)
send_tabline_event(TabCtrl_GetCurSel(s_tabhwnd) + 1);
break;
case NM_RCLICK:
if (gui_mch_showing_tabline()
&& ((LPNMHDR)lParam)->hwndFrom == s_tabhwnd)
show_tabline_popup_menu();
break;
# endif
default:
# ifdef FEAT_GUI_TABLINE
@@ -1375,7 +1404,8 @@ get_work_area(RECT *spi_rect)
/*ARGSUSED*/
void
gui_mch_set_shellsize(int width, int height,
int min_width, int min_height, int base_width, int base_height)
int min_width, int min_height, int base_width, int base_height,
int direction)
{
RECT workarea_rect;
int win_width, win_height;
@@ -1413,16 +1443,17 @@ gui_mch_set_shellsize(int width, int height,
;
/* if the window is going off the screen, move it on to the screen */
if (win_xpos + win_width > workarea_rect.right)
if ((direction & RESIZE_HOR) && win_xpos + win_width > workarea_rect.right)
win_xpos = workarea_rect.right - win_width;
if (win_xpos < workarea_rect.left)
if ((direction & RESIZE_HOR) && win_xpos < workarea_rect.left)
win_xpos = workarea_rect.left;
if (win_ypos + win_height > workarea_rect.bottom)
if ((direction & RESIZE_VERT)
&& win_ypos + win_height > workarea_rect.bottom)
win_ypos = workarea_rect.bottom - win_height;
if (win_ypos < workarea_rect.top)
if ((direction & RESIZE_VERT) && win_ypos < workarea_rect.top)
win_ypos = workarea_rect.top;
/* When the taskbar is placed on the left or top of the screen,

View File

@@ -35,6 +35,6 @@
*/
#define VIM_VERSION_NODOT "vim70c"
#define VIM_VERSION_SHORT "7.0c"
#define VIM_VERSION_MEDIUM "7.0c BETA"
#define VIM_VERSION_LONG "VIM - Vi IMproved 7.0c BETA (2006 Mar 27)"
#define VIM_VERSION_LONG_DATE "VIM - Vi IMproved 7.0c BETA (2006 Mar 27, compiled "
#define VIM_VERSION_MEDIUM "7.0c01 BETA"
#define VIM_VERSION_LONG "VIM - Vi IMproved 7.0c01 BETA (2006 Mar 27)"
#define VIM_VERSION_LONG_DATE "VIM - Vi IMproved 7.0c01 BETA (2006 Mar 27, compiled "