From 7a218424c6a92eb4979564a7260f862edd46052d Mon Sep 17 00:00:00 2001 From: Joseph Spiros Date: Thu, 3 Mar 2005 16:14:08 +0000 Subject: [PATCH] Huge audit of ITKit, mostly everything has been updated to current coding style and I've removed things that we don't need/that don't belong in ITKit anymore. The only things really left untouched are the class files for anything related to ITTSW. --- Deprecated/ITChasingArrow1.tiff | Bin 1218 -> 0 bytes Deprecated/ITChasingArrow10.tiff | Bin 15552 -> 0 bytes Deprecated/ITChasingArrow2.tiff | Bin 15546 -> 0 bytes Deprecated/ITChasingArrow3.tiff | Bin 15566 -> 0 bytes Deprecated/ITChasingArrow4.tiff | Bin 15566 -> 0 bytes Deprecated/ITChasingArrow5.tiff | Bin 15550 -> 0 bytes Deprecated/ITChasingArrow6.tiff | Bin 15586 -> 0 bytes Deprecated/ITChasingArrow7.tiff | Bin 15550 -> 0 bytes Deprecated/ITChasingArrow8.tiff | Bin 15568 -> 0 bytes Deprecated/ITChasingArrow9.tiff | Bin 15568 -> 0 bytes Deprecated/ITChasingArrowsView.h | 32 ---- Deprecated/ITChasingArrowsView.m | 165 ------------------- Graphics/URLTextViewHand.tiff | Bin 464 -> 0 bytes ITBevelView.h | 25 ++- ITBevelView.m | 162 ++++++++----------- ITButton.h | 17 +- ITButton.m | 47 +++--- ITButtonCell.h | 26 ++- ITButtonCell.m | 150 +++++++----------- ITCategory-NSMenu.h | 15 +- ITCategory-NSMenu.m | 22 ++- ITCategory-NSView.h | 18 +-- ITCategory-NSView.m | 5 +- ITCoreGraphicsHacks.h | 62 +++----- ITCutWindowEffect.h | 18 +-- ITCutWindowEffect.m | 0 ITDissolveWindowEffect.h | 18 +-- ITDissolveWindowEffect.m | 0 ITHotKey.h | 40 +++-- ITHotKey.m | 72 +++------ ITHotKeyCenter.h | 35 ++-- ITHotKeyCenter.m | 254 +++++++++++------------------- ITIconAndTextStatusWindow.h | 17 +- ITIconAndTextStatusWindow.m | 0 ITImageCell.h | 52 +++--- ITImageCell.m | 231 ++++++++++++--------------- ITImageView.h | 29 ++-- ITImageView.m | 111 ++++++------- ITKeyBroadcaster.h | 24 ++- ITKeyBroadcaster.m | 69 ++++---- ITKeyCombo.h | 35 ++-- ITKeyCombo.m | 181 ++++++++------------- ITKeyComboPanel.h | 48 +++--- ITKeyComboPanel.m | 135 ++++++---------- ITKit.h | 14 +- ITKit.xcode/project.pbxproj | 225 -------------------------- ITMacResource.h | 33 ---- ITMacResource.m | 89 ----------- ITMacResourceFile.h | 22 --- ITMacResourceFile.m | 53 ------- ITMultilineTextFieldCell.h | 24 +-- ITMultilineTextFieldCell.m | 204 ++++++++++++------------ ITPivotWindowEffect.h | 18 +-- ITPivotWindowEffect.m | 0 ITSlideHorizontallyWindowEffect.h | 18 +-- ITSlideHorizontallyWindowEffect.m | 0 ITSlideVerticallyWindowEffect.h | 18 +-- ITSlideVerticallyWindowEffect.m | 0 ITSpinAndZoomWindowEffect.h | 18 +-- ITSpinAndZoomWindowEffect.m | 0 ITSpinWindowEffect.h | 18 +-- ITSpinWindowEffect.m | 0 ITSplashScreen.h | 18 ++- ITSplashScreen.m | 56 +++---- ITSplashView.h | 24 +-- ITSplashView.m | 53 ++----- ITSplashWindow.h | 18 ++- ITSplashWindow.m | 13 +- ITStatusItem.h | 45 ++---- ITStatusItem.m | 110 ++++--------- ITStringMacResource.h | 16 -- ITStringMacResource.m | 26 --- ITTSWBackgroundView.h | 22 ++- ITTSWBackgroundView.m | 0 ITTabView.h | 35 ++-- ITTabView.m | 124 +++++++-------- ITTableCornerView.h | 19 ++- ITTableCornerView.m | 60 +++++-- ITTableView.h | 22 ++- ITTableView.m | 57 +++---- ITTextField.h | 30 ++-- ITTextField.m | 107 ++++--------- ITTextFieldCell.h | 49 +++--- ITTextFieldCell.m | 219 ++++++++++---------------- ITTransientStatusWindow.h | 75 +++------ ITTransientStatusWindow.m | 0 ITWindowEffect.h | 42 +++-- ITWindowEffect.m | 0 ITWindowPositioning.h | 29 ++-- ITZoomWindowEffect.h | 18 +-- ITZoomWindowEffect.m | 0 91 files changed, 1434 insertions(+), 2722 deletions(-) delete mode 100755 Deprecated/ITChasingArrow1.tiff delete mode 100755 Deprecated/ITChasingArrow10.tiff delete mode 100755 Deprecated/ITChasingArrow2.tiff delete mode 100755 Deprecated/ITChasingArrow3.tiff delete mode 100755 Deprecated/ITChasingArrow4.tiff delete mode 100755 Deprecated/ITChasingArrow5.tiff delete mode 100755 Deprecated/ITChasingArrow6.tiff delete mode 100755 Deprecated/ITChasingArrow7.tiff delete mode 100755 Deprecated/ITChasingArrow8.tiff delete mode 100755 Deprecated/ITChasingArrow9.tiff delete mode 100755 Deprecated/ITChasingArrowsView.h delete mode 100755 Deprecated/ITChasingArrowsView.m delete mode 100755 Graphics/URLTextViewHand.tiff mode change 100755 => 100644 ITBevelView.h mode change 100755 => 100644 ITBevelView.m mode change 100755 => 100644 ITButton.h mode change 100755 => 100644 ITButton.m mode change 100755 => 100644 ITButtonCell.h mode change 100755 => 100644 ITButtonCell.m mode change 100755 => 100644 ITCategory-NSMenu.h mode change 100755 => 100644 ITCategory-NSMenu.m mode change 100755 => 100644 ITCategory-NSView.h mode change 100755 => 100644 ITCategory-NSView.m mode change 100755 => 100644 ITCoreGraphicsHacks.h mode change 100755 => 100644 ITCutWindowEffect.h mode change 100755 => 100644 ITCutWindowEffect.m mode change 100755 => 100644 ITDissolveWindowEffect.h mode change 100755 => 100644 ITDissolveWindowEffect.m mode change 100755 => 100644 ITHotKey.h mode change 100755 => 100644 ITHotKey.m mode change 100755 => 100644 ITHotKeyCenter.h mode change 100755 => 100644 ITHotKeyCenter.m mode change 100755 => 100644 ITIconAndTextStatusWindow.h mode change 100755 => 100644 ITIconAndTextStatusWindow.m mode change 100755 => 100644 ITImageCell.h mode change 100755 => 100644 ITImageCell.m mode change 100755 => 100644 ITImageView.h mode change 100755 => 100644 ITImageView.m mode change 100755 => 100644 ITKeyBroadcaster.h mode change 100755 => 100644 ITKeyBroadcaster.m mode change 100755 => 100644 ITKeyCombo.h mode change 100755 => 100644 ITKeyCombo.m mode change 100755 => 100644 ITKeyComboPanel.h mode change 100755 => 100644 ITKeyComboPanel.m mode change 100755 => 100644 ITKit.h mode change 100755 => 100644 ITKit.xcode/project.pbxproj delete mode 100755 ITMacResource.h delete mode 100755 ITMacResource.m delete mode 100755 ITMacResourceFile.h delete mode 100755 ITMacResourceFile.m mode change 100755 => 100644 ITMultilineTextFieldCell.h mode change 100755 => 100644 ITMultilineTextFieldCell.m mode change 100755 => 100644 ITPivotWindowEffect.h mode change 100755 => 100644 ITPivotWindowEffect.m mode change 100755 => 100644 ITSlideHorizontallyWindowEffect.h mode change 100755 => 100644 ITSlideHorizontallyWindowEffect.m mode change 100755 => 100644 ITSlideVerticallyWindowEffect.h mode change 100755 => 100644 ITSlideVerticallyWindowEffect.m mode change 100755 => 100644 ITSpinAndZoomWindowEffect.h mode change 100755 => 100644 ITSpinAndZoomWindowEffect.m mode change 100755 => 100644 ITSpinWindowEffect.h mode change 100755 => 100644 ITSpinWindowEffect.m mode change 100755 => 100644 ITStatusItem.h mode change 100755 => 100644 ITStatusItem.m delete mode 100755 ITStringMacResource.h delete mode 100755 ITStringMacResource.m mode change 100755 => 100644 ITTSWBackgroundView.h mode change 100755 => 100644 ITTSWBackgroundView.m mode change 100755 => 100644 ITTabView.h mode change 100755 => 100644 ITTabView.m mode change 100755 => 100644 ITTableCornerView.h mode change 100755 => 100644 ITTableCornerView.m mode change 100755 => 100644 ITTableView.h mode change 100755 => 100644 ITTableView.m mode change 100755 => 100644 ITTextField.h mode change 100755 => 100644 ITTextField.m mode change 100755 => 100644 ITTextFieldCell.h mode change 100755 => 100644 ITTextFieldCell.m mode change 100755 => 100644 ITTransientStatusWindow.h mode change 100755 => 100644 ITTransientStatusWindow.m mode change 100755 => 100644 ITWindowEffect.h mode change 100755 => 100644 ITWindowEffect.m mode change 100755 => 100644 ITWindowPositioning.h mode change 100755 => 100644 ITZoomWindowEffect.h mode change 100755 => 100644 ITZoomWindowEffect.m diff --git a/Deprecated/ITChasingArrow1.tiff b/Deprecated/ITChasingArrow1.tiff deleted file mode 100755 index 2c87a94acb00e69540b3d1840e984dc4759fefd5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1218 zcmbu8O-chn5QVFf)(pWwT!^6A8^pb*2!Y_*8+Zqg;WFziB@pleUd2NQ$@}Ixj59A#C>~QKF6bEIx?j zuEiiWK+^`kOYTz?Tt+q~F*ImXaAv-H3TV)#;J%#s6wshe@g>Ja>TFq~L7Sp)e&6%= zeZRK)amToZx%#1vdxM@?i}Vn0PTi<|tkJR)J4KrQ~5dCre%{{HpdV!>=2EFu$=g#ia@Fe*0s8 b_$=CU9__jM^_Rykton_=U(N2OR{tLW28b%} diff --git a/Deprecated/ITChasingArrow10.tiff b/Deprecated/ITChasingArrow10.tiff deleted file mode 100755 index 0a276977832adcf18368125593d28d3fe8e56782..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 15552 zcmeGjZEzdKbx-n_WZALeI0=-(#gK?;t4~Lk?eS;qn3#zZ*H$1fQ0AmN%Zg7rad(RC zObH(aI_;0P1lkVm0Oh0QN2fzeTiOAJLP}|e>2wB4OQ4e$XbU8T@KplMP}KMKK6H|0 z+2X5wXf^M&@9o>SZ{NP%eYbZvK2APE2x%a0@;0e~90PzCJN;{cJY&h*Xdd~VWb8T} zn3*~~Z-czskkfTP)27p*2D4Vrqs(;%PYq#CCbe3V)&Zoq*(lg)Zp%r={k7U1xr7Y@fpJ(^@1glDtIGa@2kgv-Z^oBY=$4<*! zN|=-6SvKekdqAYjPxnlYjOqdb>+{U0YNp5UpPQTW&2{)BIpGg>cX#^(A%7_31rD#W zkXE^QZ(2DW+M|jjcbnDHijV5#i%Thga<@O|3;3ZSCrg_ef$qr3jGC0vEEkiqYM&>Y zP4YdFV6Zb5i*er0PM-4ygM6pAo9m2tsx+`WI6{Pe0nkq9`b@(ZEh%F~2zq{h-kMpQ?>iWaFy2s^+T5 z0u?b=y{l@jiY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az6Wmr*4Cjh5uyD+U<@hz&9 z(s8QtWMalBN4!oElW{>gN8GLe#uT(uOUr<~8lavcV^sVPz;@SJ;hy! z!xv842pIDvpnaNU`yN?OnB1Y5kW(Xmm&*l=xz)j9VfaSh?ON*4`}6I<>WX{H$A zFGESWzmO}5tD&L6(cp48T<%6^qq}XD%eAU)eQRr5YwLQqizfX~LyE6VQ)6ROb5l!m zbIY3M=H@kcXX*`aea zwRQCk4re25J%xn~vDuBn7Q)mpc3X|Dw!W^R*6!+nLbttU!|Gt|(C4|<_KPnM)vdYa z=AUdi{fxHB2VxzYgA_ji7Vl?x7_)qO(WMv`Kpy1y{@SSLy4$Y$**712>>vOB{?C8&r+>bF&h*}^zx9K=9{TgM$0KK*o0$9Zw{QQ& zZy$f|4L7mbK-(IsQ+-`+n5wWLxVi>3xVXKwHgx$lYfys+CLejZp#t@r!UrD(C2n2EZ{5|Y3eT7-EUkejuR`ug;Eq!63=qZ5X0KWt{9RSlA0JuGAaR*Wg6Ve9(z5;L$z+r&h0N6h6GNyB-cTpLR7s~V$(MzH0fcRqoEeg~)Fpo4WTP|T6*cP^FO{mi#z;a`ZeVhZJF%bM4 z31y;f&_>pTHZ*8xTeLCS+KfjbkBJ4qvB5Di#sIQ3;aK9BVi}IH8RkIVng#*E@;w0P zGw3_$Lx%y-r%?VNfD@opLORMuU&VyJi#~iD;3)tWV7Y|$GxW#y+W~F>I0%4qtI~w_ NLpeBJIJXPZ{{Sb@=t2Mh diff --git a/Deprecated/ITChasingArrow2.tiff b/Deprecated/ITChasingArrow2.tiff deleted file mode 100755 index abda13172108997205cc8641817192cbef01de18..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 15546 zcmeGjX>c3m^;^l8WZALeI0+P(jX4CQIvrWI>LZR1VkRcWRv=+un3c4ag;!d!yNZt) z&Qcg=Xs1w)DKjahw1pq-Fa=7dDKjlJEmMAQl@g#6rX1xO2v=x36so@W?XI+vrL`4~ zQqZS)yWjWT``-87``&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cB9>Z3W_`0CNB#02jbMfP(-(0N4#sDX~Df7T`<({4b@RMj`VJ z0Nit72VlZ^gf5V@q+U?hO90jzaF|v12PzWf4glctl;26IB(fjwTLDVtYUKP4?Lyzs z-GhcjAKwkIK`Wcx&?l%X_Klt}k2s{Ql&}qK3)|Ea>Vi6jbVP+a+O`z{Z8awJ1^NVi zWAwezcgT;vMIWQC#)NXQPcUI0VP9dNVc+Qq!t02Z1~gDZ~N71MtK DPf+H9 diff --git a/Deprecated/ITChasingArrow3.tiff b/Deprecated/ITChasingArrow3.tiff deleted file mode 100755 index 37a3d6b65db2230d74a5f2598c4e055e36e951bf..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 15566 zcmeGjZEzdKbx-n_WZAJ|n}qPuiwP)GqEAPXt@;DUj)|E#acwyy&}leJXIc296L+WB zPNzfoXgZy?w4`5Crk#|p_D3mGno@?gObey$OlM#QLiy^@LTF2&A$&IsrKs=i-AN}| zK3ja1f>yJqeQ)2seednt-FJI;qod^GgpdZ}ByW)#C^3-nVx@mAP-YBe3oRqvU_HHXWBJ9v|vur%E)t#PE$jeb);79k{n}B%a@;HPB-x1Xy89yz*~Na zqB`Gz_AehC!SdP12w8m`VAM(d+21@sh^vKY|2_Tl87?-T<~clGz#d-}P!IK{i?xr}={DJZ-ov%DPZ?HC;I z!0P!3)TDTYW9L&sT8_;3x@dz4lo9Q9v6Mua?RD)Q9b*+y6lRkO8}M{_{O&+#6FV(& zDSl3rW?8={=mM5fd^$2dG^{ZMsMj^4D4B@YJ2yAynd|h3Qo`%+?(X*b0^UHt4HRy9 zA+2!p?zDUs^hX6r?#?$$%N{C|Cnl!6$=zPR$LEEP>@4kS2-K0186_#ES#Cihp`aq!fK2FDk83WSJhkpd#Y8 z>s@eQqaX9|X*k=NgF~FIEhD4W=kRFg^uth{64-rkj05K#y&Z5A(!s*ngBVYy6TKai z(P4KNJ=a-3v~w`JXKX8*5t6dPPVAY8ZXIPi;0TC^gBU@Kal(u!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-I7l05L`V)Y3XYuZCPtfsr8t@A`x!W-~>oI(TjmADi&$Yzo>q zwoV{-csvO>fSb6iBA(Buc?lL+oVp|mE2c(lSBVjWH6y763xDsm{?@D{M7QpaLRXq` z(fGxfQ8~dEVd^+RiE@b|TyubS3q995J<2qITTh7l{Kohbr;Co;qjtmxcqqYygpS_(T5w)_Du zI0E{7@u{C?S#Bk336py?_ate#V0dJhFcw^!VRge{Zo{iy{q@zGZ~yHd|MuFh>3s*k`Td{$?%}`xD}4TiiMh{z>j!uI{*h-+ zI*G*s($-L!>g#HQRD|{Z)iof&WgV@xfh(?ULkaF4f8fQ=4O34^R~{OiXphO8Upl)E z1*ktKc+Z0%#Eom>TPH&be=IM;(h|4|BIF(?4lC``N&3mFr`>Y@{rBCmX5G;*e)&u5 z+;@HNw2#H^dh5HNIT^hDk-bMRf98$DFV3uO%igl%i2TOE?40t?>(0IBre`mi|HOBm zNySc$9Y2{P<9B@_@t22hi`=*A+1GSLzyF~exoTu*?lJ1s>*CIn@wFv978jGGI} zzX38P)S{1;mcC$AfUD?X$Oj?gdVeM4Ly$2NxEL}TqFmYp$R9%91vvzHBjmFn_dv$D z>?Gs^kTJ?Dm+l1QUdX4ERPF@$$B=J;d=un+WCUeBq3N%ItVT&XR{dYAfoPY;;wlQE zeNab?eDK>&vxGb_^3Y|pKpAa}c0yg3OK6kNLdLPt6P6K&b;~8}1N*{0v2RQ$3(ADD znI+T>bwpitpD@y+ZFC;G&5ZSE+iM`BtxFS*369MTka4VV%!~_iL0!=%A;`NRqi>;)l}qT8=$q)H=&PtB+6jFaeHnckecLSI+`u`43GIV6#DE|vyOYrpo diff --git a/Deprecated/ITChasingArrow4.tiff b/Deprecated/ITChasingArrow4.tiff deleted file mode 100755 index 5653961f74405725b589b5ed3210b478a35ed9a3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 15566 zcmeGjZEzdKbx-n_WZALeIE2qp3`9&prw?0_?XevkJ0@mgVr)4HDKnX~be4rr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1gy7ZaXfqc`~B%2lFB|e)vHo_Lo22du0DdSH1ewt{2|B;l#Vnzv@0-y}9$JuRp){Yr9^(`;pu4 zx$74%ym-r@lXq>8{&Pcg*Fznd-yLFS(p{73wf7(R^5~B*-hc7_pKm+xz+)HPo^?I` zbRx0i{R=N#IC3ZZ?Xwn6oO}MzM_<1w`tF(kVRPh;4?1tmk=(PIm#?QoItf?sdqP%` z0g@mRnS#yVL&nGqlvT(IEoFeBbr}i|i4vB;v@jMbC@qn+{cefMWzeTVJ<5(7Ogm&# z)B})pLNzXjjBEXskiQEVS5}M|Fd;uQMrk?=5I=!@HDrt;PKE4+9D%$Y@{b^23;99F z+71l`Jt1$b-whcf9sI`9oLB%3K>iT&?;&fe4-_DwZYUr2u@-V^LSE-Wz7z7}kWmJ@ z>B2uI)aN^pQO>0jMjObx74k?45yprcAfv9wI$;vUQUD1com#&74zJ)$kn$Q;weULZGhdztGD?&zJ&OlyiLfw!b&K;aXIG2t# I*{mA=7n&^bEC2ui diff --git a/Deprecated/ITChasingArrow5.tiff b/Deprecated/ITChasingArrow5.tiff deleted file mode 100755 index 5e6a93dc268d899e9ab0d53d91057b31338ad160..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 15550 zcmeGjZEzdKbx*QoOO_ogj!7Uib1?)lE&6n1*&5l7W5>iaPK>QULVtvlbe0dFbmHz5 z+nJ$!l+s~nI}I)Ev@@lX(x#nhr!BOFDQzjFP=53m0UAn&Qs_4W;VXm=!$f^=?@l_& zl57E?6ttRmx9?-$zJ2@l8%s;j45xSd6avavFdaX zW^8)i0(qCAr~d(_Tc<+_<{UkbI@cRAO@uj*G;39o=b4R#{0q$aCjA$i^iLP*mS3T% zuD784Yqv~be#>z}*1iZhwn_Ur-oAklcPG*B(c#4`mzd{OHqNJn%%J<_U;f6;3duqD zm7z)hWOkIF6Lubw`I$qzV~IoaiGiehc*qeQ=8{sJ_bhT*&#WM-ysWUik{Ik6o$f*Q zVgxv8Ugg-uw3t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iff b/Deprecated/ITChasingArrow6.tiff deleted file mode 100755 index 5aed59674291610089c7baa98249827ece6b5340..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 15586 zcmeGjYj7LIc~A07vg}x~O#%%W#Sla(dOEUfj~_UGBxd5owdD}#4CzTa%Zg7rad(RC zblL_==}c$ZX-I)-!<0!<`ku~|kn*D)D36xTK&JyCZ2}aUl$M5)@JiB7hFbl;)tz*b z<+BwCq(Q6M(|(Wr_WQp5_Hlc6Lqp^`LP!;{l37v)B?dBHjP$P#%8aILpk?HHkufTG zU}h?mvH{9gRZi=1rcuE|4dybXj53$0JY|Hrf|RG5B*&RgWy)_bD>U-2)yN;o;tjt> zRjucs{=0V#VtMshLYBS>Fxr&+pEOEsi#}#qS9DTU*#RpFiYlaof!{rMbj}APdrjkSN@0 zhO9Pjvvp)}?PFqui-%^qJnjzHTrBA6LZ4_91?AH?@Dq5 z+XJURNW-Rdl??GwE-q&@1mH2GV=z1PlB5 ztMj$@3*M;AYbMs#NCk+lobH8I)uI{w&gL~a3pK3MUhO)qO7uDXE&7bv^$fHxY`nTD z&cDwnvVZiY&%M)tUYUEV;cadAwC3Du=;~bPUL(6n&YP8CZO_Dk#w}TFF`)sY=@T&o z^6i{w3^+W_)|^0e=ilP0A-i}^ztg|iQP8#kqo%t{qu~5T0R+MztR8TXGmJ~gMtI{# zT|zYTYr!F;PB4p{|DB1La~KY$M(H~}+Or(px!{AZ0eU84*eK^Nan`|eGQ38WqniHo zH|HKaBQ5{TY<}bQThN+L+?Y1DSO*VrJ0CbNRZSzh8?IHTxQ zm1h!~eNN#gFYug88M*;_v#n7pb915B##}Sitwz3;dQu7)*^#kPucFpOwc-3-N%kBd z-$d0ycg$%10^K4*Vmn>>5g| z&DQJQNz$61qPQAMKxE@mf)(+#Zb~U@q?DC#tswy-5|+e?L=x~X5)R5CGNZ_Ni*kbW zREm}e2{UOKS5g?iLP*0k8F-rNb$JF}No{zK!X|o!iz3BLVekv`!1n=|%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t>CB44IIv5)$1NA^#EK0^Q d;*f?hrk79;j8%+THGa`IXkVeY0rbb0{s%e_0oecm diff --git a/Deprecated/ITChasingArrow7.tiff b/Deprecated/ITChasingArrow7.tiff deleted file mode 100755 index f10726fbf8a1af44225e2655f1833d337a378629..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 15550 zcmeGjX>c27^;^l8WZALeI7v$>8@Gwdp)-+X3mlqJCrmH#-nYBbN|x7F zlODACG;jBN?|a|--h1Esj{SBuHby>12x%Zr@+PT)90PzCE4{Tqo-yPtG>?3bFjkEY z%uJn@w?N*h%jx_z)27j(2D4Vnqs( z{H!R=uzpX_1tO*RRCr==SQ7|Xk84^{GGVWGc6Qb?yV)a339rAatIO*Pcmn}9aJc39 zw8G7~)ABjc9#tf{H(xC+d#FyHn3(b=_j>&vpBEakv$Ux}Fh@#el%$wuxu}>`dR*CT zG9C{3{TjPuo#<)b z6&ZGS(sP{+gF6Qz7mg3H86hbv?Bs=$k)biR9gcu_IEWF%7$;1Nvf`bbmlZzc9Zg0h zPMY@)Mh0c?xFlwHNtqvonx424Z-*laRZPBJpQj6{@nlTtwcEO9`1xKqobhm(jKF&` zQZlW0#<>JPEJ`U3vSZstDY+oR8ILf*%iUh&hiY2&^7WM@9(H+R63;23q}Q=^%L<53 zlr{&X6qkl3fm7qK+e`%~!R~%Z;^qsYIYdD*sHm&9gpB2lLm{BL&>Qjud_{@>xX%x# zKUjuMnJO6*l6+dpYY5Dhm~SpSCB_Fig*OV11Ktbj2Hd`&+aHMdf?=O89Nc_Sx0essXg*oHPk@AWR$Yx8Nx;D?bmxQc;{>9)b~Borm&sj_obYL%U(A zOhPEV4;QvFrscz_x~%DQ@abLFbf1?Dv zj0*e5T>9cC4d|7{j~ao_u)nkDQNvW{a?cutO>)Vs3~PHn4h(K7P%8-y7)>9DAy8`P z5@W#a_jDEoqObH3R}a~hbA~*jm5ze0Wf%?JT^$8)Z4^KtjKJyv2RY-olR(>1{^I)ymZ(At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precated/ITChasingArrow9.tiff deleted file mode 100755 index f00c467a417e38c5de547f103f899055a98293e6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 15568 zcmeGjTW}lI^{(WnEIU?ghd>Ec9Eg~Lo{l72W7#-%Ow8EC*m7QUCbN>(vhYePc2}{T z8HQ)m89pelmMPQ1Q2Jm(XF3!LQ)q`mp|sFxo3v0K!?QdZTEZhhONOa>&fQ&UCCh6I z0;Qm=<+6-N4}>Svq}eM zrcTY9AaB#;bpMIzQ0Y*ES)=Ar<_Q{44Pj0qwMvuZCFV={{OiogI{ByTkwM=MePd;8}zY;2a3?NKg~OottB-gm#lo{Wbb zJN#pwvCJShlia#b8;R|kjrGJG{e70+el{*dIp;i^aZV?BnG+>DC&j{@gA<)t zJRgFR6eqLx`4pd)Li1q6mr!R1(eOhEw z+?*iJ+PyBn14N4P>CnW`uqqI+uwzD+GaZ-(L&Z{G{YIB?z(?u4U|PCJ}E2=Qb(5$>Fd z3_H8&xz75bZG(|r<6G<*J}Jre$z79?Eo1ghI0E9}AchxWEI%VivU_qtlDU+7G#M3H zalt(l8Is)NqLAT4d0`Z4y5e%Y6OJepG5K~qt{$YulQFr^(%3u8E%d?RjEl`=c+Qm( zlWEyC&L+5FK}@lb9os61$$bKx@$eIz)ayomsHRpgUtdn*VV5f=a;z+fTAjvTNe1zW z(&m7aV$;whaH<@ZMnl0#uzNrh*@c2=7Ew?PDr%}NA!B*tPzb2b_XS-(Pf_B|@Oa_$ z2g|T2LnUK;l1s~Z4S~55^NnSvg!m9Eb9&)%!23X5pVQ-adVLX(KjiU*{9U_y-Lz;~ zeI*$r4D)P4FBPJJgO2Hg(=jbeeeBkp-0Rjn5ACcpq_&CZ8Wzv}w8rwiRyH92e*&tE zX&5J(^B{V(?6MtF4WK3Gq)C_qVcPh-1y6}t`FRMIisA(G5RAy`Jd~ev8b8uJv>lep zB!trEaA7NBT0Wer%bGR^AKzt7^LfcI{=6)0OPH4rtLiLu+`>xAMkC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8r<1 zx3;vjwzssjwBx0vU8!PQiGbX%h^+xkYBe*R#AIX4HYWEhj9Vu65YrD@)-p7K!kElp zTup6VeM6(A36`GXLWY>kT45_;Y8bPr##CEh*HCM=c0r-dT(f?)w|3w>wypEROMP|i z*W7Z)<_)KIOgs?n+9Y0faIpTgYbW1&@$H!8U-P}6UcPbYx=4J>gSX0o6An$i#JzLp z6~F#-_HRdr9oK*VYj=I~p})NR?hk(U@Z+z%w|#o={%`&8?%zD|>ifa7cO>S%e#4LM zdE~FJ{mVv7CeXHq>QrA>>!&KL_pYu14KD0#tMy%aO*?Avz{J6~x=xM0C|-8$;ABTk z+Vu8mb*Mo7M*o9{K#5yVh;Nw+$lObL6_(b(QBWcGG_jg#n>Nxh<9yP0U;W{* zWkxkx$4fGC<-)AW>NU?PQ$HKwburXf6XBZOd@jNszb*3=D0mg4}UPs2r|)I4(OU^~F= z0A~V}ODG%54+0zjSOcI>i0=XTxt^%z(Kgf%+i(G#1EA~=AfrpThq?*?yGftW_L~3# zDiOc%ESHdu`=iSNPSr8sGQJ-GZCx&H0ERRG#uaW25HOE4EL$#N8`u`MsU_3}bwb^Y zbVq))5p6}A^$C4~zESp>`Vz&L=u;N}`WSuP0#KT;Z?KQnloTL-008?I`*^81!q~ua zY$E`m`4eLaV+vynW6UU_Y}5~97GoC^#xmA>3;<)i)OH{hCA1BBaO`La$5cB2jxii- H$0hw2InDD0 diff --git a/Deprecated/ITChasingArrowsView.h b/Deprecated/ITChasingArrowsView.h deleted file mode 100755 index 6ef2844..0000000 --- a/Deprecated/ITChasingArrowsView.h +++ /dev/null @@ -1,32 +0,0 @@ -/* - * ITKit - * ITChasingArrowsView - * Animating Asynchronous Arrows Widget - * *** DEPRECATED: NSProgressIndicator now offers an async mode. MLJ - 01/14/2003 - * - * Original Author : Doug Brown <...> - * Responsibility : Matthew Judy - * Responsibility : Joseph Spiros - * - * Copyright (c) 2002 - 2003 iThink Software. - * All Rights Reserved - * - */ - - -#import - - -@interface ITChasingArrowsView : NSView -{ - BOOL running, inForeground; - int curIndex; - NSTimer *timer; - NSArray *images; -} - -- (IBAction)stop:(id)sender; -- (IBAction)start:(id)sender; - - -@end diff --git a/Deprecated/ITChasingArrowsView.m b/Deprecated/ITChasingArrowsView.m deleted file mode 100755 index b903182..0000000 --- a/Deprecated/ITChasingArrowsView.m +++ /dev/null @@ -1,165 +0,0 @@ -#import "ITChasingArrowsView.h" - - -@implementation ITChasingArrowsView - -- (id)initWithCoder:(NSCoder *)decoder -{ - self = [super initWithCoder:decoder]; - - running = NO; - - images = [[decoder decodeObject] retain]; - - curIndex = 0; - timer = nil; - - return self; -} - -- (void)encodeWithCoder:(NSCoder *)coder -{ - [super encodeWithCoder:coder]; - - [coder encodeObject:images]; -} - -- (id)initWithFrame:(NSRect)frame { - self = [super initWithFrame:frame]; - if (self) { - NSBundle *bund = [NSBundle bundleForClass:[self class]]; - running = NO; - images = [[NSArray alloc] initWithObjects: - [[[NSImage alloc] initWithContentsOfFile:[bund pathForImageResource:@"ITChasingArrow1.tiff"]] autorelease], - [[[NSImage alloc] initWithContentsOfFile:[bund pathForImageResource:@"ITChasingArrow2.tiff"]] autorelease], - [[[NSImage alloc] initWithContentsOfFile:[bund pathForImageResource:@"ITChasingArrow3.tiff"]] autorelease], - [[[NSImage alloc] initWithContentsOfFile:[bund pathForImageResource:@"ITChasingArrow4.tiff"]] autorelease], - [[[NSImage alloc] initWithContentsOfFile:[bund pathForImageResource:@"ITChasingArrow5.tiff"]] autorelease], - [[[NSImage alloc] initWithContentsOfFile:[bund pathForImageResource:@"ITChasingArrow6.tiff"]] autorelease], - [[[NSImage alloc] initWithContentsOfFile:[bund pathForImageResource:@"ITChasingArrow7.tiff"]] autorelease], - [[[NSImage alloc] initWithContentsOfFile:[bund pathForImageResource:@"ITChasingArrow8.tiff"]] autorelease], - [[[NSImage alloc] initWithContentsOfFile:[bund pathForImageResource:@"ITChasingArrow9.tiff"]] autorelease], - [[[NSImage alloc] initWithContentsOfFile:[bund pathForImageResource:@"ITChasingArrow10.tiff"]] autorelease], - nil]; - - curIndex = 0; - timer = nil; - } - return self; -} - -- (void)dealloc -{ - if (timer) - { - [timer invalidate]; - [timer release]; - timer = nil; - } - [images release]; - - [super dealloc]; -} -- (void)drawRect:(NSRect)rect { - - if (running) - { - NSImage *curImage = [images objectAtIndex:curIndex]; - float amt; - if (inForeground) - { - amt = 1.0; - } - else - { - amt = 0.5; - } - [curImage compositeToPoint:NSMakePoint(0,0) operation:NSCompositeSourceOver fraction:amt]; - } - else - { - // draw nothing. - } -} - -- (IBAction)stop:(id)sender -{ - running = NO; - - if (timer) - { - NSNotificationCenter *nc = [NSNotificationCenter defaultCenter]; - [nc removeObserver:self]; - [timer invalidate]; - [timer release]; - timer = nil; - } - - [self setNeedsDisplay:YES]; -} - -- (IBAction)start:(id)sender -{ - if (!timer) - { - NSNotificationCenter *nc = [NSNotificationCenter defaultCenter]; - [nc addObserver:self selector:@selector(appWentToBackground:) name:NSApplicationWillResignActiveNotification object:nil]; - [nc addObserver:self selector:@selector(appWentToForeground:) name:NSApplicationWillBecomeActiveNotification object:nil]; - [nc addObserver:self selector:@selector(windowWentToBackground:) name:NSWindowDidResignMainNotification object:nil]; - [nc addObserver:self selector:@selector(windowWentToForeground:) name:NSWindowDidBecomeMainNotification object:nil]; - inForeground = ([NSApp isActive] && [[self window] isMainWindow]); - curIndex = 0; - running = YES; - timer = [[NSTimer scheduledTimerWithTimeInterval:0.05 - target:self - selector:@selector(showNewImage:) - userInfo:nil - repeats:YES] retain]; - [[NSRunLoop currentRunLoop] addTimer:timer forMode:NSEventTrackingRunLoopMode]; - } -} - -- (void)showNewImage:(NSTimer *)t -{ - [self setNeedsDisplay:YES]; - - if (curIndex == 9) - { - curIndex = 0; - } - else - { - curIndex++; - } -} - -- (void)appWentToBackground:(NSNotification *)note -{ - inForeground = NO; -} - -- (void)appWentToForeground:(NSNotification *)note -{ - inForeground = YES; -} - -- (void)windowWentToBackground:(NSNotification *)note -{ - NSWindow *window = [note object]; - if (window == [self window]) - { - inForeground = NO; - } -} - -- (void)windowWentToForeground:(NSNotification *)note -{ - NSWindow *window = [note object]; - if (window == [self window]) - { - inForeground = YES; - } -} - - -@end diff --git a/Graphics/URLTextViewHand.tiff b/Graphics/URLTextViewHand.tiff deleted file mode 100755 index 37a97838342fb2b07b0b6cbd7cfbc388e3def1b6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 464 zcmebEWzb?^VB~6GPzbP45#w@cv42po!o*CLzr!Vw#r^j#o&PyjUvY?$ZJO3Lr+CT08DDur;c#6*x-6-powiZA`8#6L-kdyAv|2guUhenE z(x{q?)*$X%UHcf$OhOU=C||847?c?*Ni#u#nhE7R|- zJ2}GmqU60|-ic>2H%0l*J1y>X?Y4=L^S8;bwnAL zoh{qlY5Dr@E - * Responsibility : Matthew Judy + * NSView subclass which draws a bevel of specified thickness, and resizes its + * first subview to fill the remaining space. * - * Copyright (c) 2003 iThink Software. - * All Rights Reserved + * Copyright (c) 2005 by iThink Software. + * All Rights Reserved. + * + * $Id$ * */ -/* - * Draws a bevel of specified thickness, and resizes - * its first subview to fill the remaining space. - */ - - #import - @interface ITBevelView : NSView { - int _bevelDepth; + int _bevelDepth; } - (int)bevelDepth; - (void)setBevelDepth:(int)newDepth; - -@end +@end \ No newline at end of file diff --git a/ITBevelView.m b/ITBevelView.m old mode 100755 new mode 100644 index d5beb0d..09cb89f --- a/ITBevelView.m +++ b/ITBevelView.m @@ -1,119 +1,81 @@ #import "ITBevelView.h" - @implementation ITBevelView - -/*************************************************************************/ -#pragma mark - -#pragma mark INITIALIZATION METHODS -/*************************************************************************/ - -- (id)initWithFrame:(NSRect)frameRect -{ - if ( (self = [super initWithFrame:frameRect]) ) { - _bevelDepth = 5; - [self setAutoresizesSubviews:NO]; - } - - return self; +- (id)initWithFrame:(NSRect)frameRect { + if ((self = [super initWithFrame:frameRect])) { + _bevelDepth = 5; + [self setAutoresizesSubviews:NO]; + } + return self; } -- (id)initWithCoder:(NSCoder *)coder -{ - if ( ( self = [super initWithCoder:coder] ) ) { - _bevelDepth = 5; - [self setAutoresizesSubviews:NO]; - } - - return self; +- (id)initWithCoder:(NSCoder *)coder { + if ((self = [super initWithCoder:coder])) { + _bevelDepth = 5; + [self setAutoresizesSubviews:NO]; + } + return self; } - -/*************************************************************************/ -#pragma mark - -#pragma mark ACCESSOR METHODS -/*************************************************************************/ - -- (int)bevelDepth -{ - return _bevelDepth; +- (int)bevelDepth { + return _bevelDepth; } -- (void)setBevelDepth:(int)newDepth -{ - _bevelDepth = newDepth; - [self setNeedsDisplay:YES]; +- (void)setBevelDepth:(int)newDepth { + _bevelDepth = newDepth; + [self setNeedsDisplay:YES]; } - -/*************************************************************************/ -#pragma mark - -#pragma mark INSTANCE METHODS -/*************************************************************************/ - -- (void)drawRect:(NSRect)aRect -{ - NSRect frameRect = [self convertRect:[self frame] fromView:[self superview]]; - NSRect innerRect = NSMakeRect( (frameRect.origin.x + _bevelDepth), - (frameRect.origin.y + _bevelDepth), - (frameRect.size.width - (_bevelDepth * 2)), - (frameRect.size.height - (_bevelDepth * 2)) ); - - NSBezierPath *leftEdge = [NSBezierPath bezierPath]; - NSBezierPath *topEdge = [NSBezierPath bezierPath]; - NSBezierPath *rightEdge = [NSBezierPath bezierPath]; - NSBezierPath *bottomEdge = [NSBezierPath bezierPath]; - - [[[self subviews] objectAtIndex:0] setFrame:innerRect]; - - [leftEdge moveToPoint:frameRect.origin]; - [leftEdge lineToPoint:NSMakePoint(frameRect.origin.x, frameRect.size.height)]; - [leftEdge lineToPoint:NSMakePoint( (frameRect.origin.x + _bevelDepth), (frameRect.size.height - _bevelDepth) )]; - [leftEdge lineToPoint:NSMakePoint( (frameRect.origin.x + _bevelDepth), (frameRect.origin.y + _bevelDepth) )]; - - [topEdge moveToPoint:NSMakePoint(frameRect.origin.x, frameRect.size.height)]; - [topEdge lineToPoint:NSMakePoint(frameRect.size.width, frameRect.size.height)]; - [topEdge lineToPoint:NSMakePoint( (frameRect.size.width - _bevelDepth), (frameRect.size.height - _bevelDepth) )]; - [topEdge lineToPoint:NSMakePoint( (frameRect.origin.x + _bevelDepth), (frameRect.size.height - _bevelDepth) )]; - - [rightEdge moveToPoint:NSMakePoint(frameRect.size.width, frameRect.origin.y)]; - [rightEdge lineToPoint:NSMakePoint(frameRect.size.width, frameRect.size.height)]; - [rightEdge lineToPoint:NSMakePoint( (frameRect.size.width - _bevelDepth), (frameRect.size.height - _bevelDepth) )]; - [rightEdge lineToPoint:NSMakePoint( (frameRect.size.width - _bevelDepth), (_bevelDepth) )]; - - [bottomEdge moveToPoint:frameRect.origin]; - [bottomEdge lineToPoint:NSMakePoint(frameRect.size.width, frameRect.origin.y)]; - [bottomEdge lineToPoint:NSMakePoint( (frameRect.size.width - _bevelDepth), (_bevelDepth) )]; - [bottomEdge lineToPoint:NSMakePoint( (frameRect.origin.x + _bevelDepth), (frameRect.origin.y + _bevelDepth) )]; - - [[NSColor colorWithCalibratedWhite:0.5 alpha:0.5] set]; - [leftEdge fill]; - [[NSColor colorWithCalibratedWhite:0.0 alpha:0.5] set]; - [topEdge fill]; - [[NSColor colorWithCalibratedWhite:0.5 alpha:0.5] set]; - [rightEdge fill]; - [[NSColor colorWithCalibratedWhite:1.0 alpha:0.6] set]; - [bottomEdge fill]; - - [[[self subviews] objectAtIndex:0] setNeedsDisplay:YES]; +- (void)drawRect:(NSRect)aRect { + NSRect frameRect = [self convertRect:[self frame] fromView:[self superview]]; + NSRect innerRect = NSMakeRect((frameRect.origin.x + _bevelDepth), (frameRect.origin.y + _bevelDepth), (frameRect.size.width - (_bevelDepth * 2)), (frameRect.size.height - (_bevelDepth * 2))); + + NSBezierPath *leftEdge = [NSBezierPath bezierPath]; + NSBezierPath *topEdge = [NSBezierPath bezierPath]; + NSBezierPath *rightEdge = [NSBezierPath bezierPath]; + NSBezierPath *bottomEdge = [NSBezierPath bezierPath]; + + [[[self subviews] objectAtIndex:0] setFrame:innerRect]; + + [leftEdge moveToPoint:frameRect.origin]; + [leftEdge lineToPoint:NSMakePoint(frameRect.origin.x, frameRect.size.height)]; + [leftEdge lineToPoint:NSMakePoint((frameRect.origin.x + _bevelDepth), (frameRect.size.height - _bevelDepth))]; + [leftEdge lineToPoint:NSMakePoint((frameRect.origin.x + _bevelDepth), (frameRect.origin.y + _bevelDepth))]; + + [topEdge moveToPoint:NSMakePoint(frameRect.origin.x, frameRect.size.height)]; + [topEdge lineToPoint:NSMakePoint(frameRect.size.width, frameRect.size.height)]; + [topEdge lineToPoint:NSMakePoint((frameRect.size.width - _bevelDepth), (frameRect.size.height - _bevelDepth))]; + [topEdge lineToPoint:NSMakePoint((frameRect.origin.x + _bevelDepth), (frameRect.size.height - _bevelDepth))]; + + [rightEdge moveToPoint:NSMakePoint(frameRect.size.width, frameRect.origin.y)]; + [rightEdge lineToPoint:NSMakePoint(frameRect.size.width, frameRect.size.height)]; + [rightEdge lineToPoint:NSMakePoint((frameRect.size.width - _bevelDepth), (frameRect.size.height - _bevelDepth))]; + [rightEdge lineToPoint:NSMakePoint((frameRect.size.width - _bevelDepth), _bevelDepth)]; + + [bottomEdge moveToPoint:frameRect.origin]; + [bottomEdge lineToPoint:NSMakePoint(frameRect.size.width, frameRect.origin.y)]; + [bottomEdge lineToPoint:NSMakePoint((frameRect.size.width - _bevelDepth), _bevelDepth)]; + [bottomEdge lineToPoint:NSMakePoint((frameRect.origin.x + _bevelDepth), (frameRect.origin.y + _bevelDepth))]; + + [[NSColor colorWithCalibratedWhite:0.5 alpha:0.5] set]; + [leftEdge fill]; + [[NSColor colorWithCalibratedWhite:0.0 alpha:0.5] set]; + [topEdge fill]; + [[NSColor colorWithCalibratedWhite:0.5 alpha:0.5] set]; + [rightEdge fill]; + [[NSColor colorWithCalibratedWhite:1.0 alpha:0.6] set]; + [bottomEdge fill]; + + [[[self subviews] objectAtIndex:0] setNeedsDisplay:YES]; } -- (BOOL)mouseDownCanMoveWindow -{ - return NO; +- (BOOL)mouseDownCanMoveWindow { + return NO; } - -/*************************************************************************/ -#pragma mark - -#pragma mark DEALLOCATION METHOD -/*************************************************************************/ - -- (void)dealloc -{ +- (void)dealloc { [super dealloc]; } - -@end +@end \ No newline at end of file diff --git a/ITButton.h b/ITButton.h old mode 100755 new mode 100644 index 618437d..e97435c --- a/ITButton.h +++ b/ITButton.h @@ -1,23 +1,20 @@ /* * ITKit - * ITButton - * Stylized button for use in Status Windows. + * ITButton.h * - * Original Author : Matthew Judy - * Responsibility : Matthew Judy - * Responsibility : Joseph Spiros + * Custom NSButton subclass that uses ITButtonCell. * - * Copyright (c) 2002 - 2003 iThink Software. - * All Rights Reserved + * Copyright (c) 2005 by iThink Software. + * All Rights Reserved. + * + * $Id$ * */ - #import - @interface ITButton : NSButton { } -@end +@end \ No newline at end of file diff --git a/ITButton.m b/ITButton.m old mode 100755 new mode 100644 index 7a81312..276db25 --- a/ITButton.m +++ b/ITButton.m @@ -1,51 +1,40 @@ #import "ITButton.h" #import "ITButtonCell.h" - @implementation ITButton - -/*************************************************************************/ -#pragma mark - -#pragma mark INITIALIZATION METHODS -/*************************************************************************/ - -+ (void)initialize -{ - if ( self == [ITButton class] ) { - [self setCellClass:[ITButtonCell class]]; - } ++ (void)initialize { + if (self == [ITButton class]) { + [self setCellClass:[ITButtonCell class]]; + } } -+ (Class)cellClass -{ - return [ITButtonCell class]; ++ (Class)cellClass { + return [ITButtonCell class]; } - (void)displayIfNeeded { - [super displayIfNeededIgnoringOpacity]; + [super displayIfNeededIgnoringOpacity]; } - (void)displayIfNeededInRect:(NSRect)aRect { - [super displayIfNeededInRectIgnoringOpacity:aRect]; + [super displayIfNeededInRectIgnoringOpacity:aRect]; } - (void)displayRect:(NSRect)aRect { - [super displayRectIgnoringOpacity:aRect]; + [super displayRectIgnoringOpacity:aRect]; } -- (id)initWithCoder:(NSCoder *)coder -{ - if ( ( self = [super initWithCoder:coder] ) ) { - ITButtonCell *cell = [[ITButtonCell alloc] init]; - [self setCell:cell]; - } - return self; +- (id)initWithCoder:(NSCoder *)coder { + if ((self = [super initWithCoder:coder])) { + ITButtonCell *cell = [[ITButtonCell alloc] init]; + [self setCell:cell]; + } + return self; } -- (BOOL)isOpaque -{ - return NO; +- (BOOL)isOpaque { + return NO; } -@end +@end \ No newline at end of file diff --git a/ITButtonCell.h b/ITButtonCell.h old mode 100755 new mode 100644 index e99ef10..5cea59d --- a/ITButtonCell.h +++ b/ITButtonCell.h @@ -1,31 +1,25 @@ /* * ITKit - * ITButtonCell - * Cell used by the ITButton control. + * ITButtonCell.h * - * Original Author : Matthew Judy - * Responsibility : Matthew Judy - * Responsibility : Joseph Spiros + * Custom NSButtonCell subclass that provides a stylized bezel style for use + * with ITStatusWindows. * - * Copyright (c) 2002 - 2003 iThink Software. - * All Rights Reserved + * Copyright (c) 2005 by iThink Software. + * All Rights Reserved. + * + * $Id$ * */ - #import - typedef enum _ITBezelStyle { - ITGrayRoundedBezelStyle = 1001 + ITGrayRoundedBezelStyle = 1001 } ITBezelStyle; - @interface ITButtonCell : NSButtonCell { - - ITBezelStyle _subStyle; - + ITBezelStyle _subStyle; } - -@end +@end \ No newline at end of file diff --git a/ITButtonCell.m b/ITButtonCell.m old mode 100755 new mode 100644 index 30ac956..11e8e95 --- a/ITButtonCell.m +++ b/ITButtonCell.m @@ -1,110 +1,80 @@ #import "ITButtonCell.h" -#import "ITTextFieldCell.h" - #define GRAY_EXTRA_PAD_H 60.0 - @interface ITButtonCell (Private) - (void)drawGrayRoundedBezelWithFrame:(NSRect)rect inView:(NSView *)controlView; @end - @implementation ITButtonCell -- (id)init -{ - if ( ( self = [super init] ) ) { - _subStyle = 0; - } - - return self; +- (id)init { + if ((self = [super init])) { + _subStyle = 0; + } + return self; } - - -/*************************************************************************/ -#pragma mark - -#pragma mark INSTANCE METHODS -/*************************************************************************/ - -- (void)setBezelStyle:(NSBezelStyle)bezelStyle -{ - if ( bezelStyle == ITGrayRoundedBezelStyle ) { - _subStyle = bezelStyle; - bezelStyle = NSRegularSquareBezelStyle; - } else { - _subStyle = 0; - } - - [super setBezelStyle:bezelStyle]; +- (void)setBezelStyle:(NSBezelStyle)bezelStyle { + if (bezelStyle == ITGrayRoundedBezelStyle) { + _subStyle = bezelStyle; + bezelStyle = NSRegularSquareBezelStyle; + } else { + _subStyle = 0; + } + [super setBezelStyle:bezelStyle]; } - -/*************************************************************************/ -#pragma mark - -#pragma mark DRAWING METHODS -/*************************************************************************/ - -- (void)drawWithFrame:(NSRect)rect inView:(NSView *)controlView -{ - if ( _subStyle == ITGrayRoundedBezelStyle ) { - [self drawGrayRoundedBezelWithFrame:rect inView:controlView]; - if ( [self attributedTitle] ) { - NSPoint stringOrigin; - NSSize stringSize; - stringSize = [[self attributedTitle] size]; - stringOrigin.x = rect.origin.x + (rect.size.width - stringSize.width)/2; - stringOrigin.y = (rect.origin.y + (rect.size.height - stringSize.height)/2) - 2; - [controlView lockFocus]; - [[self attributedTitle] drawAtPoint:stringOrigin]; - [controlView unlockFocus]; - } else { - [super drawInteriorWithFrame:rect inView:controlView]; - } - [[controlView superview] setNeedsDisplay:YES]; - } else { - [super drawWithFrame:rect inView:controlView]; - } +- (void)drawWithFrame:(NSRect)rect inView:(NSView *)controlView { + if (_subStyle == ITGrayRoundedBezelStyle) { + [self drawGrayRoundedBezelWithFrame:rect inView:controlView]; + if ([self attributedTitle]) { + NSPoint stringOrigin; + NSSize stringSize; + stringSize = [[self attributedTitle] size]; + stringOrigin.x = rect.origin.x + (rect.size.width - stringSize.width) / 2; + stringOrigin.y = (rect.origin.y + (rect.size.height - stringSize.height) / 2) - 2; + [controlView lockFocus]; + [[self attributedTitle] drawAtPoint:stringOrigin]; + [controlView unlockFocus]; + } else { + [super drawInteriorWithFrame:rect inView:controlView]; + } + [[controlView superview] setNeedsDisplay:YES]; + } else { + [super drawWithFrame:rect inView:controlView]; + } } -- (void)drawGrayRoundedBezelWithFrame:(NSRect)rect inView:(NSView *)controlView -{ - NSBezierPath *path = [NSBezierPath bezierPath]; - float ch = rect.size.height; - float cw = rect.size.width; - float radius = ( ch / 2 ); - NSPoint pointA = NSMakePoint( (ch / 2) , 0.0 ); - NSPoint pointB = NSMakePoint( (cw - (ch / 2)) , 0.0 ); -// NSPoint pointC = NSMakePoint( (cw - (ch / 2)) , ch ); - NSPoint pointD = NSMakePoint( (ch / 2) , ch ); - NSPoint lCtr = NSMakePoint( (ch / 2) , (ch / 2) ); - NSPoint rCtr = NSMakePoint( (cw - (ch / 2)) , (ch / 2) ); - float alpha = 0.45; - - [path moveToPoint:pointA]; - [path lineToPoint:pointB]; - [path appendBezierPathWithArcWithCenter:rCtr - radius:radius - startAngle:270.0 - endAngle:90.0]; - [path lineToPoint:pointD]; - [path appendBezierPathWithArcWithCenter:lCtr - radius:radius - startAngle:90.0 - endAngle:270.0]; - - if ( [self isHighlighted] ) { - alpha = 0.60; - } - - [[NSColor colorWithCalibratedWhite:0.15 alpha:alpha] set]; - [path fill]; +- (void)drawGrayRoundedBezelWithFrame:(NSRect)rect inView:(NSView *)controlView { + NSBezierPath *path = [NSBezierPath bezierPath]; + float ch = rect.size.height; + float cw = rect.size.width; + float radius = (ch / 2); + NSPoint pointA = NSMakePoint((ch / 2), 0.0); + NSPoint pointB = NSMakePoint((cw - (ch / 2)), 0.0); +// NSPoint pointC = NSMakePoint((cw - (ch / 2)), ch); + NSPoint pointD = NSMakePoint((ch / 2), ch); + NSPoint lCtr = NSMakePoint((ch / 2), (ch / 2)); + NSPoint rCtr = NSMakePoint((cw - (ch / 2)), (ch / 2)); + float alpha = 0.45; + + [path moveToPoint:pointA]; + [path lineToPoint:pointB]; + [path appendBezierPathWithArcWithCenter:rCtr radius:radius startAngle:270.0 endAngle:90.0]; + [path lineToPoint:pointD]; + [path appendBezierPathWithArcWithCenter:lCtr radius:radius startAngle:90.0 endAngle:270.0]; + + if ([self isHighlighted]) { + alpha = 0.60; + } + + [[NSColor colorWithCalibratedWhite:0.15 alpha:alpha] set]; + [path fill]; } -- (BOOL)isOpaque -{ - return NO; +- (BOOL)isOpaque { + return NO; } -@end +@end \ No newline at end of file diff --git a/ITCategory-NSMenu.h b/ITCategory-NSMenu.h old mode 100755 new mode 100644 index 2a4870e..aecbe8e --- a/ITCategory-NSMenu.h +++ b/ITCategory-NSMenu.h @@ -1,21 +1,18 @@ /* * ITKit - * ITCategory-NSMenu.h - * Category which extends NSMenu + * ITCategory-NSMenu.h * - * Original Author : Joseph Spiros - * Responsibility : Joseph Spiros + * Copyright (c) 2005 by iThink Software. + * All Rights Reserved. * - * Copyright (c) 2002 - 2004 iThink Software. - * All Rights Reserved + * $Id$ * */ - #import #import -@interface NSMenu (ITCategory) +@interface NSMenu (ITKitCategory) - (void)indentItem:(id )item; - (void)indentItemAtIndex:(int)index; @@ -24,4 +21,4 @@ - (MenuRef)menuRef; - (void)removeAllItems; -@end +@end \ No newline at end of file diff --git a/ITCategory-NSMenu.m b/ITCategory-NSMenu.m old mode 100755 new mode 100644 index 80501bf..69d3c61 --- a/ITCategory-NSMenu.m +++ b/ITCategory-NSMenu.m @@ -1,13 +1,18 @@ #import "ITCategory-NSMenu.h" -@interface NSMenu (HACKHACKHACKHACK) +extern void _NSGetMenuItemForCommandKeyEvent(NSMenu *menu, void *chicken, void *taco, void *food); +extern MenuRef _NSGetCarbonMenu(NSMenu *menu); + +@interface NSMenu (ITKitCategoryHacks) - (id)_menuImpl; @end -extern void _NSGetMenuItemForCommandKeyEvent (NSMenu *menu, void *chicken, void *taco, void *food); -extern MenuRef _NSGetCarbonMenu( NSMenu *menu); +@protocol _ITKitCategoryNSMenuItemPantherCompatability +- (int)indentationLevel; +- (void)setIndentationLevel:(int)indentationLevel; +@end -@implementation NSMenu (ITCategory) +@implementation NSMenu (ITKitCategory) - (void)indentItem:(id )item { [self indentItem:item toLevel:1]; @@ -22,8 +27,9 @@ extern MenuRef _NSGetCarbonMenu( NSMenu *menu); } - (void)indentItemAtIndex:(int)index toLevel:(int)indentLevel { - if ([[self itemAtIndex:index] respondsToSelector:@selector(setIndentationLevel:)]) { - (void)[[self itemAtIndex:index] setIndentationLevel:indentLevel]; + id theItem = [self itemAtIndex:index]; + if ([theItem respondsToSelector:@selector(setIndentationLevel:)]) { + [(id <_ITKitCategoryNSMenuItemPantherCompatability>)theItem setIndentationLevel:indentLevel]; } else { MenuRef carbonMenu = [self menuRef]; if (carbonMenu) { @@ -36,7 +42,7 @@ extern MenuRef _NSGetCarbonMenu( NSMenu *menu); MenuRef carbonMenu; int w00t, m00f; - if( [self respondsToSelector:@selector(_menuImpl)] ) { + if ([self respondsToSelector:@selector(_menuImpl)]) { (void)[self _menuImpl]; } else { return nil; @@ -57,4 +63,4 @@ extern MenuRef _NSGetCarbonMenu( NSMenu *menu); } } -@end +@end \ No newline at end of file diff --git a/ITCategory-NSView.h b/ITCategory-NSView.h old mode 100755 new mode 100644 index 3f0c047..0b41f97 --- a/ITCategory-NSView.h +++ b/ITCategory-NSView.h @@ -1,23 +1,19 @@ /* * ITKit - * ITCategory-NSView.h - * Category which extends NSView + * ITCategory-NSView.h * - * Original Author : Joseph Spiros - * Responsibility : Joseph Spiros + * Copyright (c) 2005 by iThink Software. + * All Rights Reserved. * - * Copyright (c) 2002 - 2004 iThink Software. - * All Rights Reserved + * $Id$ * */ - - -#import +#import -@interface NSView (ITCategory) +@interface NSView (ITKitCategory) - (void)removeAllSubviews; - (void)removeSubview:(NSView *)subview; -@end +@end \ No newline at end of file diff --git a/ITCategory-NSView.m b/ITCategory-NSView.m old mode 100755 new mode 100644 index 8c6ed90..be4332b --- a/ITCategory-NSView.m +++ b/ITCategory-NSView.m @@ -1,7 +1,6 @@ #import "ITCategory-NSView.h" - -@implementation NSView (ITCategory) +@implementation NSView (ITKitCategory) - (void)removeAllSubviews { [[self subviews] makeObjectsPerformSelector:@selector(removeFromSuperview)]; @@ -13,4 +12,4 @@ } } -@end +@end \ No newline at end of file diff --git a/ITCoreGraphicsHacks.h b/ITCoreGraphicsHacks.h old mode 100755 new mode 100644 index a07942b..c77185d --- a/ITCoreGraphicsHacks.h +++ b/ITCoreGraphicsHacks.h @@ -1,62 +1,48 @@ /* * ITKit - * ITCoreGraphicsHacks - * Header to import to work with private CoreGraphics API + * ITCoreGraphicsHacks.h * - * Original Author : Matthew Judy - * Responsibility : Matthew Judy + * Header to import to work with private CoreGraphics API. * - * Copyright (c) 2002 - 2003 iThink Software. - * All Rights Reserved + * Copyright (c) 2005 by iThink Software. + * All Rights Reserved. + * + * $Id$ * */ - -/*************************************************************************/ -#pragma mark - -#pragma mark CoreGraphics HACK HACK HACK -/*************************************************************************/ - typedef void * CGSGenericObj; typedef CGSGenericObj CGSValueObj; typedef void * CGSConnectionID; typedef void * CGSWindowID; typedef struct CGStyle *CGStyleRef; typedef struct CGShadowStyle { - unsigned int version; - float elevation; - float azimuth; - float ambient; - float height; - float radius; - float saturation; + unsigned int version; + float elevation; + float azimuth; + float ambient; + float height; + float radius; + float saturation; } CGShadowStyle; typedef unsigned char CGSBoolean; enum { - kCGSFalse = 0, - kCGSTrue = 1 + kCGSFalse = 0, + kCGSTrue = 1 }; -extern void CGStyleRelease(CGStyleRef style); -extern void CGSReleaseObj(void *obj); -extern void CGContextSetStyle(CGContextRef c, CGStyleRef style); -extern void CGStyleRelease(CGStyleRef style); -extern CGStyleRef CGStyleCreateShadow(const CGShadowStyle *shadow); +extern void CGStyleRelease(CGStyleRef style); +extern void CGSReleaseObj(void *obj); +extern void CGContextSetStyle(CGContextRef c, CGStyleRef style); +extern void CGStyleRelease(CGStyleRef style); +extern CGStyleRef CGStyleCreateShadow(const CGShadowStyle *shadow); extern CGSValueObj CGSCreateCString(const char *string); extern CGSValueObj CGSCreateBoolean(CGSBoolean boolean); -extern CGError CGSSetWindowProperty(const CGSConnectionID cid, CGSWindowID wid, const CGSValueObj key, const CGSValueObj value); - +extern CGError CGSSetWindowProperty(const CGSConnectionID cid, CGSWindowID wid, const CGSValueObj key, const CGSValueObj value); + extern CGError CGSSetWindowWarp(const CGSConnectionID cid, CGSWindowID wid, int w,int h, float *mesh); extern CGError CGSSetWindowTransform(const CGSConnectionID cid, CGSWindowID wid, CGAffineTransform transform); - -/*************************************************************************/ -#pragma mark - -#pragma mark NSApplication HACK HACK HACK -/*************************************************************************/ - -@interface NSApplication (HACKHACKHACKHACK) +@interface NSApplication (ITCoreGraphicsHacks) - (CGSConnectionID)contextID; -@end - - +@end \ No newline at end of file diff --git a/ITCutWindowEffect.h b/ITCutWindowEffect.h old mode 100755 new mode 100644 index fe53fc1..ad43a4f --- a/ITCutWindowEffect.h +++ b/ITCutWindowEffect.h @@ -1,23 +1,21 @@ /* * ITKit - * ITCutWindowEffect - * Effect subclass which performs a simple cut in or out, with no transition. + * ITCutWindowEffect.h * - * Original Author : Matthew Judy - * Responsibility : Matthew Judy + * Effect subclass which performs a simple cut in or out, with no transition. * - * Copyright (c) 2002 - 2003 iThink Software. - * All Rights Reserved + * Copyright (c) 2005 by iThink Software. + * All Rights Reserved. + * + * $Id$ * */ - #import #import "ITWindowEffect.h" - -@interface ITCutWindowEffect : ITWindowEffect { +@interface ITCutWindowEffect : ITWindowEffect { } -@end +@end \ No newline at end of file diff --git a/ITCutWindowEffect.m b/ITCutWindowEffect.m old mode 100755 new mode 100644 diff --git a/ITDissolveWindowEffect.h b/ITDissolveWindowEffect.h old mode 100755 new mode 100644 index ebc6342..73cdfae --- a/ITDissolveWindowEffect.h +++ b/ITDissolveWindowEffect.h @@ -1,23 +1,21 @@ /* * ITKit - * ITDissolveWindowEffect - * Effect subclass which performs a dissolve fade effect on a window. + * ITDissolveWindowEffect.h * - * Original Author : Matthew Judy - * Responsibility : Matthew Judy + * Effect subclass which performs a dissolve fade effect on a window. * - * Copyright (c) 2002 - 2003 iThink Software. - * All Rights Reserved + * Copyright (c) 2005 by iThink Software. + * All Rights Reserved. + * + * $Id$ * */ - #import #import "ITWindowEffect.h" - -@interface ITDissolveWindowEffect : ITWindowEffect { +@interface ITDissolveWindowEffect : ITWindowEffect { } -@end +@end \ No newline at end of file diff --git a/ITDissolveWindowEffect.m b/ITDissolveWindowEffect.m old mode 100755 new mode 100644 diff --git a/ITHotKey.h b/ITHotKey.h old mode 100755 new mode 100644 index 7910081..453886a --- a/ITHotKey.h +++ b/ITHotKey.h @@ -1,42 +1,38 @@ /* * ITKit - * ITHotKey + * ITHotKey.h * - * Original Author : Quentin Carnicelli <...> - * Responsibility : Kent Sutherland - * Responsibility : Matthew Judy + * Copyright (c) 2005 by iThink Software. + * All Rights Reserved. * - * Copyright (c) 2002 - 2003 iThink Software. - * All Rights Reserved + * $Id$ * */ +#import -#import -#import "ITKeyCombo.h" +@class ITKeyCombo; - -@interface ITHotKey : NSObject -{ - NSString* mName; - ITKeyCombo* mKeyCombo; - id mTarget; - SEL mAction; +@interface ITHotKey : NSObject { + NSString *mName; + ITKeyCombo *mKeyCombo; + id mTarget; + SEL mAction; } - (id)init; -- (void)setName: (NSString*)name; -- (NSString*)name; +- (void)setName:(NSString *)name; +- (NSString *)name; -- (void)setKeyCombo: (ITKeyCombo*)combo; -- (ITKeyCombo*)keyCombo; +- (void)setKeyCombo:(ITKeyCombo *)combo; +- (ITKeyCombo *)keyCombo; -- (void)setTarget: (id)target; +- (void)setTarget:(id)target; - (id)target; -- (void)setAction: (SEL)action; +- (void)setAction:(SEL)action; - (SEL)action; - (void)invoke; -@end +@end \ No newline at end of file diff --git a/ITHotKey.m b/ITHotKey.m old mode 100755 new mode 100644 index 0e2ddc3..940223d --- a/ITHotKey.m +++ b/ITHotKey.m @@ -1,91 +1,61 @@ -// -// ITHotKey.m -// -// Created by Quentin Carnicelli on Sat Aug 02 2003. -// Copyright (c) 2003 iThink Software. All rights reserved. -// - #import "ITHotKey.h" - -#import "ITHotKeyCenter.h" #import "ITKeyCombo.h" @implementation ITHotKey -- (id)init -{ - if ( (self = [super init]) ) - { - [self setKeyCombo: [ITKeyCombo clearKeyCombo]]; +- (id)init { + if ((self = [super init])) { + [self setKeyCombo:[ITKeyCombo clearKeyCombo]]; } - return self; } -- (void)dealloc -{ +- (void)dealloc { [mName release]; [mKeyCombo release]; - [super dealloc]; } -- (NSString*)description -{ - return [NSString stringWithFormat: @"<%@: %@>", - NSStringFromClass( [self class] ), - [self keyCombo]]; +- (NSString *)description { + return [NSString stringWithFormat:@"<%@: %@>", NSStringFromClass([self class]), [self keyCombo]]; } -#pragma mark - - -- (void)setKeyCombo: (ITKeyCombo*)combo -{ - [combo retain]; - [mKeyCombo release]; - mKeyCombo = combo; +- (void)setKeyCombo:(ITKeyCombo *)combo { + [mKeyCombo autorelease]; + mKeyCombo = [combo retain]; } -- (ITKeyCombo*)keyCombo -{ +- (ITKeyCombo *)keyCombo { return mKeyCombo; } -- (void)setName: (NSString*)name -{ - [name retain]; - [mName release]; - mName = name; +- (void)setName:(NSString *)name { + [mName autorelease]; + mName = [name retain]; } -- (NSString*)name -{ +- (NSString *)name { return mName; } -- (void)setTarget: (id)target -{ +- (void)setTarget:(id)target { mTarget = target; } -- (id)target -{ +- (id)target { return mTarget; } -- (void)setAction: (SEL)action -{ +- (void)setAction:(SEL)action { mAction = action; } -- (SEL)action -{ +- (SEL)action { return mAction; } -- (void)invoke -{ - [mTarget performSelector: mAction withObject: self]; +- (void)invoke { + [mTarget performSelector:mAction withObject:self]; } -@end +@end \ No newline at end of file diff --git a/ITHotKeyCenter.h b/ITHotKeyCenter.h old mode 100755 new mode 100644 index 347110f..153b2ca --- a/ITHotKeyCenter.h +++ b/ITHotKeyCenter.h @@ -1,28 +1,22 @@ /* * ITKit - * ITHotKeyCenter + * ITHotKeyCenter.h * - * Original Author : Quentin Carnicelli <...> - * Responsibility : Kent Sutherland - * Responsibility : Matthew Judy + * Copyright (c) 2005 by iThink Software. + * All Rights Reserved. * - * Copyright (c) 2002 - 2003 iThink Software. - * All Rights Reserved + * $Id$ * */ - -#import - +#import @class ITHotKey; - -@interface ITHotKeyCenter : NSObject -{ - NSMutableDictionary* mHotKeys; //Keys are NSValue of EventHotKeyRef - BOOL mEventHandlerInstalled; - BOOL _enabled; +@interface ITHotKeyCenter : NSObject { + NSMutableDictionary *mHotKeys; //Keys are NSValue of EventHotKeyRef + BOOL mEventHandlerInstalled; + BOOL _enabled; } + (id)sharedCenter; @@ -30,12 +24,11 @@ - (BOOL)isEnabled; - (void)setEnabled:(BOOL)flag; -- (BOOL)registerHotKey: (ITHotKey*)hotKey; -- (void)unregisterHotKey: (ITHotKey*)hotKey; - -- (NSArray*)allHotKeys; +- (BOOL)registerHotKey:(ITHotKey *)hotKey; +- (void)unregisterHotKey:(ITHotKey *)hotKey; -- (void)sendEvent: (NSEvent*)event; +- (NSArray *)allHotKeys; +- (void)sendEvent:(NSEvent *)event; -@end +@end \ No newline at end of file diff --git a/ITHotKeyCenter.m b/ITHotKeyCenter.m old mode 100755 new mode 100644 index 2e43e56..366f15d --- a/ITHotKeyCenter.m +++ b/ITHotKeyCenter.m @@ -1,198 +1,151 @@ -// -// ITHotKeyCenter.m -// -// Created by Quentin Carnicelli on Sat Aug 02 2003. -// Copyright (c) 2003 iThink Software. All rights reserved. -// - #import "ITHotKeyCenter.h" #import "ITHotKey.h" #import "ITKeyCombo.h" #import -#if __PROTEIN__ -#import "NSObjectAdditions.h" -#endif - @interface ITHotKeyCenter (Private) - (BOOL)_hasCarbonEventSupport; -- (ITHotKey*)_hotKeyForCarbonHotKey: (EventHotKeyRef)carbonHotKey; -- (EventHotKeyRef)_carbonHotKeyForHotKey: (ITHotKey*)hotKey; +- (ITHotKey *)_hotKeyForCarbonHotKey:(EventHotKeyRef)carbonHotKey; +- (EventHotKeyRef)_carbonHotKeyForHotKey:(ITHotKey *)hotKey; - (void)_updateEventHandler; -- (void)_hotKeyDown: (ITHotKey*)hotKey; -- (void)_hotKeyUp: (ITHotKey*)hotKey; -static OSStatus hotKeyEventHandler(EventHandlerCallRef inHandlerRef, EventRef inEvent, void* refCon ); +- (void)_hotKeyDown:(ITHotKey *)hotKey; +- (void)_hotKeyUp:(ITHotKey *)hotKey; + +static OSStatus hotKeyEventHandler(EventHandlerCallRef inHandlerRef, EventRef inEvent, void *refCon); @end @implementation ITHotKeyCenter -static id _sharedHotKeyCenter = nil; +static ITHotKeyCenter *_sharedHotKeyCenter = nil; -+ (id)sharedCenter -{ - if( _sharedHotKeyCenter == nil ) - { ++ (id)sharedCenter { + if (!_sharedHotKeyCenter) { _sharedHotKeyCenter = [[self alloc] init]; - #if __PROTEIN__ - [_sharedHotKeyCenter releaseOnTerminate]; - #endif } - return _sharedHotKeyCenter; } -- (id)init -{ - self = [super init]; - - if( self ) - { +- (id)init { + if ((self = [super init])) { mHotKeys = [[NSMutableDictionary alloc] init]; _enabled = YES; } - return self; } -- (void)dealloc -{ +- (void)dealloc { [mHotKeys release]; [super dealloc]; } -#pragma mark - - -- (BOOL)isEnabled -{ +- (BOOL)isEnabled { return _enabled; } -- (void)setEnabled:(BOOL)flag -{ +- (void)setEnabled:(BOOL)flag { _enabled = flag; } -- (BOOL)registerHotKey: (ITHotKey*)hotKey -{ - OSStatus err; +- (BOOL)registerHotKey:(ITHotKey *)hotKey { EventHotKeyID hotKeyID; EventHotKeyRef carbonHotKey; - NSValue* key; - - if( [[self allHotKeys] containsObject: hotKey] == YES ) - [self unregisterHotKey: hotKey]; + NSValue *key; + + if ([[self allHotKeys] containsObject:hotKey]) { + [self unregisterHotKey:hotKey]; + } - if( [[hotKey keyCombo] isValidHotKeyCombo] == NO ) + if (![[hotKey keyCombo] isValidHotKeyCombo]) { return YES; + } hotKeyID.signature = 'PTHk'; hotKeyID.id = (long)hotKey; - err = RegisterEventHotKey( [[hotKey keyCombo] keyCode], - [[hotKey keyCombo] modifiers], - hotKeyID, - GetEventDispatcherTarget(), - nil, - &carbonHotKey ); - - if( err ) + if (RegisterEventHotKey([[hotKey keyCombo] keyCode], [[hotKey keyCombo] modifiers], hotKeyID, GetEventDispatcherTarget(), nil, &carbonHotKey)) { return NO; - - key = [NSValue valueWithPointer: carbonHotKey]; - [mHotKeys setObject: hotKey forKey: key]; - + } + + key = [NSValue valueWithPointer:carbonHotKey]; + [mHotKeys setObject:hotKey forKey:key]; + [self _updateEventHandler]; return YES; } -- (void)unregisterHotKey: (ITHotKey*)hotKey -{ +- (void)unregisterHotKey:(ITHotKey *)hotKey { OSStatus err; EventHotKeyRef carbonHotKey; - NSValue* key; - - if( [[self allHotKeys] containsObject: hotKey] == NO ) + NSValue *key; + + if (![[self allHotKeys] containsObject:hotKey]) { return; + } - carbonHotKey = [self _carbonHotKeyForHotKey: hotKey]; - NSAssert( carbonHotKey != nil, @"" ); - - err = UnregisterEventHotKey( carbonHotKey ); - //Watch as we ignore 'err': - - key = [NSValue valueWithPointer: carbonHotKey]; - [mHotKeys removeObjectForKey: key]; + carbonHotKey = [self _carbonHotKeyForHotKey:hotKey]; + NSAssert(carbonHotKey, @""); + + err = UnregisterEventHotKey(carbonHotKey); + + key = [NSValue valueWithPointer:carbonHotKey]; + [mHotKeys removeObjectForKey:key]; [self _updateEventHandler]; - - //See that? Completely ignored } -- (NSArray*)allHotKeys -{ +- (NSArray *)allHotKeys { return [mHotKeys allValues]; } -#pragma mark - - -- (BOOL)_hasCarbonEventSupport -{ - return floor(NSAppKitVersionNumber) > NSAppKitVersionNumber10_1; +- (BOOL)_hasCarbonEventSupport { + return (floor(NSAppKitVersionNumber) > NSAppKitVersionNumber10_1); } -- (ITHotKey*)_hotKeyForCarbonHotKey: (EventHotKeyRef)carbonHotKey -{ - NSValue* key = [NSValue valueWithPointer: carbonHotKey]; - return [mHotKeys objectForKey: key]; +- (ITHotKey *)_hotKeyForCarbonHotKey:(EventHotKeyRef)carbonHotKey { + NSValue *key = [NSValue valueWithPointer:carbonHotKey]; + return [mHotKeys objectForKey:key]; } -- (EventHotKeyRef)_carbonHotKeyForHotKey: (ITHotKey*)hotKey -{ - NSArray* values; - NSValue* value; +- (EventHotKeyRef)_carbonHotKeyForHotKey:(ITHotKey *)hotKey { + NSArray *values; + NSValue *value; - values = [mHotKeys allKeysForObject: hotKey]; - NSAssert( [values count] == 1, @"Failed to find Carbon Hotkey for ITHotKey" ); + values = [mHotKeys allKeysForObject:hotKey]; + NSAssert(([values count] == 1), @"Failed to find Carbon Hotkey for ITHotKey"); value = [values lastObject]; return (EventHotKeyRef)[value pointerValue]; } -- (void)_updateEventHandler -{ - if( [self _hasCarbonEventSupport] == NO ) //Don't use event handler on these systems +- (void)_updateEventHandler { + if (![self _hasCarbonEventSupport]) { return; - - if( [mHotKeys count] && mEventHandlerInstalled == NO ) - { + } + + if ([mHotKeys count] && !mEventHandlerInstalled) { EventTypeSpec eventSpec[2] = { { kEventClassKeyboard, kEventHotKeyPressed }, { kEventClassKeyboard, kEventHotKeyReleased } - }; - - InstallEventHandler( GetEventDispatcherTarget(), - (EventHandlerProcPtr)hotKeyEventHandler, - 2, eventSpec, nil, nil); - + }; + + InstallEventHandler(GetEventDispatcherTarget(), (EventHandlerProcPtr)hotKeyEventHandler, 2, eventSpec, nil, nil); + mEventHandlerInstalled = YES; } } -- (void)_hotKeyDown: (ITHotKey*)hotKey -{ +- (void)_hotKeyDown:(ITHotKey *)hotKey { [hotKey invoke]; } -- (void)_hotKeyUp: (ITHotKey*)hotKey -{ +- (void)_hotKeyUp:(ITHotKey *)hotKey { } -- (void)sendEvent: (NSEvent*)event -{ +- (void)sendEvent:(NSEvent *)event { long subType; EventHotKeyRef carbonHotKey; @@ -201,84 +154,67 @@ static id _sharedHotKeyCenter = nil; } //We only have to intercept sendEvent to do hot keys on old system versions - if( [self _hasCarbonEventSupport] ) + if ([self _hasCarbonEventSupport]) { return; + } - if( [event type] == NSSystemDefined ) - { + if ([event type] == NSSystemDefined) { subType = [event subtype]; - if( subType == 6 ) //6 is hot key down - { - carbonHotKey= (EventHotKeyRef)[event data1]; //data1 is our hot key ref - if( carbonHotKey != nil ) - { - ITHotKey* hotKey = [self _hotKeyForCarbonHotKey: carbonHotKey]; - [self _hotKeyDown: hotKey]; + if (subType == 6) { //6 is hot key down + carbonHotKey = (EventHotKeyRef)[event data1]; //data1 is our hot key ref + if (carbonHotKey) { + ITHotKey *hotKey = [self _hotKeyForCarbonHotKey:carbonHotKey]; + [self _hotKeyDown:hotKey]; } - } - else if( subType == 9 ) //9 is hot key up - { - carbonHotKey= (EventHotKeyRef)[event data1]; - if( carbonHotKey != nil ) - { - ITHotKey* hotKey = [self _hotKeyForCarbonHotKey: carbonHotKey]; - [self _hotKeyUp: hotKey]; + } else if (subType == 9) { //9 is hot key up + carbonHotKey = (EventHotKeyRef)[event data1]; + if (carbonHotKey) { + ITHotKey *hotKey = [self _hotKeyForCarbonHotKey:carbonHotKey]; + [self _hotKeyUp:hotKey]; } } } } -- (OSStatus)sendCarbonEvent: (EventRef)event -{ +- (OSStatus)sendCarbonEvent:(EventRef)event { OSStatus err; EventHotKeyID hotKeyID; - ITHotKey* hotKey; + ITHotKey *hotKey; if (!_enabled) { return -1; } - NSAssert( [self _hasCarbonEventSupport], @"" ); - NSAssert( GetEventClass( event ) == kEventClassKeyboard, @"Unknown event class" ); + NSAssert([self _hasCarbonEventSupport], @""); + NSAssert((GetEventClass(event) == kEventClassKeyboard), @"Unknown event class"); - err = GetEventParameter( event, - kEventParamDirectObject, - typeEventHotKeyID, - nil, - sizeof(EventHotKeyID), - nil, - &hotKeyID ); - if( err ) + if ((err = GetEventParameter(event, kEventParamDirectObject, typeEventHotKeyID, nil, sizeof(EventHotKeyID), nil, &hotKeyID))) { return err; + } + NSAssert((hotKeyID.signature == 'PTHk'), @"Invalid hot key id"); + NSAssert((hotKeyID.id != nil), @"Invalid hot key id"); - NSAssert( hotKeyID.signature == 'PTHk', @"Invalid hot key id" ); - NSAssert( hotKeyID.id != nil, @"Invalid hot key id" ); - - hotKey = (ITHotKey*)hotKeyID.id; - - switch( GetEventKind( event ) ) - { + hotKey = (ITHotKey *)hotKeyID.id; + + switch (GetEventKind(event)) { case kEventHotKeyPressed: - [self _hotKeyDown: hotKey]; - break; - + [self _hotKeyDown:hotKey]; + break; case kEventHotKeyReleased: - [self _hotKeyUp: hotKey]; - break; - + [self _hotKeyUp:hotKey]; + break; default: - NSAssert( 0, @"Unknown event kind" ); - break; + NSAssert(NO, @"Unknown event kind"); + break; } return noErr; } -static OSStatus hotKeyEventHandler(EventHandlerCallRef inHandlerRef, EventRef inEvent, void* refCon ) -{ - return [[ITHotKeyCenter sharedCenter] sendCarbonEvent: inEvent]; +static OSStatus hotKeyEventHandler(EventHandlerCallRef inHandlerRef, EventRef inEvent, void *refCon) { + return [[ITHotKeyCenter sharedCenter] sendCarbonEvent:inEvent]; } @end diff --git a/ITIconAndTextStatusWindow.h b/ITIconAndTextStatusWindow.h old mode 100755 new mode 100644 index 9955f04..aa0a5d2 --- a/ITIconAndTextStatusWindow.h +++ b/ITIconAndTextStatusWindow.h @@ -1,14 +1,13 @@ /* * ITKit - * ITIconAndTextStatusWindow - * ITTransientStatusWindow subclass to show an icon and text. + * ITIconAndTextStatusWindow.h * - * Original Author : Kent Sutherland - * Responsibility : Kent Sutherland - * Responsibility : Joseph Spiros + * ITTransientStatusWindow subclass to show an icon and text. * - * Copyright (c) 2002 - 2004 iThink Software. - * All Rights Reserved + * Copyright (c) 2005 by iThink Software. + * All Rights Reserved. + * + * $Id$ * */ @@ -16,10 +15,10 @@ #import "ITTransientStatusWindow.h" @interface ITIconAndTextStatusWindow : ITTransientStatusWindow { - NSImage *_image; + NSImage *_image; } - (void)setImage:(NSImage *)newImage; - (void)buildTextWindowWithString:(NSString *)text; -@end +@end \ No newline at end of file diff --git a/ITIconAndTextStatusWindow.m b/ITIconAndTextStatusWindow.m old mode 100755 new mode 100644 diff --git a/ITImageCell.h b/ITImageCell.h old mode 100755 new mode 100644 index d3a9424..61c657f --- a/ITImageCell.h +++ b/ITImageCell.h @@ -1,32 +1,30 @@ /* * ITKit - * ITImageCell - * Cell used by the ITImageView control. + * ITImageCell.h * - * Original Author : Matthew Judy - * Responsibility : Matthew Judy + * Custom NSImageCell subclass that casts a shadow using CoreGraphics, + * providing support for versions of Cocoa that don't have the NSShadow + * class which was introduced in Mac OS X 10.3 (Panther), and also + * provides smooth scaling. * - * Copyright (c) 2003 iThink Software. - * All Rights Reserved + * Copyright (c) 2005 by iThink Software. + * All Rights Reserved. + * + * $Id$ * */ - - -#import +#import @interface ITImageCell : NSImageCell { - - BOOL _scalesSmoothly; - - BOOL castsShadow; - - float shadowElevation; - float shadowAzimuth; - float shadowAmbient; - float shadowHeight; - float shadowRadius; - float shadowSaturation; + BOOL _scalesSmoothly; + BOOL castsShadow; + float shadowElevation; + float shadowAzimuth; + float shadowAmbient; + float shadowHeight; + float shadowRadius; + float shadowSaturation; } - (BOOL)scalesSmoothly; @@ -35,22 +33,22 @@ - (BOOL)castsShadow; - (void)setCastsShadow:(BOOL)newSetting; -- (float)shadowElevation; /* Light source elevation in degrees. Defaults to 45.0 */ +- (float)shadowElevation; /* Light source elevation in degrees. Defaults to 45.0 */ - (void)setShadowElevation:(float)newElevation; -- (float)shadowAzimuth; /* Light source azimuth in degrees. Defaults to 90.0 */ +- (float)shadowAzimuth; /* Light source azimuth in degrees. Defaults to 90.0 */ - (void)setShadowAzimuth:(float)newAzimuth; -- (float)shadowAmbient; /* Amount of ambient light. Defaults to 0.15 */ +- (float)shadowAmbient; /* Amount of ambient light. Defaults to 0.15 */ - (void)setShadowAmbient:(float)newAmbient; -- (float)shadowHeight; /* Height above the canvas. Defaults to 1.0 */ +- (float)shadowHeight; /* Height above the canvas. Defaults to 1.0 */ - (void)setShadowHeight:(float)newHeight; -- (float)shadowRadius; /* Blur radius. Defaults to 4.0 */ +- (float)shadowRadius; /* Blur radius. Defaults to 4.0 */ - (void)setShadowRadius:(float)newRadius; -- (float)shadowSaturation; /* Maximum saturation. Defaults to 1.0 */ +- (float)shadowSaturation; /* Maximum saturation. Defaults to 1.0 */ - (void)setShadowSaturation:(float)newSaturation; -@end +@end \ No newline at end of file diff --git a/ITImageCell.m b/ITImageCell.m old mode 100755 new mode 100644 index 055435a..1ca761d --- a/ITImageCell.m +++ b/ITImageCell.m @@ -1,168 +1,145 @@ #import "ITImageCell.h" -#import #import "ITCoreGraphicsHacks.h" - +#import @implementation ITImageCell +- (id)initImageCell:(NSImage *)image { + if ((self = [super initImageCell:image])) { + _scalesSmoothly = YES; + castsShadow = NO; + shadowElevation = 45.0; + shadowAzimuth = 90.0; + shadowAmbient = 0.15; + shadowHeight = 1.00; + shadowRadius = 4.00; + shadowSaturation = 1.0; + } + return self; +} -- (id)initImageCell:(NSImage *)image -{ - if ( (self = [super initImageCell:image]) ) { - _scalesSmoothly = YES; - castsShadow = NO; - shadowElevation = 45.0; - shadowAzimuth = 90.0; - shadowAmbient = 0.15; - shadowHeight = 1.00; - shadowRadius = 4.00; - shadowSaturation = 1.0; - } - NSLog(@"foo"); - return self; -} - -- (id)init -{ - if ( (self = [super init]) ) { - _scalesSmoothly = YES; - castsShadow = NO; - shadowElevation = 45.0; - shadowAzimuth = 90.0; - shadowAmbient = 0.15; - shadowHeight = 1.00; - shadowRadius = 4.00; - shadowSaturation = 1.0; - } - return self; -} - -- (void)drawWithFrame:(NSRect)rect inView:(NSView *)controlView -{ - CGSGenericObj style = nil; - CGShadowStyle shadow; - - if ( _scalesSmoothly || castsShadow ) { - [NSGraphicsContext saveGraphicsState]; - } - - if ( _scalesSmoothly ) { - // CGContextSetInterpolationQuality([[NSGraphicsContext currentContext] graphicsPort], kCGInterpolationHigh); - [[NSGraphicsContext currentContext] setImageInterpolation:NSImageInterpolationHigh]; - [[NSGraphicsContext currentContext] setShouldAntialias:YES]; - } - - if ( castsShadow ) { - // Create the shadow style to use for drawing the string - shadow.version = 0; - shadow.elevation = shadowElevation; - shadow.azimuth = shadowAzimuth; - shadow.ambient = shadowAmbient; - shadow.height = shadowHeight; - shadow.radius = shadowRadius; - shadow.saturation = shadowSaturation; - style = CGStyleCreateShadow(&shadow); - CGContextSetStyle([[NSGraphicsContext currentContext] graphicsPort], style); - } - - [super drawWithFrame:rect inView:controlView]; - - if ( _scalesSmoothly || castsShadow ) { - [NSGraphicsContext restoreGraphicsState]; - } - - if ( castsShadow ) { - CGStyleRelease(style); - } +- (id)init { + if ((self = [super init])) { + _scalesSmoothly = YES; + castsShadow = NO; + shadowElevation = 45.0; + shadowAzimuth = 90.0; + shadowAmbient = 0.15; + shadowHeight = 1.00; + shadowRadius = 4.00; + shadowSaturation = 1.0; + } + return self; } -- (BOOL)scalesSmoothly -{ - return _scalesSmoothly; +- (void)drawWithFrame:(NSRect)rect inView:(NSView *)controlView { + CGSGenericObj style = nil; + CGShadowStyle shadow; + + if (_scalesSmoothly || castsShadow) { + [NSGraphicsContext saveGraphicsState]; + } + + if (_scalesSmoothly) { + // CGContextSetInterpolationQuality([[NSGraphicsContext currentContext] graphicsPort], kCGInterpolationHigh); + [[NSGraphicsContext currentContext] setImageInterpolation:NSImageInterpolationHigh]; + [[NSGraphicsContext currentContext] setShouldAntialias:YES]; + } + + if (castsShadow) { + // Create the shadow style to use for drawing the string + shadow.version = 0; + shadow.elevation = shadowElevation; + shadow.azimuth = shadowAzimuth; + shadow.ambient = shadowAmbient; + shadow.height = shadowHeight; + shadow.radius = shadowRadius; + shadow.saturation = shadowSaturation; + style = CGStyleCreateShadow(&shadow); + CGContextSetStyle([[NSGraphicsContext currentContext] graphicsPort], style); + } + + [super drawWithFrame:rect inView:controlView]; + + if (castsShadow) { + CGStyleRelease(style); + } + + if (_scalesSmoothly || castsShadow) { + [NSGraphicsContext restoreGraphicsState]; + } } -- (void)setScalesSmoothly:(BOOL)flag -{ - _scalesSmoothly = flag; - [[self controlView] setNeedsDisplay:YES]; +- (BOOL)scalesSmoothly { + return _scalesSmoothly; } -- (BOOL)castsShadow; -{ - return castsShadow; +- (void)setScalesSmoothly:(BOOL)flag { + _scalesSmoothly = flag; + [[self controlView] setNeedsDisplay:YES]; } -- (void)setCastsShadow:(BOOL)newSetting; -{ - castsShadow = newSetting; - [[self controlView] setNeedsDisplay:YES]; +- (BOOL)castsShadow { + return castsShadow; } -- (float)shadowElevation; -{ - return shadowElevation; +- (void)setCastsShadow:(BOOL)newSetting { + castsShadow = newSetting; + [[self controlView] setNeedsDisplay:YES]; } -- (void)setShadowElevation:(float)newElevation; -{ - shadowElevation = newElevation; - [[self controlView] setNeedsDisplay:YES]; +- (float)shadowElevation { + return shadowElevation; } -- (float)shadowAzimuth; -{ - return shadowAzimuth; +- (void)setShadowElevation:(float)newElevation { + shadowElevation = newElevation; + [[self controlView] setNeedsDisplay:YES]; } -- (void)setShadowAzimuth:(float)newAzimuth; -{ - shadowAzimuth = newAzimuth; - [[self controlView] setNeedsDisplay:YES]; +- (float)shadowAzimuth { + return shadowAzimuth; } -- (float)shadowAmbient; -{ - return shadowAmbient; +- (void)setShadowAzimuth:(float)newAzimuth { + shadowAzimuth = newAzimuth; + [[self controlView] setNeedsDisplay:YES]; } -- (void)setShadowAmbient:(float)newAmbient; -{ - shadowAmbient = newAmbient; - [[self controlView] setNeedsDisplay:YES]; +- (float)shadowAmbient { + return shadowAmbient; } -- (float)shadowHeight; -{ - return shadowHeight; +- (void)setShadowAmbient:(float)newAmbient { + shadowAmbient = newAmbient; + [[self controlView] setNeedsDisplay:YES]; } -- (void)setShadowHeight:(float)newHeight; -{ - shadowHeight = newHeight; - [[self controlView] setNeedsDisplay:YES]; +- (float)shadowHeight { + return shadowHeight; } -- (float)shadowRadius; -{ - return shadowRadius; +- (void)setShadowHeight:(float)newHeight { + shadowHeight = newHeight; + [[self controlView] setNeedsDisplay:YES]; } -- (void)setShadowRadius:(float)newRadius; -{ - shadowRadius = newRadius; - [[self controlView] setNeedsDisplay:YES]; +- (float)shadowRadius { + return shadowRadius; } -- (float)shadowSaturation; -{ - return shadowSaturation; +- (void)setShadowRadius:(float)newRadius { + shadowRadius = newRadius; + [[self controlView] setNeedsDisplay:YES]; } -- (void)setShadowSaturation:(float)newSaturation; -{ - shadowSaturation = newSaturation; - [[self controlView] setNeedsDisplay:YES]; +- (float)shadowSaturation { + return shadowSaturation; } +- (void)setShadowSaturation:(float)newSaturation { + shadowSaturation = newSaturation; + [[self controlView] setNeedsDisplay:YES]; +} -@end +@end \ No newline at end of file diff --git a/ITImageView.h b/ITImageView.h old mode 100755 new mode 100644 index 72b768d..3715a0c --- a/ITImageView.h +++ b/ITImageView.h @@ -1,20 +1,18 @@ /* * ITKit - * ITImageView - * NSImageView subclass which adds new features, such as smooth scaling. + * ITImageView.h * - * Original Author : Matthew Judy - * Responsibility : Matthew Judy + * Custom NSImageView subclass that uses ITImageCell. * - * Copyright (c) 2003 iThink Software. - * All Rights Reserved + * Copyright (c) 2005 by iThink Software. + * All Rights Reserved. + * + * $Id$ * */ - #import - @interface ITImageView : NSImageView { } @@ -25,23 +23,22 @@ - (BOOL)castsShadow; - (void)setCastsShadow:(BOOL)newSetting; -- (float)shadowElevation; /* Light source elevation in degrees. Defaults to 45.0 */ +- (float)shadowElevation; /* Light source elevation in degrees. Defaults to 45.0 */ - (void)setShadowElevation:(float)newElevation; -- (float)shadowAzimuth; /* Light source azimuth in degrees. Defaults to 90.0 */ +- (float)shadowAzimuth; /* Light source azimuth in degrees. Defaults to 90.0 */ - (void)setShadowAzimuth:(float)newAzimuth; -- (float)shadowAmbient; /* Amount of ambient light. Defaults to 0.15 */ +- (float)shadowAmbient; /* Amount of ambient light. Defaults to 0.15 */ - (void)setShadowAmbient:(float)newAmbient; -- (float)shadowHeight; /* Height above the canvas. Defaults to 1.0 */ +- (float)shadowHeight; /* Height above the canvas. Defaults to 1.0 */ - (void)setShadowHeight:(float)newHeight; -- (float)shadowRadius; /* Blur radius. Defaults to 4.0 */ +- (float)shadowRadius; /* Blur radius. Defaults to 4.0 */ - (void)setShadowRadius:(float)newRadius; -- (float)shadowSaturation; /* Maximum saturation. Defaults to 1.0 */ +- (float)shadowSaturation; /* Maximum saturation. Defaults to 1.0 */ - (void)setShadowSaturation:(float)newSaturation; - -@end +@end \ No newline at end of file diff --git a/ITImageView.m b/ITImageView.m old mode 100755 new mode 100644 index 228e2f4..de903dd --- a/ITImageView.m +++ b/ITImageView.m @@ -1,110 +1,87 @@ #import "ITImageView.h" #import "ITImageCell.h" - @implementation ITImageView - -+ (void)initialize -{ - if ( self == [ITImageView class] ) { - [self setCellClass:[ITImageCell class]]; - } ++ (void)initialize { + if (self == [ITImageView class]) { + [self setCellClass:[ITImageCell class]]; + } } -+ (Class)cellClass -{ - return [ITImageCell class]; ++ (Class)cellClass { + return [ITImageCell class]; } -- (id)initWithFrame:(NSRect)rect -{ - if ( (self = [super initWithFrame:rect]) ) { - [self setScalesSmoothly:YES]; - } - - return self; +- (id)initWithFrame:(NSRect)rect { + if ((self = [super initWithFrame:rect])) { + [self setScalesSmoothly:YES]; + } + return self; } -- (BOOL)scalesSmoothly -{ - return [[self cell] scalesSmoothly]; +- (BOOL)scalesSmoothly { + return [[self cell] scalesSmoothly]; } -- (void)setScalesSmoothly:(BOOL)flag -{ - [[self cell] setScalesSmoothly:flag]; +- (void)setScalesSmoothly:(BOOL)flag { + [[self cell] setScalesSmoothly:flag]; } -- (BOOL)castsShadow; -{ - return [[self cell] castsShadow]; +- (BOOL)castsShadow { + return [[self cell] castsShadow]; } -- (void)setCastsShadow:(BOOL)newSetting; -{ - [[self cell] setCastsShadow:newSetting]; +- (void)setCastsShadow:(BOOL)newSetting { + [[self cell] setCastsShadow:newSetting]; } -- (float)shadowElevation; -{ - return [[self cell] shadowElevation]; +- (float)shadowElevation { + return [[self cell] shadowElevation]; } -- (void)setShadowElevation:(float)newElevation; -{ - [[self cell] setShadowElevation:newElevation]; +- (void)setShadowElevation:(float)newElevation { + [[self cell] setShadowElevation:newElevation]; } -- (float)shadowAzimuth; -{ - return [[self cell] shadowAzimuth]; +- (float)shadowAzimuth { + return [[self cell] shadowAzimuth]; } -- (void)setShadowAzimuth:(float)newAzimuth; -{ - [[self cell] setShadowAzimuth:newAzimuth]; +- (void)setShadowAzimuth:(float)newAzimuth { + [[self cell] setShadowAzimuth:newAzimuth]; } -- (float)shadowAmbient; -{ - return [[self cell] shadowAmbient]; +- (float)shadowAmbient { + return [[self cell] shadowAmbient]; } -- (void)setShadowAmbient:(float)newAmbient; -{ - [[self cell] setShadowAmbient:newAmbient]; +- (void)setShadowAmbient:(float)newAmbient { + [[self cell] setShadowAmbient:newAmbient]; } -- (float)shadowHeight; -{ - return [[self cell] shadowHeight]; +- (float)shadowHeight { + return [[self cell] shadowHeight]; } -- (void)setShadowHeight:(float)newHeight; -{ - [[self cell] setShadowHeight:newHeight]; +- (void)setShadowHeight:(float)newHeight { + [[self cell] setShadowHeight:newHeight]; } -- (float)shadowRadius; -{ - return [[self cell] shadowRadius]; +- (float)shadowRadius { + return [[self cell] shadowRadius]; } -- (void)setShadowRadius:(float)newRadius; -{ - [[self cell] setShadowRadius:newRadius]; +- (void)setShadowRadius:(float)newRadius { + [[self cell] setShadowRadius:newRadius]; } -- (float)shadowSaturation; -{ - return [[self cell] shadowSaturation]; +- (float)shadowSaturation { + return [[self cell] shadowSaturation]; } -- (void)setShadowSaturation:(float)newSaturation; -{ - [[self cell] setShadowSaturation:newSaturation]; +- (void)setShadowSaturation:(float)newSaturation { + [[self cell] setShadowSaturation:newSaturation]; } - -@end +@end \ No newline at end of file diff --git a/ITKeyBroadcaster.h b/ITKeyBroadcaster.h old mode 100755 new mode 100644 index 1fed89f..d94d75e --- a/ITKeyBroadcaster.h +++ b/ITKeyBroadcaster.h @@ -1,28 +1,22 @@ /* * ITKit - * ITHotKeyBroadcaster + * ITKeyBroadcaster.h * - * Original Author : Quentin Carnicelli <...> - * Responsibility : Kent Sutherland - * Responsibility : Matthew Judy + * Copyright (c) 2005 by iThink Software. + * All Rights Reserved. * - * Copyright (c) 2002 - 2003 iThink Software. - * All Rights Reserved + * $Id$ * */ +#import -#import +__private_extern__ NSString *ITKeyBroadcasterKeyEvent; //keys: keyCombo as ITKeyCombo +@interface ITKeyBroadcaster : NSButton { -@interface ITKeyBroadcaster : NSButton -{ } -+ (long)cocoaModifiersAsCarbonModifiers: (long)cocoaModifiers; ++ (long)cocoaModifiersAsCarbonModifiers:(long)cocoaModifiers; - -@end - - -__private_extern__ NSString* ITKeyBroadcasterKeyEvent; //keys: keyCombo as ITKeyCombo \ No newline at end of file +@end \ No newline at end of file diff --git a/ITKeyBroadcaster.m b/ITKeyBroadcaster.m old mode 100755 new mode 100644 index b09ea9a..4411022 --- a/ITKeyBroadcaster.m +++ b/ITKeyBroadcaster.m @@ -1,73 +1,58 @@ -// -// ITKeyBroadcaster.m -// -// Created by Quentin Carnicelli on Sun Aug 03 2003. -// Copyright (c) 2003 iThink Software. All rights reserved. -// - #import "ITKeyBroadcaster.h" #import "ITKeyCombo.h" #import -NSString* ITKeyBroadcasterKeyEvent = @"ITKeyBroadcasterKeyEvent"; +NSString *ITKeyBroadcasterKeyEvent = @"ITKeyBroadcasterKeyEvent"; @implementation ITKeyBroadcaster -- (void)_bcastKeyCode: (short)keyCode modifiers: (long)modifiers -{ - ITKeyCombo* keyCombo = [ITKeyCombo keyComboWithKeyCode: keyCode modifiers: modifiers]; - NSDictionary* userInfo = [NSDictionary dictionaryWithObject: keyCombo forKey:@"keyCombo"]; - - [[NSNotificationCenter defaultCenter] - postNotificationName: ITKeyBroadcasterKeyEvent - object: self - userInfo: userInfo]; +- (void)_bcastKeyCode:(short)keyCode modifiers:(long)modifiers { + ITKeyCombo *keyCombo = [ITKeyCombo keyComboWithKeyCode:keyCode modifiers:modifiers]; + NSDictionary *userInfo = [NSDictionary dictionaryWithObject:keyCombo forKey:@"keyCombo"]; + + [[NSNotificationCenter defaultCenter] postNotificationName:ITKeyBroadcasterKeyEvent object:self userInfo:userInfo]; } -- (void)_bcastEvent: (NSEvent*)event -{ +- (void)_bcastEvent:(NSEvent *)event { short keyCode; long modifiers; keyCode = [event keyCode]; modifiers = [event modifierFlags]; - modifiers = [[self class] cocoaModifiersAsCarbonModifiers: modifiers]; - - [self _bcastKeyCode: keyCode modifiers: modifiers]; + modifiers = [[self class] cocoaModifiersAsCarbonModifiers:modifiers]; + + [self _bcastKeyCode:keyCode modifiers:modifiers]; } -- (void)keyDown: (NSEvent*)event -{ - [self _bcastEvent: event]; +- (void)keyDown:(NSEvent *)event { + [self _bcastEvent:event]; } -- (BOOL)performKeyEquivalent: (NSEvent*)event -{ - [self _bcastEvent: event]; +- (BOOL)performKeyEquivalent:(NSEvent *)event { + [self _bcastEvent:event]; return YES; } -+ (long)cocoaModifiersAsCarbonModifiers: (long)cocoaModifiers -{ - static long cocoaToCarbon[6][2] = - { - { NSCommandKeyMask, cmdKey}, - { NSAlternateKeyMask, optionKey}, - { NSControlKeyMask, controlKey}, - { NSShiftKeyMask, shiftKey}, - { NSFunctionKeyMask, rightControlKey}, ++ (long)cocoaModifiersAsCarbonModifiers:(long)cocoaModifiers { + static long cocoaToCarbon[6][2] = { + { NSCommandKeyMask, cmdKey }, + { NSAlternateKeyMask, optionKey }, + { NSControlKeyMask, controlKey }, + { NSShiftKeyMask, shiftKey }, + { NSFunctionKeyMask, rightControlKey }, //{ NSAlphaShiftKeyMask, alphaLock }, //Ignore this? }; - + long carbonModifiers = 0; int i; - for( i = 0 ; i < 6; i++ ) - if( cocoaModifiers & cocoaToCarbon[i][0] ) + for (i = 0;i < 6;i++) { + if (cocoaModifiers & cocoaToCarbon[i][0]) { carbonModifiers += cocoaToCarbon[i][1]; + } + } return carbonModifiers; } - -@end +@end \ No newline at end of file diff --git a/ITKeyCombo.h b/ITKeyCombo.h old mode 100755 new mode 100644 index d5c3d77..130d675 --- a/ITKeyCombo.h +++ b/ITKeyCombo.h @@ -1,35 +1,30 @@ /* * ITKit - * ITKeyCombo + * ITKeyCombo.h * - * Original Author : Quentin Carnicelli <...> - * Responsibility : Kent Sutherland - * Responsibility : Matthew Judy + * Copyright (c) 2005 by iThink Software. + * All Rights Reserved. * - * Copyright (c) 2002 - 2003 iThink Software. - * All Rights Reserved + * $Id$ * */ +#import -#import - - -@interface ITKeyCombo : NSObject -{ - int mKeyCode; - int mModifiers; +@interface ITKeyCombo : NSObject { + int mKeyCode; + int mModifiers; } + (id)clearKeyCombo; -+ (id)keyComboWithKeyCode: (int)keyCode modifiers: (int)modifiers; -+ (id)keyComboWithPlistRepresentation: (id)plist; -- (id)initWithKeyCode: (int)keyCode modifiers: (int)modifiers; ++ (id)keyComboWithKeyCode:(int)keyCode modifiers:(int)modifiers; ++ (id)keyComboWithPlistRepresentation:(id)plist; +- (id)initWithKeyCode:(int)keyCode modifiers:(int)modifiers; -- (id)initWithPlistRepresentation: (id)plist; +- (id)initWithPlistRepresentation:(id)plist; - (id)plistRepresentation; -- (BOOL)isEqual: (ITKeyCombo*)combo; +- (BOOL)isEqual:(ITKeyCombo *)combo; - (int)keyCode; - (int)modifiers; @@ -37,12 +32,10 @@ - (BOOL)isClearCombo; - (BOOL)isValidHotKeyCombo; - @end - @interface ITKeyCombo (UserDisplayAdditions) -- (NSString*)description; +- (NSString *)description; @end \ No newline at end of file diff --git a/ITKeyCombo.m b/ITKeyCombo.m old mode 100755 new mode 100644 index c0111a1..fc43061 --- a/ITKeyCombo.m +++ b/ITKeyCombo.m @@ -1,182 +1,131 @@ -// -// ITKeyCombo.m -// -// Created by Quentin Carnicelli on Sat Aug 02 2003. -// Copyright (c) 2003 iThink Software. All rights reserved. -// - #import "ITKeyCombo.h" - #import @implementation ITKeyCombo -+ (id)clearKeyCombo -{ - return [self keyComboWithKeyCode: -1 modifiers: -1]; ++ (id)clearKeyCombo { + return [self keyComboWithKeyCode:-1 modifiers:-1]; } -+ (id)keyComboWithKeyCode: (int)keyCode modifiers: (int)modifiers -{ - return [[[self alloc] initWithKeyCode: keyCode modifiers: modifiers] autorelease]; ++ (id)keyComboWithKeyCode:(int)keyCode modifiers:(int)modifiers { + return [[[self alloc] initWithKeyCode:keyCode modifiers:modifiers] autorelease]; } -+ (id)keyComboWithPlistRepresentation: (id)plist -{ - return [[[self alloc] initWithPlistRepresentation: plist] autorelease]; ++ (id)keyComboWithPlistRepresentation:(id)plist { + return [[[self alloc] initWithPlistRepresentation:plist] autorelease]; } -- (id)initWithKeyCode: (int)keyCode modifiers: (int)modifiers -{ - self = [super init]; - - if( self ) - { +- (id)initWithKeyCode:(int)keyCode modifiers:(int)modifiers { + if ((self = [super init])) { mKeyCode = keyCode; mModifiers = modifiers; } - return self; } -- (id)initWithPlistRepresentation: (id)plist -{ +- (id)initWithPlistRepresentation:(id)plist { int keyCode, modifiers; - - keyCode = [[plist objectForKey: @"keyCode"] intValue]; - if( keyCode <= 0 ) keyCode = -1; - - modifiers = [[plist objectForKey: @"modifiers"] intValue]; - if( modifiers <= 0 ) modifiers = -1; - - return [self initWithKeyCode: keyCode modifiers: modifiers]; + + keyCode = [[plist objectForKey:@"keyCode"] intValue]; + if (keyCode <= 0) { + keyCode = -1; + } + + modifiers = [[plist objectForKey:@"modifiers"] intValue]; + if (modifiers <= 0) { + modifiers = -1; + } + + return [self initWithKeyCode:keyCode modifiers:modifiers]; } -- (id)plistRepresentation -{ - return [NSDictionary dictionaryWithObjectsAndKeys: - [NSNumber numberWithInt: [self keyCode]], @"keyCode", - [NSNumber numberWithInt: [self modifiers]], @"modifiers", - nil]; +- (id)plistRepresentation { + return [NSDictionary dictionaryWithObjectsAndKeys:[NSNumber numberWithInt:[self keyCode]], @"keyCode", [NSNumber numberWithInt:[self modifiers]], @"modifiers", nil]; } -- (id)copyWithZone:(NSZone*)zone; -{ +- (id)copyWithZone:(NSZone *)zone { return [self retain]; } -- (BOOL)isEqual: (ITKeyCombo*)combo -{ - return [self keyCode] == [combo keyCode] && - [self modifiers] == [combo modifiers]; +- (BOOL)isEqual:(ITKeyCombo *)combo { + return (([self keyCode] == [combo keyCode]) && ([self modifiers] == [combo modifiers])); } -#pragma mark - - -- (int)keyCode -{ +- (int)keyCode { return mKeyCode; } -- (int)modifiers -{ +- (int)modifiers { return mModifiers; } -- (BOOL)isValidHotKeyCombo -{ - return mKeyCode >= 0 && mModifiers > 0; +- (BOOL)isValidHotKeyCombo { + return ((mKeyCode >= 0) && (mModifiers > 0)); } -- (BOOL)isClearCombo -{ - return mKeyCode == -1 && mModifiers == -1; +- (BOOL)isClearCombo { + return ((mKeyCode == -1) && (mModifiers == -1)); } @end -#pragma mark - - @implementation ITKeyCombo (UserDisplayAdditions) -+ (NSDictionary*)_keyCodesDictionary -{ - static NSDictionary* keyCodes = nil; ++ (NSDictionary *)_keyCodesDictionary { + static NSDictionary *keyCodes = nil; - if( keyCodes == nil ) - { - NSString* path; - NSString* contents; + if (!keyCodes) { + NSString *path; + NSString *contents; - path = [[NSBundle bundleForClass: self] pathForResource: @"ITKeyCodes" ofType: @"plist"]; - contents = [NSString stringWithContentsOfFile: path]; + path = [[NSBundle bundleForClass:self] pathForResource:@"ITKeyCodes" ofType:@"plist"]; + contents = [NSString stringWithContentsOfFile:path]; keyCodes = [[contents propertyList] retain]; } return keyCodes; } -+ (NSString*)_stringForModifiers: (long)modifiers -{ - static long modToChar[4][2] = - { - { cmdKey, 0x23180000 }, - { optionKey, 0x23250000 }, - { controlKey, 0x005E0000 }, - { shiftKey, 0x21e70000 } ++ (NSString *)_stringForModifiers:(long)modifiers { + static long modToChar[4][2] = { + { cmdKey, 0x23180000 }, + { optionKey, 0x23250000 }, + { controlKey, 0x005E0000 }, + { shiftKey, 0x21e70000 } }; - - NSString* str = nil; - NSString* charStr; + + NSString *str = @""; + NSString *charStr; long i; - - str = [NSString string]; - - for( i = 0; i < 4; i++ ) - { - if( modifiers & modToChar[i][0] ) - { - charStr = [NSString stringWithCharacters: (const unichar*)&modToChar[i][1] length: 1]; - str = [str stringByAppendingString: charStr]; + + for (i = 0;i < 4;i++) { + if (modifiers & modToChar[i][0]) { + charStr = [NSString stringWithCharacters:(const unichar *)&modToChar[i][1] length:1]; + str = [str stringByAppendingString:charStr]; } } - if( !str ) - str = @""; - return str; } -+ (NSString*)_stringForKeyCode: (short)keyCode -{ - NSDictionary* dict; - id key; - NSString* str; - - dict = [self _keyCodesDictionary]; - key = [NSString stringWithFormat: @"%d", keyCode]; - str = [dict objectForKey: key]; ++ (NSString *)_stringForKeyCode:(short)keyCode { + NSDictionary *dict = [self _keyCodesDictionary]; + NSString *key = [NSString stringWithFormat:@"%d", keyCode]; + NSString *str = [dict objectForKey:key]; - if( !str ) - str = [NSString stringWithFormat: @"%X", keyCode]; + if (!str) { + str = [NSString stringWithFormat:@"%X", keyCode]; + } return str; } -- (NSString*)description -{ - NSString* desc; - - if( [self isValidHotKeyCombo] ) //This might have to change - { - desc = [NSString stringWithFormat: @"%@%@", - [[self class] _stringForModifiers: [self modifiers]], - [[self class] _stringForKeyCode: [self keyCode]]]; +- (NSString *)description { + if ([self isValidHotKeyCombo]) { //This might have to change + return [NSString stringWithFormat:@"%@%@", [[self class] _stringForModifiers:[self modifiers]], [[self class] _stringForKeyCode:[self keyCode]]]; } - else - desc = NSLocalizedString( @"(None)", @"Hot Keys: Key Combo text for 'empty' combo" ); - - return desc; + + return NSLocalizedString(@"(None)", @"Hot Keys: Key Combo text for 'empty' combo"); } @end \ No newline at end of file diff --git a/ITKeyComboPanel.h b/ITKeyComboPanel.h old mode 100755 new mode 100644 index 3df295a..e23f6ee --- a/ITKeyComboPanel.h +++ b/ITKeyComboPanel.h @@ -1,49 +1,41 @@ /* * ITKit - * ITKeyComboPanel + * ITKeyComboPanel.h * - * Original Author : Quentin Carnicelli <...> - * Responsibility : Kent Sutherland - * Responsibility : Matthew Judy + * Copyright (c) 2005 by iThink Software. + * All Rights Reserved. * - * Copyright (c) 2002 - 2003 iThink Software. - * All Rights Reserved + * $Id$ * */ - -#import - +#import @class ITKeyBroadcaster; @class ITKeyCombo; @class ITHotKey; - -@interface ITKeyComboPanel : NSWindowController -{ - IBOutlet NSTextField* mTitleField; - IBOutlet NSTextField* mComboField; - IBOutlet ITKeyBroadcaster* mKeyBcaster; - - NSString* mKeyName; - ITKeyCombo* mKeyCombo; +@interface ITKeyComboPanel : NSWindowController { + IBOutlet NSTextField *mTitleField; + IBOutlet NSTextField *mComboField; + IBOutlet ITKeyBroadcaster *mKeyBcaster; + NSString *mKeyName; + ITKeyCombo *mKeyCombo; } + (id)sharedPanel; - (int)runModal; -- (void)runModalForHotKey: (ITHotKey*)hotKey; - -- (void)setKeyCombo: (ITKeyCombo*)combo; -- (ITKeyCombo*)keyCombo; +- (void)runModalForHotKey:(ITHotKey *)hotKey; -- (void)setKeyBindingName: (NSString*)name; -- (NSString*)keyBindingName; +- (void)setKeyCombo:(ITKeyCombo *)combo; +- (ITKeyCombo *)keyCombo; -- (IBAction)ok: (id)sender; -- (IBAction)cancel: (id)sender; -- (IBAction)clear: (id)sender; +- (void)setKeyBindingName:(NSString *)name; +- (NSString *)keyBindingName; +- (IBAction)ok:(id)sender; +- (IBAction)cancel:(id)sender; +- (IBAction)clear:(id)sender; -@end +@end \ No newline at end of file diff --git a/ITKeyComboPanel.m b/ITKeyComboPanel.m old mode 100755 new mode 100644 index 3f71636..4fd3ff0 --- a/ITKeyComboPanel.m +++ b/ITKeyComboPanel.m @@ -1,154 +1,107 @@ -// -// ITKeyComboPanel.m -// -// Created by Quentin Carnicelli on Sun Aug 03 2003. -// Copyright (c) 2003 iThink Software. All rights reserved. -// - #import "ITKeyComboPanel.h" - #import "ITHotKey.h" #import "ITKeyCombo.h" #import "ITKeyBroadcaster.h" #import "ITHotKeyCenter.h" -#if __PROTEIN__ -#import "NSObjectAdditions.h" -#endif - @implementation ITKeyComboPanel static id _sharedKeyComboPanel = nil; -+ (id)sharedPanel -{ - if( _sharedKeyComboPanel == nil ) - { ++ (id)sharedPanel { + if (!_sharedKeyComboPanel) { _sharedKeyComboPanel = [[self alloc] init]; - - #if __PROTEIN__ - [_sharedKeyComboPanel releaseOnTerminate]; - #endif } - return _sharedKeyComboPanel; } -- (id)init -{ - return [self initWithWindowNibName: @"ITKeyComboPanel"]; +- (id)init { + return [self initWithWindowNibName:@"ITKeyComboPanel"]; } -- (void)dealloc -{ - [[NSNotificationCenter defaultCenter] removeObserver: self]; +- (void)dealloc { + [[NSNotificationCenter defaultCenter] removeObserver:self]; [mKeyName release]; - [super dealloc]; } -- (void)windowDidLoad -{ - [[NSNotificationCenter defaultCenter] - addObserver: self - selector: @selector( noteKeyBroadcast: ) - name: ITKeyBroadcasterKeyEvent - object: mKeyBcaster]; +- (void)windowDidLoad { + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(noteKeyBroadcast:) name:ITKeyBroadcasterKeyEvent object:mKeyBcaster]; } -- (void)_refreshContents -{ - if( mComboField ) - [mComboField setStringValue: [mKeyCombo description]]; - - if( mTitleField ) +- (void)_refreshContents { + if (mComboField) { + [mComboField setStringValue:[mKeyCombo description]]; + } + if (mTitleField) { [mTitleField setStringValue:mKeyName]; + } } -- (int)runModal -{ +- (int)runModal { int resultCode; - + [self window]; //Force us to load - + [self _refreshContents]; [[self window] center]; - [self showWindow: self]; - resultCode = [[NSApplication sharedApplication] runModalForWindow: [self window]]; + [self showWindow:self]; + resultCode = [[NSApplication sharedApplication] runModalForWindow:[self window]]; [self close]; - + return resultCode; } -- (void)runModalForHotKey: (ITHotKey*)hotKey -{ +- (void)runModalForHotKey:(ITHotKey *)hotKey { int resultCode; - [self setKeyBindingName: [hotKey name]]; - [self setKeyCombo: [hotKey keyCombo]]; + [self setKeyBindingName:[hotKey name]]; + [self setKeyCombo:[hotKey keyCombo]]; resultCode = [self runModal]; - if( resultCode == NSOKButton ) - { - [hotKey setKeyCombo: [self keyCombo]]; - [[ITHotKeyCenter sharedCenter] registerHotKey: hotKey]; + if (resultCode == NSOKButton) { + [hotKey setKeyCombo:[self keyCombo]]; + [[ITHotKeyCenter sharedCenter] registerHotKey:hotKey]; } } -#pragma mark - - -- (void)setKeyCombo: (ITKeyCombo*)combo -{ - [combo retain]; - [mKeyCombo release]; - mKeyCombo = combo; +- (void)setKeyCombo:(ITKeyCombo *)combo { + [mKeyCombo autorelease]; + mKeyCombo = [combo retain]; [self _refreshContents]; } -- (ITKeyCombo*)keyCombo -{ +- (ITKeyCombo *)keyCombo { return mKeyCombo; } -- (void)setKeyBindingName: (NSString*)name -{ - [name retain]; - [mKeyName release]; - mKeyName = name; +- (void)setKeyBindingName:(NSString *)name { + [mKeyName autorelease]; + mKeyName = [name retain]; [self _refreshContents]; } -- (NSString*)keyBindingName -{ +- (NSString *)keyBindingName { return mKeyName; } -#pragma mark - - -- (IBAction)ok: (id)sender -{ - [[NSApplication sharedApplication] stopModalWithCode: NSOKButton]; +- (IBAction)ok:(id)sender { + [[NSApplication sharedApplication] stopModalWithCode:NSOKButton]; } -- (IBAction)cancel: (id)sender -{ - [[NSApplication sharedApplication] stopModalWithCode: NSCancelButton]; +- (IBAction)cancel:(id)sender { + [[NSApplication sharedApplication] stopModalWithCode:NSCancelButton]; } -- (IBAction)clear: (id)sender -{ - [self setKeyCombo: [ITKeyCombo clearKeyCombo]]; - [[NSApplication sharedApplication] stopModalWithCode: NSOKButton]; +- (IBAction)clear:(id)sender { + [self setKeyCombo:[ITKeyCombo clearKeyCombo]]; + [[NSApplication sharedApplication] stopModalWithCode:NSOKButton]; } -- (void)noteKeyBroadcast: (NSNotification*)note -{ - ITKeyCombo* keyCombo; - - keyCombo = [[note userInfo] objectForKey: @"keyCombo"]; - - [self setKeyCombo: keyCombo]; +- (void)noteKeyBroadcast:(NSNotification *)note { + ITKeyCombo *keyCombo = [[note userInfo] objectForKey:@"keyCombo"]; + [self setKeyCombo:keyCombo]; } @end diff --git a/ITKit.h b/ITKit.h old mode 100755 new mode 100644 index 60a36c9..ed6e388 --- a/ITKit.h +++ b/ITKit.h @@ -1,13 +1,13 @@ /* * ITKit - * iThink Software's custom extensions to Apple's AppKit framework + * ITKit.h * - * Original Author : Matthew Judy - * Responsibility : Matthew Judy - * Responsibility : Joseph Spiros + * iThink Software's custom extensions to Apple's Cocoa framework. * - * Copyright (c) 2002 - 2003 iThink Software. - * All Rights Reserved + * Copyright (c) 2005 by iThink Software. + * All Rights Reserved. + * + * $Id$ * */ @@ -32,4 +32,4 @@ #import #import -#import +#import \ No newline at end of file diff --git a/ITKit.xcode/project.pbxproj b/ITKit.xcode/project.pbxproj old mode 100755 new mode 100644 index e8fc996..9511d2b --- a/ITKit.xcode/project.pbxproj +++ b/ITKit.xcode/project.pbxproj @@ -82,7 +82,6 @@ 7C992F8B054F539B000B93EA, 08FB77AEFE84172EC02AAC07, 7C992F90054F53D9000B93EA, - 7C992FA1054F54C3000B93EA, 32C88DFF0371C24200C91783, 089C1665FE841158C02AAC07, 7C99307F054F6982000B93EA, @@ -154,7 +153,6 @@ }; 08FB77AEFE84172EC02AAC07 = { children = ( - 7C01A1B7059B4A86003A4662, 7C992F93054F53F2000B93EA, 7C992F96054F53F7000B93EA, 7C992F9B054F547C000B93EA, @@ -698,86 +696,6 @@ //7C2 //7C3 //7C4 - 7C01A1B7059B4A86003A4662 = { - children = ( - 7C01A1BA059B4A8B003A4662, - ); - isa = PBXGroup; - name = Carbon; - refType = 4; - sourceTree = ""; - }; - 7C01A1BA059B4A8B003A4662 = { - children = ( - 7C01A1BF059B4AA1003A4662, - 7C01A1C0059B4AA1003A4662, - 7C01A1C5059B4AAC003A4662, - 7C01A1C6059B4AAC003A4662, - 7C23B320059BA4C000E08741, - ); - isa = PBXGroup; - name = Resources; - refType = 4; - sourceTree = ""; - }; - 7C01A1BF059B4AA1003A4662 = { - fileEncoding = 4; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.h; - path = ITMacResourceFile.h; - refType = 4; - sourceTree = ""; - }; - 7C01A1C0059B4AA1003A4662 = { - fileEncoding = 4; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.objc; - path = ITMacResourceFile.m; - refType = 4; - sourceTree = ""; - }; - 7C01A1C5059B4AAC003A4662 = { - fileEncoding = 4; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.h; - path = ITMacResource.h; - refType = 4; - sourceTree = ""; - }; - 7C01A1C6059B4AAC003A4662 = { - fileEncoding = 4; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.objc; - path = ITMacResource.m; - refType = 4; - sourceTree = ""; - }; - 7C23B316059BA4AA00E08741 = { - fileEncoding = 4; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.h; - path = ITStringMacResource.h; - refType = 4; - sourceTree = ""; - }; - 7C23B317059BA4AA00E08741 = { - fileEncoding = 4; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.objc; - path = ITStringMacResource.m; - refType = 4; - sourceTree = ""; - }; - 7C23B320059BA4C000E08741 = { - children = ( - 7C23B316059BA4AA00E08741, - 7C23B317059BA4AA00E08741, - ); - isa = PBXGroup; - name = "Custom Types"; - refType = 4; - sourceTree = ""; - }; 7C4BBADA05F98C9900734027 = { fileEncoding = 4; isa = PBXFileReference; @@ -1604,7 +1522,6 @@ 7C992E3E054F5246000B93EA = { children = ( 7C992E3F054F5246000B93EA, - 7C992E43054F5246000B93EA, ); isa = PBXGroup; path = Graphics; @@ -1618,25 +1535,12 @@ refType = 4; sourceTree = ""; }; - 7C992E43054F5246000B93EA = { - isa = PBXFileReference; - lastKnownFileType = image.tiff; - path = URLTextViewHand.tiff; - refType = 4; - sourceTree = ""; - }; 7C992E44054F5246000B93EA = { fileRef = 7C992E3F054F5246000B93EA; isa = PBXBuildFile; settings = { }; }; - 7C992E48054F5246000B93EA = { - fileRef = 7C992E43054F5246000B93EA; - isa = PBXBuildFile; - settings = { - }; - }; 7C992E78054F5285000B93EA = { fileEncoding = 4; isa = PBXFileReference; @@ -1828,134 +1732,6 @@ refType = 4; sourceTree = ""; }; - 7C992FA1054F54C3000B93EA = { - children = ( - 7C993015054F54F0000B93EA, - 7C993016054F54F0000B93EA, - 7C99301F054F5509000B93EA, - ); - isa = PBXGroup; - name = Deprecated; - path = ""; - refType = 4; - sourceTree = ""; - }; - 7C993015054F54F0000B93EA = { - fileEncoding = 4; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.h; - name = ITChasingArrowsView.h; - path = Deprecated/ITChasingArrowsView.h; - refType = 4; - sourceTree = ""; - }; - 7C993016054F54F0000B93EA = { - fileEncoding = 4; - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.objc; - name = ITChasingArrowsView.m; - path = Deprecated/ITChasingArrowsView.m; - refType = 4; - sourceTree = ""; - }; - 7C99301F054F5509000B93EA = { - children = ( - 7C993035054F6524000B93EA, - 7C993036054F6524000B93EA, - 7C993037054F6524000B93EA, - 7C993038054F6524000B93EA, - 7C993039054F6524000B93EA, - 7C99303A054F6524000B93EA, - 7C99303B054F6524000B93EA, - 7C99303C054F6524000B93EA, - 7C99303D054F6524000B93EA, - 7C99303E054F6524000B93EA, - ); - isa = PBXGroup; - path = Graphics; - refType = 4; - sourceTree = ""; - }; - 7C993035054F6524000B93EA = { - isa = PBXFileReference; - lastKnownFileType = image.tiff; - name = ITChasingArrow1.tiff; - path = Deprecated/ITChasingArrow1.tiff; - refType = 2; - sourceTree = SOURCE_ROOT; - }; - 7C993036054F6524000B93EA = { - isa = PBXFileReference; - lastKnownFileType = image.tiff; - name = ITChasingArrow2.tiff; - path = Deprecated/ITChasingArrow2.tiff; - refType = 2; - sourceTree = SOURCE_ROOT; - }; - 7C993037054F6524000B93EA = { - isa = PBXFileReference; - lastKnownFileType = image.tiff; - name = ITChasingArrow3.tiff; - path = Deprecated/ITChasingArrow3.tiff; - refType = 2; - sourceTree = SOURCE_ROOT; - }; - 7C993038054F6524000B93EA = { - isa = PBXFileReference; - lastKnownFileType = image.tiff; - name = ITChasingArrow4.tiff; - path = Deprecated/ITChasingArrow4.tiff; - refType = 2; - sourceTree = SOURCE_ROOT; - }; - 7C993039054F6524000B93EA = { - isa = PBXFileReference; - lastKnownFileType = image.tiff; - name = ITChasingArrow5.tiff; - path = Deprecated/ITChasingArrow5.tiff; - refType = 2; - sourceTree = SOURCE_ROOT; - }; - 7C99303A054F6524000B93EA = { - isa = PBXFileReference; - lastKnownFileType = image.tiff; - name = ITChasingArrow6.tiff; - path = Deprecated/ITChasingArrow6.tiff; - refType = 2; - sourceTree = SOURCE_ROOT; - }; - 7C99303B054F6524000B93EA = { - isa = PBXFileReference; - lastKnownFileType = image.tiff; - name = ITChasingArrow7.tiff; - path = Deprecated/ITChasingArrow7.tiff; - refType = 2; - sourceTree = SOURCE_ROOT; - }; - 7C99303C054F6524000B93EA = { - isa = PBXFileReference; - lastKnownFileType = image.tiff; - name = ITChasingArrow8.tiff; - path = Deprecated/ITChasingArrow8.tiff; - refType = 2; - sourceTree = SOURCE_ROOT; - }; - 7C99303D054F6524000B93EA = { - isa = PBXFileReference; - lastKnownFileType = image.tiff; - name = ITChasingArrow9.tiff; - path = Deprecated/ITChasingArrow9.tiff; - refType = 2; - sourceTree = SOURCE_ROOT; - }; - 7C99303E054F6524000B93EA = { - isa = PBXFileReference; - lastKnownFileType = image.tiff; - name = ITChasingArrow10.tiff; - path = Deprecated/ITChasingArrow10.tiff; - refType = 2; - sourceTree = SOURCE_ROOT; - }; 7C993057054F6832000B93EA = { children = ( 7C992DF9054F5179000B93EA, @@ -2367,7 +2143,6 @@ files = ( 8DC2EF530486A6940098B216, 7C992E44054F5246000B93EA, - 7C992E48054F5246000B93EA, 2A30D88F056B3AD90087AE54, 2A30D8A3056B3BE30087AE54, 2A30D8BE056B3C5D0087AE54, diff --git a/ITMacResource.h b/ITMacResource.h deleted file mode 100755 index c05da2f..0000000 --- a/ITMacResource.h +++ /dev/null @@ -1,33 +0,0 @@ -// -// ITMacResource.h -// ITKit -// -// Created by Joseph Spiros on Thu Dec 25 2003. -// Copyright (c) 2003 __MyCompanyName__. All rights reserved. -// - -#import -#import - -typedef ResType ITMacResourceType; - -@interface ITMacResource : NSObject { - @protected - Handle _handle; -} -+ (void)_registerClass:(Class)class forType:(ITMacResourceType)type; -+ (Class)_classForType:(ITMacResourceType)type; - -+ (id)_resourceWithHandle:(Handle)handle; -- (id)_initWithHandle:(Handle)handle; - -- (Handle)_handle; - -- (NSData *)data; -- (ITMacResourceType)type; -- (NSNumber *)id; -- (NSString *)name; - -- (Class)nativeRepresentationClass; -- (id)nativeRepresentation; -@end diff --git a/ITMacResource.m b/ITMacResource.m deleted file mode 100755 index 1ae8883..0000000 --- a/ITMacResource.m +++ /dev/null @@ -1,89 +0,0 @@ -// -// ITMacResource.m -// ITKit -// -// Created by Joseph Spiros on Thu Dec 25 2003. -// Copyright (c) 2003 __MyCompanyName__. All rights reserved. -// - -#import "ITMacResource.h" - - -@implementation ITMacResource - -static NSMutableDictionary *_resourceTypeClasses = nil; - -+ (void)_registerClass:(Class)class forType:(ITMacResourceType)type { - if (!_resourceTypeClasses) { - _resourceTypeClasses = [[NSMutableDictionary dictionary] retain]; - } - [_resourceTypeClasses setObject:class forKey:[NSString stringWithCString:(char *)type]]; -} - -+ (Class)_classForType:(ITMacResourceType)type { - Class _class = [_resourceTypeClasses objectForKey:[NSString stringWithCString:(char *)type]]; - return ((_class == nil) ? [ITMacResource class] : _class); -} - -+ (id)_resourceWithHandle:(Handle)handle { // THIS *WILL* RETURN A MORE SPECIFIC INSTANCE USING THE REGISTRATION DATABASE IF SUCH A CLASS EXISTS - return [[[self alloc] _initWithHandle:handle] autorelease]; -} - -- (id)_initWithHandle:(Handle)handle { - if (self = [super init]) { - _handle = handle; - } - return self; -} - -- (Handle)_handle { - return _handle; -} - -- (NSData *)data { - NSData *_data; - HLock(_handle); - _data = [NSData dataWithBytes:(*_handle) length:GetHandleSize(_handle)]; - HUnlock(_handle); - return _data; -} - -- (ITMacResourceType)type { - short _id; - ResType _type; - Str255 _name; - GetResInfo(_handle, &_id, &_type, _name); - return (ITMacResourceType)_type; -} - -- (NSNumber *)id { - short _id; - ResType _type; - Str255 _name; - GetResInfo(_handle, &_id, &_type, _name); - return [NSNumber numberWithShort:_id]; -} - -- (NSString *)name { - short _id; - ResType _type; - Str255 _name; - GetResInfo(_handle, &_id, &_type, _name); - return [(NSString*)CFStringCreateWithPascalString(NULL, -_name, kCFStringEncodingMacRomanLatin1) autorelease]; -} - -- (Class)nativeRepresentationClass { - return nil; -} - -- (id)nativeRepresentation { - return nil; -} - -- (void)dealloc { - ReleaseResource(_handle); - [super dealloc]; -} - -@end diff --git a/ITMacResourceFile.h b/ITMacResourceFile.h deleted file mode 100755 index 4cfa271..0000000 --- a/ITMacResourceFile.h +++ /dev/null @@ -1,22 +0,0 @@ -// -// ITMacResourceFile.h -// ITKit -// -// Created by Joseph Spiros on Thu Dec 25 2003. -// Copyright (c) 2003 __MyCompanyName__. All rights reserved. -// - -#import -#import -#import "ITMacResource.h" - -@interface ITMacResourceFile : NSObject { - FSRef _fileReference; - SInt16 _referenceNumber; -} -- (id)initWithContentsOfFile:(NSString *)path; -- (id)initWithContentsOfFile:(NSString *)path fork:(HFSUniStr255)namedFork; - -- (ITMacResource *)resourceOfType:(ITMacResourceType)type withID:(NSNumber *)idNum; -- (ITMacResource *)resourceOfType:(ITMacResourceType)type withName:(NSString *)name; -@end diff --git a/ITMacResourceFile.m b/ITMacResourceFile.m deleted file mode 100755 index 6f39d53..0000000 --- a/ITMacResourceFile.m +++ /dev/null @@ -1,53 +0,0 @@ -// -// ITMacResourceFile.m -// ITKit -// -// Created by Joseph Spiros on Thu Dec 25 2003. -// Copyright (c) 2003 __MyCompanyName__. All rights reserved. -// - -#import "ITMacResourceFile.h" - - -@implementation ITMacResourceFile - -- (id)initWithContentsOfFile:(NSString *)path { - HFSUniStr255 dataForkName; - FSGetDataForkName(&dataForkName); - return [self initWithContentsOfFile:path fork:dataForkName]; -} - -- (id)initWithContentsOfFile:(NSString *)path fork:(HFSUniStr255)namedFork { - if (self = [super init]) { - if (FSPathMakeRef([path fileSystemRepresentation],&_fileReference,NULL) == noErr) { - FSOpenResourceFile(&_fileReference, namedFork.length, namedFork.unicode, fsRdPerm, &_referenceNumber); - } else { - // Raise Exception! - } - } - return self; -} - -- (ITMacResource *)resourceOfType:(ITMacResourceType)type withID:(NSNumber *)idNum { - return [[ITMacResource _classForType:type] _resourceWithHandle:GetResource((ResType)type,[idNum shortValue])]; -} - -- (ITMacResource *)resourceOfType:(ITMacResourceType)type withName:(NSString *)name { - Str255 _buffer; - StringPtr _ptr = CFStringGetPascalStringPtr((CFStringRef)name, kCFStringEncodingMacRomanLatin1); - if (_ptr == NULL) { - if (CFStringGetPascalString((CFStringRef)name, _buffer, 256, kCFStringEncodingMacRomanLatin1)) { - _ptr = _buffer; - } else { - // Raise exception! - } - } - return [[ITMacResource _classForType:type] _resourceWithHandle:GetNamedResource((ResType)type,_ptr)]; -} - -- (void)dealloc { - CloseResFile(_referenceNumber); - [super dealloc]; -} - -@end diff --git a/ITMultilineTextFieldCell.h b/ITMultilineTextFieldCell.h old mode 100755 new mode 100644 index 59ca9c0..01fc748 --- a/ITMultilineTextFieldCell.h +++ b/ITMultilineTextFieldCell.h @@ -1,15 +1,21 @@ -// -// ITMultilineTextFieldCell.h -// ITKit -// -// Created by Joseph Spiros on Fri Mar 05 2004. -// Copyright (c) 2004 __MyCompanyName__. All rights reserved. -// +/* + * ITKit + * ITMultilineTextFieldCell.h + * + * Custom NSCell subclass that draws multiple lines of text using standard + * UI guidelines for such a presentation. + * + * Copyright (c) 2005 by iThink Software. + * All Rights Reserved. + * + * $Id$ + * + */ #import - @interface ITMultilineTextFieldCell : NSCell { + } -@end +@end \ No newline at end of file diff --git a/ITMultilineTextFieldCell.m b/ITMultilineTextFieldCell.m old mode 100755 new mode 100644 index b804768..3fda642 --- a/ITMultilineTextFieldCell.m +++ b/ITMultilineTextFieldCell.m @@ -1,113 +1,103 @@ -// -// ITMultilineTextFieldCell.m -// ITKit -// -// Created by Joseph Spiros on Fri Mar 05 2004. -// Copyright (c) 2004 __MyCompanyName__. All rights reserved. -// - #import "ITMultilineTextFieldCell.h" - @implementation ITMultilineTextFieldCell -- (void)drawInteriorWithFrame:(NSRect)cellFrame inView:(NSView *)controlView -{ - if ([[self objectValue] isKindOfClass:[NSArray class]]) { - - /* - Okay, here's the different possibilities for the objectValue of this cell, and how they're displayed: - - NSArray of NSStrings - Draw first line with System Font, following lines with Small System Font - NSArray of NSAttributedStrings - Draw as given - NSArray of both - Draw each line as above! - - The number of lines is determined by the contents of the array... - */ - - NSColor *defaultColor; - NSMutableParagraphStyle *paragraphStyle = [[[NSParagraphStyle defaultParagraphStyle] mutableCopy] autorelease]; - [paragraphStyle setLineBreakMode:NSLineBreakByTruncatingTail]; - NSPoint cellPoint = cellFrame.origin; - NSSize cellSize = cellFrame.size; - - NSRect secondaryLineRect; - - if ([self isHighlighted] && ([self highlightColorWithFrame:cellFrame inView:controlView]!=[NSColor secondarySelectedControlColor])) { - defaultColor = [NSColor whiteColor]; - } else { - defaultColor = [NSColor blackColor]; - } - - // Process the first line... - { - NSDictionary *firstLineAttributes = [NSDictionary dictionaryWithObjectsAndKeys:[NSFont boldSystemFontOfSize:[NSFont systemFontSize]], NSFontAttributeName, defaultColor, NSForegroundColorAttributeName, paragraphStyle, NSParagraphStyleAttributeName, nil]; - - NSRect firstLineRect = NSMakeRect(cellPoint.x+5, cellPoint.y+1, cellSize.width-5, cellSize.height); - - id firstString = [[self objectValue] objectAtIndex:0]; - NSMutableAttributedString *firstAttrString; - - if ([firstString isKindOfClass:[NSAttributedString class]]) { - firstAttrString = [[[NSMutableAttributedString alloc] initWithAttributedString:firstString] autorelease]; - [firstAttrString addAttribute:NSParagraphStyleAttributeName value:paragraphStyle range:NSMakeRange(0,[firstAttrString length])]; - if ([defaultColor isEqual:[NSColor whiteColor]]) { - [firstAttrString addAttribute:NSForegroundColorAttributeName value:defaultColor range:NSMakeRange(0,[firstAttrString length])]; - } - } else if ([firstString isKindOfClass:[NSString class]]) { - firstAttrString = [[[NSMutableAttributedString alloc] initWithString:firstString attributes:firstLineAttributes] autorelease]; - } else { - firstAttrString = [[[NSMutableAttributedString alloc] initWithString:[NSString stringWithFormat:@"Object (%@) is not a string", firstString] attributes:firstLineAttributes] autorelease]; - } - - [controlView lockFocus]; - - [firstAttrString drawInRect:firstLineRect]; - - [controlView unlockFocus]; - - secondaryLineRect = NSMakeRect(cellPoint.x+5, (cellPoint.y+1+[firstAttrString size].height), cellSize.width-5, cellSize.height); - } - - // Process the secondary lines - { - NSDictionary *secondaryLineAttributes = [NSDictionary dictionaryWithObjectsAndKeys:[NSFont systemFontOfSize:[NSFont smallSystemFontSize]], NSFontAttributeName, defaultColor, NSForegroundColorAttributeName, paragraphStyle, NSParagraphStyleAttributeName, nil]; - - NSMutableArray *tMArray = [NSMutableArray arrayWithArray:[self objectValue]]; - [tMArray removeObjectAtIndex:0]; // Remove the first line string... already handled that above! - - NSEnumerator *enumerator = [tMArray objectEnumerator]; - id secondaryString; - - while (secondaryString = [enumerator nextObject]) { - - NSMutableAttributedString *secondaryAttrString; - - if ([secondaryString isKindOfClass:[NSAttributedString class]]) { - secondaryAttrString = [[[NSMutableAttributedString alloc] initWithAttributedString:secondaryString] autorelease]; - [secondaryAttrString addAttribute:NSParagraphStyleAttributeName value:paragraphStyle range:NSMakeRange(0,[secondaryAttrString length])]; - if ([defaultColor isEqual:[NSColor whiteColor]]) { - [secondaryAttrString addAttribute:NSForegroundColorAttributeName value:defaultColor range:NSMakeRange(0,[secondaryAttrString length])]; - } - } else if ([secondaryString isKindOfClass:[NSString class]]) { - secondaryAttrString = [[[NSMutableAttributedString alloc] initWithString:secondaryString attributes:secondaryLineAttributes] autorelease]; - } else { - secondaryAttrString = [[[NSMutableAttributedString alloc] initWithString:[NSString stringWithFormat:@"Object (%@) is not a string", secondaryString] attributes:secondaryLineAttributes] autorelease]; - } - - [controlView lockFocus]; - - [secondaryAttrString drawInRect:secondaryLineRect]; - - [controlView unlockFocus]; - - secondaryLineRect.origin.y = secondaryLineRect.origin.y+[secondaryAttrString size].height; // modify the rect for the next loop, based on the size and location of the most recently processed line. - - } - } - } else { - [super drawInteriorWithFrame:cellFrame inView:controlView]; - } +- (void)drawInteriorWithFrame:(NSRect)cellFrame inView:(NSView *)controlView { + if ([(id)[self objectValue] isKindOfClass:[NSArray class]]) { + + /* + Okay, here's the different possibilities for the objectValue of this cell, and how they're displayed: + + NSArray of NSStrings - Draw first line with System Font, following lines with Small System Font + NSArray of NSAttributedStrings - Draw as given + NSArray of both - Draw each line as above! + + The number of lines is determined by the contents of the array... + */ + + NSColor *defaultColor; + NSMutableParagraphStyle *paragraphStyle = [[[NSParagraphStyle defaultParagraphStyle] mutableCopy] autorelease]; + [paragraphStyle setLineBreakMode:NSLineBreakByTruncatingTail]; + NSPoint cellPoint = cellFrame.origin; + NSSize cellSize = cellFrame.size; + + NSRect secondaryLineRect; + + if ([self isHighlighted] && ([self highlightColorWithFrame:cellFrame inView:controlView]!=[NSColor secondarySelectedControlColor])) { + defaultColor = [NSColor whiteColor]; + } else { + defaultColor = [NSColor blackColor]; + } + + // Process the first line... + { + NSDictionary *firstLineAttributes = [NSDictionary dictionaryWithObjectsAndKeys:[NSFont boldSystemFontOfSize:[NSFont systemFontSize]], NSFontAttributeName, defaultColor, NSForegroundColorAttributeName, paragraphStyle, NSParagraphStyleAttributeName, nil]; + + NSRect firstLineRect = NSMakeRect(cellPoint.x+5, cellPoint.y+1, cellSize.width-5, cellSize.height); + + id firstString = [(NSArray *)[self objectValue] objectAtIndex:0]; + NSMutableAttributedString *firstAttrString; + + if ([firstString isKindOfClass:[NSAttributedString class]]) { + firstAttrString = [[[NSMutableAttributedString alloc] initWithAttributedString:firstString] autorelease]; + [firstAttrString addAttribute:NSParagraphStyleAttributeName value:paragraphStyle range:NSMakeRange(0,[firstAttrString length])]; + if ([defaultColor isEqual:[NSColor whiteColor]]) { + [firstAttrString addAttribute:NSForegroundColorAttributeName value:defaultColor range:NSMakeRange(0,[firstAttrString length])]; + } + } else if ([firstString isKindOfClass:[NSString class]]) { + firstAttrString = [[[NSMutableAttributedString alloc] initWithString:firstString attributes:firstLineAttributes] autorelease]; + } else { + firstAttrString = [[[NSMutableAttributedString alloc] initWithString:[NSString stringWithFormat:@"Object (%@) is not a string", firstString] attributes:firstLineAttributes] autorelease]; + } + + [controlView lockFocus]; + + [firstAttrString drawInRect:firstLineRect]; + + [controlView unlockFocus]; + + secondaryLineRect = NSMakeRect(cellPoint.x+5, (cellPoint.y+1+[firstAttrString size].height), cellSize.width-5, cellSize.height); + } + + // Process the secondary lines + { + NSDictionary *secondaryLineAttributes = [NSDictionary dictionaryWithObjectsAndKeys:[NSFont systemFontOfSize:[NSFont smallSystemFontSize]], NSFontAttributeName, defaultColor, NSForegroundColorAttributeName, paragraphStyle, NSParagraphStyleAttributeName, nil]; + + NSMutableArray *tMArray = [NSMutableArray arrayWithArray:(NSArray *)[self objectValue]]; + [tMArray removeObjectAtIndex:0]; // Remove the first line string... already handled that above! + + NSEnumerator *enumerator = [tMArray objectEnumerator]; + id secondaryString; + + while ((secondaryString = [enumerator nextObject])) { + + NSMutableAttributedString *secondaryAttrString; + + if ([secondaryString isKindOfClass:[NSAttributedString class]]) { + secondaryAttrString = [[[NSMutableAttributedString alloc] initWithAttributedString:secondaryString] autorelease]; + [secondaryAttrString addAttribute:NSParagraphStyleAttributeName value:paragraphStyle range:NSMakeRange(0,[secondaryAttrString length])]; + if ([defaultColor isEqual:[NSColor whiteColor]]) { + [secondaryAttrString addAttribute:NSForegroundColorAttributeName value:defaultColor range:NSMakeRange(0,[secondaryAttrString length])]; + } + } else if ([secondaryString isKindOfClass:[NSString class]]) { + secondaryAttrString = [[[NSMutableAttributedString alloc] initWithString:secondaryString attributes:secondaryLineAttributes] autorelease]; + } else { + secondaryAttrString = [[[NSMutableAttributedString alloc] initWithString:[NSString stringWithFormat:@"Object (%@) is not a string", secondaryString] attributes:secondaryLineAttributes] autorelease]; + } + + [controlView lockFocus]; + + [secondaryAttrString drawInRect:secondaryLineRect]; + + [controlView unlockFocus]; + + secondaryLineRect.origin.y = secondaryLineRect.origin.y+[secondaryAttrString size].height; // modify the rect for the next loop, based on the size and location of the most recently processed line. + + } + } + } else { + [super drawInteriorWithFrame:cellFrame inView:controlView]; + } } -@end +@end \ No newline at end of file diff --git a/ITPivotWindowEffect.h b/ITPivotWindowEffect.h old mode 100755 new mode 100644 index ae69b00..add7c1c --- a/ITPivotWindowEffect.h +++ b/ITPivotWindowEffect.h @@ -1,23 +1,21 @@ /* * ITKit - * ITPivotWindowEffect - * Effect subclass which pivots (rotates) a window into position on the screen. + * ITPivotWindowEffect.h * - * Original Author : Matthew Judy - * Responsibility : Matthew Judy + * Effect subclass which pivots (rotates) a window into position on the screen. * - * Copyright (c) 2002 - 2003 iThink Software. - * All Rights Reserved + * Copyright (c) 2005 by iThink Software. + * All Rights Reserved. + * + * $Id$ * */ - #import #import "ITWindowEffect.h" - -@interface ITPivotWindowEffect : ITWindowEffect { +@interface ITPivotWindowEffect : ITWindowEffect { } -@end +@end \ No newline at end of file diff --git a/ITPivotWindowEffect.m b/ITPivotWindowEffect.m old mode 100755 new mode 100644 diff --git a/ITSlideHorizontallyWindowEffect.h b/ITSlideHorizontallyWindowEffect.h old mode 100755 new mode 100644 index 5054912..32b042d --- a/ITSlideHorizontallyWindowEffect.h +++ b/ITSlideHorizontallyWindowEffect.h @@ -1,23 +1,21 @@ /* * ITKit - * ITSlideHorizontallyWindowEffect - * Effect subclass which slides a window in from the right or left side of the screen. + * ITSlideHorizontallyWindowEffect.h * - * Original Author : Matthew Judy - * Responsibility : Matthew Judy + * Effect subclass which slides a window in from the right or left side of the screen. * - * Copyright (c) 2002 - 2003 iThink Software. - * All Rights Reserved + * Copyright (c) 2005 by iThink Software. + * All Rights Reserved. + * + * $Id$ * */ - #import #import "ITWindowEffect.h" - -@interface ITSlideHorizontallyWindowEffect : ITWindowEffect { +@interface ITSlideHorizontallyWindowEffect : ITWindowEffect { } -@end +@end \ No newline at end of file diff --git a/ITSlideHorizontallyWindowEffect.m b/ITSlideHorizontallyWindowEffect.m old mode 100755 new mode 100644 diff --git a/ITSlideVerticallyWindowEffect.h b/ITSlideVerticallyWindowEffect.h old mode 100755 new mode 100644 index 58a4fe9..842c5d2 --- a/ITSlideVerticallyWindowEffect.h +++ b/ITSlideVerticallyWindowEffect.h @@ -1,23 +1,21 @@ /* * ITKit - * ITSlideVerticallyWindowEffect - * Effect subclass which slides a window in from the top or bottom of the screen. + * ITSlideVerticallyWindowEffect.h * - * Original Author : Matthew Judy - * Responsibility : Matthew Judy + * Effect subclass which slides a window in from the top or bottom of the screen. * - * Copyright (c) 2002 - 2003 iThink Software. - * All Rights Reserved + * Copyright (c) 2005 by iThink Software. + * All Rights Reserved. + * + * $Id$ * */ - #import #import "ITWindowEffect.h" - -@interface ITSlideVerticallyWindowEffect : ITWindowEffect { +@interface ITSlideVerticallyWindowEffect : ITWindowEffect { } -@end +@end \ No newline at end of file diff --git a/ITSlideVerticallyWindowEffect.m b/ITSlideVerticallyWindowEffect.m old mode 100755 new mode 100644 diff --git a/ITSpinAndZoomWindowEffect.h b/ITSpinAndZoomWindowEffect.h old mode 100755 new mode 100644 index 5f923ec..750331f --- a/ITSpinAndZoomWindowEffect.h +++ b/ITSpinAndZoomWindowEffect.h @@ -1,23 +1,21 @@ /* * ITKit - * ITSpinAndZoomWindowEffect - * Effect subclass which Spins (expands/shrinks) a window into position on the screen. + * ITSpinAndZoomWindowEffect.h * - * Original Author : Kent Sutherland - * Responsibility : Kent Sutherland + * Effect subclass which spins and zooms a window into position on the screen. * - * Copyright (c) 2002 - 2004 iThink Software. - * All Rights Reserved + * Copyright (c) 2005 by iThink Software. + * All Rights Reserved. + * + * $Id$ * */ - #import #import "ITWindowEffect.h" - -@interface ITSpinAndZoomWindowEffect : ITWindowEffect { +@interface ITSpinAndZoomWindowEffect : ITWindowEffect { } -@end +@end \ No newline at end of file diff --git a/ITSpinAndZoomWindowEffect.m b/ITSpinAndZoomWindowEffect.m old mode 100755 new mode 100644 diff --git a/ITSpinWindowEffect.h b/ITSpinWindowEffect.h old mode 100755 new mode 100644 index ee6fad8..93cf3b4 --- a/ITSpinWindowEffect.h +++ b/ITSpinWindowEffect.h @@ -1,23 +1,21 @@ /* * ITKit - * ITSpinWindowEffect - * Effect subclass which Spins (expands/shrinks) a window into position on the screen. + * ITSpinWindowEffect.h * - * Original Author : Kent Sutherland - * Responsibility : Kent Sutherland + * Effect subclass which spins a window into position on the screen. * - * Copyright (c) 2002 - 2004 iThink Software. - * All Rights Reserved + * Copyright (c) 2005 by iThink Software. + * All Rights Reserved. + * + * $Id$ * */ - #import #import "ITWindowEffect.h" - -@interface ITSpinWindowEffect : ITWindowEffect { +@interface ITSpinWindowEffect : ITWindowEffect { } -@end +@end \ No newline at end of file diff --git a/ITSpinWindowEffect.m b/ITSpinWindowEffect.m old mode 100755 new mode 100644 diff --git a/ITSplashScreen.h b/ITSplashScreen.h index 40ac83c..42ab05c 100644 --- a/ITSplashScreen.h +++ b/ITSplashScreen.h @@ -1,15 +1,24 @@ -/* ITSplashScreen */ +/* + * ITKit + * ITSplashScreen.h + * + * Copyright (c) 2005 by iThink Software. + * All Rights Reserved. + * + * $Id$ + * + */ #import @class ITSplashWindow, ITSplashView; -@interface ITSplashScreen : NSObject -{ +@interface ITSplashScreen : NSObject { NSTimer *_fadeTimer; ITSplashWindow *_window; ITSplashView *_view; } + + (ITSplashScreen *)sharedController; - (double)progressValue; @@ -22,4 +31,5 @@ - (void)showSplashWindow; - (void)closeSplashWindow; -@end + +@end \ No newline at end of file diff --git a/ITSplashScreen.m b/ITSplashScreen.m index ce7a8cd..f41ddb6 100644 --- a/ITSplashScreen.m +++ b/ITSplashScreen.m @@ -2,21 +2,19 @@ #import "ITSplashWindow.h" #import "ITSplashView.h" -static ITSplashScreen *_sharedController; +static ITSplashScreen *_sharedScreen; @implementation ITSplashScreen -+ (ITSplashScreen *)sharedController -{ - if (!_sharedController) { - _sharedController = [[ITSplashScreen alloc] init]; ++ (ITSplashScreen *)sharedController { + if (!_sharedScreen) { + _sharedScreen = [[ITSplashScreen alloc] init]; } - return _sharedController; + return _sharedScreen; } -- (id)init -{ - if ( (self = [super init]) ) { +- (id)init { + if ((self = [super init])) { _window = [[ITSplashWindow alloc] initWithContentRect:NSMakeRect(0, 0, 200, 200) styleMask:NSBorderlessWindowMask backing:NSBackingStoreBuffered defer:NO]; _view = [[ITSplashView alloc] initWithFrame:NSMakeRect(0, 0, 200, 200)]; [_window setLevel:NSStatusWindowLevel]; @@ -25,19 +23,16 @@ static ITSplashScreen *_sharedController; return self; } -- (void)dealloc -{ +- (void)dealloc { [_window release]; [super dealloc]; } -- (double)progressValue -{ +- (double)progressValue { return ([[_view progressIndicator] doubleValue] / 100.0); } -- (void)setProgressValue:(double)progress -{ +- (void)setProgressValue:(double)progress { if (progress >= 1.0) { [[_view progressIndicator] setIndeterminate:YES]; } else { @@ -45,13 +40,11 @@ static ITSplashScreen *_sharedController; } } -- (NSImage *)image -{ +- (NSImage *)image { return [_view image]; } -- (void)setImage:(NSImage *)image -{ +- (void)setImage:(NSImage *)image { NSRect rect = NSZeroRect, newRect = [_window frame]; rect.size = [image size]; newRect.size = rect.size; @@ -63,48 +56,41 @@ static ITSplashScreen *_sharedController; [_window center]; } -- (NSString *)string -{ +- (NSString *)string { return [_view string]; } -- (void)setString:(NSString *)string -{ +- (void)setString:(NSString *)string { [_view setString:string]; } -- (void)setSettingsPath:(NSString *)path -{ +- (void)setSettingsPath:(NSString *)path { [_view loadControlsFromPath:path]; } -- (void)showSplashWindow -{ +- (void)showSplashWindow { //[_window setAlphaValue:0.0]; [_window makeKeyAndOrderFront:nil]; //_fadeTimer = [NSTimer scheduledTimerWithTimeInterval:(1.0 / 30.0) target:self selector:@selector(showStep:) userInfo:nil repeats:YES]; } -- (void)showStep:(NSTimer *)timer -{ - [_window setAlphaValue:[_window alphaValue] + 0.05]; +- (void)showStep:(NSTimer *)timer { + [_window setAlphaValue:([_window alphaValue] + 0.05)]; if ([_window alphaValue] >= 1.0) { [timer invalidate]; _fadeTimer = nil; } } -- (void)closeSplashWindow -{ +- (void)closeSplashWindow { if (_fadeTimer) { [_fadeTimer invalidate]; } _fadeTimer = [NSTimer scheduledTimerWithTimeInterval:(1.0 / 30.0) target:self selector:@selector(closeStep:) userInfo:nil repeats:YES]; } -- (void)closeStep:(NSTimer *)timer -{ - [_window setAlphaValue:[_window alphaValue] - 0.05]; +- (void)closeStep:(NSTimer *)timer { + [_window setAlphaValue:([_window alphaValue] - 0.05)]; if ([_window alphaValue] <= 0.0) { [timer invalidate]; _fadeTimer = nil; diff --git a/ITSplashView.h b/ITSplashView.h index 359bd3c..03ea722 100644 --- a/ITSplashView.h +++ b/ITSplashView.h @@ -1,19 +1,22 @@ -// -// ITSplashView.h -// SplashScreen -// -// Created by Kent Sutherland on 11/22/04. -// Copyright 2004 __MyCompanyName__. All rights reserved. -// +/* + * ITKit + * ITSplashView.h + * + * Copyright (c) 2005 by iThink Software. + * All Rights Reserved. + * + * $Id$ + * + */ #import -@interface ITSplashView : NSView -{ +@interface ITSplashView : NSView { NSImage *_image; NSProgressIndicator *_progress; NSTextField *_text; } + - (void)stopAnimation; - (NSProgressIndicator *)progressIndicator; - (NSImage *)image; @@ -21,4 +24,5 @@ - (void)setImage:(NSImage *)image; - (void)setString:(NSString *)text; - (void)loadControlsFromPath:(NSString *)path; -@end + +@end \ No newline at end of file diff --git a/ITSplashView.m b/ITSplashView.m index 5c90f53..d400a13 100644 --- a/ITSplashView.m +++ b/ITSplashView.m @@ -1,73 +1,48 @@ -// -// ITSplashView.m -// SplashScreen -// -// Created by Kent Sutherland on 11/22/04. -// Copyright 2004 __MyCompanyName__. All rights reserved. -// - #import "ITSplashView.h" @implementation ITSplashView -- (id)initWithFrame:(NSRect)frame -{ - if ( (self = [super initWithFrame:frame]) ) { - } - return self; -} - -- (void)dealloc -{ +- (void)dealloc { [_image release]; [_progress release]; [_text release]; [super dealloc]; } -- (void)drawRect:(NSRect)rect -{ +- (void)drawRect:(NSRect)rect { [_image compositeToPoint:NSZeroPoint operation:NSCompositeSourceOver]; } -- (BOOL)isOpaque -{ +- (BOOL)isOpaque { return NO; } -- (void)stopAnimation -{ +- (void)stopAnimation { [_progress stopAnimation:nil]; } -- (NSProgressIndicator *)progressIndicator -{ +- (NSProgressIndicator *)progressIndicator { return _progress; } -- (NSImage *)image -{ +- (NSImage *)image { return _image; } -- (NSString *)string -{ +- (NSString *)string { return [_text stringValue]; } -- (void)setImage:(NSImage *)image -{ +- (void)setImage:(NSImage *)image { [_image autorelease]; _image = [image retain]; } -- (void)setString:(NSString *)text -{ +- (void)setString:(NSString *)text { [_text setStringValue:text]; } -- (void)loadControlsFromPath:(NSString *)path -{ +- (void)loadControlsFromPath:(NSString *)path { [_progress removeFromSuperview]; [_progress release]; [_text removeFromSuperview]; @@ -79,14 +54,14 @@ switch (height) { /*case NSProgressIndicatorPreferredSmallThickness: size = NSMiniControlSize; - break;*/ + break;*/ case NSProgressIndicatorPreferredAquaThickness: size = NSSmallControlSize; - break; + break; case NSProgressIndicatorPreferredThickness: default: size = NSRegularControlSize; - break; + break; } if ([[settings objectForKey:@"ProgressIndicator.style"] intValue] == 0) { //We have a normal bar @@ -115,4 +90,4 @@ [settings release]; } -@end +@end \ No newline at end of file diff --git a/ITSplashWindow.h b/ITSplashWindow.h index 48c17e2..d959a7a 100644 --- a/ITSplashWindow.h +++ b/ITSplashWindow.h @@ -1,8 +1,18 @@ -/* ITSplashWindow */ +/* + * ITKit + * ITSplashWindow.h + * + * Copyright (c) 2005 by iThink Software. + * All Rights Reserved. + * + * $Id$ + * + */ #import -@interface ITSplashWindow : NSWindow -{ +@interface ITSplashWindow : NSWindow { + } -@end + +@end \ No newline at end of file diff --git a/ITSplashWindow.m b/ITSplashWindow.m index a41d7e1..63d6923 100644 --- a/ITSplashWindow.m +++ b/ITSplashWindow.m @@ -3,9 +3,8 @@ @implementation ITSplashWindow -- (id)initWithContentRect:(NSRect)contentRect styleMask:(unsigned int)styleMask backing:(NSBackingStoreType)backingType defer:(BOOL)flag -{ - if ( (self = [super initWithContentRect:contentRect styleMask:NSBorderlessWindowMask backing:NSBackingStoreBuffered defer:NO]) ) { +- (id)initWithContentRect:(NSRect)contentRect styleMask:(unsigned int)styleMask backing:(NSBackingStoreType)backingType defer:(BOOL)flag { + if ((self = [super initWithContentRect:contentRect styleMask:NSBorderlessWindowMask backing:NSBackingStoreBuffered defer:NO])) { [self setOpaque:NO]; [self setBackgroundColor:[NSColor clearColor]]; [self setHasShadow:YES]; @@ -13,14 +12,12 @@ return self; } -- (BOOL)canBecomeKeyWindow -{ +- (BOOL)canBecomeKeyWindow { return YES; } -- (BOOL)isKeyWindow -{ +- (BOOL)isKeyWindow { return YES; } -@end +@end \ No newline at end of file diff --git a/ITStatusItem.h b/ITStatusItem.h old mode 100755 new mode 100644 index fb381e0..f2f6070 --- a/ITStatusItem.h +++ b/ITStatusItem.h @@ -1,49 +1,26 @@ /* * ITKit - * ITStatusItem - * NSStatusItem subclass which reduces suckage + * ITStatusItem.h * - * Original Author : Joseph Spiros - * Original Author : Matthew Judy - * Responsibility : Matthew Judy - * Responsibility : Joseph Spiros + * NSStatusItem subclass which attempts to approximate NSMenuExtra's + * appearance and functionality. * - * Copyright (c) 2002 - 2003 iThink Software. - * All Rights Reserved + * Copyright (c) 2005 by iThink Software. + * All Rights Reserved. * - */ - -/* - * This subclass does 4 things to approximate NSMenuExtra's functionality: - * - * 1. Makes the status item smarter about highlighting. - * 2. Allows you to set an alternate (inverted) image. - * 3. Eliminates the pre-Jaguar shadow behind a normal status item. - * 4. If you use an image AND title, the text will be made slightly smaller - * to resemble the visual interface of an NSMenuExtra. - * - * Note: In order to have the shadow not overlap the bottom of the - * menubar, Apple moves the image up one pixel. Since that shadow is - * no longer drawn, please adjust your images DOWN one pixel to compensate. + * $Id$ * */ - #import +@interface ITStatusItem : NSStatusItem { -@interface ITStatusItem : NSStatusItem -{ } -// Use this to create a new retained status item. -// It will appear in the system status bar, and -// default to YES for its highlightMode. -- (id)initWithStatusBar:(NSStatusBar*)statusBar withLength:(float)length; - -// These allow you to use an alternate (selected) image for your status item. -- (NSImage*) alternateImage; -- (void) setAlternateImage:(NSImage*)image; +- (id)initWithStatusBar:(NSStatusBar *)statusBar withLength:(float)length; +- (NSImage *)alternateImage; +- (void)setAlternateImage:(NSImage *)image; -@end +@end \ No newline at end of file diff --git a/ITStatusItem.m b/ITStatusItem.m old mode 100755 new mode 100644 index bf1d18f..b758d5c --- a/ITStatusItem.m +++ b/ITStatusItem.m @@ -1,98 +1,54 @@ #import "ITStatusItem.h" -/*************************************************************************/ -#pragma mark - -#pragma mark EVIL HACKERY -/*************************************************************************/ +@class NSStatusBarButton; -// This stuff is actually implemented by the AppKit. -// We declare it here to cancel out warnings. - -@interface NSStatusBarButton : NSButton +@interface NSStatusItem (ITStatusItemHacks) +- (id)_initInStatusBar:(NSStatusBar *)statusBar withLength:(float)length withPriority:(int)priority; +- (NSStatusBarButton *)_button; @end -@interface NSStatusItem (HACKHACKHACKHACK) -- (id)_initInStatusBar:(NSStatusBar*)statusBar - withLength:(float)length - withPriority:(int)priority; -- (NSStatusBarButton*)_button; +@protocol _ITStatusItemNSStatusItemPantherCompatability +- (void)setAlternateImage:(NSImage *)image; +- (NSImage *)alternateImage; @end +@implementation ITStatusItem -/*************************************************************************/ -#pragma mark - -#pragma mark PRIVATE METHOD DECLARATIONS -/*************************************************************************/ - -@interface ITStatusItem (Private) -- (void)setImage:(NSImage*)image; -- (NSString*) title; -- (void)setTitle:(NSString*)title; -- (void)setSmallTitle:(NSString*)title; -@end - +static BOOL _ITStatusItemShouldKillShadow = NO; -@implementation ITStatusItem ++ (void)initialize { + if ((floor(NSAppKitVersionNumber) > NSAppKitVersionNumber10_1) && (floor(NSAppKitVersionNumber) <= 663.6)) { + _ITStatusItemShouldKillShadow = YES; + } +} -/*************************************************************************/ -#pragma mark - -#pragma mark INITIALIZATION METHODS -/*************************************************************************/ +- (id)initWithStatusBar:(NSStatusBar *)statusBar withLength:(float)length { + return [self _initInStatusBar:statusBar withLength:length withPriority:1000]; +} -- (id)initWithStatusBar:(NSStatusBar*)statusBar withLength:(float)length -{ - if ( ( self = [super _initInStatusBar:statusBar - withLength:length - withPriority:1000] ) ) { - - //Eliminate the fucking shadow... - [[[self _button] cell] setType:NSNullCellType]; - - //Be something other than a dumbshit about highlighting... +- (id)_initInStatusBar:(NSStatusBar *)statusBar withLength:(float)length withPriority:(int)priority { + if ((self = [super _initInStatusBar:statusBar withLength:length withPriority:priority])) { + if (_ITStatusItemShouldKillShadow) { + [[(NSButton *)[self _button] cell] setType:NSNullCellType]; + } [self setHighlightMode:YES]; } return self; } - -/*************************************************************************/ -#pragma mark - -#pragma mark ACCESSOR METHODS -/*************************************************************************/ - -- (NSImage*)alternateImage { - return [[self _button] alternateImage]; +- (NSImage *)alternateImage { + if ([super respondsToSelector:@selector(alternateImage)]) { + return [(id <_ITStatusItemNSStatusItemPantherCompatability>)super alternateImage]; + } + return [(NSButton *)[self _button] alternateImage]; } - (void)setAlternateImage:(NSImage*)image { - [[self _button] setAlternateImage:image]; + if ([super respondsToSelector:@selector(setAlternateImage:)]) { + [(id <_ITStatusItemNSStatusItemPantherCompatability>)super setAlternateImage:image]; + return; + } + [(NSButton *)[self _button] setAlternateImage:image]; } -- (void)setImage:(NSImage*)image { - [super setImage:image]; - if ( [self title] ) { - [self setTitle:[self title]]; - } -} - -- (void)setTitle:(NSString*)title { - if ( [self image] && (title != nil) ) { - [self setSmallTitle:title]; - } else { - [super setTitle:title]; - } -} - - -/*************************************************************************/ -#pragma mark - -#pragma mark PRIVATE METHODS -/*************************************************************************/ - -- (void)setSmallTitle:(NSString*)title { - NSAttributedString *attrTitle = [[[NSAttributedString alloc] initWithString:title attributes:[NSDictionary dictionaryWithObject:[NSFont fontWithName:@"LucidaGrande" size:12.0] forKey:NSFontAttributeName]] autorelease]; - [self setAttributedTitle:attrTitle]; -} - - -@end +@end \ No newline at end of file diff --git a/ITStringMacResource.h b/ITStringMacResource.h deleted file mode 100755 index 096d941..0000000 --- a/ITStringMacResource.h +++ /dev/null @@ -1,16 +0,0 @@ -// -// ITStringMacResource.h -// ITKit -// -// Created by Joseph Spiros on Thu Dec 25 2003. -// Copyright (c) 2003 __MyCompanyName__. All rights reserved. -// - -#import -#import "ITMacResource.h" - -@interface ITStringMacResource : ITMacResource { - -} - -@end diff --git a/ITStringMacResource.m b/ITStringMacResource.m deleted file mode 100755 index 3cc887b..0000000 --- a/ITStringMacResource.m +++ /dev/null @@ -1,26 +0,0 @@ -// -// ITStringMacResource.m -// ITKit -// -// Created by Joseph Spiros on Thu Dec 25 2003. -// Copyright (c) 2003 __MyCompanyName__. All rights reserved. -// - -#import "ITStringMacResource.h" - - -@implementation ITStringMacResource - -+ (void)load { - [ITMacResource _registerClass:self forType:'STR ']; -} - -- (Class)nativeRepresentationClass { - return [NSString class]; -} - -- (id)nativeRepresentation { - return @"Not Implemented Yet"; -} - -@end diff --git a/ITTSWBackgroundView.h b/ITTSWBackgroundView.h old mode 100755 new mode 100644 index 129eb03..ad1d854 --- a/ITTSWBackgroundView.h +++ b/ITTSWBackgroundView.h @@ -1,30 +1,28 @@ /* * ITKit - * ITTSWBackgroundView - * NSView subclass which draws a translucent background with rounded corners. + * ITTSWBackgroundView.h * - * Original Author : Matthew Judy - * Responsibility : Matthew Judy + * NSView subclass which draws a translucent background with rounded corners. * - * Copyright (c) 2002 - 2003 iThink Software. - * All Rights Reserved + * Copyright (c) 2005 by iThink Software. + * All Rights Reserved. + * + * $Id$ * */ #import - typedef enum _ITTSWBackgroundMode { ITTSWBackgroundApple, ITTSWBackgroundReadable, ITTSWBackgroundColored } ITTSWBackgroundMode; - @interface ITTSWBackgroundView : NSView { - NSBezierPath *_path; - NSColor *_color; - ITTSWBackgroundMode _mode; + NSBezierPath *_path; + NSColor *_color; + ITTSWBackgroundMode _mode; } - (ITTSWBackgroundMode)backgroundMode; @@ -33,4 +31,4 @@ typedef enum _ITTSWBackgroundMode { - (NSColor *)backgroundColor; - (void)setBackgroundColor:(NSColor *)newColor; -@end +@end \ No newline at end of file diff --git a/ITTSWBackgroundView.m b/ITTSWBackgroundView.m old mode 100755 new mode 100644 diff --git a/ITTabView.h b/ITTabView.h old mode 100755 new mode 100644 index 89b5fef..36d1ca6 --- a/ITTabView.h +++ b/ITTabView.h @@ -1,39 +1,30 @@ /* * ITKit - * ITTabView - * NSTabView subclass which includes convenience features + * ITTabView.h * - * Original Author : Kent Sutherland - * Responsibility : Matthew Judy - * Responsibility : Kent Sutherland + * NSTabView subclass which allows dragging (reordering) of tab view items. * - * Copyright (c) 2002 - 2003 iThink Software. - * All Rights Reserved + * Copyright (c) 2005 by iThink Software. + * All Rights Reserved. + * + * $Id$ * */ -/* - * This subclass enables drag-and-drop for tab view items. - */ - - #import - -@interface ITTabView : NSTabView -{ - NSTabViewItem *_draggedTab; - bool _allowsDragging; - unsigned int _requiredModifiers; +@interface ITTabView : NSTabView { + NSTabViewItem *_draggedTab; + BOOL _allowsDragging; + unsigned int _requiredModifiers; } -- (void)setAllowsDragging:(bool)flag; -- (bool)allowsDragging; +- (void)setAllowsDragging:(BOOL)flag; +- (BOOL)allowsDragging; - (void)setRequiredModifiers:(unsigned int)modifiers; - (unsigned int)requiredModifiers; - (void)moveTab:(NSTabViewItem *)tab toIndex:(int)index; - -@end +@end \ No newline at end of file diff --git a/ITTabView.m b/ITTabView.m old mode 100755 new mode 100644 index 66f0bcc..a94825a --- a/ITTabView.m +++ b/ITTabView.m @@ -1,95 +1,79 @@ #import "ITTabView.h" -/*************************************************************************/ -#pragma mark - -#pragma mark EVIL HACKERY -/*************************************************************************/ - -@interface NSTabViewItem (HACKHACKHACKHACK) +@interface NSTabViewItem (ITTabViewHacks) - (NSRect)_tabRect; @end - @implementation ITTabView -- (id)initWithFrame:(NSRect)frame -{ - if ( (self = [super initWithFrame:frame]) ) { - _draggedTab = nil; - _allowsDragging = NO; - _requiredModifiers = NSCommandKeyMask; - } - return self; +- (id)initWithFrame:(NSRect)frame { + if ((self = [super initWithFrame:frame])) { + _draggedTab = nil; + _allowsDragging = NO; + _requiredModifiers = NSCommandKeyMask; + } + return self; } -- (void)setAllowsDragging:(bool)flag -{ - _allowsDragging = flag; - _requiredModifiers = NSCommandKeyMask; +- (void)setAllowsDragging:(BOOL)flag { + _allowsDragging = flag; } -- (bool)allowsDragging -{ - return _allowsDragging; +- (BOOL)allowsDragging { + return _allowsDragging; } -- (void)setRequiredModifiers:(unsigned int)modifiers -{ - _requiredModifiers = modifiers; +- (void)setRequiredModifiers:(unsigned int)modifiers { + _requiredModifiers = modifiers; } -- (unsigned int)requiredModifiers -{ - return _requiredModifiers; +- (unsigned int)requiredModifiers { + return _requiredModifiers; } -- (void)moveTab:(NSTabViewItem *)tab toIndex:(int)index -{ - if ([self indexOfTabViewItem:tab] != index) - { - [tab retain]; - [self removeTabViewItem:tab]; - [self insertTabViewItem:tab atIndex:index]; - [self selectTabViewItem:tab]; - } +- (void)moveTab:(NSTabViewItem *)tab toIndex:(int)index { + int oldIndex = [self indexOfTabViewItem:tab]; + if ((oldIndex != NSNotFound) && (oldIndex != index)) { + [tab retain]; + [self removeTabViewItem:tab]; + [self insertTabViewItem:tab atIndex:index]; + [self selectTabViewItem:tab]; + [tab release]; + } } -- (void)mouseDown:(NSEvent *)event -{ - if ((_requiredModifiers == 0 || ([[NSApp currentEvent] modifierFlags] & _requiredModifiers)) && [self allowsDragging]) { - NSPoint clickedPoint; - clickedPoint = [self convertPoint:[event locationInWindow] fromView:[[self window] contentView]]; - NSTabViewItem *clickedTab = [self tabViewItemAtPoint:clickedPoint]; - _draggedTab = clickedTab; - } - [super mouseDown:event]; +- (void)mouseDown:(NSEvent *)event { + if ((_requiredModifiers == 0 || ([[NSApp currentEvent] modifierFlags] & _requiredModifiers)) && [self allowsDragging]) { + NSPoint clickedPoint; + clickedPoint = [self convertPoint:[event locationInWindow] fromView:[[self window] contentView]]; + NSTabViewItem *clickedTab = [self tabViewItemAtPoint:clickedPoint]; + _draggedTab = clickedTab; + } + [super mouseDown:event]; } -- (void)mouseUp:(NSEvent *)event -{ - if (_draggedTab && [self allowsDragging]) { - NSPoint releasedPoint = [self convertPoint:[event locationInWindow] fromView:[[self window] contentView]]; - NSTabViewItem *releasedTab = [self tabViewItemAtPoint:releasedPoint]; - if (releasedTab && ![releasedTab isEqualTo:_draggedTab]) { - [self moveTab:_draggedTab toIndex:[self indexOfTabViewItem:releasedTab]]; - } - _draggedTab = nil; - } - [super mouseUp:event]; +- (void)mouseUp:(NSEvent *)event { + if (_draggedTab && [self allowsDragging]) { + NSPoint releasedPoint = [self convertPoint:[event locationInWindow] fromView:[[self window] contentView]]; + NSTabViewItem *releasedTab = [self tabViewItemAtPoint:releasedPoint]; + if (releasedTab && ![releasedTab isEqualTo:_draggedTab]) { + [self moveTab:_draggedTab toIndex:[self indexOfTabViewItem:releasedTab]]; + } + _draggedTab = nil; + } + [super mouseUp:event]; } -- (void)mouseDragged:(NSEvent *)event -{ - if (_draggedTab && [self allowsDragging]) { - NSPoint currentPoint = [self convertPoint:[event locationInWindow] fromView:[[self window] contentView]]; - NSTabViewItem *curTab = [self tabViewItemAtPoint:currentPoint]; - if (curTab && ![curTab isEqualTo:_draggedTab]) { - [self moveTab:_draggedTab toIndex:[self indexOfTabViewItem:curTab]]; - [self selectTabViewItem:_draggedTab]; - } - } - [super mouseDragged:event]; +- (void)mouseDragged:(NSEvent *)event { + if (_draggedTab && [self allowsDragging]) { + NSPoint currentPoint = [self convertPoint:[event locationInWindow] fromView:[[self window] contentView]]; + NSTabViewItem *curTab = [self tabViewItemAtPoint:currentPoint]; + if (curTab && ![curTab isEqualTo:_draggedTab]) { + [self moveTab:_draggedTab toIndex:[self indexOfTabViewItem:curTab]]; + [self selectTabViewItem:_draggedTab]; + } + } + [super mouseDragged:event]; } - -@end +@end \ No newline at end of file diff --git a/ITTableCornerView.h b/ITTableCornerView.h old mode 100755 new mode 100644 index b9a3577..a0a24fe --- a/ITTableCornerView.h +++ b/ITTableCornerView.h @@ -1,22 +1,21 @@ /* * ITKit - * ITTableCornerView - * NSPopUpButton subclass for corner views in a table view. + * ITTableCornerView.h * - * Original Author : Joseph Spiros - * Responsibility : Matthew Judy - * Responsibility : Joseph Spiros + * NSPopUpButton subclass for use as a cornerView in NSTableView instances. * - * Copyright (c) 2002 - 2003 iThink Software. - * All Rights Reserved + * Copyright (c) 2005 by iThink Software. + * All Rights Reserved. + * + * $Id$ * */ - #import @interface ITTableCornerView : NSPopUpButton { - NSTableHeaderCell *headerCell; + NSImage *image; + NSTableHeaderCell *headerCell; } -@end +@end \ No newline at end of file diff --git a/ITTableCornerView.m b/ITTableCornerView.m old mode 100755 new mode 100644 index 4f90316..2f231d2 --- a/ITTableCornerView.m +++ b/ITTableCornerView.m @@ -1,31 +1,57 @@ #import "ITTableCornerView.h" +@interface ITTableCornerView (Private) + +- (id)initWithFrame:(NSRect)frame cellClass:(Class)cellClass; + +@end + @implementation ITTableCornerView - (id)initWithFrame:(NSRect)frame { - self = [super initWithFrame:frame]; - if (self) { - headerCell = [[NSTableHeaderCell alloc] init]; - } - return self; + return [self initWithFrame:frame cellClass:[NSTableHeaderCell class]]; +} + +- (id)initWithFrame:(NSRect)frame cellClass:(Class)cellClass { + if ((self = [super initWithFrame:frame])) { + headerCell = [[cellClass alloc] init]; + [self setPullsDown:YES]; + } + return self; } - (void)drawRect:(NSRect)rect { - rect.origin.y = 0; - rect.size.height = 17; - rect.size.width += 1; - - [headerCell setState: ([[self cell] isHighlighted]) ? NSOnState : NSOffState]; - [headerCell drawWithFrame:rect inView:nil]; - - if ([self image]) { - [[self image] drawAtPoint:rect.origin fromRect:NSZeroRect operation:NSCompositeSourceOver fraction:1.0]; - } + NSImage *drawImage; + + rect.origin.y = 0; + rect.size.height = 17; + rect.size.width += 1; + + [headerCell setState:([[self cell] isHighlighted] ? NSOnState : NSOffState)]; + [headerCell drawWithFrame:rect inView:nil]; + + if ((drawImage = [self image])) { + BOOL oldFlipped = [drawImage isFlipped]; + [drawImage setFlipped:YES]; + [drawImage drawAtPoint:rect.origin fromRect:NSZeroRect operation:NSCompositeSourceOver fraction:1.0]; + [drawImage setFlipped:oldFlipped]; + } +} + +- (void)setImage:(NSImage *)anImage { + [super setImage:anImage]; + [image autorelease]; + image = [anImage copy]; +} + +- (NSImage *)image { + return (image ? image : [super image]); } - (void)dealloc { - [headerCell release]; - [super dealloc]; + [image release]; + [headerCell release]; + [super dealloc]; } @end \ No newline at end of file diff --git a/ITTableView.h b/ITTableView.h old mode 100755 new mode 100644 index 66444e8..1950715 --- a/ITTableView.h +++ b/ITTableView.h @@ -1,24 +1,22 @@ /* * ITKit - * ITTableView - * NSTableView subclass with easy to use accessors for adding a menu - * (with optional image) to the corner view of the TableView. + * ITTableCornerView.h * - * Original Author : Joseph Spiros - * Responsibility : Matthew Judy - * Responsibility : Joseph Spiros + * NSTableView subclass that uses an ITTableCornerView as its default + * cornerView and provides easy to use accessors to the features + * provided by ITTableCornerView when it is being used. * - * Copyright (c) 2002-2003 iThink Software. - * All Rights Reserved + * Copyright (c) 2005 by iThink Software. + * All Rights Reserved. + * + * $Id$ * */ #import -@class ITTableCornerView; - @interface ITTableView : NSTableView { - ITTableCornerView *corner; + } - (void)setCornerImage:(NSImage*)image; @@ -26,4 +24,4 @@ - (void)setCornerMenu:(NSMenu*)menu; - (NSMenu*)cornerMenu; -@end +@end \ No newline at end of file diff --git a/ITTableView.m b/ITTableView.m old mode 100755 new mode 100644 index 7cba72b..829b039 --- a/ITTableView.m +++ b/ITTableView.m @@ -1,47 +1,50 @@ #import "ITTableView.h" #import "ITTableCornerView.h" - @implementation ITTableView - (id)initWithFrame:(NSRect)frame { - self = [super initWithFrame:frame]; - if (self) { - corner = [[ITTableCornerView alloc] initWithFrame:[[self cornerView] frame]]; - [corner setPullsDown:YES]; - [self setCornerView:corner]; - } - return self; + if ((self = [super initWithFrame:frame])) { + [self setCornerView:[[ITTableCornerView alloc] initWithFrame:[[self cornerView] frame]]]; + } + return self; } -- (id)initWithCoder:(NSCoder*)coder { - self = [super initWithCoder:coder]; - if (self) { - corner = [[ITTableCornerView alloc] initWithFrame:[[self cornerView] frame]]; - [corner setPullsDown:YES]; - [self setCornerView:corner]; - } - return self; +- (id)initWithCoder:(NSCoder *)coder { + if ((self = [super initWithCoder:coder])) { + [self setCornerView:[[ITTableCornerView alloc] initWithFrame:[[self cornerView] frame]]]; + } + return self; } -- (void)encodeWithCoder:(NSCoder*)coder { - [super encodeWithCoder:coder]; +- (void)encodeWithCoder:(NSCoder *)coder { + [super encodeWithCoder:coder]; } -- (void)setCornerImage:(NSImage*)image { - [corner setImage:image]; +- (void)setCornerImage:(NSImage *)image { + if ([_cornerView isKindOfClass:[ITTableCornerView class]]) { + [(ITTableCornerView *)_cornerView setImage:image]; + } } -- (NSImage*)cornerImage { - return [corner image]; +- (NSImage *)cornerImage { + if ([_cornerView isKindOfClass:[ITTableCornerView class]]) { + return [(ITTableCornerView *)_cornerView image]; + } + return nil; } -- (void)setCornerMenu:(NSMenu*)menu { - [corner setMenu:menu]; +- (void)setCornerMenu:(NSMenu *)menu { + if ([_cornerView isKindOfClass:[ITTableCornerView class]]) { + [(ITTableCornerView *)_cornerView setMenu:menu]; + } } -- (NSMenu*)cornerMenu { - return [corner menu]; +- (NSMenu *)cornerMenu { + if ([_cornerView isKindOfClass:[ITTableCornerView class]]) { + return [(ITTableCornerView *)_cornerView menu]; + } + return nil; } -@end +@end \ No newline at end of file diff --git a/ITTextField.h b/ITTextField.h old mode 100755 new mode 100644 index d796245..9e73b1c --- a/ITTextField.h +++ b/ITTextField.h @@ -1,21 +1,18 @@ /* * ITKit - * ITTextField - * Allows shadows to be drawn under text. + * ITTextField.h * - * Original Author : Matthew Judy - * Responsibility : Matthew Judy - * Responsibility : Joseph Spiros + * Custom NSTextField subclass that uses ITTextFieldCell. * - * Copyright (c) 2002 - 2003 iThink Software. - * All Rights Reserved + * Copyright (c) 2005 by iThink Software. + * All Rights Reserved. + * + * $Id$ * */ - #import - @interface ITTextField : NSTextField { } @@ -23,23 +20,22 @@ - (BOOL)castsShadow; - (void)setCastsShadow:(BOOL)newSetting; -- (float)shadowElevation; /* Light source elevation in degrees. Defaults to 45.0 */ +- (float)shadowElevation; /* Light source elevation in degrees. Defaults to 45.0 */ - (void)setShadowElevation:(float)newElevation; -- (float)shadowAzimuth; /* Light source azimuth in degrees. Defaults to 90.0 */ +- (float)shadowAzimuth; /* Light source azimuth in degrees. Defaults to 90.0 */ - (void)setShadowAzimuth:(float)newAzimuth; -- (float)shadowAmbient; /* Amount of ambient light. Defaults to 0.15 */ +- (float)shadowAmbient; /* Amount of ambient light. Defaults to 0.15 */ - (void)setShadowAmbient:(float)newAmbient; -- (float)shadowHeight; /* Height above the canvas. Defaults to 1.0 */ +- (float)shadowHeight; /* Height above the canvas. Defaults to 1.0 */ - (void)setShadowHeight:(float)newHeight; -- (float)shadowRadius; /* Blur radius. Defaults to 4.0 */ +- (float)shadowRadius; /* Blur radius. Defaults to 4.0 */ - (void)setShadowRadius:(float)newRadius; -- (float)shadowSaturation; /* Maximum saturation. Defaults to 1.0 */ +- (float)shadowSaturation; /* Maximum saturation. Defaults to 1.0 */ - (void)setShadowSaturation:(float)newSaturation; - -@end +@end \ No newline at end of file diff --git a/ITTextField.m b/ITTextField.m old mode 100755 new mode 100644 index 3ccab70..841d6c8 --- a/ITTextField.m +++ b/ITTextField.m @@ -1,109 +1,72 @@ #import "ITTextField.h" #import "ITTextFieldCell.h" -#import -#import "ITCoreGraphicsHacks.h" - - -/*************************************************************************/ -#pragma mark - -#pragma mark IMPLEMENTATION -/*************************************************************************/ @implementation ITTextField - -/*************************************************************************/ -#pragma mark - -#pragma mark INITIALIZATION METHODS -/*************************************************************************/ - -+ (void)initialize -{ - if ( self == [ITTextField class] ) { - [self setCellClass:[ITTextFieldCell class]]; - } ++ (void)initialize { + if (self == [ITTextField class]) { + [self setCellClass:[ITTextFieldCell class]]; + } } -+ (Class)cellClass -{ - return [ITTextFieldCell class]; ++ (Class)cellClass { + return [ITTextFieldCell class]; } - -/*************************************************************************/ -#pragma mark - -#pragma mark ACCESSOR METHODS -/*************************************************************************/ - -- (BOOL)castsShadow; -{ - return [[self cell] castsShadow]; +- (BOOL)castsShadow { + return [[self cell] castsShadow]; } -- (void)setCastsShadow:(BOOL)newSetting; -{ - [[self cell] setCastsShadow:newSetting]; +- (void)setCastsShadow:(BOOL)newSetting { + [[self cell] setCastsShadow:newSetting]; } -- (float)shadowElevation; -{ - return [[self cell] shadowElevation]; +- (float)shadowElevation { + return [[self cell] shadowElevation]; } -- (void)setShadowElevation:(float)newElevation; -{ - [[self cell] setShadowElevation:newElevation]; +- (void)setShadowElevation:(float)newElevation { + [[self cell] setShadowElevation:newElevation]; } -- (float)shadowAzimuth; -{ - return [[self cell] shadowAzimuth]; +- (float)shadowAzimuth { + return [[self cell] shadowAzimuth]; } -- (void)setShadowAzimuth:(float)newAzimuth; -{ - [[self cell] setShadowAzimuth:newAzimuth]; +- (void)setShadowAzimuth:(float)newAzimuth { + [[self cell] setShadowAzimuth:newAzimuth]; } -- (float)shadowAmbient; -{ - return [[self cell] shadowAmbient]; +- (float)shadowAmbient { + return [[self cell] shadowAmbient]; } -- (void)setShadowAmbient:(float)newAmbient; -{ - [[self cell] setShadowAmbient:newAmbient]; +- (void)setShadowAmbient:(float)newAmbient { + [[self cell] setShadowAmbient:newAmbient]; } -- (float)shadowHeight; -{ - return [[self cell] shadowHeight]; +- (float)shadowHeight { + return [[self cell] shadowHeight]; } -- (void)setShadowHeight:(float)newHeight; -{ - [[self cell] setShadowHeight:newHeight]; +- (void)setShadowHeight:(float)newHeight { + [[self cell] setShadowHeight:newHeight]; } -- (float)shadowRadius; -{ - return [[self cell] shadowRadius]; +- (float)shadowRadius { + return [[self cell] shadowRadius]; } -- (void)setShadowRadius:(float)newRadius; -{ - [[self cell] setShadowRadius:newRadius]; +- (void)setShadowRadius:(float)newRadius { + [[self cell] setShadowRadius:newRadius]; } -- (float)shadowSaturation; -{ - return [[self cell] shadowSaturation]; +- (float)shadowSaturation { + return [[self cell] shadowSaturation]; } -- (void)setShadowSaturation:(float)newSaturation; -{ - [[self cell] setShadowSaturation:newSaturation]; +- (void)setShadowSaturation:(float)newSaturation { + [[self cell] setShadowSaturation:newSaturation]; } - -@end +@end \ No newline at end of file diff --git a/ITTextFieldCell.h b/ITTextFieldCell.h old mode 100755 new mode 100644 index 5285faf..401e599 --- a/ITTextFieldCell.h +++ b/ITTextFieldCell.h @@ -1,54 +1,49 @@ /* * ITKit - * ITTextFieldCell - * Cell used by the ITTextField control. + * ITTextFieldCell.h * - * Original Author : Matthew Judy - * Responsibility : Matthew Judy - * Responsibility : Joseph Spiros + * Custom NSTextFieldCell subclass that casts a shadow using CoreGraphics, + * providing support for versions of Cocoa that don't have the NSShadow + * class which was introduced in Mac OS X 10.3 (Panther). * - * Copyright (c) 2003 iThink Software. - * All Rights Reserved + * Copyright (c) 2005 by iThink Software. + * All Rights Reserved. + * + * $Id$ * */ - #import - @interface ITTextFieldCell : NSTextFieldCell { - - BOOL castsShadow; - - float shadowElevation; - float shadowAzimuth; - float shadowAmbient; - float shadowHeight; - float shadowRadius; - float shadowSaturation; - + BOOL castsShadow; + float shadowElevation; + float shadowAzimuth; + float shadowAmbient; + float shadowHeight; + float shadowRadius; + float shadowSaturation; } - (BOOL)castsShadow; - (void)setCastsShadow:(BOOL)newSetting; -- (float)shadowElevation; /* Light source elevation in degrees. Defaults to 45.0 */ +- (float)shadowElevation; /* Light source elevation in degrees. Defaults to 45.0 */ - (void)setShadowElevation:(float)newElevation; -- (float)shadowAzimuth; /* Light source azimuth in degrees. Defaults to 90.0 */ +- (float)shadowAzimuth; /* Light source azimuth in degrees. Defaults to 90.0 */ - (void)setShadowAzimuth:(float)newAzimuth; -- (float)shadowAmbient; /* Amount of ambient light. Defaults to 0.15 */ +- (float)shadowAmbient; /* Amount of ambient light. Defaults to 0.15 */ - (void)setShadowAmbient:(float)newAmbient; -- (float)shadowHeight; /* Height above the canvas. Defaults to 1.0 */ +- (float)shadowHeight; /* Height above the canvas. Defaults to 1.0 */ - (void)setShadowHeight:(float)newHeight; -- (float)shadowRadius; /* Blur radius. Defaults to 4.0 */ +- (float)shadowRadius; /* Blur radius. Defaults to 4.0 */ - (void)setShadowRadius:(float)newRadius; -- (float)shadowSaturation; /* Maximum saturation. Defaults to 1.0 */ +- (float)shadowSaturation; /* Maximum saturation. Defaults to 1.0 */ - (void)setShadowSaturation:(float)newSaturation; - -@end +@end \ No newline at end of file diff --git a/ITTextFieldCell.m b/ITTextFieldCell.m old mode 100755 new mode 100644 index aeb6ca7..2dbc30c --- a/ITTextFieldCell.m +++ b/ITTextFieldCell.m @@ -1,171 +1,126 @@ #import "ITTextFieldCell.h" -#import #import "ITCoreGraphicsHacks.h" - - -/*************************************************************************/ -#pragma mark - -#pragma mark IMPLEMENTATION -/*************************************************************************/ +#import @implementation ITTextFieldCell -/*************************************************************************/ -#pragma mark - -#pragma mark INITIALIZATION METHODS -/*************************************************************************/ - -- (id)initTextCell:(NSString *)string -{ - if ( ( self = [super initTextCell:string] ) ) { - castsShadow = NO; - shadowElevation = 45.0; - shadowAzimuth = 90.0; - shadowAmbient = 0.15; - shadowHeight = 1.00; - shadowRadius = 4.00; - shadowSaturation = 1.0; - } - - return self; +- (id)initTextCell:(NSString *)string { + if ((self = [super initTextCell:string])) { + castsShadow = NO; + shadowElevation = 45.0; + shadowAzimuth = 90.0; + shadowAmbient = 0.15; + shadowHeight = 1.00; + shadowRadius = 4.00; + shadowSaturation = 1.0; + } + return self; } -- (id)initWithCoder:(NSCoder *)coder -{ - if ( ( self = [super initWithCoder:coder] ) ) { - castsShadow = NO; - shadowElevation = 45.0; - shadowAzimuth = 90.0; - shadowAmbient = 0.15; - shadowHeight = 1.00; - shadowRadius = 4.00; - shadowSaturation = 1.0; - } - - return self; +- (id)initWithCoder:(NSCoder *)coder { + if ((self = [super initWithCoder:coder])) { + castsShadow = NO; + shadowElevation = 45.0; + shadowAzimuth = 90.0; + shadowAmbient = 0.15; + shadowHeight = 1.00; + shadowRadius = 4.00; + shadowSaturation = 1.0; + } + return self; } - -/*************************************************************************/ -#pragma mark - -#pragma mark DRAWING METHODS -/*************************************************************************/ - -- (void)drawWithFrame:(NSRect)rect inView:(NSView *)controlView -{ - CGSGenericObj style = nil; - CGShadowStyle shadow; - - if ( castsShadow ) { -// Create the shadow style to use for drawing the string - shadow.version = 0; - shadow.elevation = shadowElevation; - shadow.azimuth = shadowAzimuth; - shadow.ambient = shadowAmbient; - shadow.height = shadowHeight; - shadow.radius = shadowRadius; - shadow.saturation = shadowSaturation; - style = CGStyleCreateShadow(&shadow); - - // Set the context for drawing the string - [NSGraphicsContext saveGraphicsState]; - CGContextSetStyle([[NSGraphicsContext currentContext] graphicsPort], style); - } - - // Draw the string - [super drawWithFrame:rect inView:controlView]; - - - if ( castsShadow ) { - // Restore the old context - [NSGraphicsContext restoreGraphicsState]; - CGStyleRelease(style); - } +- (void)drawWithFrame:(NSRect)rect inView:(NSView *)controlView { + CGSGenericObj style = nil; + CGShadowStyle shadow; + + if ( castsShadow ) { + // Create the shadow style to use for drawing the string + shadow.version = 0; + shadow.elevation = shadowElevation; + shadow.azimuth = shadowAzimuth; + shadow.ambient = shadowAmbient; + shadow.height = shadowHeight; + shadow.radius = shadowRadius; + shadow.saturation = shadowSaturation; + style = CGStyleCreateShadow(&shadow); + + // Set the context for drawing the string + [NSGraphicsContext saveGraphicsState]; + CGContextSetStyle([[NSGraphicsContext currentContext] graphicsPort], style); + } + + // Draw the string + [super drawWithFrame:rect inView:controlView]; + + if (castsShadow) { + // Restore the old context + [NSGraphicsContext restoreGraphicsState]; + CGStyleRelease(style); + } } - - -/*************************************************************************/ -#pragma mark - -#pragma mark ACCESSOR METHODS -/*************************************************************************/ - -- (BOOL)castsShadow; -{ - return castsShadow; +- (BOOL)castsShadow { + return castsShadow; } -- (void)setCastsShadow:(BOOL)newSetting; -{ - castsShadow = newSetting; - [[self controlView] setNeedsDisplay:YES]; +- (void)setCastsShadow:(BOOL)newSetting { + castsShadow = newSetting; + [[self controlView] setNeedsDisplay:YES]; } -- (float)shadowElevation; -{ - return shadowElevation; +- (float)shadowElevation { + return shadowElevation; } -- (void)setShadowElevation:(float)newElevation; -{ - shadowElevation = newElevation; - [[self controlView] setNeedsDisplay:YES]; +- (void)setShadowElevation:(float)newElevation { + shadowElevation = newElevation; + [[self controlView] setNeedsDisplay:YES]; } -- (float)shadowAzimuth; -{ - return shadowAzimuth; +- (float)shadowAzimuth { + return shadowAzimuth; } -- (void)setShadowAzimuth:(float)newAzimuth; -{ - shadowAzimuth = newAzimuth; - [[self controlView] setNeedsDisplay:YES]; +- (void)setShadowAzimuth:(float)newAzimuth { + shadowAzimuth = newAzimuth; + [[self controlView] setNeedsDisplay:YES]; } -- (float)shadowAmbient; -{ - return shadowAmbient; +- (float)shadowAmbient { + return shadowAmbient; } -- (void)setShadowAmbient:(float)newAmbient; -{ - shadowAmbient = newAmbient; - [[self controlView] setNeedsDisplay:YES]; +- (void)setShadowAmbient:(float)newAmbient { + shadowAmbient = newAmbient; + [[self controlView] setNeedsDisplay:YES]; } -- (float)shadowHeight; -{ - return shadowHeight; +- (float)shadowHeight { + return shadowHeight; } -- (void)setShadowHeight:(float)newHeight; -{ - shadowHeight = newHeight; - [[self controlView] setNeedsDisplay:YES]; +- (void)setShadowHeight:(float)newHeight { + shadowHeight = newHeight; + [[self controlView] setNeedsDisplay:YES]; } -- (float)shadowRadius; -{ - return shadowRadius; +- (float)shadowRadius { + return shadowRadius; } -- (void)setShadowRadius:(float)newRadius; -{ - shadowRadius = newRadius; - [[self controlView] setNeedsDisplay:YES]; +- (void)setShadowRadius:(float)newRadius { + shadowRadius = newRadius; + [[self controlView] setNeedsDisplay:YES]; } -- (float)shadowSaturation; -{ - return shadowSaturation; +- (float)shadowSaturation { + return shadowSaturation; } -- (void)setShadowSaturation:(float)newSaturation; -{ - shadowSaturation = newSaturation; - [[self controlView] setNeedsDisplay:YES]; +- (void)setShadowSaturation:(float)newSaturation { + shadowSaturation = newSaturation; + [[self controlView] setNeedsDisplay:YES]; } - -@end +@end \ No newline at end of file diff --git a/ITTransientStatusWindow.h b/ITTransientStatusWindow.h old mode 100755 new mode 100644 index c93f0a6..6118ecc --- a/ITTransientStatusWindow.h +++ b/ITTransientStatusWindow.h @@ -1,38 +1,31 @@ /* * ITKit - * ITTransientStatusWindow - * NSWindow subclass for quick display of status information. - * Similar to volume/brightness/eject bezel key windows. + * ITTransientStatusWindow.h * - * Original Author : Matthew Judy - * Responsibility : Matthew Judy - * Responsibility : Joseph Spiros - * Contributor : Kent Sutherland + * NSWindow subclass for quick display of status information, similar to + * volume/brightness/eject bezel key windows. * - * Copyright (c) 2002 - 2003 iThink Software. - * All Rights Reserved + * Copyright (c) 2005 by iThink Software. + * All Rights Reserved. + * + * $Id$ * */ - #import #import "ITWindowPositioning.h" #import "ITWindowEffect.h" -#define DEFAULT_EXIT_DELAY 3.0 - +#define DEFAULT_EXIT_DELAY 3.0 @class ITTextField; @class ITGrayRoundedView; -@class ITWindowEffect; - typedef enum { ITTransientStatusWindowExitOnCommand, - ITTransientStatusWindowExitAfterDelay, + ITTransientStatusWindowExitAfterDelay } ITTransientStatusWindowExitMode; - typedef enum { ITTransientStatusWindowNoBackground, ITTransientStatusWindowRounded, @@ -48,40 +41,31 @@ typedef enum { ITTransientStatusWindowMini } ITTransientStatusWindowSizing; -@interface ITTransientStatusWindow : NSWindow { - - ITWindowVisibilityState _visibilityState; - ITTransientStatusWindowExitMode _exitMode; - float _exitDelay; - ITTransientStatusWindowBackgroundType _backgroundType; - ITWindowEffect *_entryEffect; - ITWindowEffect *_exitEffect; - double _effectProgress; - ITVerticalWindowPosition _verticalPosition; - ITHorizontalWindowPosition _horizontalPosition; - ITTransientStatusWindowSizing _sizing; - float _screenPadding; -// int _screenNumber; +@interface ITTransientStatusWindow : NSWindow { + ITWindowVisibilityState _visibilityState; + ITTransientStatusWindowExitMode _exitMode; + float _exitDelay; + ITTransientStatusWindowBackgroundType _backgroundType; + ITWindowEffect *_entryEffect; + ITWindowEffect *_exitEffect; + double _effectProgress; + ITVerticalWindowPosition _verticalPosition; + ITHorizontalWindowPosition _horizontalPosition; + ITTransientStatusWindowSizing _sizing; + float _screenPadding; NSScreen *_screen; - - BOOL _reallyIgnoresEvents; - - NSTimer *_exitTimer; - - NSView *_contentSubView; + BOOL _reallyIgnoresEvents; + NSTimer *_exitTimer; + NSView *_contentSubView; } + (id)sharedWindow; -- (id)initWithContentView:(NSView *)contentView - exitMode:(ITTransientStatusWindowExitMode)exitMode - backgroundType:(ITTransientStatusWindowBackgroundType)backgroundType; +- (id)initWithContentView:(NSView *)contentView exitMode:(ITTransientStatusWindowExitMode)exitMode backgroundType:(ITTransientStatusWindowBackgroundType)backgroundType; - (void)appear:(id)sender; - (void)vanish:(id)sender; -- (void)setScreen:(NSScreen *)newScreen; - - (void)setSizing:(ITTransientStatusWindowSizing)newSizing; - (ITTransientStatusWindowSizing)sizing; @@ -97,12 +81,6 @@ typedef enum { - (ITTransientStatusWindowBackgroundType)backgroundType; - (void)setBackgroundType:(ITTransientStatusWindowBackgroundType)newType; -- (ITVerticalWindowPosition)verticalPosition; -- (void)setVerticalPosition:(ITVerticalWindowPosition)newPosition; - -- (ITHorizontalWindowPosition)horizontalPosition; -- (void)setHorizontalPosition:(ITHorizontalWindowPosition)newPosition; - - (float)effectProgress; - (void)setEffectProgress:(float)newProgress; @@ -112,5 +90,4 @@ typedef enum { - (ITWindowEffect *)exitEffect; - (void)setExitEffect:(ITWindowEffect *)newEffect; - -@end +@end \ No newline at end of file diff --git a/ITTransientStatusWindow.m b/ITTransientStatusWindow.m old mode 100755 new mode 100644 diff --git a/ITWindowEffect.h b/ITWindowEffect.h old mode 100755 new mode 100644 index 9b6c0bd..4244e09 --- a/ITWindowEffect.h +++ b/ITWindowEffect.h @@ -1,17 +1,16 @@ /* * ITKit - * ITWindowEffect - * Protocal and abstract superclass for performing effects on windows. + * ITWindowEffect.h * - * Original Author : Matthew Judy - * Responsibility : Matthew Judy + * Protocol and abstract superclass for performing effects on windows. * - * Copyright (c) 2002 - 2003 iThink Software. - * All Rights Reserved + * Copyright (c) 2005 by iThink Software. + * All Rights Reserved. + * + * $Id$ * */ - #import #import "ITWindowPositioning.h" @@ -20,7 +19,6 @@ #define EFFECT_FPS 30.0 #define DEFAULT_EFFECT_TIME 0.75 - typedef enum { ITWindowHiddenState, ITWindowAppearingState, @@ -28,8 +26,8 @@ typedef enum { ITWindowVanishingState } ITWindowVisibilityState; - @protocol ITWindowEffect + + (NSString *)effectName; + (NSDictionary *)supportedPositions; + (unsigned int)listOrder; @@ -37,27 +35,27 @@ typedef enum { - (void)performVanish; - (void)cancelAppear; - (void)cancelVanish; -@end +@end @protocol ITWindowMotility + - (ITWindowVisibilityState)visibilityState; - (void)setVisibilityState:(ITWindowVisibilityState)newState; - (float)effectProgress; - (void)setEffectProgress:(float)newProgress; -@end +@end -@interface ITWindowEffect : NSObject -{ - ITTransientStatusWindow *_window; - float _effectTime; - float _effectSpeed; - ITVerticalWindowPosition _verticalPosition; - ITHorizontalWindowPosition _horizontalPosition; - NSTimer *_effectTimer; - BOOL __idle; - BOOL __shouldReleaseWhenIdle; +@interface ITWindowEffect : NSObject { + NSWindow *_window; + float _effectTime; + float _effectSpeed; + ITVerticalWindowPosition _verticalPosition; + ITHorizontalWindowPosition _horizontalPosition; + NSTimer *_effectTimer; + BOOL __idle; + BOOL __shouldReleaseWhenIdle; } + (NSArray *)effectClasses; @@ -76,4 +74,4 @@ typedef enum { - (void)releaseWhenIdle; -@end +@end \ No newline at end of file diff --git a/ITWindowEffect.m b/ITWindowEffect.m old mode 100755 new mode 100644 diff --git a/ITWindowPositioning.h b/ITWindowPositioning.h old mode 100755 new mode 100644 index c43a7f4..0d83c42 --- a/ITWindowPositioning.h +++ b/ITWindowPositioning.h @@ -1,40 +1,37 @@ /* * ITKit - * ITWindowPositioning - * Protocol which defines methods for window positioning presets. + * ITWindowPositioning.h * - * Original Author : Matthew Judy - * Responsibility : Matthew Judy - * Responsibility : Joseph Spiros + * Protocol which defines methods for window positioning presets. * - * Copyright (c) 2002 - 2003 iThink Software. - * All Rights Reserved + * Copyright (c) 2005 by iThink Software. + * All Rights Reserved. + * + * $Id$ * */ - typedef enum { - ITWindowPositionLeft = 0, + ITWindowPositionLeft = 0, ITWindowPositionCenter = 1, - ITWindowPositionRight = 2, + ITWindowPositionRight = 2 } ITHorizontalWindowPosition; typedef enum { - ITWindowPositionTop = 0, + ITWindowPositionTop = 0, ITWindowPositionMiddle = 1, - ITWindowPositionBottom = 2, + ITWindowPositionBottom = 2 } ITVerticalWindowPosition; - @protocol ITWindowPositioning +- (NSScreen *)screen; +- (void)setScreen:(NSScreen *)newScreen; - (ITVerticalWindowPosition)verticalPosition; - (void)setVerticalPosition:(ITVerticalWindowPosition)newPosition; - (ITHorizontalWindowPosition)horizontalPosition; - (void)setHorizontalPosition:(ITHorizontalWindowPosition)newPosition; - (float)screenPadding; - (void)setScreenPadding:(float)newPadding; -/*- (int)screenNumber; -- (void)setScreenNumber:(int)newNumber;*/ -@end +@end \ No newline at end of file diff --git a/ITZoomWindowEffect.h b/ITZoomWindowEffect.h old mode 100755 new mode 100644 index 9fc920e..42363ce --- a/ITZoomWindowEffect.h +++ b/ITZoomWindowEffect.h @@ -1,23 +1,21 @@ /* * ITKit - * ITZoomWindowEffect - * Effect subclass which zooms (expands/shrinks) a window into position on the screen. + * ITZoomWindowEffect.h * - * Original Author : Kent Sutherland - * Responsibility : Kent Sutherland + * Effect subclass which zooms a window into position on the screen. * - * Copyright (c) 2002 - 2004 iThink Software. - * All Rights Reserved + * Copyright (c) 2005 by iThink Software. + * All Rights Reserved. + * + * $Id$ * */ - #import #import "ITWindowEffect.h" - -@interface ITZoomWindowEffect : ITWindowEffect { +@interface ITZoomWindowEffect : ITWindowEffect { } -@end +@end \ No newline at end of file diff --git a/ITZoomWindowEffect.m b/ITZoomWindowEffect.m old mode 100755 new mode 100644 -- 2.20.1