00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 @import "CPWindow.j"
00024
00025
00026 CPOKButton = 1;
00027 CPCancelButton = 0;
00028
00047 @implementation CPPanel : CPWindow
00048 {
00049 BOOL _becomesKeyOnlyIfNeeded;
00050 BOOL _worksWhenModal;
00051 }
00052
00056 - (BOOL)isFloatingPanel
00057 {
00058 return [self level] == CPFloatingWindowLevel;
00059 }
00060
00066 - (void)setFloatingPanel:(BOOL)isFloatingPanel
00067 {
00068 [self setLevel:isFloatingPanel ? CPFloatingWindowLevel : CPNormalWindowLevel];
00069 }
00070
00075 - (BOOL)becomesKeyOnlyIfNeeded
00076 {
00077 return _becomesKeyOnlyIfNeeded;
00078 }
00079
00084 - (void)setBecomesKeyOnlyIfNeeded:(BOOL)shouldBecomeKeyOnlyIfNeeded
00085 {
00086 _becomesKeyOnlyIfNeeded = shouldBecomeKeyOnlyIfNeeded
00087 }
00088
00089 - (BOOL)worksWhenModal
00090 {
00091 return _worksWhenModal;
00092 }
00093
00098 - (void)setWorksWhenModal:(BOOL)shouldWorkWhenModal
00099 {
00100 _worksWhenModal = shouldWorkWhenModal;
00101 }
00102
00103 - (BOOL)canBecomeMainWindow
00104 {
00105 return NO;
00106 }
00107
00108 @end