From: <arn...@us...> - 2008-04-24 13:20:45
|
Revision: 1188 http://dcplusplus.svn.sourceforge.net/dcplusplus/?rev=1188&view=rev Author: arnetheduck Date: 2008-04-24 06:20:31 -0700 (Thu, 24 Apr 2008) Log Message: ----------- Remove menus from factory Modified Paths: -------------- dcplusplus/trunk/dwt/include/dwt/WidgetFactory.h dcplusplus/trunk/dwt/include/dwt/WidgetFactoryPlatformSmartWinDesktop.h dcplusplus/trunk/dwt/include/dwt/widgets/Composite.h dcplusplus/trunk/dwt/include/dwt/widgets/Menu.h dcplusplus/trunk/dwt/src/widgets/Menu.cpp dcplusplus/trunk/win32/ADLSearchFrame.cpp dcplusplus/trunk/win32/DirectoryListingFrame.cpp dcplusplus/trunk/win32/FavHubsFrame.cpp dcplusplus/trunk/win32/FinishedFrameBase.h dcplusplus/trunk/win32/HubFrame.cpp dcplusplus/trunk/win32/MDIChildFrame.h dcplusplus/trunk/win32/MainWindow.cpp dcplusplus/trunk/win32/PrivateFrame.cpp dcplusplus/trunk/win32/PublicHubsFrame.cpp dcplusplus/trunk/win32/QueueFrame.cpp dcplusplus/trunk/win32/SearchFrame.cpp dcplusplus/trunk/win32/SpyFrame.cpp dcplusplus/trunk/win32/TransferView.cpp dcplusplus/trunk/win32/UsersFrame.cpp dcplusplus/trunk/win32/WaitingUsersFrame.cpp Property Changed: ---------------- dcplusplus/trunk/ Property changes on: dcplusplus/trunk ___________________________________________________________________ Name: bzr:revision-info - timestamp: 2008-04-16 20:16:26.703000069 +0200 committer: poy <po...@12...> properties: branch-nick: repo + timestamp: 2008-04-16 20:36:03.164999962 +0200 committer: Jacek Sieka <arn...@gm...> properties: branch-nick: dcplusplus 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 + 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 Modified: dcplusplus/trunk/dwt/include/dwt/WidgetFactory.h =================================================================== --- dcplusplus/trunk/dwt/include/dwt/WidgetFactory.h 2008-04-24 13:17:49 UTC (rev 1187) +++ dcplusplus/trunk/dwt/include/dwt/WidgetFactory.h 2008-04-24 13:20:31 UTC (rev 1188) @@ -66,7 +66,7 @@ * delete <br> * this is with purpose to make the library easier to use and more transparent for * C#, Java and newbie developers. <br> - * Some functions returns stack objects, e.g. createMenu which returns a + * Some functions returns stack objects, e.g. addChild which returns a * std::tr1::shared_ptr and createMessageBox which returns a stack object, these also * should just get to "live their own life" and should not be tampered with in any * "memory ways". Modified: dcplusplus/trunk/dwt/include/dwt/WidgetFactoryPlatformSmartWinDesktop.h =================================================================== --- dcplusplus/trunk/dwt/include/dwt/WidgetFactoryPlatformSmartWinDesktop.h 2008-04-24 13:17:49 UTC (rev 1187) +++ dcplusplus/trunk/dwt/include/dwt/WidgetFactoryPlatformSmartWinDesktop.h 2008-04-24 13:20:31 UTC (rev 1188) @@ -53,12 +53,6 @@ : public ContainerWidgetType { public: - /// Menu class type. - typedef dwt::Menu Menu; - - /// Menu object type. - typedef typename Menu::ObjectType MenuPtr; - /// ChooseFont class and object type. typedef dwt::FontDialog FontDialog; @@ -76,21 +70,6 @@ FontDialog createFontDialog() { return FontDialog( this ); } - - /// Creates a Menu - /** The returned object is of type std::tr1::shared_ptr< Menu >, but - * you should use the typedef MenuPtr and not <br> - * the shared_ptr itself since this may change in future releases. - */ - MenuPtr createMenu(const typename Menu::Seed& cs = Menu::Seed()) - { - return WidgetCreator< Menu >::create( this, cs ); - } - - MenuPtr attachMenu(HMENU hMenu, const typename Menu::Seed& cs = Menu::Seed()) - { - return WidgetCreator< Menu >::attach( this, cs, hMenu ); - } }; } Modified: dcplusplus/trunk/dwt/include/dwt/widgets/Composite.h =================================================================== --- dcplusplus/trunk/dwt/include/dwt/widgets/Composite.h 2008-04-24 13:17:49 UTC (rev 1187) +++ dcplusplus/trunk/dwt/include/dwt/widgets/Composite.h 2008-04-24 13:20:31 UTC (rev 1188) @@ -72,7 +72,7 @@ // TODO Maybe move this to a separate class? // This brings these classes into the namespace of classes that inherit from Composite - // Note; only child windows should be here... + // Note; only widgets that can be created with addChild should be here typedef dwt::Button Button; typedef dwt::ButtonPtr ButtonPtr; typedef dwt::CheckBox CheckBox; @@ -89,6 +89,8 @@ typedef dwt::GroupBoxPtr GroupBoxPtr; typedef dwt::Label Label; typedef dwt::LabelPtr LabelPtr; + typedef dwt::Menu Menu; + typedef dwt::MenuPtr MenuPtr; typedef dwt::ProgressBar ProgressBar; typedef dwt::ProgressBarPtr ProgressBarPtr; typedef dwt::RadioButton RadioButton; Modified: dcplusplus/trunk/dwt/include/dwt/widgets/Menu.h =================================================================== --- dcplusplus/trunk/dwt/include/dwt/widgets/Menu.h 2008-04-24 13:17:49 UTC (rev 1187) +++ dcplusplus/trunk/dwt/include/dwt/widgets/Menu.h 2008-04-24 13:20:31 UTC (rev 1188) @@ -113,6 +113,8 @@ typedef std::tr1::shared_ptr<Menu> ObjectType; struct Seed { + typedef ThisType WidgetType; + Seed(bool ownerDrawn_ = true, const MenuColorInfo& colorInfo_ = MenuColorInfo(), FontPtr font_ = 0); bool popup; bool ownerDrawn; @@ -264,7 +266,7 @@ template<typename DispatcherType> void appendItem(unsigned int id, const tstring & text, const typename DispatcherType::F& f, BitmapPtr image = BitmapPtr()) { appendItem(id, text, image); - callbacks.insert(std::make_pair(id, DispatcherType(f))); + itsParent->setCallback(Message(WM_COMMAND, id), DispatcherType(f)); } void appendItem(unsigned int id, const tstring & text, const IdDispatcher::F& f, BitmapPtr image = BitmapPtr()) { @@ -462,13 +464,8 @@ // if true title is drawn as sidebar bool drawSidebar; - typedef std::tr1::unordered_map<unsigned, Widget::CallbackType> CallbackMap; - CallbackMap callbacks; - void createHelper(const Seed& cs); - void addCommands(); - // Returns item index in the menu item list // If no item with specified id is found, - 1 is returned int getItemIndex( unsigned int id ); Modified: dcplusplus/trunk/dwt/src/widgets/Menu.cpp =================================================================== --- dcplusplus/trunk/dwt/src/widgets/Menu.cpp 2008-04-24 13:17:49 UTC (rev 1187) +++ dcplusplus/trunk/dwt/src/widgets/Menu.cpp 2008-04-24 13:20:31 UTC (rev 1188) @@ -139,7 +139,6 @@ } void Menu::setMenu() { - addCommands(); if ( ::SetMenu( itsParent->handle(), itsHandle ) == FALSE ) throw xCeption( _T( "SetMenu in Menu::setMenu fizzled..." ) ); } @@ -207,15 +206,6 @@ } #endif -void Menu::addCommands() { - for(CallbackMap::iterator i = callbacks.begin(); i != callbacks.end(); ++i) { - itsParent->setCallback(Message(WM_COMMAND, i->first), i->second); - } - for(std::vector< ObjectType >::iterator i = itsChildren.begin(); i != itsChildren.end(); ++i) { - (*i)->addCommands(); - } -} - int Menu::getItemIndex( unsigned int id ) { int index = 0; @@ -955,8 +945,6 @@ unsigned Menu::trackPopupMenu( const ScreenCoordinate& sc, unsigned flags ) { - addCommands(); - long x = sc.getPoint().x, y = sc.getPoint().y; if ( x == - 1 && y == - 1 ) Modified: dcplusplus/trunk/win32/ADLSearchFrame.cpp =================================================================== --- dcplusplus/trunk/win32/ADLSearchFrame.cpp 2008-04-24 13:17:49 UTC (rev 1187) +++ dcplusplus/trunk/win32/ADLSearchFrame.cpp 2008-04-24 13:20:31 UTC (rev 1188) @@ -288,7 +288,7 @@ pt = items->getContextMenuPos(); } - MenuPtr contextMenu = createMenu(WinUtil::Seeds::menu); + MenuPtr contextMenu = addChild(WinUtil::Seeds::menu); contextMenu->appendItem(IDC_ADD, T_("&New..."), std::tr1::bind(&ADLSearchFrame::handleAdd, this)); contextMenu->appendItem(IDC_EDIT, T_("&Properties"), std::tr1::bind(&ADLSearchFrame::handleProperties, this)); contextMenu->appendItem(IDC_REMOVE, T_("&Remove"), std::tr1::bind(&ADLSearchFrame::handleRemove, this)); Modified: dcplusplus/trunk/win32/DirectoryListingFrame.cpp =================================================================== --- dcplusplus/trunk/win32/DirectoryListingFrame.cpp 2008-04-24 13:17:49 UTC (rev 1187) +++ dcplusplus/trunk/win32/DirectoryListingFrame.cpp 2008-04-24 13:20:31 UTC (rev 1188) @@ -309,7 +309,7 @@ } DirectoryListingFrame::MenuPtr DirectoryListingFrame::makeSingleMenu(ItemInfo* ii) { - MenuPtr menu = createMenu(WinUtil::Seeds::menu); + MenuPtr menu = addChild(WinUtil::Seeds::menu); menu->appendItem(IDC_DOWNLOAD, T_("&Download"), std::tr1::bind(&DirectoryListingFrame::handleDownload, this)); addTargets(menu, ii); @@ -334,7 +334,7 @@ } DirectoryListingFrame::MenuPtr DirectoryListingFrame::makeMultiMenu() { - MenuPtr menu = createMenu(WinUtil::Seeds::menu); + MenuPtr menu = addChild(WinUtil::Seeds::menu); menu->appendItem(IDC_DOWNLOAD, T_("&Download"), std::tr1::bind(&DirectoryListingFrame::handleDownload, this)); addTargets(menu); @@ -346,7 +346,7 @@ } DirectoryListingFrame::MenuPtr DirectoryListingFrame::makeDirMenu() { - MenuPtr menu = createMenu(WinUtil::Seeds::menu); + MenuPtr menu = addChild(WinUtil::Seeds::menu); menu->appendItem(IDC_DOWNLOAD, T_("&Download"), std::tr1::bind(&DirectoryListingFrame::handleDownload, this)); addTargets(menu); @@ -411,7 +411,7 @@ if(!path.empty() && (File::getSize(path) != -1)) { Menu::Seed cs = WinUtil::Seeds::menu; cs.ownerDrawn = false; - MenuPtr menu = createMenu(cs); + MenuPtr menu = addChild(cs); CShellContextMenu shellMenu; shellMenu.SetPath(Text::utf8ToWide(path)); shellMenu.ShowContextMenu(menu, pt); Modified: dcplusplus/trunk/win32/FavHubsFrame.cpp =================================================================== --- dcplusplus/trunk/win32/FavHubsFrame.cpp 2008-04-24 13:17:49 UTC (rev 1187) +++ dcplusplus/trunk/win32/FavHubsFrame.cpp 2008-04-24 13:20:31 UTC (rev 1188) @@ -279,7 +279,7 @@ pt = hubs->getContextMenuPos(); } - MenuPtr menu = createMenu(WinUtil::Seeds::menu); + MenuPtr menu = addChild(WinUtil::Seeds::menu); menu->appendItem(IDC_CONNECT, T_("&Connect"), std::tr1::bind(&FavHubsFrame::openSelected, this)); menu->appendSeparatorItem(); menu->appendItem(IDC_ADD, T_("&New..."), std::tr1::bind(&FavHubsFrame::handleAdd, this)); Modified: dcplusplus/trunk/win32/FinishedFrameBase.h =================================================================== --- dcplusplus/trunk/win32/FinishedFrameBase.h 2008-04-24 13:17:49 UTC (rev 1187) +++ dcplusplus/trunk/win32/FinishedFrameBase.h 2008-04-24 13:20:31 UTC (rev 1188) @@ -220,7 +220,7 @@ typename T::Menu::Seed cs = WinUtil::Seeds::menu; cs.ownerDrawn = false; - typename T::MenuPtr pShellMenu = this->createMenu(cs); + typename T::MenuPtr pShellMenu = this->addChild(cs); pShellMenu->appendItem(IDC_VIEW_AS_TEXT, T_("&View as text"), std::tr1::bind(&ThisType::handleViewAsText, this)); pShellMenu->appendItem(IDC_OPEN_FILE, T_("&Open"), std::tr1::bind(&ThisType::handleOpenFile, this)); pShellMenu->appendItem(IDC_OPEN_FOLDER, T_("Open &folder"), std::tr1::bind(&ThisType::handleOpenFolder, this)); @@ -236,7 +236,7 @@ } } - typename T::MenuPtr contextMenu = this->createMenu(WinUtil::Seeds::menu); + typename T::MenuPtr contextMenu = this->addChild(WinUtil::Seeds::menu); contextMenu->appendItem(IDC_VIEW_AS_TEXT, T_("&View as text"), std::tr1::bind(&ThisType::handleViewAsText, this)); contextMenu->appendItem(IDC_OPEN_FILE, T_("&Open"), std::tr1::bind(&ThisType::handleOpenFile, this)); contextMenu->appendItem(IDC_OPEN_FOLDER, T_("Open &folder"), std::tr1::bind(&ThisType::handleOpenFolder, this)); Modified: dcplusplus/trunk/win32/HubFrame.cpp =================================================================== --- dcplusplus/trunk/win32/HubFrame.cpp 2008-04-24 13:17:49 UTC (rev 1187) +++ dcplusplus/trunk/win32/HubFrame.cpp 2008-04-24 13:20:31 UTC (rev 1188) @@ -1165,7 +1165,7 @@ pt = users->getContextMenuPos(); } - MenuPtr menu = createMenu(WinUtil::Seeds::menu); + MenuPtr menu = addChild(WinUtil::Seeds::menu); appendUserItems(getParent(), menu); menu->appendItem(IDC_COPY_NICK, T_("Copy &nick to clipboard"), std::tr1::bind(&HubFrame::handleCopyNick, this)); @@ -1181,7 +1181,7 @@ } bool HubFrame::handleTabContextMenu(const dwt::ScreenCoordinate& pt) { - MenuPtr menu = createMenu(WinUtil::Seeds::menu); + MenuPtr menu = addChild(WinUtil::Seeds::menu); menu->setTitle(getParent()->getTabText(this)); Modified: dcplusplus/trunk/win32/MDIChildFrame.h =================================================================== --- dcplusplus/trunk/win32/MDIChildFrame.h 2008-04-24 13:17:49 UTC (rev 1187) +++ dcplusplus/trunk/win32/MDIChildFrame.h 2008-04-24 13:20:31 UTC (rev 1188) @@ -185,7 +185,7 @@ } bool handleContextMenu(const dwt::ScreenCoordinate& pt) { - dwt::Menu::ObjectType menu = createMenu(WinUtil::Seeds::menu); + dwt::Menu::ObjectType menu = addChild(WinUtil::Seeds::menu); menu->setTitle(getParent()->getTabText(this)); menu->appendItem(IDC_CLOSE_WINDOW, T_("&Close"), std::tr1::bind(&ThisType::close, this, true), dwt::BitmapPtr(new dwt::Bitmap(IDB_EXIT))); menu->trackPopupMenu(pt, TPM_LEFTALIGN | TPM_RIGHTBUTTON); Modified: dcplusplus/trunk/win32/MainWindow.cpp =================================================================== --- dcplusplus/trunk/win32/MainWindow.cpp 2008-04-24 13:17:49 UTC (rev 1187) +++ dcplusplus/trunk/win32/MainWindow.cpp 2008-04-24 13:20:31 UTC (rev 1188) @@ -182,7 +182,7 @@ { Menu::Seed cs = WinUtil::Seeds::menu; cs.popup = false; - mainMenu = createMenu(cs); + mainMenu = addChild(cs); } { @@ -1001,7 +1001,7 @@ handleRestore(); } else if(lParam == WM_RBUTTONDOWN || lParam == WM_CONTEXTMENU) { dwt::ScreenCoordinate pt; - MenuPtr trayMenu = createMenu(WinUtil::Seeds::menu); + MenuPtr trayMenu = addChild(WinUtil::Seeds::menu); trayMenu->appendItem(IDC_TRAY_SHOW, T_("Show"), std::tr1::bind(&MainWindow::handleRestore, this)); trayMenu->appendItem(IDC_TRAY_QUIT, T_("Exit"), std::tr1::bind(&MainWindow::close, this, true)); trayMenu->appendItem(IDC_OPEN_DOWNLOADS, T_("Open downloads directory")); Modified: dcplusplus/trunk/win32/PrivateFrame.cpp =================================================================== --- dcplusplus/trunk/win32/PrivateFrame.cpp 2008-04-24 13:17:49 UTC (rev 1187) +++ dcplusplus/trunk/win32/PrivateFrame.cpp 2008-04-24 13:20:31 UTC (rev 1188) @@ -364,7 +364,7 @@ } bool PrivateFrame::handleTabContextMenu(const dwt::ScreenCoordinate& pt) { - MenuPtr menu = createMenu(WinUtil::Seeds::menu); + MenuPtr menu = addChild(WinUtil::Seeds::menu); menu->setTitle(getParent()->getTabText(this)); Modified: dcplusplus/trunk/win32/PublicHubsFrame.cpp =================================================================== --- dcplusplus/trunk/win32/PublicHubsFrame.cpp 2008-04-24 13:17:49 UTC (rev 1187) +++ dcplusplus/trunk/win32/PublicHubsFrame.cpp 2008-04-24 13:20:31 UTC (rev 1188) @@ -449,7 +449,7 @@ pt = hubs->getContextMenuPos(); } - MenuPtr menu = createMenu(WinUtil::Seeds::menu); + MenuPtr menu = addChild(WinUtil::Seeds::menu); menu->appendItem(IDC_CONNECT, T_("&Connect"), std::tr1::bind(&PublicHubsFrame::handleConnect, this)); menu->appendItem(IDC_ADD, T_("Add To &Favorites"), std::tr1::bind(&PublicHubsFrame::handleAdd, this), dwt::BitmapPtr(new dwt::Bitmap(IDB_FAVORITE_HUBS))); menu->appendItem(IDC_COPY_HUB, T_("Copy &address to clipboard"), std::tr1::bind(&PublicHubsFrame::handleCopyHub, this)); Modified: dcplusplus/trunk/win32/QueueFrame.cpp =================================================================== --- dcplusplus/trunk/win32/QueueFrame.cpp 2008-04-24 13:17:49 UTC (rev 1187) +++ dcplusplus/trunk/win32/QueueFrame.cpp 2008-04-24 13:20:31 UTC (rev 1188) @@ -940,7 +940,7 @@ } QueueFrame::MenuPtr QueueFrame::makeSingleMenu(QueueItemInfo* qii) { - MenuPtr menu = createMenu(WinUtil::Seeds::menu); + MenuPtr menu = addChild(WinUtil::Seeds::menu); WinUtil::addHashItems(menu, qii->getTTH(), Text::toT(Util::getFileName(qii->getTarget()))); menu->appendItem(IDC_MOVE, T_("&Move/Rename"), std::tr1::bind(&QueueFrame::handleMove, this)); @@ -957,7 +957,7 @@ } QueueFrame::MenuPtr QueueFrame::makeMultiMenu() { - MenuPtr menu = createMenu(WinUtil::Seeds::menu); + MenuPtr menu = addChild(WinUtil::Seeds::menu); addPriorityMenu(menu); @@ -968,7 +968,7 @@ } QueueFrame::MenuPtr QueueFrame::makeDirMenu() { - MenuPtr menu = createMenu(WinUtil::Seeds::menu); + MenuPtr menu = addChild(WinUtil::Seeds::menu); addPriorityMenu(menu); menu->appendItem(IDC_MOVE, T_("&Move/Rename"), std::tr1::bind(&QueueFrame::handleMove, this)); Modified: dcplusplus/trunk/win32/SearchFrame.cpp =================================================================== --- dcplusplus/trunk/win32/SearchFrame.cpp 2008-04-24 13:17:49 UTC (rev 1187) +++ dcplusplus/trunk/win32/SearchFrame.cpp 2008-04-24 13:20:31 UTC (rev 1188) @@ -754,7 +754,7 @@ } SearchFrame::MenuPtr SearchFrame::makeMenu() { - MenuPtr menu = createMenu(WinUtil::Seeds::menu); + MenuPtr menu = addChild(WinUtil::Seeds::menu); StringPairList favoriteDirs = FavoriteManager::getInstance()->getFavoriteDirs(); SearchInfo::CheckTTH checkTTH = results->forEachSelectedT(SearchInfo::CheckTTH()); Modified: dcplusplus/trunk/win32/SpyFrame.cpp =================================================================== --- dcplusplus/trunk/win32/SpyFrame.cpp 2008-04-24 13:17:49 UTC (rev 1187) +++ dcplusplus/trunk/win32/SpyFrame.cpp 2008-04-24 13:20:31 UTC (rev 1188) @@ -179,7 +179,7 @@ pt = searches->getContextMenuPos(); } - MenuPtr contextMenu = createMenu(WinUtil::Seeds::menu); + MenuPtr contextMenu = addChild(WinUtil::Seeds::menu); contextMenu->appendItem<Menu::SimpleDispatcher>(IDC_SEARCH, T_("&Search"), std::tr1::bind(&SpyFrame::handleSearch, this, searches->getText(searches->getSelected(), COLUMN_STRING)), dwt::BitmapPtr(new dwt::Bitmap(IDB_SEARCH))); contextMenu->trackPopupMenu(pt, TPM_LEFTALIGN | TPM_RIGHTBUTTON); Modified: dcplusplus/trunk/win32/TransferView.cpp =================================================================== --- dcplusplus/trunk/win32/TransferView.cpp 2008-04-24 13:17:49 UTC (rev 1187) +++ dcplusplus/trunk/win32/TransferView.cpp 2008-04-24 13:20:31 UTC (rev 1188) @@ -175,7 +175,7 @@ } TransferView::MenuPtr TransferView::makeContextMenu(ConnectionInfo* ii) { - MenuPtr menu = createMenu(WinUtil::Seeds::menu); + MenuPtr menu = addChild(WinUtil::Seeds::menu); appendUserItems(mdi, menu); menu->appendSeparatorItem(); @@ -210,7 +210,7 @@ pt = downloads->getContextMenuPos(); } - MenuPtr menu = createMenu(WinUtil::Seeds::menu); + MenuPtr menu = addChild(WinUtil::Seeds::menu); DownloadInfo* di = downloads->getSelectedData(); WinUtil::addHashItems(menu, di->tth, di->columns[DOWNLOAD_COLUMN_FILE]); menu->trackPopupMenu(pt, TPM_LEFTALIGN | TPM_RIGHTBUTTON); Modified: dcplusplus/trunk/win32/UsersFrame.cpp =================================================================== --- dcplusplus/trunk/win32/UsersFrame.cpp 2008-04-24 13:17:49 UTC (rev 1187) +++ dcplusplus/trunk/win32/UsersFrame.cpp 2008-04-24 13:20:31 UTC (rev 1188) @@ -179,7 +179,7 @@ pt = users->getContextMenuPos(); } - MenuPtr menu = createMenu(WinUtil::Seeds::menu); + MenuPtr menu = addChild(WinUtil::Seeds::menu); appendUserItems(getParent(), menu); menu->appendSeparatorItem(); menu->appendItem(IDC_EDIT, T_("&Description"), std::tr1::bind(&UsersFrame::handleDescription, this)); Modified: dcplusplus/trunk/win32/WaitingUsersFrame.cpp =================================================================== --- dcplusplus/trunk/win32/WaitingUsersFrame.cpp 2008-04-24 13:17:49 UTC (rev 1187) +++ dcplusplus/trunk/win32/WaitingUsersFrame.cpp 2008-04-24 13:20:31 UTC (rev 1188) @@ -75,7 +75,7 @@ if(pt.x() == -1 || pt.y() == -1) { pt = queued->getContextMenuPos(); } - MenuPtr menu = createMenu(WinUtil::Seeds::menu); + MenuPtr menu = addChild(WinUtil::Seeds::menu); menu->appendItem(IDC_GETLIST, T_("&Get file list"), std::tr1::bind(&WaitingUsersFrame::onGetList, this)); menu->appendItem(IDC_COPY_FILENAME, T_("Copy Filename"), std::tr1::bind(&WaitingUsersFrame::onCopyFilename, this)); menu->appendItem(IDC_REMOVE, T_("&Remove"), std::tr1::bind(&WaitingUsersFrame::onRemove, this)); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |