diff options
author | mdejong <mdejong> | 2004-09-23 00:56:13 (GMT) |
---|---|---|
committer | mdejong <mdejong> | 2004-09-23 00:56:13 (GMT) |
commit | a5886e42f370fd93341943130884c3f271c4d119 (patch) | |
tree | a5ef654dd2cffd06d968ff35befb088f3e4a8054 /generic/tkIntPlatDecls.h | |
parent | de0d8e4322d9601ff5a95bf50c8d2c9d0065accf (diff) | |
download | tk-a5886e42f370fd93341943130884c3f271c4d119.zip tk-a5886e42f370fd93341943130884c3f271c4d119.tar.gz tk-a5886e42f370fd93341943130884c3f271c4d119.tar.bz2 |
* generic/tkInt.decls: Add decl for TkWinGetPlatformTheme.
It is only defined under Win32.
* generic/tkIntPlatDecls.h: Regen.
* generic/tkStubInit.c: Regen.
* win/tkWinInt.h: Define TK_THEME_WIN_CLASSIC and
TK_THEME_WIN_XP.
* win/tkWinMenu.c (DrawMenuEntryAccelerator, DrawMenuEntryLabel):
Draw a disabled 3D text highlight for the accelerator only
with the Win95/98 look. Same goes for the menu entry text.
* win/tkWinX.c (TkWinGetPlatformId, TkWinGetPlatformTheme):
Automatically detect the Windows theme in use and return
either TK_THEME_WIN_CLASSIC or TK_THEME_WIN_XP when the
TkWinGetPlatformTheme function is invoked.
[Patch 866194]
* win/tkWinMenu.c: only provide a submenu handle when the
MF_POPUP flag is given, fixing a recently-introduced crash
when submenus are disabled. Also better error checking for
this sort of situation in the future.
* win/tkWinMenu.c (ReconfigureWindowsMenu): Fix drawing of a disabled
(TkWinHandleMenuEvent, DrawMenuEntryArrow): cascade menu arrow. Tk was
displaying a disabled cascade menu arrow in black instead of
gray. This was caused by a bug in the Win32 code for user drawn
menu items. The fix is to avoid telling Windows that the menu item
is a cascade type and then draw the gray arrow bitmap on our own.
[Patch 865842]
* win/tkWinMenu.c (DrawWindowsSystemBitmap): Fix a strange Win32
bug where the logical coordinates returned by a call to DPtoLP are
wrong the first time a menu is posted. This bug manifested itself
by drawing the bitmap in the wrong place in a menu. The fix was
to pass the newly created DC instead of the DC from the window.
* win/tkWinMenu.c (DrawMenuEntryAccelerator):
(DrawMenuEntryLabel): When drawing the label text and accelerator
text for a disabled menu entry be sure to draw a 3D highlight.
The only exception to this is when a disabled menu entry is
highlighted, in that case do not draw a 3D hightlight.
* win/tkWinMenu.c (DrawMenuEntryAccelerator, DrawMenuEntryArrow):
Move the unused menu arrow drawing code in
DrawMenuEntryAccelerator into a new function named
DrawMenuEntryArrow. This makes no functional change but it will
make it easier to fix things in the future.
Diffstat (limited to 'generic/tkIntPlatDecls.h')
-rw-r--r-- | generic/tkIntPlatDecls.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/generic/tkIntPlatDecls.h b/generic/tkIntPlatDecls.h index 6719448..f8633a9 100644 --- a/generic/tkIntPlatDecls.h +++ b/generic/tkIntPlatDecls.h @@ -9,7 +9,7 @@ * Copyright (c) 1998-1999 by Scriptics Corporation. * All rights reserved. * - * RCS: @(#) $Id: tkIntPlatDecls.h,v 1.15 2002/12/08 00:46:51 hobbs Exp $ + * RCS: @(#) $Id: tkIntPlatDecls.h,v 1.15.2.1 2004/09/23 00:56:14 mdejong Exp $ */ #ifndef _TKINTPLATDECLS @@ -123,6 +123,8 @@ EXTERN Tcl_Obj * TkWinGetMenuSystemDefault _ANSI_ARGS_(( EXTERN int TkWinGetPlatformId _ANSI_ARGS_((void)); /* 34 */ EXTERN void TkWinSetHINSTANCE _ANSI_ARGS_((HINSTANCE hInstance)); +/* 35 */ +EXTERN int TkWinGetPlatformTheme _ANSI_ARGS_((void)); #endif /* __WIN32__ */ #ifdef MAC_TCL /* 0 */ @@ -462,6 +464,7 @@ typedef struct TkIntPlatStubs { Tcl_Obj * (*tkWinGetMenuSystemDefault) _ANSI_ARGS_((Tk_Window tkwin, CONST char * dbName, CONST char * className)); /* 32 */ int (*tkWinGetPlatformId) _ANSI_ARGS_((void)); /* 33 */ void (*tkWinSetHINSTANCE) _ANSI_ARGS_((HINSTANCE hInstance)); /* 34 */ + int (*tkWinGetPlatformTheme) _ANSI_ARGS_((void)); /* 35 */ #endif /* __WIN32__ */ #ifdef MAC_TCL void (*tkGenerateActivateEvents) _ANSI_ARGS_((TkWindow * winPtr, int active)); /* 0 */ @@ -757,6 +760,10 @@ extern TkIntPlatStubs *tkIntPlatStubsPtr; #define TkWinSetHINSTANCE \ (tkIntPlatStubsPtr->tkWinSetHINSTANCE) /* 34 */ #endif +#ifndef TkWinGetPlatformTheme +#define TkWinGetPlatformTheme \ + (tkIntPlatStubsPtr->tkWinGetPlatformTheme) /* 35 */ +#endif #endif /* __WIN32__ */ #ifdef MAC_TCL #ifndef TkGenerateActivateEvents |