1006 "Created: / 25.7.1998 / 20:33:50 / cg" |
1006 "Created: / 25.7.1998 / 20:33:50 / cg" |
1007 ! ! |
1007 ! ! |
1008 |
1008 |
1009 !ToolApplicationModel methodsFor:'help'! |
1009 !ToolApplicationModel methodsFor:'help'! |
1010 |
1010 |
1011 defaultInfoLabel |
1011 aboutThisApplicationText |
1012 "returns the default info label; here an empty string" |
1012 "text for an about box for this application. |
1013 |
1013 Extracts some common info (i.e. class revision, author etc.) from |
1014 ^ '' |
|
1015 |
|
1016 "Modified: / 31.7.1998 / 18:44:55 / cg" |
|
1017 ! |
|
1018 |
|
1019 openAbout |
|
1020 "opens an about box (on ST/X)" |
|
1021 |
|
1022 self class openAboutSTX |
|
1023 |
|
1024 "Modified: / 14.8.1998 / 13:17:57 / cg" |
|
1025 ! |
|
1026 |
|
1027 openAboutThisApplication |
|
1028 "opens an about box for this application. |
|
1029 Extracts some common info (i.e. class revision, author etc. from |
|
1030 the classes documentation." |
1014 the classes documentation." |
1031 |
1015 |
1032 |rev box myClass clsRev image msg| |
1016 |rev myClass clsRev msg| |
1033 |
1017 |
1034 rev := ''. |
1018 rev := ''. |
1035 myClass := self class. |
1019 myClass := self class. |
1036 |
1020 |
1037 (clsRev := myClass revision) notNil ifTrue: [rev := ' (rev: ', clsRev printString, ')']. |
1021 (clsRev := myClass revision) notNil ifTrue: [rev := ' (rev: ', clsRev printString, ')']. |
1040 , myClass name asBoldText, rev |
1024 , myClass name asBoldText, rev |
1041 , '\\has been designed and implemented by: \' withCRs |
1025 , '\\has been designed and implemented by: \' withCRs |
1042 , ((self class authorLinesForAboutBox collect:[:l | '- ' , l]) asStringWith:$\) withCRs |
1026 , ((self class authorLinesForAboutBox collect:[:l | '- ' , l]) asStringWith:$\) withCRs |
1043 , '\\' withCRs. |
1027 , '\\' withCRs. |
1044 msg := msg withTabsExpanded. |
1028 msg := msg withTabsExpanded. |
1045 |
1029 ^msg |
1046 AboutBox isNil ifTrue:[ |
|
1047 "/ this handles bad installations of ST/X, |
|
1048 "/ where the AboutBox is missing. |
|
1049 "/ (May vanish in the future) |
|
1050 ^ self information:msg |
|
1051 ]. |
|
1052 |
|
1053 box := AboutBox title:msg. |
|
1054 |
|
1055 image := self aboutImage. |
|
1056 image notNil ifTrue:[ |
|
1057 box image:image |
|
1058 ]. |
|
1059 box label:(resources string:'About This Application'). |
|
1060 box autoHideAfter:10 with:[]. |
|
1061 box showAtPointer. |
|
1062 |
1030 |
1063 "Modified: / 12.3.1999 / 00:12:13 / cg" |
1031 "Modified: / 12.3.1999 / 00:12:13 / cg" |
|
1032 "Created: / 13.11.2001 / 12:34:19 / cg" |
|
1033 ! |
|
1034 |
|
1035 defaultInfoLabel |
|
1036 "returns the default info label; here an empty string" |
|
1037 |
|
1038 ^ '' |
|
1039 |
|
1040 "Modified: / 31.7.1998 / 18:44:55 / cg" |
|
1041 ! |
|
1042 |
|
1043 openAbout |
|
1044 "opens an about box (on ST/X)" |
|
1045 |
|
1046 self class openAboutSTX |
|
1047 |
|
1048 "Modified: / 14.8.1998 / 13:17:57 / cg" |
1064 ! |
1049 ! |
1065 |
1050 |
1066 openHTMLDocument: aHTMLFilename |
1051 openHTMLDocument: aHTMLFilename |
1067 "opens a HTML browser on aHTMLFilename" |
1052 "opens a HTML browser on aHTMLFilename" |
1068 |
1053 |
1120 "updates the info label at the bottom of this application" |
1105 "updates the info label at the bottom of this application" |
1121 |
1106 |
1122 self valueOfInfoLabel value: self defaultInfoLabel |
1107 self valueOfInfoLabel value: self defaultInfoLabel |
1123 |
1108 |
1124 "Modified: / 31.7.1998 / 18:44:46 / cg" |
1109 "Modified: / 31.7.1998 / 18:44:46 / cg" |
|
1110 ! |
|
1111 |
|
1112 xxopenAboutThisApplication |
|
1113 "opens an about box for this application. |
|
1114 Extracts some common info (i.e. class revision, author etc. from |
|
1115 the classes documentation." |
|
1116 |
|
1117 |rev box myClass clsRev image msg| |
|
1118 |
|
1119 rev := ''. |
|
1120 myClass := self class. |
|
1121 |
|
1122 (clsRev := myClass revision) notNil ifTrue: [rev := ' (rev: ', clsRev printString, ')']. |
|
1123 |
|
1124 msg := '\The application\\' withCRs |
|
1125 , myClass name asBoldText, rev |
|
1126 , '\\has been designed and implemented by: \' withCRs |
|
1127 , ((self class authorLinesForAboutBox collect:[:l | '- ' , l]) asStringWith:$\) withCRs |
|
1128 , '\\' withCRs. |
|
1129 msg := msg withTabsExpanded. |
|
1130 |
|
1131 AboutBox isNil ifTrue:[ |
|
1132 "/ this handles bad installations of ST/X, |
|
1133 "/ where the AboutBox is missing. |
|
1134 "/ (May vanish in the future) |
|
1135 ^ self information:msg |
|
1136 ]. |
|
1137 |
|
1138 box := AboutBox title:msg. |
|
1139 |
|
1140 image := self aboutImage. |
|
1141 image notNil ifTrue:[ |
|
1142 box image:image |
|
1143 ]. |
|
1144 box label:(resources string:self aboutThisApplicationLabel). |
|
1145 box autoHideAfter:10 with:[]. |
|
1146 box showAtPointer. |
|
1147 |
|
1148 "Modified: / 13.11.2001 / 12:31:28 / cg" |
|
1149 "Created: / 13.11.2001 / 12:34:27 / cg" |
1125 ! ! |
1150 ! ! |
1126 |
1151 |
1127 !ToolApplicationModel methodsFor:'history'! |
1152 !ToolApplicationModel methodsFor:'history'! |
1128 |
1153 |
1129 addToHistory: aHistoryEntry |
1154 addToHistory: aHistoryEntry |