diff options
author | das <das> | 2004-11-11 01:26:40 (GMT) |
---|---|---|
committer | das <das> | 2004-11-11 01:26:40 (GMT) |
commit | ce94eed8e3c51494a411e1389946fabf9923ff43 (patch) | |
tree | f24f480319309f3272f2b41ab1563f81c89ae1fc /macosx/tkMacOSXButton.c | |
parent | f4d485d83668861b7724e5349c8b5c3d4f70e28c (diff) | |
download | tk-ce94eed8e3c51494a411e1389946fabf9923ff43.zip tk-ce94eed8e3c51494a411e1389946fabf9923ff43.tar.gz tk-ce94eed8e3c51494a411e1389946fabf9923ff43.tar.bz2 |
* generic/tkMain.c:
* macosx/tkMacOSXAppInit.c (removed):
* macosx/Wish.pbproj/project.pbxproj:
* macosx/tkMacOSXInit.c:
* macosx/tkMacOSXInt.h: changes to make TkAqua dynamically loadable,
enabling [package require Tk] from tclsh. Startup code from
tkMacOSXAppInit.c moved into tkMacOSXInit.c, added code that
notifies the window server that an unbundled executable is a full
GUI application after loading Tk. [Patch 1035348]
* doc/wm.n: documented [wm attributes] on Mac OS X. [Bug 606665]
* macosx/tkMacOSXWm.c: implemented TIP 222 [wm attributes -alpha] on
Mac OS X. [Patch 892194]
WmIconbitmapCmd: adopted FSRef changes from [wm atttrs -titlepath].
* macosx/tkMacOSXButton.c:
* macosx/tkMacOSXMenus.c:
* macosx/tkMacOSXRegion.c:
* macosx/tkMacOSXSubwindows.c: synced spacing/formatting with HEAD.
* macosx/tkMacOSXMouseEvent.c: endianness fixes.
* macosx/Wish.pbproj/project.pbxproj: corrected path to html help
inside framework.
* macosx/Makefile: prevent parallel make from building several
targets at the same time.
Ensure that xcodebuild will use Wish.pbproj project even if a .xcode
project is also present.
Diffstat (limited to 'macosx/tkMacOSXButton.c')
-rw-r--r-- | macosx/tkMacOSXButton.c | 51 |
1 files changed, 26 insertions, 25 deletions
diff --git a/macosx/tkMacOSXButton.c b/macosx/tkMacOSXButton.c index b3935a1..0083935 100644 --- a/macosx/tkMacOSXButton.c +++ b/macosx/tkMacOSXButton.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkMacOSXButton.c,v 1.2.2.6 2004/11/10 17:29:45 wolfsuit Exp $ + * RCS: @(#) $Id: tkMacOSXButton.c,v 1.2.2.7 2004/11/11 01:26:42 das Exp $ */ #include "tkButton.h" @@ -309,7 +309,7 @@ TkpDisplayButton( fullWidth = 0; fullHeight = 0; - switch ((enum compound) butPtr->compound) + switch ((enum compound) butPtr->compound) { case COMPOUND_TOP: case COMPOUND_BOTTOM: { /* Image is above or below text */ @@ -324,8 +324,9 @@ TkpDisplayButton( textXOffset = (fullWidth - butPtr->textWidth)/2; imageXOffset = (fullWidth - width)/2; break; + } case COMPOUND_LEFT: - case COMPOUND_RIGHT: + case COMPOUND_RIGHT: { /* * Image is left or right of text */ @@ -341,7 +342,8 @@ TkpDisplayButton( textYOffset = (fullHeight - butPtr->textHeight)/2; imageYOffset = (fullHeight - height)/2; break; - case COMPOUND_CENTER: + } + case COMPOUND_CENTER: { /* * Image and text are superimposed */ @@ -355,8 +357,8 @@ TkpDisplayButton( textYOffset = (fullHeight - butPtr->textHeight)/2; imageYOffset = (fullHeight - height)/2; break; - case COMPOUND_NONE: - break; + } + case COMPOUND_NONE: {break;} } TkComputeAnchor(butPtr->anchor, tkwin, butPtr->padX, butPtr->padY, @@ -820,13 +822,12 @@ TkMacOSXInitControl ( */ initiallyVisible = false; - initialValue = kControlSupportsEmbedding| - kControlHasSpecialBackground; - minValue = 0; - maxValue = 1; - procID = kControlUserPaneProc; + initialValue = kControlSupportsEmbedding|kControlHasSpecialBackground; + minValue = 0; + maxValue = 1; + procID = kControlUserPaneProc; controlReference = (SInt32)mbPtr; - mbPtr->userPane = NewControl(mbPtr->windowRef, + mbPtr->userPane = NewControl(mbPtr->windowRef, paneRect, "\p", initiallyVisible, initialValue, @@ -840,7 +841,7 @@ TkMacOSXInitControl ( return 1; } - if ((status=EmbedControl(mbPtr->userPane,rootControl)) != noErr) { + if ((status = EmbedControl(mbPtr->userPane,rootControl)) != noErr) { fprintf(stderr,"Failed to embed user pane control %d\n", status); return 1; } @@ -910,22 +911,22 @@ TkMacOSXDrawControl( winPtr = (TkWindow *)butPtr->tkwin; - paneRect.left = winPtr->privatePtr->xOff; - paneRect.top = winPtr->privatePtr->yOff; - paneRect.right = paneRect.left + Tk_Width(butPtr->tkwin); + paneRect.left = winPtr->privatePtr->xOff; + paneRect.top = winPtr->privatePtr->yOff; + paneRect.right = paneRect.left + Tk_Width(butPtr->tkwin); paneRect.bottom = paneRect.top + Tk_Height(butPtr->tkwin); cntrRect = paneRect; /* - cntrRect.left += butPtr->inset; - cntrRect.top += butPtr->inset; - cntrRect.right -= butPtr->inset; + cntrRect.left += butPtr->inset; + cntrRect.top += butPtr->inset; + cntrRect.right -= butPtr->inset; cntrRect.bottom -= butPtr->inset; */ - cntrRect.left += DEF_INSET_LEFT; - cntrRect.top += DEF_INSET_TOP; - cntrRect.right -= DEF_INSET_RIGHT; + cntrRect.left += DEF_INSET_LEFT; + cntrRect.top += DEF_INSET_TOP; + cntrRect.right -= DEF_INSET_RIGHT; cntrRect.bottom -= DEF_INSET_BOTTOM; /* @@ -1144,7 +1145,7 @@ SetupBevelButton( if ((err = SetControlData(controlHandle, kControlButtonPart, kControlBevelButtonContentTag, sizeof(ControlButtonContentInfo), - (char *) &mbPtr->bevelButtonContent)) != noErr ) { + (char *) &mbPtr->bevelButtonContent)) != noErr) { fprintf(stderr, "SetControlData BevelButtonContent failed, %d\n", err ); } @@ -1172,7 +1173,7 @@ SetupBevelButton( if ((err = SetControlData(controlHandle, kControlButtonPart, kControlBevelButtonGraphicAlignTag, sizeof(ControlButtonGraphicAlignment), - (char *) &theAlignment)) != noErr ) { + (char *) &theAlignment)) != noErr) { fprintf(stderr, "SetControlData BevelButtonGraphicAlign failed, %d\n", err ); } @@ -1192,7 +1193,7 @@ SetupBevelButton( if ((err = SetControlData(controlHandle, kControlButtonPart, kControlBevelButtonTextPlaceTag, sizeof(ControlButtonTextPlacement), - (char *) &thePlacement)) != noErr ) { + (char *) &thePlacement)) != noErr) { fprintf(stderr, "SetControlData BevelButtonTextPlace failed, %d\n", err ); } |