From: <arn...@us...> - 2008-04-07 21:30:46
|
Revision: 1125 http://dcplusplus.svn.sourceforge.net/dcplusplus/?rev=1125&view=rev Author: arnetheduck Date: 2008-04-07 14:30:14 -0700 (Mon, 07 Apr 2008) Log Message: ----------- Include cleanup Modified Paths: -------------- dcplusplus/trunk/smartwin/SmartUtil/tstring.h dcplusplus/trunk/smartwin/include/smartwin/Dispatchers.h dcplusplus/trunk/smartwin/include/smartwin/Events.h dcplusplus/trunk/smartwin/include/smartwin/SmartWin.h dcplusplus/trunk/smartwin/include/smartwin/WidgetFactoryPlatformSmartWinDesktop.h dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectActivate.h dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectCloseable.h dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectColor.h dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectCommand.h dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectContextMenu.h dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectDragDrop.h dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectEnabled.h dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectEraseBackground.h dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectFocus.h dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectHelp.h dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectKeyboard.h dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectMinMax.h dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectMouse.h dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectPainting.h dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectScrollable.h dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectSelection.h dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectText.h dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectTimer.h dcplusplus/trunk/smartwin/include/smartwin/forward.h dcplusplus/trunk/smartwin/include/smartwin/widgets/Button.h dcplusplus/trunk/smartwin/include/smartwin/widgets/CheckBox.h dcplusplus/trunk/smartwin/include/smartwin/widgets/ColorDialog.h dcplusplus/trunk/smartwin/include/smartwin/widgets/ComboBox.h dcplusplus/trunk/smartwin/include/smartwin/widgets/Composite.h dcplusplus/trunk/smartwin/include/smartwin/widgets/Container.h dcplusplus/trunk/smartwin/include/smartwin/widgets/Control.h dcplusplus/trunk/smartwin/include/smartwin/widgets/CoolBar.h dcplusplus/trunk/smartwin/include/smartwin/widgets/DateTime.h dcplusplus/trunk/smartwin/include/smartwin/widgets/FolderDialog.h dcplusplus/trunk/smartwin/include/smartwin/widgets/FontDialog.h dcplusplus/trunk/smartwin/include/smartwin/widgets/Frame.h dcplusplus/trunk/smartwin/include/smartwin/widgets/GroupBox.h dcplusplus/trunk/smartwin/include/smartwin/widgets/Label.h dcplusplus/trunk/smartwin/include/smartwin/widgets/LoadDialog.h dcplusplus/trunk/smartwin/include/smartwin/widgets/MDIChild.h dcplusplus/trunk/smartwin/include/smartwin/widgets/MDIFrame.h dcplusplus/trunk/smartwin/include/smartwin/widgets/MDIParent.h dcplusplus/trunk/smartwin/include/smartwin/widgets/MessageBox.h dcplusplus/trunk/smartwin/include/smartwin/widgets/ModalDialog.h dcplusplus/trunk/smartwin/include/smartwin/widgets/ModelessDialog.h dcplusplus/trunk/smartwin/include/smartwin/widgets/ProgressBar.h dcplusplus/trunk/smartwin/include/smartwin/widgets/RadioButton.h dcplusplus/trunk/smartwin/include/smartwin/widgets/RichTextBox.h dcplusplus/trunk/smartwin/include/smartwin/widgets/Slider.h dcplusplus/trunk/smartwin/include/smartwin/widgets/Spinner.h dcplusplus/trunk/smartwin/include/smartwin/widgets/StatusBar.h dcplusplus/trunk/smartwin/include/smartwin/widgets/TabSheet.h dcplusplus/trunk/smartwin/include/smartwin/widgets/TabView.h dcplusplus/trunk/smartwin/include/smartwin/widgets/Table.h dcplusplus/trunk/smartwin/include/smartwin/widgets/TextBox.h dcplusplus/trunk/smartwin/include/smartwin/widgets/ToolBar.h dcplusplus/trunk/smartwin/include/smartwin/widgets/ToolTip.h dcplusplus/trunk/smartwin/include/smartwin/widgets/Tree.h dcplusplus/trunk/smartwin/include/smartwin/widgets/WidgetMenu.h dcplusplus/trunk/smartwin/include/smartwin/widgets/Window.h dcplusplus/trunk/smartwin/source/Application.cpp dcplusplus/trunk/smartwin/source/CanvasClasses.cpp dcplusplus/trunk/smartwin/source/Events.cpp dcplusplus/trunk/smartwin/source/WindowClass.cpp dcplusplus/trunk/smartwin/source/widgets/MDIChild.cpp dcplusplus/trunk/smartwin/source/widgets/ModalDialog.cpp dcplusplus/trunk/smartwin/source/widgets/ModelessDialog.cpp dcplusplus/trunk/smartwin/source/widgets/RichTextBox.cpp dcplusplus/trunk/smartwin/source/widgets/TabView.cpp dcplusplus/trunk/smartwin/source/widgets/Table.cpp dcplusplus/trunk/win32/MainWindow.cpp dcplusplus/trunk/win32/TextBox.cpp dcplusplus/trunk/win32/TextBox.h dcplusplus/trunk/win32/WidgetPaned.h Property Changed: ---------------- dcplusplus/trunk/ Property changes on: dcplusplus/trunk ___________________________________________________________________ Name: bzr:revision-info - timestamp: 2008-04-03 13:51:12.936000109 +0100 committer: mrmikejj properties: branch-nick: dcplusplus + timestamp: 2008-04-03 14:51:39.752000093 +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 + 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 Modified: dcplusplus/trunk/smartwin/SmartUtil/tstring.h =================================================================== --- dcplusplus/trunk/smartwin/SmartUtil/tstring.h 2008-04-07 21:26:56 UTC (rev 1124) +++ dcplusplus/trunk/smartwin/SmartUtil/tstring.h 2008-04-07 21:30:14 UTC (rev 1125) @@ -27,9 +27,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include <iosfwd> -#include <sstream> -#include <algorithm> #include <string> #ifndef tstring_smartwin_H Modified: dcplusplus/trunk/smartwin/include/smartwin/Dispatchers.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/Dispatchers.h 2008-04-07 21:26:56 UTC (rev 1124) +++ dcplusplus/trunk/smartwin/include/smartwin/Dispatchers.h 2008-04-07 21:30:14 UTC (rev 1125) @@ -2,7 +2,6 @@ #define DISPATCHERS_H_ #include "WindowsHeaders.h" - #include <functional> namespace SmartWin { Modified: dcplusplus/trunk/smartwin/include/smartwin/Events.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/Events.h 2008-04-07 21:26:56 UTC (rev 1124) +++ dcplusplus/trunk/smartwin/include/smartwin/Events.h 2008-04-07 21:30:14 UTC (rev 1125) @@ -30,6 +30,45 @@ bool isRestored; }; +/// Mouse Event structure +/** Several event handlers supply an object of this type as one or more parameters to + * their Event Handler. <br> + * E.g. the "onLeftMouseUp" Event Handler takes an object of this type to give + * extensive information regarding the Event. + */ +struct MouseEvent { + MouseEvent(const MSG& msg); + + /// Types of buttons + enum Button { + OTHER, LEFT, RIGHT, MIDDLE, X1, X2 + }; + + /// Position of mouse + /** Position of mouse when event was raised + */ + ScreenCoordinate pos; + + /// is the CTRL key pressed + /** true if CTRL key is pressed, otherwise false + */ + bool isControlPressed; + + /// is the SHIFT key pressed + /** true if SHIFT key is pressed, otherwise false + */ + bool isShiftPressed; + + /// is the ALT key pressed + /** true if ALT key is pressed, otherwise false + */ + bool isAltPressed; + + /// Indicates which mouse button was actually pressed + Button ButtonPressed; +}; + + } #endif /*EVENTS_H_*/ Modified: dcplusplus/trunk/smartwin/include/smartwin/SmartWin.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/SmartWin.h 2008-04-07 21:26:56 UTC (rev 1124) +++ dcplusplus/trunk/smartwin/include/smartwin/SmartWin.h 2008-04-07 21:30:14 UTC (rev 1125) @@ -78,6 +78,7 @@ #include "widgets/ModelessDialog.h" #include "widgets/ProgressBar.h" #include "widgets/RadioButton.h" +#include "widgets/RichTextBox.h" #include "widgets/Slider.h" #include "widgets/Spinner.h" #include "widgets/Table.h" Modified: dcplusplus/trunk/smartwin/include/smartwin/WidgetFactoryPlatformSmartWinDesktop.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/WidgetFactoryPlatformSmartWinDesktop.h 2008-04-07 21:26:56 UTC (rev 1124) +++ dcplusplus/trunk/smartwin/include/smartwin/WidgetFactoryPlatformSmartWinDesktop.h 2008-04-07 21:30:14 UTC (rev 1125) @@ -30,7 +30,6 @@ #define WidgetFactoryPlatformSmartWinDesktop_h #include "WidgetFactoryPlatformCommon.h" -#include "widgets/RichTextBox.h" #include "widgets/FontDialog.h" #include "widgets/WidgetMenu.h" #include "WidgetCreator.h" @@ -48,12 +47,6 @@ : public ContainerWidgetType { public: - /// RichEditBox class type. - typedef SmartWin::RichTextBox RichTextBox; - - /// RichEditBox object type. - typedef typename RichTextBox::ObjectType RichTextBoxPtr; - /// Menu class type. typedef SmartWin::WidgetMenu WidgetMenu; @@ -78,25 +71,6 @@ return FontDialog( this ); } - /// Creates a Rich Edit Control and returns a pointer to it. - /** DON'T delete the returned pointer!!! - */ - RichTextBoxPtr createRichTextBox( const typename RichTextBox::Seed & cs = RichTextBox::Seed() ) - { - return WidgetCreator< RichTextBox >::create( this, cs ); - } - - /// \ingroup SubclassDialog - /// Subclasses a Rich Edit Control from the given resource id. - /** DON'T delete the returned pointer!!! <br> - * Use e.g. the Dialog Designer to design a dialog and attach the controls - * with this function. - */ - RichTextBoxPtr attachRichTextBox( unsigned id ) - { - return WidgetCreator< RichTextBox >::attach( this, id ); - } - /// Creates a Menu /** The returned object is of type std::tr1::shared_ptr< WidgetMenu >, but * you should use the typedef WidgetMenuPtr and not <br> Modified: dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectActivate.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectActivate.h 2008-04-07 21:26:56 UTC (rev 1124) +++ dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectActivate.h 2008-04-07 21:30:14 UTC (rev 1125) @@ -28,6 +28,7 @@ #ifndef AspectActivate_h #define AspectActivate_h +#include "../Message.h" #include "../Dispatchers.h" namespace SmartWin { Modified: dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectCloseable.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectCloseable.h 2008-04-07 21:26:56 UTC (rev 1124) +++ dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectCloseable.h 2008-04-07 21:30:14 UTC (rev 1125) @@ -1,6 +1,8 @@ #ifndef ASPECTCLOSE_H_ #define ASPECTCLOSE_H_ +#include "../Message.h" + namespace SmartWin { template< class WidgetType > Modified: dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectColor.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectColor.h 2008-04-07 21:26:56 UTC (rev 1124) +++ dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectColor.h 2008-04-07 21:30:14 UTC (rev 1125) @@ -28,8 +28,8 @@ #ifndef AspectColor_h #define AspectColor_h +#include "../Message.h" #include "../resources/Brush.h" -#include "../CanvasClasses.h" namespace SmartWin { Modified: dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectCommand.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectCommand.h 2008-04-07 21:26:56 UTC (rev 1124) +++ dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectCommand.h 2008-04-07 21:30:14 UTC (rev 1125) @@ -1,6 +1,7 @@ #ifndef ASPECTCOMMAND_ #define ASPECTCOMMAND_ +#include "../Message.h" #include "../Dispatchers.h" namespace SmartWin { Modified: dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectContextMenu.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectContextMenu.h 2008-04-07 21:26:56 UTC (rev 1124) +++ dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectContextMenu.h 2008-04-07 21:30:14 UTC (rev 1125) @@ -3,6 +3,7 @@ #include "../Point.h" #include "../Dispatchers.h" +#include "../Message.h" namespace SmartWin { Modified: dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectDragDrop.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectDragDrop.h 2008-04-07 21:26:56 UTC (rev 1124) +++ dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectDragDrop.h 2008-04-07 21:30:14 UTC (rev 1125) @@ -30,6 +30,8 @@ #ifndef WINCE // Not supported on WINCE platform +#include "../Message.h" +#include "../Point.h" #include <vector> #include <shellapi.h> Modified: dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectEnabled.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectEnabled.h 2008-04-07 21:26:56 UTC (rev 1124) +++ dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectEnabled.h 2008-04-07 21:30:14 UTC (rev 1125) @@ -28,6 +28,7 @@ #ifndef AspectEnabled_h #define AspectEnabled_h +#include "../Message.h" #include "../Dispatchers.h" namespace SmartWin Modified: dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectEraseBackground.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectEraseBackground.h 2008-04-07 21:26:56 UTC (rev 1124) +++ dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectEraseBackground.h 2008-04-07 21:30:14 UTC (rev 1125) @@ -28,6 +28,7 @@ #ifndef AspectEraseBackground_h #define AspectEraseBackground_h +#include "../Message.h" #include "../CanvasClasses.h" namespace SmartWin Modified: dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectFocus.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectFocus.h 2008-04-07 21:26:56 UTC (rev 1124) +++ dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectFocus.h 2008-04-07 21:30:14 UTC (rev 1125) @@ -28,6 +28,7 @@ #ifndef AspectFocus_h #define AspectFocus_h +#include "../Message.h" #include "../Dispatchers.h" namespace SmartWin Modified: dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectHelp.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectHelp.h 2008-04-07 21:26:56 UTC (rev 1124) +++ dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectHelp.h 2008-04-07 21:30:14 UTC (rev 1125) @@ -1,6 +1,7 @@ #ifndef ASPECTHELP_H_ #define ASPECTHELP_H_ +#include "../Message.h" #include <functional> namespace SmartWin { Modified: dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectKeyboard.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectKeyboard.h 2008-04-07 21:26:56 UTC (rev 1124) +++ dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectKeyboard.h 2008-04-07 21:30:14 UTC (rev 1125) @@ -28,6 +28,8 @@ #ifndef AspectKeyboard_h #define AspectKeyboard_h +#include "../Message.h" + namespace SmartWin { // begin namespace SmartWin Modified: dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectMinMax.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectMinMax.h 2008-04-07 21:26:56 UTC (rev 1124) +++ dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectMinMax.h 2008-04-07 21:30:14 UTC (rev 1125) @@ -28,11 +28,7 @@ #ifndef AspectMinMax_h #define AspectMinMax_h -#include "../Widget.h" -#include "../Place.h" -#include "../xCeption.h" -#include "../Dispatchers.h" -#include "../Events.h" +#include "../WindowsHeaders.h" namespace SmartWin { Modified: dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectMouse.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectMouse.h 2008-04-07 21:26:56 UTC (rev 1124) +++ dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectMouse.h 2008-04-07 21:30:14 UTC (rev 1125) @@ -28,53 +28,14 @@ #ifndef AspectMouse_h #define AspectMouse_h -#include "../Point.h" -#include <functional> +#include "../Events.h" +#include "../Message.h" +#include "../Dispatchers.h" namespace SmartWin { // begin namespace SmartWin -/// Mouse Event structure -/** Several event handlers supply an object of this type as one or more parameters to - * their Event Handler. <br> - * E.g. the "onLeftMouseUp" Event Handler takes an object of this type to give - * extensive information regarding the Event. - */ -struct MouseEventResult -{ - MouseEventResult(HWND hwnd, WPARAM wParam, LPARAM lParam); - - /// Types of buttons - enum Button - { - OTHER, LEFT, RIGHT, MIDDLE, X1, X2 - }; - - /// Position of mouse - /** Position of mouse when event was raised - */ - ScreenCoordinate pos; - - /// is the CTRL key pressed - /** true if CTRL key is pressed, otherwise false - */ - bool isControlPressed; - - /// is the SHIFT key pressed - /** true if SHIFT key is pressed, otherwise false - */ - bool isShiftPressed; - - /// is the ALT key pressed - /** true if ALT key is pressed, otherwise false - */ - bool isAltPressed; - - /// Indicates which mouse button was actually pressed - Button ButtonPressed; -}; - /// Aspect class used by Widgets that have the possibility of trapping "mouse /// clicked" events. /** \ingroup AspectClasses @@ -84,26 +45,15 @@ template< class WidgetType > class AspectMouse { - struct Dispatcher - { - typedef std::tr1::function<void (const MouseEventResult &)> F; - - Dispatcher(const F& f_) : f(f_) { } - - bool operator()(const MSG& msg, LRESULT& ret) { - f(MouseEventResult(msg.hwnd, msg.wParam, msg.lParam )); - return true; - } - - F f; - }; - + WidgetType& W() { return *static_cast<WidgetType*>(this); } + + typedef Dispatchers::ConvertBase<MouseEvent> Dispatcher; public: /// \ingroup EventHandlersAspectMouse /// Left mouse button pressed and released event handler setter /** If supplied, function will be called when user releases the Left Mouse button * after clicking onto the client area of the Widget. <br> - * The parameter passed is const MouseEventResult & which contains the state of + * The parameter passed is const MouseEvent & which contains the state of * the mouse. */ void onLeftMouseUp(const typename Dispatcher::F& f) { @@ -114,7 +64,7 @@ /// Right mouse button pressed and released event handler setter /** If supplied, function will be called when user releases the Right Mouse * button after clicking onto the client area of the Widget. <br> - * The parameter passed is const MouseEventResult & which contains the state of + * The parameter passed is const MouseEvent & which contains the state of * the mouse. */ void onRightMouseUp(const typename Dispatcher::F& f) { @@ -125,7 +75,7 @@ /// Middle mouse button pressed and released event handler setter /** If supplied, function will be called when user releases the middle Mouse * button after clicking onto the client area of the Widget. <br> - * The parameter passed is const MouseEventResult & which contains the state of + * The parameter passed is const MouseEvent & which contains the state of * the mouse. */ void onMiddleMouseUp(const typename Dispatcher::F& f) { @@ -136,7 +86,7 @@ /// Left mouse button pressed event handler setter /** If supplied, function will be called when user press the Left Mouse button in * the client area of the widget. <br> - * The parameter passed is const MouseEventResult & which contains the state of + * The parameter passed is const MouseEvent & which contains the state of * the mouse. */ void onLeftMouseDown(const typename Dispatcher::F& f) { @@ -147,7 +97,7 @@ /// Right mouse button pressed event handler setter /** If supplied, function will be called when user press the Right Mouse button * in the client area of the widget. <br> - * The parameter passed is const MouseEventResult & which contains the state of + * The parameter passed is const MouseEvent & which contains the state of * the mouse. */ void onRightMouseDown(const typename Dispatcher::F& f) { @@ -157,7 +107,7 @@ /// Middle mouse button pressed event handler setter /** If supplied, function will be called when user press the Middle Mouse button * in the client area of the widget. <br> - * The parameter passed is const MouseEventResult & which contains the state of + * The parameter passed is const MouseEvent & which contains the state of * the mouse. */ void onMiddleMouseDown(const typename Dispatcher::F& f) { @@ -167,7 +117,7 @@ /// Left mouse button double-clicked event handler setter /** If supplied, function will be called when user double clicks the Left mouse button * in the client area of the widget. <br> - * The parameter passed is const MouseEventResult & which contains the state of + * The parameter passed is const MouseEvent & which contains the state of * the mouse. */ void onLeftMouseDblClick(const typename Dispatcher::F& f) { @@ -177,7 +127,7 @@ /// Right mouse button double-clicked event handler setter /** If supplied, function will be called when user double clicks the Right mouse button * in the client area of the widget. <br> - * The parameter passed is const MouseEventResult & which contains the state of + * The parameter passed is const MouseEvent & which contains the state of * the mouse. */ void onRightMouseDblClick(const typename Dispatcher::F& f) { @@ -187,7 +137,7 @@ /// \ingroup EventHandlersAspectMouse /// Mouse moved event handler setter /** If supplied, function will be called when user moves the mouse. <br> - * The parameter passed is const MouseEventResult & which contains the state of + * The parameter passed is const MouseEvent & which contains the state of * the mouse. */ void onMouseMove(const typename Dispatcher::F& f) { @@ -197,12 +147,10 @@ protected: void onMouse(UINT msg, const typename Dispatcher::F& f) { - static_cast<WidgetType*>(this)->addCallback( - Message( msg ), Dispatcher(f) - ); + W().addCallback(Message( msg ), Dispatcher(f)); } - virtual ~AspectMouse() - {} + + virtual ~AspectMouse() { } }; // end namespace SmartWin Modified: dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectPainting.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectPainting.h 2008-04-07 21:26:56 UTC (rev 1124) +++ dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectPainting.h 2008-04-07 21:30:14 UTC (rev 1125) @@ -28,7 +28,6 @@ #ifndef AspectPainting_h #define AspectPainting_h -#include "../Widget.h" #include "../CanvasClasses.h" namespace SmartWin Modified: dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectScrollable.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectScrollable.h 2008-04-07 21:26:56 UTC (rev 1124) +++ dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectScrollable.h 2008-04-07 21:30:14 UTC (rev 1125) @@ -29,6 +29,7 @@ #define AspectScrollable_h #include "../Dispatchers.h" +#include "../Message.h" namespace SmartWin { Modified: dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectSelection.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectSelection.h 2008-04-07 21:26:56 UTC (rev 1124) +++ dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectSelection.h 2008-04-07 21:30:14 UTC (rev 1125) @@ -54,7 +54,7 @@ * No parameters are passed. */ void onSelectionChanged(const typename Dispatcher::F& f) { - W().addCallback(W().getSelectionChangedMessage(), Dispatcher(f)); + W().addCallback(WidgetType::getSelectionChangedMessage(), Dispatcher(f)); } /// Sets the selected index of the Widget Modified: dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectText.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectText.h 2008-04-07 21:26:56 UTC (rev 1124) +++ dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectText.h 2008-04-07 21:30:14 UTC (rev 1125) @@ -30,6 +30,7 @@ #include "../../SmartUtil.h" #include "../Dispatchers.h" +#include "../Message.h" namespace SmartWin { Modified: dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectTimer.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectTimer.h 2008-04-07 21:26:56 UTC (rev 1124) +++ dcplusplus/trunk/smartwin/include/smartwin/aspects/AspectTimer.h 2008-04-07 21:30:14 UTC (rev 1125) @@ -1,6 +1,8 @@ #ifndef ASPECTTIMER_H_ #define ASPECTTIMER_H_ +#include "../Message.h" + namespace SmartWin { template< class WidgetType > Modified: dcplusplus/trunk/smartwin/include/smartwin/forward.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/forward.h 2008-04-07 21:26:56 UTC (rev 1124) +++ dcplusplus/trunk/smartwin/include/smartwin/forward.h 2008-04-07 21:30:14 UTC (rev 1125) @@ -45,6 +45,9 @@ class RadioButton; typedef RadioButton* RadioButtonPtr; +class RichTextBox; +typedef RichTextBox* RichTextBoxPtr; + class Spinner; typedef Spinner* SpinnerPtr; Modified: dcplusplus/trunk/smartwin/include/smartwin/widgets/Button.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/widgets/Button.h 2008-04-07 21:26:56 UTC (rev 1124) +++ dcplusplus/trunk/smartwin/include/smartwin/widgets/Button.h 2008-04-07 21:30:14 UTC (rev 1125) @@ -12,8 +12,6 @@ namespace SmartWin { -// Forward declaring friends - /** Common stuff for all buttons */ class Button : public CommonControl, Modified: dcplusplus/trunk/smartwin/include/smartwin/widgets/CheckBox.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/widgets/CheckBox.h 2008-04-07 21:26:56 UTC (rev 1124) +++ dcplusplus/trunk/smartwin/include/smartwin/widgets/CheckBox.h 2008-04-07 21:30:14 UTC (rev 1125) @@ -28,17 +28,10 @@ #ifndef CheckBox_h #define CheckBox_h -#include "../Widget.h" #include "Button.h" -namespace SmartWin -{ -// begin namespace SmartWin +namespace SmartWin { -// Forward declaring friends -template< class WidgetType > -class WidgetCreator; - /// Check Box Control class /** \ingroup WidgetControls * \WidgetUsageInfo Modified: dcplusplus/trunk/smartwin/include/smartwin/widgets/ColorDialog.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/widgets/ColorDialog.h 2008-04-07 21:26:56 UTC (rev 1124) +++ dcplusplus/trunk/smartwin/include/smartwin/widgets/ColorDialog.h 2008-04-07 21:30:14 UTC (rev 1125) @@ -30,9 +30,7 @@ #include "../Widget.h" -namespace SmartWin -{ -// begin namespace SmartWin +namespace SmartWin { /// ChooseColorDialog class /** \ingroup WidgetControls Modified: dcplusplus/trunk/smartwin/include/smartwin/widgets/ComboBox.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/widgets/ComboBox.h 2008-04-07 21:26:56 UTC (rev 1124) +++ dcplusplus/trunk/smartwin/include/smartwin/widgets/ComboBox.h 2008-04-07 21:30:14 UTC (rev 1125) @@ -28,7 +28,6 @@ #ifndef ComboBox_h #define ComboBox_h -#include "../Widget.h" #include "../aspects/AspectColor.h" #include "../aspects/AspectClickable.h" #include "../aspects/AspectCollection.h" @@ -42,12 +41,7 @@ namespace SmartWin { -// begin namespace SmartWin -// Forward declaring friends -template< class WidgetType > -class WidgetCreator; - /// ComboBox Control class /** \ingroup WidgetControls * \WidgetUsageInfo Modified: dcplusplus/trunk/smartwin/include/smartwin/widgets/Composite.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/widgets/Composite.h 2008-04-07 21:26:56 UTC (rev 1124) +++ dcplusplus/trunk/smartwin/include/smartwin/widgets/Composite.h 2008-04-07 21:30:14 UTC (rev 1125) @@ -1,8 +1,6 @@ #ifndef COMPOSITE_H_ #define COMPOSITE_H_ -#include "../forward.h" - #include "../aspects/AspectActivate.h" #include "../aspects/AspectCommand.h" #include "../aspects/AspectDragDrop.h" Modified: dcplusplus/trunk/smartwin/include/smartwin/widgets/Container.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/widgets/Container.h 2008-04-07 21:26:56 UTC (rev 1124) +++ dcplusplus/trunk/smartwin/include/smartwin/widgets/Container.h 2008-04-07 21:30:14 UTC (rev 1125) @@ -1,7 +1,6 @@ #ifndef CONTAINER_H_ #define CONTAINER_H_ -#include "../Policies.h" #include "Composite.h" namespace SmartWin { Modified: dcplusplus/trunk/smartwin/include/smartwin/widgets/Control.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/widgets/Control.h 2008-04-07 21:26:56 UTC (rev 1124) +++ dcplusplus/trunk/smartwin/include/smartwin/widgets/Control.h 2008-04-07 21:30:14 UTC (rev 1125) @@ -2,7 +2,6 @@ #define CONTROL_H_ #include "../Policies.h" -#include "../xCeption.h" #include "../aspects/AspectBorder.h" #include "../aspects/AspectCloseable.h" Modified: dcplusplus/trunk/smartwin/include/smartwin/widgets/CoolBar.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/widgets/CoolBar.h 2008-04-07 21:26:56 UTC (rev 1124) +++ dcplusplus/trunk/smartwin/include/smartwin/widgets/CoolBar.h 2008-04-07 21:30:14 UTC (rev 1125) @@ -39,14 +39,8 @@ #include "../aspects/AspectVisible.h" #include "../xCeption.h" -namespace SmartWin -{ -// begin namespace SmartWin +namespace SmartWin { -// Forward declaring friends -template< class WidgetType > -class WidgetCreator; - /// Coolbar Control class /** \ingroup WidgetControls * \WidgetUsageInfo Modified: dcplusplus/trunk/smartwin/include/smartwin/widgets/DateTime.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/widgets/DateTime.h 2008-04-07 21:26:56 UTC (rev 1124) +++ dcplusplus/trunk/smartwin/include/smartwin/widgets/DateTime.h 2008-04-07 21:30:14 UTC (rev 1125) @@ -28,16 +28,13 @@ #ifndef DateTime_h #define DateTime_h -#include "../Widget.h" #include "../aspects/AspectClickable.h" #include "../aspects/AspectFocus.h" #include "../aspects/AspectFont.h" #include "../aspects/AspectPainting.h" #include "Control.h" -namespace SmartWin -{ -// begin namespace SmartWin +namespace SmartWin { /// DateTimePicker Control class /** \ingroup WidgetControls Modified: dcplusplus/trunk/smartwin/include/smartwin/widgets/FolderDialog.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/widgets/FolderDialog.h 2008-04-07 21:26:56 UTC (rev 1124) +++ dcplusplus/trunk/smartwin/include/smartwin/widgets/FolderDialog.h 2008-04-07 21:30:14 UTC (rev 1125) @@ -32,9 +32,7 @@ #include "../../SmartUtil.h" #include <shlobj.h> -namespace SmartWin -{ -// begin namespace SmartWin +namespace SmartWin { /// ChooseFolderDialog class /** \ingroup WidgetControls Modified: dcplusplus/trunk/smartwin/include/smartwin/widgets/FontDialog.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/widgets/FontDialog.h 2008-04-07 21:26:56 UTC (rev 1124) +++ dcplusplus/trunk/smartwin/include/smartwin/widgets/FontDialog.h 2008-04-07 21:30:14 UTC (rev 1125) @@ -31,9 +31,7 @@ #include "../Widget.h" -namespace SmartWin -{ -// begin namespace SmartWin +namespace SmartWin { /// ChooseFontDialog class /** \ingroup WidgetControls Modified: dcplusplus/trunk/smartwin/include/smartwin/widgets/Frame.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/widgets/Frame.h 2008-04-07 21:26:56 UTC (rev 1124) +++ dcplusplus/trunk/smartwin/include/smartwin/widgets/Frame.h 2008-04-07 21:30:14 UTC (rev 1125) @@ -28,14 +28,11 @@ #ifndef Frame_h #define Frame_h -#include "../Application.h" -#include "../Rectangle.h" +#include "../resources/Icon.h" #include "../aspects/AspectMinMax.h" #include "Composite.h" -namespace SmartWin -{ -// begin namespace SmartWin +namespace SmartWin { /// Main Window class /** \ingroup WidgetControls @@ -110,23 +107,11 @@ void setMaximizeBox( bool value = true ); /// Sets the small icon for the Widget (the small icon appears typically in the top left corner of the Widget) - void setIconSmall( int resourceId ); + void setIconSmall( const IconPtr& icon ); - /// Sets the small icon for the Widget (the small icon appears typically in the top left corner of the Widget) - void setIconSmall( const SmartUtil::tstring & filePathName ); - /// Sets the large icon for the Widget (the large icon appears e.g. when you press ALT+Tab) - void setIconLarge( int resourceId ); + void setIconLarge( const IconPtr& icon ); - /// Sets the large icon for the Widget (the large icon appears e.g. when you press ALT+Tab) - void setIconLarge( const SmartUtil::tstring & filePathName ); - - /// Sets the cursor for the Widget - void setCursor( int resourceId ); - - /// Sets the cursor for the Widget - void setCursor( const SmartUtil::tstring & filePathName ); - protected: struct Seed : public BaseType::Seed { Seed(const SmartUtil::tstring& caption, DWORD style, DWORD exStyle); @@ -193,48 +178,18 @@ } template< class Policy > -void Frame< Policy >::setIconSmall( int resourceId ) +void Frame< Policy >::setIconSmall( const IconPtr& icon ) { - HICON hIcon = ( HICON )::LoadImage( Application::instance().getAppHandle(), MAKEINTRESOURCE( resourceId ), IMAGE_ICON, ::GetSystemMetrics(SM_CXSMICON), ::GetSystemMetrics(SM_CYSMICON), LR_DEFAULTCOLOR ); - ::SendMessage( this->handle(), WM_SETICON, ICON_SMALL, reinterpret_cast< LPARAM >( hIcon ) ); + ::SendMessage( this->handle(), WM_SETICON, ICON_SMALL, reinterpret_cast< LPARAM >( icon->handle() ) ); } template< class Policy > -void Frame< Policy >::setIconLarge( int resourceId ) +void Frame< Policy >::setIconLarge( const IconPtr& icon ) { - HICON hIcon = ( HICON )::LoadImage( Application::instance().getAppHandle(), MAKEINTRESOURCE( resourceId ), IMAGE_ICON, 0, 0, LR_DEFAULTSIZE ); - ::SendMessage( this->handle(), WM_SETICON, ICON_BIG, reinterpret_cast< LPARAM >( hIcon ) ); + ::SendMessage( this->handle(), WM_SETICON, ICON_BIG, reinterpret_cast< LPARAM >( icon->handle() ) ); } template< class Policy > -void Frame< Policy >::setIconSmall( const SmartUtil::tstring & filePathName ) -{ - HICON hIcon = ( HICON )::LoadImage( 0, filePathName.c_str(), IMAGE_ICON, ::GetSystemMetrics(SM_CXSMICON), ::GetSystemMetrics(SM_CYSMICON), LR_DEFAULTCOLOR | LR_LOADFROMFILE ); - ::SendMessage( this->handle(), WM_SETICON, ICON_SMALL, reinterpret_cast< LPARAM >( hIcon ) ); -} - -template< class Policy > -void Frame< Policy >::setIconLarge( const SmartUtil::tstring & filePathName ) -{ - HICON hIcon = ( HICON )::LoadImage( 0, filePathName.c_str(), IMAGE_ICON, 0, 0, LR_DEFAULTSIZE | LR_LOADFROMFILE ); - ::SendMessage( this->handle(), WM_SETICON, ICON_BIG, reinterpret_cast< LPARAM >( hIcon ) ); -} - -template< class Policy > -void Frame< Policy >::setCursor( int resourceId ) -{ - HCURSOR hCur = ::LoadCursor( Application::instance().getAppHandle(), MAKEINTRESOURCE( resourceId ) ); - ::SetClassLongPtr( this->handle(), GCLP_HCURSOR, reinterpret_cast< LONG >( hCur ) ); -} - -template< class Policy > -void Frame< Policy >::setCursor( const SmartUtil::tstring & filePathName ) -{ - HICON hCur = ( HICON )::LoadImage( 0, filePathName.c_str(), IMAGE_CURSOR, 0, 0, LR_DEFAULTSIZE | LR_LOADFROMFILE ); - ::SetClassLongPtr( this->handle(), GCLP_HCURSOR, reinterpret_cast< LONG >( hCur ) ); -} - -template< class Policy > Frame< Policy >::Frame( Widget * parent ) : Composite<Policy>( parent ) { Modified: dcplusplus/trunk/smartwin/include/smartwin/widgets/GroupBox.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/widgets/GroupBox.h 2008-04-07 21:26:56 UTC (rev 1124) +++ dcplusplus/trunk/smartwin/include/smartwin/widgets/GroupBox.h 2008-04-07 21:30:14 UTC (rev 1125) @@ -28,19 +28,10 @@ #ifndef GroupBox_h #define GroupBox_h -#include "../Widget.h" #include "Button.h" -namespace SmartWin -{ -// begin namespace SmartWin +namespace SmartWin { -// Forward declaring friends -template< class WidgetType > -class WidgetCreator; - -/** sideeffect= \par Side Effects : - */ /// Button Control class /** \ingroup WidgetControls * \WidgetUsageInfo Modified: dcplusplus/trunk/smartwin/include/smartwin/widgets/Label.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/widgets/Label.h 2008-04-07 21:26:56 UTC (rev 1124) +++ dcplusplus/trunk/smartwin/include/smartwin/widgets/Label.h 2008-04-07 21:30:14 UTC (rev 1125) @@ -28,7 +28,6 @@ #ifndef Label_h #define Label_h -#include "../Widget.h" #include "../aspects/AspectColor.h" #include "../aspects/AspectClickable.h" #include "../aspects/AspectDblClickable.h" @@ -40,12 +39,7 @@ #include "Control.h" namespace SmartWin { -// begin namespace SmartWin -// Forward declaring friends -template< class WidgetType > -class WidgetCreator; - /// Static Control class /** \ingroup WidgetControls * \WidgetUsageInfo Modified: dcplusplus/trunk/smartwin/include/smartwin/widgets/LoadDialog.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/widgets/LoadDialog.h 2008-04-07 21:26:56 UTC (rev 1124) +++ dcplusplus/trunk/smartwin/include/smartwin/widgets/LoadDialog.h 2008-04-07 21:30:14 UTC (rev 1125) @@ -33,9 +33,7 @@ #include "../aspects/AspectFileFilter.h" #include <vector> -namespace SmartWin -{ -// begin namespace SmartWin +namespace SmartWin { /// LoadFileDialog class /** \ingroup WidgetControls Modified: dcplusplus/trunk/smartwin/include/smartwin/widgets/MDIChild.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/widgets/MDIChild.h 2008-04-07 21:26:56 UTC (rev 1124) +++ dcplusplus/trunk/smartwin/include/smartwin/widgets/MDIChild.h 2008-04-07 21:30:14 UTC (rev 1125) @@ -39,12 +39,8 @@ #include <boost/scoped_ptr.hpp> -namespace SmartWin -{ -// begin namespace SmartWin +namespace SmartWin { -/** sideeffect=\par Side Effects: - */ /// MDI Child Control class /** \ingroup WidgetControls * \WidgetUsageInfo Modified: dcplusplus/trunk/smartwin/include/smartwin/widgets/MDIFrame.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/widgets/MDIFrame.h 2008-04-07 21:26:56 UTC (rev 1124) +++ dcplusplus/trunk/smartwin/include/smartwin/widgets/MDIFrame.h 2008-04-07 21:30:14 UTC (rev 1125) @@ -30,12 +30,8 @@ #include "Frame.h" -namespace SmartWin -{ -// begin namespace SmartWin +namespace SmartWin { -class MDIParent; - /// "MDI Frame" class /** \ingroup WidgetControls * \WidgetUsageInfo Modified: dcplusplus/trunk/smartwin/include/smartwin/widgets/MDIParent.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/widgets/MDIParent.h 2008-04-07 21:26:56 UTC (rev 1124) +++ dcplusplus/trunk/smartwin/include/smartwin/widgets/MDIParent.h 2008-04-07 21:30:14 UTC (rev 1125) @@ -28,15 +28,7 @@ #ifndef MDIParent_h #define MDIParent_h -#include "../Widget.h" -#include "../Rectangle.h" -#include "../Policies.h" -#include "../aspects/AspectEnabled.h" -#include "../aspects/AspectFocus.h" -#include "../aspects/AspectRaw.h" -#include "../aspects/AspectSizable.h" -#include "../aspects/AspectVisible.h" -#include "../xCeption.h" +#include "Control.h" #include "MDIFrame.h" namespace SmartWin Modified: dcplusplus/trunk/smartwin/include/smartwin/widgets/MessageBox.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/widgets/MessageBox.h 2008-04-07 21:26:56 UTC (rev 1124) +++ dcplusplus/trunk/smartwin/include/smartwin/widgets/MessageBox.h 2008-04-07 21:30:14 UTC (rev 1125) @@ -31,9 +31,7 @@ #include "../../SmartUtil.h" #include "../Widget.h" -namespace SmartWin -{ -// begin namespace SmartWin +namespace SmartWin { /// MessageBox class /** \ingroup WidgetControls Modified: dcplusplus/trunk/smartwin/include/smartwin/widgets/ModalDialog.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/widgets/ModalDialog.h 2008-04-07 21:26:56 UTC (rev 1124) +++ dcplusplus/trunk/smartwin/include/smartwin/widgets/ModalDialog.h 2008-04-07 21:30:14 UTC (rev 1125) @@ -31,9 +31,7 @@ #include "../aspects/AspectDialog.h" #include "Frame.h" -namespace SmartWin -{ -// begin namespace SmartWin +namespace SmartWin { /// Modal Dialog class /** \ingroup WidgetControls Modified: dcplusplus/trunk/smartwin/include/smartwin/widgets/ModelessDialog.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/widgets/ModelessDialog.h 2008-04-07 21:26:56 UTC (rev 1124) +++ dcplusplus/trunk/smartwin/include/smartwin/widgets/ModelessDialog.h 2008-04-07 21:30:14 UTC (rev 1125) @@ -31,9 +31,7 @@ #include "../aspects/AspectDialog.h" #include "Frame.h" -namespace SmartWin -{ -// begin namespace SmartWin +namespace SmartWin { /// Dialog class /** \ingroup WidgetControls Modified: dcplusplus/trunk/smartwin/include/smartwin/widgets/ProgressBar.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/widgets/ProgressBar.h 2008-04-07 21:26:56 UTC (rev 1124) +++ dcplusplus/trunk/smartwin/include/smartwin/widgets/ProgressBar.h 2008-04-07 21:30:14 UTC (rev 1125) @@ -28,20 +28,11 @@ #ifndef ProgressBar_h #define ProgressBar_h -#include "../Widget.h" #include "../aspects/AspectPainting.h" #include "Control.h" -namespace SmartWin -{ -// begin namespace SmartWin +namespace SmartWin { -// Forward declaring friends -template< class WidgetType > -class WidgetCreator; - -/** sideeffect= \par Side Effects : -*/ /// ProgressBar Control class /** \ingroup WidgetControls * \WidgetUsageInfo Modified: dcplusplus/trunk/smartwin/include/smartwin/widgets/RadioButton.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/widgets/RadioButton.h 2008-04-07 21:26:56 UTC (rev 1124) +++ dcplusplus/trunk/smartwin/include/smartwin/widgets/RadioButton.h 2008-04-07 21:30:14 UTC (rev 1125) @@ -28,19 +28,10 @@ #ifndef RadioButton_h #define RadioButton_h -#include "../Widget.h" #include "Button.h" -namespace SmartWin -{ -// begin namespace SmartWin +namespace SmartWin { -// Forward declaring friends -template< class WidgetType > -class WidgetCreator; - - /** sideeffect = \par Side Effects : - */ /// Button Control class /** \ingroup WidgetControls * \WidgetUsageInfo Modified: dcplusplus/trunk/smartwin/include/smartwin/widgets/RichTextBox.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/widgets/RichTextBox.h 2008-04-07 21:26:56 UTC (rev 1124) +++ dcplusplus/trunk/smartwin/include/smartwin/widgets/RichTextBox.h 2008-04-07 21:30:14 UTC (rev 1125) @@ -31,17 +31,11 @@ #ifndef WINCE // Doesn't exist in Windows CE based systems #include "TextBox.h" -#include "../LibraryLoader.h" + #include <richedit.h> -namespace SmartWin -{ -// begin namespace SmartWin +namespace SmartWin { -// Forward declaring friends -template< class WidgetType > -class WidgetCreator; - /// RichEdit Control class /** \ingroup WidgetControls * \WidgetUsageInfo Modified: dcplusplus/trunk/smartwin/include/smartwin/widgets/Slider.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/widgets/Slider.h 2008-04-07 21:26:56 UTC (rev 1124) +++ dcplusplus/trunk/smartwin/include/smartwin/widgets/Slider.h 2008-04-07 21:30:14 UTC (rev 1125) @@ -28,22 +28,13 @@ #ifndef Slider_h #define Slider_h -#include "../Widget.h" #include "../aspects/AspectFocus.h" #include "../aspects/AspectPainting.h" #include "../aspects/AspectScrollable.h" #include "Control.h" -namespace SmartWin -{ -// begin namespace SmartWin +namespace SmartWin { -// Forward declaring friends -template< class WidgetType > -class WidgetCreator; - -/** sideeffect=\par Side Effects: - */ /// Slider Control class /** \ingroup WidgetControls * \WidgetUsageInfo Modified: dcplusplus/trunk/smartwin/include/smartwin/widgets/Spinner.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/widgets/Spinner.h 2008-04-07 21:26:56 UTC (rev 1124) +++ dcplusplus/trunk/smartwin/include/smartwin/widgets/Spinner.h 2008-04-07 21:30:14 UTC (rev 1125) @@ -28,20 +28,13 @@ #ifndef Spinner_h #define Spinner_h -#include "../Widget.h" #include "../aspects/AspectFocus.h" #include "../aspects/AspectPainting.h" #include "../aspects/AspectScrollable.h" #include "Control.h" -namespace SmartWin -{ -// begin namespace SmartWin +namespace SmartWin { -// Forward declaring friends -template< class WidgetType > -class WidgetCreator; - /** sideeffect=\par Side Effects: */ /// Spinner Control class Modified: dcplusplus/trunk/smartwin/include/smartwin/widgets/StatusBar.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/widgets/StatusBar.h 2008-04-07 21:26:56 UTC (rev 1124) +++ dcplusplus/trunk/smartwin/include/smartwin/widgets/StatusBar.h 2008-04-07 21:30:14 UTC (rev 1125) @@ -28,7 +28,6 @@ #ifndef StatusBar_h #define StatusBar_h -#include "../Widget.h" #include "../aspects/AspectClickable.h" #include "../aspects/AspectDblClickable.h" #include "../aspects/AspectFont.h" @@ -36,14 +35,8 @@ #include "../aspects/AspectText.h" #include "Control.h" -namespace SmartWin -{ -// begin namespace SmartWin +namespace SmartWin { -// Forward declaring friends -template< class WidgetType > -class WidgetCreator; - /// Policy class for StatusBar with sections instead of one large area where /// you can add information /** A Status Bar with sections is a normal statusbar except instead of one large area Modified: dcplusplus/trunk/smartwin/include/smartwin/widgets/TabSheet.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/widgets/TabSheet.h 2008-04-07 21:26:56 UTC (rev 1124) +++ dcplusplus/trunk/smartwin/include/smartwin/widgets/TabSheet.h 2008-04-07 21:30:14 UTC (rev 1125) @@ -28,7 +28,6 @@ #ifndef TabSheet_h #define TabSheet_h -#include "../Widget.h" #include "../resources/ImageList.h" #include "../Rectangle.h" #include "../aspects/AspectCollection.h" @@ -39,15 +38,8 @@ #include "../aspects/AspectText.h" #include "Control.h" -namespace SmartWin -{ -// begin namespace SmartWin +namespace SmartWin { - -// Forward declaring friends -template< class WidgetType > -class WidgetCreator; - /// Tab Sheet Control class /** \ingroup WidgetControls * \WidgetUsageInfo @@ -74,6 +66,7 @@ { friend class AspectCollection<TabSheet, int>; friend class AspectSelection<TabSheet, int>; + friend class WidgetCreator< TabSheet >; struct ChangingDispatcher { @@ -91,24 +84,7 @@ TabSheet* widget; }; - struct ChangedDispatcher - { - typedef std::tr1::function<void (unsigned)> F; - ChangedDispatcher(const F& f_, TabSheet* widget_) : f(f_), widget(widget_) { } - - bool operator()(const MSG& msg, LRESULT& ret) { - unsigned param = TabCtrl_GetCurSel( widget->handle() ); - f(param); - return true; - } - - F f; - TabSheet* widget; - }; - - friend class WidgetCreator< TabSheet >; - public: /// Class type typedef TabSheet ThisType; @@ -132,9 +108,6 @@ explicit Seed(); }; - // AspectSelection expectation implementation - static const Message & getSelectionChangedMessage(); - SmartUtil::tstring getText(unsigned idx) const; void setText(unsigned idx, const SmartUtil::tstring& text); @@ -152,12 +125,6 @@ ); } - void onSelectionChanged(const ChangedDispatcher::F& f) { - addCallback( - Message( WM_NOTIFY, TCN_SELCHANGE ), ChangedDispatcher(f, this ) - ); - } - /// Appends a "page" to the Tab Sheet /** The return value is the index of the new item appended. The input index is * where you wish to put the new page @@ -254,6 +221,9 @@ {} private: + // AspectSelection expectation implementation + static Message getSelectionChangedMessage(); + // Keep a copy so it won't get deallocated... ImageListPtr imageList; @@ -272,10 +242,8 @@ // Implementation of class /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -inline const Message & TabSheet::getSelectionChangedMessage() -{ - static const Message retVal( WM_NOTIFY, TCN_SELCHANGE ); - return retVal; +inline Message TabSheet::getSelectionChangedMessage() { + return Message( WM_NOTIFY, TCN_SELCHANGE ); } inline int TabSheet::getSelectedImpl() const { Modified: dcplusplus/trunk/smartwin/include/smartwin/widgets/TabView.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/widgets/TabView.h 2008-04-07 21:26:56 UTC (rev 1124) +++ dcplusplus/trunk/smartwin/include/smartwin/widgets/TabView.h 2008-04-07 21:30:14 UTC (rev 1125) @@ -121,10 +121,10 @@ void handleSized(const SizedEvent&); void handleTabSelected(); LRESULT handleToolTip(LPARAM lParam); - void handleLeftMouseDown(const MouseEventResult& mouseEventResult); - void handleLeftMouseUp(const MouseEventResult& mouseEventResult); + void handleLeftMouseDown(const MouseEvent& mouseEventResult); + void handleLeftMouseUp(const MouseEvent& mouseEventResult); bool handleContextMenu(SmartWin::ScreenCoordinate pt); - void handleMiddleMouseDown(const MouseEventResult& mouseEventResult); + void handleMiddleMouseDown(const MouseEvent& mouseEventResult); void handleHelp(HWND hWnd, unsigned id); SmartUtil::tstring formatTitle(SmartUtil::tstring title); Modified: dcplusplus/trunk/smartwin/include/smartwin/widgets/Table.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/widgets/Table.h 2008-04-07 21:26:56 UTC (rev 1124) +++ dcplusplus/trunk/smartwin/include/smartwin/widgets/Table.h 2008-04-07 21:30:14 UTC (rev 1125) @@ -28,7 +28,6 @@ #ifndef ListView_h #define ListView_h -#include "../Widget.h" #include "../Point.h" #include "../Rectangle.h" #include "../resources/ImageList.h" @@ -46,14 +45,8 @@ #include <vector> -namespace SmartWin -{ -// begin namespace SmartWin +namespace SmartWin { -// Forward declaring friends -template< class WidgetType > -class WidgetCreator; - /// List View Control class /** \ingroup WidgetControls * \WidgetUsageInfo @@ -530,35 +523,29 @@ size_t countSelectedImpl() const; // Aspect expectation implementation - static const Message & getSelectionChangedMessage(); + static Message getSelectionChangedMessage(); // Contract needed by AspectClickable Aspect class - static const Message & getClickMessage(); + static Message getClickMessage(); // Contra... [truncated message content] |