From: <arn...@us...> - 2008-04-07 19:15:06
|
Revision: 1107 http://dcplusplus.svn.sourceforge.net/dcplusplus/?rev=1107&view=rev Author: arnetheduck Date: 2008-04-07 12:14:27 -0700 (Mon, 07 Apr 2008) Log Message: ----------- more Seed updates, no ::CreateWindowEx error anymore Modified Paths: -------------- dcplusplus/trunk/smartwin/include/smartwin/widgets/Control.h dcplusplus/trunk/smartwin/include/smartwin/widgets/ToolBar.h dcplusplus/trunk/smartwin/include/smartwin/widgets/ToolTip.h dcplusplus/trunk/smartwin/include/smartwin/widgets/Window.h dcplusplus/trunk/smartwin/source/widgets/ToolBar.cpp dcplusplus/trunk/smartwin/source/widgets/ToolTip.cpp dcplusplus/trunk/smartwin/source/widgets/Window.cpp dcplusplus/trunk/win32/AspectStatus.h dcplusplus/trunk/win32/MainWindow.cpp dcplusplus/trunk/win32/WidgetPaned.h Property Changed: ---------------- dcplusplus/trunk/ Property changes on: dcplusplus/trunk ___________________________________________________________________ Name: bzr:revision-info - timestamp: 2008-04-01 10:41:17.615000010 +0200 committer: zouzou123gen properties: branch-nick: bzr + timestamp: 2008-04-01 15:31:46.911999941 +0200 committer: zouzou123gen properties: branch-nick: bzr 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 + 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 Modified: dcplusplus/trunk/smartwin/include/smartwin/widgets/Control.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/widgets/Control.h 2008-04-07 19:11:56 UTC (rev 1106) +++ dcplusplus/trunk/smartwin/include/smartwin/widgets/Control.h 2008-04-07 19:14:27 UTC (rev 1107) @@ -57,7 +57,7 @@ template<typename Policy> Control<Policy>::Seed::Seed(LPCTSTR className, DWORD style, DWORD exStyle, const SmartUtil::tstring& caption) : - BaseType::Seed(NULL, style | WS_VISIBLE, exStyle, caption) + BaseType::Seed(className, style | WS_VISIBLE, exStyle, caption) { } Modified: dcplusplus/trunk/smartwin/include/smartwin/widgets/ToolBar.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/widgets/ToolBar.h 2008-04-07 19:11:56 UTC (rev 1106) +++ dcplusplus/trunk/smartwin/include/smartwin/widgets/ToolBar.h 2008-04-07 19:14:27 UTC (rev 1107) @@ -59,15 +59,13 @@ * to view the log of URL's you have been to etc... */ class ToolBar : -public CommonControl, + public CommonControl, // Aspects public AspectFocus< ToolBar >, public AspectFont< ToolBar > { typedef Dispatchers::VoidVoid<> Dispatcher; - typedef SmartWin::AspectSizable< ToolBar > AspectSizable; friend class WidgetCreator< ToolBar >; - friend class SmartWin::AspectSizable<ToolBar>; public: /// Class type typedef ToolBar ThisType; @@ -75,15 +73,16 @@ /// Object type typedef ThisType* ObjectType; + typedef CommonControl BaseType; + /// Seed class /** This class contains all of the values needed to create the widget. It also * knows the type of the class whose seed values it contains. Every widget * should define one of these. */ - class Seed - : public Widget::Seed - { - public: + struct Seed : public BaseType::Seed { + typedef ThisType WidgetType; + /// Fills with default parameters Seed(); }; @@ -293,7 +292,7 @@ } inline ToolBar::ToolBar( SmartWin::Widget * parent ) - : ControlType( parent ) + : BaseType( parent ) { } Modified: dcplusplus/trunk/smartwin/include/smartwin/widgets/ToolTip.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/widgets/ToolTip.h 2008-04-07 19:11:56 UTC (rev 1106) +++ dcplusplus/trunk/smartwin/include/smartwin/widgets/ToolTip.h 2008-04-07 19:14:27 UTC (rev 1107) @@ -46,10 +46,11 @@ /// Object type typedef ThisType * ObjectType; - class Seed - : public Widget::Seed - { - public: + typedef MessageMap< Policies::Subclassed > BaseType; + + struct Seed : public BaseType::Seed { + typedef ThisType WidgetType; + /// Fills with default parameters Seed(); }; @@ -78,7 +79,7 @@ }; inline ToolTip::ToolTip( Widget * parent ) - : PolicyType( parent ) + : BaseType( parent ) { // Can't have a text box without a parent... xAssert( parent, _T( "Can't have a ToolTip without a parent..." ) ); Modified: dcplusplus/trunk/smartwin/include/smartwin/widgets/Window.h =================================================================== --- dcplusplus/trunk/smartwin/include/smartwin/widgets/Window.h 2008-04-07 19:11:56 UTC (rev 1106) +++ dcplusplus/trunk/smartwin/include/smartwin/widgets/Window.h 2008-04-07 19:14:27 UTC (rev 1107) @@ -85,11 +85,10 @@ * should define one of these. */ struct Seed : public BaseType::Seed { - public: - typedef Window::ThisType WidgetType; + typedef ThisType WidgetType; /// Fills with default parameters - Seed(); + Seed(const SmartUtil::tstring& caption = SmartUtil::tstring()); }; /// Actually creates the window @@ -99,7 +98,7 @@ * The simple version "create()" uses a default Seed for the window attributes. * The seed is not taken a constant because the class name will be generated at registration. */ - virtual void create( const Seed& cs = Seed() ); + void create( const Seed& cs = Seed() ); // TODO: Check up if the CREATESTRUCT * actualy IS modyfiable...!! /// Setting the event handler for the "create" event Modified: dcplusplus/trunk/smartwin/source/widgets/ToolBar.cpp =================================================================== --- dcplusplus/trunk/smartwin/source/widgets/ToolBar.cpp 2008-04-07 19:11:56 UTC (rev 1106) +++ dcplusplus/trunk/smartwin/source/widgets/ToolBar.cpp 2008-04-07 19:14:27 UTC (rev 1107) @@ -3,13 +3,13 @@ namespace SmartWin { ToolBar::Seed::Seed() : - Widget::Seed(TOOLBARCLASSNAME, WS_CHILD | WS_VISIBLE | TBSTYLE_LIST | TBSTYLE_TOOLTIPS) + BaseType::Seed(TOOLBARCLASSNAME, WS_CHILD | TBSTYLE_LIST | TBSTYLE_TOOLTIPS) { } void ToolBar::create( const Seed & cs ) { - ControlType::create(cs); + BaseType::create(cs); this->sendMessage(TB_SETEXTENDEDSTYLE, 0, TBSTYLE_EX_MIXEDBUTTONS); Modified: dcplusplus/trunk/smartwin/source/widgets/ToolTip.cpp =================================================================== --- dcplusplus/trunk/smartwin/source/widgets/ToolTip.cpp 2008-04-07 19:11:56 UTC (rev 1106) +++ dcplusplus/trunk/smartwin/source/widgets/ToolTip.cpp 2008-04-07 19:14:27 UTC (rev 1107) @@ -3,7 +3,7 @@ namespace SmartWin { ToolTip::Seed::Seed() : - Widget::Seed(TOOLTIPS_CLASS, WS_POPUP | TTS_ALWAYSTIP | TTS_NOPREFIX, WS_EX_TRANSPARENT) + BaseType::Seed(TOOLTIPS_CLASS, WS_POPUP | TTS_ALWAYSTIP | TTS_NOPREFIX, WS_EX_TRANSPARENT) { } @@ -11,7 +11,7 @@ { xAssert((cs.style & WS_POPUP) == WS_POPUP, _T("Widget must have WS_POPUP style")); - PolicyType::create(cs); + BaseType::create(cs); } void ToolTip::relayEvent(const MSG& msg) { Modified: dcplusplus/trunk/smartwin/source/widgets/Window.cpp =================================================================== --- dcplusplus/trunk/smartwin/source/widgets/Window.cpp 2008-04-07 19:11:56 UTC (rev 1106) +++ dcplusplus/trunk/smartwin/source/widgets/Window.cpp 2008-04-07 19:14:27 UTC (rev 1107) @@ -2,9 +2,7 @@ namespace SmartWin { -// TODO add caption -Window::Seed::Seed() : BaseType::Seed(SmartUtil::tstring(), 0, 0) { - +Window::Seed::Seed(const SmartUtil::tstring& caption) : BaseType::Seed(caption, 0, 0) { } void Window::create(const Seed& cs) { Modified: dcplusplus/trunk/win32/AspectStatus.h =================================================================== --- dcplusplus/trunk/win32/AspectStatus.h 2008-04-07 19:11:56 UTC (rev 1106) +++ dcplusplus/trunk/win32/AspectStatus.h 2008-04-07 19:14:27 UTC (rev 1107) @@ -38,7 +38,7 @@ void initStatus(bool sizeGrip = false) { status = static_cast<WidgetType*>(this)->addChild(StatusBarSections::Seed(sizeGrip)); - statusTip = static_cast<WidgetType*>(this)->createToolTip(); + statusTip = static_cast<WidgetType*>(this)->addChild(SmartWin::ToolTip::Seed()); statusTip->setTool(status, std::tr1::bind(&ThisType::handleToolTip, this)); } Modified: dcplusplus/trunk/win32/MainWindow.cpp =================================================================== --- dcplusplus/trunk/win32/MainWindow.cpp 2008-04-07 19:11:56 UTC (rev 1106) +++ dcplusplus/trunk/win32/MainWindow.cpp 2008-04-07 19:14:27 UTC (rev 1107) @@ -145,16 +145,15 @@ } void MainWindow::initWindow() { - // Create main window dcdebug("initWindow\n"); - Seed cs; - int pos_x= SETTING(MAIN_WINDOW_POS_X); - int pos_y= SETTING(MAIN_WINDOW_POS_Y); - int size_x= SETTING(MAIN_WINDOW_SIZE_X); - int size_y= SETTING(MAIN_WINDOW_SIZE_Y); + Seed cs(_T(APPNAME) _T(" ") _T(VERSIONSTRING)); + int pos_x = SETTING(MAIN_WINDOW_POS_X); + int pos_y = SETTING(MAIN_WINDOW_POS_Y); + int size_x = SETTING(MAIN_WINDOW_SIZE_X); + int size_y = SETTING(MAIN_WINDOW_SIZE_Y); if ( (pos_x != static_cast<int>(CW_USEDEFAULT)) &&(pos_y != static_cast<int>(CW_USEDEFAULT))&&(size_x != static_cast<int>(CW_USEDEFAULT))&&(size_y != static_cast<int>(CW_USEDEFAULT))&&(pos_x > 0&& pos_y > 0) &&(size_x > 10&& size_y > 10)) { @@ -165,15 +164,13 @@ if (ResourceManager::getInstance()->isRTL()) cs.exStyle |= WS_EX_RTLREADING; - // Set window name - cs.caption = _T(APPNAME) _T(" ") _T(VERSIONSTRING); cs.icon = SmartWin::IconPtr(new SmartWin::Icon(IDR_MAINFRAME)); cs.background = (HBRUSH)(COLOR_3DFACE + 1); create(cs); setHelpId(IDH_STARTPAGE); - paned = createHPaned(); + paned = addChild(WidgetHPaned::Seed()); paned->setRelativePos(0.7); } @@ -265,7 +262,7 @@ ToolBar::Seed cs; cs.style |= TBSTYLE_FLAT; - toolbar = createToolbar(cs); + toolbar = addChild(cs); { SmartWin::ImageListPtr list(new SmartWin::ImageList(20, 20, ILC_COLOR32 | ILC_MASK)); SmartWin::Bitmap bmp(IDB_TOOLBAR20); Modified: dcplusplus/trunk/win32/WidgetPaned.h =================================================================== --- dcplusplus/trunk/win32/WidgetPaned.h 2008-04-07 19:11:56 UTC (rev 1106) +++ dcplusplus/trunk/win32/WidgetPaned.h 2008-04-07 19:14:27 UTC (rev 1107) @@ -34,15 +34,14 @@ /// Class type typedef WidgetPaned< horizontal > ThisType; - typedef SmartWin::MessageMap< SmartWin::Policies::Normal > PolicyType; - /// Object type typedef ThisType * ObjectType; - class Seed - : public Widget::Seed - { - public: + typedef SmartWin::MessageMap< SmartWin::Policies::Normal > BaseType; + + struct Seed : public BaseType::Seed { + typedef ThisType WidgetType; + explicit Seed(); }; @@ -123,13 +122,13 @@ SmartWin::IconPtr(), SmartWin::IconPtr(), LoadCursor( 0, horizontal ? IDC_SIZENS : IDC_SIZEWE )); template< bool horizontal > -WidgetPaned< horizontal >::Seed::Seed() : SmartWin::Widget::Seed(windowClass.getClassName(), WS_VISIBLE | WS_CHILD | WS_CLIPSIBLINGS) +WidgetPaned< horizontal >::Seed::Seed() : BaseType::Seed(windowClass.getClassName(), WS_VISIBLE | WS_CHILD | WS_CLIPSIBLINGS) { } template< bool horizontal > WidgetPaned< horizontal >::WidgetPaned( SmartWin::Widget * parent ) - : PolicyType( parent ) + : BaseType( parent ) , pos(0.5) , moving(false) { @@ -139,7 +138,7 @@ template< bool horizontal > void WidgetPaned< horizontal >::create( const Seed & cs ) { - PolicyType::create(cs); + BaseType::create(cs); onLeftMouseDown(std::tr1::bind(&ThisType::handleLButtonDown, this, _1)); onMouseMove(std::tr1::bind(&ThisType::handleMouseMove, this, _1)); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |