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
00049 @implementation CPPanel : CPWindow
00050 {
00051 BOOL _becomesKeyOnlyIfNeeded;
00052 BOOL _worksWhenModal;
00053 }
00054
00058 - (BOOL)isFloatingPanel
00059 {
00060 return [self level] == CPFloatingWindowLevel;
00061 }
00062
00068 - (void)setFloatingPanel:(BOOL)isFloatingPanel
00069 {
00070 [self setLevel:isFloatingPanel ? CPFloatingWindowLevel : CPNormalWindowLevel];
00071 }
00072
00077 - (BOOL)becomesKeyOnlyIfNeeded
00078 {
00079 return _becomesKeyOnlyIfNeeded;
00080 }
00081
00086 - (void)setBecomesKeyOnlyIfNeeded:(BOOL)shouldBecomeKeyOnlyIfNeeded
00087 {
00088 _becomesKeyOnlyIfNeeded = shouldBecomeKeyOnlyIfNeeded
00089 }
00090
00091 - (BOOL)worksWhenModal
00092 {
00093 return _worksWhenModal;
00094 }
00095
00100 - (void)setWorksWhenModal:(BOOL)shouldWorkWhenModal
00101 {
00102 _worksWhenModal = shouldWorkWhenModal;
00103 }
00104
00105 - (BOOL)canBecomeMainWindow
00106 {
00107 return NO;
00108 }
00109
00110 @end