From: <arn...@us...> - 2008-04-24 13:31:10
|
Revision: 1198 http://dcplusplus.svn.sourceforge.net/dcplusplus/?rev=1198&view=rev Author: arnetheduck Date: 2008-04-24 06:30:58 -0700 (Thu, 24 Apr 2008) Log Message: ----------- cshelp for toolbar buttons Modified Paths: -------------- dcplusplus/trunk/dwt/include/dwt/widgets/ToolBar.h dcplusplus/trunk/dwt/src/widgets/ToolBar.cpp dcplusplus/trunk/help/DCPlusPlus.hhp dcplusplus/trunk/help/cshelp.h dcplusplus/trunk/help/index.html dcplusplus/trunk/help/resource.h dcplusplus/trunk/help/toc.hhc dcplusplus/trunk/win32/MainWindow.cpp Added Paths: ----------- dcplusplus/trunk/help/window_main.html Property Changed: ---------------- dcplusplus/trunk/ Property changes on: dcplusplus/trunk ___________________________________________________________________ Name: bzr:revision-info - timestamp: 2008-04-19 18:51:29.880000114 +0200 committer: Jacek Sieka <arn...@gm...> properties: branch-nick: dcplusplus + timestamp: 2008-04-19 19:28:06.015000105 +0200 committer: poy <po...@12...> properties: branch-nick: repo Name: bzr:file-ids - + help/window_main.html window_main.html-20080419171016-1ou8eeg9vnx3tgh3-1 Name: bzr:revision-id:v3-trunk1 - 1027 arn...@gm...-20080323183926-schknwnkgeo7ivdn 1028 zouzou123gen-20080323220411-r8usuc3qxwuh7zsn 1029 zouzou123gen-20080323221249-0su72zaj13e706mk 1030 arn...@gm...-20080324140623-muba1dl46m000o8c 1031 zouzou123gen-20080324141933-qbgr93ugpe0297m6 1032 arn...@gm...-20080324153706-siidja05n84i00b1 1033 arn...@gm...-20080324153823-lhn3awurnu77riln 1034 arn...@gm...-20080324165650-zapppziji67yf5a2 1035 zouzou123gen-20080324175936-4mqc2kh0lo5wtdu2 1036 zouzou123gen-20080325004602-6wdsoym95mjuhwd3 1037 arn...@gm...-20080325100659-8fqy6q65itmghlep 1038 zouzou123gen-20080325175216-s297sdiucukfvijh 1039 arn...@gm...-20080325210137-3dfqyoi8ykosy087 1040 arn...@gm...-20080325211747-nwwy1eb33r071sca 1041 arn...@gm...-20080326084110-qbselrjckku275xi 1042 zouzou123gen-20080326123631-35642mgbk2i4ty32 1043 zouzou123gen-20080326124345-f4xwn2d3ty8ubd6r 1044 arn...@gm...-20080326162031-il0nyms30w0mky43 1045 arn...@gm...-20080326164801-8dru8mjc06xgzjpv 1046 arn...@gm...-20080326170438-uzl2rx8fqnohak7g 1047 zouzou123gen-20080326172821-d6uqcbmfb0c6rwlv 1048 arn...@gm...-20080326213257-qlgdh7m2712p2l0q 1049 arn...@gm...-20080326214313-ktnoekgk3s0wmatz 1050 arn...@gm...-20080326215256-0j1iqrf286b9g7zf 1051 arn...@gm...-20080327082121-hoi22wh1gwjdfbyd 1052 arn...@gm...-20080327120639-um3tukdt374rwvgm 1053 zouzou123gen-20080327130703-6vtek6uxy3vua543 1054 arn...@gm...-20080327215831-dmg5mkufskabwkro 1055 arn...@gm...-20080327231459-cdztcv25alsuyqmf 1056 arn...@gm...-20080328085925-gceybsr53oml1p24 1057 arn...@gm...-20080328200512-1sjuu6bcnl2dyd2a 1058 arn...@gm...-20080328210347-bussqjrm5mfswh7o 1059 arn...@gm...-20080329055630-braiir1dskv7a4qm 1060 arn...@gm...-20080329061558-rck8dz60wpj3c5ja 1061 arn...@gm...-20080329081253-if6o5jn329mbzfpl 1062 arn...@gm...-20080329081619-cb4x930j8sp55cs0 1063 arn...@gm...-20080329103216-hgjzo7ra2zixbztd 1064 arn...@gm...-20080329124042-q3aw4iodmo5kafyp 1065 arn...@gm...-20080329124926-2je1z18p0272zpua 1066 arn...@gm...-20080329150901-ehj9t32en7eps2dp 1067 zouzou123gen-20080329153653-36xlvpik2ns9r84r 1068 zouzou123gen-20080329162703-51xr8hg073pg7wq5 1069 zouzou123gen-20080329234706-8ddipdqu0xeudkql 1070 arn...@gm...-20080330081232-ubqr1171ewalrd4q 1071 zouzou123gen-20080330131607-yppbs3mgyjef1cux 1072 zouzou123gen-20080330134835-yv1nogy77ib1uehd 1073 zouzou123gen-20080331124549-alyw7vugdn30piqy 1074 zouzou123gen-20080331135108-q8frtqsin5bosfzm 1075 zouzou123gen-20080331140757-u94q52yccl5lsifk 1076 zouzou123gen-20080331152513-ue1x5qhigcw51348 1077 arn...@gm...-20080331184436-a8g6chibmg8nswls 1078 arn...@gm...-20080331220648-81485k28qmwruwz6 1079 zouzou123gen-20080401081001-2yjn07cf8s5sxr3a 1080 zouzou123gen-20080401081247-f3p4hdjojnd460jw 1081 zouzou123gen-20080401084117-24a454g8o0x656kg 1082 zouzou123gen-20080401133146-jabb5i8870fg6f66 1083 zouzou123gen-20080401154610-mxdqoo5bksru93e6 1084 arn...@gm...-20080401185530-lqj4tflt5ldmx46f 1085 arn...@gm...-20080401212616-ffl7m0xm8gt15knk 1086 arn...@gm...-20080402084515-ofmnwihzv159jton 1087 arn...@gm...-20080402133105-y70soi38owzl76i9 1088 arn...@gm...-20080402142417-rn2dbkx19wfz3vae 1089 arn...@gm...-20080402144459-u3z3hqvl8aqjc4a0 1090 zouzou123gen-20080402145051-zi8tmvy8u3r2mzu8 1091 arn...@gm...-20080402152137-f397uz1yp9qjvfwh 1092 zouzou123gen-20080402170355-29wda40wk3cy7lu5 1093 arn...@gm...-20080402180628-ipos9li0c4bsmq1h 1094 arn...@gm...-20080402181235-s2a6f4ww4lzayl46 1095 arn...@gm...-20080402193851-6mu64vgep6tijith 1096 arn...@gm...-20080402203810-86zpxsx69q83zf3r 1097 arn...@gm...-20080402204331-so2e8n892o23pejr 1098 poy-20080402224153-225qylr2cfwhqrg7 1099 mrmikejj-20080403125112-o8polh8rkn62umyh 1100 arn...@gm...-20080403125139-8xub76j1xazhfxna 1101 po...@12...-20080403140544-13kockkjho883nb4 1102 po...@12...-20080403143012-bxghtoodiolugpbs 1103 arn...@gm...-20080403190809-bbi4bz5rfcvjnt20 1104 arn...@gm...-20080403205410-czxru1vcg1s4wcws 1105 arn...@gm...-20080403213124-54spdrwszgyimd90 1106 po...@12...-20080404002406-aj74x5tngi6mmmj1 1107 arn...@gm...-20080404122415-mjy07qzbaxyhagra 1108 po...@12...-20080404145445-84lyk5tyy3b3br14 1109 po...@12...-20080404231417-v4v8x7u3f0hm0ejc 1110 po...@12...-20080405001107-14d1ojjof8xhvcj8 1111 arn...@gm...-20080405071929-jmnrul21sxx04kky 1112 arn...@gm...-20080405080105-9qbda7be0pi7y1ai 1113 po...@12...-20080405154555-yuj2n5kyndfjlpsf 1114 po...@12...-20080405220250-8y09d0samsj8ja94 1115 po...@12...-20080406134101-4860ytb61sbu3yhg 1116 po...@12...-20080406155849-2wzxzuzs5m8zpk0g 1117 po...@12...-20080406164835-bv5dydhm3qqydsty 1118 arn...@gm...-20080406210237-c7tyfgiz2sjgv044 1119 po...@12...-20080407114423-4yajg1rffidq76bj 1120 arn...@gm...-20080407194826-c42t4bjzw4vflejn 1121 po...@12...-20080407214303-o7ul1bvcn6gvaoc9 1122 po...@12...-20080407220647-r7f3em92til5j67s 1123 po...@12...-20080408212439-54t3bqlhvw1nu4xc 1124 arn...@gm...-20080409193708-y6erfzwrcb1seet3 1125 arn...@gm...-20080409195827-ub6t2s3wdf28nfpz 1126 po...@12...-20080409215055-1zmqhhm2859878c1 1127 arn...@gm...-20080410102447-l4es4cbukkqwcnpc 1128 arn...@gm...-20080410214118-b70g50tl27cq9q29 1129 arn...@gm...-20080411074730-w1pu78qigtx87lx3 1130 arn...@gm...-20080411090724-kwdj9pg9hrv1xhwb 1131 po...@12...-20080411153057-tn7zhxqk0z7ceref 1132 arn...@gm...-20080411200946-ierqlg8v9vzj18n2 1133 arn...@gm...-20080411201718-ecshulwd7ic0wdci 1134 arn...@gm...-20080411204047-jc9vzcsf32j38dvc 1135 arn...@gm...-20080411205445-ojuz2a29yq8ww37j 1136 arn...@gm...-20080411214746-r420xmdgo35pkweb 1137 po...@12...-20080412010723-cibh8r0itlzqyt3f 1138 arn...@gm...-20080412200504-6qfeqnsghxgrk775 1139 arn...@gm...-20080413095435-2pkfb407hk8j54te 1140 arn...@gm...-20080413133927-zw2tpz8o8p3izyix 1141 arn...@gm...-20080413165025-ug342rxtq4blxck5 1142 arn...@gm...-20080413182618-6ihabn0tii6gb2m2 1143 arn...@gm...-20080413184517-9p08tedakta1h762 1144 arn...@gm...-20080413193655-kc98lx7kpzo42q43 1145 arn...@gm...-20080414132947-pguvkuzvyadukssc 1146 arn...@gm...-20080414133544-pxwxm9kcvw0k0vf3 1147 po...@12...-20080414174341-hw1im7ysymscpiq0 1148 arn...@gm...-20080414181459-5gu852lneflgf5d6 1149 po...@12...-20080414205719-d80e75fsl8zzi6je 1150 arn...@gm...-20080414211616-835ve71r1qdlbhb4 1151 arn...@gm...-20080415080409-4cid9q7opng8ijav 1152 arn...@gm...-20080415124540-roduj23x442jeefn 1153 arn...@gm...-20080415141450-cld2ym4s50uu31q7 1154 po...@12...-20080415143018-4emcs3u1fquzsu1f 1155 arn...@gm...-20080415174958-wfqu5kga5pe39xvc 1156 po...@12...-20080415182942-2ux0yn8immkrz7ch 1157 po...@12...-20080415185700-gdgpyn414bf4behz 1158 po...@12...-20080415202535-cvevdgrawpilji5b 1159 po...@12...-20080415214801-lgb1429qdm4ti6ub 1160 po...@12...-20080416123247-6dw18ea0lk4m5q8q 1161 po...@12...-20080416135834-6mtzcfy7pzxqfnq0 1162 po...@12...-20080416181626-0ex66f1lv1maf38l 1163 arn...@gm...-20080416183603-yxbj16t2nd8rdzzd 1164 arn...@gm...-20080416200700-wncbhytfixz9b15u 1165 po...@12...-20080416200941-5oigemky43sz6r87 1166 arn...@gm...-20080416204550-0dx3qhxasdkdohx1 1167 arn...@gm...-20080416211510-3ilsym0bom7u2cer 1168 tom@athlon-20080417125238-0hhhchg951y7p83w 1169 arn...@gm...-20080418203137-e6szrje3fje5dgh9 1170 arn...@gm...-20080419164722-vyjrwwvglxr4yxuu 1171 arn...@gm...-20080419164802-o2boulbfrea4e0dx 1172 arn...@gm...-20080419165129-zj3axn731fo84vd5 + 1027 arn...@gm...-20080323183926-schknwnkgeo7ivdn 1028 zouzou123gen-20080323220411-r8usuc3qxwuh7zsn 1029 zouzou123gen-20080323221249-0su72zaj13e706mk 1030 arn...@gm...-20080324140623-muba1dl46m000o8c 1031 zouzou123gen-20080324141933-qbgr93ugpe0297m6 1032 arn...@gm...-20080324153706-siidja05n84i00b1 1033 arn...@gm...-20080324153823-lhn3awurnu77riln 1034 arn...@gm...-20080324165650-zapppziji67yf5a2 1035 zouzou123gen-20080324175936-4mqc2kh0lo5wtdu2 1036 zouzou123gen-20080325004602-6wdsoym95mjuhwd3 1037 arn...@gm...-20080325100659-8fqy6q65itmghlep 1038 zouzou123gen-20080325175216-s297sdiucukfvijh 1039 arn...@gm...-20080325210137-3dfqyoi8ykosy087 1040 arn...@gm...-20080325211747-nwwy1eb33r071sca 1041 arn...@gm...-20080326084110-qbselrjckku275xi 1042 zouzou123gen-20080326123631-35642mgbk2i4ty32 1043 zouzou123gen-20080326124345-f4xwn2d3ty8ubd6r 1044 arn...@gm...-20080326162031-il0nyms30w0mky43 1045 arn...@gm...-20080326164801-8dru8mjc06xgzjpv 1046 arn...@gm...-20080326170438-uzl2rx8fqnohak7g 1047 zouzou123gen-20080326172821-d6uqcbmfb0c6rwlv 1048 arn...@gm...-20080326213257-qlgdh7m2712p2l0q 1049 arn...@gm...-20080326214313-ktnoekgk3s0wmatz 1050 arn...@gm...-20080326215256-0j1iqrf286b9g7zf 1051 arn...@gm...-20080327082121-hoi22wh1gwjdfbyd 1052 arn...@gm...-20080327120639-um3tukdt374rwvgm 1053 zouzou123gen-20080327130703-6vtek6uxy3vua543 1054 arn...@gm...-20080327215831-dmg5mkufskabwkro 1055 arn...@gm...-20080327231459-cdztcv25alsuyqmf 1056 arn...@gm...-20080328085925-gceybsr53oml1p24 1057 arn...@gm...-20080328200512-1sjuu6bcnl2dyd2a 1058 arn...@gm...-20080328210347-bussqjrm5mfswh7o 1059 arn...@gm...-20080329055630-braiir1dskv7a4qm 1060 arn...@gm...-20080329061558-rck8dz60wpj3c5ja 1061 arn...@gm...-20080329081253-if6o5jn329mbzfpl 1062 arn...@gm...-20080329081619-cb4x930j8sp55cs0 1063 arn...@gm...-20080329103216-hgjzo7ra2zixbztd 1064 arn...@gm...-20080329124042-q3aw4iodmo5kafyp 1065 arn...@gm...-20080329124926-2je1z18p0272zpua 1066 arn...@gm...-20080329150901-ehj9t32en7eps2dp 1067 zouzou123gen-20080329153653-36xlvpik2ns9r84r 1068 zouzou123gen-20080329162703-51xr8hg073pg7wq5 1069 zouzou123gen-20080329234706-8ddipdqu0xeudkql 1070 arn...@gm...-20080330081232-ubqr1171ewalrd4q 1071 zouzou123gen-20080330131607-yppbs3mgyjef1cux 1072 zouzou123gen-20080330134835-yv1nogy77ib1uehd 1073 zouzou123gen-20080331124549-alyw7vugdn30piqy 1074 zouzou123gen-20080331135108-q8frtqsin5bosfzm 1075 zouzou123gen-20080331140757-u94q52yccl5lsifk 1076 zouzou123gen-20080331152513-ue1x5qhigcw51348 1077 arn...@gm...-20080331184436-a8g6chibmg8nswls 1078 arn...@gm...-20080331220648-81485k28qmwruwz6 1079 zouzou123gen-20080401081001-2yjn07cf8s5sxr3a 1080 zouzou123gen-20080401081247-f3p4hdjojnd460jw 1081 zouzou123gen-20080401084117-24a454g8o0x656kg 1082 zouzou123gen-20080401133146-jabb5i8870fg6f66 1083 zouzou123gen-20080401154610-mxdqoo5bksru93e6 1084 arn...@gm...-20080401185530-lqj4tflt5ldmx46f 1085 arn...@gm...-20080401212616-ffl7m0xm8gt15knk 1086 arn...@gm...-20080402084515-ofmnwihzv159jton 1087 arn...@gm...-20080402133105-y70soi38owzl76i9 1088 arn...@gm...-20080402142417-rn2dbkx19wfz3vae 1089 arn...@gm...-20080402144459-u3z3hqvl8aqjc4a0 1090 zouzou123gen-20080402145051-zi8tmvy8u3r2mzu8 1091 arn...@gm...-20080402152137-f397uz1yp9qjvfwh 1092 zouzou123gen-20080402170355-29wda40wk3cy7lu5 1093 arn...@gm...-20080402180628-ipos9li0c4bsmq1h 1094 arn...@gm...-20080402181235-s2a6f4ww4lzayl46 1095 arn...@gm...-20080402193851-6mu64vgep6tijith 1096 arn...@gm...-20080402203810-86zpxsx69q83zf3r 1097 arn...@gm...-20080402204331-so2e8n892o23pejr 1098 poy-20080402224153-225qylr2cfwhqrg7 1099 mrmikejj-20080403125112-o8polh8rkn62umyh 1100 arn...@gm...-20080403125139-8xub76j1xazhfxna 1101 po...@12...-20080403140544-13kockkjho883nb4 1102 po...@12...-20080403143012-bxghtoodiolugpbs 1103 arn...@gm...-20080403190809-bbi4bz5rfcvjnt20 1104 arn...@gm...-20080403205410-czxru1vcg1s4wcws 1105 arn...@gm...-20080403213124-54spdrwszgyimd90 1106 po...@12...-20080404002406-aj74x5tngi6mmmj1 1107 arn...@gm...-20080404122415-mjy07qzbaxyhagra 1108 po...@12...-20080404145445-84lyk5tyy3b3br14 1109 po...@12...-20080404231417-v4v8x7u3f0hm0ejc 1110 po...@12...-20080405001107-14d1ojjof8xhvcj8 1111 arn...@gm...-20080405071929-jmnrul21sxx04kky 1112 arn...@gm...-20080405080105-9qbda7be0pi7y1ai 1113 po...@12...-20080405154555-yuj2n5kyndfjlpsf 1114 po...@12...-20080405220250-8y09d0samsj8ja94 1115 po...@12...-20080406134101-4860ytb61sbu3yhg 1116 po...@12...-20080406155849-2wzxzuzs5m8zpk0g 1117 po...@12...-20080406164835-bv5dydhm3qqydsty 1118 arn...@gm...-20080406210237-c7tyfgiz2sjgv044 1119 po...@12...-20080407114423-4yajg1rffidq76bj 1120 arn...@gm...-20080407194826-c42t4bjzw4vflejn 1121 po...@12...-20080407214303-o7ul1bvcn6gvaoc9 1122 po...@12...-20080407220647-r7f3em92til5j67s 1123 po...@12...-20080408212439-54t3bqlhvw1nu4xc 1124 arn...@gm...-20080409193708-y6erfzwrcb1seet3 1125 arn...@gm...-20080409195827-ub6t2s3wdf28nfpz 1126 po...@12...-20080409215055-1zmqhhm2859878c1 1127 arn...@gm...-20080410102447-l4es4cbukkqwcnpc 1128 arn...@gm...-20080410214118-b70g50tl27cq9q29 1129 arn...@gm...-20080411074730-w1pu78qigtx87lx3 1130 arn...@gm...-20080411090724-kwdj9pg9hrv1xhwb 1131 po...@12...-20080411153057-tn7zhxqk0z7ceref 1132 arn...@gm...-20080411200946-ierqlg8v9vzj18n2 1133 arn...@gm...-20080411201718-ecshulwd7ic0wdci 1134 arn...@gm...-20080411204047-jc9vzcsf32j38dvc 1135 arn...@gm...-20080411205445-ojuz2a29yq8ww37j 1136 arn...@gm...-20080411214746-r420xmdgo35pkweb 1137 po...@12...-20080412010723-cibh8r0itlzqyt3f 1138 arn...@gm...-20080412200504-6qfeqnsghxgrk775 1139 arn...@gm...-20080413095435-2pkfb407hk8j54te 1140 arn...@gm...-20080413133927-zw2tpz8o8p3izyix 1141 arn...@gm...-20080413165025-ug342rxtq4blxck5 1142 arn...@gm...-20080413182618-6ihabn0tii6gb2m2 1143 arn...@gm...-20080413184517-9p08tedakta1h762 1144 arn...@gm...-20080413193655-kc98lx7kpzo42q43 1145 arn...@gm...-20080414132947-pguvkuzvyadukssc 1146 arn...@gm...-20080414133544-pxwxm9kcvw0k0vf3 1147 po...@12...-20080414174341-hw1im7ysymscpiq0 1148 arn...@gm...-20080414181459-5gu852lneflgf5d6 1149 po...@12...-20080414205719-d80e75fsl8zzi6je 1150 arn...@gm...-20080414211616-835ve71r1qdlbhb4 1151 arn...@gm...-20080415080409-4cid9q7opng8ijav 1152 arn...@gm...-20080415124540-roduj23x442jeefn 1153 arn...@gm...-20080415141450-cld2ym4s50uu31q7 1154 po...@12...-20080415143018-4emcs3u1fquzsu1f 1155 arn...@gm...-20080415174958-wfqu5kga5pe39xvc 1156 po...@12...-20080415182942-2ux0yn8immkrz7ch 1157 po...@12...-20080415185700-gdgpyn414bf4behz 1158 po...@12...-20080415202535-cvevdgrawpilji5b 1159 po...@12...-20080415214801-lgb1429qdm4ti6ub 1160 po...@12...-20080416123247-6dw18ea0lk4m5q8q 1161 po...@12...-20080416135834-6mtzcfy7pzxqfnq0 1162 po...@12...-20080416181626-0ex66f1lv1maf38l 1163 arn...@gm...-20080416183603-yxbj16t2nd8rdzzd 1164 arn...@gm...-20080416200700-wncbhytfixz9b15u 1165 po...@12...-20080416200941-5oigemky43sz6r87 1166 arn...@gm...-20080416204550-0dx3qhxasdkdohx1 1167 arn...@gm...-20080416211510-3ilsym0bom7u2cer 1168 tom@athlon-20080417125238-0hhhchg951y7p83w 1169 arn...@gm...-20080418203137-e6szrje3fje5dgh9 1170 arn...@gm...-20080419164722-vyjrwwvglxr4yxuu 1171 arn...@gm...-20080419164802-o2boulbfrea4e0dx 1172 arn...@gm...-20080419165129-zj3axn731fo84vd5 1173 po...@12...-20080419172806-2qspfwerslo10rd2 Modified: dcplusplus/trunk/dwt/include/dwt/widgets/ToolBar.h =================================================================== --- dcplusplus/trunk/dwt/include/dwt/widgets/ToolBar.h 2008-04-24 13:29:27 UTC (rev 1197) +++ dcplusplus/trunk/dwt/include/dwt/widgets/ToolBar.h 2008-04-24 13:30:58 UTC (rev 1198) @@ -109,7 +109,7 @@ */ void appendSeparator(); - void appendItem(int image, const tstring& toolTip, const Dispatcher::F& f = Dispatcher::F()); + void appendItem(int image, const tstring& toolTip, DWORD_PTR data = 0, const Dispatcher::F& f = Dispatcher::F()); /// Set the image list with the normal button images. /** normalImageList is the image list that contains the images @@ -156,7 +156,9 @@ bool getButtonChecked( unsigned int id ); int size(); - + + int hitTest(const ScreenCoordinate& pt); + /// Actually creates the Toolbar /** You should call WidgetFactory::createToolbar if you instantiate class * directly. <br> @@ -174,6 +176,7 @@ {} virtual bool tryFire( const MSG & msg, LRESULT & retVal ); + private: // Keep references ImageListPtr itsNormalImageList; @@ -181,6 +184,9 @@ ImageListPtr itsDisabledImageList; std::vector<Dispatcher::F> commands; + + // AspectHelp + void helpImpl(unsigned& id); }; /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -254,9 +260,7 @@ inline bool ToolBar::getButtonVisible( unsigned int id ) { - TBBUTTONINFO tb = { sizeof( TBBUTTONINFO ) }; - tb.dwMask = TBIF_STATE; - tb.idCommand = id; + TBBUTTONINFO tb = { sizeof(TBBUTTONINFO), TBIF_STATE, id }; this->sendMessage(TB_GETBUTTONINFO, id, reinterpret_cast< LPARAM >( & tb ) ); return ( tb.fsState & TBSTATE_HIDDEN ) == 0; } @@ -268,24 +272,14 @@ inline bool ToolBar::getButtonEnabled( unsigned int id ) { - TBBUTTONINFO tb = - {0 - }; - tb.cbSize = sizeof( TBBUTTONINFO ); - tb.dwMask = TBIF_STATE; - tb.idCommand = id; + TBBUTTONINFO tb = { sizeof(TBBUTTONINFO), TBIF_STATE, id }; this->sendMessage(TB_GETBUTTONINFO, id, reinterpret_cast< LPARAM >( & tb ) ); return ( tb.fsState & TBSTATE_ENABLED ) == TBSTATE_ENABLED; } inline bool ToolBar::getButtonChecked( unsigned int id ) { - TBBUTTONINFO tb = - {0 - }; - tb.cbSize = sizeof( TBBUTTONINFO ); - tb.dwMask = TBIF_STATE; - tb.idCommand = id; + TBBUTTONINFO tb = { sizeof(TBBUTTONINFO), TBIF_STATE, id }; this->sendMessage(TB_GETBUTTONINFO, id, reinterpret_cast< LPARAM >( & tb ) ); return ( tb.fsState & TBSTATE_CHECKED ) == TBSTATE_CHECKED; } Modified: dcplusplus/trunk/dwt/src/widgets/ToolBar.cpp =================================================================== --- dcplusplus/trunk/dwt/src/widgets/ToolBar.cpp 2008-04-24 13:29:27 UTC (rev 1197) +++ dcplusplus/trunk/dwt/src/widgets/ToolBar.cpp 2008-04-24 13:30:58 UTC (rev 1198) @@ -59,7 +59,7 @@ } } -void ToolBar::appendItem( int image, const tstring& toolTip, const Dispatcher::F& f) +void ToolBar::appendItem(int image, const tstring& toolTip, DWORD_PTR data, const Dispatcher::F& f) { int id = -1; @@ -81,6 +81,7 @@ tb.idCommand = id; tb.fsState = TBSTATE_ENABLED; tb.fsStyle = BTNS_AUTOSIZE; + tb.dwData = data; tb.iString = reinterpret_cast<INT_PTR>(toolTip.c_str()); if ( this->sendMessage(TB_ADDBUTTONS, 1, reinterpret_cast< LPARAM >( &tb ) ) == FALSE ) { @@ -89,6 +90,11 @@ } } +int ToolBar::hitTest(const ScreenCoordinate& pt) { + POINT point = ClientCoordinate(pt, this).getPoint(); + return sendMessage(TB_HITTEST, 0, reinterpret_cast<LPARAM>(&point)); +} + bool ToolBar::tryFire( const MSG & msg, LRESULT & retVal ) { if(msg.message == WM_COMMAND && msg.lParam == reinterpret_cast<LPARAM>(handle())) { size_t id = LOWORD(msg.wParam); @@ -100,4 +106,15 @@ return PolicyType::tryFire(msg, retVal); } +void ToolBar::helpImpl(unsigned& id) { + // we have the help id of the whole toolbar; convert to the one of the specific button the user just clicked on + int index = hitTest(ScreenCoordinate(Point::fromLParam(::GetMessagePos()))); + if(index >= 0) { + // assume the extra info associated with the button is the help id + TBBUTTONINFO tb = { sizeof(TBBUTTONINFO), TBIF_BYINDEX | TBIF_LPARAM }; + sendMessage(TB_GETBUTTONINFO, index, reinterpret_cast<LPARAM>(&tb)); + id = tb.lParam; + } } + +} Modified: dcplusplus/trunk/help/DCPlusPlus.hhp =================================================================== --- dcplusplus/trunk/help/DCPlusPlus.hhp 2008-04-24 13:29:27 UTC (rev 1197) +++ dcplusplus/trunk/help/DCPlusPlus.hhp 2008-04-24 13:30:58 UTC (rev 1198) @@ -38,6 +38,7 @@ plusplus_tag.html netiquette.html credits.html +window_main.html window_hub.html window_pm.html window_file_list.html @@ -80,6 +81,7 @@ IDH_STARTPAGE=index.html IDH_CHANGELOG=changelog.html IDH_KEYBOARD=faq_keyboard_commands.html +IDH_MAIN=window_main.html IDH_HUB=window_hub.html IDH_PM=window_pm.html IDH_FILE_LIST=window_file_list.html Modified: dcplusplus/trunk/help/cshelp.h =================================================================== --- dcplusplus/trunk/help/cshelp.h 2008-04-24 13:29:27 UTC (rev 1197) +++ dcplusplus/trunk/help/cshelp.h 2008-04-24 13:30:58 UTC (rev 1198) @@ -459,33 +459,65 @@ #define IDH_HUB_FILTER 11227 -#define IDH_PM_CHAT 11228 +#define IDH_TOOLBAR_PUBLIC_HUBS 11228 -#define IDH_PM_MESSAGE 11229 +#define IDH_TOOLBAR_RECONNECT 11229 -#define IDH_PUBLIC_HUBS_FILTER 11230 +#define IDH_TOOLBAR_FOLLOW 11230 -#define IDH_PUBLIC_HUBS_LISTS 11231 +#define IDH_TOOLBAR_FAVORITE_HUBS 11231 -#define IDH_PUBLIC_HUBS_REFRESH 11232 +#define IDH_TOOLBAR_FAVORITE_USERS 11232 -#define IDH_SEARCH_SEARCH_FOR 11233 +#define IDH_TOOLBAR_QUEUE 11233 -#define IDH_SEARCH_PURGE 11234 +#define IDH_TOOLBAR_FINISHED_DL 11234 -#define IDH_SEARCH_SEARCH 11235 +#define IDH_TOOLBAR_WAITING_USERS 11235 -#define IDH_SEARCH_SIZE 11236 +#define IDH_TOOLBAR_FINISHED_UL 11236 -#define IDH_SEARCH_TYPE 11237 +#define IDH_TOOLBAR_SEARCH 11237 -#define IDH_SEARCH_SLOTS 11238 +#define IDH_TOOLBAR_ADL_SEARCH 11238 -#define IDH_SEARCH_SHARE 11239 +#define IDH_TOOLBAR_SEARCH_SPY 11239 -#define IDH_SEARCH_HUBS 11240 +#define IDH_TOOLBAR_FILE_LIST 11240 -#define IDH_SPY_IGNORE_TTH 11241 +#define IDH_TOOLBAR_SETTINGS 11241 +#define IDH_TOOLBAR_NOTEPAD 11242 +#define IDH_TOOLBAR_WHATS_THIS 11243 + +#define IDH_PM_CHAT 11244 + +#define IDH_PM_MESSAGE 11245 + +#define IDH_PUBLIC_HUBS_FILTER 11246 + +#define IDH_PUBLIC_HUBS_LISTS 11247 + +#define IDH_PUBLIC_HUBS_REFRESH 11248 + +#define IDH_SEARCH_SEARCH_FOR 11249 + +#define IDH_SEARCH_PURGE 11250 + +#define IDH_SEARCH_SEARCH 11251 + +#define IDH_SEARCH_SIZE 11252 + +#define IDH_SEARCH_TYPE 11253 + +#define IDH_SEARCH_SLOTS 11254 + +#define IDH_SEARCH_SHARE 11255 + +#define IDH_SEARCH_HUBS 11256 + +#define IDH_SPY_IGNORE_TTH 11257 + + #endif Modified: dcplusplus/trunk/help/index.html =================================================================== --- dcplusplus/trunk/help/index.html 2008-04-24 13:29:27 UTC (rev 1197) +++ dcplusplus/trunk/help/index.html 2008-04-24 13:30:58 UTC (rev 1198) @@ -35,6 +35,7 @@ <br> <h2>Windows</h2> <div style="margin-left: 40px;"> +<a href="window_main.html">Main DC++ window</a><br> <a href="window_hub.html">Hub</a><br> <a href="window_pm.html">Private Message</a><br> <a href="window_file_list.html">File List</a><br> Modified: dcplusplus/trunk/help/resource.h =================================================================== --- dcplusplus/trunk/help/resource.h 2008-04-24 13:29:27 UTC (rev 1197) +++ dcplusplus/trunk/help/resource.h 2008-04-24 13:30:58 UTC (rev 1198) @@ -10,24 +10,25 @@ #define IDH_KEYBOARD 10002 // windows -#define IDH_HUB 10100 -#define IDH_PM 10101 -#define IDH_FILE_LIST 10102 -#define IDH_PUBLIC_HUBS 10103 -#define IDH_FAVORITE_HUBS 10104 -#define IDH_FAVUSERS 10105 -#define IDH_QUEUE 10106 -#define IDH_FINISHED_DL 10107 -#define IDH_WAITING_USERS 10108 -#define IDH_FINISHED_UL 10109 -#define IDH_SEARCH 10110 -#define IDH_ADL_SEARCH 10111 -#define IDH_SEARCH_SPY 10112 -#define IDH_NOTEPAD 10113 -#define IDH_SYSTEM_LOG 10114 -#define IDH_NET_STATS 10115 -#define IDH_CONNECTIONS 10116 -#define IDH_DOWNLOADS 10117 +#define IDH_MAIN 10100 +#define IDH_HUB 10101 +#define IDH_PM 10102 +#define IDH_FILE_LIST 10103 +#define IDH_PUBLIC_HUBS 10104 +#define IDH_FAVORITE_HUBS 10105 +#define IDH_FAVUSERS 10106 +#define IDH_QUEUE 10107 +#define IDH_FINISHED_DL 10108 +#define IDH_WAITING_USERS 10109 +#define IDH_FINISHED_UL 10110 +#define IDH_SEARCH 10111 +#define IDH_ADL_SEARCH 10112 +#define IDH_SEARCH_SPY 10113 +#define IDH_NOTEPAD 10114 +#define IDH_SYSTEM_LOG 10115 +#define IDH_NET_STATS 10116 +#define IDH_CONNECTIONS 10117 +#define IDH_DOWNLOADS 10118 // dialogs #define IDH_HASH_PROGRESS 10200 Modified: dcplusplus/trunk/help/toc.hhc =================================================================== --- dcplusplus/trunk/help/toc.hhc 2008-04-24 13:29:27 UTC (rev 1197) +++ dcplusplus/trunk/help/toc.hhc 2008-04-24 13:30:58 UTC (rev 1198) @@ -25,6 +25,10 @@ </OBJECT> <UL> <LI> <OBJECT type="text/sitemap"> + <param name="Name" value="Main DC++ window"> + <param name="Local" value="window_main.html"> + </OBJECT> + <LI> <OBJECT type="text/sitemap"> <param name="Name" value="Hub"> <param name="Local" value="window_hub.html"> </OBJECT> Added: dcplusplus/trunk/help/window_main.html =================================================================== --- dcplusplus/trunk/help/window_main.html (rev 0) +++ dcplusplus/trunk/help/window_main.html 2008-04-24 13:30:58 UTC (rev 1198) @@ -0,0 +1,62 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> +<html> +<head> + <meta content="text/html; charset=us-ascii" http-equiv="content-type"> + <link type="text/css" rel="stylesheet" href="office11.css"> + <title>Main DC++ window</title> +</head> +<body> +<h1>Main DC++ window</h1> +<h2>Menus (top)</h2> +... +<h2>Toolbar (top, icons below menus)</h2> +From left to right: +<dl style="margin-left: 40px;"> +<dt>Public Hubs</dt> +<dd cshelp=IDH_TOOLBAR_PUBLIC_HUBS>Open the <a href="window_public_hubs.html">Public Hubs</a> window.</dd> +<dt>Reconnect</dt> +<dd cshelp=IDH_TOOLBAR_RECONNECT>Reconnect (disconnect and connect again) the hub which is currently in the foreground.</dd> +<dt>Follow last redirect</dt> +<dd cshelp=IDH_TOOLBAR_FOLLOW>Follow the redirection offered by the hub which is currently in the foreground.</dd> +<dt>Favorite Hubs</dt> +<dd cshelp=IDH_TOOLBAR_FAVORITE_HUBS>Open the <a href="window_favorite_hubs.html">Favorite Hubs</a> window.</dd> +<dt>Favorite Users</dt> +<dd cshelp=IDH_TOOLBAR_FAVORITE_USERS>Open the <a href="window_favorite_users.html">Favorite Users</a> window.</dd> +<dt>Download Queue</dt> +<dd cshelp=IDH_TOOLBAR_QUEUE>Open the <a href="window_download_queue.html">Download Queue</a> window.</dd> +<dt>Finished Downloads</dt> +<dd cshelp=IDH_TOOLBAR_FINISHED_DL>Open the <a href="window_finished_downloads.html">Finished Downloads</a> window.</dd> +<dt>Waiting Users</dt> +<dd cshelp=IDH_TOOLBAR_WAITING_USERS>Open the <a href="window_waiting_users.html">Waiting Users</a> window.</dd> +<dt>Finished Uploads</dt> +<dd cshelp=IDH_TOOLBAR_FINISHED_UL>Open the <a href="window_finished_uploads.html">Finished Uploads</a> window.</dd> +<dt>Search</dt> +<dd cshelp=IDH_TOOLBAR_SEARCH>Open the <a href="window_search.html">Search</a> window.</dd> +<dt>ADL Search</dt> +<dd cshelp=IDH_TOOLBAR_ADL_SEARCH>Open the <a href="window_adlsearch.html">ADL Search</a> window.</dd> +<dt>Search Spy</dt> +<dd cshelp=IDH_TOOLBAR_SEARCH_SPY>Open the <a href="window_search_spy.html">Search Spy</a> window.</dd> +<dt>Open file list...</dt> +<dd cshelp=IDH_TOOLBAR_FILE_LIST>Open a file list previously saved on your disk (a dialog will appear so you can pick the one you wish to open).</dd> +<dt>Settings</dt> +<dd cshelp=IDH_TOOLBAR_SETTINGS>Open the Settings dialog.</dd> +<dt>Notepad</dt> +<dd cshelp=IDH_TOOLBAR_NOTEPAD>Open the <a href="window_notepad.html">Notepad</a> window, where you can store random text.</dd> +<dt>What's This?</dt> +<dd cshelp=IDH_TOOLBAR_WHATS_THIS>You can get help on specific parts of DC++ by using the "What's This?" help button: click it once, and your mouse cursor will change into a help cursor; then click on the control you wish to get help for.</dd> +</dl> +<h2>Tabs</h2> +Ctrl+Tab, switching, drag&drop, related options (open in background)... +<h2>Status bar (bottom)</h2> +<dl style="margin-left: 40px;"> +<dt>Messages</dt> +<dd>...</dd> +<dt>Away</dt> +<dd>...</dd> +<dt>Hubs</dt> +<dd>...</dd> +<dt>Slots</dt> +<dd>...</dd> +</dl> +</body> +</html> Modified: dcplusplus/trunk/win32/MainWindow.cpp =================================================================== --- dcplusplus/trunk/win32/MainWindow.cpp 2008-04-24 13:29:27 UTC (rev 1197) +++ dcplusplus/trunk/win32/MainWindow.cpp 2008-04-24 13:30:58 UTC (rev 1198) @@ -281,33 +281,35 @@ } int image = 0; - toolbar->appendItem(image++, T_("Public Hubs"), std::tr1::bind(&MainWindow::handleOpenWindow, this, IDC_PUBLIC_HUBS)); + toolbar->appendItem(image++, T_("Public Hubs"), IDH_TOOLBAR_PUBLIC_HUBS, std::tr1::bind(&MainWindow::handleOpenWindow, this, IDC_PUBLIC_HUBS)); toolbar->appendSeparator(); - toolbar->appendItem(image++, T_("Reconnect"), std::tr1::bind(&MainWindow::handleForward, this, IDC_RECONNECT)); - toolbar->appendItem(image++, T_("Follow last redirect"), std::tr1::bind(&MainWindow::handleForward, this, IDC_FOLLOW)); + toolbar->appendItem(image++, T_("Reconnect"), IDH_TOOLBAR_RECONNECT, std::tr1::bind(&MainWindow::handleForward, this, IDC_RECONNECT)); + toolbar->appendItem(image++, T_("Follow last redirect"), IDH_TOOLBAR_FOLLOW, std::tr1::bind(&MainWindow::handleForward, this, IDC_FOLLOW)); toolbar->appendSeparator(); - toolbar->appendItem(image++, T_("Favorite Hubs"), std::tr1::bind(&MainWindow::handleOpenWindow, this, IDC_FAVORITE_HUBS)); - toolbar->appendItem(image++, T_("Favorite Users"), std::tr1::bind(&MainWindow::handleOpenWindow, this, IDC_FAVUSERS)); + toolbar->appendItem(image++, T_("Favorite Hubs"), IDH_TOOLBAR_FAVORITE_HUBS, std::tr1::bind(&MainWindow::handleOpenWindow, this, IDC_FAVORITE_HUBS)); + toolbar->appendItem(image++, T_("Favorite Users"), IDH_TOOLBAR_FAVORITE_USERS, std::tr1::bind(&MainWindow::handleOpenWindow, this, IDC_FAVUSERS)); toolbar->appendSeparator(); - toolbar->appendItem(image++, T_("Download Queue"), std::tr1::bind(&MainWindow::handleOpenWindow, this, IDC_QUEUE)); - toolbar->appendItem(image++, T_("Finished Downloads"), std::tr1::bind(&MainWindow::handleOpenWindow, this, IDC_FINISHED_DL)); - toolbar->appendItem(image++, T_("Waiting Users"), std::tr1::bind(&MainWindow::handleOpenWindow, this, IDC_WAITING_USERS)); - toolbar->appendItem(image++, T_("Finished Uploads"), std::tr1::bind(&MainWindow::handleOpenWindow, this, IDC_FINISHED_UL)); + toolbar->appendItem(image++, T_("Download Queue"), IDH_TOOLBAR_QUEUE, std::tr1::bind(&MainWindow::handleOpenWindow, this, IDC_QUEUE)); + toolbar->appendItem(image++, T_("Finished Downloads"), IDH_TOOLBAR_FINISHED_DL, std::tr1::bind(&MainWindow::handleOpenWindow, this, IDC_FINISHED_DL)); + toolbar->appendItem(image++, T_("Waiting Users"), IDH_TOOLBAR_WAITING_USERS, std::tr1::bind(&MainWindow::handleOpenWindow, this, IDC_WAITING_USERS)); + toolbar->appendItem(image++, T_("Finished Uploads"), IDH_TOOLBAR_FINISHED_UL, std::tr1::bind(&MainWindow::handleOpenWindow, this, IDC_FINISHED_UL)); toolbar->appendSeparator(); - toolbar->appendItem(image++, T_("Search"), std::tr1::bind(&MainWindow::handleOpenWindow, this, IDC_SEARCH)); - toolbar->appendItem(image++, T_("ADL Search"), std::tr1::bind(&MainWindow::handleOpenWindow, this, IDC_ADL_SEARCH)); - toolbar->appendItem(image++, T_("Search Spy"), std::tr1::bind(&MainWindow::handleOpenWindow, this, IDC_SEARCH_SPY)); + toolbar->appendItem(image++, T_("Search"), IDH_TOOLBAR_SEARCH, std::tr1::bind(&MainWindow::handleOpenWindow, this, IDC_SEARCH)); + toolbar->appendItem(image++, T_("ADL Search"), IDH_TOOLBAR_ADL_SEARCH, std::tr1::bind(&MainWindow::handleOpenWindow, this, IDC_ADL_SEARCH)); + toolbar->appendItem(image++, T_("Search Spy"), IDH_TOOLBAR_SEARCH_SPY, std::tr1::bind(&MainWindow::handleOpenWindow, this, IDC_SEARCH_SPY)); toolbar->appendSeparator(); - toolbar->appendItem(image++, T_("Open file list..."), std::tr1::bind(&MainWindow::handleOpenFileList, this)); + toolbar->appendItem(image++, T_("Open file list..."), IDH_TOOLBAR_FILE_LIST, std::tr1::bind(&MainWindow::handleOpenFileList, this)); toolbar->appendSeparator(); - toolbar->appendItem(image++, T_("Settings"), std::tr1::bind(&MainWindow::handleSettings, this)); - toolbar->appendItem(image++, T_("Notepad"), std::tr1::bind(&MainWindow::handleOpenWindow, this, IDC_NOTEPAD)); + toolbar->appendItem(image++, T_("Settings"), IDH_TOOLBAR_SETTINGS, std::tr1::bind(&MainWindow::handleSettings, this)); + toolbar->appendItem(image++, T_("Notepad"), IDH_TOOLBAR_NOTEPAD, std::tr1::bind(&MainWindow::handleOpenWindow, this, IDC_NOTEPAD)); toolbar->appendSeparator(); toolbar->appendItem(image++, T_( "\"What's This?\" help button\n\n" "Get help on specific parts of DC++\n\n" "Click this button once and your mouse cursor will change into a help cursor; then click on the control for which you wish to get help for." - ), std::tr1::bind(&MainWindow::handleWhatsThis, this)); + ), IDH_TOOLBAR_WHATS_THIS, std::tr1::bind(&MainWindow::handleWhatsThis, this)); + + toolbar->onHelp(std::tr1::bind(&WinUtil::help, _1, _2)); } void MainWindow::initStatusBar() { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |